»ö« 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! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:14 jack_rabbit left 00:17 gfldex left 00:26 airdisa left 00:27 airdisa joined 00:31 jack_rabbit joined, airdisa left 00:37 J-L left 00:38 telex left 00:40 telex joined 00:52 eli-se left 00:55 yqt left 01:00 tinyblak left, tinyblak joined 01:01 tinyblak left 01:14 firefish5000 joined 01:27 airdisa joined 01:28 rararara_ left 01:41 airdisa left
dalek ast: 7f30b11 | TimToady++ | S (2 files):
test that HLL's EXPR requires term after infix

Otherwise rakudo's grammar says "Bogus statement", which is one.
01:42
p: c982045 | TimToady++ | src/HLL/Grammar.nqp:
EXPR must require term after infix
01:47 maui_ left
dalek kudo/nom: 082198f | TimToady++ | tools/build/NQP_REVISION:
bump NQP rev
01:48
kudo/nom: cdde8b9 | TimToady++ | src/Perl6/Grammar.nqp:
simplify "expected" listings

There's no reason to confuse the user with "or meta", and prefixes were listed redundantly.
kudo/nom: 3de8d9e | TimToady++ | src/Perl6/World.nqp:
various error message tweaks

Copy "Strange text after block" message from STD. Sort the expecteds so that 'infix' comes before 'infix stopper'. Don't put eject before space on unexpected closing bracket. And actually detect the unexpected bracket if there's intervening whitespace, oops.
01:55 travis-ci joined
travis-ci Rakudo build passed. TimToady 'various error message tweaks 01:55
travis-ci.org/rakudo/rakudo/builds/56177362 github.com/rakudo/rakudo/compare/f...e8d9ed5ebe
01:55 travis-ci left 01:57 Rounin left 02:01 tinyblak joined 02:06 tinyblak left
TimToady m: 42 + 02:20
camelia rakudo-moar fb991b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dnhFnTeC9v␤Bogus statement␤at /tmp/dnhFnTeC9v:1␤------> 0342 +7⏏5<EOL>␤ expecting any of:␤ prefix or term␤ prefix or meta-prefix␤»
TimToady m: class {} say "oops" 02:22
camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dWoH4Bh7vx␤Strange text after block (missing semicolon or comma?)␤at /tmp/dWoH4Bh7vx:1␤------> 3class {}7⏏5 say "oops"␤ expecting any of:␤ infix␤ infix stopper␤ state…»
02:22 silug joined
TimToady m: 42 + 02:22
camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8gk95ZI4fS␤Missing required term after infix␤at /tmp/8gk95ZI4fS:1␤------> 0342 +7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
TimToady there we go
m: 42 [ 02:24
camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GEEB_WU7hU␤Two terms in a row␤at /tmp/GEEB_WU7hU:1␤------> 0342 [7⏏5<EOL>␤ expecting any of:␤ bracketed infix␤ infix␤ infix stopper␤»
TimToady hmm, that's not quite right
dalek kudo/tab-completion: f929b94 | hoelzro++ | src/Perl6/Compiler.nqp:
Use a list of sorted items to track completions

  ...instead of a hash. The advantage here is that we can offer a sorted
list of completions, rather than providing them in seemingly random order.
02:26
TimToady m: 42 «
camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1ghdh1enQo␤Two terms in a row␤at /tmp/1ghdh1enQo:1␤------> 0342 «7⏏5<EOL>␤ expecting any of:␤ infix␤ infix stopper␤»
TimToady std: 42 « 02:27
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Confused at /tmp/vOeayhHhSU line 1:␤------> 0342 «7⏏5<EOL>␤ expecting infix or meta-infix␤Parse failed␤FAILED 00:00 136m␤»
TimToady std: 42 «; 02:29
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Confused at /tmp/WQ5x3YvKIn line 1:␤------> 0342 7⏏5«;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infix_circumfix_meta_operator␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:00 135…»
TimToady m: 42 «;
camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/61McuFfNiy␤Two terms in a row␤at /tmp/61McuFfNiy:1␤------> 0342 «7⏏5;␤ expecting any of:␤ infix␤ infix stopper␤»
02:32 firefish5000 left 02:40 raiph left 02:46 jack_rabbit left 02:47 [particle]1 left 02:59 raiph joined 03:00 larion left 03:01 larion joined 03:04 noganex_ joined 03:07 noganex left 03:09 larion left 03:11 laouji joined 03:15 dustinm`_ left 03:17 dustinm` joined 03:18 Patterner joined 03:22 Psyche^ left 03:24 airdisa joined 03:29 airdisa left 03:32 larion joined 03:41 adu joined 03:49 adu left 03:53 laouji left 03:57 sirdancealot left 04:03 FROGGS_ joined, raiph left 04:06 FROGGS left 04:07 Sqirrel left 04:17 sirdancealot joined 04:24 BenGoldberg left 04:25 BenGoldberg joined 04:27 Sqirrel joined
dalek ast: d18ca09 | skids++ | packages/Test/Compile.pm:
Add Test::Compile for convenient quicky tests of precompilation problems

   Please confine use of this module to integration/precompiled.t for now
   (integration/precompiled.t to follow in next commit)
04:28
ast: b98d853 | skids++ | integration/precompiled.t:
Add integration/precompiled.t as a testing ground for Test::Compile.

   Add test for RT #124162 using Test::Compile
   Please someone with an operational niecza fudge as needed.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124162
04:29 raiph joined 04:40 xinming left 04:41 xinming joined, raiph left 04:45 raiph joined 04:53 raiph left 05:13 airdisa joined 05:18 airdisa left 05:23 tinyblak joined
dalek kudo/nom: 6f0153a | TimToady++ | src/Perl6/ (2 files):
better message where infix is required
05:33
ast: bfc8371 | TimToady++ | S02-lexical-conventions/minimal-whitespace.t:
missing infix is now missing, not confused
05:34 jack_rabbit joined 05:36 MegaDork joined 05:37 MegaDork left 06:04 jack_rabbit left 06:07 BenGoldberg left 06:08 demayl left 06:32 diana_olhovik_ joined 06:41 gfldex joined, myp left 06:42 skids left, rindolf joined 06:44 airdisa joined 06:49 airdisa left 06:53 rindolf left 07:00 mr-foobar left 07:03 xprime joined 07:04 prime left 07:17 diana_olhovik_ left 07:22 FROGGS_ is now known as FROGGS
FROGGS moritz: I just read that hack needed a power off just yesterday... 07:22
moritz: and guess what, I enabled a second cronjob just yesterday morning or the day before that 07:23
moritz FROGGS: could you disable it again, and wait for a few days? 07:25
FROGGS moritz: already did 07:26
moritz FROGGS: thanks 07:28
moritz hopes he can do some doc hacking today
dalek c: 12ec453 | moritz++ | lib/Language/variables.pod:
Add TODO markers

so that a "git grep TODO" detects that there is something to do in this file
07:31
moritz my: my $x := anon $y; say $x.^name 07:39
m: my $x := anon $y; say $x.^name
camelia rakudo-moar 6f0153: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zCvgo4Vad1␤anon scoped variables not yet implemented. Sorry. ␤at /tmp/zCvgo4Vad1:1␤------> 3my $x := anon $y7⏏5; say $x.^name␤ expecting any of:␤ constraint␤»
dalek c: 5be43cf | moritz++ | lib/Language/variables.pod:
Document "has" (sortof) and "anon" declarators
07:47
p: 24b7c8d | FROGGS++ | tools/build/MOAR_REVISION:
bump moar for windows repl fixes
07:53
kudo/nom: d235574 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp@moar for windows repl fixes
07:58 tinyblak left 07:59 diana_olhovik_ joined 08:09 sirdancealot left 08:11 tinyblak joined
dalek c: 2938da9 | moritz++ | lib/Language/variables.pod:
Document the augment declarator
08:13
08:15 darutoko joined 08:32 airdisa joined 08:33 RabidGravy joined 08:35 xfix joined 08:38 airdisa left 08:54 [Sno] left 09:00 rindolf joined 09:07 aborazmeh joined, aborazmeh left, aborazmeh joined 09:29 eli-se joined
eli-se hi 09:35
09:43 gfldex left 09:45 Rounin joined 10:21 airdisa joined 10:26 airdisa left 10:36 gamo joined
jnthn morning, #perl6 o/ 10:37
gamo What is the proper extension to perl6 scripts?
moritz gamo: well, either no extension at all, or one <pl pl6 p6> 10:38
gamo: in general, the user of a program doesn't care what language the program is implemented in, which favors leaving out the extension
gamo ok
jnthn Well, the extension is more useful on Windows where there is not shebang :) 10:39
Or at least, no interpretation of it...
10:40 Perl6_newbee joined
gamo What combination of keys give me the word boundaries <<>> instead of ""? 10:40
bartolin_ for those who take a look when hack.p6c.org becomes unresponsive again: log messages from hack are send to the rsyslog daemon at www.p6c.org and are there written to /var/log/hack.p6c.org/all_log.log. 10:42
So that's a place to look when the problem occurs the next time.
jnthn gamo: Depends... en.wikipedia.org/wiki/Guillemet#Typ..._computers 10:44
gamo In Linux 10:45
«» 10:47
ok, it's Alt Gr + z and ALT GR + x 10:48
thank you very much!
10:52 larion left 10:53 espadrine joined 11:00 aborazmeh left 11:06 itz_ joined 11:09 itz left
RabidGravy can someone point me to example of a Grammar where some arbitrary argument is passed to parse() and used somehow, just not getting my head round it at all 11:22
hahainternet bartolin_: hack still dying?
i assume you guys can get another box
jnthn hahainternet: As I understand it, hack is one VM on a box which a bunch of other VMs, and the others are fine. 11:23
hahainternet hey jnthn
jnthn o/ 11:24
RabidGravy: "arbitrary argument"? Normally you pass the string to parse...
m: grammar G { token TOP { \w+ } }; say G.parse('dugong') 11:25
camelia rakudo-moar d23557: OUTPUT«「dugong」␤»
RabidGravy the :$args in the signaure
jnthn Oh...
bartolin_ hahainternet: yes, hack is a KVM guest. there seem to be problems sporadically. but I hope we'll know more after the next problem ...
[ptc] the question from Tom Bowers on p6u about importing a sub from a package has intrigued me: how does one import a single routine from a module?
hahainternet bartolin_: what's the disk backed by?
[ptc] it seems that 'use PackageName <moo>' doesn't work
bartolin_ hahainternet: actually I don't know. moritz has set up the host and the KVM guests 11:26
hahainternet bartolin_: fair enough, it's not like i am a KVM expert
but i run a lot of libvirt guests
so if i can help, let me know
jnthn m: grammar G { token TOP($foo) { $foo \w+ } }; say G.parse('dugong', args => ['du']) 11:27
camelia rakudo-moar d23557: OUTPUT«Type check failed in binding $args; expected 'Parcel' but got 'Array'␤ in method parse at src/gen/m-CORE.setting:16263␤ in block <unit> at /tmp/LLnKqChjah:1␤␤»
bartolin_ hahainternet: but I'm pretty sure hack has no real disks for its own
jnthn hmm
m: grammar G { token TOP($foo) { $foo \w+ } }; say G.parse('dugong', args => ('du',))
camelia rakudo-moar d23557: OUTPUT«「dugong」␤»
hahainternet bartolin_: well it's common to use lvm, for example
jnthn RabidGravy: ^^
hahainternet but a disk dying in the VM is weird as heck
bartolin_ hahainternet: thanks for the offer, maybe you are around the next time the problem occurs :-) 11:28
hahainternet bartolin_: shout me, i'm usually around
if not, i can set up test machiens on my hardware
not like i can help with developing p6
RabidGravy jnthn, cheers that's what I'm trying to basically 11:29
does the arg propagate to all of the rules?
jnthn No
FROGGS [ptc]: what about use PackageName <&moo> ?
jnthn Though you can stick it into a dynamic variable if you want that.
token TOP($*foo) { ... } # now can be reached as $*foo during the entire parse 11:30
We do that in the Perl 6 grammar in places.
RabidGravy got ya, that all makes sense now 11:31
thanks
now to the supermarket
:)
11:31 tinyblak left, tinyblak joined, tinyblak left
dalek ast: 4e16f6b | jnthn++ | S10-packages/precompilation.t:
Un-fudge now-passing RT #124162 on rakudo.moar.
11:33
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124162
11:35 RabidGravy left 11:39 geever joined
dalek ast: 1589519 | jnthn++ | S03-operators/buf.t:
Test for RT #123928, which is already fixed.
11:40
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123928
11:40 kjs_ joined
eli-se
.oO(diff as a Perl regex substitution)
11:42
[ptc] FROGGS: I'll give it a go. It's not mentioned in S11 as a way to import subs though 11:45
[ptc] can see more docs coming on ...
FROGGS: nope, 'use PackageName <&moo>' doesn't work either 11:46
11:47 telex left
[ptc] I've also tried making an EXPORT sub like so: our sub EXPORT { return EnumMap('foo', &foo) } but that doesn't help either 11:47
funnily enough, defining an EXPORT sub doesn't seem to do anything; the error about positional args persists
11:48 telex joined
jnthn [ptc]: Note that you can set up different export tags (is export(:TAG)) and the use TheModule :TAG 11:49
uh, user-defined ones should probably be lowercase, though :)
[ptc] jnthn: thanks.
jnthn: yes, I've seen those, but I don't know if that's what the user is trying to do 11:50
jnthn: maybe we need to get Tom to try *not* to write perl5 code in perl6 ;-)
11:50 lichtkind joined
[ptc] the tags are, AFAICT, there to group functions to be exported, correct? 11:51
11:52 airdisa joined, larion joined
jnthn [ptc]: Yes, so those using the module can then use the tags to choose what groups they want 11:55
[ptc] jnthn: that does seem cleaner than expecting the user to know exactly which subs to import 11:56
jnthn: however, does Perl6 then support something like 'from package import function_name' a la Python?
jnthn [ptc]: I seem to recall seeing something along those lines in S11 11:57
11:57 larion left
[ptc] jnthn: for the use case where one only wants to import the one function and doesn't want to pollute the current namespace? 11:57
jnthn I'm not aware of us having implemented anything like that in Rakudo...
[ptc] jnthn: it's mentioned in S11, but doesn't seem to work
jnthn On "curernt namespace", note that imports are lexical by default in Perl 6.
So you're polluting your lexical scope
11:58 airdisa left
jnthn Which is still pollution but maybe less bad ;) 11:58
jnthn looks at S11
Hmmm
use Sense <common @horse>; seems to conflict with passing an argument list to an EXPORT routine though... 11:59
Anyway, I think the answer for now is that Rakudo doesn't seem to have a good way to do it by symbol yet, only the by-tag stuff is implemented. 12:00
[ptc] how is one supposed to use the EXPORT routine?
jnthn: ah, ok. That's good to know :-)
jnthn Write sub EXPORT in a module
See my recent talk for an example
[ptc] hrm, I tried that, but was still getting the 'no EXPORT sub,' error 12:01
[ptc] looks up jnthn's talk
jnthn See around slide 55 in jnthn.net/papers/2015-fosdem-static-dynamic.pdf
Maybe the answer should be "if there's no EXPORT sub, then treat the arg list as a set of symbols to import"... 12:02
12:02 tinyblak joined
[ptc] jnthn: what passes the @commands list to the EXPORT sub? Is that worked out at 'use' time? 12:07
jnthn Yeah, it's part of the implementation of import 12:08
(use = need + import) 12:09
uh, wait, that may not be quite try
Anyway, it's part of the implementation of use, which lies in Perl6::Grammar/Perl6::World
*quite true, also :)
12:10 egrep joined
dalek kudo/nom: 5da0525 | jnthn++ | src/core/native-array.pm:
Toss empty native-array.pm.

