»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:02 rurban1 left, risou is now known as risou_awy, lukiramu left 00:05 llfourn joined 00:08 kurahaupo_ joined 00:09 pyrimidine joined 00:11 kurahaupo left, kurahaupo` joined 00:13 kurahaupo` is now known as kurahaupo 00:14 pyrimidine left, kurahaupo_ left, Actualeyes joined 00:21 ZzZombo left 00:23 ZzZombo joined, ZzZombo is now known as Guest49318 00:25 cognominal left, mcmillhj joined, cognominal joined 00:26 ZzZombo_ joined, travis-ci joined
travis-ci Doc build passed. Cale 'change else-if to given/when switch' 00:26
travis-ci.org/perl6/doc/builds/204740788 github.com/perl6/doc/commit/8db2bcbc1d3f
00:26 travis-ci left 00:27 Guest49318 left 00:30 mcmillhj left, ZzZombo_ left 00:31 kurahaupo left 00:33 ZzZombo_ joined 00:35 pmurias left 00:38 ZzZombo_ left 00:39 itaipu left 00:41 itaipu joined 00:43 ZzZombo_ joined, mcmillhj joined 00:46 ZzZombo_ left 00:51 llfourn left, aborazmeh joined, aborazmeh left, aborazmeh joined 00:52 ZzZombo_ joined
IOninja m: sub ($k) { my $a = %(:42a, :72b){$k}; dd $a }('a') 00:52
camelia Int $a = 42
IOninja Is there some way to pack up that functionality into the signature?
AlexDaniel m: sub ($k, :$a = %(:42a, :72b){$k}) { dd $a }(‘a’) 00:55
camelia Int $a = 42
AlexDaniel :P
not what you wanted right
00:56 ZzZombo_ left
IOninja heh 00:56
gfldex is the Hash static? 00:57
IOninja yes
written by hand, right in the signature
gfldex then you could do 2 multies that forward to a common sub
AlexDaniel yup
IOninja Ok, nm then :)
b2gills m: sub ($k, $a = %(:42a, :72b){$k}){ $a }('b') 00:58
camelia ( no output )
b2gills m: say sub ($k, $a = %(:42a, :72b){$k}){ $a }('b' & 'a')
camelia all(72, 42)
gfldex m: sub s($k where $k = 42){ say $k }; s
camelia 42
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
camelia Too few positionals passed; expected 1 argument but got 0
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja That's a way to provide default value 01:00
b2gills m: sub s($k where ($k = 42)){ say $k }; s 8
camelia Cannot assign to a readonly variable ($k) or a value
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
b2gills m: sub s($k where $k = 42){ say $k }; s 0 01:01
camelia 0
gfldex m: sub s($k is rw where ($k = 42)){ say $k }; s 8
camelia Parameter '$k' expected a writable container, but got Int value
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja m: sub s($k is rw where ($k = 42)){ say $k }; s $=8
camelia Internal error: inconsistent bind result
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja m: sub s($k is rw where ($k = 42)){ say $k }; s $ = 8
camelia Internal error: inconsistent bind result
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
gfldex m: sub s($k is rw where (my $b = 42; $k := $b)){ say $k }; s 8
camelia 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
IOninja beat
*neat
b2gills It seems to be working just fine 01:02
AlexDaniel I wouldn't bet on it
IOninja It being what?
AlexDaniel it working fine, in a long term 01:03
IOninja "it" being what?
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 geekosaur left, Qwerasd joined
gfldex it did feel wrong to assing in a where clause but then I remembered that Perl 6 is a dynamic dynamic language. 01:05
b2gills It isn't assigning in a where clause. It is setting the default after the where clause 01:06
01:06 ZzZombo_ joined, ZzZombo_ left, ZzZombo_ joined, ZzZombo_ is now known as ZzZombo
AlexDaniel ah wait, how many times is it called? 01:06
b2gills except for the ones with parens around the assignment
AlexDaniel m: sub s($k is rw where ($k = 42)){ say ‘one?’; say $k }; s $ = 8
camelia Internal error: inconsistent bind result
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
01:06 geekosaur joined
AlexDaniel oops 01:07
IOninja m: sub s($ where (my $k = 42; True)){ say $k }; s 8
camelia Constraint type check failed for parameter '<anon>'
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
IOninja orly
AlexDaniel m: sub s($k is rw where {say ‘one?’; $k = 42)){ say $k }; s $ = 8
camelia 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…
AlexDaniel m: sub s($k is rw where {say ‘one?’; $k = 42}){ say $k }; s $ = 8
camelia one?
42
IOninja It's called twice on failure
b2gills m: sub s($k is rw where {$k = 42}){ say ‘one?’; say $k }; s $ = 8
camelia one?
42
IOninja m: sub s($k is copy where {$k = 42}){ say ‘one?’; say $k }; s 8 01:08
camelia one?
42
b2gills about the only thing that doesn't work as I'd expect is the one with a bare $k in the clause
01:12 telex left 01:13 travis-ci joined
travis-ci Doc build errored. Brad Gilbert 'map and grep for list comprehensions' 01:13
travis-ci.org/perl6/doc/builds/204742089 github.com/perl6/doc/compare/00d98...a6a83d98b9
01:13 travis-ci left 01:15 telex joined
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:16
01:17 daxim left, mcmillhj left 01:21 mcsnolte left
IOninja Check it: map.perl6.party/ 01:22
Map of Perl 6 Routines (edition #1)
nameless one is circumfix:<:{ }> 01:23
hm... it'd help if I bothered to escape HTML properly -_- 01:25
01:25 pyrimidine joined 01:27 kurahaupo joined
IOninja sauce: github.com/perl6/routine-map 01:29
01:30 pyrimidine left 01:33 kurahaupo left 01:45 risou_awy is now known as risou 01:47 llfourn joined 01:51 adu joined 01:52 llfourn left 01:53 Qwerasd left
IOninja What META filed does the :auth get made of off? 01:54
*field
If I'm the author but I want the :auth to be TPF whatdoido 01:55
01:55 mcsnolte joined
IOninja well, don't matter much in this case I guess 'cause it ain't a module, but I still wanna know 01:55
ZzZombo can I pass custom parameters to my AT-KEY() method in my class somehow? 02:01
w/o overriding the whole postcircumfix:<{ }>
IOninja m: class { method AT-KEY ($x, :$foo) { say "$x $foo" } }.new<foo>:foo 02:03
camelia Unexpected named argument 'foo' passed
in block <unit> at <tmp> line 1
IOninja shrugs
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 foo True
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
camelia foo 42
02:05 pyrimidine joined 02:07 stmuk joined 02:09 stmuk_ left 02:11 espadrine left
ZzZombo m: my ($x,$y);($x,$y) >> !;say ($x,$y); 02:13
camelia 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);
ZzZombo m: my ($x,$y);($x,$y)>> !;say ($x,$y);
camelia 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
ZzZombo m: my ($x,$y);($x,$y)>>!;say ($x,$y);
camelia 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:13 stmuk left
ZzZombo m: my ($x,$y);($x,$y)»!;say ($x,$y); 02:14
camelia 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
ZzZombo m: my ($x,$y);($x,$y)»=Bool::True;say ($x,$y); 02:15
camelia 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
ZzZombo m: my ($x,$y);($x,$y)»=»Bool::True;say ($x,$y);
camelia 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
IOninja m: my $x = 'foo/bar'; $x .= split('/').tail; say $x
camelia (foo bar)
IOninja Why not? Silently fails to do what I wanted it to... sucks 02:16
ZzZombo: spaces are your friends
02:17 pyrimidine left
IOninja m: my ($x,$y); ($x,$y)».=not; say [$x, $y] 02:18
camelia [True True]
IOninja m: my ($x,$y); ($x,$y) »=» Bool::True;say ($x,$y);
camelia (True True)
ZzZombo beat me to it
IOninja ZzZombo: now you tell me why .tail doesn't work in $x .= split('/').tail :) 02:19
m: my $x = 'foo/bar'; dd $x .= split('/').tail; dd $x
camelia "bar"
List $x = $("foo", "bar")
IOninja Ah, I see
this blows
how to do it? 02:20
m: my $x = 'foo/bar'; $x .= split('/').=tail; $x 02:21
camelia WARNINGS for <tmp>:
Useless use of $x in sink context (line 1)
IOninja m: my $x = 'foo/bar'; $x .= split('/').=tail; say $x
camelia bar
IOninja That's how...
ZzZombo what, how did $x end up being a List?
02:21 itaipu left
IOninja return value of .split 02:21
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
camelia 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
IOninja m: my $x = 'foo/bar'; $x .= split('/').=[*-1]; dd $x
camelia No such method '&postcircumfix:<[ ]>' for invocant of type 'List'
in block <unit> at <tmp> line 1
IOninja hehe... ALMOST works :) 02:23
02:23 user__ joined
SmokeMachine m: my $x = 'foo/bar'; $x .= split('/').slip.tail; say $x 02:23
camelia No such method 'slip' for invocant of type 'List'
in block <unit> at <tmp> line 1
IOninja SmokeMachine: slip??
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
camelia Str $x = "bar"
Str $x = "bar"
IOninja m: my $x = 'foo/bar'; $x .= split('/').=AT-POS: [*-1]; dd $x
camelia Str $x = "bar"
AlexDaniel m: my $x = ‘foo/bar’; dd $x .= &{.split(‘/’)[*-1]}; dd $x 02:25
camelia Str $x = "bar"
Str $x = "bar"
IOninja m: my $x = ‘foo/bar’; dd $x .= {.split(‘/’)[*-1]}; dd $x
camelia 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…
IOninja I see
ZzZombo m: my @a=(1,False,Nil,123,.123);say @a.grep: Int:D
camelia (1 False 123)
IOninja m: my $x = ‘foo/bar’; dd $x .= *.split(‘/’)[*-1]; dd $x
camelia 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
ZzZombo huh, whoa
02:25 stmuk joined
SmokeMachine IOninja: I'm too sleepy... 02:25
IOninja ZzZombo: Bool are Int 02:26
ZzZombo Also why does docs.perl6.org/routine/grep miss arrays?
02:26 kalkin- left, yadzi joined
IOninja Why, if it isn't the time to use map.perl6.party to find out! :D 02:27
AlexDaniel m: my $x = ‘foo/bar’; dd $x .= &{ 42 }; dd $x 02:28
camelia Int $x = 42
Int $x = 42
AlexDaniel this is kinda interesting…
.oO( but pointless… )
hobbs ZzZombo: Array is a kind of List 02:29
SmokeMachine m: class C {has $.a .= &{ say "here"; 40 + 2 } }; say "before"; C.new 02:30
camelia before
here
SmokeMachine m: sub bla { say "here"; 40 + 2}; class C {has $.a = bla }; say "before"; C.new 02:32
camelia before
here
IOninja hm, I think there are duplicates in that map :}
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:33
02:34 AlexDaniel left
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
PHP has several times more of them
s/them/functions/;
ZzZombo BTW, where is its code? I mean postcircumfix:<{ }>, I figured I could copy-paste that, perhaps. 02:43
IOninja s: &postcircumfix:<{ }> 02:44
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/320c...lice.pm#L3
IOninja That entire file is it looks like
ZzZombo yea
IOninja updates map.perl6.party 02:45
OK, and now if you sort by name, you can see the answer to earlier question about docs.perl6.org/routine/grep 02:46
02:46 ilbot3 left
ZzZombo holy heavens, no, I don't touch that! 02:46
02:46 labster left
ZzZombo so I'm still looking for a way to pass custom named arguments into AT-KEY etc 02:46
IOninja That page is actually wrong. .grep's only defined for Any and Supply, there's no specific List candidate (nor an Array candidate, as the question asked); both are handled by the Any candidate
ZzZombo: do you know their names? 02:47
ZzZombo yes
02:48 ilbot3 joined, ChanServ sets mode: +v ilbot3, llfourn joined, aborazmeh left
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 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
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
camelia foo 42
IOninja ZzZombo: somming like that mabby? 02:50
02:51 Cabanossi left, Cabanossi joined
IOninja filter out your custom args into a dynamic var and forward processing to normal postcircumfix 02:51
ZzZombo I don't really get 02:52
$*EXTRA_STUFF = %(%_<foo bar>:kv:delete);
what exactly does that do? Especially the adverbs on it.
IOninja There's probably some other stuff you need to handle postcircumfix:<« »> and postcircumfix:«<< >>» maybe?
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:53 llfourn left
ZzZombo isn't it better written $*EXTRA_STUFF = %(%_<foo bar>:exists); ? 02:54
ah
okay
IOninja Oh wait, :kv returns a flat list of key/values, not pairs 02:55
m: my %h = :42a, :72b, :88c; dd %h<a b z>:kv:delete; dd %h 02:56
camelia ("a", 42, "b", 72)
Hash %h = {:c(88)}
IOninja m: my %h = :42a, :72b, :88c; dd %(%h<a b z>:kv:delete); dd %h
camelia Hash % = {:a(42), :b(72)}
Hash %h = {:c(88)}
IOninja m: my %h = :42a, :72b, :88c; dd %h<a b z>:kv:delete.hash; dd %h
camelia Hash % = {:a(42), :b(72)}
Hash %h = {:c(88)}
IOninja m: my %h = :42a, :72b, :88c; dd %h<a b z>:p:delete; dd %h
camelia (:a(42), :b(72))
Hash %h = {:c(88)}
IOninja :p does the pairs
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 ( no output )
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
camelia foo 42
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
camelia foo bar 42
IOninja w00t even that works
03:00 adu left, cdg left
IOninja ZzZombo: one niggle: you likely will have to export that multi to stuff where you class is being used 03:00
There's a Secret™ Unsupported™ API to make it work tho 03:01
ZzZombo shouldn't it get exported together with the class tho? 03:02
IOninja not by default 03:03
ZzZombo: also, an object can be passed around to places where neither class nor sub were exported to
m: ''.HOW.HOW.^name.say
camelia NQPClassHOW
IOninja m: ''.HOW.^name.say 03:04
camelia Perl6::Metamodel::ClassHOW
IOninja m: Perl6::Metamodel::ClassHOW
camelia Could not find symbol '&ClassHOW'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja ^ case in point
03:06 travis-ci joined
travis-ci Doc build passed. Cale 'get rid of given and alias' 03:06
travis-ci.org/perl6/doc/builds/204748398 github.com/perl6/doc/compare/8db2b...5a507b2927
03:06 travis-ci left
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 Unexpected named argument 'foo' passed
in block <unit> at <tmp> line 1
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 [("foo", "bar"), {:foo(42)}]
IOninja ZzZombo: ^ that's the Secret™ Unsupported™ API to make it work.
no idea how well that works with precompilation 03:10
03:14 labster joined, pyrimidine joined 03:18 pyrimidine left
ZzZombo m: my @a=(1,2,3,4);dd @a[*] 03:19
m: my @a=(1,2,3,4);dd @a[*-1]
camelia (1, 2, 3, 4)
Int @a = 4
ZzZombo I wonder how does it distinguishes that?
MasterDuke IOninja: given your recent work with .Rat candidates and such, what do you think about rt.perl.org/Ticket/Display.html?id=123957? 03:20
IOninja ZzZombo: one's Whatever another's a WhateverCode
Hm, weird. The mapper.p6 on this commit segfaults: github.com/perl6/routine-map/tree/...e2644caf6e 03:21
on 2017.01-172-g4efcc29
doesn't on previous commit
MasterDuke light up the dogbert11 signal! 03:23
IOninja Narrowed it down to `eager` inside sub find-symbols {}; Changing it to `@ = ` avoids the segfault. 03:25
03:26 noganex_ joined
IOninja This one: github.com/perl6/routine-map/blob/...p6#L52-L56 03:26
MasterDuke: as for what to think of ticket... ¯\_(ツ)_/¯ don't see a relation with .Rat stuff TBH 03:28
m: class RT123957 does Numeric {}; 1 + RT123957.new
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123957
camelia 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: rt.perl.org/rt3//Public/Bug/Displa...?id=123957
IOninja stupidass robot
03:29 noganex left
IOninja m: class Z123957 does Numeric {}; 1 + Z123957.new 03:29
camelia 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
MasterDuke not with .Rat specifically, but with maybe missing candidates
IOninja m: class Z123957 does Numeric { method Numeric { 42 } }; 1 + Z123957.new
camelia 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
MasterDuke m: say 1 + Numeric.new
camelia MoarVM panic: Memory allocation failed; could not allocate 82944 bytes
IOninja wat
m: class Z123957 does Numeric { method Numeric { 42 } }.^methods.say 03:30
camelia 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
IOninja m: class Z123957 does Numeric { }.^methods.say
camelia (exp log roots succ log10 pred Numeric ACCEPTS Bool gist DUMP)
IOninja s: Numeric.^pun, 'Numeric', \()
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/320c...Mu.pm#L433
IOninja Seems like this one needs to be tossed: github.com/rakudo/rakudo/blob/nom/...eric.pm#L5
Or rather made into a stub 03:31
MasterDuke building now 03:32
IOninja (and impls added to types that do the role or something like that).
MasterDuke build fails with it as a stub
IOninja m: Numeric.new.succ 03:33
camelia MoarVM panic: Memory allocation failed; could not allocate 121152 bytes
IOninja m: class :: does Numeric { multi method Numeric { rand } }.new.succ 03:34
camelia ( no output )
IOninja m: class :: does Numeric { multi method Numeric { rand } }.new.succ.say
camelia 1.9320177208834
IOninja What's OOM?
MasterDuke out of memory killer
IOninja ah 03:35
MasterDuke i get it instead of that panic if i run the code locally
luckily it usually kills the rakudo process
03:37 MasterDuke_ joined 03:40 MasterDuke left
MasterDuke_ oops, those last couple comments in -dev were meant for here 03:41
but that's probably a good a sign as any, i'm to bed 03:42
IOninja MasterDuke_: on second thought, making it a stub just postpones the badness 03:43
m: class :: does Numeric { multi method Numeric { class {} } }.new.succ.say
camelia Use of uninitialized value of type <anon|51215360> in numeric context
in block <unit> at <tmp> line 1
1
IOninja oh 03:44
m: class :: does Numeric { multi method Numeric { class :: does Numeric { } }.new.succ.say
camelia 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
IOninja m: class :: does Numeric { multi method Numeric { class :: does Numeric { } } }.new.succ.say
camelia Use of uninitialized value of type <anon|76848000> in numeric context
in block <unit> at <tmp> line 1
1
IOninja m: class :: does Numeric { multi method Numeric { class :: does Numeric { }.new } }.new.succ.say
camelia MoarVM panic: Memory allocation failed; could not allocate 121120 bytes
IOninja Here ^ you can still return crap from method Numeric and cause the OOM thing
MasterDuke_ m: say 1 + Int.new 03:45
camelia 1
MasterDuke_ m: say 1 + Real.new
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
camelia MoarVM panic: Memory allocation failed; could not allocate 131072 bytes
IOninja Same with Real
MasterDuke_ m: say 1 + Num.new
camelia 1
IOninja m: 1 ~ Stringy.new
camelia WARNINGS for <tmp>:
Useless use of "~" in expression "1 ~ Stringy.new" in sink context (line 1)
MasterDuke_ m: say 1 + Complex.new
camelia 1+0i
MasterDuke_ m: say 1 + Rat.new 03:46
camelia 1
MasterDuke_ m: say 1 + FatRat.new
camelia 1
IOninja I sure hope we have tests for THOSE basics :}
MasterDuke_ m: say 1 + Rational.new
camelia No appropriate parametric role variant available for 'Rational'
in block <unit> at <tmp> line 1
IOninja m: say 1 + Rational[Int,Int].new
camelia 1
IOninja it got bridge 03:47
03:47 llfourn joined
MasterDuke_ yeah, but causing the OOM killer to rear its ugly head isn't nice 03:47
03:47 Actualeyes left
IOninja m: class :: does Numeric { method Bridge { self.Num } } }.new.succ.say 03:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3 Numeric { method Bridge { self.Num } } 7⏏5}.new.succ.say
IOninja m: class :: does Numeric { method Bridge { self.Num } }.new.succ.say 03:48
camelia MoarVM panic: Memory allocation failed; could not allocate 82944 bytes
IOninja m: class :: does Numeric does Real { method Bridge { self.Num } }.new.succ.say
camelia 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
IOninja the OOM is there because the role doesn't do all the stuff it's meant to do... 03:50
I mean the class that does the role
m: class :: does Numeric { method Numeric { 'x' } }.new.succ.say 03:51
camelia 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
IOninja m: class :: does Numeric { multi method Numeric { 'x' } }.new.succ.say
camelia 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
IOninja m: class :: does Numeric { multi method Numeric { self } }.new.succ.say
camelia MoarVM panic: Memory allocation failed; could not allocate 131072 bytes
IOninja Feels like a documentation issue to me. 03:52
03:52 llfourn left
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:54
MasterDuke_ m: class :: does Real { multi method Real { self } }.new.succ.say 03:55
camelia 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
SmokeMachine IOninja: sorry, I did read pun and stub on the same phrase... so I have to paste it: github.com/FCO/Punnable
MasterDuke_ inconsistency there ^^^, the built in method Real is not multi, but the built in method Numeric is 03:56
IOninja m: CORE::('&infix:<+>').add_dispatchee: sub (Numeric $, Numeric $) { "sod off" }; say 1 + Numeric.new; say 42 + 5 03:58
camelia sod off
47
IOninja 11pm
IOninja drops to bed
03:59 cibs left
IOninja m: multi infix:<+> (Numeric $, Numeric $) { "sod off" }; say 1 + Numeric.new; say 42 + 5 03:59
camelia sod off
47
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
MasterDuke_ but i'm about to fall asleep on the keyboard here, so signing off for Real (i'm so punny) 04:00
04:01 mcsnolte left 04:09 xtreak joined 04:17 Actualeyes left 04:34 llfourn joined 04:46 daxim joined 04:49 khw left 04:54 Cabanoss- joined
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? 04:56
04:57 Cabanossi left, Cabanoss- is now known as Cabanossi 05:06 Michael__ joined 05:07 Michael__ is now known as Guest7356 05:09 Guest7356 left 05:17 skids left 05:26 Actualeyes joined
moritz ZzZombo: you have to make a decision which semantics that .push method follows 05:33
05:37 bwisti left 05:39 curan joined 05:49 xtreak left 05:50 toolforger joined
toolforger p6: 4.99999999999999999999999999999999 cmp 5.0 05:50
camelia WARNINGS for <tmp>:
Useless use of "cmp" in expression "4.99999999999999999999999999999999 cmp 5.0" in sink context (line 1)
toolforger p6: say 4.99999999999999999999999999999999 cmp 5.0
camelia Less
toolforger p6: say 4.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 cmp 5.0 05:51
camelia Less
toolforger p6: may Inf cmp Inf 05:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
may used at line 1. Did you mean 'max', 'say', 'map'?
toolforger p6: say Inf cmp Inf
camelia Same
toolforger p6: say 1/0 cmp 1/0
camelia Same
toolforger p6: say 1.0/0.0 cmp 1.0/0.0 05:54
camelia Same
05:56 xtreak joined 05:59 wamba joined
ZzZombo may I.live: forever 05:59
06:00 toolforger left
ZzZombo m: my @a=(1,2,3,4);dd @a[0..^2,3] 06:04
camelia ((1, 2), 4)
ZzZombo m: my @a=(1,2,3,4);dd @a[0..^2]
camelia (1, 2)
ZzZombo why the first is nested?
geekosaur because the result of the range is a list, not a slip 06:07
if I explicitly slip it, it works
m: my @a=(1,2,3,4);dd @a[|(0..^2),3]
camelia (1, 2, 4)
geekosaur (which actually surprises me a bit, apparently it passes the "slippiness" through) 06:08
ZzZombo m: say 1 ~~ (1,3) 06:10
camelia False
ZzZombo I swear it used to work to check if a value if in array.
06:12 ggoebel left 06:16 pyrimidine joined 06:21 pyrimidine left 06:25 ggoebel joined 06:27 Todd joined
Todd I have a panda problem 06:27
ZzZombo try zef
Todd I am trying to install Net::SMTP on Fedora Core 25
perl6 bootstrap.pl 06:28
==> 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)
I am stumped
by any chance does this mean that File::Find is missing? 06:30
06:33 Kaffe_ left
Todd Ooops. I am trying to install panda 06:34
I will post to the mailing list 06:37
bye
06:37 Todd left 06:40 Kaffe joined 06:47 ufobat_ joined 06:51 RabidGravy joined 06:53 andrzejku joined, hythem joined 06:55 cibs left 06:57 cibs joined, hythem left
andrzejku hey why perl6 api 07:11
is so complicated?
native api
RabidGravy it's not 07:18
or at least I don't think so 07:19
samcv NativeCall you mean?
RabidGravy blog.toggl.com/2017/02/seven-circl...oper-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
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
samcv GPTrixie module was good in helping to generate some of it. then i took what I needed and cleaned it up a bit
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
RabidGravy if nothing else it saves having the include file open in one window and trabsliterating to perl in another :) 07:23
samcv yes 07:24
07:27 bjz joined 07:29 rindolf joined
andrzejku tell me why Ruby Rice 07:30
07:30 wamba left
andrzejku you can make C++ to ruby binding by creating special C interface sources 07:30
in perl6 i open these tests yesterday and start reading it and it was so hard as fuck 07:31
samcv what tests? 07:32
in roast?
andrzejku github.com/rakudo/rakudo/blob/nom/...mangling.t 07:33
07:33 girafe joined
samcv you are trying to do C++ to perl 6 right, not c 07:34
andrzejku I want to
now look I go at the first look
what is going there
and
I read repr('CPPPointer')
there only on sentence about repr
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?
where id you read that
oh actually that makes sense nm
andrzejku method new() is nativeconv('thisgnu') is native("./13-cpp-mangling") { * }
samcv nm 07:36
andrzejku I bind constructor
but tell be why I should write all these 13-cpp-mangling all the time I guess that's binary
what is nativeconv('thisgnu'? 07:37
why I should write $.vtable
that's very sick
samcv you got me on that one. i'm not sure. i'm guesing nativeconv may demangle the datastructure?
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
there should be C++ code, even compile formula 07:39
and perl binding with all explanation of every magick
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
and fall asleep by reading this :P 07:41
here is cpp code github.com/rakudo/rakudo/blob/nom/...ngling.cpp 07:42
samcv yeah i have it open in a tab
ok nowmyspacebarisn'tworking
andrzejku :) 07:43
if I ever get Perl job I would do more =D
samcv blew on it a bunch and now it's at least working. still not fully smooth
TEttinger the ol' game cartridge trick 07:44
andrzejku but probably the best thing would be to make Qt binding 07:45
samcv yes 07:46
07:50 stmuk left 07:51 rurban joined 07:52 stmuk joined 07:53 bjz left
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
nativeconv is calling convention
07:58 bjz joined, xtreak left 08:00 darutoko joined 08:01 xtreak joined 08:05 abraxxa joined 08:13 pyrimidine joined 08:17 Todd joined
Todd Fedora 25. I can not get panda to install from git hub and Fedora is dragging their feet on it 08:18
bugzilla.redhat.com/show_bug.cgi?id=1410159
08:18 pyrimidine left
Todd Is there any other way to install a module than panda? 08:18
08:18 salva joined
moritz yes, zef 08:20
Todd do you have a reference to the directions? 08:21
Is this it? 08:22
github.com/ugexe/zef/
moritz it is 08:23
Todd #@*% !!! 08:24
which rakudobrew /usr/bin/which: no rakudobrew
08:28 wamba joined 08:29 bjz_ joined 08:30 bjz left
Todd # yum --enablerepo=* install rakudobrew 08:31
No package rakudobrew available
so I am still screwed
moritz Todd: you're not
Todd Sound promising 08:32
moritz Todd: just scroll down a bit more to "manual"
also, I highly recommend not giving up after the first thing you tried failed 08:33
(you also could install rakudobrew without going through yum, but I don't think you need rakudobrew) 08:34
Todd You don't have any idea how many times I have tried to get panda to install!!!
Thank you. Right under my nose too!!!
andrzejku Todd, I use zef it looks better than panda 08:35
Todd cool 08:38
andrzejku I even installed moarvm thorough zef 08:39
and you can easly upgrade all
Todd It is searching for dependancies right now 08:43
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 A.new(a => [1, 2, 3])
ZzZombo wat
Todd And it worked. Sweet too! I see why you guys like it! Thank you! 08:46
can zerf also be run as a user or does it have to be root?
moritz only ever ran it as a user
though I also installed it as a user 08:47
Todd Cool! 08:48
08:53 robertle left 08:56 zakharyas joined 08:57 rumble joined, xtreak left, grumble left, rumble is now known as grumble 09:02 cibs left 09:03 ufobat_ left, cibs joined 09:04 Todd left 09:09 Todd joined
Todd now zef is giving me a hard time on Fedora 25. it work perfectly on EL7.3 09:09
===> 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
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?
samcv Todd, do you have a /usr/lib/libssl.so 09:11
ls -l /usr/lib | grep ssl
also what gfldex said in case you have it for sure
but it should work
unless it specifies a version number it may not work (in the module)
Todd I just upgraded to openssl-1:1.0.2k-1.fc25.x86_64 09:12
I will check on the lib
samcv you may have to make a link between the installed file and what it's looking for
Todd $ ls -l /usr/lib | grep ssl -rwxr-xr-x. 1 root root 313848 Nov 15 09:09 libssl3.so 09:13
Yippee! dnf upgrade openssl worked 09:14
09:14 pyrimidine joined
samcv only that? no making a link? 09:14
Todd I got lucky!! 09:15
That's what I get for not running my upgrades/updates 09:16
09:16 jfuller joined
Todd turkey aborted again 09:17
samcv heh
turkey?
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)
I will try --force
gfldex Todd: that modules is known to have a heisentest
09:17 ufobat_ joined
Todd what is "heisentest"? Something to do with OpenSSL? 09:18
gfldex see en.wikipedia.org/wiki/Heisenbug
09:18 pyrimidine left
Todd chuckle! 09:19
09:19 cdg joined
Todd Now I get to troubleshoot my typos that escaped "perl6 -c xxx" 09:20
Thank you guys for all the help! You saved my butt with zef
how to you set alternale library paths in perl 6. I ciopied this from perl 5: 09:23
------> use lib /usr/s⏏hare/perl6/site/bin;
Unsupported use of /s; in Perl 6 please use . or \N
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
Todd: like everywhere where you use a string
09:24 cibs left
Todd makes sence. No quotes need in P5. Nice clean up in 6 09:25
09:25 jfuller left 09:26 cibs joined, ZzZombo left
Todd perl -c CimTrakCheckAndResatart.pl6 CimTrakCheckAndResatart.pl6 syntax OK 09:27
but the syntax is not okay. When I run it I get 09:28
09:28 ZzZombo joined, ZzZombo is now known as Guest96749
Todd 132: sub GetServiceStatus ( $ServiceName ) { 09:28
Variable '$ServiceName' is not declared
at /home/linuxutil/CimTrakCheckAndResatart.pl6:132 09:29
09:29 ZzZombo_ joined 09:32 Guest96749 left 09:33 ZzZombo_ left
moritz don't use perl -c when it's Perl 6 code 09:37
also, perl6 -c has the same command line semantics as without -c 09:38
09:38 xtreak joined
Todd oops. forgot the 6 09:38
same error with perl6 -c though
moritz which means the first argument is a script, and everything after it are arguments to the script
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
09:39 cschwenz joined
Todd I thought -c was to check syntax 09:39
moritz so your invocation only checks the syntax of the first argument
cschwenz heads-up, pull request for rakudo star: github.com/rakudo/star/pull/86
Todd And now the error is showing in -c. I think I have to check all my quotes are complete 09:40
09:40 user__ left
cschwenz Todd: also, don't forget to check for unicode quotes. mixing them and '/" will lead to a bad time 09:41
Todd thank you. I will 09:44
I am giving up for the night
09:45 Todd left 09:51 xtreak left 09:54 xtreak joined 09:58 rindolf left 10:03 ZzZombo_ joined 10:06 girafe left 10:08 araujo joined 10:15 wamba left 10:16 ZzZombo__ joined, pyrimidine joined, ZzZombo__ is now known as ZzZombo, ZzZombo left, ZzZombo joined
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 A.new(a => [1, 2, 3])
ZzZombo why does this not work as expected?
10:20 ZzZombo_ left 10:21 pyrimidine left
jnthn Because you stored it in a Scalar variable, which means it will be reated as an item 10:25
*treated
ZzZombo um
jnthn Works that way for Array too
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
camelia No such method 'a' for invocant of type 'Array'
in block <unit> at <tmp> line 1
jnthn m: my $a = Array.new(1,2,3); .say for $a 10:26
camelia [1 2 3]
ZzZombo but that's not what I want, I want my class to be iterable.
jnthn Should it be indexable also? 10:27
If so you can do the Positional role and bind it to @foo
Can also store it in a sigilless variable, or de-itemize it at the point of iteration 10:28
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
camelia 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
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
camelia 1
2
3
jnthn Like that
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<>
camelia 1
2
3
ZzZombo I did, but I am not sure what exactly my .iterator should do -- currenty returns @!array.iterator -- so I wanted to experiment.
jnthn Or that 10:29
ZzZombo <>? What's that? I don't recall seeing it in the docs in such form.
gfldex ZzZombo: your mind is mislead by assumptions 10:30
10:30 Actualeyes left
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
It may be easier to just implement .list 10:31
10:31 nowan left
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 1
2
3
jnthn And yes, what gfldex said
gfldex i wonder if overloading .new to return a Slip might help for your case 10:33
10:33 nowan joined 10:41 Resol_ left 10:45 yadzi left 10:46 rindolf joined 11:00 wamba joined 11:11 TEttinger left 11:13 xtreak left 11:15 cschwenz left 11:20 Lucas_One left 11:32 suman joined, ZzZombo_ joined, ZzZombo is now known as Guest1173, ZzZombo_ left, ZzZombo_ joined, ZzZombo_ is now known as ZzZombo
suman Hi everyone 11:33
DrForr Afternoon. 11:34
IOninja \o
suman I plan to write a course on "Nature in code, Biology in Perl 6" similar to this courses.edx.org/courses/course-v1:...T2016/info 11:35
11:35 Guest1173 left
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
you could write a small HTTP endpoint that exposes data as JSON, and use D3.js in the browser
suman I need a good descent plotting library in Perl 6. Anyone know about such good library? May be matplotlib!!
moritz or you could use Inline::Python with matplotlib or whatever else python has (probably more than Perl 5) 11:37
suman moritz "write a small HTTP endpoint that exposes data as JSON" any tutorial on this? 11:38
llfourn uses plot.ly for plotting nowadays 11:39
moritz suman: dunno
11:42 itaipu joined, yadzi joined 11:44 jonas1 joined
llfourn suman: You could use something like this to expose the data to D3 github.com/tokuhirom/p6-HTTP-Server-Tiny 11:44
suman llfourn Ok I will see it 11:46
11:48 yadzi left 11:51 AlexDaniel joined
suman Would have been much better had there been a native Perl 6 plotting library. But I will prepare the above course. 11:52
For plotting I am not still clear. Ok bye guys. 11:53
11:53 curan left
llfourn o/ 11:53
11:55 labster left 11:56 astj left, astj joined 12:00 astj left, astj joined 12:02 suman left 12:09 hudo joined 12:12 cdg left 12:14 itaipu_ joined 12:17 itaipu left, pyrimidine joined 12:20 risou is now known as risou_awy, risou_awy is now known as risou 12:21 lukaramu joined 12:22 risou is now known as risou_awy, risou_awy is now known as risou, pyrimidine left 12:25 wamba left
ZzZombo m: say %(a=>'x'){0..*} 12:31
andrzejku hey I cann't see raw sockets
in Perl6 lib
camelia MoarVM panic: Memory allocation failed; could not allocate 7077888 bytes
ZzZombo Is that expected?
I guess not, panic is panic. 12:32
andrzejku ZzZombo, that's nearly 6GB 12:33
llfourn ZzZombo: yes. Infinity > 6GB.
andrzejku check your RAM?
and it looks like MoarVM got memory leak
somewhere
try to debug moarvm with your code 12:34
timotimo there are no raw sockets for perl6 yet
um, no.
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
m: say (0..*).Str
camelia 0..*
timotimo i wonder how exactly it stringifies so that it asplodes
ah, it does the list thing
so it tries to create an infinitely big list of results taken from your hash
ZzZombo "a RangeL<truncates|#Truncating slices> in [ ]" 12:36
docs.perl6.org/language/subscripts
gfldex it's search for keys for each elements of 0..*, what takes a very long time
12:41 kurahaupo joined
ZzZombo seriously, how do I force P6 to always output error location? 12:44
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
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
llfourn It would be great if you could send email to [email@hidden.address] with some code that errors wout with no location. 12:48
ZzZombo I believe that's some kind of a setting, since camelia always shows that, but my perl almost never. 12:49
12:49 itcharlie1 joined
AlexDaniel huh? 12:50
ZzZombo or maybe a very deliberate bug.
AlexDaniel what's your rakudo version, by the way?
12:50 kurahaupo left
ZzZombo This is Rakudo version 2017.01 built on MoarVM version 2017.01 implementing Perl 6.c. 12:50
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:53
a var* 12:54
12:54 itaipu_ left
timotimo "in an array"? 12:54
llfourn m: my @a = ^10; my $var = @a[flat 1..3,5,8..*]; say $var 12:55
AlexDaniel whoops…
ZzZombo use that to index into it
camelia (timeout)
llfourn hmm shouldn't that work?
timotimo m: my @things-i-want = |1..3,5,|8..*; my @all-things = (1000 .. 2000); .say for @all-things[@things-i-want]
camelia No such method 'succ' for invocant of type 'Slip'
in block <unit> at <tmp> line 1
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 1001
1002
1003
1005
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
10…
timotimo there you go
AlexDaniel llfourn: without flat, yes
timotimo one through three, five, eight through to the end
llfourn m: my @a = ^10; my $var = @a[1..3,5,8..*]; say $var
camelia ((1 2 3) 5 (8 9))
llfourn m: my @a = ^10; my $var = flat @a[1..3,5,8..*]; say $var
camelia (1 2 3 5 8 9)
timotimo you'd want to slip instead of flat, i'd expect 12:57
ZzZombo that still leaves out code blocks, that are supported by native subscripts, and Whatever. 12:58
timotimo ok, so why not like this: 13:00
m: my $things-i-want = * div 2; my @all-things = ^100; say @all-things[$things-i-want]
camelia 50
timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want] 13:01
camelia (50 97 0 51 3)
timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want]
camelia (4 49 23 78 65)
timotimo m: my $things-i-want = { ^$_ .pick(5) }; my @all-things = ^100; say @all-things[$things-i-want]
camelia (8 63 69 28 84)
timotimo easy peasy?
gfldex ZzZombo: prefix:<||> is NYI, but you can emulate it with a callable 13:02
13:02 aborazmeh joined, aborazmeh left, aborazmeh joined
gfldex for single dim arrays that is 13:02
13:06 itaipu joined
IOninja m: my @a = ^10; my $var = @a[lazy flat 1..3,5,8..*]; say $var 13:06
camelia (1 2 3 5 8 9)
llfourn ^interesting :) 13:07
IOninja it stops at the end of array on lazy lists, but checks everything on non-lazy
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 SeqSeq
timotimo hm. i would sort of expect is-lazy to be set for that
llfourn m: my $x := flat 1..3,5,8..*; my $y := lazy flat 1..3,5,8..*; say $x.lazy,$y.lazy;
camelia (...)(...)
llfourn m: my $x := flat 1..3,5,8..*; my $y := lazy flat 1..3,5,8..*; say $x.is-lazy,$y.is-lazy;
camelia FalseTrue
IOninja timotimo: set is-lazy if at least one iterable is-lazy?
timotimo yeah, in infix:<,> 13:10
IOninja oh
timotimo or maybe in flat?
IOninja m: sub foo (
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub foo (7⏏5<EOL>
IOninja m: sub foo (**@x) { dd @x }(1..3, 5, lazy 4..7)
camelia 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
IOninja m: sub foo (**@x) { say @x }(1..3, 5, lazy 4..7)
camelia [1..3 5 (...)]
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 Failure $is-lazy = Failure.new(exception => X::Cannot::Lazy.new(action => ".elems", what => Any), backtrace => Backtrace.new)
IOninja err
13:11 abraxxa left
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 Failure $is-lazy = Failure.new(exception => X::Cannot::Lazy.new(action => ".elems", what => Any), backtrace => Backtrace.new)
IOninja m: sub foo (**@x) { my $is-lazy = @x.first(*.is-lazy) // 0; dd $is-lazy }(1..3, 5, lazy 4..7)
camelia Seq $is-lazy = (4, 5, 6, 7, Nil, Nil, Nil, Nil, Nil, Nil... lazy list)
IOninja #DontKnowHowToUseFirst
13:16 rurban left
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 Cannot .elems a lazy list
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja m: sub foo (**@x) { my int $is-lazy = @x.map(*.is-lazy).first(*.so) || 0; dd $is-lazy }(1..3, 5, 4..7)
camelia 0
ZzZombo IOninja ^
IOninja m: sub foo (**@x) { my int $is-lazy = @x.map(*.is-lazy).first(*.so) || 1; dd $is-lazy }(1..3, 5, 4..7)
camelia 1
IOninja ZzZombo: ? 13:17
13:17 rurban joined
ZzZombo I can't apply your solution. 13:17
lizmat m: dd ("a",5e0,42).first(Int)
camelia 42
lizmat m: dd ("a",5e0,42).first(Complex) 13:18
camelia Nil
lizmat first will always return a scalar value, be it Nil or the first element that smartmatches the condition
IOninja lizmat: what's a good (fast) way to see if any of the elements *.is-lazy? 13:19
13:19 wamba joined, pyrimidine joined
lizmat m: dd 42.is-lazy 13:19
camelia Bool::False
lizmat hmmm
jnthn I'd guess `defined @list.first(*.is-lazy)` should do it? 13:20
lizmat yeah
IOninja Thanks 13:21
lizmat I guess technically ~~ Nil would be correcter
or !~~ Nil :-)
m: dd Nil.is-lazy
camelia Bool::False
lizmat yu[ 13:22
IOninja timotimo: gonna commit the laziness improvement to &flat shortly
lizmat yup
llfourn IOninja++
IOninja so that flat(1..3,5,8..*).is-lazy is true 13:23
um 13:24
m: (1..3,5,8..*).flat.is-lazy.say
camelia False
IOninja Or maybe not :) 13:25
Yeah. I don't really understand what `.is-lazy` means, so I rather not muck with it :}
13:32 lukaramu_ joined, ufobat_ left 13:36 lukaramu left
ZzZombo m: say 1 ~~ * 13:49
camelia { ... }
13:49 wamba left
ZzZombo what is this? 13:49
m: dd 1 ~~ *
camelia { ... }
jnthn A closure that takes an argument and smartmatches 1 against it 13:50
m: say (1 ~~ *)(1)
camelia True
jnthn m: say (1 ~~ *)(2)
camelia False
jnthn Just like
m: say (1 + *)(3)
camelia 4
IOninja huh
IIRC ~~ is not meant to be curriable
jnthn It changed, though I think only in the year leading up to 6.c 13:51
AlexDaniel c: all say 1 ~~ *
jnthn 'cus people tripped over it not doing that so often in .grep and so forth
committable6 AlexDaniel, gist.github.com/4f99efef0649beebe2...a382387b4f
ZzZombo smart-matching1 ~~ *returns True 13:52
docs.perl6.org/type/Whatever
IOninja Ah
13:52 MilkmanDan left
IOninja m: say (* ~~ 1)(1) 13:52
camelia True
IOninja m: say (* ~~ 1)(0)
camelia False
IOninja hm
00:29 brokenchicken it ain't currying over the ~~
00:30 TimToady nope, it's one of the exeptions
irclog.perlgeek.de/perl6/2017-02-02#i_14028467
13:53 mcmillhj joined
llfourn m: say (*.all ~~ 'meow') 13:53
camelia WhateverCode object coerced to string (please use .gist or .perl to do that)
in block <unit> at <tmp> line 1
False
llfourn m: say (* ~~ 'meow')
camelia { ... }
IOninja Ah, I get it now
andrzejku hey people
llfourn m: say (* !~~ 'meow')
camelia { ... }
13:54 aborazmeh left
IOninja \o 13:54
llfourn cool. Yeah I always thought that didn't work
ZzZombo m: my @a = ^10;my $*x;$*x<y>:=8..*; my $var = @a[$*x<y>]; say $var;say $*x 13:56
camelia Cannot coerce Inf to an Int
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
ZzZombo I give up
IOninja What are you trying to do? 13:57
ZzZombo A method of my class is supposed to return a range of elements 13:58
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 (8 9)
{y => 8..Inf}
ZzZombo Kill me
13:59 MilkmanDan joined
IOninja stabs ZzZombo 13:59
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x 14:00
camelia (8 9)
Dynamic variable $*x not found
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $y
camelia (8 9)
8..Inf
ZzZombo w- why
...that works
llfourn I'm not too sure :\ 14:01
IOninja Which part? 14:02
llfourn you used $*x<y> := 8..* so that should have gotten rid of normal hash scalar container
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x<y>.WHAT
camelia (8 9)
(Failure)
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say $*x<y>.perl
camelia (8 9)
Failure.new(exception => X::Dynamic::NotFound.new(name => "\$*x"), backtrace => Backtrace.new)
llfourn I mean why doesn't the other one work
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 9 ~~ $*x<y> 14:04
camelia (8 9)
False
llfourn m: my @a = ^10;my %x;%x<y> := 8..*; my $var = @a[%x<y>]; say $var
camelia (8 9)
llfourn hmmm
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 8 ~~ $*x<y>
camelia (8 9)
False
ZzZombo m: my @a = ^10;my $y:=8..*; my $var = @a[$y]; say $var;say 8 ~~ |$*x<y>
camelia (8 9)
False
ZzZombo that's... weird as hell 14:05
llfourn m: my @a = ^10;my $x = {};$x<y> := 8..*; say @a[$x<y>] # it works if make $x a {} first 14:06
camelia (8 9)
ZzZombo aw, I forgot one question:
m: say 1 ~~ [1,2,3]
camelia False
IOninja m: say 3 ~~ [1,2,3]
camelia False
ZzZombo since then this doesn't work?
when*
llfourn m: say 3 ~~ [1,2,3].any
camelia True
IOninja That question implies it ever worked :) 14:07
s: [1,2,3], 'ACCEPTS', \(1)
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/320c...st.pm#L647
ZzZombo I do recall it working.
IOninja Always returns false
u lie
c: all say 1 ~~ [1,2,3]
If these bots show anything is human memory is real crap :) 14:08
committable6 IOninja, gist.github.com/4644f1b80af4d4ce87...e48fc587b1
ZzZombo m: my @a = ^10;my %*x;%*x<y>:=8..*; my $var = @a[%*x<y>]; say $var;say %*x
camelia (8 9)
{y => 8..Inf}
IOninja ZzZombo: never worked.
llfourn IOninja++ #botfu
IOninja Well, it does work. It returns False just as expected :)
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 (8 9)
{y => 8..Inf}
True
ZzZombo was that P5 then? 14:10
yea, it works in P5.
IOninja heh 14:11
I thought they nixed the smartmatch?
huf no, it was consigned to eternal limbo 14:12
ZzZombo No, it's experimental, but that's it.
so the screw up was caused by $cont vs %cont somehow. 14:13
IOninja if it's real weird report it? 14:15
m: my $x; $x := 8..*; ()[$x];
camelia ( no output )
IOninja m: my $x; $x<y> := 8..*; ()[$x<y>];
camelia Cannot coerce Inf to an Int
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
llfourn it's not $cont vs %cont. if you init $cont = {} it works 14:16
IOninja m: my $x = {}; $x<y> := 8..*; ()[$x<y>];
camelia ( no output )
IOninja m: my $x = {}; dd $x<y> 14:17
camelia Any % = Any
IOninja m: my $x; dd $x<y>
camelia Any $scalar = Any
14:17 bjz_ left
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
IOninja++, yeah.
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:20
llfourn ZzZombo: [email@hidden.address] # send email with that info there would be v helpful :) 14:23
DrForr That sounds like a bug that you need to file :)
ZzZombo Yea, later
IOninja Might already be filed; check perl6.fail
llfourn learns about perl6.fail 14:24
IOninja Just don't go to perl6.wtf :)
llfourn I always do * I'm told not too :( 14:25
14:25 skids joined
llfourn it looks like we have not enough coverage :\ 14:26
IOninja heh
the coverage tool is broken so it shows all zero
dalek ake: 39b2de1 | arnsholt++ | / (3 files):
Unbitrot code.
yoleaux 8 Feb 2017 13:26Z <timotimo> dalek: ahoi, please update that repo to use geth instead: Change the webhook to geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
llfourn ok phew!
IOninja geth... also works 14:27
AlexDaniel .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to 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.
AlexDaniel arnsholt: ↑ :)
arnsholt Oh, right 14:43
If you can't tell, it's been a while since I touched that code =D
14:44 lichtkind__ joined 14:48 lichtkind_ left 14:49 llfourn left 14:50 sammers left, ggoebel left 14:57 risou is now known as risou_awy 15:02 sammers joined
ZzZombo s: postcircumfix:<{ }>, \(\SELF, \key ) 15:03
SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
ZzZombo s: sub postcircumfix:<{ }>, \(\SELF, \key )
SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
ZzZombo s: postcircumfix:<{ }>, \(Hash, Str)
SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
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) ␤
IOninja s: &postcircumfix:<{ }>, \(%, '')
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/d41b...lice.pm#L6
ZzZombo s: &postcircumfix:<{ }>, \(%)
SourceBaby ZzZombo, Ehhh... I'm too scared to run that code.
ZzZombo omg
anyway, I don't see what multi handles %h<> 15:05
IOninja s: &postcircumfix:<{ }>, \(%)
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/d41b...ce.pm#L156
IOninja s: %, 'ZEN-KEY', \() 15:06
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/d41b...ny.pm#L325
15:21 risou_awy is now known as risou 15:22 ggoebel joined 15:25 st_elmo joined
titsuki m: grammar G { token TOP { '[' \w+ ']' } }; G.parse('[bcd]').perl.say 15:26
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)
titsuki m: grammar G { token TOP { '[' <-[a]>+ ']' } }; G.parse('[bcd]').perl.say
camelia Nil
IOninja tokens don't backtrack
m: grammar G { token TOP { '[' <-[a\]]>+ ']' } }; G.parse('[bcd]').perl.say 15:27
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)
IOninja m: grammar G { regex TOP { '[' <-[a]>+ ']' } }; G.parse('[bcd]').perl.say
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)
IOninja m: grammar G { token TOP { '[' <-[a]>+? ']' } }; G.parse('[bcd]').perl.say
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 5, orig => "[bcd]", from => 0)
titsuki IOninja: thx! I understand. 15:28
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: rt.perl.org/rt3//Public/Bug/Displa...?id=130709
tony-o pyrimidine: you can use roles for that 15:33
pyrimidine tony-o: wouldn't that still need a require?
tony-o and then looking for them. i wrote a convenience module for making 'plugin's easier too
pyrimidine tony-o: Pluggable?
tony-o yes 15:34
IOninja which has been busted for over a year now :P
tony-o oh.
IOninja 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
yup
15:35 wamba joined
IOninja "While currently there's no solution" <-- I don't think that's accurate anymore 15:35
tony-o dang
pyrimidine IOninja: correct, I had a workaround within bioperl6 that dealt with this I think
github.com/cjfields/bioperl6/blob/...ggable.pm6 15:36
just forgot to post it to that ticket
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:37 risou is now known as risou_awy
pyrimidine tony-o: the problem is, I'm sure it will die here: github.com/cjfields/bioperl6/blob/...ggable.pm6 15:38
ah crap: I meant here: github.com/tony-o/perl6-pluggable/...le.pm6#L16
The problem is more fundamental; 'require' wasn't updated when lexical module loading was added (in the ticket llfourn++ indicated the problem: rt.perl.org/Public/Bug/Display.htm...n-1447365) 15:41
15:41 committable6 left
pyrimidine probably should move this to #perl6-dev 15:41
tony-o ah i see 15:42
m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if $mod::.^name !~~ Failure; 15:44
camelia loaded
tony-o m: my $mod = 'Test512'; try require ::($mod); 'loaded'.say if $mod::.^name !~~ Failure;
camelia loaded
tony-o hm
15:45 llfourn joined
tony-o m: my $mod = 'Test512'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure; 15:45
camelia ( no output )
tony-o m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure;
camelia loaded
tony-o there we go
IOninja m: '/tmp/Foo.pm6'.IO.spurt: 「m: my $mod = 'Test'; try require ::($mod); 'loaded'.say if ::($mod) !~~ Failure;」 15:46
camelia ( no output )
IOninja m: use lib </tmp>; use Foo
camelia loaded
IOninja m: use lib </tmp>; use Foo
camelia loaded
IOninja cool
m: '/tmp/Bar.pm6'.IO.spurt: 「use Foo」 15:47
camelia ( no output )
IOninja m: use lib </tmp>; use Bar;
camelia loaded
loaded
pyrimidine IOninja: it seems to be linked to modules in a longer path. A::B::C
IOninja Ah
pyrimidine which plugins would likely be 15:48
15:50 llfourn left
tony-o now i need to fix pluggable 15:50
i was flying a lot when that bug was logged, kind of bummed it's sat over a year
15:53 cale2 joined
cale2 why is our pod-to-html code written imperatively when we have grammars/actions? github.com/perl6/doc/blob/master/htmlify.p6 15:53
15:53 hudo left
IOninja wat? 15:54
cale2 why is the htmlify.p6 code written with loops and tons of conditionals instead of parsing with a grammar?
IOninja parsing what? 15:55
cale2 parsing pod
IOninja It does no such thing.
ugexe parsing pod, or parsing the pod structure perl6 spits out?
cale2 I'm not sure 15:56
the htmlify code just seems like a perfect use case for grammar actions
curious why it's written like a C parser
IOninja Pod's parsed by the compiler
ugexe where do you see it parsing something? 15:57
cale2 github.com/perl6/doc/blob/master/h...fy.p6#L486
also, this whole file github.com/perl6/doc/blob/master/l...tmlify.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
ugexe cale2: its reparsing the pod structure that was already parsed, and mostly just adding html-entities and other human friendly formatting 16:00
its not using a grammar because its already parsed, and its parsing the structure perl6 spits out
16:01 gregf_ joined 16:02 MilkmanDan left
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.
cale2 that way people could have it parsed in different ways, using more custom grammars?
[Coke] cale2: you can already override the grammar. 16:03
16:03 llfourn joined
[Coke] which includes POD. 16:03
16:03 Possum joined
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
cale2 It just makes sense to me that parsing and outputting HTML would be one step with grammars+actions
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)
IOninja cale2: why mess?
tony-o okay i have to do real job for a while and then i'll be back
IOninja cale2: Pod::To::Text looks pretty straightforward to me: github.com/rakudo/rakudo/blob/nom/...o/Text.pm6 16:08
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:09 jsimonet left
perlpilot cale2: you could always write a separate pod parser that does as you want. :-) 16:10
16:10 pyrimidine left
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
16:10 pyrimidine joined
IOninja cale2: and doc code generator does a lot more than just churn out HTML based on pod. 16:10
16:11 Possum left, jsimonet joined
IOninja it makes separate routine pages for example, hence the code to fish those out 16:11
16:11 llfourn left
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
this is where type checking would be helpful xD
IOninja heh 16:13
16:14 pyrimidine left
perlpilot cale2: um ... what are you afraid of exactly? 16:16
or are you saying that changing anything is just daunting? 16:17
16:17 MilkmanDan joined 16:18 Possum joined
[Coke] cale2: note that the pod 2 html code is in "Pod::To::HTML" - htmlify is extracting pod and re-organizing it. 16:18
MasterDuke_ i do wonder if incorporating DrForr's Perl6::Parser would help 16:19
DrForr pricks up his ears.
MasterDuke_ DrForr: it now handles Pod, correct? 16:20
DrForr Incorrect, unfortunately.
16:20 nightfrog is now known as culb 16:21 khw joined
cale2 similar to Jar Jar, Perl6::Parser is the key to all of this... 16:21
16:21 mcsnolte joined
DrForr The core parser doesn't handle POD, so I'll have to write my own handling for it. 16:21
16:22 risou_awy is now known as risou
DrForr Meesa no want refactor. 16:22
16:22 cdg joined 16:23 astj left 16:24 alphah left
IOninja "The core parser doesn't handle POD so I'll have to write my own"... or improve the core one? 16:24
16:24 astj joined
jnthn DrForr: Perl6::Grammar does do Pod parsing 16:25
DrForr I must not have triggered the correct method then, I suppose. 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
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
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 astj left, Qwerasd joined
jnthn :) 16:29
IOninja m: say 4.99999999999999999999999 ~~ 0..^5 16:30
camelia False
IOninja m: say 4.999999999999999999999999999999999999999999999999999 ~~ 0..^5
camelia False
IOninja m: say 4.999999999999999999999999999999999999999999999999999999999 ~~ 0..^5
camelia True
IOninja :D 16:31
tony-o taking it to the nines 16:32
perlpilot I'm having trouble imagining how that happens. 16:33
IOninja magic
ugexe it techinically has to be infinite 9s right?
cale2 m: sub do-it($hello, --> 'hi') { return }; say do-it; 16:34
camelia 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;
DrForr Gotta get outta here. I'll check out the Perl6::POD invocation tonight, maybe.
cale2 m: sub do-it($hello --> 'hi') { return }; say do-it;
camelia 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;
cale2 m: sub do-it($hello --> 'hi') { return }; say do-it('bye');
camelia hi
ugexe ah im thinking for ==, not ~~
cale2 m: sub do-it($hello, --> 'hi') { return }; say do-it('bye');
camelia hi
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:35
perlpilot I'll be happy with "denominator noise" for now. 16:36
16:37 holyghost joined
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:38 risou is now known as risou_awy
IOninja perlpilot: I can shorten it to "bug" :) 16:39
m: say 4.99999999999999999999999 ~~ 0..^5
camelia False
IOninja m: say <4.99999999999999999999999> ~~ 0..^5
camelia True
perlpilot oh, definitely. But was trying to grok the nature of the bug.
IOninja Magic trick :)
16:43 zakharyas left 16:45 astj joined
Geth Pod-To-HTML/WildYorkies-patch-1: 5cc8a14153 | Cale++ | lib/Pod/To/HTML.pm
Update HTML.pm

