DEV Community

Cover image for Befunge GUI by Glimmer (2 for 1: LibUI & SWT)
Andy Maleh
Andy Maleh

Posted on

2

Befunge GUI by Glimmer (2 for 1: LibUI & SWT)

In light of the recent Beta release of Glimmer DSL for LibUI, I have been looking for applications that could take advantage of its productivity and speed in building desktop GUI with its Ruby DSL. One such application has been Befunge98 GUI, built for a Ruby implementation of the Befunge98 programming language done by Victor Maslov (GitHub username: Nakilon).

According to Wikipedia, Befunge is a two-dimensional stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid. "Arrow" instructions direct the control flow to the left, right, up or down, and loops are constructed by sending the control flow in a cycle. It has been described as "a cross between Forth and Lemmings".

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.

Thanks to Glimmer's highly productive GUI DSLs, both implementations took me no more than a few hours. In fact, they both took 5 minutes for the initial simplest version that received Befunge input from GUI and rendered output to terminal. Afterwards, the simplest version was upgraded with bidirectional synchronization between the input grid and input multiline-entry/text field in addition to auto-saving/loading of the last program entered and a window-based output terminal or a read-only multiline-entry output control.

Befunge98 GUI (Glimmer DSL for LibUI)

screenshot 1 libui

Befunge98 GUI (Glimmer DSL for SWT)

screenshot 1 swt

screenshot 2 swt

Happy Glimmering!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay