GRIB API

November 16, 2009

I found this fascinating site for the GRIB API:

The ECMWF GRIB API is an application program interface accessible from C and FORTRAN programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages. A useful set of command line tools is also provided to give quick access to grib messages.

Being as ignorant as I am, I had never heard of GRIB (WP: from "GRIdded Binary", "a mathematically concise data format commonly used in meteorology to store historical and forecast weather data"). For the first ten minutes I was staring at this page trying to figure out if it was an elaborate hoax — that someone had invented a funny-sounding acronym for a technology and pretended to develop APIs for interacting with it. It sounds wrong in just the right way! Especially convincing is the mention of the older, now deprecated GRIBEX package.

Related work: HORG, the Holotypic Occlupanid Research Group; SCIgen and their video Near Science, and Dresden Codak’s Dungeons and Discourse.

Comments Off

Writing Kernel Modules in Haskell

October 20, 2009

Seen on LWN. Source.

"By making GHC and the Linux build system meet in the middle we can have modules that are type safe and garbage collected. Using the copy of GHC modified for the House operating system as a base, it turns out to be relatively simple to make the modifications necessary to generate object files for the Kernel environment." This leads to code which looks like:

 hello = newCString "hello" >>= printk >> return 0 

This is followed by 86 comments about C++, matrix math, and other minutiae.

Comments Off

Chris Lamb: No-one expects the string literal exception

August 24, 2009

This cracked me up once I figured it out. Seen on Planet Debian: a cute exploration of Python arcana.

You’ll actually need Python ≤ 2.5 to reproduce that behaviour, but what’s actually neat about all this is that the exception will be caught—without warnings—as you originally expected under Python 2.6, dispite string literals being “truly and utterly dead”. See if you can work out why.

Comments Off

weirdx 1.0.32-3 entered NEW

August 14, 2009

Seen on the Debian NEW queue page: weirdx entered NEW???

Description:
 weirdx     - X server in Java
Changes:
 weirdx (1.0.32-3) unstable; urgency=low
 .
   * Convert to dh 7 and quilt
   * Change from sun to openjdk and move to main (Closes: #540445)
Comments Off

A Functional I/O System (or Fun for Freshman Kids)

August 3, 2009

Seen on Lambda the Ultimate. The paper (PDF), the coverage.

If input and output were invisible, students could implement fun simulations, animations, and even interactive and distributed games all while using nothing more than plain mathematics.

I maintain that people don’t “think” in terms of plain mathematics, and teaching them along those lines is setting yourself up for disappointment, but there are some comments here that seem like they could be useful. Are loop invariants a thing I unconsciously abide by when I write loops? Hard to say.

Comments Off

Enrico Zini: Tips on using python’s datetime module

June 25, 2009

Igor wanted something to hate about Python. The blog post:

Python’s datetime module is one of those bits of code that tends not to do what one would expect them to do.

Comments Off

CPython in the web browser under Native Client

June 17, 2009

Towards: the replacement of JS as an anachronistic relic? The story on LWN:

Mark Seaborn has announced an effort to put CPython into Google’s Native Client. “I have been doing some work to extend Google’s Native Client to support dynamic linking. For those who haven’t heard of it, Native Client is a sandboxing system for running a subset of x86 code. It is proposed as a way of running native code inside web apps. One of my aims has been to get CPython working in the web browser under Native Client without having to modify CPython. I recently got to the point where modules from the Python standard library are importable under Native Client, including (as a demonstration) the Sqlite extension module.

Comments Off

python-eventlet 0.8-1 entered NEW

June 10, 2009

Need to look at this.. greenlets builds against a standard interpreter? How?? The Second Life Wiki says:

Eventlet is a networking library written in Python. It achieves high scalability by using non-blocking io while at the same time retaining high programmer usability by using coroutines to make the non-blocking io operations appear blocking at the source code level.

Edit: it looks like it copies huge chunks of the stack into/out of the heap as needed. A greenlet is just a few stack frames, starting at a particular stack frame, right? I’m not sure if it gets copied to the same location in the stack or whether C-frame pointers to the stack will get weirded, though.

Comments Off

Java’s New G1 Collector Not For-Pay After All

June 5, 2009

How many times have you sighed and shrugged because someone you knew pointed to a story that was completely wrong, negligible, or already addressed? The story from Slashdot:

An anonymous reader writes “As a follow-up to our previous discussion, Sun appears to have quietly edited the Java 6u14 release notes language to say now: ‘G1 is available as early access in this release, please try it and give us feedback. Usage in production settings without a Java SE for Business support contract is not recommended.’ So does this mean it was all one huge typo? Or was Oracle/Sun tentatively testing the waters to see the community’s reaction? In either case it’s nice to see Java’s back on the right path.”

Comments Off

Java Gets New Garbage Collector, But Only If You Buy Support

May 30, 2009

Fucking ell oh ell, Java users worldwide. The story from Slashdot:

An anonymous reader writes “The monetization of Java has begun. Sun released the Java 1.6.0_14 JDK and JRE today which include a cool new garbage collector called G1. There is just one catch. Even though it is included in the distribution, the release notes state ‘Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.’ So the Oracle touch is already taking effect. Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?”

Comments Off