Live data from Hacker News

Show HN: Bato – A Filipino Programming Language

github.com

61–70 of 127 posts

Re: Show HN: Bato – A Filipino Programming Language

#61
post #37
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.

At my Korean company, all code is written in English and comments are in Korean/English. On osx, capslock is used to quickly switch between languages.

I'd like to know how you do that with capslock, too :D

Re: Show HN: Bato – A Filipino Programming Language

#62
post #7
post #2

Is it just Ruby with Filipino words?

In the Philippines here. I'm a native English speaker and my Tagalog is pretty bad, but it looks like it's Ruby with Filipino syntax.

It is just Ruby.

Everything is just alias-ed:

e.g. https://github.com/jjuliano/bato/blob/master/lib/bato/core_e...

Re: Show HN: Bato – A Filipino Programming Language

#64
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…

BASIC on the ZX80 and its variants encoded keywords as bytes in memory but displayed them as English-like words; there's no reason those keywords couldn't be displayed in another language, regardless of their internal representation.

Re: Show HN: Bato – A Filipino Programming Language

#65

Earlier quoted context omitted.

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.

There's also a Taiwanese system called bopomofo or zhuyin, which is basically a Chinese version of kana.

Re: Show HN: Bato – A Filipino Programming Language

#66

Awesome stuff - i think this kind of languages are more important than most people (esp with strong english school background assume). I could see this as educational language for kids. Related to this: In the 80/90s i saw a German BASIC variant floating around. Unfortunately i couldnt find it online But… if you are into alternative-language programming languages i highly recommend you reading up on Plankalkül[1] - w…

Word Basic (this was around '96, '97) used to translate the tokens, and I can not express how much I hated it, probably because I spent far too much time dealing with a codebase that had been written in Danish Word Basic and had been transferred to Norwegian Word Basic by someone who seems to have cut and pasted the code, and so ensured that the "automagical" translation of the tokenized keywords didn't happen.

This was pretty much the worst combination of languages, because Norwegian and Danish is similar enough that the code looked completely sane - it read as pretty much as valid Norwegian in most instances, but the keywords and function names deviated in all kinds of subtle ways.

While I understand why some would like to code in their native language, the big persistent problem is that it is not clear that it is a net improvement in communication - so much of our communication about code is international, and as not nearly all of our tools are context sensitive enough to understand when we are talking about code that would need to be translated in a very specific, and (programming-)language specific way, we're creating some very tough challenges.

Re: Show HN: Bato – A Filipino Programming Language

#67
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 lette…

> 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.

This gives me nightmares of dealing with an old patched Joomla install, where the developers had managed to bring in plugins etc. that used multiple inconsistent encodings in comments, so you could get all of the code to render correctly with any single terminal setting.

Re: Show HN: Bato – A Filipino Programming Language

#68
post #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).

Same in Spanish. At my company we use only English for code, even comments. And are trying to push for jira tickets to be written in English only as well. At least among the developers. Can't keep managers from using Spanish.

Re: Show HN: Bato – A Filipino Programming Language

#69
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.

Worked at a Chinese company in Shanghai before. Everyone on my team could read/write but not speak English. It is most common that people would write code in English but use Chinese for comments and documentation (both internal and external). We all used Sogou which makes it easy to make a hotkey to easily change between Chinese pinyin input and English.

I am lead to believe this usage of English for code and Chinese for comments is quite common given the code I've read from public repositories and other companies we worked with.

Re: Show HN: Bato – A Filipino Programming Language

#70
post #34

Earlier quoted context omitted.

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"

Ruby has pretty much the same flexibility. "%" followed by almost any non-alphabetic character starts a quoted string. But most then become the quote character. If the quote character is at least ,),] or }. These are all equivalent:

%

%"x"

%{x}

%!x!

Unfortunately the rules are loose enough that even space is a valid quote character. So this too is equivalent to the above:

% x

("% x ")

Post reply on HN