Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 llfourn joined #perl6
00:08 kurahaupo_ joined #perl6
00:09 pyrimidine joined #perl6
00:11 kurahaupo` joined #perl6
00:14 Actualeyes joined #perl6
00:23 ZzZombo joined #perl6
00:25 mcmillhj joined #perl6
00:25 cognominal joined #perl6
00:26 ZzZombo_ joined #perl6
00:26 travis-ci joined #perl6
00:26 travis-ci Doc build passed. Cale 'change else-if to given/when switch'
00:26 travis-ci https://travis-ci.org/perl6/doc/builds/204740788 https://github.com/perl6/doc/commit/8db2bcbc1d3f
00:26 travis-ci left #perl6
00:33 ZzZombo_ joined #perl6
00:41 itaipu joined #perl6
00:43 ZzZombo_ joined #perl6
00:43 mcmillhj joined #perl6
00:51 aborazmeh joined #perl6
00:51 aborazmeh joined #perl6
00:52 ZzZombo_ joined #perl6
00:52 IOninja m: sub ($k) { my $a = %(:42a, :72b){$k}; dd $a }('a')
00:52 camelia rakudo-moar 320c2f: OUTPUT: «Int $a = 42␤»
00:52 IOninja Is there some way to pack up that functionality into the signature?
00:55 AlexDaniel m: sub ($k, :$a = %(:42a, :72b){$k}) { dd $a }(‘a’)
00:55 camelia rakudo-moar 320c2f: OUTPUT: «Int $a = 42␤»
00:55 AlexDaniel :P
00:55 AlexDaniel not what you wanted right
00:56 IOninja heh
00:57 gfldex is the Hash static?
00:57 IOninja yes
00:57 IOninja written by hand, right in the signature
00:57 gfldex then you could do 2 multies that forward to a common sub
00:57 AlexDaniel yup
00:57 IOninja Ok, nm then :)
00:58 b2gills m: sub ($k, $a = %(:42a, :72b){$k}){ $a }('b')
00:58 camelia rakudo-moar 320c2f: ( no output )
00:58 b2gills m: say sub ($k, $a = %(:42a, :72b){$k}){ $a }('b' & 'a')
00:58 camelia rakudo-moar 320c2f: OUTPUT: «all(72, 42)␤»
00:58 gfldex m: sub s($k where $k = 42){ say $k }; s
00:58 camelia rakudo-moar 320c2f: OUTPUT: «42␤»
00:59 gfldex that may be an artifact and not covered by roast (read: i didn't check because of late'o'clock)
00:59 b2gills m: sub s($k where ($k = 42)){ say $k }; s
00:59 camelia rakudo-moar 320c2f: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:00 IOninja That's a way to provide default value
01:00 b2gills m: sub s($k where ($k = 42)){ say $k }; s 8
01:00 camelia rakudo-moar 320c2f: OUTPUT: «Cannot assign to a readonly variable ($k) or a value␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:01 b2gills m: sub s($k where $k = 42){ say $k }; s 0
01:01 camelia rakudo-moar 320c2f: OUTPUT: «0␤»
01:01 gfldex m: sub s($k is rw where ($k = 42)){ say $k }; s 8
01:01 camelia rakudo-moar 320c2f: OUTPUT: «Parameter '$k' expected a writable container, but got Int value␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:01 IOninja m: sub s($k is rw where ($k = 42)){ say $k }; s $=8
01:01 camelia rakudo-moar 320c2f: OUTPUT: «Internal error: inconsistent bind result␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:01 IOninja m: sub s($k is rw where ($k = 42)){ say $k }; s $ = 8
01:01 camelia rakudo-moar 320c2f: OUTPUT: «Internal error: inconsistent bind result␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:01 gfldex m: sub s($k is rw where (my $b = 42; $k := $b)){ say $k }; s 8
01:01 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3b s($k is rw where (my $b = 42; $k := $b7⏏5)){ say $k }; s 8␤»
01:01 IOninja beat
01:01 IOninja *neat
01:02 b2gills It seems to be working just fine
01:02 AlexDaniel I wouldn't bet on it
01:02 IOninja It being what?
01:03 AlexDaniel it working fine, in a long term
01:03 IOninja "it" being what?
01:04 gfldex smells like there is a bug somewhere. Assignment seams to mean binding in a where clause.
01:04 AlexDaniel assignment thingy in where
01:04 Qwerasd joined #perl6
01:05 gfldex it did feel wrong to assing in a where clause but then I remembered that Perl 6 is a dynamic dynamic language.
01:06 b2gills It isn't assigning in a where clause. It is setting the default after the where clause
01:06 ZzZombo_ joined #perl6
01:06 ZzZombo_ joined #perl6
01:06 AlexDaniel ah wait, how many times is it called?
01:06 b2gills except for the ones with parens around the assignment
01:06 AlexDaniel m: sub s($k is rw where ($k = 42)){ say ‘one?’; say $k }; s $ = 8
01:06 camelia rakudo-moar 320c2f: OUTPUT: «Internal error: inconsistent bind result␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:06 geekosaur joined #perl6
01:07 AlexDaniel oops
01:07 IOninja m: sub s($ where (my $k = 42; True)){ say $k }; s 8
01:07 camelia rakudo-moar 320c2f: OUTPUT: «Constraint type check failed for parameter '<anon>'␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:07 IOninja orly
01:07 AlexDaniel m: sub s($k is rw where {say ‘one?’; $k = 42)){  say $k }; s $ = 8
01:07 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3ub s($k is rw where {say ‘one?’; $k = 427⏏5)){  say $k }; s $ = 8␤    expecting any of:␤        statement end␤        statement modifier␤        stat…»
01:07 AlexDaniel m: sub s($k is rw where {say ‘one?’; $k = 42}){  say $k }; s $ = 8
01:07 camelia rakudo-moar 320c2f: OUTPUT: «one?␤42␤»
01:07 IOninja It's called twice on failure
01:07 b2gills m: sub s($k is rw where {$k = 42}){ say ‘one?’; say $k }; s $ = 8
01:07 camelia rakudo-moar 320c2f: OUTPUT: «one?␤42␤»
01:08 IOninja m: sub s($k is copy where {$k = 42}){ say ‘one?’; say $k }; s 8
01:08 camelia rakudo-moar 320c2f: OUTPUT: «one?␤42␤»
01:08 b2gills about the only thing that doesn't work as I'd expect is the one with a bare $k in the clause
01:13 travis-ci joined #perl6
01:13 travis-ci Doc build errored. Brad Gilbert 'map and grep for list comprehensions'
01:13 travis-ci https://travis-ci.org/perl6/doc/builds/204742089 https://github.com/perl6/doc/com​pare/00d98337d52b...a9a6a83d98b9
01:13 travis-ci left #perl6
01:15 telex joined #perl6
01:16 IOninja Failed running /home/travis/.rakudobrew/bin/​../moar-nom/install/bin/perl6 -Ilib bin/zef test . at /home/travis/.rakudobrew/bin/rakudobrew line 58
01:22 IOninja Check it: https://map.perl6.party/
01:22 IOninja Map of Perl 6 Routines (edition #1)
01:23 IOninja nameless one is circumfix:<:{ }>
01:25 IOninja hm... it'd help if I bothered to escape HTML properly -_-
01:25 pyrimidine joined #perl6
01:27 kurahaupo joined #perl6
01:29 IOninja sauce: https://github.com/perl6/routine-map
01:47 llfourn joined #perl6
01:51 adu joined #perl6
01:54 IOninja What META filed does the :auth get made of off?
01:54 IOninja *field
01:54 IOninja If I'm the author but I want the :auth to be TPF whatdoido
01:55 mcsnolte joined #perl6
01:55 IOninja well, don't matter much in this case I guess 'cause it ain't a module, but I still wanna know
02:01 ZzZombo can I pass custom parameters to my AT-KEY() method in my class somehow?
02:01 ZzZombo w/o overriding the whole postcircumfix:<{ }>
02:03 IOninja m: class { method AT-KEY ($x, :$foo) { say "$x $foo" } }.new<foo>:foo
02:03 camelia rakudo-moar 320c2f: OUTPUT: «Unexpected named argument 'foo' passed␤  in block <unit> at <tmp> line 1␤␤»
02:03 * IOninja shrugs
02:05 IOninja m: class Foo { method AT-KEY ($x, :$foo) { say "$x $foo" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { $o.AT-KEY: $y, |%_ }; Foo.new<foo>:foo
02:05 camelia rakudo-moar 320c2f: OUTPUT: «foo True␤»
02:05 IOninja m: class Foo { method AT-KEY ($x, :$foo) { say "$x $foo" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { $o.AT-KEY: $y, |%_ }; Foo.new<foo>:42foo
02:05 camelia rakudo-moar 320c2f: OUTPUT: «foo 42␤»
02:05 pyrimidine joined #perl6
02:07 stmuk joined #perl6
02:13 ZzZombo m: my ($x,$y);($x,$y) >> !;say ($x,$y);
02:13 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~>␤at <tmp>:1␤------> 3my ($x,$y);($x,$y) >>7⏏5 !;say ($x,$y);␤»
02:13 ZzZombo m: my ($x,$y);($x,$y)>> !;say ($x,$y);
02:13 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing postfix␤at <tmp>:1␤------> 3my ($x,$y);($x,$y)>>7⏏5 !;say ($x,$y);␤    expecting any of:␤        postfix␤»
02:13 ZzZombo m: my ($x,$y);($x,$y)>>!;say ($x,$y);
02:13 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3my ($x,$y);($x,$y)>>7⏏5!;say ($x,$y);␤    expecting any of:␤        postfix␤»
02:14 ZzZombo m: my ($x,$y);($x,$y)»!;say ($x,$y);
02:14 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3my ($x,$y);($x,$y)»7⏏5!;say ($x,$y);␤    expecting any of:␤        postfix␤»
02:15 ZzZombo m: my ($x,$y);($x,$y)»=Bool::True;say ($x,$y);
02:15 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3my ($x,$y);($x,$y)»7⏏5=Bool::True;say ($x,$y);␤    expecting any of:␤        postfix␤»
02:15 ZzZombo m: my ($x,$y);($x,$y)»=»Bool::True;say ($x,$y);
02:15 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3my ($x,$y);($x,$y)»7⏏5=»Bool::True;say ($x,$y);␤    expecting any of:␤        postfix␤»
02:15 IOninja m: my $x = 'foo/bar'; $x .= split('/').tail; say $x
02:15 camelia rakudo-moar 320c2f: OUTPUT: «(foo bar)␤»
02:16 IOninja Why not? Silently fails to do what I wanted it to... sucks
02:16 IOninja ZzZombo: spaces are your friends
02:18 IOninja m: my ($x,$y); ($x,$y)».=not; say [$x, $y]
02:18 camelia rakudo-moar 320c2f: OUTPUT: «[True True]␤»
02:18 IOninja m: my ($x,$y); ($x,$y) »=» Bool::True;say ($x,$y);
02:18 camelia rakudo-moar 320c2f: OUTPUT: «(True True)␤»
02:18 ZzZombo beat me to it
02:19 IOninja ZzZombo: now you tell me why .tail doesn't work in $x .= split('/').tail :)
02:19 IOninja m: my $x = 'foo/bar'; dd $x .= split('/').tail; dd $x
02:19 camelia rakudo-moar 320c2f: OUTPUT: «"bar"␤List $x = $("foo", "bar")␤»
02:19 IOninja Ah, I see
02:19 IOninja this blows
02:20 IOninja how to do it?
02:21 IOninja m: my $x = 'foo/bar'; $x .= split('/').=tail; $x
02:21 camelia rakudo-moar 320c2f: OUTPUT: «WARNINGS for <tmp>:␤Useless use of $x in sink context (line 1)␤»
02:21 IOninja m: my $x = 'foo/bar'; $x .= split('/').=tail; say $x
02:21 camelia rakudo-moar 320c2f: OUTPUT: «bar␤»
02:21 IOninja That's how...
02:21 ZzZombo what, how did $x end up being a List?
02:21 IOninja return value of .split
02:22 ZzZombo yea, but you call .tail on that, so it should be just a string.
02:22 SmokeMachine m: my $x = 'foo/bar'; $x .= |split('/').tail; say $x
02:22 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3my $x = 'foo/bar'; $x .=7⏏5 |split('/').tail; say $x␤    expecting any of:␤        dotty method or postfix␤»
02:22 IOninja m: my $x = 'foo/bar'; $x .= split('/').=[*-1]; dd $x
02:22 camelia rakudo-moar 320c2f: OUTPUT: «No such method '&postcircumfix:<[ ]>' for invocant of type 'List'␤  in block <unit> at <tmp> line 1␤␤»
02:23 IOninja hehe... ALMOST works :)
02:23 user__ joined #perl6
02:23 SmokeMachine m: my $x = 'foo/bar'; $x .= split('/').slip.tail; say $x
02:23 camelia rakudo-moar 320c2f: OUTPUT: «No such method 'slip' for invocant of type 'List'␤  in block <unit> at <tmp> line 1␤␤»
02:23 IOninja SmokeMachine: slip??
02:24 IOninja The previous evals show only the first method's value gets assigned to $x; rest of them are all called on the result of that assignment
02:24 AlexDaniel m: my $x = ‘foo/bar’; dd $x .= &{.split(‘/’).tail}; dd $x
02:24 camelia rakudo-moar 320c2f: OUTPUT: «Str $x = "bar"␤Str $x = "bar"␤»
02:24 IOninja m: my $x = 'foo/bar'; $x .= split('/').=AT-POS: [*-1]; dd $x
02:24 camelia rakudo-moar 320c2f: OUTPUT: «Str $x = "bar"␤»
02:25 AlexDaniel m: my $x = ‘foo/bar’; dd $x .= &{.split(‘/’)[*-1]}; dd $x
02:25 camelia rakudo-moar 320c2f: OUTPUT: «Str $x = "bar"␤Str $x = "bar"␤»
02:25 IOninja m: my $x = ‘foo/bar’; dd $x .= {.split(‘/’)[*-1]}; dd $x
02:25 camelia rakudo-moar 320c2f: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤Cannot resolve caller split(Any, Str); none of these signatures m…»
02:25 IOninja I see
02:25 ZzZombo m: my @a=(1,False,Nil,123,.123);say @a.grep: Int:D
02:25 camelia rakudo-moar 320c2f: OUTPUT: «(1 False 123)␤»
02:25 IOninja m: my $x = ‘foo/bar’; dd $x .= *.split(‘/’)[*-1]; dd $x
02:25 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3my $x = ‘foo/bar’; dd $x .=7⏏5 *.split(‘/’)[*-1]; dd $x␤    expecting any of:␤        dotty method or postfix␤»
02:25 ZzZombo huh, whoa
02:25 stmuk joined #perl6
02:25 SmokeMachine IOninja: I'm too sleepy...
02:26 IOninja ZzZombo: Bool are Int
02:26 ZzZombo Also why does https://docs.perl6.org/routine/grep miss arrays?
02:26 yadzi joined #perl6
02:27 IOninja Why, if it isn't the time to use https://map.perl6.party to find out! :D
02:28 AlexDaniel m: my $x = ‘foo/bar’; dd $x .= &{ 42 }; dd $x
02:28 camelia rakudo-moar 320c2f: OUTPUT: «Int $x = 42␤Int $x = 42␤»
02:28 AlexDaniel this is kinda interesting…
02:28 AlexDaniel .oO( but pointless… )
02:29 hobbs ZzZombo: Array is a kind of List
02:30 SmokeMachine m: class C {has $.a .= &{ say "here";  40 + 2 } }; say "before"; C.new
02:30 camelia rakudo-moar 320c2f: OUTPUT: «before␤here␤»
02:32 SmokeMachine m: sub bla { say "here"; 40 + 2}; class C {has $.a = bla }; say "before"; C.new
02:32 camelia rakudo-moar 320c2f: OUTPUT: «before␤here␤»
02:32 IOninja hm, I think there are duplicates in that map :}
02:33 ZzZombo regarding multi postcircumfix:<{ }> (::?CLASS:D $invokee,Str:D $key,*%_), yea, I forgot I DON'T wanna do that, since now I have to implement also :delete, :exists and so on. :S
02:39 IOninja adding a unique :with(&[eqv]), made the map contain just 2457 elements instead of 4859. That's methods AND subs. Surprised how few of them we have despite people saying how "large" perl 6 is
02:39 IOninja PHP has several times more of them
02:39 IOninja s/them/functions/;
02:46 ZzZombo BTW, where is its code? I mean postcircumfix:<{ }>, I figured I could copy-paste that, perhaps.
02:46 IOninja s: &postcircumfix:<{ }>
02:46 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blo​b/320c2fb/src/core/hash_slice.pm#L3
02:46 IOninja That entire file is it looks like
02:46 ZzZombo yea
02:46 * IOninja updates map.perl6.party
02:46 IOninja OK, and now if you sort by name, you can see the answer to earlier question about https://docs.perl6.org/routine/grep
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 llfourn joined #perl6
02:49 IOninja m: class Foo { method AT-KEY ($x) { say "$x $*EXTRA_STUFF<foo>" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my $*EXTRA_STUFF = %(%_<foo bar>:kv:delete)nextwith $o, $y, |%_ }; Foo.new<foo>:42foo
02:49 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3$*EXTRA_STUFF = %(%_<foo bar>:kv:delete)7⏏5nextwith $o, $y, |%_ }; Foo.new<foo>:42f␤    expecting any of:␤        infix␤        infix stopper␤      …»
02:49 IOninja m: class Foo { method AT-KEY ($x) { say "$x $*EXTRA_STUFF<foo>" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my $*EXTRA_STUFF = %(%_<foo bar>:kv:delete); nextwith $o, $y, |%_ }; Foo.new<foo>:42foo
02:49 camelia rakudo-moar 320c2f: OUTPUT: «foo 42␤»
02:49 IOninja ZzZombo: somming like that mabby?
02:51 Cabanossi joined #perl6
02:51 IOninja filter out your custom args into a dynamic var and forward processing to normal postcircumfix
02:52 ZzZombo I don't really get
02:52 ZzZombo $*EXTRA_STUFF = %(%_<foo bar>:kv:delete);
02:52 ZzZombo what exactly does that do? Especially the adverbs on it.
02:52 IOninja There's probably some other stuff you need to handle postcircumfix:<« »> and postcircumfix:«<< >>» maybe?
02:53 ZzZombo ah, I think I get it now
02:53 IOninja ZzZombo: assign to dynamic var; %( ) is a hash coercer %_ is the hash with all the named args <foo bar> is the slice looking up two keys, :kv makes the slice return key/value pairs instead of just values; :delete deletes the slice from the hash (since core stuff don't know how to handle these and will complain)
02:54 ZzZombo isn't it better written $*EXTRA_STUFF = %(%_<foo bar>:exists); ?
02:54 ZzZombo ah
02:54 ZzZombo okay
02:55 IOninja Oh wait, :kv returns a flat list of key/values, not pairs
02:56 IOninja m: my %h = :42a, :72b, :88c; dd %h<a b z>:kv:delete; dd %h
02:56 camelia rakudo-moar 320c2f: OUTPUT: «("a", 42, "b", 72)␤Hash %h = {:c(88)}␤»
02:56 IOninja m: my %h = :42a, :72b, :88c; dd %(%h<a b z>:kv:delete); dd %h
02:56 camelia rakudo-moar 320c2f: OUTPUT: «Hash % = {:a(42), :b(72)}␤Hash %h = {:c(88)}␤»
02:56 IOninja m: my %h = :42a, :72b, :88c; dd %h<a b z>:kv:delete.hash; dd %h
02:56 camelia rakudo-moar 320c2f: OUTPUT: «Hash % = {:a(42), :b(72)}␤Hash %h = {:c(88)}␤»
02:56 IOninja m: my %h = :42a, :72b, :88c; dd %h<a b z>:p:delete; dd %h
02:56 camelia rakudo-moar 320c2f: OUTPUT: «(:a(42), :b(72))␤Hash %h = {:c(88)}␤»
02:56 IOninja :p does the pairs
02:58 IOninja m: class Foo { method AT-KEY ($x) { say "$x %*EXTRA_STUFF<foo>" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my %*EXTRA_STUFF = %_<foo bar>:p:delete; nextwith $o, $y, |%_ };
02:58 camelia rakudo-moar 320c2f: ( no output )
02:58 IOninja m: class Foo { method AT-KEY ($x) { say "$x %*EXTRA_STUFF<foo>" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my %*EXTRA_STUFF = %_<foo bar>:p:delete; nextwith $o, $y, |%_ }; Foo.new<foo>:42foo
02:58 camelia rakudo-moar 320c2f: OUTPUT: «foo 42␤»
02:58 IOninja m: class Foo { method AT-KEY ($x) { say "$x %*EXTRA_STUFF<foo>" } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my %*EXTRA_STUFF = %_<foo bar>:p:delete; nextwith $o, $y, |%_ }; Foo.new«foo bar»:42foo
02:58 camelia rakudo-moar 320c2f: OUTPUT: «foo bar 42␤»
02:58 IOninja w00t even that works
03:00 IOninja ZzZombo: one niggle: you likely will have to export that multi to stuff where you class is being used
03:01 IOninja There's a Secret™ Unsupported™ API to make it work tho
03:02 ZzZombo shouldn't it get exported together with the class tho?
03:02 IOninja not by default
03:03 IOninja ZzZombo: also, an object can be passed around to places where neither class nor sub were exported to
03:03 IOninja m: ''.HOW.HOW.^name.say
03:03 camelia rakudo-moar 320c2f: OUTPUT: «NQPClassHOW␤»
03:04 IOninja m: ''.HOW.^name.say
03:04 camelia rakudo-moar 320c2f: OUTPUT: «Perl6::Metamodel::ClassHOW␤»
03:04 IOninja m: Perl6::Metamodel::ClassHOW
03:04 camelia rakudo-moar 320c2f: OUTPUT: «Could not find symbol '&ClassHOW'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:04 IOninja ^ case in point
03:06 travis-ci joined #perl6
03:06 travis-ci Doc build passed. Cale 'get rid of given and alias'
03:06 travis-ci https://travis-ci.org/perl6/doc/builds/204748398 https://github.com/perl6/doc/com​pare/8db2bcbc1d3f...5a5a507b2927
03:06 travis-ci left #perl6
03:06 IOninja m: module Z { class Foo { method AT-KEY ($x) { dd [$x, %*EXTRA_STUFF ] } }; multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my %*EXTRA_STUFF = %_<foo bar>:p:delete; nextwith $o, $y, |%_ }; }; Z::Foo.new<<foo bar>>:42foo
03:06 camelia rakudo-moar 320c2f: OUTPUT: «Unexpected named argument 'foo' passed␤  in block <unit> at <tmp> line 1␤␤»
03:08 IOninja m: module Z { class Foo { method AT-KEY ($x) { dd [$x, %*EXTRA_STUFF ] } }; CORE::('&postcircumfix:<{ }>').add_dispatchee: multi postcircumfix:<{ }> (Foo $o, $y, *%_) { my %*EXTRA_STUFF = %_<foo bar>:p:delete; nextwith $o, $y, |%_ }; }; Z::Foo.new<<foo bar>>:42foo
03:08 camelia rakudo-moar 320c2f: OUTPUT: «[("foo", "bar"), {:foo(42)}]␤»
03:08 IOninja ZzZombo: ^ that's the Secret™ Unsupported™ API to make it work.
03:10 IOninja no idea how well that works with precompilation
03:14 labster joined #perl6
03:14 pyrimidine joined #perl6
03:19 ZzZombo m: my @a=(1,2,3,4);dd @a[*]
03:19 ZzZombo m: my @a=(1,2,3,4);dd @a[*-1]
03:19 camelia rakudo-moar 320c2f: OUTPUT: «(1, 2, 3, 4)␤»
03:19 camelia rakudo-moar 320c2f: OUTPUT: «Int @a = 4␤»
03:19 ZzZombo I wonder how does it distinguishes that?
03:20 MasterDuke IOninja: given your recent work with .Rat candidates and such, what do you think about https://rt.perl.org/Ticket/Display.html?id=123957?
03:20 IOninja ZzZombo: one's Whatever another's a WhateverCode
03:21 IOninja Hm, weird. The mapper.p6 on this commit segfaults: https://github.com/perl6/routine-map/tree​/ee7fb894bc47f8eed877f2f9dccc15e2644caf6e
03:21 IOninja on 2017.01-172-g4efcc29
03:21 IOninja doesn't on previous commit
03:23 MasterDuke light up the dogbert11 signal!
03:25 IOninja Narrowed it down to `eager` inside sub find-symbols {}; Changing it to `@ = ` avoids the segfault.
03:26 noganex_ joined #perl6
03:26 IOninja This one: https://github.com/perl6/routine-map/blob/ee7fb894​bc47f8eed877f2f9dccc15e2644caf6e/mapper.p6#L52-L56
03:28 IOninja MasterDuke: as for what to think of ticket... ¯\_(ツ)_/¯ don't see a relation with .Rat stuff TBH
03:28 IOninja m: class RT123957 does Numeric {}; 1 + RT123957.new
03:28 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123957
03:28 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123957
03:29 camelia rakudo-moar 320c2f: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "+" in expression "1 + RT123957.new" in sink context (line 1)␤MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
03:29 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123957
03:29 IOninja stupidass robot
03:29 IOninja m: class Z123957 does Numeric {}; 1 + Z123957.new
03:29 camelia rakudo-moar 320c2f: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "+" in expression "1 + Z123957.new" in sink context (line 1)␤MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
03:29 MasterDuke not with .Rat specifically, but with maybe missing candidates
03:29 IOninja m: class Z123957 does Numeric { method Numeric { 42 } }; 1 + Z123957.new
03:29 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'Numeric' when an only method is also in the package 'Z123957'␤at <tmp>:1␤»
03:29 MasterDuke m: say 1 + Numeric.new
03:29 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 82944 bytes␤»
03:29 IOninja wat
03:30 IOninja m: class Z123957 does Numeric { method Numeric { 42 } }.^methods.say
03:30 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'Numeric' when an only method is also in the package 'Z123957'␤at <tmp>:1␤»
03:30 IOninja m: class Z123957 does Numeric { }.^methods.say
03:30 camelia rakudo-moar 320c2f: OUTPUT: «(exp log roots succ log10 pred Numeric ACCEPTS Bool gist DUMP)␤»
03:30 IOninja s: Numeric.^pun, 'Numeric', \()
03:30 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/​blob/320c2fb/src/core/Mu.pm#L433
03:30 IOninja Seems like this one needs to be tossed: https://github.com/rakudo/rakudo​/blob/nom/src/core/Numeric.pm#L5
03:31 IOninja Or rather made into a stub
03:32 MasterDuke building now
03:32 IOninja (and impls added to types that do the role or something like that).
03:32 MasterDuke build fails with it as a stub
03:33 IOninja m: Numeric.new.succ
03:33 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 121152 bytes␤»
03:34 IOninja m: class :: does Numeric { multi method Numeric { rand } }.new.succ
03:34 camelia rakudo-moar 320c2f: ( no output )
03:34 IOninja m: class :: does Numeric { multi method Numeric { rand } }.new.succ.say
03:34 camelia rakudo-moar 320c2f: OUTPUT: «1.9320177208834␤»
03:34 IOninja What's OOM?
03:34 MasterDuke out of memory killer
03:35 IOninja ah
03:35 MasterDuke i get it instead of that panic if i run the code locally
03:35 MasterDuke luckily it usually kills the rakudo process
03:37 MasterDuke_ joined #perl6
03:41 MasterDuke_ oops, those last couple comments in -dev were meant for here
03:42 MasterDuke_ but that's probably a good a sign as any, i'm to bed
03:43 IOninja MasterDuke_: on second thought, making it a stub just postpones the badness
03:43 IOninja m: class :: does Numeric { multi method Numeric { class {} } }.new.succ.say
03:43 camelia rakudo-moar 320c2f: OUTPUT: «Use of uninitialized value of type <anon|51215360> in numeric context␤  in block <unit> at <tmp> line 1␤1␤»
03:44 IOninja oh
03:44 IOninja m: class :: does Numeric { multi method Numeric { class :: does Numeric { } }.new.succ.say
03:44 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class :: does Numeric { } }.new.succ.say7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
03:44 IOninja m: class :: does Numeric { multi method Numeric { class :: does Numeric { } } }.new.succ.say
03:44 camelia rakudo-moar 320c2f: OUTPUT: «Use of uninitialized value of type <anon|76848000> in numeric context␤  in block <unit> at <tmp> line 1␤1␤»
03:44 IOninja m: class :: does Numeric { multi method Numeric { class :: does Numeric { }.new } }.new.succ.say
03:44 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 121120 bytes␤»
03:44 IOninja Here ^ you can still return crap from method Numeric and cause the OOM thing
03:45 MasterDuke_ m: say 1 + Int.new
03:45 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
03:45 MasterDuke_ m: say 1 + Real.new
03:45 IOninja Not sure about ticket... like, what can we do? If you do the role, know how to use it properly. Define a Numeric that returns useful stuff
03:45 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
03:45 IOninja Same with Real
03:45 MasterDuke_ m: say 1 + Num.new
03:45 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
03:45 IOninja m: 1 ~ Stringy.new
03:45 camelia rakudo-moar 320c2f: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "~" in expression "1 ~ Stringy.new" in sink context (line 1)␤»
03:45 MasterDuke_ m: say 1 + Complex.new
03:45 camelia rakudo-moar 320c2f: OUTPUT: «1+0i␤»
03:46 MasterDuke_ m: say 1 + Rat.new
03:46 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
03:46 MasterDuke_ m: say 1 + FatRat.new
03:46 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
03:46 IOninja I sure hope we have tests for THOSE basics :}
03:46 MasterDuke_ m: say 1 + Rational.new
03:46 camelia rakudo-moar 320c2f: OUTPUT: «No appropriate parametric role variant available for 'Rational'␤  in block <unit> at <tmp> line 1␤␤»
03:46 IOninja m: say 1 + Rational[Int,Int].new
03:46 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
03:47 IOninja it got bridge
03:47 llfourn joined #perl6
03:47 MasterDuke_ yeah, but causing the OOM killer to rear its ugly head isn't nice
03:47 IOninja m: class :: does Numeric { method Bridge { self.Num } } }.new.succ.say
03:47 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3 Numeric { method Bridge { self.Num } } 7⏏5}.new.succ.say␤»
03:47 IOninja m: class :: does Numeric { method Bridge { self.Num } }.new.succ.say
03:48 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 82944 bytes␤»
03:48 IOninja m: class :: does Numeric does Real { method Bridge { self.Num } }.new.succ.say
03:48 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Method 'pred' must be resolved by class <anon|57310912> because it exists in multiple roles (Real, Numeric)␤at <tmp>:1␤»
03:49 Actualeyes joined #perl6
03:50 IOninja the OOM is there because the role doesn't do all the stuff it's meant to do...
03:50 IOninja I mean the class that does the role
03:50 IOninja m: class :: does Numeric { method Numeric { 'x' } }.new.succ.say
03:50 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'Numeric' when an only method is also in the package '<anon|54362256>'␤at <tmp>:1␤»
03:51 IOninja m: class :: does Numeric { multi method Numeric { 'x' } }.new.succ.say
03:51 camelia rakudo-moar 320c2f: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5x' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:51 IOninja m: class :: does Numeric { multi method Numeric { self } }.new.succ.say
03:51 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
03:52 IOninja Feels like a documentation issue to me.
03:54 IOninja Is there the reverse of `is default` on a routine? Something to tell to try it last, even if it's signature makes it more specific?
03:55 MasterDuke_ m: class :: does Real { multi method Real { self } }.new.succ.say
03:55 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'Real' when an only method is also in the package '<anon|55029968>'␤at <tmp>:1␤»
03:55 SmokeMachine IOninja: sorry, I did read pun and stub on the same phrase... so I have to paste it: https://github.com/FCO/Punnable
03:56 MasterDuke_ inconsistency there ^^^, the built in method Real is not multi, but the built in method Numeric is
03:58 IOninja m: CORE::('&infix:<+>').add_dispatchee: sub (Numeric $, Numeric $) { "sod off" }; say 1 + Numeric.new; say 42 + 5
03:58 camelia rakudo-moar 320c2f: OUTPUT: «sod off␤47␤»
03:58 IOninja 11pm
03:58 * IOninja drops to bed
03:59 IOninja m: multi infix:<+> (Numeric $, Numeric $) { "sod off" }; say 1 + Numeric.new; say 42 + 5
03:59 camelia rakudo-moar 320c2f: OUTPUT: «sod off␤47␤»
03:59 MasterDuke_ IOninja: i'm not advocating for python level bondage and discipline, but if there's a reasonable way to give some sort of error (or at least not die so drastically), that seems like it would be good
04:00 cibs joined #perl6
04:00 MasterDuke_ but i'm about to fall asleep on the keyboard here, so signing off for Real (i'm so punny)
04:09 xtreak joined #perl6
04:17 Actualeyes left #perl6
04:34 llfourn joined #perl6
04:46 daxim joined #perl6
04:54 Cabanoss- joined #perl6
04:56 ZzZombo Hm... if my class were to implement both Positional and Associative, and provide a custom .push, how could I have it working for both of the roles?
05:06 Michael__ joined #perl6
05:26 Actualeyes joined #perl6
05:33 moritz ZzZombo: you have to make a decision which semantics that .push method follows
05:39 curan joined #perl6
05:50 toolforger joined #perl6
05:50 toolforger p6: 4.99999999999999999999999999999999 cmp 5.0
05:50 camelia rakudo-moar 320c2f: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "cmp" in expression "4.99999999999999999999999999999999 cmp 5.0" in sink context (line 1)␤»
05:50 toolforger p6: say 4.99999999999999999999999999999999 cmp 5.0
05:50 camelia rakudo-moar 320c2f: OUTPUT: «Less␤»
05:51 toolforger p6: say 4.999999999999999999999999999999999999999999​99999999999999999999999999999999999999999999​999999999999999999999999999999999999999999 cmp 5.0
05:51 camelia rakudo-moar 320c2f: OUTPUT: «Less␤»
05:53 toolforger p6: may Inf cmp Inf
05:53 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    may used at line 1. Did you mean 'max', 'say', 'map'?␤␤»
05:53 toolforger p6: say Inf cmp Inf
05:53 camelia rakudo-moar 320c2f: OUTPUT: «Same␤»
05:53 toolforger p6: say 1/0 cmp 1/0
05:53 camelia rakudo-moar 320c2f: OUTPUT: «Same␤»
05:54 toolforger p6: say 1.0/0.0 cmp 1.0/0.0
05:54 camelia rakudo-moar 320c2f: OUTPUT: «Same␤»
05:56 xtreak joined #perl6
05:59 wamba joined #perl6
05:59 ZzZombo may I.live: forever
06:00 toolforger left #perl6
06:04 ZzZombo m: my @a=(1,2,3,4);dd @a[0..^2,3]
06:04 camelia rakudo-moar 320c2f: OUTPUT: «((1, 2), 4)␤»
06:04 ZzZombo m: my @a=(1,2,3,4);dd @a[0..^2]
06:04 camelia rakudo-moar 320c2f: OUTPUT: «(1, 2)␤»
06:04 ZzZombo why the first is nested?
06:07 geekosaur because the result of the range is a list, not a slip
06:07 geekosaur if I explicitly slip it, it works
06:07 geekosaur m: my @a=(1,2,3,4);dd @a[|(0..^2),3]
06:07 camelia rakudo-moar 320c2f: OUTPUT: «(1, 2, 4)␤»
06:07 geekosaur (which actually surprises me a bit, apparently it passes the "slippiness" through)
06:10 ZzZombo m: say 1 ~~ (1,3)
06:10 camelia rakudo-moar 320c2f: OUTPUT: «False␤»
06:10 ZzZombo I swear it used to work to check if a value if in array.
06:16 pyrimidine joined #perl6
06:25 ggoebel joined #perl6
06:27 Todd joined #perl6
06:27 Todd I have a panda problem
06:27 ZzZombo try zef
06:27 Todd I am trying to install Net::SMTP on Fedora Core 25
06:28 Todd perl6 bootstrap.pl
06:28 Todd ==> Testing File::Find Unhandled exception: Failed to write to filehandle: NULL string given    at gen/moar/stage2/NQPHLL.nqp:1562  (/usr/share/nqp/lib/NQPHLL.moarvm:command_eval)
06:28 Todd I am stumped
06:30 Todd by any chance does this mean that File::Find is missing?
06:34 Todd Ooops.  I am trying to install panda
06:37 Todd I will post to the mailing list
06:37 Todd bye
06:40 Kaffe joined #perl6
06:47 ufobat_ joined #perl6
06:51 RabidGravy joined #perl6
06:53 andrzejku joined #perl6
06:53 hythem joined #perl6
06:57 cibs joined #perl6
07:11 andrzejku hey why perl6 api
07:11 andrzejku is so complicated?
07:11 andrzejku native api
07:18 RabidGravy it's not
07:19 RabidGravy or at least I don't think so
07:19 samcv NativeCall you mean?
07:20 RabidGravy https://blog.toggl.com/2017/02/s​even-circles-of-developer-hell/ - the truth
07:20 samcv i didn't think it was that complicated. i mean not sure how it's supposed to be easier. maybe we need more example code
07:21 samcv but i've used it before and most annoying part was generating code for the structs and stuff from the header files
07:21 RabidGravy NativeCall examples are difficult because you either have to have a particular library or comple some C
07:21 samcv GPTrixie module was good in helping to generate some of it. then i took what I needed and cleaned it up a bit
07:22 RabidGravy yes, gptrixie does save some typing, but i always end up redoing most of it by hand
07:22 samcv it is useful depending on what you're doing
07:23 RabidGravy if nothing else it saves having the include file open in one window and trabsliterating to perl in another :)
07:24 samcv yes
07:27 bjz joined #perl6
07:29 rindolf joined #perl6
07:30 andrzejku tell me why Ruby Rice
07:30 andrzejku you can make C++ to ruby binding by creating special C interface sources
07:31 andrzejku in perl6 i open these tests yesterday and start reading it and it was so hard as fuck
07:32 samcv what tests?
07:32 samcv in roast?
07:33 andrzejku https://github.com/rakudo/rakudo/blob/​nom/t/04-nativecall/13-cpp-mangling.t
07:33 girafe joined #perl6
07:34 samcv you are trying to do C++ to perl 6 right, not c
07:34 andrzejku I want to
07:34 andrzejku now look I go at the first look
07:34 andrzejku what is going there
07:34 andrzejku and
07:34 andrzejku I read repr('CPPPointer')
07:34 andrzejku there only on sentence about repr
07:35 andrzejku It turns out that any class with the representation "CPointer" can serve this role.
07:35 samcv really? you don't have to do CPPointer?
07:35 samcv where id you read that
07:35 samcv oh actually that makes sense nm
07:35 andrzejku method new() is nativeconv('thisgnu') is native("./13-cpp-mangling") { * }
07:35 samcv nm
07:36 andrzejku I bind constructor
07:36 andrzejku but tell be why I should write all these 13-cpp-mangling all the time I guess that's binary
07:37 andrzejku what is nativeconv('thisgnu'?
07:37 andrzejku why I should write $.vtable
07:37 andrzejku that's very sick
07:37 samcv you got me on that one. i'm not sure. i'm guesing nativeconv may demangle the datastructure?
07:38 samcv idk i would try using it how they do in that, exactly and then see what happens when you don't include it
07:38 andrzejku I would rewrite that, but I am not an expert not even perler much
07:39 andrzejku there should be C++ code, even compile formula
07:39 andrzejku and perl binding with all explanation of every magick
07:40 samcv yes that would be nice if more documentation on the CPP part. but i would go ahead and try it. what are you trying to use it with?
07:40 andrzejku I come back home yesterday and was very tired, then decided to try make binding for SFML library
07:41 andrzejku and fall asleep by reading this :P
07:42 andrzejku here is cpp code https://github.com/rakudo/rakudo/blob/n​om/t/04-nativecall/13-cpp-mangling.cpp
07:42 samcv yeah i have it open in a tab
07:42 samcv ok nowmyspacebarisn'tworking
07:43 andrzejku :)
07:43 andrzejku if I ever get Perl job I would do more =D
07:43 samcv blew on it a bunch and now it's at least working. still not fully smooth
07:44 TEttinger the ol' game cartridge trick
07:45 andrzejku but probably the best thing would be to make Qt binding
07:46 samcv yes
07:51 rurban joined #perl6
07:52 stmuk joined #perl6
07:56 arnsholt The $.vtable is probably unnecessary in the test script (but might be necessary if you add data members to the struct; I dunno)
07:56 arnsholt nativeconv is calling convention
07:58 bjz joined #perl6
08:00 darutoko joined #perl6
08:01 xtreak joined #perl6
08:05 abraxxa joined #perl6
08:13 pyrimidine joined #perl6
08:17 Todd joined #perl6
08:18 Todd Fedora 25.  I can not get panda to install from git hub and Fedora is dragging their feet on it
08:18 Todd https://bugzilla.redhat.co​m/show_bug.cgi?id=1410159
08:18 Todd Is there any other way to install a module than panda?
08:18 salva joined #perl6
08:20 moritz yes, zef
08:21 Todd do you have a reference to the directions?
08:22 Todd Is this it?
08:22 Todd https://github.com/ugexe/zef/
08:23 moritz it is
08:24 Todd #@*% !!!
08:24 Todd which rakudobrew /usr/bin/which: no rakudobrew
08:28 wamba joined #perl6
08:29 bjz_ joined #perl6
08:31 Todd # yum --enablerepo=* install rakudobrew
08:31 Todd No package rakudobrew available
08:31 Todd so I am still screwed
08:31 moritz Todd: you're not
08:32 Todd Sound promising
08:32 moritz Todd: just scroll down a bit more to "manual"
08:33 moritz also, I highly recommend not giving up after the first thing you tried failed
08:33 moritz (you also could install rakudobrew without going through yum, but I don't think you need rakudobrew)
08:33 Todd You don't have any idea how many times I have tried to get panda to install!!!
08:34 Todd Thank you.  Right under my nose too!!!
08:35 andrzejku Todd, I use zef it looks better than panda
08:38 Todd cool
08:39 andrzejku I even installed moarvm thorough zef
08:39 andrzejku and you can easly upgrade all
08:43 Todd It is searching for dependancies right now
08:44 ZzZombo m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } };my $a=A.new;$a.a.push(1,2,3);say $_ for $a
08:44 camelia rakudo-moar 320c2f: OUTPUT: «A.new(a => [1, 2, 3])␤»
08:44 ZzZombo wat
08:46 Todd And it worked.  Sweet too!  I see why you guys like it!  Thank you!
08:46 Todd can zerf also be run as a user or does it have to be root?
08:46 * moritz only ever ran it as a user
08:47 moritz though I also installed it as a user
08:48 Todd Cool!
08:56 zakharyas joined #perl6
08:57 rumble joined #perl6
09:03 cibs joined #perl6
09:09 Todd joined #perl6
09:09 Todd now zef is giving me a hard time on Fedora 25.  it work perfectly on EL7.3
09:09 Todd ===> Testing: OpenSSL:ver('0.1.7'):auth('github:sergot') Cannot locate native library 'libssl.so': libssl.so: cannot open shared object file: No such file or directory
09:10 Todd rpm -qa \*openssl\* openssl-libs-1.0.2j-3.fc25.x86_64 openssl-1.0.2j-3.fc25.x86_64
09:10 gfldex did you asked strace if it actually tries to open it?
09:11 samcv Todd, do you have a /usr/lib/libssl.so
09:11 samcv ls -l /usr/lib | grep ssl
09:11 samcv also what gfldex said in case you have it for sure
09:11 samcv but it should work
09:11 samcv unless it specifies a version number it may not work (in the module)
09:12 Todd I just upgraded to openssl-1:1.0.2k-1.fc25.x86_64
09:12 Todd I will check on the lib
09:12 samcv you may have to make a link between the installed file and what it's looking for
09:13 Todd $ ls -l /usr/lib | grep ssl -rwxr-xr-x.  1 root root  313848 Nov 15 09:09 libssl3.so
09:14 Todd Yippee!  dnf upgrade openssl worked
09:14 pyrimidine joined #perl6
09:14 samcv only that? no making a link?
09:15 Todd I got lucky!!
09:16 Todd That's what I get for not running my upgrades/updates
09:16 jfuller joined #perl6
09:17 Todd turkey aborted again
09:17 samcv heh
09:17 samcv turkey?
09:17 Todd ===> Testing [FAIL]: OpenSSL:ver('0.1.7'):auth('github:sergot') Aborting due to test failure: OpenSSL:ver('0.1.7'):auth('github:sergot') (use --force to override)
09:17 Todd I will try --force
09:17 gfldex Todd: that modules is known to have a heisentest
09:17 ufobat_ joined #perl6
09:18 Todd what is "heisentest"?  Something to do with OpenSSL?
09:18 gfldex see https://en.wikipedia.org/wiki/Heisenbug
09:19 Todd chuckle!
09:19 cdg joined #perl6
09:20 Todd Now I get to troubleshoot my typos that escaped "perl6 -c xxx"
09:20 Todd Thank you guys for all the help!  You saved my butt with zef
09:23 Todd how to you set alternale library paths in perl 6.  I ciopied this from perl 5:
09:23 Todd ------> use lib /usr/s⏏hare/perl6/site/bin;
09:23 Todd Unsupported use of /s; in Perl 6 please use . or \N
09:24 arnsholt Not sure if we have use lib yet, but quotes around the path would probably be a start =)
09:24 moritz Todd: use a quoted string
09:24 moritz Todd: like everywhere where you use a string
09:25 Todd makes sence.  No quotes need in P5.  Nice clean up in 6
09:26 cibs joined #perl6
09:27 Todd perl -c  CimTrakCheckAndResatart.pl6 CimTrakCheckAndResatart.pl6 syntax OK
09:28 Todd but the syntax is not okay.  When I run it I get
09:28 ZzZombo joined #perl6
09:28 Todd 132: sub GetServiceStatus ( $ServiceName ) {
09:28 Todd Variable '$ServiceName' is not declared
09:29 Todd at /home/linuxutil/CimTrakCheckAndResatart.pl6:132
09:29 ZzZombo_ joined #perl6
09:37 moritz don't use perl -c when it's Perl 6 code
09:38 moritz also, perl6 -c has the same command line semantics as without -c
09:38 xtreak joined #perl6
09:38 Todd oops.  forgot the 6
09:38 Todd same error with perl6 -c though
09:38 moritz which means the first argument is a script, and everything after it are arguments to the script
09:39 Todd and I am inserting lnies with know error and still getting the error on the same line, so I got something off
09:39 cschwenz joined #perl6
09:39 Todd I thought -c was to check syntax
09:39 moritz so your invocation only checks the syntax of the first argument
09:39 cschwenz heads-up, pull request for rakudo star:  https://github.com/rakudo/star/pull/86
09:40 Todd And now the error is showing in -c.  I think I have to check all my quotes are complete
09:41 cschwenz Todd:  also, don't forget to check for unicode quotes.  mixing them and '/" will lead to a bad time
09:44 Todd thank you.  I will
09:44 Todd I am giving up for the night
09:54 xtreak joined #perl6
10:03 ZzZombo_ joined #perl6
10:08 araujo joined #perl6
10:16 ZzZombo__ joined #perl6
10:16 pyrimidine joined #perl6
10:16 ZzZombo joined #perl6
10:18 ZzZombo m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } };my $a=A.new;$a.a.push(1,2,3);say $_ for $a
10:18 camelia rakudo-moar 320c2f: OUTPUT: «A.new(a => [1, 2, 3])␤»
10:18 ZzZombo why does this not work as expected?
10:25 jnthn Because you stored it in a Scalar variable, which means it will be reated as an item
10:25 jnthn *treated
10:25 ZzZombo um
10:25 jnthn Works that way for Array too
10:25 ZzZombo m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } };my @a=A.new;@a.a.push(1,2,3);say $_ for @a
10:25 camelia rakudo-moar 320c2f: OUTPUT: «No such method 'a' for invocant of type 'Array'␤  in block <unit> at <tmp> line 1␤␤»
10:26 jnthn m: my $a = Array.new(1,2,3); .say for $a
10:26 camelia rakudo-moar 320c2f: OUTPUT: «[1 2 3]␤»
10:26 ZzZombo but that's not what I want, I want my class to be iterable.
10:27 jnthn Should it be indexable also?
10:27 jnthn If so you can do the Positional role and bind it to @foo
10:28 jnthn Can also store it in a sigilless variable, or de-itemize it at the point of iteration
10:28 jnthn m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } }; my \a = A.new; @a.a.push(1,2,3); say $_ for a
10:28 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3) { self.a.iterator } }; my \a = A.new; 7⏏5@a.a.push(1,2,3); say $_ for a␤»
10:28 jnthn m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } }; my \a = A.new; a.a.push(1,2,3); say $_ for a
10:28 camelia rakudo-moar 320c2f: OUTPUT: «1␤2␤3␤»
10:28 jnthn Like that
10:28 jnthn m: class A does Iterable { has @.a;method iterator(--> Iterator:D) { self.a.iterator } }; my $a = A.new; $a.a.push(1,2,3); say $_ for $a<>
10:28 camelia rakudo-moar 320c2f: OUTPUT: «1␤2␤3␤»
10:28 ZzZombo I did, but I am not sure what exactly my .iterator should do -- currenty returns @!array.iterator -- so I wanted to experiment.
10:29 jnthn Or that
10:29 ZzZombo <>? What's that? I don't recall seeing it in the docs in such form.
10:30 gfldex ZzZombo: your mind is mislead by assumptions
10:30 gfldex you are missing the fact that containers play as big a role for `for` as methods of the object that is contained in that container
10:30 jnthn Implementing iterator is relatively low-level, fwiw
10:31 jnthn It may be easier to just implement .list
10:31 jnthn m: class A { has @.a; method list() { @!a } }; my $a = A.new; $a.a.push(1,2,3); .say for @$a
10:31 camelia rakudo-moar 320c2f: OUTPUT: «1␤2␤3␤»
10:31 jnthn And yes, what gfldex said
10:33 gfldex i wonder if overloading .new to return a Slip might help for your case
10:33 nowan joined #perl6
10:46 rindolf joined #perl6
11:00 wamba joined #perl6
11:15 cschwenz left #perl6
11:20 Lucas_One left #perl6
11:32 suman joined #perl6
11:32 ZzZombo_ joined #perl6
11:32 ZzZombo_ joined #perl6
11:33 suman Hi everyone
11:34 DrForr Afternoon.
11:34 IOninja \o
11:35 suman I plan to write a course on "Nature in code, Biology in Perl 6" similar to this https://courses.edx.org/courses/co​urse-v1:EPFLx+NiC1.0x+3T2016/info
11:36 suman But what to do for plotting ? The author has used D3.js in his tutorial.
11:36 moritz Perl 6 has SVG::Plot, but that's rather basic
11:36 moritz you could write a small HTTP endpoint that exposes data as JSON, and use D3.js in the browser
11:36 suman I need a good descent plotting library in Perl 6. Anyone know about such good library? May be matplotlib!!
11:37 moritz or you could use Inline::Python with matplotlib or whatever else python has (probably more than Perl 5)
11:38 suman moritz "write a small HTTP endpoint that exposes data as JSON" any tutorial on this?
11:39 * llfourn uses plot.ly for plotting nowadays
11:39 moritz suman: dunno
11:42 itaipu joined #perl6
11:42 yadzi joined #perl6
11:44 jonas1 joined #perl6
11:44 llfourn suman: You could use something like this to expose the data to D3 https://github.com/tokuhirom/p6-HTTP-Server-Tiny
11:46 suman llfourn Ok I will see it
11:51 AlexDaniel joined #perl6
11:52 suman Would have been much better had there been a native Perl 6 plotting library. But I will prepare the above course.
11:53 suman For plotting I am not still clear. Ok bye guys.
11:53 llfourn o/
11:56 astj joined #perl6
12:00 astj joined #perl6
12:09 hudo joined #perl6
12:14 itaipu_ joined #perl6
12:17 pyrimidine joined #perl6
12:21 lukaramu joined #perl6
12:31 ZzZombo m: say %(a=>'x'){0..*}
12:31 andrzejku hey I cann't see raw sockets
12:31 andrzejku in Perl6 lib
12:31 camelia rakudo-moar 320c2f: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 7077888 bytes␤»
12:31 ZzZombo Is that expected?
12:32 ZzZombo I guess not, panic is panic.
12:33 andrzejku ZzZombo, that's nearly 6GB
12:33 llfourn ZzZombo: yes. Infinity > 6GB.
12:33 andrzejku check your RAM?
12:33 andrzejku and it looks like MoarVM got memory leak
12:33 andrzejku somewhere
12:34 andrzejku try to debug moarvm with your code
12:34 timotimo there are no raw sockets for perl6 yet
12:34 timotimo um, no.
12:35 timotimo you're trying to access an array with the key "0 1 2 3 4 5 6 " and so on and so forth
12:35 timotimo m: say (0..*).Str
12:35 camelia rakudo-moar 320c2f: OUTPUT: «0..*␤»
12:35 timotimo i wonder how exactly it stringifies so that it asplodes
12:35 timotimo ah, it does the list thing
12:35 timotimo so it tries to create an infinitely big list of results taken from your hash
12:36 ZzZombo "a RangeL<truncates|#Truncating slices> in [ ]"
12:36 ZzZombo https://docs.perl6.org/language/subscripts
12:36 gfldex it's search for keys for each elements of 0..*, what takes a very long time
12:41 kurahaupo joined #perl6
12:44 ZzZombo seriously, how do I force P6 to always output error location?
12:45 ZzZombo Right now it usually just spits out what went wrong but absolutely no hint as to where.
12:45 gfldex you do so by fixing all related bugs
12:46 ZzZombo what?
12:46 llfourn ZzZombo: it's always meant to output error location. If it doesn't it's a bug :)
12:47 kurahaupo_ joined #perl6
12:48 llfourn It would be great if you could send email to rakudobug@perl6.org with some code that errors wout with no location.
12:49 ZzZombo I believe that's some kind of a setting, since camelia always shows that, but my perl almost never.
12:49 itcharlie1 joined #perl6
12:50 AlexDaniel huh?
12:50 ZzZombo or maybe a very deliberate bug.
12:50 AlexDaniel what's your rakudo version, by the way?
12:50 ZzZombo This is Rakudo version 2017.01 built on MoarVM version 2017.01 implementing Perl 6.c.
12:53 ZzZombo How can I pass subscript slices just like subscripts work for arrays and hashes natively, so I could somehow save [1..3,5,8..*] into a va and later use that in an array?
12:54 ZzZombo a var*
12:54 timotimo "in an array"?
12:55 llfourn m: my @a = ^10; my $var = @a[flat 1..3,5,8..*]; say $var
12:55 AlexDaniel whoops…
12:55 ZzZombo use that to index into it
12:55 camelia rakudo-moar 320c2f: OUTPUT: «(timeout)»
12:55 llfourn hmm shouldn't that work?
12:55 timotimo m: my @things-i-want = |1..3,5,|8..*; my @all-things = (1000 .. 2000); .say for @all-things[@things-i-want]
12:55 camelia rakudo-moar 320c2f: OUTPUT: «No such method 'succ' for invocant of type 'Slip'␤  in block <unit> at <tmp> line 1␤␤»
12:56 timotimo m: my @things-i-want = |(1..3),5,|(8..*); my @all-things = (1000 .. 2000); .say for @all-things[@things-i-want]
12:56 camelia rakudo-moar 320c2f: OUTPUT: «1001␤1002␤1003␤1005␤1008␤1009␤1010␤1011␤1012␤1​013␤1014␤1015␤1016␤1017␤1018␤1019␤1020␤1021␤102​2␤1023␤1024␤1025␤1026␤1027␤1028␤1029␤1030␤1031␤​1032␤1033␤1034␤1035␤1036␤1037␤1038␤1039␤10…»
12:56 timotimo there you go
12:56 AlexDaniel llfourn: without flat, yes
12:56 timotimo one through three, five, eight through to the end
12:56 llfourn m: my @a = ^10; my $var = @a[1..3,5,8..*]; say $var
12:56 camelia rakudo-moar 320c2f: OUTPUT: «((1 2 3) 5 (8 9))␤»
12:56 llfourn m: my @a = ^10; my $var = flat @a[1..3,5,8..*]; say $var
12:56 camelia rakudo-moar 320c2f: OUTPUT: «(1 2 3 5 8 9)␤»
12:57 timotimo you'd want to slip instead of flat, i'd expect
12:58 ZzZombo that still leaves out code blocks, that are supported by native subscripts, and Whatever.
13:00 timotimo ok, so why not like this:
13:00 timotimo m: my $things-i-want = * div 2; my @all-things = ^100; say @all-things[$things-i-want]
13:00 camelia rakudo-moar 320c2f: OUTPUT: «50␤»
13:01 timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want]
13:01 camelia rakudo-moar 320c2f: OUTPUT: «(50 97 0 51 3)␤»
13:01 timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want]
13:01 camelia rakudo-moar 320c2f: OUTPUT: «(4 49 23 78 65)␤»
13:01 timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want]
13:01 camelia rakudo-moar 320c2f: OUTPUT: «(8 63 69 28 84)␤»
13:01 timotimo easy peasy?
13:02 gfldex ZzZombo: prefix:<||> is NYI, but you can emulate it with a callable
13:02 aborazmeh joined #perl6
13:02 aborazmeh joined #perl6
13:02 gfldex for single dim arrays that is
13:06 itaipu joined #perl6
13:06 IOninja m: my @a = ^10; my $var = @a[lazy flat 1..3,5,8..*]; say $var
13:06 camelia rakudo-moar 320c2f: OUTPUT: «(1 2 3 5 8 9)␤»
13:07 llfourn ^interesting :)
13:07 IOninja it stops at the end of array on lazy lists, but checks everything on non-lazy
13:09 llfourn m: my $x := flat 1..3,5,8..*; my $y := lazy flat 1..3,5,8..*; say $x.^name,$y.^name;
13:09 camelia rakudo-moar 320c2f: OUTPUT: «SeqSeq␤»
13:09 timotimo hm. i would sort of expect is-lazy to be set for that
13:09 llfourn m: my $x := flat 1..3,5,8..*; my $y := lazy flat 1..3,5,8..*; say $x.lazy,$y.lazy;
13:09 camelia rakudo-moar 320c2f: OUTPUT: «(...)(...)␤»
13:09 llfourn m: my $x := flat 1..3,5,8..*; my $y := lazy flat 1..3,5,8..*; say $x.is-lazy,$y.is-lazy;
13:09 camelia rakudo-moar 320c2f: OUTPUT: «FalseTrue␤»
13:09 IOninja timotimo: set is-lazy if at least one iterable is-lazy?
13:10 timotimo yeah, in infix:<,>
13:10 IOninja oh
13:10 timotimo or maybe in flat?
13:10 IOninja m: sub foo (
13:10 camelia rakudo-moar 320c2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub foo (7⏏5<EOL>␤»
13:10 IOninja m: sub foo (**@x) { dd @x }(1..3, 5, lazy 4..7)
13:10 camelia rakudo-moar 320c2f: OUTPUT: «Cannot .elems a lazy list␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:10 IOninja m: sub foo (**@x) { say @x }(1..3, 5, lazy 4..7)
13:10 camelia rakudo-moar 320c2f: OUTPUT: «[1..3 5 (...)]␤»
13:11 IOninja m: sub foo (**@x) { my $is-lazy = elems @x.first: *.is-lazy; dd $is-lazy }(1..3, 5, lazy 4..7)
13:11 camelia rakudo-moar 320c2f: OUTPUT: «Failure $is-lazy = Failure.new(exception => X::Cannot::Lazy.new(action => ".elems", what => Any), backtrace => Backtrace.new)␤»
13:11 IOninja err
13:12 IOninja m: sub foo (**@x) { my $is-lazy = @x.first(*.is-lazy).list.elems; dd $is-lazy }(1..3, 5, lazy 4..7)
13:12 camelia rakudo-moar 320c2f: OUTPUT: «Failure $is-lazy = Failure.new(exception => X::Cannot::Lazy.new(action => ".elems", what => Any), backtrace => Backtrace.new)␤»
13:12 IOninja m: sub foo (**@x) { my $is-lazy = @x.first(*.is-lazy) // 0; dd $is-lazy }(1..3, 5, lazy 4..7)
13:12 camelia rakudo-moar 320c2f: OUTPUT: «Seq $is-lazy = (4, 5, 6, 7, Nil, Nil, Nil, Nil, Nil, Nil... lazy list)␤»
13:12 IOninja #DontKnowHowToUseFirst
13:16 ZzZombo m: my @a = ^10; my $*x; $*x<y> = lazy flat 1..3,5,8..*; my $var = @a[$*x<y>]; say $var, %*x
13:16 camelia rakudo-moar 320c2f: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:16 IOninja m: sub foo (**@x) { my int $is-lazy = @x.map(*.is-lazy).first(*.so) || 0; dd $is-lazy }(1..3, 5, 4..7)
13:16 camelia rakudo-moar 320c2f: OUTPUT: «0␤»
13:16 ZzZombo IOninja ^
13:16 IOninja m: sub foo (**@x) { my int $is-lazy = @x.map(*.is-lazy).first(*.so) || 1; dd $is-lazy }(1..3, 5, 4..7)
13:16 camelia rakudo-moar 320c2f: OUTPUT: «1␤»
13:17 IOninja ZzZombo: ?
13:17 rurban joined #perl6
13:17 ZzZombo I can't apply your solution.
13:17 lizmat m: dd ("a",5e0,42).first(Int)
13:17 camelia rakudo-moar 320c2f: OUTPUT: «42␤»
13:18 lizmat m: dd ("a",5e0,42).first(Complex)
13:18 camelia rakudo-moar 320c2f: OUTPUT: «Nil␤»
13:18 lizmat first will always return a scalar value, be it Nil or the first element that smartmatches the condition
13:19 IOninja lizmat: what's a good (fast) way to see if any of the elements *.is-lazy?
13:19 wamba joined #perl6
13:19 pyrimidine joined #perl6
13:19 lizmat m: dd 42.is-lazy
13:19 camelia rakudo-moar 320c2f: OUTPUT: «Bool::False␤»
13:19 lizmat hmmm
13:20 jnthn I'd guess `defined @list.first(*.is-lazy)` should do it?
13:20 lizmat yeah
13:21 IOninja Thanks
13:21 lizmat I guess technically ~~ Nil would be correcter
13:21 lizmat or !~~ Nil  :-)
13:21 lizmat m: dd Nil.is-lazy
13:21 camelia rakudo-moar 320c2f: OUTPUT: «Bool::False␤»
13:22 lizmat yu[
13:22 IOninja timotimo: gonna commit the laziness improvement to &flat shortly
13:22 lizmat yup
13:22 llfourn IOninja++
13:23 IOninja so that flat(1..3,5,8..*).is-lazy is true
13:24 IOninja um
13:24 IOninja m: (1..3,5,8..*).flat.is-lazy.say
13:24 camelia rakudo-moar 320c2f: OUTPUT: «False␤»
13:25 IOninja Or maybe not :)
13:25 IOninja Yeah. I don't really understand what `.is-lazy` means, so I rather not muck with it :}
13:32 lukaramu_ joined #perl6
13:49 ZzZombo m: say 1 ~~ *
13:49 camelia rakudo-moar d41b68: OUTPUT: «{ ... }␤»
13:49 ZzZombo what is this?
13:49 ZzZombo m: dd 1 ~~ *
13:49 camelia rakudo-moar d41b68: OUTPUT: «{ ... }␤»
13:50 jnthn A closure that takes an argument and smartmatches 1 against it
13:50 jnthn m: say (1 ~~ *)(1)
13:50 camelia rakudo-moar d41b68: OUTPUT: «True␤»
13:50 jnthn m: say (1 ~~ *)(2)
13:50 camelia rakudo-moar d41b68: OUTPUT: «False␤»
13:50 jnthn Just like
13:50 jnthn m: say (1 + *)(3)
13:50 camelia rakudo-moar d41b68: OUTPUT: «4␤»
13:50 IOninja huh
13:50 IOninja IIRC ~~ is not meant to be curriable
13:51 jnthn It changed, though I think only in the year leading up to 6.c
13:51 AlexDaniel c: all say 1 ~~ *
13:51 jnthn 'cus people tripped over it not doing that so often in .grep and so forth
13:51 committable6 AlexDaniel, https://gist.github.com/4f99​efef0649beebe255eba382387b4f
13:52 ZzZombo smart-matching1 ~~ *returns True
13:52 ZzZombo https://docs.perl6.org/type/Whatever
13:52 IOninja Ah
13:52 IOninja m: say (* ~~ 1)(1)
13:52 camelia rakudo-moar d41b68: OUTPUT: «True␤»
13:52 IOninja m: say (* ~~ 1)(0)
13:52 camelia rakudo-moar d41b68: OUTPUT: «False␤»
13:52 IOninja hm
13:52 IOninja 00:29  brokenchicken  it ain't currying over the ~~
13:52 IOninja 00:30  TimToady  nope, it's one of the exeptions
13:52 IOninja https://irclog.perlgeek.de/​perl6/2017-02-02#i_14028467
13:53 mcmillhj joined #perl6
13:53 llfourn m: say (*.all ~~ 'meow')
13:53 camelia rakudo-moar d41b68: OUTPUT: «WhateverCode object coerced to string (please use .gist or .perl to do that)␤  in block <unit> at <tmp> line 1␤False␤»
13:53 llfourn m: say (* ~~ 'meow')
13:53 camelia rakudo-moar d41b68: OUTPUT: «{ ... }␤»
13:53 IOninja Ah, I get it now
13:53 andrzejku hey people
13:53 llfourn m: say (* !~~ 'meow')
13:53 camelia rakudo-moar d41b68: OUTPUT: «{ ... }␤»
13:54 IOninja \o
13:54 llfourn cool. Yeah I always thought that didn't work
13:56 ZzZombo m: my @a = ^10;my $*x;$*x<y>:=8..*; my $var = @a[$*x<y>]; say $var;say $*x
13:56 camelia rakudo-moar d41b68: OUTPUT: «Cannot coerce Inf to an Int␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:56 ZzZombo I give up
13:57 IOninja What are you trying to do?
13:58 ZzZombo A method of my class is supposed to return a range of elements
13:59 llfourn m: my @a = ^10;my $*x;$*x<y> = 8..*; my $var = @a[|$*x<y>]; say $var;say $*x # a | makes it work
13:59 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤{y => 8..Inf}␤»
13:59 ZzZombo Kill me
13:59 MilkmanDan joined #perl6
13:59 * IOninja stabs ZzZombo
14:00 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x
14:00 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤Dynamic variable $*x not found␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:00 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $y
14:00 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤8..Inf␤»
14:00 ZzZombo w- why
14:00 ZzZombo ...that works
14:01 llfourn I'm not too sure :\
14:02 IOninja Which part?
14:02 llfourn you used $*x<y> := 8..* so that should have gotten rid of normal hash scalar container
14:02 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x<y>.WHAT
14:02 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤(Failure)␤»
14:02 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x<y>.perl
14:02 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*x"), backtrace => Backtrace.new)␤»
14:02 llfourn I mean why doesn't the other one work
14:04 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 9 ~~ $*x<y>
14:04 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤False␤»
14:04 llfourn m: my @a = ^10;my %x;%x<y> := 8..*; my $var = @a[%x<y>]; say $var
14:04 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤»
14:04 llfourn hmmm
14:04 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 8 ~~ $*x<y>
14:04 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤False␤»
14:04 ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 8 ~~ |$*x<y>
14:04 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤False␤»
14:05 ZzZombo that's... weird as hell
14:06 llfourn m: my @a = ^10;my $x = {};$x<y> := 8..*; say @a[$x<y>] # it works if make $x a {} first
14:06 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤»
14:06 ZzZombo aw, I forgot one question:
14:06 ZzZombo m: say 1 ~~ [1,2,3]
14:06 camelia rakudo-moar d41b68: OUTPUT: «False␤»
14:06 IOninja m: say 3 ~~ [1,2,3]
14:06 camelia rakudo-moar d41b68: OUTPUT: «False␤»
14:06 ZzZombo since then this doesn't work?
14:06 ZzZombo when*
14:06 llfourn m: say 3 ~~ [1,2,3].any
14:06 camelia rakudo-moar d41b68: OUTPUT: «True␤»
14:07 IOninja That question implies it ever worked :)
14:07 IOninja s: [1,2,3], 'ACCEPTS', \(1)
14:07 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/b​lob/320c2fb/src/core/List.pm#L647
14:07 ZzZombo I do recall it working.
14:07 IOninja Always returns false
14:07 IOninja u lie
14:07 IOninja c: all say 1 ~~ [1,2,3]
14:08 IOninja If these bots show anything is human memory is real crap :)
14:08 committable6 IOninja, https://gist.github.com/4644​f1b80af4d4ce87473ce48fc587b1
14:08 ZzZombo m: my @a = ^10;my %*x;%*x<y>:=8..*; my $var = @a[%*x<y>]; say $var;say %*x
14:08 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤{y => 8..Inf}␤»
14:08 IOninja ZzZombo: never worked.
14:08 llfourn IOninja++ #botfu
14:08 IOninja Well, it does work. It returns False just as expected :)
14:09 ZzZombo m: my @a = ^10;my %*x;%*x<y>:=8..*; my $var = @a[%*x<y>]; say $var;say %*x;say 8 ~~ %*x<y>
14:09 camelia rakudo-moar d41b68: OUTPUT: «(8 9)␤{y => 8..Inf}␤True␤»
14:10 ZzZombo was that P5 then?
14:10 ZzZombo yea, it works in P5.
14:11 IOninja heh
14:11 IOninja I thought they nixed the smartmatch?
14:12 huf no, it was consigned to eternal limbo
14:12 ZzZombo No, it's experimental, but that's it.
14:13 ZzZombo so the screw up was caused by $cont vs %cont somehow.
14:15 IOninja if it's real weird report it?
14:15 IOninja m: my $x; $x := 8..*; ()[$x];
14:15 camelia rakudo-moar d41b68: ( no output )
14:15 IOninja m: my $x; $x<y> := 8..*; ()[$x<y>];
14:15 camelia rakudo-moar d41b68: OUTPUT: «Cannot coerce Inf to an Int␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:16 llfourn it's not $cont vs %cont. if you init $cont = {} it works
14:16 IOninja m: my $x = {}; $x<y> := 8..*; ()[$x<y>];
14:16 camelia rakudo-moar d41b68: ( no output )
14:17 IOninja m: my $x = {}; dd $x<y>
14:17 camelia rakudo-moar d41b68: OUTPUT: «Any % = Any␤»
14:17 IOninja m: my $x; dd $x<y>
14:17 camelia rakudo-moar d41b68: OUTPUT: «Any $scalar = Any␤»
14:17 llfourn for some reason if you use := when autovivifying on some uninitialized variable you get a scalar container even though you asked not to have one.
14:17 llfourn IOninja++, yeah.
14:20 ZzZombo In other news, don't do perl6 -I lib -M <your module being developed> with the module containing code that runs by itself, if it causes an error you won't get any error location; I finally moved all that code into a separate .pl6 and now I know what and where breaks in the module.
14:23 llfourn ZzZombo: rakudobug@perl6.org # send email with that info there would be v helpful :)
14:23 DrForr That sounds like a bug that you need to file :)
14:23 ZzZombo Yea, later
14:23 IOninja Might already be filed; check perl6.fail
14:24 * llfourn learns about perl6.fail
14:24 IOninja Just don't go to perl6.wtf :)
14:25 llfourn I always do * I'm told not too :(
14:25 skids joined #perl6
14:26 llfourn it looks like we have not enough coverage :\
14:26 IOninja heh
14:26 IOninja the coverage tool is broken so it shows all zero
14:26 dalek snake: 39b2de1 | arnsholt++ | / (3 files):
14:26 dalek snake: Unbitrot code.
14:26 dalek snake: review: https://github.com/arnshol​t/snake/commit/39b2de1055
14:26 yoleaux 8 Feb 2017 13:26Z <timotimo> dalek: ahoi, please update that repo to use geth instead: Change the webhook to http://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
14:26 llfourn ok phew!
14:27 IOninja https://geth... also works
14:30 AlexDaniel .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to https://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
14:30 yoleaux AlexDaniel: I'll pass your message to dalek.
14:30 AlexDaniel arnsholt: ↑ :)
14:43 arnsholt Oh, right
14:43 arnsholt If you can't tell, it's been a while since I touched that code =D
14:44 lichtkind__ joined #perl6
15:02 sammers joined #perl6
15:03 ZzZombo s: postcircumfix:<{ }>, \(\SELF, \key )
15:03 SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
15:03 ZzZombo s: sub postcircumfix:<{ }>, \(\SELF, \key )
15:03 SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
15:03 ZzZombo s: postcircumfix:<{ }>, \(Hash, Str)
15:03 SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
15:04 IOninja s: postcircumfix:<{ }>, \(Hash, Str)
15:04 SourceBaby IOninja, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Calling postcircumfix:<{ }>() will never work with any of these multi signatures:␤    (\SELF, \key) ␤    (\SELF, \key, Mu \ASSIGN) ␤    (\SELF, \key, Mu :$BIND! is raw) ␤    (\SELF, \key, :$delete!, *%other) ␤    (\SELF, \key, :$exists!, *%other) ␤    (\SELF, \key, :$kv!, *%other) ␤    (\SELF, \key, :$p!, *%other) ␤    (\SELF, \key, :$k!, *%other) ␤
15:04 IOninja s: &postcircumfix:<{ }>, \(%, '')
15:04 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blo​b/d41b68e/src/core/hash_slice.pm#L6
15:04 ZzZombo s: &postcircumfix:<{ }>, \(%)
15:04 SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
15:04 ZzZombo omg
15:05 ZzZombo anyway, I don't see what multi handles %h<>
15:05 IOninja s: &postcircumfix:<{ }>, \(%)
15:05 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob​/d41b68e/src/core/hash_slice.pm#L156
15:06 IOninja s: %, 'ZEN-KEY', \()
15:06 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/​blob/d41b68e/src/core/Any.pm#L325
15:22 ggoebel joined #perl6
15:25 st_elmo joined #perl6
15:26 titsuki m: grammar G { token TOP { '[' \w+ ']' } }; G.parse('[bcd]').perl.say
15:26 camelia rakudo-moar d41b68: OUTPUT: «Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)␤»
15:26 titsuki m: grammar G { token TOP { '[' <-[a]>+ ']' } }; G.parse('[bcd]').perl.say
15:26 camelia rakudo-moar d41b68: OUTPUT: «Nil␤»
15:26 IOninja tokens don't backtrack
15:27 IOninja m: grammar G { token TOP { '[' <-[a\]]>+ ']' } }; G.parse('[bcd]').perl.say
15:27 camelia rakudo-moar d41b68: OUTPUT: «Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)␤»
15:27 IOninja m: grammar G { regex TOP { '[' <-[a]>+ ']' } }; G.parse('[bcd]').perl.say
15:27 camelia rakudo-moar d41b68: OUTPUT: «Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)␤»
15:27 IOninja m: grammar G { token TOP { '[' <-[a]>+? ']' } }; G.parse('[bcd]').perl.say
15:27 camelia rakudo-moar d41b68: OUTPUT: «Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)␤»
15:28 titsuki IOninja: thx! I understand.
15:30 pyrimidine general question: is there a best practice for plugins w/ Perl 6?  The typical way I have done this before is to load the appropriate module dynamically using a require, but it seems to be busticated due to lexical module changes: RT#130709
15:30 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130709
15:33 tony-o pyrimidine: you can use roles for that
15:33 pyrimidine tony-o: wouldn't that still need a require?
15:33 tony-o and then looking for them.  i wrote a convenience module for making 'plugin's easier too
15:33 pyrimidine tony-o: Pluggable?
15:34 tony-o yes
15:34 IOninja which has been busted for over a year now :P
15:34 tony-o oh.
15:35 IOninja https://github.com/tony-o/perl6-pluggable/issues/5
15:35 pyrimidine tony-o: I'm willing to bet it doesn't work... what IOninja said
15:35 pyrimidine yup
15:35 wamba joined #perl6
15:35 IOninja "While currently there's no solution" <-- I don't think that's accurate anymore
15:35 tony-o dang
15:35 pyrimidine IOninja: correct, I had a workaround within bioperl6 that dealt with this I think
15:36 pyrimidine https://github.com/cjfields/bioperl6/b​lob/master/lib/Bio/Role/Pluggable.pm6
15:36 pyrimidine just forgot to post it to that ticket
15:37 pyrimidine IOninja: I'm pretty sure this will bust with the issue w/ require
15:37 tony-o if you toss a PR my way i'll merge it in
15:38 pyrimidine tony-o: the problem is, I'm sure it will die here: https://github.com/cjfields/bioperl6/b​lob/master/lib/Bio/Role/Pluggable.pm6
15:38 pyrimidine ah crap: I meant here: https://github.com/tony-o/perl6-plugga​ble/blob/master/lib/Pluggable.pm6#L16
15:41 pyrimidine The problem is more fundamental; 'require' wasn't updated when lexical module loading was added (in the ticket llfourn++ indicated the problem: https://rt.perl.org/Public/Bug/Di​splay.html?id=130709#txn-1447365)
15:41 pyrimidine probably should move this to #perl6-dev
15:42 tony-o ah i see
15:44 tony-o m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if $mod::.^name !~~ Failure;
15:44 camelia rakudo-moar d41b68: OUTPUT: «loaded␤»
15:44 tony-o m: my $mod = 'Test512'; try require ::($mod); 'loaded'.say if $mod::.^name !~~ Failure;
15:44 camelia rakudo-moar d41b68: OUTPUT: «loaded␤»
15:44 tony-o hm
15:45 llfourn joined #perl6
15:45 tony-o m: my $mod = 'Test512'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure;
15:45 camelia rakudo-moar d41b68: ( no output )
15:45 tony-o m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure;
15:45 camelia rakudo-moar d41b68: OUTPUT: «loaded␤»
15:45 tony-o there we go
15:46 IOninja m: '/tmp/Foo.pm6'.IO.spurt: 「m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure;」
15:46 camelia rakudo-moar d41b68: ( no output )
15:46 IOninja m: use lib </tmp>; use Foo
15:46 camelia rakudo-moar d41b68: OUTPUT: «loaded␤»
15:46 IOninja m: use lib </tmp>; use Foo
15:46 camelia rakudo-moar d41b68: OUTPUT: «loaded␤»
15:46 IOninja cool
15:47 IOninja m: '/tmp/Bar.pm6'.IO.spurt: 「use Foo」
15:47 camelia rakudo-moar d41b68: ( no output )
15:47 IOninja m: use lib </tmp>; use Bar;
15:47 camelia rakudo-moar d41b68: OUTPUT: «loaded␤loaded␤»
15:47 pyrimidine IOninja: it seems to be linked to modules in a longer path.  A::B::C
15:47 IOninja Ah
15:48 pyrimidine which plugins would likely be
15:50 tony-o now i need to fix pluggable
15:50 tony-o i was flying a lot when that bug was logged, kind of bummed it's sat over a year
15:53 cale2 joined #perl6
15:53 cale2 why is our pod-to-html code written imperatively when we have grammars/actions? https://github.com/perl6/d​oc/blob/master/htmlify.p6
15:54 IOninja wat?
15:54 cale2 why is the htmlify.p6 code written with loops and tons of conditionals instead of parsing with a grammar?
15:55 IOninja parsing what?
15:55 cale2 parsing pod
15:55 IOninja It does no such thing.
15:55 ugexe parsing pod, or parsing the pod structure perl6 spits out?
15:56 cale2 I'm not sure
15:56 cale2 the htmlify code just seems like a perfect use case for grammar actions
15:56 cale2 curious why it's written like a C parser
15:56 IOninja Pod's parsed by the compiler
15:57 ugexe where do you see it parsing something?
15:57 cale2 https://github.com/perl6/doc​/blob/master/htmlify.p6#L486
15:58 cale2 also, this whole file https://github.com/perl6/doc/b​lob/master/lib/Pod/Htmlify.pm6
15:58 pyrimidine tony-o: I think the @*INC fix is easy enough, but the require fix is likely harder. nine++ was going to look at it but is probably busy
16:00 ugexe cale2: its reparsing the pod structure that was already parsed, and mostly just adding html-entities and other human friendly formatting
16:00 ugexe its not using a grammar because its already parsed, and its parsing the structure perl6 spits out
16:01 gregf_ joined #perl6
16:02 cale2 would it make sense to have the pod parsing be a plugin rather than built in to the compiler?
16:02 [Coke] cale2: the grammar and actions get it to the point where htmlify's extract-pod can get back a DS from the file's $=pod var.
16:02 cale2 that way people could have it parsed in different ways, using more custom grammars?
16:03 [Coke] cale2: you can already override the grammar.
16:03 llfourn joined #perl6
16:03 [Coke] which includes POD.
16:03 Possum joined #perl6
16:05 IOninja cale2: last I looked the Pod parsing bits weren't that easily decoupled from the rest of the system, at least right now, simply because it's bits of it can be placed in all the nooks and cranies of the code
16:05 tony-o pyrimidine: another difficult angle now is that CUR's are advanced enough to not just be able to look at the directory structure, so it needs to handle JSON files, directory structures, etc
16:05 cale2 It just makes sense to me that parsing and outputting HTML would be one step with grammars+actions
16:06 cale2 adding on a mess of code afterwards seems like a lot of extra work
16:06 tony-o pyrimidine: on the other hand, it could hot load modules from the internet that way too (if a tmp dir is writable)
16:06 IOninja cale2: why mess?
16:06 tony-o okay i have to do real job for a while and then i'll be back
16:08 IOninja cale2: Pod::To::Text looks pretty straightforward to me: https://github.com/rakudo/rakud​o/blob/nom/lib/Pod/To/Text.pm6
16:09 IOninja cale2: you get Pod structure; do whatever the hell you want with it. Whereas if we exposed Actions as an API, we'd lock down our code parser pretty heavily.
16:09 cale2 IOninja: Pod-to-text looks nice. Not sure why the Docs code seems so unmaintainable
16:10 perlpilot cale2: you could always write a separate pod parser that does as you want.  :-)
16:10 IOninja cale2: because even the greatest coder doesn't produce top-shelf code all the time, and we have volunteers of all skill levels.
16:10 pyrimidine joined #perl6
16:10 IOninja cale2: and doc code generator does a lot more than just churn out HTML based on pod.
16:11 jsimonet joined #perl6
16:11 IOninja it makes separate routine pages for example, hence the code to fish those out
16:12 cale2 I get that it's all volunteers. But I'm terrified to change even one line of the code at this point haha
16:12 cale2 this is where type checking would be helpful xD
16:13 IOninja heh
16:16 perlpilot cale2: um ... what are you afraid of exactly?
16:17 perlpilot or are you saying that changing anything is just daunting?
16:17 MilkmanDan joined #perl6
16:18 Possum joined #perl6
16:18 [Coke] cale2: note that the pod 2 html code is in "Pod::To::HTML" - htmlify is extracting pod and re-organizing it.
16:19 MasterDuke_ i do wonder if incorporating DrForr's Perl6::Parser would help
16:19 * DrForr pricks up his ears.
16:20 MasterDuke_ DrForr: it now handles Pod, correct?
16:20 DrForr Incorrect, unfortunately.
16:21 khw joined #perl6
16:21 cale2 similar to Jar Jar, Perl6::Parser is the key to all of this...
16:21 mcsnolte joined #perl6
16:21 DrForr The core parser doesn't handle POD, so I'll have to write my own handling for it.
16:22 DrForr Meesa no want refactor.
16:22 cdg joined #perl6
16:24 IOninja "The core parser doesn't handle POD so I'll have to write my own"... or improve the core one?
16:24 astj joined #perl6
16:25 jnthn DrForr: Perl6::Grammar does do Pod parsing
16:26 DrForr I must not have triggered the correct method then, I suppose.
16:26 jnthn :)
16:26 jnthn There's some hundreds of lines in the grammar that do Pod stuff. How it uses the result may be what trips you up
16:27 DrForr jnthn: Yeah, that's very likely it. If you look at the code I have those POD parsing terms in there, I just never got anything to match them.
16:27 jnthn iirc there's a Perl6::Pod that turns the match tree into Pod nodes
16:28 jnthn Rather than it going on in Actions
16:28 DrForr Ah, that's probably why I missed it. POD *is* in my list of things to get done, I just have other priorities at the moment.
16:29 Qwerasd joined #perl6
16:29 jnthn :)
16:30 IOninja m: say 4.99999999999999999999999 ~~ 0..^5
16:30 camelia rakudo-moar d41b68: OUTPUT: «False␤»
16:30 IOninja m: say 4.9999999999999999999999999​99999999999999999999999999 ~~ 0..^5
16:30 camelia rakudo-moar d41b68: OUTPUT: «False␤»
16:30 IOninja m: say 4.9999999999999999999999999999​99999999999999999999999999999 ~~ 0..^5
16:30 camelia rakudo-moar d41b68: OUTPUT: «True␤»
16:31 IOninja :D
16:32 tony-o taking it to the nines
16:33 perlpilot I'm having trouble imagining how that happens.
16:33 IOninja magic
16:33 ugexe it techinically has to be infinite 9s right?
16:34 cale2 m: sub do-it($hello, --> 'hi') { return }; say do-it;
16:34 camelia rakudo-moar d41b68: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling do-it() will never work with declared signature ($hello --> "hi")␤at <tmp>:1␤------> 3do-it($hello, --> 'hi') { return }; say 7⏏5do-it;␤»
16:34 DrForr Gotta get outta here. I'll check out the Perl6::POD invocation tonight, maybe.
16:34 cale2 m: sub do-it($hello --> 'hi') { return }; say do-it;
16:34 camelia rakudo-moar d41b68: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling do-it() will never work with declared signature ($hello --> "hi")␤at <tmp>:1␤------> 3 do-it($hello --> 'hi') { return }; say 7⏏5do-it;␤»
16:34 cale2 m: sub do-it($hello --> 'hi') { return }; say do-it('bye');
16:34 camelia rakudo-moar d41b68: OUTPUT: «hi␤»
16:34 ugexe ah im thinking for ==, not ~~
16:34 cale2 m: sub do-it($hello, --> 'hi') { return }; say do-it('bye');
16:34 camelia rakudo-moar d41b68: OUTPUT: «hi␤»
16:35 IOninja perlpilot: in smaller case the denominator noise makes it lower than what it should be so the math ends up making it larger than 5, in the longer case, the denominator noise makes it larger than it's supposed to be and comparison succeeds
16:36 perlpilot I'll be happy with "denominator noise" for now.
16:37 holyghost joined #perl6
16:38 IOninja ugexe: mathematically yeah, 4.9 with infinitely repeating 9s are the same as 5
16:38 * IOninja almost got banned from #math a while back for asking about that... they thought I was trolling
16:39 IOninja perlpilot: I can shorten it to "bug" :)
16:39 IOninja m: say 4.99999999999999999999999 ~~ 0..^5
16:39 camelia rakudo-moar d41b68: OUTPUT: «False␤»
16:39 IOninja m: say <4.99999999999999999999999> ~~ 0..^5
16:39 camelia rakudo-moar d41b68: OUTPUT: «True␤»
16:39 perlpilot oh, definitely.  But was trying to grok the nature of the bug.
16:39 IOninja Magic trick :)
16:45 astj joined #perl6
16:47 Geth ¦ Pod-To-HTML/WildYorkies-patch-1: 5cc8a14153 | Cale++ | lib/Pod/To/HTML.pm
16:47 Geth ¦ Pod-To-HTML/WildYorkies-patch-1: Update HTML.pm
16:47 Geth ¦ Pod-To-HTML/WildYorkies-patch-1:
16:47 Geth ¦ Pod-To-HTML/WildYorkies-patch-1: group multis together, change a multi to a switch, utilize samewith instead of recurse, s/returns/--> Str/
16:47 Geth ¦ Pod-To-HTML/WildYorkies-patch-1: review: https://github.com/perl6/Po​d-To-HTML/commit/5cc8a14153
16:47 Geth ¦ Pod-To-HTML: WildYorkies++ created pull request #25: Update HTML.pm
16:47 Geth ¦ Pod-To-HTML: review: https://github.com/perl6/Pod-To-HTML/pull/25
16:48 devmikey joined #perl6
16:48 [Coke] cale2: but I do agree that htmlify is hard to modify.
16:50 IOninja cale2: that patch is broken in several place. I suggest cloning the repo and running tests instead of using online editor...
16:51 [Coke] m: if 42, 44, 22 -> *@a { say @a.perl } # 105872
16:51 camelia rakudo-moar d41b68: OUTPUT: «[]␤»
16:51 [Coke] m: if 42, 44, 22 -> (*@a) { say @a.perl } # 105872
16:51 camelia rakudo-moar d41b68: OUTPUT: «[42, 44, 22]␤»
16:51 Qwerasd What does .perl do again?
16:51 IOninja Qwerasd: serializes to Perl 6 code
16:51 Qwerasd ah
16:52 Qwerasd Is it smart with it though?
16:52 [Coke] It's not perfect.
16:52 IOninja cale2: also, it may be worth measuring performance impact of that change. our docs build is superslow as it is.
16:52 Qwerasd m: my @arr = (0..10); say @arr.perl
16:52 camelia rakudo-moar d41b68: OUTPUT: «[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
16:52 IOninja Qwerasd: no, it's pretty dumb. You can't dump lazy stuff for example
16:53 IOninja m: (lazy 5).perl
16:53 camelia rakudo-moar d41b68: OUTPUT: «No such method 'lazy' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
16:53 IOninja wat
16:53 IOninja m: (lazy 5,).perl
16:53 camelia rakudo-moar d41b68: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:53 IOninja some of the circular stuff's broken
16:53 IOninja m: class C { has $.c is rw }; my $c = C.new; $c.c = $c; $c.perl.say
16:53 camelia rakudo-moar d41b68: OUTPUT: «(my \C_33233024 = C.new(c => C_33233024))␤»
16:54 IOninja that won't eval right
16:55 Qwerasd m: sub foo() { say "bar"; }; say foo().perl
16:55 camelia rakudo-moar d41b68: OUTPUT: «bar␤Bool::True␤»
16:55 Qwerasd hmm
16:55 Qwerasd m: sub foo() { say "bar"; }; say foo.perl
16:55 camelia rakudo-moar d41b68: OUTPUT: «bar␤Bool::True␤»
16:56 IOninja m: sub foo() { say "bar"; }; say &foo.perl
16:56 camelia rakudo-moar d41b68: OUTPUT: «sub foo () { #`(Sub|60167880) ... }␤»
16:58 cale2 IOninja: I'm of the mind that we should write code in good style and not worry about optimizing for speed. In any case, I'm not making drastic changes at all. Just refactoring for readability. Not adding guards or anything.
17:01 IOninja cale2: that might be a nice ideal in whatever place you've learned all of these fancy CS terms, but real world demands practicality.
17:03 cale2 No one is going to care about Perl6 if they look at the org maintained code and can't make any sense of it. It's not our fault if Rakudo isn't fast enough yet. That's a separate effort from writing code, don't you think?
17:04 [Coke] cale2: you're about a year late on the "isn't fast enough". That's actually one of the goals of the community for 2016-17
17:04 * perlpilot wonders what "fancy CS terms" cale2 used
17:04 [Coke] (to speed things up)
17:04 cale2 and I don't think bigotry against people that know "fancy terms" is helpful :P
17:04 cale2 I said "accumulator" once and now I'm a fancy man lol
17:04 [Coke] Ideally, things will get sped up in rakudo itself, but we also have to make the ecosystem -usable-, not just legible.
17:05 IOninja accumulator, imperative, list comprehension
17:06 perlpilot "list comprehension" is a fancy term; the others not so much  :)
17:07 El_Che have you tried to reverse the polarity?
17:07 perlpilot don't cross the streams though
17:08 llfourn joined #perl6
17:08 IOninja m: sub  x ($_) { when Int {}; when Num {}; when Str {}; when Complex {}; when Rat {} }; for ^20000 { $ = x $_ for 0, 0e0, '0', i, 0/0 }; say now - INIT now
17:08 camelia rakudo-moar d41b68: OUTPUT: «0.853962␤»
17:08 IOninja m: multi x (Int) {}; multi x (Num) {}; multi x (Str) {}; multi x (Complex) {}; multi x (Rat) {}; for ^20000 { $ = x $_ for 0, 0e0, '0', i, 0/0 }; say now - INIT now
17:08 camelia rakudo-moar d41b68: OUTPUT: «0.3636105␤»
17:08 IOninja m: say 0.85/.36
17:08 camelia rakudo-moar d41b68: OUTPUT: «2.361111␤»
17:09 Qwerasd Well, my short 2 days in the perl6 channel have showed that perl6 isn't right for me, goodbye now.
17:09 Qwerasd left #perl6
17:09 cale2 Qwerasd: that was a dramatic exit
17:10 IOninja cale2: in the context of the proposed change, no I don't agree. The change is minor but the above shows it has a 2x-3x performance impact. If that means the docs site takes 40m vs 20m, your appeal to no one caring about Perl 6 falls a bit flat.
17:11 cale2 IOninja: What would have caused such an impact? Changing a multi to a given?
17:11 IOninja cale2: it's not bigotry. I've done web dev for a decade and recall how no one could stfu about semantic markup and today people use divs all over the place without blinking an eye. Pragmatism over ideals wins. Same in this case.
17:11 sena_kun joined #perl6
17:12 perlpilot cale2: yes.
17:12 IOninja cale2: yes, something to do with dispatch cache or something or other.
17:13 perlpilot cale2: the logic for handling multis is fast-ish low level C code where as using a given puts all the logic in Perl space.
17:13 cale2 I like semantic markup though.... Now everyone writes a mess of jsx so it's pointless anyway heh
17:13 IOninja :)
17:14 IOninja cale2: note the impact may be different in the code you changed. I suggest testing (like running two doc builds with and without the change)
17:15 cale2 someone should gather up Qwerasd 's messages in here and find out where it all went wrong. Could be a good study in how not to approach Perl6
17:15 IOninja Didn't they say it was just isn't right for them and not that there was anything wrong with it?
17:16 IOninja wonder why the search don't bring up any results for nick `Qwerasd`
17:17 perlpilot cale2: or you could just /msg him or talk to him in #perl
17:17 IOninja oh right that wasn't a /quit :D
17:17 tony-o does HTTP::Client expect qs params to already be encoded?
17:18 MasterDuke_ the search has a couple days lag for its index, if he's only been here two days it maybe hasn't caught up yet
17:19 IOninja wonder why the search has a couple days lag for its index
17:19 IOninja :)
17:20 MasterDuke_ oops, it does say it's indexed up to today. maybe i was thinking of a time the indexer had died and moritz had to restart it
17:21 MasterDuke_ so yeah, odd nothing shows up for his nick
17:27 itaipu joined #perl6
17:32 pyrimidine joined #perl6
17:44 robertle joined #perl6
17:45 cale2 It just seems silly to me that Perl6 has a lot of great features, but most of them we can't use because they're slow. Why not just write kickass code and wait for a compiler to catch up. patient_bear.jpg
17:45 llfourn joined #perl6
17:45 IOninja You can use all of them.
17:46 mxco86 joined #perl6
17:46 moritz MasterDuke, IOninja: I've re-run the search indexer manually, now the search has some results
17:46 IOninja moritz: it's not the first time that I notice this sort of lag... is that on purpose?
17:48 IOninja cale2: wasn't it you asking about how to make your bunnies program faster the other day?
17:48 cale2 IOninja: Yeah, but I'm specifically talking about stuff like given/when being slower than multis
17:48 IOninja I don't understand why you think it's OK to make changes to that program to make it faster, but it's wrong to make same changes in the Pod::To::HTML
17:49 IOninja cale2: so you're saying the two should be of equal speed?
17:49 cale2 It's a difference of semantic changes (given/when vs multis) and changing an algorithm
17:51 * IOninja doesn't see the semantic difference
17:52 IOninja You do different things depending on the type of a thing.
17:52 IOninja in both cases
17:53 cale2 I also am confused. Because it's literally the same thing haha
17:57 moritz multi dispatch is very different from smart matching
17:58 moritz IOninja: re irclog index, not intentional
17:58 andrzejk_ joined #perl6
17:58 IOninja Is there semantic difference between a bunch of muties and a sub with a bunch of if statements?
17:59 IOninja If the end result is the same
18:02 IOninja Well, I've read all the statements by Qwerasd and my conclusion is they found the abundance of operators—especially those that differ from status quo—a turnoff.
18:04 IOninja And haven't explored much of the fun features like grammars and concurrency. Just a bunch of triangle reductions and ternaries.
18:05 mcmillhj joined #perl6
18:07 pyrimidine joined #perl6
18:07 cale2 "triangle reductions and ternaries" mr. fancy pants over here ;)
18:08 IOninja pfft... I'm a highschool AND college drop-out, gimme a break.
18:08 cale2 If Perl6 has "baby talk" and "adult talk", many operators would be considered swear words that babies should not use
18:10 lizmat IOninja: there's hope for you yet  :-)
18:15 IOninja If only because the distant learning school I'm currently enrolled in doesn't mind if I take 3-year breaks between classes :P
18:16 zakharyas joined #perl6
18:18 mcmillhj joined #perl6
18:20 IOninja yup, my account's still open...
18:29 mcmillhj joined #perl6
18:36 pyrimidine joined #perl6
18:36 yadzi joined #perl6
18:43 tony-o where do you live that could go to college without a hs diploma?
18:43 tony-o that you ^
18:43 Qwerasd joined #perl6
18:44 Qwerasd left #perl6
18:46 llfourn joined #perl6
18:47 IOninja tony-o: got HS diploma in Russia and went to college in Russia; dropped out of it. Then, moved to US, and since curriculum differs, I could transfer only part of credits I earned, so I had to go back to HS to earn the missing credits. Then moved to Canada, dropped out of HS after half a year. Hence two drops out. And if I complete the distance learning thing, I'll own two highschool diplomas :}
18:51 espadrine joined #perl6
18:53 IOninja cale2: should the branch created for this PR be deleted? https://github.com/perl6/Pod-To-HTML/pull/25
18:53 cale2 yeah i closed it
18:54 IOninja OK
18:54 * IOninja clicks the 'delete branch' button
19:01 rindolf joined #perl6
19:04 IOninja cale2: I now regret a bit telling you about the multi slowness, since Pod::To::HTML does need a lot a love...
19:05 IOninja cale2: I'm not the king of all the code. You have the same commit bit I do.
19:05 cale2 Well the complaints in that file are things like "multis look like spagetthi code", but it turns out we need the multis haha
19:05 IOninja Doesn't mean you have to close the PR just because I don't like it.
19:05 IOninja OK
19:07 El_Che IOninja: strange system about HS credits. I don't think it works like that in most European countries
19:07 tony-o IOninja: interesting
19:09 DrEeevil El_Che: it mostly does. Pretty arbitrary sanctions against foreign courses
19:10 DrEeevil just within the EU it's mostly harmonized now with ECTS and other madness that causes other problems
19:11 IOninja El_Che: I guess it's about prerequisite credits in colleges and unis. I need $x amount of English credits and obviously I didn't earn those in Russia. And in some cases you need a 12-th grade credit, but to earn that credit you must have 11-th grade credit, and so on. Strictly speaking, in Canada, I'd have to start with middleschool French to earn the 12-grade graduation credit, but luckily it's possible to
19:11 IOninja make an arrangement to swap French with Russian credits.
19:11 El_Che DrEeevil: non EU high education degrees are hard indeed. But high school doesn't need to be converted. It's up to the University to accepted or not (talking about Belgium)
19:12 lizmat joined #perl6
19:12 El_Che -ed
19:13 stmuk I don't think different countries have much similarity in education systems
19:14 IOninja Yup, I went to college when I was *14*. Which is just a year younger than normal, but in North America makes people think I'm a genius :P
19:14 El_Che I have the page here open (in dutch), but when I click on english I get the home
19:14 DrEeevil El_Che: in germany there are some pretty coherent guidelines, but it's still not guaranteed
19:15 El_Che it says you can start an equivalence process, but you need to make sure if it's needed. If the goal is higher education, no equivalence is needed
19:16 El_Che for all other cases, it sucks pretty much if your degree is not EI
19:16 El_Che EU
19:16 stmuk in Soviet Russia High School Diploma takes *you*
19:16 El_Che IOninja: kudos for picking it up again. It sounds very frustrating
19:17 IOninja I have just 1 course left (English), but I stopped doing it three years ago because I hate it...
19:18 El_Che 1?
19:18 IOninja yup
19:18 El_Che finish that, man
19:18 IOninja yeah, I should...
19:18 El_Che 1 is just too close
19:19 El_Che so we have DrEeevil and DrForr. I wonder who's the biggest villain
19:20 moritz DrEevilForr, of course :-)
19:20 IOninja :)
19:21 El_Che DrEevilForrEver
19:21 DrEeevil I resemble that remark!
19:23 girafe joined #perl6
19:31 stmuk
19:31 stmuk oops
19:31 mscha joined #perl6
19:31 IOninja !    ?!
19:32 mscha m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b) }; say @arr;
19:32 camelia rakudo-moar 7010ae: OUTPUT: «[(8 13) (8 13) (8 13) (8 13) (8 13)]␤»
19:32 mscha Is this a bug or a feature?
19:33 IOninja Normal behaviour/.
19:33 IOninja You're stuffing the exact same containers into the array, so they all get updated on each iteration and end up the same
19:33 mscha So how do I make it DWIM?
19:34 AlexDaniel m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: [$a, $b] }; say @arr;
19:34 camelia rakudo-moar 7010ae: OUTPUT: «[[1 2] [2 3] [3 5] [5 8] [8 13]]␤»
19:34 IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b).Array.List }; say @arr;
19:34 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:34 mscha OK, thanks.
19:34 IOninja one way
19:34 DrFivve MUAHAHA
19:34 IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($ = $a, $ = $b) }; say @arr;
19:34 camelia rakudo-moar 7010ae: OUTPUT: «[(8 13) (8 13) (8 13) (8 13) (8 13)]␤»
19:34 AlexDaniel honestly, I don't understand why that happens
19:34 IOninja err
19:34 IOninja that's same difference
19:35 pyrimidine joined #perl6
19:35 IOninja Ah
19:35 IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a<>, $b<>) }; say @arr;
19:35 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:35 IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b)».<> }; say @arr;
19:35 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:35 IOninja moar ways.
19:36 mscha What does <> do?
19:36 IOninja decont
19:36 labster joined #perl6
19:36 mscha What's that in English?  ;)
19:36 IOninja well, in this case.
19:36 IOninja mscha: I don't understand containers.
19:36 IOninja mscha: basically the issue is 'cause you'
19:37 IOninja mscha: basically the issue is 'cause you're using the same container. Decont = de-containerize, you're removing value from its container so there's no reuse
19:37 mscha OK, thanks.
19:37 IOninja There's something in the docs maybe
19:37 MasterDuke m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a.clone, $b.clone) }; say @arr;
19:37 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:37 AlexDaniel m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: (item($a), item($b)) }; say @arr
19:37 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:37 mrdside joined #perl6
19:38 IOninja .clone is probably too big a hammer and slow
19:38 mscha m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b).clone }; say @arr;
19:38 camelia rakudo-moar 7010ae: OUTPUT: «[(8 13) (8 13) (8 13) (8 13) (8 13)]␤»
19:38 AlexDaniel m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: (|$a, |$b) }; say @arr
19:38 camelia rakudo-moar 7010ae: OUTPUT: «[(1 2) (2 3) (3 5) (5 8) (8 13)]␤»
19:38 IOninja and here you've cloned the list, but the clone still has the same containers
19:40 IOninja "<AlexDaniel> honestly, I don't understand why that happens". 'cause each element in the list is the same container and its value gets updated on each iteration.
19:40 AlexDaniel that I understand, but I where it says that it is the container that should be passed and not the value
19:41 AlexDaniel I'd expect some special syntax for that or something
19:41 IOninja ah
19:41 AlexDaniel just looking at that code I would've thought that this is what it does
19:42 AlexDaniel and now I wonder, are there any other places where you can shoot yourself in the foot similarly?
19:43 timotimo when you pass something to a function, you usually get the value re-containerized
19:43 timotimo that's how we enforce read-only-ness
19:43 IOninja m: .say, .say with [<a b c>].map({s/././})
19:43 camelia rakudo-moar 7010ae: OUTPUT: «(「a」 「b」 「c」)␤(「c」 「c」 「c」)␤»
19:43 IOninja AlexDaniel ^ that'd be another place
19:43 timotimo m: sub dotest { my $a = 10; othertest($a, { $a += 5 }); say $a }; sub othertest($val, &code) { say $val; code; say $val }
19:43 camelia rakudo-moar 7010ae: ( no output )
19:44 timotimo m: sub dotest { my $a = 10; othertest($a, { $a += 5 }); say $a }; sub othertest($val, &code) { say $val; code; say $val }; dotest
19:44 camelia rakudo-moar 7010ae: OUTPUT: «10␤10␤15␤»
19:44 timotimo ^- see how the code running increases the outer $a, but the $val isn't touched?
19:45 IOninja sure, you get a different container there.
19:45 IOninja in lists you don't, do you? The OP can be avoided by using an Array instead of a list, for example
19:45 AlexDaniel well, that's understandable
19:45 AlexDaniel but 「@a.push: ($a, $b)」… holy shit…
19:46 IOninja :)
19:46 AlexDaniel committable, where the f are you
19:46 IOninja pinged out again
19:46 timotimo right, clone and other similar things are only skin-deep
19:47 llfourn joined #perl6
19:48 committable6 joined #perl6
19:48 AlexDaniel hardcoded it to wilhelm.freenode.net
19:49 * IOninja reads https://docs.perl6.org/language/containers
19:50 * AlexDaniel files a bug report
19:50 AlexDaniel (well, that sounded confusing. “trap request”?)
19:51 AlexDaniel ok wait, we have this: https://docs.perl6.org/language/traps#​Containers_versus_values_in_a_Capture
19:51 AlexDaniel it talks about captures, yet I see no captures…
19:51 * IOninja waits for "Perl 6 Traps: The Book"
19:51 cibs joined #perl6
19:52 mrdside joined #perl6
19:52 IOninja man, that page is sure full of "pointer" stuff...
19:52 AlexDaniel IOninja: I suspect we'll never see that book given that this part of our docs is pretty good :P
19:53 IOninja Make the book. ???. Profit
19:53 perlpilot "There is no trap.  The End"  :)
19:53 kybr joined #perl6
19:54 IOninja Pretty good traget audience too: for people who love Perl 6, to learn more about it; for people who hate Perl 6, to make fun of it.
19:54 IOninja The WATs of JavaScripts are pretty popular...
19:55 timotimo and "puzzlers" exist for many languages
19:57 MasterDuke joined #perl6
19:57 IOninja How come you can't rebind my \foo vars?
19:58 IOninja m: my $x := 42; say $x; $x := 72; say $x
19:58 camelia rakudo-moar 9e9a4a: OUTPUT: «42␤72␤»
19:58 IOninja m: my \x := 42; say x; x := 72; say x
19:58 camelia rakudo-moar 9e9a4a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3my \x := 42; say x; x := 727⏏5; say x␤»
19:58 IOninja m: my \x := 42; say x; say x
19:58 camelia rakudo-moar 9e9a4a: OUTPUT: «42␤42␤»
19:58 IOninja you did it once; do it again; what's stopping it?
19:59 AlexDaniel ok, https://github.com/perl6/doc/issues/1216
20:00 timotimo it's meant to be single-static-assignment
20:00 timotimo i.e. no rebinding allowed
20:00 timotimo though i'm not sure how intended that really is
20:00 IOninja Ah
20:00 timotimo it's probably not doced well
20:02 kybr joined #perl6
20:05 Geth ¦ doc: 5bc72dc774 | (Zoffix Znet)++ | doc/Language/containers.pod6
20:05 Geth ¦ doc: Clarify statement that you can always assign to element of array
20:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5bc72dc774
20:06 Geth ¦ doc: 20499fed18 | (Zoffix Znet)++ | doc/Language/containers.pod6
20:06 Geth ¦ doc: Remove irrelevant prose
20:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/20499fed18
20:09 IOninja oh, it shows the binding to array elements later in the page ¯\_(ツ)_/¯
20:09 IOninja can't revert a commit from web? booo
20:10 moritz IOninja: should I revert one?
20:10 Geth ¦ doc: 7c3f853e5b | (Zoffix Znet)++ | doc/Language/containers.pod6
20:10 Geth ¦ doc: Revert "Clarify statement that you can always assign to element of array"
20:10 Geth ¦ doc:
20:10 Geth ¦ doc: This reverts commit 5bc72dc774866246bd883628c257672e882a6a4a.
20:10 Geth ¦ doc:
20:10 Geth ¦ doc: This stuff's explained later int he page.
20:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7c3f853e5b
20:10 IOninja Thanks, but I managed :)
20:15 moritz is there some kind of constant or so for the highest Unicode codepoint known to Perl 6?
20:15 moritz or maybe a range of known codepoints
20:15 IOninja m: 0x10FFFF.uniname.say
20:15 camelia rakudo-moar 8e8cd1: OUTPUT: «<illegal>␤»
20:15 * IOninja calls the police
20:17 moritz the upper limit can change for each new Unicode version, no?
20:17 Geth ¦ doc: a280123739 | (Zoffix Znet)++ | doc/Language/containers.pod6
20:17 Geth ¦ doc: Reword
20:17 Geth ¦ doc:
20:17 Geth ¦ doc: - ATM there's only one production version of Perl 6 and it has the described semantics
20:17 Geth ¦ doc: - Remove mention of Perl 5, to avoid implication of it being the "previous version."
20:17 Geth ¦ doc:     The way Perl 5 does things is a concern for 5-to-6 docs.
20:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a280123739
20:17 * gfldex nods
20:23 Geth ¦ doc: 1e3ce19caf | (Zoffix Znet)++ | doc/Language/containers.pod6
20:23 Geth ¦ doc: Fix incorrect output
20:23 Geth ¦ doc:
20:23 Geth ¦ doc: Changed by Rakudo's commits
20:23 Geth ¦ doc: https://github.com/rakudo/rakudo/commit/67aeefa and
20:23 Geth ¦ doc: https://github.com/rakudo/rakudo/commit/673f06b
20:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1e3ce19caf
20:24 samcv moritz, mostly no but theoretically maybe
20:25 AlexDaniel moritz: just use 10FFFF ?
20:25 samcv i mean the highest codepoint is prolly gonna stay the same for a while, but they may add more below thot. don't see them raising it from 10FFFF soon
20:25 gfldex m: 0x10FFFF.uniname.WHAT.say
20:25 camelia rakudo-moar 8e8cd1: OUTPUT: «(Str)␤»
20:25 Geth ¦ doc: e9d623e4fe | (Zoffix Znet)++ | doc/Language/containers.pod6
20:25 Geth ¦ doc: Fix typo / Break long line to multi-line in source
20:25 Geth ¦ doc:
20:25 Geth ¦ doc: s/in form of/in the form of/
20:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e9d623e4fe
20:25 gfldex that seams wrong
20:26 samcv why gfldex
20:26 samcv it is a string
20:26 AlexDaniel did you expect some exception or something?
20:26 gfldex it should be Nil
20:26 samcv m:  0x10FFFF.uniname.say
20:26 camelia rakudo-moar 8e8cd1: OUTPUT: «<illegal>␤»
20:26 AlexDaniel well, actually…
20:26 samcv nope
20:26 samcv should be <illegal>
20:26 gfldex it should at least be `but False`
20:26 ggoebel joined #perl6
20:26 samcv maybe <illegal-10FFFF>
20:27 samcv but def shouldn't return nothing
20:27 AlexDaniel m: say 0xF0000.uniname
20:27 camelia rakudo-moar 8e8cd1: OUTPUT: «<Plane 15 Private Use>␤»
20:27 samcv unicode gave it the name illegal
20:28 samcv so it's called illegal
20:28 samcv well sorta
20:28 Geth ¦ doc: 65f6cbc6bd | (Zoffix Znet)++ | doc/Language/containers.pod6
20:28 Geth ¦ doc: Fix typo
20:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/65f6cbc6bd
20:28 moritz "illegal" is a good name. Should've called one my daughters "illegal". :-)
20:28 IOninja m: my Int $x = 42; my Str $y; $x := $y; dd $x
20:28 camelia rakudo-moar 8e8cd1: OUTPUT: «Type check failed in binding; expected Int but got Str (Str)␤  in block <unit> at <tmp> line 1␤␤»
20:28 AlexDaniel m: 917729.uniname.say
20:28 camelia rakudo-moar 8e8cd1: OUTPUT: «<reserved>␤»
20:29 IOninja Am I not replacing the container above? Why does it still typecheck with the old container?
20:29 moritz IOninja: the type constraint is on the variable, not the container
20:29 IOninja OK, the docs then're wrong "The constraint is a property of the container, not the variable."
20:30 IOninja moritz: what's a "variable"?
20:30 moritz IOninja: a thig with a sigil in front
20:30 gfldex the type constraint is checked before the container is replaced
20:30 moritz *thing
20:30 samcv m: my $a; $a = Mu;
20:30 camelia rakudo-moar 8e8cd1: ( no output )
20:30 IOninja moritz: and the variable contains the container that contains the value?
20:30 samcv m: my Any $a; $a = Mu;
20:30 camelia rakudo-moar 8e8cd1: OUTPUT: «Type check failed in assignment to $a; expected Any but got Mu (Mu)␤  in block <unit> at <tmp> line 1␤␤»
20:31 moritz IOninja: yes
20:31 IOninja OK.
20:31 samcv Matryoshka
20:31 druonysus joined #perl6
20:31 moritz m: my Cool $x = 42; my Int $y = 4; $x := $y;
20:31 camelia rakudo-moar 8e8cd1: ( no output )
20:31 jnthn So far as I remember it, the compiler spits out a bind check against whatever you declared the type to be
20:31 moritz m: my Cool $x = 42; my Int $y = 4; $x := $y; $x = 'foo'
20:31 camelia rakudo-moar 8e8cd1: OUTPUT: «Type check failed in assignment to $y; expected Int but got Str ("foo")␤  in block <unit> at <tmp> line 1␤␤»
20:32 moritz hm, that speaks for the "type belongs to the container" theory
20:32 moritz m: my Cool $x = 42; my Int $y = 4; $x := $y; $x := 'foo'
20:32 camelia rakudo-moar 8e8cd1: ( no output )
20:32 moritz and is consistent with what jnthn++ said
20:32 jnthn m: my Cool $x; my Str $y; my Int $z; $x := $y; $x := $z
20:32 camelia rakudo-moar 8e8cd1: ( no output )
20:32 jnthn That it allows the rebind to Int after you bound Str is even more consistent wiht that :)
20:33 jnthn Assignment is an operation of a container
20:33 jnthn So it's about what the container thinks its type constraint is
20:33 jnthn Binding is a compile-time analyzed thing and it only cares for the type it can see at compile time
20:33 moritz IOninja: ok, I was wrong, listen to gfldex and jnthn
20:34 jnthn This is why you can't type-constrain our variables; we simply don't have the data around to enforce them.
20:34 gfldex if spend hours with camelia when I wrote that :)
20:34 moritz gfldex++
20:34 jnthn Note that you can assign at a distance, but not bind at a distance
20:35 jnthn m: my ($a, $b); ($a, $b) Z= (1, 2) # ok
20:35 camelia rakudo-moar 8e8cd1: ( no output )
20:35 jnthn m: my ($a, $b); ($a, $b) Z:= (1, 2) # nope
20:35 camelia rakudo-moar 8e8cd1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot zip with := because list assignment operators are too fiddly␤at <tmp>:1␤------> 3my ($a, $b); ($a, $b) Z:=7⏏5 (1, 2) # nope␤»
20:35 jnthn Or moreover
20:35 samcv too fiddly? is that a technical term :P
20:35 jnthn Yes ;-)
20:35 jnthn m: say &infix:<=>
20:35 camelia rakudo-moar 8e8cd1: OUTPUT: «sub infix:<=> (Mu \a, Mu \b) { #`(Sub+{Precedence}|53437232) ... }␤»
20:35 jnthn m: say &infix:<:=>
20:35 camelia rakudo-moar 8e8cd1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    infix:<:=> used at line 1. Did you mean 'infix:<=>', 'infix:<+|>', 'infix:<∖>', 'infix:<ne>'?␤␤»
20:35 jnthn There's no late-bound binding
20:36 IOninja samcv: quotation highlights is busted on this section. Should I file an issue? https://docs.perl6.org/languag​e/containers#Type_Constraints
20:36 jnthn Binding is actually what many languages use = for
20:36 * [Coke] hurls https://i.imgur.com/oxQLL6w.jpg for his .eu coding buddies.
20:36 moritz samcv: "fiddly" is TimToady-jargon :-)
20:36 moritz [Coke]: as a German, I concur :-)
20:37 gfldex IOninja: there is an issue for that already
20:37 IOninja OK
20:37 jnthn I accidentally had fun in Germany in the past. How do I atone? :)
20:37 IOninja Well, the language/containers page is pretty good. ++ to all who wrote it.
20:38 perlpilot S99:fiddly
20:38 synopsebot6 Link: http://design.perl6.org/S99.html#fiddly
20:38 perlpilot I wasn't sure the synopsebot6 was still alive
20:39 IOninja Though I'm still not very clear on what a variable is... there's a section on that talks about lexpads and stuff, but it ends saying it's a pointer to a container
20:39 IOninja .oO( BREAKING: Perl 6 core developer asking what's a variable!!! )
20:40 * IOninja waits for a blog post.
20:40 moritz IOninja: a variable is something that mostly lives in the compiler, not a runtime
20:40 samcv m: ‚test‘.say
20:40 camelia rakudo-moar 8e8cd1: OUTPUT: «test␤»
20:40 samcv IOninja, i will add that now, since quotation marks are pretty easy to add
20:40 IOninja samcv++ thanks
20:40 moritz IOninja: but mostly it's a mapping from a name to a lexpad entry (in the case of lexical variables)
20:41 samcv u: ‘
20:41 unicodable6 samcv, U+2018 LEFT SINGLE QUOTATION MARK [Pi] (‘)
20:41 jnthn I'd say thinking of variables as the syntactic thing that exists at compile time is pretty accurate
20:41 moritz (and the lexpad/lexpad entry are the runtime construct, but in the case of closures, there isn't a 1:1 mapping between the two)
20:42 jnthn Also that variable traits receive an object of type Variable, which doesn't exist in any way at runtime, it just conveys the compiler's view of the variable
20:42 IOninja A variable is an entry in the lexpad that points to a container that contains a value or to a value directly...
20:43 * IOninja spots https://github.com/rakudo/rakud​o/blob/nom/src/core/Variable.pm and reads it
20:43 samcv u: ‚
20:43 unicodable6 samcv, U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
20:44 mcmillhj joined #perl6
20:46 IOninja wow, didn't realize variables had so many traits
20:47 IOninja m: for ^5 { my $x will leave {say "hi"}; say "meow" }
20:47 camelia rakudo-moar 8e8cd1: OUTPUT: «meow␤hi␤meow␤hi␤meow␤hi␤meow␤hi␤meow␤hi␤»
20:47 IOninja hehe cool
20:47 perlpilot I suspect mostly they're just phasers
20:47 labster joined #perl6
20:47 IOninja yeah
20:48 IOninja bustified a bit tho:
20:48 IOninja m: for ^5 { my $x will pre {say "hi"}  = 42; say "meow" }
20:48 camelia rakudo-moar 8e8cd1: OUTPUT: «hi␤meow␤hi␤meow␤hi␤meow␤hi␤meow␤hi␤meow␤»
20:48 IOninja m: for ^5 { my \x will pre {say "hi"}  = 42; say "meow" }
20:48 camelia rakudo-moar 8e8cd1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Term definition requires an initializer␤at <tmp>:1␤------> 3for ^5 { my \x7⏏5 will pre {say "hi"}  = 42; say "meow" }␤»
20:48 vike joined #perl6
20:49 llfourn joined #perl6
20:52 Geth ¦ doc: a713fa1e61 | (Samantha McVey)++ | util/trigger-rebuild.txt
20:52 Geth ¦ doc: Trigger rebuild to pull in highlighter fixes
20:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a713fa1e61
20:53 samcv should be fixed now :)
20:58 IOninja sweet
21:00 yusrideb joined #perl6
21:02 user10 joined #perl6
21:03 nightfrog joined #perl6
21:06 cdg joined #perl6
21:11 Cabanossi joined #perl6
21:14 tyil good busy samcv
21:14 samcv hi tyil
21:14 tyil heil samcv
21:14 Geth ¦ doc/master: 4 commits pushed by (Will "Coke" Coleda)++
21:14 Geth ¦ doc/master: 64fe7400e4 | remove trailing whitespace
21:14 Geth ¦ doc/master: 5561873ffd | fix typo
21:14 Geth ¦ doc/master: 830e33b22e | fix extension
21:14 Geth ¦ doc/master: 6d2afb7113 | slight preference to amer-english
21:14 Geth ¦ doc/master: review: https://github.com/perl6/doc/c​ompare/a713fa1e61...6d2afb7113
21:14 dotness joined #perl6
21:14 tyil youre not breaking perl 6 are you
21:15 samcv ?
21:15 samcv no i am not
21:15 tyil good
21:15 tyil love you btw
21:15 samcv uh. o-ok
21:16 yusrideb How to start web application using perl6 ?
21:16 * [Coke] watches the creepy-meter tick up
21:17 pyrimidine joined #perl6
21:17 [Coke] yusrideb: Bailador is a very simple app framework you can use.
21:18 moritz or http://ugexe.com/hello-web-with-puree-perl-6/ if you want something more capable but less simple
21:21 yusrideb in perl5 I tried to make native web application without web framework, Can I start make web apps using native perl6 without framework ?
21:21 mcmillhj joined #perl6
21:24 moritz you can, but it's a lot of work
21:24 moritz I mean, the frameworks are also just written in perl
21:24 moritz your code can do everything that the frameworks do
21:24 moritz but the real question is: why?
21:25 yusrideb But I just want to think differently from the others, brother
21:26 moritz then Perl 6 is a good fit for you, I think :-)
21:27 El_Che hehe
21:28 dotness i thing going through the whole cycle from http request to http resp, in pure perl5/6 at least once in life really helps
21:28 timotimo andrzejku: did you know there's a c binding for sfml called csfml? it's official, too.
21:30 yusrideb in perl5 I've made several modules for web programming needs, such as Session management, Routing System, Page Management, and etc. But in perl6, where do I start ?
21:30 yusrideb I'm search google about perl6 CGI is a little result
21:30 timotimo well, cgi is a pretty old-timey way to get your app invoked by the web server
21:31 timotimo comes with lots of problems, too
21:31 gfldex if you want to start at the beginning you start here: https://docs.perl6.org/type/IO$C​OLON$COLONSocket$COLON$COLONINET
21:31 moritz yusrideb: http://modules.perl6.org/ has the list of existing modules
21:32 dotness go with HTTP::Server::Tiny or ::Simple , (unless you really want to write that ;) ) , and build your own request handling system
21:32 yusrideb in modules.perl6.org not pure CGI, where can I use ?
21:34 dotness and if you need to cover that with nginx (ie. for CORS problems) just start the HTTP::Server on one address/port and proxy the nginx requests there
21:34 mcmillhj joined #perl6
21:35 [Coke] CGI--
21:37 espadrine_ joined #perl6
21:37 yusrideb if I use apache2, how to configure apache for support perl6 ?
21:39 moritz yusrideb: you need some kind of middleware. One of them is FastCGI, another popular option is to configure apache2 as a reverse proxy, and have a pure Perl 6 web server running that it proxies to
21:44 yusrideb I think the use of Perl6 is more suitable for web sockets
21:45 yusrideb As a companion web applications from perl5.
21:46 IOninja yusrideb, I hacked up a little web up with HTTP::Server::Tiny which is rather barebones. It was enjoyable: https://github.com/perl6/routin​e-map/blob/master/bin/viewer.p6
21:47 bjz joined #perl6
21:48 espadrine_ joined #perl6
21:51 llfourn joined #perl6
21:51 yusrideb IOninja, I'm only want perl can run in popular webserver such apache, like perl5, can run in apache with simple configure
21:53 yusrideb If I had to find a way as perl5 do it for a web application in perl6, I really want to switch to perl6
21:57 mcmillhj joined #perl6
21:57 IOninja yusrideb, right, so stick something like this in /etc/apache2/sites-available: https://temp.perl6.party/perl6.party.conf
21:58 IOninja run a2ensite thenameofsite.conf
21:58 IOninja run apache2ctl restart
21:58 IOninja run the app on port 3000. Done
21:59 yusrideb IOninja : Can I run app on port 80 too ?
21:59 IOninja yusrideb: apache runs on it
21:59 IOninja and it rwverse proxies to yoyr app
22:00 IOninja You can add more config to make it serve static files bypassing your app too
22:00 IOninja and you can run certbot to enable HTTPS and the app can remain without any HTTPS handling in it, since apache does all that
22:01 IOninja port 3000 is just a locally available port, your site will be available through normal :80/:433 ports
22:02 sivoais joined #perl6
22:03 yusrideb I see perl6 very suitable for WebSockets, this becomes a consideration for me to perl6 for WebSockets, besides nodeJS.
22:07 IOninja yup, Perl 6's Supplies should map nicely onto web sockets
22:10 dotness joined #perl6
22:12 sivoais joined #perl6
22:16 TeamBlast joined #perl6
22:22 gdonald joined #perl6
22:25 LeCamarade joined #perl6
22:35 moritz https://gist.github.com/moritz/b​4b246c6f4759979df3434761383ecbc first draft of a blog post inspired by IOninja++'s question
22:35 moritz and now time to sleep for me :-)
22:36 IOninja moritz++
22:39 mcmillhj joined #perl6
22:39 TeamBlast joined #perl6
22:49 mindos joined #perl6
22:50 jeek joined #perl6
22:52 llfourn joined #perl6
22:55 timotimo i don't understand why perl6 would be better for websockets than for regular web requests, though?
22:55 gfldex it doesn
22:55 gfldex 't
22:55 IOninja I don't think it's 'than'... Just websockets.
22:56 IOninja I recall masak was praising supplies mapping nicely to websockets.
22:56 telex joined #perl6
22:56 gfldex there is no mod_perl6 yet, so integration into apache requires extra steps
22:57 timotimo i'm not sure mod_* is something to strive for
22:57 jnthn Websockets was one of the many use-cases I was thinking of when I did supplies. :)
22:57 IOninja "yet"? I thought learned our lessons with mod_perl and have moved on long ago.
22:58 IOninja *we
23:01 gfldex i didn't say it's a good idea. Culture is sticky tho.
23:02 mindos joined #perl6
23:03 TEttinger joined #perl6
23:03 * IOninja wonders whose culture
23:03 ggherdov joined #perl6
23:03 IOninja Considering Perl 5 treats mod_perl as something to avoid.
23:04 IOninja I recall sri mentioning that if your web framework don't provide its own server you can't really stay flexible enough to keep up with changes in Web properly.
23:05 w4and0er96 joined #perl6
23:05 espadrine like http2?
23:05 IOninja That's a good example.
23:06 IOninja Though this ancient issue contradicts the goodness :P https://github.com/kraih/mojo/issues/423
23:09 pnu__ joined #perl6
23:10 chansen_ joined #perl6
23:15 chansen_ joined #perl6
23:18 itcharlie1 left #perl6
23:25 dj_goku joined #perl6
23:25 dj_goku joined #perl6
23:25 astj joined #perl6
23:29 Possum joined #perl6
23:30 avalenn joined #perl6
23:43 lep-delete joined #perl6
23:53 llfourn joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo