32
monnef
8y

Bonus points if you also wrote it in a language entirely new to you, or even in entirely different paradigm. (In my case Haskell.)

Comments
  • 2
    Cool, what was your goal with your eso language? :)
    Kittens, emojis, farts?
  • 4
    Did this for our templating solution.

    At the time all I could find was either to slow, to simple or lacked a proven sandbox.

    And since customers have access a sandbox was a requirement.

    We'r on version 5 of the language right now and last one added lambda support and simple reflection.

    Next one might start to use IL emit to speed up instead of interpreter but not sure yet. Can do about 300 full page renders per sec on single thread and it is still enough.
  • 2
    @heyheni It's a stack and "physics-based" language. A falling ball (viewed from side) is executing instructions when it touches them. I might have designed it a bit too complex - on paper it has even an equivalent of subroutines 😀.
  • 1
    Nice! :D
    And this falling ball, is it interactive? Can you klick it and do code execution scratching like a turntable?
  • 1
    How can I design or develop my own esoteric language?
  • 3
    First get a clear picture of what it should achieve.

    Then look on similar languages for ideas of syntax.

    Making a very simple language for scripting is not to hard but making one more complete very quickly grows in complexity.

    A simple line by line statement language is almost trivial.

    Adding conditionals is a little more complex since you need both containment and condition logic.

    Looping is one more step up the ladder.

    I have probably read a couple of thousand pages on the subject during the eight years I have been building on my lang.
  • 0
    @Voxera
    Can u suggest me some material or documentation that I can refer to begin
  • 1
    @heyheni Programmer can use "bouncers" sensitive to a top of the stack (basically if statement) and for looping there are portals. Well, none of it is working yet (only parsing), but I hope I will finish it soon ☺️. It is great fun to explore new language (Haskell) and at a same time to learn something more about programming languages in general (last time I was dealing with similar stuff was at university).
  • 0
    @ajay-1997 Not a documentation (closest thing would probably be some university course), but if you are looking for inspiration you can check out this wiki - https://esolangs.org/wiki/....
  • 3
    For parsing either look at some existing that supports ebn grammar
    Or look an recursive decent parser.

    Also look into abstract syntax tree, that is a sort of tree like representation if a program.

    My interpreter is walking the ast directly but also does some optimisations on it.

    Her are a few links to start of with but be sure to search for more. Especially tutorials.
    Might start with the last one ;)

    https://en.m.wikipedia.org/wiki/...

    http://stackoverflow.com/questions/...

    https://codeproject.com/Articles/...

    https://google.se/amp/...

    http://nathansuniversity.com
    And the especially
    http://nathansuniversity.com/scheem...

    The last one is an interactive tutorial where you actually are building the interpreter right in the web page
  • 1
    I want to try this, but I'm lazy right now.
Add Comment