Probably created by accident while adding native arrays.
12:10
12:11 raiph joined
[ptc] here's a gist with the code: gist.github.com/paultcochrane/55e1...b594403966 12:11
the error message turns up in Perl6/Grammar.nqp
Grammar.nqp helped me to (sort of) work out what was going on, however I couldn't seem to get an EXPORT sub to be recognised 12:12
maybe it's just not yet implemented?
12:12 eli-se left
jnthn That'd be odd given the thing from the slides was a working example 12:13
I think I maybe even live-demo'd it.
[ptc] jnthn: true. duh
jnthn oh...
What if you toss the "module Bar;" at the top?
[ptc] however, the code I posted still doesn't recognize the EXPORT
ah, I'll give that a go 12:14
tada!
yup, that was it
jnthn++ thanks!
dalek kudo/nom: aba283d | jnthn++ | tools/build/Makefile-JVM.in:
Include native arrays in the JVM build.
12:15
vendethiel jnthn: I'm not sure I understand what happened. You tossed the empty file but added it to the makefile-jvm?
ah, native-array vs native_array 12:16
I'll read better next time :-)
m: sub x(*@, *%_) { say %_.perl }; x 1, :cmp-fa['D']; 12:17
camelia rakudo-moar d23557: OUTPUT«("cmp-fa" => ["D"]).hash␤»
vendethiel had no idea :foo[] worked :)
dalek kudo/nom: ac45046 | jnthn++ | t/spectest.data:
Turn on two now-passing native array tests on JVM.
12:18
jnthn vendethiel: Yes, you figured it :)
[ptc] jnthn: sorry to ask so many questions, however, when is it appropriate/necessary to use 'module Bar;'? 12:19
12:19 kjs_ left 12:21 xfix left, kjs_ joined 12:23 kjs_ left 12:24 grondilu joined
grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: a => 1, b => 2; 12:25
camelia rakudo-moar d23557: OUTPUT«Foo.new(a => 1, b => 2)␤»
grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: <a b> Z=> ^2;
camelia rakudo-moar d23557: OUTPUT«Default constructor for 'Foo' only takes named arguments␤ in method new at src/gen/m-CORE.setting:972␤ in block <unit> at /tmp/FFagIxFkYy:1␤␤»
grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: |(<a b> Z=> ^2);
camelia rakudo-moar d23557: OUTPUT«Default constructor for 'Foo' only takes named arguments␤ in method new at src/gen/m-CORE.setting:972␤ in block <unit> at /tmp/hLI3zCR9Wa:1␤␤»
grondilu ^thought something like that would work
jnthn |%(...) 12:26
grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: |%(<a b> Z=> ^2);
camelia rakudo-moar d23557: OUTPUT«Foo.new(a => 0, b => 1)␤»
grondilu indeed
jnthn [ptc]: Certainly if you are going to have our-scoped things
[ptc]: If you don't give it a name you also can't really do the need/import split either 12:27
dalek p: d835e93 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java:
Sync errors to get native num array tests happy.
12:28
12:29 jferrero left
dalek kudo/nom: 5941479 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for JVM error message fixes.
12:32
kudo/nom: 7203f2f | jnthn++ | t/spectest.data:
Run S09-typed-arrays/native-num.t on JVM.

Passes everything that Rakudo on MoarVM does.
12:39 rmgk is now known as Guest86560, rmgk_ joined, Guest86560 left, rmgk_ is now known as rmgk 12:41 kjs_ joined, kjs_ left
[ptc] jnthn: thanks for the explanation. Now I need it to sink in a bit, then I'll add something to the docs 12:41
dalek c: c970f64 | moritz++ | lib/Language/variables.pod:
Mention that subs are my-scoped by default
12:50
FROGGS jnthn++ and moritz++ # being productive 12:54
12:54 eli-se joined 12:55 airdisa joined, zakharyas joined 12:56 larion joined 13:02 RabidGravy joined
vendethiel did TimToady++ comment on that [Zeqv] | ..., btw? I didn't see anything in the backlog 13:03
13:04 raiph left 13:05 Perl6_newbee left 13:10 airdisa left 13:11 airdisa joined 13:12 [Sno] joined
dalek p: 045b91f | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/Serialization (2 files):
Partly port parameterized type serialization.

This gets enough of it in place for fixing RT#124162 on Rakudo JVM. The rest implemeneted on Moar needs more testing/exploration, so will port it once I'm happy it's correct.
13:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124162
13:14 raiph joined 13:16 airdisa left, larion left
dalek p: 3110921 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArrayInstance_u (3 files):
Fix copy-pasta in unsigned native int array bits.
13:17
kudo/nom: ac6bd9a | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for JVM serialization/array fix.
13:18
kudo/nom: 8d8b5be | jnthn++ | t/spectest.data:
Run S09-typed-arrays/native-int.t on JVM.

It now passes all that Rakudo on MoarVM does, bringing native array support on JVM up to parity with Moar.
ast: ac04404 | jnthn++ | S10-packages/precompilation.t:
Unfudge RT #124162 test on JVM.
13:19
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124162
FROGGS tadzik: I'm going to merge panda/eleven I think... github.com/tadzik/panda/compare/eleven
tadzik FROGGS: go for it :) 13:23
FROGGS \o/ 13:24
done :o)
tadzik woot 13:25
13:25 zakharyas left
tadzik so now we have to make the entire ecosystem do "provides" :) 13:25
masak good afternoon, #perl6 13:27
timotimo hello 13:28
FROGGS: for the weekly you'll have to give me a summary of the new cool tricks panda has just learned :)
FROGGS tadzik: aye 13:35
timotimo: will do
masak how do I configure and build Rakudo with a specific Moar commit?
masak tries to find out on his own while waiting for someone who knows to answer 13:36
jnthn --gen-moar=commit-id I think
masak yeah, looks like 13:37
gonna try bisecting RT #124191 on the moar side
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
[Tux] can a method inside a class have a different sink than the class itself? 13:38
masak++; # working on that ticket 13:39
masak "different sink"?
[Tux] using a method in void context 13:40
I can of course give that method its own (sub_class
jnthn You'd return an object with a sink method on it.
masak --gen-moar=2015.03 worked... but only from a fresh clone of rakudo 13:41
13:42 coffee` joined
masak make: *** No rule to make target `m-all', needed by `all'. Stop. 13:43
huh.
am I configuring stuff wrong?
my goal here is to build Rakudo with a different Moar revision. I used `perl Configure.pl --gen-moar=2015.03 --gen-nqp --backends=moar`. doing `make` after that gives the above error message. 13:44
moritz masak: well, I'm sure there's an error message somewhere about nqp not having the desired moar revision 13:45
masak: if you build with a specific moar revision, you must also explicitly specify an nqp revision that's compatible with that moar revision 13:46
13:49 larion joined
dalek ecs: 125d6ea | moritz++ | S11-modules.pod:
S11: include & sigil in explicit import list

we probably cannot get away with guessing if a sub or a sigilless term
  (like a type or constant) was meant
13:50
synopsebot Link: design.perl6.org/S11.html#include
13:52 kaare_ joined 13:53 larion left
dalek c: 4a50873 | paultcochrane++ | lib/Language/5to6.pod:
Document selectively importing functions from modules
13:55
c: f0ce071 | paultcochrane++ | lib/Language/variables.pod:
Merge branch 'master' of github.com:perl6/doc
13:56 Akagi201 joined 13:57 raiph left
jnthn std: state $i++ 13:58
camelia std 28329a7: OUTPUT«ok 00:00 136m␤»
jnthn m: state $i++
camelia rakudo-moar 8d8b5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F23pif3yEy␤Prefix + requires an argument, but no valid term found␤at /tmp/F23pif3yEy:1␤------> 3state $i++7⏏5<EOL>␤ expecting any of:␤ prefix␤»
jnthn TimToady: Is STD correct on this one? ^^
vendethiel ( irclog.perlgeek.de/perl6/2015-03-27#i_10351579 for my question earlier ) 14:00
[ptc] moritz: considering your comments to Tom Browder via p6u, would you be able to review commit 4a50873 on perl6/doc, please? 14:02
moritz: I don't want to cause more confusion by writing incorrect docs
14:06 larion joined, lucas_ joined 14:08 skids joined
lucas_ m: sub f {...}; say 42 if f(); say "ok" 14:09
camelia rakudo-moar 8d8b5b: OUTPUT«ok␤»
lucas_ ^^^ Stub code don't die if executed in conditional?
jnthn Use !!! to die 14:10
... fails, and testing a failure as a boolean dis-arms it
lucas_ Oh! I, see. Thanks.
m: say (...).Bool # :) 14:11
camelia rakudo-moar 8d8b5b: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15830 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:s…»
14:11 airdisa joined
lucas_ strange... In my terminal it just printed False, and didn't die 14:12
m: sub f {...}; say f().Bool 14:15
camelia rakudo-moar 8d8b5b: OUTPUT«False␤»
vendethiel m: sub foo($a){say $a}; foo (1, 2, 3) 14:17
camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3␤»
vendethiel m: sub foo(*@a){say @a.perl}; foo (1, 2, 3)
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3)␤»
vendethiel certainly expected a list of list here...
jnthn **@a 14:19
lucas_ m: say {...}().Bool
camelia rakudo-moar 8d8b5b: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15830 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:s…»
vendethiel I expect "foo (1, 2)" to pass a single argument -- "as opposed to perl5"
jnthn vendethiel: Yes, it does
vendethiel: But then you wrote *@a, which flattens 14:20
vendethiel m: sub foo(*@a){say @a.perl}; foo (1, 2, 3), (4, 5, 6)
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3, 4, 5, 6)␤»
vendethiel oke, fair enough
m: sub foo(**@a){say @a.perl}; foo (1, 2, 3)
camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3)␤»
jnthn vendethiel: Either pass an item ([...] instead of (...)) or use **@a
vendethiel m: sub foo(**@a){say @a.perl}; foo (1, 2, 3), (4, 5, 6)
camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
vendethiel right
14:21 airdisa left
timotimo hmm, i'm having some problems with HTTP::Server::Async 14:21
14:28 eiro left
dalek kudo/nom: 1812530 | jnthn++ | src/Perl6/Grammar.nqp:
Ensure "trusts" doesn't backtrack on bad type.

This avoids the confusion described in RT #117859.
14:28
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117859
lucas_ m: loop () { say 42 } 14:30
camelia rakudo-moar 8d8b5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/G6KUjCkEbC␤Missing block␤at /tmp/G6KUjCkEbC:1␤------> 3loop (7⏏5) { say 42 }␤»
lucas_ ^^^ To me, this is a little LTA, because the block is not missing, it's there.
14:31 kjs_ joined
jnthn std: loop () { say 42 } 14:31
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Malformed loop spec at /tmp/lW1ixzYEqr line 1:␤------> 3loop (7⏏5) { say 42 }␤ expecting term␤Parse failed␤FAILED 00:00 134m␤»
jnthn We shoudl nab that'n :)
mebbe I'll do it later...but walk/errands now :) 14:32
bbiab
14:33 eiro joined
[ptc] I've got Debian packages built for amd64 systems for MoarVM, nqp and Rakduo. Is there anywhere sensible that I should upload them, so that brave souls can test them? 14:34
timotimo cool, it seems like i fixed the problem in HTTP::Server::Async 14:37
14:42 Ven joined
Ven Is there a way do deconstruct a multi-level list? 14:42
m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @b.perl; # something like that (yes, I know this gets flattened)
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
grondilu m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @@b 14:44
camelia rakudo-moar 8d8b5b: OUTPUT«␤»
grondilu m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @a
camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3 4 5 6 7␤»
Ven yep 14:45
grondilu m: my (@a, @b, @c) = (1,2,3;4,5,6;7); say @b
camelia rakudo-moar 8d8b5b: OUTPUT«␤»
eli-se What is a multilevel list?
Ven an incorrect term
timotimo m: my (@a; @b; @c) := (1,2,3;4,5,6;7); say @b.perl;
camelia rakudo-moar 8d8b5b: OUTPUT«Type check failed in binding @c; expected 'Positional' but got 'Int'␤ in block <unit> at /tmp/DkW14TGG6l:1␤␤»
eli-se m: (1,2,3;4,5,6;7).perl.say
camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3; 4, 5, 6; 7)␤»
timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).lol; say @b.perl;
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).lol; say @a.perl;
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(ListIter.new)␤»
timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).tree; say @b.perl;
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
timotimo bleh
grondilu r you sure u can use semicolons in the my?
Ven m: say (1, 2, 3; 4, 5, 6; 7, 8, 9)[*,2]; # eli-se
camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3 4 5 6 7 8 9 7 8 9␤»
grondilu std: my (@a; @b)
Ven m: say (1, 2, 3; 4, 5, 6; 7, 8, 9)[*;2]; # eli-se
camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
rakudo-moar 8d8b5b: OUTPUT«3 6 9␤»
grondilu thought these stuff were NYI 14:46
Ven grondilu: not since the lollipop :)
eli-se Ven: I got parameters to work! 14:47
Ven is the execution order defined? :P
and "as expected"
(as in, not ml or ocaml-like) 14:48
eli-se parameters are never executed 14:49
Ven actually, ocaml have unspecified order. my bad! 14:50
lucas_ m: sub f(*@a) { say @a.perl }; f(1;2;3) # this is ok
camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3)␤»
lucas_ m: -> *@a { say @a.perl }(1;2;3) # why this is not ok?
camelia rakudo-moar 8d8b5b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/X3vgMPWCtE␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/X3vgMPWCtE:1␤------> 3-> *@a { say @a.perl }(17⏏5;2;3) # why this is not ok?␤»
14:51 BenGoldberg joined
masak moritz: the only error message I can see is 'Can't exec "/tmp/rakudo/install/bin/moar": No such file or directory at tools/lib/NQP/Configure.pm line 446.' 14:51
oh!
'You asked me to build 2015.03, but 2015.03 is not new enough to satisfy version 2015.03-16-ga752064' 14:52
yeah, that explains it. moritz++
I thought I could magically avoid having nqp track the moar dependencies. in retrospect, that was unrealistic of me to expect. :)
will try again later with a bit more realism.
15:00 lustlife joined
timotimo moritz: do you have a preference for how to host services that want to run their own http server, like HTTP::Server::Async on www.p6c.org or hack.? 15:01
15:01 kjs_ left
RabidGravy has something gone weird with panda in the last few hours? 15:01
timotimo i'd probably go with mod_proxy on apache for that
RabidGravy in summary:
==> Installing System::Passwd
==> Successfully installed System::Passwd
[jonathan@coriolanus ~]$ find /home/jonathan/.rakudobrew | grep Passwd
[jonathan@coriolanus ~]$
timotimo RabidGravy: froggs merged the eleven branch
Ven wonders if he would be shocked to see "[Zeqv] |@s>>.ords" in real-life code... 15:02
RabidGravy it appears not be actually installing things
timotimo hum
15:04 diana_olhovik_ left
timotimo i haven't updated yet 15:04
Ven m: sfirst-index 1, 2, 3 15:05
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/upcG0c89vn␤Undeclared routine:␤ sfirst-index used at line 1. Did you mean 'first-index', 'last-index'?␤␤»
15:07 kjs_ joined
timotimo oh, oof, an ASAN barf during HTTP::Server::Async run 15:08
15:09 Ven left, dustinm` left 15:11 noganex_ left 15:12 dustinm` joined
skids m: use NativeCall; sub strstr(Str $n, Str $c) returns OpaquePointer is native { } ; my $d = strstr("c","aaa"); $d.say; $d.defined.say; 15:12
camelia rakudo-moar 181253: OUTPUT«(Pointer)␤False␤»
skids j: use NativeCall; sub strstr(Str $n, Str $c) returns OpaquePointer is native { } ; my $d = strstr("c","aaa"); $d.say; $d.defined.say;
camelia rakudo-jvm 181253: OUTPUT«Pointer<NULL>␤True␤»
FROGGS RabidGravy: ping 15:13
RabidGravy yo 15:14
FROGGS RabidGravy: you can't actually 'use' System::Passwd ?
RabidGravy nope 15:15
[jonathan@coriolanus ~]$ perl6
> use System::Passwd;
Could not find System::Passwd in any of: /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/lib, /home/jonathan/.rakudobrew/moar-nom/install/share/perl6, /home/jonathan/.rakudobrew/moar-nom/install/share/perl6/site
timotimo tony-o: can i bother you about some HTTP::Server::Async things?
15:15 lustlife left
FROGGS RabidGravy: what does this give for you? perl6 -e 'say (%*CUSTOM_LIB<site> ~ "/0").IO.e' 15:16
timotimo .tell tony-o like for example the timeout worker keeps closing connections over and over because they are not being thrown out of the pool
yoleaux timotimo: I'll pass your message to tony-o.
RabidGravy FROGGS, True
15:17 noganex joined
FROGGS RabidGravy: can you gist your: cat $(perl6 -e 'say %*CUSTOM_LIB<site> ~ "/MANIFEST"') 15:18
RabidGravy: that is your installation "database"
15:19 skids left
RabidGravy yep 'ang on 15:19
FROGGS no 'oblem :o)
15:20 [particle] joined
FROGGS I've not tested rakudobrew with my panda change yet... 15:20
perhaps I should
RabidGravy FROGGS, gist.github.com/jonathanstowe/7da9...25d2544731
FROGGS ahh! 15:21
so it got installed, but System::Passwd lacks a "provides" section in its meta file
15:21 zakharyas joined
timotimo hehe, ouch 15:24
many of our modules still have a strike-through s11 badge on modules.perl6.org
it would be nice if you put a big red output in the installation process if there's no "provides" section
FROGGS that seems sensible 15:26
flussence it'd be nice if there was a way to figure out why that badge happens other than reading the website's source...
FROGGS RabidGravy: I PR'd it: github.com/dnmfarrell/System-Passwd/pull/2
15:26 tinyblak left
RabidGravy cool, just testing that 15:26
15:28 lustlife joined
RabidGravy so should all the files be in the "provides" or just the "entry point" if the others are only intended to be used by the main module? 15:29
FROGGS RabidGravy: even if the module 'use's its own stuff, it has to be in provides
RabidGravy better fix Linux::Fuser too then ;-) 15:30
FROGGS fix all things, aye
15:33 tinyblak joined
FROGGS I'll smoke the ecosystem in a bit 15:34
DrForr Are there examples yet for NativeCall callbacks? 15:43
timotimo sure 15:44
in the nativecall tests, for example; also GTK::Simple has some
DrForr Okay, I'll dig in there. Thanks.
FROGGS doc.perl6.org/language/nativecall#F..._arguments
DrForr Oh, I missed it. Too short and succinct :) 15:45
RabidGravy Okay it's all going a bit crispy ducked here 15:46
Compiling lib/Linux/Fuser/Procinfo.pm6 to mbc
===SORRY!===
Missing or wrong version of dependency 'src/gen/m-CORE.setting'
15:46 airdisa joined
timotimo you probably need to rebootstrap to get a clean rebuild of every module and so on? 15:47
timotimo afk for a bit
FROGGS RabidGravy: I expected some fallout when merging the panda branch tbh 15:50
but without testers it would never have matured enough and would never have been merged 15:51
RabidGravy all good
15:51 airdisa left 15:52 lustlife left 15:53 kjs_ left
RabidGravy yikes 15:53
[jonathan@coriolanus System-Passwd]$ rakudobrew build-panda
Already up-to-date.
No need to rebootstrap, running normal bootstrap
==> Bootstrapping Panda
===SORRY!===
Missing or wrong version of dependency 'src/gen/m-Metamodel.nqp'
15:56 mr-foobar joined
RabidGravy I think it's rm -rf ~/.rakudobrew and start again 15:57
FROGGS ohh, rebootstrap might be broken... I guess it does not delete the right files... 15:58
15:58 Sqirrel left 16:01 airdisa joined, tictac joined
dalek kudo/nom: 334ee5a | jnthn++ | src/Perl6/Actions.nqp:
Toss long-unused code path in EXPR.

The :pirop<...> use in EXPR had already been replaced by the portable
  :op<...> everywhere even prior to Parrot support being suspended, so
we've likely not needed this for at least a year or two.
16:05
kudo/nom: 1d58b0a | jnthn++ | src/Perl6/Grammar.nqp:
Throw typed exception for trusts with undecl type.

