Questions tagged [jvm-languages]

Languages that compile their source code to the byte code of the java virtual machine are commonly called JVM languages. A common feature of those languages is that the Java APIs can be used more or less seamlessly.

The following list could be completed over time.

Important JVM languages:

  1. Java (object oriented)
  2. Scala (object oriented/functional)
  3. Clojure (Lisp-y)
  4. Groovy (OO scripting)

Implementations of popular languages for the JVM:

  1. Python
  2. Ruby

Recent/upcoming languages:

  1. Kotlin (object oriented, ...)
  2. Ceylon (object oriented, ...)
  3. Frege (pure functional, like Haskell 2010)
150 questions
1
vote
1 answer

How do I retrieve Kotlin jsr223 script engine from ScriptEngineManager?

I'm trying to write an interface (GUI) to run some Kotlin scripts. I'm starting with just a Junit test to ensure that I can execute a script. I can't even load the kotlin engine. It seems like my dependencies (gradle) are in order, but you can…
Travis Well
  • 947
  • 10
  • 32
1
vote
2 answers

map reduce complexity

Lets suppose that i have this input: a list of list (def list-of-list-3 (list (list 1 2 3) (list 4 5 6) (list 7 8 9)) ) (map #(reduce * %1) list-of-list3 ) The map-reduce has a O(n^2) complexity in this case? is map-reduce translated as two…
CHAPa
  • 667
  • 8
  • 24
1
vote
2 answers

Is Clojure installable this way?

I downloaded Clojure 1.2 https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip , extracted it under /Library directory, created CLOJURE_HOME, added $CLOJURE_HOME/script to my $PATH. When I'm trying to run clj or repl scripts that are…
Chiron
  • 20,081
  • 17
  • 81
  • 133
1
vote
3 answers

Connecting to a remote instance of Clojure

I read that is possible to connect to a remote, production instance of Clojure via the REPL. Would you please explain this to me? and how to do it? What "instance of Clojure" means?
Chiron
  • 20,081
  • 17
  • 81
  • 133
1
vote
1 answer

When Object Class is added as a super class?

I was going through the Object class JAVA-docs and as we know Object is base class of all classes. But i was wondering, When Object class is added as super class? Is it compile time or runtime(believe ideally it should be at compile time)? Also as…
Harish
  • 269
  • 1
  • 9
1
vote
5 answers

Which JVM languages are interpreted rather than compiled to bytecode?

The wikipedia article on JVM languages states: Some of these languages are interpreted by a Java program, and some are compiled to Java bytecode... Which well-known, general purpose JVM languages are interpreted by a Java program?
Robert Campbell
  • 6,848
  • 12
  • 63
  • 93
1
vote
1 answer

Wrong number of args (2) passed to: core/first

I am new to Clojure and I have having some issues with iterating data. The code I have written is below : (defn save-monthly-targets "Parse Monthly Targets Data and Save" [monthlyTargets] (println "Save Monthly " monthlyTargets) (if (first…
Tanmay
  • 85
  • 2
  • 9
1
vote
2 answers

Investment figures for the Java platform

Are there any market research figures available calculating aggregate investment (worldwide, by region, by country) in the Java platform? This could include software (application servers, IDEs, profiling tools), hardware (Sun servers, bytecode…
Robert Campbell
  • 6,848
  • 12
  • 63
  • 93
1
vote
2 answers

Kotlin: Avoid creating FqNameUnsafe and FqName

I noticed that my application creates massive amounts of FqNameUnsafe and FqName instances. When are these created? How can I avoid creation of these? (I need to reduce garbage creation in my application.)
Jire
  • 9,680
  • 14
  • 52
  • 87
1
vote
2 answers

Failing to link standard library in OCaml-Java

I need to convert a simple OCaml file into JAR file so that I can run atop JVM platform. This OCaml file needs to use the Big_int module. There is this line of code open Big_int But it always returns me this line of error Error: Reference to…
Erencie
  • 391
  • 2
  • 3
  • 12
1
vote
2 answers

SWIG and Javascript: does embedding the JVM/Rhino into my C++ app is still the only solution?

I really like the idea of automatic binding generation like SWIG does. But it is still lacking Javascript binding. I read that it could not be done with Spidermonkey because of the JS Context that must be passed as parameter to each function. The…
Gabriel Cuvillier
  • 3,617
  • 1
  • 28
  • 35
1
vote
2 answers

Code Generation with JVM in C++

I'm trying to scan and parse my toy language with Flex and Bison which is in C++. I wonder if there is any resources explaining how to generate JVM bytecode from AST in C++. Many thanks!
Tian Jin
  • 279
  • 1
  • 3
  • 9
1
vote
4 answers

Object creation syntax in Java

Regarding syntax for object creation using new keyword. I know that syntax to create an object is: Foo ref = new Foo(); Do java language in itself provide some mechanism that can create object other than standard syntax as mentioned above? I have…
Moby
  • 29
  • 1
  • 3
1
vote
1 answer

Opening JSON file in JRuby throws exception when evoking the Java class files generated

I use jrubyc to compile Ruby into class files. One of the Ruby files contains dat = File.open "data.json", "r" And there's a "data.json" file alongside. This program runs well if I directly use the jruby command. After I compiled the Ruby files and…
Erencie
  • 391
  • 2
  • 3
  • 12
1
vote
1 answer

How can I break down ${Installer:sys.languageId} into language_country_variant?

Basically, I want to put the below logic into an install4j file. It will be used to set the vmoptions in an application. The logic seems to work fine in a test class, but getting it in the correct place and in the correct format within the…
Lambda
  • 151
  • 1
  • 10