programmierung - 18.7.2011 - 22.8.2011

Luban: a generic “language” for creating user interface — luban v0.2 documentation. Check it out - it could help with my eternal search for a compact user interface to use. Specifically, web as UI is becoming increasingly interesting with all the things that have emerged in this area in recent years.

PyPy Status Blog: PyPy 1.6 - kickass panda. Getting better and better - ctypes are now properly fixed (this is one of the FFI options in Python) and there is beta support for C extensions from the cpython environment (which is only a stopgap, direct PyPy extensions will actually always be more efficient, but at least some of the extensions are available as long as they do not offer their own PyPy version). Oh, and there is a first approach for a numpy module that is directly integrated with the JIT of PyPy - not yet complete, but a start has been made.

The Python Standard Library By Example - Doug Hellmann. For all those who prefer a printed version of the internet: this is a book with all the PyMOTW (Python Module of the Week) articles in it, polished and beautified and nicely compiled. Certainly very practical, because sometimes you have a book quicker at hand than a computer - and computers are forbidden in bed anyway. (Warning: regarding bed, this is a 1344-page whopper!).

Python and fileinput - All this. I know the module, honestly. But somehow it has slipped my mind again. It's really a handy thing when you write command-line tools, simply because it takes care of the Unix-typical handling of input for you.

GNAT GPL for LEGO MINDSTORMS NXT – Ravenscar Edition. And for friends of robots made from Lego and bondage-and-discipline programming languages, there is now Ada for Lego Mindstorms NXT. After all, there are not many Ada links to report.

Cross-domain communications with JSONP, Part 1: Combine JSONP and jQuery to quickly build powerful mashups. Since I needed it for a colleague and therefore searched for it, I'll just bookmark it. JSONP is basically just a convention for JSON services that respond to a callback parameter by passing the generated JSON as a parameter to a function call and using the content of the callback parameter as the function name. This makes the data accessible from domains other than the one from which the actual script comes - normal AJAX does not allow this.

ipdb makes the Python debugger a bit prettier and more user-friendly by integrating the tools from ipython. If you're already using ipython, it might be a good idea to install ipdb as well. Alternatively, you can use pdbpp, which provides similar features without ipython (e.g., you could combine this with bpython).

rad2py - Rapid Aplication Development platform for python. Wow, why didn't I know about this before? It looks interesting, although the description is a bit heavy. And it's still in a very early stage (first full prototype planned for November 2011).

RMoD: Fuel. And another Smalltalk link - here a persistence library completely in Smalltalk without special support of the VM, but still good performance and good mapping capability for all kinds of objects.

SandstoneDb, Simple ActiveRecord Style Persistence in Squeak. A very simple single-file database for Pharo, which is interesting, for example, if you want to build small desktop applications in Pharo. So the classic GUI tools that you make for personal use, for example. And yes, today is Smalltalk Day at rfc1437.

Coral — Pharo Smalltalk for scripting. Oh, that's nice, that's one of the problems I always have with Smalltalk: I can work in the IDE and in the image and then export a headless application for the server, but as soon as I need a quick script outside the image, I have to switch languages. Coral provides the answer to this problem: a small wrapper, a minimal syntax extension and a minimal image to be able to write normal scripts with Pharo Smalltalk.

