»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
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:00
geekosaur isn't the default key type for a hash String? so you need to stringify the object 00:06
(you can change this but if you don't then it uses Str) 00:07
00:08 ssutch left, ssutch joined 00:09 Mouq left 00:13 ssutch left
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␤␤»
raiph ren1us: ^^ plus I'm checking clogs 00:15
00:16 telex joined
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
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?
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:20
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:21
perl6 has developed a knack for making me feel like a terrible person 00:22
raiph what was the first lang u learned? 00:24
ren1us ...java lol. i'm spoiled. 00:25
what's the mindset in forbidding a two-way use relationship? 00:31
raiph ren1us: you can do it but you have to do a stub first. looking for an example right now. 00:32
i've not found it, but... 00:37
m: class a { ... }; class b { a }; class a { b } # something like a module equivalent of this
camelia ( no output )
raiph (the ... is a stub) 00:38
ren1us and that takes the place of one of the use declarations? 00:39
00:41 hoverboard joined, xenoterracide joined
raiph ren1us: looks like I'm wrong 00:44
irclog.perlgeek.de/perl6/2012-08-07#i_5881165
The rationale appears to be that P6 is a one-pass parse lang (slangs can presumably do otherwise if they want) 00:49
ren1us so the only option is a massive, obscene source file 00:50
00:53 rurban left
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:53
and a Grid and an Entity are way too dissimilar to be sharing a source file imo 00:54
raiph So, to recap for the log, you planned to do mutual "use" statements. 00:57
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? irclog.perlgeek.de/perl6/2014-06-12#i_8859421
yoleaux raiph: I'll pass your message to masak.
ren1us thanks, botty 00:59
raiph++
on that note, i've now been up for 30 hours straight, so goodnight 01:00
01:00 lizmat left 01:01 [Sno]_ joined 01:03 logie joined, [Sno]_ is now known as [Sno], thou joined 01:07 zengargoyle joined 01:08 thou left 01:11 rurban joined 01:15 rurban left, kurahaupo left 01:17 rurban joined 01:20 FROGGS_ joined 01:25 Su-Shee_ joined 01:29 Grrrr joined 01:35 klapperl joined 01:46 hoverboard left 01:58 hoverboard joined, hummeleB1 left 02:00 Sqirrel joined
grondilu_ off topic: I don't know about you guys, but I feel quite excited about HP's project called "The Machine": www.businessweek.com/printer/articl...f-computer 02:09
02:09 grondilu joined 02:13 SevenWolf joined 02:38 xragnar_ joined, xragnar_ is now known as xragnar
xiaomiao grondilu: that has been 5 years away for the last 25 - I have little hope that it leads to products directly 02:49
02:51 thou joined
grondilu the difference is that they make strong announcements now. The CEO just announced it. They seem pretty serious about it. 02:54
02:56 thou left
grondilu check out www.youtube.com/watch?v=33WPphbFeDY from about 10m 02:58
xiaomiao strong announcements? feels like the year 2000 all over again ;)
grondilu well, maybe. I confess I was not paying much attention to these stuff around that time. 02:59
xiaomiao as long as I don't see a proper real demonstration I have little faith, especially with ink salesmen like HP 03:00
BenGoldberg wonders how "photonics" differs from fiber optics. 03:04
grondilu it's on the chip 03:05
in silicon
it's actually silicon photonics I think, not just photonics.
BenGoldberg Ok, that makes a kind of sense then; optical channels on/in the chip, as opposed to fibers in open space. 03:06
03:28 SamuraiJack__ joined 03:32 BenGoldberg left 03:42 kaare_ joined 04:02 jack_rabbit joined 04:14 nnunley joined, nnunley left 04:16 zengargoyle left 04:19 thou joined 04:23 xenoterracide left 04:27 [Sno] left, [Sno] joined 04:28 SamuraiJack__ left, labster left 04:30 kaare_ left 04:32 [Sno] left 04:33 skids left 04:40 denis_boyun_ joined 04:46 fhelmberger joined 04:51 fhelmberger left 04:55 erkan joined, erkan left, erkan joined, kaare_ joined 04:58 hoverboard left 05:02 bcode joined 05:18 labster joined 05:27 kurahaupo joined, hoverboard joined 05:33 grondilu_ joined 05:34 grondilu_ left 05:35 grondilu left
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:36
05:37 bjz joined
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:42
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:44
05:46 rurban left
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:46
05:47 jack_rabbit left
dalek t--IRC/new-handler: 860e415 | (Jarrod Funnell)++ | lib/Net/IRC/ (4 files):
Add a .notice method to Event, and make .msg work better as well
05:47
Timbus .. that wass the wrong branch :I 05:48
OH well
05:55 SamuraiJack__ joined 05:58 awwaiid joined
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
it's just 'need' dependencies rather than 'use' dependencies, to the first approximation
we allow delayed definition of the bodies of both classes and functions, which is about as much as any language gives you 06:01
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:03
06:03 awwaiid left 06:04 darutoko joined
TimToady these are not languages in which you are allowed to write "use COBOL;" 06:04
06:05 bcode left, bcode joined, awwaiid joined
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
06:07 chris__ joined, chris__ left
TimToady m: my $o = Any.new; my %h{Any} = $o => 1; say %h{Any} 06:09
camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
TimToady m: my $o = Cool.new; my %h{Any} = $o => 1; say %h{Any} 06:10
camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
TimToady m: my $o = Rat(1,2); my %h{Any} = $o => 1; say %h.keys 06:11
camelia rakudo-moar 60aaed: OUTPUT«2␤»
TimToady hmm
m: my $o = Rat(1,2); my %h{Any} = $o => 1; say %h.keys[0]
camelia rakudo-moar 60aaed: OUTPUT«2␤»
06:12 hoverboard is now known as moistcherry
TimToady m: my $o = 1/2; my %h{Any} = $o => 1; say %h.keys[0] 06:12
camelia rakudo-moar 60aaed: OUTPUT«0.5␤»
TimToady m: say Rat(1,2).nude
camelia rakudo-moar 60aaed: OUTPUT«2 1␤»
TimToady odd
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
camelia niecza v24-109-g48a8de3: OUTPUT«1 2␤»
TimToady maybe I should go to bed too :)
.tell ren1us see 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
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
TimToady m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h{$0} 06:19
camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
TimToady grr
m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h{$o} 06:20
camelia rakudo-moar 60aaed: OUTPUT«1␤»
TimToady there we go
m: my $o = Any.new; my %h{Any}; %h{$o} = 1; say %h.keys[0].WHAT
camelia rakudo-moar 60aaed: OUTPUT«(Any)␤»
06:20 denis_boyun_ left
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:21 rurban left
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␤»
TimToady \o/
06:23 rurban1 left
TimToady lizmat++ again for all that :) 06:23
06:26 kaleem joined 06:27 rurban joined, [Sno] joined 06:28 denis_boyun joined 06:31 rurban left 06:38 moistcherry is now known as cholby 06:42 awwaiid left 06:43 awwaiid joined 06:46 FROGGS_ left 06:55 cholby is now known as hoverboard
moritz \o 06:57
06:59 zakharyas joined 07:00 FROGGS_ joined 07:05 dalek joined, ChanServ sets mode: +v dalek
ChoHag Is there any documentation anywhere on parametric roles? 07:08
I can't get them straightened out. 07:09
moritz ChoHag: have you read S14 already?
ChoHag Yes. 07:10
moritz what's unclear?
ChoHag Well it wasn't.
But then what I wrote didn't work.
07:11 synopsebot joined
ChoHag Sonow it is. 07:11
moritz I'm afraid we don't have much more docs than that (yet)
07:11 thou left
ChoHag I shall continue to poke at it. 07:12
07:13 FROGGS_ is now known as FROGGS
FROGGS morning 07:13
07:21 denis_boyun left 07:28 rurban joined
ChoHag I worked it out. 07:28
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
The parameterising stuff worked fine.
07:30 igorsutton joined 07:32 rurban left
moritz fancy language features don't save you from actually implementing your logic correctly :-) 07:48
07:50 SamuraiJack__ left, SamuraiJack joined 07:52 kivutar joined 07:56 denis_boyun_ joined
sergot morning o/ 08:01
FROGGS nqp-m: say(nqp::ifnull(nqp::getlexdyn('$?FILES'), '<unknown file>')) 08:03
camelia nqp-moarvm: OUTPUT«/tmp/zu2517GEbT␤»
FROGGS nqp-m: say(nqp::ifnull(nqp::getlexdyn('...'), '<unknown file>'))
camelia nqp-moarvm: OUTPUT«<unknown file>␤»
FROGGS morning sergot 08:04
sergot FROGGS: o/
08:12 thou joined 08:15 kurahaupo left 08:16 hoverboard left 08:17 thou left 08:22 lizmat joined 08:25 hoverboard joined 08:27 anaeem1 joined 08:28 woolfy joined 08:29 rurban joined 08:32 rurban1 joined 08:33 rurban left 08:36 rurban1 left 08:40 dmol joined
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 ( no output )
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(…»
FROGGS jnthn: do you know why the latter fails?
08:43 fhelmberger joined 08:44 Su-Shee_ is now known as Su-Shee
moritz maybe some kind of container + type checking funkyness? 08:45
in p6, the type check propagates into the container
I'm pretty sure NQP doesn't
FROGGS but it works for binding... the LHS is the same in both cases...
08:45 virtualsue joined
jnthn FROGGS: Yes, because assignment is a 3-arg candidate 08:47
As an optimization, at least
FROGGS ohh
it needs :$value?
jnthn No, extra positional 08:48
BUT
You're using an NQP class
It doesn't do scalar containers
So there's no assignment.
FROGGS okay, I stick to binding then perhaps
jnthn Even if you get the multis right.
08:49 SevenWolf left
FROGGS I just wonder that I didn't hit this earlier... 08:49
jnthn Well, everything is done with accessors like $node.name('foo') instead of $node.name = 'foo' 08:50
Though as a side-note, the $qast_node<foo> syntax is endangered. 08:51
We pay the price of a hash - used or not - on every single QAST node at the moment.
FROGGS yeah, I know :/ 08:54
08:54 dakkar joined
jnthn We could go to a mixin mechanism, but I can't really do that and keep that syntax. 08:54
It'd be more like $node.ann('foo', value);
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*
jnthn And $node.ann('foo') just gets the value :)
FROGGS no! you don't trick me in doing that now!
jnthn ooh, that's a good idea! :D
FROGGS must resist 08:56
09:01 hoverboard left
jnthn Ah well, maybe somebody else out there who fancies an easy memory and perhaps speed win will take it. :) 09:03
09:04 zakharyas left
nwc10 timotimo: ^^ :-) 09:04
09:07 kurahaupo joined 09:11 SamuraiJack left
ChoHag Passing objects back and forth between threads makes .perl() very unhappy. 09:13
lizmat ChoHag: have a gist of that?
ChoHag I don't even have the first clue.
(ho ho ho) 09:14
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
09:16 zakharyas joined
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:17
lizmat then will wait until there is something she can look at 09:21
ChoHag There that'll do it: gist.github.com/anonymous/2de67108870c2dfdba3f 09:23
Needs the jvm.
In my defense of the obvious, I'm trying to break/learn things, not create a masterpiece. 09:25
09:30 spider-mario joined 09:40 jsn_ joined
lizmat ChoHag: why the "my $*SCHEDULER = ThreadPoolScheduler.new;" ?? 09:41
are you afraid there is no $*SCHEDULER ?
ChoHag No. 09:42
I plan to play around with the scheduler.
But every time I think I can start on that, I need to write or fix something else.
So the declaration sits there, confusing people who read my gists.
FROGGS welcome to Perl 6 (or rakudo) :o) 09:43
09:46 SamuraiJack joined, pecastro joined 09:47 Psyche^ joined
lizmat ChoHag: well, it *feels* to me you're enjoying your bout of magical programming 09:47
ChoHag It's certainly fun.
Not so sure about magical. 09:48
I mean it's certainly sufficiently advanced, but magic has a certain je ne se quoi, spelled correctly, to it.
All I'm getting is "wtf?"
moritz any sufficiently advanced segfault is indistinguishable from fuckup. 09:49
ChoHag moritz: This one was accompanied by a 1000 line stack (?) dump.
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
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:50
09:50 [Sno] left, [Sno]_ is now known as [Sno]
cognominal r: / <...> / 09:52
camelia rakudo-{parrot,jvm,moar} 60aaed: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/tmpfile:1␤------> / <...⏏> /␤Unrecognized regex metacharacter . (must be quoted to match literally)␤at…»
ChoHag Building the path? It's still planning the route in some places.
cognominal no yadayada in regexen :(
ChoHag Surveying the terrain and getting a bunch of definitely-not-illegals to blow shit up. 09:53
cognominal The vanilla yadayada has already another meaning 09:54
... in that context
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 10:05 thou left, anaeem1 left 10:06 anaeem1_ joined, denis_boyun_ left
lizmat m: / < / 10:11
camelia rakudo-moar 60aaed: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/buK36ZJuqZ:1␤------> / < /⏏<EOL>␤Unrecognized regex metacharacter (must be quoted to match literally)␤at /tmp/buK…»
lizmat cognominal: isn't it blowing up because of the < not being quoted ? 10:12
cognominal I would like it to blow up like a regular yada in normal code 10:13
r: ...
camelia rakudo-moar 60aaed: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.mo…»
..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)␤␤»
..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
cognominal Juste for the sake of having compilable examples. 10:14
making my slides for fpw :)
lizmat m: "" ~~ / <{...}> / 10:16
camelia rakudo-moar 60aaed: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.mo…»
lizmat something like that ?
cognominal ho yes
lizmat :-) 10:17
cognominal did not thought of it. A little long though.
I always complain.
lizmat well, yes... I guess < ... > sort of would clash with S05:1391 10:18
synopsebot Link: perlcabal.org/syn/S05.html#line_1391
lizmat although TimToady might be convinced into special casing < ... >
sightseeing& 10:19
cognominal I would think it more like an example of S05:1391
synopsebot Link: perlcabal.org/syn/S05.html#line_1391
10:21 kurahaupo left
cognominal I would prefer <...>, without the whitespaces 10:23
10:24 lizmat left 10:30 virtualsue left 10:34 rurban joined 10:38 rurban left 11:03 sqirrel_ joined 11:10 agre joined 11:14 agre left
FROGGS dang, something in v5's grammar hangs... 11:14
and that for the simplest statement ever, ';'
when I turn the statement rule into a token though it "works" 11:16
("works" insofar that ';' passes, but ' ;' not) 11:20
11:34 rurban joined 11:39 rurban left
masak nice: daha.github.io/angularJS-github-con...do/rakudo/ 11:44
yoleaux 00:58Z <raiph> masak: (or anyone else) What's the best approach for ren1us? irclog.perlgeek.de/perl6/2014-06-12#i_8859421
masak best approach? figure out a way to make the application not have circular dependencies? 11:45
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:46
that doesn't completely rule out 'use' cycles, I guess... but that's still a good idea, IMO. 11:47
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:49
moritz also kinda thinks that the current approach of just saying "no" is the best long-term solution 11:58
masak the get-out-of-jail-free, small-scale solution is to predeclare types. 12:05
you can do that.
but I'd consider it kind of a code smell, and it most definitely does not scale.
12:07 atroxaper joined
moritz I wonder if can break the chain with 'need' instead of 'use' 12:08
and keep a list of currently-being-compiled packages in the compiler
and break the chain when a module is loaded by 'need' instead of 'use'
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
in there, I raise many of the problems of one-pass parsing, predeclaration, and dependency cycles.
12:14 FROGGS left 12:15 atroxaper is now known as atroxaper_, carlin joined, atroxaper_ is now known as atroxaper 12:16 atroxaper left 12:17 atroxaper joined 12:18 atroxaper left, atroxaper joined 12:19 atroxaper left, atroxaper joined, atroxaper left 12:21 atroxaper joined
atroxaper Hello, #perl6 ! 12:22
masak hi 12:23
atroxaper masak: o/ 12:26
12:28 jnap joined 12:35 FROGGS joined 12:36 rurban joined 12:37 sqirrel_ left 12:40 rurban left 12:43 prevost joined 12:46 yakudzo joined, muraiki joined
ChoHag The examples in S12/Class attributes don't work. Specifically: Cannot use ! twigil on our [or my] variable 12:53
12:56 guru joined, guru is now known as ajr_, rurban joined
masak :/ 13:01
I think that's one of the things that never worked after the MOP was made.
b: say "you there?"
camelia b : OUTPUT«sh: 1: install/bin/perl6: not found␤»
masak ...but I can't show that it used to work, because Beijing is busted, apparently. 13:02
13:03 xinming joined
jnthn I'm not sure it even makes sense. 13:03
There's no reason to write my $!foo when my $foo would mean just the same. 13:04
And allowing it means you can no longer look at a bit of code, see $!foo, and know it's an instance var.
So, I think it's S12 that should change. Not Rakudo.
13:05 kaare_ left
xfix Local private variable. This looks useless. 13:06
13:06 denis_boyun joined 13:11 molaf joined
frettled A variable so secret it doesn't know itself exists? 13:13
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
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.
jnthn Note I'm not argying against my $.foo and our $.foo. In fact, I think those already work fine. 13:15
masak not according to ChoHag above. 13:16
jnthn And now, it's not accessible as C::attr, it's $C::attr
masak right; sorry.
my mistake.
jnthn r: class C { my $.x = 42; }; C.x.say
timotimo masak: either my $mistake or my \mistake
camelia rakudo-{parrot,jvm} 60aaed: OUTPUT«42␤»
..rakudo-moar 60aaed: OUTPUT«(Any)␤»
jnthn Hmmm.
OK, moar bug.
Which is perhaps where the confusion came from.
ChoHag The rest work. Only $! fails. 13:17
masak submits rakudobug
jnthn Right, it doesn't make sense to me that $!foo would work.
masak timotimo: :P
ChoHag What's the difference between my and our by the way?
timotimo lexical scope vs package scope
ChoHag What's a package defined as/by? 13:18
13:18 jsn_ left
masak accessible through the $Module::var syntax, instead of just $var 13:18
PerlJam good $localtime #perl6!
timotimo lizmat added { } inside "" in deprecation messages
those will likely look wrong now 13:19
ChoHag Right.
13:21 donaldh joined
masak timotimo: please fix. 13:21
timotimo can do 13:22
masak (oh, and well spotted) :)
13:22 ren1us joined
dalek kudo/nom: 6dbca08 | (Timo Paulssen)++ | src/core/ (8 files):
prevent "postcircumfix:<{ }>" from interpolating in error messages
13:26
13:27 oetiker joined
masak m: say "the :delete adverb with postcircumfix:<{ }>" 13:28
camelia rakudo-moar 60aaed: OUTPUT«the :delete adverb with postcircumfix:<>␤»
masak I used to fall into the {}-in-"" trap all the time.
these days I'm just paranoid/jumpy instead ;)
13:30 Pleiades` joined
timotimo i usually just use ' most of the time 13:35
masak yeah, I used to do that, with safety as an argument.
these days I use " most of the time with "I'll want apostrophes in normal English text" as the argument.
jnthn q:s"..." # just scalars, for example 13:36
masak no, I don't use that one ;)
FROGGS I always use ' for speed reason... it has to do less work, no?`:o)
masak FROGGS: haha
FROGGS: optimize your strings!
jnthn FROGGS: At runtime? No, if it's literal. At compile time? A little. :P
FROGGS why not *g*
jnthn: see
masak FROGGS: if you hold a mini-course on string optimization, I will totally attend.
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?
yoleaux 06:16Z <TimToady> ren1us: see irclog.perlgeek.de/perl6/2014-06-12#i_8860068 and following regarding circular dependencies
ren1us or that
PerlJam TimToady++
FROGGS .oO( And there is the message of God coming from the off ) 13:38
masak ren1us: yes, there was some discussion in the backlog. irclog.perlgeek.de/perl6/2014-06-12#i_8861106 13:39
13:41 rurban left
ren1us sounds reasonable. 13:43
TimToady++ masak++
donaldh is disappointed that q:s?hello world¿ doesn't work :)
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?
11 Jun 2014 19:57Z <[Coke]> donaldh: This exception from the eval server look fixable? gist.github.com/coke/77a58d476a1008749362
timotimo i was looking into how an Acme::DogError could be made 13:44
to override all the exception messages with dogespeak 13:45
sergot Could somebody give me the commit bit to rakudo project to 20th of June (due to the next release)? 13:47
13:47 ajr_ left
sergot :) 13:47
FROGGS .u u+F0F1
yoleaux No characters found
FROGGS .u U+F0F1
yoleaux No characters found
13:48 guru joined 13:49 guru is now known as Guest91657, Guest91657 is now known as ajr_ 13:51 sqirrel_ joined
FROGGS .u  13:51
yoleaux No characters found
13:52 hummeleB1 joined
ren1us wait, so, just for my knowledge, what is the underlying difference between "need" and "use"? 13:52
donaldh .tell [Coke] the exception from 13:55
yoleaux donaldh: I'll pass your message to [Coke].
donaldh oops
PerlJam ren1us: need loads modules but doesn't import any symbols. use will load and import symbols 13:56
13:56 atroxaper left
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 13:58 SamuraiJack left, SamuraiJack joined 14:01 atroxaper left 14:03 rurban joined
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:04
14:05 fhelmberger left
[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
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
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.
donaldh: Do you see anything obviously wrong with how I'm invoking it: 14:06
github.com/coke/perl6-roast-data/b...udo.jvm.sh
donaldh [Coke] make spectest with the evalserver runs to completion for me, with just a few failures.
14:06 thou joined 14:07 xinming left
[Coke] donaldh: I don't use 'make spectest', because I need the processing that test_summary.pl does. 14:07
can you try cloning github.com/coke/perl6-roast-data, then running:
donaldh Yep. I can do that.
[Coke] ./bin/git.p5 && ./bin/rakudo.jvm.sh ? 14:08
14:08 xinming joined
donaldh is waiting for current spectest run (currently at S32-io/other.t so not long now) 14:09
ren1us PerlJam: pastebin.com/hun012ys 14:12
Entity throws the circular module loading, once Grid tries to load it 14:13
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:16
[Coke] S15 still not available on perlcabal. :( 14:18
14:27 atroxaper joined
donaldh [Coke] yesterday's test run fell over at S06-other/main-usage.rakudo.jvm 14:28
14:28 treehug88 joined 14:30 atroxaper left, atroxaper joined
Util New RC (draft task): rosettacode.org/wiki/Sorting_algori...Cycle_sort 14:32
jnthn refrains form making a pun about bikeshedding on the algorithm... 14:35
Util :)
[Coke] Can not decode a utf-8 buffer as if it were utf-16
14:35 [Sno] left
[Coke] Yes, but what if I really want to try that. 14:35
14:36 rindolf joined
Util [Coke]: Convert to Byte buffer first, perhaps? 14:37
[Coke] Util: do you mean "Buf" ? 14:38
jnthn What's the .WHAT on the thing you have? 14:39
[Coke] it was utf8. I figured it out. 14:40
m: Blob.new("MS".encode('utf-8')).decode('utf-16') # from a facebook post by andrew whitworth 14:41
camelia ( no output )
[Coke] m: Blob.new("MS".encode('utf-8')).decode('utf-16').say # from a facebook post by andrew whitworth
camelia rakudo-moar 6dbca0: OUTPUT«卍␤»
[Coke] that seems like an appropriate amount of code to deliberately misconstrue encodings. 14:42
14:42 atroxaper left 14:43 atroxaper joined
jnthn m: say "MS".encode('utf-8').WHAT 14:44
camelia rakudo-moar 6dbca0: OUTPUT«(utf8)␤»
jnthn m: say "MS".encode('utf-8', :buf).WHAT
camelia rakudo-moar 6dbca0: OUTPUT«(utf8)␤»
jnthn Hmm, too bad.
donaldh is running perl6-roast-data and is past S06-other/main-usage.t 14:45
[Coke]: how much memory does your roast machine have?
14:48 atroxaper left
[Coke] htop says 3954MB 14:49
dalek kudo-star-daily: f26ea60 | coke++ | log/ (13 files):
today (automated commit)
rl6-roast-data: bb1bea6 | coke++ | / (3 files):
today (automated commit)
14:51 atroxaper joined
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:56
14:59 sftp_ joined, zengargoyle joined 15:01 bjz left, sftp_ is now known as sftp 15:05 denis_boyun left
[Coke] I tried rolling back your most recent commit -that didn't help 15:12
donaldh gist.github.com/donaldh/57020f86459600eedaa5 15:13
[Coke] perhaps for this machine, I cn do: -Xmx2000m -XX:MaxPermSize=200m -Xms2000m 15:14
donaldh: yes, that's about what I was seeing when I was eschewing the eval server.
donaldh you could try that. You could drop MaxPermSize to 150m too. 15:15
15:17 kaleem left
cognominal r: grammar G { token top { a } }; 'a' ~~ G 15:18
camelia rakudo-jvm 6dbca0: OUTPUT«(timeout)»
( no output )
cognominal r: grammar G { token top { a } }; say 'a' ~~ G
camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«False␤»
FROGGS r: grammar G { token TOP { a } }; say 'a' ~~ G 15:20
camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«False␤»
15:21 raiph joined 15:22 atroxaper left 15:23 igorsutton left, atroxaper joined, prevost left 15:24 atroxaper left, atroxaper joined
TimToady m: / {...} / 15:25
camelia ( no output )
TimToady m: m/ {...} /
camelia rakudo-moar 6dbca0: OUTPUT«Cannot call 'match'; none of these signatures match:␤:(Cool:D: Any $target, *%adverbs)␤ in block at /tmp/XjQOAdCOBq:1␤␤»
TimToady m: '' ~~ / {...} /
camelia rakudo-moar 6dbca0: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/p6eval/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907 (/home/p6eval/rakudo-inst-1/languages/perl6/runtime/CORE.setting.mo…»
15:28 SamuraiJack left 15:29 atroxaper left, atroxaper joined 15:31 treehug88 left 15:33 treehug88 joined 15:34 atroxaper left 15:38 zakharyas left 15:52 sqirrel_ left 16:05 fhelmberger joined 16:07 atroxaper joined 16:08 Rotwang joined 16:09 fhelmberger left 16:12 lizmat joined 16:17 ajr_ left
hoelzro hey #perl6 16:19
PerlJam greetings hoelzro 16:20
ren1us PerlJam: Did you get a chance to glance at that bit of code?
PerlJam ren1us: ah, no, sorry, I got distracted by work and other stuff. Where was it again? 16:21
ren1us pastebin.com/hun012ys
16:22 molaf_ joined 16:23 guru joined, guru is now known as Guest96033, Guest96033 is now known as ajr_
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:24
hoelzro I noticed that ufo doesn't work with the latest perl6-m =( 16:25
but I managed to fix it and submit a PR for masak's approval =)
16:25 molaf left, [Sno] joined 16:28 prevost joined
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:29
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.
I feel like there's gotta be a really easy way to do this that I'm totally missing
16:34 jsn_ joined
PerlJam Well ... why do you need PokeEnv::Entity::Entity in PokeEnv::Grid? You don't seem to be using any of its symbols 16:34
ren1us Well, right now I'm not (I will once I get past this and keep writing) 16:35
But right now I'm fighting it because of that infinite loop on say %.contents (line 59)
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:36
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:37
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
if it gets loaded more than once, we have a problem in the S11 implementation
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:40
raiph ren1us, lizmat, PerlJam, masak: what do you think of moritz++'s comments about 'need' at irclog.perlgeek.de/perl6/2014-06-12#i_8861145 ? 16:42
(I'm about to go try find the p6l dialog masak mentions there too.)
PerlJam raiph: mortiz's comments sounds like what I was thinking should happen. 16:43
raiph masak: is this the thread you mentioned? grokbase.com/t/perl/perl6-language/...references 16:44
lizmat on moar / jvm I would almost take the approach that any use statement is a Promise
because we can even have concurrency at compile time :-) 16:45
(says me, who has been guilty of starting P5 ithreads in BEGIN blocks) 16:46
the compiler should basically do a .result on the Promise (from a start block) 16:48
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.
lizmat well, we will need something like that 16:50
and it should be concurrency proof
PerlJam aye
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.
(I think anyway) 16:51
lizmat but we can't have 2 threads go off and each compile the same class A
because the globalish would trample on each other
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
(See how I push the problem over to the side a little bit? ;)
lizmat true, that could work on parrot 16:53
but on moar / jvm, we should be smarter
PerlJam indeed
You promise idea sounded nice (for need rather than use) 16:54
16:54 atroxaper left
lizmat and the more I think about it, it feels like "use" and friends should be a Promise 16:54
16:54 atroxaper joined 16:55 virtualsue joined, pecastro left
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.
lizmat well, it would have to wait until the Promise is done, of course
PerlJam sounds like deadlock to me.
jnthn Yeah but await start { foo } is just a really slow way to write foo.
lizmat I'm worried about 2 threads doing each "use Foo" 16:57
jnthn Ah
lizmat each "use Foo" would have get the same Promise
*get
jnthn Well, the easy way is making ModuleLoader be threadsafe...
lizmat yup , just a matter of smop :-) 16:58
I'll think about this some more over socializing in Paris& 16:59
16:59 atroxaper left 17:01 dakkar left
ren1us anyway, PerlJam, think that could be what's causing the "say" to lock? 17:01
PerlJam ren1us: doesn't feel likt it to me, but I dunno 17:02
17:03 donaldh left
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:06
lizmat (seems I'm not leaving for socializing yet) 17:08
the past days I've been thinking we might need an Array with only unique values
a push/unshift/assignment into such an Array, would be a noop if there is already an element with the given value 17:09
where given value would be the .WHICH of the value
would that make sense in core ?
(I'm e.g. thinking @*INC, and the list of modules being compiled) 17:10
ren1us oh dear lord i know what the problem is and it's monstrous 17:11
17:11 prevost left 17:12 ajr_ left
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:12
Inside my grid, I have a hash that matches Locations to the entity inhabitting that location 17:13
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:14
does that make sense? 17:15
basic string representation of an entity that has not been added to a grid:
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")
PerlJam lizmat: given the uniqueness constraint, why not use a Hash like P5 does with %INC?
lizmat that would be the place to know about modules already loaded 17:16
17:16 jsn_ left
lizmat I'm talking about the *ordered* list in @*INC (in p5 @INC) 17:17
17:17 virtualsue left
lizmat the list of modules being compiled, could also be a hash, I guess 17:17
PerlJam right.
lizmat although there may be information in the order as well (as in FIFO)
for preventing deadlocks 17:18
PerlJam maybe.
lizmat is waving hands
PerlJam and this hypothetical hash-or-whatever would live in all threads somehow? 17:19
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
PerlJam makes me wonder if we should have another twigil to indicate that a variable is shared across threads
lizmat no, don't go there
or you invoke the wrath of the jnthn :-) 17:21
PerlJam heh
lizmat we need to stop thinking like that
and provide primitives that won't need locking an all variable accesses
*on
socializing& 17:23
17:24 lizmat left 17:25 REPLeffect joined 17:33 jnap1 joined 17:34 jnap left 17:42 cognominal left 17:43 cognominal joined
mr-foobar very interesting talk from ndc conference on programming complexity -- vimeo.com/97408239 17:45
legacy code part is relevant to p[5-6]
17:52 raiph left, felher joined 17:57 treehug8_ joined 18:00 zengargoyle left, treehug88 left
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
currently I'm using rule TOP { <?> <A> <B> <C> }
FROGGS TOP { '' <A> <B> <C> } perhaps 18:06
18:07 itz joined
PerlJam oh, i guess I can put the ^ in the regex directly even though it's implied 18:08
(or will be because I use .parse) 18:09
18:10 prevost joined
PerlJam (but, in general, if the rule weren't TOP, the idiom would be to insert some zero width thingy) 18:10
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:15
18:16 prevost left, telex left
FROGGS try call_that_function(); do more stuff...; CATCH { } 18:18
[Coke] donaldh: arglebargle.
18:18 telex joined
[Coke] ok, trying the new incantation. 18:19
ChoHag If I put try in front the CATCH is just ignored. 18:22
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.
FROGGS m: try 42.barg; say "yeah"; CATCH { default { say "gotcha" } } 18:24
camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
FROGGS m: try 42.barg; say "yeah"; CATCH { default { say $! } }
camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
FROGGS m: { try 42.barg; say "yeah"; CATCH { default { say $! } } }
camelia rakudo-moar 6dbca0: OUTPUT«yeah␤»
FROGGS hmmm
m: 42.blarg
camelia rakudo-moar 6dbca0: OUTPUT«No such method 'blarg' for invocant of type 'Int'␤ in block at /tmp/0i5ik61W4t:1␤␤»
segomos_ r: sub fun { die "error"; }; try { fun; CATCH { "caught".say; } };
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; } } };
camelia rakudo-moar 6dbca0: OUTPUT«caught␤»
FROGGS m: my $thingy = try 42.barg; say "yeah"; say $thingy.WHAT 18:26
camelia rakudo-moar 6dbca0: OUTPUT«yeah␤(Any)␤»
segomos_ m: sub fun { die "error"; }; try { fun; } say 'caught';
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling /tmp/zLo5Rra__6␤Two terms in a row␤at /tmp/zLo5Rra__6:1␤------> sub fun { die "error"; }; try { fun; } ⏏say 'caught';␤ expecting any of:␤ argument list␤ …»
segomos_ m: sub fun { die "error"; }; try { fun; }; say 'caught';
camelia rakudo-moar 6dbca0: OUTPUT«caught␤»
18:39 pecastro joined 18:40 raiph joined
PerlJam r: say DateTime.new( :year("2014") ); 18:50
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!===␤Must provide arguments to DateTime.new()␤»
..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␤␤»
..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 …»
PerlJam r: say DateTime.new( :year(2014) ); 18:52
camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«2014-01-01T00:00:00Z␤»
PerlJam so, that error message is LTA because I *did* provide arguments to DateTime.new() 18:53
[Coke] donaldh: new settings didn't work either. 18:56
18:58 rindolf left 19:01 Pleiades` left 19:02 carlin left, pochi joined 19:03 virtualsue joined 19:05 _sri joined 19:06 Pleiades` joined 19:10 zengargoyle joined
masak raiph: yes, that's the thread. 19:11
TimToady++ # "Multiple passes introduce linguistic race conditions" 19:21
vendethiel writes that one down 19:32
So, how does one prepare slides ?
vendethiel decides instead to lie down and cry a lot. 19:37
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.
jnthn What will you have there? 19:40
[Coke] vendethiel: what OS?
jnthn You can always get powerpoint to spit out a PDF...
[Coke] will you have internet?
vendethiel [Coke], jnthn: "no clue, lol".
cognominal yes, he will
vendethiel Won't be my computer. But I expect I'll have internet, yes
[Coke] google presentation is ok. 19:41
(docs.google.com)
19:41 ren1us left
vendethiel cognominal: I don't know *when* I'm doing it, though 19:41
cognominal Saturday
vendethiel yea, that I get. 19:42
cognominal you have elbeho's phone number...
timotimo presentation about what?
vendethiel timotimo: no clue 19:43
cognominal: well, I thought he'd contact me
cognominal well tomorrow, everyone will be back on line, so you will be able to ask 19:44
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
gist.github.com/cognominal/e8cd38a610a735a503ec
19:47 hoverboard joined 19:54 darutoko left
masak 'night, #perl6 20:06
[Coke] ~~ 20:07
20:07 alpha- joined, alpha- left 20:08 ren1us joined 20:10 zengargoyle left 20:11 ftech joined 20:17 modcure joined
modcure looks around wondering when Perl 6 will be aviable 20:17
vendethiel `Mu`s modcure 20:18
20:18 eMBee joined, DarthGandalf joined, DarthGandalf left
jnthn modcure: rakudo.org/downloads/star/ 20:18
20:19 SevenWolf joined
jnthn m: say "or, I'm right here!" 20:19
camelia rakudo-moar 6dbca0: OUTPUT«or, I'm right here!␤»
20:20 DarthGandalf joined
sjn will there be another rakudo* release soon? 20:20
jnthn Later this month, I expect.
FROGGS sjn: when we fix the issues before the compiler release next thursday yes
sjn ok
jnthn The last compiler release unfortunately had some issues with some modules (on some systems?), iirc. 20:21
20:21 hoverboard left, hoverboard joined
jnthn will try out the Star modules on latest over the weekend. 20:21
20:22 raiph left 20:23 hoverboard left
ChoHag How does perl 6 deal with circular references? 20:28
jnthn ChoHag: You mean, with data structures? 20:30
ChoHag Yes. 20:31
Instance of class A has a reference to instance of class b and vice versa.
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:33
ren1us It does cause an infinite loop on .perl calls, though 20:35
20:36 kaare_ left
jnthn Yeah. 20:36
That's a higher level issue. :)
modcure if someone had to guess... when do you think Perl 6 will be production ready? 20:37
modcure hides
vendethiel modcure: define "ready" :). I've only been here for, like, 3 months, and I'm already using it
For my CLI stuff
segomos_ i use it for cli ETL stuff.. 20:38
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... :)
FROGGS so it will be production ready for me when somebody writes such a module
20:40 molaf_ left
vendethiel jnthn: is there a C# grammar :) ? 20:41
jnthn vendethiel: No, though there was a partial TSQL one...
20:41 SAAAX0R joined
jnthn I think in general, people are already productively using Perl 6 for smaller bits. 20:41
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:42
vendethiel you are 20:43
FROGGS yes, speed would not be an issue for me anymore
segomos_ the http async server thing i'm writing is looking good so far, it is pretty quick too
jnthn Nice :) 20:45
20:46 hoverboard joined
ren1us off topic: how does a hash determine key equivalance, assuming the key type isn't a string? 20:46
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
(Behind === is .WHICH, which you aren't meant to use directly...)
segomos_ the 'ab' test with concurrency = 50 i get 90% of responses back in 1s
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
that's unfortunate
jnthn ren1us: Oh, I misplained. You can implement WHICH. 20:49
ren1us: I just meant that using it for comparisons themselves is sometimes done, which === is the operator that does the right thing.
ren1us jnthn: Marvelous, thanks :). jnthn++ 20:51
segomos_ can you use a hash as a key for a hash? 20:52
jnthn Not sanely, 'cus Hash is not a value type. 20:53
Generally, using anything mutable as a Hash key is a bad idea.
20:54 Rotwang left
segomos_ i know it's a bad idea but it could be interesting from just an exploring pov 20:56
you could end up with slow mongodb in memory 20:57
jnthn I thought that mongodb was about losing your data while going really fast :P 21:00
moritz aye, slowly losing data is boring 21:02
jnthn Well, if you go slowly enough you can flush it to disk *before* saying, "yeah, I stored it" :) 21:03
afk for a bit...been hammering out code all day for a $dayjob thing :) 21:04
segomos_ lol 21:07
21:07 spider-mario left
xfix I wonder how Python implements repr(). It doesn't have a problem with recursive objects. 21:10
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.
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 21:16 Mouq joined
Mouq o/ 21:16
yoleaux 11 Jun 2014 05:31Z <FROGGS_> Mouq: no, not really. need to fix that
Mouq FROGGS: Ok, thx 21:17
xfix ReprEnter and ReprLeave. This is a hack... 21:18
FROGGS everything is a hack
21:18 denis_boyun_ joined
timotimo global state could in this case be done with a dynamic variable 21:20
the outermost .perl would set it only if it doesn't exist yet
and then ìt'd fall out of the scope automatically
ren1us m: ObjAt.new(:val("test")); 21:22
camelia ( no output )
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?
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
ren1us like, there's no purpose to it (i did it as a fiddling exercise), but it still shouldn't be segfaulting, should it?
Mouq ren1us: Did you do it in the REPL? 21:23
ren1us Mouq: yup 21:24
Mouq ren1us: I get an error only if I try to &say it
ren1us: Well, and if I do it in the REPL 21:25
ren1us > ObjAt.new(:val("test")); 21:26
Segmentation fault (core dumped)
^ exactly what I'm getting
xfix It seems that Python 3 also provides @recursive_repr decorator.
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:30 itz left 21:36 kivutar left
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:38
timotimo is ObjAt even implemented? 21:42
ren1us Considering it's the return type for .WHICH, i would hope so 21:43
jnthn r: say ObjAt
camelia rakudo-{parrot,jvm,moar} 6dbca0: OUTPUT«(ObjAt)␤»
jnthn :)
xfix r-m: kill 11, $*PID
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling /tmp/VngAPTwja7␤Undeclared routine:␤ kill used at line 1␤␤»
xfix So, I cannot segfault Perl 6 this way...
ren1us I'll file a bug in a few minutes, then. 21:44
timotimo thank you for bug reporting :)
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␤␤»
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:47 dmol left
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
21:50 treehug8_ left
Mouq m: set(1,42,"test").WHICH.say 21:50
camelia rakudo-moar 6dbca0: OUTPUT«Set|Int|1 Int|42 Str|test␤»
ren1us man, i've got a knack for breaking things lately 21:51
21:53 BenGoldberg joined, denis_boyun___ joined 21:55 denis_boyun_ left, ftech left 22:09 FROGGS left
ChoHag Sorry jnthn thanks that's what I was after. 22:13
I had to persuade my daughter to bathe and enbed herself.
22:14 lizmat left, lizmat joined
dalek kudo/nom: e9e842a | (Timo Paulssen)++ | src/core/MixHash.pm:
forgot to :w a file
22:15
Mouq xfix: Feel free to implement recursion-safe .perl, if you need a project :)
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?
short of an EVAL 22:16
Mouq cognominal: github.com/moritz/json/blob/master...iny.pm#L27
...Except the opposite? 22:17
cognominal ok, so you do it manuallt.
Nice anyway.
dalek ast: 5a80ef9 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
Fix for timotimo++ 's fixes
22:18
Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '\' ~ $0; say $str 22:19
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling /tmp/UZGiYgFOiO␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/UZGiYgFOiO:1␤------> s:g[ \\ (.) ] = EVAL '\' ~ $0; say $str⏏<EOL>␤ expectin…»
Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '\\' ~ $0; say $str
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling eval_0␤Undeclared routine:␤ n used at line 1␤␤»
Mouq Oh
m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '"\\$0"'; say $str
camelia rakudo-moar 6dbca0: OUTPUT«a$0b␤»
Mouq m: my $str = 'a\nb'; $str ~~ s:g[ \\ (.) ] = EVAL '"\\'~$0~'"'; say $str
camelia rakudo-moar 6dbca0: OUTPUT«a␤b␤»
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 Pleiades` left
cognominal Ho, doing it escaped char by escaped char is safe indeed 22:22
Mouq++
that's the time of day I don't think straight anymore :( 22:23
22:24 zengargoyle joined
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
lizmat isn't there some internal hash for that already? 22:25
cognominal Nope.
22:25 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
cognominal lizmat: my question could have been better reformulated. Can I directly access the quote language from Perl 6? 22:26
maybe with a use Whatever:from<nqp>
Mouq m: given "interpolate" { say 'Single \wq[uotes don't $_], right?' } 22:27
lizmat perhaps, I wouldn't know offhand :-(
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling /tmp/le3ohlsKVl␤Two terms in a row␤at /tmp/le3ohlsKVl:1␤------> nterpolate" { say 'Single \wq[uotes don'⏏t $_], right?' }␤ expecting any of:␤ postfix␤ in…»
Mouq m: given "interpolate" { say 'Single \qq[uotes don't $_], right?' }
camelia rakudo-moar 6dbca0: OUTPUT«Single uotes don't interpolate, right?␤»
lizmat timotimo: no, thank you for fixing my "" booboos 22:28
:-)
(doing them twice, so that the tests were also wrong)
22:29 denis_boyun___ left
Mouq cognominal: github.com/jaffa4/perl6parsing/ don't know how usable it is 22:29
22:29 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
jnthn If you really want to not even interpolate the \q quote-language switcher, use Q 22:29
lizmat FWIW, S02:631 states that .WHICH doesn't necessarily needs to be an ObjAt 22:30
synopsebot Link: perlcabal.org/syn/S02.html#line_631
lizmat specifically for value types such as Set
m: <a b c>.Set.WHICH.WHAT.say
camelia rakudo-moar 6dbca0: OUTPUT«(Str)␤»
lizmat m: <a b c>.SetHash.WHICH.WHAT.say
camelia rakudo-moar 6dbca0: OUTPUT«(ObjAt)␤»
lizmat since SetHash is mutable, it *does* return an ObjAt 22:31
timotimo is working on mixing in an annotations hash into qast nodes
Mouq jnthn: Yep, but cognominal wants to interpolate backslashes. I don't think there's a Q:b-but-not-\q
22:31 logie left
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
jnthn Mouq: ah, true
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:32
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?
camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
22:34 logie joined
Mouq cognominal: :) /me just happens to remember stuff entered in perl6/ecosystem commits 22:34
22:34 woolfy joined, Pleiades` joined
lizmat m: my %h; %h<a>=%h; %h.gist # same for .gist, by the way 22:37
camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
lizmat m: my %h; %h<a>=%h; %h.Str # and .Str by the way 22:38
camelia rakudo-moar 6dbca0: OUTPUT«(timeout)»
Mouq m: my %h; say "(my \%$_; \%$_ = a => \%$_)" given %h.WHICH.trans('|' => '-')
camelia rakudo-moar 6dbca0: OUTPUT«No such method 'trans' for invocant of type 'ObjAt'␤ in block at /tmp/_9cpFHMyRf:1␤␤»
Mouq m: my %h; say "(my \%$_; \%$_ = a => \%$_)" given %h.WHICH.Str.trans('|' => '-')
camelia rakudo-moar 6dbca0: OUTPUT«(my %Hash-140662670062872; %Hash-140662670062872 = a => %Hash-140662670062872)␤»
Mouq Not the *most* readible representation
Mouq is very distractable tonight 22:40
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
*level
jnthn Mouq: Hey, look at that juggling squirrel!
lizmat rather than in each .perl separately
a bit like each .perl / .gist method would need to be automatically wrapped 22:42
at compile time
Mouq Seems legit www.youtube.com/watch?v=PZJl08pJrY0 22:44
lizmat: A wrapper of some kind would probably be for the best, yeah
lizmat perl5's approach:
$ perl -MData::Dumper -E 'my %h; $h{a}=\%h; say Dumper(\%h)'
$VAR1 = {
'a' => $VAR1
};
m: my %h = ( a => %h ) 22:46
camelia ( no output )
lizmat hmm....... sort of expected that to fail at compile time
jnthn The variable is declared by then. 22:50
lizmat cool 22:51
$ perl -MData::Dumper -E 'my %h=(a=>\%h); say Dumper(\%h)' 22:52
$VAR1 = {
'a' => {}
};
jnthn The one that you may be thinking of is
m: my %h is foo(%h); 22:53
camelia rakudo-moar 6dbca0: OUTPUT«===SORRY!=== Error while compiling /tmp/G4a3jqt8yI␤Variable '%h' is not declared␤at /tmp/G4a3jqt8yI:1␤------> my %h is foo(%h⏏);␤ expecting any of:␤ postfix␤»
lizmat yup, we still need to fix that :-)
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.
I don't think we can fix it.
Or it'll be a "fix"
As in, probably useless
lizmat well, several traits expect $_ to be set to the thing being defined 22:54
my $dbh will leave { .disconnect }
jnthn That is even more troublesome
Because it expects to be getting a particular instance of the variable. 22:55
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.
In the will leave { ... } case, that isn't the case.
Just imagine a recursive function with that line in to see the difference. :)
dalek c: 831e954 | Mouq++ | / (4 files):
Change Perl 6 scripts to *.p6

