Category Archives: Uncategorized

Curse of the SVG

This enhancement request has been hanging around for while. It seems reasonable on the surface but devil is in the details and the Devil is mean or I’m not very smart. I suspect both are true so I pressed ahead.

This would be a brand new widget for Shoes. It would look a lot like Image but it’s not – you can’t draw other art on top of it and save the result. It won’t do many of the Image transforms. It’s different and really difficult since nobody knows how to create and new widget in Shoes. Obviously I’m close enough to almost working that I can mention it. It’s been a lot work since the last blog post here. Rest assured, 3.3 is moving ahead.

New Mailing List

There is a new Shoes email mailing list you can join since the old one seems to be tits-up, pining for the fjords, deceased, unresponsive and generally speaking, not alive. Please join the new list. Talk about what ever Shoes related thing you want. Shoes 3.2 or Shoes 4

I’m not going to try to convert old subscribers or old archives. Diminishing returns and … It does run on my host (that I pay for because free doesn’t always work). Free to you. Since I pay for it runs by my rules. Rules: I hate spam, spoofers, sock puppets and trolls. I don’t expect any of that, but just in case know that it’s my rules and I’m pretty liberal in a free speech sort of way.

And then there were forums

This really doesn’t have much to do with the next version of Shoes 3.2 or Ruby but since I’ve been working on processing http logs and website things, I might as well fix some things on this website that have been on the back burner.

Notice the menu bar at the top of this page. Forums! Under that there is only one forum and it is just a test forum which I invite you to create throw away comments. Create new topics, reply to another topic or your own. I’d like feedback. Does it work? Would you use it? What needs to be changed?

That was a less than successful experiment.

Heavy hand

After all that SQL bullsh*t to process the http log files I decided to just block all of China in my htaccess at the download site. Report your problems with that choice here or at the github

FWIW I got the block list from here. Is that the best list? Do I care?

I did create a new github repo with to hold the Ruby/Sql scrits I’m using to process the Apache (Combined) log files. It’s a decent example of the escape hell that SQL from Ruby creates. There’s tutorial value there but I’m unlikely to write that tutorial or adapt it to Windows

Analyze this

Almost not related to Shoes: I wanted to discover how many of the hundreds of the daily downloads are what I would consider legitimate – real people downloading Shoes or real people using the Shoes packaging. How many bots, or idiot leachers or just evil folks and what are their IP#’s ? Some of them need to go into .htaccess in deny entries.

So I created some ruby scripts to process a collection of Apache (combined format) log files and stuff them into a local Sqlite3 db. I’m not a fan of SQL, but it’s the right tool for this. After many syntax errors I’ve got 7 days of shoes.mvmanila.com log entries (3475) which is enough to pick out the evil-doers, the idiots, the clueless and the friends.

Did I mention I don’t like SQL. I barely know what I’m doing. If someone one wants to help me analyze these logs, contact me at ccoupe@cableone.net and I’ll share the Ruby scripts and database. Because some of us jusst like to know things. I share your pain.

