»ö« 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.
AlexDaniel asdfgh: I wonder, why not use opengl directly? 00:07
asdfgh I've never done that before
timotimo we don't have an opengl binding, is why 00:09
AlexDaniel ah well, somehow I assumed that this question is not perl6-specific, oops 00:09
but yeah, I'm not saying that this is the right way (or the easiest one), but it worked great for me several times (especially for game-related stuff). This was not perl 6 though 00:10
perhaps it's a great opportunity to get opengl bindings done, right? ;)
timotimo *shrug* 00:12
we have some start of an opengl binding by someone who intentionally abandoned it immediately after the PoC was done
(a colored rotating triangle)
GTG 00:14
asdfgh Is opengl any harder to use directly? 00:20
AlexDaniel asdfgh: I think so 00:29
BenGoldberg I just learned of a new (to me), cool way of using reference counting for automatic memory management <hboehm.info/popl04/refcnt.pdf> ... now if only it could properly free circular reference loops as a mark-and-sweep gc can, then it would be awesome :) 00:39
BenGoldberg The interesting thing about the scheme is that, when an object's refcnt goes to 0, it's not freed right away, but pushed onto a stack of to-be-freed objects. Whenever a new memory allocation of N bytes is about to be done, repeat the following: {one object, O, is popped from the stack. if O is a container, it's contents get their refcnts decremented, and perhaps pushed onto the stack. O is then freed.} until either at least N 00:45
bytes have been freed, or the stack is empty.
This avoids both the typical program pause which happens when a conventional gc is done, or the pause which happens in a conventional (like perl5!) refcounting scheme, in which freeing a container results in some *recursive* refcount decrementing, which can result in a program pause. 00:49
tushar my attribute definition is "has Array @.data is rw = [];". I would like to access it in a private method. I am achieving it as "@!data". Am I doing it a right way? When I attempted to access it as "self@!data", I experienced an error. 00:59
Error Message: "Invocant requires a type object of type Array[Array], but an object instance was passed. Did you forget a 'multi'?" 01:00
Any thoughts?
MasterDuke @!data is correct 01:16
docs.perl6.org/language/classtut#i...wigils_%21 has some info about the ! twigil
tushar MasterDuke, thanks. 01:17
MasterDuke, I read that doc. Any thoughts on the error that I am experiencing while using "self@!data"? 01:18
just curious..
timotimo i can't get that error
i always get "two terms in a row"
MasterDuke m: class A { has Array @.data is rw = []; method !a() { dd self.@.data }; method b() { self!a() }; }; my $a = A.new; $a.data.push: []; $a.b 01:19
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in method a at <tmp> line 1␤ in method b at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke m: class A { has Array @.data is rw = []; method !a() { dd self@!data }; method b() { self!a() }; }; my $a = A.new; $a.data.push: []; $a.b
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3@.data is rw = []; method !a() { dd self7⏏5@!data }; method b() { self!a() }; }; my␤ expecting any of:␤ infix␤ infix stopper␤ …»
MasterDuke m: class A { has Array @.data is rw = []; method !a() { dd self.@!data }; method b() { self!a() }; }; my $a = A.new; $a.data.push: []; $a.b
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in method a at <tmp> line 1␤ in method b at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke i agree the error is weird, but i wouldn't have expected self@!data to be valid syntax 01:21
tushar timotimo, I got the same error as MasterDuke. my class definition and method definition is also similar to what he tried. 01:22
yes, I am expecting the same. Doc shows the same syntax and I am just following it.
MasterDuke tushar: what is the exact line you're using? i can't seem to get that error with 'self@<anything>', but 'self.@<things>' sometimes does
tushar m: unit class DataTable:ver<0.0.1>:auth<github:tushardave26>; has Array @.data is rw = []; method !sanity-check { unless [==] self@!data { fail "The number of observations in each rows are not equal.!!"; } method dim { self!sanity-check; } my $dt = DataTable.new(data => [["Tushar", "Dave", 29], ["John", "Adams", 30]]); $dt.dim(); 01:27
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3 method !sanity-check { unless [==] self7⏏5@!data { fail "The number of observation␤ expecting any of:␤ block or pointy block␤ infix␤ …»
tushar oopss.. I believe syntax is incorrect.. 01:28
I attempting to use REPL here first time..
I hope it make sense.:( 01:29
here is the paste bin link (pastebin.com/wLyjBbyB) for .pm file and here is link (pastebin.com/pRatgrUz) for the executable file.. 01:32
timotimo m: pastebin.com/wLyjBbyB 01:33
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3http:7⏏5//pastebin.com/wLyjBbyB␤ expecting any of:␤ colon pair␤»
timotimo :(
tushar timotimo, can you use it like that?
timotimo only with some sites
gist.github.com definitely works
there are at least two others, but i forgot which ones 01:34
MasterDuke m: unit class DataTable:ver<0.0.1>:auth<github:tushardave26>; has Array @.data is rw = []; method !sanity-check { unless [==] @!data { fail "The number of observations in each rows are not equal.!!"; }; }; method dim { self!sanity-check; }; my $dt = DataTable.new(data => [["Tushar", "Dave", 29], ["John", "Adams", 30]]); $dt.dim()
tushar alright let me try that then.. knowledge, knowledge.. Lots of new knowledge... :)
camelia ( no output )
MasterDuke m: unit class DataTable:ver<0.0.1>:auth<github:tushardave26>; has Array @.data is rw = []; method !sanity-check { unless [==] self@!data { fail "The number of observations in each rows are not equal.!!"; }; }; method dim { self!sanity-check; }; my $dt = DataTable.new(data => [["Tushar", "Dave", 29], ["John", "Adams", 30]]); $dt.dim()
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3 method !sanity-check { unless [==] self7⏏5@!data { fail "The number of observation␤ expecting any of:␤ block or pointy block␤ infix␤ …»
MasterDuke m: unit class DataTable:ver<0.0.1>:auth<github:tushardave26>; has Array @.data is rw = []; method !sanity-check { unless [==] self.@!data { fail "The number of observations in each rows are not equal.!!"; }; }; method dim { self!sanity-check; }; my $dt = DataTable.new(data => [["Tushar", "Dave", 29], ["John", "Adams", 30]]); $dt.dim() 01:35
timotimo well, our logic is "most errors are Two Terms In A Row, but sometimes we can make a better guess", so i suppose in this case it sees "you've put an 'unless' in front" and says "that's not just a TTIAR, it's a missing block!"
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in method sanity-check at <tmp> line 1␤ in method dim at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke m: unit class DataTable:ver<0.0.1>:auth<github:tushardave26>; has Array @.data is rw = []; method !sanity-check { unless [==] self.@.data { fail "The number of observations in each rows are not equal.!!"; }; }; method dim { self!sanity-check; }; my $dt = DataTable.new(data => [["Tushar", "Dave", 29], ["John", "Adams", 30]]); $dt.dim() 01:37
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in method sanity-check at <tmp> line 1␤ in method dim at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: class A { method t { self.@ } }; A.t
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in method t at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo interesting 01:38
m: say @
camelia rakudo-moar 31c4c6: OUTPUT«[]␤»
timotimo @ is an anonymous state variable of listy type, and self.@ just calls the list with self 01:39
m: say &
camelia rakudo-moar 31c4c6: OUTPUT«(Callable)␤»
timotimo m: say "hello".&
camelia rakudo-moar 31c4c6: OUTPUT«Cannot invoke this object (REPR: Uninstantiable; Callable)␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: "hello".&say
camelia rakudo-moar 31c4c6: OUTPUT«hello␤»
timotimo m: my @foo := -> { say "heyo $_ !!!" } but Positional; 100.@foo
camelia rakudo-moar 31c4c6: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: my @foo := { say "heyo $_ !!!" } but Positional; 100.@foo
camelia rakudo-moar 31c4c6: OUTPUT«heyo 100 !!!␤»
timotimo m: my @ := { say "heyo $_ !!!" } but Positional; 100.@
camelia rakudo-moar 31c4c6: OUTPUT«Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?␤ in block <unit> at <tmp> line 1␤␤»
timotimo can't do it like this, but you should be able to see the similarity 01:41
tushar timotimo, hmmm.. can you elaborate your statement about error (statement on 21:35)? 01:42
timotimo 033618 timotimo │ @ is an anonymous state variable of listy type, and self.@ just calls the list with self
^- this one?
tushar no, this one "well, our logic is ..." 01:43
timotimo ah
hm
m: say "hello"␤say "how are you" 01:44
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row across lines (missing semicolon or comma?)␤at <tmp>:2␤------> 3say "hello"7⏏5<EOL>␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ sta…»
timotimo this is an example where we encounter two terms in a row, but have some extra information for the user
tushar timotimo, I understand this error messages, as I knew that say expect one statement or multiple statement separated by ",".. 01:45
timotimo m: say 1 2 3 01:46
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say 17⏏5 2 3␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ …»
timotimo m: 1 + 4, 9 + 2 4 + 7 01:47
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 031 + 4, 9 + 27⏏5 4 + 7␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ statemen…»
timotimo not just say, but basically everywhere
i don't have good examples, sorry
i really need to go to bed :)
tushar timotimo, no worries, you have done a lot.. thanks for all your help and efforts.. 01:48
timotimo you're welcome
seeya! :)
tushar good night!!
BenGoldberg m: sub prefix:<∑>(\args) { [+] |args }; say ∑ 1..3; 02:34
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤»
BenGoldberg m: sub prefix:<∑>(\args) { [+] |args }; say [+] 1..3;
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(\args) { [+] |args }; say [+] |(1..3); 02:35
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(\args) { [+] |args }; say ∑ 1, 2, 3;
camelia rakudo-moar 31c4c6: OUTPUT«123␤»
BenGoldberg m: sub ∑(\args) { [+] |args }; say ∑ 1, 2, 3; 02:36
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub7⏏5 ∑(\args) { [+] |args }; say ∑ 1, 2, 3;␤ expecting any of:␤ new name to be defined␤»
BenGoldberg m: sub prefix:<∑>(@_) { [+] @_ }; say ∑ 1, 2, 3; 02:38
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling prefix:<∑>(Int) will never work with declared signature (@_)␤at <tmp>:1␤------> 3sub prefix:<∑>(@_) { [+] @_ }; say 7⏏5∑ 1, 2, 3;␤»
BenGoldberg m: sub prefix:<∑>(@_) { [+] @_ }; say ∑ (1, 2, 3); 02:39
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(@_) { [+] @_ }; say ∑ 1..3;
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling prefix:<∑>(Int) will never work with declared signature (@_)␤at <tmp>:1␤------> 3sub prefix:<∑>(@_) { [+] @_ }; say 7⏏5∑ 1..3;␤»
BenGoldberg m: sub prefix:<∑>(@_) { [+] @_ }; say ∑ (1..3);
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(@_) is looser(&infix:<,>) { [+] @_ }; say ∑ (1..3); 02:42
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(@_) is looser(&infix:<,>) { [+] @_ }; say ∑ 1..3; 02:42
camelia rakudo-moar 31c4c6: OUTPUT«6␤»
BenGoldberg m: sub prefix:<∑>(@_) is equiv(&infix:<[+]>) { [+] @_ }; say ∑ 1..3;
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ infix:<[+]> used at line 1. Did you mean 'infix:<+|>', 'infix:<∖>', 'infix:<lt>'?␤␤»
japhb m: sub prefix:<∑>(+@_) { [+] @_ }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤»
japhb m: sub prefix:<∑>(*@_) { [+] @_ }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3); 02:43
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤»
japhb m: sub prefix:<∑>(+@_) { [+] |@_ }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤»
japhb m: sub prefix:<∑>(+@_) { [+] @_.list }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤»
japhb m: sub prefix:<∑>(+@_) { [+] @_.list.flat }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤» 02:44
japhb m: sub prefix:<∑>(*@_) { [+] @_.list.flat }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«1..3␤6␤123␤6␤»
BenGoldberg The default precedence is wrong for it to work properly without some sort of 'is looser' or 'is tighter'
japhb m: sub prefix:<∑>(*@_) is looser(&infix:<,>) { [+] @_.list.flat }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3); 02:45
camelia rakudo-moar 31c4c6: OUTPUT«6␤6␤6␤6␤»
japhb m: sub prefix:<∑>(*@_) is looser(&infix:<,>) { [+] @_.list }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«6␤6␤6␤6␤»
japhb m: sub prefix:<∑>(*@_) is looser(&infix:<,>) { [+] @_ }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«6␤6␤6␤6␤»
japhb m: sub prefix:<∑>(@_) is looser(&infix:<,>) { [+] @_ }; say ∑ 1..3; say ∑ (1..3); say ∑ 1, 2, 3; say ∑ (1, 2, 3);
camelia rakudo-moar 31c4c6: OUTPUT«6␤6␤6␤6␤»
BenGoldberg m: my sub prefix:<∑> := &infix:<+>; 02:46
camelia rakudo-moar 31c4c6: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my sub prefix:<∑>7⏏5 := &infix:<+>;␤ expecting any of:␤ new name to be defined␤»
poohman Hello all, I have a question on Grammars, if I parse a file using the parse file function using an actionclass and assign it to a variable and print it I get the entire tree as ouput 06:15
If I assign .ast of the parsefile to it I get no output even though I have a make 06:16
It just outputs (Any) 06:17
How can I access the data member that I made??
moritz poohman: you also need to make in the TOP rule 06:29
moritz poohman: then .ast on the result should give you something 06:29
poohman ah
ok I made it in a lower token 06:30
ok thanks for the help, ill give it a shot
poohman moritz: I already called a new in the method - how do I call the same object back in TOP - timotimo told me yesterday that it is referenced by self 06:32
Or can I make it only in the TOP rule? 06:33
moritz poohman: can you show your code please?
TimToady all make ever does is just stow a pointer to some object
moritz poohman: in many cases, you call make() in most action methods 06:34
TimToady doesn't care where you did .new
moritz and basically create a tree of result objects, that partially mirrors three of matches in the match object
TimToady { make $<something>.made } should oughta be enough
moritz poohman: github.com/moritz/json/ is an example that builds a data structure mirroring a JSON string as it's parsed 06:35
in lib/JSON/Tiny/Grammar.pm and Actions.pm 06:36
poohman thanks will check it out - for the code can I cut and paste here - not able to run directly on Camelia as it is usually done here - new here and new to IRC -sorry 06:46
moritz poohman: use a paste bin 06:52
like pastebin.com/ or gist.github.com/
poohman ok let me look it up 06:53
poohman pastebin.com/X07bggnw 06:59
hope that works 07:00
moritz poohman: first of all, you should really add whitespace to your regexes to make them more readable 07:01
moritz poohman: second, you call make() in name, so only the 'name' match object has an .ast 07:01
poohman moritz: how can I access name in MAIN? 07:02
moritz so you can add a method assigns($/) { make $<name>.ast } to propagate it to the 'assign' match object
poohman and then all the way to TOP? 07:02
moritz right 07:03
poohman I was trying with make $<name>.made 07:03
moritz and then method line($/) { make $<assigns>.ast if $<assigns> }
.made and .ast are synonyms
I think .made is more politically correct these days :-)
poohman ah ok - but is there any way I can access name directly in main? 07:04
moritz and method TOP ($/) { make $<lines>.map: *.made }
and *then* in the mainline, you can say $times.ast -> $thing { say $thing } 07:05
better: and method TOP ($/) { make $<lines>.grep(&so).map: *.made } 07:06
afk&
poohman cool thanks will try it out - coding after a decade and directly in Perl6 - awk brought me here - a big change from C++ - loving it 07:08
so the code may be messy
moritz PSA: I've tweaked some permissions of the perl6 org on github, making them more liberal 07:43
the default permissions on the perl6 org now contain write permissions for members 07:44
everybody in the org can create new repos in the perl6/ namespace
and Zoffix++ is now an Owner, meaning he can invite new people to the org 07:45
dalek osystem: bf59c19 | (Pierre VIGIER)++ | META.list:
Add Data::MessagePack to ecosystem

See github.com/pierre-vigier/Perl6-Data-MessagePack
07:58
osystem: c2408f8 | (Siavash Askari Nasr)++ | META.list:
Merge pull request #251 from pierre-vigier/master

Add Data::MessagePack to ecosystem
Woodi hi today :) 08:46
pierre_++
pierre_ As i might need that in production for work, i first push the pure perl version 08:48
slower, but it's working 08:49
native version is harder than what i thought :)
dalek line-Perl5: 8ab2ba4 | niner++ | lib/Inline/Perl5.pm6:
Add a FIXME comment
08:55
line-Perl5: ac303a2 | niner++ | t/globals.t:
Test accessing package variables via %*PERL5

