»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
ash_ my illogical ramblings break even std in unexpected ways 00:00
TimToady std: say $x:: 00:01
p6eval std 30454: OUTPUT«ok 00:01 107m␤»
TimToady that probably shouldn't be allowed
ash_ oh, am i missing an our in front of sub bar?
TimToady that's not my complaint; you're double dereffing with :: 00:02
00:02 lestrrat is now known as lest_away
TimToady once on the Foo:: and once on the $x:: 00:02
ash_ okay, yeah, makes sense 00:03
TimToady but yes, you'd want an 'our'
ash_ i just figured you wouldn't be doing $x.bar since its not really a method
I also figured it would need some way of signifying its not a method, unless its acting like a hash, then it could be $x<bar> 00:04
00:06 snarkyboojum left
diakopter pmichaud: food *and* appliances?? :) 00:06
TimToady drums & 00:07
diakopter decommute&
fg
decommute --for-realz & 00:08
00:09 justatheory left, ash_ left 00:13 BinGOs joined 00:14 jonrafkind joined
jonrafkind the link to the perl6 grammar from perl6.org is broken. svn.pugscode.org/pugs/src/perl6/STD.pm, should have a 6 on the end. that is all 00:14
diakopter jonrafkind: thanks :) would you like to fix it in svn? 00:15
jonrafkind uh ok, but do I have write access? 00:16
diakopter yep; just msg me your email address & desired username
00:18 snarkyboojum joined, k23z__ left
snarkyboojum looks like I've missed masak-san 00:20
00:25 lichtkind left 00:27 stephenlb left 00:32 ReiniUrban joined 00:35 rurban left, ReiniUrban is now known as rurban 00:44 yinyin joined 00:45 jonrafkind left
jnthn almost gets a nasty bug fixed, but is too tired to finish the patch up tonight...ah well, tomorrow. 00:59
o/
takadonet jnthn:good night 01:02
01:06 NoOneButMe joined
pmichaud 00:06 <diakopter> pmichaud: food *and* appliances?? :) 01:07
yes. New dishwasher, followed by dinner. :)
01:08 sorear joined, molaf_ joined 01:12 molaf left, meppl left 01:15 lest_away is now known as lestrrat
lue hello there! 01:32
01:32 NoOneButMe left 01:35 wknight8111 left 01:45 hercynium joined
Tene Hi! 01:45
lue thinks of looking back into his own personal log (for starters) of #perl6 to see when people are likely to be on... 01:46
lue with the aid of P6 scripts to crawl through said log, of course :) 01:47
sundar It looks like there was active discussion till abt two hours back.. till 00:00 GMT that is. 01:53
lue I know. I was too busy playing Majora's Mask since I came home at 8:30 GMT (about) :P 01:55
...that's likely way off 01:56
01:58 Psyche^ joined, agentzh joined
sundar heh... I was just trying to decide between Halflife and Battle for Wesnoth to play now. :) 01:58
lue I came home ~15:30 PDT (I know that for sure)
I am soo close to beating MM... just want to get the last bottle, at least 1 more heart piece, and then drink some Chateu Romani and slay Majora! \o/ 02:00
02:01 Patterner left, Psyche^ is now known as Patterner 02:02 sorear left 02:03 sorear joined 02:04 snarkyboojum left
allbery_b throws several spanners into the works... 02:05
lue *SCREEECH* aw! You broke the Chameleon circuit on masak and snarkyboojum's TARDIS :) 02:07
02:11 snarkyboojum joined 02:20 alester joined 02:29 madalu left 02:33 meppl joined
lue hello? 02:50
sundar off to sleep... good night || have a good day || $other-appropriate-greeting 02:57
sorear Why does Perl 6 have explicit slot access at all? Moose omits it, and it's a crucial unfeature there 03:00
The *only* way to access slots is through accessors, which are controlled by the metaclass
it makes attribute polymorphism work
03:03 justatheory joined 03:04 Khisanth left 03:09 rv2733 left, justatheory left 03:11 dmpk2k joined 03:12 lue joined 03:18 Khisanth joined
sorear allbery_b, we meet again 03:22
03:31 TiMBuS left
allbery_b heh 03:33
allbery_b busy watching NHL playoff game :) 03:34
03:36 sundar left 03:43 meppel joined
lue rakudo: say :16<8192> 03:46
p6eval rakudo 395433: OUTPUT«33170␤»
lue rakudo: say "8192".fmt{'%x'} #wrong way *cough* 03:47
p6eval rakudo 395433: OUTPUT«8␤»
lue ō.o
lue submits rakudobug (that's not what 0d8192 is in hex) 03:48
03:48 meppl left 03:51 meppel is now known as meppl
lue rakudo: say :16<2000> 03:54
p6eval rakudo 395433: OUTPUT«8192␤»
sorear what's up with the nonsequential spec numbering? 04:00
pmichaud sorear: they tend to follow chapters in the Camel Book.
sorear S15, S18, S20, ...
ah
pmichaud so, S05 is on regular expressions. 04:01
sorear should get that sometime
(there's a camel book chapter on roles?) 04:02
pmichaud One of TimToady++'s insights into describing Perl 6 was that it would be good to minimize forward constraints, which is effectively what one has to do when describing a language in a book. So the blueprint for Perl 6 design documents was to follow the template given by the Camel.
Well, over time it's obviously become an imperfect fit, of course.
sorear yes, I wasn't aware if that carried over into the late synopses 04:03
where late = after the apocalypses ended
pmichaud S29 and S31 follow the camel sequencing, somewhat.
sorear tracks down an online copy of the Camel TOC 04:05
pmichaud oreilly.com/catalog/9780596000271
sorear aye 04:06
tracks was meant as immediate past tense
04:31 jaldhar joined
sorear What is the status of Rakudo on 2.3+? 04:34
lue afk
pmichaud Rakudo #28 runs fine on 2.3.0.
We don't have a version of Rakudo that works with current Parrot trunk. 04:35
(we're working on it.)
sorear yes
mostly wondering if there are enough small projects that a spare tuit would help
pmichaud alas, gotta run for a bit 04:38
04:39 meppl left 04:42 jaldhar left 04:48 Alias_ left 04:49 molaf_ left 04:52 jaldhar joined 04:53 orafu left 04:54 orafu joined 04:57 steinberg left 04:59 kaare joined 05:00 kaare is now known as Guest13068, ReiniUrban joined 05:01 rurban left, ReiniUrban is now known as rurban 05:10 Trey left
avar What broke in parrot 2.3+? 05:13
05:14 meppl joined
sorear bugs 05:14
cotto The immutable strings merge in parrot causes a little breakage. There's a branch for it in rakudo. 05:25
though bugs are quite possible
sorear also, 2.3.0 parrots buggily use "our method" semantics for all methods 05:26
which we relied on in a few places
05:45 alester left
cotto anyone with a commit bit around? 05:50
nopaste.snit.ch/20341 05:55
The switch, cgoto and cgp runcores are on the chopping block. If they're useful to Rakudo comments can go to trac.parrot.org/parrot/ticket/1563. 05:58
sorear *as they are implemented today
cotto That patch removes the switch ops from Rakudo's build so that Rakudo won't break if/when they're removed. 06:00
moritz_ good morning 06:07
06:22 hercynium left
moritz_ cotto: will push the patch after successfull spectest 06:32
06:34 uniejo joined 06:36 iblechbot joined 06:47 lestrrat is now known as lest_away 06:53 leon_mu joined
mathw Morning 07:07
meppl good morning, mathw 07:10
mathw Hi meppl 07:13
sorear helo
mathw pmichaud: Good blog post. Very good blog post. 07:14
07:15 leon_mu left
moritz_ jnthn: your recent patches have caused some fallout in the spec tests, for example t/spec/S09-typed-arrays/hashes.rakudo aborts before running any tests 07:23
dalek kudo: 6783b52 | moritz++ | build/Makefile.in:
remove switch ops from Makefile.in. cotto++

when that actually happens.
07:26
07:35 iblechbot left, mberends joined
sorear blizkost passes all tests on newest parrot 07:47
although it seems to segfault much more
07:56 lest_away is now known as lestrrat
moritz_ rakudo: sub foo($bar:) {}; 07:57
p6eval rakudo 6783b5: ( no output )
moritz_ rakudo: sub foo($bar:) {}; foo(4:) 07:58
p6eval rakudo 6783b5: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
moritz_ rakudo: sub foo($bar:) {}; foo(4)
p6eval rakudo 6783b5: OUTPUT«Lexical 'self' not found␤current instr.: 'foo' pc 179 (EVAL_1:77)␤»
08:01 lestrrat is now known as lest_away 08:03 rgrau` left, rgrau joined, rgrau_ joined
avar is parrot not released on cpan anymore? All I see is parrot-0.0.11.2 08:09
moritz_ it's not
avar why? 08:11
moritz_ dunno... probably too much hassle 08:12
mberends Steve A Fink should delete that very old Parrot 08:20
sorear recently, Allison Randal deleted parrot-1.0.0 08:21
which was on CPAN as recently as March
mberends Parrot 0.0.11.2 and related modules are dated 22 Sep 2003 08:22
avar whee
08:23 k23z__ joined
avar Anyway I don't see why not to upload the tarball. You'd at least get the distribution mechanism / search.cpan.org. Should be easy to hack up a Makefile.PL and get cpantesters too 08:23
moritz_ avar: it's not easy. There are lots of .pm files shipped with parrot... 08:24
avar: and since the release managers change, they need to add those new modules to some group each time, and if they forget one, the next parrot upload is marked as unauthorized
08:25 eternaleye joined
avar moritz_: It's easy to just ignore all those .pm files with META.yml with no_index 08:25
If that's an issue I could hack up a small script to do that, if anyone cares :) 08:26
moritz_ anyway, I don't see any real benefit in having parrot on cpan
avar cpantesters, weren't some parrot releases shipped with "oops, we broke win32" type of errors? 08:27
moritz_ I don't think that happened anymore since parrot has its own smoking system 08:28
08:30 snarkyboojum left 08:33 dakkar joined
BinGOs My smokers definitely used to smoke Parrot when it was uploaded to CPAN 08:35
moritz_ rakudo: say Date.today - 3705 08:40
p6eval rakudo 6783b5: OUTPUT«2000-03-01␤»
frettled hmm 08:46
rakudo: say Date.today + 123456 08:47
p6eval rakudo 6783b5: OUTPUT«2348-04-27␤»
frettled rakudo: say Date.today + 12345678
p6eval rakudo 6783b5: OUTPUT«35811-08-18␤»
frettled Nice.
08:50 smash_ joined
smash_ hello everyone 08:50
08:52 riffraff joined
sorear hello 08:52
frettled Morning-ish! 08:54
09:07 astrojp left
moritz_ hugme: tweet rakudoperl Rakudo #28 "Moscow" released, with vastly improved string interpolation and item assignment 09:14
hugme hugs moritz_; tweet delivered
smash_ rakudo: say 1 09:19
p6eval rakudo 6783b5: OUTPUT«1␤»
smash_ rakudo: say "ABC".trans('A'=>'a')
p6eval rakudo 6783b5: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
smash_ what did i do wrong ? 09:21
moritz_ .trans is not yet implemented in master 09:22
it's just the parrot .trans method leaking through
ISTR that somebody was mentioning he was working on a patch for .trans, but I forgot who :( 09:23
alpha: say "ABC".trans('A'=>'a')
p6eval alpha 30e0ed: OUTPUT«aBC␤»
smash_ oh, ok.. thks 09:24
sorear if we override trans will it break parrot?
moritz_ huh?
moritz_ sincerely hopes it doesn't
smash_ if it does i guess something is wrong :) 09:25
moritz_ aye
the .trans in alpha didn't break parrot either
sorear overriding methods with completely unrelated methods breaks Liskov 09:26
if Parrot is actually using its own .trans, there could be a problem
moritz_ only if parrot ever tries to call .trans on a Perl 6 string using the Perl 6 dispatcher 09:27
smash_ alpha: say "ABC".trans(['A','B']=>['a','b']) 09:28
p6eval alpha 30e0ed: OUTPUT«abC␤»
sorear y/// is gone? 09:29
I suppose it was kinda lousy huffman
moritz_ std: y///
p6eval std 30454: OUTPUT«===SORRY!===␤Unsupported use of y///; in Perl 6 please use tr/// at /tmp/Rrop3V8eNB line 1:␤------> y⏏///␤Parse failed␤FAILED 00:01 109m␤»
sorear rakudo: tr/a/b/.WHAT.perl.say 09:30
p6eval rakudo 6783b5: OUTPUT«Could not find sub &tr␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
09:41 iblechbot joined 09:45 yinyin left 09:50 hicx174 joined 10:00 masak joined
masak oh hai, #perl6 10:03
I see the temporal bikeshedding on p6l is in full force. somehow, though, when I red it I think "they don't have any working code, so whatever they say they cannot hurt the status quo"... :) 10:04
frettled masakshark!
masak plays "Jaws"
moritz_ (working code)++
frettled Cathedral vs. Bazaar Mk. MMX 10:05
moritz_ phenny: tell jnthn gist.github.com/376404 by smash++ demonstrates that subtype checks are executed twice for multi dispatch... wasn't that down to one execution only, at some point?
phenny moritz_: I'll pass that on when jnthn is around.
masak I'm going to go out on a limb and say that the proposals in that p6l thread are an example of "Second system syndrome done wrong". That is my firm opinion. 10:06
moritz_ wishes for a post-p6l list where all these discussions could be redirected to 10:07
masak I wonder how many outsiders have sometimes approeched Perl 6 through p6l and thought "wow, these people are insane".
"...and hopeless dreamers incapable of designing anything practical." 10:08
sorear no, perl 6 is created by *terrifyingly* hopeless dreamers who /are going to succeed/
masak sure. as soon as we implement that abstract instant-in-time which can be converted to all the possible calendar systems in the universe. 10:09
moritz_ is quite hopeful, but plays only a minor role in creating perl 6
sorear well, the conversion is the job of the calendar 10:10
once we define abstract instants in time, if a calendar system can't convert itself from an instant, that calendar is broken
frettled Some of the bikeshedding has revealed problems that cannot easily be solved by a calendar.
sorear and until such time as we have camels in space, Rat of seconds since 1970-01-01 is a fine Instant 10:11
so... yeah
dalek ok: bfe7d2a | moritz++ | src/multi-dispatch.pod:
[mmd] clarify number of executions of a where-block, smash++
10:15
jnthn o/
phenny jnthn: 10:05Z <moritz_> tell jnthn gist.github.com/376404 by smash++ demonstrates that subtype checks are executed twice for multi dispatch... wasn't that down to one execution only, at some point?
masak jnthn: \o 10:16
moritz_: basically, relying on the number of executions per invocation is wrong a priori.
jnthn moritz_: I'm not sure it was.
moritz_ masak: I know 10:17
jnthn What masak said though. We may be able to decide at compile time that it's fine.
And do 0.
:-)
masak moritz_: thought you did. was saying it mostly for the logs. :)
jnthn Granted re-doing it is inefficient.
moritz_ jnthn: I thought the dispatcher did the check, and then told the binder that it doesn't need to re-check
jnthn I thought so to, but maybe that was only working for the nominal type checks. 10:18
moritz_ alpha: my $x = 0; multi a {$y of Int where { ++$x }) { say "YaY" }; a(3); say $x 10:19
p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "of Int whe"␤in Main (file <unknown>, line <unknown>)␤»
moritz_ alpha: my $x = 0; multi a {Int $y where { ++$x }) { say "YaY" }; a(3); say $x
p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "$y where {"␤in Main (file <unknown>, line <unknown>)␤»
moritz_ can't write Perl 6 code anymore 10:20
masak std: sub foo { state $*bar }
p6eval std 30454: OUTPUT«ok 00:01 109m␤»
smash_ alpha: my $x = 0; multi a(Int $y where {++$x}) { say "YaY" }; a(3); say $x 10:21
p6eval alpha 30e0ed: OUTPUT«YaY␤2␤»
jnthn masak: I guess I'd expect that to work. :-) 10:32
m6locks any work on the DB* section? how does I get a database up with perl6?
masak jnthn: yeah. still trying out my new knowledge about these things, as it were.
moritz_ m6locks: github.com/jnthn/zavolaj has an example mysql client 10:33
m6locks thanks :)
masak m6locks: I've had some moderate success with Squerl. I know mberends++ and jnthn++ have been working on a... what moritz_ said.
jnthn github.com/mberends/fakedbi is a nice idea but...there's no code yet. :-) 10:34
m6locks :D
well, idea counts too, but it's not that usable in real life 10:35
imma checkout that zavolaj and see how it works
jnthn No. Maybe the Zavolaj MySQL client or Squerl are the way to go.
Zavolaj is a general layer for building calls to C libraries, btw.
m6locks aye
moritz_ there's also DBDI, but it doesn't run yet either
jnthn The mysqlclient.p6 is just an example of using it.
masak m6locks: Squerl has code that Works Today. I can point you to examples if you like. 10:37
colomon discovered overnight that breaking Complex.abs causes a spectacular number of spectest failures.... 10:38
jnthn absolut FAIL!
moritz_ could somebody explain WTF RT #74600 uses curly braces for calling .fmt? 10:39
rakudo: say '8192'.fmt('%x')
p6eval rakudo 6783b5: OUTPUT«2000␤»
colomon jnthn: is that a new flavor I've not heard of before? ;) 10:40
moritz_ rakudo: say '8192'.fmt{'%x'} # what does this actually do?
p6eval rakudo 6783b5: OUTPUT«8␤»
moritz_ is this parsed as ('8192'.fmt){...} or rather what? 10:41
m6locks masak: please do so
masak m6locks: use.perl.org/~masak/journal/39686 10:42
m6locks thanks
masak moritz_: I think there's another RT ticket for exactly that.
moritz_: yep. rt.perl.org/rt3/Ticket/Display.html?id=74112 10:43
moritz_: but invalidate RT #74600. that's not how you call .fmt
moritz_ masak: thanks, will close
masak moritz_++
moritz_ 615 tickets 10:45
jnthn \o/ 10:46
That's a nice decrease from > 630 at the weekend.
masak and not an increase to 650 as I gloomily predicted... :) 10:47
masak goes off to find more bugs
jnthn masak: mwahaha... 10:48
masak: Clearly you just make more gloomy predictions.
masak This Weekend's Weather: lots of bugs moving up from the south...
jnthn masak: What will be the effect on aviation? 10:49
colomon I bet generating bugs would be easy if proto worked again.... ;)
masak jnthn: depends entirely on the amount of bugs. usually the plane can work around them. 10:50
moritz_ and there are still 6 tickets waiting for tests
jnthn Wow. :-)
I wonder if we can dip below 600... 10:51
smash_ omg !! i love p6
masak smash_: what now? :)
moritz_ jnthn: it's a vicious circle... if you eliminate the bugs the prevent us from running some of the modules, we'll find more bugs immediately 10:52
masak that's why I'm so gloomily hopeful :)
jnthn That's inspiring. :-P 10:53
smash_ masak: it makes things so simple that it makes me want to cry out of joy 10:54
moritz_ rakudo: my @a = <a b c d f>; for @a[ 1 ..^ ] -> $x { say $x }
p6eval rakudo 6783b5: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
moritz_ rakudo: my @a = <a b c d f>; for @a[ 1 ..^ @a ] -> $x { say $x }
p6eval rakudo 6783b5: ( no output ) 10:55
masak smash_: thanks for reminding me of that. :) I know what you mean, and feel that way too sometimes.
moritz_ rakudo: say @*ARGS.PARROT 10:56
p6eval rakudo 6783b5: OUTPUT«Array␤»
moritz_ rakudo: my @x = @*ARGS; say @x.PARROT
p6eval rakudo 6783b5: OUTPUT«Array␤»
10:59 mls joined
mls rakudo: say (1, 1, * + * ... *).batch(10).perl 11:00
p6eval rakudo 6783b5: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55)␤»
mls rakudo: say (1, 1, * - * ... *).batch(10).perl
p6eval rakudo 6783b5: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
mls rakudo: say (1, 1, * * * ... *).batch(10).perl
p6eval rakudo 6783b5: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
moritz_ rakudo: class A is Mu { }; say A ~~ Any 11:02
p6eval rakudo 6783b5: OUTPUT«0␤»
moritz_ rakudo: class A is Mu { }; say A.^parents
p6eval rakudo 6783b5: OUTPUT«Mu()␤»
mls rakudo: say say (1, + * ... *).perl
p6eval rakudo 6783b5: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: 'infix:<...>' pc 316490 (src/gen/core.pir:0)␤»
masak submits rakudobug 11:04
colomon mls: the general rules for creating whatever blocks have not been implemented in Rakudo yet.
just special cases for the common + and * - $n cases.
mls colomon: thanks. should I open a ticket for the Null PMC? 11:05
masak rakudo: 1, +* ... *
p6eval rakudo 6783b5: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: 'infix:<...>' pc 316490 (src/gen/core.pir:0)␤»
masak mls: I'm on it :)
moritz_ rakudo: +*
p6eval rakudo 6783b5: ( no output )
masak moritz_: the above was the golfed case.
moritz_ rakudo: (+*).(1)
p6eval rakudo 6783b5: ( no output )
masak it's the '1,', the '+' and the '...' in conjunction that does it. 11:06
colomon rakudo (+*).WHAT 11:07
pugssvn r30455 | moritz++ | [t/spec] test that class A is Mu { } does not have anything to do with Any
colomon rakudo: (+*).WHAT
p6eval rakudo 6783b5: ( no output )
colomon rakudo: (+*).PARROT
p6eval rakudo 6783b5: ( no output )
masak lunch & 11:08
moritz_ closes masakbug 11:09
colomon rakudo: (+*).signature.params 11:10
p6eval rakudo 6783b5: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: (+*) ~~ Code 11:11
p6eval rakudo 6783b5: ( no output )
colomon rakudo: say (+*) ~~ Code
p6eval rakudo 6783b5: OUTPUT«1␤»
jnthn rakudo: say (+*)("42")
p6eval rakudo 6783b5: OUTPUT«42␤»
colomon Yeah, that's the problem. It registers as Code, but apparently doesn't have a valid signature.
jnthn rakudo: say ((+*)("42")).WHAT
p6eval rakudo 6783b5: OUTPUT«Num()␤» 11:12
jnthn rakudo: say (+*).signature.perl
p6eval rakudo 6783b5: OUTPUT«␤Null PMC access in find_method('perl')␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
jnthn fejl.
colomon Locally I'm getting a crash in t/spec/S14-roles/parameterized-type.t -- known bug or some weird side effect of my .abs change? 11:14
11:14 sundar joined
jnthn colomon: Odd, I was working on those yesterday...I was pretty sure that test passed though. 11:17
Unlikely to be side-effect of .abs change though
I'll look into it later. 11:18
sundar A05 says Perl has "no support" for named captures... Was it written before Perl 5.10? 11:20
jnthn Long before. 11:21
sundar Ah, ok, I'll keep that in mind. 11:22
TimToady++ # for incredible writing skills, like in: "The path to freedom is not to make everyone a slave" 11:29
11:32 viklund joined
m6locks haha 11:36
well true that
11:37 envi^home joined
masak viklund: \o 11:37
am0c rakudo: for @(1..3 X 'a'..'b') -> $n, $a { say "$n|$a" } 11:40
p6eval rakudo 6783b5: OUTPUT«1 a|1 b␤2 a|2 b␤3 a|3 b␤»
am0c it seems it creates Parcel. spec has modified?
masak more like Rakudo has modified, and doesn't do that correctly yet. 11:42
jnthn rakudo: for (1..3 X 'a'..'b') -> $n, $a { say "$n|$a" } 11:43
moritz_ jnthn: I see the same failure
p6eval rakudo 6783b5: OUTPUT«1 a|1 b␤2 a|2 b␤3 a|3 b␤»
am0c i see.
moritz_ (in parameterized-types.t)
jnthn rakudo: say (1..3 X 'a'..'b').perl
p6eval rakudo 6783b5: OUTPUT«(1, "a", 1, "b", 2, "a", 2, "b", 3, "a", 3, "b")␤»
jnthn rakudo: say (1..3 X 'a'..'b').WHAT
p6eval rakudo 6783b5: OUTPUT«GatherIterator()␤» 11:44
viklund masak: hi 11:45
moritz_ \o/ it's viklund
masak viklund: long time no #perl6
viklund ;)
masak whoz op? 11:46
viklund yep, busy writing manuscript and polishing data for that
masak manuscript? for a blockbuster movie?
viklund no, research
masak ah.
that was my second guess.
viklund :)
also, I'm trying to figure out how to annotate ~20 genomes in parallel without getting confused 11:47
masak wow.
moritz_ don't do it; the human mind can only handle two tasks in parallel, at most :-)
viklund yes, it's exciting
11:48 lest_away is now known as lestrrat
viklund moritz_: but perl can handle more ;) 11:48
moritz_ sometimes I have doubts about that too :-)
masak if the limit is two tasks for the human mind, then clearly the solution is a bifurcating recursive algorithm of some sort. :)
'do half #1 here' -- 'meanwhile, do half #2 here'. 11:49
moritz_ funny thing is, I was writing about a bifurcating recursive algorithm earlier (not perl relasted) :-)
viklund sounds good, but I also want to use all of my shiny 8 virtual cpus...
moritz_ fork!
masak viklund: just recurse three times! :) 11:50
viklund: let me try to guess your true purpose in coming here: you're wondering about the release date of Rakudo Star, yes? :)
viklund I discovered POE::Wheel::Run a few weeks ago, it's wonderful for keeping track of stuff 11:51
masak: curiously not
masak then I'm out of guesses.
viklund mainly I just realised that I haven't been running the irssi binary for a while and figured it needed some excersize 11:52
11:52 mariano__ joined
viklund (and it's always so nice in here) 11:52
tarde is the time-travelling debugger right? 11:53
masak tardis. yes. 11:54
viklund how's that comming along, I see some gist-pastes now and then
masak snarkyboojum and I are conspiring around that one.
viklund subscribes to masaks gists...
masak :) 11:55
work has been focusing on its dependency, Yapsi, lately.
Yapsi is a Perl 6 compiler-and-runtime written in Perl 6.
tardis uses the runtime of Yapsi to run the debugged program. 11:56
viklund is Yapsi an acronym?
masak Yet Another Perl Six Implementation.
it's pronounced "YAPC" :P 11:57
viklund nice ;)
so, when is Rakudo* ready (for production)?
moritz_ when it's done :-)
masak looks like Rakudo * will be released later in Q2. 11:58
moritz_ like, June
masak aye.
we need those two months.
moritz_: when's the hard deadline on the book?
masak forgets
moritz_ masak: soon[tm]
masak panics 11:59
moritz_ like, two weeks before the R* releae or so
masak thing is, I'd like to add a chapter on named enums with my poker hand example.
but we don't even have named enums back yet... :(
12:00 agentzh left
viklund is the book readable somewhere? 12:00
masak viklund: github.com/perl6/book
viklund ty
masak viklund: look under Downloads for PDFs.
viklund but it's PseudoPod right? 12:01
masak aye :)
viklund++ # built-in PseudoPod parser
12:01 SmokeMachine joined
viklund with exercises! 12:02
masak a colleague said to me once, "it's frightening, but nowadays when I read \infty, I actually see a ∞ symbol..." :)
moritz_ it's quite similar here :-)
viklund looks like a nice book 12:04
masak aye. but not finished yet.
viklund will it be published as in printed?
moritz_ yes
by onyx neon press 12:05
viklund print on demand?
jnthn plans to do more $book-writing at the weekend
masak jnthn++ # will try to get inspired to do the same
viklund ahh, the publisher is driven by perl people 12:07
masak it's a conspiracy!
moritz_ last week I submitted a few patches to Pod::PseudoPod::LaTeX to render most of the book correctly
viklund takes out his tinfoil hat
masak moritz_++ 12:08
viklund I've been checking out chromatics++ Moder Perl Book from time to time as well. It looks really nice as well
(as well)
masak it does. 12:09
I'm reading new chapters as they come online nowadays too.
he writes clearly and to the point about things generally considered non-trivial. 12:10
the latest highlight was the sentence "Closures are an easy, effective, and safe way to make data persistent between function invocations without using global variables."
I had never really expressed that thought to myself, but it's a really nice way to put it. 12:11
viklund yes, it is 12:12
moritz_ the second solution is to use objects
masak he then goes on to describe the new C<state> keyword in Perl 5.10, as well as the corresponding now-deprecated hack involving 'if 0'.
moritz_ which is why languages that offer either one but not the other always feel clumsy to me
12:12 mls left
masak moritz_: if you use both objects and closures at the same time, do you get more than if you just use one of those? 12:13
I mean practically. theoretically, you don't since they're basically isomorphic.
moritz_ masak: sometimes some of them feel clumsy 12:14
masak true.
they might each be geared for certain uses.
moritz_ for example if you need to construct an object just have something on which a callback can work
closures make callback interfaces very intuitive
masak *cough* Java *cough* 12:15
12:16 renormalist left, szabgab joined 12:17 renormalist joined
moritz_ and for example event driven systems just need lots of callbacks 12:18
jnthn masak: I was writing some code in Java the other day and realized that it would have been so much cleaner - and far less bug-prone - if I'd had constructs like map and grep to hand.
moritz_ otoh if you have no object, you have to keep a variable for each attribute - which can be a whole lot
moritz_ wonders if closures and currying are isomorphic 12:19
probably not
tpf|Coke perlmonks-- # I want a "read entire thread" option. :| 12:21
moritz_ tpf|Coke: can't you set the depth threadshold to 50 or so?
jnthn moritz_: Well, if you seperate each parameter into a level of closure or so.
dalek ok: 6fabc2f | masak++ | src/preface.pod:
[preface] fixed grammaro
12:26
12:27 pmurias joined, IllvilJa left, szabgab left 12:30 szabgab joined
mdxi pmichaud++ # belatedly reading yesterday's blog entry 12:32
masak it's making the rounds on Twitter now. much thanks to audreyt++'s tweet about it.
tpf|Coke moritz_: oh sure, if I create an account. =-)
dalek ok: b41705f | masak++ | src/preface.pod:
[preface] slight rephrasings
moritz_ tpf|Coke: that's what perlmonks wants to encourage :-) 12:34
pmichaud good morning, #perl6 12:35
m6locks good afternoon
moritz_ good now :-) 12:36
std: now
p6eval std 30455: OUTPUT«ok 00:01 109m␤»
masak good std ok now. 12:37
pmurias diakopter: i made parenthesis with an if optional in perlesque 12:38
12:41 proller_ joined 12:42 proller left
pmichaud 10:08 <sorear> no, perl 6 is created by *terrifyingly* hopeless dreamers who /are going to succeed/ 12:42
I think this is my new favorite quote. :-)
jnthn morning, Pm
moritz_: Confirm that I do appear to have broken that parameterized type test. :| 12:43
Not sure quite how I managed to miss the failure in the spectest results. :-/ 12:44
masak pmichaud: if we repeat it often and earnestly enough, maybe it'll work like Inigo Montoya's catchphrase. :)
dalek ok: 23285cb | masak++ | src/preface.pod:
[preface] various further small file

  - removed trailing slash in perl.org/
  - 'the compiler' sounds strange after explaining that there are several
   Perl 6 implementations. changed to 'Perl 6 compilers'
pmichaud "Hello! My name is Patrick Michaud. You killed my grammar engine. Prepare to die()."
masak *LOL*
frettled :D 12:47
12:49 orafu left 12:50 orafu joined 12:54 riffraff left
mdxi Simple. You keep saying things are simple. I don't think that word means what you think it means. 12:58
12:59 rurban left
moritz_ "your value of "simple" must be something different than my "simple"." 12:59
13:00 rurban joined 13:02 cognominal joined 13:03 rgrau_ left, ruoso joined
viklund no, now it's time to go and bring $daughter home from the day care-center 13:04
masak viklund: nice seeing you here! o/ 13:05
viklund you too
moritz_ will be forcefully logged out of his $work machine in about 25 minutes 13:06
13:06 viklund left 13:07 proller joined, proller_ left
tpf|Coke moritz_: ? 13:14
13:14 tpf|Coke is now known as Coke, Coke is now known as parrot|Coke
moritz_ server shutdown due to power interruptions 13:15
building maintenance and stuff
13:18 Guest13068 left
bbkr what is the syntax to get hash slice in P6? thre are only array slices explained in S09 13:21
masak %hash<a b c>
moritz_ or %hash{$value1, $value2}
jnthn rakudo: my %h = a => 4, b => 2; say %h<a b>
p6eval rakudo 6783b5: OUTPUT«42␤»
moritz_ just like any other hash access, really :-) 13:22
masak rakudo: my %h; %h<a b> = 4, 2; say %h.perl
p6eval rakudo 6783b5: OUTPUT«{"a" => 4, "b" => 2}␤»
masak \o/
jnthn++
that didn't work a week ago!
moritz_ neither did rvalue hash slices :-)
masak I'll need to de-workaround GGE a tad.
jnthn masak: I accidentally the patch.
masak :) 13:23
bbkr hash slice notation does not work on $/ object 13:24
rakudo: "ab" ~~ /$<a>=[.]$<b>=[.]/; say $/{"a", "b"}; # is this a bug?
p6eval rakudo 6783b5: OUTPUT«Null PMC access in invoke()␤current instr.: '!postcircumfix:<{ }>' pc 13978 (src/builtins/Code.pir:39)␤»
moritz_ yes
(and reported)
bbkr thanks :)
13:24 JimmyZ joined
dalek ok: e325b80 | masak++ | src/basics.pod:
[basics] rw review
13:25
moritz_ it's a manifestationo of the "$/ is not a Perl 6 Match object"
pmichaud: speaking of which, have reached a conclusion yet where the array creation code for Match objects should go?
13:26 plobsing joined
masak rakudo: module Foo {}; Foo:: 13:34
p6eval rakudo 6783b5: OUTPUT«Could not find sub &Foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
masak sub?
jnthn I expect we just toss the trailing :: 13:35
(In fact, I know full well that we do.)
13:36 Trey joined 13:40 rgrau` joined
masak rakudo: sub foo(*@a) { @a[+0] }; foo() 13:42
p6eval rakudo 6783b5: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are:␤:(Mu : Int $i;; *%_)␤:(Mu : Block $b;; *%_)␤:(Mu : !whatever_dispatch_helper ;; *%_)␤␤current instr.: '!postcircumfix:<[ ]>' pc 10885 (src/builtins/Role.pir:73)␤»
masak did we reach a consensus on what to do with this one? 13:43
the first candidate should accept a Num, no?
(which gets coerced to an Int) 13:44
jnthn masak: I still have some planned changes to postcircumfix:<[ ]> handling to do.
I think that will resolve these issues.
colomon Isn't this another bug, though?
jnthn It's a bug for sure.
13:44 uniejo left
masak jnthn: sounds good. 13:44
jnthn I think we've ticketed it alreayd.
masak colomon: it's the same bug, with a SMA error message :)
colomon I mean, usually when I get this message it doesn't have anything to do with missing the Num version. 13:45
it has something to do with the array being not right in the head.
masak the previous error message was 'cannot do substr on empty string', which was sort of a meta-error caused by producing the real error message.
colomon rakudo: my @a = 1..10; say @a[5/4]
p6eval rakudo 6783b5: OUTPUT«2␤»
colomon rakudo: my @a = 1..10; say @a[5/4.Num] 13:46
p6eval rakudo 6783b5: OUTPUT«2␤»
masak colomon: how is it that those work, though?
that's the real mystery.
colomon ah, so maybe it's backwards. good point.
btw, it should take a Real, not a Num. ;) 13:47
jnthn: btw, it's not just parameterized-type.t. S09-typed-arrays/hashes.t and S12-attributes/instance.t are also failing. (That's on a pristine copy rather than my hacked up one.) 13:48
hmmm... appears we have postcircumfix:<[ ]> all over the place. :( 13:51
Seq implements one in PIR which appears to take an Integer, could that help explain the issue? 13:52
moritz_ sounds wrongish 13:54
13:56 IllvilJa joined
colomon probably should table worrying about it until after the Next Great List Reworking, which is hopefully coming this weekend.... 13:56
masak colomon: ah. Real. I confess I do not yet feel at home with the current Numology typology. 13:57
need to study it a bit more, I guess.
colomon rakudo: my @a = 1..10; say @a.Seq[5/4.Num] 13:59
p6eval rakudo 6783b5: OUTPUT«2␤»
colomon Yeah, I'll bet what we're seeing is under some conditions the Seq version is factored in, and in others it isn't. 14:00
14:03 araujo left, araujo joined 14:05 dual left
JimmyZ rakudo: my $a = time; (1,1,*+* ... *).batch(28).perl.say; my $b = time; say $b - $a; # sounds like it's faster than parrot's fib.pir? 14:10
p6eval rakudo 6783b5: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811)␤0.284433126449585␤»
bbkr rakudo: /./.^methods>>.say; # it crashes after printing few methods
p6eval rakudo 6783b5: OUTPUT«ACCEPTS␤assuming␤unwrap␤wrap␤ACCEPTS␤count␤arity␤multi␤name␤clone␤signature␤perl␤returns␤do␤of␤assuming␤callwith␤Str␤new␤Method 'say' not found for invocant of class 'Perl6MultiSub'␤current instr.: '!dispatch_method_parallel' pc 359 (src/glue/dispatch.pir:72)␤»
bbkr just like that. a bug?
masak I think that's a new one. 14:11
bbkr++
bbkr :)
masak bbkr: for real code, try not to combine >>. with .say :)
it probably does not do what you want.
14:14 rv2733 joined
JimmyZ rakudo: my $a = time; (time - $a).say; my $b = time; ($b-$a).say; # masak: Is it right? 14:14
p6eval rakudo 6783b5: OUTPUT«1272031144.30542␤0.0101950168609619␤» 14:15
JimmyZ rakudo: my $a = time; (time() - $a).say;
p6eval rakudo 6783b5: OUTPUT«0.000250816345214844␤»
JimmyZ rakudo: my $a = time; (time - $a).say;
p6eval rakudo 6783b5: OUTPUT«1272031175.83554␤»
JimmyZ rakudo: my $a = time; $a.say; (time - $a).say;
p6eval rakudo 6783b5: OUTPUT«1272031190.14766␤1272031190.16179␤»
moritz_ rakudo: my $a = time; $a.say; (time() - $a).say
p6eval rakudo 6783b5: OUTPUT«1272031201.50384␤0.0233659744262695␤»
moritz_ std: time foo 14:16
p6eval std 30455: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'foo' used at line 1␤Check failed␤FAILED 00:01 109m␤»
moritz_ std.pm also parses time as a listop
std: now foo
p6eval std 30455: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/QfohncpfHx line 1:␤------> now ⏏foo␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 107m␤»
JimmyZ rakudo: my $a = time; $a.say; (now - $a).say;
p6eval rakudo 6783b5: OUTPUT«1272031256.10522␤Could not find sub &now␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
JimmyZ rakudo: my $a = time; $a.say; (say - $a).say; 14:17
p6eval rakudo 6783b5: OUTPUT«1272031277.17861␤-1272031277.17861␤1␤»
JimmyZ rakudo: my $a = time; $a.say; (time - $a).say;
p6eval rakudo 6783b5: OUTPUT«1272031301.95485␤1272031301.96016␤»
masak JimmyZ: it parses as 'time (-$a)'
moritz_ masak: without space :-) 14:18
masak and, I think, rightly so.
moritz_ rakudo: time(1, 2, 3)
masak moritz_: oops :)
p6eval rakudo 6783b5: ( no output )
JimmyZ rakudo: my $a = time; $a.say; ((time) - $a).say;
p6eval rakudo 6783b5: OUTPUT«1272031360.14588␤0.00917196273803711␤»
JimmyZ rakudo: my $a = time; $a.say; (time -$a).say;
p6eval rakudo 6783b5: OUTPUT«1272031375.1296␤1272031375.13471␤»
JimmyZ rakudo: my $a = time; $a.say; (time-$a).say;
p6eval rakudo 6783b5: OUTPUT«1272031378.99329␤0.00481796264648438␤»
JimmyZ confused syntax 14:19
masak indeed.
but quite consistent.
JimmyZ Is it a bug? 14:20
masak no.
but a likely trap for the unwary.
14:20 am0c left
JimmyZ Then it'll confuse many people, I guess. 14:21
the newbie. 14:22
cotto_work moritz_, thanks.
masak well, the whole "let's turn the following subs into terms so that their odd behaviour won't bite people" thing is quite un-Perl6y and indicative of a sore design spot, I think.
it's sort of the opposite of a sweet spot: no matter how you solve it, not everyone will be pleased. 14:23
moritz_ a bit like smart-matching against Bool
masak yes. 14:24
sometimes corner cases form that cannot be resolved nicely.
they might still be 'worth it', though. either that, or there's some wonderful generalization that we haven't noticed yet. :) 14:25
JimmyZ space decide action?
er, decides
moritz_ yes 14:26
masak: in 2025, perl best practices will recommend you write (foo) for calling something which might be nullary function or a term 14:27
masak yuck.
JimmyZ rakudo: sub b{ 100; }; say time - b;
p6eval rakudo 6783b5: OUTPUT«1272031915.06749␤»
JimmyZ rakudo: sub b{ 100; }; $my say b - 2; 14:28
p6eval rakudo 6783b5: OUTPUT«Confused at line 11, near "$my say b "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
JimmyZ rakudo: sub b{ 100; }; say b - 2;
p6eval rakudo 6783b5: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤current instr.: 'b' pc 201 (EVAL_1:79)␤»
JimmyZ rakudo: sub b{ 100; }; my $c = 2; say b - $c;
p6eval rakudo 6783b5: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤current instr.: 'b' pc 229 (EVAL_1:88)␤»
masak JimmyZ: 'b - $c' means 'b(-$c)' 14:29
JimmyZ rakudo: sub b{ 100; }; my $c = 2; say say - $c;
moritz_ thinks that was mentioned before
p6eval rakudo 6783b5: OUTPUT«-2␤1␤» 14:30
masak conceives of a warning "you seem to be using this prefix:<-> as if it were an infix:<->. please reconsider"
sundar this looks like a case of a common thing being not-easy, imho. 14:32
moritz_ that's what we've been discussing 8 minutes ago, yes 14:33
masak sundar: it's more a case of Perl 6 being all "screw this. let's parse things in one simple way, with no exceptions"
JimmyZ wonders why perl 5 doesn't. 14:34
moritz_ JimmyZ: perl 5 screws up in different ways 14:35
JimmyZ: print (4 + 5) * 3;
JimmyZ: most people expect that to print 27 - it prints 9
masak moritz_++
moritz_ because it's parsed as ( print(4 + 5) ) * 3
masak yes, that's one big thing that led to the current parsing decisions, I guess. 14:36
bad thing is, it's a rule you have to learn in order to get things right. good thing is, it's pervasive for everything in Perl 6.
moritz_ many perl regulars hate the notion of whitespace affecting parsing. But newcomers expect it to DWTM
masak so you learn it once and apply it everywhere.
JimmyZ 'print time - $a' and 'print time-$a' are the same.
moritz_ and your point is...? 14:37
JimmyZ rakudo: say 5 - 3; 14:38
p6eval rakudo 6783b5: OUTPUT«2␤»
moritz_ rakudo: say -3
p6eval rakudo 6783b5: OUTPUT«-3␤»
moritz_ both do what I mean
great, no?
JimmyZ yes
14:39 mariano__ left
moritz_ you can't have <listop> <prefix><term> working in one case and not in another 14:39
masak question is, why doesn't &time complain when it gets >0 arguments?
moritz_ so it's a tradeoff
masak: bug, I'd say
masak submits rakudobug
JimmyZ rakudo: my $a = time; (1,1,*+* ... *).batch(28).perl.say; my $b = time; say $b - $a; # sounds like it's faster than parrot's fib.pir? I'm curious
p6eval rakudo 6783b5: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811)␤0.205471992492676␤»
masak after it's fixed, at least JimmyZ and the likes of him will get a runtime error.
[particle] masak: i wonder if your irc client could be configured to submit a bug when you type that... 14:40
14:40 justatheory joined
masak [particle]: what makes you think it doesn't? :P 14:40
dalek ok: da67c46 | smash++ | src/ (4 files):
Several small fixes.
sundar masak: yes, unless the function in question optionally accepts arguments too!
masak [particle]: actually, I've come to the (somewhat hubristic) conclusion that the task is not automatable.
[particle] sure it is! for the rest of us.... 14:41
:P
masak sundar: that's why you need to actually learn the actual rule... :)
pmichaud www.perlmonks.org/?node_id=836533 14:42
masak that's a lovely list.
[particle] how long are your cuffs, pmichaud? 14:43
JimmyZ Yeah, I runtime error is ok for me, at least it is not strange
[particle] wow, that's a long list.
pmichaud [particle]: I write in a small font. 14:44
colomon the perl 6 advent calendar link is wrong. :(
pmichaud actually, that's a short list.
colomon perl6advent.wordpress.com/
pmichaud colomon++ # fixed 14:45
(well, as soon as perlmonks updates)
I didn't include a lot of the individual blog postings from use.perl or other sources
masak should do more things like the "3D, baby!" post 14:46
cheap tricks with visually appealing results.
colomon masak++ 14:48
moritz_ rakudo: say 1 ~~ Real 14:49
p6eval rakudo 6783b5: OUTPUT«1␤» 14:50
moritz_ rakudo: say 1.1 ~~ Real
p6eval rakudo 6783b5: OUTPUT«1␤»
moritz_ rakudo: say 1e1 ~~ Real
jnthn rakudo: say "bacon" ~~ Real
p6eval rakudo 6783b5: OUTPUT«1␤»
rakudo 6783b5: OUTPUT«0␤»
moritz_ colomon++
jnthn bacon isn't real?!
moritz_ imaginary bacon!
masak or surreal bacon...
pmichaud lots of bacon these days is Artificial. :-)
colomon bacon is definitely complex.
masak .oO( hypercomplex bacon o.O ) 14:51
cognominal surreal bacon? 14:52
dalek ok: 24ca22d | moritz++ | src/multi-dispatch.pod:
[mmd] now that we have Real, there is no need for separate Num and Int candidates
masak cognominal: en.wikipedia.org/wiki/Surreal_number
cognominal oops, already done by masak...
masak oh, you wasn't wondering what it was... :)
cognominal :) 14:53
14:54 mariano__ joined
bbkr rakudo: class class { }; # reported in 67784 14:54
p6eval rakudo 6783b5: ( no output )
moritz_ rakudo: class class { }; class.new.perl.say
p6eval rakudo 6783b5: OUTPUT«Malformed package declaration at line 11, near ".new.perl."␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
bbkr rakudo: class class { }; class class{}; # but it warns on 2nd declaration :)
p6eval rakudo 6783b5: OUTPUT«Illegal redeclaration of symbol 'class'␤current instr.: 'perl6;Perl6;Grammar;_block249' pc 40603 (src/gen/perl6-grammar.pir:346)␤» 14:55
masak right. it's just the mention of it after declaration that doesn't work. 14:57
bbkr so is "class" legal class name?
moritz_ std: class class { }; class.new.perl.say 14:58
p6eval std 30455: OUTPUT«ok 00:01 109m␤»
moritz_ yes.
rakudo: my @scores = 'Ana' => 8, 'Dave' => 6, 'Charlie' => 4, 'Beth' => 4; 14:59
p6eval rakudo 6783b5: ( no output )
masak if it's an unused identifier, it's a legal class name.
bbkr then rt.perl.org/rt3/Ticket/Display.html?id=67784 can be closed i think
masak no, it still gives the same type of error. 15:00
moritz_ just not at the time of declaration
but later on
masak no, it did that before too.
only the error is different now than it was in alpha.
bbkr ok 15:01
masak so nothing has changed, really. only the wording of the error message.
15:01 steinberg joined
masak std: class class {}; say class.new.perl 15:01
p6eval std 30455: OUTPUT«ok 00:01 109m␤»
masak see? :)
moritz_ found a very weird bug 15:02
rakudo: printf 'foobar'
p6eval rakudo 6783b5: OUTPUT«foobar»
moritz_ rakudo: printf '%- 8%s', 'XXX', 'bla 15:03
p6eval rakudo 6783b5: OUTPUT«Confused at line 11, near "printf '%-"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ rakudo: printf '%- 8%s', 'XXX', 'bla'
p6eval rakudo 6783b5: ( no output )
bbkr masak: I see :) sorry
masak bbkr: no problem. :) better luck next time.
moritz_ rakudo: printf '%- 8%s' ~ "\n", 'XXX', 'bla' 15:04
p6eval rakudo 6783b5: ( no output )
masak what's weird is that it doesn't print anything.
moritz_ right
it doesn't like the format string
with good reason, I might add
masak submits rakudobug 15:05
moritz_ but then it should please die() or fail() or interpret it literally
15:05 nihiliad joined, JimmyZ left
masak I've experienced &say do the same lately, I think. but only on the evalbot. 15:05
this, however, occurs locally too.
moritz_ locally is how I found it 15:06
rakudo: for 1, 2 { printf '%- 8%s', 1, 2; say "alive" }; say "alive2"
p6eval rakudo 6783b5: OUTPUT«alive␤alive␤alive2␤»
moritz_ rakudo: for 1, 2 {say printf '%- 8%s', 1, 2; };
p6eval rakudo 6783b5: ( no output )
moritz_ now not even the say() produces a newline 15:07
bbkr rakudo: say 1/0; say "Alive"; say (1/0).Num # rt.perl.org/rt3/Ticket/Display.html?id=68960 looks like fixed now, Rat() returns Inf
p6eval rakudo 6783b5: OUTPUT«Inf␤Alive␤Inf␤»
moritz_ aye 15:08
just needs testing
masak maybe assign it to moritz_, then?
moritz_ oh, actually it has tests alrready, in S32-num/rat.t 15:09
masak bbkr: do you have privs to close tickets?
15:10 alester joined
bbkr no, i'm just visiting RT to learn some cool P6 usage for golfing :) and sometimes i hit something that is fixed. 15:11
masak closes the ticket 15:12
bbkr: seems we could eliminate a step in this process by giving you privs :)
moritz_ also closed it 15:13
OH NOEZ, we haz closing race!
masak I actually noticed before pushing submit :)
moritz_++ # fast
bbkr masak: sure. my account on RT is "bbkr" (i will ask here every time before i close ticket anyway). 15:15
masak bbkr: I think pmichaud has the meta-privs to give you privs. 15:16
dalek ok: c8aefbb | moritz++ | src/operators.pod:
[ops] working code, screen output
ok: 39769b6 | moritz++ | src/multi-dispatch.pod:
[mmd] number of type checks is implementation dependent
masak phenny: tell pmichaud that I think bbkr could use rw access to RT. he says he's in there anyway looking for golfed Perl 6, and sometimes he stumbles on fixed things and brings them to the channel. :) 15:17
phenny masak: I'll pass that on when pmichaud is around.
bbkr thanks :)
15:17 JimmyZ joined
masak bbkr++ # -Ofun 15:17
15:23 molaf joined
parrot|Coke I also have privs on RT, btw. I think. 15:27
leftover from languages/rakudo days.
dalek ok: 62090c3 | smash++ | src/multi-dispatch.pod:
[mmd] subtype checks blocks number of executed times is implementation specific
15:28
parrot|Coke masak, bbkr - try now? 15:31
bbkr i have Take/Resolve options now, thanks 15:32
moritz_ rakudo: class A is Hash { }; my $x = A.new; $x<foo> = 'bar'; say $x.keys
masak \o/ parrot|Coke++
p6eval rakudo 6783b5: OUTPUT«foo␤»
parrot|Coke just coke is fine. =-)
15:35 Sanitoeter left
[particle] parrot|Coke++ # better nick 15:36
parrot|Coke sure, rakudoGSOCTPFParrot|particle++ 15:37
15:40 Sanitoeter joined, molaf_ joined
sundar I remember someone had the problem of make-ing rakudo taking hours. It's happening to me now, is there a workaround? 15:40
masak there was a time when I had to ulimit -v, but I don't anymore. 15:41
moritz_ sundar: are you building latest rakudo?
15:41 molaf left
sundar yes, after a fresh git pull and configure with gen-parrot 15:42
I'm running it in an ubuntu VM inside Vista, in case it matters... 15:43
moritz_ how much memory is available inside the vm?
sundar 512MB 15:45
moritz_ that might be a wee bit tight
sundar Ok, would 1G be enough? or how much would you recommend? 15:46
moritz_ I know that building rakudo stays below 1G these days
don't know how much the rest of your system needs
1.5G should be fairly safe
bbkr rakudo: #=======␤#=======␤use v6; 15:47
p6eval rakudo 6783b5: ( no output )
bbkr cool, so rt.perl.org/rt3/Ticket/Display.html?id=70752 is also solved, right?
moritz_ bbkr: yes, just needs tests
bbkr: either write a test, or just assign the ticket to me 15:48
(Basics -> owner)
sundar moritz_: thanks...
15:48 jonrafkind joined
moritz_ (but writing tests is preferred, of course :) 15:49
15:49 jonrafkind left, jonrafkind joined
bbkr tests are in PUGS repo? 15:50
moritz_ yes
do you have commit acces to it?
bbkr ok, i have a commit bit there.
moritz_ great
[particle] sundar: after you build rakudo, you can lower the vm memory back down to 512mb 15:58
moritz_ ...unless you want to test rakudo 15:59
[particle] ha, fair point.
k23z__ masak, I read the backlog saw yesterday you mentioned surreal numbers
masak, I actually read very closely a paper on them and stood with pencil and paper near to follow all the proofs 16:00
masak, Knuth has a book on them and Harry Gonshor has a more axiomatic book out on them(which I haven't been able to get)
masak, in any case I saw some Haskell people implement them
16:00 jaldhar left
k23z__ I'm curious if they could be implemented in Perl6(we'd need infinite lists for that) 16:00
and a symbolic computation package 16:01
moritz_ we have inifite lists
(though some operations are a bit painful on them)
bbkr moritz_: test for rt.perl.org/rt3/Ticket/Display.html?id=70752 should be put in t/spec/S02-whitespace_and_comments/comments.t ?
k23z__ moritz_, example please ? 16:02
cognominal rakudo: sub saiz { sub saizz { say "hi" }; saizz() } saiz()
p6eval rakudo 6783b5: OUTPUT«Confused at line 11, near "sub saiz {"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ bbkr: yes... but rakudo currently doesn't run that test file
[particle] painful operations on infinite lists... like sort?
moritz_ k23z__: iterating with 'for'
map works, though 16:03
k23z__ moritz_, what's the problem iterating it with for ?
moritz_ k23z__: it's eager
k23z__ for is eager to have all elements ?
is that what you mean ?
moritz_ yes 16:04
k23z__ can the interpreter detect that the infinite list is a "special data structure" and behave differently ?
moritz_ that's not the fix that for needs 16:05
16:05 proller left
k23z__ what would fix it then ? 16:05
16:05 proller joined
moritz_ making it lazy, and implementing sink context 16:06
16:06 nihiliad left, nihiliad joined
jnthn for really should just use map. 16:08
moritz_ but it can't, until we get sink context.
masak would 'next' and 'last' work in map as they do in for? 16:11
what about 'redo'?
colomon masak: yes
but they don't work there now.
moritz_ phenny: tell pmichaud that I've pushed branches called 'mob2' to both nqp-rx and rakudo -- real integration isn't possible until rakudo builds again on parrot HEAD
phenny moritz_: I'll pass that on when pmichaud is around.
masak colomon: explain the semantics of a 'redo' in map for me.
s/for/to/
moritz_ "same as in for" 16:12
masak right, so it re-starts the block.
I get that.
what about the effect on the resulting list?
colomon doesn't understand how redo works in for...
masak 'same as in map' :P 16:13
moritz_ masak: the instance of the block that called redo() doesn't contribute to the result list
colomon moritz_: same is true of next?
masak moritz_: oh, ok.
moritz_ colomon: not sure if next() would return an empty parcel 16:14
s/return/insert/
masak doesn't next take a value which becomes the return value of the block?
masak STR reading that
colomon so you can say next $a; ?
interesting.
masak &?BLOCK.next($retval); 16:15
S04:342
[particle] unlike perl 5, for and foreach are not synonyms in perl 6. now, for and map are synonymous. 16:17
uggh.
pugssvn r30456 | masak++ | [S03] corrected typo
masak [particle]: mostly, it seems, because for has become like map, not the other way around.
[particle]: and they're still quite different syntactically. 16:18
[particle] aye, you'll prefer one over the other simply because you're thinking functionally or procedurally 16:19
masak that's about it, yes. 16:20
I've been known sometimes to abuse map as if it were for. 16:21
JimmyZ Good night, #perl6 16:22
Good night, #perl6 16:23
16:23 JimmyZ left
masak JimmyZ: 'night 16:23
16:23 bradb joined
masak 晚安 16:23
16:26 cdarroch joined, cdarroch left, cdarroch joined
lisppaste3 bbkr pasted "mortiz - please validate my test" at paste.lisp.org/display/98205 16:37
bbkr moritz* sorry about name-typo
moritz_ bbkr: looks good 16:39
pugssvn r30457 | bbkr++ | test against rt.perl.org/rt3/Ticket/Display.html?id=70752 bug 16:40
16:41 jaldhar joined 16:42 sundar left 16:49 jaldhar left 16:53 jaldhar joined
pmichaud www.perlmonks.org/?node_id=836564 16:54
phenny pmichaud: 15:17Z <masak> tell pmichaud that I think bbkr could use rw access to RT. he says he's in there anyway looking for golfed Perl 6, and sometimes he stumbles on fixed things and brings them to the channel. :)
pmichaud: 16:11Z <moritz_> tell pmichaud that I've pushed branches called 'mob2' to both nqp-rx and rakudo -- real integration isn't possible until rakudo builds again on parrot HEAD
masak pmichaud: parrot|Coke++ already fixed that. 16:55
pmichaud masak: the bbkr access?
masak aye
16:55 dakkar left
pmichaud okay, thanks. Coke++ 16:55
masak wow, perlmonks *is* slow.
dalek ok: 470ed50 | masak++ | src/operators.pod:
[operators] rw review
16:57
16:58 japhb left
bbkr rakudo: say "3".Num; # rt.perl.org/rt3/Ticket/Display.html?id=67050 also solved? 16:59
p6eval rakudo 6783b5: OUTPUT«3␤»
moritz_ bbkr: yes. And sufficiently tested already 17:00
rakudo: say "3".Numeric # according to latest spec 17:01
p6eval rakudo 6783b5: OUTPUT«3␤»
bbkr rakudo: say (+"3").WHAT
p6eval rakudo 6783b5: OUTPUT«Num()␤»
masak pmichaud++ # '*I* have an apple pie' 17:02
bbkr should i close it?
cognominal rakudo: class A { my $a="hi"; method a { say $a } }; A.new.a(); 17:03
p6eval rakudo 6783b5: OUTPUT«hi␤»
cognominal so, that's the substitue for private class variable? 17:04
17:05 jaldhar left
cognominal too bad there is not a twigil when using them 17:05
17:05 jaldhar joined 17:07 XaeroOne joined 17:12 envi^home left
colomon rakudo: say ('a'..'f').rotate 17:15
p6eval rakudo 6783b5: OUTPUT«Method 'rotate' not found for invocant of class 'Range'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
cognominal I could see a inverted exclamation marjkfor a my class variable twigil ¡
colomon rakudo: say ('a'..'f').Seq.rotate
p6eval rakudo 6783b5: OUTPUT«bcdefa␤»
cognominal And a degree ° for a our class variable twigil.
colomon rakudo: say ('a'..'f').Seq[1..*] 17:16
cognominal It would be a good parallel to the . and ! twigils for the instance variables
p6eval rakudo 6783b5: ( no output )
colomon rakudo: say ('a'..'f').Array[1..*]
p6eval rakudo 6783b5: OUTPUT«Method 'Array' not found for invocant of class 'Range'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
17:16 brrant joined
colomon rakudo: say ('a'..'f').Seq.Array[1..*] 17:17
p6eval rakudo 6783b5: OUTPUT«Method 'Array' not found for invocant of class 'Seq'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
cognominal I am sure someone will find a use for a ¿ twigil :)
parrot|Coke rakudo: say ([\+]<112 -3 -4 -6 5 -7 20 -17 -57 0>)>>.chr 17:18
[particle] for spanish-language optional-named variables?
p6eval rakudo 6783b5: OUTPUT«pmichaud++␤»
parrot|Coke whee.
colomon parrot|Coke++
I'm impressed that it worked even though you handed it string versions of the numbers. :) 17:19
cognominal WHOA THERE : en.wikipedia.org/wiki/Interrobang 17:20
WTF‽
colomon rakudo: say "pmichaud++".split>>.ord
p6eval rakudo 6783b5: OUTPUT«No applicable candidates found to dispatch to for 'split'. Available candidates are:␤:(Mu : Regex $matcher, Any $limit = { ... }, Any :all($all);; *%_)␤:(Mu : Any $delimiter, Any $limit = { ... }, Any :all($all);; *%_)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon rakudo: say "pmichaud++".comb>>.ord
p6eval rakudo 6783b5: OUTPUT«11210910599104971171004343␤»
colomon rakudo: say [\-] ("pmichaud++".comb>>.ord) # don't think this is right, but... 17:21
p6eval rakudo 6783b5: OUTPUT«1123-102-201-305-402-519-619-662-705␤»
17:22 ShaneC1 joined 17:25 pausenclown joined
bbkr what does .WALK method do? cannot find it in S* 17:25
moritz_ S12 17:26
colomon rakudo: my ($first, @rest) = ("pmichaud++".comb>>.ord); say @rest;
p6eval rakudo 6783b5: OUTPUT«109 105 99 104 97 117 100 43 43␤»
masak S12:872, even.
17:26 iblechbot left
moritz_ colomon: you're such a hilight spammer :-) 17:27
colomon blame parrot|Coke, I'm just trying to reverse engineer his brilliance. 17:28
;)
parrot|Coke yah, I hand rolled that. I'd like to see a one liner to create it, though. keep trying. =-) 17:29
masak food &
17:30 masak left, eternaleye left
colomon somebody else should take it up, I need to $work. 17:31
moritz_ my $i = 0; for 'pmic'.comb».org { say $_ - $i; $i = $_ } 17:33
rakudo: my $i = 0; for 'pmic'.comb».org { say $_ - $i; $i = $_ }
p6eval rakudo 6783b5: OUTPUT«Method 'org' not found for invocant of class 'Str'␤current instr.: '!dispatch_method_parallel' pc 359 (src/glue/dispatch.pir:72)␤»
moritz_ rakudo: my $i = 0; for 'pmic'.comb».ord { say $_ - $i; $i = $_ }
p6eval rakudo 6783b5: OUTPUT«112␤-3␤-4␤-6␤»
moritz_ that recreates the numbers
colomon moritz_++
moritz_ and boring, I know
pausenclown spot the error: 17:35
enum Foo <<0x1 0x2 0x4 0x8 0x16 0x32>>;
colomon rakudo: my $i = 0; my @a = gather for 'pmic'.comb».ord { take $_ - $i; $i = $_ }; say @a.perl
p6eval rakudo 6783b5: OUTPUT«[112, -3, -4, -6]␤»
moritz_ p6eval: you're using weird names for your enum values :-) 17:36
erm, I meant pausenclown
parrot|Coke moritz_, colomon: well that would have simplified things. =-) 17:38
pausenclown i actually meant using 0x16 instead 0xA but yeah, that too
17:38 japhb joined, smash_ left
moritz_ that said, named enums are NYI in master 17:38
17:38 Sanitoeter left 17:39 jaldhar left 17:40 jaldhar joined, Sanitoeter joined 17:41 supernovus joined
bbkr rakudo: my @t = 1, 2; say @t[0..*]; 17:41
p6eval rakudo 6783b5: ( no output )
bbkr oops :) 17:42
diakopter heh
colomon rakudo: my @t = 1, 2; say @t[0..1]; 17:43
p6eval rakudo 6783b5: OUTPUT«12␤»
colomon rakudo: my @t = 1, 2; say @t[0..10];
p6eval rakudo 6783b5: OUTPUT«12␤»
parrot|Coke that looks like a bug to me. izzit?
jnthn rakudo: my @t = 1, 2; say @t[0..10].elems;
p6eval rakudo 6783b5: OUTPUT«11␤»
diakopter itza feature!
colomon parrot|Coke: what? 17:44
bbkr timeout / OOM error? looks like it is trying to build infinite 0..* array without checking if it makes sense.
colomon bbkr: right. for sure your example is a bug.
17:45 jaldhar left, _jaldhar joined
parrot|Coke I would expect 0..* to show everything it had. no? 17:45
colomon parrot|Coke: That's my expectation as well. 17:46
17:46 _jaldhar left
parrot|Coke \o/ 17:46
17:46 _jaldhar joined
bbkr colomon: something similar was discussed here: rt.perl.org/rt3/Ticket/Display.html?id=64566 and it "almost" worked back then :) 17:46
colomon what about @t[0..10] ? Should it work like @t[0..*] on a two-element array, or complain because you've explicitly specified a value past the end? 17:47
bbkr it's in S09: As the end-point of a range, a lone "whatever" means "to the maximum specified index
TimToady any range that goes over the end is considered okay 17:48
colomon TimToady: Thanks!
17:50 _jaldhar left, _jaldhar joined
colomon is utterly mystified by the wide assortment of postcircumfix:<[ ]> methods in Rakudo.... 17:54
17:55 stephenlb joined 17:56 _jaldhar left, _jaldhar joined, supernovus left
bbkr rakudo: enum X <x>; say x; 17:57
p6eval rakudo 6783b5: OUTPUT«Could not find sub &x␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
moritz_ named enums are NYI
bbkr thanks
18:01 _jaldhar left
bbkr rakudo: class A {}; A::B.parse(""); # i see nice message instead of NULL PCM access, so i think rt.perl.org/rt3/Ticket/Display.html?id=63460 is fixed 18:01
p6eval rakudo 6783b5: OUTPUT«Can not find sub A::B␤current instr.: 'perl6;Perl6Exception;throw' pc 14877 (src/builtins/Seq.pir:28)␤»
jnthn oh wow, another ticket about that bug?! 18:03
jnthn htought he'd found them all
bbkr although test can be corrected, because now it says '# TODO: Check for a good error message, not just the absence of a bad one'. can regexp for rakudo error message be placed in PUGS repo?
jnthn If I had a bottle of beer for every ticket about that issue... :-)
parrot|Coke when you say a rakudo error message... do you mean a parrot one? 18:05
I would say if it's a Null PMC access, no.
Khisanth you would be dying from alcohol poisoning?
jnthn Khisanth: Well, I'd not drink them all at once... :p 18:06
bbkr: A test for "Null PMC Access" not being givne is probably bad. A test that the error message does indeed contain A::B, otoh, is good. 18:07
18:08 _jaldhar joined
bbkr yes, that's what i have in mind. but i don't know how to extract this error message. $@ obviously is not in use in P6 anymore. 18:10
18:12 _jaldhar left 18:15 _jaldhar joined 18:18 dKingston joined, rv2733 left
jnthn $! 18:21
18:27 _jaldhar left
sjn pmichaud++ # good anti-FUD writeups 18:29
18:31 _jaldhar joined
TimToady at some point it may become a waste of time, especially if the real goal of any of the A. Monks is to waste our time. 18:33
but it's valuable for the other people who aren't in that category, so far 18:34
18:34 meppl left
sjn well, at least the discussion is public, so we can refer to it later 18:34
TimToady and hopefully our hints will help other folks step up to the plate
cognominal difficult to win against the omnipresent ominous anonymous... 18:35
the proof of the cake will be in the eating. I am hungry :)
TimToady At some point you just have to classify some people as the illigitimi that you are non carborundum.
cognominal TimToady++
sjn think it would be worse to let that FUD-sillyness go unanswered, so I'm very happy to see pmichaud++, chromatic++, TimToady++ and others give good and thoughtful answers 18:36
TimToady in balance, it's a good thing to do periodically
18:37 jonathansizz joined
TimToady s/illigitimi/illegitimi/ 18:37
sjn nothing says "there might be something good going on there" as a bunch of people passionately talking about it :)
18:38 bbkr left
TimToady depends on the "it", which varies... 18:38
sjn and the type of passion :-P 18:39
TimToady progress also requires some dispassion :)
sjn strives to be passionately dispassional :) 18:41
TimToady The community needs various kinds of folks, some choleric, some sanguine, some melancholy, and some phlegmatic. And people who can interpret these groups to each other. 18:43
cognominal as says the wikipedia about the Christ's passion : "The etymological origins of the word lie in the Greek verb paschō, to suffer"
18:45 dual joined
diakopter yes, but the english 'suffer' was used in the same gospels to mean "permit"/"allow" 18:45
TimToady well, in Elizabethan English
diakopter s/but//
TimToady I believe the wikipedia is written in Modern English 18:46
diakopter sometimes.
TimToady which is kinda like Modern Perl
18:46 _jaldhar left, XaeroOne left
cognominal I am not sure the wikipedia is always very strict. 18:47
diakopter pain must be either tolerated as bad or embraced
18:47 jonathansizz left
cognominal ORIGIN Middle English : from Anglo-Norman French suffrir, from Latin sufferre, from sub- ‘from below’ + ferre ‘to bear.’ 18:47
diakopter origin !implies usage 18:48
cognominal interesting to see that these words have evolved similarly in French and English 18:49
TimToady yes, that's known as the etymological fallacy
18:49 _jaldhar joined
TimToady another fallacy is assuming that the fuzzy meaning of a word in one language matches the fuzz in a different language 18:49
cognominal passion interpreted in a more a positive way, and suffering in more negative one.
TimToady we also mustn't read newer meanings back into old usages 18:50
something which is a technical term now wasn't necessarily a technical term then 18:51
if someone talks about junctions in Perl in 1995, they don't mean what we mean now 18:52
diakopter it's hard to be dispassionate sometimes, and it's hard to be passionate sometimes
TimToady it's just hard most of the time, which is why everyone has to pace themselves if they don't want to burn out
some people choose to burn out, especially if they see that they can make more progress and then hand their "church" off to the care of others. 18:53
in that sense, I choose to be less of a messianic figure, and more of a ground-of-all-being figure :) 18:54
cognominal well, suffering (sic) eczema, the burnout is built-in in me, etymologically speaking.
18:56 _jaldhar left, molaf_ left
diakopter some burnouts are flameouts from lack of fuel; some burnouts are extinguishments from lack of catalyst 18:56
18:58 _jaldhar joined
TimToady and some people are naturally hares rather than tortoises 18:58
cognominal rakudo: say Mu.WHAT 19:00
p6eval rakudo 6783b5: OUTPUT«Mu()␤»
cognominal what are the point of the parentheses?
rakudo: say Mu.WHAT.perl
p6eval rakudo 6783b5: OUTPUT«Mu␤»
diakopter rakudo: say Mu.WHAT.perl.WHICH 19:01
p6eval rakudo 6783b5: OUTPUT«Mu␤»
diakopter Mu is an interesting memory offset
moritz_ uhm
TimToady the idea is to indicate undefinedness somehow, especially if the string pops out where you weren't expecting it 19:02
moritz_ you asked a string
not Mu
TimToady we've considered other mechanisms besides ()
cognominal rakudo: say Mu.WHICH
p6eval rakudo 6783b5: OUTPUT«34631008␤»
TimToady inverse-video, blinking would also work :)
M͟u 19:05
cognominal :) 19:06
19:06 patspam joined
TimToady M͞u 19:06
19:09 jonathansizz joined
parrot|Coke rakud: say Mu.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT 19:09
rakudo: say Mu.WHAT.WHAT.WHAT.WHAT.WHAT.WHAT 19:10
p6eval rakudo 6783b5: OUTPUT«Mu()␤»
parrot|Coke wonders if rakud means anything.
jnthn It means that you failed to type an "o".
pausenclown does someone here know this book: oreilly.com/catalog/9781934356456 ?
jnthn git pull's the days changes
19:11 SmokeMachine left
TimToady std: subset M͞u of Mu; say M͞u; 19:11
p6eval std 30457: OUTPUT«ok 00:01 109m␤»
TimToady rakudo: subset M͞u of Mu; say M͞u; 19:12
19:12 ive joined
p6eval rakudo 6783b5: OUTPUT«Confused at line 11, near "subset M\u035eu"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤» 19:12
cognominal pausenclown, the reviews seem god on amazon
parrot|Coke subset 7 of 9.
19:12 _jaldhar left 19:13 _jaldhar joined
TimToady pugs: subset M͞u of Mu; say M͞u; 19:13
p6eval pugs: OUTPUT«*** No such subroutine: "&M\205\158u"␤ at /tmp/ZKz8JTggEZ line 1, column 23-26␤»
jnthn rakudo: subset M͞u of Mu where 1; say M͞u;
p6eval rakudo 6783b5: OUTPUT«Confused at line 11, near "subset M\u035eu"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jnthn :-/
omg...what has that char done do my terminal...
19:14 jonathansizz left, _jaldhar left, _jaldhar joined
cognominal works for me on xchat 19:15
diakopter pausenclown: it's almost entirely centered on ANTLR 19:18
pausenclown: it should be titled Language Implementation Patterns using ANTLR
cognominal oops, pauseclown, the book uses java for the examples...
more and more, I think the motto for Perl 6 could be "Syntax matters!" 19:19
moritz_ likes it
pmichaud
.oO(To which a common response would be.. "So why did you $*!#$ it up?"
cognominal It is probably obvious to anyone who groks Perl but it seems that the idea is lost on the rest of the world. 19:20
diakopter pmichaud: lolz at your pun
Juerd cognominal: One problem with "syntax matters" is that it could be conceived as a noun. 19:21
19:22 _jaldhar left
cognominal I don't mind. 19:22
19:25 _jaldhar joined 19:28 _jaldhar left, _jaldhar joined, baest left 19:29 steinberg left, am0c joined
cognominal I did not know about antlr but I suppose that to implement it in Perl 6 would be a worthwhile exercise. 19:29
TimToady std: subset 無 of Mu; say 無; 19:30
p6eval std 30457: OUTPUT«ok 00:01 109m␤»
TimToady rakudo: subset 無 of Mu; say 無;
p6eval rakudo 6783b5: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 343828 (src/gen/core.pir:18677)␤»
TimToady rakudo: subset 無 of Any where $_ === Mu; say 無; 19:31
p6eval rakudo 6783b5: OUTPUT«Any()␤»
TimToady rakudo: subset 無 of Mu where 1; say 無;
p6eval rakudo 6783b5: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 343828 (src/gen/core.pir:18677)␤»
19:32 jonathansizz joined
TimToady rakudo: class 無 is Mu {...}; say 無; 19:32
p6eval rakudo 6783b5: ( no output )
TimToady rakudo: class 無 is Mu {...}; say 無.perl;
p6eval rakudo 6783b5: OUTPUT«undef␤»
TimToady hmm
pmichaud looks like a fossil to me. 19:33
TimToady rakudo: constant 無 = Mu; say 無; 19:34
p6eval rakudo 6783b5: OUTPUT«Could not find sub &無␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady lunch & 19:35
19:36 SmokeMachine joined 19:44 _jaldhar left, _jaldhar joined
sorear (backlog) oh dear. I guess we need lots of hands on the book, huh, if it's to go from 50 pages to a proper book in (soon) 19:48
19:48 Sanitoeter left
sorear moritz_: Closures are implemented using currying in many compilers, look up the "lambda lifting" transform. Currying is defined in terms of closures. 19:49
moritz_ sorear: thanks 19:50
19:50 _jaldhar left 19:52 Sanitoeter joined 19:54 _jaldhar joined 19:58 jaldhar_ joined 19:59 _jaldhar left
sorear you know, perl 6 is dense enough and has enough entropy that automated fuzz testing might actually work pretty well for finding rakudobugs... 20:02
generate random 20 character sequences and feed them into rakudo 20:03
20:03 M_o_C joined
sorear check for Parrot error messages 20:03
moritz_ sorear: you would find too many bugs that way :-)
20:04 Spreadsheet_ joined
sorear *caught up* 20:06
20:10 jaldhar_ left 20:11 ShaneC1 left 20:13 ShaneC1 joined, jaldhar_ joined 20:15 jonathansizz left, alester left 20:19 brrant left 20:21 alester joined, Coleoid joined 20:27 gurjeet joined
gurjeet buubot: karma gurjeet 20:27
buubot gurjeet: gurjeet has karma of
diakopter gurjeet++ 20:28
20:28 hghgd_ joined
gurjeet diakopter: When does one get karma? 20:29
diakopter buubot: karma gurjeet++
buubot diakopter: gurjeet++ has karma of
sorear buubot: karma c
buubot sorear: c has karma of 2845
moritz_ buubot: karma c++ 20:30
buubot moritz_: c++ has karma of -5
diakopter buubot: karma C
buubot diakopter: C has karma of 2846
diakopter heh
20:30 hghgd left, cdarroch left
sorear why did we get rid of lambdabot 20:30
moritz_ because it was very annoying 20:31
pmichaud its noise was far greater than its signal
20:32 brrant joined
sorear wonders how much of that was his fault 20:32
moritz_ not much
mostly people copying stuff from the REPL
or daring to talk about arrays that begin with an @ 20:33
jnthn is happy it's gone too
pmichaud: You still planning to look at array/listy bits at the weekend? 20:34
sorear asks as a former major architect thereof
Spreadsheet_ buubot: karma spreadsheet
buubot Spreadsheet_: spreadsheet has karma of
pmichaud jnthn: yes, unless my attention is needed to get it running with parrot trunk
jnthn pmichaud: OK. One thing that I was planning to but didn't get to... 20:35
pmichaud: postcircumfix:<{ }> and postcircumfix:<[ ]> now work differently.
20:35 cdarroch joined, cdarroch left, cdarroch joined
pmichaud okay, I can check to see what unifications are needed. 20:35
jnthn pmichaud: The first is how I think it's meant to be.
pmichaud the list stuff is likely to touch upon them anyway.
jnthn I didn't get around to getting the latter into that state.
Basically though...
@a[1,2,3] 20:36
This passes one argument to postcircumfix:<[ ]>
%h{'a','b'} had the same issue, but I fixed it when doing hash slices.
Fixing it for arrays means that the multi dispatch sigs call out rather better.
(As we now have for hash indexing.) 20:37
pmichaud well, we also have to be able to handle the case of @a[1,2,3;4,5,6]
sorear What does that mean?
pmichaud so in some ways I was also looking into the possibility that top-level args would be semi-separated.
jnthn AFAICT (but I'm happy to be proven wrong), that's more about the signature really wanting to be **@args rather than *@args 20:38
pmichaud jnthn: that's possible, yes.
jnthn That is, we unpack in slice mode, not flattening.
pmichaud since slice mode postdates my thinking on the topic
I'll look at hash slicing and see if I agree or disagree, though. 20:39
jnthn The problem with passing just one thing is that it gets in the way of having one candidate that's essentially the "coerce this to an Int and index" 20:40
Or in the case of the hash, "just use this to index with"
Thus, afaik, is why we have weird bugs sometimes with indexing.
pmichaud it's not precisely that, I don't think.
jnthn There may be more to it. 20:41
Anyway, my feeling is that we probably want to go the way of each index working like an argument.
pmichaud the problem that I see with postcircumfix:<{ }> as it sits now is that it doesn't seem to have any provision for handling Whatever closures. 20:42
jnthn I'd need to check what Whatever closures in a postcircumfix:<{ }> mean.
S09?
pmichaud which granted, don't necessarily make sense in the context of .{ }, but .[ ] certainly has to be able to handle them, which is partially why there's a difference.
actually, I suspect whatever inside of .{ } acts like $.keys 20:43
jnthn Oh, for .[ ] certainly.
pmichaud for .{ } also
jnthn specref? 20:44
pmichaud %hash{ *.grep(/^a/) }
jnthn oh cute.
pmichaud beyond that, I'm not sure that a candidate of "coerce to Int and index" is in fact the correct behavior. 20:46
that said, I'll take a look at it soon, and I'll see if I can bias towards the multi-argument form for you.
having working slurpies helps (we also didn't have that working when I did postcircumfix:<[ ]> in ng) 20:47
jnthn pmichaud: ohbtw
pmichaud: I managed to write the postcircumfix:<{ }> in the setting... 20:48
pmichaud I see that.
jnthn I'm not sure how far you can get away with it for Positional. (more)
The thing that we didn't have before in alpha was the ability to augment a class and add a role to it at that point.
pmichaud also, Positional likely has to be a lot more aware of laziness.
jnthn So it may be possible to move Positional to the setting overall and then add it to things.
pmichaud Associative is never lazy, so that's much easier. 20:49
jnthn I'm also wondering more and more if @ will always end up meaning Positional or also Iterable too.
pmichaud oh, I'm thinking that Iterable does Positional
20:49 ive left
pmichaud more likely List gets involved here somewhere. 20:49
jnthn Well
You can always derive Positional semantics from something Iterable. 20:50
pmichaud right
jnthn To some degree.
*-1 gets interesting perhaps. :-)
pmichaud Anyway, the current factoring of Seq, Array, Positional, and Iterable is definitely Wrong.
I was working on it in Feb but got distracted.
sorear does this mean that if I lazily operate on all lines of a file, all lines of the file will be retained?
and constant-space lazy algorithms are forbidden? 20:51
pmichaud I have ideas as to what the correct factoring looks like -- basically Iterator ends up hiding out inside of List most of the time.
sorear: No.
jnthn pmichaud: The big problem we seem to hit alot right now is iterators leaking out
sorear butbut what if I call .[0] on my iterator at some point in the distant future?
pmichaud jnthn: right, that's what I was working on getting rid of in Feb.
jnthn It feels to me like things like map, gather, etc should hand back something that contains an iterator.
OK, +1
pmichaud jnthn: right, iterator ends up hiding inside of List most of the time. 20:52
jnthn Excellent.
pmichaud sorear: what I was working on in early march was the notion that lazy objects only start to remember values when they're bound to something.
jnthn That'll fix a lot of problems.
pmichaud so, if you have my @array = $file.slurp(); 20:53
[particle] even lazy objects are bound to remember something.
pmichaud [particle]: the differences is one of
for 1..100000000 { ... }
versus
my @a = 1..100000000; for @a { ... } 20:54
in the first case, as we lazily produce values, we want to throw them away.
in the second case, as we lazily produce values, we want them to be retained.
the logs from march show the much more complex examples (which I need to go and review) 20:55
diakopter std: for my @a = 1..100000000 { }
p6eval std 30457: OUTPUT«ok 00:01 108m␤»
pmichaud jnthn: anyway, my notion is that List is the thing that makes it possible for Iterator to act positional 20:56
and so map, gather, grep, etc return Lists, and the lazy parts of List objects hold the Iterator(s)
but unlike Seq, one can shift a List
and unlike Array, a List doesn't have to remember all of its earlier values
20:57 alester left
jnthn That sounds like it gets all the pieces. 20:57
pmichaud it's still tricky to get them to fit together. and when I last thought about it (which was in fact in early March from the hospital lounge in Houston), I decided it was a fairly significant change from what we have now. 20:58
but I'm also confident it can be done.
but the fact that binding may play a role is also why I wasn't entirely certain about binding implementation yet :) 20:59
we may need a mechanism to signal objects as to when they are being bound
jnthn Makes me glad that (other than the signatures bit) I didn't do anything on binding. :-) 21:00
pmichaud (which, come to think of it, might also have ramifications for the vivify discussion we had earlier :-)
jnthn Heh. I rather thing I should leave you to get lists done before doing WHENCE too then. :-)
(Which I wasn't planning to do this weekend anyway, fwiw.)
21:00 ReiniUrban joined
pmichaud actually, I think WHENCE may be a prerequisite 21:00
jnthn Ah. 21:01
pmichaud but I'll think about that also.
jnthn OK
I should be about a decent bit during the weekend.
pmichaud so, ask me on Monday for what I came up with, if I haven't described it by then :)
jnthn OK. :-)
Juerd pmichaud: Great post, on use Perl;
21:01 rurban left, ReiniUrban is now known as rurban
pmichaud Juerd: thank you 21:02
I had a lot of help with it here on #perl6
jnthn pmichaud: My plans for now are to further unbreak parametric roles and chase down more of our S12 bits that are still broken.
pmichaud jnthn: wfm
moritz_ collaborative editing :-)
jnthn pmichaud: Oh, one other thing you may know the answer to... 21:03
pmichaud my plans for the weekend are to think about lists and binding and iterators, and also to work out Rakudo Star descriptions and announcements
(at least drafts of them for others to start updating)
jnthn pmichaud: In .subst, how does $/ get set per invocation of the closure?
(we're getting it wrong atm)
pmichaud jnthn: iirc, it's a bit of behind-the-scenes magic for .subst .
jnthn well, s/does/should/
ah.
pmichaud TimToady and I discussed it sometime last year, I just need to look up the logs again to refresh my memory 21:04
I'm not sure it was entirely resolved at the time. It may have been the thing that resulted in 'lift' being added to the spec.
moritz_ isn't lookup for $/ inspecting the caller? 21:05
pmichaud no, $/ is lexical.
at least, in the general case it's lexical, iirc. 21:06
moritz_ swears violently
pmichaud it might be dynamic, though.
sorear $/ is automatically contextualized in every rakudo function
pmichaud yes, and the contextualization normally binds to OUTER::, not CALLER::
sorear the rakudo prologue contains my $/ = $CALLER::/
oh
pmichaud anyway, I don't remember off top of my head, but I'll look it up. 21:07
jnthn wtf, people are setting of fireworks in the pouring rain 21:09
*off 21:10
sorear will get blizkost iterators and get_exports working, then comes the /really fun part/
cognominal rakudo: my @a = < a b c >; my $a = @a; say $a.WHAT.perl; say @( $a ).perl; say $a; say @a.perl; say @a;
p6eval rakudo 6783b5: OUTPUT«Array␤["a", "b", "c"]␤a b c␤["a", "b", "c"]␤abc␤»
sorear that involves convincing Parrot to load more than one HLL into the same VM 21:11
which seems to not currently be possible
jnthn sorear: We've had that working at some point in the past.
sorear it may be a rakudobug, but the error message implies internal wrongness in parrotland
after that, I get to implement :from<> 21:12
then, we will have Blizkost Star, and I will move on to more interesting projects
parrot|Coke there is a trac about sorear's issue. I'm not sure it's a parrotbug, hard to test because rakudo --target=PIR doesn't generate runnable code. 21:13
that would help me track down that issue.
sorear we don't have a tracker for generic interaction bugs; I flipped a weighted coin to file it
if we were a more process-heavy community I would probably file a proxy ticket on rakudo 21:14
pmichaud sorear: technically I'd classify it as a rakudo bug for the moment.
At one time --target=pir couldn't work with rakudo because of the dynamic library loading, but that may have been fixed by now.
Also, I think there may already be a RT ticket for --target=pir.
(I know there was at one time, not sure if it was fixed/closed and now needs a new ticket.) 21:15
sorear rakdo --target=pir sounds awesome
I wonder if R* will be able to load installed programs *faster* than P5
pmichaud No. :-)
moritz_ lol
21:16 mariano__ left, Coleoid left
sorear I've got a 50,000 line Moose-based perl5 program which spends ~45 seconds in the compile phase each time I start that 21:16
jnthn thinks he may finally have cracked the somewhat tricky 68074
sorear just how slow is the Parrot PBC loader?
21:16 gurjeet left
pmichaud regardless, I'm sure that TT #1542 is going to get involved somewhere in the HLL stuff. 21:17
parrot|Coke sorear: relative to what?
jnthn In theory, the Parrot PBC loader should be using mmap on platforms that offer it. 21:18
pmichaud sorear: it's not just the time needed to load the .pbc, it's also (currently) the time needed to build tables and "compile-time" constract structures.
i.e., the time needed to invoke all of the :load subs in the .pbc
parrot|Coke ->
sorear parrot|Coke: relative to the 1,000 line per second load rate of Perl5/Moose on this machine
moritz_ has blogged: perlgeek.de/blog-en/perl-6/monetize-perl-6.html
parrot|Coke sorear: well if it's on your machine, you can easily run some timings. =-) 21:19
jnthn moritz_: heh, I like the sound of that...
jnthn reads
parrot|Coke afk&
sorear parrot|Coke: the question is highly hypothetical because I don't have a Perl6 port of any large Perl5 program lying around 21:20
parrot|Coke ok. then it sounds like your original question was merely a snipe at parrot. If you find something in particular that's unreasonably slow, by all means, let us know. 21:21
and now, really afk. back later.
sorear ...what?
pmichaud parrot|Coke: no, I think sorear's question was honest.
sorear I did not snipe anything 21:22
14:15 < sorear> rakdo --target=pir sounds awesome
14:15 < sorear> I wonder if R* will be able to load installed programs *faster* than P5
tell me how this is a snipe at Parrot
if anyone sniped, it was pmichaud
21:22 nihiliad left
jnthn rakudo: subset ohnoes of Mu; 21:22
pmichaud yes, I'll gladly take any blame 21:23
p6eval rakudo 6783b5: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 343828 (src/gen/core.pir:18677)␤»
jnthn can't find a ticket for that one
pmichaud I was just trying to give a sense of the current reality, no value judgement implied.
jnthn Though if anyone knows of it, please point it out.
moritz_ seems like adding a Mu in src/glue/subset.pm might fix it 21:24
jnthn moritz_: It does.
moritz_: I'm spectesting it now along with the patch for 68074
a moritzbug rather than a masakbug!
moritz_ and a particularly nasty one :-) 21:25
jnthn enjoys the variety :-)
Yes, it was quite a pain to fix!
sorear I'm sorry 21:26
I get defensive too easily
jnthn Now I need to also fix the other thingy I broke in parametric roles yesterday.
21:30 M_o_C left
jnthn The test file that 63346 relates to doesn't even exist any more, and it was kind of not a Rakudo bug anyway - any objections if I close it? 21:31
cognominal what is the mob2 branch? 21:32
moritz_ cognominal: match object generation refactor
cognominal: there's also a nqp-rx branch with the same name 21:34
cognominal ok
moritz_ cognominal: but since rakudo currently doesn't build on parrot HEAD, I can't easily integrate the two
cognominal just curious...
jnthn moritz_: Is that the main blocker atm? 21:35
moritz_ jnthn: that, and a thumbs-up from pmichaud++
pmichaud afk 21:36
jnthn OK
moritz_: Any chance you can glance at rt.perl.org/rt3/Ticket/Display.html?id=63458 ? 21:44
I think it's resolvable now.
(I get a "sub &a not found"
21:44 SmokeMachine left
jnthn But I can't equate the code and the ticket title. 21:44
moritz_ well, previously &a wouldn't die if there was no sub a in scope 21:46
so passing that undefined code object to the regex engine cause a NPCA
anyway, I think it's closable 21:47
jnthn moritz_: Want to do so, or should I assign to you for later/tests? 21:48
moritz_ took it
jnthn moritz_++ 21:49
moritz_ bed time here
good night
21:50 cberg joined
jnthn o/ 21:52
21:53 pausenclown left 21:57 cdarroch left 21:59 nihiliad joined
sorear oh look who'se the brilliant one... last week, I installed a Perl *compiled without embedding* 22:00
sorear tries to figure out how to run Blizkost against a non-default Perl
no luck, the blizkost build system inconsistently mixes default-Perl and configured-Perl files 22:02
more reason I want to kill that thing 22:03
22:09 ruoso left
parrot|Coke sorear: apologies for misunderstanding the tone. 22:15
sorear wholely accepted 22:16
jnthn std: role Foo[::T] { method bar(T $x) { } } 22:18
p6eval std 30457: OUTPUT«ok 00:01 111m␤»
jnthn std: role Foo[::T] { method bar(T $x) { } }; my T $x; 22:20
p6eval std 30457: OUTPUT«ok 00:01 110m␤»
jnthn Aha
TimToady: T leakage. 22:21
jnthn has just been fixing the same kinda issue in Rakudo
std: my T $x;
p6eval std 30457: OUTPUT«===SORRY!===␤In my declaration, typename 'T' must be predeclared (or marked as declarative with :: prefix) at /tmp/pbnA3miCUh line 1:␤------> my T⏏ $x;␤Malformed my at /tmp/pbnA3miCUh line 1:␤------> my T⏏ $x;␤ expecting
..an…
22:23 jaldhar_ left
sorear recompiles a better Perl 22:34
with -Dusemultiplicity 22:35
k23z__ who wants to talk to me on skype ?
I've bored
*I'm
22:42 Spreadsheet_ left
sjohnson rakudo: say 20 - 19.98 22:50
p6eval rakudo 6783b5: OUTPUT«0.02␤»
22:51 nihiliad left, nihiliad joined
sjohnson rakudo: my $a = 20 - 19.98; print $a 22:51
p6eval rakudo 6783b5: OUTPUT«0.02»
sjohnson rakudo: my $a = 20 - 19.98; sprintf("%08d", $a);
p6eval rakudo 6783b5: ( no output )
sjohnson rakudo: my $a = 20 - 19.98; sprintf("%.4f", $a); 22:52
p6eval rakudo 6783b5: ( no output )
sjohnson son of a
rakudo: my $a = 20 - 19.98; say sprintf("%.4f", $a);
p6eval rakudo 6783b5: OUTPUT«0.0200␤»
sjohnson well i'll be
jnthn sjohnson: missing noun?
:-)
sjohnson oopsies :)
jnthn sjohnson: printf actually prints
:) 22:53
sprintf formats the thingy into a string.
sjohnson rakudo: my $a; $a += 0.1 for ^10; if ($a != 1) { say "$a != 1 }
p6eval rakudo 6783b5: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
sjohnson rakudo: my $a; $a += 0.1 for ^10; if ($a != 1) { say "$a != 1" } 22:54
p6eval rakudo 6783b5: OUTPUT«1 != 1␤»
sjohnson rakudo: my $a; $a += 0.1 for ^10; if ($a != 1) { say $a }
p6eval rakudo 6783b5: OUTPUT«1␤»
sjohnson rakudo: my $a; $a += 0.1 for ^10; if ($a != 1) { say sprintf("%.4f", $a) } 22:55
p6eval rakudo 6783b5: OUTPUT«1.0000␤»
jnthn rakudo: my $a; $a += 0.1 for ^10; if ($a.Int != 1) { say $a }
p6eval rakudo 6783b5: OUTPUT«1␤»
jnthn rakudo: my $a; $a += 0.1 for ^10; say $a.Int
p6eval rakudo 6783b5: OUTPUT«0␤»
jnthn Oh.
sjohnson rakudo: my $a; $a += 0.1 for ^10; say $a.Round 22:56
p6eval rakudo 6783b5: OUTPUT«Method 'Round' not found for invocant of class 'Num'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson rakudo: my $a; $a += 0.1 for ^10; say $a.round
p6eval rakudo 6783b5: OUTPUT«1␤»
22:56 masak joined
masak ahoy, #perl6! 22:56
sjohnson yo masak
jnthn lolitsmasak! 22:57
sjohnson jnthn: i'm curious as to why the 20 - 19.98 showed an int-looking number, but not the ^10 for loop thingy
masak no snarkyboojum tonight. dang, I had this really neat commit I wanted to show him :)
jnthn masak: Aww.
You could show @other. :-)
masak locally, Yapsi now does blocks. :)
but I think I'll keep that commit local for a while longer, and try to make it work better. 22:58
somehow it does blocks without a stack right now. which is... bad. :)
jnthn oh don't say block, I've just been dealing with tricky bugs relating to such things :P
sjohnson rakudo: say 20.00 - 19.98
p6eval rakudo 6783b5: OUTPUT«0.02␤»
masak says 'block block block' :)
jnthn :P
sjohnson rakudo: my $a = 20.00; my $b = 19.98; say $a - $b; 22:59
p6eval rakudo 6783b5: OUTPUT«0.02␤»
masak after tonight's session, I feel we're over the hump for what I expected us to do this month with Yapsi.
jnthn \o/
masak i.e. not done yet, but mostly LHF left.
jnthn Well, Rakudo released yesterday, so our new hump is only just starting. :-)
masak (new humps)++ 23:00
dalek kudo: 7a1409b | jonathan++ | src/glue/subset.pm:
Fix subset types involving subset foo of Mu.
kudo: 2405a0b | jonathan++ | src/Perl6/Actions.pm:
Fix a tricky init ordering issue that meant we could not use where clauses in parametric role signatures.
kudo: a1159c7 | jonathan++ | src/Perl6/ (2 files):
Rework our handling of blocks and their interaction with packages somewhat. We were running into problems with parametric role signature variables ending up with the wrong scoping. This replaces the buggy fix I put in yesterday. We do diverge from STD, but STD gets this wrong also at the moment.
23:01 iblechbot joined
cberg \o/ #perl6 23:01
sjohnson rakudo: my $a = 20 - 19.98; $a.printf('%.30f') 23:02
p6eval rakudo 6783b5: OUTPUT«Method 'printf' not found for invocant of class 'Rat'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sjohnson rakudo: my $a = 20 - 19.98; say $a.sprintf('%.30f')
p6eval rakudo 6783b5: OUTPUT«0.02␤»
masak \o/ cberg
sjohnson how come this small example is vastly different from P5?
jnthn Hmm. Feels odd that .print is a method, .sprintf is a method and .printf is not.
masak sjohnson: looking for .fmt?
cberg I'm a long time lurker/irc-backlogger. I'd want very much to contribute to Rakudo * in any way I can.
masak jnthn: I'm surprised that even .sprintf is.
sjohnson masak: wondering why p5 says 0.0199999999999996 to the same simple math 23:03
masak jnthn: thought that's what .fmt did.
masak hits S32
sjohnson but not p6
jnthn cberg: hi, and nice of you to delurk. :-)
masak sjohnson: ever heard of floating-point arithmetic?
jnthn cberg: What are you interesting in working on?
sjohnson masak: yes, im wondering the difference between p5 and p6
sorear sjohnson: because p6 uses exact rational arithmatic when possible
sjohnson not why it's happening
jnthn There's plenty of ways to dig in. :-)
sorear rakudo: my $a = 20.Num - 19.98.Num; say $a.sprintf('%.30f') 23:04
p6eval rakudo 6783b5: OUTPUT«0.0199999999999996␤»
masak sjohnson: docs.sun.com/source/806-3568/ncg_goldberg.html
sorear forcing the use of machine numbers
cberg masak: I would be happy to write tests or attempt to take on any other task beneficial to the success of Perl 6.
sjohnson sorear: impressive. thank you. you know a lot about p6!
masak cberg: wow, that sounds great! 23:05
jnthn sjohnson: Basically, in Perl 6, 0.2 is stored as a numerator and dominator, and calcs are done on those. In Perl 5, it's a floating point number.
sjohnson: It's a change in order to try and help people doing e.g. currency calculations etc not have a fail. :-)
sjohnson: Writing scientific notation will force a floating point though.
sorear perl5: stefan@stefans:~$ perl -E 'use bigrat; printf "%.20f\n", 20.0 - 19.98'
0.02000000000000000042
sjohnson jnthn: it's definitely pretty cool... except that it doesn't do this sort of exact math when i did my += 0.1 for ^10 test
masak sjohnson: in short, every time you deal in tenths (or similar) and your programming language doesn't have something like Rat, you lose precision. it's inevitable, due to the way the numbers are stored.
sorear it still gets converted into an inaccurate machine number for printing, but you don't get the catestrophic cancellation 23:06
sjohnson sorear: maybe you know the answer :)
masak cberg: basically, you're your own boss. but if you want guidance or suggestions, feel free to ping any of us regulars.
sjohnson masak: i was dicking around with Clipper today, and it's mostly a currency-type business programming lang... so i was surprised it didnt have a handler for this stuff. basically i think you have to round() everytime you do currency math, or maybe there's another trick on that page you linked to me 23:07
jnthn sjohnson: I'm not sure, maybe it's a bug of some sort though.
sjohnson maybe TimToady can help 23:08
*puppy dog eyes*
sorear 0.1 is 0.0001100110011001100110011001100110011001100110011001... in binary
masak sjohnson: if you do currency, you shouldn't use floats IMO.
sorear machine floats on most current CPUs cut off at 52 significant figures
sjohnson would you use integers and have them 1995 == $19.95 book? or a string, of "19.95"
sorear the former 23:09
masak the decimals aren't real decimals, they're usually integral pennies or cents or whatever.
23:09 iblechbot left
sjohnson masak: you're starting to make "cents" 23:09
masak :P
sjohnson members.shaw.ca/smujohnson/snd/garlaff.mp3
23:10 orafu left, orafu joined
sjohnson sorear: do you also think, that perhaps perl6 should as well handle the 0.1 thing? 23:10
parrot|Coke TimToady++: very buddhist.
sjohnson considering it worked with the 19.98 one
jnthn cberg: If you're keen to work on tests, then there's a couple of places to find things that need doing.
cberg: One is the TODO file in the spectests directory. 23:11
sorear rakudo: my $a; $a += 0.1 for ^10; say $a.WHAT.perl;
jnthn cberg: The other is to look through things in the Rakudo RT ticket queue and write tests for those.
p6eval rakudo 6783b5: OUTPUT«Num␤»
sorear rakudo: my $a; $a += 0.1 for ^10; say 0.1.WHAT.perl;
p6eval rakudo 6783b5: OUTPUT«Rat␤»
jnthn sorear: Ah, that would seem to answer it.
sorear rakudo: my $a; $a += 0.1; say $a.WHAT.perl; 23:12
p6eval rakudo 6783b5: OUTPUT«Num␤»
sorear rakudo: say (Any() + 0.1).WHAT.perl;
p6eval rakudo 6783b5: OUTPUT«Could not find sub &Any␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: say (Any + 0.1).WHAT.perl;
jnthn rakudo: my $a = 0.0; $a += 0.1 for ^10; say $a.WHAT.perl;
p6eval rakudo 6783b5: OUTPUT«Num␤»
rakudo 6783b5: OUTPUT«Rat␤»
masak sjohnson: Perl 6 *does* handle the 0.1 thing. that's what Rat does.
sorear masak bot, we need you
cberg masak: Sounds great :) I'll take a look around github and see what tickles my interests.
sorear Any + 0.1 is a Num
bug
jnthn sorear: Interesting. :-/ 23:13
sorear: I know why it happens.
masak tries to get his bearings
jnthn Essentially we call back to Num if no candidates match.
Rat + Rat has a candidate
(other thing) + Rat doesn't
I guess we could go adding Any:U + Rat candidates.
But...hm. :-)
masak so the bug is that after the loop, $a is a Num and not a Rat? 23:14
jnthn masak: That's not the heart of it. 23:15
sorear masak: the bug is that adding a Rat to an Any protoobject gives a Num
cberg jnthn: Will look at TODO in spectests and the RT queue. Thanks.
masak rakudo: my $a; $a += 0.1; say $a.WHAT
p6eval rakudo 6783b5: OUTPUT«Num()␤»
sorear rakudo: my Rat $a; $a += 0.1; say $a.WHAT
p6eval rakudo 6783b5: OUTPUT«Type objects are abstract and have no attributes, but you tried to access ␤current instr.: 'perl6;Attribute;accessor_helper_ro' pc 3554 (src/gen/Attribute.pir:400)␤»
masak so that's the bug?
sorear yes
masak submits rakudobug
sorear my last version is probably also a bug
jnthn would be interested to hear the langauge design angle on how the bug should be fixed
I agree it's unintuitive. 23:16
sorear but a different one
jnthn But I'm not sure what the good fix is (other than loads of extra multi candidates).
masak jnthn: which one?
sjohnson masak == bug exerminator!
jnthn masak: The Any + 0.1 one.
sjohnson oops
sorear masak: the bug you're about to report
masak yes, but a confused one tonight, it seems.
ok.
if that's another bug... which was the first one? :/ 23:17
sorear Any + 0.1 is the first one
found by sjohnson++
masak aren't those the same?
sorear yes
pugssvn r30458 | jnthn++ | [t/spec] Unfudge some parametric roles tests for Rakudo.
sjohnson i can now say, i brought something to the perl6 table 23:18
sorear bug #1: Any + 0.1 gives a Num
bug #2: Num + 0.1 gives an error
er
Rat + 0.1
jnthn Rat + 0.1 should warn, but not die. 23:19
masak can you give an example of #2?
jnthn Probably.
sorear rakudo: my Rat $a; $a += 0.1 for ^10;
p6eval rakudo a1159c: OUTPUT«Type objects are abstract and have no attributes, but you tried to access ␤current instr.: 'perl6;Attribute;accessor_helper_ro' pc 3554 (src/gen/Attribute.pir:400)␤»
sorear += operators shouldn't even warn, I think
jnthn There's no += operator
It's sugar, and generated from the + and = operators. 23:20
masak ok. thanks.
jnthn rakudo: our class A {}
p6eval rakudo a1159c: ( no output )
jnthn rakudo: my class A {}
p6eval rakudo a1159c: OUTPUT«Can't handle scope declarator my on packages yet␤current instr.: 'perl6;Perl6;Compiler;Package;finish' pc 27412 (src/gen/parameter_pm.pir:613)␤»
sorear jnthn: that sounds extremely yucky in the presense of autovivication
23:20 nihiliad left
sorear jnthn: are you saying I should do %hash{$key} //= 0; %hash{$key} += $data; ? 23:21
because otherwise it will call Any + $data
jnthn I'm saying that I don't see how we can have:
my $x; $x = $x + Rat; # warn
my $x; $x += Rat; # not warn
sorear no, no 23:22
jnthn They can both not warn, or both warn.
sorear my $x; $x += 3; # not warn
jnthn erm
s/Rat/3/ # or something
jnthn writes again
sorear my Rat $x; $x += 3; # I want this to not warn
masak jnthn: I think those ought to work differently.
jnthn my $x; $x = $x + 42; # sounds like you want this to warn...
23:22 jlindsay joined, astrojp joined
masak yes. 23:22
sorear my Rat $x; $x = Rat + 3; # but it desugars to this
jnthn my $x; $x += 42; # and this not to
masak correct. 23:23
jnthn But they desugar to the same kinda thing.
sorear jnthn: no
masak jnthn: a lot of other things work like that.
already.
sorear *you* want it to warn
*I* want it to not warn
jnthn I don't give a damm if it warns or not.
sorear 16:19 <@jnthn> Rat + 0.1 should warn, but not die.
masak submits rakudobug for Rat + 0.1 dying 23:24
jnthn I'm saying that, as a person implementing this stuff, and so far as I understand how += is generated and what it's made up on, I can't at the moment see how you'd expect it not to work in a case when + would with the same operands.
masak alpha: my $a; $a = $a + 2
p6eval alpha 30e0ed: OUTPUT«Use of uninitialized value␤»
masak alpha: my $a; $a += 2
p6eval alpha 30e0ed: ( no output )
masak jnthn: see?
jnthn Yes, but alpha cheated on the meta-ops. 23:25
masak oh, come on!
jnthn It's easy if you're gonna cheat.
masak then cheat. please.
that's the correct behaviour.
jnthn Yes, but my question is, what's the mechanism that makes it warn or not warn.
masak if it's '+=', it doesn't warn.
or some other assignment metaop. 23:26
sorear All I want is for += to work correctly on autovivified objects.
jnthn masak: I understand the desired behavior.
sorear Because I DO NOT want to have to say %hash{$key} //= 0 before adding to accumulators.
masak jnthn: then I'll stop explaining it :)
jnthn If the answer is "the thingy that handles assignment meta-operators disables warnings through tweaking some context variable" that's fine. 23:27
I'm asking what the underlying mechanism is here.
sorear And I'm not going to invent one. We need to track down TimToady.
jnthn Which is the point I've been trying to make all along. It's not really my place to just come up with something either. :-) 23:28
sorear phenny: msg TimToady - How do undef warnings interact with autovivication? %hash{$key} += 1;
phenny: tell TimToady, How do undef warnings interact with autovivication? %hash{$key} += 1;
phenny sorear: I'll pass that on when TimToady is around.
masak jnthn: but seriously, surely one can detect whether the operator is an assignment metaop, and decide not to warn in that case?
23:28 masak` joined
pmichaud Thoughts on the name "Perl 6": www.perlmonks.org/?node_id=836626 23:29
23:29 masak left
jnthn masak`: Surely, my question is how should that look like. 23:29
23:30 masak` is now known as masak
masak waves hands about 23:30
pmichaud ...the metaop ought to autovivify the variable before it calls the underlying op.
that's what alpha did, iirc.
step 1: vivify the undef (according to the op)
step 2: call the op
step 3: store the resul
*result
besides, the metaop has to determine what value to use for the vivification before the underlying op is ever called 23:31
jnthn Phew, an implementation answer!
pmichaud because my $a; $a *= 2; has to vivify $a to a value of 1, not 0.
jnthn :-)
masak pmichaud++ # even I understood that!
pmichaud and clearly infix:<*>($x, $y) doesn't know that.
jnthn pmichaud++ 23:32
sjohnson does anyone have any opinions / thoughts on whether .printf should be a string method, as sprintf is?
pmichaud sjohnson: I'd guess IO method, myself.
sjohnson fwiw, i like the sprintf being a tring method call
jnthn I suspect if one is the other should be.
(And if one isn't the other shouldn't.)
pmichaud unless the invocant is a formatting string. 23:33
masak sjohnson: I think neither should be.
pmichaud which seems weird.
masak sjohnson: I think .fmt suffices most of the time.
pmichaud masak++
masak calling .printf and .sprintf on the value to print feels... odd.
sorear printf ought to be a global sub 23:34
masak rakudo: Rat + 0.1
p6eval rakudo a1159c: OUTPUT«Type objects are abstract and have no attributes, but you tried to access ␤current instr.: 'perl6;Attribute;accessor_helper_ro' pc 3554 (src/gen/Attribute.pir:400)␤»
sorear and by global I mean setting
jnthn attempts to bring back .WALK 23:41
sorear Isn't it still in S12?
pmichaud wonders about the flashing !WALK
sorear Why do private members use '!' instead of my?
jnthn Flashing during a WALK may get you arrested. 23:42
sorear: Yes, it is. I meant the implementation of. :-)
pmichaud "my" is for lexically scoped class variables, not instance variables.
'has' is for instance members.
23:59 cberg left
jnthn rakudo: say Any === Any 23:59
p6eval rakudo a1159c: OUTPUT«1␤»
jnthn rakudo: say Any <<===>> Any
p6eval rakudo a1159c: OUTPUT«1␤»