logoalt Hacker News

araesyesterday at 11:56 PM2 repliesview on HN

Question on some of the syntax. It's neat, and think the idea's cool. Would definitely be something if nothing else for security through obscurity. Is it even code?

However, for some of the number stuff, if you write something like:

  (5'le 3'ün farkını) yaz.
  (3'ün 5'le farkını) yaz.
How does it tell whether it is:

  5 - 3 =  2, or
  3 - 5 = -2  ?
Does it always just return 2 because of the meaning of "farkını" and the placement of 'le and 'ün? Like:

  (5 first, 3 second, difference) write, vs
  (3 second, 5 first, difference) write  ?
Google just gave back:

  Write (the difference between 5 and 3).
  Write (the difference between 3 and 5).
Not especially familiar with Turkish, and mostly had to use translation, yet it looks like a language for defining math theorems? Number following "zero" shall be called "one", number following "one" shall be called "two". Or is that more just a feature of using natural language for the writing syntax?

Replies

joomytoday at 12:00 AM

"fark" here takes two arguments, the first (the minuend) is in instrumental case (-le), the second (the subtrahend) is in genitive case (-in). Now, because of the suffixes of the cases, regardless of the order in which you give the arguments, the type system can figure out which one is supposed to be the minuend and which the subtrahend.

If it helps, you can think of it like named arguments where the name is inferred from the case.

show 1 reply
pinkmuffineretoday at 1:14 AM

Disclaimer: I grew up speaking Turkish, but never studied it. I think I can give a common-sense explanation, but can’t give a rigorous “proof” appealing to grammatical rules.

I read “(5’le 3’ün farkını) yaz” as “having 5, 3’s difference write” (of course this is not natural in English). Ie, you’re given 5, you want to take 3, and write the result. Likewise, “(3’ün 5’le farkını) yaz” would be “3’s difference, having 5, write”. Again we are given 5, and want 3’s difference. Because we’re starting with 5, i think there is no ambiguity in the operation to be done — start with 5, subtract 3.

Idk if that actually helps clarify it at all, maybe it gives some intuition