This avoids confusion due to the Perl 5 app.pl
  ...though perhaps it would be more apt, in a Perl 6 project, to instead
rename app.pl to app.p5 ;)
22:58
22:59 rurban left
vendethiel pl6; no ? 23:01
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: perlcabal.org/syn/S04.html#line_1914
23:03 virtualsue left
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
vendethiel: They are both listed here, if that makes any difference: github.com/github/linguist/blob/ma....yml#L1588 23:05
vendethiel alrighty :)
Mouq vendethiel++ :)
vendethiel Mouq++ # laziness
Mouq laziness++ 23:06
23:15 hoverboard left
TimToady "because it expects a particular instance of a variable" sound a lot like closure to me 23:16
*sounds
ChoHag How do you do 'if ($foo =~ /b(a)r/) { say "$1" }" in perl 6?
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:17
23:18 woolfy left
lizmat looks like that logic lives in nqp::where 23:20
m: say nqp::where(1); say nqp::where(2)
camelia rakudo-moar 6dbca0: OUTPUT«139787284353680␤139787284353640␤»
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 :)
jnthn Not really, I'm afraid.
Hm, or could you :) 23:22
I guess you *could* pre-allocate space for it in gen2, and keep its address in a hash table...
It's a bit of a hack :)
And has some threading concerns. 23:23
But plausible.
lizmat would changing from nursery to gen2 cause .WHICH to change at the moment?
Mouq ChoHag: if $foo ~~ /b(a)r/ { say ~$0 }
23:23 Ben_Goldberg joined
jnthn lizmat: Yes 23:24
23:24 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
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 ?
Mouq ChoHag: or if $foo ~~ m/b(a)r/ { say "$/[0]" }
lizmat jnthn: you mean BagHash, no? because Bag is immutable / value based 23:25
jnthn lizmat: uh, yes
Sorry, tired :)
lizmat know the feeling 23:26
jnthn lizmat: Yeah, makes sense of course, the devil's in how we do it :)
TimToady automatically move to gen2 when they call .WHICH? 23:27
lizmat nqp::where I guess (instead of .WHICH )
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
lizmat: I think nqp::where should continue meaning "actual memory address"
lizmat: .WHERE is meant to return that anyway
lizmat: And we introduce some kind of nqp::which for the other thing. 23:29
lizmat ok, will dream about that tonight :-)
catching some sleep now, FPW tomorrow
good night #perl6! 23:30
jnthn 'night, lizmat++
Enjoy FPW!
lizmat bien sur!
23:30 lizmat left
cognominal bien sûr? 23:31
vendethiel Still need to decide what I'll use for my slides.
Maybe reveal.js, would be easier I guess
jnthn used that recently 23:32
It worked
Though I was generating it.
Mostly.
TimToady
.oO(drei ecken hat mein hut)
jnthn Anyways, time for some rest...'night
vendethiel jnthn: I know it from you ;)
TimToady o/
vendethiel I wonder if I should use the website or not 23:33
let's do that. 23:34
vendethiel starts writing 23:35
cognominal ?
cognominal oui?
vendethiel pour les slides, en français ou en anglais ? 23:36
cognominal En français
But you do whatever you want. We trust you to do the best. 23:37
Anyway, Jérôme said you could do without slides. 23:39
vendethiel Mmh :/. I'm not really sure. And it's gonna be 20 minutes... 23:50
23:52 jack_rabbit joined