-
Notifications
You must be signed in to change notification settings - Fork 145
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
Embedding the Frege compiler #375
Comments
It looks like you're after frege-repl or frege-interpreter or both. |
Thanks, https://github.com/Frege/frege-interpreter/tree/master/frege-interpreter-java-support looks relevant to what I want. Do I need to read the source to figure out how to use it? |
This https://github.com/Frege/frege-interpreter/blob/master/frege-interpreter-core/src/test/java/frege/interpreter/scriptengine/FregeScriptEngineTest.java could give you an idea how to use the script interface at least. As I understand it, this should be quite standard-ish and alike no matter what scripting language is used. (But I never did such stuff myself.) |
I think the current JSR 223 API is explained here https://docs.oracle.com/javase/9/scripting/java-scripting-api.htm , but I'm not sure. per Wikipedia: Is this tied to java 1.8 or do I just bump the version? Thanks! |
The 1.8 is just an option for the javac compiler. It makes sure compiled Frege code can run with a jdk8. It is not so important in the REPL, where any JDK >= 1.8 would theoretically do, but 1.8 is the lowest common denominator, so to speak. |
I'm still interested in this but haven't had the spare cycles to pursue it. |
Hi, thanks for working on Frege it seems like a great project.
I would like to embed Frege in another application that supports a scripting interface (I don't want to use it just for "scripting" though.) so that I can get Haskell language support.
I searched everywhere I could and the only information I could find is at https://groups.google.com/forum/#!topic/frege-programming-language/hL0b1dVfgLc
I'm not very experienced with java and I didn't see any APIs that would clearly be what I want.
How can I go about embedding the Frege compiler jar in an application, call it/pass some source code files to it, and get something I can run out of it?
I imagine the overall steps would be something like the following:
Edit:
To clarify: I would like the capability to compile and run code at "runtime", and not just loading some precompiled code.
I saw mentions of a scripting API, but I'm not sure if that's appropriate for running "proper" programs?
The text was updated successfully, but these errors were encountered: