Skip navigation

It continues to boggle my mind how absolutely terrible flash for OS X is. On a Macbook, videos are almost unwatchable (I can barely hear anything over the fans killing themselves (and my headphone jack doesn’t work, but that’s a separate issue)). So, without further ado, I give you the evidence: processor usage while watching a video, one in flash, the other with the html5 video element.

First up is the flash video. The video being watched in question is youtube’s video of google’s O3d.

flash rapes my processors

flash rapes my processors

If we look at the same video on youtube’s html5 demo, we can see that the impact is hardly noticeable.

html5 is nice and light

html5 is nice and light

I am aware that this is hardly thorough investigation, but the problems are still apparent. Ideally we could get some kind of plugin that would replace flash video embeds with an html5 version. In the end though, no conclusion, just complaining.

Well, I’m actually working on a website now, a really simple CMS I’m doing for a group at school. There’s no money in it, but it’s a good learning experience. At any rate, this did mean that I had to choose some sort of a web framework. In the end I went with Django.

The other framework that I seriously considered is Rails. Rails is quite nice, but there are several issues I had with getting up and running with it. The first issue was learning curve. Compared to Django, it’s a lot harder to get started in Rails. The issue isn’t one language versus the other, I’m equally fluent in both, but in Django it’s a lot easier to see how things fit together. With Rails I feel that you are expected to just trust the the framework will take care of things for you. It’s very nice the way all of the models, views, and controllers fit together, but really it’s just a bit too “magical” for me.

Django on the other hand does some stuff magically, but it’s more transparent about it. Things fit together and I can see where the pieces are coming from. I suppose some people are okay with putting up with magic until they can finally see through it, but I’d prefer to understand things now.

There are however some things that I feel I’m giving up from Rails. Number one is Rail’s wonderful template system. I really like how easy it is to make reusable parts that can easily get added in. Django makes similar things possible with it’s blocks and inheritance stuff, but it seems considerably less intuitive to me.

That being said, there are some wonderful benefits that come with Django. For one is the automatic admin interfaces. The app I’m working on is a simple CMS, for which the data input will be almost entirely done on the admin end. That means a lot less work for me. In addition to that, they’ve also got a couple of wonderful pre-made applications that I can just drop into mine and have work. I don’t have to worry about User and Group models, it’s got a built in system for storing one off plain html pages (like an about or contact page), and it has a comments system that I can attach to anything I care to.

I’m sure that Rails has some similar things either in the form of plugins or are easy enough to implement, but the fact that Django comes with them is good enough for me to use it.

All things said and done, they are both wonderful frameworks. I would like to explore Rails some more though; once I get past the magic I feel that using it will be quite wonderful. For now though, Django is easier to learn and I’m going with that.

This is all from the eyes of a person new to both frameworks, so there is probably I’m missing in this picture. If anyone is knows about some wisdom I lack in this arena, please enlighten me.

I have been, for about the past month, exploring some different languages, looking for one that I may want to invest time into learning. I thought that I’d do a comparison of the different languages I’ve looked at and what I think of them so far.

Haskell

I’ve messed with Haskell before, and I do enjoy it quite a bit. It’s a really cutting edge language, and there are so many neat things that you can do with it, that it would take too long to mention them all here. It’s main features are its functional purity, and its laziness. Combined, these can do some really amazing things, in very little code.

The problem with it is, of course, its abstractness. Wrapping your head around its higher order types takes lots of work and lots of time. I don’t have a particularly good understanding of it myself, but I do plan on messing with it some more in the future.

Lisp/Scheme

I really want to learn lisp. It is the quintessential meta-programming language, and it can more or less do anything. The trouble I’m having with it is getting started. I like the looks of Scheme more than  Common Lisp, and I plan to pick up The Little Schemer when I find it in a book store. I’d also probably want to use Clojure, because the Java libraries are great.

Ocaml

Ocaml is neat for a couple of reasons. It’s absurdly fast, faster than C++ in lots of cases, and it’s functional. It doesn’t force you into Haskell’s level of purity which is good, because you can get lots of stuff done without resorting to Monads. I’ve not invested a lot of time with it yet.

Scala

Scala is kind of neat. It runs on the JVM and attempts to blend both functional and object oriented programming. Overall it seems to achieve its goals, but the syntax just seems extremely complicated to me. It has everything, and the syntax reflects that.

