top | item 13796256

Aheui: Esoteric programming language designed for Hangul

155 points| networked | 9 years ago |aheui.github.io | reply

68 comments

order
[+] keepper|9 years ago|reply
"about 2.6 billion people (36% of the world population) use the Latin alphabet, about 1.3 billion people (18%) use the Chinese script, about 1 billion people (14%) use the Devanagari script (India)"[1]

It'll be interesting to see how the Latin alphabet preference in computer languages changes over time. I'm sure whole different paradigms may be possible in different scripts.

And people complain about the differences between java and python now... Imagine python vs Aheui or similar lol

[1]http://www.worldstandards.eu/alphabets/

[+] chickenfries|9 years ago|reply
> I'm sure whole different paradigms may be possible in different scripts.

This is like Sapir–Whorf for programming languages. (https://en.wikipedia.org/wiki/Linguistic_relativity)

I'm skeptical that programming languages in other scripts would "discover" new programming paradigms inaccessible to languages written with the latin alphabet. Programming languages hardly follow any rules of english grammar, despite most of them being in English.

[+] lifthrasiir|9 years ago|reply
For the case of Aheui, it is essentially a Hangul-branded version of Befunge [1] (or if you are interested in the history of esolangs, it is actually more like Orthogonal [2] but Aheui didn't really derive from it). Besides from the fact that Aheui's usage of Hangul is novel, I wouldn't consider it a fundamental paradigm shift.

[1] https://esolangs.org/wiki/Befunge

[2] https://esolangs.org/wiki/Orthogonal

[+] seibelj|9 years ago|reply
You can swap the latin characters for other symbols, but I'm not sure how it will fundamentally change anything. Advances come from thinking of how to formulate abstract concepts differently, like procedural vs. functional programming. The letters themselves are just part of the specification.

Perhaps people whose language is radically different from romance languages will approach programming differently because of that, and invent something new.

[+] tornadoboy55|9 years ago|reply
It won't change because of tremendous legacy inertia. Everything from assembly to scripting languages are in Latin-English. All kernels are Latin-English. CS is taught around the globe as a 100% English major usually. Our first humanoid AI will almost certainly think in 'English' and speak English.
[+] adamnemecek|9 years ago|reply
I feel like the HN audience would really appreciate Korean and it's script, as it's said to be one of the most logical languages. You can read more about it here http://asiasociety.org/education/world%E2%80%99s-most-incred...
[+] lifthrasiir|9 years ago|reply
Well, Korean the language is, like most other natural languages, horrible. Hangul is quite neat though.
[+] i_grow_beans|9 years ago|reply
I thought that the Hangul characters were always written in a group of three, but they're actually grouped by syllables. Neat! It's also fascinating how similar sounds are represented by similar characters.
[+] loeg|9 years ago|reply
Yep. A Korean friend taught me the alphabet in high school and without any practice I can still remember it and slowly (slowly!) pronounce Korean writing today — it's nice and straightforward.
[+] fohara|9 years ago|reply
"This code prints 'Hello, world!'

  밤밣따빠밣밟따뿌
  빠맣파빨받밤뚜뭏
  돋밬탕빠맣붏두붇
  볻뫃박발뚷투뭏붖
  뫃도뫃희멓뭏뭏붘
  뫃봌토범더벌뿌뚜
  뽑뽀멓멓더벓뻐뚠
  뽀덩벐멓뻐덕더벅
"
[+] particles_|9 years ago|reply
As a Korean, I found this hilarious because it's complete gibberish yet you can totally read it out loud.
[+] lacampbell|9 years ago|reply
If our field had settled on miminal syntaxes - such as the styles used by Forth, Lisp or even Smalltalk - it would be trivial to make programming languages for an audience that can't read or write English.

Can't rename "if" or "foreach" in C#, however.

[+] cocktailpeanuts|9 years ago|reply
This is cool but I feel like it would have been even more awesome if it actually used korean language as keywords (which would have made the code actually readable and usable) instead of just mixing together characters.

I realize this is just for fun but I hope someone builds a completely functional language written in their own language. That would be really cool to see where that goes. That would be not just a technological innovation but interesting socially.

[+] songzme|9 years ago|reply
I'm very curious about this but I cannot seem to figure out how it works (perhaps a little hungover?)

Could someone please explain how this prints 'Hello, world!' Is there a mapping from Hangul to latin alphabets that I missed out on in the doc?

" 밤밣따빠밣밟따뿌 빠맣파빨받밤뚜뭏 돋밬탕빠맣붏두붇 볻뫃박발뚷투뭏붖 뫃도뫃희멓뭏뭏붘 뫃봌토범더벌뿌뚜 뽑뽀멓멓더벓뻐뚠 뽀덩벐멓뻐덕더벅 "

[+] rspeer|9 years ago|reply
The Hangul characters are the instructions, not string literals; in fact, the language has no string literals.

The code is building up the Unicode codepoints for "Hello, world!" as numbers in memory, and running instructions to print them.

[+] kerkeslager|9 years ago|reply
What makes it "esoteric"? It doesn't seem esoteric to want to program in your own language. I'm not saying it's not esoteric, I'm just curious what makes it so.

I've strongly considered writing a Spanish-based programming language--Spanish is spoken by more people than English, and Spanish is a first language a larger percentage of Spanish speakers, while for many English speakers it is their second language. It seems like a Spanish-based programming language could reduce cognitive barriers to entry to programming for a large portion of the world. Of course, if the tool chain isn't up to par it will eventually hold users back, but it's at least worth investigating.

[+] titanix2|9 years ago|reply
It's esoteric in the way languages listed on this wiki are esoteric: https://esolangs.org/wiki/Main_Page

It not a programming language where keyword are in Korean but one based on non mainstream concepts like brainfuck.

[+] JoelSanchez|9 years ago|reply
This is my opinion as a native Spanish speaker.

I don't name my variables using Spanish and I wouldn't want to use a programming language where the keywords are Spanish-based. Spanish is a verbose, complicated language, which is why I think it's a poor fit for the task of programming. I surely prefer to use "userName" over "nombreDeUsuario", "database" over "baseDeDatos", "languageSelector" over "seleccionadorDeIdioma", "propertyToggle" over "conmutadorDePropiedad", and "wrapper" over..."envolvedor", I guess?

It gets worse with actions: "buttonClick" may, depending on who you ask, become one of these: "clickEnBotón", "clickEnBoton", "clickBoton", "botonClick"... (there isn't an obviously sensible choice, since all of them have their faults: 1 is tedious and long, 2 is slightly easier to type but incorrect, number 3 is incorrect Spanish, number 4 tries to mimic English and is thus incorrect too); "pageNavigationStarted" would be something like "navegaciónPáginaComenzó", which is long and incorrect according to this language (proper version would be "navegaciónEnPáginaComenzó", even longer).

You can't make verbs so easily, in English you can make a verb from any substantive, you can't do that as easily in Spanish.

In Spanish you have to use "filtrar", "filtra" and "filtro" (to filter, filter, filter), and to express "filterStarted" you'd have to choose between "filtradoComenzó", "filtradoComenzo", "filtroComenzó", "filtroComenzo", "filtrarComenzo", "filtrarComenzó".

Maybe I just don't like it.

[+] CydeWeys|9 years ago|reply
Is there any reason you couldn't simply make a Spanish language by taking a well-established English one, e.g. Java, and simply translating the keywords individually using a syntax-aware translator? This transpilation approach is used by lots of esoteric programming languages, and since you wouldn't even be changing the syntax, this would be simpler than most.

I suspect the reason this hasn't caught on is that there just aren't that many keywords to learn, and that paying the ongoing tax of having to translate every code example on the web is worse than the one-time cost of just learning the keywords in English. This is for "real" programming use cases anyway; it might be a different consideration for educational languages.

[+] lifthrasiir|9 years ago|reply
Because no Korean would expect a two-dimensional language with the only storage being stacks and queues of integers.
[+] ganfortran|9 years ago|reply
> reduce cognitive barriers to entry to programming for a large portion of the world

Not really, consider most of the established code/programming materials is in English. Learning programming is far more than learning the syntax of one language.

English is much bigger than the population of its native speakers. Frankly speaking, if a project is not presented in English on github, I won't take it too seriously.

Disclaimer: English is not my mother tongue.

[+] yannis|9 years ago|reply
Looking at the github repository there is nothing fundamentally earth shuttering here. It is mostly the normal way of interpreters/compilers representing everything with number codes and then mapping to characters.

For example: case 0: //ㄱ case 1: //ㄲ case 11: //ㅇ case 13: //ㅉ case 15: //ㅋ

If one goes back a good three decades plus and studies the source of Knuth's TeX, everything was represented by numbers and then all strings, even error messages resided in a TeX.Pool file.

[+] andrewshadura|9 years ago|reply
It would be interesting to see a programming language based on Hungarian or Finnish. With myriads of suffices which change the ways verbs apply to nouns, it'd be quite a challenge to program in it for anyone not familiar with agglutinative languages :)
[+] pagnol|9 years ago|reply
> Hangul is truly an alphabetic system, in which each symbol represents separate phoneme, or sound.

Is this true, though? As far as I know ㅔ and ㅐ represent the same sounds.

[+] DonaldPShimoda|9 years ago|reply
Even if these letters represented the exact same sound, Hangul would still be an alphabetic system, wouldn't it? There are plenty of combinations of glyphs which map to the same sounds in English, e.g. "ay" in "play" and "eigh" in "sleigh" or "weigh". (Although if you're making a point about only the second part of the quote — "each symbol represents separate phoneme" — then I apologize.)

I think the author was trying to distinguish between Hangul and, say, written Chinese or Japanese Kanji which are logographic. I've known lots of people in the US who assume the Korean written language functions similarly because "all Asian languages are like that".

[+] y00ra|9 years ago|reply
애 and 에 are supposed to be pronounced differently. However, the evolution of the language made the 애 phoneme sound more like 에
[+] jlebrech|9 years ago|reply
I like the idea of using non-latin programming languages for latin based programs, you have a clearer picture of what is data and what is code. assuming you can differentiate the non-latin characters.
[+] mrcactu5|9 years ago|reply
this isn't esoteric at all. We are discriminating against Korea when we do not accommodate their alphabet.

China and Japan obviously have to accommodate themselves as there is no possibility of having one key for each Kanji (or Chinese character). There was a nice documentary showing arcane Chinese characters or different descendants of the same Chinese characters.

Does this encode the font or merely the character (as an entity)?

[+] lifthrasiir|9 years ago|reply
As mentioned in sibling threads, it is esoteric in terms of programming languages. It's in the same page as Brainfuck and Befunge and the name "esoteric programming language" is well-established [1].

[1] https://esolangs.org/wiki/Main_Page

[+] lacampbell|9 years ago|reply
Huh? It's very easy to input Han Characters on modern systems. Most people type it a phonetic alphabet (eg, romanizations like Hanyu Pinyin, or indigenous phonetic alphabets like Zhuyin) and a little program pops up, giving you a list of matching characters, and you select them. Googles ones are very good (they even know regional varions in mandarin pronunciation).

It's entirely conceivable for a programming language to be made with Han Characters - because it's a solved problem to input Han Characters on keyboards.

Or Have I missed the point of what you wrote entirely?