»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
shin_ persisting, as to have a library of transformations, like "crack-the-egg.pl" in this example 00:00
00:01 devmikey left
shin_ i think, maybe naively, just to create a hash with the attribute as the key and a code as the value. But i'm not sure if that would be the right way. 00:03
00:03 geraud left
lucasb_ about the transformation part, an idea is to do this: have a subroutine which receives 2 hashes. it returns the first hash, after iterating the second hash and changing the first accordingly 00:03
if the values in the second hash are not Callable objects, then just substitute the value in the first hash
if the value in the second hash is a Callable object, then call it with the value from the first hash 00:04
00:05 bjz joined
shin_ I didnt thought of discriminating between Callable and not, thanks lucasb_ :) 00:07
SmokeMachine____ shin_: something like this? 00:09
m: my %a = :shell, :1weight, :origin<animal>; my %t = :shell({False}), :weigth(* * .95); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key}($value) !! $value }
camelia rakudo-moar d8309d: OUTPUT«(shell => False origin => animal weight => 1)␤»
skids (news on the GOP website thing just hit the mainstream shows, much chuckling)
00:11 pierre_ joined
SmokeMachine____ m: my %a = :shell, :1weight, :origin<animal>; my %t = :shell({False}), :weight(* * .95); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key}($value) !! $value } 00:12
camelia rakudo-moar d8309d: OUTPUT«(shell => False origin => animal weight => 0.95)␤»
SmokeMachine____ m: my %a = :shell, :1weight, :origin<animal>; my %t = :shell(False), :weight(* * .95); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key} ~~ Callable ?? %t{$key}($value) !! %t{$key} !! $value } 00:14
camelia rakudo-moar d8309d: OUTPUT«(shell => False origin => animal weight => 0.95)␤»
shin_ " :1weight " that's a weird syntax... i mean, i understand it but it looks strange :). Yes SmokeMachine____ , that is exactly what i was looking for!! 00:15
i feel for the poor soul having to write a syntax highlighter for perl6 :) 00:16
Xliff m: use NativeCall; my CArray[int32] @a = Bool.roll(100); say @a.elems 00:17
camelia rakudo-moar d8309d: OUTPUT«Type check failed in assignment to @a; expected NativeCall::Types::CArray[int32] but got Bool (Bool::True)␤ in block <unit> at <tmp> line 1␤␤»
Xliff m: use NativeCall; my CArray[int32] @a = (^1000).roll(100); say @a.elems
camelia rakudo-moar d8309d: OUTPUT«Type check failed in assignment to @a; expected NativeCall::Types::CArray[int32] but got Int (837)␤ in block <unit> at <tmp> line 1␤␤»
00:17 bjz left
SmokeMachine____ shin_: I'm not sure... but probably it wouldn't be difficult once there are the STD grammar... (I guess) 00:17
Xliff I've written a STORE method for CArray, but it looks like it's not getting called there.
Is there something else I need to do to get it to work? 00:18
MasterDuke i was just trying to clarify the error message for a definedness constraint on an optional parameter (that was being discussed earlier) 00:20
but if i add a check for "$flags +& $SIG_ELEM_IS_OPTIONAL" here: github.com/rakudo/rakudo/blob/nom/...P.nqp#L332
it doesn't pass. any idea why that flag would be lost or get unset?
seatek Oh my gosh, I'm starting to make only stupid mistakes now intead of insane ones. 00:41
00:42 profan left 00:43 perlawhirl joined 00:44 profan joined 00:45 vytas left 00:55 itaipu left 00:57 sammers left 00:58 Ben_Goldberg joined 00:59 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg, vytas joined 01:00 Spot__ left 01:01 timeless left 01:02 sammers joined 01:03 tbrowder left 01:07 Spot__ joined, timeless joined 01:12 mcmillhj joined 01:15 tbrowder joined 01:17 mcmillhj left, AndyBotwin joined 01:18 AndyBotwin left 01:19 AndyBotwin joined
grondilu m: given rand { say abs($_ - [/] .Rat.nude) < $*TOLERANCE } 01:23
camelia rakudo-moar d8309d: OUTPUT«False␤»
grondilu m: given rand { say abs($_ - [/] .Rat.nude) }
camelia rakudo-moar d8309d: OUTPUT«2.83315068627665e-08␤»
01:25 mcmillhj joined 01:29 zakharyas joined 01:30 mcmillhj left
BenGoldberg m: given rand { my $r = int($_ * 2**64) / 2**64; ($r - .Rat).abs.say } 01:33
camelia rakudo-moar d8309d: OUTPUT«Cannot invoke this object (REPR: P6int; int)␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: given rand { my $r = int($_ * 2**64) / 2**64 }
camelia rakudo-moar d8309d: OUTPUT«Cannot invoke this object (REPR: P6int; int)␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: my $r = int(rand * 2**64) / 2**64;
camelia rakudo-moar d8309d: OUTPUT«Cannot invoke this object (REPR: P6int; int)␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg d'ohs. 01:34
m: my $r = (rand * 2**64).Int / 2**64;
camelia ( no output )
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / 2**64; ($r - .Rat).abs.say }
camelia rakudo-moar d8309d: OUTPUT«0.00000019810372627905␤»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / **64; ($r - .Rat).abs.say; ($r - .Num).abs.say } 01:35
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ven rand { my $r = ($_ * 2**64).Int / **7⏏0564; ($r - .Rat).abs.say; ($r - .Num).abs␤ expecting any of:␤ infix␤ infix stopper␤ …»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / **64; ($r - .Rat).abs.say; ($r - .Num).abs.say; }
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ven rand { my $r = ($_ * 2**64).Int / **7⏏0564; ($r - .Rat).abs.say; ($r - .Num).abs␤ expecting any of:␤ infix␤ infix stopper␤ …»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / **64; ($r - .Rat).abs.say; say ($r - .Num).abs; }
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ven rand { my $r = ($_ * 2**64).Int / **7⏏0564; ($r - .Rat).abs.say; say ($r - .Num)␤ expecting any of:␤ infix␤ infix stopper␤ …»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / **64; ($r - .Rat).abs.say; say '?'; }
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ven rand { my $r = ($_ * 2**64).Int / **7⏏0564; ($r - .Rat).abs.say; say '?'; }␤ expecting any of:␤ infix␤ infix stopper␤ post…»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / **64; ($r - .Rat).abs.say; }
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ven rand { my $r = ($_ * 2**64).Int / **7⏏0564; ($r - .Rat).abs.say; }␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / 2**64; ($r - .Rat).abs.say }
camelia rakudo-moar d8309d: OUTPUT«0.0000004221103526471␤»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / 2**64; ($r - .Rat).abs.say; ($r - .Num).abs.say } 01:36
camelia rakudo-moar d8309d: OUTPUT«0.00000011332294994922␤0␤»
BenGoldberg m: given rand { my $r = ($_ * 2**64).Int / 2**64; $r.nude.say; ($r - .Rat).abs.say; ($r - .Num).abs.say }
camelia rakudo-moar d8309d: OUTPUT«(7201356454038487 36028797018963968)␤0.000000042983915584652␤0␤»
BenGoldberg considering that it's not hard to create a Rat which is numerically equal to a given Num, why does .Rat on a Num *not* create such a Rat, and instead make a coarse approximation? 01:39
geekosaur because given any chance at all, the denominator of a Rat will become arbitrarily large 01:41
clamping their sizes early and keeping them small keeps Rats usable 01:42
otherwise you're going to have "simple" operations that take unexpectedly long 01:43
(iirc the coarse approximation was specifically added because this was happening)
01:50 mcmillhj joined 01:54 cpage__ left
shin_ m: my %a = ('shell',True , 'weight',2 , 'origin','animal'); my %t = ('shell',{False}, 'weight',(* * .95)); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key}($value) !! $value } 01:54
camelia rakudo-moar d8309d: OUTPUT«(shell => False origin => animal weight => 1.9)␤»
01:55 mcmillhj left
shin_ hi.... a question about syntax: (* * 0.95); The first *, what does exactly represents? Can i assign it to a variable inside the code block? 01:55
lucasb_ * is Whatever, a special object 01:56
in this context, * creates WhateverCode's
(* + 10) is shorthand for -> $x { $x * 10 }
shin_ m: my %a = ('shell',True , 'weight',2 , 'origin','animal'); my %t = ('shell',{False}, 'weight',(my $x = *; return $x * .95)); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key}($value) !! $value }
camelia rakudo-moar d8309d: OUTPUT«Cannot resolve caller Numeric(Whatever: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
01:58 cdg joined
shin_ let's say i need to process this * value in a loop.... how can i do it without having it contained in a variable? 01:58
lucasb_ forget about "*" for a while. design a simple subroutine that receives one argument 02:00
02:00 cyphase left
lucasb_ "*" is just syntatic sugar. you can translate your subroutine to use "*" later 02:01
02:01 cdg left
skids * is really for shorter bits than you're trying. 02:01
02:01 cdg joined 02:02 cyphase joined
shin_ m: my %a = ('shell',True , 'weight',2 , 'origin','animal'); my %t = ('shell',{False}, 'weight',{$_ * .95}); say do for %a.kv -> $key, $value { $key => %t{$key}:exists ?? %t{$key}($value) !! $value } 02:03
camelia rakudo-moar d8309d: OUTPUT«(shell => False origin => animal weight => 1.9)␤»
shin_ i see... thanks!
02:05 BenGoldberg left
ShimmerFairy Is there a way I can ask a routine what routines it can call? Specifically it'd be nice to have a tool that analyzed a grammar and told me where I could perhaps eliminate single-use subrules, for instance. 02:09
02:09 nadim_ left
ShimmerFairy In my mind, something like my token foo { <&a> <&b> }; say &foo.subrules; # gives back a list with the &a and &b routines 02:10
02:10 rgrinberg left
MasterDuke i don't know about for tokes/rules, but in the general case doesn't that require solving the halting problem? 02:10
ShimmerFairy MasterDuke: yeah, the only reason I asked for the general case is because 'token's are just a kind of Routine :) 02:11
I could always write an NQP-level tool that ~somehow~ hooks into the P6 AST and pulls out the subrule calls, I just wonder if there are any hooks for that... 02:12
skids Maybe profile callgraphs? 02:13
02:14 eliasr left
MasterDuke kind of the inverse of callframe 02:14
ShimmerFairy skids: the only issue is that I don't want to run the grammar a bunch to see what happens. In my case I'm taking someone else's grammar written in a LTA grammar syntax (a BNF-ish thing), and it'd be nice to get a better picture of how to fix it up the P6 way :)
02:15 rgrinberg joined 02:16 lucasb_ left 02:22 cdg left 02:43 grondilu left, AndyBotwin left 02:45 pierre_ left 02:47 pierre_ joined
seatek If I have a class attributed named $.id -- I would like to assign a value to that from a method using a variable representing its name: like $var='id'; $!$var = 4 (where $!$var would be the $.id attribute) 02:54
I can't seem to figure this one out, or I'm getting rummy
02:54 bjz joined
seatek I thought that $!<<$var>> might do it 02:54
02:57 noganex joined, dj_goku left 02:58 mcmillhj joined
seatek m: class Cl { has Int $.id; method foo($key) { $!$key = 4; return $!id }} ; say Cl.foo('id'); 02:59
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Cl { has Int $.id; method foo($key) { $!7⏏5$key = 4; return $!id }} ; say Cl.foo('i␤ expecting any of:␤ infix␤ infix stopper␤ …»
02:59 noganex_ left
seatek m: class Cm { has Int $.id; method foo($key) { $!<<$key>> = 4; return $!id }} ; say Cl.foo('id'); 03:01
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ Cl used at line 1␤␤»
seatek m: class Cm { has Int $.id; method foo($key) { $!<<$key>> = 4; return $!id }} ; say Cm.foo('id');
camelia rakudo-moar d8309d: OUTPUT«Cannot modify an immutable Nil␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
03:01 zakharyas left, zakharyas joined 03:03 mcmillhj left
seatek oh and self.$var also doesn't work 03:04
03:05 pierre_ left 03:06 pierre_ joined, zacts left, zakharyas left
llfourn seatek: if the attribute is rw you can do self."$var"() = "whatever" 03:06
if it's not rw there may be a way to do it by an indirect lookup
(but I've been trying and can't seem to figure out one) 03:08
seatek i suppose i could create a "factory" to map column names to accessors from outside the object. I thought for sure there must be an easy way. I'll try the "rw" for now ! :) thanks llfourn
03:09 kaare_ joined
llfourn m: class Foo { has $.a is rw; method foo { self."a"() = "foo" }}; my $f = Foo.new; $f.foo; $f.a.say # for reference 03:10
camelia rakudo-moar d8309d: OUTPUT«foo␤»
llfourn you can also ask the class for it's attributes with .^attributes and set them using the MOP. 03:11
seatek wow... the self."$key"() = $whatever works 03:12
llfourn I'm not sure what you're up to. If you're doing a ORM or something using the MOP might be the solution.
seatek that's exactly what it is 03:13
llfourn unfortunetly the docs on that are a bit sparse
seatek sigh. i dont' know anything about the MOP, though I remember hearing about it over and over when I used to have to look up stuff with Moose
llfourn but if I were to do an ORM I would use EXPORTHOW to create a custom declarator. Intead of 'class { ... }' I would have 'table { ... }' etc 03:14
then has Int $.id is related(SomeOtherTable.field) 03:15
seatek Well, I'm not doing an exact map to the database and keeping things pure and separated. I honestly really dont' like ORMs ;)
03:16 pierre_ left
llfourn me too :) 03:16
I don't like ORMs but if I did one I'd use the MOP :)
seatek yeah I feel like it's really wasting horsepower
it's so strange that this works: self."$key"() = $val but this doesn't: self.$key = $val 03:17
and this doesn't even work: self."$key" = $val 03:18
i'm not the only one who's insane
llfourn yeah I'm sure there's a good reason why. I just don't know what it is.
seatek: no. If you look for long enough in irc logs you will find me asking the same question here about a year ago. 03:19
seatek llfourn, well i'll just have to feel in good company then :)
03:19 zengargoyle joined
seatek did you stick with the verbose self."$key"() solution for what you needed? 03:20
llfourn yep as far as I remember
seatek k
03:22 BenGoldberg joined
llfourn seatek: btw the self."$var"() is for methods generally, not just attributes. 03:22
geekosaur the problem is that there is no direct syntax for accessing a "has" variable based on self. you can access methods, which is why the "name"() works, and accessor methods are autogenerated for "has" variables
llfourn when you set 'is rw' on the $.a variable it makes the public accessor method return a writ...yeah ^^
seatek ah ok that makes sense now 03:23
03:23 zengargoyle left
seatek geekosaur, is there some way to do a $!$var to access an attribute? 03:24
geekosaur otherwise it would be self!foo to access a thing defined `has $.foo'. I don't know offhand if there's an indirect syntax for that
03:24 pierre_ joined
geekosaur (also a sigil in that somewhere but I don't recall where. $self!foo I think?) 03:24
llfourn self!foo is for private methods only I think 03:25
there isn't a way of getting $!attr-name at runtime other than through the MOP 03:26
geekosaur no, there is something like that --- consider that you can write your own accessors, and therefore need *some* way to access the actual private variable other than the accessor
llfourn $!attr is the way?
geekosaur I thought there was a self-type one (but restricted in use)
but, maybe
thing is, this is perl. "restricted" is not usually a hard restriction
llfourn maybe I'm not 100% sure. 03:27
geekosaur "you shouldn't do this (so we made it harder)" is preferred to "you can't do this"
03:27 zengargoyle joined
seatek well, self!$key gives Cannot use this form of method call with a private method 03:27
geekosaur ok, so I guess that is always methods.
seatek and self.$key gives No such method 'CALL-ME' for invocant of type 'Str' 03:28
llfourn yeah I'm pretty sure $!attr is the only way and that is just compile time sugar
so you can't do ::('$!attr') etc
03:29 pierre_ left
seatek you can use variable names from outside the scope of the object though yes? like $myClass.$myAttribute = 4 03:30
geekosaur not as variable names, no; that's what accessor methods are for (including the rw version) 03:31
llfourn seatek: not really. just $myClass.myAttributeWithisrw = 4
seatek but what if I need to call attribute assignements, or method names, based on an array of names for those methods or attributes 03:32
geekosaur the $foo."$dynmethod"() syntax is for that 03:33
seatek like @methods = ('methodName1', 'methodName2')
llfourn for @methods { $object."$_"() } # example 03:34
03:34 mcmillhj joined
seatek bah back that :) 03:34
llfourn yes it's consistent ;)
seatek it's crazy! but i'll take it :)
yeah no benefit to using a factory to make them from the outside then 03:36
llfourn++
geekosaur++ 03:37
03:39 mcmillhj left 04:04 mcmillhj joined 04:06 khw left 04:07 zacts joined 04:09 mcmillhj left 04:10 Alikzus left, dj_goku joined, Actualeyes left, Actualeyes joined 04:14 pierre_ joined 04:18 bjz left 04:19 BenGoldberg left 04:24 Alikzus joined 04:26 Actualeyes left 04:30 mcmillhj joined 04:35 mcmillhj left 04:38 wamba joined 04:40 shin_ left 04:45 Actualeyes joined 04:53 Cabanossi left 04:56 Cabanossi joined, AlexDaniel left 04:58 mcmillhj joined, skids left 05:01 pierre_ left 05:03 mcmillhj left 05:08 pierre_ joined 05:09 mcmillhj joined 05:12 pierre_ left 05:14 mcmillhj left 05:40 amalia_ left 05:41 bjz joined 05:45 neuraload joined, amalia_ joined 05:50 mcmillhj joined 05:51 wamba left 05:54 domidumont joined 05:55 mcmillhj left 05:59 domidumont left 06:00 domidumont joined 06:08 rgrinberg left 06:09 mcmillhj joined, pierre_ joined 06:13 mcmillhj left 06:14 pierre_ left 06:21 pierre_ joined 06:26 b2gills left 06:27 b2gills joined 06:35 abraxxa joined 06:36 cpage__ joined 06:39 mcmillhj joined, perlawhirl left 06:43 mcmillhj left 06:51 seatek left 06:58 mcmillhj joined, brrt joined 07:02 wamba joined, mcmillhj left 07:04 zakharyas joined 07:08 mcmillhj joined 07:09 mr-foobar joined 07:12 mcmillhj left 07:16 bjz_ joined 07:17 bjz left 07:26 rindolf joined 07:28 mcmillhj joined
dalek c: a9f837c | (Sterling Hanenkamp)++ | doc/Type/List.pod6:
Fix #382: Add docs for cross and X

Also documents the :&with parameter to zip.
07:28
c: f29d2a8 | RabidGravy++ | doc/Type/List.pod6:
Merge pull request #940 from zostay/cross

Fix #382: Add docs for cross and X
07:29
07:31 pmurias joined
dalek c: 8b788ba | (Sterling Hanenkamp)++ | doc/Type/Signature.pod6:
Fix #914: An attempt to clarify slurpy conventions
07:32
c: 904bcb8 | RabidGravy++ | doc/Type/Signature.pod6:
Merge pull request #939 from zostay/better-slurpiness

Fix #914: An attempt to clarify slurpy conventions
07:32 mcmillhj left 07:33 RabidGravy joined
dalek c: e55b772 | (Sterling Hanenkamp)++ | doc/Language/classtut.pod6:
Fix #889: Nix "previous chapters" sentence

Looked to see if "chapter" occurred anywhere else too. It did not.
07:34
c: b074734 | RabidGravy++ | doc/Language/classtut.pod6:
Merge pull request #938 from zostay/nix-previous-chapters

Fix #889: Nix "previous chapters" sentence
c: e94ccc8 | (Sterling Hanenkamp)++ | doc/Type/Proc.pod6:
Fix #913: Add documentation for shell and command

Also correct a few other tidbits.
07:36
c: b7cdcfe | RabidGravy++ | doc/Type/Proc.pod6:
Merge pull request #937 from zostay/proc-command

Fix #913: Add documentation for shell and command
07:42 _slade_ left 07:45 wamba left 07:48 dogbert17 left 07:50 wamba joined 07:56 mcmillhj joined 07:59 sftp left, sftp joined 08:00 ocbtec joined 08:01 mcmillhj left, jonas1 joined 08:05 rindolf left 08:11 wamba left 08:19 dakkar joined 08:31 mcmillhj joined
brrt perl6 at least is useful for teaching encryption: www.promptworks.com/blog/public-keys-in-perl-6 08:34
08:36 mcmillhj left 08:43 nadim_ joined 08:44 eliasr joined 08:45 woolfy joined 08:47 mcmillhj joined 08:53 mcmillhj left 08:57 wamba joined 09:04 rindolf joined 09:06 mcmillhj joined, canopus left 09:11 mcmillhj left 09:13 canopus joined 09:15 g4 joined, g4 left, g4 joined 09:22 inokenty left
dalek c: b101e5e | gfldex++ | doc/Type/List.pod6:
remove doc for sub cross because ENOSPEC (issue #165 on roast)
09:22
09:37 inokenty joined, MorayJ joined
dalek c: 6e53106 | gfldex++ | doc/Type/Proc.pod6:
fix typo
09:39
tatata can a function take a phaser as an argument? 09:42
gfldex no, phasers are not objects you can get a hold of. 09:43
tatata or any other synthactical elements
psch labels can be arguments
tatata I was wandering if it could be with some hackery, due to perl parsing himself 09:44
brrt (let's reify phasers :-P) 09:45
timotimo well, actually ... 09:46
gfldex m: sub f(&p){ say 'foo'; ENTER = &p }; f({say 'bar'});
camelia rakudo-moar d8309d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix = instead␤at <tmp>:1␤------> 3sub f(&p){ say 'foo'; ENTER =7⏏5 &p }; f({say 'bar'});␤»
gfldex m: sub f(&p){ say 'foo'; ENTER &p }; f({say 'bar'}); 09:47
camelia rakudo-moar d8309d: OUTPUT«foo␤»
timotimo a phaser is really just a little callable that gets installed in a specific slot
that gives it the phasery meaning
gfldex m: sub f(&p){ say 'foo'; ENTER p }; f({say 'bar'});
camelia rakudo-moar d8309d: OUTPUT«bar␤foo␤»
timotimo i think you can get the phasers out. you can't get phasers in after the fact, though
gfldex m: sub f(&p){ dd ENTER p }; f({say 'bar'});
camelia rakudo-moar d8309d: OUTPUT«bar␤Bool::True␤»
tatata I am having some fan, so I was wondering if it was possible to implement something like: for bla, bla, bla { when ("foo" or gotta LAST) { } } 09:48
gfldex well, I think you can get them in but I would not wonder if there are odd bugs, because nobody did that before.
psch m: sub f { }; BEGIN &f.add_phaser('ENTER', { say "hi" }); f()
camelia ( no output )
tatata it should be possible with a macro, because i can when ("foo" or LAST {say "ciao";} ) 09:49
psch BEGIN is already to late or something
tatata whell maybe no
psch or maybe you need a nqp-levle codeobj, i'm not sure
timotimo tatata: you can .rotor with :partial and then check if the tuple has only one argument; in that case you're on the last iteration
gfldex ENTER and LEAVE can be emulated with .wrap
timotimo thing is, you have to consume an additional value from the iterator to know if you've reached the end yet
rotor does that for you
tatata timotimo: yeah, true 09:50
cannot time travel with when
timotimo rotor is one of the more amazing built-ins 09:52
tatata agreed 09:53
but it fits a different paradigm, I think, from the phasers "comefrom" aura
like I would see it fit perfectly in the R programming language 09:54
when I do perl I like to program in "natural language mood"
09:55 zakharyas left
timotimo you could call it "comefrom aura", or you could be fancy and say "aspect oriented programming" :) 09:56
10:08 pierre_ left 10:09 pierre_ joined
tatata comefrom is a funny name :) 10:09
10:12 pierre_ left, MorayJ left 10:13 perlawhirl joined, pierre_ joined
tatata when macro will be implemented, will them be able to analyze the synthactic context where they are called? (thinking of AI driven AST generation) 10:14
10:14 MorayJ joined
tatata (sorry for my english) 10:14
timotimo one use case for macros is checking "stuff", so it's probably a thing that'll be possible somehow 10:15
10:17 pierre_ left 10:25 aries_liuxueyang left 10:26 aries_liuxueyang joined
firefish5000 I found most (I hope), of the lists I need to explicitly flatten now. Script now has run-time errors but debug output is a lot closer to the original. 10:28
Calling it a night. Hopefully tomorrow my p6 instincts will kick in and I will get the last few kinks out of my code. Good night! 10:30
timotimo gnite :)
RabidGravy jnthn, did you ever get anywhere with that STOMP client you were making a while back?
it's for a thing ;-)
10:30 firefish5000 left
jnthn RabidGravy: Haven't had chance to work on it for ages. But the client got to the point of being able to subscribe to queues, and it could send messages too 10:33
Didn't really get anywhere far with the server
github.com/jnthn/p6-stomp
RabidGravy :) I'll take a look later, it seems to be what most people are using with ActiveMQ which is having a resurgence in popularity 10:35
but it would be cool to make a message broker in Perl 6 10:38
10:40 wamba left
jnthn Yeah, that was kinda where I was going with the STOMP::Server :) 10:40
But ended up too tired to work on it for a while, then got distracted doing Docker::File and HTTP::HPACK :) 10:41
stmuk_ "convo down the pub" type evidence has usually been anti-ActiveMQ 10:44
brrt what is against it? 10:45
RabidGravy yeah, I've never heard anyone say nice about it, but it's mostly a vague dislike rather than anything specific
brrt oh okay 10:46
10:46 pierre_ joined
stmuk_ I've just heard moans about it not working (just anecdotal) maybe it's been broken in the past or its just hard to config 10:46
RabidGravy I think it's probably the first-generation opensource MQ broker thing, it's a bit "enterprisey" for some people :) 10:47
stmuk_ I'm sure its explained in the "white paper" or "webinar" :)
RabidGravy I was also thinking about Tibco this morning for some reason, I must be sickening for something 10:48
10:48 wamba joined
stmuk_ that's a name I've not heard this century 10:49
RabidGravy I've worked with it twice this century 10:50
10:50 labster left
stmuk_ wikipedia thinks its bacteria 10:50
10:51 pierre_ left
RabidGravy infact a Tibco management thingy was what got me into DB in the first place 10:54
stmuk_ maybe its use is affecting their share price :) 10:56
10:56 ocbtec left 10:58 ocbtec joined
DrForr Ohhh, TIBCO. Fun times. 11:07
timotimo .o( isn't that what emacs used to be built on ... :P ) 11:08
stmuk_ haha 11:10
timotimo that'd be teco, right?
11:14 rindolf left 11:20 rindolf joined 11:23 brrt left 11:26 brrt joined 11:28 raoulvdberge joined 11:30 user9 left, user9 joined 11:32 brrt left 11:35 brrt joined 11:43 rgrinberg joined 12:04 itaipu joined 12:18 Actualeyes1 joined, Actualeyes left
masak when I was on FreeDOS long ago, I was using an Emacs that ran on TECO or one of its variants. 12:22
timotimo watches the nixie tube manufacturing process video 12:30
pmurias masak: what's the reason for using FreeDOS? 12:31
masak long ago? curiosity, and some sort of fierce independence from commercial operating systems on the PC platform. 12:32
RabidGravy yeah, I used to use FreeDOS too 12:42
12:45 aries_liuxueyang left 12:46 aries_liuxueyang joined
jonadab I didn't know FreeDOS was that old. I only found out about it years after switching to Linux, in the context of running DOS in an emulator to use old software. 12:46
Must've been 2000 or later before I knew FreeDOS existed. 12:47
timotimo i ... i've used dosbox in the past! ... 12:48
masak dosbox is nice 12:49
12:51 itaipu left, wamba left 12:54 lucasb_ joined
gfldex m: sub bench(&c){ LEAVE now - (ENTER now); c } 12:57
camelia rakudo-moar 7a50c3: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "now - (ENTER now)" in sink context (line 1)␤===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
gfldex m: sub bench(&c){ LEAVE say now - (ENTER now); c }
camelia rakudo-moar 7a50c3: OUTPUT«===SORRY!===␤Cannot reference undeclared local 'enter_result__1'␤»
gfldex LTA or bug?
moritz bug
lizmat and already reported, afaik 12:58
12:58 mcmillhj joined
lucasb_ RT 129801 13:01
gfldex thanks to all of you :) 13:02
gfldex .oO( How many Perl 6-devs does it take to name a bug. )
timotimo naming is one of the fundamental hard problems in compsci 13:03
RabidGravy hmm there doesn't appear to be a module that wraps 'sendmail', I think that needs to be remedied
lizmat
.oO( what were they thinking calling it compsci :-)
RabidGravy rjbs, fancy helping make an Email::Sender for P6? 13:04
masak .oO( what were they thinking calling it "naming"? )
RabidGravy ... (WHAT?)
rjbs RabidGravy: In theory, but I don't think I can responsibly make any time for it any time soon :( 13:05
but I can at least answer any specific questions that might help
RabidGravy please feel free to jump in on github.com/perl6/perl6-most-wanted/pull/34 :) 13:07
gfldex m: my \l = gather loop { my $value = (42, "answer").roll; try { take $value.Int } }; my $start = now; say [+] l[^1000]; say now - $start; 13:09
camelia rakudo-moar 7a50c3: OUTPUT«42000␤0.4023808␤»
gfldex m: my \l = gather loop { my $value = (42, "answer").roll; take $value.Int if $value ~~ /^\d+$/ }; my $start = now; say [+] l[^1000]; say now - $start;
camelia rakudo-moar 7a50c3: OUTPUT«42000␤0.0857317␤»
gfldex m: my \l = gather loop { my $value = (42, 42, 42, 42, 42, "answer").roll; try { take $value.Int } }; my $start = now; say [+] l[^1000]; say now - $start;
camelia rakudo-moar 7a50c3: OUTPUT«42000␤0.1372147␤»
gfldex m: my \l = gather loop { my $value = (42, 42, 42, 42, 42, 42, 42, 42, 42, 42, "answer").roll; try { take $value.Int } }; my $start = now; say [+] l[^1000]; say now - $start;
camelia rakudo-moar 7a50c3: OUTPUT«42000␤0.08890797␤»
gfldex if it's very likely that .Int works, try { .Int } is much faster then the match. 13:10
hackedNODE
.oO( premature optimization is the root of all evil )
13:11
gfldex maybe promoting Range.is-int to Cool.is-int may provide a speed up in quite a few programs
lucasb_ I just run into this ticket about reduce with a single argument 13:12
timotimo but is-int is only about "is this a range of ints"
not "is this thing an int"
lucasb_ RT 128757 and 128758
I'm not sure I fully agree 13:13
psch #128757 #128758
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128757
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128758
hackedNODE psch++
lucasb_ when I say "[+] 'hi'", does reduce knows that the operator can be called as a unary? 13:14
I think this goes against the convention in other languages. but if it's perlish, then ok
brrt no, reduce is always binary
psch m: [&( $^a ~ $^b )] 'hello'
camelia rakudo-moar 4e12d1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use placeholder parameter $^a in the mainline␤at <tmp>:1␤------> 3[&( $^a7⏏5 ~ $^b )] 'hello'␤»
moritz brrt: no 13:15
psch m: [&({ $^a ~ $^b })] 'hello'
camelia rakudo-moar 4e12d1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3[&({ $^a ~ $^b })]7⏏5 'hello'␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ s…»
brrt what
perlpilot lucasb_: are you asking because ...
m: say [+] 5;
camelia rakudo-moar 4e12d1: OUTPUT«5␤»
perlpilot ?
brrt (moritz: i'm curious)
moritz m: say ([+]), ([*])
camelia rakudo-moar 4e12d1: OUTPUT«01␤»
psch eugh, forgot that syntax again :l
brrt m: say [+] 5,6;
camelia rakudo-moar 4e12d1: OUTPUT«11␤»
moritz brrt: first of all it uses the nullary argument for default element
brrt uhuh….
moritz brrt: and then I think it doesn't call anything for the unary case 13:16
lucasb_ for example, in common lisp: (reduce #'+ '("hello")) ;=> "hello"
moritz that's useful for autovification
lucasb_ it doesn't raise an error, because there's only one argument
perlpilot m: say [~] "hello";
camelia rakudo-moar 4e12d1: OUTPUT«hello␤»
moritz m: my %h; %h<a> *= 42; say %h
camelia rakudo-moar 4e12d1: OUTPUT«{a => 42}␤»
moritz m: my %h; %h<a> += 42; say %h
camelia rakudo-moar 4e12d1: OUTPUT«{a => 42}␤»
lucasb_ "+" means { $^a + $^b }, but it also has its unary multi 13:17
moritz how does it know that the default value for + is 0, and for * it's 1? by calling infix:<+>() and infix:<*>()
lucasb_ m: say reduce { $^a + $^b }, 'oh'
camelia rakudo-moar 4e12d1: OUTPUT«oh␤»
brrt okay, but I may have misparsed lucasb_'s question, which I thought was 'can the reduce op use unary +'
psch m: say reduce { $^a + $^b }, ('oh',)
camelia rakudo-moar 4e12d1: OUTPUT«oh␤»
moritz reduce on a one-element list is a no-op
brrt m: +'foo';
camelia rakudo-moar 4e12d1: OUTPUT«WARNINGS for <tmp>:␤Useless use of "+" in expression "+'foo'" in sink context (line 1)␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actu…»
brrt m: say +'foo';
camelia rakudo-moar 4e12d1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
brrt m: say +'42'; 13:18
camelia rakudo-moar 4e12d1: OUTPUT«42␤»
lucasb_ moritz: I wish it was a no-op, but it's not! it calls the unary multi
[+] 'hi' # this raises an error
brrt … and that, I find really surprising
moritz lucasb_: I was takling about &reduce, not [] 13:19
13:19 gregf_ joined
moritz m: say [+] 'foo' 13:19
camelia rakudo-moar 4e12d1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
lucasb_ moritz: I thought reduce and [+] meant the same thing
moritz lucasb_: the don't
lucasb_: for example, [] is smarter about associativity 13:20
lucasb_ m: say reduce &infix:<+>, 'oh'
camelia rakudo-moar 4e12d1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5oh' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
moritz m: say [**] 2, 3, 3
camelia rakudo-moar 4e12d1: OUTPUT«134217728␤»
moritz m: say reduce &infix:<**>, 2, 3, 3
camelia rakudo-moar 4e12d1: OUTPUT«134217728␤»
moritz hrmpf
m: say [**] 2, 3, 4; say reduce &infix:<**>, 2, 3, 4
camelia rakudo-moar 4e12d1: OUTPUT«2417851639229258349412352␤2417851639229258349412352␤»
moritz ... or maybe I'm wrong 13:21
m: say (2**3)**4
camelia rakudo-moar 4e12d1: OUTPUT«4096␤»
moritz m: say 2**(3**4)
camelia rakudo-moar 4e12d1: OUTPUT«2417851639229258349412352␤»
moritz m: say reduce &infix:<+>, 'foo'
camelia rakudo-moar 4e12d1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
moritz ok, they seem to be the same thing, and I was wrong all along 13:22
perlawhirl moritz: it appears that reduce with a block does no-op on one-elem lists tho 13:23
m: say ("hellow").reduce({ $^a + $^b })
camelia rakudo-moar 4e12d1: OUTPUT«hellow␤»
psch m: say ("foo",).reduce({ die $^a ~ $^b }) 13:24
camelia rakudo-moar 4e12d1: OUTPUT«foo␤»
psch m: say ("foo",).reduce({ die $^a })
camelia rakudo-moar 4e12d1: OUTPUT«foo␤ in block <unit> at <tmp> line 1␤␤»
moritz m: say &infix:<+>('foo')
camelia rakudo-moar 4e12d1: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch well, at least it does an arity check
moritz oh, that might be it
it might check if it can call the block with all the elements 13:25
psch m: say ("foo",).reduce( -> $, $? { die })ell,
camelia rakudo-moar 4e12d1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say ("foo",).reduce( -> $, $? { die })7⏏5ell,␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
moritz and if yes, it does that
psch m: say ("foo",).reduce( -> $, $? { die })
camelia rakudo-moar 4e12d1: OUTPUT«Died␤ in block <unit> at <tmp> line 1␤␤»
lucasb_ my understanding is that P6 tries to be "smarter" about knowing when to call the 1-arg or 2-args multis
13:25 skids joined
perlpilot psch++ nice, clear examples 13:25
lucasb_ that was what surprised me
psch (he said, right before the horribly butchered examples came)
moritz and if not, it falls back to a 2ary reduce
lucasb_ but I can live with that :)
perlpilot psch: I can take it back if you like :)
psch perlpilot: i don't mind either way, honestly :) 13:26
perlpilot psch++ you have the Perl mind ;)
13:27 seatek joined
lucasb_ soo... the conclusion is that it's intended to be this way, then? 13:28
psch dunno, "reducer has wrong arity for reducee" kind of makes sense as an error, to me at least 13:29
m: say <foo bar>.reduce({$^a ~ ": " ~ $^b ~ $^c}) 13:30
camelia rakudo-moar 4e12d1: OUTPUT«foo␤»
psch the current behavior is somewhat weird in other edge cases apparently...
i mean, reducing a 2 elem list with a 3ary function should either complain or give me the whole original list
not just the first element
lucasb_ psch: yes, interesting example yours 13:31
13:31 brrt left
pmurias jnthn: is nqp::attrinited supposed to work on native attributes? 13:31
13:32 rgrinberg1 joined, perlawhirl left 13:33 rgrinberg left
lizmat pmurias: pretty sure it can't 13:33
13:39 gregf_ left
lucasb_ m: gist.github.com/anonymous/ac4518ae...e66d2bfa05 13:39
camelia rakudo-moar 4e12d1: OUTPUT«0␤1␤2␤2␤» 13:40
lucasb_ if the concept of reduce was extended to 1-ary operators, maybe it could be extended arbitrarily for N-ary operators. I think that would be the perlish way, maybe
jnthn pmurias: no 13:41
lucasb_ oh, nevermind. maybe it doesn't make any sense :D 13:42
thanks everybody for the discussion 13:43
13:44 leego joined 13:47 gregf_ joined 13:50 xinming left 13:51 xinming joined 13:52 acrussell joined 13:56 grondilu joined 13:57 gregf_ left
woolfy Perl got a devroom at FOSEM!!! I will send out requests for talk proposals in the near future. Me happy. 13:57
grondilu off-topic: Latest numberphile video is pretty neat: www.youtube.com/watch?v=4k1jegU4Wb4
13:58 bjz_ left
masak .oO( we found a way to get rid of those pesky Developers! result: FOSEM ) 13:59
grondilu m: sub γ($n) { log($n) R- [+] 1 X/ 1..$n }(100).say
camelia rakudo-moar 4e12d1: OUTPUT«0.582207331651531␤»
grondilu m: sub γ($n) { log($n) R- [+] 1 X/ 1..$n }(1000).say
camelia rakudo-moar 4e12d1: OUTPUT«0.577715581568208␤»
hackedNODE woolfy++ 14:00
tbrowder good morning (US CDT) p6 people...
hackedNODE m: sub { say "good $^time"
camelia rakudo-moar 4e12d1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub { say "good $^time"7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modifier loop␤»
hackedNODE I suck at cute greetings >_< 14:01
m: sub { say "good $^time" }(<morning afternoon evening night prevening>.any)
camelia rakudo-moar 4e12d1: OUTPUT«good morning␤good afternoon␤good evening␤good night␤good prevening␤»
woolfy Masak: FOSDEM! sORRY. 14:02
Grr CapsLock...
masak no, I'm the one who's sorry :P 14:03
14:03 mcmillhj left, mcmillhj joined
masak woolfy: anyway, excellent news that Perl got a devroom! :D 14:03
tbrowder i'm trying to clean up a p6 module for release and would like som advice on error handling. at tha moment i am mostly following the p 5 module i base it on and return with no value for most prblems. but i'm looking at our p6 Control::Bail and wonder if that is the way to go for most any problem with input arg errors or other problems with user data. 14:05
masak tbrowder: something like `die "Argument 'floof' cannot be negative" if $floof < 0;` is what I do :) 14:07
tbrowder i have added param constraints on many inputs and they cause an exception with a reasonable msg, but they are not alway appropriate.
hackedNODE uses fail instead
masak (though perhaps `unless` rather than `if` in the cases that makes the condition more natural. `unless` has the advantage that the condition gets stated in terms of what you want, not what you reject.)
perlpilot too
masak: why do you use die instead of fail? 14:08
masak I'm not a big fan of `fail` for some reason. I like early errors.
perhaps because I'm not writing a lot of multithreaded stuff, where failure in one thread messes up the whole thing.
"fail early" is just a thing I like. it helps me.
I find that robust programs tend to be those that went through a lot of early failing until they found a balance in which all they accept is correct inputs. 14:09
with `fail`, all I get is a disconnect between where the program started to go wrong and where the failure manifests.
hackedNODE But where program started to go wrong would usually be some module author XYZ wrote. 14:11
And "died in Some/Code/You/Never/HearOf.pm6" isn't too useful
perlpilot it's useful for assigning blame :)
tbrowder any difference to caller between fail and die? how about use of note and warn for advisories?
hackedNODE m: sub foo { die "wat" }; sub bar { foo }; sub meow { bar }; meow 14:12
camelia rakudo-moar 832764: OUTPUT«wat␤ in sub foo at <tmp> line 1␤ in sub bar at <tmp> line 1␤ in sub meow at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE Well, at least in Perl 6 you get a nice trace
perlpilot tbrowder: fail is a value you can pass up the call chain, die is immediate program death.
tbrowder okay, thanks 14:13
14:13 khw joined
tbrowder m: sub f {fail 'wat'}; sub b { f }; sub m { b}; m 14:16
camelia rakudo-moar 832764: OUTPUT«wat␤ in sub f at <tmp> line 1␤ in sub b at <tmp> line 1␤ in sub m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
14:16 wamba joined
tbrowder up to now i usually add "FATAL: msg..." to my die statements that i believe highlights the failure 14:19
pmurias jnthn: thanks, nqp::attrinited was accidently working as != 0 on native int attributes on moar and got me confused ;)
hackedNODE tbrowder: and failure is a value you can defuse 14:20
tbrowder i've always thought the defaults for warn and die should be to prefix the msg with the name of the routine in caps 14:21
hackedNODE m: sub f {fail 'wat'}; sub b { f }; sub m { b}; m or say "something fishy in 'ere";
camelia rakudo-moar 832764: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ or used at line 1␤␤»
hackedNODE m: sub f {fail 'wat'}; sub b { f }; sub m { b}; m() or say "something fishy in 'ere";
camelia rakudo-moar 832764: OUTPUT«something fishy in 'ere␤»
14:21 FROGGS joined
tbrowder m: say 'something fishy' 14:22
camelia rakudo-moar 832764: OUTPUT«something fishy␤»
FROGGS o/
tbrowder difference in msg?
hackedNODE ? 14:23
tbrowder never mind, not reading correctly...
jnthn pmurias: oops :) 14:26
14:26 acrussell left
tbrowder thanks all, i will experiment a bit more with the view from the caller, but at the moment i think i will use fail. 14:27
break, break: i have found over the years my most-used p5 book was the cookbook. i would love to see a start of one on our docs. if the oreilly folks and the authors of the p5 cookbook approved, we could just start essentially a dup of its organization but substitute p6 solutions. one of the difference to me between the cookbook and other presentation is the 14:32
excellent organization of the topics and the laser view of typical use cases.
hackedNODE Well, the best way to have that realized is to start it and see if anyone else joins the effort :) 14:33
14:34 gregf__ joined
tbrowder the problem to me is the license/permissions first before it could be started 14:34
otherwise i would start in
perlpilot tbrowder: the cookbook is tchrist's baby, just ask him
tbrowder anyone know him personally? 14:35
gfldex i believe there is a Perl 6 cookbook already 14:37
tbrowder where?
gfldex search.cpan.org/~szabgab/Perl6-Cook...ookbook.pm
examples.perl6.org/categories/cookbook.html
tbrowder if there
gfldex szabgab.com/perl-6-cookbook.html
the examples actually got content :) 14:38
14:38 Actualeyes1 left, ocbtec left, jonas1 left, RabidGravy left, cyphase left, Spot__ left, lizmat left, TimToady left, stmuk_ left, Dunearhp left, dalek left, Jonis left, imcsk8 left, ShimmerFairy left, dataangel left, buggable left, imcsk8 joined, Jonis joined 14:39 TimToady joined, jonas1 joined, ocbtec joined, hobbs joined, buggable joined
gfldex most of the examples are direct translations from Perl 5 and as a result not very 6-ish 14:39
14:39 cyphase joined, RabidGravy joined, dataangel joined, lizmat joined
gfldex m: for dir('not-there') { try { .Int } } 14:39
camelia ( no output )
14:39 hobbs left, hobbs joined, Actualeyes joined, ShimmerFairy joined
gfldex m: for dir('not-there') { .Int } 14:39
camelia rakudo-moar 832764: OUTPUT«Failed to get the directory contents of '/home/camelia/not-there': Failed to open dir: 2␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <…»
14:39 stmuk_ joined
gfldex should the try inside the for block catch the exception thrown by dir? 14:39
lizmat gfldex : I think so, this is one of those small but important differences between Perl 5 and Perl 6 14:40
then again, I may be utterly wrong :-) 14:41
hackedNODE m: for dir('not-there') { .^name.say }
camelia rakudo-moar 832764: OUTPUT«Failure␤»
gfldex i did not expect it to do that and circumventing it will be rather tricky
tbrowder dang, i have seen that!! i'll look into it a bit more. if tcrist and oreilly dont have a problem, i would like it to be but in a more visible spot for ease of access and hopefully more support
hackedNODE m: for die { try { } } 14:42
camelia rakudo-moar 832764: OUTPUT«5===SORRY!5===␤Function 'die' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3for die { try { } }7⏏5<EOL>␤Missing block (apparently claimed by 'die')␤at <tmp>:1␤------> 3for die { try { } }7⏏5<EOL>␤␤»
hackedNODE m: for die() { try { } }
camelia rakudo-moar 832764: OUTPUT«Died␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE So it's not catching. You get the failure, which explodes only when you call .Int
14:42 Dunearhp joined
hackedNODE m: for dir('not-there') { .sink; try { .Int } } 14:43
camelia rakudo-moar 832764: OUTPUT«Failed to get the directory contents of '/home/camelia/not-there': Failed to open dir: 2␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <…»
lizmat hmmm... I wonder whether it's some of my optimisations that caused this then
perhaps we should disect it 14:44
gfldex m: for dir('not-there') -> IO $_ { try { .Int } }
camelia rakudo-moar 832764: OUTPUT«Earlier failure:␤ Failed to get the directory contents of '/home/camelia/not-there': Failed to open dir: 2␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block <unit> at <tmp> line 1␤␤Final error:…»
14:44 erdic joined
hackedNODE You mean the die() should be captured by try block inside the for block? 14:44
lizmat *bisect
gfldex lizmat: please poke me when you got a conclusion. I would like to doc that. 14:45
14:47 wamba left
RabidGravy jnthn, well I looked at the STOMP thing and ... github.com/jnthn/p6-stomp/pull/1 14:48
gfldex i'm ok with that behaviour now. If a simple type check will catch it, it's easy enough to handle. And we should all type-check more often anyway, right?
14:48 acrussell joined
seatek Oh my gosh I love the "once" control flow keyword 14:50
14:50 Spot__ joined
gfldex seatek: did we doc what happens when one combines start and once? 14:51
seatek gfldex, not in /language/control you didn't -- under once at least
gfldex, are there dragons there too? 14:52
lizmat gfldex: would like to hear jnthn's view about this first :-)
gfldex i believe so, it should run the statement for the very first hit, not per thread
seatek but that sounds really hard to do
but yes, otherwise it's another lie ;) 14:53
jnthn RabidGravy: Commented, but also given you commit access :)
14:53 khw left
jnthn It doesn't do any concurrency control around the "is this the first hit", so there's a chance of a data race 14:54
seatek it's not documented in /routine/start either
14:56 neuraload left 14:57 sufrostico left
gfldex seatek: we did doc that already in /language/control 14:57
14:58 _4d47 joined
seatek did you just now put that in? was that there a minute ago?? ;) 14:58
RabidGravy jnthn, :)
gfldex jnthn: are phasers thread aware? 14:59
seatek once would be incredibly useful being thread-safe. :) but then again, so would a lot of things. 15:00
lizmat seatek: wrt to once, the question is really whether state variables are thread aware 15:01
once is just sugar for conditionally executing something depending on a (hidden) state variable
seatek i haven't looked into the multithread stuff at all yet, so i'm clueless 15:02
jnthn gfldex: Every phaser has its own rules around what can trigger it, so it's not evan an applicable question in many cases. In some cases they decidedly are, for example LAST phasers in whenever blocks have the mutual exclusion properly enforced. 15:04
gfldex: ENTER/LEAVE and related are per invocation record, and so threads don't even come into the question for those
15:10 khw joined 15:15 mcmillhj left 15:16 mcmillhj joined
_4d47 m: [] ~~ Cool 15:16
camelia ( no output )
_4d47 m: say ([] ~~ Cool) 15:17
camelia rakudo-moar a48e7a: OUTPUT«True␤»
gfldex .oO( Pretty much anything in Perl 6 is Cool )
hackedNODE m: .say for now ~~ Cool, Date.today ~~ Cool 15:18
camelia rakudo-moar a48e7a: OUTPUT«True␤False␤»
hackedNODE m: say Perl ~~ Cool
camelia rakudo-moar a48e7a: OUTPUT«False␤»
_4d47 I thought Cool was the base for numeric and strings but not composites
hackedNODE haha
_4d47: it's for stuff that can act as either string or number
_4d47 :-D
gfldex m: say {} ~~ Cool 15:20
camelia rakudo-moar a48e7a: OUTPUT«True␤»
gfldex blocks are cool too :)
hackedNODE That's a hash
m: say {;} ~~ Cool
camelia rakudo-moar a48e7a: OUTPUT«False␤»
gfldex :(
hackedNODE :)
gfldex m: say Block ~~ Cool 15:21
camelia rakudo-moar a48e7a: OUTPUT«False␤»
gfldex m: say Callable ~~ Cool
camelia rakudo-moar a48e7a: OUTPUT«True␤»
hackedNODE m: say Callable.^pun ~~ Cool 15:24
camelia rakudo-moar a48e7a: OUTPUT«False␤»
hackedNODE m: say role {} ~~ Cool
camelia rakudo-moar a48e7a: OUTPUT«True␤»
hackedNODE Apparently roles are just that cool :)
15:25 itaipu joined
hackedNODE m: use MONKEY-GUTS; say nqp::istype(role {}, Cool) 15:27
camelia rakudo-moar a48e7a: OUTPUT«1␤»
hackedNODE m: use MONKEY-GUTS; say nqp::istype(role {}, Whatever)
camelia rakudo-moar a48e7a: OUTPUT«0␤»
hackedNODE inturemesting
_4d47 m: say [1,2] + { foo => 1, bar => 2 } 15:32
camelia rakudo-moar 798c2e: OUTPUT«4␤»
_4d47 m: say [1,2] + { foo => 1, bar => 2 } + Callable 15:33
camelia rakudo-moar 798c2e: OUTPUT«Use of uninitialized value of type Callable in numeric context␤ in block <unit> at <tmp> line 1␤4␤»
15:36 abraxxa left 15:39 donaldh joined 15:41 domidumont left
hackedNODE timotimo: you around? How to restart dalek? 15:47
timotimo should be possible via systemd
did it get stuck? that'd be new 15:48
geekosaur on the wrong end of a netsplit
hackedNODE I think it may be stuck somewhere in netslit land
timotimo ah 15:49
hackedNODE runs sudo service dalek-irc restart
geekosaur probably the server is still up but isolated
hackedNODE doesn't seem to be working :/ even though I see the service go away then reappear 15:51
s: &test
SourceBaby hackedNODE, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ test used at line 6␤␤
timotimo does dalek log to journal? maybe you can tell what irc server it's connecting to from the output 15:52
maybe it's just going onto the same server as before?
15:53 g4 left
hackedNODE Dunno if it's relevant: "Failed to set cpu.cfs_period_us on /system.slice/dalek-irc.service: Permission denied" 15:55
Oh, I see it connecting now
.oO( perlwhore.org ?? )
15:56
write_fail: Network freenode lost connection: 'Broken pipe' will reconnect in 30 secs
There you go.
15:56 yubimusubi is now known as Possum
seatek it's all systemd's fault 15:56
15:57 dalek joined, ChanServ sets mode: +v dalek
hackedNODE \o/ 15:57
timotimo++ thanks
timotimo no problem
15:58 solarbunny joined 16:00 mcmillhj left 16:03 domidumont joined 16:07 khw left, khw joined 16:10 mcmillhj joined 16:14 mcmillhj left 16:20 ptolemarch joined 16:24 mcmillhj joined 16:28 lucasb_ left, mcmillhj left
hackedNODE DBD::mysql security advisory (if anyone uses it; I think our logs do): blogs.perl.org/users/mike_b/2016/10...brary.html 16:30
16:41 mcmillhj joined 16:44 dakkar left 16:46 mcmillhj left 16:53 acrussell left 17:00 sufrostico joined 17:01 mcmillhj joined 17:06 mcmillhj left, wamba joined
dalek c: 1dd3004 | RabidGravy++ | doc/Type/List.pod6:
Revert "remove doc for sub cross because ENOSPEC (issue #165 on roast)"

Have supplied some test for 'cross' and closed #165 on roast
This reverts commit b101e5e439838bda97d8201b340f5f165505ff5e.
17:12
17:12 mcmillhj joined 17:13 gregf__ left 17:17 ponbiki left 17:33 hankache joined
seatek m: say $*PERL.version 17:34
camelia rakudo-moar 9ea23c: OUTPUT«v6.c␤»
seatek m: say $*PERL.compiler.version
camelia rakudo-moar 9ea23c: OUTPUT«v2016.09.134.g.9.ea.23.c.9␤»
hackedNODE m: say $*VM.version 17:35
camelia rakudo-moar 9ea23c: OUTPUT«v2016.09.13.g.34.c.375.a␤»
seatek does rakudobrew always build thread support in?
hackedNODE Yes
seatek k
17:40 donaldh left 17:41 ocbtec left 17:45 robertle joined
El_Che RT. Submitting a bug breaks my heart 17:47
hackedNODE You could join the efforts to add bug-submitting-ability to perl6.fail :) 17:50
Well. Actually not yet :) 17:51
El_Che while I have open the RT interface, let me open my mailclient, create an identity with a RT known mail, and copy paste everything in it 17:55
17:56 _4d47 left 18:02 andrzejku joined 18:03 erdic left, erdic joined 18:08 itaipu left 18:10 setty2 joined
El_Che lizmat: sent you a bug ;) 18:14
18:15 itaipu joined 18:16 lucasb_ joined
dalek c: c2a94c5 | (Zoffix Znet)++ | doc/Language/testing.pod6:
Clarify is()'s usecases
18:19
hackedNODE Thinking of it more... `is` shouldn't even be in roast. We're supposed to precisely pin-point what values we expect, while is() is more of a convenience, where you don't care if you get an Int or a Str or an IntStr, for example 18:23
(context: github.com/perl6/roast/commit/f995...t-19306069 ) 18:24
RabidGravy++ 18:25
moritz hackedNODE: I think that's quite an extreme stance 18:26
hackedNODE: for example, if the API documentation says a List is returned, any subclass of List is acceptable too, but is-deeply will reject it
psch &is is fine for what it does, although it's somewhat unobvious that it stringifies
although i guess the docs probably cover that 18:27
18:28 Actualeyes left
hackedNODE moritz: that means ImplementationX can return arrays and code can modify them, but ImplementationY can return Lists and that code will fail to run on that implementation, even though they both pass the spec. 18:29
So the extremeness eliminates imprecisions that would make code interoperate poorly between compilers 18:30
(and yes, this argument would be stronger if we had more than one compiler :P)
psch m: use Test; is-deeply [1,2,3], (1,2,3) 18:32
camelia rakudo-moar 9ea23c: OUTPUT«not ok 1 - ␤␤# Failed test at <tmp> line 1␤# expected: $(1, 2, 3)␤# got: $[1, 2, 3]␤»
psch m: use Test; is [1,2,3], (1,2,3)
camelia rakudo-moar 9ea23c: OUTPUT«ok 1 - ␤»
psch hmms
timotimo m: use Test; is [1,2,3], "1 2 3"
camelia rakudo-moar 9ea23c: OUTPUT«ok 1 - ␤»
hackedNODE m: use Test; is [1,("2",(3 but False)], (1,2,3)
camelia rakudo-moar 9ea23c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 3use Test; is [1,("2",(3 but False)7⏏5], (1,2,3)␤ expecting any of:␤ statement end…»
hackedNODE m: use Test; is [1,("2",(3 but False))], (1,2,3)
camelia rakudo-moar 9ea23c: OUTPUT«ok 1 - ␤»
18:33 girafe joined 18:37 sjoshi joined
andrzejku hey are there something like perl emacs? 18:40
timotimo you mean like emacs but instead of lisp using perl?
lucasb_ github.com/hinrik/perl6-mode 18:42
if he meant perl6 mode for emacs...
18:44 MilkmanDan left, hankache left 18:45 itaipu left 18:46 hankache joined
lucasb_ m: say ~$_ given (*+2) 18:52
camelia rakudo-moar 9ea23c: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block at <tmp> line 1␤␤»
lucasb_ m: say (*+2).Str
camelia rakudo-moar 9ea23c: OUTPUT«{ ... }␤»
lucasb_ why the message triggers in one case but not the other? 18:53
if I say (-> {}).Str or (sub {}).Str, then I get the message, but not with WhateverCode's
hackedNODE m: put (*+2).Str 18:54
camelia rakudo-moar 9ea23c: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: (*+2).Str
camelia ( no output )
hackedNODE m: ~$_ given *+2
camelia rakudo-moar 9ea23c: OUTPUT«WARNINGS for <tmp>:␤Useless use of "~" in expression "~$_" in sink context (line 1)␤WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block at <tmp> line 1␤»
hackedNODE s: (*+2), 'Str', \()
SourceBaby hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/9ea2...ode.pm#L17
hackedNODE huh
m: my $v = *+2; $v.Str 18:55
camelia rakudo-moar 9ea23c: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤»
hackedNODE Well, $5 it's an optimizer bug 18:56
hackedNODE tests
nope :)
timotimo do i get the $5?
lucasb_ oh... the ".Str" is part of the whatever code
that's why it doesn't trigger
hackedNODE hm
18:57 hankache left, itaipu joined
hackedNODE m: my $c = (*+2).Str; dd $c(1) 18:57
camelia rakudo-moar 9ea23c: OUTPUT«"3"␤»
hackedNODE lucasb_++ yup :)
hackedNODE sens lucasb_ a virtual $5
lucasb_ my $x = *+2; $x.Str # this creates a boundary to test the stringification 18:59
m: sub f(--> 42) {}; say f 19:03
camelia rakudo-moar 9ea23c: OUTPUT«42␤»
lucasb_ m: sub f() returns 42 {}; say f
camelia rakudo-moar 9ea23c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed trait␤at <tmp>:1␤------> 3sub f() returns7⏏5 42 {}; say f␤»
hackedNODE :) 19:04
lucasb_ idk if returning values this way is supposed to work 19:05
I just wanted to point the difference in behaviour
timotimo it is 19:07
i mean, it's supposed to work in general
not sure about "returns a-value"
19:13 buggable left, buggable joined
seatek The multi-line POD comments that attach to declared stuff is REALLY nice. It practically does all your documentation for you! 19:15
You've taken away ALL my excuses
FROGGS m: sub f(--> 42) {}; say f 19:17
camelia rakudo-moar 9ea23c: OUTPUT«42␤»
FROGGS if that works, then 'returns 42' should work too, I guess 19:18
lucasb_ maybe these places should be limited to type object names only 19:21
if I put 42 there, it gives the impression that *any* expression there would work, which is not true
only simple expressions like ints, nums and strings work. anything other than that fails 19:22
19:22 rgrinberg1 left 19:24 rgrinberg joined
gfldex m: sub anythingelse { say 'oi‽' }; subset S of Str where { anythingelse; True }; sub f( --> S) { Str }; f 19:26
camelia rakudo-moar 9ea23c: OUTPUT«oi‽␤»
lucasb_ hehe, that was funny 19:27
I take back what I said :)
19:32 mohae_ joined 19:34 mohae left 19:40 lucasb_ left
seatek OK the automatic POD comment generation from being bound to declarations is a bit... vague 19:43
19:43 domidumont left 19:44 sjoshi left
seatek Still though, wonderful 19:44
lizmat El_Che: will look at the bug 19:46
19:50 labster joined
robertle seatek: sounds interesting, but I don't know what you are talking about. do you have a reference where I can start learning more about his? 19:56
seatek robertle, here is some stuff design.perl6.org/S26.html#Pod 19:57
robertle, you "block quote" with #|{ declarations here } and the p6doc will autgenerate some nice stuff related to the method and its signature 19:58
20:00 itaipu left, itaipu joined
robertle I see, this could be leveraged for some nice IDE bits as well 20:01
seatek The only reason I came to Perl6 was for block quotes. I can quote whole ranges of my code, and then it NEVER gets errors. It's like an evolution.
;)
DrForr I use them extensively too, in my case I mostly search for ` to find the tests that I've temporarily disabled, then re-enable the one by one. 20:02
And right now I've come up with an idea for a grammar helper tool, but the margin of time alloted is too small to let me finish it :/ 20:03
seatek DrForr, who doles out your time? You need to make some more of that. 20:05
DrForr Crap, Unicode doesn't have a Small Caps block. Otherwise I was going to do a Pratchett ref. 20:07
lizmat DrForr: www.righto.com/2016/10/inspired-by-...-star.html 20:08
DrForr Small caps are a rendering choice, not a glyph choice; I don't think it'd fly. 20:09
20:10 ptolemarch left 20:11 kaare_ left
gfldex ¿ǝɹns noʎ ǝɹɐ :ɹɹoℲɹ◖ 20:12
20:14 mcmillhj left, MilkmanDan joined 20:15 cibs left
DrForr I think that's meant to be a consequence of directionality, but I don't really have the patience right now to dig into the Unicode spec to look for the interpretation. 20:15
20:16 cibs joined 20:20 wtw_ is now known as wtw, mcmillhj joined
El_Che thx, lizmat 20:23
20:25 FROGGS left, robertle left
El_Che (it's not that I am not happy with the JSON errors :) ) 20:30
20:32 MorayJ left
RabidGravy ha, toggl.com/programming-princess - cheers dha++ 20:33
20:38 rindolf left 20:42 ponbiki joined, dha joined 20:43 ponbiki is now known as Guest62166
dalek c: 5418b0a | (Francis Grizzly Smit)++ | doc/Type/Int.pod6:
aligned sub form with method form expmod
20:46
20:55 AlexDaniel joined
dalek c: e8d7ef7 | gfldex++ | doc/Type/Signature.pod6:
fix links
20:55
21:04 skids left 21:08 wamba left 21:10 canopus left, jcallen left, dha left, andrzejku left 21:11 jcallen joined 21:15 canopus joined 21:16 dha joined 21:33 Milan joined 21:34 Milan left 21:39 aries_liuxueyang left 21:40 aries_liuxueyang joined 21:51 cpage__ left, itaipu left
dalek c: 92f7367 | gfldex++ | doc/Programs/00-running.pod6:
say what -I and `use lib` acutally does
21:53
c: ed53481 | gfldex++ | doc/Language/modules.pod6:
put `use lib` into the index
c: d7eaff2 | gfldex++ | doc/Language/faq.pod6:
add ecosystem to the index
c: 25fb68e | gfldex++ | doc/Language/modules.pod6:
fix index entry for `use lib`
21:59 mcmillhj left 22:02 rgrinberg left 22:04 pdcawley left 22:07 pdcawley joined 22:15 dha left 22:16 skids joined 22:18 cpage__ joined, RabidGravy left 22:29 _slade_ joined
tailgate Is there a way to force a Seq to an Array? 22:32
lizmat my @a = Seq.list ? 22:34
gfldex m: my @a = list lazy gather for 1..100 { say 'hit'; .take }; say @a[10]; 22:38
camelia rakudo-moar 8023df: OUTPUT«hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤11␤»
gfldex m: my @a = list gather for 1..100 { say 'hit'; .take }; say @a[10];
camelia rakudo-moar 8023df: OUTPUT«hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit␤hit…»
gfldex tailgate: please not that you may want to have `lazy` somewhere in the mix 22:39
cognominal m: Buf $b; $b.elems; say $b.WHAT 22:42
camelia rakudo-moar 8023df: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Buf7⏏5 $b; $b.elems; say $b.WHAT␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
cognominal m: my Buf $b; $b.elems; say $b.WHAT
camelia rakudo-moar 8023df: OUTPUT«(Buf)␤»
cognominal m: my Buf $b; say $b.elems; say $b.WHAT
camelia rakudo-moar 8023df: OUTPUT«1␤(Buf)␤»
cognominal m: my Buf[uint8] $b; say $b.elems; say $b.WHAT
camelia rakudo-moar 8023df: OUTPUT«1␤Cannot unbox a type object␤ in block <unit> at <tmp> line 1␤␤»
cognominal I would expect a Buf to start empty 22:43
why .WHAT does not work for a explicit Buf[uint8] 22:44
geekosaur m: my Buf[uint8] $b; dd $b 22:46
camelia rakudo-moar 8023df: OUTPUT«Buf[uint8] $b = Buf[uint8]␤»
22:46 wtw_ joined
cognominal m: my Buf[uint8] $b; say $b.^name 22:46
camelia rakudo-moar 8023df: OUTPUT«Buf[uint8]␤»
geekosaur Buf is a bit weird, and I am somehow thinking it is operating here at the wrong level (for example .elems saying "this is a scalar, return 1") 22:47
22:47 wtw left
cognominal m: my Buf[uint8] $b = Buf.new; say +$b 22:47
camelia rakudo-moar 8023df: OUTPUT«Type check failed in assignment to $b; expected Buf[uint8] but got Buf (Buf.new())␤ in block <unit> at <tmp> line 1␤␤»
cognominal m: my Buf[uint8] $b = Buf[uint8].new; say +$b 22:48
camelia rakudo-moar 8023df: OUTPUT«0␤»
cognominal m: my Buf[uint8] $b = Buf[uint8].new; $b.push: 4; say +$b
camelia rakudo-moar 8023df: OUTPUT«1␤»
cognominal m: my Buf[uint8] $b = Buf[uint8].new; $b.push: 4; say +$b; say $b[0] 22:49
camelia rakudo-moar 8023df: OUTPUT«1␤4␤»
22:49 lucasb_ joined
cognominal m: my Buf $b = Buf.new; $b.push: 4; say +$b; say $b[0] 22:49
camelia rakudo-moar 8023df: OUTPUT«1␤4␤»
cognominal m: my Buf $b; say +$b; say $b[0] 22:50
camelia rakudo-moar 8023df: OUTPUT«Use of uninitialized value of type Buf in numeric context␤ in block <unit> at <tmp> line 1␤0␤(Any)␤»
cognominal m: my Buf[uint8] $b; say +$b; say $b[0]
camelia rakudo-moar 8023df: OUTPUT«Use of uninitialized value of type Buf[uint8] in numeric context␤ in block <unit> at <tmp> line 1␤0␤(Any)␤»
cognominal m: my Buf[uint8] $b; say +$b;
camelia rakudo-moar 8023df: OUTPUT«Use of uninitialized value of type Buf[uint8] in numeric context␤ in block <unit> at <tmp> line 1␤0␤»
cognominal m: my Buf $b; say +$b;
camelia rakudo-moar 8023df: OUTPUT«Use of uninitialized value of type Buf in numeric context␤ in block <unit> at <tmp> line 1␤0␤»
cognominal m: my Buf $b; say $b.elems; 22:51
camelia rakudo-moar 338a70: OUTPUT«1␤»
lucasb_ timotimo: still around? just wanted to say I really liked your answer about multithread and GC on the mailing list! it's awesome to learn stuff from all of you on the P6 community 22:52
cognominal ho, I forgot that Buf $b starts as a Buf:U 22:53
... lack of practice
23:00 perlawhirl joined
timotimo lucasb_: i'm here. you're welcome :) 23:04
23:11 girafe left 23:12 pmurias left 23:17 larion left 23:19 larion joined 23:23 breinbaas joined 23:28 DrParis left 23:32 DrParis joined 23:39 breinbaas left, larion left 23:40 larion joined 23:44 breinbaas joined 23:53 nightfrog joined