5
lorentz
2y

Orchid runs!

It's very far from done, but now I'm motivated to get shit done! My optimizations can now have measurable impact! The hypothetical examples no longer have to be hypothetical!!!

Comments
  • 0
    Repo: https://github.com/lbfalvy/orchid

    All you need is a nightly Rust toolchain
  • 0
    To do:

    Optimization:
    - intern tokens
    - avoid extraneous macro matches

    Housekeeping:
    - get rid of Mrc
    - replace as many instances of Rc with lifetimes as possible (I learned Rust with this project)

    Planning:
    - think hard about how polymorphism could work and whether it's avoidable (dynamically typed polymorphism is jucky)
    - expand the STL with list, map, option and other goodies
    - proof-of-concept for pattern matching with manually defined matchers
  • 1
    It looks like you have two assignment operators = and :=

    And = is also a comparison operator in the conditions.

    Why?
  • 0
    Is that rust? It looks for men who like men.
  • 1
    @retoor is it an euphemism for gay? 😆
  • 0
  • 1
    @Lensflare the comparison operator is now ==, but basically

    name := ...expression

    is a name binding for a constant or function (they are equivalent) and it actually desugars to the macro, aka. a substitution rule applied to the code before execution. On the other hand,

    statement (let $name = ...$expression) ...$rest ==> (\$name. ...$rest) (...$expression)

    is its own macro, operating in conjunction with a macro that turns do blocks into statement sequences. Both of these are implemented in Orchid and modular, for instance, CPS is a variant of the "let" rule that passes the lambda to the expression and not the other way around.
  • 1
    @retoor Rust made a deep impression on me, but the similarities end at "familiar c-style syntax but make it more functional". I made it even more functional with autocurry and the underlying language is completely different.
  • 1
    @retoor If you think the syntax is gay you'll love the logo I came up with yesterday
  • 2
Add Comment