Live data from Hacker News

Show HN: Bato – A Filipino Programming Language

github.com

31–40 of 127 posts

Re: Show HN: Bato – A Filipino Programming Language

#31
post #4

Earlier quoted context omitted.

A language with Internationalized keywords would be pretty dope.

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"). You could also optionally integrate Google Translate or similar for the non-programming-language parts (obviously with less accuracy, but still better than nothing).

Searchability would be tricky, since google etc. might detect the very-similar-but-for-code-snippets links as duplicate/spam and bury them, but there are hopefully ways around that--up to and including asking google to somehow improve their algorithm; it seems like they might be sympathetic (because they're programmers and because there's money to be made) to a request to accommodate such search patterns.

Not only would that solve the problem you posed (googling for stuff on SO is tricky for you as a (presumably) English speaker if it's in another language), but it would also address a far wider-reaching problem with big implications: the relative inaccessibility of programming, especially at the early-beginning stages, to people who are not fluent English speakers.

Re: Show HN: Bato – A Filipino Programming Language

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

It is always good to not have possible ambiguity in a language though.

A classic example is a C++ line such as:

    a ** b
Before you know if a and b are variable names or type names, you do not know whether this line is a variable declaration or a multiplication or a syntax error.

My point is that some keywords could be used as identifiers in some situations, but this might not always be the case.

One option would be to not have any keywords, just operators. Or maybe a special keyword decoration.

Re: Show HN: Bato – A Filipino Programming Language

#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 bit for others by not requiring only symbols common to an english keyboard.

Re: Show HN: Bato – A Filipino Programming Language

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

A "smarter" language/parser has implications, though. It means your text editors & IDEs need to be more elaborate to handle it. It means new users have more to take in before they can be productive. It's more complexity and thus more effort to maintain. All in all, making a smarter language/parser means making a more expensive language/parser, and that means you're making a tradeoff that isn't always justifiable.

Re: Show HN: Bato – A Filipino Programming Language

#36
post #27
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.

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.

Re: Show HN: Bato – A Filipino Programming Language

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

Re: Show HN: Bato – A Filipino Programming Language

#38

I've had ideas of where we abstract the syntax of a program language in a way that there would be multiple 'views' of the code. What if you could run a program that would translate Bato programs into Ruby and vice versa? The variables would be a hard part so maybe it would hint you at a translation of it or you could add a hint yourself. Or what if you had a language that had a javascript like syntax and a lisp like…

This idea has been around for ages. Check out this old video on intentional programming by Microsoft: https://www.youtube.com/watch?v=tSnnfUj1XCQ

Re: Show HN: Bato – A Filipino Programming Language

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

[deleted]

Re: Show HN: Bato – A Filipino Programming Language

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

It's not a matter of alphabet because people still learn programming languages from English books.

Pretty much nails it: https://temochka.com/blog/posts/2017/06/28/the-language-of-p...

Post reply on HN