Category Archives: Raspberry

With a whimper. Shoes 3.3.0

It’s released. For better or worse. I think better. Look at the changelog

Walkabout – Shoes 3.3

The name reflects back to when Shoes creator why_the_lucky_stiff disappeared
from the internet. He went walkabout! We changed some icons and backgrounds
to reflect that whimsical theme.

Walkabout (3.3) will be less compatible with the unmaintained 3.1 and not really released yet 4.0 (jRuby), We have interesting ideas of we what we do with Shoes that maybe very difficult to implement in Shoes 4.

New with 3.3.0

  • Uses Gtk3 (not gtk2) for Linux and Windows. This will change visuals on both platorms.
  • add font and wrap styles for list_box. A popular request – we are limited to what Gtk3 can do, however. The default behaviour for long strings in the list box is now to
    ellipize … in the middle. THIS could effect your current apps.
    Issue 109 https://github.com/Shoes3/shoes3/issues/109
  • A new Svg widget to display svg images – similar to Image but
    NOT really the same. Has aspect scaling options based on the svg internals. See samples/good-svgview.rb. samples/good-flip.rb and the manual. We also include a svg deck of playing cards. It’s a bit fragile so please file bug reports and ask for feature requests.

    • Very verbose Issue 54 – https://github.com/Shoes3/shoes3/issues/54
    • Pay attention to the OSX workaround #178 https://github.com/Shoes3/shoes3/is
      sues/178
    • Preliminary save and export methods:
      Issue #177 https://github.com/Shoes3/shoes3/issues/177
  • add a refresh slot method
    Issue 152 https://github.com/Shoes3/shoes3/issues/152
  • Uses ruby 2.1.7 or 2.1.8 and rubygems 2.4.7+
    Issue 164 https://github.com/Shoes3/shoes3/issues/164
  • New splash screen (no animation).
  • Added samples/good-image-rotate.rb because it’s fun to watch.
    Issue 157 – https://github.com/Shoes3/shoes3/issues/157

Fixed with 3.3.0

  • OSX – do not use home brew to manage dependecies.
    wiki: https://github.com/Shoes3/shoes3/wiki/OSX-10.9-Dependencies15
    wiki: https://github.com/Shoes3/shoes3/wiki/OSX-10.6-Dependencies
  • Remove pango-querymodules from OSX. Yay!
    Issue 156 – https://github.com/Shoes3/shoes3/issues/156
  • Uninstall Shoes menu item for Linux (for some window managers)
    Issue 31 – https://github.com/Shoes3/shoes3/issues/31
  • repaint after slot remove
    Issue 151 – https://github.com/Shoes3/shoes3/issues/151
  • Windows: 256×256 icons failed when packaging.
    Issue 10 – https://github.com/Shoes3/shoes3/issues/10
  • developer name and RVM and linker info gets embedded in
    binary libraries. No solution worth the effort.
    Issue 66 – https://github.com/Shoes3/shoes3/issues/66
  • Windows: fontconfig problems if you build shoes and download shoes
    Issue 141 – https://github.com/Shoes3/shoes3/issues/141

Yes, we have been busy beavers. Next up is Shoes 3.3.1. It will be Amazing Too! You’ll get tired of how awesome Shoe 3.3 will be. Shoes will be great Again!

Getting closer – Shoes 3.3.0

There’s just a few more things to finish before Shoes 3.3.0 (WalkAbout) is finished. In fact its good enough for folks who like to poke at new things and leave some feedback. So, there are beta downloads.

There are numerous big fixes and a couple of new features. One popular request is to do something that can shrink long strings in list_box. OSX does a wonderful job at this but Linux and Windows don’t. In 3.3.0 you can set the font for a list_box and you can create a two line entry if you specify a wrap: option which shows two lines of the string with some control on wrapping. The default without wrap is show the first part an ellipsis … and the last part of the long string. That effects existing Shoes programs visually. If long strings is a problem for you, try the beta and let us know if it’s good enough or unsatisfactory. Of course you’ll have to read the manual for what the options details are.

The other new feature is the ability to load and display Svg files and keep them in vector format. You also get some Svg unique methods for managing aspect and drawing a (sub)group in an Svg file. This is actually a brand new widget for Shoes 3.3.0 which took us a long time do correctly. It only looks like an Image. We also included two good sample programs and a deck of playing cards so after reading the manual, you can read the sample code and get familiar with what could be done. If you study the samples you’ll notice an OSX work around. It’s only a beta! We know that bug exists.

