programmierung - 18.12.2009 - 11.1.2010

HeyChinaski.com » Blog Archive » HeyGraph Javascript and canvas graphing tool - A graphics library that automatically aligns and displays graphs. Could be interesting for one or the other project.

Nailgun: Insanely Fast Java - if the JVM start takes too long, Nailgun can help with a persistent JVM. It simply keeps running and is told what to do. Should therefore also help with Scala and Clojure, especially when you want to build small tools that don't want to start a new JVM every time.

ProGuard - helps with trimming down standalone jars. Although this is not so easy with Clojure or Scala standalone jars, it seems you need to tinker a bit.

ScalaCheck User Guide - an interesting approach to a unit testing tool. Based on the ideas of QuickCheck for Haskell. I particularly like the approach of declaring tests as properties and then generating random data (or controlled test data) and checking whether these properties actually fit. This works particularly well with purely functional code, as functions are much easier to test with random inputs due to the lack of side effects.

technically.us Git - sling.git/blob - project/build/AssemblyProject.scala - nice small custom task for sbt to create standalone jars.

Ursula - not our former censor, but a programming language. Here linked to an example code. Who believed Anic is hard to read, Ursula wins the competition of the most unreadable programming language easily. Completely incomprehensible when you look at it.

anic - Dataflow language with interesting features and (practically non-existent compiler, as code generation is missing). Parallelization comes automatically with dataflow languages. Generally, a fascinating corner of languages that receives far too little attention. Whether a language with such a syntax heavy on special characters is the answer... yes, I know, syntax is only superficial - but try typing all those special characters on a German keyboard!

Communities: DIY LabVIEW Crew: A Commodore 64 emulator written in LabVIEW - and while we're at it with strange X-in-Y projects: LabVIEW is actually a graphical language for programming control systems and evaluation systems in laboratory environments. And is - in variation - used for programming Lego robots. No idea why someone would even come up with the idea of writing a C64 emulator in it. But they did it ...

qb.js: An implementation of QBASIC in Javascript (part 1) - Steve Hanov's Programming Blog - that's what it says. Someone damn well has too much time.

Alloy Analyzer - if you want to see how far automatic proofs and automatic reasoning on software models have come today, check out this project. Written in Java, installers available for major systems. Comes with a declarative language for model specification and automatic conflict finders - so a faulty model throws out counterexamples that violate at least one of the boundary conditions. And the tutorial doesn't deliver any abstract, practice-remote examples, but for example a model of a date system with various operations on it.

Apples and Bananas - if a politician should once again compare apples with bananas, this article about image recognition algorithms for distinguishing apples from bananas could help!

Nullege: A Search Engine for Python source code - very useful when you want to see how an API is used in various projects. Sometimes the documentation is a bit unclear and looking at example source code makes things clearer.

Building a Codeless Language Module with BBEdit 8.5 and (Ir-) Regular Expressions - since I keep looking for this, here's a guide on how to build codeless language modules for BBEdit and TextWrangler. In the new version, they can use regular expressions. Tip: try out the regular expressions in the grep search of BBEdit/TextWrangler, then you can see if they work correctly on a source.

SQLiteJDBC - another JDBC driver for SQLite

