Live data from Hacker News

The Idea of Lisp

dev.to

281–290 of 348 posts

Re: The Idea of Lisp

#281
post #144

Earlier quoted context omitted.

And the implementation of garbage collection was, on at least two occasions, postponed. Once in the first implementation [1] and a second time in the early MIT Lisp Machines [2] (you just ran the machine until you ran out of memory which could take days or weeks, after which you saved the world to disk and rebooted). [1] http://www-formal.stanford.edu/jmc/history/lisp/node3.html [2] https://www.csee.umbc.edu/courses/…

McCarthy's writing style is highly entertaining. Although I still have no idea what "Pornographic Programming" is...

I suspect it has something to do with bondage and discipline.

"... decisions ... later proved unfortunate. These included ... the use of the number zero to denote the empty list NIL and the truth value false. Besides encouraging pornographic programming, giving a special interpretation to the address 0 has caused difficulties in all subsequent implementations." -John McCarthy

Maybe he considered NIL to be his own billion dollar mistake.

Tony Hoare / Historically Bad Ideas: "Null References: The Billion Dollar Mistake" [1]

"Abstract: I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965." -Tony Hoare

[1] http://lambda-the-ultimate.org/node/3186

Re: The Idea of Lisp

#282
post #70

This article has many misstatements in its first half. > John McCarthy wrote 6 easy things in machine code, then combined them to make a programming language. John McCarthy didn't implement Lisp in machine code. Steve Russell did. Implementing Lisp properly in machine code is not easy; you have to write a garbage collector. To do that in the early 60s, you had to first invent garbage collection . Lisp was and is bril…

How many primitives does it take to build a LISP machine? Is it ten, seven or five? (And how many did McCarthy use?) http://stackoverflow.com/questions/3482389/how-many-primitiv...

None of the above. Consider that symbols are objects which have a name property, which is a character string. None of the cited primitives can construct a character string and intern a symbol in that name.

Re: The Idea of Lisp

#283
post #277
post #241

Earlier quoted context omitted.

I have no reason to believe that Russell wrote a garbage collector for the first Lisp implementations. I used the adverb "properly" specifically because it's possible to implement Lisp without GC, but this isn't really a viable approach long-term. So to make Lisp practical, significant work on GC had to be (and was) done.

My understanding is that the first version of Lisp with true GC was Scheme. Which was, not coincidentally, the first version of Lisp with lexical scope and closures. The first implementation of Lisp used reference counting.

BIBOP is the dynamically expandable version of MACLISP, the SAIL standard MACLISP. Essentially, the main advantage of BIBOP is that whenever one of the expandable spaces runs out of space, BIBOP requests a larger core allocation from the monitor and the delinquent space grows in the allocated memory.

December 1973; updated March 1974

The (in)famous "Bibop" (pronounced "bee-bop") LISP scheme has been available for some time now and seems to be more or less reliable. Bibop means "BIg Bag Of Pages", a reference to the method of memory management used to take advantage of the memory paging features of ITS. The average LISP user should not be greatly affected in converting to this new LISP (which very eventually will become the standard LISP, say in a few months).

http://www.saildart.org/BIBOP.RPG[UP,DOC]

Re: The Idea of Lisp

#284

It's interesting, I'm reading Black Swan at the moment by Nassim Taleb, and one of his big rants is about how we get blinded by idealized, platonic forms and ideas when the real world is messy and inherently unpredictable. E.g. trying to explain the forms of nature with platonic archetypal shapes like circles, rectangles and triangles. Lisp and the community around it kinda has that flavor - getting lost in a world o…

This is the challenge I have as well. I want to use Lisp for a lot of things but the reality is that parsing PDFs, tagging parts of speech, and then throwing it all into Postgres/Elasticsearch is a lot easier with a bunch of "gem install" commands than anything I've seen for Common Lisp.

(ql:quickload "packagename") works great in Common Lisp.

The QuickLisp package manager has been around for a few years now.

Re: The Idea of Lisp

#285
post #229

Earlier quoted context omitted.

Tcl commands are lists, not strings. Or more precisely, they are coercible to strings or lists, but a well-formed Tcl command string is always coercible to a well-formed Tcl list (not all Tcl strings are coercible to lists).

Thanks for the correction. It's been a while since I used Tcl and my memory of it was incorrect.

It used to be strings all the way down before the object system was implemented in 8.0.

That incidentally is part of the reason why the expr command was created to process infix expressions since it would be too costly to keep converting sub-expressions back and forth from strings to numbers.

http://www.tcl.tk/software/tcltk/8.0.html

Re: The Idea of Lisp

#286
post #280
post #25

Earlier quoted context omitted.

If you like everything being an expression, check out tcl. A lot of ideas from lisp show up in tcl, especially the idea of everything as an expression. Tcl embodies this idea while also having the look of an algol-like language. Funny it can pull this off while having basically no syntax.

Your profile says "Ask me about Tcl". How?

I don't know many other tcl hackers, and I'm really interested in what the community looks like right now. I put that there to drum up conversation with a tcl hacker.

Re: The Idea of Lisp

#287
post #6

Does anybody have a few examples of DSLs people make in a lisp (ideally clojure because I have worked with it a tad)? I've seen plenty of cases where people make a pseudo-dsl via optional arguments, but not seen this so-oft mentioned "yeah we just wrote a dsl for it because lisp" sort of deal.

A few good examples in Clojure would be:

core.async https://github.com/clojure/core.async

core.match https://github.com/clojure/core.match

Compojure https://github.com/weavejester/compojure

Midje https://github.com/marick/Midje

Korma http://sqlkorma.com/

Re: The Idea of Lisp

#288
post #286
post #280

Earlier quoted context omitted.

Your profile says "Ask me about Tcl". How?

I don't know many other tcl hackers, and I'm really interested in what the community looks like right now. I put that there to drum up conversation with a tcl hacker.

You can reach me via my profile.

Re: The Idea of Lisp

#289
post #277
post #241

Earlier quoted context omitted.

I have no reason to believe that Russell wrote a garbage collector for the first Lisp implementations. I used the adverb "properly" specifically because it's possible to implement Lisp without GC, but this isn't really a viable approach long-term. So to make Lisp practical, significant work on GC had to be (and was) done.

My understanding is that the first version of Lisp with true GC was Scheme. Which was, not coincidentally, the first version of Lisp with lexical scope and closures. The first implementation of Lisp used reference counting.

I am confused by your comment, reference counting is a form of GC. Could you elaborate?

Re: The Idea of Lisp

#290

Earlier quoted context omitted.

McCarthy's writing style is highly entertaining. Although I still have no idea what "Pornographic Programming" is...

I suspect it has something to do with bondage and discipline. "... decisions ... later proved unfortunate. These included ... the use of the number zero to denote the empty list NIL and the truth value false. Besides encouraging pornographic programming, giving a special interpretation to the address 0 has caused difficulties in all subsequent implementations." -John McCarthy Maybe he considered NIL to be his own bil…

I suspect it was more that ()-is-nil-is-false-is-0 is entirely visible to the programmer ("see through") rather than an implementation detail hidden by the language.

I still need the occasional reminder myself that nil is () is nil when writing Common Lisp code, lest I do un-idiomatic things like set a slot's initial value to '().

Post reply on HN