And the artwork has changed and – that’s enough for now.

So many infrastructures

I went to Costco and bought a 1.5TB usb external drive. $59 USD. Because I live dangerously, I upgraded the pi2 to the latest Raspbian Jessie and eventually got my user name set up instead of the default ‘pi’. It makes everything easier in NFS to have the same user id (1000) on all NFS systems.

Then I had to get ssh whipped into shape. Always a mystery. Always a struggle.

I connected the SeaGate to my raspberry pi2 and after much horsing around with usb cables and even more horsing around with /etc/fstab and netatalk, it’s doing a Time Machine backup of the Mac Mini over enet to a pi with an external usb disk. Slow? Of course it is. Neither enet or USB is going to be fast on a Pi. 50% of one of 4 cores on the pi2. I also need to modify/add to the Linux backup scheme which uses rsync to backup to the pi2.

Having had to restore from backups before, I know what I should do buy there are constraints that in any scheme. Constraints that don’t need to apply get encoded into scripts and processes. Since I’m pushing around GB of data around, it takes time. A lot of time.

Shoes 3.2.25

It’s available. Nothing really important to most of you.

New with 3.2.25

Fixed with 3.2.25

  • documented app.slot().
    issue 44
    wiki article
  • really remove shy temp file remnants on Windows
    https://github.com/Shoes3/shoes3/issues/19

Infrastructure for 3.2.25

What is not mentioned above is this will be the last 3.2.x release. Don’t worry – we are going to create to a Shoes 3.3 because this is as far as I can go with a “maintenance release”. Most of you won’t even notice. And that is is as it should be.

It’s being used! Thank You

One reason I wanted to analyze the logs was to see if Shoes is being downloaded by real people and how many downloads are from packaging. I did discover an easy way to do some of that. Below is the partial url and the number of time it was used by Shoes for the week of data.

/public/select/pkg.rb cnt 120
/public/shoes/shoes-3.2.24-gtk2-x86_64.install cnt 7
/public/shoes/shoes-3.2.24-osx-10.9.tgz cnt 4
/public/shoes/shoes-3.2.24-gtk2-32.exe cnt 16
/public/shoes/shoes-3.2.24-gtk2-i686.install cnt 2
/public/images/dino.jpg cnt 1
/ cnt 4
Unique IP's 42 Total: 154

There are interesting things. 42 people attempted to do something with the packaging. There were real (to me) 29 packaging attempts in that week and 120 presses on the “Select Architecture” button. 24% decided to package. (29/120). Because of the way Shoes caches downloads, when 3.2.24 was released that week – those 29 had to grab the new version for their cache. Once the new version is loaded in the cache. Further packaging attempts would only be in the 120 number

I’m pleased by these numbers. They are higher than I thought. Shoes is being used! I have no way of knowing how many people actually run Shoes. I might be able to figure out how many new shoes were downloaded by real people that week although that’s a lot harder to figure out and has plenty of uncertainty.

P.S. I have no interest or desire track the ip# back to the origin network or country or try to identify individual users. That said, there are people or bots that are trying to break in. Those I do hunt down and block.

Need a Console?

One thing I’ve spent a lot of time working on for the last few weeks is a Shoes Console. Why, when you can get the pretty Shoes Console just be typing cmd-/ and write to it with with a debug or info command?

What separates Shoes 3.2 from our friends at Shoes 4 is that Shoes 3.2 caters to native gems and native widgets and native packagers and native … and when it comes to native Ruby developers and C developers often write puts statements of call printf(). If you run Shoes from the command line those puts and printf() display on that terminal (aka console). If you start a Shoes program from the Windows Manager or Menus then those messages have no place to appear. Also, starting Shoes from the command line on OSX is what I would call “painful” just to see puts and printf()’s and not all that beginner friendly on Windows or Linux.

Shoes Console is also written in Shoes/Ruby which can be mixed blessing. Microsoft has an AllocConsole() C function which will create a new console window, if needed, and redirect all stdout/stderr/stdin there. Pretty damn awesome! Linux and OSX can’t do that. What if I could write a console for Shoes/Linux and Shoes/OSX that could behave the same way?

