Genetically Engineering Physical Features

We are starting to learn how DNA controls the development of physical structures. Researchers have been able to modify the shapes of various features of developing mice by changing their “non-coding” DNA.

It turns out that so-called “junk DNA”, or “non-coding DNA” is actually the program that controls the use of the coding DNA, and it’s startlingly like a programming language, with switches to turn on and off the use of other parts of the genome depending on context, control flow expressions, and many more.

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)).