swadey / LispSyntax.jl

lisp-like syntax in julia
Other
229 stars 24 forks source link

More convenient REPL support #31

Closed oubiwann closed 5 years ago

oubiwann commented 5 years ago

I've tweaked the REPL support to include some sane defaults. Added custom REPL tweaking to its own Markdown file in the docs dir.

swadey commented 5 years ago

hey, thanks for this. i think we need to discuss collectively whether a repl should be included or if this set of components makes more sense in the corresponding LispREPL package. I don't think we fully resolved this.

MasonProtter commented 5 years ago

i think we need to discuss collectively whether a repl should be included or if this set of components makes more sense in the corresponding LispREPL package. I don't think we fully resolved this.

Personally, I don't really see why one wouldn't want it to be included but of course this is your repo so its your call.

oubiwann commented 5 years ago

I actually did start this change with the REPL code as its own package, but then I second-guessed myself, thinking I was over complicating it and that the PR would be 👎 'ed ;-)

(Because, based on other Lisps like Clojure, the next step was to actually have the LispReader.jl package ... even though it would be tiny; readers are typically useful in more than just the REPL context.)

Then, as I was thinking about pulling it into the LispSyntax.jl, I thought about how this package is really more than just syntax, the project seems like it might be growing beyond the name ... and in that sense, it felt right just being here ...

Now you've had a peek inside me brains!

oubiwann commented 5 years ago

Btw: no strong opinion here! Totally cool with any direction.

MasonProtter commented 5 years ago

Alternatively, if we want to keep the scope of this repository small, things like #29 and #28 (if I ever get around to them) and this PR could all go in separate packages and then there can just be a frontend package that pulls them all into one namespace and exports it.

c42f commented 5 years ago

Regarding the parser side of things, there's been some discussion of having a SExpressions parser as a stdlib to support testing of the julia compiler lowering pass. See https://github.com/JuliaLang/julia/pull/32201 and https://github.com/TotalVerb/SExpressions.jl/issues/3#issuecomment-500648914

Personally I'm somewhat biased toward scheme rather than clojure syntax for quoting etc but I imagine we should be able to support both from the same parser.

oubiwann commented 5 years ago

Thanks again, @MasonProtter: I've pushed the changes you suggested.

swadey commented 5 years ago

Given all of the comments, it might be better to refactor the s-expression parser at some point. For now, I'm going to merge this. Eventually moving out some of the functionality into submodules as Mason suggests would be good.