»ö« 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:05 NamelessTee left 00:18 tokuhirom joined 00:21 _jaldhar joined 00:25 jferrero left 00:26 wolfman2000 joined 01:26 isBEKaml left 01:31 _jaldhar left, _jaldhar joined 01:37 lichtkind left 01:45 IngisKahn left 01:52 raiph joined 02:04 whiteknight left 02:11 orafu left, orafu joined 02:32 Chillance left 02:51 plobsing joined 02:55 _jaldhar left 02:56 _jaldhar joined 03:04 thelazydeveloper left 03:10 tokuhirom left 03:11 tokuhirom joined 03:15 tokuhirom left
raiph phenny, tell lichtkind couple quick gollum experiments at github.com/raiph/tablets/wiki/Jump...at-we-want ... I'll probably have time later today (Sunday) to try more 03:16
phenny raiph: I'll pass that on when lichtkind is around.
03:16 raiph left
ingy masak: o/ 03:18
03:40 vlixes left 04:01 birdwindupbird joined 04:20 skids joined 04:55 araujo left, aloha left 04:57 aloha joined 05:38 tonyni__ joined
moritz \o 05:39
05:43 oiig_ joined
sorear o/ 05:45
05:54 mucker joined 05:57 jaffa4 joined 06:00 mucker left, mucker joined 06:04 birdwindupbird left 06:20 dm4 joined 06:22 birdwindupbird joined 06:26 sivoais left
sorear n: for 1..6 { .print; } 06:59
p6eval niecza v15-6-gefda208: OUTPUT«Unhandled exception: Unable to resolve method print in class Int␤ at /tmp/rU9PCxWZOQ line 1 (mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65) ␤ at /home/p…
sorear moritz: ping 07:01
07:02 birdwindupbird left
jaffa4 hi 07:02
How to compare the type of a class with a string? 07:03
sorear $myClass.^name eq $string
but why would you want to do such a thing?
jaffa4 who knows? 07:04
sorear jaffa4: Don't do it.
If you don't know why you're doing it, JUST DON'T.
jaffa4 supposed to be part of test
if someone knows how to use introspection in Perl 6. 07:05
sorear dude, I already answered you
very first thign
jaffa4 that is clear and I answered you.
I tried to use WHAT 07:07
I just cannot stringify it.
sorear use .^name on it 07:08
00:03 < sorear> $myClass.^name eq $string
r: my $x = Int; say $x.^name eq "Int"
p6eval rakudo 3bd91f: OUTPUT«True␤»
sorear r: my $x = Int; say $x.^name eq "Str"
p6eval rakudo 3bd91f: OUTPUT«False␤»
jaffa4 this works too print $b.WHAT.^name
ok 07:09
sorear *sigh* 07:10
sorear is in a very mjd mood right now
jaffa4 mjd?
au yrlnry </not-helping> 07:11
Mark-Jason Dominus (a bit more helping)
shachaf yrlnry = mjd? 07:12
Apparently. 07:13
sorear au: jaffa4 just asked me in PM who mjd is. 07:20
jaffa4 So?
sorear au: I think ey might have you on ignore. 07:21
au or maybe I didn't explain sufficient context. :)
sorear jaffa4: It doesn't make me want to answer your questions if I see you ignoring answers 07:22
jaffa4 I am missing context here, a lot
The answer did not make sense.
au MJD had a famous quote that I had to look up (in a conference now) 07:24
"You can't just make shit up and expect the computer to magically understand what you mean, retardo" - mjd
and other bitter quotes such as this
jaffa4 sorear: how to convert a perl6 program into and exe?
au which is, of course, unconductive to productive community discussion, but we all have such moments.
jaffa4 Is it possible with netcza?
sorear I was hoping to use mjd as a coded reference to my own frustration 07:25
jaffa4 that assumed your audience understands your references.
sorear jaffa4: niecza cannot produce a single exe from your program; it produces an exe and a bunch of dlls
au a bit of antidote (allison's talk I transcribed just now) paste.plurk.com/show/1008460/
jaffa4 sorear: that is ok
I just could not find an example how to do it, Do you have one? 07:26
sorear this could really stand to be documented 07:27
jaffa4 I guess it is just couple of lines..right? 07:28
sorear Yes
jaffa4 Could you share it with me? 07:29
sorear I'm writing it up now
I want this for posterity, in a better way than the logs
fglock o/ 07:30
au /o
07:30 GlitchMr joined
fglock figuring out the rules for interpolation inside regex in perl5 07:37
au would PPI help? 07:38
fglock $a[2] $a[-1] interpolates, $a[2-3] $a["1"] doesn't 07:39
hmm - maybe, I'll take a look
sorear hrrrmh. Bundling is not working right now and I can't figure out why 07:42
oops
dalek ecza: d71c0cd | sorear++ | docs/making-standalone-exes.txt:
Add draft documentation on making shippable binaries
07:49
sorear jaffa4: try reading that
jaffa4 with .net, where are the generated object? 07:55
07:55 sivoais joined
sorear same place 07:55
jaffa4 in short, all files need to be copied from obj directory 07:57
and main file needs to be renamed.
sorear yes
jaffa4 how optimised is the generated code? 07:58
sorear Never enough. :)
jaffa4: apologies for rough treatment earlier
I need to watch myself better
jaffa4 great, you solved the long running problem of perl compilation. 08:00
sorear, I see so you are self-improving type? 08:02
fglock no luck with ppi, it doesn't parse the regex: PPI::Token::Regexp::Match '/xyz$a[1]/' 08:03
jaffa4 fglock, what are you doing with PPI? 08:04
fglock trying to figure out the parse rules for interpolating strings into regex in perl5 08:05
au ponders "use re 'debug'"
oh right, you were designing so it doesn't need calling to /usr/bin/perl 08:06
nvm
sorear <3 self improvement 08:07
fglock trial-and-error works :P 08:08
au fglock++ # perseverance 08:10
08:13 NamelessTee joined
jaffa4 intention works 08:13
08:18 thou left 08:46 tonyni__ left 08:52 araujo joined, araujo left, araujo joined
moritz sorear: PONG 08:57
erm, pong 08:58
sorear moritz: ISTR that you hold the mutex on implementing rebuilds on feather1/3. Is this correct? 08:59
moritz not really
its missing cronjobs and some output redirects
sorear ok, I'll make it work when I get a round tuit 09:00
moritz all my square tuits are round 09:06
ok, I'm installing some cronjobs now 09:08
09:12 cognominal_ joined 09:15 cognominal left 09:16 uvtc left
moritz r: say 1 09:21
p6eval rakudo 3bd91f: OUTPUT«1␤»
09:22 uvtc joined, uvtc left, Trashlord left
masak antenoon, #perl6 09:30
moritz \o masak
sorear sleep
moritz r: say 1 09:31
p6eval rakudo c384ab: OUTPUT«1␤»
09:31 mucker left
moritz r: my $x = 5; say MY::<$x> 09:31
p6eval rakudo c384ab: OUTPUT«5␤»
moritz \o/
jnthn++
\o/ 09:32
r: my $x = 5; { my $x = 8; say OUTER::<$x> }
p6eval rakudo c384ab: OUTPUT«5␤»
moritz r: my $x = 5; { my $x = 8; say $OUTER::x }
p6eval rakudo c384ab: OUTPUT«5␤»
moritz r: say open("README").get
p6eval rakudo c384ab: OUTPUT«open is disallowed in safe mode␤ in sub restricted at src/SAFE.setting:2␤ in sub open at src/SAFE.setting:5␤ in block <anon> at /tmp/_qKDvLQQ8k:1␤␤»
moritz r: say OUTER::open("README").get
p6eval rakudo c384ab: OUTPUT«Method 'Any' not found for invocant of class 'Str'␤ in <anon> at src/gen/BOOTSTRAP.pm:803␤ in any <anon> at src/gen/BOOTSTRAP.pm:800␤ in block <anon> at /tmp/wzNA1qk7yY:1␤␤»
moritz that's a weird error 09:33
masak reads the backlog and marvels at how jaffa4 manages to find new, provocative ways to not know stuff and not listen to advice 09:35
au . o O ( whetstones )
masak sounds like a nice metaphor for something. 09:37
moritz std: 1
p6eval std 3d13d53: OUTPUT«ok 00:00 40m␤»
moritz that's up to date. good
jnthn mornin' 09:38
masak sorear++ # writing something up as response to someone's question
jnthn nom: say Int::.WHAT
p6eval rakudo c384ab: OUTPUT«Stash()␤»
jnthn Woo. 09:39
masak \o/
moritz r: class A { }; subset A of Any;
p6eval rakudo c384ab: ( no output )
moritz that's the last failing test in S32-exceptions/misc.t 09:40
jnthn Hm. That should be a redeclaration error... 09:43
moritz correct
jnthn Prolly me to blam 09:44
*blame
moritz correct :-)
jnthn will try to turn that wtf into a ftw
moritz prolly just misses a check in the actions 09:45
masak allison++ # paste.plurk.com/show/1008460/
moritz hm, there's a check in the grammar already 09:46
for some reason it's not triggered
jnthn oh, think I may see it 09:47
jnthn tries a patch 09:48
masak jlongster.com/2012/02/18/its-not-ab...-read.html # for people interested in macros. 09:49
it gave me a bit of an enlightening experience.
09:50 zhutingting joined
masak macros are just the conduit for re-jiggering what the parser does. yep, we knew that. 09:50
but it's *hard* to find good examples of when to use a macro by going looking for it. I think the use cases will b
present themselves gradually, slowly.
dalek kudo/nom: 64f70e8 | jnthn++ | src/Perl6/Grammar.pm:
Fix a thinko.
09:51
09:56 cognominal_ left, cognominal_ joined
moritz if a macro in lisp changes the syntax of the language, does (read ) know about that? 09:58
dalek kudo/nom: 0227a99 | jnthn++ | src/Perl6/World.pm:
Remove a workaround I couldn't figure out why was needed; turns out it was just the buggy call from token subset.
09:59
jnthn moritz: All cleared up now. Thanks.
10:00 Trashlord joined
jnthn Also, the cleaned up name handling gives a little performance win that pulls my spectest run back under 200s. :) 10:00
dalek ast: 0de66e0 | moritz++ | S (7 files):
rakudo unfudges
10:05 cognominal_ left, cognominal_ joined 10:11 GlitchMr left
dalek kudo/nom: 1639834 | jnthn++ | src/Perl6/Grammar.pm:
Eliminate the last remaining use of parse_name in the Grammar.
10:14
kudo/nom: e07d6e4 | jnthn++ | src/Perl6/Actions.pm:
Toss an unused action method that mostly dates back to the pre-nom days.
kudo/nom: a803152 | jnthn++ | .gitignore:
Add .exp and .lib to .gitignore.
jaffa4 sorear: why do you have ser files? 10:21
jnthn
.oO( He likes cheese )
masak .oO( he's of the noble class in the Ice and Fire universe ) 10:22
geekosaur because they are? 10:24
jaffa4 look redundan
jnthn I think they contain serialized data 10:25
Like, about the classes etc.
jaffa4 the source code itself in there.
I guess he stored the parse tree in ser files 10:27
geekosaur could also be used for optimization (inlining?)
jaffa4 probably not
geekosaur I didn't esay it was necessarily implemented yet, just there to support it 10:28
dalek kudo/nom: a648357 | jnthn++ | src/Perl6/Actions.pm:
Eliminate the majority of the remaining uses of parse_name; just one left in Actions now.
10:30
10:39 spider-mario joined 10:42 whiteknight joined 10:43 daniel-s joined
daniel-s perl6: say "hi" 10:44
p6eval pugs, rakudo 0227a9, niecza v16-19-gd71c0cd: OUTPUT«hi␤»
daniel-s :)
arnsholt moritz: Most Lisp macros don't change the syntax as such, since it's all sexps anyways 10:48
But AFAIK read will obey new reader macros when reading in stuff
masak daniel-s! \o/ 10:49
arnsholt: presuming you mistab'd and meant me. 10:50
tadzik p6: say "hi daniel-s"
p6eval pugs, rakudo 0227a9, niecza v16-19-gd71c0cd: OUTPUT«hi daniel-s␤»
masak arnsholt: well, my point is something like, we'll miss all the cool use of macros as long as we're just thinking "like subs, but slightly different".
arnsholt: we probably need to think more like "let's co-opt the parser" 10:51
10:52 JimmyZ joined
arnsholt masak: No, moritz had a question about read(), at least in my history =) 10:55
But yeah, co-opting the parser is fertile ground for cool stuff I think 10:56
masak oh.
arnsholt But I like talking to you too, so that's ok ^_^
masak ah, now I see moritz++' question.
masak .oO( reverse meta-mistab )
anyway. I now think macros are syntactically and semantically like subs, but pragmatically quite different. 10:57
arnsholt Makes sense, I think 10:58
I mean, even in Lisp, a macro-call and function-call are syntactically the same. It's the semantics (FSVO semantics) that are different 10:59
masak I've ported Salvador Fandino's blogs.perl.org/users/salvador_fandi...erl-5.html to Perl 6. 11:00
arnsholt (Modulo other stuff called macro which isn't defmacro())
masak but I can't seem to shake out the last bug from out of it. does someone want to help me?
here it is: gist.github.com/2391923 11:01
note that it is a straight port -- that is, I don't try to write idiomatic Perl 6, I try to keep as close to the Perl 5 as possible. 11:02
I'm tempted to make a more idiomatic version once I/we get this one to work.
speaking of which, I finally grok'd irclog.perlgeek.de/perl6/2012-03-28#i_5361317 11:04
11:04 thelazydeveloper joined
masak the simple answer is that Salvador changes the string as he goes. so after he's checked for length-two things, there's already an x there when he checks for length-three things. 11:05
d'oh.
:)
dalek kudo/nom: 8f94276 | jnthn++ | src/Perl6/ (2 files):
Eliminate last remaining parse_name call, whihc was in compilation of variables. Another tiny speedup from avoiding the reparsing.
kudo/nom: 1421472 | jnthn++ | src/Perl6/Grammar.pm:
Toss parse_name.
spider-mario yay, I like speedups. 11:06
:)
tadzik \o/
jnthn They're compilation time ones. 11:07
tadzik even better
spider-mario still, it’s appreciated
thanks
masak r: say "foooo" ~~ /^ f o ** 4 $/
p6eval rakudo 0227a9: OUTPUT«=> <foooo>␤␤»
jnthn Basically, we used to re-parse names in a bunch of situations. Now we just go off the perfectly good parse that the parser already produced. :)
masak r: my $l = 4; say "foooo" ~~ /^ f o ** $l $/
p6eval rakudo 0227a9: OUTPUT«#<failed match>␤»
masak oh!
r: my $l = 4; say "foooo" ~~ /^ f o ** {$l} $/
p6eval rakudo 0227a9: OUTPUT«=> <foooo>␤␤»
masak well.
that explains it.
:(
masak submits rakudobug
tadzik jnthn: do you have plans to look into module loading bugs? 11:08
jnthn tadzik: Yes; just want to finish up the name cleanup and pseudo-package stuff I started off way back at GPW first :)
tadzik sure thing :) 11:09
jnthn Plus get us a couple more greens in the features page :)
masak: Curious. I can't help but wonder if it's treating it as a seperator.
11:09 estrai left
jnthn masak: I didn't completely rip the old ** for separator syntax out yet. 11:10
masak jnthn: right, 'cus Rakudo ain't been updated to the new % syntax.
jnthn: anyway, it's in RT now.
jnthn masak: Yes and no.
masak: It supports the new syntax.
masak oh!
jnthn The old one was left in for migration purposes.
masak .oO( lemmings jumping off cliff purposes )
jnthn It's been in a couple of star releases now with a big fat warning though :)
arnsholt jnthn: More about CSTRUCT_ATTR_*. Is CSTRUCT/CARRAY/CPTR intended as "it's an X", or "it's in an X"?
tadzik is there, the big fat warning? 11:11
masak jnthn: you expect me to read release announcements? I just write them! :P
jnthn: anyway, there being a difference between . ** $l and . ** {$l} is insane.
jnthn Here's a quote:
Currently, we have maintained backwards compatibility with some changed pieces of syntax, but will drop them in an upcoming release:
“<…>” in proto regex bodies; now this should be written “*” The use of “**” with a separator in regexes; this is now done by using “%” or “%%” on another quantifier
masak as in, not un-sane a la tadzik, but insane. 11:12
jnthn masak: (insane) yeah, another good reason to ahve changed the syntax to % :)
tadzik I mean, Grammar.pm itself could warn of it
jnthn arnsholt: I meant it as "this attribute points to a..."
masak heh. fixed the script; getting another wrong answer :P 11:13
arnsholt jnthn: Cheers. That's what I thought, but was a bit confused by the description "attribute location flags" 11:14
dalek atures: 3559c67 | jnthn++ | features.json:
Rakudo now does CALLER, DYNAMIC, OUTER, MY, OUR.
11:15
jnthn arnsholt: Feel free to explain them in a way that makes more sense :)
11:15 fsergot joined
fsergot Hi #perl6 o/ 11:16
arnsholt I can try, at any rate =)
tadzik hi fsergot 11:17
masak o fsergocie, dzień dobry!
arnsholt I've added another define after MASK as well, for the number of bits to shift when building up attribute_locations
jnthn OK 11:19
jnthn afk for a bit
fsergot Do I have to write modules as dependencies if tests require them? 11:20
tadzik I would do so
well, I _do_ so :)
fsergot tadzik++ thanks ;) 11:21
masak r: my $l = 3; say "x" x 10 ~~ / x ** {$l} / 11:23
p6eval rakudo 142147: OUTPUT«=> <xxxxxxxxxx>␤␤»
masak aw, crap.
no wonder I'm not getting le right result! >:(
masak submits another rakudobug 11:24
I can't even begin to give a reason for this one!
it's just "not to spec" in an unknown way. 11:25
masak rants and raves all the way to RT
felher gives masak a hug 11:26
masak thank you. :/ 11:27
suggestions for workarounds appreciated.
I could use &eval, I guess.
but this is going up as a blog post, and I'd prefer something rather clean.
r: my $l = 3; say "x" x 10 ~~ / x ** {$l..$l} / 11:28
p6eval rakudo 142147: OUTPUT«=> <xxxxxxxxxx>␤␤»
masak r: my $l = 3; say "x" x 10 ~~ / x ** {say $l; $l} /
p6eval rakudo 142147: OUTPUT«3␤3␤3␤3␤3␤3␤3␤3␤3␤3␤=> <xxxxxxxxxx>␤␤»
tadzik there is no depends_tests as for now, maybe there will be one day
masak r: my $l = 3; say "x" x 10 ~~ / (x+) <?{ $0.chars == 3 }> / 11:29
p6eval rakudo 142147: OUTPUT«#<failed match>␤»
masak oh, is that the "backtracking into submatches" bug? d'aaargh! 11:30
or maybe someone'll come along and claim "you can't use $/ that early", even though they're wrong about that... :)
masak is clearly too opinionated to program right now :) 11:31
masak shelves it for now
arnsholt jnthn: I'm getting boatloads of errors compiling nqp on OS X, BTW (for some reason Parrot went with g++ as the compiler) 11:33
Should I try to clean it up a bit when I get around to it, or just ignore them? 11:34
moritz ignore errors?
arnsholt Durr. s/errors/warnings/
moritz I think bbkr submitted bug reports for them 11:35
feel free to clean up if you have some spare tuits
arnsholt Cool
I'll put it off for now since recompiling NQP means recompiling Rakudo, and that's too time-consuming for my tastes right now 11:36
moritz if you don't do 'make install' in nqp, there's no reason to recompile rakudo afterwards 11:40
masak if I'm reading S05 correctly, . ** $var always meant 'use $var as a separator', regardless of what type $var is. and thus that's obsoleted syntax now.
so one has to use braces there. 11:41
that feels... slightly less motivated now that we have %
but maybe it's deemed necessary to forbid braceless counts because of the former use of it for separators. 11:42
moritz masak: note that ** <literal_range> is considered declarative 11:43
masak: which is only possible if the range is known at compile time
which is why interpolation requires a block
masak mhnm, not buying that. literal strings in a regex can only be considered declarative if they're not variables, too. 11:44
moritz which is a known NYI in rakudo
masak and yet you don't need braces to insert a variable in place of a literal string.
haha, my Gmail thinks [email@hidden.address] has a profile photo that looks like ingy++ in sunshades and a hoodie. :) how'd that happen? 11:45
moritz well, it's not quite the same, from the POV of constructing the automaton
11:48 zhutingting left
felher moritz: A question if you will, m'lord: why are the exceptions not a complete hierachy? i.e.: Why are there the Exceptions 'X::IO::Copy does X::OS' and 'X::IO::Renae does X::OS' but no 'X::IO' role? Just a matter of work/time? 11:49
felher has watched to much games of thrones.
11:53 GlitchMr joined
tadzik read the books, seriously :) 11:55
felher tadzik: yeah, i'm currently in the middle of 'A Storm of Swords' 11:57
tadzik good :)
11:59 bacek left
felher tadzik: have you read the complete 'A Song of Ice and Fire' serires so far? 12:02
s/serires/series/ 12:07
masak no-one has. it's not finished yet. 12:10
felher A thought 'so far' means something like 'everthing that is finished by now' :) 12:12
*I
moritz felher: matter of time. X:IO would be desirable
felher moritz: ok. I wanted to add a few typex Exceptions for the IO-Stuff because i need them in a little program. So you don't mind if i add a 'role X::IO { }'? 12:13
masak felher: oh, missed the 'so far' part :)
moritz felher: +1 to X::IO. If all X::IO errors also do X::OS, you can even say my role X::IO does X::OS 12:14
and then don't list the X::OS explicitly anymore
felher moritz: yeah, good point :)
masak: :) 12:15
Hm, while compiling rakudo, NetHack is a good game to play. It doesn't use that much CPU... :) 12:19
12:19 bacek joined
masak r: say 'x' x 10 ~~ /^ x+ <?{ $/.to == 3 }> / 12:20
p6eval rakudo 142147: OUTPUT«#<failed match>␤»
12:21 Chillance joined
jnthn r: say 'x' x 10 ~~ /^ x+ <?{ say $/.to; $/.to == 3 }> / 12:21
p6eval rakudo 142147: OUTPUT«10␤10␤10␤10␤10␤10␤10␤10␤10␤10␤#<failed match>␤»
jnthn ...
masak ... 12:22
moritz fwiw I now know why we get some "control may reach end of non-void function" warnings 12:23
because we have branches that end in Parrot_ex_throw_from_c_args
masak r: say 'x' x 10 ~~ /^ x+ <?{ $/.pos == 3 }> / 12:24
p6eval rakudo 142147: OUTPUT«Error while creating error string␤»
arnsholt jnthn: Is accessor_call(interp, attr, "type") the correct way to get at the type object of an attribute? 12:25
masak this bug is haunted and hates me.
arnsholt (Modulo "type" being STRING and not C string literal)
jnthn arnsholt: Looks right
masak r: say 'x' x 10 ~~ /^ x+? <?{ (state $x)++ == 3 }> / 12:26
p6eval rakudo 142147: OUTPUT«=> <xxxx>␤␤»
arnsholt Excellent
masak heh, off-by-one :)
r: say 'x' x 10 ~~ /^ x+? <?{ ++(state $x) == 3 }> /
p6eval rakudo 142147: OUTPUT«=> <xxx>␤␤»
masak r: say 'x' x 10 ~~ /^ x+? <?{ ++(state $) == 3 }> /
p6eval rakudo 142147: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
masak known one.
colomon n: say 1.print 12:29
p6eval niecza v16-19-gd71c0cd: OUTPUT«True␤1»
colomon n: for 1..6 { .print }
p6eval niecza v16-19-gd71c0cd: OUTPUT«123456»
colomon n: for 1..6 { .print; }
p6eval niecza v16-19-gd71c0cd: OUTPUT«123456»
felher moritz: I'm looking at IO.pm right now. There are two functions with typed exceptions, rename and copy, and they throw a exception if something went wrong. mkdir just uses 'fail'. What should i do when adding a X::IO::Mkdir Exception?
tadzik felher: I'm in 1/3 of Feast for Crows 12:30
once I read them all I could finally talk to people about the series without being vulnerable to accidental spoilers :)
felher tadzik: yeah :) 12:31
moritz felher: I think we should be consistent. Make them all die for now
felher moritz: okay :)
moritz if you want them to fail with a type exception, fail X::IO::Mkdir.new(...) works too
*typed 12:32
masak n: say 1.print 12:34
p6eval niecza v16-19-gd71c0cd: OUTPUT«True␤1»
masak that looks wrong to me.
tadzik n: say 0.print 12:35
p6eval niecza v16-19-gd71c0cd: OUTPUT«True␤0»
tadzik r: say 0.print
p6eval rakudo 142147: OUTPUT«0True␤»
masak I'm with Rakudo here. 12:36
tadzik deed.in
spider-mario r: say 42.comb.chars
p6eval rakudo 142147: OUTPUT«3␤»
spider-mario ??
12:36 birdwindupbird joined
spider-mario I don’t get that 12:36
moritz spider-mario: .comb returns a list
spider-mario oh, indeed
thanks
moritz spider-mario: but .chars wants to work on a string, so it stringifies, joinging by a space
tadzik r: say 42.comb.Str
p6eval rakudo 142147: OUTPUT«4 2␤»
spider-mario yes, sorry
:D
r: say 42.chars 12:37
p6eval rakudo 142147: OUTPUT«2␤»
arnsholt jnthn: $cstruct.carray.WHAT shouldn't be Mu, should it?
(For an uninitialised carray member) 12:38
jnthn No, that sounds wrong.
Can I see the code?
arnsholt Sure. Want me to push the branch, or just gist it? 12:39
jnthn gist is fine
nom: class A { }; class B { has A $.x }; say B.new.x.WHAT 12:40
p6eval rakudo 142147: OUTPUT«A()␤»
jnthn nom: class A is repr('CArray') { }; class B { has A $.x }; say B.new.x.WHAT
p6eval rakudo 142147: OUTPUT«A()␤»
jnthn nom: class A is repr('CArray') { }; class B is CStruct { has A $.x }; say B.new.x.WHAT
p6eval rakudo 142147: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Attribute:D $attr, Any :rw(:$rw)!)␤:(Attribute:D $attr, Any :readonly(:$readonly)!)␤:(Attribute:D $attr, Any :box_target(:$box_target)!)␤:(Routine:D $r, Any :rw(:$rw)!)␤:(Routine:D $r, Any…
jnthn er
nom: class A is repr('CArray') { }; class B is repr('CStruct') { has A $.x }; say B.new.x.WHAT
p6eval rakudo 142147: OUTPUT«CStruct representation only implements native int and float members so far␤ in method bless at src/gen/CORE.setting:567␤ in method new at src/gen/CORE.setting:554␤ in block <anon> at /tmp/1gHIT7qmUW:1␤␤»
jnthn ...ah, which is what you're working on. :) 12:41
arnsholt Yah
jnthn nom: class A is repr('CArray') { }; say A.REPR 12:42
p6eval rakudo 142147: OUTPUT«CArray␤»
arnsholt jnthn: gist.github.com/2392558
I couldn't find a "upload file for gist" dongle so I just pasted in the relevant chunks of code
12:43 PacoAir joined
jnthn Did you modify try_get_slot? 12:43
arnsholt Yeah. Just added a last parameter to allow the caller to get the attribute PMC as well as the slot number 12:44
jnthn oh I see, you're storing...yeah.
arnsholt Instead of walking the attribute map again to find the type object
jnthn I was thinking more just to store that list of type objects 12:45
When doing the initial setup work
accessor_call ain't cheap
I mean, in compute_allocation_strategy 12:46
Just as it stores repr_data->flattened_stables, we'd also store a repr_data->types or some such 12:47
Then just index into it with the slot number
dalek kudo/nom: 99e7750 | moritz++ | src/ (3 files):
try to silence some compiler warnings (RT #112310, #112308)
12:48
arnsholt Right. That makes sense 12:49
masak nom: say 42.REPR
p6eval rakudo 142147: OUTPUT«P6opaque␤»
masak nom: say {}.REPR
p6eval rakudo 142147: OUTPUT«P6opaque␤»
masak nom: sub foo {}; say foo.REPR 12:50
p6eval rakudo 142147: OUTPUT«P6opaque␤»
jnthn masak: Vast majority of things are P6opaque :)
masak Perl 6 OO is so opaque!
moritz nom: say 42.REPR.REPR
p6eval rakudo 142147: OUTPUT«P6opaque␤»
jnthn 42.REPR - it has to box the 42 to have something to call .REPR on :)
nom: say int.REPR
p6eval rakudo 142147: OUTPUT«P6int␤»
masak nom: say P6opaque.^methods 12:51
p6eval rakudo 142147: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&P6opaque' called (line 1)␤»
jnthn Variety! :)
masak: REPRs ain't objects.
masak we're not in object Kansas anymore.
b: say 'x' x 10 ~~ / ^ x ** {3} / 12:53
p6eval b 922500: OUTPUT«xxxxxxxxxx␤»
masak alpha: say 'x' x 10 ~~ / ^ x ** {3} /
oh, alpha is no more on p6eval?
niecza: say 'x' x 10 ~~ / ^ x ** {3} / 12:54
p6eval niecza v16-19-gd71c0cd: OUTPUT«#<match from(0) to(3) text(xxx) pos([].list) named({}.hash)>␤»
masak pugs: say 'x' x 10 ~~ / ^ x ** {3} /
p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120203/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't locate P…
12:57 oiig joined 12:59 oiig_ left 13:01 cxreg2 joined 13:02 plobsing_ joined, ashleydev joined, erkan left, huf_ joined 13:03 benabik left, erkan joined, erkan left, erkan joined
masak maybe the embarrassing lack of x ** {3} in Rakudo should go up on the feature matrix...? 13:04
nom: my $l = 3; say 'x' x 10 ~~ eval "/ ^ x ** $l /" 13:05
p6eval rakudo 142147: OUTPUT«=> <xxx>␤␤»
masak \o/
13:08 plobsing left, cxreg left, huf left, ashleyde1 left, Khisanth left 13:09 Khisanth joined 13:10 FACEFOX left 13:11 Khisanth left 13:12 mdupont left 13:14 FACEFOX joined, mdupont_ left
arnsholt jnthn: CArray+{IntTypedCArray}() # \o/ 13:16
13:16 Khisanth joined
masak yay! gist.github.com/2391923 now works! 13:17
it runs in 40 s on my machine, and prints the right result.
I might blog about that later today.
I also invite anyone to try their hand at producing a more p6-idiomatic version. 13:18
that should be easier now that there's a working version to start from.
I think Perl 6 struggles a little syntactically and semantically here, because the Perl 5 version relied so much on mutability of strings.
I'd also be interested to know why Niecza spews out millions of undefinedness warnings on this code. 13:20
jnthn masak: Runs in 40s in Niecza or Rakudo? 13:21
masak Rakudo.
jnthn figures he'll profile it just out of curiosity. 13:22
masak pro tip: if you don't want things to run forever: don't eval a regex in a hot-path inner loop.
spider-mario what tools do we have for profiling, currently? 13:23
do we directly profile perl 6 implementations?
moritz perl6 --profile script.pl 2>somelogfile 13:24
jnthn spider-mario: I can profile at two levels, C level (which is profiling the VM too), and then there's a profiler built in to Parrot.
That's the one moritz++ just mentioned
moritz and then kcachegrind somelogfile
spider-mario oh, thanks
13:26 mdupont_ joined 13:27 mdupont joined
dalek p/cstruct-work: 7ff1038 | (Arne Skjærholt)++ | src/6model/reprs/CStruct.c:
General cleanup.
13:38
p/cstruct-work: f6a394e | (Arne Skjærholt)++ | src/6model/reprs/CStruct. (2 files):
Implement getting reference type members in CStruct.
13:38 noam left
13:38 noam joined 13:44 noam left, noam joined
arnsholt jnthn: bind_attribute_boxed should be able to handle being set to an undef, no? 13:48
13:49 mucker joined
jnthn arnsholt: I guess you mean type object? 13:49
And yes, it should marshall it to NULL
arnsholt Yeah, that's what I meant 13:51
jnthn There's a macro, IS_CONCRETE(obj), if you didn't already find it.
masak is there any significant difference between "marshall" and "serialize"? 13:52
jnthn Yes.
arnsholt Oh, right! I think I've seen it somewhere, but had forgotten about it
masak in general, I mean. not in blizkost.
13:52 REPLeffect left
jnthn Well, I use them in different contexts. 13:52
13:52 REPLeffect joined 13:53 spider-mario left
jnthn Marshall I use for "map this thing to this other thing now"; there may not be a directly connected inverse, or it may never be interesting to do it on that particular bit of data 13:53
13:53 spider-mario joined
jnthn Serialize I use for "turn this into something we can save away, and then bring it back later" 13:53
masak ah, so marshalling is more unidirectional. 13:55
jnthn Well, and there's kind of a temporal difference too 13:56
13:58 benabik joined
dalek kudo/nom: f524138 | jnthn++ | src/core/Str.pm:
A few little optimizations to some Str builtins. Found by looking at profile of code from masak++; seems to shave a few percent off it.
14:00
masak rebuilds and runs again
jnthn My measurement had about zero scientific rigor. :)
masak fwiw, Niecza comes up with the right answer in the end. 14:01
moritz but the large number of warnings makes it slow? 14:02
masak it's just being very cranky about millions of underfined things. I didn't measure how long it took.
more than 40 s.
jnthn masak: about 17% of your code's runtime is spent in match, and 13% in subst, fwiw.
moritz and subst calls amtch 14:03
jnthn ah, yeah
It spends quite a bit of its time in Match. 14:04
arnsholt Bah. Thinking about pointers always makes my brain go all wibbly
jnthn er
.match
return self unless @matches; 14:05
masak jnthn: 38.7 s :)
jnthn ...how on earth does that line (from subst) take up 7% of program runtime?!
masak: Didn't expect a big improvement, but nice it was measurable for you too.
14:05 tonyni joined
moritz jnthn: that doesn't look right 14:05
tadzik jnthn: could optimizer just turn things like $x.^isa into nqp::istype? 14:06
moritz unless return() is *very* expensive
jnthn moritz: I wonder if it's laziness, mind... 14:07
masak jnthn: but arrays are mostly eager.
14:07 JimmyZ_ joined
moritz jnthn: is that an inclusive time? or exclusive? 14:07
ie is the implicit call @matches.Bool included in there? 14:08
masak anyway, to check whether an array is non-empty, you'd only need to reify the first element :)
moritz yes, but that would involve a regex match in that case
which is costly
masak oh.
makes a little more sense then.
jnthn moritz: inclusive
moritz because @matches = self.match($matcher, @%options) is the line above it
jnthn yeah
oh, it boils down to match-list 14:09
Which uses gather take
14:09 JimmyZ left, JimmyZ_ is now known as JimmyZ
jnthn And thus it's considered infinite I guess. 14:09
moritz possibly infinite, yes
jnthn Yeah. 14:10
tadzik: It's not quite equivalent.
Generating better code for .^ OTOH...
Anyway, yeah, the .Bool method spends its time in .gimme 14:11
moritz isn't .^ two method calls right now? 14:12
jnthn Yeah
moritz I think I have another tiny optimization for .match 14:13
but I want to spectest first :-)
while $m := $m.CURSOR.'!cursor_next'().MATCH {
# next line written this way for reasons of circularity sawing
Cursor.HOW.find_private_method(Cursor, 'set_last_match')(Cursor, $m) if $m;
that final 'if $m;' looks very redundant to me 14:14
jnthn yeah, looks so 14:15
moritz nevermind the spectest run :-)
dalek kudo/nom: de1eaf5 | moritz++ | src/core/Str.pm:
remove redundant conditional in Str.match-list
jnthn Seems from the profile my phasers patches slowed down iteration a little too
moritz I'll do it afterwards
masak *gasp*!
14:17 tokuhirom joined
tadzik so hardcore :) 14:17
masak more like rockstar/cowboy.
jnthn Commiters gone wild! 14:18
arnsholt moritz: It's git. You can always rewrite history later ;)
masak next, moritz will let slip a derogatory comment that makes some minority group feel uncomfortable! :P
and then apologise with "I'm sorry you felt offended."
arnsholt jnthn: A C sanity check if you don't mind. (void *) (((char *) body->cstruct) + repr_data->struct_offsets[slot]) = NULL; should do the correct thing, no? 14:19
(That being setting the pointer member to NULL)
jnthn C...and...sanity?!
arnsholt Well, there is always that =)
jnthn What's that (void *) doing out the front? 14:20
benabik At first glance, I don't think- yeah, what jnthn said
jnthn Is there something before that?
arnsholt Nope (or, nothing relevant, that is)
jnthn arnsholt: set_ptr_at_offset 14:22
arnsholt: Use that as it does the right thing :)
benabik I think all those parens are unneeded.
jnthn See P6opaque.c for an example of it being used.
14:22 tokuhirom left
masak jnthn: pivo...i...cheesecake?! 14:22
tadzik nom nom nom
arnsholt jnthn: Oh, right. Existing code that does what I want =D
masak tadzik: no matter how you try, you'll get them one after the other :P 14:23
tadzik I don't think I understand :)
benabik I'm not sure set_ptr_at_offset does the right thing...
Hm. 14:24
jnthn benabik: That'd be unfortunate given pretty much all of NQP and Rakudo's attribute storage goes through that code path ;)
benabik jnthn: Really? ack doesn't find me any usages of it.
Ah. It casts to a (void**) Strange.
jnthn benabik: oh... 14:25
It's a copy-paste-twiddle of get_pmc_at_offset
er, set_pmc_at_offset
From P6opaque.c
masak: She was just looking out for our best interests. :)
masak tadzik: waitress at wonderful "Pivorama" in basement of Hotel Moscow in Petersburg (!).
tadzik ooh :) 14:26
I recall your story now
masak tadzik: she balked at our order, and then served one after the other :P
jnthn Very mothering of her, though I think she was actually our age. :)
arnsholt Well, the important question is what kind of beer you ordered with the cheesecake =) 14:27
jnthn arnsholt: I'm not sure. The place brewed several of its own varieties. All of them were good.
jnthn remembers the unfiltered one being especially so. 14:28
arnsholt Sounds good!
14:29 xinming_ left, xinming joined
masak they were all good. I remember trying them many times over and not being able to find a favorite. :) 14:29
jnthn Thing was, you could just go to your hotel room afterwards, and I had to take a walk down Nevsky...which was always eventful in some way :) 14:31
masak yeah, we got different hotels there because Visa emergency. 14:32
jnthn
.oO( Next time, we'll use MasterCard )
14:35
dalek kudo/nom: d6cd1e2 | jnthn++ | src/core/MapIter.pm:
When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.
jnthn s/of/off/ 14:36
d'oh
spider-mario I guess it works too 14:37
masak jnthn++ # I assume
jnthn masak: Yeah, it shows an improvement here. 14:38
About the same size as the last one.
masak :) 14:42
I guess it's a good program to profile, because it's very string-intensive.
14:47 tonyni_ joined
arnsholt jnthn: I can treat the PMC coming into attribute_bind as a 6model object, right? 14:49
14:50 benabik left, tonyni left 14:52 BlueT_ joined 14:53 alvis left
masak jnthn: 37.6 s :) 15:00
moritz jnthn: there's a new-ish failure in t/spec/S11-modules/require.t 15:02
arnsholt star: use NativeCall; class Test { }; my Test $x .= new();
p6eval star 2012.02: ( no output )
arnsholt Right. My fault then =)
Er, durr.
star: use NativeCall; class Test is repr('CStruct') { }; my Test $x .= new(); 15:03
p6eval star 2012.02: OUTPUT«Zero-byte allocation not allowed in mem_sys_allocateParrot VM: PANIC: Out of mem!␤C file src/gc/alloc_memory.c, line 70␤Parrot file (not available), line (not available)␤␤We highly suggest you notify the Parrot team if you have not been working on␤Parrot. Use parro…
arnsholt Not my fault after all =D
moritz a zero-class allocation leads to out of memory?
s/class/size/
that's somewhat comical
masak I'm telling you. 0 and infinity are structurally quite similar :P 15:04
moritz many physicts even say "finite" when they mean "non-zero" 15:05
15:06 tonyni_ left
colomon "We highly suggest you notify the Parrot team if you have not been working on Parrot" 15:18
"Dear Parrot team: I was programming in common lisp, and I just got this weird error message...."
15:19 xinming left
masak colomon: reminds me of paragraph *-1 of blog.plover.com/prog/perl/undefined.html 15:19
er, *-2
colomon I can see the connection. 15:20
15:21 nwc10 joined
jnthn arnsholt: Yes, you should be able to do rely on that 15:38
bah 15:39
body->cstruct = mem_sys_allocate(repr_data->struct_size);
Guess an empty struct gets size 0...
dalek p: 3a23406 | jnthn++ | src/6model/reprs/CStruct.c:
Don't try to allocate 0 bytes in CStruct REPR.
15:43
jnthn arnsholt++ # spotting my thinkos 15:44
nwc10 is mem_sys_allocate() just a "renaming things" macro, or an actual wrapper function? 15:47
15:50 JimmyZ left
jnthn nwc10: I'd have to go look to figure out the latest reality. 15:50
nwc10 :-)
jnthn nwc10: I *hope* macro but... :)
nwc10 it was just that if it's a wrapper, it probably ought to have a (at least optionally conditionally compiled variant) which warns or barfs on silly things like trying to allocate 0) 15:51
15:51 Patterner left
jnthn Well, it did just barf on allocating 0. :) 15:51
Unless you mean "barf at compile time", but that wouldn't help here, since we're computing the amount to allocate. 15:52
nwc10 bail out at runtime, rather than letting a value back to its caller
15:53 Psyche^ joined, Psyche^ is now known as Patterner
jnthn nwc10: Yes, that's what this did. 15:53
nwc10 ah righto. that's cool.
I'll shut up then :-)
15:57 Vespakoen joined 15:59 jferrero joined
moritz jnthn: I'm having a deja-vu. I swear I've seen such a commit in nqp before :-) 16:03
though a quick search in the commit log doesn't find anything 16:04
oh
commit 32b9b815f8be3e91d02d0f2ccc90495c0fc47d8b
Author: Jonathan Worthington [email@hidden.address]
Date: Tue Mar 15 22:37:16 2011 +0100
Avoid allocating zero bytes; parrot++ catches this now.
that was in P6opaque 16:05
16:06 spider-mario left, plobsing_ left, spider-mario joined
jnthn moritz: I'm a slow learner. 16:10
16:12 plobsing joined 16:15 spaceships joined 16:16 havenn joined 16:21 snearch joined, constantined joined
fsergot Where is &get defined? :) 16:26
IO.pm?
I mean rakudo/src/core/IO.pm 16:27
16:30 wolfman2000 left
felher fsergot: yes 16:32
16:33 alvis joined
felher fsergot: a part of it at least. It uses $!PIO which i guess is something like a Parrot-IO-Object. :) 16:33
moritz yes, it's mosty just a wrapper for parrot's IO.readline 16:39
*mostly 16:40
arnsholt star: use NativeCall; sub foo(CArray[int32] $arg) { say 'alive'; }; my CArray[int32] $x .= new; foo($x);
p6eval star 2012.02: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (CArray+{IntTypedCArray}) (line 1)␤ Expected: :(CArray+{IntTypedCArray} $arg)␤»
moritz arnsholt: 'is native'
arnsholt Not what I'm actually getting at here. Why does the type CArray+{IntTypedCArray} not match CArray+{IntTypedCArray}? 16:41
(This came up while I was working on CStruct stuff, where you might actually want to pass this kind of stuff to a Perl 6 bit of code) 16:42
moritz r: role a[$x] { }; say A[Int]
p6eval rakudo d6cd1e: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&A' called (line 1)␤»
moritz r: role a[$x] { }; say a[Int]
p6eval rakudo d6cd1e: OUTPUT«a()␤»
moritz arnsholt: to me, CArray+{IntTypedCArray} looks like a mixin, not a parametric role 16:43
arnsholt: and if you create two mixins, they might not conform to each other, or so
arnsholt Yeah, that sounds plausible
16:44 kborer joined 16:48 birdwindupbird left
jnthn Ah, I think we have an RT on an issue like that. 16:50
moritz r: role a { }; say Int but a ~~ Int but a
p6eval rakudo d6cd1e: OUTPUT«False␤»
moritz r: role a { }; say (Int but a) ~~ (Int but a) # just to be on the safe side
p6eval rakudo d6cd1e: OUTPUT«False␤»
jnthn Yeah, that looks ungood.
16:51 snearch left
arnsholt Rakudo-bug, not arnsholt-bug. Right =) 16:54
16:55 fsergot left 16:57 havenn left
arnsholt jnthn: What'd be the correct way to set a CArray member, BTW? 16:57
For native ints a method that assigns to $!member works, but with a CArray type, I get "cannot assign to a non-container" which I'm not quite sure how to kill 16:58
[Coke] moritz: iwbni "next day" appear when the only next was today. (irc logs) 16:59
moritz [Coke]: I know
[Coke]: do you know the saying that only three things are hard in programming?
well, two actually
naming, cache invalidation and off-by-one errors
anyway, i's a cache invalidation problem 17:00
arnsholt *giggle*
jnthn arnsholt: Hm, good question...
arnsholt: Without a container it'll only be possible to find to it.
arnsholt: ah, moment...
arnsholt I've got some code that should in theory be able to handle setting of a reference member in CStruct, but no idea if it works 17:01
jnthn s/find/bind/ 17:02
arnsholt Right, right
arnsholt tries something
jnthn arnsholt: Yeah. The thing is that the normally we have object body -> container -> value 17:03
arnsholt: The container is what makes assignment work
At the moment you have it as body -> value
arnsholt Right. In theory I knew that
jnthn ;)
17:03 constantined left
arnsholt Whee! Segfault! 17:03
jnthn arnsholt: Anyway, it just means either (a) bind to the attribute for now to test things, or (b) make the container stuff work 17:04
arnsholt Yeah. I tried binding a bit ago, but then it complained about the type stuff
jnthn It doesn't matter that the container is there, so long as it contains a CStruct. Will just have to take care to dereference it.
arnsholt But making it just has CArray $.memb fixes that
jnthn See P6opaque.c
It turns out that the attribute meta-object already contains a container "sample" 17:05
Known as the "auto_viv container" or some such.
You'll be able to get at the same thing.
As I said though, feel free to ignore that and just go binding first. 17:06
You can always bind by using nqp::bindattr too, just for testing purposes.
arnsholt Yeah, I'll do that first. But the container thingy would be wrapping the CStruct body, right?
(Doing binding nets me a segfault, so I'm pretty sure I'm doing something wrong) 17:07
jnthn Yeah
The actual bit of memory that we're maintaining as the struct body contains the pointer off into the struct, mind
It's the child_objs that will point to the container, which in turn points to the cstruct.
It's just another level of indirection. 17:08
arnsholt I think I see
jnthn (Which is why it solves the problem. ;-))
arnsholt ^_^
Right. I try to deref a NULL pointer in bind_boxed. That should be fixable 17:10
17:10 fsergot joined
spider-mario r: my &m := 42.^methods.pick; say &m.^methods; 17:13
p6eval rakudo d6cd1e: OUTPUT«Method 'gist' not found for invocant of class 'Sub'␤ in method gist at src/gen/CORE.setting:4291␤ in sub say at src/gen/CORE.setting:6465␤ in block <anon> at /tmp/Jl8HmKzMgN:1␤␤»
spider-mario n: my &m := 42.^methods.pick; say &m.^methods; 17:14
p6eval niecza v16-19-gd71c0cd: OUTPUT«Unhandled exception: Unable to resolve method methods in class ClassHOW␤ at /tmp/WyMBAyARVx line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3839 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3840 (module-CORE @ 65) ␤ at…
spider-mario p: my &m := 42.^methods.pick; say &m.^methods;
p6eval pugs: OUTPUT«*** pick not defined: VV [LIST,ITEM,bless]␤ at /tmp/g16sPBBsTJ line 1, column 1-26␤»
spider-mario p: my &m := 42.^methods[5]; say &m.^methods;
p6eval pugs: OUTPUT«*** No such method in class Class: "&methods"␤ at /tmp/pIsHXBYluT line 1, column 30-41␤»
17:17 havenn joined
arnsholt rebuilds NQP with debug flags 17:19
17:24 havenn left 17:25 xinming joined 17:31 lestrrat left
masak check out gist.github.com/2391923#file_idiom...version.p6 -- slightly shorter, slightly fewer assignments, slightly more idiomatic. untested. comments welcome. original version above. 17:31
jlaire the perlmonks link is 404 at perl6.org/getting-started/ 17:32
17:32 lestrrat joined
jlaire typo: "a base to to produce" at perl6.org/compilers/std-viv 17:34
17:35 benabik joined
jlaire S01:51 talks about "the Perl 6 compiler" 17:40
dalek href="https://perl6.org:">perl6.org: 1a7901c | moritz++ | source/compilers/std-viv.html:
fix double word, jlaire++
17:41
[Coke] GAH. 17:43
[Coke] discards his local change that moritz just beat him to.
spider-mario p6: my &m := 42.^methods[5]; say &m.^methods 17:44
p6eval rakudo d6cd1e: OUTPUT«Method 'gist' not found for invocant of class 'Sub'␤ in method gist at src/gen/CORE.setting:4291␤ in sub say at src/gen/CORE.setting:6465␤ in block <anon> at /tmp/nUqEXvIYpG:1␤␤»
..pugs: OUTPUT«*** No such method in class Class: "&methods"␤ at /tmp/UZz4rUS7oO line 1, column 30 - line 2, column 1␤»
..niecza v16-19-gd71c0cd: OUTPUT«Unhandled exception: Unable to resolve method methods in class ClassHOW␤ at /tmp/uNZM3S7DkD line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3839 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3840 (module-CORE @ 65) ␤ at…
spider-mario is that normal?
(in a rakudo REPL, it even ends the session with four “use of uninitialized value of type Mu in string context in method Str at src/gen/CORE.setting:667”) 17:47
jnthn spider-mario: No, it's a known issue
spider-mario ok
jnthn To do with .^methods on code objects.
[Coke] spider-mario: if you're asking for rakudo, don't use "p6:" in the evalbot.
spider-mario I know
I did want to see the output of other implementations 17:48
17:53 Trashlord left
spider-mario > quasi {}.() 17:53
Method 'postcircumfix:<( )>' not found for invocant of class 'AST'
> (^D to end the session)
zsh: segmentation fault (core dumped) perl6
the first time, instead of a segfault, I got:
too few arguments: 0 passed, 30581312 expected
dalek ast: c586129 | jnthn++ | S02-names/pseudo.t:
Fudge pseudo-package tests for Rakudo. Quite a lot fudged at the moment, though the coverage for the things that do work already is good to have.
17:54
spider-mario now, Null PMC access in clone()
dalek kudo/nom: 9df76e9 | jnthn++ | src/ (3 files):
Implement various cases of binding into pseudo-packages.
17:55
kudo/nom: 442db9f | jnthn++ | t/spectest.data:
Turn on S02-names/pseudo.t.
jnthn spider-mario: It's different every time?
spider-mario no
most of the time, it segfaults,
jnthn spider-mario: Sounds highly likely that it's memory corruption.
spider-mario and I can make it vary
by issuing other commands
but I have yet to determine what command causes what 17:56
jnthn spider-mario: Pattern is <something that causes an exception>, ^D, segfault or other oddness? 17:57
spider-mario it’s what you’ve just described 17:58
should I paste everything I’ve done?
jnthn Feel free to drop it in a gist or something, yeah. It may be that one or more of them under the debugger reveals what's going on. 17:59
jlaire another spec typo: gist.github.com/2394158 18:02
spider-mario gist.github.com/2394162 18:03
dalek ecs: f6fb93a | (Johannes Laire)++ | S02-bits.pod:
typo fix
18:05
benabik jlaire: There you go.
jnthn spider-mario: Thanks 18:06
jnthn afk for a bit
jlaire benabik: thanks
18:16 IKARi_ joined 18:19 brrt joined
sorear good * #perl6 18:24
dalek ast: f954d29 | coke++ | S0 (3 files):
pugs fudge recent tests
18:27
18:34 literal left
sorear wants to find the place where TimToady mandated that source for functions be available at runtime 18:35
moritz hm, I'm not aware of any official statement like that 18:36
I just know that the general consensus seems to be the source should be definitive and everything binary should only be a cache, usually 18:37
18:37 literal joined 18:39 Trashlord joined
sorear moritz: I have a feeling that I can reject github.com/sorear/niecza/issues/115 , but I want to find evidence 18:39
[Coke] I suspect that's an implementation detail. 18:40
moritz sorear: it's just a question yes. You can say "yes" or "no" or close with "issues aren't meant as a general forum for questions"
18:43 fsergot left 18:44 fsergot joined
jaffa4 I do not know what is in the implementation 18:50
At least, there should be an option to turn off source inclusion
18:51 whiteknight left, mucker left
masak thank you kindly for your feedback. 18:51
are you afraid someone might read the source and exploit that knowledge somehow? 18:52
jaffa4 yes
That is not only me, I think there are going to many users who think in the way, even if not well-founded opinition 18:53
au ponders encouraging jaffa4 working on a perl6 uglifier (aka obfuscator)
jaffa4 I estimate it would take 20 lines to add an option that turns off source inclusion 18:55
While writing an obfuscator, much more effort.
masak jaffa4: please submit pull requests to the sorear/niecza repository on github. 18:56
[Coke] jaffa4: 20 lines sounds like something you could write a patch for.
sorear disabling source inclusion would not be impossible
[Coke] wonders where "/usr/share/dict/words" or equiv is on feather. hurm.
moritz somebody else got the idea to install something, it seems :-) 18:59
Juerd cokInstalled.
argh
[Coke]: Installed.
jaffa4 pull reguest? What is the purpose of a pull request?
moritz it's just a glorified patch
Juerd jaffa4: It's the git equivalent of sending a patch of an entire repository.
Or maybe even github specific.
masak jaffa4: it's to notify the author that you've made commits in a fork that you'd like him to pull into his repository. 19:00
jaffa4 I am not there yet 19:01
masak right. just letting you know that's an option when you are. 19:02
jaffa4 SO first I fork it, then I check them out, then I commit that and then there is pull request I guess. 19:03
masak yes \o/ 19:05
I was wrong before: niecza runs my script in 31 s (against Rakudo's 37 s), even with all the thousands of undef warnings. 19:06
19:06 lichtkind joined
masak my idiomatic version takes 158 s on Rakudo, and arrives at the wrong result :P 19:10
19:10 tokuhirom joined
sorear masak: Is that Rakudo's fault or your fault? 19:11
moritz "yes" :-)
19:11 havenn joined
masak it's my fault. I replaced static control flow with an array of callables. 19:11
code got shorter, but the abstraction costs runtime. 19:12
it's still better than three weeks, of course :)
and the same could probably be written in Perl 5 and take less than a second.
sorear masak: I mean why did it get the wrong result? 19:13
masak oh, I bet that's my fault. haven't gone looking for it yet. 19:14
19:15 havenn left, thou joined 19:22 brrt left
dalek ecza: a0c3f43 | sorear++ | src/ (3 files):
Add an option for disabling inclusion of source in compiled code

