Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-06-10

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:00 jnthn Anyways, those were the two things I ran up against when trying out Blizkost today.
00:02 jnthn Other than that, it worked great. :-)
00:12 dukeleto i have a test for loading perl6.pbc as bytecode, but my test doesn't work when run through t/harness
00:14 jnthn Oh. :S
00:15 dukeleto jnthn: seems like the shebang line of the test file might not be handled correctly
00:16 dukeleto jnthn: http://github.com/leto/rakudo/tree/test_load_pbc
00:16 dukeleto jnthn: currently, it generates the shebang line to be the correct parrot binary that was used to configure Rakudo
00:17 jnthn Hmm...that own't port, but you probably already figured that...
00:17 jnthn Hmm
00:17 jnthn I did write some PIR tests once
00:17 jnthn That I thought used to run under the harness
00:17 dukeleto jnthn: so prove t/02-embed/01-load.t works, but perl t/harness t/02-embed/01-load.t doesn't
00:17 skids joined #perl6
00:18 dukeleto jnthn: i tried using environment vars in the shebang line, like $(PARROT), but that wasn't working
00:18 dukeleto jnthn: and yes, some stuff I am doing is not portable, but I saw similar stuff in the build/Makefile.in, so I didn't worry about it for now
00:19 lue I thought it was ${PARROT} . Hmm
00:19 arnsholt dukeleto: I think you can achieve at least some of that with env
00:20 jnthn dukeleto: I'm not sure what's wrong. moritz_++ may have some ideas.
00:20 dukeleto jnthn: another option is to make the test perl 5, which shells out to the correct parrot
00:20 dukeleto jnthn: and runs a .pir file
00:21 dukeleto jnthn: that might be a lot less hairy and not require generating shebangs
00:21 jnthn true
00:21 jnthn And be more portable.
00:22 arnsholt Indeed.
00:22 arnsholt My first thought was "why not do it in shell instead?"
00:22 arnsholt But then I realized, Windows =)
00:23 lue methinks conversion pm -> pir takes all my lovely ANSI escape codes out of the strings :/
00:23 dukeleto lue: are you talking about editor highlighting?
00:24 dukeleto jnthn: hacking on the perl-shelling-out-to-parrot route now
00:25 lue no.
00:25 lue Things like \e[33m this, ansi coloring. \e[00m
00:26 lue [ ah well. All I wanted was to make the spectest runner look nice. :) ]
00:29 dukeleto calling parrot_config is not quite the same as the parrot that the current Rakudo was compiled with. hmmmm.
00:31 masonkramer joined #perl6
00:33 lue rakudo: 999999[1]
00:33 p6eval rakudo a54677: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'Int'␤  in main program body at line 1␤»
00:34 cure__ joined #perl6
00:44 dukeleto i can't seem to pass environment vars through the harness, i think it cleans them
00:45 dukeleto i remember there being some option to pass env vars through the harness though
00:47 dukeleto the man page of TAP::Harness should be helpful
00:48 lue > sub test($test is write) { print $test;}; test(12)
00:48 lue ===SORRY!=== Invalid typename in parameter declaration at line 1, near " write) { "
00:48 lue Would you say it's whining about an unknown trait?
00:48 jnthn If so, it's doing so in a weird way.
00:49 jnthn Did you mean "is rw"?
00:49 diakopter it can't be write-only?
00:51 arnsholt Could be, in theory, I suppose. But not that interesting as a feature I think
00:51 lue it's a ticket #60966
00:52 lue [it's theoretically possible to set files like that w/ chmod. Actually useful for, say, drop-box folders]
00:52 arnsholt True
00:54 lue I think that ticket is closed then, unless you need a better error message.
00:54 jnthn No, we need a better error
00:57 lue Alright. [Not that I'd be able to fix it :P]
00:57 jnthn lue: I'm not sure of the best way yet.
00:58 dukeleto I think i've fixed the test harness. Maybe y'all will agree with me ;)
00:59 lue [! CRAZY IDEA !]maybe, if the harness filters env variables, then it maybe it filters out ANSI escape characters.
01:00 plobsing joined #perl6
01:16 jhuni joined #perl6
01:23 lue Grr, I can't find where the exception that gets sent to BacktracePrinter comes from.
01:26 lue afk
01:26 masonkramer_ joined #perl6
01:47 colomon rakudo: say 2.Num.Str
01:47 p6eval rakudo f50c35: OUTPUT«2␤»
01:49 LionMadeOfLions joined #perl6
01:52 agentzh joined #perl6
01:53 TiMBuS joined #perl6
02:27 justatheory joined #perl6
02:28 [mark] joined #perl6
02:32 jaldhar joined #perl6
02:51 ggoebel joined #perl6
03:00 diakopter . o
03:06 silug joined #perl6
03:06 szabgabx joined #perl6
03:26 lucs joined #perl6
03:28 mtnviewmark joined #perl6
03:36 dukeleto jnthn: i just sent a rakudobug with a test for loading bytecode with a tweak to the harness
03:39 petdance joined #perl6
03:40 snarkyboojum joined #perl6
03:51 lue ahoy!
03:54 lue anyone here to answer a quick question about errorhandling and backtracing?
03:59 eternaleye phenny: tell masak (backlogging): The Ratel is a pretty fascinating animal: http://www.badassoftheweek.com/honeybadger.html
03:59 phenny eternaleye: I'll pass that on when masak is around.
04:25 satyavvd joined #perl6
04:50 ciphertext joined #perl6
05:15 yahooooo joined #perl6
05:17 yahooooo joined #perl6
05:29 am0c joined #perl6
05:36 orafu joined #perl6
05:46 kaare joined #perl6
06:02 uniejo joined #perl6
06:20 Su-Shee joined #perl6
06:21 dark_soul1 joined #perl6
06:21 dark_soul1 left #perl6
06:23 agentzh joined #perl6
06:34 gfx joined #perl6
07:15 baest joined #perl6
08:00 frettled joined #perl6
08:01 frettled Good timeofday!
08:05 xabbu42 joined #perl6
08:07 moritz_ good morning-ish
08:13 satyavvd left #perl6
08:24 clintongormley joined #perl6
08:30 dakkar joined #perl6
08:33 moritz_ phenny: tell patrickas that I merged his USAGE patches; one more thing that could be improved: optional named params should come before the manadatory, positional parameters in the usage message
08:33 phenny moritz_: I'll pass that on when patrickas is around.
08:34 moritz_ patrickas++
08:34 dalek rakudo: f0e5fe6 | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
08:34 dalek rakudo: Support for multi sub main
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​0e5fe654ff390f94e3b2b55e63d841961601c4f
08:34 dalek rakudo: 811cd66 | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
08:34 dalek rakudo: Support automatic usage
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​11cd6623a62a02cc1fedb8110c5b3764eb040bc
08:34 dalek rakudo: 6e3624e | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
08:34 dalek rakudo: Better usage message when using -e
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​e3624eb6d01fc669a91a7fd4ccbc9f9de396a1c
08:34 dalek rakudo: 14d1542 | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
08:34 dalek rakudo: USAGE-one-sub and process-cmd-args don't polute the global namespace anymore,
08:34 dalek rakudo: USAGE and MAIN_HELPER still do
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​4d1542c6eb71fe9101efb8530bd75efaedb4739
08:34 dalek rakudo: 037a9db | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
08:34 dalek rakudo: [minor] added comment removed empty line
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​37a9db214ec421be4b8194b13384d4f2b24112e
08:34 dalek rakudo: 2c1c3d7 | moritz++ | src/core/MAIN.pm:
08:34 dalek rakudo: Merge remote branch 'patrickas/master'
08:34 dalek rakudo: This gives us
08:34 dalek rakudo:  - support for multi sub MAIN
08:34 dalek rakudo:  - automatic USAGE message (customizable)
08:34 dalek rakudo:  - remove some functions from user namespace
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​c1c3d77ed5f8fee83c70e66b16e3cbf9d311807
08:34 dju_ joined #perl6
08:34 moritz_ phenny: tell patrickas one more thing: please add yourself to CREDITS in your next patch to rakudo
08:34 phenny moritz_: I'll pass that on when patrickas is around.
08:48 yahooooo joined #perl6
08:54 skangas joined #perl6
08:57 envi^home joined #perl6
08:58 drbean joined #perl6
09:05 drbean joined #perl6
09:11 drbean joined #perl6
09:20 yahooooo joined #perl6
09:21 rgrau joined #perl6
09:22 jaldhar joined #perl6
09:55 jaldhar joined #perl6
09:58 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=75598 it seems that not only Rakudo suffers from errors in weird feature combinations :-)
10:06 TiMBuS joined #perl6
10:10 yahooooo joined #perl6
10:39 ggoebel joined #perl6
10:59 jaffa4 joined #perl6
10:59 jaffa4 hi
11:20 colomon interesting article: http://www.infoq.com/interviews/john-hughes-fp
11:20 colomon so, by his definition, is p6 a functional language?
11:23 xabbu42 joined #perl6
11:26 [Coke] joined #perl6
11:27 masak joined #perl6
11:27 masak o/
11:27 phenny masak: 09 Jun 22:58Z <Tene> tell masak When I tried to use Configure in web the first time, btw, it failed because I didn't compile rakudo in a directory called "rakudo", btw
11:27 phenny masak: 09 Jun 22:58Z <Tene> tell masak When I tried to use Configure in web the first time, btw, it failed because I didn't compile rakudo in a directory called "rakudo", btw
11:27 phenny masak: 03:59Z <eternaleye> tell masak (backlogging): The Ratel is a pretty fascinating animal: http://www.badassoftheweek.com/honeybadger.html
11:29 masak Tene: yes. Configure (and lib/Configure.pm and Makefile.in) are to be removed, belonging as they are to a past age. for more information, see http://github.com/masak/ufo
11:34 hejki haha :p
11:34 hejki the Ratel-part seems funnay
11:41 masak wow, the HTML spec looks much neater! whoever++
11:41 masak good CSS makes me happy. :)
11:46 colomon oh sure, and right after I printed out S32/Numeric yesterday.  ;)
11:48 colomon "Coercion of a Complex to any Real returns the real part" -- how long has that been in there?  I've somehow managed to miss it during my Numeric work.  Hmmm....
11:51 moritz_ cosimo++
11:54 pugssvn r31184 | colomon++ | [t/spec] Add fudged test for results on $n .. *
11:54 colomon oooo, currently at 39,992 spec tests total (33,364 passing), ought to break 40,000 with no effort today.
11:54 masak \o/
11:55 dalek rakudo: b461fd2 | (Solomon Foster)++ | src/c (4 files):
11:55 dalek rakudo: Move Rat.Str to Real (with tweaks), delete Rat.Int tweak other Real.Str methods
11:55 dalek rakudo: so things still work.
11:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​461fd27a15d48fa5de39d1eeae598358fe86bd8
11:56 colomon ooo, ugly commit message, colomon--
11:56 masak jnthn: I also experienced the projects.state error when I used proto recently. definitely not according to plan... :/
11:56 mberends joined #perl6
11:57 cosimo masak: thanks
11:58 masak cosimo++
11:58 cosimo it's just a small thing, but i think improved readability
11:58 cosimo at least for me
11:58 pugssvn r31185 | colomon++ | [t/spec] Simple tests for Real.Str.
11:58 colomon and there's four more passing tests.  ;)
11:59 masak only 4 left :)
12:00 * moritz_ is still in favour of removing the hilighted test files from the perlcabal.org rendered synopsis
12:01 masak removing highlighted test files?
12:03 masak which test files are those?
12:03 moritz_ the smartlinks have two buttons
12:03 moritz_ one make the normal test files appear
12:03 moritz_ and the other loads the hilighted test files
12:04 moritz_ and I think it's the latter that make searching in the pages in firefox so slow
12:04 masak oh!
12:04 masak I never use the latter feature, so yes, I'm for it too.
12:05 * moritz_ likes http://abstrusegoose.com/272 (click on that image after reading)
12:06 takadonet morning all
12:06 mberends \o
12:06 phenny mberends: 09 Jun 22:55Z <jnthn> tell mberends when I just used proto for first time, I got an error Unable to open filehandle from path 'projects.state' - touch projects.state resolved it though.
12:07 colomon o/
12:07 phenny mberends: 09 Jun 23:03Z <jnthn> tell mberends after that, next issue on install fakedbi is (though at least it picks up the dependency) Building zavolaj...project type Str(). That was apparently though just because I didn't have perl6 in my path (it's good that it writes a helpful what went wrong log and pointed me at it)...now in theory it's installed them both. :-)
12:07 masak takadonet, mberends: \o \o
12:07 masak rakudo: say "İ".lc
12:07 p6eval rakudo 2c1c3d: OUTPUT«␤»
12:07 masak :(
12:08 mberends jnthn: thanks for the bug reports. We're going to give proto a good workout at FPW tomorrow and Saturday :)
12:11 mberends masak: o/  what do you think of renaming proto as the alpha branch of pls, and then developing your new pls as the master branch, so that they can both use the same name and command structure?
12:12 masak mberends: in other words, having two branches ('alpha' and 'master') in the proto repo?
12:13 masak that might be a good idea. I also plan to start developing pls during the Saturday. it's all coming together.
12:14 masak in the long run, I think we'll want a pls repo. but before it works, might as well develop it in the proto repo.
12:14 mberends masak: exactly, and rename proto -> pls
12:14 masak yes, that sounds good.
12:14 masak hm. I'm slightly disinclined to have something non-functional in the master branch.
12:15 moritz_ maybe have an 'ng' (or 'pls') branch first
12:15 moritz_ and switch them around once pls mostly works
12:15 masak yes, a 'pls' branch would probably be better.
12:15 masak and keeping 'master' as it is, so that people who stumble on it don't get all wtf-y.
12:16 hejki hmm.. version done @ work. this means i will have some extra time during summer :)
12:16 masak mberends: do you have tuits to fix the projects.state bug? otherwise I might get a round one. maybe.
12:16 moritz_ hejki: and you mean to invest some of it in Perl 6 hacking? :-)
12:17 mberends masak: I'll have tuits at FPW in Calais tomorrow
12:17 * moritz_ forgot to do the book release yesterday... will try to remember today
12:17 * masak forgot to remind moritz_
12:19 hejki moritz_: most likely something close to half of it :>
12:19 moritz_ hejki: \o/
12:19 hejki well i were supposed to get some time at the middle of may already..
12:19 hejki but you know how version releases just .. tend to stretch over deadlinse :>
12:19 hejki s/se$$/es/
12:20 moritz_ it's software. Of course the schedule slips.
12:20 hejki ye :>
12:20 moritz_ and ya know, software is hateful.
12:20 hejki anyway.. hometime, laters
12:22 colomon masak: just added eight more tests locally, but can't push until I've done a spectest here.
12:22 masak :)
12:22 colomon oops, added another two.
12:23 colomon amazing how many features still don't have tests.  :)
12:25 masak amazing how many tests still don't have features. :)
12:28 azert0x joined #perl6
12:31 masonkramer joined #perl6
12:32 moritz_ masak: are you aware of teh bytebuffer PMC in parrot?
12:32 moritz_ "ByteBuffer" provides a resizable byte buffer with random access to
12:32 moritz_ individual bytes and conversions from and to parrot strings.
12:32 pmurias joined #perl6
12:33 masak moritz_: yes. it was basically born out of my trolling the #parrot channel.
12:33 skids joined #perl6
12:33 moritz_ masak: thought so. I hope you use it (or will soon) so that your feedback can help to improve it
12:34 masak moritz_: I plan to port my code over to it today.
12:34 moritz_ o/
12:35 moritz_ ++masak
12:38 jnthn morning #perl6
12:38 jnthn er, well, afternoon I guess. :-)
12:38 moritz_ good afternoon jnthn :-)
12:39 colomon it's good morning here!
12:39 jnthn colomon: Your timezone rocks!
12:39 masak jnthn: morning!
12:39 colomon it's not as zippy and fun as Newfoundland time, but I still like it.  ;)
12:40 mathw use Greeter; Greeter::greet($jnthn, :enthusiasm(Greeter::Enthusiasm::MAXIMUM));
12:43 ciphertext left #perl6
12:46 jnthn ooh, not excessively much backlog
12:49 moritz_ just spammy dalek :-)
12:49 jnthn moritz_++, patrickas++ # MAIN, USAGE
12:50 jnthn mberends: ping
12:50 masak ooh, usage!
12:51 moritz_ masak: I think MAIN subs are now sufficiently usable that you can break them :-)
12:51 masak sounds very much like it.
12:52 moritz_ rakudo: sub MAIN ($a, :$verbose) {
12:52 p6eval rakudo b461fd: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
12:52 moritz_ rakudo: sub MAIN ($a, :$verbose) {  }
12:52 p6eval rakudo b461fd: OUTPUT«Usage␤/tmp/hXZvSi8FBV a [--verbose=value-of-verbose]␤»
12:53 jnthn Nice!
12:53 jnthn rakudo: multi MAIN('delete', $filename) { }; multi MAIN('add', $filename) { };
12:53 p6eval rakudo b461fd: OUTPUT«Usage␤/tmp/LzG1E9ZAp6 Mu() filename␤or␤/tmp/LzG1E9ZAp6 Mu() filename␤»
12:53 jnthn AWW!
12:54 moritz_ handling contstraints in general is quite tough
12:54 jnthn I broked it on first try using it. Clearly Sweden is slowly instilling bug discovery skills in me. :-)
12:55 jnthn I'll need years here before I'm at masak++ levels though.
12:55 masak :)
12:55 moritz_ I guess we could check if $param.constraint !~~ Code|Junction
12:55 masak yeah, the living in Sweden is totally the reason.
12:55 moritz_ and then print it out
12:56 moritz_ that explains why I found quite some rakudobugs on my train ride to Copenhagen
12:56 moritz_ I was approaching Sweden!
12:56 * masak still winces when he sees a negated comparison op with a junction.
12:56 moritz_ you're right, it's against WTOP
12:59 masak which don't really exist, so it's ok :)
12:59 moritz_ it exists in my head (if only sparse)
13:00 sorear joined #perl6
13:01 masak yeah, same here.
13:02 moritz_ we should poor it into a repo at some point
13:02 masak totally.
13:03 jnthn I'll rich for it when you do.
13:03 * moritz_ starts a repo
13:04 masak I already have one, but I'm thinking of disbanding it.
13:04 SmokeMachine joined #perl6
13:04 moritz_ is it public?
13:04 masak think so.
13:04 masonkramer joined #perl6
13:04 masak it's even on proto.perl6.org IIRC.
13:04 masak yup.
13:05 moritz_ I'm not talking about a tool
13:05 moritz_ just a list of recommendations, like PBP (the book)
13:05 masak right.
13:13 pugssvn r31186 | colomon++ | [t/spec] Add tests for Complex conversions via .Real, .Int, .Rat, .Num, and .Complex.
13:13 colomon there we go. 40,006 tests.
13:13 dalek rakudo: 16d9cb0 | (Solomon Foster)++ | src/core/ (3 files):
13:13 dalek rakudo: Add Numeric.Real, Numeric.Int, Numeric.Rat, Numeric.Num, and Real.Real.  Change
13:13 dalek rakudo: Complex.Num to Complex.Real.
13:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​6d9cb035231e08a22ac848f8e558569e134c750
13:14 moritz_ masak: http://github.com/moritz/perl6-wtop
13:15 felipe joined #perl6
13:15 masak moritz_: slight tact suggestion: not having the word 'bullshit' in the README.
13:16 masak it's not very offensive, but still not very apropos either, IMHO.
13:16 moritz_ you're right
13:16 * masak removes his wtop repo from github and proto's projects.list
13:16 jnthn "bullshit bingo" :-)
13:16 jnthn Weird mental image. :-)
13:17 moritz_ jnthn: it's when you make a list of words like "efficient", "dynamic", "cost effective" etc. and when each of them has been mentioned in a meeting, you yell "bingo"
13:18 jnthn :-D
13:19 moritz_ hugme: reload
13:19 hugme moritz_: reloaded successfully
13:23 masak hugme: add masak to perl6-wtop
13:23 * hugme hugs masak. Welcome to perl6-wtop!
13:23 * masak hugs hugme
13:25 vosl joined #perl6
13:27 rv2733 joined #perl6
13:28 moritz_ grrr, why does git think I only want to push to that branch, not pull from it?
13:29 meppl joined #perl6
13:32 dimid joined #perl6
13:33 broquaint joined #perl6
13:46 masak uasi++ is pretty cool: http://gist.github.com/433005
13:46 moritz_ masak: is this, like, a patch for rakudo?
13:47 masak no, it's a module without a github repo.
13:47 moritz_ masak: you could ask him for permission to include that in Rakudo :-)
13:47 masak I will.
13:56 patspam joined #perl6
13:57 masak he says it's OK. http://twitter.com/uasi/status/15851554568
13:58 moritz_ \o/
13:58 moritz_ now we just need somebody to put it into rakudo
13:59 masak maybe make it into a weekly challenge? :)
13:59 moritz_ :-)
13:59 moritz_ too simple
14:00 moritz_ it's mostly a matter of copy&paste, removing the 'is export', the 'module', and adding to build/Makefile.in
14:00 moritz_ might do that tonight
14:06 masak ++moritz_
14:07 rob-_- joined #perl6
14:15 jaffa4 hi
14:16 pmichaud good morning, #perl6
14:16 jaffa4 tell me about rakudo start....
14:16 takadonet pmichaud: morning
14:16 jaffa4 Is there anything goin on with rakudo star?
14:17 Su-Shee yes. it's rising :)
14:17 masak :)
14:17 pmichaud jaffa4: we're working on it quickly, should be something released this month.
14:18 masak jaffa4: most work nowadays is focused onto delivering something nice for Rakudo Star.
14:18 jaffa4 Like what?
14:18 pmichaud like "something that works"  :-)
14:18 jaffa4 it was working before.
14:18 jaffa4 Is it broken now?
14:19 masak jaffa4: finishing the list refactor, fixing the closures bug...
14:19 pmichaud there are some key bugs that need fixing, yes.
14:19 masak jaffa4: generally just closing bugs on RT.
14:19 jaffa4 you must be relieved then.
14:20 moritz_ jaffa4: like, MAIN and USAGE subs, including named parameters
14:20 masak jaffa4: we're not there yet. we can be relieved in a couple of weeks. :)
14:21 jaffa4 ok
14:21 moritz_ if you follow planetsix, I'm sure you won't miss that release :-)
14:21 masak the more I listen to outside voices about a "Perl 6 release", the more I realize that there's this strange view among programmers that before you make The Release -- whatever that is -- there's nothing to look at.
14:22 masak to me that's a strange viewpoint, since I've been using Rakudo regularly for two years now.
14:22 masak for me, there won't be anything particularly special about Rakudo Star.
14:22 masak but I believe we might benefit from the spectable.
14:23 Juerd spectable?
14:23 jaffa4 spectacle,
14:23 Juerd Something that can be seen?
14:23 masak er. yes.
14:23 masak spectacle.
14:23 moritz_ I hope we do.
14:24 mberends jnthn: pong!
14:24 jaffa4 What benefits are you talking about?
14:24 masak saying "NOW there's something to look at!" and letting slip the fact that there's gradually been something to look at for the past two years.
14:24 moritz_ attention. People finding bug. People contributing stuff.
14:24 masak jaffa4: one clear benefit would be more early adopters, which leads to more activity... what moritz_ said.
14:25 moritz_ people writing modules. Building infrastructure. Writing docs. Answering questions. Organizing conferences
14:25 jaffa4 I see
14:25 masak generally, widening the group of People Who Care.
14:27 bbkr rakudo: say any("dog") ~~ none("dog") # bug? IMO should be false.
14:27 p6eval rakudo b461fd: OUTPUT«1␤»
14:27 jaffa4 Is there a debugger for Perl 6 now?
14:27 moritz_ sure. It's called say() :-)
14:27 masak jaffa4: working on one. it exists, but it's too primitive to brag about yet.
14:27 moritz_ no proper debugger yet, sorry
14:28 jaffa4 you know after using perl 5 debugger
14:28 bbkr rakudo:  (any("dog") ~~ none("dog")).say
14:28 p6eval rakudo b461fd: OUTPUT«1␤»
14:28 masak o.O
14:28 jaffa4 rakudo: g:m/hello/;
14:28 p6eval rakudo b461fd: OUTPUT«===SORRY!===␤Confused at line 11, near "g:m/hello/"␤»
14:28 masak jaffa4: it's m:g
14:29 moritz_ another item for wtop: don't mix junctions of different "type"
14:29 masak jaffa4: and it's not implemented yet.
14:29 jaffa4 rakudo: m:g/hello/;
14:29 p6eval rakudo b461fd: OUTPUT«===SORRY!===␤Confused at line 11, near "m:g/hello/"␤»
14:29 moritz_ implementing it is non-trivial :(
14:29 SmokeMachine joined #perl6
14:30 [Coke] "early adopters" =~ s/early//
14:31 azert0x joined #perl6
14:32 masak so, " adopters" :P
14:33 moritz_ std: "early adopters" =~ s/early//
14:33 p6eval std 31186: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/BekFL7UgWJ line 1:␤------> [32m"early adopters" =~[33m⏏[31m s/early//[0m␤Parse failed␤FAILED 00:01 108m␤»
14:33 moritz_ rakudo: "early adopters" =~ s/early//
14:33 p6eval rakudo b461fd: OUTPUT«===SORRY!===␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 11, near " s/early//"␤»
14:33 jaffa4 uesrs
14:34 kaare joined #perl6
14:34 jaffa4 What about the speed of rakudo, has it improved?
14:34 moritz_ yes
14:35 jaffa4 So how fast is it now?
14:35 masak still not very fast.
14:35 moritz_ startup time of about 0.4s
14:35 moritz_ as opposed to 0.7 to 1.0s three months ago
14:35 masak the GC runs give a visibly jerky feel to anything real-time.
14:35 takadonet can compile is a lot faster then before
14:35 takadonet around 2 min now instead 10 to 15
14:36 masak the real bottleneck in GGE is regex compilation in &eval.
14:36 jaffa4 What takes 2 minutes?
14:36 masak jaffa4: dunno. compiling gen-core? :)
14:37 masak sounds like a Jeopardy question.
14:37 takadonet yes
14:38 moritz_ 1) drinking a pint 2) combing 15cm long hair 3) compiling gen/core.pm 4) an average table tennis set
14:40 jaffa4 a set up to 11 points? Two minutes?
14:40 jnthn .oO( so if I cut my hair down to 15cm, I'd save enough time combing it on a morning to have a pint...interesting )
14:40 masak that sounds a bit short, yes.
14:41 moritz_ jaffa4: really depends on the opponents
14:41 moritz_ but the average time is more about 4 to 5 minutes if the strengths are roughly matched
14:42 xabbu42 joined #perl6
14:43 gbacon joined #perl6
14:43 jaffa4 2 minutes, if you win 11:0
14:44 moritz_ that's often even quicker :-)
14:44 moritz_ (though it also happens that you lose 0:11. D'oh! )
14:45 * pmichaud notes that advent2009-day17 takes f-o-r-e-v-e-r to run.  :-|
14:45 moritz_ pmichaud: I'm *so* > < close to creating a 'stresstest' target, and moving some files from spectest to stresstest
14:46 pmichaud +1 from me for that, I think.
14:47 proller joined #perl6
14:47 pmichaud there's probably an argument to be made that tests like the perl6-advent ones aren't properly part of the spec.
14:47 pmichaud they're important regression tests, but not necessarily spec tests.
14:48 moritz_ anything that tests valid Perl 6 code is a spectest, in some sense
14:48 [particle] um, no
14:48 [hudnix] joined #perl6
14:48 moritz_ there were times when I wanted a real-world Perl 6 app + tests in the test suite
14:48 [particle] spec tests are designed with a specific goal
14:49 moritz_ because rakudo had some many pugs that some things wouldn't work in modules, when exported, when loaded from a module etc.
14:49 moritz_ pugs had had similar bugs
14:49 moritz_ s/pugs/bugs/ in @line[*-2]
14:51 estrabd left #perl6
14:52 baest it also seems that parrot uses less memory. Especially for parrot-nqp to compile gen/core. I remember it using more than 1GB of mem, now it's about 500MB
14:52 baest very nice
14:53 [particle] yes, that was a bug that's been squashed
14:58 colomon I think day17 should be cut back.
14:58 colomon I don't think we gain anything by creating two 31x31 Mandelbrot sets.
14:59 hejki :P
14:59 ash__ joined #perl6
14:59 colomon create one 15x15, split into two halves for the two different approaches.
14:59 colomon that will be something like 8x faster.
15:04 colomon (if, on the other hand, you want to stress test with it, something bigger than 31x31 is needed.  ;)
15:05 [Coke] parrot has a test target that gets run only when a release is pending. is once a month too often for the advent stuff?
15:05 [Coke] (and things like it?)
15:12 colomon [Coke]: well, we want developers to be able to run it all the time (if not necessarily every time).  Particularly right now, when getting that stuff to work is a goal for R*.
15:12 colomon maybe "make inttest", or something like that?
15:13 moritz_ make stresstest
15:13 colomon I don't think stresstest is appropriate.
15:13 colomon I mean, I think having stress tests would be great.
15:14 colomon but we should be encouraging people to run the advent tests frequently, not making them slower.
15:14 [Coke] we call it 'fulltest' in parrot, fwiw.
15:14 moritz_ colomon: I don't think we should remove those advent tests from 'spectest'
15:14 moritz_ colomon: just that one really-long running test
15:15 Su-Shee "the man" at the linuxtag here in berlin says people are asking for perl 6 at the perl booth and interest is high.
15:15 moritz_ and maybe some of the more extensive trig tests
15:15 colomon moritz_: oh, I'd be up with that solution.
15:15 [Coke] we have found having multiple tiers of test useful in parrot. ymmv.
15:15 moritz_ szabgab++
15:16 colomon I've actually got a plan to reduce the number of trig tests a bit, but I've hesitated to use it before R* because it would do ugly things to the test counts.
15:16 Su-Shee vti just told on #mojo.
15:16 moritz_ colomon: test counts are a vanity metric, and should be treated as such
15:17 colomon moritz_: if it's just the one advent test you're worried about, I think slimming it down for spectest as I suggested back there a few minutes and then putting a hardcore version in stresstest would be appropriate.
15:17 moritz_ colomon: yes, that's my preferred solution
15:18 colomon moritz_: that's easy to say (vanity), but people do look at those graphs and go "What's happening here?"
15:18 moritz_ if that's a concern, I can remove the chart (only half-serious here)
15:20 colomon I guess we could go all Stalinist and just modify the test histories by removing the difference in the counts retroactively...
15:20 * diakopter fails to refrain from [meta]comment
15:20 diakopter ing
15:21 moritz_ colomon: I'd rather not
15:26 macdaddy joined #perl6
15:27 jaffa4 test counts
15:28 jaffa4 Where are they?
15:30 masak jaffa4: there are two test counts that matter. first, the total number of tests (in the spectest suite). second, the number of tests that an implementation (say, Rakudo) passes.
15:30 masak heh -- http://blogs.perl.org/users/alberto_sim​oes/2010/06/grepping-exact-values.html -- Perl 6 already has that form. :)
15:31 masak it falls out automatically from the way smartmatching on Str works.
15:31 moritz_ should I comment?
15:31 masak please do.
15:34 jaffa4 great
15:34 [Coke] ambs++
15:34 jaffa4 tests keep you from regressing.
15:35 masak jaffa4: the test suite was born alongside Pugs, and has kept evolving even when the Pugs effort came to a halt.
15:36 masak that's why it's still to be found in the Repo Formerly Known as the Pugs Repo.
15:37 moritz_ the Mu repo.
15:38 * masak moos
15:39 colomon joined #perl6
15:40 moritz_ or should we call it 'Any', so that later on we can also have a 'junction' repo? :-)
15:41 masak a repo with many eigenthings in it...
15:42 jaffa4 is pugs developed now?
15:42 moritz_ no
15:43 moritz_ only kept up-to-date with new GHC changes
15:43 masak as features go, it's standing still. the spec keeps moving further and further away from it.
15:45 jaldhar joined #perl6
15:45 moritz_ http://github.com/audreyt/Pugs.hs
15:45 jaffa4 nobody interested in Haskell?
15:46 moritz_ that's a broad oversimplification
15:47 jaffa4 let it be a first approximate to the truth function
15:47 jaffa4 approximation
15:47 moritz_ jaffa4: /join #haskell and say the same thing there
15:48 diakopter moritz_: OBVIOUSLY jaffa4 was saying "nobody [among perl6 folks] is interested in Haskell?"  don't be so obtuse
15:48 jaffa4 that is what I meant
15:48 diakopter and even if he wasn't, you should have given him the benefit of the doubt
15:48 jaffa4 yes
15:48 moritz_ diakopter: and even then the answer isn't "yes"
15:48 diakopter I wasn't addressing the correct answer
15:48 diakopter I was addressing your response
15:51 jaldhar joined #perl6
15:51 jaffa4 moritz_:  Are we ok now?
15:51 diakopter moritz_: and you should also have given jaffa4 the benefit of the doubt that what he COULD HAVE BEEN saying was: "is the fact that 'nobody [among perl6 folks] is interested in Haskell' a contributing factor to Pugs' lack of updates/attention?"
15:52 diakopter moritz_: not that he was implying it was the _only_ factor
15:52 krunen joined #perl6
15:52 moritz_ diakopter: I could have. But I don't always want to encourage overly terse and oversimplifying communication
15:54 diakopter :P then say your feelings on that directly, I recommend
15:54 moritz_ I will, in future
15:54 jaffa4 so moritz_ what is the situation in your opinion about pugs?
15:56 jaffa4 actually I read somewhere that Haskell is a skill that most programmer do not have here.
15:56 moritz_ anyway, there's no lack of interest in here in pugs and haskell.
15:57 jaffa4 but it is not developed.
15:57 jaffa4 that is like a contradiction to me.
15:57 masak I have interest in Pugs and Haskell, but not above a certain magical threshold.
15:57 diakopter (me too)
15:57 masak jaffa4: yes, all it takes is for someone to pick it up and develop it.
15:58 moritz_ but it's a quite complex program, and not one that's easy to maintain and extend if you're neither familiar with it nor a haskell guru
15:58 diakopter the problem is that "pick it up" has a very high perceived cost/effort
15:58 diakopter (which is almost certainly a correct perception unless the person is, as moritz_ said, a haskell guru)
15:59 diakopter not to mention another requirement is that the person also needs to be a Perl 6-circa2008 guru, which almost nobody is :)
15:59 diakopter er, 2007
16:00 moritz_ or at least understands enough of it *and* of current Perl 6 to know how to adapt it to current spec
16:02 masak right. probably more important to understand Perl 6 in general than to understand it as of 2007.
16:03 m6locks let's liek port pugs to lisp and problem solved
16:03 diakopter heh
16:04 moritz_ m6locks: well volunteered
16:04 cdarroch joined #perl6
16:04 cdarroch joined #perl6
16:07 jaffa4 was it not pugs sponsored in the past?
16:07 masak I half-remember audreyt deciding not to accept funding for Pugs.
16:09 Ross joined #perl6
16:09 * moritz_ half-decides to go home
16:09 jaffa4 I mean if it were sponsored
16:09 moritz_ not in significant amounts, I think
16:09 jaffa4 I guess there would be many more "volunteers"
16:09 masak would be if what?
16:10 jaffa4 if pugs were sponsored.
16:10 masak Pugs had no lack of "volunteers" when it was active. :)
16:10 masak not many of them committed directly to the Haskell code, though.
16:11 avar Yes it did. There were a lot of people working on auxilliary systems, but the core was pretty much audrey's domeyn
16:11 avar *domain
16:11 masak pretty much, yes.
16:11 avar So the core whithered with her gone
16:12 masak I'm still committed to reviewing Pugs at some point. that would entail understanding it to a large extent.
16:12 masak but I need to finish my extended honeymoon with GGE first. :)
16:12 masak er, PGE.
16:13 masak who chose this extremely confusing naming scheme? :P
16:13 avar masak: Wouldn't it be a lot of work to bring it up to date?
16:13 [particle] it's a honeymoon in glacial time
16:13 masak avar: probably. but I'm not talking about bringing it up to date, I'm talking about writing a software review.
16:14 jaldhar joined #perl6
16:17 masak I did that for one of the early Rakudo modules over a year ago: http://use.perl.org/~masak/journal/38644
16:19 jaffa4 I stumbled into a mysterious thing.
16:21 jaffa4 I have a version of Haskell 6.10.4
16:21 jaffa4 while the latest version is Haskell 6.10.1
16:21 takadonet jaffa4: what date are you from? Are you from the future?
16:21 masak Haskell is a language; are you referring to versions of GHC?
16:22 jaffa4 ghc
16:22 masak there was a GHC 6.12.2 released on 2010-04-22.
16:22 jaffa4 on the homepage, I can download 6.10.1
16:22 masak the 6.10.4 version was released on 2009-06-16.
16:22 masak jaffa4: http://haskell.org/ghc/
16:23 jaffa4 I see this http://haskell.org/ghc/downl​oad_ghc_6_10_1.html#windows
16:23 masak well, see the page I linked to :)
16:23 masak there's the 6.12.2 right there, by the top.
16:23 jaffa4 ok
16:23 jaffa4 I used Google
16:23 jaffa4 in Google,
16:23 masak probably the latest Pugs runs on that.
16:24 jaffa4 that is the first entry
16:24 jaffa4 one of the first
16:24 masak I also used Google. I searched for "ghc".
16:24 colomon joined #perl6
16:28 jaffa4 thanks.
16:29 patspam1 joined #perl6
16:30 masak nom &
16:46 jaffa4 Is this familiar setup.exe: ghc version >=6.4 is required but it could not be found.?
16:47 perlpilot joined #perl6
16:48 perlpilot did feather go kaput?
16:48 moritz_ jaffa4: it's not familiar, but the error message sounds pretty clear, no?
16:49 jaffa4 I installed ghc 6.12. something
16:49 jaffa4 it should be found
16:49 moritz_ is it in PATH?
16:49 TimToady perlpilot: looks like
16:50 Tene rakudo: sub MAIN(Int $n, :@target) {}
16:50 p6eval rakudo 16d9cb: OUTPUT«Usage␤/tmp/fYv0B5O0F_ n [--target=value-of-target]␤»
16:50 Tene suboptimal
16:51 jnthn I'm not sure putting type constraints on a MAIN is going to end well.
16:52 jaffa4 moritz_:  not in that console.
16:52 moritz_ jaffa4: that explains it.
16:52 TimToady colomon: by his two primary criteria, P6 is more of a functional language than Lisp.  :)
16:52 colomon TimToady: ;)
16:54 perlpilot TimToady: what are the chances that regex declarations outside of a grammar won't require a "my" or "our" in the future?  slim to none?
16:56 TimToady I thought about that some, but I would hesitate to make a declarator context sensitive like that.
16:56 TimToady sometimes it's better to mark things explicitly
16:56 TimToady and "my" is short for a reason :)
16:56 perlpilot okay, just checking.  thanks.
16:57 TimToady and think of it as subtle pressure to write a proper grammar class instead of ad-hocking it.  :)
16:58 * jnthn breathes a sign of relief. :-)
16:58 jnthn context sensitive declarator would be a tad scary.
16:58 * TimToady see a missing ascender
16:58 TimToady *s
16:59 TimToady it's also a bit error prone under refactoring
17:00 KyleHa joined #perl6
17:00 KyleHa Hello #perl6!
17:01 moritz_ \o/
17:02 perlpilot greetings KyleHa
17:02 moritz_ at some point I'll write a Contextual::Declare module, and advise against using it :-)
17:03 KyleHa I'm having trouble reaching the pugs svn.  Am I the only one?
17:03 moritz_ KyleHa: no. Feather appears to be done
17:03 moritz_ *down
17:03 KyleHa Any idea when it will return?
17:04 moritz_ no
17:04 moritz_ (seems the connection is broken, since the name server also doesn't work)
17:04 KyleHa That's what I figured.  I'll practice my big boy patience.
17:05 perlpilot What did you want to commit to the pugs repo?  tests?
17:05 moritz_ http://github.com/moritz/Mu # the git-svn clone is pretty much up to date
17:06 perlpilot this is one area where I wish the "official" repo was someplace like github
17:07 Ross joined #perl6
17:07 KyleHa perlpilot: I run a cron job that does something like 'svn update', and it's complaining.  I'm still on semi-hiatus.
17:07 tao_ perl8
17:07 tao_ pls
17:08 tao_ pugs with hugs
17:09 KyleHa I've been impressed with the work done in here when I've paid attention.  I wish I had more time to be part of it.
17:10 [particle] perlpilot: because github never goes down?
17:10 moritz_ less frequent than feather
17:11 moritz_ and with a DCVS it doesn't matter that much when the central repo is down
17:12 ggoebel joined #perl6
17:13 [particle] i can get a more stable svn host donated if desired
17:13 diakopter well
17:13 diakopter http://perl6.googlecode.com/
17:13 perlpilot that'd work too
17:13 perlpilot (though I tend to prefer git these days :)
17:13 moritz_ [particle]: if there's something viral like commitbit attached to it...
17:14 [particle] moritz_: it'd be on a vm we can manage
17:15 moritz_ [particle]: sounds great!
17:15 [particle] i wonder if i should talk to tpf about it... can't hurt
17:16 perlpilot [particle]++ that would be awesome
17:16 [particle] i'll mail karen, and my hosting contacts
17:16 xabbu42 joined #perl6
17:17 moritz_ [particle]++
17:17 [particle] can someone get me a list of requirements, if it's beyond svn hosting and small web site linked to svn (commitbit)
17:18 [particle] i think we can continue to use feather for builds and screen sessions
17:18 diakopter wherever it goes, I suggest not moving the repo history, and only selectively moving portions of the repo.  Maybe split it into two repos, one with things people committed to in the past year (src/perl6, t/, and smop/mildew, and whatever else), and another with everything else
17:18 moritz_ (in terms of perl modules, commitbit is not "small". In terms of traffic, it is)
17:18 perlpilot diakopter: why?
17:18 moritz_ diakopter: I'd rather svn rm the old stuff. I've started with it, but wasn't very radical
17:19 diakopter b/c it's confusing to everyone
17:19 diakopter svn rm is fine too
17:19 jaffa4 pugs does not install
17:19 diakopter jaffa4: which install instructions did you follow?
17:20 jaffa4 some homepage
17:20 diakopter which one?
17:20 moritz_ jaffa4: "some homepage" is not good. There's an INSTALL file in the repo...
17:20 moritz_ it worked for me last I tried
17:20 moritz_ (a few months ago)
17:20 [particle] pugs history should be preserved somewhere
17:20 jaffa4 here it is http://www.perlfoundation.org/​perl6/index.cgi?download_pugs
17:21 jaffa4 I used cabal install Pugs
17:21 moritz_ [particle]: it's already in a separate repo
17:21 [particle] i see the current pugs repo as a place where new perl6 ideas can be formed into realities
17:21 uniejo joined #perl6
17:22 diakopter jaffa4: which option under Step 1 did you follow
17:23 jaffa4 none
17:24 jaffa4 I downloaded the recent version of Haskell instread.
17:24 diakopter then you skipped a step :P
17:24 diakopter you started the 2nd option, but didn't complete the rest of it
17:24 jaffa4 ok, I try that too but i have my doubts
17:25 diakopter don't have doubts about it; there's no reason to
17:26 jaffa4 I got quite far in step 2.
17:26 diakopter oh
17:27 diakopter did you see the note at the end of step 2? (use sudo)
17:28 jaffa4 that was a problem
17:28 jaffa4 yes
17:28 jaffa4 I am beyond that now
17:28 diakopter so, it did install?
17:28 jaffa4 many packages
17:28 jaffa4 just not the whole thing.
17:28 jaffa4 there is a problem with some dependencies
17:29 [particle] anyone have any idea what the current hw is for feather, the load and the i/o wait?
17:29 moritz_ [particle]: you should ask Juerd when he's back
17:29 [particle] aye
17:29 moritz_ [particle]: but I think for svn + commitbit only the load will be pretty low
17:29 [particle] which bot leaves messages, phenny?
17:30 moritz_ yes
17:30 [particle] i/o is the main concern, bandwidth, you know.
17:30 justatheory joined #perl6
17:31 [particle] phenny tell juerd feather's kinda unstable for svn hosting so we're exploring alternatives.  could you tell me what the hw is, and the load, i/o, bandwidth numbers?  here or particle@parrot.org if you like.
17:33 Tene alpha: my $k = 'o'; say 'foo' ~~ m/$k/;
17:33 p6eval alpha 30e0ed: OUTPUT«Null PMC access in get_string()␤in Main (file <unknown>, line <unknown>)␤»
17:35 jnthn rakudo: my $k = 'o'; say 'foo' ~~ m/$k/;
17:35 p6eval rakudo 16d9cb: OUTPUT«o␤»
17:35 jnthn Tene: Ah...interpolation in regexes wasn't supported in alpha.
17:35 Tene jnthn: right, but the Web.pm stuff is still on alpha.
17:35 jnthn *nod*
17:35 Tene ah.  oh well.
17:38 stephenlb joined #perl6
17:39 Tene I've been wanting to work on updating it, but masak thinks it's scary, so I haven't looked yet.
17:44 xabbu42 joined #perl6
18:08 patrickas joined #perl6
18:09 patrickas good evening
18:09 phenny patrickas: 08:33Z <moritz_> tell patrickas that I merged his USAGE patches; one more thing that could be improved: optional named params should come before the manadatory, positional parameters in the usage message
18:09 phenny patrickas: 08:34Z <moritz_> tell patrickas one more thing: please add yourself to CREDITS in your next patch to rakudo
18:11 dalek joined #perl6
18:12 patrickas moritz_: done and done (also got my own email address wrong but running the spec tests caught it so I fixed that too :-) , I'll add some tests for the new stuff then pull request
18:14 plainhao joined #perl6
18:14 pyrimidine joined #perl6
18:17 patrickas jnthn: ping
18:17 * [Coke] wonders if enums woik now.
18:18 [Coke] ugh. I thought the "subset Q..." issue had been resolved.
18:20 Wolfman2000 joined #perl6
18:20 pyrimidine left #perl6
18:22 * patrickas bbl
18:24 jnthn patrickas: po..oh, damm.
18:25 * jnthn has finally got his main talk for Kiev into shape
18:31 dalek joined #perl6
18:32 pmichaud joined #perl6
18:32 pmichaud ENOFEATHER :-(
18:32 pmichaud TimToady: ping
18:33 TimToady pong
18:33 pmichaud TimToady: would you expect .iterator on a Parcel to flatten?  (more)
18:33 pmichaud i.e.,  if I have
18:33 pmichaud my $iter = (3, 4, (5, 6), 7).iterator
18:34 pmichaud and repeatedly call .getarg on it, would I get four elements or five before reaching Empty ?
18:34 TimToady I expect it to flatten or not based on .get vs .getarg
18:34 TimToady it's lazy
18:34 pmichaud how strongly are you tied to the .get vs. getarg distinction?  I'm feeling that this puts the flattening in the wrong place.
18:34 TimToady if you call getarg you'd get 4
18:34 TimToady if you call get you'd get 5
18:35 TimToady it's putting it at the binding point
18:35 TimToady it must not be type based
18:36 pmichaud well, we generally tend to bind against a Parcel, yes?
18:37 TimToady sure, but binding ($a,$b,$c,$d) will do .getargs, while ($a,$b,*@c) will get you getargs on the 2nd hafl
18:37 TimToady *lf
18:37 TimToady gets, rather
18:38 TimToady while ($a,$b,**@c) goes back to getarg everywhere
18:39 pmichaud I understand that part, but I'm wondering if we really want a slightly different model (more)
18:39 TimToady and I'm thinking of stealing *$x to mean return the iterator without commitment
18:39 TimToady instead of pulling the first one off
18:39 TimToady (but maybe that's already \$x or some such)
18:39 pmichaud I'm thinking of having "List" mean "lazily evaluated Parcel" (more)
18:40 pmichaud with the distinction being that it's possible to do a partial binding against a List
18:40 TimToady hence our CaptureCursors
18:40 TimToady needed by map and such
18:40 pmichaud i.e., the binder is able to look at a List in both its flattening and non-flattening contexts (same as we do for Parcel now), but it doesn't care if there are extra values left over
18:41 pmichaud "binder" == "signature binder"
18:41 TimToady that's what a cursor does
18:43 TimToady the cursor running out at the end is just like checking that $ got to the end of the string
18:43 TimToady or however you say that
18:43 pmichaud okay, I'll look at it some more.  But right now the .get versus .getarg distinction feels very hokey.
18:43 TimToady so it's an extra constraint on "normal" bindings
18:43 pmichaud for example, if I'm writing a new Iterator, do I tend to write .getarg or .get?  (or do I have to do both?)
18:44 TimToady it gets both if you return parcels as subparcels
18:44 pmichaud if *what* returns... parcels or subparcels/
18:44 pmichaud ?
18:44 TimToady the generator
18:44 pmichaud what do I call the generator?
18:44 TimToady gather while ... { take ... } generates one parcel per loop iter
18:44 pmichaud and/or where do I attach it to the Iterator's .get and .getarg?
18:45 TimToady it?
18:45 pmichaud the generator
18:45 TimToady you're just feeding things to the gather; you don't care if the other end calls get or getarg
18:46 pmichaud okay, I'll back up a second.
18:46 pmichaud a gather statement creates a List (which wraps an Iterator)
18:46 pmichaud (or which is an iterator -- doesn't matter for this discussion)
18:46 pmichaud actually, let me restart
18:47 pmichaud if I'm creating RangeIter, what methods do I need to be defining?
18:47 mberends joined #perl6
18:48 TimToady a range presumably can't make subparcels, so get and getarg are the same thing
18:48 pmichaud so, do I define .getarg, .get, or both?
18:48 TimToady both
18:48 TimToady they just have the same effect, since the "if next arg is parcel" test is always false
18:48 TimToady so getarg could just alias get
18:48 pmichaud if I'm creating some other form of iterator, say XYZIter, do I also have to define both the .get and .getarg forms?
18:49 TimToady yes, they are both always in the API
18:49 pmichaud (getarg alias get) -- that feels backwards to me.
18:49 pmichaud it seems to me that .get should be built in terms of .getarg, not vice-versa
18:49 TimToady *
18:49 pmichaud because flattening loses information
18:49 dual joined #perl6
18:49 TimToady not if no flattening can occur :)
18:49 pmichaud right, so now I'm looking at the case where flattening can occur :)
18:49 TimToady but *
18:50 TimToady then you need both, and they do differen things
18:50 pmichaud and so I always have to write my own flattening logic?
18:50 TimToady the API must also be able to return a hypothetical iterator to be used by hypothetical binding, which we can call "cursor"
18:50 pmichaud i.e., every iterator has to define how it flattens (via .get?)
18:51 TimToady no, the generic version could always define one in terms of the other
18:52 pmichaud okay, and I'm guessing the generic version should define .get in terms of .getarg, since (afaict) it's not really possible to go the other way
18:52 TimToady but you have to keep some state as to how much of the next arg has been flattened
18:53 TimToady that state could be done by shifting the arg and unshifting its components
18:53 pmichaud part of me wants .get to become .getflat and .getarg to be .get
18:53 pmichaud because for the most part, I think we should be defaulting to preserving information rather than eliminating it
18:53 TimToady something to be said for that
18:54 pmichaud also, it seems more natural for newly defined iterators to be defining .get
18:54 TimToady .smooth and .chunky  :)
18:54 TimToady that is certainly negotiable
18:55 pmichaud okay, I'll go look at CaptureCursor a bit.
18:55 TimToady but we have to have the cursors to keep hypothetical bindings transactional and roll-backable
18:55 pmichaud the List approach I was looking at was still transactional/roll-backable
18:55 pmichaud so it may in fact be very similar.
18:55 TimToady that's something that probably didn't make the transition from pm.txt completely, if at all
18:56 TimToady I guess it's mentioned in S02
18:56 pmichaud yes, looks like one or two lines in S02
18:56 TimToady but the end of pm.txt was groping for it
18:56 pmichaud anyway, under the current spec it seems very difficult to see where the main role of flattening takes place
18:57 pmichaud there are a lot of terms that don't match up.
18:57 TimToady but I think the mechanism used by map and the mechanism used by multis to do commit/rollback are the same
18:57 TimToady s/are/is/
18:57 pmichaud I agree, I was working from that premise.
18:57 pmichaud I think I might just have a different mechanism :)
18:58 TimToady I think implicit flattening is only ever done by binding
18:58 pmichaud well, and list assignment
18:58 TimToady and since some multis can flatten while others don't, that choice is part of the hypothetical being "known" by the cursor
18:58 TimToady not by the main iterator
18:58 pmichaud right
18:59 TimToady .flat and .slice, are, of course, explicitly available
18:59 TimToady and .list is still very close to a no-op
18:59 pmichaud I've just been looking at it as binding against a structure instead of binding against a Cursor
18:59 TimToady except to pull an iterator out of something iterable
18:59 pmichaud e.g., the way we currently bind against Parcel as a structure
19:00 moritz_ I've just done a book releasae
19:00 colomon moritz_++
19:00 moritz_ since some of the changes depend on a not-yet-released module, I've only pushed the changes to a branch
19:00 TimToady as long as the structure is the structure of a cursor, you're fine :)
19:00 moritz_ called 'ng'
19:00 pmichaud well, it essentially is, yes.
19:01 * moritz_ forgot to fix the title page
19:01 moritz_ ah well
19:02 TimToady pmichaud: but there are deep connections to cursors used in pattern matching in general
19:02 pmichaud I can buy that.
19:02 TimToady and we should push that to the extent we can underneath, without forcing the user to think about it
19:02 TimToady biab &
19:05 TimToady and .chunks corresponds to .flat, more or less
19:06 TimToady which is funny
19:06 moritz_ funny that it's something that wasn't in the original design
19:06 TimToady and it's the normal match object that gives the .slicey view
19:06 patrickas joined #perl6
19:06 moritz_ and later added due to my continued complaining :-)
19:06 patrickas back
19:06 jnthn patrickas: PONG!
19:07 patrickas that's a pong and a half!
19:07 jnthn It grew up while it waited for you. ;-)
19:07 jnthn I missed you by like a minute. :-)
19:07 TimToady but it also bolsters your argument that the unmarked form is the hierarchical one, and the flattening one is special
19:07 TimToady so perhaps we should rename .chunks to .flat
19:08 pmichaud I think that would help, yes.
19:08 mberends jnthn: pong! pong!
19:08 frettled What about .sharp?
19:09 jnthn mberends: I kinda can't remember what I pung you about now...
19:09 patrickas I wanted to ask you and maybe moritz_ about how to handle the case of sub MAIN('add' , $file) {} ... I did a quick and dirty patch that would say Usage: script param $file
19:09 jnthn mberends: Did you get the messages I left on proto?
19:09 TimToady frettled: feels unnatural
19:09 moritz_ patrickas: the super-awesome method would be to look for the .constraint of the parameter
19:09 jnthn mberends: I think I ran into something in FakeDBI too
19:09 patrickas which is better than what we have now but too unhelpfull
19:09 jnthn mberends: But in the end it's just a NYI IIRC
19:10 pmichaud the thing that worries me about .chunks => .flat  is that it might be a mite too close to .flat on other forms of lists
19:10 jnthn mberends: Oh, I remember. Is there a method that gets all the rows as hashes, and an array of those?
19:10 pmichaud and not have really the same meaning-ish
19:10 mberends jnthn: yes thanks, and I'll be working on that at FPW in Calais tomorrow and Saturday, hopefully roping in some more hackers too.
19:10 frettled TimToady: a bit off key? :)
19:10 moritz_ patrickas: and if the constraint is defined and either Numeric or Str, use the constraint instead of 'param' (and add quotes around it, ot make it clear it's a literal)
19:10 pmichaud especially since  $<xyz>.flat  would end up meaning entirely different things depending on whether <xyz> was a quantified capture versus an unquantified one
19:11 frettled pmichaud: that's worrysome, yes.
19:11 patrickas moritz_: let me try that to get a feel of what you mean
19:11 jnthn mberends: Excellent.
19:11 moritz_ rakudo: sub f('foo', $x) { }; say &f.signature.params.[0].constraint
19:11 p6eval rakudo 16d9cb: OUTPUT«Method 'constraint' not found for invocant of class 'Parameter'␤  in main program body at line 11:/tmp/Q0EfEEORi7␤»
19:11 moritz_ rakudo: sub f('foo', $x) { }; say &f.signature.params.[0].constraints
19:11 p6eval rakudo 16d9cb: OUTPUT«foo␤»
19:12 moritz_ so that could produce: Usage: -e '...' 'foo' x
19:12 patrickas THat would be great
19:12 pmichaud also, fwiw,  I find that .flat (on listy things) is a very opaque concept at the moment.
19:12 jnthn rakudo: sub f('foo', $x) { }; say &f.signature.params.[0].^methods(:local);
19:12 p6eval rakudo 16d9cb: OUTPUT«nameddefaultoptionaltype_capturesrwmulti​_invocantslurpysignaturecaptureparcelconstraint​snamed_namescopyrefreadonlynametypeinvocant␤»
19:13 pmurias joined #perl6
19:13 TimToady .chunks -> .linear maybe
19:13 pmurias diakopter: why shouldn't the history be moved?
19:13 jnthn rakudo: sub f('foo', $x) { }; say &f.signature.params.[0].^methods(:local).join(', ');
19:13 p6eval rakudo 16d9cb: OUTPUT«parcel, constraints, named_names, copy, ref, readonly, name, type, invocant, default, named, optional, type_captures, rw, multi_invocant, slurpy, signature, capture␤»
19:13 jnthn huh, constraints is there
19:13 jnthn sub f('foo', $x) { }; say &f.signature.params.[0].constraints
19:13 jnthn rakudo: sub f('foo', $x) { }; say &f.signature.params.[0].constraints
19:13 p6eval rakudo 16d9cb: OUTPUT«foo␤»
19:13 jnthn moritz_: oh, plural :-)
19:13 mberends jnthn: Su-Shee++ is adding all the fetch*() methods that P5 DBI has, but may be waiting to commit until she has added tests as well. One of the methods is fetchall_hashref(), that comes closest to what you're asking. The hash keys are the primary keys for each row, the values are refs to arrays of fields.
19:13 jnthn patrickas: Like that, anyways.
19:14 jnthn mberends: I was looking for an array of hash, but that'd be obtainable thorugh .values I guess
19:14 Su-Shee this Su-Shee person has commiting and writing tests scheduled. :)
19:14 mberends :)
19:14 jnthn That Su-Shee person sounds awesome. :-)
19:14 patrickas well now that moritz_ did the whole thing i'll just copy paste it from irc to the file :-)
19:15 jnthn mberends, Su-Shee: BTW, FakeDBI worked "out the box" on my (Debian) server. :-)
19:15 mberends jnthn: I was wondering how you managed to execute a 'touch' command...
19:16 moritz_ :-)
19:16 jnthn mberends: I tried pre-compiling things but it's still extremely slow and feels like it's not picking up on the pre-compiled files.
19:16 jnthn mberends: Any thoughts?
19:16 jnthn It seemed to get no faster when I pre-compiled.
19:16 jnthn But maybe the DBD gets loaded in an intresting way?
19:16 mberends jnthn: no. It does seem slow here too :(
19:16 moritz_ like, for every call? :-)
19:17 mberends no, just startup
19:17 jnthn moritz_: No, it's OK when running.
19:19 Su-Shee I have like 10, 12 seconds startup, then it's doing ok.
19:20 mberends jnthn: the DBD gets loaded by a 'use' command called from DBI.connect(). That may be dodgy.
19:20 jnthn mberends: Should be OK if it's using use.
19:21 jnthn mberends: I'll have a dig.
19:21 moritz_ patrickas: I'm squashing a few of your commits into one to remove the clutter
19:22 mberends jnthn: I suggest you temporarily rename the .pm6 files to force the loader to use the .pir ones.
19:22 dalek joined #perl6
19:22 Su-Shee I've read up on mathw's GIR mentioning concerning binding gtk and that really look like the way to go.
19:22 dukeleto joined #perl6
19:22 hatsefla1s joined #perl6
19:22 perlpilot feather is back!
19:23 mberends Su-Shee: could that be another Zavolaj based project?
19:23 jnthn mberends: ah...renaming it gives me an internal server error.
19:23 jnthn mberends: So it's not finding the PIR one. Hm
19:23 jnthn mberends: oh, of course.
19:24 jnthn mberends: It has to find the .pm6 there first I guess.
19:24 Su-Shee mberends: it would make binding it as easy as it could possibly be - from the C side.
19:24 jnthn mberends: OOOH!
19:24 jnthn mberends: duh!
19:24 jnthn jnthn--
19:25 jnthn my $pir_file := pir::substr__SSII($pm_file, 0, pir::length__IS($pm_file) - 2) ~ 'pir';
19:25 jnthn Doesn't work if the extension is .pm6
19:25 mberends ah, all written for .pm only
19:25 jnthn Yup
19:26 moritz_ so, rindex for last '.' ?
19:26 Su-Shee mberends: it's essentially a parser/compiler which generates kind-of a binding map from libs. look at this picture: http://live.gnome.org/GObjec​tIntrospection/Architecture the only thing I'm not sure about yet is wether or not the lib itself has do do gobjects or if it works for _all_ proper C libs.
19:27 Su-Shee mberends: but _if_ gir works, you seem to get everything from cairo, pango, gtk until clutter.
19:27 pugssvn joined #perl6
19:28 mberends Su-Shee: ASCII art to document a GUI? WTF?
19:28 * moritz_ likes
19:29 Su-Shee mberends: well .. :)
19:29 patrickas damn it, I read moritz_ suggestion earlier in the backlog and tried it but could not get it to work no matter I tried what now I see the one that works it was the same as what I had so i checked again and I think i found a "strange" rakudo bug (ain't they all) :-)
19:29 patrickas rakudo: sub foo ('add' ) {...} ; say &foo.signature.params[0].constraints;
19:29 p6eval rakudo 16d9cb: OUTPUT«add␤»
19:30 Su-Shee mr Gtk2 also wrote a tutorial for perl 5.
19:30 patrickas rakudo: sub foo ('add' ) {...} ; say &foo.signature.perl; say &foo.signature.params[0].constraints;
19:30 p6eval rakudo 16d9cb: OUTPUT«:(Str  where ("add"))␤␤»
19:31 patrickas if I "say" the signatire first - for debugging , the contraint becomes empty!
19:31 pmichaud back (sorry, got a phone call here)
19:32 patrickas ... signature ... constraint ... I need an auto  spell checker here :(
19:33 Su-Shee ah, here it is how to do it with p5 if that helps: http://live.gnome.org/GTK2-Perl/Introspection
19:33 pmichaud so, looking at what I can find of CaptureCursor, it looks a _lot_ like what I was thinking of for "List"
19:34 pmichaud let me back up a bit further then.
19:34 ShaneC joined #perl6
19:34 pmichaud if I have    @xyz.grep(...).WHAT
19:34 pmichaud what would we like the .WHAT to be?
19:35 pmichaud I'm thinking that "GatherIterator" is wrong.
19:35 poincare101 joined #perl6
19:35 poincare101 I just heard on #perl that rakudo might retarget. Is this even remotely true?
19:36 colomon poincare101: retarget?
19:36 moritz_ poincare101: it won't be considered before the Rakudo Star release
19:36 pmichaud poincare101: retarget as in "use other backends besides Parrot"?  It's more than remotely true.
19:36 poincare101 pmichaud: ah.
19:36 hatsefla1s joined #perl6
19:36 pmichaud Rakudo is definitely being written with the goal of eventually being multi-backend, although that's not a current priority.
19:36 colomon there are certainly no plans to drop Parrot.
19:36 dalek joined #perl6
19:36 poincare101 pmichaud: I see, I see.
19:36 jnthn Right, the plan is to add additonal backends alongside Parrot.
19:36 jnthn But after R*. :-)
19:37 moritz_ rakudo: @*ARGS = <a b c d e>
19:37 p6eval rakudo 16d9cb: OUTPUT«Cannot assign to readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 11:/tmp/g1r18VPue4␤»
19:37 dalek rakudo: 563cad0 | patrickas++ | CREDITS:
19:37 dalek rakudo: Fame and fortune for patrickas \o/
19:37 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
19:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​63cad09783fd4596041a262f4fef5a7ffff54d3
19:37 dalek rakudo: 3b29cd2 | patrickas++ | src/core/MAIN.pm:
19:37 dalek rakudo: named arguments are always shown first
19:37 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
19:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​b29cd2b5ee26279aa1e22b1480f779fc383bda4
19:37 moritz_ right or wrong?
19:37 pmichaud I'm reasonably certain @*ARGS should be writable.
19:37 pugssvn joined #perl6
19:37 moritz_ that would have been my expectation too
19:38 * moritz_ submits mas^Wrakudobug
19:38 pmichaud it probably just eneds the rw propery set.
19:38 pmichaud *needs
19:39 moritz_ like setprop $P2, "rw"?
19:39 pmichaud setprop $P2, 'rw', $P3
19:39 pmichaud where $P3 is Bool;True
19:39 moritz_ ok
19:39 pmichaud I think a few places may have been doing   setprop $P2, 'rw', $P2    but I think that may bite us someday.
19:41 dukeleto joined #perl6
19:41 moritz_ I'll do a get_hll_global 'True'
19:41 pmichaud moritz_: +1
19:41 pmichaud jnthn: ping
19:41 moritz_ hey, maybe I can fix that bug before submitting it :-)
19:41 changa- joined #perl6
19:42 patrickas rakudo: sub foo ( Str  where ("add") ) {..}
19:42 p6eval rakudo 16d9cb: OUTPUT«===SORRY!===␤Can not do non-typename cases of type_constraint yet at line 11, near ") {..}"␤»
19:42 patrickas rakudo: sub foo ( Str  where ("add") ) {}
19:42 p6eval rakudo 16d9cb: OUTPUT«===SORRY!===␤Can not do non-typename cases of type_constraint yet at line 11, near ") {}"␤»
19:42 pmichaud rakudo: sub foo (Str $ where 'add' ) { }
19:42 p6eval rakudo 16d9cb:  ( no output )
19:43 jnthn pmichaud: pong
19:43 pmichaud jnthn: does the current binder tend to work on Captures or on Parcels?
19:43 pmichaud (I forget, don't want to look :-)
19:43 jnthn Captures.
19:43 patrickas thanks pmichaud, that means the output of &foo.signature.perl needs fixing!
19:43 pmichaud Okay, excellent, thanks.
19:43 jnthn pmichaud: I'm not sure how it could work on parcels...without first coercing them to captures anywya. :-)
19:43 jnthn *anyway
19:44 pmichaud jnthn: yes, makes sense.  I've just got so many variations floating in my head I need a few reality points :)
19:44 jnthn pmichaud: It's perfectly fine with either a Parrot CallSig or a Perl 6 Capture.
19:44 jnthn pmichaud: In fact, in a nested signature case, we just .Capture the argument to coerce it into a Capture and recurse.
19:45 moritz_ simplicity++
19:45 pmichaud okay, wfm.
19:45 pmichaud thanks.
19:45 jnthn moritz_: Yeah, I was happy how easily nested signatures dropped out.
19:46 jnthn pmichaud: Handling *@args and **@args properly will need a some changes no doubt.
19:47 jnthn pmichaud: It's pretty encapsulated to one area of the binder.
19:47 pmichaud TimToady: if someone does .get(flat) on an iterator, which partially consumes a parcel and leaves the remaining elements for a subsequent .get(flat), what happens if someone then calls .getarg on the iterator?
19:47 pmichaud jnthn: yeah, I'm actually not too worried about the binder code.  Every time I look at it I tend to think "oh, sure, we can change this easily if we need to"
19:47 pmichaud jnthn++
19:47 jnthn pmichaud: That makes me feel like I got it rightish. :-)
19:48 pmichaud me too :-)
19:48 pmichaud TimToady: do we get the remainder of the partially consumed parcel, do we throw an exception, or ... ?
19:48 dalek rakudo: ec2694e | moritz++ |  (2 files):
19:48 dalek rakudo: make @*ARGS writable. This allows us to run S06-other/main.t, so do that
19:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​c2694e7218de7774ef036a3a1c29ee9ec301a01
19:49 pmichaud (earlier conversation about moving pugscode repo off of feather)  -- fwiw, I'm still liking the idea that we could split a few things up and put it into the perl6 repository on github :)
19:50 pmichaud (not sure I want to do this in June, however.)
19:51 TimToady we just get the lower level arg, like car vs cdr in lisp
19:51 moritz_ pmichaud: agreed on 'not in June'
19:51 pmichaud ummm, I know all of those words but still don't understand the answer.  :-|
19:52 pmichaud (having forgotten lisp from 20+ years ago)
19:53 pmichaud my $iter = ((3,4,5), (6,7));  my $a = iter.get;  my $b = iter.getarg;  # what is $b ?
19:53 TimToady I'd use the $arg = getarg; ungetflat(@$arg) model, I think, so the next arg is flattened into N args
19:53 pmichaud add $'s to the 'iter's above.
19:54 pmichaud okay, so in my example above, $b is 4
19:54 TimToady $b is 4
19:54 TimToady yes
19:54 pmichaud okay (more)
19:54 pmichaud in that case, I *really* want whatever code generates the next parcel to be neither .getflat nor .getarg
19:54 pmichaud because that implies that everyone's .getarg has to "know" how to deal with ungetflat
19:55 pmichaud as opposed to simply producing parcels
19:55 pmichaud (e.g., the XYZIter example from earlier, arguing that .getflat should be in terms of .getarg and not vice-versa)
19:55 TimToady I believe I'm on record as desiring all iterators to support pushback
19:55 pmichaud I agree with that
19:55 pmichaud but there ought to be a low-level method that just means "give me the next parcel" that can be called by either .getflat or .getarg as appropriate
19:56 pmichaud rather than requiring every type of Iterator to know about it intimately
19:56 TimToady but, that's what getarg is
19:56 changa- left #perl6
19:56 pmichaud not if getarg also has to know about the pushback
19:57 pmichaud in other words, my RangeIter.getarg method has to do more than just compute the next item in sequence, it has to explicitly check the pushback queue
19:58 TimToady the mininum is that it support returning a cursor that can support pushback
19:59 pmichaud okay, that lost me entirely.
19:59 pmichaud (not sure what "it" is, to begin with)
20:00 TimToady an iterator does not need to support pushback, but it does need a standard way to transform into a type that can, and that might be .gimme-a-cursor
20:00 madalu joined #perl6
20:01 pmichaud so, my invoking .get on a (custom) Iterator can cause the iterator to change type?
20:01 TimToady though it's possible that's confusing two different roles for cursors
20:01 pmichaud I think it is.
20:01 masak joined #perl6
20:01 masak ahojte!
20:02 moritz_ masak: I've found a rakudobug... and not submitted it :-)
20:02 pmichaud Part of what is giving me fits is that our types don't have clearly defined responsibilities -- it's all sorta vague-ish and inconsistent.
20:02 moritz_ (instead, I fixed it)
20:02 pmichaud moritz_++ # nice fix, btw
20:02 masak moritz_: how unorthodox! :)
20:02 Tene masak: you find any way to work around variable interpolation in regexes in alpha?
20:02 masak Tene: eval.
20:02 patrickas moritz_++
20:02 patrickas how can i distinguish between
20:02 Tene masak: Oh.  Huh.  I guess that works.  I'll try that.
20:03 patrickas rakudo: sub foo (Str $ where ("add"|"del")) {...} ; say &foo.signature.params[0].constraints;
20:03 p6eval rakudo 16d9cb: OUTPUT«_block43␤»
20:03 patrickas rakudo: sub foo ("_block43") {...} ; say &foo.signature.params[0].constraints;
20:03 p6eval rakudo 16d9cb: OUTPUT«_block43␤»
20:03 moritz_ patrickas: it seems to not pick up custom usage subs :(
20:03 moritz_ patrickas: &foo.signature.params[0].constraints.WHAT
20:03 moritz_ rakudo: sub MAIN($x) { }; sub USAGE { say "OH NOEZ" }
20:03 Psyche^ joined #perl6
20:03 p6eval rakudo 16d9cb: OUTPUT«Usage␤/tmp/QI9xMndxYQ x␤»
20:04 patrickas yea I noticed, so at least I would like to treat them differently
20:04 patrickas rakudo: sub MAIN($x) { }; our sub USAGE { say "OH NOEZ" }
20:04 p6eval rakudo 16d9cb: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'USAGE' at line 11:/tmp/EarYv0r_U1␤  in 'MAIN_HELPER' at line 5877:CORE.setting␤  in main program body at line 1:/tmp/EarYv0r_U1␤»
20:04 patrickas rakudo: sub MAIN($x) { }; our sub USAGE ($main) { say "OH NOEZ" }
20:04 p6eval rakudo 16d9cb: OUTPUT«OH NOEZ␤1␤»
20:04 xinming joined #perl6
20:04 TimToady pmichaud: if we push it more toward the immutable cursor model, there's really no such thing as an iterator, in the mutable sense.  You have a cursor, and you do something with it to produce a different cursor.
20:04 moritz_ is USAGE supposed to have a parameter, by spec?
20:04 TimToady you do transactions by remembering your start cursor
20:05 ashleydev_ joined #perl6
20:05 patrickas no i think not
20:05 TimToady you flatten by having a cursor that iterates the next arg and then converges with the cursor you would have got from getarg
20:05 pmichaud TimToady: I have trouble mapping that to the idea of .get and .getarg
20:06 patrickas I added it because it made testing much easier and did not notice it would have an effect
20:06 pmichaud TimToady: just a sec, let me re-orient my worldview a second
20:06 TimToady pmichaud: the problem is that .getflat and .getarg aren't really supposed to return the value; they return the cursor which has the value as a .ast thingy
20:07 pmichaud and so when I say
20:07 pmichaud my $b = $iter.getarg;
20:07 pmichaud I'm really not getting 4.
20:07 pmichaud (from my earlier example)
20:07 patrickas moritz_: I gave usage a default parameter thinking it would not matter then !
20:07 TimToady that is assuming a mutable $iter
20:07 pmichaud I understand... I'm just trying to make the example match what you just said.  :)
20:08 moritz_ patrickas: it matters if you explicitly pass a parameter, because then a USAGE sub *has* to accept at least one
20:08 TimToady we can have a user-view with a mutable iterator, but it's really a container for an immutable cursor
20:08 pmichaud okay, I can handle that
20:08 TimToady but the fancy stuff is all done with cursors, not with mutables
20:08 pmichaud so, .getarg and .getflat are methods on the mutable iterator, and it's the underlying Cursor that is responsible for producing the values?
20:09 TimToady basically, if those are the method names we choose to show the user
20:09 pmichaud or, put another way, instead of a RangeIter I should be writing a RangeCursor?
20:09 patrickas moritz_: ok then I won't pass anything
20:09 TimToady which will look a lot like the LazyRange in STD
20:10 pmichaud and same for our other *Iter things that we have now -- they're in fact Cursors?
20:10 pmichaud and what we know as "Iterator" is a container for managing the underlying cursors (and supporting pushback and the like)?
20:10 moritz_ patrickas: you can also use the Q:PIR trick for getting the users's lexical USAGE routine (the same trick I use for MAIN)
20:10 TimToady pmichaud: that sounds about right
20:11 * masak likes the new look of the book
20:11 pmichaud this feels very different from what I read in the spec.  Am I correct that it's different, or have I been totally misreading the spec?
20:11 TimToady and pushback is just creating a cursor that, when the front list is exhausted, converges again on the original cursor sequence
20:12 Su-Shee joined #perl6
20:12 pmichaud (or has the spec just been very incomplete on this point?)
20:12 patrickas moritz_: so that the user will not have to define it as "our sub USAGE ? "
20:12 moritz_ patrickas: right
20:12 * TimToady thinks that TimToady is very stupid not to have realized all this sooner.
20:12 patrickas_ joined #perl6
20:12 moritz_ patrickas: that trick picks up lexical subs from the caller's scope
20:12 pmichaud this also makes me wish that what we currently have as "Cursor" was somehow "RegexCursor" instead.  :)
20:13 TimToady I knew we needed cursors, but didn't learn the lessons of STD/Cursor
20:13 TimToady pmichaud: well, sure
20:13 pmichaud and I still don't have a clean mental mapping between RegexCursor and the other types of Cursors.  I see how they follow a similar pattern, but they aren't truly unified in my head yet.
20:13 patrickas_ moritz_: OK in that case I'll also move the default usage inside MAIN_HELPER
20:14 pmichaud (and I'm not eager to try to unify them prior to July)
20:14 moritz_ patrickas_: check the spec first if there should be a user-visible USAGE sub
20:14 pmichaud TimToady: another thought
20:14 TimToady I wouldn't suggest trying to unify them in any significant way right now
20:14 pmichaud agreed
20:14 pmichaud are "Lists"  then just another mechanism for managing cursors?
20:15 pmichaud i.e., would it be possible to have Lists without having to go through iterators?
20:15 pmichaud basically, a list would just have a reified component and a non-reified cursor component?
20:15 patrickas_ moritz_: "If an attempted dispatch to MAIN fails, the USAGE routine is called. If there is no USAGE routine, a default message is printed."
20:15 TimToady I think List and the $iter above are the same thing, more or less, yes
20:15 moritz_ patrickas_: ok, so no user visisble USAGE routine
20:16 patrickas_ what about MAIN_HELPER ? is there a way to hide it too ?
20:16 pmichaud okay
20:16 pmichaud that helps lead towards the idea I had of "flattening iterators"
20:16 pmichaud i.e., lists manage the cursors, and we can talk about a list as an item (non-flattening) or as a list (flattening)
20:17 TimToady which is the .flat vs .slice distinction, predeciding the matter
20:17 pmichaud right
20:17 pmichaud also, it feels to me as though lists ought to be mutable, since they support pushback
20:17 pmichaud (that also feels rightish)
20:18 TimToady yes
20:18 pmichaud I'm still not sure about .get/.getarg on lists as we've defined them here, but it can be made to work.
20:18 pmichaud it also feels weirdish because earlier we said that CaptureCursor was the thing supporting .get and .getarg (I think)
20:19 TimToady now, if lists are really arrays in disguise, I think we can really get the rest of the way by providing a simple way to iterate an array destructively
20:19 pmichaud so something doesn't quite fit there either
20:19 pmichaud (iterate an array destructively)  that was the idea I had earlier this week
20:19 Util joined #perl6
20:19 pmichaud I was thinking of an "eaterator"
20:19 TimToady "munch" I suggested earlier
20:19 pmichaud i.e., it consumes the array/list as it iterates
20:19 pmichaud ah, yes, "munch".  I didn't make the connection.
20:19 TimToady and it may even be that munch is a macro of the delete variety
20:19 TimToady munch @a[1,2]
20:20 pmichaud that's sounding very much like what I was thinking of for Lists and partial binding
20:20 [Coke] John Munch?
20:20 Su-Shee sound more like Pacman ;)
20:20 TimToady or munch %hash<foo bar>
20:20 pmichaud i.e., "map"  does a partial binding against a List, and then munches whatever actually got used
20:20 TimToady and "munch" implies returning the values, unlike "delete"
20:20 cxreg is jnthn's "solved in perl 6" slides anywhere?
20:20 pugssvn r31187 | moritz++ | [t/spec] make Test::Util accept command line arguments for the program to be run
20:20 pugssvn r31188 | moritz++ | [t/spec] new test file for sub USAGE together with MAIN
20:21 TimToady but can also imply destruction, as in "I munched my car."
20:21 cxreg oh nm, just found them
20:21 moritz_ cxreg: probably http://jnthn.net/articles.shtml
20:21 pmichaud TimToady: okay, so where do you propose that I (or we) got from here?
20:21 pmichaud *go
20:22 TimToady so "munch @iter" just munches the whole array and returns it as a list, which really means just inline the @real,@imag bits of it
20:22 pmichaud getting lists resolved is pretty high on my todo list :-)
20:22 TimToady an explicit munch means that *@list is okay
20:22 pmichaud yes
20:22 pmichaud that's what I was looking for for map()
20:22 TimToady and not munching means you intended to keep the values from the start
20:22 pmichaud correct.
20:23 TimToady I think I like this
20:23 pmichaud sub map(&block, *@values) {  @values.munch.map(&block); }    # what I've been trying to get to
20:23 moritz_ patrickas_: there you go, a TODO'ed test that starts passing once we pick up lexical USAGE subs
20:23 TimToady munch is basically a smart delete/shift thing
20:23 dalek rakudo: c43bca7 | moritz++ |  (2 files):
20:23 dalek rakudo: print USAGE message to $*ERR, just because it feels right-isher
20:23 dalek rakudo: Also run new test main-usage.t
20:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​43bca73f2f97d0ab6284e292b0d98c1bacde1f1
20:23 pmichaud (and I don't think I can be lazily evaluating my todo list for much longer, I've got to get a few things reified soon)
20:23 TimToady or just \$values; $values.map maybe
20:24 pmichaud that's possible too.
20:24 nimiezko joined #perl6
20:24 pmichaud but ultimately I was trying to get to a simple interface for writing filters
20:24 TimToady but I like that mere mortals can confuse arrays and lists for normal code, and all they pay is delayed GC
20:24 pmichaud i.e., a simple way to say "please throw away items as you process them"
20:24 pmichaud correct
20:25 TimToady and it's easy to teach munch as a super-shift
20:25 TimToady shiftall
20:25 pmichaud my view of munch was an iterator that also shifted the underlying thing it iterates
20:25 pmichaud (thus "eaterator" :-)
20:25 xabbu42 joined #perl6
20:26 pmichaud and then .map was a method on iterator, somehow, or on a list/cursor that encapsulated the munching iterator
20:27 pmichaud I do much prefer the notion of RangeCursors to RangeIters
20:27 moritz_ masak: could you please update your blog post about the challenge, noting that we have two submissions already? (see #perl6book backlog from the last 30min or so for the second)
20:27 TimToady biab &
20:28 pmichaud same here, biab
20:28 masak moritz_: oki, will do.
20:30 cxreg if gather is lazy, does that make its block a continuation?
20:31 Tene Something like that, yeah.
20:32 cxreg so a function that "returns" a gather, like pick, is implicitly lazy too?
20:32 moritz_ a coroutine actually (which is a bit weaker than a continuation, iirc)
20:32 cxreg ah
20:32 moritz_ cxreg: yes
20:32 cxreg ok cool thanks
20:33 cxreg i suspect there could be unexpected side effects if you modify the array you picked from before you fetch the data then?
20:33 cxreg or is there some COW magic?
20:33 moritz_ not sure
20:33 moritz_ (I hope there's magic somewhere :-)
20:33 TimToady sure, the whole lazy model depends on illusions of immutability
20:34 TimToady so where the two ends aren't immutable, we need to discourage interactions
20:34 masak moritz_: updated. http://use.perl.org/~masak/journal/40385
20:34 TimToady this may well be explicit in the case of feeds, which may assume that threads may not communicate via external lexicals by default
20:36 pmichaud_ joined #perl6
20:38 pmichaud_ well, feeds what was ultimately led me to the .eaterator model
20:38 pmichaud_ because a feed is something like
20:38 pmichaud_ grep(...) <== @list
20:38 moritz_ masak: thanks
20:38 pmichaud_ which gets translated into    grep(..., @list)
20:38 pmichaud_ so in the case of a longer feed, we have
20:39 pmichaud_ map({...}) <== grep(...) <== @list
20:39 pmichaud_ it ends up looking like
20:39 pmichaud_ map({...}, grep(..., @list))
20:39 pmichaud_ and we really don't want those intermediate slurpies holding data
20:40 masak Tene: not so much scary (to upgrade Web.pm to alpha) as one more thing that I'd rather see not distract us before the wrap-up of the grant. who knows, it might be super-simple to port all of the Web.pm code to alpha? :) but I rather doubt it.
20:41 Tene That's WAY more words than what I said.
20:41 moritz_ s:g/alpha/master/
20:41 pmichaud Tene: "is not."  :-)
20:41 pmichaud (okay, masak's sentence makes much more sense with moritz's substitution)
20:41 pmichaud I was wondering about "upgrade to alpha"  :)
20:42 rokoteko what is this '<==' ?
20:42 pmichaud rokoteko: see S06
20:42 mathw alternatively you could s:g/to/from/
20:42 pmichaud "Feed operators"
20:42 moritz_ rakudo: 1 <== 2
20:43 p6eval rakudo 16d9cb: OUTPUT«Sorry, feed operators not yet implemented␤  in 'infix:<<==>' at line 914:CORE.setting␤  in main program body at line 11:/tmp/gHibZAAymY␤»
20:43 pmichaud (but they _can_ be implemented once we get lists working properly :)
20:45 pmichaud TimToady: so, what do you suggest for me working on lists?  Is there likely to be a spec revision in the near future that I should wait for, or should I start writing code with the hope/expectation that it'll become spec?  ;-)
20:45 pmichaud (and I can write spec, too, as the code starts to develop)
20:45 TimToady I think it will be very close to what we discussed above
20:46 pmichaud okay
20:46 pmichaud I'll start on code then.
20:46 TimToady a question is whether the operations on cursors have the same get* names or different ones
20:46 pmichaud I'm leaning towards different
20:46 TimToady metoo
20:46 pmichaud but perhaps the answer there is to have me prototype something and see what falls out
20:46 TimToady like .parse is different from .termish
20:47 pmichaud and I'll feel okay with taking... "liberties" with the API and the understanding that it could change a bit later
20:47 pmichaud especially as far as naming of things go
20:47 TimToady go for it
20:47 masak rokoteko: essentially '<==' allows the programmer to create coroutines, pipe-like routines that execute in parallel, feeding each other data.
20:47 TimToady I think we're at least temporarily on the same wavelength
20:47 pmichaud nice to be there, definitely
20:47 masak is there a difference between '@a = foo()' and '@a <== foo()'?
20:47 pmichaud the latter is lazy
20:47 masak ok.
20:48 TimToady ==> is a form of explicit threading, which might have different defaults than implicit threading of a normal lazy list
20:48 TimToady but for now it's fine to assume they're basically the same
20:48 pmichaud except the latter is lazy :-)
20:48 Tene and what's the reason for the former to not be lazy?
20:48 pmichaud Tene: list assignment is eager by default
20:48 TimToady ==> is lazy too
20:49 pmichaud Tene: because we generally want    my @a = @b   to grab the values of @b as they exist now, and not at some lazy point in the future.
20:49 TimToady though certainly not strictly lazy
20:49 SmokeMachine joined #perl6
20:49 TimToady ==> are really event queues between threads
20:50 TimToady and the eager/lazy thing looks a lot more like "buffer full/empty" semantics
20:50 pmichaud afk for a short while, need to attend to @family stuff
20:51 * TimToady thinks a nap is about to occur.
20:56 cosimo good $evening, everyone
20:56 cosimo question 1: http://stackoverflow.com/questions/3018456/how-t​o-know-the-version-of-perl6-rakudo-i-am-running
20:57 cosimo question 2: not a question actually
20:57 cosimo masak: proto ping, http://github.com/cosimo/perl6-digest-md5
20:57 cosimo thanks, :)
20:59 masak cosimo: you are aware that you too have commit access to proto? :)
20:59 cosimo masak: no, not really
20:59 cosimo masak: do I?
20:59 masak I'm checking now.
21:00 cosimo i mean i didn't know that
21:00 masak cosimo: now you do. :)
21:00 cosimo cool
21:00 masak welcome aboard! please add your project to projects.list.
21:01 cdarroch joined #perl6
21:01 cdarroch joined #perl6
21:02 cosimo masak: and done
21:02 masak \o/
21:02 cosimo this time I used ufo technology
21:03 masak far out.
21:04 * [Coke] prints out a copy of the book for perusal.
21:06 ggoebel joined #perl6
21:10 jnthn mberends: Any idea if parameterized queries are implemented in FakeDBI?
21:11 * masak likes reading pmichaud++ and TimToady++ iterate towards a consensus
21:12 * jnthn is too lazy to read it ;-)
21:14 jnthn mberends: er, looks like the answer is yes but I'm not convinced it escapes them...
21:17 masak jnthn: by the way, Str.encode now uses ByteBuffer. I'm reading the bytebuffer.t tests to see how Buf.decode might work. it's looking very hopeful.
21:18 masak NotFound++
21:18 jnthn \o/
21:18 cosimo mberends: wow, fakedbi does that really work with mysql?
21:18 jnthn masak++, NotFound++
21:18 jnthn cosimo: It does indeed.
21:18 jnthn cosimo: It's all written in Perl 6 too.
21:22 cosimo jnthn: i'm trying it now, but 'make' complained and stopped working
21:22 jferrero joined #perl6
21:22 cosimo :-|
21:22 diakopter aside: optional strong typing is _awesome_; "one" language can have efficient benchmarks with the strong typing, but extremely golfed examples for the fans of extreme terseness
21:23 jnthn cosimo: Ah, I did it via proto.
21:23 jnthn cosimo: It has a dependency on Zavolaj, so if doing by hand you'll need to install that first.
21:25 cosimo jnthn: I had done that already
21:25 cosimo jnthn: and btw, it's missing t/* files I think
21:28 jnthn cosimo: Zavolaj? Yeah, I think it's under-tested.
21:30 cosimo jnthn: just tried 'make test' and it tried to load t/mysqlclient.t, but there's no t/
21:30 cosimo works just fine anyway
21:47 szabgabx joined #perl6
21:52 cosimo mberends: any idea about http://pastebin.org/323598 ? maybe too old rakudo/parrot?
21:54 cosimo mberends: it doesn't like "method blah (Match $m)"
21:57 patrickas joined #perl6
21:59 patrickas jnthn: ping
22:02 jnthn patrickas: pong
22:06 patrickas jnthn: private window when you have time pls :-)
22:08 tylerni7 joined #perl6
22:13 ashleydev_ left #perl6
22:14 patrickas jnthn++ thanks :-)
22:18 alester joined #perl6
22:29 tedv joined #perl6
22:36 lue OHAI
22:38 ggoebel joined #perl6
22:39 Juerd joined #perl6
22:41 whiteknight joined #perl6
22:42 lue hi?
22:43 pyrimidine joined #perl6
22:43 patrickas joined #perl6
22:48 arnsholt RFC: Might there be an extra awesome way to represent CFGs in Perl 6?
22:48 arnsholt (For a CKY/Earley parser module)
22:51 cosimo LWP::Simple works again with current rakudo \o/
22:53 patrickas colomon++
22:53 snarkyboojum joined #perl6
22:53 patrickas i meant cosimo++ :-)
22:57 mikehh joined #perl6
23:03 rv2733 joined #perl6
23:08 lue http://rdstar.wordpress.com​/2010/06/10/colouredoutput/ olol blogged
23:19 patrickas rakudo: sub f ( 'add' ) {} ; my $c = &f.signature.params[0].constraints ; say $c,$c;
23:19 p6eval rakudo c43bca: OUTPUT«add␤»
23:19 patrickas alpha: sub f ( 'add' ) {} ; my $c = &f.signature.params[0].constraints ; say $c,$c; #prints add instead of addadd
23:19 p6eval alpha 30e0ed: OUTPUT«all({ ... })all({ ... })␤»
23:19 colomon patrickas: I was wondering what I could have done... ;)
23:20 TimToady it's less slow
23:20 TimToady ww
23:23 jnthn lue: Ooh, pretty! :-)
23:23 lue [!CRAZY IDEA!]I'm considering removing the DON'T PANICs from the radix code I contributed, and then plastering it in front of all errors.
23:45 lue rakudo: say ("hello", "hi","rakudo").pick(1)
23:45 p6eval rakudo c43bca: OUTPUT«hi␤»
23:45 lue rakudo: say ("hello", "hi","rakudo").pick(1)
23:45 p6eval rakudo c43bca: OUTPUT«hello␤»
23:49 jnthn sorear: As well as the "lose the environment" issue, I fear we may lose STDIN to Perl 5 in Blizkost too.
23:49 jnthn (Didn't get conclusive proof on that yet though.)
23:51 lue nqp: say ("hello", "hi", "rakudo").pick(1)
23:51 p6eval nqp: OUTPUT«Confused at line 1, near "say (\"hell"␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)␤»
23:54 REPLeffect joined #perl6
23:55 lue how would I get something like pick() in nqp? [i've tried looking for tutorials before, but they don't seem to exist]

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

Perl 6 | Reference Documentation | Rakudo