Live data from Hacker News

Citrine: Localized Programming Language

citrine-lang.org

51–60 of 72 posts

Re: Citrine: Localized Programming Language

#51

Hi, I am the creator of the language, my name is Gabor. You can ask questions if you like. To answer some: - Yes, we use machine translations, they serve as an example, they are far from perfect. Some language files are translated by native speakers. I think the website needs to be more clear about this. - I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women…

I applaud your effort. Programmers, of all people, should understand the effect that language has on shaping thoughts.

My biggest question is - why couple a new programming language and the translation system? Either system alone would be difficult to get a foothold. Wouldn't you be better off picking an existing programming language that you really like - one with good semantics and lots of libraries - and implementing the translation system on top of that? Some sort of Lisp would seem to be a natural fit. What does your language offer to someone who is already comfortable with English-based programming languages?

(sorry for double-commenting, but I didn't want to start a merged thread for two very different topics)

Re: Citrine: Localized Programming Language

#52
post #51

Hi, I am the creator of the language, my name is Gabor. You can ask questions if you like. To answer some: - Yes, we use machine translations, they serve as an example, they are far from perfect. Some language files are translated by native speakers. I think the website needs to be more clear about this. - I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women…

I applaud your effort. Programmers, of all people, should understand the effect that language has on shaping thoughts. My biggest question is - why couple a new programming language and the translation system? Either system alone would be difficult to get a foothold. Wouldn't you be better off picking an existing programming language that you really like - one with good semantics and lots of libraries - and implement…

When I created Citrine the original purpose was not to make it localized, just as readable as possible. However, the language evolved into something different. At a certain point I figured that the grammar allows for a lot of flexibility which could be used to turn it into a localized language.

Re: Citrine: Localized Programming Language

#53
post #50

Hi, I am the creator of the language, my name is Gabor. You can ask questions if you like. To answer some: - Yes, we use machine translations, they serve as an example, they are far from perfect. Some language files are translated by native speakers. I think the website needs to be more clear about this. - I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women…

>I just think the opening sentence is beautiful, it combines the concepts of male and female in a lovely, natural way ignoring today's PC-bullshit. Honestly, I am astonished that you can be so conscious of the effect of language on thinking in the context of programming, and yet so tone-deaf when writing your copy. This is not "today's PC bullshit", it is an effort to eradicate structural sexism going back at least h…

Love it. I phrased it this way just to trigger you. There is no structural sexism except maybe in some Islamic countries - but I don't hear anyone about that. Women are free to do whatever they want. If they feel offended by words they probably don't belong outside the house.

Re: Citrine: Localized Programming Language

#54
post #42
post #12

The site isn’t clear on it, but from downloading the translation package ( http://citrine-lang.org/downloads/headers.tar.gz ), it seems translation is a simple string replacement. I don’t think that’s enough to cover all languages. https://en.wikipedia.org/wiki/Non-English-based_programming_... has a list of languages that do at least as well (I think AppleScript tried to do better, but can’t find examples) Of course…

“it seems translation is a simple string replacement. I don’t think that’s enough to cover all languages.” Honestly, simple string replacement isn’t good enough to cover any languages. Homonyms and synonyms, anyone? I suspect machine translation will be harder with code simply because there’s a lot less contextual information around individual words compared to ordinary prose with which to make a best guess as to mea…

“Homonyms and synonyms, anyone?”

I think, for this case, that’s mostly solvable by being careful to not make assumptions. For example, you should create separate translation strings for the ‘for’ in “for…in” and in “for…each”, and for the ‘define’ in “define function” and “define procedure”.

Also, when (not if; if your language is successful, it will happen) translators report problems, you should ‘simply’ not hesitate to introduce new ‘clones’ of to-be-translated words.

Even ignoring languages with different word order, that wouldn’t make things perfect. For example, there will be languages where the correct way to say “define” depends on the (perceived) plurality or gender of the function name.

I think the correct way to handle this is by letting the translator produce a grammar for your language that produces the same tokens as the ‘original’. That probably is beyond many would-be translators, though.

Re: Citrine: Localized Programming Language

#55
post #45
post #41

Earlier quoted context omitted.

It also is bad for googling. Imagine using a version for a not so popular human language. Chances are you would need to know the English and/or Mandarin versions of language constructs anyways. If so, how much does writing in your native language add?

But isn’t that true when googling for ANY information? It’s not a coincidence that big search engine vendors are also busy on machine translation. It’s not a zero-sum game/catch-22. Rather than look at where we are in 2020, consider where we should be in 2030. As automatic on-the-fly translation of general search results improves, programming-specific search results will naturally improve too.

That’s true for any information, but why would you introduce that problem for your (certainly initially) fringe programming language?

Re: Citrine: Localized Programming Language

#56

Hi, I am the creator of the language, my name is Gabor. You can ask questions if you like. To answer some: - Yes, we use machine translations, they serve as an example, they are far from perfect. Some language files are translated by native speakers. I think the website needs to be more clear about this. - I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women…

I admire your efforts, but it seems to me it would be easier just to get everyone on Earth to agree to speak the same language. That would merely be impossible.

Re: Citrine: Localized Programming Language

#57
post #39

Earlier quoted context omitted.

“Citrine only ever cares about languages with prepositions” You’re confusing keyword/identifier localization for natural language. I agree with everyone who says NL is the wrong problem to solve, but that’s not what Citrine is attempting to do. Look at it this way: Citrine code is NOT natural English either. At most, it is a sort of “pidgin English” where individual words can be readily understood but the grammar is…

I definitely agree that localized languages can only reflect a subset of human languages (and it's of course true even for English-based languages), but that doesn't make my point moot. If the author did really care about other languages and wanted to pursue the fixed syntax, every identifier should have been strictly nouns or verbs and nothing else; for example (say) `animate(source: X, target: Y)` instead of `anima…

“every identifier should have been strictly nouns or verbs and nothing else”

Totally agree. TBH I don’t think the authors’ enthusiasm, while admirable, is quite matched by their knowledge and experience. A bit more up-front learning could probably save them disappearing down some obviously wrong paths.

As you say, they should focus on verbs and nouns, and getting those to machine-translate precisely. Nailing that would be a big deal just in itself. If they later want to experiment with adding prepositions to make code read “more naturally”, make the system add those on a per-language basis according to per-language rules laid down by native-language speakers.

Thus in English the method signature might present as `animate(from: source, to: target)`, because that’s what English readers expect and like. But that doesn’t mean that `from` and `to` should be translated to every other language, because that’s just an exercise in cutesy-clever nonsense, burying what is significant under what is not, and software already suffers from more than enough of that.

Re: Citrine: Localized Programming Language

#58
post #35

Earlier quoted context omitted.

> `Object` is translated to `宾语` which means the grammar component object in subject, verb, object, etc. Sounds right (though OOP treats objects artificially as grammatical subjects, they are the things on which functions operate, and thus more like what would normally be grammatical objects; they are the patients rather than the agents of actions.)

There is an established, domain-specific translation for this and many other terms of art (in this case, 对象)

Ouch. Sounds like they’re using a general-purpose, not domain-specific, dictionary for their translations. That might suffice for an initial private proof-of-concept, but not for a public audience.

Imagine translating a medical or legal textbook without knowing the proper professional medical/legal terminology. Those target audiences will tear it a new one, and quite right too.

+1 for authors need to do their homework better.

Re: Citrine: Localized Programming Language

#59

Hi, I am the creator of the language, my name is Gabor. You can ask questions if you like. To answer some: - Yes, we use machine translations, they serve as an example, they are far from perfect. Some language files are translated by native speakers. I think the website needs to be more clear about this. - I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women…

“I use gendered language because coding is a men's job, women belong in the kitchen! ;-). No, just joking. Women are also welcome to become Citrine users. I just think the opening sentence is beautiful, it combines the concepts of male and female in a lovely, natural way ignoring today's PC-bullshit.”

Dude, really. If you gave a crap about effective communication you would not just have said that.

Hell, you would not even have thought of saying that; never mind typing it, reading it back to yourself, and then hitting Post cos you still think it’s a good idea. SMH

Your enthusiasm is admirable but your limited expertise is clearly showing. Instead of saying that you’re here to answer our questions, you should be the one who’s listening to our criticisms and then asking searching questions of us. A bit more humility and a lot less hubris. You and your product will be a lot better for it.

Re: Citrine: Localized Programming Language

#60
post #50

Earlier quoted context omitted.

>I just think the opening sentence is beautiful, it combines the concepts of male and female in a lovely, natural way ignoring today's PC-bullshit. Honestly, I am astonished that you can be so conscious of the effect of language on thinking in the context of programming, and yet so tone-deaf when writing your copy. This is not "today's PC bullshit", it is an effort to eradicate structural sexism going back at least h…

Love it. I phrased it this way just to trigger you. There is no structural sexism except maybe in some Islamic countries - but I don't hear anyone about that. Women are free to do whatever they want. If they feel offended by words they probably don't belong outside the house.

Well congrats on being a Grade-A douche. I strongly recommend you go find a new hobby—one you can play by yourself—because with salesmanship like that your project is already dead.

https://jaxenter.com/wp-content/uploads/2017/04/women-in-com...

Post reply on HN