Live data from Hacker News

What you learn by making a new programming language

ntietz.com

1–10 of 137 posts

Re: What you learn by making a new programming language

#3
I spent time on a compile-to-JS language and found it very rewarding: https://github.com/rzimmerman/kal

This was before async/generators were added to JS and callback hell was quite real. I wanted to shape it in the way I’d learned to program in Visual Basic. Very human readable. The result is no longer useful, but it was a fun goal to have the compiler compile itself.

Re: What you learn by making a new programming language

#6

Every program expands until it becomes a compiler or checks mail. Emacs's sin was doing both.

> Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp

https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

Re: What you learn by making a new programming language

#7
One of the most fundamental experiences I ever had was attempting a graduate level course at the end of a long series on compilers. You really get an eye opening view of how languages are translated into the language the machine understands. After going through a few toy languages and then finally tackling creating a simple JVM, here is the #1 thing I would go back to myself and scream until I was blue -

Make your initial grammar SUPER simple. Like, don't go guns blazing and try to add all these cool features you saw in another language or always thought about. Start stupid, stupid simple, get that working, then build on top of it.

Re: What you learn by making a new programming language

#8
No. No, I really shouldn't.

Yes, I might gain a better understanding of how things work. I can do that lots of ways; others may be a better use of my limited time. (For that matter, doing other things that don't give me a better understanding of how things work may be a better, more valuable use of my limited time.)

Yes, I could get a language that fits what I need better... in theory. In practice, it would be buggy, inconsistent, and incompletely implemented. It would not actually fit what I need better than existing languages.

Re: What you learn by making a new programming language

#9
post #5

Every program expands until it becomes a compiler or checks mail. Emacs's sin was doing both.

Angry upvote. Maybe it's true failing though was stopping short of becoming the OS.

It's not its own kernel, but emacs can run on Linux as PID 1, at which point it rather seems like it should count as an OS. Given its affiliation, emacs/Linux probably still counts as GNU/Linux, but still...

Re: What you learn by making a new programming language

#10

No. No, I really shouldn't. Yes, I might gain a better understanding of how things work. I can do that lots of ways; others may be a better use of my limited time. (For that matter, doing other things that don't give me a better understanding of how things work may be a better, more valuable use of my limited time.) Yes, I could get a language that fits what I need better... in theory. In practice, it would be buggy,…

How is using a language that is buggy, inconsistent, and incomplete any better than use a better language to write an app that is buggy, inconsistent, and incomplete?

Checkmate.

Post reply on HN