Efectos Especiales

Ramblings, rants, musings, ideas and observations. Topics include (but are not limited to): programming (especially Python), books, games (especially CCGs and board games), astrology, design, writing, painting, etc.

icon:books #769 Ouwe koek

Doop man! Vet! Old Dutch children's books. (Via.) Probably only of interest if you're Dutch. emoticon:smile I read some of these 20+ years ago.

/* Posted by Hans Nowak at 2005-04-13 23:52 */

icon:default #768 Van boven

The "satellite picture" option of Google Maps sure is interesting. For example, here's Epcot.

(The World Showcase pavilions are located around the lake. You can also see the crystal-like dome near the entrance.)

You can also see the Netherlands, but the quality isn't very good (yet?). For some reason, zooming into the map of Iceland works rather better. Maybe because it's closer to North America.

I note that when you click "Link to this page", the picture zooms out a bit. I wonder if that's intentional?

/* Posted by Hans Nowak at 2005-04-05 11:43 */

icon:games2 #767 24, the arithmetic game

This should appeal to your inner geek...

Matthew Gray:

"There's an arithmetic game called 24. The idea is to take four integers and using the four basic arithmetic operations plus grouping, produce the number 24. A friend recently mentioned this game again and mentioned two of the more difficult sets: "3 3 7 7" and "1 3 4 6". They're good ones. Some simpler examples: "1 2 3 4" is solved as 1*2*3*4. "3 4 5 6" is solved as (5+3-4)*6. "5 5 9 9" is solved as (5*5)-(9/9). For low integers, roughly 80% of combinations work.

[...]

Other ways the puzzle is played is to not limit yourself to 24, but to try to combine a set of numbers to produce 0, then 1, then 2, then 3, etc. Some sets of numbers will let you get quite high. "1 2 5 6" will produce every integer up to 43, and 60 distinct integers. "2 5 9 10" will produce 79 of the numbers from 0 to 100 and 124 distinct values overall. It's first miss is 41."

I tried "3 3 7 7". Not so easy, eh? emoticon:dizzy2

If exponentiation was allowed, "0 0 5 5" would have a solution too...

/* Posted by Hans Nowak at 2005-04-05 10:04 */

icon:python #766 Ah! To be a newbie...

Almost 8 years ago I posted to comp.lang.python for the first time, with a seemingly innocuous question about the then-new Python 1.5. Little did I know what kind of reply I would get. emoticon:smile

The whole thread is in this spirit, by the way.

/* Posted by Hans Nowak at 2005-04-05 09:55 */

icon:firedrop #765 Firedrop 2005.8 available

Alright lucky duckies! Firedrop build 2005.8 is available in the usual place. It requires Wax 0.2.57.

