»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:04 n0tjack left 00:09 n0tjack joined 00:14 n0tjack left 00:16 aborazmeh joined, aborazmeh left, aborazmeh joined 00:34 BenGoldberg joined 00:38 lichtkind left 00:41 n0tjack joined 00:46 n0tjack left 01:06 kjs__ joined 01:09 Peter_R left
dalek ast: 69f3088 | TimToady++ | S04-declarations/constant.t:
constant @x should cache and be Positional
01:14
01:14 n0tjack joined
dalek kudo/nom: 296824d | TimToady++ | src/Perl6/Actions.nqp:
constant @ should cache Seq and be Positional
01:14
01:18 n0tjack left 01:47 n0tjack joined 01:51 n0tjack left 02:02 kjs__ left 02:10 TEttinger left 02:20 n0tjack joined 02:25 n0tjack left 02:48 vendethiel joined 02:52 n0tjack joined 02:55 BenGoldberg left 02:56 noganex_ joined 02:57 n0tjack left 02:59 noganex left
thou m: sub x(:$foo) { note $foo.perl, ' is: ', @$foo ?? 1 !! 0 }; x(); 03:12
camelia rakudo-moar 296824: OUTPUT«Any is: 1␤»
thou Is that intentional? It changed w/ glr merge, it appears.
03:12 vendethiel left
thou I.e., @$foo where $foo is Any used to be false. 03:12
03:17 aborazmeh left
TimToady Any should not be disappearing in list context, so I'd say the new behavior is correcter 03:17
m: say so Any.list
camelia rakudo-moar 296824: OUTPUT«True␤»
TimToady m^Hstar: say so Any.list 03:18
^Hstar: say so Any.list
er... 03:19
ShimmerFairy There's a U+007F in front of your "star:" 03:21
TimToady bizarre 03:22
star: say so Any.List
camelia star-m 2015.03: OUTPUT«False␤»
TimToady star: say so Any.list
camelia star-m 2015.03: OUTPUT«False␤»
TimToady star: say so list Any 03:23
camelia star-m 2015.03: OUTPUT«True␤»
TimToady looks like star is inconsisten there
03:25 n0tjack joined 03:26 stimpi joined 03:29 n0tjack left 03:31 stimpi left 03:37 aborazmeh joined, aborazmeh left, aborazmeh joined 03:41 n0tjack joined 03:46 n0tjack left
zostay m: my @foo = 1,2,3; for @foo { .say; @foo.splice(0, 1) } 03:50
camelia rakudo-moar 296824: OUTPUT«1␤3␤»
zostay m: my @foo = 1,2,3; for @=@foo { .say; @foo.splice(0, 1) } 03:51
camelia rakudo-moar 296824: OUTPUT«1␤2␤3␤»
thou m: my $h = [$[$(%{:a<1>, :b<2>})]]; dd $h; # How do I get [[{a=>1,b=>2}]] (Array of Array of Hash w/ 2 elems)? 03:52
camelia rakudo-moar 296824: OUTPUT«Array $h = [[{:a(<1>), :b(<2>)},],]␤»
thou huh, it worked! 03:53
not on my perl6 cli
nevermind, I'm confused, it's working right 03:55
03:58 n0tjack joined 04:02 n0tjack left
zostay m: my %x = a => 1; my %y = b => 2; my %z = %x, %y; %z.perl.say; 04:08
camelia rakudo-moar 296824: OUTPUT«{:a(1), :b(2)}␤»
zostay m: my %x = a => 1; my %y = b => 2; my %z = flat %x, %y; %z.perl.say; 04:09
camelia rakudo-moar 296824: OUTPUT«{:a(1), :b(2)}␤»
thou If someone could help me with this little flattening problem, I would very much appreciate it: pastee.org/snnjx 04:11
I'm obviously confused about how lists work now.
zostay you're not alone, thou, i don't quite get it either yet 04:14
thou (This is a simplification of what's wrong with github.com/softmoth/p6-Template-Mu...che.pm#L50 04:17
I can't make hunk() { make @x.list }, because then it dies with This Seq has already been iterated, and its values consumed 04:18
ugexe make @x.map(*.made)? 04:20
thou I realize I pasted an unclear example, this is more obvious: pastee.org/f6eqh 04:23
I'll try making inside hunk()
Oh, right, that won't work, they're not match objs. Method 'made' not found for invocant of class 'Str' 04:24
04:25 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
TimToady use .cache, not .list 04:25
thou ok 04:26
04:26 khw left
ugexe my $hunks = ( [" ", {:type("var"), :val("string")}, ], ); 04:30
04:30 n0tjack joined
ugexe otherwise iterate over the list yourself 04:30
thou It didn't make any difference. pastee.org/ch5e8 04:34
ugexe: how do I iterate over the list?
04:34 n0tjack left
ShimmerFairy thou: if you don't need that extra comma after the inner list, don't put it there :) 04:34
thou I can't make hunks () instead of [], can I?
I can't do that 04:35
ShimmerFairy why not?
thou inside the grammar, passing up values via make
See that most recent paste, maybe it'll be clear what I'm struggling with
I tweaked hunk() to do "make @x.cache" instead of "make @x", but it still is giving me @mades = [[" ", {:type("var"), :val("string")}],] 04:38
So that's the structure I have to work with, as far as I can see.
ShimmerFairy Referring to the most recent paste, you'll either have to treat @mades like a list of list of hunks (assuming the innermost pieces are supposed to be individual $hunk things), or figure out how to not make @mades a list of list of hunks :) 04:39
thou obviously in a more complicated document that top-level list could have more than one element, too
so ... nested for loops is the only solution?
ShimmerFairy thou: oh! try make @x.Slip instead of .cache
thou ok 04:40
ShimmerFairy m: say [1, [2, 3], 4]; say [1, [2, 3].Slip, 4];
camelia rakudo-moar 296824: OUTPUT«[1 [2 3] 4]␤[1 2 3 4]␤»
zostay what determines whether a given %hash object will flatten or not? 04:41
thou Hey, .Slip seems to have worked!
ShimmerFairy thou: .Slip is meant to let you "slip" lists into other lists, so whenever you want to do something like that, think of .Slip :) Note that |[2, 3] is the same as Slip, I just wasn't sure if it would interfere with arg flattening with that 'make' 04:43
m: say [1, [2, 3], 4]; say [1, |[2, 3], 4];
camelia rakudo-moar 296824: OUTPUT«[1 [2 3] 4]␤[1 2 3 4]␤»
thou I find Slip mentioned on index design.perl6.org/index_C.html but not on the resulting S07 page
ok
ShimmerFairy thou: @mades is supposed to be a totally-flat list of hunks, right? If not, then the .Slip solution will probably fail when you do want that [[],[]] structure 04:44
thou yes, totally flat is good 04:45
Are there docs anywhere? 04:46
I saw an old glr doc from pmichaud from APW
ShimmerFairy lemme see, I know S07 hasn't been changed yet, so that C Index is weird (possibly referring to the old 'draft' S07 instead?)
skids There's S07-glr-draft.pod but that has not been updated to post-GLR either. 04:47
ShimmerFairy thou: there's this starting gist, but there needs to be more docs on the subject: gist.github.com/niner/d5f825c07ce1f7a6f7bb 04:48
If I knew more about GLR I would certainly do my best to add to docs.perl6.org and such. Perhaps I should start fiddling with GLR and becoming familiar with it then :P .
skids I might be able to put some time in on docs on Sunday.
zostay m: my %x = a => 1; my %y = b => 2; %x = %x, %y; dd %x; 04:49
camelia rakudo-moar 296824: OUTPUT«Hash %x = {:b(2)}␤»
zostay m: my %x = a => 1; my %y = b => 2; %x = flat %x, %y; dd %x;
camelia rakudo-moar 296824: OUTPUT«Hash %x = {:a(1), :b(2)}␤»
zostay what is going on there?
ShimmerFairy Another way to think of the Slip type is that it says "this sequence of values isn't supposed to be a 'real' list, so as soon as it's in one just inline this sequence", perhaps 04:50
m: my %x = a => 1; %x = %x; say %x.perl
camelia rakudo-moar 296824: OUTPUT«{:a(1)}␤»
ShimmerFairy m: my %x = a => 1; my %y = b => 2; %x = %x; say %x.perl 04:51
camelia rakudo-moar 296824: OUTPUT«{:a(1)}␤»
ShimmerFairy m: my %x = a => 1; my %y = b => 2; %x = %x, %y; say %x.perl
camelia rakudo-moar 296824: OUTPUT«{:b(2)}␤»
ShimmerFairy m: my %x = a => 1; my %y = b => 2; %x = (%x, %y); say %x.perl
camelia rakudo-moar 296824: OUTPUT«{:b(2)}␤»
ShimmerFairy huh. zostay: I'm not well-versed enough in GLR to say for sure, but that feels vaguely bug-ish to me.
zostay that's a different problem than the one i'm trying to reproduce 04:53
actually, maybe it's not different... 04:54
m: my %x = a => 1; my %y = b => 2; (%x, %y).perl
camelia ( no output )
zostay m: my %x = a => 1; my %y = b => 2; (%x, %y).perl.say
camelia rakudo-moar 296824: OUTPUT«({:a(1)}, {:b(2)})␤»
zostay m: my %x = a => 1; my %y = b => 2; (flat %x, %y).perl.say 04:55
camelia rakudo-moar 296824: OUTPUT«(:a(1), :b(2))␤»
zostay plain %x, %y used to work pre-glr
so i guess hashes don't turn into lists anymore? 04:56
ShimmerFairy Doesn't look like it. 05:00
m: my @a = 1,2,3; my @b = 4,5,6; say (@a,@b).perl # lists do this too, fwiw 05:01
camelia rakudo-moar 296824: OUTPUT«([1, 2, 3], [4, 5, 6])␤»
05:03 n0tjack joined
skids m: my %x = a => 1; my %y = b => 2; [ %x ].perl.say; [ %x, %y ].perl.say; # Same rules. Single arguments should flatten unless in a Scalar. 05:04
camelia rakudo-moar 296824: OUTPUT«[:a(1)]␤[{:a(1)}, {:b(2)}]␤»
05:08 n0tjack left
zostay alright, 3 modules adjusted to GLR, 5 to go... but sleep comes first, g'night 05:08
05:11 aborazmeh left, AlexDaniel left
thou m: my $h = {:hello<there>}; dd $h; $h = [ $h ]; dd $h; # I guess this is correct? (Have to use $h = [ $h, ] to get what I want) 05:16
camelia rakudo-moar 296824: OUTPUT«Hash $h = {:hello("there")}␤Array $h = (my \Array_140423781368840 = [Array_140423781368840,])␤»
thou Seems pretty odd to me
skids thou: If there is no comma you have a single argument. If a single argument is Iterable it gets flattened, but a Scalar containing an Iterable is not considered Iterable for this purpose. 05:24
Assignment puts a Scalar inbetween the variable and the value assigned to it. 05:25
Binding does not.
so:
my $h := {:hello<there>}; dd $h; $h = [ $h ]; dd $h;
m: my $h := {:hello<there>}; dd $h; $h = [ $h ]; dd $h;
camelia rakudo-moar 296824: OUTPUT«Hash % = {:hello("there")}␤Cannot assign to an immutable value␤ in block <unit> at /tmp/cBa9RucPj0:1␤␤»
skids Erm, well, that does not work too well for self-reference but.. 05:27
m: my $h = {a=>1}; [ $h ].perl.say
camelia rakudo-moar 296824: OUTPUT«[{:a(1)},]␤»
skids m: my $h := {a=>1}; [ $h ].perl.say
camelia rakudo-moar 296824: OUTPUT«[:a(1)]␤»
thou ok 05:28
skids m: my $h := {:hello<there>}; dd $h; $h = [ $h[] ]; dd $h; 05:30
camelia rakudo-moar 296824: OUTPUT«Hash % = {:hello("there")}␤Cannot assign to an immutable value␤ in block <unit> at /tmp/Pwk5cKBf_z:1␤␤»
skids m: my $h = {:hello<there>}; dd $h; $h = [ $h[] ]; dd $h;
camelia rakudo-moar 296824: OUTPUT«Hash $h = {:hello("there")}␤Array $h = [:hello("there")]␤»
05:31 vendethiel joined 05:34 tokuhiro_ joined 05:35 n0tjack joined
skids thou: The way to think about it that makes sense is to look at it as if you only ever pass one argument -- if you say @a.push([1,2]) the one argument is [1,2]. If you use a comma at the top level and say @a.push(1,2) you are passing the one list (1,2). 05:37
thou Tests pass with: github.com/softmoth/p6-Template-Mu...de8354a08a
05:38 TEttinger joined
skids That one argument is always exploded into multiple arguments, unless it is protected by a Scalar. 05:38
05:39 tokuhiro_ left 05:40 n0tjack left 05:56 vendethiel left
thou m: my @a; my $f = 1; my $g = [2,3]; @a.push: |$f; dd @a; @a.push: |$g; dd @a; 06:05
camelia rakudo-moar 296824: OUTPUT«Array @a = [1]␤Array @a = [1, 2, 3]␤»
thou m: my @a; my $f = 1; my $g = [2,3]; @a.push: $f; dd @a; @a.push: $g; dd @a;
camelia rakudo-moar 296824: OUTPUT«Array @a = [1]␤Array @a = [1, [2, 3]]␤»
thou So, using | works to un-protect the argument, whether the scalar contains an array or not 06:06
And .Slip kind of works like that when returning an array from a routine that I want to be exploded into the surrounding list 06:07
06:08 n0tjack joined 06:12 n0tjack left 06:14 Ven joined 06:22 bjz joined
skids thou: yes. Slip can also be used on the input side, but | is nicer a lot of the time. 06:24
m: my @a = 1,2,3,4; @a[0,(1,2),3].perl.say; # when did that start happening? 06:25
camelia rakudo-moar 296824: OUTPUT«(1, (2, 3), 4)␤»
skids Its...kindof a nice alternative to flatenning there, I guess. I'll have to sleep on it. 06:27
moritz skids: GLRish 06:33
06:34 xinming_ joined
ShimmerFairy ooh, I didn't know slicing would mirror the structure of the slice in the output like that. Seems like a Cool Thing™ to me :) 06:35
06:37 xinming left
skids I'm optimistic it will turn out useful. 06:38
m: my @a = 1,2,3,4; @a[0, (1,2) ,3] = "a" .. "d"; @a.perl.say; 06:39
camelia rakudo-moar 296824: OUTPUT«["a", "b", Any, "c"]␤»
skids m: my @a = 1,2,3,4; @a[0, (1,2) ,3] = "a",("b","c"),"d"; @a.perl.say; 06:40
timotimo m: my Cool $foo = 10; say ddt $foo;
camelia rakudo-moar 296824: OUTPUT«["a", "b", "c", "d"]␤»
rakudo-moar 296824: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Dq0iPG6cy_␤Undeclared routine:␤ ddt used at line 1. Did you mean 'dd'?␤␤»
timotimo camelia isn't rebuilding again? 06:41
06:41 Ven left, n0tjack joined
skids Unless that somehow magically falls out I'll have to see about making Seq's slice assign do that. 06:41
06:45 n0tjack left 06:54 xinming_ left, xinming joined 06:55 rurban joined 07:00 lizmat left 07:03 skids left 07:13 n0tjack joined 07:17 cognominal joined 07:18 n0tjack left 07:29 rindolf joined 07:34 cschwenz joined, domidumont joined
timotimo m: my Cool $foo = 10; say dd $foo; 07:35
camelia rakudo-moar 296824: OUTPUT«Int $foo = 10␤Nil␤»
timotimo ^- i wonder if this will confuse people
07:35 tokuhiro_ joined 07:38 darutoko joined 07:39 domidumont left, domidumont joined, rindolf left 07:40 tokuhiro_ left
moritz what about $foo = #`(Int) 10 ? 07:42
Woodi hi #perl6 :) 07:44
I found this on HN: matloff.wordpress.com/2014/05/21/r...allenge-r/
07:46 n0tjack joined
Woodi some notes: speed in language matters and at the end you will descend to C anyway ;) becouse PMC-like things and VMs are both superb and terrible. and you can't be faster then C and asm (and CPU), you can only not slow things too much :) 07:48
domain knowledge matters; R is written by statisticians, for statisticians. 07:49
It matters.</cite>
but when all knowledge is used then you need ppls from other domains :)
07:50 n0tjack left
Woodi "clean and elegant" is mantra from Dijkstra probably, it is here for some decades... maybe we can improve it, eg. naive attempt: by adding cases-differentiation, eg. domain-notation is very usefull and not so clean for "outsiders". eg. rx'es are good ! 07:53
07:53 lizmat joined
lizmat good *, #perl6, from the patch -p3 hackathon in Lyon, France 07:54
Woodi hi lizmat-traveler :)
lizmat Woodi o/
Woodi multiprocessing matters; but it is more then just calculating, eg. planning work and preparing data in best shape is important 07:56
07:57 xfix joined, xfix left, xfix joined
Woodi and to me Perl looks like very good prototyping language, tool to work on borders of knowledge or behind :) 07:57
08:04 pierrot left
Woodi to be more/bit on #dev topic: I just can't use grammars until I go full "tokens"... rules are totally messy for me. of course I just don't know how to use them and it's my fault but I think it falls into "LTA new user experience" 08:05
08:05 Alina-malina joined 08:07 thou left 08:10 pierrot joined 08:11 brrt joined
moritz Woodi: I find grammars in general a rather advanced topic, which takes quite some time getting used to 08:14
and fwiw the trouble with rules is typically mixing explicit and implicit whitespace matching, and/or having <.ws> match significant whitespace 08:16
08:19 n0tjack joined 08:23 n0tjack left 08:27 lizmat left, lizmat_ joined, pierrot left 08:28 lizmat_ is now known as lizmat, Averna joined
Woodi moritz: my initial impression was "use rules and it will auto-magically resolve white spaces everywhere" and I realy would like to have thing like that :) 08:31
08:32 domidumont left
moritz Woodi: I can't speak for everybody, but at least I never marked it that way 08:33
Woodi and if grammars are advertised as better rx'es then new users will came and immediatly want grammars...
maybe grammars are somehow tied to computer language constructing process and I want something general... 08:34
ShimmerFairy I've almost never used rules (only in limited cases, and even then I can't recall not going back to token and preferring to explicitly state all my <.ws>es). Being able to space out your regexes is too useful! :P
And fwiw I still find it very unfortunate that 'rule' in P6 means both a generic "grammar-specific methods" and "one of three types of grammar-specific methods, along with 'regex' and 'token'". I haven't been able to come up with a good alternative for either definition though :/ 08:36
Woodi also I noticed currently "backtracing" concept is something like hammer falling on user... in v5 it just works... 08:38
moritz Woodi: backtracking or back(stack) traces? 08:39
Woodi I mean like in rx'es it looks things then backs and tries something other... 08:40
moritz well, backtracking works the same in p5 and p6
except that p6 makes it far easier to switch it off
08:40 xinming_ joined
eiro hello everyone 08:40
Woodi I notices few times it wasn't so easy for users 08:41
moritz \o eiro 08:42
08:43 xinming left
ShimmerFairy The only place I've noticed backtracking happening where I didn't want it (since I always use 'token's and generally don't make use of backtracking) is with multi token switching over to other multis when something fails. What I really want there is :: , but it's NYI :< 08:45
Woodi also: what would be best way to add UDP to perl6 ?
moritz Woodi: from the bottom up 08:46
Woodi some Berkeley::Socket module ?
moritz Woodi: take a look how libuv handles UDP, expose it to MoarVM, expose it to NQP, write a Perl 6 API for it 08:47
08:48 cdc joined
moritz for sending UDP packages, a simple function might be the best Perl 6 API 08:48
for receiving, maybe a Supply
Woodi moritz: what about NativeCalls for unix syscalls ? 08:49
moritz Woodi: that might work; but you asked for the best way :-)
Woodi yes, some nice API would be best. but things like this susally ends in wanting some native api... 08:50
but will check libuv... 08:51
08:51 n0tjack joined
lizmat gist.github.com/lizmat/bb02b2ca33be658a77d1 # kernel 08:52
masak good antenoon, #perl6 08:54
08:56 n0tjack left 08:58 bbkr_ joined, bbkr left 08:59 Ven joined
Woodi hallo masak 09:00
lizmat: you build some ORM ? :)
09:01 FROGGS left
lizmat no, it was in response to a question I got here at the patch -p3 09:02
kernel just isn't online (yet) but it was he who asked the question
making an "is tracked" Attribute trait turned out to be more complicated than I hoped it would be
:-(
09:03 Guest1897 is now known as kernel
lizmat kernel o/ 09:03
kernel lizmat: thank you :)
09:03 kernel is now known as Guest30914
jdv79 lizmat: how hard? 09:05
just curious
lizmat we basically need the COMPOSE phaser to work
nine .tell think of Seq as an iterator. You can iterate it and when it's empty, it's empty. There's no magic saving of the values for repeated access. That's the whole point because saving the iterated list in a for foo() { } was quite costly. Now if foo() returns a Seq, we waste neither time nor memory storing values that you will never access anymore. Simplest and recommended way to store them is by assigning to an array. Another way is to ask the Seq to create a cac 09:06
yoleaux nine: I'll pass your message to think.
cdc :) 09:07
09:10 Woodi left
masak lizmat: oh, how's patch -p3 ? 09:13
nine .tell psch think of Seq as an iterator. You can iterate it and when it's empty, it's empty. There's no magic saving of the values for repeated access. That's the whole point because saving the iterated list in a for foo() { } was quite costly. Now if foo() returns a Seq, we waste neither time nor memory storing values that you will never access anymore. Simplest and recommended way to store them is by assigning to an array. Another way is to ask the Seq to create 09:18
yoleaux nine: I'll pass your message to psch.
lizmat masak: about 12 people hacking away at p5 and p6 stuff
some people interested in starting to write P6 (or already started, such as kernel )
dalek ast: 56abe83 | usev6++ | S05-grammar/example.t:
Fix syntax for fudging, introduced with 9c405159835