This means the error improves and also gets typo suggestions. Added a way to get typo_typename to panic rather than sorry; in the case of trusts, we can't go on really, since we'll crash and burn in the action method.
16:06
ast: d4c5764 | jnthn++ | S32-exceptions/misc.t:
Test for RT #117859.
16:07
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117859
16:08 tictac is now known as kodok, Perl6_newbee joined
TimToady m: my $i++ 16:12
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dU0Nxl36zj␤Prefix + requires an argument, but no valid term found␤at /tmp/dU0Nxl36zj:1␤------> 3my $i++7⏏5<EOL>␤ expecting any of:␤ prefix␤»
TimToady m: my $i.++
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/btGHlgdXvb␤Two terms in a row␤at /tmp/btGHlgdXvb:1␤------> 3my $i7⏏5.++␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤ postfix␤ statement end…»
TimToady it's even *looking* for a postfix right there, hmm.... 16:13
16:13 tinyblak left
TimToady m: my $i.succ 16:13
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zxS6eHoVzU␤Two terms in a row␤at /tmp/zxS6eHoVzU:1␤------> 3my $i7⏏5.succ␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤ postfix␤ statement e…»
TimToady now it's even looking for a constraint :) 16:14
jnthn :)
TimToady: I also was looking at the "min/max don't whatever-curry" RT
TimToady how is 'my $i' not parsed as a term, I wonder
jnthn TimToady: Turns out that we don't whatever-curry *any* list-associative operation 16:15
TimToady: Which is sane in general I guess...
TimToady huh
jnthn Is that "huh" as in "why not", or "huh" as in "why are min/max list assoc"? :)
TimToady why not
masak m: my &between = 1 < * < 10; say &between(5); say &between(17) 16:16
camelia rakudo-moar 181253: OUTPUT«True␤False␤»
masak oh, that's chaining, not list-associative.
jnthn That's chaining, not list assoc.
masak right.
jnthn Well, I don't know the deep reason "why not" or if there is one
TimToady in worst case, we can force binary op as &[op] does, I suppose, but I need more coffee to think about the N-up case 16:17
jnthn I now it covers some things (like infix:<,>) not whatevery-currying that really should not.
Sure
Anyway, I looked thinking it may be an easy fix and then discovered this, so... :)
TimToady looks around for someone smart...
jnthn picked off a serialization thing yesterday, so decided to do easier things today :)
16:18 airdisa left
TimToady m: 42 « 43 16:18
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4rda9s7_zY␤Missing infix inside hyper␤at /tmp/4rda9s7_zY:1␤------> 0342 «7⏏5 43␤ expecting any of:␤ infix␤ infix stopper␤»
jnthn m: 42 << 43
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TlirmekhIo␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~<␤at /tmp/TlirmekhIo:1␤------> 0342 <<7⏏5 43␤»
16:18 airdisa joined
TimToady m: @*ARGS [0] 16:18
camelia rakudo-moar 181253: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tXmHYWJcBR␤Missing infix inside []␤at /tmp/tXmHYWJcBR:1␤------> 3@*ARGS [7⏏050]␤ expecting any of:␤ bracketed infix␤ infix␤ infix stopper␤»
TimToady ^that error changed
jnthn star: @*ARGS [0] 16:19
camelia star-{m,p} 2015.02: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> 3@*ARGS [7⏏050]␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ bracketed infix␤»
jnthn has a hard time deciding if we've improved or not there :)
TimToady yes, but I decided that error messages based on backtracking out of infixes like that was probably a by too dwimmy 16:20
the new message actually communicates what went wrong
*a bit too 16:21
FROGGS RabidGravy: I'll fix the rebootstrap issue in a bit
jnthn Yeah, I was pondering <after <?[@]> <variable>> but that's probably a bad idea :)
Uh, and probably doesn't work :) 16:22
16:22 eli-se left 16:23 airdisa left
masak haha. built Rakudo at 59f7cb9, the commit before the bump. this commit exhibits the bug of #124191, but after *32* iterations, not 207. :) 16:23
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
masak guess I'll have to go further back.
jnthn masak: You might be going a very long way back... :) 16:24
masak: Worth a try, though :)
RabidGravy FROGGS, cool. I'm going to stop breaking shit now.
masak yeah. I'll keep digging.
FROGGS RabidGravy: this is the warning that will be shown: gist.github.com/FROGGS/0ee4c44089fd095e2c43 16:27
@all, please check my English: gist.github.com/FROGGS/0ee4c44089fd095e2c43
nwc10 FROGGS: I think it would do better with quotes: The distribution System::Passwd does not seem to have a "provides" section 16:28
FROGGS packages*
k
nwc10 and mapping every exposed namespace
[Tux] IO could do with a .rewind method to alias .seek (0, 0) 16:29
nwc10 also "add said section" is gramatically correct, but reads like legalese.
FROGGS nwc10: updated
suggestion?
nwc10 I think it would be clearer to write it: add a "provides" section
just repeat it. Yes, I know it's not awesome in one sense, repeating stuff, but as it's the point of the entire warning, I don't think it's a terribly bad idea to screw style and hammer the point home :-) 16:30
FROGGS k
:o)
updated again
nwc10 I can't spot anything further to suggest 16:31
FROGGS awesome :o)
nwc10: thanks
RabidGravy "Please inform the author to add a" is a slightly weird locution to me, I'd go with one of "Please ask the author to add a " or "Please inform the author that they should add a " 16:33
dalek kudo/nom: 102d924 | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
add warning for non-S11-compliant dist installs
nwc10 mmm, yes, agree
RabidGravy depending on the tone you want to use :)
FROGGS hmm
nwc10 I think "Please ask the author" is the more appropriate tone
maybe I need more coffee? 16:34
RabidGravy or more beer
nwc10 at this time of day, beer might be less inappropriate
dalek kudo/nom: a087815 | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
fix phrasing in S11-compliance warning, RabidGravy++
16:35
[Tux] current nom checkout causes Inline::Perl5 to fail:
t/exceptions.t ................ ok
===SORRY!===
Could not find File::Temp in any of:
FROGGS [Tux]: you also updated panda?
[Tux] yes, rakudobrew does that automatically 16:36
FROGGS ahh
[Tux] and bin/panda fails, but the real panda passes
FROGGS I broke that... and I'll fix it now
first I'll fix rebootstrap
16:38 spider-mario joined
TimToady m: 42 + 16:38
camelia rakudo-moar 1d58b0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZtmDFCkeFg␤Missing required term after infix␤at /tmp/ZtmDFCkeFg:1␤------> 0342 +7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
TimToady jnthn: ^^ is an AdHoc 'cuz I couldn't figure out how to call anything other than .panic in HLL/Grammar
FROGGS TimToady: you call a method in HLL::Grammar that you override in Perl6::Grammar which then will throw a typed exception 16:40
TimToady is too lazy to write a typed panic method :) 16:41
FROGGS :o)
TimToady lucas_: argument lists are implemented with "captures" in Perl 6, which are flat, as far as positional args are concerned, not multi-dimensional. if you pass a multi-dim as an argument list, where do the named parameters go? 16:43
16:45 darutoko- joined 16:47 darutoko left
TimToady so I don't really know why the first one "works" 16:48
m: sub f(*@a) { say @a.perl }; f(1;2;3,:huh)
camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
TimToady m: sub f(*@a) { say @a.perl }; f(1,:huh;2;3)
camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
TimToady works by ignoring pairs, apparently 16:49
m: sub f(*@a) { say @a.perl }; f((1;2;3))
camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
TimToady m: sub f(*@a) { say @a.perl }; f(:huh,(1;2;3))
camelia rakudo-moar 1d58b0: OUTPUT«Unexpected named parameter 'huh' passed␤ in sub f at /tmp/_0L2ueIECd:1␤ in block <unit> at /tmp/_0L2ueIECd:1␤␤»
TimToady that's why ; is not supposed to work in bare argument lists, and the fact that it does kinda bothers me from a semantic point of view 16:50
m: say \(1;2;3).perl 16:51
camelia rakudo-moar a08781: OUTPUT«\(1, 2, 3)␤»
16:51 kjs_ joined
TimToady m: say \(1,2,3;4,5,6).perl 16:51
camelia rakudo-moar a08781: OUTPUT«\(1 2 3, 4 5 6)␤»
TimToady m: sub f(*@a) { say @a.perl }; f(1;2;3,4,5) 16:52
camelia rakudo-moar a08781: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
TimToady m: sub f(**@a) { say @a.perl }; f(1;2;3,4,5)
camelia rakudo-moar a08781: OUTPUT«(1; 2; 3, 4, 5)␤»
TimToady m: sub f(**@a) { say @a.perl }; f(:huh;1;2;3,4,5)
camelia rakudo-moar a08781: OUTPUT«(; 1; 2; 3, 4, 5)␤» 16:53
TimToady something's really off there...
I wonder what we break if we fix that to not "work"
masak probably nothing
TimToady
.oO("Those words fall too easily from your lips.")
16:54
masak they do because I'm not aware of any ecosystem code that uses multidim arguments. 16:56
[Tux] ==> Testing Shell::Command
===SORRY!===
No object at index 296
16:56 simcop2387 left
[Tux] I'll return to testing later ... 16:57
dalek kudo/nom: 0062fb0 | timotimo++ | src/core/IO/Socket/Async.pm:
chase on_demannd -> on-demand change
17:00
jnthn TimToady: Sorry, was away nomming. :) Seems FROGGS++ answerd the question though :) 17:02
The main motivation I have for making things typed exceptions is more robust testing. 17:03
FROGGS RabidGravy: rebootstrap should be fixed now 17:04
now I'll check rakudobrew
vendethiel * 17:05
RabidGravy [Tux], I was getting that self same thing, hitting it again it works 17:07
17:08 kjs_ left, simcop2387 joined 17:11 jferrero joined 17:12 atweiden joined 17:13 tinyblak joined
dalek kudo/nom: 1554f94 | jnthn++ | / (3 files):
Add 'use nqp' in NativeCall.
17:16
FROGGS rakudobrew build-panda still fails :o( 17:17
RabidGravy just worked for me
vendethiel TimToady: is there a way to "unpack" a multi-dimensional list?
m: my (@a, @b, @c) = <foo bar baz>>>.ords.tree; say @b.perl # something like that. or maybe my (@a; .. 17:18
camelia rakudo-moar a08781: OUTPUT«Array.new()␤»
17:18 airdisa joined, tinyblak left 17:19 eli-se joined
FROGGS I also get: 17:20
==> Testing Shell::Command
===SORRY!===
No object at index 296
17:20 airdisa_ joined 17:22 airdisa__ joined
FROGGS damn, a second attempt and it just worked :o( 17:22
[Tux] yyes, what RabidGravy said
FROGGS that does not make it easier to hunt down
17:23 airdisa left
FROGGS anyway, I'm looking forward to stubbing the news for p6weekly :o) 17:24
17:25 airdisa_ left
dalek kudo/nom: 9cd98ed | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
fix installed runners for Windows PowerShell
17:26
FROGGS for example that one gets a panda-m and panda-j for free when installing a panda binary
(or any other binary)
TimToady testing a fix for state $i++ 17:27
17:31 airdisa__ left
dalek kudo/nom: 2c406ae | jnthn++ | / (3 files):
Add "use nqp;" to Test.pm.
17:34
kudo/nom: 6c23fdd | jnthn++ | lib/Test.pm:
Eliminate a bunch of boxing in Test.pm.

The main goal being clearing up the code a good bit by removing 50 nqp::box_n ops.
timotimo ho-hum. HTTP::Server::Async fails its tests :\ 17:35
[Tux] gist.github.com/Tux/1ec0ca6a12ef07da21c1 <= this weekend's mission complete
timotimo m: unless(True) { } else { } 17:36
camelia rakudo-moar 0062fb: OUTPUT«5===SORRY!5===␤Word 'unless' interpreted as 'unless()' function call; please use whitespace instead of parens␤at /tmp/q6jV4LOXnQ:1␤------> 3unless7⏏5(True) { } else { }␤Unexpected block in infix position (two terms in a row)␤at /tmp/q6j…»
timotimo m: unless (True) { } else { }
camelia rakudo-moar 0062fb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1NvByKKRD4␤"unless" does not take "else", please rewrite using "if"␤at /tmp/1NvByKKRD4:1␤------> 3unless (True) { }7⏏5 else { }␤»
timotimo locally i seemed to get a "strange text after block" here
i wonder why 17:37
m: unless (True) { } elsif False { } else { }
camelia rakudo-moar 0062fb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rBrVHNrFuI␤Strange text after block (missing semicolon or comma?)␤at /tmp/rBrVHNrFuI:1␤------> 3unless (True) { }7⏏5 elsif False { } else { }␤»
timotimo ah
there we go
^- this is up for grabs, i'm playing a video game now :P
jnthn [Tux]: Nice. And...yay Øl! :)
timotimo tadzik: please click merge here thanks github.com/tadzik/Template-Mojo/pull/13 17:41
17:45 zakharyas left
dalek kudo/nom: 7700536 | jnthn++ | lib/Pod/To/Text.pm:
Avoid needless nqp:: use in Pod::To::Text.
17:50
17:51 sirdancealot joined
dalek ast: 8c7f664 | TimToady++ | S03-operators/increment.t:
postfixes should be allowed on declarators
17:53
ast: 36462ed | TimToady++ | S32-exceptions/misc.t:
unless elsif should throw same as unless else
retupmoca FROGGS: I don't think the "provides" stuff is working right on windows 17:54
looks like maybe it's trying to match "path/to/file" against 'path\to\file' and failing?
dalek kudo/nom: 9490711 | TimToady++ | src/Perl6/Grammar.nqp:
MARKED('ws') doesn't always mean there was ws

It just means someone called <.ws> there. To know whether there really was whitespace there (to fail postfix parsing, for instance) we also must check to see if position changed.
17:56
kudo/nom: 99a62f3 | TimToady++ | src/Perl6/Grammar.nqp:
unless elsif should die like unless else does
TimToady timotimo++ btw
17:56 atweiden left
timotimo thx :) 17:57
TimToady and jnthn++ for noticing state $i++ was busticationalized
tadzik timotimo: oh, heh. It's like this thing needs tests or something :P 18:01
timotimo yes
tadzik I should get myself some dedicated opensource time now that I'll be jobless for a while 18:02
timotimo :) 18:04
opensource time is always good
jnthn Quick poll
timotimo jobless could be good or bad
18:04 Perl6_newbee left
jnthn For nqp:: used without a "use nqp" do we want to put in a deprecation notice for a while? 18:04
Or is it rare enough in the ecosystem we can just start needing it?
18:05 Rounin left
jnthn has got our ducks straight with the modules inside of the Rakudo repo, which was step one... :) 18:05
18:08 itz joined 18:10 itz_ left
moritz jnthn: deprecation notice 18:12
it's in 32 different files in the ecosystem 18:13
jnthn moritz++ # hoped somebody would pop up with a number like that :)
I'll work on it once the FROGGS++ panda merge dust has settled, so we can tell any dust clouds apart :) 18:14
moritz ♪ dust in the wind \n all we are is dust in the wind ♩ 18:15
TimToady grondilu: I enlarged upon your bitmap comment :) 18:16
moritz: is this primarily something like nqp::decont? or are people cheating all over for performance? 18:18
18:19 jack_rabbit joined
grondilu TimToady: that's a bit cryptic 18:20
TimToady why it's in parens :)
tadzik timotimo: it's by choice, so of course it'll be good, that's how psychology works :P 18:21
TimToady it's meant more as a 'shame on you' to the task writers than as an explanation
timotimo :)
18:22 raiph joined
dalek ast: a23f42d | jnthn++ | S04-declarations/state.t:
Unfudge state $x++ related tests.

  TimToady++ did the fixes. This includes unfuding the tests covering
