Glimmer DSL for GTK Tetris + Cairo Tutorial Inspired by Mohit Sindhwani

Glimmer DSL for GTK Tetris + Cairo Tutorial Inspired by Mohit Sindhwani's
Blog Post:

Glimmer DSL for GTK is now a thing! Yes, you can finally write GTK
applications directly with Glimmer's awesome declarative DSL syntax:

Furthermore, declarative Cairo drawing support has just been added,
including GUI reimplementations of the RCairo samples mentioned in Mohit
Sindhwani's blog post "Cairo with Ruby - Samples using RCairo" (
Cairo with Ruby - Samples using RCairo)

Last but not least, someone requested a Tetris sample written with Glimmer
DSL for GTK (Tetris variant in glimmer-dsl-gtk? · Issue #2 · AndyObtiva/glimmer-dsl-gtk · GitHub). It
also got delivered:

Mohit, thank you for writing such a great introductory RCairo tutorial. My
tutorial takes it further by showing software engineers how to build those
same Cairo graphics into a desktop GUI application (as opposed to just
plain images).

Mohit, I look forward to hearing your thoughts about my Cairo tutorial for
Glimmer DSL for GTK, and if you are so kind, maybe even blog about it and
about Glimmer in general (like
GitHub - AndyObtiva/glimmer-dsl-libui: Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works) and
GitHub - AndyObtiva/glimmer-dsl-swt: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework))

Cheers!

···

--
Andy Maleh

LinkedIn: https://www.linkedin.com/in/andymaleh
<https://www.linkedin.com/in/andymaleh>
Blog: http://andymaleh.blogspot.com
GitHub: http://www.github.com/AndyObtiva

Andy,

Do we need to install jruby to work with glimmer or would the regular ruby
be enough?

saji

···

On Mon, Jan 31, 2022 at 7:28 AM Andy Maleh <andy.am@gmail.com> wrote:

Glimmer DSL for GTK Tetris + Cairo Tutorial Inspired by Mohit Sindhwani's
Blog Post:

Code Master Blog: Glimmer DSL for GTK Tetris + Cairo Tutorial

Glimmer DSL for GTK is now a thing! Yes, you can finally write GTK
applications directly with Glimmer's awesome declarative DSL syntax:
GitHub - AndyObtiva/glimmer-dsl-gtk: Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library

Furthermore, declarative Cairo drawing support has just been added,
including GUI reimplementations of the RCairo samples mentioned in Mohit
Sindhwani's blog post "Cairo with Ruby - Samples using RCairo" (
Cairo with Ruby - Samples using RCairo)