also skip tests which die currently.
  (Note: This test file is not in t/spectest.data.)
09:19
09:21 mprelude joined 09:24 n0tjack joined
moritz nine: truncated after "ask the Seq to create" 09:26
I guess .cached is what you or psch are after
lizmat
.oO( not sure whether .cached is the right name for the method, wouldn't .reified be better ? )
09:27
moritz lizmat: but it doesn't reify 09:28
lizmat it doesn't ?
moritz it caches a reference to a lazy List, which can later reify
so that you can ask the same Seq for a cached List several times 09:29
09:29 thou joined, n0tjack left
moritz m: my $a := gather { for ^3 { take $_; .say } }; my $l1 = $a.cached; my $l2 = $a.cached; say 'reifying now...'; say $l2[1] 09:30
camelia rakudo-moar 296824: OUTPUT«Method 'cached' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/yueHat73Ft:1␤␤»
nine .tell psch Another way is to ask the Seq to create a cache for you that you can repeatedly access. 09:31
yoleaux nine: I'll pass your message to psch.
nine FWIW I still think .list has been perfectly fine and we'd just had to remove .List. 09:32
moritz huh, the .cached branch hasn't been merged yet?
09:33 thou left
moritz nine: or rename to list-uncached or so 09:33
ShimmerFairy it's .cache, not .cached, IIRC 09:36
09:37 tokuhiro_ joined
moritz m: my $a := gather { for ^3 { take $_; .say } }; my $l1 = $a.cache; my $l2 = $a.cache; say 'reifying now...'; say $l2[1] 09:37
camelia rakudo-moar 296824: OUTPUT«reifying now...␤0␤1␤»
09:42 tokuhiro_ left 09:43 bjz left
cdc brrt++ # blog post 09:43
moritz ShimmerFairy: thanks 09:44
ShimmerFairy np :)
Ven cdc: seems I missed it in the backlog? 09:45
cdc Ven: brrt-to-the-future.blogspot.fr/2015...ng-up.html 09:47
Ven cdc: ty :)
masak speaking of backtracking, I'd like to see someone (maybe me) do an exploration of what's left to make the original ambition/dream of `temp` and `let` come true. 09:48
09:49 ribasushi left, Ven left
masak notably, in things like recursive algorithms with backtracking and in grammars. 09:49
09:49 bjz joined
masak I feel there is untapped potential there where in the fullness of time we'd be able to write *very* nice code that integrated well with backtracking. 09:49
09:50 ribasushi joined
cdc masak: what is this "original ambition"? Could you point me to an RFC/Syn/post/*? 09:50
psch hi #perl6 o/ 09:51
yoleaux 09:18Z <nine> psch: think of Seq as an iterator. You can iterate it and when it's empty, it's empty. There's no magic saving of the values for repeated access. That's the whole point because saving the iterated list in a for foo() { } was quite costly. Now if foo() returns a Seq, we waste neither time nor memory storing values that you will never access anymore. Simplest and recommended way to store them is by assigning to an array. Another way
is to ask the Seq to create
09:31Z <nine> psch: Another way is to ask the Seq to create a cache for you that you can repeatedly access.
brrt cdc thanks :-) 09:52
brrt lunch & 09:53
psch nine: thanks for the explanation. coupled with moritz' "reifying now" example above that removes this uneasy feeling of "something feels un-understood here..."
.cache return where the Seq will store it's results unless it's already been iterated, because then it's too late anyway 09:54
[Tux] ===( 14319;50 11812/? 27/? 0/? )===================================*** Error in `/pro/3gl/CPAN/rakudobrew/moa===( 14319;50 11812/? 27/? 0/? )===================================*** Error in `/pro/3gl/CPAN/rakudobrew/moa===( 14319;50 11812/? 27/? 0/? )===================================*** Error in `/pro/3gl/CPAN/rakudobrew/moar-nom/install/bin/moar': double free or corruption (out): 0x00007f642010f860 ***
t/90_csv.t ........ All 27 subtests passedr-nom/install/bin/moar': double free or corruption (out): 0x00007f642010f860 ***
t/90_csv.t ........ All 27 subtests passed
psch (unless that's still slightly wrong, but it doesn't feel obviously wrong anymore... :) )
09:54 brrt left 09:55 kjs__ joined 09:57 n0tjack joined 09:58 bjz left 10:01 brrt joined, n0tjack left
nine psch: if there's still any uncertainty at all, this should clear it up: has $!list; method cache() { $!list.DEFINITE ?? $!list !! ($!list := List.from-iterator(self.iterator)) } 10:02
BooK is writing his first Perl 6 module! 10:03
liz++ # nice to drink from a fountain of knowledge
lizmat does not feel milked at all ;-) 10:04
BooK cops out # it can only get worse from here
nine lizmat: you're clearly infinite ;)
jnthn notices he should probably get a move on with the S07 rewrite so there's an authoritative doc on how the list model now works :)
lizmat jnthn++
jnthn So folks can stop having a bad time with Seqs... :P
10:05 bjz joined
jnthn Of course, there's also that nasty data race we've uncovered in Moar to work on... 10:06
moritz m: my @a = '', Any.new, ''; given @a { when :('', Any $x, '') { say $x.perl } }
camelia rakudo-moar 296824: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dd1aiJMxXA␤Variable '$x' is not declared␤at /tmp/dd1aiJMxXA:1␤------> 3given @a { when :('', Any $x, '') { say 7⏏5$x.perl } }␤»
10:06 leont joined
moritz I don't understand this error at all 10:06
10:07 brrt left
moritz doesn't the signature declare the variable $x? 10:07
cdc m: my @a = '', Any.new, ''; given @a { when :('', Any $x, '') { say $_.[1].perl } } 10:09
camelia rakudo-moar 296824: OUTPUT«Any.new␤»
moritz cdc: I'm aware of the workaround
and if the signature doesn't declare the variable, shouldn't the mention in the signature already cause an error? 10:10
jnthn moritz: Signatures only cause declarations in certain contexts 10:11
cdc m: given :($x) { say .WHAT }
camelia rakudo-moar 296824: OUTPUT«(Signature)␤»
jnthn moritz: Signature literals is not one of them.
I *think* S04 does specify a syntax for what you're trying to do
moritz jnthn: but then shouldn't the mention of $x inside the signature already cause a parse error? 10:12
m: my @a = '', Any.new, ''; given @a { when :('', my $x, '') { say $x.perl } } 10:13
camelia rakudo-moar 296824: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1E8SvZdo66␤Invalid typename 'my' in parameter declaration.␤at /tmp/1E8SvZdo66:1␤------> 3', Any.new, ''; given @a { when :('', my7⏏5 $x, '') { say $x.perl } }␤»
jnthn moritz: No; a signature literal can be imagined as carving out its own little "scope"
moritz jnthn: ok
jnthn moritz: Because they lack one to do their declarations in
10:13 rindolf joined
jnthn Otherwise you couldn't write things like foo ~~ :($x, $y where $x > $y) as a signature literal 10:14
masak jnthn: and so these nested things don't survive into, say, a `when` block?
right, as shows above, duh. 10:15
sometimes I feel that's a pity. :)
shown*
jnthn masak: I think it's right, especially when I'm pretty sure there is a way (that I forget what is) in S04 to do it 10:16
ShimmerFairy IIUC, the signature matcher for when and the block have adjacent but unconnected scopes, so one isn't inside the other.
jnthn Of course, now I look I can't find it 10:17
bbiab 10:18
BooK what's the Perl6 equivalent of File::Temp tempdir ? 10:22
tadzik BooK: github.com/perlpilot/p6-File-Temp/...emp.pm#L37 10:23
psch $ ./perl6 -e'say < 5 >.WHAT' 10:24
(Str)
m: say < 5 >.WHAT
camelia rakudo-moar 296824: OUTPUT«(IntStr)␤»
psch well, it's more approachable than whatever is up with cu_load :s
10:26 bjz left 10:28 bjz joined 10:29 n0tjack joined 10:31 domidumont joined
BooK tadzik: thanks 10:31
10:31 Adrian joined, Adrian is now known as Guest25419 10:32 TEttinger left
Guest25419 ? 10:32
tadzik it's like Adrian is already taken :)
Welcome
Guest25419 Hello.
10:34 n0tjack left
ShimmerFairy psch: < 5 >.WHAT works for me (latest nqp and rakudo) 10:36
10:37 Averna left 10:39 Averna joined
psch ShimmerFairy: on jvm? 10:40
ShimmerFairy oh, not jvm
psch sorry, wasn't clear in my paste :)
ShimmerFairy: fyi, it's erroring out via badNative, so something in P6Opaque can't copy with &val
ShimmerFairy: i'm hoping that the underlying problem is something that cleans up a lot more, 'cause the spectest looks pretty bad 10:41
s/copy/cope/
10:47 Averna left 10:48 vendethiel joined 10:49 Guest25419 left
BooK so, how do I spawn a process that spits huge output, and I want to read from it line by line, and possibly through out whatever's left 10:54
and not have to wait until it's completely done
lizmat www.youtube.com/watch?v=RvCkvXvqi3U # TimToady's talk on YAPC::EU 10:55
use Proc::Async :-) 10:56
moritz or simply Proc
with run($command, :out)
doc.perl6.org/type/Proc 10:57
lizmat would that make .out.lines lazy ?
leont Proc::Async supplies tend to be buggy (though I haven't recompiled in a while, may be better now)
BooK and that won't wait until the whole command has run?
moritz leont: yes
erm, sorry
lizmat: yes, .out.lines is lazy
cognominal lizmat++ # for the link
moritz BooK: it doesn't wait; it just opens a process with a pipe
lizmat cognominal: it was actually itz++ who posted it on London.pm
BooK exactly what I want :-)
moritz if it doesn't work out after, Proc::Async will help (though it's API is a bit more complicated) 10:58
lizmat moritz: so why do we have Proc::Async then ??
to have an interface with Promises and Supplies ?
couldn't we fit that on to run() ? 10:59
lunch& 11:00
leont You need it to read from multiple streams at the same time, basically
Proc.out is still synchronous
11:02 n0tjack joined 11:05 kjs__ left 11:06 FROGGS joined, telex left, n0tjack left 11:07 kjs__ joined 11:08 telex joined 11:11 kjs__ left 11:12 vendethiel left
psch hah 11:14
5,945 /* What follows is a bit of a hack, relying on the first field being the
5,946 * big integer. */
that's a comment one line before the crash i'm seeing :)
i wonder if that's to blame 11:15
well, the hint map says $!value sits in field_1... 11:16
11:17 thou joined 11:21 thou left, rurban left
psch hmm 11:27
i'm not sure how to do this non-hacky
the bug is that we have a code path that expects the bigint in the first field of the STable, but IntStr apparently doesn't 11:29
11:29 rindolf left
psch but every lookup for attributes we have needs a name, and i doubt that hardcoding '$!value' in the general-purpose bigint backend code is sane 11:29
iterating over all fields and picking the first that type-fits probably works, but is still kind of messy... 11:30
11:34 n0tjack joined, rurban joined 11:38 tokuhiro_ joined, n0tjack left 11:39 espadrine joined 11:43 tokuhiro_ left
masak .tell brrt in brrt-to-the-future.blogspot.fr/2015...ng-up.html there seems to be missing text around "I hereby promise that if any Oh". also, overnegation in "I will not maintain the illusion here that a register allocator is a nontrivial component" ? 12:01
yoleaux masak: I'll pass your message to brrt.
12:06 n0tjack joined 12:10 n0tjack left 12:12 cognominal left 12:17 Peter_R joined 12:18 lizmat left 12:20 lizmat joined
[Tux] test 50000 39.280 39.199 12:21
test-t 50000 39.186 39.105
12:33 ab5tract_ joined
ab5tract_ [Tux]: that's faster than before, right? 12:33
also: awesome to hear that the whole test suite passes! 12:34
[Tux] a bit, just a bit (since last time)
I've been busy :)
ab5tract_ but vs pre-GLR?
ISTR that it was in the 50+ seconds range 12:35
[Tux] yeah, that's right
12:35 xinming joined
[Tux] tux.nl/Files/20150912143749.png 12:37
12:38 n0tjack joined, pmurias joined, xinming_ left
[Tux] gist.github.com/Tux/b3b1d9c63f49b65b4881 12:39
12:40 xinming_ joined 12:41 xinming left 12:42 n0tjack left 12:45 xinming joined, xinming left
dalek p/js-merge-wip: 8d8f09c | (Pawel Murias)++ | / (2 files):
Implement and test nqp::die_s.
12:46
p/js-merge-wip: 41f82c6 | (Pawel Murias)++ | src/vm/js/ (2 files):
Implement nqp::exit.
ab5tract_ [Tux]: so, about 29% reduction from the worst numbers
[Tux] yes
12:47 xinming_ left
ab5tract_ now, how do we make it even faster? :) 12:47
[Tux] but it still needs to get down to (way) below 36 (which was the fastest I ever measured)
ab5tract_ [Tux]: I guess I was hoping that the GLR would have a greater performance impact :( 12:48
[Tux] note that there was GLR first and optimasation afterwards
jnthn++ for that
psch i'm pretty sure there's still unrealized optimizations enabled by the GLR 12:49
it's a baseless hunch, though :)
dalek c: 21855f4 | moritz++ | lib/Type/Seq.pod:
Initial Seq documentation
12:50
c: b0ebd7a | moritz++ | lib/Type/Seq.pod:
Merge remote-tracking branch 'origin/glr'
12:50 xinming joined, Psyche^ joined 12:53 Psyche^_ left, pmurias left 12:54 pmurias joined, kjs__ joined
ab5tract_ moritz++ 12:54
12:55 dustinm` left, xinming_ joined 12:57 lizmat_ joined, xinming left 12:58 lizmat__ joined
dalek c: f6fb0ef | moritz++ | lib/Type/Seq.pod:
Document some Seq methods
12:59
12:59 lizmat left
moritz m: say Seq eqv gather { take 1 } 13:00
camelia rakudo-moar 296824: OUTPUT«Invocant requires an instance of type Seq, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/kUtLXkAS0x:1␤␤»
dalek kudo/nom: be9c864 | moritz++ | src/core/Seq.pm:
eqv for two Seqs should only apply to two instances
13:01
13:01 lizmat_ left
dalek kudo/nom: a3d86b6 | moritz++ | src/core/Seq.pm:
Make infix:<eqv> safer for subclasses of Seq
13:03
lizmat__ sometimes I wonder whether we shouldn't have a :X to indicate exact class match :-) 13:05
13:05 araujo_ joined, thou joined 13:08 xfix_ joined, khw joined, araujo left 13:09 xfix left, bjz left
moritz jnthn, TimToady: I think I'd like to move AT-POS and EXISTS-POS from Seq to PositionalBindFallover. Any objections? 13:09
13:09 thou left
moritz they rely only on .cache, not on Seq specifics, and it seems fitting because they implement positional access after all 13:10
13:10 n0tjack joined 13:14 dustinm` joined 13:15 n0tjack left 13:16 cognominal joined 13:22 lizmat joined 13:23 bjz joined 13:24 travis-ci joined
travis-ci Rakudo build failed. Moritz Lenz 'Make infix:<eqv> safer for subclasses of Seq' 13:24
travis-ci.org/rakudo/rakudo/builds/79989240 github.com/rakudo/rakudo/compare/b...d86b6f647a
13:24 travis-ci left, lizmat__ left
jnthn psch: The code-gen we're getting for the GLR impl isn't as good as it could be, nor is the dynopt, so there's plenty of room yet. 13:25
psch: And GLR's epic wins so far are more about memory use than speed 13:26
13:28 tokuhiro_ joined
ShimmerFairy lizmat: we do have ::T available, for example sub foo(Seq ::T $a, T $b) { ... } , so you can at least ensure they're the same type :) (seems like it could've been another possible way to do moritz's last commit) 13:29
moritz ShimmerFairy: that still allows subtypes of T to be passed to $b 13:30
13:30 xfix_ is now known as xfix
dalek kudo/nom: a0fcc1b | moritz++ | src/core/Seq.pm:
Fix typo
13:30
ShimmerFairy Hm, I remember it DWIMming with role types, at least
13:30 xfix is now known as Guest10684
ShimmerFairy s/types/constraints/ 13:31
dalek c: 78a7f2c | moritz++ | / (3 files):
Document PositionalBindFailover

Also cleanup type-graph.txt a bit, and remove outdated class names from the Cool documentation
13:32
13:33 tokuhiro_ left, bjz left, bjz joined
TimToady moritz: offhand that doesn't make sense to my morningbrane; seems like the point of having those methods in Seq is for dispatching to Seq, not just binding 13:38
moritz TimToady: wel, to me PositionalFailOver isn't just for the binder, but also for providing positional access / [] subscripting 13:40
TimToady: at least the name seems to imply that
oh wait, it has Bind in the name after all :-) 13:41
dalek kudo/nom: c89fb45 | moritz++ | src/core/Seq.pm:
Give PositionalBindFailover an "iterator" method stub
13:42
BooK are there any Perl6 badges ? 13:43
13:43 rindolf joined, n0tjack joined
BooK my first day of actually programming in Perl6 and I found a corner case and the core needs fixing! 13:43
woohoo!
(lizmat is doing the fixing) 13:44
moritz BooK: "certified by #perl6" is our only badge :-)
BooK good enough for me :-)
TimToady the Red Badge of Courage
maddingue BooK wants a Pink Badge of Pride :3 13:45
BooK better than a scarlet letter
13:47 n0tjack left
psch jnthn: so the actual big speed opts are mostly missing? that's encouraging :) 13:47
jnthn psch: Well, it's more like there's lots of small ones that'll add up 13:48
13:48 bjz left
jnthn psch: But it's worth noting that what I've actually done is worked out how to achieve the Perl 6 goals around lists/arrays with an extremely boring and well-trodden design that's been shown to be sufficiently optimizable by lots of other languages. 13:48
psch jnthn: i see, thanks for the insight :) 13:51
dalek c: 8521852 | moritz++ | lib/Type/Seq.pod:
Document Seq.from-loop
13:52 travis-ci joined
travis-ci Rakudo build passed. Moritz Lenz 'Fix typo' 13:52
travis-ci.org/rakudo/rakudo/builds/79990986 github.com/rakudo/rakudo/compare/a...fcc1ba3b5c
13:52 travis-ci left 13:54 bjz joined
lizmat m: sub a(Capture() $a) { dd $a }; a (42, 42) 13:54
camelia rakudo-moar a0fcc1: OUTPUT«Capture $a = \(42, 42)␤»
lizmat m: sub a(Capture() $a) { dd $a }; a (42) 13:55
camelia rakudo-moar a0fcc1: OUTPUT«This representation (Null) does not support elems␤ in sub a at /tmp/QueBlFAMqd:1␤ in block <unit> at /tmp/QueBlFAMqd:1␤␤»
lizmat m: sub a(Capture() $a) { dd $a }; a (42, a => 13)
camelia rakudo-moar a0fcc1: OUTPUT«Capture $a = \(42, :a(13))␤»
lizmat m: sub a(Capture() $a) { dd $a }; a (a => 13)
camelia rakudo-moar a0fcc1: OUTPUT«This representation (Null) does not support elems␤ in sub a at /tmp/Q9Ab_kOxLe:1␤ in block <unit> at /tmp/Q9Ab_kOxLe:1␤␤»
lizmat ^^^ fixing this one now
masak BooK++ # Perl 6 user 13:57
raiph .tell nine www.reddit.com/r/perl/comments/3k4..._6/cuwx9rh 13:58
yoleaux raiph: I'll pass your message to nine.
13:58 bjz left 14:00 raiph left 14:01 camelia left 14:02 araujo_ left, camelia joined 14:04 ChanServ sets mode: +v camelia, travis-ci joined
travis-ci Rakudo build passed. Moritz Lenz 'Give PositionalBindFailover an "iterator" method stub' 14:04
travis-ci.org/rakudo/rakudo/builds/79991870 github.com/rakudo/rakudo/compare/a...9fb4577313
14:04 travis-ci left, lizmat_ joined 14:05 araujo_ joined
TimToady m: use nqp; my $h = { a => 42 }; say nqp::istype($h,Associative) 14:07
camelia rakudo-moar a0fcc1: OUTPUT«1␤»
14:07 lizmat left
TimToady jnthn: ^^^ comes out true, but when I try to use the same test in nqp (to check type on 'constant %hash = stuff') it returns false 14:08
jnthn TimToady: How're you getting hold of Associative?
TimToady the line in question reads:
if !nqp::istype($value,Associative) {
jnthn And where is this line? 14:09
In Actions/World?
TimToady Actions, type_declarator:sym<constant>
jnthn If so you can't write it that way
Yeah
TimToady why i asked :)
14:09 FROGGS_ joined
jnthn You need to be talking about the Associative type as seen by the program you're compiling 14:09
$*W.find_symbol(['Associative']) 14:10
14:10 araujo_ left
TimToady thanks 14:10
jnthn We try pretty hard to not have the compiler be confused about itself and the program it's compiling ;)
(Essential in NQP since we are bootstrapped, and we try pretty hard in Rakudo too to keep that door open.) 14:11
psch ShimmerFairy: why do RatStr and NumStr bind both typed values to self but IntStr uses nqp::add_I?
ShimmerFairy: oh, there's a comment above..
the trick makes it work not-right on jvm 14:12
and to make it work i have to add significant lookup logic to Ops.getBI :/
14:13 FROGGS left
jnthn Yeah, I think we cheat pretty hard about that on the JVM... 14:13
14:14 bjz joined
psch jnthn: yeah, we do... "obj.get_attribute_native(tc, null, null, 0);" is the offending line... 14:14
IntStr wants the get_attribute_native call on field_1 instead :/ 14:15
which means "look through all fields and see if one of them has a BigInteger as field", from the looks of it
14:15 n0tjack joined
psch 'cause resolveAttribute needs a name, in addition to a classHandle 14:16
jnthn try { return obj.get_attribute_native(..., 0); } catch { return obj.get_attribute_native(..., 1); } # :P
psch jnthn: but that doesn't work, cause we need field_0 of obj.field_1 :P 14:17
jnthn oh...
ShimmerFairy psch: I did try binding normally before, it just failed on trying to unbox bigints :) if only there were somehow a way to push around bigint attributes without falling back to native ints along the line...
psch ShimmerFairy: yeah, i had thought maybe we want bindattr_I... not sure if there's actual merrit to that idea, though 14:18
ShimmerFairy: although the jvm BigInteger handling is somewhat lacking as well...
ShimmerFairy when I brought that up, I heard that (unsurprisingly) the _I version would be quite a different beast than the other versions :) 14:19
14:19 lizmat_ is now known as lizmat, n0tjack left
psch well, if it's been brought up before i'll save myself the effort of actually thoroughly thinking about it... :S 14:20
i'll just go with the "check every field if it has a BigInteger as field_0" approach for now... 14:24
14:24 araujo_ joined
psch "interestingFields.get(hint).get(obj).field_0.getClass().equals(BigInteger.class)" 14:26
oh java, never change <3
14:27 araujo_ left
psch ah, missing the casts of course 14:28
14:28 araujo joined, araujo left, araujo joined
psch well, just one in this case 14:28
14:34 skids joined
smash (perl6 propaganda) the new Portuguese Perl Programmers Association Website is generated (almost entirely) using Perl 6 -- perl.pt 14:34
Zoffix 0.o
lizmat m: (a => 42).Capture.perl.sey
camelia rakudo-moar c89fb4: OUTPUT«This representation (Null) does not support elems␤ in block <unit> at /tmp/UHocnXwZoG:1␤␤»
lizmat m: (a => 42,).Capture.perl.sey 14:35
camelia rakudo-moar c89fb4: OUTPUT«Method 'sey' not found for invocant of class 'Str'␤ in block <unit> at /tmp/e0cd6NcfX8:1␤␤»
lizmat m: (a => 42,).Capture.perl.say
camelia rakudo-moar c89fb4: OUTPUT«\(:a(42))␤»
Zoffix smash, that's really cool!
lizmat m: my $p = (a => 42); $p.Capture.perl.say
camelia rakudo-moar c89fb4: OUTPUT«This representation (Null) does not support elems␤ in block <unit> at /tmp/EuSQmYOQHZ:1␤␤»
jnthn smash: Cool :) 14:36
lizmat: Looks like Capture.perl wants a patch :) 14:37
lizmat jnthn: I'm not sure, observe:
m: (42,).Capture.perl.say
camelia rakudo-moar c89fb4: OUTPUT«\(42)␤»
lizmat m: (42).Capture.perl.say
camelia rakudo-moar c89fb4: OUTPUT«This representation (Null) does not support elems␤ in block <unit> at /tmp/Zp5xWzJs3G:1␤␤»
lizmat I would argue that would be the same thing, or not?
m: 42.Capture.perl.say 14:38
camelia rakudo-moar c89fb4: OUTPUT«This representation (Null) does not support elems␤ in block <unit> at /tmp/i1aiSS15G6:1␤␤»
lizmat should that say Capture.new( :value(42) ) # as the spectest seems to suggest ? 14:39
m: 42.Capture<value>.say
camelia rakudo-moar c89fb4: OUTPUT«This type does not support associative operations␤ in block <unit> at /tmp/SH0QTfFcVS:1␤␤»
lizmat m: (a => 42).Capture<a>.say
camelia rakudo-moar c89fb4: OUTPUT«Nil␤»
lizmat m: (a => 42).Capture<key>.say
camelia rakudo-moar c89fb4: OUTPUT«a␤»
lizmat m: (a => 42).Capture<value>.say # does that make sense at all ?
camelia rakudo-moar c89fb4: OUTPUT«42␤»
lizmat m: (a => 42).Capture<key value>.say 14:40
camelia rakudo-moar c89fb4: OUTPUT«(a 42)␤»
lizmat m: (a => 42,).Capture<key value>.say
camelia rakudo-moar c89fb4: OUTPUT«(Nil Nil)␤»
lizmat a patch I work on, would: 14:41
$ 6 '42.Capture.perl.say'
\(42)
jnthn lizmat: Coercion of a Pair to a Capture should produce key/value Associative values, yes 14:42
lizmat: That's how unpacking of pairs works
m: sub foo((:$key, :$value)) { say $key }; my $p = a => 42; foo($p) 14:43
camelia rakudo-moar c89fb4: OUTPUT«a␤»
14:43 lizmat left 14:44 lizmat joined
skids m: \(42).perl.say; # interesting that that worked when .Capture didn't 14:44
camelia rakudo-moar c89fb4: OUTPUT«\(42)␤»
dalek kudo/nom: 8876f4d | TimToady++ | src/Perl6/Actions.nqp:
rudimentary typecheck on constant %h = ...
lizmat m: m: sub foo((:$a)) { say $key }; my $p = (a => 42,); foo($p) 14:45
camelia rakudo-moar c89fb4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KsZP1PvsNV␤Variable '$key' is not declared␤at /tmp/KsZP1PvsNV:1␤------> 3m: sub foo((:$a)) { say 7⏏5$key }; my $p = (a => 42,); foo($p)␤»
lizmat m: m: sub foo((:$a)) { say $a }; my $p = (a => 42,); foo($p) 14:46
camelia rakudo-moar c89fb4: OUTPUT«42␤»
lizmat I find the fact that a pair unpacks to key/value to be very weird
it's exposing an implementation detail, I feel
maybe the problem is really that (a => 42) gives a Pair, and (a => 42,) gives a List with a Pair 14:47
14:47 n0tjack joined
jnthn None of this is a problem. 14:48
lizmat well, it was a WAT for me today, and other people here :-)
jnthn And .Capture *is* an implementation detail
Sorry, but people are going to *have* to get used to trailing commas being significant. 14:49
That's the trade-off we picked in the GLR
ShimmerFairy I thought trailing commas were always significant (maybe not always in the same places, but still)
lizmat ok, fair enough... 14:50
14:50 kjs__ left
jnthn (And yes, I'm working on an S07 that tries to get this stuff down coherently. :)) 14:50
dalek ast: 3a5cb6d | TimToady++ | S04-declarations/constant.t:
check that constant %hash = "nonhash" dies
14:52 n0tjack left 14:53 thou joined
ShimmerFairy Also, I have to ask: how exactly are Capture objects an implementation detail, when they're in the spec? My definition of implementation detail would include things like BOOTSTRAPATTR, or any of the nqp::ops. 14:54
moritz ShimmerFairy: to me, they aren't (though maybe there are situations where they are) 14:55
jnthn ShimmerFairy: "Implementation type" would probably have been better wording 14:56
ShimmerFairy: More, something that has to be user-visible, but that you aren't that likely to use directly in normal programming
IterationBuffer is another example; we need to exposed for folks who are implementing iterator-y things, but uusually you aren't doing that.
ShimmerFairy Yeah, I suppose I think of problematic impl. details as being along the lines of "oops, now I've got an NQP object", when it comes to rakudo :) 14:57
15:00 rurban left 15:03 ab5tract_ left
psch $ ./perl6-j -e'say val("5").WHAT' 15:03
(IntStr)
there we go :)
ShimmerFairy \o/ 15:04
dalek p: 4796e92 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:
Add an environment variable for dumping generated class files.
15:06
p: ec6341f | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Fixed getBI code to support Rakudo allomorphs.

