Live data from Hacker News

Show HN: Han – A Korean programming language written in Rust

github.com

91–100 of 131 posts

Re: Show HN: Han – A Korean programming language written in Rust

#91

A simple translation of keywords seems straightforward, I wonder why it's not standard. # def two_sum(arr: list[int], target: int) -> list[int]: 펀크 투섬(아래이: 목록[정수], 타개트: 정수) -> 목록[정수]: # n = len(arr) ㄴ = 길이(아래이) # start, end = 0, n - 1 시작, 끝 = 0, ㄴ - 1 # while start Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on t…

It's been tried with Chinese Python back in the early 2000s: http://reganmian.net/blog/2008/11/21/chinese-python-translat... It never really took off. I think because computers already require users to read and type Latin letters in lots of other situations, and it's not that hard to learn what a few keywords mean, so you might as well stick with the English keywords everyone else is using.

That probably pops up all over the place, like how there's no real progress making the terminal support different keyboards/languages (e.g. send raw key code to terminal apps).

Technical people already have to make concessions to deal with ascii chars and English in computing by the time they use a terminal, so the upside of changing any one thing kinda peters out.

Re: Show HN: Han – A Korean programming language written in Rust

#92

When I was studying Computer Science in college, I once remarked how lucky we, English speakers, are that programming languages use English nouns and verbs. A ton of my classmates were here on a student visa, and English was not their first language. I always thought that programming in English put me at an advantage on the learning curve. I also always thought it was silly when someone would quip that programming sh…

Nah. If anything, treating keywords as special sigils actually helps.

Also, not all natural languages are suitable for programming languages. In highly inflected languages you often end up with grammatically incorrect forms. Or with stilted language.

Re: Show HN: Han – A Korean programming language written in Rust

#93
post #7
post #4

Earlier quoted context omitted.

Thanks! One thing that motivated me was curiosity about prompt efficiency in the AI era. Hangul is beautifully dense — a single syllable block packs initial consonant + vowel + final consonant into one character. I wondered if Korean-keyword code might produce shorter prompts for LLMs. I actually tested this with GPT-4o's tokenizer, and the result was the opposite — Korean keywords average 2-3 tokens vs 1 for English…

Very Interesting... I have similar idea to train LLM in Serbian, create even new encoding https://github.com/topce/YUTF-8 inspired by YUSCII. Did not have time and money ;-) Great that you succeed. Idea if train in Serbian text encoded in YUTF-8 (not UTF-8) it will have less token when prompt in Serbian then English, also Serbian Cyrillic characters are 1 byte in YUTF-8 instead of 2 in UTF.Serbian language is phoneti…

You can look at Ukrainian LLM Lapa for inspiration:

https://huggingface.co/spaces/lapa-llm/lapa

Best tokenizer for the Ukrainian language

Thanks to a SOTA method for tokenizer adaptation developed by Mykola Haltiuk as part of this project, it was possible to replace 80,000 tokens out of 250,000 with Ukrainian ones without loss of model quality, thus making Lapa LLM the fastest model for working with the Ukrainian language. Compared to the original Gemma 3, for working with Ukrainian, the model requires 1.5 times fewer tokens, thus performing three times fewer computations to achieve better results.

Re: Show HN: Han – A Korean programming language written in Rust

#94

A simple translation of keywords seems straightforward, I wonder why it's not standard. # def two_sum(arr: list[int], target: int) -> list[int]: 펀크 투섬(아래이: 목록[정수], 타개트: 정수) -> 목록[정수]: # n = len(arr) ㄴ = 길이(아래이) # start, end = 0, n - 1 시작, 끝 = 0, ㄴ - 1 # while start Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on t…

It's been tried with Chinese Python back in the early 2000s: http://reganmian.net/blog/2008/11/21/chinese-python-translat... It never really took off. I think because computers already require users to read and type Latin letters in lots of other situations, and it's not that hard to learn what a few keywords mean, so you might as well stick with the English keywords everyone else is using.

[flagged]

Re: Show HN: Han – A Korean programming language written in Rust

#95
Great work! I still remember my high school IT class, where teachers were using multiple languages to explain the functionality of different 'modules' in programming language (it was still python 2.x back then), and by that time I was trying to do a 'multilingual' programming language (tbh it was just changing variables into different languages), and now 10 years have passed, and the dream is finally catching up with me.

Re: Show HN: Han – A Korean programming language written in Rust

#98
post #60

When I was studying Computer Science in college, I once remarked how lucky we, English speakers, are that programming languages use English nouns and verbs. A ton of my classmates were here on a student visa, and English was not their first language. I always thought that programming in English put me at an advantage on the learning curve. I also always thought it was silly when someone would quip that programming sh…

Naah, my non-english-speaking friends say that the keywords are less than 1% complexity of a programmer's job, so it really doesn't matter. Also, in most languages you already can name variables/classes/members in any Unicode letters. So only "if/for/while" keywords and stdlib classes remain English. It makes little sense to translate those.

However, in the vast majority of cases, non-ASCII characters are rarely used for variable or function names during programming. This is because they can cause conflicts when using different encoding systems, and some automation tools fail to recognize them. Consequently, programmers in non-English speaking regions must invest more effort into naming variables than English speakers, as they have to translate all localized expressions into English.

When Toss, a Korean unicorn startup, announced that they would start using Korean for variable names within financial contexts, it sparked significant debate and a wide range of reactions among Korean programmers.

Re: Show HN: Han – A Korean programming language written in Rust

#99
post #88

Earlier quoted context omitted.

It's fascinating and lucky how well Korean fits into a keyboard designed for English. Japanese and Chinese are notoriously inefficient to type.

The modern Korean Hangul script is phonographic, meaning it encodes sounds rather than ideas. Apparently that's good enough, or at least works better than how pure phonetic transcripts work for Japanese and Chinese languages, both of which users rejected that idea. But it was also a result of a relatively recent switch from Hanzi-Hangul mixed script used under Japanese occupation.

Actually, the use of Hanza(Hanzi)-Hangul mixed script wasn't exactly a byproduct of the Japanese occupation. (In fact, Japanese was the official language back then lol)

People started moving away from using difficult-to-type Hanza as soon as the typewriter was introduced. As computerization progressed, the transition naturally continued until Hanza was phased out of most documents. Even so, it has only been about 40 years since Hanza disappeared from everyday daily life.

Post reply on HN