Live data from Hacker News

Japanese explained to programmers

lajili.com

71–80 of 416 posts

Re: Japanese explained to programmers

#71

> The japanese standard library offers a bunch of chainable functions to add meaning to your primitive types. English and French work in the same way . However roles are usually determined by word order. But in essence it's the same thing as obj.do_stuff(), 'obj' is the thing that do_stuff.

English passive voice construction is inverted similar to Japanese. It's just OVS vs SVO. I've never really thought of programming languages in passive voice before, but it explains why I've increasingly written and spoken in passive voice structure even though I know it's "wrong" to do so.

I wouldn't say that programming is expressed as OVS. Function calls are VSO, e.g. `push(array, element)`. Method calls are SVO, `array.push(element)`. I speculate that this is why method-style dot-notation has become so dominant over the past few decades, because of its natural familiarity to English speakers as compared to the functional VSO style.

Re: Japanese explained to programmers

#72

Earlier quoted context omitted.

My mother tongue is English. I studied Japanese to degree level so I feel at least moderately qualified to comment on it. English is grammatically fairly simple, having dispensed with much of the (redundant) complexity found in its European brethren (gender, case, almost all inflection). I would argue that that makes it fairly easy for beginners to develop a basic command of it. Its main problems are its unpredictabl…

what do get up/on/down/over have to do with each other? Thank you! It is heartening to hear this from a native speaker. Phrasal verbs are… a pain. “Burning up” pretty much is “burning down”? Oh, the list is long.

> “Burning up” pretty much is “burning down”?

Except that if you are burning up, you have a fever, but if you are burning down, you might be planning on illegally collecting some insurance money :)

Re: Japanese explained to programmers

#73
post #19

"Being born in France, I was immersed in Japanese culture from a very young age." I fail to see how these two things are connected?

sorry it's almost a meme at this point that France has a thing for Japan and vice versa. The 90s in particular were ripe with animes on the main French channel, lots of collaboration between France and Japan. We got Japanese movies in the cinema much prior the rest of the world and even today you can find gigantic sections for mangas and anime in bookshops, cinemas...

From my childhood, it was obvious the French had a love of anime from series that made it to the UK, like Ulysses 31 [0] and The Mysterious Cities of Gold [1], co-productions between French and Japanese TV companies. I also thought Dogtanian and the Three Muskehounds [2] was French, but it was produced in Spain.

[0] https://en.wikipedia.org/wiki/Ulysses_31

[1] https://en.wikipedia.org/wiki/Mysterious_Cities_of_Gold

[2] https://en.wikipedia.org/wiki/Dogtanian_and_the_Three_Muskeh...

Re: Japanese explained to programmers

#74

request.setURL("serverurl").send() This style of sentence structure was one of the strangest things to get comfortable with. You have to think a bit differently. The function chaining makes sense here and I wonder if the language had influence on Ruby's development. Anyone interested in the language should definitely check out the Genki series. It's written well enough you could fully teach yourself. https://genki3.j…

That's only a problem if your native language has strict word order.

Re: Japanese explained to programmers

#75
post #42

Honestly this feels like "programmer circle jerk" material. I love Japanese. I love it so much that I (accidentally?) moved to Japan. But it really has nothing to do with programming. It's a natural langauge with all the idiosyncrasies of natural languages. In fact I'd say that English in comparison feels like a man-made language purpose built for math and technology.

Programmers are really attracted to Japanese. It's the language with the most over-engineered tools for learning.

Re: Japanese explained to programmers

#76
post #34

Earlier quoted context omitted.

> copious use of lookup tables or prefix trees. or language models

Sure, but it’s a messy model that tells you that 生 is pronounced nama or sometimes ki, 生きる ikiru, 生じる shōjiru, 学生 gakusei, 生む umu…

All the examples you gave are pretty obvious to read because of suffixes, called okurigana, or the other kanji next to it. Problem arises only when the kanji stands alone and that doesn't happen so often as people think. Even when it does, most often than not, you can infer the reading from the context.

Re: Japanese explained to programmers

#77
post #59

Earlier quoted context omitted.

My mother tongue is English. I studied Japanese to degree level so I feel at least moderately qualified to comment on it. English is grammatically fairly simple, having dispensed with much of the (redundant) complexity found in its European brethren (gender, case, almost all inflection). I would argue that that makes it fairly easy for beginners to develop a basic command of it. Its main problems are its unpredictabl…

My native language is french and learned english at a young age. Saying that french spelling is nowhere near as bad as English is insane to me.

French is hard to encode but easy to decode. ai, aix, é, aient are all (more or less?) the same, so reading is fine, but working out which to write can be tough.

French has bigger problems though. That keyboard for a start.

Re: Japanese explained to programmers

#78
post #42

Honestly this feels like "programmer circle jerk" material. I love Japanese. I love it so much that I (accidentally?) moved to Japan. But it really has nothing to do with programming. It's a natural langauge with all the idiosyncrasies of natural languages. In fact I'd say that English in comparison feels like a man-made language purpose built for math and technology.

> In fact I'd say that English in comparison feels like a man-made language purpose built for math and technology.

Do explain!

Re: Japanese explained to programmers

#79
post #70

In case anyone is curious, I asked ChatGPT how Japanese refer to "fish that are blue" since "blue fish" is also the word for mackerel. Coincidentally, it's exactly how I just distinguished them in English just now. You can read ChatGPT's replies below (I manually collated the replies, leaving my prompts out): In Japanese, mackerel is written as 鯖 (さば). Blue fish" in Japanese is 青い魚 (あおいう お). The middle character in "…

ChatGPT's response is full of BS.

青い魚 is あおいさかな NOT あおいう お

The middle character has nothing to do with the verb to be; it's an adjective suffix.

青い魚 is literally "blue fish". It's not a full sentence.

Re: Japanese explained to programmers

#80
post #42

Honestly this feels like "programmer circle jerk" material. I love Japanese. I love it so much that I (accidentally?) moved to Japan. But it really has nothing to do with programming. It's a natural langauge with all the idiosyncrasies of natural languages. In fact I'd say that English in comparison feels like a man-made language purpose built for math and technology.

Exactly my thoughts. While not fluent for professional settings, I live in Japan and speak enough for everyday life and I can tell that the Japanese I studied at school from first principles and more "literature-like" has nothing to do with the one used day to day, and e.g. that one has nothing to do with the one used in manga.

You can do the same exercise as the author with almost all languages, the only small advantage of Japanese and more programming-like is the combination of kanjis to make up new words but even then the pronunciation might totally change. For example in Spanish:

"I eat beef" = "Yo como ternera" = subject + verb + object. Both in Japanese and Spanish, but not in English, you can omit the subject "yo"/"watashi". But this is so syntetic that people wouldn't use normally, I might instead want to say how good cow meat is and say "¡me encanta la ternera!" "Gyuniku ga suge ski!" (transliterated), in Japanese effectively eating up some random letters there.

Post reply on HN