How many use Jruby?

Just curious, I use Jruby rules but since introduction I’ve not seen a bunch of folks asking question related to it’s use. Do you use Jruby? All though I had never used it before, I thought it was really easy to learn and liked it. If you use it, just chime in to give an idea of usage

1 Like

I recently migrated from DSL to JS. I realized all of JimT‘s posts where he provided jruby code for DSL or JS questions and was amazed how easy the code is when written in jruby.
The main reason to decide for JS was a non-technical reason. It was a pure emotional decision. As a non-developer but development-affine person I regarded it as a higher personal asset to have a better understanding of JS than jruby. That might be totally wrong for other specialists and there might be lots of arguments against it but for me personally that decision made sense.

1 Like

It’s a good choice in rule languages. The only reason I don’t use it is they were slower to support UI rules well compared to JS Scripting, which I’m also happy with. It’s also what Blockly “compiles” into so it makes it easier for me to help users there and contribute to pushing OH overall in directions friendly to new and less technical. There are some things I wish JS did better but over all I’m satisfied.

1 Like

It seems that @broconne, @ccutrer , and I are the only people using jruby. And now @Andrew_Rowe, but I know @pacive, @ktgeek and a few others also use it.

There’s hardly any mention of it here, hopefully in addition to the fact that fewer people are using it, also that there are fewer bugs, and it’s so intuitive to use that nobody has any questions :crazy_face:, and are just happily writing rules as needed :face_with_monocle:


I converted all my DSL when I migrated from OH2.5 to OH3 and use JS.
I am flat out getting that to work let alone using jruby :grinning:
I am now on OH4 and had to convert my JS again but it wasn’t too hard this time as there were only a few subtle changes and most of it worked anyway.
I only write code when I need to.
So far so good.

1 Like

Thanks to the hard work of those behind the scenes like yourself, its just works for me. (Although, I need to get up to OH4, but I’ve been busy.)

1 Like

I have started rewriting DSL rules to jruby. So far so good. I’m only missing good integration with vscode (like DSL has)

I am right now converting all my RuleDSL logic to JRuby. It‘s … fun. :crazy_face:
But my feeling says it‘s worth it as it allows reducing code complexity tremendously compares to RuleDSL.

1 Like

Yes, I know it. It’s a half measure. I switch a language mode between Ruby and modified OpenHab extension.

Oh I hadn’t thought about the language model. Do you need to see the item states often? I usually just have a terminal window at the bottom of my vscode and have it log into openhab’s karaf console. So when I want to know an item’s state, I’d just manually type status ItemName. Karaf even has tab autocompletion for commands and item names. I guess I’ve never really taken advantage of the openhab extension for vscode.

That was what I found most attractive about it compared to DSL which I spent quite a lot of time using.