swadey / LispREPL.jl

REPL for LispSyntax.jl
Other
20 stars 10 forks source link

Updates for Julia 1.0 #7

Closed c42f closed 5 years ago

c42f commented 5 years ago
swadey commented 5 years ago

wow, this is super cool. Thanks! I'm going to merge this for now but I haven't done much testing on your fixes.

swadey commented 5 years ago

@c42f do you want to maintain this project going forward? I don't have a lot of time for the next year or so to be able to do this given work-related assignments :)

MasonProtter commented 5 years ago

So I actually made and registered package a while ago called ReplMaker.jl based on the code in this repo.

For example,

julia> using LispSyntax, ReplMaker

julia> initrepl(LispSyntax.lisp_eval_helper, prompt_text="λ> ", prompt_color=:red, start_key=")", mode_name="Lisp Mode")
REPL mode Lisp Mode initialized. Press ) to enter and backspace to exit.

λ> (defn fib [a] (if (< a 2) a (+ (fib (- a 1)) (fib (- a 2)))))
fib (generic function with 1 method)

λ> (fib 10)
55

julia> fib
fib (generic function with 1 method)

Would it make sense to just make LispREPL.jl just depend on ReplMaker.jl for this stuff going forward?

Given that it's just one line, perhaps LispREPL.jl could just be deprecated and we could add a ReplMaker.jl dependancy to LispSyntax.jl and bring the REPL mode back to the main package.

c42f commented 5 years ago

@swadey thanks for the offer, though it seems the better option is to retire LispREPL and point potential users at that juicy ReplMaker one liner.

@MasonProtter that's really cool. Something like the ReplMaker interface should really be in stdlib REPL :-)

swadey commented 5 years ago

@c42f agreed. @MasonProtter That is super cool.

MasonProtter commented 5 years ago

Thanks for the kind words! If only I had known you were updating this repo I could have saved you some heavy lifting.

I'll open a PR in LispSyntax.jl. @swadey would you rather I just point them to ReplMaker.jl in the README, or add a dependancy so the repl mode is builtin?

swadey commented 5 years ago

Deprecate and provide example code snippet would be my preference. What do you all think?

c42f commented 5 years ago

Agreed.

I'm not worried about the code in this PR being immediately obsolete ;-) It was only an hour or so of hacking to get the tests passing because they're largely similar to stdlib/REPL and I just used that as a guide when updating things.