Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-12

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:00 ren1us i have a feeling that i know what the issue is, and if i'm right, it's really nasty.  give me a moment
00:06 geekosaur isn't the default key type for a hash String? so you need to stringify the object
00:07 geekosaur (you can change this but if you don't then it uses Str)
00:08 ssutch joined #perl6
00:14 raiph m: my $o = Any.new; my Any %h = $o => 1 # maybe nyi ?
00:14 camelia rakudo-moar 243ef3: OUTPUT«cannot stringify this␤  in method STORE_AT_KEY at src/gen/m-CORE.setting:9630␤  in method STORE at src/gen/m-CORE.setting:9458␤  in block  at /tmp/7rYDZCN0k8:1␤␤»
00:15 raiph ren1us: ^^ plus I'm checking clogs
00:16 telex joined #perl6
00:19 ren1us kay, i think i found the issue, and it's the sort that is going to have me beating my head against the wall
00:19 ren1us how calamatous is it if a module is passed an object of a type it doesn't recognize, and is asked to do something with it?
00:20 ren1us because pretty much all i can come up with at this point is that i'm not importing the module with the value's class definition in that setting
00:21 ren1us which, unfortunately, i can't fix because two modules having use declarations for each other is apparently a sinful act that i should feel ashamed of
00:22 ren1us perl6 has developed a knack for making me feel like a terrible person
00:24 raiph what was the first lang u learned?
00:25 ren1us ...java lol.  i'm spoiled.
00:31 ren1us what's the mindset in forbidding a two-way use relationship?
00:32 raiph ren1us: you can do it but you have to do a stub first. looking for an example right now.
00:37 raiph i've not found it, but...
00:37 raiph m: class a { ... }; class b { a }; class a { b } # something like a module equivalent of this
00:37 camelia rakudo-moar 60aaed: ( no output )
00:38 raiph (the ... is a stub)
00:39 ren1us and that takes the place of one of the use declarations?
00:41 hoverboard joined #perl6
00:41 xenoterracide joined #perl6
00:44 raiph ren1us: looks like I'm wrong
00:44 raiph http://irclog.perlgeek.de/​perl6/2012-08-07#i_5881165
00:49 raiph The rationale appears to be that P6 is a one-pass parse lang (slangs can presumably do otherwise if they want)
00:50 ren1us so the only option is a massive, obscene source file
00:53 ren1us and just to state what i'm actually trying to do, an Entity needs to know about the Grid it's in, particularly its Location, and the Grid needs to know about the Entitys inside it
00:54 ren1us and a Grid and an Entity are way too dissimilar to be sharing a source file imo
00:57 raiph So, to recap for the log, you planned to do mutual "use" statements.
00:58 ren1us circular use statements, as i believe the compiler refers to them
00:58 raiph .ask masak (or anyone else) What's the best approach for ren1us? http://irclog.perlgeek.de/​perl6/2014-06-12#i_8859421
00:58 yoleaux raiph: I'll pass your message to masak.
00:59 ren1us thanks, botty
00:59 ren1us raiph++
01:00 ren1us on that note, i've now been up for 30 hours straight, so goodnight
01:01 [Sno]_ joined #perl6
01:03 logie joined #perl6
01:03 thou joined #perl6
01:07 zengargoyle joined #perl6
01:11 rurban joined #perl6
01:17 rurban joined #perl6
01:20 FROGGS_ joined #perl6
01:25 Su-Shee_ joined #perl6
01:29 Grrrr joined #perl6
01:35 klapperl joined #perl6
01:58 hoverboard joined #perl6
02:00 Sqirrel joined #perl6
02:09 grondilu_ off topic:  I don't know about you guys, but I feel quite excited about HP's project called "The Machine":  http://www.businessweek.com/printer/ar​ticles/206401-with-the-machine-hp-may-​have-invented-a-new-kind-of-computer
02:09 grondilu joined #perl6
02:13 SevenWolf joined #perl6
02:38 xragnar_ joined #perl6
02:49 xiaomiao grondilu: that has been 5 years away for the last 25 - I have little hope that it leads to products directly
02:51 thou joined #perl6
02:54 grondilu the difference is that they make strong announcements now.  The CEO just announced it.  They seem pretty serious about it.
02:58 grondilu check out https://www.youtube.com/watch?v=33WPphbFeDY from about 10m
02:58 xiaomiao strong announcements? feels like the year 2000 all over again ;)
02:59 grondilu well, maybe.  I confess I was not paying much attention to these stuff around that time.
03:00 xiaomiao as long as I don't see a proper real demonstration I have little faith, especially with ink salesmen like HP
03:04 * BenGoldberg wonders how "photonics" differs from fiber optics.
03:05 grondilu it's on the chip
03:05 grondilu in silicon
03:05 grondilu it's actually silicon photonics I think, not just photonics.
03:06 BenGoldberg Ok, that makes a kind of sense then; optical channels on/in the chip, as opposed to fibers in open space.
03:28 SamuraiJack__ joined #perl6
03:42 kaare_ joined #perl6
04:02 jack_rabbit joined #perl6
04:14 nnunley joined #perl6
04:16 zengargoyle left #perl6
04:19 thou joined #perl6
04:27 [Sno] joined #perl6
04:40 denis_boyun_ joined #perl6
04:46 fhelmberger joined #perl6
04:55 erkan joined #perl6
04:55 erkan joined #perl6
04:55 kaare_ joined #perl6
05:02 bcode joined #perl6
05:18 labster joined #perl6
05:27 kurahaupo joined #perl6
05:27 hoverboard joined #perl6
05:33 grondilu_ joined #perl6
05:36 TimToady circular class definitions are fine if done with stubs or with 'need'.  It's mutually recursive compile-time definitions that are impossible to resolve, so you certainly can't have recursive roles, or two modules importing language tweaks from each other
05:37 bjz joined #perl6
05:42 TimToady composition of stubbed types is fine up to the point where the compiler has to ask the name for more information than has been provided; at that point, it's no longer okay
05:44 TimToady so, for instance, the constraints are more severe on native types that have to be laid out in a representation than it would be for reference types that can reserve a generic pointer slot
05:46 TimToady this just naturally falls out of the semantics; there's no conspiracy to make things harder than necessary here, except insofar as to preserve other well-motivated principles such as one-pass parsing
05:47 dalek Net--IRC/new-handler: 860e415 | (Jarrod Funnell)++ | lib/Net/IRC/ (4 files):
05:47 dalek Net--IRC/new-handler: Add a .notice method to Event, and make .msg work better as well
05:47 dalek Net--IRC/new-handler: review: https://github.com/TiMBuS/​Net--IRC/commit/860e4159f4
05:48 Timbus .. that wass the wrong branch :I
05:48 Timbus OH well
05:55 SamuraiJack__ joined #perl6
05:58 awwaiid joined #perl6
05:59 TimToady so basically as long as you stick with the late-bound OO subset of Perl 6 semantics, one can very likely get away with just about as much as you can in languages that force you to that perspective without giving you a choice
05:59 TimToady it's just 'need' dependencies rather than 'use' dependencies, to the first approximation
06:01 TimToady we allow delayed definition of the bodies of both classes and functions, which is about as much as any language gives you
06:03 TimToady a few languages go further with the mind-reading tricks, but only at the expense of enforcing use of The One True Language from beginning to end
06:04 darutoko joined #perl6
06:04 TimToady these are not languages in which you are allowed to write "use COBOL;"
06:05 bcode joined #perl6
06:05 awwaiid joined #perl6
06:07 TimToady oh, and the syntax for changing the key type of a hash is not the same as changing the value type of the hash
06:07 chris__ joined #perl6
06:09 TimToady m: my $o = Any.new; my %h{Any} = $o => 1; say %h{Any}
06:09 camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:10 TimToady m: my $o = Cool.new; my %h{Any} = $o => 1; say %h{Any}
06:10 camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:11 TimToady m: my $o = Rat(1,2); my %h{Any} = $o => 1; say %h.keys
06:11 camelia rakudo-moar 60aaed: OUTPUT«2␤»
06:11 TimToady hmm
06:11 TimToady m: my $o = Rat(1,2); my %h{Any} = $o => 1; say %h.keys[0]
06:11 camelia rakudo-moar 60aaed: OUTPUT«2␤»
06:12 TimToady m: my $o = 1/2; my %h{Any} = $o => 1; say %h.keys[0]
06:12 camelia rakudo-moar 60aaed: OUTPUT«0.5␤»
06:12 TimToady m: say Rat(1,2).nude
06:12 camelia rakudo-moar 60aaed: OUTPUT«2 1␤»
06:12 TimToady odd
06:13 TimToady n: say Rat(1,2).nude
06:13 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Rat␤  at /tmp/CvAxL02L6m line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4596 (module…»
06:14 TimToady n: say Rat.new(1,2).nude
06:14 camelia niecza v24-109-g48a8de3: OUTPUT«1 2␤»
06:14 TimToady maybe I should go to bed too :)
06:16 TimToady .tell ren1us see http://irclog.perlgeek.de/​perl6/2014-06-12#i_8860068 and following regarding circular dependencies
06:16 yoleaux TimToady: I'll pass your message to ren1us.
06:17 rurban joined #perl6
06:18 TimToady m: my $o = Any.new; my %h{Any} = $o => 1; say %h{$0}
06:18 camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:19 rurban1 joined #perl6
06:19 TimToady m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h{$0}
06:19 camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:19 TimToady grr
06:19 TimToady m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h{$o}
06:20 camelia rakudo-moar 60aaed: OUTPUT«1␤»
06:20 TimToady there we go
06:20 TimToady m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h.keys[0].WHAT
06:20 camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:21 TimToady m: my $o = Cool.new; my %h{Any}; %h{$o} = 1; say %h.keys[0].WHAT
06:21 camelia rakudo-moar 60aaed: OUTPUT«(Cool)␤»
06:22 TimToady m: my $o1 = Cool.new; my $o2 = Cool.new; my %h{Any} = $o1 => 41, $o2 => 42; say %h{$o1,$o2}
06:22 camelia rakudo-moar 60aaed: OUTPUT«41 42␤»
06:22 TimToady \o/
06:23 TimToady lizmat++ again for all that :)
06:26 kaleem joined #perl6
06:27 rurban joined #perl6
06:27 [Sno] joined #perl6
06:28 denis_boyun joined #perl6
06:43 awwaiid joined #perl6
06:57 moritz \o
06:59 zakharyas joined #perl6
07:00 FROGGS_ joined #perl6
07:05 dalek joined #perl6
07:08 ChoHag Is there any documentation anywhere on parametric roles?
07:08 ChoHag I can't get them straightened out.
07:09 moritz ChoHag: have you read S14 already?
07:10 ChoHag Yes.
07:10 moritz what's unclear?
07:10 ChoHag Well it wasn't.
07:10 ChoHag But then what I wrote didn't work.
07:11 synopsebot joined #perl6
07:11 ChoHag Sonow it is.
07:11 moritz I'm afraid we don't have much more docs than that (yet)
07:12 ChoHag I shall continue to poke at it.
07:13 FROGGS morning
07:28 rurban joined #perl6
07:28 ChoHag I worked it out.
07:29 ChoHag I was trying to create a tree structure where the parametricised role included links to other objects which do the same role though perhaps parameterised differently.
07:29 ChoHag The parameterising stuff worked fine.
07:30 igorsutton joined #perl6
07:48 moritz fancy language features don't save you from actually implementing your logic correctly :-)
07:50 SamuraiJack joined #perl6
07:52 kivutar joined #perl6
07:56 denis_boyun_ joined #perl6
08:01 sergot morning o/
08:03 FROGGS nqp-m: say(nqp::ifnull(nqp::getlexdyn('$?FILES'), '<unknown file>'))
08:03 camelia nqp-moarvm: OUTPUT«/tmp/zu2517GEbT␤»
08:03 FROGGS nqp-m: say(nqp::ifnull(nqp::getlexdyn('...'), '<unknown file>'))
08:03 camelia nqp-moarvm: OUTPUT«<unknown file>␤»
08:04 FROGGS morning sergot
08:04 sergot FROGGS: o/
08:12 thou joined #perl6
08:22 lizmat joined #perl6
08:25 hoverboard joined #perl6
08:27 anaeem1 joined #perl6
08:28 woolfy joined #perl6
08:29 rurban joined #perl6
08:32 rurban1 joined #perl6
08:40 dmol joined #perl6
08:41 FROGGS m: use QAST:from<NQP>; my Mu $b := QAST::Node.new; multi sub postcircumfix:<{ }>( QAST::Node \SELF, \key, :$BIND ) is rw { SELF.hash{key} }; $b<foo> := 1
08:41 camelia rakudo-moar 60aaed: ( no output )
08:42 FROGGS m: use QAST:from<NQP>; my Mu $b := QAST::Node.new; multi sub postcircumfix:<{ }>( QAST::Node \SELF, \key ) is rw { SELF.hash{key} }; $b<foo> = 1
08:42 camelia rakudo-moar 60aaed: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match:␤:(Any \SELF, Any \key)␤:(Any \SELF, Any \key, \ASSIGN)␤:(Any \SELF, Any \key, :BIND($BIND)!)␤:(Any \SELF, Any \key, Any :SINK($SINK)!, *%other)␤:(Any \SELF, Any \key, Any :delete(…»
08:42 FROGGS jnthn: do you know why the latter fails?
08:43 fhelmberger joined #perl6
08:44 moritz maybe some kind of container + type checking funkyness?
08:45 moritz in p6, the type check propagates into the container
08:45 moritz I'm pretty sure NQP doesn't
08:45 FROGGS but it works for binding... the LHS is the same in both cases...
08:45 virtualsue joined #perl6
08:47 jnthn FROGGS: Yes, because assignment is a 3-arg candidate
08:47 jnthn As an optimization, at least
08:47 FROGGS ohh
08:47 FROGGS it needs :$value?
08:48 jnthn No, extra positional
08:48 jnthn BUT
08:48 jnthn You're using an NQP class
08:48 jnthn It doesn't do scalar containers
08:48 jnthn So there's no assignment.
08:48 FROGGS okay, I stick to binding then perhaps
08:48 jnthn Even if you get the multis right.
08:49 FROGGS I just wonder that I didn't hit this earlier...
08:50 jnthn Well, everything is done with accessors like $node.name('foo') instead of $node.name = 'foo'
08:51 jnthn Though as a side-note, the $qast_node<foo> syntax is endangered.
08:51 jnthn We pay the price of a hash - used or not - on every single QAST node at the moment.
08:54 FROGGS yeah, I know :/
08:54 dakkar joined #perl6
08:54 jnthn We could go to a mixin mechanism, but I can't really do that and keep that syntax.
08:54 jnthn It'd be more like $node.ann('foo', value);
08:55 jnthn Which as a nice side-effect would remove a place you'd have to use binding when using the QAST stuff from Perl 6... :)
08:55 FROGGS *g*
08:55 jnthn And $node.ann('foo') just gets the value :)
08:55 FROGGS no! you don't trick me in doing that now!
08:55 jnthn ooh, that's a good idea! :D
08:56 * FROGGS must resist
09:03 jnthn Ah well, maybe somebody else out there who fancies an easy memory and perhaps speed win will take it. :)
09:04 nwc10 timotimo: ^^ :-)
09:07 kurahaupo joined #perl6
09:13 ChoHag Passing objects back and forth between threads makes .perl() very unhappy.
09:13 lizmat ChoHag: have a gist of that?
09:13 ChoHag I don't even have the first clue.
09:14 ChoHag (ho ho ho)
09:16 ChoHag I'm trying to reproduce the object-passing part which triggers it, but as long as I don't attempt to stringify the objects the data is all where it's supposed to be.
09:16 zakharyas joined #perl6
09:17 ChoHag Two thoughts. One sentence. 1) I'm trying to reproduce but the code's all over the place as I'm not doing anything real, 2) the code seems to work, just the debugging (ie. say) blows up.
09:21 * lizmat then will wait until there is something she can look at
09:23 ChoHag There that'll do it: https://gist.github.com/ano​nymous/2de67108870c2dfdba3f
09:23 ChoHag Needs the jvm.
09:25 ChoHag In my defense of the obvious, I'm trying to break/learn things, not create a masterpiece.
09:30 spider-mario joined #perl6
09:40 jsn_ joined #perl6
09:41 lizmat ChoHag: why the "my $*SCHEDULER = ThreadPoolScheduler.new;" ??
09:41 lizmat are you afraid there is no $*SCHEDULER ?
09:42 ChoHag No.
09:42 ChoHag I plan to play around with the scheduler.
09:42 ChoHag But every time I think I can start on that, I need to write or fix something else.
09:42 ChoHag So the declaration sits there, confusing people who read my gists.
09:43 FROGGS welcome to Perl 6 (or rakudo) :o)
09:46 SamuraiJack joined #perl6
09:46 pecastro joined #perl6
09:47 Psyche^ joined #perl6
09:47 lizmat ChoHag: well, it *feels* to me you're enjoying your bout of magical programming
09:47 ChoHag It's certainly fun.
09:48 ChoHag Not so sure about magical.
09:48 ChoHag I mean it's certainly sufficiently advanced, but magic has a certain je ne se quoi, spelled correctly, to it.
09:48 ChoHag All I'm getting is "wtf?"
09:49 moritz any sufficiently advanced segfault is indistinguishable from fuckup.
09:49 ChoHag moritz: This one was accompanied by a 1000 line stack (?) dump.
09:49 lizmat well, I see it this way: perl 5 has spent a lot of time making sure you could not stray from the intended path
09:49 [Sno]_ joined #perl6
09:50 lizmat perl 6 is still building the paths, and there are no rails most of the time, to keep you from straying off the path
09:51 cognominal r: / <...> /
09:52 camelia rakudo-{parrot,jvm,moar} 60aaed: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/tmpfile:1�------> [32m/ <...[33m�[31m> /[0m�Unrecognized regex metacharacter . (must be quoted to match literally)�at…»
09:52 ChoHag Building the path? It's still planning the route in some places.
09:52 cognominal no yadayada in regexen :(
09:53 ChoHag Surveying the terrain and getting a bunch of definitely-not-illegals to blow shit up.
09:54 cognominal The vanilla yadayada has already another meaning
09:54 cognominal ... in that context
09:54 ChoHag So yeah, that particular explosion isn't stopping me, though it does mean debugging is no longer as simple as just printing the object to see if it looks like it should.
10:00 thou joined #perl6
10:06 anaeem1_ joined #perl6
10:11 lizmat m: / < /
10:11 camelia rakudo-moar 60aaed: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter < (must be quoted to match literally)â�¤at /tmp/buK36ZJuqZ:1â�¤------> [32m/ < /[33mâ��[31m<EOL>[0mâ�¤Unrecognized regex metacharacter   (must be quoted to match literally)â�¤at /tmp/buK…»
10:12 lizmat cognominal: isn't it blowing up because of the < not being quoted ?
10:13 cognominal I would like it to blow up like a regular yada in normal code
10:13 cognominal r: ...
10:13 camelia rakudo-moar 60aaed: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907  (/home/p6eval/rakudo-inst-2/languag​es/perl6/runtime/CORE.setting.mo…»
10:13 camelia ..rakudo-jvm 60aaed: OUTPUT«Unhandled exception: Stub code executed␤  in throw (gen/jvm/CORE.setting:11397)␤  in sink (gen/jvm/CORE.setting:12850)␤  in MAIN (gen/jvm/main.nqp:47)␤  in  (gen/jvm/main.nqp:41)␤  in  (gen/jvm/main.nqp)␤␤»
10:13 camelia ..rakudo-parrot 60aaed: OUTPUT«Stub code executed␤current instr.: 'throw' pc 428299 (src/gen/p-CORE.setting.pir:178577) (gen/parrot/CORE.setting:11387)␤called from Sub 'sink' pc 466574 (src/gen/p-CORE.setting.pir:192577) (gen/parrot/CORE.setting:12841)␤called from Sub 'MAIN' pc …»
10:13 woolfy left #perl6
10:14 cognominal Juste for the sake of having compilable examples.
10:14 cognominal making my slides for fpw :)
10:16 lizmat m: "" ~~ / <{...}> /
10:16 camelia rakudo-moar 60aaed: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907  (/home/p6eval/rakudo-inst-2/languag​es/perl6/runtime/CORE.setting.mo…»
10:16 lizmat something like that ?
10:16 cognominal ho yes
10:17 lizmat :-)
10:17 cognominal did not thought of it. A little long though.
10:17 cognominal I always complain.
10:18 lizmat well, yes...  I guess < ... > sort of would clash with S05:1391
10:18 synopsebot Link: http://perlcabal.org/syn/S05.html#line_1391
10:18 lizmat although TimToady might be convinced into special casing < ... >
10:19 lizmat sightseeing&
10:19 cognominal I would think it more like an example of S05:1391
10:19 synopsebot Link: http://perlcabal.org/syn/S05.html#line_1391
10:23 cognominal I would prefer <...>, without the whitespaces
10:34 rurban joined #perl6
11:03 sqirrel_ joined #perl6
11:10 agre joined #perl6
11:14 FROGGS dang, something in v5's grammar hangs...
11:14 FROGGS and that for the simplest statement ever, ';'
11:16 FROGGS when I turn the statement rule into a token though it "works"
11:20 FROGGS ("works" insofar that ';' passes, but ' ;' not)
11:34 rurban joined #perl6
11:44 masak nice: http://daha.github.io/angularJS-github​-contributors/#/github/rakudo/rakudo/
11:44 yoleaux 00:58Z <raiph> masak: (or anyone else) What's the best approach for ren1us? http://irclog.perlgeek.de/​perl6/2014-06-12#i_8859421
11:45 masak best approach? figure out a way to make the application not have circular dependencies?
11:46 masak my rule currently is that I try to build my app so that each module can be compiled independently without relying on any 'use' statements having been fired upstream of it.
11:47 masak that doesn't completely rule out 'use' cycles, I guess... but that's still a good idea, IMO.
11:49 Timbus well he gives a good example of why it's desirable for the contained object to need to know its container object. its a dynamic language so its not really a problem tho.
11:58 * moritz also kinda thinks that the current approach of just saying "no" is the best long-term solution
12:05 masak the get-out-of-jail-free, small-scale solution is to predeclare types.
12:05 masak you can do that.
12:05 masak but I'd consider it kind of a code smell, and it most definitely does not scale.
12:07 atroxaper joined #perl6
12:08 moritz I wonder if can break the chain with 'need' instead of 'use'
12:08 moritz and keep a list of currently-being-compiled packages in the compiler
12:08 moritz and break the chain when a module is loaded by 'need' instead of 'use'
12:10 masak there's a p6l thread about this, started by me and with some lengthy replies by TimToady. I didn't find it, and I don't have time to dig it out right now.
12:10 masak in there, I raise many of the problems of one-pass parsing, predeclaration, and dependency cycles.
12:15 carlin joined #perl6
12:17 atroxaper joined #perl6
12:18 atroxaper joined #perl6
12:19 atroxaper joined #perl6
12:19 atroxaper left #perl6
12:21 atroxaper joined #perl6
12:22 atroxaper Hello, #perl6 !
12:23 masak hi
12:26 atroxaper masak: o/
12:28 jnap joined #perl6
12:35 FROGGS joined #perl6
12:36 rurban joined #perl6
12:43 prevost joined #perl6
12:46 yakudzo joined #perl6
12:46 muraiki joined #perl6
12:53 ChoHag The examples in S12/Class attributes don't work. Specifically: Cannot use ! twigil on our [or my] variable
12:56 guru joined #perl6
12:56 rurban joined #perl6
13:01 masak :/
13:01 masak I think that's one of the things that never worked after the MOP was made.
13:01 masak b: say "you there?"
13:01 camelia b : OUTPUT«sh: 1: install/bin/perl6: not found␤»
13:02 masak ...but I can't show that it used to work, because Beijing is busted, apparently.
13:03 xinming joined #perl6
13:03 jnthn I'm not sure it even makes sense.
13:04 jnthn There's no reason to write my $!foo when my $foo would mean just the same.
13:04 jnthn And allowing it means you can no longer look at a bit of code, see $!foo, and know it's an instance var.
13:04 jnthn So, I think it's S12 that should change. Not Rakudo.
13:06 xfix Local private variable. This looks useless.
13:06 denis_boyun joined #perl6
13:11 molaf joined #perl6
13:13 frettled A variable so secret it doesn't know itself exists?
13:14 masak well, it's almost like "consistency" flows in from two directions into that corner case ('my' + '$!attr' = 'my $!attr'). so jnthn's rationale is one possible one, the other possible one is "it should work because it's an ordinary 'my' variable, and the other way works (omitting the sigil with 'has')"
13:14 masak secondly, dismissing the 'our' case is harder (since that variable is also accessible as C::attr), and it would be weird-ish to allow the 'our' case but disallow the 'my' case.
13:15 jnthn Note I'm not argying against my $.foo and our $.foo. In fact, I think those already work fine.
13:16 masak not according to ChoHag above.
13:16 jnthn And now, it's not accessible as C::attr, it's $C::attr
13:16 masak right; sorry.
13:16 masak my mistake.
13:16 jnthn r: class C { my $.x = 42; }; C.x.say
13:16 timotimo masak: either my $mistake or my \mistake
13:16 camelia rakudo-{parrot,jvm} 60aaed: OUTPUT«42␤»
13:16 camelia ..rakudo-moar 60aaed: OUTPUT«(Any)␤»
13:16 jnthn Hmmm.
13:16 jnthn OK, moar bug.
13:16 jnthn Which is perhaps where the confusion came from.
13:17 ChoHag The rest work. Only $! fails.
13:17 * masak submits rakudobug
13:17 jnthn Right, it doesn't make sense to me that $!foo would work.
13:17 masak timotimo: :P
13:17 ChoHag What's the difference between my and our by the way?
13:17 timotimo lexical scope vs package scope
13:18 ChoHag What's a package defined as/by?
13:18 masak accessible through the $Module::var syntax, instead of just $var
13:18 PerlJam good $localtime #perl6!
13:18 timotimo lizmat added { } inside "" in deprecation messages
13:19 timotimo those will likely look wrong now
13:19 ChoHag Right.
13:21 donaldh joined #perl6
13:21 masak timotimo: please fix.
13:22 timotimo can do
13:22 masak (oh, and well spotted) :)
13:22 ren1us joined #perl6
13:26 dalek rakudo/nom: 6dbca08 | (Timo Paulssen)++ | src/core/ (8 files):
13:26 dalek rakudo/nom: prevent "postcircumfix:<{ }>" from interpolating in error messages
13:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6dbca08e73
13:27 oetiker joined #perl6
13:28 masak m: say "the :delete adverb with postcircumfix:<{ }>"
13:28 camelia rakudo-moar 60aaed: OUTPUT«the :delete adverb with postcircumfix:<>␤»
13:28 masak I used to fall into the {}-in-"" trap all the time.
13:28 masak these days I'm just paranoid/jumpy instead ;)
13:30 Pleiades` joined #perl6
13:35 timotimo i usually just use ' most of the time
13:35 masak yeah, I used to do that, with safety as an argument.
13:35 masak these days I use " most of the time with "I'll want apostrophes in normal English text" as the argument.
13:35 jnthn q:s"..." # just scalars, for example
13:36 masak no, I don't use that one ;)
13:36 FROGGS I always use ' for speed reason... it has to do less work, no?`:o)
13:36 masak FROGGS: haha
13:36 masak FROGGS: optimize your strings!
13:36 jnthn FROGGS: At runtime? No, if it's literal. At compile time? A little. :P
13:36 FROGGS why not *g*
13:36 FROGGS jnthn: see
13:36 masak FROGGS: if you hold a mini-course on string optimization, I will totally attend.
13:37 FROGGS I just don't have much time anymore, I'm getting old
13:37 ren1us masak: i was asking about this last night, but do you have any clever ideas for a workaround for the horrible sin that is circular use statements?
13:37 yoleaux 06:16Z <TimToady> ren1us: see http://irclog.perlgeek.de/​perl6/2014-06-12#i_8860068 and following regarding circular dependencies
13:37 ren1us or that
13:37 PerlJam TimToady++
13:38 * FROGGS .oO( And there is the message of God coming from the off )
13:39 masak ren1us: yes, there was some discussion in the backlog. http://irclog.perlgeek.de/​perl6/2014-06-12#i_8861106
13:43 ren1us sounds reasonable.
13:43 ren1us TimToady++ masak++
13:43 * donaldh is disappointed that q:s?hello world¿ doesn't work :)
13:43 yoleaux 11 Jun 2014 13:44Z <[Coke]> donaldh: rakudo.jvm only made it as far as S06-other/main.t this time. it worked fine with  your first tweak but has failed on subsequent runs with later changes. Any ideas?
13:43 yoleaux 11 Jun 2014 19:57Z <[Coke]> donaldh: This exception from the eval server look fixable? https://gist.github.com/coke/77a58d476a1008749362
13:44 timotimo i was looking into how an Acme::DogError could be made
13:45 timotimo to override all the exception messages with dogespeak
13:47 sergot Could somebody give me the commit bit to rakudo project to 20th of June (due to the next release)?
13:47 sergot :)
13:47 FROGGS .u u+F0F1
13:47 yoleaux No characters found
13:47 FROGGS .u U+F0F1
13:47 yoleaux No characters found
13:48 guru joined #perl6
13:51 sqirrel_ joined #perl6
13:51 FROGGS .u 
13:51 yoleaux No characters found
13:52 hummeleB1 joined #perl6
13:52 ren1us wait, so, just for my knowledge, what is the underlying difference between "need" and "use"?
13:55 donaldh .tell [Coke] the exception from
13:55 yoleaux donaldh: I'll pass your message to [Coke].
13:55 donaldh oops
13:56 PerlJam ren1us: need loads modules but doesn't import any symbols.   use will load and import symbols
13:56 donaldh .tell [Coke] the exception from S04-phasers/in-loop.t fails outside of eval-server too. It's been around a while.
13:56 yoleaux donaldh: I'll pass your message to [Coke].
13:56 atroxaper joined #perl6
13:58 SamuraiJack joined #perl6
14:03 rurban joined #perl6
14:04 ren1us just going by what TimToady said this morning, replacing the use declarations with need declarations should be legal, but it would appear not
14:05 [Coke] donaldh: I had hoped that error message was related to the eval server dying. it's the only message out there.
14:05 yoleaux 13:55Z <donaldh> [Coke]: the exception from
14:05 yoleaux 13:56Z <donaldh> [Coke]: the exception from S04-phasers/in-loop.t fails outside of eval-server too. It's been around a while.
14:05 kaare_ joined #perl6
14:05 PerlJam ren1us: show the code?
14:05 [Coke] Any ideas why the eval server is crashing now? Seems like it used to get a lot further.
14:06 [Coke] donaldh: Do you see anything obviously wrong with how I'm invoking it:
14:06 [Coke] https://github.com/coke/perl6-roast​-data/blob/master/bin/rakudo.jvm.sh
14:06 donaldh [Coke] make spectest with the evalserver runs to completion for me, with just a few failures.
14:06 thou joined #perl6
14:07 [Coke] donaldh: I don't use 'make spectest', because I need the processing that test_summary.pl does.
14:07 [Coke] can you try cloning https://github.com/coke/perl6-roast-data, then running:
14:07 donaldh Yep. I can do that.
14:08 [Coke] ./bin/git.p5 && ./bin/rakudo.jvm.sh ?
14:08 xinming joined #perl6
14:09 * donaldh is waiting for current spectest run (currently at S32-io/other.t so not long now)
14:12 ren1us PerlJam: http://pastebin.com/hun012ys
14:13 ren1us Entity throws the circular module loading, once Grid tries to load it
14:16 ren1us and another interesting quirk: On lines 56-60, if I try to pass in an Entity without importing it in Grid, the second say infinite loops without an error
14:18 [Coke] S15 still not available on perlcabal. :(
14:27 atroxaper joined #perl6
14:28 donaldh [Coke] yesterday's test run fell over at S06-other/main-usage.rakudo.jvm
14:28 treehug88 joined #perl6
14:30 atroxaper joined #perl6
14:32 Util New RC (draft task): http://rosettacode.org/wiki/S​orting_algorithms/Cycle_sort
14:35 * jnthn refrains form making a pun about bikeshedding on the algorithm...
14:35 Util :)
14:35 [Coke] Can not decode a utf-8 buffer as if it were utf-16
14:35 [Coke] Yes, but what if I really want to try that.
14:36 rindolf joined #perl6
14:37 Util [Coke]: Convert to Byte buffer first, perhaps?
14:38 [Coke] Util: do you mean "Buf" ?
14:39 jnthn What's the .WHAT on the thing you have?
14:40 [Coke] it was utf8. I figured it out.
14:41 [Coke] m: Blob.new("MS".encode('utf-8')).decode('utf-16') # from a facebook post by andrew whitworth
14:41 camelia rakudo-moar 6dbca0: ( no output )
14:41 [Coke] m: Blob.new("MS".encode('utf-​8')).decode('utf-16').say # from a facebook post by andrew whitworth
14:41 camelia rakudo-moar 6dbca0: OUTPUT«卍␤»
14:42 [Coke] that seems like an appropriate amount of code to deliberately misconstrue encodings.
14:43 atroxaper joined #perl6
14:44 jnthn m: say "MS".encode('utf-8').WHAT
14:44 camelia rakudo-moar 6dbca0: OUTPUT«(utf8)␤»
14:44 jnthn m: say "MS".encode('utf-8', :buf).WHAT
14:44 camelia rakudo-moar 6dbca0: OUTPUT«(utf8)␤»
14:44 jnthn Hmm, too bad.
14:45 * donaldh is running perl6-roast-data and is past S06-other/main-usage.t
14:45 donaldh [Coke]: how much memory does your roast machine have?
14:49 [Coke] htop says 3954MB
14:49 dalek rakudo-star-daily: f26ea60 | coke++ | log/ (13 files):
14:49 dalek rakudo-star-daily: today (automated commit)
14:49 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/f26ea60828
14:49 dalek perl6-roast-data: bb1bea6 | coke++ | / (3 files):
14:49 dalek perl6-roast-data: today (automated commit)
14:49 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/bb1bea64ef
14:51 atroxaper joined #perl6
14:55 donaldh [Coke]: That could be the problem. I increased the max heap of eval-server to -Xmx3000m because it was 25% slower with -Xmx2500m but you could be running out of memory.
14:55 * donaldh is running on a machine with 16 giga bobs
14:59 sftp_ joined #perl6
14:59 zengargoyle joined #perl6
15:12 [Coke] I tried rolling back your most recent commit -that didn't help
15:13 donaldh https://gist.github.com/do​naldh/57020f86459600eedaa5
15:14 [Coke] perhaps for this machine, I cn do: -Xmx2000m -XX:MaxPermSize=200m -Xms2000m
15:14 [Coke] donaldh: yes, that's about what I was seeing when I was eschewing the eval server.
15:15 donaldh you could try that. You could drop MaxPermSize to 150m too.
15:18 cognominal r:  grammar G { token top { a } }; 'a' ~~ G
15:18 camelia rakudo-jvm 6dbca0: OUTPUT«(timeout)»
15:18 camelia ..rakudo-{parrot,moar} 6dbca0: ( no output )
15:18 cognominal r:  grammar G { token top { a } }; say 'a' ~~ G
15:18 camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«False␤»
15:20 FROGGS r:  grammar G { token TOP { a } }; say 'a' ~~ G
15:20 camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«False␤»
15:21 raiph joined #perl6
15:23 atroxaper joined #perl6
15:24 atroxaper joined #perl6
15:25 TimToady m: / {...} /
15:25 camelia rakudo-moar 6dbca0: ( no output )
15:25 TimToady m: m/ {...} /
15:25 camelia rakudo-moar 6dbca0: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D: Any $target, *%adverbs)␤  in block  at /tmp/XjQOAdCOBq:1␤␤»
15:25 TimToady m: '' ~~ / {...} /
15:25 camelia rakudo-moar 6dbca0: OUTPUT«Unhandled exception: Stub code executed␤   at <unknown>:1  (/home/p6eval/rakudo-inst-1/languages/perl6/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907  (/home/p6eval/rakudo-inst-1/languag​es/perl6/runtime/CORE.setting.mo…»
15:29 atroxaper joined #perl6
15:33 treehug88 joined #perl6
16:05 fhelmberger joined #perl6
16:07 atroxaper joined #perl6
16:08 Rotwang joined #perl6
16:12 lizmat joined #perl6
16:19 hoelzro hey #perl6
16:20 PerlJam greetings hoelzro
16:20 ren1us PerlJam: Did you get a chance to glance at that bit of code?
16:21 PerlJam ren1us: ah, no, sorry, I got distracted by work and other stuff.  Where was it again?
16:21 ren1us http://pastebin.com/hun012ys
16:22 molaf_ joined #perl6
16:23 guru joined #perl6
16:24 ren1us and I'm not sure why, exactly, but if I don't import Entity at all, it gets stuck at say %.contents (line 59) without throwing an error
16:25 hoelzro I noticed that ufo doesn't work with the latest perl6-m =(
16:25 hoelzro but I managed to fix it and submit a PR for masak's approval =)
16:25 [Sno] joined #perl6
16:28 prevost joined #perl6
16:29 PerlJam ren1us: I dunno.   I would think that need shouldn't load a module twice, but perhaps it doesn't mark a module as loaded until it actually finishes loading.
16:31 donaldh [Coke]: I just tested -Xmx2000m -XX:MaxPermSize=150m -XX:NewRatio=3 for the eval server. The NewRatio is normally 2 which gives 1/3 Eden+Survivor and 2/3 Old generation. NewRatio=3 increases the Old generation to 3/4 of the 2000m
16:31 ren1us hmm.  I also tried just declaring a stub in one file, but then it complains that the stub is never filled in.
16:31 ren1us I feel like there's gotta be a really easy way to do this that I'm totally missing
16:34 jsn_ joined #perl6
16:34 PerlJam Well ... why do you need PokeEnv::Entity::Entity in PokeEnv::Grid?  You don't seem to be using any of its symbols
16:35 ren1us Well, right now I'm not (I will once I get past this and keep writing)
16:35 ren1us But right now I'm fighting it because of that infinite loop on say %.contents (line 59)
16:36 PerlJam ren1us: whenever you have two modules that need each other, it's often a sign that you need a third module that is used by the other two.
16:37 ren1us If I call put($someLocation, "Test") it works fine, but if I call put($someLocation, $someEntity), then it hangs up on line 59
16:38 ren1us so I'm assuming that to be because it doesn't know how to deal with an entity due to a lack of an import
16:38 lizmat FWIW, each module (file) should only be loaded once during the lifetime of a process
16:38 lizmat if it gets loaded more than once, we have a problem in the S11 implementation
16:40 ren1us the runner starts with use declarations for each of them.  in that case, should i just get rid of each of the need declarations?
16:42 raiph ren1us, lizmat, PerlJam, masak: what do you think of moritz++'s comments about 'need' at http://irclog.perlgeek.de/​perl6/2014-06-12#i_8861145 ?
16:42 raiph (I'm about to go try find the p6l dialog masak mentions there too.)
16:43 PerlJam raiph: mortiz's comments sounds like what I was thinking should happen.
16:44 raiph masak: is this the thread you mentioned? http://grokbase.com/t/perl/perl6-language/101znr1​mpc/one-pass-parsing-and-forward-type-references
16:44 lizmat on moar / jvm I would almost take the approach that any use statement is a Promise
16:45 lizmat because we can even have concurrency at compile time  :-)
16:46 lizmat (says me, who has been guilty of starting P5 ithreads in BEGIN blocks)
16:48 lizmat the compiler should basically do a .result on the Promise (from a start block)
16:49 lizmat hmmm... but then we would deadlock quite easily in the class A { use B }; class B { use A } case
16:49 PerlJam The problem is that "need" will load something immediately, so if A needs B and B needs A, it gets stuck.  IF there were a way for need to know of the "currently being compiled" modules as moritz suggests, it could just skip ahead when it detects that the needed module is on that list.
16:50 lizmat well, we will need something like that
16:50 lizmat and it should be concurrency proof
16:50 PerlJam aye
16:50 PerlJam but this only works for need because need doesn't import any symbols.  It shouldn't work for use because use can warp the language.
16:51 PerlJam (I think anyway)
16:51 lizmat but we can't have 2 threads go off and each compile the same class A
16:51 lizmat because the globalish would trample on each other
16:51 lizmat and if they wouldn't, chaos would ensue  :-)
16:52 PerlJam if they each get compiled into a sandbox and then only one of them is made "real", that could work
16:52 PerlJam (See how I push the problem over to the side a little bit?  ;)
16:53 lizmat true, that could work on parrot
16:53 lizmat but on moar / jvm, we should be smarter
16:53 PerlJam indeed
16:54 PerlJam You promise idea sounded nice (for need rather than use)
16:54 lizmat and the more I think about it, it feels like "use" and friends should be a Promise
16:54 atroxaper joined #perl6
16:54 virtualsue joined #perl6
16:56 lizmat at least internally)  :-)
16:56 jnthn Um, what if the use does a language switch? You don't actually know how to parse the next line of code utnil the use is done.
16:56 lizmat well, it would have to wait until the Promise is done, of course
16:56 PerlJam sounds like deadlock to me.
16:56 jnthn Yeah but await start { foo } is just a really slow way to write foo.
16:57 lizmat I'm worried about 2 threads doing each "use Foo"
16:57 jnthn Ah
16:57 lizmat each "use Foo" would have get the same Promise
16:57 lizmat *get
16:57 jnthn Well, the easy way is making ModuleLoader be threadsafe...
16:58 lizmat yup  , just a matter of smop  :-)
16:59 lizmat I'll think about this some more over socializing in Paris&
17:01 ren1us anyway, PerlJam, think that could be what's causing the "say" to lock?
17:02 PerlJam ren1us: doesn't feel likt it to me, but I dunno
17:06 ren1us PerlJam: There's just nothing about that line that should be causing a hangup, afaik, unless it's doing something bizarre in trying to come up with a string representation of the Entity.
17:08 lizmat (seems I'm not leaving for socializing yet)
17:08 lizmat the past days I've been thinking we might need an Array with only unique values
17:09 lizmat a push/unshift/assignment into such an Array, would be a noop if there is already an element with the given value
17:09 lizmat where given value would be the .WHICH of the value
17:09 lizmat would that make sense in core ?
17:10 lizmat (I'm e.g. thinking @*INC, and the list of modules being compiled)
17:11 ren1us oh dear lord i know what the problem is and it's monstrous
17:12 ren1us So, one of the attributes in my entity is its location, which is totally reasonable.  And one of the attributes in the location is the grid that it's inside of.
17:13 ren1us Inside my grid, I have a hash that matches Locations to the entity inhabitting that location
17:14 ren1us So when trying to stringify an entity that is inside the grid, it gets into an infinite loop of Entity -> Location -> Grid -> Hash -> Entity -> Location -> Grid -> Hash
17:15 ren1us does that make sense?
17:15 ren1us basic string representation of an entity that has not been added to a grid:
17:15 ren1us PokeEnv::Entity::Entity.new(loc => PokeEnv::Location.new(x => 5, y => 2, grid => PokeEnv::BoundedGrid.new(width => 10, height => 10, contents => ().hash)), id => Int, type => "Floor")
17:15 PerlJam lizmat: given the uniqueness constraint, why not use a Hash like P5 does with %INC?
17:15 lizmat that would be the place to know about modules already loaded
17:17 lizmat I'm talking about the *ordered* list in @*INC (in p5 @INC)
17:17 lizmat the list of modules being compiled, could also be a hash, I guess
17:17 PerlJam right.
17:17 lizmat although there may be information in the order as well (as in FIFO)
17:18 lizmat for preventing deadlocks
17:18 PerlJam maybe.
17:18 * lizmat is waving hands
17:19 PerlJam and this hypothetical hash-or-whatever would live in all threads somehow?
17:20 ren1us So, real quick, is .perl (i assume that's what say calls) exhibiting a bug through it's willingness to go infinitely back and forth, or am i responsible for not doing that?
17:20 lizmat .perl is probably too dumb atm
17:20 PerlJam makes me wonder if we should have another twigil to indicate that a variable is shared across threads
17:20 lizmat no, don't go there
17:21 lizmat or you invoke the wrath of the jnthn   :-)
17:21 PerlJam heh
17:21 lizmat we need to stop thinking like that
17:21 lizmat and provide primitives that won't need locking an all variable accesses
17:21 lizmat *on
17:23 lizmat socializing&
17:25 REPLeffect joined #perl6
17:33 jnap1 joined #perl6
17:43 cognominal joined #perl6
17:45 mr-foobar very interesting talk from ndc conference on programming complexity -- http://vimeo.com/97408239
17:45 mr-foobar legacy code part is relevant to p[5-6]
17:52 felher joined #perl6
17:57 treehug8_ joined #perl6
18:00 zengargoyle left #perl6
18:04 PerlJam If I have rule TOP { <A> <B> <C> } and I want it to match some whitespace at the start of my string, is there some standard idiom?
18:04 PerlJam currently I'm using rule TOP { <?> <A> <B> <C> }
18:06 FROGGS TOP { '' <A> <B> <C> } perhaps
18:07 itz joined #perl6
18:08 PerlJam oh, i guess I can put the ^ in the regex directly even though it's implied
18:09 PerlJam (or will be because I use .parse)
18:10 prevost joined #perl6
18:10 PerlJam (but, in general, if the rule weren't TOP, the idiom would be to insert some zero width thingy)
18:15 ChoHag I need to call a function which may throw an exception, after the function return do something else, and only after that finally deal with the thrown exception.
18:18 FROGGS try call_that_function(); do more stuff...; CATCH { }
18:18 [Coke] donaldh: arglebargle.
18:18 telex joined #perl6
18:19 [Coke] ok, trying the new incantation.
18:22 ChoHag If I put try in front the CATCH is just ignored.
18:23 segomos_ try CATCH { default { ... } }
18:23 ChoHag It has a say at the top and a default block with another say in it. Neither is called.
18:24 FROGGS m: try 42.barg; say "yeah"; CATCH { default { say "gotcha" } }
18:24 camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
18:24 FROGGS m: try 42.barg; say "yeah"; CATCH { default { say $! } }
18:24 camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
18:24 FROGGS m: { try 42.barg; say "yeah"; CATCH { default { say $! } } }
18:24 camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
18:24 FROGGS hmmm
18:24 FROGGS m: 42.blarg
18:24 camelia rakudo-moar 6dbca0: OUTPUT«No such method 'blarg' for invocant of type 'Int'␤  in block  at /tmp/0i5ik61W4t:1␤␤»
18:24 segomos_ r: sub fun { die "error"; }; try { fun; CATCH { "caught".say; } };
18:25 camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«caught␤error␤  in sub fun at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
18:25 segomos_ m: sub fun { die "error"; }; try { fun; CATCH { default { "caught".say; } } };
18:25 camelia rakudo-moar 6dbca0: OUTPUT«caught␤»
18:26 FROGGS m: my $thingy = try 42.barg; say "yeah"; say $thingy.WHAT
18:26 camelia rakudo-moar 6dbca0: OUTPUT«yeah␤(Any)␤»
18:26 segomos_ m: sub fun { die "error"; }; try { fun; } say 'caught';
18:26 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zLo5Rra__6â�¤Two terms in a rowâ�¤at /tmp/zLo5Rra__6:1â�¤------> [32msub fun { die "error"; }; try { fun; } [33mâ��[31msay 'caught';[0mâ�¤    expecting any of:â�¤        argument listâ�¤        â€¦Â»
18:26 segomos_ m: sub fun { die "error"; }; try { fun; }; say 'caught';
18:26 camelia rakudo-moar 6dbca0: OUTPUT«caught␤»
18:39 pecastro joined #perl6
18:40 raiph joined #perl6
18:50 PerlJam r: say DateTime.new( :year("2014") );
18:50 camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!===␤Must provide arguments to DateTime.new()␤»
18:50 camelia ..rakudo-jvm 6dbca0: OUTPUT«Must provide arguments to DateTime.new()␤  in method gist at gen/jvm/CORE.setting:12842␤  in sub say at gen/jvm/CORE.setting:13740␤  in block  at /tmp/tmpfile:1␤␤»
18:50 camelia ..rakudo-parrot 6dbca0: OUTPUT«Must provide arguments to DateTime.new()␤  in method gist at gen/parrot/CORE.setting:12833␤  in method gist at gen/parrot/CORE.setting:1063␤  in sub say at gen/parrot/CORE.setting:13751␤  in sub say at gen/parrot/CORE.setting:13748␤  in block  …»
18:52 PerlJam r: say DateTime.new( :year(2014) );
18:52 camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«2014-01-01T00:00:00Z␤»
18:53 PerlJam so, that error message is LTA because I *did* provide arguments to DateTime.new()
18:56 [Coke] donaldh: new settings didn't work either.
19:02 pochi joined #perl6
19:03 virtualsue joined #perl6
19:05 _sri joined #perl6
19:06 Pleiades` joined #perl6
19:10 zengargoyle joined #perl6
19:11 masak raiph: yes, that's the thread.
19:21 masak TimToady++ # "Multiple passes introduce linguistic race conditions"
19:32 * vendethiel writes that one down
19:32 vendethiel So, how does one prepare slides ?
19:37 * vendethiel decides instead to lie down and cry a lot.
19:39 * jnthn suspects suggesting PowerPoint will only cause more tears :P
19:39 vendethiel jnthn: I have it here ... But I won't have it there.
19:40 jnthn What will you have there?
19:40 [Coke] vendethiel: what OS?
19:40 jnthn You can always get powerpoint to spit out a PDF...
19:40 [Coke] will you have internet?
19:40 vendethiel [Coke], jnthn: "no clue, lol".
19:40 cognominal yes, he will
19:40 vendethiel Won't be my computer. But I expect I'll have internet, yes
19:41 [Coke] google presentation is ok.
19:41 [Coke] (docs.google.com)
19:41 vendethiel cognominal: I don't know *when* I'm doing it, though
19:41 cognominal Saturday
19:42 vendethiel yea, that I get.
19:42 cognominal you have elbeho's phone number...
19:42 timotimo presentation about what?
19:42 vendethiel timotimo: no clue
19:43 vendethiel cognominal: well, I thought he'd contact me
19:44 cognominal well tomorrow, everyone will be back on line, so you will be able to ask
19:45 cognominal I am writing my own Grammar to parse my slide data.  Just getting podish formatting was tricky. I could do a presentation just about that.
19:45 cognominal https://gist.github.com/cogn​ominal/e8cd38a610a735a503ec
19:47 hoverboard joined #perl6
20:06 masak 'night, #perl6
20:07 [Coke] ~~
20:07 alpha- joined #perl6
20:07 alpha- left #perl6
20:08 ren1us joined #perl6
20:10 zengargoyle left #perl6
20:11 ftech joined #perl6
20:17 modcure joined #perl6
20:17 * modcure looks around wondering when Perl 6 will be aviable
20:18 * vendethiel `Mu`s modcure
20:18 eMBee joined #perl6
20:18 DarthGandalf joined #perl6
20:18 jnthn modcure: http://rakudo.org/downloads/star/
20:19 SevenWolf joined #perl6
20:19 jnthn m: say "or, I'm right here!"
20:19 camelia rakudo-moar 6dbca0: OUTPUT«or, I'm right here!␤»
20:20 DarthGandalf joined #perl6
20:20 sjn will there be another rakudo* release soon?
20:20 jnthn Later this month, I expect.
20:20 FROGGS sjn: when we fix the issues before the compiler release next thursday yes
20:20 sjn ok
20:21 jnthn The last compiler release unfortunately had some issues with some modules (on some systems?), iirc.
20:21 hoverboard joined #perl6
20:21 * jnthn will try out the Star modules on latest over the weekend.
20:28 ChoHag How does perl 6 deal with circular references?
20:30 jnthn ChoHag: You mean, with data structures?
20:31 ChoHag Yes.
20:31 ChoHag Instance of class A has a reference to instance of class b and vice versa.
20:33 jnthn Sorry, still trying to figure out if you're actually asking "how does it free memory", as in "does it have the Perl 5 circular reference issue", in which case no, all the Perl 6 implementations I'm aware of use reachability-based GC, so don't suffer the issue.
20:35 ren1us It does cause an infinite loop on .perl calls, though
20:36 jnthn Yeah.
20:36 jnthn That's a higher level issue. :)
20:37 modcure if someone had to guess... when do you think Perl 6 will be production ready?
20:37 * modcure hides
20:37 vendethiel modcure: define "ready" :). I've only been here for, like, 3 months, and I'm already using it
20:37 vendethiel For my CLI stuff
20:38 segomos_ i use it for cli ETL stuff..
20:39 FROGGS I'd need a SOAP module to use it at work :o)
20:39 * jnthn used it to do code analysis that threw away half a million lines of C# and 1000 TSQL stored procedures... :)
20:39 FROGGS so it will be production ready for me when somebody writes such a module
20:41 vendethiel jnthn: is there a C# grammar :) ?
20:41 jnthn vendethiel: No, though there was a partial TSQL one...
20:41 17SAAAX0R joined #perl6
20:41 jnthn I think in general, people are already productively using Perl 6 for smaller bits.
20:42 jnthn The hold-up for larger things is generally module availability (like what FROGGS mentioned) and often speed (but we're making decent progress on that).
20:43 vendethiel you are
20:43 FROGGS yes, speed would not be an issue for me anymore
20:43 segomos_ the http async server thing i'm writing is looking good so far, it is pretty quick too
20:45 jnthn Nice :)
20:46 hoverboard joined #perl6
20:46 ren1us off topic: how does a hash determine key equivalance, assuming the key type isn't a string?
20:47 jnthn ren1us: Uses === semantics. Note you also need to declare the Hash as having object keys (or typed keys); by default it will just stringify the keys otherwise.
20:47 jnthn (Behind === is .WHICH, which you aren't meant to use directly...)
20:47 segomos_ the 'ab' test with concurrency = 50 i get 90% of responses back in 1s
20:48 segomos_ which isn't fast but it is working
20:48 ren1us mmm, so there's no clean way to set my own rules for equivalance
20:48 ren1us that's unfortunate
20:49 jnthn ren1us: Oh, I misplained. You can implement WHICH.
20:49 jnthn ren1us: I just meant that using it for comparisons themselves is sometimes done, which === is the operator that does the right thing.
20:51 ren1us jnthn: Marvelous, thanks :).  jnthn++
20:52 segomos_ can you use a hash as a key for a hash?
20:53 jnthn Not sanely, 'cus Hash is not a value type.
20:53 jnthn Generally, using anything mutable as a Hash key is a bad idea.
20:56 segomos_ i know it's a bad idea but it could be interesting from just an exploring pov
20:56 segomos_ you could end up with slow mongodb in memory
21:00 jnthn I thought that mongodb was about losing your data while going really fast :P
21:02 moritz aye, slowly losing data is boring
21:03 jnthn Well, if you go slowly enough you can flush it to disk *before* saying, "yeah, I stored it" :)
21:04 jnthn afk for a bit...been hammering out code all day for a $dayjob thing :)
21:07 segomos_ lol
21:10 xfix I wonder how Python implements repr(). It doesn't have a problem with recursive objects.
21:12 timotimo it probably has to keep a list of "seen" objects in memory
21:12 xfix But I could assume it's a function which calls __repr__ unless it knows object's __id__ value.
21:13 rurban a hash, as in all serializers
21:13 xfix Except that wouldn't really handle it, unless you store global state.
21:13 lizmat joined #perl6
21:16 Mouq joined #perl6
21:16 Mouq o/
21:16 yoleaux 11 Jun 2014 05:31Z <FROGGS_> Mouq: no, not really. need to fix that
21:17 Mouq FROGGS: Ok, thx
21:18 xfix ReprEnter and ReprLeave. This is a hack...
21:18 FROGGS everything is a hack
21:18 denis_boyun_ joined #perl6
21:20 timotimo global state could in this case be done with a dynamic variable
21:20 timotimo the outermost .perl would set it only if it doesn't exist yet
21:20 timotimo and then ìt'd fall out of the scope automatically
21:22 ren1us m: ObjAt.new(:val("test"));
21:22 camelia rakudo-moar 6dbca0: ( no output )
21:22 ren1us skipping over the fact that i should never ever do that, is it bad that when i do that on my machine i get a segfault?
21:22 Mouq I was thinking maybe have .perl work by having a dynamic variable containing a set of the .WHICHes of the sub-.perls that have been called, and automatically write a reference when that one comes up that's the same as the object that's currently being .perl-ed... but it's hard to get the logic right
21:22 ren1us like, there's no purpose to it (i did it as a fiddling exercise), but it still shouldn't be segfaulting, should it?
21:23 Mouq ren1us: Did you do it in the REPL?
21:24 ren1us Mouq: yup
21:24 Mouq ren1us: I get an error only if I try to &say it
21:25 Mouq ren1us: Well, and if I do it in the REPL
21:26 ren1us > ObjAt.new(:val("test"));
21:26 ren1us Segmentation fault (core dumped)
21:26 ren1us ^ exactly what I'm getting
21:26 xfix It seems that Python 3 also provides @recursive_repr decorator.
21:27 Mouq m: do so try 2, say DateTime.new :2014year
21:27 camelia rakudo-moar 6dbca0: OUTPUT«2014-01-01T00:00:00Z␤»
21:28 xfix Dynamic scopes sound like a solution, however.
21:38 jnthn ren1us: SEGV is always wrong, unless you're using NativeCall, then all bets are off. :) So feel free to file that as a bug.
21:42 timotimo is ObjAt even implemented?
21:43 ren1us Considering it's the return type for .WHICH, i would hope so
21:43 jnthn r: say ObjAt
21:43 camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«(ObjAt)␤»
21:43 jnthn :)
21:43 xfix r-m: kill 11, $*PID
21:43 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VngAPTwja7â�¤Undeclared routine:â�¤    kill used at line 1â�¤â�¤Â»
21:43 xfix So, I cannot segfault Perl 6 this way...
21:44 ren1us I'll file a bug in a few minutes, then.
21:44 timotimo thank you for bug reporting :)
21:45 xfix r-m: run 'kill', '-SIGSEGV', $*PID
21:45 camelia rakudo-moar 6dbca0: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub run at src/RESTRICTED.setting:8␤  in block  at /tmp/vNkcBHYi9A:1␤␤»
21:46 ren1us by the way, should an object's .WHICH return be changing?  because it seems to be doing just that
21:46 xfix Restricted setting still exists? It's practically useless in my opinion, unless it was fixed lately.
21:50 Mouq ren1us: An immutable object's WHICH should definitely not be changing. I think mutable object's WHICHes sometimes change because of GC... not sure if it's supposed to
21:50 Mouq m: set(1,42,"test").WHICH.say
21:50 camelia rakudo-moar 6dbca0: OUTPUT«Set|Int|1 Int|42 Str|test␤»
21:51 ren1us man, i've got a knack for breaking things lately
21:53 BenGoldberg joined #perl6
21:53 denis_boyun___ joined #perl6
22:12 ChoHag Sorry jnthn thanks that's what I was after.
22:13 ChoHag I had to persuade my daughter to bathe and enbed herself.
22:14 lizmat joined #perl6
22:15 dalek rakudo/nom: e9e842a | (Timo Paulssen)++ | src/core/MixHash.pm:
22:15 dalek rakudo/nom: forgot to :w a file
22:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9e842a12c
22:15 Mouq xfix: Feel free to implement recursion-safe .perl, if you need a project :)
22:15 cognominal I have a chain I want to interpret from Perl 6 like if it was double quoted. That is, tranforming   'a\nb'  to "a\nb", for example. How do I do that?
22:16 cognominal short of an EVAL
22:16 Mouq cognominal: https://github.com/moritz/json/b​lob/master/lib/JSON/Tiny.pm#L27
22:17 Mouq ...Except the opposite?
22:17 cognominal ok, so you do it manuallt.
22:17 cognominal Nice anyway.
22:18 dalek roast: 5a80ef9 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
22:18 dalek roast: Fix for timotimo++ 's fixes
22:18 dalek roast: review: https://github.com/perl6/roast/commit/5a80ef9ea2
22:19 Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '\' ~ $0; say $str
22:19 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UZGiYgFOiOâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/UZGiYgFOiO:1â�¤------> [32m s:g[ \\ (.) ] = EVAL '\' ~ $0; say $str[33mâ��[31m<EOL>[0mâ�¤    expectin…»
22:19 Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '\\' ~ $0; say $str
22:19 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling eval_0â�¤Undeclared routine:â�¤    n used at line 1â�¤â�¤Â»
22:19 Mouq Oh
22:19 Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '"\\$0"'; say $str
22:19 camelia rakudo-moar 6dbca0: OUTPUT«a$0b␤»
22:19 Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '"\\'~$0~'"'; say $str
22:19 camelia rakudo-moar 6dbca0: OUTPUT«a␤b␤»
22:20 timotimo thanks, lizmat
22:20 cognominal Mouq, That what I was about to do. This is safe because I am in control of the string I give to EVAL
22:22 cognominal Ho, doing it escaped char by escaped char is safe indeed
22:22 cognominal Mouq++
22:23 cognominal that's the time of day I don't think straight anymore :(
22:24 zengargoyle joined #perl6
22:24 * lizmat thinks there should be an easier way to change 'n' to "n"
22:24 Mouq cognominal: As long as you don't need to account for, e.g., \x123
22:25 lizmat isn't there some internal hash for that already?
22:25 cognominal Nope.
22:25 Ben_Goldberg joined #perl6
22:26 cognominal lizmat: my question could have been better reformulated. Can I directly access the quote language from Perl 6?
22:26 cognominal maybe with a    use Whatever:from<nqp>
22:27 Mouq m: given "interpolate" { say 'Single \wq[uotes don't $_], right?' }
22:27 lizmat perhaps, I wouldn't know offhand :-(
22:27 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/le3ohlsKVlâ�¤Two terms in a rowâ�¤at /tmp/le3ohlsKVl:1â�¤------> [32mnterpolate" { say 'Single \wq[uotes don'[33mâ��[31mt $_], right?' }[0mâ�¤    expecting any of:â�¤        postfixâ�¤        in…»
22:27 Mouq m: given "interpolate" { say 'Single \qq[uotes don't $_], right?' }
22:27 camelia rakudo-moar 6dbca0: OUTPUT«Single uotes don't interpolate, right?␤»
22:28 lizmat timotimo: no, thank you for fixing my "" booboos
22:28 lizmat :-)
22:28 lizmat (doing them twice, so that the tests were also wrong)
22:29 Mouq cognominal: https://github.com/jaffa4/perl6parsing/ don't know how usable it is
22:29 Ben_Goldberg joined #perl6
22:29 jnthn If you really want to not even interpolate the \q quote-language switcher, use Q
22:30 lizmat FWIW, S02:631 states that .WHICH doesn't necessarily needs to be an ObjAt
22:30 synopsebot Link: http://perlcabal.org/syn/S02.html#line_631
22:30 lizmat specifically for value types such as Set
22:30 lizmat m: <a b c>.Set.WHICH.WHAT.say
22:30 camelia rakudo-moar 6dbca0: OUTPUT«(Str)␤»
22:30 lizmat m: <a b c>.SetHash.WHICH.WHAT.say
22:30 camelia rakudo-moar 6dbca0: OUTPUT«(ObjAt)␤»
22:31 lizmat since SetHash is mutable, it *does* return an ObjAt
22:31 * timotimo is working on mixing in an annotations hash into qast nodes
22:31 Mouq jnthn: Yep, but cognominal wants to interpolate backslashes. I don't think there's a Q:b-but-not-\q
22:31 timotimo instead of having a hash for every node always
22:31 lizmat one could almost argue that if the .WHICH of an object is not an ObjAt, it is immutable
22:31 jnthn Mouq: ah, true
22:32 cognominal Mouq: When I will have finished my AST-dsl project, it will be  about time that I move from the internals to learn about the large ecosystem
22:33 cognominal 230 modules. I am impressed.
22:33 lizmat m: my %h; %h<a>=%h; %h.perl # so what would be a good .perl representation for this?
22:33 camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
22:34 logie joined #perl6
22:34 Mouq cognominal: :) /me just happens to remember stuff entered in perl6/ecosystem commits
22:34 woolfy joined #perl6
22:34 Pleiades` joined #perl6
22:37 lizmat m: my %h; %h<a>=%h; %h.gist # same for .gist, by the way
22:37 camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
22:38 lizmat m: my %h; %h<a>=%h; %h.Str # and .Str by the way
22:38 camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
22:38 Mouq m: my %h; say "(my \%$_; \%$_ = a => \%$_)" given %h.WHICH.trans('|' => '-')
22:38 camelia rakudo-moar 6dbca0: OUTPUT«No such method 'trans' for invocant of type 'ObjAt'␤  in block  at /tmp/_9cpFHMyRf:1␤␤»
22:38 Mouq m: my %h; say "(my \%$_; \%$_ = a => \%$_)" given %h.WHICH.Str.trans('|' => '-')
22:38 camelia rakudo-moar 6dbca0: OUTPUT«(my %Hash-140662670062872; %Hash-140662670062872 = a => %Hash-140662670062872)␤»
22:38 Mouq Not the *most* readible representation
22:40 * Mouq is very distractable tonight
22:41 lizmat since any object can provide its own .perl / .gist / .Str, it feels to me that self-referring structures need to be solved at a system levek
22:41 lizmat *level
22:41 jnthn Mouq: Hey, look at that juggling squirrel!
22:41 lizmat rather than in each .perl separately
22:42 lizmat a bit like each .perl / .gist method would need to be automatically wrapped
22:42 lizmat at compile time
22:44 Mouq Seems legit https://www.youtube.com/watch?v=PZJl08pJrY0
22:44 Mouq lizmat: A wrapper of some kind would probably be for the best, yeah
22:44 lizmat perl5's approach:
22:44 lizmat $ perl -MData::Dumper -E 'my %h; $h{a}=\%h; say Dumper(\%h)'
22:44 lizmat $VAR1 = {
22:44 lizmat 'a' => $VAR1
22:44 lizmat };
22:46 lizmat m: my %h = ( a => %h )
22:46 camelia rakudo-moar 6dbca0: ( no output )
22:46 lizmat hmm....... sort of expected that to fail at compile time
22:50 jnthn The variable is declared by then.
22:51 lizmat cool
22:52 lizmat $ perl -MData::Dumper -E 'my %h=(a=>\%h); say Dumper(\%h)'
22:52 lizmat $VAR1 = {
22:52 lizmat 'a' => {}
22:52 lizmat };
22:52 jnthn The one that you may be thinking of is
22:52 jnthn m: my %h is foo(%h);
22:53 camelia rakudo-moar 6dbca0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/G4a3jqt8yIâ�¤Variable '%h' is not declaredâ�¤at /tmp/G4a3jqt8yI:1â�¤------> [32mmy %h is foo(%h[33mâ��[31m);[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
22:53 lizmat yup, we still need to fix that  :-)
22:53 jnthn The trait is part of the declaration, though. We don't actually know what kind of container to create until we saw the traits.
22:53 jnthn I don't think we can fix it.
22:53 jnthn Or it'll be a "fix"
22:53 jnthn As in, probably useless
22:54 lizmat well, several traits expect $_ to be set to the thing being defined
22:54 lizmat my $dbh will leave { .disconnect }
22:54 jnthn That is even more troublesome
22:55 jnthn Because it expects to be getting a particular instance of the variable.
22:55 jnthn It's not the trait itself that wants it there; it's a bit different to the "is foo(%h)" case. There, the %h is trying to be passed as an argument to the trait.
22:55 jnthn In the will leave { ... } case, that isn't the case.
22:55 jnthn Just imagine a recursive function with that line in to see the difference. :)
22:58 dalek doc: 831e954 | Mouq++ | / (4 files):
22:58 dalek doc: Change Perl 6 scripts to *.p6
22:58 dalek doc:
22:58 dalek doc: This avoids confusion due to the Perl 5 app.pl
22:58 dalek doc: ...though perhaps it would be more apt, in a Perl 6 project, to instead
22:58 dalek doc: rename app.pl to app.p5 ;)
22:58 dalek doc: review: https://github.com/perl6/doc/commit/831e954a0b
23:01 vendethiel pl6; no ?
23:03 lizmat jntthn: if passing $_ to e.g. a "will leave" is such a problem, maybe we need to change S04:1914 ?
23:03 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1914
23:04 lizmat jnthn: maybe we need a sort of .whence on $dbh in that case ?
23:04 Mouq vendethiel: I'm not really sure which is preferred, I just went with the shorter
23:05 Mouq vendethiel: They are both listed here, if that makes any difference: https://github.com/github/linguist/blob/​master/lib/linguist/languages.yml#L1588
23:05 vendethiel alrighty :)
23:05 Mouq vendethiel++ :)
23:05 vendethiel Mouq++ # laziness
23:06 Mouq laziness++
23:15 TimToady "because it expects a particular instance of a variable" sound a lot like closure to me
23:16 TimToady *sounds
23:16 ChoHag How do you do 'if ($foo =~ /b(a)r/) { say "$1" }" in perl 6?
23:17 TimToady and WHICH of a mutable object should not change; if we're using addresses for WHICH, and the GC can relocate things, then the use of addresses for WHICH is bogus
23:18 woolfy left #perl6
23:20 lizmat looks like that logic lives in nqp::where
23:20 lizmat m: say nqp::where(1); say nqp::where(2)
23:20 camelia rakudo-moar 6dbca0: OUTPUT«139787284353680␤139787284353640␤»
23:21 jnthn TimToady: Yes, the question is how to efficiently implement WHICH without bulking up every object with space for a unique identifier.
23:21 TimToady pity you can't predict where the object will end up if it's permanent :)
23:21 jnthn Not really, I'm afraid.
23:22 jnthn Hm, or could you :)
23:22 jnthn I guess you *could* pre-allocate space for it in gen2, and keep its address in a hash table...
23:22 jnthn It's a bit of a hack :)
23:23 jnthn And has some threading concerns.
23:23 jnthn But plausible.
23:23 lizmat would changing from nursery to gen2 cause .WHICH to change at the moment?
23:23 Mouq ChoHag: if $foo ~~ /b(a)r/ { say ~$0 }
23:23 Ben_Goldberg joined #perl6
23:24 jnthn lizmat: Yes
23:24 jnthn lizmat: That's at the heart of some of the intermittent failures of the object-hash-using tests, like Bag.
23:24 lizmat would it make sense to only make unique identifiers for only those things on which we actually call .WHICH ?
23:24 Mouq ChoHag: or if $foo ~~ m/b(a)r/ { say "$/[0]" }
23:25 lizmat jnthn: you mean BagHash, no?  because Bag is immutable / value based
23:25 jnthn lizmat: uh, yes
23:25 jnthn Sorry, tired :)
23:26 lizmat know the feeling
23:26 jnthn lizmat: Yeah, makes sense of course, the devil's in how we do it :)
23:27 TimToady automatically move to gen2 when they call .WHICH?
23:27 lizmat nqp::where I guess (instead of .WHICH )
23:28 jnthn TimToady: We don't do that because "move to gen2" means "update all the pointers", which means a heap walk, which is costly.
23:28 jnthn lizmat: I think nqp::where should continue meaning "actual memory address"
23:28 jnthn lizmat: .WHERE is meant to return that anyway
23:29 jnthn lizmat: And we introduce some kind of nqp::which for the other thing.
23:29 lizmat ok, will dream about that tonight  :-)
23:29 lizmat catching some sleep now, FPW tomorrow
23:30 lizmat good night #perl6!
23:30 jnthn 'night, lizmat++
23:30 jnthn Enjoy FPW!
23:30 lizmat bien sur!
23:31 cognominal bien sûr?
23:31 vendethiel Still need to decide what I'll use for my slides.
23:31 vendethiel Maybe reveal.js, would be easier I guess
23:32 * jnthn used that recently
23:32 jnthn It worked
23:32 jnthn Though I was generating it.
23:32 jnthn Mostly.
23:32 TimToady .oO(drei ecken hat mein hut)
23:32 jnthn Anyways, time for some rest...'night
23:32 vendethiel jnthn: I know it from you ;)
23:32 TimToady o/
23:33 vendethiel I wonder if I should use the website or not
23:34 vendethiel let's do that.
23:35 * vendethiel starts writing
23:35 vendethiel cognominal ?
23:35 cognominal oui?
23:36 vendethiel pour les slides, en français ou en anglais ?
23:36 cognominal En français
23:37 cognominal But you do whatever you want. We trust you to do the best.
23:39 cognominal Anyway, Jérôme said you could do without slides.
23:50 vendethiel Mmh :/. I'm not really sure. And it's gonna be 20 minutes...
23:52 jack_rabbit joined #perl6

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

Perl 6 | Reference Documentation | Rakudo