Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-09-30

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 pugs_svn r28509 | lwall++ | [viv] process alternate nibbler from regexen
00:07 crythias joined #perl6
00:07 diakopter ++TimToady
00:07 * diakopter prepares to lob more bugs over the wall
00:08 rhr_ joined #perl6
00:22 * TimToady hides in plain sight *poof*
00:26 pugs_svn r28510 | carlin++ | [S02-magicals/config.t] Add a test for $*OSVER.
00:28 pugs_svn r28511 | carlin++ | [S02-magicals/config.t] Wrong plan number. carlin--
00:28 rhr joined #perl6
00:36 mikehh rakudo (c8181aa) builds on parrot r41567 - make test / make spectest_smolder (up to r28509 -> #28343) PASS - Ubuntu 9.04 amd64
00:39 msmatsko joined #perl6
00:46 msmatsko joined #perl6
00:51 rhr_ joined #perl6
01:01 wayland joined #perl6
01:02 araujo joined #perl6
01:16 orafu joined #perl6
01:29 rhr joined #perl6
01:31 hudnix joined #perl6
01:37 nihiliad joined #perl6
01:40 rhr_ joined #perl6
01:41 crythias yeah, baby
01:43 solarion joined #perl6
01:54 __ash__ joined #perl6
02:30 pugs_svn r28512 | colomon++ | [docs/Perl6] postfix:<i> should return a Complex.
02:36 patspam joined #perl6
02:38 diakopter I'd be perfectly healthy if it weren't for this doggone hypochondria!
04:03 patspam joined #perl6
04:09 xinming joined #perl6
04:15 Caelum_ joined #perl6
04:17 jaldhar joined #perl6
04:53 PZt joined #perl6
05:12 quietfanatic joined #perl6
05:14 quietfanatic I am currently fighting an incorrugible bug whereby an auspiciously declared array becomes unwilling to store anything but Ints.
05:18 quietfanatic Caught it!
05:19 quietfanatic rakudo: our Int @A1; our @A2; @A2[0] = "Str"
05:19 p6eval rakudo c8181a: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (/tmp/mVjCqSxaqo:0)␤»
05:20 quietfanatic The first array being declared as Int messes with the second array as well.
05:23 quietfanatic rakudo: my Int $a; my $b; $b = "Str"
05:23 p6eval rakudo c8181a:  ( no output )
05:23 quietfanatic rakudo: my Int @a; my @b; @b[0] = "Str"
05:23 p6eval rakudo c8181a: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (/tmp/Nwq34ys7uq:0)␤»
05:23 quietfanatic rakudo: my Int %a; my %b; %b<a> = "Str"
05:23 p6eval rakudo c8181a:  ( no output )
05:25 quietfanatic I am submitting this.
05:34 patspam1 joined #perl6
06:01 Confield left #perl6
06:11 pugs_svn r28513 | lwall++ | [Cursor] de-dup importation code
06:11 pugs_svn r28513 | [STD etc.] id field now indirect to avoid string duplication
06:41 diakopter phenny: tell mberends I'll be offline-ish for a day or two...
06:41 phenny diakopter: I'll pass that on when mberends is around.
06:42 NorwayGeek joined #perl6
06:49 mberends joined #perl6
06:50 mberends thanks phenny, from the future ;)
06:50 phenny mberends: 06:41Z <diakopter> tell mberends I'll be offline-ish for a day or two...
06:52 mberends diakopter: np, I'm gonna try making a new fudging test harness, in Perl 5 for bootstrapping reasons (that almost came out botstrapping ;)
06:55 ihrd joined #perl6
06:55 ihrd left #perl6
06:56 barney joined #perl6
07:00 browser_zzz joined #perl6
07:04 envi^home joined #perl6
07:08 payload joined #perl6
07:09 iblechbot joined #perl6
07:14 rfordinal joined #perl6
07:21 NorwayGeek|Away joined #perl6
07:22 moritz_ rakudo: my $x = 2; $x **= 4; say $x
07:22 p6eval rakudo c8181a: OUTPUT«16␤»
07:31 mariuz joined #perl6
07:37 NorwayGeek joined #perl6
07:37 NorwayGeek|Away joined #perl6
07:48 ejs joined #perl6
07:51 mikehh rakudo (c8181aa) builds on parrot r41572 - make test / make spectest_smolder (up to r28513 -> #28357) PASS - Ubuntu 9.04 amd64
08:01 moritz_ rakudo: say "34".Num
08:01 p6eval rakudo c8181a: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤»
08:01 moritz_ ou.ch
08:02 athomason joined #perl6
08:03 meppl joined #perl6
08:08 moritz_ colomon: roots.t down to two failures (Inf and NaN related)
08:18 dukeleto joined #perl6
08:24 am0c joined #perl6
08:24 am0c OH HAI
08:25 moritz_ moin
08:36 Matt-W o/
08:42 moritz_ \o
08:43 am0c \o
08:51 moritz_ whoa, google tells me that my blog has 289 subscribers. It amazes me every time I find evidence that people read blogs, because I always though that most blogs were "write once, read never" or so :-)
08:51 frettled :)
08:52 frettled I think it's safest to write to them as if lots of people read them, but expect that there are none.  ;)
08:52 frettled Oh, I found a new use for Camelia, BTW - as (one of several) logos on a cycling team shirt. :D
08:53 moritz_ :-)
08:54 sjohnson hi to Matt-W , moritz_ , and frettled
08:54 sjohnson are you all still awake?  you guys must be in different parts of the world from me :)
08:54 Matt-W I'm awake
08:54 Matt-W it's 10am here
08:54 frettled nearly 11 here
08:56 frettled sjohnson: but yeah, 59°56′58″N 10°45′23″E
08:56 sjohnson are you guys in Europe?
08:57 sjohnson 2am here <--- Vancouver Canada timezone
08:57 frettled ah, waaaay south ;)
08:58 moritz_ Europe, yes
08:58 sjohnson does anyone here speak a nice sounding European language?
08:59 sjohnson ( `ー´)
08:59 moritz_ does German qualify as "nice sounding"? (probably not...)
08:59 moritz_ I learned a bit French in school, too
08:59 frettled Foreigners have been known to accuse Norwegians of «singing» our language, but I'm not sure I agree.
09:00 moritz_ frettled: in some sense I can agree with that, though I wouldn't call that an accusation
09:01 riffraff joined #perl6
09:02 huf judging by the reactions of americans, the only thing they hear out of hungarian speech are the 'r'-s
09:02 huf which probably disqualifies it as a nice sounding language for an anglophone
09:02 frettled what about Canadians?
09:03 huf never been to canadia
09:05 Matt-W I speak English with a southern accent
09:05 Matt-W That might be considered nice until you look into the grammar, English is a hideous mishmash really
09:05 Matt-W masak is Swedish, that's quite a nice-sounding language I think
09:05 Matt-W I also like German, but I'm odd like that (it's also the only other language I speak worth anything)
09:06 huf nah, english is a really nice sounding language
09:06 Matt-W English is a very versatile language
09:06 huf imho it has better flow and sounds nicer than my native language
09:06 Matt-W Probably because of its messiness
09:06 Matt-W I'm not familiar with Hungarian
09:07 huf you havent heard of "speak the hungarian rapper"?
09:08 huf anyway, sample of the language: http://www.youtube.com/watch?v=BDXyCUNczg0&amp;videos=Z3DOaoKDNKQ&amp;playnext_from=TL&amp;playnext=1
09:17 jaffa8 joined #perl6
09:23 pmurias joined #perl6
09:34 NorwayGeek joined #perl6
09:40 NorwayGeek joined #perl6
09:44 NorwayGeek joined #perl6
09:55 wayland76 Oi cn say things in good Strine :)
09:56 huf "strine"?
09:56 wayland76 http://www.abc.net.au/civics/globalcitizens/ozstrine.htm
09:56 huf ah.
09:58 wayland76 "Strine" is what it sounds like when an Australian says "Australian" with an Australian accent
09:58 wayland76 huf: nice sample.  I didn't watch all of it, but it sounded good :)
10:06 eiro joined #perl6
10:11 krunen joined #perl6
10:16 pmurias diakopter: hi
10:43 NorwayGeek joined #perl6
10:47 payload joined #perl6
10:50 rff joined #perl6
11:09 frettled wayland76: Bruce!
11:11 colomon moritz_: \o/   you didn't say roots.t had the only two failures left in our branch!!!!!  that's awesome!
11:18 frettled and grandsome!
11:18 frettled or was that grawsome?
11:19 wayland76 frettled: How are ya, Bruce?
11:20 wayland76 grandsome/grawsome I'm not familiar with, but I grew up with no TV
11:20 simcop2387 joined #perl6
11:27 frettled wayland76: just fine, mate!
11:27 frettled and you?
11:27 frettled «grandsome»/«grawsome» were suggestions for solving the «awesome»/«grand» problem
11:36 jaffa4 hi
11:37 jaffa4 tell me something that should be implemented for Perl 6.
11:38 masak joined #perl6
11:39 masak good day, temporal camels.
11:39 envi^home joined #perl6
11:42 moritz_ \o/
11:42 frettled masak: that's only temporary ;)
11:43 NorwayGeek joined #perl6
11:43 colomon rakudo: say (1i)i;
11:43 p6eval rakudo c8181a: OUTPUT«-1+0i␤»
11:44 moritz_ rakudo: say roots(Inf, 3)
11:44 p6eval rakudo c8181a: OUTPUT«InfNaNi-InfInfi-Inf-Infi␤»
11:44 frettled rakudo: say sqrt(-1);
11:44 p6eval rakudo c8181a: OUTPUT«NaN␤»
11:44 moritz_ that's just weird...
11:44 frettled rakudo: say sqrt(0i-1);
11:44 p6eval rakudo c8181a: OUTPUT«0+1i␤»
11:45 moritz_ I'd rather say we return 3 NaNs for roots(Inf, 3)
11:45 frettled moritz_: yeah, that one was cute
11:45 jaffa4 tell me something that should be implemented for Perl 6.
11:45 moritz_ jaffa4: feed operators
11:45 jaffa4 what is feed operator?
11:46 moritz_ search for ==> in the synopsis
11:47 colomon moritz_: I was just looking at the spec for postfix:<i>.  I fixed it to return a Complex (rather than Num) last night, but it also says it takes a Num, which is wrong too.
11:48 colomon moritz_: agreed wrt to roots(Inf, 3)
11:48 moritz_ colomon: according to our spec update from yesterday it should probably take a Numeric and return a Complex
11:48 colomon Numeric is a role which can include Complex?
11:48 moritz_ yes
11:49 moritz_ I highly recommend reading r28502
11:50 moritz_ we now have Numeric (Complex + Real), Real (Num, Rat, Int, ...)
11:53 colomon Heh.  So when do we start changing Rakudo to match?  ;)
11:53 moritz_ after the native-complex branch landed
11:54 pugs_svn r28514 | colomon++ | [docs/Perl6] postfix:<i> should take a Numeric.
11:54 jaffa4 moritz_, can you tell me another important thing to implement?
11:54 moritz_ jaffa4: macros
11:55 moritz_ jaffa4: string handling at various Unicode levels
11:55 iblechbot joined #perl6
11:57 jaffa4 moritz_, nothing is implemented for macros
11:57 nbrown04 joined #perl6
11:57 jaffa4 Do you say that nothing is implemented for macros?
11:57 moritz_ well, STD.pm surely contains some hooks
11:58 jaffa4 Are you replying me?
11:58 moritz_ yes
11:58 jaffa4 but I cannot use STD.pm
11:59 moritz_ jaffa4: what can you use?
11:59 jaffa4 If I am correct rakudo is based on something else.
11:59 moritz_ yes
11:59 moritz_ jaffa4: but that's the first time you mentioned rakudo
11:59 jaffa4 so what did you menition std.pm?
11:59 moritz_ jaffa4: other implementations use it already (mildew, sprixel)
11:59 moritz_ jaffa4: and you didn't ask about rakudo, specifically
12:00 jaffa4 i thought it was obvious.
12:00 moritz_ well, it wasn't, at least not to me
12:00 jaffa4 nothing else is in good state.
12:00 jaffa4 Or do you know otherwise?
12:00 moritz_ anyway, things that need implementing in rakudo: threads, native types, ... the ROADMAP if full of them
12:01 jaffa4 What is the state of other implementations?
12:01 moritz_ varying
12:02 jaffa4 Are they worst than rakudo?
12:03 mberends perl6: say "hello " x 3
12:03 moritz_ depends on your point of view
12:03 p6eval elf 28514, pugs, rakudo c8181a, sprixel 28513: OUTPUT«hello hello hello ␤»
12:03 mberends 4 implementations agree :)
12:03 moritz_ and I wouldn't call rakudo's state "bad"
12:04 jaffa4 I did not say bad.
12:04 moritz_ well, "worst" the superlative of "bad"
12:04 PZt joined #perl6
12:04 jaffa4 Are they worsethan rakudo?
12:04 masak jaffa4: you sometimes have a careless way of expressing yourself.
12:05 moritz_ jaffa4: since rakudo's state isn't bad, your question is based on a false assumption
12:05 masak jaffa4: I know you don't mean any harm, just that you have an infirm grasp of the language. but be a bit careful.
12:06 jaffa4 the question that are they worse than rakudo does not imply for me that rakudo is bad.
12:06 masak jaffa4: it's very easy to interact with people in here, by default. less easy if you piss them off.
12:06 NorwayGeek joined #perl6
12:06 moritz_ jaffa4: to me it sounds like it anyway
12:07 mberends jaffa4: you began by asking what needs to be implemented. Answer: lots. How would you be able to contribute?
12:07 jaffa4 I can do anything I want.
12:07 payload joined #perl6
12:08 mberends jaffa4: that's bold. Can you write in PIR?
12:08 jaffa4 at least the programming task required by rakudo I do not think they are beyond my abillities.
12:08 * moritz_ wishes he could do everything he wants, too
12:08 jaffa4 watch out, I corrected myself!
12:08 * masak wishes he had more tuits of clones
12:08 moritz_ jaffa4: then let me point you to docs/ROADMAP in the Rakudo repository, it's full of things that needs to be done
12:09 moritz_ and it also explains what needs to be done first, if applicable
12:10 jaffa4 mberends,I can write some PIR, yes
12:10 jaffa4 and I wrote a small compiler for PIR>
12:10 moritz_ though it's a tad outdated - for example (C) seems to be done already (at least mostly)
12:10 masak jaffa4: have you been using Rakudo some? I always maintain that it's a good way to get involved.
12:11 mberends jaffa4: If you could add the fork() function to Rakudo, I would be grateful. If you don't write it, pmichaud++ must do it, and we need his time for more important tasks.
12:11 moritz_ mberends++ # proposing small-scale, workable tasks
12:14 mberends be aware that Rakudo fork() relies on Parrot fork(), no idea of the status of that
12:14 moritz_ be aware that windows doesn't have a fork() system call
12:15 masak Matt-W: Swedish, a nice-sounding language? I wish I could step away from it enough to hear how it actually sounds. :P
12:15 moritz_ I have a completely unrelated question... when pmichaud and others talk about proto regexes, they seem to assume/imply/know/* that proto regexes will imply some significant speed gains
12:16 moritz_ it was never obvious to me. Why?
12:17 masak good question.
12:17 masak yes, I've been hearing that for over a year now.
12:18 masak let me have a guess at it: because they essentially turn the parsing at that particular place into one big jump table.
12:18 masak or something.
12:18 moritz_ but they don't, at least not in the general case
12:19 moritz_ well, maybe there are some clever optimizations that can exploit the fact that in STD.pm many proto regxes start with a constant rule
12:19 masak 'a constant rule'?
12:20 moritz_ one which matches a literal
12:20 moritz_ sorry, bad wording
12:20 * moritz_ would like to hire masak for line 182 of the ROADMAP
12:20 masak I think something like that might be used to optimize, yes.
12:20 masak I'm on it. :)
12:21 masak today I've been mulling over how best to make info leaflets for Web.pm so that people can get going quickly.
12:21 masak I want to be inspired by the info things for Chrome and Shoes. they're nice.
12:22 * moritz_ praises whiteknight++ for http://wknight8111.blogspot.com/2009/09/architect-model.html
12:24 ruoso joined #perl6
12:25 Matt-W masak: seemed like it to me. Sort of bubbly.
12:27 masak aye, we do a lot of stuff with phrase melody.
12:27 masak a way for Swedes to mock each other is to pretend that the other one speaks English that way, too. :)
12:28 Matt-W nothing much wrong with that
12:28 Matt-W the English is still intelligible
12:28 Matt-W I also quite like Swedish accents :)
12:29 masak .oO( bork, bork, bork )
12:29 frettled encheferize!
12:31 arthur-_ joined #perl6
12:35 NorwayGeek joined #perl6
12:40 masak whiteknight++ # really good post
12:41 mdxi here's my summation: "A software architect should be like Hari Seldon, except that they tell people what's going on now instead of making holo-recordings to be played after 10,000 years"
12:41 mdxi and yes. good post :)
12:45 NorwayGeek joined #perl6
13:00 masak rakudo: role Answer[:$default = 42, $d = $default] { method Str { "The {$d == $default ?? '' !! "modified " }answer is $d" } }; say Answer.new; say Answer[43].new
13:00 p6eval rakudo c8181a: OUTPUT«Potential internal error: bindability check may have done more than just binding.␤The answer is 42␤Potential internal error: bindability check may have done more than just binding.␤The modified answer is 43␤»
13:01 masak I still don't grok when that warning is triggered.
13:01 moritz_ masak: some cases of non-trivial dispatch to parameterized roles.
13:02 masak well, yes.
13:02 masak but which ones?
13:02 masak and is there something really potentially dangerous with the above code?
13:02 moritz_ well, it's wrong
13:02 masak oh?
13:02 moritz_ having a positional argument after a named one is wrong
13:03 masak I thought they just couldn't be mixed.
13:03 masak maybe I'm out-of-date.
13:03 moritz_ I think the cases are cross-dependencies with default values, and where-blocks
13:03 moritz_ std: role Answer[:$default = 42, $d = $default] { }
13:03 p6eval std 28514: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put optional positional parameter after variadic parameters at /tmp/0GV0rUspi2 line 1:␤------> [32mole Answer[:$default = 42, $d = $default[33m⏏[31m] { }[0m␤    expecting any of:␤   standard stopper␤ terminator␤       whitespace␤FAILED
13:03 p6eval ..00:01 104m␤»
13:03 masak ah.
13:04 masak rakudo: sub foo(:$named, $positional) {}
13:04 p6eval rakudo c8181a:  ( no output )
13:04 masak rakudo: sub foo(:$named, $positional) {}; say 'alive'
13:04 p6eval rakudo c8181a: OUTPUT«alive␤»
13:04 masak is that one in RT?
13:04 moritz_ I think so, but not sure.
13:05 PerlJam hello #perl6
13:05 moritz_ \o/
13:05 masak rakudo: sub foo(:$) {}; say 'an anonymous named parameter!?'
13:05 p6eval rakudo c8181a: OUTPUT«an anonymous named parameter!?␤»
13:05 moritz_ :-)
13:05 masak std: sub foo(:$) {}
13:05 p6eval std 28514: OUTPUT«ok 00:01 102m␤»
13:05 masak well, shoot in yourself foot, I guess.
13:05 ruoso joined #perl6
13:05 masak erm, 'foot in yourself shoot'.
13:06 moritz_ why? foo(|{ '' => 'foo'})
13:06 masak moritz_: that's a pair, no?
13:06 masak not a named argument.
13:06 masak oh, |
13:06 * masak tries
13:06 moritz_ right
13:06 moritz_ and the name is the empty string :-)
13:06 masak hey, wait a minute :)
13:06 Matt-W that's not anonymous
13:06 masak there's no way to test if it got passed.
13:07 Matt-W that's just named with the empty string
13:07 Matt-W heh even if you can do it it's of no use whatsoever
13:07 masak Matt-W: '$' in signatures means a anon scalar.
13:07 Matt-W unless... can a routine introspect the parameters it was passed and do a .perl on them?
13:07 moritz_ rakudo: sub foo(:$) { say 'foo' }; foo(|{'' => 'bar'})
13:07 p6eval rakudo c8181a: OUTPUT«argument doesn't array␤in sub foo (/tmp/wixb9JIzjQ:1)␤called from Main (/tmp/wixb9JIzjQ:0)␤»
13:07 masak it can.
13:07 Matt-W so you can get at them then
13:07 Matt-W even if they don't have names
13:08 moritz_ Matt-W: probably only if it receives a raw signature
13:08 masak rakudo: sub foo(:$) {}; say &foo.signature.perl
13:08 p6eval rakudo c8181a: OUTPUT«:(Any $?)␤»
13:08 moritz_ that's wrong :-)
13:08 Matt-W BUG
13:08 masak why?
13:08 moritz_ it's not a positional
13:08 masak oh, right.
13:08 * masak submits rakudobug
13:08 Matt-W and it's not called ?, either
13:08 moritz_ and the "argument doesn't array" doesn't look too bright either
13:08 masak Matt-W: no, that's a postfix.
13:09 Matt-W oh yes sorry
13:09 Matt-W optional
13:09 moritz_ Matt-W: the ? means "optional" here
13:09 * moritz_ too slow
13:09 Matt-W but it should be a named optional
13:09 Matt-W :$?
13:09 moritz_ right
13:09 moritz_ rakudo: my %h = '' => 3; sub foo(:$) { say 5; }; foo |%h
13:10 p6eval rakudo c8181a: OUTPUT«FixedIntegerArray: index out of bounds!␤in sub foo (/tmp/lbCKj1pGvo:1)␤called from Main (/tmp/lbCKj1pGvo:0)␤»
13:10 moritz_ yet another bug... masak? :-)
13:10 * masak submits
13:10 masak rakudo: sub foo(:$a) {}; say &foo.signature.perl
13:10 p6eval rakudo c8181a: OUTPUT«:(Any :$a?)␤»
13:10 masak it gets that one right.
13:12 Matt-W rakudo: sub foo(:$, :$) {}; say $foo.signature.perl
13:12 p6eval rakudo c8181a: OUTPUT«Symbol '$foo' not predeclared in <anonymous> (/tmp/8OMTadSqa4:2)␤in Main (src/gen_setting.pm:3469)␤»
13:12 Matt-W rakudo: sub foo(:$, :$) {}; say &foo.signature.perl
13:12 p6eval rakudo c8181a: OUTPUT«:(Any $?, Any $?)␤»
13:14 crythias joined #perl6
13:20 icwiener joined #perl6
13:20 masak a follow-up on my continuations rant from yesterday: S04:627 specifies C<gather> as being lazy. how will this be carried out on a VM without continuations?
13:21 masak s/carried out/pulled off/
13:21 moritz_ masak: continue your rant when TimToady is present :-)
13:22 PerlJam masak: through the magic of turing equivalence  (in other words, painfully :)
13:22 masak how meta.
13:22 colomon moritz_: where does roots live now?
13:22 moritz_ colomon: spread all over the place, actually
13:22 masak PerlJam: my (obvious) point is that if the pain can be abstracted in that case, why not for continuations in general?
13:22 moritz_ colomon: the real implementation in Complex.pm
13:22 colomon just remembered I could use ack.
13:22 pmurias joined #perl6
13:23 moritz_ ack++ # one of the most useful development tools
13:23 masak I'll settle for 'delimited' continuations, even though I don't know exactly what they are.
13:23 moritz_ colomon: somehow I haven't been able to make sin(Complex) dispatch to Complex.sin
13:23 colomon moritz_: somehow missed the version in Complex.pm the first time I looked this morning.
13:23 masak ack++ # like grep, but prettier
13:24 moritz_ anyway, we have failures in two files left
13:24 colomon what two files?  I only got failures in roots.t when I tried spectest this morning.
13:24 moritz_ the roots.t should be rather trivial to fix by a couple of 'return NaN if $thing ~~ Inf|NaN'
13:24 jaffa4 what is ack?
13:25 colomon moritz_: that's why I was asking where roots is.  ;)
13:25 PerlJam jaffa4: http://betterthangrep.com/
13:25 mdxi jaffa4: andy lester's better-than-grep grep
13:25 moritz_ colomon: trig.t fails for me
13:25 colomon really?
13:25 moritz_ aye
13:26 colomon (trying it again now)
13:26 moritz_ colomon: do you have local modifications to the test file?
13:26 colomon moritz_: no, I've been doing all my trig modifications to the new-trig.t files.
13:27 colomon Errr... but wait, how the heck does it work on mine?  we shouldn't have Complex.sin or Complex.cos now!
13:28 moritz_ why not? I think I uncommented the implementions in Complex.pm
13:28 colomon oh, you did.  hmmm.
13:28 colomon yeah, trig.t passes for me.
13:28 colomon I bet new-trig.t fails, let's see...
13:29 colomon new_trig.t, perl 6 is leading me to confuse _ and - with disturbing regularity
13:29 moritz_ how exceedingly strange
13:29 colomon what failures are you getting?
13:30 moritz_ colomon: it dies after test 126
13:30 moritz_ when it tries to calculate sin($complex_number)
13:30 moritz_ and redispatches to Any.sin()
13:31 moritz_ and thus tries to coerce the Complex to Num, which obviously doesn't work
13:31 colomon sin(Complex) is actually defined in trig.t right now.
13:32 moritz_ it shouldn't be :/
13:33 colomon Hmmm, new_trig.t does fail with the "You can't just coerce a Complex to Num" error.
13:34 colomon moritz_: clearly it shouldn't be!  but the weirdness that forced it to be was why we are on this branch.
13:34 moritz_ yeah, right
13:34 moritz_ I added that error to get a better backtrace (and because it's true)
13:34 colomon new_trig.t is failing in Any::asin.
13:35 moritz_ and your rakudo is on 65af3ca0376198b88d0ccd3a37fc935407e5a704 without local modifications?
13:35 colomon yup.
13:35 colomon I didn't do a Configure --gen-parrot this morning when I pulled, could that make a diff?
13:36 moritz_ maybe
13:36 moritz_ but maybe my local rakudo checkout has problems
13:36 colomon trying with new configure now.
13:37 moritz_ and maybe my parrot is newer
13:37 moritz_ I'll try a fresh clone, and a a Configure --gen-parrot
13:40 colomon make finished, trying trig.t again now.
13:43 masak rakudo: sub foo($a = $default, :$default = 42) {}; say "alive"
13:43 p6eval rakudo c8181a: OUTPUT«alive␤»
13:43 masak std: sub foo($a = $default, :$default = 42) {}
13:43 p6eval std 28514: OUTPUT«ok 00:02 104m␤»
13:44 masak rakudo: sub foo($a = $default, :$default = 42) { say $a }; foo
13:44 p6eval rakudo c8181a: OUTPUT«Null PMC access in isa()␤in sub foo (/tmp/lROEg7zEa4:1)␤called from Main (/tmp/lROEg7zEa4:0)␤»
13:44 * masak submits rakudobug
13:44 masak today is a day of good harvest :)
13:45 moritz_ uhm, why STD.pm complain about $default not being defined?
13:45 masak it doesn't.
13:45 moritz_ that's what I wanted to write
13:45 moritz_ why doesn't it complain?
13:45 masak STD bug?
13:45 moritz_ STD bug.
13:46 * masak hightlights TimToady
13:47 masak rakudo: sub foo($a = $default, :$default = 42) { say 'alive' }; foo
13:47 p6eval rakudo c8181a: OUTPUT«Null PMC access in isa()␤in sub foo (/tmp/9yQXQGoWdm:1)␤called from Main (/tmp/9yQXQGoWdm:0)␤»
13:49 colomon moritz_: trig.t still works for me after configure and rebuild.
13:50 NorwayGeek joined #perl6
13:52 moritz_ colomon: works here too, now
13:52 colomon \o/
13:52 moritz_ "suddenly success"
13:53 NorwayGeek joined #perl6
13:53 colomon I've got to do some $work now, but if you get the roots patch in place, I'll try to get the full suite of trig functions up and running later today.
13:53 moritz_ I'm slightly suspicious now... updating to the newest parrot to see if it changes anything
13:54 colomon k
13:57 colomon I'm also going to noodle around and add new tests in complex.t, I think.
13:58 moritz_ ok
13:58 icwiener_ joined #perl6
14:04 diakopter sprixel: say "43".Num # for moritz_
14:04 p6eval sprixel 28514: OUTPUT«43␤»
14:04 colomon rakudo: say "43".Num;
14:04 p6eval rakudo c8181a: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤»
14:04 moritz_ sprixel++
14:04 moritz_ diakopter++
14:05 diakopter sprixel: say "43.3325".Int
14:05 p6eval sprixel 28514: OUTPUT«43␤»
14:06 iblechbot joined #perl6
14:07 abra joined #perl6
14:08 diakopter sprixel: say "0b10010".Int
14:08 p6eval sprixel 28514: OUTPUT«18␤»
14:11 * diakopter is still offline-ish
14:12 masak mberends: I made one more commit to temporal-flux-perl6syn. I wonder whether the 'P0.5Y' is a net win or a net fail. it's practical, but it seems to me it inevitably introduces a calendarish type of rounding errors which could otherwise be avoided.
14:13 Student joined #perl6
14:16 justatheory joined #perl6
14:23 SmokeMachine joined #perl6
14:27 Psyche^ joined #perl6
14:38 FCO joined #perl6
14:39 jaffa4 joined #perl6
14:41 mberends masak: just read your remark. I want to think it over a bit before forming my opinion. Temporal is such a Bikeshed type subject...
14:41 masak mberends: that's OK, you have time. :P
14:44 masak by the way, re your hesitation towards s/DateTime/Time/, namely "Date is date-only, Time is time-only, DateTime is both." -- I spent some time wondering how much that opinion is biased by having implemented the last iteration of DateTime. :)
14:44 masak not saying you're wrong, or even that you shouldn't be biased.
14:44 riffraff joined #perl6
14:46 * frettled waves a cardboard placard with Time::UTC and Time::TAI.
14:48 [particle] joined #perl6
14:49 masak I think this is the first time someone has waved a cardboard placard in here. I'm unsure as to the symbolism of it.
14:49 Matt-W cardboard placards are flammable
14:49 masak that might factor into it somehow.
14:50 masak I got the impression that it was a scoreboard, and that Time::UTC and Time::TAI were going to have a race.
14:50 masak but maybe frettled is just a peaceful demonstrator.
14:51 zloyrusskiy joined #perl6
14:51 jnthn pmichaud++ # pct-rx branch commits aplenty
14:51 masak jnthn!
14:51 jnthn masak!
14:51 * masak pulls, er updates
14:52 * jnthn has hand wonderful day out thanks to (korean friends)++, and is a bit tired to read those tonight.
14:53 frettled masak: it was rather peaceful, I hope.  Those are current CPAN modules which bear some relevance to Temporal.
14:54 frettled jnthn: goodie, you probably deserved it!
14:54 masak is 'frugal' the new 'eager'? or is it something else?
14:54 Matt-W I tried to look at the pct-rx branch changes, but I found parrot SVN's web interface very unhelpful
14:54 masak Matt-W: git-svn
14:55 jnthn Matt-W: Was the trac timeline diffs any better?
14:55 * jnthn read that
14:55 Matt-W that doesn't give me a nice shiny web interface
14:55 Matt-W jnthn: didn't know about that
14:55 jnthn trac.parrot.org
14:55 jnthn see timeline
14:55 Matt-W all I found was a horrible thing that wanted me to enter revision numbers :o
14:55 Matt-W which seemed like a step back in time even for SVN
14:56 jnthn Matt-W: That's where you get grateful it's svn revision numbes, not git sha-1s ;-)
14:56 Matt-W true
14:56 Matt-W it'd be nice if I could filter this timeline by branch
14:57 Woodi anyone can tell me how to exit from rakudo interpreter ? how to end ./perl6 ?
14:57 Matt-W ctrl-C
14:57 moritz_ can I tell git-svn not to "aggressively search" for "old history"?
14:58 Woodi and other way ?
14:58 masak Matt-W: https://trac.parrot.org/parrot/log/branches/pct-rx
14:58 moritz_ Ctrl+D
14:58 Matt-W exit, possibly
14:58 jnthn kill
14:58 Matt-W maybe die
14:58 moritz_ exit doesn't work
14:58 jnthn no, repl catches exceptions
14:58 Matt-W aaah
14:58 masak REPL--
14:58 jnthn I fear even exit, though maybe that should chain...
14:58 jaffa8 joined #perl6
14:58 jnthn well, catcing die is good
14:58 Woodi exit no, die no, quit no, return no...
14:58 jnthn Catching exit exceptions probably is not.
14:58 Matt-W Woodi: ctrl-C then
14:59 jnthn But it's treating em all the same ATM
14:59 moritz_ Ctrl+D works here, too
14:59 Woodi i cannot accept ^C :)
14:59 moritz_ why not?
14:59 [particle] Q:PIR{end}
14:59 Woodi but ^D is ok and work :)
14:59 Woodi i prefer p6 interpreter can be civilised
14:59 Matt-W what's uncivilised about SIGINT
15:00 Matt-W it's when you have to send it a SIGKIL that you're getting into uncivilised territory
15:00 Woodi kill -9/-15 is kinda administrative
15:01 Woodi but ^D eq EOT
15:02 masak aye, seems 'frugal' means :?
15:02 Woodi and if no way to exit from p6 interpreter i think better to not enter there...
15:02 [particle] rakudo needs something like: multi method exit(Int $x) { Q:PIR {$P0 = find_lex '$x'; $I0 = $P0; exit $I0 } }
15:02 * jnthn would support exit working in the reply
15:02 Woodi you ant to scary new user ?
15:02 jnthn erm
15:02 jnthn repl
15:02 jnthn [particle]: suspect we already have one
15:02 Matt-W the repl generally needs some work
15:02 jnthn [particle]: exit iirc throws an exception
15:03 Matt-W it's not deliberately scary
15:03 [particle] ok, so the handlers need changing. that's straightforward.
15:03 jnthn [particle]: and the repl's "code threw an exception" handler just doesn't have stuff in place to rethrow exit exceptions.
15:03 jnthn [particle]: Yeah, if there's agreement, it should be.
15:03 jnthn I've not got any thoughts why exit should not actually exit the repl.
15:04 rfordinal joined #perl6
15:04 Woodi anyway i think ^D should send NL before finish, unix tools do this
15:04 [particle] it should absolutely exit.
15:04 moritz_ btw this worked for me: git svn clone --no-metadata -r41479:HEAD  https://svn.parrot.org/parrot/branches/pct-rx/
15:05 jnthn [particle]: Patches (or ticket) welcome. :-)
15:05 moritz_ there's already a ticket for that
15:05 [particle] et viola.
15:05 jnthn there we are then
15:05 jnthn somebody just needs to write a little code ;-)
15:06 Matt-W hell
15:06 Matt-W that sounds like something even I could do
15:06 Matt-W but right now, I'm going home
15:07 * moritz_ mentally hears Mark Knopfler - Going Home (Theme from the "Local Hero")
15:08 moritz_ too many cow-orkers around to actually play music :-)
15:08 zloyrusskiy joined #perl6
15:14 cahek joined #perl6
15:15 rfordinal left #perl6
15:18 TimToady masak: on VMs without continuations, laziness must be emulated with closures, as STD does on Perl 5.
15:19 cahek joined #perl6
15:20 masak TimToady: I'm running up against some situations where first-class continuations would be very useful. that's why I'm thinking of this lately.
15:20 pugs_svn r28515 | lwall++ | [STD] complain about non-existent default vars, just for masak++
15:20 masak \o/
15:21 cahek joined #perl6
15:22 masak or maybe not even first-class, but some mechanism such as Ruby's 'yield'.
15:23 TimToady just implement Haskell on the VM, and then finish pugs :P
15:23 masak it feels strange that we have gather/take and pipes, but no local way to make the same kind of control flow.
15:24 TimToady that's because I like to keep my laziness orthogonal to sub cals
15:24 TimToady *calls
15:24 masak I see.
15:25 masak Seaside and Lift are two web applications which make good use of continuations. PGE and other parsers use them liberally. I'm still trying to figure out which contortions are necessary to port such applicationa to pure Perl 6.
15:25 TimToady and I very much don't like co-routines that change their signature depending on whether they're initting or continuing, though making yield return new arguments is a sop to fix that
15:25 masak s/applicationa/applications/
15:25 kidd` joined #perl6
15:26 masak hm, yes. co-routines changing signatures feels wrong, I agree.
15:26 TimToady I thought those were just "web continuations"
15:26 masak the point is that they're syntactically supported.
15:26 mberends masak: Temporal.pod now has week-of-year twice in the same list. Also, surely for Duration "D0.5Y" is more intuitive than "P0.5Y".
15:27 TimToady well, basically, lazy lists are our continuation syntax primitive
15:27 moritz_ rakudo: say "NaN" ~~ NaN
15:27 p6eval rakudo c8181a: OUTPUT«1␤»
15:27 masak mberends: the 'P' is from ISO 8601.
15:27 TimToady lazy lists are also a poor-man's monad
15:28 TimToady making sure time happens in the right order :)
15:28 PerlJam But I thought Perl 6 made us rich!
15:28 TimToady prophetic past tense is tricky
15:28 masak TimToady: either I'm missing something major from the 'lazy lists are our continuation syntax primitive', or I'm simply dissatisfied with it.
15:29 masak s:2nd/'/' viewpoint/
15:29 TimToady continuations are like naked singularities, but the event horizon is a lazy list
15:31 masak TimToady: I'll do some research to try to understand your hesitation towards naked-singularity continuations.
15:32 masak mberends: (duplicate attribute) fixed. I also alphabetized the attributes while I was at it.
15:32 masak mberends++ # for noticing
15:35 KyleHa joined #perl6
15:37 masak more to the point, I can see with some difficulty how a lazy list might help replace continuations in a regex parser, and not at all in the case of a Seaside-like web framework.
15:41 zloyrusskiy joined #perl6
15:43 ejs joined #perl6
15:48 moritz_ colomon: in the branch root(NaN, 1) does the Right Thing[tm] IMHO, but it returns (for example) a Complex.new(NaN, 0) intead of just a NaN. Smart-matching that against NaN fails...
15:48 moritz_ colomon: IMHO it would be OK to fudge these tests for now, and merge the branch
15:51 snearch joined #perl6
15:54 moritz_ rakudo: say (NaN+0i) ~~ NaN
15:54 p6eval rakudo c8181a: OUTPUT«1␤»
15:54 moritz_ that's the actual thing we'll be regressing, not the roots() function
15:56 moritz_ pmichaud: would you like to review the native-complex branch before merging? (I could very much understand if you don't, because of your other "distractions" at the moment :-)
15:57 masak (pmichaud's "distractions")++
15:57 nihiliad joined #perl6
15:57 moritz_ the ~~ NaN thing is something we can fix
15:58 moritz_ but since masak++ moved some operators to the setting in master it's some code I'm not too eager to touch in the branch
16:01 cdarroch joined #perl6
16:02 masak moritz_: merge in the branch, and then fix it, perhaps?
16:03 moritz_ masak: in principle yes, but I'd like to get an answer from pmichaud++ first
16:04 masak aye, sure.
16:05 lanny joined #perl6
16:07 mikehh rakudo (c8181aa) builds on parrot r41579 - make test / make spectest_smolder (up to r28515 -> #28385) PASS - Ubuntu 9.04 amd64
16:10 justatheory joined #perl6
16:12 NorwayGeek|Away joined #perl6
16:12 colomon moritz_: I would think of Complex(NaN, 0) as being the wrong thing, actually, but perhaps I don't completely grok how NaN and types are supposed to work together.
16:13 lanny rakudo: my @xs=<0 1 3.14 0xA 0755 bar>; say @test.map: -> $n {"$n={$n.Int}, "};
16:13 p6eval rakudo c8181a: OUTPUT«Symbol '@test' not predeclared in <anonymous> (/tmp/2bWZne3PvN:2)␤in Main (src/gen_setting.pm:3469)␤»
16:13 lanny bah.  cut/paste ftw
16:13 lanny rakudo: my @xs=<0 1 3.14 0xA 0755 bar>; say @xs.map: -> $n {"$n={$n.Int}, "};
16:13 p6eval rakudo c8181a: OUTPUT«0=0, 1=1, 3.14=3, 0xA=10, 0755=755, bar=0, ␤»
16:16 lanny Is there a way to tell Int to use a different base?
16:16 masak rakudo: say :4<101>
16:16 p6eval rakudo c8181a: OUTPUT«17␤»
16:17 lanny Thanks.
16:17 masak rakudo: my $foo = '1010'; say eval ":4<$foo>"
16:17 p6eval rakudo c8181a: OUTPUT«68␤»
16:18 moritz_ rakudo: my $foo = '1010'; say :16($foo)
16:18 p6eval rakudo c8181a: OUTPUT«4112␤»
16:19 moritz_ rakudo: my $foo = '1010'; say :4($foo)
16:19 p6eval rakudo c8181a: OUTPUT«68␤»
16:19 moritz_ there ya go, without eval :-)
16:19 diakopter sprixel: my $foo = '1010'; say :4($foo)
16:19 p6eval sprixel 28515: OUTPUT«68␤»
16:19 * moritz_ impressed
16:20 lanny rakudo: my @xs=<0 1 3.14 0xA :8(0755) bar>; say @xs.map: -> $n {"$n={$n.Int}, "};
16:20 p6eval rakudo c8181a: OUTPUT«0=0, 1=1, 3.14=3, 0xA=10, :8(0755)=0, bar=0, ␤»
16:20 lanny rakudo: my @xs=<0 1 3.14 0xA :8(755) bar>; say @xs.map: -> $n {"$n={$n.Int}, "};
16:20 p6eval rakudo c8181a: OUTPUT«0=0, 1=1, 3.14=3, 0xA=10, :8(755)=0, bar=0, ␤»
16:22 lanny aha
16:22 lanny rakudo: my @xs=<0 1 3.14 0xA 0o755 bar>; say @xs.map: -> $n {"$n={$n.Int}, "};
16:22 p6eval rakudo c8181a: OUTPUT«0=0, 1=1, 3.14=3, 0xA=10, 0o755=493, bar=0, ␤»
16:22 lanny better.  Can't wait for: grok radix
16:25 lanny Course if I could have remembered the term 'radix' I could have just grepped.
16:25 lanny rakudo: my @xs=<< 0o755 :8<755> >>; say @xs.map: -> $n {"$n={$n.Int}, "};
16:25 p6eval rakudo c8181a: OUTPUT«0o755=493, :8<755>=493, ␤»
16:30 TopoMorto joined #perl6
16:31 TimToady moritz_: in blog s/If found/I've found/
16:32 moritz_ TimToady: thanks, fixed (fix percolating to the site right now)
16:37 lanny sub f(Int @xs) of Int { [+] @xs; }; my @av=<2 3 4>; f(@av.map: {$_.Int}).say;
16:38 lanny rakudo: sub f(Int @xs) of Int { [+] @xs; }; my @av=<2 3 4>; f(@av.map: {$_.Int}).say;
16:38 p6eval rakudo c8181a: OUTPUT«Parameter type check failed; expected Positional[Int], but got List for @xs in call to f␤in sub f (/tmp/yD4QWVo9DV:1)␤called from Main (/tmp/yD4QWVo9DV:0)␤»
16:38 lanny rakudo: sub f(Int @xs) of Int { [+] @xs; }; my @av=<2 3 4>; f([@av.map: {$_.Int}]).say;
16:38 p6eval rakudo c8181a: OUTPUT«Parameter type check failed; expected Positional[Int], but got Array for @xs in call to f␤in sub f (/tmp/KkfWrtmQ9V:1)␤called from Main (/tmp/KkfWrtmQ9V:0)␤»
16:38 lanny Isn't @xs an Array of Int?
16:39 moritz_ no
16:40 moritz_ it's an untyped array
16:40 moritz_ and it holds Str's actually
16:40 moritz_ rakudo: say <2 3 4>[0].WHAT
16:40 p6eval rakudo c8181a: OUTPUT«Str()␤»
16:40 stephenlb joined #perl6
16:40 lanny Right.  That's @av.
16:40 lanny I'm asking of @xs in sub f
16:40 moritz_ erm, sorry
16:41 jnthn lanny: If you are going to pass an array into a routine that ones a typed array, you need to pass in a typed array.
16:41 jnthn *wants*
16:41 Intensity joined #perl6
16:42 lanny Ok.  I see.
16:42 TimToady moritz_: re proto regexen, they participate fully in LTM as alternatives, so they do speed things up in the general case, assuming you have LTM as STD has it
16:42 lanny Is there a way of doing that anonymously rather than building a temp variable for it?
16:43 jnthn In Rakudo at the moment, I think not - in the future the syntax Array[Int](1,2,3) may do it.
16:43 jnthn Or maybe not. I figure there's a way...
16:43 moritz_ TimToady: and LTM is fast... because it's DFAish? is that the point?
16:43 jnthn If not that, perhaps an adverb to the circumfix [....]
16:43 lanny Yes.  Would think so too.
16:43 jnthn TimToady: Answers welcome. ;-)
16:44 TimToady moritz_: yes, or some fast form of parallel NFA matching
16:45 moritz_ TimToady: thanks, that explains things
16:46 TimToady STD currently fakes DFA with a trie on constant strings and brute force otherwise, but the semantics are right
16:47 moritz_ in token foo:sym<bar> { <sym> ... } do you recognize that <sym> is basically a literal?
16:48 moritz_ s/you/STD.pm + Curser.pmc/
16:48 moritz_ (+ grammar fixes ;-)
16:48 TimToady certainly
16:49 TimToady see src/perl6/lex/STD/foo to see the LTM table for foo (in an active STD dir)
16:52 rindolf joined #perl6
16:53 payload joined #perl6
16:54 masak hah! according to lex/STD/twigil, the dot is a twigil! :)
16:54 moritz_ what is the ?? prefix?
16:56 TimToady where is there a ?? prefix?
16:56 moritz_ lex/STD/prefix
16:57 moritz_ \?\?(?#::)(?#FATE7 prefix STD::prefix__S_318QuestionQuestion )
16:57 TimToady std: say ?? $x
16:57 p6eval std 28515: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix ?? instead at /tmp/94nOv2CD42 line 1:␤------> [32msay ??[33m⏏[31m $x[0m␤FAILED 00:01 104m␤»
16:58 TimToady it can detect that reasonably since ? ? $x is non-sensical
16:59 moritz_ ah
16:59 TimToady likewise, there's still a + twigil
16:59 TimToady std: $+foo
16:59 p6eval std 28515: OUTPUT«Potential difficulties:␤  The + twigil is deprecated, use the * twigil instead at /tmp/kP46gdZPw0 line 1:␤------> [32m$+[33m⏏[31mfoo[0m␤  The + twigil is deprecated, use the * twigil instead at /tmp/kP46gdZPw0 line 1:␤------> [32m$+[33m⏏[31mfoo[0m␤ok 00:01 101m␤»
16:59 TimToady and that's why
17:01 lanny rakudo: sub f(Int @xs) { [+] @xs }; f(1..5).say;
17:01 p6eval rakudo c8181a: OUTPUT«Parameter type check failed; expected Positional[Int], but got Range for @xs in call to f␤in sub f (/tmp/7W1GMmyENd:1)␤called from Main (/tmp/7W1GMmyENd:0)␤»
17:01 crythias joined #perl6
17:03 TimToady jnthn: Array[Int](...) looks like a perfectly good cercion to me, assuming Array partakes of the role nature
17:03 TimToady *coercion
17:03 omega joined #perl6
17:03 jnthn TimToady: Well, it's parametric, so I guess it needs to.
17:03 TimToady arguably, of course, you can't coerce to a role in any case
17:04 jnthn TimToady: Well, yeah, that's why I was like "hmm"
17:04 TimToady there's some punning/delegation going on there, I expect
17:04 jnthn Of course, if we spec that as "it's a coercion to the punned class" then the problem "goes away"
17:05 jnthn I probably need to figure out how to pun faster than Rakudo currently does if things like array are gonna be roles.
17:05 moritz_ what are parameterized roles punned into? I mean there's no parametric class...
17:05 mberends joined #perl6
17:05 jnthn moritz_: A class that does the parametric role.
17:05 moritz_ ok
17:05 TimToady to the class it's just a part of its name, kinda
17:05 jnthn (the class is "anonymous" in so far as it has no direct reference from the package or lexpad.)
17:06 * moritz_ feels a bit stupid today
17:06 jnthn (but for debugging purposes I think that it may be nice to pack the class thing its name is matching the name of the role that was punned)
17:06 TimToady your intelligence is worse today :)
17:06 jnthn erm, to make the class...
17:07 jnthn my typing sucks, but it just went 2am :-)
17:07 * TimToady waves his hands vaguely in jnthn++'s direction
17:07 ruoso joined #perl6
17:08 * jnthn yawns
17:08 jnthn I think time to sleep. I want to go see some interesting places tomorrow. :-)
17:08 TimToady g'night
17:08 jnthn o/
17:10 silug joined #perl6
17:14 TimToady std: sub foo($a = $default, :$default = 42) {}
17:14 p6eval std 28515: OUTPUT«Potential difficulties:␤  Variable $default is not predeclared at /tmp/1AKbdNCsky line 1:␤------> [32msub foo($a = $default[33m⏏[31m, :$default = 42) {}[0m␤ok 00:02 104m␤»
17:28 Confield joined #perl6
17:34 justatheory joined #perl6
17:35 justatheory joined #perl6
17:53 szabgab joined #perl6
17:54 colomon moritz_: does the roots commit (from two hours ago) mean all spectests pass now?
17:56 moritz_ no
17:57 colomon darn
17:57 pmichaud moritz_: I don't feel I need to review the native-complex branch before merging.
17:57 moritz_ rakudo: say +(2+3i)
17:57 moritz_ pmichaud: ok
17:57 p6eval rakudo c8181a: OUTPUT«2+3i␤»
17:58 pmichaud (haven't looked to see if this happened yet)
17:58 pugs_svn r28516 | diakopter++ | [sprixel] add some JS libraries written largely by me
17:58 moritz_ rakudo: say (2+3i).Num
17:58 pmichaud I just peeked in to make sure the protoregex spec hasn't changed on me today :)
17:58 p6eval rakudo c8181a: OUTPUT«Method 'Num' not found for invocant of class 'Complex'␤»
17:58 colomon moritz_: we need to overload + for Complex, IMO.
17:58 diakopter mberends: take a look at those libraries I just committed... there's a lot there :)
17:59 colomon prefix+, I mean.  which means moving it to the setting
17:59 moritz_ colomon: I think prefix:<+> is allowed to return any Numeric
17:59 moritz_ so it's a no-op on Complex
17:59 lucs joined #perl6
17:59 colomon right, but if you try it right now on our branch, it tries to call .Num on it.
17:59 moritz_ rakudo: class A { method Num { NaN } }; say A.new ~~ NaN
17:59 pmichaud prefix:<+>  likely means "numeric context", which may be very different from "coerce to Num"
17:59 p6eval rakudo c8181a: OUTPUT«1␤»
18:00 mberends diakopter: wow, lots of goodies!
18:00 moritz_ pmichaud: with yesterday's spec changes in mind it might mean 'coerce to Numeric'
18:00 moritz_ colomon: oh.
18:00 pmichaud oh, I didn't see those spec changes, then.
18:00 pmichaud I'll have to look.
18:00 pmichaud later, when I'm ready for a break from protoregexes
18:00 moritz_ don't hurry
18:01 colomon I'm not sure if I like the 'coerce to Numeric' idea.
18:01 colomon I've been thinking of it conceptually as 'coerce to something you can do math on'.
18:01 diakopter mberends: none of it's really ready use directly in sprixel yet (except the ToJS() function, which I ported from the ToJS.pm I wrote, so I can have pretty printed serialization of possibly-self-referential JS objects without duplication).
18:02 diakopter the rest of it is from the parser-generator/grammar-interpreter metalanguage system I wrote in JS
18:02 moritz_ colomon: and Numeric is the role which means "somethiing you can do math on"
18:02 colomon so for instance, if you've got a Vector class, prefix:<+> would return itself
18:02 moritz_ hm
18:02 moritz_ good point
18:02 moritz_ unless it adds a prefix:<+> multi
18:02 colomon moritz_: as I understand it, Numeric is complex or maybe real
18:02 pmichaud for those who are wondering why protoregexes should help parsing speed, take a look at the "statement_control" rule in Rakudo's grammar.pg file
18:02 pmichaud and imagine you're about to parse a 'for' statement
18:03 * colomon has to take his dog for her shots.  back soon.
18:04 pmichaud as things stand now, the parser first tries (and fails) all of the alternatives above the <for_statement> subrule
18:04 moritz_ pmichaud: but that's an LTM feature, not a protoregex feature, no?
18:04 pmichaud it's a protoregex feature also
18:04 pmichaud well....
18:05 pmichaud I should say that the first cut of protoregexes will recognize initial string prefixes
18:05 moritz_ so it's an optimization too
18:05 pmichaud I tend to think of "optimizations" as being things that go beyond the spec.  This behavior is mandated by the spec.  (more)
18:06 pmichaud anyway, when I have protoregexes implemented, we'll be able to do   statement_control:for  instead, and when we go to parse a <statement_control> subrule it'll jump immediately to the correct protoregex candidate(s)
18:06 pmichaud instead of attempting all of the false candidates
18:07 moritz_ so it will match \w+\b (in perl 5 regexes) first, and then look for a jump candidate?
18:07 pmichaud no
18:07 pmichaud it'll have a list of all of the initial strings
18:07 pmichaud from all of the candidates
18:07 moritz_ ok
18:07 pmichaud and then it will check for those initial strings
18:07 TimToady it's even better than that
18:08 pmichaud in the full implementation case it's even better, yes.
18:08 pmichaud I'm talking about the "first cut"  at the moment :)
18:08 TimToady because it only matched all the alternatives at statement, and determined a fate
18:08 TimToady so it already has its fate determined by the time it reaches the statement_control rule
18:08 gbacon joined #perl6
18:09 pmichaud my initial implementation probably won't have fates done yet
18:10 pmichaud and this is where I tend to draw a distinction between "protoregex" and "ltm" :)
18:10 pmichaud for me, "ltm" includes all of the subrule processing; I won't have that part yet.
18:12 mberends diakopter: does your sprixel run num.t and radix.t? here it says 'Can't locate object method "Str" via package "Test"'. t/01-sanity/04-if.t works fine.
18:12 TimToady speaking of which, I see I have a bug, since lex/STD/statement_02 doesn't include all the termish prefixes
18:13 diakopter oh noes
18:13 * diakopter sees the cycle of breakage/fixage between std/sprixel begin
18:14 TimToady oh, it won't change anything visible to sprixel
18:14 TimToady it's just trying all the statement_controls before it tries EXPR, but the structure is the same
18:14 diakopter ok; but np if it does in the future; I'm tongue-in-cheek
18:18 diakopter I just thought of a truly wicked way to implement multiple inheritance using JS' prototype system
18:19 TimToady pmichaud: I don't see any problem with that approach, since every rule also has to work standalone when the Fates are off visiting Mt Olympus
18:19 diakopter let's just say it involves temporarily changing the .__proto__ member of the involved object prototypes (basically creating a resolution chain at resolution time)
18:21 pmichaud TimToady: right (more)
18:22 pmichaud TimToady: I figure I want to get a basic protoregex implementating working first, move Rakudo and NQP to be using protoregex-and-contextual based parsing, and then work on optimizing the engine for full ltm semantics including fates
18:22 pmichaud but even the basic protoregex implementation should give us some parsing speed improvement
18:23 pmichaud if nothing else, we get to avoid a lot of method calls and creation of cursor/match objects that exist just to say "false."
18:26 diakopter mberends: to answer your question, I don't know
18:29 kidd joined #perl6
18:32 PerlJam pmichaud: Are there some benchmarks handy that will show the parsing speed difference, or is it just eye-ball the time it takes rakudo to build ?
18:32 pmichaud PerlJam: it'll have to be eye-ball
18:32 pmichaud because the grammar has to change significantly in order to tell
18:32 pmichaud and I don't expect those changes to happen "overnight"
18:33 PerlJam it could ... if there were a hackathon specifically for updating the grammar.
18:33 PerlJam :-)
18:33 pmichaud it's more than just updating the grammar, it's also updating all of the action methods that go along with it
18:33 pmichaud and one of the whole points of doing these changes now is that we need contextuals in our grammar, so that we can refactor the action methods
18:34 pmichaud and I doubt those refactors will happen in the span of a day
18:35 pmichaud put another way, I suspect that much of october and november will be working on cleaning up regressions from the switches jnthn++ and I will be making
18:35 pmichaud s/switches/refactors and changes
18:35 moritz_ but if all goes right, the usage of proto regexes can happen gradually, no?
18:35 moritz_ so that you only port one rule at a time
18:36 pmichaud if we're only porting rules, then perhaps yes.
18:36 pmichaud but there's a lot of other stuff that needs to change as well
18:36 pmichaud and some of those changes aren't "gradual"
18:37 pmichaud e.g., switching "is also" to "augment" isn't a gradual change -- it's a significant change to how we process the ast internally
18:37 frederico joined #perl6
18:37 pmichaud same for lexical handling of namespaces, classes, and subroutines
18:38 rindolf «No one knows all of Perl - not even Larry Wall. Except Chuck Norris, who knows all of Perl 5, Perl 6 and can answer questions about the design of Perl 7. »
18:43 mberends joined #perl6
18:43 lucs joined #perl6
18:43 Confield joined #perl6
18:43 reqamst joined #perl6
18:43 japhb joined #perl6
18:43 meteorjay joined #perl6
18:43 ssm joined #perl6
18:43 c1sung joined #perl6
18:43 kcwu joined #perl6
18:43 rafl joined #perl6
18:43 pnu joined #perl6
18:43 jantore joined #perl6
18:43 yath joined #perl6
18:43 hatseflats joined #perl6
18:43 bionoid joined #perl6
18:43 renormalist joined #perl6
18:43 Juerd joined #perl6
18:56 zloyrusskiy joined #perl6
19:04 Juerd mberends: Pong
19:11 justatheory joined #perl6
19:26 NorwayGeek joined #perl6
19:26 zloyrusskiy joined #perl6
19:33 pugs_svn r28517 | colomon++ | [t/spec] Add some basic tests for complex addition and subtraction.
19:35 iblechbot joined #perl6
19:36 mberends hi Juerd, with this netsplit I was wondering if there was any channel left. Also, you mentioned a few days back that you can provide feather accounts and perl6 subdomains. If it's possible, I'd like to develop a blogging website using Rakudo and masak++'s web.pm. Is it feasible for feather to host something like that?
19:37 Juerd Certainly.
19:37 Juerd If you want a feather account, mail me your real name and preferred username.
19:38 mberends :) willdo
19:38 Juerd Note that feather is DIY; you can run a web server, but it's not a hosting platform, so there's no Apache set up for your project or anything.
19:38 moritz_ if you need any other directions you can also talk to me; I'm admin on feather1 and feather2
19:39 Juerd The global Apache is non-development, but a reverse proxy or redirect can be set up.
19:39 mberends with http-daemon, Rakudo is its own webserver ;)
19:39 Juerd Yes.
19:39 Juerd The suggested port number for your own project is 7000 + uid :)
19:39 mberends ok, sensible.
19:41 mberends thanks both of you, I'll start in a day or so
19:41 mspaulding joined #perl6
19:54 Juerd mberends: Better send that email now, 'cause I might be slow to respond :)
19:55 mberends ok :)
20:00 TimToady phone
20:02 mberends Juerd: sent, but take your time :)
20:02 Juerd ok :)
20:05 pugs_svn r28518 | lwall++ | [gimme5] generate EXPR__PEEK so it propagates LTM
20:06 mberends diakopter: are those JS libs guaranteed free of licensing issues? There are so many authors named in there, people who have nothing to to with Perl...
20:06 mberends *to do
20:06 lanny rakudo: sub f($x) { $x > 255 ?? 0 :: $x; }
20:06 p6eval rakudo c8181a: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤»
20:08 lanny ah.
20:09 moritz_ lanny: known bug
20:09 moritz_ it's ?? !! instead of ?? :: FYI
20:09 lanny The one where I can't type?  :)
20:09 moritz_ the error message is... less than awesome
20:09 TimToady std: sub f($x) { $x > 255 ?? 0 :: $x; }
20:09 p6eval std 28517: OUTPUT«[31m===[0mSORRY![31m===[0m␤Please use !! rather than :: at /tmp/6aV9smNfkv line 1:␤------> [32msub f($x) { $x > 255 ?? 0 [33m⏏[31m:: $x; }[0m␤    expecting any of:␤   bracketed infix␤  infix stopper␤    standard stopper␤ terminator␤FAILED 00:01 104m␤»
20:09 lanny Yes.  Started grepping through tests to see and noticed the !!
20:13 hercynium joined #perl6
20:20 justatheory joined #perl6
20:22 * mberends wrote ?? :: quite a few times before learning the Right Way
20:23 moritz_ which is why a more awesom error message would be great in rakudo
20:34 diakopter how is some less than full, if awefull is less than awesome?
20:41 * TimToady feels fullsome
20:44 moritz_ colomon: trying to move prefix:<+> to the setting resulted in horrible failures - no idea what I did wrong
20:47 TimToady perhaps defined it in terms of something that things + is more primitive?
20:47 TimToady *thinks
20:48 moritz_ no, I defined it in PIR, which triggered vtable method calls, which are as primitive as you can get
20:55 lambdabot joined #perl6
20:58 pugs_svn r28519 | moritz++ | [t/spec] more tests for Complex arithmetics
21:00 [particle]1 joined #perl6
21:02 colomon moritz_: yeah, I had the same thing happen to me the day before you started the complex branch.
21:02 colomon moritz_: though I figured it was just because my attempt was too stupid to survive.
21:03 moritz_ that could be very well the case with my attempt too ;-)
21:03 moritz_ anyway, 've merged native-complex into master locally, and now I'm about to move Num.accepts into the setting to fix the last two remaining test failures
21:03 colomon moritz_: my conclusion after fiddling around is that the actual generic object to num conversion happens magically in the Parrot code.
21:04 colomon sweet!
21:04 moritz_ colomon: yes, it's the get_number vtable methods
21:04 moritz_ s/s$//
21:05 moritz_ oh wow, that looks scarry
21:05 moritz_ there's a .sub 'Num::ACCEPTS' :anon :method
21:05 moritz_ ah, that's for $stuff ~~ Num, not for $suff ~~ $instance_of_Num
21:11 lisppaste3 moritz_ pasted "would you think this is a sane ACCEPTS method?" at http://paste.lisp.org/display/87969
21:12 moritz_ I'm not sure if the spec talks about Complex ~~ Num, but it seems the most sensible thing for me to do
21:16 abra joined #perl6
21:18 abra joined #perl6
21:19 asdadasd joined #perl6
21:20 bigpresh_ joined #perl6
21:20 abra joined #perl6
21:20 cognominal joined #perl6
21:23 abra joined #perl6
21:33 frew_ joined #perl6
21:43 crythias joined #perl6
21:48 abra joined #perl6
21:55 pugs_svn r28520 | moritz++ | [t/spec] $thing ~~ "NaN" is not the same as $thing ~~ NaN
21:56 MartinTSW joined #perl6
22:00 moritz_ The Big Merge has landed
22:00 dalek joined #perl6
22:01 moritz_ and spammed #parrot ;-)
22:06 lanny Is numeric bit manipulation past 32 bits a known issue?
22:06 moritz_ in Rakudo yes
22:08 lanny I wonder if I still have a pugs commit bit.  I don't see any tests for that.
22:12 dalek rakudo: ffe6481 | moritz++ | docs/ChangeLog:
22:12 dalek rakudo: [docs] ChangeLog updates
22:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ffe648124f2c973e60d68fdec88438562d37411e
22:21 MartinTSW joined #perl6
22:23 diakopter lanny: what's your email address; I'll look
22:26 [particle] joined #perl6
22:26 lanny Well it's changed since I got laid off.  :/
22:26 lanny So my new one is Lanny.Ripple@gmail.com
22:27 lanny it was lanny@cisco.com (or maybe I used lan3ny@gmail.com even back then)
22:29 alfieANDfred joined #perl6
22:32 alfieANDfred joined #perl6
22:32 alfieANDfred joined #perl6
22:50 TimToady lanny: and do you want your svn nick to be lanny?
22:51 lanny I would.  That's not the same as the nick listed on commitbit.pugscode.org?
22:52 TimToady you were at lan3ny
22:52 TimToady you want that addr instead?
22:52 TimToady or the new one?
22:52 lanny I'll go with 'lanny'.
22:53 lanny Far fewer folks than I would think get the Tom Lehrer reference.
22:53 TimToady I mean the Lanny.Ripple addr
22:53 lanny oh.  I've got lan3ny@gmail as well so I'll keep that one.
22:53 TimToady I can resend the commitbit if you don't remember your password
22:53 lanny I did happen to remember it so that won't be needed.
22:54 TimToady okay
22:54 lanny Even put it on a yellow sticky this time.
22:54 TimToady welcome back aboard :)
22:54 lanny Thanks.
22:59 buubot joined #perl6
23:31 ihrd joined #perl6
23:33 ihrd left #perl6
23:33 tak11 joined #perl6
23:34 alfieANDfred joined #perl6
23:52 araujo joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo