Hacker News new | past | comments | ask | show | jobs | submit login
Shoes (shoesrb.com)
191 points by tosh 3 days ago | hide | past | web | favorite | 34 comments





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]: http://evc-cit.info/cit020/nks.pdf [2]: https://poignant.guide/


_why created Shoes, I believe: https://en.wikipedia.org/wiki/Hackety_Hack

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.

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?


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.

Thanks!

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).

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.)


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.


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

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.

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 :)

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.

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.

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.


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

[0]: https://github.com/dave-theunsub/gtk3-perl-demos


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.


My reply was about Tcl/Tk.

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,


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?


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.


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

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.

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.

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?

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

Being in ruby the name of the project must be related to this great talk from David Heinemeier Hansson https://www.newpathconsulting.com/2012/05/dhh-on-the-secret-...

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

First commit on https://github.com/shoes/shoes-deprecated.git 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.

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.

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

"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.

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

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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: