Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-11-24

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:14 xenoterracide joined #perl6
00:25 FROGGS jnthn: labels in while loops seem to work now: https://gist.github.com/FROGGS/e03e0b067431a23b790c
00:25 jlaire joined #perl6
00:26 FROGGS like:
00:26 FROGGS nqp-p -e 'my $x := 0; HURZ: while $x++ < 2 { say($x); for [1] { last HURZ } }'
00:26 FROGGS 1
00:28 FROGGS jnthn: that patch needs a bit cleanup though, I'd like to add the magic numbers to %control_map, like 'labeled_next' => 512
00:29 FROGGS I think the exception types starting at one are free, so we can start there
00:29 FROGGS rp: say pir::const::CONTROL_LOOP_NEXT
00:29 camelia rakudo-parrot 8d994c: OUTPUT«65544␤»
00:29 FROGGS rp: say pir::const::CONTROL_LOOP_REDO
00:29 camelia rakudo-parrot 8d994c: OUTPUT«65546␤»
00:29 FROGGS rp: say pir::const::CONTROL_LOOP_DONE
00:29 camelia rakudo-parrot 8d994c: OUTPUT«===SORRY!===␤error:imcc:syntax error, unexpected DOT, expecting COMMA or ')' ('.')␤        in file '(file unknown)' line 65␤␤»
00:29 FROGGS rp: say pir::const::CONTROL_LOOP_LAST
00:29 camelia rakudo-parrot 8d994c: OUTPUT«65545␤»
00:37 dalek nqp/loop_labels: 3203a9f | (Tobias Leich)++ | src/ (3 files):
00:37 dalek nqp/loop_labels: implement labels for while loops
00:37 dalek nqp/loop_labels:
00:37 dalek nqp/loop_labels: This allows the declaration of labels for all statements, and
00:37 dalek nqp/loop_labels: adds next/redo/last LABEL functionality for while loops.
00:37 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/3203a9fd63
00:40 TimToady \o/
00:41 FROGGS that is for nqp-p only though
00:42 TimToady still
00:42 FROGGS but if that works out it should not be too hard to steal that to jvm/moar/rakudo
00:42 FROGGS yeah, pretty useful
01:01 FROGGS gnight
01:09 colomon FROGGS++
01:26 BenGoldberg joined #perl6
01:29 raydiak what is a more elegant way to write "@bar = .a, .b, .c for $foo"?
01:30 TimToady if there's only one thing, we usually use 'given' instead of 'for'
01:31 raydiak ah, good to know
01:32 raydiak so there's no magic way to write the list of methods? like $foo.<<a b c>> or some similar contrivance?
01:35 BenGoldberg If it were perl5, one could do @bar = map $foo->$_() for qw(a b c);
01:35 BenGoldberg Err
01:35 BenGoldberg If it were perl5, one could do @bar = map $foo->$_(), qw(a b c);
01:36 BenGoldberg But I don't think you can do that in perl6
01:36 raiph joined #perl6
01:37 TimToady well, you can say @bar = ($foo."$_"() for <a b c>);
01:37 TimToady but generally, using names symbolically like that is considered a code smell
01:37 BenGoldberg I could be wrong, though :)
01:38 raydiak thanks, but imo the version I have is already much more concise (and asthetically pleasing) than that :)
01:38 TimToady indeed
01:39 BenGoldberg The smelly solution is ugly, and likely will remain so in order to dicourage it :)
01:41 TimToady yes, we make symbolic lookups uglier than referential lookups on purpose
01:48 woolfy joined #perl6
01:58 xenoterracide joined #perl6
02:03 MikeFair joined #perl6
02:16 raydiak sorry, got lost in another window...thanks for the help guys
02:16 woolfy joined #perl6
02:17 rurban1 joined #perl6
02:20 BenGoldberg joined #perl6
02:51 dalek rakudo-star-daily: ebd4db8 | coke++ | log/ (5 files):
02:51 dalek rakudo-star-daily: today (automated commit)
02:51 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/ebd4db8edc
02:51 dalek perl6-roast-data: 58f97eb | coke++ | / (5 files):
02:51 dalek perl6-roast-data: today (automated commit)
02:51 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/58f97eb476
03:17 Ben_Goldberg joined #perl6
03:36 Suhosin joined #perl6
03:40 ggoebel18 joined #perl6
03:41 ggoebel_ joined #perl6
03:47 ggoebel19 joined #perl6
04:01 raiph joined #perl6
04:06 preflex_ joined #perl6
05:07 Entonian joined #perl6
05:14 Entonian joined #perl6
06:03 raiph joined #perl6
06:09 timotimo oh no, i b0rked C code in nqp :(
06:14 timotimo i don't see the actual implementation for control in the loop_labels branch that takes arguments, i think FROGGS perhaps forgot to check in the changes to a specific file?
06:18 rurban1 joined #perl6
06:21 sorear joined #perl6
07:40 rindolf joined #perl6
07:41 SamuraiJack joined #perl6
07:45 berekuk joined #perl6
07:47 darutoko joined #perl6
08:15 FROGGS timotimo: did I?
08:16 timotimo i dunno? i didn't see a change to the control op
08:16 dalek nqp/loop_labels: 30b9b79 | (Tobias Leich)++ | src/vm/parrot/QAST/Operations.nqp:
08:16 dalek nqp/loop_labels: file lost in last commit
08:16 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/30b9b79c89
08:16 FROGGS but, there it is :o)
08:17 FROGGS timotimo: thanks for the pointer :o)
08:17 timotimo yw
08:18 FROGGS colomon: can you check that Inline::C now passes its tests?
08:21 FROGGS I'll add tests later today for loop labels
09:00 moritz good UGT morning everybody
09:00 moritz http://moritz.faui2k3.org/tmp/rakudo-star-2013.11-RC1.tar.gz please test!
09:04 * FROGGS does so
09:05 FROGGS umm, icu fails...
09:05 * timotimo is a bit ashamed about the C blunder
09:06 FROGGS need to add the symlink, right?
09:06 * FROGGS takes a note to patch that
09:07 FROGGS ahh, that is better
09:09 moritz timotimo: not a big deal, doing the NQP point release was only 5 minutes extra work
09:10 timotimo i'll try to know better in the future
09:18 masak good antenoon, #perl6
09:18 moritz good an, masak
09:23 Rotwang joined #perl6
09:24 FROGGS hi masak
09:25 * masak .oO( an what an adorable an it is! )
09:30 timotimo huh. a parallel-as-possible build of nqp for all three backends takes about 6 minutes
09:31 moritz well, the building in stages doesn't lend itself well to parallelization
09:31 timotimo yeah
09:31 timotimo do i have to watch out for the negate property of an anchor?
09:31 timotimo is there ever going to be a case where a bos anchor will have negate set to 1?
09:31 moritz I don't think so
09:31 moritz one can write <!before ^>
09:32 beastd joined #perl6
09:32 moritz but then it's still an un-negated BOS, and an outer before node that negates the result
09:32 moritz timotimo: just add a guard that dies if it's negated, just to be sure
09:32 FROGGS moritz: rakudo-test passed, modules-test passed and I an use perl6-debug for example
09:33 moritz FROGGS: \o/
09:33 moritz FROGGS: does panda also work?
09:34 dmol joined #perl6
09:34 FROGGS ==> Successfully installed Inline
09:35 FROGGS but we really should fix parrot<=>icu-config for the next release
09:35 moritz +1
09:37 masak re perl6/specs:5e2c420566a46af03937c95f6ed0d7051a29aba2 -- I really like the switch from Increase/Decreasse to Less/More. *but* as long as we keep making such changes to the spec, I don't think we have any claim to talking about language/spec stability.
09:38 masak "Perl 6 is stabilizing month by month, year by year." yeahbut we just changed the names of the enums for *comparison*.
09:38 masak (with all the associated downstream ecosystem changes)
09:39 itz_ RC1 passes "make rakudo-test" for me
09:39 itz_ although the docs still say "make test" :)
09:39 rurban1 joined #perl6
09:40 itz_ ah its "make test" within the rakudo dir itself
09:43 xinming joined #perl6
09:48 hummeleB1 joined #perl6
09:59 berekuk joined #perl6
10:03 kaare_ joined #perl6
10:10 lizmat good *, #perl6!
10:10 lizmat catching up on backlog
10:11 lizmat moritz: http://irclog.perlgeek.de/perl6/2013-11-23#i_7905147   good to hear, moar will land soon so don't worry
10:12 lizmat TimToady: http://irclog.perlgeek.de/perl6/2013-11-23#i_7904809 , how about collect { } ?
10:12 lizmat fwiw, I would think $_ would *not* be set on each iteration
10:14 lizmat r: $_ = "foo"; map { state $a; last if $a++; .say} # should say "foo" instead of 1
10:14 camelia rakudo-parrot 8d994c, rakudo-jvm 8d994c: OUTPUT«1␤»
10:16 lizmat moritz: http://irclog.perlgeek.de/perl6/2013-11-23#i_7904275  sadly, putting a "return unless $deprecated" for JVM only, does not fix the problem
10:17 lizmat will look into that later today
10:18 spider-mario joined #perl6
10:18 berekuk joined #perl6
10:32 lizmat_ joined #perl6
10:35 moritz ok, thanks everybody for testing
10:35 moritz please also review the release announcement
11:05 kivutar joined #perl6
11:25 PacoAir joined #perl6
11:53 * masak does so
11:56 denis_boyun joined #perl6
12:02 masak moritz: very minor nit: s/Proc::Status-objects/Proc::Status objects/ -- it's probably a Germanism to hyphenate there.
12:03 masak in general, it's "<noun><noun>" or "<noun>-<noun>" in German, but "<noun> <noun>" in English.
12:03 masak (Swedish does the same as German in this regard)
12:07 berekuk joined #perl6
12:12 aborazmeh joined #perl6
12:16 tgt joined #perl6
12:20 dalek rakudo/nom: a7ee091 | (Elizabeth Mattijsen)++ | src/core/Deprecations.pm:
12:20 dalek rakudo/nom: Make sure DEPRECATED messages don't die on JVM
12:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a7ee0911ad
12:20 lizmat_ $ perl6-j -e 'say "foo".ucfirst'
12:20 lizmat_ Foo
12:20 lizmat_ Saw 1 call to deprecated code during execution.
12:20 lizmat_ ================================================================================
12:20 lizmat_ Any eval (from unknown) called at:
12:20 lizmat_ gen/jvm/stage2/NQPHLL.nqp, line 1186
12:21 lizmat the position is completely wrong, but at least this may give jnthn some pointer as to what's wrong with Backtrace in on jvm
12:22 lizmat off to see some more of Copenhagen&
12:22 jnthn Yeah, that looks the wrong line of the backtrace.
12:22 preflex jnthn: you have 2 new messages. '/msg preflex messages' to read them.
12:22 jnthn Hmm...
12:23 lizmat also: it seemed that $deprecated contained an Any instance
12:24 jnthn lizmat: What's it meant to be?
12:24 lizmat original error message:
12:24 lizmat No such method 'package' for invocant of type 'Any'
12:24 lizmat in sub DEPRECATED at gen/jvm/CORE.setting:16747
12:25 lizmat I tried to do an early exit from DEPRECATED by doing a
12:25 lizmat return unless $deprecated;
12:25 lizmat but that didn't fire, also unless $deprecated.defined didn't fire
12:26 lizmat could also be some "is hidden-from-backtrace anomaly
12:26 lizmat really off now&
12:26 jnthn o/
12:26 timotimo o/
12:26 kkielak joined #perl6
12:27 FROGGS masak: okay, will take that into account :o)
12:29 SamuraiJack_ joined #perl6
12:29 FROGGS hi jnthn, hi lizmat btw :o)
12:31 jnthn masak: I think the stabalizing statement is clearly about the overall trajectory, and I think it's true for that. Picking out one data point that's off it doesn't mean it's false overall.
12:37 masak jnthn: agree.
12:37 masak aka "anecdotal".
12:37 masak I'm just saying that sometimes it feels surprising which parts of the spec are still negotiable.
12:38 masak I'm *very* aware that the stability of the ecosystem/community depends on the stability of the spec.
12:38 masak and if it's true that speed will cease to be the bottleneck soon, then spec stability may very well become the new bottleneck.
12:40 SamuraiJack__ joined #perl6
12:44 jnthn masak: Yes, I can agree there's a risk of that.
12:47 timotimo is moarvm going to be much faster than parrot before we start on the JIT?
12:47 FROGGS I hope there won't be any breaking changes necessary in future... I mean, it feels alright atm, but what do I know?
12:47 FROGGS and by breaking I mean only implemented stuff of course
12:51 masak jnthn: it's hard to quantify, but "they just changed the names of the comparison enums" contributes to some extent to "they are still fiddling with the language [so I'll wait]"
12:51 preflex joined #perl6
12:57 jnthn station; bbiab
13:09 masak release announcement looks good.
13:10 masak moritz++
13:13 timotimo i should move unary nodal hyper ops back to the top of my priority queue ...
13:15 denisboyun joined #perl6
13:15 timotimo it's been in the announcement for a long time now :P
13:18 masak ++timotimo
13:19 timotimo http://questhub.io/realm/perl/quest/520fe66f5fc971dd3200001b <- you can +1 my quest on questhub :)
13:19 * timotimo commutes
13:25 * FROGGS writes now tests for loop labels
13:31 timotimo for less denglisch, move the now before the verb or at the end of the sentence
13:32 timotimo what shall iname my new nodal branch?
13:32 timotimo nodality_2_the_hypering
13:32 timotimo nodal-electric-boogaloo
13:33 masak nodal-all-the-things
13:35 timotimo should i actually watch electric boogaloo?
13:36 timotimo maybe i should just watch the first one in the series
13:37 timotimo nodal-the-things
13:39 moritz nodal-the-brave
13:42 dalek evalbot: e6b8a4e | moritz++ | stdin:
13:42 dalek evalbot: Christmas time approaches
13:42 dalek evalbot: review: https://github.com/perl6/evalbot/commit/e6b8a4e71b
13:52 masak nodal-the-noodle
14:11 moritz so, looks like I can release R*, no?
14:12 ilogger2 joined #perl6
14:17 nnunley joined #perl6
14:20 dalek nqp/loop_labels: 3f0dc90 | (Tobias Leich)++ | t/nqp/83-loop-labels.t:
14:20 dalek nqp/loop_labels: added tests for loop labels
14:20 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/3f0dc904f7
14:24 moritz R* tagged.
14:24 moritz R* uploaded.
14:24 FROGGS I need to test the msi build then...
14:25 FROGGS moritz++
14:29 moritz rakudo.org updated.
14:31 moritz announcement mail sent.
14:33 moritz \o/ wikipedia accepted first first attempt to enter the captcha
14:37 dalek star: fab1ecd | moritz++ | tools/star/release-guide.pod:
14:37 dalek star: update release guide with 2013.11 release
14:37 dalek star: review: https://github.com/rakudo/star/commit/fab1ecdbd4
14:37 moritz this concludes the release process
14:39 colomon \o/
14:41 tadzik moritz++
14:43 colomon oooo, star release!  moritz++
14:45 colomon So, I was telling my wife about Liz Carroll's Irish fiddle version of Peter and the Wolf.  I said "Her 'Duck' is a nice enough reel, but I think the oboe in the original does a better job of conveying duckiness."  And she replied, "Well, when you're a fiddler, everything looks like a nail."
14:45 colomon My question: Is there a formal name for that sort of thing?  An allusion to a metaphor?
14:46 timotimo "sick burn" not good enough word for ya?
14:46 moritz (colomon's wife)++
14:46 moritz snow... something
14:46 arnsholt moritz: Snowclone
14:47 * colomon should perhaps point out that his wife is a fiddler.  ;)
14:47 moritz not sure how well it fits here
14:47 arnsholt Yeah, it's only snowcloneish
14:52 zakharyas joined #perl6
14:54 dalek nqp/loop_labels: a40804b | (Tobias Leich)++ | src/vm/parrot/QAST/Operations.nqp:
14:54 dalek nqp/loop_labels: remove debug cruft
14:54 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/a40804b4fa
14:56 masak it's an interesting snowclone, because the template is "when all you have is a <X>, everything looks like a <Y>".
14:57 chturne joined #perl6
14:57 timotimo are most snowclones unary?
14:57 masak but this instance is "when you're a <X>...", and also the <Y> has been retained from the original ("hammer", "nail") instance.
14:57 timotimo oh
14:57 masak timotimo: no, I don't think so.
14:57 timotimo now i wonder what naryness most snowclones have
14:58 FROGGS nqp: for [1, 2, 3, 4, 5] { next if $_ == 3; say($_) }
14:58 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«1␤2␤4␤5␤»
14:58 chturne I'm having problems building Rakudo Star from Git with ICU support on Ubuntu. :-(
14:58 timotimo oh yes, icu :(
14:58 timotimo there was an outstanding issue, wasn't there?
14:58 chturne My error message is: auto::icu -           Is ICU installed...error: icushared not defined
14:59 chturne I have no idea what this means :'(
15:00 chturne timotimo, I've no idea, I'm just trying to get started with Perl 6. I'd like to contribute some day, so that's why I'm building from git.
15:00 timotimo ah, you're building github.com/rakudo/rakudo, right?
15:01 timotimo "Star" is just our monthly packaging of rakudo plus a bunch of modules
15:01 ajr joined #perl6
15:01 chturne git clone git://github.com/rakudo/rakudo.git was my poison of choice.
15:01 timotimo if parrot won't build for you, you can try our JVM port instead. it has pretty much all features except full NativeCall
15:01 timotimo i *believe* you can build parrot without icu, too. you won't have cool unicode properties and stuff though
15:02 timotimo but you don't need icu to get the jvm port to work
15:02 chturne Yeah, that makes me sad
15:02 timotimo otherwise, if you're already building stuff from source, you might as well try building icu, too
15:02 chturne I'll try the JVM port for now, just to play, but if anyone has any ideas how I can get the Parrot version working, I'd be grateful :)
15:02 timotimo worst case, rely on camelia here:
15:02 chturne (with ICU)
15:03 timotimo p: say "hi there, i'm your helpful evalbot";
15:03 camelia rakudo-parrot a7ee09: OUTPUT«hi there, i'm your helpful evalbot␤»
15:03 FROGGS chturne: you'd need to make a symlink
15:03 FROGGS from /usr/include/x86_64-linux-gnu/unicode to /usr/include/unicode
15:04 timotimo thanks FROGGS :)
15:04 timotimo chturne: i've only started contributing ~10 month ago, so it's almost still fresh in my mind and i'd love to help you get started
15:04 chturne FROGGS, I passed the --icuheaders option to specify the directory where Ubuntu installs the libicu headers, why would the symlink be change the behaviour I'm seeing?
15:04 FROGGS chturne: parrot is using icu-config, which borken when it comes to multi-arch... we'd need to path it to use pkgconfig
15:05 chturne timotimo, great! I'd appreciate that :)
15:05 FROGGS chturne: because parrot is using icu-config which tells it wrong paths
15:05 chturne Ah right, thanks FROGGS, I'll give that a whirl in a sec and report back!
15:05 FROGGS chturne: no idea if --icuheaders works at all, never used it
15:06 chturne Well it fixed my initial problem of the configure script moaning that it couldn't find the icu headers, since it was looking in /usr/include/unicode
15:07 FROGGS exactly
15:08 chturne Huzzah! Parrot is now compiling. Thank you FROGGS!
15:09 FROGGS you're welcome :o)
15:09 timotimo you can still build the JVM port anyway, because you can play around with our concurrent stuff on it :)
15:09 FROGGS yes, one can build both version without any problems
15:09 chturne Neat, I'll build that next :)
15:10 timotimo perl Configure.pl --backend=jvm,parrot && make -j3 all install
15:10 FROGGS you will end up with a perl6-p and perl6-j binary
15:10 timotimo after a configure, you'll have to rebuild both parts, so best start with it already
15:10 chturne Oh, well that train has left the station, haha.
15:10 xinming joined #perl6
15:11 timotimo well, building jvm, parrot and moarvm in parallel takes about 6 minutes on my system, so you're not losing too much time
15:17 raiph joined #perl6
15:18 dalek nqp/loop_labels: 1cefc86 | (Tobias Leich)++ | src/ (2 files):
15:18 dalek nqp/loop_labels: implement labels for repeat and for loops
15:18 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/1cefc862f2
15:18 FROGGS jnthn: that works like a charm!
15:19 timotimo did you find a good place to put the constants yet?
15:19 diakopter .
15:20 timotimo can't they go right next to the ones we already had for control exceptions?
15:20 FROGGS timotimo: yes, %const_map, %handler_names and %control_map
15:21 FROGGS I'd call them NEXT_LABEL for example
15:21 timotimo maybe i'll work on the jvm codegen for you :)
15:22 FROGGS ohh, that'd be nice :o)
15:22 FROGGS if that works out we could have it in rakudo in a week :o)
15:24 timotimo right now i'm on my simplify_begin branch, though
15:24 FROGGS okay, I think I let that how it is, and wait for jnthn++ to give his opinion
15:25 FROGGS doesn't make sense to spend more time if we don't know if that is how it should be
15:25 FROGGS timotimo: no worries :o)
15:25 TimToady lizmat: then what does collect {} do that {} xx * doesn't do?
15:25 FROGGS I'll muse about S11 module installation a bit more
15:26 timotimo is collect the name for listless map?
15:26 TimToady it's the rename that lizmat++ suggested
15:27 TimToady (rename of listless map)
15:27 timotimo something's weird. i've run j-clean and it won't build anything but Pod and ModuleLoader and then proceeds to create perl6-j, perl6-jdb-server and perl6-eval-server
15:28 moritz maybe j-clean misses some files
15:28 timotimo yeah, perl6-eval-server and perl6-jdb-server for example :)
15:28 timotimo install/languages/perl6/lib/Perl6/*.jar has lots of stuff
15:29 timotimo ah, but that's not supposed to be cleaned
15:29 mtk joined #perl6
15:30 timotimo removing those two seems to have helped
15:30 timotimo no, wait
15:30 timotimo it just does these super early
15:36 xinming joined #perl6
15:40 diakopter I like trains
15:40 FROGGS :o)
15:41 masak p: enum Choice <Aye Nay>; sub vote(Choice $choice = *) { say "You voted $choice" }; vote()
15:41 camelia rakudo-parrot a7ee09: OUTPUT«Nominal type check failed for parameter '$choice'; expected Choice but got Whatever instead␤  in sub vote at /tmp/nnkKjjqOEZ:1␤  in block  at /tmp/nnkKjjqOEZ:1␤  in any  at /tmp/nnkKjjqOEZ:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in a…»
15:42 masak p: enum Choice <Aye Nay>; sub vote(Choice $choice = *) { say "You voted $choice" }; say "but it's a runtime error, no?"; vote()
15:42 camelia rakudo-parrot a7ee09: OUTPUT«but it's a runtime error, no?␤Nominal type check failed for parameter '$choice'; expected Choice but got Whatever instead␤  in sub vote at /tmp/BI7iWQi6fV:1␤  in block  at /tmp/BI7iWQi6fV:1␤  in any  at /tmp/BI7iWQi6fV:1␤  in any  at gen/parrot…»
15:42 * masak thinks we can do better on that one :)
15:42 masak also, what's the easiest way to actually be able to provide a * value in the above?
15:43 masak make a subtype that's either a Choice or Whatever?
15:43 moritz yes
15:43 colomon re trains: http://www.youtube.com/watch?v=DV8Qfs5vaBA # we have tickets to ride in three weeks
15:47 colomon FROGGS: Inline::C passing (parrakudo) smoke tests
15:48 FROGGS \o/
15:48 FROGGS thank you!
15:49 masak oh! so LPW is why zefram++ has submitted two rakudobugs!
15:49 jnthn o/ from a train
15:50 colomon \o
15:50 * jnthn is, apparently, surfing with "full fart" :D
15:50 masak trainthn! \o/
15:50 FROGGS hehe
15:50 timotimo haha
15:50 masak yes, 'cus sv:"fart" is en:"speed". :)
15:51 timotimo "volle fahrt" in german as well
15:51 masak the closest gloss in English is "fare", as in "fare thee well".
15:51 jnthn masak: I know, but I still can't not smile at it :)
15:51 Rotwang1 joined #perl6
15:51 timotimo strange, the error i used to get with my simplify_before branch is now gone
16:02 xinming joined #perl6
16:03 pecastro joined #perl6
16:10 xinming joined #perl6
16:10 masak today I am a PHP programmer.
16:10 diakopter so scare.
16:10 masak I can see why people don't have a big fondness for this language. :)
16:11 masak <masak> yeahbut what's the keyword for declaring a local variable?
16:11 masak <php> uh...
16:11 masak <masak> :( :( :(
16:11 timotimo what do you need local variables for? you have namespaces!
16:12 diakopter masak: just build your own closure system.
16:12 masak PHP likes globals so much, it has superglobals.
16:12 diakopter ".. and then when you want to invoke something, just run this eval instead..."
16:12 masak diakopter: so simple!
16:14 timotimo er, is t/spec/S05-modifier/perl5_5.rakudo.parrot failing tests even without my local changes?
16:14 timotimo 3 tests?
16:19 timotimo hm, it doesn't seem to come from the optimizer
16:23 FROGGS timotimo: I think that is what I reported a few days ago
16:24 timotimo did you find out what caused it?
16:24 timotimo it doesn't seem like --target=optimize is giving me different regexes
16:24 timotimo oh, of course, i didn't get the commit for rakudo that calls the regex optimizer yet
16:24 timotimo %)
16:25 64MAA0HXZ joined #perl6
16:26 cognominal joined #perl6
16:26 FROGGS no, I am not sure what caused it
16:28 timotimo it was probably my mucking about with everything :(
16:31 FROGGS well, it was all clean by the release, so, must be your local changes, right?
16:31 timotimo it was? that's good
16:32 FROGGS yes
16:32 huf joined #perl6
16:33 dalek rakudo/nom: 60c8c1a | moritz++ | tools/build/Makefile- (2 files):
16:33 dalek rakudo/nom: make clean is now more thorough
16:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/60c8c1af18
16:33 moritz with this patch, 'make clean && git status --ignored' looks pretty clean
16:33 timotimo thanks
16:34 moritz (of course you need to configure first to get the patches into your actual Makefile)
16:34 diakopter if only you could make all the targets depend on teh makefile, and the makefile depend on teh configure things..
16:35 moritz you can, in fact
16:35 moritz but the Makefile must invoke Configure.pl, which isn't pretty
16:35 diakopter :)
16:38 timotimo nqp doesn't have rx:P5?
16:38 FROGGS timotimo: no
16:38 FROGGS it is compiled after the nqp binary
16:38 timotimo ah, so i can't test it directly
16:38 jnthn Well, there's a p5regex tests
16:38 masak dalek's path summarizer could benefit from a little bit of http://rosettacode.org/wiki/Find_Common_Directory_Path
16:38 timotimo ah, that's good
16:42 dalek rakudo/moar-support: a6eeb0b | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
16:42 dalek rakudo/moar-support: Implement nominal type checks in binder.
16:42 dalek rakudo/moar-support:
16:42 dalek rakudo/moar-support: Actually regresses us a tiny bit 'cus it picks up on something that
16:42 dalek rakudo/moar-support: is not yet implemented in the HLL type mapping. But gets rid of all
16:42 dalek rakudo/moar-support: the warnings.
16:42 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/a6eeb0b159
16:46 timotimo t/p5regex/01-p5regex.t ................ ok   :\
16:47 denis_boyun joined #perl6
16:49 * masak liked http://www.modernperlbooks.com/mt/2013/11/the-strict-pragma-is-a-cultural-marker.html
16:56 denis_boyun__ joined #perl6
16:58 btyler joined #perl6
16:59 autumn joined #perl6
17:02 xinming joined #perl6
17:04 rurban1 joined #perl6
17:14 fridim_ joined #perl6
17:16 masak wow. you can stash a change to a file, 'git mv' the file to a new name, and pop the stash -- the stashed changes apply to the new file.
17:16 masak this is why I love git <3
17:16 rindolf joined #perl6
17:16 timotimo indeed!
17:20 timotimo i'm not sure why the regex breaks
17:20 timotimo does **? work for frugal quantifiers in p6regex?
17:20 xinming joined #perl6
17:24 timotimo r: say "acdbcdbe" ~~ /a [b|c|d] **? 6..7 (.)/;
17:24 camelia rakudo-parrot a7ee09: OUTPUT«「acdbcdbe」␤ 0 => 「e」␤␤»
17:24 camelia ..rakudo-jvm a7ee09: OUTPUT«Unhandled exception: java.lang.RuntimeException: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp'␤  in  (gen/jvm/main.nqp)␤␤»
17:32 raiph joined #perl6
17:32 timotimo oh! oh! oh!
17:33 timotimo the codegen for quantifiers will create a new array of integers for the labels for every iteration of the loop, when it could just re-use the first one
17:33 cxreg any ideas about the first Star to target jvm?
17:34 timotimo we're pretty close to getting NativeCall working, so next month or the month after that, depending on when our NativeCall-jvm person finds the time
17:34 cxreg awesome
17:34 timotimo you can already use rakudo from source to install panda and then install most modules you're interested in
17:34 timotimo i mean, with JVM
17:35 xenoterracide joined #perl6
17:35 timotimo oh, i was wrong, the IntegerArray came from alt, not from quantifier
17:37 timotimo i wonder if it's worth it leaving a register allocated for that list and only building it once
17:38 avar joined #perl6
17:50 btyler joined #perl6
17:56 xinming joined #perl6
18:03 timotimo er, i must have done something horribly wrong
18:04 timotimo Stage parse      : 224.189
18:04 FROGGS uhh, I dont wanna have that
18:04 btyler joined #perl6
18:04 timotimo yeah, i can imagine
18:11 klaas-janstol joined #perl6
18:22 kkielak joined #perl6
18:24 denis_boyun joined #perl6
18:31 colomon joined #perl6
18:39 kkielak left #perl6
18:39 timotimo i don't understand how it can have gotten so slow :(
18:40 timotimo does a fresh_p start out being null?
18:40 timotimo rather, when i get a fresh_p, will unless_null do the goto or not?
18:56 kkielak joined #perl6
19:00 chturne timotimo, I don't know what you're talking about, but I got Stage parse      : 224.518 when I built Rakudo as it was thinking about gen/parrot/CORE.setting, which is like 17k long
19:01 sqirrel joined #perl6
19:04 timotimo i used to have 110s
19:04 timotimo this better not be something i messed up in the regex implementation right before the release >_<
19:06 denis_boyun joined #perl6
19:06 timotimo chturne: so, since you already said you'd like to contribute, do you have any particular area of interest?
19:07 timotimo my main interest at this moment seems to be making rakudo faster, which is not bearing a lot of fruit
19:15 kkielak joined #perl6
19:19 timotimo has the encoding for all files always been utf8?
19:20 timotimo has been since may apparently
19:24 * timotimo downgrades parrot
19:28 berekuk joined #perl6
19:33 djanatyn joined #perl6
19:34 timotimo where is the logical explanation for this?
19:46 jlaire javascript's this has no logical explanation
19:46 timotimo :D
19:47 * timotimo is now smart-checking his hard drives
19:51 lue timotimo: I would imagine that Perl 6, The Champion of Unicodeâ„¢, has all its source files in some sort of UTF- format :)
19:53 timotimo qrpa.c:54:1: error: ‘ASSERT_ARGS_COMPARE’ undeclared (first use in this function)
19:53 timotimo what, why?
19:53 timotimo everything is just crumbling to pieces around me, what is going on? :(
20:02 timotimo i can't seem to get nqp back to a state where it's not dog slow
20:04 chturne timotimo, I'm not sure yet, I'd like to get started with anything really, just to familiarise myself with the bootstrapping/project organisation.
20:04 timotimo that's fine :)
20:04 chturne I've got experience with dynamic language targetting the JVM, so I might take a look at the JVM port first.
20:05 chturne Oh, and I need to learn Perl 6 too :D
20:06 lue timotimo: I had that ASSERT_ARGS_COMPARE error a while ago (and even got a fix in rakudo out of it). Have you updated your rakudo with the latest changes (in particular to qrpa.c) ?
20:06 timotimo i'm bouncing around through old commits to see if i can get my nqp fast again
20:09 timotimo i'm gonna lose my mind here
20:10 raiph joined #perl6
20:17 timotimo okay. my hard drives are not obviously damaged, my CPU is not overheating, my swap space is deactivated, my parrot has been at 5.9.0 and 5.10.9 and my nqp has been in all sorts of versions
20:18 timotimo still stage parse has grown to about 220% its normal time
20:18 timotimo now i'll try the things that are not supposed to help, but inevitably will >_>
20:18 timotimo like rebooting
20:18 FROGGS :/
20:18 timotimo FROGGS: did you experience a speed regression?
20:19 FROGGS I'll switch the branch and try...
20:19 nwc10 debugging build vs optimised build?
20:19 timotimo don't think so. does parrot have a flag for that?
20:20 nwc10 IIRC
20:20 nwc10 and the default is not to optimise
20:20 timotimo oh
20:20 timotimo that could be it
20:20 jnap joined #perl6
20:22 FROGGS parrot_config --dump | grep configure_args
20:22 FROGGS configure_args => '"--optimize" "--prefix="/home/froggs/dev/nqp/install""'
20:24 chturne Is there a coding style guide somewhere?
20:25 timotimo i don't think so, at least i never read one
20:25 FROGGS I guess the Perl 5 style guides are still appropriate
20:26 chturne I'm sorry to start with bikeshedding and generally being a douche, but there's a lot of useless whitespace in the Rakudo sources :'(
20:26 FROGGS except that sub names are now do-that instead of do_this
20:26 * jnthn back
20:26 FROGGS wb jnthn :o)
20:27 nwc10 back online, or back where you started?
20:27 timotimo chturne: if you keep removing whitespace around changes you did anyway, it's fine
20:27 timotimo but i wouldn't like seeing a huge diff made up only of whitespace changes
20:27 chturne Fair enough, I figured as much :)
20:27 timotimo i know there's lots of lines that contain only spaces
20:29 jnthn nwc10: Back online :)
20:29 jnthn After taking some dinner
20:29 timotimo FROGGS: that was it
20:29 timotimo i feel like punching something
20:29 timotimo a whole day wasted due to that
20:29 FROGGS :(
20:29 woolfy timotimo: punch my virtual hands!  They can take it!
20:29 FROGGS nwc10++ for that
20:29 woolfy lizmat does the real punching my hands sometimes...
20:29 timotimo woolfy: POW! POW!
20:30 woolfy ah! oh!
20:30 woolfy HARDER!!!
20:30 timotimo 𝐏𝐎𝐖 𝐏𝐎𝐖 𝐏𝐎𝐖
20:30 timotimo POW POW POW
20:31 timotimo ꟼOW ꟼOW ꟼOW
20:31 tadzik http://f.kulfoto.com/pic/0001/0025/0Vcn124393.jpg
20:31 nwc10 the speed difference (about 2.5x) looked suspiciously like the speed difference between optimised and not
20:31 woolfy Hehehe
20:31 timotimo nwc10: so the 2x speed improvement i measured for update lineposcache was from optimized to unoptimized build with my optimisation!
20:33 timotimo i feel like this is a good point in time to go out and run for half an hour
20:34 timotimo even though it's fricking cold and also dark outside
20:35 woolfy we're not stopping you...
20:36 dalek nqp: f4514bb | dwarring++ | examples/rubyish/ (3 files):
20:36 dalek nqp: basic rubyish inheritance (no mixins yet)
20:36 dalek nqp: review: https://github.com/perl6/nqp/commit/f4514bb7ea
20:37 jnthn Wow. Rubyish keeps going and going :)
20:42 jnthn timotimo: fresh_p - you have no promises about what'll be in there. Just that nother else is using it.
20:42 * FROGGS .oO( will nqp run all the dynamic languages? )
20:43 * FROGGS .oO( fresh_p of Bel Air )
20:43 * woolfy and lizmat just had sushi...    http://translate.google.com/#nl/en/nom%20nom%20nom    (select the loudspeaker to listen)
20:44 FROGGS hehe
20:45 jnthn haha!
20:45 jnthn hah, I like the google translate suggestion...
20:45 jnthn Translate from: French
20:45 jnthn :D
20:46 FROGGS ohh, it actually means something: http://translate.google.com/#hmn/en/nom%20nom%20nom
20:47 jnthn haha!
20:47 FROGGS our official branch :o)
20:53 woolfy :-)
21:03 * timotimo ran the stress away by going 2.62km in 16:00m
21:03 masak 'night, #perl6
21:06 FROGGS gnight masak
21:08 woolfy timotimo++
21:10 jnthn e
21:10 jnthn um ;)
21:11 * lizmat is also calling it a day
21:11 lizmat gnight #perl6!
21:12 FROGGS sleep well lizmat
21:13 jnthn o/ lizmat
21:19 timotimo now i feel slightly better
21:24 Rotwang joined #perl6
21:24 Rotwang1 joined #perl6
21:26 Rotwang joined #perl6
21:34 diakopter ♡
21:36 timotimo ♥
21:37 tadzik .u FRONT FACING BABY CHICK
21:37 timotimo i can't find the black heart on my keyboard :(
21:37 tadzik :u
21:37 jnthn http://jnthn.net/papers/2013-npw-conc.pdf # slides from NPW talk. same as APW, pretty much, but with updated naming...
21:38 diakopter tadzik: rotfl
21:38 timotimo jnthn: will a recording be uploaded at some point?
21:40 jnthn timotimo: There was no recording, afaik
21:40 timotimo aaw. all right then :(
21:40 timotimo i'm considering doing a lightning talk about perl6 during the congress, but i don't know yet what it should be about
21:41 FROGGS what congress?
21:41 timotimo the 30c3
21:41 nwc10 jnthn: I fear that that means that you'll just have to keep presenting the talk, until someone records it
21:43 jnthn nwc10: Looks like :P
21:44 * FROGGS .oO( "Repetitive epic is the most elegant form of Cardassian literature." )
21:45 timotimo so if i call $p.vow, the $p will no longer accept .keep or .break called on it?
21:45 tadzik oh, someone's watching DS9?
21:48 timotimo surprisingly, rebuilding parrot --optimize'd won't make the lineposcache update go any faster
21:48 timotimo oh well.
21:48 dwoldrich joined #perl6
21:48 FROGGS :/
21:48 timotimo i'll still take a 2x improvement. though benabiks worries are probably legit.
21:49 jnthn timotimo: correct
21:50 FROGGS caches are evil by default
21:59 diakopter FROGGS: I agree.
22:00 diakopter I've begun to believe that all manual optimizations are [some form of] evil
22:01 FROGGS and it adds a factor of complexity
22:02 FROGGS btw, I'd like to implement automatic dependency recompilation at some point
22:02 FROGGS aka cache invalidation of *.pbc
22:03 timotimo i'm interested in that
22:04 FROGGS ohh, pick it if you want :o)
22:04 timotimo oh, no
22:04 timotimo i'm interested in *you* delivering that :D
22:04 FROGGS hehe
22:04 timotimo but in my books, you've already done one of the coolest things, which is loop labels
22:04 timotimo well, partially :)
22:04 FROGGS hehe
22:05 FROGGS yeah, would be cool to have them in rakudo
22:06 diakopter well if you have those, you have most of all the gotos
22:06 FROGGS and, two days to implement them in nqp is alright I think, since I never did code-gen before
22:06 timotimo diakopter: for a goto, just emit a dummy loop with a label? ;)
22:06 diakopter might need more than one. like, 16, perhaps
22:06 timotimo code-gen gets nonscary pretty quickly in NQP, IMO.
22:07 diakopter so nonscare
22:07 FROGGS diakopter: really? I just go to the already existing loop labels by throwing an exception to the loop
22:07 timotimo much gen
22:07 FROGGS how would that fit with goto?
22:08 FROGGS okay, I see that you could go to a label if that is in outer frames...
22:09 FROGGS but what if you would have to go forward?
22:09 FROGGS you can't throw an exception in the other direction :o)
22:09 timotimo make everything before the label "inside" a frame
22:09 timotimo because that'll totally work! :)
22:12 cognominal joined #perl6
22:15 diakopter of course the solution is to put every statement in its own frame called from the previous statement
22:15 timotimo ah, why didn't i think of that!
22:15 timotimo i'll implement that optimization immediately!
22:15 timotimo that's as clever as SSA!
22:16 diakopter er.
22:16 diakopter I meant.. called from the following statement.
22:17 diakopter *the frame of the
22:17 timotimo yeah
22:17 timotimo so like in lisp, but in reverse
22:17 timotimo the program begins with (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
22:17 diakopter yes.
22:18 diakopter quite insightful.
22:20 timotimo jnthn: was there simply no time for the KeyReducer or did you stop liking it?
22:21 jnthn timotimo: I've never been completely happy with it; it's a bit too specific.
22:21 jnthn We need something for reduction-y things, I think, but I think we probably want to solve the general problem...
22:23 timotimo good to know, thanks
22:23 jnthn Also, at the time I thought it was nice to have synchronization primitives that align with $/@/%, as it felt kinda helpful for explaining. But I'm less convinced on that now...especially as we have both channels and supplies.
22:24 timotimo uh oh, if you make stage parse 2x as fast, the optimizer might become the bottleneck and then i'll have to optimize the optimizer =o
22:27 jnthn Well, I'm very much still investigating stuff at the moment, but also need to sleep soon...teaching tomorrow morning.
22:31 timotimo that's okay :)
22:36 timotimo seems like creating a new ResizableIntegerArray each time we run into an alt to store the labels is no noticable performance hit ...
22:36 timotimo (at least not for 3 alterations ... maybe it's bigger for more)
22:37 timotimo (at least i could pre-size the array instead of letting it grow dynamically)
22:37 jnthn It's normally rather small.
22:37 jnthn And yeah, those objects are short lived
22:37 timotimo i thought short-lived objects = lots of GC
22:38 timotimo does an Ops support unshift?
22:38 jnthn Well, lots of short lived objects trigger it, yeah...
22:38 jnthn But then they go away relativley cheaply too
22:38 jnthn It's those with mid-length lives that cause most headaches.
22:38 timotimo because they just go into the long-lived-object-store, but then immediately get the costly removal?
22:39 diakopter they don't take up any more cpu time, just memory between 2nd-gen collections, at least on moar
22:40 dalek nqp/cursor-mem-opts: 3b28064 | jonathan++ | src/QRegex/ (2 files):
22:40 dalek nqp/cursor-mem-opts: Be more eager to throw out things we'll not need.
22:40 dalek nqp/cursor-mem-opts:
22:40 dalek nqp/cursor-mem-opts: This saves memory and eases the GC's role, especially as we keep hold
22:40 dalek nqp/cursor-mem-opts: of a lot less call frames.
22:40 dalek nqp/cursor-mem-opts: review: https://github.com/perl6/nqp/commit/3b280649c2
22:40 diakopter well, I guess a bit extra cpu time for 2nd gen stuff, but constant
22:40 jnthn Yeah, it's more than they live longer than they need to.
22:40 jnthn So mostly memory.
22:41 * timotimo grabs and compiles
22:42 * FROGGS too
22:42 timotimo and i'll spectest as well. on parrot.
22:42 timotimo FROGGS: you'll do jvm?
22:43 FROGGS moar atm
22:43 FROGGS the others after that
22:46 * timotimo is almost to the setting
22:50 timotimo i get no noticable time improvement
22:51 FROGGS hmmm
22:51 FROGGS I'm not there yet
22:51 diakopter maybe some hamsters got into jnthn
22:51 diakopter I mean, into jnthn's computer
22:51 diakopter to make it go faster or something.
22:52 jnthn Well, I did a sample profiled build just now and we come out with about 2/3 the sample count.
22:54 diakopter anyone going to lpw here?
22:56 timotimo t/spec/S06-other/main-usage.rakudo.parrot ....................... Dubious, test returned 1 (wstat 256, 0x100)
22:57 FROGGS happens on my box since months
22:57 timotimo OK
22:57 FROGGS (using 4 jobs)
23:02 jnthn 'night, #perl6
23:16 Vlavv` joined #perl6
23:18 cosimo joined #perl6
23:25 timotimo p: say "jnthns branch may not save time when parsing, but it saves {(1748856 / 1636340) * 100 - 100} percent of max resident set size.";
23:25 camelia rakudo-parrot 60c8c1: OUTPUT«jnthns branch may not save time when parsing, but it saves 6.876077 percent of max resident set size.␤»
23:26 timotimo about 10 MB, not bad.
23:28 rjbs joined #perl6
23:43 pippo joined #perl6
23:45 pippo r: my @a; my @b; for ^10 {@b=1..$_; @a[$_]=@b}; say @a.perl;
23:45 camelia rakudo-jvm 60c8c1: OUTPUT«(timeout)»
23:45 camelia ..rakudo-parrot 60c8c1: OUTPUT«Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4,…»
23:45 pippo n: my @a; my @b; for ^10 {@b=1..$_; @a[$_]=@b}; say @a.perl;
23:45 camelia niecza v24-98-g473bd20: OUTPUT«[[1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, …»
23:46 timotimo r: my @a; my @b; for ^10 {@b=1..$_; @a[$_]=@b[]}; say @a.perl;
23:46 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, …»
23:46 timotimo r: my @a; my @b; for ^10 {@b=1..$_; @a[$_]=@b.list}; say @a.perl;
23:46 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, …»
23:46 timotimo r: my @a; for ^10 {my @b:=1..$_; @a[$_]=@b.list}; say @a.perl;
23:46 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new(().list.item, (1,).list.item, (1, 2).list.item, (1, 2, 3).list.item, (1, 2, 3, 4).list.item, (1, 2, 3, 4, 5).list.item, (1, 2, 3, 4, 5, 6).list.item, (1, 2, 3, 4, 5, 6, 7).list.item, (1, 2, 3, 4, 5, 6, 7, 8).list.item, (1, 2,…»
23:47 timotimo r: my @a; for ^10 {my @b=1..$_; @a[$_]=@b}; say @a.perl;
23:47 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new([], [1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9])␤»
23:47 pippo Hello timotimo !
23:48 timotimo hello pippo :)
23:48 dalek rakudo-star-daily: 2625ddb | coke++ | log/ (5 files):
23:48 dalek rakudo-star-daily: today (automated commit)
23:48 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/2625ddbbfd
23:48 dalek perl6-roast-data: e7c6d47 | coke++ | / (3 files):
23:48 dalek perl6-roast-data: today (automated commit)
23:48 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e7c6d4705a
23:48 pippo That is what I wanted ! How did you manage to know ?
23:48 pippo :-)
23:49 timotimo i know that symptom from python ;)
23:49 timotimo this may be helpful:
23:49 timotimo r: my @a; for ^10 {my @b=1..$_; @a[$_]=@b}; @a[0].push("hi"); say @a.perl
23:49 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new(["hi"], [1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9])␤»
23:49 timotimo er, sorry
23:49 timotimo r: my @a; my @b; for ^10 {@b=1..$_; @a[$_]=@b}; @a[0].push("hi"); say @a.perl
23:49 camelia rakudo-parrot 60c8c1, rakudo-jvm 60c8c1: OUTPUT«Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5, 6, 7, 8, 9, "hi"], [1, 2, 3, 4, 5,…»
23:50 timotimo see how it pushed "hi" to all the lists, though you pushed only once?
23:50 timotimo that's because @a contains exactly one @b in every slot
23:50 timotimo you never caused a copy to happen, because @b = 1..$_ is a list assignment
23:50 timotimo rather than a reference replacement
23:50 BenGoldberg joined #perl6
23:50 timotimo if you put the my @b inside the loop, you'll get a fresh @b every iteration
23:51 dmol joined #perl6
23:51 pippo OK I understood. Thank you very much!!
23:51 timotimo you're welcome :)
23:51 timotimo always glad to help
23:52 pippo good night timotimo :-)
23:52 pippo left #perl6
23:56 dmol joined #perl6
23:56 FROGGS joined #perl6
23:58 denis_boyun__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo