tildas

miscellaneous doodles, unfinished, unrealized

tildas

Adventures in learning Lisp, as an artist, not an academic

I've had it in my mind to learn Lisp - it seems odd compared to other languages, lots of far out things are easily possible, like transpiling to other languages: C, python, javascript, webassembly, etc. And there are so many Lisps! And implementations!

Anyway, this article is my collected notes on my journey so far. I'm not really a programmer, just an avant garde artist, so maybe this will become an artwork.

circa april 11th:

Started by reading wikipedia, I guess Common Lisp is the generic standard dialect for normal humans, so the only choice is implementation. SBCL seems to be the main one, but ECL seems interesting, compilable with any C compiler? In reading the docs, I guess ECL is sort of meant to be tied into an existing C project, not quite the generic thing I was hoping for.

The SBCL port for FreeBSD is apparently not for ARM systems.. the makefile specifies only amd64 and i386 :^) same story with clisp and Clozure CL.. the joys of trying to do this on a Raspberry Pi 4 with FreeBSD.

Not to be discouraged, I found a binary version of SBCL 2.2.0, and went about installing it into /opt

short digression, I learned that $PATH is set in /etc/login.conf in FreeBSD, and it requires a command to be ran after changes.

Typing 'sbcl' in a terminal works! Discovered the book Practical Common Lisp while waiting on compilation of the latest sbcl (2.3.3).

At this point I'm trying to spit out a hello world binary, but it's like 30 megabytes? I'm not understanding: how do I get just a standalone binary, and not deal with this REPL nonsense, why isn't it as simple as doing a thing in C? Apparently the entire philosophy of development is opposed to this:

https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/#s16-lisp-as-a-system

This seems very strange to my brain, how the hell does anyone get a shippable binary?

may 15th:

Forget all of that, what about Scheme? Seems much simpler than the likes of Common Lisp, the spec being so short.

may 21st:

Ok, Scheme is the way to go, discovered Chicken Scheme, which has a simple tool for compilation to a binary blob, by way of the system C compiler, without including the whole entire interpreter etc like SBCL wanted to do (is everyone using SBCL essentially shipping little VM images?). Now I can begin figuring out a dev environment (does it really have to be emacs??) and the funky s-expression syntax; this book seems good:

https://docs.scheme.org/tyscheme/

hello world achieved:


(begin
  (display "hello world")
  (newline))

may 22nd:

Attempting to go through the cryptopals exercises in this, its going to be a pain.. I need base64 stuff, but Scheme doesn't include that, so now the adventure is to figure that out.

june 6th:

Cryptopals is too much, I've been trying the project Euler things instead, but it's also a pain.. why does Scheme not have a sane way of doing loops?! I will break my rule of staying "clean" and use a chicken module that adds in some syntax for loops. I also need SRFI-158: generators and accumulators; this will make things half sane.

june 11th:

made it through Euler problem 3, feeling like I'm getting a handle on the basics of Scheme. Problem 3 turned out to be completely trivial, all I needed to do was import the Chicken module that implements Racket's math functions, so my code is hardly anything:


(import math.number-theory.base)	;math module from racket
(display (prime-divisors 600851475143))

conclusion:

This has been fun, rotating my brain to think of things in a different way. I'm not sure what projects I may do in this yet, other than continuing the Euler problems (and maybe the cryptopals things, if I get a grip..). The funky syntax has not really been an issue thus far, I've found, which is a bit surprising considering my previous experience is mostly Java or Python; did I just discover that I'm a functional programmer and not an object-oriented one? I have had trouble before reasoning about objects.. can't keep it all in my brain, even without any inheritence going on.

Anyway, more to come, hopefully something artistic

	

motion, or lack thereof, is integral to the whole project. Then she walked back in to the yard... And I showed the beautiful painting I finished, featuring my own latest work in purple pen ink. Then she saw the quilt she helped me make for my father. And I stood there, red in the face, a silly grin on my face, bursting with pride, feeling the air brush my hair out of my eyes, her face beaming with pride... And she is so pleased. This last few days have been filled with happiness. A year ago we lost my mother to cancer.

Yep, it's a lot of work. But I'm committed to this, so I'll just have to get up early every morning and get to work. For now, I'll share the new cover with you, along with some of the other modifications I made. I love the way this one turned out. It's open, with a hint of mystery and magic. The entire mood of the book is that of lightness

you look at a shadow on the floor each day, one day it may seem different. or maybe one eye is closer than the other. but the fact remains the same. they are there. you see it everyday. as the sun gets ready to rise. you see it. and even though its not on the floor where you are standing. you can see it.

	
 
 
	

its nothing, ive never gotten the feeling

i dont really look at them, the reason behind it

its nothing, i just want to know why its happenin

someone else in the world, not really happy, it

	

2020!

the year in review!!

	

fresh album

we started this as a short set based on recordings in the archive nobody remembers making.. the 'finished' set was 22 minutes or so, which felt wrong to release by itself; why make a single sided record?! so we very quickly improvised a side b over the span of a few days.

as promo we updated the neocities page to show something nice..

	

secrets are interesting things, and so is the privacy of your own mind. It’s even okay to know them. We all do. People can respect your personal opinion and still respect your right to keep your secrets private.

secrets are interesting in that they are always revealed through the voice of someone else. If you let it................ .......................... ......... ............. .............. .......... ......this will take you straight away

the transition in the end of then, at the end there is a lot of action. perfect lockdown I tell you, then there are a lot of other wonderful ideas

where the hell have i been? there are no birds, no time - thanks

courage to those of us who feel different or out of place sometimes, for any of us could feel alone or adrift any time if you draw your next breath deep and hold it tight you can know for any you you think you may be you are a million more as well, and if you give them time to find their way out everything will be alright. but what of the mysteries?

everything we try to imagine and can't