Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replac[ing] flisp #35

Closed
PallHaraldsson opened this issue Aug 3, 2022 · 1 comment
Closed

Replac[ing] flisp #35

PallHaraldsson opened this issue Aug 3, 2022 · 1 comment

Comments

@PallHaraldsson
Copy link

PallHaraldsson commented Aug 3, 2022

Hi,

"Once mature, replace Julia's flisp-based reference frontend in Core" Can it be done already, despite imperfect parsing? I mean (and I could check) make a sysimage without it, and with JuliaSyntax.jl instead. Do you have such a sysimage?

"Differences from the flisp parser" (and your nice JuliaCon video, as I recall) implies that flisp is already fully bypassed, at runtime, i.e. flisp is just (still) sitting there, just unused.

I'm ok with a replacement not capable of parsing all code (just Base, so most code), and that's already good enough for most users.

I've been thinking about making a minimal sysimage (resurrecting JuliaLite), to help with julia startup, e.g. sacrificing LinearAlgebra, to help for (small) Julia (non-math) scripts.

I'm not sure where flisp resides, don't locate a lib for it. Do you know if it's part of libjulia.so.1.8 and/or sys.so? I know it's rather small, so opening it might not be speed-critical, and nor for small script it might not be too much an overhead to actual parse-time.

I'm a bit confused by your 4 sec. parse time claim in your video, is that for a huge script or some pathological? My understanding was that the parser isn't speed-critical (relative to other, e.g. optimization), but every bit helps. And it's relaive importance when you run with -O0 (often useful for scripts) or --compile=min

@c42f
Copy link
Member

c42f commented Aug 4, 2022

Do you have such a sysimage

Yes. But you need to build one for yourself if you want to use it. See the README for how to do this:

https://github.com/JuliaLang/JuliaSyntax.jl#using-juliasyntax-as-the-default-parser

flisp is just (still) sitting there, just unused

Yes that's partly correct - it's unused for parsing, but still used for lowering. So it can't be removed yet. I'm fairly sure that the flisp runtime is extremely light and removing it will mainly help with removing some code complexity and reducing the size of libjulia a little.

I'm a bit confused by your 4 sec. parse time claim in your video,

If it's the part I think you're referring to, this was for parsing all the files in Base. This was only for the purposes of benchmarking and demonstration, it's not latency the user normally experiences. In normal use that parsing only happens as part of building the sysimage.

Anyway, so we can't remove the flisp runtime from libjulia in the foreseeable future (rewriting lowering is a big job!) so I'll close this for now. Feel free to ask further questions, though!

@c42f c42f closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants