Live data from Hacker News

Show HN: Bato – A Filipino Programming Language

github.com

121–127 of 127 posts

Re: Show HN: Bato – A Filipino Programming Language

#121
post #71
post #32

Earlier quoted context omitted.

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…

> 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 e…

It feels good that somebody thought about the trouble that spaces in identifiers can bring.

I am currently using the robot framework language which combines the worst of all worlds. It supports spaces in identifiers, but it does so by using “more than one white space” as a separator for everything. No parentheses, no commas, and of course identifiers are case insensitive.

Re: Show HN: Bato – A Filipino Programming Language

#122
post #71
post #32

Earlier quoted context omitted.

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…

> 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 e…

>>The really cool thing about stropping is that it enables you to put spaces in your identifiers.

I think that this is a recepie for confusion and misunderstanding, both for humans and for developer tools. I do not understand how can it be "cool" ?

Re: Show HN: Bato – A Filipino Programming Language

#123

Earlier quoted context omitted.

Capslock with custom bindings? The default way to switch is control + space.

It's not a custom binding. It's a default option offered by osx https://i.imgur.com/uJo5XUj.png

Strange that I've never seen that before. To bad it only toggles between two languages (I have 3 setup)

Re: Show HN: Bato – A Filipino Programming Language

#124

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…

> written by Zuse (after whom SuseLinux is named) I was under the impression that SuSE (now SUSE) stood for "Software und System Entwicklung" (Software and System Development, translated from German), are we referring to the same Linux distribution?

interesting - tried to look up if i am correct - couldnt find any result

i always assumed it to be named as a nod to zuse the famous german computer pioneer.

but you might be right - might just be coincidence

Re: Show HN: Bato – A Filipino Programming Language

#125
post #112

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…

Perhaps it should have been "BIER" instead of "BEER".

It's a considerate effort to make the language more readable to foreigners

Re: Show HN: Bato – A Filipino Programming Language

#126
post #53

Earlier quoted context omitted.

Esperanto would be nice

There was a programming language with Esperanto syntax. I have to leave for work but I'll respond later with the name if no one else posts it.

I searched yesterday but wasn't able to find the reference.

Re: Show HN: Bato – A Filipino Programming Language

#127
post #70

Earlier quoted context omitted.

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 ")

No it doesn't have the same flexibility.

Perl 6's string quoting sub language has various feature flags that you can turn on or off.

Here are a few of the basic ones shown in valid code (comments and newlines included)

  # start quoting with no features enabled
  # (not even backslashing the delimiter is enabled)
  Q

    :scalar    # enable $foo
    :array     # enable @foo[]
    :hash      # enable %foo{}
    :closure   # enable { 12/3 }
    :function  # enable &foo('bar')
    :single    # turns on backslashing the delimiter
    :backslash # enable \n
  
    :!exec     # turn off executing it (redundant)
    :exec(0)   # another syntax for turning off a feature
  
  {…}          # various delimiters are allowed (generally punctuation)
There are shorter variants of each of the feature flags. :c => :closure

I would like to point out that the parsing of the :closure and :function part of the sub language is reentrant. (Actually most of them add some form of reentrancy, it is just harder to show it for the others)

  "a b &foo( "c d &bar( "baz" )" )"
Note that this reuses the base Perl 6 parser, and that is why it is reentrant.

There are shortcuts for regularly used forms

  「」 =:= Q[]
  
  '' =:=  q[] =:= Q:q[]  =:= Q:single[]
  
  "" =:= qq[] =:= Q:qq[] =:= Q:double[]
     =:= Q:b:s:a:h:c:f[]
     =:= Q:backslash:scalar:array:hash:closure:function[]
The ability to turn off features can be useful

  qq :!c [a {\n  b\n} c] # { and } don't form a closure here
I would like to point out that the :foo syntax is used everywhere in the language for named parameters to routines and operators (most operators are implemented as subroutines)

  :foo =:= :foo( True ) =:= foo => True
  
  :!bar =:= :bar( False ) =:= bar => False
  
  :$baz =:= :baz( $baz ) =:= baz => $baz
If the delimiters are paired () {} 「」 «» “” ‘’ you can double up on them.

  q =:= q> =:= q>>>>
This is useful to avoid having to backslash a delimiter within the string, or trying to find a delimiter that isn't in the string.

  q >> =:= q'  '
Post reply on HN