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>
Hello! I wonder if there are some technical issues with the Ruby Master
site[1].
I forgot my password and I’ve been trying to get a reset link for quite a
while, but I don’t get it.
[1] https://bugs.ruby-lang.org/ 1 <https://bugs.ruby-lang.org/> , where
Ruby bugs are reported
Opal has recently won the prestigious Fukuoka Ruby Award for
Outstanding Performance in the 2023 edition. This is a major
achievement for the project and its developers, and it reflects the
significant contributions that Opal has made to the Ruby programming
language and its ecosystem.
Opal is an open-source project that allows developers to write Ruby
code and run it in the browser. It achieves this by compiling Ruby code
into JavaScript, which can then be executed in a browser environment.
This approach has many advantages, including the ability to reuse
existing Ruby code and the ability to write web applications entirely
in Ruby, without needing to use JavaScript at all.
Opal has been around since 2011, and it has steadily gained popularity
over the years. It is now widely used by Ruby developers who want to
use Ruby on both the front-end and the back-end of their applications
or who want to port their Ruby libraries to JavaScript.
https://opalrb.com/blog/2023/03/30/opal-won-fukuoka-ruby-award-for-outstand…
I've been able to use gem mysql2 and an older version of ruby without
any problem. Updating both programs I've not been able to get them to
work even though I have gone through everything I could find on the
internet.
With all the posts that mysql2 doesn't work is there another gem other
than mysql2 that works?
Is there something obvious that i am missing?
Thanks
Tom Reilly
C:\Ruby32-x64\bin>gem install mysql2
Using rubygems directory: C:/Users/w3gat/.gem/ruby/3.2.0
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-ucrt-x86_64-libmariadbclient
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
pacman failed with the following output:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory:
C:/Users/w3gat/.gem/ruby/3.2.0/gems/mysql2-0.5.5/ext/mysql2
C:/Ruby32-x64/bin/ruby.exe -I C:/Ruby32-x64/lib/ruby/3.2.0 extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details.
You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby32-x64/bin/$(RUBY_BASE_NAME)
--with-openssl-dir
--without-openssl-dir
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysqlclient-dir
--without-mysqlclient-dir
--with-mysqlclient-include
--without-mysqlclient-include=${mysqlclient-dir}/include
--with-mysqlclient-lib
--without-mysqlclient-lib=${mysqlclient-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `block in find_library':
undefined method `split' for nil:NilClass (NoMethodError)
paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
^^^^^^
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `each'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `flat_map'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1083:in `find_library'
from extconf.rb:131:in `<main>'
To see why this extension failed to compile, please check the mkmf.log
which can be found here:
C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
C:/Users/w3gat/.gem/ruby/3.2.0/gems/mysql2-0.5.5 for inspection.
Results logged to
C:/Users/w3gat/.gem/ruby/3.2.0/extensions/x64-mingw-ucrt/3.2.0/mysql2-0.5.5/gem_make.out
C:\Ruby32-x64\bin>cd \ruby32*
The JRuby community is pleased to announce the release of JRuby 9.4.2.0.
- Homepage: https://www.jruby.org/
- Download: https://www.jruby.org/download
JRuby 9.4.x targets Ruby 3.1 compatibility.
Thank you to our contributors this release, you help keep JRuby moving
forward! @k77ch7, @andsel
Ruby Compatibility
- __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
- More use cases for keyword arguments have been fixed to behave
correctly and avoid extraneous warnings. #7637, #7645, #7657, #7658, #7670,
#7672, #7686
- Array#pack now supports more cases, passing nearly all specs. #7663
- Compatibility with CRuby’s command-line arguments has been improved.
#7678, #7680, #7681, #7681, #7683, #7684
Standard Library
- irb is updated to 1.4.2. #7690, #7691
- open-uri is updated to 0.3.0. #7701
- io-wait is updated to 0.3.0. #7701
- stringio is updated to 3.0.5. #7701
- strscan is updated to 3.0.6. #7701
- open3 is switched to using the gem at 0.1.2. #7701
Platform Support
- Exception backtraces now default to color output when the controlling
terminal is a TTY. Disable using -Xbacktrace.color=false or equivalent in
.jrubyrc. #7693
Performance
- String#split has been optimized to skip regular expression use for
simple split expressions. Simple ASCII strings also split faster. #7629
54 Github Issues resolved for 9.4.2.0
#2305 - __callee__ behaves differently from MRI
#7477 - Integer#chr(encoding: Encoding::UTF_8) raises a different
RangeError exception message than on CRuby
#7480 - Cannot call SubClass#initialize_copy with an object created
from the super class
#7615 - opt != for fixnum in JIT/indy
#7629 - Split opts
#7637 - 9.4.1.0: Wrong number of arguments with kwargs when subclassing
a java class
#7639 - Typing @ into irb in 9.4.1.0 crashes it
#7641 - “Port already in use” errors when configuring remote JMX in 9.4
#7642 - [9.4.1.0] ArrayIndexOutOfBoundsException
#7643 - Use SmartBinder to set up struct calls
#7645 - Fixes #7637. Arity error with kwargs when subclassing a java
class
#7650 - BigDecimal arithmetic regression [jruby-9.4]
#7652 - Fix Float#to_d of bigdecimal/util
#7653 - Fix Struct#values_at when passed an integer Range argument for
edge cases
#7655 - JIT coverage fixes
#7656 - Regression: Class variables in top level methods broken
compared to MRI & 9.3
#7657 - Pattern matching unexpectedly raises “duplicated key name” error
#7658 - remove deplicated key name error
#7659 - Fix for #7656.
#7662 - END blocks had regressed and was calling same block >1
#7663 - Array#pack unknown directive warns
#7664 - All these work?
#7665 - Arity errors for ‘call’ things in Signal#trap
#7666 - Array#new size boundary error not tripping
#7667 - Kernel#respond_to? return wrong error string but right error.
#7668 - Array#to_s/inspect should be same method
#7669 - Proc#inspect with &:foo should print that out in str
#7670 - Probably method_missing is not handling keyword arguments
properly [jruby-9.4.1.0]
#7671 - Binding local_variables makes sure they are lvars
#7672 - jruby-9.4.1.0 issues warning about duplicated keys
#7674 - Fix #7672. warning about duplicated keys
#7675 - JIT loses line numbers in some warnings?
#7678 - Add –encoding command line option.
#7679 - Spec sweep
#7680 - disabling RUBYOPT processing was not hooked up.
#7681 - Frozen string debugging off by one.
#7682 - The -p command line should use print and not puts.
#7683 - All -I provided relative paths shold be made absolute
#7684 - Fixed windowsJ encoding and do not set on invalid K values
#7685 - Add a warn form that takes a callback
#7686 - Fix #7670. Coverage data goes off the rails.
#7687 - Passing specs
#7690 - Update irb to version 1.4.2+
#7691 - Updates irb to 1.4.2
#7693 - Enable color if console is a tty
#7694 - Mimic CRuby’s range error logic for chr
#7696 - Make coderange set on strings created from some IO ops
#7700 - Define real error methods to avoid callee
#7701 - Update gems
#7702 - Encode new and old name in aliased calls
#7708 - Enumerator.new takes at most one arg
#7709 - Eliminate 2- and 3-arity paths for Enumerator#initialize
#7715 - We were quoting symbols in inspect we shouldnt have
#7716 - Add infra to support Ruby 3.1 pattern error messages.
--
blog: http://blog.enebo.com twitter: tom_enebo
mail: tom.enebo(a)gmail.com