uLisp on non-microcontrollers


#1

A bit off to the side, but with some minor edge case exceptions you can use Common Lisp implementations to run uLisp code on Linux. Doesn’t have the Arduino-like stuff, but they are much more capable in other respects.


What new features would you like to see in uLisp?
#2

Common Lisp is quite cleverly designed, to the extent that you actually can tie yourself to having the same language constraints (though not too easily some of the other implementation constraints) within a CL implementation. I’ve run a simple layer like that in Clozure CL and SBCL, for some basic testing. I was planning to use WiringPi (via CFFI) to implement the Arduino-like features on a Raspberry Pi, but haven’t quite gotten around to it. Might go to it now, though.


#3

This:

By not importing all the symbols from the COMMON-LISP package into the package I use to read uLisp code. That way I can control which COMMON-LISP symbols are accessible and replace the ones I need to replace. You can still access the whole of Common Lisp using package syntax, but that’s not being used in uLisp, so at least for now it works.

I’m not entirely sure what you mean here. Obviously using a compiled implementation is going to make the speed jump larger than using the same interpreter, but even the interpreter would get a pretty hefty boost from running on desktop or server grade CPUs. As for memory, I’ll grant that you can’t easily impose a restriction, which could be done in a port of the interpreter. On the other hand, it would be a compile-time only setting in the interpreter, so you’d need to repeatedly recompile your emulator.

If we’re talking about strange platforms, though, it might be interesting to see uLisp running in WebAssembly. :)


#4

Huh, I probably should have re-tested this before pushing. :)

I know I got this to work under Clozure CL on a Raspberry Pi, but there seem to be some pickles in making it work under SBCL now. Working on it.

Edit: Done. Seems I used the wrong form for SBCL, but one that worked in CCL.


#5

Great, thank you, I shall try it out! :)


#6

What exactly do you do in SBCL?

For instance, there is no “butlast”, IIRC. How do you prevent SBCL from usingits own one? :) — 'Tis easily defined by (reverse (cdr (reverse …))), but how do you forgo the built-in? And what do you do about memory and speed? I AM interested!


What new features would you like to see in uLisp?