Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-28

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:27 airdisa joined #perl6
00:31 jack_rabbit joined #perl6
00:40 telex joined #perl6
01:00 tinyblak joined #perl6
01:14 firefish5000 joined #perl6
01:27 airdisa joined #perl6
01:42 dalek roast: 7f30b11 | TimToady++ | S (2 files):
01:42 dalek roast: test that HLL's EXPR requires term after infix
01:42 dalek roast:
01:42 dalek roast: Otherwise rakudo's grammar says "Bogus statement", which is one.
01:42 dalek roast: review: https://github.com/perl6/roast/commit/7f30b11d1a
01:42 dalek nqp: c982045 | TimToady++ | src/HLL/Grammar.nqp:
01:42 dalek nqp: EXPR must require term after infix
01:42 dalek nqp: review: https://github.com/perl6/nqp/commit/c982045141
01:48 dalek rakudo/nom: 082198f | TimToady++ | tools/build/NQP_REVISION:
01:48 dalek rakudo/nom: bump NQP rev
01:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/082198f2c9
01:48 dalek rakudo/nom: cdde8b9 | TimToady++ | src/Perl6/Grammar.nqp:
01:48 dalek rakudo/nom: simplify "expected" listings
01:48 dalek rakudo/nom:
01:48 dalek rakudo/nom: There's no reason to confuse the user with "or meta", and prefixes were
01:48 dalek rakudo/nom: listed redundantly.
01:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cdde8b9b10
01:48 dalek rakudo/nom: 3de8d9e | TimToady++ | src/Perl6/World.nqp:
01:48 dalek rakudo/nom: various error message tweaks
01:48 dalek rakudo/nom:
01:48 dalek rakudo/nom: Copy "Strange text after block" message from STD.
01:48 dalek rakudo/nom: Sort the expecteds so that 'infix' comes before 'infix stopper'.
01:48 dalek rakudo/nom: Don't put eject before space on unexpected closing bracket.
01:49 dalek rakudo/nom: And actually detect the unexpected bracket if there's intervening whitespace, oops.
01:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3de8d9ed5e
01:55 travis-ci joined #perl6
01:55 travis-ci Rakudo build passed. TimToady 'various error message tweaks
01:55 travis-ci http://travis-ci.org/rakudo/rakudo/builds/56177362 https://github.com/rakudo/rakudo/c​ompare/fb991be191c9...3de8d9ed5ebe
01:55 travis-ci left #perl6
02:01 tinyblak joined #perl6
02:20 TimToady m: 42 +
02:20 camelia rakudo-moar fb991b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dnhFnTeC9v␤Bogus statement␤at /tmp/dnhFnTeC9v:1␤------> 42 +7⏏5<EOL>␤    expecting any of:␤        prefix or term␤        prefix or meta-prefix␤»
02:22 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 #perl6
02:22 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␤------> 42 +7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
02:22 TimToady there we go
02:24 TimToady 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␤------> 42 [7⏏5<EOL>␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
02:24 TimToady hmm, that's not quite right
02:26 dalek rakudo/tab-completion: f929b94 | hoelzro++ | src/Perl6/Compiler.nqp:
02:26 dalek rakudo/tab-completion: Use a list of sorted items to track completions
02:26 dalek rakudo/tab-completion:
02:26 dalek rakudo/tab-completion: ...instead of a hash.  The advantage here is that we can offer a sorted
02:26 dalek rakudo/tab-completion: list of completions, rather than providing them in seemingly random
02:26 dalek rakudo/tab-completion: order.
02:26 dalek rakudo/tab-completion: review: https://github.com/rakudo/rakudo/commit/f929b9456c
02:26 TimToady m: 42 «
02:26 camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1ghdh1enQo␤Two terms in a row␤at /tmp/1ghdh1enQo:1␤------> 42 «7⏏5<EOL>␤    expecting any of:␤        infix␤        infix stopper␤»
02:27 TimToady std: 42 «
02:27 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Confused at /tmp/vOeayhHhSU line 1:␤------> 42 «7⏏5<EOL>␤    expecting infix or meta-infix␤Parse failed␤FAILED 00:00 136m␤»
02:29 TimToady std: 42 «;
02:29 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Confused at /tmp/WQ5x3YvKIn line 1:␤------> 42 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…»
02:29 TimToady m: 42 «;
02:29 camelia rakudo-moar 3de8d9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/61McuFfNiy␤Two terms in a row␤at /tmp/61McuFfNiy:1␤------> 42 «7⏏5;␤    expecting any of:␤        infix␤        infix stopper␤»
02:59 raiph joined #perl6
03:01 larion joined #perl6
03:04 noganex_ joined #perl6
03:11 laouji joined #perl6
03:17 dustinm` joined #perl6
03:18 Patterner joined #perl6
03:24 airdisa joined #perl6
03:32 larion joined #perl6
03:41 adu joined #perl6
04:03 FROGGS_ joined #perl6
04:17 sirdancealot joined #perl6
04:25 BenGoldberg joined #perl6
04:27 Sqirrel joined #perl6
04:28 dalek roast: d18ca09 | skids++ | packages/Test/Compile.pm:
04:28 dalek roast: Add Test::Compile for convenient quicky tests of precompilation problems
04:28 dalek roast:   This hopefully will autoskip for niecza, if someone who has it could test.
04:28 dalek roast:   Please confine use of this module to integration/precompiled.t for now
04:28 dalek roast:   (integration/precompiled.t to follow in next commit)
04:28 dalek roast: review: https://github.com/perl6/roast/commit/d18ca09ce4
04:28 dalek roast: b98d853 | skids++ | integration/precompiled.t:
04:28 dalek roast: Add integration/precompiled.t as a testing ground for Test::Compile.
04:28 dalek roast:   Rakudo needs to fix something to use loads_is, fudge that.
04:28 dalek roast:   Add test for RT #124162 using Test::Compile
04:28 dalek roast:   Please someone with an operational niecza fudge as needed.
04:28 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124162
04:28 dalek roast: review: https://github.com/perl6/roast/commit/b98d853b8d
04:29 raiph joined #perl6
04:41 xinming joined #perl6
04:45 raiph joined #perl6
05:13 airdisa joined #perl6
05:23 tinyblak joined #perl6
05:33 dalek rakudo/nom: 6f0153a | TimToady++ | src/Perl6/ (2 files):
05:33 dalek rakudo/nom: better message where infix is required
05:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f0153afa8
05:33 dalek roast: bfc8371 | TimToady++ | S02-lexical-conventions/minimal-whitespace.t:
05:33 dalek roast: missing infix is now missing, not confused
05:33 dalek roast: review: https://github.com/perl6/roast/commit/bfc8371209
05:34 jack_rabbit joined #perl6
05:36 MegaDork joined #perl6
05:37 MegaDork left #perl6
06:32 diana_olhovik_ joined #perl6
06:41 gfldex joined #perl6
06:42 rindolf joined #perl6
06:44 airdisa joined #perl6
07:03 xprime joined #perl6
07:22 FROGGS moritz: I just read that hack needed a power off just yesterday...
07:23 FROGGS moritz: and guess what, I enabled a second cronjob just yesterday morning or the day before that
07:25 moritz FROGGS: could you disable it again, and wait for a few days?
07:26 FROGGS moritz: already did
07:28 moritz FROGGS: thanks
07:28 * moritz hopes he can do some doc hacking today
07:31 dalek doc: 12ec453 | moritz++ | lib/Language/variables.pod:
07:31 dalek doc: Add TODO markers
07:31 dalek doc:
07:31 dalek doc: so that a "git grep TODO" detects that there is something
07:31 dalek doc: to do in this file
07:31 dalek doc: review: https://github.com/perl6/doc/commit/12ec453d10
07:39 moritz my: my $x := anon $y; say $x.^name
07:39 moritz m: my $x := anon $y; say $x.^name
07:39 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␤»
07:47 dalek doc: 5be43cf | moritz++ | lib/Language/variables.pod:
07:47 dalek doc: Document "has" (sortof) and "anon" declarators
07:47 dalek doc: review: https://github.com/perl6/doc/commit/5be43cf3ea
07:53 dalek nqp: 24b7c8d | FROGGS++ | tools/build/MOAR_REVISION:
07:53 dalek nqp: bump moar for windows repl fixes
07:53 dalek nqp: review: https://github.com/perl6/nqp/commit/24b7c8dc8c
07:53 dalek rakudo/nom: d235574 | FROGGS++ | tools/build/NQP_REVISION:
07:53 dalek rakudo/nom: bump nqp@moar for windows repl fixes
07:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2355741a5
07:59 diana_olhovik_ joined #perl6
08:11 tinyblak joined #perl6
08:13 dalek doc: 2938da9 | moritz++ | lib/Language/variables.pod:
08:13 dalek doc: Document the augment declarator
08:13 dalek doc: review: https://github.com/perl6/doc/commit/2938da98bb
08:15 darutoko joined #perl6
08:32 airdisa joined #perl6
08:33 RabidGravy joined #perl6
08:35 xfix joined #perl6
09:00 rindolf joined #perl6
09:07 aborazmeh joined #perl6
09:07 aborazmeh joined #perl6
09:29 eli-se joined #perl6
09:35 eli-se hi
09:45 Rounin joined #perl6
10:21 airdisa joined #perl6
10:36 gamo joined #perl6
10:37 jnthn morning, #perl6 o/
10:37 gamo What is the proper extension to perl6 scripts?
10:38 moritz gamo: well, either no extension at all, or one <pl pl6 p6>
10:38 moritz gamo: in general, the user of a program doesn't care what language the program is implemented in, which favors leaving out the extension
10:38 gamo ok
10:39 jnthn Well, the extension is more useful on Windows where there is not shebang :)
10:39 jnthn Or at least, no interpretation of it...
10:40 Perl6_newbee joined #perl6
10:40 gamo What combination of keys give me the word boundaries <<>> instead of ""?
10:42 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 bartolin_ So that's a place to look when the problem occurs the next time.
10:44 jnthn gamo: Depends... http://en.wikipedia.org/wiki/Guillemet#Typing_.22.C2.AB.22_and_.22.C2.BB.22_on_computers
10:45 gamo In Linux
10:47 gamo «»
10:48 gamo ok, it's Alt Gr + z and ALT GR + x
10:48 gamo thank you very much!
10:53 espadrine joined #perl6
11:06 itz_ joined #perl6
11:22 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?
11:22 hahainternet i assume you guys can get another box
11:23 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
11:24 jnthn o/
11:24 jnthn RabidGravy: "arbitrary argument"? Normally you pass the string to parse...
11:25 jnthn m: grammar G { token TOP { \w+ } }; say G.parse('dugong')
11:25 camelia rakudo-moar d23557: OUTPUT«「dugong」␤»
11:25 RabidGravy the :$args in the signaure
11:25 jnthn Oh...
11:25 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 ...
11:25 [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?
11:25 hahainternet bartolin_: what's the disk backed by?
11:25 [ptc] it seems that 'use PackageName <moo>' doesn't work
11:26 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
11:26 hahainternet but i run a lot of libvirt guests
11:26 hahainternet so if i can help, let me know
11:27 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␤␤»
11:27 bartolin_ hahainternet: but I'm pretty sure hack has no real disks for its own
11:27 jnthn hmm
11:27 jnthn m: grammar G { token TOP($foo) { $foo \w+ } }; say G.parse('dugong', args => ('du',))
11:27 camelia rakudo-moar d23557: OUTPUT«「dugong」␤»
11:27 hahainternet bartolin_: well it's common to use lvm, for example
11:27 jnthn RabidGravy: ^^
11:27 hahainternet but a disk dying in the VM is weird as heck
11:28 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
11:28 hahainternet if not, i can set up test machiens on my hardware
11:28 hahainternet not like i can help with developing p6
11:29 RabidGravy jnthn, cheers that's what I'm trying to basically
11:29 RabidGravy does the arg propagate to all of the rules?
11:29 jnthn No
11:29 FROGGS [ptc]: what about use PackageName <&moo> ?
11:29 jnthn Though you can stick it into a dynamic variable if you want that.
11:30 jnthn token TOP($*foo) { ... } # now can be reached as $*foo during the entire parse
11:30 jnthn We do that in the Perl 6 grammar in places.
11:31 RabidGravy got ya, that all makes sense now
11:31 RabidGravy thanks
11:31 RabidGravy now to the supermarket
11:31 RabidGravy :)
11:31 tinyblak joined #perl6
11:33 dalek roast: 4e16f6b | jnthn++ | S10-packages/precompilation.t:
11:33 dalek roast: Un-fudge now-passing RT #124162 on rakudo.moar.
11:33 dalek roast: review: https://github.com/perl6/roast/commit/4e16f6b206
11:33 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124162
11:39 geever joined #perl6
11:40 dalek roast: 1589519 | jnthn++ | S03-operators/buf.t:
11:40 dalek roast: Test for RT #123928, which is already fixed.
11:40 dalek roast: review: https://github.com/perl6/roast/commit/158951981b
11:40 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123928
11:40 kjs_ joined #perl6
11:42 eli-se .oO(diff as a Perl regex substitution)
11:45 [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 ...
11:46 [ptc] FROGGS: nope, 'use PackageName <&moo>' doesn't work either
11:47 [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 [ptc] funnily enough, defining an EXPORT sub doesn't seem to do anything; the error about positional args persists
11:48 telex joined #perl6
11:48 jnthn [ptc]: Note that you can set up different export tags (is export(:TAG)) and the use TheModule :TAG
11:49 jnthn uh, user-defined ones should probably be lowercase, though :)
11:49 [ptc] jnthn: thanks.
11:50 [ptc] jnthn: yes, I've seen those, but I don't know if that's what the user is trying to do
11:50 [ptc] jnthn: maybe we need to get Tom to try *not* to write perl5 code in perl6 ;-)
11:50 lichtkind joined #perl6
11:51 [ptc] the tags are, AFAICT, there to group functions to be exported, correct?
11:52 airdisa joined #perl6
11:52 larion joined #perl6
11:55 jnthn [ptc]: Yes, so those using the module can then use the tags to choose what groups they want
11:56 [ptc] jnthn: that does seem cleaner than expecting the user to know exactly which subs to import
11:56 [ptc] jnthn: however, does Perl6 then support something like 'from package import function_name' a la Python?
11:57 jnthn [ptc]: I seem to recall seeing something along those lines in S11
11:57 [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...
11:57 [ptc] jnthn: it's mentioned in S11, but doesn't seem to work
11:57 jnthn On "curernt namespace", note that imports are lexical by default in Perl 6.
11:57 jnthn So you're polluting your lexical scope
11:58 jnthn Which is still pollution but maybe less bad ;)
11:58 * jnthn looks at S11
11:58 jnthn Hmmm
11:59 jnthn use Sense <common @horse>; seems to conflict with passing an argument list to an EXPORT routine though...
12:00 jnthn 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?
12:00 [ptc] jnthn: ah, ok.  That's good to know :-)
12:00 jnthn Write sub EXPORT in a module
12:00 jnthn See my recent talk for an example
12:01 [ptc] hrm, I tried that, but was still getting the 'no EXPORT sub,' error
12:01 * [ptc] looks up jnthn's talk
12:01 jnthn See around slide 55 in http://jnthn.net/papers/201​5-fosdem-static-dynamic.pdf
12:02 jnthn 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 tinyblak joined #perl6
12:07 [ptc] jnthn: what passes the @commands list to the EXPORT sub?  Is that worked out at 'use' time?
12:08 jnthn Yeah, it's part of the implementation of import
12:08 jnthn (use = need + import)
12:09 jnthn uh, wait, that may not be quite try
12:09 jnthn Anyway, it's part of the implementation of use, which lies in Perl6::Grammar/Perl6::World
12:09 jnthn *quite true, also :)
12:10 egrep joined #perl6
12:10 dalek rakudo/nom: 5da0525 | jnthn++ | src/core/native-array.pm:
12:10 dalek rakudo/nom: Toss empty native-array.pm.
12:10 dalek rakudo/nom:
12:10 dalek rakudo/nom: Probably created by accident while adding native arrays.
12:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5da0525c85
12:11 raiph joined #perl6
12:11 [ptc] here's a gist with the code: https://gist.github.com/pault​cochrane/55e196d9d8b594403966
12:11 [ptc] the error message turns up in Perl6/Grammar.nqp
12:12 [ptc] 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 [ptc] maybe it's just not yet implemented?
12:13 jnthn That'd be odd given the thing from the slides was a working example
12:13 jnthn I think I maybe even live-demo'd it.
12:13 [ptc] jnthn: true. duh
12:13 jnthn oh...
12:13 jnthn What if you toss the "module Bar;" at the top?
12:13 [ptc] however, the code I posted still doesn't recognize the EXPORT
12:13 [ptc] ah, I'll give that a go
12:14 [ptc] tada!
12:14 [ptc] yup, that was it
12:14 [ptc] jnthn++   thanks!
12:15 dalek rakudo/nom: aba283d | jnthn++ | tools/build/Makefile-JVM.in:
12:15 dalek rakudo/nom: Include native arrays in the JVM build.
12:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aba283dd0b
12:15 vendethiel jnthn: I'm not sure I understand what happened. You tossed the empty file but added it to the makefile-jvm?
12:16 vendethiel ah, native-array vs native_array
12:16 vendethiel I'll read better next time :-)
12:17 vendethiel m: sub x(*@, *%_) { say %_.perl }; x 1, :cmp-fa['D'];
12:17 camelia rakudo-moar d23557: OUTPUT«("cmp-fa" => ["D"]).hash␤»
12:17 * vendethiel had no idea :foo[] worked :)
12:18 dalek rakudo/nom: ac45046 | jnthn++ | t/spectest.data:
12:18 dalek rakudo/nom: Turn on two now-passing native array tests on JVM.
12:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac45046158
12:18 jnthn vendethiel: Yes, you figured it :)
12:19 [ptc] jnthn: sorry to ask so many questions, however, when is it appropriate/necessary to use 'module Bar;'?
12:21 kjs_ joined #perl6
12:24 grondilu joined #perl6
12:25 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)␤»
12:25 grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: <a b> Z=> ^2;
12:25 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␤␤»
12:25 grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: |(<a b> Z=> ^2);
12:25 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␤␤»
12:25 grondilu ^thought something like that would work
12:26 jnthn |%(...)
12:26 grondilu m: class Foo { has ($.a, $.b) }; say Foo.new: |%(<a b> Z=> ^2);
12:26 camelia rakudo-moar d23557: OUTPUT«Foo.new(a => 0, b => 1)␤»
12:26 grondilu indeed
12:26 jnthn [ptc]: Certainly if you are going to have our-scoped things
12:27 jnthn [ptc]: If you don't give it a name you also can't really do the need/import split either
12:28 dalek nqp: d835e93 | jnthn++ | src/vm/jvm/runtime/org/perl6/nq​p/sixmodel/SixModelObject.java:
12:28 dalek nqp: Sync errors to get native num array tests happy.
12:28 dalek nqp: review: https://github.com/perl6/nqp/commit/d835e93805
12:32 dalek rakudo/nom: 5941479 | jnthn++ | tools/build/NQP_REVISION:
12:32 dalek rakudo/nom: Bump NQP_REVISION for JVM error message fixes.
12:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5941479133
12:32 dalek rakudo/nom: 7203f2f | jnthn++ | t/spectest.data:
12:32 dalek rakudo/nom: Run S09-typed-arrays/native-num.t on JVM.
12:32 dalek rakudo/nom:
12:32 dalek rakudo/nom: Passes everything that Rakudo on MoarVM does.
12:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7203f2fbaa
12:39 rmgk_ joined #perl6
12:41 kjs_ joined #perl6
12:41 [ptc] jnthn: thanks for the explanation.  Now I need it to sink in a bit, then I'll add something to the docs
12:50 dalek doc: c970f64 | moritz++ | lib/Language/variables.pod:
12:50 dalek doc: Mention that subs are my-scoped by default
12:50 dalek doc: review: https://github.com/perl6/doc/commit/c970f649f7
12:54 FROGGS jnthn++ and moritz++ # being productive
12:54 eli-se joined #perl6
12:55 airdisa joined #perl6
12:55 zakharyas joined #perl6
12:56 larion joined #perl6
13:02 RabidGravy joined #perl6
13:03 vendethiel did TimToady++ comment on that [Zeqv] | ..., btw? I didn't see anything in the backlog
13:11 airdisa joined #perl6
13:12 [Sno] joined #perl6
13:12 dalek nqp: 045b91f | jnthn++ | src/vm/jvm/runtime/org/perl6​/nqp/sixmodel/Serialization (2 files):
13:12 dalek nqp: Partly port parameterized type serialization.
13:12 dalek nqp:
13:12 dalek nqp: This gets enough of it in place for fixing RT#124162 on Rakudo JVM.
13:12 dalek nqp: The rest implemeneted on Moar needs more testing/exploration, so will
13:12 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124162
13:12 dalek nqp: port it once I'm happy it's correct.
13:12 dalek nqp: review: https://github.com/perl6/nqp/commit/045b91fce6
13:14 raiph joined #perl6
13:17 dalek nqp: 3110921 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/​sixmodel/reprs/VMArrayInstance_u (3 files):
13:17 dalek nqp: Fix copy-pasta in unsigned native int array bits.
13:17 dalek nqp: review: https://github.com/perl6/nqp/commit/3110921bf3
13:18 dalek rakudo/nom: ac6bd9a | jnthn++ | tools/build/NQP_REVISION:
13:18 dalek rakudo/nom: Bump NQP_REVISION for JVM serialization/array fix.
13:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac6bd9a345
13:18 dalek rakudo/nom: 8d8b5be | jnthn++ | t/spectest.data:
13:18 dalek rakudo/nom: Run S09-typed-arrays/native-int.t on JVM.
13:18 dalek rakudo/nom:
13:18 dalek rakudo/nom: It now passes all that Rakudo on MoarVM does, bringing native array
13:18 dalek rakudo/nom: support on JVM up to parity with Moar.
13:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8d8b5be2da
13:19 dalek roast: ac04404 | jnthn++ | S10-packages/precompilation.t:
13:19 dalek roast: Unfudge RT #124162 test on JVM.
13:19 dalek roast: review: https://github.com/perl6/roast/commit/ac04404f9b
13:19 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124162
13:19 FROGGS tadzik: I'm going to merge panda/eleven I think... https://github.com/tadzik/panda/compare/eleven
13:23 tadzik FROGGS: go for it :)
13:24 FROGGS \o/
13:24 FROGGS done :o)
13:25 tadzik woot
13:25 tadzik so now we have to make the entire ecosystem do "provides" :)
13:27 masak good afternoon, #perl6
13:28 timotimo hello
13:28 timotimo FROGGS: for the weekly you'll have to give me a summary of the new cool tricks panda has just learned :)
13:34 FROGGS tadzik: aye
13:35 FROGGS timotimo: will do
13:35 masak how do I configure and build Rakudo with a specific Moar commit?
13:36 * 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
13:37 masak yeah, looks like
13:37 masak gonna try bisecting RT #124191 on the moar side
13:37 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
13:38 [Tux] can a method inside a class have a different sink than the class itself?
13:39 [Tux] masak++; # working on that ticket
13:39 masak "different sink"?
13:40 [Tux] using a method in void context
13:40 [Tux] I can of course give that method its own (sub_class
13:40 jnthn You'd return an object with a sink method on it.
13:41 masak --gen-moar=2015.03 worked... but only from a fresh clone of rakudo
13:42 coffee` joined #perl6
13:43 masak make: *** No rule to make target `m-all', needed by `all'.  Stop.
13:43 masak huh.
13:43 masak am I configuring stuff wrong?
13:44 masak 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:45 moritz masak: well, I'm sure there's an error message somewhere about nqp not having the desired moar revision
13:46 moritz 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:49 larion joined #perl6
13:50 dalek specs: 125d6ea | moritz++ | S11-modules.pod:
13:50 dalek specs: S11: include & sigil in explicit import list
13:50 dalek specs:
13:50 dalek specs: we probably cannot get away with guessing if a sub or a sigilless term
13:50 dalek specs: (like a type or constant) was meant
13:50 synopsebot Link: http://design.perl6.org/S11.html#include
13:50 dalek specs: review: https://github.com/perl6/specs/commit/125d6ea354
13:52 kaare_ joined #perl6
13:55 dalek doc: 4a50873 | paultcochrane++ | lib/Language/5to6.pod:
13:55 dalek doc: Document selectively importing functions from modules
13:55 dalek doc: review: https://github.com/perl6/doc/commit/4a50873de2
13:55 dalek doc: f0ce071 | paultcochrane++ | lib/Language/variables.pod:
13:55 dalek doc: Merge branch 'master' of github.com:perl6/doc
13:55 dalek doc: review: https://github.com/perl6/doc/commit/f0ce0717e2
13:56 Akagi201 joined #perl6
13:58 jnthn std: state $i++
13:58 camelia std 28329a7: OUTPUT«ok 00:00 136m␤»
13:58 jnthn m: state $i++
13:58 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␤»
13:58 jnthn TimToady: Is STD correct on this one? ^^
14:00 vendethiel ( http://irclog.perlgeek.de/p​erl6/2015-03-27#i_10351579 for my question earlier )
14:02 [ptc] moritz: considering your comments to Tom Browder via p6u, would you be able to review commit 4a50873 on perl6/doc, please?
14:02 [ptc] moritz: I don't want to cause more confusion by writing incorrect docs
14:06 larion joined #perl6
14:06 lucas_ joined #perl6
14:08 skids joined #perl6
14:09 lucas_ m: sub f {...}; say 42 if f(); say "ok"
14:09 camelia rakudo-moar 8d8b5b: OUTPUT«ok␤»
14:09 lucas_ ^^^ Stub code don't die if executed in conditional?
14:10 jnthn Use !!! to die
14:10 jnthn ... fails, and testing a failure as a boolean dis-arms it
14:10 lucas_ Oh! I, see. Thanks.
14:11 lucas_ 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/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15830  (/home/camelia/rakudo-inst-1/share/p​erl6/runtime/CORE.setting.moarvm:s…»
14:11 airdisa joined #perl6
14:12 lucas_ strange... In my terminal it just printed False, and didn't die
14:15 lucas_ m: sub f {...}; say f().Bool
14:15 camelia rakudo-moar 8d8b5b: OUTPUT«False␤»
14:17 vendethiel m: sub foo($a){say $a}; foo (1, 2, 3)
14:17 camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3␤»
14:17 vendethiel m: sub foo(*@a){say @a.perl}; foo (1, 2, 3)
14:17 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3)␤»
14:17 * vendethiel certainly expected a list of list here...
14:19 jnthn **@a
14:19 lucas_ m: say {...}().Bool
14:19 camelia rakudo-moar 8d8b5b: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15830  (/home/camelia/rakudo-inst-1/share/p​erl6/runtime/CORE.setting.moarvm:s…»
14:19 vendethiel I expect "foo (1, 2)" to pass a single argument -- "as opposed to perl5"
14:19 jnthn vendethiel: Yes, it does
14:20 jnthn 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)
14:20 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3, 4, 5, 6)␤»
14:20 vendethiel oke, fair enough
14:20 vendethiel m: sub foo(**@a){say @a.perl}; foo (1, 2, 3)
14:20 camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3)␤»
14:20 jnthn vendethiel: Either pass an item ([...] instead of (...)) or use **@a
14:20 vendethiel m: sub foo(**@a){say @a.perl}; foo (1, 2, 3), (4, 5, 6)
14:20 camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
14:20 vendethiel right
14:21 timotimo hmm, i'm having some problems with HTTP::Server::Async
14:28 dalek rakudo/nom: 1812530 | jnthn++ | src/Perl6/Grammar.nqp:
14:28 dalek rakudo/nom: Ensure "trusts" doesn't backtrack on bad type.
14:28 dalek rakudo/nom:
14:28 dalek rakudo/nom: This avoids the confusion described in RT #117859.
14:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/18125302f5
14:28 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117859
14:30 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 }␤»
14:30 lucas_ ^^^ To me, this is a little LTA, because the block is not missing, it's there.
14:31 kjs_ joined #perl6
14:31 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␤»
14:31 jnthn We shoudl nab that'n :)
14:32 jnthn mebbe I'll do it later...but walk/errands now :)
14:32 jnthn bbiab
14:33 eiro joined #perl6
14:34 [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:37 timotimo cool, it seems like i fixed the problem in HTTP::Server::Async
14:42 Ven joined #perl6
14:42 Ven Is there a way do deconstruct a multi-level list?
14:42 Ven m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @b.perl; # something like that (yes, I know this gets flattened)
14:42 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
14:44 grondilu m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @@b
14:44 camelia rakudo-moar 8d8b5b: OUTPUT«␤»
14:44 grondilu m: my (@a; @b; @c) = (1,2,3;4,5,6;7); say @a
14:44 camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3 4 5 6 7␤»
14:44 Ven yep
14:45 grondilu m: my (@a, @b, @c) = (1,2,3;4,5,6;7); say @b
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«␤»
14:45 eli-se What is a multilevel list?
14:45 Ven an incorrect term
14:45 timotimo m: my (@a; @b; @c) := (1,2,3;4,5,6;7); say @b.perl;
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«Type check failed in binding @c; expected 'Positional' but got 'Int'␤  in block <unit> at /tmp/DkW14TGG6l:1␤␤»
14:45 eli-se m: (1,2,3;4,5,6;7).perl.say
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«(1, 2, 3; 4, 5, 6; 7)␤»
14:45 timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).lol; say @b.perl;
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
14:45 timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).lol; say @a.perl;
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(ListIter.new)␤»
14:45 timotimo m: my (@a; @b; @c) = (1,2,3;4,5,6;7).tree; say @b.perl;
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new()␤»
14:45 timotimo bleh
14:45 grondilu r you sure u can use semicolons in the my?
14:45 Ven m: say (1, 2, 3; 4, 5, 6; 7, 8, 9)[*,2]; # eli-se
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«1 2 3 4 5 6 7 8 9 7 8 9␤»
14:45 grondilu std: my (@a; @b)
14:45 Ven m: say (1, 2, 3; 4, 5, 6; 7, 8, 9)[*;2]; # eli-se
14:45 camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
14:45 camelia rakudo-moar 8d8b5b: OUTPUT«3 6 9␤»
14:46 * grondilu thought these stuff were NYI
14:46 Ven grondilu: not since the lollipop :)
14:47 eli-se Ven: I got parameters to work!
14:47 Ven is the execution order defined? :P
14:47 Ven and "as expected"
14:48 Ven (as in, not ml or ocaml-like)
14:49 eli-se parameters are never executed
14:50 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
14:50 camelia rakudo-moar 8d8b5b: OUTPUT«Array.new(1, 2, 3)␤»
14:50 lucas_ m: -> *@a { say @a.perl }(1;2;3) # why this is not ok?
14:50 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 #perl6
14:51 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 masak oh!
14:52 masak 'You asked me to build 2015.03, but 2015.03 is not new enough to satisfy version 2015.03-16-ga752064'
14:52 masak yeah, that explains it. moritz++
14:52 masak I thought I could magically avoid having nqp track the moar dependencies. in retrospect, that was unrealistic of me to expect. :)
14:52 masak will try again later with a bit more realism.
15:00 lustlife joined #perl6
15:01 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 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
15:01 RabidGravy in summary:
15:01 RabidGravy ==> Installing System::Passwd
15:01 RabidGravy ==> Successfully installed System::Passwd
15:01 RabidGravy [jonathan@coriolanus ~]$ find /home/jonathan/.rakudobrew | grep Passwd
15:01 RabidGravy [jonathan@coriolanus ~]$
15:01 timotimo RabidGravy: froggs merged the eleven branch
15:02 * 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
15:02 timotimo hum
15:04 timotimo i haven't updated yet
15:05 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 #perl6
15:08 timotimo oh, oof, an ASAN barf during HTTP::Server::Async run
15:12 dustinm` joined #perl6
15:12 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␤»
15:12 skids j: 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-jvm 181253: OUTPUT«Pointer<NULL>␤True␤»
15:13 FROGGS RabidGravy: ping
15:14 RabidGravy yo
15:14 FROGGS RabidGravy: you can't actually 'use' System::Passwd ?
15:15 RabidGravy nope
15:15 RabidGravy [jonathan@coriolanus ~]$ perl6
15:15 RabidGravy > use System::Passwd;
15:15 RabidGravy Could not find System::Passwd in any of: /home/jonathan/.rakudobrew/moa​r-nom/install/share/perl6/lib, /home/jonathan/.rakudobrew/m​oar-nom/install/share/perl6, /home/jonathan/.rakudobrew/moa​r-nom/install/share/perl6/site
15:15 timotimo tony-o: can i bother you about some HTTP::Server::Async things?
15:16 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
15:16 yoleaux timotimo: I'll pass your message to tony-o.
15:16 RabidGravy FROGGS, True
15:17 noganex joined #perl6
15:18 FROGGS RabidGravy: can you gist your: cat $(perl6 -e 'say %*CUSTOM_LIB<site> ~ "/MANIFEST"')
15:18 FROGGS RabidGravy: that is your installation "database"
15:19 RabidGravy yep 'ang on
15:19 FROGGS no 'oblem :o)
15:20 [particle] joined #perl6
15:20 FROGGS I've not tested rakudobrew with my panda change yet...
15:20 FROGGS perhaps I should
15:20 RabidGravy FROGGS, https://gist.github.com/jonat​hanstowe/7da9509c9225d2544731
15:21 FROGGS ahh!
15:21 FROGGS so it got installed, but System::Passwd lacks a "provides" section in its meta file
15:21 zakharyas joined #perl6
15:24 timotimo hehe, ouch
15:24 timotimo many of our modules still have a strike-through s11 badge on modules.perl6.org
15:24 timotimo it would be nice if you put a big red output in the installation process if there's no "provides" section
15:26 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...
15:26 FROGGS RabidGravy: I PR'd it: https://github.com/dnmfarrell/System-Passwd/pull/2
15:26 RabidGravy cool, just testing that
15:28 lustlife joined #perl6
15:29 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
15:30 RabidGravy better fix Linux::Fuser too then ;-)
15:30 FROGGS fix all things, aye
15:33 tinyblak joined #perl6
15:34 FROGGS I'll smoke the ecosystem in a bit
15:42 DrForr Are there examples yet for NativeCall callbacks?
15:44 timotimo sure
15:44 timotimo in the nativecall tests, for example; also GTK::Simple has some
15:44 DrForr Okay, I'll dig in there. Thanks.
15:44 FROGGS http://doc.perl6.org/language/​nativecall#Function_arguments
15:45 DrForr Oh, I missed it. Too short and succinct :)
15:46 RabidGravy Okay it's all going a bit crispy ducked here
15:46 RabidGravy Compiling lib/Linux/Fuser/Procinfo.pm6 to mbc
15:46 RabidGravy ===SORRY!===
15:46 RabidGravy Missing or wrong version of dependency 'src/gen/m-CORE.setting'
15:46 airdisa joined #perl6
15:47 timotimo you probably need to rebootstrap to get a clean rebuild of every module and so on?
15:47 * timotimo afk for a bit
15:50 FROGGS RabidGravy: I expected some fallout when merging the panda branch tbh
15:51 FROGGS but without testers it would never have matured enough and would never have been merged
15:51 RabidGravy all good
15:53 RabidGravy yikes
15:53 RabidGravy [jonathan@coriolanus System-Passwd]$ rakudobrew build-panda
15:53 RabidGravy Already up-to-date.
15:53 RabidGravy No need to rebootstrap, running normal bootstrap
15:53 RabidGravy ==> Bootstrapping Panda
15:53 RabidGravy ===SORRY!===
15:53 RabidGravy Missing or wrong version of dependency 'src/gen/m-Metamodel.nqp'
15:55 mr-foobar joined #perl6
15:57 RabidGravy I think it's rm -rf ~/.rakudobrew and start again
15:58 FROGGS ohh, rebootstrap might be broken... I guess it does not delete the right files...
16:01 airdisa joined #perl6
16:01 tictac joined #perl6
16:05 dalek rakudo/nom: 334ee5a | jnthn++ | src/Perl6/Actions.nqp:
16:05 dalek rakudo/nom: Toss long-unused code path in EXPR.
16:05 dalek rakudo/nom:
16:05 dalek rakudo/nom: The :pirop<...> use in EXPR had already been replaced by the portable
16:05 dalek rakudo/nom: :op<...> everywhere even prior to Parrot support being suspended, so
16:05 dalek rakudo/nom: we've likely not needed this for at least a year or two.
16:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/334ee5a95b
16:06 dalek rakudo/nom: 1d58b0a | jnthn++ | src/Perl6/Grammar.nqp:
16:06 dalek rakudo/nom: Throw typed exception for trusts with undecl type.
16:06 dalek rakudo/nom:
16:06 dalek rakudo/nom: This means the error improves and also gets typo suggestions. Added a
16:06 dalek rakudo/nom: way to get typo_typename to panic rather than sorry; in the case of
16:06 dalek rakudo/nom: trusts, we can't go on really, since we'll crash and burn in the
16:06 dalek rakudo/nom: action method.
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d58b0a881
16:07 dalek roast: d4c5764 | jnthn++ | S32-exceptions/misc.t:
16:07 dalek roast: Test for RT #117859.
16:07 dalek roast: review: https://github.com/perl6/roast/commit/d4c5764e38
16:07 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117859
16:08 Perl6_newbee joined #perl6
16:12 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␤»
16:12 TimToady m: my $i.++
16:12 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…»
16:12 TimToady it's even *looking* for a postfix right there, hmm....
16:13 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…»
16:14 TimToady now it's even looking for a constraint :)
16:14 jnthn :)
16:14 jnthn TimToady: I also was looking at the "min/max don't whatever-curry" RT
16:14 TimToady how is 'my $i' not parsed as a term, I wonder
16:15 jnthn TimToady: Turns out that we don't whatever-curry *any* list-associative operation
16:15 jnthn TimToady: Which is sane in general I guess...
16:15 TimToady huh
16:15 jnthn Is that "huh" as in "why not", or "huh" as in "why are min/max list assoc"? :)
16:15 TimToady why not
16:16 masak m: my &between = 1 < * < 10; say &between(5); say &between(17)
16:16 camelia rakudo-moar 181253: OUTPUT«True␤False␤»
16:16 masak oh, that's chaining, not list-associative.
16:16 jnthn That's chaining, not list assoc.
16:16 masak right.
16:16 jnthn Well, I don't know the deep reason "why not" or if there is one
16:17 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.
16:17 jnthn Sure
16:17 jnthn Anyway, I looked thinking it may be an easy fix and then discovered this, so... :)
16:17 * TimToady looks around for someone smart...
16:17 * jnthn picked off a serialization thing yesterday, so decided to do easier things today :)
16:18 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␤------> 42 «7⏏5 43␤    expecting any of:␤        infix␤        infix stopper␤»
16:18 jnthn m: 42 << 43
16:18 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␤------> 42 <<7⏏5 43␤»
16:18 airdisa joined #perl6
16:18 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⏏0]␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
16:18 TimToady ^that error changed
16:19 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⏏0]␤    expecting any of:␤        infix stopper␤        infix or meta-infix␤        bracketed infix␤»
16:19 * jnthn has a hard time deciding if we've improved or not there :)
16:20 TimToady yes, but I decided that error messages based on backtracking out of infixes like that was probably a by too dwimmy
16:20 TimToady the new message actually communicates what went wrong
16:21 TimToady *a bit too
16:21 FROGGS RabidGravy: I'll fix the rebootstrap issue in a bit
16:21 jnthn Yeah, I was pondering <after <?[@]> <variable>> but that's probably a bad idea :)
16:22 jnthn Uh, and probably doesn't work :)
16:23 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: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
16:23 masak guess I'll have to go further back.
16:24 jnthn masak: You might be going a very long way back... :)
16:24 jnthn masak: Worth a try, though :)
16:24 RabidGravy FROGGS, cool. I'm going to stop breaking shit now.
16:24 masak yeah. I'll keep digging.
16:27 FROGGS RabidGravy: this is the warning that will be shown: https://gist.github.com/FR​OGGS/0ee4c44089fd095e2c43
16:27 FROGGS @all, please check my English: https://gist.github.com/FR​OGGS/0ee4c44089fd095e2c43
16:28 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*
16:28 FROGGS k
16:28 nwc10 and mapping every exposed namespace
16:29 [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.
16:29 FROGGS nwc10: updated
16:29 FROGGS suggestion?
16:29 nwc10 I think it would be clearer to write it: add a "provides" section
16:30 nwc10 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
16:30 FROGGS :o)
16:30 FROGGS updated again
16:31 nwc10 I can't spot anything further to suggest
16:31 FROGGS awesome :o)
16:31 FROGGS nwc10: thanks
16:33 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 rakudo/nom: 102d924 | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
16:33 dalek rakudo/nom: add warning for non-S11-compliant dist installs
16:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/102d924b58
16:33 nwc10 mmm, yes, agree
16:33 RabidGravy depending on the tone you want to use :)
16:33 FROGGS hmm
16:33 nwc10 I think "Please ask the author" is the more appropriate tone
16:34 nwc10 maybe I need more coffee?
16:34 RabidGravy or more beer
16:34 nwc10 at this time of day, beer might be less inappropriate
16:35 dalek rakudo/nom: a087815 | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
16:35 dalek rakudo/nom: fix phrasing in S11-compliance warning, RabidGravy++
16:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a08781597d
16:35 [Tux] current nom checkout causes Inline::Perl5 to fail:
16:35 [Tux] t/exceptions.t ................ ok
16:35 [Tux] ===SORRY!===
16:35 [Tux] Could not find File::Temp in any of:
16:35 FROGGS [Tux]: you also updated panda?
16:36 [Tux] yes, rakudobrew does that automatically
16:36 FROGGS ahh
16:36 [Tux] and bin/panda fails, but the real panda passes
16:36 FROGGS I broke that... and I'll fix it now
16:36 FROGGS first I'll fix rebootstrap
16:37 spider-mario joined #perl6
16:38 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␤------> 42 +7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
16:38 TimToady jnthn: ^^ is an AdHoc 'cuz I couldn't figure out how to call anything other than .panic in HLL/Grammar
16:40 FROGGS TimToady: you call a method in HLL::Grammar that you override in Perl6::Grammar which then will throw a typed exception
16:41 * TimToady is too lazy to write a typed panic method :)
16:41 FROGGS :o)
16:43 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:45 darutoko- joined #perl6
16:48 TimToady so I don't really know why the first one "works"
16:48 TimToady m: sub f(*@a) { say @a.perl }; f(1;2;3,:huh)
16:48 camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
16:48 TimToady m: sub f(*@a) { say @a.perl }; f(1,:huh;2;3)
16:48 camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
16:49 TimToady works by ignoring pairs, apparently
16:49 TimToady m: sub f(*@a) { say @a.perl }; f((1;2;3))
16:49 camelia rakudo-moar 1d58b0: OUTPUT«Array.new(1, 2, 3)␤»
16:49 TimToady m: sub f(*@a) { say @a.perl }; f(:huh,(1;2;3))
16:49 camelia rakudo-moar 1d58b0: OUTPUT«Unexpected named parameter 'huh' passed␤  in sub f at /tmp/_0L2ueIECd:1␤  in block <unit> at /tmp/_0L2ueIECd:1␤␤»
16:50 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:51 TimToady m: say \(1;2;3).perl
16:51 camelia rakudo-moar a08781: OUTPUT«\(1, 2, 3)␤»
16:51 kjs_ joined #perl6
16:51 TimToady m: say \(1,2,3;4,5,6).perl
16:51 camelia rakudo-moar a08781: OUTPUT«\(1 2 3, 4 5 6)␤»
16:52 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)␤»
16:52 TimToady m: sub f(**@a) { say @a.perl }; f(1;2;3,4,5)
16:52 camelia rakudo-moar a08781: OUTPUT«(1; 2; 3, 4, 5)␤»
16:52 TimToady m: sub f(**@a) { say @a.perl }; f(:huh;1;2;3,4,5)
16:52 camelia rakudo-moar a08781: OUTPUT«(; 1; 2; 3, 4, 5)␤»
16:53 TimToady something's really off there...
16:53 TimToady I wonder what we break if we fix that to not "work"
16:53 masak probably nothing
16:54 TimToady .oO("Those words fall too easily from your lips.")
16:56 masak they do because I'm not aware of any ecosystem code that uses multidim arguments.
16:56 [Tux] ==> Testing Shell::Command
16:56 [Tux] ===SORRY!===
16:56 [Tux] No object at index 296
16:57 [Tux] I'll return to testing later ...
17:00 dalek rakudo/nom: 0062fb0 | timotimo++ | src/core/IO/Socket/Async.pm:
17:00 dalek rakudo/nom: chase on_demannd -> on-demand change
17:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0062fb0146
17:02 jnthn TimToady: Sorry, was away nomming. :) Seems FROGGS++ answerd the question though :)
17:03 jnthn The main motivation I have for making things typed exceptions is more robust testing.
17:04 FROGGS RabidGravy: rebootstrap should be fixed now
17:04 FROGGS now I'll check rakudobrew
17:05 vendethiel *
17:06 RabidGravy [Tux], I was getting that self same thing, hitting it again it works
17:08 simcop2387 joined #perl6
17:11 jferrero joined #perl6
17:12 atweiden joined #perl6
17:13 tinyblak joined #perl6
17:16 dalek rakudo/nom: 1554f94 | jnthn++ | / (3 files):
17:16 dalek rakudo/nom: Add 'use nqp' in NativeCall.
17:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1554f9440c
17:17 FROGGS rakudobrew build-panda still fails :o(
17:17 RabidGravy just worked for me
17:17 vendethiel TimToady: is there a way to "unpack" a multi-dimensional list?
17:18 vendethiel 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 #perl6
17:19 eli-se joined #perl6
17:20 FROGGS I also get:
17:20 FROGGS ==> Testing Shell::Command
17:20 FROGGS ===SORRY!===
17:20 FROGGS No object at index 296
17:20 airdisa_ joined #perl6
17:22 airdisa__ joined #perl6
17:22 FROGGS damn, a second attempt and it just worked :o(
17:22 [Tux] yyes, what RabidGravy said
17:22 FROGGS that does not make it easier to hunt down
17:24 FROGGS anyway, I'm looking forward to stubbing the news for p6weekly :o)
17:26 dalek rakudo/nom: 9cd98ed | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
17:26 dalek rakudo/nom: fix installed runners for Windows PowerShell
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9cd98ed5de
17:26 FROGGS for example that one gets a panda-m and panda-j for free when installing a panda binary
17:26 FROGGS (or any other binary)
17:27 * TimToady testing a fix for state $i++
17:34 dalek rakudo/nom: 2c406ae | jnthn++ | / (3 files):
17:34 dalek rakudo/nom: Add "use nqp;" to Test.pm.
17:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2c406aedd1
17:34 dalek rakudo/nom: 6c23fdd | jnthn++ | lib/Test.pm:
17:34 dalek rakudo/nom: Eliminate a bunch of boxing in Test.pm.
17:34 dalek rakudo/nom:
17:34 dalek rakudo/nom: The main goal being clearing up the code a good bit by removing 50
17:34 dalek rakudo/nom: nqp::box_n ops.
17:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c23fdd4b6
17:35 timotimo ho-hum. HTTP::Server::Async fails its tests :\
17:35 [Tux] https://gist.github.com/Tux/1ec0ca6a12ef07da21c1 <= this weekend's mission complete
17:36 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…»
17:36 timotimo m: unless (True) { } else { }
17:36 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 { }␤»
17:36 timotimo locally i seemed to get a "strange text after block" here
17:36 timotimo i wonder why
17:37 timotimo m: unless (True) { } elsif False { } else { }
17:37 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 { }␤»
17:37 timotimo ah
17:37 timotimo there we go
17:37 timotimo ^- this is up for grabs, i'm playing a video game now :P
17:37 jnthn [Tux]: Nice. And...yay Øl! :)
17:41 timotimo tadzik: please click merge here thanks https://github.com/tadzik/Template-Mojo/pull/13
17:50 dalek rakudo/nom: 7700536 | jnthn++ | lib/Pod/To/Text.pm:
17:50 dalek rakudo/nom: Avoid needless nqp:: use in Pod::To::Text.
17:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7700536a69
17:50 sirdancealot joined #perl6
17:53 dalek roast: 8c7f664 | TimToady++ | S03-operators/increment.t:
17:53 dalek roast: postfixes should be allowed on declarators
17:53 dalek roast: review: https://github.com/perl6/roast/commit/8c7f664ab1
17:53 dalek roast: 36462ed | TimToady++ | S32-exceptions/misc.t:
17:53 dalek roast: unless elsif should throw same as unless else
17:53 dalek roast: review: https://github.com/perl6/roast/commit/36462ed063
17:54 retupmoca FROGGS: I don't think the "provides" stuff is working right on windows
17:54 retupmoca looks like maybe it's trying to match "path/to/file" against 'path\to\file' and failing?
17:56 dalek rakudo/nom: 9490711 | TimToady++ | src/Perl6/Grammar.nqp:
17:56 dalek rakudo/nom: MARKED('ws') doesn't always mean there was ws
17:56 dalek rakudo/nom:
17:56 dalek rakudo/nom: It just means someone called <.ws> there.  To know whether there really
17:56 dalek rakudo/nom: was whitespace there (to fail postfix parsing, for instance) we also
17:56 dalek rakudo/nom: must check to see if position changed.
17:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/949071144f
17:56 dalek rakudo/nom: 99a62f3 | TimToady++ | src/Perl6/Grammar.nqp:
17:56 dalek rakudo/nom: unless elsif should die like unless else does
17:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/99a62f374f
17:56 TimToady timotimo++ btw
17:57 timotimo thx :)
17:57 TimToady and jnthn++ for noticing state $i++ was busticationalized
18:01 tadzik timotimo: oh, heh. It's like this thing needs tests or something :P
18:01 timotimo yes
18:02 tadzik I should get myself some dedicated opensource time now that I'll be jobless for a while
18:04 timotimo :)
18:04 timotimo opensource time is always good
18:04 jnthn Quick poll
18:04 timotimo jobless could be good or bad
18:04 jnthn For nqp:: used without a "use nqp" do we want to put in a deprecation notice for a while?
18:04 jnthn Or is it rare enough in the ecosystem we can just start needing it?
18:05 * jnthn has got our ducks straight with the modules inside of the Rakudo repo, which was step one... :)
18:08 itz joined #perl6
18:12 moritz jnthn: deprecation notice
18:13 moritz it's in 32 different files in the ecosystem
18:13 jnthn moritz++ # hoped somebody would pop up with a number like that :)
18:14 jnthn I'll work on it once the FROGGS++ panda merge dust has settled, so we can tell any dust clouds apart :)
18:15 moritz ♪ dust in the wind \n all we are is dust in the wind ♩
18:16 TimToady grondilu: I enlarged upon your bitmap comment :)
18:18 TimToady moritz: is this primarily something like nqp::decont?  or are people cheating all over for performance?
18:18 jack_rabbit joined #perl6
18:20 grondilu TimToady: that's a bit cryptic
18:20 TimToady why it's in parens :)
18:21 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
18:21 timotimo :)
18:22 raiph joined #perl6
18:22 dalek roast: a23f42d | jnthn++ | S04-declarations/state.t:
18:22 dalek roast: Unfudge state $x++ related tests.
18:22 dalek roast:
18:22 dalek roast: TimToady++ did the fixes. This includes unfuding the tests covering
18:22 dalek roast: RT #115614.
18:22 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=115614
18:22 dalek roast: review: https://github.com/perl6/roast/commit/a23f42d1ce
18:23 moritz TimToady: it's a mixture of performance mongering and low-level stuff that we don't expose properly
18:24 TimToady was just wondering what would be easy to expose properly, like decont
18:24 jnthn moritz: Is it easy to get a list?
18:24 moritz jnthn: just a sec
18:24 lucas_ TimToady: I was away; thanks for the explanation.
18:24 TimToady we'd like to not give people good excuses for using nqp :)
18:25 TimToady 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:26 lucas_ masakbot++ :)
18:26 moritz http://perlpunks.de/paste/show/5516f25a.4706.196
18:26 moritz list of nqp:: ops, and how often they are used
18:26 airdisa joined #perl6
18:27 moritz though v5 skews the picture
18:27 TimToady m: sub f(*@a) { say @a.perl }; f(1,:huh;2;3)
18:27 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3)␤»
18:27 TimToady jnthn: you have an opinion on this? ^^
18:27 TimToady moritz++
18:27 jnthn moritz: Hm, what if you exclude v5, ooc?
18:27 timotimo moritz: /me prefers sort -r
18:28 jnthn TimToady: Um...
18:28 jnthn m: sub f(|c) { say c.perl }; f(1;2;3)
18:28 camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3,))␤»
18:28 moritz jnthn: http://perlpunks.de/paste/show/5516f2d2.5db8.d6 with v5 excluded
18:29 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,))␤»
18:29 moritz git clone git@github.com:moritz/perl6-all-modules.git; 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
18:30 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,))␤»
18:30 jnthn m: sub f(|c) { say c.perl }; f(1, 2, :foo; 3, 4; 5, 6, :bar)
18:30 camelia rakudo-moar 99a62f: OUTPUT«Capture.new(list => (1, 2, 3, 4, 5, 6,))␤»
18:30 TimToady there it was, gone completely!
18:30 jnthn Hm, so we lose nameds as soon as we use the ; thingy
18:30 TimToady which is forced to mean , anyway
18:30 jnthn I was only semi-attentive when the ; stuff went in :S
18:31 TimToady well, seems like a parser issue, so maybe I'll look at it some
18:32 jnthn moritz: I suspect https://github.com/jnthn/rakudo-debugger/b​lob/master/lib/Debugger/UI/CommandLine.pm is to blame for some of 'em
18:32 TimToady m: sub f(*@a) { say @a.perl }; &f.(1,:huh;2;3)
18:32 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)␤»
18:32 TimToady odd that .() parses differently than ()
18:34 TimToady I buy the failure there, but the message is LTA
18:35 TimToady something on the order of: "Argument lists cannot be multi-dimensional; please use parens around the multi-dimensional part"
18:35 airdisa joined #perl6
18:36 jnthn TimToady: Is there anywhere in the design where we allow multi-dim arg lists?
18:36 jnthn TimToady: Is it just a special case for within postcircumfixes?
18:36 jnthn Well, postcircumfix:<[ ]> of note...
18:37 TimToady I wasn't aware we allowed it anywhere, till lucas_++ pointed it out
18:37 TimToady might've been hacked in to support zip though
18:38 jnthn I wasn't either really :)
18:38 TimToady m: say zip(:oops, 1,2,3; <a b c>)
18:38 camelia rakudo-moar 99a62f: OUTPUT«1 a 2 b 3 c␤»
18:38 TimToady yeah, probably for that
18:38 jnthn Does zip actually get a LoL there?
18:38 jnthn Oh
18:38 TimToady m: say zip((:oops, 1,2,3), <a b c>)
18:38 camelia rakudo-moar 99a62f: OUTPUT«oops => True a 1 b 2 c␤»
18:39 jnthn Ah
18:39 jnthn I guess it just makes a Parcel of each of the bits...
18:39 jnthn m: sub f(**@a) { say @a.perl }; f((1,2,3), (4,5,6))
18:39 camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
18:39 jnthn m: sub f(**@a) { say @a.perl }; f(1,2,3;4,5,6)
18:39 camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
18:39 TimToady I mean, we *could* just allow it, and then factor out any nameds, or not treat them as nameds, or something...
18:39 jnthn Aha.
18:40 jnthn 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,))␤»
18:40 jnthn OK, Capture.perl is confusing.
18:40 TimToady |c is somehow losing info?
18:40 jnthn I doubt it's the |c construction
18:40 jnthn Since that's pretty low-level
18:40 jnthn m: sub f(|c) { say c[0].perl }; f(1,2,3;4,5,6)
18:40 camelia rakudo-moar 99a62f: OUTPUT«(1, 2, 3)␤»
18:40 jnthn m: sub f(|c) { say c[1].perl }; f(1,2,3;4,5,6)
18:40 camelia rakudo-moar 99a62f: OUTPUT«(4, 5, 6)␤»
18:40 jnthn Yeah
18:41 TimToady m: sub f(|c) { say c.WHAT }; f(1,2,3;4,5,6)
18:41 camelia rakudo-moar 99a62f: OUTPUT«(Capture)␤»
18:41 jnthn It's constructed well.
18:41 jnthn m: sub f(|c) { say c.list.perl }; f(1,2,3;4,5,6)
18:41 camelia rakudo-moar 99a62f: OUTPUT«((1, 2, 3), (4, 5, 6)).list␤»
18:41 jnthn Hm, even that bit is OK
18:41 TimToady so Capture.perl is a bit off there
18:41 jnthn Oh, it does .map
18:41 jnthn That fixes itself post-GLR :P
18:42 TimToady mkay
18:42 jnthn ('cus .map won't flatten nested structure)
18:42 * TimToady hopes it fixes itself mid-GLR :P
18:42 jnthn It's curious nqp::time_n is top
18:42 jnthn Test.pm also uses that all over.
18:43 jnthn There's nothing we directly expose to get it
18:43 jnthn You can get an Instance.
18:43 jnthn *Instant
18:43 TimToady m: say nqp::time_n()
18:43 camelia rakudo-moar 99a62f: OUTPUT«1427568216.77227␤»
18:43 jnthn m: for ^10000 { nqp::time_n }; say now - INIT now
18:43 camelia rakudo-moar 99a62f: OUTPUT«0.0091418␤»
18:44 jnthn m: for ^10000 { now }; say now - INIT now
18:44 TimToady how boxetacious
18:44 camelia rakudo-moar 99a62f: OUTPUT«(timeout)»
18:44 jnthn ...
18:45 TimToady m: say nqp::time_n(), ' ', now
18:45 camelia rakudo-moar 99a62f: OUTPUT«1427568301.7068 Instant:1427568336.706801␤»
18:45 TimToady leap secs
18:45 jnthn Yeah
18:46 jnthn I still wonder why applying them is so costly...
18:46 * TimToady guesses the algorithm is not optimized for now-ish nows...
18:46 TimToady probably optimized for 1970 :)
18:46 jnthn If only we had a prof...oh yay :)
18:48 TimToady or maybe it's really silly and re-sums all the leap seconds between then and now every time...
18:49 jnthn Oh...
18:49 jnthn Well, it may be silly in that sense
18:50 jnthn 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 jnthn indeed
18:52 jnthn Yeah, it takes 6.7s to do 10,000 Num => Rat
18:52 jnthn hmm, curious
18:52 jnthn if nqp::isnanorinf(nqp::unbox_n(self)) {
18:52 jnthn return self;
18:52 jnthn }
18:52 jnthn That is at the top of it
18:52 jercos that seems... irrationally slow :P
18:52 jnthn But a little below
18:52 jnthn (self == Inf || self == -Inf) && fail("Cannot coerce Inf to a Rat");
18:52 jnthn Surely that's unreachable?
18:52 jnthn m: say Inf.Rat.WHAT
18:52 camelia rakudo-moar 99a62f: OUTPUT«(Num)␤»
18:53 jnthn m: say NaN.Rat.WHAT
18:53 camelia rakudo-moar 99a62f: OUTPUT«(Num)␤»
18:53 jnthn Yeah...
18:53 jnthn What *should* we do? :)
18:53 moritz yes, unreachable
18:54 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.
18:54 jnthn Returning a Failure when asked to coerce is also a tad anti-social...
18:55 jercos True. Return 1/0? :p
18:56 moritz die
18:57 moritz IMHO
18:57 moritz though I'm not a big follower of the fail() cult
18:57 jercos m: say (1/0).Num
18:57 camelia rakudo-moar 99a62f: OUTPUT«Inf␤»
18:57 jercos :p
18:58 jercos Hrm, shame, that doesn't work for 0/0 and NaN
18:59 jercos ...nor does that work for dividing two Nums, only for a Rat to a Num.
19:00 zby_home_ joined #perl6
19:01 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 #perl6
19:07 * 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.
19:07 timotimo jnthn: don't forget there's a lot to be gained back when we get lexical lowering with references to work :)
19:08 grondilu m: my @a = rand xx *
19:08 camelia rakudo-moar 99a62f: ( no output )
19:08 grondilu m: my @a = rand xx *; say @a[42]
19:08 camelia rakudo-moar 99a62f: OUTPUT«0.370145464497432␤»
19:09 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:10 prime joined #perl6
19:10 prime joined #perl6
19:10 grondilu m: my @a = map &sin, (0,.01 ... *);
19:10 camelia rakudo-moar 99a62f: OUTPUT«(timeout)»
19:10 eli-se m: say @[1, 2, 3]
19:10 camelia rakudo-moar 99a62f: OUTPUT«(Any) (Any) (Any)␤»
19:11 eli-se m: say ^@[1, 2, 3]
19:11 camelia rakudo-moar 99a62f: OUTPUT«0..^3␤»
19:11 eli-se Why does it print (Any) (Any) (Any) instead of 1 2 3?
19:11 grondilu because it's an empty, underined array
19:11 grondilu and anonymous
19:12 grondilu like with $
19:12 grondilu m: say $
19:12 camelia rakudo-moar 99a62f: OUTPUT«(Any)␤»
19:12 jnthn m: say 6.73 / 1.47
19:12 camelia rakudo-moar 99a62f: OUTPUT«4.578231␤»
19:12 eli-se :(
19:13 jnthn timotimo: Yes, that's on my "look at in the next few days" list :)
19:14 grondilu m: say (@ = ^3)[^3];
19:14 camelia rakudo-moar 99a62f: OUTPUT«0 1 2␤»
19:15 eiro joined #perl6
19:19 brrt joined #perl6
19:21 timotimo ok :)
19:22 dalek perl6-roast-data: 147bb14 | coke++ | / (9 files):
19:22 dalek perl6-roast-data: today (automated commit)
19:22 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/147bb14ed5
19:23 FROGGS retupmoca: looking at it now
19:23 moritz nqp-m: say nqp::time_n()
19:23 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/…»
19:23 moritz nqp-m: say(nqp::time_n())
19:23 camelia nqp-moarvm: OUTPUT«1427570621.68989␤»
19:23 moritz nqp-j: say(nqp::time_n())
19:23 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…»
19:23 moritz fun!
19:24 tadzik wow :)
19:24 moritz if that worked, I'd have suggested that 'time' should return a Num, not an Int
19:24 moritz then we could tell people to use 'time' instead of nqp::time_n
19:24 timotimo i don't even know why time gives an Int :\
19:25 moritz because p5 did?
19:25 grondilu returning an Int makes much more sense than a Num, imho
19:25 timotimo bleh, i say :)
19:25 moritz but src/vm/jvm/QAST/Compiler.nqp uses nqp::time_n
19:25 moritz grondilu: why?
19:25 moritz nqp-j: say(42)
19:25 camelia nqp-jvm: OUTPUT«(signal ABRT)*** Error in `java': double free or corruption (fasttop): 0x00007f88d8012fd0 ***␤*** Error in `java': double free or corruption (!prev): 0x00007f88d801a8c0 ***␤»
19:25 timotimo so you think we should offer a Timer::HighRes module?
19:26 moritz oh
19:26 moritz it seems nqp-j is simply broken right now
19:26 grondilu because reasons
19:26 moritz j: say 42
19:26 camelia rakudo-jvm 99a62f: OUTPUT«42␤»
19:26 moritz j: say nqp::p6box_n(nqp::time_n())
19:26 camelia rakudo-jvm 99a62f: OUTPUT«1.427570800856E9␤»
19:27 moritz j: say nqp::p6box_n(nqp::time_n() - nqp::time_i())
19:27 camelia rakudo-jvm 99a62f: OUTPUT«0.25099992752075195␤»
19:27 moritz ok, I'm doing the change now, and see what kind of spectest fallout we get
19:28 moritz S32::Temporal says Int
19:28 * jnthn is testing some Num.Rat perf improvements
19:30 raydiak afternoon, #perl6
19:31 FROGGS hi raydiak
19:31 hoelzro hello #perl6!
19:31 raydiak hey FROGGS...thanks for the reminder about that test, tis done :)
19:31 raydiak \o hoelzro
19:31 FROGGS raydiak++
19:31 FROGGS hi hoelzro
19:32 * 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:33 yqt joined #perl6
19:33 TimToady good thing you don't live in a desert...
19:34 raydiak I wish...this car would be dead by now if that were the case :)
19:35 raydiak 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:36 masak I'm happy to report that I've found a Rakudo revision where #124191 does not happen :)
19:36 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124191
19:36 masak now all that remains is the bisect.
19:36 masak slowly getting there.
19:38 zakharyas joined #perl6
19:39 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
19:39 camelia rakudo-moar 99a62f: OUTPUT«(1, Array.new(2, 3, 4), 5)␤»
19:40 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)␤»
19:40 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)
19:40 hoelzro masak++ # sleuthing
19:41 raydiak hoelzro: istr something like "use Perl6::Compiler:from<NQP>;"
19:42 jnthn TimToady: Dunno the original reasoning; probably because different backends/OSes give us it to different precisions/in different units
19:42 jnthn TimToady: I thought representing it as a floater was your idea from way back? :)
19:42 moritz a timeusec_i might be the solution
19:42 TimToady spec just says Real, with a slight pref for Rat
19:43 TimToady presumably anything that makes Num must already know the precision of the integer fractions of seconds
19:43 TimToady so it could be thrown into a denominator instead
19:44 TimToady 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
19:44 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
19:44 FROGGS raydiak: he needs the other way... loading a P6 module from nqp
19:44 TimToady since most Instant arithmetic will be subtraction
19:44 eli-se Is that special syntax or is it assigning a parcel to an array?
19:45 moritz eli-se: array assignment is coercive
19:45 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
19:45 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, [2, 3, 4], 5)␤Array.new(1, [2, 3, 4], 5)␤»
19:46 eli-se ok, this is very confusing
19:46 kjs_ joined #perl6
19:46 raydiak FROGGS: ah right
19:46 TimToady [] and $ are in containers that will never spontaneously decontainerize
19:47 TimToady Perl takes it's singular vs plural distinctions very seriously
19:47 eli-se How can I tell whether decontainerisation will happen?
19:48 TimToady generally, it doesn't in the absence of explicit instructions to the contrary
19:48 TimToady like saying @$xs
19:48 TimToady or $xs[]
19:49 TimToady after my @zs = (1, $xs, 5) @zs will *always* contain 3 elements, as an invariant
19:50 TimToady (unless you do deep dark magic to cheat)
19:51 hoelzro raydiak: I'm loading P6 code from NQP, though
19:51 hoelzro rather than the other way around
19:51 moritz hoelzro: and I keep thinking that this must be wrong
19:51 eli-se TimToady: alright
19:51 hoelzro moritz: you mean that approach?
19:51 moritz hoelzro: doing it at all, yes
19:52 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␤»
19:52 eli-se Absolutely terrific.
19:52 hoelzro so does the linenoise stuff belong as an NQP module, then?
19:53 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?
19:53 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 ␤»
19:53 TimToady there's no argument list there to insert into
19:53 eli-se m: my @xs = 2, 3, 4; my @zs = 1, @@xs, 5; @zs.perl.say; # Ah, I see.
19:53 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
19:54 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.
19:54 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
19:54 eli-se way twhat
19:54 eli-se just a few minutes ago it didn't interpolate @xs
19:54 eli-se m: my @xs = 2, 3, 4; my @zs = (1, @xs, 5); @zs.perl.say; # You win.
19:54 camelia rakudo-moar 99a62f: OUTPUT«Array.new(1, 2, 3, 4, 5)␤»
19:55 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)␤»
19:55 eli-se Oh, of course.
19:56 TimToady you were using $xs then
19:56 TimToady m: my @xs = 2, 3, 4; (1, $@xs, 5).perl.say
19:56 camelia rakudo-moar 99a62f: OUTPUT«(1, [2, 3, 4], 5)␤»
19:56 eli-se Why does it sometimes say Array.new(2, 3, 4) and sometimes [2, 3, 4]? Are they different?
19:57 TimToady yes, [] is containerized as a singular "item"
19:58 TimToady 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
19:59 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;
19:59 camelia rakudo-moar 99a62f: OUTPUT«Array.new(0, 1, 2)␤[0, 1, 2]␤»
20:01 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)␤»
20:01 eli-se TimToady:  I see.
20:01 TimToady a slightly more raw example, a flattenable list vs an item-ized list
20:02 hoelzro moritz: oh, that makes sense to me
20:03 hoelzro I didn't know a Perl 6 class could subclass an NQP one!
20:04 eli-se I like Perl 6.
20:05 raydiak \o/
20:05 raydiak I think that's the reaction we're aiming for :)
20:05 * TimToady is flattened, er, flattered...
20:06 tadzik ah, I read it as "flattering" in that "Perl doesn't commit either way to flattening or lolling"
20:06 tadzik it made sense in many ways
20:07 moritz hoelzro: I'm not sure if it works in practise
20:07 moritz hoelzro: experiment with it before basing your desing on it :-)
20:07 moritz hoelzro: what works is invoking a p6 routine from nqp
20:08 jnthn hoelzro: fwiw, one neat way for sharing stuff between langs is the nqp::gethllsym/nqp::bindhllsym mechanism
20:08 dalek rakudo/nom: 787e562 | moritz++ | / (2 files):
20:08 dalek rakudo/nom: generate leap second POSIX timestamps as integers, not strings
20:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/787e56268c
20:11 dalek rakudo/nom: b451adf | jnthn++ | src/core/Num.pm:
20:11 dalek rakudo/nom: Numerous speed-ups for Num.Rat.
20:11 dalek rakudo/nom:
20:11 dalek rakudo/nom: Avoids a bunch of list assignments, uses native nums where possible,
20:11 dalek rakudo/nom: and avoids a load of implicit coercions. Result: 6.5x faster.
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b451adf325
20:11 dalek rakudo/nom: ce038b5 | jnthn++ | src/core/Num.pm:
20:11 dalek rakudo/nom: Add missing native num multi candidates.
20:11 dalek rakudo/nom:
20:11 dalek rakudo/nom: These are a small part of getting the Num.Rat speedup.
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ce038b539d
20:13 hoelzro moritz: right
20:13 hoelzro jnthn: oh, I forgot about those!
20:13 hoelzro how would I go about loading a module, in that case?
20:14 hoelzro 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 hoelzro I think that those changes could happen after the tab completion stuff is already merged
20:14 jnthn moritz: OK, between your commit and mine we've made now a bunch faster :)
20:14 hoelzro I think tearing out linenoise from MoarVM and NQP is already a big step
20:18 raydiak nice moritz++ jnthn++
20:19 jnthn hoelzro: Well, to load a module you still need a Perl6::World somewhere
20:20 jnthn hoelzro: You can call .load_module on that
20:20 jnthn hoelzro: That one doesn't try to do any importation
20:20 dalek rakudo/nom: 79bf15a | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
20:20 dalek rakudo/nom: fix CUR::Installation on windows by using forward slashes
20:20 dalek rakudo/nom:
20:20 dalek rakudo/nom: Since we are comparing paths of distribution provided by META.info files
20:20 dalek rakudo/nom: to actual files on disk, we have to normalize both from potential backslashes
20:20 dalek rakudo/nom: to forward slashes. Now we can also (re)bootstrap panda on windows.
20:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79bf15ab96
20:22 FROGGS feels good to finally make use of panda/eleven and rakudo/eleven...
20:22 moritz FROGGS++
20:23 FROGGS we could now even go so far as to allow to rebootstrap panda-j and panda-m sie by side
20:24 jnthn FROGGS++ # eleven
20:24 * jnthn notes there've already been 87 Rakudo commits since the release. :)
20:24 Sqirrel joined #perl6
20:25 jnthn Plenty happening. :)
20:25 FROGGS well, we are getting closer and closer to "the release" :o)
20:26 FROGGS hmmm, in case we are careful enough we could even make rakudo now relocatable me thinks
20:26 FROGGS at least I think so
20:28 moritz m: for 1..1000 { now }; say now - INIT now
20:28 camelia rakudo-moar 99a62f: OUTPUT«3.000797␤»
20:28 moritz m: for 1..1000 { time }; say now - INIT now
20:28 camelia rakudo-moar 99a62f: OUTPUT«0.00544458␤»
20:28 FROGGS m: say time
20:28 camelia rakudo-moar 99a62f: OUTPUT«1427574527␤»
20:29 moritz that's before the optimizations
20:30 telex joined #perl6
20:31 hoelzro jnthn: does Perl6::Compiler (in interactive mode) have access to a World?
20:32 jnthn hoelzro: Well, it has access to the class, you'd need to make an instance of it...
20:33 hoelzro ok
20:33 adu joined #perl6
20:37 eli-se Is there some documentation tool for Perl 6 that extracts function signatures automatically?
20:38 eli-se So you don't have to repeat them in POD.
20:39 tadzik why not just attach Pod to function signatures?
20:39 eli-se how'd you do that?
20:39 tadzik let me find some example
20:39 retupmoca eli-se: see https://github.com/retupmoca/P6-LibraryM​ake/blob/master/lib/LibraryMake.pm6#L85
20:39 hoelzro m: #|{hello} sub foo {} ; say(&foo.WHY)
20:39 camelia rakudo-moar 99a62f: OUTPUT«hello␤»
20:39 hoelzro tadzik, eli-se: ^
20:39 retupmoca eli-se: and see the README.md in that repo (which is generated from that POD)
20:40 timotimo i'm very glad to see now being sped up
20:40 eli-se Nice!
20:40 eli-se Does it also include preconditions and postconditions?
20:40 hoelzro you can also use #| ... ␤
20:40 hoelzro or #= for trailing comments
20:41 tadzik preconditions and postconditions?
20:41 hoelzro eli-se: you mean, does it include them in the generated docs?
20:41 eli-se yeah
20:41 hoelzro I don't think so
20:41 eli-se like sub f { PRE { $x == 1 } } would put "$x == 1" in the docs
20:41 tadzik I don't think we can easily change it either
20:42 tadzik 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
20:42 eli-se cool
20:42 hoelzro I don't know if Code objects can introspect their PRE/POST blocks, though
20:42 hoelzro seems handy, though
20:43 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␤␤»
20:43 eli-se crap
20:43 eli-se I meant to /msg camelia
20:45 masak eli-se: you seem to be working under a miscomprenehsion of exactly what ^ does, though
20:45 eiro joined #perl6
20:45 eli-se m: sub f(Int $x) { PRE { $x == 1 } }; &f.phasers('PRE').say
20:45 camelia rakudo-moar 99a62f: OUTPUT«-> () { #`(Block|68719408) ... }␤»
20:45 masak eli-se: if you do ^ there, you're no longer talking about a particular instance, but about its metaobject.
20:45 timotimo timo@schmetterling ~/p/tryperl6> time perl6 -e 'now xx 5000'
20:45 timotimo 9.52user 0.03system 0:09.56elapsed 99%CPU (0avgtext+0avgdata 92644maxresident)k
20:45 timotimo 1.81user 0.02system 0:01.83elapsed 99%CPU (0avgtext+0avgdata 95852maxresident)k
20:45 eli-se yeah I meant .^methods at first, then I meant .phasers
20:45 masak eli-se: that metaobject will most certainly not have a phaser
20:45 timotimo before and after
20:45 masak eli-se: ah, ok.
20:45 eli-se and then I screwed up :P
20:45 masak eli-se: anyway, functions are not classes :)
20:46 jnthn timotimo: I like that you're in a directory called "tryperl6" :D
20:46 timotimo oh
20:46 * timotimo whistles innocently
20:47 eli-se Can you get the source position given the Code object?
20:48 retupmoca aww, eleven broke my .dll bundling :( "Cannot locate native library 'zlib1.dll'"
20:48 timotimo i want something like that, fwiw, eli-se
20:48 * retupmoca wants %*RESOURCES
20:48 eli-se hmmm
20:49 timotimo retupmoca: agreed :S
20:49 eli-se m: sub f($x) { POST { * > 0 }; $x }; f(1); f(-1)
20:49 camelia rakudo-moar 99a62f: ( no output )
20:49 eli-se Can't use * for return value in POST :(
20:50 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.
20:50 moritz well, the return value is in $_
20:50 retupmoca but FROGGS++ # panda is happy on windows again
20:51 eli-se moritz: holy guacamole
20:51 moritz m: sub a($x) { POST { $_ > 0 }; $x }; a -3
20:51 camelia rakudo-moar 99a62f: OUTPUT«Postcondition '{ $_ > 0 }' failed␤  in sub a at /tmp/V8OZ5XFdZt:1␤  in block <unit> at /tmp/V8OZ5XFdZt:1␤␤»
20:51 eli-se very very very nice
20:51 moritz m: sub a($x) { POST * > 0; $x }; a -3
20:51 camelia rakudo-moar 99a62f: ( no output )
20:51 moritz m: sub a($x) { POST $_ > 0; $x }; a -3
20:51 camelia rakudo-moar 99a62f: OUTPUT«Postcondition '$_ > 0' failed␤  in sub a at /tmp/nu7CSTVxSV:1␤  in block <unit> at /tmp/nu7CSTVxSV:1␤␤»
20:52 * jnthn away for a bit
20:53 dalek doc: b76872c | (Edwin Steiner)++ | lib/Type/Cool.pod:
20:53 dalek doc: Fix probably unintended autopun.
20:53 dalek doc: review: https://github.com/perl6/doc/commit/b76872c7a3
20:54 FROGGS retupmoca: how were the dlls installed?
20:55 retupmoca they were copied into blib/lib
20:55 retupmoca I can find them using .files($path), so I can still work around the lack of %*RESOURCES
20:56 FROGGS yes, you probably want: CompUnitRepo.files($path)
20:57 retupmoca yeah
20:57 FROGGS and yeah, now we can also make %*RESOURCES work
20:58 retupmoca ok, .files actually works everywhere, so I probably should have been using that in the first place :)
21:00 retupmoca or does it? o.O
21:03 timotimo ==> Reinstalling
21:03 timotimo ===SORRY!===
21:03 timotimo Missing or wrong version of dependency 'src/gen/m-CORE.setting'
21:03 timotimo what have i wrong, FROGGS?
21:03 FROGGS timotimo: hmmm
21:04 timotimo /home/timo/perl6/install/s​hare/perl6/site/bin/panda - that seems to be the right panda
21:04 FROGGS timotimo: can you just try again?
21:04 timotimo already have
21:05 retupmoca ah, almost the same I think: ::File I have to pass .files('lib/...'), ::Installation I have to pass .files('blib/lib/...')
21:05 retupmoca FROGGS: is there an easy way to unify those? ^
21:05 FROGGS retupmoca: I'm not sure yet
21:06 FROGGS timotimo: did it actually clean out site/ ?
21:06 timotimo maybe i'll just throw away all of my install/
21:07 FROGGS no, just remove all of site
21:07 timotimo too late
21:07 timotimo i don't have a backup :P
21:07 FROGGS timotimo: but btw, you also need to reconfigure rakudo after the latest changes there
21:07 timotimo i've done that
21:07 FROGGS (for -Ilib for Test.pm and NativeCall.pm)
21:09 timotimo oh hell
21:09 timotimo ==> Testing Shell::Command
21:09 timotimo ===SORRY!===
21:09 timotimo No object at index 296
21:10 FROGGS yeah, I have no idea where that comes from :S
21:10 FROGGS another attempt will do I think
21:10 FROGGS just doing rebootstrap I mean
21:10 moritz you'll need to remove your complete install dir before installing the new rakudo, I think
21:10 dalek specs: 1b4888f | (Edwin Steiner)++ | S32-setting-library/Containers.pod:
21:10 dalek specs: Turn accidentally working example for 'unique' into what was probably intended.
21:10 dalek specs:
21:10 dalek specs: (Due to the [...] the original example worked even without the ':as(*.Num)'.)
21:10 dalek specs: review: https://github.com/perl6/specs/commit/1b4888f618
21:10 timotimo indeed, now it works. god damn it.
21:11 FROGGS yeah
21:11 timotimo but i still get ==> Reinstalling
21:11 timotimo ===SORRY!===
21:11 moritz ==> Testing Shell::Command
21:11 moritz ===SORRY!===
21:11 moritz No object at index 296
21:11 moritz eeks
21:11 FROGGS ó.ò
21:11 moritz that *was* cleaned out entirely
21:12 moritz though the second bootstrap seems to work
21:12 _edwin joined #perl6
21:12 FROGGS yes... question is, why?
21:12 timotimo agreed
21:16 dalek rakudo-star-daily: b790b42 | coke++ | log/ (9 files):
21:16 dalek rakudo-star-daily: today (automated commit)
21:16 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/b790b425cb
21:16 timotimo with a slightly older version of panda things work :\
21:16 _edwin question about perl6/doc: is it ok to copy some sections from S32 more or less directly to perl6/doc?
21:16 timotimo as a first step, that should do
21:16 _edwin I'm thinking about the descriptions of unique and squish which leave little to be desired IMHO
21:16 timotimo the synopses aren't really documentation per se
21:17 timotimo that sounds good
21:17 _edwin (and are missing in doc)
21:17 moritz _edwin: yes, that's fine
21:17 FROGGS timotimo: so you get that weird message? every time?
21:17 timotimo yes
21:18 tinyblak joined #perl6
21:18 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.
21:18 _edwin ok, will do
21:18 timotimo the "wrong or missing version of core setting" always happens after "reinstalling" or trying to use "panda"
21:18 eli-se Maybe I should've written my compiler in Perl 6 instead of Perl 5.
21:18 FROGGS timotimo: can you run the reboostrap under RAKUDO_MODULE_DEBUG=1 and paste the entire output?
21:19 moritz http://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`
21:19 eli-se Let's see how much code it is.
21:19 timotimo i gave "which panda" above
21:19 FROGGS moritz: read from line 21
21:20 timotimo https://gist.github.com/timo/32e15eb9790dd9d29b54
21:20 eli-se 1641 lines :[
21:21 RabidGravy joined #perl6
21:21 FROGGS timotimo: and /home/timo/perl6/install/s​hare/perl6/site/bin/panda is just a wrapper script that calls shells out using what is returned by CompUnitRepo?
21:22 timotimo already dead
21:22 timotimo i meant to be working on that website project; i need a working panda for that
21:22 FROGGS okay
21:23 moritz FROGGS: if it's fatal, it shouldn't be a warning; it should be an error
21:23 FROGGS moritz: but it is not fatal
21:23 moritz FROGGS: it's fatal for downstream users
21:23 FROGGS it is just a guess
21:24 _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
21:24 moritz _edwin: 'returns' is a bit easier to read for those not knowing signatures well
21:25 _edwin that's true
21:25 moritz FROGGS: ok, what should be in "provides"?
21:26 FROGGS moritz: that: http://design.perl6.org/S22.html#provides
21:26 FROGGS ohh, there is a comma missing...
21:26 moritz FROGGS: do we have a way to autogenerate?
21:26 moritz *that
21:27 FROGGS in short: every namespace you want to be able to 'use'
21:27 FROGGS moritz: perhaps...
21:27 timotimo damn, HTTP::Server::Async maxes out one CPU with epoll_wait and sched_yield :(
21:27 retupmoca aww, even internal 'use's need to be in provides
21:28 moritz timotimo: is that sched_yield in a loop?
21:28 timotimo moritz: i have no idea :|
21:28 moritz retupmoca: that sounds... LTA
21:28 timotimo yes, because every "use" goes through CompUnitRepo, no?
21:28 eli-se Is there some IO subclass in Perl 6 for in-memory buffers?
21:28 airdisa joined #perl6
21:28 retupmoca moritz: a bit IMO; I was hoping 'provides' was only for the public interface
21:29 retupmoca otherwise I just have to list every .pm6 file
21:30 Grrrr joined #perl6
21:30 renormalist joined #perl6
21:30 esaym153 joined #perl6
21:30 grondilu joined #perl6
21:30 estrabd joined #perl6
21:30 broquaint joined #perl6
21:30 revdiablo joined #perl6
21:30 haroldwu joined #perl6
21:30 gcole joined #perl6
21:30 Exodist joined #perl6
21:31 [Coke] joined #perl6
21:31 FROGGS retupmoca: you have to, since the fact that there are files at all is an historical accident
21:31 gtodd joined #perl6
21:35 FROGGS moritz: panda/depends will guess you a META.info if there is none...
21:35 FROGGS https://github.com/tadzik/panda/compare/depends
21:35 cdc joined #perl6
21:36 TimToady joined #perl6
21:36 ribasushi joined #perl6
21:36 dalek doc: eb5f721 | (Edwin Steiner)++ | lib/Type/List.pod:
21:36 dalek doc: Document 'unique' and 'squish', mostly copying the descriptions from S32.
21:36 dalek doc: review: https://github.com/perl6/doc/commit/eb5f72130d
21:38 _edwin hm, for squish I wonder why it does not optionally take a binary predicate for squishing
21:39 retupmoca Cannot locate native library '[...]\share\perl6\site/49.dll' :(
21:39 retupmoca my workaround is less workaroundy than I thought
21:39 * retupmoca will just have to put the .dll in bin/
21:40 dalek specs: d4e09ac | FROGGS++ | S22-package-format.pod:
21:40 dalek specs: add missing comma in json example
21:40 dalek specs: review: https://github.com/perl6/specs/commit/d4e09ac670
21:41 FROGGS retupmoca: so we have to make %?RESOURCE available soonish
21:42 jack_rabbit joined #perl6
21:46 eli-se why is $?FILE of type Str and not IO::Path?
21:48 FROGGS eli-se: maybe just not done yet
21:49 timotimo FROGGS: you know a bit of stuff about libuv, right?
21:49 FROGGS timotimo: what's up?
21:49 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
21:50 retupmoca FROGGS: yeah, looks like
21:50 retupmoca putting the .dll in bin/ doesn't work either
21:50 retupmoca because it gets replaced with the built-in perl launcher stub thing
21:50 timotimo having an idle_handler causes the libuv event loop to have a timeout of 0 and will start busy waiting
21:50 timotimo which is kind of bad ...
21:51 FROGGS timotimo: no, no idea
21:51 FROGGS retupmoca: eww
21:51 retupmoca timotimo: I think I've had that happen when I tried to use Promine.in(...)
21:51 timotimo perhaps we're suffering from the same problem
21:52 FROGGS retupmoca: so let's make resource/ a special dir in Panda::Installer (and perhaps CUR::Installation)
21:52 FROGGS retupmoca: I guess we only need to change a single regex in panda
21:59 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 masak 'night, #perl6
21:59 retupmoca FROGGS: yes; I just need "this filename (with any predictable-ish path) and this contents" to be installed
22:01 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:03 dalek doc: 88bb4a9 | (Edwin Steiner)++ | lib/Type/List.pod:
22:03 dalek doc: Link to the === operator in descriptions of C<unique> and C<squish>.
22:03 dalek doc: review: https://github.com/perl6/doc/commit/88bb4a9016
22:05 FROGGS retupmoca: I just pushed a panda patch that strips the blib/
22:08 eli-se FROGGS: are you still dealing with the C++ stuff?
22:08 FROGGS eli-se: yes
22:08 eli-se What are you doing exactly? I'm also dealing with C++ ABI stuff.
22:09 FROGGS eli-se: getting the name mangling right for example
22:10 FROGGS 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 #perl6
22:15 _edwin ah, cool, squish in Rakudo already has :&with :)
22:16 _edwin hm, but why does it convert &as($_) to Str??
22:17 timotimo &as($_)?
22:17 timotimo the what now?
22:19 _edwin see https://github.com/rakudo/rakudo​/blob/nom/src/core/List.pm#L508
22:19 _edwin looks wrong to me
22:23 _edwin I think that is a mistake from mixing together two implementations of unique
22:23 _edwin $target = nqp::unbox_s($_.WHICH); in line 459 makes sense
22:24 _edwin but not the .Str in line 508, it should be more like line 470, I think
22:25 airdisa joined #perl6
22:33 _edwin m: ('', Any, Any).unique(:as(-> $x {$x})).perl.say
22:33 camelia rakudo-moar 79bf15: OUTPUT«("", Any).list␤»
22:33 _edwin m: ('', Any, Any).squish(:as(-> $x {$x})).perl.say
22:33 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:38 _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
22:39 FROGGS _edwin: and add a comment like this: https://github.com/perl6/roast/commit/4​59be82454be6d1d35fb31e41f7f6fd7f3a4037e
22:45 _edwin ok, I still need to RT it
22:53 [particle]1 joined #perl6
23:02 beastd joined #perl6
23:02 adu joined #perl6
23:05 dalek roast: 8938c10 | (Edwin Steiner)++ | S32-list/squish.t:
23:05 dalek roast: Add test for RT #124204 (squish should not needlessly stringify).
23:05 dalek roast: review: https://github.com/perl6/roast/commit/8938c10f47
23:05 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124204
23:09 flussence joined #perl6
23:09 _edwin hm, I guess I have another one:
23:10 _edwin m: <a a>.unique(:with(-> $a, $b {1})).say
23:10 camelia rakudo-moar 79bf15: OUTPUT«a␤»
23:10 _edwin m: <a a>.squish(:with(-> $a, $b {1})).say
23:10 camelia rakudo-moar 79bf15: OUTPUT«␤»
23:16 eli-se Why is the empty regex not allowed?
23:16 TimToady because we're mean
23:17 TimToady actually, it's because it means two different things in the past, and it's often a mistake as a degenerate case
23:17 TimToady and it's really easy to write infinite loops when you think you're matching something but you're not
23:18 TimToady so we just require people say they're matching /''/ when that's what they mean
23:18 larion joined #perl6
23:19 TimToady or <?>, but '' is shorter and arguably clearer
23:19 eli-se ah ok
23:19 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' ~~ /''+/;
23:20 eli-se I just wrote *.base(2).subst(/0/, '', :g).codes == 1 to check whether something is a power of two :D
23:20 camelia rakudo-moar 79bf15: OUTPUT«Memory allocation failed; could not allocate 979042304 bytes␤»
23:20 eli-se camelia: lol
23:20 vendethiel TimToady: why O**2?
23:20 vendethiel O(N**2)*.
23:21 TimToady it's doing linear matching on the result to see if anything is the same
23:21 TimToady rather than the default of using a hash
23:21 vendethiel can't it store a `original => mapped` and compare using that?
23:22 TimToady it's not a map
23:22 vendethiel m: sub f($a) { $a+1000}; my @a = ^10; say %(@a Z[&f] @a).perl
23:22 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/…»
23:22 TimToady that's :as
23:22 vendethiel aaah.. I'm sorry
23:22 vendethiel m: sub f($a) { $a+1000}; my @a = ^10; say %(@a Z map(&f, @a)).perl
23:22 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␤»
23:22 eli-se Hmm, s/// isn't documented on http://doc.perl6.org/language/operators
23:23 * vendethiel wonders if he could avoid the duplicated @a there
23:23 TimToady eli-se: { .lsb == .msb }
23:23 vendethiel m: sub f($a) { $a+1000}; my @a = ^10; say (@a ==> $^ary Z=> map(&f, $^ary)).perl # ugh.
23:23 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.␤»
23:23 vendethiel right
23:23 eli-se TimToady: nice!
23:24 TimToady 'course, that's still scanning the bits twice
23:24 TimToady but it's in a low-level routine, hopefully
23:27 dalek roast: a50eeb0 | (Edwin Steiner)++ | S32-list/squish.t:
23:27 eli-se m: $_ => ($_ != 0 && $_ +& ($_ - 1) == 0) for ^10
23:27 dalek roast: Add test for RT #124205 (squish should always return at least the first element).
23:27 dalek roast: review: https://github.com/perl6/roast/commit/a50eeb003f
23:27 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124205
23:27 camelia rakudo-moar 79bf15: ( no output )
23:27 eli-se m: ($_ => ($_ != 0 && $_ +& ($_ - 1) == 0) for ^10).say
23:27 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␤»
23:27 eli-se nice. :)
23:27 TimToady eli-se: another way is { $_ +& ($_ - 1) == ... yeah, that
23:28 TimToady hmm
23:28 eli-se m: say $_ => $_ && $_ !+& ($_ - 1) for ^10
23:28 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␤  …»
23:28 eli-se meh
23:29 TimToady m: say -4.lsb; say -4.msb
23:29 camelia rakudo-moar 79bf15: OUTPUT«-2␤-2␤»
23:29 TimToady say what
23:29 TimToady where'd the - come from?
23:29 TimToady oh, duh
23:29 TimToady m: say (-4).lsb; say (-4).msb
23:29 camelia rakudo-moar 79bf15: OUTPUT«2␤2␤»
23:29 TimToady whew!
23:30 TimToady presuming you want negative powers of two to match as well...
23:30 rmgk joined #perl6
23:30 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␤»
23:30 TimToady negative powers-of-two rather, not negative-powers of two
23:31 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␤»
23:31 eli-se oww haha
23:32 eli-se $_ && !($_ +& $_.pred), it is
23:32 vendethiel m: say ($_ => $_ == 5 ?? next !! $_ for ^10);
23:32 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);␤␤»
23:33 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:␤   …»
23:33 vendethiel mmh.
23:33 TimToady m: say ($_ => ($_ == 5 ?? next() !! $_) for ^10);
23:33 camelia rakudo-moar 79bf15: OUTPUT«0 => 0 1 => 1 2 => 2 3 => 3 4 => 4 6 => 6 7 => 7 8 => 8 9 => 9␤»
23:34 vendethiel uh-oh?
23:34 TimToady next takes an argument
23:34 TimToady so !! looks like a term
23:34 vendethiel m: sub foo($?){}; say 1 ?? foo !! 2
23:34 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…»
23:35 vendethiel right-o.
23:35 vendethiel (I just wanted to make sure "next" wasn't special at all)
23:35 TimToady we don't try to suss out 0-ary functions and turn them into terms like Perl 5 does
23:35 vendethiel probably for the best :-)
23:35 TimToady yes, it's an early tradeoff we made knowingly
23:36 TimToady 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....
23:37 TimToady It's not clear that the words "prototypes" and "worked" should be involved in a sentence without negatives.
23:38 vendethiel well, that's because I also said "book": it's only theory!
23:40 TimToady we can have a more awesome message on the borged !! though
23:41 vendethiel should be fine since users can't define their own "?? !!"-like operators, right?
23:43 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␤␤»
23:44 eli-se 2???
23:44 eli-se Oh should be without ^ duh
23:46 _edwin hm, I wonder whether squish shouldn't call &with with the arguments in list order, rather than reverse list order
23:47 _edwin currently this works: my @highscores = <5 10 10 6 100 80>.squish(:with(* <= *))   # 5 10 100
23:48 _edwin looks fine until you read it as "squish if $^a <= $^b"
23:49 _edwin because it actually does "squish if $^b <= $^a"
23:50 timotimo damn, my web app crashes :(
23:55 _edwin roast uses squish only with symmetric predicates where it does not matter
23:57 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 _edwin TimToady, you mean for unique?
23:58 TimToady (and then squish), yes, but it would destroy order
23:59 _edwin fwiw, I wouldn't have expected :with on unique, but on squish it definitely makes sense

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo