logoalt Hacker News

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

77 pointsby xodn348yesterday at 9:27 PM30 commentsview on HN

A few weeks ago I saw a post about someone converting an entire C++ codebase to Rust using AI in under two weeks.

That inspired me — if AI can rewrite a whole language stack that fast, I wanted to try building a programming language from scratch with AI assistance.

I've also been noticing growing global interest in Korean language and culture, and I wondered: what would a programming language look like if every keyword was in Hangul (the Korean writing system)?

Han is the result. It's a statically-typed language written in Rust with a full compiler pipeline (lexer → parser → AST → interpreter + LLVM IR codegen).

It supports arrays, structs with impl blocks, closures, pattern matching, try/catch, file I/O, module imports, a REPL, and a basic LSP server.

This is a side project, not a "you should use this instead of Python" pitch. Feedback on language design, compiler architecture, or the Korean keyword choices is very welcome.

https://github.com/xodn348/han


Comments

m-hodgestoday at 12:09 AM

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 should count for “foreign language” credit. Anyway, always cool to see non-English programming languages.

zellyntoday at 12:11 AM

I love this. Nice work!

It’s fun to look at your code samples, have absolutely no clue what any of it means, and think about just how many non-English-speaking programmers must have felt that way looking at our all-English programming languages.

Except lisp: that’s just inscrutable symbols like cond and cons and car and cadr and a bunch of parens! :-)

danparsonsonyesterday at 11:03 PM

Wonderful! What a cool idea. For anyone interested, you can learn the whole of Hangul in an afternoon; it's cleverly designed to be very logical and has some handy mnemonics: https://korean.stackexchange.com/a/213

show 2 replies
apt-apt-apt-aptyesterday at 11:06 PM

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 < end:
    동안 시작 < 끝:
Code would be more compact, allowing things like more descriptive keywords e.g. AbstractVerifiedIdentityAccountFactory vs 실명인증계정생성, but we'd lose out on the nice upper/lowercase distinction.

I hear that information processing speed is nearly the same across all languages though regardless of density, so in terms of processing speed, may not make much difference.

show 3 replies
water_badgeryesterday at 11:16 PM

fun fact, you can easily write c in any language you want through the power of macros

https://github.com/farant/rhubarb/blob/main/include/latina.h

edit: oh, maybe you can’t do full unicode. that’s too bad!

show 1 reply
anesxvitoyesterday at 11:37 PM

Really cool to see more developer tools built in Rust. I've been using Rust for a desktop app backend (Tauri v2) and the performance difference vs Electron is night and day — native memory usage, instant startup. Curious what the compile times look like for Han compared to rustc itself.

raaspazasuyesterday at 10:07 PM

I don't know Korean at all, but this looks cool and a fun project. I'm curious if this reduces typing or has any benefits being in Hangul vs Latin?

show 2 replies
technol0gicyesterday at 11:19 PM

i only code in this when no ones around. one might say I...han solo

show 1 reply
marysminefnufyesterday at 11:09 PM

My dream is to one day make a chaldean programming language for my kids. Stuff like this is inspiring

show 1 reply
AndrewKemendoyesterday at 11:56 PM

I’ve always wondered why there weren’t more non-english charactered programming languages but I can only assume it was just inertia

This seems like a reasonably good security measure too

AndrewKemendoyesterday at 11:53 PM

I’ve always wondered why there weren’t more non-english charactered programming languages but I can only assume it was just inertia

aplomb1026yesterday at 11:31 PM

[dead]

themarogeeyesterday at 9:53 PM

[dead]

rnrjrjdeiyesterday at 10:31 PM

[flagged]

show 1 reply