[HN Gopher] Lispsyntax.jl: A Clojure-like Lisp syntax for julia
       ___________________________________________________________________
        
       Lispsyntax.jl: A Clojure-like Lisp syntax for julia
        
       Author : phonebucket
       Score  : 96 points
       Date   : 2021-01-19 17:53 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | ampdepolymerase wrote:
       | The irony here is particularly rich considering Julia's parser
       | frontend is written in Scheme.
        
         | yrimaxi wrote:
         | Why is that ironic?
        
           | DannyB2 wrote:
           | At the very least it is amusing.
        
           | eigenspace wrote:
           | I'm not sure, but maybe they're unhappy that it uses a more
           | Clojure style syntax?
        
         | sritchie wrote:
         | A couple years into fatherhood and I see puns everywhere, and
         | suspect others of dropping them too.
         | 
         | Particularly Rich... Hickey?
        
           | asimjalis wrote:
           | I juxt ignore the puns.
        
         | mumblemumble wrote:
         | It seems more fitting than ironic to me. Julia's never been shy
         | about its lisp heritage, and the reason why this project is
         | only a couple hundred lines of code is that Julia remains very
         | close to those roots.
        
           | Blikkentrekker wrote:
           | Certainly any alternative syntax parser for any language
           | would be?
           | 
           | It would also only take a couple of hundred lines to write a
           | parser for a C compiler that would allow that.
        
             | mumblemumble wrote:
             | Not any to any. You could't write a thin lispy alternative
             | syntax for C because of some semantic differences. "If" is
             | an expression in Julia and Lisp, and it's a statement in C.
             | Dealing with things like goto statements and preprocessor
             | macros would also require some extra work.
             | 
             | Add all that up, and you're no longer looking at
             | alternative syntax, you're looking at a transpiler.
        
               | Blikkentrekker wrote:
               | But this is also simply an alternative Syntax that
               | mirrors _Clojure_ , not actual _Clojure_ semantics.
        
       | fulafel wrote:
       | My current favourite of these is this Lua version:
       | https://github.com/bakpakin/Fennel
        
       | phonebucket wrote:
       | A fun Julia easter egg I recently discovered.
       | 
       | Running 'julia --lisp' launches a femtolisp
       | (https://github.com/JeffBezanson/femtolisp) interpreter.
        
         | retzkek wrote:
         | The Julia parser is actually written in femtolisp:
         | https://docs.julialang.org/en/v1/devdocs/eval/#dev-parsing
         | 
         | https://github.com/JuliaLang/julia/blob/master/src/julia-par...
        
       | ddragon wrote:
       | While not nearly as mature as the main platforms (like the JVM,
       | .NET, BEAM), the Julia compiler does have some unique features
       | (an extremely aggressive optimizer, a sophisticated type
       | inference mechanism, possibly the most exceptional multiple
       | dispatch support, Go-like lightweight processes), including a
       | macro system that supports reader macros for writing parsers
       | (like this library) and extensible multi-stage compilation (like
       | the IR manipulation that is used in auto-differentiation of
       | source code), which makes me wonder if once all those features
       | (and possibly new ones) become robust enough it will become one
       | of the targets for people creating new programming languages.
        
         | stabbles wrote:
         | What you see most is domain-specific languages implemented
         | through macro's. For instance this package,
         | https://jump.dev/JuMP.jl/dev/examples/basic/,
         | https://github.com/SciML/ModelingToolkit.jl or
         | https://turing.ml/dev/docs/using-turing/get-started
        
           | ddragon wrote:
           | Yes, I was thinking about someone going many step furthers,
           | like Elixir is for Erlang and the BEAM, someone who disagrees
           | with design decisions of the Julia language but appreciates
           | the compiler's capabilities and the ecosystem enough to use
           | them to implement their own vision for a programming
           | language. Making it a Lisp is just one of the more obvious
           | scenarios, as someone may like Julia in general but want the
           | full power of s-expressions.
        
       | degraafc wrote:
       | Great example of building something fun not because we should but
       | because we can :)
       | 
       | My take on "Lisp in Julia" using deprecated-but-still-parseable
       | syntax instead of a string macro: https://github.com/christopher-
       | dG/jlisp
       | 
       | I should probably put some examples in the readme.
        
       ___________________________________________________________________
       (page generated 2021-01-19 23:00 UTC)