»ö« 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.
00:00 retupmoca left 00:10 tarch left
fsergot Good night everyone. o/ 00:15
masak 'night, fsergot 00:19
dalek kudo/macros2: 39ff0b2 | masak++ | src/ (4 files):
partial commit

This is really close to working -- the code in this commit sets the OUTER of the incarnated quasi to the correct context.
But this code still doesn't work, and we really expect it to:
  ./perl6 -e 'macro foo { my $a = "OH HAI"; quasi { say $a } }; foo'
masak jnthn++ and I 've had a really productive hackathon tonight. we *almost* got macro OUTER fixups working. :) 00:20
fixed a bunch of thinkos along the way. only one left. 00:21
sjn yay!
masak this macro stuff is actually quite straightforward, once the beer kicks in. 00:25
'night, #perl6 00:30
00:31 MayDaniel left 00:43 snearch left
colomon o/ 01:00
[Coke] "pugs", 2150, 0, 989, 9, 3148, 22754 01:05
jnthn safely back from $masak-place :) 01:06
[Coke] a lot of my perl mail from 2007 is bouncing today. 01:07
weird.
s/a lot/some/, anyway.
colomon au++ # brilliant cheating in the PD tournament. 01:10
01:12 Maddingu1 joined 01:17 ab5tract left
jnthn -> sleep 01:25
colomon niecza: sub pangram($s) { "a".."z" ⊆ $s.comb; }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.") 01:27
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (to-set @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at <unknown> line 0 (&to-set @ 0) ␤ at …
colomon niecza: sub pangram($s) { (set "a".."z") ⊆ $s.comb; }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.")
p6eval niecza v14-43-gc4ecd5c: OUTPUT«False␤True␤»
colomon niecza: sub pangram($s) { (set "a".."z") ⊆ $s.lc.comb; }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.") 01:28
p6eval niecza v14-43-gc4ecd5c: OUTPUT«False␤True␤»
sjn wonders if a the russian pangram would work :) en.wikipedia.org/wiki/Pangram 01:30
01:31 Maddingu1 left
TimToady why did it work without the lc? 01:31
colomon ..... 01:32
TimToady oh, it has another t
colomon right
and excess characters (like the ending period) are okay
I'm changing it on RC right now
niecza: sub pangram($s) { set "a".."z" ⊆ $s.lc.comb; }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.") 01:33
TimToady I wonder why you have to say set, if ⊆ implies set
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (to-set @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at <unknown> line 0 (&to-set @ 0) ␤ at …
colomon it's a weird niecza bug, I think
TimToady ⊆ is tighter than set()
niecza: sub pangram($s) { 'a'..'z' ⊆ set $s.lc.comb }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.") 01:35
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (to-set @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at <unknown> line 0 (&to-set @ 0) ␤ at …
01:35 Maddingue joined
TimToady niecza: sub pangram($s) { 'a'...'z' ⊆ $s.lc.comb }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.") 01:35
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Cannot coerce "z" to a Set; use set("z") to create a one-element set␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2018 (to-set @ 6) ␤ at /home/p6eval/niecza/lib/CORE.set…
TimToady niecza: sub pangram($s) { ('a'...'z') ⊆ $s.lc.comb }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.")
p6eval niecza v14-43-gc4ecd5c: OUTPUT«False␤True␤»
TimToady niecza: sub pangram($s) { ('a'..'z') ⊆ $s.lc.comb }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.")
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method Capture in class Range␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (to-set @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at <unknown> line 0 (&to-set @ 0) ␤ at … 01:36
TimToady niecza: sub pangram($s) { ('a'..'z').list ⊆ $s.lc.comb }; say pangram("hello"); say pangram("The quick brown fox jumps over the lazy dog.")
p6eval niecza v14-43-gc4ecd5c: OUTPUT«False␤True␤»
colomon yes, it's Range that's doing it
TimToady inrstn...
oughta work, anyway 01:37
colomon yes
TimToady I assume it defaults to set rather than bag semantics?
colomon The set operators always use set semantics 01:38
TimToady I though I saw some bag tests using set operators
colomon even if you give it two bags
TimToady okay
do we have ⊍ and ⊎ for bags? 01:39
colomon not yet
should we?
colomon terminal draws those symbols impractically small for middle-aged eyes 01:40
TimToady probably, if ordinary ∪ and ∩ force set ops
tell me about it
colomon that's bag union and bag intersection?
TimToady .u ⊍⊎ 01:41
phenny U+228D MULTISET MULTIPLICATION (⊍)
U+228E MULTISET UNION (⊎)
araujo is there exist any variable that keeps the number of iterations inside a for or loop block?
TimToady no, that would be silly, since it's so easy to declare your own 01:42
perl6: for ('a'..'z').kv -> $i, $letter { say "$i $letter" } 01:43
colomon TimToady: I really can't tell the difference between those symbols. :(
p6eval rakudo 14c84d, niecza v14-43-gc4ecd5c: OUTPUT«0 a␤1 b␤2 c␤3 d␤4 e␤5 f␤6 g␤7 h␤8 i␤9 j␤10 k␤11 l␤12 m␤13 n␤14 o␤15 p␤16 q␤17 r␤18 s␤19 t␤20 u␤21 v␤22 w␤23 x␤24 y␤25 z␤»
..pugs b927740: OUTPUT«*** Not a keyed value: VList [VStr "a",VStr "b",VStr "c",VStr "d",VStr "e",VStr "f",VStr "g",VStr "h",VStr "i",VStr "j",VStr "k",VStr "l",VStr "m",VStr "n",VStr "o",VStr "p",VStr "q",VStr "r",VStr "s",VStr "t",VStr "u",VStr "v",VStr "w",VStr "x",VStr "y",VStr "z"]␤ …
TimToady colomon: you could try a bigger font :)
or reading glasses :)
colomon TimToady: I did
araujo I see 01:44
is that pugs breaking there?
:P
TimToady U+228D has a star in the middle (I think) and U+228E has a +
colomon TimToady: at 36-points it looks like a dot and a +
TimToady I guess dot makes sense 01:45
colomon so ⊍ is "intersection" and ⊎ "union"?
01:45 pullphing joined 01:46 pullphing left
TimToady yes, for union you just add the two values 01:46
hence a +
[Coke] soooo tiny.
TimToady I suppose the other is the minimum of two values
araujo ok, thanks TimToady , '.kv' is what I wanted... 01:47
colomon yeah.
TimToady: notions for Texas versions?
TimToady well, (.) and (+) are available, I suppose
colomon ah, and a sensible first approximation, for sure!
01:52 Maddingue left 01:53 Maddingue joined
colomon is now compiling his first stab at implementing them 01:53
and the first stab fails miserably. :) 01:57
colomon luckily has some lovely single malt to cushion the blow. 01:58
niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b).map({ $_ => $a{$_} min $b{$_} }) 02:01
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 1222 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 229 (Mu.Str @ 10) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.settin…
colomon niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b)
p6eval niecza v14-43-gc4ecd5c: OUTPUT«set(a, b)␤»
colomon niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b).map(~*) 02:02
p6eval niecza v14-43-gc4ecd5c: OUTPUT«a b␤»
colomon niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b).map({ $_ => 1 })
p6eval niecza v14-43-gc4ecd5c: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 1222 (warn @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 229 (Mu.Str @ 10) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.settin… 02:03
colomon niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b).map({; $_ => 1 })
p6eval niecza v14-43-gc4ecd5c: OUTPUT«"a" => 1 "b" => 1␤»
colomon niecza: my $a = bag { a => 10, b => 2 }; my $b = bag { a => 3, b => 5 }; say ($a ∪ $b).map({; $_ => $a{$_} min $b{$_} })
p6eval niecza v14-43-gc4ecd5c: OUTPUT«"a" => 3 "b" => 2␤»
colomon think that's it. really don't understand the error.... 02:04
niecza> bag { a => 10, b => 3, c => 17 } ⊍ bag { a => 3, b => 1, d => 2 } 02:05
bag("a" => 3, "b" => 1, "c" => 0, "d" => 0)
that's nearly got it, looks like there's a bug in the bag constructor
niecza> bag { a => 10, b => 3, c => 17 } ⊎ bag { a => 3, b => 1, d => 2 } 02:06
bag("a" => 13, "b" => 4, "c" => 17, "d" => 2)
.... should that be + or max?
+ is mildly useless, as you can just do that with the normal bag constructor
TimToady well, same is true for sets 02:08
colomon true 02:09
colomon is trying to deal with the bug in the bag constructor before anything else... 02:10
colomon loves git stash
so what should bag { a => -10 } do? 02:16
dalek ast: 49f02a2 | (Solomon Foster)++ | S02-types/ (2 files):
Make sure zero-valued pairs are properly ignored in the constructors.
02:18
ecza: 8488bba | (Solomon Foster)++ | lib/CORE.setting:
Ignore pair arguments with 0 values in Bag and KeyBag .new.
02:19
TimToady probably warn and treat it like 0 02:23
or just assume the values are well-formed, if the overhead of checking is too much 02:24
colomon I'd definitely not worry about the overhead of checking 02:25
TimToady there might be use cases for negative and/or complex weights, but maybe we don't call those bags 02:26
colomon or fractional
TimToady currently specced as a KeyWeight
colomon ooooo 02:28
no equivalent constant version? 02:30
TimToady EnumMap maybe 02:31
perl6: enum Foo (:a(1.5)); say a 02:32
p6eval niecza v14-43-gc4ecd5c: OUTPUT«===SORRY!===␤␤Enum values must be Int or Str, but got Rat␤ at /home/p6eval/niecza/lib/CORE.setting line 1598 (List.gist @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/SxmjBKf1GW line 0 (ANON @ 2) ␤ at <unknown> line 0 (ExitRun…
..pugs b927740: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/GCcnPRA_9t line 1, column 1-19␤»
..rakudo 14c84d: OUTPUT«===SORRY!===␤This type cannot unbox to a native integer␤»
TimToady well, there's always constant %hash = ... 02:47
colomon that doesn't do the roll / pick magic, does it? 02:49
dalek ast: 52a5eb9 | (Solomon Foster)++ | S03-operators/bag.t:
Tests for the bag operators.
02:54
02:56 leprevost left
sorear colomon: I thought Hash.pick was supposed to do stuff 02:58
colomon I could be wrong... (easily. it's a big spec.)
sorear I'm not even basing this off the spec; rather, a half-remembered conversation from 2010
... have I really been here two whole years now? *shudder* 02:59
TimToady that's like, most of your life :)
colomon :) 03:00
dalek ast: cc6c403 | (Solomon Foster)++ | S03-operators/bag.t:
Remove unneeded lines.
03:05
sorear "remove unneeded lines: s/A/Λ/" 03:06
TimToady: do you have a preferred font where ⊌ and ⊍ are easily distinguishable at normal text sizes? 03:08
[Coke] "total", 2580, 1, 1343, 12, 3936, 23185 03:09
(pugs)
dalek ast: 77ec25f | coke++ | S (27 files):
pugs fudge
sorear it's worse than 人入 :D 03:10
dalek gs.hs: 1de17bd | coke++ | t/spectest.data:
run more fudged tests
ecza: 49030d6 | (Solomon Foster)++ | lib/CORE.setting:
Add bag operators.
ecza: f90cb5b | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/bag.t.
TimToady I can tell the apart with Monospace 17 on Ubuntu 03:11
*them
03:21 wknight8111 left
sorear yow xft:Monospace-17 is a big font 03:22
03:29 orafu left 03:30 orafu joined
[Coke] phenny: tell masak I only have about 490 more passes before I run out of LHF. 03:30
phenny [Coke]: I'll pass that on when masak is around.
dalek gs.hs: ce76481 | coke++ | t (2 files):
use perl6-limited.pl
gs.hs: ae046ee | coke++ | t/spectest.data:
run more fudged tests
03:44 sisar joined 03:47 PacoAir left
sisar masak++ # for the Bret Victor video 04:07
04:14 cogno joined 04:27 cogno left 04:33 thou joined
sorear Why is "Pugs.hs" called that? 04:52
benabik Well the .hs is the standard extension for Haskell files. 04:55
I dunno where the Pugs part came from.
sorear :p
Haskell *files*.
Pugs.hs is a directory.
Not a file.
So it does not make sense. 04:56
benabik To emphasize that pugs is written in haskell.
I'd guess.
sorear (Incidentally, "Pugs" stands for "Perl6 User's Gopher System"; it's a riff off of Hugs, the "Haskell User's Gopher System", which is a Haskell implementaion that emulates the user experience of Gofer, one of Haskell's immediate ancestors.) 04:57
(Haskell has about 15 immediate ancestors; it was created to unify the huge number of very similar languages that existed at the time)
04:59 thou left 05:30 thou joined
TimToady new entry: rosettacode.org/wiki/Parsing/RPN_to...ion#Perl_6 05:32
06:07 ribayr left
TimToady phenny: tell sjn re Russian pangrams, see my latest rev to colomon++'s pangram checker at rosettacode.org/wiki/Pangram_checker#Perl_6 06:08
phenny TimToady: I'll pass that on when sjn is around.
06:17 birdwindupbird joined 06:18 mucker joined 06:53 thou left
TimToady pugs: 07:02
sorear: it currently says: Welcome to Pugs -- Perl6 User's Golfing System 07:03
araujo ?
TimToady zzz & 07:09
araujo night TimToady
sorear araujo: irclog.perlgeek.de/perl6/2012-02-19#i_5173395 07:15
au moritz++ great post-tournament analysis 07:20
moritz: ftr, "me" also detects whether it's playing against tit-for-tat (or another variant that copies values from @theirs). :) 07:22
sorear o/ au
au hey sorear 07:23
araujo sorear, ah
au Pugs.hs is called that because for a while there's also Pugs.pm (and Pugs/**.pm e.g. search.cpan.org/~fglock/Pugs-Compiler-Rule-0.37/ ) :) 07:24
(eventually the p5 prong became Perlito (and various Moosey extensions).) 07:26
araujo ah, that explains the .hs ;) 07:29
07:38 GlitchMr joined
moritz \o 07:55
sorear o/ moritz 07:57
au: so you're saying there was a "Pugs.pm" directory for a while?
au sorear: there was a Pugs.pm file for a while 07:58
when I created this new repo intending only for hackage, that part was not included in the source tree
.
dalek ecza: 3699928 | sorear++ | src/niecza:
Detect hashness at pblock reduce time, before optimizing
07:59
au and since Perlito (and MooseX::*) subsumes the original p6-on-p5 Pugs.pm effort, I didn't feel necessary to preserve the early p5 parts into its own repo... if I did, though, the repo would probably have been named Pugs.pm or Pugs.p5 or some such. 08:00
sorear au: I'm just wondering why your repo's name has an extension
au *nod*
other candidate names where hs-Pugs/ and Pugs-hs/ 08:01
sorear I didn't realize that perlito was ever called pugs
au yeah. it was back when we were working on a hybrid runtime
fsergot o/
sorear "hybrid runtime"?
au libperl used not only for eval(:lang<perl5>) but also for grammars 08:02
sorear for...grammars?
au yeah, that's Pugs::Compiler::Rule above
and so most of the compilation phase will take place in the p5vm 08:03
while execution takes places in ghc-based vm
sorear why is that a good idea at all?
au mostly because STD (wasn't called that back then) might be easier to transpile into p5 than into parsec.
sorear poor parser support in haskell?
au also p5 by that time had a pretty good metaobject system to use during parsing (Moose.pm) while the haskell equivalent (MO.hs) is less developed. 08:04
.
sorear is hacking on a bootstrapped compiler mostly because STD.pm6 is easier to run using a Perl 6 implementation
au and it's definitely the Right Thing 08:05
sorear at this point I've convinced myself that anything that can parse Perl 6 will look very much like a Perl 6 rules engine 08:06
au the idea of 6to5'ing STD.pm6 was expedient, but probably too much trouble in the long run, especially if you're targetting a vm other than p5's own.
*nod* fully concurred.
moritz especially if you want to be able to expand it with p6 grammar rules
au exactly.
sorear I have vague dreams of somehow transplanting STD into user space, so that it can be expanded by user rules 08:07
au "tell me more about those dreams... what else do you remember?"
08:08 kaare_ joined
au :) 08:08
sorear well, the fundamental problem is that STD would then have to run with no setting whatsoever
I'd need to move most of the logic that isn't strictly parsing into NieczaActions.pm6 08:09
08:09 xinming left
au ah. makes sense. 08:09
08:11 ribayr joined
sorear right now STD is linked against the uplevel CORE 08:13
which precludes "is parsed" and "augment slang"
08:20 xinming joined 08:46 proller joined
sorear I am growing not-entirely-fond of the way action methods work in perl6 08:51
moritz how so?
sorear the fact that you can only pass information up, not down 08:52
the fact that there's no way to avoid building a parse tree 08:53
08:53 proller_ joined
moritz you can avoid building a parse tree by not calling make() 08:54
sorear you can avoid building an AST by not calling make() 08:55
the parse tree is always built
08:57 proller left
moritz you can decide not to capture 08:59
08:59 bkolera left
moritz and you can use <cut> (iirc) assertions to get rid of the pieces you don't need anymore 08:59
sorear If you want to use the result, you have to capture.
When ingy was complaining about grammar design, I too defended the status quo 09:00
and <cut> is no good here because it's all or nothing 09:01
moritz did ingy find a better solution?
09:01 pmurias joined
sorear No 09:01
ingy has *very* thin skin and probably stopped trying as soon as you/we opposed him 09:02
pmurias sorear: re avoiding builiding the parse tree - you want to speed things up?
sorear pmurias: requiring 300mb of ram to parse a 2000 line file is simply unacceptable 09:03
pmurias sorear: maybe try adding a no-parse-tree flag? 09:08
09:08 icwiener joined
sorear That can't work. 09:10
pmurias sorear: theoretically the optimizer could hopefully find that out but it doesn't seem something that can be quickly done
sorear That doesn't even make sense.
pmurias sorear: if we don't use the parse tree anywhere why are we forced to keep it? 09:11
sorear I'm too upset to explain that right now. It will be easy enough to figure out. 09:13
09:13 tarch joined
sorear -> sleep 09:13
moritz hopes sorear++ isn't too upset to sleep
09:14 ruoso joined 09:15 bkolera joined 09:25 pmurias_ joined 09:27 pmurias_ left 09:28 pmurias left, pmurias joined 09:29 icwiener left, icwiener joined
moritz nom: {YOU_ARE_HERE} 09:33
p6eval nom 14c84d: ( no output )
moritz perl6: {YOU_ARE_HERE} 09:34
p6eval niecza v14-47-g3699928: OUTPUT«Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.␤ at System.Collections.Generic.Dictionary`2[System.String,Niecza.SubInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0…
..pugs b927740: OUTPUT«*** No such subroutine: "&YOU_ARE_HERE"␤ at /tmp/vfQ2hDzf2P line 1, column 2-14␤»
..rakudo 14c84d: ( no output )
Teratogen perl6: print 1+1 09:52
p6eval pugs b927740, rakudo 14c84d, niecza v14-47-g3699928: OUTPUT«2»
09:55 xinming_ joined
Teratogen well, that works! 09:55
=)
09:56 xinming left 10:02 mj41 joined 10:13 birdwindupbird left 10:26 pmurias left 10:38 pmurias joined
moritz phenny: tell masak about julialang.org/manual/metaprogramming/ 10:41
phenny moritz: I'll pass that on when masak is around.
10:55 noam_ left 10:56 noam_ joined 10:59 icwiener left, icwiener joined 11:06 fridim_ joined 11:07 lateau_ joined, icwiener left, icwiener joined 11:08 Chillance joined 11:11 icwiener left, icwiener joined 11:13 snearch joined 11:18 tokuhirom joined 11:21 bkolera left 11:34 icwiener left, icwiener joined 11:36 yeltzooo joined
jnthn morn...no, afternoon, #perl6 :) 11:40
Teratogen good morning 11:41
araujo o/ 11:42
masak afternoon! \o/ 11:43
phenny masak: 03:30Z <[Coke]> tell masak I only have about 490 more passes before I run out of LHF.
masak: 10:41Z <moritz> tell masak about julialang.org/manual/metaprogramming/
masak [Coke], ok. moritz, looking.
Teratogen hi masak 11:44
araujo masak, /o/
masak greetings, earthlings.
11:46 GlitchMr left 11:55 icwiener left 11:56 icwiener joined 12:08 icwiener left 12:09 icwiener joined
masak moritz: julialang.org/manual/metaprogramming/ is an interesting read. 12:12
I find two big differences between Julia and Perl 6 in terms of macros. maybe they're a bit related.
the first is the treatment of unbound variables. in Perl 6, the lookup is lexical from the static context of the quasi. in Julia, the lookup is, as far as I can tell, dynamic from the dynamic context of the injected code. 12:13
such dynamic lookup is similar to Perl 5's package variables and its `local` keyword -- and to contextual variables in Perl 6, of course. 12:14
Teratogen Perl 6 should have local 12:15
masak Teratogen: Perl 6 has contextuals and `temp`. feel free to read up on these in S02, S03 and S06 :)
Teratogen ok! 12:16
masak the second is that Julia provides you with an explicit gensym mechanism, and unhygiene is the default. in Perl 6, hygiene is the default, and you have to use the COMPILING namespace to trample over stuff. 12:17
masak would like to make a similar analysis of the macro system at scalamacros.org/ 12:18
12:18 birdwindupbird joined
masak I really liked Julia's facilities for creating and introspecting Expr objects. 12:18
so far, I've assumed that we need to keep Perl6::AST objects mostly opaque to manage cross-implementation compatibility... but I have a feeling that people will start clamoring for introspection capabilities fairly soon. 12:19
12:21 lateau_ left 12:28 icwiener left 12:33 whiteknight joined, mucker left 12:36 mucker joined 12:40 mucker left 12:47 mucker joined 12:49 Util left 12:50 Util joined 12:51 mucker left
dalek kudo/macros2: e4552e2 | masak++ | src/Perl6/Actions.pm:
[Perl6::Actions] fix lexical issues

  ...this is the other half of the partial commit from yesterday.
Fixes two problems:
  - Arranges so that the injected code doesn't get a static outer
   set at compile time, overriding the one we want for it.
  - Fixes a strange discrepancy where ordinary variables were
   recognized from inside the quasi block, but macro parameters
   weren't.
12:53
12:53 mucker joined
masak macros in the macros2 branch are now at a point where they're interesting for early adopters. 12:53
hint, hint.
jnthn masak: Will the branch be mergable soon?
masak: So we can have basic macro support in le release? 12:54
That'll be a good way to get some early adopters ;)
masak I was just going to say -- I consider it mergeable now, but I still have two things I would prefer to do before an actual merge.
(1) understand (and possibly) fix the signature issue we just found.
(2) write spectests to cover the weekend's hacking. 12:55
I expect to do both during the day.
then I'll probably rebase into a macros3 branch, and then we can merge that.
jnthn +1 12:57
masak jnthn++ # vital assistance 12:59
dalek kudo/nom: ac5d99f | jnthn++ | docs/ChangeLog:
A few more ChangeLog entries.
13:05
13:07 robins is now known as robinsmidsrod 13:28 kranius joined 13:35 PacoAir joined
felher masak++ :) 13:39
13:40 snearch left 13:41 ab5tract joined
felher masak: what can macros do right now, when you say "interesting for early adopters"? :) 13:41
13:42 leprevost joined 13:43 birdwind1pbird joined
tadzik masak: I can't wait for the first module you write using macros :) 13:44
13:45 tokuhirom left
Teratogen I like C's text macro preprocessor 13:48
13:51 MayDaniel joined
masak felher: WORKS: macro definitions, macro invications, quasi quotes, sane variable lookup from within quasi quotes. (the last thing was what we worked on last night.) TO DO: quasi splicing, the COMPILING namespace, other things I can't think of now. 14:03
Teratogen: then you should probably enjoy Perl 5's source filters very much.
Teratogen I liked the convenience of doing Perl -H 14:04
I liked the convenience of doing Perl -P I mean
at least on *nix systems
I hear -P has been removed
arnsholt The C macro preprocessor isn't too good though =) 14:05
arnsholt likes TeX
Teratogen the C preprocessor is simple yet powerful
Perl is written in C and that C code makes extensive use of the preprocessor 14:06
masak good riddance on -P, I say.
just reading the documentation on it makes me shudder.
arnsholt I know. IIRC it's one of the reasons the perl guts are so hard to hack
masak :( 14:07
arnsholt If you're doing text-substitution macros, I much prefer the TeX approach (Turing-completeness by string rewriting)
Alternatively, AST-style macros like Lisp, Perl 6 and such are quite nice too
Teratogen I like the simplicity and power of the C preprocessor 14:11
maybe I am showing my age. =/
14:12 GlitchMr joined 14:13 birdwind1pbird left
masak the C preprocessor has simplicity as an advantage, but I wouldn't call it powerful. 14:15
rather, it trips on itself for anything remotely complex.
14:15 noam__ joined
masak its strengths come from the fact that it's most often used for simple things. 14:16
14:18 noam_ left
Teratogen masak, I looked at a Perl 6 macro definition 14:18
looked overly complicated
felher masak: following your old blogpost "What macros really are", i tried 'macro LOG($message) { quasi { say {{{$message}}}; } }; LOG("some string");'. But this just gives me 'Block.new()'. Don't {{{}}} work any more?
masak: Or did i just misunderstand something? 14:19
masak felher: {{{}}} does not work *yet*. 14:20
it's the D2 step of my grant work.
I'm at the end of D1 now.
14:20 ab5tract left
masak ({{{}}} is the "quasi splicing" I wrote under TO DO above) 14:20
felher masak: ah, i see, thanks :) 14:21
14:22 tarch left, p6eval left, tarch joined 14:24 Util left, p6eval joined, ChanServ sets mode: +v p6eval 14:25 Util joined
masak Teratogen: macros in Perl 6 are fundamentally quite non-complicated, I think. 14:27
they're just routines that deal in ASTs.
14:29 Chillance left 14:33 ab5tract joined 14:40 lateau_ joined
masak re the custome string prefixes in Julia (last on the metaprogramming page), it's a nice unification. of course, from the Perl 6 perspective, it doesn't go far enough, since all the strings are still just strings, and not first-class citizens to the parser. 14:42
it's essentially a two-pass solution, even though it's a bit neater than Perl 5's. 14:43
& 14:45
14:45 Chillance joined 14:57 xinming_ left, GlitchMr left 14:59 xinming joined 15:11 att joined 15:18 att left 15:21 icwiener joined 15:35 att joined 15:36 att is now known as att_ 15:44 Psyche^ joined, noam__ left, noam__ joined 15:47 mj41 left 15:48 Patterner left, Psyche^ is now known as Patterner, retupmoca joined 15:52 pmurias left 15:53 pmurias joined 16:06 birdwindupbird left
flussence yay, Array()! now I can port all my terrible PHP code to rakudo :D 16:06
jnthn Oh my, what have I done... :P 16:13
tadzik :P 16:15
masak nom: say Array(1, 2, 3) 16:18
p6eval nom ac5d99: OUTPUT«1 2 3␤»
masak nom: say Hash(1, 2, 3, 4)
p6eval nom ac5d99: OUTPUT«Method 'Hash' not found for invocant of class 'Parcel'␤ in <anon> at src/gen/Metamodel.pm:3430␤ in <anon> at src/gen/Metamodel.pm:3427␤ in <anon> at src/gen/Metamodel.pm:3422␤ in block <anon> at /tmp/zb8zldT4tP:1␤␤»
flussence actually, php does have one nice feature I wish more languages had - you can do $hash += $default_values, which is a bit shorter than (p5) %hash = {%default_values, %hash}.
masak if Array() works, why shouldn't Hash() 16:19
flussence: yeahbut
flussence masak: =>?
masak flussence: + is arithmetic
flussence oh, didn't read the error
16:19 pothos left 16:20 pothos joined
masak also, in p5, it's %hash = %default_values, %hash. which is pretty short if you ask me. 16:20
flussence tr/{}/()/ :)
masak oh, right. 16:22
without the parens is p6.
flussence perl6: my %a = one => 1, two => 2; my %b = three => 3, four => 4, two => 7; %a.=push(%b); say %a.perl;
p6eval niecza v14-47-g3699928: OUTPUT«{"four" => 4, "one" => 1, "three" => 3, "two" => [2, 7]}.hash␤»
..rakudo ac5d99: OUTPUT«("one" => 1, "two" => [2, 7], "three" => 3, "four" => 4).hash␤»
..pugs b927740: OUTPUT«*** Can't modify constant item: VUndef␤ at /tmp/HdHjYh0iln line 1, column 70-82␤»
16:22 pothos left
flussence hm, something like that but without the magic arrays 16:22
16:22 pothos joined
masak niecza sorts its keys alphametically. rakudo seems to prefer to retain insertion order. 16:23
nom: my %a = one => 1, two => 2; my %b = three => 3, four => 4, two => 7; %a = %b, %a; say %a.perl
p6eval nom ac5d99: OUTPUT«("three" => 3, "four" => 4, "two" => 2, "one" => 1).hash␤»
flussence perl6: my %a = one => 1, two => 2; my %b = three => 3, four => 4, two => 7; %a ,= %b; say %a.perl; # just wondering... 16:24
p6eval niecza v14-47-g3699928: OUTPUT«{"four" => 4, "one" => 1, "three" => 3, "two" => 7}.hash␤»
..rakudo ac5d99: OUTPUT«("one" => 1, "two" => 7, "three" => 3, "four" => 4).hash␤»
..pugs b927740: OUTPUT«{("one" => 1), ("two" => 2)}␤»
flussence :D
perl6: my %a = one => 1, two => 2; my %b = three => 3, four => 4, two => 7; %a R,= %b; say %a.perl; 16:25
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "R"␤ expecting operator␤ at /tmp/OwQtcT__Kw line 1, column 73␤»
..rakudo ac5d99: OUTPUT«("one" => 1, "two" => 2).hash␤»
..niecza v14-47-g3699928: OUTPUT«===SORRY!===␤␤Cannot reverse the args of ,= because assignment operator operators are too fiddly at /tmp/4Mkuamoh7m line 1:␤------> three => 3, four => 4, two => 7; %a R,=⏏ %b; say %a.perl;␤␤Unhandled exception: Unable…
16:25 pothos left
flussence perl6: my %a = one => 1, two => 2; my %b = three => 3, four => 4, two => 7; %a [R,]= %b; say %a.perl; 16:25
p6eval rakudo ac5d99: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " %b; say %"␤»
..niecza v14-47-g3699928: OUTPUT«{"four" => 4, "one" => 1, "three" => 3, "two" => 2}.hash␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "["␤ expecting operator␤ at /tmp/6m2mqy7gco line 1, column 73␤»
16:25 pothos joined
flussence niecza++ 16:25
masak sorear: notice 'assignment operator operators' above. 16:27
flussence (the best part is I didn't have to look that up in a manual!) 16:33
16:34 araujo left 16:35 araujo joined 16:37 mucker left
jnthn masak: Hash(...) - just an unimpl Parcel.Hash method. 16:41
16:45 thou joined
masak nod. 16:50
17:01 noam__ left 17:02 noam__ joined 17:12 mucker joined 17:14 mucker left
moritz \o 17:15
jnthn hi, moritz
Just a couple of weeks to the GPW ;) 17:16
moritz yes, you should make travel arrangements! 17:17
(unless you already did)
fwiw I'm not having much lock with the sink branch
statements inside subroutines don't get sink context
and I don't see why
17:18 mucker joined
moritz I've even tried to add a call to Perl6::Sinker.sink inside the statementlist action method 17:18
but it didn't any good
jnthn moritz: masak and I already have travel arrangements
moritz and since we don't have a working PAST dumper, I don't know how to approach debugging
jnthn, masak: then please /msg or email me your arrival and departure dates 17:19
maybe we can make a Lasagne for dinner one day, or so :-)
tadzik om nom
jnthn moritz: oh, I shoulda seen this sooner 17:20
moritz: in visit_block:
$block[1] := self.visit_children($block[1]);
That will visit the statements
But any *nested* PAST::Blocks will live in $block[0] 17:21
You want to ignore the other things inside [0], but anything that .isa(PAST::Block) wants to be visited.
17:26 shinobicl___ joined
masak ooh, lasagna! 17:28
sorear pmurias: I'm sorry for taking out frustration on you last night. 17:30
good * #perl6
colomon o/
masak sorear! \o/ 17:32
sorear the trouble with getting angry at how slow my compiler is, it doesn't actually make it faster...
std: 1 ![=] 2 17:34
p6eval std 52f3895: OUTPUT«===SORRY!===␤Cannot negate = because list assignment operators are too fiddly at /tmp/BH_9_Gtt86 line 1:␤------> 1 ![=]⏏ 2␤Cannot negate [=] because list assignment operators are not iffy enough at /tmp/BH_9_Gtt86 line 1:␤------> …
sorear std: 2 R,= 3 17:35
p6eval std 52f3895: OUTPUT«===SORRY!===␤Cannot reverse the args of ,= because assignment operator operators are too fiddly at /tmp/YYkX9l0bLd line 1:␤------> 2 R,=⏏ 3␤Check failed␤FAILED 00:01 109m␤»
masak ah, STD has the LTA error too. 17:38
17:39 MayDaniel left 17:42 birdwindupbird joined 17:55 tarch left 18:00 birdwind1pbird joined, birdwind1pbird left, birdwind1pbird joined, birdwindupbird left 18:01 birdwind1pbird is now known as birdwindupbird, pmurias left 18:02 MayDaniel joined 18:03 pmurias joined 18:07 countley left 18:16 GlitchMr joined 18:17 pmurias_ joined, pmurias_ left 18:19 mucker left 18:33 sisar left
sjn but one thing that's missing is someone who's working on niecza. sorear isn't able to come 18:48
phenny sjn: 06:08Z <TimToady> tell sjn re Russian pangrams, see my latest rev to colomon++'s pangram checker at rosettacode.org/wiki/Pangram_checker#Perl_6
sjn oops
#wrong
ooh :) 18:49
sjn looks at rosettacode.org
18:49 lateau_ left 18:53 hundskatt joined, hundskatt left 18:54 hundskatt joined 19:01 birdwindupbird left
masak that might have been the first time on the channel that a ww triggers a phenny message ;) 19:05
sjn hehe 19:07
btw
is the "set" keyword available in 2012.01?
jnthn No 19:08
We do now (as of a few days ago) have object hashes, however...so Rakudo should be able to get sets quite properly now 19:09
19:09 hundskat` joined, shinobicl___ left
sjn ok, cool 19:10
dalek p/bs: 11f08d2 | jnthn++ | src/core/NQPRoutine.pm:
Update dispatcher derevation so it clones the things it should.
19:23
p/bs: 7500b8a | jnthn++ | src/ (3 files):
Ensure we do the required attachment of code objects to code refs.
p/bs: 3169880 | jnthn++ | src/ (2 files):
Last couple of fixes needed to get new multi-method stuff passing tests again.
p/bs: 985e7d1 | jnthn++ | src/NQP/World.pm:
Fix a thinko; gets us much further into deserializing NQPCORE.setting.
p/bs: 9cc8b4a | jnthn++ | src/6model/serialization.c:
Fix some issues in type object deserialization.
p/bs: 1b41ba7 | jnthn++ | src/NQP/World.pm:
Add a missing $NEW_SER check, which gets us a little further into the build.
19:26 mikemol joined 19:28 MayDaniel left 19:29 hundskat` left, hundskatt left 19:38 dbr joined 19:39 icwiener left 19:45 fridim_ left 19:50 aindilis joined 20:03 fridim_ joined 20:09 mj41 joined
dalek ecza: ade397a | sorear++ | src/ (4 files):
A first attempt to reduce parse tree data retention; does not help as much as I would like
20:09
sorear looking at some output from the Mono heap profiler, it seems that the largest portion of the memory allocation is ... the LTM engine 20:11
masak is less than surprised 20:12
sorear I am. The LTM engine uses about 5% of the runtime but apparently accounts for around 50% of the heap load
20:13 Trashlord left 20:14 Trashlord joined
sorear now I get to tackle the problem of the massively overlarge automatons that STD generates... 20:15
20:20 pothos left 20:22 y3llow joined, pothos joined
dalek kudo/sink: c25fcb8 | moritz++ | /:
Merge branch 'sink', remote branch 'origin/sink' into sink
20:22
kudo/sink: 8274182 | moritz++ | src/Perl6/Sinker.pm:
[sinker] recurse into nested blocks
moritz still doesn't run for-loops inside subs 20:24
20:25 pothos left, pothos joined 20:29 Chillance left 20:30 Chillance joined
dalek p/bs: ba5e046 | jnthn++ | src/6model/serialization.c:
Improve an error to aid debugging.
20:32
p/bs: 7876241 | jnthn++ | src/Regex.pir:
Pop a couple of things from the PIR-based Regex engine into an SC, so we don't try and serialize things from here.
p/bs: 7c96cef | jnthn++ | src/6model/serialization.c:
Another error tweak.
p/bs: 8768530 | jnthn++ | src/6model/serialization.c:
On deserialization, make sure an SCs static code refs are all correctly annotated.
p/bs: bacf8fb | jnthn++ | src/Regex (4 files):
More SC fakery for the old PIR-based regex engine, so the serializer doesn't get upset over it (it's all throwaway once we bootstrap with QRegex anyway). With this, we now complete the build of NQP, with serialization/deserialization of compilation units along the way. The final executable doesn't actually work just yet, though the immediate cause is a known NYI. \o/
20:32 pmurias left 20:33 localhost left
jnthn moritz: If you put a say(...) before the call to visit_block does it ever run? 20:34
moritz: btw, you can for @($block[0]) { ... } instead of the while loop :)
moritz jnthn: yes (though not very often, about 5 to 10 times while compiling the setting)
20:34 localhost joined
moritz and can I then bind back into $_ and have the changes in $block[0][$i] ? 20:35
jnthn moritz: Uh. We'd expect it to do it LOADS of time at the end though?
moritz: No but...we don't ever replace the block wholesale, do we?
moritz: That is, we only fiddle with stuff inside the block. 20:36
So the binding of it there is probably useless anyway.
moritz jnthn: well, I've changed the all the visit_ calls to return the modified value, since I was confused by the different ways that different visit_ blocks either return modified stuff or modified the arguments
jnthn moritz: Heh. I had those cases very deliberately separated out in the optimizer to keep things sane. :) 20:37
moritz :-)
jnthn moritz: OK, here's my guess 20:38
moritz: The few bits of output you're seeing are coming from when we do dynamic compilation
moritz: Meaning that the final big sinkage at the end isn't doing much of anything.
dalek kudo/sink: 5705951 | moritz++ | src/core/traits.pm:
remove a workaround in "is export" trait. Now we can load Test.pm, but the underlying problem is not fixed
20:39
moritz jnthn: yes, that's my guess too
also memory consumption would be much higher (due to many more PAST nodes) during compilation if it worked properly 20:40
jnthn moritz: oh!
moritz: Try passing $unit to Sinker in Actions, not $mainline 20:41
moritz oh
but, don't I do a second pass over the whole setting then? 20:42
jnthn moritz: oh, are you calling sinker from elsewhere too? 20:43
jnthn had thought it was a final pass at the end
moritz well, I do one pass over the setting while compiling the setting
and I don't want to do a second pass while compiling a user program
erm, no, braino 20:44
nevermind
jnthn moritz: :)
fsergot nom: my Sub $s = sub { say 1; }; $s; $s();
p6eval nom ac5d99: OUTPUT«1␤»
jnthn nom: my Sub &s = sub { say 1; }; s; s(); # btw
p6eval nom ac5d99: OUTPUT«Type check failed in assignment to '&s'; expected 'Callable' but got 'Sub'␤ in block <anon> at /tmp/jnzDL3YhiD:1␤␤»
jnthn er :)
moritz nom: say Sub ~~ Callable 20:45
p6eval nom ac5d99: OUTPUT«True␤»
jnthn nom: my &s = sub { say 1; }; s; s(); # btw
p6eval nom ac5d99: OUTPUT«1␤1␤»
jnthn moritz: my Sub &s = ... would mean a sub that returns a Sub.
moritz oh 'Sub &' is like Callable[Sub]
jnthn Yeah
That error reporting could most certainly be better.
sorear there is one NFA in STD, with 18,760 states, that is generated from an |-alternation in some anonymous regex 20:46
moritz wow
sorear now I just need more instrumentation to figure out *which* anonymous regex :/ 20:47
20:49 zby_home___ joined
moritz isn't that obvious from the states? :-) 20:49
20:49 zby_home___ left 20:50 whiteknight left, whiteknight joined 20:52 zby_home joined
masak good night, #perl6 20:57
jnthn sleep well, masak
moritz: btw, the reason i added that <sunk> thing the other day is to make sure that we don't re-sink things that got sunk due to dynamic comp.
moritz sinking $unit instead of $mainline doesn't seem to have helped 20:58
21:00 GlitchMr left
moritz runs out of ideas 21:01
jnthn moritz: OK, I may get to look at it a bit later... 21:04
fsergot Could somebody help me? :)
jnthn fsergot: No. You're on your own.
:P
fsergot: Just ask. :)
fsergot I have a class with $.subr, I want to assign to it a subroutine. How should i do this? :) 21:06
tadzik object.subr = sub {}; assuming $.subr is rw 21:07
fsergot I tried has Sub $.subr;
And has &.subr;
jnthn fsergot: Assign at what point?
tadzik that's not necessary
jnthn nom: class A { has $.subr }; my $x = A.new(subr => sub { say 42 }); $x.subr().()
p6eval nom ac5d99: OUTPUT«42␤»
jnthn fsergot: ^^ is one example 21:08
fsergot: Note that $x.subr() won't call the sub - because the () are going to calling the accessor method.
fsergot This is exactly what I want. :)
21:08 plobsing joined
fsergot Looks strange with. .() :) 21:08
tadzik++, jnthn++ thanks. :) 21:09
jnthn Welcome
fsergot jnthn, another question... :) 21:12
How can I execute $.subr in class' method? 21:13
jnthn nom: class A { has $.subr; method exec { $.subr().() }; my $x = A.new(subr => sub { say 42 }); $x.exec
p6eval nom ac5d99: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
jnthn oops
nom: class A { has $.subr; method exec { $.subr().() } }; my $x = A.new(subr => sub { say 42 }); $x.exec 21:14
p6eval nom ac5d99: OUTPUT«42␤»
jnthn nom: class A { has $.subr; method exec { $!subr() } }; my $x = A.new(subr => sub { say 42 }); $x.exec
p6eval nom ac5d99: OUTPUT«42␤»
fsergot Ehh, it's clear now. :) Thank You.
jnthn That second way is non-virtual.
But may be what you want anyway ;)
21:14 snearch joined
fsergot jnthn, why $! ? What does it mean? 21:15
jnthn fsergot: $!foo refers to the attribute storage slot in the object
$.foo gets the attribute by calling the accessor method 21:16
21:16 MayDaniel joined
jnthn has $.foo; # actually like "has $!foo; method foo() { $!foo }" 21:16
fsergot Great. thanks. :) 21:17
tadzik nom: class A { has $.subr }; my $x = A.new(subr => sub { say 42 }); $x.subr.() 21:21
p6eval nom ac5d99: OUTPUT«42␤»
sorear moritz: looking at the states makes me think it's the condition in 'signature'. I think I have some overzealous 'anonymous regex' checking
moritz: in [ <a> || <b> ], is <a> supposed to be visible to LTM? Does it say one way or the other anywhere? 21:22
moritz sorear: I have no idea 21:24
jnthn fwiw, I'm pretty sure QRegex votes "no" here 21:25
dalek ecza: 5f47b81 | sorear++ | src/STD.pm6:
Fix inside of [ ] being treated as anonymous
21:29
sorear All I know is I've gone back and forth on this a few times :| 21:30
21:33 dbr left 21:38 ab5tract left, conntrack joined 21:44 awwaiid joined 21:46 kaare_ left
dalek ecza: 94ee991 | sorear++ | lib/Cursor.cs:
Add a less verbose way to get node count info
21:47
ast: 5adcc30 | coke++ | / (12 files):
pugs fudge
21:49
gs.hs: 23b7d35 | coke++ | t/spectest.data:
run more fudged tests
21:52
p/bs: 83d190d | jnthn++ | src/6model/serialization.c:
Serialize mode flags.
p/bs: 96892f6 | jnthn++ | src/NQP/World.pm:
We don't want to serialize the Parrot-specific vtable mapping stuff, so make sure we fix it up after deserialization.
p/bs: 067d904 | jnthn++ | src/6model/serialization.c:
Serialize/deserialize boolification spec. Now we get an NQP executable that basically works.
p/bs: 25e15e6 | jnthn++ | src/NQP/World.pm:
Turn on serializer by default now. Some tests fail...triage time.
[Coke] "total", 2760, 2, 1426, 12, 4200, 23233 21:54
(pugs)
sorear % of rakudo? :) 21:57
perl6: say ("foobar" ~~ / foo | foobar /)
p6eval niecza v14-48-gade397a: OUTPUT«#<match from(0) to(6) text(foobar) pos([].list) named({}.hash)>␤»
..rakudo ac5d99: OUTPUT«=> <foo>␤␤»
..pugs b927740: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20111008/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HAND…
sorear perl6: grammar G { token TOP:foo { foo } ; token TOP:foobar { foobar } } ; say G.parse("foobar") 21:58
p6eval pugs b927740: OUTPUT«*** No such method in class G: "&parse"␤ at /tmp/jyYWX7RZ9B line 1, column 73 - line 2, column 1␤»
..niecza v14-48-gade397a: OUTPUT«#<match from(0) to(6) text(foobar) pos([].list) named({}.hash)>␤»
..rakudo ac5d99: OUTPUT«Method 'TOP' not found for invocant of class 'G'␤ in method parse at src/gen/CORE.setting:8006␤ in block <anon> at /tmp/pqFnkr5Y__:1␤␤»
sorear perl6: grammar G { proto token TOP {*} ; token TOP:foo { foo } ; token TOP:foobar { foobar } } ; say G.parse("foobar")
p6eval niecza v14-48-gade397a: OUTPUT«#<match from(0) to(6) text(foobar) pos([].list) named({}.hash)>␤»
..rakudo ac5d99: OUTPUT«#<failed match>␤»
..pugs b927740: OUTPUT«*** No such method in class G: "&parse"␤ at /tmp/7ExKliFxsR line 1, column 95 - line 2, column 1␤»
sorear Why is rakudo failing? 21:59
jnthn Needs to be TOP:sym<foo> 22:00
sorear perl6: grammar G { proto token TOP {*} ; token TOP:sym<foo> { foo } ; token TOP:sym<foobar> { foobar } } ; say ~G.parse("foobar")
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "<foo"␤ expecting ":", "is" or "{"␤ at /tmp/zzvFGMHoZf line 1, column 48␤»
..rakudo ac5d99, niecza v14-48-gade397a: OUTPUT«foobar␤»
sorear perl6: grammar G { proto token TOP {*} ; token TOP:sym<foo> { foo } ; token TOP:sym<foobar> { foobar || foobar } } ; say ~G.parse("foobar")
p6eval rakudo ac5d99: OUTPUT«foo␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "<foo"␤ expecting ":", "is" or "{"␤ at /tmp/XViFSsb5WL line 1, column 48␤»
..niecza v14-48-gade397a: OUTPUT«foobar␤»
sorear jnthn: I'm curious why
jnthn We've never had the TOP:foo sugar in NQP or Rakudo 22:01
I forget exactly what Pm said about it. :)
Probably ain't so hard to implement. 22:02
22:04 szabgab_ is now known as szabgab
jnthn sorear: oh, or did you meant the behavior just a moment ago? 22:05
sorear: In that case - because the NFA builder simply doesn't pay any attention to alt_seq 22:06
sorear No, I meant TOP:foo. 22:09
jnthn ah, OK
sorear "Whitespace required after keyword" sub none (*@p) is pure { no⏏ne @p } 22:10
apparently, making that change to SeqAlt *does* break STD 22:11
jnthn Ah. Then I can probably take that to mean that Rakudo's seq_alt behavior is wrong.
sorear or maybe niecza's STD is just brokenly depending on nieczabugs. 22:13
jnthn Also possible; I was guessing you'd copied STD's interpretation of seq_alt somewhere though, and STD tends to be good as spec in many cases... 22:14
dalek p/bs: 08757d6 | jnthn++ | src/NQP/World.pm:
Various fixes to handling of code refs. NQP with the serializer now passes all of t\nqp. \o/ Doesn't mean were there yet, mind; role serialization is still busted, meaning that QRegex can't be compiled. But...closer.
22:15
sorear pokes TimToady
jnthn s/were/we're/
22:17 tarch joined 22:24 MayDaniel left
dalek p/bs: bbe4085 | jnthn++ | src/NQP/World.pm:
Remove option to use the serializer (it's always on now) and all old deserialization code gen for NQP, which muchly clears up World.pm.
22:28
benabik It would be interesting if dalek reported basic diffstat information... 22:33
39 additions and 263 deletions (for bbe4085)
fsergot "Incorrect pre-compiled version of src/gen/Metamodel.pm loaded" 22:38
What can I do with this? :)
I have nom v. 2012.01-152 22:39
jnthn fsergot: Probably means you've some pre-compiled .pir module.
(Which is now out of date)
fsergot IO::Select probably
It's the only module I use in this script. 22:40
sorear niecza: no$a 22:41
p6eval niecza v14-50-g94ee991: OUTPUT«===SORRY!===␤␤Two terms in a row (listop with args requires whitespace or parens) at /tmp/4gXhl04eTS line 1:␤------> no⏏$a␤␤Undeclared routine:␤ 'no' used at line 1␤␤Parse failed␤␤»
sorear niecza: my$a
p6eval niecza v14-50-g94ee991: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/HEHpoo98mO line 1:␤------> my⏏$a␤␤»
sorear niecza: if2
p6eval niecza v14-50-g94ee991: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'if2' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ at /home…
sorear std: if$a { } 22:42
p6eval std 52f3895: OUTPUT«===SORRY!===␤Two terms in a row (listop with args requires whitespace or parens) at /tmp/FK8q2fxHE4 line 1:␤------> if⏏$a { }␤ expecting any of:␤ POST␤ argument list␤ bracketed infix␤ infix or meta-infix␤ postfix␤
..postfix_prefi…
sorear std: no+5
p6eval std 52f3895: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'no' used at line 1␤Check failed␤FAILED 00:01 109m␤»
22:56 fridim_ left
dalek p/bs: 790fc9a | jnthn++ | src/6model/serialization.c:
Use a seen hash to avoid duplicate strings in the string heap.
22:56
22:57 tokuhirom3 joined 22:58 mj41 left 22:59 thou left
jnthn Enough for today... o/ 23:00
tadzik o/ 23:01
23:06 Trashlord left 23:13 pernatiy joined 23:16 PacoAir left
sorear phenny: tell TimToady I would like explicit confirmation that in [ <a> || <b> ], <a> is supposed to be visible to LTM. 23:24
phenny sorear: I'll pass that on when TimToady is around.
sorear having changed the behavior, STD is quite completely broken. This is not an easy fix. 23:25
23:25 y3llow left 23:26 pothos left 23:27 pothos joined 23:28 y3llow joined 23:29 pothos left 23:30 pothos joined, y3llow left
sorear There is a problem in that LTM automatons are often far too "rich", modelling the grammar to a much greater extent than is really needed 23:30
23:30 y3llow joined 23:32 tarch left, pothos left, y3llow left 23:33 pothos joined, y3llow joined 23:35 y3llow left, y3llow joined, pothos_ joined 23:37 pothos left 23:38 pothos_ is now known as pothos 23:44 sftp left 23:47 sftp joined 23:50 sftp left 23:55 sftp joined 23:58 Trashlord joined 23:59 shinobicl___ joined