Fork me on GitHub

So, years ago I made a project as a joke. But then, a friend started to work with Ruby and was missing Clojure libs. So I decided to see how far the two languages can co-exist: presenting Clojuby: It's quite alpha, quite new, and probably will change the API, but it kinda works (even with Rails)! Your app needs to run on JRuby, but other than that almost everything you can do in Ruby is supported!

🚀 5
💎 1
🌹 1
🤯 2

I also made a test playground for Rails here, querying things from ActiveRecord and rendering with hiccup (oh my!):

Carsten Behring07:10:32

When it becomes more stable, maybe we can add it here: PRs welcome


Fun fact, has been using JRuby since 2016 to run the Kramdown markdown parser

👀 2

@U7CAHM72M sure! To be honest, I'm not sure where to go with this library (I mean, originally it was supposed to be a joke, so it's already way past what I originally intended 😄). I talked with some people that miss some Clojure killer libs like Malli, Pathom, Clara-Rules, Datalog dbs, etc and it seems that a good fit would be to slowly replace a Rails app running at JRuby with fragments in Clojure (you can hook into some controllers and add make it respond to a Clojure code instead, Ruby being as dynamic as it is) so that's one of the possibilities. It's still quite lacking on interop (you have to use rb/send or rb/eval to evaluate things) and some patterns still don't work well (for example, Rails' params don't map to Clojure maps) but it's a start!

Jakub Holý (HolyJak)12:10:45

defdecorator (wrappers) for Java interfaces. Example output (elided):

(binding [*print-meta* true] (prn (macroexpand-1 '(defdecorator WrappedConnection java.sql.Connection))))
; =>
  (deftype WrappedConnection [^java.sql.Connection target]
    (abort [_ arg0] (. target abort arg0))
    (beginRequest [_] (. target beginRequest))
    ;; the following are type hinted due to overloaded arities:
    (^java.sql.PreparedStatement prepareStatement [_ ^java.lang.String arg0 ^int arg1] (. target prepareStatement arg0 arg1))
    (^java.sql.PreparedStatement prepareStatement [_ ^java.lang.String arg0 ^ints arg1] (. target prepareStatement arg0 arg1))
    (^java.sql.PreparedStatement prepareStatement [_ ^java.lang.String arg0 ^\"[Ljava.lang.String;\" arg1] (. target prepareStatement arg0 arg1))
    (isWrapperFor [_ arg0] (. target isWrapperFor arg0))
    (unwrap [_ arg0] (. target unwrap arg0)))

🙂 4
catjam 1
😎 2

I’ve just released of the poly tool. The highlights are: • A new user friendly shell command with support for history and auto-complete. • The poly tool documentation is improved and has moved to • We have switched to, thanks to @seancorfield’s excellent PR.

polylith 21
🎉 10
clojure-spin 8
💯 4