December 13, 2010
It seems that above the red line there's no more building allowed. Or maybe the air's not dense enough for blocks to form. Or something...
Too bad, I didn't even make it halfway through. Well, maybe my productivity will improve again. :-p
December 10, 2010
December 01, 2010
November 15, 2010
You've probably all heard of the Kinect and the fact that it only took about three hours after release before someone got it running on Linux. A lot more has been done in the mean time, and creativeapplications.net has a nice writeup of it.
And, of course, there is also Johnny Chung Lee who has been working on Kinect. If you have seen any footage of a Wiimote being used for a cheap multi-touch screen, that was probably Johnny. He's even featured on TED.
Update: There is some more fun stuff over at Ars Technica.
November 02, 2010
If you've never played this game then seeing some screenshots or reading about how beautiful it was will probably not mean much to you. But I don't know of anyone who has played Ico who didn't step away without some sort of emotional experience, without some real connection to this game.
The article says this is a game you should play alone. I understand, but I don't really agree. I played through this game with a good friend, and whether you're playing or simply watching, it's a great experience either way.
October 18, 2010
Anyway, back to the geekiness which Minecraft seems to generate in huge amounts: here is a guy who set up a real-time path traced Minecraft.
October 17, 2010
October 02, 2010
If you're a Koopa developer the following should cheer your day: I reworked Koopa's build system so that you can compile everything from a simple 'ant clean all'. Up until now I have been relying on Eclipse and the ANTLR IDE to compile everything for me (minus a few tasks which I did automate). This made it hard for new developers to get going (yes, there actually are a few brave souls who gave it a try). The new system should take away that problem.
Look for the updated system in subversion on sourceforge.
September 30, 2010
September 29, 2010
September 27, 2010
I have been having a bad time with headaches these last two weeks. I think hardly a day went by without getting struck with one.
The worst are those you get up in the morning with. They just ruin the rest of the day, right there and then. Your energy is gone a lot faster, and it gets much harder to focus on things. Plus, worst of all, you get really irritable. And then I get irritated at getting irritated.
I try to get past my headaches with as little pharmaceuticals as possible. One really nice remedy is a Chinese balm which is used to help sprained muscles. It heats the flesh, and when applied to the forehead can actually suppress headaches. So from this we can deduce that a headache is nothing more than a sprained muscle. And there's a lot of muscle in my head. ;-)
But sometimes there's just no getting around it and then I'm back to my Dafalgan and energy drinks. It's a lethal combination, but it often works.
Well, I'm still clear-headed now, and so there's only one thing to do: watch some House MD. :-)
September 07, 2010
Best talk I've seen in a while.
As an aside: I haven't been writing much because I haven't been doing much worth writing about. I'm still working on Koopa, trying to flesh out the grammar to be more complete. I want to work further on Doodler, but I'm somewhat stuck on getting the architecture right. What I have so far doesn't feel right somehow. So I'm waiting for some inspiration.
Also: I've been playing Mirror's Edge, which is a crazy game. I don't think I have ever cursed quite so much while having so much fun. You're basically constantly dying until you figure out the right route and the right actions to take. Fun! :-)
Quick reviews on some other games. Fallout 3 is nice, and not what I had expected. Heavy Rain was bad. Assassin's Creed disappointing. Oh, and I'm dying to play SimCity 4, but they don't sell the bloody game anymore...
So, how are you guys doing ?
August 21, 2010
August 14, 2010
There is a blog to go with this, but not in a language I speak.
Wish I could build something like that. I think I could handle the software and the cabinet, but the controls, wiring and arduino-magic are beyond me. My dad always said I should take an electronics course, but I never really considered it. Though I doubt that he was thinking about using it for stuff like this... If this was on the curriculum I would have signed up in a heartbeat. :-)
August 13, 2010
July 30, 2010
July 24, 2010
July 22, 2010
This is my 100th post (jay!). I was wondering what to use it for, but now I think it will just confirm me as a TED fanboy.
Is it just me or are we going through a wave of alternative input devices ? First we were waving a WiiMote, then we were going multitouch on everything, then we've got camera's following our every movement, and now we can think about something and it just happens... Things are going crazy.
This has some implications though. If you're a developer your apps are going to get more complicated, and so is your coding. I mean, how do you really program for these kinds of devices ? Simple frame-based interfaces are not going to cut it anymore. And simple onClick handlers will no longer be enough. I hope that the creators of these devices understand that. The device itself is just half the story. Making it usable by everyday programmers is another.
But even beyond the developer's troubles lies this: people are going to be much more sensitive to computer responsiveness, or really its lack thereof. I recently noticed that when I get into a state of flow the slightest interface hickup can throw me off. Simple example: typing and the computer not being able to keep up with your input because it's too busy doing something else. Or typing in an input box and then some other app takes focus and suddenly you have to start switching back and restart. (This is a major annoyance to me. Really, if a user is typing in something don't shift focus away from that !!!) Now think what will happen when our control becomes ever more complex, more finegrained and more subtle. Consider what happens when you have all these devices working hard to blur the line between you and your computer and your computer can't follow you fast enough... I think this is frustration waiting to happen.
And that's were I think this technology will stand or fall. If it can truly make itself invisible then it will score. But if it gets in your way for any noticeable amount of time you'll start hating your pc again.
Well, I guess my 100th post was not just another look-at-this-cool-ted-talk. :-)
July 13, 2010
Remember my rant on trying to find a better language for programming enterprise applications ? Well, Rust might be a valid candidate. Here are some of its features as found in the FAQ:
- Memory safe. No null pointers, wild pointers, etc. Automatic storage management.
- Mutability control. Immutable by default. No shared mutable state across tasks.
- Typestate system: ability to define complex invariants that hold over data structures.
- Very lightweight tasks (coroutines). Cheap to spawn thousands-to-millions.
- Multi-paradigm. pure-functional, concurrent-actor, imperative-procedural, OO.
- First class functions with bindings.
- Structurally-typed objects (no nominal types or type hierarchy).
- Multi-platform. Developed on Windows, Linux, OSX.
- Practical rule-breaking: can break safety rules, if explicit about where and how.
Actors, first class functions, cheap coroutines: Rust definitely is a contender. I'll have to keep an eye on this one.
July 07, 2010
I just updated the Koopa Cobol Parser with a new version. It now supports parsing Cobol code in either fixed format or free format. Don't know what I'm talking about ? Here are the definitions as found on COBOLPortal:
Fixed Format Source - Each COBOL source line consists of 80 characters which are divided into various fixed areas. There are restrictions on the syntax that can appear in each area.
Free Format Source - Each COBOL source line can consist of up to 250 bytes of characters. There is no restriction on where syntax may appear on the line.
I don't restrict lines to either 80 characters or 250 bytes (note the difference in units btw.), but other than that it should be as described.
The GUIs and the command line application have been updated to give the user the choice of which Cobol format to use. Default is fixed. Just pick what you want in the "Parser settings" menu, or by passing "--free-format" as an option on the command line.
As usual there is an executable jar available on the sourceforge project page.
June 22, 2010
You might remember me freaking out a little about Firefox knowing my location quite accurately. Seems to be a fluke though. I gave my app to a colleague who tried it from his home, and his location wasn't anywhere close to reality. So it's not the most reliable way of finding where you are.
However, try running this on a device with GPS (say, an iPhone), and things improve quite a bit (which should be no surprise). I consistently got accuracy to within a few meters. This means that you can actually do some very interesting, fun and useful applications straight in the browser. E.g. leaving virtual tags in physical locations.
The Google maps API is pretty awesome, by the way. Adding maps to your website takes no more than five minutes of your time. And the flexibility offered is really quite amazing (select your zoom, map type; choose your controls, or define your own; add markers, popups, statistical data;...).
Also, Rails made it pretty easy to store and retrieve locations I've been to. That too was set up in no more than an hour (that's for someone who hadn't looked at Rails in quite some time).
So overall a fun and educational experience. And again some code to throw on the already quite sizable pile of unfinished projects.
June 14, 2010
June 11, 2010
Hey, Blogger finally has some new layouts to play with. Nice! The choice still is quite limited, but you get a lot of customisation options to help make up for it.
Right, I was going to tell you I'm sidetracked again. I was working on my 2D scenegraph based document renderer, of which I posted some screenshots earlier. But right now I'm really experimenting a combination of Ruby on Rails, geolocation services, the Google maps API, and my iPhone.
I discovered something scary in the process: Firefox has this built-in geolocation technology (well, it's a combination of FF tech and a Google service) which quite accurately is able to tell me where on earth I am. Without the use of GPS. Without me having given it my address in any way. With only my own network around to possibly recognize. Sure, they could have linked that to my location, but I don't think they've been wardriving around here.
If you're not slightly freaked out about your laptop being able to tell where it is and, hence, where you are, then you have a stronger stomach than me... Though I guess it would come in handy when you lost it. Just remotely connect to it and let it tell you. :-)
June 01, 2010
Via TED. This is cool, but I don't yet see how we're going to make everyday use of something like this. Standing in front of a video wall waving your arms around is going to be tiring. In fact, I think that this still fails with the distance which exists between what you're manipulating and your hands (it's still just a point-and-click interface). That's why I like the videos he showed at the start of his talk much more. Direct interaction with real and virtual objects, without the distance, is what really makes this work. And if every surface gets these capabilities then we're talking about something very different entirely. Imagine when your desktop doesn't stop with the edges of your screen, but flows over onto your actual desk, walls, etc. Then the interface becomes really spatial, and you can start doing some really funky stuff. If we can get to that, that would be more than amazing.
But I don't see that happening in just five years time...
May 30, 2010
May 24, 2010
May 20, 2010
All Seam and no play make Kris go crazy.
All Seam and no play make Kris go crazy.
All Seam and no play make Kris go crazy.
All Seam and no play make Kris go crazy.
All Seam and no play make Kris go crazy.
All Seam and no play make Kris go crazy.
So I'm still seeing problems with the previous solution. Now we're getting "transaction is closed" exceptions when persisting new objects. And then only when not having updated something else beforehand; in which case the exact same code works just fine...
Good times! Not.
May 19, 2010
Forgive me the tone of the title. I just spent four days at work figuring out what was going wrong with our project, and I have had quite enough. We managed to fix it though, and I wanted to share the problem and the fix for those unfortunate enough to follow our tracks.
The problem. You want to add a seam-enabled web-app on top of a pure EJB3 model. The model can't have any seam in it; so no seam annotations in the code. Why ? Because we want to reuse the model in non-seam contexts. But we do want to take advantage of seam in the web-app. To me that sounds reasonable.
The idea. Enable the entity beans and session beans as seam components by defining them in a components.xml in the war. Define a seam entity manager in the conversation scope. Inject the seam entity manager wherever an EJB expects an entity manager which would otherwise get injected by @PersistenceContext. Inject other beans wherever an EJB expects something injected by @EJB. Simple enough right ?
The problem I wasted four days on. Constant exceptions related to "entityManager is closed". Tracing the cause of these took a long time, in part because it's hard to see what happens to the entity manager at run-time, in part because you also get secondary exceptions which hide the real problem (such as "entity not managed"). I also lost time to some side issues which muddied the waters (duplicate jar in the deployment); so I won't blame seam for all of the lost time.
The cause. Our sessions beans were stateless, yet they retained the same entity manager over the course of their lifetime. The first time that's ok; the entity manager is open and usable. The second time is less fun: the entity manager is now closed, and a new one was not injected. So when you try to use it: kablammo! Exception! See if you can figure out this fun stack trace, why don't ya!
A solution. Not sure if this is the best way to do it, but after four days I'm just happy it's working: make your beans stateful. Yeah, that's not quit ideal from an EJB point of view, but it's either that or redoing the front-end without seam.
Parting thoughts. For all the publicity about the flexibility of seam and how easy to use it is, I find it very strange that seemingly no one has tried to add seam on top of pure EJBs. Does everyone just give up and add annotations to the source code (seam top-to-bottom) ? If so, do they then have two versions of their EJBs lying around ? If not, what other solution is there ?
Feel free to make fun of my noob Seam skills, but if you do please give me a better solution. If not, I'll feel free to delete your comment. :-)
May 17, 2010
This is something I want to see more of: making bricks at room temperature using bacteria and sand. No more furnices needed; no more heat, beat and treat. A good example of what biomimicry can do.
May 15, 2010
May 06, 2010
I just updated the Koopa Cobol Parser with a new version. I have been updating the grammar a bit (it now covers ADD, SUBTRACT, MULTIPLY and DIVIDE), but the really new feature is the XPath querying in the GUI.
The XPath support was already in the code, but you couldn't access it in an easy way. With this new release you can now open up a dialog in the code visualiser and perform XPath queries on the full syntax tree. All results link back to the source code with a simple double click. So you can now, for instance, search for all string literals, all paragraphs, all tokens on line 100, the first four data definitions, the last section, etc.
On a totally unrelated note: today marks the two-year anniversary of if-false-panic. Yay! I may not have stuck with that 3D engine in Lisp, but I did stick with this blog, and I have gotten at least one project to the point where it's usable by the public (as a hint: see this post's title).
May 05, 2010
Remember: this is not a commercial game being produced by a big studio. This is just Ysaneya and some enthousiasts... To call this amazing would be an understatement.
Keep up the amazing work!
April 20, 2010
Finally some progress to report: an update of the Koopa Cobol Parser project. The main feature of the new release can be seen below: calculation of coverage.
The horizontal axis iterates over the 513 files in the test suite. The vertical axis shows you how much of that file Koopa actually parses (or, put differently, doesn't ignore). As you can now see, coverage is not bad at all. Consider me a happy developer.
I extended the batch parsing application with the ability to export its results to CSV, which you can then import into the favourite spreadsheet of your choice. So you can run this against any code you have lying around and get a nice visual in a reasonable amount of time.
Other feature: Koopa can now also correctly handle SKIP1, SKIP2, SKIP3 and EJECT statements. These are basically directives for printing the source code; they don't actually contribute to the semantics of the program. Makes you wonder how much Cobol code got physically printed over all these years...
As usual, the executable jar has been updated, so feel free to take Koopa for a spin.
April 17, 2010
As usual there are a lot of crazy ideas floating around in my head, and I have a hard time ignoring them and sticking to the plan. Ah well...
April 05, 2010
I'm playing on a mac, as you might have guessed, but the client is still Windows only (Mac client is in the making). So thank God for Bootcamp!
Download and installation was easy. Only problem I got was that the map server was down on my first day. When it is down you can't download the maps, and so you can't play unless you already got them before. Why can't they include the basic maps in the install ? It was around 1.7GB already; a few more MB wouldn't have mattered much.
Anyway, the game itself is great! I got my ass kicked three times in a row —all on Novice level as well— but it was fun. I finally managed to win one game with a combination of Stalkers and Coloxen, with a few Immortals thrown in for fun. (Yes, I prefer Protoss.)
Also, if you like playing with a pen tablet instead of a mouse (as I do), you'll be fine. With the old Starcraft this was a bit of a pain, but in SC2 it wasn't a problem at all.
The replay feature is also very nice. It showed me that I was actually quite a bit slower in my build than my opponents. Timing is very important in this game.
Definitely will be playing more.
March 30, 2010
I found the following quote in a footnote of a paper on "Hashing Concepts and the Java Programming Language " by Robert Uzgalis:
Any language that requires a program to translate a declaration to English to make sense of it has failed to meet the primary communication objective of any programming language.
That's one problem Cobol doesn't have. ;-)
Seriously, though, it's good to remember that source code is read more often than it is written. So put some effort into writing clean code!
On an unrelated note, a good friend of mine and core developer of jBPM, Joram Barrez, stepped down from jBPM to start on a new BPM platform for Java. Joram: looking forward to seeing the new project. Good luck!
March 24, 2010
I just updated the Koopa Cobol Parser project with the ability to export the syntax trees of the parsed Cobol code to XML. The output is very basic, but it has the full tree as it is seen by Koopa, including tokens in the water (i.e. which got skipped). No whitespace or line/column information though.
The executable jar has also been updated, so you can try before you buy.
March 16, 2010
Too fast ? Here is what I've got, in smaller increments:
- A storage format for skribels (very basic trees).
- Reading and writing skribels from and to file.
- Basic tree parsing support.
- A small tool which uses tree parsing to parse a grammar stored in a skribel, and generates a tree parser from that. The generated tree parser can then be used to parse other skribels.
- A grammar stored in a skribel which defines the format for grammars stored in skribels. The tree parser generated from this can then be used to parse the grammar which generated the tree parser in the first place.
Grammar loaded from "resources/grammar.grammar.skribel". Matching skribel in "resources/grammar.grammar.skribel"... Matching SUCCESSFUL.Now that's cool. :-)
March 10, 2010
It is now rare for a non-trivial application to use just one programming language. (Src: polyglotprogramming.com)
But still, if it opens up the road to real combination of programming languages (Java + Prolog has been on my wish list many times), then all the better.
March 01, 2010
The first shows the work of Kirill Osenkov on a structured editor for C# (though not limited to C#). The videos are especially nice to watch, as they show some of the benefits of going for structured editors. What I'm missing here is an idea of how easy it would be to set up additional languages with this editor.
The second link is for Citrus which is a tool/programming language for setting up structured editors. There is video of it in action here. Unfortunately the tool is not publicly available.
Makes me feel that I should get back to work on Skribler...
February 26, 2010
This not so entertaining video actually shows one of the most promising solution to the energy crisis.
The TerraPower Traveling Wave Reactor is mainly interesting for two reasons. One is that it emits no CO2 while in operation. Second is that it actually uses up the nuclear garbage of classic reactors. Imagine getting all that nuclear energy without getting stuck with the waste! Now that's something to look forward to!
I must admit that it's Bill Gates who's backing and promoting this project. But if he can actually help make this work, I will forgive him for the many lost weeks/months, bad moods and huge amounts of cursing I had due to Microsoft products. :-)
February 22, 2010
My favourite sport to watch these days ? Jup: Starcraft.
If you want to get a glimpse of how deep Stracraft goes, check out the Day Dailies. Here is an analysis of Light vs Rarity on Heartbreak Ridge:
If you want something more light-hearted then DiggitySC is the guy to watch, in my opinion. He keeps it entertaining and exciting, but you still get to see the good stuff. Also, he has some of the very first commentaries up on Starcraft 2!
Either beats what's on TV most days.
February 14, 2010
The above is a procedurally generated galaxy made up of about 7000 stars (not quite the same number as the real one, I know). It's about fifty lines of Processing code, based on a light version of the idea behind Ysaneya's Galaxy.
Edit: It being the day it is, here is a very special galaxy for the girl who has managed not to get bored with me in close to seven years:
February 12, 2010
Symptoms include not being able to start up eclipse anymore. It complained about not finding Java on my path, where things reported just fine in a terminal. Turns out there are two paths in Mac OS X: one for the terminal and one for GUI apps. The first one is your classis unix $PATH, the second is found in ~/.MacOSX/environment.plist. Live and learn, I guess.
After this interruption, back to my regular programming (pun intended).
February 08, 2010
January 27, 2010
Where's the pen (or stylus) to go with it ?
I mean, really, this is the one thing which for me would make it a no brainer. Multitouch is cool and all, but if we're still going to be stuck with silly keyboards that's just stupid. Why can't we just write on this thing ?
Question which comes close after: can I develop my own apps (probably) and put them on my own and friend's devices without having to pay extra (unlikely) and without going through the appStore (very unlikely) ? This is still my biggest gripe with the iPhone. You buy it but it's not really yours. If the iPad is the same it really loses out against the 13" MacBook Pro.
Very unlikely to buy this unless one of the above questions gets a positive answer.
January 26, 2010
1. This post by Steve Yegge seems related. And it's a fun read anyway.
2. I'm wondering if it wouldn't be enough to have a code-generation framework with support for method interception, rather than a full meta-programming system. It would be simpler and, I think, easier to grasp.
January 20, 2010
I spent the last three days at a training about the EJB3 standard. It was very interesting but, while it's way beyond the troublesome tech that was EJB2, I still have my reservations about it.
Here's my problem: you have a layer of entity beans, which are persistent versions of your business objects. Then you have a layer of session beans which provide services to the outside world which allow you to manipulate the entity beans according to your business processes. For that outside world the safest strategy is to treat the objects as pure data; as structs rather than objects. The overall effect is that you're really programming in a procedural way. In Java. Yeah.
Now you may point your finger in the direction of the JEE standard. But actually I put the problem with the embedding in Java (or any OO language). That's because I think that a procedural approach with a separation of data and services is a much better fit in enterprise settings. Service oriented architectures really are a smart way of setting up such environments.
So, assuming you're in agreement with me (which I won't take as a given), you might come to the following question: wouldn't it be smarter to define an enterprise platform on a language which is a better fit to the services+data architecture, rather than trying to fit it into an OO language and then having to deal with the mismatch ?
Might this be another reason why Cobol was (and still is) such a success ? That it was designed for a business environment, and actually fit very well ? I quite understand why companies might want to stay with Cobol (and I know that some still do), but Cobol no longer fits the current enterprise reality: web applications with high availability, integration with relational databases, distributed systems, clustering, load balancing, and integration in heterogeneous environments.
So let's say we wanted to start with the right language (and it's not Cobol), what would it need to be ? What should it have ? Well, here is my list:
- No objects but structs. That is, your data is just that: data. Easy mapping to and from a relational database is essential.
- A procedural language for manipulating the data. I'm wondering if we could even go with a purely functional language, which would be ideal in a distributed environment. I think this should be possible and, if so, would be preferential.
- Dispatching on argument types (multi-methods), because polymorphism is a very good idea. Let's stay away from if-elsif-elsif-elsif-etc hell. This means that our data should be typed, and that we need some sort of type system.
- A module system for grouping functionality in logical units. Not to be mixed with objects/classes! We want reuse of components and services, not just of their code.
- A meta-programming system. Because a lot of interesting and important stuff becomes much easier that way: logging, security, transactions, etc. This stuff should get generated as much as possible from meta-code.
- Lambda's, closures and higher order functions ? These are nice in event systems and for callbacks. Not sure how essential this is...
- No support for the presentation tier. Because that's where OO and other paradigms actually are a natural fit.
Given the above I'm pretty sure you could define a superior enterprise platform. So anyone know a language which fits ? Or perhaps has some observations on the wish-list ? Let me know.
January 17, 2010
This presentation by Tony Albrecht might be interesting to some of you. It's a nicely motivated (with real code, tests and measurements) argument about why OO sometimes isn't the best solution.
For the case being presented (scene graph trees) a functional description seems to make the most sense. A lot of data without type variation and no behavioural differences ? Yeah, not much need for OO there.
So why did I build that 3D engine in Java again ? Uhm... :-)
January 11, 2010
Yeah, I haven't been doing much these last few weeks. In my spare time, that is. With the holidays, the new year, and the darkness I haven't had a lot of energy to get back to programming something useful.
Things I have been doing instead:
- Playing games on my old Super Nintendo. It still works perfectly. Zelda, Super Mario All Stars, Super Mario Kart, Starwing, etc. Some of these games seem much more fulfilling than others I have been playing lately. But maybe I have been playing the wrong games.
- Watching StarCraft games. The commentaries by DiggitySC are really good. He says he's not a pro, but he's way above my level (mine being somewhere slightly above that of a paramecium). And it's entertaining.
Anyway, I hope to get back to some programming soon, but it might be a while before I post something "interesting". In the mean time you might like to try the Next Revison blog. It has lots of 3D yumminess!