Live data from Hacker News

Lang Jam: create a programming language in a weekend

github.com

131–135 of 135 posts

Re: Lang Jam: create a programming language in a weekend

#131

Would it be cheating to use Racket? https://racket-lang.org/

> You can code in any programming language you'd like to create your project, so long as the language is part of the Debian/Ubuntu or Arch package repo (or one of the language-specific repos, like Rust's cargo).

So seems like it should be fine! Go ahead and make a racket :)

Re: Lang Jam: create a programming language in a weekend

#132

Crafting Interpreters came out just in time for this :) http://craftinginterpreters.com

Hadn't heard of this book yet! From my cursory glance this looks like quite a good introduction into language implementation, which is just what I've been looking for myself, thanks a lot!

Re: Lang Jam: create a programming language in a weekend

#133
post #92
post #48

Earlier quoted context omitted.

I'd like a GC (no borrow checker) version of Rust. There's so many cool concepts in the language that I'd like to know how useful it is in different contexts. (Compiled without a VM, option types, no nulls, easy error handling without exceptions...)

We use D a lot at work, we genuinely can only laugh at people who refuse to entertain the idea of a GC. The GC allows our code to exist without extensive memory book-keeping. When we want to avoid the GC we know how, when we want the productivity we use the GC and fuggedaboutit

Using GC basically locks you into a particular memory model or framework.

Having spent 20 years mostly working in GC languages, it's totally worth it! However, writing portable libraries like SQLite or libpng are very difficult to do without bringing in unacceptable overhead for your consumers.

Re: Lang Jam: create a programming language in a weekend

#134

Crafting Interpreters came out just in time for this :) http://craftinginterpreters.com

Hadn't heard of this book yet! From my cursory glance this looks like quite a good introduction into language implementation, which is just what I've been looking for myself, thanks a lot!

You should definitely check out https://interpreterbook.com/ and https://compilerbook.com/ too. They're very well written and very thorough. Highly recommend them as approachable primers on the topic.

Re: Lang Jam: create a programming language in a weekend

#135
post #64
post #41

Earlier quoted context omitted.

> Appending a string to a null value..? Appending a string to an undefined value, via array addition, which turns them into strings but doesn't turn null into 'null' or undefined into 'undefined'. It's a bit of a hack. `'a' + undefined === 'aundefined'` `[ 'a' ] + [ undefined ] === 'a'` Also the empty string '' evaluates to false. `[ undefined ] + [ undefined ] == ''` This is wat - https://archive.org/details/wat_des…

> This is wat For a second, I thought it was JavaScript

That's what I said :)
Post reply on HN