It's still somewhat of a hack, but at least it works again.
psch ugh 15:08
the first of those i had corrected...
dalek p: 75281c2 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:
Correct a syntax error.
15:09
15:17 lizmat_ joined 15:18 lizmat left 15:19 n0tjack joined 15:24 n0tjack left
dalek kudo/nom: 7d3a87f | peschwa++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to get allomorphs on jvm.
15:25
psch now: spectest \o/
jnthn psch++ 15:26
BooK is there any perl6style documentation? 15:28
I can't decide on my own what a good style is, I need guidance!
15:30 tokuhiro_ joined
moritz BooK: we mostly follow perlstyle 15:30
psch BooK: with CORE being greatly in p6 it's kind of its own style guide... ;) 15:31
ShimmerFairy is unfamiliar with perlstyle :P 15:32
cschwenz on a freshly pulled and built perl6-m, has anyone else run into Digest::MD5 failing the testing stage? 15:34
15:34 tokuhiro_ left, n0tjack joined 15:36 Guest10684 left, xfix joined 15:39 n0tjack left 15:40 n0tjack joined
_itz cschwenz: yes its still not GLR-friendly, I think someone was talking of fixing it in the last 24 hr or so but forget details 15:41
cschwenz ah, thanks 15:43
ugexe pretty sure that was fixed yesterday 15:44
cschwenz hmm
github.com/cosimo/perl6-digest-md5/issues/11
that is what i'm running into
as of now
skids gist.github.com/skids/050f108b753ab42a215f # A start on some post-GLR doccing. Didn't want to commit and run, will check gist comments tonight. 15:45
15:46 n0tjack left
ugexe oh, `Digest` got fixed 15:48
which has md5 as well
cschwenz I ran into this because I'm building a completely clean install for post-GLR so I can shake out these sort of bugs. :-P 15:49
lizmat_ cschwenz++ :-)
cschwenz \o lizmat! :-) 15:50
lizmat_ cschwenz o/ :-) 15:51
15:52 n0tjack joined 15:56 n0tjack left
skids I have that test file in Sum as well, and only recall having to fix done/done-testing 15:58
dalek kudo/nom: 247a405 | TimToady++ | src/Perl6/Actions.nqp:
warn on useless use of hash composer in assignment
16:01
TimToady m: constant %hash = 42 16:02
camelia rakudo-moar 7d3a87: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s4nYYfYj8X␤Type check failed in constant declaration of %hash; expected 'Associative' but got 'Int'␤at /tmp/s4nYYfYj8X:1␤------> 3constant %hash = 427⏏5<EOL>␤»
cschwenz m: constant %hash = 42,; 16:03
camelia rakudo-moar 7d3a87: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VHa8VbvnLR␤Type check failed in constant declaration of %hash; expected 'Associative' but got 'List'␤at /tmp/VHa8VbvnLR:1␤------> 3constant %hash = 42,7⏏5;␤ expecting any of:␤ prefix…»
TimToady the = on constants is really binding 16:05
or "definition" if I can work it out
16:07 skids left
TimToady m: constant things = (^5).grep(* % 2); say things>>.abs; say things>>.abs 16:09
camelia rakudo-moar 7d3a87: OUTPUT«(1 3)␤This Seq has already been iterated, and its values consumed␤ in block <unit> at /tmp/1eEXJLgR1o:1␤␤»
TimToady m: constant @things = (^5).grep(* % 2); say @things>>.abs; say @things>>.abs
camelia rakudo-moar 7d3a87: OUTPUT«(1 3)␤(1 3)␤»
jnthn \o/
TimToady++
cschwenz jnthn or TimToady: can you please explain what is going on differently between those two? 16:12
dalek osystem: 8254523 | (Nuno Carvalho)++ | META.list:
Add new module
osystem: 42807d1 | (Zoffix Znet)++ | META.list:
Merge pull request #56 from nunorc/master

