»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
daniel-s you know what, it is my experience that IRC is generally quite a violent place 00:00
what with all the trout slapping and needing to duck after a comment 00:01
00:01 Trashlord left
sorear I'm thinking I should stop putting off unification 00:05
it's pretty clearly needed and my workaround is getting more and more unpleasant 00:06
00:09 daniel-s left 00:13 whiteknight joined 00:27 daniel-s joined 00:29 daniel-s left 00:41 whiteknight left 00:45 whiteknight joined
colomon flussence: I have a big block of C++ code that does basically exactly that to hash geometry objects -- serialize them to a string and then hash that string. 00:50
00:57 Dzzy left 01:01 noganex_ joined 01:02 noganex left 01:04 whiteknight left 01:06 whiteknight joined 01:08 ggoebel left 01:10 nymacro joined
TiMBuS wouldnt it be easier just to use their memory address or something 01:11
bad idea probably, if the GC moves 01:12
01:13 ggoebel joined, ajoe47 left
colomon TiMBuS: the whole point (at least for my code) was that two identical objects with different addresses had to hash to the same thing. 01:16
TiMBuS ah. well then yes. it all depends on the use
01:21 ggoebel left 01:22 mberends left 01:28 starboarder2001 joined
TimToady that's why we differentiate value semantics from object semantics, it all comes down to eqv vs === 01:37
and object semantics must not be GC sensitive
it shouldn't matter if a GC happens in the middle of === 01:38
and it shouldn't change the hash of the .WHICH either
lichtkind good night 01:39
o/
TimToady \o
colomon o/
lichtkind :)
01:39 lichtkind left
TimToady biab & 01:39
01:55 starboarder2001 left 02:04 cooper joined 02:12 mberends joined
pmichaud nom: say Mu, Nil, [3,4,5], (3,4,5); # checking 02:13
p6eval nom: OUTPUT«Can only use get_who on a SixModelObject␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
pmichaud oops
nom: say Mu, [3,4,5], (3,4,5); # checking
p6eval nom: OUTPUT«Mu()3 4 5345␤»
pmichaud \o/ # maybe
TimToady: tests and reactions welcomed. :-) 02:14
afk for a bit -- dinner
TimToady looks pretty good, but also looking for dinner... 02:18
02:19 daniel-s joined 02:54 whiteknight left 03:05 Chillance left 03:07 envi_laptop joined 03:18 bkolera left 03:23 Su-Shee_ joined 03:27 Su-Shee left 03:35 zostay joined, zostay left 03:37 ggoebel joined 03:56 dukeleto left 03:57 dukeleto joined 04:01 daniel-s left 04:12 mish joined 04:13 mish left 04:25 kaare_ joined 04:44 zostay joined 04:45 bkolera joined 05:18 Pain joined 05:19 Pain left
dalek kudo/nom: cd87a74 | pmichaud++ | / (4 files):
Add preliminary Range and RangeIter type.
05:40
kudo/nom: f1e984a | pmichaud++ | src/Perl6/Actions.pm:
Bit of a cheat to get Inf/+Inf/-Inf/NaN working again.
kudo/nom: 33c6b6c | pmichaud++ | src/core/ (2 files):
Initial version of 1..* ranges.
kudo/nom: a56af91 | pmichaud++ | / (4 files):
Add Nil handling.
kudo/nom: dac61a3 | pmichaud++ | src/core/ (8 files):
First pass at handling infinities in lists and ranges.
kudo/nom: 729c703 | pmichaud++ | src/core/List (2 files):
More infinity updates to List.
kudo/nom: b723c37 | pmichaud++ | src/core/ (3 files):
Handle infinite lists in join (experimental). Important for when the repl
kudo/nom: 03dfac0 | pmichaud++ | src/core/GatherIter.pm:
Add a temporary :infinite flag to GATHER, for experimentation

  :infinite will likely be replaced by some other marker -- this
is just for evaluation.
kudo/nom: 9866597 | pmichaud++ | src/core/List.pm:
Implement infix:<xx>.
05:59 mberends left, nymacro left 06:06 am0c joined 06:17 cyk left 06:22 am0c left 06:23 wamba joined 06:40 am0c joined 06:41 wamba left 06:42 cooper left 06:43 kaare__ joined 06:44 kaare_ left 06:45 mberends joined 06:57 daniel-s joined 07:03 wamba joined 07:08 _twitch joined 07:14 daniel-s left, c9s_ joined 07:16 xinming left 07:18 xinming joined 07:22 Su-Shee_ is now known as Su-Shee 07:29 muixirt joined
muixirt good morning, is there any docs/spec for nqp other than its source code? 07:32
mberends hi muixirt, there are no nqp docs afaik. Depending on what you need, the test suite might be useful. 07:35
muixirt mberends: ok 07:40
07:43 dukeleto left, dukeleto joined, dukeleto left 07:44 dukeleto joined, dukeleto left 07:45 dukeleto joined, dukeleto left, dukeleto joined, dukeleto left 07:46 dukeleto joined, dukeleto left 07:47 dukeleto joined, dukeleto left, dukeleto joined, dukeleto left 07:48 dukeleto joined
TBA2 morning #perl6 07:53
sorear out 07:59
08:03 cosimo joined
TBA2 if i do $x.split(/ $y /), does that treat $y as a regex or a string? 08:04
perl6: my $a = "test"; my $b = "es"; print $a.split(/ $b /); 08:05
p6eval rakudo 248244, niecza v6-177-g365e216: OUTPUT«tt»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
TBA2 rakudo: my $a = "test"; my $b = "es"; print $a.split(/ $b /);
p6eval rakudo 248244: OUTPUT«tt»
TBA2 rakudo: my $a = "this is a test"; my $b = " "; print $a.split(/ $b /); 08:11
p6eval rakudo 248244: OUTPUT«thisisatest»
08:19 cosimo left, am0c left 08:34 tokuhirom left, tokuhirom joined
moritz good morning 08:36
rakudo: my $a = "this is a test"; my $b = " "; print $a.split($b).perl
p6eval rakudo 248244: OUTPUT«("this", "is", "a", "test")»
moritz rakudo: my $a = "this is a test"; my $b = " "; print $a.split(/ $b /).perl
p6eval rakudo 248244: OUTPUT«("this", "is", "a", "test")» 08:37
TBA2 morning moritz 08:40
moritz good morning
TBA2 seems rakudo treats it as a string, im sure expected behaviour is regex? one of the synopses seems to imply i need to use $::b to treat it as a plain string?
just rereading S05, looks like its doing the right thing for a string scalar 08:42
moritz well, / $b / should be the same as / ' ' /, and it is
TBA2 when i was playing around with some earlier i was starting to think the opposite was true, turned out to be one of those red herring things again :p 08:43
moritz and .split() has two forms, one taking a regex, one taking a string as delimiter
09:02 donri left 09:05 rjerrin1 joined, VXZ joined 09:11 scottp left 09:12 spetrea joined
spetrea I'm writing an ecmascript parser in Perl5 09:13
using Parse::Yapp
09:14 scottp joined
spetrea I saw an article about writing parsers using Parse::Eyapp, it was explaining how to write a parser for an inifile grammar using Parse::Eyapp and producing PIR code to use it inside Parrot 09:16
"Parsing Strings and Trees with Parse::Eyapp" it was called 09:17
I'd like it if there were more articles like that around
I can learn a lot from those
does Perl6 offer some kind of Parse::Yapp equivalent ?
TiMBuS ermm 09:21
you mean like, grammars
or do you mean ast building stuff 09:22
moritz well, grammars are built-in
TiMBuS yeah which is why im not sure what he means exactly
09:22 _twitch left
TiMBuS unless he didnt know perl6 had awesome grammars builtin 09:22
moritz of course there's still the opportunity to write other parsing modules for Perl 6 09:24
spetrea ok grammars are builtin 09:28
what kind of parsers can I write
LL(1), LL(*), LALR ... etc etc ? 09:29
what algo does Rakudo's implementation of grammars use
I'd gladly switch my implementation of the ECMAScript parser to Perl6 09:31
muixirt spetrea: what's the purpose of that parser? 09:34
spetrea muixirt: parse javascript, generate call graphs and event graphs(like having event E , making a graph of all places that event can be fired from and drawing that graph) 09:35
that's the purpose :) 09:36
TiMBuS im pretty retarded so, im gunna say its a recdescent parser, and I can't tell you which 'type' of parser it is =/
spetrea anyway here's the current grammar I wrote github.com/wsdookadr/qx-parser/blo...grammar.yp
09:37 jaldhar left, broquaint left
spetrea moritz: ? 09:38
moritz: any benchmarks of Rakudo's grammars against yacc,bison,lemon parser, Parse::Yapp from Perl6, Parse::Eyapp from Perl5, ANTLR ?
TiMBuS benchmarks in speed? because i can tell you which is faster without doing all that 09:40
(hint: not rakudo)
09:44 xinming left
TiMBuS www.perlmonks.org/?node_id=530779 thats what i was looking for 09:45
spetrea TiMBuS: looking
moritz spetrea: currently everything you do in rakudo is two or three orders of magnitudes slower than what you do in perl 5 09:49
(we're working on speeding it up) 09:50
spetrea moritz: so, is it hard to optimize stuff ? 09:52
moritz spetrea: what stuff?
spetrea moritz: I dunno, I don't know something in particular that's slow in Rakudo
TiMBuS all of it
09:52 lewanmi1 joined
TiMBuS bahaha. but seriously 09:52
09:53 lewanmi1 left
moritz spetrea: well, the current optimization work involves a totally new object system under the hood 09:53
which is why it takes some considerable effort
TiMBuS not to mention parrot is working on replacing its entire internals, and still needs a working jit backend 09:55
spetrea moritz: but are you 100% sure that current rakudo implementation is the bottleneck and not Parrot ?
is there a mature, industrial-level language implementation in Parrot ? like java is for the jvm(sorry for the example, I don't know a better one, I hate java too) 09:57
TiMBuS bottleneck is a misleading term, but id probably say yes, rakudo is the slower part
spetrea TiMBuS: well , what I mean is.. is rakudo's implementation generating not-so-fast parrot code, or is parrot not that fast at executing whatever rakudo is generating ? 09:58
TiMBuS its completely unoptimized across the entire field :D 09:59
10:01 tokuhirom left
TiMBuS but rakudos current object model wastes a lot of time. that, i am sure of 10:02
10:06 tokuhirom joined
muixirt would it be unfair to say that parrot provides high level but slow building bricks for dynamic languages but often they are a mismatch for any concrete language and therefor language devs have to work around the problems with the result that compilers are awful slow? 10:07
10:09 tokuhirom left
TiMBuS muixirt, it does seem that way 10:10
but i think parrot devs knew that some time ago, and expected most languages to make most (all?) of their own PMC's etc
muixirt it's not only a problem of rakudo but of other parrot based languages like lua too (at least is was some months ago) 10:11
10:11 tokuhirom joined
TiMBuS and when M0 comes around that should all be a bit better. hopefully. maybe? idk. ill just trust whiteknight 10:11
10:11 xinming joined
TiMBuS www.jnthn.net/papers/2011-yapc-russia-rakudo.pdf spetrea, this should be pretty a good read for you 10:13
a very convincing argument for what i was saying about the current model being.. not so optimal 10:14
TBA2 a question for #perl6 - how do you remove solid cement/plaster/paint/glue from a blocked drain? answers in p6 plz :) 10:15
muixirt top 10:17
VXZ a really nasty regular expression? 10:18
TBA2 s/drain-crap/clean-air/? 10:20
TBA2 wishes it were that simple
VXZ idk about anyone else, but I became a programmer so I wouldn't have to be bothered by mundane things like laws of the physical universe... 10:22
TiMBuS NaCl ==> sink()
uh
NaOH
TBA2 hm, will it dissolve cement? seems it can dissolve aluminium though lol 10:26
HCI maybe?
VXZ: wish i could ignore the laws of physics, sadly, when i switch on my washing machine i get to go swimming :/ 10:28
TiMBuS sounds like a perk 10:29
TBA2 lol, $dodgy_wiring + $flooding != life() 10:31
10:32 muixirt left
spetrea so Lua also has an implementation in Parrot 10:35
I wonder how those guys feel about parrot
moritz spetrea: the problem with rakudo's speed is three-fold: 1) there's an impedance mismatch between perl6 and parrot 2) parrot itself isn't too fast and 3) rakudo doesn't do any optimizations yet
10:36 whiteknight joined
spetrea what's rakudo's parser written in ? 10:36
moritz Perl 6
TBA2 4) rakudo bugs sometimes require writing "slower" code
spetrea there must be some minimal part of Perl6 that is first implemented, so that you can bootstrap I guess 10:37
moritz yes
that part is called "nqp" (Not Quite Perl 6)
which was bootstrapped with the previous grammar engine and compiler toolkit 10:38
that's the part that implements the grammar engine 10:39
VXZ TBA2: maybe you shouldn't switch on your washing machine? 10:52
TiMBuS the richard stallman approach 10:54
hmm. kinda distasteful..
VXZ what? you have someting against washboards? 10:55
10:56 daniel-s joined 11:06 rjerrin1 left
TBA2 VXZ: could always go naked, no washing to do (except perhaps towels, and i can wash those in the shower with me!) 11:10
daniel-s how long does rakudo take to build 11:27
moritz daniel-s: that depends very much on how much RAM you have available, and how fast your machine is 11:28
daniel-s: if you less than 1G of ram available, compiling the setting is kinda slow 11:29
daniel-s I'm building it on my netbook
11:30 lichtkind joined 11:32 icwiener joined, HarryS left, mj41 joined
daniel-s I thought it was done... 11:36
it was just the configure script :( 11:37
11:42 mj41 left, Holy_Cow joined
TBA2 if your short on ram it might not compile at all, was using a VM a few months back that only had 256mb assigned and make kept failing (out of memory), was forced to increase to 512mb minimum 11:42
11:43 Holy_Cow left
daniel-s this thing has 1GB 11:49
I think it's done
make test seems ok after ~5 or 6 11:50
:)
11:52 cognominal_ left 11:54 cognominal joined 11:56 jedai left 12:04 dorlamm joined 12:07 orafu left, orafu joined 12:10 Chillance joined 12:14 jedai joined 12:29 jedai left 12:49 icwiener_ joined 12:50 icwiener left
pmichaud good morning, #perl6 13:01
13:01 woosley joined
daniel-s pmichaud: o/ 13:02
13:02 dorlamm left
pmichaud rakudo: say ((1,2) xx 4).perl 13:03
p6eval rakudo 248244: OUTPUT«((1, 2), (1, 2), (1, 2), (1, 2))␤»
pmichaud rakudo: my @a = (1,2,3) xx *; say @a[15]; 13:07
p6eval rakudo 248244: OUTPUT«(timeout)» 13:08
pmichaud nom: my @a = (1,2,3) xx *; say @a[15];
p6eval nom: OUTPUT«1␤»
pmichaud \o/
13:09 Moukeddar joined 13:10 bkolera left 13:11 Moukeddar left 13:12 icwiener_ left
moritz nom: my @a = (1,2,3) xx *; say @a[14]; 13:13
p6eval nom: OUTPUT«3␤»
moritz \o/ indeed
pmichaud nom: my @a = (1,2,3) xx *; say @a[1500];
p6eval nom: OUTPUT«1␤»
13:14 icwiener joined
jlaire nom: my @a = (((0,1) xx *) xx *) xx *; say @a[1000 .. 1007] 13:14
p6eval nom: OUTPUT«Method 'Numeric' not found for invocant of class 'Range'␤current instr.: 'infix:<+>' pc 165728 (src/gen/CORE.setting.pir:41941) (:1478)␤»
pmichaud don't have slices yet 13:15
maybe I'll add that now.
jlaire oh, ok
nom: my @a = (0,1) xx *; say @a[1000], @a[1001], @a[1002], @a[1003]
p6eval nom: OUTPUT«0101␤»
13:15 JimmyZ joined
jlaire nom: my @a = (((0,1) xx *) xx *) xx *; say @a[1000], @a[1001], @a[1002], @a[1003] 13:15
p6eval nom: OUTPUT«0101␤»
13:31 kanishka joined 13:33 satyavvd joined, woosley left 13:34 mj41 joined 13:36 wamba left 13:43 satyavvd_ joined 13:45 satyavvd left 13:51 kanishka left, cognominal_ joined
JimmyZ good evening, #perl6 13:52
13:53 wamba joined 13:54 cognominal left 14:04 wamba left 14:09 satyavvd_ left
dalek kudo/nom: af53013 | pmichaud++ | src/core/Any.pm:
Interim implementation of list slicing syntax (full implementation
14:09
14:32 MayDaniel joined, jedai joined 14:45 mj41 left
lichtkind is in rakudo still done this way: "$filename.IO ~~ :X? 14:46
14:47 ajoe47 joined 14:57 kst left, kst joined 15:01 tokuhirom left 15:12 MayDaniel left, Crytel joined 15:13 jaldhar joined 15:14 Crytel left 15:24 daniel-s left
dalek kudo/nom: f131ee4 | pmichaud++ | NOMMAP.markdown:
Update NOMMAP.markdown.
15:32
15:38 muixirt joined
muixirt every time one runs a script the Perl 6 setting has to go through the parser (in rakudo)? 15:41
pmichaud muixirt: no. 15:42
the setting is compiled into the rakudo .pbc
muixirt probably misunderstood docs/architecture.svg 15:43
15:44 ggoebel left
moritz well, it only shows which stages it goes through, not when 15:44
muixirt moritz: is it me or is it a teeny bit misleading? 15:47
15:48 thou joined 15:49 ggoebel joined
pmichaud I can see that it's somewhat misleading, yes. 15:49
15:51 cooper joined 15:56 whiteknight left 15:57 ggoebel left 15:58 whiteknight joined
dalek kudo/nom: 5b34d7c | pmichaud++ | src/core/ (4 files):
Operator reorganization part 1: Start moving the boolean/numeric/any operators into appropriate locations. (Stringy will come next.)
15:58
16:00 Trashlord joined
thou hello, #perl6! 16:09
so, i have a question about the pseudo-example in S06:2739: my &old_thermo := &thermo; &thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) } # Shouldn't that be normal assignment to &old_thermo, otherwise the assignment to &thermo would affect &old_thermo as well? 16:16
16:22 JimmyZ left 16:24 JimmyZ joined
pmichaud thou: I think that := binds to the value, not to the container. 16:27
...although that's not what S03 currently says. Let me check further. 16:28
thou okay.
pmichaud correct, &old_thermo would be bound to the container. 16:32
(based on latest discussions I have at present.)
more likely is that &thermo = sub should be a binding instead of an assignment 16:33
i.e., &thermo := sub ...
thou there's a mention just after that example: Note that &thermo.WHICH stays the same after the .wrap, as it does with the equivalent assignment shown since assignment to a Routine works like a container, changing the contained do property but not the container itself. 16:34
pmichaud yeah, looking at that now
JimmyZ nom: my $a = 3; my $b := $a; say $b; $a = 4; say $b; # just looks like this one
p6eval nom: OUTPUT«3␤4␤»
pmichaud well, not exactly like that one. Assignment to routines is 'special' 16:35
(according to the spec)
thou i am, personally, feeling quite certain that i don't understand this bit of the language :-) 16:36
pmichaud what's given in S06 at that point is probably pseudocode anyway, since the previous sentence says "more or less the same effect as..."
i.e., it doesn't happen *exactly* that way
thou yeah
pmichaud it's probably more like 16:37
my $old_do := &thermo.do; &thermo.do := sub ($t) { old_thermo.invoke( ... ) }
16:37 JimmyZ left
pmichaud er 16:38
thou since this is a somewhat tricky bit to understand, though, it'd be good if it *is* possible to write something that would work in the same way
pmichaud my $old_do := &thermo.do; &thermo.do := sub ($t) { $old_do.invoke( ... ) }
16:39 JimmyZ joined
thou that at least gives me the impression that i understand it. maybe that's good, maybe not :-) 16:39
16:40 wamba joined
JimmyZ nom: my &a = { 1 + 1; } ; my &b := &a; &a = { &b() +2 }; say &b(); # looks like this one? 16:40
p6eval nom: OUTPUT«maximum recursion depth exceeded␤current instr.: '_block1015' pc 439 ((file unknown):8834567) (:1)␤»
pmichaud the main point is that $handle = &sub.wrap( ) enables you to in-place change what a sub does, and $handle.unwrap restores the original behavior. 16:41
how it works internally is (intentionally?) underspecified, I think.
JimmyZ nom: my &a = { 1 + 1; } ; my &b := &a; &a = { &b() +2 }; say &a(); # or this
p6eval nom: OUTPUT«maximum recursion depth exceeded␤current instr.: '_block1015' pc 439 ((file unknown):20561415) (:1)␤»
pmichaud for example, if you to have <sin> default to degrees instead of radians, you can do: $handle = &sin.wrap( { callwith( $^t * 180 / pi ) }); say sin(90); $handle.unwrap; 16:43
*if you want
thou pmichaud: OK. I will treat that example as suitably pseudo-ish that I don't need to pay attention to its details, and I'm not missing anything if I gloss over it.
pmichaud (this is a contrived example... there's a way to get the built-in sin function to default to degrees without using .wrap :-) 16:44
16:44 birdwindupbird joined 16:46 JimmyZ left 16:47 JimmyZ joined
JimmyZ nom: sub thermo ($t) {...}; my &old_thermo := &thermo; &thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) }; say &thermo(20); 16:50
p6eval nom: OUTPUT«Cannot assign to a non-container␤current instr.: 'infix:<=>' pc 166282 (src/gen/CORE.setting.pir:41944) (:1456)␤»
JimmyZ std: sub thermo ($t) {...}; my &old_thermo := &thermo; &thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) }; say &thermo(20);
p6eval std 37a0cdd: OUTPUT«Potential difficulties:␤ $t is declared but not used at /tmp/V6mSV2ssdM line 1:␤------> sub thermo (⏏$t) {...}; my &old_thermo := &thermo; &t␤ok 00:01 129m␤»
thou :-) 16:51
JimmyZ I don't know why std complains $t
thou td: sub thermo ($t) { say "Temp is now $t" }; my &old_thermo := &thermo; &thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) }; say &thermo(20); 16:52
std: sub thermo ($t) { say "Temp is now $t" }; my &old_thermo := &thermo; &thermo = sub ($t) { old_thermo( ($t-32)/1.8 ) }; say &thermo(20);
p6eval std 37a0cdd: OUTPUT«ok 00:01 129m␤» 16:53
JimmyZ nom: sub thermo ($t) {...}; my &old_thermo := &thermo; &thermo := sub ($t) { old_thermo( ($t-32)/1.8 ) }; say &thermo(20); #doesn't work too. 16:55
p6eval nom: OUTPUT«Cannot use bind operator with this LHS at line 1, near " sub ($t) "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23569 (src/stage2/gen/NQPHLL.pir:6311)␤»
16:56 birdwindupbird left
literal 7w 29 17:01
17:23 dorlamm joined 17:24 dorlamm left 17:27 birdwindupbird joined
dalek kudo/nom: 2561084 | pmichaud++ | / (2 files):
Operator reorganization part 2: Move string-generic operators into Stringy.pm .
17:32
JimmyZ pmichaud: Stringy.pm is lost ;) 17:35
'night 17:36
17:36 JimmyZ left 17:37 whiteknight left
thou i wonder if it's too late to --amend :-) 17:38
moritz well, having Stringy.pm added in another commit won't kill us 17:40
sorear good * #perl6
spetrea: ping
thou hej, moritz 17:44
o/
moritz \o 17:45
17:47 jaldhar left, jaldhar joined 17:52 zby_home_ joined 18:02 kaare__ left
TBA2 should i expect the following to do a global substitution? 18:02
rakudo: my $a = "a::b::c"; $a ~~= s/\:\:/\//, :g; print $a;
p6eval rakudo 248244: OUTPUT«a/b::c»
TBA2 perl6: my $a = "a::b::c"; $a ~~= s/\:\:/\//, :g; print $a; 18:03
moritz s:g/.../.../
p6eval rakudo 248244: OUTPUT«a/b::c»
..pugs: OUTPUT«*** ␤ Unexpected "~~="␤ expecting operator␤ at /tmp/xyXXqZMjiE line 1, column 23␤»
..niecza v6-177-g365e216: OUTPUT«===SORRY!===␤␤Cannot make assignment out of ~~ because chaining operators are diffy at /tmp/D42UV8CJwj line 1:␤------> my $a = "a::b::c"; $a ~~=⏏ s/\:\:/\//, :g; print $a;␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza/boot/lib/COR…
TBA2 thx moritz :)
moritz TBA2: and you shoulld use ~~, not ~~= 18:05
with s///, :g you construct a list of one substitution and one pair
sorear niecza: say "a::b::c".subst("::","/")
p6eval niecza v6-177-g365e216: OUTPUT«a/b::c␤»
sorear niecza: say "a::b::c".subst("::","/",:g)
p6eval niecza v6-177-g365e216: OUTPUT«a/b/c␤»
TBA2 moritz: am ok with that first bit, could you run that last one by me again :) 18:06
sorear niecza: my $a = "a::b::c"; $a ~~ (s/'::'/\// :g); say $a # just curious
p6eval niecza v6-177-g365e216: OUTPUT«a/b/c␤»
moritz TBA2: the comma constructs a list 18:08
TBA2: the first part is a sustition (s///), the second part is a pair (:g)
perl6: say (:g).perl 18:09
p6eval pugs: OUTPUT«("g" => Bool::True)␤»
..rakudo 248244, niecza v6-177-g365e216: OUTPUT«"g" => Bool::True␤»
TBA2 ahh i see, makes sense now :) (and modifiers are starting to make more sense lol)
18:10 wamba left 18:11 kst left, kst joined, wamba joined
sorear phenny: tell spetrea to check out niecza if performance is a major concern 18:14
phenny sorear: I'll pass that on when spetrea is around.
18:18 cbk left
sjn jnthn: 18:21
oops :)
moritz how is/was NPW? 18:23
are masak-san and jnthn-san still alive? 18:24
TBA2 should this work (and does it/can it in rakudo): my $class = "Test"; my $method = "Something"; require $class; my $classObj = $class.new(); $class."$method"(); 18:27
moritz no
$class is always a Str 18:28
TBA2 is there any way atm?
moritz there's always eval()
TBA2 was hoping for a more p6'ish way :) 18:29
moritz probably my $type_obj = ::($class) or so
(but NYI)
TBA2 kk thanks (again!)
just to clarify, only the $class.new bit doens't work? it appears $obj."$method"() does, once you've got the object to call it on 18:34
moritz right 18:35
TBA2 cool, sry if im being dumb though, but how (in p6 world) does eval help me here? confuzzled :) 18:36
moritz rakudo: my $name = 'Int'; say $name.WHAT; say eval($name).WHAT
p6eval rakudo 248244: OUTPUT«Str()␤Int()␤»
jnthn is tired but alive :)
thou moritz++ 18:37
TBA2 thanks, yet again lol :) you're becoming my personal tutor hehe ;)
really though, much appreciated :D
18:38 birdwindupbird left
moritz
.oO( please /msg me your billing address :-) )
18:38
18:39 masak joined
masak evening, #perl6. 18:39
moritz \o/ masak
TBA2 evenin masak
moritz how was NPW? 18:40
masak we survived arranging a Perl event \o/
jnthn pmichaud: Seems Stringy.pm is missing in 2561084
TBA2 moritz: Dan Wright, Yet Another Society, ... *vbg*
masak moritz: I'm very please with the way it all turned out.
jnthn masak: So did our attendees ;)
masak pleased*
jnthn (as in, survived us arranging a Perl event :)) 18:41
masak :)
jnthn had a nap after getting home :) 18:42
TBA2 should rakudo complain if a method with the same parameter list is declared twice in a class?
rakudo: class A { method A() { say "A1"; }; method A() { say "A2"; }; }; my $a = A.new(); $a.A();
perl6: class A { method A() { say "A1"; }; method A() { say "A2"; }; }; my $a = A.new(); $a.A();
p6eval rakudo 248244: OUTPUT«A2␤»
pugs, rakudo 248244: OUTPUT«A2␤»
..niecza v6-177-g365e216: OUTPUT«===SORRY!===␤␤Two definitions of method A (see line 1) at /tmp/Djx1erXBbs line 1:␤------> s A { method A() { say "A1"; }; method A⏏() { say "A2"; }; }; my $a = A.new(); $a␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza/boot/lib/COR…
18:42 envi_laptop left
jnthn nom: class A { method A() { say "A1"; }; method A() { say "A2"; }; }; my $a = A.new(); $a.A(); 18:42
p6eval nom: OUTPUT«sh: ./perl6: not found␤»
jnthn tssk
18:42 thou left
moritz TBA2: yes, unless they are declared as 'multi' 18:43
jnthn TBA2: Should and it's fixed in nom, I'm sure.
18:43 donri joined
moritz TBA2: known bug 18:43
jnthn nom: class A { method A() { say "A1"; }; method A() { say "A2"; }; }; my $a = A.new(); $a.A();
p6eval nom: OUTPUT«sh: ./perl6: not found␤»
TBA2 jnthn: think i'm on nom branch
yeah i am
moritz jnthn: nom rebuild will fail until Stringy.pm is supplied 18:44
18:44 aindilis` left
jnthn moritz: aww 18:44
TBA2: OK, then I'd expect it's complaining. :)
TBA2 lol :)
jnthn TBA2: At least, github.com/rakudo/rakudo/blob/nom/...ner.pm#L12 looks like it should.
18:45 aindilis joined
pmichaud oops 19:01
Stringy.pm coming up 19:02
pushed.
masak I also pushed something. :) 19:03
flussence rakudo: class A { method A() { say "A1"; }; method A() { say "A2"; }; }; my $a = A.new(); $a.*A(); 19:04
p6eval rakudo 248244: OUTPUT«A2␤»
pmichaud workshop is done?
nom: say 'alive yet?' 19:05
p6eval nom: OUTPUT«sh: ./perl6: not found␤»
pmichaud :-(
sorry about that, folks
is there a way to bump p6eval? or can I be endowed with sufficient magic to make it happen? 19:06
dalek kudo/nom: 36b32d2 | pmichaud++ | src/core/Stringy.pm:
Forgot to add Stringy.pm. pmichaud--
kudo/nom: 2238d52 | masak++ | src/Perl6/Metamodel/AttributeContainer.pm:
use hash lookup instead of array search

  jnthn++ found this opportunity for improvement during a live
exploration of the metamodel system in his talk NPW 2011. He said "patches welcome"; here's the patch.
moritz masak++ jnthn++
pmichaud jnthn: do we really accept patches from masak++? How do we know he's not just trying to increase the number of bugs to report? ;-) ;-)
pmichaud is exploring some ideas on improving the numeric bridge system 19:08
masak exploration. we're doing it. 19:10
moritz nom: say 1
p6eval nom: OUTPUT«1␤»
pmichaud \o/
nom: my @a = 100..*; say @a[5..10]
p6eval nom: OUTPUT«105106107108109110␤»
pmichaud rakudo: my @a = 100..*; say @a[5..10]
p6eval rakudo 248244: OUTPUT«105106107108109110␤»
masak jnthn: how can I give my attribute a different AttributeHOW? I want to make sure the infinite regress I hinted at really is impossible. ;) 19:11
pmichaud nom: my @a = (100..*).map({$_ * 2}); say @a[5..10]
p6eval nom: OUTPUT«210212214216218220␤»
pmichaud rakudo: my @a = (100..*).map({$_ * 2}); say @a[5..10]
p6eval rakudo 248244: OUTPUT«(timeout)» 19:12
pmichaud nom +1
masak jnthn: (something like: AttributeHOW is just a class A, which can have attributes, and one of the attributes has a custome AttributeHOW, namely A)
pmichaud rakudo: say 100..*
p6eval rakudo 248244: 19:13
..OUTPUT«(timeout)103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193…
pmichaud nom: say 100..*
p6eval nom: OUTPUT«100..Inf␤»
pmichaud nom: say @(100..*)
p6eval nom: OUTPUT«...␤»
pmichaud nom: say (100..*).join(' ')
p6eval nom: OUTPUT«...␤»
pmichaud nom: say (3,4,5,100..*).join(' ') 19:14
p6eval nom: OUTPUT«3 4 5 ...␤»
moritz is that .gist'ed?
pmichaud in that case it's .join putting on the '...' for the infinite element
I'm not sure what join should do when it encounters an infinite list, so I did that :) 19:15
jnthn masak: See EXPORTHOW
pmichaud: Yeah, we should code review it very carefully ;-)
pmichaud: I see you've been hacking. \o/ 19:16
pmichaud jnthn: a bit.
the new lists system is much more robust than previously
say ('hello','world') xx * 19:17
nom: say ('hello','world') xx *
p6eval nom: OUTPUT«...␤»
jnthn pmichaud: Excellent.
pmichaud: Is gather/take in place?
pmichaud jnthn: yes, it is! 19:18
well, sorta
jnthn \o/
pmichaud Actions.pm doesn't know how to create <blorsts>
jnthn ah
That doesn't surprise me.
masak jnthn: oh! so I can only have one AttributeHOW in play at a time? I guess that makes sesnse.
Su-Shee someone more knowledgeable than me could/should pugs point out here: stackoverflow.com/questions/6398996...learn-from
good evening.
masak Su-Shee! \o/
jnthn masak: The design does try to lead you down the path of doing sane things :) 19:19
pmichaud nom: my $a = 0; say gather { take $a while $a++ < 10 }
p6eval nom: OUTPUT«Method 'clone' not found for invocant of class 'Sub'␤current instr.: '_block1002' pc 102 ((file unknown):75172107) (:1)␤»
pmichaud that's the bug I get when using gather
however
nom: my $a = 0; say GATHER { take $a while $a++ < 10 }
p6eval nom: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
masak jnthn: I mean, it just means that the parser holds one AttributeHOW at a time. there can still be several different in your program when you're done compiling.
pmichaud I cheated for now and created &GATHER :-)
jnthn pmichaud: ah, OK
pmichaud: I can fix the actions 19:20
pmichaud I added some blockers to NOMMAP
well, not "blockers" so much as "things that people will encounter during testing"
jnthn pmichaud: ah, basically roles
pmichaud constants, too. and hash constructors
jnthn Plus the core...er..."constants"
Guess they're enums. 19:21
pmichaud if we can just make the constants into lexical entries for now that'd probably be sufficient
jnthn Well, not all of them.
pmichaud we can enumify them later
jnthn pmichaud: Does circumfix:<{ }> exist yet?
pmichaud jnthn: it does, but it doesn't work because of the hash constructor bug in Actions.pm
jnthn pmichaud: Or, do we have Pair type again yet?
pmichaud we do have Pair, yes.
jnthn nom: say (a => 42).WHAT
p6eval nom: OUTPUT«Null PMC access in find_method('new')␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
jnthn ah
pmichaud nom: say ('a'=>42).WHAT 19:22
p6eval nom: OUTPUT«Pair()␤»
jnthn hm :)
pmichaud a => 2 doesn't use &infix:<=>> directly
'a' => 2 does
jnthn Well, I suspect mostly just a case of "not yet re-worked for nom"
pmichaud (a => 2 gets special parsing treatment... <fatarrow> I think)
similarly
jnthn yeah 19:23
pmichaud nom: say (:a<42>).WHAT
p6eval nom: OUTPUT«Null PMC access in find_method('new')␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
pmichaud same thing.
jnthn *nod*
pmichaud it might be as simple as it's looking for 'Pair' in package instead of lexical namespace
pmichaud checks
jnthn I suspect so.
I'll have a look soon.
19:24 thou joined
pmichaud looks like that might've been it 19:24
compiling now to see 19:25
jnthn Just about anything that uses :scope('package') is wrong.
pmichaud agreed.
I think we can even s/Just about a/A/
> say (a=>42).WHAT 19:26
Segmentation fault
:-(
guess that's not (all of) it
jnthn wow :) 19:27
lichtkind there was no spam in last 2 month and ingy++ also updated the wiki 19:30
i think we could allow the chatbot again monitor the wiki
dalek kudo/nom: 8a35e99 | pmichaud++ | NOMMAP.markdown:
More NOMMAP stuff.
19:32
masak lichtkind: a problem with the chatbot was that it wasn't very informative. it didn't give a summary, just said what page changed.
lichtkind yes 19:33
but we could change that too :)
slavik1 I had an idea for a git based wiki
no db for content, just static pages/code
and tracked in git 19:34
on server
lichtkind slavik1 a dream for ages of an wiki written in perl 6 19:36
19:36 ymasory joined
lichtkind we could name it dezember :) 19:36
slavik1 lol 19:37
dalek kudo/nom: e7a2851 | pmichaud++ | NOMMAP.markdown:
More NOMMAP updates.
slavik1 lichtkind: only when mod_perl6 is semi stable :P 19:38
I blame jnthn :P
TBA2 lichtkind: funnily enough am writing a p6 MVC platform as we speak :) uses CGI, can't even get mod_perl6 to compile, and obviously horrendously slow :) but writing a wiki with it is doable!! 19:47
(temporarily with no file uploads, havent got around $*IN lacking binmode yet!) 19:48
moritz TBA2: you might be interested in HTTP::Server::Simple
rakudo: say $*IN.read(20).perl 19:49
p6eval rakudo 248244: OUTPUT«Buf.new(76, 97, 110, 100, 32, 100, 101, 114, 32, 66, 101, 114, 103, 101, 44, 32, 76, 97, 110, 100)␤»
moritz there, binary reading from $*IN
TBA2 moritz: am using apache2, whats the benefit?
and yeah i can get it to read a Buf from $*IN, but not when its a multipart file upload via POST
when it gets to the file content it thinks its reached end of input, doesnt even die 19:50
moritz TBA2: you save the startup time of rakudo for each request
github.com/mberends/http-server-simple/ # this one 19:51
TBA2 good point, but i'm hoping mod_perl6/mod_parrot will solve that one
hmm
lichtkind TBA2: whats your project caleld?
called
TBA2 good idea though :) think i might write a http-server-simple wrapper for it
no name yet, its living under the namespace CGI:: on my dev box :)
lichtkind TBA2: its you firc p6 program? 19:52
TBA2 so far it supports GET, POST (incl. multipart but not file uploads), HTTP responses, configuration and basic routing
lichtkind masak: i would have soon something to factcheck
TBA2 sortaish, first attempt at writing something worthwhile, until now its just been bits of playing around to get the hang of p5/p6 differences (which im still struggling with!!) 19:53
lichtkind TBA2: just complain where tablets can be written better 19:54
TBA2 been waiting on p6 for years :P thought i'd jump in now its starting to mature a bit! 19:55
lichtkind: not sure i understand sorry
lichtkind TBA2: i misunderstood, first i thought you had hard time to understand but i think you struggle because the difference 19:56
jnthn pmichaud: Thanks for nommap updates. I see my work's cut out for me. :) 19:58
19:58 kboga joined
sorear good * #perl6 19:58
lichtkind moin sorear 19:59
masak o/ sorear
lue hello world! o/ 20:00
masak hellue! \o/ 20:01
sorear slavik1: are't github wikis git-backed?
slavik1 sorear: no clue
sorear: if they are, they copied me! 20:02
:P
sorear o/ masak
lue today I feel like trying to get blocks in blocks working... 20:06
sorear lue: you mean in yapsi?
TBA2 lichtkind: can't vouch for my coding (particularly my p6 code lol), but here's what i got so far: github.com/tba2/CGI 20:07
lichtkind thanks 20:08
lue no, in my Pod parser.
lichtkind wanders to implement the spirograph and harmonograph in p6
since we have exzelent SVG oh NOES but no GUI 20:09
sorear clearly, niecza needs a FastCGI module
moritz or something better, which isn't as hard to debug as FastCGI
sorear what's better than FastCGI? 20:10
moritz dunno
TBA2 !FastCGI?
moritz for a web project I currently use a pure-perl preforking server behind an Apache mod_proxy
sorear moritz: do you use anything like PSGI? 20:11
moritz sorear: no, but the webframework I use (Mojolicious) supports it
sorear: and if I were to use some "cloud" hosting, I'd surely use it
Eevee reverse proxy to lang-specific microserver seems to be gaining steal 20:12
er, steam
sorear psgi is cool 20:13
moritz aye
20:13 wamba left
__sri <3 perl server behind reverse proxy 20:13
for me as a perl web developer it is perfect, since it is built exclusively out of the technologies i know and love 20:14
20:14 y3llow left
__sri unlike fastcgi... which is horrible to debug 20:14
20:15 pothos left
Eevee similarly #python tends to suggest nginx reverse-proxying to a wsgi server 20:15
20:15 pothos joined, y3llow joined
flussence there's scgi as well, but I've never used it so can't say whether it's better than fcgi or not... 20:15
Su-Shee I'd guess that every one of the fashionable interpreted languages suggests something like this...
__sri would take http over scgi/wsgi, but it's better than fastcgi 20:16
sorear I think it has more to do with load speed
Eevee ruby has, uh, thin
__sri irrelevant
masak inconceivable!
__sri you're generating synamic content
flussence I like fcgi, but that's mostly because I know how to get it working most of the time
sorear back in the heyday of CGI, most people used C or Pre-Modern Perl, both of which load in <10ms
Eevee not really sure how it works though
__sri *dynamic
masak "synamic" sounds like it should mean something, though. 20:17
quick, patch it into the spec! :)
__sri the bottle neck is pretty much always the database
__sri quickly registers a trademark on "synamic" 20:18
masak __:)
Eevee fcgi is a strange beast
you have to wrangle the server to speak it, wrangle the app to listen to it, and wrangle the sysadmin to understand wtf is going on
masak __sri: is the database the bottleneck regardless of the database layout?
Eevee three englishmen trying to use sanskrit as their common language
thou TBA2: fyi, lichtkind++ was referring to the Perl6 Tablets, a set of docs he has written. if you're not understanding some perl6 thing, check there, and if it's insufficient, he's asking you let him know so he can expand on the topic. Tablets are at: www.perlfoundation.org/perl6/index...._6_tablets 20:19
Su-Shee Masak: I suggest for the spec: "Synamic dispatching is a new method of semantically meaningful dynamic between abstract interfaces at runtime"
masak Su-Shee: oh no, not this game again :P
sorear needs to learn German at some point
Su-Shee masak: you said "spec" first ;) 20:20
flussence Eevee: it's ugly, but it's the best I can convince my $dayjob to use, which is a hell of a lot better than they were on before :)
__sri masak: yea
Eevee flussence: much like svn, "better than the previous thing" seems to be fastcgi's main bullet point :)
__sri scaling web app servers is also a lot easier than scaling a database
Su-Shee we skipped everything in between and went straight from cvs to git in the office. 20:21
masak Su-Shee: "These junctions will never reach parallel saturation, because their synamic core is isometric to the intrinsic protomodule."
flussence thankfully I never had to use you-know-what there, even if I am stuck on svn. :)
Su-Shee masak: very nice!
masak :)
Eevee current $work went from cvs-with-branching-bolted-on to svk-with-branching-bolted-on to git-with-branching-bolted-on
Su-Shee *hihi* :)
flussence that sounds... horrible 20:22
Eevee I've quietly suggested that perhaps git doesn't really need branching bolted on, but the workflow has too much inertia
flussence hey, at least you have a workflow!
Su-Shee actually, we shoved 12 years of cvs straight into git and it just worked besides some scripts who now have to support git calls instead of cvs.
Eevee so when we have problems like "our main git repo has 60,000 tags", we solve it with "let's move the tags into a mysql database and delete them from git"
masak some people here might appreciate www.johndcook.com/blog/2011/03/08/l...ment-88473 20:23
Su-Shee Eevee: oh boy that totally sounds like us in principle...
TBA2 thou: thanks, didn't know about them!! 20:24
Su-Shee dammit one of my devices makes a nasty high pitched sound...
lue rakudo: say ":a<b>" ~~ /<?{Perl6::Grammar.parse($0, :rule<colonpair>)}>/;
p6eval rakudo 248244: OUTPUT«␤»
flussence Su-Shee: cheap timer ICs probably, I'm sitting near one that has an audible charging LED... 20:26
lue Please tell me I did something wrong and it's not the fact that it's still a bug :)
TBA2 sleepy time, night #perl6 20:27
lue goodnight TBA2 o/
masak lue: you refer to $0, but there's no prior capture... 20:28
pmichaud just pushed more operator reorgs and have to depart for ~1h... feel free to fix if I broke anything :) 20:30
bbl
lue admittedly I just copy-n-pasted that bit from an old comment in Grammar.pm6, to see if it works now. 20:31
masak lue: suggest knowing what it means first, and pointing out that it's a bug second :P 20:32
(not that I always do it in that order...)
flussence bug early, bug often
masak +1
there must be a dozen or more bugs in RT of the type "masak learns something new about the Perl 6 language" 20:33
("...by claiming it's wrong when it isn't")
moritz and several hundred legitimate bug reports by masak++ 20:34
masak oh yeah, those...
someone should fix those :P
dalek kudo/nom: 0b1f748 | pmichaud++ | src/core/ (4 files):
Operator reorganization part 3: Move Int/Num/Real into {Int|Num|Real}.pm.
lue Well, I was hoping I screwed something up :) . Now to add some tests for config stuff so I can see if that line works.
20:40 ajoe47 left 20:41 HarryS joined
moritz we talk about that, and I see news.slashdot.org/story/11/06/19/18...lashdot%29 popping up in my feed reader. Coincidence? 20:42
lichtkind thanks thou :)
thou lichtkind: was machst du mit dem Tableten jetzt? hast uebersetzung neutig? ich kann ein bisschen deutsch, genug zu hilfen mit uebersetzung nach englisch. 20:45
lichtkind thou: die denglishen sind wesentlich aktueller
in denen entwickle ich auch
sorear said he want to lean german :) 20:47
tadzik hello zebras 20:50
masak tadzikbot! \o/ 20:51
tadzik oh, then you know
how are things? 20:52
masak <-- a bit tired
tadzik: you?
lue hello tadzik! o/
tadzik masak: oh, semi-tired too 20:53
also, lots of exam-learning 20:54
with a true feeling that I know these things, but I still need to practice it like a madman
lue: hellou!
masak tadzik: jnthn and I did a little Perl Workshop this weekend. that was right after a full-day event at $owrk on the Friday. *that* was after a lot of slides-writing and another evening event on the Tuesday. I'm now having some free time, first time in a week. :) 20:55
20:56 muixirt left
tadzik how was the workshop? 20:57
oh, stop pulling my leg, I know you were finishing the slides in the car riding to the workshop :P
masak very good for a pair of n00bs, I think :)
jnthn People seemed happy. No major incidents :)
masak tadzik: I was editing the slides up until the last moments, yes... :) 20:58
lue Just commited some changes to SUPERNOVA. (It's amazing how good it feels to commit something!)
tadzik do you have some spare t-shirts with the bear-viking? :)
masak tadzik: maybe... :) 20:59
tadzik If there's an option, I'd like to be the first in the queue. This picture is lovely
masak feels happy
jnthn
.oO( I'm glad we chose that over the bare-viking... )
masak jnthn: Conan the Bearbarian... 21:00
jnthn masak++ # awesome drawing :)
tadzik Conannson rather
masak hey, I just sketched some posing bear off flickr and put a viking helmet on it :P
jnthn masak: How much did you drink to think of doing that? :P 21:01
masak jnthn: it's funny you bring that up... :P
tadzik just a bit of bear :)
lue is curious about this bear now
masak jnthn: I was 100% sober. I was sitting opposite some beer drinker who suggested it, though. :) 21:02
lue: conferences.yapceurope.org/npw2011/
tadzik oh, NPW'ers, you so crazy ;)
jnthn masak: What a crazy guy :)
masak you'd have to be crazy to be seen in that kind of helmet... :P 21:03
lue :)
lue is resisting the strong urge to make it so that all the .pod files in the specs/ repo is considered the same file type by the file command 21:04
21:05 kboga left
masak right now in Rakudo, you have to use slurp("filename") but lines("filename".IO). that feels odd. 21:10
colomon lines("filename".IO) doesn't actually work, does it? 21:11
colomon admits he has only tried "filename".IO.lines ... 21:12
masak maybe it doesn't.
rakudo: say lines("foo")
p6eval rakudo 248244: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/FT9UetEfQh␤ in 'lines' at line 5929:CORE.setting␤ in main program body at line 22:/tmp/FT9UetEfQh␤»
masak that indicates that Rakudo is still running under old assumptions.
21:12 wamba joined
colomon lines("foo") does work locally. 21:13
masak sure.
but it shouldn't, as per spec.
colomon lines("foo".IO) does not
masak well, lines("foo") should act on the string, not a file.
colomon on the other hand, "foo".lines just returns the string "foo"
masak right.
that's what I'm talking about. 21:14
21:14 jaldhar left
colomon masak: yes, I know what the spec says here 21:14
21:14 jaldhar joined
colomon it's just weird that the method form follows the spec and the sub form does not 21:14
masak agreed. 21:15
colomon and it's a nuisance that .IO doesn't work.
masak especially for us beginners' tutorial authors.
masak grumbles and hopes someone hears 21:16
colomon I'm tempted to make a dummy class IO that just holds a single string and has .lines and .slurp. :)
(and fix the sub forms in the process) 21:17
masak :)
21:18 Woodi left
lue & 21:18
colomon seems like a terrible hack, but likely to be really handy. 21:19
pmichaud back again
lichtkind is so happy :) 21:20
jnthn o/ pmichaud
21:20 tokuhirom joined
jnthn pmichaud: Prob won't get too much of your nommap tasks done tonight. May have better luck tomorrow evening though. 21:21
pmichaud jnthn: no problem, I wasn't really expecting you to do much until you can decompress from this weekend :)
20:34 <moritz> and several hundred legitimate bug reports by masak++
20:34 <masak> oh yeah, those...
20:34 <masak> someone should fix those :P
I'm working on that now. It's called 'nom' :P 21:22
jnthn std: gather { take $^n } 21:24
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Placeholder variable $^n may not be used here because the surrounding block takes no signature at /tmp/oWYbbVZvk_ line 1:␤------> gather { take $^n⏏ }␤Check failed␤FAILED 00:01 121m␤»
lichtkind jnthn, pmichaud o/
sorear Rakudo thinks paths and open files are the same type of object
which may be wrong
pmichaud lichtkind: o/
sorear niecza: gather { take $^n } # did I break this?
p6eval niecza v6-177-g365e216: OUTPUT«===SORRY!===␤␤Placeholder variable $^n may not be used here because the surrounding block takes no signature at /tmp/xsKNQEqaCA line 1:␤------> gather { take ⏏$^n } # did I break this?␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza…
jnthn hi lichtkind
thou lichtkind: :-)
21:25 ymasory left
colomon sorear: is that the right way to say it? I would have thought Rakudo thinks paths are strings and open files are ... umm ... file objects? ... but sometimes takes a path string when it should have required an IO. 21:26
21:27 thou left
lichtkind thou: i thought you are away ? 21:30
21:32 PacoLinux left 21:37 wamba left
masak .oO( wherefore art thou away? ) 21:40
21:41 Psyche^ joined 21:45 Patterner left, Psyche^ is now known as Patterner, takadonet left 21:46 mberends left 21:53 Woodi joined
masak blog post! strangelyconsistent.org/blog/june-1...ding-files 21:58
sorear colomon: I/O objects in Rakudo sometimes represent unopened files, such as "foo".IO ~~ :e 22:05
masak I wonder if it would be less confusing to have IO be called File. 22:07
"foo".File ~~ :e
pmichaud not all IO is files. 22:08
masak right.
pmichaud however, if it's coming from a pathspec, it might be.
masak yes.
maybe File ~~ IO or something.
colomon sorear: that's spec, not Rakudo
lichtkind sorear: thanks ofr bringing that up, that was my question 2 hours ago 22:09
masak good night, #perl6.
pmichaud masak: or maybe it should just be "file".xxx that produces a IO object
lichtkind good night masak
colomon sorear: or at least.... hmmm
pmichaud i.e., "foo".file
without having to be a type
lichtkind have to drop you past tomorrow
masak hm, yes, maybe
pmichaud or even "foo".path
22:09 masak left
colomon .path 22:09
+1
lichtkind +1
pmichaud or "foo".Path, if Path ever becomes a type
lichtkind or take the path quotes 22:10
colomon ah, I was kind of assuming it would be a type
lichtkind qp//
colomon rakudo: "file".IO; say "alive"
p6eval rakudo 248244: OUTPUT«alive␤»
lichtkind i like that idea very much it makes File::Spec obsolet
colomon sorear: I take it back, I guess we do have .IO like that. Interesting. 22:11
ugh, that's nasty 22:12
dalek kudo/nom: a8a615f | pmichaud++ | src/core/ (4 files):
More operator cleanups, a few bug fixes.
22:13
kudo/nom: d16961b | pmichaud++ | src/core/Str.pm:
Fix some string operator bugs introduced by the operator refactor.
colomon is suddenly worried he is at least partially responsible for this mess. Sigh. 22:14
22:14 tokuhirom left
colomon totally looks to me like half the methods in IO belong in a separate class, with Path seeming a reasonably likely name for it. 22:15
pmichaud colomon: you'd be welcome to experiment with such ideas in nom, I think.
22:16 s1n left
colomon pmichaud: oooooooo.... 22:16
pmichaud don't have to worry about breaking spectests (yet :-)
colomon :)
pmichaud on the other hand, nom is still a raging frontier full of bugs. masak will love it :)
colomon biggest obstacle is that I probably should be spending any available perl time I have working on my presentation for YAPC::NA 22:20
jnthn pmichaud: Did that operator bug fix you just did include one for an infinite recursion?
pmichaud jnthn: yes
jnthn phew :) 22:21
nom: my @a = gather { for 1..10 -> $n { take $n } }
p6eval nom: OUTPUT«Method 'clone' not found for invocant of class 'Sub'␤current instr.: '_block1002' pc 84 ((file unknown):55222760) (:1)␤»
jnthn gah 22:22
pmichaud that's the blorst bug
jnthn nom: my @a = GATHER({ for 1..10 -> $n { take $n } })
p6eval nom: ( no output )
jnthn Yeah, I know
pmichaud (which I'm pretty sure is now called <blast> in STD.pm)
jnthn ah :)
nom: my @a = GATHER({ for 1..10 -> $n { take $n } }); say @a
p6eval nom: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
jnthn nom: say { 'a' => 'b' }.WHAT 22:26
p6eval nom: OUTPUT«Method 'list' not found for invocant of class 'Integer'␤current instr.: 'nqp;Perl6;Actions;_block3183' pc 61952 (src/gen/perl6-actions.pir:21977)␤»
jnthn ah. 22:27
22:28 tokuhirom joined 22:29 tokuhirom left 22:30 s1n joined
sorear colomon: niecza goes the other way. IO is the type of paths, open(:r) returns a TextReader 22:33
colomon: I do NOT like the idea of a single class with both reading and writing methods. That's Java-think. We have MI and roles, we doubly don't need it 22:34
colomon sorear: are you saying with should have a path-class, a read-class and a write-class? 22:35
colomon doesn't know why he used dashes there. it's been a long... errr... long period of time.
sorear colomon: s:g/class/class or role/, but yes 22:37
pmichaud
.oO(...single class with both reading and writing methods has been around for far longer than Java :)
sorear probably the latter two ought to be roles, since @Larry doesn't like MI much 22:38
colomon yeah, but the idea of reading and writing ... right, what sorear said.
sorear pmichaud: C89's OO support is even worse than Java's. :)
colomon :)
pmichaud sorear: not to mention C++, or even the original C FILE structure :-)
jnthn isn't that fond of inheritance generally, let alone multiple inheritance... :)
It's telling that as early as the GoF book, they advocated composition over inheritance. 22:39
sorear C++ has istream and ostream as separate classes. one of the things it got right, I say ;)
colomon jnthn: early? You youngsters.. . ;)
dalek kudo/nom: 1c11415 | jnthn++ | src/Perl6/Actions.pm:
Toss existing phasers code; will need re-doing anyway.
kudo/nom: ba41493 | jnthn++ | src/Perl6/Actions.pm:
Fix pair handling.
kudo/nom: 15a3a15 | jnthn++ | src/Perl6/Actions.pm:
Fix gather; also fix loop along the way.
kudo/nom: 605480d | jnthn++ | NOMMAP.markdown:
Remove a couple of done things from nommap.
kudo/nom: 12d25b6 | jnthn++ | src/Perl6/Actions.pm:
Fix hash composer ({ a => 1, b => 2 }).
jnthn pmichaud: Some fixes :) 22:40
pmichaud jnthn: niiiice
jnthn pmichaud: It's not a new issue in nom, but something's up with quote parsing.
pmichaud: say "abc { 2 + 2 }"
pmichaud: Somehow we end up parsing/doing actions for that block twice. 22:41
I'm at a loss as to why.
pmichaud I'll look at it. does it happen in nqp as well, or just rakudo/nom ?
jnthn pmichaud: My suspicion is NQP also. Lemme try and check.
Hmm, maybe not in NQP 22:43
pmichaud yes, I'd be a little surprised if it happens in nqp
anyway, I'll check into it if you don't beat me to it :)
jnthn OK 22:44
It feels somehow familiar
I think I ran into it when I was putting in interpolated stuff
Where stuff = postcircumfixes.
pmichaud postcircumfixes can cause double parses, yes.
it's one of the things I really dislike about them. 22:45
jnthn Yeah, but I'd maybe not expect blocks to.
pmichaud I agree, blocks shouldn't
jnthn It's just a tad wasteful.
sorear string interpolation, in general
pmichaud it's not only wasteful, if there are side effects it can be dangerous :-)
you have to be prepared to undo anything that got done in the middle
sorear actually it seems it's set up to make it impossible to double parse anything containing a <term> 22:46
if you have the rest of the rules correctly...
pmichaud I haven't looked at STD.pm6 closely in a while... but I wondered how it would handle 22:54
jnthn pmichaud: "* undeclared type names produce Null PMC errors" => example?
nom: say loldoesnotexist # ?
p6eval nom: OUTPUT«Can only use get_who on a SixModelObject␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
pmichaud my $str = "With $scalar.methods.missing.term.paren( { BEGIN { oops() } } ..... no closing paren " 22:55
I'll go look again sometime.
jnthn nom: my wtf $x;
p6eval nom: OUTPUT«Malformed my at line 1, near "wtf $x;"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23569 (src/stage2/gen/NQPHLL.pir:6311)␤»
jnthn nom: my WTF $x;
p6eval nom: OUTPUT«In "my" declaration, typename WTF must be predeclared (or marked as declarative with :: prefix) at line 1, near " $x;"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23569 (src/stage2/gen/NQPHLL.pir:6311)␤»
pmichaud nom: say noexist.foo()
p6eval nom: OUTPUT«Can only use get_who on a SixModelObject␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
pmichaud nmmm
hmmmm
jnthn pmichaud: I know that error reporting is busted 22:56
sorear pmichaud: There's no .suppose, so I think it ultimately becomes a FAILGOAL error
std: say "foo bar $_.pie( "
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Unable to parse double quotes at /tmp/S84_byi2EO line 1:␤------> say "foo bar $_.pie( ⏏"␤Couldn't find final '"'; gave up at /tmp/S84_byi2EO line 1 (EOF):␤------> say "foo bar $_.pie( "⏏<EOL>␤Parse
..failed␤FAILED…
sorear std: say "foo bar $_.pie() "
p6eval std 37a0cdd: OUTPUT«ok 00:01 120m␤»
jnthn pmichaud: I was wondering if you meant typename as in "something parsed by the typename rule"
pmichaud jnthn: no, I mean unrecognized barewords
sorear yeah. once it starts parsing the postcirc, it's committed
jnthn pmichaud: OK, then I follow :)
pmichaud sorear: okay, I'm quite less concerned then. 22:57
so, once we start a postcirc, we're committed to completing it or abandoning the parse entirely 22:58
felher good night, #perl6 :)
pmichaud and postcircs are the only place where we'd get nasty side effects.
jnthn: I put that in NOMMAP because I kept running into null pmc errors when I'd use a bareword somewhere unexpected 22:59
maybe something like:
nom: my $a = NoSuchType; 23:00
p6eval nom: OUTPUT«Can only use get_who on a SixModelObject␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
pmichaud you can take that one out until I reproduce the error, if you like :)
when I come up with another example I'll put it back in (with the example)
jnthn pmichaud: Well, it's a good reminder that I need to fix the above error anyway. 23:01
pmichaud that too
but if I get the null pmc one again, I'll post the example. I've had it bite me at least 3-4 times in the past 36 hours
(and then took me a little time to find it in each case) 23:02
jnthn OK, thanks 23:06
nom: fail('x') 23:08
p6eval nom: OUTPUT«x␤current instr.: 'fail' pc 168906 (src/gen/CORE.setting.pir:42229) (:115)␤»
pmichaud it's a dummy fail for now
it just dies
I'll actually mark it as such
jnthn ah, ok
pmichaud I figured it was easier to fix a dummy fail than to go into the code and s/die/fail/ everywhere that would need it 23:09
I'm still getting a fair number of Null PMC access in invoke() messages... might have an example shortly 23:12
sorear actually I think there is one place where it can be a problem
std: "$foo.bar(): @baz"
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Variable @baz is not predeclared at /tmp/1bV4BnpCuF line 1:␤------> "$foo.bar(): @baz⏏"␤Variable $foo is not predeclared at /tmp/1bV4BnpCuF line 1:␤------> "$foo⏏.bar(): @baz"␤Check failed␤FAILED 00:01 121m␤»
sorear rakudo: $*OUT.say(): "Hi" 23:13
p6eval rakudo 248244: OUTPUT«===SORRY!===␤Confused at line 22, near "$*OUT.say("␤»
sorear I think <args> should probably check $*QSIGIL and refuse to allow :=-syntax if so
er, :-syntax
23:14 whiteknight joined
jnthn nom: foo::bar 23:16
p6eval nom: OUTPUT«Null PMC access in invoke()␤current instr.: '_block1002' pc 83 ((file unknown):53310070) (:1)␤»
jnthn pmichaud: Like that? :)
pmichaud Like that.
but I don't think I've had many :: bareword names
and I'm sure it's occurred in some cases where there wasn't a ::
oh, come to think of it, maybe not 23:17
ummmm.... not sure
I may work on numerics later tonight 23:18
(e.g., 3.5 and the like)
jnthn pmichaud: Well, I fix the cases I can see, and just note any others when you see them. 23:19
pmichaud I will definitely do that.
jnthn wishes he was tired :/
I should be.
Maybe the nap earlier this evening was a bad idea. :)
pmichaud I didn't start marking things in NOMMAP until earlier today (didn't figure out how I wanted to mark them until earlier today)
23:26 thou joined
jnthn nom: sub foo($x where -> $n { $n < 42 }) { } 23:27
p6eval nom: ( no output )
jnthn nom: sub foo($x where -> $n { $n < 42 }) { say 'ok' }; foo(40)
p6eval nom: OUTPUT«ok␤»
jnthn nom: sub foo($x where -> $n { $n < 42 }) { say 'ok' }; foo(42)
p6eval nom: OUTPUT«Constraint type check failed for parameter '$x'␤current instr.: 'foo' pc 274 ((file unknown):39409697) (:1)␤»
jnthn ah, I did it and forgot to remove it from nommap :) 23:28
pmichaud: I removed the lookup errors issue form nommap. 23:32
(After fixing the ones I could find)
pmichaud jnthn: wfm
jnthn Please add it back if you find more, with example. :)
pmichaud will do :)
23:33 daniel-s joined
jnthn pmichaud: Meh. We've got down to one loadinit. It's still one too many... 23:35
pmichaud :-P
jnthn pmichaud: Remember that horrible roles and lexicals issue we had in master? 23:36
pmichaud I try not to remember that.
(but fail.)
jnthn Yeah, well...
It's back. :/
Same reason. The loadinit.
dalek kudo/nom: d254daf | jnthn++ | src/Perl6/Grammar.pm:
Fix missing $?PACKAGE set for UNIT.
23:37
kudo/nom: 5dda806 | jnthn++ | src/Perl6/SymbolTable.pm:
Give a more helpful message than null PMC access for some busted lookups.
kudo/nom: e61533a | jnthn++ | src/Perl6/SymbolTable.pm:
Fix other known case of symbol non-existance giving a crappy error.
kudo/nom: f4ef8df | jnthn++ | NOMMAP.markdown:
Update nommap.
jnthn pmichaud: I'm wondering what happens if the very, very first thing we do in UNIT is call the thing that's currently the loadinit...
pmichaud: Though I fear it's not quite that simple.
pmichaud I don't have a problem with that approach. Since BEGIN is being handled quite differently now, it might work. 23:39
sorear is struggling still with packages
jnthn pmichaud: I'm pondering having the INITs all fired at the end of the deserialization/fixup.
pmichaud INIT? or CHECK?
jnthn pmichaud: BEGIN and CHECK are parse-time.
sorear How are BEGINs handled now?
jnthn sorear: They're not yet :)
pmichaud: CHECK comes after we're done with the grammar and actions, and before we go PAST => PIR 23:40
pmichaud jnthn: right, BEGIN and CHECK are parse time, but we used to have some code to duplicate their effects in master upon load. That's now being handled by the SC, iiuc.
jnthn Right
pmichaud which means the reasons for using :loadinit are much less
jnthn That was my feeling too.
pmichaud the biggest challenge I'd see is with use 23:41
i.e., when we use a module, we need to get its "loadinit" to fire right away before we continue parsing
jnthn pmichaud: We already run its mainline.
pmichaud: If that is what fires the "loadinit" too, we're fine.
pmichaud jnthn: ...via :load, or some other mechanism?
jnthn oh sh... 23:42
Oh, I think we get away with it.
pmichaud currently it happens via :load, iiuc
23:42 takadonet joined
jnthn Yeah 23:42
pmichaud HOWEVER
!!
jnthn But if we go load => mainline => "loadinit"
The outers are all fine.
pmichaud NotFound++ just added some feature in Parrot to be able to locate the :main sub in an Eval PMC or Packfile or whatever 23:43
so maybe we could turn off the :load and instead search for :main out of the loaded module and invoke it from there
23:43 y3llow left 23:44 pothos left
pmichaud the problem with :load => mainline => "loadinit" is that :load isn't in our lexical scope 23:44
perhaps it could search up the caller chain to find the lexical scope, however.
and then attach mainline to that before invoking it
jnthn Maybe
pmichaud or!!!!!
:load could simply stick the desired mainline in some fixed location 23:45
jnthn The issue we really get into is that the role body gets invoked before the mainline callframe exists
It's that mis-ordering that gets us into bother.
pmichaud we then get back from :load (having not executed the module's mainline or loadinit yet), look in that fixed location for the mainline and invoke it from the correct context
thou i think pmichaud is excited by this problem
!!!!! :-) 23:46
jnthn That's another option but I'm not sure it handles the outer pointers going to the rong place.
pmichaud it might not
but it will hugely help
thinking
if the role body is invoked first, does that auto-close the mainline callframe? 23:48
jnthn Something like that
At the moment it's failing to find the setting
Which I think is a result of it auto-closing the mainline callframe
pmichaud so, we can either try to find the mainline callframe that the role body (bodies) used and steal it for our mainline
jnthn hm 23:49
pmichaud or we can re-point the role bodies to the correct outers when our mainline is invoked
jnthn that's...tricky.
Yes, that's what we do in master.
I can factor it less evily in nom though.
I was hoping there may be a nicer way
23:49 info joined
jnthn But maybe there ain't. 23:49
pmichaud I think we can get the mainline callframe before invoking it
thinking...
jnthn Hmm
pmichaud (restoring it and/or resuing it might be tricky. but we really just want its lexpad, yes? 23:50
*reusing
jnthn kinda 23:51
hm
I need to sleep
$dayjob tomorrow
pmichaud np
jnthn And I'm meant to be exhausted :)
pmichaud I'll brainstorm in bg a bit more on this
jnthn OK, thanks ;) 23:52
pmichaud oh, I have a really nasty idea
jnthn Anyway, need to fix roles up so we can have Positional
pmichaud you won't like it :)
jnthn And Numeric and all that lot
heh :)
pmichaud we could do the same thing I do for gather/take
invoke the mainline. the mainline instantly does capture_lex on its (role bodies), and then .yields() back to the caller. Do whatever else we need to do. Then resume the mainline after the .yield() 23:53
lichtkind sorear: did you start niecza ?
jnthn eek!
pmichaud: That's evil and would probably work... :) 23:54
pmichaud but overall I think the idea is correct that we want to invoke our "loadinit" stuff outside of :load/:init
i.e., as the first step in the mainline
anyway, more to play with tomorrow :) 23:55
jnthn aye
pmichaud being able to put Positional on classes would help with a lot of stuff 23:56
jnthn Sure
Will try and churn that out soon
pmichaud without it I can't multi-dispatch on @foo versus $foo
jnthn Things are busy-ish, but should get some hacking time.
Friday and weekend will be free for Perl 6 stuff too :)
pmichaud excellent
my schedule is fairly open as long as things remain stable health-wise here at the house :) 23:57
jnthn ok :)
pmichaud so I'm just going to keep hacking away at nom
jnthn Wow. We have over 2000 lines of setting...
pmichaud I'm about to remove some
jnthn :)
pmichaud I figured out a much cleaner Range implementation
jnthn oh, nice
pmichaud about to commit + push now
jnthn nom: my @a = gather { take 1; take 2; take 3; }; say @a 23:58
p6eval nom: OUTPUT«1 2 3␤»
jnthn \o/
nom: foo::bar
p6eval nom: OUTPUT«Could not find symbol 'foo::&bar'␤current instr.: 'fail' pc 168948 (src/gen/CORE.setting.pir:42238) (:115)␤»
jnthn nom: foo
p6eval nom: OUTPUT«Could not find symbol '&foo'␤current instr.: 'fail' pc 168948 (src/gen/CORE.setting.pir:42238) (:115)␤»
jnthn Improvements. :)
nom: our sub foo() { say 1 }; GLOBAL::foo()
p6eval nom: OUTPUT«1␤»
jnthn Good.
pmichaud nice nice nice 23:59
I can clean up a couple of workarounds now