Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
b2gills
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
61.
▲
by
b2gills
6y ago
Actually migrating from Perl5 to Raku may be less painful than migrating from Python2 to Python3 for some codebases. That is because you can easily use Perl5 modules in Raku. use v6; use Scalar::Util:from<Perl5> <looks_l
62.
▲
by
b2gills
6y ago
The way Perl dealt with this was to have you declare when you are using UTF8. # declare that the code itself is written in utf8 use utf8; my $ā = 'ā'; If you need unicode strings to work, you turn on the unicode
63.
▲
by
b2gills
6y ago
Raku and Rakudo are different words. “Raku” is the anglicized form of “楽”, which means “easy”. (It is also a form of pottery.) “Rakuda do” is supposed to be “way of the camel”. “Rakudo” is “Rakuda do” but shortened/portmanteau. “Rakudo
64.
▲
by
b2gills
6y ago
That is not actually the same thing. PHP 6 was thrown away never to be seen from again, because it was seen as bad. Perl 6 was renamed because both Perl 5 and Perl 6 are significantly different active languages. If Perl went to 7 it could i
65.
▲
by
b2gills
6y ago
I would prefer if they created a year alias to the version. So both of these lines would be equivalent. use v5.32; use Perl v2020;
66.
▲
by
b2gills
6y ago
You really wouldn't really need to in Raku. Mainly because you can add things to the existing parser instead. (See postfix and infix below.) role Physics::Datum { has Real $.value is required; } role Physics::Distan
67.
▲
by
b2gills
6y ago
I've heard about a merger between two companies. One use Java, the other used Perl. At some point both teams were told that they had to add a particular feature. The Perl team was done well before the Java team. This was a story from o
68.
▲
by
b2gills
7y ago
You do realize that there are more Perl programmers and more Perl code written today then there was back in '99 when Python 1.5.2 was released. Sure the percentage has gone down, but the count has gone up.
69.
▲
by
b2gills
7y ago
You do realize that comes from english right? if $you-are-hungry { make-a-sandwich() } make-a-sandwich() if $you-are-hungry; If you remove all of the non-letter characters, you are left with very understandable english sentenc
70.
▲
by
b2gills
7y ago
Raku is not fast for mostly different reasons. Right now one of the slow parts is the regex/grammar feature. So code that uses that feature is a bit slower than it needs to be. The compiler uses the regex/grammar feature, so your
71.
▲
by
b2gills
7y ago
I didn't mean in Perl. If you actually read what I wrote, you'll note that everything I said makes it a difficult to impossible in Perl. I meant adding the feature to Rust, which doesn't have the same difficulties.
72.
▲
by
b2gills
7y ago
It was a problem in Perl, it isn't in Raku. Part of the problem is that Perl doesn't have as strong of a type system. (Is is an int or a string, or is is both? The runtime certainly doesn't know.) It was also symmetric in 5.1
73.
▲
by
b2gills
7y ago
In Raku those things are also separate. 1. Polymorphism class Example { method be-nice () { 'be nice' } } class Bill-and-Ted is Example { method be-nice () { 'be excellent to e
74.
▲
by
b2gills
7y ago
Multi-threading and Junctions auto-threading are NOT the same thing. Calling it auto-threading has lead many people to the wrong conclusion. (It is possible that auto-threading may be done multi-threaded in the future, but it doesn't d
75.
▲
by
b2gills
7y ago
Roles take the place of all of these: - Java interfaces - abstract classes - C++ templates - Python mixins - Smalltalk traits So are you telling me that you haven't used any of those? --- Roles combine all of those features very simply
76.
▲
by
b2gills
7y ago
Perl 5.000 came out in 1994, the same year as Java. Perl didn't even have objects before that. So no it wasn't from experience with Perl.
77.
▲
by
b2gills
7y ago
What functionality does Python have that Perl doesn't? I'm legitimately asking because I'm pretty sure there is almost no functionality in Python that isn't in Perl. In fact of the features I've read about that chan
78.
▲
by
b2gills
7y ago
Those work in Raku, with the exception of ‟at least two styles”. .say for q[‟”].uninames # DOUBLE HIGH-REVERSED-9 QUOTATION MARK # RIGHT DOUBLE QUOTATION MARK If you use one type of quote, you can use the others inside of i
79.
▲
by
b2gills
7y ago
I have yet to find out about a Python 3 change that couldn't have been handled in a backward compatible way. I know this because every change I've heard about is reminiscent of a Perl5 change where backwards compatibility was not
80.
▲
by
b2gills
7y ago
Everything that I've heard that was changed from Python 2 to 3 are reminiscent of things that Perl5 handled while maintaining backwards compatibility. I mean Perl5 is still mostly backwards compatible back to the original version relea
81.
▲
by
b2gills
7y ago
Note that: while (<>) { ($h{$_}++ == 1) && push (@outputarray, $_); }; Would be written as the following in Raku: my @output-array = lines.unique;
82.
▲
by
b2gills
7y ago
He has long hair now, which is often under a cowboy hat. He of course still wears hawaiian shirts.
83.
▲
by
b2gills
7y ago
I want to know who taught you math. Because 2015 - 2000 does not equal 20. The project started in 2000. --- It would have been a much worse language if it had been released even a few months earlier. (That was before the GLR landed.) --- Al
84.
▲
by
b2gills
7y ago
Yeah, I don't think that anyone learning Raku that way would realize that the {} in the following is actually a lambda. for @a { .say } So this works in basically the same way: my $lambda = { .say } @a.map( $lambda
85.
▲
by
b2gills
7y ago
What's surprising is that there is evidence that they originally evolved to deal with the snows of the arctic. So those feet that are great on sand were made for walking on snow covered ground. Likewise food is scarce in both the arcti
86.
▲
by
b2gills
7y ago
I think it would be a better idea to make the minor number be the major number. So skip to 32.
87.
▲
by
b2gills
7y ago
Microsoft had to skip 9 because programmers are lazy. A lot of programs refused to work if there was a `9` in the version name. That was of course because those programs needed something newer than Windows 95 or Windows 98. So they just did
88.
▲
by
b2gills
7y ago
This has the benefit of showing that Perl gets a new version released every year. I have previously stated that I would like it to be an alias of sorts. use v5.30; use v2019; Basically have both of those lines do the same thin
89.
▲
by
b2gills
7y ago
I have a different perspective. When I have a bit of Raku code that is too slow I complain (send a bug report) and then someone else figures out why the JIT isn't doing a better job and fixes it. Then bingo-bango it ends up even faster
90.
▲
by
b2gills
7y ago
Especially since you can use the Inline::Python module.
More ›