So I did for Shoes 3.2.24. On Linux and OSX it’s a native Window that Shoes doesn’t control or can’t control. No Ruby code. Gtk (Linux) and Cocoa(OSX) windows that redirects stdin/out/err for the Shoes program to the (New) Shoes Console window.

If you think about use case’s it becomes clear that the Shoes app developer already knows when his scripts/gems/process should have a console (it’s not easy or convenient or overkill to convert puts/printf() into Shoes para or teach the end user how to launch from a terminal. In Shoes 3.2.23 we did provide a limited way to do this for packaged apps for windows by using the –console command line argument (and a script driven packaging method).

Now, (when 3.2.24 is released) all you have to do is at the beginning of your Shoes script is call Shoes::show_console. No special packaging requirements. Works on Linux and OSX and Windows. Don’t need it?, Don’t call it. It does work different on Linux, OSX and Windows because – wait for it … because it’s native. It’s also lowest common denominator so you need to know some bewares:

readline gem works, Barely. io-console (raw or cooked) is platform dependent so don’t use it. A pure Ruby version of the readline gem is included with Shoes 3.2,23+. Odds are high you can’t get the up/down arrow keys or your vi/emacs keystrokes. It may or may not handle UTF-8 input keystrokes.

It knows nothing about escape sequences. Repeat NOTHING. You can not send it color settings codes for Windows and expect them to work anywhere else. You do get backspace and tab but the tab stops are not settable.

Since the Windows version uses AllocConsole() some of that escape sequence nonsense might work for you and your app but not for your users who have doctored up their console or don’t run Windows. The Windows Console is pretty lame so people jazz it up with all kinds of yucky hacks. Not a problem I can solve nor can you.

The Gtk & OSX consoles are also pretty lame. You get a copy button and a clear button which works on every thing displayed up to when the clear button was last used. No selection and Ctl/X/V/C unless you get lucky on that platform/theme.

It’s also slow (OSX) and may it not keep up with lots of puts/printfs and/or it may slow down what is doing all the printf() with hangs for buffer full. Did I mention escape sequences are not handled?

It’s also pretty damn cool if can live with the limitations.

Shoes 3.2.23 – Finally!

We are pleased to announce that Shoes 3.2.23 is available for download.

IMPORTANT: The Hpricot gem has been replaced with Nokogiri. This breaks existing scripts that use Hpricot. See samples/expert-funnies for some quick fixes that you will need for your hpricot using scripts. Shoes 4 also uses nokogiri so this change was overdue in Shoes 3.2.

Slightly important: Nokogiri adds a lot to the download size of Shoes (everything is 12MB to 16MB now).

New with 3.2.23

  1. snapshot works like image – it collects image effects and writes them to a file (pdf, svg or ps). Search the manual for ‘snapshot’.
  2. undocumented skew method on images Use manual search for ‘skew’
  3. Cobbler gets a couple of new buttons to show the manual or splash.
  4. Windows: cmd line user packaged app can have a console window.
  5. Changes to gems – nokogiri replaces ‘hpricot’
  6. Ruby updated to 2.1.6
  7. Ruby gems updated to 2.4.7
  8. byebug gem is included for debugging Ruby/Shoes scripts and .shy. Please read the wiki article You also want to read the byebug manual to see what you can do. Setting breakpoints in Ruby, step in or step over. examine variables.

Fixed with 3.2.23

  1. Click event not working when a scroll bar is scrolled down
  2. Scrolling with mousewheel on a scrollbar within a stack is not working
  3. Borders are always at 1 pixel offset in containing slot
  4. radio button, unusual behaviour
  5. scroll wheel speed
  6. Alert placed in the position of first opened window For Windows and Linux. Not fixed for OSX.

Building Shoes

  1. platform specific extconf.rb files for hpricot, sqlite3, ftsearch, chipmunk
  2. add PackShoes.make_shy method and wiki article
  3. separate compiling gems (mostly of a Ruby thing) and copying gems which is what Shoes does now. Lots of changes to rakefiles.
  4. Command line folks can create platfrom specific pre-compiled binary gems that Cobbler can load into ~/+gems.

I want to acknowledge the code contributions of Christian and Ian and the willingness of bug reporters Luka, David, Kevin, and others who have reported bugs and helped us fix and test them. Believe me, they are keeping Shoes 3.2 alive and as you can see from the above list, better than ever. Thank you.