Andy Nutter-Upham, I just realized I didn't answer this exact question by
you in full details (I read the original message on the phone while being
quite busy with something a couple of weeks ago, and I somehow missed some
of intricacies of your question):
"If I missed the documentation and someone knows where it is, I'd love to
read it. I think though that since this is a wrapper library there is
instead reference to the underlying documentation (whose method names are a
bit different, and whose arguments are a bit different) and I find that
translation very challenging; especially since glimmer-dsl-libui is not yet
complete, so your run into ineffective keywords if you rely on the
underlying glimmer docs."
Glimmer DSL for LibUI actually does have full documentation for the Ruby
API:
https://github.com/AndyObtiva/glimmer-dsl-libui#supported-keywords
Someone asked me to add the documentation early on when the project was
new, and I added it to that person's satisfaction. I hope it's helpful to
you too.
By the way, I also do mention under the "Original API" section that you
could use the LibUI Go documentation as a reference:
https://pkg.go.dev/github.com/andlabs/ui
But, the most complete reference is the actual C headers:
https://github.com/andlabs/libui/blob/master/ui.h
And, the C headers are exposed as low-level FFI functions in Ruby as per
the Original API (but it's not recommended that you use these method
directly of course):
https://github.com/AndyObtiva/glimmer-dsl-libui#original-api
To give you an example of how the mapping from the C API to Ruby happens,
suppose we have this C function:
uiWindowSetTitle('My Application')
The word before the "Set" or "Get" operation is the control object (e.g.
window), and the word after it is the attribute (e.g. title).
So, the equivalent of that in the Glimmer GUI DSL:
window {
title 'My Application'
}
Basically, we are declaring a window control with one nested attribute of
title having the value 'My Application'
The C API is procedural and imperative whereas the Glimmer GUI DSL is
object-oriented and declarative, better mapping to the way we think of
concepts visually while looking at a screen given that you could nest
controls (widgets) within each other.
If you need further help, do not hesitate to ask further questions at the
Glimmer Gitter chat:
https://app.gitter.im/#/room/#AndyObtiva_glimmer:gitter.im
You shouldn't really get bogged down unless you are missing foundational
grounding in software engineering concepts relating to desktop development
in general, like MVC (Model View Controller). I've done GUI development
professionally in older technologies like Java Swing in the past, and by
comparison, Glimmer lets me leapfrog past productivity by 4x at least,
sometimes 10x or even more (and it's that much faster in productivity than
web development too, so it's great for building quick local apps or tools
that don't need the web as it's much simpler, demanding a tiny fraction of
web code only). But, it does assume you know MVC (Model View Controller)
very well, and it benefits from also knowing MVP (Model View Presenter).
Once you get the main ideas behind Glimmer, everything clicks, and things
like exact APIs or detailed documentation wouldn't matter much anymore
because the way you think with MVC/MVP is you start with the View layer
from a GUI mockup to support a specific user workflow, and you either use
native controls (like text and button, by looking them up in examples or
the docs mentioned above) or you invent your own custom controls (both
options are available in Glimmer DSL for LibUI). Of course, the native
controls are only as complete as what is implemented by the underlying
LibUI library. I know the authors of it are working on adding many new
features, like a Tree control, Table sorting listeners, and some other
missing features. They will all be added to Glimmer DSL for LibUI in due
time when they get released in C LibUI. But, that shouldn't stop someone
from learning the library and using whatever is available in it for now, or
at least mastering the current features until more features are added in
the future (especially given that you could always temporarily polyfill
missing features by building your own custom controls if really needed).
Cheers,
Andy Maleh
On Tue, Feb 14, 2023 at 9:27 PM grigoris charam <xargrigoris(a)gmail.com>
wrote:
> Stop reply all
>
> On Feb 15, 2023, at 03:05, Andy Maleh via ruby-talk <
> ruby-talk(a)ml.ruby-lang.org> wrote:
>
>
> The Glimmer Gitter Chat:
>
> https://app.gitter.im/#/room/#AndyObtiva_glimmer:gitter.im
>
> If you create any Glimmer related projects, libraries, or tools, you could
> alert of us of them in the Gitter Chat.
>
> And, you can open issues or pull requests on any of the Glimmer projects
> if needed:
> <glimmer.png>
> AndyObtiva/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 <https://github.com/AndyObtiva/glimmer>
> github.com <https://github.com/AndyObtiva/glimmer>
> <https://github.com/AndyObtiva/glimmer>
>
>
> Andy Maleh
>
>
> LinkedIn: https://www.linkedin.com/in/andymaleh
> <https://www.linkedin.com/in/andymaleh>
> Blog: https://andymaleh.blogspot.com
> GitHub: https://github.com/AndyObtiva
> Twitter: https://www.twitter.com/AndyObtiva
>
> On Feb 14, 2023, at 7:51 PM, Fellipe Fingoli via ruby-talk <
> ruby-talk(a)ml.ruby-lang.org> wrote:
>
>
> really good content! I want to help to develop this ecosystem. Does
> anybody know where I can reach the community?
>
> Em ter., 7 de fev. de 2023 às 18:29, Andy Maleh via ruby-talk <
> ruby-talk(a)ml.ruby-lang.org> escreveu:
>
>> My RubyConf 2022 talk video on "Building Native GUI Apps in Ruby" using
>> the Fukuoka Award Winning Glimmer DSL for LibUI has just been released!
>>
>> https://youtu.be/1Bh4CnJqHyY
>>
>> 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
>> Twitter: @AndyObtiva <https://twitter.com/AndyObtiva>
>>
>> ______________________________________________
>> ruby-talk mailing list -- ruby-talk(a)ml.ruby-lang.org
>> To unsubscribe send an email to ruby-talk-leave(a)ml.ruby-lang.org
>> ruby-talk info --
>> https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.or…
>
>
>
> --
> Fellipe Fingoli
> ______________________________________________
> ruby-talk mailing list -- ruby-talk(a)ml.ruby-lang.org
> To unsubscribe send an email to ruby-talk-leave(a)ml.ruby-lang.org
> ruby-talk info --
> https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.or…
>
> ______________________________________________
> ruby-talk mailing list -- ruby-talk(a)ml.ruby-lang.org
> To unsubscribe send an email to ruby-talk-leave(a)ml.ruby-lang.org
> ruby-talk info --
> https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.or…
>
>
--
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
Twitter: @AndyObtiva <https://twitter.com/AndyObtiva>
Here is a third release candidate of the wxRuby3 gem that should be the last
before the first stable 0.9.0 release.
wxRuby3 is a cross-platform GUI library for Ruby, based on the mature wxWidgets GUI
toolkit for C++. It uses native widgets wherever possible, providing the correct look,
feel and behavior to GUI applications on Windows, OS X and Linux/GTK. wxRuby aims to
provide a comprehensive solution to developing professional-standard desktop
applications in Ruby.
What's new:
- improved documentation
- more regression tests
- update INSTALL.md with clearer MacOS instructions and update README with note
about ARM64 M2 Chip being tested by @AndyObtiva
- improved Wx logging support
- various other improvements and fixes
If you are interested check this out:
Documentation: https://mcorino.github.io/wxRuby3/index.html
Github: https://github.com/mcorino/wxruby3
Rubygems: https://rubygems.org/gems/wxruby3
imap_processor version 1.8.1 has been released!
* home: <https://github.com/seattlerb/imap_processor>
* rdoc: <http://docs.seattlerb.org/imap_processor>
IMAPProcessor is a client for processing messages on an IMAP server. It
provides some basic mechanisms for connecting to an IMAP server, determining
capabilities and handling messages.
IMAPProcessor ships with several executables which can query and
manipulate IMAP mailboxes in several different ways:
imap_archive :: Archives old messages to a new dated mailbox.
imap_cleanse :: Delete messages older than a certain age in specified mailboxes.
imap_flag :: Flag messages to/from certain people.
imap_idle :: Shows new messages in a mailbox.
imap_keywords :: Queries an IMAP server for keywords set on messages
imap_learn :: Flags messages based on what you've flagged before.
imap_mkdir :: Ensures that certain mailboxes exist.
Changes:
### 1.8.1 / 2023-07-27
* 1 bug fix:
* Cleanse: Use Regexp.escape when searching mailboxen.
graphics version 1.1.0 has been released!
* home: <https://github.com/zenspider/graphics>
* rdoc: <http://docs.seattlerb.org/graphics>
Graphics provides a simple framework to implement games and/or
simulations and is designed to follow mathematical conventions, NOT
game programming conventions. Particularly it:
* Uses degrees.
* Draws in quadrant 1 (0-90 degrees).
* Right hand rule: 0 degrees is east, 90 is north, etc.
These allow simple things like Trigonometry functions to work as
expected. It means that all that stuff you were taught in grade school
still work as intended. This makes one less thing you have to adjust
when implementing your simulation.
Changes:
### 1.1.0 / 2023-07-26
* 3 minor enhancements:
* Added anti-aliasing to polygon. Want to add filling at some point.
* Requiring ruby 2.7+. Too many changes to ruby internals to try to maintain.
* polygon now takes an array of points.
* 4 bug fixes:
* Fixed a bunch of compiler warnings for ruby struct changes.
* Fixed font lookup on linux. (presidentbeef)
* Fixed graphics_setup.sh for obsolete build flag on sdl2_image. (NickSchimek)
* ruby 3.2: Fixed warning from ruby headers by explicitly removing alloc funcs.
minitest version 5.19.0 has been released!
* home: <https://github.com/minitest/minitest>
* bugs: <https://github.com/minitest/minitest/issues>
* rdoc: <https://docs.seattlerb.org/minitest>
* vim: <https://github.com/sunaku/vim-ruby-minitest>
* emacs: <https://github.com/arthurnn/minitest-emacs>
minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.
"I had a class with Jim Weirich on testing last week and we were
allowed to choose our testing frameworks. Kirk Haines and I were
paired up and we cracked open the code for a few test
frameworks...
I MUST say that minitest is *very* readable / understandable
compared to the 'other two' options we looked at. Nicely done and
thank you for helping us keep our mental sanity."
-- Wayne E. Seguin
minitest/test is a small and incredibly fast unit testing framework.
It provides a rich set of assertions to make your tests clean and
readable.
minitest/spec is a functionally complete spec engine. It hooks onto
minitest/test and seamlessly bridges test assertions over to spec
expectations.
minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner. Now you can assert that your newb
co-worker doesn't replace your linear algorithm with an exponential
one!
minitest/mock by Steven Baker, is a beautifully tiny mock (and stub)
object framework.
minitest/pride shows pride in testing and adds coloring to your test
output. I guess it is an example of how to write IO pipes too. :P
minitest/test is meant to have a clean implementation for language
implementors that need a minimal set of methods to bootstrap a working
test suite. For example, there is no magic involved for test-case
discovery.
"Again, I can't praise enough the idea of a testing/specing
framework that I can actually read in full in one sitting!"
-- Piotr Szotkowski
Comparing to rspec:
rspec is a testing DSL. minitest is ruby.
-- Adam Hawkins, "Bow Before MiniTest"
minitest doesn't reinvent anything that ruby already provides, like:
classes, modules, inheritance, methods. This means you only have to
learn ruby to use minitest and all of your regular OO practices like
extract-method refactorings still apply.
Changes:
### 5.19.0 / 2023-07-26
* 2 minor enhancements:
* Add metadata lazy accessor to Runnable / Result. (matteeyah)
* Only load minitest/unit (aka ancient MiniTest compatibility layer) if ENV["MT_COMPAT"]
* 1 bug fix:
* Minitest::TestTask enthusiastically added itself to default. (ParadoxV5)
zenweb version 3.10.7 has been released!
* home: <https://github.com/seattlerb/zenweb>
* bugs: <https://github.com/seattlerb/zenweb/issues>
* rdoc: <http://docs.seattlerb.org/zenweb>
Zenweb is a set of classes/tools for organizing and formating a
website. It is website oriented rather than webpage oriented, unlike
most rendering tools. It is content oriented, rather than style
oriented, unlike most rendering tools. It uses a rubygems plugin
system to provide a very flexible, and powerful system.
Zenweb 3 was inspired by jekyll. The filesystem layout is similar to
jekyll's layout, but zenweb isn't focused on blogs. It can do any sort
of website just fine.
Zenweb uses rake to handle dependencies. As a result, scanning a
website and regenerating incrementally is not just possible, it is
blazingly fast.
Changes:
### 3.10.7 / 2023-07-25
* 1 minor enhancement:
* Updated to use kramdown 2.x + kramdown-syntax-coderay + kramdown-parser-gfm.
The second release candidate of the wxRuby3 gem is here.
wxRuby3 is a cross-platform GUI library for Ruby, based on the mature wxWidgets GUI
toolkit for C++. It uses native widgets wherever possible, providing the correct look,
feel
and behavior to GUI applications on Windows, OS X and Linux/GTK. wxRuby aims to
provide a comprehensive solution to developing professional-standard desktop
applications in Ruby.
What's new:
- support added for the WXOSX port on MacOS!
- more tests
- improved documentation
- various (minor) fixes and additions
If you are interested check this out:
Documentation: https://mcorino.github.io/wxRuby3/index.html
Github: https://github.com/mcorino/wxruby3
Rubygems: https://rubygems.org/gems/wxruby3
flay version 2.13.1 has been released!
* home: <http://ruby.sadi.st/>
* code: <https://github.com/seattlerb/flay>
* rdoc: <http://docs.seattlerb.org/flay/>
Flay analyzes code for structural similarities. Differences in literal
values, variable, class, method names, whitespace, programming style,
braces vs do/end, etc are all ignored. Making this totally rad.
Changes:
### 2.13.1 / 2023-07-20
* 1 minor enhancement:
* Brought in action_view erubi hacks to enable block calls w/ <%= forms.
Hi Everyone,
I started on a series to learn by reversing a native Ruby gem. Part 4 is
now published! This does a deep dive into the makefile that you would
use during development and also how it can be made to work properly also
on Windows.
Part 4 -
https://notepad.onghu.com/2023/learning-by-reversing-s1-e4-native-gems/
The first 3 parts are also online on my blog:
* Part 1 - This covers the background to the gem we explore
Link:
https://notepad.onghu.com/2023/learning-by-reversing-s1-e1-native-gems/
* Part 2 - This goes into the details of how ruby loads the native gem
and extension (and includes a nice sequence diagram of how all the bits
happen together)
Link:
https://notepad.onghu.com/2023/learning-by-reversing-s1-e2-native-gems/
* Part 3 - How do we ensure that we have everything and that it actually
gets built at installation?
Link:
https://notepad.onghu.com/2023/learning-by-reversing-s1-e3-native-gems/
Future posts are planned to go into details like:
* The interface between Ruby and C
* Running the specs and the performance benchmark
* Enhancements:
- Providing an executable
- A gem that also works on JRuby
- Making the gem ractor friendly
- Patching an existing gem rather than a new module
Comments on the posts or the plans welcome. I'm @onghu on Twitter or
@onghu@ruby.social on Mastodon if you're on either.
Best regards,
Mohit.