»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
jnthn Incomplete 00:00
cxreg ok cool
jnthn pmichaud++ is hacking on it ATM though. :-)
It should be in decent shape by the time R* lands.
cxreg are Atlanta and * different releases?
jnthn Yes
Atlanta is just the normal boringly regular compiler release. 00:01
* will be a distribution release.
(e.g. compiler + module installation tools + some modules)
cxreg right on
i've been preaching it to a lot of people recently who've lost the thread a few years ago 00:02
[Coke] jnthn: why are you speaking bulgarian now?
dalek kudo: 4ae2183 | jonathan++ | src/core/Cool-str.pm:
Fix dodgy split signatures.
kudo: 4578afc | jonathan++ | src/pmc/ (8 files):
Apply patch from cognominal++ to remove now unrequired need_ext from our PMCs.
kudo: 5e6fa97 | jonathan++ | src/metamodel/ClassHOW.pir:
Add a (most likely accidentally) missing :load, which gets perl6.pbc loadable
[Coke] (or is that just something in the same vicinity?)
jnthn [Coke]: I didn't do it on purpose. :-P
[Coke]: It was Slovak - I didn't know it was the same in Bulgarian. :-)
[Coke]: Works in most Slavic languages I guess.
[Coke] da. 00:03
jnthn That sure doesn't work in all of them. :-)
dukeleto jnthn: should I try to make a test that verifies that perl6.pbc is loadable ? 00:05
[Coke] Opa
jnthn dukeleto: Could be good - I'm just wondering where we'd put it though. 00:06
It doesn't belong in spectest.
Oh, I guess it could go in as part of "make test"
PIR files surely can be run in that too.
dukeleto jnthn: yes, that is what I was thinking
jnthn OK, +1
dukeleto jnthn: i could use Q:PIR or plain PIR
jnthn: cool
jnthn dukeleto: If you use Q:PIR you're already in Perl 6 though. ;-) 00:07
So perl6.pbc is already loaded. ;-)
dukeleto jnthn: duh :)
jnthn: so yes, a PIR test file is needed
jnthn Aye
dukeleto jnthn: any specific dir in t/ that I should put it in? 00:08
jnthn Hmm
Good question.
dukeleto jnthn: in 00-parrot or 01-sanity ?
00:09 patspam left
dukeleto jnthn: or in a new dir? 00:09
jnthn Yeah, I think a new one
Since the other two contain Perl 6 sanity tests.
Struggling to think of a good name.
interop maybe 00:10
dukeleto jnthn: interop is a nice word, or maybe embed 00:11
jnthn Yeah, embed works too
dukeleto jnthn: i first ran into this issue via embedding Parrot in C and trying to load perl6.pbc
jnthn: ok, i will whip up a test after going for run. thanks for pushing that :load fix so quickly! jnthn++ 00:12
jnthn Thanks for debugging it. 00:13
What are you embedding it in, out of interest?
dukeleto jnthn: i hack on PL/Parrot, which embeds Parrot in PostgreSQL 00:15
jnthn Ah, cool.
dukeleto jnthn: so you can write stored procedures in PIR or any language Parrot can grok
jnthn So it'd enable writing...stored procs in Perl 6?
dukeleto jnthn: indeed
jnthn Aha. :-)
00:15 lestrrat is now known as lest_away
dukeleto jnthn: PL/PIR works, so now I am trying to get Rakudo playing nicely with it 00:16
jnthn It'd be cool to see an example of it, once you get it working. :-)
dukeleto jnthn: the bytecode actually loads now!
jnthn That's a good step forward. :-)
Beyond that in theory it's just compreg 'perl6' to get the compiler object. 00:17
dukeleto jnthn: github.com/leto/plparrot
jnthn And .eval on that.
dukeleto jnthn: i am working in the plperl6 branch
jnthn: yes, now I have some postgres-specific hacking to do, and some stub Rakudo code to wrap around what the source of the stored procedure is 00:18
jnthn Any code base that has a function named make_sausage must be awesome.
elog(NOTICE,"CANNOT MAKE SAUSAGE"); # :-D 00:19
dukeleto jnthn: :) I figured out a bit of undocumented knowledge after a long night of hacking, and that is reflected in some of my function names and error messages ;)
00:20 lue joined
jnthn -Ofun :-) 00:20
lue ohai world
dukeleto jnthn: "making sausage" =~ data marshalling between Postgres datatypes and parrot datatypes
lue (where did the ofun come from?)
dukeleto jnthn: yes, this project is -Ofun
jnthn lue: My keyboard.
dukeleto lue: i believe a blog post by AudreyT
jnthn Yes, originally :-) 00:21
Certainly it was coined by audreyt
dukeleto goes for a -Ofun run 00:22
00:24 masonkramer joined
cognominal so the official release after rakudo star will be fun rakudo? 00:25
lue no, I meant WHY :)
00:25 xomas left, zorgnax left
lue
.oO(-ORakudo)
00:26
cognominal I would also see rakudo imago meaning the puppa has at last became a butterfly.
with hopefully a longer life tan a butterfly.
jnthn cognominal: Heh, after Rakudo * it's time to break everything again. ;-) 00:28
(No, not really. :-))
Wolfman2000 ...I was about to say jnthn
jnthn Well, it will be time to dig in and start on the next big chunk of features. 00:29
lue I thought that was a given :D
Wolfman2000 what is left to implement with Perl 6 anyway?
jnthn Wolfman2000: S09 is largely unimplemented in Rakudo at the moment.
cognominal I want :=
I don't dig why it is in nqp and not in rakudo... 00:30
binding arguments to parameters is:= substance...
Wolfman2000 large unimplemented...data structures?
lue Me too. I need it for my project.
jnthn cognominal: At least somewhat because in NQP we don't have to make it live alongside assignment.
Wolfman2000 could have thought those worked
00:31 yinyin joined
jnthn Wolfman2000: Well, more the native types stuff. 00:31
00:31 masonkramer left
jnthn Wolfman2000: It's partly an efficiency thing too. 00:31
00:31 masonkramer joined
cognominal jnthn++ # thx for the explanation. 00:31
We will have := for rakudo * ?
I hope.
lue rakudo: my @a = [1,2,3,0,0,0]; @a[3..5] := @a[0..2]; @a[4] = 9; say @a 00:32
p6eval rakudo 4df508: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 630:CORE.setting␤ in main program body at line 11:/tmp/kMc22qp8kR␤»
jnthn cognominal: A long story short though, we can't just implement := in Rakudo by compiling it down to the same thing we do in NQP and expect it to work.
Wolfman2000 and range operator setting...alright, point
lue If only you could set the WHERE of a variable...
jnthn That said...
lue rakudo: my $a = 3; say $a.WHERE
p6eval rakudo 4df508: OUTPUT«57526864␤»
jnthn rakudo: my $a = 1; my ($b is rw) := $a; $b = 2; say $a; 00:33
p6eval rakudo 4df508: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤␤ in main program body at line 11:/tmp/kSWBifuFoD␤»
jnthn Aww
Wolfman2000 ...reminder. Does Perl 6 have a native bool type yet?
jnthn Wolfman2000: Depends what you mean by "native" but there is a Bool type.
rakudo: say True.WHAT
p6eval rakudo 4df508: OUTPUT«Bool()␤»
Wolfman2000 ...why not just typedef it to int1 or something? 00:34
jnthn Wolfman2000: Well, because we don't have int1 yet. :-)
Wolfman2000: That's in with the S09 stuff I mentioned.
cognominal Wolfman2000, all value are boxed so far.
jnthn cognominal: Yes, good explanation.
:-)
rakudo: my $a = 1; my ($b) := $a; $b = 2; say $a; 00:35
p6eval rakudo 4df508: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/SzMS2fT17z␤»
jnthn Hmm
cognominal anyway unboxed values would not buy as much as expected because we don't have JIT working.
jnthn cognominal: Yeah, that's unfortunately true.
cognominal in as sense a shortcoming is a consolation for another :) 00:36
pmichaud good evening
lue ohai pmichaud o/
Wolfman2000 Hmm...do modifier adverbs work yet? 00:37
00:37 k23z__ left
jnthn evening, pmichaud 00:37
cognominal I note that jnthn did not say anything about := and rakudo * :) 00:39
dodging my question? :) 00:40
jnthn huh? what question?
;-)
cognominal: We may well get it but it's below getting lists and closures fixed up.
pmichaud := should be available for R*, yes.
jnthn Ah, cool. pmichaud++ :-)
pmichaud the reason that := is harder in Rakudo than in NQP is because we have typed containers and read-only things in Rakudo
NQP doesn't have typed containers to deal with 00:41
and yes, assignment makes things tricky as well. NQP doesn't have assignment (largely for this reason)
jnthn rakudo: my $a = 1; my ($b is rw) := $a;
p6eval rakudo 4df508: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤␤ in main program body at line 11:/tmp/tM8LgBuSY_␤»
lue Where in the bowels of Rakudo is variable intialization done? If you just manipulate things there [or make WHERE writable]...
jnthn :-/
cognominal I don't mind rakudo * to be late, but I want it to be reasonnably commplete.
pmichaud cognominal: we're not aiming for "complete". "Complete" is still a myth, like "finished".
We're aiming for useful.
jnthn rakudo: my $a = 1; my ($b is wtf) := $a; 00:42
p6eval rakudo 4df508: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤␤ in main program body at line 11:/tmp/JxbCzgZXbu␤»
jnthn Oh, hm.
cognominal I even seen that metadata works better with regexp or matches lately, or am I dreaming already? It is late here.
pmichaud yes, we made quite a few regex and match improvements
cognominal pmichaud++
I mean Rakudo * don't need to be complete, just to be good enough to compete... 00:45
...productivity-wise. Performance will come late.
pmichaud right now we're aiming for "good enough to be useful for at least some people."
we're still a long way away from being able to claim that it can compete with any other language in a larger marketplace 00:46
(well, maybe not so long. But not close.)
00:47 Util left
lue [ It'd be nice to have a few modules ready w/ R* :) ] 00:47
pmichaud lue: I think we'll have some, yes. Perhaps not a large set... but that's what R*+1 will be for :-) 00:48
cognominal I am of the happy few who likes to play with grammars that start to be reasonably "complete"
lue (CRAM - Comprehensive Rakudo Archive of Modules) 00:49
cognominal And I don't see anything that comes close to it packaged in a neat package except maybe in haskell.
And in fact in haskell I don't think it is in the core.
lue++
lue I'm OK with a Perl6 folder on CPAN, but something about it.... [it's probably just me] 00:52
sorear the Haskell core has a parser engine considerably more powerful than Perl6 rules 00:53
however, it's... broken by design from a performance standpoint
jnthn rakudo: my $a = 1; my ($b) := $a; say $b; $a = 2; say $b;
p6eval rakudo 5e6fa9: OUTPUT«1␤2␤»
cognominal sorear, can you be more specific
sorear so it rarely gets used
jnthn hehe
sorear cognominal: O(way too much)
not n
cognominal :_ 00:54
:)
O(exponential), O(ballistic)?
sorear it's actually a lot like the perl 6 framework. just, without cuts 00:55
cognominal well cuts are yet to be implemented...
sorear NQP has a lot of cutting in it already 00:56
pmichaud cuts were implemented in PGE, just haven't put them into nqp-rx. Largely because I haven't needed them yet.
sorear also, it's coupled to the haskell string format. which is jaw-dropping fail all by itself
pmichaud the framework is in place to implement cuts.
cognominal cool
sorear pmichaud: token backtracks in nqp-rx!?!?!?
I'm suprised you can parse a 6000 line file in less than a day 00:57
pmichaud sorear: no, it doesn't.
cognominal strings are list sin haskell, are'nt they?
pmichaud I mean the ::, :::, and <commit> sorts of cuts
00:57 azert0x left
lue nomming time. afk 00:57
pmichaud racheting is definitely implemented in nqp-rx, as is the simple : quantifier
sorear Haskell's Read doesn't even have : cuts. 00:58
cognominal: yes. linked lists of fullword integers.
cognominal shudders
[Coke] can the pir::opcode syntax use keys? 01:01
sorear no
01:02 lest_away is now known as lestrrat
pmichaud [Coke]: not yet. 01:05
PIR's key syntax is a bit of a pain for code generation 01:06
[Coke]: what form of key are you looking for... the ['ABC';'DEF'] form to identify namespaces/classes, or the $P0]key] form for indexing an aggregate? 01:08
(or both?)
01:11 whiteknight left 01:14 mikehh left
sorear or the ['foo';'bar'] form for instantiating a PMC? because that's easier than you think 01:17
pmichaud *$P0[key] # wrong bracket 01:20
01:26 meppl left 01:27 ggoebel left
jnthn > my $a = 1; my ($b is rw) := $a; $b = 42; say $a; 01:28
42
But I gotta sleep now.
night o/
colomon \o
01:29 rgrau_ left
cxreg how does a function instrospect itself without knowing its name or having a ref to itself? 01:35
or for that matter, any block 01:36
sorear > say &?BLOCK.arity 01:37
perl6: say &?BLOCK.arity
p6eval pugs: OUTPUT«1␤»
..rakudo 5e6fa9: OUTPUT«Could not find sub &?BLOCK␤ in main program body at line 11:/tmp/4vzBLlRYn8␤»
..elf 31183: OUTPUT«/home/p6eval/pugs/misc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤ from /home/p6eval/pugs/misc/STD_red/match.rb:140:in `each'␤ from /home/p6eval/pugs/misc/STD_red/match.rb:140:in `map'␤ from
../home/p6eval/pugs/misc/STD…
sorear pugs: say &?BLOCK.arity 01:38
p6eval pugs: OUTPUT«1␤»
sorear hmm, is elf broken?
elf: say "hi"
p6eval elf 31183: OUTPUT«hi␤»
cxreg &?BLOCK, eh?
lue jnthn: that's exciting! 01:41
[Coke] (key syntax) no matter, email sent to compiler lsit. 01:58
02:03 lue left, cognomore left 02:04 cognomore joined
cxreg does that mean jnthn just got aliasing working? 02:05
02:06 ggoebel joined
sorear not necessarily 02:07
rakudo: my $a; my ($b is rw) := $a; $a = 3; say $b;
p6eval rakudo 5e6fa9: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤␤ in main program body at line 11:/tmp/Phonc7PprM␤»
sorear it would seem that he got traits in random signatures working correctly 02:08
02:08 ggoebel left 02:16 lue joined, TiMBuS joined 02:17 cls_bsd_ is now known as cls_bsd 02:20 szabgabx_ joined, ruoso left 02:24 szabgabx left
colomon alpha: say (^*).WHAT 02:29
p6eval alpha 30e0ed: OUTPUT«!whatever_closure␤»
colomon alpha: say (0..*).WHAT
p6eval alpha 30e0ed: OUTPUT«!whatever_closure␤»
colomon okay, so not the best example there. :( 02:30
lue what is the difference between a module and a package? 02:31
justatheory I like reading "say what!"
lue rakudo: say (^*).WHAT; say (0..*).WHAT 02:32
p6eval rakudo 5e6fa9: OUTPUT«Block()␤Range()␤»
lue The spec only says a module "has extra behaviors", but it won't elaborate :/ 02:33
02:33 yinyin left
colomon lue: I know not to trust what master does for ^*, because I know who wrote that code. ;) 02:34
lue :)
02:36 yinyin joined
lue I want to write a module that proto will be able to install. I just don't know if I should go w/ package or module... 02:37
arnsholt I'd go with class =) 02:42
lue I just discovered my module idea already exists in proto :O [it was ANSI coloring] 02:43
02:44 [mark] joined 02:46 Guest4174 left 02:47 gbacon joined
colomon rakudo: say 'a' cmp Inf 02:50
p6eval rakudo 5e6fa9: OUTPUT«1␤»
colomon rakudo: say 'a' cmp -Inf
p6eval rakudo 5e6fa9: OUTPUT«1␤»
02:52 gbacon left
lue rakudo: say Inf ~~ NaN 02:52
p6eval rakudo 5e6fa9: OUTPUT«0␤»
lue Shouldn't that be 1 ? 02:54
rakudo: say Inf !~ NaN 03:00
p6eval rakudo 5e6fa9: OUTPUT«===SORRY!===␤Unsupported use of !~ to do negated pattern matching; in Perl 6 please use !~~ at line 11, near "NaN"␤»
lue rakudo: say Inf !~~ NaN
p6eval rakudo 5e6fa9: OUTPUT«1␤»
03:02 tylerni7 left, ShaneC left 03:04 plobsing joined 03:05 Chillance left 03:18 tootroot left 03:20 tootroot joined, jaldhar joined 03:21 mtnviewmark joined, skids left 03:22 mberends left, mtnviewmark left, mtnviewmark_ joined
lue Are there any sort of modules you'd like to see? I want to start on my NES emulator, but until := works, that's not feasible. 03:24
03:25 mjk joined
lue [I'd like to test if the code is working; I could of course write it now if I wanted to go w/o testing it] 03:25
03:25 mjk left 03:26 tylerni7 joined, tylerni7 left, tylerni7 joined 03:27 jaldhar left 03:28 jaldhar joined 03:32 tedv left, JimmyZ joined
JimmyZ lue: write NES emulator by using rakudo? 03:33
lue Using P6. I was using Python, but the lack of references (or := binding in P6) and switch statements (given/when in P6) caused me to switch. 03:35
03:35 mikehh joined
lue I know full well it'd take forever to create the whole thing. 03:35
JimmyZ lue: irclog.perlgeek.de/perl6/2010-06-09#i_2416485 03:38
lue: oh, you know it.
lue :) I started trying to fix it once, my idea being to set the variable's WHERE at its initialization. 03:39
Obviously, it didn't even git started. :)
03:40 jaldhar left 03:41 jaldhar joined
lue [cant wait for Diaspora at the end of summer!] 03:41
03:42 stephenlb left 03:44 mberends joined 03:46 jaldhar left, _jaldhar joined
lue afk 03:47
03:58 ShaneC joined 04:03 JimmyZ left 04:10 ShaneC left 04:18 mtnviewmark_ left 04:29 k23z__ joined, k23z__ left 04:32 satyavvd joined 04:35 ciphertext left 04:37 Khisanth left 04:45 _jaldhar left 04:46 _jaldhar joined 04:51 dakkar joined 04:53 Khisanth joined 04:59 jaldhar_ joined, _jaldhar left 05:00 BRAD_ joined, BRAD_ left 05:12 hirschnase joined 05:29 hirschnase left 05:30 snarkyboojum joined
snarkyboojum dobar dan #perl6 05:32
05:40 orafu left 05:42 orafu joined
moritz_ good morning 05:47
05:51 gfx joined
dalek ok: 54a4228 | util++ | src/subs-n-sigs.pod:
[subs] Fixed "order-burger" code example
05:52
moritz_ ./perl6 -e 'sub MAIN($x, $y) { say $x + $y }' 42 23
65
./perl6 -e 'sub MAIN($x) { say $x }' 42 23 05:53
Too many positional parameters passed; got 2 but expected 1 in 'MAIN' at line 1 in 'MAIN_HELPER' at line 5816:CORE.setting in main program body at line 1
eternaleye \o/
05:53 snarkyboojum left 05:56 snarkyboojum joined 05:58 Wolfman2000 left 06:00 dju left, dju joined 06:03 uniejo joined 06:04 lestrrat is now known as lest_away 06:05 uniejo left 06:17 szabgabx_ left 06:19 uniejo joined 06:23 Su-Shee joined 06:27 kaare joined, kaare is now known as Guest99340 06:33 Ross joined 06:37 mberends left 06:38 mberends joined 06:41 lest_away is now known as lestrrat, lestrrat is now known as lest_away, lest_away is now known as lestrrat 06:52 jaldhar_ left, jaldhar_ joined 06:58 hirschnase joined, hirschnase left 07:00 hirschnase joined
moritz_ problem is, my patch breaks spectest horribly 07:04
because now eval() doesn't return the value of its last statement anymore
but really the return value of MAIN_HELPER 07:05
so I really need to surpress injection of MAIN_HELPER inside an eval :( 07:07
07:09 mberends left
moritz_ rakudo: say 1 07:09
p6eval rakudo 5e6fa9: OUTPUT«1␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinerp␤ %r = $P0['caller';1] }; }; f() 07:11
p6eval rakudo 5e6fa9: OUTPUT«error:imcc:syntax error, unexpected '\n', expecting '('␤ in file 'EVAL_1' line 23976656␤===SORRY!===␤syntax error ... somewhere␤»
eternaleye moritz_: getinerp vs getinterp 07:16
sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['caller';1] }; }; f() 07:17
rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['caller';1] }; }; f()
p6eval rakudo 5e6fa9: OUTPUT«No such item caller␤ in 'f' at line 11:/tmp/a_f9nSC6nN␤ in main program body at line 12:/tmp/a_f9nSC6nN␤»
moritz_ should probably be 'context'
not caller
eternaleye rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['context';1] }; }; f()
moritz_ anyway, not sure if that solves my problem
p6eval rakudo 5e6fa9: OUTPUT«␤»
07:23 baest joined 07:26 snarkyboojum left
moritz_ rakudo: rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';1] }; }; f() 07:33
p6eval rakudo 5e6fa9: OUTPUT«===SORRY!===␤Confused at line 11, near "rakudo: su"␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';1] }; }; f() 07:34
p6eval rakudo 5e6fa9: OUTPUT«_block14␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';0] }; }; f()
p6eval rakudo 5e6fa9: OUTPUT«f␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';2] }; }; f()
p6eval rakudo 5e6fa9: OUTPUT«!YOU_ARE_HERE␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';3] }; }; f()
p6eval rakudo 5e6fa9: OUTPUT«!UNIT_START␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';3] }; }; f() 07:35
p6eval rakudo 5e6fa9: OUTPUT«!UNIT_START␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤ %r = $P0['sub';3] }; }; eval 'f'
p6eval rakudo 5e6fa9: OUTPUT«eval␤»
moritz_ rakudo: sub f { say Q:PIR { $P0 = getinterp␤$I0 = 3␤ %r = $P0['sub';$I0] }; }; eval 'f' 07:36
p6eval rakudo 5e6fa9: OUTPUT«eval␤»
moritz_ has an eval plan :-)
07:37 Guest9064 left, cognomore left 07:40 cognominal left 07:41 rgrau[work] joined 07:43 cognominal joined 07:52 aesop left 07:57 mberends joined 07:58 aesop joined 08:02 justatheory left
moritz_ that evil/eval plan seems to work 08:03
eternaleye rakudo: sub f { say Q:PIR { $P0 = getinterp␤$I0 = 3␤ %r = $P0['sub';$I0] }; }; eval '{ { { { f } } } }' 08:04
p6eval rakudo 5e6fa9: OUTPUT«_block93␤»
08:18 hudnix left 08:20 LionMadeOfLions left 08:27 LionMadeOfLions joined, LionMadeOfLions left 08:28 LionMadeOfLions joined, LionMadeOfLions left, LionMadeOfLions joined, LionMadeOfLions left 08:29 LionMadeOfLions joined, LionMadeOfLions left 08:30 LionMadeOfLions joined, LionMadeOfLions left, LionMadeOfLions joined, LionMadeOfLions left 08:31 LionMadeOfLions joined, LionMadeOfLions left 08:32 LionMadeOfLions joined, LionMadeOfLions left 08:33 LionMadeOfLions joined, LionMadeOfLions left, LionMadeOfLions joined, LionMadeOfLions left
moritz_ jnthn, pmichaud: in the MAIN branch I avoid injecting calls to MAIN by walking the caller chain and comparing to eval. It's evil, but it produces a clean spectest... OK to merge? 08:36
08:37 gbacon joined, clintongormley joined 08:40 ingy left 08:41 ingy joined, masak joined 08:46 plobsing left 08:50 frettled left
moritz_ and it broke MAIN. OH NOEZ. 08:56
08:57 jaldhar_ left 08:58 jaldhar_ joined 08:59 proller joined, jaldhar_ left 09:00 jaldhar_ joined, agentzh joined 09:03 frettled joined 09:17 frettled left 09:18 frettled joined
masak .oO( Rakudo Silver Bullet ) 09:20
hejki hehe.. sounds like a cheap dildo :) 09:21
masak brain, belay that mental image!
hejki :P
sorry for mindfscking
masak now you're just being mean. :P
hejki at least you only have to get rid of your conscious mind.. for me it was a byproduct of subconscious 09:22
hehe :)
09:27 lichtkind joined
lichtkind masak: hai, i seen your new project 09:28
masak lichtkind: I wondered when I'd hear from you :P
lichtkind masak: can it be i inspired the name?
masak lichtkind: not consciously, but the mind works in mysterious ways. 09:29
lichtkind masak: im currently in conference preperaing a perl 6 talk
and while making a proto screenshot i saw it just now
masak :) 09:30
it seriously needs a logo, too.
preferably one of those saucer-like things.
lichtkind i can show you 09:31
masak one of these: www.babble.com/CS/blogs/strollerderby/ufo05.jpg
looks like a floating Darth Vader helmet :)
lichtkind thats stupid 09:33
no that onw is good
looks like a pic from billy
he a legend
even mulders wallet was one from him 09:34
yeah its real ... goood
masak Mulder's wallet has been sighted? man.
that series sure is crazy.
lichtkind masak i ment placard not wallet :) 09:35
moritz_ tried to think of a possible logo for JSON::Tiny
jnthn God morgon, #perl6.
lichtkind jnthn: moin
masak Mor'n, jnthn.
moritz_ serializing and deserializing could be a sheet of paper <doublearrow> a tree 09:36
but getting that into 32px**2 sounds like quite a challenge
lichtkind good to see you
masak the original JSON logo is pretty cute.
moritz_ maybe I should just steal that :-) 09:37
masak it's both round and square at the same time. that's pretty flexible. 09:38
frettled jnthn: svenska FTW!
09:39 agentzh left
masak also, it kinda looks both like a J and an O at the same time. 09:39
moritz_ does anybody spot any obvious errors in github.com/rakudo/rakudo/commit/c77...51b3af3f54 ? 09:40
lichtkind masak: is it ssave to say when rakudo.org/status is on all time high rakudo * will be released
moritz_ somehow it never seems to add an MAIN_HELPER call
masak lichtkind: yes, in absolute numbers, we've now passed alpha. 09:41
moritz_ but R* release is not coupled to number of tests
masak lichtkind: however, alpha has some features that master still lacks.
lichtkind masak: and when them back * comes?
jnthn rakudo: say &eval
p6eval rakudo 5e6fa9: OUTPUT«eval␤»
masak lichtkind: sorry, that didn't parse.
rephrase, please? 09:42
moritz_ rather to some features we want to have, and to a schedule
lichtkind masak: when these features are back in current branch, rakudo * may come?
moritz_ is glad he's not the only one who occasionally has troubles parsing lichtkind's sentences :-)
masak lichtkind: something like that. we want to release Star soon, but we also want a good feature set.
lichtkind: see yesterday's #phasers logs. 09:43
jnthn moritz_: Doens't look immediately wrong
moritz_: Try "say $S0" after the $S0 = $P0 line to see what it's actually finding.
moritz_ jnthn: I experimented a bit, and found that print $return_value_from_interp indeed prints 'eval'
back to auld debugging :)
lichtkind masak: there is a phaser channel?
masak lichtkind: #phasers 09:44
channel formerly known as #rakudosketch
jnthn moritz_: In what way does it fail?
lichtkind ah
jnthn IN_EVAL just returns 0?
moritz_ jnthn: I guess so, because the --target=PIR output doesn't show a call to MAIN_HELPER 09:45
lichtkind masak: i wanted say cant find the irclog of that but found now, not that im not see the link the first time
moritz_ the URLs of the IRC log pages are pretty obvious, and extrapolating them to other channels usually works :-) 09:46
jnthn moritz_: Aye, then try dumping the $S0s. 09:47
lichtkind moritz_: normally yes but im sitting in a talk and follow 3 things at once and didnt see a link on the irclog page
moritz_ recompiling now with some printerr statements...
jnthn: oh, IN_EVAL always returns 1
because the normal call chain also contains an eval :/ 09:48
eval -> compile -> parse -> parse -> TOP -> comp_unit etc
so I need to check for at leat two evals... now that's getting hacky 09:49
hum, no
masak maybe stop when you hit a 'compile'?
oh wait. 09:50
moritz_ masak: but the built-in eval also calls compile
masak realized that.
jnthn moritz_: Well, maybe better would be to look up Perl 6's eval function and compare the two subs to see if they're the same sub?
09:51 tylerni7 left
jnthn $P1 = get_hll_global '&eval' 09:51
if $P0 == $P1 goto done
or maybe
eq_addr $P0, $P1, done
moritz_ will try that
lichtkind masak: www.figu.org/ch/ufologie/strahlschi...ohne-flash
masak lichtkind: nice landscapes. 09:52
lichtkind masak: of cause :) 09:53
masak: billy has an eye for proportion too
moritz_ masak: I want my camelia super-awesome logo for Math::RungeKutta 09:55
mathw Form.pm could go in R*... if the backtracking through captures bug is fixed, or a workaround is found, and assuming there aren't any other horrible problems with it. It's incomplete, but what's there works (or worked on alpha anyway!)
masak moritz_: :)
moritz_: we'll get there, I hope.
moritz_ I have a readme, passing tests, decent test coverage, a logo.. NOW!
masak mathw: I want to have a look at that bug/unfeature. 09:56
moritz_ gerd++ reminded us on parrot-dev that it's 6 days to the parrot release for rakudo *
masak aye. 09:57
moritz_ so everything that should go into R* needs to be in by Tue
masak no time to linger.
moritz_ from the nqp-rx side
mathw yeah well if that's fixed, I'll put in the necessary work to get Form ready for R*, but I'm aware that pmichaud said it's untrivial 09:58
09:58 jaldhar_ left, jaldhar_ joined
masak one needs to add something which isn't there now. and it needs to be done 'properly', with extensibility in mind. it's entirely possible that pmichaud wants to do it himself. 09:59
but I thought I might have a look at it and try to think up a solution.
10:05 mjk joined, nnunley left
moritz_ jnthn: now it's the other way round... the eq_addr never branches :( 10:05
10:08 agentzh joined 10:14 agentzh left 10:18 PZt left, [mark] left 10:20 ggoebel joined
moritz_ but counting the eval's in the call chain does seem to work 10:22
10:23 gbacon left 10:24 bkeeler left
moritz_ now running a full spectest over lunch, or so 10:26
masak lunch. good idea. 10:30
10:30 masak left 10:32 mjk left, mjk joined 10:34 lestrrat is now known as lest_away 10:38 bkeeler joined 10:44 rv2733 joined 10:49 lichtkind left, Pzt3 joined 10:51 Pzt3 is now known as PZt 11:05 hirschnase left 11:10 yinyin left 11:14 jhuni left 11:16 envi^home joined
jnthn moritz_: (sorry, was suddenly afk) Ah, that's weird. 11:18
moritz_ back from nom 11:24
./perl6 -e 'sub MAIN(*@a) { say [+] @a }' 2 3 5 11:25
10
\o/
jnthn \o/ 11:26
moritz_ it's with eval-counting 11:27
jnthn: do you want to review before I merge? 11:28
or should I just go ahead?
(no new spectest failures)
jnthn moritz_: The eval counting feels a tad odd. 11:29
moritz_ jnthn: it does
jnthn (maybe a litle fragile - what if a user writes a sub called eval
)
moritz_ if that appears in the call chain, we're not in mainline code 11:30
jnthn True.
The eq_addr probably failed because &eval lookup actually gives you a wrapper object, not the Parrot sub itself. 11:31
Whereas the Parrot stack introspection hands you the Parrot sub. 11:32
moritz_ is there an easy-ish way to access the parrot sub from a wrapper?
jnthn Maybe .do
If not, $P0 = getattribute $P0, '$!do'
Method is preferable.
11:32 aesop left
jnthn rakudo: say &eval.do 11:33
p6eval rakudo 5e6fa9: OUTPUT«eval␤»
jnthn Aha.
Should work.
moritz_ tries 11:34
11:37 aesop joined 11:39 rv2733 left, sorear left 11:40 sorear joined
moritz_ rakudo: my $x = pir::get_hll_global__vS('&main'); say $x.do 11:41
p6eval rakudo 5e6fa9: OUTPUT«===SORRY!===␤The opcode 'get_hll_global_s' (get_hll_global<1>) was not found. Check the type and number of the arguments␤»
moritz_ rakudo: my $x = pir::get_hll_global__pS('&main'); say $x.do
p6eval rakudo 5e6fa9: OUTPUT«Null PMC access in can()␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/F16T6wEqw2␤»
moritz_ rakudo: Q:PIR { $P0 = get_hll_global '&main'␤ $P0 = $P0.'do'() ␤ say $P0 } 11:42
p6eval rakudo 5e6fa9: OUTPUT«Null PMC access in find_method('do')␤ in main program body at line 1:/tmp/9ipFPHz0i_␤» 11:43
11:43 lest_away is now known as lestrrat
moritz_ rakudo: Q:PIR { $P0 = get_hll_global '&eval'␤ $P0 = $P0.'do'() ␤ say $P0 } 11:43
p6eval rakudo 5e6fa9: OUTPUT«eval␤»
moritz_ main and EVAL, MAIN and eval :-) 11:44
jnthn :-) 11:45
moritz_ with unwrapping the refaddr comparsion seems to work 11:48
jnthn \o/
moritz_ jnthn++
11:48 satyavvd left
moritz_ ./perl6 -e 'sub MAIN($x) { say eval ~$x } ' 45+6 11:49
51
when the IN_EVAL doesn't work, either eval() doesn't return its argument, or MAIN is not executed (depending on the failure mode)
running another full spectest before merging 11:50
jnthn :-)
moritz_: Is this a step along the way to integrating patrickas++'s bits?
moritz_ jnthn: yes; seems that I'm finally done
jnthn Yay
moritz_ just need to merge
11:51 colomon left
moritz_ the USAGE bit isn't in there, but I'll let patrickas++ do the patch for that bit 11:51
jnthn Yes, I guess it's easier to know where to put that now. 11:52
11:53 colomon joined 11:54 gbacon joined 11:58 hirschnase joined 12:05 JimmyZ joined 12:10 IllvilJa joined 12:17 masak joined, mjk left 12:20 quester_ joined, gbacon left
takadonet morning all 12:27
masak \o
jnthn o/ 12:28
moritz_ hugme: tweet rakudoperl rakudo now supports MAIN subs, including named arguments #perl6 12:29
hugme hugs moritz_; tweet delivered
dalek kudo: f7ddcf5 | moritz++ | (3 files):
try to actually run MAIN subs; most code by patrickas++
kudo: b0d427b | moritz++ | src/ (2 files):
second attempt at MAIN sub
kudo: 3657ad7 | moritz++ | src/Perl6/Actions.pm:
add TODO comment wrt MAIN sub
kudo: c77e278 | moritz++ | src/ (2 files):
check for eval()ness by walking the call chain
rakudo: d33a958 | moritz++ | src/glue/run.pir:
rakudo: IN_EVAL needs to count the number of eval()s, since there is always one in the
moritz_ feels spammy 12:30
jnthn Let's call it "productive" :-)
quester_ .
masak moritz_++ 12:31
12:31 masonkramer left, pnu left, masonkramer joined
moritz_ patrickas++ did most of the actual logic 12:32
12:33 pnu joined
jnthn moritz_: It was from a weekly challenge too, iirc? 12:34
moritz_ jnthn: yes, week 3
masak: any submissions for week 6 yet?
jnthn We seem to be doing very well out of those.
masak moritz_: no. I did get a comment with a proposed fix for something else. though as far as I could see, that had already been fixed since the April release. 12:35
moritz_ right; we need another book release soon
masak anyone signed up for that? 12:36
moritz_ nope 12:37
I hope I'll get to it tonight
feel free to remind me in ~5 hours :-)
masak I will if I remember :)
12:38 quester_ left
moritz_ phenny: remind me in 5 hours that I want to release the book 12:39
masak anyone else not seeing the whole one-liner at blogs.perl.org/users/steven_haryant...adump.html ? 12:41
jnthn
.oO( I accidentally the whole one-liner )
12:42
moritz_ truncated
jnthn doesn't see it all either
masak leaves a comment
moritz_ there is no preview button. 12:43
and moritz_ is his prophet
12:44 JimmyZ_ joined
masak heh. even use.perl.org has a Preview button! :P 12:46
in fact, you have to use it at least once before submitting.
12:47 skids joined
moritz_ unless you configure it not to having to use it 12:47
masak oh. didn't know that.
I usually preview a dozen times anyway.
moritz_ at least I think you can configure it that way, if you're logged in
(slashdot allows anonymous comments, and forces preview there) 12:48
masak you usually are logged in when you're writing a journal entry. :)
moritz_ I was talking about comments too
masak use.perl.org doesn't force preview for comments, at least not when you're logged in.
jnthn didn't move from use.perl.org yet either
I think most people who read my stuff, read it aggregated on Planet Perl 6. 12:49
mathw does
Planets are good
Very convenient
12:51 JimmyZ left
moritz_ if it weren't for planetsix, I'd be subscribing a whole lot more journal RSS 12:51
12:51 JimmyZ_ is now known as JimmyZ
moritz_ afk 12:54
jnthn lunch 12:55
masak lately, I've been thinking of writing a series of blog posts about variables and scoping. try to cover all of the Perl 6 variants of these. 12:56
12:57 araujo left 13:00 gfx left
masak lexical variables, dynamic variables, temp/let, my scoping, our scoping, has scoping, placeholder parameters, the OO twigils, compiler hint variables, the 'constant' keyword, the 'anon' keyword, closure semantics... 13:04
while Perl 6 contains a lot of "cool" goodness in the form of grammars and solid OO, there's a lot of "mundane" goodness to be had with just variables and scoping. 13:05
mathw yes 13:07
definitely
[particle] hypotheticals
masak [particle]: that's 'let'. 13:08
[particle] oh, right, thanks
13:08 hirschnase left
masak std: package A {}; my $A::b 13:12
p6eval std 31183: OUTPUT«ok 00:01 108m␤»
masak hm.
rakudo: package A {}; my $A::b = 5 13:14
p6eval rakudo a54677: OUTPUT«Null PMC access in getprop()␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/L_uN0yqfKo␤»
masak submits rakudobug
rakudo: my $A::b = 5
p6eval rakudo a54677: OUTPUT«Null PMC access in getprop()␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/uVvyvFEwia␤»
masak even easier.
rakudo: my $A::b 13:15
p6eval rakudo a54677: ( no output )
jnthn ah, should just ban long names there... 13:16
masak yes.
jnthn Maybe we already haz a ticket on that, it feels...familiar 13:17
masak we should appoint a TicketMeister, someone whose main job is to be really familiar with the already submitted tickets in RT. 13:19
preferably someone who likes merging, annotating and triaging tickets. 13:20
[particle] i say we nominate the person who's submitted the most tickets... 13:22
masak but then we'd have to... actually find out who that is. sounds hard.
[particle] write a ticket about it 13:23
masak why does compiling STD give a lot of errors about deep recursion?
s/errors/warnings/
13:29 arthur-_ joined, arthur-_ left
mathw masak: your compiler has developed a fear of potholing 13:31
13:31 pnu left
masak mathw: in my dictionary, 'pothole' is a noun only, not a verb. what does the verb mean? 13:32
mathw masak: exploring certain kinds of cave. Usually the kind which go downwards. 13:33
masak ah.
13:33 pnu joined
masak :) 13:33
jnthn has been potholing a couple of times when younger. 13:39
masak: BTW, did you notice that ByteBuffer has shown up in Parrot?
masak no, I did not notice. that sounds like good news, though. 13:40
13:40 rgrau joined
jnthn masak: It's likely already more complete than $my-little-hack 13:41
masak I will check it out during the day.
13:42 meppl joined 13:44 araujo joined 13:49 ash__ joined, colomon_phone joined 13:50 macdaddy joined, macdaddy is now known as Guest68956
masak rakudo: { sub say(*@args) {}; say 1 }; say 2 13:54
p6eval rakudo a54677: OUTPUT«2␤»
masak \o/
Tene: I'll be able to use the above trick to override printing in Ratel.
13:54 hudnix joined
jnthn Ratel? 13:57
jnthn tries github.com/masak/ratel/ hopefully... 13:59
:-)
masak no, it's in the Web.pm repo.
it's a minimal templating engine. 14:00
the Ratel class is 30 lines of code, including blank lines :)
jnthn Aha. :-) 14:01
Oh, it's a type of animal. 14:02
"Honey Badger"
masak hadn't found that out yet :)
jnthn++
Tene++
jnthn www.awf.org/content/wildlife/detail/ratel
Wow...they're awesome! See the Diet section! 14:05
masak "Eats, Shoots and Leaves"? :P
14:06 plobsing joined
jnthn Follows, farts out bees, actually. 14:06
masak cool! a badger-bird symbiosis!
jnthn Yeah! How sweet. 14:08
14:08 gbacon joined 14:09 ash__ left
colomon reads the last few lines, assumes the crew has finally lost their minds. 14:09
14:10 ash__ joined, alester joined
masak colomon: just business as usual. :) 14:11
colomon reads the link on the ratel, assumes the AWF have finally lost their minds.
(diet section in particular)
14:12 uniejo left, Guest99340 left
mberends this immediately reminded me of en.wikipedia.org/wiki/Ratel_IFV (having lived in RSA) 14:19
jnthn Disappointing, I was expecting chemical warfare after reading the diet section about the animal. ;-) 14:22
14:23 bbkr joined
masak Tene: idea: to use .<title> syntax in Ratel templates instead of %attrs<title> syntax. this can be done by assigning $_ = %attrs in the serialize method. what do you think? 14:24
bbkr rakudo: grammar X { token TOP { <ws>+ } }; X.parse(" "); # why it goes into infinite loop (despite the fact that + is not necessary) ? 14:25
p6eval rakudo a54677: ( no output )
bbkr known bug?
masak haven't seen it before, no. 14:26
jnthn Me either.
bbkr reports
jnthn I guess since <ws> can match nothing, it can also match nothing a lot of times. ;-)
masak that might explain it. 14:27
so maybe it's expected behavior.
maybe even something that merits a warning from the compiler.
if someone does <ws>+ with the standard <ws> rule, they get a "you probably don't mean that" warning.
bbkr rakudo: grammar X { token TOP { ""+ } }; X.parse(" "); # looks like jnthn i right
p6eval rakudo a54677: ( no output ) 14:28
14:28 jaldhar_ left
masak rakudo: " " ~~ / [ '' ]+ /; say 'alive' 14:28
p6eval rakudo a54677: ( no output )
jnthn Ah, *any* zero-width match seems to exhibit it.
That probably is a bug. 14:29
masak no, it's not.
think about it. it's expected behavior.
jnthn rakudo: " " ~~ / [ x? ]+ /; say 'alive'
masak regexes are *expected* to do this.
p6eval rakudo a54677: ( no output )
masak I have a plan for letting GGE detect these things, though.
it tends to bite people.
I also seem to recall that with a Thompson engine, you can't even think that kind of wrong thought. ;) 14:30
jnthn masak: It's inconsistent with Perl 5.
C:\>perl -e "' ' =~ /(x?)+/; print 42;"
42
masak oh?
then it probably merits pmichaud's and TimToady's attention.
jnthn I'd be interested to see their responses, yes. 14:31
14:31 dakkar left, colomon_phone left
mathw It does seem silly to just sit there accepting zero-width matches from the same entity forever 14:34
14:36 volss joined
bbkr reported here: rt.perl.org/rt3/Ticket/Display.html?id=75634 14:36
jnthn mathw: I'm trying to work out why it might not be so simple as "check if we advanced by any characters"
mathw jnthn: it'd be nice if it is that simple 14:37
jnthn rakudo: for 1..5 { my $x = 0; " " ~~ /(<?{ $x++; rand() > 0.5 }> x?)+/; say $x; } 14:39
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Unsupported use of rand(); in Perl 6 please use rand at line 11, near "() > 0.5 }"␤»
jnthn rakudo: for 1..5 { my $x = 0; " " ~~ /(<?{ $x++; rand > 0.5 }> x?)+/; say $x; } 14:40
p6eval rakudo a54677: OUTPUT«2␤2␤2␤5␤4␤»
jnthn Well, we'd break that. ;-)
mathw oh boo
I'm conflicted
on the one hand is the side of me which says "people who rely on that kind of trick can figure out another way"
it also says "we shouldn't make it trivial to introduce infinite loops into regexps via a common mistake" 14:41
however the other side of me says "Perl gives you enough rope to hang yourself"
but I can imagine being in here for years answering about why <ws>+ causes infinite loops
14:42 patspam joined 14:43 plobsing left, Lorn left
bbkr <ws>+ causing infinite loop is not DWIM-style, i think most people understan it as "\s+". beside: i cannot imagine where this "bug" can be used for purpose 14:44
masak you could say the same about many thinkos. 14:49
it's not that someone has maliciously set things up for <ws>+ not to work, it's just a consequence of how <ws> and + work each on its own. 14:50
14:50 dju left
masak alpha: grammar X { token TOP { <ws>+ } }; X.parse(" "); say "alive" 14:50
p6eval alpha 30e0ed: ( no output ) 14:51
jnthn It's not really about <ws> though. 14:53
It's about zero-width matches and the + and * quantifiers.
Well, I presume * too.
14:57 gbacon left 14:59 baest left 15:01 gbacon joined 15:06 kaare joined 15:07 kaare is now known as Guest54878
bbkr i've seen many regexps in P5 where zero width were in alternative like this: (a|$)+ . and it also loops forever on P6. 15:07
rakudo: "" ~~ /(a|$)+/
p6eval rakudo a54677: ( no output ) 15:08
bbkr this will bite often :P
jnthn C:\>perl -e "'' ~~ /(a|$)+/; print 42"
42
rakudo: "xa" ~~ /(a|$)+/; say $/; 15:09
rakudo: "xa" ~~ /x(a|$)+/; say $/;
p6eval rakudo a54677: ( no output ) 15:10
bbkr counterintuitive, isn't it?
jnthn I've surely written more complex things that boil down to that in Perl 5.
(As in, that would fail in Rakudo at the moment becuase of this same behavior difference.) 15:11
masak: (from #parrot) <@NotFound> ByteBuffer reviews wanted.
masak gotcha.
jnthn Sounds like it's ready for your testing, when you ahve time. :-)
NotFound++ 15:12
masak I'm pretty sure nothing in S05 explicitly mentions an exception that would allow [$]+ to ever terminate.
certainly nothing in PGE does. 15:13
colomon anyone have advice for getting a good printout for the Spec pod? I just tried pod2latex, and it failed miserably...
masak what about perldoc? 15:14
[Coke] (printout) - percabal.org ? 15:15
er, perlcabal
(just print the HTML versions?)
15:16 synth left, lestrrat left 15:17 frooh_ is now known as frooh 15:18 synth joined 15:19 lestrrat joined 15:20 M_o_C joined
colomon [Coke]: that would make the most sense, I guess. 15:25
15:26 JimmyZ left 15:27 justatheory joined 15:29 alester left, alester joined 15:30 gbacon left
masak moritz_: yay! a weekly contribution just landed in my inbox! 15:32
15:35 Ross left 15:36 estrabd_afk is now known as estrabd
masak from a stylistic viewpoint, I can never decide whether to use the .= dotty or the .= assignment operator. 15:37
15:38 mantovani joined
jnthn masak: I tend to prefer the latter visually. 15:38
masak: However, it bites you if you forget that you can't write @a >>.= @b; 15:39
masak heh.
jnthn (need to use the dotty there)
masak haven't forgotten that so far. ;)
jnthn How often have you used >>.= though? ;-)
masak approximately never. 15:40
15:41 hudnix left
jnthn :P 15:41
15:41 hudnix joined 15:43 isBEKaml joined
pmichaud good morning, #perl6 15:49
cognominal jnthn, pmichaud : I have filed a bug. Rakudo should detect when a tentative match goes thru too many zero width assertions. I did not formulate like this. But this is simpler than to check at compile time. And anyway, some cases are only pathological depending on the input.
pmichaud cognominal: I agree; at the moment zero-width assertions are a bit of a challenge to detect. 15:50
15:50 justatheory left
pmichaud sorry, zero-width repeated matches. 15:50
cognominal *assertion in a row.
pmichaud I think there's already a ticket for this (a long-standing ticket)
cognominal yes.
15:51 pmurias joined
pmichaud anyway, thanks for the ticket. 15:51
cognominal I don't ever find the correct words "zero-width repeated matches" indeed. pmichaud++
pmichaud masak: ping
cognominal I could update it with the suggestion?
masak pmichaud: pong 15:52
pmichaud masak: you're listed as release manager for june?
masak oh? cool!
jnthn morning, pmichaud
masak pmichaud: you want to relieve me of that duty?
jnthn ELATEGREETING
pmichaud no, but I wanted to see if you already had a name planned for the release. If not, I have one.
masak I don't have a name. 15:53
pmichaud okay, Atlanta it is.
cognominal Wishing I had more idiot-proof barriers for my worshop.
masak excellent.
pmichaud thanks
masak pmichaud: does S05 say that /[$]+/ should terminate?
pmichaud the engine is supposed to be able to detect and avoid zero-length repetitions, yes. I'm not sure if S05 explicitly says that. 15:54
masak I'm pretty sure it doesn't.
and I'm very sure PGE doesn't detect any such thing.
cognominal so am I, But it is common sense.
pmichaud oh, I'm quite certain PGE didn't -- that was one of the oldest tickets filed for PGE
rt.perl.org/rt3/Ticket/Display.html?id=37745 15:55
cognominal Like if you hit a wall hundred time with your head, may be you should stop...
masak 37745? that's old!
pmichaud yes, November 2005.
jnthn Wow. That's like, over 2 years before I first started hacking on Rakudo. :-) 15:56
masak so. given 'regex foo { $ }' and /<foo>+/, what till $/<foo> contain after a successful match?
cognominal I suppose it is a matter of going trhu all the matcher subroutines to increment a counter when the match is zero width. 15:57
masak cognominal: that's a runtime solution :)
pmichaud masak: I suspect it will contain a single zero-width match.
masak pmichaud: in an array?
pmichaud yes, since $<foo> is quantified.
masak ok. 15:58
isBEKaml jnthn: You've been at this for two years? Now I'm curious, did you know about parsing and grammars when you started out or picked them up as you hacked away? :)
cognominal masak: a compile time solution would be very complex and as I said would not detect every possible case.
masak cognominal: indeed. grammars are likely too dynamic for it to detect every possible case.
and if we're not supposed to warn about them anyway... might as well do it at runtime. 15:59
cognominal jnthn, don't be too intense in your hacking. That did no good to audreyt... but she was also hacking litterally in meat space.
jnthn isBEKaml: Depends whether you mean in general or about Perl 6 grammars specifically.
isBEKaml: I'd done some compiler courses, but I had to learn the Perl 6 grammar stuff, PAST, other bits. 16:00
isBEKaml jnthn: I was asking in a very general sense. I don't know anything about grammars or CS funda.
jnthn Perl 6 was the first non-toy compiler I hacked on.
(I architected a logo interpreter (that ended up being part prederef-"compiled") at some point too. 16:01
Was suffering bad RSI at the time, so I was happy to leave the code writing to others.
cognominal RSI? 16:02
jnthn Plus it was to be written in Java.
cognominal ho, boy.
jnthn cognominal: en.wikipedia.org/wiki/Repetitive_strain_injury
isBEKaml jnthn: RSI, that's worse than typing in Java. anyway, it's good you left it to others. 16:03
jnthn It was one of those university group projects where it's encouraged that different people in the group take different roles.
cognominal hum, failed to upgrade my ipad to the new seed. Restored it to factory setting Probably because this device is not registered to Apple as a developper device :( 16:04
jnthn So I kinda took the team leader / architect role, where I could just tell people how I thought it should look. :-)
isBEKaml jnthn: :)
16:05 jiing left
cognominal lucky you, I went to an enginering school where I leanrt nothing new to me, not that I knew much. That was a waste of time if not for math that helped me recently to plow thru type theory papers. 16:05
jnthn We managed to have the winning project, partly because our logo interpreter was fast enough and done early enough that we could take a crack at implementing basic versions of a couple of other group's projects in logo. :-) 16:06
isBEKaml Learning about compilers and parsers is one of the items in my to-do list. Don't know how long that would take. I wish I could just go back to university(ah, times when I had lots of free time)
"managed to have the winning project"? What, were there bidding sorta things that you could bid projects for? :) 16:07
jnthn net start ImportQueueService 16:08
er, ww
masak isBEKaml: hi. I have a compiler. wanna help me hack on it? it's still in its early stages, so now is a good time to join in.
cognominal jnthn, did you know, that, the Gosling project before Java was based on the postcript language. Interactive window system programmable in object oriented Postscript. That was way more than display PostScript
I was marginally involved in that.
jnthn isBEKaml: No, they put the whole class into groups, gave each group a project and then after some weeks got us to show/present it, and a bunch of judges gave votes. 16:09
isBEKaml masak: that's great! You must have seen that I know next to nothing about compilers. :) {Initial hand holding needed }
jnthn isBEKaml: Then the winning team went off to represent the uni in some national competition agains tother unis. :-)
*against # no, it wasn't a spelling competition :-)
cognominal The project was a failure, so, they decided, ho surprise, to use that PostScript engine for printer
masak isBEKaml: we're all starting from scratch, so that's ok.
isBEKaml masak: Well, I'm in! 16:10
masak isBEKaml: cool! this month, we're doing if/while/subs.
isBEKaml jnthn: that must have felt awesome!
masak isBEKaml: have a look at the code if you like: github.com/masak/yapsi/blob/master/lib/Yapsi.pm
bbkr how can I extract match directly into an array in P6. something that will replace @t = "test" =~ m/(.)/g in P5? 16:11
[Coke] misread tentative match as "tentacle match"
TimToady shh, do not invoke them
jnthn isBEKaml: Yes, it was pretty nice. :-)
16:12 Ross joined, __2synth joined
pmichaud bbkr: @t = "test".comb(/./); will work 16:12
masak a little background on Yapsi: there are three other projects that Yapsi is meant to provide a foundation to: Tardis (a time-traveling debugger), lid (a code coverage tool) and sigmund (a static code analyzer).
pmichaud bbkr: you can also do "test" ~~ /(.)*/ and the resulting array will be in $0 16:13
rakudo: "test" ~~ /(.)*/; for $0 { .say } # checking
16:13 __2synth left
p6eval rakudo a54677: OUTPUT«t␤e␤s␤t␤» 16:13
isBEKaml masak: I heard of Tardis as the Time traveller. ;)
16:13 __2synth joined, lestrrat left
masak right now, compilation in Yapsi consists of two phases: one "find variables" phase, that makes sure that all variables are declared before use, and one "sicify" stage, which provides a sort of 'assembler' code which can then be executed directly by the runtime. 16:14
bbkr pmichaud: thanks, i always forget about comb :)
16:14 synth left, mdxi left
pmichaud bbkr: yes, a lot of people forget about comb. But it's the generic "find me things that look like this" matcher. 16:14
16:14 lestrrat joined 16:15 mdxi joined
bbkr rakudo: $_="test"; my %h; %h{.comb(/./)}=1,2,3,4; say %h.perl # bug? comb() returns array so it should fill hash slice. 16:16
p6eval rakudo a54677: OUTPUT«{"" => (1, 2, 3, 4)}␤»
16:16 volss left
isBEKaml masak: sicify? 16:17
16:18 gbacon joined
masak isBEKaml: so, SIC is this executable format for the Yapsi runtime. 16:18
isBEKaml: if you've ever seen PIR, you know what to expect.
16:18 TiMBuS left
jnthn masak: What does SIC stand for? 16:18
[Coke] comb always reminds me of SpaceBalls(TM) The Movie(R)
jnthn
.oO( SIC Is Cool )
masak jnthn: it stands for SIC. :) 16:19
isBEKaml masak: Simply In Code ?
;)
masak SIC Instruction Code, perhaps.
16:19 isBEKaml_ joined
jnthn masak: That's just inviting people to make stuff up. ;-) 16:19
masak aye.
isBEKaml Ah, recursive acronyms! :)
masak ;)
16:19 synth joined, __2synth left
masak I didn't say it was recursive :P 16:19
all SIC code is prefixed by a line saying "This is SIC". :D 16:20
isBEKaml Atleast, it never runs into StackOverflowException. ;)
masak isBEKaml: no, because we don't have a call stack yet :P 16:21
jnthn wonders why the people around him have suddenly got into having noisy afternoon parties
Guess it must be That Time Of Year when people graduate. :-)
16:21 plainhao joined
isBEKaml_ thinks afternoons are meant for dozing off. 16:22
lucs masak: About the book LaTeX improvement: where is the source to the book? 16:24
16:24 __2synth joined
jnthn hugme: show book 16:25
hugme jnthn: the following people have power over 'book': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣berends, m⁣oritz_, p⁣michaud. URL: github.com/perl6/book/
jnthn lucs: ^^ there
16:25 synth left
lucs Thanks. 16:25
16:26 mdxi left, lestrrat left
masak lucs: kudos! haven't had time to look at the patches yet. 16:26
and now I'm unexpectedly being called away.
16:26 justatheory joined, masak left, mdxi joined 16:27 lestrrat joined
lucs masak: Um, I haven't submitted anything (haven't even looked at it yet) :) 16:27
isBEKaml_ hugme: show alpha 16:28
hugme isBEKaml_: sorry, I don't know anything about 'alpha'
isBEKaml_ where do I get alpha from?
jnthn isBEKaml_: In your Rakudo clone, just do "git checkout origin/alpha" 16:29
bbkr rakudo: 'my @t = 1,2; my %h; %h{@t}="one","two"; say %h.perl # how to write hash slice in P6? S09 says nothing abouut it. 16:31
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Confused at line 11, near "'my @t = 1"␤»
bbkr rakudo: my @t = 1,2; my %h; %h{@t}="one","two"; say %h.perl
p6eval rakudo a54677: OUTPUT«{"1 2" => ("one", "two")}␤»
isBEKaml_ jnthn: last commit in alpha was in feb? I thought it was so long ago. :s
jnthn rakudo: my %h; %h{1,2}="one","two"; say %h.perl 16:33
p6eval rakudo a54677: OUTPUT«{"1" => "one", "2" => "two"}␤»
jnthn eww...nasty bug.
I guess it is, anyway. 16:34
rakudo: my @t = 1,2; my %h; %h{|@t}="one","two"; say %h.perl
p6eval rakudo a54677: OUTPUT«{"Capture()<0x4669fb0>" => ("one", "two")}␤»
jnthn :-/
bbkr yay! another one found :)
should it work also with GatherIterator? I found it by simplification of case %h{.comb(/./)}=1,2,3, and that doesn't work either 16:36
report as two separate bugs or one?
isBEKaml_ rakudo: my @t=<1 2>; my %h{@t} = "one", "two"; %h.perl.say;
16:36 kolibrie left
p6eval rakudo a54677: OUTPUT«{"one" => "two"}␤» 16:36
isBEKaml_ Did I just miss the joke? 16:37
16:37 kolibrie joined
bbkr isBEKaml: "my %h{@t}=" is not the same as "my %h; %h{@t}=" 16:38
isBEKaml_ erm, I don't get what this means... < > translates to a list, right? or does that stringify?
16:39 mberends left
jnthn isBEKaml_: Note that my %h{@t} is not doing what you think it is. 16:39
isBEKaml_: It's (unimplemented, but parsed) syntax for declaring key type or something.
That is 16:40
my %h; %h{@a} = ...
isBEKaml_ jnthn: I would have thought it creates an hash out of a list of elems.
jnthn Is not just long hand for
bbkr typization explained here: perlcabal.org/syn/S09.html#Hashes
jnthn my %h{@a} = ...
bbkr while I was asking for hash slice
isBEKaml_ Well, I get a different output when I do my %h; %h{@arr}=... 16:41
jnthn std: my @t; my %h{@t} = 1,2; # curious
isBEKaml_ rakudo: my @t=<1 2>; my %h; %h{@t} = "one", "two"; %h.perl.say; ## Does this give the right output?
p6eval std 31183: OUTPUT«ok 00:01 109m␤»
rakudo a54677: OUTPUT«{"1 2" => ("one", "two")}␤»
jnthn isBEKaml_: No, that is wrong.
bbkr reports 16:42
jnthn Should be 1 => "one", 2 => "two"
TimToady the problem appears to me that the subscripter is using $subscript semantics and trying to guess from the type rather than * or ** binding 16:44
16:46 rgrau[work] left
TimToady that is, it appears to be trying to fake list/slice context by examining the subscript object 16:47
and introspection is nearly always the wrong way to do something 16:48
bbkr reported here: rt.perl.org/rt3/Ticket/Display.html?id=75636 16:49
jnthn TimToady: multi-dispatch rather than introspection 16:50
16:52 cdarroch joined
TimToady okay, but something still isn't telling the @t it's in list context and letting it do the natural list-contexty thing 16:52
16:52 cdarroch left, cdarroch joined
bbkr rakudo: say "a" ~~ Str; say Str ~~ "a"; 16:56
p6eval rakudo a54677: OUTPUT«1␤0␤»
16:56 hudnix left
TimToady looks right to me 16:57
bbkr i know. i was curious how it behaves.
16:58 hudnix joined
TimToady to the first approximation, that's "Socrates is a man" vs "A man is Socrates" :) 17:01
17:01 pmurias left
bbkr TimToady: good example, thanks :) 17:01
17:08 stephenlb joined 17:09 M_o_C left 17:26 estrabd is now known as estrabd_pgh218_4, estrabd_pgh218_4 is now known as estrabd_pgh218
pmichaud When attempting to compile the book to pdf, I get: 17:35
! LaTeX Error: File `fancyvrb.sty' not found.
any clues?
(Kubuntu 10.04)
moritz_ pmichaud: install fancyvrb :-) 17:37
pmichaud E: Couldn't find package fancyvrb
moritz_ pmichaud: I'll take a look which debian package it's in
pmichaud looks like texlive-latex-recommended (from a bug report) 17:38
checking.
moritz_ yes 17:39
texlive-latex-recommended: /usr/share/texmf-texlive/tex/latex/fancyvrb
texlive-latex-recommended: /usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
pmichaud I'll add that to the README
(I have a couple of other changes to the README)
wow, installing that package also installs a lot of other packages 17:41
moritz_ well, writing a book needs some software :-)
dalek ok: bbf179b | pmichaud++ | README:
Update README with additional Ubuntu 10.04 package names.
17:45
pmichaud could we do something to fix the title page (i.e., break the author list across two lines?) 17:46
moritz_ I've intended to work on that tonight, and make a release
pmichaud +1
My wife wanted to see the latest version, so I just pdf'd her a copy. I'll forward her comments.
(or just fix them directly) 17:47
(or maybe give her a commit bit :)
moritz_ wait
the latest PDF doesn'T show the =begin screen ... =end screen sections
that needs a patch for Pod::PseudoPod::LaTeX which I have locally here...
and which I've submitted to chromatic++
but hasn't been released yet
pmichaud okay.... could you send me an up-to-date pdf, then? ;-) 17:48
or send me the patch to Pod::PseudoPod::LaTex
moritz_ just a sec...
pmichaud that might be better if I do any other editing/bookbuilding
17:49 patrickas joined
patrickas hello 17:49
moritz_ moritz.faui2k3.org/tmp/book.pdf
patrickas moritz_ += Inf :-)
moritz_ github.com/moritz/Pod-PseudoPod-LaTeX has the latest patch
[Coke] github.com/perl6/book/downloads is sad. :( 17:50
17:50 ShaneC1 joined
patrickas btw I found a typo in the book at github.com/perl6/book/blob/master/src/basics.pod "even it does store" should probably be "even if it stores" 17:51
TimToady std: my $A::b; UNIT::A::<$b>
p6eval std 31183: OUTPUT«ok 00:01 108m␤»
TimToady std: my $A::b; UNIT::A::<$nonesuch>
p6eval std 31183: OUTPUT«===SORRY!===␤Variable UNIT::A::<$nonesuch> is not predeclared at /tmp/QTpwitLnO8 line 1:␤------> my $A::b; UNIT::A::<$nonesuch>⏏<EOL>␤Check failed␤FAILED 00:01 105m␤»
TimToady jnthn, masak: ^^
jnthn *sigh* 17:52
pmichaud yes, looks like we got knocked off our book release schedule :-|
jnthn TimToady: And what exactly happens there? Vivify a lexical package A? 17:53
moritz_ it's sad here because github says it can't serve the page
TimToady jnthn: that can be inferred from UNIT::A
Tene alpha: { sub say(*@args) {}; say 1 }; say 2 17:54
p6eval alpha 30e0ed: ( no output )
TimToady std: my $A::b; GLOBAL::A::<$b> 17:55
p6eval std 31183: OUTPUT«===SORRY!===␤Undeclared name:␤ 'GLOBAL::A::' used at line 1␤Check failed␤FAILED 00:01 105m␤»
TimToady and from that :)
jnthn OK. 17:57
dalek ok: 96911a0 | moritz++ | src/basics.pod:
[basics] typo noticed by patrickas
Tene needs to try to work on $realjob instead of Perl6. :( 17:58
diakopter 2
TimToady on most things symbol-tabley, STD tends to already have well-formed opinions, which are often even correct, or at least arguably so. :) 17:59
.oO(engineers love to hedge their remarks)
18:00
jnthn :P
PerlJam
.oO(implementors love to trim the hedges)
18:01
moritz_ TimToady: should multis still be exported by default?
jnthn: I wrote RT #75638 and RT #75640 for you, as promised at #phasers 18:02
jnthn PerlJam: So true. ;-)
pmichaud moritz_: okay, so here's my CPAN cluelessness showing... how do I import your git changes to Pod::PseudoPod::LaTeX ? 18:03
pmichaud is a little bummed that he (and therefore others) cannot build the book pdf
moritz_ you can, but not with screen sections :/
pmichaud well, I presume the screen sections are important-ish :) 18:04
moritz_ so do I, but OTOH it took more than 2 months for somebody to complain :-)
pmichaud I guess we've all been a bit preoccupied this last couple of months :)
TimToady moritz_: I think perhaps that it is controlled by the proto; if it's exported, so are its minions
moritz_ pmichaud: I've just added a version number to LaTeX.pm and copied it over my install (low-tech version)
pmichaud okay, I failed to add the version number then. 18:05
moritz_ pmichaud: the high-tech version is to use Dist::Zilla
pmichaud low-tech is fine with me. want me to poke chromatic into accepting the patch? ;-)
moritz_ pmichaud: he already said it's OK, just hasn't released yet
pmichaud want me to poke chromatic into releasing? ;-)
moritz_ pmichaud: since masak++ received another patch for the latex emitter today, maybe wait a few days 18:06
pmichaud okay
should we just temporarily maintain our own version of Pod::PseudoPod::LaTeX in the book repo until it settles out?
(are there going to be more such patches in our future?) 18:07
moritz_ i hope it won't be necessary...
I've been weeding out the limitations, and submitted a bunch of patches before, which chromatic++ promptly release
pmichaud okay. 18:08
moritz_ screen sections and sidebars are the only things I'm aware of that need patching
TimToady moritz_: alternately, in some sense, if the proto is exported, it doesn't even have to export the minions, since it could just carry them along and add them to the candidate list itself, under the new proto-as-wrapper semantics.
pmichaud I'll let you guys figure it out. I've also been planning to work a bit on an nqp-tutorial and book, and want the same toolchain available :)
18:09 Wolfman2000 joined
TimToady moritz_: but that's probably post R* 18:09
jnthn TimToady: Righr, we can't use that as an R* solution. 18:10
TimToady: OTOH, it really still is about exporting one thingy.
moritz_ TimToady: I kinda expected that answer
jnthn In that we collect all the candidates to be exported together already.
I guess this means that a multi export is all or nothing though if you hang it off the proto. 18:11
TimToady yes, we're just going to associate that behavior more strongly with the &foo proto down the road
and hopefull inline all the protos so it comes out the way it is currently, most of the time
jnthn Yes, the fact that we need to do that to not end up performing even worse hardly makes me want to rush into doing the refactor. 18:12
TimToady :)
there is, on the other hand, a basic simplicity to unifying protos as a kind of only sub
jnthn I hope we can get a significant win by re-working the way we do attributes and adding the compact struct stuff.
TimToady and then in that sense, foo() always calls only subs 18:13
jnthn TimToady: Yes, I've kinda come around to the "proto first" view of things. I'm still very unhappy with the multi-method changes though.
It feels odd that on the one hand we want to clearly have nested dispatches, but then have the multi dispatcher have to know about how method dispatch works too. 18:14
18:15 Lorn joined
TimToady I think of it more as the 'proto method' having to know that, which is different from a 'proto sub' 18:16
18:17 mtnviewmark joined
TimToady it's actually a way of being able to name different dispatchers, kinda 18:17
jnthn Maybe that's making me uneasy is that I expect methods to be blobs of invokable code that the metaclass has associated a name with, and not a whole lot more. 18:18
That is, the metaclass knows it has these bunch of methods it can invoke.
But the methods don't really care about that.
It's a bit of a switch to then say "methods are actually aware of the metaclass they're associated with" 18:19
In a sense because things then get rather interesting when we do role composition. 18:20
TimToady I don't think of it that way. you call a proto as an "only" method by the short name, and it's figuring out which multi methods to call; the methods themselves are still ignorant
jnthn Can you ever get a proto composed in to a class from a role, or is that meaningless and protos in the role are just ignored under compositon? 18:22
TimToady I don't see why protos can't be composed; on that level they're ordinary methods
and a role that composes a proto would be a good way to emulate the current semantics 18:23
jnthn I don't quite see how the way we want protos to be ordinary in that sense and the way we want them to be special in the dispatchy sense quite hold together.
Where do you envision the multi method candidates as living? 18:24
TimToady in the same namespaces, but with longnames that a proto can gather up into a candidate list
namespaces is perhaps a bad word to use 18:25
jnthn But methods don't go in the namespace.
(by default)
TimToady I don't mean packages when I say namespaces
that's a parrotism
lexical scopes are namespaces too
jnthn Yes, but the methods don't by default go in a lexical scope too. :-) 18:26
TimToady nevertheless they have their own namespace
jnthn Right, which at the moment I guess you could just see as the metaclass' method table.
TimToady but we're going to have to figure out a better word than 'namespace' since it will just cause confusion in parrotland
jnthn Are we essentially saying that the candidates should all be installed individually in the metaclass method table under their long names, and we install a proto under the short name? 18:27
TimToady I suppose I haven't carped before this, so I have no right to complain, but I do shudder every time someone uses 'namespace' to mean 'global package'
jnthn And a proto somehow has a magical "link" back to the metaclass so it can find them? 18:28
(namespace) Yes but that's the usage of the word that is fairly entrenched from not just a Parrot POV, but an other-langauges POV too.
TimToady the proto knows where it is declared, and the type/location of the actual object/lexpad, and can triangulate all the multis in between 18:29
jnthn: yes, which is why we have to coin a new word to be clear, probably
jnthn Would it be reasonable to suggest that it considers $?CLASS in order to start looking for the multis that may live in the various metaclasses it's associated with? 18:30
TimToady but 'namespace' didn't used to mean that in the old days
jnthn Because if a mention of $?CLASS is generic, then we'd get a proto composed from a role doing the right thing.
18:31 Ross is now known as c, c is now known as d
TimToady yes, I believe the multis we want are sandwitched by $?CLASS on the top and self.WHAT on the bottom 18:31
18:31 d is now known as e, e is now known as h, h is now known as i
TimToady s/witch/wich/ 18:31
jnthn Ah, htat's true, we also have the invocant to hand. 18:32
18:32 i is now known as Guest85399
TimToady with proto subs, it's the relationship of the two lexical scopes that is the sandwich 18:32
18:32 hercynium joined, Guest85399 is now known as k, k is now known as l, l is now known as n, n is now known as Ross
jnthn Hmm. I guess it could be made to work. 18:33
moritz_ btw another p6/grammar questioin on perlmonks: www.perlmonks.org/?node_id=843877 18:34
TimToady I'm asking myself whether STD pays attention to the $?CLASS end of the sandwich yet...hmm...
18:34 mtnviewmark left
TimToady probably doesn't 18:34
it's just assuming that a proto is going to shadow, which is a bad assumption 18:35
jnthn Rakudo probably needs to start making *every* role actually have $?CLASS as an (implicit) first parameter.
TimToady grr s/is/isn't/
durn n't key...
jnthn (Right now role Foo { ... } is really parameterless. Of course, that in turn means we don't have a way to make $?CLASS work... 18:36
)
TimToady or make CALLER::<$?CLASS> figure it out
jnthn Hmm, could work also.
Maybe.
TimToady or some such dynamic lookup 18:37
caller.lexpad.class or some such
or just lazify $?CLASS to composition time somehow 18:38
.oO(P6, tormenting the implementor with too many choices)
patrickas alpha: my $f='foo'; say "$f [--named=value]" ; 18:39
p6eval alpha 30e0ed: OUTPUT«foo [--named=value]␤»
patrickas rakudo: my $f='foo'; say "$f [--named=value]" ;
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 11␤»
patrickas who's correct here? Rakudo was behaving like alpha till last week or so
TimToady biab & 18:40
18:40 justatheory left
moritz_ patrickas: alpha is correct 18:40
(and we have a ticket for that)
18:40 justatheory joined
patrickas Oh ok! Thanks 18:40
jnthn huh, that's a bit of a wtf bug. 18:42
std: my $f='foo'; say "$f [--named=value]" ; 18:44
p6eval std 31183: OUTPUT«ok 00:01 106m␤»
jnthn Heh. Guess it's a game of spot the difference.
patrickas actually I can produce the same error with
rakudo: say $f [-n]; 18:45
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 11␤»
patrickas in case it helps
jnthn Yes, but it's sensible there :-) 18:48
Its not inside a quoted string. :-)
patrickas yes sure I just thought maybe it could be interesting since $f [n]; $f [-]; $f[-n]; "$f [n]"; "$f [-]"; "$f[-n]"; all give a different more expected error message 18:54
rakudo: "$f[-n]"; 18:55
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous>␤»
patrickas rakudo: $f[-n]; 18:56
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous>␤»
patrickas rakudo: "$f [-n]";
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 11␤»
patrickas It still trips me that in perl6 spaces seem to matter much more than in perl5 18:57
[particle] they purposely matter more 18:58
takadonet I keep wanting to use junction in my perl 5 code lately... 19:04
TimToady std: say $f [-n]; 19:06
p6eval std 31183: OUTPUT«===SORRY!===␤Variable $f is not predeclared at /tmp/0WyZMNTph5 line 1:␤------> say $f⏏ [-n];␤Unable to parse bracketed infix at /tmp/0WyZMNTph5 line 1:␤------> say $f ⏏[-n];␤Couldn't find final ']'; gave up at /tmp/0WyZMNTph5
..…
TimToady std: say $_ [-n];
p6eval std 31183: OUTPUT«===SORRY!===␤Unable to parse bracketed infix at /tmp/8bgX1ymtcA line 1:␤------> say $_ ⏏[-n];␤Couldn't find final ']'; gave up at /tmp/8bgX1ymtcA line 1:␤------> say $_ [-⏏n];␤Parse failed␤FAILED 00:01 106m␤»
TimToady std: [-n] 19:07
p6eval std 31183: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'n' used at line 1␤Check failed␤FAILED 00:01 105m␤»
TimToady curious
I guess that's correct. 19:08
19:08 cognomore joined 19:10 cognomore left
[particle] the second example is parsing as 'term($_) infix_op([-n])' and the third as 'circumfix_op([]) op(-) term(n)' ? 19:10
something like that, didn't show the parent-child relationship there 19:11
*prefix_op(-)
so, with '$_ [-n]', circumfix [] would create a term, and two terms in a row is illegal, so it reparses as infix [] ? 19:12
std: [-n] $_ 19:13
p6eval std 31183: OUTPUT«===SORRY!===␤Two terms in a row (preceding is not a valid reduce operator) at /tmp/bW1TDITyEg line 1:␤------> [-n] ⏏$_␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Undeclared routine:␤
..'n' used at line 1␤P…
[particle] should the 'Unable to parse bracketed infix' give a 'Two terms in a row' error? 19:15
19:15 szabgabx joined
[particle] i guess i'm trying to figure out why it fails to parse. 19:16
pmichaud [particle]: other-way-around... it starts by trying to parse as infix.
because that is what is expected after a term.
[particle] ah, right-o 19:17
it's too far away to be postcircumfix, so it must be infix
the error message is LTA
"perhaps you are missing a term after the bracketed infix, or you have whitespace between a term and bracketed postcircumfix" 19:19
19:22 plainhao left
TimToady "or perhaps you are just confused" 19:23
moritz_ when the error message points to the right location, it's not so hard to find the actual error 19:24
TimToady in this case, it points to two different locations, since there could be at either place 19:25
s/there/the error/ # sheesh 19:26
patrickas but what about hte fix? is it easy to make it parse correctly ? 19:27
TimToady um, GIGO
what is your definition of "correctly"?
patrickas "it's too far away to be postcircumfix, so it must be infix" makes sense when ot quoted 19:28
when quoted
"it's too far away to be postcircumfix, so it must be just a sting"
string
TimToady STD does parse it correctly in the latter case
so rakudo just has to do everything that STD does. :) 19:29
patrickas oh ok it's that simple then ;-)
Wolfman2000 Afternoon. As a heads up, I now have screen recording software on here. If requested, do you think it may be a good idea to have some sort of Perl 6 video tutorial series? 19:31
patrickas std: sub my-foo () {}; my-foo();
p6eval std 31183: OUTPUT«ok 00:01 105m␤»
patrickas rakudo: sub my-foo () {}; my-foo();
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Malformed my at line 11, near "-foo();"␤»
moritz_ it's certainly worth a try, Wolfman2000
patrickas alpha: sub my-foo () {}; my-foo(); 19:32
p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "-foo();"␤in Main (file <unknown>, line <unknown>)␤»
moritz_ I personally dislike video tutorials, because they force a certain speed on you. Others love them
Wolfman2000 I did wonder about that...then again, isnt' that what pausing is for?
moritz_ for me it's usually more about fast-forwarding, becuse I love to skim first 19:33
19:33 masak joined
masak ahojte! 19:33
moritz_ \o/ it's masak
Wolfman2000 Hmm......alright, good point
afternoon masak
Well, now I have two choices for a first real screen recording project: something Perl 6 related, or a tutorial for using a javascript app on my website. 19:34
This will certainly not be a boring few weeks now.
masak Tene: dang, we made almost the same commit! :)
I should have pushed mine while I had the chance.
Tene :)
masak: your bit earlier about overriding say doesn't work in alpha.
19:35 justatheory left
masak whatever you say. I have a working version here. :) 19:35
just need to rebase a bit now... :/
Tene alpha: { sub say(*@args) {}; say 1 }; say 2
p6eval alpha 30e0ed: ( no output )
patrickas hello masak
masak o/
moritz_ alpha: { my sub say(*@args) {}; say 1 }; say 2
p6eval alpha 30e0ed: OUTPUT«2␤»
moritz_ Tene: alpha defaulted to 'our' subs 19:36
TimToady patrickas: offhand, I'd guess the problem is that rakudo doesn't properly limit the precedence of EXPR inside quotes to methodcall precedence
moritz_ but lexical subs did work, mostly
Tene alpha: { my sub say(*@args) {}; eval 'say 1'; }; say 2;
p6eval alpha 30e0ed: ( no output ) 19:37
patrickas TimToady: could be ... I don't think I'm qualified to comment on that though :-)
TimToady that never stops most people from commenting :)
patrickas in that case... yes you're probably right, that's probably the problem!
Tene I may not have any idea what I'm saying, but I'll assert to the death my right to say it?
jnthn TimToady: I'd love it if that's all it is. 19:39
jnthn checks
moritz_ masak: from a quick glance, both patches (book + pseudolatex) look rather fine
masak Tene: there. my changes made it in. let me know what you think.
moritz_: oh, good.
Tene Mmm, cherries.
masak moritz_: I'm feeling terribly distracted today, so if you want, you can apply them. 19:40
moritz_ even contains a test
masak: I probably won't get around to it today, put probably tomorrow :-)
jnthn We parse <EXPR('y=')>
Perl6::Grammar.O(':prec<y=>, :assoc<unary>', '%methodcall'); 19:41
So, not that. :-(
Woulda been an easy fix.
Tene masak: hrrm... I'd much prefer overriding print and say to call $.emit
so you can usefully override method emit in subclasses. 19:42
masak I briefly considered such a scheme.
it looks like a sort of dynamic override of print and say, as opposed to a lexical one.
I don't know if it's possible.
patrickas 4 minutes between commenting on something I am not qualified enough for, and being proven wrong :-) not bad 19:43
ok another question how can I know if a list of parameters I have match a certain sub's signature something like : if ( $sub.signature ~~ (|@params) ) , short of trying to call the sub and seing if it works
Tene masak: well, we could always $*OUT = ...
;)
patrickas does the question even make sense ... if i want to do that am I probably doing somethign wrong ?
masak Tene: yes, I started doing that. works in alpha, but not in master.
moritz_ rakudo: my @a = 2, 3; sub f ($x) { }; say ?(\(|@a) ~~ &f.signature) 19:44
p6eval rakudo a54677: OUTPUT«1␤»
Tene Oh, you... um... reverted my commit? Author tene, committer masak?
moritz_ huh
masak I accidentally your commit. :/
it was semi-accidental actually, since I cared a bit for my solution, and this was an easy way to show them to you before they got even more difficult to rebase into the branch. 19:45
Tene nodnod
I'm a little bit unhappy with overriding print for that, as I can imagine legitimate reasons to print while rendering a template. 19:46
masak I'm still open to adopting your solution.
moritz_ patrickas: I fear that it's not easy in rakudo right now, if implemented at all...
Tene And, yeah, that's fine. I was just confused by the commit.
moritz_ patrickas: and I know what you need it for :=)
masak either we use print exclusively in the 'serialize a piece of template' sense, or we use something else.
Tene I'd define an 'emit' method or lexical sub. 19:47
patrickas heheh moritz_ i bet you do ...
moritz_ rakudo: my @a = 2, 3; sub f ($x) { }; say ?(\@a ~~ &f.signature)
p6eval rakudo a54677: OUTPUT«1␤»
masak I kinda like the idea of hijacking print and say for serialization, but seeing how it only partially works in both alpha and master... maybe better to use an emit method, yes.
Tene I guess I can imagine wanting to re-use some other framework that calls print or say or something, but I'm reluctant to try to find every possible way to print to stdout and override that... rather just override $*OUT
Lemme see how that works in alpha. 19:48
masak I tried overriding it with an anonymous class. didn't quite get it to work.
I might have gotten it to work before. I know I submitted a bug about it once, and it got fixed.
Tene replacing it with a different fh works... 19:49
19:49 gbacon left
Tene my $*OUT = open('lol.txt', :w); 19:49
masak alpha: $*OUT := class { method say(*@args) {} }; say 42
p6eval alpha 30e0ed: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
masak or it didn't get fixed. :/ 19:50
19:50 ggoebel left
Tene masak: that's binding $*OUT to a class 19:50
masak an anonymous class. 19:51
Tene don't you want an instance of that class instead?
masak alpha: $*OUT := class { method say(*@args) {} }.new; say 42
p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near ".new; say "␤in Main (file <unknown>, line <unknown>)␤» 19:52
masak alpha: $*OUT := (class { method say(*@args) {} }).new; say 42
p6eval alpha 30e0ed: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
Tene alpha: class A { method say(*@args) { print "XXX\n"; } } my $*OUT = A.new(); say 'lol';
p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "my $*OUT ="␤in Main (file <unknown>, line <unknown>)␤»
masak semicolon.
Tene oops
alpha: class A { method say(*@args) { print "XXX\n"; } }; my $*OUT = A.new(); say 'lol';
p6eval alpha 30e0ed: OUTPUT«too many positional arguments: 2 passed, 1 expected␤in Main (file <unknown>, line <unknown>)␤»
masak I got that before too.
don't know why.
Tene that's what I keep seeing.
masak my guess is it doesn't work.
Tene rakudo: class A { method say(*@args) { print "XXX\n"; } }; my $*OUT = A.new(); say 'lol'; 19:53
p6eval rakudo a54677: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in 'Mu::print' at line 1132:CORE.setting␤ in 'print' at line 4624:CORE.setting␤ in 'A::say' at line 11:/tmp/MXaGFRqvjo␤ in 'say' at line 4631:CORE.setting␤ in main program body at line 11:/tmp/MXaGFRqvjo␤»
Tene ... ><
19:53 patrickas left
masak heh, conspiracy nuts keep retweeting my ufo project. 19:54
jnthn masak: It's because .print will print to $*OUT
masak oh!
jnthn Which now doesn't has a print method because...
Tene yeah
jnthn Well, it inherits the one from Mu
Tene alpha: my $fh = $*OUT; class A { method say(*@args) { $fh.say("XXX"); } }; my $*OUT = A.new(); say 'lol';
jnthn Which expects to get no args, and wants to print its invocant. :-)
p6eval alpha 30e0ed: OUTPUT«XXX␤»
Tene WFM
masak Tene: might also be solved with both a .say and a .print method, by what jnthn said. 19:56
Tene masak: that's what I'm doing now.
masak happy tweet: twitter.com/sdanna/status/15789982971 \o/ 19:57
jnthn is happy. 19:58
jnthn tries to settle down for some slide writing 19:59
19:59 estrabd_pgh218 left
colomon would like to write a slide some day 20:00
TimToady phone
jnthn |\
masak jnthn: when's the presentation?
TimToady .u phone
phenny TimToady: Sorry, no results for 'phone'.
jnthn masak: Sunday 20:01
TimToady .u telephone
phenny U+2121 TELEPHONE SIGN (℡)
masak jnthn: plenty of time :P
jnthn masak: :P
TimToady .u ☎
phenny U+260E BLACK TELEPHONE (☎)
jnthn masak: Yeah but...I want to be free to drink vok^W^Wsocialize on the Friday night.
masak: And Saturday is hackathon.
Tene masak: are you really attached to "serialize"? How about "render" instead?
masak Tene: "render" is better.
Tene: I just didn't like "do" :) 20:02
Tene Yeah. Agreed.
20:03 Psyche^ joined
colomon but will stick to reels and occasionally jigs and hornpipes until he feels he understands slides better. 20:03
Tene pushed 20:04
pmichaud (phone, on my way)
20:05 justatheory joined
Tene masak: how about some markup like %= for attrs? Then we could experiment with defining markup additions in an extensible way... 20:05
masak Tene: did you see my .<key> suggestion? 20:06
Tene masak: won't always work... like inside a for loop.
masak true, that's a drawback. 20:07
20:07 mod_cure joined 20:08 Patterner left, Psyche^ is now known as Patterner
masak likely a fatal one. 20:08
Tene maybe an @!transforms that holds arguments to subst(), that we iterate over?
$source.=subst($_[0], $_[1], :g) for @!transforms;
@.transforms, really. Shoudl be modifiable.
cognominal speaking of booze, jnthn, I just bought the Chartreuse. But without BooK, it will test bland. 20:09
masak and .key, .value rather than $_[0], $_[1] :)
pairs look more p6-y :)
Tene Yeah.
jnthn cognominal: Aww.
cognominal: For the FPW?
cognominal yup
Tene %.transforms
jnthn cognominal: Too bad I'll be missing that. 20:10
cognominal: You coming to YAPC::EU? ;-)
cognominal that's his daughter third anniversary
jnthn,
I may
jnthn cognominal: Well, I suspect that's rather more important than weird green liquid. :-)
cognominal If I finish my slides engine for Friday, I may have something to present in Perl 6 20:11
jnthn, that's what his wifte told him... :)
and it is not green, it is chartreuse :) ask TimToady 20:12
20:12 estrabd joined
jnthn cognominal: After you drink enough of it, it gets hard to distinguish. ;-) 20:13
cognominal and BooK will probably miss YAPC::EU too. His wife is expecting their second child at this time.
masak %.transforms or @.transforms; doesn't much matter, I think. 20:15
20:15 patrickas joined
masak anyway, Ratel seems to be in good hands. Tene++ 20:15
I'll spend some time on the tutorial.
Tene masak: you know the right constructory things to do for alpha?
I don't remember if that has changed since alpha.
Oh, I guess i could check the tests. 20:16
masak aye.
a new method mostly looks like this inside:
self.bless(*, :attr1("blah"), :attr2("blah"))
Tene I just want to initialize some bits if necessary... isn't there a BUILD or something for that? 20:17
[Coke] sorear++ viv
masak BUILD is an initializer submethod, yes.
don't define a .new method unless you want to deviate from the standard argument passing mechanism. if it works as it is, BUILD is usually fine. 20:18
Tene right
20:20 supernovus joined
masak 'what you do is you start with a vision of the product and one by one remove the technical obstacles until it's realized' -- Ed Land, Polaroid's founder. that's a nice way to think about software too. 20:22
supernovus A nice new bug to report.
PerlJam masak++ indeed 20:24
supernovus When trying to use a library with an augment statement in it, the latest rakudo (as of 30 mins ago) tells me: Confused at line 5, near "augment cl"
it works if I do it in an interactive shell though 20:25
masak supernovus: works here.
PerlJam supernovus: are you sure there isn't an error in the code jsut before the augment declaration?
s/jsut/just/
masak supernovus: there must be something else afoot. either that, or my Rakudo is too old.
supernovus if I take out the use MONKEY_TYPING; line it gives me Can't augment class Int without 'use MONKEY_TYPING'
which is appropriate
PerlJam supernovus: pastebin the code. 20:26
masak supernovus: please nopaste.
TimToady moritz_: re www.perlmonks.org/?node_id=843880 I'd point out that <?ww>\s+ can never match anything; the real ws rule is more like just <!ww>\s* 20:27
20:30 TimToady sets mode: +vvv buubot dalek hugme, TimToady sets mode: +vv ilogger2 IRSeekBot, TimToady sets mode: +vv p6eval phenny, TimToady sets mode: +v pugssvn
Tene masak: pushed. 20:31
masak looks
Tene Ratel.new(:source($text)).render(...) 20:32
moved the 'compile' method to be the 'source' accessor.
supernovus Hmm, I tried a different file with augment and it worked fine, so it's something else in the file in question...
github.com/supernovus/PSpec/blob/ne...b/Times.pm
Tene Oh man, I really don't like adding such a method to Int. 20:34
20:34 TimToady sets mode: +oooo [Coke] [particle] Tene masak, TimToady sets mode: +oooo cognominal colomon dukeleto eternaleye, TimToady sets mode: +oooo hejki japhb justatheory Juerd, TimToady sets mode: +oooo mathw patrickas PerlJam sorear, TimToady sets mode: +ooo spinclad Su-Shee xinming
supernovus Tene: I admit, It's an evil piece of code, it would probably be better to drop the method version and use the infix operator instead, which is indeed more like the RSpec version this was based off of. 20:36
20:36 kolibrie left
PerlJam ah ... I was getting that ruby feeling all over and now I know why :) 20:36
20:37 kolibrie joined
supernovus PerlJam: It's part of a very evil library I wrote for the January release of Rakudo called PSpec, which is a port of RSpec and Cucumber to Perl 6... done for no other reason than "nobody else had done it yet..." 20:37
Tene Yeah, monkeying with the core classes is rather discouraged... definitely encourage you to use an operator instead.
I mean, I certainly can't stop you...
PerlJam supernovus: cool. rspec I liked. I never could quite warm up to cucumber though. It seemed a tad like jumping-the-shark on TDD 20:38
er, BDD I guess
pragma_ TimToady: you forgot me
masak Tene: I like the 'my $*OUT' solution. it's dynamic in scope, which is a big win. but we won't be able to make it work on master.
TimToady I've never been very pragmatic 20:39
jnthn TimToady: Isn't trusting that many people quite optimistic? :-)
jnthn hides after that pun 20:40
20:40 dju joined
supernovus Tene: I tend to agree. The method was originally added as a suggestion by masak when I was having problems with the infix version. I'll probably drop it for PSpec/Pickle 3.1. I just wondered what was causing rakudo to bork when trying to run it (especially considering other files have no issues...) 20:40
TimToady well, the half life of ops is pretty ferocious...
masak Tene: not too happy with the .source($text) method :/ but I don't have a better idea right now, since we don't have FETCH/STORE and Proxy objects. 20:41
jnthn supernovus: We had a bug recently where Rakudo could get upset because it didn't parse modules as if they were unicode. But I fixed that recently.
pmichaud masak: why doesn't my $*OUT work on master?
20:41 dju left
masak pmichaud: because $*OUT is readonly. 20:41
TimToady why?
masak oh wait. maybe 'my $*OUT' works. I'll try it.
pmichaud it should work just fine
if not, it's an easy fix.
20:41 dju joined
supernovus jnthn: well, I'm going to remove the augmented method and see if it still fails. 20:41
TimToady the whole point of making those dynvars is so you can override 'em in a scope 20:42
pmichaud what TimToady++ said :-)
masak rakudo: { my $*OUT = class { method print(*@args) {} }; print "OH HAI" }; print "OH HAI"
p6eval rakudo a54677: OUTPUT«OH HAI»
masak nevermind. it works. :)
masak-- # FUD
TimToady FUD-- # masak
20:42 dju left
[particle] \o # o/ 20:43
supernovus interestingly enough, Table.pm in the same dist has an augmented method and it has no problems. Removing the augment from Times.pm did the trick, it compiles now.
TimToady [particle]: what's that, Thisbe's Chink? 20:44
Tene masak: Yes, it's a compromise, and I'd prefer FETCH/STORE, but I think it's okay for now.
masak Tene: also, not sure parameterized delims is something a minimalist templater needs... :) 20:45
[particle] oh, sweet wall
wow, i haven't seen midsummer night's dream in a long time!
20:46 dju joined
colomon hopes to see his second outdoor production of it later this summer 20:46
20:46 cure_ joined
TimToady
.oO(Let us take a minimalistic approach to minimalism.)
20:46
Tene masak: The larger issue is what if I want to replace [%!foo%] with [% print %attrs<foo> %]
[particle] read "second order production"
20:47 dju left
PerlJam supernovus: oh ... it's your module declaration. 20:47
(it's in the wrong place :)
20:47 dju joined 20:48 mod_cure left
supernovus Interesting. 20:48
I am assuming it's because it was the statement form instead of the block form. 20:49
TimToady nap & 20:50
supernovus The alpha branch allowed you to put stuff before a module/class statement :-)
20:50 dju left 20:51 dju joined
Tene It was wrong. 20:51
masak not so sure it was.
you should be allowed to put use statements before, for example. 20:52
20:52 dju left
masak so that you can 'use A' before doing 'class B is A;' 20:52
20:52 dju joined
Tene Maybe. 20:52
PerlJam or the calling envinronment must have seen A already. 20:55
supernovus In fact, it appears that use statements are allowed. I have another file with a use statement before a role statement and it works fine.
PerlJam what does the spec say?
20:57 ggoebel joined
PerlJam ah ... "only allowed as the first declaration in a compilation unit" 20:57
supernovus "The first form is allowed only as the first declaration in a compilation unit (that is, file or eval string)."
ah you beat me to it
20:58 kw47129 joined
supernovus I think the way the new rakudo works is probably a lot closer to the spirit of the spec. It allows use statements, but nothing else. 20:58
20:59 Guest54878 left
supernovus Basically, my old code was depending on a misfeature of the alpha branch that shouldn't have worked in the first place. So my own fault for not reading the spec more closely :-) 20:59
PerlJam supernovus: are you sure you really mean "nothing else" 21:00
supernovus No, I'm not sure I mean "nothing else". But as I'm not very well versed in the nature of compilers, I think it's a simplification to say "no direct functional code can be placed before a package/module/class/role statement, although certain compilation-stage statements such as 'use' may be used." 21:02
21:03 kw47129 left, LionMadeOfLions joined
masak rakudo: role Lion[::T] {}; my Lion[Lion] $x 21:09
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Lion must be predeclared (or marked as declarative with :: prefix) at line 11, near "[Lion] $x"␤»
masak std: role Lion[::T] {}; my Lion[Lion] $x 21:10
p6eval std 31183: OUTPUT«ok 00:01 110m␤»
masak jnthn: what's happening there? 21:13
jnthn: why does Rakudo say that Lion isn't predeclared?
diakopter cuz Lion`1[] is predeclared, not Lion 21:15
(/me guesses)
masak a reasonable guess. 21:16
rakudo: role Lion[::T] {}; my Lion[Int] $x
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Lion must be predeclared (or marked as declarative with :: prefix) at line 11, near "[Int] $x"␤»
masak which doesn't hold up. :)
diakopter maybe variables can't be typed as roles 21:17
masak rakudo: role Lion[::T] {}; class LionMadeOfLions does Lion[Lion] {}
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
masak whoa! :)
masak submits rakudobug 21:18
diakopter rakudo: role Lion[::T] {}; my Int[Lion] $x
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Int must be predeclared (or marked as declarative with :: prefix) at line 11, near "[Lion] $x"␤»
diakopter heh
masak seems it doesn't like the [] there, and complains about something else.
diakopter I'm guessing rakudo distinguishes between Typename and Rolename 21:19
and variables look only for Typename, which I guess can't contain [] 21:20
variable *declarations
(/me another blind guess)
jnthn rakudo: role Lion[::T] {}; my Lion of Lion $x; 21:21
p6eval rakudo a54677: OUTPUT«No applicable candidates found to dispatch to for '_block62'. Available candidates are:␤:(Mu ::T )␤␤ in <anon> at line 1␤ in <anon> at line 2:/tmp/QZimRFVWDJ␤ in main program body at line 1␤»
jnthn rakudo: role Lion[::T?] {}; my Lion of Lion $x;
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Unable to parse def_module_name, couldn't find final ']' at line 11␤»
jnthn rakudo: role Lion[::T = Mu] {}; my Lion of Lion $x;
p6eval rakudo a54677: ( no output )
jnthn rakudo: role Lion[::T = Mu] {}; my Lion[Lion] $x; 21:22
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Lion must be predeclared (or marked as declarative with :: prefix) at line 11, near "[Lion] $x;"␤»
masak '[BUG] Error when reporting an error during parsing caused by doing a role with Lions containing each other in Rakudo' -- funniest bug report description in a while :)
jnthn Hmm, maybe we don't parse that work.
*that form
Or know what to do with it.
Curious.
diakopter er and er
masak was just thinking that!
diakopter stop stealing my thoughts!
jnthn But it's not a surprse that you get an error 21:23
masak I'm never surprised at getting an error :P
21:23 hercynium left
jnthn Since there's no variant of Lion that takes no parameters. 21:23
masak right. what diakopter said, IOW.
jnthn I'm only semi-following. :-)
Ah, I see. 21:24
It's still a bit odd.
rakudo: my Positional of Positional of Int $foo;
p6eval rakudo a54677: ( no output )
jnthn rakudo: my Positional[Positional[Int]] $foo;
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Positional must be predeclared (or marked as declarative with :: prefix) at line 11, near "[Positiona"␤»
jnthn Yeah, it's just the bracket form.
21:25 Su-Shee left
diakopter std: my ::Positional[::Positional[Int]] $foo; 21:25
p6eval std 31183: OUTPUT«ok 00:01 105m␤»
diakopter rakudo: my ::Positional[::Positional[Int]] $foo;
p6eval rakudo a54677: OUTPUT«===SORRY!===␤Malformed my at line 11, near "::Position"␤»
masak I'd like to see a parody of "Androcles and the Lion" which punchlines with "but the Lion didn't eat him, because there wasn't a role factory that could create Lion[Human]".
arnsholt =D
masak thanks, I'll be here all week. try the veal. 21:26
jnthn omnomnom veal
diakopter rakudo: my ::foo $x; say $x 21:27
p6eval rakudo a54677: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/BExmqw507I␤»
masak submits rakudobug 21:29
diakopter uh oh.
masak a phantom-typed variable!
diakopter masak: you're encouraging my rakudofuzzing
masak of course!
jnthn I'm pretty sure ::whatever exploding is already in there.
masak there are related tickets, for sure: rt.perl.org/rt3/Ticket/Display.html?id=64642 is one. 21:31
but I find none exactly like this. so I'm submitting it. 21:32
jnthn I've no idea what we're supposed to do in such cases
masak fail at compile-time? ignore the typing? let demons fly out of the user's nose?
jnthn I'd prefer a Null PMC Access to my nose demons escaping. 21:33
Maybe the spec says what to do somewhere. :-)
masak maybe. 21:34
PerlJam It would be cool if "Null PMC Access" came out as something like "you have a demon infestation"
jnthn rakudo: say [mod] 100, 99, 88, 77, 66, 55, 44
p6eval rakudo a54677: OUTPUT«1␤»
masak \o/ 21:35
jnthn colomon: Didn't you write tests for that one?
jnthn just spotted the ticket is still open
21:36 Ross left
supernovus I hope := makes a return soon. The SCGI library depends on the IO::Socket::INET core module which depends on := and is currently broken. I'm guessing that means other network libraries such as HTTP::Daemon are also broken at the moment. 21:38
21:39 Amadiro joined
colomon jnthn: yesterday or the day before, yes. 21:39
diakopter rakudo: my ::&a &a #masak 21:40
p6eval rakudo a54677: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
masak :D
masak submits rakudobug
diakopter that's a parser compiler problem, I'd guess
masak that error usually is.
std: my ::&a &a 21:41
p6eval std 31183: OUTPUT«ok 00:01 106m␤»
masak I wouldn't ok that :P
jnthn wtf.
masak diakopter++ # insane
diakopter wtdiakopter
std: (my ::&a) &a 21:42
p6eval std 31183: OUTPUT«ok 00:01 106m␤»
diakopter std: (my :: &a) &a
p6eval std 31183: OUTPUT«ok 00:01 106m␤»
masak o.O
diakopter std: (my :: &a) & a
p6eval std 31183: OUTPUT«ok 00:01 106m␤» 21:43
jnthn rakudo: my ::foo $x;
p6eval rakudo a54677: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/SNMKIm95YU␤»
masak std: my my my my &a &a &a &a
jnthn masak: You only got a birdie, not a hole in one. :P
p6eval std 31183: OUTPUT«===SORRY!===␤Malformed my at /tmp/J4zIcqzdNM line 1:␤------> my ⏏my my my &a &a &a &a␤ expecting any of:␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 104m␤»
masak jnthn: oops. thought diakopter had golfed it already. :/
21:43 nimiezko joined
masak jnthn: will update the ticket. 21:43
diakopter hee 21:44
jnthn :-)
masak: Yeah, I was looking at it thinking "hmm, I know how that code works and I'm surprised we make it past the declaration" :)
masak :) 21:45
jnthn rakudo: my Positional of Positional[Int] $x; # just curious
p6eval rakudo a54677: OUTPUT«===SORRY!===␤In "my" declaration, typename Positional must be predeclared (or marked as declarative with :: prefix) at line 11, near " of Positi"␤»
21:46 clintongormley left
jnthn std: my Int<omg>; 21:46
p6eval std 31183: OUTPUT«===SORRY!===␤Malformed my at /tmp/UcfOVys1K_ line 1:␤------> my Int⏏<omg>;␤ expecting any of:␤ multi_declarator␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 104m␤»
jnthn ETOOSMART
diakopter std: my ::Foo[Foo] &Foo; Foo 21:48
p6eval std 31183: OUTPUT«===SORRY!===␤Illegal redeclaration of routine 'Foo' (see line 1) at /tmp/AXtoZEmNSI line 1:␤------> my ::Foo[Foo] &Foo⏏; Foo␤Check failed␤FAILED 00:01 105m␤»
diakopter stdbug
21:49 hercynium joined
masak chromatic++ keeps turning ank's stuff into worthwhile stuff: www.modernperlbooks.com/mt/2010/06/...a-bar.html 21:52
jnthn
.oO( And they said "ouch" )
21:53
masak jnthn: the bytebuffer.pmc looks very good. it will probably give us decoding, too. 21:54
at least for UTF-8.
jnthn masak: Yay
21:55 arthur-_ joined, arthur-_ left
colomon \o/ 21:55
21:58 frettled left 22:03 skids left 22:06 estrabd is now known as estrabd_afk, nimiezko left 22:09 Util joined
diakopter std: (:: :(:: :() :) :(::)) 22:13
p6eval std 31183: OUTPUT«ok 00:01 107m␤»
masak ::)
diakopter rakudo: (:: :(:: :() :) :(::))
p6eval rakudo a54677: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
diakopter (no need to report that; I'm sure it's a related cause of the other parser compiler issue)
std: (:: :(:: :() :) :(::):():():()) 22:15
p6eval std 31183: OUTPUT«ok 00:01 107m␤»
22:16 envi^home left
pragma_ What are you trying to do? Give the language-purists more reasons to hate on Perl? 22:17
:p
diakopter who me?
cognominal forgot the way to call an anonymous sub from itself :( 22:18
I don't see any $?SUB? 22:19
&? ! 22:20
masak cognominal: &?ROUTINE
cognominal yea, acking get you only so far when you search the wrong string :) 22:21
Util pugs: sub foo ($word) { say $word; }; our &bar := &foo.assuming( :word<<baz>> ); bar();
p6eval pugs: OUTPUT«baz␤»
Util rakudo: sub foo ($word) { say $word; }; our &bar := &foo.assuming( :word<<baz>> ); bar(); 22:22
p6eval rakudo a54677: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 630:CORE.setting␤ in main program body at line 11:/tmp/4R4nPQWDtR␤»
Util Any estimate on when "binding of variables" will be implemented in Rakudo?
(or at least the binding of subs, as in the above code?)
lue y o hai o/ 22:23
masak lue: oh hai, and good night! 22:24
22:24 masak left
lue :) 22:24
ash__ Util: does that need the binding? also, bindings partially implemented, but the specific syntax := is not 22:26
rakudo: sub foo ($word) { say $word; }; our &bar = &foo.assuming( :word<<baz>> ); bar();
p6eval rakudo a54677: OUTPUT«baz␤»
22:27 tylerni7 joined, tylerni7 left, tylerni7 joined
Util ash__: I was going by the .assuming examples in S06; I had not tried simple assignment. Thanks! 22:28
lue rakudo: my $a = 1; my ($b is rw) := $a; $b = 42; say $a 22:29
p6eval rakudo a54677: OUTPUT«No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤␤ in main program body at line 11:/tmp/7CF2wqjXWW␤»
ash__ perlcabal got a new stylesheet didnt it? it looks different now
lue either I did it wrong, or jnthn has yet to upload his fix.
ash__ I noticed it too.
dalek ok: 2df1ea2 | util++ | src/subs-n-sigs.pod:
[subs] Added section on Currying
ok: fc9b935 | util++ | (2 files):
Merge branch 'master' of github.com:perl6/book
Util (I had already `git push`ed the code with the bindings, though ) 22:30
supernovus dalek: exterminate! 22:31
lue I tried that before. It won't :(
[yet....]
ash__ rakudo: sub f($a is rw, $b is rw) { my $tmp = $b; $b = $a; $a = $tmp; }; my $a = 1; my $b = 2; f($a, $b); say $a, $b; # that wouldn't work if some sort of binding wasn't implemented
p6eval rakudo a54677: OUTPUT«21␤» 22:32
supernovus lue: I think you need to "use SONIC_SCREWDRIVER;" first...
jnthn lue: I have a patch locally that fixes that my ($x is rw) := 42; thingy. 22:33
Will push when spectest run is done. 22:34
oh, it's done
ash__ jnthn: you don't happen to have a patch for "my $a := 3;" ?
jnthn ash__: No 22:35
'fraid not.
lue Hey, at least you can get := binding to work :D 22:37
[somewhat]
Tene what would that even mean? Let you alter the value of 3? 22:38
lue perl6: my $a := 3; say $a
p6eval rakudo a54677: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 630:CORE.setting␤ in main program body at line 11:/tmp/nL5hFiNw1N␤»
..pugs: OUTPUT«3␤»
..elf 31183: OUTPUT«␤»
Tene perl6: my $a := 3; $a = "lolcats"; say 3;
p6eval elf 31183: OUTPUT«3␤»
..rakudo a54677: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 630:CORE.setting␤ in main program body at line 11:/tmp/w9XIZjH9OU␤»
..pugs: OUTPUT«*** Can't modify constant item: VInt 3␤ at /tmp/RFUHVoH3Zf line 1, column 13-27␤»
Tene what are you trying to do with that? 22:39
cxreg Tene: you might want very large values of 3
lue it breaks brains when you assign constants like 3.
[Yours, not rakudo's]
s/assign/bind/ # curse my poor grammar :)
ash__ := is for binding, it thought, so you'd be binding a value to a variable 22:42
22:44 skangas left
dalek kudo: f50c359 | jonathan++ | src/Perl6/Actions.pm:
When we write my ($x is rw) := 42, make sure that we don't try and re-apply the
22:44
lue
.oO(= assigns a kid at the National Spelling Bee with a number, := binds you to a partner during your stint in the Marine Corps.)
Util lue: binding is more like Perl5's glob assignment ( *foo = *bar; # now $bar is an alias for $foo, and changing one changes the other ) 22:48
lue I remember reading about using things like $a = \$b in P5 22:49
Util lue: that is different. The \ operator produces a "reference" (like a pointer in C, but safer). After `$a = \$b`, you can change the value of $b like this: `${$a} = 3; # now $b is 3`. If you just said `$a = 3`, then $a would be 3, $a no longer "points" to $b, and $b is unchanged. 22:54
lue Ah. Well then, I certainly don't want that. :) 22:55
[and If I decided to go with P5, then I would have had headaches there]
jnthn phenny: tell mberends when I just used proto for first time, I got an error Unable to open filehandle from path 'projects.state' - touch projects.state resolved it though.
phenny jnthn: I'll pass that on when mberends is around.
cxreg or Data::Alias 22:57
i wonder if hare-braned things like that will work when running perl 5 code under parrot 22:58
Tene phenny: tell masak When I tried to use Configure in web the first time, btw, it failed because I didn't compile rakudo in a directory called "rakudo", btw
phenny Tene: I'll pass that on when masak is around.
[Coke] btw, btw! 22:59
Tene btw!
btw?
jnthn phenny: tell mberends after that, next issue on install fakedbi is (though at least it picks up the dependency) Building zavolaj...project type Str(). That was apparently though just because I didn't have perl6 in my path (it's good that it writes a helpful what went wrong log and pointed me at it)...now in theory it's installed them both. :-) 23:03
phenny jnthn: I'll pass that on when mberends is around.
23:07 rvperl joined 23:10 justatheory left 23:11 lestrrat is now known as lest_away 23:15 patrickas left 23:16 supernovus left 23:31 felipe left 23:36 justatheory joined 23:38 rgrau left
lue I have color in my Rakudo error output \o/ [for some reason it only takes effect w/ ===SORRY!===, but still] 23:40
And if you ask why, it's because it's -Ofun for me :) 23:41
23:45 justatheory left
jnthn phenny: tell sorear I suspect that environment variables may not be making it through to Perl 5 in blizkost; using CGI (:from<perl5>), .param('blah') gave back nothing, but it works if I do my $cgi = CGI.new(%*ENV<QUERY_STRING>); 23:47
phenny jnthn: I'll pass that on when sorear is around.
jnthn phenny: tell sorear another mapping issue, if you have tuits; calling .param('thing that was not passed') returns a Null PMC.
phenny jnthn: I'll pass that on when sorear is around.
jnthn BTW, sorear++ (Blizkost built out the box on my Linux server), mberends++ (FakeDBI worked out the box there too). 23:48
ash__ isn't Blizkost the perl5 in parrot thing? 23:51
jnthn ash__: Yes
ash__: And it works. :-)
ash__ cool
i'll have to try it out
jnthn 188.40.91.7/cgi-bin/test.p6?name=ash 23:52
It uses Perl 6 FakeDBI to fetch a list of countries from a database
And Perl 5 CGI, accessed through Blizkost. 23:53
ash__ wow nice
23:53 fridim left
jnthn Yeah, especially that I got it to work on my server in < 1 hour, going from having none of the above installed. 23:53
ash__ thats awesome, 23:54
jnthn Some rough edges.
ash__ has even more motivation to fix my old desktop into a server
jnthn But pleasing that it wasn't a terrifying nightmare of hate. :-)
sorear jnthn: What's .param? 23:55
phenny sorear: 23:47Z <jnthn> tell sorear I suspect that environment variables may not be making it through to Perl 5 in blizkost; using CGI (:from<perl5>), .param('blah') gave back nothing, but it works if I do my $cgi = CGI.new(%*ENV<QUERY_STRING>);
sorear: 23:47Z <jnthn> tell sorear another mapping issue, if you have tuits; calling .param('thing that was not passed') returns a Null PMC.
jnthn sorear: Ah, sorry, shoulda been more clear
sorear: A method on CGI 23:56
ash__ I wonder how much work it would be to make a CGI.pm for rakudo (or is there one already)
sorear jnthn: the %ENV stuff isn't surprising me at all
jnthn sorear: my $cgi = CGI.new; say $cgi.param('name'); # should get name from the query string.
sorear: That bit is workaroundable but was the first thing I ran into.
sorear as for null PMCs, that's probably Parrot's fault 23:57
jnthn sorear: The Null PMC OTOH, is a bit less nice, sicne there's no way really (other than a try block :-/) of checking if a parameter was in the query string.
sorear blizkost maps all returns as flattened arrays
jnthn Ah.
But what if there's no return value?
sorear if .param returns a zero-element list to signal failure (not unheard of due to the if (my ($var) = one-or-zero-values) idiom)
jnthn Ah, yeah, Parrot will :flat that and we get a Null PMC. 23:58
sorear does rakudo use a custom binder?
jnthn Yes, but not for returns.
sorear I see
23:58 snarkyboojum joined
jnthn i mean, we'll be emitting like 23:58
23:58 tedv joined
jnthn $P0 = $P1.'param'('name') # approximately 23:59
Thing is, that if you :flat an empty array then $P0 will end up as null.
You're right, it's a Parrot semantic.
I'm not sure what best to do in order to work around it.