Add new module: Pekyll
16:12 ab5tract_ joined
jnthn cschwenz: A Seq is a one-shot producer of values, but assigning it to an @-sigil'd thing (well, pseudo-assignment in this case) turns the Seq into a List, which you can iterate as many times as you want 'cus it remembers values. 16:15
cschwenz ahh, thanks! :-D 16:16
16:16 raiph joined
arnsholt Does that mean that all lists are finite? 16:16
16:17 bjz left
jnthn arnsholt: No, a List can be lazy too 16:17
16:17 bjz joined
cognominal jnthn, in what a Seq is different from what a Parcel was? 16:18
jnthn cognominal: Everything.
cognominal :)
jnthn cognominal: I'll push an in-progress S07 shortly that tries to explain this stuff well, if a little boringly.
cognominal ok, I am eager to read the new S07. jnthn++
thou boring is good 16:19
jnthn Well, it won't be all of it, but I've started with the most user-facing bits.
thou tendentious is more fun, but boring works :-)
16:20 lizmat_ left, lizmat joined 16:21 bjz left
thou skids++ # Conventions and Idioms docs 16:22
psch hm 16:23
S17-supply/syntax.t hangs on jvm
16:23 bjz joined
psch ...but only via make spectest 16:23
FROGGS_ psch: how is the state in general?
psch maybe TEST_JOBS=4 mucked it up... 16:24
ambs quick question..... %foo{a}{b}.push(%x); @elems = %foo{a}{b}; # @elems seems to be a list of lists?
16:24 n0tjack joined
psch FROGGS_: pre the IntStr fix from a bit ago i had 84 files with some amount of failures 16:25
cognominal a boring jnthn, that would be first. :)
* a first
FROGGS_ psch: 84? that's not that bad... 16:26
psch: does that mean that one can declare classes outside of the setting?
psch FROGGS_: i'm on nom
FROGGS_ well, yes
psch FROGGS_: it worked there since the nqp fix yesterday 16:27
FROGGS_ really?
psch (or was that the day before yesterday..?)
FROGGS_ what about the nativecall tests?
psch FROGGS_: yeah, NativeCall tests where broken
FROGGS_ and are still?
psch still are i think, i haven't looked explicitely
FROGGS_ k
ambs wonders if there is a perl6-help channel.
psch i usually start at the top with spectest results... :)
FROGGS_ I thought that the nativecall tests and the class declarations are the same issue
psch but ya, j-test is more important 16:28
FROGGS_ ambs: not yet
ambs FROGGS_: ok, then will wait so someone has some time :)
FROGGS_ ambs: we'll open one when we have 5k regulars :o)
psch FROGGS_: maybe, i don't know the NativeCall code well, if it depends on SC somehow it could be that's the reason...
FROGGS_: though i hope not, 'cause *I* don't want to hunt this spooky SC-changing bug :P 16:29
FROGGS_ psch: I'll check that later :o)
16:29 ab5tract_ left
FROGGS_ currently working on more fun things 16:29
16:29 n0tjack left 16:30 bjz left
thou m: my %x = :x(1), :y(2), :z(3); my %foo; %foo<a><b>.push(%x); my @elems = %foo<a><b>; dd @elems; 16:32
camelia rakudo-moar 247a40: OUTPUT«Array @elems = [[:x(1), :z(3), :y(2)],]␤»
16:32 vendethiel joined 16:33 ShimmerFairy left
ambs thou: that seems ok 16:33
thou yeah
ambs btw, what the different between using {} or <> ?
psch ambs: <> quotes 16:34
ambs ok
psch ...and interpolates 16:35
m: my %h = '$foo' => 1, 'bar' => 2; my $foo = "bar"; say %h<$foo> ~ " " ~ %h{$foo}; # example serves better, i guess
camelia rakudo-moar 247a40: OUTPUT«1 2␤»
psch err
what
no it doesnt interpolate
gosh
psch goes back to Java 16:36
less complicated quoting ;P
ugexe it makes space mark items instead of , as well
psch ugexe: right!
ugexe m: my %x = :x(1), :y(2), :z(3); my %foo; %foo<a><b>.push(%x); my @elems = %foo<a><b c>; dd @elems
camelia rakudo-moar 247a40: OUTPUT«Array @elems = [[:x(1), :z(3), :y(2)], Any]␤»
ugexe otherwise it would be {'b', 'c'}
psch <> is qw{}
16:36 bjz joined
psch (not qqw, that *would* interpolate) 16:36
m: say val("5") 16:37
camelia rakudo-moar 247a40: OUTPUT«5␤»
psch m: say val("5").WHAT
camelia rakudo-moar 247a40: OUTPUT«(IntStr)␤»
thou «» would interpolate 16:38
psch thou: but that doesn't work as hash subscript i think?
thou m: my %h = '$foo' => 1, 'bar' => 2; my $foo = "bar"; say %h<<$foo>> ~ " " ~ %h{$foo};
camelia rakudo-moar 247a40: OUTPUT«2 2␤»
psch ah it does
16:39 ZoffixWork joined
thou ^ for this simple case obviously it's better to just use {$foo} if that's what you're after :) 16:39
ambs: feeling -help'd? 16:40
ambs not really :) confused. let me paste some code. 16:41
ZoffixWork Does anyone know what 'flussence' is known as on github now?
16:41 kjs__ joined
psch ZoffixWork: github.com/flussence seems to point to someone who could be our flussence..? 16:41
16:41 bjz left
TimToady m: my %hash = { a => 42 }; 16:42
camelia rakudo-moar 247a40: OUTPUT«Potential difficulties:␤ Useless use of hash composer on right side of hash assignment; did you mean := instead?␤ at /tmp/GxxnvrD0uG:1␤ ------> 3my %hash = { a => 42 }7⏏5;␤»
ZoffixWork psch, oh, sorry. Not enough coffee :P
coffee` sorry. 16:44
ZoffixWork :D
Guest30914 :bu 16:46
oups, sorry 16:47
ambs this is what I am trying to understand: paste.perldancer.org/dxp3Sv0ZwTJQ
16:47 domidumont left, ShimmerFairy joined
thou ok 16:48
psch ambs: the .push call assigns an Array to %other<foo><bar>, and that array doesn't get flattened into @list 16:50
thou you can use @list :=
or you can use @list = |%other… 16:51
psch ambs: additionally, the "<>" in the output tells me you're running pre-GLR code, you might want to consider upgrading
ambs psch: ok, this is what brew installed me :)
psch ambs: when?
ambs psch: week ago
raiph ambs: what does perl6 -v say? 16:52
ambs This is perl6 version 2015.07.2 built on MoarVM version 2015.07
but still didn't understand correctly that code behavior.
psch ambs: glr was merged on the 4th at 15:17 UTC
m: say $*KERNEL.build-date 16:53
camelia rakudo-moar 247a40: OUTPUT«Method 'build-date' not found for invocant of class 'Kernel'␤ in block <unit> at /tmp/vmkpIzAcw1:1␤␤»
psch m: say $*DISTRO.build-date
camelia rakudo-moar 247a40: OUTPUT«Method 'build-date' not found for invocant of class 'Distro'␤ in block <unit> at /tmp/Y9dVbc4KjD:1␤␤»
psch m: say $*PERL.build-date
camelia rakudo-moar 247a40: OUTPUT«Method 'build-date' not found for invocant of class 'Perl'␤ in block <unit> at /tmp/44rRn0tVNR:1␤␤»
psch m: say $*COMPILER.build-date
camelia rakudo-moar 247a40: OUTPUT«Dynamic variable $*COMPILER not found␤ in block <unit> at /tmp/HR5pit7amv:1␤␤Actually thrown at:␤ in any at src/gen/m-Metamodel.nqp:2869␤ in block <unit> at /tmp/HR5pit7amv:1␤␤»
psch oh ffs
psch dinner &
dalek ecs: de53e4b | jnthn++ | S07-lists.pod:
Initial work on an S07 re-write.

This is a work in progress, and I'll be filling out the rest in the coming days. It could do with some proof-reading; patches to fix any issues are welcome.
16:55
jnthn Prolly gone for the rest of the day. Enjoy. :) o/ 16:56
ambs ok, fixed my code, it works. But still did not understand why it doesn't do what I mean :-) 16:57
raiph ambs: the push arg doesn't flatten 16:58
16:58 n0tjack joined
moritz m: give <b a>.sort, 'c' { say .elems; say .flat.elems } 16:58
camelia rakudo-moar 247a40: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EHenPDYKUe␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/EHenPDYKUe:1␤------> 3give <b a>.sort, 'c'7⏏5 { say .elems; say .flat.elems }␤ expe…»
moritz m: given <b a>.sort, 'c' { say .elems; say .flat.elems }
camelia rakudo-moar 247a40: OUTPUT«2␤3␤»
dalek osystem: 8e5a58a | (Zoffix Znet)++ | META.list:
Update META.info to META6.json for several flussence's modules
17:00
ZoffixWork If anyone's interested, I wrote a short Perl 5 script that checks every module link in the ecosystem for 404s, and loads up the META file to check for JSON errors: github.com/zoffixznet/p6-ecosystem-meta-checker
Found 6 errors! :) 4 404s and 2 JSON errors :)_
moritz ZoffixWork: ecosystem-api.p6c.org/errors.json also reports json errors 17:01
thou m: my $elem = [{ :age(7), :name(8) },]; my @x = $elem; my $y = $elem; my @z := $elem; dd @x; dd $y; dd @z;
camelia rakudo-moar 247a40: OUTPUT«Array @x = [[{:age(7), :name(8)},],]␤Array $y = [{:age(7), :name(8)},]␤[{:age(7), :name(8)},]␤»
moritz ZoffixWork: I've just submitted a pull request for tony-o/perl6-json-faster
ZoffixWork Cool :)
17:02 spider-mario joined, n0tjack left
ambs ok, with paste.perldancer.org/XoDeNm53WCCl I can understand it better. 17:03
basically, attribution in line 13 fills the first element of the array.
ZoffixWork I've submitted a PR for the other one with the error
moritz thanks ZoffixWork++
thou ambs, you're expecting @list = $elem, when $elem contains an array, to flatten that into @list, but it doesn't. it's assigning $elem as @list[0]. You can bind @list to the array that $elem contains with @list := $elem. you can use $list, so that it is also a scalar that contains the array. 17:05
ambs thou: how can I use $list as an array, btw?
moritz @$list
ambs ah, perl5!!! :-)
colomon moritz: is that implicitly $list.list? 17:06
ambs so, my @list = @(%other<foo><bar>); works as well, cool.
thou m: my $elem = [{ :age(7), :name(8) },]; my @w = |$elem; dd @w; # One other option
camelia rakudo-moar 247a40: OUTPUT«Array @w = [{:age(7), :name(8)},]␤»
17:06 ZoffixWork left
ambs my version doesn't support | in attribution yet. bah 17:06
psch star: my $elem = [{ :age(7), :name(8) },]; my @w = |$elem; dd @w;
camelia star-m 2015.03: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lmyOGm5ads␤Variable '&prefix:<|>' is not declared␤at /tmp/lmyOGm5ads:1␤------> 3lem = [{ :age(7), :name(8) },]; my @w = 7⏏5|$elem; dd @w;␤»
ambs clearer now. than you all :-) 17:07
thou thanks for the good question 17:08
ambs ;)
17:13 vendethiel left
dalek c: 60d0384 | moritz++ | lib/Type/Iterable.pod:
Update Iterable documentation match post-GLR reality
17:13
17:14 rangerprice joined
rangerprice Hi everyone ! 17:14
moritz \o rangerprice
rangerprice I need to implement an embedded SSH server in Perl that will work on a RPI, is Dropbear SSH a good choice ? 17:15
psch rangerprice: implement an existing SSH server? 17:18
ambs who should I contact to ask a minor edit in this page? rakudo.org/how-to-get-rakudo/
rangerprice psch: yes 17:19
dalek ecs: d1a7191 | lizmat++ | S07-lists.pod:
Minor nit
psch rangerprice: how does that work? if the SSH server is already working the implementation is complete, isn't it?
ambs ah, in fact, not relevant. 17:20
psch rangerprice: i'm just asking because i don't understand the question, sorry if it sounds snarky or anything
lizmat ambs: a PR will do the trick, I think
patch -p3 shutting down
it was very intensive and exhausting
psch lizmat++
lizmat but I think we all learned a lot today here :-)
rangerprice psch: no, in fact i need to implement my own SSH server in a perl script
lizmat dinner& 17:21
17:21 lizmat left
ambs it seems homebrew go for the latest tarball available in rakudo.org/downloads/star, so, natural the latest is from July! 17:22
psch rangerprice: ah, i see. in that case i'd suggest the corresponding RFC, which is RFC 4251 (and a few related ones like 4253)
rangerprice: i'm not really one for implementing network protocols though, so take that as you will :)
thou jnthn++ # Awesome S07-lists.pod update! 17:23
psch ambs: we have rakudobrew ( github.com/tadzik/rakudobrew ) which gives you a few more choices re: backend and version for rakudo specifically
ambs: i don't know how it integrates with homebrew though, if at all
rangerprice okay thanks psch 17:24
ambs psch: itseems it doesn't, but yeah, using rakudobrew now.
rangerprice psch: But, They have actually no existing perl module that allow to implement a ssh server easily ? 17:27
moritz IMHO reimplementing SSH is a very bad idea if you can avoid it
it's very security relevant and hard to get right 17:28
what's the use case?
dalek kudo/nom: be13af9 | TimToady++ | src/Perl6/Actions.nqp:
@() contextualizer should use .cache, not .list
psch rangerprice: that's what i was asking at the begining. if you really have to *implement* it (as in, decide what happens with network packages), you should look at the RFC 17:29
rangerprice: if you have an assignment that should do something with an ssh-connection, you probably want #perl, unless your teacher is extremely progressive :)
(where "teacher" might also mean "boss", work assignments exists after all...) 17:30
17:30 n0tjack joined 17:35 n0tjack left
ambs ok, souce rules: perl6 version 2015.07.1-856-g247a405 built on MoarVM version 2015.08-15-g4b427ed 17:40
17:56 khw left 17:57 lizmat joined, kjs__ left 18:02 n0tjack joined 18:04 cschwenz left
TimToady m: my $l = (list 1,2,4...16); say $l.WHAT 18:04
camelia rakudo-moar be13af: OUTPUT«(List)␤»
TimToady m: my $l = (list 1,2,4...16); say $l[0].WHAT
camelia rakudo-moar be13af: OUTPUT«(Seq)␤»
TimToady hmm...
needs one-arging, I guess
m: my $l = (list 1,2,4...16); say $l
camelia rakudo-moar be13af: OUTPUT«((1 2 4 8 16))␤»
TimToady note the double (()) 18:05
18:07 n0tjack left
dalek ecs: 70844c1 | lizmat++ | S07-lists.pod:
Fix typo
18:08
ecs: 829e71d | lizmat++ | S07-lists.pod:
We *can* call .cache multiple times

It will just return the same lazy list. The removed line seems to contradict that.
18:09
18:09 cschwenz joined
colomon m: sub a(Iterable $a) { say $a.pull-one; }; a(1..10) 18:09
camelia rakudo-moar be13af: OUTPUT«Method 'pull-one' not found for invocant of class 'Range'␤ in sub a at /tmp/HA2gxLIITQ:1␤ in block <unit> at /tmp/HA2gxLIITQ:1␤␤»
colomon m: sub a(Iterable $a) { my $b = $a.iterator; say $b.pull-one; }; a(1..10) 18:10
camelia rakudo-moar be13af: OUTPUT«1␤»
thou lizmat: I was just going to tweak that to say "It is only .cache that may be called *more than* once" 18:11
Which I believe is a clarification worth keeping?
lizmat thou: go ahead :-)
it is better that way, indeed
dalek ecs: 354bef8 | (Tim Smith)++ | S07-lists.pod:
Clarify calling .cache more than once
18:12
lizmat really dinner& 18:15
colomon anyone on channel understand how to detect IterationEnd?
$p =:= IterationEnd from jnthn’s gist doesn’t seem to cut it. 18:16
colomon seems to recall having had this problem at SPW, too. 18:18
nine colomon: that's exactly how you'd check 18:19
yoleaux 13:58Z <raiph> nine: www.reddit.com/r/perl/comments/3k4..._6/cuwx9rh
nine colomon: but you _have_ to use binding when pull-one to $p 18:20
colomon nine: it really doesn’t seem to be working for me.
timotimo .tell brrt what's "quite high-level talk, so I hereby promise that if any Oh, and I just " all about? %)
yoleaux timotimo: I'll pass your message to brrt.
nine I always use sigilless variables when dealing with those iterators
colomon nine: yeah, I noticed that in some of the src/core — but some of src/core uses $
nine The := is the important part. 18:21
colomon oh!
nine sigilless just forces me to use binding and makes it clear, that there's something special going on
colomon nine++
nine: is sigilless always implicitly := ? 18:22
because I changed to sigilless but not explicitly binding and the code started working
nine colomon: yes
colomon nine++ 18:23
colomon hopes he’ll remember that next time. :)
nine A sigilless variable is no container that can be assigned to, so it really binds regardless of the operator
18:24 fling left
colomon \o/ 18:27
18:30 fling joined
colomon has Math::ContinuedFractions not… working, but at least passing its limited tests again. :) 18:33
18:33 Alina-malina left
colomon not that it ever really worked 18:33
cognominal why the syntax does not impose the := for sigiless binding? If only for pedagogical purpose. 18:34
18:35 Alina-malina joined, n0tjack joined
nine cognominal: I'd +1 that. I had to ask moritz++ if there was some difference 18:39
pmurias any suggestion for a good book about neural networks? 18:40
18:40 n0tjack left 18:44 rurban joined
dalek ast: a046d74 | TimToady++ | S03-operators/context-forcers.t:
test new list/cache listops
18:49
kudo/nom: cdd0372 | TimToady++ | src/Perl6/Actions.nqp:
@$var contextualizer should use .cache, not .list
kudo/nom: 10c7f18 | TimToady++ | src/core/List.pm:
use one-arg for list listop; add cache listop too
18:50 kjs__ joined
psch m: say 97.base(2) 18:51
camelia rakudo-moar be13af: OUTPUT«1100001␤»
TimToady cognominal: well, the pseudo-assignments all make their own rules for what = means; we don't require := in constants either, and that's binding 18:52
cognominal that could be construed as an argument for := in constants 18:53
18:53 mohij joined
TimToady well, it's not exactly binding there either, more definitional, I hope 18:55
cognominal so we must live with = being vastly polysemic :)
psch FROGGS_: i'm a bit confused about Ops.spawn() 18:56
mohij @ugexe, tadzik: I did not intend to break backwards compatibility with rakudobrew. The new init thing is entirely optional and only required for the "shell" subcommand. I do wonder why travis broke. Is there some chance for me to see the output? I'd like to fix that. :-)
psch FROGGS_: when capturing any of IN, OUT, ERR, there's no waiting for the thread that executes going on
FROGGS_: i'm not sure that's why it always error, but it does... :) 18:57
FROGGS_ psch: I think it starts it is some cases immediately, so you can chain processes
it in* 18:58
psch FROGGS_: right, it starts immediately if we don't capture any of the STD*s
FROGGS_: but it doesn't wait when it does capture them 18:59
(according to Ops.java:1040-1064)
FROGGS_ hmmm
psch fwiw: 19:00
n$ ./perl6-j -e'say qx[echo hi]'
Unable to execute 'echo hi'
s/^n//
mohij wrt Windows, that is not implemented yet. Sorry for breaking it for some of you guys. :( I will probably have more tuits on Monday evening to fix that.
FROGGS_ but that did work previously... I'm almost sure about that
psch and "Unable to execute" comes from Proc.pm
whenever we have a !0 exit code 19:01
dalek ecs: acc4605 | moritz++ | S07-lists.pod:
S07: Fix small introspection details
psch oh 19:02
i think Proc.pm might be at fault here
the line that's dying is from a190b23bf9d81d84670a36ad448280ec8941144e
hm, but that's over a month old as well... 19:03
19:03 darutoko left
dalek ast: d14535b | TimToady++ | S32-scalar/undef.t:
remove a couple of test fossils
19:03
19:07 kjs__ left
FROGGS_ psch: but that seems wrong 19:08
psch: the condition to fail there should consider capturing etc
psch: so that it doesnt fail() there when the program has not started yet
19:08 n0tjack joined
psch FROGGS_: yeah, the fail there is definitely over-eager 19:09
FROGGS_ aye
psch FROGGS_: i'm thinking just removing the first &fail call in QX, not completely confident about it though 19:10
FROGGS_ hmmmm... test it? 19:11
I've not enough brain atm to guess the consequences
psch FROGGS_: well, it seems to work :P
FROGGS_: i was just thinking that japhb probably had a reason to put it there in the first place, and i can't guess the reason 19:12
FROGGS_ psch: yes, the commit lacks some explanation
19:13 n0tjack left
psch without that line i don't get a spawn failure. i'd guess that the first fail is some kind of relic that needn't be commit, and the .DEFINITE is what actually fixed the bug... 19:13
(spawn failure for /bin/false that is)
anyway, yeah, i'll just remove the line and test on moar once more as well, 'cause backend discrimination can only work against jvm currently, with christmas and all coming up... ;) 19:14
FROGGS_ :o) 19:22
masak cognominal: I'm fine with `=` being polysemic, as long as the polysemy works towards Least Surprise. 19:26
cognominal: for example, the `=` on a `has` means "at instantiation time". which I like.
cognominal: the `=` on a parameter means "at siggie binding time". also nice. 19:27
cognominal: the `=` on a constant means, "this ain't gonna change, so := it". not bad.
dalek kudo/nom: 509624b | peschwa++ | src/core/Proc.pm:
Don't &fail out of QX before at least looking for the retval.
19:29
cognominal my expectation was that = was setting/user-defined polysemy, not polysemy within the language. I just need to adjust my expectation that does not match the reality. 19:30
TimToady is in the process of extirpating the term "parcel" in favor of "raw" (or sometimes "list" in comments) 19:31
any 'is parcel' will have to change to 'is raw' 19:32
dalek c: 9d78199 | moritz++ | lib/Type/Iterator.pod:
Bring Iterator docs up to date
19:33
moritz .tell jnthn I've documented the Iterator/Iterable interface to the best of my knowledge in perl6/doc; feel free to steal anything you like for S07.
yoleaux moritz: I'll pass your message to jnthn.
dalek c: 30634e9 | moritz++ | lib/Type/Iterator.pod:
Forgot Iterator.push-all
19:36
cognominal TimToady, about extirpating parcels, there is a pull request. github.com/rakudo/rakudo/pull/526
19:36 nowan_ joined
dalek kudo/nom: e0fc14d | TimToady++ | src/ (13 files):
change 'parcel' to 'raw' or 'list', depending
19:37
ast: 86326e8 | TimToady++ | / (19 files):
change 'parcel' to 'raw' or 'list', depending

The trait is now 'is raw'. The rest of the time it's just referring to lists.
19:38 nowan left 19:39 nowan_ left 19:41 n0tjack joined, thundergnat joined
TimToady cognominal: that's sort of sideways to my patch, dunno if it'll merge now 19:41
but for sure we don't use \| parameters currently 19:42
19:42 nowan joined
cognominal TimToady, ok 19:43
ugexe mohij: it seems the shim is not getting installed to ~/.rakudobrew/bin after doing 'rakudobrew build XXX', which before would happen if no shims were present / CURRENT was empty 19:46
19:46 n0tjack left
mohij ugexe: Ah, thanks for the hint. Sounds easy to fix. 19:46
psch heh, the QX patch fixed more than one test file :) 19:48
thundergnat m: sub h () { return }; if my @p = h() { say @p } # Bug or Spec? Should a bare return return Any? It didn't used to pre GLR.
camelia rakudo-moar e0fc14: OUTPUT«[(Any)]␤»
timotimo has returned from a day of socializing and festivities and has backlogged on irc and watched almost all of lw's yapc::eu keynote
thundergnat star: sub h () { return }; if my @p = h() { say @p } 19:49
camelia ( no output )
psch the keynote is great, TimToady++
19:51 n0tjack joined, cognominal left
timotimo finished. very good! 19:51
i'm glad larry came back in the end after the hatless dude did all the talking for him 19:52
19:52 kurahaupo_ joined
TimToady whether I wear the hat usually depends on whether the lighting is high or low, and I rely on Glo to tell me which looks better 19:53
timotimo :) 19:54
TimToady in this case the lighting was high, so nobody coulda seen my face if I'd worn the hat
FROGGS_ a keynote? what keynote? 19:56
is there a linky to a video?
psch FROGGS_: www.youtube.com/watch?v=RvCkvXvqi3U 19:57
FROGGS_ ohh!
psch: thank you!
psch i'll admit, it made me a bit sentimental towards the end :S 19:58
FROGGS_ *g*
psch probably partly because of tolkien, although the delivery definitely counts for something as well :)
FROGGS_ I've seen the talk at the fosdem, and was sad it wasnt recorded properly... so I am happy to watch it again :o) 19:59
dalek c: d56204f | moritz++ | lib/Type/ (2 files):
Move pop,push,{un,}shift from List to Array
TimToady I think it was much better for having been rewritten twice this time
20:01 n0tjack left
masak what, Perl 6? :P 20:06
*rimshot*
20:08 n0tjack joined
moritz m: say List.^mro 20:08
camelia rakudo-moar e0fc14: OUTPUT«((List) (Cool) (Any) (Mu))␤»
dalek c: 994d37d | moritz++ | lib/ (13 files):
Mostly get rid of Parcel
20:17
c: 8d6195d | moritz++ | lib/Type/Whatever.pod:
s/Parcel/List/
20:20
20:21 n0tjack left
mohij ugexe: I think I have a fix. Currently testing. Do you think this was the reason for travis failing? 20:21
20:22 cognominal joined
moritz m: say ('a', <b c d e>.Slip, 'f')[2] 20:22
camelia rakudo-moar e0fc14: OUTPUT«c␤»
20:25 yqt joined 20:39 n0tjack joined 20:43 Skarsnik joined 20:48 n0tjack left
dalek p: 6df5fc4 | timotimo++ | src/vm/moar/HLL/Backend.nqp:
also write final pieces for json profiles
20:48
20:51 xfix left 20:53 n0tjack joined, telex left
dalek kudo/nom: 8837b6f | TimToady++ | src/core/ (8 files):
s/rw/raw/ on slurpies

It doesn't make sense to call 'is rw' on slurpies, since 'rw' is supposed to guarantee a valid lvalue. These are now just 'is raw' (what used to be 'is parcel'), which is more in line with what is wanted. In other words, whether the arg is an lvalue or not depends entirely on whether you passed one.
20:54
kudo/nom: a032e5b | TimToady++ | src/Perl6/ (2 files):
also rw -> raw in the binder, duh
20:54 telex joined
dalek ast: 8eaee5e | TimToady++ | S0 (3 files):
change 'is rw' to 'is raw' on slurpies

  'is rw' will break when we decide to enforce lvaluehood.
20:54
TimToady at the moment it allows either rw or raw on slurpies, but I suppose we could sanely reject rw for now 20:59
20:59 n0tjack left 21:03 n0tjack joined 21:06 kaare_ left 21:09 n0tjack left, Sgeo_ joined 21:10 n0tjack joined 21:11 Sgeo left 21:13 leont left 21:15 n0tjack left
dalek p: c16481c | TimToady++ | src/HLL/ (2 files):
hack in perl methods so P6's eqv doesn't blow
21:23
kudo/nom: 783c5ae | TimToady++ | tools/build/NQP_REVISION:
bump nqp rev to "fix" eqv
21:24
21:25 espadrine left, mohij left
TimToady that at least shuts up adverbs.t now 21:26
21:28 Khisanth left 21:31 n0tjack joined
mprelude OK so... noob question... is there anything special I have to do to use a perl5 lib in perl6? 21:33
or is it 100% back compatible
?
21:33 Alina-malina left 21:35 n0tjack left 21:37 ab5tract_ joined, Khisanth joined
FROGGS_ TimToady++ # that was a great talk 21:38
21:39 spider-mario left
FROGGS_ mprelude: you need to use Inline::Perl5 21:39
gnight companions 21:40
21:42 ab5tract_ left 21:44 BenGoldberg joined 21:46 n0tjack joined
dalek ast: b9c81f9 | TimToady++ | S02-literals/adverbs.t:
unfudge passing todos
21:48
TimToady nap
21:51 Skarsnik left 21:54 thundergnat left 21:56 n0tjack left 21:57 n0tjack joined
psch m: my ::foo $x, say $x 21:57
camelia rakudo-moar 783c5a: OUTPUT«Method 'gist' not found for invocant of class 'foo'␤ in block <unit> at /tmp/Piq71761s2:1␤␤»
psch ^^^ that gives a SOE on jvm... 21:58
with the same new, new, bless, BUILDALL loop before arriving in EXCEPTION and dying
(i'm honestly not even sure what the code is supposed to *mean*...) 21:59
_itz whats "is raw"?
psch _itz: the replacement for "is parcel" 22:00
22:01 n0tjack left
psch _itz: it's a trait for parameters, the short hand is \ iirc 22:01
as in, sub f ($foo is raw) <=> sub f (\$foo) 22:02
_itz: irclog.perlgeek.de/perl6/2015-09-08#i_11183857 22:03
_itz thanks 22:04
psch _itz: non-named parameters usually leave the sigil out, fwiw 22:05
m: sub f(:\foo) { }
camelia rakudo-moar 783c5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PW3zcit8D6␤Malformed parameter␤at /tmp/PW3zcit8D6:1␤------> 3sub f(:7⏏5\foo) { }␤ expecting any of:␤ formal parameter␤ named parameter␤»
psch std: sub f(:\foo) { }
camelia std 28329a7: OUTPUT«ok 00:00 138m␤»
ugexe timotimo: whats that json profile thing for?
psch goes to rakudobug that
ugexe: the json generated by the profiler was apparently malformed and "the qt profiler" (i don't know which one..) choked on that 22:07
(via #perl6-gaming)
ugexe i see 22:08
psch i'm guessing json and html output from the profiler aren't generated the same way, which could've prompted such a bug
hrm, RT is slow :( 22:09
gaah 22:10
stupid java with its stupid inheritance
i want to catch an explicit IllegalArgumentException, why is NumberFormatException even a subtype of that 22:11
22:11 cognominal left 22:13 n0tjack joined
psch .tell FROGGS if you're looking for a great WAT try the following three things on jvm: 22:16
yoleaux psch: I'll pass your message to FROGGS.
psch .tell FROGGS_ 1) assign a <> quoted list of the int literals from 0 to 250 to an array
yoleaux psch: I'll pass your message to FROGGS_.
psch .tell FROGGS_ 2) assign a <> quoted list of the int literals from 0 to 251 to an array 22:17
yoleaux psch: I'll pass your message to FROGGS_.
psch .tell FROGGS_ 3) assign a <> quoted list of the int literals from 0 to 252 to an array
yoleaux psch: I'll pass your message to FROGGS_.
psch .tell FROGGS_ just to be clear, that is "<0 1 2 3 ... 248 249 250>" all typed (or generated of course :) ) literally in the program code 22:18
yoleaux psch: I'll pass your message to FROGGS_.
22:18 pmurias left
psch (spoiler: jvm has a method argument limit of 255, which is causing a spec test failure in WHICH.t, because we have over 255 built-in types...) 22:18
ugh 22:19
i notice i should have either removed all _ or none of them :/
22:19 coffee` left
psch .tell FROGGS (the actual three things are .tell 22:19
.tell FROGGS .tell'd to FROGGS_ ) 22:20
vOv
psch pokes yoleaux
22:20 cschwenz left
yoleaux psch: I'll pass your message to FROGGS. 22:22
22:24 TEttinger joined 22:25 vendethiel joined
lizmat mprelude: Inline::Perl5 22:28
oops, looking at stale backlog :-) 22:29
22:35 n0tjack left 22:45 rindolf left 22:49 n0tjack joined
TimToady .tell nine re irclog.perlgeek.de/perl6/2015-09-12#i_11206412 there were more than 200 instances of .list in the pre-cache era that didn't actually need to set up the cache but did so accidentally, so it's a good thing for performance that .list no longer does that 22:49
yoleaux TimToady: I'll pass your message to nine.
22:54 n0tjack left
masak 'night, #perl6 22:56
TimToady o/
.tell jnthn the specced syntax you were looking for is 'when * -> $a, $b, *@c { ... }' but that's not implemented yet 23:00
yoleaux TimToady: I'll pass your message to jnthn.
23:03 yqt left 23:15 lizmat left 23:17 lizmat joined, khw joined 23:21 n0tjack joined 23:24 rurban left 23:30 aborazmeh joined, aborazmeh left, aborazmeh joined 23:31 n0tjack left
ugexe i've been getting a double memory free error about 50% of the time for this bit of code that never had that problem approximately a week ago: `my $d = buf8.new(data) andthen emit($_);` whereas if i split it into `my $d = buf8.new(data); emit($d)` it does not happen 23:38
psch m: my $d = buf8.new(data) andthen emit($_); 23:45
camelia rakudo-moar 783c5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Oumk3dbQsB␤Undeclared routine:␤ data used at line 1␤␤»
psch m: my $d = buf8.new(1, 2) andthen emit($_);
camelia ( no output )
psch m: my $d = buf8.new(1, 2) andthen emit($_);
camelia ( no output )
psch m: my $d = buf8.new(1, 2) andthen emit($_);
camelia ( no output )
psch ugexe: i suppose rakudobug it with a stracktrace, and maybe ping jnthn 23:46
although he probably has enough on his TODO... 23:47
23:54 n0tjack joined
ugexe when i --ll-exception it just says Segmentation fault or nothing at all. some more inspection is leading me to think its the line *after*, LAST { done() }, and that somehow splitting that previously mentioned line prevents the bug from manifesting itself 23:57
while $.recv(:bin) -> \data { my $d = buf8.new(data) andthen emit($_); LAST { done() }; } # removing the LAST and moving the done() to outside the loop seems to be the proper fix 23:59
23:59 colomon left, n0tjack left