»ö« 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.
bacek_at_work masak, if rakudo build will fail try nopaste.snit.ch/31882 patch. (Unless it was already committed by moritz_) 00:01
masak bacek_at_work: ok. 00:02
sorear hey masak, I need help refilling my TODO 00:16
masak sorear: :) 00:17
sorear: people seem to have been expecting decimal/rational literals quite a lot lately.
masak sorear: I must confess to having put aside very little time lately for niecza. I built it the other day, that's all. 00:18
masak sorear: on a general level, it would be very interesting to see Niecza connect to the spectests in roast, even a little bit. but I've understood that that basically requires &eval, which is hard. 00:26
jnthn sleep & 00:27
masak bacek_at_work: everything looks fine. 00:31
bacek_at_work: compilation worked, including the Test.pm module that didn't work before. say "OH HAI" works. the beginning of 'make spectest' looks fine. 00:32
all green from me.
masak goes to bed
'night, #perl6
Tene rakudo: say "A\n\nB\n".lines.perl 00:59
p6eval rakudo 6f9116: OUTPUT«("A", "", "B")␤»
dalek ecza: 7e0a0a2 | sorear++ | TODO:
Add a couple more TODO items
04:03
sorear Did we ever come to a consensus about removing explicit plans from spec tests? 05:46
sorear ugh. Spectests use .exists and .delete :/ 06:25
dalek ast: ef6789c | sorear++ | S02-lexical-conventions/unicode.t:
Fudge S02-lexical-conventions/unicode.t for niecza
07:16
ast: 5623d0c | sorear++ | S02-builtin_data_types/array.t:
Fudge S02/array for niecza
ast: 719c77d | sorear++ | S02-builtin_data_types/autovivification.t:
Fudge S02/autovivification for niecza
ast: 1b68345 | sorear++ | S02-builtin_data_types/bool.t:
Fudge S02/bool for niecza
dalek ecza: 811d5d9 | sorear++ | / (2 files):
Add a few more test functions, test files
07:34
ast: 450bf58 | sorear++ | S02-names_and_variables/contextual.t:
fudge S02/contextual for niecza
07:35
sorear -> sleep
moritz_ good morning 07:41
moritz_ masak++ # p4 reviews 07:52
diakopter moritz_: you're up..... early? 08:05
oh, nm
diakopter imagines what I might've missed at last week's #pashers 08:06
er. #phasers
mathw morning 08:07
diakopter \ 08:08
diakopter giggles at "altitude on mars" 08:11
woldrich rakudo: printf("%s is %s\n", (3 == 3) ? 3 : 4, 'nice'); 08:48
p6eval rakudo 6f9116: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
woldrich Why is that?
moritz_ std: printf("%s is %s\n", (3 == 3) ? 3 : 4, 'nice'); 08:53
p6eval std 625303c: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/x0pufR33Nv line 1:␤------> printf("%s is %s\n", (3 == 3) ?⏏ 3 : 4, 'nice');␤Parse failed␤FAILED 00:01 123m␤»
woldrich :|
moritz_ woldrich: std generally gives better syntax errors... read it, it tells you what you did wrong :-)
snarkyboojum because the ternary op is now ?? !!
woldrich moritz_, I see, can I get those nice messages on my box as well? I'm tired of ====SORRY!==== :< 08:54
moritz_ woldrich: github.com/perl6/std/ 08:55
the README tells you what you need
woldrich ah, nice, thank you 08:56
moritz_ and then ./viv yourfile.pl 08:58
there's also STD on CPAN
snarkyboojum you can also do ./tryfile yourfile.pl too after you installed std 08:59
moritz_ ah, that's in tools/ in the source
snarkyboojum yeah, nice colourful output :) 09:01
so, have winners been announced for masak's challenge? 09:06
oh, not all problems have been covered eh 09:07
woldrich hm... 09:08
codepad.org/UxYbnRRk :/
and my ternary still doesnt work in perl6 .. oh well :) 09:09
woldrich is there a perl6-compatible pastebin that's preferred somewhere? 09:09
moritz_ rakudo: say True ?? 3 !! 4;
p6eval rakudo 6f9116: OUTPUT«3␤»
moritz_ rakudo: say False ?? 3 !! 4;
p6eval rakudo 6f9116: OUTPUT«4␤»
snarkyboojum rakudo: printf("%s is %s\n", (3 == 3) ?? 3 !! 4, 'nice');
moritz_ woldrich: we often use gist.github.com, but it doesn't directly support perl 6
p6eval rakudo 6f9116: OUTPUT«3 is nice␤»
woldrich alright; codepad.org/0OUlkUjo 09:10
moritz_ woldrich: rakudo startup time is known to be much larger than p5's, and runtime is 2 to 3 orders of magnitudes slower
we're working on it.
woldrich: == compares numerically 09:11
woldrich but eq didnt work? :/
moritz_ and an array in numeric context just returns the number of elements
woldrich: in what way it did not work?
woldrich hmm, eq worked now. :p
moritz_ rakudo: say <a b> eqv <a c> 09:12
p6eval rakudo 6f9116: OUTPUT«Bool::False␤»
moritz_ rakudo: say <a b> eqv <a b>
p6eval rakudo 6f9116: OUTPUT«Bool::True␤»
moritz_ woldrich: I think you should use eqv. It does structural comparison
woldrich so, (join('', @list) eq scalar(reverse(join('', @list))) .. ?
oh...
yeah, there. 09:13
moritz_ if you join, ('ab', 'c') and ('a', 'bc') compare equal
do you want that?
if yes, write @list.join eq @list.join.flip
woldrich yeah, no, eqv is what I wanted. By the way, is there something like an perl6doc executable? 09:14
moritz_ not yet :(
woldrich Okay..
snarkyboojum that would surely be a super awesome GSOC idea :P 09:15
oh, it was wasn't it..
moritz_ snarkyboojum: we have grok, which came out of a GSOC project
snarkyboojum: but it's not only the program, we also need the docs :/
snarkyboojum moritz_: that's right.. a p5 type implementation from memory
woldrich I have yet to find a language that even come close to the amazing perl5 documentation
snarkyboojum woldrich: definitely agree with you 09:16
moritz_ I've had very good acceptance rate of doc patches to the p5 .pod files
snarkyboojum moritz_: aye, docs iz the hard biz eh :P
woldrich moritz_, really? that's interesting. Following the p5p ml, and when someone contributes a patch, it usually starts a flamewar... mostly the old timers that manages to veto it 09:18
snarkyboojum but we have awesome specs and perl6book :D
moritz_ woldrich: I often submitted small-scale doc patches for things that were previously omitted or unclear 09:18
woldrich: and I often went through #p5p IRC channel, not the mailing list :-)
woldrich Is there some 'real' applications or modules one could read? iirc someone whipped up a LWP::Simple... somewhere 09:19
moritz_, ah.
snarkyboojum woldrich: modules.perl6.org
moritz_ you can find the LWP::Simple and other stuff on modules.perl6.org/
woldrich oh, nice, I was looking at cpan6.org :)
moritz_ and for example I've done perlgeek.de/blog-en/perl-6/physical...lling.html with self-written (and still working) Perl 6 modules 09:20
snarkyboojum I look at that occasionally - it doesn't seem to change 09:20
woldrich Yeah... I'll get around and try to port some modules of my own
snarkyboojum and then there's clever perl 6 code at rosettacode.org 09:21
or should I say, rosettacode.org/wiki/Category:Perl_6 09:23
woldrich I see there's Term::ANSIColor, Term::ExtendedColor shouldn't be too hard... Are there any plans for a cpan for perl6? The cpan6.org site seemed a bit ... dead. The cpan source is available, so it should be pretty easy setting that up?
moritz_ not so easy :( 09:24
p6 has some ... extended requirements
see S11
woldrich Synopsis 11? 09:24
moritz_ yes
if you look at irc.perl6.org, the string S11 is automatically turned into a link to the right synopsis 09:25
woldrich hah. nifty
masak almost-still-morning, #perl6 09:35
woldrich masak, it's cold today :)
moritz_ \o masak
snarkyboojum o/ 09:36
Tene masak: I'm not so sure about your last bug submission, btw... it doesn't look like the problem is actually in the lines method 09:36
rakudo: say "A\n\nB\n".lines.perl 09:37
masak Tene: I think moritz_ already fixed that bug.
p6eval rakudo 6f9116: OUTPUT«("A", "", "B")␤»
Tene ah, well
masak moritz_++
moritz_ I did
masak Tene: it's a hectic industry :) 09:37
Tene I suppose that might explain why p6eval reports it working correctly, then. :)
moritz_ interestingly enough, it revealed a bug in .comb
masak maybe I didn't mention that the bug came out of dogfooding. 09:39
I discovered it when looking at the code blocks in the review notes generated by the Perl 6 sacript that throws together code and reviews.
oh, and if I've missed anything significant in my strangelyconsistent.org/p6cc2010/ reviews, please let me know. I'll happily take suggestions for improvements. 09:40
moritz_ well, I blogged about some :-) 09:41
Su-Shee *haha* I'm curious when this will happen in the perl world: python3wos.appspot.com/ (python 3 wall of shame :) 09:45
moritz_ Su-Shee: I'm quite sure it won't, because the gap between p5/p6 is much larger than between py2/py3 09:46
masak moritz_: I'll see about integrating the ones you blogged about, sometime later today. 09:47
Su-Shee well translate it into "doesn't load in..." :)
snarkyboojum esp if perl 6 implementation can run perl 5 :D 09:52
dalek albot: 326fd1f | moritz++ | build-scripts/rebuild-nqp.sh:
script for rebuilding nqp
09:53
albot: b81275b | moritz++ | evalbot.pl:
nqp target now runs nqp, nqprx runs nqp-rx
moritz_ phenny: tell diakopter that I "git stash"ed some changes to evalbot, because I needed to pull and didn't know what to do with them - fell free to 'git stash apply' + commit, or let them rot 09:55
phenny moritz_: I'll pass that on when diakopter is around.
tadzik Su-Shee: I made a hall of shame for the new module system :) 09:56
github.com/tadzik/ecosystem/tree/master/SHELTER
Su-Shee tadzik: :) 09:57
snarkyboojum tadzik: those that don't have a neutro compatible manifest file? 09:59
moritz_ tadzik: where's the spec for the new meta file? 10:00
tadzik snarkyboojum: yeah 10:00
moritz_ I think I updated json, and forgot the rest of my modules :-) 10:01
tadzik moritz_: um, yeah, well, I mean, there will be! I promise!
Maybe today :)
moritz_ tadzik: or a pseudo-canonical example?
snarkyboojum you're co-opting module metadata :P! 10:02
tadzik moritz_: just look at the existing ones :)
neutro has one, 50% of modules have :)
moritz_ uhm 10:03
neutro has a deps.proto
but not .json file
snarkyboojum moritz_: try the metainfo branch 10:04
moritz_ nqp: class A { }; say A; 10:05
p6eval nqp: OUTPUT«Confused at line 1, near "say A;"␤current instr.: 'parrot;HLL;Grammar;panic' pc 17541 (gen/hllgrammar-grammar.pir:4828)␤»
snarkyboojum tadzik: the metainfo branch should be made trunk already! :P
moritz_ nqp: class A { }; say(A);
p6eval nqp: OUTPUT«A()␤»
moritz_ jnthn++
tadzik snarkyboojum: too bad it's slow as a snail race :) 10:07
snarkyboojum tadzik: slower than master? 10:08
tadzik and last time I planned I had some reasons not to merge it
snarkyboojum tadzik: a nd does master work?
tadzik snarkyboojum: far slowe, yes. The json parsing is 40 seconds. On every run
snarkyboojum: yes
snarkyboojum tadzik: ok then! 10:09
tadzik: maybe it was proto or pls that didn't work
tadzik snarkyboojum: I'm afraid it's both :P 10:10
snarkyboojum I've been thinking of what I can do for a Perl 6 "hack in the pub" day/evening here in Sydney (I have one or two takers), and thought a good candidate might be to get people to try modules/compilers/whatever and just log as many legit bugs against them as possible 10:11
</evil-thoughts> :)
masak snarkyboojum: sounds nice.
snarkyboojum: getting people in the destructive mood somehow :)
snarkyboojum masak: I was thinking I could call it "bug-a-masak" 10:12
masak "let's see how we can subvert this system"
moritz_ :-)
tadzik I'm thinking of a bug-fixing party. Actually diving the whole RT to a three parts: those bugs which are alredy fixed, those doable for a mere mortal, and those being absolute black magic 10:13
masak snarkyboojum: would it require me to fly to Sydney? ;)
tadzik: the first part is already divided for you. 10:14
snarkyboojum tadzik: both approaches sound very yin yang :) I like it.
moritz_ I'm afraid that far too many fall into the "absolute black magic" category :(
tadzik masak: actually, no. Last time I wanted to fix some bugs on the RT, every time I found something like "oh, I may be able to fix this", it was alredy working on Rakudo, but it was still open 10:15
snarkyboojum masak: probably - I can't guarantee flights, but I could guarantee a quantity of beer ;)
jnthn Beer?! Where?! 10:20
er, morning #perl6 :)
moritz_ good late morning jnthn :-)
jnthn: is it OK to apply bacek's patch from yesterday to rakudo/master? 10:21
jnthn moritz_: Related to write-barriers?
moritz_ jnthn: aye
jnthn moritz_: Got a link to it handy?
moritz_ nopaste.snit.ch/31882
snarkyboojum jnthn: I swear I visualised you saying that before you did :)
moritz_ it also has a few changes for the form
- bind_fail = Rakudo_binding_bind_one_param(interp, lexpad, elements[i],
+ bind_fail = Rakudo_binding_bind_one_param(interp, lexpad, llsig, elements[i],
bacek ~~ 10:22
phenny bacek: 11 Feb 14:58Z <masak> tell bacek trac.parrot.org/parrot/ticket/2006
jnthn moritz_: Looks sensible to me.
bacek jnthn, it's required for write-barriering of llsig
jnthn bacek: Yes, understand. :)
tadzik .u ♫ 10:23
phenny U+266B BEAMED EIGHTH NOTES (♫)
jnthn bacek: It's pretty much what I would have done. :)
bacek++
bacek jnthn, :)
tadzik uhm, they don't look lik eights on my font
jnthn bacek: I hear you've been hacking on some gen-gc opts too?
bacek jnthn, yes. But I'm epically failing to make it twice faster on compiling core.pm. 10:24
jnthn, only 42% speed-up :)
jnthn "only" :P
moritz_ "only"
tadzik fail! :D
bacek jnthn, comparing to gc ms2
jnthn bacek: This implies that before we spent...at least half of runtime doing GC? 10:25
Or around that kinda mark?
bacek jnthn, about 40%
jnthn bacek: OK
tadzik erm, we still Do use GC there
moritz_ so what's the next big thing? PCC?
bacek jnthn, oton rakudo creates _a lot_ of GCable.
tadzik I hope so. I believe dozens of calls are the reason JSON::TIny is so slow
jnthn bacek: Yeah. That's going to improve a lot.
bacek moritz_, yes. PCC is terribly slow. 10:26
jnthn, excellent!
tadzik what are GCables?
sounds like something from Glib :) 10:27
moritz_ objects that the garbage collector has to consider
bacek moritz_, last test from t/spec/S02-builtin_data_types/instants-and-durations.t looks suspicious. It fails from time to time. I suspect due floating point rounding.
tadzik mhm
moritz_ bacek: I know, but I don't really know what to do about itj
tadzik oh, I read that as G-Cables
bacek moritz_, ok. I just want to confirm that isn't gen_gc bug :) 10:28
moritz_ I've seen it fail occasionally on master too 10:29
bacek tadzik, do you have any benchmarks for JSON::Tiny? Which are running for 2-3 seconds. 10:32
colomon is leaving his epic post on rationals and gcd unfinished to go back to bed. 10:33
tadzik bacek: Well, I can write some. This will just be "parse a sufficiently long json string"
bacek tadzik, just give me something to test on. "canonical". So I can compare performance between builds. 10:35
tadzik whoa, whoa, what's that new repl startup time? Are you nuts?
bacek++
jnthn tadzik: On gen-gc branch? :)
tadzik jnthn: yeah 10:36
jnthn Nice! 10:37
tadzik hmm, every method call and an operator in Rakudo is a sub call. PCC is The Bottleneck, no? 10:42
jnthn Well, or the lack of an inlining optimizer...or the multi-dispatch cache... :) 10:46
The current multi-dispatch cache allocates a GC-able every lookup. It'll be replaced by one that doesn't :) 10:47
tadzik big performance hits behind the corner, I like it 10:49
Tene tadzik: PCC has pretty big performance impact, yes. It is definitely a target for optimization. 11:03
masak moritz_: I'm wondering if your comment on "double blank lines" in perlgeek.de/blog-en/perl-6/thoughts-on-p6cc.html wasn't influenced by the .lines bug... 11:13
moritz_ masak: the other submissions didn't show so many double newlines 11:14
masak moritz_: well, maybe they didn't have as many empty lines. 11:32
arnsholt Apparently, I'm James T. Kirk =D 12:05
masak :) 12:14
Alias skates with a guy who's derby name is James T Hurt 12:27
masak ouch :) 12:44
TH14 lonely here 13:01
moritz_ TH14: try a dating site :-)
tadzik try linux irc channels, I met my love there :) 13:04
jnthn ...such things happen out of the movies? Wow! :) 13:05
moritz_ try real life, I met my wife there :-)
tadzik I was suprised too :)
mberends o/ jnthn moritz_ tadzik 13:06
tadzik mberends: o/
jnthn o/ mberends
moritz_ \o *
takadonet morning all
moritz_ hacks on the search feature of the IRC logs 13:18
let's see how long it takes to build a fulltext index on the lines 13:19
flussence how's it storing the data right now? just a plaintext file? 13:20
moritz_ mysql
and it currently uses mysql's full text search 13:21
which sucks
so I'm trying KinoSearch next
flussence I know, I had to do something complicated with it for $dayjob :)
jnthn had good experience with Solr. 13:22
flussence I don't know if I was just phrasing the query wrong, but it seems you can't even join on rows found by a fulltext match()...
moritz_ flussence: arbitrary restrictions are found occasionally when dealing with mysql 13:24
dalek kudo: 76cd24a | bacek++ | src/ (2 files):
more write barriers
13:26
kudo: 1a997d3 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to the current release
moritz_ 10min for building 676MB index 13:28
moritz_ and 0.1s for searching a query with about 10 hits 13:30
masak \o/ 13:55
tadzik \o
takadonet o/ 13:59
flussence
.oO( finally got that php work done with... back to finishing the CGI.pm one :( )
14:04
masak hugs flussence 14:06
flussence oh well, the one upside to being given all these side jobs by myself is that I can use git without anyone noticing :) 14:12
tadzik (: 14:13
TimToady is at sfo, about to go in search of caffeine... 15:04
sorear hi #perl6 15:27
tadzik hi sorear 15:28
donri why does subs require {}? 15:50
phenny donri: 14 Feb 23:45Z <Tene> tell donri btw, if you *do* run into other non-readline programs, please use rlwrap. Friends don't let friends use non-readline interactive programs. ;)
donri Tene: haha thanks dear :) 15:51
colomon loliblogged: justrakudoit.wordpress.com/2011/02/...rationals/
sorear donri: because Perl 6 uses { } for all constructs that produce a lexical scope
moritz_ donri: because a sub without executable code wouldn't make much sense
donri does "if" require {} for single-statements? 15:52
moritz_ and the way to attache code to a name or variable is { }
yes
donri i was thinking it didn't but i'm wrong :D
moritz_ except statement ending if
rakudo: say 3 if True;
donri yea
sorear also, sub doesn't require { } in all cases
p6eval rakudo 6f9116: OUTPUT«3␤»
donri so if bodies are scoped?
sorear per spec, you're allowed to say sub MAIN; and have the rest of the file be MAIN's body 15:52
don't think anyone implemenmts this yet 15:53
moritz_ std: sub MAIN; say 3
p6eval std 625303c: OUTPUT«===SORRY!===␤Malformed block at /tmp/CislUY8PLH line 1:␤------> sub MAIN⏏; say 3␤ expecting any of:␤ new name to be defined␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 117m␤»
donri rakudo: if (True) { my $var = 3; }; say $var
p6eval rakudo 6f9116: OUTPUT«===SORRY!===␤Symbol '$var' not predeclared in <anonymous> (/tmp/lhxSXRhOPC:22)␤»
sorear donri: yes, it's not like Javascript in that regard
flussence how about adding statement-ending sub for consistency? :)
PerlJam beware the hobgoblin of foolish consistency.
donri does that only work for MAIN?
sorear flussence: I think that's spelled "given $^a" 15:54
donri per spec
sorear donri: yes
donri how disappointing
flussence std: say $^x sub(3); # please don't work
p6eval std 625303c: OUTPUT«===SORRY!===␤Placeholder variable $^x may not be used outside of a block at /tmp/ikH3x5CcSW line 1:␤------> say $^x⏏ sub(3); # please don't work␤Two terms in a row at /tmp/ikH3x5CcSW line 1:␤------> say $^x ⏏sub(3); # please
..don't…
moritz_ donri: in javascript, it's the function() that introduces a new scope. In Perl (5 and 6) it's the {
donri I come from Python ;)
flussence JS also does it for loops, I think 15:54
sorear S06:423
donri which has mad scoping rules
moritz_ I never grokked python's scoping ru... ah, that explains it :-) 15:55
PerlJam python's scoping rules are simple .... too simple ;)
donri haha
it's not not having to predeclare variables that are set up conditionally for example 15:56
s/not not/neat not/
but the scoping is still mad in python
PerlJam donri: if by "neat" you mean "crazy", I agree with you :)
flussence *insert obligatory it-can't-be-as-bad-as-php here* 15:57
PerlJam well, to be fair, auto-declared vars are just fine, but they don't give the compiler enough information to help you when you accidentally do something stupid. 15:57
(and people tend to do stupid things far more often than they'd admit) 15:58
moritz_ especially while learning a language, and being confused by hundred other things
colomon I can usually do six stupid things before breakfast! 15:59
donri PerlJam: neat if you have an else so that it gets unconditionally set 16:00
but it might require some computation so you don't want to do it first if it's not used
moritz_ all stupid things I do are before breakfast, except maybe until I stop having breakfasts altogether 16:00
broquaint flussence: JS vars are function scoped - developer.mozilla.org/en/Core_Java...able_Scope 16:01
moritz_ colomon: in your blog, "25/50 + 50/100 is required to be 100/100" ENOMATH
colomon huh? 16:03
moritz_ oh, I can't read, sorry
flussence hm, guess I just got in the habit of writing var inside for() a lot in JS...
moritz_ colomon: I thought you had written 25/100
PerlJam EPOORREADING 16:04
colomon: though, I have to wonder what a "cartoon of worms" is exactly :) 16:05
PerlJam draws some worms and animates them 16:06
colomon .... errr.... cartoon is wrong. 16:07
carton.
colomon had a massive spelling fail there.
PerlJam or just a lazy finger
colomon moritz_: the sad thing is, at least as I read the spec, 25/100 + 50/100 can be 3/4.
moritz_: I assumed that was just a think-o in the spec for the rest of the article. 16:08
colomon well, I suppose technically 100 is a multiple of 100 16:09
but so is 0, by that logic. :)
PerlJam colomon: I don't know ... the part you quoted talks about lazy reduction of fractions, so 25/100 + 50/100 is 75/100 unless and until the "100" exceeds the storage size of an Int
colomon PerlJam: lazy reduction is optional. 16:10
except when it isn't.
except it still is then, too.
that's a major point of the blog post.
flussence rakudo: my $a = 10/10; for (1..9) { $a.denominator--; say $a } 16:12
p6eval rakudo 6f9116: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 7461:CORE.setting␤ in main program body at line 1␤»
flussence oh, guess that answers what I was wondering 16:13
lazy/nonlazy would behave differently there
if it worked
rakudo: my $a = 10/10; for (1..9) { $a = $a.numerator/$a.denominator-1; say $a } 16:14
moritz_ Rats are immutable
p6eval rakudo 6f9116: OUTPUT«0␤-1␤-2␤-3␤-4␤-5␤-6␤-7␤-8␤»
flussence and I get it wrong as usual :)
rakudo: my $a = 10/10; for (1..9) { $a = $a.numerator/($a.denominator-1); say $a }
p6eval rakudo 6f9116: OUTPUT«Inf␤-1␤-Inf␤1␤Inf␤-1␤-Inf␤1␤Inf␤»
flussence that looks nonlazy to me...
colomon :\
PerlJam $rat.=norm does look like it mutates the Rat to me.
colomon flussence: Rakudo is very definitely non-lazy. 16:15
moritz_ rakudo: say (10/10).perl
p6eval rakudo 6f9116: OUTPUT«1/1␤»
colomon PerlJam: of course not. it's just $rat = $rat.norm
moritz_ PerlJam: yep, but that only works on variables, not on values
colomon errr, I shouldn't say "of course not".
colomon but that's the general way p6 works. 16:15
colomon Rakudo doesn't implement anything like the rules in the spec for simplifying fractions. 16:16
to be fair, I think many / most of those rules were added after Rat was implemented.
but to be precise, I've long been pretty dubious about the spec's rules on simplification, so I've been dragging my feet implementing it. Looking at FatRat just brought that into focus. 16:17
PerlJam colomon: where in the "strict reading" do you get that "50/100 + 50/100 can be 1/1" ? 16:22
colomon PerlJam: the question is whether 100 is a multiple of 100. 16:23
PerlJam colomon: If I say my $a = 50/100 + 50/100; then I expect that $a.nu == 100 && $a.de == 100 and that $a.perl == "1" 16:25
colomon based on the spec, you mean?
PerlJam yes
colomon I think you mean $a.perl eq "1." 16:26
as "1" would be an Int, not a Rat. 16:27
PerlJam er, right
colomon moritz_ has suggested the spec really meant that to $a.perl to be "1.00" in this case, but failed to actually say it.
s/that to//
PerlJam perhaps 16:28
colomon has a toddler climbing on him to watch train videos in another window at the moment.
PerlJam It seems to me that the verbiage on .perl is just wacky. Fix that and things get much better 16:31
colomon wacky how? (I mean, I agree it needs fixing, but then, I'm also of the opinion that 25/100 + 25/100 should be 1/2.) 16:41
[Coke] I wonder why the spec is telling implementations what to do there. 16:51
[Coke] blogs.perl.org/users/xenu/2011/02/p...-suck.html - there's an opportunity for a P6 nudge. 17:00
tadzik seen x3nU 17:02
aloha x3nU was last seen in #perl6 23 days 4 hours ago leaving the channel.
[Coke] colomon: have you tried offering a spec patch?
colomon [Coke]: I hesitate to do that until I understand fully why the spec is the current weird way. 17:03
colomon Presumably TimToady had a reason for the way things are, so while I think they are wrong, I'd rather discuss it rather than just start changing the spec. 17:04
[Coke] That's why I suggested a patch instead of a commit. But ok. 17:05
PerlJam I think in the absense of TimToady here, a commit to the spec is a good communication tool :) 17:06
colomon I guess the idea of submitting a patch for something I could just change directly never occurred to me. :)
lue hello zebras! #phasers today? 18:16
dalek kudo: cea2411 | KodiB++ | docs/ChangeLog:
[docs] Mentioned xor changes in ChangeLog.
18:16
Util lue: Yes, #phasers in 37 minutes. However, freenode announced 24 minutes ago that they have lost half the network due to hub issues. 18:25
Util If you cannot connect, you can monitor on irclog.perlgeek.de/phasers/2011-02-15 18:26
[Coke] w a ? I c n t h a o . 18:27
flussence I got a server message 2 days ago saying the server I was on would be going down for maintenance, maybe it's that.
actually, half the network sounds like something else...
lue I better go do something so I can report it then :) 18:34
lue (curse this computer!) 19:15
jnthn curses lue's computer 19:20
masak \o/ 19:29
mberends \o 19:31
masak mberends: looking forward to meeting you in... less than three weeks. :) 19:32
masak std: 1. 19:34
p6eval std 625303c: OUTPUT«===SORRY!===␤Decimal point must be followed by digit at /tmp/4mO910GHhO line 1:␤------> 1.⏏<EOL>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/4mO910GHhO line 1 (EOF):␤------> 1.⏏<EOL>␤Parse
..faile…
masak rakudo: say +"1."
p6eval rakudo 6f9116: OUTPUT«1␤»
masak I think we need both a strict and a non-strict numifier, both fairly core. 19:37
lue I shall take part in the rare activity of placing feet on solid ground in the interest of movement. afk! o/ 19:38
masak 13WAA5ICG: I nominate you for Postmodernist IRC Nick of the Week. 20:05
masak least useful key on the keyboard, anyone? 20:16
masak has a candidate, but waits until he hears others' suggestions
flussence f8
masak really? you have no application that uses f8?
flussence probably lots, but it's so indescript I can never remember what most of them do. 20:17
masak maybe it's because I'm a child of the DOS era programs... the Fn keys are very useful :)
apejens caps lock
masak F8 means "go back to running at full speed" in many debuggers. 20:18
flussence F1 is a help button, F2 edits stuff in spreadsheets, F3 is find-next, F4 is for closing a window, F5 is reload, F6 switches frames, F7 does something in firefox that I remember because I keep hitting it accidentally...
masak apejens: for all the poor sods who haven't changed Caps Lock to Ctrl, you mean? :P
flussence actually, maybe I should say f9.
masak apejens: actually Scroll Lock wins over Caps Lock, easy.
apejens masak: well I have done that as well :)
flussence F10 toggles maximise, F11 is fullscreen, F12 usually screws stuff up.
apejens masak: my macs don't have scroll lock :)
masak :) 20:19
you're not missing anything important. :)
apejens I know :p
flussence it's a tossup between 8 and 9, but I think you've covered 8
benabik Eject is the least useful on mine. In no small part because I don't remember the last time I used my CD drive.
masak flussence: I think I use F8 more than I use Right Shift. 20:20
flussence well then, anyone know a common use for F9? :) 20:20
apejens benabik: true :p
f9 is next song on macs :p 20:21
benabik apejens beat me to it.
apejens but I use "f8" more, as thats play/pause
masak: right shift is also a good candidate, but eject wins for me I guess,if keys I've remapped no longer counts as the old keys :p 20:22
flussence if we're allowed to use hardware-specific buttons, then I pick the zoom± keys on mine, because they generate keycodes X11 can't handle. 20:23
Tene I don't remember the last time I used scroll lock or the "menu" key next to my right "windows" key. 20:24
Tene or pause/break 20:24
pretty sure I've used print screen occasionally, but very low numbers
masak Tene: I wonder who invented the menu/right-click key, and why. 20:24
mberends I last used a PrtSc/SysRq key over a decade ago, probably to operate a DOS multitasker.
masak I've used print screen on several occasions in the past month. 20:25
masak I've never used SysRq, I think. still don't know what it does, really. 20:25
Tene in linux, there are several key combinations involving sysrq that are handled by the kernel directly. 20:26
Tene you can use it for a secure access key, to verify that the kernel has killed everything listening to a terminal, or to sync all files, unmount all mounted filesystems, and power-cycle the system. 20:26
the last three sometimes used in extreme failure scenarios.
mberends IBM designed SysRq to flag out-of-band commands in mainframe terminal emulators 20:27
Tene "everything is crashed, and the system is otherwise unresponsive, so let's unmount the drives with as little damage as possible before rebooting" 20:27
flussence if we're allowed to use hardware-specific buttons, then I pick the zoom± keys on mine, because they generate keycodes X11 can't handle. 20:27
whoops
wrong window
masak Tene: I could have used that the other day.
flussence (first middle click, now readline gets me...)
tadzik masak: this-useless-thing-between-right-alt-and-right-ctrl 20:32
masak tadzik: what, the Product key? :) 20:33
flussence that's the "9~" key
in a terminal at least
tadzik hrm 20:34
masak tadzik: the Useless key is bloody annoying in some old DOS games that assume that there's no key between Ctrl and Alt. :(
tadzik masak: www.lytebyte.com/wp-content/uploads...rd-key.jpg
I'm mad at KDE4 which forbids me from binding it to my quicklaunch app 20:35
masak oh, that one.
apejens it's like you guys don't have macs, I'm shocked! :)
masak yes, we talked a little about it above.
tadzik as if anyone uses that or something
flussence Try xbindkeys, it seems to work much better than any DE's keyboard shortcuts that I've used.
masak apejens: even on the Mac I used my Model M keyboard...
apejens: I had Ctrl bound as Cmd, and Caps Lock bound as Ctrl. 20:36
apejens I've just changed caps lock
tadzik flussence: yeah, I guess so. I'm still using xdm for there is no civilized DM which runs .xinitrc properly
flussence this one time, I found out that mashing the right combination of keys in one of kde's shortcut settings windows makes it print garbage in the shortcut text 20:37
flussence and xdm's a bit more civilised than how I tend to run things :) 20:38
apejens this one time, at band camp, I met someone who used caps lock 20:39
masak :P 20:40
apejens: bash.org/?835030
tadzik mberends: what will be your talk at the NL workshop?
Tene apejens: I regularly use caps lock. I use it for any sequence of capital letters with length > 1. 20:41
Well, many, at least. More frequent use with greater sequence length. 20:42
moritz_ jnthn: is it on purpose that $!target in Regex::Cursor is not typed as str?
jnthn moritz_: ish
Tene apejens: How would *you* type "our $VERSION", or "our $DEFAULT_CONNSPEC"? 20:43
jnthn moritz_: I was gonna do it but (a) it's a much smaller win since the same immuted string PMC gets passed around during the whole parse so it doesn't save us that much at all, and (b) TimToady seemed unsure if there was a place for a "str" in Perl 6 20:43
apejens Tene: I use shift with my right pinky finger 20:44
masak same. 20:45
Tene apejens: I get figner pain if I use too many modifier keys, and switching back and forth which shift key I'm pressing to complement the current hand pressing the letter is annoying.
tadzik right?
tadzik touching my right shift gives an impression that it has never been used 20:46
apejens $VERSION 20:48
I use right, jsut tested :p
moritz_ jnthn: does add_parrot_vtable_mapping require the sub to previously installed as a method? 21:10
jnthn moritz_: no 21:14
moritz_: method () is parrot_vtable('blah') { ... } # just a Parrot v-table method 21:15
method foo() is parrot_vtable('get_string') { ... } # normal method AND get_string method
moritz_ jnthn: I meant HOW.'add_parrot_vtable_mapping'
but it's probably the same under the hood anyway :-) 21:16
jnthn ah, you were asking at the MOP level :)
The first line I wrote is just a call to add_parrot_vtable_mapping
The second is a call to that and also add_method
A normal method foo() { } is just a call to add_method
Installing it as a Parrot v-table is totally orthogonal. :)
So you can do it as just a v-table, just a method, or both. 21:17
jnthn And yes, if in doubt you can always declare a class, then look at the PIR to see the MOP calls that produced it :) 21:17
dalek p/match-nom: 6314c26 | moritz++ | src/Regex/Match.pir:
first shot at moving Regex::Match to 6model. Does not even compile yet
21:30
p/match-nom: a5a8a85 | moritz++ | src/Regex/Match.pir:
fix stupid thinko
p/match-nom: a66d699 | moritz++ | src/Regex/Cursor.pir:
fix new_match
moritz_ jnthn: what's the setter equivalent to repr_get_attr_int ? 21:37
ah, bind, not set 21:38
dalek p/match-nom: b863609 | moritz++ | src/Regex/Cursor.pir:
remove 3-arg setattribute from Regex::Cursor.MATCH
21:40
jnthn moritz_: Yeah, I'm trying to kill "set" as its hardly clear whether one is binding or assigning. 21:44
moritz_ jnthn: yep, I understand 21:45
jnthn: github.com/perl6/nqp/issues/#issue/4 is the current status
it's a bit sad that I can't run p6regex_test without fully building nqp
jnthn We could if only the meta-model bits were pulled out of nqp.pbc into their own PBC file. 21:46
I think that's do-able but didn't have chance to try it yet. 21:47
jnthn moritz_: OK, if you got it so far as compiling and giving a parse fail that's pretty decent progress. :) 21:53
moritz_: Looks quite sane. 21:57
moritz_: Not sure why it doesn't work without running it. :)
+ $I0 = repr_get_attr_int self, cur_class, '$!to' 21:59
131
+ $P0 = $I0
59 132
.return ($P0)
The $P0 = $I0 is actually making a needless box, potentially
.return ($I0) is fine there :)
moritz_ . 22:01
jnthn (That's not why it doesn't work, mind. Looking for that now.) 22:02
moritz_ $I0 = repr_get_attr_int self, cur_class, '$!from' 22:02
from = box $I0
repr_bind_attr_int match, match_class, '$!from', $I0
$I0 = repr_get_attr_int self, cur_class, '$!pos'
to = box $I0
repr_bind_attr_int match, match_class, '$!to', $I0
moritz_ is it a problem that it's $I0 twice in there? 22:03
jnthn No
Though I don't know if those to and from are actually used?
Other than in this bit of the code?
moritz_ they are
jnthn I was hoping those could go away altogether
Oh.
Darn.
Anyway, changing that is optimization
moritz_ i can eliminate them 22:04
jnthn OK, but let's try and make it work at all first. :)
dalek p/match-nom: edbb70c | moritz++ | src/Regex/Cursor.pir:
get rid of some boxing
22:05
moritz_ couldn't resist :-) 22:05
jnthn :) 22:05
tadzik yay, writing games is fun 22:08
even in C :)
masak +1
jnthn moritz_: erm.
moritz_: ...the branch didn't build for you? 22:09
moritz_ jnthn: no
jnthn oh wait...wtf...
moritz_ tries after git clean -xdf
jnthn I screwed up the branch checkout :) 22:11
jnthn moritz_: Oh! 22:14
jnthn "Main challenge: 6model doesn't do PMC inheritance" 22:15
That's a challenge because the thing needed to get capture semantics in some way :)
moritz_ at which point is PMC inheritance needed? 22:16
oh, parent => Cursor 22:17
jnthn moritz_: The original code had 'parent'=>'Capture'
And Capture is a PMC
moritz_ right, Capture
so I need has-a Array and Hash? 22:18
jnthn Yeah but...
I think we may be better of writing a Capture class that has those.
jnthn And then inheriting from it 22:18
Otherwise Match ends up with an implementation of Capture inside it. 22:19
moritz_ hm, ok
jnthn I shoulda been more explicit about that.
That (important ;)) bit aside, I'm pretty sure the rest of what you've done is exactly what was needed though.
moritz_ I was just about to say that :-) 22:20
where should Capture.$Whatever live?
jnthn set_pmc_keyed() not implemented
Yup, telltale :)
I guess if you want to write it in NQP, then it can inherit from NQPMu and just go in the same place as that file. (more) 22:21
NQPMu shouldn't actually be in the meta-model folder anyway, but rather be part of a setting, like it is in nqpclr. 22:22
But that's a later refactor.
So for now feel free to derive an NQPCapture from NQPMu and we'll see how that ends up.
dalek p/match-nom: 205e5e1 | jonathan++ | src/Regex/Match.pir:
A little more unboxing. :-)
22:24
masak new blog post: strangelyconsistent.org/blog/theres...-wrongness 22:40
jnthn
.oO( wrongnesses )
22:41
masak essentially, yes :) 22:42
dalek p/match-nom: 6db30e4 | moritz++ | src/ (2 files):
add hacky NQPCapture
22:47
moritz_ curiously that doesn't change the failure mode 22:49
anyway, bed
jnthn masak++ # nice post :)
moritz_: Thanks! 22:50
moritz_: pulling ;)
jnthn moritz_: Didyou add it to the makefile? 22:50
oh, wait, you added it to the same file 22:51
OK :)
Will investigate; sleep well :) 22:52
Ah, it's 'cus I didn't set up those vtables as overridable yet. 22:53
jnthn does so.
tadzik masak: your blog looks funny on Opera 23:03
masak tadzik: sorry to hear that. 23:04
Opera is generally very good at HTML and CSS...
jnthn It's hilarious in IE, but the jokes all fall flat in Firefox
;)
(Actually, it looks fine in Firefox :))
tadzik I fell like Opera is very standards-compliant, but not very web-compliant 23:06
like a compiler with -Werror by default
dalek p/match-nom: 866ea1f | jonathan++ | src/pmc/rakudoobject.pmc:
Make a few more v-tables overridable (e.g. ones that NQPCapture needs to override). Gets us a bit further with Match on 6model.
23:08
masak 'night, #perl6 23:09
cotto_work d'oh. I was just about to complement him on his wrongness blog post. 23:17
masak++ for that
dalek p/match-nom: a484ca8 | jonathan++ | src/Regex/Match.pir:
Fix up some attribute accesses in Match to be done the 6model way.
23:30