Mine two stories

Started by karijes, January 17, 2014, 07:21:56 AM

Previous topic - Next topic

karijes

Hi guys,



This is my first post here, so please be gentle :D



Regarding my usage of newLisp, I'm using it here and there for a couple of years with praises. I'll tell you about two 'war stories' where I found newLisp indispensable.



I) I'm maintaining a page for EDE project (http://edeproject.org">http://edeproject.org) and I can say it is happily powered with newLisp for more than a year.



Previous version was written in python some years ago as cgi script with templating engine, news parser and couple of other bits, but after some issues with the server, especially frequent python updates from administrators and python installation location changes, it was evident it is time to move on something else.



We are hosting pages on shared hosting, generously donated to the project for free so complaining would be quite unreasonable; for me, the only viable solution was to keep as much as possible things less dependent on system packages and/or installation.



newLisp happened a perfect tool here: a small binary without too many dependencies, fast and memory savvy and best of all, with batteries included. So I ended up with a full templating engine, rss feed fetcher and parser, caching facility and small amount of multithreading (thanks to 'spawn') in a single cgi script! Even python would be ashamed here.



II) Couple years ago, while working on faculty of science, I had to administer some old SPARCstations with, hm... if I can recall correctly 32MB of RAM and couple of MB of hard drive.



People who used those machines knows they are practically indestructible so they happened to be a perfect solution for DNS and DHCP hosting. However, the space was so tight I couldn't install anything larger than 30-40MB (you can forget about Perl CPAN or Python) and I needed something for scripting purposes.



Again newLisp, a single binary with batteries included saved the day; probably there are still a couple of scripts running there now, as I left the faculty 4 year ago...



So again, thanks for this wonderful implementation :)



PS: a question: is anyone used reader-event extensively and what is possible to achieve with it? I'm often using CL/Scheme where from time to time I change reader for readable DSLs... Is it possible to add, for example, [] to behave just like ()?



Thanks.

Lutz

#1
Thank you very much for this fantastic testimonial about newLISP!



About the reader-event facility:

The short answer is no, you cannot use it to make [,] behave like (,).



newLISP's expr reader starts after tokenizing and attaching a type to each token and making sure the basic expression syntax is ok. Other Lisp dialects have reader events on a character level, which is fine for a compiled language, but not for an interpreted one, where you want load scripts for execution as fast as possible.



In newLISP's tokenizer the "[" character starts a symbol name and doesn't finish it until a closing "]" is found:
> (set '[     ^$#@ () ] 123)
123
> [     ^$#@ () ]
123
> (symbol? '[     ^$#@ () ])
true

The brackets are a quick facility to create legal symbols without using the sym function.

karijes

#2
Thanks for reply :)
QuoteIn newLISP's tokenizer the "[" character starts a symbol name and doesn't finish it until a closing "]" is found

Oh didn't know for this; a really nice feature for unique names for sure. I'm interested about design reasons behind this: to maybe support [text] tokens or something else?

Lutz

#3
The feature wasn't specifically made for the [text],[/text] tags but it supports them too.