AndyObtiva/glimmer

A few ~smaller suggestions, kind of; in particular 2-3 or so suggestions for expanding the FAQ entries

Closed this issue · 1 comments

Hey there Andy,

This bundles a few issue requests into one; I hope that's ok. I wanted
to keep it focused rather than write several issue requests.

You provide a FAQ here:

https://github.com/AndyObtiva/glimmer#faq

This is helpful because I am extremely forgetful; all the multi-tasking
means I get distracted again and again. Sometimes I just don't know
of things I used to know a few months ago. At any rate, to the issue
request.

You provide various applications/GUIs in glimmer. Every once in a while
I check for news on https://andymaleh.blogspot.com/.

  1. Is it possible to download a specific glimmer application, from
    the commandline; including a specific toolkit?

For instance, just as an example:

glimmer --download=snake # download all snake impementations availble
glimmer --download=libui-snake # or something like that
glimmer --download=libui-snake-app
glimmer --download=swt-snake-app
glimmer --download=gtk-snake-app
glimmer --download=web-snake-app

So basically a way to specifically download one, or more than one,
apps, via the commandline. We can download just fine via github;
I just wondered whether there is a simple "up-and-running" command
to try glimmer applications. And yes, I can also easily copy/paste
the code shown :) - I am just more thinking the line of thought of
super-lazy people who just want to copy/paste something into the
terminal. :D

  1. IF there is a commandline way, could you also provide an example
    for this into the FAQ, including a few examples? You provide a LOT
    of documentation, which is great, but a FAQ can also be super-useful
    in that it can show a command concisely. Not many examples are needed,
    perhaps 1-3 or so IF such a feature exists. (If not then please
    disregard this suggestion.)

  2. Is there a way to obtain an up-to-date overview of what is all
    available, including the toolkits?

With that I mean something that can easily show up-to-date implementation
details of different toolkits AND applications.

For instance, the natalie language has a simple chart to show which
percentage of the ruby language specification has been covered via
tests so far, at https://natalie-lang.org/.