group multis together, change a multi to a switch, utilize samewith instead of recurse, s/returns/--> Str/
16:47
Pod-To-HTML: WildYorkies++ created pull request #25:
Update HTML.pm
16:48 devmikey joined
[Coke] cale2: but I do agree that htmlify is hard to modify. 16:48
16:50 astj left
IOninja cale2: that patch is broken in several place. I suggest cloning the repo and running tests instead of using online editor... 16:50
[Coke] m: if 42, 44, 22 -> *@a { say @a.perl } # 105872 16:51
camelia []
[Coke] m: if 42, 44, 22 -> (*@a) { say @a.perl } # 105872
camelia [42, 44, 22]
Qwerasd What does .perl do again?
IOninja Qwerasd: serializes to Perl 6 code
Qwerasd ah
Is it smart with it though? 16:52
[Coke] It's not perfect.
IOninja cale2: also, it may be worth measuring performance impact of that change. our docs build is superslow as it is.
Qwerasd m: my @arr = (0..10); say @arr.perl
camelia [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
IOninja Qwerasd: no, it's pretty dumb. You can't dump lazy stuff for example
m: (lazy 5).perl 16:53
camelia No such method 'lazy' for invocant of type 'Int'
in block <unit> at <tmp> line 1
IOninja wat
m: (lazy 5,).perl
camelia Cannot .elems a lazy list
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja some of the circular stuff's broken
m: class C { has $.c is rw }; my $c = C.new; $c.c = $c; $c.perl.say
camelia (my \C_33233024 = C.new(c => C_33233024))
IOninja that won't eval right 16:54
Qwerasd m: sub foo() { say "bar"; }; say foo().perl 16:55
camelia bar
Bool::True
Qwerasd hmm
m: sub foo() { say "bar"; }; say foo.perl
camelia bar
Bool::True
IOninja m: sub foo() { say "bar"; }; say &foo.perl 16:56
camelia sub foo () { #`(Sub|60167880) ... }
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. 16:58
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:01
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:03
[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
[Coke] (to speed things up)
cale2 and I don't think bigotry against people that know "fancy terms" is helpful :P
I said "accumulator" once and now I'm a fancy man lol
[Coke] Ideally, things will get sped up in rakudo itself, but we also have to make the ecosystem -usable-, not just legible.
IOninja accumulator, imperative, list comprehension 17:05
perlpilot "list comprehension" is a fancy term; the others not so much :) 17:06
El_Che have you tried to reverse the polarity? 17:07
perlpilot don't cross the streams though
17:08 llfourn joined
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 0.853962
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
camelia 0.3636105
IOninja m: say 0.85/.36
camelia 2.361111
Qwerasd Well, my short 2 days in the perl6 channel have showed that perl6 isn't right for me, goodbye now. 17:09
17:09 Qwerasd left
cale2 Qwerasd: that was a dramatic exit 17:09
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:10
cale2 IOninja: What would have caused such an impact? Changing a multi to a given? 17:11
17:11 devmikey left
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
17:11 sena_kun joined
perlpilot cale2: yes. 17:12
IOninja cale2: yes, something to do with dispatch cache or something or other.
17:13 llfourn left
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
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:14
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
17:15 itaipu left
IOninja Didn't they say it was just isn't right for them and not that there was anything wrong with it? 17:15
wonder why the search don't bring up any results for nick `Qwerasd` 17:16
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
tony-o does HTTP::Client expect qs params to already be encoded?
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:18
IOninja wonder why the search has a couple days lag for its index 17:19
:)
17:19 LeCamarade left
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:20
so yeah, odd nothing shows up for his nick 17:21
17:27 MasterDuke_ is now known as MasterDuke, itaipu joined 17:29 mxco86 left 17:32 pyrimidine joined 17:37 pyrimidine left 17:44 robertle joined
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
17:45 llfourn joined
IOninja You can use all of them. 17:45
17:46 mxco86 joined
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?
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
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
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:50 llfourn left
IOninja doesn't see the semantic difference 17:51
You do different things depending on the type of a thing. 17:52
in both cases
cale2 I also am confused. Because it's literally the same thing haha 17:53
17:54 holyghost left
moritz multi dispatch is very different from smart matching 17:57
IOninja: re irclog index, not intentional 17:58
17:58 andrzejk_ joined
IOninja Is there semantic difference between a bunch of muties and a sub with a bunch of if statements? 17:58
If the end result is the same 17:59
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:02
And haven't explored much of the fun features like grammars and concurrency. Just a bunch of triangle reductions and ternaries. 18:04
18:04 mcmillhj left 18:05 mcmillhj joined 18:07 pyrimidine joined
cale2 "triangle reductions and ternaries" mr. fancy pants over here ;) 18:07
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
lizmat IOninja: there's hope for you yet :-) 18:10
18:10 mcmillhj left
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:15
18:16 zakharyas joined 18:17 mxco86 left 18:18 mcmillhj joined, jonas1 left
IOninja yup, my account's still open... 18:20
18:23 mcmillhj left 18:29 mcmillhj joined 18:35 pyrimidine left 18:36 pyrimidine joined, yadzi joined 18:38 wamba left 18:39 zakharyas left 18:41 rindolf left
tony-o where do you live that could go to college without a hs diploma? 18:43
that you ^
18:43 Qwerasd joined 18:44 Qwerasd left 18:46 llfourn joined
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:47
18:51 llfourn left, espadrine joined
IOninja cale2: should the branch created for this PR be deleted? github.com/perl6/Pod-To-HTML/pull/25 18:53
cale2 yeah i closed it
IOninja OK 18:54
IOninja clicks the 'delete branch' button
19:01 rindolf joined
IOninja cale2: I now regret a bit telling you about the multi slowness, since Pod::To::HTML does need a lot a love... 19:04
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
IOninja Doesn't mean you have to close the PR just because I don't like it.
OK
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
DrEeevil El_Che: it mostly does. Pretty arbitrary sanctions against foreign courses 19:09
just within the EU it's mostly harmonized now with ECTS and other madness that causes other problems 19:10
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
make an arrangement to swap French with Russian credits.
19:11 lizmat left
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:11
19:12 lizmat joined
El_Che -ed 19:12
stmuk I don't think different countries have much similarity in education systems 19:13
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
DrEeevil El_Che: in germany there are some pretty coherent guidelines, but it's still not guaranteed
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:15
for all other cases, it sucks pretty much if your degree is not EI 19:16
EU
stmuk in Soviet Russia High School Diploma takes *you*
El_Che IOninja: kudos for picking it up again. It sounds very frustrating
IOninja I have just 1 course left (English), but I stopped doing it three years ago because I hate it... 19:17
El_Che 1? 19:18
IOninja yup
El_Che finish that, man
IOninja yeah, I should...
El_Che 1 is just too close
so we have DrEeevil and DrForr. I wonder who's the biggest villain 19:19
19:19 darutoko left
moritz DrEevilForr, of course :-) 19:20
IOninja :)
El_Che DrEevilForrEver 19:21
DrEeevil I resemble that remark!
19:23 girafe joined 19:24 cdg left 19:25 st_elmo left
stmuk 19:31
oops
19:31 mscha joined
IOninja ! ?! 19:31
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 [(8 13) (8 13) (8 13) (8 13) (8 13)]
mscha Is this a bug or a feature?
IOninja Normal behaviour/. 19:33
You're stuffing the exact same containers into the array, so they all get updated on each iteration and end up the same
mscha So how do I make it DWIM?
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 [[1 2] [2 3] [3 5] [5 8] [8 13]]
IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b).Array.List }; say @arr;
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
mscha OK, thanks.
IOninja one way
19:34 [Coke] is now known as DrFivve, pyrimidine left
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;
camelia [(8 13) (8 13) (8 13) (8 13) (8 13)]
AlexDaniel honestly, I don't understand why that happens
IOninja err
19:34 DrFivve is now known as [Coke]
IOninja that's same difference 19:34
19:35 pyrimidine joined
IOninja Ah 19:35
m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a<>, $b<>) }; say @arr;
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
IOninja m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a, $b)».<> }; say @arr;
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
IOninja moar ways.
mscha What does <> do? 19:36
IOninja decont
19:36 labster joined
mscha What's that in English? ;) 19:36
IOninja well, in this case.
mscha: I don't understand containers.
mscha: basically the issue is 'cause you'
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.
IOninja There's something in the docs maybe
MasterDuke m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: ($a.clone, $b.clone) }; say @arr;
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
AlexDaniel m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: (item($a), item($b)) }; say @arr
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
19:37 mrdside joined
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;
camelia [(8 13) (8 13) (8 13) (8 13) (8 13)]
AlexDaniel m: my @arr; my ($a, $b) = (1,1); for ^5 { ($a,$b) = ($b, $a+$b); @arr.push: (|$a, |$b) }; say @arr
camelia [(1 2) (2 3) (3 5) (5 8) (8 13)]
IOninja and here you've cloned the list, but the clone still has the same containers
"<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
I'd expect some special syntax for that or something 19:41
IOninja ah
19:41 mrdside left
AlexDaniel just looking at that code I would've thought that this is what it does 19:41
and now I wonder, are there any other places where you can shoot yourself in the foot similarly? 19:42
timotimo when you pass something to a function, you usually get the value re-containerized 19:43
that's how we enforce read-only-ness
IOninja m: .say, .say with [<a b c>].map({s/././})
camelia (「a」 「b」 「c」)
(「c」 「c」 「c」)
IOninja AlexDaniel ^ that'd be another place
timotimo m: sub dotest { my $a = 10; othertest($a, { $a += 5 }); say $a }; sub othertest($val, &code) { say $val; code; say $val }
camelia ( no output )
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 10
10
15
timotimo ^- see how the code running increases the outer $a, but the $val isn't touched?
IOninja sure, you get a different container there. 19:45
in lists you don't, do you? The OP can be avoided by using an Array instead of a list, for example
AlexDaniel well, that's understandable
but 「@a.push: ($a, $b)」… holy shit…
IOninja :) 19:46
AlexDaniel committable, where the f are you
IOninja pinged out again
timotimo right, clone and other similar things are only skin-deep
19:47 llfourn joined 19:48 committable6 joined, ChanServ sets mode: +v committable6
AlexDaniel hardcoded it to wilhelm.freenode.net 19:48
IOninja reads docs.perl6.org/language/containers 19:49
19:49 cibs left
AlexDaniel files a bug report 19:50
(well, that sounded confusing. “trap request”?)
ok wait, we have this: docs.perl6.org/language/traps#Cont..._a_Capture 19:51
it talks about captures, yet I see no captures…
IOninja waits for "Perl 6 Traps: The Book"
19:51 MasterDuke left, cibs joined, kybr left 19:52 mrdside joined
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:52 llfourn left
IOninja Make the book. ???. Profit 19:53
19:53 yadzi left
perlpilot "There is no trap. The End" :) 19:53
19:53 kybr joined
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
The WATs of JavaScripts are pretty popular...
timotimo and "puzzlers" exist for many languages 19:55
19:57 MasterDuke joined
IOninja How come you can't rebind my \foo vars? 19:57
m: my $x := 42; say $x; $x := 72; say $x 19:58
camelia 42
72
IOninja m: my \x := 42; say x; x := 72; say x
camelia 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
IOninja m: my \x := 42; say x; say x
camelia 42
42
IOninja you did it once; do it again; what's stopping it?
AlexDaniel ok, github.com/perl6/doc/issues/1216 19:59
20:00 kybr left
timotimo it's meant to be single-static-assignment 20:00
20:00 ggoebel left
timotimo i.e. no rebinding allowed 20:00
though i'm not sure how intended that really is
IOninja Ah
timotimo it's probably not doced well
20:02 kybr joined
Geth doc: 5bc72dc774 | (Zoffix Znet)++ | doc/Language/containers.pod6
Clarify statement that you can always assign to element of array
20:05
doc: 20499fed18 | (Zoffix Znet)++ | doc/Language/containers.pod6
Remove irrelevant prose
20:06
IOninja oh, it shows the binding to array elements later in the page ¯\_(ツ)_/¯ 20:09
can't revert a commit from web? booo
moritz IOninja: should I revert one? 20:10
Geth doc: 7c3f853e5b | (Zoffix Znet)++ | doc/Language/containers.pod6
Revert "Clarify statement that you can always assign to element of array"

