[00:02] *** llfourn` joined [00:15] *** Xliff joined [00:26] o/ [00:27] m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( (1.0, 1, 'Hi') ) [00:27] rakudo-moar 672c5d403: OUTPUT: «Type check failed in binding to parameter ''; expected Num but got Rat (1.0)␤ in sub a at line 1␤ in block at line 1␤␤» [00:27] m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( (1e0, 1, 'Hi') ) [00:27] rakudo-moar 672c5d403: OUTPUT: «works!␤» [00:27] m: sub a (@a (Num, Int, Str) ) { say "works!" }; a( ('a', 1, 'Hi') ) [00:27] rakudo-moar 672c5d403: OUTPUT: «Type check failed in binding to parameter ''; expected Num but got Str ("a")␤ in sub a at line 1␤ in block at line 1␤␤» [00:28] m: sub a (@a (Num(), Int(), Str()) ) { say "works!" }; a( ('a', 1, 'Hi') ) [00:28] rakudo-moar 672c5d403: OUTPUT: «works!␤» [00:29] m: 'a'.Int.say [00:29] rakudo-moar 672c5d403: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤ in block at line 1␤␤» [00:29] m: 'z'.Num.say [00:29] rakudo-moar 672c5d403: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5z' (indicated by ⏏)␤ in block at 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 [03:32] *** bloatable6 left [03:32] *** committable6 left [03:32] *** benchable6 left [03:32] *** quotable6 left [03:32] *** sourceable6 left [03:32] *** bisectable6 left [03:32] *** squashable6 left [03:32] *** statisfiable6 left [03:32] *** coverable6 left [03:32] *** unicodable6 left [03:32] *** notable6 left [03:32] *** reportable6 left [03:32] *** releasable6 left [03:33] *** committable6 joined [03:33] *** shareable6 joined [03:33] *** sourceable6 joined [03:33] *** squashable6 joined [03:34] *** unicodable6 joined [03:34] *** coverable6 joined [03:34] *** bloatable6 joined [03:34] *** bisectable6 joined [03:34] *** reportable6 joined [03:35] *** notable6 joined [03:35] *** benchable6 joined [03:35] *** releasable6 joined [03:36] *** quotable6 joined [03:36] *** 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 [05:15] *** guifa joined [05:24] *** sena_kun left [06:08] *** wamba joined [06:12] 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:13] I can of course do $n == 2 || $n == 4 || $n == 16, but is there a more perl6 way? :) [06:13] xkr47: $n == 2|4|16 [06:14] *** jmerelo joined [06:14] cool.. I tried `(set 2, 4, 16).EXISTS-KEY($base)` :) [06:15] thanks moritz_ [06:16] m: say 2 (in) set(2, 4, 16) [06:16] rakudo-moar 672c5d403: OUTPUT: «5===SORRY!5=== Error while compiling ␤Two terms in a row␤at :1␤------> 3say 27⏏5 (in) set(2, 4, 16)␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement…» [06:16] m: say 2 (el) set(2, 4, 16) [06:16] rakudo-moar 672c5d403: OUTPUT: «5===SORRY!5=== Error while compiling ␤Two terms in a row␤at :1␤------> 3say 27⏏5 (el) set(2, 4, 16)␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement…» [06:16] * moritz_ forgot how it works [06:16] :) [06:17] m: say 2 (>) set(2,4,16) [06:17] rakudo-moar 672c5d403: OUTPUT: «False␤» [06:17] Hey [06:17] lol [06:21] ¦ advent: 80c9f38796 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | raku-advent-2019/schedule [06:21] ¦ advent: Updates schedule [06:21] ¦ advent: review: https://github.com/Raku/advent/commit/80c9f38796 [06:27] *** llfourn` left [06:32] *** squashable6 left [06:35] *** squashable6 joined [07:00] *** llfourn` joined [07:04] *** mid_home left [07:08] ¦ doc: 051d9d73a3 | (JJ Merelo)++ | doc/Language/modules.pod6 [07:08] ¦ doc: Required symbols no longer transitively exposed, refs #2632 [07:08] ¦ doc: review: https://github.com/Raku/doc/commit/051d9d73a3 [07:18] *** llfourn` left [07:25] *** lgtaube left [07:30] *** wamba left [07:31] *** stoned75 left [07:32] m: say 2 (elem) set(2,4,16) [07:32] rakudo-moar 672c5d403: OUTPUT: «True␤» [07:33] m: say 2 ∈ set(2,4,16) # xkr47: or if you can type it, this is easier to memorize [07:33] rakudo-moar 672c5d403: OUTPUT: «True␤» [07:41] *** lgtaube joined [07:42] *** jmerelo left [07:49] *** llfourn` joined [07:54] *** llfourn` left [08:03] *** kensanata joined [08:03] *** 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 [08:39] *** kensanata left [08:47] *** wamba joined [08:49] *** xinming_ left [08:50] *** xinming_ joined [08:57] *** wamba left [09:35] 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 :) [09:38] m: say 2 (elem) (2,4,16) [09:38] rakudo-moar 672c5d403: OUTPUT: «True␤» [09:39] 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 [09:39] oh [09:39] in the above example, it even doesn't do that, it just applies set semantics [09:39] so is it like a Cool think, that lists can behave as Sets ? [09:39] thing* [09:40] New module released to CPAN! Sys::Utmp (0.0.13) by 03JSTOWE [09:40] checking a list for elems might potentially be slower than checking a Set, which might use hash lookups? [09:41] 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 [09:41] as it only needs to return a Bool [09:43] how about 2|4|16, what does it create? [09:43] a junction [09:43] m: dd 2 | 4 | 16 [09:43] rakudo-moar 672c5d403: OUTPUT: «any(2, 4, 16)␤» [09:43] also, can't the compiler precompile those fixed-content sets so they don't need to be created but once? [09:44] I think it does, actually [09:45] *** rindolf left [09:47] m: my @a = 1,2,3; for ^100000 { my $a := 1 (elem) @a }; say now - INIT now [09:47] rakudo-moar 672c5d403: OUTPUT: «0.1676969␤» [09:47] m: my @a = 1,2,3; for ^100000 { my $a := 1 (elem) set(@a) }; say now - INIT now [09:47] rakudo-moar 672c5d403: OUTPUT: «1.9227366␤» [09:47] m: for ^100000 { my $a := 1 (elem) set(1,2,3) }; say now - INIT now [09:47] rakudo-moar 672c5d403: OUTPUT: «0.0097738␤» [09:48] m: for ^100000 { Nil }; say now - INIT now [09:48] rakudo-moar 672c5d403: OUTPUT: «0.013725␤» [09:48] m: for ^100000 { }; say now - INIT now [09:48] rakudo-moar 672c5d403: OUTPUT: «0.0225478␤» [09:48] m: my @a = 1,2,3; for ^100000 { my $a := 4 (elem) @a }; say now - INIT now [09:48] rakudo-moar 672c5d403: OUTPUT: «0.23006689␤» [09:48] m: my @a = 1,2,3; for ^100000 { my $a := 4 (elem) set(@a) }; say now - INIT now [09:48] rakudo-moar 672c5d403: OUTPUT: «1.8064751␤» [09:49] 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 [09:53] *** wamba joined [09:55] New module released to CPAN! Sys::Lastlog (0.0.11) by 03JSTOWE [09:55] *** llfourn` left [10:30] *** pilne left [10:35] *** sena_kun joined [10:36] *** chloekek joined [10:38] p6: Blob.new(0xFF).decode(‘utf8-c8’).perl.put [10:38] rakudo-moar 672c5d403: OUTPUT: «"􏿽xFF"␤» [10:38] Is it possible to get a replacement character instead of the NFG synthetic? [10:44] p6: my $str := Blob.new(0xFF).decode(‘utf8-c8’); S:g/\x[10FFFD]x**2/�/.perl.put given $str; [10:44] rakudo-moar 672c5d403: OUTPUT: «"􏿽xFF"␤» [10:44] mumble grumble [10:48] m: Blob.new(0xFF).decode("utf8-c8").subst(/<:Co>/, "?", :g).put [10:48] rakudo-moar 672c5d403: OUTPUT: «?␤» [10:49] p6: my $str := Blob.new(0xFF).decode(‘utf8-c8’); S:g/./�/.perl.put given $str; [10:49] rakudo-moar 672c5d403: OUTPUT: «"�"␤» [10:49] 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 [10:49] jnthn: hmm, that would match all private use code points though. [10:52] 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 [10:58] New module released to CPAN! Linux::Fuser (0.0.12) by 03JSTOWE [11:07] *** wamba left [11:10] *** sena_kun joined [11:12] Yeah, it also appears not to apply normalization. [11:12] It’s not the thing I want to use. [11:13] And iconv can only skip invalid sequences, not introduce replacement characters. [11:14] 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 :) [11:17] Maybe I could use Inline::Perl5 and use decode from Encoding. [11:18] p6: use Inline::Perl5; [11:18] rakudo-moar 672c5d403: OUTPUT: «===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 [11:21] *** cpan-raku left [11:21] *** cpan-raku joined [11:22] New module released to CPAN! Linux::Cpuinfo (0.0.10) by 03JSTOWE [11:22] *** wamba joined [11:36] the cpan-raku bot could show a link to the module... [11:38] Actually it would be nice to have this in Rakudo. I’ll look into how much work it would be to add. [11:41] Wait, Encoding::Decoder::Builtin.new takes a replacement argument. [11:42] SmokeMachine: to the module tarball, to a page on raku.modules.org, to the repository (if any), ...? [11:42] I think to the place where raku.modules.org sends you when you click on the module... [11:43] ok, and what if a module doesn't appear there yet? [11:44] modules.raku.org doesn't update as frequently as the bot polls cpan [11:44] I mean, to https://modules.raku.org/dist/Bla:cpan:Author if it’s on cpan or to the repo if it’s anywhere else... [11:45] 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] maybe it should only show after it’s apearing on modules.raku.org? [11:46] so we only update all modules every 8 hours or so, and then spam the channel [11:46] p6: Blob.new(0xFF).decode(‘utf8’, replacement => ‘�’).perl.say [11:46] rakudo-moar 672c5d403: OUTPUT: «Malformed UTF-8 at line 1 col 1␤ in block at line 1␤␤» [11:46] that sounds highly inconvenient to anyone using the channel whenever the lists gets updated [11:47] 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:48] 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] p6: Blob.new(0xFF).decode(‘utf8’, replacement => “\x[fffd]”).perl.say [11:48] rakudo-moar 672c5d403: OUTPUT: «Malformed UTF-8 at line 1 col 1␤ in block at line 1␤␤» [11:48] 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 [11:49] 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 [11:50] What is the replacement kwarg for in decode? [11:50] *** llfourn` joined [11:51] 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:52] just announce [11:53] tyil: ok, thank you [11:53] 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 :( [11:54] 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] *** llfourn` left [11:55] *** llfourn` joined [11:57] MoarVM seems to understand the replacement character but for some reason it still croaks: https://github.com/MoarVM/MoarVM/blob/eb3d981d753a9ae60c982b58bbad635ccf7737ef/src/strings/utf8.c#L597 [11:57] Oh, that’s for encoding, not for decoding. [12:01] p6: use Encoding:from; [12:01] rakudo-moar 672c5d403: OUTPUT: «===SORRY!===␤Please install Inline::Perl5 for Perl 5 support. ␤» [12:01] *** wamba left [12:05] *** wamba joined [12:05] *** vrurg_ joined [12:05] *** vrurg left [12:08] *** llfourn` left [12:08] *** abraxxa left [12:08] *** abraxxa joined [12:13] *** mscha joined [12:13] m: class Coord { has Int $.x; has Int $.y }; say Coord.new(:1x, :2y) === Coord.new(:1x, :2y); [12:13] rakudo-moar 672c5d403: OUTPUT: «False␤» [12:13] Is there an easy way to make a Class a value type? [12:13] *** vrurg_ left [12:14] *** vrurg joined [12:14] I.e., so that Coord.new(:1x, :2y) === Coord.new(:1x, :2y); [12:15] p6: class Coord { has Int $.x; has Int $.y }; say Coord.new(:1x, :2y).WHICH [12:15] rakudo-moar 672c5d403: OUTPUT: «Coord|67159120␤» [12:16] 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] rakudo-moar 672c5d403: OUTPUT: «True␤» [12:17] Thanks, chloekek! [12:19] p6: (1, 2, 3).WHICH.say [12:19] rakudo-moar 672c5d403: OUTPUT: «List|68308608␤» [12:19] p6: "foo".WHICH.say [12:19] rakudo-moar 672c5d403: OUTPUT: «Str|foo␤» [12:19] p6: (foo => 'bar').WHICH.say [12:19] rakudo-moar 672c5d403: OUTPUT: «Pair|693DF260743BCDECC1EB82467F8ACD44E60587FB␤» [12:19] Interesting. [12:19] Lists and pairs are not value types. [12:20] m: (1,2,3) === (1,2,3) [12:20] rakudo-moar 672c5d403: OUTPUT: «WARNINGS for :␤Useless use of "===" in expression "(1,2,3) === (1,2,3)" in sink context (line 1)␤» [12:20] m: say (1,2,3) === (1,2,3) [12:20] rakudo-moar 672c5d403: OUTPUT: «False␤» [12:20] mscha: I think WHICH should really return ObjAt, not Str [12:20] In particular https://docs.perl6.org/type/ValueObjAt for “value types” [12:20] m: dd 123.WHICH [12:20] rakudo-moar 672c5d403: OUTPUT: «ValueObjAt.new("Int|123")␤» [12:21] There was an ambiguity with some type of container in the past. [12:22] 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] rakudo-moar 672c5d403: OUTPUT: «True␤» [12:22] Pair.WHICH seems to take the hash these days. [12:22] So that seems to do the trick. [12:22] *** llfourn joined [12:23] p6: Str.WHICH.say [12:23] rakudo-moar 672c5d403: OUTPUT: «Str|U58553888␤» [12:23] p6: dd Str.WHICH.say [12:23] rakudo-moar 672c5d403: OUTPUT: «Str|U48429872␤Bool::True␤» [12:24] p6: say Str === "U58553888" [12:24] rakudo-moar 672c5d403: OUTPUT: «False␤» [12:24] p6: say "U58553888".WHICH [12:24] rakudo-moar 672c5d403: OUTPUT: «Str|U58553888␤» [12:24] p6: dd Str.WHICH [12:24] rakudo-moar 672c5d403: OUTPUT: «ValueObjAt.new("Str|U58533552")␤» [12:24] p6: dd "U58533552".WHICH [12:24] rakudo-moar 672c5d403: OUTPUT: «ValueObjAt.new("Str|U58533552")␤» [12:24] Maybe === overloads on :U and :D [12:30] *** vrurg left [12:30] *** vrurg joined [12:33] New module released to CPAN! GDBM (0.0.5) by 03JSTOWE [12:35] *** vrurg left [12:36] *** llfourn left [12:36] p6: say &infix:<===> [12:36] rakudo-moar 672c5d403: OUTPUT: «&infix:<===>␤» [12:36] p6: say &infix:<===>.perl [12:36] rakudo-moar 672c5d403: OUTPUT: «proto sub infix:<===> ($?, $?, *%) {*}␤» [12:36] *** vrurg joined [12:37] p6: say &infix:<===>.candidates [12:37] rakudo-moar 672c5d403: OUTPUT: «(Sub+{Callable[Bool]}.new Sub+{Callable[Bool:D]}.new &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===> &infix:<===>)␤» [12:37] lol [12:37] p6: say &infix:<===>.candidates.perl [12:37] rakudo-moar 672c5d403: OUTPUT: «(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…» [12:37] Probably special cases a bunch of types for performance reasons. [12:38] p6: class C { method WHICH { ValueObjAt.new("C") } }; say C === C.new [12:38] rakudo-moar 672c5d403: OUTPUT: «True␤» [12:45] *** Kaiepi joined [12:46] *** vrurg left [12:47] *** vrurg joined [12:53] *** mid_laptop joined [12:54] *** sena_kun left [12:55] chloekek: if you create your own method WHICH, you should probably make it a multi, and only accept instantiated invocants [12:56] the Mu::WHICH will take care of the uninstantiated one for you [13:01] *** daxim left [13:04] *** llfourn joined [13:05] *** abraxxa left [13:05] 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] rakudo-moar 672c5d403: OUTPUT: «False␤» [13:05] *** abraxxa joined [13:06] 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] rakudo-moar 672c5d403: OUTPUT: «True␤» [13:06] *** vrurg_ joined [13:06] lizmat: that doesn't seem to work here... [13:06] *** vrurg left [13:07] mscha: you must write Coord:D:, not Coord:D, to set the type of the receiver. [13:07] *** daxim joined [13:07] 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); [13:07] rakudo-moar 672c5d403: OUTPUT: «True␤» [13:07] m: class A { multi method WHICH(A:D:) { "foo" } }; dd A.WHICH [13:08] rakudo-moar 672c5d403: OUTPUT: «ValueObjAt.new("A|U60682432")␤» [13:08] m: class A { multi method WHICH(A:D:) { "foo" } }; dd A.new.WHICH [13:08] rakudo-moar 672c5d403: OUTPUT: «"foo"␤» [13:08] *** sena_kun joined [13:09] Sadly I must be afk again, this time for ±9 hours of Star Wars goodness :-) [13:13] *** lucasb joined [13:18] *** mid_laptop left [13:20] New module released to CPAN! Linux::Fuser (0.0.13) by 03JSTOWE [13:21] *** llfourn left [13:23] *** BlackChaosNL[m] left [13:23] *** AlexDaniel` left [13:23] *** tyil[m] left [13:23] *** CIAvash left [13:23] *** Demos[m] left [13:23] *** Nasrudin left [13:23] *** rba[m] left [13:23] *** uzl[m] left [13:23] *** matiaslina left [13:23] *** MitarashiDango[m left [13:29] *** vrurg_ left [13:29] *** 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 [13:51] *** llfourn joined [13:57] *** llfourn left [14:02] *** wamba left [14:06] *** abraxxa left [14:06] *** abraxxa joined [14:18] *** kensanata left [14:28] m: -16.msb [14:28] rakudo-moar 672c5d403: OUTPUT: «WARNINGS for :␤Useless use of "-" in expression "-16.msb" in sink context (line 1)␤» [14:29] ?-) [14:29] m: (-16).msb [14:29] rakudo-moar 672c5d403: ( no output ) [14:29] m: say (-16).msb [14:29] rakudo-moar 672c5d403: OUTPUT: «4␤» [14:33] *** xinming_ left [14:35] *** xinming_ joined [14:42] is there a shorthand for e.g. `Int.^lookup("Range")` ? [14:43] m: 4.^lookup("Range")(Int) [14:43] rakudo-moar 672c5d403: ( no output ) [14:43] m: say 4.^lookup("Range")(Int) [14:43] rakudo-moar 672c5d403: OUTPUT: «-Inf^..^Inf␤» [14:44] *** gabiruh joined [14:45] xkr47: what are you trying to achieve? [14:45] *** vrurg_ is now known as vrurg [14:46] p6: say -∞ .. ∞ [14:46] rakudo-moar 672c5d403: OUTPUT: «-Inf..Inf␤» [14:46] p6: say -∞^..^∞ [14:46] rakudo-moar 672c5d403: OUTPUT: «-Inf^..^Inf␤» [14:50] *** wamba joined [14:52] *** kensanata joined [14:53] *** BlackChaosNL[m] joined [14:53] *** sena_kun left [15:01] *** [Coke] left [15:03] *** [Coke] joined [15:03] *** [Coke] left [15:03] *** [Coke] joined [15:11] *** sena_kun joined [15:22] <[Coke]> . [15:33] 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 [15:34] *** unclechu joined [15:34] *** AlexDaniel` joined [15:34] *** Nasrudin joined [15:34] *** Demos[m] joined [15:34] *** tyil[m] joined [15:34] *** rba[m] joined [15:34] *** matiaslina joined [15:34] *** uzl[m] joined [15:34] *** CIAvash joined [15:35] hmm [15:45] p6: my $proc := run(«perl -MEncode -CO -ne ‘print decode('utf-8', $_)’», :in, :bin); $proc.in.write: Blob.new(0x41, 0xFF, 0x42); [15:45] rakudo-moar 672c5d403: ( no output ) [15:46] *** uzl[m] left [15:46] *** tyil[m] left [15:46] *** Demos[m] left [15:46] *** MitarashiDango[m left [15:46] *** rba[m] left [15:46] *** BlackChaosNL[m] left [15:46] *** Nasrudin left [15:46] *** AlexDaniel` left [15:46] *** matiaslina left [15:46] *** unclechu left [15:46] *** CIAvash left [15:46] 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] rakudo-moar 672c5d403: OUTPUT: «A�B» [15:46] jnthn: found a solution :þ [15:50] *** kensanata left [15:53] *** llfourn joined [15:57] *** BlackChaosNL[m] joined [15:58] *** llfourn left [15:59] p6: my $proc := run(«perl -MEncode -CIO -pe ‘’», :in, :bin); $proc.in.write: Blob.new(0x41, 0xFF, 0x42); sleep 1 [15:59] rakudo-moar 672c5d403: OUTPUT: «Malformed UTF-8 character (unexpected end of string) in print, <> line 1.␤A» [16:03] tbrowder: you seem to be uploading raku dists into the root of your cpan dir [16:05] 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] 2019-12-17T07:05:05Z #raku tbrowder I finally got tomorrow's article ready, so we can push your article back another day [16:05] 2019-12-17T17:34:50Z #whateverable tbrowder correct. [16:09] 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:16] New module released to CPAN! Text::Utils (2.0.1) by 03TBROWDER [16:29] *** chloekek left [16:36] *** huf_ is now known as huf [16:42] 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] np [16:52] *** japhb left [16:55] *** sena_kun left [17:00] *** MitarashiDango[m joined [17:00] *** unclechu joined [17:00] *** AlexDaniel` joined [17:00] *** Demos[m] joined [17:00] *** tyil[m] joined [17:00] *** rba[m] joined [17:00] *** matiaslina joined [17:00] *** Nasrudin joined [17:00] *** CIAvash joined [17:00] *** uzl[m] joined [17:05] *** wamba left [17:05] *** japhb joined [17:10] *** sena_kun joined [17:13] *** jmerelo joined [17:18] SmokeMachine: I’m apparently suffering from post-vacation blindness. Where in Red is the code that defines the `model` declarator? [17:19] guifa: https://github.com/FCO/Red/blob/master/lib/MetamodelX/Red/Model.pm6 [17:20] guifa: and here it’s exported: https://github.com/FCO/Red/blob/master/lib/Red.pm6#L39 [17:21] AHA! That’s second one was the link that I was missing [17:21] Thanks! [17:22] 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:24] 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:54] *** llfourn joined [17:59] *** llfourn left [17:59] *** 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 [19:02] vrurg, enlightenment :) [19:09] *** sauvin left [19:09] *** sena_kun joined [19:11] New module released to CPAN! CSS::Selector::To::XPath (0.0.5) by 03WARRINGD [19:12] *** MasterDuke joined [19:15] huh. i assumed perl would be competitive python in this micro-benchmark ( https://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:20] *** mscha left [19:21] *** sauvin joined [19:21] *** xinming_ left [19:22] *** xinming_ joined [19:45] releasable6: status [19:45] jmerelo, Next release in ≈2 days and ≈23 hours. 1 blocker. 0 out of 271 commits logged [19:45] 2019-12-18T16:18:28Z #raku-dev jmerelo are you going to change the publish date of my article? [19:45] jmerelo, Details: https://gist.github.com/ff57bcd56f43a31a033daa9e5a30239a [19:45] .tell tbrowder not any more, I guess. It'll stay for the 20th. [19:45] jmerelo, I'll pass your message to tbrowder [19:48] jmerelo: ok, i see it's for the right date--date changes making me woozy! [19:48] MasterDuke: that benchmark isn't presented very well, the shown benchmark command is to both parse and execute the script [19:48] tbrowder: sorry about that, I had so many last-minute shows and no-shows that I kept moving it around [19:49] *** jmerelo left [19:49] what about [Coke]'s emergency post? seems like an emergency to me! [19:50] *** stoned75 joined [19:51] Grinnz: sure, but i think most people wouldn't expect that to take very long to execute [19:51] sure, that's a different concern, but considering it doesn't accomplish anything, it would be hard to benchmark what it usefully does [19:52] 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] perl -c takes just about the same amount of time [19:52] some may optimize for that operation, some may optimize for future operations [19:54] raku's parse stage takes 52s [19:54] *** llfourn joined [19:56] 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:57] perl -c runs the parsing phase yes [19:57] did you use "my" declarations? i bet it would be faster without [19:58] i did, i'll try without [19:59] 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] 1s for perl -c without 'my's [19:59] i wasn't terribly surprised by the raku results, but i was by perl [19:59] *** ufobat_ joined [19:59] the 'my' introduces extra work in the parse/compile phase to set up those lexicals [20:00] ah, ok [20:00] without it will just shove the assignments in global variables, nothing needs to be declared [20:00] *** llfourn left [20:00] this is of course a bad idea in real code :P [20:01] 1s is obviously much better than 5s, but i still would have expected perl to be faster than python [20:01] *shrug* [20:02] 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] not really criticizing perl, and yeah, not totally representative [20:03] *** ufobat left [20:03] 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:05] *** MitarashiDango[m left [20:12] *** daxim left [20:12] *** llfourn joined [20:16] *** jjatria left [20:16] *** jjatria joined [20:16] *** 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 [20:50] MasterDuke: for me it takes Python .77s and Perl .13s [20:51] *** rindolf left [20:53] 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. [20:54] chloekek: are you timing printing out the statements? or running the resulting file? [20:54] my times were for running the resulting file [20:54] Oh I see. [20:55] *** sena_kun left [20:55] lol yeah that’s probably not going to end well [20:58] New module released to CPAN! RedX::HashedPassword (0.0.3) by 03JSTOWE [21:01] *** mid_home joined [21:02] I registered the domain useraku.org but have no plans for it. Does anyone here want it? [21:13] *** sena_kun joined [21:16] *** llfourn left [21:16] Could be a redirect to https://marketing.raku.org/ [21:19] *** llfourn joined [21:19] *** mid_home left [21:27] oh man lovely material at chloekek [21:27] .. 's link [21:28] 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 [21:39] o/ [21:39] \o [21:39] When the move to Raku is complete, will we be changing the "use v6" pragmas? [21:40] .tell jmerelo, my draft for the 24th's article will be ready tomorrow [21:40] Kaiepi, I'll pass your message to jmerelo [21:52] *** llfourn left [21:55] *** Kaeipi joined [21:55] *** wamba left [21:55] *** Kaiepi left [21:58] Ugh, running into the NativeCall issue again. [21:58] But I can’t find the IRC logs with the solution I found last time. [22:00] It can’t find NativeCall when installing with install-dist.p6. [22:03] *** pilne joined [22:03] *** cpan-raku left [22:04] *** Merfont joined [22:04] *** Kaeipi left [22:04] *** pi123 joined [22:05] 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 [22:14] *** cpan-raku left [22:14] *** cpan-raku joined [22:17] *** llfourn joined [22:23] *** llfourn left [22:32] Oh wow, I got it working with Inline::Perl5. [22:40] Juerd: please contact rba [22:42] 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 [22:44] *** Merfont joined [22:44] Inline::Perl5 is really neat, nine++ [22:50] *** llfourn joined [22:54] *** sena_kun left [22:54] *** stoned75 left [22:56] *** llfourn left [22:56] Is the dependency on LibraryMake needed though? I got it working just fine without LibraryMake. [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