This is nice in that we can get a quick overview of how far a project
has progressed. For glimmer, of course a graph would be great too,
but I am thinking of even simpler means here, a markdown table may
suffice (even better if it can be autogenerated and autoupdated
so you don't have to do much manual time investment).

The rationale behind this question is primarily this:

  • e. g. to show which applications are available; see the older
    "glimmer store" suggestion. While that was more meant in a browser
    to view what is available, here I am thinking more of a commandline
    variant to see the progress. For instance:

    glimmer --statistics # or if that is already in use, perhaps --percentage

Just something to keep track of things in glimmer, especially when
people have not checked on glimmer for a few months and want to see
what's new.

  1. If something like this is added or available, to also add a FAQ
    entry or something, just as a quick pointer. Can be a very short
    entry.

  2. A new FAQ entry: "could glimmer be used for other programming
    languages as well?"

Here I mean whether one could, say, use python to implement a
glimmer spec.

Which brings me to:

  1. Will there be a glimmer specification eventually? Something a
    bit like Rack, in where we describe an application ideally in
    just one glimmer DSL "to rule them all", and have lots of applications
    available. Would be kind of great if glimmer would become a
    general purpose GUI-DSL; while the focus is evidently on ruby,
    and perhaps java (does it work via swing? I haven't checked
    yet, that may be another FAQ entry).

Anyway. Don't worry about the above, but if you get to have
some spare time, perhaps you could consider one or the other
of the above, especially FAQ entries, which I think may be
easier to just write down, compared to code. :D (I am currently
updating an old ruby-gtk3 app and it's a bit tedious ...)

With a specification I also kind of mean not only testing
that specification but for other projects implementing it.
Like Rack, where we can have generic wrappers that can be
used. A button {} stays a button after all!

Thanks for reading.

  1. Is it possible to download a specific glimmer application, from
    the commandline; including a specific toolkit?

Yes, simply follow the instructions of whatever application you want to download.

For example, glimmer_snake clearly gives you these instructions on their GitHub project page:

gem install glimmer_snake
  1. IF there is a commandline way, could you also provide an example
    for this into the FAQ, including a few examples? You provide a LOT
    of documentation, which is great, but a FAQ can also be super-useful
    in that it can show a command concisely. Not many examples are needed,
    perhaps 1-3 or so IF such a feature exists. (If not then please
    disregard this suggestion.)

Yes, it's also in the project page of whatever app you want to run, like this command:

glimmer_snake

That works well for what you call "lazy people who just want to copy/paste something".

There is no need to complicate things and do that in the glimmer command, which must remain focused on glimmer development needs only. Also, the glimmer command must be decoupled from what Glimmer applications are developed as thousands of apps might be developed with it. If you want an overview of available apps, you can just use the GitHub view of who is using the project.

https://github.com/AndyObtiva/glimmer-dsl-libui/network/dependents

Screenshot 2023-11-02 at 4 10 45 PM

  1. Is there a way to obtain an up-to-date overview of what is all
    available, including the toolkits?

If you want to see what examples are included in Glimmer DSL for LibUI, you simply run this command (also good for lazy people who want copy/paste):

glimmer examples

(assumes you first ran gem install glimmer-dsl-libui)

It brings up the Glimmer Meta-Example, which lets you run any examples from one central place, and it provides up-to-date information.

meta-example

That is kinda like the Glimmer Store idea that was discussed in the past.

This is old functionality (except for the new glimmer examples command), so you should have been aware of the Glimmer Meta-Example already (it just had a longer ruby command to run in the past), which makes me surprised you're even asking about this.

Almost each Glimmer library has its own tool to show examples (Glimmer DSL for SWT lets you run glimmer samples to show the Glimmer Meta-Sample), and that's good enough. There won't be one tool for all of them as most people care only about one library at a time, and when needed, they work with a single library and lookup its examples only, and only when done, would they move to another library.

If you want more centralization of information across everything Glimmer, you can build that yourself in a repository (e.g Awesome Glimmer repo), and then share it on GitHub, and let me and others know about it.

  1. If something like this is added or available, to also add a FAQ
    entry or something, just as a quick pointer. Can be a very short
    entry.

Everything I mentioned above is in Glimmer or Glimmer app README's already. I'm disappointed you asked these questions when you could have found the information yourself.

  1. A new FAQ entry: "could glimmer be used for other programming
    languages as well?" Here I mean whether one could, say, use python to implement a
    glimmer spec.

Absolutely NOT. Glimmer is facilitated by RUBY ONLY! When I tried building Glimmer originally, I tried Python and Scala, and they were not good enough. I also looked into newer technologies like Kotlin and Rust, and they aren't good enough either.

Glimmer is ONLY possible thanks to Ruby. For the time being, it won't be made available in any other programming language unless a new language ends up improving over Ruby (that's a big if) as far as syntax expressibility and the ability to build internal DSLs (embedded Domain Specific Languages) while still supporting the full capabilities of Object Oriented Programming and Blocks/Iterators. Until then, Glimmer is Ruby only.

  1. Will there be a glimmer specification eventually? Something a
    bit like Rack, in where we describe an application ideally in
    just one glimmer DSL "to rule them all", and have lots of applications
    available. Would be kind of great if glimmer would become a
    general purpose GUI-DSL; while the focus is evidently on ruby,
    and perhaps java (does it work via swing? I haven't checked
    yet, that may be another FAQ entry).

I won't work on that because I don't find it useful at all, and think people should just dig into one Glimmer DSL and build what they want, starting with the most complete one Glimmer DSL for SWT if possible, or otherwise a less complete yet functional one like Glimmer DSL for LibUI or Glimmer DSL for GTK.

Also, thinking too high level as one thing that rules them all is exactly the bad kind of programming practice that leads to over-engineering and producing bad libraries that nobody uses.

Please don't ask me about that again. You asked me half a dozen times at least and I said no. If you want that so badly, please build it yourself on top of Glimmer, and then report back to me what you did as actions with Glimmer, not just words.

Also, please build something with Glimmer that you could share the code of before asking me questions next time. Asking theoretical questions all the time is a waste of time, and I might start closing issues immediately if they don't contain Glimmer code form you going forward.