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

Installation instructions are needed #1

Open
zraffer opened this issue Dec 20, 2014 · 8 comments
Open

Installation instructions are needed #1

zraffer opened this issue Dec 20, 2014 · 8 comments

Comments

@zraffer
Copy link

zraffer commented Dec 20, 2014

Currently there are no explanation how to attach this backend to Idris (neither in README nor in the wiki).
I'd like to try it, but have no clue how to do it.
Should I compile it before Idris? Or after Idris? Should I use any flags for compiling?

Thank you in advance.

@soimort
Copy link

soimort commented Jan 3, 2015

Basically here's how the Java backend works:

  1. Install Idris first.
  2. Install Idris-java via cabal install (quite the standard way of doing it)
  3. Compile a simple program (you'll need the .ibc file before Java code generation)
$ idris --check hello.idr
$ idris-java -o hello hello.ibc
$ ./hello

hello is a self-contained executable (with compiled Java bytecode)

This repository, indeed, needs some more documentation to help people getting started...

@zraffer
Copy link
Author

zraffer commented Jan 3, 2015

@soimort Thank you, your solution is working.

@Melvar
Copy link

Melvar commented Jan 3, 2015

The more usual is to use idris --codegen java hello.ibc -o hello, instructing idris to invoke idris-java itself.

@jfdm
Copy link

jfdm commented Jan 3, 2015

The Idris wiki has horrendously out of date information for working with the different backend. Maybe it is a good idea for someone to update with moew current information, and to duplicate instructions for java here...

@JanBessai
Copy link

Right now I'm not sure, the back-end even works. Edwin did the refactoring without giving much thought to it and I didn't have the time yet, to fix/update it. I suspect that it is also terribly out of date with respect to the features of the newest Idris versions.

@ivanperez-keera
Copy link

I just tried it with a fibonacci function and it worked. I haven't tried anything else.

How can one obtain the generated maven project and java source instead of the resulting executable?

All I can do with the result as is is a) run it as an executable file, in which case the fact that it's java is mostly irrelevant, or b) unpack it, getting a bunch of compiled classes and MANIFESTs.

Is the resulting executable file a valid JAR file? I can see that java can run it, and that unzip can unpack it, but is it going to work on other platforms?

@bgaster
Copy link
Contributor

bgaster commented Sep 25, 2015

I've added instructions on how to install. There are also basic instructions on how to use the JAVA_IO monad. I'm working on a short tutorial but I see this as separate. Unless someone objects I'll close this soon.

@zraffer
Copy link
Author

zraffer commented Sep 26, 2015

Great! Thank you!

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

7 participants