»ö« 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.
dalek ast: ffc5993 | coke++ | S06-multi/subsignature.t:
loosen some fudge
00:01
kudo/nom: e9c5679 | coke++ | t/spectest.data:
add passing test
[Coke] m: class Foo { method bar() { 42 } method bar_ref() { &bar } }; Foo.new.bar_ref.say 00:03
camelia rakudo-moar 2f7ab3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Opp4YlUqtX␤Strange text after block (missing semicolon or comma?)␤at /tmp/Opp4YlUqtX:1␤------> 3class Foo { method bar() { 42 }7⏏5 method bar_ref() { &bar } }; Foo.new.ba␤ expecting any of:␤ …»
[Coke] ^^ that's a test from t/spec/S13-syntax/aliasing.t 00:04
that dates from 2008 or so. Seems dubious.
00:11 BenGoldberg joined
[Coke] r: say ((* < 5 and * > 5)(4,6)) 00:11
camelia ( no output )
..rakudo-moar 2f7ab3: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/tmpfile:1␤␤»
[Coke] r: say ((* < 5 and * > 5)(4))
camelia rakudo-{moar,jvm} 2f7ab3: OUTPUT«False␤»
[Coke] r: my $divisor = 2; say(* != $divisor && * %% $divisor);
camelia rakudo-{moar,jvm} 2f7ab3: OUTPUT«WhateverCode.new␤»
[Coke] r: my $divisor = 2; say(* != $divisor && * %% $divisor)(3); 00:12
camelia rakudo-jvm 2f7ab3: OUTPUT«WhateverCode.new␤Method 'postcircumfix:<( )>' not found for invocant of class 'Bool'␤ in block <unit> at /tmp/tmpfile:1␤␤»
..rakudo-moar 2f7ab3: OUTPUT«WhateverCode.new␤Cannot find method 'postcircumfix:<( )>'␤ in block <unit> at /tmp/tmpfile:1␤␤»
00:12 Zoffix left
[Coke] r: my $divisor = 2; say (* != $divisor && * %% $divisor)(3); 00:12
camelia rakudo-{moar,jvm} 2f7ab3: OUTPUT«False␤»
00:12 Zoffix joined 00:14 yqt left 00:15 virtualsue left
[Coke] can I get a ll exception in a REPL? 00:21
TimToady do you mean something other than starting the program with --ll-exception in the first place? 00:22
ShimmerFairy I assume you've tried --ll-exception with the REPL?
[Coke] TimToady: that doesn't seem to work, no.
(using perl6-j)
TimToady well, but Java is a high-level language :P 00:23
[Coke] r: &&::{}[];; 00:24
camelia rakudo-moar e9c567: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤» 00:25
..rakudo-jvm e9c567: OUTPUT«===SORRY!===␤VMArray: Index out of bounds␤»
Sgeo m: my %foo; say %foo<hi>; 00:30
camelia rakudo-moar e9c567: OUTPUT«(Any)␤»
Sgeo m: my %foo; say %foo<hi>; %foo<hi> ~= 'there'; say %foo<hi>;
camelia rakudo-moar e9c567: OUTPUT«(Any)␤there␤»
Sgeo Hmm where can I learn a bit about autovivification? 00:31
Also Perl6 keeps reminding me of Haskell lenses. A lot. 00:32
ShimmerFairy Sgeo: S09 and S12 appear to have sections on autovivification
Sgeo ty
I'm not sure if that's good or bad. IMO it's good if Perl6 is in fact similarly expressive, but I feel like without mathematical backing it might... miss use cases or something 00:33
ShimmerFairy I'm sure the lack of a mathematical backing can likely trip us up in places, but I like to think we're generally better at stuff than lower-level, less expressive languages :) 00:37
00:48 laouji joined
Sgeo Suppose I want to make a Proxy that backs a Promise. I can implement STORE to replace what it will return with, but I can't really implement FETCH (unless I either die, or freeze, or something). But, it would still make sense for me to do something like += 1 on it, but I can't do that if I can only define STORE/FETCH. So maybe MODITY/FETCH makes more sense, and storing is just a special case of MODIFYing 00:54
skids What would * += 1 do on something that cannot be FETCHed? 00:59
japhb I'm getting an error trying to bootstrap panda on a fresh r-j: "Could not find symbol '&Async'", which I vaguely remember being a known issue. Anyone happen to remember the last time panda and r-j got along? 01:02
Sgeo skids, map { * + 1 } on it, if it has a meaningful map operation 01:03
skids I bootstrapped panda fine just a little while ago and the only thing that is way out of date for me is rakudobrew.
japhb skids: what's your `perl6-j -v` ? 01:04
skids I nuked it since. 01:05
japhb Huh, the erroring line refers to Proc::Async. When did that get implemented on r-j? ISTR it was r-m only ....
01:07 gfldex left
japhb Confirmed, no src/core/Proc/Async.pm in tools/build/Makefile-JVM.in 01:11
Thus, I need to figure out how old a panda I need to successfully bootstrap (meaning, to go back far enough to *not* require Proc::Async) 01:12
01:15 kaare_ joined
skids Yeah seeing that too now. 01:19
(recompiled it
)
But its File::Find maybe complaining? 01:20
No it's in panda. 01:21
japhb It's panda commit afd281a
.tell hoelzro Panda commit afd281a breaks panda on r-j, because it requires Proc::Async. Either panda should handle lack of Proc::Async, or r-j needs to learn how to Proc::Async. :-) 01:22
yoleaux japhb: I'll pass your message to hoelzro.
01:24 rmgk left, rmgk joined 01:31 mtj_- joined 01:41 StavroMueller left 01:45 ilbot3 left
ugexe there is already an issue open on it 01:45
zef works on jvm 01:46
01:47 ilbot3 joined 01:48 mtj_- left 01:49 mtj_- joined 01:56 mtj_- left 01:57 mtj_- joined, yeahnoob joined
japhb ugexe: Oh, is zef a panda replacement? For some reason I got the feeling it was for something else .... 02:00
02:00 mtj_- left, dmitri joined, mtj_- joined
ugexe the client itself is. working on a Build.pm file converter so it can install everything. the server parts are not done, but the client uses the p6 community ecosystem as default for now 02:07
02:09 dayangkun joined 02:10 [Sno] left
japhb ugexe: Ah, understood. Make sure zef gets advertised in the p6weekly when it can fully replace panda. :-) 02:10
02:11 [Sno] joined
japhb Dang it, the last merge commit before afd281a still doesn't work on r-j, for a totally different reason (but at least it gets a lot farther). 02:11
02:11 mtj_- left
japhb wonders if modern r-m is thread-stable enough to handle my crazy code that requires r-j 02:12
ugexe i've implemented a generic replacement for Build.pm thats not dependent on a package manager at all, so hopefully we can just hammer our the details of hooks/ and get people using those instead 02:13
Sgeo Is there a way to make custom containers other than Proxy?
skids Sgeo: Containers go down to the VM level so while ISTR Moarvm allows dynamic extensions it will be an adventure. 02:28
02:31 khw joined
skids Yeah rakudo/src/vm does seem to build and load some Perl6 containers, so ther are examples outside the MoarVM source tree. 02:36
02:37 mtj__ joined 02:44 noganex joined
Sgeo I wonder if FETCH/STORE could be cheated with gather/take to get behavior like I described 02:46
02:47 noganex_ left 02:58 BenGoldberg left 03:05 mtj_ joined 03:07 skids left, mtj__ left, mtj_ left 03:08 mtj_ joined 03:11 grondilu left 03:13 grondilu joined 03:23 dmitri left 03:24 dsm left 03:26 dsm joined 03:31 khw left 03:39 dj_goku joined
Sgeo What's slice context? @@ 03:49
TimToady where'd you dig up that fossil? 03:55
ShimmerFairy I don't think that's been really dealt with so far; there are only three occurrences of 'slice context' in the specs, and pretty much none of the code given does anything. 03:56
oh, it's an old thing?
TimToady: you can find one mention each in S04, S09, and S32::Str 03:57
TimToady it's probably what mutated into ** lol context
but I don't think it's been @@ for more than 5 years 03:59
ShimmerFairy Well, ||@a in an array subscript doesn't work, and neither does **
TimToady ** works in binding
04:03 nys left
ShimmerFairy I saw that sub foo(**@a) { } works, I'm just not clear on how to see how it differs from *@a (I thought I'd see a change in behavior by passing something with ||, but as mentioned it's NYI) 04:05
Sgeo TimToady, www.ozonehouse.com/mark/periodic/ 04:12
[Coke] m: say 3 p5=> 4; 04:13
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ExCP9DPlD1␤Two terms in a row␤at /tmp/ExCP9DPlD1:1␤------> 3say 37⏏5 p5=> 4;␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ state…»
ShimmerFairy S06:346 mentions p5=> . I'm not surprised it's not implemented :) 04:20
synbot6 Link: design.perl6.org/S06.html#line_346
TimToady we decided to remove it, actually, since it can always be defined by a p5-to-p6 translator at need 04:21
afk for a bit & 04:22
Sgeo Is there a reverse application operator? 04:24
Or a thing to turn functions into operators for the purpose of using a metaoperator?
In Haskell if foo is a normal function then `foo` is an operator 04:25
dalek ecs: 4c0e9cd | ShimmerFairy++ | S06-routines.pod:
Remove p5=> fossil.
04:26
ShimmerFairy Sgeo: you can define a sub with name infix:<op> to create an operator that can then be used as $a op $b . I don't believe there's any syntax that lets you use an arbitrary sub as an infix. 04:27
b2gills m: 4 [&say] 5 04:42
camelia rakudo-moar e9c567: OUTPUT«45␤»
b2gills m: ^4 X[&say] 5 04:43
camelia rakudo-moar e9c567: OUTPUT«05␤15␤25␤35␤»
b2gills Sgeo: Like that ^
m: [[&say]] ^5 04:44
camelia rakudo-moar e9c567: OUTPUT«01␤True2␤True3␤True4␤»
Sgeo neat ty
m: 2, 3 X[* * *] 2, 3, 4 # Needless stuff time 04:45
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NNSbo15bYm␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/NNSbo15bYm:1␤------> 032, 3 X[*7⏏5 * *] 2, 3, 4 # Needless stuff time␤»
Sgeo I mean, there's no reason not to use X* there, but should it have worked? 04:46
04:50 baest_ is now known as baest
b2gills m: 2, 3 X[&(* * *)] 2, 3, 4 04:53
camelia ( no output )
b2gills m: say 2, 3 X[&(* * *)] 2, 3, 4
camelia rakudo-moar e9c567: OUTPUT«4 6 8 6 9 12␤»
04:54 ChoHag joined
ChoHag m: my %h = a => 1; say %h.push: a => 1; 04:54
camelia rakudo-moar e9c567: OUTPUT«a => 1␤»
b2gills Sgeo: the opening bracket must be followed immediately by an ampersand
Sgeo Hmm, ok 04:55
ChoHag Either hash push has broken or changed. Either way the example in doc.perl6.org/type/Hash#method_push doesn't work.
Sgeo That seems tricky to remember
m: my $say = &say; say [[$say]] 1,2
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ipPMTWPgbm␤Two terms in a row␤at /tmp/ipPMTWPgbm:1␤------> 3my $say = &say; say [[$say]]7⏏5 1,2␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement …»
Sgeo m: my $say = &say; say [[&$say]] 1,2 04:56
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XfuNa96Qhj␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/XfuNa96Qhj:1␤------> 3my $say = &say; say [[&7⏏5$say]] 1,2␤»
b2gills m: my $say = &say; say [[&$say]] 1,2
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GkERC0n2x2␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at /tmp/GkERC0n2x2:1␤------> 3my $say = &say; say [[&7⏏5$say]] 1,2␤»
Sgeo m: my $say = &say; say [[&($say)]] 1,2
camelia rakudo-moar e9c567: OUTPUT«12␤True␤»
Sgeo Uh. Not quite the right result?
b2gills That is exactly what I would have expected, the return value of say is usually True 05:02
ShimmerFairy ChoHag: it's never been broken, nor has it changed. Named parameters always get silently eaten by implicit *%_ on methods. 05:03
ChoHag Then the documentation is wrong. 05:04
Sgeo m: say 1,2 05:06
camelia rakudo-moar e9c567: OUTPUT«12␤»
ChoHag According to the documentation's example to which I only added a 'say', %h<a> should have been [1,1].
Sgeo Why did say get 1,2 as an argument instead of... .. 05:07
Sgeo is a bit confused
ChoHag Also:
m: my %h = a => 1; %h.push: b => 2; say %h
camelia rakudo-moar e9c567: OUTPUT«a => 1␤»
ChoHag Where did b and 2 go?
b2gills m: my %h = a => 1; %h.push: (a => 2); say %h.push: 'a' => 3; 05:08
camelia rakudo-moar e9c567: OUTPUT«a => 1 2 3␤»
b2gills You have to force it to be a positional argument instead of a named argument
ChoHag Then the documentation will be easy to fix. 05:09
05:10 ssqq joined
dalek c: 0344de8 | ShimmerFairy++ | lib/Type/Hash.pod:
Fix hash push example, ChoHag++

