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>
zenweb version 3.10.8 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.8 / 2023-08-30
* 1 bug fix:
* Fixed configuration of no_line_numbers for kramdown v2 changes
Hello,
Is () supposed to allow multiple statements in it? Documentation is not
explicit about it.
https://docs.ruby-lang.org/en/master/syntax/control_expressions_rdoc.html#l…
E.g.
puts((:ignore; :x)) # x
puts (:ignore; :x) # Otoh, raises an unexpected semicolon error
I'm looking at using () in a while loop's condition but please just
consider that as an extra info. I need an official answer on my query
above.
--
konsolebox
Mattias Velamsson recently shared a beginner's tutorial for making a GUI
(Graphical User Interface) in Ruby titled "Ruby GUI with Glimmer". It
provides a step-by-step code walkthrough that produces a full-fledged
web-API-driven table-based business application. It uses various gems and
APIs like glimmer-dsl-libui, dotenv, Net::HTTP, URI, JSON, and the
Exchange Rates Data API.
https://dev.to/smackdh/ruby-gui-with-glimmer-2fkh
Hi Everyone,
I started on a series to learn by reversing a simple native C Ruby gem.
Part 5 is now published! This does a deep dive on understanding how to
use the Ruby C API from a C file.It shows how the Ruby C API works & how
it accesses Ruby data, raises exceptions, checks function arguments and
so on.
Link to Part 5:
https://notepad.onghu.com/2023/learning-by-reversing-s1-e5-native-gems/
The first 4 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/
* Part 4 - Understanding the development Makefil
Link:
https://notepad.onghu.com/2023/learning-by-reversing-s1-e4-native-gems/
Future posts are planned to go into details like:
* Documenting the code
* 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.
"Every self respecting Senior Software Engineer out there should build
their own code editor, even if just as a toy app to later be discarded in
favor of another code editor (though they might grow to prefer their own).
And, if they are Rubyists, they should build their code editor in Ruby
(whether using MRI Ruby, JRuby or Opal Ruby). If you think of yourself as a
Ruby Senior Software Engineer, but cannot build your own code editor in
Ruby, there are serious holes in your skillset!! Explore Glimmer libraries
for many Ruby options to help you start the code editor building challenge
and journey."
Full Blog Post:
https://andymaleh.blogspot.com/2023/08/every-true-rubyist-builds-their-own.…https://github.com/AndyObtiva/glimmer-cs-gladiator/raw/master/images/glimme…
Presently our applications use the standard Logger package that comes with
Ruby and it works just fine. We use it in conjunction with the standard
unix logrotate. Up to now everything has been working as expected
Until the logrotate hit in the middle of some significant processing and a
client had a query. What we found was a 2 second gap in the logs. The end
of the old log was the start of a transaction and the start of the new log
was the end of a completely different transaction. So we have lost partial
information from two transactions and it is possible that there was at
least one transaction between these two that was lost completely. Each
transaction takes around 1 second to process, sometimes less
This time it was not too big an issue and there were other ways to
investigate the problem
Is there some other way of logging that is even less likely to lose data?
oedipus_lex version 2.6.2 has been released!
* home: <http://github.com/seattlerb/oedipus_lex>
* rdoc: <http://docs.seattlerb.org/oedipus_lex>
Oedipus Lex is a lexer generator in the same family as Rexical and
Rex. Oedipus Lex is my independent lexer fork of Rexical. Rexical was
in turn a fork of Rex. We've been unable to contact the author of rex
in order to take it over, fix it up, extend it, and relicense it to
MIT. So, Oedipus was written clean-room in order to bypass licensing
constraints (and because bootstrapping is fun).
Oedipus brings a lot of extras to the table and at this point is only
historically related to rexical. The syntax has changed enough that
any rexical lexer will have to be tweaked to work inside of oedipus.
At the very least, you need to add slashes to all your regexps.
Oedipus, like rexical, is based primarily on generating code much like
you would a hand-written lexer. It is _not_ a table or hash driven
lexer. It uses StrScanner within a multi-level case statement. As such,
Oedipus matches on the _first_ match, not the longest (like lex and
its ilk).
This documentation is not meant to bypass any prerequisite knowledge
on lexing or parsing. If you'd like to study the subject in further
detail, please try [TIN321] or the [LLVM Tutorial] or some other good
resource for CS learning. Books... books are good. I like books.
Changes:
### 2.6.2 / 2023-08-03
* 1 bug fix:
* Removed extra newline when do_parse option is used.