Exercises in translation

Over the summer I have been working on translating a short story from classical Greek to English. Some discussion and an excerpt are available at my new site Chalcolith.com. The full story is available at Amazon or Smashwords.

—How, he says, shall we comprehend the kingdom of God, and by what analogy shall we illuminate it?

Like a mustard seed, which, when sown on the earth, is smaller than all the seeds on the earth, [but] when sown, rises up and becomes greater than all the [other] herbs, and grows branches so great that all the birds of the sky can roost in its shade.

Linguistic Field Notes from the First Plousikosmotic Expedition

More data is definitely needed.

\_sh v3.0  621  Text

\id JF.00001.001
\nt Observed in the context of a shared meal.  
\nt Note that there is a definite falling tone on the last mora of an utterance.


\ref JF.00001.001.00001
\tx soˈziːkʰ gaˈmaː
\ft mama
\nt Reference to JF.00001's mother, AF.00002.

\ref JF.00001.001.00002
\tx onɛˈziːkʰ kaˈvaː
\ft X
\nt Reference to JF.00001

\ref JF.00001.001.00003
\tx moˈʒiː goˈliːd
\ft daddy
\nt Reference to JF.00001's father, AM.00003.

\ref JF.00001.001.00004
\tx ogaˈmiː
\ft baby
\nt Reference to AF.00002's fetus, JM.00004.

\ref JF.00001.001.00005
\tx gozaˈmiː goˈvaː
\ft goodbye, X
\nt Uttered by AM.00003 when JF.00001 left the context of a shared meal.

\ref JF.00001.001.00006
\tx ˈogi goˈmiː
\ft hello, my friends
\nt Uttered by JF.00001 upon entering a group.

\ref JF.00001.001.00007
\tx goː laˈmiɣo
\ft kid

\ref JF.00001.001.00008
\tx ˌnoːgaˈliː
\ft friends

\ref JF.00001.001.00009
\tx gozaˈmiː
\ft excuse me
\nt Uttered by JF.00001 upon leaving the context of a shared meal; cf JF.00001.001.00005

\ref JF.00001.001.00010
\tx zogaˈmiʔo
\ft welcome
\nt Uttered by JF.00001 as others approached.

\ref JF.00001.001.00011
\tx zogaˈmikʰ zaˈvaː
\ft watch!
\nt Uttered by JF.00001 apparently to direct attention to an activity.

\ref JF.00001.001.00012
\tx ˈzogiː gaˈvaː
\ft watch, Mom & Dad!
\nt Uttered by JF.00001 specifically to parents AF.00002 and AM.00003, to direct attention to an activity.

\ref JF.00001.001.00013
\tx goˈmɒːn
\ft come on!
\nt Uttered by JF.00001 to urge AF.00002 to follow. Perhaps borrowed from English.

Fun with Prolog

Saw a post about currency arbitrage in Prolog on Hacker News, and wrote a more general solution:

:- use_module(library(lists)).
:- use_module(library('http/http_client')).
:- use_module(library('http/json')).

%! find_chains(+MaxLength) is semidet
%
% Prints possible profitable conversion chains.

find_chains(MaxLength) :-
  http_get('http://fx.priceonomics.com/v1/rates/', Json, []),
  atom_json_term(Json, json(Prices), []), % convert the json atom to a prolog term and extract the list of prices
  abolish(price/3),                       % clear any old price facts from the database
  assert_prices(Prices),                  % update the database with current prices
	
  % now get the set of all solutions for the predicate 
  % build_chain/3, and build a list of the results
  setof(chain(Symbols, Profit), build_chain(MaxLength, Symbols, Profit), Chains),
	
  % print the results
  write(Chains).

%! assert_prices(+List) is det
% 
% Adds the list of prices to the dynamic database.
%
assert_prices([]).
assert_prices([SymbolPair = Price | Rest]) :-
  atomic_list_concat([From, To], '_', SymbolPair),
  atom_number(Price, Num),
  assertz(price(From, To, Num)),
  assert_prices(Rest).

%! build_chain(+MaxLength, -Symbols, -Profit) is nondet
%
% Finds a profitable chain

build_chain(MaxLength, Symbols, Profit) :-
  price(Dest, Next, _), Dest \= Next, % pick a starting symbol (ignore repeats), with backtracking
  build_chain(MaxLength, Dest, [Dest], 1.0, Symbols, Profit).