Smalltalk

This one is a bit different than all of my previous explorations, because it’s OO rather than functional. Smalltalk is probably the best object oriented language out there. Everything is an object, there is no other syntax in the language besides that of a message send, and everything is accomplished like that. Even if-statements are just method calls to boolean objects.

It’s really pretty amazing, and there are some really nice libraries out there for it. The one that most caught my eye is Seaside though. The day I spent messing with Seaside was probably the most exciting experience I’ve ever had with a web platform. The only issue I have with it is that its URLs are really ugly.

The only big issue I have with Smalltalk is the environment. As neat as the image based approach is, the environments for it are kind of awkward. Squeak is neat, but it feels like a toy. It’s amazing to be surrounded by the very objects you’re working with and creating, but for the most part it’s annoying, and ugly.

For now I’m sticking with FScript for OS X because it’s more or less Smalltalk, is integrated with the OS, and is able to interact with pretty much any running program.

All of these languages are pretty neat, and I wish that I had more time to explore them with. In the meantime though I think I’ll work with Smalltalk and Scheme.

Addendum: I’m also looking at Erlang, but I’ve gotten even less far into it than I have with any of the above.

So, driving past the golf course today on the way to my grandma’s house I got the neatest idea: Gravity Golf. You’d use gravity to launch some sort of a ball for a loop and try to get it to land in some sort of a hole (probably of the black variety). I’ve been wanting to do something with a gravity simulator for a while, and I think that this could potentially be a neat game.

The basic idea is that you start with an asteroid or something, and hurl it out into space. It then interacts with all of the planets and stuff in space via gravity. With any luck you’d be able to get ball to orbit a planet, or use its gravity to launch it out to another planet where it would orbit some more. Should you fall into a fixed orbit, or land on a planet, it’d be like moving to your next hit in golf (I don’t know golf terms, but the thing you count and want to be around par).

Thing could potentially get complicated when we take into account things like stars, and moving planets. Stars would kill your ball, and planets orbiting other things would add to the timing and skill needed for the game.

I’m thinking that I could pull this off, provided it stays in two dimensions. For the physics involved, it’ll need a mass, position, velocity, and acceleration (the last three of which will all be changing). Simulating something interacting with the gravity of multiple planets may also be rather complex, but I’m not going for complete accuracy, and for the time being I’m not thinking about planets interacting with each other.

This stands for “what you see is what you think you get until you hit post and it destroys all whitespace”. Or more affectionately known as whizzy-whitty-guy-paidaw. In other words, it looks good until you actually hit post.

Everyone has talked about what words the English language is missing, and indeed there are quite a few of them. There are the ones that everyone talks about, like the lack of a gender neutral singular personal pronoun, but I have discovered a new word that needs to be. This word would be a person who you know online, who isn’t someone you actually know, and it would be used when speaking to people who you actually know.

Read More »

Alright, for my Java class I had to create an original program, from conception to completion. I chose to create a poem generator. The result of that adventure is now before you. What this is a generator of arbitrary poems. It will make poems of several varieties about many different subjects. An example of a haiku about animals is shown below.

Pig locates leopard
A horse smacks rat from a gnat
A rat purrs from gnat

Pig locates leopard

A horse smacks rat from a gnat

A rat purrs from gnat

Read More »

So I’ve finally gotten around to reading the book I picked up about Core Animation. The framework is quite neat and it does what it promises to do very well, as well as a whole lot more. My main interest in it is making interfaces and I’m looking forward to doing so later in the book.

The issue it has brought up though is just how verbose Objective-C really is, especially when you start to get deeper into it. The lack of namespaces really starts to show it’s toll. 

Read More »

I decided to import all of my old stuff, there are really only three posts that I think have any decent content so I did it for those.

I have spent the day messing with these two things (which for those who don’t know are an implementation of the Ruby language on top of the Objective-C runtime and can be found here) and I must say that they are quite amazing, in fact I’m going to go ahead and offer some speculation about the future of the project.

First though a bit about what it allows you to do. You can write programs in Ruby quickly and easily in gorgeous, and idiomatic Ruby.

Personally I think that as the project matures it will begin to replace Objective-C for application development on OS X, and Objective-C will just be used for Libraries. With Hotcocoa bindings things would be even easier. I plan to write a small app to try some of these things out.