17 comments

[ 4.5 ms ] story [ 52.2 ms ] thread
I think femtolisp powers Julia's code parsing and helps make Julia so lisp-like. Femtolisp can be run with as an argument to julia: `julia --lisp`

  > julia --lisp
  ;  _
  ; |_ _ _ |_ _ |  . _ _
  ; | (-||||_(_)|__|_)|_)
  ;-------------------|-----------------------
The creator of FemtoLisp, Jeff Bezanson, is one of the creators of Julia.

And even if you’re not particularly interested in learning about another version of Lisp, the README is well worth your time.

It's hard to imagine there will ever be a more entertaining README. You barely even need to know any of the concepts involved to enjoy it.
It does indeed still sit at the core of the language for parsing:

https://github.com/JuliaLang/julia/blob/release-1.7/src/juli...

I'm hopeful that it gets replaced in the nearish future by a pure Julia parser. Femtolisp is definitely cute, but as other parts of compilation have sped up, Julia's parser has started to show up as a measurable percentage of compile time. Getting a parser written in pure Julia would make it easier to make improvements, and it would be a decent amount faster (see CSTParser.jl which is roughly 10x faster than Julia's built-in parser).
(comment deleted)
Having just watched the Berserk anime, I’m curious if anyone knows if the name is inspired by it?
Femto- is one thousandth of pico-. Pico- is one thousandth or nano-.
(comment deleted)
It is heartening to see folks concerned about being lightweight. I keep running out of space on my 32GB Debian 9 VM because every time I cargo build or npm install I feel like I am downloading all of the internet and generating more of it locally. And then docker build creates a few "diff-only" container images that need another 32GB of attached storage of their own.
I'm like a broken disc but when I saw that turbo pascal 7 was 800kB (ide, compiler, help, and libs) I was a bit stumped.
The basic set of MS-DOS 3.3 commands, plus TB/TP 5.5, in an HD floppy (1.44), was part of my student kit during highschool that I used to carry around for the labs.
Every time I read the rant that is the README here, it makes me smile. It describes the project's goals, too, but most of it is humorous remarks on many of the typical problems that come with Lisp implementations. Most of them are about pet-project-class Lisps, but the subtle bashing of Clojure and PicoLisp is a cherry on top. I wish more programmers had capability to write like this.
Which remark do you consider bashing of Clojure?
"This is great, but too often I see people omit some of the obscure but critical features that make lisp uniquely wonderful. These include read macros like #. and backreferences, gensyms, and properly escaped symbol names."

Clojure makes a point of having non-extensible reader.

"For example, how does it help to remove backquote? One design changes the syntax of quote. Some systems disallow dotted lists. (I've seen all three of these.) What's the point? Implementers wave the banner of "simplicity", yet wedge in all kinds of weird implicit behaviors and extra evaluation rules."

Not sure about backquote in Clojure, but the next sentence is probably about PicoLisp, which somewhat famously changes `quote` syntax to accept any number of expressions. Disallowing 'dotted lists' is probably also about Clojure, where the lists are not really lists as used in most other Lisps. The "banner of simplicity" can be a reference to "Simple made easy" (IIRC) by Rich Hickey.

"Lately a surprising amount of FUD has been spread about proper tail recursion. [...]"

Not sure here, but out of major lisps Common Lisp doesn't mandate TCO, but at least SBCL does it anyway; while Scheme has TCO in the standard. Clojure doesn't have it, which leads to existence of `recur` (IIRC) and trampolining in user code.

"Bashing" may be too strong a word, even when qualified with "subtle". It might even not be what the author intended at all, it's just what popped up in my head when reading :)