Live data from Hacker News

Building Clojure Services at Scale

blog.josephwilk.net

1–10 of 22 posts

Re: Building Clojure Services at Scale

#3
This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

Re: Building Clojure Services at Scale

#4

This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

That's right, its really just a library. Also, Finagle already has an idiomatic Java API so using it from Clojure would not require use of any mangled names.

Re: Building Clojure Services at Scale

#5

This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

> MainGenericRunner will look at the file and determine if it's a script (.scala) or class file (.class). A class will be passed straight through to the JVM (+/- some classloader trickery) while the script is passed into the interpreter first. It is I think just a dispatcher.

Re: Building Clojure Services at Scale

#6

This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

im pretty sure he means the standard library, e.g. data structures. Sharing Scala and Clojure code means converting your data structures at the boundaries.

Re: Building Clojure Services at Scale

#8

This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

This is becoming more and more common for Scala projects that want to build libs in Scala and only export a Java interop API (as opposed to pure Java at the bottom and building Scala on top). E.g. https://github.com/apache/kafka/tree/0.8/core/src/main/scala...

Re: Building Clojure Services at Scale

#10

This is the first I've heard of the "Scala runtime". Isn't it compiled to bytecode and usable as a jar dropped in anywhere on the JVM possibly with some name mangling if you don't design your public interface to be pretty for java based projects?

im pretty sure he means the standard library, e.g. data structures. Sharing Scala and Clojure code means converting your data structures at the boundaries.

This is true for Java and Clojure as well. In Clojure you have to choose between using java data structures verbatim or else converting them to clojure ones.

See the scala docs for JavaConversions to see how to make scala collections look like java ones.

Post reply on HN