Do not itemize the Perl5Hash in the constructor
With this a for %my_perl5_hash { } now correctly iterates
bazzaar \o perl6 09:30
bazzaar p6: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); 09:31
camelia ( no output )
bazzaar p6: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); @fmts.say 09:32
camelia rakudo-moar 86d9e9: OUTPUT«[a1 i3 i5 i5 i5 1x a3]␤»
bazzaar p6: my @ranges-good; my $pos = -1; for @fmts { $_ ~~ /\d+/ and @ranges-good.push(($pos += 1).perl..($pos += ~$/ - 1).perl) }; @ranges-good.say 09:33
camelia rakudo-moar 86d9e9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@fmts' is not declared␤at <tmp>:1␤------> 3my @ranges-good; my $pos = -1; for 7⏏5@fmts { $_ ~~ /\d+/ and @ranges-good.pus␤»
bazzaar p6: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); my @ranges-good; my $pos = -1; for @fmts { $_ ~~ /\d+/ and @ranges-good.push(($pos += 1).perl..($pos += ~$/ - 1).perl) }; @ranges-good.say 09:35
camelia rakudo-moar 86d9e9: OUTPUT«["0".."0" "1".."3" "4".."8" "9".."13" "14".."18" "19".."19" "20".."22"]␤»
bazzaar p6: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); my @ranges-bad; my $pos = -1; for @fmts { $_ ~~ /\d+/ and @ranges-bad.push(($pos += 1)..($pos += ~$/ - 1)) }; @ranges-bad.say 09:36
camelia rakudo-moar 86d9e9: OUTPUT«[0..0 3..3 8..8 13..13 18..18 19..19 22..22]␤»
bazzaar would someone be so kind as to explain why .perl makes the ranges different? 09:38
bazzaar apologies if my question is ambiguous, it's not that the range numbers are quoted, it's that the range numbers are actually different. 09:49
I'm wondering if it could be a bug (or I might be doing something daft) 09:50
gfldex m: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); my @ranges-good; my $pos = -1; for @fmts { $_ ~~ /\d+/ and @ranges-good.push(($pos += 1) .. ($pos += ~$/ - 1)) }; @ranges-good.say 10:02
camelia rakudo-moar 86d9e9: OUTPUT«[0..0 3..3 8..8 13..13 18..18 19..19 22..22]␤»
gfldex m: my @fmts = split(',', 'a1,i3,i5,i5,i5,1x,a3'); my @ranges-good; my $pos = -1; for @fmts { $_ ~~ /\d+/ and @ranges-good.push(($pos += 1).perl .. ($pos += ~$/ - 1)) }; @ranges-good.say 10:03
camelia rakudo-moar 86d9e9: OUTPUT«["0"..0 "1"..3 "4"..8 "9"..13 "14"..18 "19"..19 "20"..22]␤»
CIAvash m: my $num1; say ($num1 += 1) .. ($num1 += 5); my $num2; say +($num2 += 1) .. ($num2 += 5)
camelia rakudo-moar 86d9e9: OUTPUT«6..6␤1..6␤»
gfldex bazzaar: ^^^ 10:04
gfldex m: my $num1; my &f = { dd $^a, $^b }; f(($num1 += 1),($num1 += 5)); 10:06
camelia rakudo-moar 86d9e9: OUTPUT«Int $a = 6␤Int $b = 6␤»
gfldex bazzaar: ^^^ that's what's going on
bazzaar gfldex: and CIAvash, thanks so much for your help, I will study your solutions, learning all the time 10:09
Woodi today HN promotes dislikeing OO :) www.yegor256.com/2016/08/15/what-is...mming.html but we still don't have replacement or recipe 11:10
tadzik hehe, pointing out flaws is always easier than coming up with alternatives :) 11:12
a lot of this criticism seems more directed either at people who misunderstand/misuse OO or particular languages 11:13
Woodi Linus T. was probably closes with recipe :) 11:14
brrt i think object oriented programming has been hugely succesful at enabling the development of large programs 11:15
the problem is of course that we are now stuck with large programs 11:16
tadzik funny thing about that C quote is it's very carefully cropped
IIRC he also says "We've been writing object oriented code in the kernel in C for years and it's perfect"
but that would not work towards the author's point, would it ;)
Woodi also Kay sayd "messages!" but we read it "messages everywhere!", but inside objects messages are harmfull, IMO 11:17
brrt tadzik: i recall that bit too
tadzik the biggest takeaway for me from Kay's idea is "object are there to ensure that the data they encapsulate is always correct" 11:18
so: managing responsibility
which is something we need to be doing one way or another 11:19
brrt true
nine I think of the listed quote the one by Oscar Nierstrasz is the most sensible.
tadzik the biggest thing to criticise in OO is imho the way it's taught
Woodi tadzik: structs are realy nice :) struct Driver { int fd; void*mem; } + some functions totally skipping VirtualDriver, etc. but then C have EnhancedDriver { struct Driver *dprt; ... } ...
tadzik "OO is when you do classes. Also, inheritance can help you with code reuse"
AAAAAA
brrt the only alternative is taking a god-overview to your program... which is feasible for small things 11:20
nine tadzik: oh yes, absolutely
brrt and OOP doesnt eliminate it
nine Btw tadzik, p6profiler-qt has been my most favorite tool in the past few weeks :) 11:21
FROGGS_ OO is about encapsulation and behaviour
tadzik Rob Pike's quote I also like
timotimo i wish we could give p6profiler-qt a bit more love. i wanted to build a view for GC runs, but it seemed like a boatload of work to build a "progress bar" with text in it into the table
tadzik nine :) I'm glad it's helpful
FROGGS_ I think that I quite rarely make use of inheritance btw
tadzik who would've thought that spending few days writing C++ on a Perl hackathon would do anything good :P 11:22
FROGGS_ hehe
FROGGS_ .oO( C deserves karma, rally )
really*
tadzik .karma C
FROGGS_ ENOBOT 11:23
tadzik this used to be funny when it worked 11:23
FROGGS_ since years
timotimo tadzik: are you interested in building a few more cool things into the p6profiler-qt? like, we're currently throwing away a whole lot of information the call graph could give us
tadzik :(
timotimo: sure
timotimo like "this routine is 90% jitted but 10% speshed-only. give me a list of the callers and how many entries are jitted vs speshed"
tadzik I mean, a feature parity with the angulailer would be a good start :P
oooh
this sounds lovely
timotimo or "this routine really deopts often. i wonder what callers are responsible for that"
nine Well getting a list of callers of a routine would be a great start anyway 11:24
timotimo right. and it should be trivial to do, too 11:25
this is one of the feature requests i have for coke's angular 2 rewrite of the html profiler
tadzik except for the part when you need to hammer your thoughts into Qt
timotimo ... yes
tadzik I can carry that ring to mordor though :P
timotimo that'd be fantastic
the qt model/view framework is a destroyer of my brain 11:26
when i don't have to work with it, i tend to be pretty darn pleased with qt
brrt hehehe 11:27
tadzik yeah, the complexity is mind-boggling 11:28
but it's one of the things that you eventually realize that are complex only becuase they solve a very complex problem 11:29
timotimo right
tadzik or at least I don't see any prior art proving otherwise
see also: HTML+CSS+JS
brrt tk? 11:31
timotimo :D 11:32
Woodi here is small script just for benchmarking our OO: github.com/slunski/caffeeExample/b...xample.pl6 anyone can tell me what I'm doing wrong ? :) 11:32
brrt or maybe i'm saying: i dont see which problems qt solves that tk does not 11:33
Woodi brrt: tk is hibernated in ugliness, that all whar is wrong with it...
timotimo "small script" :\ 11:34
Woodi maybe modules will cam later :)
brrt i have very little experience with gui programming in general of course 11:35
tadzik I'm not knowledgable in Tk enough to give you a clear answer. IIRC as far as styling your UI goes, Tk is massively behind other toolkits, which is where the ugliness probably comes from
brrt so im literally being naive
timotimo Qt lets you style most things with CSS 11:36
brrt hmm yeah. i dont really think Tk is ugly though
timotimo it doesn't have any rounded corners!!!! 11:37
brrt okay. so self-imposed pain on that front :-p
(i guess that shows how much i know about it) 11:39
tadzik :) 11:39
I think its tcl roots make its bindability a bit limited
even in python, tkinter would accept some code that "pure python", with its strong typing would not 11:40
timotimo yeah, tk is stringy-typed even in python 11:42
it's really bad we don't have a tk binding for perl6, it could be the killer feature
brrt exits train 11:43
dalek line-Perl5: fcc97c0 | niner++ | / (5 files):
Wrap Perl 5 arrays instead of copying them

