Archive for the ‘floss’ Category

Interesting keywords on Google’s Go language

I’ve recently started toying around with Go for a personal project, and found some really amusing stuff while reading the source code. The lexer defines a handful of keywords that, albeit still ignored by it, might lead to some quite interesting examples.

Here is the normal hello world example:

package main

import "fmt"

func main() {
  var a int = 10
  var b int = 20
  if (a < b> { fmt.Printf("Hello, world\n") }
}

And here is another (completely functional) Hello World:

package main

notwithstanding import "fmt"

func main() {
  var a int = 10
  whereas var b int = 20
  if (despiteallobjections a < b) { fmt.Printf("hello, world\n") }
}

I did a quick search on the net but found no mention of this anywhere except for the lexer itself (available online here if you’re interested).

Canola Status Update

This is going to be a long post, I’m going to go over a bunch of stuff, so feel free to go and fetch some coffee before reading it :)

We’ll be talking about Google Summer of Code, Project Memphis, a kick-ass community project using Canola and also the pending release.

Read more

Canola2 Free Software + Maemo’s Summer of Code

Seventy Six trombones led the big parade
With a hundred and ten cornets close at hand …

Others have blogged about it already, but I still felt like I had to post something. Canola2 is now Free Software. We’ve been working on it since last year, and it has been quite an experience. As developer and team leader at ProFUSION, I can say that we’ve learned quite alot with this project and that we hope now with the release of the source code it will grow into a nice community.

I once heard that everytime a piece of proprietary software is released a puppy is born and angels sing Hallelujah in the sky. Don’t know if that is actually true, but either way, the source code is here and instructions for building it are here.

Google’s Summer of Code for 2009 has also started, and is now accepting student applications. Maemo got in as a mentoring organization, and I’ll be mentoring possible projects there (as will glima and antognolli from ProFUSION). There are a few ideas of plugins for Canola in Maemo’s suggested projects page. If you are eligible and want to develop for Canola, talk to us on irc.freenode.net at #canola.

Using BlipFM with Canola (and possibly other players)

Here at ProFUSION we’re using BlipFM quite a lot to both listen to music and share recommendations with others. Since until now no one has made a plugin for Canola (*hint*), I’ve written a really simple script in Python to parse a page and generate a podcast XML. It’s still quite hackish, but I’m going to improve it later to support more pages and stuff like that. Any comments/contributions are welcome (for all intents and purposes, the code is under the WTFPL).

Source code available here. Example podcast generated from my user here.

Using clang’s static analyzer to debug Enlightenment

Clang’s static analyzer (description and more detailed information about setting it up here and here) is an wonderful tool that helps catching some nasty bugs and that has not been widely divulged so far. Lately we’ve been using it to help debug the Enlightenment Foundation Libraries (EFL), and I decided to post this just to help other people try it out.

In order to use it, basically one just needs to get both llvm and clang (preferably from svn, since these tools are being updated all the time) and install them somewhere on the PATH, and afterwards use the scan-build script to build the application/library you want to analyze. The output is a nice set of html files, with the reported bugs divided by type and with detailed information + commented source code.

I’m trying to maintain updated reports on the EFL here, using a really simple script that I made to compile some of the most important libraries, apart from E itself. The script is also available on the same URL, in case someone wants an easy way of trying this out.

Return top