This reverts commit 5bc72dc774866246bd883628c257672e882a6a4a.
This stuff's explained later int he page.
IOninja Thanks, but I managed :)
20:12 itaipu left 20:14 mrdside left
moritz is there some kind of constant or so for the highest Unicode codepoint known to Perl 6? 20:15
or maybe a range of known codepoints
IOninja m: 0x10FFFF.uniname.say
camelia <illegal>
IOninja calls the police
moritz the upper limit can change for each new Unicode version, no? 20:17
Geth doc: a280123739 | (Zoffix Znet)++ | doc/Language/containers.pod6
Reword

  - ATM there's only one production version of Perl 6 and it has the described semantics
  - Remove mention of Perl 5, to avoid implication of it being the "previous version."
   The way Perl 5 does things is a concern for 5-to-6 docs.
gfldex nods
Geth doc: 1e3ce19caf | (Zoffix Znet)++ | doc/Language/containers.pod6
Fix incorrect output

Changed by Rakudo's commits
  github.com/rakudo/rakudo/commit/67aeefa and
  github.com/rakudo/rakudo/commit/673f06b
20:23
20:23 risou_awy is now known as risou
samcv moritz, mostly no but theoretically maybe 20:24
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
gfldex m: 0x10FFFF.uniname.WHAT.say
camelia (Str)
Geth doc: e9d623e4fe | (Zoffix Znet)++ | doc/Language/containers.pod6
Fix typo / Break long line to multi-line in source

