Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-10-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Khisanth joined #perl6
00:00 wooden joined #perl6
00:00 wooden joined #perl6
00:04 havenn joined #perl6
00:11 fgomez joined #perl6
00:15 [Coke] r: say :3[1,2,3]
00:15 p6eval rakudo 34febe: OUTPUT«18␤»
00:16 flussence I'm a bit confused, a "note $match-obj" is giving me bÿ and cÿ instead of 「/」. Works fine if I try "note $match<subrule>", or hand-encode it...
00:17 flussence oh wait, it works if I change a [...]* to a (...)*
00:18 sorear .u 」
00:18 phenny U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」)
00:18 sorear FF63
00:18 sorear FF is ÿ, 63 is c
00:18 sorear some part of your system is epically failing with unicode
00:19 benabik joined #perl6
00:19 sorear try piping the output through 'hexdump -C' or whatever, see if there are lots of nuls
00:20 sorear .u ÿ
00:20 phenny U+00FF LATIN SMALL LETTER Y WITH DIAERESIS (ÿ)
00:21 sorear sounds like your terminal is expecting iso-8859-1 but receiving utf-16-le
00:21 flussence oh right, that null problem... probably that.
00:21 sorear null problem?
00:22 flussence rakudo sometimes freaks out and encodes everything as broken utf-16
00:22 flussence and it's doing it here...
00:29 plobsing joined #perl6
00:33 _jaldhar joined #perl6
00:50 anuby joined #perl6
00:53 cognominal joined #perl6
00:55 havenn joined #perl6
01:04 baest joined #perl6
01:13 _jaldhar joined #perl6
01:26 am0c joined #perl6
01:27 hypnokode joined #perl6
01:46 bruges joined #perl6
01:56 leprevost joined #perl6
02:13 skids r: say :4294967296[1,1] # checking 32bit machine, mine is 64bit
02:13 p6eval rakudo 34febe: OUTPUT«-2147483647␤»
02:18 TimToady I'd call it a bug
02:19 skids Oh, it's probably the same int/bigint border bug that has been around for a while.
02:19 skids r: say :4294967296[1,1,1]
02:19 p6eval rakudo 34febe: OUTPUT«4611686016279904257␤»
02:20 skids r: say :4294967296[0,1,1]
02:20 p6eval rakudo 34febe: OUTPUT«-2147483647␤»
02:35 bruges joined #perl6
02:36 skids .oO(pack-like use of radix might be common enough that more "0x" like forms would be helpful, e.g. "0c" "0s" "0w" "0q")
02:36 skids oh scratch that.
02:37 skids not thinking -- useless without the brackets.
02:55 diakopter the unused 0\w are reserved for undocumented internals language feature keywords ;)
02:58 skids It would have to be something like :0w[] to be useful the way I was thinking.
02:58 stocks joined #perl6
03:01 Vlavv_ joined #perl6
03:01 spaceships joined #perl6
03:05 bruges_ joined #perl6
03:11 wamiks joined #perl6
03:21 orafu joined #perl6
03:28 gdey joined #perl6
03:28 gdey r:my $p = "Perl 5"; say $p.substr(0,2);
03:28 gdey rakudo:my $p = "Perl 5"; say $p.substr(0,2);
03:30 geekosaur space
03:30 geekosaur r: my $p = "Perl 5"; say $p.substr(0,2);
03:30 p6eval rakudo 34febe: OUTPUT«Pe␤»
03:31 gdey ah. Thanks.
03:32 gdey Do you know where I can get the list of built in commands? Trying to verify something.
03:33 benabik joined #perl6
03:34 sorear hello gdey.
03:35 gdey Hey sorear!
03:35 sorear S03 has the list of operators
03:35 gdey How's things going?
03:35 gdey Cool, thanks!
03:35 sorear S32 has the builtin functions which are related to types
03:35 jaldhar_ joined #perl6
03:35 sorear doc.perl6.org has lots of stuff, but is a bit less complete I think
03:36 sorear stuff's ok.
03:37 TimToady nr: say SETTING::.keys
03:37 p6eval niecza v22-14-g136ddcf: OUTPUT«0␤»
03:37 p6eval ..rakudo 34febe: OUTPUT«!UNIT_MARKER GLOBALish EXPORT $?PACKAGE ::?PACKAGE $_ $/ $! &restricted &open &unlink &shell &run &QX &mkdir &rmdir &rename &copy IO $=pod␤»
03:37 TimToady nr: say +SETTING::.keys
03:37 p6eval rakudo 34febe: OUTPUT«20␤»
03:37 p6eval ..niecza v22-14-g136ddcf: OUTPUT«1␤»
03:37 gdey nr: my $p = "Perl 5"; substr($p,5,1,'6'); say $p
03:37 p6eval niecza v22-14-g136ddcf: OUTPUT«Perl 6␤»
03:37 p6eval ..rakudo 34febe: OUTPUT«Too many positional parameters passed; got 4 but expected between 2 and 3␤  in sub substr at src/gen/CORE.setting:2172␤  in block  at /tmp/l5INl3kaqX:1␤␤»
03:37 TimToady nr: say +CORE::.keys
03:37 p6eval niecza v22-14-g136ddcf: OUTPUT«1␤»
03:37 p6eval ..rakudo 34febe: OUTPUT«426␤»
03:38 TimToady gdey: there are 426 built-ins :)
03:38 gdey I'm trying to figure out if rakudo just has not implemented the 4 param version of substr, or if something is wrong with the code: my $p = "Perl 5"; substr($p,5,1,'6'); say $p
03:39 gdey TimToady: 426, wow!
03:39 sorear rakudo has not implemented the 4 param version of substr.
03:39 TimToady depends, of course, on what you call a "built-in"
03:39 TimToady but that's how many names there are
03:39 diakopter std: use CORE;
03:39 gdey Seems like there is a lot to document. :P
03:39 p6eval std edd7715: OUTPUT«[31m===[0mSORRY![31m===[0m�Illegal redeclaration of symbol 'infix:<∪>' (see line 1) at /tmp/lTMCPxi8J9 line 1:�------> [32muse CORE[33m�[31m;[0m�Illegal redeclaration of symbol 'infix:<⊃>' (see line 1) at /tmp/lTMCPxi8J9 line 1:�------> [32muse CORE[33m�[3…
03:39 sorear also, (at rakudo's request) substr no longer returns an lvalue
03:40 sorear you now have to use substr-rw :(
03:40 sorear rn: my $p = 'Perl 5'; substr-rw($p,5,1) = '6'; say $p
03:40 p6eval rakudo 34febe, niecza v22-14-g136ddcf: OUTPUT«Perl 6␤»
03:41 gdey Well, that's good to know. I'll add entries for it in the Perl6Book. I was going through the issues, to see which ones I could close quickly.
03:43 gdey So, is substr-rw now a built-in, that replaces the lvalue version of substr for all implementations? Or is it possiable for an implementation to do the lvalue version and not the substr-rw?
03:44 sorear substr-rw is now a built-in
03:44 gdey I guess what I'm asking is if the spec was changed?
03:44 sorear the spec was changed
03:47 _jaldhar_ joined #perl6
03:48 dayangkun joined #perl6
03:48 bbkr__ joined #perl6
03:58 benabik joined #perl6
04:01 gootle joined #perl6
04:15 havenn joined #perl6
04:28 clkao `
04:30 _jaldhar_ joined #perl6
04:30 sorear o/ clkao
04:40 wamiks1 joined #perl6
04:56 havenn joined #perl6
05:21 telex joined #perl6
05:27 birdwindupbird joined #perl6
05:35 wamiks1 left #perl6
05:35 telex joined #perl6
05:47 SamuraiJack joined #perl6
05:56 moritz star: say "OH HAI"
05:56 p6eval star 2012.10: OUTPUT«OH HAI␤»
06:32 havenn joined #perl6
06:42 dayangkun joined #perl6
06:48 am0c joined #perl6
06:51 jaldhar joined #perl6
07:05 clkao joined #perl6
07:17 kaleem joined #perl6
07:24 Woodi morning # :)
07:26 Woodi sorear: you can tell someting about "sandboxing" planned feature in niecza ? in one process ?
07:28 sorear n: say slurp "/etc/passwd"
07:28 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: slurp may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (slurp @ 0) ␤  at /tmp/fFaPgfQpQP line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…
07:35 jrockway joined #perl6
07:45 moritz jnthn++ # R* release
07:53 colomon_ joined #perl6
08:05 Ulti does the parrot release "proto-hydra" imply the next release is multi threaded? >:3
08:10 xinming joined #perl6
08:15 brrt joined #perl6
08:16 domidumont joined #perl6
08:23 flightrecorder joined #perl6
08:24 FROGGS joined #perl6
08:24 domidumont joined #perl6
08:24 moritz the parrot folks have been hoping for a quarter year now that the next release with be with threads
08:25 sorear isn't that one release cycle?
08:25 brrt no, parrot is released monthly-or-so
08:32 diakopter one supported release cycle, yes
08:33 diakopter though I won't deign to guess the actual difference between supported and developer
08:35 Woodi anyway hardware transactional memory in Intels coming next year - maybe it extends "free launch" ? :)
08:57 Chillance joined #perl6
08:58 jnthn morning o/
08:59 jnthn phenny: tell pmichaud creating the MSI would be helpful, if you have a moment to do that
08:59 phenny jnthn: I'll pass that on when pmichaud is around.
08:59 diakopter o/
09:01 FROGGS morning
09:04 moritz FROGGS: thanks for testing panda on windows
09:06 FROGGS moritz: thats all? could I do something else?
09:06 FROGGS (like hunting down that bug or so)
09:06 moritz well, that would be even more awesome
09:06 moritz :-)
09:07 FROGGS k, the problem is in panda itself?
09:07 FROGGS if it is a rakudo or nqp thingy I have to pass
09:07 moritz I have no idea
09:07 FROGGS k
09:09 kresike joined #perl6
09:09 kresike good morning all you happy perl6 people
09:10 brrt hi kresike
09:11 kresike brrt, o/
09:12 rindolf joined #perl6
09:17 daxim joined #perl6
09:22 NamelessTee joined #perl6
09:24 birdwind1pbird joined #perl6
09:41 birdwind1pbird joined #perl6
09:57 kurahaupo joined #perl6
10:12 spider-mario joined #perl6
10:15 Tjelehenrik joined #perl6
10:17 Tjelehenrik hi
10:17 moritz hello
10:19 nwc10 jnthn: same boom from origin/Q even with nqp's HEAD
10:19 dayangkun joined #perl6
10:19 nwc10 the future isn't evenly distributed yet? [ie not pushed :-)]
10:20 domidumont joined #perl6
10:22 jnthn nwc10: Hm, c077b22a I assume?
10:22 jnthn nwc10: You certainly make install'd the NQP at that revision?
10:24 NamelessTee joined #perl6
10:27 SamuraiJack_ joined #perl6
10:28 nwc10 gah
10:28 bbkr__ release!  \o/
10:29 MayDaniel joined #perl6
10:29 nwc10 rakudo's --gen-nqp seems to move my checout somewhere lese
10:29 nwc10 else
10:29 nwc10 but "less" too
10:36 bowtie joined #perl6
10:36 arnsholt You might want to try to have a parallel checkout of nqp that you set to the correct rev and such manually and use --with-nqp instead
10:39 arnsholt There's also a special file called config.default you can put args in, so that you just do perl Configure.pl and the right thing happens
10:46 moritz woah, I didn't know about config.default
10:50 nwc10 I did this: perl Configure.pl --gen-parrot --gen-nqp=origin/master && make all test
10:50 nwc10 and it worked
10:51 nwc10 (long enough for me to discover that I can't build the setting as I'm too tight on swap)
10:51 arnsholt moritz: I think I discovered it when I was digging through Configure.pl (for some reason)
10:51 arnsholt Oooh, I didn't know that gen-nqp can take an argument
11:23 SamuraiJack_ joined #perl6
11:40 brrt joined #perl6
11:48 stocks joined #perl6
11:57 am0c_ joined #perl6
12:00 am0c joined #perl6
12:03 cognominal joined #perl6
12:21 domidumont joined #perl6
12:23 GlitchMr joined #perl6
12:26 pmurias joined #perl6
12:28 * [Coke] yawns from post-Sandy ... dampness.
12:28 moritz [Coke]: how bad is it?
12:30 FROGGS moritz, tadzik: I know whats wrong for panda tests
12:30 moritz FROGGS: do tell
12:30 FROGGS it tries to clone local repo from folder t/ to REMOVEME/foobar, but t/ is not a repo
12:31 [Coke] moritz: it is damp.
12:31 [Coke] seriously, that's it.
12:31 moritz [Coke]: that doesn't sound too bad
12:31 FROGGS ahh
12:31 FROGGS it should fail....
12:31 [Coke] I'm about 3 hours north of NYC by train - far enough inland we just got a rain storm.
12:32 FROGGS the test passes on linux since the errormessage equals the check in the test
12:33 moritz oh "nice"
12:36 pmurias if I'm working on a bigger feature which I want to break up into multiple commits (so I can git revert etc.) but which breaks some tests untill it's fully done, what should I use? a branch?
12:36 brrt pmurias: yes
12:36 moritz agreed
12:36 moritz that's exactly what branches are for
12:36 brrt big-features-which-break-tests are an ideal case for branches
12:37 brrt which also gives you the opportunity to look at the failing tests, and see if they are still appropriate
12:37 moritz (along with "try out this feature but maybe throw away", "prototype stuff", "I want to have a review before I commit to master")
12:40 Woodi it's hard to imagine how sofware could be made without tests and git :)
12:40 Woodi do they have some secret methodology or something ? :)
12:41 brrt Woodi: just push hard enough and squint till it looks like it works
12:41 brrt that is pretty much how web development often still works
12:42 Woodi hmm, right... like painting a picture :)
12:43 brrt hackers and painters? i guess
12:43 Woodi painters still do not have test methodology me think...
12:44 brrt methodology sounds like engineering, like serious work
12:46 Woodi was just joking but looks painters are nice another point of view on software doing work :)
12:50 FROGGS moritz: [panda] the problem is that there is no X::Panda because the failing shell cmd doesnt return nonzero :/
12:51 wooden joined #perl6
12:51 wooden joined #perl6
12:52 FROGGS moritz: http://paste.scsys.co.uk/212258
12:53 FROGGS and the behaviour of `git` is different
12:58 hash_table joined #perl6
12:59 moritz ooh, a windowsgitbug
13:01 FROGGS looks like
13:05 Psyche^ joined #perl6
13:08 sqirrel joined #perl6
13:09 mtk joined #perl6
13:13 lumi__ Are you sure it's not shell?
13:13 am0c std: our sub AnyEvent::timer { ... }; AE::{'&timer'} := &AnyEvent::timer;
13:13 p6eval std edd7715: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    'AE::' used at line 1â�¤Check failedâ�¤FAILED 00:00 47mâ�¤Â»
13:14 lumi__ FROGGS: I mean, say shell 'false' or something works fine?
13:15 jnthn There's certainly been some msysgit exit code bugs, like https://github.com/msysgit/msysgit/issues/45
13:15 mucker joined #perl6
13:15 jnthn Fixed in latest.
13:15 jnthn afaik
13:16 hoelzro so...since heredocs are gone, what is the recommended alternative in Perl6?
13:17 jnthn hoelzro: Heredocs aren't gone.
13:17 hoelzro they're not?
13:17 hoelzro I thought they were removed
13:17 jnthn hoelzro: No. Forms were removed. Heredocs stay; Rakudo doesn't implement them yet (they're fiddly), but the quote handling refactors I've been doing should make them possible in the next couple of weeks, all being well.
13:18 hoelzro ooooooh
13:18 hoelzro very good =)
13:18 * hoelzro goes back to being quiet
13:21 brrt joined #perl6
13:25 am0c joined #perl6
13:36 plobsing joined #perl6
13:37 cognominal rn: say i**2
13:37 p6eval rakudo 34febe: OUTPUT«-1+1.22460635382238e-16i␤»
13:37 p6eval ..niecza v22-14-g136ddcf: OUTPUT«-1+1.2246063538223773E-16i␤»
13:38 cognominal is this useful to print the real and imaginary part with different exponents?
13:38 cognominal rn: say i * i
13:39 p6eval rakudo 34febe, niecza v22-14-g136ddcf: OUTPUT«-1+0i␤»
13:39 kurahaupo joined #perl6
13:41 [Coke] I think if you wanted it formatted a certain way, you'd use printf.
13:42 [Coke] rn: say i**i
13:42 p6eval rakudo 34febe: OUTPUT«0.207879576350762+0i␤»
13:42 p6eval ..niecza v22-14-g136ddcf: OUTPUT«0.20787957635076196+0i␤»
13:42 [Coke] rn: say i*i #whoops
13:42 p6eval rakudo 34febe, niecza v22-14-g136ddcf: OUTPUT«-1+0i␤»
13:46 jaldhar joined #perl6
13:47 [Coke] (or avoid exponents)
13:47 rindolf joined #perl6
13:49 PacoAir joined #perl6
13:52 am0c std: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &*timer ::= AnyEvent::<&*timer> };
13:52 p6eval std edd7715: OUTPUT«ok 00:00 46m␤»
13:52 am0c pugs: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &*timer ::= AnyEvent::<&*timer> };
13:52 p6eval pugs: OUTPUT«*** ␤    Unexpected "<&*"␤    at /tmp/I8uIUn407p line 1, column 91␤»
13:52 am0c r: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &*timer ::= AnyEvent::<&*timer> };
13:52 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/OgS6tC1jU1:1␤»
13:55 jnthn Why the *?
13:56 jnthn (It means contextaul, but I don't think it's what you're after here)
13:56 am0c I thought it was like a package symbol, oops..
13:57 am0c r: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &timer ::= AnyEvent::<&timer> };
13:57 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/yXXtr3_4Oo:1␤»
13:57 SamuraiJack__ joined #perl6
13:58 [Coke] jnthn: so, any suggestion on how to enable more verbose debug output when using HLL::Compiler? I tried passing :ll-exception to command_line, no help, adding a "handle-exception" method to Partcl::Compiler (which isa HLL::Compiler), doesn't seem to get called.
13:59 [Coke] I'm trying to track down an error but the lack of line #'s or files makes guessing haaaard.
13:59 [Coke] (esp. since I think it's not in my code, but somewhere in HLL::)
14:00 am0c r: module AnyEvent { our sub timer { print "hi"; }; }; AE::<&timer> ::= AnyEvent::<&timer>; AE::timer
14:00 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&AE' called (line 1)␤»
14:00 am0c r: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &timer ::= AnyEvent::<&timer>; }; AE::timer
14:00 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/7VhArVPKXP:1␤»
14:01 SamuraiJack joined #perl6
14:01 am0c r: module AnyEvent { our sub timer { print "hi"; }; }; module AE { our &timer = AnyEvent::<&timer>; }; AE::timer
14:01 p6eval rakudo 34febe: OUTPUT«hi»
14:02 jnthn [Coke]: What compilation phase does it fail in?
14:02 wk joined #perl6
14:02 jnthn [Coke]: I think the handle-exception is only called for runtime errors.
14:02 [Coke] it's run time.
14:02 [Coke] I'm trying to fix partcl's [eval]
14:02 jnthn Oh.
14:03 jnthn OK, then I'm surprised --ll-exception doesn't give more hints.
14:03 [Coke] so, sort of run time? I'm calling back into Partcl::Compiler.new.compile($code), getting an error on the 'parse' method, which I can't see is actually called directly..
14:03 pmichaud good morning, #perl6
14:03 phenny pmichaud: 08:59Z <jnthn> tell pmichaud creating the MSI would be helpful, if you have a moment to do that
14:03 [Coke] jnthn: er, I explicitly added << , :ll-exception >> to the command_line() invocation.
14:03 tadzik FROGGS: uh, that's awful
14:04 pmichaud working on the .msi now
14:04 tadzik I thought it just checks the error code, not the message
14:05 jnthn [Coke]: What's the error?
14:07 [Coke] well, right now, it's "too many named arguments: 3 passed, 0 used"
14:07 [Coke] I was getting an error in method parse with invocant NQPMu.
14:07 am0c Could I get any hint of why 'our' variable declartion cannot be binded, although 'my' works?
14:07 * [Coke] tries passing ll-exception on the command line...
14:07 am0c s/binded/bind/;
14:08 moritz s/bind/bound/ :-)
14:08 am0c oh, thanks moritz!
14:08 moritz am0c: implementation limitation; internally 'my' and 'our' are totally different
14:08 moritz am0c: and people haven't put all too much work into 'our' variables, because they aren't used that much
14:09 [Coke] jnthn: no change if I run ./partcl --ll-exception
14:10 jnthn [Coke]: The NQPMu thing would happen if somehow parsegrammar as not set...
14:10 flightrecorder joined #perl6
14:10 pmichaud I'm not sure what binding of an 'our' variable would do, exactly.
14:10 am0c moritz: I see.
14:10 jnthn [Coke]: Did you try obtaining the compiler object using compreg instead?
14:10 [Coke] no, you said avoid PIR. :)
14:10 skids joined #perl6
14:10 [Coke] I can try that.
14:10 [Coke] do you need to call "parsegrammar" before every call to .compile ?
14:10 jnthn Do as I do, not as I say :P
14:11 [Coke] I have no idea what you're doing. :)
14:11 [Coke] Or what I'm doing. :)
14:11 jnthn [Coke]: I'm using compreg ;-)
14:11 pmichaud my $x = 3;  our $a = 4;  { our $a := $x; };  say $a;   # what's the value of $a here?
14:11 pmichaud [Coke]: One only needs to call .parsegrammar once on the object that performs the compile.
14:11 brrt pmichaud, i'm guessing 3
14:12 jnthn [Coke]: I think that parsegrammar called once at startup is enough provided you consistently use the same compiler object.
14:12 jnthn [Coke]: By doing .new I guess you're creating a new (unconfigured) instance or something...
14:12 am0c hm
14:12 [Coke] jnthn: I was not using the same compiler object. I was doing "Partcl::Compiler.new.compile($stuff)"
14:12 pmichaud brrt: I'm thinking it's 4.
14:12 [Coke] trying compreg...
14:12 am0c I guest it should emit an error 'our' cannot delcared twice.
14:12 pmichaud .... oh, Partcl::Compiler.new.compile won't work.
14:13 [Coke] jnthn: \o/
14:13 brrt rn: my $x = 3; our $a = 4; { our $a := $x; }  say $a;
14:13 p6eval niecza v22-14-g136ddcf: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/dsZucf4aMZ line 1:â�¤------> [32mmy $x = 3; our $a = 4; { our $a := $x; }[33mâ��[31m  say $a;[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
14:13 p6eval ..rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/POgGijfyu0:1␤»
14:13 pmichaud because the .new Partcl::Compiler object doesn't have its .parsegrammar set :-)
14:13 brrt rn: my $x = 3; our $a = 4; { our $a := $x; };  say $a;
14:13 [Coke] This still doesn't help my ll-exception diagnostics, but now [eval puts hi] works.
14:13 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/oD4qV03YNW:1␤»
14:13 p6eval ..niecza v22-14-g136ddcf: OUTPUT«3␤»
14:14 am0c rn: my $x = 3; our $a = 4; { our $a = $x; };  say $a; #<not binding>
14:14 p6eval rakudo 34febe, niecza v22-14-g136ddcf: OUTPUT«3␤»
14:14 brrt a block doesn't create a package, right?
14:14 [Coke] jnthn++ pmichaud++
14:14 flussence a block creates a lexical scope
14:14 jnthn brrt: correct, you need a package delcarator to create a package
14:14 pmichaud oh, it could be 3.  I still have to internalize the changes to binding semantics that we discussed at the summit in August  :-|
14:14 brrt so,
14:15 pmichaud previously,  :=   was considered a low-level bind; it bound an object to a symbol
14:15 am0c so it's okay to have multiple lexical 'our' declartions?
14:15 pmichaud but we're having to add semantics on top of :=
14:15 domidumont joined #perl6
14:15 brrt rn: my $x = 3; our $a = 4; package { our $a := $x; }; say $a;
14:15 p6eval niecza v22-14-g136ddcf: OUTPUT«4␤»
14:15 p6eval ..rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/df4HAEsRvD:1␤»
14:15 brrt niecza++
14:16 brrt rn: my $x = 3; our $a = 4; package { our $a = $x; }; say $a;
14:16 p6eval rakudo 34febe, niecza v22-14-g136ddcf: OUTPUT«4␤»
14:16 brrt why can't rakudo bind a variable?
14:16 [Coke] weird. [eval puts 3] works, but [eval [llength [list a b c]]] does not. ah well, one victory a day.
14:16 brrt rn: my $x = 3; our $y := $x;
14:16 p6eval niecza v22-14-g136ddcf:  ( no output )
14:16 p6eval ..rakudo 34febe: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/Ltxf3iDXD_:1␤»
14:17 jnthn brrt: How do you understand "our"?
14:17 pmichaud it'll work when we redefine := in rakudo.
14:17 jnthn pmichaud: Hm :)
14:17 brrt our is package my
14:17 cognominal joined #perl6
14:17 jnthn brrt: our declares a lexical alias to a package variable in the current lexical scope
14:18 [Coke] jnthn: with https://github.com/partcl/partcl-nqp/blob/nqp2/src/Partcl.pm#L21 , should I be able to pass --ll-exception on the command line and have it DTRT?
14:18 brrt ok, then what does my really do?
14:18 jnthn brrt: binding thus would to me seem to mean, if anything, that you re-bind that alias.
14:18 pmichaud our $x;    in rakudo is like     my $x := OUR::<$x>
14:18 jnthn Right
14:18 jnthn brrt: my declares a lexical variable
14:19 brrt i thought 'our' declared a variable too, but it doesn't?
14:19 am0c pmichaud++ it makes me grasp our our!
14:19 jnthn [Coke]: I'd guess so.
14:19 pmichaud but re-binding of lexicals in Rakudo will likely change semantics
14:19 brrt or does our declare both the lexical alias and (possibly) the package variable?
14:20 am0c so 'our' declares lexical variable, which aliases to package variable
14:22 jnthn brrt: There's not really such thing as declaring a package variable.
14:22 jnthn They're just stored in a Stash
14:22 jnthn r: my module A { }; A::<$x> = 42; say A::<$x>
14:22 p6eval rakudo 34febe: OUTPUT«42␤»
14:22 am0c aha!
14:22 jnthn There I gave A's package a $x.
14:22 brrt i see
14:22 jnthn r: my module A { }; say A::.WHAT
14:22 p6eval rakudo 34febe: OUTPUT«Stash()␤»
14:23 jnthn r: say Stash.^mro
14:23 p6eval rakudo 34febe: OUTPUT«Stash() Hash() EnumMap() Iterable() Cool() Any() Mu()␤»
14:23 jnthn And Stash is really just a kind of hash. :)
14:23 brrt yes, clearly
14:23 FROGGS joined #perl6
14:23 brrt thanks, jnthn++ :-)
14:23 moritz it's a s/^H/St/ kind of Hash :-)
14:23 am0c I love this simple structure.
14:25 am0c r: say Str.^mro
14:25 p6eval rakudo 34febe: OUTPUT«Str() Cool() Any() Mu()␤»
14:25 brrt grr, i want my nqp to work again :-(
14:27 jnthn Your NQP doesn't work?
14:30 brrt building nqp doesn't work
14:30 brrt and i can't really figure out why
14:30 jnthn brrt: Same issue [Coke] was having?
14:30 brrt yep
14:30 jnthn Hm
14:30 jnthn OSX also?
14:30 brrt yep
14:31 brrt its a zero pointer exception by the way
14:31 benabik joined #perl6
14:31 brrt somewhere in Parrot_pcc_*
14:31 jnthn [Coke]: Did you resolve it, or just build an older NQP?
14:32 [Coke] jnthn: I just rolled back to the last-functional NQP.
14:33 [Coke] jnthn: aha! --ll-exception doesn't work with the REPL
14:33 brrt [Coke]: what version was that
14:33 [Coke] ./partcl --ll-exception -e "set a 3" # this gives me the stacktrace.
14:34 [Coke] brrt: it's in the ticket.
14:34 [Coke] ... well, it's derivable from the ticket.
14:34 [Coke] 234daad
14:36 rindolf joined #perl6
14:36 [Coke] jnthn: ... ah. --ll-exception has no effect on the stack trace on the command line.
14:36 [Coke] but at least I have a way to get the trace now.
14:36 brrt [Coke]: i'll check out the difference
14:40 [Coke] yay. with that, I was able to diagnose issues with [set] and fix it with a one liner.
14:40 [Coke] jnthn++ # new nqp
14:40 [Coke] pmichaud++ # partcl-nqp legwork.
14:40 birdwind1pbird joined #perl6
14:41 brrt oh, tickets closed then
14:41 brrt :-)
14:42 brrt (oh its not, never mind)
14:46 xinming_ joined #perl6
14:49 hash_table joined #perl6
14:51 brrt whats the git way to get all diffs between commits?
14:51 hoelzro git diff start..end?
14:51 hoelzro or do you want to look at each commit individually?
14:52 hoelzro if so, I think git show should do it
14:53 brrt thanks
14:54 pmichaud jnthn: you missed part of Step 7 in the star build.  :-/
14:55 GlitchMr wow, I've made glitchmr.github.com valid HTML5... not that this really matters
14:55 GlitchMr Especially when fix is as hacky as https://github.com/GlitchMr/glitchmr.github.com/commit/c1bd06f3312beca3673812a2d31b78f20f6d0a1e
14:57 thou joined #perl6
14:59 jnthn pmichaud: Hm, which bit?
14:59 pmichaud version number in Makefile.in
15:00 jnthn argh, dang.
15:00 pmichaud still says 2012.09
15:00 jnthn Yeah, updated the Rakudo and NQP version numbers in there.
15:00 pmichaud oh, that's a separate step
15:00 jnthn wait, that's a different makefile
15:00 pmichaud right.
15:00 jnthn dammit :/
15:00 pmichaud tools/star/Makefile is the one used to create the star release
15:00 cognominal joined #perl6
15:00 pmichaud tools/build/Makefile.in is the one used to build rakudo+modules from the release
15:01 jnthn Yeah, I missed it.
15:01 pmichaud anyway, that causes the .msi build to be mislabeled as 2012.09.  I can either fix it locally and we live with the mismatch, or we can create a 2012.10.1 star release
15:02 jnthn I'd go for fixing it locally.
15:02 pmichaud okay.
15:02 FROGGS tadzik: there is no error code, thats the problem
15:02 pmichaud rebuilding star / msi
15:02 FROGGS so it doenst throw that error message
15:02 tadzik huh
15:03 jnthn Getting this release cut at all took some doing. The box I previously did * releases off has a tar that doesn't understand -xform, then I tried to set up an Ubuntu VM (which failed), then finally ended up with a Debian VM that works.
15:03 tadzik so there's no /Failed cloning/?
15:03 tadzik (on windows)
15:03 tadzik okay, doens't matter
15:03 tadzik I'll remove that test altogether
15:03 FROGGS that git command via shell() doenst return nonzero
15:04 tadzik it keeps pissing everyone off and didn't help with anything yet
15:04 FROGGS right
15:04 sivoais joined #perl6
15:04 FROGGS move that test to a folder called "t_thatdoenstworkyetbutwillbeatsomepoint"
15:05 pmichaud we could likely switch the --xform option to be a 'mv' command
15:05 dalek panda: c181c9a | moritz++ | / (3 files):
15:05 dalek panda: stop installing to ~/.perl6
15:05 dalek panda:
15:05 dalek panda: requires a pretty new Rakudo with $*CUSTOM-LIB support
15:05 dalek panda: review: https://github.com/tadzik/panda/commit/c181c9a76c
15:05 dalek panda: 6dfed95 | moritz++ | b (2 files):
15:05 dalek panda: update bin/panda and bootstrap.pl to use %*CUSTOM_LIB
15:05 dalek panda:
15:05 dalek panda: TODO: rebootstrap
15:05 dalek panda: review: https://github.com/tadzik/panda/commit/6dfed958d6
15:05 dalek panda: 109e54c | moritz++ | rebootstrap.pl:
15:05 dalek panda: switch rebootstrap to %*CUSTOM_LIB
15:05 dalek panda: review: https://github.com/tadzik/panda/commit/109e54c77f
15:05 dalek panda: c07f3bc | tadzik++ | t/panda/fetcher.t:
15:05 dalek panda: Remove a stupid test
15:05 dalek panda: review: https://github.com/tadzik/panda/commit/c07f3bc2a3
15:05 dalek panda: 91b94a2 | tadzik++ | / (3 files):
15:05 dalek panda: Merge branch 'custom-lib'
15:05 dalek panda: review: https://github.com/tadzik/panda/commit/91b94a24d3
15:05 tadzik o-ho, dalek fail
15:05 tadzik a, not that bad
15:05 arnsholt Old commits?
15:05 tadzik they appeared here before :)
15:06 arnsholt Ah, right
15:06 tadzik moritz: there, custom-lib merged :)
15:06 moritz \o/
15:06 tadzik moritz++
15:06 pmichaud we could likely switch the --xform option to be a 'mv' command... if we know enough about where the tarballs unpack to
15:06 jnthn pmichaud: Well, I got a VM where I can cut a release now, so it's less of an issue.
15:06 jnthn pmichaud: Was just annoying to run in to.
15:07 jnthn Though, Ubuntu trying to have a crappy 3D desktop and exploding under VirtualBox was more annoying :)
15:07 FROGGS you can switch to unity-2d at the login prompt
15:08 jnthn Hm, I missed that...
15:08 jnthn I the end, I switched to Debian :P
15:08 FROGGS you have to presss the ubuntu icon at the upper right of the login box ;o)
15:08 FROGGS not very intuitive
15:08 jnthn Well, now I've had my once every couple of years Linux desktop experience :D
15:08 pmichaud that doesn't sound so obvious
15:09 pmichaud I'm happiest with Kubuntu anyway :)
15:09 pmichaud although I haven't tried 12.10 yet
15:09 jnthn Funny thing is, all I wanted was a terminal window... :)
15:09 pmichaud well, and a compiler toolchain
15:10 jnthn Yeah, but you can install that from the terminal :)
15:10 jnthn I needed git also. Beyond that it was no hassle.
15:10 jnthn I have the VM handy for next R* release. :)
15:11 pmichaud I'll write up the steps I'm using for .msi creation
15:11 pmichaud it's pretty easy
15:11 moritz do we already have a release guide for star?
15:11 pmichaud tools/star/release-guide.txt I think
15:11 jnthn moritz: Yes, I'm just bad at following instructions.
15:12 moritz pmichaud: .pod it seems
15:12 pmichaud tools/star/release-guide.pod
15:12 moritz pmichaud++
15:14 PerlJam jnthn++ (rebel :)
15:14 pmichaud gee, https://github.com/rakudo/star/blob/master/tools/star/release-guide.pod  (formatted) looks really nice
15:15 pmichaud happy bday, PerlJam, two days later
15:15 PerlJam pmichaud: thanks.
15:15 PerlJam pmichaud: we're both prime this year :)
15:15 moritz except the messed up list at the end
15:15 moritz PerlJam++ # bday
15:17 pmichaud hadn't thought about prime-ness of bdays at all.  :-)
15:18 pmichaud I guess from here the primes get farther apart :-P
15:18 telex joined #perl6
15:18 pmichaud however, in 6 years we'll both be prime again.  And again 6 years after that.  :-P
15:18 PerlJam But every few years you can claim to be "in the prime of your life"
15:24 birdwind1pbird joined #perl6
15:25 pmurias joined #perl6
15:26 kurahaupo joined #perl6
15:28 pmurias jnthn: is there a reason why we use QAST::VM with pirop nqp_get_package_throught_who PPs instead of QAST::Op and QAST::Var?
15:28 pmurias when accessing an our package?
15:30 jnthn pmurias: Typically such situations exist there either (a) we didn't get around to adding an nqp:: op variant for the pir:: op yet, or (b) just exposing that as a PIR ops is undesirable for some reason in terms of the desired API.
15:30 jnthn In this case it's (b) - I think we should have a nicer way to handle package lookups, chasing chains of .WHOs, but don't have a particularly great way to deal with it yet.
15:32 jnthn I thin it'll want to be done with QAST::Var in the end.
15:32 jnthn *think
15:33 pmurias jnthn: currently nqp chases through a chain of package lookups with a chain of QAST::VMs
15:35 kaleem joined #perl6
15:37 jnthn pmurias: Yes, I know
15:38 jnthn pmurias: A good way is "not designed yet" :)
15:38 jnthn I don't want to just replace pir:: things with the first thing that comes to mind :)
15:38 kurahaupo1 joined #perl6
15:40 benabik joined #perl6
15:40 jnthn .u tick
15:40 phenny U+27E4 WHITE SQUARE WITH LEFTWARDS TICK (⟤)
15:40 jnthn .u tick mark
15:40 phenny jnthn: Sorry, no results for 'tick mark'.
15:40 havenn joined #perl6
15:41 jnthn .u check mark
15:41 phenny U+2713 CHECK MARK (✓)
15:41 moritz .u ✔
15:41 phenny U+2714 HEAVY CHECK MARK (✔)
15:43 kaare_ joined #perl6
15:43 pmichaud Rakudo Star 2012.10 MSI version now posted to github downloads page.
15:44 jnthn pmichaud++
15:44 pmurias jnthn: XYZ::foo takes foo out of package XYZ not &foo?
15:44 jnthn In NQP, yes, because there's no list ops.
15:44 moritz r: module A { our constant X = 3 }; say A::X
15:44 p6eval rakudo 34febe: OUTPUT«3␤»
15:45 jnthn In Rakudo, "it depends" :)
15:45 moritz r: module A { our sub X() { 3} }; say A::X
15:45 p6eval rakudo 34febe: OUTPUT«3␤»
15:47 daxim ♫ Hey jnthn I got somethin' real important to give you… And now I'm ready to lay it on the input line… You know it's (almost) Christmas and my heart is open wide ♪
15:47 daxim ♫ Gonna type you something so you know what's on my mind… A gift real special, so take off the top… Take a look inside – it's my ☑ check in a box ☑
15:48 mr007x joined #perl6
15:50 jnthn ...what? :)
15:51 pmurias jnthn: look at bug: http://pastie.org/5138126
15:51 cognominal joined #perl6
15:52 pmurias jnthn: what do the listops have to do with that?
15:52 [Coke] jnthn: us pop culture referent.
15:53 [Coke] jnthn: youtube for "timberlake in a box". video probably NSFW.
15:56 jnthn hah!
15:57 tadzik see also: http://www.microkosmic.com/comic/brick-in-a-box.html
15:58 jnthn :P
16:00 jnthn pmurias: Well, nothing if you throw the parens on.
16:00 jnthn That's probably just a bug.
16:01 [Coke] parens? http://www.smbc-comics.com/index.php?db=comics&amp;id=2491
16:01 [particle] joined #perl6
16:04 pmurias jnthn: as long as nqp adds the & consistently I don't really mind ;)
16:06 cognominal joined #perl6
16:06 jnthn [Coke]: *groan*
16:07 pmurias jnthn: why do we bind an our routine *twice*?
16:09 TimToady anything "our" is defined to have two different names, one in a package, and one lexical
16:09 TimToady this may be related
16:10 * TimToady hasn't caught up on context yet, so may just be blathering...
16:20 TimToady nr: CORE::shell("echo hi")
16:20 p6eval rakudo 34febe: OUTPUT«No such method 'Any' for invocant of type 'Str'␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/hM16bUP8jc:1␤␤»
16:20 p6eval ..niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: shell may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (shell @ 0) ␤  at /tmp/Z9MZA0muHT line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…
16:24 TimToady nr: CORE::say("hi")
16:24 p6eval niecza v22-14-g136ddcf: OUTPUT«hi␤»
16:24 p6eval ..rakudo 34febe: OUTPUT«No such method 'Any' for invocant of type 'Str'␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/T7MIRbsggK:1␤␤»
16:24 TimToady rakudobug
16:24 kresike bye folks
16:27 jnthn r: CORE::<&say>('hi')
16:27 p6eval rakudo 34febe: OUTPUT«hi␤»
16:27 jnthn Hm
16:27 jnthn r: SETTING::<&say>('hi')
16:27 p6eval rakudo 34febe: OUTPUT«No such method 'Any' for invocant of type 'Str'␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in block  at /tmp/1N8ASdf63B:1␤␤»
16:28 jnthn oh, that one is probably true, given that evalbot uses an alternate setting.
16:28 jnthn yeah, works in the repl.
16:40 stocks joined #perl6
16:50 * TimToady was mostly just trying to point out (without being too obvious) that using SETTING to shadow CORE was not necessarily a terribly secure way to do sandboxing :)
16:51 jnthn :)
16:52 jnthn Well, I don't think it's so much a sandbox as making it sufficiently tricky to be malicious with p6eval :)
16:52 TimToady well, actually, it is terribly secure :)
16:55 pmurias jnthn: why does nqp use post_serialize? the serializer can't serialize some things without help?
16:56 jnthn pmurias: Mostly to do fixups after deserialization.
16:57 jnthn pmurias: Part of that if fixing up the code ref pointers to code objects, but it's possible that could actually move into the deserialization stuff.
16:57 jnthn I think it also does some lexical bits.
17:08 arnsholt jnthn, masak: In re me visiting Malmö, does thursday work for you guys for example?
17:11 jnthn arnsholt: This coming Thursday?
17:11 jnthn arnsholt: Seems it works for me.
17:11 jnthn arnsholt: Glancing $dayjob schedule, I suspect masak will be in town too.
17:12 arnsholt Cool. All of a sudden a week and almost a half is past, so my time in CPH is turning out to be not so long after all
17:12 jnthn :)
17:12 arnsholt masak: Thursday work for you too?
17:29 wk joined #perl6
17:40 domidumont joined #perl6
18:02 benabik joined #perl6
18:11 stocks joined #perl6
18:18 bluescreen10 joined #perl6
18:23 rindolf joined #perl6
18:23 rindolf Hi all.
18:24 PerlJam rindolf: greetings!  What brings you to #perl6?
18:24 [Coke] ~~ rindolf
18:24 rindolf PerlJam: I have it on my autojoin on my other computer.
18:24 rindolf PerlJam: well, I hope to learn some Perl 6 in the process.
18:24 PerlJam ah.  Good idea on both counts :)
18:24 rindolf PerlJam: a vane hope I know, but still.
18:25 * [Coke] wonders if a p5-a-like written on top of nqp would be useful.
18:25 * [Coke] is not volunteering. :)
18:26 rindolf [Coke]: can't you compile the Perlito Perl 5 in Perl 5 compiler using Perlito to Perl 6 and then compile that as Parrot?
18:26 jnthn .oO( weather vane hope or not, you're welcome )
18:27 havenn joined #perl6
18:27 jnthn [Coke]: Well, we already have a chunk of Perl 5 regex implemented on top of NQP :)
18:28 PerlJam [Coke]: I know!  we could call it Ponie!  ;>
18:29 PerlJam btw, has anyone thought out-loud about the advent calendar for this year?  We should start signing up for days if that isn't already happening.  Dec is rapidly approaching.
18:30 sorear o/
18:33 jnthn PerlJam: You're the first person I've heard mention it this year :)
18:33 jnthn I'd sign up for a couple of days.
18:33 dalek mu: ccff8a3 | duff++ | misc/perl6advent-2012/schedule:
18:33 dalek mu: meager start for advent 2012
18:33 dalek mu: review: https://github.com/perl6/mu/commit/ccff8a3368
18:34 PerlJam jnthn: there's the schedule, go grab some days :)
18:40 dalek mu: ab38fd7 | jonathan++ | misc/perl6advent-2012/schedule:
18:40 dalek mu: Claim a few days.
18:40 dalek mu: review: https://github.com/perl6/mu/commit/ab38fd7b84
18:42 daxim oh sweet, advent!
18:42 breinbaas joined #perl6
18:43 dalek mu: 5bedf5e | duff++ | misc/perl6advent-2011/schedule:
18:43 dalek mu: fill in last year's schedule
18:43 dalek mu: review: https://github.com/perl6/mu/commit/5bedf5e705
18:44 jnthn dinner &
18:47 masak evenin', #perl6
18:47 rindolf masak: top of the evening.
18:47 rindolf masak: or as we say in Hebrew, top of the Erev.
18:48 dalek mu: 6b4f048 | duff++ | misc/perl6advent-2012/topic-brainstorming:
18:48 dalek mu: Add topics seeded from last year
18:48 dalek mu: review: https://github.com/perl6/mu/commit/6b4f0481d6
18:49 masak rindolf: ;)
18:50 rindolf Does Rakudo have high-resolution sleep()/usleep()/etc. and time() yet?
18:51 moritz PerlJam++ # p6adevent-2012
18:51 moritz r: say time
18:51 p6eval rakudo 34febe: OUTPUT«1351623068␤»
18:51 moritz r: say now
18:51 p6eval rakudo 34febe: OUTPUT«Instant:1351623111.170060␤»
18:51 moritz r: my $t1 = now; sleep 0.1; $t2 = now; say $t2 - $t1
18:51 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Variable $t2 is not declared␤at /tmp/KrNkeTtaBA:1␤»
18:51 moritz r: my $t1 = now; sleep 0.1; my $t2 = now; say $t2 - $t1
18:51 p6eval rakudo 34febe: OUTPUT«0.15152851␤»
18:52 dalek mu: 202bbb6 | duff++ | misc/perl6advent-2012/topic-brainstorming:
18:52 dalek mu: add some more topics
18:52 dalek mu: review: https://github.com/perl6/mu/commit/202bbb6dfd
18:52 masak arnsholt: currently I'm busy Thursday but free Friday. how flexible is your schedule?
18:54 masak ooh, p6advent-2012 \o/
18:56 PerlJam I'm sure someone would love to read an advent article on macros  ;)
18:57 * moritz surely would
18:58 dalek mu: c993f93 | moritz++ | misc/perl6advent-2012/topic-brainstorming:
18:58 dalek mu: [advent] some more topics
18:58 dalek mu: review: https://github.com/perl6/mu/commit/c993f93d03
19:00 havenn joined #perl6
19:03 eternaleye joined #perl6
19:03 masak I'd be happy to write one.
19:04 moritz masak: how about we switch roles for once? you write about typed exceptions or something, and I write about macros? :-)
19:04 moritz (ok, this is a bad idea, but the idea had to be braught forth)
19:04 PerlJam you could ghost write for each other.
19:04 moritz s/ghost/clone/ :-)
19:05 rjbs this is all well and good, but who wants to write an article for the p5 calendar?? :)
19:06 masak moritz: I like the idea, but I also agree it's a bad one. :) now I'm conflicted.
19:06 s1n joined #perl6
19:06 moritz rjbs: I could write about the awful reinvented standard modules we use at $work :-)
19:07 masak rjbs: surely if the p6 community can scrape together 24 articles...
19:07 moritz well, the p5 community regularly wants to fill 5 to 8 advent calendars :-)
19:07 PerlJam masak++ x 2  :)
19:08 masak moritz: that is a nice problem for a community to have...
19:11 rjbs masak: Yeah, but I'm the scraper, and I'm here to scrape!
19:11 masak you are *here* to scrape... for p5? :P
19:11 rjbs I'm *everywhere*.
19:11 rjbs The guys in #self were really confused.
19:11 masak o.O
19:11 moritz :-)
19:12 * masak .oO( walk into #self and scrape for the JavaScript advent calendar... )
19:12 rjbs You'd get yourself one bitter calendar that way. :-)
19:12 * PerlJam sends a mass email
19:12 circlepuller r: say "\007"
19:12 p6eval rakudo 34febe: OUTPUT«␀07␤»
19:12 masak rjbs: *lol*
19:12 circlepuller r: say "\x07"
19:12 p6eval rakudo 34febe: OUTPUT«␤»
19:12 circlepuller r: say "\x07"
19:12 p6eval rakudo 34febe: OUTPUT«␤»
19:12 circlepuller works
19:12 circlepuller r: say "\7"
19:12 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\7' at line 2, near "\""␤»
19:13 circlepuller r: say "\07"
19:13 p6eval rakudo 34febe: OUTPUT«␀7␤»
19:13 circlepuller :|
19:13 masak looks correct to me.
19:13 skids hey keep it down in there! :-)
19:15 PerlJam rjbs: Are you willing to do a little quid pro quo?  you write an article for p6advent and one of us writes an article for p5advent.
19:15 rjbs I am theoretically willing.  I'm not sure what I'd write.  My knowledge of p6 is embarrassingly poor. :)
19:15 rjbs I could write about how horkingly bad we've done adoping things from p6 :)
19:17 PerlJam rjbs++ theoretical willingness is good.   Are there some topic suggestions for p5advent?
19:18 rjbs I should write down the guideline I usually say...
19:18 rjbs https://github.com/rjbs/Perl-Advent/blob/master/FAQ-submit.mkdn
19:19 havenn joined #perl6
19:26 * masak sees the '.mkdn' ending for the first time
19:26 masak only seen .md and .markdown before
19:27 azawawi joined #perl6
19:27 azawawi star: try { my $fh = open "Z"; CATCH { say "Caught"; } }
19:27 p6eval star 2012.10: OUTPUT«Caught␤open is disallowed in safe mode␤  in sub restricted at src/SAFE.setting:4␤  in sub open at src/SAFE.setting:7␤  in block  at /tmp/gAwRzg7fhT:1␤␤»
19:28 azawawi hi
19:28 colomon joined #perl6
19:29 dalek mu: fd7eb3b | (Michael Mol)++ | misc/perl6advent-2012/topic-brainstorming:
19:29 dalek mu: Update misc/perl6advent-2012/topic-brainstorming
19:29 dalek mu:
19:29 dalek mu: I don't know what's current for this now, so it's probably a good topic.
19:29 dalek mu: review: https://github.com/perl6/mu/commit/fd7eb3b72c
19:29 dalek mu: 45e9dc9 | (Конрад Боровски)++ | misc/perl6advent-2012/topic-brainstorming:
19:29 dalek mu: Merge pull request #3 from mikemol/master
19:29 dalek mu:
19:29 dalek mu: Obtaining and installing current implementations.
19:29 dalek mu: review: https://github.com/perl6/mu/commit/45e9dc998b
19:29 azawawi can Perl 6 catch a q{ my $fh = open, "bad-file-name"; } ?
19:30 s1n joined #perl6
19:31 PerlJam perl6: my $fh = open "bad-file-name";
19:31 p6eval niecza v22-14-g136ddcf: OUTPUT«Potential difficulties:â�¤  $fh is declared but not used at /tmp/lIpobZJejh line 1:â�¤------> [32mmy [33mâ��[31m$fh = open "bad-file-name";[0mâ�¤â�¤Unhandled exception: open may not be used in safe modeâ�¤  at /home/p6eval/niecza/lib/CORE.setting line 0 (open @ 0)…
19:31 p6eval ..rakudo 34febe: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub open at src/RESTRICTED.setting:5␤  in block  at /tmp/oQ8lwDoyPK:1␤␤»
19:32 rindolf Wow! ./perl6 consumes 1042 MB REST
19:33 PerlJam azawawi: oh, you meant "catch and not die" ?
19:33 azawawi yup
19:33 azawawi dying in a web-app is a silly thing to do :)
19:33 PerlJam indeed
19:34 PerlJam I think it still dies horribly.
19:34 azawawi yeah it does
19:34 diakopter r: say &CORE::slurp('/etc/passwd')
19:34 p6eval rakudo 34febe: OUTPUT«root:x:0:0:root:/root:/bin/bash␤daemon:x:1:1:daemon:/usr/sbin:/bin/sh␤bin:x:2:2:bin:/bin:/bin/sh␤sys:x:3:3:sys:/dev:/bin/sh␤sync:x:4:65534:sync:/bin:/bin/sync␤games:x:5:60:games:/usr/games:/bin/sh␤man:x:6:12:man:/var/cache/man:/bin/sh␤lp:x:7:7:lp:/var/spool/lpd:/bi…
19:34 diakopter r: say &CORE::open('/etc/passwd')
19:34 p6eval rakudo 34febe: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => "/etc/passwd")␤»
19:34 diakopter jnthn: sandbox fail ^^
19:35 jnthn diakopter: It's not even a sandbox.
19:35 GlitchMr Accessing /etc/passwd isn't fail, is it?
19:35 GlitchMr Why restrict it, really?
19:35 diakopter oh.
19:35 diakopter thought..
19:35 diakopter r: say open('/etc/passwd')
19:35 p6eval rakudo 34febe: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub open at src/RESTRICTED.setting:5␤  in block  at /tmp/KCXvxdwEo1:1␤␤»
19:35 jnthn There's a 10 minute hack that means the clueless have to become more clueful to do something stupid.
19:36 GlitchMr By the way, I've found an exploit on perl.org that allows reading /etc/passwd file... now... where I should report it?
19:36 jnthn And nobody here really has.
19:36 diakopter <-- oops for exposing a hole
19:36 azawawi diakopter: indeed... that's one of the things that im working on in farabi6
19:36 PerlJam azawawi: exposing holes? :)
19:36 am0c joined #perl6
19:36 GlitchMr Niecza doesn't run in any safe mode last time I've checked
19:36 GlitchMr Why Rakudo does then
19:37 GlitchMr n: print slurp '/etc/passwd'
19:37 p6eval niecza v22-14-g136ddcf: OUTPUT«Unhandled exception: slurp may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (slurp @ 0) ␤  at /tmp/r2bho0W_KO line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…
19:37 diakopter yeah niecza does, but it doesn't prevent direct access to the CLR classes
19:37 GlitchMr Or perhaps it does
19:37 GlitchMr n: print qx[ls /]
19:37 p6eval niecza v22-14-g136ddcf: OUTPUT«bin␤boot␤dev␤etc␤home␤initrd␤lib␤lost+found␤media␤mnt␤opt␤proc␤restoresymtable␤root␤run␤sbin␤selinux␤srv␤sys␤tmp␤usr␤var␤»
19:37 diakopter heh
19:37 GlitchMr Everybody knows that you can run Niecza programs using qx[]. It's not security hole.
19:38 GlitchMr But if running programs is allowed, why safe mode is enabled then?
19:38 azawawi https://github.com/perl6/evalbot/blob/master/evalbot.pl#L99
19:38 colomon it most certainly is a security hole.
19:38 flussence it's a "safe mode" like php's safe mode.
19:39 GlitchMr Except "safe mode" (now removed) in PHP isn't so easy to trick
19:39 GlitchMr (but it's still easy)
19:40 flussence I think the best possible fix would be using seccomp to disable all syscalls besides read/write, though that requires using NativeCall in the setting
19:41 rindolf Hi all. Why does this code error? http://paste.debian.net/205065/
19:41 jnthn .oO( I think the best possible predictor we have of future behavior is the past, and the past has a distinct lack of people trying to cause destruction using p6eval... )
19:41 PerlJam rindolf: while () { } continue {} # doesn't make sense in P6
19:42 rindolf PerlJam: what should I use instead/
19:42 flussence use while { ...; NEXT{ ... } }
19:42 PerlJam see flussence :)
19:42 birdwindupbird joined #perl6
19:42 azawawi flussence: http://en.wikipedia.org/wiki/Seccomp  # Chrome uses it... nice.. :)
19:42 colomon blast, git mis-commit
19:42 rindolf Unable to parse expression in block; couldn't find final '}' at line 15, near "print \"Rem"
19:42 GlitchMr But, what's wrong about filesystem calls.
19:43 GlitchMr I mean, the sandbox itself is open source and feather3 is used for sandboxing
19:43 jnthn colomon: There's always --amend :)
19:43 sorear eval: sub main::DESTROY { print "Destruction happened\n" }; bless []
19:43 buubot_backup sorear: bless( [], 'main' )Destruction happened
19:43 PerlJam rindolf: you're also using . for concat and it's ~ in P6
19:44 jnthn sorear: :P
19:44 flussence GlitchMr: it'd be nice to have a real secure setting in case anyone wants to do a tryrakudo-like thing
19:44 havenn joined #perl6
19:44 rindolf PerlJam: thanks.
19:44 rindolf Making progress. Now I'm getting Undefined routine '&time' called (lines 4, 8)
19:44 GlitchMr rindolf: try using STD.pm6 or Niecza for detecting syntax errors
19:44 GlitchMr rindolf: It's Date.now
19:44 rindolf GlitchMr: OK.
19:44 GlitchMr Currently, Rakudo doesn't have very good syntax error messages
19:44 [Coke] r: say now
19:44 p6eval rakudo 34febe: OUTPUT«Instant:1351626333.605037␤»
19:45 PerlJam rindolf: and "time()" should really be just "time"
19:45 GlitchMr Oh, it's now
19:45 rindolf No such method 'now' for invocant of type 'Date' ==> should I load "Date"?
19:46 GlitchMr I wonder why you have tried using continue { } block when you aren't using next...
19:46 GlitchMr rindolf: sorry, it was now, not Date.now
19:46 GlitchMr My mistake
19:46 GlitchMr It happen
19:46 GlitchMr s
19:46 PerlJam r: say time; say now;  # note the difference
19:46 p6eval rakudo 34febe: OUTPUT«1351626409␤Instant:1351626444.928375␤»
19:47 rindolf GlitchMr: thanks.
19:47 rindolf OK, http://paste.debian.net/205068/ - this appears to work, but it prints it every 4 seconds or so.
19:47 rindolf That's not good.
19:47 rindolf Maybe I should flush.
19:49 dalek niecza: c600005 | (Solomon Foster)++ | lib/CORE.setting:
19:49 dalek niecza: Mark implementation of qx as unsafe.
19:49 dalek niecza: review: https://github.com/sorear/niecza/commit/c600005725
19:49 GlitchMr By the way, your code looks like Perl 5 code converted to Perl 6.
19:49 rindolf OK, now it's better.
19:49 GlitchMr Not that this really matters for now
19:49 rindolf GlitchMr: I wrote it in Perl 6 from scratch.
19:49 azawawi rindolf: farabi6 now provides { syntax check (F6) } that uses ~/std/viv -6
19:50 rindolf http://paste.debian.net/205071/ - final version.
19:50 GlitchMr For example, you can remove parens in while () and if ()
19:50 GlitchMr So, instead of if ($condition) {} you can write if $condition {} in Perl 6.
19:50 colomon jnthn: I ended up using git reset HEAD^, but you put me on the right track with the --amend hint.  ;)
19:50 GlitchMr Less line noise, better programs
19:51 rindolf And it consumes 100% CPU.
19:51 sorear jnthn: 5 is way more dangerous though, 5 supports "global destruction"
19:52 rindolf And 4.2% of RAM.
19:52 rindolf GlitchMr: http://paste.debian.net/205072/ - latest version
19:53 GlitchMr Nice :-)
19:53 GlitchMr I would remove method calls parens, but that'sjust
19:53 jnthn sorear: OH NOES!
19:53 jnthn ;)
19:53 GlitchMr So, instead of $*OUT.flush() it would be $*OUT.flush, but it isn't really important
19:54 rindolf GlitchMr: done.
19:54 sorear .oO( and looking at Sandy, I think that may already have started )
19:54 rindolf GlitchMr: http://paste.debian.net/205073/
19:54 GlitchMr Also, (" " x 40) could be written as ' ' x 40
19:55 GlitchMr But that doesn't really matter... does it?
19:55 GlitchMr Or perhaps, as "Remaining {$new_to_print.fmt('%i')}/$delay{' ' x 40}\r"
19:55 jnthn rindolf: It consumes CPU in something that mostly sleeps?
19:55 rindolf jnthn: no, it doesn't appear to sleep at all.
19:56 rindolf The NEXT {. ..} block is ginored.
19:56 GlitchMr Also, I don't like this NEXT { } block usage
19:56 GlitchMr You aren't using flow control operations, so why you would want to use it?
19:56 jnthn rindolf: Yeah, NEXT is only implemented in for loops ('tis why we only get yellow for it on the features chart)
19:57 rindolf jnthn: ah. :-(
19:57 jnthn sleep does work but...takes CPU?!
19:57 GlitchMr Oh, wait... "Remaining {$new_to_print.fmt('%i')}/$delay{' ' x 40}\r" would be wrong... "Remaining {$new_to_print.fmt('%i')}/{$delay}{' ' x 40}\r" is correct
19:57 GlitchMr jnthn: it doesn't on my PC... weird
19:57 jnthn GlitchMr: I did "while 1 { sleep 10; say 1 }"
19:58 [Coke] jnthn: if next isn't getting called, then it's not sleep that's taking the CPU.
19:58 [Coke] ah.
19:58 GlitchMr Interesting how it doesn't on my PC... but perhaps it's because I've old version of Perl 6.
19:58 colomon n: print qx[ls /]
19:58 p6eval niecza v22-14-g136ddcf: OUTPUT«bin␤boot␤dev␤etc␤home␤initrd␤lib␤lost+found␤media␤mnt␤opt␤proc␤restoresymtable␤root␤run␤sbin␤selinux␤srv␤sys␤tmp␤usr␤var␤»
19:58 GlitchMr I'm using mostly Rakudo on feather now
19:59 rindolf Now it consumes 5% of CPU.
19:59 jnthn [Coke]: No, my program above does
19:59 jnthn Oh...
19:59 jnthn #ifdef _WIN32 /* TODO: Implement on Windows */
19:59 jnthn #else /* Nothing to do except to wait for the next alarm to expire */ pause();
19:59 jnthn #endif
19:59 rindolf OK, it's better after I convert the sleep to sleep(0.3).
19:59 rindolf OK, let me try the same program in Perl 5.
20:00 * colomon 's current STEP on Rakudo run is taking up 3.2 gigs of memory atm...
20:00 GlitchMr sleep(0.3) in Perl 5 is sleep(0)
20:00 GlitchMr I hope you want to use usleep ;-)
20:00 am0c joined #perl6
20:01 PerlJam jnthn: what was the reason while loops didn't get NEXT handling?
20:01 rindolf GlitchMr: Time::HiRes FTW.
20:01 GlitchMr I know
20:01 GlitchMr I wonder if Perl 5 get bug reports like "sleep doesn't work for low values"
20:02 jnthn PerlJam: I think it's just a todo.
20:02 PerlJam okie
20:02 jnthn PerlJam: Not sure there's anything deep blocking it.
20:02 jnthn Other than tuit supply... :)
20:03 jnthn walk, bbl &
20:03 sorear GlitchMr: perl 5 gets amazingly stupid bug reports on a regular basis
20:03 timotimo_ for no particular reason whatsoever, i'm suddenly reminded of spamusement
20:03 PerlJam <sorear> GlitchMr: perl 5 gets amazingly stupid ... on a regular basis.
20:03 rindolf GlitchMr: with Perl 6 and sleep(0.1) it consumes close to zero CPU and RAM.
20:04 PerlJam (selective quoting for the humor win :)
20:04 diakopter perl gets amazingly regular
20:04 GlitchMr This is first stupid sleep bug report: https://rt.perl.org/rt3/Public/Bug/Display.html?id=8018
20:04 * sorear thinks that was uncalled for
20:05 GlitchMr oh wait, it's not bug report
20:05 GlitchMr it's spam
20:06 PerlJam sorear: okay, I apologize.  p5p has enough drama anyway  :)
20:06 dalek perl6-examples: 1621587 | (Gerhard R)++ | rosalind/ (5 files):
20:06 dalek perl6-examples: [rosalind] Add directory for Rosalind (http://rosalind.info) solutions
20:06 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/1621587536
20:06 GlitchMr But well, I think that PHP gets more stupid bug reports compared to Perl 5
20:07 GlitchMr That's understandable, bad developers created bad language for bad developers that make bad bug reports.
20:07 timotimo_ there's also stupid answers to those bug reports in there
20:08 rindolf OK, my conclusion is that Rakudo could use a lot of CPU and RAM consumptions improvements. That or I am missing some compile flags.
20:08 rindolf http://paste.debian.net/205075/ - Perl 5 code for reference.
20:08 [Coke] rindolf: not sure how much optimization rakudo does when building parrot.
20:09 PerlJam rindolf: aye, rakudo could use lots of improvments  :)
20:09 * [Coke] thinks it at least does the minimum.
20:09 GlitchMr Also, https://bugs.php.net/bug.php?id=60176
20:09 [Coke] rindolf: also keep in mind that we're loading quite a bit that perl5 isn't by default.
20:09 [Coke] (but even then, yes.)
20:10 sorear GlitchMr: that is totally a valid bug.  DST 'support' is always a bug.
20:11 GlitchMr If anything, it's bug in his code
20:11 GlitchMr I mean, adding day using + 86400... this can only exist in PHP
20:13 rindolf https://bitbucket.org/shlomif/shlomif-computer-settings/src/20e60b800fb0620c1c75dcf17715e3be069b07cf/shlomif-settings/home-bin-executables/bin/countdown?at=default - here.
20:14 flussence GlitchMr: php has a DateTime class that does all that stuff correctly. Most people are just too ignorant to know it's there.
20:16 rindolf OK, I'm now trying with perl Configure.pl --gen-parrot --parrot-option='--optimize'
20:17 rindolf During configuration the following steps failed:
20:17 rindolf 01:  init::manifest
20:17 sorear impressive!
20:18 [Coke] that error has been reported on and off, seems to be do to having nqp upgrade/downgrade past a commit that turned a generated file into a real one or vice versa.
20:18 am0c wow rakudo 2012.10 released! :D
20:19 am0c (it was a late notice)
20:19 sorear also, nqp/parrot has a history of hating rindolf.
20:19 rindolf sorear: indeed.
20:20 [Coke] (if you do a git status, you'll see the offending file)
20:20 kurahaupo joined #perl6
20:21 GlitchMr Rakudo Star 2012.10 was released?
20:21 GlitchMr I have to compile it on feather then
20:22 timotimo_ but it's almost 2012.11 already!
20:22 GlitchMr glitchmr@feather ~> gen-rakudo https://github.com/downloads/rakudo/star/rakudo-star-2012.10.tar.gz ~/rakudo-star 2012.10
20:22 GlitchMr :-)
20:23 GlitchMr I like my script to compile Rakudo Star in few seconds
20:23 benabik Does Rakudo work with Parrot HEAD yet, or are there still IO blockers?
20:26 timotimo_ 21:22 < GlitchMr> :-)
20:26 timotimo_ whoops, didn't eman to hit that button
20:32 GlitchMr src/core/you_are_here.pm
20:32 GlitchMr What is you_are_here.pm anyway?
20:33 sorear it's a file containing the single line {YOU_ARE_HERE}
20:33 hash_table joined #perl6
20:34 GlitchMr Why?
20:34 GlitchMr https://github.com/rakudo/rakudo/blob/nom/src/core/you_are_here.pm
20:34 GlitchMr Also, it's not single line {YOU_ARE_HERE}
20:34 GlitchMr 4 months ago, some lines were added to it
20:35 benabik YOU_ARE_HERE is where the user's code goes.  It nests it as a separate scope under the setting.  The extra lines appear to be fixup that needs to happen before running user code.
20:35 GlitchMr I hope those extra lines aren't breaking line numbers
20:36 GlitchMr And Rakudo Star 2012.10 is compiled
20:37 GlitchMr > {YOU_ARE_HER}
20:37 GlitchMr CHECK FAILED:
20:37 GlitchMr Undefined routine '&YOU_ARE_HER' called (line 1)
20:37 GlitchMr > {YOU_ARE_HERE}
20:37 GlitchMr 0
20:37 GlitchMr What is {YOU_ARE_HERE} anyway?
20:37 GlitchMr Is it special cased or what?
20:37 benabik A placeholder for the user's code when the current code is being used as a setting.
20:38 GlitchMr Well... but why I can use it in code?
20:38 benabik Because you're allowed to write your own settings.
20:38 GlitchMr Shouldn't it make "undefined routine" error?
20:39 benabik nr: {YOU_ARE_HERE}
20:39 p6eval niecza v22-15-gc600005: OUTPUT«Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.␤  at System.Collections.Generic.Dictionary`2[System.String,Niecza.SubInfo].get_Item (System.String key) [0x00000] in <filename unknown>:0…
20:39 p6eval ..rakudo 34febe:  ( no output )
20:39 rindolf OK, why doesn't perl Configure.pl --gen-parrot work?
20:39 GlitchMr huh?
20:40 GlitchMr perl Configure.pl --prefix="$2/$3" --gen-parrot --gen-nqp
20:40 GlitchMr This is in gen-parrot script
20:40 GlitchMr gen-rakudo
20:40 GlitchMr lol
20:40 benabik rindolf: Being more specific than "doesn't work" might help.
20:41 rindolf benabik: I get that During configuration the following steps failed:
20:41 rindolf 01:  init::manifest
20:41 rindolf benabik: sorry.
20:41 [Coke] rindolf: you have a stale version of parrot locally.
20:41 GlitchMr https://gist.github.com/3982880
20:41 [Coke] either fix it up (see git status for the issue) or remove it and try again
20:41 GlitchMr This is gen-rakudo script I use for compiling Rakudo Star
20:42 [Coke] --gen-parrot checkouts a copy into ./parrot
20:42 [Coke] GlitchMr: are you trying to answer rindolf's question? I think he's looking at just the compiler, not star.
20:43 GlitchMr Isn't compilation script similar?
20:43 GlitchMr Besides, I think that this script works on plain Rakudo too, but I haven't checked it
20:43 flussence yay, I've created valid-looking code that doesn't work in rakudo OR niecza.
20:43 flussence https://gist.github.com/3982889
20:44 gfldex what does ^$sleep in line 15 do?
20:44 rindolf [Coke]: oh.
20:44 rindolf [Coke]: how can I fix it.
20:44 flussence gfldex: 1..$sleep
20:45 rindolf OK, parrot's "make distclean" is broken.
20:48 [Coke] rindolf: did you replace the missing file?
20:48 sorear flussence: that's invalid-looking code
20:48 sorear flussence: I don't think you're allowed to add an Instant to a Numeric
20:48 rindolf [Coke]: I did a git checkout .
20:49 GlitchMr > 3 + now
20:49 GlitchMr Instant:1351630187.510438
20:49 GlitchMr Why not?
20:49 GlitchMr It's like adding 3 seconds
20:49 [Coke] rindolf: ok. that should restore the file - if distclean is trying to remove it again, do a `git clean -xdf` inside your parrot checkout.
20:50 [Coke] I think rakudo is stuck on a version of parrot that screwed this up.
20:50 GlitchMr But I guess it's as confusing as width: 6; in CSS, so perhaps you're right
20:50 rindolf [Coke]: thanks.
20:50 cognominal joined #perl6
20:51 GlitchMr Also, I find it interesting that for Wolfram Alpha, 'now + 3' actually means 'now + 3 days'
20:51 [Coke] GlitchMr: same in Oracle, I think.
20:51 masak sorear: there's a constant struggle between ease and strictness in the decision of how much to allow Instants and Real to be fungible.
20:51 GlitchMr But perhaps storing it as seconds is just implementation detail
20:52 GlitchMr And adding seconds doesn't make sense
20:52 flussence spec says an Instant is "epoch-agnostic measure of seconds", it doesn't say I can't get at the number of seconds and do arithmetic on it
20:53 havenn joined #perl6
20:53 flussence (it doesn't say much at all, actually...)
20:53 masak flussence: no, but such a sentiment has been claimed on channel at times.
20:54 masak flussence: opinions fall on a scale between "Instants are totally fungible with numbers" and "Instants never betray their numeric value in any way".
20:54 havenn joined #perl6
20:55 colomon n: print qx[ls /]
20:55 p6eval niecza v22-15-gc600005: OUTPUT«Unhandled exception: rungather may not be used in safe mode␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (rungather @ 0) ␤  at /tmp/OQ2es_G0Xb line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4215 (ANON @ 3) ␤  at /home/p6eval/niec…
20:55 colomon \o/
20:56 flussence I'd be fine with doing $instant + Duration.new($seconds), but even that won't work in niecza.
20:56 GlitchMr API like now + 4.seconds would be rather nice ;-)
20:56 GlitchMr But well, it's Perl 6, not Ruby
20:58 rindolf Seems like the --optimized flag was already applied for Parrot. :-(
20:59 GlitchMr irb(main):006:0> 4.times { print 'combo' }
20:59 GlitchMr combocombocombocombo=> 4
20:59 GlitchMr In Perl 6, it probably would look like for ^4 { print 'combo' }
21:02 gfldex r: say 'combo' x 4;
21:02 p6eval rakudo 34febe: OUTPUT«combocombocombocombo␤»
21:03 kurahaupo joined #perl6
21:04 masak r: sub r($n where * > 0) { print 'combo'; r $n-1 }; try r 4
21:04 p6eval rakudo 34febe: OUTPUT«combocombocombocombo»
21:04 masak :P
21:05 flussence I would've gone with macro infix:<times>($count, &code) { ... }
21:05 flussence (if I could figure out how to make it work)
21:05 masak r: sub r($n where {$_}) { print 'combo'; callwith $n-1 }; try r 4
21:05 p6eval rakudo 34febe: OUTPUT«combo»
21:05 masak hrm.
21:06 masak r: sub r($n where {$_}) { print 'combo'; callwith $n-1 }; r 4
21:06 p6eval rakudo 34febe: OUTPUT«callwith is not in the dynamic scope of a dispatcher␤  in block  at src/gen/CORE.setting:514␤  in sub r at /tmp/jVbohuhKLI:1␤  in block  at /tmp/jVbohuhKLI:1␤␤combo»
21:06 masak oh!
21:06 masak r: multi r($n where {$_}) { print 'combo'; callwith $n-1 }; r 4
21:06 p6eval rakudo 34febe: OUTPUT«combo»
21:06 flussence erm... I think I just horribly broke the repl:
21:06 flussence too few arguments: 0 passed, 192219520 expected
21:06 masak jnthn: if callwith fails to dispatch, there's no warning, no nuthin'?
21:08 jnthn masak: Correct. You're iterating through a candidate list.
21:08 jnthn masak: The error you get is for callsame-ing when ther's no dispatcher in scope
21:09 * masak definitely hasn't assimilated the new callwith semantics
21:09 masak when I grow up, I'm going to design a programming language that doesn't keep surprising me :P
21:09 am0c yey, rakudo-star-2012.10 shiped with various libraries includes panda
21:09 fgomez joined #perl6
21:10 jnthn masak: Didn't you once complain that it *did* explode if you ran out of things to defer to? :D
21:11 masak hey, I complain. don't ask me to be consistent, too! :P
21:11 masak by the way, this exchange feels very familiar.
21:12 masak wouldn't surprise me if I've RT'd it at some point...
21:12 jnthn :)
21:13 masak RT: a huge map of masak's complaints...
21:13 masak especially since (as we all know), there's a bias for masakbugs to stay unresolved... :/
21:14 flussence that's because you keep finding bizarre ways to break rakudo :)
21:14 jnthn it's because diakopter pipes his weird and wonderful finds through masakbot :D
21:15 masak yeah, lately I've been a faithful medium for the restless diakoptergeist.
21:37 Pleiades` joined #perl6
21:51 pmurias joined #perl6
21:51 pmurias [Coke]: one of my really long terms plans is once nqpjs is working is to port Perlito5 to QAST
21:52 pmurias [Coke]: but I'm not really interested in that while parrot is nqp's only backend
22:04 timotimo_ how would you implement something with gather/take where you'd take two items each time and they are supposed to end up in two separate lists?
22:05 masak huh, an unzip operation... :)
22:05 timotimo_ r: my @a, @b = gather { take 1, "a"; take 2, "b"; take 3, "c"; }; say "a: @a\nb: @b";
22:05 p6eval rakudo 34febe: OUTPUT«===SORRY!===␤Variable @b is not declared␤at /tmp/ncJ19EGOyp:1␤»
22:05 masak yeah, that won't work.
22:06 timotimo_ wasn't supposed to
22:06 masak not least because you forgot the parens after 'my'.
22:06 masak but won't work anyway because arrays are slurpy.
22:06 masak r: my @a = <1 a 2 b 3 c>; my (@b, @c); for @a -> $b, $c { @b.push($b); @c.push($c) }; say @b.perl; say @c.perl
22:06 p6eval rakudo 34febe: OUTPUT«Array.new("1", "2", "3")␤Array.new("a", "b", "c")␤»
22:07 timotimo_ ah, so that's basically the same thing in reverse and non-lazy?
22:07 pmurias jnthn: what does .const "LexInfo" %r = "cuid..." do?
22:07 timotimo_ in reverse meaning just "push instead of take"
22:11 masak timotimo_: well, 'take' is already a sort of 'push' to an anonymous array...
22:12 masak 'night, #perl6
22:15 jnthn r: sub unzip(@a) { state ($s1, $s2); (@a.grep({ ++$s1 %% 2 }), @a.grep({ ++$s2 !%% 2 })).lol }; my (@a, @b) := unzip(1..*); say @a[^10]; say @b[^10];
22:15 p6eval rakudo 34febe: OUTPUT«2 4 6 8 10 12 14 16 18 20␤1 3 5 7 9 11 13 15 17 19␤»
22:16 jnthn pmurias: Grabs the static lexical info associated with the specified block.
22:17 erkan joined #perl6
22:17 erkan joined #perl6
22:21 jnthn 'night
22:22 cotto joined #perl6
22:26 bapa joined #perl6
22:30 havenn joined #perl6
22:43 ivan`` joined #perl6
22:48 Khisanth joined #perl6
22:51 yeltzooo joined #perl6
22:55 stocks joined #perl6
22:57 bapa joined #perl6
23:04 hash_table joined #perl6
23:13 tomaw joined #perl6
23:14 fgomez joined #perl6
23:19 skids joined #perl6
23:24 hash_table joined #perl6
23:49 sivoais joined #perl6
23:59 benabik joined #perl6

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

Perl 6 | Reference Documentation | Rakudo