Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-09-09

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:04 lumi__ joined #perl6
00:04 [Coke] pmichaud: anything else I can do to make isRakudoFastYet happen?
00:13 pmichaud [Coke]: undoubtedly yes.  Let me review what you have thus far tomorrow morning and I'll outline something then.
00:13 pmichaud right now I'm pretty exhausted from being up much of the night last night
00:21 jnthn sleep tiem - night &
00:21 diakopter n
00:26 lumi__ joined #perl6
00:27 daniel-s joined #perl6
00:35 benabik joined #perl6
00:35 araujo joined #perl6
00:40 lichtkind joined #perl6
00:41 lumi__ joined #perl6
00:43 lichtkind thank you all
00:49 aindilis joined #perl6
00:54 lumi__ joined #perl6
01:05 eternaleye joined #perl6
01:11 lumi__ joined #perl6
01:11 lichtkind rakudo: my %a = 1 => 1, 2=>2, 3=>3; %a.delete(1,2); say %a
01:11 p6eval rakudo db4495: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤  in method delete at src/gen/CORE.setting:4446␤  in <anon> at /tmp/oZumGKOIcJ:1␤  in <anon> at /tmp/oZumGKOIcJ:1␤␤»
01:11 uasi joined #perl6
01:14 dayangkun joined #perl6
01:15 JimmyZ joined #perl6
01:17 lumi__ joined #perl6
01:27 jevin joined #perl6
01:32 lichtkind i thought say ~ %a should have same outout as %a
01:33 lumi__ joined #perl6
01:45 lumi__ joined #perl6
01:53 woosley joined #perl6
01:57 dayangkun_ joined #perl6
02:01 DarthGandalf joined #perl6
02:01 Trashlord joined #perl6
02:03 lumi__ joined #perl6
02:07 Yappoko___ joined #perl6
02:13 [Coke] pmichaud: no worries. I'm wiped too. Long $DAYJOB week.
02:18 lumi__ joined #perl6
02:23 dayangkun__ joined #perl6
02:29 lumi__ joined #perl6
02:36 tdignan joined #perl6
02:42 lumi__ joined #perl6
02:51 envi joined #perl6
03:17 lue joined #perl6
03:23 Su-Shee_ joined #perl6
03:27 molaf joined #perl6
03:56 wolfman2000 joined #perl6
04:02 birdwindupbird joined #perl6
04:11 sorear joined #perl6
04:17 lumi__ joined #perl6
04:23 [Coke] make test in nqp/ build dir on rakudo-nom has todo passes as well as failures.
04:24 agentzh joined #perl6
04:24 [Coke] so if one did want to be able to run perl6 on, say, JS, would making the new nqp target JS be the way to go?
04:24 [Coke] (to start with, anyway)
04:26 SHODAN joined #perl6
04:27 Trashlord joined #perl6
04:28 lumi__ joined #perl6
04:30 [Coke] IWBNI nqp had a hint about what the dozen directories under src/ were for.
04:37 Shozan joined #perl6
04:37 dalek rakudo/nom: 433a731 | Coke++ | t/spectest.data:
04:37 dalek rakudo/nom: track failure mode
04:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/433a7311cc
04:40 uasi joined #perl6
04:50 lumi__ joined #perl6
04:51 dalek rakudo/nom: 3053e41 | pmichaud++ | docs/announce/2011.0 (3 files):
04:51 dalek rakudo/nom: Add announcements from master into nom branch.
04:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3053e410e9
04:58 tadzik [Coke]: also, do you have the roles-related commits pulled in?
05:00 pmichaud the 'nom' branch is now the default.
05:00 pmichaud messages sent to p6c, parrot-dev, and rakudo.org
05:00 pmichaud the 'master' branch is now 'ng'
05:00 dalek rakudo/nom: 15813b2 | tadzik++ | t/spectest.data:
05:00 dalek rakudo/nom: Fix a couple of failure reasons in spectest.data
05:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15813b242a
05:00 [Coke] tadzik: I just ran that, last commit before mine was jnthn's hours ago.
05:00 tadzik pmichaud++
05:01 pmichaud I need sleep -- will check on things in the morning here.
05:01 tadzik [Coke]: I know, but I got different fails in parametric roles
05:02 [Coke] tadzik: is there a way to programatically distinguish warnings? I was basically blacklisting them as they came up.
05:02 tadzik [Coke]: Well, maybe you could notice that the next line is indented (is a backtrace) if it's an error, warnings seem not to backtrace
05:02 lumi__ joined #perl6
05:02 tadzik that's the only thing I can think of
05:03 tadzik awful. I woke up too early
05:05 [Coke] k. you and I should probably polish up that script and get it checked in so we're not fighting each other on udpates.
05:06 tadzik no worries, I just fixed that few I thought were weird
05:09 [Coke] yes, but when I run the script again, I'll fix them back. ;)
05:09 tadzik (:
05:10 tadzik are you sure you are on nom HEAD? Those parametric roles warnings seemed odd
05:10 tadzik that's what last jnthn's commits fixed
05:11 tadzik going to get some moar sleep &
05:11 moritz good morning
05:12 lumi__ joined #perl6
05:14 [Coke] perhaps I missed an update.
05:14 [Coke] it is 3 hours past my bedtime. ;)
05:20 jevin joined #perl6
05:25 lumi__ joined #perl6
05:52 tadzik good moritz
05:58 lumi__ joined #perl6
06:01 moritz wow, we had an earthquake in Germany
06:01 moritz though no real damage, it seems
06:01 moritz strength 4.4 (insert laughter from the US and far east here)
06:01 TimToady well, something has to poke the Alps up in the air
06:04 OuLouFu joined #perl6
06:05 packetknife joined #perl6
06:07 moritz iirc the alps erode faster than they are being pushed
06:08 TimToady just has to be dynamic :)
06:08 moritz @*ALPS.push: ... :-)
06:10 Patterner throw people;
06:11 TimToady De.roll
06:16 lumi__ joined #perl6
06:27 wtw joined #perl6
06:29 JimmyZ joined #perl6
06:31 koban` joined #perl6
06:31 koban` left #perl6
06:32 satyavvd joined #perl6
06:32 lumi__ joined #perl6
06:36 benabik_ joined #perl6
06:45 lumi__ joined #perl6
06:56 JimmyZ__ joined #perl6
06:59 mj41 joined #perl6
07:02 donri joined #perl6
07:04 lumi__ joined #perl6
07:04 JimmyZ joined #perl6
07:06 JimmyZ_ joined #perl6
07:17 wamba joined #perl6
07:18 masak joined #perl6
07:18 masak bon matin #perl6
07:18 masak Perl 6 Day! \o/
07:19 JimmyZ_ joined #perl6
07:21 pnu what would be the missing parts to make rakudo (completely) self-hosting (i.e. everything would be written in perl6)? i'm not actually suggesting that - just trying to understand the systems' architecture and need some starting points..
07:22 lumi__ joined #perl6
07:23 masak pnu: interesting question.
07:24 masak pnu: nqp is a separate language, but enough of a subset to Perl 6 that maybe it still counts as "self-hosting"...
07:27 masak src/binder/ and src/pmc/ and src/ops/ contain a bunch of C files. or sometimes Parrot-specific files that preprocess down to C.
07:28 pnu is nqp self-hosting then?
07:28 masak yes.
07:28 masak the rest of the Rakudo source tree, I think, is either Perl 6 or nqp.
07:29 woosley joined #perl6
07:30 pnu i quess a common runtime is important for language interop., but i wouldn't be too conserned about anything else except perl5 interop. at this point.. or what do you people think?
07:31 masak it was discussed yesterday.
07:31 masak chromatic had a couple good points.
07:32 pnu oh, i'll check the logs
07:32 masak http://irclog.perlgeek.de/​perl6/2011-09-08#i_4397189
07:32 woosley1 joined #perl6
07:36 lumi__ joined #perl6
07:36 pnu masak: in addition to those src files, i guess that actually running a program needs parrot.. so just rewriting those wouldn't be enough?
07:37 pnu i mean there needs to be some runtime environment anyway.
07:37 masak right.
07:38 pnu so.. it would require implementing parrot in perl6? ;-)
07:39 pnu (or some other vm)
07:41 TiMBuS well, not really?
07:41 masak pnu: if the goal is "everything in Perl 6" then, yes, I guess.
07:41 TiMBuS the garbage collector yeah, but thats about it..
07:42 masak that's not about it :)
07:42 masak something has to manage control flow. exceptions and gather blocks and stuff.
07:42 masak something has to map objects to memory.
07:42 masak and handle method dispatch.
07:42 masak (efficiently!)
07:43 TiMBuS isnt nom doing most of that, and thats in perl6
07:43 masak that's a good question. 6model takes over some of those things, yes.
07:44 JimmyZ_ joined #perl6
07:44 TiMBuS i didnt mean it was easy, i just meant you dont need what you'd define as a VM. then again a VM these days is hard to define
07:45 JimmyZ_ What? Perl 6 day?
07:45 JimmyZ_ anything important today?
07:45 TiMBuS talk like a parrot day
07:45 lumi__ joined #perl6
07:46 masak JimmyZ: in $dayjob, I get to pick about a day a week for Perl 6 work.
07:46 tadzik 3 day weekend!
07:46 TiMBuS haha
07:46 JimmyZ that's great
07:46 masak so I've got the whole day free for whatever I want to do to advance the state of Perl 6! \o/
07:47 JimmyZ masak: macro !
07:47 JimmyZ :)
07:47 masak JimmyZ: yes :)
07:47 TiMBuS threads!
07:47 masak no, surely not.
07:47 TiMBuS :[
07:47 JimmyZ ;)
07:47 masak les patches sont welcome.
07:47 pnu where to look for more info about this 6model?
07:48 masak pnu: jnthn's blog about it.
07:48 masak pnu: http://6guts.wordpress.com/
07:48 Su-Shee left #perl6
07:48 JimmyZ_ joined #perl6
07:50 pnu is there anyone actively working with perl5 interop.? (sorry, haven't check yesterdays backlog yet)
07:51 im2ee joined #perl6
07:51 masak there's blizkost.
07:51 im2ee Hey ! :)
07:51 masak https://github.com/jnthn/blizkost
07:51 masak im2ee: hi! :)
07:51 masak rakudo: say "Hello im{ 6 * 7 - 4 * 10 }ee!"
07:52 p6eval rakudo 15813b: OUTPUT«Hello im2ee!␤»
07:53 sivoais joined #perl6
07:53 tadzik hey im2ee
07:54 bbkr Good.morning() #perl6
07:56 lumi__ joined #perl6
07:56 masak bbkr: .good given $morning;
07:57 JimmyZ_ joined #perl6
07:57 pnu ok thanks masak++
08:00 im2ee :)
08:02 woosley joined #perl6
08:02 masak oh!
08:02 packetknife joined #perl6
08:02 masak my grant application is up: http://news.perlfoundation.org/2011/0​9/hague-grant-application-implem.html
08:04 im2ee I have a request... Can you show me your blogs? :) I want to create own blog and i want to look on others, to get some inspiration. :)
08:04 masak im2ee: Google for "planet Perl 6" and click on the links on the right.
08:05 im2ee I know planet perl six :)
08:05 im2ee tadzik showed me this. :)
08:06 im2ee masak, there are much blogs .. i didn't see it before! Thank You! :)
08:06 donri_ joined #perl6
08:08 lumi__ joined #perl6
08:12 JimmyZ joined #perl6
08:12 masak im2ee: in particular, my blog template is very simple: https://github.com/masak/psyde/​blob/master/templates/post.html
08:13 masak simplicity++
08:13 wamba joined #perl6
08:15 masak yay, they even got the <code> things right in my grant application. :)
08:17 SHODAN joined #perl6
08:17 lichtkind joined #perl6
08:18 lichtkind rakudo: say 5
08:18 p6eval rakudo 15813b: OUTPUT«5␤»
08:20 masak hail Eris.
08:20 * moritz suddenly gets a very good idea for an April Fool's prank
08:20 renormalist joined #perl6
08:20 JimmyZ_ joined #perl6
08:21 masak moritz: pretending that Perl and Python are uniting their forces and merging into one single, horribly inconsistent and ugly language? :P
08:22 moritz masak: not quite that elaborate
08:22 moritz masak: I thought of Perl and Ruby this time :-)
08:22 masak :P
08:22 masak (and then thinking "hey, that's a silly idea, but language interop is nice" and going off to create a virtual machine with the same name as the made-up language...)
08:23 lumi__ joined #perl6
08:23 satyavvd joined #perl6
08:23 alvis_ joined #perl6
08:28 wamba joined #perl6
08:32 jnthn mornin'
08:33 daxim joined #perl6
08:33 masak jnthn: good moritz
08:34 * masak realizes that Eiffel has an ANY class
08:34 jnthn Does it have a TOWER class?
08:34 * JimmyZ just saw Hague Grant Application: Implementation of Macros
08:34 lumi__ joined #perl6
08:35 masak yes, http://news.perlfoundation.org/2011/0​9/hague-grant-application-implem.html is up.
08:36 masak TPF will be happy to read your comments about whether I should do this grant or not.
08:37 * JimmyZ doesn't like there is js script from twitter, it blocked me
08:38 M_o_C joined #perl6
08:38 * JimmyZ can't open news.perlfoundation.org because of the twitter js srcript :(
08:39 masak JimmyZ: can't you turn of js?
08:39 masak off*
08:39 moritz installing noscript would be my first action in an environment where js had such a bad effct
08:40 * JimmyZ installs noscript
08:40 masak noscript++ # the only safe option
08:40 moritz http://www.perlmonks.org/?node_id=924178 woah. A case where a seemingly lazy poster actually thanked me for an RTFM answer
08:42 masak moritz++ # helping people help themselves
08:45 masak today's gem from Ward's Wiki: 'I like to create objects to "localize design decisions", not to "hide information".'
08:45 masak if only there was a way to ++ that whole phrase.
08:45 masak objects as concentrations of some specific design consideration.
08:45 lichtkind_ joined #perl6
08:47 masak it's not news at all, but the discussions about Sagas have made me realize that *anything* is up for becoming a class, even abstract, intangible concerns that generally don't look like a class.
08:48 masak a Saga is a cross-cutting concern capturing the lifetime of some process.
08:48 moritz example for such a class?
08:48 * lichtkind sat in ingys talk about lang interop called acmeism
08:49 snarkyboojum how far did sorear get when playing with macros a while back?
08:50 moritz snarkyboojum: you mean the rakudo branch?
08:50 moritz s/branch/fork/?
08:50 moritz I think he had unparameterized macros in term position
08:50 snarkyboojum moritz: not sure :)
08:50 masak moritz: the classical e-commerce example for a saga is one that makes sure that an order either gets paid for or doesn't get delivered. the challenge is that various subsystems (sales, billing, inventory) advance their states irrespective of each other.
08:51 masak I have unparameterized macros in term position.
08:51 masak I was not aware of sorear's attempts.
08:51 moritz I'm quite sure you were
08:51 moritz :-)
08:51 masak huh/
08:51 masak huh.
08:51 masak I've completely forgotten about it, at least.
08:51 lichtkind is >>++ gone?
08:52 masak lichtkind: no.
08:52 masak lichtkind: when you ask such questions, I get concerned. what sources do you have? :)
08:52 snarkyboojum I remember him getting something going about 12-18 months ago, but no details :)
08:52 lumi__ joined #perl6
08:52 masak lichtkind: getting rid of >>++ hasn't even been *discussed*.
08:53 lichtkind masak: my source it that nom doesnt do it
08:53 masak rakudo: my @a = 1, 2, 3; @a>>++; say @a
08:53 p6eval rakudo 15813b: OUTPUT«2 3 4␤»
08:53 masak lichtkind: ditch your source. it sucks.
08:54 lichtkind masak: i tell that jnthn :)
08:54 moritz masak: https://github.com/sorear/rakudo/tree/topic/macros
08:54 jnthn what, nom just did it... :)
08:54 masak jnthn: why you tell lichtkind lies? :)
08:55 masak moritz: thanks, looking.
08:55 snarkyboojum also moritz's lovely irc log shows some 4 pages of decent reading on the topic (sorear/macro) :D
08:55 masak ooh
08:55 moritz snarkyboojum: that's what I also searched for :-)
08:55 jnthn :P
08:56 lichtkind masak: thanks i used slightly different syntax which didnt worked
08:56 jnthn Correct syntax does tend to help ;)
08:57 lichtkind what an enlightenment
08:57 masak lichtkind: bet you put a space after @a and before >>++
08:57 * jnthn figures coffee would help too, and goes to make some :)
08:57 masak lichtkind: *that* changed, but not recently. like, three years ago.
08:57 moritz masak: http://irclog.perlgeek.de/​perl6/2010-05-06#i_2299141 you even discussed macros with sorear++ back then
08:58 masak moritz: sounds like something I would do, yes :P
08:58 lichtkind masak: not only that i apllied it directly to (1..5)
08:58 masak lichtkind: that wouldn't give you a parse error, but a runtime error.
08:58 moritz masak: I was a bit surprised you didn't mention that experiment in your grant proposal, but assumed you had good reasons
08:59 moritz (forgetting about is also a good reason :-)
08:59 masak lichtkind: from that you still shouldn't conclude that >>++ doesn't exist.
08:59 masak moritz: yes :/
08:59 * masak suddenly starts remembering
08:59 masak whoa.
09:00 wamba joined #perl6
09:01 snarkyboojum moritz++ #irc logging and stuff :D
09:03 masak especially stuff ;)
09:04 lumi__ joined #perl6
09:05 masak sorear: sorry for forgetting your efforts from last year in my grant application! I will definitely peruse them now, though, to contrast and compare with what I have so far in my branch.
09:06 replore_ joined #perl6
09:06 JimmyZ_ joined #perl6
09:17 moritz how important do people find pir:: and nqp:: being available in p6eval?
09:18 moritz (I mean things like pir::open() in rakudo, not the nqp: target from p6eval)
09:18 masak moritz: it sounds unsafe, if that's what you're after.
09:18 moritz they are a security hole, though one that needs quite some insider knowledge to exploit
09:18 masak moritz: the 'though' part shouldn't matter.
09:18 masak if someone wants to cause harm, we have to assume they're knowledgeable.
09:19 moritz if I operated under that assumption, I'd have to shut down p6eval immediately.
09:20 JimmyZ_ joined #perl6
09:20 snarkyboojum or close the security hole :)
09:20 moritz snarkyboojum: the security hole is "allowing code to execute", whichi s the whole point of p6eval
09:21 snarkyboojum moritz: but in a less controlled manner?
09:21 jnthn moritz: I don't feel strongly either way, tbh. It can be helpful to have them to hand for debugging stuff, occasionally.
09:21 jnthn But I see the concern too.
09:22 moritz if you present the security question as a black-or-white question, you lose p6eval. So see it as shades of gray
09:23 moritz currently I'm in the "watch and see if further action becomes necessary" position, though I do think about possibilities to tighten security
09:23 jnthn moritz: We (thankfully) don't have a history of people abusing it.
09:23 lumi__ joined #perl6
09:25 masak moritz: my advice: think long and hard about what *could* be done with pir:: and nqp::. do not post your conclusions on the channel.
09:26 jnthn Which of course doesn't mean we never will, but I guess we could try having a little faith in huge manatee for a while longer. :-)
09:26 masak moritz: decide whether or not to keep nqp:: and pir:: in p6eval depending on the worst possible thing that can be done with them.
09:26 moritz masak: the answer is really simple :/
09:27 jnthn masak: All the things that we banned yesterday with SAFE
09:27 masak right.
09:27 jnthn masak: It depends if we're trying to fend of a determined, hardened attacker, or just mischevious/idiotic folk. :)
09:28 moritz exactly
09:28 masak I agree -- let's hope we never get the former kind.
09:28 masak and maybe it's premature securitization to try to design against one.
09:28 snarkyboojum breaking things doesn't always require evil intent :)
09:29 masak snarkyboojum: no, but breaking things in this way probably requires quite a bit of planning and forethought.
09:29 moritz snarkyboojum: that's why we have SAFE.setting
09:32 snarkyboojum if you're in a virtualised environment, just restore from a snapshot post-breach then, and you're all good :)
09:32 moritz we're not *that* virtualized
09:32 moritz (just chroot)
09:32 moritz iirc there are prototypial break-out-of-vm exploits in the wild too
09:32 snarkyboojum I've been spoiled by working on EC2 for work over the last few months.. nice model
09:33 * tadzik waits for someone else to make the first comment on a grant application
09:33 moritz tadzik: don't. Usually that's me, but I also waited this time.
09:33 snarkyboojum moritz: true - but they're probably more sophisticated than working around a SAFE.setting
09:34 tadzik I'd expect some Big Name on the first comment :)
09:34 moritz so, not me :-)
09:34 tadzik oh, I disagree :)
09:35 moritz rakudo: callframe(1)<&open>('README', :r).get.say
09:35 p6eval rakudo 15813b: OUTPUT«Method 'at_key' not found for invocant of class 'CallFrame'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:931␤  in <anon> at /tmp/uFH92hjX2D:1␤  in <anon> at /tmp/uFH92hjX2D:1␤␤»
09:35 moritz rakudo: callframe(1).my<&open>('README', :r).get.say
09:35 p6eval rakudo 15813b: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any'␤  in <anon> at src/gen/Metamodel.pm:2761␤  in <anon> at /tmp/8rs9JKDfTb:1␤  in <anon> at /tmp/8rs9JKDfTb:1␤  in <anon> at /tmp/8rs9JKDfTb:1␤␤»
09:35 moritz rakudo: callframe(2).my<&open>('README', :r).get.say
09:35 p6eval rakudo 15813b: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Any'␤  in <anon> at src/gen/Metamodel.pm:2761␤  in <anon> at /tmp/CkGXJvU3_5:1␤  in <anon> at /tmp/CkGXJvU3_5:1␤  in <anon> at /tmp/CkGXJvU3_5:1␤␤»
09:36 moritz for 0..10 { say $_; say callframe($_).my<&open>; }
09:36 moritz rakudo: for 0..10 { say $_; say callframe($_).my<&open>; }
09:36 p6eval rakudo 15813b: OUTPUT«0␤Any()␤1␤Any()␤2␤Any()␤3␤Any()␤4␤Any()␤5␤​Any()␤6␤Any()␤7␤Any()␤8␤Any()␤9␤Any()␤10␤Any()␤»
09:36 snarkyboojum moritz: do you have anything like watching requests to p6eval and locking out on suspicious behaviour? :)
09:36 moritz snarkyboojum: I have a tail -f on the log file running
09:36 moritz though I don't watch it permanently, having a life and all :-)
09:37 snarkyboojum moritz: though any such "second guessing" is bound to be annoying :) - ah tail -f
09:37 * masak .oO( note to self: conduct attack while moritz is asleep )
09:37 moritz oh, I'd need to look outwards the lexical chain, not the call chain
09:37 lumi__ joined #perl6
09:37 masak so, OUTER::
09:38 moritz which is NYI
09:38 jnthn rakudo: say ("Tadeusz Sośnierz", "Moritz Lenz").max({ .chars }) ~ " is a bigger name"
09:38 p6eval rakudo 15813b: OUTPUT«Tadeusz Sośnierz is a bigger name␤»
09:38 jnthn tadzik: See! ^^
09:38 masak :D
09:39 tadzik oh you :)
09:39 masak don't use string concat where a comma would work :)
09:39 jnthn masak: hangover from non-spacey days :)
09:40 masak "non-spacey"?
09:40 JimmyZ joined #perl6
09:40 jnthn b: say 'a', 'b'
09:40 p6eval b 1b7dd1: OUTPUT«ab␤»
09:40 jnthn rakudo: say 'a', 'b'
09:40 p6eval rakudo 15813b: OUTPUT«ab␤»
09:40 moritz b: say 'a', ' b';
09:40 p6eval b 1b7dd1: OUTPUT«a b␤»
09:40 jnthn oh huh, I thought we put spaces in :)
09:40 masak different rules between Lists and Parcels, friend :)
09:40 jnthn darn
09:40 masak yeah.
09:41 jnthn Where do I go to learn Perl 6?
09:41 masak I discovered this too recently.
09:41 masak thing is, I *really*, really like the way it fell out.
09:41 jnthn And yes, of course I could put a space at the start of the string :)
09:41 masak even if we now have this inexplicable .gist method everywhere...
09:41 jnthn Well, .gist is quite good output for gisting :P
09:42 tadzik ohh
09:42 tadzik use Github::Gist could overload the default .gist to paste code and output to gist :P
09:42 jnthn :D
09:42 snarkyboojum moritz: how much overhead would be required to launch a separate virtualised/sandboxed eval environment on each request to p6eval :D
09:43 moritz too much for that machine
09:44 * masak re-reads the "defensive copying" p6l thread and tries not to get mad at Darren Duncan for being so crazy
09:44 snarkyboojum moritz: definitely, I was thinking of getting creative with EC2 :)
09:44 moritz snarkyboojum: does EC2 allow IRC?
09:44 moritz (lots of hosting services don't; fear of botnets)
09:44 tadzik okay, the First Comment is submitted. You can start submitting yours now :)
09:45 snarkyboojum moritz: IRC is just an open port no?
09:45 M_o_C_ joined #perl6
09:45 masak Darren: "let's make everything immutable". moritz: "we probably shouldn't change everything, it's 2011". Darren: "fine, you do what you like, and I'll work on my perfect dream project which doesn't have a 'hello world' implementation yet"
09:46 snarkyboojum moritz: EC2 is infrastructure as a service.. no platform restrictions - you can do what you like on it (within reason)
09:46 moritz "we probably shouln't turn Perl 6 into Haskell"
09:47 lumi__ joined #perl6
09:47 masak also, "it doesn't help with the problem at hand"
09:52 robinsmidsrod joined #perl6
09:57 lumi__ joined #perl6
09:57 lichtkind joined #perl6
10:00 tadzik oh, gsoc code samples
10:03 JimmyZ joined #perl6
10:06 lumi__ joined #perl6
10:07 lichtkind rakudo: my @a = 2..5;my $b = [|](all(2..5)> 1); say $b;
10:08 p6eval rakudo 15813b: OUTPUT«any(all(True, True, True, True))␤»
10:08 lichtkind i thought i get just a true
10:08 masak lichtkind: why did you think that?
10:08 masak lichtkind: [|] doesn't collapse a junction.
10:08 masak rather the reverse.
10:08 moritz [||] would produes that, I hope
10:09 moritz rakudo: my @a = 2..5;my $b = [||](all(2..5)> 1); say $b;
10:09 p6eval rakudo 15813b: OUTPUT«all(True, True, True, True)␤»
10:09 moritz *produce
10:09 masak just prefix:<?> it, for blog's sake.
10:09 lichtkind rakudo: my @a = 2..5;my $b = [||](all(2..5)> 1); say $b;
10:09 p6eval rakudo 15813b: OUTPUT«all(True, True, True, True)␤»
10:09 moritz oh, [||] of a single item is just identity
10:09 moritz masak: so
10:09 masak or so.
10:10 flussence rakudo: say ?(True & True)
10:10 p6eval rakudo 15813b: OUTPUT«Bool::True␤»
10:10 flussence oh, that's useful to know
10:10 dalek nqp: c6f6882 | jonathan++ | / (7 files):
10:10 dalek nqp: Add archetypes to the various NQP meta-objects.
10:10 dalek nqp: review: https://github.com/perl6/nqp/commit/c6f68825f9
10:10 * flussence could never figure out how to get simple values out of junctions
10:10 Trashlord joined #perl6
10:11 jnthn flussence: You're kinda not meant to...
10:11 robinsmidsrod joined #perl6
10:11 flussence I know, but what are they good for when you can't? :)
10:11 moritz as matchers.
10:11 moritz and there's a trick, y'know
10:12 moritz rakudo: sub eigen(Mu $j) { my @e; (sub f($x) { @e.push($x) }).($j) }; say eigen(1|2|3)
10:12 p6eval rakudo 15813b: OUTPUT«any(1, 1, 2, 1, 2, 3)␤»
10:12 moritz huh.
10:12 moritz b: sub eigen(Mu $j) { my @e; (sub f($x) { @e.push($x) }).($j) }; say eigen(1|2|3)
10:13 p6eval b 1b7dd1: OUTPUT«any(1, 2, 3)␤»
10:13 moritz b: sub eigen(Mu $j) { my @e; (sub f($x) { @e.push($x) }).($j); @e }; say eigen(1|2|3)
10:13 p6eval b 1b7dd1: OUTPUT«123␤»
10:13 moritz rakudo: sub eigen(Mu $j) { my @e; (sub f($x) { @e.push($x) }).($j); @e }; say eigen(1|2|3)
10:13 flussence ooh, clever.
10:13 p6eval rakudo 15813b: OUTPUT«1 2 3␤»
10:13 moritz there you go
10:13 lumi__ joined #perl6
10:13 flussence moritz++
10:14 tadzik Google has a funny definition of friday
10:14 tadzik Friday, 12 September 2011: 19:00 UTC (12:00 noon Pacific Time)
10:14 tadzik
10:14 tadzik "Soft" deadline for student code sample submission
10:14 tadzik Friday, or 12 September? :P
10:14 moritz yes.
10:15 tadzik touche
10:17 masak Google all switched to the Julian calendar.
10:18 flussence or the deadline's for year 2011 + 2**32...
10:19 lumi__ joined #perl6
10:21 bbkr_ how aften is modules.perl6.org refreshed?
10:21 masak in nom, in the REPL, when I define a class, I get a "Use of uninitialized value in string context" warning.
10:21 masak I want to submit an RT ticket about this. any objections?
10:22 jnthn masak: I can see why it happens and I don't know the best fix off hand, but it's decidedly LTA. So please RT it.
10:22 flussence can reproduce here... didn't this used to return "_block\d+"?
10:22 moritz well, it's supposed to return the type object
10:22 moritz which warns on stringification
10:22 jnthn moritz: It does.
10:22 jnthn Right.
10:22 jnthn It's doing the "right thing"
10:22 moritz maybe the REPL should really .gist
10:22 jnthn It's just that the right thing is a tad annoying. :)
10:23 jnthn moritz: ooh! That would do it...
10:23 * masak submits rakudobug
10:24 dalek rakudo/nom: ae8a6dd | moritz++ | src/SAFE.setting:
10:24 dalek rakudo/nom: forbid mkdir in SAFE.setting
10:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ae8a6dd767
10:26 tadzik bbkr_: at least once an hour I suppose
10:26 flussence I wonder if linux's seccomp would be useful for safe mode - once you switch it on, every syscall except read/write/exit is blocked by the OS.
10:29 moritz that's too restrictive for us
10:29 moritz the compiler is allowed to open() files for one
10:32 lumi__ joined #perl6
10:32 flussence (hm, it might be useful for try.rakudo though... if I can figure out how to do the seccomp call after the REPL starts up)
10:33 im2ee joined #perl6
10:34 moritz with NCI, once that's work
10:34 moritz ie you inject a bit of p6 code (before the user's code) that does the NCI call
10:34 moritz *once that works
10:38 dalek rakudo/nom: 1ff410a | jonathan++ | tools/build/NQP_REVISION:
10:38 dalek rakudo/nom: Bump NQP_REVISION to get archetypes patch.
10:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ff410a06d
10:38 dalek rakudo/nom: 9a0650a | jonathan++ | src/Perl6/Metamodel/ (3 files):
10:38 dalek rakudo/nom: Make roles inheritalizable; implement inheritalize (which just returns the pun), so class Foo is SomeRole { } works again.
10:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a0650ace9
10:38 dalek rakudo/nom: 8c9dd1a | jonathan++ | src/core/traits.pm:
10:38 dalek rakudo/nom: Catch invalid inheritance/composition operations, and fill out support for types that know how to produce inheritable/composable types.
10:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8c9dd1af6d
10:43 lumi__ joined #perl6
10:44 dalek rakudo/nom: 21089d9 | jonathan++ | src/Perl6/Metamodel/RolePunning.pm:
10:44 dalek rakudo/nom: Only make a pun once.
10:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/21089d981d
10:44 masak just sent a long summary of the "defensive copy" thread to p6l.
10:45 jnthn spectests++ # catching my silly bugs
10:45 tadzik jnthn: commited that? Unbelievebale
10:45 tadzik s/':'/' '/
10:47 flussence rakudo: sub a(Str $_ is copy) { s/foo/bar/ }; say a('foo')
10:47 p6eval rakudo 15813b: OUTPUT«bar␤»
10:47 masak I'd be very interested in hearing of perceived problems with the rw/non-rw approach I outline in the email.
10:47 flussence ooh, didn't realise that worked
10:48 masak flussence: you prolly want 'Cool', not 'Str', though :)
10:48 flussence good point, I tend to be far too strict with my types...
10:49 * masak wonders whether 'is copy' should make descendant references rw or non-rw...
10:49 jnthn tadzik: It still leaves room to make lots of *different* puns :P
10:50 tadzik but compose them only once :P
10:50 jnthn Well, we don't compose puns. That's the point of them - to use a role in a non-compositional context.
10:51 jnthn We *almost* pass S14-role/instantiation.t again...but I need to do next $hard-thing first...
10:53 masak lol audreyt https://twitter.com/audreyt​/status/112031008257359872
10:53 lumi__ joined #perl6
10:53 tadzik :P
10:53 tadzik so I.pm is the next step?
10:53 tadzik Naah
10:54 flussence ''.pm!
10:55 bbkr_ tadzik: is there any log from refreshing modules.perl6.org available? MongoDB is still not there (added 3 days ago). I've checked META.info (valid json) and link to repo. No idea why it is not showing up.
10:58 ab5tract joined #perl6
11:02 * masak really likes https://twitter.com/CompSciFa​ct/status/111827420604145664
11:06 tadzik bbkr_: you can try running the perl script from the modules.perl6.org repo and see if it fails and why
11:07 lumi__ joined #perl6
11:21 lumi__ joined #perl6
11:32 moritz bbkr_: there is a log, though not public. I'll look into it.
11:32 bbkr_ tadzik: thanks for pointing me to the right direction. i've run script and it processed whole list without problems (99 ok, 0 fail). and new Mongo module is present in generated index.html file. so I have no idea what failed
11:32 bbkr_ moritz: thanks
11:33 lumi__ joined #perl6
11:34 replore joined #perl6
11:34 Psyche^ joined #perl6
11:34 moritz seems the log file didn't capture the relevant information :(
11:35 * moritz reruns
11:36 moritz 72 MongoDB
11:36 moritz Updated since last check
11:36 moritz MongoDB driver
11:36 moritz let's see if it shows up when that thing is finished
11:37 moritz ok - 99
11:37 moritz nok - 0
11:37 bbkr_ it's visible now
11:37 bbkr_ thanks
11:37 moritz seems that the cronjob entry somehow doesn't really work
11:40 pmichaud good morning, #perl6
11:41 moritz good am, pm
11:41 bbkr_ How about providing "Last update on: ..." info on this page (maybe somewhere in footer)? This will show immediately if update is stuck.
11:41 moritz bbkr_: that would be a very good idea
11:41 moritz bbkr_: if you get around to it, the code is in the modules.perl6.org repo in web/build-project-list.pl
11:42 moritz if not, I'll do it eventually, just no promises when that will be
11:42 jnthn morning, pmichaud
11:42 bbkr_ moritz: i will add it during weekend
11:42 moritz ++bbkr_
11:44 bbkr_ which timezone is the server in?
11:44 moritz CEST
11:44 bbkr_ ok
11:45 moritz though displaying it with perl's gmtime() would be the most sensible, I think
11:46 moritz "Only make a pun once." # from jnthn++'s last commit message
11:46 moritz what if there's a difference audience the second time? :-)
11:47 lumi__ joined #perl6
11:47 moritz fwiw apache2 has a security update, which I'm going to install right now on feather2
11:48 moritz which means a short downtime for *.perl6.org and related services
11:48 moritz feel informed and warned
11:48 flussence should be only about 10 seconds, if we're lucky :)
11:49 moritz I think it was about 5
11:50 flussence \o/
11:52 flussence (OTOH, I'm not fond of the way Debian messes with services directly from the package manager - that could be 0 seconds if done right...)
11:53 moritz well, it seems that Debian isn't directly targeted at servers
11:53 moritz for example they do things like automatically enabling services when you install them
11:53 flussence that's the one thing I *really* don't like...
11:53 moritz imagine you accidentally enable a DHCP server that way in a big corp network *shudder*
11:54 flussence I think I've done that before at $dayjob :)
11:54 moritz OTOH the typical customer would think "I've installed that stupid thing, why isn't it running?" if it were otherwise
11:54 flussence (fortunately it's not a big enough network to matter...)
11:57 plobsing moritz: do you expect a lightbulb to be already running after you install it?
11:58 moritz plobsing: if I don't do the install by hand (but via Building Manager), maybe
11:59 george_z0rwell joined #perl6
12:03 lumi__ joined #perl6
12:06 hugme joined #perl6
12:09 pmurias joined #perl6
12:11 pmurias moritz: is there anything important on the evalbot box? (besides the evalbot)
12:12 pernatiy joined #perl6
12:12 moritz pmurias: you'd have to ask diakopter, but nothing too important, I think
12:16 moritz it seems I've fixed the module.perl6.org updating script
12:17 lumi__ joined #perl6
12:18 masak hugme: hug hugme
12:18 * hugme hugs hugme
12:19 pmichaud Can I delete the old/ subdirectory from the nom branch?
12:19 jnthn pmichaud: yes
12:19 masak hugme: hug hugme hugs hugme
12:19 * hugme hugs hugme hugs hugme
12:19 ab5tract joined #perl6
12:19 masak :)
12:20 moritz rakudo: sleep 1
12:20 p6eval rakudo 21089d: OUTPUT«Could not find sub &sleep␤  in <anon> at /tmp/zXOTnYBREl:1␤  in <anon> at /tmp/zXOTnYBREl:1␤␤»
12:20 moritz LHF
12:20 masak ok, I'll do that one :)
12:20 moritz ++masak
12:20 jnthn :)
12:21 * jnthn finishes nomming lunch and gets back to sorting out the role type checking stuff
12:21 dalek rakudo/nom: c8ebd81 | pmichaud++ | src/old/ (142 files):
12:21 dalek rakudo/nom: Remove the we-have-not-needed-it-for-a-long-time old/ subdirectory.
12:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c8ebd81c2b
12:21 pmichaud rakudo: lunch 1
12:21 p6eval rakudo 21089d: OUTPUT«Could not find sub &lunch␤  in <anon> at /tmp/ZNVok77nv0:1␤  in <anon> at /tmp/ZNVok77nv0:1␤␤»
12:22 tadzik nom: business time
12:22 p6eval nom 21089d: OUTPUT«Could not find sub &business␤  in <anon> at /tmp/A1AI9KA7s8:1␤  in <anon> at /tmp/A1AI9KA7s8:1␤␤»
12:22 jnthn :P
12:22 jnthn nom: marine
12:22 p6eval nom 21089d: OUTPUT«Could not find sub &marine␤  in <anon> at /tmp/WnLPGBUlQQ:1␤  in <anon> at /tmp/WnLPGBUlQQ:1␤␤»
12:23 masak can I put &sleep in src/core/control.pm? it used to be in src/core/system.pm in b, but there's no such file in nom.
12:24 moritz masak: +1
12:24 masak also, &shell formerly known as &run already seems to have done a similar jump.
12:24 masak very well. I'll make it so.
12:28 pmichaud control.pm is fine, yes.
12:29 tadzik masak: you'll probably be able to uncomment a few tests with this
12:29 masak tadzik: I found t/S29-context/sleep.t
12:30 jnthn INET.pm also depends on sleep
12:30 tadzik masak: ...what jnthn said
12:30 lumi__ joined #perl6
12:30 masak oh, right.
12:30 jnthn And sockets should otherwise work
12:30 masak I saw that one but didn't pay any mind.
12:30 masak will try that one too, then.
12:30 tadzik it fails for different reasons, but at least it'll run now :)
12:30 masak \o/
12:30 moritz doesn't it need Buf?
12:31 jnthn Aww.
12:31 tadzik I suppose it does
12:31 masak rakudo: say Inf
12:31 p6eval rakudo 21089d: OUTPUT«Inf␤»
12:31 tadzik maybe nom-buf will fail differently, now that we have parametric roles fixed
12:32 masak rakudo: say Inf ~~ Inf
12:32 p6eval rakudo 21089d: OUTPUT«Bool::True␤»
12:32 tadzik nom: say NaN ~~ NaN
12:32 p6eval nom 21089d: OUTPUT«Bool::False␤»
12:32 tadzik oh?
12:33 moritz nom: say NaN == NaN
12:33 p6eval nom 21089d: OUTPUT«Bool::False␤»
12:33 pmichaud b: say Nan ~~ NaN
12:33 tadzik nom: my $a = NaN; say $a ~~ NaN
12:33 p6eval b 1b7dd1: OUTPUT«Could not find sub &Nan␤  in main program body at line 22:/tmp/Y9NU82rvhQ␤»
12:33 p6eval nom 21089d: OUTPUT«Bool::False␤»
12:33 moritz nom: say Inf == Inf
12:33 p6eval nom 21089d: OUTPUT«Bool::True␤»
12:33 pmichaud b: say NaN ~~ NaN
12:33 p6eval b 1b7dd1: OUTPUT«Bool::True␤»
12:33 masak b: say NaN == NaN
12:33 p6eval b 1b7dd1: OUTPUT«Bool::False␤»
12:33 jnthn If we want that to work I guess we hvae to special-case it.
12:33 jnthn As NaN == NaN is meant to be false.
12:33 masak b is correct here.
12:33 pmichaud nom: say NaN == NaN
12:33 p6eval nom 21089d: OUTPUT«Bool::False␤»
12:33 pmichaud nom is correct on ==
12:34 jnthn Does spec want NaN ~~ NaN to be true?
12:34 jnthn I guess ~~ is meant to be smart. :)
12:34 tadzik I won't like it to outsmart me :)
12:35 masak oh, nom doesn't have Inf?
12:35 masak I see a lot of $Inf workaround in src/core
12:35 tadzik no, jnthn fixed the compilation time :>
12:35 pmichaud $Inf may be fossil
12:35 flussence rakudo: say (Inf > 2**32)
12:35 p6eval rakudo 21089d: OUTPUT«Bool::True␤»
12:35 flussence rakudo: say (Inf > 2**64)
12:35 p6eval rakudo 21089d: OUTPUT«Bool::True␤»
12:35 flussence rakudo: say (Inf > 2**128)
12:35 p6eval rakudo 21089d: OUTPUT«Bool::True␤»
12:35 flussence seems to work
12:35 pmichaud it used to be that nom had Inf at runtime but not at setting compile-time
12:35 moritz .oo( rakudo is rather stubborn )
12:35 pmichaud I don't know if that's still the case.
12:35 flussence rakudo: say (Inf + 1 > Inf)
12:35 masak pmichaud: gettomg "error:imcc:undefined identifier 'Inf'" when compiling my &sleep patch.
12:35 p6eval rakudo 21089d: OUTPUT«Bool::False␤»
12:36 masak pmichaud: &sleep defaults to Inf. lexical scoping issues?
12:36 moritz masak: use $Inf instead
12:36 pmichaud setting may still require $Inf
12:36 masak ok.
12:36 masak that's what I suspected.
12:36 pmichaud masak: setting-compile-time constant issues, perhaps
12:36 jnthn Bootstrapping is hard. News at 11. :)
12:37 pmichaud spectests say that NaN ~~ NaN  should be true  (as beijing has it)
12:37 masak rakudo: constant bleep_bloop = 42; say "alive"
12:37 p6eval rakudo 21089d: OUTPUT«alive␤»
12:37 masak \o/
12:37 masak I could tackle the NaN ~~ NaN thing, too. if no-one else wants to.
12:37 pmichaud might check to see how beijing handled it
12:38 masak nod
12:38 pmichaud ("beijing" is too much to type.  I'm going back to "ng" for a while.)
12:38 tadzik (:
12:38 * masak feels like the green dinosaur in the last panel of Dinosaur Comics, discovering how much fun Perl 6 Day is: "guys, this *rocks*!"
12:39 pmichaud what should be the best way to create a Failure but not immediately return?
12:39 tadzik nom-buf still fails
12:39 moritz pmichaud: Failure.new?
12:39 moritz sub { fail() }.()
12:39 pmichaud I'll do sub { fail() }  for now
12:40 pmichaud I agree Failure.new should work, but building the exception is being a bit of a pain-ish.
12:41 masak sleep.t passes locally.
12:43 masak IO-Socket-INET.t fails 17 out of 17, but it runs to completion.
12:44 masak someone++ nicely annotated the failures in t/spectest.data
12:44 masak only those two test files mention &sleep
12:45 * masak uncomments sleep.t for now
12:45 Trashlord joined #perl6
12:45 lumi__ joined #perl6
12:48 moritz masak++ # p6l mail
12:48 masak commit's away!
12:48 moritz though I admit I've just wrote a reply before I've finished reading masak's p6l mail
12:48 dalek rakudo/nom: ac4d97c | masak++ | / (2 files):
12:48 dalek rakudo/nom: [src/core/control.pm] add &sleep
12:48 dalek rakudo/nom:
12:48 dalek rakudo/nom: It's the same as in Beijing, modulo $Inf hack.
12:48 dalek rakudo/nom:
12:48 dalek rakudo/nom: Also, uncommented sleep.t in spectest.data.
12:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac4d97cb71
12:49 moritz because a thought struck me that scared me of the 'immutability all the way down'
12:49 tadzik masak: could you fix the IO::S::INET failure reason as well?
12:50 masak moritz: your objection indeed seems to make sense.
12:50 jnthn sleep. It's the same as in Beijing.
12:50 pmichaud pir::sleep__vN(1e16) while True;
12:50 pmichaud might want some unboxing here.
12:51 moritz not necessary
12:51 masak tadzik: 'Type check failed in assignment to '$!listen'; expected 'Int' but got 'Bool'' seems to be the immediate reason. but I'd rather do the NaN ~~ NaN thing first.
12:51 pmichaud well, if we don't unbox we go through the vtable
12:51 tadzik masak: fair enough
12:51 moritz 1e16 becomes a Num that automatically unboxes due to Past::Want
12:51 pmichaud okay, then the next line
12:51 pmichaud +        pir::sleep__vN($seconds);
12:51 masak pmichaud: you feel a pressing need to optimize &sleep? 1/2 :P
12:52 pmichaud masak: it's not optimization so much as rigor
12:52 moritz that might need a decontainerize
12:52 masak oh, well then.
12:52 pmichaud I think we had decided we didn't want to rely on vtables
12:52 masak ah.
12:52 jnthn They'll make our life harder for porting later.
12:52 moritz pmichaud: I don't think it goes through a vtable
12:52 moritz see above
12:52 pmichaud moritz: I'm certain the $seconds one has to
12:53 moritz yes, that one needs to
12:53 jnthn moritz: The 1e16 one won't. The $seconds one probably does.
12:54 masak moritz: indeed, your p6l objection is very sobering -- and that wasn't at all the effect I was shooting for. maybe this is where sorear++'s complications rear their head. :/
12:54 masak it felt like a clean solution when I was just looking at part of the problem... :)
12:54 moritz "only make it immutable where I want it to"
12:54 moritz :-)
12:55 masak yeah! how hard could that be? :P
12:57 lumi__ joined #perl6
12:57 pmichaud I think that as long as we have mutable objects, we end up with leaky encapsulation.  I haven't seen a way to resolve that.
12:58 moritz afaict only Haskell gets that "right", but that's now what we want Perl 6 to become
12:58 moritz /now/not/
12:58 moritz s/^/s/ # :-)
12:58 Holy_Cow joined #perl6
12:58 masak moritz: the Little Animal Farm case is perhaps educational. strict encapsulation is very important, because the fairness of the contest depends on contestants not being able to break the invariants of the Game class.
12:58 masak moritz: (yes, I know .HOW could help break them anyway. that's cheating.)
12:59 jnthn Well, part of it is about the contract you make with the outside world.
12:59 PerlJam good morning #perl6
12:59 masak morning, PJ
13:00 jnthn For example, whenever you request some information from a meta-object, it may be handling you back the real, mutable thing, which means you can screw up its internal state. The contract for working with meta-objects is "look but don't touch".
13:00 jnthn o/ PerlJam
13:00 moritz good am, pj
13:00 jnthn *handing
13:00 Sarten-X joined #perl6
13:00 PerlJam leaky encapsulation day?
13:00 masak pmichaud: the arrays an hashes shared by Game are all "mutable objects", but the requirement on them for not leaking internal references feels very straightforward. will I spend the rest of my life sighing and correcting juniors' leaky OO code?
13:01 Holy_Cow left #perl6
13:01 am0c joined #perl6
13:01 pmichaud masak: clearly we're able to accomplish a lot of stuff with leaky encapsulation.  See p5.  :-)
13:01 moritz masak: maybe the real answer is that we make it too hard to construct immutable data structures in the first place
13:01 masak jnthn: that's a good point. a class may *choose* not to copy defensively due to performance concerns. it may not be purely pure OO, but it works IRL.
13:02 jnthn masak: How much of your life do you spend doing that today when working with non-Haskell-programming juniors? :)
13:02 sftp joined #perl6
13:02 bluescreen10 joined #perl6
13:02 masak moritz: it's not too much that I want the data structures immutable in this case. it's that I want the clients to get "safe" data structures by default.
13:02 jnthn masak: I'm not sure what you mean by "purely pure OO" :)
13:02 masak jnthn: I mean caring more about invariants than about performance.
13:03 Reaganomicon joined #perl6
13:03 masak sometimes, the invariants *are* more important.
13:03 masak Game is an example of that.
13:03 pmichaud I don't know that a feature of "OO" has ever been that we'd have objects with non-modifiable state, fwiw.
13:03 masak sometimes, performance is more important. the MOP is an example of that.
13:03 masak pmichaud: not my point.
13:04 jnthn To what degree is this to do with OO, and to what degree is this just a mutability/data hiding issues?
13:04 masak pmichaud: my point is that the enforcing of invariants is all tied up in securing one's public mutable data structures.
13:04 jnthn "just" :)
13:05 jnthn masak: If performance isn't a concern and the invariants are, why not clone?
13:05 moritz masak: one could reason that it violates encapsulation to expose parts of the internal state of the object without copying, and yet you do that, and hope that it's save
13:05 masak jnthn: I create objects *because* I want to locally enforce invariants.
13:05 pmichaud I wonder if  "secure", "public", and "mutable" are exclusive in some sense.
13:05 moritz and that's exactly what you do, pass some parts of self around
13:05 masak jnthn: cloning is what I ended up doing. my point is that I needed to do it in an ad-hoc manner. cf my original mail in the thread.
13:06 masak moritz: right. Damian's point is that that is a crappy default.
13:06 masak he doesn't propose a solution, though.
13:06 moritz masak: and I disagree in my latest mail
13:06 masak pmichaud: ooh, like "pick any two"?
13:06 masak pmichaud: I'd like to see that elaborated.
13:06 moritz immutalizing by default is an equally crappy default
13:06 jnthn masak: Suppose that we (1) had a deep clone mechanism in Perl 6 and (2) had a trait you could put on attribute accessor methods that used it
13:06 pmichaud masak: the phrase "securing one's public mutable data structures" just struck me as odd.
13:07 jnthn masak: To what degree would that help?
13:07 masak jnthn: it would go a long way.
13:07 PerlJam jnthn: "is recursive_read_only"  ?
13:07 masak 'is defensive'
13:07 moritz that makes more sense to me than recursively write-protected arguments and returns
13:07 jnthn PerlJam: No, I'd want it to have a name that made extremely clear that it's copying.
13:08 PerlJam jnthn: "dcopy"?   (deep or defensive, your choice)
13:08 jnthn Some smart person down the road may be able to work out how to make it COW or something.
13:08 masak jnthn: ooh!
13:08 jnthn .oO( Make it COW, so it's not a pig )
13:08 lumi__ joined #perl6
13:09 masak ooh ooh can we go with 'is ersatz'? :)
13:10 masak or 'is replica'
13:10 moritz +(1..Inf).pick
13:10 masak moritz: 42
13:11 moritz +42 it is then to 'is ersatz'
13:11 masak :D
13:11 PerlJam Makes me want a "must" to go with "is" and "does"
13:11 PerlJam sub foo (@array must clone)
13:11 PerlJam or something
13:11 masak PerlJam: there's 'will'
13:12 PerlJam oh, true
13:12 jnthn yeahbut will wants a code block
13:12 * masak .oO( "I don't care what Will says he wants!" )
13:13 moritz why would you disregard [Coke] so blatantly? :-)
13:13 jnthn :P
13:14 masak 可口可乐
13:14 PerlJam Are deep clone and shallow clone the only options?  Is there ever a case where someone would have an N dimensional data set, but only want to confer immutability to N-M dimensions?
13:14 pmichaud fwiw, I'm still toying with the notion of a "deep immutability" flag.
13:14 pmichaud I'm not quite ready to toss that out entirely.
13:16 pmichaud kind of a third option between  return (read only) and return-rw
13:17 pmichaud s/between/beyond/   # perhaps
13:18 jnthn One other challenge here is that we don't currently have a way to say to a data structure "oh hai, are you immutable?"
13:18 pmichaud jnthn: right, it has to be an aspect of container-ness
13:18 jnthn pmichaud: I think it's deeper.
13:18 jnthn nom: 3 does role { method huh { say "oh noes" } }; 3.huh
13:18 moritz containers are easily (and accidentally) stripped
13:19 p6eval nom ac4d97: OUTPUT«oh noes␤»
13:19 pmichaud i.e., some data structure is in a "immutable container", which imposes an immutability constraint on the parts of the structure
13:19 jnthn pmichaud: How does "does" know that it can't do that mixin?
13:19 jnthn It's not a function of containerness.
13:19 moritz the MOP knows it?
13:19 pmichaud jnthn: in that case you're trying to modify the object, not its container.
13:19 jnthn moritz: HOw?
13:19 jnthn pmichaud: Right
13:19 jnthn That's my point.
13:19 jnthn I don't have a way to ask an object if it's mutable or not.
13:20 moritz jnthn: good question
13:20 pmichaud jnthn: why is that modification bad, ooc?
13:20 pmichaud I mean, how does what you just wrote destroy immutability?
13:20 moritz and it would be very useful to have ways to make user-defined classes with immutable objects
13:20 jnthn pmichaud: Note that I managed to change a literal ;)
13:20 moritz pmichaud: action at a distance
13:20 pmichaud you changed its behavior but not its value.
13:21 jnthn pmichaud: Well, hm :)
13:21 moritz that's like an augment, except the 'use MONKEY_PATCHING' part
13:21 moritz erm, TYPING
13:21 pmichaud and is what you just did legal p6, anyway?
13:21 moritz I hope not
13:21 jnthn pmichaud: My guess is "no"
13:22 pmichaud me too
13:22 jnthn pmichaud: My question is "how do we know not to allow it?"
13:22 moritz nom: 3 does role { method huh { say "oh noes" } }; 2.huh
13:22 p6eval nom ac4d97: OUTPUT«Method 'huh' not found for invocant of class 'Int'␤  in <anon> at /tmp/t7HcCTf2w4:1␤  in <anon> at /tmp/t7HcCTf2w4:1␤␤»
13:22 pmichaud jnthn: "not to allow" has to be a runtime check
13:22 jnthn Also spooky
13:22 jnthn nom: 3 does role { method huh { say "oh noes" } }; eval '3.huh'
13:22 p6eval nom ac4d97:  ( no output )
13:22 moritz because it has a different $*ST?
13:23 pmichaud and in the case of method mixins, it's not that we disallow the mixin, it's that we throw an exception for any mixin that attempts to violate our immutability container constraint
13:23 jnthn (Because we don't share constant tables that aggresively)
13:23 moritz so it's a different 3?
13:23 jnthn moritz: Right. It'll be extremely variable between implementations.
13:23 jnthn moritz: We never hit this in master because it didn't really have constants
13:23 jnthn pmichaud: Yes, it's certainly runtime.
13:23 pmichaud well, ng has constants, they just weren't shared to the degree they are in nom
13:23 moritz nom: 3 does role { method huh { say "oh noes" } }; (1+2).huh
13:23 p6eval nom ac4d97: OUTPUT«Method 'huh' not found for invocant of class 'Int'␤  in <anon> at /tmp/LRlL_KicrZ:1␤  in <anon> at /tmp/LRlL_KicrZ:1␤␤»
13:24 moritz nom: say 3 === 3
13:24 p6eval nom ac4d97: OUTPUT«Bool::True␤»
13:24 moritz nom: say 3 === (1 + 2)
13:24 p6eval nom ac4d97: OUTPUT«Bool::True␤»
13:24 jnthn pmichaud: Well, we could check that one at compile time I suspect. But in general it's runtime.
13:24 lumi__ joined #perl6
13:24 pmichaud jnthn: what I'm trying to get it is a new form of container (more)
13:25 pmichaud we already have the case where we create anonymous containers for values (e.g., during binding)
13:25 pmichaud and we do this because we need to preserve some set of flags or information
13:25 pmichaud and we have to clone a container (not its value contents) to preserve the flags
13:26 pmichaud let me see if I can describe what I'm toying with
13:26 pmichaud (via an example)
13:27 pmichaud suppose we have an Object in a container $a, where $a has been marked with the "deep immutable" flag
13:27 PerlJam .oO( "shape of ... an object"  "form of ... an immutability container")
13:29 pmichaud anytime we do $a.method(), the "deep immutable flag" imposes constraints on accesses to its attributes.  In particular, $!private ends up being wrapped in an immutability container prior to any operation being performed on it.  (more)
13:29 pmichaud Yes, I realize this has implications for where we do decontainerization presently, but that's pretty much true of any approach we consider that tries to enforce immutability.
13:30 masak yes but what about moritz++' objection?
13:31 pmichaud note it's the attribute access that gets the immutability constraint
13:31 moritz masak: if I understood pmichaud++ correctly, he first wants to offer an option, not make it the default
13:31 jnthn pmichaud: Essentially as we "recurse" into a data structure, we containerize things with an immutability marker on the way down?
13:31 pmichaud yes
13:31 pmichaud and only attributes
13:31 pmichaud not all arguments / return values
13:31 wamba joined #perl6
13:31 masak oh!
13:32 masak that makes sense.
13:32 pmichaud here's an example:
13:33 pmichaud class Dog { has @!legs; method legs() { @!legs } };
13:33 pmichaud as written, someone can use  $fido.legs  to modify legs
13:33 masak aye.
13:33 pmichaud however, if $fido is a container with deep immutability, they won't be able to
13:33 pmichaud because @!legs would end up being wrapped in a container with deep immutability
13:34 masak right. that's essentially what I propose in my email earlier today.
13:34 pmichaud and if you attempt to do something to @!legs that causes one of its attributes to be modified, an exception will be thrown.
13:34 flussence .oO( plaster-cast(@!legs) )
13:34 masak but my focus was on arrays and hashes, not objects.
13:34 pmichaud it's all objects.
13:34 masak right.
13:34 moritz that's how I imagine taint checking to work too
13:34 pmichaud even arrays and hashes in nom have private attributes.
13:35 masak the parallel with taint checking is interesting, yes.
13:35 jnthn pmichaud: It feels fairly workable, when you put it that way.
13:35 PerlJam pmichaud: so, could you show an example with an array?
13:35 pmichaud PerlJam: Didn't I just do that?  ;-)
13:35 moritz @!legs is the array
13:35 lumi__ joined #perl6
13:36 moritz we'd just to be careful not create too many container objects, that would be very costly
13:36 pmichaud less costly than deep clones, though.
13:36 pmichaud and definitely lazy.
13:36 pmichaud and we don't have to deal with identity issues that deep cloning present.
13:36 masak b: say Int ~~ Real
13:36 pmichaud *presents
13:36 p6eval b 1b7dd1: OUTPUT«Bool::True␤»
13:36 masak rakudo: say Int ~~ Real
13:36 p6eval rakudo ac4d97: OUTPUT«Bool::True␤»
13:36 jnthn Well, the other thing to keep in mind is that attributes can only be accessed in the lexical scope they're decalred in.
13:37 PerlJam I meant more like  sub foo (@array is deeply_immutable) { @array[6][9] = 42;  }   ... where does the mechanism take effect?
13:37 jnthn We could actually give them an immutability container from the get go
13:37 moritz PerlJam: @array[6] compiles to a method call
13:37 pmichaud PerlJam: @array is the container with the deeply_immutable flag.
13:37 pmichaud ultimately it gets down to @array.at_pos
13:37 jnthn And have actual attribute accesses within the class code-gen a stripping operation when they compile an attribute access.
13:37 pmichaud which then resorts to the case I gave above
13:37 moritz so the return value from @array[6] has that flag too
13:37 masak why is Int ~~ Real true in nom? it just says 'my class Int' in the class declaration.
13:37 pmichaud masak: bootstrap
13:37 PerlJam aye, okay.  I'm a little slow this morning :)
13:37 moritz masak: BOOTSTRAP.pm
13:38 masak oh ah.
13:38 pmichaud masak: the inheritance for fundamental types is in bootstrap
13:38 pmichaud if someone wants to switch Real to be a role I'd be fine with that :)
13:38 pmichaud I think where at the point where that can happen
13:38 moritz pmichaud: last time I tried I ran into ugly problmes
13:38 pmichaud *we're
13:39 pmichaud moritz: okay, maybe I'll give it a shot so I can understand the issues
13:39 jnthn Given I'm in the middle of doing stuff with roles, maybe better to hold off at least for today.
13:39 pmichaud maybe I'll hold off at least for today
13:39 masak my stub Int metaclass Perl6::Metamodel::ClassHOW { ... };
13:39 masak whoa.
13:39 masak "not your grandfather's Perl 6."
13:39 pmichaud "these aren't the roles I'm looking for.  Move along."
13:39 moritz pmichaud: if I had the choice, I'd rather see you working on regex bits :-)
13:40 masak 'my *stub* Int *metaclass*'???
13:40 pmichaud moritz: yeah, I'm looking for my regex shaped tuits.
13:40 moritz you could regex for the shapes...
13:40 moritz oh wait :-)
13:40 jnthn masak: NQP language extension. :)
13:40 tadzik public enterprise mixin factory ...
13:40 jnthn masak: Read "metaclass" more like a trait.
13:41 flussence all this talk of immutable stuff sounds vaguely like postgresql... it basically enforces something like /sub foo is [pure|immutable|rw]/
13:41 moritz I once met a class...
13:41 masak jnthn: uh, ok.
13:41 jnthn masak: It means "stub a type Int, and do it using metaclass Perl6::Metamodel::ClassHOW"
13:41 masak I'm going to add .isNaN to src/core/Real.pm. any objections? it's in b already.
13:42 masak jnthn: if it's a trait, why doesn't it look like one? :(
13:42 pmichaud I always felt like isNaN was the wrong approach to the problem, but we can adopt it for now.
13:42 jnthn masak: Because it isn't actually one.
13:42 pmichaud (because I'm not sure what the "right approach" looks like)
13:43 masak jnthn: but since it's out-of-band anyway, why not lead the reader down a pleasant garden path?
13:43 pmichaud I think that "stub" and "metaclass" are some of the teeth of our circularity saw.
13:43 jnthn pmichaud: Yes, precisely.
13:44 masak I understand that. I was just talking about dressing the teeth up to look innocent. :)
13:45 jnthn masak: I suspect at the time I had much bigger concerns than figuring out nice syntax for it.
13:45 jnthn masak: I'm also not especially convinced it'll survive.
13:45 masak fair enough.
13:45 * moritz is totally fine with the syntax
13:45 moritz it looks special, and heck, it *is* special
13:46 masak maybe I'll get used to it.
13:46 jnthn iirc, a lot of what it's doing is coping with our current lack of good serialization.
13:46 masak but as a first impression 'metaclass' doesn't say 'using the following metaclass' to me.
13:46 pmichaud sometimes teeth should look menacing.
13:47 masak also agreed.
13:47 lumi__ joined #perl6
13:47 jnthn masak: You'd best go and complain to the CLOS designers too then, for doing similar there :P
13:47 pmichaud would "STUB" and "METACLASS" be better?  ;-)
13:47 PerlJam jnthn: maybe there's a reason masak doesn't use clos?
13:47 masak quite possible.
13:48 masak pmichaud: currently the keywords look like sub calls to me.
13:48 masak listops.
13:48 jnthn masak: Anyway, I agree it's not beautiful. But it's also not in Rakudo.
13:48 jnthn masak: It's parsed by NQP only.
13:48 pmichaud my #`(look out!) stub Int #`(danger!) metaclass .....
13:48 jnthn ;)
13:48 [Coke] masak: ZOMG i actually recognized 可口可乐 from the other day. ;)
13:48 pmichaud or maybe we should be able to decorate with ^^^  somehow :)
13:49 masak I now have NaN ~~ NaN working locally. making spectest Justin Case.
13:49 pmichaud masak++
13:49 masak [Coke]: maybe you were the only one who got the pun, then :P
13:49 jnthn So long as you don't make spectest Justin Beiber...
13:49 pmichaud we have to be careful with NaN handling.  early implementations of it in ng massively slowed down the test suite.
13:49 masak jnthn: at an 800% slower rate... :P
13:49 pmichaud (actually even not-early implementations did that... I fixed it up a bit in February of this year)
13:50 jnthn Dammit, my epic refactor didn't work first time...
13:50 pmichaud I'll be sure to review the commit :)
13:50 benabik_ joined #perl6
13:51 pmichaud if someone wants to add my comments re: immutability to the p6l thread, that'd be great.  I'm not sure how to compose it (and would rather continue my search for regex-shaped tuits)
13:53 pmichaud so far I have     regex TOP { .* <regex-tuit> .* }     and     token regex-tuit { ... }     but there I get a little stuck.  :-P
13:53 pmichaud that ... part needs some work.
13:53 moritz no wonder, slacking off on IRC like this :-)
13:54 flussence could someone :391s/run/shell/ in rakudo/Makefile?
13:54 ab5tract joined #perl6
13:55 masak pmichaud++ # the Hunt for the Regex-Shaped Tuits
13:55 pmichaud I think there might be some over by the couch... I'll look there a short while
13:55 masak flussence: I'll do that.
13:55 pmichaud (I also need a short nap)
13:55 pmichaud bbiaw
13:57 dalek rakudo/nom: 948ca74 | masak++ | tools/build/Makefile.in:
13:57 dalek rakudo/nom: [Makefile.in] s/run/shell/
13:57 dalek rakudo/nom:
13:57 dalek rakudo/nom: flussence++ for fossil spotting.
13:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/948ca744f5
14:00 lumi__ joined #perl6
14:04 SHODAN joined #perl6
14:05 * donri just noticed how similar the whatwg.org and perl6.org designs are
14:05 donri coincidence?
14:06 masak we're *novices* at HTML. what's their excuse? :P
14:07 donri haha
14:07 moritz whatwg is scarily similar to early versions of perl6.org, much more than the current version
14:08 jnthn ...did you see the style sheet? :)
14:08 jnthn body.front-page > a + a + a + a + a + a + a + a + a + a + a + a  { color: black; background: #CCFF99; border-color: #99FF00; }
14:08 moritz is this poetry?
14:09 jnthn :)
14:09 donri looks like perl
14:09 * donri ducks
14:09 masak jnthn: reminds me of this: "What's one and one and one and one and one and one and one and one and one and one?" "I don't know, " said Alice, "I lost count." "She can't do addition," said the Red Queen.
14:09 jnthn There's about 10 lines that look like the above, just different in numbers of "+ a"s ;)
14:09 jnthn masak: hehe
14:09 [Coke] alice++
14:11 lumi__ joined #perl6
14:12 dalek rakudo/nom: 6c2607a | masak++ | src/core/Real.pm:
14:12 dalek rakudo/nom: [src/core/Real.pm] implemented .isNaN
14:12 dalek rakudo/nom:
14:12 dalek rakudo/nom: Same as in Beijing.
14:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c2607ae3a
14:12 dalek rakudo/nom: 88e14a0 | masak++ | src/core/Numeric.pm:
14:12 dalek rakudo/nom: [src/core/Numeric.pm] made NaN ~~ NaN true
14:12 dalek rakudo/nom:
14:12 dalek rakudo/nom: Borrowed the implementation from Beijing.
14:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/88e14a0bdd
14:13 donri obviously 1 & 1 & 1 ad nauseam is 1
14:13 dalek roast: 6a56a35 | masak++ | S02-builtin_data_types/nan.t:
14:13 dalek roast: a few rakudo unfudges
14:13 dalek roast: review: https://github.com/perl6/roast/commit/6a56a354ce
14:13 dalek roast: 56eedd1 | masak++ | S03-smartmatch/disorganized.t:
14:13 dalek roast: [disorganized.t] removed duplicate test
14:13 dalek roast: review: https://github.com/perl6/roast/commit/56eedd1691
14:13 jnthn heh, typical. disorganized test file and a dupe
14:14 masak :)
14:14 * masak goes for a walk in the disgustingly nice weather
14:17 MayDaniel joined #perl6
14:22 SHODAN joined #perl6
14:25 flussence rakudo: sub a(Str $_ is copy) { for q{foo} => q{bar}, q{bar} => q{baz} -> $pair { s/{$pair.key}/{$pair.value}/ }; $_ }; say a('foo')
14:25 p6eval rakudo ac4d97: OUTPUT«bazbarfoo␤»
14:25 flussence huh.
14:26 PacoLinux joined #perl6
14:27 jnthn flussence: {$pair.key} is a closure
14:27 jnthn It just has to return "true" to be considered a successful match.
14:27 jnthn And it does
14:27 jnthn So the regex matches immediately at the start of the string :)
14:28 TimToady actually, doesn't matter what it returns
14:28 jnthn Oh, yeah
14:28 lumi__ joined #perl6
14:28 TimToady you're thinkin' o' <?{...}>
14:28 jnthn It'd neeed to be <?{ ... }> for that.
14:28 jnthn *nod*
14:29 jnthn std: /{ 42 }/
14:29 flussence rakudo: sub a(Str $_ is copy) { for q{foo} => q{bar}, q{bar} => q{baz} -> $pair { s/<?{$pair.key}>/{$pair.value}/ }; $_ }; say a('foo') # like this?
14:29 p6eval std bb4f150: OUTPUT«ok 00:01 119m␤»
14:29 p6eval rakudo ac4d97: OUTPUT«bazbarfoo␤»
14:29 jnthn flussence: Well, you want to match the contents of the variable.
14:30 jnthn You can do $var in a regex to do that, not sure if it likes $var.method()
14:30 flussence (alternatively, all I want to do is simple string substitution in nom if anyone can suggest a better way to write that...)
14:30 jnthn But there's always ... -> (:$key, :$value) { s/$key/$value/ } ... or some such
14:30 jnthn flussence: Well, you can always call .subst
14:30 jnthn Which isn't in place
14:31 moritz .subst($key, $value)
14:31 jnthn And thus saves you the is copy and setting up $_ too
14:31 moritz should work without explicitly creating a regex
14:31 jnthn yes, it'll be faster.
14:32 flussence k, I'll stick with that
14:32 ab5tract joined #perl6
14:37 moritz funn that after all these months of nom devolpment 'make test' doesn't pass
14:38 moritz *funny
14:39 jnthn Clearly nom has been an epic failure.
14:39 jnthn "Doesn't even pass make test!"
14:39 jnthn moritz: Last I checked it only failed two
14:40 dalek rakudo/nom: 46e7cc8 | jonathan++ | src/Perl6/Metamodel/ (7 files):
14:40 dalek rakudo/nom: Big refactor of role type checking. Includes an initial implementation of role introspection (.^roles), supporting :local in classes (don't show me my parent's roles) and :transitive (show me the roles that my roles do too).
14:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46e7cc8343
14:40 jnthn moritz: One of them being a Q:PIR one that simply isn't going to work any more.
14:40 jnthn moritz: Because it needs an explicit boxing operation adding or something.
14:40 moritz jnthn: one, if you pull
14:40 jnthn nice :)
14:40 moritz that one was easy to fix
14:40 _itz joined #perl6
14:40 dalek rakudo/nom: ca870df | moritz++ | t/00-parrot/09-pir.t:
14:40 dalek rakudo/nom: update 09-pir.t to current Q:PIR policy
14:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ca870df127
14:40 jnthn moritz: S12-introspection/roles.t can be updated/fudged/run if you have tuits :)
14:41 jnthn Otherwise I'll catch it later on.
14:41 moritz maybe I'll get to it soonish
14:41 tadzik jnthn: is that a potential Pies fix in the first one?
14:42 jnthn tadzik: No, that's orthogonal.
14:42 tadzik okay
14:42 jnthn tadzik: It's actually a symbol handling issue rather than a roles one.
14:42 tadzik okay. It was just keywords in the commit message that matched my thinking
14:43 lumi__ joined #perl6
14:45 moritz ./perl6 --setting=NULL --target=pir  --output=src/gen/CORE.setting.pir src/gen/CORE.setting
14:45 moritz Method 'role_typecheck_list' not found for invocant of class 'NQPConcreteRoleHOW'
14:45 moritz jnthn: see above, YOU BORKED THE BUILD :-)
14:45 jnthn oh, sorry :(
14:45 moritz forgot to bump a nqp dep?
14:46 jnthn oh argh
14:46 jnthn That and I committed to a floating head in nqp :/
14:47 moritz I hate it when that happens to me
14:47 jnthn I normally notice pretty quickly.
14:47 dalek nqp: 7d5eec2 | jonathan++ | src/how/NQPConcreteRoleHOW.pm:
14:47 dalek nqp: Update NQPConcreteRoleHOW to match new role type checking API.
14:47 dalek nqp: review: https://github.com/perl6/nqp/commit/7d5eec2966
14:47 moritz I usually open a shell with the 'git log', then 'checkout master' and cherry-pick the commits to master
14:48 moritz probably a better idea (if there are many commits) is to give the current head a name (checkout -b newname), and then git checkout master; git rebaise newname
14:48 moritz and then git branch -D newname # when you're confident that the rebase worked
14:48 jnthn oh, that's a good way to do it
14:49 jnthn git gui, write commit to file, git checkout master, git apply file
14:49 moritz (note that I haven't tried it that way, but it *should* work
14:49 dalek rakudo/nom: 133508e | jonathan++ | tools/build/NQP_REVISION:
14:49 dalek rakudo/nom: Bump NQP_REVISION.
14:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/133508ed61
14:49 jnthn Yeah, it sounds like it would.
14:49 jnthn I don't tend to use git gui for much
14:49 jnthn Normally when I hit the "OK, this is faster than looking up the command" point ;)
14:49 jnthn Above should fix the build.
14:50 * moritz tries
14:54 lumi__ joined #perl6
14:58 domidumont joined #perl6
15:04 ab5tract joined #perl6
15:06 lumi__ joined #perl6
15:06 sftp joined #perl6
15:11 jnthn nom: say $*VM<config><exe>
15:11 p6eval nom 133508: OUTPUT«␤»
15:12 jnthn nom: say $*VM<config><bindir>
15:12 p6eval nom 133508: OUTPUT«/home/p6eval/nom-inst1/bin␤»
15:12 jnthn nom: say $*VM<config><slash>
15:12 p6eval nom 133508: OUTPUT«/␤»
15:12 moritz jnthn: fwiw it fixed the build
15:12 jnthn moritz: Good. :)
15:13 moritz ah, .^roles(:tree) seems to be NYI
15:13 itz joined #perl6
15:14 dalek roast: a45c33c | moritz++ | S12-introspection/roles.t:
15:14 dalek roast: fudge role introspection test for rakudo
15:14 dalek roast: review: https://github.com/perl6/roast/commit/a45c33cf13
15:14 jnthn moritz: Yeah...I didn't put back any of the :tree forms but .^parents
15:14 jnthn moritz: It doesn't seem very useful on attributes and methods, as masak++ pointed out
15:14 jnthn Maybe there's a use case for roles though
15:15 agentzh joined #perl6
15:15 masonkramer joined #perl6
15:16 jnthn Question is, what's in the tree?
15:17 jnthn That is, do we build the inheritance tree, and put the roles in it?
15:17 jnthn What if those roles do other roles and we passed :transitive and :tree?
15:17 jnthn Gets a bit..."fun" :)
15:19 lumi__ joined #perl6
15:21 dalek rakudo/nom: ce13be6 | moritz++ | t/spectest.data:
15:21 dalek rakudo/nom: run role introspection tests
15:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ce13be61c8
15:22 moritz it also seems to me that roles don't form a tree
15:23 jnthn Yeah, that's why :transitive just gives you back a flat list.
15:24 PerlJam where are .^roles(:tree) and :transitive specced?
15:24 jnthn S12, if anywhere.
15:24 jnthn Pretty sure .^roles is spec'd.
15:25 PerlJam sure, .^roles is specced, but no mention of :tree for it
15:25 PerlJam and no mention of :transitive that I can find
15:26 PerlJam .^roles(:tree) doesn't make enough sense to me for what moritz said.
15:26 jnthn Yeah, the spec doesn't say it should be there
15:26 jnthn I'm +1 to toss thsoe tests
15:26 jnthn :transitive I think is useful
15:26 jnthn (show me also the roles that the roles that were explicitly done also pulled in)
15:27 jnthn ...wow, that was a hard to parse sentence :)
15:27 PerlJam well, that's what I think .^roles should do anyway
15:28 jnthn Maybe
15:28 jnthn It already goes through parents, which you specify with :local
15:28 jnthn e
15:28 jnthn gah
15:28 jnthn It goes through all the roles done by the parents, which you suppress (just the current class) with :local
15:29 jnthn The transitive thing is kind of another dimension.
15:29 jnthn I can see an argument for it being the defaut, but then we need a nice name for the other thing.
15:29 jnthn (:intransitive is probably bad as we tend to not like negative names)
15:29 lumi__ joined #perl6
15:30 jnthn :declared maybe
15:30 jnthn :immediate
15:30 jnthn nah
15:30 jnthn :shallow
15:31 PerlJam I don't get why someone would ask that question or need to distinguish between "first level roles" and all of the roles
15:31 jnthn Well, we let them distinguish between "first level parents" and "all of the parents"
15:32 jnthn I can see it mattering to somebody building some kind of exploration tool or something.
15:32 jnthn I may want to be able to show poeple "you have this role as a consequence of doing this other role"
15:33 alvis_ joined #perl6
15:35 PerlJam so ... .^roles(:tree)  would show the "composition tree"?
15:35 jnthn It could, but there's a confusion there.
15:35 jnthn Because .^roles also walks the inheritance tree, which you'd also expect to contribute to the structure of the result.
15:39 itz joined #perl6
15:40 mikemol joined #perl6
15:44 [Coke] rakudo has a smolder semi-instance on the parrot server. do you find it useful aside from the smolder server issues?
15:44 lumi__ joined #perl6
15:47 mj41 joined #perl6
15:53 im2ee rakudo: say "Doesn't work?";
15:53 p6eval rakudo 133508: OUTPUT«Doesn't work?␤»
15:53 im2ee joined #perl6
15:55 lumi__ joined #perl6
15:56 tadzik does work :)
16:02 JimmyZ rakudo: say "Doesn't work?"{0..4};
16:02 p6eval rakudo ce13be: OUTPUT«Method 'at_key' not found for invocant of class 'Str'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:960␤  in method reify at src/gen/CORE.setting:3634␤  in method reify at src/gen/CORE.setting:3539␤  in method gimme at src/gen/CORE.setting:3876␤  in metho…
16:03 itz joined #perl6
16:03 JimmyZ joined #perl6
16:03 JimmyZ rakudo: say "Doesn't work?"{0..4};
16:03 p6eval rakudo ce13be: OUTPUT«Method 'at_key' not found for invocant of class 'Str'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:960␤  in method reify at src/gen/CORE.setting:3634␤  in method reify at src/gen/CORE.setting:3539␤  in method gimme at src/gen/CORE.setting:3876␤  in metho…
16:05 * TimToady wonders in moritz's direction why the ir clog translates no-break space to normal space
16:07 ab5tract joined #perl6
16:08 lumi__ joined #perl6
16:10 itz joined #perl6
16:12 pyrimidine left #perl6
16:18 masak I would've called :transitive :implicit
16:19 PerlJam masak: except that it would include explicit roles too
16:20 PerlJam (unless I'm mistaken)
16:20 masak oh, good point.
16:21 TimToady I think we would be more efficient with mutability containers than immutability containers, since most access is reading
16:21 TimToady some kind of capabilities approach, not prohibition approach
16:22 PerlJam TimToady: and the default?
16:24 TimToady the default is readonly unless you have authorization, in that world
16:24 lumi__ joined #perl6
16:26 TimToady doing it the other way is madness from an FP point of view
16:27 masak the FP point of view disallows madness. unless it takes place inside a monad.
16:27 masak :P
16:32 TimToady doing it the other way is madness from *my* point of view
16:33 TimToady it's just the wrong default; the onus should be on those few parameters that are rw to do the checking
16:33 daniel-s joined #perl6
16:35 lateau_ joined #perl6
16:36 lateau_ joined #perl6
16:39 lumi__ joined #perl6
16:49 wallberg joined #perl6
16:50 masak indeed. readonly is a nice default for attributes.
16:50 masak then people who don't care will have fewer dependencies on their API.
16:51 masak er, I mean something like a less exposed API.
16:52 bbkr_ I built nom from github (after it was set as the main branch), and --version shows still april - "2011.04-1869-gce13be6". is that correct or GitHub serves me the wrong code?
16:52 flussence that's 2011.04 + 1869 commits.
16:52 lumi__ joined #perl6
16:53 bbkr_ ok, so it's correct. thanks
16:54 jnthn That's quite some commits :)
16:54 masak not enough! ;)
16:55 jnthn You can have a few more when my spectest run is done :P
16:55 masak \o/
17:01 Chillance joined #perl6
17:01 masak joined #perl6
17:02 shortcircuit joined #perl6
17:06 pmichaud I agree with "mutability containers", fwiw
17:06 lumi__ joined #perl6
17:06 pmichaud I was just trying to get the general idea across
17:07 dalek rakudo/nom: 36d06e1 | jonathan++ | src/Perl6/Metamodel/CurriedRoleHOW.pm:
17:07 dalek rakudo/nom: Add first cut of curried role type check handling. Works for some cases, but not all yet.
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/36d06e1142
17:07 dalek rakudo/nom: 3e24ff0 | jonathan++ | src/Perl6/Metamodel/C (2 files):
17:07 dalek rakudo/nom: Make sure we don't lose imformation about how we arrived at a given concrete role; we need it in the type check list.
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3e24ff0823
17:07 dalek rakudo/nom: d89d8c9 | jonathan++ | t/spectest.data:
17:07 dalek rakudo/nom: We now pass S14-roles/instantiation.t.
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d89d8c9b45
17:07 dalek rakudo/nom: 5d26134 | jonathan++ | NOMMAP.markdown:
17:07 dalek rakudo/nom: Update nommap.
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d261341a9
17:07 ingy tadzik: ping
17:07 tadzik ingy: pingy
17:07 diakopter !!
17:07 ingy tadzik: Mo has has default now
17:08 tadzik ingy: noticed, thanks
17:08 tadzik even commented on the commit
17:08 ingy dams++
17:08 tadzik I still have some doubts about it though, let me recheck them
17:08 ingy oh
17:08 ingy I gave you a tadzik++ in the lightning talk just now
17:09 tadzik oh? What talk?
17:09 tadzik ingy: doubts: https://gist.github.com/1206761
17:10 molaf joined #perl6
17:10 tadzik moose doesn't behave that way
17:11 ingy tadzik: I already released a comment that it is lazy
17:12 ingy to cpan
17:12 tadzik it's not about laziness
17:13 ingy you made a comment that it should be documented
17:14 ab5tract joined #perl6
17:14 tadzik yes, but now I have a different doubts :)
17:14 tadzik I'll open an issue
17:14 masak tadzik: what'd your expected behaviour in this case?
17:14 tadzik masak: I'd expect the second say to print nothing
17:14 ingy yeah, that looks like what I would expect
17:14 tadzik that's what Moose does
17:15 ingy that seems broken
17:15 ingy or not
17:15 masak tadzik: ah, the "set" property.
17:15 bbkr joined #perl6
17:15 masak tadzik: that problem shows up in Perl 6, too ;)
17:15 ingy anyway, it's not really a big deal
17:15 ingy imho
17:15 tadzik not sure
17:15 tadzik I have a feeling that golfing went to far :)
17:16 ingy well patch it then
17:16 masak it's also a bit like the difference between exists and defined for hash keys. :)
17:16 masak tadzik: look, do you want Mo or do you want... Moo? :P
17:17 tadzik :)
17:17 masak (I think I agree with tadzik, btw. the distinction is probably useful enough to trump the minimalism.)
17:17 masak well, actually it depends how important the minimalism is.
17:17 lumi__ joined #perl6
17:18 ingy I actually have a test for this
17:18 ingy I thought that setting to undef to rebuild is useful
17:18 tadzik hmm, mebbe
17:18 tadzik I filed an issue anyway
17:18 tadzik as I said, not sure if bug, or just confusing
17:19 ingy well the best thing to do next is to at least document it
17:21 tadzik ingy: so, what lightning talk was that?
17:22 ingy the Mo lt
17:22 ingy at IPW
17:23 ingy how would you implement not calling default again, btw?
17:24 sorear good * #perl6
17:24 masak good * sorear
17:24 tadzik I guess I'll just put all the defaults together and fire them up before BUILD
17:24 tadzik sorear: hello
17:24 * sorear wonders if #perl6 knows why I wasn't here yesterday
17:25 jnthn sorear: Power outage?
17:25 colomon o/
17:25 tadzik or maybe...
17:25 colomon first day of classs?
17:25 colomon *classes
17:25 sorear jnthn: news travels fast
17:25 tadzik ingy: you could even put them all in the {@_} in bless
17:25 tadzik ingy: the ones that are passed to new will overwrite the old ones anyway, as it's a hash
17:25 masak power outage in California? well, I never!
17:25 jnthn sorear: It was quite a big one, so it made it quite high up in the news :)
17:26 jnthn masak: multi-country power cut!
17:26 masak jnthn: someone pulled the wrong plug?
17:26 ingy bbl
17:26 jnthn masak: Something like... :)
17:26 tadzik people of big cities seem to be quite excited about power outages :0
17:27 masak there are worse things.
17:27 jnthn tadzik: Well, sure, it's the only time you can see the stars again :P
17:27 masak oil shortages, for example.
17:27 tadzik internet shortage :)
17:27 masak o.O
17:27 jnthn beer shortage :O
17:28 masak tadzik: right... the power goes out... and then you can't charge your smartphone... oh dear... :/
17:28 tadzik and the kindle becomes useless!
17:28 masak that would mean no IRC, no programming...
17:29 tadzik no bookreading!
17:29 tadzik how cruel is that
17:29 lumi__ joined #perl6
17:30 lateau_ joined #perl6
17:31 masak it's like we have some sort of electricity dependency
17:36 flussence ha, that's why I've got a solar-powered battery charger!
17:36 bbkr_ pmichaud: I found so far following tickets that works correctly in NOM branch after switch - 63642, 64184, 65022, 65404, 65224, 66892, 66948(std changed).
17:36 flussence (now if only I had access to sunlight...)
17:37 masak flussence: if only the humans hadn't scorched the skies to keep the machines from getting solar energy! ;)
17:38 masak bbkr_++
17:41 ab5tract joined #perl6
17:44 lumi__ joined #perl6
17:45 tadzik or, you know what just came to my mind?
17:45 tadzik The Grammar::Debugger could have a feature to print the entire matched text, with different colours for different matched rules
17:50 pmichaud bbkr_: as long as we have tests for them, the tickets can be closed.  If we don't have tests, then tag the tickets with "testneeded"
17:51 _twitch joined #perl6
17:51 jnthn tadzik: Sounds nice ;)
17:52 tadzik it would a bit tricky for heavily overlapping matches, but you could maybe narrowize the colouring
17:53 bbkr_ pmichaud: how can I tag a ticket? I don't see such option.
17:53 * colomon just got The State of the Art in Numerical Analysis 1987 book in the mail (with the article on branch cuts of elementary complex functions).  Very surprised to learn the state of the art did not include using TeX for math articles.  What an ugly book!
17:54 pmichaud bbkr_: do you have bugadmin privs?
17:54 sorear colomon: ow
17:54 sorear colomon: also, hi
17:54 pmichaud it's normally under the "Basics" menu
17:55 masak colomon: I would like to discuss branch cuts with you at some point.
17:55 jevin joined #perl6
17:55 masak colomon: not necessarily because I have something new to contribute; I just happen to like them and would like to wrap my brain around the situation :)
17:56 masak colomon++ # "complex issues" blog post
17:56 bbkr_ pmichaud: i have privs and found tagging.
17:57 colomon sorear: I've got sin/asin and cos/acos working locally.  Taking a pause because when I started working on tan, I started to think that it might make more sense to move all the complex math into the C# Complex class, making the actual trig functions very simple.
17:57 colomon sorear: I need to talk more about it with you soon, but have to blitz through some $work coding at the moment.
17:57 colomon masak: thanks.  ;)
17:58 lumi__ joined #perl6
17:58 pmichaud > .say for 1, 2, 6 ... 33.4
17:58 pmichaud 1
17:58 pmichaud 2
17:58 pmichaud 6
17:58 pmichaud unable to deduce sequence
17:58 pmichaud spectesting now
17:59 tadzik nom: .say for 1, 2, 6 ... 33.4
17:59 p6eval nom 5d2613: OUTPUT«Attempt to return from exhausted Routine␤  in sub EXHAUST at src/gen/CORE.setting:456␤  in sub coro at src/gen/CORE.setting:3765␤  in method reify at src/gen/CORE.setting:3735␤  in method reify at src/gen/CORE.setting:3539␤  in method reify at src/gen/CORE.setting:353…
17:59 masak poor Routine
17:59 jnthn Poor routine.
17:59 jnthn wtf
17:59 tadzik definitely an improvement
17:59 masak jnthn: dude, don't do that :P
17:59 jnthn masak: Stop thinking the same thing as me :P
18:00 * masak steps away from the keyboard, slowly
18:00 tadzik quick, make the /quit joke :P
18:00 dalek rakudo/nom: f9d94fe | pmichaud++ | src/core/operators.pm:
18:00 dalek rakudo/nom: Fix failure when unable to determine a sequence (RT #98678).
18:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f9d94fe1b5
18:01 * masak .oO( "brain meld not yet complete. experiment shows jnthn used full stop at ze end of ze sentece and masak didn't before ze link was broken" )
18:02 masak also, capitalization differs somewhat.
18:02 pmichaud also there's a caps mismatch.
18:02 pmichaud d'oh!
18:02 masak wtf
18:02 kst joined #perl6
18:02 * masak .oO( "hee hee hee" )
18:02 tadzik stop it!
18:03 sorear niecza: say 1, 2, 6 ... 33.4
18:03 p6eval niecza v9-11-g0f286c3: OUTPUT«Unhandled exception: Unable to figure out pattern of series␤  at /home/p6eval/niecza/lib/CORE.setting line 742 (CORE die @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1778 (CORE get-next-closure @ 24) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1…
18:03 pmichaud masak:  you've been on #perl6 too long... you're channeling other folks.
18:03 flussence niecza: say 1, 2, 6, 15 ... 33.4
18:03 masak oh, so now it's my fault, is it? :)
18:03 p6eval niecza v9-11-g0f286c3: OUTPUT«Unhandled exception: Unable to figure out pattern of series␤  at /home/p6eval/niecza/lib/CORE.setting line 742 (CORE die @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1778 (CORE get-next-closure @ 24) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1…
18:04 pmichaud masak: I do notice a commonality.
18:04 masak pmichaud: you'll note that I was first both times, at least in my frame of reference. :P
18:04 pmichaud mine too, but only bit a split second in each case
18:04 pmichaud s/bit/by/
18:04 sorear the technical term for this is "groupthink"
18:04 pmichaud the technical term for this is now "masakthink"
18:04 flussence niecza: say 1, 2, 6, -> $a, $b { (($b - $a).sqrt + 1) ** 2 } ... 33.4
18:04 sorear although it has acquired a bit of a pejorative flavor in the past years
18:05 p6eval niecza v9-11-g0f286c3: OUTPUT«(timeout)»
18:05 flussence whoops.
18:05 sorear flussence: note, .sqrt returns a Num, which is unlikely to compare equal to 33.4
18:05 flussence hm
18:05 flussence niecza: say 1, 2, 6, -> $a, $b { (($b - $a).sqrt + 1) ** 2 } ... * <= 33.4
18:05 masak pmichaud: my pary are with the ones who think like masak.
18:05 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤»
18:05 flussence niecza: say 1, 2, 6, -> $a, $b { (($b - $a).sqrt + 1) ** 2 } ... * > 33.4
18:06 p6eval niecza v9-11-g0f286c3: OUTPUT«1 2 6 9 7.46410161513775 -0.535898384862245+2.47862734985495i -6.13376997932347+8.20141988922952i -2.40354521423811+10.9387828231834i 8.8185187537763+4.07648528744702i 19.2043261990253-8.82793483456432i 18.7275375504929-16.419782287884i 4.29945707500593-11.…
18:06 * flussence fails at math
18:06 flussence niecza: say 1, 2, 6, -> $a, $b { $b + (($b - $a).sqrt + 1) ** 2 } ... * > 33.4
18:06 p6eval niecza v9-11-g0f286c3: OUTPUT«1 2 6 15 31 56␤»
18:07 TimToady someone should write .sqrat  :)
18:07 tadzik no wonder it didn't figure out that pattern :)
18:07 sorear what pattern?
18:07 flussence niecza: say 1, 2, -> $a, $b { $b + (($b - $a).sqrt + 1) ** 2 } ...^ * > 33.4
18:07 p6eval niecza v9-11-g0f286c3: OUTPUT«1 2 6 15 31␤»
18:07 flussence I just figured it as "add next square number Int"
18:07 TimToady that is neither arithmetic nor geometric
18:07 pmichaud fwiw, http://rakudo.org/rt/testneeded is a list of tickets that can be closed if we have tests for them
18:08 TimToady no, it's multiple by 2, then multipy by 3, then by 4
18:08 TimToady *ply
18:09 TimToady so the next number should be 24, not 15
18:10 TimToady :P
18:10 * TimToady wonders how many oeis's start with 1, 2, 6 ...
18:11 lumi__ joined #perl6
18:12 TimToady ooh, product of first n primes, 1, 2, 6, 30
18:12 Limbic_Region joined #perl6
18:17 sorear any sequence of N integers can be extended infinitely many ways as a degree-N integer-valued polynomial
18:18 sorear it's not well defined, unless you define it using a sequence of minimum Kolmogorov complexity
18:21 pmichaud afk, lunch
18:21 masak sorear: somehow I knew someone would point that out :P
18:23 cotto_work sorear: so it's easy!
18:23 cotto_work ;)
18:24 lumi__ joined #perl6
18:27 TimToady b: say ~map *.denominator, [\+] 1 X/ 1..100
18:27 p6eval b 1b7dd1: OUTPUT«Method 'denominator' not found for invocant of class 'Num'␤  in <anon> at line 22:/tmp/U4GFapooQG␤  in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤  in 'List::Str' at line 2838:src/gen/core.pm␤  in main program body at line 1:src/gen/core.pm␤»
18:28 masak b: say (1 X/ 1..100)[0].WHAT
18:28 p6eval b 1b7dd1: OUTPUT«Rat()␤»
18:28 sorear wtf, Num?
18:28 TimToady b: .say for map *.denominator, [\+] 1 X/ 1..100
18:28 p6eval b 1b7dd1: OUTPUT«1␤2␤6␤12␤60␤20␤140␤280␤2520␤2520␤​27720␤27720␤360360␤360360␤360360␤720720␤​12252240␤4084080␤77597520␤15519504␤51731​68␤5173168␤118982864␤356948592␤Method 'denominator' not found for invocant of class 'Num'␤  in <anon> at line 22:/tmp/MZOYXoDP5i␤  in main program body at li…
18:28 TimToady there's another 1,2,6...
18:28 masak b: say ([\+] 1 X/ 1..100)[0].WHAT
18:28 p6eval b 1b7dd1: OUTPUT«Rat()␤»
18:28 masak b: say ([\+] 1 X/ 1..100)[1].WHAT
18:28 p6eval b 1b7dd1: OUTPUT«Rat()␤»
18:29 masak b: say ([\+] 1 X/ 1..100)[100].WHAT
18:29 p6eval b 1b7dd1: OUTPUT«Any()␤»
18:29 masak b: say ([\+] 1 X/ 1..100)[90].WHAT
18:29 p6eval b 1b7dd1: OUTPUT«Num()␤»
18:29 TimToady you get about 24 Rats
18:29 TimToady see above
18:29 sorear niecza: say map *.denominator, [\+] FatRat.new(1,1) X/ 1..100
18:29 p6eval niecza v9-11-g0f286c3: OUTPUT«1 2 6 12 60 20 140 280 2520 2520 27720 27720 360360 360360 360360 720720 12252240 4084080 77597520 15519504 5173168 5173168 118982864 356948592 8923714800 8923714800 80313433200 80313433200 2329089562800 2329089562800 72201776446800 144403552893600 13127595…
18:30 mberends joined #perl6
18:31 sorear otoh I'm in a great mood today
18:31 colomon so about that FatRat.new(1,1) -- I've been thinking there ought to be a shorter way of saying that.  ;)
18:31 sorear o/ mberends
18:32 mberends o/ sorear, great moods are great :)
18:33 * mberends will dive back into documenting Niecza guts this weekend :)
18:33 sorear \o/
18:33 * sorear makes up for lost time
18:35 lumi__ joined #perl6
18:35 TimToady niecza: say map *.denominator, [\+] Rat.new(1,1) X/ 1..100
18:35 p6eval niecza v9-11-g0f286c3: OUTPUT«Unhandled exception: Unable to resolve method denominator in class Num␤  at /tmp/H4pdCv9WBk line 1 (MAIN C1_ANON @ 1) ␤  at  line 0 (KERNEL map @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1262 (CORE GatherIterator.reify @ 5) ␤  at  line 0 (ExitRunl…
18:36 TimToady niecza: .say for map *.denominator, [\+] Rat.new(1,1) X/ 1..100
18:36 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤2␤6␤12␤60␤20␤140␤280␤2520␤2520␤27720​␤27720␤360360␤360360␤360360␤720720␤12252240␤4​084080␤77597520␤15519504␤5173168␤5173168␤1189​82864␤356948592␤8923714800␤8923714800␤8031343​3200␤80313433200␤2329089562800␤2329089562800␤​72201776446800␤144403552893600␤13127595…
18:36 TimToady FatRat not necessary for that much of it...
18:37 alester joined #perl6
18:37 TimToady niecza: .say for map *.denominator, [\+] 1/1 X/ 1..100
18:37 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤2␤6␤12␤60␤20␤140␤280␤2520␤2520␤27720​␤27720␤360360␤360360␤360360␤720720␤12252240␤4​084080␤77597520␤15519504␤5173168␤5173168␤1189​82864␤356948592␤8923714800␤8923714800␤8031343​3200␤80313433200␤2329089562800␤2329089562800␤​72201776446800␤144403552893600␤13127595…
18:37 TimToady niecza: .say for map *.denominator, [\+] 1 X/ 1..100
18:37 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤2␤6␤12␤60␤20␤140␤280␤2520␤2520␤27720​␤27720␤360360␤360360␤360360␤720720␤12252240␤4​084080␤77597520␤15519504␤5173168␤5173168␤1189​82864␤356948592␤8923714800␤8923714800␤8031343​3200␤80313433200␤2329089562800␤2329089562800␤​72201776446800␤144403552893600␤13127595…
18:39 TimToady niecza: constant FatRat F1 = 1/1; .say for map *.denominator, [\+] F1 X/ 1..100
18:39 p6eval niecza v9-11-g0f286c3: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed constant at /tmp/k73ZFoayYu line 1:�------> [32mconstant FatRat [33m�[31mF1 = 1/1; .say for map *.denominator, [\[0m��Parse failed��»
18:39 TimToady niecza: constant F1 of FatRat = 1/1; .say for map *.denominator, [\+] F1 X/ 1..100
18:39 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤2␤6␤12␤60␤20␤140␤280␤2520␤2520␤27720​␤27720␤360360␤360360␤360360␤720720␤12252240␤4​084080␤77597520␤15519504␤5173168␤5173168␤1189​82864␤356948592␤8923714800␤8923714800␤8031343​3200␤80313433200␤2329089562800␤2329089562800␤​72201776446800␤144403552893600␤13127595…
18:40 TimToady \o/
18:40 TimToady colomon: ^^
18:40 colomon TimToady++
18:41 TimToady niecza: constant F1 of FatRat = 1/1; say (F1 * 2).WHAT
18:41 p6eval niecza v9-11-g0f286c3: OUTPUT«Rat()␤»
18:41 TimToady hmm
18:41 * colomon was thinking of 1F, with postfix:<F>(Int $x) { FatRat.new($x, 1) }
18:41 TimToady niecza: constant F1 of FatRat = 1/1; say F1.WHAT
18:41 p6eval niecza v9-11-g0f286c3: OUTPUT«Rat()␤»
18:41 cognominal joined #perl6
18:41 TimToady heh
18:41 TimToady niecza: constant F1 of FatRat = FatRat(1,1); say F1.WHAT
18:41 p6eval niecza v9-11-g0f286c3: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class FatRat␤  at /tmp/qiXwRG_Oy8 line 1 (MAIN F1 init @ 1) ␤  at  line 0 (ExitRunloop @ 0) ␤  at  line 0 (boot-MAIN @ 0) ␤  at  line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/boot/lib…
18:42 TimToady niecza: constant F1 of FatRat = FatRat.new(1,1); say F1.WHAT
18:42 p6eval niecza v9-11-g0f286c3: OUTPUT«FatRat()␤»
18:42 TimToady niecza: constant F1 of FatRat = FatRat.new(1,1); say (2 * F1).WHAT
18:42 p6eval niecza v9-11-g0f286c3: OUTPUT«FatRat()␤»
18:43 TimToady niecza: constant F1 of FatRat = FatRat.new(1,1); .say for map *.denominator.chars, [\+] F1 X/ 1..1000
18:43 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤1␤1␤2␤2␤2␤3␤3␤4␤4␤5␤5␤6␤6␤6␤6␤8␤7␤8␤8␤7​␤7␤9␤9␤10␤10␤11␤11␤13␤13␤14␤15␤14␤14␤14␤14␤15␤15​␤15␤15␤17␤16␤18␤19␤19␤19␤20␤20␤22␤22␤22␤22␤24␤23​␤23␤23␤23␤23␤25␤25␤27␤27␤26␤27␤27␤26␤28␤28␤28␤28​␤30␤31␤33␤33␤33␤33␤32␤32␤33␤33␤34␤34␤36␤36␤3
18:46 cotto_work what would it take to teach p6eval how to do irc colors?
18:46 lumi__ joined #perl6
18:47 cotto_work or is my client just misconfigured
18:47 [Coke] as opposed to?
18:47 cognominal_ joined #perl6
18:47 [Coke] it's working for me on IRSSI (at least sometimes, I get well formatted color.)
18:47 [Coke] on the "Sorry's" from niecza.
18:48 masak cotto_work: p6eval did do IRC colors for a while. it was dreadful.
18:48 masak cotto_work: on the other hand, the IRC logs do color in things a bit afterwards.
18:49 ab5tract joined #perl6
18:50 TimToady p6eval does color fine in irssi
18:50 sorear cotto_work: irssi parses ECMA-48 color codes.  this feature is not universal
18:50 jevin joined #perl6
18:50 sorear masak: please elaborate on "dreadful".  I am curious.
18:51 sorear interestingly Wikipedia thinks that "ANSI colors" is plain wrong
18:51 sorear ECMA-48 was created in 1976.  ANSI adopted ECMA-48 as ANSI X3.64 in 1981, then dropped it in 1997
18:53 TimToady dropped it because the Swedes thought it was dreadful? :P
18:54 sorear why would the American National Standards Institute care what the Swedes think?
18:54 sorear the Swedes ought to have more influence on the European Computer Manufacturers Association, which did *not* drop it
18:54 masak they should!
18:56 masak sorear: basically, the reason was that the ANSI escape codes showed up as ANSI escape codes in my client, and it drove me bananas.
18:56 mj41 joined #perl6
18:57 TimToady just think of it as a foreign language/orthography you haven't learned yet
18:58 sorear masak: p6eval generates ANSI escape codes right now
18:58 TimToady eventually you'll be able to translate the codes in your head, and visualize the colors :)
18:58 TimToady or maybe Google Translate could fix 'em :)
18:59 masak sorear: I'm not sure exactly what bothered me. I haven't found the backlog yet, although it seems to have been sometime back in 2009.
18:59 masak I've found me swearing about it a couple of times later that year.
18:59 sorear masak: are you maybe thinking of "hilight"?
19:00 sorear there was, in ~2009, a p6eval "implementation" that fed code through STD_syntax_highlight
19:00 lumi__ joined #perl6
19:01 masak that could be it.
19:03 Tene joined #perl6
19:03 Tene joined #perl6
19:03 TimToady there's no point in holding grudges forever if you don't remember *what* you have a grudge against...
19:03 jevin joined #perl6
19:04 REPLeffect joined #perl6
19:06 * [Coke] has a request - can folks save him some .tar.gz files that get sent to smolder and leave them on feather for me somewhere?
19:07 [Coke] TimToady: I don't even see the codes anymore, I just see, parsefail, exception, line numbers. (?)
19:07 masak TimToady: :)
19:07 pmichaud back from lunch
19:08 [Coke] pmichaud: LUNCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCH. what an excellent idea that would have been.
19:08 * masak is going through what he said in 2009 and notices how much masak-in-2009 kept talking about submitting RT tickets
19:08 masak [Coke]: I'm not lunch with that many "C"s in it is healthy.
19:09 TimToady RT == delegating grudges :)
19:10 TimToady masak: CC señor!
19:10 TimToady lunCCh &
19:10 masak oh mberends, u so silly -- http://irclog.perlgeek.de/​perl6/2009-01-15#i_833214 :P
19:10 pmichaud since I basically skipped lunch most days this week it felt good to actually have lunch.
19:11 pmichaud nom: .say for 1, 2, 6 ... 31
19:11 p6eval nom f9d94f: OUTPUT«1␤2␤6␤unable to deduce sequence␤  in sub <anon> at src/gen/CORE.setting:7000␤  in sub coro at src/gen/CORE.setting:3765␤  in method reify at src/gen/CORE.setting:3734␤  in method reify at src/gen/CORE.setting:3538␤  in method reify at src/gen/CORE.setting:3538␤  in me…
19:11 pmichaud much better.
19:11 cotto_work nice
19:11 cotto_work pmichaud++
19:12 ab5tract joined #perl6
19:13 lumi__ joined #perl6
19:13 flussence [Coke]: ~ $ ls .local/tmp/*.tar.gz | wc -l␤650
19:13 flussence that enough for you?
19:14 avinash joined #perl6
19:14 flussence (the closest place I can leave them on is feather3...)
19:15 masak ooh! ovid hung out in #perl6 in early 2009. I wonder why he stopped.
19:16 avinash left #perl6
19:18 fridim_ joined #perl6
19:18 pmurias joined #perl6
19:18 moritz \o
19:19 sorear o/ pmurias
19:19 pmurias sorear: how can i print out nam for a perl6 file?
19:19 pmurias sorear: hi
19:20 sorear run the compiler, then look in obj/
19:24 pmurias what's the recommended way to printy-print the resulting JSON?
19:24 sorear head -n1 obj/MAIN.nam | json_xs | less
19:24 sorear tail -n1 obj/MAIN.nam | json_xs | less
19:24 sorear the file contains two JSON documents, one per line
19:25 lateau_ joined #perl6
19:25 sorear #1 contains metadata #2 is mostly executable code
19:25 lumi__ joined #perl6
19:25 sorear I'm far less than 100% happy with the design of this part of the system
19:26 pmurias did that change from the common lisp backend times?
19:26 sorear only a little bit
19:27 sorear I think in the clisp backend times there was only one document
19:27 pmurias i think so
19:27 sorear I split them to speed up "use" statement processing - it reduces the amount of data that needs to be loaded
19:27 sorear other than that there have been no large-scale changes to the nam subsystem
19:28 sorear obviously new ops have been added; I may have rearranged a few records
19:28 pmurias Unhandled exception: Unable to resolve method shift in class Str
19:28 pmurias for "use Bar"
19:29 sorear you probably have a Bar.nam from a previous compiler version lying around
19:29 sorear I want to add versioning information but I'm not totally sure how it should look
19:30 sorear oh, I know: I could make the files 3 lines with the first line a version number
19:30 pmurias yes, that's the case
19:30 sorear then versioning wouldn't keep us tied to JSON
19:30 pmurias seems sensible
19:31 pmurias the other choice is if you want to have the git revision of the compiler or a version of the nam format
19:32 sorear a version of the nam format
19:33 sorear partly because I don't want constant recompilation, partly because we can't portably get the git revision
19:35 Yappoko___ joined #perl6
19:35 lumi__ joined #perl6
19:40 pmurias sorear: i can't imagine anything better
19:41 pmurias besides possibly saving a couple of bytes with a binary format, but i'm not sure it's worth that
19:42 pmurias s/not sure it's worth that/doesn't seem sensible
19:46 masak rakudo: .say for (1 ... 10) Z (10 ... 1)
19:46 p6eval rakudo f9d94f: OUTPUT«(timeout)»
19:46 pmurias sorear: where in obj/ is the .nam file supposed to be?
19:46 masak niecza: .say for (1 ... 10) Z (10 ... 1)
19:46 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤10␤2␤9␤3␤8␤4␤7␤5␤6␤6␤5␤7␤4␤8␤3␤9␤2␤10␤1␤»
19:47 * masak submits rakudobug
19:49 masak niecza: .say for (1 ... 10), (10 ... 1)
19:49 p6eval niecza v9-11-g0f286c3: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤»
19:49 masak rakudo: .say for (1 ... 10), (10 ... 1)
19:49 p6eval rakudo f9d94f: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in sub generate at src/gen/CORE.setting:6933␤  in sub coro at src/gen/CORE.setting:3765␤  in method reify at src/gen/CORE.setting:3735␤  in method reify at src/gen/CORE.setting:3539␤  in method reify a…
19:49 masak at the rate I'm stumbling over bugs just by *trying stuff randomly*...
19:50 masak ...I think nom has some ways left to go before it replaces b.
19:50 lumi__ joined #perl6
19:54 TimToady if that's your random mode I'd hate to see your malice aforethought mode...  :)
19:57 masak I have nothing to add to that.
19:59 TimToady my only ray of light is that, if you really do have a malice aforethought mode, I probably won't ever see it coming, since I'm probably #1 on the list of people to be Dealt With...
20:01 * masak hugs TimToady :)
20:02 ab5tract joined #perl6
20:07 TimToady perl6: say "møøse".utf8.bytes;
20:07 p6eval niecza v9-11-g0f286c3: OUTPUT«Unhandled exception: Unable to resolve method utf8 in class Str␤  at /tmp/_a4tY7zPxV line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2046 (CORE C956_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2047 (CORE module-CORE …
20:07 p6eval ..rakudo f9d94f: OUTPUT«Method 'utf8' not found for invocant of class 'Str'␤  in <anon> at /tmp/jGdOiiHCbE:1␤  in <anon> at /tmp/jGdOiiHCbE:1␤␤»
20:07 p6eval ..pugs: OUTPUT«decodeUTF8': bad data: '\248'␤decodeUTF8': bad data: '\248'␤*** No such method in class Str: "&utf8"␤    at /tmp/MnghRQ3eN4 line 1, column 5-23␤»
20:07 TimToady wowee!
20:08 lumi__ joined #perl6
20:08 pmichaud b: say "møøse".utf8.bytes;
20:08 p6eval b 1b7dd1: OUTPUT«Method 'utf8' not found for invocant of class 'Str'␤  in main program body at line 22:/tmp/4ixnEGP_ml␤»
20:08 pmichaud Looks like we all suck.
20:10 moritz b: say "møøse".encode.bytes
20:10 p6eval b 1b7dd1: OUTPUT«Method 'bytes' not found for invocant of class ''␤  in main program body at line 22:/tmp/XhEQexSgzD␤»
20:10 moritz b: say ~"møøse".encode.^methods
20:10 p6eval b 1b7dd1: OUTPUT«new decode unpack perl elems postcircumfix:<[ ]> at_pos of contents can isa does list ACCEPTS Str Numeric Seq all any one none join elems flat map sort rotate first grep reverse end min max minmax pick roll classify reduce uniq kv keys values pairs postcircumfix:<[ ]> a…
20:10 flussence oh no, '' was hiding in there all along!
20:10 moritz b: say "møøse".encode.elems
20:10 p6eval b 1b7dd1: OUTPUT«7␤»
20:10 moritz happy? :-)
20:11 TimToady well, there's s'posed to be a utf8 buf type...
20:11 TimToady rakudo: say "møøse".encode.elems
20:11 p6eval rakudo f9d94f: OUTPUT«Method 'encode' not found for invocant of class 'Str'␤  in <anon> at /tmp/dD_5e6qUeK:1␤  in <anon> at /tmp/dD_5e6qUeK:1␤␤»
20:12 pernatiy joined #perl6
20:12 TimToady b: say "møøse".encode.WHAT
20:12 p6eval b 1b7dd1: OUTPUT«Buf()␤»
20:13 TimToady I don't think there's really a Buf type, more of a Buf role
20:13 TimToady well, maybe it's a buf role, and Buf is just Array of Int
20:15 Moukeddar joined #perl6
20:15 Moukeddar hi guys
20:16 Trashlord joined #perl6
20:16 lumi__ joined #perl6
20:16 * TimToady wonders if class utf8 is buf8 in a Liskovian sense...
20:17 TimToady initial reviews are mixed
20:18 TimToady in some sense it's more like 'subset utf8 of buf8 where *.valid_utf8' or some such, but you wouldn't want to be revalidating every moment
20:19 sorear perl6: say "mǫǫse".bytes
20:19 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\491'␤decodeUTF8': bad data: '\491'␤7␤»
20:19 p6eval ..rakudo f9d94f: OUTPUT«7␤»
20:19 p6eval ..niecza v9-11-g0f286c3: OUTPUT«10␤»
20:19 sorear perl6: say "møȯse".bytes
20:19 sorear perl6: say "møøse".bytes
20:19 p6eval rakudo f9d94f: OUTPUT«7␤»
20:19 p6eval ..niecza v9-11-g0f286c3: OUTPUT«10␤»
20:19 p6eval ..pugs: OUTPUT«decodeUTF8': bad data: '\248'␤decodeUTF8': bad data: '\559'␤7␤»
20:19 p6eval pugs: OUTPUT«decodeUTF8': bad data: '\248'␤decodeUTF8': bad data: '\248'␤7␤»
20:19 p6eval ..rakudo f9d94f: OUTPUT«5␤»
20:19 p6eval ..niecza v9-11-g0f286c3: OUTPUT«10␤»
20:19 sorear finally got it right...
20:19 sorear hello Moukeddar
20:20 sorear pmurias: obj/{$class.subst('::','.')}.nam
20:20 TimToady well, but Str isn't really supposed to respond to .bytes, by one rationale of thinking
20:20 sorear TimToady: isn't it more like Buf === Array[int8]?
20:20 sorear rather than Array[Int]
20:21 TimToady not at all
20:21 TimToady Buf isn't supposed to care how big its ints are, in the abstract
20:22 bluescreen10 joined #perl6
20:22 sorear TimToady: what is the purpose of Buf?
20:23 moritz so the only difference between Buf and Str (conceptually) is that Buf doesn't try to interpret its elements as characters?
20:23 TimToady Buf is really a role, but it's true that the spec currently claims it puns to Buf[uint8] by default
20:23 sorear moritz: characters are not integers anymore
20:24 sorear there's no reasonable way to assign a numeric value to a .chars==1 NFG string like n-umlaut
20:25 TimToady the whole point of NFG is to force that anyway even when it's unreasonable :)
20:26 masak ...by hijacking the negative integers.
20:26 TimToady moritz: a further difference is that Buf allows array ops, while Str doesn't, as currently specced
20:27 TimToady and a Buf doesn't have to account for weird NFG chars
20:30 TimToady two graphemes are distinct if they have differing NFG integers, or if they are the same, but are both negative and point to two different NFG tables that contain different codepoint mappings
20:31 lumi__ joined #perl6
20:31 TimToady didn't say that quite right
20:31 ab5tract joined #perl6
20:31 TimToady two negatives must always compare with the table mappings
20:32 TimToady since two different negatives in two different tables might map to the same sequence
20:33 TimToady hopefully these are relatively rare, in normal text
20:34 TimToady though I foresee for some languages that rely heavily on composition that NFG strings in that language might want to share a translation table for some of the synthetic codepoints
20:34 TimToady anyway, such codepoints are rare in CJK and western scripts
20:35 TimToady generally one or the other of the comparands will be positive, and represent a normal NFC codepoint
20:40 sorear well, a Str needs a grapheme mapping table then; it isn't _just_ a Buf
20:40 TimToady I just said that
20:41 sorear in principle we could have a global grapheme map, but I am very nervous about that from a garbage-collection viewpoint
20:41 TimToady that's what I mean at :27
20:41 TimToady not so much the GC perspective as the DOS perspective, for me
20:41 TimToady er, DoS
20:41 sorear oh, I managed to miss that one line
20:42 sorear TimToady: if negative codepoints are reclaimed by the GC, we don't have a DoS problem
20:42 TimToady so my guess is that a robust NFG would reserve some amount of global space for the process, then overflow to per-string
20:42 TimToady sorear: hmm, I guess
20:44 ab5tract joined #perl6
20:44 TimToady otoh, if one wants to, say, use uint8 or uint16 for some chunks of the "rope", it's good to have numbers that don't exceed -256 or -65536
20:44 TimToady er, -128 and -32768
20:45 TimToady and locality of character sets would tend to make that work better for per-string tables
20:45 TimToady or per-rope-segment
20:46 lumi__ joined #perl6
20:47 sorear TimToady: er, "int8" "int16"?
20:48 TimToady nodnod
20:48 * TimToady slaps his brane around several times
20:48 bbkr pack() disappeared in nom branch?
20:48 tadzik Buf NYI
20:48 [Coke] joined #perl6
20:49 [Coke] .
20:49 masak pack() was never very implemented in b either.
20:49 masak I'd love to collaborate with someone over a serious implementation for nom.
20:49 TimToady and if we can easily map both positive and negative graphs to their NFD sequence, it becomes fairly straightforward to do partial matching sans some or all of the marks
20:50 TimToady well, as straightforward as anything ever is in Unicode
20:50 masak that, and the exciting new features having to do with pack()-like functionality for compact classes.
20:50 bbkr i know pack() wasn't seriously implemented. whole spec section is missing for it.
20:50 masak bbkr: well, it's right there in S32. but not very ironed out, no.
20:50 TimToady there's always been some suspicion that pack was the wrong solution to most serialization problems
20:50 masak ISTR a number of questions about it are up in the air.
20:50 masak TimToady: the compact-classes idea sounds intriguing, but no-one knows how it'll look.
20:51 sorear pack is more flexible than compact-classes, imo
20:51 masak my guess is that pack/unpack will remain, but some of their niche will be eaten by compact classes.
20:51 TimToady I tend to view the pack engine as the underlying mechanism, but its assembly is usually driven by compiling the class down to the "assembly"
20:52 TimToady and then with appropriate constant folding you can treat the pack format as immutable, and optimize further
20:53 sorear +1
20:53 sorear I can get behind that.
20:53 * sorear wonders if the pack engine is the same as the sprintf engine
20:54 TimToady well, if it's turing complete, sure :)
20:55 TimToady I have a bridge for sale made out of turning machines...
20:55 TimToady *turing, gah
20:55 bbkr is restoring pack/unpack support expected before first release from nom branch?
20:55 TimToady dubitable
20:56 masak not necessarily.
20:56 TimToady however, if you want to champion it...  :)
20:56 lumi__ joined #perl6
20:56 masak since there wasn't much there before.
20:56 tadzik you may want to tackle nom-buf branch
20:56 masak I think I promised pmichaud to reimplement pack/unpack...
20:59 * sorear wonders if a universal turning machine is like a universal touring machine
21:00 sorear masak: how are macros?  I saw them discussed when I searched the logs for ?sorear?
21:00 TimToady does a universal touring machine come with an infinite road?
21:00 pmichaud masak: I think I mainly asking for help reimplementing pack/unpack :)
21:00 pmichaud I still want to rework b's buf implementation
21:00 pmichaud (don't know when I'll do that atm, though)
21:01 masak sorear: my grant application got published: http://news.perlfoundation.org/2011/0​9/hague-grant-application-implem.html
21:01 pmichaud yes, everyone please comment on masak++'s grant app
21:01 masak sorear: I have a local branch which I wrote, with jnthn's help, in Tallinn.
21:01 tadzik I did, and it didn't appear yet
21:01 TimToady everyone here has N things they have to do before they do anything else, where N is not normally 1.  :)
21:01 masak sorear: plan to get it ready for pushing this weekend.
21:02 masak TimToady: we need more of us.
21:02 TimToady no, we need more of those folks whose N is 0
21:03 masak hah! suckers.
21:03 bbkr pack template needs serious redesign. many P5 tokens doesn't make sense in P6.
21:03 TimToady there are already too many of us whose N ⋙  1
21:03 masak bbkr: that's what I found.
21:04 sorear TimToady: I have 0 things to do before I finish doing CLR interop, 1 thing to do before I change Complex for colomon, 2 things to do before I try to implement NFG...
21:04 masak bbkr: it was slow going to implement, because there were ASCII assumptions, or Buf/Str confusions, in a lot of places.
21:04 TimToady how...linear...
21:04 pmichaud it's at least inductive to some extent :)
21:04 TimToady yes, assembly languages tend to allow massive type violations :)
21:05 im2ee joined #perl6
21:05 masak I like the analogy.
21:05 sorear types exist only in my head anyway.
21:05 * TimToady is analogy retentive...
21:05 * sorear reads the hague application
21:05 masak but the square peg of pack/unpack doesn't always fit extremely well into the round hole of Perl 6 Str/Buf philosophy...
21:06 TimToady well, Str has almost nothing to do with it, since pack is almost certainly going to produce a Buf of some sort
21:07 sorear straw man proposal: pack is sprintf for Buf and vice versa
21:07 sorear pack uses a format string to convert whatever to bytes
21:07 * TimToady huffs and puffs
21:07 sorear sprintf uses a format string to convert whatever to chars
21:07 lumi__ joined #perl6
21:08 TimToady please don't mention scanf, or I shall be ill...
21:08 TimToady oops
21:09 masak I'm sure it made a lot of sense at the time.
21:09 TimToady um
21:09 TimToady not really :)
21:12 sorear unpack is like sscanf then.
21:12 bbkr i think that the nice idea for pack would be to introduce captures in template. for example a lot of serializations mention how many objects of given type will follow and then pass the objects. so template for "5abcde" may look like this: (V)A*$0
21:13 dukeleto joined #perl6
21:13 sorear I don't much hate scanf per se, but anyone caught using it on ttys should be scolded
21:13 sorear bbkr: that's unpack, not pack
21:14 bbkr sorear: right
21:15 flussence .oO( maybe we should have a version of grammars for binary data... )
21:15 bbkr joined #perl6
21:15 sorear flussence: we already do, in the "wishful thinking" section of S05
21:15 flussence oh.
21:15 TimToady the other problem is accounting for the difference between types whose size is absolute vs those whose size is determined by C
21:16 sorear we should have varying degrees of mandatoryness
21:16 sorear it doesn't make a whole lot of sense to have C pack types in a CLR Perl6
21:18 bbkr what are those "compact classes"?
21:18 * sorear wonders if ey should comment on masak's grant proposal
21:18 sorear bbkr: classes with only native-type fields are considered to implicitly define a pack/unpack template
21:20 lumi__ joined #perl6
21:20 TimToady bbkr: see also http://perlcabal.org/syn/S09.html#Compact_structs
21:21 TimToady and http://perlcabal.org/syn/S09.html#Compact_arrays
21:22 * bbkr likes this idea
21:23 SHODAN joined #perl6
21:24 fhelmberger_ joined #perl6
21:25 fhelmberger_ joined #perl6
21:25 flussence I've got a pretty solid idea of how to implement a compact struct role using pack/unpack - the main thing stopping me is finding a perl6 with pack and native types at the same time...
21:27 y3llow joined #perl6
21:27 pothos_ joined #perl6
21:29 y3llow joined #perl6
21:29 * bbkr has to rewrite whole BSON module :(
21:30 lumi__ joined #perl6
21:30 pothos_ joined #perl6
21:31 * TimToady wonders what BavaScript is...
21:32 ggoebel joined #perl6
21:33 pmichaud [Coke]: I didn't forget "IsRakudoFastYet" -- just been distracted by other stuff.
21:33 sorear no, no, it's "BS object notion".  pejorative name, you see
21:33 pmichaud (other non-p6 stuff :-| )
21:34 * TimToady ponders BF object notation
21:34 TimToady pmichaud: your N is always > 1 :)
21:36 TimToady decomputing &
21:42 * masak 's N is surreal
21:44 masak isn't it odd how, just like complex analysis, surreal numbers actually make it much *easier* to talk about infinities and infinitesimals. with our ordinary real number line and real analysis, we always have to approach things by limits.
21:45 masak with surreal numbers and the Riemann sphere, infinities are actual values.
21:52 pmichaud hmmm.  the problem with   "say (1...10), (10...1)"  looks like a lexical scoping or closure problem.
21:53 jnthn Oh?
21:53 pmichaud yeah.  I have a lexical that is changing at a distance
21:53 pmichaud or an outer that isn't being managed properly
21:53 jnthn :(
21:54 jnthn Location?
21:54 lumi__ joined #perl6
21:54 pmichaud in SEQUENCE()   (src/core/operators.pm)
21:54 pmichaud the "generate" nested sub isn't seeing the proper $tail
21:54 pmichaud when there are two active calls in the same statement
21:55 pmichaud let's see if I can golf it down
21:55 jnthn my sub generate($code) { # my is the default :)
21:55 pmichaud doesn't hurt to be explicit :)
21:55 pmichaud I kind of like seeing the "my" there, to make it clear that this is really local.
21:55 jnthn Yes, true. Emphasis can be nice :)
21:56 masak huh.
21:56 masak never had such a desire :)
21:56 masak am I just being haughty if I think "people should know that subs are 'my'"? :)
21:56 jnthn masak: Not really
21:56 jnthn masak: It's like you can write has $x; but most people instead write has $!x;
21:57 masak I mean, if I took into account all the things I *could* make explicit...
21:57 jnthn masak: Just that in that case the community at large seems to have called it the other way :)
21:57 masak jnthn: yeah, but in that case 'has $x' is actually the derived form.
21:58 masak it's not that the '!' doesn't add anything... it was there all the time :P
21:58 masak the 'my' wasn't, because it didn't have to be.
21:58 jnthn masak: I guess you could think of it that way, but the compiler will generate the same thing for you either way :)
21:58 masak I know, I know. :)
21:58 masak I'm just trying to explain why I felt it was a not-quite-right comparison.
21:58 pmichaud comments don't have to be there either :)
21:59 masak I tend to write comments only when the programming language itself can't explain what I want.
21:59 jnthn masak: For the record, I actually quite like the "generally we don't write my, and generally we do write $!x" that folks seem to have settled on. :)
21:59 masak lately I've been having a grand time weaving comments into the code in various ways.
21:59 masak things like '# just in case'
22:00 jnthn // Initializes the object
22:00 jnthn ...constructor follows...
22:00 masak augh
22:00 masak jnthn: t-t-t-t-t-t-telephon.
22:00 masak e*
22:00 jnthn augh
22:00 masak ;)
22:01 masak no, I meant something quite the opposite of that.
22:01 im2ee Umm, hard day. :)
22:01 masak more like the comments being a 'commentator track' to the code, saying things that don't quite fit in there but that might merit saying.
22:01 sorear masak: I work with people who don't want to learn the relative precedence of || and && and insist that I parenthetize logic expressions
22:02 pmichaud yeah, something weird is happening here.  gist coming up
22:02 pmichaud http://gist.github.com/1207447
22:02 jnthn pmichaud: fwiw, the outer looks right in PIR
22:02 masak sorear: yeah, I hate having to do that! but sometimes I yield.
22:02 jnthn sorear: A while ago, somebody "fixed" my code by adding parens in such a case where I thought it was too obvious to need them.
22:03 im2ee joined #perl6
22:03 jnthn sorear: They put them in the wrong place and broke it.
22:03 jnthn :S
22:03 pmichaud jnthn: so, you thought it was obvious (it wasn't to them), and they thought they knew what the code was doing (they didn't).
22:03 pmichaud in which it might've been better for you to put them there in the first place :-P
22:03 masak sorear: unfortunately, when it comes to precedence, the following are well-known and assumed well-known: the five mathematical operations. assignment. everything else is a potential target fro parenthesization.
22:04 pmichaud in p6, assignment isn't well known yet :)
22:04 jnthn pmichaud: Yeah, it woulda been in hindsight :)
22:04 pmichaud people still get confused by     my $list = 1,2,3;
22:04 jnthn pmichaud: ooc, can you produce a case not involving GATHER?
22:04 pmichaud jnthn: I'm thinking it has something to do with the lazy evaluation, though.
22:04 im2ee Hard day, so its time for me. Have a nice night or day. Bye! :)
22:04 masak std: my $list = 1, 2, 3;
22:04 p6eval std bb4f150: OUTPUT«ok 00:01 122m␤»
22:05 jnthn night, im2ee
22:05 masak im2ee: 白白
22:05 pmichaud I might be able to do something with map.
22:05 jnthn masak: I thought, "what"...then realized how those chars sound :)
22:06 * sorear hears shiro-shiro
22:06 masak jnthn: that's how they spell it :)
22:07 masak phenny: zh en "白白"?
22:07 phenny masak: "In vain" (zh to en, translate.google.com)
22:07 masak er.
22:07 sorear mm, Ybai2
22:07 masak sorear: right.
22:07 sorear bye-bye
22:07 masak despite what phenny says :)
22:07 sorear my Japanese dictionary has a Mandarin/Pinyin field for no obvious reason
22:07 lumi__ joined #perl6
22:07 pmichaud jnthn: it fails with .map, too
22:08 pmichaud let me clean up the code a bit and I'll gist it
22:08 jnthn pmichaud: Looking at your last one. The closure passed to GATHER is cloned. So it's not that.
22:08 bluescreen10 joined #perl6
22:09 jnthn pmichaud: oh, but the generate sub is not...
22:10 jnthn nom: sub foo($x) { sub bar() { say $x } return { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:10 p6eval nom f9d94f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
22:10 jnthn nom: sub foo($x) { sub bar() { say $x }; return { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:10 p6eval nom f9d94f: OUTPUT«2␤2␤»
22:10 jnthn pmichaud: ^^ could be at the root of this.
22:10 sorear wtf
22:10 sorear seriously?
22:10 jnthn b: sub foo($x) { sub bar() { say $x }; return { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:10 p6eval b 1b7dd1: OUTPUT«1␤2␤»
22:10 sorear closures don't work in nom?
22:11 pmichaud I suggest trying it without the 'return', to avoid that variable.
22:11 ranguard joined #perl6
22:11 jnthn b: sub foo($x) { sub bar() { say $x }; { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:11 p6eval b 1b7dd1: OUTPUT«1␤2␤invoke() not implemented in class 'Boolean'␤  in main program body at line 22:/tmp/Hy87sSsyeI␤»
22:11 pmichaud pointy
22:11 jnthn er
22:11 pmichaud -> { bar() }
22:11 jnthn b: sub foo($x) { sub bar() { say $x }; -> { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:11 p6eval b 1b7dd1: OUTPUT«1␤2␤»
22:11 jnthn nom: sub foo($x) { sub bar() { say $x }; -> { bar() } }; my $a = foo(1); my $b = foo(2); $a(); $b();
22:11 p6eval nom f9d94f: OUTPUT«2␤2␤»
22:12 pmichaud ....that looks like a problem.
22:12 jnthn pmichaud: The PIR makes it clear what's oging on.
22:12 jnthn pmichaud: The closure gets cloned. bar does not.
22:12 pmichaud there's supposed to be a capture_lex on bar, though.
22:13 jnthn pmichaud: There is
22:13 jnthn pmichaud: That's not enough though.
22:13 pmichaud the &bar lexical needs to be bound to a newclosure/clone
22:13 jnthn Right, that's what's missing.
22:13 pmichaud that's what ng does, iirc
22:13 jnthn pmichaud: Yeah. Unlike sorear, I don't get everything right.
22:14 jnthn Will fix.
22:14 pmichaud I'm a little surprised this hadn't bitten us somewhere already :-S
22:14 jnthn Me too
22:15 jnthn I mean, a bunch of other cases do the right thing, but still, it's a surprising one not to have run into.
22:15 pmichaud I can also rewrite the SEQUENCE code to not use a generate sub
22:15 pmichaud it's only called from one place, so inlining it might make more sense anyway.
22:16 pmichaud (but we still need to fix the lexical bug, obviously :)
22:16 jnthn pmichaud: Feel free, but I'm still gonna fix the bug. :)
22:16 pmichaud I'm sad it's a lexical bug, I'm *really* glad the problem wasn't with GATHER.  :-)
22:16 jnthn Yes, that was my fear.
22:17 jnthn I'm relieved it's silly and easily golfed.
22:17 diakopter I wonder how man_or_boy worked
22:18 jnthn diakopter: Yeah, that was my "did I get closures right" test. :)
22:18 jnthn Maybe it doesn't rely on nested subs.
22:18 jnthn (It's the installation of declarational things that's at issue.)
22:19 sorear jnthn: sorry; my actual feelings are closer to pmichaud's
22:19 sorear jnthn: I'm amazed you hadn't been bitten somewhere else
22:20 jnthn sorear: Sorry, I was a bit snappy there. I've kinda had a week of being bitten... :)
22:20 sorear pmichaud: could do my $generate = sub () {...
22:20 * sorear offers hugs
22:20 jnthn :)
22:21 lumi__ joined #perl6
22:23 plobsing joined #perl6
22:28 masak blog post! http://strangelyconsistent.org/b​log/dash-n-and-dash-p-part-three
22:30 sorear yay!
22:32 sahadev perl6: my @a = 1 .. 10; my @p = 2, 3, 5, 7; sub mapper { my @keys; @keys.push($^a % 2 ?? "odd" !! "even"); @keys.push("prime") if $^a ~~ @p.any; @keys } my %h = classify(&mapper, @a)
22:32 p6eval rakudo f9d94f: OUTPUT«===SORRY!===␤Confused at line 1, near "sub mapper"␤»
22:32 p6eval ..pugs: OUTPUT«*** No such subroutine: "&classify"␤    at /tmp/15wlR_88oU line 1, column 155 - line 2, column 1␤»
22:32 p6eval ..niecza v9-11-g0f286c3: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/TUUoFQMTSX line 1:�------> [32m.push("prime") if $^a ~~ @p.any; @keys }[33m�[31m my %h = classify(&mapper, @a)[0m��Parse failed��»…
22:33 sorear sahadev: you need a ; after the }
22:33 sahadev sorear: thanks
22:33 masak Perl 6 is a bit stricter than Perl 5 on that front.
22:33 sahadev perl6: my @a = 1 .. 10; my @p = 2, 3, 5, 7; sub mapper { my @keys; @keys.push($^a % 2 ?? "odd" !! "even"); @keys.push("prime") if $^a ~~ @p.any; @keys }; my %h = classify(&mapper, @a)
22:33 p6eval pugs: OUTPUT«*** No such subroutine: "&classify"␤    at /tmp/bWYKWhHMrh line 1, column 156 - line 2, column 1␤»
22:33 p6eval ..niecza v9-11-g0f286c3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'classify' used at line 1â�¤â�¤Potential difficulties:â�¤  %h is declared but not used at /tmp/21LPgXcPBH line 1:â�¤------> [32m("prime") if $^a ~~ @p.any; @keys }; my [33mâ��[31m%h = classify(&mapper, @a)[0mâ�¤â�¤â€¦
22:33 p6eval ..rakudo f9d94f: OUTPUT«Method 'push' not found for invocant of class 'Parcel'␤  in method reify at src/gen/CORE.setting:3634␤  in method reify at src/gen/CORE.setting:3539␤  in method reify at src/gen/CORE.setting:3539␤  in method gimme at src/gen/CORE.setting:3876␤  in method eager at s…
22:33 lumi__ joined #perl6
22:46 odoacre joined #perl6
22:47 HarryS joined #perl6
22:49 sorear masak: nitpick
22:49 masak sure. go ahead.
22:49 sorear masak: Haskell's Prelude is not a prelude in the sense of the term you use
22:49 wolfman2000 joined #perl6
22:49 masak oh!
22:49 masak well, live and learn.
22:50 sorear masak: Haskell's "prelude" is the single line, "use Prelude"
22:50 masak huh.
22:50 sorear masak: Haskell's Prelude is an ordinary module governed by the import/export rules
22:50 masak I think I see the distinction.
22:50 masak would it work if I just lower-cased the word?
22:51 dalek rakudo/nom: 569deeb | pmichaud++ | src/core/operators.pm:
22:51 dalek rakudo/nom: Fix problem with two sequence operators being active at the same time (RT #98790).
22:51 dalek rakudo/nom:
22:51 dalek rakudo/nom: This commit doesn't fix the actual underlying problem, which is
22:51 dalek rakudo/nom: that lexically nested subs aren't being cloned properly.  jnthn++
22:51 flussence .oO( -p = -np )
22:51 dalek rakudo/nom: is working on that issue.  Instead, this patch simply inlines the
22:51 dalek rakudo/nom: nested sub instead of calling it separately.
22:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/569deeb7f7
22:51 sorear Haskell'98 has the ad-hoc rule that if you explitly import the Prelude, there's no prepending
22:52 sorear I think the Perl 6 outer scope way is much more elegant
22:52 masak aye.
22:52 lumi__ joined #perl6
22:52 masak especially since we got it to be an outer lexical scope, not just surrounding code.
22:53 dalek roast: ff21ee5 | pmichaud++ | S03-sequence/basic.t:
22:53 dalek roast: Unfudge passing tests for RT #98790, RT #75768.
22:53 dalek roast: review: https://github.com/perl6/roast/commit/ff21ee5d8a
22:54 jnthn > say (1...5), (5...1)
22:54 jnthn 1 2 3 4 55 4 3 2 1
22:54 jnthn \o/
22:54 jnthn (that's without pmichaud++'s patch, and teh underlying issue fixed)
22:55 masak \o/
22:56 pmichaud \o/
22:56 pmichaud lots of fixes today :)
22:56 sorear jnthn++
22:59 diakopter jnthn: does man_or_boy still work? :)
23:00 jnthn diakopter: Well, spectesting, so will know soon :)
23:03 jnthn diakopter: yes \o/
23:05 diakopter ]o[
23:05 lumi__ joined #perl6
23:09 sjohnson /o\
23:10 pmichaud \o/
23:10 sjohnson heheh
23:10 * sorear runs
23:10 sjohnson looks like a cheerleading move
23:11 masak "who's the King? U.R.! who's the King? U.R.! A.R.T.H.U.R.!'
23:11 masak s/'/"/
23:13 masak 'night, channel
23:13 dalek rakudo/nom: efe1f21 | jonathan++ | src/Perl6/Metamodel/ParametricRoleHOW.pm:
23:13 dalek rakudo/nom: Tiny refactor in preparation for implementing multiple roles with the same shortname.
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/efe1f21253
23:13 dalek rakudo/nom: 00a1159 | jonathan++ | src/Perl6/ (2 files):
23:13 dalek rakudo/nom: Fix closure handling bug with nested subs; should fix it for my-scoped methods/regexes too.
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/00a11597b2
23:14 jnthn oh, a bonus patch I forgot I'd done... :)
23:18 lumi__ joined #perl6
23:50 molaf_ joined #perl6
23:57 lumi__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo