Git Product home page Git Product logo

Comments (8)

soimort avatar soimort commented on June 27, 2024

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...

from idris-java.

zraffer avatar zraffer commented on June 27, 2024

@soimort Thank you, your solution is working.

from idris-java.

Melvar avatar Melvar commented on June 27, 2024

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

from idris-java.

jfdm avatar jfdm commented on June 27, 2024

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...

from idris-java.

JanBessai avatar JanBessai commented on June 27, 2024

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.

from idris-java.

ivanperez-keera avatar ivanperez-keera commented on June 27, 2024

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?

from idris-java.

bgaster avatar bgaster commented on June 27, 2024

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.

from idris-java.

zraffer avatar zraffer commented on June 27, 2024

Great! Thank you!

from idris-java.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.