Is it normal that I don't have the slightest idea what I'm reading here, or is it just me?
I can't say for sure- but I would guess that it would be normal for a lot of HN articles to go over your head if you are not technical or lack a C-S degree.
μLithp - a Lisp in 27 lines of Ruby
31–40 of 104 posts
Re: μLithp - a Lisp in 27 lines of Ruby
#32Yeah, 27 lines. Unless you count the ~120 lines of sexpistol. https://github.com/aarongough/sexpistol
Re: μLithp - a Lisp in 27 lines of Ruby
#33Earlier quoted context omitted.
I can't say for sure- but I would guess that it would be normal for a lot of HN articles to go over your head if you are not technical or lack a C-S degree.
I do lack a C-S degree, however I've been a PHP developer for years and recently switched to Ruby, or more specifically RoR.
http://ocw.mit.edu/courses/electrical-engineering-and-comput...
Ignore the hairdos, it's from the 80s, the information itself ages better than the fashion.
Re: μLithp - a Lisp in 27 lines of Ruby
#34Once upon a time I wrote a lisp to lua compiler in 100 lines. https://github.com/meric/l2l/commit/a530f0133e002c3981937d21...
It's now over a thousand. https://github.com/meric/l2l/
Re: μLithp - a Lisp in 27 lines of Ruby
#35I think this is a neat project and a nice demonstration of how Lisp-influenced Ruby is. However, whenever people post "Lisp in Ruby" stories, I always hope that it'll be a "Clojure in Ruby" implementation. I am surprised no-one has done it yet.
Why would anyone? Clojure runs on the JVM which supports native os threads, concurrent garbage collection, etc, for one thing. Different tools for different purposes.
Re: μLithp - a Lisp in 27 lines of Ruby
#36Re: μLithp - a Lisp in 27 lines of Ruby
#37Earlier quoted context omitted.
If you don't know what Lisp is, and are a programmer, it's high time to go read about its basic principles. Lisp is very simple and very powerful. Those who don't learn it are doomed to reinvent it, badly ( cough XSLT cough ).
I'm not exactly a programmer. Could you explain how Lisp can be simple and powerful?
It's a bit mind-bending, but from this simple foundation comes the power to easily create and assimilate ever higher-level abstractions (which is what programming is really all about). Parts of a program can be used as a template for creating other parts as needed. You can assemble these parts and shape the language into something very specific for the problem you are solving.
Other languages come part-way, but don't fully embrace this concept (code=data) because it has a cost: it seems difficult to learn because it requires a change in thinking; it seems difficult to write (and read) because you're directly encoding a data structure and it all looks a bit 'samey'. Where other languages have 'shapes' in their code that give the trained eye an indication of what the code is expressing (such as for...do loops and indentation), lisp code has one shape: a tree [1].
I don't know if I've reached beyond your understanding. I haven't meant to, but the takeaway should be this: lisp programs are self-aware and can operate on themselves because a lisp program is just data like any other. This makes it easy for the interpreter/compiler (hence 'lisp in x lines of code'), but more difficult for the programmer (at first). As with all things, practice and familiarity overcome these initial difficulties. It is worth it.
Re: μLithp - a Lisp in 27 lines of Ruby
#38Earlier quoted context omitted.
If you don't know what Lisp is, and are a programmer, it's high time to go read about its basic principles. Lisp is very simple and very powerful. Those who don't learn it are doomed to reinvent it, badly ( cough XSLT cough ).
I'm not exactly a programmer. Could you explain how Lisp can be simple and powerful?
Re: μLithp - a Lisp in 27 lines of Ruby
#39Earlier quoted context omitted.
If you don't know what Lisp is, and are a programmer, it's high time to go read about its basic principles. Lisp is very simple and very powerful. Those who don't learn it are doomed to reinvent it, badly ( cough XSLT cough ).
I'm not exactly a programmer. Could you explain how Lisp can be simple and powerful?
Re: μLithp - a Lisp in 27 lines of Ruby
#40My one question is: Why?
Some times it's cool to do things just because you can, maybe he was bored or he always wanted to implement a lisp dialect.
It might not be that useful, but i'm sure that the autor had a blast doing it, otherwise he wouldn't have done it.