RubyGems: Absolute Paths

I just read Jay Field’s latest blog article on RubyGems and absolute paths.

It’s interesting to see him propose this pseudo-absolute path scheme. When I started coding in Ruby I used this scheme for the very same reason he mentions. But it soon felt to cumbersome to use. Now I wonder what the real problem with Ruby is.. concerning this path-problem.. it’s very much like a Java classpath problem, isn’t it? Well, of course it’s completely different. But still in the same area.. :)

Anyway, what I’m missing the most with Ruby (Gems), is a way to specify which files are public and which not. This way I would only need to take care of path-related issues in the public entry point into my gem. Everything else could use a require_from_gem method. But this is not really reasonable or possible with Ruby, is it? More probably: You don’t really want this for Ruby.

So I wonder if the burden shouldn’t be on the gem’s user’s shoulder. The gem should probably remain clean and tidy with only relative paths. The user would then have to use something like require_gem_add which loads the gem and adds the root path automagically. Or gem_require should take care of this automagically based on the spec and checking the path. Not sure. Anyway, I don’t think that these clumsy require File.dirname(__FILE__) + [relative path] statements are the best solution.

Well, just a thought..


Procedural Textures

This is the future of gaming. Just today on my way through the rain I’ve been thinking about procedural textures. Because I find the Oblivion world so boring. And this is to a large extend a question of limited storage. Procedural textures are one step. Procedural quests are another. You know where this will all lead in the end, don’t you? :)


Thoughts on Haskell and other Stuff

I just found the time to read Haskell and Scheme. It made me remember the old Gopher days at the university. The moment I finished the Huffman encoding I realized the benefits of being able specify functional shit in a functional style. Quicksort is probably the better example. How cool is that?

But there’s a problem. And it’s a simple problem. The world is not purely functional. And sometimes the world is huge. What I mean is this: Sometimes it is important to have something like the Java API or .NET as your foundation. There just is no way around it. Even in languages like Ruby. You can believe the Ruby and Rails hype. There is some truth to it. But just don’t try to process lots of data with Ruby. Don’t write a multi-player game server. Don’t do this. Don’t do that. Of course other languages can be used. Erlang comes to mind. And some C++ zealots will tell you that C++ is the only choice for game-related stuff. BS, I say. Nevermind.

No, look at JRuby. It is an amazing system. Combining the wonderful world of Ruby syntax and expressivness with the Java API. And yes, Haskell can somehow be extended through C code interfaces. But that’s just not the same. Not by far. JHaskell is what we need.. :) (But then again, with the current limitations of the JVM and the way the Sun guys somehow tend to avoid breaking compatibilty, the JVM will probably evolve too slow and be replaced sooner or later by something else. Maybe the CLR. Maybe something else.)

So – for me at least – it all comes down to making a language available for the Java API (well, the JVM really) or .NET (CLR). Of course this has implications for the target virtual machines. It’s all being discussed already. No need to go into this here any deeper..

In a perfect world I could use IntelliJ to edit my source code. With support for Haskell, Ruby and Java. And all the files use the right compiler to generate classes and/or byte code. And it all would just work together. On an Ant level haskellc and rubyc would be available besides javac. With rubyc being a funny thing.. :) In fact, interpreted scripts are still a bit of a problem if you think about it in a Java project structure context. Don’t you think?

Well, it’s cool enough that you can use JRuby to run a script and it has the full Java API available. That’s a start.

Anyway, I’ll wait for a JHaskell. And while I wait I play some frickin’ BF2142. :)



I can’t wait to read The No Asshole Rule.

It’s simple. I know that I’m an asshole. The question is: Where to draw the border? You can easily end up being an asshole if you don’t fit into “normal” paterns. I don’t eat carrion. I don’t drink. I don’t smoke. I don’t drive a car. The list goes on. And boom: I’m an asshole. Not in the Denis Leary sense, of course :)

Another, more important question: If you have a company with three assholes, and no one else around. Are they still assholes? And how’s better off? The three-asshole-company? Or the “corporate environment” with 50 non-assholes? :)

It may sound stupid or funny. But there is a serious aspect to it..



While reading this I started thinking: It is time to fight back with their own weapons. Use botnets and write virii and trojans to patch and/or clean machines. If machines are found which are beyond repair (basically all Windoze, just destroy the filesystems and make them shutdown. Maybe show a note first: Please upgrade your system to the latest Windoze installation or go Linux or OSX. Then destroy the system.

What else is left for us to do against spam?

There are certain legal issues, you say? Uh oh. I do not know nothing about that.. :)