LISP is a polarizing language. Either you love it or you hate it. But we’ll put aside our personal preferences to bring you a good hack. In this case a LISP environment running on an ESP8266. [Dmitry] is on the “love it” side of the fence — he’s been waiting for an excuse to code up a LISP interpreter for a while, and he found one in the ESP8266.
Actually, [Dmitry] is running LISP inside JavaScript, which is itself presumably coded up in C, before it’s assembled to run on an ESP8266. (It’s turtles all the way down!) This means that he can piggy-back on JavaScript’s garbage collection and console handling and so on. After picking a suitably small LISP implementation (actually a Scheme dialect for those of you who know the difference), he went to work.
One weekend bled into the next, but he got the system running, connected to the network, and had LEDs blinking! In the end, he even managed to squeeze in some optimization for memory’s sake. Pretty cool, and because it takes advantage of an already complete system, it can even be made pretty useful. Not bad for a few weekends’ work!
And finally, if Lots of Irritating Silly Parentheses is your idea of a good time, but the wealth of computing resources available on an ESP8266 seem overkill, have a look at Microlisp, running on an AVR. Or go to the opposite extreme, and run a LISP OS on a Raspberry Pi. Whatever you do, don’t forget to close your parentheses! (We’re told that’s a traditional LISPer farewell.)
Has science gone too far?
Usb drives don’t support PS2 mode.
Heh, that doesn’t look like one, but you can get fully electronic adapters. Though the first one would have to be parallel to serial. But you’re right, that green one and the PS/2 to serial it’s plugged into are probably the ones solely intended for dual protocol mouses. The wiring of which was never standardised, so given mouse, even if you know it was dual protocol, might not work with random adapter.
I wonder though, if you’re using a USB keyboard or mouse whether you could use a PS/2 mouse adapter for an extra charge port on machines with PS/2 holes.
The PS/2 port can’t deliver any significant amount of power, at least in my experience. Up to 100mA should be safe though.
That little? I was thinking 500mA .. Old PC interfacing projects used to frequently hook it for power. Thunk that was because one could only suck 50-100 out of the parallel.
no it isn’t… nconc
There is already a native Lisp interpreter running on the ESP8266 here:
https://github.com/yesco/esp-lisp
You can even get a simple basic interpreter in lisp (scheme) for esp8266 esp-lisp!
Does it have enough memory for parenthesis?
Just for a few of them.
Now, LOGO implemented on LOGO on top of LOGO…. that’s turtles all the way down.
Scheme is Lisp without the fats, according to my FPC (fundamentals of computer programming) teacher.
Scheme is the Lisp for people who don’t use macros.
?
Most scheme implementations have macros, they’re just hygienic unlike say Common Lisp.
I wonder how much you’d have to change the native js implementation to transform scheme into ‘native’ js execution code.
“One weekend bled into the next, but he got the system running” … I take it he is not married :)
Well, I am actually. :) Even more, we have 2 children! Still, I do my best not to forget about learning, experimenting, etc.
Having regular quality time with your family is important. I think that this idea that seems so prevelant these days that one should pretty much stop their hobbyist activities when they are married or for the duration of their children’s childhood is harmful. You certainly shouldn’t be giving up the things you love for a spouse. It’s part of who you are. If she doesn’t like that then who does she actually love and why are you married to her? Also, let the kids see you building stuff. Seeing adults doing things is how they learn that they might want to do them themselves!
It’s no wonder we live in such a dumbed down society. People have been forgetting to pass their skills and interests down to their kids!
stop trolling him dude. you know nothing about him outside of a post you read on HAD.
Dmitry Frank, keep up the good work.
And once I look at the header picture running LEDs with no current limiting resistors, I have a hard time taking the rest of the article seriously.
Hey, thanks for the comment. Yeah I should’ve added a disclaimer: I’m a software engineer, and I work hard to be good at it, but I know nothing about hardware. So, when it comes to hardware, I suck absolutely and completely.
It just happened that I work in a hardware-related fields, but actually there are other people in the team who work with the hardware; and I’m just doing software parts (and I’m trying to do that well).
Of course I managed to get LED blinking by attaching it to the MCU’s pins in a naive way, but not much more than that. Nevertheless, thanks.
Thanks for the comment. Yeah I probably should’ve added a disclaimer: I’m a software engineer, and I work hard to be good at it, but I know pretty much nothing about the hardware. So, when it comes to the hardware, I suck absolutely and completely. It just happened so that I work in hardware-related fields, but actually there are other people in the team who work with the hardware; and I’m just doing software parts (and I’m trying to do that well).
Of course I managed to get LED blinking by attaching it to the MCU’s pins in a naive way, but not much more than that. Sorry about attaching LEDs in a wrong way.
C’mon HaD, know more than to disparage a particular language like LISP; especially a language that has existed so long because it does have a reason to exist! Bare LISP has undeniable positive attributes for certain applications; concepts like “Extensible” and “Reentrant” come to mind.
1984: Situation, 6 incompatible versions of Lisp. Solution, Common Lisp introduced, eventually becoming an ANSI standard…
Present Day: There are now 20+ incompatible versions of Lisp.