A new Glimmer FAQ (Frequently Asked Questions) section (linked at the
bottom) has been added to the Glimmer project README on GitHub (linked at
the bottom) in order to answer questions like "How do Glimmer GUI DSLs
compare to Shoes?" and "What is the difference between Glimmer and Glimmer
DSL for SWT?", among others.
https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-dsl…
I am including the Glimmer FAQ below for your convenience. If you have
other questions that are not answered in the Glimmer FAQ, please reply with
your questions.
## How do Glimmer GUI DSLs compare to Shoes?
If you liked Shoes, you'll love Glimmer!
That is because Glimmer does everything that Shoes did, but with a lighter
and better GUI DSL (Graphical User Interface Domain Specific Language) that
addresses all the issues that Shoes suffered from, such as:
- Shoes does not allow code in Shoes blocks to use variables defined
outside of Shoes blocks in a straightforward manner as it changes self
inside Shoes blocks, breaking Ruby expectations and producing confusing
behavior. On the other hand, Glimmer DSL blocks are 100% standard Ruby
blocks that represent real closures, so they enable usage of variables
defined outside the blocks in a 100% standard Ruby way.
- Shoes lacks support for high-quality business widget controls (View
components) like table and tree. Glimmer GUI DSLs that are feature complete
like Glimmer DSL for SWT do support table and tree widgets. Some non-final
Glimmer GUI DSLs like Glimmer DSL for LibUI support the table control too.
- Shoes does not encourage proper separation of concerns with a correct MVC
architecture (Model-View-Controller), resulting in a lot of
non-presentation logic mixed with View code. Glimmer GUI DSLs do support
proper separation of concerns 100% following the MVC or MVP
(Model-View-Presenter) architecture by default.
- Shoes does not provide a simple way for connecting View components to
Model data. Glimmer GUI DSLs provide full bidirectional/unidirectional
data-binding support out of the box that provides the terest code syntax
for connecting Views to Models and keeping them in sync.
- Shoes does not support a native mechanism for building custom View
components. Glimmer does support the ability to build custom widgets (aka
controls or View components), custom windows (aka shells), and custom
shapes (canvas graphics). That results in much higher productivity by
enabling the reuse of higher visual concepts as their own self-encapsulated
components.
- Shoes does not expose native features of its wrapped GUI toolkit. Glimmer
GUI DSLs do expose all native features of their wrapped GUI toolkits, thus
enabling developers to use a GUI toolkit like SWT directly when needed on
top of using Glimmer DSL for SWT. That facilitates the 80/20 rule of having
Glimmer GUI DSLs automate 80% of the work while still enabling software
engineers to reach down to the low-level GUI toolkit API in 20% of the
cases when needed (though in practice, it's probably more like 1% of the
cases).
It is great that Shoes paved the way for creating desktop GUI DSLs in Ruby.
Glimmer took that approach to its maximum and produced the ultimate
evolution of Shoes.
## What is the difference between Glimmer and Glimmer DSL for SWT?
Glimmer DSL for SWT was the first GUI DSL created as part of the Glimmer
project to enable building desktop applications, and it was originally just
called Glimmer. It relied on the Eclipse SWT library to render GUI
(Graphical User Interface) widget controls (View components) on every
platform (Mac, Windows, and Linux). Eventually, the idea of a Glimmer DSL
proved itself so successful and viable for building desktop apps with a
fraction of the effort needed in other programming languages/technologies
that it was expanded to support other GUI toolkits. So, Glimmer got renamed
to Glimmer DSL for SWT, and the core Glimmer DSL engine got extracted to
Glimmer (becoming a DSL framework), which then got reused to build other
Glimmer GUI DSLs such as Glimmer DSL for LibUI and Glimmer DSL for GTK,
among many others.
## What is the difference between Glimmer DSL for SWT and Glimmer DSL for
LibUI?
Both Glimmer DSL for SWT and Glimmer DSL for LibUI support rendering
platform native widgets/controls, which enable building native desktop apps
that look 100% native on every platform (Mac, Windows, and Linux).
However, Glimmer DSL for SWT runs in JRuby (Ruby running in the JVM [Java
Virtual Machine]) whereas Glimmer DSL for LibUI runs in standard Ruby (aka
MRI Ruby or CRuby).
Glimmer DSL for SWT is 100% feature-complete and has a final release.
Glimmer DSL for LibUI is 100% complete as far as covering the LibUI
features, but LibUI itself is still a mid-alpha library, so it is missing a
few features that will get added eventually.
## What is the difference between Glimmer DSL for LibUI, Glimmer DSL for
GTK, Glimmer DSL for Tk, and Glimmer DSL for FX?
All of Glimmer DSL for LibUI, Glimmer DSL for GTK, Glimmer DSL for Tk, and
Glimmer DSL for FX run in standard Ruby (aka MRI Ruby or CRuby).
However, only Glimmer DSL for LibUI renders native controls on every
platform (Mac, Windows, and Linux). The other libraries do not render
native controls on every platform, albeit Glimmer DSL for GTK renders
native controls on Linux distributions utilizing Gnome.
Also, Glimmer DSL for LibUI does not require any prerequisites beyond
installing the Ruby gem, so you can install it and get instant GUI with
very little effort, whereas Glimmer DSL for GTK, Glimmer DSL for Tk, and
Glimmer DSL for FX do require extra dependencies in general, albeit Glimmer
DSL for GTK has everything it needs in Linux Gnome flavors.
You may learn more about the differences between various Glimmer DSLs by
checking out the Glimmer DSL Comparison Table (linked at the bottom).
## What is the difference between Glimmer DSL for SWT, Glimmer DSL for
Swing, and Glimmer DSL for JFX?
Glimmer DSL for SWT relies on the Eclipse SWT library, which renders native
widgets on every platform (Mac, Windows, and Linux) to build desktop apps
that look 100% native on every platform (Mac, Windows, and Linux).
Glimmer DSL for Swing relies on Swing, which does not render native widgets
on every platform. Glimmer DSL for JFX relies on JavaFX, which also does
not render native widgets on every platform.
You may learn more about the differences between various Glimmer DSLs by
checking out the Glimmer DSL Comparison Table (linked at the bottom).
## Links:
Glimmer GitHub Page: https://github.com/AndyObtiva/glimmer
Glimmer FAQ: https://github.com/AndyObtiva/glimmer#faq
Glimmer DSL Comparison Table:
https://github.com/AndyObtiva/glimmer#glimmer-dsl-comparison-table
Blog Post Announcement:
https://andymaleh.blogspot.com/2023/06/if-you-liked-shoes-youll-love-glimme…
minitest version 5.18.1 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.18.1 / 2023-06-16
* 3 bug fixes:
* Avoid extra string allocations when filtering tests. (tenderlove)
* Only mention deprecated ENV['N'] if it is an integer string.
* Push up test_order to Minitest::Runnable to fix minitest/hell. (koic)
httpx 0.24.0 has been released.
```
HTTPX.get("https://gitlab.com/honeyryderchuck/httpx
<https://gitlab.com/honeyryderchuck/httpx>")
```
HTTPX is an HTTP client library for the Ruby programming language.
Among its features, it supports:
* HTTP/2 and HTTP/1.x protocol versions
* Concurrent requests by default
* Simple and chainable API
* Proxy Support (HTTP(S), CONNECT tunnel, Socks4/4a/5)
* Simple Timeout System
* Lightweight by default (require what you need)
And also:
* Compression (gzip, deflate, brotli)
* Streaming Requests
* Authentication (Basic Auth, Digest Auth, AWS Sigv4)
* Expect 100-continue
* Multipart Requests
* Cookies
* HTTP/2 Server Push
* H2C Upgrade
* Automatic follow redirects
* International Domain Names
* GRPC
* Circuit breaker
* WebDAV
* Datadog integration
* Faraday integration
* Webmock integration
* Sentry integration
Here are the updates since the last release:
# 0.24.0
## Features
### `:oauth` plugin
The `:oauth` plugin manages the handling of a given OAuth session, in that
it ships with convenience methods to generate a new access token, which it
then injects in all requests.
More info under https://honeyryderchuck.gitlab.io/httpx/wiki/OAuth
### session callbacks
HTTP request/response lifecycle events have now the ability of being
intercepted via public API callback methods:
```ruby
HTTPX.on_request_completed do |request|
puts "request to #{request.uri} sent"
end.get(...)
```
More info under https://honeyryderchuck.gitlab.io/httpx/wiki/Events to know
which events and callback methods are supported.
### `:circuit_breaker` plugin `on_circuit_open` callback
A callback has been introduced for the `:circuit_breaker` plugin, which is
triggered when a circuit is opened.
```ruby
http = HTTPX.plugin(:circuit_breaker).on_circuit_open do |req|
puts "circuit opened for #{req.uri}"
end
http.get(...)
```
## Improvements
Several `:response_cache` features have been improved:
* `:response_cache` plugin: response cache store has been made thread-safe.
* cached response sharing across threads is made safer, as
stringio/tempfile instances are copied instead of shared (without copying
the underling string/file).
* stale cached responses are eliminate on cache store lookup/store
operations.
* already closed responses are evicted from the cache store.
* fallback for lack of compatible response "date" header has been fixed to
return a `Time` object.
## Bugfixes
* Ability to recover from errors happening during response chunk processing
(required for overriding behaviour and response chunk callbacks); error
bubbling up will result in the connection being closed.
* Happy eyeballs support for multi-homed early-resolved domain names (such
as `localhost` under `/etc/hosts`) was broken, as it would try the first
given IP; so, if given `::1` and connection would fail, it wouldn't try
`127.0.0.1`, which would have succeeded.
* `:digest_authentication` plugin was removing the "algorithm" header on
`-sess` declared algorithms, which is required for HTTP digest auth
negotiation.
# 0.23.4
## Bugfixes
* fix `Response::Body#read` which rewinds on every call.
# 0.23.3
## Bugfixes
* native resolver: fix missing exception variable in the DNS error code
path.
* native resolver: fixed short DNS packet handling when using TCP.
# 0.23.2
## Bugfixes
* fix missing variable on code path in the native resolver.
# 0.23.1
## Bugfixes
* fixed regression causing dns candidate names not being tried after first
one fails.
Thank you for using Ruby.
We started invitation to the ninth contest Ruby biz Grand prix 2023.
This Grand prix is to make honorable recognition of services and products that create innovative new values of the programing language Ruby by utilizing it in the field of business.
Why don't you advertise your business or services by applying for this Grand prix?
[Exemplification of expected technical areas]
*Web application
*IoT (edge computing, sensor devices etc.), machine control
*Infrastructure
*Data analysis/utilization
We widely promote the matter with which you make application for the contest.
We are looking forward to your application to the contest by presenting excellent services which Ruby creates.
The portal site for Ruby biz Grand prix:
URL: https://rubybiz.jp/index.html?lang=en
*In the site you will read application guidelines for 2023, application forms, and examples of past prize winners, and so on.
[where to inquire]
Secretariat:
Industry Digitization Promotion Office, Industry Promotion Division, Department of Commerce, Industry and Labor, Shimane Prefectural Government
e-mail: rubybiz(a)joe2.pref.shimane.jp
The JRuby community is pleased to announce the release of JRuby 9.4.3.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! @byteit101, @donv, @k77ch7, @rcrews
Ruby Compatibility
- Multiple fixes for keyword arguments edge cases. #7676, #7755, #7804,
#7816
Standard Library
- Default gem updates:
rubygems 3.3.26 #7831
bundler 2.3.26 #7831
cgi 0.3.6 #7831
date 3.3.3 (stub gem on JRuby) #7831
ffi 1.15.5 #7831
jruby-openssl 0.14.1
net-http 0.3.0 #7831
net-protocol 0.1.2 #7831
reline 0.3.5 #7831
ffi-binary-libfixposix 0.5.1.1 to support Apple M1 (used by
subspawn for improved subprocess management)
time 0.2.2 #7831
timeout 0.3.2 #7831
uri 0.12.1 #7831
- Bundled gem updates: #7831
net-imap 0.2.3
- Many fixes for BigDecimal behavior by @k77ch7. #7747, #7758, #7766,
#7767, #7768, #7778, #7779, #7780, #7781, #7813, #7827
- Rippper now passes all tests related to the syntax_tree gem. #7776
Performance
- Various small optimizations based on Rails and other frequent use
cases. #7522, #7720, #7722, #7783, #7789
JVM Integration
- InvokeDynamic support is now being tested across five major test
suites on Java 17 and passes all tests that non-indy execution passes. #7797
79 Github Issues resolved for 9.4.3.0
#1422 - GzipReader#mtime gives the wrong time
#6607 - Clean up javadoc for stricter Java 11
#7452 - Default external to locale as in CRuby
#7474 - Rails 7 support
#7522 - case/when optimizations
#7579 - GLIBC compatibility with RHEL/CentOS 7 and JRuby 9.4.0.0
#7673 - Enable more traces and reduce costs of others
#7676 - ruby2_keywords should not warn when using …
#7711 - Constants set by autoload have wrong line number in JIT
#7712 - Use real stack trace for autoload const location
#7714 - Enumerator cleanup
#7717 - sass-embedded gem extension install fails with rake require
error on Windows with JRuby 9.4.2.0
#7718 - Deprecation cleanup
#7719 - Fixes #7717. sass-embedded gem extension install fails with
jruby-com…
#7720 - More indy call optz
#7722 - Eliminate duplication for optimized case/when build
#7723 - passing specs
#7724 - Syslog tags
#7725 - More specs already fixed
#7726 - Ruby-based SecurityManager can recurse forever
#7728 - [feat] make Ruby#setWarningsEnabled actually useful
#7734 - Object with finalizer dumps wrong data leading to: load':
marshal data too short
#7735 - Dir.home is no longer compatible with CRuby after JRuby 9.3
#7738 - Fix Dir.home called with nil user
#7739 - Don’t try to marshal non-serializable variables
#7740 - irb error on Mac M1
#7741 - some line numbers on warnings are off by 1
#7743 - [ripper] NPE during parsing the rspec documentation
#7744 - The File#absolute_path? implementation in JRuby 9.4.x.x causes
issues with asciidoctor-pdf
#7745 - Pathname#absolute? stopped working properly for URIs
#7746 - Flaky test running rack on JRuby
#7747 - Ruby 3.1 : fix Bigdecimal
#7751 - Move arity-checking into variable-arity method bodies
#7753 - Fix #7743. NPE during parsing the rspec documentation
#7755 - Fixes #7676. ruby2_keywords should not warn when using …
#7756 - Regression go away
#7757 - Migrate regressions into jruby:spec or remove if already covered
#7758 - Fix BigDecimal#sub with Object and significant digits
#7761 - Can’t match rspec errors in 9.4.2.0
#7764 - Mysterious “unused literal ignored” warnings
#7765 - GH-6607 Clean up javadoc for stricter Java 11
#7766 - Fix rounding mode constants of BigDecimal to use the same mri’s
values
#7767 - Fix BigMath#exp and #log error message for edge cases
#7768 - Fix BigDecimal(0, NAN and INFINITY) to return always same object
#7770 - Fixes #7769. regexp with / before mbc should work.
#7774 - ripper presents an extra on_var_field for opt parameters in
methods
#7775 - Fixes #7774. ripper presents an extra on_var_field for opt
params
#7776 - Ripper fixes found while running syntax_tree gems tests.
#7777 - fix try_convert error message
#7778 - Fix BigDecimal#to_s for edge case
#7779 - Fix bigdecimal/util’s #to_d and BigDecimal.interpret_loosely to
return correct value for loosely case
#7780 - Fix several BigDecimal failures
#7781 - Add BigDecimal#power(n, prec)
#7783 - Rails profiling optimizations
#7789 - Java call optimizations
#7790 - jruby –help displays removed taint level command line option
#7791 - Remove obsolete command line option -T[level]
#7793 - Macbook M1 JRuby 9.4.2.0 Could not open library ‘fixposix’
‘libfixposix.dylib’
#7797 - Fix recent regressions on master
#7800 - Update time and uri for recent ReDoS issues
#7801 - Update time to 0.2.2 and use date stub gem 3.3.3
#7802 - Update Subspawn to fix #7793
#7804 - Incorrect ArgumentError: wrong number of arguments
#7807 - Update joni to 2.2
#7808 - Update to backport9 1.13 for module javadoc fix
#7813 - Add BigDecimal#quo(value, digits)
#7814 - Update jzlib and fix mtime
#7816 - Fixes #7804. Incorrect ArgumentError: wrong number of arguments
#7818 - Small documentation issues regarding java options
#7820 - Accessing Encoding from java code is broken on new thread
#7824 - Use top self for evalScriptlet, since no frame yet
#7826 - Fix Rational#truncate with an invalid value
#7827 - Fix BigDeciaml#to_f
#7828 - Improve verbiage of how to use properties.
#7830 - ArrayIndexOutOfBoundsException matching regex against emoji
string
#7831 - Update stdlib gems and compat to 3.1.4
#7832 - Update JNR versions
#7833 - Update IRB tests to 1.7.0 version
#7834 - Return to IRB 1.4.2 for now
--
blog: http://blog.enebo.com twitter: tom_enebo
mail: tom.enebo(a)gmail.com
ruby_parser version 3.20.2 has been released!
* home: <https://github.com/seattlerb/ruby_parser>
* bugs: <https://github.com/seattlerb/ruby_parser/issues>
* rdoc: <http://docs.seattlerb.org/ruby_parser>
ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
racc--which does by default use a C extension). It outputs
s-expressions which can be manipulated and converted back to ruby via
the ruby2ruby gem.
As an example:
def conditional1 arg1
return 1 if arg1 == 0
return 0
end
becomes:
s(:defn, :conditional1, s(:args, :arg1),
s(:if,
s(:call, s(:lvar, :arg1), :==, s(:lit, 0)),
s(:return, s(:lit, 1)),
nil),
s(:return, s(:lit, 0)))
Tested against 801,039 files from the latest of all rubygems (as of 2013-05):
* 1.8 parser is at 99.9739% accuracy, 3.651 sigma
* 1.9 parser is at 99.9940% accuracy, 4.013 sigma
* 2.0 parser is at 99.9939% accuracy, 4.008 sigma
* 2.6 parser is at 99.9972% accuracy, 4.191 sigma
* 3.0 parser has a 100% parse rate.
* Tested against 2,672,412 unique ruby files across 167k gems.
* As do all the others now, basically.
Changes:
### 3.20.2 / 2023-06-06
* 1 bug fix:
* 3.2: fixed parsing of f(*) and f(**). (agrobbin)