An open question is whether this should also disable line number information.
19:25
masak sorear++ 19:30
19:39 eoh joined 19:40 spider-mario left
jaffa4 WHat is source based introspection? 19:41
19:41 spider-mario joined
jaffa4 WHere can I read about that? 19:41
sorear++ 19:42
19:43 oiig left
dalek ecza: 1b64073 | sorear++ | lib/Builtins.cs:
Disable buffering on stdout. (fixes #114)
19:46
[Coke] +# 04/15/2012 - rakudo++ ; niecza (94.97%); pugs (41.75%) 19:49
masak 41.75%! 19:52
[Coke]++ moritz++
colomon sorear++
moritz was hardly involved
sorear colomon: what did I do for pugs? 19:53
colomon nothing, but you fixed #114
masak gist.github.com/2391923#file_idiom...version.p6 works now. I found the few remaining thinkos. it runs in 52 s.
sorear the only thing I think I ever did *for* pugs was setting up the #perl6 lambdabot :p
19:53 ZapZ joined
colomon errr, wait, you've generously allowed your focus to shift to homework, giving rakudo and pugs a chance to look better? ;) 19:54
19:54 ZaphrodZenovka joined
colomon s/homework/schoolwork/ 19:54
[Coke] masak: you still planning on hacking on pugs soon? ;) 20:05
lichtkind uvtc++
phenny lichtkind: 03:16Z <raiph> tell lichtkind couple quick gollum experiments at github.com/raiph/tablets/wiki/Jump...at-we-want ... I'll probably have time later today (Sunday) to try more
20:06 lichtkind left 20:07 lichtkind joined
masak [Coke]: I've had a busy time with work, but yes. 20:07
[Coke]: it'll have to contend with being slightly less important than working on macros and finishing the judging of p6cc2011, though. 20:08
lichtkind phenny: tell raiph thanks a lot uvtc is also currently helping me to decide but nothing final yet
phenny lichtkind: I'll pass that on when raiph is around.
20:11 Araq joined
lichtkind masak: hej hej 20:11
masak o/ 20:12
20:13 GlitchMr left
lichtkind masak: its getting interesting lately? 20:13
i mean !!!
masak you'll have to be more specific. 20:14
lichtkind masak: that i get real help for the first time since im doing this 20:15
masak oh, that's great.
yeah, in my experience that changes the motivational equation quite a bit.
[Coke] masak: I would recommend, btw, reducing the number of moving parts to p6cc2012, if there is one.
masak [Coke]: like, reducing the number of tasks? 20:16
[Coke] or at least reducing the complexity of the individual units.
masak which units are you referring to?
[Coke] more entrants. easier to grade.
masak: fine, tasks.
masak anyway, that's good feedback. 20:17
thanks.
it's a tricky balance. want the tasks to be challenging, but approachable :) 20:18
five tasks feels about right for a bunch of books.
and we want to reward *skill* in the end, so if we pick too simple tasks, there's not as much solution space to exhibit skill in. 20:19
[Coke] There was no way the amount of effort was worth it for me for the books. *shrug* 20:20
(compared to $dayjob) 20:21
moritz well, the idea is that the coding fun is the real rewards, the books are just a bit of additional incentive
[Coke] which sadly may say more about my coding than my $dayjob. ;)
masak [Coke]: the X prizes are the same. it's just a mere million or whatever. the prize is just a decoy, and it's implicitly understood that they are. 20:22
[Coke]: that said, the tasks are made such that people will look at them and think "oh, this is totally doable".
colomon yes, but that's just trying to lure us to be foolish! ;) 20:23
masak let's just say I love reading Perl 6 code. :)
colomon I actually woke up twice in the middle of the night back in January and came downstairs to work on your problems because I couldn't get them out of my head.
masak hahaha 20:24
fsergot Good night #perl6 o/
colomon luckily I eventually mustered the selfcontrol to ignore the problems.
masak fsergocie, 'branoc.
fsergot Dobrej nocy masaku! :) 20:25
20:25 fsergot left
masak .oO( he vocatived me! ) 20:25
Araq which tasks are you talking about? (hi everyone btw) 20:26
sorear hello Araq! 20:28
masak's annual coding contests 20:29
Araq link?
masak strangelyconsistent.org/p6cc2011/ strangelyconsistent.org/p6cc2010/
strangelyconsistent.org/blog/the-20...ng-contest strangelyconsistent.org/blog/the-pe...now-closed strangelyconsistent.org/blog/t1-exp...four-nines strangelyconsistent.org/blog/t2-sums-of-cubes strangelyconsistent.org/blog/t3-addition-chains strangelyconsistent.org/blog/counti...igurations 20:30
20:31 ZaphrodZenovka left 20:32 ZaphrodZenovka joined 20:33 ZaphrodZenovka left
[Coke] masak: I absolutely did not look at the tasks and think "this is totally doable. Especially in perl 6." ;) 20:33
masak hehe
20:33 ZapZ left, ZapZ joined
Araq what can people win? 20:34
masak this year, there is a first prize and a second prize.
Araq what's the first prize?
jaffa4 IS there a new contest<
IS there a new contest?
masak 1st prize: 100 EUR worth of books. 2nd prize: 100 USD worth of books.
jaffa4: not for a while. keep an eye out in December. 20:35
Araq what if france gets into trouble?
masak we'll cross that bridge when we have to.
Araq so flip prizes then? 20:37
masak we'll cross that bridge when we have to.
20:37 mdupont_ left, mdupont left
jnthn
.oO( Then we'll cross the bridge from here to the eurozone and buy stuff cheap! )
20:38
masak [Coke]: I'm actually a bit relieved to hear someone complain that the tasks were challenging. usually the only feedback I get is a bunch of solutions. ;)
20:40 PacoAir left
sorear thinks it is funny that the Europeans ey has spoken to are much less concerned about Europe's economy than the Americans ey knows 20:42
Araq don't worry, sorear; I'm worried about europe's economy 20:43
[Coke] just watched _Priest_ last night, and now imagines Father Chrysostomos as that guy.
Araq but even moreso about europe's democracy
[Coke] painfully attempts to translate ey into standard pronouns. 20:44
20:44 NamelessTee left
flussence ey := any(he|she, :lang<en>) 20:45
sorear [Coke]: 1994 or 2011?
20:45 NamelessTee joined 20:47 noam left, thou left 20:48 noam joined
Araq do you know the answer to strangelyconsistent.org/blog/counti...gurations, masak? 20:53
sorear Araq: I think you are USAian
Araq nö, bin ich nicht ;-) 20:54
20:54 nif joined
Araq ugh sorry, that doesn't seem to part of the competition 20:56
masak Araq: which answer? I think most of the answers are in there, at the end. 20:58
Araq yeah I noticed, sorry 20:59
masak Araq: but notice that Salvador Fandino quickly suggested a better way to count stuff, at: blogs.perl.org/users/salvador_fandi...erl-5.html
Araq so do you have solutions for all the problems? or do you simply recognize correct solutions? ;-)
[Coke] sorear: 2011 21:01
masak Araq: it's always a learning experience to judge these things. the posts about the solutions are meant to make us appear to have covered all the bases and to know all the answers. but of course that's not always so. 21:02
last year I made a gaffe when benchmarking the LCS solutions, and colomon++ called me on it.
colomon ;) 21:03
masak basically the deal is that we all write code, we all learn, and we all have fun.
if that means colomon must lose some sleep some nights, so be it.
Araq you should write correctness proofs for the solutions ;-) 21:04
masak *you* should write correctness proofs for the solutions... ;)
21:04 mdupont joined
Araq but solutions are supposed to be in perl6 ... 21:05
21:06 pernatiy left
masak in practice, having several people turn in solutions tends to make correctness rather easier to detect. 21:08
that said, the "Brauer number" thing in strangelyconsistent.org/blog/t3-addition-chains had us furrow our brows for a while. :)
moritz++ solved it by asking on a math forum.
21:09 pernatiy joined 21:11 nwc10 left 21:18 bruges_ left 21:20 bruges joined, y3llow_ joined 21:23 y3llow left 21:24 y3llow_ left, y3llow joined 21:26 y3llow left, y3llow joined
Araq what do you guys think of Google's Go? 21:28
felher moritz: icmp echo request
21:28 y3llow left 21:29 y3llow joined 21:31 tokuhirom left
masak Araq: it doesn't sit in the same niche as Perl 5/Perl 6 for me, but when I want runtime speed nowadays, I reach for Go rather than C. 21:31
Araq: some nice ideas in there. I especially like the type system.
Araq really? you actually use Go? o.O 21:32
masak yes, really.
spider-mario I hate its API for big integers.
I really hate it.
masak the most serious criticism I've heard about it is that the user doesn't have the same facilities for extending the language as the language devs had for building it. that's a quite deep criticism if true, but so far I haven't used it enough to suffer from it.
spider-mario and its command line argument parser doesn’t generate very “unixy” interfaces 21:34
I’m also bothered by its lack of genericity, somehow.
masak genericity? 21:35
do you mean generic types?
21:35 jaffa4 left
spider-mario yes 21:35
sorry
I don’t always use the right words, sorry for that
masak pas de problème. :) 21:36
spider-mario :D 21:39
masak devrait apprendre le français à nouveau un jour 21:42
21:47 jferrero left 21:59 nif left 22:00 Vespakoen left
felher night, folks 22:02
tadzik Araq: I like it very much
masak felher: 'nacht 22:03
22:03 aindilis joined
tadzik 'night 22:03
masak good ♞, #perl6
Araq good night 22:04
22:04 Araq left
dalek ecza: 5b6457f | sorear++ | README.pod:
Document that build-depended tools need to be in PATH to be found (fixes #116)
22:07
22:17 nif joined 22:23 localhost left 22:25 localhost joined 22:30 nif left 22:37 havenn joined, wolfman2000 joined 22:39 NamelessTee left 22:43 nif joined 22:50 plobsing left 22:52 havenn left 22:54 spider-mario left 23:00 FACEFOX left, kborer left 23:01 FACEFOX joined 23:05 Grrrr left 23:06 Grrrr joined 23:08 FACEFOX left 23:10 FACEFOX joined 23:26 Chillance left 23:27 raiph joined 23:28 raiph left 23:39 nif left 23:45 nif joined 23:53 Gruber joined 23:55 Grrrr left