News for hackers. Stuff that matters.
Re:Crafting Interpreters by mrcactu5 on Tuesday July 10, 2018 @08:57AM (#17497617)
i think this is cool. i could learn new languages all day. however I've seen people argue on HN that writing language is a waste of time. why should we embark on such an exercise?
Re:Crafting Interpreters by s-shellfish on Tuesday July 10, 2018 @09:12AM (#17497716)
It makes programming just about everything a billion times easier to think about. Every programming thing you have to work on is a map between the problem space and the finished program. The problem space itself can be thought of as a program. You are just mapping from one space to the other. That's what writing languages teaches you how to do.
Re:Crafting Interpreters by steveklabnik on Tuesday July 10, 2018 @09:34AM (#17497891)
Some people love Yegge, some hate him. This post is... well it's a rant. But it kinda answers this question in an interesting way https://steve-yegge.blogspot.com/2007/06/rich-programmer-foo...
Re:Crafting Interpreters by jmiserez on Tuesday July 10, 2018 @10:16AM (#17498278)
I didn’t realize it was from 2007 until I got to this tidbit:

>By which I mean Machine Learning, since the term "AI" smacks of not just determinism, but also a distinct lack of VC funding.

Re:Crafting Interpreters by brandmeyer on Tuesday July 10, 2018 @09:17AM (#17497764)
For the chance to expand your mind. If you've never done it before, you'll learn a ton doing it the first time. If its been a while since you've done it, you may learn some new things in the processes given what you learned in the intervening years since the last time.
Re:Crafting Interpreters by mamcx on Tuesday July 10, 2018 @11:45AM (#17499094)
> writing language

Is all we do, in a way or other:

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

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

Thats why "Interpreter" is one of the common OO patterns on the book.

I done a lot of micro-languages (later I found are called "Domain Specific Languages" by hipsters). I have one that build the Database interface code automatically from the .sql script that build the postgresql database.

I code the database at hand, run "builddb.py" and it spit out all the mapping and part of the ORM layer. I doit with bad hacks, regex and stupid stuff (from a proper compiler construction perspective) but I only spend like half day doing it.

Later, I also build the inserts/updates and other extra stuff that sometimes is useful. Then I also spit out both F# and swift code, with the same terrible hacks...

----

Now, after do this thing like millon times before I start to think that I'm a idiot that could have donde this MUCH better. So, this time as a side project I'm doing the same thing, like a ORM-made-as-language.

And boy, this thing is fun. I not only can run "sql" agains my RDBMS but also with owm in-memory structures, similar to LINQ but, IMHO, better.

Now, the thing is... if this little project get to a point where is good, why not release it as a language?

Re:Crafting Interpreters by criddell on Tuesday July 10, 2018 @09:21AM (#17497794)
Most of us probably would be wasting our time writing a general purpose programming language that we think could compete with Python or C.

If you think smaller though, there's a ton of utility to be had in taking the ideas and applying them to domain specific languages. I don't know much about Racket, but it feels like that's its reason to be.

Re:Crafting Interpreters by bpicolo on Tuesday July 10, 2018 @09:12AM (#17497715)
For fun and learning.

In the last 10 years all sorts of new languages have come out and been successful. We're not nearly at the end game of language development.