Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-10

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:08 telex joined #perl6
00:40 Mouq_ joined #perl6
00:48 tinyblak joined #perl6
00:50 tinyblak joined #perl6
00:59 tadzik joined #perl6
01:04 Mouq joined #perl6
01:08 cognominal joined #perl6
01:19 cognominal joined #perl6
01:30 japhb timotimo: I thought I fixed the bug in that test (it was miscalculating work scaling).  When's the last time you pulled perl6-bench?
01:30 yoleaux 9 Jan 2015 23:07Z <timotimo> japhb: i've put a few tell messages here that didn't go through. lookie here: http://irclog.perlgeek.de/​perl6/2015-01-09#i_9913027
01:30 yoleaux 9 Jan 2015 23:11Z <timotimo> japhb: also, since the output of perl6-bench can be pretty darn verbose, maybe writing a log file automatically would be nice; otherwise i'd just get used to using tee
01:31 japhb Also, I improved the smarts in error and ^C handling, so the DWIM should be closer to WYM.
01:33 japhb Which commands are giving you painfully verbose output?  (I tried to make bench's internally generated output "about right" in terms of verbosity, but I made no attempt to limit or capture the output of commands it calls [unless I could silence them completely with no ill effects] because, well, Rakudo's IO is too immature/slow.)
01:34 japhb But certainly auto-logging is good for a GH issue.
01:35 adu japhb: how are you doing?
01:35 japhb .tell timotimo See the top of http://irclog.perlgeek.de/perl6/2015-01-10 for my replies.
01:35 yoleaux japhb: I'll pass your message to timotimo.
01:36 japhb adu: Hard week at $day-job, but thankfully on the bus home now.  And you?
01:36 adu .tell adu You are the coolest
01:36 yoleaux adu: Talking to yourself is the first sign of madness.
01:36 japhb yoleaux++
01:37 adu japhb: I'm good, I can't decide what to work on, p6-c-parser, p6-xml, or my other personal project
01:37 adu s
01:38 * japhb is ruminating on what to work on also.
01:39 adu p6-c-parser is fresh, I last worked on it last weekend, p6-xml is old and probably needs a rewrite to work
01:40 japhb Is p6-xml pure Perl 6?  Because if so, I'd say work on p6-c-parser.  More net benefit for the community.
01:40 japhb But of course, it's your decision, I'm just a bystander.  ;-)
01:56 Atr3Y0 joined #perl6
01:57 dalek nqp: 6071efa | (Geoffrey Broadwell)++ | t/concurrency/ (2 files):
01:57 dalek nqp: Add parent-child and sibling-children tests for threadyield().  The interleaving threadyield() tests fail on both nqp-m and nqp-j, but this may be a case of intuitive semantics not matching true semantics.
01:57 dalek nqp: review: https://github.com/perl6/nqp/commit/6071efa6ad
01:57 dalek nqp: 39987d8 | (Geoffrey Broadwell)++ | src/HLL/Compiler.nqp:
01:57 dalek nqp: Merge branch 'master' of https://github.com/perl6/nqp
01:57 dalek nqp: review: https://github.com/perl6/nqp/commit/39987d8446
01:57 obra joined #perl6
01:58 adu japhb: yes, pure perl
01:58 adu japhb: is there something that does binding to libxml2?
01:59 japhb ISTR someone working on that, but if not, it should be not-painful using NativeCall.
02:01 adu Yeah, I'm pretty excited about p6-c-parser, I tried implementing my "c2drox" tool 3 different ways
02:03 adu (1) Clang (this was a pain because I ended up getting scope information, but not AST info), (2) Haskell + language-c module (It's complicated), and (3) Perl6
02:03 adu and so far only the Perl6 version works
02:07 japhb That speaks volumes.  :-)
02:08 adu japhb: about Perl6?
02:08 adu japhb: or the other things?
02:08 japhb Yes.  ;-)
02:23 rmgk_ joined #perl6
02:24 Mouq joined #perl6
02:37 avuserow_ joined #perl6
02:51 Atr3Y0 left #perl6
03:31 noganex_ joined #perl6
03:42 skids r: int64.^nativesize.say; int.^nativesize.say;
03:42 camelia rakudo-{parrot,moar} c5dcdf: OUTPUT«64␤0␤»
03:51 xinming joined #perl6
04:06 adu joined #perl6
04:32 xinming joined #perl6
04:37 lue joined #perl6
05:19 flussence joined #perl6
05:23 adu joined #perl6
05:48 dalek rakudo-star-daily: 79d1bb6 | coke++ | log/ (9 files):
05:48 dalek rakudo-star-daily: today (automated commit)
05:48 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/79d1bb6209
06:10 Mso150 joined #perl6
06:38 dj_goku joined #perl6
06:38 dj_goku joined #perl6
06:54 rindolf joined #perl6
07:13 khisanth_ joined #perl6
07:30 xfix joined #perl6
07:32 xfix joined #perl6
07:32 xfix joined #perl6
07:37 darutoko joined #perl6
07:49 Mouq joined #perl6
08:00 CurtisOvidPoe m: my @primes = grep {$_.is-prime}, 1, 2, * + 1 ... Inf; say @primes[^5]
08:00 camelia rakudo-moar c5dcdf: OUTPUT«␤»
08:00 CurtisOvidPoe Why doesn’t that print the first five prime numbers?
08:01 CurtisOvidPoe m: my @primes = grep {$_.is-prime}, 1 .. 100; say @primes[^5]
08:01 camelia rakudo-moar c5dcdf: OUTPUT«2 3 5 7 11␤»
08:02 bartolin joined #perl6
08:12 Mouq m: my @primes := grep {$_.is-prime}, 1, 2, * + 1 ... Inf; say @primes[^5]
08:12 camelia rakudo-moar c5dcdf: OUTPUT«␤»
08:12 Mouq :?
08:13 Mouq m: my @primes := grep {$_.is-prime}, 1, 2, * + 1 ... Inf; say @primes[5]
08:13 camelia rakudo-moar c5dcdf: OUTPUT«Nil␤»
08:13 Mouq ohohhoh
08:13 Mouq m: my @primes := grep {$_.is-prime}, (1, 2, * + 1 ... Inf); say @primes[5]
08:13 camelia rakudo-moar c5dcdf: OUTPUT«13␤»
08:13 Mouq ... has really low precedence
08:15 CurtisOvidPoe That doesn’t terminate on my box :(
08:15 CurtisOvidPoe Oh, wait, what’s that :=?
08:16 raydiak binding instead of assignment
08:16 raydiak kinda like assigning by ref in p5
08:17 CurtisOvidPoe Why does the assignment not work there?
08:18 CurtisOvidPoe For example, the first 10 fibonacci numbers:
08:18 CurtisOvidPoe my @fib = 0, 1, * + * ... Inf; say @fib[^10]
08:18 CurtisOvidPoe m: my @fib = 0, 1, * + * ... Inf; say @fib[^10]
08:18 camelia rakudo-moar c5dcdf: OUTPUT«0 1 1 2 3 5 8 13 21 34␤»
08:18 raydiak without it, that example eagerly attempts to get all the elems out of the lazy list to put into @primes, instead of saying that @primes *is* the lazy list
08:19 CurtisOvidPoe It works for the @fib example an the grep docs claim that grep returns a lazy list: http://doc.perl6.org/routine/grep
08:20 CurtisOvidPoe Sorry if I’m being dense, but this subtlety escapes me.
08:21 raydiak no it's a little wacky, I think parts that are supposed to be lazy currently aren't in some cases
08:22 raydiak and some of these things are gonna change somewhat with the great list refactor impending
08:23 CurtisOvidPoe Ouch. I think I’ll just leave this out of my talk, then.
08:24 raydiak but as to specifically why the one works while the other doesn't, I'm not immediately sure...maybe someone else will be more insightful, could be just something I'm fuzzy on
08:28 Mouq @ assignment is eager. Grep is lazy, it's just that "@foo =" tries to take all the values
08:28 Mouq m: my $primes = grep {$_.is-prime}, (1, 2, * + 1 ... Inf); say $primes[5]
08:28 camelia rakudo-moar c5dcdf: OUTPUT«13␤»
08:29 Mouq ^^ That also works
08:29 Mouq m: constant primes = grep {.is-prime}, (1, 2, * + 1 ... Inf); say primes[5]
08:29 camelia rakudo-moar c5dcdf: OUTPUT«13␤»
08:29 timotimo japhb: i just pulled changes 3c4b72a..bedc8ed after the problem i told you about; only microbenchmarks.pl and the point class benchmarks were added
08:29 yoleaux 01:35Z <japhb> timotimo: See the top of http://irclog.perlgeek.de/perl6/2015-01-10 for my replies.
08:30 timotimo changed*
08:30 zoosha joined #perl6
08:31 CurtisOvidPoe Mouq: but why isn’t my fib example blocking then? If assignment is eager, why doesn’t it attempt to slurp in all fibonacci numbers?
08:31 CurtisOvidPoe m: my @fib = 0, 1, * + * ... Inf; say @fib[^10]
08:31 camelia rakudo-moar c5dcdf: OUTPUT«0 1 1 2 3 5 8 13 21 34␤»
08:33 timotimo m: my @fib = 0, 1, * + * ... Inf; say @fib.DUMP
08:33 timotimo oh, derp %)
08:33 camelia rakudo-moar c5dcdf: OUTPUT«(signal SEGV)use of uninitialized value <element> of type Any in string context  in method DUMP at /home/camelia/rakudo-inst-2/languages/p​erl6/runtime/CORE.setting.moarvm:1␤␤use of uninitialized value <element> of type Any in string context  in method …»
08:33 timotimo m: my @fib = 0, 1, * + * ... Inf; say @fib.WHAT
08:33 camelia rakudo-moar c5dcdf: OUTPUT«(Array)␤»
08:33 timotimo m: my @fib = grep *.is-prime, (0, 1, * + * ... Inf); say @fib.WHAT
08:34 camelia rakudo-moar c5dcdf: OUTPUT«(timeout)»
08:34 timotimo yeah
08:34 CurtisOvidPoe m: multi f(Int $f) { say "Int" }; multi f(Int $f where * > 0) { say ">" }; f(3)
08:34 camelia rakudo-moar c5dcdf: OUTPUT«>␤»
08:34 timotimo grep doesn't seem to do the same "returns lazy list" thing that ... does
08:34 CurtisOvidPoe I was wondering why that multi example didn’t result in ambiguous dispatch.
08:35 CurtisOvidPoe Where do I file bugs again?
08:35 timotimo because the "where" makes the one "tighter"
08:35 timotimo much like if Dog is a subclass of Animal, having a multi for Dog and one for Animal would work
08:35 timotimo it's just we consider Animal + where to be "tighter" than just Animal
08:35 CurtisOvidPoe timotimo: nope.
08:36 CurtisOvidPoe m: multi f(Int $f where * < 20) { say "Int" }; multi f(Int $f where * > 0) { say ">" }; f(3)
08:36 camelia rakudo-moar c5dcdf: OUTPUT«Int␤»
08:36 timotimo nope?
08:36 CurtisOvidPoe Now I have two “wheres”, both of which are appropriate candidates.
08:36 timotimo true that
08:36 CurtisOvidPoe And my apologies for being so blunt!
08:36 timotimo we can't introspect where candidates, though
08:36 timotimo halting problem and all that ;)
08:36 timotimo i suppose we just decided to not even try
08:37 CurtisOvidPoe Which is why an ambiguous dispatch watching seems appropriate, rather than apparently picking one at random.
08:37 timotimo not at random; there's rules for which to try first
08:37 rurban joined #perl6
08:37 timotimo m: multi f(Int $f where * < 20) { say "Int" }; multi f(Int $f where * > 0) { say ">" }; f(3)
08:37 camelia rakudo-moar c5dcdf: OUTPUT«Int␤»
08:37 timotimo m: multi f(Int $f where * > 0) { say ">" }; multi f(Int $f where * < 20) { say "Int" }; f(3)
08:37 camelia rakudo-moar c5dcdf: OUTPUT«>␤»
08:38 timotimo in this case "earlier in the source wins"
08:39 CurtisOvidPoe From the perspective of a casual developer, having two multisubs, both of which are appropriate targets, should result in an ambiguous dispatch error rather than an arbitrary “earlier whens”. For example, if they’re composed in via roles, what does “earlier” mean?
08:41 Mouq m: multi f($ where {rand < .5}) {1}; multi f($) {0}; say f(3)
08:41 camelia rakudo-moar c5dcdf: OUTPUT«Internal error: inconsistent bind result␤  in sub f at /tmp/TmoIbFD0nv:1␤  in sub f at /tmp/TmoIbFD0nv:1␤  in block <unit> at /tmp/TmoIbFD0nv:1␤␤»
08:42 Mouq Uhm
08:42 Mouq I mean, I *was* trying to break things, but I didn't expect to do *that* good of a job
08:45 xfix joined #perl6
08:46 timotimo %)
08:49 raydiak don't think "arbitrary" is very accurate...it's a deliberate, specced, documented design choice...one which gives an intuitive control to the programmer to choose the winner of a tie without extra syntax or traits or such nonsense, imo
08:50 raydiak though to be fair, I completely see how that'd feel unsettling if you're used to it complaining
08:50 ab6tract joined #perl6
08:50 ab6tract CurtisOvidPoe: you seem to be fighting perl6 at every step ;)
08:51 timotimo why is this random twitter person upset about perl6 using "role" instead of "mixin" and "die" instead of "throw"? :\
08:51 timotimo is there something especially bad about our choice of terminology there?
08:52 ab6tract m: multi sub f( Any $r ) { say ~$r }; multi sub f( Int $r ) { say ~($r ** 3) }; f("any"); f(6);
08:52 camelia rakudo-moar c5dcdf: OUTPUT«any␤216␤»
08:52 ab6tract m: multi sub f( Any $r ) { say ~$r }; multi sub f( Int $r ) { say ~($r ** 3) }; f("any");
08:52 camelia rakudo-moar c5dcdf: OUTPUT«any␤»
08:52 ab6tract m: multi sub f( Any $r ) { say ~$r }; multi sub f( Int $r ) { say ~($r ** 3) }; f(77);
08:52 camelia rakudo-moar c5dcdf: OUTPUT«456533␤»
08:53 ab6tract (okay, only one say per holler at camelia)
08:53 ab6tract CurtisOvidPoe: in this example, it could already be ambigous. Int is an Any, after all
08:55 ab6tract i get that your point included where clauses, but i'm not necessarily convinced that it's possible to circumvent every possible dumb a dev can dumb
08:57 ab6tract sometimes you have to go to your sources and figure out why your expected behavior is not happening
08:57 ab6tract that said, perhaps it could be a compile time warning
08:59 ab6tract not sure what other languages with multi-method dispatch with signature constraints there are that we could compare behavior to
09:00 Mouq timotimo: That's... absurd. Of all the strange names Perl 6 keywords have, (s)he chose those?? :P
09:00 timotimo agreed
09:01 timotimo perhaps he only read the learnxinyminutes text?
09:02 Mouq perhaps
09:02 * Mouq is going to try sleep again
09:03 timotimo hope it won't die!
09:03 * timotimo listens to some rock and role
09:05 ab6tract .tell CurtisOvidPoe some thoughts on your MMD constraint example http://irclog.perlgeek.de/​perl6/2015-01-10#i_9913936
09:05 yoleaux ab6tract: I'll pass your message to CurtisOvidPoe.
09:08 jnthn timotimo: Complaining that roles are not called mixins is kinda funny, given the paper that originally defined them (though as traits) discussed how they are different from mixins. :)
09:10 jnthn CurtisOvidPoe: Historical note: when I first implemented multi-dispatch constraint stuff, I *did* have it failing over ambiguity. TimToady didn't want it that way. I argued pretty hard for ambiguity; I think the arguments for the way it is now are (1) faster to pick the first that matches, and (2) where is really a way of sneaking in smart-match, and in given/when you just get first match, and keeping it this way makes it easy to refactor from gi
09:11 jnthn Time to go out. :)
09:13 mvuets joined #perl6
09:22 molaf_ joined #perl6
09:24 masak morning, #perl6
09:30 Ab6tract joined #perl6
09:30 nwc10 good morning for a rocket launch?
09:31 FROGGS I don't feel like launching a rocket
09:31 gfldex joined #perl6
09:32 Ab6tract .ask jnthn so then is it possible to have a pragma which would complqin at compile time in the presence of overlapping constraints?
09:32 yoleaux Ab6tract: I'll pass your message to jnthn.
09:34 spider-mario joined #perl6
09:36 CurtisOvidPoe jnthn: Can’t talk much right now, but wanted to point out that under the current behavior, if multis are provided by roles, the order in which you consume roles now becomes important. You can sort the list of roles and break your code :(
09:36 yoleaux 09:05Z <ab6tract> CurtisOvidPoe: some thoughts on your MMD constraint example http://irclog.perlgeek.de/​perl6/2015-01-10#i_9913936
09:37 nwc10 FROGGS: that's OK. Someone else is, so we'll watch theirs.
09:38 masak CurtisOvidPoe: note:
09:38 masak m: role R1 { multi method foo { say "R1" } }; role R2 { multi method foo { say "R2" } }; class C does R1 does R2 {}; C.new.foo
09:38 camelia rakudo-moar c5dcdf: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:(C: *%_)␤:(C: *%_)␤  in block <unit> at /tmp/6v380pWpRF:1␤␤»
09:38 masak (I don't have a ready explanation for why that dispatch fails)
09:41 CurtisOvidPoe m: role R1 { multi method foo(Int $f where * > 0) { say "R1" } }; role R2 { multi method foo(Int $f where * < 10) { say "R2" } }; class C does R1 does R2 {}; C.new.foo(3)
09:41 camelia rakudo-moar c5dcdf: OUTPUT«R2␤»
09:41 CurtisOvidPoe m: role R2 { multi method foo(Int $f where * < 10) { say "R2" } }; role R1 { multi method foo(Int $f where * > 0) { say "R1" } };class C does R1 does R2 {}; C.new.foo(3)
09:41 camelia rakudo-moar c5dcdf: OUTPUT«R2␤»
09:41 masak ah, yes.
09:42 masak seems keyed on the order of 'does', then.
09:42 sirdancealot joined #perl6
09:42 masak which, given everything else, seems sane to me.
09:42 CurtisOvidPoe D’oh. I pasted the wrong example.
09:42 CurtisOvidPoe No, it’s not sane. Use a huge list of roles and someone sorts them to make it easier to read and the code breaks.
09:44 nwc10 http://www.spacex.com/webcast/ -- about 3 minutes I think
09:58 masak CurtisOvidPoe: if you're arguing against that, what's the semantics you're arguing *for*? running all where clauses and failing dispatch unless there's a unique match?
10:01 FROGGS that'd be consistent what we do in the other cases, but of course very slow
10:02 masak CurtisOvidPoe: if so, I guess you also acknowledge that that would sacrifice jnthn's two identified advantages: speed and refactorability from given/when.
10:09 FROGGS psch: you remember that non-breaking space in that java source file? how can I reproduce the problem that was caused by it?
10:11 * moritz has power again
10:11 * masak .oO( moritz == He-Man )
10:12 * masak .oO( moritz == Palpatine )
10:12 FROGGS psch: because I can build perl6-j just fine on a 1.8.0_25
10:12 FROGGS power to the people /o/
10:15 bartolin FROGGS: oh, I had that problem. it failed when I build with LANG=C
10:15 FROGGS ohh
10:15 FROGGS ahh
10:15 FROGGS :o)
10:16 FROGGS src/vm/jvm/runtime/org/perl6/rak​udo/RakudoJavaInterop.java:354: error: unmappable character for encoding ASCII
10:16 FROGGS // Perl??6' .new creating a new CallFrame or something..?
10:16 FROGGS got it
10:16 FROGGS thanks :o)
10:16 bartolin FROGGS: no problem
10:18 vendethiel joined #perl6
10:19 moritz .oO( build it with LANG=Java )
10:20 FROGGS ENOPROPERLANG
10:22 nine ab5tract: yes
10:22 FROGGS huh: warning: [options] bootstrap class path not set in conjunction with -source 1.7
10:25 rurban joined #perl6
10:29 kjs_ joined #perl6
10:34 moritz did anybody have trouble connecting to hack.p6c.org?
10:34 moritz Jan 10 10:27:02 hack sshd[15696]: fatal: no matching mac found: client hmac-sha1,hmac-sha1-96,hmac-md5,hmac-​md5-96,hmac-ripemd160,hmac-ripemd183@openssh.com server hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-256 [preauth]
10:34 FROGGS moritz: no problems right now
10:34 xfix I can connect easily.
10:35 moritz somebody couldn't come in, and I wonder if it was just a scripted log-in attempt or a genuine user
10:35 xfix It's probably an attacker that exploits some old security bug.
10:35 xfix Nothing special.
10:35 FROGGS was my guess too
10:35 FROGGS a user will ask for help
10:35 moritz I hope so
10:36 FROGGS :o)
10:37 moritz ok, I have the same log entries on master.p6c.org (the kvm host) to which only I have access, so it looks like password brute-forcing
10:38 rindolf joined #perl6
10:39 * moritz hasn't had much time to look into ansible yet, but uses it as an automated way to apt-get update && apt-get upgrade
10:44 sirdancealot joined #perl6
10:45 dalek nqp: c528f06 | FROGGS++ | tools/build/Makefile-JVM.in:
10:45 dalek nqp: allow utf8 Java source files with non-utf8 LANG
10:45 dalek nqp: review: https://github.com/perl6/nqp/commit/c528f066eb
10:47 dalek rakudo/nom: a81ce33 | FROGGS++ | tools/build/ (2 files):
10:47 dalek rakudo/nom: allow utf8 Java source files with non-utf8 LANG
10:47 dalek rakudo/nom:
10:47 dalek rakudo/nom: Also bump nqp's revision for the same fix to nqp.
10:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a81ce33037
10:48 jluis joined #perl6
10:50 denis_boyun_ joined #perl6
10:56 FROGGS ==> Testing DBIish
10:56 FROGGS t/30-Pg.t ............. ok
10:56 FROGGS # Connect failed with error invalid connection option "database"
10:56 FROGGS moritz: do you know why that happens now?
10:57 masak moritz: meant to ask yesterday. if a magic wand could be waved and suddenly a tight group of ~5 people would have tuits to work on DBIish -- what would be the priority, in your opinion?
10:58 moritz masak: reliability, docs
10:59 masak "reliability" seems relatively intangible to me.
10:59 masak it's the thing that comes from throwing the module around in a lot of real-world situations.
10:59 moritz well
10:59 masak and fixing the stuff that bubbles up.
10:59 moritz then that might be a priority too
11:00 moritz I know that I got segfaults with DBIish when I last tried to build something ORM-Like
11:00 moritz and that was < 200 LoC, iirc
11:00 masak I'm using DBIish currently. with sqlite3.
11:00 FROGGS I'm using it with Pg, no problems there
11:00 moritz well, if you want to reproduce, try the mysql backend :-)
11:01 * moritz guesses he should make a habit of saying "reproduce *it*" :-)
11:01 masak my biggest beef is that every time something goes wrong -- a foreign key constraint, say -- I get the useless exception message SQLITE_ERROR, and then I have to go into the sqlite3 CLI and re-run the command to see the actual, useful error message.
11:01 masak >:(
11:01 moritz FROGGS: is that a new error (database)
11:02 FROGGS moritz: I had that issue in my own code like two weeks ago, and I removed the :database option... but now that I spot it in the tests, I wonder if this is a Pg or DBIish problem
11:02 FROGGS so, it is about two weeks old
11:02 moritz FROGGS: it seems you must pass 'dbname' instead of 'database'
11:03 moritz FROGGS: I'll add a translation step
11:05 dalek DBIish: 1c48e85 | moritz++ | lib/DBDish/Pg.pm6:
11:05 dalek DBIish: [Pg]: Translate "database" to "dbname"
11:05 dalek DBIish: review: https://github.com/perl6/DBIish/commit/1c48e85491
11:05 denis_boyun joined #perl6
11:05 FROGGS ohh, nice
11:05 moritz FROGGS: please test
11:06 moritz "I have only proven it correct"
11:06 moritz (by which I mean I haven't tried it, because I was too lazy too look up my psql credentials)
11:06 FROGGS I'll test after creating another thousand report files :o)
11:06 masak pro tip: if you want your script to be performant, do *not* make 37765 db roundtrips
11:07 moritz ... not? :-)
11:07 masak (it takes 47 m 36 s to run)
11:07 masak that was the simplest thing that could possibly work. I will now try to batch things a bit :)
11:12 FROGGS t/30-Pg.t ............. ok
11:12 FROGGS # Connect failed with error Cannot assign to a readonly variable or a value
11:13 FROGGS I'll test now my code...
11:13 FROGGS moritz: same error :o(
11:13 moritz FROGGS: sorry, I guess I'll have to try and reproduce it
11:13 FROGGS Cannot assign to a readonly variable or a value
11:13 FROGGS at lib/DBDish/Pg.pm6:477  (/home/froggs/dev/nqp/install/languages/​perl6/site/lib/DBDish/Pg.pm6.moarvm::13)
11:13 FROGGS from lib/DBDish/Pg.pm6:476  (/home/froggs/dev/nqp/install/languages/​perl6/site/lib/DBDish/Pg.pm6.moarvm::86)
11:14 moritz FROGGS: does it work if you use dbname instead of 'database'?
11:14 FROGGS you can't assign to $key
11:14 moritz eeks, yes
11:14 FROGGS moritz: aye
11:14 FROGGS (dbname works)
11:14 * moritz has done too much p5 lately
11:15 dalek DBIish: 4350020 | moritz++ | lib/DBDish/Pg.pm6:
11:15 dalek DBIish: [Pg] try again to fix :database
11:15 dalek DBIish: review: https://github.com/perl6/DBIish/commit/4350020fb1
11:17 FROGGS ===SORRY!=== Error while compiling lib/DBDish/Pg.pm6
11:17 FROGGS Two terms in a row
11:17 FROGGS at lib/DBDish/Pg.pm6:476
11:17 FROGGS ------>             my $translated = %keymap ⏏{ $key } // $key;
11:17 FROGGS moritz: :P
11:17 andreoss joined #perl6
11:17 dalek DBIish: 91545ab | moritz++ | lib/DBDish/Pg.pm6:
11:17 dalek DBIish: Fix typo, FROGGS++
11:17 dalek DBIish: review: https://github.com/perl6/DBIish/commit/91545abcd5
11:17 moritz I swear I'll test it if this one didn't work
11:18 FROGGS moritz: both dbname and database work fine now :o)
11:18 moritz \o/
11:21 moritz \o/
11:21 virtualsue joined #perl6
11:21 denis_boyun__ joined #perl6
11:22 dalek DBIish: 220f063 | moritz++ | lib/DBDish/SQLite.pm6:
11:22 dalek DBIish: [SQLite]: Report actual error message from sqlite. masak++ for reporting
11:22 dalek DBIish: review: https://github.com/perl6/DBIish/commit/220f063797
11:23 masak moritz++
11:23 moritz masak: I guess handling binary data and transactions in DBIish would be pretty important in the long run
11:23 masak aye.
11:24 masak hm, I just got an un-fun fail in the `execute` method in DBDish::SQLite
11:24 masak 'Cannot call 'sqlite3_bind'; none of these signatures match:'
11:26 FROGGS what I don't like:
11:26 FROGGS ~/dev/cpandatesters.perl6.org$ time perl6-m jobs/gen-report.pl
11:26 FROGGS use of uninitialized value of type Any in string context  in any !cursor_init at gen/moar/stage2/QRegex.nqp:1069
11:26 FROGGS use of uninitialized value of type Any in string context  in method Str at /home/froggs/dev/nqp/install/language​s/perl6/runtime/CORE.setting.moarvm:1
11:28 FROGGS m: say Any ~~ /./
11:28 camelia rakudo-moar c5dcdf: OUTPUT«use of uninitialized value of type Any in string context  in any !cursor_init at gen/moar/stage2/QRegex.nqp:1068␤␤Nil␤»
11:28 FROGGS hmmm, off by one
11:28 FROGGS (on my box too)
11:29 FROGGS m: EVAL "Any ~~ /./"
11:29 camelia rakudo-moar c5dcdf: OUTPUT«use of uninitialized value of type Any in string context  in any !cursor_init at gen/moar/stage2/QRegex.nqp:1069␤␤»
11:29 FROGGS there we go
11:32 masak dammit, why do I suddenly keep mixing up `shift` and `unshift`!?
11:32 masak (that was the source of my error above)
11:32 masak I swear, I need to write a linter to catch *just* that error in my code.
11:32 denis_boyun_ joined #perl6
11:33 masak the error message should be "masak, you just wrote `unshift` when you meant `shift`. I, the linter, know this because you have publicly denounced the return value of `unshift` as being a scourge upon humanity"
11:36 vendethiel joined #perl6
11:42 lumimies joined #perl6
11:46 dalek rakudo/nom: ae9a738 | FROGGS++ | src/core/Backtrace.pm:
11:46 dalek rakudo/nom: make warnings about undefined values in regexes matches useful
11:46 dalek rakudo/nom:
11:46 dalek rakudo/nom: before:
11:46 dalek rakudo/nom:   perl6-m -e 'Any ~~ /./'
11:46 dalek rakudo/nom:   use of uninitialized value of type Any in string context
11:46 dalek rakudo/nom:     in any !cursor_init at gen/moar/stage2/QRegex.nqp:1068
11:46 dalek rakudo/nom:
11:46 dalek rakudo/nom:   perl6-m -e 'EVAL "Any ~~ /./"'
11:46 dalek rakudo/nom:   use of uninitialized value of type Any in string context
11:46 dalek rakudo/nom:     in any !cursor_init at gen/moar/stage2/QRegex.nqp:1069
11:46 dalek rakudo/nom:
11:46 dalek rakudo/nom: after:
11:46 dalek rakudo/nom:   perl6-m -e 'Any ~~ /./'
11:46 dalek rakudo/nom:   use of uninitialized value of type Any in string context
11:46 dalek rakudo/nom:     in block <unit> at -e:1
11:46 dalek rakudo/nom:
11:46 dalek rakudo/nom:   perl6-m -e 'EVAL "Any ~~ /./"'
11:46 dalek rakudo/nom:   use of uninitialized value of type Any in string context
11:46 dalek rakudo/nom:     in block <unit> at EVAL_0:1
11:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ae9a738856
11:53 kjs_ joined #perl6
11:55 moritz FROGGS++
11:55 FROGGS and it worked, I fixed the uninitialized thing now I knew where it came from :o)
12:06 Mso150_w joined #perl6
12:20 telex joined #perl6
12:25 pecastro joined #perl6
12:33 masak FROGGS++
12:34 masak FROGGS: wrt the "modeling jnthn's debugging skills" question yesterday -- how do you do it? how do you track down and flush out bugs?
12:44 sirdancealot joined #perl6
12:45 pecastro joined #perl6
12:47 FROGGS masak: that's hard to tell... and often starts with an assumption, followed by debug statements and after locating the problem applying a possible fix
12:47 FROGGS for the last fix here I pretty much new the exact fix from the beginning
12:48 virtualsue joined #perl6
12:50 rindolf joined #perl6
12:51 [Sno] joined #perl6
12:52 * masak scribbles frantically
12:52 masak "knowing the exact fix from the beginning..." -- this is gold!
12:52 masak :P
12:52 masak but yes, I know what you mean. a lot hinges on prior experience, of course.
12:53 * masak is thinking of putting together a resource with debugging techniques
12:56 kjs_ joined #perl6
12:58 mst masak: some members of humanity *like* to be scourged, you know.
13:01 moritz masak, FROGGS: I've had the same experience yesterday (knowing pretty much exactly what a problem was, just by looking at the code
13:03 vendethiel .oO( DI is just poorly reimplemented dynamic scoping )
13:03 moritz DI?
13:04 BenGoldberg joined #perl6
13:05 vendethiel moritz: dependency injection
13:06 moritz vendethiel: I tend to disagree, I think
13:08 vendethiel moritz: why so :P?
13:08 vendethiel (of course, I'm trolling a bit on the side)
13:10 moritz vendethiel: because DI is done by providing dependencies to certain objects, not to the whole dynamic scope
13:10 BenGoldberg joined #perl6
13:10 vendethiel okay, then not DI as in guice, but just global lolcontainers as in... too many "di frameworks"
13:10 masak moritz: re looking at the code -- I guess this is human pattern matching at its finest.
13:11 BenGoldberg joined #perl6
13:11 masak mst: if you want all the logical bugs emerging from me mixing up `shift` and `unshift` on my mental down cycles -- fine, you have them :P
13:11 FROGGS m: say $*PERL.compiler.build-date # moritz, do you know why it won't rebuild?
13:11 camelia rakudo-moar c5dcdf: OUTPUT«2015-01-07T21:20:43Z␤»
13:15 cognominal joined #perl6
13:16 moritz ===SORRY!===
13:16 moritz Parrot without ICU is not supported anymore.
13:17 masak and good riddance.
13:17 moritz rakudo is rebuilt in two separate dirs to avoid downtimes
13:18 moritz and I've fixed only one of them
13:19 FROGGS ahh, interesting
13:19 dalek evalbot: 4b71d20 | moritz++ | build-scripts/rebuild-rakudo-jvm.sh:
13:19 dalek evalbot: remove separate JVM rebuild script
13:19 dalek evalbot: review: https://github.com/perl6/evalbot/commit/4b71d208e0
13:22 dalek evalbot: 4ee749a | moritz++ | build-scripts/rebuild-rakudo.pl:
13:22 dalek evalbot: Do not swallow error messages
13:22 dalek evalbot: review: https://github.com/perl6/evalbot/commit/4ee749aeb5
13:23 leont joined #perl6
13:25 dalek evalbot: 3cc6850 | moritz++ | build-scripts/rebuild-rakudo.pl:
13:25 dalek evalbot: Rakudo-rebuild: clean out install dirs too
13:25 dalek evalbot: review: https://github.com/perl6/evalbot/commit/3cc68502af
13:27 rurban joined #perl6
13:28 dalek evalbot: 7ddba05 | moritz++ | build-scripts/rebuild-rakudo.pl:
13:28 dalek evalbot: Rakudo rebuild: no need for both File::Path qw(rmtree); and File::Remove qw(remove)
13:28 dalek evalbot: review: https://github.com/perl6/evalbot/commit/7ddba054e2
13:37 moritz [Coke]: submitted the r-p hang as RT 123579
13:40 BenGoldberg joined #perl6
13:44 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B
13:44 camelia rakudo-moar c5dcdf: OUTPUT«===SORRY!===␤cannot stringify this␤Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤»
13:45 masak ah, camelia is still on a commit three days ago :/
13:57 psch hi #perl6 \o
13:57 masak o/
13:58 psch m: my $bytes = "foo".encode("utf-8"); say $bytes[0] ~~ Int; say nqp::isint($bytes[0]) # this confuses me a bit
13:58 camelia rakudo-moar ae9a73: OUTPUT«True␤0␤»
13:59 psch m: "foo".encode("utf-8")[0].WHAT.say
13:59 camelia rakudo-moar ae9a73: OUTPUT«(Int)␤»
13:59 psch m: my $x = 5; say nqp::isint($x)
13:59 camelia rakudo-moar ae9a73: OUTPUT«0␤»
13:59 psch oh
13:59 psch m: my $bytes = "foo".encode("utf-8"); say $bytes[0] ~~ Int, nqp::isint(nqp:unbox_i($bytes[0]))
13:59 camelia rakudo-moar ae9a73: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WtfWB6XtxGâ�¤Undeclared routine:â�¤    nqp:unbox_i($bytes[0]) used at line 1â�¤â�¤Â»
14:00 psch m: my $bytes = "foo".encode("utf-8"); say nqp::isint(nqp::unbox_i($bytes[0]))
14:00 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:00 psch nope :/
14:01 psch m: my $x = 5; say nqp::isint(nqp::unbox_i($x))
14:01 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:16 moritz m: say nqp::isint(Int)
14:16 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:16 moritz m: say nqp::isint(5)
14:16 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:16 moritz m: my Int $x = 5; say nqp::isint($x)
14:16 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:19 xinming joined #perl6
14:21 timotimo m: my int $foo; say(isint($foo));
14:21 camelia rakudo-moar ae9a73: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zvz66eRl6bâ�¤Undeclared routine:â�¤    isint used at line 1. Did you mean 'asin', 'sinh', 'asinh', 'print'?â�¤â�¤Â»
14:21 timotimo m: my int $foo; say(nqp::isint($foo));
14:21 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:21 timotimo m: my int $foo; say(nqp::isint(nqp::decont($foo)));
14:21 camelia rakudo-moar ae9a73: OUTPUT«0␤»
14:21 timotimo nqp: my int $foo; say(nqp::isint(nqp::decont($foo)));
14:21 camelia nqp-jvm: OUTPUT«(signal ABRT)#␤*** Error in `java': double free or corruption (fasttop): 0x00007f1734013400 ***␤# There is insufficient memory for the Java Runtime Environment to continue.␤*** Error in `java': double free or corruption (out): 0x00007f173401a8d0 ***␤*** Error…»
14:21 camelia ..nqp-{moarvm,parrot}: OUTPUT«1␤»
14:21 timotimo mhm
14:30 zakharyas joined #perl6
14:31 silug joined #perl6
14:33 moritz timotimo: decontainering a native sounds like a bad idea to me
14:47 Sir_Ragnarok joined #perl6
15:10 colomon joined #perl6
15:17 ab6tract joined #perl6
15:24 ab6tract .ask nine yes what? was that in response to a pragma which would choke/complain about overlapping signature constraints at compile time?
15:24 yoleaux ab6tract: I'll pass your message to nine.
15:30 rindolf joined #perl6
15:41 mr-foobar joined #perl6
15:49 moritz m: say 'which version?'
15:50 camelia rakudo-moar ae9a73: OUTPUT«which version?␤»
15:50 masak heh. in my effort to make fewer roundtrips, I inserted so much boilerplate that I literally ran out of variables.
15:50 moritz masak: ^^ camelia is now up-to-date again
15:50 masak moritz++
15:50 moritz == SORRY! ===
15:50 moritz No more variables available
15:51 masak got 'MVM_spesh_alloc: requested oversized block'
15:51 moritz moarvmbug!
15:51 masak which I *think* has to do with variable declarations, since that block happens to have 128 of them.
15:51 masak yeah; haven't been able to golf it, though.
15:52 masak it's part of a larger, equally ridiculous script.
15:52 moritz m: EVAL join '; ', map { "my \$v$_" }, ^256
15:52 camelia rakudo-moar ae9a73: ( no output )
15:52 moritz m: EVAL join '; ', map { "my \$v$_" }, ^2560
15:52 camelia rakudo-moar ae9a73: ( no output )
15:52 moritz m: EVAL join '; ', map { "my \$v$_" }, ^25600
15:52 masak yeah -- already tried that.
15:53 camelia rakudo-moar ae9a73: OUTPUT«(timeout)»
15:56 masak it seems to be a combination the number of variable declarations and blocks.
15:57 masak now I got the same error in a block with only four declarations...
15:57 masak it would be a joy to golf this, though.
15:58 masak bit of a surprise that it was Moar that hit a limit first, and not sqlite3 or DBIish.
16:09 rurban joined #perl6
16:10 cognominal joined #perl6
16:20 timotimo moritz: AFAIR decont is safe
16:27 timotimo as in: if it doesn't get a container, it'll No-Op
16:33 * psch feels a bit like a wizard
16:33 psch ((Object[])parsedArgs[j])[k] != null ? ((Double)((Object[])parsed​Args[j])[k]).floatValue() : null;
16:33 psch because of all the casting o.o
16:35 * FROGGS .oO( Java's Next Top Object )
16:38 arnsholt psch: Nice one!
16:38 psch luckily i apparently just got caught up a bit in the boxing and unboxing think and i at least don't need the null check...
16:38 psch and the Object[] cast also has to be more specific apparently
16:38 arnsholt I've written similar code in C when doing pointer shenanigans =D
16:40 psch as long as it actually helps to get it working...
16:40 psch although that's not quite the final measure i think? :)
16:42 sven_123_ joined #perl6
16:46 psch arnsholt: it's part of the un-/marshalling from perl6 to java, specifically perl6 lists
16:47 colomon first smoke report of 2015.  C::Parser failing today, Data::Pretty for the last three days, GD and Stats since New Year's Eve
16:47 colomon 224 modules passing their tests
16:49 FROGGS that's quite nice I think
16:50 timotimo could be better
16:51 timotimo not saying i'll do it :)
16:53 zakharyas joined #perl6
16:58 cognominal joined #perl6
17:00 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B
17:00 camelia rakudo-moar ae9a73: OUTPUT«B␤»
17:00 masak \o/
17:00 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <B Z> }; import M1; import M2; say B
17:00 camelia rakudo-moar ae9a73: OUTPUT«===SORRY!===␤A symbol 'B' has already been exported␤»
17:01 masak I'm under the impression (from various hints in S12) that the above one should be *allowed* but that B should be "poisoned" by being imported from two different places.
17:01 masak does anyone have a differing view? looking to submit a rakudobug here.
17:01 * masak will check why Data::Pretty is failing
17:03 masak m: say ("foo" => 42).gist
17:03 camelia rakudo-moar ae9a73: OUTPUT«foo => 42␤»
17:04 masak m: say ("f'oo" => 42).gist
17:04 camelia rakudo-moar ae9a73: OUTPUT«f'oo => 42␤»
17:04 masak this feels wrong to me.
17:04 dalek perl6-bench: 72eed49 | (Geoffrey Broadwell)++ | microbenchmarks.pl:
17:04 dalek perl6-bench: Fix for nqp version of while_pushme microbenchmark; thanks to timotimo++ for noticing that fix for perl5 and perl6 was necessary but not sufficient for nqp
17:04 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/72eed49a8d
17:04 japhb timotimo: That's for you. ^^
17:08 mr-foobar joined #perl6
17:12 esaym153 joined #perl6
17:13 masak rakudo commit 4e67634993 by jnthn broke Data::Pretty, it seems. https://github.com/rakudo/rakudo/commit/​4e67634993f049c93794bdbb9e5c6e1bffa4f120
17:14 masak m: say ("foo => bar, baz" => 42).gist
17:14 camelia rakudo-moar ae9a73: OUTPUT«foo => bar, baz => 42␤»
17:14 masak can we at least agree that this is... not ideal? :P
17:14 * masak feels that Perl 6 has too many types of stringification
17:20 xfix say (("foo => bar, baz" => 42) => 84).gist
17:20 xfix m: say (("foo => bar, baz" => 42) => 84).gist
17:20 camelia rakudo-moar ae9a73: OUTPUT«(foo => bar, baz => 42) => 84␤»
17:20 masak m: say ("foo => 42 <= bar" => 5).gist
17:20 camelia rakudo-moar ae9a73: OUTPUT«foo => 42 <= bar => 5␤»
17:21 xfix m: bar + bar
17:21 camelia rakudo-moar ae9a73: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TLb4yI4SWlâ�¤Undeclared routine:â�¤    bar used at line 1. Did you mean 'bag'?â�¤â�¤Â»
17:21 xfix What is bar?
17:22 xfix Oh, right, it's in quotes.
17:23 * masak .oO( depends if you're a drunk or a gymnast... )
17:23 arnsholt Does anyone have easy access to a 32-bit host with Rakudo/Moar?
17:24 xfix I have 32-bit host with Rakudo installed, but it's old version, and it uses Parrot.
17:24 psch https://github.com/rakudo/rakudo/pull/350 # fixes raiph++'s bug
17:25 psch although it's not 100% there yet, considering the .Int coercion is neccessary
17:25 psch but i don't have the brains anymore to put more time into it today
17:25 psch but it's a nearly-complete state so i figured i can PR it already :)
17:25 xfix But let's see... you want Rakudo/MoarVM.
17:25 timotimo japhb: thank you :)
17:30 psch making the .Int conversion of a utf8 unneccessary was what prompted all those attempts with nqp::isint a bit ago btw
17:30 virtualsue joined #perl6
17:43 psch hm, actually i'm not sure needing the .Int call should be a bug
17:45 [Sno]_ joined #perl6
17:49 psch does that fit with the typed-thinking? "when going from untyped perl6 to strictly typed java we have to say which type data should behave as"
17:49 psch (i'm not sure if what java does is called "strictly typed")
17:58 FROGGS arnsholt: I have
17:59 timotimo my answer to gabor's mail is correct, i hope?
18:00 timotimo do we have a good way to get rid of the for-turns-into-list-thing?
18:01 FROGGS I was thinking that only a statement level for loop would gather values
18:01 FROGGS arnsholt: how can I help you?
18:04 pecastro joined #perl6
18:05 timotimo mhm
18:10 colomon joined #perl6
18:11 lizmat good *, #perl6
18:11 lizmat I see a fail on t/spec/S19-command-line/arguments.t
18:12 FROGGS hi lizmat
18:12 lizmat $ echo 'exit(42)' | perl6 -
18:12 lizmat Could not open -. Failed to open file: no such file or directory
18:13 FROGGS_ joined #perl6
18:13 lizmat wasn't there a patch to nqp recently that would take stdin on "-" ?
18:13 psch lizmat: with FROGGS_++ nqp bump that should've come through
18:13 lizmat I pull, zapped install and rebuilt from scratch
18:13 lumimies joined #perl6
18:14 lizmat *pulled
18:14 lizmat still failing
18:14 arnsholt FROGGS: Working on a cint patch to Moar/Rakudo/NativeCall
18:15 lizmat hmmm...NQP_REVISION has two lines
18:15 lizmat trying now with the first line removed  :-)
18:15 FROGGS_ O.o
18:15 arnsholt FROGGS_: So first of all, if you could just take an up to date Rakudo/Moar and run the NativeCall testsuite. What are the fails? (Pretty sure there should be some fails)
18:16 FROGGS_ ewww, my history shows: git describe >>../rakudo/tools/build/NQP_REVISION -.-
18:16 dalek rakudo/nom: cf60fa8 | lizmat++ | tools/build/NQP_REVISION:
18:16 dalek rakudo/nom: Properly update NQP revision
18:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf60fa8218
18:16 FROGGS_ arnsholt: I've got a fresh everything, so lemme test
18:17 brrt joined #perl6
18:17 lizmat FROGGS_: after this fix, the test passes    FROGGS_ ++
18:17 FROGGS_ ahh, cool
18:17 FROGGS_ lizmat++
18:19 FROGGS_ arnsholt: https://gist.github.com/FR​OGGS/f7101c862a663144d92d
18:25 timotimo something about the for-loop-into-while optimization is b0rken *again*
18:25 dalek rakudo/nom: 76afb6c | peschwa++ | src/vm/jvm/runtime/org/perl6/r​akudo/RakudoJavaInterop.java:
18:25 dalek rakudo/nom: Static classes won't have a constructor; honor that.
18:25 dalek rakudo/nom:
18:25 dalek rakudo/nom: This commit fixes generation of constructor dispatch to not generate any
18:25 dalek rakudo/nom: dispatch code if we don't have constructors in the first place.
18:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/76afb6c58c
18:25 dalek rakudo/nom: 28429ec | peschwa++ | / (2 files):
18:25 dalek rakudo/nom: Correct marshalling of listy types to Java.
18:26 dalek rakudo/nom:
18:26 dalek rakudo/nom: raiph++ for pointing me at this.
18:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/28429ec898
18:26 dalek rakudo/nom: 8f447f8 | FROGGS++ | / (2 files):
18:26 dalek rakudo/nom: Merge pull request #350 from peschwa/jvminterop
18:26 dalek rakudo/nom:
18:26 dalek rakudo/nom: More JVM-Interop improvements
18:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8f447f89cf
18:30 Mso150 joined #perl6
18:33 psch .tell raiph jvm-interop has seen another update.  check t/03-jvm/01-interop.t in the rakudo basedir for what works now
18:33 yoleaux psch: I'll pass your message to raiph.
18:35 arnsholt FROGGS_: Cheers! I'll get back to you when I have code =)
18:52 dalek Heuristic branch merge: pushed 16 commits to rakudo/newio by lizmat
18:54 Mso150_n joined #perl6
18:58 kaare__ joined #perl6
19:05 KCL_ joined #perl6
19:15 prime joined #perl6
19:15 prime joined #perl6
19:17 adu joined #perl6
19:22 FROGGS_ arnsholt: awesome :o)
19:46 IllvilJa joined #perl6
19:51 denis_boyun_ joined #perl6
19:51 Mso150_n joined #perl6
19:53 dalek rakudo/nativecall-cint: 9b0bbd2 | arnsholt++ | src/ (3 files):
19:53 dalek rakudo/nativecall-cint: Initial cint and clong implementation.
19:53 dalek rakudo/nativecall-cint: review: https://github.com/rakudo/rakudo/commit/9b0bbd2e54
19:54 dalek zavolaj/cint: 978be25 | arnsholt++ | t/05-arrays.t:
19:54 dalek zavolaj/cint: Attempt to fix t/05-arrays on 32-bit with cint.
19:54 dalek zavolaj/cint: review: https://github.com/jnthn/zavolaj/commit/978be25366
19:55 arnsholt FROGGS_: Turns out I don't have a MoarVM commitbit, so could you build git@github.com:arnsholt/MoarVM.git (nativecall-cint branch) and compile NQP/Rakudo against it?
19:55 arnsholt Then try running t/05-arrays.t with the resulting perl6-m (with PERL6LIB=lib)
19:55 FROGGS_ k
19:55 arnsholt Hopefully that'll fix the failures
20:04 FROGGS_ arnsholt: looks like it had no effect: https://gist.github.com/FR​OGGS/f7101c862a663144d92d
20:06 FROGGS_ I pushed to a moarvm branch Justin Case
20:06 Alina-malina joined #perl6
20:07 timotimo so the fact that a function/method returning something listy and the other stuff that is in there spills over into "arguments" in perl5 ... kind of not so clever, eh?
20:08 adu joined #perl6
20:09 arnsholt FROGGS_: Bah. Back to the drawing board, then >.<
20:09 FROGGS_ :/
20:19 arnsholt Should probably set up a 32-bit VM
20:20 jack_rabbit joined #perl6
20:20 Sqirrel joined #perl6
20:21 FROGGS_ yeah, sadly I cannot make my VM available easily
20:22 psch i'm still wondering about S09:Sized_types
20:22 synopsebot Link: http://perlcabal.org/syn/S09.html#Sized_types
20:23 psch that is, the "int" in "as in int on *-bit machines" - is that our int or C int
20:24 arnsholt FROGGS_: 'sok. It's not *that* hard, thankfully =)
20:25 FROGGS_ very true :o)
20:26 adu FROGGS_: why?
20:27 FROGGS_ adu: setting up a VM? because it is just about clicks and downloading images...
20:28 adu FROGGS_: have you heard of vagrant?
20:29 adu there are no clicks in vagrant, just TUI
20:30 FROGGS_ well, I am pretty happy with my VMs... I just cannot provide a shell account because dyndns is currently not wired up
20:30 FROGGS_ and I am doing some server maintenance at home
20:30 raiph joined #perl6
20:31 adu FROGGS_: you might also look into openstack and noip (a dyndns clone)
20:32 adu FROGGS_: it also depends on what you mean by "available"
20:32 adu for example, exporting from VirtualBox to "ova" format might also qualify
20:35 FROGGS_ that would not work well with my poor upstream :/
20:38 dalek perl6-roast-data: a70b3dd | coke++ | / (5 files):
20:38 dalek perl6-roast-data: today (automated commit)
20:38 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/a70b3dd482
20:47 xfix_ joined #perl6
20:55 xfix joined #perl6
20:56 jnthn messages, pzh
20:56 yoleaux 09:32Z <Ab6tract> jnthn: so then is it possible to have a pragma which would complqin at compile time in the presence of overlapping constraints?
20:57 jnthn At compile time? No, that's the halting problem, in general. Can you use a pragma that swaps in a different multi-dispatch algo? Maybe yes.
20:58 zakharyas joined #perl6
21:00 moritz m: sqrt(4); say 42
21:00 camelia rakudo-moar 8f447f: OUTPUT«WARNINGS:␤Useless use of "sqrt(4)" in expression "sqrt(4)" in sink context (line 1)␤42␤»
21:02 IllvilJa joined #perl6
21:03 FROGGS_ jnthn: can you please give an commit bit of moarvm to arnsholt?
21:05 Mso150_n joined #perl6
21:07 timotimo i'm kinda sad arane disappeared from the face of the earth :(
21:08 BenGoldberg joined #perl6
21:09 moritz who or what is arane?
21:10 * raydiak guesses https://github.com/BizarreCake/Arane
21:10 vendethiel yes
21:10 jnthn masak: See discussion on the Pair.gist change around the time the commit happened; there was some consensus here on channel that .gist should not do the same as .perl on Pair.
21:13 masak I will read the discussion.
21:14 telex joined #perl6
21:15 jnthn masak: The generalization, though, is that .gist of aggregate data structures should really be .gist-ing the stuff inside of them.
21:15 timotimo jnthn: can you believe the optimization that turns for into while if you pass ranges to it is broken *again*?
21:15 jnthn :/
21:15 jnthn What on earth broke it this time?
21:15 timotimo no clue
21:15 timotimo jnthn: and somehow it seems like for loops give lists even in void context or something?!
21:16 jnthn FROGGS_: Done.
21:16 FROGGS_ jnthn++ # :o)
21:16 arnsholt jnthn: Cheers!
21:16 FROGGS_ commit all the things! /o/
21:17 jnthn c5e7a7783d1 was the last commit that touched the optimization, afaict
21:20 ssutch joined #perl6
21:38 kjs_ joined #perl6
21:41 masak today's success story: got the running time of my script down from 47 minutes to 3.5, by aggressively batching database calls: https://gist.github.com/masak/0714a0d412f2ab4e5f12
21:42 colomon moritz++
21:42 masak (the number of database roundtrips went down from 38k to 149)
21:42 ugexe when an nqp module (in this case ModuleLoader.nqp) errors, but was invoked from perl6 code and CATCH'd, should the error be output twice?
21:42 ugexe m: try { EVAL q{ require No::Such::Module; }; CATCH { say $_.perl } }
21:42 camelia rakudo-moar 8f447f: OUTPUT«X::AdHoc.new(payload => "Could not find No::Such::Module in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-​2/languages/perl6")␤Could not find No::Such::Module in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib,…»
21:43 psch m: try { EVAL 'require No::Such::Module'; CATCH { default { .perl.say } } }
21:43 camelia rakudo-moar 8f447f: OUTPUT«X::AdHoc.new(payload => "Could not find No::Such::Module in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6")␤»
21:43 psch ugexe: CATCH { } doesn't mark the exception as handled
21:43 ugexe oh
21:43 psch ugexe: CATCH is kinda-sorta much given $! { }
21:43 psch s/much//
21:44 psch and matching with a when marks the exception as handled
21:44 jnthn Right, you smart-match inside it. CATCH { default { } } is the "swallow everything"
21:46 ugexe makes sense. i got confused when EVAL{ fail "fail" } and die; only output 1 error, but now i see why :)
21:52 andreoss joined #perl6
21:53 broski joined #perl6
21:55 jnthn 'night, #perl6
21:55 colomon o/
21:55 psch \o
21:56 broski how is perl6 coming along?
21:56 raiph m: for Array, Buf, List { for .new(1,2) { say .WHAT }} # Why do objects created by punning Buf role fail to iterate?
21:56 yoleaux 18:33Z <psch> raiph: jvm-interop has seen another update.  check t/03-jvm/01-interop.t in the rakudo basedir for what works now
21:56 camelia rakudo-moar 8f447f: OUTPUT«(Int)␤(Int)␤(Buf)␤(Int)␤(Int)␤»
21:57 raiph broski: hi
21:57 broski hey how's it goin raiph
21:59 raiph great. what langs do you use atm?
21:59 raiph (so I can better answer your first Q)
22:00 broski well
22:00 broski ruby, php and perl
22:02 raiph the latest versions of all those are all solid; P6 is still immature
22:03 raiph m: 'have you tried using P6 yet?'.say
22:03 camelia rakudo-moar 8f447f: OUTPUT«have you tried using P6 yet?␤»
22:03 ab5tract joined #perl6
22:04 broski no I have not
22:04 masak is ('str',) the idiomatic way to pass a list of one element to a routine expecting something list-y?
22:04 ab5tract raiph: imho, perl 6 core devs are being a bit too conservative
22:04 masak <str> obviously doesn't work, since it's not a list.
22:04 ab5tract p6 isn't quite finished
22:05 Mso150 joined #perl6
22:05 ab5tract but calling her immature all the time is only going to cause self-esteem issues
22:05 ab5tract it's not 2009 anymore :)
22:06 masak in other news, ruby, php and perl 5 aren't quite finished either...
22:06 raiph broski: I just finished an update of the sidebar of reddit.com/r/perl6; I'd appreciate feedback
22:06 masak also, speak for yourself about self-esteem issues. I've been using Perl 6 for 10 years now. :P feeling pretty good about it.
22:07 broski ok
22:07 broski raiph: you can have dashes in the subroutine names?
22:07 masak yes.
22:07 psch raiph++ # sidebar looks great
22:07 broski nice!
22:08 ab5tract masak: i'm not talking about any of our self-esteems there :P
22:08 masak m: sub foo-bar { say "OH HAI" }; foo-bar
22:08 camelia rakudo-moar 8f447f: OUTPUT«OH HAI␤»
22:08 vendethiel masak: that's a bit easy ;-)
22:08 vendethiel (saying that those aren't finished)
22:08 vendethiel masak: <str> *should* work, shouldn't it?
22:08 raiph psch++ # I've tested the jvm fix, thx, will update the SO post tomorrow
22:09 masak vendethiel: no :(
22:10 vendethiel masak: well, I mean -- you should have all the methods you need to treat it as a list, shouldn't you?
22:10 vendethiel (I do know it retursn a string, and I do disagree with it :(.)
22:10 masak vendethiel: it definitely doesn't work now, and I don't believe it's meant to ever work :/
22:11 vendethiel masak: what's missing?
22:12 ab5tract m: <this that>.WHAT.say
22:12 camelia rakudo-moar 8f447f: OUTPUT«(Parcel)␤»
22:13 raiph m: for Array.new(1,2), Buf.new(1,2) { say .WHAT } # rakudobug? specbug?
22:13 camelia rakudo-moar 8f447f: OUTPUT«(Int)␤(Int)␤(Buf)␤»
22:13 ab5tract masak: that implies to me that it should be cleaned up in the GLR
22:13 ab5tract but i'm not a 10 year user like you, so what do i know
22:14 broski m: "hey there".say
22:14 camelia rakudo-moar 8f447f: OUTPUT«hey there␤»
22:14 masak ab5tract: that's not what GLR is meant to do.
22:15 broski :)
22:15 masak ab5tract: both you and vendethiel seem to assume something is wrong here and needs fixing.
22:15 ab5tract Parcel is going away, right?
22:15 psch raiph: i'm unsure about my reasoning re: "how much autoconversion does jvm-interop do", which is part of the problem with the CRC32.update call
22:15 vendethiel masak: something "not working" seems to be missing something, yes
22:15 masak vendethiel: what's missing is the requisite conditions for a successful dispatch. `<str> !~~ Positional`
22:15 broski raiph: sidebar looks good
22:16 ab5tract masak: needing to ("something",) to get list sounds pretty wrong to me
22:16 vendethiel that makes sense
22:16 psch raiph: the problem is that utf8 elements aren't ints, but they can be if they have to.  either way seems horrid to me, fwiw
22:16 vendethiel yes, I don't see the point of having both 'str' and <str>, just confusing
22:16 psch on the one hand we verbosify everything by demanding explicit type annotation for interop, on the other hand we ambiguate (nearly) every call with powerful autocasting...
22:17 psch it's just too Cool... :)
22:17 broski so I'm wondering, how far along is Perl6 from being a "mature" language?  or maybe more simply, a production ready language
22:17 ab5tract and if <this' semantics> is to return a Parcel, it seems like a great time to get it to be a List regardless of length
22:18 vendethiel broski: I used it in production a month after discovering it :p. pretty good for most of my command-line needs
22:18 masak 'night, #perl6
22:18 psch night masak \o
22:19 broski g'night
22:20 ab5tract ciao masak
22:20 ab5tract m: <this>.WHAT.say
22:20 camelia rakudo-moar 8f447f: OUTPUT«(Str)␤»
22:20 ab5tract m: <this other>.WHAT.say
22:20 camelia rakudo-moar 8f447f: OUTPUT«(Parcel)␤»
22:20 raiph broski: It's recently been declared about one year from "official launch for production use"
22:20 ab5tract that just doesn't feel right
22:21 broski raiph: VERY cool
22:21 raiph ab5tract: the Parcel thing or the launch date?
22:21 broski vendethiel: sweet, I'm going to be using it here very shortly
22:22 ab5tract raiph: that the return type of <this syntax> varies depending on the number of elements
22:22 Vlavv joined #perl6
22:22 psch S02:Rational_literals
22:22 synopsebot Link: http://perlcabal.org/syn/S​02.html#Rational_literals
22:22 ab5tract i actually think perl 6 should not be considered immature at this point (though i'm afraid i offended masak in how i worded it)
22:23 psch that also doesn't seem there yet
22:23 psch m: < 1/2 >.WHAT.say
22:23 camelia rakudo-moar 8f447f: OUTPUT«(Str)␤»
22:23 psch m: my $x = < 1/2 >; $x.WHAT.say
22:23 camelia rakudo-moar 8f447f: OUTPUT«(Str)␤»
22:23 ab5tract broski: as you can tell, some details are yet to be worked out :)
22:24 ab5tract but that also has to do with the enormous scope of the language
22:24 ab5tract i've found that it's certainly ready to inspire a lot of joy in hacking :)
22:24 psch (enormous scope of perl6)++
22:25 psch https://github.com/masak/ip​so/blob/master/lib/Ipso.pm
22:25 psch seriously
22:25 psch masak++ for writing that
22:25 psch that's not doing the scope justice, fwiw
22:25 psch because it strongly focuses on grammars
22:26 vendethiel ab5tract: why not :)?
22:27 ab5tract why not consider it immature?
22:28 vendethiel because I've used it to great success
22:28 vendethiel I don't mean it's not immature. there are big chunks missing.
22:28 vendethiel I can do without those
22:29 raydiak (imo) maturity is not a boolean, or even a scalar...more like a spectrum; and yes we have a much wider range to cover in our spectrum than most :)  but the area under the curve is getting pretty big
22:29 ab5tract it seems i'm not suited for discussing things at the moment, because what i am saying is "stop calling perl 6 immature"
22:30 ab5tract or, imho, that shouldn't be how one words it
22:30 ab5tract but i've managed to confuse vendethiel and offend masak, so i'm doing something wrong
22:30 vendethiel I'm not confused -- I hear ya :). But I disagree with that it's not production ready
22:31 vendethiel that it's still immature is a given. it's still slow, a bit buggy and incomplete
22:31 ab5tract never said it wasn't production ready. and calling a 14 year old language that has more features already working than any other language i have ever heard of
22:32 ab5tract just doesn't make sense to me
22:32 * raydiak didn't read the backlog before he typed; was just jumping in as per usual :)
22:32 vendethiel havn't you met c++ yet? or scala :P
22:32 vendethiel or maybe ada... hehehe
22:32 psch ab5tract: 14 year olds can produce works that benefit society - it's still justifiable to call these 14 year olds immature
22:32 psch i think that's part of the semantic argument here
22:32 timotimo on the other hand, a few things that other languages definitely do have don't work fully awesomely yet
22:33 timotimo i'm still pretty hype for the great list refactor
22:35 ab5tract fair points. all i'm saying is calling the language immature at the same time as promising a production-ready release within 12 months
22:35 ab5tract is cognitive dissonance of a higher order
22:36 vendethiel eeh?
22:36 ab5tract but then again, we all have our own interpreters parsing these things, so my mileage certainly varies
22:36 vendethiel I'd say php is only coming of age these last 2 years
22:36 timotimo and JS?
22:36 raiph http://tinyurl.com/AQuestionOfBelief
22:37 ab5tract JS is geriatric. it's stuck. maybe in 10 years people will get to use ECMA 6 universally, if then
22:37 * vendethiel has work on coffee and ls, so is obviously biased
22:38 donaldh joined #perl6
22:38 psch raiph++
22:38 vendethiel haha :D
22:38 psch that reminded me of "The Birth And Death Of JavaScript" by destroyallsoftware
22:39 psch https://www.destroyallsoftware.com/ta​lks/the-birth-and-death-of-javascript
22:39 psch the talk postulates a future where javascript is run on the hardware and all legacy code on top of it is emulated
22:40 psch which is kind of what we're doing with perl6, except not quite down at the hw layer
22:42 vendethiel even in vghs, they javascript! http://i.imgur.com/t558RJt.png
22:44 timotimo VGHS <3
22:44 ab5tract there is a difference between an immature language and an immature use of that language. all i've meant to say is that telling prospective users that perl 6 is immature (again, imo) makes it sound a lot less usable than it really is
22:45 ab5tract and in the year where there are guarantees of production-readiness floating around, it just seems like a poor way to phrase the current state of progress
22:45 andreoss is there a flattering comma or something?
22:46 timotimo flattening depends on what a listy thing "is in"
22:46 timotimo as in: is it inside a scalar container?
22:46 vendethiel ab5tract: what should we call it :)?
22:46 raiph andreoss: you, are, so, cute?
22:46 timotimo ooooh
22:46 timotimo now i get it
22:46 ab5tract "getting there" :)
22:48 andreoss @a, @b, @c - == @(@a.list , @b.list, @c.list)
22:48 Alina-malina joined #perl6
22:48 andreoss that's what i want
22:48 psch "flattening comma" i think?
22:49 andreoss am i being misunderstood?
22:49 psch there was talk about this a during APW i think, but iirc it was discarded
22:49 psch andreoss: i'm not sure.  what are you trying, how does it not conform to your expectation?
22:49 ab5tract andreoss:  "is there a flattering comma or something?" :)
22:49 andreoss (@a, @b) doesnt give all of @a combined with all of @b
22:50 psch ooh
22:50 psch that's X
22:50 psch m: my @a = 1,2,3; my @b = <a b c>; say @a X @b
22:50 camelia rakudo-moar 8f447f: OUTPUT«1 a 1 b 1 c 2 a 2 b 2 c 3 a 3 b 3 c␤»
22:50 psch m: my @a = 1,2,3; my @b = <a b c>; .say for @a X @b
22:50 camelia rakudo-moar 8f447f: OUTPUT«1␤a␤1␤b␤1␤c␤2␤a␤2␤b␤2␤c␤3␤a␤3␤b␤3␤c␤»
22:50 psch m: my @a = 1,2,3; my @b = <a b c>; .say for @a X~ @b
22:50 camelia rakudo-moar 8f447f: OUTPUT«1a␤1b␤1c␤2a␤2b␤2c␤3a␤3b␤3c␤»
22:50 psch the last on is most illustrative
22:51 ab5tract psch: i don't think that is what andreoss meant
22:51 psch andreoss: does that help? :)
22:51 andreoss by combined i didnt  mean real  combinations
22:51 psch ab5tract++ # better at understanding than me
22:52 andreoss , (comma) between arrays makes an array of arrays
22:52 andreoss i want an array of elements of those arrays
22:52 ab5tract well, i still don't think i get the problem :)
22:53 ab5tract m: my @a = 1,2,3,4; my @b = <yes well why not>; my @c = @a,@b; @c.say
22:53 camelia rakudo-moar 8f447f: OUTPUT«1 2 3 4 yes well why not␤»
22:53 timotimo m: my @a = 1,2,3,4; my @b = <yes well why not>; my @c = @a,@b; @c.perl.say
22:53 camelia rakudo-moar 8f447f: OUTPUT«Array.new(1, 2, 3, 4, "yes", "well", "why", "not")␤»
22:53 ab5tract andreoss: is that not what you are talking about? :/
22:54 andreoss m my @a = 1..2; my @b = 3..4; my @c = 5..6; (@a, @b, @c).perl.say
22:54 andreoss m: my @a = 1..2; my @b = 3..4; my @c = 5..6; (@a, @b, @c).perl.say
22:54 camelia rakudo-moar 8f447f: OUTPUT«(Array.new(1, 2), Array.new(3, 4), Array.new(5, 6))␤»
22:55 ab5tract hmm, ranges seem to itemize
22:55 andreoss ab5tract: without array context it does not flatten arrays
22:56 ab5tract ok i think i get you now
22:56 andreoss i does not matter if it's ranges or not
22:56 andreoss it
22:56 ab5tract indeed
22:57 raiph m: my @a = 1, 2; my @b = 3, 4; (@a; @b).WHAT.say
22:57 camelia rakudo-moar 8f447f: OUTPUT«(LoL)␤»
22:57 psch m: my @a = 1..2; my @b = 3..4; my @c = 5..6; @(@a, @b, @c).perl.say
22:57 camelia rakudo-moar 8f447f: OUTPUT«(1, 2, 3, 4, 5, 6).list␤»
22:57 raiph LoL is List of List
22:57 * psch wants to say "GLR"
22:58 psch although i suppose flattening just because it's a list context is actually the wrong approach
22:58 andreoss psch: i know about @(), i've stated it as an example of what i need
22:58 psch because it's the hard-to-get-right perl5 behavior
22:58 psch andreoss: yes, i'm just checking :)
22:58 ab5tract i guess my question is, what's making you uncomfortable about @() ?
22:59 andreoss ab5tract: it's ugly
22:59 kjs_ joined #perl6
22:59 ab5tract then use .list ;)
22:59 ab5tract but seriously, i agree with psch here
23:00 andreoss ab5tract: it still need parenthesis for that
23:01 raiph andreoss: what about LoLs? (see my one liner above)
23:01 psch m: my @a = 1..2; my @b = 3..4; my @c = 5..6; @($@a, $@b, $@c).perl.say # what i think i'd want to happen
23:01 camelia rakudo-moar 8f447f: OUTPUT«([1, 2], [3, 4], [5, 6]).list␤»
23:01 psch without the explicit @() and $'s, that is
23:02 psch oh wait, that does happen
23:02 raiph m: my @a = 1..2; my @b = 3..4; my @c = 5..6; $(@a, @b, @c).perl.say
23:02 camelia rakudo-moar 8f447f: OUTPUT«$(Array.new(1, 2), Array.new(3, 4), Array.new(5, 6))␤»
23:03 psch yeah, what i meant to say was that @() shouldn't flatten into the contained arrays
23:03 raiph m: my @a = 1..2; my @b = 3..4; my @c = 5..6; (@a, @b, @c).perl.say
23:03 camelia rakudo-moar 8f447f: OUTPUT«(Array.new(1, 2), Array.new(3, 4), Array.new(5, 6))␤»
23:03 psch but then i didn't have a long discussion in person with a bunch of smart people about this kind of stuff, so....
23:03 raiph psch: but that's what $() does, right?
23:03 raiph m: my @a = 1..2; my @b = 3..4; my @c = 5..6; @(@a, @b, @c).perl.say
23:03 camelia rakudo-moar 8f447f: OUTPUT«(1, 2, 3, 4, 5, 6).list␤»
23:04 raiph (see above)
23:04 psch raiph: doesn't that seem overloaded? i.e. @() flattening everything and () being $()?
23:04 andreoss m: sub infix:<+++>(@xs, @ys) {  @(@xs, @ys).list; }; say (1,2,3) +++ (5,6,7)
23:04 camelia rakudo-moar 8f447f: OUTPUT«1 2 3 5 6 7␤»
23:04 ab5tract psch: () and $() are different. the former is a list, the latter is an item
23:04 andreoss why no such thing in perl6?
23:05 andreoss perl5 gets rid of @{} stuff, perl6 introduces it back with @().
23:06 psch ab5tract: ooh, right.  $() fits into @a[0], () fits into @a, @() flattens into @a
23:06 psch yeah, i guess it's pretty clever how it is already... :)
23:08 psch m: say ((1,2,3), (4,5,6)).perl
23:08 camelia rakudo-moar 8f447f: OUTPUT«((1, 2, 3), (4, 5, 6))␤»
23:08 psch m: say @((1,2,3), (4,5,6)).perl
23:08 andreoss psch: about I exampled what I meant by flattening comma
23:08 camelia rakudo-moar 8f447f: OUTPUT«((1, 2, 3), (4, 5, 6)).list␤»
23:09 andreoss @a +++ @b +++ @c looks much better @(@a.list, @b.list, @c.list).list
23:13 ab5tract joined #perl6
23:13 ab5tract but you are totally overdoing it
23:13 ab5tract i imagine your example is hyperbole
23:14 ab5tract because to me, @( @a, @b, @c ) is far cleaner
23:14 ab5tract especially because i can't really imagine using a list of arrays outside of an actual expression
23:15 ab5tract which implies context
23:16 ab5tract which generally takes care of the flattening or not
23:17 ab5tract m: sub f(*@z) { @z.perl.say }; my @a = 1..3; my @b = 4..6; my @c = 7..9; f( @a, @b, @c ).say
23:17 camelia rakudo-moar 8f447f: OUTPUT«Array.new(1, 2, 3, 4, 5, 6, 7, 8, 9)␤True␤»
23:17 ab5tract m: sub f(**@z) { @z.perl.say }; my @a = 1..3; my @b = 4..6; my @c = 7..9; f( @a, @b, @c ).say
23:17 camelia rakudo-moar 8f447f: OUTPUT«(1, 2, 3; 4, 5, 6; 7, 8, 9)␤True␤»
23:18 ab5tract andreoss: i have the feeling that i am missing something important about your use case :(
23:20 andreoss ab5tract: @a, @b in perl5 always do the one right thing
23:21 andreoss i.e makes one array of elems of those
23:22 ab5tract if you are in list context, yes
23:22 raydiak generally I thought it was the job of the receiving thing to determine that it needs to flatten its input, so the tree information is preserved as long as possible b/c it's a one-way transfromation (discards the tree structure)
23:22 ab5tract raydiak: precisely.
23:22 raydiak so if you have a hard time getting implicit flattening where it's ddesigned to not be, I'm not surprised
23:23 raydiak once you use it somewhere that knows how to use it, it will/*should* flatten when appropriate...e.g. so a sub's signature can control if/how/when that happens
23:24 ab5tract andreoss: it seems to me that your +++ helper sub will do the job fine for you
23:24 IllvilJa joined #perl6
23:24 ab5tract if you are asking that comma should always flatten
23:25 ab5tract then i would suggest enjoying the [infix-operator-goes-here] syntax more
23:25 andreoss yep. [+++] @a,@b,@c
23:26 raydiak m: my @a = 1..3; my @b = 4..6; ([,] @a, @b).perl.say # don't even need +++ at that point
23:26 ab5tract m: @a = 1..3; @b = 99..102; [+] @a, @b
23:26 camelia rakudo-moar 8f447f: OUTPUT«(1, 2, 3, 4, 5, 6)␤»
23:26 camelia rakudo-moar 8f447f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/u8QO1RLQiQâ�¤Variable '@a' is not declaredâ�¤at /tmp/u8QO1RLQiQ:1â�¤------> [32m@a[33mâ��[31m = 1..3; @b = 99..102; [+] @a, @b[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
23:27 ab5tract m: my @a = 1..3; my @b = 99..102; [+] @a, @b   # already does what you would expect andreoss
23:27 camelia rakudo-moar 8f447f: ( no output )
23:27 ab5tract m: my @a = 1..3; my @b = 99..102; say [+] @a, @b   # already does what you would expect andreoss
23:27 camelia rakudo-moar 8f447f: OUTPUT«408␤»
23:28 ab5tract m: my @a = 1..3; my @b = 99..102; say [(+)] @a, @b   # but does the right thing when you want a set operation
23:28 camelia rakudo-moar 8f447f: OUTPUT«bag(1, 2, 3, 99, 100, 101, 102)␤»
23:28 andreoss raydiak: thanks, it never occured to me.
23:29 andreoss but why [,] @a, @b, @c  does not equal @a, @b, @c
23:29 andreoss i see probably because , is used twice
23:31 ab5tract right, you are applying an operator onto a LoL, whereas @a, @b, @c is just the LoL
23:31 ab5tract at least, that's how i read it
23:32 ab5tract anyway, i should be going
23:32 ab5tract i hope that helps andreoss
23:32 raydiak \o ab5tract
23:32 andreoss left #perl6
23:32 ab5tract ciao raydiak
23:38 yoleaux joined #perl6
23:39 andreoss joined #perl6
23:40 andreoss multi foo([]){say "Empty"}; my @x = 1...*; foo(@x);
23:40 andreoss m: multi foo([]){say "Empty"}; my @x = 1...*; foo(@x);
23:40 camelia rakudo-moar 8f447f: OUTPUT«Empty␤»
23:40 andreoss is it a bug?
23:43 psch m: multi foo(5) { say "five" }; foo 17
23:43 camelia rakudo-moar 8f447f: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(Int $ where { ... })␤  in sub foo at /tmp/kedeeBh9ro:1␤  in block <unit> at /tmp/kedeeBh9ro:1␤␤»
23:43 psch andreoss: some kind of bug, maybe.  i'm not sure
23:44 ab5tract joined #perl6
23:44 ab5tract that does seem weird
23:44 ab5tract (can't help  but refresh irc logs, it seems)
23:44 raydiak I'd expect that to be a bug...an infinite array certainly does not have 0 elements
23:45 ab5tract the signature seems weird to me
23:45 raydiak m: multi foo([]){say "Empty"}; my @x = 1...2; foo(@x);
23:45 camelia rakudo-moar 8f447f: OUTPUT«Cannot call 'foo'; none of these signatures match:␤:(@ ())␤  in sub foo at /tmp/Gpwo3PLm98:1␤  in block <unit> at /tmp/Gpwo3PLm98:1␤␤»
23:45 ab5tract m: multi sub f([]) { say "why..." }; f([4,3,2]}
23:45 camelia rakudo-moar 8f447f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SE0w_KhYZv�Unable to parse expression in argument list; couldn't find final ')' �at /tmp/SE0w_KhYZv:1�------> [32mti sub f([]) { say "why..." }; f([4,3,2][33m�[31m}[0m�»
23:45 ab5tract m: multi sub f([]) { say "why..." }; f([4,3,2])
23:45 camelia rakudo-moar 8f447f: OUTPUT«Cannot call 'f'; none of these signatures match:␤:(@ ())␤  in sub f at /tmp/YRhJxaTzVP:1␤  in block <unit> at /tmp/YRhJxaTzVP:1␤␤»
23:45 raydiak m: multi foo([$a, $b]){say "$a $b"}; my @x = 1...2; foo(@x);
23:45 camelia rakudo-moar 8f447f: OUTPUT«1 2␤»
23:46 psch ab5tract++ # obsessive clog reading
23:46 ab5tract :)
23:47 ab5tract okay, out now for realz
23:47 ab5tract <3, #perl6
23:48 vendethiel uh. interesting. i thought it was the "collapsing of list is made at call-time" but it doesn't seem like it
23:50 andreoss psch: where do i  report it? (besides here)
23:51 raydiak andreoss: https://github.com/rakudo/rakudo#reporting-bugs
23:51 adu joined #perl6
23:58 andreoss p6: say $*VM
23:58 camelia rakudo-moar 8f447f: OUTPUT«moar (2014.12.4.g.7.e.95.c.5)␤»
23:58 camelia ..rakudo-parrot 8f447f: OUTPUT«parrot (6.10.0)␤»
23:58 andreoss p6: multi foo([]){say "Empty"}; my @x = 1...*; foo(@x);
23:58 camelia rakudo-{parrot,moar} 8f447f: OUTPUT«Empty␤»

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

Perl 6 | Reference Documentation | Rakudo