»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:03 benabik left 00:07 shinobicl_ joined
dalek ast: fbb9534 | moritz++ | S (11 files):
rakudo unfudges
00:11
00:31 drbean left 00:32 pat_js joined 00:37 drbean joined 00:52 drbean left 00:58 drbean joined
[Coke] moritz++ 01:01
01:15 tokuhirom left 01:27 skangas joined 01:29 Sarten-X joined 01:31 shinobicl_ left 01:35 pat_js left, plutoid joined 01:41 benabik joined 01:42 envi_ joined, ab5tract left 01:49 wolfman2000 left, drbean left 01:56 drbean joined 02:21 replore_ joined 02:29 orafu joined 02:42 lutok left 02:48 wolfman2000 joined 03:07 Radvendii left 03:23 Radvendii joined
Radvendii i have a question... is anyone here to answer it? 03:27
colomon sure 03:28
though no promises 03:29
:)
Radvendii of course, i've just spoken to an empty channel one to many times...
how can i define an infix subroutine • that does exactly the same thing as * (multiplication) and then redefine the * operator to do ** (exponents)? 03:30
colomon right, you were asking that earlier.
Radvendii oh, did you not know?
colomon too busy to answer, and not sure about it.
but thinking now, it's a tricky question, I think 03:31
basic answer is probably no
but there may be ways of doing it I'm not familiar with.
Radvendii dang. no way to rename an operator? 03:32
colomon The thing is, infix:<*> is a multi
Radvendii so i can't trivially replace it wiht •... and there's no rename sub command?
colomon so at a first approximation, if you define an infix:<*>, it will just be another multi 03:33
Radvendii can't i do "our sub infix:<•> := &[*]"?
colomon I've not heard of a rename sub command. (Which is not the same as it not existing at all!)
That's the thing... there are a whole bunch of sub infix:<*> 03:34
03:34 plutoid left
Radvendii that's why i used := 03:34
colomon TimToady's really the one to be answering this. 03:35
Radvendii okay
TimToady: are you here?
colomon I'm pretty sure you can override normal functions.
at least in theory (and in limited scope) 03:36
Radvendii i know you can. the quesiton is can you copy all of the functionality
colomon oh sure, that's easy
as an example: 03:37
nom: sub foo($x) { say "foo $x" }; sub bar($x) { foo($x); }; { my sub foo($x) { say "different foo $x"; }; foo("a"); bar("b"); }; 03:38
p6eval nom a2f3f4: OUTPUT«different foo a␤foo b␤»
colomon nom: sub foo($x) { say "foo $x" }; sub bar($x) { foo($x); }; { my sub foo($x) { say "different foo $x"; }; foo("a"); bar("b"); }; foo("g");
p6eval nom a2f3f4: OUTPUT«different foo a␤foo b␤foo g␤»
colomon there you are
but I don't know how that interacts with multis
Radvendii right. i meant with all of the multis 03:39
colomon certainly you could do infix:<•>($a, $b) { $a * $b } and that would work
with all the multis 03:40
but I don't know how override the default infix:<*> after that
or even if it is possible
Radvendii oh. i see 03:41
:(
colomon like I said, doesn't mean it's not possible
Radvendii mhmm
i'll ask again later
colomon I can kind of imagine doing a new proto in a scope, or something like that, but I've never heard of it being done... 03:42
Radvendii haha. i it would make it hard to use perl eslewhere. i 03:43
i'd have to make a module and take it everywhere with me
colomon yeah, if you ask me the wisdom of overriding basic operators, I think it's a Very Bad Idea. :) 03:44
but I kind of hope it is still possible.
Radvendii mhmm 03:45
how do i make a continous range? like 1.4 ~~ 1..3 would match true. 03:46
colomon Perl makes it possible to do all sorts of crazy things, but there is a strong convention that operators should have strict meanings.
nom: say 1.4 ~~ 1..3
p6eval nom a2f3f4: OUTPUT«Bool::True␤»
colomon It's as easy as that 03:47
back to the other thing, maybe strict meanings isn't quite right. But for instance, lots of languages overload infix:<+> for string concatenation. 03:48
Perl 6 says "No way, that is a fundamentally different operation and should be a different operator." (infix:<~>, to be precise)
trying to make infix<*> be the power operator is very much against the spirit of that. 03:49
gotta go to bed now. keep trying stuff! 03:51
04:01 Guest52959 left 04:09 donri left
Radvendii thanks. 04:11
PerlJam Do we have an advent post for tomorrow? (today) 04:12
PerlJam assumes for the time being that colomon's post is it and starts thinking about the day after tomorrow 04:16
04:21 jimmy1980 left 04:26 am0c left 04:27 jimmy1980 joined, packetknife joined
Radvendii someone should make a macport of rakudo... 04:28
04:44 packetknife left 04:46 Radvendii left
sorear good * #perl6 04:49
04:55 overrosy joined 05:17 mkramer joined, mkramer left
djanatyn developing a small site with Dancer is so pleasant, but I still wish I could use perl6 features 05:28
05:38 alvis left
sorear PerlJam: you mean "Improving Niecza"? 05:42
.u •• 05:47
phenny U+2022 BULLET (•)
sorear niecza: sub infix:<•> is equiv<*> ($x, $y) { CORE::infix<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4 05:48
p6eval niecza v12-7-g6243435: OUTPUT«===SORRY!===␤␤Lexical symbol '&infix:<*>' is already bound to an outer symbol (see ??? line 0);␤ the implicit outer binding at line 1 must be rewritten as &infix:<*>␤ before you can unambiguously declare a new '&infix:<*>' in this scope …
sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::infix<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4 05:49
p6eval niecza v12-7-g6243435: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'CORE::infix' used at line 1␤␤Potential difficulties:␤ &infix:<*> is declared but not used at /tmp/CNKHnd_cvd line 1:␤------> { CORE::infix<*>($x,$y) }; sub infix:<*>⏏($x,$y) is equiv<**> { $…
sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::infix:<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
p6eval niecza v12-7-g6243435: OUTPUT«Potential difficulties:␤ &infix:<*> is declared but not used at /tmp/dOerkPTRNj line 1:␤------> CORE::infix:<*>($x,$y) }; sub infix:<*>⏏($x,$y) is equiv<**> { $x ** $y }; say 1␤␤Unhandled exception: Unable to resolve method postcircumfi…
sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { (&CORE::infix:<*>).($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
p6eval niecza v12-7-g6243435: OUTPUT«Potential difficulties:␤ &infix:<*> is declared but not used at /tmp/bqeoBAZQPk line 1:␤------> ORE::infix:<*>).($x,$y) }; sub infix:<*>⏏($x,$y) is equiv<**> { $x ** $y }; say 1␤␤Unhandled exception: Unable to resolve method postcircumfi…
sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { (&CORE::infix:<*>).($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4; say 5 * 2; 05:50
p6eval niecza v12-7-g6243435: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/Ltmu5HM8GS line 1 (infix:<•> @ 2) ␤ at /tmp/Ltmu5HM8GS line 1 (mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2225 (ANON @ 2) ␤ at /home/p6eval/niecza/…
sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::('&infix:<*>').($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4; say 5 * 2;
p6eval niecza v12-7-g6243435: OUTPUT«11␤25␤»
sorear weird
I wonder why it wasn't working with staticer lookup 05:51
sorear is looking through eir Compose file, finds <Multi_key> <C> <C> <C> <P> 05:56
05:58 alvis joined 06:00 kaleem joined
dalek kudo/nom: 1a9a4a5 | moritz++ | src/core/Num.pm:
return integers from rounders
06:07
kudo/nom: 638029b | moritz++ | t/spectest.data:
run perl.t
moritz good morning 06:08
06:14 odoacre joined
sorear good morning moritz 06:14
06:17 JimmyZ joined
JimmyZ good morning, moritz 06:18
moritz: 638029b80f is bad ?
06:21 jimmy1980 left 06:22 molaf joined 06:24 jimmy1980 joined 06:27 JimmyZ left
dalek kudo/nom: 011993e | moritz++ | t/spectest.data:
remove conflict marker, JimmyZ++
06:29
06:43 JimmyZ joined
JimmyZ phenny: tell moritz S02-names-vars/list_array_perl.t still is lost 06:44
phenny JimmyZ: I'll pass that on when moritz is around.
moritz JimmyZ: you can just talk to me :-) 06:45
phenny moritz: 06:44Z <JimmyZ> tell moritz S02-names-vars/list_array_perl.t still is lost
JimmyZ thought moritz is away
dalek kudo/nom: 6d0867e | moritz++ | t/spectest.data:
fix t/spectest.data, JimmyZ++ again
06:47
06:53 koban joined 07:01 jimmy1980 left 07:02 JimmyZ left 07:05 grondilu joined
grondilu thumbs up for jnthn who has reimplemented the custom postfix operators feature in no time! 07:05
you guys are just great. I just can't wait to see the whole thing running with 100% feature. 07:06
07:07 jimmy1980 joined
moritz there's a solution to not being able to wait :-) 07:10
07:11 jeffreykegler joined
grondilu yeah sometimes I try to help by looking at the code but I must confess it's quite hard to grasp. But I'll keep trying. 07:11
moritz grondilu++
grondilu: I found it easier to start with tests than with the compilers directly 07:12
grondilu by the way, what's the difference between the *.t and the *.rakudo files in the test dir?
07:13 jeffreykegler left
grondilu (I guess the explaination is somewhere in the doc but I haven't found it yet) 07:14
moritz grondilu: the .rakudo files are generated from the .t files by t/spec/fudge 07:15
grondilu: the test file contain #?rakudo skip 'reason' markers
grondilu ok 07:16
moritz grondilu: and t/spec/fudge interprets those, and actually skips the test files
jnthn morning 07:32
07:35 grondilu left
jnthn moritz: thanks for the various unfudgings. I think there's some operator overloading related tests in S06 too...I'd hoped we may be able to run those again with the operator bits. 07:36
tadzik good morning 07:38
jnthn hi tadzik 07:39
07:49 replore_ left 07:50 replore_ joined 07:52 koban left 07:55 mj41 joined 08:07 jimmy1980 left 08:08 jimmy1980 joined 08:15 envi_ left 08:19 wtw joined 08:29 Sarten-X left 08:37 Sarten-X joined 08:51 daxim joined 08:54 pat_js joined
pat_js /msg p6eval perl6: my &tag = {"<$^tag>$^that<$^tag>"}; tag 'b', "hallo 6" 09:00
perl6: my &tag = {"<$^tag>$^that<$^tag>"}; tag 'b', "hallo perl6" 09:02
p6eval rakudo 6d0867: OUTPUT«Method 'at_key' not found for invocant of class 'Str'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:1136␤ in block <anon> at /tmp/HxYm7qDF0h:1␤ in block <anon> at /tmp/HxYm7qDF0h:1␤ in <anon> at /tmp/HxYm7qDF0h:1␤»
..niecza v12-7-g6243435: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Str␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 248 (Any.at_key @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/gNRVJXfugu line 1 (ANON @ 1…
..pugs b927740: OUTPUT«*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns …
pat_js ah sorry, read error messages properly, and you get what's going on… 09:03
09:11 HarryS joined 10:00 odoacre left 10:01 odoacre joined 10:14 replore_ left 10:19 pat_js left 10:22 jimmy1980 left 10:29 jimmy1980 joined 10:41 jimmy1980 left, jimmy1980 joined
moritz jnthn: fwiw I sometimes get an error like this: 10:55
No applicable candidates found to dispatch to for 'Numeric'. Available candidates are: 10:56
which doesn't mention the invocant type
jnthn: would be helpful for debugging to know the invocant type
seems to come from src/binder/multidispatch.c line 785 10:58
jnthn moritz: hmm...it'd be nice if it told you the types of all the args really 11:07
moritz troo 11:12
dalek ast: d4b6b16 | moritz++ | S06- (3 files):
rakudo fudges
11:15
kudo/nom: 0eed6ff | moritz++ | t/spectest.data:
run operator overloading tests
moritz nom: sub postcircumfix:<foo bar>(|$) { say 42 }; foo 1 bar 11:16
p6eval nom 6d0867: OUTPUT«===SORRY!===␤Cannot add tokens of category 'postcircumfix' with a sub␤»
moritz nom: multi sub postcircumfix:<foo bar>(|$) { say 42 }; foo 1 bar
p6eval nom 6d0867: OUTPUT«===SORRY!===␤Cannot add tokens of category 'postcircumfix' with a sub␤»
moritz nom: multi sub circumfix:<foo bar>(|$) { say 42 }; foo 1 bar
p6eval nom 6d0867: OUTPUT«===SORRY!===␤Confused at line 1, near "foo 1 bar"␤»
moritz nom: multi sub circumfix:<` `>(|$) { say 42 }; `1`
p6eval nom 6d0867: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine 'circumfix:<` `>' called (line 1)␤»
jnthn I know postcircumfix doesn't work, but I'm more surprised about circumfixes... 11:27
oh...there's surely a missing & 11:30
11:30 arlinius left 11:31 arlinius joined
jnthn moritz: maybe try changing line 2632 in Grammar.pm to have :name('&' ~ $subname) 11:33
11:40 kaleem left 12:13 tokuhirom joined
moritz tries 12:22
12:28 fridim_ joined
dalek kudo/nom: 68d0b8f | moritz++ | src/Perl6/Grammar.pm:
fix circumfix dispatch, jnthn++
12:36
12:40 jimmy1980 left
moritz erm, s/dispatch/lookup/ 12:41
12:43 jimmy1980 joined 12:44 alim joined 12:47 alim left
flussence is zavolaj usable in nom yet? I haven't been paying much attention lately... 12:48
12:49 alim joined
tadzik yes, it is 12:54
not sure if it passes its tests though 12:55
istr it needs new tests :P
flussence well, tests definitely don't pass here...
13:00 fridim_ left 13:07 icwiener joined
jnthn zavolaj works well for various cases 13:07
not arrays
(yet) 13:08
and yeah, I need to look at the tests. 13:09
flussence the bit that concerns me is seeing "No applicable candidates found to dispatch to for 'trait_mod:<is>'.", when it tries to do "is native()" 13:12
jnthn flussence: I didn't add support for being able to call into functions within the current executable yet 13:26
so it always expects a name
flussence hm, would changing that to "is native('libc.so')" or something similar work then? 13:27
(I could try it myself, but I'm waiting for rakudo to compile...) 13:28
jnthn yeah
well, probably
flussence oh. ran out of RAM.
jnthn That's baaaaad.
flussence meh 13:29
jnthn How much ram do ewe have?
flussence not as much as I woold like (ok, 1GB and I forgot I had a browser open :) 13:30
moritz last I looked, I needed about 1.5G on a 64bit system
jnthn really needs to work out where that's all going 13:31
moritz mls_: any ideas on how to a memory profiler on parrot? :-)
hm, can't we track allocations in the 6model constructors someehow? 13:32
13:32 hrj joined
flussence
.oO( maybe it's time for a new netbook. 1st-gen Atom isn't exactly fast )
13:32
jnthn moritz: yes, I can instrument the repr stuff 13:33
moritz: Though PAST ain't 6modelized yet 13:34
Which is likely part of why the nodes cost some..
dalek ast: 60bb371 | moritz++ | S06-operator-overloading/sub.t:
unfudge circumfix test for rakudo
13:40
moritz jnthn: afaict the current compilation model is to build the complete PAST tree for the file (or eval) first, and then compile that to PIR. Can we somehow change it to compile each statement to PIR, and discards its PAST, keeping the declarational parts in the symbol table? 13:46
13:47 JimmyZ joined 13:53 JimmyZ left
jnthn moritz: not really 13:53
moritz: we need the compilation unit to be fully done before we pass it off tot he optimizer
moritz: in reality our PAST tree simply should not be taking up so much memory 13:54
And we could do with not keeping all the match objects around.
Those are the things I wish we could mroe easily throw out.
*more
moritz well, we only need $.orig and $.pos from $/ for the error messages 13:57
jnthn right. 13:59
PAST notes are a bit heavier than would be ideal at the moment, though. 14:00
er, nodes 14:01
moritz
.oO( the music of the PAST notes )
14:02 tokuhirom left 14:03 thundergnat joined 14:10 Sarten-X left
thundergnat Hi #perl6. 14:13
PerlJam greetings thundergnat
thundergnat I've got some free time over the christmas season so am trying to get some perl6 hacking in.
PerlJam thundergnat++
thundergnat I've been running into some odd problems though.
colomon has anyone come up with an Advent post for today, or is my spare post going to go live? 14:14
moritz colomon: please activate your spare post
PerlJam colomon: looks like you're it
thundergnat I am augmenting a base class with a new method. If I do it in a module and then C<use> that module, it autogenerates a sub call to match the method.
colomon moritz: okay, want to write a last paragraph first. :)
thundergnat However if I augment the class within the script, the sub isn't generated.
rakudo: gist.github.com/1451638 14:15
p6eval rakudo 68d0b8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&nsort' called (line 23)␤»
thundergnat Furthermore, it then doesn't allow me to add the sub in as a multi.
"A symbol &nsort has already been exported" 14:16
PerlJam thundergnat: the "autogenerates a sub" part doesn't sound right to me.
thundergnat If I put the augment into a separate module and load it with use whatever; It autogenerates a sub. 14:17
Or at least it allows calling the method with subroutine calling conventions. 14:18
moritz PerlJam: that's what 'is export' on a method does 14:19
thundergnat @array.nsort vs. nsort(@array)
PerlJam yeah, I didn't look at the code until just now
moritz thundergnat: looks like a rakudobug 14:20
thundergnat It seems like it isn't happening if the augmented method is defined within the script it is called from.
jnthn where is it imported if it's in the same script
moritz thundergnat: though I'm surprised you want to do it that way; I'd rather have a *@ signature in the sub
14:21 Sarten-X joined
thundergnat I'm open to suggestions. I'm still kind of fumbling around. 14:22
moritz I'd also not use augment on Any in a library; it's really bad style and infests all scopes, not just the scope that user loads the library into 14:23
thundergnat Yeah, that is certainly a shotgun approach. 14:24
PerlJam It's worked for Ruby so far :) 14:26
colomon it's live: perl6advent.wordpress.com/2011/12/0...to-perl-6/ 14:28
PerlJam colomon++ 14:30
moritz PerlJam: ... except when not :-) 14:31
PerlJam well ... it all depends on how you define "worked" :) 14:32
tadzik weekend! \o/ 14:33
moritz \o/ indeed
tadzik time for hacking, advent blogging and cheeseburgers 14:34
when's the next free slot?
moritz tadzik: would you have time to prepare an advent post on POD over the weekend?
ah, tomorrow :-)
tadzik sure
I can write it tomorrow
or today due tomorrow
moritz that would be really great
colomon \o/ 14:35
dalek : d6512b7 | colomon++ | misc/perl6advent-2011/schedule:
Added day 9 to the list after the fact. :)
colomon tadzik++
thundergnat moritz: The reason I chose to augment Any was I wanted nsort (natural sort) to have the same scope as sort... and that IS a method of Any. So, perhaps ill advised, but not unreasonable IMO.
moritz thundergnat: reasonableness is a matter of point of view 14:36
:-)
thundergnat Not saying you are wrong, just explaining my reasoning. :-)
moritz sure sure
colomon hey, can we use dashes in grammar method names yet? 14:40
PerlJam wasn't aware that we couldn't 14:41
dalek : 6ebc0c7 | tadzik++ | misc/perl6advent-2011/schedule:
Claim 10th with Pod
colomon PerlJam: it didn't work in b
tadzik this github has a nice editor
colomon leading to a lot of IMO ugly underscores in the ABC grammar
tadzik: yeah, it's really handy for things like adding one line to a text file. :) 14:42
tadzik yeah :)
14:47 mkramer joined 14:53 Radvendii joined 14:55 JimmyZ joined 14:57 xuebo joined 15:09 Trashlord joined 15:11 mkramer left, mkramer joined
[Coke] throttles oracle 11g. "unicode shouldn't be this hard!" 15:12
Juerd Oh, it's very simple. Just utf-8 encode everything and store it in base64
Works everywhere!!!1
moritz :/ 15:13
flussence I'm trying to get the NativeCall stuff I wrote last year working again, which means undoing all the tricks I did to make the code look readable :( 15:15
[Coke] Juerd: I'm querying LDAP from inside pl/sql 15:16
15:20 Radvendii left 15:21 icwiener left 15:22 mkramer left 15:25 mkramer joined 15:27 dudulz joined 15:30 mux_ joined 15:31 mux_ is now known as mux, Psyche^ joined 15:34 Patterner left, Psyche^ is now known as Patterner
moritz what could possibly go wrong :-) 15:35
15:40 simcop2387 left 15:41 simcop2387 joined 15:42 plutoid joined
jnthn heads to the station to go home 15:49
bbi5h
15:58 plutoid left 16:01 xuebo left 16:06 mkramer left 16:07 mkramer joined 16:11 mkramer left 16:12 MayDaniel joined 16:13 mkramer joined 16:19 MayDaniel left 16:20 icwiener joined 16:23 jimmy1980 left 16:25 wolfman2000 left
moritz blogs.usenix.org/2011/12/06/perl-6-...sysadmins/ # just discovered this one on twitter 16:26
16:26 mkramer left, mkramer1 joined
PerlJam "raduko Perl 6 interpreter" [sic] 16:28
16:29 mj41 left 16:30 jimmy1980 joined 16:31 MayDaniel joined 16:34 mkramer1 left 16:36 mkramer joined, thou joined
JimmyZ nice post 16:39
JimmyZ sleeps
16:39 JimmyZ left 16:41 mkramer1 joined, mkramer left
ashleydev I had in interesting conversation about the perl 6 type system last night 16:53
16:53 alim left
ashleydev my friend said that it's going to lead to choice paralisys 16:53
"do I annotate or not"
PerlJam your friend is wrong :) 16:54
ashleydev he compared it to python -- do you compile the regex or not
makes the user think a lot more about writing the same code, having to make more choices
TimToady choice paralysis tends to arise primarily in those who are used to living under totalitarian societies
phenny TimToady: 08 Dec 21:57Z <japhb> ask TimToady Would you mind taking a look at perlcabal.org/syn/S12.html#Abstract...rete_types in the context of the discussion starting at irclog.perlgeek.de/perl6/2011-12-08#i_4808300 and clarifying your current intent?
ashleydev of when to use types or not
TimToady: so about 1/2 the planet? 16:56
TimToady yep :)
moritz ashleydev: it's a simple matter of experience
ashleydev that's not that simple for the noob
TimToady the noob will leave off the types, generally 16:57
moritz ashleydev: in the beginning, people tend to over-type, then they notice that it makes problems, and reduce the number of type annotations
ashleydev moritz: agreed.
PerlJam heh
TimToady well, depends on their background, and surrounding type culture
PerlJam thinks more like TimToady in this regard.
ashleydev but it still makes more decisions and mental motions for the noob
PerlJam the historical Perl default is "no types"
moritz ashleydev: as do any advanced concepts. You can advice the noob to ignore them 16:58
TimToady but typey people tend to look down on nontypey people :)
PerlJam but, yeah if you're coming from Java or such, then you might start out typing everything
moritz ashleydev: just like you can tell them to ignore meta objects and inline assembler
ashleydev eh that's more ignorable
moritz PerlJam: ("no types") not quite correct. Think about % and @ sigils 16:59
16:59 mkramer1 left
ashleydev they don't have to make choices about that on every line of code 16:59
TimToady if you start out typing everything, you don't have type paralysis of the whether-to variatey
*ty
*variety, grr
ashleydev right it's the choice that makes the difficulty
moritz ashleydev: you can ignore type annotations in just the same way
PerlJam The neat thing about Perl 6 is that there's a middle ground. It's not "all types" or "no types", it's "type in small bits as needed"
moritz ashleydev: if you teach a newby, you can just fail to tell them about type annotations in the beginning
ashleydev "as needed" is an experience question
moritz: right for a new to programming noob, but not for the new to perl6 noob 17:00
moritz ashleydev: why not?
TimToady for the latter, you just fail to teach them that they can omit the type :)
ashleydev haha 17:01
17:02 monk joined, monk left
ashleydev back to the python example -- my friend learned python after perl -- and said that it did make him annoyed about having to make choices about compiling the regex or not 17:02
and said that that's going to be minor compared to the perl 6 type system ---
so it's at least something to watch for as this thing gets more new users 17:03
for perl 5 to per 6 people I don't think its going to be as big of a deal...
TimToady well, python is one of those totalitarian regimes :)
ashleydev haha
PerlJam ashleydev: it's true more than funny. 17:04
moritz ashleydev: well, it doesn't hurt to be aware of the problem; maybe we should devote a paragraph or two to that subject in the "Using Perl 6" book
ashleydev moritz: right
PerlJam ashleydev: in python you *have* to make certain choices. In Perl those same choices become DWIM with sane defaults
ashleydev and if we have a NYTProf for perl 6 that can tell us when to add the types it makes it easer to live with leaving them off at first 17:05
PerlJam that would be interesting 17:08
17:09 thundergnat left
arnsholt Common Lisp has a similar typing discipline to Perl 6, and Allegro CL has a mode where it tells you about inlining and type inference which is quite useful 17:10
It's also preposterously verbose, but that's a different question
17:12 Chillance joined 17:14 MayDaniel left 17:23 daxim left 17:24 thou left 17:27 fridim_ joined 17:28 pyrimidine joined 17:32 wtw left 17:36 MayDaniel joined, thou joined 17:38 lichtkind joined 17:43 jimmy1980 left 17:47 icwiener left 17:48 jimmy1980 joined 17:52 xinming joined
moritz I now know why radcalc() is usually called twice in the actions 17:53
benabik moritz: Do tell.
moritz there's a token number:sym<complex> { <img=numish> '\\'='i' }
s/=/?/ 17:54
which runs the action method for <numish> even if the 'i' never matches
benabik As it's supposed to. 17:55
moritz not entirely
see also: LTM
benabik Isn't the action supposed to be called when the rule matches? I'd expect numish to be called, but not complex. 17:56
Delaying subrule action methods from being called until the outer matches would mean they'd all have to get called post-parse, wouldn't it?
moritz yes, but since the declarative prefix includes the '\\'?'i', the LTM matcher should find out early that the whole rule never matches, no? 17:57
benabik the '\\'?'i' is postfix, not prefix. It would have to parse numish before knowing if '\\' will match. 17:58
17:59 xinming left 18:00 xinming joined
moritz benabik: there's also a token number:sym<numish> { <numish> } 18:01
benabik: both participate in LTM
benabik: do you think that the action methods for both <numish> calls should be executed? 18:02
benabik moritz: It has no way to know without parsing numish which rule to run. Since actions are run immediately after the token parses, I would expect them both to be called. 18:03
moritz benabik: but it is supposed to inline <numish>, and have it participate in the LTM
benabik moritz: Really? That's a good optimization, but I didn't think it was required. 18:04
18:04 xinming left
moritz benabik: LTM is specced not to spec at rule boundaries 18:05
benabik "Subpatterns (captures) specifically do not terminate the token pattern, but may require a reparse of the token to find the location of the subpatterns."
18:06 xinming joined
benabik So they don't terminate LTM, but they still may get reparsed. 18:06
moritz but only int he branch that actually matched
"location of the subpatterns" only makes sense for constructing the match object, which implied a successful match 18:07
18:07 MayDaniel left
benabik So it's supposed to delay the success of parsing subrules until LTM is over? 18:08
moritz well, LTM implies parsing subrules
but it should delay the execution of action methods until LTM is over 18:09
the action methods are side effects, which don't mix with LTM (which is purely declarational
)
18:16 xinming left
tadzik Classes are easily defined with the ‘class’ directive, and [single] class inheritance is supported. 18:17
don't we have MI? 18:18
PerlJam tadzik: yes
tadzik I hate it when they want me to log in to comment
benabik It is not completely clear to me from S05 when actions fire. But it does seem to imply all actions are delayed until LTM finishes, but it uses "action" to refer to certain bits of the regex and the actions object. 18:20
It says you can pass an actions object, but it doesn't seem to indicate when they are called. 18:21
18:22 japhb_ left 18:25 kaleem joined, donri joined 18:26 thou left 18:30 xinming joined 18:37 xinming left 18:40 xinming joined
sorear good * #perl6 18:44
dalek ok: e45d20d | duff++ | src/grammars.pod:
update/correct some text
18:45
18:46 xinming left 18:52 xinming joined, overrosy left 18:54 overrosy joined 18:56 fridim_ left 18:57 pyrimidine left 18:59 tokuhirom joined 19:10 mkramer joined 19:23 birdwindupbird joined, birdwindupbird left 19:32 thou joined 19:40 kaleem left, mj41 joined
sorear perl6: my $str = "abcdef"; substr($str,2,2) = "xyz"; say $str 19:41
p6eval pugs b927740, niecza v12-7-g6243435: OUTPUT«abxyzef␤»
..rakudo 68d0b8: OUTPUT«Cannot assign to a non-container␤ in block <anon> at /tmp/_79b1UJIMc:1␤ in <anon> at /tmp/_79b1UJIMc:1␤»
colomon sorear: how did you implement that? 19:43
sorear colomon: same way p5 does - substr returns a tied variable
said tied variable holds a lvalue reference to $str 19:44
colomon that is the classic approach, I guess! :)
moritz niecza: my $str = 'abcdefg'; substr($str, 1, 3) ~~ s/\w ** 2/12/; say $str 19:45
p6eval niecza v12-7-g6243435: OUTPUT«a12defg␤»
[Coke] I wonder if we can have a useful NYTProf that is implementation-agnostic. 19:46
moritz I'd be very surprised
[Coke] can we have perl6 code today that has niecza-specific code in one branch, rakudo-specific in another, and runs in both perls?
sorear perl6: say $*PERL 19:47
p6eval rakudo 68d0b8: OUTPUT«Failure.new()␤»
..niecza v12-7-g6243435: OUTPUT«Any()␤»
..pugs b927740: OUTPUT«␤»
moritz [Coke]: sure. Conditionals and evals exists
sorear you do have to use eval though. TimToady is pretty adamantly against conditional compilation
PerlJam Having NYTProf for Rakudo would be very nice though
[Coke] moritz: ah, it'd have to be eval'd, huh? I was thinking compiled, which would be tricky. 19:48
moritz [Coke]: well, depends
dalek dule-Starter: e8b9c9e | dukeleto++ | LICENSE:
Add a MIT license
moritz [Coke]: stuff that compiles in both compilers doesn't need to be eval'ed, of course 19:49
19:49 aindilis joined 19:52 Trashlord left 19:56 mkramer left 19:57 wolfman2000 joined 20:03 shinobicl_ joined
[Coke] rakudo: say $*VM 20:20
p6eval rakudo 68d0b8: OUTPUT«("name" => "parrot", "config" => {"git_describe" => "RELEASE_3_10_0-123-gbd49640", "sha1" => "bd496407faa0fcf0444807b4db9f81c0ebd4960e", "a" => ".a", "ar" => "ar", "ar_extra" => "", "ar_out" => "", "archname" => "x86_64-linux-gnu-thread-multi", "arflags" => "cr", "…
20:21 overrosy left
[Coke] wonder how much of that is just crap from perl5 we're lugging around. 20:21
hey! when we can switch to using rakudo for our build system? ;) 20:22
20:23 overrosy joined
moritz :-) 20:23
sorear tried to find good documentation of exactly what $*VM et al should contain, but couldn't 20:26
I guess I'll just mirror Rakudo 20:27
moritz feel free to add more useful information :-) 20:28
20:29 Trashlord joined 20:31 overrosy left 20:32 zby_home_ joined, overrosy joined 20:33 hundskatt joined
[Coke] sorear: were those tickets at all helpful? 20:33
I mean, I basically just said "moritz++ added a spec test we don't pass."
It would be nice to have a CI server for the various implementations to check their spec status. 20:34
20:35 mkramer joined, mkramer left 20:36 localhost left 20:37 localhost joined
sorear [Coke]: we already have a server that builds all the implementations every 30m to 2h 20:40
[Coke] sweet. can we get it to run "make spectest" and submit the results to, say feather.perl6.nl:2653/ ? 20:41
sorear [Coke]: I don't know anyhing about CI servers, though
what
Unable to retrieve feather.perl6.nl:2653/: Network is unreachable
[Coke] bah. give me 2m. 20:42
(it's a replacement for smolder.) 20:43
sorear I'm WTFing at the fact that I'm talking on IRC while other programs return ENETUNREACH
[Coke] still a WIP, but intended to be a server to receive TAP output and report on it.
there's nothing listening at the moment. 20:44
20:47 Moukeddar joined
Moukeddar o/ guys 20:47
[Coke] ok, feather.perl6.nl:2653/ is back, but after switching to a new perl, I'm getting an odd failure. Wonder if it's a new version of Mojo or something. 20:53
_sri [Coke]: missing YAML.pm is odd? 20:55
20:56 alim joined
[Coke] _sri: that is not the error I'm seeing. 20:57
Global symbol "$projects" requires explicit package name at template
_sri hmm, i see it only after reload 20:58
[Coke] I was in the middle of installing YAML (since I need it for something else). morbo might have gotten confused.
_sri also not odd, there's no projects stash value
[Coke] woof. and after installing YAML (which i needed only for the uploads) now it works. but I had to restart morbo because it didn't notice. 20:59
sorear o/ Moukeddar
how are you
[Coke] _sri: but I was setting it; how do you see it wasn't set?
Moukeddar seen better days, how about you?
aloha better days, how about you was last seen in 15317 days 20 hours ago .
_sri that's allright, morbo watches only the project by default
[Coke] aloha-- 21:00
aloha [Coke]: 1 (pffft)
Moukeddar i have a question, but it's more related to learning than Perl6, can i ?
[Coke] {aloha}--
sorear Moukeddar: go ahead
_sri [Coke]: missing stash value is the only case that triggers that error usually
Moukeddar aloha, i don't get your point
_sri it's rather common
Moukeddar so, when it's a good time to start writing? like a blog for example 21:01
[Coke] _sri: Except that I didn't change any of that code. only installed YAML. so it's not that I wasn't setting it, it's that something was throwing an error, and it was getting eaten.
_sri and of course, there is no stash value in the dump below the code :)
sorear 15317 days ago? that's, uh, 40 years ago, 1970...
[Coke] sorear: yes, it's epoch.
bug in the basicbot module aloha is using, no doubt.
_sri at the time of that exception you only had action and controller in the stash
[Coke] _sri: yes, but it didn't show me /the thing that caused the error/ 21:03
sorear Carp::Always is your friend
Moukeddar for example, do you have to be a pro to blog/write? or writing enhances the learning experience ?
_sri [Coke]: not following i'm afraid
sorear Moukeddar: you're writing right now! 21:04
sorear often wonders whether ey should start a blog
Moukeddar lol, i'm aware of it
[Coke] _sri: e.g. I have changed the code that does "use YAML" to now say "use YAML2" and it's showing the same error regarding $projects. 21:05
Moukeddar i mean something like an article
[Coke] ey?
_sri [Coke]: somethign obviously prevents the stash value from getting set
not sure what more you could expect 21:06
[Coke] _sri: I would expect it to tell me that YAML2 is not found. ;) 21:07
_sri [Coke]: umm, that's exactly what it just tells me ;p 21:08
[Coke] which added Carp::Always does for me. good enough.
_sri: because I JUST added Carp::Always.
let me remove it.
ok. reload it now. 21:09
where does it say "YAML2" ?
_sri interesting
could be a bug
[Coke] sorear++ #helpful suggestion 21:10
21:10 gfldex joined
[Coke] sorear: so, anyway, to something like feather.perl6.nl:2653/ 21:11
21:22 jimmy1980 left
_sri [Coke]: is there anything special about that controller or route? because i can't replicate the issue 21:22
21:24 jimmy1980 joined
[Coke] _sri: because it is fixed. 21:25
sorear [Coke]: cool. 21:26
_sri [Coke]: no, i was trying to replicate your problem in a test case
sorear [Coke]: how much can I expect this to stay up?
_sri missing module not throwing an exception is weird
sorear [Coke]: what is the protocol for uploads? 21:27
[Coke] sorear: if people start relying on it? it's on feather, so barring unforseen circumstances...
sorear: same as for smolder, for now.
_sri: nothing special, though you might want to create the DB first. 21:28
one of muddle's make targets should build you a sample db.
_sri [Coke]: out of time now i'm afraid, if it is a mojolicious issue please file a bug report with something we can replicate 21:29
we'll have it fixed in no time
[Coke] _sri: no worries, Carp::Always is my friend.
sorear [Coke]: I've never used smolder
[Coke] sorear: I can leave that one as more of a stage and do my dev on another instance. 21:30
21:30 whiteknight joined
[Coke] sorear: let me see if I can find/make some docs for you on that. 21:30
21:31 whiteknight is now known as Guest97044
[Coke] finishing out $DAYJOB, will do this tonight. 21:31
_sri++ # danke.
21:32 arlinius left
_sri [Coke]++ # sure 21:32
[Coke] sorear: added feather.perl6.nl:2653/niecza/ 21:33
sorear [Coke]: I get that I should be sending POST requests to feather.perl6.nl:2653/niecza/upload of type multipart/form-data 21:34
21:35 Moukeddar left 21:36 MayDaniel joined 21:40 zby_home_ left
[Coke] the code to parse the request is here: 21:42
github.com/coke/muddle/blob/master...Smolder.pm 21:43
I can write up real docs on how to generate that tonight.
parrot and rakudo are also setup to submit to smolder, so you could just steal their stuff.
rakudo is 'make spectest_smolder' 21:44
(changing that to point to muddle should just be a URL change.) 21:45
sorear looks like I can use curl -F 21:48
ah
hmm, spectest_smolder sets a lot of fields that aren't on the muddle upload form 21:50
[Coke] I ignore some stuff. ;) 21:51
21:51 wolfman2000 left
[Coke] (you are the first person to have to do anything other than upload already-run smolder .tgz's. ;) 21:51
sorear is smolder.parrot.org gone? 21:52
21:52 y3llow_ joined 21:53 pothos_ joined 21:54 pothos_ is now known as pothos, y3llow_ is now known as y3llow
[Coke] I don't think so, but it's a PITA to maintain. 21:55
so it's on the way out.
sorear hmm, looks like I need to replace niecza's spectest harness with something closer to Rakudo's 21:58
hey, crazy idea time 22:03
the server I'm looking into running CI on is, coincidentally, the same server that runs dalek 22:04
...what if we integrated them?
you push, CI run starts 3 seconds later
PerlJam sorear: how continuous do you want CI? 22:05
sorear ... and then it reports failures on IRC
PerlJam: huh?
22:06 shinobicl_ left
PerlJam jnthn pushes, 10 seconds later moritz pushes ... what happens? 22:06
(given that the CI run started 3 seconds after jnthn's push)
sorear PerlJam: second run doesn't start until the first run finishes 22:07
when a run finishes, a new run is started if there were commits during the previous run
22:09 hillu joined 22:10 donri left, imarcusthis left 22:11 donri joined 22:13 imarcusthis joined
sorear how about this: start a #p6eval channel. All test and build reports get reported there. _failing_ reports also go here. 22:17
[Coke] that sounds nice.
would you be posting stuff to smolder and or muddle also? 22:18
sorear to muddle, yes
[Coke] (which means I need to get my act together and clean up that project.)
sorear does muddle have any way to report the provenance of a report?
I think it would be useful to distinguish reports generated from the precise p6eval chroot from general reports 22:19
[Coke] right now it's in the DB as generic tags on any smoke report. 22:20
if we want to make some of the required, that's doable.
(and the version out there now doesn't report on them.)
3|Submitter|coke@slurpee.local 22:21
(there's one of the tags...)
I need to adda way to report on those. 22:22
-> stuff. later.
22:23 jimmy1980 left 22:25 cognominal_ joined, arlinius joined 22:27 cognominal left
jnthn home 22:29
22:29 jimmy1980 joined 22:30 PZt joined
sorear hello jnthn 22:31
jnthn hi sorear 22:36
how's things?
sorear yesterday was the last day of classes for the fall2011 semester
I've got plenty of time, but also a bit of transition-stress 22:37
jnthn Well, remember to get enough rest and relaxation amongst everything. :) 22:39
jnthn could really use a relaxing weekend, but really must tend to some $dayjob things...alas, due to neglecting them in November because hacking on Rakudo was more fun. 22:40
22:48 tokuhirom left 22:49 wolfman2000 joined 22:50 jimmy1980 left 22:56 alim left, jimmy1980 joined
dalek ecza: 0f282bf | sorear++ | lib/Builtins.cs:
Improve documentation of Builtins.cs functions for colomon
22:58
23:05 MayDaniel left, mj41 left 23:24 wolfman2000 left 23:38 jimmy1980 left 23:42 fridim_ joined, jimmy1980 joined 23:46 snearch joined