A REPL for learning SVG (with a variant of eepitch; 2026)
First version of this page: 2026aug02.
1. Installing and testingThis is a work in progress that is still in a very early stage, and that at this moment consists of six files. If you have a notion of what are eev, eepitch and test blocks you can try esvg - a.k.a. "eepitch-svg" - by installing eev (recommended way: "with a sexp"), and running the eepitch block below. Note that it uses bullets, that are equivalent to red stars, and that the lines with `••'s are comments with elisp hyperlinks, and some of them point to demos...
2. Some demos2.1. The demo in svg.elThe screenshots below are from 2026aug02: The first one shows at the window at the right the very terse demo of svg.el that appears in its "Comments:" section. The second screenshot shows at the left my version of that demo, converted to a test block with lots of comments, and at the right the SVG that it creates, in three formats: SVG, Lisp, and XML. To watch that test block as a (very short) movie, click here: MP4. The current version of this demo is here:
2.2. A first way of using groupsThe screenshots below are from 2026aug13, ...and they show my first prototype that was able to handle groups correctly; the comments in the second screenshot below explain why I had to write an alternative to `svg--append'. To watch that test block as a short (36s) movie, click here: MP4. The current version of this demo is here:
2.3. A demo for clipPathThis one is based on https://www.fffuel.co/sssvg/#clippath, but REPL-ified. The screenshot below is from 2026aug15: To watch that test block as a short (37s) movie, click here: MP4. The current version of this demo is here:
2.4. Porting ideas from Pict2e and Dednat to SVGIn my presentation at the EmacsConf2023 I showed how I create my LaTeX diagrams using lots of small very hacky programs that I develop using REPLs and test blocks. Most of these hacky programs are written as extensions to Dednat6 (see its slides) that generate Pict2e code; the best example in the presentation appears at 29:59, and it uses Piecewise2.lua. I'm now trying to generate diagrams similar to those ones using esvg.
Here are links to the test blocks in the third, fourth and fifth screenshots:
Warning: Some sections below this point are still in pre-draft stage!!! 3. What is the objective of this?I read Jon Bentley's "Programming Pearls" in the 90s, before having had access to any Unix machines, and its p.139 is probably the page in Computer Science literature that blew my mind the most. It explains pipes with this example - a spelling checker:
It is not a program that is useful in itself, but it presents a (new) way of connecting pieces - see the "orgy of one-liners" here -, it uses a well-chosen example, and it hides lots of implementation details that are hard to understand, like how the control is switched between the processes when enough input is ready. Let me copy here three short excerpts from "The Evolution of Forth" (Rather, Colburn, Moore, 1996; ACM, PDF):
Some of the demos above - in particular this one, in the section about Pict2e - are toy examples of an idea that is very big: "REPL-ifying". Consider, for example, forgetting and reconstructing; most mathematicians don't remember things exactly - they start from vague memories and reconstruct the rest... This is from Michael Ham's "Factoring in Forth" (published in Dr. Dobb's Toolbook of Forth, vol.2, pp.45-60):
In my first attempts to learn SVG each element was like a "monster word": I would try to learn it, my mental buffer would overflow, and I would forget practically everything... but this started to change when I found ways to factor them into "little words" that were easy to test, and I could still understand them when I went back to my notes the next day. The best way to discuss these techniques is via examples, by chat, by factoring other people's code, and by finding out where the difficulties are. My main objective with this "REPL for SVG" thing is to discuss these things, in practice, on IRC. 4. Hacking with low self-esteemMy first plan with this project was to use it to discuss bigger problems, and it was going to say that REPL for SVGs is a particular case of "hacking with low self-esteem". My self-esteem is usually very low, and things are getting worse because (...) 5. Homework6. From CodebergFrom https://blog.codeberg.org/protecting-our-floss-commons-from-llms.html:
7. AccusationsI work in a bad campus of a good federal university in Brazil. In 2026mar11, two days after the classes had started, I was told - by a very embarassed secury guard - that there were orders forbidding me to enter the area of the campus... and I discovered that some of my colleagues had convinced some important people that I could be in the midst of a psychotic break, and they were afraid of what I could do - like killing people... My favorite way of describing that with few words is: I "became a psychopath". The details are here, but they are all in Portuguese. The first time that I was able to write to tell that story in English was in 2026jul22, in the #emacs IRC channel, here: <edrx> I'm having to sue some colleagues and I have very little
mental energy left for technical things now.
<edrx> bertied: yep - 99% of the story is online, but it's all in
Portuguese, and I haven't written a summary in English
yet...
<edrx> bertied: here is a good starting point:
https://anggtwu.net/2025-alguns-motivos-reginaldo.html
<edrx> basically they made lots of false accusations against me,
made the university investigate those false accusations,
ignored all the stuff that the judging commission produced
showing that I was inoccent, made other false accusations,
convinced some people that I could be planning to kill
people, and asked the rector to forbid me to enter the
university...
In that period - from 2026mar11 to 2026jul22 - practically every time that I thought about chatting on IRC my next thought was "I need a way to tell that story in English, but I don't have it", and I disappeared from IRC (and from mailing lists). =( Here is a slightly longer version of the story: In 2022 some of my colleagues started to make false accusations against me, and they opened a "processo administrativo" (a "PAD") against me. That PAD sort of ended in 2023 - with the judges declaring me inoccent... but in some technical senses it never ended, because its "relatório final" - a kind of final report/summary - was never produced... and then this same group of colleagues decided to ignore all the evidence that I was declared inoccent, and they convinced many other colleagues that I was very, very, very guilty. In 2025 I started to make some of the documents public, and in the 2026 I started to organize them in pages organized chronologically, like these ones: Reginaldo, Ana Isabel, Etel... and my colleagues panicked. (Work in progress!) |