Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
LYSP (a really tiny lisp) (piumarta.com)
98 points by jacquesm on Oct 1, 2009 | hide | past | favorite | 17 comments


God, seeing straight C programs that don't use any superfluous libraries or stupid coding tricks that just obscure the intent of the programmer is so refreshing. Just one C file that anyone with a barely working knowledge of C can understand and a very clear Lisp implementation.

Just don't try to learn C from it; code is saturated with boundless copying into stack buffers.



Somewhere in there there is a really nice prank with a novice programmer and a one letter change.


Is that an IOCCC entry?

Off topic: are you still in the NOVA area or overseas?


Not and IOCCC entry; just something Lispers carry with them when heading towards obscure and very small territories. You might like XCL better: http://armedbear.org/ has a native optimizing compiler and compiles to ~5MB for compiler + runtime.

I live in Australia now, mate. Sydney. It's like D.C. but with a beach, nicer beer, better public transport and laid back people :-)


And fricking sharks!


I smiled at the last two lines of his test file:

(define exit (dlsym "exit")) (exit 0)

Certainly no need to define exit any earlier than that...


Someone should take stuff like this and make a Really Compact Netbook/Tablet OS. Such a device could undercut competitors by requiring 1/50th the resources. An instant-on grayscale tablet "Moleskine" that just worked and had a gorgeous trans-reflective screen would rule. (Haiku OS might be a better starting point.)


Lately I have been showing a lot of younger kids how to program in scheme. This means I have been setting up a lot of older laptops with linux + dr scheme as that is the ideal environment for books like the little schemer, how to design programs etc. I have to say that it feels like there should be a MUCH lighter way to accomplish this. I understand dr scheme can do a lot of cool graphical stuff too but I would LOVE it if there was a linux distro that had nothing except for a lisp/scheme interpreter like this + ncurses dr scheme type interface. This way it would run on next to nothing hardware and not run into so many strange hic-ups w/ x on spurious hardware.

A moleskine tablet like you mention with an external rollout keyboard would be so ideal. I'm not asking for a lisp-all-the-way-down (well I would like that too) OS but it would be rad if someone rolled a x-less version of ubuntu or what not w/ the exclusive purpose of teaching/learning scheme.


Arch Linux is a nicely stripped down linux distro. Provided you could find or write a nice ncurses interface for scheme, you could probably build such a system on top of Arch.

I use Arch and Musca (a relatively new, very minimal tiling window manager) on an eee pc 1000 HE and it works extremely well.


A while ago there was some discussion about some custom OS designs, I remember one with a relatively modern looking gui that fitted on a 1.44MB disk - http://www.menuetos.net/

Wonder if that could be fitted with a scheme version to get something near what you want - but being a custom OS, not sure how that will affect things.


I've used this library a few times for similar (not as good and not good enough to show off) fun- it works beautifully: http://sexpr.sourceforge.net


I know only the very basics of LISP but this to my untrained eye looks rather neat!


A correction: These aren't macros, they're fexprs.

There are a lot of other interesting things on the site; the cola/idst stuff is especially interesting.


The gold box/pepsi/coke/cola/jolt/id/idst/soda languages are indeed interesting, but from the outside of VPRI it isn't easy to figure out what they do. Listening to Alan Kay try to summarize it in a few minutes (http://irbseminars.intel-research.net/) makes it sound like even he doesn't understand it very well.

Piumarta seems to be a very sharp guy, but it's strange that a software project that is supposed to radically simplify the software stack still doesn't appear to have a working prototype of a complete two-kernel (pepsi+coke) system, almost five years after the albert paper (http://piumarta.com/papers/albert.pdf) that sketched out the basics was written. Kay keeps talking about how cool it is, and Piumarta has given at least one talk about how cool it is (http://www.youtube.com/watch?v=cn7kTPbW6QQ), but as far as I can tell it doesn't even exist yet. There are working pieces (which are each tens of thousands of lines of code), but from the outside there doesn't appear to be a working pepsi+coke system yet, let alone iterations on it. The VPRI progress reports don't even mention it.

VPRI seems all over the place, and Kay is talking about objects with AI-complete interfaces now. The mailing list is dead, and the wiki is pretty much dead. There's more information on Piumarta's personal website than anywhere else. I know it's supposed to be blue sky research, but it still seems weird.

My impression of the whole thing is that "complete" reflection/self-description is not a good foundation for minimalistic systems.


the ifdef'd main in gc.c has bit rot a bit and segfaults, otherwise nice and simple.


Ugh, why software rottens?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: