Clojure, and it’s not a typo.
Why lisp can be sooooo sweet. A clojure class extending java.
compile it
(set! *compile-path* "build") (compile 'net.experimentalworks.clojure.outdegree)
Ah yeah and hsv2rgb transformation:
Why lisp can be sooooo sweet. A clojure class extending java.
compile it
(set! *compile-path* "build") (compile 'net.experimentalworks.clojure.outdegree)
Ah yeah and hsv2rgb transformation:
Scala is a fascinating language. Running on the Java VM, Scala offers a powerful mixture from both the imperative Java world and functional programming including modern techniques like Actors. Personally I prefer to not just learn programming languages, but also try them out while reading through the book.
As I wanted to have nice a build system for my PHP subversion checkout, I used this need as a project to start coding Scala. So what do I exactly need? I want to build multiple versions of PHP from the same branch without checking out the code twice. I also want to configure these builds somewhere without always typing in the parameter list or so. For further versions I want to be able to configure these in a file that can easily be distributed to other machines.
I set down and wrote a parser for a configuration file that can configured build targets which is then build by
the program. The configuration file I used is specialized for this purpose, which is why I didn’t used something like ant or so. The result is called bauaffe-3.0.0a1.jar.
I’ll just show a few things done in the project, but mainly focus on what the nice script can do. Further blog posts will be about the actual implementation.
The configuration looks like this
$ cat ~/.buildmaker
begin default configuration
define source "/Users/dsp/dev/c/php-src"
define build "/Users/dsp/dev/c/php-src/build"
define defaults as
with "iconv=/opt/local"
build trunk as
"php60" using defaults
"php60-debug" using defaults
enable "debug"
build branch "PHP_5_3" as
"php53" using defaults
environment PHP_AUTOCONF="autoconf213"
"php53-debug" using defaults
enable "debug"
environment PHP_AUTOCONF="autoconf213"
.
Proper indention is not necessary (as e.g in python).
def begin : Parser[Configuration] =
"begin" ~ ("default" | stringLiteral) ~ "configuration" ~ rep(define | build) ^^ {
case "begin"~name~"configuration"~confs => new Configuration(name, confs)
}
config ::= "begin" ( "default" | string ) "configuration" ( define | build )*
Did I mention that the actual parser is 170 lines of code with usual indention and formatting?
Configuration
The configuration file is searched in ~/.buildmaker, or if ~/.builmaker doesn’t exists, buildmaker.conf in the current directory. How do you configure the tool? First of all you can specify a configuration. It is usually called “default”. It is not yet supported to name it differently, although the parser is able to parse it. In further versions multiple configurations per file are allowed.
Variables
Variables are set using the define syntax. At the moment you can set the build and source variable as well the defaults variable, which is usually a block of statements that can be used in the branch configurations.
Branches
A branch is configured using the build syntax. You first have to specify which branch to build. Every branch can then configured to have build target with a given set of options. Branch options are:
. You can specify using defaults which will cause the runner to use the options specified in the defaults define.
At the moment the parser will not do a good job in notifying you what you are allowed to do and what not, although pure parse error will be emitted. You can also not set any other variable than the described once.
Building
Calling
$ java -jar bauaffe-3.0.0a1.jar list TARGET LAST BUILD php60 None php60-debug None php53 Sat Jan 09 16:55:12 CET 2010 php53-debug Sat Jan 09 16:59:37 CET 2010
gives you a list of parsed targets and their last build date. You can build a target using
$ java -jar bauaffe-3.0.0a1.jar
or build all using
$ java -jar bauaffe-3.0.0a1.jar all
Please notice that the current version requires that you now what you are doing. You might miss some error messages or find them not useful. I’ll change this before the first release, if I’ll do a final version of it. I hope you like the little tool.
Scala (pronounced /ˈskɑːlə, ˈskeɪlə/) is a multi-paradigm programming language designed to integrate features of object-oriented programming and functional programming.[1] The name Scala stands for “scalable language”, signifying that it is designed to grow with the demands of its users.
We recently stumbled over the problem that we want to know the exit status of the last command that was executed in our ZSH. Well the obvious thing is echoing $?, but as we need this quite often we want to have it in our right prompt. Googling around a little bit, we found the solution:
In your .zshrc add the following line
RPROMPT='[%?]'
This will give you the last exit status on the right site of your shell.
My zsh now looks like this (with the additional stuff)
buenosaires:~/dev/c/git.git/> (next)[1]
Using a decentralized version control system (DVCS) like Mercurial (hg) or Git as a client for Subversion is very common. With the unique features of a DVCS a developer can have both the features of offline development and local branching while still being able to push to a subversion server. This approach is often used in environments in which subversion is the given version control system. While the approach of using this bi-directional push and pull mechanism, provided by git-svn or hgsubversion, works perfectly for one developer, it has limitations working in a team using the usual DVCS push and pull concepts.
The following article will outline the current limitations of bi-directional dvcs to subversion bridges and shows a simple approach to implement a solution for a certain instance of the problem.
I’m currently moving my blog and everything on experimentalworks to a new server. The new server is running latest OpenSolaris with all the fancy stuff in it. Enjoy.
I bought a G1 dev phone six month ago. Not because I seriously wanted to write applications for the android platform, but because it was the only way to get an Android based phone in Europe. Nevertheless, the complete Android platform is really appealing to me, mainly because it’s more open than an iPhone, there are much more nerdy apps for it and – yeah I know what you think – it’s based on Java.
Warning this is a potential boring blog entry. Apprx writting time was about 5min
I once tried writing applications for the iPhone and started to like the concept of Obj-C while still I hate the syntax and I don’t like the API that much. Android makes things simple for me, and I guess for most people knowing a little bit java. It implements big parts of the Java standard (although it doesn’t claim to be standard compatible) which makes it easy to start writing apps if you know the libraries a little bit. Android also includes the powerful HTTP libraries of the Apache project as well as Json and XML parsers.
Having said this, the most important factor why I started to love my phone and the Android system: I can easily deploy apps on my phone, I debug it on my phone, I have nearly the complete power of the java framework and I totaly enjoy seeing my first app starting on the actual phone after 1 hour of coding. The app itself is fairly simple. It’s a basic search interface phpMyFAQs upcoming Rest API.
So you can search an existing phpMyFAQ installation for a search term and display the result. Although the app needs phpMyFAQ 2.6.0-alpha it’s already available in the Android Market. So feel free to check it out. You can test it with the URL: http://faq.phpmyfaq.de/. The source can be found at http://github.com/thorsten/pmfMobileKit. Expect more updates to the app soon.
Ich bin mir gar nicht mehr sicher, wann ich das Chaosradio entdeckt habe. Es wird so ca. vor zwei Jahren gewesen sein, als der Begriff Podcast geschaffen wurde und die ersten deutsprachigen Podcasts das Licht der Welt erblickt haben. Als technologieverliebter Nerd stößt man so unweigerlich früher oder später auf das Chaosradio. Während ich anfangs eher das dreistündige Chaosradio, das auch auf Fritz ausgestrahlt wird, anhörte, bin ich doch relativ schnell dazu übergegangen Pritloves Express-Variante zu abonnieren. Denn sind wir mal ehrlich, zwar sind die Anrufer bei Chaosradio manchmal ganz amüsant, doch zum Großteil eher nervend. Die kompakten und meistens inhaltlich guten Folgende des CREs machen da deutlich mehr Spaß.
Inhaltlich ist das CRE eher technisch aufgestellt und befasst sich mit allem was den Nerd erfreut, sozusagen die Cub-Mate des audiophilen Tekki. CRE ist also gut für die Geek-Gesundheit, liefert einen Blick über den Tellerrand und, hepp, befasst sich sogar mit Soziologie und Politik. Und manchmal werden sogar langjährige Wünsche erfüllt.
Absolute Highlights sind natürlich Folgen wie die Bayrische Hackerpost, Internet Memes und der Mifare-Hack. So ist es kaum verwunderlich, dass man nach späterstens zwei Wochen CRE freie Zeit anfängt unruhig den CRE Blog anzusurfen und den Podcast Feed zu abonnieren. Leider fehlt immer noch was zum Thema PHP, aber das ist ja per se uncool, deswegen wird das wohl auch nichts mehr. Schade eigentlich, vielleicht gibts ja nochmal was dediziertes zum Thema Flamewars, da kann man PHP dann immer gerne einstreuen. Überhaupt gibt CRE immer Anlass zur Diskussion, meistens weil ein Detail in irgendeinem Nebensatz nicht stimmte oder allgemein der Gast inkompetent war, aber eh klar: man selbst ist immer der bessere Experte (vorallem wenn es um DVCS geht, wo’s vielleicht sogar stimmen würde *rant*). Aber auch “ranten” gehört zur Informatikerausbildung. Also immer brav CRE hören.
Was man am CRE verbessern kann?:
Ich finde die Idee mit einem Photo pro Podcast eigentlich ganz gut. Mehr fällt mir auch nicht ein.
Und jetzt weiter in der von Tim initiierten Blogkette:
Zurück zu Nummer 12 in der Blogkette.
Weiter zu Nummer 14 in der Blogkette.
und jetzt weitermachen!
For those of you, who didn’t notice so far, in the last 6 month we worked on a more userfriendly and accessible page than the current mercurial website. Three weeks ago we launched hg-scm.org which is quite similar to git-scm.org. I hope you enjoy it
We like to invite you to the PHP 5.3 release party which is an event to
celebrate the 5.3 release, happening Friday, the 17th of July in Munich.
The release party offers a chance to come together with other php
enthusiasts and enjoy that php is alive and kicking. And of course people
in favour of a decent barbecue, together with some beer and other drinks
are invited.
The happening will take place at Waldwirtschaft (http://www.waldwirtschaft.de)
beer garden, at any weather. We will meet at 19:00 o’clock – open end.
Catering will be provided and as a special delicacy you may enjoy a suckling pig!…hopefully vegetarian food. If you like to join the event please register at PHPUG-Munich Wiki (http://phpugmunich.org/dokuwiki/php_release_party) and follow it for updates. Alternatively you may register at Facebook
(http://www.facebook.com/event.php?eid=115203467104) as well and follow
this for updates.
For any questions please visit IRC channel: #phprp on irc.uni-erlangen.de.
The PHP 5.3. BBQ release party is sponsored by:
– Microsoft
– Mayflower GmbH
– Swoodoo AG
– Zend Technologies GmbH
Supporters for the PHP 5.3 BBQ release party are:
– Sun Microsystems
- PHPUG.de