🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:02 llfourn` joined 00:15 Xliff joined
Xliff o/ 00:26
m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( (1.0, 1, 'Hi') ) 00:27
camelia Type check failed in binding to parameter '<anon>'; expected Num but got Rat (1.0)
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( (1e0, 1, 'Hi') )
camelia works!
Xliff m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( ('a', 1, 'Hi') )
camelia Type check failed in binding to parameter '<anon>'; expected Num but got Str ("a")
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub a (@a (Num(), Int(), Str()) ) { say "works!" }; a( ('a', 1, 'Hi') ) 00:28
camelia works!
Xliff m: 'a'.Int.say 00:29
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in block <unit> at <tmp> line 1
Xliff m: 'z'.Num.say
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5z' (indicated by ⏏)
in block <unit> at <tmp> line 1
00:39 epony left 00:44 tobs left 00:55 lucasb left 01:03 tobs joined 01:18 xinming left 01:19 xinming joined 01:53 wamba left 01:56 llfourn` left 01:57 llfourn` joined 02:02 xinming left 02:03 xinming joined 02:06 elcaro left 02:13 elcaro joined 02:14 wildtrees left 02:32 epony joined 03:32 shareable6 left, bloatable6 left, committable6 left, benchable6 left, quotable6 left, sourceable6 left, bisectable6 left, squashable6 left, statisfiable6 left, coverable6 left, unicodable6 left, notable6 left, reportable6 left, releasable6 left 03:33 committable6 joined, shareable6 joined, sourceable6 joined, squashable6 joined 03:34 unicodable6 joined, coverable6 joined, bloatable6 joined, bisectable6 joined, reportable6 joined 03:35 notable6 joined, benchable6 joined, releasable6 joined 03:36 quotable6 joined, statisfiable6 joined 03:40 epony left 03:53 Xliff left 04:07 llfourn` left 04:19 epony joined 04:29 llfourn` joined 04:39 holyghost left 04:57 sena_kun joined 05:13 holyghost joined 05:15 guifa left, guifa joined 05:24 sena_kun left 06:08 wamba joined
xkr47 how do I best check if a number $n is in a fixed set of numbers? In my case the set is 2, 4, 16 06:12
I can of course do $n == 2 || $n == 4 || $n == 16, but is there a more perl6 way? :) 06:13
moritz_ xkr47: $n == 2|4|16
06:14 jmerelo joined
xkr47 cool.. I tried `(set 2, 4, 16).EXISTS-KEY($base)` :) 06:14
thanks moritz_ 06:15
moritz_ m: say 2 (in) set(2, 4, 16) 06:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say 27⏏5 (in) set(2, 4, 16)
expecting any of:
infix
infix stopper
postfix
statement end
statement…
moritz_ m: say 2 (el) set(2, 4, 16)
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say 27⏏5 (el) set(2, 4, 16)
expecting any of:
infix
infix stopper
postfix
statement end
statement…
moritz_ forgot how it works
xkr47 :)
m: say 2 (>) set(2,4,16) 06:17
camelia False
jmerelo Hey
xkr47 lol
Geth advent: 80c9f38796 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | raku-advent-2019/schedule
Updates schedule
06:21
06:27 llfourn` left 06:32 squashable6 left 06:35 squashable6 joined 07:00 llfourn` joined 07:04 mid_home left
Geth doc: 051d9d73a3 | (JJ Merelo)++ | doc/Language/modules.pod6
Required symbols no longer transitively exposed, refs #2632
07:08
07:18 llfourn` left 07:25 lgtaube left 07:30 wamba left 07:31 stoned75 left
tobs m: say 2 (elem) set(2,4,16) 07:32
camelia True
tobs m: say 2 ∈ set(2,4,16) # xkr47: or if you can type it, this is easier to memorize 07:33
camelia True
07:41 lgtaube joined 07:42 jmerelo left 07:49 llfourn` joined 07:54 llfourn` left 08:03 kensanata joined, rindolf joined 08:06 wamba joined 08:13 wamba left 08:28 wamba joined 08:36 xinming_ joined 08:38 wamba left 08:39 xinming left, kensanata left 08:47 wamba joined 08:49 xinming_ left 08:50 xinming_ joined 08:57 wamba left
xkr47 tobs, cool.. how does this compare performance-wise to 2 == 2|4|16 ? 09:35
I think it's about time languages start using unicode.. not for writability, but for readability :)
lizmat m: say 2 (elem) (2,4,16) 09:38
camelia True
lizmat xkr47 tobs you don't have to make it a Set, you just have to use set operators 09:39
the operator will coerce to a Set when needed
xkr47 oh
lizmat in the above example, it even doesn't do that, it just applies set semantics
xkr47 so is it like a Cool think, that lists can behave as Sets ?
thing*
cpan-raku New module released to CPAN! Sys::Utmp (0.0.13) by 03JSTOWE 09:40
xkr47 checking a list for elems might potentially be slower than checking a Set, which might use hash lookups?
lizmat xkr47: true, but building a set is rather expensive *and* you need to process all elements of the list always 09:41
whereas just looking at the list, you can short-circuit as soon as you have a match
as it only needs to return a Bool
xkr47 how about 2|4|16, what does it create? 09:43
lizmat a junction
m: dd 2 | 4 | 16
camelia any(2, 4, 16)
xkr47 also, can't the compiler precompile those fixed-content sets so they don't need to be created but once?
lizmat I think it does, actually 09:44
09:45 rindolf left
lizmat m: my @a = 1,2,3; for ^100000 { my $a := 1 (elem) @a }; say now - INIT now 09:47
camelia 0.1676969
lizmat m: my @a = 1,2,3; for ^100000 { my $a := 1 (elem) set(@a) }; say now - INIT now
camelia 1.9227366
lizmat m: for ^100000 { my $a := 1 (elem) set(1,2,3) }; say now - INIT now
camelia 0.0097738
lizmat m: for ^100000 { Nil }; say now - INIT now 09:48
camelia 0.013725
lizmat m: for ^100000 { }; say now - INIT now
camelia 0.0225478
lizmat m: my @a = 1,2,3; for ^100000 { my $a := 4 (elem) @a }; say now - INIT now
camelia 0.23006689
lizmat m: my @a = 1,2,3; for ^100000 { my $a := 4 (elem) set(@a) }; say now - INIT now
camelia 1.8064751
lizmat so, even if the element is not in the list, the list outperforms the set case 09:49
lizmat needs to be afk for a few hours&
09:50 llfourn` joined 09:51 benjif joined 09:53 rindolf joined, wamba joined
cpan-raku New module released to CPAN! Sys::Lastlog (0.0.11) by 03JSTOWE 09:55
09:55 llfourn` left 10:30 pilne left 10:35 sena_kun joined 10:36 chloekek joined
chloekek p6: Blob.new(0xFF).decode(‘utf8-c8’).perl.put 10:38
camelia "􏿽xFF"
chloekek Is it possible to get a replacement character instead of the NFG synthetic?
p6: my $str := Blob.new(0xFF).decode(‘utf8-c8’); S:g/\x[10FFFD]x<xdigit>**2/�/.perl.put given $str; 10:44
camelia "􏿽xFF"
chloekek mumble grumble
jnthn m: Blob.new(0xFF).decode("utf8-c8").subst(/<:Co>/, "?", :g).put 10:48
camelia ?
chloekek p6: my $str := Blob.new(0xFF).decode(‘utf8-c8’); S:g/.<?{$/.ord == 0x10FFFD}>/�/.perl.put given $str; 10:49
camelia "�"
jnthn Unless you expect there to be other private use plane things that you don't want to touch, <:Co> is probably the most efficient way
chloekek jnthn: hmm, that would match all private use code points though.
jnthn Really utf8-c8 is designed to be used in places where you'll encode back to utf8-c8 again. 10:52
e.g. when what's desired is preserving the bytes
10:54 squashable6 left 10:55 sena_kun left 10:57 squashable6 joined
cpan-raku New module released to CPAN! Linux::Fuser (0.0.12) by 03JSTOWE 10:58
11:07 wamba left 11:10 sena_kun joined
chloekek Yeah, it also appears not to apply normalization. 11:12
It’s not the thing I want to use.
And iconv can only skip invalid sequences, not introduce replacement characters. 11:13
jnthn It uses synthetics for anything not in NFC also, yes, otherwise we again fail to round-trip 11:14
It's designed quite precisely to let you pretend things are strings that aren't really strings but that everyone wants to pretend are anyway :)
chloekek Maybe I could use Inline::Perl5 and use decode from Encoding. 11:17
p6: use Inline::Perl5; 11:18
camelia ===SORRY!===
Could not find Inline::Perl5 at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/sh…
11:19 cpan-raku left 11:21 cpan-raku joined, cpan-raku left, cpan-raku joined
cpan-raku New module released to CPAN! Linux::Cpuinfo (0.0.10) by 03JSTOWE 11:22
11:22 wamba joined
SmokeMachine the cpan-raku bot could show a link to the module... 11:36
chloekek Actually it would be nice to have this in Rakudo. I’ll look into how much work it would be to add. 11:38
Wait, Encoding::Decoder::Builtin.new takes a replacement argument. 11:41
tyil SmokeMachine: to the module tarball, to a page on raku.modules.org, to the repository (if any), ...? 11:42
SmokeMachine I think to the place where raku.modules.org sends you when you click on the module...
tyil ok, and what if a module doesn't appear there yet? 11:43
modules.raku.org doesn't update as frequently as the bot polls cpan 11:44
SmokeMachine I mean, to modules.raku.org/dist/Bla:cpan:Author if it’s on cpan or to the repo if it’s anywhere else...
tyil if you're willing to make that feature, I'm willing to run it, but it sounds like it's getting harder every sentence 11:45
SmokeMachine maybe it should only show after it’s apearing on modules.raku.org?
tyil so we only update all modules every 8 hours or so, and then spam the channel 11:46
chloekek p6: Blob.new(0xFF).decode(‘utf8’, replacement => ‘�’).perl.say
camelia Malformed UTF-8 at line 1 col 1
in block <unit> at <tmp> line 1
tyil that sounds highly inconvenient to anyone using the channel whenever the lists gets updated
SmokeMachine tyil: I just just think it would be more useful that way (at least for me…) every time I see a module here I’d like to read about, I have to go to that page and usualy it’s not there yet... 11:47
tyil that's why I'm OK with someone adding such a feature if they can come up with a way that's not going to cause other issues 11:48
chloekek p6: Blob.new(0xFF).decode(‘utf8’, replacement => “\x[fffd]”).perl.say
camelia Malformed UTF-8 at line 1 col 1
in block <unit> at <tmp> line 1
SmokeMachine tyil: usualy I see that and try to remember a few hours later to got to modules.raku.org and take a look at it… but most of the time I just forgot...
11:49 kensanata joined
tyil I don't have the time to make a feature that comes with a dozen exceptions, nor feel like crippling the bot for everyone just so a couple people can have more information 11:49
if you can find a solution that everyone likes, I'm more than open to review and merge it into the bot, though
chloekek What is the replacement kwarg for in decode? 11:50
11:50 llfourn` joined
SmokeMachine tyil: but what’s the intent of the bot? just anounce new modules or make it easier to people take a look at it? (I’m not trying to badmouth the bot or something like that… I’m just saying I’d like that feature...) 11:51
tyil just announce 11:52
SmokeMachine tyil: ok, thank you 11:53
tyil SmokeMachine: fwiw, I have been planning on my own interface that updates at the same pace as raku-cpan, but as I said before, there's a scarcity of time :(
if there's an interface that updates at the same pace, adding a link to such an interface would be easy to implement and an improvement to the bot 11:54
11:54 llfourn` left 11:55 llfourn` joined
chloekek MoarVM seems to understand the replacement character but for some reason it still croaks: github.com/MoarVM/MoarVM/blob/eb3d...tf8.c#L597 11:57
Oh, that’s for encoding, not for decoding.
p6: use Encoding:from<Perl5>; 12:01
camelia ===SORRY!===
Please install Inline::Perl5 for Perl 5 support.
12:01 wamba left 12:05 wamba joined, vrurg_ joined, vrurg left 12:08 llfourn` left, abraxxa left, abraxxa joined 12:13 mscha joined
mscha m: class Coord { has Int $.x; has Int $.y }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 12:13
camelia False
mscha Is there an easy way to make a Class a value type?
12:13 vrurg_ left 12:14 vrurg joined
mscha I.e., so that Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 12:14
chloekek p6: class Coord { has Int $.x; has Int $.y }; say Coord.new(:1x, :2y).WHICH 12:15
camelia Coord|67159120
chloekek p6: class Coord { has Int $.x; has Int $.y; method WHICH { “Coord|$!x|$!y” } }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 12:16
camelia True
mscha Thanks, chloekek! 12:17
chloekek p6: (1, 2, 3).WHICH.say 12:19
camelia List|68308608
chloekek p6: "foo".WHICH.say
camelia Str|foo
chloekek p6: (foo => 'bar').WHICH.say
camelia Pair|693DF260743BCDECC1EB82467F8ACD44E60587FB
chloekek Interesting.
mscha Lists and pairs are not value types.
m: (1,2,3) === (1,2,3) 12:20
camelia WARNINGS for <tmp>:
Useless use of "===" in expression "(1,2,3) === (1,2,3)" in sink context (line 1)
mscha m: say (1,2,3) === (1,2,3)
camelia False
chloekek mscha: I think WHICH should really return ObjAt, not Str
In particular docs.perl6.org/type/ValueObjAt for “value types”
mscha m: dd 123.WHICH
camelia ValueObjAt.new("Int|123")
chloekek There was an ambiguity with some type of container in the past. 12:21
mscha m: class Coord { has Int $.x; has Int $.y; method WHICH { ValueObjAt.new("Coord|$!x|$!y") } }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 12:22
camelia True
chloekek Pair.WHICH seems to take the hash these days.
mscha So that seems to do the trick.
12:22 llfourn joined
chloekek p6: Str.WHICH.say 12:23
camelia Str|U58553888
mscha p6: dd Str.WHICH.say
camelia Str|U48429872
Bool::True
chloekek p6: say Str === "U58553888" 12:24
camelia False
chloekek p6: say "U58553888".WHICH
camelia Str|U58553888
mscha p6: dd Str.WHICH
camelia ValueObjAt.new("Str|U58533552")
chloekek p6: dd "U58533552".WHICH
camelia ValueObjAt.new("Str|U58533552")
chloekek Maybe === overloads on :U and :D
12:30 vrurg left, vrurg joined
cpan-raku New module released to CPAN! GDBM (0.0.5) by 03JSTOWE 12:33
12:35 vrurg left 12:36 llfourn left
chloekek p6: say &infix:<===> 12:36
camelia &infix:<===>
chloekek p6: say &infix:<===>.perl
camelia proto sub infix:<===> ($?, $?, *%) {*}
12:36 vrurg joined
chloekek p6: say &infix:<===>.candidates 12:37
camelia (Sub+{Callable[Bool]}.new Sub+{Callable[Bool:D]}.new &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===>)
chloekek lol
p6: say &infix:<===>.candidates.perl
camelia (Sub+{Callable[Bool]}.new, Sub+{Callable[Bool:D]}.new, multi sub infix:<===> (Enumeration:D \a, Enumeration:D \b) { #`(Sub|49933392) ... }, multi sub infix:<===> (Int:D $a, Int:D $b --> Bool) { #`(Sub+{Callable[Bool:D]}|49934152) ... }, multi sub infi…
chloekek Probably special cases a bunch of types for performance reasons.
p6: class C { method WHICH { ValueObjAt.new("C") } }; say C === C.new 12:38
camelia True
12:45 Kaiepi joined 12:46 vrurg left 12:47 vrurg joined 12:53 mid_laptop joined 12:54 sena_kun left
lizmat chloekek: if you create your own method WHICH, you should probably make it a multi, and only accept instantiated invocants 12:55
the Mu::WHICH will take care of the uninstantiated one for you 12:56
13:01 daxim left 13:04 llfourn joined 13:05 abraxxa left
mscha m: class Coord { has Int $.x; has Int $.y; multi method WHICH(Coord:D) { ValueObjAt.new("Coord|$!x|$!y") } }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 13:05
camelia False
13:05 abraxxa joined
mscha m: class Coord { has Int $.x; has Int $.y; method WHICH { ValueObjAt.new("Coord|$!x|$!y") } }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); 13:06
camelia True
13:06 vrurg_ joined
mscha lizmat: that doesn't seem to work here... 13:06
13:06 vrurg left
chloekek mscha: you must write Coord:D:, not Coord:D, to set the type of the receiver. 13:07
13:07 daxim joined
mscha Ah, of course, typo. :-( 13:07
m: class Coord { has Int $.x; has Int $.y; multi method WHICH(Coord:D:) { ValueObjAt.new("Coord|$!x|$!y") } }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y);
camelia True
lizmat m: class A { multi method WHICH(A:D:) { "foo" } }; dd A.WHICH
camelia ValueObjAt.new("A|U60682432") 13:08
lizmat m: class A { multi method WHICH(A:D:) { "foo" } }; dd A.new.WHICH
camelia "foo"
13:08 sena_kun joined
lizmat Sadly I must be afk again, this time for ±9 hours of Star Wars goodness :-) 13:09
13:13 lucasb joined 13:18 mid_laptop left
cpan-raku New module released to CPAN! Linux::Fuser (0.0.13) by 03JSTOWE 13:20
13:21 llfourn left 13:23 BlackChaosNL[m] left, AlexDaniel` left, tyil[m] left, CIAvash left, Demos[m] left, Nasrudin left, rba[m] left, uzl[m] left, matiaslina left, MitarashiDango[m left 13:29 vrurg_ left, vrurg joined 13:31 holyghost left 13:32 holyghost joined 13:34 mid_laptop joined 13:39 vrurg left 13:41 vrurg joined 13:42 vrurg left 13:43 vrurg joined 13:45 vrurg left 13:46 vrurg joined 13:49 vrurg_ joined 13:51 vrurg left, llfourn joined 13:57 llfourn left 14:02 wamba left 14:06 abraxxa left, abraxxa joined 14:18 kensanata left
xkr47 m: -16.msb 14:28
camelia WARNINGS for <tmp>:
Useless use of "-" in expression "-16.msb" in sink context (line 1)
xkr47 ?-) 14:29
m: (-16).msb
camelia ( no output )
xkr47 m: say (-16).msb
camelia 4
14:33 xinming_ left 14:35 xinming_ joined
xkr47 is there a shorthand for e.g. `Int.^lookup("Range")` ? 14:42
m: 4.^lookup("Range")(Int) 14:43
camelia ( no output )
xkr47 m: say 4.^lookup("Range")(Int)
camelia -Inf^..^Inf
14:44 gabiruh joined
vrurg_ xkr47: what are you trying to achieve? 14:45
14:45 vrurg_ is now known as vrurg
chloekek p6: say -∞ .. ∞ 14:46
camelia -Inf..Inf
chloekek p6: say -∞^..^∞
camelia -Inf^..^Inf
14:50 wamba joined 14:52 kensanata joined 14:53 BlackChaosNL[m] joined, sena_kun left 15:01 [Coke] left 15:03 [Coke] joined, [Coke] left, [Coke] joined 15:11 sena_kun joined
[Coke] . 15:22
Grinnz tyil: there's another possibility and that's what the bot does in perl: include a URL which will eventually work, and leave it up to the target of the URL to resolve that (maybe with some intermediate service) 15:33
in #perl *
15:34 MitarashiDango[m joined, unclechu joined, AlexDaniel` joined, Nasrudin joined, Demos[m] joined, tyil[m] joined, rba[m] joined, matiaslina joined, uzl[m] joined, CIAvash joined
tyil hmm 15:35
chloekek p6: my $proc := run(«perl -MEncode -CO -ne ‘print decode('utf-8', $_)’», :in, :bin); $proc.in.write: Blob.new(0x41, 0xFF, 0x42); 15:45
camelia ( no output )
15:46 uzl[m] left, tyil[m] left, Demos[m] left, MitarashiDango[m left, rba[m] left, BlackChaosNL[m] left, Nasrudin left, AlexDaniel` left, matiaslina left, unclechu left, CIAvash left
chloekek p6: my $proc := run(«perl -MEncode -CO -ne ‘print decode('utf-8', $_)’», :in, :bin); $proc.in.write: Blob.new(0x41, 0xFF, 0x42); sleep 1 15:46
camelia A�B
chloekek jnthn: found a solution :þ
15:50 kensanata left 15:53 llfourn joined 15:57 BlackChaosNL[m] joined 15:58 llfourn left
chloekek p6: my $proc := run(«perl -MEncode -CIO -pe ‘’», :in, :bin); $proc.in.write: Blob.new(0x41, 0xFF, 0x42); sleep 1 15:59
camelia Malformed UTF-8 character (unexpected end of string) in print, <> line 1.
A
Grinnz tbrowder: you seem to be uploading raku dists into the root of your cpan dir 16:03
tbrowder Grinnz: thnx, I don't know why, the Perl 6 thing is in sight, and I haven't done anything different, although I think I noticed something weird a few days ago. I'll investigate further. 16:05
tellable6 2019-12-17T07:05:05Z #raku <jmerelo> tbrowder I finally got tomorrow's article ready, so we can push your article back another day
2019-12-17T17:34:50Z #whateverable <jmerelo> tbrowder correct.
tbrowder Ah, I see, the upload dir is set to '.' and the 'Perl6' has to be explicitly selected--my eyes are getting weak, or I'm not paying close enough attention (or both!!). Thanks for pointing that out--I have several others to fix, too! 16:09
cpan-raku New module released to CPAN! Text::Utils (2.0.1) by 03TBROWDER 16:16
16:29 chloekek left 16:36 huf_ is now known as huf
tbrowder Grinnz: i think i have it right now, it takes a while to delete files, but upload is quick. thanks again for pointing that out! 16:42
Grinnz np
16:52 japhb left 16:55 sena_kun left 17:00 MitarashiDango[m joined, unclechu joined, AlexDaniel` joined, Demos[m] joined, tyil[m] joined, rba[m] joined, matiaslina joined, Nasrudin joined, CIAvash joined, uzl[m] joined 17:05 wamba left, japhb joined 17:10 sena_kun joined 17:13 jmerelo joined
guifa SmokeMachine: I’m apparently suffering from post-vacation blindness. Where in Red is the code that defines the `model` declarator? 17:18
SmokeMachine guifa: github.com/FCO/Red/blob/master/lib.../Model.pm6 17:19
guifa: and here it’s exported: github.com/FCO/Red/blob/master/lib/Red.pm6#L39 17:20
guifa AHA! That’s second one was the link that I was missing 17:21
Thanks!
I’m probably going to end up biting off more than I can chew, but for one of my projects I’m going to need to create a custom regex/grammar-like thing, and wanted it to feel like working with any old grammar 17:22
Probably will do a grammar-binary (parsing blobs) first as a proof of concept (plus it’s been a complaint that the current grammars don’t handle binary very well) 17:24
17:54 llfourn joined 17:59 llfourn left, cognominal joined 18:00 cognomin_ left 18:03 wamba joined 18:08 chloekek joined 18:33 wamba left 18:34 wamba joined 18:38 wildtrees joined 18:41 mid_laptop left 18:54 sena_kun left
xkr47 vrurg, enlightenment :) 19:02
19:09 sauvin left, sena_kun joined
cpan-raku New module released to CPAN! CSS::Selector::To::XPath (0.0.5) by 03WARRINGD 19:11
19:12 MasterDuke joined
MasterDuke huh. i assumed perl would be competitive python in this micro-benchmark ( news.ycombinator.com/item?id=21825222 ) and raku wouldn't, but for 100_000 python takes 0.4s, perl takes 5.4s, and raku gives `===SORRY!===Annotation segment overflows end of stream` after 78s 19:15
19:20 mscha left 19:21 sauvin joined, xinming_ left 19:22 xinming_ joined
jmerelo releasable6: status 19:45
releasable6 jmerelo, Next release in ≈2 days and ≈23 hours. 1 blocker. 0 out of 271 commits logged
tellable6 2019-12-18T16:18:28Z #raku-dev <tbrowder> jmerelo are you going to change the publish date of my article?
releasable6 jmerelo, Details: gist.github.com/ff57bcd56f43a31a03...9e5a30239a
jmerelo .tell tbrowder not any more, I guess. It'll stay for the 20th.
tellable6 jmerelo, I'll pass your message to tbrowder
tbrowder jmerelo: ok, i see it's for the right date--date changes making me woozy! 19:48
Grinnz MasterDuke: that benchmark isn't presented very well, the shown benchmark command is to both parse and execute the script
jmerelo tbrowder: sorry about that, I had so many last-minute shows and no-shows that I kept moving it around
19:49 jmerelo left
tbrowder what about [Coke]'s emergency post? seems like an emergency to me! 19:49
19:50 stoned75 joined
MasterDuke Grinnz: sure, but i think most people wouldn't expect that to take very long to execute 19:51
Grinnz sure, that's a different concern, but considering it doesn't accomplish anything, it would be hard to benchmark what it usefully does
different languages will of course decide very differently what to do when a variable is assigned something and then nothing else is done 19:52
MasterDuke perl -c takes just about the same amount of time
Grinnz some may optimize for that operation, some may optimize for future operations
MasterDuke raku's parse stage takes 52s 19:54
19:54 llfourn joined
MasterDuke so 0.5s for python to parse and execute (though execute could be getting optimized away), 5s for perl to syntax check (i don't know a better way to just time perl's parsing), and 52s for raku to parse 19:56
Grinnz perl -c runs the parsing phase yes 19:57
did you use "my" declarations? i bet it would be faster without
MasterDuke i did, i'll try without 19:58
sena_kun isn't cpython parser is a _fast_ chunk of C code, giving python syntax is not as diverse as raku one, and raku parser is in raku, which is not blazingly fast (hopefully, yet)? 19:59
MasterDuke 1s for perl -c without 'my's
i wasn't terribly surprised by the raku results, but i was by perl
19:59 ufobat_ joined
Grinnz the 'my' introduces extra work in the parse/compile phase to set up those lexicals 19:59
sena_kun ah, ok 20:00
Grinnz without it will just shove the assignments in global variables, nothing needs to be declared
20:00 llfourn left
Grinnz this is of course a bad idea in real code :P 20:00
MasterDuke 1s is obviously much better than 5s, but i still would have expected perl to be faster than python 20:01
Grinnz *shrug*
they are doing so very different things and it's not a real world use case so i'm not sure i'm surprised or care :P 20:02
MasterDuke not really criticizing perl, and yeah, not totally representative
20:03 ufobat left
MasterDuke but people were commenting about how generated code tends to be longer than hand-written, so i could imagine something compiling to perl that looked a little more like that 20:03
20:05 MitarashiDango[m left 20:12 daxim left, llfourn joined 20:16 jjatria left, jjatria joined, MasterDuke left 20:18 daxim joined 20:22 sjm_uk joined 20:32 MasterDuke joined 20:45 sjm_uk left 20:49 tyil[m] left
chloekek MasterDuke: for me it takes Python .77s and Perl .13s 20:50
20:51 rindolf left
chloekek And it takes Raku 3.16s 20:53
MasterDuke: In the Perl and Raku versions, did you add \n to the print statement? Maybe it’s slow due to line buffering requiring lots of allocations.
MasterDuke chloekek: are you timing printing out the statements? or running the resulting file? 20:54
my times were for running the resulting file
chloekek Oh I see.
20:55 sena_kun left
chloekek lol yeah that’s probably not going to end well 20:55
cpan-raku New module released to CPAN! RedX::HashedPassword (0.0.3) by 03JSTOWE 20:58
21:01 mid_home joined
Juerd I registered the domain useraku.org but have no plans for it. Does anyone here want it? 21:02
21:13 sena_kun joined 21:16 llfourn left
chloekek Could be a redirect to marketing.raku.org/ 21:16
21:19 llfourn joined, mid_home left
xkr47 oh man lovely material at chloekek 21:27
.. 's link
chloekek I’m gonna give another go at installing Raku packages with Nix 21:28
I want to get Inline::Perl5 working.
21:39 Xliff joined
Xliff o/ 21:39
guifa \o
Xliff When the move to Raku is complete, will we be changing the "use v6" pragmas?
Kaiepi .tell jmerelo, my draft for the 24th's article will be ready tomorrow 21:40
tellable6 Kaiepi, I'll pass your message to jmerelo
21:52 llfourn left 21:55 Kaeipi joined, wamba left, Kaiepi left
chloekek Ugh, running into the NativeCall issue again. 21:58
But I can’t find the IRC logs with the solution I found last time.
It can’t find NativeCall when installing with install-dist.p6. 22:00
22:03 pilne joined, cpan-raku left 22:04 Merfont joined, Kaeipi left, pi123 joined
chloekek Ah yeah, I have to include the repository I’m installing into in PERL6LIB when installing with install-dist.p6. 22:05
Like this: PERL6LIB=inst\#foobar install-dist.p6 --from=src --to=inst\#foobar
22:07 johnjay left 22:10 pi123 left 22:14 cpan-raku joined, cpan-raku left, cpan-raku joined 22:17 llfourn joined 22:23 llfourn left
chloekek Oh wow, I got it working with Inline::Perl5. 22:32
lizmat Juerd: please contact rba 22:40
Juerd rba: ^ (tl;dr: I have useraku.org and can transfer it) 22:42
I decided to get rid of the account it's under. Originally I was going to keep it for a year but they don't do domain expiry, only automatic renewal :(
22:44 Merfont left, Merfont joined
chloekek Inline::Perl5 is really neat, nine++ 22:44
22:50 llfourn joined 22:54 sena_kun left, stoned75 left 22:56 llfourn left
chloekek Is the dependency on LibraryMake needed though? I got it working just fine without LibraryMake. 22:56
23:01 llfourn joined 23:09 sena_kun joined 23:12 Merfont left 23:16 Kaiepi joined 23:37 chloekek left 23:54 MasterDuke left