The given example forgot to account for methods' implicit *%_ and the interpretation of certain Pairs as named parameters in argument lists.
05:10
05:13 ssqq left, ssqq joined
Sgeo Wonder how often similar mistakes will be made in real code 05:18
ChoHag All the time. 05:19
The set of "list-like things in perl 6" is the very definition of weird. 05:20
ShimmerFairy Sgeo: quite. I'm a big fan of getting rid of implicit *%_ and disambiguating the syntax for nameds and Pairs. More realistically, I should think an Associative class' methods should handle *%_ because that's a particularly likely source of problems.
ChoHag This is not necessarily a bad thing, mind.
ShimmerFairy m: my %hash; %hash.push("IsAPair" => 42, NotAPairThough => 21); say %hash.perl # such fun, much wow 05:22
camelia rakudo-moar e9c567: OUTPUT«{:IsAPair(42)}<>␤»
ChoHag I'd be happy with Associative.push dealing with *%_ specially. I can't think of any way in which not doing so makes more sense than doing so. 05:23
ShimmerFairy Yeah. I imagine some of the arguments for keeping *%_ would make assuming *%_ to contain Pairs for the Associative-doing class problematic, but I don't think it outweighs the unintuitive ignoring of certain unlucky Pairs. 05:26
05:46 ssqq left 05:47 ssqq joined, laouji left 05:50 laouji joined 05:56 ssqq left 06:03 mr-foobar left 06:19 FROGGS joined 06:34 rurban_ joined 06:36 rurban joined 06:49 woolfy joined 06:54 woolfy left 07:09 mr-foobar joined, [ptc]_ joined 07:15 virtualsue joined
Sgeo my %base36 = ( 0..9, 'A'..'Z' ) Z ( ^36 ); 07:15
How does that work, isn't Z by itself a comma, not a pair maker?
m: my %base36 = ( 0..9, 'A'..'Z' ) Z ( ^36 ); say %base36; 07:16
camelia rakudo-moar e9c567: OUTPUT«0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, A => 10, B => 11, C => 12, D => 13, E => 14, F => 15, G => 16, H => 17, I => 18, J => 19, K => 20, L => 21, M => 22, N => 23, O => 24, P => 25, Q => 26, R => 27, S => 28, T => …»
ChoHag It's a zip.
Neither a comma nor a pair maker, as I understand it, but its own thing. 07:17
If an attribute's has-accessor returns true does that imply that the accessor might be named after the attribute sans sigil+twigil, or does it mean exactly that? 07:20
lizmat .tell jnthn regarding supply { }, how will the runtime know which supply to emit()/done() to? $*SUPPLY ? 07:21
yoleaux lizmat: I'll pass your message to jnthn.
Sgeo circumfix:«( )»('a', 'b', 'c')
Why the double << >> instead of < >?
ChoHag Are there any circumstances whene has-accessor can be True but the accessor is _not_ attribute.name.substr(2..*)?
07:21 RabidGravy joined
ChoHag Apparently my substr syntax is wrong, but ignore that. 07:23
Sgeo m: my @a = 0, 1; say @a[*-1, *-2]; 07:24
camelia rakudo-moar e9c567: OUTPUT«1 0␤»
07:25 darutoko joined, [ptc]_ left
lizmat m: say "foobar".substr(2..4) 07:26
camelia rakudo-moar e9c567: OUTPUT«oba␤»
lizmat m: say "foobar".substr(2..*)
camelia rakudo-moar e9c567: OUTPUT«Type check failed in assignment to '$chars'; expected 'Int' but got 'Num'␤ in block <unit> at /tmp/kI_POeAt7C:1␤␤»
lizmat hmmm...
that should work
ChoHag I seem to hit all the bugs...
07:28 cibs joined
ChoHag Serves me right for using the documentation I suppose. There is no 'trusts Documemtation' in 'class Sysadmin'. 07:28
Sgeo m: say rand xx 3 07:30
camelia rakudo-moar e9c567: OUTPUT«0.775496218272425 0.294049764640139 0.906301652066614␤»
Sgeo How does xx work, that the lhs is reevaluated?
07:32 pdcawley joined
ChoHag xx's signature is probably a block and an int. 07:32
moritz Sgeo: it's special-cased in the compiler
ChoHag Or that.
Sgeo :/
ChoHag Boo.
moritz note that macros can do that too 07:34
Sgeo Oh ok
ChoHag So [how] can I reliably get an attribute from its sigil-less name, and a sigil-less name from an attribute?
Sgeo m: sub foo(Int $a:) { $a + 1); say 5.foo; 07:35
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nkmTqu67tY␤Missing block␤at /tmp/nkmTqu67tY:1␤------> 3sub foo(Int $a:) { $a + 17⏏5); say 5.foo;␤ expecting any of:␤ statement end␤ statement modifier␤ statement modi…»
Sgeo m: sub foo(Int $a: $b) { $a + 1); say 5.foo 6;
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yZdBjM32Jk␤Missing block␤at /tmp/yZdBjM32Jk:1␤------> 3sub foo(Int $a: $b) { $a + 17⏏5); say 5.foo 6;␤ expecting any of:␤ statement end␤ statement modifier␤ statement…»
Sgeo m: sub foo(Int $a:) { $a + 1}; say 5.foo;
camelia rakudo-moar e9c567: OUTPUT«Method 'foo' not found for invocant of class 'Int'␤ in block <unit> at /tmp/v9E1oU9y66:1␤␤»
Sgeo m: sub foo(Int $a:) { $a + 1}; say 5.&foo; 07:36
camelia rakudo-moar e9c567: OUTPUT«Cannot bind to non-existing object lexical 'self'␤ in sub foo at /tmp/56Cw2W1Rfr:1␤ in block <unit> at /tmp/56Cw2W1Rfr:1␤␤»
Sgeo It.. seemed to try to work?
moritz ChoHag: you cannot; a class can have both $!foo and @!foo, though only one can have an accessor
ChoHag And assuming .has-accessor is true for one of them?
Is the accessor _always_ named after the attribute sans sigil+twigil? What about twigil-les attributes? 07:38
moritz m: class A { has $.a; has @.b }; say A.^attributes.grep({ .has-accessor && .name =~ /a/ })
camelia rakudo-moar e9c567: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YBzr9_RsuL␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~␤at /tmp/YBzr9_RsuL:1␤------> 3ributes.grep({ .has-accessor && .name =~7⏏5 /a/ })␤»
moritz m: class A { has $.a; has @.b }; say A.^attributes.grep({ .has-accessor && .name ~~ /a/ })
camelia rakudo-moar e9c567: OUTPUT«Mu $!a␤»
moritz m: class A { has $.a; has @.b }; say A.^attributes.grep({ .has-accessor && .name.substr(2) eq 'a' }) 07:39
camelia rakudo-moar e9c567: OUTPUT«Mu $!a␤»
moritz ChoHag: auto-generated accessors are always named that way, yes
ChoHag Actually a twigil-less attribute won't have an accessor will it?
moritz ChoHag: and sigilless attributes ... correct
and twigilless attributes are just an alias for the one with twigil 07:40
m: class A { has $a }; say A.^attributes[0]
camelia rakudo-moar e9c567: OUTPUT«Mu $!a␤»
moritz still stored as $!a
ChoHag Right. 07:41
Sgeo if 'properly' ~~ m/ perl / 07:43
How does that work, I thought m meant do it immediately
Oh does 'properly' become $_ for the m/ ?
THat's.. a bit strange to rely on that there instead of using without m which should work, right?
(Saw this at doc.perl6.org/language/regexes#Literals ) 07:44
07:44 g5 is now known as g4 07:45 g4 left, g4 joined
moritz yes, ~~ sets $_ on the RHS 07:46
Sgeo Which gets wiped out if you use $_ in a block, but that block would receive the LHS anyway, so there's no apparent difference
07:47 mr-foobar left 07:50 rindolf joined, mr-foobar joined
dalek kudo/nom: 0dcbba7 | lizmat++ | src/core/Str.pm:
Make "foobar".substr(2..*) work

Spotted by ChoHag++
07:53
Sgeo Wouldn't that then be a ~~ vs a Matches (or Matcher or whatever the result of a regex is)? 07:56
dalek ast: b536f89 | lizmat++ | S32-str/substr.t:
Tweak substr(Range) tests
07:59
ChoHag Tut tut tut.
Is somebody writing their code before their tests?
moritz all our tests are perfect in the first iteration, of course. 08:04
lizmat ChoHag: some people might have thanked me for not having to submit a bug report 08:08
Sgeo Can a grammar be defined for matching on binary data? e.g. a network protocol 08:10
Or regex or other similar parsing mechanism
RabidGravy you can't ~~ or match against a Buf as it stands 08:14
08:16 cschwenz left 08:17 mr-foobar left 08:19 [Tux] joined 08:21 telex left 08:22 telex joined, [Sno] left 08:26 [Sno] joined
ShimmerFairy Sgeo: there isn't currently a way to write grammars for binary data (unless of course you're veeeery careful about pretending it's text :P) 08:28
08:28 RabidGravy left 08:30 zakharyas joined 08:32 RabidGravy joined
RabidGravy boo! 08:33
08:35 pierrot left
jnthn morning, #perl6 08:41
yoleaux 07:21Z <lizmat> jnthn: regarding supply { }, how will the runtime know which supply to emit()/done() to? $*SUPPLY ?
jnthn lizmat: Probably something like that, though control exceptions are another option 08:42
lizmat jnthn RabidGravy o/
jnthn lizmat: await in the thread pool will certainly be a control exception
*by
lizmat if emit / done work on $*SUPPLY, I think I can implement that 08:43
RabidGravy rarr!
lizmat jnthn: if that would help 08:44
jnthn lizmat: Ah, done will need something exceptional... 08:46
lizmat: Though that doesn't mean you can't issue it through $*SUPPLY 08:47
lizmat why? wouldn't it just be sub done(|c) { $*SUPPLY.done(|c) } ?
(with a check on validity of $*SUPPLY of course) 08:48
ok, so you agree :-)
08:48 pierrot joined
jnthn supply { whenever $input -> $value { state $i = 0; done if $i++ == 5; emit $value; } } 08:49
That emit must not get to run after the done.
08:49 pierrot is now known as Guest76133
jnthn So sure, it can desugar to a method call 08:49
But that just moves the place the exceptional stuff is needed.
Oh, one more note
$*SUPPLY is maybe a misleading name since it's not actually a Supply
It'll need to be something a bit smarter than that 08:50
That pumps stuff into an actual supply, but handles e.g. the control flow nature of done, and potentially the hyper-whenever/emit semantics eventually
Not saying you have to do all of those of course :) 08:51
The other thing is that a "whenever" attaches itself in some way to the thing in $*SUPPLY so we know to close the tap there when done, or when the output supply is closed
moritz [Coke], colomon: you both run your smoke tests on hack around 14:00 UTC; might I suggest that one of you moves the job a few hours around, so that they don't run at the same time? thanks
jnthn So it's really some coordinating object that goes in there. 08:52
(That will also have responsibility for the actor semantics on the inside of the supply block) 08:53
08:54 [Tux] left
jnthn lizmat: I think if you start out just getting supply { emit "hi"; done; } working, though, then you'll have helped no matter how exactly you do it by getting the basic wiring in place. 08:57
08:57 g4 left 08:58 g4 joined 09:00 Guest76133 left
jnthn lizmat: I'd probably compile supply into a call to some Supply.from-block(pass the block), and whenever $s -> { xxx } into $*SUPPLY.whenever($s, -> { xxx }) 09:01
09:03 laouji left, laouji joined 09:04 FROGGS left
lizmat jnthn: ok, will do when back from some cycling (now the temperature is still bearable) 09:04
so afk until later&
jnthn Enjoy :) 09:05
09:06 [Tux] joined, espadrine joined 09:12 rarara_ joined 09:18 pierrot_ joined 09:23 [TuxCM] left 09:35 [TuxCM] joined 09:56 mr-foobar joined
sergot hiho \o 10:02
timotimo oh hi sergot! 10:05
RabidGravy marnin! 10:08
10:11 smls joined 10:23 yeahnoob left 10:27 yqt joined
dalek c: ed062b0 | (Steve Mynott)++ | lib/ (2 files):
fix minor typos
10:29
10:35 pdcawley_ joined, pdcawley left, rindolf left 10:44 rurban left 10:45 pmurias joined
pmurias hi 10:45
10:46 Woodi joined
moritz \o 10:46
10:51 yqt left
RabidGravy erp 10:51
DrForr derrp. 10:52
itz DrForr: I get " Error: Can't locate Perl/ToPerl6/Transformer/Operators/AddWhitespace.pm" trying to run Perl-Mogrify tests 10:54
DrForr Uh.. hi. 10:55
Oh, I removed that because it more clearly belonged in the operator changeover.
Removed it in git, the tests that I was concerned about passed, must have missed that one. 10:56
I'm going to do a release tonight, I'll remember to keep an eye out for that.
itz ty 11:01
DrForr I've already got a failing test that I need to clear up, that output is probably what blinded me to the problem.
11:03 yqt joined
ChoHag Is there any particular reason why Attribute lacks a is-required method? 11:06
One can be succesfully monkey-typed in with simply 'method is-required { ?$!required }'
RabidGravy it has a private $!required 11:09
oh you noticed that
ChoHag I knows grep, me!
11:09 mr-foobar left 11:16 Psyche^_ joined 11:17 rurban_ left 11:20 Psyche^ left 11:21 skids joined
smls m: my @a = 'a'..'z'; dd @a[2]; dd @a[2,]; 11:27
camelia rakudo-moar 0dcbba: OUTPUT«@a = "c"␤("c",)␤»
11:28 TEttinger left
smls ^^ based on what type contraints is it decided whether a list is returned there? 11:28
If the subscript ~~ Positional? or if the subscript ~~ Iterable?
11:33 rurban joined
ChoHag What's the correct syntax for: for something-which-produces-a-list-of-pairs() -> ($a, $b) { ... } 11:37
To change from: for something-which-produces-a-list() -> $a { my $b = derive-b-from($a); ... } to for s-w-p-a-l().map(* => derive-b-from(*)) -> ($a, $b) { ... } 11:38
smls not sure there is one
you can use for ... { .key ... .value } thouch 11:39
ChoHag I'm sure I've seen a few examples of more than one variable between the -> and the {.
smls yes, but I don't know if there's a way to unpack a pair in a signature.
ChoHag Well maybe not a Pair then. I can do whatever I feel like in the map. 11:40
map(* => derive-from(*)) was just my first guess.
11:41 gfldex joined
smls m: for (1, 10), (2, 20), (3, 30) -> [$a, $b] { say "$a : $b" } 11:41
camelia rakudo-moar 0dcbba: OUTPUT«1 : 10␤2 : 20␤3 : 30␤»
smls [] unpacks a Positional object in a signature
Hm, looking the multi candidates in src/core/array_slice.pm, it appears that .[Positional] is what causes a slice, not .[Iterable] 11:48
Is that intentional? A Positional-but-non-Iterable type like CArray will blow up here, won't it? 11:49
m: use NativeCall; my @a := CArray[int].new; @a[0] = 2; @a[1] = 4; dd @a ~~ Positional; dd (0, 1, 2, 3, 4, 5)[@a] 11:52
camelia rakudo-moar 0dcbba: OUTPUT«(timeout)Bool::True␤» 11:53
smls right, timeout.
[Coke] I have a job at 13:55 - after it runs today, I'll set it to run at 6:55 going forward. 12:03
^^ colomon, moritz
so, one more day of too much at once.
actually, bumping it up to as close to now as possible. 12:04
colomon [Coke]: errrr, too much at once on hack? (I’m missing context here)
[Coke] colomon: from backlog. Yes, we both ahve jobs running at 1400ish. I'm moving mine 12:05
colomon [Coke]++
[Coke] ok, it's running now 1206ish. moritz, is that OK or shoudl I move it again tomorrow? 12:07
moritz [Coke]: how long does it take? 12:09
colomon: I'm not sure yet it's too much; I just know it's better if they don't coincide
12:11 yqt left
smls huh?: "Method 'contents' not found for invocant of class 'Any' in sub find-definitions at ./htmlify.p6:327" 12:11
with today's rakudo via "rakudobrew triple nom master master"
moritz smls: worth investigating 12:13
might be a list-y or a pod-y change
doc.perl6.org/build-log/build-2015-...0+0000.log last build was successful
12:14 RabidGravy left
moritz though that runs on a rakudo 2015.05 12:14
12:15 RabidGravy joined
smls Hm, it seems a change to a .pod file I made locally, triggered it. 12:15
12:18 mr-foobar joined
smls moritz: Ah, problem solved. I accidentally left a bare "=head1" line (without an actual heading following it) in the .pod; that's what caused the error. 12:22
12:23 zacts left
moritz smls: if you could improve the error message, that would be great 12:23
smls I wonder if Rakudo's POD parser itself should fail/warn there? 12:24
jnthn smls: On the postcircumfix:<[ ]> question, I suspect it has to be Iterable post-GLR, otherwise @a[1, 2, 4 ... 16] won't work for example 12:28
smls m: say (1, 2, 4 ... 16).WHAT 12:29
camelia rakudo-moar 0dcbba: OUTPUT«(List)␤»
smls I was wondering about that case anyway: How does it know to that .[2, 4, ... *] should be a truncating slice, but .[2, 4, 6, 8] shouldn't?
moritz smls: I don't know the pod syntax well enough to be able to comment on that
smls Seeing how both are List objects? 12:30
jnthn For one, 1, 2, 4 ... 16 won't be a list after GLR
It'll be a Seq
12:30 dayangkun left
jnthn Either could be known infinite though 12:31
I suspect asking "is this known infinite" will be the answer
smls but 0..10 will also be truncating, even though it is not infinite
"However, it is legal for a range or sequence iterator to extend beyond the end of an array" -- what S09 has to say on the matter 12:32
Whatever a "sequence iterator" is... :P
jnthn We could change that, to fix the @a[0, 1, 2] being different from @a[^2] thing I guess
smls Maybe it was written at a time when ... was thought to return a special object?
jnthn Maybe. There's been so many models... 12:33
By this point I'd rather get what we like down in code and then go make the design docs reflect it afterwards.
Maybe you have to write an infinite range if you actually want the auto-truncating behavior.
That'd make things far more uniform.
[Tux] was somehow hoping that .flat would do that recursively, so [[1,2],[2,3]].flat would return [1,2,2,3]
jnthn [Tux]: You'll have to work a bit harder to flatten recursively 12:35
[Tux] nods
jnthn [Tux]: If there's an Array there, anyways.
[Tux] hence the "hope" :)
smls m: dd [[1,2],[2,3]].duckmap(*.flat) 12:36
camelia rakudo-moar 0dcbba: OUTPUT«([1, 2]<>, [2, 3]<>)␤»
smls m: dd [[1,2],[2,3]].duckmap(*.flat).flat
camelia rakudo-moar 0dcbba: OUTPUT«(1, 2, 2, 3)␤»
smls m: dd [[1,2],[2,3]]».flat.flat
camelia rakudo-moar 0dcbba: OUTPUT«([1, 2], [2, 3])␤»
smls ^^hm, why does that one not work? 12:37
jnthn No idea
[Tux] what is the diff between map and duckmap?
jnthn I'm not going debugging a bunch of code I'm in the process of replacing though :)
moritz because >> descends into the array elements
jnthn Ah 12:38
Arguably .flat should be nodal though
moritz m: say [["a", "b"], "c"]>>.uc.perl
camelia rakudo-moar 0dcbba: OUTPUT«(["A", "B"], "C")␤»
smls oh, » does a deepmap then?
[Tux]: I should have just used .map there, .duckmap does't really help here. 12:39
12:39 AlexDaniel joined
[Tux] m: dd [[1,2],[2,3]].map(*.flat) 12:39
camelia rakudo-moar 0dcbba: OUTPUT«(1, 2, 2, 3)␤»
[Tux] that'll do
12:39 yqt joined
moritz m: dd [[1,2],[2,3]].map(&flat) 12:42
camelia rakudo-moar 0dcbba: OUTPUT«([1, 2], [2, 3])␤»
smls jnthn: Re restricting auto-truncating to infinite things, when I suggested it before, skids disagreed: irclog.perlgeek.de/perl6/2015-07-07#i_10863136 12:43
Would be good to know TimToady's original intentions behind it, and what skids (and others) find it useful for.
12:44 rindolf joined
smls Maybe the post-GLR rule wants to be "Seq and Range subscripts truncate; List and others don't" 12:45
12:46 espadrine left
jnthn Doesn't feel very general 12:46
12:46 rarara_ left
smls true 12:47
jnthn Whatever we pick, we're not going to make everyone happy all of the time, and a lot of the weight of previous list implementations came from trying to please too many competing use-cases simultaneously with too much magic. 12:48
smls restricting it to *just* Range would make it a proper "special exception", but also cause neat things like this to not work: .[2, 4 ... *] # select all even indices
12:48 mr-foobar left
smls with "known infinity" that would work. 12:49
jnthn Right
Though I'm at this point thinking "lazy" actually marks something as "known infinite" (and perhaps hides any batching) 12:50
So .[lazy 1..10] would get you back your auto-truncating
smls Interesting.
jnthn Though "mark" sounds mutating whereas that isn't actually what happens at all, you just get an iterator that delegates to another one and enforces one-at-a-time 12:51
colomon ooooo, I like the sound of that lazy 12:52
12:53 laouji left
skids I could live with that. As long as their is a way that does not involve breking out the ternaries and minus signs. 12:53
smls I guess I'll have to make peace with the whole "known infinite" thing then, if various things rely on it... :P 12:57
Please do make sure to unambiguously define when it is the case, though.
jnthn adds documenting those to his todo list 12:58
[Coke] moritz: sorry, don't know how long it normally takes. 12:59
moritz [Coke]: just make sure it's finished by 1400; in case of doubt, be defensive and run it at 0200 or so
dalek rl6-roast-data: 1564ca0 | raiph++ | README.md:
Try to fix the link to the latest run
13:00
rl6-roast-data: b4ff632 | (Will Coleda)++ | README.md:
Merge pull request #5 from raiph/patch-1

