6 ms·
Show HN: Bato – A Filipino Programming Language
- petepete 9y agoIs it just Ruby with Filipino words?
- murph-almighty 9y agoEven if it is, this might be the first time I've seen a programming language that isn't based in English (aside from the more esoteric Brainfuck-esque languages for code golfing).
- supergreg 9y agoI've seen a couple of Spanish versions of Python out there, just novelties, never seen them move beyond a proof of concept. There's a whole bunch of esoteric programming languages that don't use English, just like Brainfuck. [0] [0] https://en.m.wikipedia.org/wiki/Esoteric_programming_language https://en.m.wikipedia.org/wiki/Esoteric_programming_languag...
- pjmlp 9y agoBack in the 80's there were a few variants of Basic and Pascal in Portuguese.
- googamooga 9y agoAt my school days in 1980s we used to write programs using RAPIRA (russian: РАПИРА) programming language on AGAT microcomputer. RAPIRA was an original programming language with Russian keywords. https://en.wikipedia.org/wiki/Rapira https://en.wikipedia.org/wiki/Rapira
- perfmode 9y agoA language with Internationalized keywords would be pretty dope.
- AugustJok 9y agoWhat would be the point though? I feel like that would only increase misunderstandings . Like searching for documentation or help online on that function.
- nuclearcookie 9y agoThat'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.
- pjmlp 9y agoIt only sucks for us, that are used to English as "programming language". Many Office users only speak their native tongue, are quite happy with the translations and don't even know that StackOverflow exists. They rather buy books, https://www.fca.pt/en/catalogue/computer-science/office/page/ https://www.fca.pt/en/catalogue/computer-science/office/page...
- dx034 9y agoIf 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 aware that "if" is a common keyword. Using the local variant makes formulas much easier to understand (and to get people closer to actual programming).
- Nullabillity 9y agoAnd now you need to maintain hundreds of variants of each SO answer.
- nuclearcookie 9y agoI 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!
- wyclif 9y agoIn 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.
- dota168 9y agoIt is just Ruby. Everything is just alias-ed: e.g. https://github.com/jjuliano/bato/blob/master/lib/bato/core_ext/array.rb https://github.com/jjuliano/bato/blob/master/lib/bato/core_e...
- isxek 9y agoIndeed. The submission's title should then be changed perhaps to "Bato - the Ruby programming language in Filipino/Tagalog," or perhaps "Bato - Ruby made Filipino/Tagalog."
- domenukk 9y agoEsperanto would be nice
- panyang 9y agoTagalog speaker here. Yes, it is. edit: Bato -> stone. Ang 'Bato Programming Language' ay isang scripting language sa wikang Filipino. -> The Bato programming language is a scripting language in the Filipino tongue (T/N: or more specifially, Tagalog). --- More interestingly in the following section: Bakit Bato? -> Why call it Bato? Ang 'bato' ay hango sa Ruby Programming Language na may Filipino sintaks. Ang kadahilanang ginamit ang pangalang 'bato' ay dahil ang Ruby ay isang uri ng bato. -> Bato is made with Ruby using Filipino syntax. The reason to use the word "Bato" as a name is because Ruby is a kind of stone.
- bluedino 9y agoIn the first BASIC programming book I ever read, there was a program to change all the keywords from English to Tagalog, to help a Filipino student who didn't know English.
- rb808 9y agoOne 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.
- Carioca 9y agoAt least here in Brazil it's relatively common to mix English defaults and Portuguese variable names. So a Django class declaration would look something like: class Pessoa(models.Model): idade = models.IntegerField() nome = models.CharField() Then some things wind up having mixed-language variable names: class PessoaForm(forms.ModelForm):
- scardine 9y agoPortuguese is rooted in Latin so it uses the Latin alphabet, the parent was concerned about other alphabets. Off course there are the accented characters but those are just transliterated to ASCII. Even when the language accepts unicode identifiers (like Python or Javascript) they are not transliterated to ASCII so "função" is not the same as "funcao". Everybody just sticks with ASCII for identifiers (occasionally people throw the Greek letter for pi or lambda in a formula but not on my watch). The only thing more awful than these "Portunglish" codebases are Brazilian projects trying to stick with English names only. These are often full of misleading translations - for example using "Budget" instead of "Quote" because in Brazilian Portuguese the word "Orçamento" means both. Very confusing.
- FanaHOVA 9y agoKeyboards switch between the two easily. I've worked with a couple Russian guys and sometimes they'd just write cyrillic jibberish in Slack because they forgot to switch keyboard :) One of them is a really big contributor in the Ruby open source scene, he has no problems switching back and forth.
- jakevn 9y agoIt probably varies based on country, team, and nature of the project. For Chinese OSS projects on Github, I notice that functions/vars/etc. are in English, but comments are in Chinese.
- zitterbewegung 9y agoI'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 syntax. You would run a program that would translate it from one syntax for the other. You could add or subtract syntactic sugar.
- BalinKing 9y agoI read about isomorf yesterday... it might be kinda like what you're looking for? Possibly relevant blog post from Brian McKenna, too: https://brianmckenna.org/blog/polymorphic_programming https://brianmckenna.org/blog/polymorphic_programming [1] https://isomorf.io/ https://isomorf.io/
- aaron_kent 9y agoThis sort of translation is definitely part of our syntactic sugar mission. If anyone wants to beta test particular languages for us just reach out.
- Risord 9y agoMy experimentation about multi view HTML editor which combine few textual formats, (horrible) GUI and preview for interactive editing experience: https://www.youtube.com/watch?v=CNryKyBPfws https://www.youtube.com/watch?v=CNryKyBPfws Some toughts about that by Steve: http://futureofcoding.org/journal.html#niko-autios-microeditor http://futureofcoding.org/journal.html#niko-autios-microedit...
- calebh 9y agoThis idea has been around for ages. Check out this old video on intentional programming by Microsoft: https://www.youtube.com/watch?v=tSnnfUj1XCQ https://www.youtube.com/watch?v=tSnnfUj1XCQ
- AngeloAnolin 9y agoThe effort into this I must say (I speak as someone who came from the Philippines and knows the language by heart) is quite impressive. But for someone who is used to coding in the English language and syntax, they may find some of the wordings harder to understand and apply.
- amrnt 9y agoThis reminds me of http://nas.sr/%D9%82%D9%84%D8%A8/ http://nas.sr/%D9%82%D9%84%D8%A8/ (Lisp in Arabic(?))
- Cyph0n 9y agoYes, that's Arabic, and it does indeed look like an Arabic Lisp!
- dguo 9y agoA 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-all-programming-languages-in-english/ 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 'reserved' such that they cannot be used as identifiers"... I find the concept of reserved keywords kind of strange. It seems like a "smarter" language/parser should be able to handle a keyword being used as an identifier.
- yoz-y 9y agoIt 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.
- amyjess 9y ago> Or maybe a special keyword decoration. What you're asking for is called stropping [0], and it's actually a very old concept going back to the early days of Algol. Algol didn't have any concept of reserved words. Instead, keywords were typographically distinguished from identifiers. In publications, keywords were typically rendered in bold and/or underline, and identifiers were not. Representing this in a computer encoding proved problematic, so people came up with a number of ways to distinguish keywords from identifiers. The most common way was to enclose keywords in 'apostrophes', and from there 'strop' originated as an abbreviation for 'apostrophe', giving rise to the term 'stropping'. But despite the etymology, stropping doesn't have to use apostrophes. When Algol 68 came out, the spec defined three acceptable styles, called 'stropping regimes'. 'Quote' stropping was the traditional form using 'apostrophes', .point stropping would prefix .keywords with a .decimal .point, UPPER stropping would render keywords in ALL CAPS (which forces identifiers to be all-lowercase, but that's ok because Algol 68 offers something much better than CamelCase). There was actually a fourth stropping regime, res stropping, which is different because it would treat keywords as reserved words and thus restrict how you can use identifiers. a68g, the only modern-day Algol 68 interpreter I know of, can be configured to use either UPPER or res stropping. UPPER stropping is preferred, as res stropping changes the way the language works (for the worse, IMO). The really cool thing about stropping is that it enables you to put spaces in your identifiers, since something other than whitespace is used to separate your identifier names from keywords [2] [3]. [0] https://en.wikipedia.org/wiki/Stropping_(syntax) https://en.wikipedia.org/wiki/Stropping_(syntax) [1] Example from an HTML-ized copy of the spec: http://www.masswerk.at/algol60/report.htm http://www.masswerk.at/algol60/report.htm [2] Here's an example from Algol 68 of a function called days in month (yes, with spaces), taken from Wikipedia. I've rendered the keywords using UPPER stropping for the benefit of anyone wanting to try it in a68g: PROC days in month = (INT year, month)INT: CASE month IN 31, IF year MOD 4 EQ 0 AND year MOD 100 NE 0 OR year MOD 400 EQ 0 THEN 29 ELSE 28 FI, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ESAC; [3] Another Wikipedia example of a variable delcaration, showing how stropping enables both spaces in identifiers and identifiers that share words with keywords: INT a real int = 3;
- andreasklinger 9y agoAwesome 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] - written by Zuse (after whom SuseLinux is named) which inspired ALGOL Also worth knowing about is obviously GERMAN[2] a programming language much like brainfuck that is redused to only the most important German words. Example code SCHNITZEL BEER BEER BEER BEER BEER BEER BEER SCHNITZEL BEER SCHNITZEL SCHNITZEL SCHNITZEL BEER SCHNITZEL BEER SCHNITZEL BEER SCHNITZEL SCHNITZEL BEER BEER SCHNITZEL SCHNITZEL SCHNITZEL BEER SCHNITZEL SCHNITZEL SCHNITZEL BEER BEER SCHNITZEL More links: https://en.wikipedia.org/wiki/Non-English-based_programming_languages https://en.wikipedia.org/wiki/Non-English-based_programming_... [1]: https://en.wikipedia.org/wiki/Plankalk%C3%BCl https://en.wikipedia.org/wiki/Plankalk%C3%BCl [2]: https://esolangs.org/wiki/German https://esolangs.org/wiki/German
- laverick 9y agoWell, starting around grade 3 kids in the Philippines are taught primarily in English, so that's probably not the biggest hurdle there. Thanks for the German link, made my morning :)
- vidarh 9y agoWord 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.
- zebrainga 9y agoFriendly small business loans https://www.cityfinances.lv/kredits-uznemumiem/ https://www.cityfinances.lv/kredits-uznemumiem/
- tjwii 9y agoThere are already way too many languages on this planet being kept alive by all those pathetic governments limiting their citizens to their own (little) country. English should already long be the World's 1st language for every human being IMAO. I'm Dutch and it took me ages of struggling to get to my current level of English and I'm still learning.. So, this feels like a huge step back and a great way for Filipino developers and companies to completely limit and restrict their selves. It's a fun coding experiment, but my negative response is because you shouldn't want something like this to become popular.
- FredrikMeyer 9y agoI agree that the would already should have had a lingua franca, but I must say that it English is far from the best candidate. The language is huge, and the grammar is full of irregularities. Pronunciation must be learnt case by case (why are "women" pronounced "wee-men"?). (also recall this cute poem: http://www.ling.upenn.edu/~beatrice/humor/english-lesson.html http://www.ling.upenn.edu/~beatrice/humor/english-lesson.htm... )
- stctgion 9y agoIt's not pronounced wee-men. It's a shorter sound than that, but I guess I'm proving your point!
- munificent 9y agoThis is a common complaint, and one the purist in me is sympathetic to. These days, I have a more nuanced perspective on English. Yes, English is huge and complex. However, the things we are trying to express are themselves huge and complex. A big language gives us many many colors to paint with. I mean different things when I say I am "sad", "down", "blue", "disconsolate", or "woebegone". There is a learning burden on English speakers to loading such a large language in their heads, of course. But, in return, we get a higher-bandwidth communication protocol. The complaints about pronunciation are also common and valid in many cases. Things like the Great Vowel Shift lead to words that no longer sound like they are written for little useful reason. But in some cases, pronunication varies between similar-spelled words because their etymology is wildly different. A word's spelling carries both pronunciation and meaning. When the pronunciation varies, it is often because the underlying morphemes are different even though they are spelled the same. This means the spelling doesn't teach you to pronounce it as well as you like, but once you can pronounce it, the pronunciation helps you know what it means. And, as a lingua franca for the world, I think English is great. English is riddled with loanwords and is constantly assimilating terms from other languages that can't already be expressed well. In many senses, it's a global language because it is the set union of them.
- undershirt 9y agoClojure seems to be very conducive to this by importing a library of words in another language: https://github.com/echeran/clj-thamil/blob/master/src/clj_thamil/%E0%AE%AE%E0%AF%8A%E0%AE%B4%E0%AE%BF%E0%AE%AF%E0%AE%BF%E0%AE%AF%E0%AE%B2%E0%AF%8D.cljc https://github.com/echeran/clj-thamil/blob/master/src/clj_th... Elango Cheran gave a talk about this: https://www.youtube.com/watch?v=MqjMZNwnYCY https://www.youtube.com/watch?v=MqjMZNwnYCY
- michaelterryio 9y agoMeanwhile, duolingo still doesn't support Taglog, much to my annoyance–since my wife is half-Filipino but doesn't know it–and we thought it'd be a fun challenge to learn it together.
- beevai142 9y agoAnother natural language programming language (in Finnish): https://github.com/fergusq/tampio https://github.com/fergusq/tampio It's technically somewhat amusing as it runs a morphological parser in order to deal with the Finnish word inflection system, which is then utilized as an integral part of the language grammar. As a consequence, since this allows relaxing constraints e.g. on word order, the resulting code does actually read like natural language.
- jpatokal 9y agoFinn here: it reads like language that's tediously formal to the point of being awkward, kind of like an old translation of the Bible ("And verily X did beget Y"). "Natural" spoken Finnish abbreviates a lot and dispenses with many conjugations. Maybe I should fork this and build a Helsinki slang version...
- IncRnd 9y agoAt first I thought this was kidney, then upon reading github it hit me that stone is the meaning ala Ruby. Thanks for sharing.
- pwaai 9y agoIt's really interesting to see non-English languages being used as programming languages. I recall Aheui (아희) programming language that was posted on HN a while back. It's truly exotic. https://aheui.github.io/specification.en https://aheui.github.io/specification.en > 밤밣따빠밣밟따뿌 빠맣파빨받밤뚜뭏 돋밬탕빠맣붏두붇 볻뫃박발뚷투뭏붖 뫃도뫃희멓뭏뭏붘 뫃봌토범더벌뿌뚜 뽑뽀멓멓더벓뻐뚠 뽀덩벐멓뻐덕더벅 will print hello world according to the example. Reading it phonetically in Korean, makes no sense at all. If I knew how to design programming languages I would do it like this: > ㅍㄾㄴHello Worldㄱ this is the equivalent of the acronym for 프린트 (ㅍㄹㅌ) or print (english word phonetically typed in Korean) and then using the "N" and "G" Korean alphabet to depict a square parentheses. > prt(Hello World) 인쇄(印刷) would be the more formal word in which case further simplifies the acronym. > ㅇㅅㄴHello Worldㄱ
- half-kh-hacker 9y agoI feel like using 니은 and 기윽 for your quotations limits you in terms of keywords quite a bit. AFAIK, in Korean, they use <텍스트> for their quotations.
- pwaai 9y agoㅋㅋㅋ perhaps in the capitalist counterparts. I'm envisioning a new Korean alphabet only programming language, staying true to the Juche philosophy of self-reliance! I would replace all operators with Korean characters: * is ㅆ || is ㅣㅣ && is ㅃ + is ㅏ = is ㄹ - is ㅡ == is ㅌ > is ㅋ < is ㄷ
- fny 9y agoTIL That Ruby lets you modify keyword parsing at runtime: https://github.com/jjuliano/bato/blob/master/lib/bato/ruby_parser_patches.rb https://github.com/jjuliano/bato/blob/master/lib/bato/ruby_p...
- WindowsFon4life 9y agoGuess "boto" was already taken.
- handojin 9y agoAlternatively, you could skip the hegemony debate and just abandon natural languages altogether... http://www.eecg.toronto.edu/~jzhu/csc326/readings/iverson.pdf http://www.eecg.toronto.edu/~jzhu/csc326/readings/iverson.pd...