Any chance that this is inspired by Forth?
Define "inspired". I became aware of Forth while implementing Elymas. But the decision to make it stack based was actually because I was too lazy (after some attempts) to implement a correct LALR-parser-generator.
Show HN: Self-hosted stack-based programming language
11–20 of 24 posts
Re: Show HN: Self-hosted stack-based programming language
#12I have to ask: Is that basically self-targeted snark about how you're not doing this with Lisp?
I hope so, because I got a good belly laugh out of that interpretation.
Re: Show HN: Self-hosted stack-based programming language
#13I also can't seem to stop myself going off half-cocked and writing language interpreters[1][2] and virtual machines[3]. It's really quite addictive, and gives you a "I really made something" feeling that a new backup script or CRUD app doesn't quite provide.
I too actually started off writing a stack/RPN-style language for the exact reason that I didn't want to do a proper parser, but then realized that, for properly recursive structures like in Joy[4], it really makes it easier to just write a parser. And it turns out that a recursive descent parser really isn't that difficult, conceptually, once you spend the brain-time to work one out yourself[5]. Like most things programmatic, it's tough to wrap your mind around until you've done it once, then it's just a matter a typing and bugfixing.
Along with the aforementioned Joy (which is a stunningly elegant language), some other languages I find inspiring are rhoScript (http://www.rhoscript.com/), Pico Lisp (http://picolisp.com/wiki/?home), and the very clever WadC editor (http://strlen.com/wadc-editor), which implements a DSL and interactive environment for describing Doom levels in code, rather than by dragging vertices in a purely graphical editor (This isn't as crazy as it sounds if you're unfamiliar with the limitations of Doom levels, since they are constrained to certain types of simplified geometry that lend themselves well to this).
In short, keep it up! I've never had to use any of these skills in my day-to-day work (I'm not even a professional developer, though I'd like to be.) but it's still a heck of a lot of fun to play around with.
[1] http://billipede.net/2014/03/30/reverse-polish-cowgirl.html [2] http://billipede.net/2015/05/09/dawn.html [3] http://billipede.net/2014/06/05/bedrock.html [4] http://www.latrobe.edu.au/humanities/research/research-proje... [5] http://billipede.net/2015/02/14/lets-write-a-parser.html
Re: Show HN: Self-hosted stack-based programming language
#14"Just because I'm not following the true path, doesn't mean I can't get it to work." I have to ask: Is that basically self-targeted snark about how you're not doing this with Lisp? I hope so, because I got a good belly laugh out of that interpretation.
Re: Show HN: Self-hosted stack-based programming language
#15I find the differing syntax between function and variable storage to be interesting. Is there any particular reason these aren't unified? Assuming anything in brackets is a first-class "function" object, something like this should be possible: 2 /two define { two add } /addTwo define
{ 2 } /putTwoOnStack deff
{ 2 } /putClosureOnStack defv
putTwoOnStack dump # 2
putClosureOnStack dump #
putClosureOnStack * dump # 2
Re: Show HN: Self-hosted stack-based programming language
#16Re: Show HN: Self-hosted stack-based programming language
#17Re: Show HN: Self-hosted stack-based programming language
#18Re: Show HN: Self-hosted stack-based programming language
#19"Just because I'm not following the true path, doesn't mean I can't get it to work." I have to ask: Is that basically self-targeted snark about how you're not doing this with Lisp? I hope so, because I got a good belly laugh out of that interpretation.
It is self targeted snark allright. Not just not doing it with LISP, but also ignoring pretty much everything I learned about compiler building in university.
1) Incredibly out of date.
2) Far newer than what my job requires me to use.
3) Existing in some ideal world that matches nothing anyone actually created or uses in industry.
And yes, it's possible (and not rare at all) for both (1) AND (2) to be true at the same time.
Re: Show HN: Self-hosted stack-based programming language
#20Earlier quoted context omitted.
It is self targeted snark allright. Not just not doing it with LISP, but also ignoring pretty much everything I learned about compiler building in university.
I may only be a few years out of university, but over the last couple years I've learned that what I studied in university falls into three categories: 1) Incredibly out of date. 2) Far newer than what my job requires me to use. 3) Existing in some ideal world that matches nothing anyone actually created or uses in industry. And yes, it's possible (and not rare at all) for both (1) AND (2) to be true at the same time…