Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kanaka
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
kanaka
5y ago
I wouldn't say it was entirely unintentional :-). I was definitely aware that "mal" could mean "evil" when I named it. It was a bit more apropos when mal only had a single implementation in GNU Make macro language.
2.
▲
by
kanaka
5y ago
Mal uses a regex for lexing/tokenizing. I didn't want people to get hung up on the lexing step (my university compilers class spent 1/3rd of the semester just on lexing). It's certainly a worthwhile area to study but not
3.
▲
by
kanaka
5y ago
It's a long regex, but it's just whitespace followed by an alternation with 5 different types of data: split-unquote, special characters, strings, comments, symbols. The string tokenizing branch is a bit complicated because it has
4.
▲
by
kanaka
5y ago
- There are several reasons for the weird way that the output and expected messages are printed. One of the main reasons is that in order to enable more flexible test case results, the expected output is a regex rather than a plain string,
5.
▲
by
kanaka
9y ago
The steps and main files are the same for every implementation (that's part of the requirements for merging into the main tree). Some implementations have additional files like readline, utility routines, etc. But for the most part the
6.
▲
by
kanaka
9y ago
Every implementation has a stats target that gives byte counts, LOCs, and comments that is specific to that implementation. I.e. from the top-level you can run the following to get stats for every language: make stats or for more con
7.
▲
by
kanaka
9y ago
It started with the question "Could you implement a Lisp using just GNU Make macros"? (Hint: Yes) Bit of trivia: Mal originally stood for MAke-Lisp. Conveniently the acronym didn't need to be changed for "Make-A-Lisp&quo
8.
▲
by
kanaka
9y ago
Implementation size is hard to compare accurately across languages (bytes? lines of code? exclude comments? excluding leading spaces?). Also, the mal implementations were created by many different people so individual style plays a large ro
9.
▲
by
kanaka
9y ago
BYOL is targeted at implementing Lisp in C and focuses on learning C. There is a fair bit more hand-holding and example code in C for most of the steps than in the mal guide. BYOL is more polished and written in the form of a short book whe
10.
▲
by
kanaka
9y ago
I look forwards to your pull request! One challenge you'll run into is that (as I recall) the Boehm GC linkage no longer works with newer versions of Boehm.
11.
▲
by
kanaka
9y ago
I made a quick gist of the current LOC/file size stats: https://gist.github.com/kanaka/fdef20f5d0c2e04b97d9106b2f2f2... Note that this should obviously be taken with a grain of salt: the implementations were creat
12.
▲
by
kanaka
9y ago
The problem with that command is that it also counts the Makefile, Dockerfile and other supporting files. It also counts every implementation step (so lots of repeats in the LOC). However, each implementation does have a "stats"
13.
▲
by
kanaka
11y ago
Clojurescript.net is running an online version of the bootstrapped REPL. It works on at least some mobile devices I've checked.
14.
▲
by
kanaka
12y ago
pcwalton: thanks to Alex Crichton, the implementation has been cleaned up and updated to Rust 1.0.0 nightly. Yay! The feedback you noted has been applied to the code base. The performance has definitely improved some. Alex did some performa
15.
▲
by
kanaka
12y ago
Yes, it was intended to be somewhat in jest. "The expert" was a subtle (perhaps too subtle) acknowledgement of his role. Although, I am serious that if somebody with better Rust chops than I wants to fixup the code so that it repr
16.
▲
by
kanaka
12y ago
I'm rather hesitant to post any sort of benchmarks (since the existing ones suck so bad), but the using these, the lua 5.1.5 equivalents would be: 1, 1, 293 Lua does seem to be an odd one in that the short tests run quickly but this do
17.
▲
by
kanaka
12y ago
I'm quite happy to take PRs from an expert to address the issues and represent Rust better. :-) UPDATE: I will point out that the README is pretty clear that this is rust 0.13. Doesn't mean it's a good representation of rust
18.
▲
by
kanaka
12y ago
Thanks for the feedback. That did seem rather inefficient at the time but I wasn't able to discern the more efficient method at the time. I've kind of been waiting for Rust 1 to cycle back around. But I'll see if I might be a
19.
▲
by
kanaka
12y ago
Well, I'm not going to remove it. But I will see if I can find some time to improve it in the next few days. I've been meaning to cycle back around. Of course, fixes from somebody who's actually a Rust expert would have been
20.
▲
by
kanaka
12y ago
Yeah, the performance benchmarks currently suck. They are neither statistically valid, comprehensive, and often just run with default settings. That was really just a personal notes file that I shared with def- without clarifying that it re
21.
▲
by
kanaka
12y ago
That chart (i.e. cloc) is actually missing 6 of the more interesting implementations: - forth - mal itself (e.g. self-hosting: all implementations can run this) - miniMAL (Lisp interpreter in < 1024 bytes of JS) - PostScript - R - Rack
22.
▲
by
kanaka
12y ago
The forth and OCaml implementations were written from scratch by chouser (Chris Houser of "Joy of Clojure"). The rest were written from scratch by yours truly (kanaka/Joel Martin). However, it looks like there are a number of
23.
▲
by
kanaka
12y ago
mal C implementation: https://github.com/kanaka/mal/tree/master/c Caveat, no GC. Although that could probably be added easily using the Boehm GC. I plan to do so at some point assuming nobody beats me to
24.
▲
by
kanaka
12y ago
Good resource. Added.
25.
▲
by
kanaka
12y ago
Python is one of the oldest implementations and I ought to do a another pass through to clean it up sometime. I'm happy to take pull requests that make an implementation shorter and/or more idiomatic as long as it doesn't cha
26.
▲
by
kanaka
12y ago
"Guacamole has much better performance ... custom, better-performing protocol" -> What aspect of performance? Latency? Bandwidth? Server CPU and memory usage? Scaling? Do you have some actual performance benchmarks comparing th
27.
▲
by
kanaka
12y ago
The websocket support in QEMU allows you to connect with noVNC directly without using a websockify (proxy/bridge). You can still choose to connect to the regular VNC port using the proxy, but if you activate websockets then you can con
28.
▲
by
kanaka
14y ago
The essay isn't actually that recent.
29.
▲
by
kanaka
14y ago
And Clojure can target and interoperate with at least two of those stacks: Java (standard Clojure), Javascript (ClojureScript). And there is experimental support for C/C++ (clojurec, Ferret, etc). Not to mention in progress support for targ
30.
▲
by
kanaka
14y ago
And hopefully "unofficial" CLJS-in-CLJS by Clojure West. :-) I just pushed type/record/protocol/reify support. Next big thing is to fix runtime namespace creation. Then file I/O. Then all the bugs discovered while try to compile the compile
More ›