Try to fix the link to the latest run
13:00 [Tux] left
jnthn Oh come on, just one diacritic per letter? :P 13:00
dalek rl6-roast-data: 5140895 | moritz++ | bin/doit:
Apply a memory limit to the non-JVM processes
13:02
rl6-roast-data: 3183852 | (Will Coleda)++ | bin/doit:
Merge pull request #8 from moritz/ulimit

Apply a memory limit to the non-JVM processes
hoelzro goooood morning #perl6! 13:06
yoleaux 01:22Z <japhb> hoelzro: Panda commit afd281a breaks panda on r-j, because it requires Proc::Async. Either panda should handle lack of Proc::Async, or r-j needs to learn how to Proc::Async. :-)
13:08 spider-mario joined 13:10 davido__ left
hoelzro what's the proper equivalent to Perl 5's hex() function? redefining sub hex(Str $s) returns Int { (":16<" ~ $s ~ ">").Numeric } in oneliners is a bit tedious, and it may be a good opportunity for "hex() is gone, use X in Perl 6" 13:10
13:11 davido__ joined 13:12 espadrine_ joined, espadrine_ is now known as espadrine
DrForr Heh. P::RD continues to pay off in new and creative ways to break P6 string interpolation. 13:13
I'm gonna owe Damian a few beers next time I see him :) 13:14
13:15 cognominal joined
PerlJam hoelzro: why can't you just use :16<1234> directly? 13:15
hoelzro PerlJam: ...because I'm dumb and didn't take to try :16($s) 13:16
hoelzro facepalms
PerlJam :) 13:17
nine m: $i = 1234; say :16($i) # there's also this nice hint
camelia rakudo-moar 0dcbba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YLiO6K_v0J␤Variable '$i' is not declared␤at /tmp/YLiO6K_v0J:1␤------> 3<BOL>7⏏5$i = 1234; say :16($i) # there's also th␤»
nine m: my $i = 1234; say :16($i) # there's also this nice hint
camelia rakudo-moar 0dcbba: OUTPUT«This call only converts base-16 strings to numbers; value 1234 is of type Int, so cannot be converted!␤(If you really wanted to convert 1234 to a base-16 string, use 1234.base(16) instead.)␤ in block <unit> at /tmp/zTqbfHZY_A:1␤␤»
PerlJam nine: unfortunately(?), .base(16) doesn't work on strings 13:18
Woodi [5~[6~[6~[6~ 13:20
13:21 cognominal left 13:24 AlexDani` joined
nine PerlJam: fortunately, this is Perl :) 13:26
m: my $i = "1234"; $i.Int.base(16).say
camelia rakudo-moar 0dcbba: OUTPUT«4D2␤»
13:26 AlexDaniel left
PerlJam m: my $i = "12ab"; $i.Int.base(16).say # oops :) 13:30
camelia rakudo-moar 0dcbba: OUTPUT«Cannot convert string to number: trailing characters after number in '12⏏ab' (indicated by ⏏)␤ in block <unit> at /tmp/9eEseCmji2:1␤␤Actually thrown at:␤ in block <unit> at /tmp/9eEseCmji2:1␤␤»
jnthn King James GLR: kingjamesprogramming.tumblr.com/pos...-cause-her 13:35
13:36 ChoHag left
moritz lol 13:38
nine poor daughter
timotimo well, if the parents heed that advice, that's good for the daughter, no? 13:39
nine Well, if the parents _need_ that advice, that cannot be good for the daughter, no? :)
daxim lizmat, can you use /etc/os-release instead of lsb_release, or check /etc/os-release first, lsb_release second?
timotimo true
dalek p/js: 71fe204 | (Pawel Murias)++ | src/vm/js/ (2 files):
Make array access happen through 12275bindpos/12275atpos instead of using [] directly
13:40
lizmat daxim: that's how it's coded already.... lsb_release is only called if /etc/os-release does not exist 13:41
13:42 khw joined
hoelzro japhb: got it, I'll try to fix it 13:42
daxim cool, I didn't see that
smls I like this one: kingjamesprogramming.tumblr.com/pos...ices-among
moritz smls: yes, that's nice 13:48
13:48 rindolf left
hoelzro is it possible to unpack hash values via assignment (something like my { :$value } = { :value<17> } )? 13:49
smls m: my %a = a => 1, b => 2; my (:$a, :$b) := %a; dd $a, $b 13:50
camelia rakudo-moar 0dcbba: OUTPUT«1␤2␤»
smls if the variables are named differently, use :key($var) as you would in any signature.
hoelzro huh, I tried that... 13:51
smls did you use binding?
hoelzro ooooh
thanks smls
smls++ 13:52
13:55 jkva joined 13:57 laouji joined
hoelzro has anyone here tried Linenoise on Windows? I'd like to hear if it works 14:04
jnthn hoelzro: No, need to use binding for unpacks 14:05
oh, smls++ beat me
GLR gist updated with gather/take support, including take slip(...); handling: gist.github.com/jnthn/aa370f8b32ef98e4e7c9 14:08
dalek c: 8da95e9 | smls++ | lib/Language/subscripts.pod:
subscripts: Fill in the "Slices" section
14:09
smls ^^ documented the current Rakudo/spec design for now, but added POD comments so we won't forget to update things post-GLR 14:10
jnthn For anyone not also on #moarvm (where most of the serious performance analysis discussion goes on), here's some numbers so far:
gather/take assigned into an array ==> was 0.525030056635539s, now 0.224679549535116s
for loop over gather/take ==> was 3.6518755753835s, now 0.570699373881022s
That's the bottom two benchmarks
tony-o jnthn++
damn that's a nice improvement 14:11
timotimo "bottom two" doesn't mean "the ones where we win the least" 14:12
hoelzro does :ignorecase apply to character ranges like <[a..f]>?
timotimo yes
jnthn timotimo: No, I mean textually in the gist
timotimo it's supposed to. if it doesn't work, that'd be a bug
jnthn Oh, those numbers are before I have a MoarVM with timotimo++'s inline threshold tuning 14:13
jnthn builds to see if it gives any boost
hoelzro m: '"%E3%81%82" ~~ m:ignorecase/["%" (<[a..f0..9]> ** 2)]+/ && say $/[0]' 14:14
camelia rakudo-moar 0dcbba: OUTPUT«WARNINGS:␤Useless use of constant string "\"%E3%81%82\" ~~ m:ignorecase/[\"%\" (<[a..f0..9]> ** 2)]+/ && say $/[0]" in sink context (line 1)␤»
hoelzro grr, shell quoting
m: "%E3%81%82" ~~ m:ignorecase/["%" (<[a..f0..9]> ** 2)]+/ && say $/[0]
camelia rakudo-moar 0dcbba: OUTPUT«「81」 「82」␤»
hoelzro should I rakudobug that?
jnthn Sadly, nothing much 14:15
timotimo jnthn: i feared as much :\ 14:16
14:18 jkva left
PerlJam m: "%E3%81%82" ~~ m:ignorecase/ "%" <[a..f0..9]> / && say $/; 14:21
camelia rakudo-moar 0dcbba: OUTPUT«「%8」␤»
PerlJam "%E3%81%82" ~~ m:ignorecase/ "%" <[a..f]> / && say $/; 14:22
m: "%E3%81%82" ~~ m:ignorecase/ "%" <[a..f]> / && say $/;
camelia rakudo-moar 0dcbba: OUTPUT«「%E」␤»
hoelzro interesting find PerlJam
PerlJam: could you put your findings on rt.perl.org/Ticket/Display.html?id=125753 ? 14:23
jnthn ponders what next for the GLR work
dalek p/js: eb81a56 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files):
Implement positional_delegate
14:25
p/js: 22a103c | (Pawel Murias)++ | src/vm/js/ (2 files):
Binding and accessing a hash is done through $$bindkey/$$atpos.
p/js: fa6709e | (Pawel Murias)++ | src/vm/js/ (3 files):
Pass test 73.

Implement associative_delegate.
PerlJam hoelzro: updated 14:26
hoelzro PerlJam: thanks!
jnthn I guess lazy loops (lazy while/until/loop and so on) come next
Then maybe I should try hyper/race
timotimo you could try recruiting people to build some fast-path versions of push-all (or pull-all?) 14:27
jnthn *nod* 14:30
Well, I'd start by writing benchmarks to make sure such things pull their weight
PerlJam hoelzro: check this out ... 14:31
jnthn For example, writing one for 0 xx * is kinda pointless because inlining basically writes it for you.
PerlJam m: '%E3%81%82' ~~ m:ignorecase/['%' (<[abcdef0123456789]> ** 2)]+/ && say $/[0];
camelia rakudo-moar 0dcbba: OUTPUT«「E3」 「81」 「82」␤»
PerlJam hoelzro: I guess something is broken with character class ranges?
jnthn PerlJam: Other fun question is if you can rely on chr(start)..chr(end) being contiguous implying chr(uc(start))..chr(uc(end)) being 14:33
PerlJam: And the answer is surely no because that'd make life way too easy :)
PerlJam: So it'll need a bit of care to fix, but shouldn't be too bad :)
Trouble is though that then you lose the nice charrange optimization 14:34
Or at least, if you want to keep it you've got some analysis to do
Anyway, long story short I can see why it didn't get done yet. I agree it probably should be. :)
PerlJam adds to the ticket for now. 14:35
jnthn *nod* 14:36
14:38 cognominal joined
dalek rl6-roast-data: 1c78d6e | coke++ | / (8 files):
today (automated commit)
14:40
tony-o jamming through these http::server::async tests, the rewrite + the work you guys did on the core io::socket::async is looking good so far 14:43
14:43 kyclark joined 14:44 isBEKaml joined
hoelzro PerlJam: interesting...thanks for digging into that further! 14:48
15:02 isBEKaml left 15:04 hobbified joined, FatalNIX left, pnu left, AlexDani` is now known as AlexDaniel 15:05 pnu joined
moritz perlpunks.de/paste/show/55c2262e.6617.290 # current r-m spectest failures 15:05
15:05 FatalNIX joined
[Coke] 15:10
smls m: my %a = a=>1, b=>2, c=>3; say %a 15:12
camelia rakudo-moar 0dcbba: OUTPUT«a => 1, b => 2, c => 3␤»
smls ^^ Is this new? (The comma separation in .gist output)
[Coke] star: my %a = a=>1, b=>2, c=>3; say %a 15:13
camelia star-m 2015.03: OUTPUT«a => 1, b => 2, c => 3␤»
15:14 kyclark left
moritz github.com/perl6/roast/blob/master...ly/start.t why is [1, 1] in line 34? 15:18
15:18 kyclark joined
moritz $master.emit(2); # shall not be seen 15:19
why not?
TimToady shh! 15:20
moritz is Supply.start limited to keeping just one Promise? 15:21
tony-o HTTP::Server::Async has breaking changes and now conforms to HTTP::Server 15:22
it's also a lot more stable
timotimo good! :)
moritz skimming design.perl6.org/S17.html#Supplies I see no evidence for that 15:23
oh, it's probably related to the sleep $_; thing 15:24
and hoping that the sleep 2 isn't run at the time the is() is run 15:25
jnthn tony-o: yay, my days of concurrency debugging did something :)
moritz erm, is-deeply
tony-o jnthn: they did a lot, not sure if you saw my `siege` gist a few days ago :-)
jnthn tony-o: Now just need to get throughput better ;)
tony-o: Yes, I saw it survived
tony-o gist.github.com/tony-o/2b5840bd5bec4be6cbab 15:26
well, it survived and had 10 concurrent requests - it used to puke on >1 request
jnthn :)
No idea how bad 71 trans/sec is though :)
yay, plumbing for lazy loop { ... } with next/redo/last support is working 15:27
Now need the variant with a condition and post-action 15:28
tony-o 71 trans/sec seems decent enough
15:28 rindolf joined
jnthn tony-o: OK, nice :) 15:29
flussence that's within the same ballpark I got last time I ran siege on some php stuff 15:34
I guess the days of p6 being "too slow" are over then :)
tony-o looking at other siegers' articles and they're around 50 trans/sec so it'll probably slow down with actual practice 15:35
flussence++
flussence (porting/rewriting some old php stuff has been on my todo list for... quite a while) 15:36
15:38 erdic joined 15:39 preyalone joined
dalek osystem: f29d4a0 | tony-o++ | META.list:
removing pandapack from ecosystem
15:39
ast: a4c2a2c | moritz++ | S17-supply/start.t:
sleep less in S17-supply/start.t

