Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-07-24

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 Ex joined #perl6
00:36 TimToady you'll know how my life has been when I tell you that I'm currently backlogging July 5th
00:48 quietfanatic joined #perl6
00:49 supernovus here's the url for my port, with two different options for obtaining the libcurl constants: https://github.com/supernovus/perl6-libcurl
00:50 supernovus it doesn't do much yet, but it'll get better when I have spare time to work on it :-)
00:51 TimToady faith-in-the-future++
01:02 awwaiid joined #perl6
01:08 scott__ joined #perl6
01:12 tokuhiro_ joined #perl6
01:26 thou joined #perl6
02:06 charsbar_____ joined #perl6
02:06 arnsholt_ joined #perl6
02:07 mattp_ joined #perl6
02:07 Bucciarati joined #perl6
02:07 Tene joined #perl6
02:07 Tene joined #perl6
02:07 pnu joined #perl6
02:07 scott__ joined #perl6
02:07 larks_ joined #perl6
02:08 ponbiki joined #perl6
02:08 nuba joined #perl6
02:09 OuLouFu joined #perl6
02:12 Ex joined #perl6
02:12 Ex joined #perl6
02:36 Psyche^ joined #perl6
03:38 snearch joined #perl6
03:39 am0c joined #perl6
03:59 cognominal joined #perl6
04:11 dalek roast: a57ed69 | coke++ | S32-num/fatrat.t:
04:11 dalek roast: pugs fudge
04:11 dalek roast: review: https://github.com/perl6/roast/commit/a57ed69f09
04:12 dalek Pugs.hs: d445250 | coke++ | t/spectest.data:
04:12 dalek Pugs.hs: run fudged test
04:12 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/d445250549
04:29 drbean joined #perl6
04:30 kaare_ joined #perl6
04:36 telex joined #perl6
04:40 kaare__ joined #perl6
04:48 telex joined #perl6
04:50 birdwindupbird joined #perl6
05:12 adu joined #perl6
05:23 moritz tadzik: https://gist.github.com/3168196 panda bootstrap failure
05:23 moritz tadzik: and merging the branch a day before the star released might have not been the best of ideas :-)
05:41 moritz tadzik: it loads ext/File__Tools/lib/Shell/Command.pm instead of the .pir version
05:45 nodmonkey joined #perl6
05:46 moritz at the time panda is compiled, we don't need anything from ext/ in PERL6LIB anymore, right?
05:54 mikemol joined #perl6
06:09 wtw joined #perl6
06:10 kaleem joined #perl6
06:17 crab2313 joined #perl6
06:17 tadzik moritz: yes
06:17 tadzik moritz: oh, forgot about Star
06:18 tadzik can we ship the pre-merge snapshot?
06:18 ingy .
06:18 phenny ingy: 23 Jul 14:20Z <[Coke]> tell ingy I'm keeping pugs warm for him.
06:19 ingy [Coke]: ♥
06:21 moritz tadzik: sure, that's possible
06:23 dalek star: 3e25d93 | moritz++ | Makefile:
06:23 dalek star: fix panda revision to something before the offline-bootstrap merge
06:23 dalek star: review: https://github.com/rakudo/star/commit/3e25d9362b
06:28 tadzik moritz: it sort of surprises me though that it behaves differently on your machine
06:29 tadzik I did countless bootstraps on it recently. Maybe I did break something when resolving the conflicts
06:31 * moritz cleans out the panda dir and tries again
06:33 awwaiid joined #perl6
06:34 moritz no difference
06:34 moritz tadzik: did you rebase instead of merge?
06:34 moritz cause, you know, there's no merge commit
06:35 moritz and you don't get any conflicts on a fast-forward merge
06:36 moritz tadzik: oh, and using : as path separator for PERL6LIB is going to break on windows
06:37 tadzik yeah, must've git pull --rebase. Dang
06:37 tadzik I'll look into it soon
06:38 * tadzik commutees
06:38 tadzik I did merge, but then git pull --rebase as usual Y/
06:38 tadzik :/
06:39 moritz tadzik: you can probably find the merge commit in 'git reflog', and then force-push that one
06:39 moritz dunno if that makes a difference
06:44 moritz tadzik: https://gist.github.com/3168196#file_workaround.patch that fixes the bootstrap for me, but it feels like a workaround, not a fix
06:52 cognominal joined #perl6
06:54 SamuraiJack joined #perl6
06:55 kresike joined #perl6
06:56 kresike good morning all you happy perl6 people
06:57 mhasch good `time-of-day`, kresike
06:58 kresike hello mhasch o/
07:00 ingy [Coke]: let's chat tomorrow about pugs. I'm off to zzzz
07:01 GlitchMr joined #perl6
07:17 cognominal joined #perl6
07:26 tadzik moritz: I think I'll just revert this and that and try offline-bootstrap later on
07:27 tadzik . o O ( git pull; pit bull )
07:27 tadzik hmm
07:28 tadzik ok, force push it is
07:28 tadzik hope nobody notices :)
07:29 tadzik zing! Nobody noticed
07:29 tadzik moritz: could you please re-check if master works fine now?
07:43 mucker joined #perl6
07:54 masak good antenoon, #perl6
07:55 xinming joined #perl6
07:55 tadzik but... but it's still moaning!
07:58 timotimo tadzik: wouldn't it be more like a pit gull? i wonder what a pit gull would look like ...
08:02 timotimo how hard would it be to write a custom perl6 compiler (a modified rakudo, for instance) that inspects code and tries to infer the strictest type annotations for parameters and variables and then writes those out to the compiled module file in addition to the annotations already present?
08:05 tadzik timotimo: oh, I'll _so_ draw a pit gull, if only I didn't just have assigned 6 tickets to myself :P
08:14 GlitchMr joined #perl6
08:15 fhelmberger joined #perl6
08:29 hoelzro joined #perl6
08:30 arnsholt_ r: sub t(&cb(int --> num)) { * }; say &t.signature.params[0].signature.returns;
08:30 p6eval rakudo 3ac8c7: OUTPUT«No such method 'signature' for invocant of type 'Parameter'␤  in block <anon> at /tmp/TClRTCVuqf:1␤␤»
08:30 arnsholt_ Oh, derp. I've not pushed that patch upstream yet
08:31 tadzik ooh
08:32 tadzik that's something I could use in Typed::Subroutines :)
08:32 tadzik I think
08:32 arnsholt Gimme a sec and I'll push it
08:32 tadzik no hurry, I probably won't have tuits until tomorrow evening anyway :)
08:39 kaare__ joined #perl6
08:46 am0c joined #perl6
08:54 jnthn ohhai o/
08:54 diakopter o/
08:54 MayDaniel joined #perl6
08:57 masak jnthn! \o/
09:02 seldon joined #perl6
09:02 dakkar joined #perl6
09:15 bbkr joined #perl6
09:34 seldon_ joined #perl6
09:43 moritz tadzik: yes, panda works again
09:45 tadzik ok cool
09:47 arnsholt r: sub a(int --> num) { * }; say &a.signature.returns
09:47 p6eval rakudo 3ac8c7: OUTPUT«Mu()␤»
09:47 arnsholt r: sub a(int ) returns num { * }; say &a.signature.returns
09:47 p6eval rakudo 3ac8c7: OUTPUT«num()␤»
09:48 arnsholt jnthn: How hard d'you think it'd be to make the --> form of returns bind the return type to the signature?
09:49 jnthn arnsholt: Hm, shouldn't be too hard.
09:49 arnsholt 'cause I kinda need it for the callbacks to work =)
09:49 jnthn arnsholt: Ah.
09:50 jnthn arnsholt: Do you need it to work for this case or for the nested signature case?
09:50 arnsholt For the nested signature case
09:51 arnsholt Hopefully it's the same bit of code for the two
09:52 jnthn Yeah, I hope so too...
09:53 jnthn Hmm
09:53 jnthn Thing is that we construct signatures quite lazily
09:53 jnthn (as in, the thing they're getting attached to - if anything - is what invokes their construction)
09:54 jnthn You'll see that method signature actually just sets up an array of hashes describing parameters.
09:54 arnsholt Aha. And the sig object is only created when it's first requested?
09:55 jnthn No
09:55 jnthn It's created at compile time always
09:55 jnthn It's just delayed until, say, method_def or routine_def
09:55 jnthn It's 'cus they want to twiddle defaults to be Any, not Mu
09:55 jnthn Or in the method case add the implicit invocant and *%_
09:56 jnthn We always end up in create_signature_object
09:57 arnsholt Hmm. But the nesteds won't pass through method/routine_def in the same way the top level sigs do?
09:57 jnthn No, but they'll still result in a call to create_signature_object, so that's fine.
09:57 jnthn It's just how we convey the return type up to that point
09:58 jnthn I guess we could try shoving it into the array as an extra, specially marked entry
10:02 arnsholt r: sub test($x --> Int) returns Num { say $x; 1.2e0; }; test('hmm?')
10:02 p6eval rakudo 3ac8c7: OUTPUT«hmm?␤»
10:02 arnsholt r: sub test($x --> Int) returns Num { say $x; 1.2e0; }; say test('hmm?')
10:02 p6eval rakudo 3ac8c7: OUTPUT«hmm?␤1.2␤»
10:02 arnsholt r: sub test($x --> Int) returns Num { say $x; 1; }; say test('hmm?')
10:02 p6eval rakudo 3ac8c7: OUTPUT«hmm?␤Type check failed for return value; expected 'Num' but got 'Int'␤  in sub test at /tmp/RCpqVOcsGU:1␤  in block <anon> at /tmp/RCpqVOcsGU:1␤␤»
10:02 arnsholt Heh
10:03 tadzik not Num enough ;)
10:03 moritz get Real!
10:03 arnsholt Well, how do you choose between the --> form and the returns trait? ^_^
10:03 tadzik I prefer returns myself
10:04 * moritz too
10:04 tadzik it doesn't look like another argument then
10:04 arnsholt Well, that's true. But for nested signatures Rakudo only supports the --> form
10:04 tadzik and I tend to like when the code looks like prose :P
10:04 jnthn std: sub foo(--> Int) returns Int { }
10:04 p6eval std d5bea92: OUTPUT«[31m===[0mSORRY![31m===[0m�Extra 'of' type; already declared as type Int at /tmp/XvLRVj8xb9 line 1:�------> [32msub foo(--> Int) returns Int [33m�[31m{ }[0m�Check failed�FAILED 00:00 41m�»
10:05 jnthn Should complain if you write both.
10:05 arnsholt Yeah, I assumed so
10:05 arnsholt r: sub test(&cb() returns Int) { * }
10:05 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤Missing block␤at /tmp/ck7nqDddJw:1␤»
10:06 arnsholt tadzik: That's my use-case above, so returns isn't an option, unfortunately
10:07 masak tadzik: I tend to like it when the code looks like the problem domain it's in.
10:07 tadzik I see
10:07 tadzik that toto
10:07 tadzik toot toot
10:11 diakopter r: say sub () { } ~~ /a/
10:11 p6eval rakudo 3ac8c7: OUTPUT«#<failed match>␤»
10:11 diakopter r: say sub () { } ~~ /./
10:11 p6eval rakudo 3ac8c7: OUTPUT«No such method 'substr' for invocant of type 'Sub'␤  in method Str at src/gen/CORE.setting:9611␤  in method Stringy at src/gen/CORE.setting:715␤  in method gist at src/gen/CORE.setting:9667␤  in sub say at src/gen/CORE.setting:6985␤  in block <anon> at /tmp/69wyWgl…
10:11 diakopter why the difference ^^
10:16 jnthn Hm. Probably because the second one matches.
10:17 diakopter how can it match but not be say-able
10:17 jnthn r: sub foo() { }; say &foo.Str
10:17 p6eval rakudo 3ac8c7: OUTPUT«foo␤»
10:17 jnthn r: sub foo() { }; say &foo.substr(0, 1)
10:17 p6eval rakudo 3ac8c7: OUTPUT«No such method 'substr' for invocant of type 'Sub'␤  in block <anon> at /tmp/VrRwv2IroT:1␤␤»
10:18 diakopter how does ~~ /./ know to stringify first but say doesn't
10:18 kaleem_ joined #perl6
10:19 arnsholt Say calls .gist, doesn't it?
10:20 jnthn Right
10:21 daxim joined #perl6
10:21 jnthn Well, it's probably more that when it matches it forces it to stringify (calls .Str), but it doesn't explicitly do that when displaying the match.
10:22 kaleem joined #perl6
10:26 arnsholt Hmm. This is a more involved hack than my previous Rakudo ones
10:48 dalek rakudo/toqast: 633f401 | jnthn++ | src/ (2 files):
10:48 dalek rakudo/toqast: Fix up handling of failed symbol lookups, thus eliminating a couple of reamining NPMCAs and fixing a couple more tests.
10:48 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/633f4015e3
10:55 moritz arnsholt: iirc I've pushed a patch to nom that adds Parameter.sub_signature
10:56 mucker joined #perl6
10:59 arnsholt moritz: Oh. I've a patch that adds Parameter.signature =)
11:00 JimmyZ joined #perl6
11:03 birdwindupbird joined #perl6
11:04 moritz arnsholt: I don't think we should push both :-)
11:04 moritz arnsholt: and I prefer something with 'sub' in the name, to make it clear it's not a backreference to the signature that contains the parameter
11:04 arnsholt I'll back out mine, since it's only local
11:05 arnsholt Yeah, sub_ is a point. OTOH it'd be nice to have the symmetry with Routine.signature
11:06 moritz hm, good point too
11:08 arnsholt Back in a bit
11:08 arnsholt lunch &
11:09 moritz ooh, toqast spectes summary now fits on a single screen page :-)
11:10 dalek nqp/toqast: c21542a | jnthn++ | src/QAST/ (2 files):
11:10 dalek nqp/toqast: Restore line number annotation emission. Fixes callframe.t.
11:10 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/c21542ac36
11:11 brrt joined #perl6
11:11 jnthn moritz: What's your latest ooc?
11:16 dalek rakudo/toqast: d0dc2d3 | moritz++ | src/core/IO/Socket/INET.pm:
11:16 dalek rakudo/toqast: explicitly set encoding on sockets
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/d0dc2d33d0
11:16 dalek rakudo/toqast: e09fbe6 | moritz++ | src/core/IO/Socket/INET.pm:
11:16 dalek rakudo/toqast: Merge remote branch 'remotes/origin/parrot-iocleanup1' into nom
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/e09fbe6870
11:16 dalek rakudo/toqast: cd31947 | moritz++ | src/core/List.pm:
11:16 dalek rakudo/toqast: fix List.tree
11:16 dalek rakudo/toqast:
11:16 dalek rakudo/toqast: it got broken by the last API change of MapIter.new
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/cd31947243
11:16 dalek rakudo/toqast: 6db12d6 | moritz++ | src/core/IO/Socket/INET.pm:
11:16 dalek rakudo/toqast: Revert "Merge remote branch 'remotes/origin/parrot-iocleanup1' into nom"
11:16 dalek rakudo/toqast:
11:16 dalek rakudo/toqast: This reverts commit e09fbe68707707004d1111dba7b0b6fb9e100541, reversing
11:16 dalek rakudo/toqast: changes made to 5b56cfcf9286e70b9a77a73369b80ad98ad10786.
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/6db12d6e97
11:16 dalek rakudo/toqast: 3ac8c77 | moritz++ | src/core/List.pm:
11:16 dalek rakudo/toqast: fix another misuse of MapIter.new, felher++
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3ac8c77fd7
11:16 dalek rakudo/toqast: acf9778 | jnthn++ | src/core/List.pm:
11:16 dalek rakudo/toqast: Merge branch 'nom' into toqast
11:16 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/acf9778869
11:16 jnthn Well. That worked out well for moritz :P
11:17 jnthn I think we're down to a single figure number of spectests in need to triage now.
11:18 JimmyZ jnthn++
11:20 birdwind1pbird joined #perl6
11:20 arnsholt jnthn: Any opinions on Parameter.sub_signature vs. Parameter.signature?
11:28 moritz jnthn: http://perlpunks.de/paste/show/500e86e5.404c.6
11:29 moritz now tree.t should pass again
11:29 jnthn arnsholt: I worry a little that .signature may get confused with "the signature that this parameter is in"
11:30 tokuhiro_ joined #perl6
11:30 jnthn moritz: and I fixed t/spec/S06-advanced/callframe.rakudo
11:30 jnthn (in the patch I pushed to nqp/toqast a few moments ago)
11:30 jnthn Potentially that fixes t/spec/integration/error-reporting.rakudo too
11:31 jnthn The two S12 ones are still a little mysterious.
11:32 GlitchMr > chdir '~'
11:32 GlitchMr Failed to change the working directory to '~': chdir failed: No such file or directory
11:32 GlitchMr perl6: chdir '~'
11:32 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: chdir may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (chdir @ 0) ␤  at /tmp/LDYZ3t3YDl line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…
11:32 p6eval ..rakudo 3ac8c7: OUTPUT«Failed to change the working directory to '~': chdir failed: No such file or directory␤  in block <anon> at src/gen/CORE.setting:7404␤  in sub chdir at src/gen/CORE.setting:7399␤  in block <anon> at /tmp/MMAI8X3l25:1␤␤»
11:32 GlitchMr Wait, so '~' directory doesn't exist
11:33 dalek rakudo/toqast: 7f3a7b2 | jnthn++ | src/Perl6/Actions.pm:
11:33 dalek rakudo/toqast: Fix detection of existing CATCH in a try, fixing one of the broken tests in catch.t.
11:33 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/7f3a7b297d
11:33 GlitchMr oh, right, it's shell magic
11:36 arnsholt Yep
11:36 daxim http://developers.slashdot.org/story/12/07/2​3/0644246/the-21st-ioccc-has-been-announced
11:37 arnsholt But you can do the same thing with ENV<HOME>
11:38 tadzik on unix
11:38 JimmyZ_ joined #perl6
11:38 tadzik HOMEDIR on windows
11:38 tadzik we need File::HomeDir and do this properly
11:39 arnsholt Aha. Windows keeps messing up my perfectly fine Unix-centric solutions =)
11:39 GlitchMr perl6: run 'echo', 'world'
11:39 p6eval rakudo 3ac8c7: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub run at src/RESTRICTED.setting:8␤  in block <anon> at /tmp/tbXBok7SQZ:1␤␤»
11:39 p6eval ..niecza v19-13-g442e075: OUTPUT«Unhandled exception: run may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (run @ 0) ␤  at /tmp/vgpS3cjxmP line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.…
11:40 GlitchMr Just wondering, will be "run" implemented in Rakudo in near future
11:41 tadzik not unless somebody implements it ;)
11:41 GlitchMr What's so difficult in running programs without shell?
11:42 GlitchMr execvp()?
11:43 tadzik well volunteered :
11:43 tadzik :)
11:44 GlitchMr If I can do this without problem on C, why it would be problematic in Perl 6?
11:45 tadzik may be that it isn't
11:45 tadzik shouldn't that be motivating for you?
11:45 tadzik sitting there and saying "go on guys, it's probably easy" isn't pushing the work forward
11:45 tadzik you can also contribute and make world a better place :)
11:47 GlitchMr Well, I don't know how to modify anything in rakudo
11:47 hoelzro GlitchMr: sounds like a good time to learn =)
11:47 tadzik it's not really different than modifying any other Perl 6 code
11:48 moritz when we started, none of us knew anything about changing stuff in rakudo
11:48 GlitchMr src/core/control.pm
11:48 GlitchMr 168:    die 'run() is not yet implemented, please use shell() for now';
11:48 GlitchMr possibly...
11:49 GlitchMr But now the problem is that I probably would have to get into lower level
11:50 GlitchMr Perhaps nqp could do it
11:50 GlitchMr Or Parrot itself
11:51 arnsholt One option would be to implement the fork/exec pair in C in NQP, expose it as an op and then call that from Rakudo
11:52 GlitchMr Would fork work in Windows?
11:52 arnsholt I've no idea. I only speak Unix =)
11:53 GlitchMr multi run   ( *$cmd, *@args, :$bg,  :%env = %*ENV --> Proc::Status )
11:53 GlitchMr What is *$?
11:53 GlitchMr I know that *@ is flattened list, but what is *$
11:57 GlitchMr Is there any documentation on pir:: (Parrot) methods?
11:57 tadzik docs.parrot.org, look for Opcodes
11:59 GlitchMr What is __Is?
11:59 GlitchMr Actually, what are those prefixes
11:59 tadzik postfixes
11:59 tadzik it's the signature, what arguments does the opcode take
12:00 tadzik here's it's int and str, where Int is... boxed? rw? I don't remember
12:01 flussence yeah, capital letters are boxed iirc
12:02 GlitchMr spawnw(out INT, invar PMC)
12:02 GlitchMr What is PMC?
12:02 flussence parrot object pointer... thingy
12:03 arnsholt It's what Parrot calls its objects
12:03 Timbus they used to be magic cookies
12:03 sisar joined #perl6
12:03 arnsholt (Originally Parrot Magic Cookie if memory serves, PolyMorphic Container these days IIRC)
12:03 sisar hello #perl6 !
12:03 Timbus yes that name is a bit stale now
12:04 GlitchMr "Spawn a subprocess whose program name and arguments are contained in the array $2 and wait for it to finish."
12:04 GlitchMr How can I make Parrot array
12:04 arnsholt ResizablePMCArray
12:04 Timbus tie a bunch of them together
12:04 tadzik hello sisar
12:04 GlitchMr I'm getting confused already
12:05 GlitchMr pir::new('ResizablePMCArray')?
12:05 arnsholt There's a standard PMC called ResizablePMCArray
12:05 birdwindupbird joined #perl6
12:06 GlitchMr r: pir::new('ResizablePMCArray') = 3
12:06 p6eval rakudo 3ac8c7: OUTPUT«(signal SEGV)»
12:06 GlitchMr I guess I shouldn't do it
12:06 tadzik :)
12:06 tadzik it should react to nqp::push alright
12:07 GlitchMr Cannot assign a non-Perl 6 value to a Perl 6 container
12:07 GlitchMr ok
12:07 tadzik r: my Mu $a := pir::new('ResizablePMCArray'); nqp::push($a, nqp::unbox_i(5));
12:07 p6eval rakudo 3ac8c7:  ( no output )
12:07 tadzik so far so good
12:07 arnsholt You'll probably have to bind it with :=
12:07 arnsholt Yeah, what tadzik said
12:07 tadzik r: my Mu $a := pir::new('ResizablePMCArray'); nqp::push($a, nqp::unbox_i(5)); nqp::say(nqp::join($a, nqp::unbox_s('')))
12:07 p6eval rakudo 3ac8c7: OUTPUT«␤»
12:07 tadzik hrm
12:08 tadzik r: my Mu $a := pir::new('ResizablePMCArray'); nqp::push($a, nqp::unbox_i(5)); nqp::say(nqp::join(nqp::unbox_s(''), $a))
12:08 p6eval rakudo 3ac8c7: OUTPUT«5␤»
12:08 tadzik aye, win
12:08 tadzik lots of nqp:: and pir::, lots of unboxing; that's the prize for mangling on low level
12:09 GlitchMr pir::shr__0II
12:09 GlitchMr What is that?
12:09 tadzik looks like shift-right
12:10 tadzik 0 doesn't ring a bell to me though
12:10 GlitchMr ok :)
12:11 GlitchMr Is there any list of those prefixes thingy
12:12 jerome joined #perl6
12:20 dalek rakudo/toqast: e084b07 | jnthn++ | src/Perl6/Actions.pm:
12:20 dalek rakudo/toqast: Fix last remaining failures in catch.t.
12:20 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/e084b07190
12:20 arnsholt jnthn: Looks like the signature action method assumes that a signature only contains parameters, but I'm a bit wary of changing the data it returns, since it's used all over the place. Any thoughts?
12:22 jnthn arnsholt: Yeah, it being used in a fair few places worried me a bit too...
12:23 jnthn arnsholt: Though it probably is the right thing to do really.
12:23 jnthn Having an extra thing in the array is possible, though potentially a bit of a hack and may make things harder really.
12:23 arnsholt What's the reason Actions.signature doesn't create the signature object and the thing using it attaches it?
12:24 jnthn Because other things higher up want to change things in it.
12:24 cognominal_ joined #perl6
12:24 arnsholt Right. In which case it makes sense to delay the creation
12:25 arnsholt One thing I considered was to make the signature action attach a returns trait to the declared thing, but I can't quite see a way to do it
12:25 jnthn The best solution (through a bit of a refactor) is if signature were to return a hash a key params which points to the array we have today, and optionally another key returns.
12:25 GlitchMr Now, how I could call this: spawnw(out INT, invar PMC)
12:26 arnsholt Yeah, probably the easiest
12:26 GlitchMr pir::spawnw__I?()
12:26 GlitchMr Or am I doing something wrongly
12:26 jnthn GlitchMr: pir::spawn__IP(...)
12:26 arnsholt spawnw__IP I think
12:26 jnthn er, spawnw
12:26 arnsholt The first one is the return type, then the rest of them are the argument types
12:27 jnthn r: pir::spawn__IP('foo')
12:27 p6eval rakudo 3ac8c7: OUTPUT«use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤==​=SORRY!===␤error:imcc:syntax error, unexpected IREG, expecting …
12:27 jnthn r: pir::spawn__IP('foo'); 1
12:27 p6eval rakudo 3ac8c7: OUTPUT«use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤==​=SORRY!===␤error:imcc:syntax error, unexpected IREG, expecting …
12:27 arnsholt Mmmm. imcc error
12:28 jnthn r: nqp::p6box_i(pir::spawn__IP('foo'))
12:28 p6eval rakudo 3ac8c7: OUTPUT«use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context  in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤==​=SORRY!===␤error:imcc:syntax error, unexpected IREG, expecting …
12:28 snearch joined #perl6
12:28 jnthn oh
12:28 jnthn I spelt the op wrong again!
12:28 jnthn r: nqp::p6box_i(pir::spawnw__IP('foo'))
12:28 p6eval rakudo 3ac8c7: OUTPUT«elements() not implemented in class 'Str'␤  in block <anon> at /tmp/HQc8A8iyNt:1␤␤»
12:28 jnthn r: nqp::p6box_i(pir::spawnw__IP(nqp::list('foo')))
12:28 p6eval rakudo 3ac8c7:  ( no output )
12:28 jnthn r: say nqp::p6box_i(pir::spawnw__IP(nqp::list('foo')))
12:28 p6eval rakudo 3ac8c7: OUTPUT«65280␤»
12:28 jnthn r: say nqp::p6box_i(pir::spawnw__IP(nqp::list('sh')))
12:28 p6eval rakudo 3ac8c7: OUTPUT«sh: 1: Land: not found␤sh: 2: Land: not found␤sh: 3: Land: not found␤sh: 4: Heimat: not found␤sh: 5: Volk,: not found␤sh: 6: vielgerühmtes: not found␤sh: 7: vielgerühmtes: not found␤sh: 9: Heiß: not found␤sh: 10: liegst: not found␤sh: 11: einem: not found␤sh: 12: H…
12:28 jnthn WHOA!
12:29 moritz it gets the standard input from evalbot
12:29 jnthn :)
12:29 moritz r: say nqp::p6box_i(pir::spawnw__IP(nqp::list('ls', '/home')))
12:29 p6eval rakudo 3ac8c7: OUTPUT«andara␤ash␤azawawi␤coke␤cygx␤diakopter␤drai​n␤flussence␤infinoid␤japhb␤moritz␤p6eval␤runpugs␤s​narkyboojum␤sorear␤szabgab␤tene␤tewk␤tryrakudo␤0␤»
12:29 moritz can anybody please test that on windows?
12:29 moritz I mean, spawn with an nqp::list
12:30 moritz r: say nqp::p6box_i(pir::spawnw__IP(nqp::list('ls', '~'))) # just checkin'
12:30 p6eval rakudo 3ac8c7: OUTPUT«ls: cannot access ~: No such file or directory␤512␤»
12:30 moritz \o
12:30 jnthn say nqp::p6box_i(pir::spawnw__IP(nqp::list('explorer', '.'))) # works nicely
12:31 arnsholt Actions.pm is NQP, right?
12:31 jnthn arnsholt: Written in NQP, yes.
12:32 masak today, when you all have time, I'd like to talk about the four terms "abstraction", "encapsulation", "data hiding", and "information hiding". what they all mean to you, and whether some of them are equivalent or not. I had this discussion on #ruby yesterday, and it was very interesting.
12:32 jnthn Somehow, "abstraction" feels like a combo breaker in that list :)
12:33 masak I'd like to recommend http://c2.com/cgi/wiki?Encaps​ulationIsNotInformationHiding as reading material.
12:33 masak jnthn: well, yes and no.
12:33 masak jnthn: "abstraction" enters into it all, though I agree it's the outgroup in the phylogenetic tree.
12:33 moritz ok, "abstraction" means to me that there's some way to do stuff without taking care of all the details myself
12:34 GlitchMr I have feeling I made run() command for Rakudo: http://paste.uk.to/60723c38
12:34 GlitchMr But... I find this array creation method ugly...
12:34 GlitchMr Is there better way?
12:35 masak "to abstract" means "to pull away" from insignificant details. so, the variable '$x' abstracts a certain value in an algorithm, for example.
12:35 jnthn my $parrot_args := pir::new 'ResizablePMCArray';
12:35 jnthn use
12:35 jnthn my $parrot_args := nqp::list();
12:36 moritz or
12:36 GlitchMr Thanks :)
12:36 moritz nqp::getattr(@args.eager, List, '$!items')
12:36 jnthn ooh
12:36 moritz GlitchMr: and please throw an exception when the return is not a success
12:36 jnthn That does avoid the loop, yes
12:36 moritz oh, but coerce everything to Str first
12:36 GlitchMr https://github.com/perl6/roast/bl​ob/master/S29-os/system.t#L4-L29
12:36 moritz (*@args is copy)
12:37 GlitchMr Exception? Weird, but Perl 6 specification says to return integer value then
12:37 moritz GlitchMr: the tests might disagree, I don't care :-)
12:37 moritz and the specs can also be adapted
12:37 GlitchMr The return value of either function is the exit status of the program, and can be evaluated in the following contexts:
12:37 GlitchMr oh, but I will fix it
12:37 moritz but the general trend is to die or fail when something fails
12:38 moritz in the very least if spawning the process fails
12:38 moritz if the return value is non-zero, it might be OK not to die
12:40 nightlord joined #perl6
12:40 moritz jnthn: any pointers on how to re-enable line numbers? or are you working on that?
12:41 jnthn moritz: I pushed a patch to nqp/toqast earlier for it.
12:41 jnthn c21542ac
12:41 GlitchMr ok, it looks like http://paste.uk.to/ec04a604 for now
12:42 moritz jnthn: oh, then I just didn't notice it
12:42 jnthn By my counting, we're now down to 2 tests files that need some native types stuff, 1 macros test file that needs diagnosis/fixing, and two undiagnosed failures in S12.
12:43 GlitchMr That "return $result but !$result;" is kind of platform specific, but well...
12:43 GlitchMr On most platforms (aside of VMS), success is 0
12:44 moritz GlitchMr: please make it die or fail if the spawning of the process fails
12:44 GlitchMr But... it isn't in the specification... I guess that specification needs to be updated then
12:45 GlitchMr Also, how can I recognize if spawning of the process fails
12:45 moritz isn't that encoded in the return value of spawn?
12:45 moritz and yes, the specs might need updating
12:46 GlitchMr On my system, running unexistant program returns 255
12:46 GlitchMr But I get this same result with: run 'perl', '-e', 'exit 255'
12:46 moritz does the parrot documentation say anything about it?
12:47 GlitchMr http://docs.parrot.org/parrot/l​atest/html/src/ops/sys.ops.html
12:47 GlitchMr Possibly $!, but this feels system specific
12:48 GlitchMr err()*
12:48 moritz well, better than not having any information at all
12:48 moritz we have X::OS exceptions for system specific error messages
12:49 birdwind1pbird joined #perl6
12:49 GlitchMr Actually, I think it could be realistic
12:49 GlitchMr Just run pir::err__I() and I get ID
12:50 GlitchMr pir::err_S() for string
12:50 moritz the question if, if you have to shift 8 bits to get to the return value, what's in those 8 shifted bits?
12:50 moritz perl 5 puts some information in there
12:50 GlitchMr ... I have no idea
12:50 moritz perldoc -f system has lots of info about that
12:53 GlitchMr On my system, trying to run unexistant program returns
12:53 GlitchMr 65280 = 0xFF00 = 0b1111111100000000
12:53 GlitchMr So, those bits seem... useless... at least for that purpose
12:54 PacoAir joined #perl6
12:54 GlitchMr run 'perl', '-e', 'exit 255'; also gives this same result
12:57 GlitchMr And "pir::err__I()" ALWAYS returns me "No such file or directory" for some reason
12:57 GlitchMr r: say pir::err__I()
12:57 p6eval rakudo 3ac8c7: OUTPUT«No such method 'gist' for invocant of type 'Integer'␤  in sub say at src/gen/CORE.setting:6985␤  in block <anon> at /tmp/j6zvjHxvDM:1␤␤»
12:57 GlitchMr r: say +pir::err__I()
12:57 p6eval rakudo 3ac8c7: OUTPUT«2␤»
12:58 GlitchMr r: say ~pir::err__S()
12:58 p6eval rakudo 3ac8c7: OUTPUT«No such file or directory␤»
13:00 sergot joined #perl6
13:01 eviltwin_b joined #perl6
13:01 birdwindupbird joined #perl6
13:02 eviltwin_b joined #perl6
13:13 GlitchMr Any ideas about exceptions in run() and shell()?
13:14 masak what exceptions would those throw?
13:14 GlitchMr Checking for error is easy - anything else than 0. But checking what error it is... well...
13:14 GlitchMr My current code looks like:
13:14 GlitchMr http://paste.uk.to/29eecca3
13:22 moukeddar joined #perl6
13:25 moritz X::OS::Spawn or X::OS::Run
13:25 moritz masak: did your macro investigations get anywhere?
13:27 tadzik GlitchMr++ # contributing
13:27 masak moritz: haven't dug into it any further. I may tonight after $work.
13:28 moritz r: ␤␤␤ f()
13:28 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&f' called (line 1)␤»
13:28 moritz line 1, eh?
13:28 moritz r: ␤␤␤ say 4?LINE
13:28 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/qaVxbfQRPr:1␤»
13:29 moritz r: ␤␤␤ say $?LINE
13:29 p6eval rakudo 3ac8c7: OUTPUT«1␤»
13:29 moritz r: 1;␤␤␤ say $?LINE
13:29 p6eval rakudo 3ac8c7: OUTPUT«4␤»
13:29 kaleem joined #perl6
13:29 moritz r: use v6;␤␤␤ say $?LINE
13:29 p6eval rakudo 3ac8c7: OUTPUT«4␤»
13:29 moritz bug!
13:29 moritz t: use v6;␤␤␤ say $?LINE
13:29 p6eval toqast : OUTPUT«4␤»
13:29 moritz t: use v6;␤␤␤ foo()
13:29 p6eval toqast : OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 1)␤»
13:29 skids joined #perl6
13:29 moritz that (line 1) is also wrong
13:30 tokuhiro_ joined #perl6
13:30 moritz r: use v6;␤␤␤ foo()
13:30 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 4)␤»
13:30 moritz that's what makes t/spec/integration/error-reporting.rakudo fail test 4
13:31 moritz and the socket tests fail with "Malformed UTF-8 string in sub QX" here
13:32 [Coke] GlitchMr++ #spawn!
13:35 pluto_ joined #perl6
13:39 jnthn r: use v6;␤␤␤ foo()
13:39 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 4)␤»
13:39 jnthn t: use v6;␤␤␤ foo()
13:39 p6eval toqast : OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&foo' called (line 1)␤»
13:40 jnthn hmm
13:40 GlitchMr So, I have working run() command... except I don't know WHEN to throw exception
13:42 moritz the most reliable approach is to read parrot's source code
13:42 moritz to find out about possible error conditions, and how to detect them on the caller's side
13:43 GlitchMr Except I think that spawnw uses execvp internally
13:45 moritz don't think, read
13:45 moritz well, do both :-)
13:56 bluescreen10 joined #perl6
13:57 GlitchMr > run
13:57 GlitchMr Empty argument array for execvp
13:59 crab2313 joined #perl6
14:02 moritz we should catch that earlier
14:02 moritz sub run(*@args ($, *@)) { ... }
14:02 moritz then you need to call it with at least one argument
14:04 tadzik r: sub run(*@args ($, *@)) { ... }; sub run2(*@args where +@args) { ... }; run
14:04 p6eval rakudo 3ac8c7: OUTPUT«Not enough positional parameters passed; got 0 but expected at least 1 in sub-signature of parameter @args␤  in sub run at /tmp/NJ2c5uglie:1␤  in block <anon> at /tmp/NJ2c5uglie:1␤␤»
14:04 tadzik r: sub run(*@args ($, *@)) { ... }; sub run2(*@args where +@args) { ... }; run2
14:04 p6eval rakudo 3ac8c7:  ( no output )
14:04 tadzik sub run2(*@args where +@args > 0) { ... }; run2
14:05 tadzik r: sub run2(*@args where +@args > 0) { ... }; run2
14:05 p6eval rakudo 3ac8c7: OUTPUT«Constraint type check failed for parameter '@args'␤  in sub run2 at /tmp/iL8XmwiTqI:1␤  in block <anon> at /tmp/iL8XmwiTqI:1␤␤»
14:05 tadzik right, the first one gives a better error message
14:07 GlitchMr I had sub run (*@_ where * != 0) {... but I guess it's bad
14:09 GlitchMr Something like this: http://paste.uk.to/ce4b605f
14:09 GlitchMr ?
14:10 moritz that still doesn't die
14:11 moritz but otherwise looks better
14:11 GlitchMr The problem is that I don't know when to die
14:11 arnsholt Huh. First step was easier than I though, apparently
14:11 arnsholt Fingers crossed for the spectest
14:11 GlitchMr I would use pir::err__I(), except something is wrong with it
14:12 atrodo joined #perl6
14:12 GlitchMr It always returns 2 for me... but somehow not in REPL
14:13 GlitchMr Where it returns 0?
14:14 GlitchMr confused
14:15 moritz GlitchMr: spawnw returns the return value from waitpid
14:16 moritz GlitchMr: so read the waitpid docs to see what to make of the return value, and when to die
14:17 GlitchMr Interesting
14:18 moritz afk
14:18 GlitchMr But I guess I have problem. It should return -1, except it returns 255
14:19 arnsholt Heeheehee. t/spec/S06-signature/introspection.rakudo: No plan found in TAP output
14:19 arnsholt I think I broke it ^_^
14:30 JimmyZ_ joined #perl6
14:36 arnsholt n: sub a(--> Str) { "foo" }; say &a.signature.returns
14:36 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method returns in type Signature␤  at /tmp/xLAVPJHZub line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤  a…
14:36 arnsholt n: sub a(--> Str) { "foo" }; say &a.returns
14:36 p6eval niecza v19-13-g442e075: OUTPUT«Unhandled exception: Unable to resolve method returns in type Sub␤  at /tmp/XtU__TiEFN line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3918 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3919 (module-CORE @ 562) ␤  at /hom…
14:37 sisar joined #perl6
14:39 arnsholt I get a single spectest failure in filestat.t is that expected?
14:48 jnthn arnsholt: I get failures in taht file on Windows.
14:48 jnthn arnsholt: Could be platform specific issue.
14:48 arnsholt Quite. On my Linux, test no. 8 fails
14:51 kresike bye all
15:11 mikemol joined #perl6
15:34 hoelzro|away joined #perl6
15:44 takadonet joined #perl6
15:55 pyrimidine joined #perl6
15:58 sudokode joined #perl6
16:20 lumi_ joined #perl6
16:32 fgomez joined #perl6
16:40 nodmonkey joined #perl6
16:41 felipe joined #perl6
16:48 [hds] joined #perl6
16:51 seldon joined #perl6
16:54 dalek doc: 080974a | moritz++ | README:
16:54 dalek doc: update README
16:54 dalek doc: review: https://github.com/perl6/doc/commit/080974abf7
16:54 [Coke] r: my $p = "perl 5"; substr($p, 6, 1, '6'); say $p
16:54 p6eval rakudo 3ac8c7: OUTPUT«Too many positional parameters passed; got 4 but expected between 2 and 3␤  in sub substr at src/gen/CORE.setting:2045␤  in block <anon> at /tmp/8LwndiIhQI:1␤␤»
16:57 geekosaur substr-rw?
16:58 dalek nqp/toqast: f5d0884 | jnthn++ | src/QAST/Compiler.nqp:
16:58 dalek nqp/toqast: Don't emit variable lookup code when the variable is in void context. Cuts down on code generated for declarations, but also fixes implicit %_ handling.
16:58 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f5d08849e4
16:59 jnthn moritz: Did you manage to figure out what was going on in S12-methods/method-vs-sub.t? I know you were looking at it...
16:59 masak geekosaur: for when you want to changed the indicated subpart of a Str.
16:59 masak change*
17:00 * geekosaur thinks he just got misread
17:00 masak oh, you didn't ask what it was, sorry :)
17:00 geekosaur was responding to [Coke]'s thing
17:00 masak r: my $s = "OH HAI"; substr-rw($s, 3, 1) = 'B'; say $s
17:00 p6eval rakudo 3ac8c7: OUTPUT«OH BAI␤»
17:01 geekosaur (using substr not quite as an lvalue, but I wouldthink thta usage would either be completley wrong or go with substr-rw instead of substr)
17:02 pyrimidine joined #perl6
17:02 Tene joined #perl6
17:02 charsbar_____ joined #perl6
17:02 Pleiades` joined #perl6
17:02 lue joined #perl6
17:02 phenny joined #perl6
17:02 sivoais joined #perl6
17:02 aloha joined #perl6
17:02 felher joined #perl6
17:02 pyrimidine joined #perl6
17:03 Bucciarati joined #perl6
17:04 smash joined #perl6
17:06 rurban rakudo fails the spectests on nom and parrot-iocleanup1
17:06 rurban ERL6LIB="lib:." ./perl6 t/spec/S01-perl-5-integration/array.t   => Undefined routine '&VAR' called (line 57)
17:07 moritz geekosaur: not so wrong, it could simply return a modified copy
17:07 masak good eve'n, #perl6
17:07 moritz jnthn: no, didn't find out anything. Just that the problem is weird.
17:08 moritz rurban: it shouldn't even run that file
17:08 pyrimidine masak: whatever came about re: splitting .trans functionality?
17:08 moritz rurban: which command did you launch? 'make spectest'?
17:08 rurban make spectetst_full
17:09 moritz that runs all test files, not just those expected to pass
17:09 rurban I see, good
17:09 moritz so failures are to be expected
17:10 masak pyrimidine: in that thread, there was some very confused counter-proposing, and one approval from cjfields. there were some approving voices here on the channel, but in total the reaction hasn't superseded the friction of not changing anything, IMO.
17:10 * pyrimidine is cjfields :)
17:11 jnthn moritz: Yeah, it's weird. :)
17:11 pmichaud My sense is that there's consensus that .trans needs to change, but not (yet) on what it should change to
17:12 pmichaud but I haven't followed the thread terribly closely yet
17:12 masak yary's email can be summarized as "I've misunderstood what .trans does".
17:13 masak cjfield's email can be summarized as "I like this. I think the efficiency concerns are real."
17:14 masak pyrimidine: oh! hi :)
17:14 pyrimidine :)
17:14 pyrimidine yep, that pretty much sums it up
17:14 vmspb joined #perl6
17:15 jnthn moritz: Think I figured it...
17:15 jnthn yay.
17:15 sisar joined #perl6
17:16 pmichaud masak: now that I'm re-reading the thread a bit, what's the difference between .translate and .subst ?
17:16 pmichaud I mean, yes, they're different, but they seem related also.
17:17 jnthn moritz: It was the use of { foo => 42 } to construct hashes that was busted, of all things...
17:17 dbr joined #perl6
17:17 pyrimidine pmichaud: maybe a p5 flag for .trans?
17:19 masak pmichaud: .translate does one-pass parallel *multi-character* substring subtitution (using strings or regexes or blocks of code) on a single string.
17:20 pmichaud ...doesn't .subst do multi-character substitution, though?
17:20 masak pmichaud: .trans (as I propose it) will have more or less exactly the functionality of p5 tr///: one-pass *single-character* substring substitution (using just characters).
17:20 geekosaur fwiw I thought the proposal made a lot of sense, but as I keep demonstrating my p6fu is still somewhat weak...
17:20 [Coke] geekosaur: https://github.com/perl6/book/issues/73
17:20 masak pmichaud: subst does multi-character substitution, but serially, not in parallel.
17:20 pyrimidine masak: here is the thread: http://www.nntp.perl.org/group/perl.​perl6.language/2012/07/msg35024.html
17:20 masak that's a very important distinction.
17:20 masak pyrimidine: thank you.
17:20 pmichaud masak:  can you give an example of the difference?
17:21 masak pmichaud: the &amp; example in the p6advent post linked from my yary reply.
17:21 pmichaud looking.
17:21 pmichaud and then the question becomes, could .subst be extended to provide the parallelism?
17:21 masak ooh :)
17:21 masak I think I like that idea.
17:22 pmichaud my point is that .subst does multi-character replacement; it seems like .translate is just a generalization to doing "more than one at a t time"
17:22 pyrimidine that makes sense to me as well
17:22 pmichaud in other words, perhaps the mistake was in putting the new desired semantics into .trans instead of .subst :-)
17:22 masak yes; deflate .trans to p5 sanity levels. forget about .translate and push the semantics into .subst
17:22 dalek rakudo/toqast: eb13c5a | jnthn++ | src/Perl6/Actions.pm:
17:22 dalek rakudo/toqast: Fix an accidental violation of the QAST::Stmt usage rules when a block becomes a hash.
17:22 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/eb13c5a50f
17:23 masak pmichaud: I think that makes a lot of sense and I would have proposed it myself had I seen it sooner.
17:23 pmichaud I just noticed it myself (more)
17:24 pmichaud I mentally bikeshedded the name ".translate" and said "no, that's really .replace", which then made me think "wait a minute, we already have a .replace, but it's called .subst" :-)
17:26 pmichaud anyway, I'm in agreement that .trans should be limited to the p5 form.
17:27 pmichaud also, note that since I refactored .match, it may be possible to improve the .subst implementation a bit
17:27 pmichaud (I hadn't gotten around to looking at that yet)
17:29 pyrimidine pmichaud: does .subst handle something like:
17:29 pyrimidine is $s.trans([<X Y>] => [{++$x},{++$y}])
17:29 pyrimidine s/is//
17:30 pyrimidine e.g. can the pattern => replacement be pairs?
17:30 masak frankly, I think the [...] => [...] form is a premature (syntactic) optimization and should be scrapped in the transition.
17:31 masak we have Z=> now and can split our own arrays.
17:31 pyrimidine masak: sounds good to me
17:31 pyrimidine simpler is better
17:32 pmichaud masak:  I totally agree.  Using the array on the lhs of => has always felt wrongish.
17:33 masak it's one of the things that confuse the API user.
17:33 pmichaud even just   <X Y> Z <abc def>   can work :-)
17:36 [Coke] +# 07/24/2012 - rakudo++ (22934); niecza (89.87%); pugs (41.01%)
17:36 dalek doc: 4b7d9c8 | moritz++ | type-graph.txt:
17:36 dalek doc: [type-graph] remove Rakduo-specific stuff
17:36 dalek doc: review: https://github.com/perl6/doc/commit/4b7d9c8688
17:36 [Coke] pugs gaining slightly. niecza failing 1, rakudo failing 2.
17:37 [Coke] p: say 41.01/89.87
17:37 p6eval pugs: OUTPUT«0.45632580393902303​32702792923111160565261␤»
17:37 pmichaud [Coke]++
17:37 moritz r: say Rational.^mro
17:37 p6eval rakudo 3ac8c7: OUTPUT«None of the parametric role variants for 'Rational' matched the arguments supplied.␤Cannot call '_block55916'; none of these signatures match:␤:(Mu , Mu , Mu )␤␤  in any specialize at src/gen/Metamodel.pm:1898␤  in <anon> at src/gen/Metamodel.pm:2169␤  in <anon> at…
17:38 pyrimidine pmichaud: so something like: $s.subst( <X Y> Z [{++$x},{++$y}], :parallel )
17:38 [Coke] p: say 22934*(89.87/2-41.01)
17:38 pyrimidine ?
17:38 p6eval pugs: OUTPUT«90015.95␤»
17:38 [Coke] p: say 22934*(89.87/2-41.01)/100
17:38 p6eval pugs: OUTPUT«900.1595␤»
17:38 [Coke] that's a lot of tests to get to half of niecza. ah well. ;)
17:43 daguest joined #perl6
17:43 daguest hi
17:43 moritz hello daguest
17:44 skids Hrm wouldn't adverbs in subst args lead to some surprising results if you were passing in pairs with the same key as the adverb?
17:44 pmichaud pyrimidine: assuming they need to be in arrays, yes, although I would probably not want the brackets
17:44 [Coke] r: say 1,2,* + *..100; say 1,2,* * *..100; say 1,2,* ** *..100
17:44 p6eval rakudo 3ac8c7: OUTPUT«12WhateverCode.new()␤12Whatev​erCode.new()␤12WhateverCode.new()␤»
17:45 pmichaud $s.subst( X => {++$x}, Y => {++$y}, ... )
17:45 pmichaud or
17:45 [Coke] ah. must have a really old perl6 installed on feather.
17:45 moritz skids: why would they?
17:45 pmichaud $s.subst(( <X Y> Z {++$x}, {++$y}), ...
17:46 pmichaud [...]  arrays tend not to flatten
17:46 moritz skids: oh, you mean if we allow passing trans-style pairs to it
17:46 skids right.
17:46 pmichaud skids: yes, you're correct; my first example would be treated as named arguments.
17:46 pmichaud so
17:46 pmichaud $s.subst( (X => {++$x}, Y => {++$y}), ... )   # or some such
17:47 pyrimidine yes, that makes sense and keeps in line with the second example using Z
17:48 pmichaud just a caution that it may in fact be that we want to keep the parallel-replacement semantics separate from .subst also; I mainly wanted to point out that we need to include it in our discussions as well :)
17:49 dalek doc: 70eb964 | moritz++ | / (2 files):
17:49 dalek doc: [type graph] fix for roles with superclasses
17:49 dalek doc:
17:49 dalek doc: also remove some more non-spec types
17:49 dalek doc: review: https://github.com/perl6/doc/commit/70eb964b55
17:49 pyrimidine pmichaud: right
17:49 masak pyrimidine: I think parallel substitution should be the default in .subst -- if you want serial substitution, just make several .subst calls in a row.
17:49 Chillance joined #perl6
17:49 pyrimidine would you even need a :parallel adverb?
17:49 pyrimidine right
17:50 pmichaud well, keep in mind that .subst also has :global, :ex, :ov, flags
17:50 pmichaud so the permutations there might get weird-ish
17:50 skids .oO(Can a signature capture a junction before it gets exploded?  thinking subst(X=>a|Y=>b))
17:50 moritz please don't make .subst any more complicated than it is today
17:50 dalek specs: d9d8b35 | larry++ | S32-setting-library/Str.pod:
17:50 dalek specs: refactor case mappings (again)
17:50 dalek specs:
17:50 dalek specs: There is no more titlecase function.  Instead there is a suite
17:50 dalek specs: of mapping functions appropriate to apply on a word-by-word basis
17:50 dalek specs: (tc, tclc, and tcuc), and a wordcase function that defaults to
17:50 dalek specs: normal capitalization rules for English (without attempting to
17:50 dalek specs: handle exceptions).
17:50 dalek specs: review: https://github.com/perl6/specs/commit/d9d8b35825
17:50 dalek specs: e17e4d4 | larry++ | S32-setting-library/Str.pod:
17:50 dalek specs: make provision for exceptions
17:50 dalek specs:
17:50 dalek specs: Smartmatching again leaps into action!
17:50 dalek specs: review: https://github.com/perl6/specs/commit/e17e4d4986
17:51 sorear good * #perl6
17:51 moritz skids: yes. But Junctions are not suitable for this job
17:51 pyrimidine have to agree with moritz, seems like this could complicate .subst more
17:52 TimToady plus, your precedence is wrong
17:52 desertm4x joined #perl6
17:52 skids ah.
17:52 skids I was just casually punning off pmichaud's ":parallel".
17:53 masak yes, junctions have to do with boolean truth in some sense. substitutions don't.
17:53 pmichaud wasn't my :parallel, I don't think :)
17:53 GlitchMr sub sleep($seconds = $Inf) {
17:53 GlitchMr Infinity?
17:53 pyrimidine also, tr/// (p5) has c and d modifiers/flags.
17:53 skids oh right, pyrimidine said that.
17:54 pmichaud thus far I've been kind of careful not to say ":parallel" (and on purpose :)
17:55 masak it would seem to me that if .subst were to be extended to do several substitutions, they should be simultaneous in the sense that .trans is now. so there's no need for ":parallel".
17:55 pyrimidine masak: right
17:55 skids It's going to be a long time before my old brain absorbs that whole precedence map, for sure. :-)
17:56 pmichaud masak: one difference though is that .trans implies a ":global" equivalent, while .subst defaults to "one only"
17:56 GlitchMr What is point having infinity seconds sleep?
17:56 GlitchMr (I will even skip that in Rakudo it's 1e16 seconds, but whatever)
17:57 pmichaud GlitchMr: sleep(Inf) may be a way of saying "wait indefinitely for a signal"
17:58 moritz GlitchMr: it *is* infinite in rakudo
17:58 moritz nqp::sleep(1e16) while True;
17:58 sorear I guess that's almost as good as calling pause(2)
17:58 GlitchMr Oh, I see...
17:59 sorear hmm.  "Pause is mad obsolete by sigsuspend(2)."
17:59 pyrimidine pmichaud: I suppose one could default to replacing only the first match for each pattern
17:59 pmichaud pyrimidine: I fear that way lies madness.
17:59 pyrimidine I know
18:00 pyrimidine sort of argues for splitting out the behavior
18:00 pyrimidine (into another method)
18:00 pmichaud ...the :g/:ex/:ov part of .subst is the part that makes me think that .translate might not be part of .subst directly.
18:00 moritz and :nth
18:00 GlitchMr multi infix:<+>(\$a, \$b)    { $a.Numeric + $b.Numeric }
18:00 pmichaud yes, and :nth and :x
18:01 GlitchMr How infix:<+> could work before being declared?
18:01 pyrimidine but one could certainly implement .translate using .subst
18:01 moritz GlitchMr: it's in the grammar
18:01 [Coke] sorear: mad obsolete, yo.
18:02 pmichaud yeah, I like "mad obsolete".  Will have to use that somewhere :-)
18:02 moritz and as soon as the grammar knows about them, they're just normal subroutine calls, which are allowed to occur before the declaration
18:05 masak pmichaud: hm, troo.
18:06 daguest is there a way to tell the $tring.words method (or similar method) to treat quoted text as a single word? I have a for $tring.words -> $word {given $word {when /regex/{} when /regex2/{}}} now the problem is regex2 block would like to have a string that may contain spaces, but I don't find a pretty way to use this cycle-aside from spltting manually instead of with .words, dont wanna! XD-, and for other stuff the for/given (
18:07 GlitchMr System.IO.FileNotFoundException: Could not load file or assembly 'Perl5Interpreter' or one of its dependencies. The system cannot find the file specified.
18:07 GlitchMr wait... so there is Perl5Interpreter?
18:08 pmichaud daguest:  perhaps something like   $string.comb(/".*?" | \S+/)  ?
18:08 pmichaud maybe || instead of | there
18:09 pmichaud r:   .say for 'alpha beta "quoted string" gamma'.comb(/".*?" || \S+/)
18:09 p6eval rakudo 3ac8c7: OUTPUT«alpha␤beta␤"quoted␤string"␤gamma␤»
18:09 pmichaud oh.
18:10 pmichaud r:   .say for 'alpha beta "quoted string" gamma'.comb(/\".*?\" || \S+/)
18:10 p6eval rakudo 3ac8c7: OUTPUT«alpha␤beta␤"quoted string"␤gamma␤»
18:14 atrodo joined #perl6
18:14 GlitchMr perl6: uniq([1, 2], '1 3', [1, 3], [1, 2], '1 2').perl.print
18:14 p6eval niecza v19-13-g442e075: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'uniq' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /hom…
18:14 p6eval ..rakudo 3ac8c7: OUTPUT«([1, 2], "1 3").list»
18:14 GlitchMr perl6: ([1, 2], '1 3', [1, 3], [1, 2], '1 2').uniq.perl.print
18:14 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«([1, 2], "1 3").list»
18:15 xinming joined #perl6
18:15 MayDaniel joined #perl6
18:16 GlitchMr Fixing this without huge slowdown would be... almost impossible
18:16 birdwindupbird joined #perl6
18:16 pmichaud GlitchMr: 'uniq' has a known bug in rakudo, I think.  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=83454
18:18 GlitchMr Actually, I have feeling it will be easy to fix
18:19 GlitchMr Except not
18:20 pmichaud I suspect one could use a stringification hash as an optimizing step
18:21 GlitchMr Now only if I would find uniq in Synopsis
18:21 pmichaud GlitchMr: in S32, probably
18:21 skids Is there a converse to "lift" for stuff like the (broken) evals here: http://irclog.perlgeek.de/​perl6/2012-07-18#i_5824936  ?
18:21 jnthn Why can't we use object hashes, now we have them?
18:21 jnthn (for uniq)
18:21 pmichaud jnthn: do they use === semantics?
18:22 GlitchMr My solution would be 30.WHICH
18:22 GlitchMr perl6: say 30.WHICH
18:22 p6eval niecza v19-13-g442e075: OUTPUT«30[-7C804600]␤»
18:22 p6eval ..rakudo 3ac8c7: OUTPUT«Int|30␤»
18:22 [Coke] p: say 30.WHICH
18:22 p6eval pugs: OUTPUT«30␤»
18:23 pmichaud GlitchMr: I'm pretty sure that .WHICH won't be the right solution.
18:23 GlitchMr Why not?
18:23 GlitchMr Basing on spec, immutable objects should have this same .WHICH value
18:23 pmichaud but uniq isn't limited to immutables.
18:24 pmichaud my @a = 1,1;   say @a[0] == @a[1];  say @a[0].WHICH;  say @a[1].WHICH;
18:24 pmichaud r: my @a = 1,1;   say @a[0] === @a[1];  say @a[0].WHICH;  say @a[1].WHICH;
18:24 GlitchMr == is numeric equation
18:24 p6eval rakudo 3ac8c7: OUTPUT«True␤Int|1␤Int|1␤»
18:24 jnthn pmichaud: yes
18:24 jnthn pmichaud: .WHICH iirc
18:24 pmichaud hmmmm
18:24 pmichaud thinking
18:25 jnthn dinner, bbs
18:26 pmichaud r:  say   1|2 === 1|2
18:26 p6eval rakudo 3ac8c7: OUTPUT«any(any(True, False), any(False, True))␤»
18:26 pmichaud r:  say   1&2 === 1&2
18:26 p6eval rakudo 3ac8c7: OUTPUT«all(all(True, False), all(False, True))␤»
18:26 pmichaud r:  say   (1&2).WHICH eqv (1&2).WHICH
18:26 p6eval rakudo 3ac8c7: OUTPUT«False␤»
18:27 pmichaud well, using an object hash would certainly bring us closer.
18:32 [Coke] TimToady: why is it "tc" but "wordcase"?
18:34 TimToady because tc is a simple operation, and wordcase isn't
18:39 snearch joined #perl6
18:44 * jnthn back
18:45 dalek specs: 4d51ab7 | larry++ | S32-setting-library/Str.pod:
18:45 dalek specs: force exceptions to lc or uc
18:45 dalek specs: review: https://github.com/perl6/specs/commit/4d51ab7f6d
18:48 moritz TimToady++ tc etc. cleanup
18:49 masak TimToady++
18:51 thou joined #perl6
18:52 pmichaud TimToady: ooc, do you have some test cases already developed (e.g., while fixing up the spec)?
18:53 moritz pmichaud: he has just proven it correct :-)
18:53 TimToady sorry, no--I probably shouldn't even be speccing till I'm more fully recovered, but couldn't resist... :)
18:54 jnthn r: sub foo() returns int { 1 }; say foo()
18:54 p6eval rakudo 3ac8c7: OUTPUT«Type check failed for return value; expected 'int' but got 'Int'␤  in sub foo at /tmp/4WjEEnfuOb:1␤  in block <anon> at /tmp/4WjEEnfuOb:1␤␤»
18:54 pmichaud moritz: oh, I'm certain it's correct; I just wanted to steal any test cases for the roast suite so we could use those same cases in determining if Rakudo is "correct" :)
18:54 TimToady also, making other people write my tests will tend to flush out spec bugs I wouldna thoughta.
18:54 jnthn Heh...the bugs an inlining optimizer hides...
18:55 TimToady .oO(black box speccing)
18:56 moritz TimToady: just to be clear, tc title-cases upper-case characters too, right?
18:56 TimToady yes
18:56 TimToady it's like what you might want at the beginning of a sentence
18:57 TimToady we should also have an ic that puts an illiminated capital on the page, defaulting to Book of Kells style  :)
18:57 pmichaud I call "module" for that :-P
18:58 masak +1
18:58 moritz p6: say 'ΣΣ'.lc
18:58 p6eval rakudo 3ac8c7: OUTPUT«σς␤»
18:58 p6eval ..niecza v19-13-g442e075: OUTPUT«σσ␤»
18:58 moritz rakudo++
18:58 * masak submits nieczue
18:59 moritz https://en.wikipedia.org/wi​ki/Title_case#Special_cases
19:00 TimToady the spec is assuming that "character" is interpreted liberally enough to encompass special cases
19:00 pmichaud might want to mention that in the spec :)
19:00 TimToady but then it wouldn't be an assumption :P
19:01 pmichaud correct, it wouldn't.
19:01 TimToady and we want people to assume concordance with Unicode
19:01 masak pmichaud++ # not going "arrrrrrrrrgh!"
19:01 masak :P
19:01 pmichaud masak: oh, I assumed that would be TimToady++'s response :)
19:01 masak oh.
19:01 masak clearly I'm still new at this. :)
19:02 TimToady if I went "arrrrrrrrgh!" right now it would result in a 3-minute coughing fit
19:02 pmichaud TimToady: yes, we want people to assume concordance with Unicode; but some won't, and we can avoid the FAQ by making it explicit.  :)
19:02 moritz TimToady: then don't :-)
19:02 dalek roast: 3df92ce | moritz++ | S32-str/lc.t:
19:02 dalek roast: test lc("ΣΣΣ")
19:02 dalek roast: review: https://github.com/perl6/roast/commit/3df92cedeb
19:02 pmichaud unless we want the surprise to be a teaching moment :)(
19:02 masak "you might want to put [useful assumption] in the spec" -- "but then it wouldn't be an assumption :P" looked to me like a highly frustrating response. :)
19:04 moritz ok, I want to write some more tests. What's an example where $x.tc ne $x.ucfirst?
19:04 TimToady anyway, it's already specced in S02: In the abstract, Perl is written in Unicode, and has consistent Unicode semantics
19:04 pmichaud masak: TimToady++ has other more powerful forms of frustration for us implementors :-) :-).  Here I was trying to torment the spec author on behalf of the users.
19:04 TimToady so I was just following DRY
19:05 TimToady or DRM in this case
19:05 moritz what is 'ß'.tc? 'Ss'?
19:05 moritz nrp: say 'ß'.ucfirst
19:05 p6eval rakudo 3ac8c7, niecza v19-13-g442e075, pugs: OUTPUT«ß␤»
19:05 moritz nrp: say 'ß'.uc
19:05 p6eval rakudo 3ac8c7, niecza v19-13-g442e075, pugs: OUTPUT«ß␤»
19:05 TimToady eval: say ucfirst 'ß'
19:05 buubot_backup TimToady: ERROR: syntax error at (eval 20) line 1, near "say ucfirst"
19:06 pmichaud nqp:  say(pir::titlecase__Ss('ß'));
19:06 p6eval nqp: OUTPUT«S␀s␀␤»
19:06 pmichaud icu claims it's 'Ss'
19:06 sorear n: say "\c[LATIN LARGE LETTER SHARP S]"
19:06 p6eval niecza v19-13-g442e075: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized character name LATIN LARGE LETTER SHARP S at /tmp/2pOrlSXk0G line 1:â�¤------> [32msay "\c[LATIN LARGE LETTER SHARP S[33mâ��[31m]"[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.se…
19:07 TimToady eval: print ucfirst 'ß'
19:07 buubot_backup TimToady: Ss1
19:07 sorear n: say "\c[LATIN CAPITAL LETTER SHARP S]"
19:07 p6eval niecza v19-13-g442e075: OUTPUT«ẞ␤»
19:07 TimToady recent p5 will generally be correct on these subjects
19:08 moritz eval: $^V
19:08 buubot_backup moritz: bless( {original => "v5.16.0",qv => 1,version => [5,16,0]}, 'version' )
19:08 moritz that's recent enough I think :-)
19:08 TimToady that is recent enough, but 5.14 isn't :)
19:09 TimToady eval: print lcfirst ucfirst 'ß'
19:09 buubot_backup TimToady: ss1
19:09 TimToady note that roundtripping is not guaranteed
19:10 TimToady or in this case, guaranteed not :)
19:11 lichtkind joined #perl6
19:11 TimToady eval: print uc ucfirst 'ß'
19:11 buubot_backup TimToady: SS1
19:12 lichtkind http://skillsmatter.com/podcas​t/home/scala-days-keynote-3018 <- interesting talk about lang design from guy steele
19:13 dalek roast: 06b839a | moritz++ | S32-str/ (2 files):
19:13 dalek roast: transmogrify ucfirst tests into tc tests
19:13 dalek roast: review: https://github.com/perl6/roast/commit/06b839a198
19:14 dalek rakudo/nom: a4eacdf | moritz++ | t/spectest.data:
19:14 dalek rakudo/nom: remove ucfirst/lcfirst tests
19:14 dalek rakudo/nom:
19:14 dalek rakudo/nom: they are gone or going
19:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a4eacdf961
19:16 dalek specs: a1a0394 | moritz++ | S (2 files):
19:16 dalek specs: remove last traces of lcfirst
19:16 dalek specs: review: https://github.com/perl6/specs/commit/a1a0394b26
19:16 dalek roast: acd0411 | coke++ | S32-str/lc.t:
19:16 dalek roast: pugs fudge new test
19:16 dalek roast: review: https://github.com/perl6/roast/commit/acd0411792
19:17 * [Coke] attempts to keep the smoke clear for pugs.
19:17 dalek roast: 0ac9064 | moritz++ | S32-str/lcfirst.t:
19:17 dalek roast: remove lcfirst.t
19:17 dalek roast:
19:17 dalek roast: "I know a dead function when I see one"
19:17 dalek roast: review: https://github.com/perl6/roast/commit/0ac9064148
19:18 dalek roast: 8bcf6d1 | moritz++ | S32-str/tc.t:
19:18 dalek roast: another tc test
19:18 dalek roast: review: https://github.com/perl6/roast/commit/8bcf6d1a3b
19:18 moritz [Coke]: renaming ucfirst to tc will get you 99% there :-)
19:18 dalek Pugs.hs: daff589 | coke++ | t/spectest.data:
19:18 dalek Pugs.hs: track spectest removal
19:18 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/daff589e27
19:21 larks joined #perl6
19:21 TimToady to me, "abstraction" is an agency by which I can speak generically and have it automatically applied to specific cases
19:21 dalek roast: dd2f7f4 | moritz++ | S32-str/tclc.t:
19:21 dalek roast: basic tclc tests
19:21 dalek roast: review: https://github.com/perl6/roast/commit/dd2f7f4448
19:22 masak TimToady: I like that definition.
19:22 moritz wow, TimToady is a fast backlogger :-)
19:22 TimToady multithreading...
19:23 * masak sees "Archetypes.pm" flash by in the make output of nqp, and has a feeling that deep in 6model there are ancient beings of terrifying power
19:23 TimToady encapsulation is a one-sided hierarchical view of separation-of-concerns
19:23 * geekosaur suddenly wonders if the convergent discussion between #p6 and #dw had more than himself in common...
19:23 TimToady which is why I speak about excapsulation from time to time
19:24 TimToady I almost never think of "data hiding", but rather of "state hiding"
19:25 masak whatsthedifference
19:25 desertm4x joined #perl6
19:26 TimToady apart from the simplification of abstraction, data/information hiding is not needed for immutable objects, since it's the state changes that need private management
19:27 GlitchMr Just wondering, how can I do something similar to http://perldoc.perl.org/functions/tie.html
19:27 moritz masak: re-hasing a hash table is data hiding, not state hiding
19:27 GlitchMr I would like to have hash-like object
19:27 moritz GlitchMr: make them implement the Associative role, and override postcircumfix:<{ }> for it
19:27 jnthn GlitchMr: Write a class that implements at_key
19:27 masak moritz: huh. a member of #ruby made a similar distinction between "data" and "information".
19:27 moritz or in rakudo, method at_key
19:27 masak everyone has different definitions :)
19:28 jnthn Well, you *can* override postcircumfix too.
19:28 moritz right
19:28 moritz postcircumfix handles stuff like slices for you
19:28 jnthn It's just that if you override at_key you get all the postcircumfix variants for free :)
19:28 moritz and then delegates to at_key
19:28 GlitchMr What about other methods.
19:29 TimToady well, to me an object is the endpoint of a protocol (or event stream, if you will), and an immutable just gives more predictiable responses
19:29 GlitchMr oh, I see...
19:29 moritz we *should* spec {} => AT_KEY, {}:exists => EXISTS_KEY, {}:delete => DELETE_KEY
19:29 TimToady so you want immutable objects to model math, and mutable objects to model the real world.  :)
19:29 moritz same for [] and s/_KEY/_POS/
19:30 masak moritz: +1
19:30 GlitchMr multi sub postcircumfix:<{ }>(%hash, @keys)
19:30 GlitchMr This way?
19:30 moritz GlitchMr: rakudo or niecza?
19:30 moritz in rakudo, postcircumfixes are methods
19:30 GlitchMr Well, I would like both
19:30 moritz i think it's a sub in niecza
19:31 masak ISTR so too.
19:32 sorear it's not multi in niecza
19:33 masak toqast: macro foo { my $x = 42; quasi { $x } }; my $result = foo; say $result
19:33 p6eval toqast : OUTPUT«Cannot assign a non-Perl 6 value to a Perl 6 container␤  in block  at /tmp/A1SljIq__q:1␤␤»
19:33 * masak is back to looking at the cause of ^
19:33 jnthn masak: Does it need the variable?
19:34 masak toqast: macro foo { my $x = 42; quasi { $x } }; say foo
19:34 p6eval toqast : OUTPUT«Null PMC access in find_method('gist')␤  in sub say at src/gen/CORE.setting:7004␤  in block  at /tmp/uuFw5qoNKp:1␤␤»
19:34 masak something is wrong even without it, if that's what you're asking.
19:34 jnthn yeah
19:35 jnthn Well, I don't need to tell you of all people how to golf. :)
19:35 moritz .u ῼ
19:35 phenny U+1FFC GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI (ῼ)
19:35 moritz rnp: say lc 'ῼ'
19:35 p6eval rakudo 3ac8c7, pugs: OUTPUT«ῳ␤»
19:35 p6eval ..niecza v19-13-g442e075: OUTPUT«ῼ␤»
19:36 masak toqast: macro foo { quasi { 42 } }; say foo
19:36 p6eval toqast : OUTPUT«42␤»
19:36 masak significant finding.
19:36 masak tests++
19:36 moritz 'nother nieczabug
19:36 masak values survive through.
19:36 masak it's variables that are screwed up.
19:36 thelazydeveloper joined #perl6
19:36 moritz rp: say uc 'ῳ'
19:36 skids .o0(PROSGEGRAMMENI sounds like some sort of pasta)
19:36 moritz rnp: say uc 'ῳ'
19:36 p6eval niecza v19-13-g442e075: OUTPUT«ῳ␤»
19:36 p6eval ..pugs: OUTPUT«ῼ␤»
19:36 p6eval ..rakudo 3ac8c7: OUTPUT«ΩΙ␤»
19:37 moritz three compilers, three answers
19:37 * masak .oO( ...one cup )
19:37 moritz perl 5 agrees with rakudo
19:37 pmichaud eval: print uc 'ῳ'
19:37 buubot_backup pmichaud: ΩΙ1
19:37 masak eval: uc 'ῳ'
19:37 buubot_backup masak: ΩΙ
19:38 masak Unicode is so full of strange wonders.
19:38 jnthn heh, I googled PROSGEGRAMMENI and got "Menade du: PROGRAMMEN" :)
19:39 moritz jnthn: google knows you :-)
19:39 moritz masak: which I'm trying to chase, in order to write tests. D'oh.
19:39 jnthn oh heh, I hadn't even noticed the Swedish :)
19:39 masak jnthn: I don't even see the characters any more. to me it's just blonde, brunette, redhead...
19:40 moritz rnp: say lc 'Lj'
19:40 p6eval rakudo 3ac8c7, pugs: OUTPUT«lj␤»
19:40 p6eval ..niecza v19-13-g442e075: OUTPUT«Lj␤»
19:41 moritz rnp: say uc 'lj'
19:41 p6eval rakudo 3ac8c7, niecza v19-13-g442e075, pugs: OUTPUT«LJ␤»
19:42 jnthn masak: :P
19:42 flussence that last one really doesn't work well in a 9px monospace font :)
19:43 dalek roast: 9fcdcd6 | moritz++ | S32-str/tc.t:
19:43 dalek roast: test tc(LATIN SMALL LETTER LJ)
19:43 dalek roast: review: https://github.com/perl6/roast/commit/9fcdcd6483
19:43 masak jnthn: so, to summarize: there is something wrong in variable lookup from scopes stitched in per the macro application process in toqast. not in nom.
19:44 jnthn masak: Hm, OK
19:44 masak jnthn: this was fixed as part of the D1 work by twiddling the AST objects, using a specific op even.
19:44 masak I bet the regression is in there somewhere.
19:45 * masak goes a-huntin' for the op
19:45 jnthn masak: Sounds plausbile.
19:45 jnthn masak: Also there's something related to this in world iirc
19:45 masak perl6_get_outer_ctx
19:47 masak method add_quasi_fixups in World calls it.
19:49 masak heh, and "ctx" still looks like a very weird way to abbr "context" to me... :)
19:49 * PerlJam wonders if Perl 6 will grow some set/multi-set constructor syntax like Fortress
19:49 sergot joined #perl6
19:50 masak PerlJam: it always seemed to me to be just outside of the core concerns, syntactically.
19:50 TimToady perl6: say 1,2,3 ∪ 2,3,4
19:50 p6eval rakudo 3ac8c7: OUTPUT«===SORRY!===␤Confused␤at /tmp/Wz8zGHPi7G:1␤»
19:50 p6eval ..niecza v19-13-g442e075: OUTPUT«set(1, 2, 3, 4)␤»
19:50 masak niecza++
19:51 TimToady perl6: say set <a b c>
19:51 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«set(a, b, c)␤»
19:51 lichtkind rafl ping
19:51 TimToady perl6: say bag <a b b c d e e e k>
19:51 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«bag("a" => 1, "b" => 2, "c" => 1, "d" => 1, "e" => 3, "k" => 1)␤»
19:51 TimToady perl6: say set <a b b c d e e e k>
19:51 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«set(a, b, c, d, e, k)␤»
19:51 masak jnthn: and all three macro def paths call $*W.add_quasi_fixups as appropriate.
19:52 masak jnthn: nothing seems to have changed, on the surface.
19:52 PerlJam {| 1,2,3 |} <-- set,    [| 1,1,1,2,3 |]  <-- multi-set     Seem like they could work and are are almost mnemonicish
19:52 masak PerlJam: yes but please not in the core language.
19:53 TimToady well, I'd use ⟅1,1,1,2,3⟆ for a bag
19:53 masak it's easy enough to 'use' in the syntax if you want it.
19:53 PerlJam aye, that's true
19:53 masak .u ⟅⟆
19:53 phenny U+27C5 LEFT S-SHAPED BAG DELIMITER (⟅)
19:53 phenny U+27C6 RIGHT S-SHAPED BAG DELIMITER (⟆)
19:53 masak :⟅
19:53 PerlJam heh
19:54 PerlJam TimToady: sure, I just don't know how to type them  :)
19:54 moritz U+123456 BAG OF TEA
19:54 benabik .u TEA
19:54 TimToady perl6: sub circumfix:<⟅ ⟆> (@x) { bag @x }; say ⟅1,1,1,2,3⟆
19:54 phenny U+273B TEARDROP-SPOKED ASTERISK (✻)
19:54 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«bag("1" => 3, "2" => 1, "3" => 1)␤»
19:54 PerlJam moritz: and then "inventory" in masak's game can say "you have no U+123456"
19:55 * masak .oO( scientists later found that the sharp decline in programming languages being actually produced was indirectly caused by Unicode )
19:55 benabik There's no BAG OF TEA, but there is HOT BEVERAGE:
19:55 PerlJam masak: I think you're 180 degrees out of phase on that one
19:55 benabik .u HOT BEVERAGE
19:55 phenny U+2615 HOT BEVERAGE (☕)
19:55 pmichaud .oO( historians now call Perl 6 "The Modern Tower of Babel" )
19:56 TimToady you mean 180° surely
19:56 masak :P
19:56 skids On the brighter side, it is distiguishable from line noise, since that is usually something reserved to ascii terminal emulators.
19:56 TimToady it might be 360° out of phase if you're doing quantum programming, since you have to go around twice
19:57 pmichaud skids: ...oh, many of the terminal emulators I used that had line noise weren't ASCII.
19:57 masak TimToady: what QC have you been reading? :)
19:57 pmichaud s/terminal emulators/terminals/
19:57 sorear thereis U+1F375 TEACUP WITHOUT HANDLE
19:57 pmichaud line noise far predates terminal emulators :-P
19:57 skids pmichaud: EBDIC doesn't count :-)
19:57 TimToady if you don't go around twice you end up with the other electron, which is why two electrons fit into each orbital
19:58 masak oh, ok.
19:58 TimToady spin is a weird thing
19:58 PerlJam does that make you a spin doctor?
19:58 * TimToady doesn't know how to fix quantum mechanics
19:58 masak to me it sounded more like the Riemann manifold required for the codomain of the sqrt function in the complex plain. where you take two complex planes and cross-join them at a Riemann cut.
19:59 PerlJam two electrons ... two turntables .... there's something deeply fundamental here  ;)
19:59 moritz and how many cups?
19:59 TimToady masak: I love it when you talk dirty, even when I don't know all those words
19:59 pmichaud perl6:   say [< a b c>]    # just making sure that I know what an Array is in the midst of spin, complex plains, codomains, Riemann manifolds, ...
19:59 p6eval rakudo 3ac8c7, niecza v19-13-g442e075: OUTPUT«a b c␤»
20:00 * moritz is glad that Riemann didn't know about Uincode, otherwise we'd have Rieman Unifolds too :-)
20:01 masak TimToady: well, I'll explain pictorially. the little dot $c on the complex plane will rotate twice as fast as the little dot sqrt($c). thus, as $c goes one rotation, sqrt($c) goes one half. that's... not very function-like, returning different outputs for the same input.
20:01 masak TimToady: so the fix is to glue two planes together at (-Inf, 0), and make the sqrt($c) dot teleport between the planes each time it crosses the glue line.
20:01 PerlJam masak: but it's *not* the same!  :)
20:01 * TimToady ooh, pix, so I guess it did happen
20:02 masak :D
20:02 masak PerlJam: well, Riemann's plane indices are a bit like Dijkstra's program indices. they work as long as you don't have arbitrary GOTOs. :P
20:03 TimToady I think it's similar in QM, except there's no line :)
20:03 masak well, the line is rather arbitrary, but it has to be cut somewhere.
20:03 TimToady it always cuts it where you *aren't* looking
20:03 pmichaud can the line be drawn somewhere instead?  ;-P
20:04 masak let's just say I wouldn't be surprised either if there was a **2 or a sqrt in those electron equations causing the two electrons to fall out.
20:04 moritz masak: there's a **2 that causes the positron and the electron to fall out of the same equation
20:04 moritz that's how you get the Pauli equations, iirc
20:04 masak ooh
20:05 PerlJam masak: your imagery reminds me of those Brian Greene shows on PBS
20:05 PerlJam fabric of the cosmos or something like that
20:05 moritz somebody tried to solve some equation, and didn't get very far, so they squared both sides
20:05 pmichaud .oO( #perl6 is a channel where there's a lot of discussion about autopuns, linguistics, quantum physics, and occasionally some Perl 6 code )
20:05 moritz and the squaring lead to solutions with differently signed charges
20:05 moritz and then people thought "hey, those could be real" => BOOM, anti matter
20:06 masak o.O
20:06 masak people should be more careful!
20:06 moritz at least that's how our theorist prof described it
20:06 pmichaud ...there was  BOOM?
20:06 sorear I believe you are thinking of the Klein-Gordon equation
20:06 pmichaud *a BOOM ?
20:06 moritz experimentalists might disagree :-)
20:06 moritz pmichaud: no, the boom was there all along :-)
20:06 masak sorear! \o/
20:07 TimToady Heisenberg might have been here discussing Perl 6, but if so, Pauli wasn't.
20:07 PerlJam heh
20:07 PerlJam TimToady: Can you get three in one sentence?
20:07 moritz r: nqp::say pir::titlecase__Ss('aBcD')
20:07 p6eval rakudo 3ac8c7: OUTPUT«Abcd␤»
20:07 moritz hm, is that expected?
20:08 sorear masak: yes, there are things resembling square roots in the spin 1/2 particle stuff
20:08 pmichaud moritz: which part?
20:08 PerlJam moritz: It's what *I* would expect.
20:08 moritz pmichaud: that it downcases the B and D
20:08 pmichaud parrot's titlecase ne perl 6's tc
20:08 sorear masak: it gets a bit ugly because you're working with rotations in 3-d space, and noncommutative Lie groups are a bit less pleasant than complex planes
20:08 pmichaud I think Parrot just delegates to ICU's titlecase, which does that.
20:09 masak sorear: I can imagine. just about.
20:09 dbr joined #perl6
20:09 sorear masak: however, it's a bit of a red herring
20:09 sivoais_ joined #perl6
20:10 PerlJam r: nqp::say pir::titlecase__Ss('aBcD eFGH');
20:10 p6eval rakudo 3ac8c7: OUTPUT«Abcd efgh␤»
20:10 PerlJam that's not quite what I'd expect though
20:10 sorear if you rotate an electron through 360 degrees, you multiply the wave function by -1, but constant multiples of the wave function don't have physical meaning
20:10 moritz pmichaud: so, rakudo's tc should really do a substr first and only apply parrot's titlecase to the first character?
20:10 pmichaud moritz: or we introduce a nqp::tc that does what we want.
20:10 Pleiades` joined #perl6
20:10 pmichaud but yes, I don't expect Parrot's titlecase to necessarily follow Perl 6 semantics (no matter how much I wish it did :)
20:11 [Coke] moritz: there is a titlecase_first function the C api.
20:11 masak sorear: "constant multiples of the wave function don't have physical meaning". ooh, I actually knew that one!
20:11 moritz btw I've discovered this by doing the naive mapping, and running it agains the newly written tests
20:11 sorear multiplicity of Pauli orbitals has more to do with the absolute value of the spin
20:12 masak sorear: the Mike&Ike book (about quantum computing) said as much.
20:12 [Coke] moritz: but I don't see it exposed via an opcode; probably need to roll an nqp opcode to get it.
20:12 sorear an electron has spin 1/2, so when you measure the z-component of the spin, it has to come out <= 1/2
20:12 masak aye.
20:12 sivoais joined #perl6
20:12 moritz so now I have local patch(es) that almost but not quite do what I want
20:12 sorear but (quantization mumbo jumbo) it actually has to come out +1/2 or -1/2 because spin levels are always spaced by 1
20:13 masak ah, so those are the only possible solutions.
20:13 moritz that's usually the 'm' quantum number
20:13 sorear if you had more than two electrons in an orbital, you might measure the system and discover two in the same place
20:13 pmichaud Parrot uses u_strToTitle from ICU, which says:  "Titlecasing uses a break iterator to find the first characters of words that are to be titlecased. It titlecases those characters and lowercases all others."
20:14 TimToady that's okay for the tclc function, I guess
20:14 sorear if you had a particle with spin 3 1/2, they have the same 360 degree rotation behavior as electrons but you could fit 6 of them per orbital because they have more directional freedom
20:14 sorear which reminds me of one thing I don't get at all
20:15 sorear Bose-Einstein condensation of atoms
20:15 [Coke] ONE thing?
20:15 sorear [Coke]: one thing I'm reminded of, yes
20:15 sorear there are more things I don't undersgtand, but I've forgotten them :D
20:15 moritz sorear: BEC are not easy to deal with mathematically
20:16 moritz sorear: but since they are bosons, why shouldn't they all be in the lowest energy state?
20:16 sorear if you have a bazillion Rb-87 atoms in the same quantum state, why don't their constituent quarks and electrons interfere with each other?
20:16 moritz sorear: hah, i can answer that :-)
20:16 TimToady like Cooper pairs :)
20:17 moritz sorear: basically the spatial coordinates become good quantum numbers, because they are spatially localized
20:17 TimToady moritz's patch(es) are spatially locallized
20:17 TimToady *l
20:17 [Coke] Your MOTHER is spatially localized.
20:17 TimToady well, so far
20:17 moritz jeez, I hope she is :-)
20:17 masak :P
20:18 [Coke] heh. ;)
20:18 TimToady she'll be 87 next month
20:18 TimToady I hope I got half her good genes
20:18 TimToady or something like that
20:18 * moritz hopes TimToady got the goold half of here genes
20:19 [Coke] happy birthday to her. mine just turned 58.
20:19 TimToady ronja helping you type today?
20:19 moritz occasionally :-)
20:19 sorear moritz: a lattice of cold atoms, kept at a distance from each oher by exchange interactions between the electrons?  so in some ways it's more like a solid than a gas?
20:19 * [Coke] tries to figure out what moritz was punning. There's a Goold Apple Orchard near his house, but that's probably not it.
20:20 masak r: sub postfix:<years>($n) { floor 365.25 * $n }; say Date.new('2012-08-01') - 87\ years
20:20 p6eval rakudo a4eacd: OUTPUT«1925-08-02␤»
20:20 masak \o/
20:20 masak close enough :)
20:20 TimToady you don't have to put the space
20:20 masak r: sub postfix:<years>($n) { floor 365.25 * $n }; say Date.new('2012-08-01') - 87years
20:20 p6eval rakudo a4eacd: OUTPUT«1925-08-02␤»
20:20 moritz sorear: well, the atoms are so far apart that it's more like a gas
20:20 sorear moritz: but with much larger interatomic distances
20:20 masak no, but I like the space :)
20:20 TimToady r: sub postfix:<years>($n) { floor 365.25 * $n }; say Date.new('2012-08-01') - 87\years
20:20 p6eval rakudo a4eacd: OUTPUT«1925-08-02␤»
20:21 moritz sorear: but yes, the gas/solid terminology has always bugged me a bit
20:21 TimToady ooh, no, she'll be 88
20:21 * TimToady eeks, because that means I'll be 58
20:22 * sorear wonders how old quietfanatic is
20:22 sivoais joined #perl6
20:22 masak TimToady: we all know you don't age. Damian told us, repeatedly. :)
20:22 TimToady I didn't say 58 *what*.
20:22 masak o.O
20:24 dalek roast: 20327c3 | moritz++ | S32-str/tc.t:
20:24 dalek roast: fudge tc tests for rakudo
20:24 dalek roast: review: https://github.com/perl6/roast/commit/20327c3115
20:24 dalek roast: 79971ca | moritz++ | S32-str/tclc.t:
20:24 dalek roast: another tclc test
20:24 dalek roast: review: https://github.com/perl6/roast/commit/79971ca25a
20:24 TimToady quietfanatic is a prime number old
20:24 * moritz hopes somebody reviews his roast commits for sanity
20:24 TimToady and he's not a teenager
20:26 * TimToady is currently a different prime number, and is also not a teenager
20:26 * diakopter is a power of 2
20:26 * moritz is a power of perl
20:26 masak r: sub is_prime($n) { none ($_ %% $n for 2..^$n) }; my $q's_age = 20; $q's_age++ until is_prime $q's_age; say $q's_age
20:26 p6eval rakudo a4eacd: OUTPUT«20␤»
20:26 masak hrm.
20:27 * moritz is pretty sure that 20 is note a prime
20:27 masak I always mess is_prime up.
20:27 masak r: sub is_prime($n) { !(2..^$n).grep(* %% $n) }; my $q's_age = 20; $q's_age++ until is_prime $q's_age; say $q's_age
20:27 p6eval rakudo a4eacd: OUTPUT«20␤»
20:27 masak hrm xx 2.
20:27 diakopter 20 can't be a prime in any base.....
20:28 masak :)
20:28 * masak .oO( take half this prime as a base... )
20:28 masak no wait. that doesn't help. :)
20:28 moritz r: sub is-prime($n) { so $n %% none(2..$n.sqrt)) }; say 2..10.map: &is-prime
20:28 p6eval rakudo a4eacd: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near ") }; say 2"␤»
20:28 moritz r: sub is-prime($n) { so $n %% none(2..$n.sqrt) }; say 2..10.map: &is-prime
20:28 p6eval rakudo a4eacd: OUTPUT«2..1␤»
20:28 moritz r: sub is-prime($n) { so $n %% none(2..$n.sqrt) }; say (2..10).map: &is-prime
20:28 p6eval rakudo a4eacd: OUTPUT«True True False True False True False False False␤»
20:28 [Coke] huh. I am also a prime number old.
20:29 moritz r: sub is-prime($n) { so $n %% none(2..$n.sqrt) }; say (21..*).grep(&is-prime)[^20]
20:29 p6eval rakudo a4eacd: OUTPUT«23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107␤»
20:29 masak r: sub is-prime($n) { so $n %% none(2..$n.sqrt) }; say (21..*).grep(&is-prime)[0]
20:29 p6eval rakudo a4eacd: OUTPUT«23␤»
20:29 masak \o/
20:30 masak TimToady: but you appear to be wrong about 57 being a prime.
20:30 masak who wants to write a factoring function? :)
20:30 moritz that's divisble by 3
20:31 masak ah, yes.
20:31 masak rnp: say 57 / 3
20:31 p6eval rakudo a4eacd, niecza v19-13-g442e075, pugs: OUTPUT«19␤»
20:31 * moritz is a factoring function
20:31 masak moritz(57)
20:31 * sorear is an odd semiprime
20:31 moritz 3, &you'll-figger-the-rest-out-yourself ... *
20:32 masak I cannot immediately disprove that moritz is a factoring function.
20:32 masak but he seems a quite lazy one :)
20:32 diakopter spec,roast is a refactoring function
20:34 masak :P
20:36 masak by the way, I again challenge people to break my game in ways I didn't anticipate. there's a price.
20:37 diakopter there's a price all right
20:37 PerlJam but is the price right?
20:37 masak it's 50 EUR in Amazon books.
20:37 masak IIRC.
20:38 masak yes. http://strangelyconsistent.org/blog/another-​month-of-blogging-adventure-game-here-i-come
20:38 masak currently [Coke]++ is winning. the rest of you aren't just gonna sit down and take that, are you?
20:39 masak here's what [Coke]++ has done so far: https://gist.github.com/3034482
20:39 dalek nqp: cff22c2 | moritz++ | src/PAST/NQP.pir:
20:39 dalek nqp: add nqp::tclc op
20:39 dalek nqp: review: https://github.com/perl6/nqp/commit/cff22c2098
20:39 PerlJam "wins an Amazon book worth about 50 EUR" is not the same as "wins 50 EUR"  :)
20:40 masak PerlJam: hence "...in Amazon books".
20:40 [Coke] masak: oh thank goodness, I thought I'd have to do more work to be in the lead!
20:40 PerlJam no, no, it says *an* Amazon book.
20:40 dalek rakudo/nom: 4fe23e7 | moritz++ | / (5 files):
20:40 dalek rakudo/nom: implement tclc
20:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fe23e7590
20:40 masak PerlJam: it's much easier (and slightly more satisfying) for me to give books than to give money.
20:41 masak PerlJam: I'm willing to be flexible on that point.
20:41 masak PerlJam: if you have 100 books you want to win, each worth 0.5 EUR, we can work something out.
20:41 [Coke] If I win, I'l donate my prize to the local programming teacher at the HS.
20:41 [Coke] *I'll
20:41 moritz [Coke]++
20:42 masak that's fine too.
20:42 [Coke] need more programmers in town! my kids have no interest. ;P
20:42 masak aww
20:42 moritz ronja is currently more interested in typing than in programming
20:43 moritz but it's a bit early to tell :-)
20:43 [Coke] my kids don't even know how to type! and one of them is 15!
20:43 * [Coke] is a horrible parent. :|
20:43 PerlJam My oldest daughter is going to an "engineering camp" this week.  Maybe she'll pick up an interest that leads to programming
20:45 masak moritz: "more interested in typing than in programming" made me think "then teach her Haskell!". probably too mean a joke. :)
20:45 moritz masak: :-)
20:45 masak or Simply Typed Lambda Calculus...
20:45 moritz masak: blocks on myself not knowing enough Haskell to read a file
20:47 geekosaur readFile "foo" >>= putStr :)
20:47 benabik moritz: readFile "filename" >>= putStr
20:48 moritz that's only half the truth
20:48 moritz because, you know, types and stuff
20:49 moritz sleep and stuff&
20:49 jnthn 'night, moritz
20:49 masak moritz: goodnight, and stuff.
20:49 benabik Well, the nice thing about Haskell is that it infers types.  :-D
20:49 benabik 'night moritz
20:50 * masak .oO( Haskell has an infernal type system )
20:50 geekosaur well, except for the person arguing with oleg on -cafe because "type inference considered harmful"
20:50 masak geekosaur: url? that sounds worth reading!
20:51 sergot joined #perl6
20:51 dalek rakudo/toqast: a9af262 | jnthn++ | src/ops/perl6.ops:
20:51 dalek rakudo/toqast: A couple of native type handling tweaks.
20:51 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/a9af2623ae
20:51 dalek rakudo/toqast: 3cc9d76 | jnthn++ | src/Perl6/Optimizer.pm:
20:51 dalek rakudo/toqast: Re-instate compile time resolution of multiple dispatches, where we have sufficient type info.
20:51 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/3cc9d765b2
20:51 benabik Well, it's often nice to tell Haskell what you think the type is so it can tell you when you're wrong.
20:51 dalek nqp/toqast: 0555208 | jnthn++ | src/QAST/Operations.nqp:
20:51 dalek nqp/toqast: Be sure that invocants are boxed objects.
20:51 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/05552082cc
20:51 geekosaur http://haskell.1045720.n5.nabble.com/Ha​skell-s-type-inference-considered-harmf​ul-Re-Haskell-A-riddle-td5714992.html
20:54 jnthn OK, I think we are now just two test files away from spectests looking good on toqast \o/
20:54 Tene :D
20:54 Tene Fantastic work, jnthn.
20:54 masak geekosaur: thanks.
20:54 masak jnthn++!
20:55 jnthn We may have some module space triage too.
20:55 masak oh yes.
20:56 * masak .oO( cheese )
20:56 * masak looks admiringly at his new exception, X::Adventure::PitchBlack
20:56 jnthn It'd make a good name for a stout also.
20:57 PerlJam Isn't that a Vin Diesel movie?
20:57 ingy [Coke]: pingy
20:58 masak .u 乒乓
20:58 phenny U+4E52 CJK UNIFIED IDEOGRAPH-4E52 (乒)
20:58 phenny U+4E53 CJK UNIFIED IDEOGRAPH-4E53 (乓)
20:58 masak phenny: "乒乓"?
20:58 phenny masak: "Ping-pong" (zh-CN to en, translate.google.com)
20:59 masak phenny: "阴阳"?
20:59 phenny masak: "Yin and yang" (zh-CN to en, translate.google.com)
20:59 * sorear high-fives jnthn and whoever else is on the toqast tem
20:59 sorear so sorry I haven't been able to do much for p6 lately
21:00 * masak hugs sorear
21:00 * masak was reminded of http://1000awesomethings.com/200​8/11/27/886-high-fiving-babies/
21:00 dalek rakudo/toqast: 03dfa84 | jnthn++ | src/Perl6/Optimizer.pm:
21:00 dalek rakudo/toqast: Unbust line number reporting in errors generated by l'optimizer.
21:00 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/03dfa841f0
21:00 masak ...an association that only makes sense if Ronja is on the toqast team.
21:00 [Coke] ingy: sPONGe
21:01 jnthn OK, and now it's one.
21:01 jnthn It's a scary one though. Macro lexical craziness...
21:01 ingy [Coke]: what should I do with pugs?
21:01 [Coke] oh, just punt to masak!
21:01 jnthn I tried that. :P
21:01 masak jnthn: I'll look at it again tomorrow evening.
21:01 [Coke] ingy: can you build it?
21:01 masak jnthn: and again on my Perl 6 day on Thu if needed.
21:01 jnthn masak: Since it's the last one standing, I'm gonna poke at it a bit...
21:01 masak feel free.
21:02 masak I'm curious why it flared up.
21:02 jnthn Yeah, same.
21:03 [Coke] jnthn: not that I'm suggesting this, but could you cut over if macros "aren't supported yet" ?
21:03 jnthn r: macro foo { my $x = 1; quasi { say $x } }; foo
21:03 p6eval rakudo a4eacd: OUTPUT«1␤»
21:03 jnthn t: macro foo { my $x = 1; quasi { say $x } }; foo
21:03 p6eval toqast : OUTPUT«Null PMC access in find_method('gist')␤  in sub say at src/gen/CORE.setting:7004␤  in  at /tmp/8YCXZ5_eVV:1␤  in block  at /tmp/8YCXZ5_eVV:1␤␤»
21:03 [Coke] (I know the goal is no regressions, which is good, and I'd like to see that also. ;)
21:04 jnthn [Coke]: Meh, if there's 23000+ tests and we're talking about being *1* of getting the goal of no regressions, I'm gonna fix the one :P
21:04 jnthn *off
21:04 masak jnthn++
21:04 [Coke] aye, it was a hypothetical only.
21:04 jnthn r: macro foo { my $x = 1; quasi { say OUTER::.keys } }; foo
21:04 p6eval rakudo a4eacd: OUTPUT«RETURN $_ $x &?ROUTINE call_sig␤»
21:04 jnthn t: macro foo { my $x = 1; quasi { say OUTER::.keys } }; foo
21:04 p6eval toqast : OUTPUT«!UNIT_MARKER GLOBALish EXPORT $?PACKAGE ::?PACKAGE $_ $/ $! &foo $=pod␤»
21:04 Tene r: say (quasi { 1 }).perl
21:04 p6eval rakudo a4eacd: OUTPUT«AST.new()␤»
21:05 jnthn t: macro foo { my $x = 1; quasi { say OUTER::.keys } }; sub lol() { my $beer; foo }; lol
21:05 p6eval toqast : OUTPUT«$_ $/ $! $beer call_sig $*DISPATCHER &?ROUTINE RETURN␤»
21:05 jnthn Hmm...revealing.
21:05 masak aye.
21:05 masak and wrong.
21:06 masak jnthn++ # constructing a test for what's wrong
21:06 masak r: macro foo { my $x = 1; quasi { say OUTER::.keys } }; sub lol() { my $beer; foo }; lol
21:06 p6eval rakudo a4eacd: OUTPUT«RETURN $_ $x &?ROUTINE call_sig␤»
21:06 masak there you go. that's the difference. the AST doesn't get its appropriate OUTER.
21:07 * [Coke] lost ingy.
21:09 [Coke] ingy: if you are at the point where "perl t/run_spectests" runs the spec tests, there are a few different things you could do. Hacking on any of https://github.com/perl6/Pugs.hs/issues would be great and get us more tests.
21:09 [Coke] I'm just learning haskell, so I've been putting anything remotely hard for me in that list.
21:09 masak [Coke]++ # snowplow-driven development
21:10 [Coke] Alternatively, you could search for "pugs.*(todo|skip)" in t/spec (auto-checked out after trying to run the spectests) and fix things there (which might not have tickets)
21:10 jnthn Yeah
21:10 jnthn But...why? :)
21:10 jnthn heh
21:10 jnthn you can actually --target=pir on something with a macro in now!
21:10 ingy [Coke]: I'll try. Is it known to be busted/problematic?
21:10 * ingy installs haskell-platform...
21:10 tadzik oh hey
21:10 [Coke] ingy: see HACKING for notes on setup.
21:11 [Coke] if you have a fresh haskell-platform, and/or have touched haskell before, you'll probably be ok.
21:11 [Coke] masak: snowplow?
21:12 masak [Coke]: explicitly pushing tasks in front of oneself.
21:12 masak tadzik! \o/
21:13 TimToady .u SNOWBOARDER
21:13 tadzik s'me! \o/
21:13 masak tadzik++ # is tadzik
21:13 TimToady you just turned him into a RUNNER
21:14 tadzik autokarma!
21:14 TimToady tadzik++ # now he's a SURFER
21:14 * masak doesn't understand the sporting arithmetic
21:14 tadzik :)
21:14 ingy [Coke]: when I talked to audrey last year she pointed out that Perl6 on haskell makes sense (performance-wise) in 2011, where it seemed like a bad idea in 2006...
21:14 ingy Pugs was born too soon!
21:14 tadzik me neither
21:14 phenny TimToady: Sorry, no results for 'SNOWBOARDER'.
21:15 tadzik maybe 'cos it's late
21:17 [Coke] ingy: it really does seem faster than the other 2 options at this point. But since it's only running about 2/5 of what rakudo is, perhaps that might have something to do with it.
21:18 [Coke] I'd be very excited to get it to a point where, like rakudo, we could write more of it in perl6.
21:18 [Coke] But today, I'm just a janitor.
21:18 ingy [Coke]: otoh, it was designed to be p5 compatible from the get go :)
21:19 ingy haskell does seem to keep it out of reach from us mortals
21:21 masak nah, Haskell is just math. we can do math. :)
21:21 ingy MATH IS HAAAARD
21:22 sorear MATH IS FUN!
21:22 arnsholt I've found Haskell to be less hard than it seems for my pet project, actually
21:22 ingy sorear: who are you and what have you done with Barbie??!!
21:22 benabik That's a great tagline:  Haskell: Less hard than it seems.
21:22 ingy benabik++
21:23 arnsholt Grokking monads is kinda weird, but a basic competency with it seems decidedly feasible
21:23 ingy [Coke]: `cabal install` fails
21:23 [Coke] what's the error?
21:24 * masak recommends http://blog.sigfpe.com/2006/08/you-​could-have-invented-monads-and.html as a very approachable monad tutorial
21:24 ingy Please create a package description file <pkgname>.cabal
21:25 shachaf ingy: Haskell troubles again? :-)
21:26 * ingy cowers in the shadow of shachaf
21:26 [Coke] "cabal init" perhaps?
21:27 shachaf Huh? Shadow?
21:27 * shachaf barely knows what's going on.
21:28 masak sounds like you belong, then.
21:28 sorear If you were Shachaf Ben-Bouba you'd be less intimidating.  </obscure_jokey_reference>
21:28 pmichaud In three weeks I'll be a prime.  :-)
21:30 dalek rakudo/toqast: ee26e27 | jnthn++ | src/Perl6/Actions.pm:
21:30 dalek rakudo/toqast: Fix the busted macro stuff. Long story short. :lexical(0) has gone away, and this is how its replaced.
21:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/ee26e27c96
21:30 dalek rakudo/toqast: 5a3d1f9 | jnthn++ | src/Perl6/World.pm:
21:30 dalek rakudo/toqast: This is probably needed for serializing macro stuff (though maybe not sufficient); adding it since I spotted it.
21:30 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/5a3d1f9fed
21:30 * shachaf wonders whether ingy is still in SEA.
21:30 ingy pmichaud: in 2012? *yawn*
21:30 jnthn Pass all the spectests!
21:30 shachaf sorear's reference may be too obscure for me.
21:30 * ingy was 47 for most of 2011 !!
21:31 ingy shachaf: 206ftw!
21:32 sorear https://en.wikipedia.org/wiki/Bouba/kiki_effect
21:32 [Coke] jnthn++ !
21:32 jnthn masak: Done.
21:32 jnthn masak: It was a bit obscure.
21:32 pmichaud jnthn: eta to mergeback?
21:32 masak jnthn: ooh! do tell.
21:32 jnthn pmichaud: O(time it takes to fix any regressions in module space)
21:32 jnthn masak: See the commit.
21:32 * shachaf is in WA for the next ~week.
21:33 * [Coke] hands jnthn his hipster glasses.
21:33 ingy shachaf: me too! wanna visit capitol hill?
21:33 pmichaud jnthn: I have some regex fixes to make, but I think they should wait until after mergeback.
21:33 jnthn pmichaud: OK
21:33 * ingy assumes shachaf is in pt
21:33 sorear ingy: isn't that in DC?
21:33 pmichaud e.g., the whitespace handling in regexes, and the change to ? quantification.
21:34 ingy sorear: it is also there, oui
21:34 jnthn tadzik: If you're about/awake/able, now would be a good time to see how holy the cheese is :)
21:34 masak sorear: [re bouba/kiki effect] fascinating and not-so-surprising at the same time.
21:34 jnthn pmichaud: Yeah, probably good to merge this before you do that.
21:34 shachaf That hill is everywhere.
21:35 jnthn pmichaud: Last time tadzik++ ran the module space tests, the number of regressions was pretty small. There were still busted tests at that point.
21:35 * masak sees commit
21:35 tadzik jnthn: I'm a couple of metro stations/bus stops from home
21:35 * shachaf is indeed in PT.
21:35 jnthn tadzik: Oh! :)
21:35 masak jnthn: what the heck was :lexical(0) anyway? :P
21:36 shachaf It's quite possible that I'll end up in Capitol Hill, either this weekend or next week.
21:36 tadzik I'll rebuild and retest stuff as soon as I get there, it'll take about 35 minutes
21:36 jnthn masak: A "don't give me an outer" thing
21:36 tadzik or someone can do it, it's not black art
21:36 jnthn tadzik: OK. I'm currently syncing latest nqp/toqast with latest nqp/master
21:36 tadzik it's just about running two Perl 6 programs
21:36 ingy shachaf: let me know ahead of time. it would be good to see you.
21:36 jnthn Which may deal with the Zavolaj issues you saw.
21:37 tadzik or maybe one of them is even Perl 5
21:39 masak jnthn: glad you found it. I would not have spotted that unless given lots of clues. jnthn++
21:40 [Coke] if :lexical isn't around, should its use have died?
21:42 shachaf ingy: OK.
21:45 jnthn [Coke]: I've just been looking into that. I thought it was totally gone, but it turns out it was still in QAST::Block. The compiler paid it no attention though.
21:45 jnthn Will kill it now. That's 8 bytes off each QAST::Block...
21:45 dalek roast: 24cc87a | coke++ | S32-str/tc.t:
21:45 dalek roast: pugs fudge
21:45 dalek roast: review: https://github.com/perl6/roast/commit/24cc87a1fe
21:47 dalek Heuristic branch merge: pushed 21 commits to nqp/toqast by jnthn
21:48 supernovus joined #perl6
21:49 supernovus arnsholt: are you around?
21:49 [Coke] moritz: looks like ucfirst is still used in a few spectests.
21:51 tadzik me back home
21:57 ingy [Coke]: I can 'cabal install Pugs', but I can't 'cd Pugs.hs; cabal install'
21:58 ingy I can try to fix later
21:59 geekosaur ? Pugs.hs would be a file, not a directory, I'd hope
21:59 benabik I think `cabal install Pugs` pulls the module from the cabal servers.
21:59 ingy 'cabal init`  fails with cabal: /home/ingy/src/Pugs.hs/syck/HsSyck: does not exist
21:59 geekosaur huh
22:00 shachaf @context ingy
22:00 ingy hmmm
22:00 ingy sec
22:00 shachaf `cabal init` is for making a new package.
22:00 shachaf I assume it's not what you want.
22:00 benabik ingy: I think you have to run cabal from inside Pugs.hs/Pugs
22:01 ingy benabik: yes, just figured that out :)
22:01 benabik Pugs.hs pulls together several modules, of which the core pugs app is just one.
22:01 ingy seems happier now :)
22:01 dju joined #perl6
22:02 sergot good night o/
22:03 sorear geekosaur: Pugs.hs is the name of the main pugs repo
22:03 * geekosaur missed that apparently.  not a really good idea that
22:04 dalek rakudo/toqast: a4eacdf | moritz++ | t/spectest.data:
22:04 dalek rakudo/toqast: remove ucfirst/lcfirst tests
22:04 dalek rakudo/toqast:
22:04 dalek rakudo/toqast: they are gone or going
22:04 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/a4eacdf961
22:04 dalek rakudo/toqast: 4fe23e7 | moritz++ | / (5 files):
22:04 dalek rakudo/toqast: implement tclc
22:04 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/4fe23e7590
22:04 dalek rakudo/toqast: c23523d | jnthn++ | / (4 files):
22:04 dalek rakudo/toqast: Merge branch 'nom' into toqast
22:04 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/c23523d15b
22:04 dalek rakudo/toqast: a9dbdef | jnthn++ | src/Perl6/Ops.pm:
22:04 dalek rakudo/toqast: Add tclc op (could go in NQP also; feel free to move).
22:04 dalek rakudo/toqast: review: https://github.com/rakudo/rakudo/commit/a9dbdeff50
22:05 dalek Pugs.hs: e7f863c | (Ingy döt Net)++ | HACKING:
22:05 dalek Pugs.hs: Remove extraneous whitespace char.
22:05 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/e7f863c195
22:05 dalek nqp/toqast: 8a9b631 | jnthn++ | src/QAST/Block.nqp:
22:05 dalek nqp/toqast: Toss unsued attribute on QAST::Block.
22:05 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8a9b6317aa
22:06 ingy [Coke]: all up to date now. will hack later.
22:06 ingy o/
22:21 masak lol! blogg'd! \o/ http://strangelyconsistent.org/b​log/july-24-2012-fetching-water
22:23 lue hello world o/
22:24 masak lue! \o/ just in time for today's crypt blogging. :)
22:24 lue masak++ on the post, by the way
22:24 masak \o/
22:24 * lue attempts to get soggy leaves
22:24 masak lue: I could see you winning the prize (correct spelling, yay!) by sheer exhaustion of combinations :)
22:28 lue Help! I can't operate the flashlight ("turn on flashlight" doesn't work) :)
22:28 masak yeah. verb synonyms. :/
22:28 masak 'use' works for now.
22:29 lue Ah. Never would have thought of "use" working (because, IIRC, Infocom games have never been that great with the verb "use")
22:31 Guest7389 joined #perl6
22:31 Guest7389 hey
22:31 masak hi, Guest7389. bye, Guest7389.
22:31 * masak .oO( drive-by greeting )
22:35 * lue considers blogging during August about making an adventure game with Adventure::Engine...
22:37 masak ooh!
22:37 masak nice way to *force* me to factor out the Adventure::Engine! :P
22:38 masak (really, I don't mind)
22:38 lue I can think of one big additional module (even though in my typical IF game I'd avoid using them): NPCs! (Adventure::NPC perhaps)
22:39 masak :)
22:39 timotimo masak: this 哈 character you use all the time. what is it?
22:40 masak timotimo: it is the sound of laughter.
22:40 timotimo ah, that's interesting
22:40 masak using latin characters for laughter started feeling "wrong" to me a few years ago. so I use "哈哈" instead.
22:41 diakopter is there some pirop that does itoa
22:41 masak or "呵呵", for slightly more controlled laughter.
22:41 diakopter of type int
22:41 diakopter int to ascii
22:42 diakopter or nqpop too
22:43 jnthn pir::set__Is(...)
22:43 jnthn er, other way
22:44 jnthn pir::set__Si(...)
22:44 drbean joined #perl6
22:49 lue I get the feel I can't get the water out of the helmet yet (or I'm not thinking creatively enough)
22:49 lue s/feel/feeling/
22:49 masak lue: it's entirely possibly that you can't get water out of the helmet yet.
22:49 masak I haven't tested that.
22:50 masak feel free to pull-request a test for getting water out of the helmet, if you want.
22:50 masak a failing test, I should say.
22:51 timotimo "don't you dare implement code to make that test pass!"
22:51 * lue considers writing the test
22:52 timotimo "i dare you, i double-dare you, my brother, pass a test one more butterfly-damn time!"
22:52 * timotimo points a squirtgun at lue
22:52 lue what verb would you use for getting water out of the helmet, masak?
22:53 timotimo "empty"?
22:53 timotimo maybe also "dump" or "pour"
22:56 masak lue: "drop water", perhaps?
22:56 timotimo "freeze! drop the water!"
22:56 * timotimo wraps up his comedy routine for today
22:56 masak lue: I guess I wouldn't mind "pour water in/on <something>", but that will likely be a synonym for "put ..."
22:56 lue OK. Lemme just reset my fork and (attempt to) write the test (since synonyms are NYI, I'd like to write a test that won't rely on synonyms too)
22:56 masak aye.
22:58 * lue wonders how to update his fork without merging...
22:59 geekosaur git stash?
22:59 skids joined #perl6
23:00 masak lue: 'git reset --hard <some commit that masak did>', 'git pull'
23:01 masak then, when pushing, 'git push --force' once.
23:01 lue git pull just pulls my old synonym commits :/
23:02 masak oh! 'git pull <masak's origin> master', then.
23:03 lue \o/
23:03 masak you can see/edit a list of your remotes in .git/config
23:03 jnthn 'night, #perl6
23:07 lue so, "drop water" is the command to test? (and therefore testing $engine.drop('water'))
23:07 masak aye.
23:07 lue (or maybe you'd be faster at writing the test :P)
23:08 masak probably, but if you pull-request it and I like the commit, I'll pull it in.
23:08 masak and then I'll make the test pass :)
23:08 masak (and you'll get a mention in tomorrow's blog post) :)
23:09 masak there should be plenty examples of how such a test ought to look.
23:11 * lue is writing the test
23:15 cognominal joined #perl6
23:17 lue Hm. There's no Crypt::Game.drop. Either I wrote a good failing test or I did something wrong.
23:17 masak no, it's fine.
23:18 masak I consider "no such method" errors to be good test failures, I mean.
23:18 masak I don't always in projects, but in this one I do.
23:19 masak partly because the exceptions I get from Game::Engine are usually very informative, like "You can't pick up the helmet"
23:19 masak anyway, 'night, #perl6
23:27 skids .oO(put water in helmet, wear helmet.)
23:40 cognominal joined #perl6

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

Perl 6 | Reference Documentation | Rakudo