Shoes4 preview – the more personal release notes

As you might have noticed a big project I’ve been working on for almost 2 years got its first release on the 10th of May a bit more than 2 weeks ago. You can go read the official release announcement. This one is a bit more personal 😉

JAY A RELEASE!!!!

It’s been a long road from the 24th of May 2012 when the shoes community got together to concentrate efforts on the complete rewrite we call shoes4 now. That is a long time. It’s a time in which we made more than 2000 commits and closed nearly 600 issues.

Why did it take us so long? Well rewrites are difficult… there is an older piece of software in place which kind of does what you want but not really. Still if you release your new version has to be somewhat good enough. With this preview release we feel that all the major building blocks of the Shoes DSL itself are in place. Finally.

This release is really important to me. You know, it’s super hard to work on a project for so long without any release. Without any users. Other than your co-contributors there really aren’t many playing with what you build. Not many people to report bugs. Not many people to build something awesome. Not many people telling you that what you do actually matters. Sometimes this makes it a bit hard to motivate yourself. Therefore I want to thank everyone who during that time encouraged anyone of us, wrote an email saying that shoes is awesome or even grabbed a release straight from github and tried it out. Every time that happened it put a big smile on my face and motivated me to put in a couple of hours of extra work. I you!

Hackers gonna hack

Of course a release doesn’t mean that people are really using what you build. I tried to make a little effort writing the announcement blog post and sending out some announcement emails. So far we have a bit over 260 gem downloads, which is good I guess 🙂 There will hopefully be a wider coverage if we get a release out.

Of course, this is just  preview release. Nothing stable. We’re hard at work and already got some nice new bug fixes and improvements lined up. Stay tuned for the preview2 release and subsequent releases until we hit a release candidate!

Thanks

Last but not least I want to thank everyone who ever contributed to shoes4 – not only code but reporting issues, just trying stuff out. Thank you really, your support means a lot! Also to whoever funds me or funded me on gittip – thank you!

More personalized thanks go out to Eric Watson and Jason R. Clark! Eric has probably been the most steady contributor to shoes4. He’s been there from the start, still is, still going strong. And hopefully will for a long time 🙂 Recently he’s been hard at work converting our specs to the rspec3 syntax. Jason on the other hand is a more recent addition to the team – his first commits date back to around September 2013. Nevertheless he’s been pretty hard at work solving vital issues and hard to crack bugs. Lately he’s been hunting down operating system handles we didn’t free up!

What impresses me most about the two of them is that they both have a family and a job but still find the time to work on open source. I hope I’ll be the same once I’m at that point in my life! I mean Eric even has 5 children! FIVE! I can’t even imagine what that’s like 🙂 . But that’s super fun too. I’ll never forget remote pair programming with him with one of his kids running around in the background and waiving. Or Jason attributing the first open source contribution of his daughter on shoes. All super fun memories.

So everybody, shoes is coming. Try the preview release. Or wait for the next one. Or the release candidate. No matter what. Shoes is coming!

Shoes on!

Tobi

Shoes 4 – a progress report

My Google Summer of Code has been going on for one month now. The first commit on the shoes4 repository is almost one year and two months old. I think this is a good time to introduce shoes4 to more people and take a look and see what we have accomplished so far.

Shoes?

Shoes is a multi-platform gui toolkit for Ruby aimed at simplicity. The probably most well-known Shoes program is Hacketyhack, a tool to teach programming to beginners. Shoes truly is one of a kind, for instance with its very own layout mechanisms “stack” and “flow”. Personally I always wanted to write little GUI applications but always found it to be too cumbersome and frustrating. Until I met shoes. See how simple it is:

Shoes. app title: 'Hello Shoes' do
  background gradient limegreen..blue
  para 'This is just a very basic app'
  button 'Click me' do alert 'Hello there!' end
  image 'http://shoesrb.com/img/shoes-icon.png'
end

Screenshot from 2013-07-17 21:14:29

But this is not the only great feature of shoes, although it’s certainly one of the reasons why I have fallen in love with shoes. Another feature is packaging: You can package your shoes applications as standalone applications for the different operating systems.

