Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-05-21

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:07 araujo joined #perl6
00:18 frew joined #perl6
00:27 araujo joined #perl6
00:29 ruoso joined #perl6
00:41 araujo joined #perl6
00:47 dalek rakudo: b516413 | pmichaud++ | src/ops/perl6.ops:
00:47 dalek rakudo: Add root_new dynop.
00:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b5164135efcec6c161bc7ea8f07bd0a2d15eb1d6
00:47 dalek rakudo: 20ec24c | pmichaud++ | src/builtins/ (11 files):
00:47 dalek rakudo: Convert new of parrot-based things to root_new (src/builtins)
00:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/20ec24c10d56d49a8fb07afe496ac1dc8a1748f8
00:47 dalek rakudo: 6079a97 | pmichaud++ | src/classes/ (20 files):
00:47 dalek rakudo: Convert new of parrot-based things to root_new (src/classes)
00:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6079a9751c4082a23b3f13abf3e3348d041aa23b
00:47 dalek rakudo: 064be63 | pmichaud++ | src/ (4 files):
00:47 dalek rakudo: More new -> root_new conversions.
00:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/064be6353842f878797873b245647b7652e29466
00:47 dalek rakudo: f08f5ad | pmichaud++ | :
00:47 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
00:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f08f5ad38b2d143d0941ac4712bdcad568885998
00:56 ruoso_ joined #perl6
01:01 bacek joined #perl6
01:09 frew joined #perl6
01:14 ruoso_ joined #perl6
01:18 Whiteknight joined #perl6
01:20 agentzh joined #perl6
01:22 Lorn joined #perl6
01:24 Lorn joined #perl6
01:42 ruoso_ joined #perl6
01:59 alc joined #perl6
02:01 cotto joined #perl6
02:10 ab5tract joined #perl6
02:12 kst joined #perl6
02:14 ruoso_ joined #perl6
02:19 viirya joined #perl6
02:27 mikehh_ joined #perl6
02:32 frew|wor1 joined #perl6
02:33 [particle]1 joined #perl6
02:37 sri_kraih_ joined #perl6
02:40 frew|wor2 joined #perl6
02:41 eternaleye joined #perl6
03:11 frew|wor1 joined #perl6
03:20 donaldh joined #perl6
03:46 orafu joined #perl6
03:53 justatheory joined #perl6
04:02 viirya joined #perl6
04:11 eternaleye joined #perl6
04:12 felipe joined #perl6
04:30 PerlJam ping
04:33 cotto joined #perl6
04:36 pmichaud pong
04:38 PerlJam What does rakudo do when the info from parrot_config is wrong?  (i.e., it says the bin_dir is /usr/local/bin, but if you haven't installed parrot, then that's probably not right)
04:38 pmichaud afaik, rakudo doesn't use bin_dir
04:39 pmichaud wait, I'll rephrase
04:39 pmichaud rakudo always assumes you're working from a build copy of parrot, and not an install copy.
04:39 pmichaud if you try to build rakudo using an installed parrot, you'll get EPIC FAIL
04:40 PerlJam so ... when Configure.pl's usage says "Use configuration information from config", it means "...except for the location of the parrot and pbc_to_exe executables"  >
04:40 finanalyst joined #perl6
04:41 PerlJam (because of the EPIC FAIL you just mentioned)
04:41 pmichaud no, it uses the location of the parrot and pbc_to_exe from parrot_config
04:41 pmichaud at least, I think it does.
04:41 pmichaud ah, I was originally correct -- Rakudo doesn't use @bin_dir@
04:41 pmichaud it currently bases everything off of @build_dir@
04:43 pmichaud (details are in build/Makefile.in)
04:43 PerlJam Well, mine really isn't a rakudo problem.  I was looking at cardinal, and it's makefile really does use everything from parrot_config, but some of those things are lies if you don't have an installed parrot.  I'm trying to figure the best approach ... emulate rakudo or try to stay true to the spirit of really using what parrot_config says, but have some way of overriding it.
04:44 pmichaud as soon as Parrot has its install house in order (which does appear to be happening rsn), then rakudo's configuration will likely be very clean.
04:44 PerlJam how s is rsn?
04:44 pmichaud I'm not sure what cardinal is using for its build environment.  Where's it located these days...?
04:44 pmichaud rsn = ~7 days, I'd guess.
04:45 * PerlJam hasn't really kept up with parrot lately other than to note that there was a release recently  :)
04:45 pmichaud partcl has also been having trouble building with parrot/installed parrot, but I think allison++ and Coke++ are making good progress on it
04:45 PerlJam http://github.com/cardinal/cardinal/tree/master
04:45 pmichaud and partcl's blockers seem to be the same as rakudo's blockers
04:46 PerlJam once again Coke++ bravely paves the way for others :-)
04:46 pmichaud yes, this has been noted.  :-)
04:47 pmichaud Cardinal seems to use the "installable_cardinal" rules; I've never liked those much.
04:47 pmichaud seems to me that there should be a "cardinal" that just works.
04:53 justatheory joined #perl6
05:02 japhb joined #perl6
05:26 Tene I didn't write most of the cardinal makefile... I'd *love* for someone to clean it up.
05:27 pmichaud I'm waiting for parrot's install target to evolve just a bit more, then I'm going to port Rakudo's build process to the create_language.pl script and say "This is how I really recommend everyone else manage it :-)"
05:27 frew|wor2 joined #perl6
05:36 Matt-W It would be nice to build against installed parrot
05:37 pmichaud Agreed, it would be nice.
05:37 frew|wor2 joined #perl6
05:40 Matt-W Not hugely important right now though
05:40 Matt-W As long as rakudo keeps needing updated parrots
05:40 pmichaud correct.
05:40 pmichaud I don't expect that situation to change until Jul/Aug at the earliest.
05:45 Matt-W That's okay, Christmas isn't in August :)
05:45 frew|wor1 joined #perl6
05:48 kst joined #perl6
05:51 Matt-W waking up an hour early really sucks
05:52 pmichaud worse than waking up an hour late?
05:52 Matt-W Yes
05:52 Matt-W I have leeway to be late to work
05:52 Matt-W I can't be much earlier than my usual time though
05:52 Matt-W And everything I want to do at home right now is really noisy - it's too early to disturb the neighbours by re-recording vocal tracks for my current project
05:56 Matt-W Ah well
05:56 Matt-W Nice weather, I can go for a walk
06:00 cognominal joined #perl6
06:10 hcchien_ joined #perl6
06:13 pmichaud well, too tired to reliably do the release tonight (before sleep), so I'll handle it early tomorrow morning.
06:14 pmichaud later # sleep
06:15 eternaleye joined #perl6
06:15 Tene pmichaud: ping
06:15 Tene pmichaud: you maintain paraplegic, iirc?  can I get commit there?
06:15 Tene aw, just missed him :(
06:15 dalek rakudo: e6b4630 | pmichaud++ | docs/ROADMAP:
06:15 dalek rakudo: Update ROADMAP.
06:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e6b4630cb76720240d036d4eb592d1bd8ddce35e
06:28 clkao_ joined #perl6
06:35 clkao joined #perl6
06:40 iblechbot joined #perl6
07:01 ejs joined #perl6
07:04 clkao_ joined #perl6
07:13 amoc joined #perl6
07:20 donaldh joined #perl6
07:24 araujo joined #perl6
07:42 ejs1 joined #perl6
07:46 jferrero joined #perl6
07:59 Su-Shee joined #perl6
07:59 Su-Shee morning all.
08:00 Matt-W Good morning Su-Shee
08:00 araujo joined #perl6
08:05 kst joined #perl6
08:08 donaldh left #perl6
08:25 pmurias joined #perl6
08:26 dakkar joined #perl6
08:29 DemoFreak joined #perl6
08:44 bacek joined #perl6
08:55 agentzh left #perl6
09:07 finanalyst joined #perl6
09:09 agentzh joined #perl6
09:12 jnthn morning 6folk
09:18 sbp hey jnthn
09:19 araujo joined #perl6
09:20 jnthn rakudo: sub infix:<wtf>($a, $b) { $a ~ "WTF" ~ $b }; my $x = 'OMG'; $x wtf= 'BBQ'; say $x;
09:20 p6eval rakudo e6b463: OUTPUT«OMGWTFBBQ␤»
09:21 jnthn How...delightful.
09:22 kst joined #perl6
09:23 masak joined #perl6
09:23 masak jnthn++ # meta-userops
09:23 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
09:23 masak @messages
09:23 lambdabot TimToady said 1d 10h 7m 56s ago: STD isn't trying to be a full POD parse yet, and I don't think writing the specs for it via the bug reporting system is going to be terribly efficient :)
09:23 masak @clear
09:23 lambdabot Messages cleared.
09:24 jnthn oh hai masak
09:24 masak oh hai jnthn
09:25 masak jnthn: I'm ashamed to admit that (just as with the parameterized roles) I realise that the userops are TEH COOLNESS, but I can think of no immediate application for them.
09:25 masak need to think some more, I guess.
09:26 jnthn masak: Well, I didn't see many people using user defined ops just yet either.
09:26 jnthn But if we get a set union operator from some Set module that is ∪
09:27 jnthn Then I guess you'd get
09:27 jnthn $set ∪= $other_set; # union of myself and another set
09:27 masak yes, that's kinda nice.
09:27 jnthn $union = [∪] @sets; # union of many sets
09:27 masak would probably want Latin-1 fallbacks to those as well.
09:27 jnthn Both of which I could see being useful.
09:28 PZt joined #perl6
09:28 masak that latter one is way cool.
09:28 jnthn u, n ;-)
09:28 masak oh, I should really pick some set-intensive well-known algorithm and blog about how it can be written in Perl 6.
09:28 * masak goes off to put laundry in machine
09:31 zpmorgan joined #perl6
09:32 dakkar rakudo: sub R { @_.join '-' }; sub RR { @_.join '_' }; say 'x' R 'y'; say 'x' RR 'y';
09:32 p6eval rakudo e6b463: OUTPUT«Statement not terminated properly at line 1, near "'-' }; sub"␤in Main (src/gen_setting.pm:0)␤»
09:33 dakkar rakudo: sub R($a,$b) { $a ~ '-' ~ $b }; sub RR($a,$b) { $a ~ '_' ~ $b }; say 'x' R 'y'; say 'x' RR 'y';
09:33 p6eval rakudo e6b463: OUTPUT«Statement not terminated properly at line 1, near "R 'y'; say"␤in Main (src/gen_setting.pm:0)␤»
09:33 jnthn dakkar: infix:<R>
09:33 dakkar argh, right
09:33 Matt-W Morning
09:33 jnthn hi Matt-W
09:33 masak dakkar: interesting idea. :)
09:33 dakkar rakudo: sub infix:<R>($a,$b) { $a ~ '-' ~ $b }; sub infix:<RR>($a,$b) { $a ~ '_' ~ $b }; say 'x' R 'y'; say 'x' RR 'y';
09:34 Matt-W jnthn: nice rakudo day work yesterday :)
09:34 p6eval rakudo e6b463: OUTPUT«x-y␤x_y␤»
09:34 masak Matt-W: hola, early riser. :)
09:34 Matt-W masak: it wasn't by choice, it was by worry
09:34 masak Matt-W: sorry about the car, btw.
09:34 dakkar now, apart from "don't do that", what should happen?
09:34 masak dakkar: try it! :)
09:35 Matt-W masak: at least they've recovered it, things can move on now
09:35 Matt-W masak: and one in custody too
09:35 masak dakkar: "don't do that" only applies after you've found out that what happens is really not what you want. :)
09:35 masak Matt-W: oh! a found stolen car. wow.
09:36 Matt-W masak: not all that unusual... especially when the thief crashes it
09:36 * masak senses there were drugs involved
09:36 Matt-W (into somebody else's car. In front of a police community support officer.)
09:36 dakkar masak: fair enough. the general question is: what should P6 do when meta-generated operators clash with user-defined subs? I *think* rakudo is doing a sensible thing, btw
09:37 masak dakkar: me too.
09:37 jnthn dakkar: Your definition just happens later and wins atm, but it's a little more ty accident than it perhaps should be.
09:37 masak depends on whether the auto-defined RR is considered a real sub. then it should perhaps complain.
09:37 jnthn Well, it's a real sub. Question is if we make it a multi...
09:37 jnthn But in that case we woulda got a failure here.
09:38 jnthn I'm not sure. The spec may have answers.
09:38 jnthn But I don't remember seeing any.
09:39 jnthn pmichaud++ # updated roadmap
09:39 clintongormley joined #perl6
09:40 * masak runs to check
09:40 masak rakudo: sub foo($a?) { say ?$a }; sub bar(@a?) { say ?@a }; sub baz(%a?) { say ?%a }; foo(); bar(); baz(); foo(1); bar([1]); baz({1=>2})
09:40 p6eval rakudo e6b463: OUTPUT«0␤0␤0␤1␤1␤1␤»
09:40 masak maybe I should content myself with this answer to the question "how do I check whether a param was passed?"
09:41 masak (even though it'll give a false negative when empty arrays/hashes are passed.)
09:41 jnthn masak: It's got a kind of symmetry to it. ;-)
09:41 masak jnthn: that's what I thought, too!
09:41 masak jnthn: good way to remember/explain it.
09:42 dakkar rakudo: sub foo($a?) { say ?$a }; foo(0)
09:42 p6eval rakudo e6b463: OUTPUT«0␤»
09:43 masak dakkar: ah, another false negative.
09:43 masak that's why I'd really prefer something like $param.defined
09:43 dakkar eh, it's the same problem of checking for truth intead of definedness
09:43 dakkar yeah
09:43 dakkar but it's still slightly wrong
09:43 masak aye.
09:43 masak it's "out-of-band", as someone pointed out.
09:43 dakkar is there so way to get at the capture that was passed in?
09:44 masak maybe it should really be a macro, like .WHAT
09:44 dakkar the capture should know which elements it has
09:44 masak dakkar: nice idea.
09:44 masak &*PROCEDURE.capture or something?
09:44 dakkar $?CAPTURE{a}.present, $CAPTURE[2].present, something like that (hand-wave, hand-wave)
09:45 dakkar or whatever, yeah
09:45 masak ah, &?ROUTINE
09:46 dakkar jnthn: about the meta-operator collision thing, S03 says that you can't modify with '!' forms that start with '!', and you can't modify with '=' forms that end with '='
09:47 jnthn dakkar: Ah, OK, so should probably be an error or some thing for those.
09:47 Casan joined #perl6
09:47 * masak submits rakuodbug
09:48 dakkar rakudo: sub infix:<R>($a,$b) { $a ~ '-' ~ $b }; say 'x' R 'y'; say 'x' RR 'y';
09:48 p6eval rakudo e6b463: OUTPUT«x-y␤y-x␤»
09:50 jnthn 1) Implement feature. 2) Tell masak. 3) Get bug reports. :-)
09:50 jnthn masak++
09:50 masak :P
09:50 masak (getting karma for OCD-ish behaviour)++
09:52 masak dakkar: I'm having second thoughts about your interpretation of the scriptures... um, specs.
09:53 dakkar masak: second thoughts are good
09:53 masak hard to put them into words, though.
09:53 masak granted, R is in the same category as = and !
09:54 masak but defining infix:<R> shouldn't be a problem. that's like defining infix:<!> or something.
09:54 dakkar and we wouldn't want to prevent the use of R with operators starting with R
09:55 * masak is too confused to explain
09:55 masak I'll just leave the bug report as it is, and let this sort itself out somehow :)
09:56 * jnthn going to do natural language study for a bit; back later
09:57 M_o_C joined #perl6
10:03 icwiener joined #perl6
10:10 viirya joined #perl6
10:33 cognominal joined #perl6
10:36 kate21de joined #perl6
10:38 [particle]2 joined #perl6
10:40 [particle]3 joined #perl6
10:41 pugs_svn r26898 | masak++ | [u4x/P2T1A] fixed typo
10:41 pugs_svn r26899 | masak++ | [u4x/TODO] added jdlugosz++' med_loop
10:42 meppl joined #perl6
10:47 zamolxes joined #perl6
10:51 windsok joined #perl6
11:08 payload joined #perl6
11:16 M_o_C joined #perl6
11:20 donaldh joined #perl6
11:29 [particle] joined #perl6
11:30 Jedai joined #perl6
11:33 [particle]1 joined #perl6
11:35 mizioumt joined #perl6
11:46 jonalv joined #perl6
11:46 jonalv uhm what does: "Method 'postcircumfix:{ }' not found for invocant of class 'Failure'" mean? :)
11:46 jnthn You tried to index into something as if it was a hash, but it's not actually a hash.
11:47 jnthn rakudo: my $foo; say $foo<x> # $foo is undefined, not something hash-ish
11:47 p6eval rakudo e6b463: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Failure'␤»
11:48 jonalv jnthn: hm intresting. I am pretty sure that the hash I am indexing should be an hash...
11:50 jnthn jonalv: Well, you could always have hit upon a compiler bug of some kind too.
11:50 jnthn Feel free to paste any code example you have that exhibits the problem.
11:51 jonalv jnthn: yea well it's not very clean code but if you wanna see it, sure...
11:53 jonalv http://pastebin.com/f316fbdb5
11:53 buubot jonalv: The paste f316fbdb5 has been copied to http://erxz.com/pb/17735
11:55 pmurias joined #perl6
11:56 jnthn jonalv: Did you get a line number where it's failing?
11:58 jonalv jnthn: no, but line 102 is the last output
12:02 jnthn jonalv: Oh, if I try to run it here I fail because of curl not being found :-(
12:02 jonalv jnthn: :(
12:02 jnthn jonalv: Are you running latest Rakudo? The error line reporting improvements only went in very recently...
12:02 jonalv jnthn: nope, I am not. I had help from masak to set this up and he is not here to help me now :)
12:03 jnthn Ah.
12:04 jnthn jonalv: I'm struggling to see exactly where it's failing. It doesn't look wrong.
12:05 jnthn I suggest stick a print statement in before for @keys -> $name { to see if we make it so far as the loop.
12:05 masak joined #perl6
12:05 masak rehi
12:05 masak jonalv: I'll start by backlogging.
12:05 jnthn masak: lol halp
12:05 mizioumt1 joined #perl6
12:05 masak jnthn: I'm on it. :)
12:06 jnthn masak++
12:06 jonalv masak: there you are :) You have that curl thingie right? :)
12:06 masak jonalv: let me backlog first. :)
12:06 jonalv masak: beer at bmc 18:00 btw :)
12:06 masak jonalv: dude, that is seriously OT. :P
12:07 masak (but thanks)
12:07 jonalv masak: might be but also seriously important :)
12:07 jnthn beer!
12:07 kane___ left #perl6
12:07 masak jonalv: I'd bet jnthn would agr... aye. :)
12:07 jnthn oh, wait, probably too far for me to travel.
12:08 masak jnthn: also, Sweden, thus expensive.
12:09 masak jonalv: ok. what has changed since the script didn't complain about 'curl' not being found?
12:09 jnthn masak: I think the real problem is the postcircumfix issue, not the curl one.
12:10 masak fair enough.
12:10 jnthn masak: I can't just get to the point where jonalv sees the failure because I don't have curl.
12:10 masak jnthn: aha, jonalv has curl, jnthn doesn't. gotcha.
12:11 masak jnthn: (what kind of operating system doesn't have curl?)
12:11 masak s/operating system/distribution/ :P
12:11 jonalv masak: well I seem to remember us installing it on my machine...
12:11 jnthn Hah!
12:12 masak I sit corrected.
12:12 masak ok, running script...
12:12 Su-Shee masak: i don't have. because I usally choose wget.
12:12 jonalv jnthn: well we don't get as far as that loop no
12:13 masak jonalv: that example.xml file, is it important?
12:13 masak oh, wait.
12:13 masak jonalv: you probably don't want to hard-code the path like you do now.
12:13 jonalv masak: lol although the name is really bad, Yes it's important it contains all the data..
12:13 masak jonalv: it's enough just to write it to $CWD.
12:14 * jonalv is thinking that masak could come over and do this face2face instead...
12:14 jonalv masak: what's $CWD? :)
12:15 masak jonalv: it's where you 'are' in the directory structure.
12:15 jonalv masak: handy
12:15 masak jonalv: it's in %*ENV, though, not a Perl 6 var per se.
12:16 masak jonalv: I would come over, but I need to Do Some Things(TM) first.
12:16 justatheory joined #perl6
12:16 * jonalv remembers spending long time fiddling with paths in Java. Perl++
12:16 masak ah, I have now reproduced the error.
12:17 jnthn masak: Does latest Rakudo give a line number for it? (should do...)
12:17 masak jnthn: not here. latest-latest or yesterday-ish?
12:19 jnthn Yesterday-ish.
12:20 jnthn masak: The fix was actually in Parrot though.
12:20 jnthn masak: So if you didn't already do so, make sure you have latest version of that.
12:20 masak jnthn: I usually update/recompile Parrot when recompiling Rakudo.
12:20 jnthn ok, then hmm
12:24 masak jnthn: your error occurs in the big %orePrices hash assignment somewhere.
12:25 ruoso joined #perl6
12:25 masak jnthn: you declare %prices, but never put any values in it.
12:25 masak rakudo: my %prices; say (1000 * %prices<Tritanium>) / 333
12:26 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤0␤»
12:26 masak question is why we don't just get that...
12:29 masak oh, sorry, there is actually data put into %prices on line 86.
12:29 jonalv masak: maybe you are talkign to me? %prices are populated at row 87
12:29 masak yes, just saw that...
12:29 ruoso Hello!
12:29 masak ruoso: y0!
12:30 jnthn masak: tab completion doesn't quite ahve psychic powers yet ;-)
12:31 jnthn ok, I need to eat, and then it's time for Slovak class.
12:31 masak jnthn: it doesn't exactly help my brain that you have the same first name. :/
12:31 jnthn masak: Well, you can call our mothers to complain... ;-)
12:32 masak jonalv: (got it right this time) ok, separating out the %orePrices decl, and prepending it with an empty %prices decl reproduces the error.
12:32 jnthn "Didn't you know names should be a GUID?"
12:32 masak jonalv: it gives 12 "Use of uninitialized value", and then dies with the postcircumfix:{ } thing.
12:32 * masak counts 12 hash indexings
12:33 masak jonalv: hah! found it! :)
12:33 masak jonalv: &prices<Nocxium>
12:33 masak (note the '&')
12:33 jonalv masak: aouch
12:33 masak jonalv: don't you use Ctrl+Y?
12:34 jonalv masak: I guess not... :(
12:34 masak rakudo: say &prices.WHAT
12:34 p6eval rakudo e6b463: OUTPUT«Failure()␤»
12:34 masak jonalv: there you go.
12:34 jonalv masak: thankyou :)
12:34 masak you'rewelcome :)
12:34 * jnthn bbiab
12:34 jonalv oh masak++ :)
12:35 masak @karma masak
12:35 lambdabot You have a karma of 190
12:35 masak jonalv: guess I spend quite some time here on #perl6 :)
12:35 jonalv masak: I don't need to guess... :)
12:36 masak @karma jonalv
12:36 lambdabot jonalv has a karma of 1
12:36 masak jonalv++ # welcome gift
12:36 jonalv :)
12:43 masak jonalv: your script now runs to completion here.
12:43 jonalv masak: here too, the LaTeX output is not ideal though. Something to do after I have grabbed some food :)
12:53 finanalyst my %x=<a b c>Z(1,2,3);%x.perl.say
12:53 finanalyst rakudo:my %x=<a b c>Z(1,2,3);%x.perl.say
12:53 finanalyst rakudo: my %x = map { $_ => <a b c> Z (1,2,3) },<one two three>;%x.perl.say
12:53 p6eval rakudo e6b463: OUTPUT«Odd number of elements found where hash expected␤in Main (/tmp/6j9EMBdynd:1)␤»
12:53 smtms joined #perl6
12:54 finanalyst rakudo: my %x=<a b c>Z(1,2,3);%x.perl.say
12:54 p6eval rakudo e6b463: OUTPUT«{"a" => 1, "b" => 2, "c" => 3}␤»
12:54 finanalyst is the problem here to do with autovivication?
12:55 PacoLinux_ joined #perl6
12:56 dakkar rakudo: my %x = map { $_ => ( <a b c> Z (1,2,3) ) },<one two three>;%x.perl.say
12:56 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/znKmuOytpj:1)␤»
12:56 dakkar hmm
12:56 riffraff joined #perl6
12:57 dakkar rakudo: my %x = <one two three>.map: { $_ => ( <a b c> Z (1,2,3) ) };%x.perl.say
12:57 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤Parameter type check failed; expected something matching Callable() but got something of type Hash() for expr in call to map␤in method Any::map (src/gen_setting.pm:30)␤called from Main (/tmp/aHjGf0l7eE:1)␤»
12:57 dakkar rakudo: my %x = <one two three>.map: -> { $^a => ( <a b c> Z (1,2,3) ) };%x.perl.say
12:57 p6eval rakudo e6b463: OUTPUT«Cannot use placeholder var in block with signature. at line 1, near " => ( <a b"␤in Main (src/gen_setting.pm:1959)␤»
12:57 dakkar rakudo: my %x = <one two three>.map: -> ($a) { $a => ( <a b c> Z (1,2,3) ) };%x.perl.say
12:57 p6eval rakudo e6b463: OUTPUT«Statement not terminated properly at line 1, near ": -> ($a) "␤in Main (src/gen_setting.pm:0)␤»
12:58 * dakkar shows to the world that he did not keep up with the last several months of synopses…
12:59 masak rakudo: my %x = <one two three>.map: -> $a { $a => ( <a b c> Z (1,2,3) ) };%x.perl.say
12:59 p6eval rakudo e6b463: OUTPUT«{"one" => ["a", 1, "b", 2, "c", 3], "two" => ["a", 1, "b", 2, "c", 3], "three" => ["a", 1, "b", 2, "c", 3]}␤»
12:59 masak rakudo: my %x = <one two three>.map: { $^a => ( <a b c> Z (1,2,3) ) };%x.perl.say
12:59 p6eval rakudo e6b463: OUTPUT«{"one" => ["a", 1, "b", 2, "c", 3], "two" => ["a", 1, "b", 2, "c", 3], "three" => ["a", 1, "b", 2, "c", 3]}␤»
12:59 masak dakkar: et voila.
13:00 finanalyst why does this work and the original not?
13:00 masak finanalyst: which original?
13:00 masak finanalyst: the one with '-> { $^a' ?
13:00 dakkar no, his one :)
13:00 finanalyst my %x = map { $_ => <a b c> Z (1,2,3) },<one two three>;%x.perl.say
13:00 dakkar I was just failing miserably at making it work
13:01 masak finanalyst: might be something with '=>` and 'Z'. try using parens.
13:02 finanalyst rakudo: my %x = map { $_ => (<a b c> Z (1,2,3)) },<one two three>;%x.perl.say
13:02 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/myvW4MQPhR:1)␤»
13:02 finanalyst rakudo: my %x = map { $_ => %(<a b c> Z (1,2,3)) },<one two three>;%x.perl.say
13:02 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/uuw4BOcTsy:1)␤»
13:03 masak finanalyst: I know what's going on.
13:03 masak finanalyst: the {} after the map: is interpreted as a Hash, not a Code.
13:04 finanalyst yes that has happened to me several times. How to disambiguate?
13:05 masak rakudo: say { $_ => (<a b c> Z (1,2,3)) } ~~ Code
13:05 p6eval rakudo e6b463: OUTPUT«Use of uninitialized value␤0␤»
13:05 masak rakudo: say {; $_ => (<a b c> Z (1,2,3)) } ~~ Code
13:05 p6eval rakudo e6b463: OUTPUT«1␤»
13:05 masak finanalyst: like that :)
13:05 finanalyst thanx
13:05 masak np.
13:06 finanalyst rakudo: my %x = map {; $_ => <a b c> Z (1,2,3) },<one two three>;%x.perl.say
13:06 p6eval rakudo e6b463: OUTPUT«Odd number of elements found where hash expected␤in Main (/tmp/HREsTyviY0:1)␤»
13:06 masak (I think this will be one of the big traps in using map)
13:06 masak finanalyst: parens.
13:06 finanalyst rakudo: my %x = map {; $_ => (<a b c> Z (1,2,3)) },<one two three>;%x.perl.say
13:06 p6eval rakudo e6b463: OUTPUT«{"one" => ["a", 1, "b", 2, "c", 3], "two" => ["a", 1, "b", 2, "c", 3], "three" => ["a", 1, "b", 2, "c", 3]}␤»
13:07 finanalyst but why [] and not {} after keys?
13:07 finanalyst eg. "two" => ["a", 1, "b", 2, "c", 3],
13:07 masak finanalyst: because the values you put in are anon Lists.
13:08 finanalyst rakudo: my %x = map {; $_ => %(<a b c> Z (1,2,3)) },<one two three>;%x.perl.say
13:08 p6eval rakudo e6b463: OUTPUT«{"one" => {"a" => 1, "b" => 2, "c" => 3}, "two" => {"a" => 1, "b" => 2, "c" => 3}, "three" => {"a" => 1, "b" => 2, "c" => 3}}␤»
13:08 masak rakudo++
13:09 finanalyst need for lots of explanation for map on this.
13:12 masak indeed.
13:12 DemoFreak joined #perl6
13:12 * masak makes mental note to write this in u4x
13:22 riffraff joined #perl6
13:24 ispy_ joined #perl6
13:33 lichtkind joined #perl6
13:33 lichtkind masak: howdy
13:33 masak lichtkind: good day, sir.
13:34 lichtkind masak: no formal please, its here mans day so guy drinkin in the woods and normal people sit in front of TFT as always
13:34 lichtkind masak: still haven't heard from viklund
13:34 masak lichtkind: me neither.
13:38 justatheory joined #perl6
13:38 masak lichtkind: he has periods when he's very busy and AFK. he has a one-year-old daughter.
13:40 lichtkind ah
13:46 skids joined #perl6
13:49 tulcod joined #perl6
13:56 lichtkind masak: have you any reciepe to cur emy bad mood :) ?
13:56 masak lichtkind: oh, sure! hold on.
13:57 nothingmuch joined #perl6
13:57 masak rakudo: sub infix:<///>($a, $b) { "don't $a, be $b :)" }; say 'worry' /// 'happy'
13:57 p6eval rakudo e6b463: OUTPUT«don't worry, be happy :)␤»
14:01 Matt-W everyone's playing with operators
14:01 Matt-W rakudo: sub infix:<///>($a, $b) { "don't $a, be $b :)" }; say 'worry' R/// 'happy'
14:01 p6eval rakudo e6b463: OUTPUT«don't happy, be worry :)␤»
14:03 justatheory joined #perl6
14:04 lichtkind Matt-W: that doenst rises my mood either :)
14:04 masak rakudo: role HelpYouRelax { method relax() { ... } }; class Beer does HelpYouRelax { method relax() { 'have a beer' } }; class Perl6Hacking does HelpYouRelax { method relax() { 'write some Perl 6 code' } }; say ([Beer, Perl6Hacking].map: { .relax }).join(' and ').ucfirst
14:05 p6eval rakudo e6b463: OUTPUT«Have a beer and write some Perl 6 code␤»
14:06 skids pmichaud++ for much more illuminating ROADMAP
14:06 skids It's like, actually a map now :-)
14:06 lichtkind ah evil illuminati
14:07 PerlJam skids: does it have a "you are here" sign on it?
14:07 * masak looks forward to the journey on the ROADTERRITORY
14:08 skids PerlJam: just about.  It does actually tell you where things stand.
14:08 * PerlJam reads
14:09 exodist joined #perl6
14:09 masak yes, pmichaud++. the ROADMAP is very informative.
14:10 lichtkind where is the roadmap to be found?
14:10 masak huh, do we expect the heredoc spec to evolve substantially?
14:10 masak lichtkind: Rakudo repo, docs/ROADMAP.
14:10 skids docs/ROADMAP
14:11 masak http://github.com/rakudo/rakudo/blob/master/docs/ROADMAP
14:12 lichtkind masak: thanks i searched in the parrot git
14:12 masak but Parrot uses SVN... :)
14:13 lichtkind you know what i mean :)
14:14 PerlJam A, E, and F seem important and not so dependent on parrot changes necessarily
14:15 * skids was actually surprised at the high level of activity over on #parrot
14:15 skids I don't think we should think of Parrot issues as a stone wall.
14:15 Chillance joined #perl6
14:16 PerlJam I don't.  It's just that parrot has a different pace and sometimes different priorities.
14:22 pmichaud good morning, #perl6
14:22 alester joined #perl6
14:23 PerlJam good morning pm
14:23 PerlJam morning alester
14:23 alester howdy
14:23 * jnthn is back
14:26 masak pmichaud: good morning. nice ROADMAP!
14:26 * jnthn read the roadmap too.
14:28 pmichaud masak:  it's not that the heredoc specs will change as much as the fact that STD.pm will evolve to support it
14:28 pmichaud I include STD.pm in "spec" these days.
14:30 * pmichaud starts building a release tarball candidate.
14:30 masak pmichaud: I see.
14:32 pmichaud I do expect to detail out the roadmap just a bit more -- e.g., to give sub-points (H1, H2, H3) to some of the major items and update the tasks to match
14:32 pmichaud but this was good enough to be able to release :-)
14:34 dalek rakudo: d163016 | pmichaud++ | docs/spectest-progress.csv:
14:34 dalek rakudo: spectest-progress.csv update: 392 files, 11342 passing, 0 failing
14:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d163016c925fb2b256835baac1d57a43626bf059
14:35 jnthn rakudo: say "omgz I passes { 11342 - 10467 } more tests this release!"
14:35 p6eval rakudo e6b463: OUTPUT«omgz I passes 875 more tests this release!␤»
14:35 dalek joined #perl6
14:38 PerlJam pmichaud: what does "early Summer 2009" mean?  :)
14:44 pmichaud before July 15
14:49 pmichaud also, note that A (pge refactors) has some big parrot dependencies in the notion that whatever happens there has to be wary of Parrot deprecation issues
14:51 pmichaud masak: should I add a note to the release announcement that Stockholm.pm is holding a p6 hackathon?
14:52 masak pmichaud: that might be nice. it's on the 29th. do you need the address also?
14:52 pmichaud web address if one is available, yes
14:53 masak no URL for the hackathon specifically, I'm afraid. :/
14:53 pmichaud oh, that's okay then
14:53 pmichaud (yes, I'd still like a url though)
14:53 pmichaud (to stockholm.pm)
14:53 * pmichaud googles
14:54 pmichaud heh
14:54 masak http://vic20.blipp.com/pipermail/kameler/2009-May/000316.html
14:54 FurnaceBoy joined #perl6
14:54 pmichaud the hackathon is announced on stockholm.pm's home page, but since it doesn't have any year information on it someone might think it was done in May 2008 :-)
14:55 jferrero joined #perl6
14:55 masak actually, this whole thread is relevant... http://vic20.blipp.com/pipermail/kameler/2009-April/
14:56 masak pmichaud: I could email someone and ask them to add a year to the homepage.
14:56 pmichaud it was more an observation on my part than trying to get it fixed :-)
14:57 nihiliad joined #perl6
14:58 jnthn masak: HOw many days is the hackathon?
14:58 masak jnthn: one, barely. :)
14:58 masak Stockholm.pm is a very modest PM group. :)
15:00 masak it's scheduled from 10:00 to 16:00.
15:00 jnthn :-)
15:00 pmichaud 6 hours isn't bad at all :-)
15:00 jnthn Aye.
15:01 masak also, the necessary ingredients from Oslo (pizza and soft drinks) are there. :)
15:01 dalek joined #perl6
15:01 pmichaud I suspect several hundred new RT tickets will show up.  :-)
15:01 masak and I'm sort of hoping that people will be wowed and want more...
15:01 jnthn masak: whatnobeer?
15:01 jnthn ;-)
15:01 masak jnthn: only Ubuntu cola has been promised. :)
15:01 jnthn masak: I can't make it (virtually or physically) though, I'm afraid. :-(
15:02 jnthn I'm travelling back from vacation that day.
15:02 jnthn Otherwise I'd arrange to at least be on IRC at the same time.
15:02 masak jnthn: you'll have to let your work speak for itself on that day. :P
15:02 pmichaud I might be able to be around.
15:02 pmichaud I'll put it on my calendar, at any rate.
15:03 jnthn .oO( what do 50 RTs speak like? )
15:03 masak excellent.
15:03 masak jnthn: sounds like a modern Zen riddle.
15:04 masak was the Parrot release delayed somewhat this month?
15:04 pmichaud what time is it in stockholm now?  (So I can compute the time offset)
15:04 masak pmichaud: five o'clock.
15:04 pmichaud okay, 7 hrs (same as usual)
15:05 pmichaud thanks.
15:05 Infinoid masak: We had to track down someone with upload permissions to the ftp site, which took an extra day
15:05 masak pmichaud: I guess it only differs if we have different DST dates.
15:05 masak Infinoid: ah. I think I read something in the #ps logs about an absentee release manager.
15:06 Infinoid Yeah, I took over for tewk
15:06 pmichaud Infinoid++
15:06 pmichaud Infinoid: this was your first release, yes?
15:06 Infinoid yeah.  But don't ++ me unless you can tell me everything actually worked :)
15:06 masak the more I learn about the Parrot development process, the more impressed I get.
15:07 pmichaud on a similar note, the issue of release managers for Rakudo came up again in yesterday's Perl 6 design meeting
15:07 Infinoid There are a lot of really smart people involved in parrot.  (And in rakudo, too.)  I've learned a lot just by attempting to hang onto their coattails
15:07 pmichaud I already have the release instructions typed up, so I'll be looking for volunteers for upcoming releases :-)
15:08 pmichaud (the point being to keep our release bus number low)
15:08 pmichaud er, high
15:08 pmichaud er. whatever
15:08 jnthn bus number?
15:09 * jnthn finds the 69 to the airport useful
15:09 pmichaud bus number:  aka "trunk number" sometimes
15:09 pmichaud basically, the number of people who if hit by a bus would cause development to halt.
15:10 pmichaud er, "truck number"
15:10 jnthn So basically it's not great for Rakudo if we cross the road together?
15:10 pmichaud jnthn: or ride a bus/train together :-)
15:11 pmichaud the trip from the oslo hackathon to dinner was particularly perilous for Perl 6 development, given that you, me, and TimToady were all on the same train :-)
15:12 jnthn Phew, Perl 6 got off lightly that night.
15:12 jnthn :-)
15:14 masak 'is also' is deprecated/replaced by 'augment'. what about infix:<also> ?
15:15 jnthn There's an infix:<also> also?
15:15 pmichaud it's a junction operator
15:16 jnthn ah, sounds rather unrelated then.
15:16 pmichaud I suspect it remains infix:<also>
15:16 pmichaud $target ~~ MyType also .mytest1 also .mytest2
15:16 masak ah, S03:932 still mentions it.
15:17 pmichaud it's the same as infix:<&>, but order of evaluation guaranteed.
15:19 rjh crazy thought
15:20 pugs_svn r26900 | masak++ | [u4x/TODO] special variables
15:20 pugs_svn r26900 | masak++ |
15:20 pugs_svn r26900 | masak++ | This list might not be complete. Additions welcome.
15:20 pugs_svn r26901 | masak++ | [u4x/TODO] 'is also'/'is instead' are dead, long live 'augment'/'supersede'!
15:20 rjh is it on the cards for eval (with another parrot language) to transparently pass lexicals - scalars, maybe arrays and hashes too - to the eval block
15:20 pmichaud yes, but it's not clear that the other language would always know how to access them.
15:21 rjh i suppose the ideal is that a perl6 hash becomes a python dictionary
15:21 rjh and so on
15:21 pmichaud but yes, the lexicals would be available to the eval block
15:21 donaldh joined #perl6
15:22 jnthn rjh: I imagine it's not really that it'd "become" one, just that you could use it mostly like one.
15:22 TimToady but it's not like python understands either lexical scoping or sigils though...
15:23 pmichaud we might make MY:: available as a python dictionary, though.
15:23 TimToady would have to deal with sigils still
15:23 TimToady so access would have to be explicit
15:23 pmichaud masak:  how does this look?   http://gist.github.com/115520
15:24 masak pmichaud: looks excellent.
15:26 pmurias joined #perl6
15:27 Su-Shee what's druid?
15:27 Su-Shee got it.
15:29 dalek rakudo: 7c5be8b | pmichaud++ | docs/ROADMAP:
15:29 dalek rakudo: Minor ROADMAP improvement.
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7c5be8ba2b089897f5fcb474ffb5eb430f10b63d
15:29 dalek rakudo: 97c7cec | pmichaud++ | docs/ChangeLog:
15:29 dalek rakudo: ChangeLog updates for release
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/97c7ceceb90627307f4d5dca4524d939f4ee28e6
15:29 masak Su-Shee: I re-discovered this game in November (the month) last year. I still haven't gotten over how great it is. we still mostly play it with lego pieces -- this might change after I finish the SVG view, though. :)
15:29 dalek rakudo: dafdc06 | pmichaud++ | docs/announce/2009-05:
15:29 dalek rakudo: Final 2009-05 announcement updates.
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/dafdc0684488b0a00591055248b83bf4c525bf31
15:29 pmichaud Mmmm, new Lego store opened here this past Friday.
15:30 pmichaud Place was completely packed.
15:30 justatheory joined #perl6
15:30 Su-Shee masak: i was just thinking that i read (i think) every piece of news about perl6, but i just found perl6-projects.org ...
15:30 masak :)
15:31 Su-Shee this is not good. :)
15:31 masak Su-Shee: fwiw, Druid is really fun code to work on. it's looking for developers with my love for the game, who have more spare tuits than I do.
15:32 Su-Shee masak: get a number, my "i would like to code in perl 6" list is enough for until perl7 is available. ;)
15:33 masak Su-Shee: talk is cheap. go and write some Perl 6 code. :P
15:33 Su-Shee i did yesterday and today!
15:33 masak where is it?
15:33 * pmichaud makes a tarball, starts spectesting it.
15:33 pmichaud bbiab
15:34 Su-Shee masak: not working right now, mostly. have to read up some stuff.
15:34 masak Su-Shee: you know you can get very good help here, if you just post your code?
15:35 Su-Shee masak: will do, got me a git account already.
15:35 dalek rakudo: c4fa3ba | pmichaud++ | docs/release_guide.pod:
15:35 dalek rakudo: Update docs/release_guide.pod .
15:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c4fa3ba841ecc6392c6124ae908efa61f2760098
15:35 masak Su-Shee++
15:35 Psyche^ joined #perl6
15:37 finanalyst left #perl6
15:40 pmurias TimToady: a partial solution to python's lack of sigils would be to add it automatically is cases where's the no ambiguity
15:40 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
15:43 payload joined #perl6
15:45 masak .oO( the backside of DWIM is that the 'I' makes it subjective -- so, unless the behaviour is parameterized on the actual user of the feature, there will always be people for whom things don't DWIM )
15:48 TimToady we actually optimize for DWMPM, because some subset of MP will be more than happy to tell I exactly how I am being an idiot :)
15:50 masak :)
15:50 masak TimToady: speaking of that...
15:51 masak TimToady: have you ever used map in Perl 6, only to find that you supplied a Hash, and not a Code?
15:52 TimToady yes, it's just not clear how best to fix that
15:52 masak indeed not.
15:52 masak the only solution I can think of is giving map another multi variant which takes a Hash...
15:53 TimToady problem is the $_ is bound too early
15:53 masak oh, right.
15:53 pmichaud but the hash-multi variant could warn
15:53 * masak likes that
15:53 pmichaud "You sent me a hash... you probably wanted a block"
15:53 TimToady well, but if we're gonna special case it, then we might as well warn at compile time
15:53 jnthn When are people accientally sending hashes?
15:53 TimToady if we compile a hash as the first arg to a map, blow up
15:54 jnthn Oh
15:54 TimToady you mean besides all the time? :)
15:54 pmichaud jnthn:   map { $_ => rand }, @vals
15:54 jnthn map { a => 42 } ...
15:54 jnthn Right.
15:54 jnthn Yeah. When syntactic cleverness bites back.
15:54 TimToady well, when lack of ASCII brackets bits back, really
15:54 pmichaud well, if we can detect it at compile time, then perhaps we should suppress the "make this a hash" response
15:55 pmichaud i.e., a block to map is always a closure, never a hash
15:55 Tene It's always kind of bugged me how {} still means 'hash' in perl 6.  if we can do the same in ()s, what do we need {} for?
15:55 Tene i think I'm missing something, though.
15:55 masak pmichaud: but... that would be a special case! :/
15:55 jan___ joined #perl6
15:55 pmichaud masak: it's a special case either way
15:55 TimToady lists of pairs can be useful unhashified
15:56 TimToady or arrayified, so can't use either () or []
15:56 masak pmichaud: yes, but this special case would allow code to run that didn't run before...
15:56 TimToady %() works, but nobody uses it
15:56 pmichaud if we got rid of { ... } as hash, then I suspect a lot of folks would start using %(...)  :-)
15:56 Tene We could, though.  Overloading {} for both code and hash has always bothered me.
15:57 pmichaud but yes, it does lose the connection to postcircumfix:<{ }>
15:57 Tene obviously we need postcircumfix:<%( )> ;)
15:57 masak yuck. :)
15:58 TimToady that would probably be the ksh answer :)
15:58 TimToady I think a quick rap on the knuckles at compile time is probably best, for now
15:59 masak nod.
15:59 jnthn multi method map (%h where { .keys >>==<< OUTER::$_ }) { ... } # ;-)
15:59 TimToady either that, or disallow $_ in hash composers entirely
15:59 jnthn erm, CALLER
15:59 * masak away (for reasons to with beer)
16:00 jnthn and cmp
16:00 jnthn gah
16:00 * jnthn still brain dead after a fight with IIS
16:01 Tene ouch
16:01 Tene jnthn: you're volunteering to port mod_parrot to IIS, right?
16:02 rjh {} / [] is used by ruby, python, javascript
16:02 jnthn Tene: plz no :-S
16:02 rjh but i suppose that's a weak argument as perl6 is significantly different to those in syntax
16:02 TimToady thinking seriously about banning $_ in hash composers
16:02 kst` joined #perl6
16:08 TimToady I think that would largely fix the problem.  In the cases you want a hash composer to interpolate $_, you can always use the %( $_ => xxx ) form unambiguously
16:09 TimToady should outlaw placeholders too
16:09 pmichaud do we examine the entire block for $_ ?
16:09 TimToady anything outside of inner {}, I imagine
16:09 TimToady I'm thinking context var in STD
16:10 pmichaud anyway, that would work.
16:10 pmichaud How about "any block with a signature"?
16:11 TimToady well, a $_ in a .{$_} should probably also scotch it
16:11 pmichaud (or with explicit $_)
16:11 TimToady yes, the exception is actually that in the case we might notice top-level =>, we force $_ to mean I have a sig
16:12 TimToady like a placeholder
16:12 pmichaud oooh, that can work.
16:12 Su-Shee left #perl6
16:12 zpmorgan_ joined #perl6
16:13 TimToady we'll get the opposite error of people writing map { { $_ => xxx } }, @list
16:13 TimToady but probably not so often
16:13 TimToady oh, wait, is that a bare block, or isn't it?
16:14 TimToady either way, still doesn't DWTM
16:16 TimToady but I think people want to map hashes a lot less often than they want to map pairs
16:16 TimToady so it's still a net win
16:16 dalek joined #perl6
16:16 iblechbot joined #perl6
16:17 bacek joined #perl6
16:42 gbacon joined #perl6
16:43 [particle] joined #perl6
16:53 pmichaud #17 ("Stockholm") released.
16:54 justatheory joined #perl6
16:55 jnthn pmichaud++
16:56 dalek rakudo: 79d0b9a | pmichaud++ | docs/release_guide.pod:
16:56 dalek rakudo: Fix "git push --tags" in docs/release_guide.pod .
16:56 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/79d0b9a3bcce16778ebbb64b9caae87eac46686e
17:03 pmichaud I did the fixes for "root_new", but it turned out to not help too much for the release.  Most of the problem cases are in PGE (and we're stuck with the released version of Parrot for that)
17:04 pmichaud anyway, we'll get a performance win when I convert PGE across.
17:04 pmichaud (so will all of the other hlls)
17:05 pmichaud afk for a while # many errands to run
17:05 PerlJam pmichaud: you mentioned that the roadmap was in no particular order, but the first thing was PGE ... do you think that's also the most important?
17:05 pmichaud PerlJam: it is to me :-)
17:05 PerlJam good :-)
17:05 pmichaud lots of wanted/desired features (adverbs, better operator overloading, etc)  really depend on PGE updates
17:05 * PerlJam grabs lunch
17:06 pmichaud really afk
17:17 brunov joined #perl6
17:18 finanalyst joined #perl6
17:28 finanalyst i was looking at S06 for optional parameters and came across this:Missing optional arguments default to their default values, or to an undefined value if they have no default. (A supplied argument that is undefined is not considered to be missing, and hence does not trigger the default. Use //= within the body for that.)." What does the last sentence mean? What is //= ?
17:29 justatheory joined #perl6
17:30 PerlJam // is the "defined or" operator.  $a //= $b  means the same as "if $a is defined, do nothing, otherwise assign $b to $a"
17:31 Kisu joined #perl6
17:31 finanalyst Perljam: thanx
17:34 [particle]1 joined #perl6
17:46 bacek joined #perl6
17:48 M_o_C joined #perl6
17:59 masak that can still trip people up, IMNSHO.
18:00 masak rakudo: sub foo(%bar?) { %bar //= { 'default' => 'value' }; say %bar.perl }; foo()
18:00 p6eval rakudo 79d0b9: OUTPUT«Cannot assign to readonly variable.␤in sub foo (/tmp/jfLajrumzM:1)␤called from Main (/tmp/jfLajrumzM:1)␤»
18:00 masak oh, right.
18:01 masak rakudo: sub foo(%bar? is rw) { %bar //= { 'default' => 'value' }; say %bar.perl }; foo()
18:01 p6eval rakudo 79d0b9: OUTPUT«{}␤»
18:01 masak expected? I think not.
18:01 Tene Does rakudo support default values yet?
18:02 masak Tene: in params? yes.
18:02 Tene yes.
18:02 masak rakudo: sub foo($value = 42) { say $value }; foo
18:02 p6eval rakudo 79d0b9: OUTPUT«42␤»
18:02 masak it even supports them in variable declarations :)
18:03 masak rakudo: my ($value = 42) = 5; say $value
18:03 p6eval rakudo 79d0b9: OUTPUT«5␤»
18:03 Tene rakudo: sub bar(%bar = { 'default' => 'foo'}) { say %bar.perl }; bar()
18:03 p6eval rakudo 79d0b9: OUTPUT«{"default" => "foo"}␤»
18:03 masak Tene: point taken.
18:03 TimToady also %bar //= {...} is wrong
18:03 masak that essentially destroys that argument.
18:03 PerlJam masak: hashes have a default value of {} ?
18:03 TimToady since it should be a binding
18:04 masak PerlJam: yes.
18:04 * PerlJam is confused.
18:04 PerlJam why?
18:04 TimToady %bar //= (...) would at least be less wrong
18:04 PerlJam TimToady: %bar //= %(...)   ?
18:04 masak PerlJam: in order for 'my %hash;' do DTRT.
18:04 PerlJam masak: ah ... we just have eager autovivification then.
18:04 TimToady well, yes, I guess we fixed that in p6
18:05 masak TimToady: oh, I was overzealous with those curly braces, true.
18:06 abra joined #perl6
18:07 masak my point was that %bar wasn't undefined, and that this might surprise some people.
18:09 PerlJam but it should have been.
18:09 masak PerlJam: not by current spec, no.
18:09 TimToady reference?
18:10 masak TimToady: finanalyst gave it above.
18:10 masak the one in S06.
18:10 masak since the default value of Hash is {}, and since {}.defined is True...
18:11 TimToady the default value of Hash is Hash, which is an undef
18:11 PerlJam masak: where in the spec does it say that the default value of Hash is {} ?
18:11 PerlJam what TimToady said
18:11 masak oh.
18:11 masak so Rakudo does the wrong thing here?
18:12 PerlJam That would be my take on it.
18:12 TimToady I think so, though perhaps it should get unhappy earlier insofar as Hash isn't a valid rw ref
18:12 masak that's the best news I've had since pmichaud implemented user defined operators.
18:13 TimToady either that, or rw forces autoviv, and results in {}
18:13 masak oh.
18:13 masak so then we're back to where it's defined after all.
18:13 TimToady well, it *is* binding to rw that causes autoviv
18:14 masak so if I don't do that, I'm home free? then I can use .defined to check whether it was passed or not?
18:14 TimToady yes, but you can't set it.  :)
18:14 masak right.
18:14 masak I think I'm pleased with such a compromise.
18:14 PerlJam that still might trip people up  though.
18:14 masak sure, but they're fewer now. :P
18:15 masak we're heading in the right direction, amount-of-people-being-tripped-up-wise.
18:15 TimToady yes, that was my precise argument for disallowing $_ in hash composer
18:15 PerlJam TimToady: does the same hold for is copy?
18:15 TimToady I don't think so
18:15 TimToady nor for is ref
18:16 masak are 'rw' and 'copy' considered keywords?
18:16 TimToady they're traits, and we're still nailing down exactly which namespace nontype traits live in
18:16 masak ok.
18:16 TimToady but possibly they're keywords in a syntax category sense
18:17 masak u4x/TODO has them under 'declaration keywords'.
18:17 TimToady that is, there's a trait_name:sym<copy> that is only looked for within the trait parser
18:17 masak is 'cow' still with us?
18:17 TimToady I thought we just removed that
18:17 masak I see.
18:17 masak so if I wanted copy-on-write semantics...?
18:18 TimToady ask for a copy, and it's implementation defined whether to emulate copy with cow
18:18 TimToady which is the point of cow, after all
18:18 TimToady to look like a copy
18:18 masak yes.
18:18 masak very well.
18:19 pugs_svn r26902 | masak++ | [u4x/TODO] added 'copy' and 'ref' parameter traits
18:19 masak rakudo: my ($a is readonly) = 5; say $a; $a = 42; say $a
18:19 p6eval rakudo 79d0b9: OUTPUT«5␤42␤»
18:19 PerlJam heh
18:19 * masak submits rakudobug
18:20 masak which behaviour do I expect? is the 5 assignment allowed?
18:20 masak probably not, right?
18:20 TimToady allowed
18:20 masak ok.
18:20 TimToady assignment semantic analyzer always has to look at left side to see if a declarator governs semantics
18:20 PerlJam surely the assignment must be allowed.  How do you get a value otherwise?
18:21 masak PerlJam: my ($a is readonly = 5)
18:21 TimToady (my $a is readonly) = 5 would not be allowed
18:21 TimToady well, probably not
18:22 masak ok, so _not_ allowed... :)
18:22 PerlJam masak: well, there's 3 different initialization forms we just talked about.  Which are you referring to?  :)
18:22 TimToady only my form is disallowed
18:22 TimToady er
18:22 TimToady the form I said
18:22 PerlJam heh
18:22 masak PerlJam: the one TimToady just disallowed.
18:23 TimToady it's like difference between state $x = 0 and (state $x) = 0
18:23 masak everything you say will be used against you in the bug report :)
18:24 PerlJam my ($a is readonly, $b is readonly = 5) = 6;   # does this work?
18:24 PerlJam ($a = 6 and $b = 5)
18:24 masak PerlJam: not if the '(my $a is readonly) = 5' doesn't work.
18:24 masak PerlJam: seems like the same situation with your $a.
18:25 TimToady no, it's not
18:25 masak :)
18:25 TimToady the my is outside
18:25 TimToady (my vs my (
18:25 masak oh!
18:25 masak I missed that!
18:25 masak important distinction...
18:25 TimToady I've been saying nothing else for a month
18:25 * PerlJam gets masak some TimToady specs
18:25 jferrero left #perl6
18:26 TimToady well, a minute, anyway
18:26 masak sorry, I should pay more attention... :P
18:26 masak oh, ok. I see now.
18:26 masak there's no way I can explain this in the bug report save for quoting the whole thing, misunderstanding and all. :)
18:27 TimToady consider it an exercise in integrity :)
18:28 * masak does that
18:30 masak rakudo: (my $a is readonly) = 5; say $a
18:30 p6eval rakudo 79d0b9: OUTPUT«5␤»
18:31 PerlJam rakudo: my ($a is readonly, $b is readonly = 5) = 6;  .say for $a, $b;
18:31 p6eval rakudo 79d0b9: OUTPUT«6␤Use of uninitialized value␤␤»
18:32 TimToady rakudo: my ($a is readonly, $b is readonly = 5) := 6; .say for $a, $b;
18:32 p6eval rakudo 79d0b9: OUTPUT«rtype not set␤in Main (src/gen_setting.pm:3166)␤»
18:33 TimToady it should at least allow the binding, even if the assignment gets disallowed on such a sig
18:34 TimToady (which it isn't, but I can imagine some sigs that might be hard to figure out what assignment should mean other than binding)
18:36 TimToady but given that's the binding form is almost exactly what a normal signature binding means (including default to readonly), it should certainly work
18:36 [particle] joined #perl6
18:43 desertm4x joined #perl6
18:52 jferrero joined #perl6
19:16 icwiener_ joined #perl6
19:21 donaldh joined #perl6
19:31 jonathanturner joined #perl6
19:32 japhb @tell masak re: proto -- graphdeps was more forward-thinking, not as useful right now, but helped me design the graph walker.  So yes, add-on material, not really core.  Also, I'd like to see your different take on the graph walker design.  In the mean time, do you want me to split my change into smaller pieces?
19:32 lambdabot Consider it noted.
19:35 masak joined #perl6
19:35 masak .
19:35 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
19:35 masak @messages
19:35 lambdabot japhb said 3m 1s ago: re: proto -- graphdeps was more forward-thinking, not as useful right now, but helped me design the graph walker. So yes, add-on material, not really core. Also, I'd like to
19:35 lambdabot see your different take on the graph walker design. In the mean time, do you want me to split my change into smaller pieces?
19:35 masak @clear
19:35 lambdabot Messages cleared.
19:35 japhb Ah, I thought you'd gone for the day
19:36 masak japhb: I'll be happy to write a sketch of what I imagine for the graph walker.
19:36 japhb masak: excellent
19:36 masak it's interesting to see you hitting upon many of the ideas I had too.
19:36 masak that tells me I'm on the right track.
19:36 PerlJam or you're both way off base ;)
19:36 masak PerlJam: or that :)
19:37 masak the main difference, I think, is that I want to make it a separate class, and make it independent of proto project installation.
19:37 japhb Part of why I want to see your design is that at least half of my design felt like it "fell out of the problem", and only a few details were open for decision.
19:37 masak that way, if someone finds they'll need a dependency graph walker for something else, they can just re-use.
19:38 masak so, in essence, it's differences in naming.
19:38 japhb masak: Actually, I thought that very thing, and almost did it that way!  I only decided not to because I figured then you'd have a chicken and egg problem, since proto would be needed to install the dependency graph walker project ....
19:38 PerlJam btw, is there some "documentation" for create-new-project ?
19:39 japhb Of course, you can have the hard coded version in proto, and a more general one done separately.
19:39 masak PerlJam: not really, only the things the script itself prints.
19:39 PerlJam masak: well, I run it and it asks me a question and then dies when I answer it.
19:39 PerlJam masak: and is it meant to be run from where ever proto lives or what?
19:39 masak japhb: yes, I'd keep the class in the proto project, and worry about dependencies when someone else needs it.
19:40 masak japhb: I try hard not to make proto a dependency of anything vital.
19:40 japhb nodnod
19:40 masak PerlJam: I think so. I'd love a bug report.
19:40 masak japhb: proto is ephemeral. it almost doesn't exist. :)
19:40 PerlJam masak: I'd like to just fix it, but I don't quite know what the intent is :)
19:41 japhb hah!  And just after I get familiar with the implementation.  :-)
19:41 masak PerlJam: if you have concrete questions, feel free to ask them. :)
19:41 PerlJam masak: btw, changing from /bin/sh to /bin/bash made it run to completion (with some errors that look like a result of me trying to run it from outside the proto tree)
19:42 PerlJam masak: well, why shell and not perl (for instance)?
19:43 masak PerlJam: that's ephemeral, too :) mberends said he'd port it to Perl as soon as he got a chance.
19:43 PerlJam good, that's all I needed to know  :)
19:43 masak PerlJam: I'll change it to /bin/bash. thanks.
19:44 PerlJam oh ... can get commit bit to proto or do you prefer patches/github forks ?
19:45 masak PerlJam: you can get a commit bit, but I advise you to use the patches/forks system (as japhb did) whenever you think you might be in danger of adding a feature :)
19:45 japhb masak: do you imagine a generalized graph walker operating on?  I can imagine it working against a user-supplied graph object that 'does' an appropriate traversable role, and the graph walker just calls the appropriate methods as it needs to navigate, get deps lists for a node, and so on.  Or it could be supplied with a series of callbacks, just like the ones that it calls when needing to fetch, build, etc.
19:45 donaldh joined #perl6
19:45 japhb ?
19:45 PerlJam gotcha.
19:46 PerlJam masak: I'm perlpilot on github if you're inclined to add me :)
19:46 masak PerlJam: I will.
19:46 pmichaud masak:  DON'T DO I..... oh, I guess PerlJam is okay.  :-)
19:46 masak a general warning: I might drop out at any given moment, my wifi connection is kinda weak.
19:46 PerlJam :-P
19:47 japhb Sounds like a value judgement.  ;-)
19:47 masak pmichaud: every Perl 6 project owner already has a commitbit to proto. it's working really well. :)
19:47 pmichaud masak: I was just pulling PerlJam's chain :-)
19:48 PerlJam pm: one of the few true smiley moments IRL for me today in fact :)
19:48 pmichaud PerlJam: I'm soooo sorry to hear that.
19:48 pmichaud PerlJam: things there must be really bad then :)
19:49 masak pmichaud: why pull his chain? what's he done?
19:49 * masak is curious
19:49 pmichaud masak: oh, he's been bugging me for over 15 years.  :-) :-)
19:49 icwiener joined #perl6
19:49 PerlJam masak: I made the mistake of taking OOP from pmichaud back in 1992.
19:49 masak pmichaud: :D
19:49 masak PerlJam: wow, cool.
19:50 pmichaud ....and then he came to work for me for almost 10 years
19:50 PerlJam back when we both had considerably more hair on the tops of our heads
19:51 pmichaud ....and one could conceivably blame PerlJam for my being involved in Perl 6 in the first place :-P
19:51 PerlJam pmichaud: did you stop by NRC3400 during your recent trip down here?  Niall and James have a picture of you at your desk from the early 1990s taped to their door.
19:51 pmichaud PerlJam: I did not get a chance to do that, no.
19:51 pmichaud I will do so next time I'm there :-)
19:53 masak PerlJam: patched create-new-project, added you to AUTHORS, and added you as a committer to proto on github. welcome aboard. :)
19:53 masak japhb: you too, welcome aboard. :)
19:53 PerlJam masak: thanks.
19:53 japhb masak: thank you!
19:54 masak japhb: I'd write the graph walker for you immediately, but I feel I have to work a bit on Web.pm and prepare for being away for the weekend. you'll get it early next week instead.
19:55 japhb masak: OK, no problem.  I need to get back to hacking on HTTP::Daemon anyway.
19:56 finanalyst what is the perl6 idiom for separating an interpolated variable from following letters in a string? eg. "$filename_old" when the variable is $filename? in perl5 it was "${filename}_old" (i think)
19:56 PerlJam finanalyst: same for perl6 I think
19:56 PerlJam (though it may not work in rakudo)
19:57 pmichaud not same for p6
19:57 masak finanalyst: you could do "{$filename}_old"
19:57 pmichaud in p6 it's   "{$filename}_old"
19:57 PerlJam oh, right.  p6 has better methods
19:58 finanalyst rakudo: my $x='fn'; say "aaawwww{$x}ssss"
19:58 p6eval rakudo 79d0b9: OUTPUT«aaawwwwfnssss␤»
19:58 finanalyst thanx
19:58 pmichaud rakudo:  my $filename = 'foo';   say "{$filename}_old"
19:58 p6eval rakudo 79d0b9: OUTPUT«foo_old␤»
19:59 finanalyst so thats just a trivial variant of a code expression evaluated inside a string?
19:59 PerlJam rakudo: my $a = "fie";   say "fee{{$a}}foe";
19:59 p6eval rakudo 79d0b9: OUTPUT«feefiefoe␤»
20:00 PerlJam interesting
20:00 justatheory joined #perl6
20:02 PerlJam rakudo: my $a = "fie";   say "fee{$a}}foe";
20:02 finanalyst rakudo: my %x=<a b c>Z 1,2,3; say "{%x<a>} and {%x<b>} is {%x<c>}"
20:02 p6eval rakudo 79d0b9: OUTPUT«feefie}foe␤»
20:02 p6eval rakudo 79d0b9: OUTPUT«1 and 2 is 3␤»
20:02 PerlJam even more interesting
20:02 masak finanalyst: mind you, that should also work without curly braces, but Rakudo isn't quite there yet.
20:02 TimToady exactly what I'd expect
20:03 masak yes, me too. note that I haven't submitted a rakudobug. :)
20:03 PerlJam indeed
20:03 PerlJam now for the one that'll break it. :)
20:03 PerlJam rakudo: my $a = "fie";   say "fee{{$a}foe";
20:03 * masak braces himself
20:03 p6eval rakudo 79d0b9: OUTPUT«Statement not terminated properly at line 1, near "foe\";"␤in Main (src/gen_setting.pm:0)␤»
20:04 masak PerlJam: also what I'd expect.
20:04 PerlJam rakudo++
20:04 TimToady std: my $a = "fie";   say "fee{{$a}foe";
20:04 TimToady 13:03  * masak braces himself
20:04 p6eval std 26902: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/KCjs8TDptq line 1:␤------> [32mmy $a = "fie";   say "fee{{$a}[31mfoe";[0m␤    expecting any of:␤     POST␤   blockoid␤   infix or meta-infix␤      infix stopper␤    postfix␤
20:04 p6eval ..postfix_prefix_meta_operator␤       standard stopp…
20:04 TimToady o_O
20:04 masak stdbug?
20:04 TimToady no
20:05 TimToady std: {$a} foo
20:05 p6eval std 26902: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/BXTpASLIop line 1:␤------> [32m{$a} [31mfoo[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard stopper␤ statement␤      statement modifier loop␤    terminator␤Other
20:05 p6eval ..potential difficulties:␤ …
20:05 TimToady std: {$a}; foo
20:05 p6eval std 26902: OUTPUT«Potential difficulties:␤  Variable $a is not predeclared at /tmp/q0A8DP9VVv line 1:␤------> [32m{$a[31m}; foo[0m␤Undeclared routine:␤     foo used at 1 ␤ok 00:02 36m␤»
20:05 TimToady it's just not mindreading the programmer
20:05 masak dang,
20:06 * PerlJam makes a note to "use ESP"
20:11 * masak is enjoying mberends++' excellent sandwich toppings
20:11 masak mberends: ingenious! I'm eating chocolate and learning Dutch at the same time! :)
20:22 Kisu joined #perl6
20:23 mizioumt joined #perl6
20:36 frew|work joined #perl6
20:37 masak rakudo: qq[q["'flip'.flip.say".flip.say].flip.say].flip.say
20:37 p6eval rakudo 79d0b9: OUTPUT«Syntax error at line 1, near "].flip.say"␤in Main (src/gen_setting.pm:0)␤»
20:38 masak hm. maybe []'s don't nest in qq[]'s.
20:38 masak rakudo: qq[q["'flip'.flip.say".flip.say\].flip.say].flip.say
20:38 p6eval rakudo 79d0b9: OUTPUT«yas.pilf.]yas.pilf."yas.pilf.'pilf'"[q␤»
20:41 donaldh joined #perl6
20:52 pmurias joined #perl6
20:58 masak rakudo: sub foo($bar:) {};
20:58 p6eval rakudo 79d0b9: OUTPUT«error:imcc:syntax error, unexpected IDENTIFIER ('self')␤   in file 'EVAL_17' line 67␤»
20:58 * masak submits rakudobug
21:02 Casan rakudo: say "I will not.." x 500
21:02 p6eval rakudo 79d0b9: OUTPUT«I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I will not..I
21:02 p6eval ..will…
21:02 masak Bart Simpson, is that you?
21:03 Casan just pondering, I sort of expected the say would have a \n after each iteration, but I fear it may come after the cumulative "..."x500. but still I don't understand.
21:03 Whiteknight joined #perl6
21:04 masak Casan: well, the infix:<x> glues together 500 strings into one single string.
21:04 Casan say "I am not Bart, and I won't say but"
21:04 masak Casan: there's no \n until that long string reaches the 'say' function.
21:04 Casan I was just reminded by this old thing.. http://www.jeffpalm.com/fox/index.html
21:05 Casan ok
21:05 masak if you want 500 linebreaks too, you'd go 'say "I will not.." for 1..500' or 'say "I will not.." for ^500'
21:05 Casan yeah did try the for 1.500 variant
21:06 jnthn masak: I think we already has a Rakudo bug for invocant syntax on non-methods.
21:06 jnthn Casan: Hi! How's things?
21:06 masak jnthn: ok. well, now you have at least one. :P
21:07 masak Casan: not 1.500, that's one number. 1..500 is a range.
21:07 jnthn masak: I think it'll be fixed once context vars are in because then it's easier to know what kinda routine we're parsing the sig for I guess...
21:07 jnthn For now it's a pain to fix.
21:09 Casan jnthn: hi! busy at school. exams and such. but I keep following parrot,rakudo,padre work on the side. want to clean up here in DK so I can move to France after summer. Lets hope summer will include a trip to Portugal.
21:10 Casan masak: ahh yeah sorry, did that too, think I was a bit too lazy here on irc ;)
21:10 jnthn Casan: Ah, nice. Hope to see you in Portugal then. :-)
21:10 masak yay, portugal!
21:11 jnthn masak: You know, all of my trips during winter were to cold places. Most of my trips in summer are to hot places.
21:11 jnthn If it'd been the other way around, I woulda got some breaks from the heat in summer and some breaks from the cold in winter...
21:12 * jnthn is starting to feel the summer heat
21:12 masak "extreme traveling".
21:12 masak yes, it's noticeable here too.
21:14 * jnthn had pondered living one place for summer and one for winter, but the cost/hassle of the move was kinda a pain.
21:15 masak jnthn: while in .nz, I met one guy who lived like that.
21:15 masak jnthn: I must admit to being a bit freaked out by Easter autumn leaves.
21:15 M_o_C joined #perl6
21:16 jnthn :-)
21:18 Casan jnthn: well, if my project in France doesn't work out, then I am pondering taking a year out of the calendar for working and personal reflection, which could mean winter in a cheap place with snow and summer in another place with a beach :) ohh .sk and .fr comes to mind hehe.
21:18 jnthn Casan: I'm liking .sk.
21:19 jnthn Language is...fun. :-)
21:19 Casan same here. missed my annual in sk this year.
21:21 Casan ok time to. return dream($programming, $places);
21:22 masak jnthn: do function calls in return statements get turned into tailcalls in Rakudo?
21:22 jnthn masak: nie
21:23 masak jnthn: could they?
21:23 jnthn masak: Maybe.
21:23 jnthn masak: Thing is consider
21:23 jnthn sub foo returns Int { return bar() }; sub bar() { return "oh noes" }
21:23 jnthn So it's not aways safe to Just Do It.
21:24 masak good point.
21:24 masak rakudo: sub foo($n = 1000) { return "blow the stack" if !$n; return foo($n-1) }; foo
21:25 jnthn ...well that blew it. :-)
21:25 masak it's fast on my box. :)
21:25 jnthn same
21:25 jnthn wow. :-)
21:26 jnthn That backtrace is, uh, maybe in need of a little pruning. ;)
21:26 masak jnthn: something like '(repeated x 1000)'... :)
21:26 jnthn something like that.
21:26 masak TODO rakudobug?
21:26 jnthn If it bothers you.
21:27 masak not really. but it's better having it in RT than in the back of our minds.
21:27 jnthn rakudo: my Int @x; @x.push("fail")
21:27 jnthn oh noes our eval bot is has a sad.
21:28 masak I think p6eval is a bit busy blowing the stack... :/
21:28 Casan rakudo: say $test;
21:28 jnthn Anyway, that type check fail doesn't say what the types were
21:28 jnthn But really I want to factor out the type fail errors into some common routie.
21:28 jnthn *routine
21:29 masak nod.
21:29 jnthn Task for not too distant future perhaps.
21:29 jnthn Tomorrow I hope to refactor object init/creation stuff a bit.
21:30 jnthn Hopefully then we can write BUILD routines that don't die of null pmc exceptions.
21:30 Casan jnthn: ++ on the error with die.
21:31 masak sounds nice.
21:31 masak jnthn: does that include BUILD?
21:31 jnthn masak: Indeed.
21:31 masak dang. gotta write that "Rakudo is teh sux" blog post before there's nothing left to complain about. :P
21:31 jnthn :-P
21:31 jnthn What, you mean you're running out of things to complain about?
21:31 jnthn ;-)
21:31 Casan jnthn: I was wondering if a simple "say $test"; shouldn't also do the same, instead of: Scope not found for PAST::Var '$test' in in Main (src\gen_setting.pm:3149) ?
21:32 masak jnthn: well... perhaps a slight exaggeration...
21:32 jnthn Casan: The "in" line is epic fail, I want to get rid of that.
21:32 jnthn Casan: The issue is where the scope not found error comes from.
21:33 Casan ok
21:33 jnthn (The PAST => POST phase.)
21:33 jnthn But yes, we certainly should give a line number there.
21:33 jnthn It's just a bit trickier to fix for this case.
21:33 PerlJam there's already a line number ;)
21:34 jnthn PerlJam: Yeah, too bad it's ridiculously inaccurate. ;-)
21:35 Casan jnthn: but the expected output will be something like: fileofsay$test:linenumber right?
21:35 jnthn Yeah
21:35 Casan thnks
21:36 p6eval joined #perl6
21:40 [particle] joined #perl6
21:47 dalek rakudo: 5ed6dac | pmichaud++ |  (2 files):
21:47 dalek rakudo: Use root_new opcode from parrot trunk.  Bumps PARROT_REVISION.
21:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5ed6dacaf3c30ab2a9bf9f0376cd87ad93b37372
21:49 pmichaud fixing the "Scope not found..." error line number is on my list of easily-fixed things.
21:59 wknight8111 joined #perl6
22:05 LylePerl rakudo: print $*CWD;
22:05 p6eval rakudo 5ed6da: OUTPUT«Use of uninitialized value␤»
22:06 LylePerl rakudo: chdir;
22:06 p6eval rakudo 5ed6da: OUTPUT«Could not find non-existent sub chdir␤»
22:07 ElectricHeavyLan joined #perl6
22:09 PerlJam does rakudo handle multidimensional arrays yet?
22:10 PerlJam rakudo: my @x; @x[0][0] = 5;
22:10 pmichaud limited.
22:10 p6eval rakudo 5ed6da: OUTPUT«elements() not implemented in class 'Undef'␤in Main (/tmp/SqWqW2y9Uv:1)␤»
22:10 pmichaud it's still having difficulty with autovivification of elements
22:11 pmichaud rakudo:  my @x;  x[0] = [];  x[0][0] = 5;
22:11 p6eval rakudo 5ed6da: OUTPUT«Could not find non-existent sub x␤»
22:11 pmichaud rakudo:  my @x;  @x[0] = [];  @x[0][0] = 5;
22:11 p6eval rakudo 5ed6da:  ( no output )
22:11 PerlJam okay
22:12 payload joined #perl6
22:16 payload joined #perl6
22:18 payload joined #perl6
22:26 pmichaud std:  say $x;
22:26 p6eval std 26902: OUTPUT«Potential difficulties:␤  Variable $x is not predeclared at /tmp/jL0eN2OE3r line 1:␤------> [32msay $x[31m;[0m␤ok 00:02 36m␤»
22:31 * PerlJam wishes rakudo's "Use of uninitialized value" message came with a line number and perhaps a variable name
22:36 pmichaud line number should be doable
22:37 pmichaud we just need to check the annotations in effect at the point of generating the message
22:38 pmichaud See the "!throw_unhandled" method in src/classes/Failure.pir:84
22:38 pmichaud add code there to check for whatever dynamic annotations are in effect and report those as a backtrace
22:38 pmichaud (there should be a routine somewhere already to do that last part)
22:39 pmichaud (it would be whatever jnthn++ added)
22:40 pmichaud unless/until we attach variable names as properties on their containers; displaying a variable name might be a bit more difficult
22:41 pmichaud in particular, the variable that "say" sees when it stringifies its argument(s) probably won't be the one the caller used to when calling say()
22:41 pmichaud s/to when/when/
22:43 pmichaud http://gist.github.com/115794  # better?
22:43 jnthn Yes, giving line number with warnings shouldn't be hard.
22:44 jnthn pmichaud: ftw!
22:44 pmichaud $ ./perl6
22:44 pmichaud > say $x
22:44 pmichaud Symbol '$x' not predeclared in <anonymous>
22:44 pmichaud in Main (src/gen_setting.pm:3166)
22:44 lambdabot Not in scope: `say'
22:44 jnthn pmichaud: I plan to clear up that last line.
22:44 bacek joined #perl6
22:44 jnthn (As in, not show it...)
22:44 pmichaud jnthn: I clearly leave it up to you to clear up that last line.  :-)
22:45 jnthn ;-)
22:45 pmichaud well, after moving PGE to use root_new instead of new we get about half of our performance back.
22:45 jnthn pmichaud: Yes, I ran the benchmarks in tools dir and noticed that. :-)
22:46 Kisu joined #perl6
22:47 frew|wor1 joined #perl6
22:48 pmichaud there are still several places (NQP, others) that need to be adjusted.
22:49 pmichaud I might see if I can adjust PCT/NQP to avoid the extra "find_lex" and testing for null when it's clear we don't need them.
22:50 jnthn find_lex is quite the throwing-away-stuff-we-statically-know fail.
22:50 meppl joined #perl6
22:51 pmichaud the problem is that in some languages we can't know if the lexical has actually been instantiated yet
22:52 jnthn What do you mean by "instantiated" in this case?
22:52 jnthn For languages that add stuff to their lexpad at runtime rather than statically knowing their symbols?
22:53 Chillance joined #perl6
22:53 pmichaud there's a difference between "NULL" and "Undef"
22:54 pmichaud i.e., it's the difference between 'exists' and 'defined'
22:54 pmichaud so, a subroutine might have a lexical declared, but the lexical doesn't actually exist until someone assigns a value to it.
22:54 pmichaud in such cases we have to explicitly check for the possibility of find_lex returning a Null PMC
22:55 pmichaud and potentially auto-vivifying at that point, or returning an Undef
22:55 pmichaud (or some other default)
22:55 jnthn My point was more about the process of finding the lexical.
22:55 pmichaud oh, that part
22:55 pmichaud yes, there are optimizations to potentially be had there also.
22:55 jnthn We statically know that a lexical is n blocks down in most cases.
22:55 jnthn Instead, we do n hash lookups.
22:55 jnthn At each block.
22:56 pmichaud it also be nice if once we did a find_lex we could re-use the register instead of repeatedly finding it again later.
22:56 pmichaud (but we have to be careful of potential rebinding)
22:57 pmichaud gotta go finish planting a tree -- bbl
22:57 jnthn And given a hash lookup is a call on a vtable method, which in turn is a call to something in Parrot's hash implementation, which I think then calls something else in the process of getting an answer...
22:57 jnthn We could potentially save quite a lot by just following n pointers. :-)
22:57 edenc joined #perl6
22:58 wayland76 joined #perl6
23:03 Bucciarati joined #perl6
23:03 kst` joined #perl6
23:03 pmichaud or, even better, in a given context, remember the location of the lexical we just looked up
23:04 pmichaud since it's not likely to change for that context, unless we do a "set_outer"
23:04 pmichaud actually, I guess statically determining it would work also
23:05 pmichaud each Sub PMC could keep track of it, though
23:06 pmichaud and a "set_outer" would clear the cached
23:06 jnthn Aye, I'm not sure what the best implementation is.
23:06 pmichaud I like the idea of Sub PMCs keeping track of it.
23:06 jnthn Cache always adds memory overhead of course.
23:06 jnthn Yeah, same.
23:06 pmichaud This is a pretty small overhead.
23:07 pmichaud Anyway, I might be able to do something with it when we review lexical handling (e.g., the prototype lexpads we discussed at NPW)
23:07 jnthn *nod*
23:07 jnthn BTW, I suspect I'm going to follow (or beat ;-)) your lead on that front for object creation.
23:08 jnthn So we'll have an instance that we clone each time when creating a new one.
23:08 jnthn Or at least instance storage unit.
23:08 jnthn That'll get traits right for one.
23:09 jnthn But also, means that BUILD isn't doing all of the figuring out the containers stuff.
23:09 jnthn And also that overriding BUILD will work.
23:09 pmichaud I totally agree with that approach
23:10 jnthn I hoped you would. :-)
23:10 pmichaud in some sense the protoobject should be the instance that we clone each time
23:10 jnthn yay and nay
23:10 pmichaud right, we don't want the protoobject-specific characteristics
23:10 jnthn Remember that the proto doesn't have instane storage.
23:10 pmichaud it doesn't?  you mean conceptually, or really?
23:11 jnthn Conceptually for sure.
23:11 jnthn I'm pondering making it a "really" though.
23:11 jnthn But cloning also doesn't feel right to me on another angle.
23:11 pmichaud that feels wrongish.
23:11 jnthn We need to be able to clone a type-object and have it stay a type object.
23:11 jnthn (Think Dog{ :name<Spot> }
23:11 jnthn )
23:11 pmichaud sure, cloning a type object doesn't cause me difficulty either
23:12 pmichaud last this was discussed, we were looking at having a "bit" that indicates whether something is an instance or a type object
23:12 pmichaud accessors would only be defined for the objects that have the "I am an instance" bit
23:13 jnthn We can do it like that too.
23:13 pmichaud cloning a protoobject doesn't make it an instance, but calling BUILD on it does
23:13 jnthn What I was really hoping for though...
23:13 pmichaud or, instead of cloning the entire protoobject, we just clone the attributes
23:13 jnthn ...is to manage instantiation through the instantiate VTABLE.
23:13 pmichaud we do have to be careful of people overriding 'clone', too :-)
23:14 jnthn Which I think would put us in a better interop position.
23:14 jnthn With other Parrot stuff.
23:14 pmichaud I'm fine with looking at it through instantiate VTABLE
23:14 jnthn Anyway, lots of things to balance up.
23:15 pmichaud that makes a lot of sense to me.  In some sense instantiate VTABLE does the CREATE/BUILDALL/BUILD sequence, I guess.
23:15 jnthn I'm kinda scared of attempting One Big Refactor in any sense.
23:15 pmichaud agreed, for the things where we can avoid it.
23:15 jnthn So am more planning baby steps towards where I want to go.
23:15 pmichaud +1
23:16 jnthn Even if they mean that temporarily we have a few hacks that get cleaned up later, getting to know what conceptually is going to work out will be a big help.
23:16 pmichaud Agreed.
23:17 jnthn (Where later = they should all be gone by the time I'm done with the grant, of course.)
23:20 donaldh joined #perl6
23:21 BinGOs joined #perl6
23:25 bacek joined #perl6
23:26 skids joined #perl6
23:56 vxnick joined #perl6

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

Perl 6 | Reference Documentation | Rakudo