
Lisp at the Frontier of Computation [video] - reikonomusha
https://www.youtube.com/watch?v=f9vRcSAneiw
======
flavio81
This is a really good video. Here is a simple timeline of what it is all
about, so people can jump to what they would find interesting:

23:43 "It really is incredible that we can go close to one order of magnitude"
(to C)

26:00 Lisp code is faster than optimized C (quantum) programs when running on
the QVM. For non trivial benchmarks (...) {Lisp faster} on an average of 40%
percent.

30:00 quick explanation of quantum machine code

33:06 What is the team dynamics of using Lisp? "Condescencion: Lisp's number
one enemy" (fun part)

"Some time between 2 and 6 decades ago, Lisp invented approximately all of the
popular things in programming, some of which are just starting to make an
appearance [long list of features follow]"

Really fun part follows.

35:41 things Lisp programmers tell the other programming teams

36:40 Interesting, beautiful comparison of using Lisp versus doing calligraphy
with calligraphy pens.

41:21 Presenting internship program at Rigetti. Stressing the importance of
first having a SBCL, Emacs, Slime, Paredit, and Quicklisp, before thinking how
writing productive Lisp looks like.

43:33 Comments of interns after the internship, favorable to Lisp, as well as
unfavorable comment. (Fun part here)

51:00 Explanation of what quantum computing is all about

~~~
michaelsbradley
I guess ParEdit has staying power, but isn't Smartparens[+] the way to go
these days?

[https://github.com/Fuco1/smartparens](https://github.com/Fuco1/smartparens)

~~~
meken
YMMV but for what it's worth I became frustrated with smartparens when I
couldn't figure out how to do something very simple. I think it was traversing
down into the next sexp. I got different behavior when my cursor was right up
against the sexp versus one space before.

Also whereas paredit really pushes me to have a mental model that the lisp
source code forms a tree (e.g. up, down, left, and right being the main
operations), I found smartparens drove my mental model back to treating the
code a string of characters.

~~~
michaelsbradley
Interesting. I wonder if it has to do default settings, or something like
that. I'm using bbatsov/prelude[+], for several years now, and Smartparens
(per prelude's config) has always behaved for me like a better ParEdit.

[+] [https://github.com/bbatsov/prelude](https://github.com/bbatsov/prelude)

~~~
meken
Ah thanks for the recommendation. For what it's worth I was using the evil-
mode smartparens layer bundled with spacemacs.

------
taeric
This was a much more enjoyable video than I was expecting. The audio quality
really had me tempted to skip, so I encourage others to not let that turn them
away.

The quote which I will paraphrase that "lisp is not freed from having to
justify why you would use it." This is huge and the section before it going
off about how condescension is a terrible enemy of the language is one that I
would hope more people contemplate.

Major kudos to the presenter!

~~~
agumonkey
I unplug my headphones jack halfway to turn failing stereo into good enough
bi-mono.

~~~
nerpderp83
Some please make an ML/Dsp powered magical audio fixer for system sound.

~~~
exikyut
\-
[https://pypi.python.org/pypi/pulsectl/17.1.3](https://pypi.python.org/pypi/pulsectl/17.1.3)

\-
[http://larsimmisch.github.io/pyalsaaudio/](http://larsimmisch.github.io/pyalsaaudio/)

\- [https://askubuntu.com/questions/129412/pulseaudio-and-
python...](https://askubuntu.com/questions/129412/pulseaudio-and-python3)

\-
[http://menno.io/posts/pulseaudio_monitoring/](http://menno.io/posts/pulseaudio_monitoring/)

\-
[http://menno.io/posts/raspberry_pi_vu_meter/](http://menno.io/posts/raspberry_pi_vu_meter/)

You know exactly what features you'd want. This is my attempt at inspiration.
:P

~~~
nerpderp83
I was thinking something more like
[https://www.technologyreview.com/s/537101/deep-learning-
mach...](https://www.technologyreview.com/s/537101/deep-learning-machine-
solves-the-cocktail-party-problem/)

or

[https://arxiv.org/pdf/1703.08019.pdf](https://arxiv.org/pdf/1703.08019.pdf)

It would allow one to scrub unwanted audio sources from an audio stream.

------
patkai
Code as data is such a big deal that - whatever you say - I will never ever
understand why we don't all do Lisps.

~~~
xstartup
What's the most popular Lisp in use today? Does it come with a static compile
type checking?

~~~
sillysaurus3
Rather than most popular, I propose using the most useful.

That'd be Lumen.

[http://github.com/sctb/lumen](http://github.com/sctb/lumen)

It's the only lisp that can interface seamlessly with any JS library you want.
Just `npm i leftpad && LUMEN_HOST=node lumen` and type `(require 'leftpad)`.

    
    
      $ npm i leftpad
      $ LUMEN_HOST=node lumen
      > (require 'leftpad)
      function
      > ((require 'leftpad) "foo" 5) 
      "00foo"
    

Other lisps are nice, but they all try to build their own ecosystems instead
of use existing infrastructure. So if you want to do webdev and run into a
problem with the library, your only option is to fix it yourself or write your
own, since most people don't use lisp for webdev.

That brings us to Clojure: the prima facie "lisp for webdev". It's a good
lisp, but it forces you into non-optional immutability. That's a feature for
some and a burden for others. And it's very difficult to transpile into JS. In
an era where size and speed matter due to bandwidth concerns, this is a severe
limitation.

That said, all of the lisps are a delight to use in their own way. Racket is
fun to wrestle with, mostly to coerce it into doing what you want. SBCL is
neat for doing archeology in -- you can run all kinds of interesting old
programs. Elisp is fun because you can extend your editor to do anything you
can imagine. Arc powers the website you're reading this on, and its underlying
ideas are worth internalizing.

~~~
rcarmo
Lumen seems interesting, but at a quick glance the GitHub repo has zero
information as to how to install it and getting it to run. Is it an npm
package/lua rock as well?

(edit: it's all in the repo.)

Follow-up: I don't see much in the way of interop documentation... Pointers?

~~~
sillysaurus3
The cool thing is, there's no interop. It's literally JS or Lua. Think of it
like CoffeeScript -- there's no "interop" between CoffeeScript and JS. It's
just JS.

You can see what each expression compiles to by passing it through (print
(compile (expand ...)))

For example:

    
    
      > ((require 'leftpad) "foo" 5) 
      "00foo"
      > (print (compile (expand '((require 'leftpad) "foo" 5))))
      require("leftpad")("foo", 5)
    

And of course, you can use macros to shorten this

    
    
      > (define-macro see (x)
          `(print (compile (expand ',x))))
      (macro: function)
      > (fn (x) (+ x 1))
      function
      > (see (fn (x) (+ x 1)))
      function (x) {
        return x + 1;
      }
    

The best way to learn it is to read test.l and mess around with the
expressions while running `make test` to see what breaks.

If you have questions, be sure to reach out or post them here. The maintainer
is also quite responsive to opening new issues.

~~~
brandonhsiao
Also, you can compile a Lumen file to JS/Lua by running `lumen -c file.l -o
file.js`. More info at `lumen --help`.

------
nafizh
Every time, I see one of these links or videos, I feel the urge to learn Lisp.
But after some time, I lose the motivation. I think that is because I don't
know what benefit learning lisp will provide me concretely. Anyone has any
suggestion?

~~~
dreamcompiler
Do you like Python? Python is basically simplified Lisp. Common Lisp is Python
plus first-class lexical closures (rather than second-class) plus true
multithreading plus a real compiler so it runs much faster.

Plus parentheses rather than indentation to delimit expressions; parentheses
are much more versatile once you get used to them.

~~~
sedachv
Python is in no way a Lisp. Python is not homoiconic, does not have first-
class identifiers (symbols), and does not have full support for dynamically
loading code
([https://news.ycombinator.com/item?id=14666300](https://news.ycombinator.com/item?id=14666300)).
All that makes Python much closer to BASIC than to other dynamic programming
languages. I think of Python as a BASIC with an object system and a couple of
incorrectly borrowed ideas from Scheme (lexical scoping and first-class
functions). There is not much "simplified" there compared to Lisp 1.5, just
less features with more complexity.

~~~
rhaps0dy
Well, the comparison by Peter Norvig makes Python and Lisp look pretty similar
([https://norvig.com/python-lisp.html](https://norvig.com/python-lisp.html),
also linked below in this thread).

In some cases, you can get around no-first-class-identifiers in Python by
using strings and getattr(object, symbol) or locals()[symbol]. (What are other
use cases of first-class identifiers, other than making some function
arguments or macros look prettier?)

~~~
PuercoPop
And when Norvig made that claim in from of McCarthy, McCarthy disagreed.

> Peter bravely repeated his claim that Python is a Lisp.

> Yes, John?" Peter said.

> I won't pretend to remember Lisp inventor John McCarthy's exact words which
> is odd because there were only about ten but he simply asked if Python could
> gracefully manipulate Python code as data.

> "No, John, it can't," said Peter and nothing more, graciously assenting to
> the professor's critique, and McCarthy said no more though Peter waited a
> moment to see if he would and in the silence a thousand words were said.

[http://smuglispweeny.blogspot.pe/2008/02/ooh-ooh-my-turn-
why...](http://smuglispweeny.blogspot.pe/2008/02/ooh-ooh-my-turn-why-
lisp.html)

~~~
dreamcompiler
I was at that meeting. The mood in the room toward Norvig was "Who are you and
what have you done with Peter Norvig?"

------
hyperion2010
Having started in python land, and having started to wander into the borders
of lisp land, this talk covers the experience of the transition very well.
More importantly it provides great suggestions for the social aspects of
getting new users over the hump (with happy intern comments as well, (I would
like to hear the unhappy ones as well)).

Overall a good talk about the realities of one way to use lisp successfully in
a 'modern' software development environment.

------
flavio81
32:50 "Despite the odds, i've used Lisp at no less than 7 companies, 5 in
which the Lisp ended up in the product that was actually delivered to the
customer."

------
rhaps0dy
My first thought on seeing the python-lisp HTTP bridge diagram was Hy
[http://docs.hylang.org/en/stable/](http://docs.hylang.org/en/stable/) .

Though with Hy you don't get optional types and optimisation and SBCL.

~~~
reikonomusha
You might also think of CLPython [0], a (somewhat bare-bones, C-incompatible)
Python implementation in Common Lisp.

[0] [https://common-lisp.net/project/clpython/](https://common-
lisp.net/project/clpython/)

------
progman
Lisp is the secret power tool of developers who really understand computing.

------
leaveyou
too bad the audio quality is low..

~~~
reikonomusha
Sorry about that. Our microphone/recording rig wasn't set up in time, and had
to resort to a batter-powered lapel mic. We will try to at least duplicate the
channel.

I hope that the audio is at least relatively clear, and not muffled and
incomprehensible!

------
flavio81
I'm not watching the whole video but at 24:00 it becomes _very_ interesting
when they talk about Lisp and performance.

------
agumonkey
only 20 minutes in, very interesting talk, although, python is in the gang too
;)

------
johngaizick
Love it