This allows for writing back to the underlying Perl 5 array through normal assignments. Also improves performance in cases where not all entries are accessed.
12:07
_sfiguser hello everyone... is there an equivalent metacpan for perl 6 ? 12:25
MasterDuke _sfiguser: not really, but the closest thing is modules.perl6.org/ 12:26
timotimo we're moving towards having perl6 stuff on cpan, and we have a "fork" of metacpan (i think?) that's working better for perl6 stuff 12:26
but nothing final yet
_sfiguser ok thanks... 12:28
dalek line-Perl5: 5e0dba3 | niner++ | / (2 files):
Don't set up an array of return values if there are none

Saves not only the setup but also the conversion to Perl 6
12:47
line-Perl5: e2f8f0b | niner++ | / (2 files):
Bring the "no return values" optimization to package methods, too
12:57
bioduds question, guys. Will a 256 Mb ubuntu with say, 2gb swap install perl6? 13:22
Woodi bioduds: no :) 13:24
timotimo it could, but it'll be extremely slow to build the core setting 13:25
by extremely i mean something like "come back next week"
bioduds im testing c9 min slice vps
the free tier
timotimo you can, however, copy an already built rakudo onto another system, if the paths are all the same 13:26
and if the architecture matches, of course
bioduds oh
that would be interesting, i'll try
timotimo i tend to build my moarvm with -march=native, but that's not the default. that would probably break when you transfer from your home computer to an amazon cloud server thingie
it'll potentially give wrong results in some compile-time-decided config hashes, like $*VM or $*COMPILER or whatever
dalek line-Perl5: 51ec79d | niner++ | / (2 files):
Don't create arrays for single return values

