Brian Wigginton B-lib – Notes & Tutorials on Delicious Bytes of Technology

[TIP] Ruby GUI Applications and Empty Console Window

Posted on August 6, 2008

While writing a Ruby GUI app I kept seeing an empty console window. As it turns out there are two ruby executables that you can use to run your Ruby scripts: ruby, which is a CUI (Console User Interface) and rubyw, a GUI (Graphical User Interface) used to launch GUI Apps. Using rubyw will prevent that empty console from showing up. Hope this helps someone!

# rubyw myapp.rb

Edit - 8/7/08

There are actually two filetypes you can use for your ruby scripts. .rb files will run with the ruby CLI interpreter, while .rbw scripts will run with the GUI interpreter. Remember though, with no console window you wont get any status messages or debug messages. While writing and testing your GUI apps use the ruby interpreter then when your finished change the filetype to .rbw.

Tagged as: , No Comments

Strange Rendering of Fonts in Firefox 3

Posted on June 24, 2008

Firefox 3 was having some font rendering issues on my machine. Certain web sites were displaying a wierd bold looking font in place of the default font described in the CSS. See this screenshot. After doing some searching around the internet I found out the issue.

Early in the year I had installed Adobe Type Manager and added a bunch of Helvetica Postscript Type-1 fonts. These were for some reason being used as Firefox's default font. Removing them from the system fixed the issue.

Filed under: Uncategorized 1 Comment

Learning a New Language

Posted on January 8, 2008

Larry O'Brien over at knowing.net has a great series called 15 Exercises to Know a Programming Language, It's an older article but after going through parts 1-3, theres really nothing in there that changes often enough to warrant any kind of an update.

  • Part 1 gets you used to using some of the more basic features of a language including, calculations, the standard libraries, file i/o, GUI development, and debugging.
  • Part 2 introduces some more advanced data structures, object oriented programming, idioms, memory issues, design patterns, and concurrency.
  • Part 3 presents web interaction, libraries, encryption, and databases.

There's obviously a lot to learn when starting to cover a new language. Larry's posted some great ideas for getting used to a new language, and once you accomplish all these, you go from playing with the language to knowing the language.

Filed under: Uncategorized No Comments

Linux w/ Mac Scrolling

Posted on August 28, 2007

Is it possible to make it so that I laptop running synaptic drivers can make it so that you can scroll pages with two fingers on the pad?

Update: Thanks to okke in the comments, all you have to do is add a line to your xorg.conf file to enable 2 finger scrolling. There's a wiki entry on the Gentoo Wiki about doing so.

Filed under: Uncategorized 2 Comments