🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
drakonis ah, debian already offers rakudo 2022.03 on experimental 00:54
12 days 00:56
not too bad
drakonis i'm actually impressed that raku shows up on every rosetta code page 04:34
Voldenet it's not that surprising, rosetta code really is rich database 04:57
moritz Larry Wall supplied some of the initial raku examples, back when it was still called Perl 6 08:45
Geth doc: cc93b85cc5 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/filename-extensions.pod6
correct the description of the table
14:50
linkable6 Link: docs.raku.org/language/filename-extensions
grondilu How do I compare blobs? &infix:<eq> seems to work but I thought blobs are not supposed to be cast into Str? 18:15
also ~~ does not seem to work 18:17
I guess I need to find an counterexample 18:19
moon-child normalisation
grondilu nevermind it seems that ~~ does work in the end. I may have made a mistake when trying it. 18:26
:w 18:28
lizmat m: Blob.new(1,2,3) eq Blob.new(1,2,3)
camelia WARNINGS for <tmp>:
Useless use of "eq" in expression ".new(1,2,3) eq Blob.new(1,2,3)" in sink context (line 1)
lizmat m: say Blob.new(1,2,3) eq Blob.new(1,2,3)
camelia True
lizmat grondilu ^^
m: say Blob.new(1,2,3) eq Blob.new(1,2,4) 18:29
camelia False
grondilu so using eq is safe even though Blob.Str raises an error? 18:30
m: Blob.new(1,2).Str
camelia Stringification of a Blob is not done with 'Str'. The 'decode' method
should be used to convert a Blob to a Str.
in block <unit> at <tmp> line 1
grondilu notice that I don't mind, it's just a bit confusing considering the doc for eq says it stringifies. 18:31
docs.raku.org/routine/eq : "Coerces both arguments to Str (if necessary); returns True if both are equal." 18:32
I suppose with Blob it's a case when coercion is precisely not necessary. 18:33
makes sense, my bad.
lizmat yeah.. it feels a bit counterintuitive at first 18:35
I guess you could also see a blob as a giant Int... in which case == would make more sense
however, that already had a meaning
m: say Blob.new(1,2,3) == Blob.new(1,2,4)
camelia True
lizmat that just compares number of elements 18:35
grondilu I'm fine with that semantic for ==. A blob is more akin to a Str than to an Int anyway. 18:50
IMHO
lizmat thing was that when the discussion was there about how to compare blobs, == already had the meaning of counting number of elements 18:51
so I guess one chose the easy way out there
Xliff m: say Blob.new(1,2,3) eqv Blob.new(1,2,3) 19:23
camelia True
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; }; a x 10,000,000; say now - INIT now 19:24
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> Blob.new(1,2,3) eqv Blob.new(1,2,3) }; ⏏}; a x 10,000,000; say now - INIT now
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; a x 10,000,000; say now - INIT now
camelia ===SORRY!===
Undeclared routine:
x used at line 1

Other potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o00'. If you meant to create a string, please add quota…
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; a for ^10,000,000; say now - INIT now
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o00'. If you meant to create a string, please add quotation marks.
at <tmp>:1
------> 33) eqv Blob.new(1,2,3) }; a …
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; a for ^10000000; say now - INIT now
Hmmm... maybe too much? 19:25
camelia (timeout)
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; a for ^100000; say now - INIT now
camelia 0.346323012
Xliff m: sub a { my $a = Blob.new(1,2,3) eqv Blob.new(1,2,3) }; a for ^1000000; say now - INIT now
camelia 3.055390325
Xliff m: sub a { my $a = Blob.new(1,2,3) == Blob.new(1,2,3) }; a for ^1000000; say now - INIT now 19:26
camelia 2.835100357
Xliff m: sub a { my $a = Blob.new(1,2,3) eq Blob.new(1,2,3) }; a for ^1000000; say now - INIT now
camelia 3.007381087
Xliff So looks like '==' performs the best.
m: sub a { my $a = Blob.new(1,2,3) == Blob.new(1,4,3) }; a for ^1000000; say now - INIT now 19:27
camelia 2.821660389
lizmat Xliff: == on Blobs just checks # elements 19:29
Geth Documentable/search-categories-streamlined: d6e4c2ac50 | Altai-man++ | 3 files
Streamline search categories processing

  - For Index, just follow the simple "Take first meta as category"
   or report an error heuristic
  - For Primary, allow to overload header processor with something custom
   ($*HEADING-TO-ANCHOR-TRANSFORMER-ACTIONS)
  - Streamline Search generation: prefer primary pages over secondary ones,
   detect duplicate search anchors, be better at calculating categories
19:39
Documentable/search-categories-streamlined: 22f6bbc9f5 | Altai-man++ | 10 files
Update tests to match new implementation