Saves the native calls to unpack the 1-element array in a very common situation.
14:37
line-Perl5: 85188d0 | niner++ | lib/Inline/Perl5.pm6:
Fix memory leaks in Perl5Hash and Perl5Array creation

The constructors already increase the refcnt of the actually referenced objects. No need to keep the referencing SVs alive.
dalek osystem: 70867a8 | titsuki++ | META.list:
Add Algorithm::LBFGS to ecosystem

See github.com/titsuki/p6-Algorithm-LBFGS
14:55
osystem: f2144dd | titsuki++ | META.list:
Merge pull request #252 from titsuki/add-lbfgs

Add Algorithm::LBFGS to ecosystem
El_Che bioduds: you could install my deb 14:57
bioduds: github.com/nxadm/rakudo-pkg/releases <- 32- and 64-bit ubuntu pkgs 14:58
bioduds: I use it on the smallest digicialocean machine (I chose 32-bit ubuntu because of the low memory) 15:03
dalek line-Perl5: 8374645 | niner++ | / (2 files):
Save a boat load of native calls by moving type introspection to C

Instead of doing one native call for every type we test for, move that elsif cascade to C code and just return a number indicating the type found.
15:04
timotimo cool! 15:05
boatloads are big amounts 15:06
DrForr Woo, I finally have a grammar change to test my test suite. 15:10
DrForr Is there a handy class that use 'HAS' declarations? 15:17
*uses
timotimo i ... don't think so? 15:22
DrForr Fair 'nuff. I'm just going through the grammar as rigorously as I can. 15:23
DrForr I'm just testing it on 'is repr("CStruct"){ HAS int $x }' and that's throwing a warning. 15:25
(obviously a class) - If you know offhand what type I can use to get rid of the type warning that gives me I'd appreciate it. Not a big deal though. 15:26
timotimo yeah, HAS is for putting other CStructs into a CStruct
winfred_ hello all, what exactly does grep(&so) do? I googled it and could find only 2 instances - both in irc by moritz - does it remove gaps in arrays?
DrForr So I'd probably need to declare a CStruct class and *then * the HAS-using class. 15:27
mumble.
timotimo winfred_: it only lets things through that will boolify to True 15:28
it just uses the "so" sub as the matcher for grepping
winfred_ thanks , ill try looking up the so sub 15:30
bioduds please, very simple question. How do I access an attribute in a class? with dot syntaxe not working 15:39
never mind, it is working 15:42
just now interpolating I guess 15:43
not interpolating
DrForr returns to grumbling at here-docs. OTOH they're the last big thing, I think. 15:54
timotimo bioduds: if you want it to interpolate, put () after the attribute name 15:58
bioduds tx 15:58
DrForr You can think of it as using the accessor *method*. (which you really are.) 15:59
optikalmouse is there an oauth lib for perl6? and I think today I'm gonna need to make me a perl6 rest api-ish thing, I'm working on an elm tutorial today and need a backend that isn't nodejs heh 16:06
DrForr optikalmouse: modules.perl6.org - Look for OAuth2::Client::Google 16:07
optikalmouse DrForr, thanks! 16:07
optikalmouse is there a variable naming convention or is everyone still deciding on if they want to camelCase or lisp-case? 16:12
mst lisp-case seems to be it 16:14
optikalmouse my $var-is-long; sub another-function() { }; class HelloWorld {}; ? 16:15
DrForr I figure we ave up some whitespace insensitivity to be ale to have it, may as well use the hell out of it :) 16:16
mst optikalmouse: that seems to be what everything I see does. 16:17
optikalmouse ok cool, when is the underscore naming convention used...if ever? private vars or anything like that? 16:18
El_Che you mean as in perl5 "private methods"? -> docs.perl6.org/language/objects#Private_Methods 16:20
DrForr I use it on occasion to delineate NQP stuff, but that's not something you're going to encounter in typical code. 16:21
optikalmouse given %hash { say .<key> } 16:39
^ would that work?
mst m: my %hash = (foo => 1, bar => 2); given %hash { say .<bar> } 16:40
camelia rakudo-moar 363a3a: OUTPUT«2␤»
mst apparently, yes
optikalmouse neato :D
optikalmouse how do I do string interpolation? like "#{$var}" ? 16:46
mst m: my $var = 'bar'; say "foo {$var} baz"
camelia rakudo-moar 363a3a: OUTPUT«foo bar baz␤»
mst not sure what that # is but that isn't perl6 16:47
DrForr Drop the '#'- That's Ruby.
Or just "foo $bar baz"
mst oh, right 16:48
DrForr The braces should only be needed if you're inlining code, or you don't want spacing between a variable and some text.
optikalmouse that's a rubyish, yah
mst doesn't ruby, the OO is too restricted and bare bones compared to perl5
"I have to write my own constructor? Are you kidding me? *goes back to Moo*"
avar mst: github.com/peczenyj/MooseX ? 16:53
mst avar: ooh, that's come along quite a bit since I last looked at it 16:55
smls m: "a" ~~ / [(a) b]? (a) /; say $1; say $/.list; 17:02
camelia rakudo-moar 363a3a: OUTPUT«「a」␤()␤»
smls ^^ Why is $/.list not (Nil, 「a」) in this case? 17:03
mst is the () inside the [] creating a capture at all? 17:06
smls Yes 17:07
Shorter golf:
m: "b" ~~ / (a)? (b) /; say $1; say $/.list;
camelia rakudo-moar 363a3a: OUTPUT«「b」␤()␤»
smls m: "ab" ~~ / (a)? (b) /; say $1; say $/.list;
camelia rakudo-moar 363a3a: OUTPUT«「b」␤(「a」 「b」)␤»
smls Interestingly, $/[*] works as expected, just not .list 17:08
smls writes RT
moritz m: "b" ~~ / (a)? (b) /; say $/.list.elems 17:09
camelia rakudo-moar 363a3a: OUTPUT«2␤»
moritz m: "b" ~~ / (a)? (b) /; say $/.list.map: *.^name
camelia rakudo-moar 363a3a: OUTPUT«()␤»
moritz m: "b" ~~ / (a)? (b) /; say $/.list.map(&so).elems 17:10
camelia rakudo-moar 363a3a: OUTPUT«0␤»
moritz so, .elems reports the size correctly, but iteration fails
mst did somebody accidentally acpture InterationEnd? ;)
optikalmouse sigh, got tripped on hash assignment, {} vs [] ;/ 17:11
optikalmouse my first http + json parsing thing: gist.github.com/omouse/eb1b37783cf...0b55d33350 17:16
grabs the list of radio stations from digitally imported, because I can't seem to find the url list on their site ;/ ;/
optikalmouse welp, I just wasted my time creating that script. DI.fm has forced people, just like the rest of the damned internet to use their proprietary web app. "licensing restrictions". 17:19
somehow it's ok to stream techno for a decade using icecast/shoutcast but now it's not allowed :| 17:20
RabidGravy we still use icecast
I'm actually surprised that doesn't use JSPF 17:21
"we" being futuremusic.fm 17:23
optikalmouse ^ cool! 17:25
welp time to dive into the api requests the digitally imported player uses. 17:26
RabidGravy a lot the stuff I have been making is toward making the radio management software in Perl 6
optikalmouse aha, I see what they did, " Adobe Flash Player is required for browser-based audio playback on Digitally Imported. "
optikalmouse it's no longer 2016 people, it's 2001. 17:27
RabidGravy yeah that's crap
El_Che optimized for 1024*768
RabidGravy don't all browsers support HTML5 audio players of some sort these days?
(apart from you know lynx and w3m ;) 17:28
optikalmouse $8/month for premium and then you can use external players. I guess that isn't too bad...but they insert ads into the free stream anyway. confusing. 17:29
bioduds subset Genero of Str where * eq "Homem" or * eq "Mulher" 17:36
accepts Homem but not Mulher
why?
RabidGravy Well stream.futuremusic.fm:8000/mp3 all free, though Lenny of Noxegenus appears to have gone bonkers and is playing New Orleans jazz :-\
RabidGravy bioduds: you may want to do something like "subset Genero of Str where "Homem"|"Mulher"" 17:38
bioduds RabidGravy : tx
smls bioduds: The `or * eq "Mulher"` is parsed as a statement prefix, not part of the where expression. 17:38
bioduds :) 17:39
mst so presumably where (* eq "Homem" or * eq "Mulher") would work 17:40
'or' binds quite loosely
I mean, RabidGravy's answer is better for that case
smls mst: Except that the short-circuting operators don't play nice with WhateverCode, last I checked. 17:41
mst ah
smls mst: See RT #116208
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116208 17:42
mst so where any(* eq 'Homen', * eq 'Mulher') would probably work? 17:43
smls hm.
mst I mean, we're well into "but probably don't" here
I'm just interested because of my own thoughts about whatever star abuse ;)
smls mst: Apparently it does work, yes :P 17:44
mst \o/
note that short circuiting messing stuff up is a problem I've encountered in perl5 as well trying to build DSLs 17:45
usually ended up abusing | and & overloads
which, well, it works, but it's not as elegant as I'd like
RabidGravy in that place the "Goo"|"Bar" forms a Junction that is smart-matched with the value 17:48
mst right, so my any() thing is pretty much an overcomplicated way to achieve basically the same behaviour 17:49
RabidGravy anyhow my smoke test of 57 modules now completes in 23 minutes (from a max of double that)
mst, yeah 17:50
mst \o/
dalek albot: 611df54 | (Zoffix Znet)++ | freenode.org.conf:
Add camelia to #zofbot

