[HN Gopher] Building a programming language in twenty-four hours
___________________________________________________________________
Building a programming language in twenty-four hours
Author : todsacerdoti
Score : 70 points
Date : 2023-06-05 16:19 UTC (6 hours ago)
(HTM) web link (ersei.net)
(TXT) w3m dump (ersei.net)
| deepzn wrote:
| Seeing the interview with Chris Lattner on Lex Fridman podcast on
| developing Mojo, and how he's learnt from developing Swift, or
| LLVM is very interesting, and how the path they've taken with
| Mojo is different from Python. It also seems like a lot of
| languages especially the new ones are converging with the best
| features from past languages which also makes sense.
|
| This is super ambitious, but a great project to work on to better
| your understanding. And I applaud you, especially as an undergrad
| student( I assume as you stated final exams in the post). I wish
| I'd done more projects like this back when I was starting out.
| You are way ahead of where I was lol, I barely did any projects
| outside classes. And you got some attention on HN. Good stuff!
| soperj wrote:
| People laugh at this, but isn't this exactly how we got
| Javascript?
| [deleted]
| jheriko wrote:
| 24 minutes is a better target, i have a few repos like this...
| and long before the internet made it easy, it was the kind of
| thing i would do in my lunchtime at an office job.
|
| it was way more instructive than following the standard path.
|
| interesting read though :)
| DonaldPShimoda wrote:
| I'm not sure what the intended utility of "I am better than the
| target audience of this article" is, but I assure you it does
| not paint you in a positive light to other readers.
| all2 wrote:
| I had a lunch time project for a couple of months, where I
| would spend about 30 minutes a day (I had to limit myself)
| implementing a scheme-like in an assembly-like language
| called Teraterm. It was fun trying to work within the
| constraints of the language. I finally quit when I hit TTs
| built in recursion limits. I know the solution would be
| implementing a call stack in TT, but I couldn't bring myself
| to do it.
| User23 wrote:
| There wasn't a setjmp()/longjmp() type functionality?
| That's how I cheated implementing a Lisp in C. When tail
| recursing I'd let the stack grow a while, nuke it with
| longjmp(), and keep going.
|
| That was a long time ago and I didn't know nearly as much
| about PL design and implementation as I do now, but it set
| me on the path. Funny thing was I started that project just
| to prove to myself that I could still write C since I'd
| been doing a ton of Perl.
| avgcorrection wrote:
| I read it more like setting a low bar in terms of time, like
| a pomodoro in fact. So whatever you produce in 24 minutes is
| that language. Then try again later.
|
| Some of us should start the meta-project of cleaning our
| house by just making our bed.
| DonaldPShimoda wrote:
| Maybe if that's all they'd said, but
|
| > and long before the internet made it easy, it was the
| kind of thing i would do in my lunchtime at an office job.
|
| This gives me vibes of "I think I'm really impressive and I
| want people to know it." Maybe that's uncharitable
| though... Talking to people online has made me too cynical
| haha. I appreciate the alternative perspective.
| avgcorrection wrote:
| Hmmph. Try my build-no-programming language in 20 years instead:
|
| - Be armchair-interested in programming languages
|
| - Take some PL-whatever courses in college
|
| - Read about PLs
|
| - Read about progressively niche PL stuff...
|
| - Get idealistic (get ideas)
|
| - Read about the grueling design process of useful-in-the-real-
| world languages
|
| - Eventually realize that There Are Always Tradeoffs
|
| - Realize that the Tradeoffs are like two thousand parameters
| that might interact in super-weird and non-obvious ways
|
| - Realize that a dozen super-competent PhD-wielders and multi-
| decade practitioners can easily spend a decade on developing the
| core of a language
|
| - eh, why bother
| StingyJelly wrote:
| - eh, why bother
|
| - yolo
| feoren wrote:
| I came here to say "can we worry about building programming
| languages in twenty-four years instead, please?". Someone who
| has gone through your list is _exactly_ who I want actually
| building the next generation programming languages. Of course
| your last question is the best one:
|
| > eh, why bother
|
| This is absolutely the question you need a deep answer for. You
| need a problem that is burning you up and whose _only_ solution
| is a new programming language. This might never happen. If it
| ever does, you 're the person to do it, exactly because of all
| the ups and downs and half-started ideas you've thrown away.
| But you're right: the "why bother" stage is not to be ignored.
| It's the most important one.
| hidden80 wrote:
| - Me
| all2 wrote:
| I had to change the scope of my desires. I don't want to make
| the next Python. Not even the next Zig or Nim. I just like
| fiddling with compilers and interpreters. Someone else
| mentioned _Crafting Interpreters_ and I 'll bring it up, too.
| I've been following along in C# and occasionally come back to
| my C#Lox implementation and work through another chapter. It is
| quite a lot of fun.
| PartiallyTyped wrote:
| I am on a similar path, I am super fascinated with type
| theory and I want to test / implement stuff.
| User23 wrote:
| > - eh, why bother
|
| Because you will learn a ton and become a better programmer for
| it.
| simplify wrote:
| Progress is always made by those with an optimal amount of
| ignorance :)
| wellanyway wrote:
| Don't give fronyent people ideas.
| tyingq wrote:
| Eich supposedly did javascript in 10 days, so this seems
| reasonable, right? :)
|
| https://thenewstack.io/brendan-eich-on-creating-javascript-i...
| tabtab wrote:
| And it still shows.
| omgmajk wrote:
| An interesting read. Always been fascinated with compilers and
| lexers. I should really make a language at some point. I tried
| following that "make a lisp in c"* book but I didn't like that
| they used external libraries that I didn't know about.
|
| [*] https://www.buildyourownlisp.com/
| santix wrote:
| Check out https://craftinginterpreters.com/
| omgmajk wrote:
| Will do, thank you!
| tmorette wrote:
| this was how javascript was created
___________________________________________________________________
(page generated 2023-06-05 23:02 UTC)