SQLiteJDBC - because I am a SQLite fan (if it's too complex for simple text files, SQLite is the next level), and because I play around with Scala and Clojure, I might need this here.

Python Package Index : promise 0.2.1 - quite a cool bytecode hack for Python that uses decorators to declare functions as "pure" or "constant" (or a few others) and thus enables optimizations of Python code. Specifically, expensive lookups can be avoided if you assure the compiler that within a function, for example, built-ins or named functions do not change dynamically but remain constant.

FleetDB - small in-memory database with persistence via an append-only transaction log. The protocol consists of simple JSON arrays. Implemented in Clojure, but can be integrated with any language through the JSON interface (you just need a JSON library and socket access).

generator_tools - because you sometimes encounter the situation of wanting to save generators in Python (e.g. when simulating continuations or coroutines using generators and using them as the state of a running web workflow in a web framework), this module (based on a hack on bytecode introspection) works to a limited extent. Already interesting because of the insights it gives into the interpreter.

Matasano Security LLC - Chargen - If You're Typing The Letters A-E-S Into Your Code, You're Doing It Wrong - interesting article (even if in a somewhat strange presentation form) about typical problems with the use of cryptography for SSO in web systems. Simply "I encrypt the cookie and then everything is fine" just doesn't cut it ...

MetaPython Documentation - one of the things that always bring me from Python to Lisp are the nice Lisp macros, with which one can elegantly build embedded DSLs for various purposes that integrate well with the host language. With MetaPython, you might be able to achieve something similar with Python. At least all the components are there.

OpenSimulator GForge - since I'm playing around with OpenSim again, here you can find a lot of projects around OpenSim.

Hg-Git Mercurial Plugin - should actually allow access to GIT repositories with Mercurial, but it seems to not work at the moment - I only get errors. But first of all, blogmarked for future use.

hgsubversion - since you occasionally encounter SVN and often get annoyed that you can't switch the working directory between releases, you can simply use hgsubversion. This mirrors a complete SVN repository into a local Mercurial repository from which you can easily populate your working area using Mercurial tools. Also useful if you want to manage patches for an SVN project, as Mercurial's patch queue is superior to all SVN-based techniques.

duelinmarkers's clj-record - a persistence framework inspired by Active Records (the ORM of Ruby on Rails), but in Clojure and with a more Lisp-like API. (that was a lot of Denglisch in one sentence!)

mattrepl's clojure-neo4j - and here is an interface to Neo4J, a graph database for Java, with which complex data structures can be stored on disk quite easily. Looks quite interesting for simple persistence in programs.

neo4j open source nosql graph database - the graph database for Java mentioned earlier. Looks quite interesting for situations where relational databases are too rigid and inflexible.

pjstadig's tim-clojure-1.0.0 - quite a cool project that implements a distributed environment for Clojure using Terracotta (basically a distributed map for Java). Objects with appropriate metadata are automatically distributed to all Clojures connected to this distributed environment - and it does this for almost all objects that can be defined in Clojure.

Moscow ML Home Page - surprisingly, I hadn't come across this before. It's a small SML bytecode compiler that now implements the full language scope and standard library. Much slimmer than the large SML/NJ and also requires fewer resources than SML/NJ or MLton. Very useful for small tools (and installable on the Mac with MacPorts - just like SML/NJ and Poly/ML, the other two major ML compilers).

Poly/ML Home Page - poorly linked, because Poly/ML is often ignored in favor of SML/NJ and MLton. Potentially also usable as an alternative to MosML, as Poly/ML is quite fast, but delivers native code that is also good for standalone tools. Although MLton still outperforms here, as it takes a long time to compile due to optimization across the entire program, but produces significantly smaller executables.

Standard ML of New Jersey - and no list of ML compilers would be complete without the grandfather of SML, so here's the last link. A bit aged, but certainly still one of the most well-developed systems.

Fuzzy Hashing and ssdeep - provides hash values for files that are similar if the files themselves are also similar. Can be used to find partially identical files (e.g. code reuse in source code or different versions of a document, etc.).

Home of pHash, the open source perceptual hash library - perceptual hashing provides similar hashes for visually similar files. So something like fuzzy hashing for images or movies. For example, phashes of images change only minimally if the image is minimally changed. The larger the difference in the images, the larger the difference in the hashes.

MLton Standard ML Compiler (SML Compiler) - MLton is required for Ur/Web, and conveniently, there is a binary download for OS X that works quite well if you have the GnuMP library installed via MacPorts (you can also install the mhash library from there, which is another prerequisite for Ur/Web). MLton is also an interesting project in its own right, as it is a standalone compiler for ML that has very good optimizations (though it also has extreme compilation times for the compiler).

Ocsigen - looks like something comparable to Ur/Web, which is based on the OCaml toolchain and the OCaml language. OCaml has some very nice properties, so this could also be interesting. However, the project gives more of a modular impression with several interoperating parts, and it remains to be seen how well the integration is. What excites me about Ur/Web is the fact that I can really put together a web application with just a handful of files, without much overhead. Also, installing Ur/Web from the source is simpler due to the small number of dependencies. On the other hand, Ocsigen is directly available in Debian, which of course makes the installation much easier.

The Ur Programming Language Family - interesting functional programming language with integrated XML templating and persistence. The goal is to write the entire interactive web application in one language. Data model in the same language as templates. All secured with type declarations and type inference - for example, there is a functor that automatically generates a complete administration interface for a table defined in Ur, with protection against code injection and other common attack scenarios. The language itself is very strongly oriented towards ML, but adopts some features from Haskell (specifically the monads and the more powerful type system). In some points, it reminds me strongly of Scala in terms of ideas - good embedded languages for SQL and HTML combined with a powerful functional language. However, the Ur compiler directly generates object code (and JavaScript for the client side) and not code for a virtual machine. And the runtime has no garbage collection, but memory management derived from the code (which makes memory behavior more deterministic). The whole thing is based on MLTon, a very well-optimizing ML compiler. Somehow, much of the project reminds me of Django - only not dynamically typed, but statically. Could be quite interesting.

Web Authoring System Haskell (WASH) - just for completeness, also linked, it is comparable to Ur/Web and Ocsigen, only with Haskell. But it somehow seems even more piecemeal than cohesive.

Mail::RFC822::Address - "The grammar described in RFC 822 is suprisingly complex. Implementing validation with regular expressions somewhat pushes the limits of what it is sensible to do with regular expressions, although Perl copes well"

Real World Haskell - I hadn't linked that yet? But this is the complete content of "Real World Haskell" on the web, the O'Reilly book on Haskell. I should read through it in a few quiet hours (days?).

Socket Benchmark of Asynchronous Servers in Python - interesting article about the performance and scalability to high hit rates of various asynchronous servers in Python.

A Case of the MUMPS - The Daily WTF - for the occasion, the link is quickly blogmarked, as I might need it in the near future ... (don't ask!)

Intersystems Caché -- Gateway to hell - TDWTF Forums - also this link blogged for the same reason.

Invent with Python - interesting free book about Python programming. Among other things, PyGame is used in Chapter 16.

WinMerge - if you ever need a graphical diff/merge tool for Windows. Open Source.

Crowdsourced document analysis and MP expenses - digging through British MPs' expense lists in Django. Interesting article about the pitfalls and problems of such a project at the Guardian.

fabricate - interesting build tool that automatically determines which dependencies exist from the commands for the compiler and then derives only the necessary actions from this in case of updates. Makefiles are quite normal Python scripts, which enables a whole lot of interesting hacks.

Building a Clojure Web application with Incanter, Compojure, and Leiningen « Data Analysis and Visualization with Clojure - very nice, especially because this example not only beautifully shows how simple it is to build a web application with Clojure using Leiningen and Compojure, but also because it's not the usual boring suspects as examples, but something completely different. (doesn't work on OS X at the moment due to a change by Apple to Java for 10.6, but the Leiningen people are probably already on it)

About Hypertable - something like Google's Bigtable, but as open source. Highly scalable database. Uses Thrift as the client protocol and is thus accessible from many languages.

Haystack - Search for Django - and this is the integration of Whoosh in Django. There are others, but this one seems the most developed.

InfoQ: Clojure 1.1 Adds Transients, Chunked Sequences for Efficiency - at the moment, Clojure is seeing the more interesting optimizations and considerations for functional programming. Because they focus on the essential part: data structures. An often neglected area in other languages - what good is a functional language if the included data structures are simply too low-level? Clojure provides access to low-level elements from Java if necessary for performance reasons, but also high-level data structures that behave much more naturally in functional code. And with chunked sequences and transients, now two quite elegant optimizations for these, which help avoid descending into the Java depths.

Ten years of .NET - Did Microsoft deliver? • The Register - "COM has never gone away, and .NET developers who want to use new Windows 7 APIs, for example, have to use an interop library to do so."