It's where all the other bots already are and having `camelia` too would be helpful when writing tests, so you don't have to switch channel/PM all the time.
AlexDaniel haha, I like this reasoning. “some bots are already here, let's bring them all!” :) 18:21
zofcave++
bioduds anyone has an easy link for a module tutorial in p6? 18:23
moritz bioduds: for starting a module? Or using one? Or installing? 18:38
bioduds starting 18:39
i want to learn how to write them
:)
to contribute and to make my code modular too
moritz bioduds: docs.perl6.org/language/modules 18:41
bioduds moritz : tx as usual bro 18:44
moritz bioduds: you're welcome 18:44
bioduds having huge pleasure learning perl6 man
:) 18:45
moritz .tell Zoffix if you're looking for a good project to use your super powers: Build a github bot that invites everybody to the perl6 org how gets a PR merged in a repo under the perl6 org 18:45
yoleaux moritz: I'll pass your message to Zoffix.
bioduds panda install MongoDB failed 20:14
mst good 20:15
otherwise you might end up using mongodb
get DBIish and a postgres instance instead ;)
timotimo well, mongodb is still better than using /dev/null for writing and /dev/urandom for reading
bioduds mst : no other alternatives 20:16
moritz unless you really want random data :-) 20:17
mst bioduds: why?
bioduds mst : I don't want RDBs 20:17
I want NoSQL
mst why?
bioduds cause I like them better
mst MongoDB is pretty crippled as NoSQL stuff goes
bioduds I agree
My first option is DynamoDB but it is expensive 20:18
mst personally, I'd go for storing JSON documents in postgres
you get the same querying capacity as mongodb
and it actually works
bioduds I always disliked RDBs, now that it is no longer the *only* choice, I'm happy :) 20:19
mst trout.me.uk/mongodb.jpg
bioduds not going back to them no more
mst disliked why/how?
bioduds schemas for instance 20:20
fixed
I really find it not good
NoSQL is shemaless
bioduds you may have different versions of data 20:20
mst right, which means it can easily accept broken data 20:21
bioduds not if you aggregate it correctly
mst MongoDB is 'your data is a giant chunk of JSON that may or mayt not make sense'
bioduds correct
mst Postgres, OTOH, lets you have validated fields (columns)
*and* JSON for stuff that varies
bioduds it is up to you to make it have sense I guess
mst and query into the JSON
personally, I prefer being able to have tiehr
same as perl6 has types but doesn't require you to always use them 20:22
but I don't find schemas hard
bioduds I don't find them hard, I find them wrong
mst need a new column? add two lines to a DBix::Class::Candy file, generate the ALTERs, apply to database, keep programming 20:23
bioduds if your model changes during dev 20:23
you need to re-make it
mst then that's trivial to fix
two or three lines of code
bioduds with nosql you dont
mst less code than I need to validate the nosql stuff
bioduds not if you already have millions of entries
mst well, yes, but then you have to make a decision about how to handle the eixtsing data *somewhere* 20:24
timotimo schemas aren't fixed
bioduds subsets are great for validation
timotimo good RDB systems allow you to modify tables
mst NoSQL lets you make the decision somewhere else
bioduds I am betting on subsets and nosql
mst but it doesn't get rid of it
right, so, again, use postgres and a JSON column
then you can have schemaless *and* a database that doesn't eat your data
mst seems like the best of both worlds to me :D 20:25
bioduds nevertheless, I have no alternative in this thing I'm doing now
my "front" is Meteor
mst oh, and meteor requires mongo?
timotimo not even couchdb?
bioduds yep 20:26
I have used DynamoDB in other project
which is, I believe, ideal
but as I said, DynamoDB is expensive
and this project I'm working now must be cheap
mst github.com/Urigo/awesome-meteor#al...-databases 20:27
happily, meteor supports postgresql
so I return to my previous recommendation
bioduds but I don't like RDBs. I know it is strange to say it 20:28
mst ...
bioduds but the whole NoSQL paradigm seems so right to me
mst your only complaint so far is "I don't like schemas"
I already told you how to not need schemas
so what's the problem?
looks like there's also rethinkdb support
bioduds scalability
mst rethink looks kinda nice
postgres scales fine 20:29
I've replaced mongodb with postgres because postgres scales better more than once now
bioduds mongodb scales too 20:29
codefights is done in meteor
works great
mst ...
yes. you *can* scale mongodb 20:30
bioduds Meteor is awesome javascript framework
mst it's easier to scale a system designed by adults though
still not understanding what's wrong with meteor+postgres+JSON
no schema required. scales fine.
anything else?
bioduds cause I believe in mongodb 20:32
mst wat
bioduds i really don't think I need to go for postgres
which is RDB and I want to run away from it
mst you believe in a database that doesn't always return matching records for a query
ok
guess accuracy and data loss don't matter to you 20:33
fair enough
bioduds consistency
timotimo would go for redis under these circumstances
mst mongodb isn't
bioduds is not required for db system, it is a choice
geekosaur wat
bioduds my case, I don't require it
mongodb is not ACID
mst mongodb is for unstructured data that fits in RAM that you can afford to lose
bioduds not a problem for this project I'm doing 20:34
mst but at that point I'd use redis, yes
bioduds DynamoDB is ACID
I can choose developping and using it with consistency
but as I said, this project doesn't require it
you're making the assumption that all systems require consistency 20:35
they don't
some do, some don't
mst I'm not making that assumption 20:37
anyway, your argument at this point is "I believe in MongoDB" rather than anything technical
so, whatever, have fun
your religion is between you and your church, I try and stick to facts ;)
geekosaur considers nosql a failed experiment; increasingly the nosql folks are realizing that there's an actual reason for relational databases and adding the functionality back in, at least optionally 20:38
mst NewSQL 20:39
bioduds it's new, only needs to improve 20:40
but it is better in my opinion
geekosaur nope
bioduds roughly putting
geekosaur open source folks alwats want to believe the stuff that works is overengineered and they can do it better. years later they have rediscovered the hard way why it was done that way... and then the next generation believes it's overengineered and they can do it better 20:41
lather, rinse, repeat
nine geekosaur: I see nothing special with open source folks about that. That's the same with all programmers 20:42
dalek whateverable: ca77fb5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files): 20:57
whateverable: Bisectable: “good”/“bad” → “old”/“new”, support for signals
whateverable:
whateverable: The main purpose of this commit was to make bisectable understand segfaults (and
whateverable: other signals). As it required a major rework in the logic, I've also changed
timotimo mst: the term is NuSQL 20:57
AlexDaniel dalek: we are not getting along very well, right? I should make a cake for you or something :) 20:59
bioduds I don't quite go with the crowd on that matter 21:21
it is reasonable to acknowledge that there is a problem that caused the need for developing non-relational dbs 21:22
a problem needed to be solved
it is being solved. surely there is a need for further improvement
geekosaur no, I don't think it did. the problem was "we thought slowness was just because stupid, we didn't think that maybe it's because people don't want their purchases dropped on the floor" 21:23
bioduds seeing this as an adventure of people who wanted simply to do something new is not reallistic
geekosaur if you want an unreliable data store, use a text file
bioduds it is, in my view, sticking to what exists for years because it exists for years 21:24
there are problems with this model for many huge role players out there
bioduds and that is why they came up with these new solutions 21:25
geekosaur yes, you always are doing something completely different
that's why nosql has been rewriting itself into newsql ever since it was creared
bioduds now, rejecting it on the basis that it is not as reliable as the old ones is, in my view, turning your face away from the problem and pretending it doesn't exist 21:26
geekosaur this was, very literally and explicitly, "it's just key-value, how hard can it be?" followed by years of "...oh"
it solves no problems
except the "problem" that rdbms was reliable
timotimo geekosaur: the term has to be NuSQL 21:30
tailgate How does one do something like **kwargs in python for a perl6 function? 21:31
ugexe *%args 21:32
bioduds geekosaur : I disagree 21:33
ugexe i thought that said kvargs, oopes
bioduds solves many problems
geekosaur ues, I noticed you disagrwee
bioduds :)
geekosaur you have not named a single problem it solves
bioduds respectfully, of course
scalability
I have
geekosaur scalability... what planet are you on
bioduds modelling after having huge data
re-modelling 21:34
these are real problems
geekosaur I grant postgresql has had scalability problems. rdbms in general does not
bioduds why didn't they make messenger in it?
geekosaur and keeps going long after every single one of your nosql solutions has encountered true big data
and failed 21:35
bioduds why does google have big data, then?
geekosaur because they don;t want to pay for oracle
bioduds it does not work with sql
omg, oracle?
geekosaur riiight
bioduds nope
geekosaur yes, its useless completely
bioduds same problem with oracle
won't handle petabytes of user data like they need it to
geekosaur right 21:36
bioduds no sharding
geekosaur dude, financial folks handle bigger data than you have ever seen
bioduds it is a need that came to solve scalability problems
you seem not to grasp that point, really 21:37
geekosaur somehow oracle scales to handle it when nosql falls on its face
I grasp it fine
I say your big data is small potatoes
bioduds well, facebook, google, yahoo, paypal, stripe, ... , * seem to disagree with you 21:38
bioduds otherwise, they would simply put oracle to do the job 21:38
geekosaur nom, they wouldn;t because they don't want to pay for it
timotimo oracle is hella expensive 21:39
stmuk the KV stores are ok to store cookies or throw away information on free systems
bioduds geekosaur : that is naive, man
geekosaur facebook google etc. are infamous for scrounging out solutions with cheap hardware
yes, you are painfully naive
timotimo and the way to find out how much you have to pay ... it's also hell
bioduds thinking that major players wouldn't go with the *best* cause it is expensive is naive, I believe 21:40
that is not how this game is played
stmuk data lost is acceptable for most facebook or google customers (they don't pay anything or have terms of service)
bioduds they have no data loss
bioduds they run on distributed machines 21:40
geekosaur that is exactly how the game is played
bioduds they may choose whether it is going to be consistent or not 21:41
geekosaur you can find this out very easily, there have beenendless articles about how google, amazon, facebook, etc. work
Woodi memcache is nice :)
geekosaur it's all scrounging to build something quaireliable from the cheapest possible stuff 21:41
timotimo bioduds: in a world where people chant "worse is better", it makes sense not to go to oracle
also, when you start small, you'd have to have a crazy significant investment if you wanted to start with oracle 21:42
geekosaur google's pub;ished academic papers that say that right out as part of the problem they were trying to solve (for example figuring out a dirt cheap datacenter router without having to buy cisco)
AlexDaniel umm, I have a solution for you guys :)
bioduds well, anyhow, you are building these assumptions on stereotypes, I think.
bioduds and not looking torwards the future 21:42
NoSQL is here to stay 21:43
geekosaur yes, history is nothing but a stereotype
experience is nothing but a stereotype
timotimo i wonder how strong proponents of object databases were about their opinions
bioduds and to be better than old-school DBs
my opinion
I may be wrong of course
and I respect all your opinions as well
:)
AlexDaniel just refrain from working on systems that are even slightest bit complex, so that you can always just use a file system and that's it
AlexDaniel hides
geekosaur watching youngsters throw out all the "stupid pointless" old stuff and then relearn the hard way over and over again why it was done that way, is something that has never happened and never will happen --- notwithstanding that you can ee it happening constantly, you habv deytermined it never will happen 21:44
stmuk is anyone testing much on *BSDs .. there is a report that installing panda on FreeBSD causes a moar core dump (which I've just seen on OpenBSD)
geekosaur oh, and knowledge is clearly just a stereotype too
timotimo i don't think any of you is going to convince anyone else of any opinion on that kind of stuff tonight 21:49
i suggest we just drop the topic
AlexDaniel is there any channel on freenode for holy wars? 21:51
stmuk all of them :) 21:52
AlexDaniel huggable: holy war :is: I don't think any of you is going to convince anyone else of any opinion on that kind of stuff tonight. I suggest we just drop the topic
huggable AlexDaniel, Added holy war as I don't think any of you is going to convince anyone else of any opinion on that kind of stuff tonight. I suggest we just drop the topic
AlexDaniel huggable: source 21:53
huggable AlexDaniel, See github.com/zoffixznet/huggable
tailgate So if I have a role Foo and class Bar does Foo, is bar a Foo? 21:54
AlexDaniel is it using sqlite or something?
tailgate is a Bar a Foo? Like the type objects
AlexDaniel m role Foo {}; class Bar does Foo {}; say Bar ~~ Foo 21:54
m: role Foo {}; class Bar does Foo {}; say Bar ~~ Foo
camelia rakudo-moar 641ee1: OUTPUT«True␤»
AlexDaniel tailgate: does it answer your question? 21:55
tushar How to get an index of a specific element of an array? I was searching for a solution to it and found Gabor's article on it where he explained "grep-index" method. When I tried it I got an error saying that no method found.
I have also found a reddit thread but it has no comments yet. 21:56
Zoffix first :k 21:57
yoleaux 18:45Z <moritz> Zoffix: if you're looking for a good project to use your super powers: Build a github bot that invites everybody to the perl6 org how gets a PR merged in a repo under the perl6 org
AlexDaniel m: my @x = <a b c d e f>; say @x.kv.reverse.Hash
camelia rakudo-moar 641ee1: OUTPUT«{a => 0, b => 1, c => 2, d => 3, e => 4, f => 5}␤»
AlexDaniel I wonder why we have no kv 21:58
Zoffix m: say <a b c d e>.first: :k, 'c'
camelia rakudo-moar 641ee1: OUTPUT«2␤»
AlexDaniel m: my @x = <a b c d e f>; say @x.first(‘c’):k
camelia rakudo-moar 641ee1: OUTPUT«2␤»
AlexDaniel Zoffix++
Zoffix moritz, that sounds like a pain in the ass to test :) Maybe next year 21:59
AlexDaniel tushar: but keep in mind that if you are planning to do a bunch of lookups like this it is probably a good idea to convert it to Hash
Zoffix m: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i 22:00
camelia rakudo-moar 641ee1: OUTPUT«Array @i = [2, 4]␤»
Zoffix HAH :D
Junction abuse
AlexDaniel committable6: releases my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i 22:01
committable6 AlexDaniel, ¦«2015.10,2015.11»: Array $var = $[2]␤¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1»: Array @i = [2]␤¦«HEAD»: Array @i = [2, 4]
AlexDaniel huh?
Zoffix m: say gather { <a b c d e>.first(:k, <c e>.any).map: *.take }
camelia rakudo-moar 641ee1: OUTPUT«(2 4)␤»
AlexDaniel bisectable6: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i
bisectable6 AlexDaniel, Exit code is 0 on both starting points (good=2015.12 bad=c9b18c6), bisecting by using the output 22:01
Zoffix neat. Perl 6++
geekosaur heh 22:02
AlexDaniel don't worry, that's normal 22:02
tushar AlexDaniel, Zoffix, thanks.
Zoffix m: my @x = <a b c d e f>; say @x.kv 22:04
camelia rakudo-moar 641ee1: OUTPUT«(0 a 1 b 2 c 3 d 4 e 5 f)␤»
Zoffix m: my @x = <a b c d e f>; say @x.antipairs
camelia rakudo-moar 641ee1: OUTPUT«(a => 0 b => 1 c => 2 d => 3 e => 4 f => 5)␤»
AlexDaniel bisectable6: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i 22:04
bisectable6 AlexDaniel, Exit code is 0 on both starting points (good=2015.12 bad=c9b18c6), bisecting by using the output
Zoffix m: my @x = <a b c d e f>; say @x.antipairs<c>.say 22:04
camelia rakudo-moar 641ee1: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
Zoffix m: my @x = <a b c d e f>; say @x.antipairs.hash<c>
camelia rakudo-moar 641ee1: OUTPUT«2␤»
AlexDaniel come on! 22:05
bisectable6: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i
bisectable6 AlexDaniel, Exit code is 0 on both starting points (good=2015.12 bad=c9b18c6), bisecting by using the output
AlexDaniel DO IT 22:05
AlexDaniel bisectable6: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i 22:05
bisectable6 AlexDaniel, Exit code is 0 on both starting points (good=2015.12 bad=c9b18c6), bisecting by using the output
AlexDaniel, bisect log: gist.github.com/bf56609dd63f2a6c50...a98eccf4cc
AlexDaniel, (2016-08-23) github.com/rakudo/rakudo/commit/157b46e
AlexDaniel thank you very much
Zoffix: so what does it mean? 22:06
Zoffix AlexDaniel, what what means? 22:07
timotimo might want to have a test for this case? 22:08
Zoffix It's not thread safe 22:09
No idea about gather/take one
star: my @i; <a b c d e>.first(:k, <c e>.any).map: {@i.push: $_}; dd @i 22:10
camelia star-m 2016.04: OUTPUT«Array @i = [2]␤»
Zoffix star: my @i; <a b c d e>.first(:k, <c e>.any).map: {say "non-juncted"}; dd @i
camelia star-m 2016.04: OUTPUT«non-juncted␤Array @i = []␤»
Zoffix star: my @i; <a b c d e>.first(:k, <c e>.any).map: {say "$_: non-juncted"}; dd @i
camelia star-m 2016.04: OUTPUT«2: non-juncted␤Array @i = []␤»
Zoffix Seems like Junctions were simply broken in the past
star: my @i; <a b c d e>.first(:k, <c e>.any).say 22:11
camelia star-m 2016.04: OUTPUT«2␤»
Zoffix Oh wait. They *got* broken. Since we're asking for ANY of the first ones 22:11
star: my @i; <a b c d e>.first(:k, <c e>.all).say
camelia star-m 2016.04: OUTPUT«Nil␤»
AlexDaniel yeah
well, how can .first return more than one element, uh? 22:12
Zoffix Well, it'd return a Junction 22:13
m: sub foo ($x) { say $x+2 }; say foo 2|3
camelia rakudo-moar 641ee1: OUTPUT«4␤5␤any(True, True)␤»
Zoffix star: sub foo ($x) { say $x+2 }; say foo 2|3
camelia star-m 2016.04: OUTPUT«4␤5␤any(True, True)␤»
Zoffix m: say <a b c d e>.first(<c e>.any) 22:14
camelia rakudo-moar 641ee1: OUTPUT«any(c, e)␤»
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(‘b’).say
Zoffix star: say <a b c d e>.first(<c e>.any)
camelia star-m 2016.04: OUTPUT«c␤»
committable6 AlexDaniel, ¦«2015.12,HEAD»: b
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(/b/).say
committable6 AlexDaniel, ¦«2015.12,HEAD»: b
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(any ‘b’).say
committable6 AlexDaniel, ¦«2015.12»: b␤¦«HEAD»: any(b)
AlexDaniel I guess that I just don't get it 22:15
masak Zoffix: why would it return a junction if you don't pass a junction into it?
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(‘b’|‘a’).say
committable6 AlexDaniel, ¦«2015.12»: a␤¦«HEAD»: any(b, a)
masak wouldn't that be extremely surprising if it did that? 22:16
Zoffix masak, but we do
wamba star: my @i; <a b c d e>.first(<c e>.any):k.say
camelia star-m 2016.04: OUTPUT«2␤»
Zoffix It can be argued both ways, I think. Either you get a Junction of several results, or the Junction argument gets used to mean that you want it to use as a matcher
wamba m: my @i; <a b c d e>.first(<c e>.any):k.say
camelia rakudo-moar 641ee1: OUTPUT«any(2, 4)␤»
masak I'm fine with it working like every other method *if a junction is passed in*. 22:16
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(/b|a/).say 22:17
committable6 AlexDaniel, ¦«2015.12,HEAD»: a
masak but maybe I misunderstood what you were saying above, then.
Zoffix m: my @i; say <a b c d e>.first(<c e>.any, :)
camelia rakudo-moar 641ee1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3 @i; say <a b c d e>.first(<c e>.any, :7⏏5)␤ expecting any of:␤ colon pair␤»
Zoffix m: my @i; say <a b c d e>.first(<c e>.any)
camelia rakudo-moar 641ee1: OUTPUT«any(c, e)␤»
Zoffix masak, ^ <c e>.any is a Junction
I'm also fine with it working like every other method
timotimo we're really hoping to use a matcher there, i think 22:18
masak aye
ok, now I'm in agreement, I think
timotimo so i'd want it to behave just like * ~~ any <c e> would
masak .grep uses a matcher, and so .first ought to also
Zoffix m: my @i; say <a b c d e>.grep(<c e>.any)
camelia rakudo-moar 641ee1: OUTPUT«(c e)␤»
Zoffix ¯\_(ツ)_/¯
Zoffix is too tired for it 22:19
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(/b|a/, :end).say 22:19
committable6 AlexDaniel, ¦«2015.12,HEAD»: b
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(‘b’|‘a’, :end).say
committable6 AlexDaniel, ¦«2015.12»: b␤¦«HEAD»: any(b, a)
AlexDaniel committable6: 2015.12,HEAD <a b c d b e>.first(‘b’|‘a’).say
committable6 AlexDaniel, ¦«2015.12»: a␤¦«HEAD»: any(b, a)
AlexDaniel ok, let's see… 22:22
AlexDaniel is starting to rakudobug it
masak 'night, #perl6
AlexDaniel if some sane behavior was changed just like that, should I call it a regression? 22:23
timotimo hmm, would we only call it a regression if it broke a test?
AlexDaniel no, because otherwise it wouldn't have existed 22:24
BenGoldberg m: <a b c d b e>.first(* ~~ ‘b’|‘a’).say 22:26
camelia rakudo-moar 641ee1: OUTPUT«a␤»
BenGoldberg bisectable: <a b c d b e>.first(* ~~ ‘b’|‘a’).say
AlexDaniel timotimo: for example, there was no test for #129296, but so what? My legit code got broken, so it sounds like a regression
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129296
AlexDaniel bisectable6: <a b c d b e>.first(* ~~ ‘b’|‘a’).say
bisectable6 AlexDaniel, On both starting points (good=2015.12 bad=c9b18c6) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: a
timotimo fair enough 22:27
BenGoldberg bisectable: <c d b e>.first(* ~~ ‘b’|‘a’).say
m: <c d b e>.first(* ~~ ‘b’|‘a’).say
camelia rakudo-moar 641ee1: OUTPUT«b␤»
AlexDaniel BenGoldberg: it is now bisectable6
BenGoldberg: it is now or just bisect:
BenGoldberg m: <c d e f>.first(* ~~ ‘b’|‘a’).say
camelia rakudo-moar 641ee1: OUTPUT«Nil␤»
BenGoldberg m: <c d e f>.first(‘b’|‘a’).say
camelia rakudo-moar 641ee1: OUTPUT«any(Nil, Nil)␤»
BenGoldberg m: <c d e f>.first(‘b’|‘a’).so.say 22:28
camelia rakudo-moar 641ee1: OUTPUT«False␤»
BenGoldberg m: <c d e f>.first(‘b’|‘a’, :k).say 22:31
camelia rakudo-moar 641ee1: OUTPUT«any(Nil, Nil)␤»
BenGoldberg m: <a c d e f>.first(‘b’|‘a’, :k).say
camelia rakudo-moar 641ee1: OUTPUT«any(Nil, 0)␤»
BenGoldberg m: <a c d e f>.first(‘b’|‘a’, :kv).say
camelia rakudo-moar 641ee1: OUTPUT«any(Nil, (0 a))␤»
BenGoldberg m: <a c d e f v>.first(‘b’|‘a’, :kv).say
camelia rakudo-moar 641ee1: OUTPUT«any(Nil, (0 a))␤»
BenGoldberg m: <a c d e f b>.first(‘b’|‘a’, :kv).say
camelia rakudo-moar 641ee1: OUTPUT«any((5 b), (0 a))␤»
BenGoldberg m: ('a', 42, 'b', 22/7, 'c').first(Int|Rat, :kv).say 22:35
camelia rakudo-moar 641ee1: OUTPUT«any((1 42), (3 3.142857))␤»
BenGoldberg m: ('a', 42, 'b', 22/7, 'c', 23).first(Int|Rat, :kv).say
camelia rakudo-moar 641ee1: OUTPUT«any((1 42), (3 3.142857))␤»
BenGoldberg m: ('a', 42, 'b', 22/7, 'c', 23).first(Int|Rat, :kv, :end).say
camelia rakudo-moar 641ee1: OUTPUT«any((5 23), (3 3.142857))␤»
BenGoldberg According to the docs, "Autothreading is what happens if you pass a Junction to a subroutine that expects a parameter of type Any or a subtype thereof (such as anything Cool)" 22:36
timotimo that's right 22:37
BenGoldberg Which means that *if* the $matcher argument of method .first were specced as an Any, or a Cool, etc, then the results that we are getting would be correct.
BenGoldberg Except that $matcher is a Mu, and therefor autothreading should not happen. 22:38
m: first( Int|Rat, ['a', 42, 'b', 22/7, 'c', 23], :kv, :end).say
camelia rakudo-moar 641ee1: OUTPUT«any((5 23), (3 3.142857))␤»
BenGoldberg What do you suppose could be causing the autothreading to happen? 22:40
BenGoldberg s: List, 'first' 22:43
SourceBaby BenGoldberg, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|46968048>} (Method+{<anon|4696804...)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e l
BenGoldberg s: List, 'first', Mu
SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(List, Str, Mu); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
bioduds Please, what should I do if a module does not install on panda? 22:44
BenGoldberg s: List, 'first', \(Int|Rat)
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/641e...s.pm#L1180
timotimo bioduds: you could open an issue on its issue tracker for example 22:44
bioduds on modules.perl6.org ? 22:45
timotimo well, you find the repo from there
bioduds here? github.com/MARTIMM/mongo-perl6-driver/issues 22:46
AlexDaniel #129304
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129304
AlexDaniel bioduds: yes 22:47
bioduds okeydokey, just did
thanks
BenGoldberg Aha! github.com/rakudo/rakudo/blob/641e...s.pm#L1185 and github.com/rakudo/rakudo/blob/641e...s.pm#L1201 both have a parameter $test, which is not prototyped as Mu! 22:48
ugexe bioduds: if you read the error you see its OpenSSL causing the problem 22:53
and that you need to install openssl libs through your package manager
bioduds ok
let me try it 22:54
timotimo >_>
it spewed the error at you like five times
of course panda's backtrace for the "the test run didn't succeed" thing is pretty big and useless 22:55
bioduds code highlighting for perl6 in IDEs may become a challenge 22:59
I downloaded Perl Plugin for NetBeans and it is getting confused 23:00
with kebab case for instance
BenGoldberg .first fudgeup, now rakudobug-ed.
bioduds and also with unicode characters
BenGoldberg That's cause perl and perl6 are two differnt languages. 23:01
BenGoldberg Although it should not be having any trouble with the unicode, as perl5 also accepts unicode source programs. 23:01
bioduds for instance, $prédio will stop highlighting on é 23:02
BenGoldberg bioduds, does your NetBeans thing comprehend any unicode at all? It might not have anything to do with the syntax highlighter, as such, and simply be a poor choice of tool.
ugexe it shouldnt be that big of a surprise that invalid perl5 syntax highlights funny using a perl5 syntax highlighter 23:03
bioduds it is expected, for me. I believe it will be hard to have it corrected or even created for some IDEs i guess 23:04
since the whole idea is quite odd
BenGoldberg The following is perfectly valid perl5 code: use utf8; my $prédio = 3;
(and it's valid perl6 code, too)
bioduds yep
stops highlighting though
BenGoldberg If your syntax hilighter has problems with that, it's not *our* fault, but that of the author of the syntax hilighter. 23:05
bioduds kebab case also, for instance, $some-var stops highlighting on -var
BenGoldberg Find out who wrote it, and complain to them.
timotimo yeah, that part would be expected
bioduds sure, man, I'm just mentioning, I believe you are all interested in all that is going on related to Perl6 23:06
BenGoldberg $some-var is only valid perl5, and is not valid perl6, so it's not unsurprising that a perl5 syntax hilighter parses it wrong.
Err, tr/56/65/ :)
ugexe my $some = 1; sub thing { 0 }; print $some-thing 23:07
BenGoldberg Heh. But a proper perl5 syntax hiliter should display $some-thing with a different color for each of $some, subtraction, and thing. 23:10
AlexDaniel perl6-mode in emacs is above my expectations, by the way 23:12
for example it recognizes curly quotes
AlexDaniel BenGoldberg: am I in your ignore list or something? 23:13
BenGoldberg No? 23:15
But I'm slightly multitasking.
AlexDaniel BenGoldberg: #129304
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129304
BenGoldberg Cool :) 23:24
lambd0x Hi everyone! 23:25
m: sub a([$first, *@tmp]) {say $first; }; my @a = <1 2 3>; a @a; 23:27
camelia rakudo-moar 641ee1: OUTPUT«1␤»
lambd0x I was wondering is there a way to get instead of the first el, the last el. above? 23:29
timotimo docs.perl6.org/routine/first 23:31
ugexe in the signature? or just in general? 23:38
m: my @a = <1 2 3>; say @a.tail
camelia rakudo-moar 641ee1: OUTPUT«(3)␤»
AlexDaniel m: my @a = <1 2 3>; say @a.head
camelia rakudo-moar 641ee1: OUTPUT«(1)␤»
lambd0x ugexe: in the signature really 23:38
AlexDaniel ah you mean like [*@tmp, $last] ? hm
lambd0x AlexDaniel: Ideally, yes. 23:39
I tried it actually ahaha
AlexDaniel m: sub a(*@tmp) { my $last = @tmp.tail; say $last; }; my @a = <1 2 3>; a @a 23:40
camelia rakudo-moar 641ee1: OUTPUT«(3)␤»
AlexDaniel this is not too bad actually 23:40
AlexDaniel hmm I think there is a way 23:41
nah, no 23:45
I was hoping for something like this
m: sub a(@array(**, $z)) { say @_; }; my @a = <1 2 3>; a @a
camelia rakudo-moar 641ee1: OUTPUT«5===SORRY!5===␤Shape declaration with () is reserved;␤ please use whitespace if you meant a subsignature for unpacking,␤ or use the :() form if you meant to add signature info to the function's type␤at <tmp>:1␤------> 3sub a(@array7⏏5(…»
ugexe m: my @a = <1 2 3>; say @a.tail; say @a.roll # dunno why no-arg .tail returns a seq but no-arg roll/pick return an item 23:48
camelia rakudo-moar 641ee1: OUTPUT«(3)␤1␤»
lambd0x AlexDaniel: sad :/ 23:49
ugexe: I'm also curious about that, I used that feature for .pick: * and it worked so nicely with that kind of signature above :D 23:50
AlexDaniel ugexe: while .tail and .roll with arg return a seq. Indeed, weird
ugexe the roll/pick not returning a seq with no args (which differs from .pick(1) .roll(1)) was said to be expected when i asked. so no arg tail doesnt match that 23:51
AlexDaniel ugexe: will you rakudobug this? 23:51
m: sub a(@array (@*a;; $z)) { say $z }; my @a = <1 2 3>; a @a; say ‘hello’ 23:53
camelia rakudo-moar 641ee1: OUTPUT«cannot stringify this␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel cannot stringify what…
ugexe s/@*a/*@a/ 23:54
AlexDaniel ugexe: I know. But it should be smarter than me 23:56