2012-11-25

The Nasochron


Here is Christian Morgenstern's lovely poem "Das Nasobēm", which was written around 1895 and is usually called a nonsense poem, though not in the sense of "'Twas brillig, and the slithy toves ..."  Indeed, all the words in it make plain sense except one; the nonsense comes in from the fact that once you have read the poem, you still know nothing about the animal.

Auf seinen Nasen schreitet
Striding on its noses
einher das Nasobēm,
there comes the Nasobame
von seinem Kind begleitet.
with its child in tow.
Es steht noch nicht im Brehm.
It isn't yet in Brehm's [encyclopedia of zoology].

Es steht noch nicht im Meyer.
It isn't yet in Meyer's [encyclopedia]
Und auch im Brockhaus nicht.
And also not in Brockhaus's [encyclopedia]
Es trat aus meiner Leyer
It trotted out of my lyre
zum ersten Mal ans Licht.
when it first came to light.

Auf seinen Nasen schreitet
Striding on its noses
(wie schon gesagt) seitdem,
on it, as I've said above,
von seinem Kind begleitet,
with its young in tow,
einher das Nasobēm.
there goes the nasobame.

And here's my translation of it, which I put together in a few minutes today.


On all its noses striding,
Here comes the Nasochron.
Its child so gently guiding
'S not drawn by Audubon.

You won't find it in Brockhaus
Or Britannica Online,
I found it in this schlock-house
I'm pleased to call my mind.

On all its noses striding
(As I have said anon)
Its child so gently guiding
Here comes the Nasochron.


There are said to be poetic translations by G.G. Simpson and L.Chadwick.  I haven't read them.

2012-06-08

Programming languages, their implementation strategies, and their communities

Programming languages can be divided into three groups based on their implementation strategies:

A) Multiple competing implementations, relatively small standard libraries, many third-party libraries available. C, C++, Cobol, Fortran, JavaScript use strategy A.

B) A single dominant implementation which comes with a fairly large library which everybody uses; typically there is no formal standardization. Substantial third-party libraries may or may not be available. Second-source implementations are continually playing catch-up with the dominant version. Ada, Java, Perl, Python, Ruby use strategy B. So do most DSLs, research languages, and personal toys. Haskell used to be strategy C but is now B due to the increasing dominance of GHC.

C) Multiple implementations, relatively small standard libraries, each implementation comes with lots of libraries. Substantial third-party librarys may or may not be available. The Lisp languages use strategy C; so do Forth, ML, and the Posix shell.

Common Lisp and the shell have fairly large standard libraries (for the shell, it's the Posix utilities that constitute the library); R5RS Scheme and even R6RS Scheme have fairly small ones. When the R7RS Scheme process is complete, the relative sizes in the Lisp world will be R5RS < R7RS-small < R6RS < Common Lisp < R7RS-large, but the standard libraries of R7RS-large will be optional for conformance rather than mandatory, so Common Lisp may still be larger in practice.

In a strategy C language, an implementation is more than just an implementation; it's a community, or even a movement. Strategy A languages don't draw this sort of loyalty for the most part; decisions between implementations are based only on cost, or else technical criteria such as speed, space, compilation speed, or availability in a particular environment. Strategy B languages have only one community per language, with a few splinter groups; that's what makes them such juggernauts today.

But to write your code for Chicken or Racket or Chibi Scheme involves more than a cold-blooded decision about the advantages of these particular environments. Technical factors may control the choice in some circumstances. But where they don't, people end up deciding based on essentially tribal factors, the same that make people fanatically loyal to vi or Emacs (or, in my case, "ex").

That's not necessarily a bad thing. But it would be a good thing, unqualified, if some of the library code available to Chicken programmers was also directly available, without fuss, to Racket or even Chibi Scheme programmers. Essentially everything new in R7RS-small is in pursuit of that goal one way or another. Likewise, the packages in R7RS-large (which is not yet fully specified) are meant to help at a higher level with that interoperability goal.

2012-04-05

Concurrency vs. parallelism


Parallelism refers to physically simultaneous execution.  When you raise both arms above your head, you do so in parallel.  Nothing can be more parallel than the number of execution agents simultaneously available: on an 8-core system, you can add up 8 rows of a matrix in parallel, but not 16 rows.  Furthermore, some problems cannot be parallelized, whereas others can be executed entirely in parallel, and there are many cases in between.
Concurrency refers to conceptually simultaneous execution.  When you juggle balls, you are executing a concurrent program: despite appearances,jugglers only throw or catch one ball at a time.  A concurrent program can execute on a single execution agent, on as many agents as it has concurrent components, or anything in between, so concurrency does not depend on parallelism.  We usually speak of concurrency when there is interaction between the concurrent components.
Flow-based programming, of which a shell pipeline is the most familiar example, is based on the concurrent execution of mostly isolated processes that communicate via flows.  Because the individual components are isolated, they may be executed in parallel or not.  Because there are no constraints on what components may do with their inputs, parallel execution may or may not actually speed up the computation.

2012-01-18

Schleicher's Fable in Lojban


Here's a version of Schleicher's Fable in Lojban with word-by-word glosses (note the use of letters as pronouns).  You can see Latin, Greek, and Sanskrit versions at Memiyawanzi.

pa lanme .e ci xirma
one sheep and three horse

pa lanme poi claxu loi sunla cu viska ci xirma
one sheep such:that lack a:mass:of wool (-) see three horse

.i pa ri cu lacpu pa tilju carce
(-) one:of the:latter (-) pull one heavy cart

.i pa ra bevri loi barda
(-) one:of the:previous carry a:mass:of heavy-thing

.i pa ra sutra bevri pa nanmu
(-) one:of the:previous quick carry one man

.i ly. cusku fi ci xy. fe lu
(-) S. say to three H. (-) quote

le risna cu se cortu ri'a lo nu viska pa nanmu poi sazri xy. li'u
the heart (-) PASV hurt because:of a/some event:of see one man such:that operate H. unquote

.i ci xy. cusku lu
(-) three H. say quote

doi lanme ko jundi
O sheep you-IMPV pay:attention

.i le risna cu se cortu ri'a lo nu viska la'e di'e
(-) the heart (-) PASV hurt because:of event:of see referent:of following:utterance

.i tu'a pa turni nanmu cu zbasu lo sunla be ly. binxo lo se dasni be ny.
(-) (-) one govern man (-) make a/some wool of S. become a/some PASV wear [i.e. worn thing] of M.

.i je ly. claxu sy. li'u
(-) and S. lack W. unquote

.i ly. jimpe la'e di'u
(-) S. comprehend referent:of preceding:utterance

.i je ba bo rivbi klama le pintu'a
(-) and then (-) escape go:to the plain [lit. flat=parcel:of:land]

The Lojbanists I checked this with don't understand why the sheep flees, since he has already been shorn.  Does anyone have any idea?