SExpressions.jl icon indicating copy to clipboard operation
SExpressions.jl copied to clipboard

Roadmap

Open TotalVerb opened this issue 8 years ago • 8 comments

Meta

  • [x] Register the SExpressions.jl package

Dependencies

  • [ ] Sever FunctionalCollections dependency (use append from a lightweight vocabulary package)

Lisp Parser

  • [x] Parse . properly
  • [ ] Unquote splicing
  • [ ] Add a test suite to check Racket compliance
  • [ ] 50% compliance with Racket parsing rules
  • [ ] 70% compliance with Racket parsing rules
  • [ ] 80% compliance with Racket parsing rules
  • [ ] 90% compliance with Racket parsing rules
  • [ ] 95% compliance with Racket parsing rules
  • [x] Improve the performance of the lisp parser
  • [ ] Improve the error messages generated by the lisp parser
  • [ ] Keep more syntactic information in the lisp parser

Printing of s-expressions

  • [ ] Print improper lists reasonably
  • [ ] Improve performance of show (especially multiline)
  • [ ] Improve heuristics for multiline show

TotalVerb avatar Jan 24 '17 07:01 TotalVerb

I'm thinking of using I-Expressions for a project (i.e., adding indentation as an optional alternative to parentheses). Is that something that would be of interest as a feature in SExpressions.jl? (If so, I guess this is a “feature request,” but I could also volunteer some effort toward implementing the feature, if need be.)

mlhetland avatar Jul 15 '18 10:07 mlhetland

(I'd be fine with a subset of the I-Expression specification; for example, it might make sense to require DEDENTs to match some earlier level of indentation, as in, e.g., Python – but I guess one could issue a warning if this isn't the case.)

mlhetland avatar Jul 15 '18 10:07 mlhetland

@mlhetland I haven't had the time to maintain this package in some time, and don't know if I will have time in the future. So I'd recommend making a new package for what you need.

TotalVerb avatar Jul 15 '18 17:07 TotalVerb

What's the status of this package, it looks like it is still largely dormant? There's been some talk of having a stdlib for parsing S-Expressions as a utility for testing the julia lowering passes over at https://github.com/JuliaLang/julia/pull/32201.

I think SExpressions could be a starting point for those purposes; would you be happy if we took some code / inspiration from this repository and adapted it to the needs of a stdlib? I think a stdlib might strive to be even more lightweight than what you've got here but I do like what I've seen so far :-)

c42f avatar Jun 11 '19 01:06 c42f

Hi @c42f, sorry for the late response. I don't think I will necessarily have time to maintain this package in the future. Feel free to take any parts that are correct, lightweight, or helpful, if those parts do exist :smile:.

TotalVerb avatar Jun 17 '19 02:06 TotalVerb

Awesome, many thanks :-) I'm sure those parts do exist.

c42f avatar Jun 17 '19 06:06 c42f

I have some very lightweight S-expression functionality in Tody. The relevant file is here: expr.jl. Not saying it's a better alternative, but it's very lightweight and reasonably standalone :-). (I use the Call type there, which I define in the Tody.jl file, but it's a trivial wrapper around a vector.)

mlhetland avatar Jul 10 '19 18:07 mlhetland

Thanks, it looks neat.

It turns out that with a few tweaks to make it easier to enter arbitrary Expr heads, I was able to support the needs of Base using normal Julia ASTs. So I probably won't be pursuing a stdlib for this after all.

c42f avatar Jul 11 '19 00:07 c42f