Arc Forumnew | comments | leaders | submitlogin
Arc-inspired but JavaScript-native: hybrid dialect for JS environments (jisp.io)
4 points by Mitranim 3824 days ago | 14 comments


2 points by Mitranim 3822 days ago | link

I’m not much of a Lisper, so it would be interesting to hear what experienced people would say about the language. Am I stupid? Did I get something horribly wrong? The idea was to bring Lisp (Arc) paradigms but use native JavaScript data structures, where you don’t have symbols, nil, and so on. The resulting side effects is things like quoting stringifying atoms for macros, hash tables not being lists (there are no keyword elements in JS), and so on. I would actually love to hear I got something wrong; the language is still early enough to make breaking changes.

-----

1 point by akkartik 3822 days ago | link

I haven't looked in depth yet, but in general I'm a big fan of superficially/locally ugly solutions :)

-----

2 points by akkartik 3823 days ago | link

How did you bootstrap this repo? I'd love to hear more details, or pointers to specific commits in the history.

-----

3 points by Mitranim 3822 days ago | link

I wrote the original compiler in CoffeeScript, then gradually reimplemented its parts in jisp, concurrently fixing bugs and adding features to the remaining coffee parts. The hardest part to replace was the jisp.coffee to jisp.jisp; at that point I had to stop and rearchitect some parts of the old compiler and implement macros in it to write the new one in a relatively sane way. Using a higher-level JavaScript dialect helped in several ways: it allowed to write less code, challenged me to immediately implement those higher-level features, and helped with understanding and debugging JavaScript (which would have been harder if I wrote in a non-JS language).

Didn’t want to publish an unfinished compiler, so there’s no coffee in the repo history. I don’t actually even have a git history before 0.0.1.

Took three weeks from concept to publish. May have been faster or better if I borrowed technical concepts from other implementations, but I wanted the compiler to be completely original. For instance, it converts jisp code into native JavaScript data structures rather than token trees. Not sure how other similar dialects handle this.

-----

1 point by akkartik 3822 days ago | link

Oh that's too bad. I'm intensely curious about the experience and it's very poorly covered in most places. Guess I'll just have to try it for myself :)

-----

2 points by Mitranim 3822 days ago | link

If you mean the experience of implementing a language, what about wart and anarki? Or did you mean something else.

-----

1 point by akkartik 3822 days ago | link

I meant implementing a language in itself.

(Also, I didn't implement anarki. That's more like a maintenance job..)

-----

4 points by Mitranim 3822 days ago | link

Writing a self-hosted compiler feels a bit like climbing a skyscraper without a safety belt. I usually test each change by immediately having the compiler recompile itself a few times. Back when it was unstable, each time felt like a plunge from a mountaintop, with a jolt of adrenaline. I guess it still does. :D

-----

2 points by Mitranim 3824 days ago | link

Just thought this community might appreciate.

-----

1 point by akkartik 3823 days ago | link

Indeed, this looks great!

One problem I'm having is in reading that page: http://i.imgur.com/6i5399E.png

-----

2 points by Mitranim 3823 days ago | link

Thanks for noting. It works fine in my browsers; what's yours?

-----

2 points by rocketnia 3823 days ago | link

I get the same problem in Chrome 35, but the site's just fine in Firefox 30.0. I'm using Android 4.0.4.

-----

2 points by akkartik 3823 days ago | link

I'm on ubuntu linux and saw the problem in both firefox and chrome.

-----

2 points by Mitranim 3823 days ago | link

What a shame on me for not testing properly. I think I've fixed the layout now. Check it out again. :)

-----