Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-04-26

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:01 mtk left #perl6
00:05 Lorn left #perl6
00:06 risou joined #perl6
00:09 jedai_ joined #perl6
00:11 jedai left #perl6
00:27 Chillance left #perl6
00:29 yarp_ joined #perl6
00:33 alester joined #perl6
00:36 yarp_ left #perl6
00:40 kcwu joined #perl6
00:43 TimToady sorear: perhaps Mu and other "immutable" stuff can start out in PROCESS but we make mutable copies (at compile time) into GLOBAL of any interp if/when we notice MONKEY_TYPING.
00:44 TimToady alternately, the immutable copies just live in the setting, not PROCESS
00:47 starcoder is now known as elp
00:47 elp is now known as starcoder
00:50 yarp_ joined #perl6
00:57 jferrero left #perl6
00:58 TiMBuS joined #perl6
00:59 yarp_ left #perl6
01:01 sorear TimToady: how many copies of the setting exist per PROCESS?
01:06 obra joined #perl6
01:07 TimToady to the extent that the setting is immutable, it doesn't matter
01:08 TimToady and possibly monkey patching relocates to UNIT, not GLOBAL
01:08 TimToady hmm, except that doesn't do the monkey patching, nevermind :)
01:12 obra left #perl6
01:21 cdarroch left #perl6
01:35 ggoebel__ left #perl6
01:35 uvtc joined #perl6
01:36 uvtc From S01, what does "Everyone wants the colon" mean?
01:40 ggoebel__ joined #perl6
01:42 uvtc Ah. Should've searched more first. Found the rest of the expression in a transcript of an older talk: "Everyone wants the colon for their particular syntax".
01:44 uvtc left #perl6
01:50 jql joined #perl6
01:50 whiteknight left #perl6
01:53 woosley joined #perl6
02:02 Moukeddar joined #perl6
02:31 isBEKaml left #perl6
02:34 Moukeddar left #perl6
02:37 dukeleto tadzik++ # getting your gsoc proposal accepted
02:50 bluescreen10 left #perl6
02:59 coldhead joined #perl6
03:36 TiMBuS im wondering what uvtc was interpreting that as..
03:37 TiMBuS probably not a good idea to name anatomy after character symbols
03:37 TiMBuS i got a caret stuck in my colon
03:38 TiMBuS
03:39 sorear syntactic sugar causes cancer of the semi-colon --Perlis(?); the pun has not been lost on others
03:39 TiMBuS hehe
03:41 TiMBuS why was i here again? oh. does anyone know if i need to add my module to perl6/ecosystem again? or does someone else do that now or is there some automated way of doing it
03:47 Helios` left #perl6
03:48 Helios` joined #perl6
03:48 hudnix left #perl6
03:54 Transformer joined #perl6
03:54 Transformer left #perl6
04:03 HarryS left #perl6
04:05 a2n joined #perl6
04:05 a2n left #perl6
04:16 _twitch joined #perl6
04:17 drbean left #perl6
04:17 orafu left #perl6
04:18 orafu joined #perl6
04:19 drbean joined #perl6
04:30 _twitch left #perl6
04:33 [particle]1 joined #perl6
04:36 [particle] left #perl6
04:39 ymasory left #perl6
04:40 plobsing_ left #perl6
04:42 jfried left #perl6
04:43 kaare_ joined #perl6
05:10 dukeleto left #perl6
05:13 Mowah joined #perl6
05:16 SHODAN joined #perl6
05:38 bacek left #perl6
05:43 dju_ joined #perl6
05:43 alester left #perl6
05:46 dju left #perl6
05:50 SHODAN left #perl6
05:56 wtw joined #perl6
06:13 moritz TiMBuS: you need to add it to https://github.com/perl6/ecosystem/blob/master/META.list
06:13 TiMBuS moritz, thanks
06:13 TiMBuS ill do that
06:19 coldhead left #perl6
06:26 moritz jnthn++ # blog post
06:26 moritz jnthn++ # awesome nqp work
06:32 dalek ecosystem: 53bb38d | Jarrod++ | META.list:
06:32 dalek ecosystem: Added Net::IRC to META.list
06:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/53bb38d7c9
06:32 justatheory left #perl6
06:33 TiMBuS who th heck is jarrod :v
06:36 donri joined #perl6
06:42 birdwindupbird joined #perl6
06:43 birdwindupbird left #perl6
07:04 mj41 joined #perl6
07:21 mathw o/
07:21 tadzik o/
07:21 donri o\
07:22 donri TMTWTDI
07:22 tadzik TiMBuS: we've been secretly calling you Jarrod when you weren't looking
07:23 donri Anything interesting happening in Parrot/Rakudoland lately?
07:25 mathw jnthn blogged about some interesting things in NQP
07:25 Su-Shee joined #perl6
07:25 Su-Shee good morning everyone.
07:25 tadzik donri: I got into GSoC :)
07:25 tadzik Su-Shee: hello!
07:25 donri \o/ What's the project?
07:25 mathw tadzik: grats!
07:26 mathw hi Su-Shee
07:26 tadzik donri: Pod Parser for Rakudo
07:26 donri Pod6?
07:26 tadzik http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/tadzik/1
07:26 tadzik yep, Pod6
07:26 donri Nice
07:26 domidumont joined #perl6
07:27 donri Now if we could get that .WHY thing working and get some nice API docs eh?
07:27 donri Where, as always, by 'we' I mean 'other people' or 'not me'.
07:29 tadzik donri: the biggest work will be to poddocument Rakudo itself :)
07:29 donri yea
07:29 tadzik social-life &
07:30 donri OTOH it doesn't require deep technical knowledge about parrot or rakudo
07:30 * donri might include himself in 'we' afterall?
07:34 donri introspectable 'docstrings' are a nice feature of python and i understand .WHY is effectively the same thing
07:35 miso2217 left #perl6
07:39 miso2217 joined #perl6
07:45 birdwindupbird joined #perl6
07:48 fhelmberger joined #perl6
07:51 jnthn morning, #perl6
07:51 moritz \o
07:51 mathw o/ jnthn
07:51 mathw exciting blog post
07:53 jnthn Yes, I made one at last. :)
07:53 * jnthn looks forward to getting all the good stuffs into Rakudo.
07:54 donri is it about 6model?
07:55 moritz more or less
07:56 mathw It's exciting
07:56 mathw It makes me want to write compilers
07:56 mathw But I'd need another couple of days per week
07:56 donri linky?
07:56 mathw Can anybody arrange that?
07:56 moritz planetsix.perl.org
07:56 donri i should be subscribed to that, hm
07:56 moritz you should indeed
07:57 moritz it has a surprisingly high signal/noise ratio for an aggregator
07:57 donri ah there we go
07:57 donri wasn't updated
08:00 Mowah left #perl6
08:01 mathw Argh, programmers!
08:01 mathw Other programmers, that is, not you lovely people :)
08:06 Mowah joined #perl6
08:07 nymacro joined #perl6
08:15 JimmyZ joined #perl6
08:21 pmurias joined #perl6
08:27 donri I'm lovely. *me gusta*
08:28 mathw yup you're lovely :)
08:28 moritz hugme: hug mathw
08:28 * hugme hugs mathw
08:28 moritz hugme: hug donri
08:28 * hugme hugs donri
08:29 * mathw hugs moritz
08:30 mathw It's really weird here today
08:30 mathw Virtually nobody is actually in the office
08:30 * moritz is alone here too
08:31 mathw We just had a four-day weekend due to easter, and now we're about to have another one due to a royal wedding and the may day bank holiday
08:31 moritz yesterday I had some fun working on my private db project
08:31 mathw so lots of people wanted to have three days off and get a ridiculous amount of time to laze about at home and drink beer
08:32 moritz imported some data from a ~5MB dump, lots of cleanups, wiki scraping to complete the information... all in all a single run takes about an hour
08:32 moritz s/5/50/
08:32 moritz then dumped the db, gzip'ed it... and only 1MB was left :-)
08:32 mathw nice
08:33 moritz it felt very unimpressive :-)
08:39 Axius joined #perl6
08:39 mathw well that kind of thing has a habit of compressing well
08:40 skangas left #perl6
08:41 moritz <rant>the original database is a bit weird... a db with foreign keys that are not enforced by the DB engine
08:42 moritz and with no unique contraints except for primary keys
08:42 moritz so they have a many-to-many table for mapping authors and books
08:42 moritz and some books have the same author twice
08:42 * moritz shakes head
08:42 moritz </rant>
08:43 mathw oh I used to do things like that a lot
08:43 mathw when MySQL didn't support such things
08:43 moritz thing is, it supports it now, but not in the default engine
08:43 mathw yeah
08:43 mathw been ages since I wrote a database app
08:43 mathw can't say I miss it
08:43 moritz so you have to actively chose a different engine to enfcorce referential integrity
08:44 moritz that's like having to say 'use strict;' at the start of every program to get sanity
08:44 mathw Worse
08:45 mathw it's very easy to get people to 'use strict'
08:45 mathw and it's very easy to change to it if you started off without it
08:45 mathw you just get them to write in Perl 6 :P
08:46 domidumont left #perl6
08:46 mathw Unfortunately I'm the only person on my team in the office today and someone just sent me a production bug report
08:46 donri http://www.reddit.com/r/programming/comments/gxn4s/building_a_compiler_with_parrot_pdf_slides/  totally karmastealing from jnthn
08:46 SHODAN joined #perl6
08:46 mathw Even more unfortunately, it actually looks like somebody's been randomly unplugging network cables, so I just have to convince them of that now... shouldn't take more than a month or two
08:47 moritz donri: should the comma after "intriguing" really be there?
08:47 moritz donri: my grammar knowledge sucks, but it feels wrong :-)
08:47 donri moritz: edited
08:48 moritz seems the comments page is cached - the comma is still there on the link you posted, but is gone when I go to the permalink of the comment
08:51 donri toying with your own language, i think, is a fantasy of many programmers, so i think those slides can gain interest
08:52 donri regardless of existing interest in parrot or perl 6
09:03 domidumont joined #perl6
09:04 SHODAN hm
09:07 moritz http://www.reddit.com/r/programming/new/ why don't I see donri's submission there?
09:19 mux this is most likely a very stupid question, but if I'm computing a checksum on hexadecimal data of the form "A000F342...", using Digest.pm, is it ok to split(/(..)/) the data to get individual bytes and then call $ctx->add(chr(hex($byte)) for each one?
09:20 skangas joined #perl6
09:20 mux I don't get the expected results so I assume I confused myself somehow and am doing something stupid
09:20 moritz mux: that' doesn't really look like Perl 6 code
09:21 mux guilty, that's perl5 code
09:21 moritz might work that way. Might want unpack 'H'
09:22 JimmyZ left #perl6
09:22 justatheory joined #perl6
09:22 mux mmm, I'll check if I get the same results with unpack(), thanks
09:23 mux I wasn't sure whether I actually need to call chr() or not, it's not clear to me what format the add() method expects data to passed in
09:25 Tedd1 joined #perl6
09:26 moritz we can't know that either, since you didn't tell us where $ctx comes from :-)
09:26 mux from Digest.pm, I mentioned that
09:27 mux $ctx being as usual a Digest object, to be perfectly precise, it's the result of Digest->new('SHA-1');
09:27 pmurias mux: nopaste the code
09:27 moritz "The string value of the $data provided as argument is appended to the message we calculate the digest for.
09:27 mux sure thing, just a second
09:27 moritz "
09:27 moritz seems pretty clear to me (from perldoc Digest)
09:27 mux moritz: yeah, that 'string value' thing strikes me as vague, but that may be just me
09:28 moritz mux: before the chr() you don't have a string value, but a byte number
09:29 mux http://pastebin.com/Ka6k1TjL here's the code
09:29 moritz oh
09:29 Axius left #perl6
09:29 mux moritz: I've always been unclear as to what is a number in Perl, and it seems the very notion is vague/weird/surprising in the language (is "1234" a number? sometimes it is)
09:30 moritz split /(..)/ will return empty strings inbetween
09:30 mux I'm entirely ready to blame that on my ignorance :-P
09:30 mathw it is if it's treated as a number
09:30 mux moritz: oh shi-
09:30 moritz so you get lots of 0s
09:30 * mux slaps self hard
09:30 mux let's try this again - thanks
09:30 moritz mux: it's simple: if you use it as a number, it's a number. If you use it as a string, it's a string
09:30 moritz "1234" + 5 -> used as a number
09:30 moritz print "1234"  -> used as a string
09:31 mux moritz: I don't find this simple; you cannot easily know how a function is going to "use" your number if the docs aren't clear about it
09:31 mux it's confusion-prone is what I mean
09:31 mux anyways, brb
09:31 moritz that's why I find "string value" so very not-confusing.
09:31 moritz it tells you exactly that the valuei s used as a string
09:32 mux in that case yeah, I have to admit, but since I wasn't getting correct results, I started being suspicious
09:33 Exodist left #perl6
09:33 mux yay, good result! thanks again moritz
09:34 justatheory left #perl6
09:37 donri moritz: did i get stuck in the nasty spam filter?
09:38 moritz donri: no idea
09:48 domidumont left #perl6
10:04 domidumont joined #perl6
10:06 woosley left #perl6
10:34 xinming left #perl6
10:47 yarp_ joined #perl6
10:53 ggoebel__ left #perl6
10:54 xinming joined #perl6
10:55 awwaiid left #perl6
10:59 ggoebel__ joined #perl6
11:01 woosley joined #perl6
11:04 herzen left #perl6
11:24 mtk joined #perl6
11:28 pernatiy left #perl6
11:33 rhebus joined #perl6
11:34 rhebus hello
11:34 colomon \o
11:34 rhebus i'm looking at make spectest_smolder for rakudo and i get dubious results locally which don't show up in the uploaded version
11:34 rhebus http://smolder.parrot.org/app/projects/report_details/15546 <-- my report
11:35 rhebus http://smolder.parrot.org/app/projects/tap_stream/15546/454 <-- dubious result (no plan at the top, strange error message)
11:36 rhebus and looking at the test, it seems like it died before finishing
11:36 colomon ICU is an optional library, which it looks like you do not have.
11:38 rhebus ok
11:38 colomon looks like indent.t is newish (or at least has a lot of new tests) and isn't properly marked as needing ICU.
11:38 rhebus I'd like to improve the error message and fix the output here
11:39 rhebus and perhaps add a plan to indent.t
11:40 colomon Improving the error message is probably a pain, alas.  At least, I'm guessing it's coming from Parrot.
11:40 colomon How about you add a plan to indent.t, and I'll get it flagged as needing ICU?
11:40 rhebus i'll look into it
11:40 rhebus sure thing
11:41 colomon did any other files have similar problems?
11:42 rhebus no other file reported "Dubious, test returned 1"
11:42 colomon rhebus++
11:42 rhebus it worries me that this info isn't captured in the online smolder page
11:43 rhebus but I'll start with the test plan, since that's something i can do
11:43 colomon hmmm.... I wonder if the problem is that it doesn't capture that sort of info, or if the problem is that everyone else has ICU?
11:43 colomon what's the URL of the smolder page?
11:44 colomon oh, smolder.parrot.org
11:44 rhebus pasted above already
11:44 rhebus also, there's an escaping issue in the TAP output
11:45 rhebus http://pastebin.com/eFbwRDyT <-- mine vs smolder --> http://smolder.parrot.org/app/projects/tap_stream/15546/454
11:45 rhebus its losing the <anon>s
11:46 rhebus or rather, it's serving it as html in <pre> tags rather than just as text/plain
11:46 dalek rakudo: 8533c3c | colomon++ | t/spectest.data:
11:46 dalek rakudo: Flag S32-str/indent.t as needing ICU.
11:46 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/8533c3c8f3
11:46 Sarten-X left #perl6
11:47 moritz rhebus++ colomon++
11:48 colomon rhebus: just so I'm clear -- that 15546/454 is the indent.t error in the smolder results, and smolder is completely missing it, yes?
11:48 rhebus that 15546/454 is the TAP output of indent.t from my smolder test, and smolder is presenting it as HTML rather than plain text (do view source and you see <anon> "tags")
11:50 colomon rhebus: gotcha
11:50 colomon moritz: who's in charge of smolder?
11:50 flussence dukeleto, iirc
11:51 * moritz asked in parrot, but the parrots seem to be sleepign
11:52 Patterner left #perl6
11:53 colomon moritz++
11:53 colomon btw, moritz, whatever happened to your underscore?  ;)
11:53 rhebus bbiab lunch
11:54 moritz colomon: the previous registration of nick 'moritz' expired, so I acquired it
11:57 Psyche^ joined #perl6
11:57 Psyche^ is now known as Patterner
11:58 Sarten-X joined #perl6
11:58 awwaiid joined #perl6
12:04 Moukeddar joined #perl6
12:05 Moukeddar left #perl6
12:05 Moukeddar joined #perl6
12:08 yegor joined #perl6
12:10 takadonet morning all
12:10 Moukeddar good morning Sir
12:12 icwiener joined #perl6
12:16 bluescreen10 joined #perl6
12:20 hudnix joined #perl6
12:25 colomon huh
12:26 pernatiy joined #perl6
12:27 colomon rakudo: class A { has $.a, $.b; }; A.new(a => 1, b => 10);
12:27 p6eval rakudo 8533c3: OUTPUT«Null PMC access in find_method('b')␤  in main program body at line 2:/tmp/omKsZib4Dk␤»
12:27 colomon known?
12:27 moritz rakudo: class A { has ($.a, $.b); }; A.new(a => 1, b => 10);
12:27 p6eval rakudo 8533c3:  ( no output )
12:28 moritz colomon: it tries to call self.b at compile time, because the 'has' scope doesn't extend to second thing
12:28 risou_ joined #perl6
12:28 moritz btw http://search.cpan.org/~wonko/Smolder-1.51/
12:28 moritz std: class A { has $.a, $.b }
12:28 p6eval std 3468e14: OUTPUT«ok 00:01 121m␤»
12:28 colomon ooooooo
12:29 moritz std: my $x, $y
12:29 p6eval std 3468e14: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $y is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/n6hLzKwChs line 1:␤------> [32mmy $x, $y[33m⏏[31m<EOL>[0m␤Check failed␤FAILED 00:01 121m␤»
12:29 colomon moritz: even if my code is wrong, it still shouldn't be Null PMC....
12:29 moritz the error is LTA, yes
12:31 risou left #perl6
12:33 colomon reported
12:33 moritz rakudo: class A { self.b }
12:33 p6eval rakudo 8533c3: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/9ZnwDJfSgF:22)␤»
12:33 moritz rakudo: class A { $.b }
12:34 p6eval rakudo 8533c3: OUTPUT«Null PMC access in find_method('b')␤  in main program body at line 2:/tmp/xVZ8XV4BDS␤»
12:34 pmichaud good morning, #perl6
12:34 colomon o/
12:34 moritz good am, pm
12:37 takadonet pmichaud: morning sir
12:47 woosley left #perl6
12:48 woosley joined #perl6
12:50 kaare_ left #perl6
12:57 LoRe left #perl6
12:59 LoRe joined #perl6
13:03 ggoebel__ left #perl6
13:03 yegor_ joined #perl6
13:05 pyrimidine joined #perl6
13:06 yegor left #perl6
13:06 sftp joined #perl6
13:08 ggoebel__ joined #perl6
13:09 miso2217 left #perl6
13:09 leprevost joined #perl6
13:10 am0c left #perl6
13:12 Layla_91 joined #perl6
13:19 Layla_91 hola hola!
13:19 Moukeddar hello hello
13:20 colomon o/
13:20 colomon o/
13:23 larsen left #perl6
13:23 pmichaud o/
13:23 domidumont left #perl6
13:23 larsen_ joined #perl6
13:23 Moukeddar Layla_91, arabic name :)
13:23 JodaZ left #perl6
13:23 Layla_91 how are you all doing? working hard for p6? :D am just passing by ^_^
13:24 bbkr_ left #perl6
13:24 bbkr_ joined #perl6
13:24 miso2217 joined #perl6
13:24 JodaZ joined #perl6
13:25 kaare__ joined #perl6
13:25 Layla_91 Moukeddar: that is correct
13:26 pernatiy left #perl6
13:26 Moukeddar pretty good name
13:26 pernatiy joined #perl6
13:27 Moukeddar Qays & Layla :) the arabic love story
13:27 Layla_91 Moukeddar: well i do not really know arabic but will look for a translation :)
13:29 risou joined #perl6
13:31 colomon One of my good friends in college was named Qais.  :)
13:31 risou_ left #perl6
13:32 Moukeddar really ?
13:32 Moukeddar it's a beautiful name
13:32 colomon really.  :)
13:33 Moukeddar Qais means : Strong , Arrogant
13:33 Moukeddar :p
13:33 colomon heh, we'd have given him a good bit of ribbing if we'd known that.
13:34 Moukeddar should ask about it earlier :)
13:34 domidumont joined #perl6
13:34 yarp_ left #perl6
13:34 birdwindupbird left #perl6
13:37 Moukeddar Layla_91, where you from ?
13:41 Layla_91 Moukeddar: am Russian
13:41 Moukeddar Oh , nice :)
13:43 Layla_91 Moukeddar: yeah, and you?
13:44 Moukeddar Morocco
13:45 Layla_91 Moukeddar: oh that is were we originally are from :D
13:45 Layla_91 should visit it someday..
13:45 Moukeddar sweet :)
13:45 Moukeddar you're welcome
13:45 Moukeddar how's Russia?
13:46 Layla_91 great :D
13:46 Layla_91 left #perl6
13:47 [particle]1 left #perl6
13:52 PacoLinux joined #perl6
13:56 ymasory joined #perl6
13:56 [particle] joined #perl6
14:03 yegor__ joined #perl6
14:04 Axius joined #perl6
14:06 yegor_ left #perl6
14:10 mtk left #perl6
14:10 mtk joined #perl6
14:13 alester joined #perl6
14:15 fhelmberger left #perl6
14:15 fhelmberger joined #perl6
14:16 Axius left #perl6
14:23 Axius joined #perl6
14:25 Lorn joined #perl6
14:29 Exodist joined #perl6
14:30 SHODAN left #perl6
14:42 birdwindupbird joined #perl6
14:43 birdwindupbird left #perl6
14:51 justatheory joined #perl6
14:54 birdwindupbird joined #perl6
14:55 leprevost left #perl6
14:56 leprevost joined #perl6
14:57 pmurias left #perl6
15:01 Rotwang joined #perl6
15:03 MayDaniel joined #perl6
15:03 hercynium joined #perl6
15:03 yegor_ joined #perl6
15:04 leprevost left #perl6
15:06 yegor__ left #perl6
15:11 * jnthn back from $meeting
15:11 sjn welcome back! ^^
15:12 sjn oh, that reminds me...
15:12 * sjn prods jnthn and masak about you-know-what
15:12 [particle]1 joined #perl6
15:13 [particle] left #perl6
15:13 moritz don't talk about You Know Who, he might track and kill you!
15:13 * TimToady wakes up
15:13 jnthn sjn: Sent a mail to the you-know-where asking for the you-know-what to be put live last night.
15:14 sjn ah, cool :)
15:17 * sjn found the mail
15:18 Moukeddar left #perl6
15:20 [particle]1 is now known as [particle]
15:20 jnthn beer shop &
15:21 jnthn .oO( it closes way too öl-y... )
15:22 Axius left #perl6
15:30 MayDaniel left #perl6
15:32 plobsing joined #perl6
15:43 dukeleto joined #perl6
15:55 newbee joined #perl6
15:56 bbkr_ tadzik: another weird bug happened when bootstrapping Pies - http://bbkr.org/pies_bootstrap.png , any ideas?
15:56 bbkr_ on "TAP::Harness v3.12 and Perl v5.10.0"
15:57 dukeleto left #perl6
15:58 dukeleto joined #perl6
16:03 TimToady colomon: you have an X/Y problem; instead of insisting on using the Pair type you can just use [$u,$v] which unpacks in sigs just like in Haskell
16:04 yegor_ left #perl6
16:04 TimToady (though you raise the issue of whether a Pair should have an easy way to unpack as a subsig)
16:04 colomon what's the syntax for array unpacking in sigs?
16:04 yegor joined #perl6
16:04 TimToady [$u,$y]
16:04 TimToady er, [$u,$v]
16:05 pmichaud sub foo([$u, $v]) { ... }
16:05 TimToady -> [$u,$v], $y { $y == floor(($u + 1) * $v * $n); },
16:05 TimToady and such
16:05 colomon TimToady++
16:05 colomon that's much easier than I thought
16:06 TimToady but an argument can be made for allowing a pair to bind to something like that too
16:06 TimToady biab &
16:10 jnthn rakudo: my @foo := :a(1), :b(2); for @foo -> ($key, $value) { say "$key = $value" }
16:10 p6eval rakudo 8533c3: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤  in <anon> at line 2:/tmp/uyeUkPVRRt␤  in main program body at line 1␤»
16:11 jnthn rakudo: my @foo := :a(1), :b(2); for @foo -> (:$key, :$value) { say "$key = $value" }
16:11 p6eval rakudo 8533c3: OUTPUT«Mu() = Mu()␤Mu() = Mu()␤»
16:11 jnthn hm
16:11 jnthn rakudo: say Pair.^attributes(:local)>>.name
16:11 p6eval rakudo 8533c3: OUTPUT«␤»
16:11 jnthn Oh.
16:12 jnthn Fix that and both of the above will work :)
16:18 mj41 left #perl6
16:18 woosley left #perl6
16:19 alester left #perl6
16:25 colomon left #perl6
16:31 TimToady but only works for specific argument names, which makes it hard to give short names to the kv
16:32 TimToady not sure if [$k,$v] can be made to work though
16:32 TimToady possibly we could allow [$k => $v]
16:33 jnthn Well, if Pair.Capture produces something with k and v in it... :)
16:33 jnthn But that'd be a hack... ;)
16:33 pernatiy left #perl6
16:33 jnthn We could say that .Capture on Pair actually populates the list part, not the hash part.
16:33 jnthn Then they'd bind to positional args with whatever name.
16:34 TimToady not sure whether that undoes something nice on the other side
16:34 TimToady the underlying problem seems to be not distinguishing the Pair type from a Name type
16:34 TimToady *Named
16:35 jnthn std: sub foo($k => $v) { }
16:35 p6eval std 3468e14: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix > instead at /tmp/fjNnztsYoU line 1:␤------> [32msub foo($k =[33m⏏[31m> $v) { }[0m␤Parse failed␤FAILED 00:01 122m␤»
16:35 jnthn Well, that doesn't mean anything yet. :)
16:36 jnthn It kinda breaks the unpack symmetry though
16:36 jnthn (e.g. of having some explicit bracketing thinguymmy)
16:37 jnthn std: my @x; for @x -> $k => $v { }
16:37 p6eval std 3468e14: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix > instead at /tmp/MczBBpWxLm line 1:␤------> [32mmy @x; for @x -> $k =[33m⏏[31m> $v { }[0m␤Parse failed␤FAILED 00:01 123m␤»
16:37 jnthn Phew. :)
16:37 jnthn nqp: class Foo is LolWut { }
16:37 p6eval nqp: OUTPUT«Can only use get_how on a RakudoObject␤current instr.: 'nqp;NQPClassHOW;compute_c3_mro' pc 1498 (gen/nqp-how.pir:430)␤»
16:37 jnthn meh, not updating...
16:43 ranguard joined #perl6
16:52 ranguard left #perl6
16:55 yegor left #perl6
16:55 birdwindupbird left #perl6
16:57 bacek joined #perl6
16:59 bacek left #perl6
17:05 colomon joined #perl6
17:07 bacek joined #perl6
17:10 cdarroch joined #perl6
17:10 cdarroch left #perl6
17:10 cdarroch joined #perl6
17:11 colomon TimToady++ # the function works beautifully using [$u, $v] instead of Pair.  blog post will be updated soon.
17:15 yegor joined #perl6
17:17 Moukeddar joined #perl6
17:20 molaf__ left #perl6
17:21 bluescreen10 left #perl6
17:31 fhelmberger left #perl6
17:35 bluescreen10 joined #perl6
17:38 Chillance joined #perl6
17:40 icwiener left #perl6
17:43 dalek ecosystem: d4e2880 | dukeleto++ | spec.pod:
17:43 dalek ecosystem: Fixify the spec POD
17:43 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d4e2880d4b
17:44 Moukeddar left #perl6
17:47 mj41 joined #perl6
17:47 szr left #perl6
17:51 Axius joined #perl6
17:53 Vlavv_ left #perl6
17:55 masak joined #perl6
17:55 masak evenin', zebras.
17:56 moritz \o
17:56 * pmichaud changes his stripes.
17:56 colomon o/
18:00 impious joined #perl6
18:02 masak #phasers in 60?
18:06 _ilbot joined #perl6
18:06 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
18:06 moritz you mean like an iterator that offers a .previous method, or something?
18:06 masak no, I mean this:
18:07 Util masak: Lagging variables? Do you mean like $value_from_the_last_loop_iteration?
18:07 masak Util: yes.
18:07 masak which means things always happen on the iteration after.
18:07 masak and after the last iteration.
18:08 masak and sometimes there are nested lagging variables, which would have been written as nested loops, were it not for the fact that they're lagging.
18:08 masak it's basically what appears to be an ordinary set of loops, but slightly skewed and thus rendered tricky. I'm wondering whether a library might be able to skew it back :)
18:09 Moukeddar joined #perl6
18:09 masak Moukeddar: hey there :)
18:09 Moukeddar hello
18:10 Moukeddar i lost the Colon
18:10 Moukeddar :(
18:10 masak ^ there it is
18:10 Moukeddar is my ip v6 ?
18:10 Rotwang n0
18:10 masak nope. you're among the rest of us today.
18:11 Moukeddar heh
18:11 Moukeddar weird
18:11 masak but you can have Perl v6 ;)
18:11 TimToady state $x will leave { .= newvalue() } # or some such...
18:11 Moukeddar it is
18:11 Util For any list, you can use .kv instead of just the value. But then how to refer to a list element when the list is not an array?
18:11 Moukeddar i'm waiting for a friend to get me a book on Perl
18:12 masak TimToady: it's not the assignment that contains the complexity. it's the triggering of updates whenever newvalue() differs from oldvalue() (and with nesting between levels of these)
18:12 masak I'll draw up a mock example so y'all'll see.
18:12 TimToady ah, the when to print a subtotal problem--how RPGIIish
18:13 Moukeddar left #perl6
18:13 masak TimToady: oh, I had a feeling this was a known problem :P
18:13 masak got any literature on it?
18:13 TimToady I wrote one of those in BASIC/PLUS lo these many years ago
18:13 s1n joined #perl6
18:13 colomon masak: List::Utils sliding-window is designed exactly to handle the lagging variable issue.  Probably not the most graceful solution possible, though...
18:14 Util Moukeddar: chromatic's new book, Modern Perl, is available as a free PDF download, or printed on paper: http://onyxneon.com/books/modern_perl/
18:14 masak in my case, it's not subtotals, it's Moose instantiations and setter calls on these. but yeah.
18:14 masak colomon: oh, I'll check it out with that in mind. thanks.
18:14 TimToady it's the 1st derivative, basically :)
18:14 Axius left #perl6
18:14 * BinGOs is reading Modern Perl on his Kindle.
18:14 moritz for @a Z @a[1..*-1] -> $a, $b { say $a, $b }
18:15 masak TimToady: whoa. yes. it is.
18:15 Util TimToady: The lagging var is my 2nd favorite example when explaining that RPG does not *completely* suck (just *almost* completely)
18:15 TimToady I am occasionally the smartest person you'll ever meet.  :)
18:15 masak moritz: right, that's your "sliding window" solution :)
18:15 TimToady but most of the time not...
18:15 * masak hugs TimToady
18:17 masak I want to think bigger. can't I just, like, add a custom library-provided keyword 'lagging' before my 'for' loop, and just have a source filter^W^W grammar-modding module take care of all the complexity for me?
18:17 masak though that would preclude a solution that worked with -p and -n...
18:17 colomon masak: seems like doing    for lagging @a -> $a, $b { say $a, $b }
18:18 colomon would be trivial.
18:18 pmichaud RPGII -- that was my first college course :)
18:18 masak colomon: yes, but still hides only the variables part of the complexity, which is the small part.
18:18 Util pmichaud: ouch!
18:18 pmichaud maybe a function?
18:18 masak fancy, a whole programming language for role-playing games.
18:18 pmichaud lag $a, $b
18:19 colomon masak: btw, that article on abstraction you tweeted was Very Nice.
18:19 masak colomon: I like it too, but... I don't grok it :/
18:19 * jnthn back from noms :)
18:19 jnthn o/ pmichaud
18:19 Util masak: Report Program Generator
18:19 colomon woah, full house!
18:20 masak Util: yes, I googled it before I made the n00b joke :P
18:20 Util Doh!
18:20 pmichaud RPG is a fill-in-the-blank language :)
18:20 masak here's the article that colomon liked: http://lukepalmer.wordpress.com/2010/11/23/encapsulation-considered-harmful/
18:21 masak historical note: luqui used to be a regular here. his name is still in some synopses.
18:21 colomon and luqui is Luke Palmer?
18:22 masak yes.
18:22 masak ah; he's @luqui on Twitter, and he used to be luqui here ;)
18:22 HarryS joined #perl6
18:24 colomon masak: what don't you grok about it?
18:25 * pmichaud updates ohloh projects
18:25 bluescreen10 left #perl6
18:27 masak colomon: it's like, I see that what he's saying makes sense, up to and including the duality between abstraction and encapsulation. it's a cool way to view it.
18:27 masak colomon: but what I *don't* see is how I would turn any class that I've ever written inside out they way he mentions.
18:27 colomon ah.
18:28 masak I'd like to understand it. but right now I don't.
18:28 masak the example with List doesn't illuminate much.
18:28 colomon agreed, it's a weak example.
18:29 colomon not least because he didn't point out how horribly inefficient his example was.  indexing into a List?  shudder...
18:29 Su-Shee hm, I wonder if I can slip in the diagrams in this article as "OF COURSE IT'S UML!1!" into the next code review.. ;)
18:30 moritz this is all verify artifical
18:30 moritz using a function instead of an operator
18:30 colomon masak: I didn't see it as a system for turning classes inside out, but rather an importantly different view on the importance of abstraction.
18:30 moritz just because you can't overload that operator in C
18:31 moritz the "correct" abstraction is for List to offer a reduce()
18:31 colomon heh, I was just going to argue that the "correct" abstraction is for List to offer an iterator.  :)
18:31 masak moritz: and luqui is one of those guys who probably knows that
18:31 masak s/knows/know/
18:33 molaf joined #perl6
18:34 Lorn left #perl6
18:35 colomon fundamentally, I'd argue the article is just "relearning" the insight behind C++'s Standard Template Library.
18:35 masak so did a commenter.
18:37 colomon it's an obvious insight.  :)
18:37 colomon (at least if you know STL.)
18:37 colomon sorry, I mean, the comparison between this article and STL is an obvious insight.
18:38 colomon I still think it's very worthwhile reminding the world of the power of abstraction, though.
18:38 bluescreen10 joined #perl6
18:45 bacek left #perl6
18:47 nymacro left #perl6
18:51 risou left #perl6
18:55 araujo left #perl6
18:57 Util What is the planned release date for next Rakudo Star?
18:58 pmichaud today
18:58 pmichaud (I'm planning to put it together later tonight... may not actually release until tomorrow sometime)
18:59 Util Thanks!
18:59 Util pmichaud++
19:00 jnthn pmichaud wins the bet on when my 6model work will land (e.g. not April) :P
19:01 pmichaud I wonder how much of that is due to my own inactivity, though.  :-P
19:01 pmichaud I don't mind preparing an interim Star release if it's done before the next scheduled release
19:01 jnthn pmichaud: Part of it is because I distracted myself doing the packages refactor that I was trying to run away from. :)
19:01 pmichaud needed to be done, though
19:01 jnthn pmichaud: You...er...may not recognize NQP any more. But I hope mostly in a /good/ way. :)
19:02 pmichaud it's okay, I somewhat expect to not recognize it
19:02 pmichaud I just fixed up the nqp and nqp-rx projects on ohloh:   http://ohloh.net/p/nqp  and http://ohloh.net/p/nqp-rx
19:02 colomon jnthn++
19:04 masak TimToady, pmichaud, colomon, moritz: here's my example: https://gist.github.com/942868
19:04 pmichaud seems like it should be doable with 'when'
19:04 yegor__ joined #perl6
19:05 pmichaud when changed $shop { ... }
19:05 masak I pondered whether to use 'when'.
19:05 pmichaud changed() could be a function that monitors state or something like that
19:05 pmichaud when changed $shop | $person { ... }
19:05 pmichaud when changed $person { ... }
19:06 masak hm, I don't seem to have captured the outer-inner relationship between $person and $shop in my fantasy code...
19:06 pmichaud tis okay; I know what you're aiming for.  Standard control-break sort of stuff.
19:07 masak I'm aiming for less cruft.
19:07 pmichaud right
19:07 [Coke] left #perl6
19:07 masak there's no actual loop control in the example.
19:07 pmichaud "elegant control breaks"
19:07 masak just a lot of change management.
19:07 yegor_ left #perl6
19:08 masak and this isn't a piece of code that would be helped by something like 'next LABEL' or 'last LABEL'.
19:08 masak for once.
19:09 [Coke] joined #perl6
19:10 colomon masak: I just get an angry unicorn when I try to look at your example.  :(
19:10 masak pmichaud: even as a function 'changed' would have to be deeply magical in order to conjure up the hidden $last-seen-* variables, and all the surrounding conditionals.
19:10 masak colomon: works here :/
19:10 pmichaud yes, it would be magic.  but I think you're looking for magic.
19:11 masak I am.
19:11 pmichaud or, perhaps we want containers to have triggers
19:11 masak I guess what I mean is that it would be more disingenous to hide magic in a function than in a keyword.
19:11 pmichaud why?
19:11 masak just a subjective feeling.
19:12 pmichaud many of our keywords are just syntactic sugar for functional magic anyway
19:12 masak I guess 'lagging' and 'notice' feel more like control structures (like 'if' and 'while') to me.
19:12 masak yes, but there's a difference between a keyword being syntactic sugar for a (non-magic) function, and a function being syntactic sugar for a set of magic transformations.
19:13 pmichaud yeah, I can see that
19:13 pmichaud fwiw, it might be helped by 'redo'
19:14 masak hm.
19:14 pmichaud not completely, but 'redo' might be a part of it
19:14 pmichaud since it gives you the ability to re-enter the block from the top without iterating
19:14 masak you keep suggesting alterations of control flow :)
19:14 masak the original code doesn't contain any such.
19:14 birdwindupbird joined #perl6
19:15 pmichaud well, other than 'if'
19:15 masak right.
19:15 pmichaud I could also see:   if changed $person { ... }
19:15 masak hm.
19:16 masak it does read quite well... :)
19:16 pmichaud but the whole notion of "control-break" to me implies exceptions, which implies control flow
19:16 masak "control-break"?
19:16 jnthn "I'm a changed person" :)
19:16 pmichaud control-break --- do something different when a particular variable changes value (e.g., in an iteration)
19:17 pmichaud http://en.wikipedia.org/wiki/Control_break
19:17 pmichaud or is that not what this is intended to be doing?
19:17 masak oh!
19:17 masak pmichaud++
19:17 colomon masak: seems to me the lagging concept is kind of wrong for this example?
19:17 masak colomon: why?
19:18 masak pmichaud: I just didn't know it was called that. thanks for putting a name to the concept :)
19:18 pmichaud sure
19:18 pmichaud it's a long-standing pattern :)
19:18 colomon masak: at least as I normally think of examples, the lagging is because it's interesting to compare the previous entry with the current.  In this case, it's more of "the previous N with N changing repeatedly".
19:18 masak "Quite often there is a hierarchy of nested control breaks in a program" -- yes, exactly.
19:18 colomon masak: wouldn't this be more easily done with a hash?
19:19 pmichaud so, maybe do more research on "control break" and perhaps find something that already solves the problem
19:19 masak colomon: I didn't specify the requirements so clearly.
19:19 pmichaud also, wikipedia says that SQL and 4GLs handle this sort of stuff, so perhaps look to them for examples
19:19 masak colomon: the shops have to be added in order. and the person objects shouldn't be keps in memory (because there are, say, a billion of them)
19:20 masak oh right. SQL has to handle it, since that's how GROUP BY works.
19:20 pmichaud so, maybe what you want is an iterator that understands a "group by" equivalent :-)
19:21 masak that's not a half-bad idea.
19:21 pmichaud I mean, they're called *cursors*  :-)
19:21 pmichaud maybe some group-by options to map()
19:21 yegor__ is now known as yegor
19:21 pmichaud i.e., a way to specify blocks that fire when certain conditions are met
19:22 PerlJam greetings!
19:22 masak PerlJam: \o
19:22 * PerlJam is sitting in IAH waiting for a flight to Orlando FL
19:22 pmichaud ...orlando?
19:22 pmichaud fun or business or both?
19:22 PerlJam I wish it was fun.
19:22 yegor left #perl6
19:23 pmichaud no time for WDW?
19:23 pmichaud :(
19:23 masak by the way, hakank suggested a really nice syntax for 'for' loops with inter-dependent loop variables: 'for 1..10 -> $i, 1..$i -> $j { ... }'
19:23 masak would have to be a grammar extension, of course.
19:23 PerlJam Gary and I submitted a paper to a conference there and since CBI has to host the new TGLO person this week, I get to present the paper tomorrow and fly home Thu
19:23 masak but it's relatively intuitive.
19:24 pmichaud pj:  ever been to wdw?
19:24 PerlJam pm: long time ago.
19:24 pmichaud masak:  seems like there ought to be a metaoperator that could produce $i,$j w/o the syntax
19:24 pmichaud some sort of triangle cross or something like that
19:25 masak well, a triangular pattern was just a simple example.
19:25 pmichaud ah.
19:25 spq left #perl6
19:25 masak could have more involved dependencies of later variables on earlier.
19:25 vividsnow joined #perl6
19:26 * pmichaud is frightened that the series operator might be able to do it.
19:26 masak :P
19:26 masak ...the operator formerly known as the series operator...
19:27 colomon seems like the sequence op should be able to do it easily?
19:27 PerlJam seems like this sort of "counting" is a common pattern.  I mean, it's very similar to string increment but you've restricted the "alphabet"
19:27 masak colomon: IIRC, the real code on which my example was based started out with hashes. but then we realized that with the "control-break" pattern, we could ease the memory footprint quite a lot.
19:27 xinming left #perl6
19:28 xinming joined #perl6
19:28 masak PerlJam: TimToady once wanted to overload infix:<X> to handle this...
19:29 PerlJam oh ... now the triangle comment makes more sense.
19:29 jnthn pmichaud: Little NQP thought. At the moment we always treat Foo::Bar::Baz as a type, never as possibly a call if that isn't a known type. Nowadays, it's trivial to know that (it woulda been a pain once).
19:30 jnthn Not sure that we should change anything, mind...
19:30 colomon rakduo: my @a := [0], -> @x is copy { @x.push(@x[*-1]++); @x; } ... *; say @a[0].perl; say @a[1].perl; say @a[2].perl; say @a[3].perl
19:30 colomon rakudo: my @a := [0], -> @x is copy { @x.push(@x[*-1]++); @x; } ... *; say @a[0].perl; say @a[1].perl; say @a[2].perl; say @a[3].perla
19:30 p6eval rakudo 8533c3: OUTPUT«[0]␤[1, 0]␤[1, 1, 0]␤Method 'perla' not found for invocant of class 'Array'␤  in main program body at line 22:/tmp/nzjsH4crpb␤»
19:30 colomon rakudo: my @a := [0], -> @x is copy { @x.push(@x[*-1]++); @x; } ... *; say @a[0].perl; say @a[1].perl; say @a[2].perl; say @a[3].perl
19:30 p6eval rakudo 8533c3: OUTPUT«[0]␤[1, 0]␤[1, 1, 0]␤[1, 1, 1, 0]␤»
19:31 * colomon declares himself king of typos
19:31 pmichaud jnthn: yeah, I'm not sure what I want to do there.
19:31 pmichaud it'll be trivial now, yes.
19:31 colomon rakudo: my @a := [0], -> @x is copy { @x.push(@x[*-1] + 1); @x; } ... *; say @a[0].perl; say @a[1].perl; say @a[2].perl; say @a[3].perl
19:31 p6eval rakudo 8533c3: OUTPUT«[0]␤[0, 1]␤[0, 1, 2]␤[0, 1, 2, 3]␤»
19:33 jnthn pmichaud: Anyway, good news is that overall, I'm relatively free of blockers at the moment. So I expect to be able to keep things moving along. :)
19:33 pmichaud good deal.
19:33 pmichaud my main blocker now is that I'm doing a limited search for $newjob
19:34 spq joined #perl6
19:34 jnthn Sounds somewhat time-consuming.
19:36 spq left #perl6
19:37 masak colomon: yes, but can you have it loop with [0, 0], [1, 0], [1, 1], [2, 0], [2, 1], [2, 2], [3, 0] ... [10, 10]? :)
19:37 * masak guesses that's quite easy with an implementation of 'state'
19:39 jnthn pmichaud: There's also a couple of places where I'd quite like PAST::Compiler to be aware of 6model (like, when handling natively typed attributes). PAST is still the PIR implementation at the moment, but I can monkey-patch it to have something like attribute_6model for the time being. Does that sound sane-ish?
19:40 colomon rakudo: my @a := [0], -> @x is copy { @x.push(@x[*-1] + 1); @x; } ... *; my @b := @a.map(-> @x { @x[*-1] X @x }); say @b[10].perl
19:40 PerlJam masak: $j = lag $i :by(1);  # something like that could encapsulate the "lag state"
19:40 stkowski joined #perl6
19:40 p6eval rakudo 8533c3: OUTPUT«((10, 0), (10, 1), (10, 2), (10, 3), (10, 4), (10, 5), (10, 6), (10, 7), (10, 8), (10, 9), (10, 10))␤»
19:40 masak PerlJam: ooh
19:40 colomon ouch.
19:40 * masak decides he would prefer 'if $person.CHANGED { ... }'
19:40 masak PerlJam: yours is better if I would ever want a lag larger than 1.
19:41 masak PerlJam: I've never had a need for that, I think.
19:41 PerlJam masak: yours reminds me of Rails and ActiveModel  :)
19:41 colomon rakudo: my @a := [0], -> @x is copy { @x.push(@x[*-1] + 1); @x; } ... *; my @b := @a.map(-> @x { @x[*-1] X @x }); say @b[^4].perl
19:41 p6eval rakudo 8533c3: OUTPUT«(((0, 0)), ((1, 0), (1, 1)), ((2, 0), (2, 1), (2, 2)), ((3, 0), (3, 1), (3, 2), (3, 3)))␤»
19:41 colomon ah!  correct modulo flattening.  :)
19:41 masak PerlJam: right, but it doesn't hook into a DB. :)
19:41 masak PerlJam: just jiggles the AST a little.
19:43 PerlJam masak: mine could also end up like this:   for 0..10 -> $i {  my $j = lag $i; my $k = lag $j; ... }
19:43 PerlJam That's usually the case where you want a lag larger than 1 IME
19:44 PerlJam (I've never wanted lag :by(2) without also having a lag :by(1) )
19:44 PerlJam at least that I can recall
19:44 masak hm, true.
19:44 masak I like that latter syntax better.
19:44 masak but it still makes me have to manage the change comparisons explicitly.
19:44 PerlJam yes.
19:45 masak at least for the control-break scenario, I don't want that.
19:45 masak but now that pmichaud mentioned SQL and cursors, I think I'd prefer some idea that played off that.
19:46 masak maybe a parameterized phaser inside the loop that responded to 'callsame'?
19:46 PerlJam Hmm.
19:47 masak that would make it possible to do things both before and after chunks of similar iterations.
19:47 masak also, it might help localize variables even better.
19:51 PerlJam for the simple case of iterating a range of integers, you could use smart match for the lag
19:51 PerlJam you can also transmogrify any iteration into something that involves an integer count.
19:51 masak could you give an example?
19:51 PerlJam (not sure if this is helpful, just thinking out loud)
19:52 PerlJam I think y'all mentioned it earlier ... didn't someone say something about using when ?
19:52 Tene In a previous project, I had a function 'sliding-window-map' that accepted a window size, block, and list.
19:52 pmichaud jnthn: yes, I think PAST::Compiler needs to be aware of 6model (and should likely be built as 6model)
19:52 pmichaud I was thinking of working on a nqp-implementation of PAST::Compiler
19:53 Tene In Perl 6, a nicer option would be infer the window size from the arity of the block.
19:53 moritz pmichaud: just rewriting the PIR in NQP, or also a redesign?
19:53 colomon Tene: ooooo.  Don't think it's really applicable to what masak is talking about, but that's an interesting idea.  :)
19:53 pmichaud mainly converting to NQP and 6model
19:53 pmichaud I wasn't planning on a significant redesign
19:53 Tene so, possibly a :sliding or whatever modifier to map
19:54 Tene right now, given 1,2,3,4 and an arity-2 block, map will run on 1,2 and 3,4
19:54 PerlJam Tene: and a :step modifier as well to jump more than 1 item at a time?
19:54 Tene would be nice for there to be a convenient way to run on 1,2 2,3 3,4
19:54 Tene PerlJam: Maybe.
19:54 moritz pmichaud: since PAST nodes are really just captures, 6model basis shouldn't change too much, should it?
19:55 masak Tene: @list Z @list.rotate
19:55 jnthn fwiw, I'd rather they stopped being captures.
19:55 * masak too
19:55 jnthn Otherwise we can't take advantage of a bunch of stuff 6model offers.
19:56 PerlJam my @ffts = map { fft(@_) } :window(32) :step(16) @stuff;   # assuming @_ holds the window into @stuff.
19:56 Tene masak: 1) that's not quite the same at the ends, 2) that gets awkward with sindow size > 2, and 3) that's generally awkward to type out, compared to putting it in a function.
19:56 masak them being captures reeks a bit of bounded contexts leaking together.
19:56 jnthn blocktype could just point straight off to a Parrot-level string, for example. Block arity can just be an int.
19:56 jnthn The memory use when compiling is kinda high.
19:57 masak Tene: aye, agreed on all counts.
19:57 pmichaud jnthn convinced me that PAST notes should be attribute-based instead of hash-based
19:57 Tene masak: given the nested nature of your data, there's an elegant solution that I don't quite have the time to work out right now.
19:57 jnthn pmichaud: fwiw, somebody is doing a GSoC project on converting PAST::Compiler to NQP.
19:57 jnthn pmichaud: But they also plan to do (new)POST straight to PBC. No PIR intermediate step.
19:58 Tene masak: basically, apply a sliding window over individual lines, and then you know at what minimum depth your new line varies from the previous.
19:58 masak Tene: hm.
19:58 newbee what's the use of binding a variable to a constant?
19:58 pmichaud jnthn: yes, I'm thinking I shouldn't halt what I think needs to be done just because there's a GSoC project
19:58 pmichaud also, is the GSoC for nqp or for nqp-rx?
19:59 masak newbee: you mean like 'my $a := 5'?
19:59 jnthn pmichaud: nqp-rx
19:59 pmichaud right
19:59 newbee yes, masak
19:59 jnthn pmichaud: Feel free to go ahead if you wish to work on that.
20:00 masak newbee: it's one way among at least two to set a variable to be a certain value.
20:00 jnthn pmichaud: It's certainly needed for the clr/jvm/worreva backend compilers to run on new nqp.
20:00 pmichaud jnthn: exactly
20:00 masak newbee: basically, it's binding a value to a variable without going through the intermediate container.
20:00 pmichaud and it helps us get nqp much closer to bootstrap
20:00 JeffreyKegler joined #perl6
20:00 jnthn pmichaud: *nod*
20:01 masak newbee: from the perspective of nqp, it's actually a more basic mechanism than assignment.
20:01 tadzik hello zebras
20:01 masak tadzik! \o/
20:01 Tene masak: your function takes a list of lists, and on each block invocation, give it the current item, and the minimum-depth item that varies from the previous run, which you can dispatch on with 'when'
20:01 jnthn pmichaud: Note that I didn't put the MMD cache into nqp yet so multi-dispatch will be slow as hell :)
20:01 pmichaud no problem
20:01 tadzik seen bbkr
20:01 aloha bbkr was last seen in #perl6 38 days 21 hours ago joining the channel.
20:01 pmichaud past::compiler isn't that slow to begin with
20:01 masak Tene: oh. interesting.
20:01 tadzik seen bbkr_
20:01 aloha bbkr_ was last seen in #perl6 4 hours 5 mins ago saying "on "TAP::Harness v3.12 and Perl v5.10.0"".
20:01 jnthn It's not a lack of having a new MMD cache design. I implemented in on the clr already.
20:02 jnthn Just didn't port it yet.
20:02 jnthn It's allocation free on lookups that get a hit, unlike the one in Parrot.
20:02 newbee so $a := 5 is faster than $a = 5 ?
20:03 Tene magic-lolducks(@list-of-lists, -> $_, $person, $shop, $item { when 0 { person changed }; when 1 { $shop changed }; when 2 { item changed } })
20:03 jnthn newbee: In Rakudo today? Probably not. In the future? Very possibly.
20:03 jnthn In NQP it's certainly cheap. But it's also the only choice. :)
20:04 Tene masak: it's your choice whether you pass an index, a pair of index -> prev value, pass names into the function so it can generate string indexes instead of numbes, etc.
20:04 masak nod.
20:04 JeffreyKegler left #perl6
20:04 MayDaniel joined #perl6
20:04 masak I'd probably define a bunch of integer constants and when on those.
20:04 Tene masak: I don't know whether -> $_, $a { ... } works for setting the topic like that; I haven't tried it.
20:05 masak should.
20:05 vividsnow_ joined #perl6
20:05 masak rakudo: for 1..6 -> $_, $a { .say }
20:05 jnthn rakudo: for 1,2,3,4 -> $_, $a { .say; }
20:05 p6eval rakudo 8533c3: OUTPUT«1␤3␤5␤»
20:05 p6eval rakudo 8533c3: OUTPUT«1␤3␤»
20:05 masak jnthn: uncanny :P
20:05 Tene Hahaha, that's cute.
20:05 jnthn Curiosities. We share them. :P
20:06 masak jnthn: clearly we should spend less time together :P
20:06 Tene That's a cute little idiom; I kind of like it.
20:06 sivoais left #perl6
20:06 jnthn :P
20:06 masak rakudo: for 1..6 -> $_, $ { .say }
20:06 p6eval rakudo 8533c3: OUTPUT«1␤3␤5␤»
20:06 Tene Also, I'm pretty sure I haven't seen this algorithm used anywhere before, but it rather jumped out at me.  I haven't reasoned about it in any detail, so I'm very curious to hear if this works well for you or not.
20:07 masak will report back.
20:07 masak Tene++
20:07 vividsnow left #perl6
20:08 tadzik phenny: tell bbkr_ what os is that? Is that possible that 0 is not a success on it?
20:08 phenny tadzik: I'll pass that on when bbkr_ is around.
20:08 tadzik phenny: thank you darling
20:09 Tene That's always an interesting experience for me, when an algorithm leaps out from behind a dark corner and steals all the loose minutes out of my wallet.
20:10 masak by the way, both jnthn and I were surprised at least once each last Friday by the (re-)realization that in Perl 5, you have to precede your closure blocks with 'sub' :)
20:12 Tene haha, nice.
20:14 jnthn I also kept trying to write signatures on my subs... :)
20:16 TimToady I keep trying to use the method forms of various listops...
20:16 Tene Hmm, I bet jnthn would like my Devel::Declare::Declarative syntax for defining Perl 5 macros.  I should actually finish that someday.
20:16 Tene My prototype sketch was fairly promising.
20:18 vividsnow_ is now known as vividsnow
20:21 masak hey, look what jnthn++ and I made: http://conferences.yapceurope.org/npw2011/
20:23 MayDaniel left #perl6
20:24 jnthn Scary, my first time co-organizing a conference, rather than just showing up and nattering about stuff. :)
20:24 tadzik oh, That's the viking-helmeted-polar-bear!
20:24 jnthn masak++ for drawing it
20:24 moritz \o/
20:24 tadzik it resembles masak a bit, if I can say that :>
20:24 jnthn *lol*!!
20:24 masak :D
20:25 tadzik ...but my sight may be a bit confused :)
20:25 jnthn Just how hard did you celebrate? ;)
20:25 moritz don't belittle your cognitive abilities :-)
20:25 tadzik oh, notmuch
20:26 jnthn :)
20:26 tadzik jnthn: two words: Zlaty Bażant :)
20:26 masak map { $tadzik.have(Beer.new) }, ^Inf # :)
20:26 moritz I'd love to attend, but this year it's not possible :/
20:26 jnthn tadzik: Slovenske pivo! Strasne dobre! \o/
20:26 * moritz wonders if masak has sink context implemented :-)
20:26 tadzik also, board games and a PM meeting. That was a good day :)
20:27 masak moritz: the runtime in my head has lots of bells and whistles.
20:27 jnthn Happily, that beer is also available in Sweden. But the price is...different. :)
20:29 vividsnow left #perl6
20:30 sjn jnthn++ masak++ # For organizing http://conferences.yapceurope.org/npw2011/
20:31 alester joined #perl6
20:32 moritz indeed
20:32 moritz jnthn++
20:32 moritz masak++
20:32 * moritz hopes it's not a too short notice
20:33 pmichaud mmmm, NPW
20:33 jnthn pmichaud: ;)
20:34 tadzik oh, I regret that I can't come :|
20:35 pmichaud looks like airfare is currently US$1100
20:37 pmichaud a bit pricey for me at the moment :(
20:37 pmichaud I like the logo :-)
20:38 tadzik say, doesn't it look even a little bit like masak++ himself? :P
20:38 ymasory left #perl6
20:38 masak I guess we tend to make things in our own image... :)
20:38 masak but I don't usually wear helmets. I prefer towels.
20:39 pmichaud ...you mean that's not a towel?
20:39 pmichaud I figured it was an exceptionally round one.
20:39 moritz horned towel
20:40 stkowski left #perl6
20:51 dju_ is now known as dju
20:57 mj41 left #perl6
20:57 alester left #perl6
20:57 alester joined #perl6
21:00 noganex_ joined #perl6
21:04 noganex left #perl6
21:11 colomon loliupdatedmyblogpostwiththewisdomofTimToady: http://justrakudoit.wordpress.com/2011/04/26/more-pi/
21:12 Rotwang left #perl6
21:12 * masak can't spot the difference
21:21 vert2 left #perl6
21:24 bluescreen10 left #perl6
21:26 Lorn joined #perl6
21:31 newbee left #perl6
21:32 vert2 joined #perl6
21:36 mark__ joined #perl6
21:37 vert2 left #perl6
21:38 mark__ left #perl6
21:39 mds_ joined #perl6
21:40 hercynium left #perl6
21:41 hercynium joined #perl6
21:41 hercynium left #perl6
21:41 hercynium joined #perl6
21:42 mds_ Perl 6:  sub abc { return 47; }    $a = 'abc';     how can I call using $a     Thanks
21:43 kaare__ left #perl6
21:46 mds_ and what to do if there are arguments
21:47 masak rakudo: sub abc { return 47 }; my $a = 'abc'; my $sub = eval( '&' ~ $a ); say $sub()
21:47 p6eval rakudo 8533c3: OUTPUT«47␤»
21:48 Mowah left #perl6
21:51 TimToady rakudo: sub abc { return @_ }; my $a = 'abc'; my $sub = &::($a); say $sub(47);
21:51 p6eval rakudo 8533c3: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 22, near "; say $sub"␤»
21:51 masak great. Rakudo is sorry. :P
21:51 MayDaniel joined #perl6
21:51 TimToady alpha: sub abc { return @_ }; my $a = 'abc'; my $sub = &::($a); say $sub(47);
21:51 p6eval alpha : OUTPUT«Confused at line 10, near "= &::($a);"␤in Main (file <unknown>, line <unknown>)␤»
21:51 masak better than... that, I guess. :)
21:52 TimToady niecza: sub abc { return @_ }; my $a = 'abc'; my $sub = &::($a); say $sub(47);
21:52 p6eval niecza v4-76-g7bf5ef9: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Non-simple variables NYI at /tmp/VdTzU2pgaW line 1:␤------> [32mn @_ }; my $a = 'abc'; my $sub = &::($a)[33m⏏[31m; say $sub(47);[0m␤␤Unhandled exception: Check failed␤␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 388 (CORE die
21:52 p6eval ..@ 2)␤  at /h…
21:52 masak everyone has an excuse.
21:52 jnthn At least I know how to implement that now :)
21:52 jnthn Mostly because I spent my Easter re-doing packages from the ground up. :)
21:52 TimToady .oO(I notice he didn't say, "implement correctly"...)
21:53 Util *startle* I just read the error as "simple variables NYI"
21:53 jnthn TimToady: What would be the obvious incorrect way? :)
21:55 jnthn .oO(Better to be subtley incorrect, if I'm gonna be...)
21:56 masak actually, I'd prefer it if you were blatantly incorrect. :P
21:56 * TimToady prefers subtly correct
21:56 masak again, under the assumption that you have to be incorrect in some way... :)
21:56 jnthn masak: Yeah but you just want your 2000 :P
21:57 masak g'ah, found out! :)
21:58 colomon masak: new stuff is in the section at the end marked "Update" in bold.  :)
21:58 mds_ left #perl6
22:01 TimToady moritz: well, I thought it was a hoot, even if no one else did...
22:01 masak colomon: oh :)
22:02 masak I think I must have had an old cached version...
22:03 whiteknight joined #perl6
22:07 masak 'night, #perl6
22:09 masak left #perl6
22:11 hercynium left #perl6
22:12 coldhead joined #perl6
22:24 MayDaniel left #perl6
22:33 coldhead left #perl6
22:49 dalek nqp/ctmo: 98eb233 | jonathan++ | src/ (2 files):
22:49 dalek nqp/ctmo: Add attribute meta-objects to the HOW exports.
22:49 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/98eb2330df
22:49 dalek nqp/ctmo: 591efd8 | jonathan++ | src/Regex/Cursor-builtins.pir:
22:49 dalek nqp/ctmo: Fix FAILGOAL.
22:49 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/591efd832f
22:49 dalek nqp/ctmo: 4b81716 | jonathan++ | src/stage0/ (7 files):
22:49 dalek nqp/ctmo: Update bootstrap to get FAILGOAL fix.
22:49 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/4b81716ce3
22:49 dalek nqp/ctmo: 0c07f7d | jonathan++ | src/ (3 files):
22:49 dalek nqp/ctmo: Add attributes to compile time meta-object for all packages except knowhow (got a circularity issue to resolve there).
22:49 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/0c07f7dfca
22:58 birdwindupbird left #perl6
22:59 mtk left #perl6
23:07 mtk joined #perl6
23:13 cdarroch left #perl6
23:14 ymasory joined #perl6
23:15 cosimo joined #perl6
23:18 ymasory left #perl6
23:18 donri left #perl6
23:20 bacek joined #perl6
23:22 ymasory joined #perl6
23:26 Chillance left #perl6
23:27 alester left #perl6
23:31 fridim_ joined #perl6
23:32 fridim_ left #perl6
23:40 dalek nqp/ctmo: cdae853 | jonathan++ | src/NQP/Actions.pm:
23:40 dalek nqp/ctmo: Oops, fix that type lookup.
23:40 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/cdae853df1
23:40 dalek nqp/ctmo: 509ee04 | jonathan++ | src/HLL/SerializationContextBuilder.pm:
23:40 dalek nqp/ctmo: Fix an attribute access that was wrong, caught by the in-progress undeclared attribute detection.
23:40 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/509ee044a1
23:40 dalek nqp/ctmo: 1a79be7 | jonathan++ | / (4 files):
23:40 dalek nqp/ctmo: Add .type to PAST::Var nodes. Also twiddle the build a bit to make sure we build changes to the PAST extensions.
23:40 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/1a79be74dc
23:40 dalek nqp/ctmo: eafc258 | jonathan++ | src/NQP/ (2 files):
23:40 dalek nqp/ctmo: Detect undeclared attributes at compile time and complain about them. Possible now that we register them with the compile timemeta-object. Also, pass any declared type along to the PAST::Var node, though it's not used yet.
23:40 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/eafc2587f1
23:40 dalek nqp/ctmo: cf88f9e | jonathan++ | src/how/NQP (2 files):
23:40 dalek nqp/ctmo: Standardize introspection interface implemented in the role meta-objects. Unregresses the roles.t breakage in the last commit.
23:40 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/cf88f9e205
23:42 jnthn Few steps further. :)
23:42 jnthn sleep &
23:43 impious left #perl6
23:47 yarp_ joined #perl6
23:49 molaf_ joined #perl6
23:52 ymasory left #perl6
23:53 molaf left #perl6
23:54 am0c joined #perl6
23:56 ymasory joined #perl6
23:57 am0c left #perl6
23:58 yarp_ left #perl6

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

Perl 6 | Reference Documentation | Rakudo