also make it a bit more robust; now it should not error out if the machine is too slow
15:40 preyalone left, pnu left, FatalNIX left, pnu joined
japhb ++hoelzro # Making r-j and panda play nice together again 15:40
15:40 preyalone joined, pnu left, pnu joined
japhb tony-o: I had missed that siege gist the first time around, very cool! Where is the code? 15:41
15:41 FatalNIX joined
tony-o japhb: github.com/tony-o/perl6-http-server-async 15:43
15:45 captain-adequate joined
jnthn back later & 15:46
dalek c: f80d844 | smls++ | lib/Type/Positional.pod:
Remove postcircumfix:<[ ]> documentation from /type/Positional

It's covered by /language/subscripts now.
15:49
c: d0e295b | smls++ | lib/Language/operators.pod:
solidify documentation of subscripts at /language/operators

The corresponding secions now provide a short overview / usage demonstration, and link to /language/subscripts for further details. Also moved up the .[ ] section so that all subscript operator sections are grouped together.
15:49 smls left
japhb tony-o: Thank you, but I actually meant the code for "siege" itself.
Where does that come from?
timotimo it's a tool
15:49 smls joined
timotimo apt-get'll have it 15:49
japhb Ah, fair enough. I can see the value in using a bulletproof client to test a server that is still being reinforced. 15:51
timotimo sure
smls "If you want your objects to respond to the call operator, you need to implement a method postcircumfix:<( )> ." -- from /language/operators 15:52
that's wrong now, isn't it?
timotimo right, we have CALL-ME now
smls right
dalek ast: aa3f208 | moritz++ | S17-supply/start.t:
Speed up S17-supply/start.t a bit more