For example:
sqlite> select * from logentry where browser='Ruby'; shows me the Shoes (or other Ruby), AKA real people are using packager. If I knew SQL better I could probably figure how to count them or I could parse the results into a ruby hash based on the url (what are people really packaging for). Yes it would be butt easy to bin them into a ‘friends’ table and to populate an ‘evil doers’ table (because they POST instead of GET or they GET on things like index.php which just don’t exist at the site. Create another table for script kiddies. Some might end up in .htaccess deny entries.

Yes, I can track user behavior IF they use this site. I don’t care unless you abuse this site. There is a lot of abuse going on and has been ever since I went live. It always will occur but that doesn’t mean I have to accept it forever. I can clean my house and lock the doors when I want.

Shoes 3.2.24 is available.

Available at the usual places
New with 3.2.24 or here (same place)

  1. Added show_console command for OSX and Linux to match Windows.
    Dumber that dumb console. Works with readline if you don’t expect too
    much. Although -w and –console switches do work on the command line
    you probably don’t need them now that you can call Shoes::show_console
    Design:-New-Shoes-Console
    Issue #127
  2. OSX: new cshoes script for using Shoes from the command line.
    Fixes some annoyances.
    Issue #17
    wiki: Command line for OSX

Fixed with 3.2.24

  1. Restore old behavior with ask/alert/confirm auto converting to string
    Issue 111
  2. OSX: Fix issue #08 (again)
  3. OSX issue #20, 137 – command line incomplete, multiple apps
  4. dialog works better
    Issue #119
    Issue #136
  5. OSX: ask() dialog gets an icon like alert() and confirm()
    Issue #138
  6. Windows: can now find the correct timezone for Time.now
    Issue #123
  7. Windows packaging bug
    Issue #128

Byebug

Byebug is a Ruby debugger and it works on Shoes if it’s launched from the terminal (Linux, Windows) and if you can compile the gem and if your do the require 'byebug' and insert the byebug command into a shoes script where you want debugging to start. Obviously, not integrated into Shoes but if It could be taught to use the Shoes-IRB console that might be very interesting. No promises.

3.2.23 beta but not really

I’ve been swimming in the deep waters as has contributer @passenger. Laying the ground work for a better future.

No, really we are. It’s also spring time and outside calls. The potatoes in the garden look good for this early. I’ve been looking for a new car – an endeavor that gear heads take very seriously.

Still, I did managed to come up with a scheme to handle gems better but that’s a developer improvement you say?! On the other hand I’ve got nokogiri built in to Shoes 3.2.23 instead of hpricot. That turned to be a huge effort. On the other hand, if the gem can be built by Ruby (all platforms) , it can be included into a Shoes build, if you build Shoes from source. It’s not difficult one you know what to do which turns out to be ‘a wee bit tricky’. Anyway, that’s in the Shoes 3.2.23 bets Plus some bug fixes and tweaks.

At the moment, you can’t package your Shoes app with platform dependent binary (‘C‘) gems. I have a cunning plan.

Creating Icons for Shoe’s (apps)

To test the default custom packager I need some icons and an a Shoes app (must be shy’able app). I ‘ll use my Shoes app, ytm – Yield to Maturity calculator which is stored in the ~/Projects/ytm/ directory on my system. I don’t want the icons inside the ytm/ – a decision I’ll probably change later. For now, being a clever boy, I’ll create ~/Projects/icons/ytm/ and do the dirty work in there. For now I only care about the icon on the Desktop.

For Linux that’s PNG image data, 128 x 128, 8-bit/color RGBA, non-interlaced. I’ll be using Gimp on Linux so the first thing to do is create a gimp file ytm.xcf, and create a new file 128*128 with a transparent background and then set the text tool to 48 pts and cleverly create this minimalist thing that I export from Gimp into a png.

It’s only a test. It doesn’t have to be pretty! I’ll name it ytm-128.png. Then scale it and export for 64×64, 48×48, 32×32 and 16×16. you can easily guess the the names.

Now I need to make a Windows ico file. And a OSX icns file. Gimp is less helpful to clueless folks like me. I have ImageMagick so it’s a simple $ convert ytm-16.png ytm-32.png ytm-64.png ytm-128.png ytm.ico. That’s a larger file (90Kb) than I’d like but it’s only a test. The interwebs is filled with cloud apps to do the work for you. I used IConvertIcons. Good enough for me.

ccoupe@bronco:~/Projects/icons/ytm$ ls -ld ytm.*
-rw-rw-r-- 1 ccoupe ccoupe 20974 Nov 27 00:26 ytm.icns
-rw-rw-r-- 1 ccoupe ccoupe 99678 Nov 27 00:18 ytm.ico
-rw-rw-r-- 1 ccoupe ccoupe  1033 Nov 27 00:28 ytm.png
-rw-rw-r-- 1 ccoupe ccoupe  2824 Nov 26 22:44 ytm.xcf

Deep in the weeds

I’ve been working on the Shoes hanging bug on Windows. It hasn’t been easy and I’m way above my pay grade on Windows internals. So many rabbit holes to explore. Every time I think I know what’s happening, I’m proven wrong.

Today, once again. I think I know what’s going wrong. I’ve got clues and hypotheses. I’ve confirmed some “that’s not right” behavior deep down in Shoes and Gtk/win32. I’m also smart enough to know that I don’t know my ass from a hole in the ground. I’m getting a lot more Windows education than I ever wanted.

At the moment, I think gtk/win32 and Ruby have different ideas about what an ‘fd’ is and that I should ‘unify‘ them. [snort]. One fd table to rule them all. Or a hack so each (Gtk, Ruby) believes their is one unified fd table. I’m leaning towards the hack. And then I’ll fix the real problem.

Or Shoes 4 will be released.