RT #115614.
18:22
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115614
moritz TimToady: it's a mixture of performance mongering and low-level stuff that we don't expose properly 18:23
TimToady was just wondering what would be easy to expose properly, like decont 18:24
jnthn moritz: Is it easy to get a list?
moritz jnthn: just a sec
lucas_ TimToady: I was away; thanks for the explanation.
TimToady we'd like to not give people good excuses for using nqp :)
lucas_: well, it turned out to be less of an explanation and more of an informal bug report, which perhaps the masakbot will notice :) 18:25
lucas_ masakbot++ :) 18:26
moritz perlpunks.de/paste/show/5516f25a.4706.196
list of nqp:: ops, and how often they are used
18:26 airdisa joined
moritz though v5 skews the picture 18:27
TimToady m: sub f(*@a) { say @a.perl }; f(1,:huh;2;3)
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3)␤»
TimToady jnthn: you have an opinion on this? ^^
moritz++
jnthn moritz: Hm, what if you exclude v5, ooc?
timotimo moritz: /me prefers sort -r
jnthn TimToady: Um... 18:28
m: sub f(|c) { say c.perl }; f(1;2;3)
camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3,))␤»
moritz jnthn: perlpunks.de/paste/show/5516f2d2.5db8.d6 with v5 excluded
jnthn m: sub f(|c) { say c.perl }; f(1, 2; 3, 4; 5, 6) 18:29
camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3, 4, 5, 6,))␤»
moritz git clone [email@hidden.address] cd perl6-all-modules; git grep -l -E 'nqp::\w+' |grep -v rakudo-p5 | xargs grep -o -h -E 'nqp::\w+'|sort | uniq -c | sort -n -r
jnthn m: sub f(|c) { say c.perl }; f(1, 2, :foo; 3, 4; 5, 6) 18:30
camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3, 4, 5, 6,))␤»
jnthn m: sub f(|c) { say c.perl }; f(1, 2, :foo; 3, 4; 5, 6, :bar)
camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3, 4, 5, 6,))␤»
TimToady there it was, gone completely!
jnthn Hm, so we lose nameds as soon as we use the ; thingy
TimToady which is forced to mean , anyway
jnthn I was only semi-attentive when the ; stuff went in :S
TimToady well, seems like a parser issue, so maybe I'll look at it some 18:31
18:31 airdisa left
jnthn moritz: I suspect github.com/jnthn/rakudo-debugger/b...andLine.pm is to blame for some of 'em 18:32
TimToady m: sub f(*@a) { say @a.perl }; &f.(1,:huh;2;3)
camelia rakudo-moar 99a62f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6_mzSD0MhC␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/6_mzSD0MhC:1␤------> 3sub f(*@a) { say @a.perl }; &f.(1,:huh7⏏5;2;3)␤»
TimToady odd that .() parses differently than ()
I buy the failure there, but the message is LTA 18:34
something on the order of: "Argument lists cannot be multi-dimensional; please use parens around the multi-dimensional part" 18:35
18:35 airdisa joined
jnthn TimToady: Is there anywhere in the design where we allow multi-dim arg lists? 18:36
TimToady: Is it just a special case for within postcircumfixes?
Well, postcircumfix:<[ ]> of note...
TimToady I wasn't aware we allowed it anywhere, till lucas_++ pointed it out 18:37
might've been hacked in to support zip though
jnthn I wasn't either really :) 18:38
TimToady m: say zip(:oops, 1,2,3; <a b c>)
camelia rakudo-moar 99a62f: OUTPUT«1 a 2 b 3 c␤»
TimToady yeah, probably for that
jnthn Does zip actually get a LoL there?
Oh
TimToady m: say zip((:oops, 1,2,3), <a b c>)
camelia rakudo-moar 99a62f: OUTPUT«oops => True a 1 b 2 c␤»
jnthn Ah 18:39
I guess it just makes a Parcel of each of the bits...
m: sub f(**@a) { say @a.perl }; f((1,2,3), (4,5,6))
camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
jnthn m: sub f(**@a) { say @a.perl }; f(1,2,3;4,5,6)
camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
TimToady I mean, we *could* just allow it, and then factor out any nameds, or not treat them as nameds, or something...
jnthn Aha.
m: sub f(|c) { say c.perl }; f(1,2,3;4,5,6) 18:40
camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3, 4, 5, 6,))␤»
jnthn OK, Capture.perl is confusing.
TimToady |c is somehow losing info?
jnthn I doubt it's the |c construction
Since that's pretty low-level
m: sub f(|c) { say c[0].perl }; f(1,2,3;4,5,6)
camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3)␤»
jnthn m: sub f(|c) { say c[1].perl }; f(1,2,3;4,5,6)
camelia rakudo-moar 99a62f: OUTPUT«(4, 5, 6)␤»
jnthn Yeah
TimToady m: sub f(|c) { say c.WHAT }; f(1,2,3;4,5,6) 18:41
camelia rakudo-moar 99a62f: OUTPUT«(Capture)␤»
jnthn It's constructed well.
m: sub f(|c) { say c.list.perl }; f(1,2,3;4,5,6)
camelia rakudo-moar 99a62f: OUTPUT«((1, 2, 3), (4, 5, 6)).list␤»
jnthn Hm, even that bit is OK
TimToady so Capture.perl is a bit off there
jnthn Oh, it does .map
That fixes itself post-GLR :P
TimToady mkay 18:42
jnthn ('cus .map won't flatten nested structure)
TimToady hopes it fixes itself mid-GLR :P
jnthn It's curious nqp::time_n is top
Test.pm also uses that all over.
There's nothing we directly expose to get it 18:43
You can get an Instance.
*Instant
TimToady m: say nqp::time_n()
camelia rakudo-moar 99a62f: OUTPUT«1427568216.77227␤»
jnthn m: for ^10000 { nqp::time_n }; say now - INIT now
camelia rakudo-moar 99a62f: OUTPUT«0.0091418␤»
jnthn m: for ^10000 { now }; say now - INIT now 18:44
TimToady how boxetacious
camelia rakudo-moar 99a62f: OUTPUT«(timeout)»
jnthn ...
TimToady m: say nqp::time_n(), ' ', now 18:45
camelia rakudo-moar 99a62f: OUTPUT«1427568301.7068 Instant:1427568336.706801␤»
TimToady leap secs
jnthn Yeah
I still wonder why applying them is so costly... 18:46
TimToady guesses the algorithm is not optimized for now-ish nows...
probably optimized for 1970 :)
jnthn If only we had a prof...oh yay :)
18:48 darutoko- left
TimToady or maybe it's really silly and re-sums all the leap seconds between then and now every time... 18:48
jnthn Oh... 18:49
Well, it may be silly in that sense
But also, it turns out .Rat on a Num eats 41% of the time 18:50
moritz I guess it's simply isn't optimized yet
18:50 BenGoldberg left
jnthn indeed 18:50
Yeah, it takes 6.7s to do 10,000 Num => Rat 18:52
hmm, curious
if nqp::isnanorinf(nqp::unbox_n(self)) {
return self;
}
That is at the top of it
jercos that seems... irrationally slow :P
jnthn But a little below
(self == Inf || self == -Inf) && fail("Cannot coerce Inf to a Rat");
Surely that's unreachable?
m: say Inf.Rat.WHAT
camelia rakudo-moar 99a62f: OUTPUT«(Num)␤»
jnthn m: say NaN.Rat.WHAT 18:53
camelia rakudo-moar 99a62f: OUTPUT«(Num)␤»
jnthn Yeah...
What *should* we do? :)
moritz yes, unreachable
jercos It seems unreasonable to return a type not compatible with the expected type on what's essentially a cast >.> 18:54
jnthn jercos: Yes, that's what I was thinking.
Returning a Failure when asked to coerce is also a tad anti-social...
jercos True. Return 1/0? :p 18:55
moritz die 18:56
IMHO 18:57
though I'm not a big follower of the fail() cult
jercos m: say (1/0).Num
camelia rakudo-moar 99a62f: OUTPUT«Inf␤»
jercos :p
Hrm, shame, that doesn't work for 0/0 and NaN 18:58
...nor does that work for dividing two Nums, only for a Rat to a Num. 18:59
19:00 zby_home_ joined
jercos m: say sqrt(-1.Complex), -1.Complex.sqrt 19:01
camelia rakudo-moar 99a62f: OUTPUT«6.12323399573677e-17-1i-1+-0i␤»
19:06 kjs_ joined
jnthn already has got it down to half the time 19:07
grondilu TimToady: about bitmap, I was wondering if it would make sense to define fill as method fill(Pixel $p) { @!data = $p.clone xx * }, that is using an infinite array actually.
timotimo jnthn: don't forget there's a lot to be gained back when we get lexical lowering with references to work :)
grondilu m: my @a = rand xx * 19:08
camelia ( no output )
grondilu m: my @a = rand xx *; say @a[42]
camelia rakudo-moar 99a62f: OUTPUT«0.370145464497432␤»
19:09 xprime left
grondilu I have to say I'm a bit confused by how sometimes I can put infinite arrays in an array variable and sometimes I can't :/ 19:09
19:10 prime joined, prime left, prime joined
grondilu m: my @a = map &sin, (0,.01 ... *); 19:10
19:10 eiro left
camelia rakudo-moar 99a62f: OUTPUT«(timeout)» 19:10
eli-se m: say @[1, 2, 3]
camelia rakudo-moar 99a62f: OUTPUT«(Any) (Any) (Any)␤»
eli-se m: say ^@[1, 2, 3] 19:11
camelia rakudo-moar 99a62f: OUTPUT«0..^3␤»
eli-se Why does it print (Any) (Any) (Any) instead of 1 2 3?
grondilu because it's an empty, underined array
and anonymous
like with $ 19:12
m: say $
camelia rakudo-moar 99a62f: OUTPUT«(Any)␤»
jnthn m: say 6.73 / 1.47
camelia rakudo-moar 99a62f: OUTPUT«4.578231␤»
eli-se :(
jnthn timotimo: Yes, that's on my "look at in the next few days" list :) 19:13
grondilu m: say (@ = ^3)[^3]; 19:14
camelia rakudo-moar 99a62f: OUTPUT«0 1 2␤»
19:15 eiro joined 19:19 brrt joined
timotimo ok :) 19:21
dalek rl6-roast-data: 147bb14 | coke++ | / (9 files):
today (automated commit)
19:22
FROGGS retupmoca: looking at it now 19:23
moritz nqp-m: say nqp::time_n()
camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say nqp::t"␤ at gen/moar/stage2/NQPHLL.nqp:493 (/home/camelia/rakudo-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:921 (/home/camelia/rakudo-inst-2/share/nqp/lib/nqp.moarvm:comp_unit:872)␤ from gen/…»
moritz nqp-m: say(nqp::time_n())
camelia nqp-moarvm: OUTPUT«1427570621.68989␤»
moritz nqp-j: say(nqp::time_n())
camelia nqp-jvm: OUTPUT«(signal ABRT)#␤*** Error in `java': double free or corruption (out): 0x00007fa95c01a8c0 ***␤*** Error in `java': double free or corruption (!prev): 0x00007fa95c01a8c0 ***␤*** Error in `java': double free or corruption (fasttop): 0x00007fa95c007c10 ***␤# There…»
moritz fun!
tadzik wow :) 19:24
moritz if that worked, I'd have suggested that 'time' should return a Num, not an Int
then we could tell people to use 'time' instead of nqp::time_n
timotimo i don't even know why time gives an Int :\
moritz because p5 did? 19:25
grondilu returning an Int makes much more sense than a Num, imho
timotimo bleh, i say :)
moritz but src/vm/jvm/QAST/Compiler.nqp uses nqp::time_n
grondilu: why?
nqp-j: say(42)
camelia nqp-jvm: OUTPUT«(signal ABRT)*** Error in `java': double free or corruption (fasttop): 0x00007f88d8012fd0 ***␤*** Error in `java': double free or corruption (!prev): 0x00007f88d801a8c0 ***␤»
timotimo so you think we should offer a Timer::HighRes module? 19:26
moritz oh
it seems nqp-j is simply broken right now
grondilu because reasons
moritz j: say 42
camelia rakudo-jvm 99a62f: OUTPUT«42␤»
moritz j: say nqp::p6box_n(nqp::time_n())
camelia rakudo-jvm 99a62f: OUTPUT«1.427570800856E9␤»
moritz j: say nqp::p6box_n(nqp::time_n() - nqp::time_i()) 19:27
camelia rakudo-jvm 99a62f: OUTPUT«0.25099992752075195␤»
moritz ok, I'm doing the change now, and see what kind of spectest fallout we get
S32::Temporal says Int 19:28
jnthn is testing some Num.Rat perf improvements
raydiak afternoon, #perl6 19:30
FROGGS hi raydiak 19:31
hoelzro hello #perl6!
raydiak hey FROGGS...thanks for the reminder about that test, tis done :)
\o hoelzro
FROGGS raydiak++
hi hoelzro
raydiak just limped the ex's car 5 miles to a junk yard for parts then another 10 miles to its home with a blown radiator 19:32
19:33 yqt joined, jack_rabbit left
TimToady good thing you don't live in a desert... 19:33
raydiak I wish...this car would be dead by now if that were the case :) 19:34
so it'll be a day or few before I get back to it but Git::PurePerl will very slowly clone really small repos now...anyone else wanting to take a crack at it, is more than welcome to fork :) 19:35
masak I'm happy to report that I've found a Rakudo revision where #124191 does not happen :) 19:36
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
masak now all that remains is the bisect.
slowly getting there.
19:38 zakharyas joined
TimToady jnthn: surely the source of the current time is not naturally floating point to begin with, so why go through Num? 19:39
eli-se m: my @xs = 2, 3, 4; (1, @xs, 5).perl.say
camelia rakudo-moar 99a62f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
eli-se m: my @xs = 2, 3, 4; my @ys = 1, @xs, 5; @ys.perl.say 19:40
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
hoelzro is there a better way to load a Perl 6 module from Perl6/Compiler.nqp other than my $function := self.eval("use Module; &module-function"); (I'm thinking jnthn may know if no one else does)
masak++ # sleuthing
raydiak hoelzro: istr something like "use Perl6::Compiler:from<NQP>;" 19:41
jnthn TimToady: Dunno the original reasoning; probably because different backends/OSes give us it to different precisions/in different units 19:42
TimToady: I thought representing it as a floater was your idea from way back? :)
moritz a timeusec_i might be the solution
TimToady spec just says Real, with a slight pref for Rat
presumably anything that makes Num must already know the precision of the integer fractions of seconds 19:43
so it could be thrown into a denominator instead
might be a good spot for lazy gcding too 19:44
eli-se m: my @xs = 2, 3, 4; my @ys = (1, @xs, 5); @ys.perl.say
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
FROGGS raydiak: he needs the other way... loading a P6 module from nqp
TimToady since most Instant arithmetic will be subtraction
eli-se Is that special syntax or is it assigning a parcel to an array?
moritz eli-se: array assignment is coercive 19:45
19:45 kjs_ left
TimToady assignment will evaluate as a list; binding will "assign" the parcel, but we don't say "assign" for that 19:45
eli-se m: my $xs = [2, 3, 4]; my @ys = 1, $xs, 5; my @zs = (1, $xs, 5); @ys.perl.say; @zs.perl.say
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, [2, 3, 4], 5)␤Array.new(1, [2, 3, 4], 5)␤»
19:46 RabidGravy left
eli-se ok, this is very confusing 19:46
19:46 kjs_ joined
raydiak FROGGS: ah right 19:46
TimToady [] and $ are in containers that will never spontaneously decontainerize
Perl takes it's singular vs plural distinctions very seriously 19:47
19:47 lucas_ left
eli-se How can I tell whether decontainerisation will happen? 19:47
TimToady generally, it doesn't in the absence of explicit instructions to the contrary 19:48
like saying @$xs
or $xs[]
after my @zs = (1, $xs, 5) @zs will *always* contain 3 elements, as an invariant 19:49
(unless you do deep dark magic to cheat) 19:50
hoelzro raydiak: I'm loading P6 code from NQP, though 19:51
rather than the other way around
moritz hoelzro: and I keep thinking that this must be wrong
eli-se TimToady: alright
hoelzro moritz: you mean that approach?
moritz hoelzro: doing it at all, yes
19:52 Gruber is now known as Grrrr
eli-se m: my @xs = 2, 3, 4; my @zs = (1, @xs, 5); say @zs; @xs[1] = 8; say @zs; # I hope it copies the container, though. 19:52
camelia rakudo-moar 99a62f: OUTPUT«1 2 3 4 5␤1 2 3 4 5␤»
eli-se Absolutely terrific.
hoelzro so does the linenoise stuff belong as an NQP module, then?
moritz hoelzro: either that, or it should be called from a method that a Perl 6 class overrides by subclassing, or something 19:53
eli-se m: my @xs = 2, 3, 4; my @zs = 1, |@xs, 5; @zs.perl.say; # What if I want Perl 5-like flattening?
camelia rakudo-moar 99a62f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/juTliYlb2c␤Variable '&prefix:<|>' is not declared␤at /tmp/juTliYlb2c:1␤------> 3my @xs = 2, 3, 4; my @zs = 1, 7⏏5|@xs, 5; @zs.perl.say; # What if I want ␤»
TimToady there's no argument list there to insert into
eli-se m: my @xs = 2, 3, 4; my @zs = 1, @@xs, 5; @zs.perl.say; # Ah, I see.
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
TimToady @@ is redundant 19:54
eli-se m: my @xs = 2, 3, 4; my @zs = 1, @xs, 5; @zs.perl.say; # I prove you wrong.
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
eli-se way twhat
just a few minutes ago it didn't interpolate @xs
m: my @xs = 2, 3, 4; my @zs = (1, @xs, 5); @zs.perl.say; # You win.
camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
eli-se m: my @xs = 2, 3, 4; (1, @xs, 5).perl.say 19:55
camelia rakudo-moar 99a62f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
eli-se Oh, of course.
TimToady you were using $xs then 19:56
m: my @xs = 2, 3, 4; (1, $@xs, 5).perl.say
camelia rakudo-moar 99a62f: OUTPUT«(1, [2, 3, 4], 5)␤»
eli-se Why does it sometimes say Array.new(2, 3, 4) and sometimes [2, 3, 4]? Are they different?
TimToady yes, [] is containerized as a singular "item" 19:57
so *if* you flattened it, you'd get 3 elements rather than 5, but .perl doesn't commit either way to flattening or lolling 19:58
tadzik :D
TimToady so the Array shows up in the other case as a non-commital element, to be flattened or not lazily by context 19:59
raydiak m: my @a = ^3; say @a.perl; say @a.item.perl;
camelia rakudo-moar 99a62f: OUTPUT«Array.new(0, 1, 2)␤[0, 1, 2]␤»
TimToady m: say (1,2,3).perl; say (1,2,3).item.perl 20:01
camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3)␤$(1, 2, 3)␤»
eli-se TimToady: I see.
TimToady a slightly more raw example, a flattenable list vs an item-ized list 20:02
hoelzro moritz: oh, that makes sense to me
I didn't know a Perl 6 class could subclass an NQP one! 20:03
eli-se I like Perl 6. 20:04
20:05 zakharyas left
raydiak \o/ 20:05
I think that's the reaction we're aiming for :)
TimToady is flattened, er, flattered...
tadzik ah, I read it as "flattering" in that "Perl doesn't commit either way to flattening or lolling" 20:06
it made sense in many ways
20:07 kjs_ left
moritz hoelzro: I'm not sure if it works in practise 20:07
hoelzro: experiment with it before basing your desing on it :-)
hoelzro: what works is invoking a p6 routine from nqp
jnthn hoelzro: fwiw, one neat way for sharing stuff between langs is the nqp::gethllsym/nqp::bindhllsym mechanism 20:08
dalek kudo/nom: 787e562 | moritz++ | / (2 files):
generate leap second POSIX timestamps as integers, not strings
kudo/nom: b451adf | jnthn++ | src/core/Num.pm:
Numerous speed-ups for Num.Rat.