s/in form of/in the form of/
gfldex that seams wrong
samcv why gfldex 20:26
it is a string
AlexDaniel did you expect some exception or something?
gfldex it should be Nil
samcv m: 0x10FFFF.uniname.say
camelia <illegal>
AlexDaniel well, actually…
samcv nope
should be <illegal>
gfldex it should at least be `but False`
20:26 ggoebel joined
samcv maybe <illegal-10FFFF> 20:26
but def shouldn't return nothing 20:27
AlexDaniel m: say 0xF0000.uniname
camelia <Plane 15 Private Use>
samcv unicode gave it the name illegal
so it's called illegal 20:28
well sorta
Geth doc: 65f6cbc6bd | (Zoffix Znet)++ | doc/Language/containers.pod6
Fix typo
moritz "illegal" is a good name. Should've called one my daughters "illegal". :-)
IOninja m: my Int $x = 42; my Str $y; $x := $y; dd $x
camelia Type check failed in binding; expected Int but got Str (Str)
in block <unit> at <tmp> line 1
AlexDaniel m: 917729.uniname.say
camelia <reserved>
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
IOninja OK, the docs then're wrong "The constraint is a property of the container, not the variable."
moritz: what's a "variable"? 20:30
moritz IOninja: a thig with a sigil in front
gfldex the type constraint is checked before the container is replaced
moritz *thing
samcv m: my $a; $a = Mu;
camelia ( no output )
IOninja moritz: and the variable contains the container that contains the value?
samcv m: my Any $a; $a = Mu;
camelia Type check failed in assignment to $a; expected Any but got Mu (Mu)
in block <unit> at <tmp> line 1
moritz IOninja: yes 20:31
IOninja OK.
samcv Matryoshka
20:31 druonysus joined
moritz m: my Cool $x = 42; my Int $y = 4; $x := $y; 20:31
camelia ( no output )
jnthn So far as I remember it, the compiler spits out a bind check against whatever you declared the type to be
moritz m: my Cool $x = 42; my Int $y = 4; $x := $y; $x = 'foo'
camelia Type check failed in assignment to $y; expected Int but got Str ("foo")
in block <unit> at <tmp> line 1
moritz hm, that speaks for the "type belongs to the container" theory 20:32
m: my Cool $x = 42; my Int $y = 4; $x := $y; $x := 'foo'
camelia ( no output )
moritz and is consistent with what jnthn++ said
jnthn m: my Cool $x; my Str $y; my Int $z; $x := $y; $x := $z
camelia ( no output )
jnthn That it allows the rebind to Int after you bound Str is even more consistent wiht that :)
Assignment is an operation of a container 20:33
So it's about what the container thinks its type constraint is
Binding is a compile-time analyzed thing and it only cares for the type it can see at compile time
moritz IOninja: ok, I was wrong, listen to gfldex and jnthn
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 :)
moritz gfldex++
jnthn Note that you can assign at a distance, but not bind at a distance
m: my ($a, $b); ($a, $b) Z= (1, 2) # ok 20:35
camelia ( no output )
jnthn m: my ($a, $b); ($a, $b) Z:= (1, 2) # nope
camelia 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
jnthn Or moreover
samcv too fiddly? is that a technical term :P
jnthn Yes ;-)
m: say &infix:<=>
camelia sub infix:<=> (Mu \a, Mu \b) { #`(Sub+{Precedence}|53437232) ... }
jnthn m: say &infix:<:=>
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
infix:<:=> used at line 1. Did you mean 'infix:<=>', 'infix:<+|>', 'infix:<∖>', 'infix:<ne>'?
jnthn There's no late-bound binding
IOninja samcv: quotation highlights is busted on this section. Should I file an issue? docs.perl6.org/language/containers...onstraints 20:36
jnthn Binding is actually what many languages use = for
[Coke] hurls i.imgur.com/oxQLL6w.jpg for his .eu coding buddies.
20:36 cale2 left
moritz samcv: "fiddly" is TimToady-jargon :-) 20:36
[Coke]: as a German, I concur :-)
gfldex IOninja: there is an issue for that already 20:37
IOninja OK
jnthn I accidentally had fun in Germany in the past. How do I atone? :)
IOninja Well, the language/containers page is pretty good. ++ to all who wrote it.
perlpilot S99:fiddly 20:38
synopsebot6 Link: design.perl6.org/S99.html#fiddly
perlpilot I wasn't sure the synopsebot6 was still alive
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
.oO( BREAKING: Perl 6 core developer asking what's a variable!!! )
IOninja waits for a blog post. 20:40
moritz IOninja: a variable is something that mostly lives in the compiler, not a runtime
samcv m: ‚test‘.say
camelia test
samcv IOninja, i will add that now, since quotation marks are pretty easy to add
20:40 risou is now known as risou_awy
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)
samcv u: ‘ 20:41
unicodable6 samcv, U+2018 LEFT SINGLE QUOTATION MARK [Pi] (‘)
jnthn I'd say thinking of variables as the syntactic thing that exists at compile time is pretty accurate
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)
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
20:42 mcmillhj left
IOninja A variable is an entry in the lexpad that points to a container that contains a value or to a value directly... 20:42
IOninja spots github.com/rakudo/rakudo/blob/nom/...ariable.pm and reads it 20:43
samcv u: ‚
unicodable6 samcv, U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
20:44 mcmillhj joined 20:45 labster left
IOninja wow, didn't realize variables had so many traits 20:46
m: for ^5 { my $x will leave {say "hi"}; say "meow" } 20:47
camelia meow
hi
meow
hi
meow
hi
meow
hi
meow
hi
IOninja hehe cool
perlpilot I suspect mostly they're just phasers
20:47 labster joined
IOninja yeah 20:47
20:47 vike left
IOninja bustified a bit tho: 20:48
m: for ^5 { my $x will pre {say "hi"} = 42; say "meow" }
camelia hi
meow
hi
meow
hi
meow
hi
meow
hi
meow
IOninja m: for ^5 { my \x will pre {say "hi"} = 42; say "meow" }
camelia 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 20:49 llfourn joined 20:51 mcmillhj left
Geth doc: a713fa1e61 | (Samantha McVey)++ | util/trigger-rebuild.txt
Trigger rebuild to pull in highlighter fixes
20:52
samcv should be fixed now :) 20:53
20:54 llfourn left
IOninja sweet 20:58
20:58 culb left 21:00 yusrideb joined 21:01 labster left 21:02 user10 joined, rindolf left 21:03 nightfrog joined 21:04 user9 left, user10 is now known as user9 21:06 cdg joined 21:10 Cabanossi left 21:11 Cabanossi joined
tyil good busy samcv 21:14
samcv hi tyil
tyil heil samcv
Geth doc/master: 4 commits pushed by (Will "Coke" Coleda)++
21:14 dotness joined
tyil youre not breaking perl 6 are you 21:14
samcv ? 21:15
no i am not
tyil good
love you btw
samcv uh. o-ok
21:16 pyrimidine left
yusrideb How to start web application using perl6 ? 21:16
[Coke] watches the creepy-meter tick up
21:17 pyrimidine joined, agentzh left
[Coke] yusrideb: Bailador is a very simple app framework you can use. 21:17
moritz or ugexe.com/hello-web-with-puree-perl-6/ if you want something more capable but less simple 21:18
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
21:21 mcmillhj joined, pyrimidine left 21:22 andrzejk_ left
moritz you can, but it's a lot of work 21:24
I mean, the frameworks are also just written in perl
your code can do everything that the frameworks do
but the real question is: why?
yusrideb But I just want to think differently from the others, brother 21:25
21:26 mcmillhj left
moritz then Perl 6 is a good fit for you, I think :-) 21:26
El_Che hehe 21:27
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.
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
I'm search google about perl6 CGI is a little result
timotimo well, cgi is a pretty old-timey way to get your app invoked by the web server
comes with lots of problems, too 21:31
gfldex if you want to start at the beginning you start here: docs.perl6.org/type/IO$COLON$COLON...$COLONINET
moritz yusrideb: modules.perl6.org/ has the list of existing modules
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 ?
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
21:34 mcmillhj joined
[Coke] CGI-- 21:35
21:36 espadrine left 21:37 espadrine_ joined
yusrideb if I use apache2, how to configure apache for support perl6 ? 21:37
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:39
21:42 mcmillhj left
yusrideb I think the use of Perl6 is more suitable for web sockets 21:44
As a companion web applications from perl5. 21:45
IOninja yusrideb, I hacked up a little web up with HTTP::Server::Tiny which is rather barebones. It was enjoyable: github.com/perl6/routine-map/blob/.../viewer.p6 21:46
21:47 bjz joined, espadrine_ left 21:48 espadrine_ joined 21:51 llfourn joined
yusrideb IOninja, I'm only want perl can run in popular webserver such apache, like perl5, can run in apache with simple configure 21:51
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:53
21:54 dotness left 21:55 llfourn left 21:56 skids left 21:57 mcmillhj joined
IOninja yusrideb, right, so stick something like this in /etc/apache2/sites-available: temp.perl6.party/perl6.party.conf 21:57
run a2ensite thenameofsite.conf 21:58
run apache2ctl restart
run the app on port 3000. Done
yusrideb IOninja : Can I run app on port 80 too ? 21:59
IOninja yusrideb: apache runs on it
and it rwverse proxies to yoyr app
You can add more config to make it serve static files bypassing your app too 22:00
22:00 sivoais left
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:00
port 3000 is just a locally available port, your site will be available through normal :80/:433 ports 22:01
22:02 mcmillhj left, sivoais joined
yusrideb I see perl6 very suitable for WebSockets, this becomes a consideration for me to perl6 for WebSockets, besides nodeJS. 22:03
IOninja yup, Perl 6's Supplies should map nicely onto web sockets 22:07
22:09 sivoais left 22:10 dotness joined 22:11 TeamBlast left 22:12 sivoais joined 22:14 dotness left 22:16 TeamBlast joined 22:22 gdonald joined 22:24 risou_awy is now known as risou 22:25 LeCamarade joined 22:28 TeamBlast left
moritz gist.github.com/moritz/b4b246c6f47...761383ecbc first draft of a blog post inspired by IOninja++'s question 22:35
and now time to sleep for me :-)
IOninja moritz++ 22:36
22:38 RabidGravy left 22:39 mcmillhj joined, TeamBlast joined 22:40 risou is now known as risou_awy 22:43 mcmillhj left 22:47 mindos left 22:48 w4and0er96 left 22:49 mindos joined, sena_kun left, mscha left 22:50 jeek joined 22:52 llfourn joined
timotimo i don't understand why perl6 would be better for websockets than for regular web requests, though? 22:55
gfldex it doesn
't
22:55 telex left, mindos left
IOninja I don't think it's 'than'... Just websockets. 22:55
I recall masak was praising supplies mapping nicely to websockets. 22:56
22:56 telex joined
gfldex there is no mod_perl6 yet, so integration into apache requires extra steps 22:56
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 llfourn left, ggherdov left
IOninja "yet"? I thought learned our lessons with mod_perl and have moved on long ago. 22:57
*we 22:58
22:59 pnu__ left, chansen_ left
gfldex i didn't say it's a good idea. Culture is sticky tho. 23:01
23:02 mindos joined 23:03 TEttinger joined
IOninja wonders whose culture 23:03
23:03 ggherdov joined
IOninja Considering Perl 5 treats mod_perl as something to avoid. 23:03
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:04
23:05 w4and0er96 joined, espadrine_ is now known as espadrine
espadrine like http2? 23:05
IOninja That's a good example.
Though this ancient issue contradicts the goodness :P github.com/kraih/mojo/issues/423 23:06
23:09 pnu__ joined 23:10 chansen_ joined 23:14 chansen_ left 23:15 chansen_ joined 23:16 rurban left 23:18 itcharlie1 left 23:23 bjz left 23:25 dj_goku left, dj_goku joined, dj_goku left, dj_goku joined, astj joined 23:28 Possum left, avalenn left 23:29 cpage_ left, Possum joined 23:30 avalenn joined, astj left 23:39 lep_ left 23:43 lep-delete joined 23:48 espadrine left 23:53 llfourn joined 23:59 llfourn left