191 points | by tosh 150 days ago


  • gerjomarty 148 days ago

    Navigating to the tutorials section, I discovered to my joy that _why was clearly involved in this in some way. The online book[1] is written by them in their inimitable style.

    See also _why's other classic Ruby-related book, the Poignant Guide to Ruby[2].

    [1]: [2]:

    • zellyn 148 days ago

      _why created Shoes, I believe:

      • dragonwriter 148 days ago

        Shoes was a _why project (created, developed, maintained) until _why departed. There was subsequently some effort to keep it alive, and several different directions tried for a follow-up, but AFAIK all of them are now essentially defunct.

        • elipsey 148 days ago

          I hadn't heard of shoes until I saw this post, but it looks really attractive for certain cases.

          Thanks for mentioning the _why connection. I started reading WPGR years ago when another CS major showed it to me, but I had to quit because could tell I wouldn't be able to restrain myself from spending way too much time on it instead of my coursework. This was shortly after I decided to try Gentoo "real quick" the week before midterms...

          Anyway, I never got around to trying ruby for one reason or another -- already use Python, didn't come up at work, some friends are ambivalent about Rails, etc.

          So, is being decently competent in ruby still a good skill for a full stack/generalist type dev in 2020? (if there even is such a thing anymore) Is ruby just so cool that it's worth the opportunity cost not to miss out?

          Or should I, metaphorically, just try not to screw around before midterms?

          • ckrailo 148 days ago

            Ace your midterms and then build + (most importantly) ship side projects in whatever languages you want. Python and Ruby are both great choices, so go with whatever the jobs in your area use. I'm biased towards Ruby, personally, but the language you choose is less important than the projects you ship and can demo.

          • core-questions 148 days ago

            I use ruby a ton here and there for little utilities. It's certainly useful enough and well supported enough, you can run it in Lambda natively, the language is very readable and well suited to many purposes, especially around string and data manipulation; clarity is king and it nails it for me. I seldom have to go and look up anything to be able to just type it, which I've found to be a hard point to get to in many languages (e.g. used PHP for years back in the day and would forever be looking up parameter orders for functions due to the lack of a good IDE and sane conventions).

        • Slackwise 148 days ago

          Years ago, I needed to parse and view custom logs from our proprietary app, and I needed to do it now, so I cranked out a little Ruby script. But then I needed to share it with a non-programmer... so moments later, I slapped on a little Shoes GUI and it was good to go.

          I believe the same tool is in use even now, over 10 years later.

          Probably the fastest script-to-GUI iteration I've ever done, and a good showcase of Shoes' simplicity. (Although, the GTK gem is actually pretty easy to use as well, and my most recent conversions have been with GTK.)

          • hombre_fatal 148 days ago

            Back when I used Ruby and was more of a beginner, I used to upgrade my projects' Ruby CLI scripts into little Shoes admin panels that I could launch and keep open during dev. Not only did I like seeing all the available commands as buttons, but I could add arbitrary visualizations and logic, like whether the local Redis server was running or what the queue depth of my background worker was or maybe some input fields for common tasks.

            As a project matured, so would the admin panel. It could be really polished.

            Ever since I stopped using Ruby, I never tried to find an alternative in other languages I was using, or they weren't as trivial as Shoes. I kinda miss it.

            • dragonwriter 148 days ago

              PySimpleGUI for Python, while stylistically very different than Shoes, is pretty similarly simple.

          • failrate 148 days ago

            Way back when shoes was new, I used it and Hpricot to create a super simple web browser. Very fun, and also demonstrated to me a lot of the hidden perils of trying to make a web browser.

            • Yenrabbit 148 days ago

              Wow, this is a last from the past for me. Ruby and shoes were some of my earliest programming experiences. _why's book seemed like the most fascinating and wonderful weird creation, unlike any learning material I had come across. I've just fired up my 'space defenders' game, made 8 years ago, using the newest shoes version. It works! A pleasant surprise - I'd assumed this library died when _why went walkabout :)

              • weinzierl 148 days ago

                Reminds of Tcl/Tk and its derivatives like Perl/Tk. Simple cross platform GUIs are really simple with these. Of course you wouldn't write a Browser or a Office Suit with it, but for many apps it should be enough. I never understood why it didn't gain more popularity.

                • shoes_for_thee 148 days ago

                  If my recollection from the late 90s is to be trusted, tcl/tk was indeed very popular for a time, but gtk and qt came on the scene and quickly dominated as folks wanted their apps to share the look & feel of gnome or kde.

                  • mhd 148 days ago

                    For the open source UI sector, yes. Tk also fell back in the support of widgets people knew from e.g. Windows. If I recall correctly, an editable combo box was only available through extensions. In those days, memory consumption was also an issue, where native apps just did better. That was also what brought down Mono/Gtk.

                    I think for quite a while, Tk was still a good option where its competition were things like Swing -- enterprise and engineering apps. Especially visualization, quick input dialogs for otherwise CLI apps etc.

                    Not that visible for regular users.

                    Tcl/Tk had its issues, and we probably would've been better off with something like Display Postscript, both as a language and display technology, but it was a very pragmatic solution for quite a while. I'd still say that a lot of ad-hoc UIs could probably be done faster with Tk than with some web framework.

                  • brutt 148 days ago

                    Awful look (at Linux), awful UX, awful name, bad i18n. GTK+ is much better, e.g. perl gtk3 module [0].


                    • andrewl-hn 148 days ago

                      The UI you see on screenshots is for Shoes 4 which is a rewrite of the original library in JRuby + SWT. The original is it's own widgets, but there existed ports to GTK and maybe others.

                      The main part of shoes is the API design, all implementations follow the original API as described in the book.

                      • brutt 148 days ago

                        My reply was about Tcl/Tk.

                  • Marazan 148 days ago

                    There was a period where all the python scripts I needed a GUI for I slapped the GUI together in Adobe Flex and communicated with python over xml-rpc.

                    Those were the days,

                    • rhacker 148 days ago

                      I might be missing some Ruby context here, but why does the tutorial show the {} syntax and later the do...end syntax like do...end is somehow better? (And then in the shoes4 repo it also shows do...end syntax as an example there).

                      Maybe I'm just used to {} but is do...end superior to most ruby devs?

                      • hashmal 148 days ago

                        They don't have the same precedence.

                            foo bar { ... } # bar receives the block
                            foo bar do ... end # foo receives the block
                        The later, paired with the non-mandatory parentheses for calls, allows to read and write some really neat stuff.

                        The former is most often used for one-liners indeed.

                        • rahoulb 148 days ago

                          I've always worked with the convention that {} is for single line blocks and do ... end for multi-line

                          • Lio 148 days ago

                            I've also heard people discuss a convention where do end is used for side affecting code and {} is used for pure blocks.... but I've never seen anyone really stick to it so single-line vs multi-line is as good as anything.

                          • bdcravens 148 days ago

                            As others have mentioned do/end if preferable for multi-line blocks. I assume that's due to Ruby's extensive use of hashes (which are almost always multi-line) and to keep a clear distinction between the two.

                          • weaksauce 148 days ago

                            Is the fact that it's mature and stable for all uses the reason for it not being very actively worked on in the last few years?

                            • zimpenfish 148 days ago

                              Oh, hey, this is neat, I can use my shoes stuff again.

                              • lcam84 148 days ago

                                Being in ruby the name of the project must be related to this great talk from David Heinemeier Hansson

                                • w0mbat 148 days ago

                                  No it’s named after the “Shoes” meme video from 2006.

                                  • regularfry 148 days ago

                                    First commit on predates that by about a year. Might not be the first time he'd given that talk, of course, but I always thought of _why and DHH as being at totally different ends of the ruby community.

                                    • kitplummer 148 days ago

                                      This would pretty much be true. While DHH's claim is to Rails, I wouldn't say he was really a Ruby community guy. Where _why was specifically about Ruby, and non-commercially aspiring.

                                  • owlrobot 148 days ago

                                    Let's get some shoes.

                                    • bovermyer 148 days ago

                                      The name's generic nature is going to make searching for it difficult.

                                      • thatguyagain 148 days ago

                                        "building gui with ruby" - second search result in google for me. It's a lot more than just the name that goes into being discoverable and related to a topic/keywords/etc.

                                        • bovermyer 148 days ago

                                          OK, but what if I don't want the main site, but other resources like examples and user troubleshooting of obscure issues?

                                        • dragonwriter 148 days ago

                                          The Shoes 3 blog’s last post was a year ago, the Shoes 4 blog was last updated in 2017.

                                          I don't think SEO is the main thing Shoes needs for viability.