|
Jonasfj.dk/Blog
A blog by Jonas Finnemann Jensen
June 25, 2010 groo, a GRim Object Oriented programming language
Hmm… Not the official title of my fourth semester project at Aalborg University. For which I just got an A… and have been thinking about publishing since I handed it in.
This semester my group have designed and implemented a small statically typed object oriented language slightly inspired by Python. We wrote our own lexer and parser generator in Python, and implemented the compiler in C++. And just for the record we implemented the DFA of the lexer and PDA of the parser using goto’s, inspired by re2c, this was quite fun and the result very fast.
The language is called groo (that was the best name we could come up with), it compiles into gril (groo intermediate language) which in turn run on VROOM (groo virtual machine) where memory is managed by MOM (Mark-sweep Object Manager). Whilst this isn’t the best project yet, and all the acronyms doesn’t make much sens, I really like to say that when we need to release memory we call MOM to clean up ๐
(I appoligies for my crazy sens of humor).
I don’t think the project is of much use to anybody else… But if you want to play with simple, well documented compiler in C++, this might be it… Also the parser generator is AFAIK pretty unique, haven’t see anybody else implement a parser using goto’s… Anyway the project report and groo compiler source code is all in English and available here:
January 31, 2010 zbar-sharp, now bugfixed and pushed to github
I’ve long been wanting to play with Git, but have either missed the time or the reason… Anyway, as I discovered a minor bug in the zbar-sharp bindings I recently released… I figured this might just be the kind of project I could push to github, and either forget or bugfix depending on what mood I’m in when a bug is discovered… ๐
So I’ve created a github repository for zbar-sharp, to which I’ve published a minor bugfix… I’ve also managed to publish the documentation there… it was a bit tricky, because GitHub only wants to serve HTML files if they’re in a special branch… Nevertheless I succeeded… And zbar-sharp can now be found here:
By the way did I mention, git is really nice… I just had a little fun making a bugfix branch and merging it…
January 17, 2010 Design patterns
I recently finished reading “Design Patterns: Elements of Reusable Object-Oriented Software” and thought I’d share a word about this book. Not that there’s much to say, it’s absolutely a classic, and definitely worth a read…
I’ve found the patterns applicable many places, and recently had the privilege of using one in my C# programming exam. I previous mentioned this book when I discussed “Framework Design Guidelines“, which I wasn’t too happy about at the time… However, “Design Patterns” is definitely the book for writing reusable code, whereas “Framework Design Guidelines” is more concerned with the usability of the APIs.
Anyway, that was a word on “Design Patterns”, definitely worth a read…
December 30, 2009 ZBar bindings for C#
As part of the food management system my group made this semester, we wrote bindings for ZBar and based on those a bar scanning widget for Gtk#. Anyway, I figured it might be useful somebody else, so I’ve been using a few days cleaning up the ZBar bindings, extracting the Gtk# widget from our UI-mess and writing a simple example of how to use it.
The result is bindings for a subset of ZBar and a Gtk# bar scanning widget. I don’t intend to maintain the source, but if you find any bugs etc. or wish to start a project for the bindings, please leave a comment…
The example application using the bar code scanning widget can be seen on to right. Note: this was a really lousy webcam :). The check-mark appears when a bar code have been recognized and then fades away.
In Foodolini we used HAL to detect webcams as they were plugged, however, having heard that Ubuntu will be deprecating HAL, I didn’t care to clean up the source for this feature. If you interested it can be found in the source for Foodolini. And if anybody should happen to know how to detect webcams, distro independently, without HAL, please leave a comment…
December 20, 2009 Foodolini, A food management system
Now I’m done with my third semester at Aalborg University. The focus on this semester was software engineering with the Object-Oriented Analysis (OOA&D). Personally I found this subject rather boring, I guess making pretty diagrams trying explain technical stuff in a manner “mortals” can understand maybe utterly uninteresting ๐
Anyway, for this project we analyzed, designed and implemented system for managing recipes and food in a common household. The system was suppose to compute nutritional intake and manage diets and exercises as well, however, these features were never fully designed and implemented. Nevertheless, it uses the USDA National Nutrient Database for Standard Reference, to find the nutritional content of various groceries.
The system is called Foodolini and was implemented in C# on Mono using Gtk#, but also runs on .Net and Gtk# for .Net. Foodolini uses Sqlite as database, and we wrote a simple and neat ORM tool, inspired by SubSonic‘s SimpleRepository. However, the most interesting feature in my opinion is the bar code scanner used when registering groceries in the system. It’s implemented using a ZBar which captures and scans images from a webcam. I’ll be release C# bindings for ZBar and a Gtk# widget in an upcoming blog post, when I’ve cleaned it up a bit…
- Foodolini 1.0.0 (sources, binaries and documentation)
- Report (documenting the analysis, design and implementation of Foodolini)
October 17, 2009 Musicplayer module for pluck
I’ve been working a bit on a website for a friend, not computer literate, so I took a look around for a simple, easy to use, content management system without a million uselessย features and found pluck. It’s simple and yet supports modules to extend the functionality, though within limits…
Anyway, I needed a MusicPlayer module that would make it easy to publish music in Flash based music player, so I wrote one. The documentation for pluck is fairly good, php on the other hand is horrible (it took me a while to figure out I had to enable error reporting). Nevertheless, the result allows the user to upload mp3s, choose player skin and settings. For playback I used Xspf Jukebox which has 20 skins included some of which are fairly good looking…
You can download the module here… It’s for pluck 4.6, tested with 4.6.3.
Update: This plugin is now hosted at github: github.com/jopsen/pluckplayer.
August 26, 2009 Working on Pwytter in Google Summe of Code
This summer I’ve been working on Pwytter as a part of Google Summer of Code. My project was to separate the backend from the frontend and make a new user interface with PyQt. In my original propsal, I also wanted to do a GTK frontend, however, this was dropped in exchange for a more polished Qt frontend (I do have the basics for a GTK frontend lying around, if anybody is interested, but it’s far from usable).
While writing a backend for Pwytter I also created some abstractions for micro-blogging services, so that Pwytter supports multiple accounts and multiple services (currently Twitter and Identi.ca). With this new backend all the messages are also cached in an sqlite database, enabling Pwytter for work while offline.
I also added theming support to the Qt frontend I wrote for Pwytter, above is a screenshot of Pwytter running the “Twitter-like” theme (as you can see have also be translated, so far only to Danish). Pwytter uses WebKit to display tweets, users and other types of content, thus themes can customize the GUI using HTML templates and Qt stylesheets. Documentation for writing such themes can be found in the project wiki, I plan to write an article on subject when this Pwytter branch is released. So far this Pwytter branch is still under development, and interested developers can find install instructions in the project wiki.
August 25, 2009 Framework Design Guidelines
A few months ago I felt like I needed to get better at writing clean reusable code, so I impulsively bought a book called Framework Design Guidelines, Conventions, Idioms, and Patterns for Reuable .NET Libraries. Now having read the thing I must admit that I found large parts of it rather boring. The book is mainly presented in “Do”/”Do not” form, however, interrupted by annotations that discusses these guidelines, and gives examples to where these are followed or forgotten in the .Net Framework.
Apart from the annotation this book is mainly about usability of .Net libraries, conventions and guidelines for the public interface of a .Net library. This book only briefly touches a few design patterns, but apart from these it’s all about the public interface and how to design this in order to facilitate extensibility. So if you’re look for coding guidelines on how to design the public interface for a .Net library this is the book. However, I was probably a bit to impulsive, so I’ll be reading Design Patterns next…
May 24, 2009 TheMatrixDistributed, distributed realtime ray tracing
Now I’m finally done with my second semester project at Aalborg University, and as usually I publish my things here. This project is about distributed realtime ray tracing. Which have been fun, because ray tracing is CPU bound and it have been a joy to play with all sorts of hacks and optimizations.
The report discusses what the demand for ray tracing is, what ray tracing is and how a ray tracer can be implemented, covering the basics of ray tracing and bounding volume hierarchies. It also discusses how distribution could be done, which is the only slightly new thing in it… It’s not a perfect report there’s still some areas where the English is kind of bad and some sections that could use a rewrite or two ๐
Nevertheless, considering the circumstances I’m satified the result. And the group have worked fine…
Now the interesting part, TheMatrixDistributed, as a part of this project we implemented a distributed realtime ray tracer, with bounding volume hierarchies, spheres, planes and triangles that supports textures. We also did a small obj parser to import models exported from Blender. TheMatrixDistributed is implemented in C++ and it’s turned out to be quite fast, considering that the rest of my group have little to no programming experirence. When distribution to 6 dualcore laptops and a quadcore desktop we got around 8 FPS at best with 1024×768 screen and about 100,000 triangles in the scene, not filling the entire screen.
The frontpage image (original 1024×768) seen above has about 1,000,000 triangles it was render on 6 dualcore laptops and a quadcore desktop at about 0.6 FPS with 4x antialias.
Though the report and TheMatrixDistributed probably isn’t of much value to anybody it’s published here if anybody should be interested. The report is released under Creative Commons Attribution-Noncommercial-Share Alike 2.5 and TheMatrixDistributed is released under GNU GPL.
October 29, 2008 Announcing TheLastRipper development discussion group/list
It’s been quite a while since I’ve been actively developing TheLastRipper, even though I’ve been promising myself I’d find time for it over and over again…
But since there’s other people who have shown interest for the project, I’ve decided that it’s probably best if project coordination happens in an open forum instead of just sending mails between developers. Therefore I’ve created a TheLastRipper development discussion group for discussion of project direction, features, technical matters etc. without always having to create an issue in the issue tracker.
I’m not leaving the project, just realizing that with my current activity or just in general, it’d probably be good for a project with multiple developers to have a development list for discussions of all the stuff we can’t fit in the issue tracker.
So if you’re interested in TheLastRipper development join today…
Update: I’m happy to announce that Andreas Langmann is also a project owner now, so that I’m not the only administrator…
« Newer Posts — Older Posts »
|
|