Avoids a bunch of list assignments, uses native nums where possible, and avoids a load of implicit coercions. Result: 6.5x faster.
20:11
kudo/nom: ce038b5 | jnthn++ | src/core/Num.pm:
Add missing native num multi candidates.

These are a small part of getting the Num.Rat speedup.
20:13 raiph left
hoelzro moritz: right 20:13
jnthn: oh, I forgot about those!
how would I go about loading a module, in that case?
moritz: if I *did* get P6 subclassing to work, I feel like that's another large change on top of my existing work; main.nqp would become main.p6, and Perl6/Compiler.nqp would become Perl6/Compiler.pm 20:14
I think that those changes could happen after the tab completion stuff is already merged
jnthn moritz: OK, between your commit and mine we've made now a bunch faster :)
hoelzro I think tearing out linenoise from MoarVM and NQP is already a big step
raydiak nice moritz++ jnthn++ 20:18
jnthn hoelzro: Well, to load a module you still need a Perl6::World somewhere 20:19
hoelzro: You can call .load_module on that 20:20
hoelzro: That one doesn't try to do any importation
dalek kudo/nom: 79bf15a | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
fix CUR::Installation on windows by using forward slashes

Since we are comparing paths of distribution provided by META.info files to actual files on disk, we have to normalize both from potential backslashes to forward slashes. Now we can also (re)bootstrap panda on windows.
FROGGS feels good to finally make use of panda/eleven and rakudo/eleven... 20:22
moritz FROGGS++
FROGGS we could now even go so far as to allow to rebootstrap panda-j and panda-m sie by side 20:23
jnthn FROGGS++ # eleven 20:24
jnthn notes there've already been 87 Rakudo commits since the release. :)
20:24 Sqirrel joined
jnthn Plenty happening. :) 20:25
FROGGS well, we are getting closer and closer to "the release" :o)
hmmm, in case we are careful enough we could even make rakudo now relocatable me thinks 20:26
20:26 rindolf left
FROGGS at least I think so 20:26
moritz m: for 1..1000 { now }; say now - INIT now 20:28
camelia rakudo-moar 99a62f: OUTPUT«3.000797␤»
moritz m: for 1..1000 { time }; say now - INIT now
20:28 telex left
camelia rakudo-moar 99a62f: OUTPUT«0.00544458␤» 20:28
FROGGS m: say time
camelia rakudo-moar 99a62f: OUTPUT«1427574527␤»
moritz that's before the optimizations 20:29
20:30 telex joined
hoelzro jnthn: does Perl6::Compiler (in interactive mode) have access to a World? 20:31
jnthn hoelzro: Well, it has access to the class, you'd need to make an instance of it... 20:32
hoelzro ok 20:33
20:33 adu joined
eli-se Is there some documentation tool for Perl 6 that extracts function signatures automatically? 20:37
So you don't have to repeat them in POD. 20:38
tadzik why not just attach Pod to function signatures? 20:39
eli-se how'd you do that?
tadzik let me find some example
retupmoca eli-se: see github.com/retupmoca/P6-LibraryMak...ke.pm6#L85
hoelzro m: #|{hello} sub foo {} ; say(&foo.WHY)
camelia rakudo-moar 99a62f: OUTPUT«hello␤»
hoelzro tadzik, eli-se: ^
retupmoca eli-se: and see the README.md in that repo (which is generated from that POD)
timotimo i'm very glad to see now being sped up 20:40
eli-se Nice!
Does it also include preconditions and postconditions?
hoelzro you can also use #| ... ␤
or #= for trailing comments
tadzik preconditions and postconditions? 20:41
hoelzro eli-se: you mean, does it include them in the generated docs?
eli-se yeah
hoelzro I don't think so
eli-se like sub f { PRE { $x == 1 } } would put "$x == 1" in the docs
tadzik I don't think we can easily change it either
as in, one'd have to dig into the compiler internals, it's not just a matter of fixing the pod formatters 20:42
hoelzro eli-se: you *may* be able to create a doc generator to do that
eli-se cool
hoelzro I don't know if Code objects can introspect their PRE/POST blocks, though
seems handy, though
20:43 eiro left
eli-se m: m: sub f(Int $x) { PRE { $x == 1 } }; &f.^phasers.say 20:43
camelia rakudo-moar 99a62f: OUTPUT«No such method 'phasers' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/VLmrxHD8kZ:1␤␤»
eli-se crap
I meant to /msg camelia
masak eli-se: you seem to be working under a miscomprenehsion of exactly what ^ does, though 20:45
20:45 eiro joined
eli-se m: sub f(Int $x) { PRE { $x == 1 } }; &f.phasers('PRE').say 20:45
camelia rakudo-moar 99a62f: OUTPUT«-> () { #`(Block|68719408) ... }␤»
masak eli-se: if you do ^ there, you're no longer talking about a particular instance, but about its metaobject.
timotimo timo@schmetterling ~/p/tryperl6> time perl6 -e 'now xx 5000'
9.52user 0.03system 0:09.56elapsed 99%CPU (0avgtext+0avgdata 92644maxresident)k
1.81user 0.02system 0:01.83elapsed 99%CPU (0avgtext+0avgdata 95852maxresident)k
eli-se yeah I meant .^methods at first, then I meant .phasers
masak eli-se: that metaobject will most certainly not have a phaser
timotimo before and after
masak eli-se: ah, ok.
eli-se and then I screwed up :P 20:46
masak eli-se: anyway, functions are not classes :)
jnthn timotimo: I like that you're in a directory called "tryperl6" :D
timotimo oh
timotimo whistles innocently
eli-se Can you get the source position given the Code object? 20:47
retupmoca aww, eleven broke my .dll bundling :( "Cannot locate native library 'zlib1.dll'" 20:48
timotimo i want something like that, fwiw, eli-se
retupmoca wants %*RESOURCES
eli-se hmmm
timotimo retupmoca: agreed :S 20:49
eli-se m: sub f($x) { POST { * > 0 }; $x }; f(1); f(-1)
camelia ( no output )
eli-se Can't use * for return value in POST :(
TimToady double closure 20:50
eli-se Without some way to say "this is the returned value" instead of using a local variable directly, postconditions may be confusing if extracted from code directly into documentation, though.
moritz well, the return value is in $_
retupmoca but FROGGS++ # panda is happy on windows again
20:51 brrt left
eli-se moritz: holy guacamole 20:51
moritz m: sub a($x) { POST { $_ > 0 }; $x }; a -3
camelia rakudo-moar 99a62f: OUTPUT«Postcondition '{ $_ > 0 }' failed␤ in sub a at /tmp/V8OZ5XFdZt:1␤ in block <unit> at /tmp/V8OZ5XFdZt:1␤␤»
eli-se very very very nice
moritz m: sub a($x) { POST * > 0; $x }; a -3
camelia ( no output )
moritz m: sub a($x) { POST $_ > 0; $x }; a -3
camelia rakudo-moar 99a62f: OUTPUT«Postcondition '$_ > 0' failed␤ in sub a at /tmp/nu7CSTVxSV:1␤ in block <unit> at /tmp/nu7CSTVxSV:1␤␤»
jnthn away for a bit 20:52
dalek c: b76872c | (Edwin Steiner)++ | lib/Type/Cool.pod:
Fix probably unintended autopun.
20:53
FROGGS retupmoca: how were the dlls installed? 20:54
retupmoca they were copied into blib/lib 20:55
I can find them using .files($path), so I can still work around the lack of %*RESOURCES
FROGGS yes, you probably want: CompUnitRepo.files($path) 20:56
retupmoca yeah 20:57
FROGGS and yeah, now we can also make %*RESOURCES work
retupmoca ok, .files actually works everywhere, so I probably should have been using that in the first place :) 20:58
or does it? o.O 21:00
timotimo ==> Reinstalling 21:03
===SORRY!===
Missing or wrong version of dependency 'src/gen/m-CORE.setting'
what have i wrong, FROGGS?
FROGGS timotimo: hmmm
timotimo /home/timo/perl6/install/share/perl6/site/bin/panda - that seems to be the right panda 21:04
FROGGS timotimo: can you just try again?
timotimo already have
retupmoca ah, almost the same I think: ::File I have to pass .files('lib/...'), ::Installation I have to pass .files('blib/lib/...') 21:05
FROGGS: is there an easy way to unify those? ^
FROGGS retupmoca: I'm not sure yet
timotimo: did it actually clean out site/ ? 21:06
timotimo maybe i'll just throw away all of my install/
FROGGS no, just remove all of site 21:07
timotimo too late
i don't have a backup :P
FROGGS timotimo: but btw, you also need to reconfigure rakudo after the latest changes there
timotimo i've done that
FROGGS (for -Ilib for Test.pm and NativeCall.pm)
timotimo oh hell 21:09
==> Testing Shell::Command
===SORRY!===
No object at index 296
FROGGS yeah, I have no idea where that comes from :S 21:10
another attempt will do I think
just doing rebootstrap I mean
moritz you'll need to remove your complete install dir before installing the new rakudo, I think
dalek ecs: 1b4888f | (Edwin Steiner)++ | S32-setting-library/Containers.pod:
Turn accidentally working example for 'unique' into what was probably intended.

  (Due to the [...] the original example worked even without the ':as(*.Num)'.)
