Live data from Hacker News

Show HN: Bato – A Filipino Programming Language

github.com

41–50 of 127 posts

Re: Show HN: Bato – A Filipino Programming Language

#41
post #18

Earlier quoted context omitted.

I don't know, for me as a non-native speaker the words in a programming language are just memorised tokens, they could just as well be symbols or emojis. The bigger deal is libraries and documentation. For instance Microsoft is attempting to localise all their SDK documentation, and at least for German it's a nightmare, either the translations are done by non-technical people, or algorithms, sometimes the information…

> they could just as well be symbols or emojis I'm sure they will...

You can already use emoji in JavaScript.

There's also http://www.emojicode.org

Re: Show HN: Bato – A Filipino Programming Language

#42
post #25

A few months ago, I was daydreaming about creating a new programming language and started thinking about language internationalization. I found this page, with some interesting comments: https://blogs.msdn.microsoft.com/alfredth/2011/07/21/why-are... As an aside, this one stuck out to me: "One of the difficulties in allowing the keyword to be switched on the fly to a different language is that keywords have to be 're…

There seems to be a few ways around this issuie:

1. You could create a programming language where every keyword is a symbol: http://ccsenet.org/journal/index.php/cis/article/view/23904. This is what mathematics does.

2. You could also create a programming language where every reserved keyword is a special type and then expose that type to the programmer. Thereby allowing them to reuse that word just with a different type then the reserved keyword. This would come with a lot of complexity costs however because now you don't know if your generated AST is valid until the typechecker.

Re: Show HN: Bato – A Filipino Programming Language

#43
post #13

One thing I'm completely ignorant of is how to people from countries where non-latin alphabets are write code? Eg if you're Chinese, Arabic even Russian do you have to do everything in English and English characters? I'd hope there is a Unicode mapping into other characters - is there any language that supports this? Even for libraries would be nice.

Russian reporting in. I think everyone here who writes code knows Latin alphabet. It's just a basic requirement - it's a given that if you want to code you'd better learn English, let alone alphabet.

In schools, kids learn to code using Algol-like language with identifiers in Cyrillic (essentially, Russian) abbreviations, e.g. "нц для i от 1 до n" rather than "for i := 1 until n do", but even here you see Latin letter "i" ;) However, it's not uncommon to just go with e.g. BASIC or Pascal.

There is also de-facto standard accounting & ERP software producs from 1C which use Visual Basic-like language with Russian identifiers like "Константа" for "Const", etc. It's widespread in its domain, but not used anywhere else. 1C programmers are sometimes (half-jokingly) considered to be of a different caste. Sort of like COBOL programmers, maybe, or - probably closer - SAP developers.

I don't think anyone has any serious issues with basic English language for identifiers. Literature, documentation, discussion - here, language barriers do matter (a lot!), but not for programming languages themselves. That is, unless someone wants to show off as a true hardcore Russophile, of course.

Code comments, identifier names and e.g. log messages are different matter. I don't think there is any common practice for this - more like a matter of personal preferences. Some try to stick with English, some use Russian or transliterated Russian (mixing it with some English) liberally so it's not uncommon to see something like `log.Error("Дом не найден %s, %s: %s", ulica, nomerDoma, responseText) /* TODO: Добавить поиск лучшего совпадения */` in their code.

Re: Show HN: Bato – A Filipino Programming Language

#44

Earlier quoted context omitted.

That's what they do with formulas in Excel. There it sucks HARD. Try googling for documentation on StackOverflow for example. Anything you want to copy paste doesn't work because Excel is expecting the commands in a different language.

That sounds like there's a demand for a code-help service that is syntactically aware enough to perform translations into the viewer's native language. I'm sure it would be harder to implement than a basic text-only + syntax highlighting site, but imagine how nice it would be to have your user's language preference (or, if not logged in, with a dropdown "pick $human_language for this $programming_language snippet").…

Sure, you can solve almost any problem without a budget...

Re: Show HN: Bato – A Filipino Programming Language

#45
post #30

Earlier quoted context omitted.

That's what they do with formulas in Excel. There it sucks HARD. Try googling for documentation on StackOverflow for example. Anything you want to copy paste doesn't work because Excel is expecting the commands in a different language.

If you google in your native language you'll get results in that language. I agree that it takes a bit to relearn all formulas (and I find it too confusing to use different versions at the same time) but when I was still using a non-English version I had no problems finding solutions. I think it was exactly the right thing to do. Excel formulas are often used by people with little knowledge of programming who aren't…

And now you need to maintain hundreds of variants of each SO answer.

Re: Show HN: Bato – A Filipino Programming Language

#46
post #34
post #13

One thing I'm completely ignorant of is how to people from countries where non-latin alphabets are write code? Eg if you're Chinese, Arabic even Russian do you have to do everything in English and English characters? I'd hope there is a Unicode mapping into other characters - is there any language that supports this? Even for libraries would be nice.

Can't recall exactly where I saw it, but one of the major language designers (I think for Perl) was talking about how there was a plan to abstract some things like quotes such that a character used to quote a string in any spoken language would be a valid way to declare a string. This didn't seem to go so far as to also allow this for keywords, but for symbols the thought was that you could simplify things a little b…

in perl 6 you can quote strings in quite a few ways!

https://docs.perl6.org/language/quoting

"Quoting" is all defined inside of a sub-language called "Q"

Re: Show HN: Bato – A Filipino Programming Language

#48
post #30

Earlier quoted context omitted.

That's what they do with formulas in Excel. There it sucks HARD. Try googling for documentation on StackOverflow for example. Anything you want to copy paste doesn't work because Excel is expecting the commands in a different language.

If you google in your native language you'll get results in that language. I agree that it takes a bit to relearn all formulas (and I find it too confusing to use different versions at the same time) but when I was still using a non-English version I had no problems finding solutions. I think it was exactly the right thing to do. Excel formulas are often used by people with little knowledge of programming who aren't…

I agree it's a good move from Microsoft to make Excel more accessible. It's just not something I was expecting the first time I stumbled upon the problem.

I have a programming background so I'm used to searching everything in English, even though that's not my native language.

I inserted sqrt() in my non-English Excel and it didn't work. I thought I had a completely broken version of the program. Took a while to figure out it was a language problem!

Re: Show HN: Bato – A Filipino Programming Language

#49
post #27

Earlier quoted context omitted.

Maybe using single characters (e.g. chinese characters) instead of words for keywords is more efficient to type and read for programmers. Not sure how typing compares but it could give code more structure. Does anyone know how governments in China, Japan or Korea handle this? Do they try to use non-english programming languages?

Single chinese characters are inputted with more than one key press on the keyboard, so it won't be much different. You can test this by changing your input method to Japanese or Chinese. At least in Japanese, the sound of the character is typed out using english letters (romanji) and various options are presented for autocompletion. You are right that reading characters is probably faster, though.

Pinyin input for Chinese is similarly phonetic. Supposedly there is a method popular in Taiwan based on strokes.

Reading characters is a bit faster, but only because you had to memorize 10,000 of them already. People reading English will similarly chunk many of the words they are familiar with so that they are not so much read as they are recognized.

Re: Show HN: Bato – A Filipino Programming Language

#50
post #13

One thing I'm completely ignorant of is how to people from countries where non-latin alphabets are write code? Eg if you're Chinese, Arabic even Russian do you have to do everything in English and English characters? I'd hope there is a Unicode mapping into other characters - is there any language that supports this? Even for libraries would be nice.

I am from Slavic country and writing code in native language looks amateurish (that's the general thinking).
Post reply on HN