ToDE - tODE - the Object centric Development Environment. A bit stagnant in development, but still interesting: an IDE that builds on Pharo Smalltalk. The special feature: it runs in the browser, but offers all the usual Smalltalk development tools there. In principle, you could therefore install a hosted Smalltalk image as a development environment for the iPad and play with it on the go (Pharo and Squeak fit well into the browser interface because they usually don't come as native Windows, but as Windows-in-Windows - and here simply Windows-in-browser).

CouchDB: The Definitive Guide. Oh, the CouchDB book by O'Reilly is also available as an online book and even in German. Certainly interesting for one or the other who doesn't feel like wading through English books. The translation is not (yet?) complete, so you will still come across English chapters. But it's a start.

Installable Web Apps - Google Code. There you can find some background information on how to convert web applications into installable web applications or hosted apps. This allows you to use Chrome as a runtime for applications that behave very similarly to regular applications - Amazon's online Kindle is a great example. Programming is done in JavaScript, which is much less intimidating than it was a few years ago. As Packaged Apps, you can also do everything that Chrome Extensions can do (and can go beyond the scope of regular web applications).

Update on UIKit lighthouse platform. Hmm, I didn't notice that - QT also has support for UIKit, the iOS framework, in 4.8. So you can build iOS apps based on QT. This raises the question of how this works with PyQt or PySide - Apple doesn't like interpreted code only when it is loaded afterwards. The app itself can be written with it, though.

Modula-3 Resource Page. Continuing with niche languages - Modula-3 has always fascinated me because it was a pragmatic and practical extension of the Wirthian language world and at the same time integrated a lot of interesting language constructs into a familiar imperative language system. And development continues to this day, the download even has binary packages for Darwin (the Unix foundation of OSX), although currently only 32bit (and I guess no bridge to Objective-C and thus to the Cocoa APIs).

Magpie Guide: Welcome. Since we're on the topic of niche languages: Magpie is yet another language for the JVM. This one looks a bit like a mix of Scala and Ruby, but the concepts are quite different. Particularly nice is multidispatch - generic functions that choose the appropriate version based on all their parameters and their types. Reminds me a bit of CLOS in that aspect. Additionally, there are full closures and functions, and blocks are first-class objects in the system. Additionally, there is an approach to metaprogramming with quotations, although I still consider the Lisp approach unbeaten (simply because in Lisp the structures of the parse tree correspond 1:1 to the actual syntax and the lists as internal representation, while in languages with Algol-like syntax the whole thing is much more indirect). What I personally also find pleasant: Magpie is very text-oriented, not so heavily reliant on special characters. It reads more pleasantly to me.

the "useless" language. Quite a crazy language - something like Forth, but all commands and syntax consist of single characters. There are also quite strange restrictions for function definitions (maximum 64 characters per line and only one if or while or similar in a function). Particularly fascinating is the U->C compiler written in U. The developer of the language has written an entire book about programming in U. But beware: the author's color choice is an acquired taste ...

Xcode4 / Objective Pascal - Available Files. If you want to play around with Pascal in the Xcode4 environment, this is certainly a good starting point. It describes how to integrate FPC into the environment, there are ready-made templates for projects and even more fun: it describes how to program iOS devices in Pascal. Back to the Future! Or Back from the Future?

extpascal - Ext JS wrapper for Object Pascal. Well, I always wanted to program my web applications with Pascal and give them an Ajax-GUI. Because it's possible. And every RIA hipster gets a heart attack when they see the sources.

sausage.js - examples - The Core API. Interesting small JavaScript library that makes navigation in large documents much easier, without overwhelming you with navigation buttons - just hover with the mouse on the right, there are visual markers for the size of the document sections and where you hover, a button appears that you can use for a direct jump. In my opinion, much less aggressive in its presentation than Flexible Nav. However, Flexible Nav of course has the advantage that you don't have to hover to see the navigation.

Okito.net — On SproutCore 2.0. About the current version of the framework that powers icloud.com (it seems some developers violated their NDA when they took a closer look at icloud.com). SproutCore has been around for a while, but version 2.0 has brought many changes and is a rewrite in essential parts. The goal is still to build native-looking applications using only JavaScript and the browser.

Pascal Script | RemObjects Software. More like a curiosity you find on the net - a scripting engine that has a syntax very similar to Object Pascal and can be integrated into Delphi and Lazarus (FreePascal RAD IDE).

Get Started Guide « PhoneGap. Just blogged for future reference, because I will definitely need this again when I play around with Phonegap and Android. Quite bumpy, it would be nice if Phonegap simply included a ready-made project template. But well, it works anyway - my Hello World appears. On the simulator. And I don't have to touch nasty Java for it, just nasty JavaScript.

Python, SymPy and Quantum Physics. So far, NumPy/Matplotlib and SymPy have been two separate worlds for me - this blog post shows how to connect these two, meaning to work out your function definitions symbolically with SymPy and then transfer them to NumPy to perform numerical investigations. This is particularly interesting in connection with the qtconsole of ipython, because it only displays matplotlib plots inline, while SymPy plots open in a separate window (as they run via pyglet), which is rather inconvenient for saving the results of your work.

wsgi_lite. Since I sometimes program "raw" against WSGI, this is not entirely uninteresting for me - a slimmed-down WSGI that defines simpler calling conventions for middleware and applications and thus further reduces the code somewhat. For entire apps, it usually doesn't bring much, as you typically write apps with a web framework, which already eases this part for you.

Issue 438 - pyglet - pyglet 1.1.3 fails on Snow Leopard. Oh man, this is really annoying. Pyglet is used by Sympy to output mathematical expressions. Unfortunately, Pyglet uses Carbon on OSX - and that is only 32-bit. And all my attempts to force something to 32-bit were in vain - actually, this can be done via environment variable or alternatively with the arch tool, but for some reason (probably due to internal indirect program calls) this is not done in Python as documented. Annoying, because Sympy has been on the list of things to try out for a while (not just since the QT console).

Innovations in iPython. Very interesting things happening with iPython - this is already becoming very similar to typical math environments like Maxima or Mathematica. At least if you install Sympy and such. The QT console worked for me after some tinkering and installing packages with Homebrew. However, I can't get matplotlib installed on Lion at all, something is still not working there, which is a shame - that would also be interesting with the pylab mode. Here's more about the QT console.

WSGI and the Pluggable Pipe Dream | Armin Ronacher's Thoughts and Writings. Just read it to get a good overview of what WSGI actually is, what is possible with it, and where it might also get stuck.

Gambas - Gambas Almost Means Basic. Ok, and now it gets really wild, but I thought after RealBasic I can't help but also link to Gambas, a kind of VisualBasic clone for various systems. Can work with different databases and different GUI libraries. And a port to OSX is now available (June 2011, so still quite fresh), which also sounds promising for the future, as Linux and Windows are already supported. And yes, I know, "real" programmers turn up their noses at things like VisualBasic, but it is very useful for quickly putting together graphical tools and is particularly interesting for occasional programmers.

TL Omnis. And another RAD old-timer - Omnis was one of the first RAD environments I played with and it was quite unusual for its time. No "real" programming back then, just GUI tools for wiring and connecting in combination with calculated fields, but these were very powerful. Very strong focus on graphical tools for various purposes (DB design, relationship management, reports, forms, etc.). It's quite amazing what you can find when you dig a bit. By the way, there is a free standard version of the environment, so you can just take a look at what it can do today.

Lazarus. I mean, how can I skip something like a free Delphi clone when I write about IDEs and RAD tools? So here's the link, there are also OSX versions of it. And it's definitely an active development project. And hey, Pascal was my first high-level language after Basic when I started programming. Oh, and there's a pretty solid bridge to the Cocoa frameworks with Objective Pascal. Update: wow, that brings back nostalgia! Building command-line tools in Pascal! And the IDE isn't bad at all, it can do a lot!

I didn't know HyperNext Studio at all. A HyperCard clone for Mac, with which you can also create Windows applications. However, the last version is a bit older, I don't know if it still runs with Lion. Meanwhile, it is freeware (though closed source, I guess because their last version is already a bit older). And also interesting: it offers two languages, one that is modeled after HyperTalk and RBScript, an object-oriented Basic from Realbasic (another IDE for OSX and Windows). I guess HyperNext itself might be programmed with Realbasic. Oh, and with the HyperNext Android Creator you can also build Android applications with HyperNext. The Android Creator is however paid (but not really expensive with 60 dollars). And unfortunately, it is only available for Windows, not for the Mac. Update: those who have Lion can forget about playing with HyperNext Studio, because it is PowerPC code, and there is no Rosetta in Lion. So the maximum OSX version is Snow Leopard.

Whalesong: a Racket to JavaScript compiler. Haven't had a link to the best Scheme implementation on the net for a long time. Okay, Racket is no longer called Scheme, but there is still a lot of Scheme in it. And now there is Whalesong, a backend that produces JavaScript from Racket code - and can even generate standalone HTML files that run directly in the browser.

WebKit in PyQt - rendering web pages. Since I'm once again pondering GUI libraries and tools and playing around with Python and Qt, I should of course not forget the WebKit integration of Qt, which is really beautifully simple to implement, as these rather simple examples show. And the Qt interfaces under OSX are not 100% like native applications, but already much better than those of GTK. And you can then also run your code on other systems without much effort. The blog has even more very interesting small articles about Python and Qt.

CodeMirror. If you want editors on websites that color the syntax of programs. Looks quite nice and could perhaps be interesting for a few things, e.g. where I allow restructured text to be entered, or where Python code is stored in the database. It is a JavaScript library that is simply plugged into the browser in the textareas.

Harbour Project. Someone mentioned dBase. Then I ended up at dbase.com - and then the question about Clipper arose. And then I searched for it. Why do I do such things? Why can't I control myself? And where is dBase for the cloud?

Orange - Data Mining Fruitful & Fun. Wow, just stumbled upon this, I didn't know it, I think. A GUI interface with a node interface for defining data analyses and visualizations, where these nodes are programmed in Python. The entire interface is built with QT, so there is also an OSX version of it. If you need to sift through larger amounts of data, this is definitely worth a look, especially since it is open source and you don't lose anything there.

Sage: Open Source Mathematics Software. Simply because I've been thinking about worksheet interfaces lately and considering what options there are - Sage is not just a math package, but primarily a huge collection of Python modules and a worksheet interface for Python as well. Okay, you use a web browser against a locally running web server, but still, it's actually a nice thing. And meanwhile, version 4.7 with many changes is out. And you can repeat good things. It's definitely cheaper than mathematics and I also like Python much better as a programming language. Since I will probably eventually install my own server to access notebooks from anywhere, here's a blogmark on a guide on how to build your own Sage server with Ubuntu.

The Xavisys WordPress Plugin Framework - Xavisys. Interesting if you want to build your own plugins for WordPress, as it takes care of some of the standard tasks and makes the code simpler.

Creating Apps Using AppleScript Objective-C. Maybe I should just get the book here to satisfy my (rather perverse) curiosity about the AppleScript/Objective-C Bridge.

SuperCard on Lion. And since I just wrote about HyperCard, its spiritual successor - SuperCard - still exists and has been made fit for Lion again. But it's still a Carbon application, so its days are probably counted (or it will become increasingly difficult to integrate SuperCard into current developments if a switch to Cocoa does not take place). And I'm still tempted to buy it, even if it's just for nostalgia. The hacking feeling of HyperCard I only experienced again later in Smalltalk environments (and they are unfortunately also rather dead under OSX).

Mac OS X 10.7 Lion Automation Release Notes. The worst language invention since HyperTalk has received a bunch of extensions in the Lion version, especially the integration of the Objective-C Bridge into the Apple Script Editor is funny - you can directly access Cocoa frameworks in scripts with it. Even though I believe that AppleScript has probably driven more programmers crazy than it has made life easier for users, it is always interesting from a linguistic historical point of view to see what is happening there. Since Snow Leopard with the Objective-C Bridge, it has been on the rise again and even in the current XCode 4.1 you can put applications together completely with the Interface Designer and AppleScript. Unfortunately, the application structure under Cocoa is definitely not suitable for non-programmers, so XCode with AppleScript applications is not really a revival of HyperCard (the only reason why I forgive HyperTalk - it was the language in this pretty brilliant little tool with great reach).

XMPPFLASK — XmppFlask v0.1 documentation. Definitely an interesting project - an XMPP bot in Python that has a similar structure to Flask, so simple definition for XMPP handlers with routing of events. Since I always wanted to take a look at XMPP as a backbone for distributed (so widely distributed) applications with online/offline capability, I've blogged about it.

flot - Attractive Javascript plotting for jQuery. Again something for the number crunchers, or rather their visualizing colleagues - presenting number deserts in attractive graphs, and all as a jQuery plugin. I definitely need to take a closer look at this, could be interesting for a specific project.

clojurescript demo convex hull. A demo for programming client-side code in Clojure using Clojurescript. Clojurescript compiles Clojure to JavaScript using the Google Closure Compiler and the Closure Library. Looks like a very interesting way to program clients, especially since Clojurescript is supported by Rich Hickey, the inventor and main developer of Clojure, so we can assume that the integration into the Clojure world will be good.

Pattern Matching In Python. Interesting article for people like me, i.e. for people who like Snobol4 or its "successor" (in quotation marks, because it is then a completely different language) Icon and would like an alternative to regular expressions. Implements a pattern-matching system very similar to the Icon model, complete with backtracking and generators. However, it is from 2004 and is rather a proof-of-concept story, not necessarily a directly usable and installable Python module. Unlike SnoPy, it is pure Python and not a Swig-based wrapper for an Ada Library.

Bash on Balls. For the moments in life where even Visual Basic would be too much - a web framework for Bash scripts. Naturally uses a few Unix tools in addition, especially Netcat for network I/O. And yes, it comes with a complete server and everything, just as one would imagine. Even has Dev-Code-Reload and such things, as well as a template language. And with BoB a nice acronym. (and unlike Cobol on Cogs this is a project that one can actually run and not just a joke)

FAQ - Kotlin - Confluence. The fifty-third Java-killer language for the JVM, which also attacks Scala here (the usual argument "Scala is too complicated", which on first glance is indeed true - Scala has few central basic features, which are then provided with many features for the programmer by the standard library and the good DSL possibility at the surface of the actual language). The question remains what will come of it, but since JetBrains is behind it, it will at least have a good IDE (JetBrains builds IntelliJ and other JVM IDEs, including PyCharm and with AppCode the only current OSX Objective-C alternative to XCode). And hey, anyone who names their language after an island near St. Petersburg already has a head start with me.

WSGID When your WSGI app becomes a nix daemon. Mongrel2 by Zed Shaw has interested me for quite some time, but the biggest drawback was that there are not many Python frameworks that work directly with Mongrel2. wsgid solves the problem, it is a WSGI server for Mongrel2 and can thus then connect frameworks that can run under WSGI - for example, Mongrel2 can be used as an HTTP server for a distributed Django installation. By using ZeroMQ in Mongrel2, the whole thing is then significantly more flexibly structured than with the classic (FCGI-based) server integrations.