top | item 23036893

I’ve Consed Every Pair

559 points| DonHopkins | 6 years ago |medium.com | reply

217 comments

order
[+] mark_l_watson|6 years ago|reply
Peter tech-reviewed the second edition of my Java AI book and made the comment that Java was half as good as Common Lisp for AI and that was probably good enough (we had both written Common Lisp books). He then went to Google and I had lunch with him; I was surprised that he was using Python.

I like his poem in the article!

A little off topic, but I retired (that is a bit of a joke) and at the age of 69, this year I decided that for maximum programming enjoyment I would only use Lisp languages (linking in Python and TensorFlow on occasion). I am approaching 40 years using Common Lisp and using the language is so much fun. I bought a license for LispWorks and using it for developing a semantic web app.

[+] theboywho|6 years ago|reply
Out of curiosity, what are your thoughts on Clojure ?

Also have you heard of Janet* ? what are your thoughts on such an approach ?

* https://janet-lang.org

[+] PythagoRascal|6 years ago|reply
If I may ask, what references would you recommend to someone interested in something like Lisp, but who has never touched a functional language before?
[+] w3mmpp|6 years ago|reply
If I may ask, what are the benefits of building this app in LispWorks instead of any other implementation (sbcl or else)?
[+] gambiting|6 years ago|reply
Can someone explain what this means? What is this "consed" he is talking about? I'm a c++ programmer, "consed every pair" means nothing to me.
[+] simongray|6 years ago|reply
Cons cells are the traditional Lisp data structure making up the nodes of a linked list. It comes from the cons function which is short for "construct".

Ironically, Clojure doesn't use cons cells, although it does have a cons function.

[+] zshrdlu|6 years ago|reply
From the Common Lisp Hyperspec:

cons n.v. 1. n. a compound data object having two components called the car and the cdr. 2. v. to create such an object. 3. v. Idiom. to create any object, or to allocate storage.

[+] dowakin|6 years ago|reply
Peter Norvig is the most inspiring genius in my coding world. I met(virtually) him via AI course in Udacity and since that time I enjoy all reading/watching from him.

His book AI programming(Lisp version) is a gem that I enjoy reading. I've finish a book a few times already - but every time I read I find something new that I missed previous time.

[+] sillysaurusx|6 years ago|reply
Arc is underrated as an information management tool. There's something to be said for having a web framework that works out of the box. Rails is probably the only other framework that makes it as easy to "just make some forms that pass data around and run some code on that data." But not quite -- I haven't seen arc's closure-storing technique used in any other web framework.

The main issue that arc solves is that it gives you a full pipeline for managing "objects with properties" via the web. It's so flexible. I wrote a thread on how we're using it in production to manage our TPUs: https://twitter.com/theshawwn/status/1247570883306119170

[+] throwanem|6 years ago|reply
You haven't been around long enough, at least under the same name, to remember when there was an implicit time limit on the comment reply page, inflicted by those stored closures silently timing out. Having long comments so often eaten that way was actually the specific thing that annoyed me into first installing It's All Text.

It's an interesting approach, as attempts to force statefulness on a stateless-by-design protocol go, but I don't know that I like how it scales.

[+] drcode|6 years ago|reply
Some arc code I wrote back in the day, for generating textual descriptions from structured data using a web frontend, is still in production at a previous company of mine (as far as I know). It was indeed a useful tool.

It's a shame arc didn't have persistent data structures (besides alists :-) and a native hashmap type though.

For those confused, we're talking about this: http://www.paulgraham.com/arc.html

[+] riffraff|6 years ago|reply
I am ready to be corrected but I'm a fairly sure there have been a few other continuation-based web frameworks, Seaside in Smalltalk was the one that made the idea popular if I recall correctly. "Href considered harmful" comes from that.
[+] q92z8oeif|6 years ago|reply
problem with those frameworks that "just works" is that they get old pretty darn fast.

it handles all your sql and auth cookies? too bad now there's an easy way every script kiddie can now login as admin or guess cookies without the security header du jour.

It's all nice and all when it's being actively updated. But arc, rails, phoenix-ecto, node/react, drupal, spring, etc it all get old pretty soon when the core maintainers loose focus, and then instead of just keeping an eye on the latest best practices and implementing it yourself, you have to dive deep down into years of feature creep and bad coding practices to do the little thing you need to keep things going.

[+] zem|6 years ago|reply
i think seaside (a smalltalk web framework) pioneered the continuation-based technique, though it could have been around earlier. http://www.seaside.st/

racket's built-in web server does it too.

[+] rlander|6 years ago|reply
Do you have any links to resources or blog posts explaining how to do web dev in Arc? A cursory google search turns up ArcGIS stuff.
[+] avmich|6 years ago|reply
Professor steps one level up in awesomeness :) .

Skip here comments regarding AI online courses, questions related to AIMA and PAIP books. It's not quite a good opportunity to inquire about finer points of JScheme or even ask clarifications along last September interview with Lex Fridman. The art of maintaining approachability for beginners and reference level of usefulness for advanced is not easy, but it's demonstrated - and here is flipped on another human side. Peter, thank you for your works for all of us.

[+] Keyframe|6 years ago|reply
This is stupid and I love it, but come on - who sits down with Norvig and does not know his Lispen background?
[+] jedberg|6 years ago|reply
People who didn’t take AI classes in college who only know him for his awesome Python work?
[+] fouric|6 years ago|reply
People who know of him by name (Coders at Work) but not by face - like me!
[+] wglb|6 years ago|reply
Folks who answer questions that were not asked.
[+] jedberg|6 years ago|reply
The most important thing I ever learned from Professor Norvig was how to not get fat at Google. He said, "Never take a tray. If it won't fit on one plate, it's too much".

A wise man.

I mean I suppose some of the stuff I learned from his textbook was pretty useful too.

[+] gumby|6 years ago|reply
Well, he does also rides his bike to work more often than he drives.
[+] eyelidlessness|6 years ago|reply
What advice would you give to those of us who struggle with our weight, regardless of the size of our plate, who came here to discuss lisp and not what the author of the blog post said to you one time about food portions?
[+] chiph|6 years ago|reply
Man. I miss Johnny Cash.

His cover of NIИ's Hurt is so powerful. June Carter (his wife) died a few months after filming the video, and that just broke his heart. Johnny followed her less than six months later.

https://www.youtube.com/watch?v=8AHCfZTRGiI

Trent Reznor admitted that the song was no longer his after watching it.

[+] malkia|6 years ago|reply
I like mostly metal, industrial, heh even ska, ... bust mostly death metal, but then there is Johnny Cash, and I hate country - though not Johnny - there is something about it - also Willie Nelson (and few other, probably there is more, it's just that I don't like mainstream one...)
[+] TurboHaskal|6 years ago|reply
It's not ironic once you realise that most Clojure developers are converts from other languages and new to Lisp.
[+] masonic|6 years ago|reply

  this Johnny Cash song
Cash made it popular in the USA, but it was composed by Australian Geoff Mack.
[+] dang|6 years ago|reply
My inner Canadian asks me to point out that Hank Snow made it popular in the USA.