7 ms·
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 eve
by araes 8mo ago
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?
- joomy 8mo ago"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.
- nurettin 8mo agoHow do you express |a - b| ?
- joomy 8mo ago(bu tam-sayının) mutlak-değeri, (bunun 0'dan büyüklüğü) doğruysa, bu, değilse, bunun -1'le çarpımıdır. (5'in mutlak-değerini) yaz. (-5'in mutlak-değerini) yaz. You can try it in the playground.
- ronjakoi 8mo agoEssentially you could write equivalent code as (vähennä 5:ttä 3:lla) in Finnish
- pinkmuffinere 8mo agoDisclaimer: 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
- andro_dev 8mo agoThe Turkish sentence's expansion would be pretty much like the mathematical expansion of the expression order.