timotimo indeed, now it works. god damn it.
FROGGS yeah 21:11
timotimo but i still get ==> Reinstalling
===SORRY!===
moritz ==> Testing Shell::Command
===SORRY!===
No object at index 296
eeks
FROGGS ó.ò
moritz that *was* cleaned out entirely
though the second bootstrap seems to work 21:12
21:12 _edwin joined
FROGGS yes... question is, why? 21:12
timotimo agreed
dalek kudo-star-daily: b790b42 | coke++ | log/ (9 files):
today (automated commit)
21:16
timotimo with a slightly older version of panda things work :\
_edwin question about perl6/doc: is it ok to copy some sections from S32 more or less directly to perl6/doc?
timotimo as a first step, that should do
_edwin I'm thinking about the descriptions of unique and squish which leave little to be desired IMHO
timotimo the synopses aren't really documentation per se
that sounds good 21:17
_edwin (and are missing in doc)
moritz _edwin: yes, that's fine
FROGGS timotimo: so you get that weird message? every time?
timotimo yes 21:18
21:18 tinyblak joined
timotimo well, the "no object at index blah" comes the first time ./rebootstrap 21:18
eli-se I want to write something in Perl 6.
_edwin ok, will do
timotimo the "wrong or missing version of core setting" always happens after "reinstalling" or trying to use "panda"
eli-se Maybe I should've written my compiler in Perl 6 instead of Perl 5.
FROGGS timotimo: can you run the reboostrap under RAKUDO_MODULE_DEBUG=1 and paste the entire output?
moritz perlpunks.de/paste/show/55171abc.4704.45 can't use URI after it was installed successfully 21:19
FROGGS timotimo: then I'd like to additionally get your site/MANIFEST and `which panda`
eli-se Let's see how much code it is.
timotimo i gave "which panda" above
FROGGS moritz: read from line 21
timotimo gist.github.com/timo/32e15eb9790dd9d29b54 21:20
eli-se 1641 lines :[
21:21 RabidGravy joined
FROGGS timotimo: and /home/timo/perl6/install/share/perl6/site/bin/panda is just a wrapper script that calls shells out using what is returned by CompUnitRepo? 21:21
timotimo already dead 21:22
i meant to be working on that website project; i need a working panda for that
FROGGS okay
21:23 tinyblak left
moritz FROGGS: if it's fatal, it shouldn't be a warning; it should be an error 21:23
21:23 silug left
FROGGS moritz: but it is not fatal 21:23
moritz FROGGS: it's fatal for downstream users
FROGGS it is just a guess
_edwin S32 uses --> in signatures while perl6/doc uses 'returns'. is there a rationale behind that? 21:24
FROGGS there can be dists that ship binaries only, and like retupmoca stuff in blib, like dlls
moritz _edwin: 'returns' is a bit easier to read for those not knowing signatures well
_edwin that's true 21:25
moritz FROGGS: ok, what should be in "provides"?
FROGGS moritz: that: design.perl6.org/S22.html#provides 21:26
ohh, there is a comma missing...
moritz FROGGS: do we have a way to autogenerate?
*that
FROGGS in short: every namespace you want to be able to 'use' 21:27
moritz: perhaps...
timotimo damn, HTTP::Server::Async maxes out one CPU with epoll_wait and sched_yield :(
retupmoca aww, even internal 'use's need to be in provides
21:27 airdisa left
moritz timotimo: is that sched_yield in a loop? 21:28
timotimo moritz: i have no idea :|
moritz retupmoca: that sounds... LTA
timotimo yes, because every "use" goes through CompUnitRepo, no?
eli-se Is there some IO subclass in Perl 6 for in-memory buffers?
21:28 airdisa joined
retupmoca moritz: a bit IMO; I was hoping 'provides' was only for the public interface 21:28
otherwise I just have to list every .pm6 file 21:29
21:30 grondilu left, [Coke] left, TimToady left, estrabd_ left, haroldwu_ left, Grrrr left, gcole_ left, gtodd left, cdc left, esaym153 left, broquaint left, revdiablo left, renormalist left, Exodist left, Grrrr joined, renormalist joined, esaym153 joined, grondilu joined, estrabd joined, broquaint joined, revdiablo joined, haroldwu joined, gcole joined 21:31 Exodist joined, [Coke] joined, ribasushi left
FROGGS retupmoca: you have to, since the fact that there are files at all is an historical accident 21:31
21:31 gtodd joined 21:32 larion left 21:33 airdisa left
FROGGS moritz: panda/depends will guess you a META.info if there is none... 21:35
github.com/tadzik/panda/compare/depends
21:35 cdc joined 21:36 TimToady joined, cdc is now known as Guest83483, ribasushi joined
dalek c: eb5f721 | (Edwin Steiner)++ | lib/Type/List.pod:
Document 'unique' and 'squish', mostly copying the descriptions from S32.
21:36
_edwin hm, for squish I wonder why it does not optionally take a binary predicate for squishing 21:38
retupmoca Cannot locate native library '[...]\share\perl6\site/49.dll' :( 21:39
my workaround is less workaroundy than I thought
retupmoca will just have to put the .dll in bin/
dalek ecs: d4e09ac | FROGGS++ | S22-package-format.pod:
add missing comma in json example
21:40
FROGGS retupmoca: so we have to make %?RESOURCE available soonish 21:41
21:42 jack_rabbit joined
eli-se why is $?FILE of type Str and not IO::Path? 21:46
21:48 zby_home_ left
FROGGS eli-se: maybe just not done yet 21:48
timotimo FROGGS: you know a bit of stuff about libuv, right? 21:49
FROGGS timotimo: what's up?
timotimo got a clue why we're using an idle_handler? because it seems like that's being busy-looped on my HTTP::Server::Async workload
retupmoca FROGGS: yeah, looks like 21:50
putting the .dll in bin/ doesn't work either
because it gets replaced with the built-in perl launcher stub thing
timotimo having an idle_handler causes the libuv event loop to have a timeout of 0 and will start busy waiting
which is kind of bad ...
FROGGS timotimo: no, no idea 21:51
retupmoca: eww
retupmoca timotimo: I think I've had that happen when I tried to use Promine.in(...)
timotimo perhaps we're suffering from the same problem
FROGGS retupmoca: so let's make resource/ a special dir in Panda::Installer (and perhaps CUR::Installation) 21:52
retupmoca: I guess we only need to change a single regex in panda
21:56 sirdancealot left
masak ok, I have some answers with my bisect already. hoping to find the rest tomorrow and post that to the RT ticket. 21:59
'night, #perl6
retupmoca FROGGS: yes; I just need "this filename (with any predictable-ish path) and this contents" to be installed
RabidGravy re %?RESOURCE, yeah I was going to ask about this earlier, was thing of installing a "precompiled" termcap thingy with the Term::CAP I'm working on 22:01
dalek c: 88bb4a9 | (Edwin Steiner)++ | lib/Type/List.pod:
Link to the === operator in descriptions of C<unique> and C<squish>.
22:03
FROGGS retupmoca: I just pushed a panda patch that strips the blib/ 22:05
eli-se FROGGS: are you still dealing with the C++ stuff? 22:08
FROGGS eli-se: yes
eli-se What are you doing exactly? I'm also dealing with C++ ABI stuff.
22:08 espadrine left
FROGGS eli-se: getting the name mangling right for example 22:09
retupmoca: nvm, had to revert 22:10
eli-se Ah, I see. I'm dealing with vtables and typeinfo and stuff like that.
22:11 larion joined
_edwin ah, cool, squish in Rakudo already has :&with :) 22:15
hm, but why does it convert &as($_) to Str?? 22:16
22:16 adu left
timotimo &as($_)? 22:17
the what now?
_edwin see github.com/rakudo/rakudo/blob/nom/...st.pm#L508 22:19
looks wrong to me
I think that is a mistake from mixing together two implementations of unique 22:23
$target = nqp::unbox_s($_.WHICH); in line 459 makes sense
but not the .Str in line 508, it should be more like line 470, I think 22:24
22:25 airdisa joined 22:30 airdisa left
_edwin m: ('', Any, Any).unique(:as(-> $x {$x})).perl.say 22:33
camelia rakudo-moar 79bf15: OUTPUT«("", Any).list␤»
_edwin m: ('', Any, Any).squish(:as(-> $x {$x})).perl.say
camelia rakudo-moar 79bf15: OUTPUT«use of uninitialized value $x of type Any in string context in block <unit> at /tmp/Qvps06ijk1:1␤␤use of uninitialized value $x of type Any in string context in block <unit> at /tmp/Qvps06ijk1:1␤␤("",).list␤»
22:34 grondilu left
_edwin if I add a test in roast for a bug like that, should I "todo" the test, or something, or is it ok to let the test fail? 22:38
FROGGS todo it
_edwin: and add a comment like this: github.com/perl6/roast/commit/459b...d7f3a4037e 22:39
_edwin ok, I still need to RT it 22:45
22:53 [particle]1 joined 22:54 [particle] left 23:00 flussence left 23:02 beastd joined, adu joined
dalek ast: 8938c10 | (Edwin Steiner)++ | S32-list/squish.t:
Add test for RT #124204 (squish should not needlessly stringify).
23:05
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124204
23:09 flussence joined
_edwin hm, I guess I have another one: 23:09
m: <a a>.unique(:with(-> $a, $b {1})).say 23:10
camelia rakudo-moar 79bf15: OUTPUT«a␤»
_edwin m: <a a>.squish(:with(-> $a, $b {1})).say
camelia rakudo-moar 79bf15: OUTPUT«␤»
23:10 larion left
eli-se Why is the empty regex not allowed? 23:16
TimToady because we're mean
actually, it's because it means two different things in the past, and it's often a mistake as a degenerate case 23:17
and it's really easy to write infinite loops when you think you're matching something but you're not
so we just require people say they're matching /''/ when that's what they mean 23:18
23:18 larion joined, lichtkind left
TimToady or <?>, but '' is shorter and arguably clearer 23:19
eli-se ah ok
TimToady I'm not sure it makes much sense to allow :with on unique if it's gonna substitute an O(N**2) algorithm to do it 23:20
vendethiel m: say 'a' ~~ /''+/;
eli-se I just wrote *.base(2).subst(/0/, '', :g).codes == 1 to check whether something is a power of two :D
camelia rakudo-moar 79bf15: OUTPUT«Memory allocation failed; could not allocate 979042304 bytes␤»
eli-se camelia: lol
vendethiel TimToady: why O**2?
O(N**2)*.
TimToady it's doing linear matching on the result to see if anything is the same 23:21
rather than the default of using a hash
vendethiel can't it store a `original => mapped` and compare using that?
TimToady it's not a map 23:22
vendethiel m: sub f($a) { $a+1000}; my @a = ^10; say %(@a Z[&f] @a).perl
camelia rakudo-moar 79bf15: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in sub f at /tmp/QX5RtvRena:1␤ in block at src/gen/m-CORE.setting:21983␤ in block at src/gen/m-CORE.setting:9781␤ in block at src/gen/m-CORE.setting:9785␤ in method reify at src/…»
TimToady that's :as
vendethiel aaah.. I'm sorry
m: sub f($a) { $a+1000}; my @a = ^10; say %(@a Z map(&f, @a)).perl
camelia rakudo-moar 79bf15: OUTPUT«("0" => 1000, "4" => 1004, "1" => 1001, "6" => 1006, "7" => 1007, "9" => 1009, "3" => 1003, "5" => 1005, "8" => 1008, "2" => 1002).hash␤»
eli-se Hmm, s/// isn't documented on doc.perl6.org/language/operators
vendethiel wonders if he could avoid the duplicated @a there 23:23
TimToady eli-se: { .lsb == .msb }
vendethiel m: sub f($a) { $a+1000}; my @a = ^10; say (@a ==> $^ary Z=> map(&f, $^ary)).perl # ugh.
camelia rakudo-moar 79bf15: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CIjBKqkqJG␤Cannot use placeholder parameter $^ary in the mainline␤at /tmp/CIjBKqkqJG:1␤------> 3$a+1000}; my @a = ^10; say (@a ==> $^ary7⏏5 Z=> map(&f, $^ary)).perl # ugh.␤»
vendethiel right
eli-se TimToady: nice!
TimToady 'course, that's still scanning the bits twice 23:24
but it's in a low-level routine, hopefully
23:27 jack_rabbit left
dalek ast: a50eeb0 | (Edwin Steiner)++ | S32-list/squish.t:
Add test for RT #124205 (squish should always return at least the first element).
23:27
eli-se m: $_ => ($_ != 0 && $_ +& ($_ - 1) == 0) for ^10
camelia ( no output )
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124205
eli-se m: ($_ => ($_ != 0 && $_ +& ($_ - 1) == 0) for ^10).say
camelia rakudo-moar 79bf15: OUTPUT«0 => False 1 => True 2 => True 3 => False 4 => True 5 => False 6 => False 7 => False 8 => True 9 => False␤»
eli-se nice. :)
TimToady eli-se: another way is { $_ +& ($_ - 1) == ... yeah, that
23:28 rmgk left
TimToady hmm 23:28
eli-se m: say $_ => $_ && $_ !+& ($_ - 1) for ^10
camelia rakudo-moar 79bf15: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BQ_4lcLhZG␤Cannot negate +& because multiplicative operators are not iffy enough␤at /tmp/BQ_4lcLhZG:1␤------> 3say $_ => $_ && $_ !7⏏5+& ($_ - 1) for ^10␤ expecting any of:␤ infix␤ …»
eli-se meh 23:29
TimToady m: say -4.lsb; say -4.msb
camelia rakudo-moar 79bf15: OUTPUT«-2␤-2␤»
TimToady say what
where'd the - come from?
oh, duh
m: say (-4).lsb; say (-4).msb
camelia rakudo-moar 79bf15: OUTPUT«2␤2␤»
TimToady whew!
presuming you want negative powers of two to match as well... 23:30
23:30 rmgk joined
eli-se m: say $_ => $_ && !($_ +& $_.pred) for ^10 23:30
camelia rakudo-moar 79bf15: OUTPUT«0 => 0␤1 => True␤2 => True␤3 => False␤4 => True␤5 => False␤6 => False␤7 => False␤8 => True␤9 => False␤»
TimToady negative powers-of-two rather, not negative-powers of two
eli-se m: say $_ => $_ && +^$_ +& +^$_.pred for ^10 23:31
camelia rakudo-moar 79bf15: OUTPUT«0 => 0␤1 => -2␤2 => -4␤3 => -4␤4 => -8␤5 => -6␤6 => -8␤7 => -8␤8 => -16␤9 => -10␤»
eli-se oww haha
$_ && !($_ +& $_.pred), it is 23:32
vendethiel m: say ($_ => $_ == 5 ?? next !! $_ for ^10);
camelia rakudo-moar 79bf15: OUTPUT«5===SORRY!5===␤Found ?? but no !!␤at /tmp/24MtTygvLp:1␤------> 3say ($_ => $_ == 5 ?? next !! $_ for7⏏5 ^10);␤Confused␤at /tmp/24MtTygvLp:1␤------> 3say ($_ => $_ == 5 ?? next !! $_ for7⏏5 ^10);␤␤»
vendethiel m: say ($_ => ($_ == 5 ?? next !! $_) for ^10); 23:33
camelia rakudo-moar 79bf15: OUTPUT«5===SORRY!5===␤Found ?? but no !!␤at /tmp/sc3JwC1Tgx:1␤------> 3say ($_ => ($_ == 5 ?? next !! $_7⏏5) for ^10);␤Confused␤at /tmp/sc3JwC1Tgx:1␤------> 3say ($_ => ($_ == 5 ?? next !! $_7⏏5) for ^10);␤ expecting any of:␤ …»
vendethiel mmh.
TimToady m: say ($_ => ($_ == 5 ?? next() !! $_) for ^10); 23:34
camelia rakudo-moar 79bf15: OUTPUT«0 => 0 1 => 1 2 => 2 3 => 3 4 => 4 6 => 6 7 => 7 8 => 8 9 => 9␤»
vendethiel uh-oh?
TimToady next takes an argument
so !! looks like a term
vendethiel m: sub foo($?){}; say 1 ?? foo !! 2
camelia rakudo-moar 79bf15: OUTPUT«5===SORRY!5===␤Found ?? but no !!␤at /tmp/DnumkTNFgN:1␤------> 3sub foo($?){}; say 1 ?? foo !! 27⏏5<EOL>␤Confused␤at /tmp/DnumkTNFgN:1␤------> 3sub foo($?){}; say 1 ?? foo !! 27⏏5<EOL>␤ expecting any of:␤ postfix…»
vendethiel right-o. 23:35
(I just wanted to make sure "next" wasn't special at all)
TimToady we don't try to suss out 0-ary functions and turn them into terms like Perl 5 does
vendethiel probably for the best :-)
TimToady yes, it's an early tradeoff we made knowingly
have been too badly burned by P5 in that regard 23:36
vendethiel remember reading his perl book and getting *VERY* confused at how prototypes worked, how the core subs use that, how you're supposed to pre-declare functions that you'll autoload, and all that....
TimToady It's not clear that the words "prototypes" and "worked" should be involved in a sentence without negatives. 23:37
vendethiel well, that's because I also said "book": it's only theory! 23:38
TimToady we can have a more awesome message on the borged !! though 23:40
vendethiel should be fine since users can't define their own "?? !!"-like operators, right? 23:41
eli-se m: &say.^WHY.say 23:43
camelia rakudo-moar 79bf15: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in any WHY at src/gen/m-Metamodel.nqp:78␤ in block <unit> at /tmp/HWZuaaCJzm:1␤␤»
eli-se 2??? 23:44
Oh should be without ^ duh
_edwin hm, I wonder whether squish shouldn't call &with with the arguments in list order, rather than reverse list order 23:46
currently this works: my @highscores = <5 10 10 6 100 80>.squish(:with(* <= *)) # 5 10 100 23:47
looks fine until you read it as "squish if $^a <= $^b" 23:48
23:48 adu left
_edwin because it actually does "squish if $^b <= $^a" 23:49
timotimo damn, my web app crashes :( 23:50
23:52 gamo left
_edwin roast uses squish only with symmetric predicates where it does not matter 23:55
TimToady we could require with to supply a cmp rather than an eq, and then we could sort with O(n log n) characteristics 23:57
23:57 geever left
_edwin TimToady, you mean for unique? 23:57
TimToady (and then squish), yes, but it would destroy order 23:58
_edwin fwiw, I wouldn't have expected :with on unique, but on squish it definitely makes sense 23:59