uLisp – Lisp for the Arduino
ulisp.com
uLisp – Lisp for the Arduino
1–10 of 34 posts
Re: uLisp – Lisp for the Arduino
#2So, I googled "Dijkstra's Algorithm in Lisp" and got this: http://richardsherriff.com/?p=233
Now, I'm no lisp expert, so I can't judge whether the author of this code actually knows what they're doing, but I know for sure that in an imperative language the implementation of the algorithm is much more concise and understandable.
I have concluded from my observations that claims of Lisp being "easier", "ideal for learning fundamental programming concepts" and "more expressive" are exaggerated.
Re: uLisp – Lisp for the Arduino
#3Re: uLisp – Lisp for the Arduino
#4> It's also an ideal language for expressing complex ideas, such as [...] finding the shortest route on a map So, I googled "Dijkstra's Algorithm in Lisp" and got this: http://richardsherriff.com/?p=233 Now, I'm no lisp expert, so I can't judge whether the author of this code actually knows what they're doing, but I know for sure that in an imperative language the implementation of the algorithm is much more concise…
> so I can't judge whether the author of this code actually knows what they're doing
Not really. He can't even format the code.
For example from that blog post:
(defun return_highers_helper (list element result)
(cond
((null list) result)
((equalp (first element) (first (first list)))
(cond
((
This would be written usually as: (defun %return-highers (element list)
(remove-if-not (lambda (item)
(and (equalp (car element) (car item))
(Re: uLisp – Lisp for the Arduino
#5The AVR cpu at the core of the Arduino uses a (modified) Harvard architecture., which separates code from data memory. A key feature of lisp of that code IS data. How does uLisp bridge the contradiction?
You can read the implementation... code:
Re: uLisp – Lisp for the Arduino
#6Re: uLisp – Lisp for the Arduino
#7I wonder how predictable and controllable that is. Adding GC to what is likely to be a real-time device seems like a potential showstopper. But if the numbers can be a bit more firm, or if the application can receive alerts on pause / resume, that might not be such a big deal.
Re: uLisp – Lisp for the Arduino
#8Re: uLisp – Lisp for the Arduino
#9This reminds me of muLISP [0]. [0]: https://de.wikipedia.org/wiki/MuLISP
ulisp runs with 2 kbyte RAM.
Re: uLisp – Lisp for the Arduino
#10uLisp includes a mark and sweep garbage collector. Garbage collection takes under 1 msec on an Arduino Uno or under 3 msec on an Arduino Mega 2560. I wonder how predictable and controllable that is. Adding GC to what is likely to be a real-time device seems like a potential showstopper. But if the numbers can be a bit more firm, or if the application can receive alerts on pause / resume, that might not be such a big…
[1] http://michaelrbernste.in/2013/06/03/real-time-garbage-colle...