Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lizmat
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
lizmat
3y ago
> Lists are given to the reader in angle brackets and printed in parentheses, or at least that's how it looks. I suppose the other possibility is that these are actually different types They are different types: [1,2,3] is an array
62.
▲
by
lizmat
3y ago
Perhaps. But that will become very difficult indeed. Because in Raku, grammars are just a different way to write code. Grammars are really just specialized classes. And tokens / rules / regexes are just specialized methods. It
63.
▲
by
lizmat
3y ago
`INIT $ RAT-OVERFLOW = CX::Warn` will produce a warning whenever a switch to Num happens. `INIT $ RAT-OVERFLOW = Exception` will throw an exception whenever a switch to Num would happen. If you want to define your own behaviour, you can. F
64.
▲
by
lizmat
3y ago
And for 1.5 years now, you can have the FatRat behaviour by simply adding `INIT $*RAT-OVERFLOW = FatRat` to your program.
65.
▲
by
lizmat
3y ago
Newer versions of Rakudo allow you to tune this behaviour dynamically through the $*RAT-OVERFLOW dynamic variable (which defaults to Num for the described behaviour). See: https://docs.raku.org/language/variables#$*RAT-
66.
▲
by
lizmat
3y ago
FWIW, the JVM is one of the supported backends of the Raku Programming Language. Has been for quite some time actually. It was the first additional backend supported after Parrot, and provided a template for supporting the MoarVM and Java
67.
▲
by
lizmat
3y ago
Raku ( https://raku.org ). But then I'm biased :-)
68.
▲
by
lizmat
3y ago
Indeed. The original plan envisioned Perl being a slang in the Raku Programming Language. That plan failed because Perl is largely dependent on C-code plugins that are used whenever Perl is considered to be too slow (which is often). So
69.
▲
by
lizmat
3y ago
> Larry Wall was so angry about closed java classes that he wanted them open and slow. On the other hand, Damian Conway, the perl6 designer, wanted them closed by default. You have to look at the current raku design if they are still ope
70.
▲
by
lizmat
3y ago
> Perl6 wasn't meant as replacement for Perl 5, v5 was meant to stay forever, maybe to be improved when possible. And that we have. Sorry, but originally it was meant as the replacement (and I was physically present at its announcem
71.
▲
by
lizmat
3y ago
Saying that the Raku Programming Language is a flub, indicates to me that you do not know it at all. Getting Unicode support right by itself should be an indication that it is better than Python 3 in that respect. And let's not start
72.
▲
by
lizmat
3y ago
I think it's a credit to the hard work many people are doing on the Raku Programming Language.
73.
▲
by
lizmat
3y ago
Completely biased opinion: try Raku. It is easier to get into.
74.
▲
by
lizmat
3y ago
In 2019 to be precise: https://raku.org
75.
▲
by
lizmat
3y ago
Note that the Raku Programming Language has pure ASCII equivalents for all operators as well, for the Unicode challenged. E.g. ≠ vs !=, ≤ vs <=, ≥ vs >= etc. etc.
76.
▲
by
lizmat
3y ago
subset OneToTen of Int where 1..10; Why make it more complicated? :-) The secret is that given values are smartmatched against the given object. And the values 1 through 10 will return True if smartmatched against the 1..10 Range object.
77.
▲
by
lizmat
4y ago
$_ is generally referred to as "the topic" in documentation and Raku parlance.
78.
▲
by
lizmat
4y ago
No. In the Raku Programming Language there are several non-ASCII operators, although each of them has a pure ASCII equivalent. Some examples: ≤ vs <=, ≠ vs !=, ∈ vs (elem), etc. The full list: https://docs.raku.org/langu
79.
▲
by
lizmat
4y ago
Well, performance has been improved by several orders of magnitude since the first release. So maybe it's time to look at https://raku.org again (or first have a look at its new documentation site https://docs.r
80.
▲
by
lizmat
4y ago
> It has avoided the missteps of Raku (Perl 6) It is unclear to me what missteps you are referring to?
81.
▲
by
lizmat
4y ago
Actually, the limited precision is the default (caused by the numerator as well as the denominator having to fit in a 64-bit integer). By default, when it not longer fits, it will convert to floating point (called Num in Raku). But this be
82.
▲
by
lizmat
4y ago
The rule for kebab-case (regardless of whether or not it has a sigil) in Raku is: - each part of the identifier must start with an alpha character - cannot end with - So, "foo-bar" would be legal, "foo-" would not, "
83.
▲
by
lizmat
4y ago
That works, but isn't necessary in Raku. As long as the right side of the hyphen does not start with an alphabetic character, you're good: my $a = 45; say $a-3; # 42
84.
▲
by
lizmat
4y ago
For a Raku Grammar tutorial, see https://docs.raku.org/language/grammar_tutorial
85.
▲
by
lizmat
4y ago
For those interested: https://docs.raku.org/language/grammar_tutorial
86.
▲
by
lizmat
4y ago
> if setup & battery installation isn't annoying If you're on linux, it's only an apt-get (or similar) away: https://nxadm.github.io/rakudo-pkg/
87.
▲
Sigils are an underappreciated programming technology
(raku-advent.blog)
12 points
by
lizmat
4y ago
|
1 comments
88.
▲
by
lizmat
4y ago
https://raku.org
89.
▲
by
lizmat
4y ago
Indeed, Raku does not have a GIL
90.
▲
by
lizmat
4y ago
Please Reini, stop being funny like this. It does not become you. To everybody else: if you would like to see what the Raku Programming Language is about, check out an introduction https://raku.guide , or check out the weekly b
More ›