sadly I was not able to get rid of sleep() entirely
15:53
ast: 7a53036 | moritz++ | S17-supply/start.t:
Get rid of another sleep in S17-supply/start.t

only one remaining
smls timotimo: And if one *were* to override the actual postfix, one would have to export a multi sub rather than implement it as a method, right?
timotimo not sure 15:54
15:54 EINVAL joined 15:55 kyclark left, virtualsue left 15:56 kyclark joined 15:57 yqt left
dalek c: 7a15fea | smls++ | lib/Language/operators.pod:
recommend CALL-ME instead of overloading postcircumfix:<( )>
15:59
16:03 ChoHag joined
dalek ast: 84b7f16 | moritz++ | S17-procasync/kill.t:
Avoid IPC to sleeping
16:03
ast: 5314d06 | moritz++ | S17-scheduler/times.t:
Don't need no sleep with CurrentThreadScheduler
16:05
16:09 EINVAL left
dalek c: f497cd4 | smls++ | lib/Language/operators.pod:
fix typo
16:11
16:15 mr-foobar joined 16:17 [Sno] left 16:18 Begi joined
b2gills ChoHag: Is this what you are looking for `for pairs -> ( :key($a), :value($b) ) { say $a, $b }` or `for pairs -> ( :$key, :$value ) { say $key, $value }` 16:20
smls m: for (a=>10), (b=>20), (c=>30) -> ( :$key, :$value ) { say "$key:$value" } 16:22
camelia rakudo-moar 0dcbba: OUTPUT«a:10␤b:20␤c:30␤»
smls Huh. How does that work? 16:23
timotimo it calls the "key" and "value" method, iirc
m: for "hi", "how", "are", "you" -> ( :$uc, :$tc ) { say $uc; say $tc }
camelia rakudo-moar 0dcbba: OUTPUT«(Mu)␤(Mu)␤(Mu)␤(Mu)␤(Mu)␤(Mu)␤(Mu)␤(Mu)␤»
timotimo oops
smls so how does a :foo parameter know whether it should unpack .<foo> or .foo() ?
timotimo it'll never unpack .<foo> i think 16:24
oh, hold on
that's about Associative vs not, i suppose?
smls smells fishy
Associative object have methods too... :P 16:25
Wouldn't it be better to have a separate syntax for method-based unpacking?
ChoHag It seems to be, but curiously despite apparently looping over the same items in the same way, the overall effect of the function is different. 16:29
16:29 brisby joined
jdv79 why doesn't this work as i expect?: gist.github.com/anonymous/2dd40701854756dc47a4 16:31
i just want a custom array type for the slot typing - otherwise an array 16:32
16:32 [Sno] joined 16:33 yqt joined, kyclark left, FROGGS joined 16:37 nys joined
timotimo m: gist.github.com/anonymous/2dd40701854756dc47a4 16:37
camelia rakudo-moar 0dcbba: OUTPUT«1␤A<139755513461576>␤A.new␤»
16:38 telex left, kyclark joined 16:39 Begi left, zakharyas left 16:40 telex joined, kyclark left
jdv79 oh, i forgot to apply the subset but the intent is there. that part works anyway. 16:42
timotimo mhm, i was wondering about that
i don't know what's wrong about that
16:43 kyclark joined
timotimo the submethod BUILD seems superfluous 16:43
jdv79 but Str, join, elems should all work as an array, right?
i was told its necessary to set a private attr via a constructor
and that part works ^H
timotimo no good results for "handles" in the design docs google search 16:44
jdv79 design.perl6.org/S12.html#Delegation 16:45
timotimo Wildcard matches are evaluated only after it has been determined that there's no exact match to the method name anywhere in this object or in any of its parents.
since Any gives you Str, join and elems ... yeah
jdv79 oh... 16:46
timotimo so you may want "handles Positional"?
jdv79 that doesn't work 16:47
timotimo If instead you want to delegate completely and utterly, including a search of the delegate for its own fallback methods, with abject failure if the delegate can't handle it, then use the "HyperWhatever" instead:
jdv79 inherriting from Mu does
wonder if that's bad in any way
timotimo yeah, it is
the great majority of parameters and variables and such are constrained to at least Any
16:47 pmurias left 16:48 diana_olhovik joined
lizmat moritz: are we sure it is wise to test some async features with other async features, such as Channel? 16:48
jdv79 that doesn't work either
:(
TimToady handles Positional makes a lot of sense, someone should make it work
jdv79 bug that? 16:49
timotimo bbml
TimToady especially since the methods supplied by a role are known at compile time, so it's no longer in wildcard status (and performance) 16:50
moritz lizmat: better than testing with sleep, IMHO 16:51
TimToady basically, if an entry in the list is a role instead of a string, we should slip in the methods of the role there
moritz lizmat: and we use promises anyway
lizmat feels wrongish to me, but if it makes you happy :-) 16:52
moritz well, the problem with sleep is that it carries at lot of assumptions 16:54
jdv79 is there a workaround for now? as in, is there a way to get a list of all methods of self and parents recursively?
moritz for one, sleep($n) is always "sleep at least $n seconds"
jdv79 easily i mean. 16:55
moritz so if you have two sleep($n), you have no guarantuee that they sleep roughly the same time
16:55 Begi joined
jdv79 like moose's $metaclass->get_all_methods 16:56
lizmat moritz: hmmm... 16:57
moritz jdv79: for $obj.^mro -> $class { say $class.^methods(:local) }
lizmat: also, it's sort of slow with sleep
lizmat yeah, *that* I agree with :-) 16:58
17:00 kyclark left 17:02 bronco_creek joined
bronco_creek .tell jnthn It looks to me like there is a mis-matched ")" at the end of line 72 in gist.github.com/jnthn/aa370f8b32ef98e4e7c9 17:08
yoleaux bronco_creek: I'll pass your message to jnthn.
17:12 domidumont joined
Begi Oh, a new page on the doc ? doc.perl6.org/language/subscripts Thanks ! :) 17:14
17:16 domidumont left, kaare_ left 17:17 domidumont joined 17:19 domidumont left
jnthn From backlog: I think the supply tests should be done in terms of a test scheduler with virtualized time, like we do with Rx tests, which removes the slowness and fragility. We just don't have a test scheduler like that implemented yet. 17:26
yoleaux 17:08Z <bronco_creek> jnthn: It looks to me like there is a mis-matched ")" at the end of line 72 in gist.github.com/jnthn/aa370f8b32ef98e4e7c9
17:27 kaare_ joined
jnthn bronco_creek: So there is :) 17:28
bronco_creek: Fixed, thanks.
Also about how the unpacking works: it calls .Capture on the incoming argument 17:29
A Hash fills the Capture's named part with its things
An object looks through it's attributes taht have accessors and uses that to populate named slots
dalek c: bdd43d9 | smls++ | lib/Language/subscripts.pod:
subscripts#Slices: improve clarity; document Zen & Whatever slices
17:30
17:31 rindolf left 17:33 kaare_ left
TimToady jnthn: hate to say it, but a 2000 line file is not a "gist" anymore, and makes it hard to follow diffs, unless there's some mechanism I don't know about... 17:34
17:34 espadrine left, kaare_ joined 17:35 lucasb joined
jnthn TimToady: You're aware of the Revisions tab? 17:36
On the right?
17:37 brisby left
jnthn gist.github.com/jnthn/aa370f8b32ef.../revisions if you don't find the link 17:38
lucasb If the GLR is going to ship in August, then why not merge it now, or at least put it in a branch. The details can be fixed after this :D 17:41
jnthn++, I'm just eager to have the new semantics :) 17:42
leedo TimToady: jnthn iirc you can actually clone a gist with git 17:44
17:44 kyclark joined
jnthn leedo: Yes, I knew that, but good to mention...TimToady++ may prefer to read diffs that way. 17:45
lucasb: There's nothing in a mergeable state yet 17:46
17:46 rindolf joined
jnthn lucasb: As to "why not in a bracnh", because the moment this code goes into CORE.setting my development velocity on it will be slower due to build times. 17:46
lucasb: It's not quite a the point where the cost/benefit supports moving development to a Rakudo branch yet. 17:47
Expect we'll be at that point around the weekend.
lucasb jnthn: ok, thanks to explain and thanks for the GLR, jnthn++
nwc10 jnthn: so, in the context of the GLR - Is it Friday? 17:48
17:51 yqt left
jnthn Well, just 'cus the branch may well exist on Friday doesn't mean it'll survive the build... :) 17:51
dinner's ready &
RabidGravy of course it's Friday 17:55
ugexe seem to have hit a strange bug on osx where i get `await $promise; say $promise.perl` showing $promise as planned (its not waiting). if i do `$promise.result; await $promise; say $promise.perl` it shows the promise as Kept after properly awaiting. 17:56
17:56 [Sno] left, [Sno] joined
TimToady okay, didn't see the revisions tab because I blow up the text on the left to fill my screen, because the blamed contrast is so low with light gray letters on white 17:59
will definitely clone it :)
17:59 araujo left
mst TimToady: the only thing that isn't versioned in github is issues and PRs 18:01
18:02 kyclark left
TimToady well, chalk it up to youthful ignorance :) 18:06
dalek ast: d2d4f7a | usev6++ | S32-exceptions/misc.t:
Add test for RT #125754
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125754
18:08 Begi left
jnthn ugexe: That sounds horribly like a condvar spurious wake-up...and I *think* Promise uses condvars... 18:09
ugexe: Please RT it 18:11
18:11 spider-mario left
mst TimToady: the hilarious thing then being that if somebody mis-edits an issue text the old version is permanently lost 18:16
TimToady: the irony ... is palpable
lucasb Is there something like 'sub f(&c is thunked)', where in 'f(EXPR)', EXPR will not be evaluated at function call time, just when I call it inside my sub? 18:18
jnthn That's what a macro is for 18:19
lucasb I know I could explicit pass a block as argument. This is just for syntax sugar.
18:22 yqt joined 18:25 domidumont joined, jkva joined
lucasb I try playing with macros for a bit... 18:26
jnthn lucasb: Yeah...I'm afraid they're a bit fragile so far, though :( 18:27
18:30 TEttinger joined
ChoHag What's the canonical mechanism to create a coderef? my $foo = sub { ... } as before, or doing something fancy with one of the new classes? 18:32
And on a related note, can multi subs be associated with a single coderef? 18:33
hoelzro ChoHag: you can also do -> { .. } (ex. my $foo = -> { ... }) 18:35
18:35 domidumont left
hoelzro the arrow is optional if you want to allow implicit params like $_ and $^param 18:35
hoelzro .oO( I wonder why → isn't allowed as a block-introducing arrow? )
ChoHag Too many arrows in unicode?
hoelzro ChoHag: and what exactly do you mean by associating a single coderef with multi subs? 18:36
could you provide an example
?
gfldex m: my $a = multi sub { 2 }; say $a();
camelia rakudo-moar 0dcbba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oluhhU4wvD␤An anonymous routine may not take a multi declarator␤at /tmp/oluhhU4wvD:1␤------> 3my $a = multi sub { 2 }7⏏5; say $a();␤ expecting any of:␤ horizontal whitespace␤ …»
gfldex std: my $a = multi sub { 2 }; say $a();
camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
hoelzro ah, now I see
ChoHag Something like $s = multi sub (Str $a) { ... } | multi sub (Int $a) { ... };
jnthn No, though you can exploit do and lexical scoping to get pretty close I guess 18:37
$s = do { multi x (Str $a) { ... }; ...other multis...; &x }
ChoHag Should probably be made possible in perl 6.something. 18:38
gfldex m: my &a = sub { 2 }; say &a(); my Callable $b = sub { 3 }; say $b();
camelia rakudo-moar 0dcbba: OUTPUT«2␤3␤»
gfldex two ways to be explicit
ChoHag jnthn: Will the symbol x be confined to the do block? 18:39
jnthn ChoHag: Yes
ugexe filed an RT. not able to reproduce an example outside of the entire program, but included a (hopefully) relative snippet 18:46
18:53 captain-adequate left
ChoHag How (in apply_handles in an attribute trait role) can I add a private method? 18:53
moritz ChoHag: doc.perl6.org/type/Metamodel::Priva...ate_method 18:54
ChoHag The naïve answer is wrong: $pkg.^add_method("!foo", sub { ... });
Ah there it is.
Might not be a terrible idea to warn that method names passed to add_method with an initial ! don't do what you think. 18:55
moritz ChoHag: doc patches very welcome! 18:56
(the methods themselves shouldn't warn; it's the MOP, not end-user facing) 18:58
ChoHag I've added a simple (for now) private method but obviously shouldn't be using the mop to get an attribute's value as it's obstinately read-only (Cannot modify an immutable Int): $pkg.^add_private_method("foo", sub ($instance:) { my \r = $att.get_value($instance); say "something"; return-rw r; }); 19:02
How should I correctly get the value?
moritz I think you need to declare the routine itself as rw too 19:03
sub ($instance) is rw { ... }
ChoHag I tried that.
moritz maybe look at how rakudo auto-generatres RW accessors? 19:04
ChoHag And again just now, because it's late and I'm forgetting what I did. 19:05
moritz should be in BOOTSTRAP.nqp (not sure though)
jnthn In Attribute class, iirc
ChoHag It does something big and ugly with nqp in core/Attribute.pm
jnthn I think "is rw" and return-rw must be paired though
Or just use the "fall off the end" return appraoch inside an is rw
ChoHag ... remains immutable. 19:06
moritz ah, it uses nqp::getattr
it's probably get_value that decontainerizes
19:06 diana_olhovik left
ChoHag I think copying from Attribute.pm may be the way to go :/ 19:06
19:06 rindolf left
jnthn If get_value does it wants fixing... 19:06
grr, it does as well 19:07
ChoHag Yay! Stumbled into another bug!
moritz well, it says get_*value*, not get_container
jnthn True
moritz maybe a separate get_container method would work
jnthn I still thing it's probably more useful if it's rw though
Hm, or that
Though there's only one set_value
ChoHag Both would be logical. 19:08
It's the mop after all.
Does a set_container make sense? 19:09
19:12 mohij joined, estrabd left, spider-mario joined
moritz not really, set_value already binds 19:13
(yes, it's mis-named) 19:14
19:14 jkva left
bronco_creek jnthn: You're welcome. Thanks for the excellent notes on the GLR. 19:14
19:19 skids left 19:24 bronco_creek left 19:25 nowan joined 19:28 jjido joined, nowan_ left 19:29 domidumont joined
jnthn The GLR gist is now updated with code/tests for lazy loop/while/repeat stuff 19:30
(modulo labels and phaser calls, but hey, we didn't have lazy loops at all so far, so there's no big hurry on them)
Didn't do the "receives the conditon" form of them yet either, but again, can come later 19:31
smls "we didn't have lazy loops at all so far" - we didn't? 19:34
ChoHag Then how about set() and get()/get():container (or get()/get():value)
DrForr Oi. What's the accepted way to remove a key from a hash? There's no obvious assignment and 'delete' and 'remove' don't show up in the online help.
ChoHag Anyway I'm both too new to perl 6 to have an informed opinion and going to bed.
%hash<key>:delete 19:35
DrForr Ah, an adverb. Right. Maybe we should add those to online help somehow?... Also, thanks :) 19:36
19:36 ChoHag left
smls m: say (lazy for ^5 { say "for"; $_ }).map({ say "map"; $_ }) 19:36
camelia rakudo-moar 0dcbba: OUTPUT«for␤for␤for␤for␤for␤map␤map␤map␤map␤map␤0 1 2 3 4␤»
smls ok then :P
tony-o but finally, right click in cmd pastes..only took 30 years
[Coke] DrForr: docs.perl6.org -> language -> search "delete" -> subscript adverb :delete 19:37
smls DrForr: I documented it at doc.perl6.org/language/subscripts#:delete just this week :P
theoretically, they should show up in the search
DrForr The search is broken under Opera. Hrm.
jnthn smls: I quite clearly was meaning that in the context of loop/while/repeat
smls DrForr: It's broken for be in Firefox too 19:38
DrForr (could no longer stand FF taking up 90% RAM just for a second.) 19:39
smls the live version, that is. In my local checkout on 127.0.0.1:3000, it works...
tony-o i was under the impression that opera dev had stopped 19:40
[Coke] please open issues for borked browsers, we'll see what we can do.
firefox at least.
tony-o works on chrome 19:41
[Coke] tony-o: opera had a release -yesterday- :)
smls DrForr: Here's what I get locally when I enter "delete" in the search box: i.imgur.com/vrhv9Li.png
19:42 khw left
DrForr Nod. Adverbs themselves don't appear to be documented directly, there's another issue.. 19:43
19:43 khw joined
smls They are documented as subsections on language pages, and marked with POD syntax so that they show up in the search. 19:44
jnthn TimToady: I'm figuring the return types of hyper/race are Seq, and the moment you pull-one it kicks off the parallel work, assuming it can work ahead and produce everything into a buffer that future pull-one calls eat from (and if we get clever later, push-exactly and friends can do smarter stealing from the buffer)
DrForr I didn't see them in the Hash documentation online.
smls DrForr: Also, sub/method/operator entries tend to list their supported adverbs, in this case: doc.perl6.org/language/operators#po...cumfix_{_} 19:45
jnthn TimToady: I'm also wondering, in connection with my "does lazy just set the infinite flag", if we'd be better off dropping the whole "known infinite" thing and instead talk about "forced lazy"
TimToady: Which fits very nicely with things like array assignment evaluating up to the first "forced lazy" thing
19:45 jkva joined, khw left
smls DrForr: That's because it's npot provided by hash, it's provided by postcircumfix { } which is a generic interface (i.e. Hash is just one of the things that use it.) 19:45
jnthn TimToady: It'd actually work the same as I have it now, it's just a conceptual rename that feels clearer in semantic intent to me 19:46
smls DrForr: Which is not to say that the documentation for Hash couldn't mention it and demonstrate it with an example. 19:47
tony-o i don't even get a search bar on FF..a jquery issue
jnthn TimToady: eager would also then give a Seq that evaluates/buffers the lot on first pull-one, makes push-until-infinite mean push-all, and if you are doing push-all anyway then it skips the whole buffering thing (and it counts as a useless use of eager) 19:48
(though we don't have to whine)
I think this is the first time I've understood how to implement eager/lazy in a sane way :)
[Coke] tony-o: please open a ticket with a stack trace if possible. 19:49
DrForr Well, at the least a pointer to the {} circumfix operator and an explanation that this is where *other* things that can be done to hashes are would be a great help.
19:49 jkva left
jnthn TimToady: The things that default to known infinite today then can be said to default to born lazy. 19:49
tony-o looks like it's a problem with the way FF is loading jquery .. 19:50
jnthn As another data point, I don't have a single place yet where I care for "known finite".
[Coke] we need to remove the "async", I bet. 19:52
if the search.js returns first, it's run, even if jquery isn't done loading yet. 19:53
without something like require.js, we actually need it sync to insure it's loaded in the right order.
19:55 jkva joined
japhb Async loading of that search bar is probably a premature optimization anyway. 19:55
jnthn: Yes, forced/born-lazy smells much less than known-infinite to me. 19:56
[Coke] er, search on ff does work for me consistently on the Language page, but not on the main page. 19:57
so it might be something else. Iunno.
jnthn japhb: Thanks :) 20:00
Hm, now that I ponder hyper/race on map (the obvious place to start)
Seems that "next" is about impossible to define
And "last" is do-able but you need to pick your semantics (should we take care to continue processing everything up to the "last", or call off the whole show) 20:01
japhb is tickled pink to discover that the way to fix his 6-month old bitrotted Perl 6 code is to *remove workarounds for old Rakudo bugs*
RabidGravy :) 20:02
jnthn Oh, actually, the "last" thing probably is a hyper/race distinction perhaps.
Yes, that works quite naturally. 20:03
So I guess we just need to decide what "next" with hyper/race is going to mean 20:04
Oh, and maybe it's not even a problem
'cus it really just means "I'm not producing a value this thing"
So it doesn't matter if the actual "next" item has already been handled on another thread. 20:05
Given I'm barely clever enough to think about this stuff at the moment, I should probably defer implementing it :P
20:06 shinobi-cl left
TimToady was born lazy... 20:06
jnthn Anyway, there's a brain dump of things to ponder until Friday's GLR hacking :)
(Tomorrow is the one day of the week I'll spend some time caring about a $dayjob thing) 20:07
20:09 mohij_ joined 20:10 meisl joined, mohij left 20:12 domidumont left
japhb
.oO( I exemplified all three great programming virtues *before I even started programming*! )
20:12
jnthn++ # Seriously, you've been kicking ass even compared to your usual output 20:13
jdv79 is there a way to negate a rule? 20:14
moritz jdv79: yes, <!foo>
though note that it doesn't consume any characters
jdv79 i tried <!FooBar::token> and no luck
so that's no good
moritz well, <!foo> .* 20:15
jnthn What kind of "no luck"? :)
Bad interaction between ! and FooBar::token maybe?
jdv79 i can't find the error atm
moritz jdv79: the problem is, what's the opposite of "match a number here". Is it "match anything that's not a number"? or "don't match if there's a number"? 20:16
jdv79 something like that
jnthn jdv79: Well, if you write token foo { <FooBar::token> } and the <!foo> and it works, you've found the culprit...
(I've no idea if there could be a bug there...it doesn't feel immediately likely from what I remember of how it's implemented...) 20:17
jdv79 all i really want to so is .subst all chars not matching a rule
jnthn How many chars does the rule match?
moritz s:g/<!foo>.//
TimToady I can see race in terms of push, but seems like hyper needs to know what offset in the target to install its values 20:18
jnthn <-foo> may do it
jdv79 ok
jnthn TimToady: I've thought of hyper rather more in terms of an ordering on what chunks you can push 20:19
TimToady: As in, "can't push things in chunk 2 until chunk 1's been done and pushed"
TimToady so you're copying each target
each chunk has its own initial target? 20:20
20:20 colomon left, jkva left
TimToady I guess that works out better, unless you have a lock-free target that everyone can write to at the right location 20:20
jnthn Well, for map we fill a fixed-size buffer with input values, workers grab one and process it inot an output buffer, and hands it back 20:21
Even if you have lock-free you're still needing to care for cache coherency.
TimToady makes one kinda want list ropes
well, seq ropes 20:22
well, whatever you call it
jnthn The way I've generally seen this stuff implemented elsewhere is chunking the work, though.
Which means for the period a thread is working on a chunk its not contending. 20:23
TimToady make sense from a caching perspective, yes 20:24
jnthn I suspect the bit of overhead of copying the result chunks to their final destination will be a lower cost than the contention we might get otherwise.
TimToady seems likely
I'm fine with the forced lazy rethink, btw
jnthn OK, nice. :) 20:25
That means I know how to do lazy :)
(the prefix)
TimToady well, it would be nice if you could stall a pipeline when it runs into something else it knows will be ready later, but isn't yet
20:25 jjido left 20:26 mohij joined
TimToady espcially if that's what is currently being calculated as the next value in a recursive sequence 20:26
20:26 jjido joined
TimToady well, maybe it's not really stalling, but forcing the pipeline lazy at that point 20:27
20:27 jjido is now known as Guest82660, mohij_ left
TimToady would like to have self-referential sequences, like Hamming, is all 20:27
or maybe an explicit lazy will help there 20:28
jnthn Do you have a golfed example of a self-referential sequence?
Maybe I should get lazy in place, though, and then you can try to write it :)
TimToady m: constant @foo = 1, @foo; say @foo 20:30
camelia rakudo-moar 0dcbba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/x4gb5fT7DP␤Variable '@foo' is not declared␤at /tmp/x4gb5fT7DP:1␤------> 3constant @foo = 1, 7⏏5@foo; say @foo␤»
TimToady m: my @foo := 1, @foo; say @foo
camelia rakudo-moar 0dcbba: OUTPUT«1 (Mu)␤»
TimToady something like that, though of course that's a terrible way to produce 1 xx * :) 20:31
jnthn Hmm
TimToady it may have more to do with when we create the name
jnthn That'd certainly need a "lazy"
TimToady and when we bind
the lazy bits really oughta work out, so I think it's that we lack a "definitional" = 20:32
anyway, sounds like what your doing should be close to what we need anyway 20:33
jnthn Oh, if it's going to work the way I'm imagining it maybe could it'd be my @foo = 1, @foo; so you actually are referencing yourself
uh, my @foo = 1, lazy @foo
20:33 mohij_ joined, mohij_ left
TimToady well, don't sweat it for now 20:33
jnthn That *may* mean lazy is also obligated to delay obtaining the iterator 20:34
*nod*
But it'd be cool if it worked :P
TimToady I'd always thought the negotiation should be outside the "get" bits
maybe that's a good argument for it 20:35
20:35 mohij left 20:36 Guest82660 left 20:37 colomon joined
TimToady is currently working on with/without 20:38
20:38 virtualsue joined
TimToady adding the syntax is trivial, but the compilation of conditionals is somewhat opaque 'cuz it dives down to very low-level stuff in various spots 20:40
20:43 darutoko left
jnthn if/unless are pretty primitive. 20:43
colomon imagined that as “when / whennot” for a second there…. (as in, working with given)
jnthn I don't immediately have a good idea of a shortcut way to implement it; defor (used for //) is also fairly low level 20:44
TimToady the statement modifier is just andthen backwards 20:45
lucasb m: say 'andthen'.flip 20:46
camelia rakudo-moar 0dcbba: OUTPUT«nehtdna␤»
TimToady the control is basically if with an extra .defined stuck in there before testing the boolean value, but then binding the original object in to the block
a design question, though, should we allow intermixing of when-based and if-based xblocks? 20:47
er, s/when/with/
jnthn TimToady: Yeah...tbh I'd probably just go and deal with it at the code-gen level (copy/paste QAST op if/unless compilation and hack it to do definedness checking too 20:49
TimToady that's what I have now, but that doesn't allow intermixing
jnthn Ah
Wait, how not? 20:50
TimToady with $x {...} elsif $y {...}
I'd have to do it the first way I tried, and $<sym>=[if|with]
jnthn elsif chains just become nestings
TimToady copy/paste of the grammar rule only lets you have all with or all if 20:51
20:51 Mhoram left
jnthn Is that not going to become a QAST::Op.new( :op('with'), $x, {...}, QAST::Op.new( :op('if'), $y, {...}, Nil )) (to handwave) 20:51
I didn't mean copy-paste the grammar rule :) 20:52
I meant copy-paste the stuff in the QAST -> VM level compiler
20:52 Mhoram joined
jnthn I don't think there's an elegant way to do it without introducing a new nqp::op 20:52
TimToady yes, once you get down to a consistent structure, it's not so much of a problem
20:52 skids joined
TimToady I was coming to that conclusion 20:52
No registered operation handler for 'without' 20:53
jnthn Right, that's the code-gen piece that'll need doing
The if/unless compilation lives in src/vm/moar/QAST/QASTOperationsMAST.nqp
TimToady but I don't think I can copy-paste the 'unless' code because it's very low level 20:54
well, I guess I copy the low-level stuff then
jnthn *nod*
If you don't want to re-compile NQP each time then you can paste/hack it in src/vm/moar/Perl6/Ops.nqp in the Rakudo repo 20:55
TimToady okay, I think that gives me enough to work with while you waste^Wspend your time on $dayjob :) 20:56
jnthn ;) 20:57
TimToady are you still only funded through Aug, or has more come in? 20:58
jnthn If I didn't have to waste my time on nobody implementing Schengen the way it was designed, I'd have had a decent few hours more this week too :/
TimToady: There's more, details to be announced soon, but we're safe for a while :) 20:59
TimToady we definitely want to keep you going, one way or another
jnthn *nod*
TimToady is very, very, very happy to see the progress on GLR 21:01
jnthn I'm very positively surprised how less of a hornet's nest it's been so far compared to what I feared, tbh.
21:01 MueThoS joined, kaare_ left
smls TimToady: S26 lists Damian Conway as the author of the POD6 spec, but you invented the original POD format right? Could you maybe comment on github.com/perl6/doc/issues/111 ? 21:02
21:02 FROGGS left
ShimmerFairy TimToady: at first I thought that with/orwith should be separate from if/elsif, but now I think it'd be more useful to mix defined-ness checks with boolean checks. (I can see an 'orwith' after a bunch of if/elsifs that says "do I have _anything_ to work with!?", for example) 21:02
smls jnthn++ # GLR work. I'm eager to try it (and update p6doc) once it has landed... :P
lucasb This new 'with' has 'if' semantics? What if I want 'while' to also work like that? Does a statement prefix like 'with if ...', 'with while ...' makes sense? 21:03
21:03 telex left 21:04 espadrine joined, telex joined
lucasb Also, reiterating yesterday's question, should the Index type be removed now, before aug release? 21:04
21:04 jjidoTEMP joined
TimToady yes, it should be removed, whatever kind of ifdef we end up with 21:05
'with' has ifdef semantics, but topicalizes on the original object pre .defined 21:06
ShimmerFairy smls: I imagine an X<> tag could be used as an anchor for links, or Pod::To::HTML could always provide its own helpful module for the M<> formatting code.
21:06 laouji left
smls ShimmerFairy: Could you add a comment to the issue to elaborate? 21:07
ShimmerFairy sure
smls thanks :) 21:08
21:08 MueThoS left 21:13 jjidoTEMP is now known as jjido, colomon left 21:15 rurban left
smls ShimmerFairy++ 21:18
ab5tract_ jnthn: the timings on `glr.p6 benchmark` are impressive, to say the least! 21:24
I had to hot onto IRC to show my appreciation :)
*hop
jjido hey, where did you see these benchmark results? 21:30
21:32 virtualsue left
jnthn ab5tract_: Yes, they're quite promising :) 21:33
ab5tract_ jjido: just wget the gist and run `perl6 glr.p6 benchmark` :) 21:34
jjido ab5tract_: reading... 21:35
jnthn perl6 --optimize=3 glr.p6 benchmark # fairer
ab5tract_ jnthn: will there still be a deepflat or such that dives into $[]
jnthn (Because you're comparing it against code compiled agaisnt --optimize=3, 'cus CORE.setting is) 21:36
ab5tract_: I'm...not sure there's a deepflat today? :)
ab5tract_: It would be really easy to implement one though.
ab5tract_ Well, I had some sense that it existed as a conceptual catregory
jnthn ab5tract_: Just depends if we want to actually have a deepflat or if we want to get people to write it in terms of some other more general operation 21:37
timotimo oh, i forgot to --optimize=3 all this time
jnthn I even wrote a comment about the MAIN benchmark sub suggesting it ;)
jjido jnthn: haha, maybe you want to rename "slip" (French for undies)
jnthn *lol*
That pretty much makes certain it stays :P
21:37 daxim_ joined 21:38 jkva joined 21:39 colomon joined, g4 left, daxim left
jjido www.google.fr/search?q=slip 21:39
I didn't put the Pictures parameter 21:40
jnthn damn damn damn why did I click images..
ab5tract_ jnthn: makes sense re: deepflat
21:40 g4 joined, g4 left, g4 joined
tony-o glad i clicked that at work 21:40
jnthn ab5tract_: I don't feel strongly on it to be honest 21:41
ab5tract_: I'm fine with implement a deepflat if it's going to be common enough
jnthn punts it to the language designer :)
ab5tract_ The thing is that this case comes up pretty often, and has often elicited hopeful mentions of the GLR: github.com/ab5tract/p6-playground/...-prefix.p6 21:42
21:42 jkva left 21:46 smls_ joined, smls left 21:47 lucasb left 21:49 smls_ is now known as smls
tony-o connection timeout working in http::server::async, working on pipelining and serializing output 22:03
RabidGravy yay!
smls I think "deepflat" is misleading, because the normal "flat" is already recursive.
What you seem to want, is a "flat that ignores containerization" 22:04
ShimmerFairy Not for GLR Arrays, since they enforce itemization
tony-o it's usable without pipelining currently, just use connection:close header
smls ShimmerFairy: I thought the opposite?
ShimmerFairy smls: [] is an Array that has Scalar containers for each element, () is a List that doesn't. In a post-GLR world, that is. 22:05
jnthn The grant report for last week's work: 6guts.wordpress.com/2015/08/05/thi...o-the-glr/
smls ShimmerFairy: that's also true now (except s/List/Parcel/) 22:06
22:06 meisl left
smls but [] will no longer itemize *itself* post-glr 22:06
tony-o is there a way to see what failed during build phase on the smoke.perl6.org site?
jnthn smls: We may want a better name, though I think the semantics of the operation desired are quite clear. 22:07
smls so (([2, 4], 6), ([3, 5], 7)).flat would have 6 elements.
jnthn: Yes.
jnthn smls: That one has 4 elements.
smls why?
jnthn Oh, wait...it has 6
:)
Sorry, confused some parens for square brackets 22:08
smls .flat(:all) maybe?
jnthn ([[2, 4], 6], [[3, 5], 7]).flat woulda had 4
smls yeah
jnthn :all isn't really any clearer than deepmap...
uh, deepflat
smls it's recursive, it just respects things that say "don't flatten me". 22:09
TimToady I foresee some variants to flatten subsets or supersets of .flat
jnthn .flat(:items) or .itemsflat or .flatitems or so...
smls so we shouldnh't give the impre4ssion that it's not recursive
jnthn *nod*
tony-o where is smoke.perl6.org getting it's info?
ShimmerFairy
.oO( @array.reallyflat )
jnthn .steam-roller
ShimmerFairy .paper-thin 22:10
hoelzro tony-o: I believe it runs the tests by itself
every so often
smls .flattt
hoelzro just noticed his warnings patch worked o/
tony-o what OS, do you know? i have a bunch of modules failing that are passing locally
jnthn Anyway, I should get me some rest...only managed 4ish hours of decent sleep last night... 22:11
'night, all o/
tony-o most of them with 'B' problems ..
hoelzro tony-o: not sure, but I'm guessing a Linux of some sort
tony-o they all build fine with zef
hoelzro tony-o: I can try one out on my box if you'd like
tony-o if you don't mind, github.com/tony-o/perl6-data-dump
smls .flat(:items) does not seem so bad actually
ShimmerFairy jnthn o/
tony-o that one is failing for tests
.each ? 22:12
ShimmerFairy smls: my only concern with .flatitems or however you'd spell it is that it could imply _just_ items, instead of 'flat + items'. I'm not sure how much of a real concern that is, however :)
timotimo hmm, will we have something like car, cdr, cddr, cdddr? 22:13
flat, flatt, flattt, flaat, flaatt, flaattt, ...?
tony-o super-flat 22:14
would be enjoyable to write
hoelzro tony-o: Works on My Machine™ 22:15
tony-o thanks hoelzro
TimToady $list.recurse(any(Seq,List,Array,Scalar), *.slip)
hoelzro np
tony-o .slip.fr.google.images
timotimo .slip.haha-get-it 22:16
tony-o isn't there another smoke site for p6 modules?
one with logs
ShimmerFairy TimToady: hmm, I wonder if we couldn't have some kind of .derotor method.
ugexe testers.perl6.org 22:17
tony-o ty
ugexe not accepting new reports though. that seems to be down
timotimo ShimmerFairy: hm, what if you generate indices via rotor and index into the rotored thing via that?
ShimmerFairy timotimo: Not sure. I just thought that .derotor would be a good name for "flatten this list" in the way that .rotor un-flattens lists :) 22:18
timotimo oh 22:19
i thought you meant primarily the "move back and forth" thing
ab5tract_ I
c 22:20
ad
oops :(
fwiw, the idea of .flat having some adverbs sounds like the cleanest way 22:21
.flat :recurse 22:22
ShimmerFairy My thought was perhaps something like method derotor(Int $levels, Positional *@types-to-derotor) as a first idea. (Though if it existed its args should probably be more similar to rotor's) 22:23
I'll certainly have to figure out what .derotor would look like, because now I'm interested :)
ab5tract_ tony-o: ++super-flat; # love the art style of the same name :) 22:25
timotimo hmm 22:26
a propellor is kind of a rotor ... and an impellor is the opposite of a propellor ...
Sgeo How does .list cause list context? 22:27
timotimo sneakily
Sgeo m: sub foo(*@args) { .say for @args; }; my $f = (1,2,3); foo $f; foo $f.list; 22:28
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3␤1␤2␤3␤»
Sgeo How is $f different from $f.list ? 22:29
dalek kudo-star-daily: 1689e8d | coke++ | log/ (9 files):
today (automated commit)
22:29 pochi left 22:30 pochi joined
timotimo in $f there's still the scalar container that gets inspected by "for" 22:30
22:31 smls_ joined
RabidGravy Hmmm 22:31
22:31 smls left 22:32 pippo joined
pippo o/ #perl6 22:32
RabidGravy anyhow I think that's enough of today
toodlepip
22:33 yqt left, yqt joined
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a»[0,2]; 22:33
camelia rakudo-moar 0dcbba: OUTPUT«2␤»
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a[*]»[0,2];
camelia rakudo-moar 0dcbba: OUTPUT«2␤»
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a[*]»[0];
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3␤»
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a[*]»[2]; 22:34
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3␤»
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a[*]»[0;2];
camelia rakudo-moar 0dcbba: OUTPUT«2␤»
pippo m: my @a = [1,2,3;1,2,3;1,2,3]; say @a[*]»[*-1];
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3␤»
ShimmerFairy timotimo: I think the best choice for name would simply be to reverse the name 'rotor' (...wait.) 22:35
pippo Anybody knows how can I get the first and last column at same time? »[0,2] does not work.
22:35 pdcawley_ left
timotimo :D 22:35
22:36 g4 left
ShimmerFairy m: my @a = (1,2,3;4,5,6;7,8,9); say @a[0,2] 22:36
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3 7 8 9␤»
22:36 g4 joined
ShimmerFairy m: my @a = (1,2,3;4,5,6;7,8,9); say @a[0,2;*] # more explicit 22:36
camelia rakudo-moar 0dcbba: OUTPUT«1 2 3 7 8 9␤»
pippo ShimmerFairy: Thank you very much. 22:37
ShimmerFairy pippo: it's helpful to remember not to wrap literals arrays like that with [] when assigning to a @var . With your example, you would've needed @a[0][0,2] to make it work. 22:38
(It also trips you up when assigning a piece of a multi-dim array, so @b = @a[0] would've cause @b[0] to hold @a[0], which is likely not what you intend there) 22:39
pippo ShimmerFairy: OK. Thank you.
ShimmerFairy um, nvm, I think that @b = @a[0] trip-up only happens with certain kinds of @a :)
m: my @a = [1,2,3],[1,2,3],[1,2,3]; my @b = @a[0]; say @b.perl; # this kind of @a :) 22:40
camelia rakudo-moar 0dcbba: OUTPUT«[[1, 2, 3]]<>␤»
22:45 mr-foobar left
pippo ShimmerFairy: Sorry but I got a little confused. I need to get 1,4,7 and 3,6,9 from your example. I.e. I need the columns and not the rows. 22:47
ShimmerFairy ah, lemme see
pippo m: @a = (1,2,3;4,5,6;6,7,8); @a[*]»[0]; 22:48
camelia rakudo-moar 0dcbba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fdYNQHanX9␤Variable '@a' is not declared␤at /tmp/fdYNQHanX9:1␤------> 3<BOL>7⏏5@a = (1,2,3;4,5,6;6,7,8); @a[*]»[0];␤»
pippo m: my @a = (1,2,3;4,5,6;6,7,8); @a[*]»[0];
camelia ( no output )
pippo m: my @a = (1,2,3;4,5,6;6,7,8); say @a[*]»[0];
camelia rakudo-moar 0dcbba: OUTPUT«1 4 6␤»
pippo ^^ this is the first column.
m: my @a = (1,2,3;4,5,6;6,7,8); say @a[*]»[0,2]; 22:49
camelia rakudo-moar 0dcbba: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/WXYV9Tfwrv:1␤␤»
ShimmerFairy m: my @a = (1,2,3;4,5,6;7,8,9); say @a[*;0].perl; @a[*;2].perl;
camelia rakudo-moar 0dcbba: OUTPUT«(1, 4, 7)␤»
ShimmerFairy m: my @a = (1,2,3;4,5,6;7,8,9); say @a[*;0].perl; say @a[*;2].perl;
camelia rakudo-moar 0dcbba: OUTPUT«(1, 4, 7)␤(3, 6, 9)␤»
pippo m: my @a = (1,2,3;4,5,6;6,7,8); say @a[*]»[0;2]; 22:50
camelia rakudo-moar 0dcbba: OUTPUT«Cannot modify an immutable Int␤ in block <unit> at /tmp/482M7HNaBj:1␤␤»
ShimmerFairy I don't think we're magical enough to get the columns when you try [*;0,2] though :( (and I don't know if it's supposed to be that magical)
m: my @a = (1,2,3;4,5,6;7,8,9); say @a[*;0,2].perl;
camelia rakudo-moar 0dcbba: OUTPUT«((1, 3), (4, 6), (7, 9))␤»
pippo ^^ that is wonderful!! 22:51
22:51 mr-foobar joined
ShimmerFairy pippo: oh, you wanted the columns separated per row? ok then! :) 22:51
pippo Yes yes !!! :-)) 22:52
Thank you.
ShimmerFairy (if you want the columns as a list of its own, then you'd need to do it one at a time like I showed before)
you're welcome :)
pippo though I do not understand what the '*' means in @a[*;0,2]
No I think I got it now. 22:53
:-))
ShimmerFairy It's the same ol' Whatever that shows up in lots of places. In this context it means "all the things in this dimension" :) 22:54
pippo ShimmerFairy: Thank you again and have a good night. :-) 22:56
o/
22:56 pippo left 22:57 pecastro left 22:59 Khisanth left 23:07 Khisanth joined
timotimo i ought to get some sleep, too. tomorrow'll be a car day 23:26
23:37 smls_ left 23:39 jkva joined 23:43 jkva left 23:58 RabidGravy left