Equivalent of Hy in Julia?

I didn’t know where exactly to ask this, so it’s in offtopic now. :man_shrugging:
Recently I’ve been interested in Lisp and found Hylang, a lisp on top of Python: The Hy Manual — hy 0.24.0 documentation.
This looks very interesting since libraries can be used seamlessy it appears; this makes Pythons data science, ML & scientific ecosystem accessible with a ‘full’ lisp.
Is there something like this in Julia? So far I haven’t found anything. How difficult to integrate would something like this be in Julia? Easier because of macros?

2 Likes

you can try

julia --lisp

:slight_smile:

Yes. It is called “Julia”. It is a full lisp, thinly disguised with a custom infix/M-expression syntax.

ulia> ex = :(f(1 + 2, a))
:(f(1 + 2, a))

julia> Meta.show_sexpr(ex)
(:call, :f, (:call, :+, 1, 2), :a)
5 Likes

You might be interested in

julia --lisp gives you a femtolisp interpreter, which is actually also used by Julia internally for its parser and lowering, but there’s not really an easy way of calling into Julia. It’s also not great for interactive use, because it assumes a dumb terminal, but you can install rlwrap and then do rlwrap julia --lisp for a better line editing experience.

5 Likes

I realise that Julia is quite Lisp-like but that wasn’t quite what I was looking for.

LispSyntax.jl is interesting, thanks. I’ll have a closer look at it.

Is your question about calling Python from Julia? Have you seen https://github.com/JuliaPy/PyCall.jl? Through PyCall, you can access all of Python seamlessly.

If you want we can make one.
However I guess macro makes this less appealing.