Stupid LISP trick

Home

TTT (TrueType tracer)

PalmShot

REALIZE for AutoCAD (G-Code export)

My CNC machinery

PCB Manufacturing

My stepper drivers

Sherline lathe conversion

Image to G-Code conversion

STL to DXF conversion

Historical IBM AT stuff

A few of my homemade clocks


Friends' sites:
Alex Bill Jeff John Michael

About this site

Coming soon?

Email the author:
chris@timeguy.com GPG Public Key

Michael, who's on a LISP kick, asked (rhetorically?) today why we don't use LISP s-expressions instead of XML for data files. Then you can read and manipulate them however you want with no particular trouble. Good question.

A silly proof of concept:

(HTML (HEAD (TITLE "Hello world")) (BODY (BLINK ("SPAN STYLE=\"color:red\"" "Testing.") "Still blinking.")))

into:

<HTML> <HEAD> <TITLE> Hello world </TITLE> </HEAD> <BODY> <BLINK> <SPAN STYLE="color:red"> Testing. </SPAN> Still blinking. </BLINK> </BODY> </HTML>

Files attached to this page:

in.lsp134 bytes
tohtml.lsp924 bytes

Useful? Depends whether you want to use LISP, I suppose. It seems like a clean alternative to python's pickle, C++'s boost serialization, etc.


[æ]