Last but not least, someone requested a Tetris sample written with Glimmer
DSL for GTK (https://github.com/AndyObtiva/glimmer-dsl-gtk/issues/2). It
also got delivered:

https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-gtk/master/screenshots/glimmer-dsl-gtk-linux-tetris.png

Mohit, thank you for writing such a great introductory RCairo tutorial. My
tutorial takes it further by showing software engineers how to build those
same Cairo graphics into a desktop GUI application (as opposed to just
plain images).

Mohit, I look forward to hearing your thoughts about my Cairo tutorial for
Glimmer DSL for GTK, and if you are so kind, maybe even blog about it and
about Glimmer in general (like
GitHub - AndyObtiva/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. and
GitHub - AndyObtiva/glimmer-dsl-swt: Glimmer DSL for SWT (JRuby Desktop Development Cross-Platform Native GUI Framework) - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer!)

Cheers!

--
Andy Maleh

LinkedIn: Andy Maleh | LinkedIn
<https://www.linkedin.com/in/andymaleh&gt;
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

For the GTK version, MRI is more than enough. Only SWT version needs JRuby.

···

On 1/31/22 07:03, Saji Hameed wrote:

Andy,

Do we need to install jruby to work with glimmer or would the regular ruby be enough?

saji

Great! Thanks..

saji

···

On Mon, Jan 31, 2022 at 7:39 PM hmdne <hmdne@airmail.cc> wrote:

For the GTK version, MRI is more than enough. Only SWT version needs JRuby.

On 1/31/22 07:03, Saji Hameed wrote:
> Andy,
>
> Do we need to install jruby to work with glimmer or would the regular
> ruby be enough?
>
> saji
>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

Hi Andy,

Thanks!

Glimmer DSL for GTK Tetris + Cairo Tutorial Inspired by Mohit Sindhwani's Blog Post:
Code Master Blog: Glimmer DSL for GTK Tetris + Cairo Tutorial

Glimmer DSL for GTK is now a thing! Yes, you can finally write GTK applications directly with Glimmer's awesome declarative DSL syntax: GitHub - AndyObtiva/glimmer-dsl-gtk: Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library

Furthermore, declarative Cairo drawing support has just been added, including GUI reimplementations of the RCairo samples mentioned in Mohit Sindhwani's blog post "Cairo with Ruby - Samples using RCairo" (Cairo with Ruby - Samples using RCairo)

This is very interesting. I need to try it myself to see how it feels to use it, but a quick glance reminds me of Canvas in HTML5.

Mohit, thank you for writing such a great introductory RCairo tutorial. My tutorial takes it further by showing software engineers how to build those same Cairo graphics into a desktop GUI application (as opposed to just plain images).

For full disclosure, I didn't write the tutorial - I ported the samples code gets moved into Ruby code (and an additional post on what I learned - Cairo with Ruby - Converting code from Cairo to RCairo in doing that)

Mohit, I look forward to hearing your thoughts about my Cairo tutorial for Glimmer DSL for GTK, and if you are so kind, maybe even blog about it and about Glimmer in general (like GitHub - AndyObtiva/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. and GitHub - AndyObtiva/glimmer-dsl-swt: Glimmer DSL for SWT (JRuby Desktop Development Cross-Platform Native GUI Framework) - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer!)

I do want to use Glimmer because I want to create GUIs from JRuby for some of the stuff I'm working on. I'm guessing that the Cairo DSL works with MRI only and not Jruby (native extension).

When I do get around to using Glimmer, I will definitely write about it... it's part of my plan to write about JRuby, esp bits that are unique to JRuby vs CRuby.
- Creating/ Packaging a JAR: you commented on this also [done]
- Accessing Java code from Ruby code running JRuby [done]
- Creating distributable Ruby environments & binaries with JRuby [in progress]
- GUIs with JRuby (using Glimmer) [in the future]

Best Regards,
Mohit.
2022-2-2 | 12:28 am.

···

On 2022-1-31 6:27 am, Andy Maleh wrote:
from: Cairo samples with notes on how the C

Mohit, thank you for the response.

I do want to use Glimmer because I want to create GUIs from JRuby for some of the stuff I'm working on.
I'm guessing that the Cairo DSL works with MRI only and not Jruby (native extension).

Glimmer DSL for SWT, which runs in JRuby, does have an equivalent of
Cairo called the Canvas Shape DSL
(https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-shape-dsl).
SWT uses GTK on Linux, so the Canvas Shape DSL leverages Cairo on
Linux behind the scenes.

Creating/ Packaging a JAR: you commented on this also [done]

Yes, I commented to mention that Glimmer DSL for SWT provides
application native executable packaging in JRuby into Mac APP/DMG/PKG,
Windows MSI/EXE, and Linux DEB/RPM files:

Cheers and I look forward to reading your future blog posts!

···

On Tue, Feb 1, 2022 at 11:29 AM Mohit Sindhwani <mo_mail@onghu.com> wrote:

Hi Andy,

Thanks!

On 2022-1-31 6:27 am, Andy Maleh wrote:
> Glimmer DSL for GTK Tetris + Cairo Tutorial Inspired by Mohit
> Sindhwani's Blog Post:
> Code Master Blog: Glimmer DSL for GTK Tetris + Cairo Tutorial
>
> Glimmer DSL for GTK is now a thing! Yes, you can finally write GTK
> applications directly with Glimmer's awesome declarative DSL syntax:
> GitHub - AndyObtiva/glimmer-dsl-gtk: Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library
>
> Furthermore, declarative Cairo drawing support has just been added,
> including GUI reimplementations of the RCairo samples mentioned in
> Mohit Sindhwani's blog post "Cairo with Ruby - Samples using RCairo"
> (Cairo with Ruby - Samples using RCairo)

This is very interesting. I need to try it myself to see how it feels to
use it, but a quick glance reminds me of Canvas in HTML5.

> Mohit, thank you for writing such a great introductory RCairo
> tutorial. My tutorial takes it further by showing software engineers
> how to build those same Cairo graphics into a desktop GUI application
> (as opposed to just plain images).

For full disclosure, I didn't write the tutorial - I ported the samples
from: https://www.cairographics.org/samples/ with notes on how the C
code gets moved into Ruby code (and an additional post on what I learned
- Cairo with Ruby - Converting code from Cairo to RCairo in doing that)

> Mohit, I look forward to hearing your thoughts about my Cairo tutorial
> for Glimmer DSL for GTK, and if you are so kind, maybe even blog about
> it and about Glimmer in general (like
> GitHub - AndyObtiva/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. and
> GitHub - AndyObtiva/glimmer-dsl-swt: Glimmer DSL for SWT (JRuby Desktop Development Cross-Platform Native GUI Framework) - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer!)
I do want to use Glimmer because I want to create GUIs from JRuby for
some of the stuff I'm working on. I'm guessing that the Cairo DSL works
with MRI only and not Jruby (native extension).

When I do get around to using Glimmer, I will definitely write about
it... it's part of my plan to write about JRuby, esp bits that are
unique to JRuby vs CRuby.
- Creating/ Packaging a JAR: you commented on this also [done]
- Accessing Java code from Ruby code running JRuby [done]
- Creating distributable Ruby environments & binaries with JRuby [in
progress]
- GUIs with JRuby (using Glimmer) [in the future]

Best Regards,
Mohit.
2022-2-2 | 12:28 am.

--
Andy Maleh

LinkedIn: Andy Maleh | LinkedIn
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub