JRuby
glimmer-dsl-swt
JRuby | glimmer-dsl-swt | |
---|---|---|
24 | 24 | |
3,746 | 98 | |
0.0% | - | |
9.9 | 6.3 | |
about 5 hours ago | 18 days ago | |
Ruby | Ruby | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
JRuby
-
Shoes makes building little graphical programs for Mac, Windows, Linux simple
As someone who has looked at Shoes several times but never dove in, it's confusing how Shoes 4 has been the "preview version" of Shoes for, like, a decade or more. It made me actively avoid getting invested in Shoes 3 (the release promoted on the linked website) because Shoes 4 requires JRuby and I am happy with CRuby (the Ruby interpreter most people think of when they hear "Ruby").
https://github.com/shoes/shoes4/
http://www.rubydoc.info/github/shoes/shoes4
No disrespect to the developers but to me it feels like taking over a GUI toolkit created "to teach programming to everyone" (to quote the Shoes 4 readme) and making it depend upon a super-complicated enterprise-focused Ruby was sort of Missing The Point™ in a huge way.
Heck I couldn't even switch to JRuby if I wanted to because I <3 Ractors and JRuby still lacks CRuby 3.0 feature parity: https://github.com/jruby/jruby/issues/7459
-
JRuby 9.4.2.0 released with many fixes and improvements
__callee__ now properly returns the name under which a method was called, which will be the new name in the case of aliased methods. #2305, #7702
-
JRuby 9.4.0.0 Released, now supporting Ruby 3.1 and Rails 7
Issue tracker: https://github.com/jruby/jruby/issues
-
JRuby 9.3.9.0 Released with stdlib CVE fixes
rdoc has been updated to 6.3.3 to fix all known CVEs. (#7396, #7404)
-
JRuby 9.3.8.0 Released - with support for lightweight fibers!
Altering the visibility of an included module method no longer changes what super method gets called. (#7240, #7343, #7344, #7356)
-
Golang in the JVM
It looks like the readme is copy pasta from jruby: https://github.com/jruby/jruby
-
JRuby 9.3.4.0 released
Homepage: https://www.jruby.org/
- JRuby 9.4 will support Ruby 3.0 and we need your help!
-
Communication Counts – Leading a New Generation of Developers with Chris Mar
Chris: Yeah, that's exactly right. So I was working at Sun at the time. I remember the JRuby guys. I saw them speak at one of the Java conferences, and they came to work for Sun. Just listening to them talk about JRuby...and then a lot of it was obviously about Ruby on Rails at the time. And I was like, wow, this was just mind-blowing the way they talked about it.
-
Befunge GUI by Glimmer (2 for 1: LibUI & SWT)
In fact, I built its GUI twice with two different approaches, one using the up and coming Glimmer DSL for LibUI on CRuby relying on a multi-canvas-grid (LibUI area) approach, and one using the very mature Glimmer DSL for SWT on JRuby by relying on a button-grid approach.
glimmer-dsl-swt
-
Glimmer DSL for SWT Table Cell Data-Binding of Background/Foreground/Font/Image
Well, I am happy to announce that the same single line of code that data-binds a table does even more now as of the latest release made yesterday! In Glimmer DSL for SWT v4.24.3.0, that line of code also data-binds the following additional table cell properties without any change to the view code:
-
_why's Estate
There are various limitations, no doubt. I don't mean to imply otherwise. And I am not sure if it is equivalent to shoes (though glimmer-swt may be equivalent, check it out here: https://github.com/AndyObtiva/glimmer-dsl-swt although it also uses java so it's not identical to shoes either).
-
Glimmer DSL for SWT v4.24.1.0 Improved Hello, Canvas Path!
# From: https://github.com/AndyObtiva/glimmer-dsl-swt/blob/development/docs/reference/GLIMMER_SAMPLES.md#hello-canvas-path require 'glimmer-dsl-swt' class HelloCanvasPath include Glimmer::UI::Application after_body do regenerate end body { shell { grid_layout { margin_width 0 margin_height 0 margin_top 5 } text 'Hello, Canvas Path!' minimum_size 800, 700 @button = button { layout_data :center, :center, true, false text 'Regenerate' enabled false on_widget_selected do regenerate end } canvas { layout_data :fill, :fill, true, true background :white text('line', 15, 200) { foreground :red } @path1 = path { antialias :on foreground :red } text('quad', 15, 300) { foreground :dark_green } @path2 = path { antialias :on foreground :dark_green } text('cubic', 15, 400) { foreground :blue } @path3 = path { antialias :on foreground :blue } } on_widget_disposed do # safe to kill thread as data is in memory only, so no risk of data loss @thread.kill end } } def regenerate @thread = Thread.new do @button.enabled = false @path1.clear @path2.clear @path3.clear y1 = y2 = y3 = 300 700.times.each do |x| x += 55 x1 = x - 2 x2 = x - 1 x3 = x y1 = y3 y2 = y1 y3 = [[y3 + (rand*24 - 12), 0].max, 700].min @path1.content { line(x1, y1 - 100) } if x % 2 == 0 @path2.content { quad(x1, y1, x2, y2) } end if x % 3 == 0 @path3.content { cubic(x1, y1 + 100, x2, y2 + 100, x3, y3 + 100) } end sleep(0.01) end @button.enabled = true end end end HelloCanvasPath.launch
- Why Ruby is More Readable than Python
-
Glimmer DSL for SWT Hello, Canvas Data-Binding! (+ Quads & Cubics)
Glimmer DSL for SWT v4.24.0.2 has been released with the following changes:
-
Using ActiveRecord with SQLite DB in a JRuby Desktop App
SQLite is the simplest relational database to use from JRuby desktop applications, it is built-in on all platforms (Mac, Windows, and Linux), and it can be utilized conveniently via ActiveRecord, the Rails object-relational mapping library following the Active Record Enterprise Application Architecture Pattern. In fact, I have used it a few years ago to build Are We There Yet?, a small project management app, using Glimmer DSL for SWT and bidirectional data-binding. In this blog post tutorial, I cover how to configure a SQLite database and connect to it using ActiveRecord from within a Ruby desktop application, data-binding the ActiveRecord Model to the GUI View bidirectionally.
-
2021 Was The Year of The Ruby Desktop!!!
Native Executable Packaging for CRuby (Glimmer in JRuby already has Native Executable Packaging support for building Mac APP/DMG/PKG files, Windows EXE/MSI files, and Linux DEB/RPM files)
-
Glimmer Metronome - Tap-based Tempo & Up/Down Beat Toggling
Happy Glimmering!
- Quarto Game, Custom Shapes, and Canvas Shape DSL Tutorial
-
Glimmer DSL for SWT File Drag and Drop
# From: https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_SAMPLES.md#hello-drag-and-drop require 'glimmer-dsl-swt' class Location attr_accessor :country def country_options %w[USA Canada Mexico Columbia UK Australia Germany Italy Spain] end end @location = Location.new include Glimmer shell { text 'Hello, Drag and Drop!' tab_folder { tab_item { fill_layout text 'List' list { selection <=> [@location, :country] # Option 1: Automatic Drag Data Setting drag_source true # Option 2: Manual Drag Data Setting # on_drag_set_data do |event| # drag_widget = event.widget.control # event.data = drag_widget.selection.first # end # Option 3: Full Customization of Drag Source (details at: https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html) # drag_source(:drop_copy) { # options: :drop_copy, :drop_link, :drop_move, :drop_target_move # transfer :text # options: :text, :file, :rtf # # on_drag_start do |event| # drag_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting cursor via symbol # drag_widget.cursor = :wait # end # # on_drag_set_data do |event| # drag_widget = event.widget.control # event.data = drag_widget.selection.first # end # # on_drag_finished do |event| # drag_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting cursor via symbol # drag_widget.cursor = :arrow # end # } } list { # Option 1: Automatic Drop Data Consumption drop_target true # drop_target :unique # setting drop_target to :unique makes the list not add the same data twice # Option 2: Manual Drop Data Consumption # on_drop do |event| # drop_widget = event.widget.control # drop_widget.add(event.data) # drop_widget.select(drop_widget.items.count - 1) # end # Option 3: Full Customization of Drop Target (details at: https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html) # drop_target(:drop_copy) { # options: :drop_copy, :drop_link, :drop_move, :drop_target_move # transfer :text # options: :text, :file, :rtf # # on_drag_enter do |event| # ### event.detail = DND::DROP_NONE # To reject a drop, you can set event.detail to DND::DROP_NONE # drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background via symbol # drop_widget.background = :red # end # # on_drag_leave do |event| # drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background via symbol # drop_widget.background = :white # end # # on_drop do |event| # drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background/cursor via symbol # drop_widget.background = :white # drop_widget.add(event.data) # drop_widget.select(drop_widget.items.count - 1) # drop_widget.cursor = :arrow # end # } } } tab_item { grid_layout 2, true text 'Label' label { layout_data { horizontal_span 2 } text 'Drag text from any label and drop it unto another label' } { Argentina: :green, Brazil: :red, Finland: :yellow, Sweden: :magenta, Denmark: :gray, Iceland: :cyan }.each do |country, color| label { layout_data :fill, :fill, true, true text country font height: 20 background color drag_source true drop_target true } end } tab_item { grid_layout 2, true text 'Text' label { text 'Drag' } label { text 'Drop To Insert' } text { layout_data :fill, :center, true, false text 'Text1' drag_source true } text { layout_data :fill, :center, true, false text 'Drop To Insert' drop_target true } label { text 'Drag' } label { text 'Drop To Replace' } text { layout_data :fill, :center, true, false text 'Text2' drag_source true } text { layout_data :fill, :center, true, false text 'Drop To Replace' drop_target :replace } } tab_item { grid_layout 2, true text 'Spinner' label { text 'Drag' } label { text 'Drop To Insert' } spinner { layout_data :fill, :center, true, false selection 30 drag_source true } spinner { layout_data :fill, :center, true, false drop_target true } } tab_item { fill_layout text 'File' @drop_zone_label = label(:center, :wrap) { text 'Drop One File Or More Here' background :white rectangle { foreground :black line_width 4 line_style :dash } drop_target(:drop_copy) { transfer :file on_drag_enter do |event| drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background via symbol drop_widget.background = :yellow end on_drag_leave do |event| drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background via symbol drop_widget.background = :white end on_drop do |event| drop_widget = event.widget.control.data('proxy') # obtain Glimmer widget proxy since it permits nicer syntax for setting background/cursor via symbol drop_widget.background = :white @drop_zone_label.text = event.data.to_a.join("\n") end } } } } }.open
What are some alternatives?
truffleruby - A high performance implementation of the Ruby programming language, built on GraalVM.
Glimmer - DSL Framework consisting of a DSL Engine and a Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS
MRuby - Lightweight Ruby
glimmer-dsl-tk - Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)
Rubinius - The Rubinius Language Platform
glimmer-dsl-swing - Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library) - Enables development of desktop applications using Java Swing and Java 2D, including vector graphics and AWT geometry.
Opal - Ruby ♥︎ JavaScript
Shoes - Shoes 4 : the next version of Shoes
Reactrb
glimmer-dsl-libui - Glimmer DSL for LibUI - Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer! - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works on Mac, Windows, and Linux.
docker-jruby
Gladiator (Glimmer Editor) - Gladiator (short for Glimmer Editor) is a Glimmer DSL for SWT sample project under on-going development that demonstrates how to build a text editor in Ruby using Glimmer DSL for SWT (JRuby Desktop Development GUI Library). It is not intended to be a full-fledged editor by any means, yet mostly a fun educational exercise in using Glimmer. Gladiator is also a personal tool for shaping an editor exactly the way I like, with all the keyboard shortcuts I prefer. I leave building truly professional text editors to software tooling experts who would hopefully use Glimmer one day. Otherwise, I have been happily using Gladiator to develop all my open-source projects since May of 2020.