Archive for Uncategorized

CSS Blows

It can’t center vertically without a hack. It can’t center horizontally. EMs don’t work. Things that line up in Firefox don’t line up in Internet Explorer. Things that hover in Safari don’t hover in Opera. Footers don’t stay at the bottom. IBM can spell its name with xenon atoms, but pixels can’t be controlled.

I call bullshit.

Leave a comment »

Error 500

Twitter and Blogger are farking slow. This is all I’ve got.

Leave a comment »

Possible Switch to Blogger

WordPress is waaaay too restrictive. Screw you guys, I’m going to mcandre.blogspot.com.

Comments (2) »

Foxmarks

Foxmarks is good stuff. Sure, I use Del.icio.us and I’ve tried Ma.gnolia.com and Google Bookmarks and Google Browser Sync. But Delicious and other bookmarking services fail to include JavaScript bookmarklets or favelets. There was a need to sync mine between computers:

The bookmarks toolbar is a great idea. I use the left side for these tools and the right as a pool of temporary links. Foxmarks supports bookmarklets, syncing them between Firefox on Mac, Linux, and Windows. It fills this niche nicely. It’s not intended for publicizing links like Delicious, just storing and syncing for private use. Jimmy, this is for you! Convince Flock to incorporate it.

Leave a comment »

Quartz Composer

I used an Engadget tutorial and FARK‘s colors to make a custom Mac RSS screensaver.

Preview:

Leave a comment »

Markups

My roommate needs a cable to connect his Mac to a huge monitor for watching movies. He found an HDMI to DVI adapter at the Apple store. Price: $119.95. Then he looked for one on other sites. Newegg price: $7.99. He comments, “But the Apple one is one foot longer.”

Comments (1) »

Lingua Dynamica

I’ve test driven Ruby for a couple months, and Lua for a few weeks. I’d like to combine Python’s slices with Ruby’s iterators. The syntax looks a little funny at first, but it makes more sense. Python’s

[str(e) for e in things]

is neat, like Ruby’s

things.collect { |e| e.to_s }

but more complicated chains of iterators get too confusing in Python’s syntax. Ruby’s

things.each_line.each_word.each_byte.collect { |e| e }

would be

[byte for byte in [word for word in [line for line in things]]]

in Python.

I wish Ruby Strings#each would iterate over characters instead of lines. There needs to be a String#get_bytes method, and I can’t wait for Ruby 2, as String#ord and Integer#chr are so necessary. Using

"b"[0]

to get the ASCII ordinal is just stupid.

I’d like to remove “then” from Lua, remove the coroutine constructs for simple “yield”s, and change pairs() and ipairs() to “for e in thing” and “for i, e in thing.i_pairs()”. The difference between pairs() and ipairs() is mostly useless. ipairs() is preferrable for tables and lists. The range syntax should be moved to a range() method. Also, why should I ever use

#things

to get thing’s length if it doesn’t apply to every table? Why have #things and things.n? It’s kind of like the difference between Python’s str(thing) and thing.__str__.

Six months were spent on a Python video game, under the (incorrect) assumption that defining variables in a class’s definition is the same as setting them in an initializing method. Both Ruby and Python end up changing superclass variables when this happens. Bad:

class Swallow
    @velocity=4
end

class AfricanSwallow < Swallow
    @velocity=6
end

Defining AfricanSwallow changes Swallow’s velocity, even though single @’s were used. The various tutorials told me that single @’s mean instance variables and double @’s mean class variables. Only if the variables are created in an initialize() call. One more thing: why do Rubyists have to write out the full “initialize” instead of “init”? It’s String#to_i, not String#to_integer. Lastly, attr_accessor is dumb. There’s no reason to make anything private anymore.

Monkeypatching in Ruby and Lua is great.

Building Python and Ruby apps on Macs is tough. Everything is undocumented, broken, and dependent on old versions. I’m glad Leopard is going to include the latest Ruby. Maybe then RubyCocoa will make a good installer, WxRuby will grow up, and Xcode will give a crap about Python. Freaking incorporate Gtk, Apple! It’s my dream to write GUI apps for Windows, Linux, and Macintosh that are entirely multiplatform. Not possible unless I use Tk or convince my school to fucking unblock IRC for help compiling WxRuby apps on Mac OS.

Leave a comment »

Follow

Get every new post delivered to your Inbox.