%! build_chain(+Count, Dest, SymbolsIn, ProfitIn, SymbolsOut, ProfitOut)
%
% Finds a possible next link in the chain, checks to see if it's a loop, otherwise recurses.

build_chain(0, _, _, _, _, _) :- !, fail.    % stop backtracking when we hit our maximum length

build_chain(Count, Dest, SymbolsIn, ProfitIn, SymbolsOut, ProfitOut) :-
  price(A, B, P),                            % find a price record (backtracking over all of them)
  append(_, [A], SymbolsIn),                 % make sure the chain connects
  Profit is ProfitIn * P,                    % calculate our profit
	
  (B = Dest                                  % do we have a loop?
    ->  Profit > 1.0,                        % is it profitable?
        append(SymbolsIn, [B], SymbolsOut),  % if so, then we're done
        ProfitOut = Profit
		
    ;   \+ member(B, SymbolsIn),             % if not a loop, make sure we don't repeat interior symbols
        append(SymbolsIn, [B], SymbolsNext), % add B to a temp list
        NextCount is Count - 1,              % and recurse, decrementing our counter
        build_chain(NextCount, Dest, SymbolsNext, Profit, SymbolsOut, ProfitOut)).
	

Just Keep Bouncing

My wife and daughter and I are in San Diego for the week escaping the gloomy Vancouver winter. It’s been a great relaxing time. Except for a few seconds yesterday, the stuff of every parent’s nightmares.

Andrea and Emily had gone up to the second pool area of the resort, which we hadn’t been to before yesterday, as it is a bit of a hike from our room. I was back in the room catching up on a hobby programming project. Emily loves pools — cries when she has to leave — but though she’s taken some swimming lessons, she’s still pretty hesitant to venture out without a flotation device, or spend any time under water. She’s only three, after all.

So Andrea’s sitting on the edge of the pool, and Emily is splashing around on a ledge that runs around the side. Andrea looks away for a moment, and looks back to see the top of Emily’s head, bobbing up and down under the surface. A frozen second later and Andrea has her, coughing and crying, but absolutely fine.

So far so commonplace, if absolutely terrifying. I’m still having periodic bouts of panic even at second hand.

What is extraordinary about this to me is Emily’s story. We asked her what she was thinking while she was under the water. “I didn’t know if Mommy would come and get me” — every parent’s heart skips a beat — “but I just kept bouncing.”

Bouncing.

The shallow end of the pool nearest our room is just shallow enough for Emily to stand on her tiptoes and keep her chin out of the water. When she first went in, earlier in the week, she was terrified of the water on her face and clung to me, but she’s a hardy soul, and within an afternoon she was splashing happily around — mostly with the aid a pool noodle in her beloved purple.

I’ve been introducing her to some swimming and floating techniques, but she’s sometimes three going on thirteen, and far too cool to listen to Dad’s dull lectures on hydrodynamics. So she figured out how to keep her face mostly above water in that shallow end. By bouncing. Just keep pushing off the bottom.

I have always been filled with pride and wonder at Emily’s burgeoning intelligence, self-possession and strength of character, but what overwhelms me with such fierce joy and awe right now I can hardly stand it, is that when my little girl went in over her head, she didn’t panic, she didn’t flail, she didn’t gasp and choke.

She bounced. She just kept pushing off the bottom, face towards daylight.

There have been a lot of times in my life I’ve felt like water was closing over my head, and most of those times I’ve flailed about to no good purpose. I don’t really think of myself any more as someone with much of a purpose or strength or a lot of fight in me. When waves start to crash over my head — and there have been a few doozies lately — I just kind of curl up and hope I can ride them out. I feel prematurely jaded and cynical most of the time, privately scornful of any kind of optimism.

Is it possible that I could learn a thing or two from my small wonderful daughter? That curling up and riding out the waves has worked to drift to the surface until now, but maybe there could be more? I don’t know if I’m capable of learning, or re-learning, a new approach, and I’m most definitely not worthy of my small teacher.

But, you know, it could be something to strive for. When a wave knocks you down, or when you slip and fall, kick those legs straight down and push off. You never know. Your face just might break the surface. There just might be someone beside you to hold you up.

Whatever happens, just keep bouncing.