News for hackers. Stuff that matters.
Re:No more "minimal early Lisps", pulleezz by mechanical_fish on Wednesday December 29, 2010 @11:13AM (#2049107)
It's this friendly, open attitude to new young programmers that has made Lisp as popular as it is today.

I can't wait to see this person's algebra textbook. "Integral calculus is so old and boring, puleezz. Wake me up when you've rediscovered quaternions."

And people wonder how PHP can be so popular. I could spend all day enumerating PHP's faults, but when people who have never written an X before build an X in PHP, the PHP community welcomes them with smiles, not sneers.

I wish, I really do, that one percent of one percent of the world's programmers had actually implemented a simple Lisp in Lisp, let alone reached the point where such a thing seemed boring. But lecturing us on our lameness is not going to help.

Re:No more "minimal early Lisps", pulleezz by cemerick on Wednesday December 29, 2010 @02:21PM (#2049826)
The character of Lisp communities is all over the map, since each particular implementation has its own. It's not as if someone that picks up Racket is going to waltz into #clojure looking for help, advice, or reinforcement.

So, of course there are some Lisp communities that regularly have a quorum of asshats, and we all know which ones those are (in general terms, perhaps). On the other hand, the generally-positive reputations of others are also fairly well-known (e.g. I've rarely had negative experiences with schemers of various stripes, and it's hard to dispute how fabulous the Clojure community is [to wit: http://wp.me/p10OJi-6a ]).

Re:No more "minimal early Lisps", pulleezz by brlewis on Wednesday December 29, 2010 @12:21PM (#2049399)
Comment by the author of the article: @fogus: Hm, lucky you, I've never met a Lisp I did like ;)

Don't measure a community by its detractors.

Further, people don't wonder why PHP is popular. Its popularity originated in ISP-friendliness, and has grown since then through network effects.

EDIT: People are still voting up the parent comment, so I probably wasn't clear enough: the parent comment is totally wrong, starting with the words "It's this". The attitude of someone who does not like Lisp is not even a single datapoint, much less evidence, as to how the Lisp community treats newbies.

Re:No more "minimal early Lisps", pulleezz by mechanical_fish on Wednesday December 29, 2010 @02:31PM (#2049854)
"Totally wrong"? I apologize for opening with some black humor that has obviously touched a nerve, but once you delete my hyperbolic opening sentence I'll defend the rest of the sentences.

I guess I didn't realize that I needed to explictly call out the existence of friendly, helpful, newb-friendly Lisp teachers on Paul Graham's Hacker News as implemented in Arc -- it is easy to forget that not everybody is steeped in the local culture -- but let me now be more explicit: There are plenty of people who are happy to help teach newbs all about higher-order programming by helping them implement their very own toy version of Lisp, and by taking joy in the results. Thank god for those people.

Re:No more "minimal early Lisps", pulleezz by brlewis on Wednesday December 29, 2010 @02:51PM (#2049932)
I actually agree with your 2nd and 4th paragraphs, but yes, 1 and 3 touched a nerve. The newbie-unfriendly reputation of the Lisp community has never been entirely deserved. It pains me to see it repeated.
Re:No more "minimal early Lisps", pulleezz by davidmathers on Wednesday December 29, 2010 @02:33PM (#2049861)
No, you misunderstood the comment.

http://axisofeval.blogspot.com/2010/08/three-principles-of-l...

One of the author's projects is writing a lisp.

edit- actually it's right there at the top of the page on the right. Motivation: Lisp.

Re:No more "minimal early Lisps", pulleezz by brlewis on Wednesday December 29, 2010 @02:45PM (#2049912)
That's not "Motivation: Lisp". Read the fine print: "by the people who didn't bring you A.I."

Yes, he has a project to build his own Lisp, because he doesn't like existing ones. That's a detractor.

Re:No more "minimal early Lisps", pulleezz by davidmathers on Wednesday December 29, 2010 @03:05PM (#2049979)
Touche. On the other hand he calls Common Lisp one of "the few acceptable dynamic languages."

http://axisofeval.blogspot.com/2010/07/c-40-industrial-respo...

In other words: CL sucks but all the other dynamic languages suck more. My semantics don't label that as "detraction" but yours may differ.

Re:No more "minimal early Lisps", pulleezz by brlewis on Wednesday December 29, 2010 @03:19PM (#2050022)
Given the full quote I still call it detraction:

"What's more worrying is that all dynlangs, including the few acceptable ones, like Common Lisp and Factor, are starting to look horribly dated against C#. Seriously."

Re:No more "minimal early Lisps", pulleezz by Semiapies on Wednesday December 29, 2010 @12:37PM (#2049466)
He may be a detractor, but the attitude is similar.
Re:No more "minimal early Lisps", pulleezz by omouse on Wednesday December 29, 2010 @12:42PM (#2049485)
You're assuming that popularity is a good thing.
Re:No more "minimal early Lisps", pulleezz by swannodette on Wednesday December 29, 2010 @01:54PM (#2049715)
Every community needs people that are congratulatory as well as those that are critical.

Lispers love their language. But they are also self-critical and open-minded. They tend to work hard to see how ideas in other programming languages can be properly integrated into their own.

Other programming languages and communities could benefit from such self-criticism.

Re:No more "minimal early Lisps", pulleezz by smithbits on Wednesday December 29, 2010 @10:41AM (#2048951)
"Surely you're not learning much by repeating JMC's flawed Ur-Lisp from 1959." No. Implementing an ur-lisp teaches you all kinds of things if you've never implemented a programming language before. It's a solid bite-sized project that's harming no one. Think I'll go write another one, maybe in Haskell this time.
Re:No more "minimal early Lisps", pulleezz by silentbicycle on Wednesday December 29, 2010 @01:13PM (#2049603)
Implementing Forth will also teach you a lot of (different) things, and can be done relatively quickly.
Re:No more "minimal early Lisps", pulleezz by Semiapies on Wednesday December 29, 2010 @03:54PM (#2050121)
So do both.
Re:No more "minimal early Lisps", pulleezz by larrik on Wednesday December 29, 2010 @10:49AM (#2048985)
I agree. Simply writing my own scripting language once taught me a lot more than I would have expected. Now I use Lua, though.
Re:No more "minimal early Lisps", pulleezz by stcredzero on Wednesday December 29, 2010 @10:48AM (#2048983)
How about Javascript?
Re:No more "minimal early Lisps", pulleezz by fogus on Wednesday December 29, 2010 @10:34AM (#2048923)
Re:No more "minimal early Lisps", pulleezz by noahlt on Wednesday December 29, 2010 @01:37PM (#2049660)
Re:No more "minimal early Lisps", pulleezz by stcredzero on Wednesday December 29, 2010 @10:46AM (#2048971)
There's Broccoli, which is a conventional scripting language project that just borrows Lisp syntax out of laziness.

http://news.ycombinator.com/item?id=203658

Re:No more "minimal early Lisps", pulleezz by zephjc on Wednesday December 29, 2010 @11:01AM (#2049055)
"I personally have a difficult time wrapping my head around ideas like, functional, and closures, and lambda, in the abstract, so this is my way (not there yet BTW) of really wrapping my head around these ideas." - fogus

He went from that to writing a book about a Lisp (Clojure) in just 943 days (~ 2.5 years) :)

Re:No more "minimal early Lisps", pulleezz by fogus on Wednesday December 29, 2010 @11:30AM (#2049168)
LOL! It's so funny reading that now; what a horrible little language. At the time I was neck deep in Java and a few years removed from my grad school studies. That project helped to refresh some of my dormant knowledge and excitement for Lispiness. I guess like riding a bike, you never forget closures. :p
Re:No more "minimal early Lisps", pulleezz by fogus on Wednesday December 29, 2010 @11:34AM (#2049187)
Interestingly, I threw that language away in favor of Clojure.
Re:No more "minimal early Lisps", pulleezz by wglb on Wednesday December 29, 2010 @12:13PM (#2049374)
And there is this one: http://waspvm.blogspot.com/
Re:No more "minimal early Lisps", pulleezz by rayiner on Wednesday December 29, 2010 @03:24PM (#2050035)
People write minimal Lisps because they're easy while being elucidating. You can describe a compiler for a more-than-minimal Lisp in a forum post.

1) Specify representations for: integers, strings, symbols, and cons-es; specify a data structure for the symbol table and define INTERN properly.

2) Implement the reader, cribbing heavily from CLHS 2.1.4, 2.2. Set up constituent, whitespace, and terminating character classes, and implement reader macros for at least quote, double quote, and left/right parens.

3) Specify a representation for the environment, which will map symbols to offsets of variables on the stack frame; have a stack of these objects.

4) Figure out what special operators to handle. You can get away with just: lambda, progn, if, quote, let.

5) Starting from each top level form, walk the code recursively. Each element you encounter will either be: a) a top-level definition b) a single symbol variable reference c) a list with a symbol at its head which is a special form d) a list with a symbol at its head which is a function call

As you walk the code, push a new environment onto the stack for each lambda and let you come across, which you pop off when you're done walking the corresponding body (but make sure you save it somewhere).

5.1) In one pass, collect information on closed-over variables. Walk the code looking for variables which are referenced (5b) but are not present in the environment. In that case search up the stack. If you find it in a parent environment, it's a closed-over variable. If you don't find it at all, it's a global variable.

5.2) Use the environment structures you just collected to assign local variables to stack slots. Figure out a closure representation (use a code pointer followed by an array of closed-over variables). Use the info you collected in (5.1) to assign variables to stack slots and closure variable references to closure variable slots.

5.3) In a second pass, generate code. When you reach:

a) A TLD, emit a call to the runtime to associate a global name with a lambda b) A variable reference, emit code to either load the value from the stack slot noted in your environment structure, or from the appropriate closure slot, or emit a call to the runtime to look up a global value. c) A special form: generate function prologues/epilogs when you reach a lambda form, use labels and jumps to implement 'if', and use whatever data facilities your assembler has to handle quote-ed literals. When you reach a nested lambda, emit its code as a separate function, then at the point where it is used as a value in the parent function call a closure creation function providing it with the address of the generated code plus the values of all closed-over variables. d) A function call, emit a call to the runtime to look up the global value, then evaluate each of the arguments left to right, pushing them onto the stack. Then, jump to the body of the function.

6) Implement the runtime functions for cons handling, the global symbol table, and closure creation.

Extend as you see fit to include mutable variables, etc.

Re:No more "minimal early Lisps", pulleezz by yan on Wednesday December 29, 2010 @11:35AM (#2049191)
Wow. Summary: "I only liked implementing Lisps when they were on vinyl.'

I don't understand smugness when it comes to other peoples' small projects. No one sets out to implement CLv2, just further their own knowledge via a smallish side-project.

Re:No more "minimal early Lisps", pulleezz by lukeschlather on Wednesday December 29, 2010 @01:04PM (#2049565)
It's the inverse of that. He's insisting we should implement Lisps in digital, because vinyl is useless.
Re:No more "minimal early Lisps", pulleezz by poink on Wednesday December 29, 2010 @11:02AM (#2049064)
Oh boy! I hope he takes people to task for writing Hello World programs next.
Re:No more "minimal early Lisps", pulleezz by brlewis on Wednesday December 29, 2010 @11:19AM (#2049132)
I hope so too. I want to know the minimum standard for a "Hello World" in 2010.
Re:No more "minimal early Lisps", pulleezz by ihodes on Wednesday December 29, 2010 @11:07AM (#2049085)
In the comments the author noted that he'd "never met a Lisp that [he] liked". Maybe that's why he doesn't see the value in learning something from writing a basic Lisp yourself.
Re:No more "minimal early Lisps", pulleezz by swaits on Wednesday December 29, 2010 @10:49AM (#2048986)
What if it just happens to be fun? Do whatever you want!
Re:No more "minimal early Lisps", pulleezz by Semiapies on Wednesday December 29, 2010 @12:21PM (#2049397)
"And some of these [toy, throwaway] languages then become successful, and fuck up my life, because I may be forced to use them to access some library or script some program."

That thing you just stepped in? That's a big pile of bullshit.

Re:No more "minimal early Lisps", pulleezz by flogic on Wednesday December 29, 2010 @02:27PM (#2049845)
Especially considering there are a lot of worse things to write scripts in than some ghetto lisp. Most people would consider Emacs lisp a bit on the ghetto side, but it's still quite effective. I'm not a big Lisp fan but I'll take a ghetto lisp over a number of other ghetto languages any day.
Re:No more "minimal early Lisps", pulleezz by omouse on Wednesday December 29, 2010 @12:43PM (#2049491)
It's fine and fun to make a minimal early Lisp, just remember you don't have to release it to the public. Make it open-source, but don't post it on the web or just give it out to a few friends to try out or whatever.
Re:No more "minimal early Lisps", pulleezz by philwelch on Wednesday December 29, 2010 @02:31PM (#2049856)
"Hide your shame, young hacker! No one wants to see your lisp!"
Re:No more "minimal early Lisps", pulleezz by blacksmythe on Wednesday December 29, 2010 @12:58PM (#2049544)

  >> consider writing a Haskell, not a Lisp.
Has anyone written a Haskell (or subset) as a hobby project? I would think it would be much harder than writing a simple Lisp, which seems to be designed so that simple versions can be written almost recurvisely, where more advanced functions are decomposed into a few primatives.
Re:No more "minimal early Lisps", pulleezz by theFco on Wednesday December 29, 2010 @01:18PM (#2049613)
I wrote a small compiler for a 'haskell' called HNH with type inference that generates C code, with a small runtime including GC. Everything is done very naively, but it's a hugely interesting excercise. You can find it in https://github.com/fferreira/hnh
Re:No more "minimal early Lisps", pulleezz by pmarin on Wednesday December 29, 2010 @03:09PM (#2049992)
I am just wondering how this "article" got 42 points...
Re:No more "minimal early Lisps", pulleezz by anatoly on Wednesday December 29, 2010 @11:11AM (#2049099)
I don't understand what he means by "semantic concepts". Anyone?
Re:No more "minimal early Lisps", pulleezz by primodemus on Wednesday December 29, 2010 @11:24AM (#2049147)
Re:No more "minimal early Lisps", pulleezz by rwmj on Wednesday December 29, 2010 @10:43AM (#2048961)
And implement something that compiles down to native code too.