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.#769 Ouwe koek
Doop man! Vet! Old Dutch children's books. (Via.) Probably only of interest if you're Dutch. I read some of these 20+ years ago.
#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?
#767 24, the arithmetic game
This should appeal to your inner geek...
[...]
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?
If exponentiation was allowed, "0 0 5 5" would have a solution too...
#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.
The whole thread is in this spirit, by the way.
#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.
#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:
- New ArtProvider class by Mark Andrews. (Use with caution; an updated version, with possibly incompatible changes, will be available later.)
- In some places, the use of
str
has been replaced withutils.asstring
, which fixes a bug (having to do with unwanted conversion from Unicode to ASCII). (Reported by Viktor Ferenczi.)
- Setting mouse pointers is easily done with
obj.SetCursor('name')
. There's also a global registry,MousePointers
, where users can add their own names and images. Once registered, these will be available viaSetCursor
. (Also see examples/setcursor-1.py.) Based on code by Mark Andrews.
- Beefed up
TextBox
with more styles, events and methods.
- Added
CustomDialog
, which is less "restrictive" than vanillaDialog
. Users can add their own return values and associate them with buttons. (See examples/customdialog-1.py.)
PlainContainer.Pack
is now non-trivial: it fixes a bug (or rather, possibly unwanted behavior) when there's only one control in a container.
- "styles" can now be found in the appropriate modules, rather than in
styles.py
. (E.g. aButton
's styles are now inbutton.py
, etc.)
- Added
WaxObject.SetProperties
. This is called for additional parameters in the constructors. You can now say:
mylabel.SetProperties(Font=MyFont, Size=(100,25)) # and: mylabel = Label(parent, 'hello', Font=MyFont, Size=(100,25))
- Wax is now available under the BSD license. More information in LICENSE.txt.
- Added first version of
waxdocgen
, a script that generates Wax documentation. (It's not done yet; Roy Osborne volunteered to take a look at this and improve it where necessary.) (I would have used (e)pydoc instead, but there were problems with some modules, especiallycore.py
.)
#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.
#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. :-)
#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. )
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?
#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... ) To add insult to injury, you often get nice remarks like "you're only *there*?" and "it took you that long to get there?".
Design and content © 2004 Electric Shock / Hans Nowak