Shoes 4?

Shoes4 is a complete rewrite of its predecessor keeping its features and enhancing the DSL here ant there.  “Why rewrite?”, you might ask. Well Shoes3 (or red shoes) is more of a C-project than a Ruby project. It has separate backends for each one of the major three operating systems. It’s really hard to maintain. Unfortunately there are some bugs that make the install fail on some systems, a shot at a dependency upgrade was basically a frustrating story for everybody involved, packaging (sadly) is mostly broken etc. Also there always was the dream, that shoes could be a gem. That was just hard to accomplish with shoes3, so it is an executable embedding a ruby interpreter.

Over time people have also started writing their own Shoes versions. There are a lot of them out there, by our count it’s 9 versions of shoes right now. Shoes4 is an effort for all implementers to join forces and work together so shoes can be shiny and new again. To accommodate the apparent desire of people to build their own pair of shoes we now use a new architecture.

Basically there is a DSL layer with all the elements that the user will interact with. This layer already implements quite some of the logic. However an exchangeable backend does the real heavy lifting of drawing etc. . So almost every DSL class has a matching backend implementation. For now the default backend implementation uses JRuby + SWT, but there also is a proof of concept backend in Qt. One of the advantages of SWT is that it aims to have a native look and feel, which is in the spirit of the original shoes. And already using a cross-platform GUI library takes a lot of load from our shoulders.

Screenshot from 2013-07-17 21:23:27
A very basic and yet to be polished graphic illustrating the DSL + backend approach.

Where are we at?

Here are some numbers to give you a feeling of where we are at right now:

  • we are closing in on the 1000 commits mark
  • Code coverage is at 92%
  • 62 samples (little scripts to test things, some of them real shoes programs) are known to work
  • 30 samples are not yet working / for many of them only tiny bids of implementation are missing to make them work and some of them are not scheduled to ship with 4.0 (e.g. video support)
  • 21 people have contributed code and a lot more have helped with reporting issues, trying stuff out, being helpful etc. – THANK YOU ALL! 🙂

As mentioned in the beginning there is a Google Summer of Code going on: Faraaz and me (with the help of our mentor Davor) are working hard to push Shoes4 forward. Here are some numbers concerning the first month of Google Summer of Code, we…

  • closed 46 issues
  • opened 18 issues
  • pushed 193 commits…
  • ..changing 202 files.
  • Code Climate score has improved from 3.1 to 3.3 (and there is a continued effort to refactor the other offenders)

And since we are talking about graphical things, here are some screenshots of working samples with shoes4 as of now:

The shoes4 builtin manual
A little tank game

There are a lot more samples… you can play pong, watch some fancy animations, a simple to do list etc…

One of the apparent questions is: “Can I use shoes4 right now?” The answer is: “Not yet.” We are in pre-alpha stage. While a lot of things work, some don’t. We will let you know when we release an alpha release or a release candidate for you to check out. However if you’re adventurous you can check out the master on github no matter what, feedback and reports about bugs are highly appreciated!

So what is missing? Here are a couple of bigger things that are missing as of now:

  • The span element to style parts of a text (used in a lot of samples)
  • Reliable packaging for all platforms (there is basic .jar and Mac packaging though)
  • quite some styling options for the different elements
  • The shoes console and the methods that go with it

Contributing

In general the shoes community is really nice and helpful, so if you want to take a swing at something we’re happy to help and even happier about your contribution! We also have a new “Newcomer Friendly” tag to show the way to potentially good issues to get started on. Otherwise just look at the issues and comment there if you’re interested in helping out. However just trying shoes4 out, fooling around or running a couple of samples is highly appreciated and helpful as well. Just refer to the README of the shoes4 repository to get started.

Lastly I want to thank the JRuby organization and Google for giving me the opportunity to work on an open source project I love full-time.

Screenshot from 2013-07-17 21:02:08Furthermore, if you want to know more about shoes you might consider going to JRuby Conf 2013 – I will be speaking there about shoes and there are lots of other great talks as well!

Shoes on!

Tobi