(For those who don't know, Firedrop is a client-based blogging tool. Written in Python, of course.)

What's new? Most importantly, Firedrop now has a plugin system. It's still under construction, but several plugins are already available. The idea is that you can write a piece of Python code that is executed when you press a button, or when a certain event happens (before building, after building, etc).

Michael Foord (Fuzzyman) wrote some of the plugins, and an overview of the Firedrop plugin system. Notable are FireSpell (spell checker for your posts), InteractiveGUI (open an interactive window and run arbitrary Python code or tinker with the Firedrop internals), and OutBox (stdout/stderr output appears here).

There are some other changes, like a menu history (allows you to easily reopen previously opened sites); and a new option in build.ini: page_ext, which can be used to set the default pagename extension. Default is ".html".

More changes are on the way.

/* Posted by Hans Nowak at 2005-04-03 23:02 */

icon:wax #764 Wax 0.2.57 available

Alright lucky duckies! Wax 0.2.57 is available on Sourceforge.

The last "official" release was 0.2.45. The most important changes since then:

mylabel.SetProperties(Font=MyFont, Size=(100,25))
# and:
mylabel = Label(parent, 'hello', Font=MyFont, Size=(100,25))

/* Posted by Hans Nowak at 2005-04-03 13:30 */

icon:default #763 Shut up, foo

Gah, I'm glad it's April 2nd. One April Fool's joke, or a couple of them, can be fun. But when you get 50 of them, it gets a tiny bit old. emoticon:argh

/* Posted by Hans Nowak at 2005-04-02 11:27 */

icon:ruby #762 Back in red

So I had to try this Ruby on Rails thing... not because I was particularly interested, but because our company might get a project that involves building a web app.

I know precious little about both web apps and Ruby. I wrote a web app before, but that was 5 years ago, using ASP and VBScript. I also looked at Ruby before, and wasn't impressed. Back then, my conclusion was that there was no real reason to learn it if you already knew Python.

Well, it seems Ruby has come a long way since then. Besides code blocks, Ruby-land now has at least two things that Pythonia lacks: A killer web application framework, and the RubyGems package manager.

Downloading and installing Ruby 1.8.2 for Windows is a breeze (and it no longer breaks Python's Tk). It appears that a lot has been improved since I last checked; for example, there's an IDE now (FreeRIDE).

Following the instructions on http://download.rubyonrails.com/, I downloaded RubyGems. This is a zip file; there's no installer or anything. However, with Ruby already installed, all I had to do (apparently) was unpack the zip file, then run setup.rb and post-install.rb. That seemed to do the trick. [I hope this is correct; I haven't had any problems so far, though.]

From the command line, I ran gem install rails. This downloaded and installed Rails, and a bunch of dependent libraries. Everything worked right out of the box.

(At this point I had a few pointless detours... I downloaded the 22 Mb introduction video, which doesn't display well on my screen, and which doesn't seem to have sound... unless my QuickTime is messed up. I also tried to access some wiki pages, like RailsAcademy and Getting Started with Rails, but was greeted by a 502 Bad Gateway error.)

Then I discovered a tutorial that shows you how to make a to-do list using Rails. Created a database and table in SQL Server. (Yah, I want to run Rails on Windows XP, MS SQL Server and IIS... deal with it. :-) The database configuration uses Yaml, which is refreshingly easy.

To set up a Rails site, you need to run a few scripts. These generate a bunch of files, that form the "heart" of the web app. All you have to do to make the app work is edit a file or two. (More about this in the aforementioned tutorial.)

Along the way, there was a small glitch... I got an unhelpful error, something like " is not a module/class". (Yes, it didn't say *what* was not a module or class.) It turned out that I didn't have a driver for SQL Server installed. A quick look in sqlserver_adapter.rb told me that I had to download it from http://ruby-dbi.sourceforge.net/ and then copy a file to a certain directory. That worked, but I doubt this would be an acceptable hurdle for a beginner; it could easily be improved by including the appropriate file with Rails or a dependent package.

So anyway, I got it to work. Yay me. If *I* can do it, everyone can (assuming they fix that SQL Server problem).

(The question remains why Python doesn't have something like this... Ian Bicking wrote about this the other day. Nice pottery blog, by the way. :-)

/* Posted by Hans Nowak at 2005-03-31 22:48 */

icon:programming #761 A blast from the past

Via Keith and Adam Vandenberg: Borland offers Turbo Pascal 5.5 for download. (It appears this has been available for a while, I just now noticed it.)

Ah, those were the days. Borland didn't suck, and made excellent tools. On the PC, I started with Turbo Pascal 5.0 (before that, I had been tinkering on the C64 with Basic and a bit of assembler). Then quickly moved on to 5.5 (introducing some OO concepts), 6.0 (more OO and Turbo Vision), and 7.0. (8.0 is actually Delphi 1, at which point the fun was over. emoticon:nosmile)

I miss those days. Wouldn't want to go back, but programming had a certain charm back then, which is different now. Turbo Pascal was blazing fast, even on slow computers. (I remember running it on a 286. These days, I run Delphi 7 on a 2.8GHz P3 and it's slow as a @#$%^&.) It had a cool and very useful IDE, unlike Microsoft Pascal which had no IDE at all, IIRC. It had a number of useful libraries, but it was quite doable to write your own utility functions, because it was so fast. (I remember rewriting some of the screen output functions and getting good performance.) You could also happily mix Pascal and assembler, or link with .OBJ files created by TASM or Turbo C, etc.

Things certainly have changed since then. What would I have thought if in 1991, someone had told me that in 2005, I would use an interpreted open-source language for practically all of my programming? emoticon:smile

/* Posted by Hans Nowak at 2005-03-31 11:00 */

icon:gc #760 Generation gap

It's kind of depressing when you struggle to make it through a game's levels, and then watch a kid rip through it like they've never done anything else. (Come to think of it, they probably don't do much else all day... emoticon:puh) To add insult to injury, you often get nice remarks like "you're only *there*?" and "it took you that long to get there?".

/* Posted by Hans "not much more luck with writing games, either" Nowak at 2005-03-31 10:43 */