Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-02-18

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:07 masak 'night, #perl6
00:07 sorear bye masak
00:13 buubot_backup joined #perl6
00:22 pmurias sorear: where is that implemented?
00:37 mykhal joined #perl6
00:47 kst joined #perl6
00:50 benabik joined #perl6
01:02 xjiujiu joined #perl6
01:03 benabik joined #perl6
01:24 flussence nom: my $num = 10; $num .fmt= '%04d'; say $num; # if I want $num to be "0010", how short can I really make this without breaking it?
01:24 p6eval nom 1e966b: OUTPUT«===SORRY!===␤Confused␤at /tmp/SJ8akhpMex:1␤»
01:35 sorear nom: my $num = 10; $num.=fmt:'%04d'; say $num
01:35 p6eval nom 1e966b: OUTPUT«===SORRY!===␤Confused␤at /tmp/khTZISNnYj:1␤»
01:36 sorear nom: my $num = 10; $num.=fmt: '%04d'; say $num
01:36 p6eval nom 1e966b: OUTPUT«0010␤»
01:36 sorear nom: my $num = 10; $num.=fmt('%04d); say $num
01:36 p6eval nom 1e966b: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
01:36 flussence sorear++
01:36 flussence clever use of indirection :)
01:37 sorear ...indirection?
01:38 sorear nom: sub postfix:<%>($x is rw) { $x.=fmt('%04d'); }; my $num = 10; $num%; say $num
01:38 p6eval nom 1e966b: OUTPUT«0010␤»
01:38 flussence I wouldn't have thought to use the colon syntax there, probably because I'm wrong :)
01:38 sorear it didn't actually do anything useful
01:39 sorear apparently the colon requires a space after it to disambiguate from name extensions ($foo.infix:sym<+>)
01:39 sorear and ': ' is as long as '()'
01:39 sorear I was trying to save a character, and failed
01:40 kst joined #perl6
01:41 flussence I'd completely forgotten about .= somehow so I was trying to write it like &[fmt]= while trying to get it to remember its invocant
01:54 d4l3k_ joined #perl6
01:57 LoRe_ joined #perl6
01:58 Pzter joined #perl6
01:58 ranguard_ joined #perl6
02:01 Helios- joined #perl6
02:07 PZt joined #perl6
02:10 ilogger2 joined #perl6
02:18 silug_ joined #perl6
02:24 thou joined #perl6
02:47 aloha joined #perl6
02:59 bacek_at_work joined #perl6
03:17 jferrero joined #perl6
03:21 dalek roast: 239bf2f | coke++ | S0 (4 files):
03:21 dalek roast: fudge for pugs
03:21 dalek roast: review: https://github.com/perl6/roast/commit/239bf2fd21
03:21 dalek Pugs.hs: b923ddd | coke++ | t/spectest.data:
03:21 dalek Pugs.hs: sort spectests
03:21 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/b923dddc46
03:21 dalek Pugs.hs: e397ced | coke++ | t/spectest.data:
03:21 dalek Pugs.hs: run more tests
03:21 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/e397cedbb7
03:23 [Coke] so, any haskell hackers about? I have some LHF for you.
03:26 sorear I have haskell experience but I've never even looked at Pugs.hs
03:26 sorear I'm not sure if I've even tried running it
03:27 [Coke] I'm trying to find where the Test module is defined - need to add a "done" sub.
03:28 sorear I'm 90% sure that the packages/Test.pm in roast is the Test module pugs use{s,d}
03:29 kst joined #perl6
03:30 [Coke] Is anyone else using it?
03:30 sorear Does any implementation other than pugs, niecza, rakudo, and alpha use roast?
03:31 sorear Because the latter three all have their own Test
03:31 orafu joined #perl6
03:32 kst joined #perl6
03:33 [Coke] there doesn't seem to be a "sub ok" anywhere in there.
03:33 sorear going by the fudge lines - 1x kp6, 6x mildew, 1275x niecza, 520x pugs, 1295x rakudo (78x DOES :D)
03:33 sorear is there a "multi ok" or a "only ok"?
03:33 sorear doesn't seem like kp6 or mildew are really using roast
03:34 sorear (either that or they're much more complete than ruoso and pmurias have let on :D)
03:34 sorear er, fglock
03:34 [Coke] yah, we'd hear about it in here, I think.
03:35 [Coke] I don't see any of those, no.
03:35 sorear dunno, seems fglock has been hacking perlito monastic-style
03:38 [Coke] Pugs.hs has no issues tab. :(
03:39 [Coke] phenny: tell masak your first Pugs task is to figure out where to add a "done" sub for Test.pm (I can't even find Test.pm!)
03:39 phenny [Coke]: I'll pass that on when masak is around.
03:41 [Coke] "pugs",      1084,     0,    30,     2,  1116, 22751
03:44 sorear what are the columns for that?
03:48 [Coke] https://gist.github.com/1476841
03:49 [Coke] "Impl",      "pass","fail","todo","skip","plan","spec"
03:50 [Coke] b: print 1084 / 20055 # pugs vs. niecza
03:50 p6eval b 1b7dd1: OUTPUT«0.0540513587634006»
03:50 [Coke] nom: print 1084 / 20055 # pugs vs. niecza
03:50 p6eval nom 1e966b: OUTPUT«0.0540513587634006»
03:50 [Coke] wow, slow b.
03:51 [Coke] still a lot more we can run with a few fudges.
03:51 [Coke] (already running 94 test files, though.)
04:02 sorear slow b?  I blame caching
04:16 tokuhirom joined #perl6
04:24 lestrrat joined #perl6
04:36 emss joined #perl6
04:42 tokuhirom joined #perl6
04:53 tadzik hello #perl6
04:56 au /o
04:59 au masak, [Coke]: Test.pm is currently hard-coded in Pugs as ./Pugs/cbits/Test_pm.c ... as is Prelude_pm.c. your task, should you accept it, is to write a tool that reverse it back to .pm form and get it back to .c form, then add it to makefile :)
05:08 zhutingting joined #perl6
05:36 thou joined #perl6
05:42 sorear au: Why is it in ... cbits?
05:42 sorear o/ tadzik, au
05:58 sudokode joined #perl6
06:06 sudokode joined #perl6
06:11 dalek niecza: c4ecd5c | sorear++ | src/niecza:
06:11 dalek niecza: Implement $.foo(42) syntax (fixes #106)
06:11 dalek niecza: review: https://github.com/sorear/niecza/commit/c4ecd5c91e
06:11 benabik $.foo ?
06:11 benabik sorry, I mean $.foo(42), obv.
06:11 sorear $.foo(42) means $(self.foo(42))
06:52 alvis joined #perl6
07:18 tarch joined #perl6
07:20 GlitchMr joined #perl6
07:56 noam joined #perl6
07:58 au sorear: back in the says HS issues representing very long literate ByteStrings.
07:58 au *days
07:58 au nowadays we can probably get by using something like http://hackage.haskell.org/packages/archive/string-qq/0.0.2/doc/html/Data-String-QQ.html .
07:58 sorear Haskell *has* literal ByteStrings?
07:58 sorear (stupid question, I've been gone for five years)
07:59 au they now have something approaching that
07:59 au http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/type-class-extensions.html#overloaded-strings
08:00 au Data.String.QQ merges IsString with multi-line quasiquoting.
08:02 au but before that was available, the cbit-to-ByteString logic in src/Pugs/Prelude.hs using (unsafePerformIO . unsafePackCStringLen) was an acceptably efficient workaround. :)
08:03 au we'll also want to use Text as Str instead of ByteString as both Str and Buf, etc
08:03 au anyway, the ecosystem has changed a lot :)
08:05 sorear why not just use Data.ByteString.readFile?
08:06 au much slower as it hits the disk? :)
08:08 au nowadays, even that may no longer be a reasonable tradeoff, though. back in the days, it meant ~500ms startup overhead, which adds up quickly running the test suite.
08:09 sorear au: that suprises me
08:10 sorear how big is the Pugs prelude?  Niecza has a 300kb setting currently, and back in 2007 GHC could not be persuaded to emit a binary smaller than 5MB
08:10 sorear why is the 5MB+ pugs executable in cache but the <0.5MB prelude read every time?
08:11 au $ ll
08:11 au total 11232
08:11 au -rw-r--r--  1 audreyt  staff  3373188 Mar 29  2011 Prelude_pm.c
08:11 au -rw-r--r--  1 audreyt  staff  2374772 Mar 29  2011 Test_pm.c
08:11 noam joined #perl6
08:11 au so about 1mb data
08:11 kaare_ joined #perl6
08:12 sorear so, wait, pugs parses the prelude on every start?
08:13 au no
08:13 au it's Data.Binary encoded
08:13 au of the globs and pads and AST preparsed
08:13 sorear *phew*
08:14 sorear I would have had to cry if pugs can compile 300kb of source text in <<1s
08:14 sorear since niecza takes 60s and rakudo is/was even slower
08:14 sorear WHY DO OUR COMPILERS SUCK SO MUCH *sobs anyway*
08:16 Woodi maybe Perl6 is little complicated a bit and gears not exactly work with each other ?
08:17 Woodi like in newly researching project...
08:17 au $ time pugs -c 300k.pm
08:17 au 300k.pm syntax OK
08:17 au real0m13.613s
08:17 au user0m12.689s
08:17 au (it's Test.pm repeated over again)
08:18 au but should be representative
08:18 sorear au: I need to apply a correction factor for timings other people report... you're probably not on a P4-Northwood from 2003
08:18 au I'm on feather :)
08:19 sorear yay, niecza -C CORE takes 12.9s on feather
08:20 au cool, so ~comparable
08:24 au [Coke], masak: so, uh, never mind reverse-engineering the .c back to .pm... they are results of "pugs -CParse-Binary Test.pm" and "pugs -CParse-Binary Prelude.pm", from https://github.com/audreyt/pugs/blob/master/src/perl6/Prelude.pm and https://github.com/audreyt/pugs/blob/master/ext/Test/lib/Test.pm; so just the encoding-to-cbit part is needed to modify Test.pm.
08:31 au &
09:06 moritz o/
09:20 sorear /o
09:24 jasonmay joined #perl6
09:34 sorear moritz: so I hear 'handles' is a priorityh
09:49 araujo joined #perl6
09:49 araujo joined #perl6
09:54 araujo joined #perl6
10:18 danishman joined #perl6
10:19 mj41 joined #perl6
10:24 lestrrat joined #perl6
10:25 moritz sorear: well, would be rather nice to have
10:25 moritz and probably not too complicated to implement
10:28 tokuhirom joined #perl6
10:36 unobe joined #perl6
10:42 masak good antenoon, #perl6.
10:42 phenny masak: 03:39Z <[Coke]> tell masak your first Pugs task is to figure out where to add a "done" sub for Test.pm (I can't even find Test.pm!)
10:42 masak I see au++ solved the mystery above.
10:43 tadzik hello masak
10:44 masak au: does that mean Test.pm exists in http://github.com/audreyt/pugs but not in http://github.com/perl6/Pugs.hs ? mind if we copy them over to the latter for our insidious hacking purposes? :)
10:49 masak sorear: +1 on 'handles' -- nice-to-have, and one less thing to have to workaround when writing cross-implementation programs.
10:49 moritz masak: forgiveness > permission
10:50 moritz (re copying *.pm)
10:51 masak gotcha.
10:52 * masak makes it so
10:59 dalek Pugs.hs: ffda141 | masak++ | Pugs/ (12 files):
10:59 dalek Pugs.hs: added Test.pm and Prelude.pm
10:59 dalek Pugs.hs:
10:59 dalek Pugs.hs: From https://github.com/audreyt/pugs.git
10:59 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/ffda141f9a
10:59 masak now, for [Coke]'s challenge... :)
11:02 mj41 joined #perl6
11:06 leprevost joined #perl6
11:10 dalek Pugs.hs: 27f1db4 | masak++ | Pugs/ext/Test/lib/Test.pm:
11:10 dalek Pugs.hs: [Test.pm] added 'done' (and 'done_testing')
11:10 dalek Pugs.hs:
11:10 dalek Pugs.hs: Heavily inspired by Rakudo's Test.pm.
11:10 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/27f1db4a38
11:25 jnthn ohhai, #perl6
11:25 tadzik ohhai jnthn
11:26 moritz lolitsjnthn
11:27 masak jnthn! \o/
11:28 * moritz currently works on the prisoner's dilemma summary, but will have little hacking time today
11:28 jnthn Welcome back, tadzik :)
11:28 jnthn moritz: How sunk is the sink work? :)
11:28 moritz stuck :/
11:29 tadzik ooh, I missed yet another contest :/
11:29 moritz jnthn: see http://irclog.perlgeek.de/perl6/2012-02-17#i_5163160
11:29 moritz and even if I change that, it seems that I get some mis-compilation
11:30 moritz because then the 'returns' trait calls $routine.signature.set_returns, and .signature seems to return an Int :(
11:31 jnthn moritz: Not sure I follow the confusion here...
11:31 jnthn unless $precomp {
11:31 jnthn $compiler_thunk();
11:31 jnthn }
11:31 jnthn If it's false, that does the compilation and populates it
11:31 jnthn $compiler_thunk is right above, and includes the line:
11:31 jnthn $precomp := self.compile_in_context($code_past, $code_type, $slp_type);
11:32 moritz oh
11:32 Trashlord joined #perl6
11:32 moritz then I have no idea why $precomp tries to invoke Any :/
11:32 jnthn er, that would be especially odd, yes.
11:32 jnthn Any does...not exist in NQP
11:33 jnthn (e.g. if you've got an Any then you've got Rakudo's one from...somewhere)
11:33 moritz well, not sure if $precomp is any, or if that happens somewhere in there
11:33 dalek rakudo/sink: bbfd717 | moritz++ | src/ (2 files):
11:33 dalek rakudo/sink: make List.sink safe for invoking on the type object
11:33 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/bbfd717e06
11:35 jnthn moritz: How to reproduce $current_issue?
11:35 * jnthn is building the sink branch now
11:36 araujo morning
11:36 moritz jnthn: pull again, try to compile
11:36 moritz I accidentally committed some debugging output
11:36 moritz a well.
11:36 araujo so, ... where can I get the pugs version with the fixes? :)
11:36 moritz afk
11:37 JimmyZ joined #perl6
11:38 jnthn Method 'set_returns' not found for invocant of class 'Int'
11:38 jnthn o.O
11:38 masak araujo! \o/
11:39 masak araujo: http://github.com/perl6/Pugs.hs
11:39 masak tadzik: you and me both :/
11:39 araujo masak, \o/ !!
11:39 tadzik masak: huh?
11:40 itz joined #perl6
11:40 birdwindupbird joined #perl6
11:40 masak tadzik: missed the contest.
11:41 tadzik ah
11:41 tadzik I don't regret spending 4 days snowboarding though :)
11:42 itz My cleaner is from Bratislava. "Slovak?" Yes, and she can't iron either.
11:42 huf ow :D
11:43 jnthn :P
11:43 masak tadzik: no thumbs broken?
11:43 * masak 's only association with snowboarding is broken thumbs
11:43 huf both?
11:43 huf at the same time?
11:44 masak apparently, beginner snowboarders usually do fine... until they stop, fall over, and break a thumb or two.
11:44 tadzik masak: they hurt the most among all the other body parts :)
11:44 tadzik the soul of fearless skiier made me pay a heavy price in the first two days
11:44 masak you're not supposed to use your thumbs as anchors when stopping! :P
11:45 masak that's a skiing manoeuver!
11:45 tadzik oh, that explains a lot
11:45 tadzik ;)
11:45 masak sheesh.
11:45 masak :P
11:48 leprevost_ joined #perl6
11:49 thou joined #perl6
11:55 whiteknight joined #perl6
12:01 leprevost joined #perl6
12:03 dalek rakudo/sink: 7ddf5ab | jnthn++ | src/Perl6/ (2 files):
12:03 dalek rakudo/sink: If we do dynamic compilation of code code, be sure to sink it at that point. Also tag it sunk so we don't re-do the work later. Doesn't fix the immediate problem, sadly - just spotted it was missing.
12:03 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/7ddf5ab972
12:06 sisar joined #perl6
12:23 peteretep joined #perl6
12:23 peteretep The Configure.pl buildstep for rakudo-star-2012.01 appears to dislike my Cwd having a space in it
12:23 peteretep perl Configure.pl --gen-parrot
12:24 peteretep Tries to run:
12:24 peteretep /usr/bin/perl Configure.pl --with-parrot=/mnt/hgfs/Code Folder/rakudo-star-2012.01/install/bin/parrot --make-install
12:26 peteretep Hrm, so then Configure.pl seems to call itself
12:29 jnthn It's probably a different Configure.pl - looks like it's the call to NQP's one.
12:30 jnthn And yeah, it looks like it isn't quoting that path name.
12:30 peteretep I'm trying again with prefix of "./" so it doesn't use cwd
12:30 peteretep Maybe that'll fix it
12:32 GlitchMr42 joined #perl6
12:32 dalek rakudo/sink: e06236d | jnthn++ | src/Perl6/Sinker.pm:
12:32 dalek rakudo/sink: All method calls are wrapped up in calls to perl6ize_type so we need to make sure we descend into them also.
12:32 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/e06236d40d
12:32 dalek rakudo/sink: 4017a66 | jnthn++ | tools/build/Makefile.in:
12:32 dalek rakudo/sink: Fix dependency.
12:32 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/4017a66498
12:33 * avar just read http://www.reddit.com/r/perl/comments/pv12h/perl_6_compilers_pass_20k_specification_tests/ , very impressive
12:33 avar http://perl6.org/compilers/features also shows some very nice progress
12:33 jnthn phenny: tell moritz it appears that the problem is at least partly to do with the call to .signature
12:33 phenny jnthn: I'll pass that on when moritz is around.
12:33 jnthn phenny: tell moritz replacing that trait body with nqp::getattr(nqp::p6decont($target), Code, '$!signature').set_returns($type) gets things further
12:33 phenny jnthn: I'll pass that on when moritz is around.
12:35 GlitchMr42 joined #perl6
12:36 jnthn phenny: tell moritz OH!!! In bbfd717e06 the closure assigned to $stub was changed. To something that never invoked the code the first time it was compiled...
12:36 phenny jnthn: I'll pass that on when moritz is around.
12:37 peteretep OK, so that leads to:
12:37 peteretep /usr/bin/perl Configure.pl --with-parrot=./bin/parrot --make-install
12:37 dalek rakudo/sink: 0e2a54e | jnthn++ | src/Perl6/World.pm:
12:37 dalek rakudo/sink: Undo busted change to dynamic compilation. Gets us further.
12:37 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/0e2a54e2ee
12:37 peteretep which is still not right
12:37 peteretep I'll try a different prefix then, I guess
12:38 peteretep Is there a bug tracker?
12:38 jnthn peteretep: Please do feel free to also drop a bug report about the issue with not accepting paths with spaces to rakudobug@perl.org
12:39 jnthn (emails sent there create tickets in the bug tracker)
12:39 peteretep OK. Is the bug tracker public?
12:39 jnthn yes
12:40 * peteretep is taking a week to learn Perl 6, and to write a review of that process at the end of the week
12:40 jnthn https://rt.perl.org/rt3/ - the perl6 queue
12:40 peteretep great, thanks
12:40 tadzik peteretep: good luck!
12:40 jnthn But there's not a web interface to submit (guess this is partly for spam management...)
12:41 peteretep fair enough
12:43 peteretep This is looking more promising...
12:44 peteretep ah crap
12:44 peteretep Unable to read configuration from ./parrot-3.11.0/bin/parrot.
12:44 peteretep as a result of /usr/bin/perl Configure.pl --with-parrot=./parrot-3.11.0/bin/parrot --make-install
12:44 peteretep hand-running that gives: ./parrot-3.11.0/bin/parrot: error while loading shared libraries: libparrot.so.3.11.0: cannot open shared object file: No such file or directory
12:45 peteretep Guess I'll retry this whole thing in /tmp/
12:57 kst` joined #perl6
12:59 dalek rakudo/sink: ecf6bcc | jnthn++ | src/Perl6/Metamodel/ (2 files):
12:59 dalek rakudo/sink: Change return values from add_parent and add_role to be something other than a type object, so they'll at least be considered something true. Also avoids us sinking types we've not finished compiling yet.
12:59 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/ecf6bccf75
12:59 dalek rakudo/sink: 41b48aa | jnthn++ | src/Perl6/World.pm:
12:59 dalek rakudo/sink: Remove debugging code.
12:59 dalek rakudo/sink: review: https://github.com/rakudo/rakudo/commit/41b48aa5d2
12:59 jnthn phenny: tell moritz latest sink branch survives through the build now. :)
12:59 phenny jnthn: I'll pass that on when moritz is around.
12:59 jnthn afk for a little bit :)
13:00 peteretep my @names = $file.get.words; -- this implies that some part of this is context aware, especially when reading that .get returns a line of code a bit below
13:00 MayDaniel joined #perl6
13:01 peteretep oh wait, no it doesn't
13:01 peteretep I'm being an idiot
13:05 kshannon joined #perl6
13:06 aloha joined #perl6
13:11 colomon joined #perl6
13:18 peteretep OK, it's built. Without rebuilding it, what env var do I need to set to get 'make install' to install to a system-wide bin?
13:18 peteretep Reading the makefile and being slow
13:18 nebuchadnezzar joined #perl6
13:19 peteretep hrm, could well be DESTDIR
13:19 * peteretep gives it a go
13:20 peteretep Hrm, not quite that easy
13:23 emss joined #perl6
13:23 masak interesting language, Julia: http://julialang.org/
13:24 avar niecza seems faster than rakudo on same naive factorial benchmarks of mine, is that generally the case once it spins up?
13:27 masak yes, I'd say so.
13:32 pmurias joined #perl6
13:32 dalek Pugs.hs: 36d2ba8 | au++ | Pugs/ (2 files):
13:32 dalek Pugs.hs: * Make Prelude.pm self-sufficient, and re-introduce file2c.pl (from PAR::Packer).
13:32 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/36d2ba8bdb
13:38 masak \o/
13:38 peteretep Is there a perl6doc equivalent?
13:38 tadzik not really
13:39 tadzik you can generate documentation for a single file using --doc in rakudo
13:39 peteretep OK. Where do I find comprehensive documentation on sort() most easily?
13:39 masak S32/Containers
13:39 masak http://perlcabal.org/syn/S32/Containers.html
13:39 masak the spec is still the most authoritative manual to Perl 6.
13:39 peteretep ok
13:40 peteretep ah, I guess S29-functions.pod will be useful too
13:41 masak yes. :)
13:41 moritz jnthn++ # unbusting sink
13:41 phenny moritz: 12:33Z <jnthn> tell moritz it appears that the problem is at least partly to do with the call to .signature
13:41 phenny moritz: 12:33Z <jnthn> tell moritz replacing that trait body with nqp::getattr(nqp::p6decont($target), Code, '$!signature').set_returns($type) gets things further
13:41 phenny moritz: 12:36Z <jnthn> tell moritz OH!!! In bbfd717e06 the closure assigned to $stub was changed. To something that never invoked the code the first time it was compiled...
13:41 phenny moritz: 12:59Z <jnthn> tell moritz latest sink branch survives through the build now. :)
13:42 peteretep What's the canonical source for the Synopses?
13:42 moritz github.com/perl6/specs/
13:42 peteretep thanks
13:43 shinobicl___ joined #perl6
13:48 peteretep How does rakudo implement "use v5;"? Does it hook in to the system perl5?
13:48 Trashlord joined #perl6
13:49 masak it doesn't, yet.
13:49 masak there's Blizkost, though.
13:50 peteretep ah, I have been meaning to look at that
13:52 peteretep Do any of the compilers provide support for that? I didn't se it in the feature matrix (or I missed it)
13:55 masak Rakudo and Blizkost go together. I don't know excatly how, 'cus I haven't used Blizkost.
13:55 dalek Pugs.hs: d62568e | au++ | Pugs/src/Pugs/Prim/Eval.hs:
13:55 dalek Pugs.hs: * Add PUGS_USE_EXTERNAL_TEST env variable that uses external Test.pm.
13:55 dalek Pugs.hs:
13:55 dalek Pugs.hs:   So this works now:
13:55 dalek Pugs.hs:
13:55 dalek Pugs.hs:      PUGS_USE_EXTERNAL_TEST=1 dist/build/pugs/pugs -Iext/Test/lib -MTest -e 'done_testing'
13:55 dalek Pugs.hs:
13:55 dalek Pugs.hs:   To cache compilation AST, do this:
13:55 dalek Pugs.hs:
13:55 dalek Pugs.hs:      dist/build/pugs/pugs -CParse-Yaml ext/Test/lib/Test.pm  > ext/Test/lib/Test.pm.yml
13:55 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/d62568eb52
13:55 peteretep masak: OK, that makes sense
13:55 au [Coke] / masak : I think ⬆ is all we need for Test.pm hackery for now, hope it helps
13:57 au (...and commits welcome if you'd like to flip it so PUGS_USE_EXTERNAL_TEST is the default :))
13:57 * au cxt-switches a bit to the new exciting gig of Parsoid hacking
13:58 masak au++
13:58 emss joined #perl6
14:00 au pugs: say eval('$]', :lang<perl5>)
14:00 p6eval pugs b927740: OUTPUT«5.010001␤»
14:00 au peteretep: ^^
14:01 au although now the appropriate syntax for that has probably changed... :)
14:03 peteretep au: How is that implemented?
14:03 au peteretep: by embedding libperl within the interpreter
14:03 peteretep Thanks
14:03 au np :)
14:03 peteretep Hey, Embedded Comments are neat
14:05 * peteretep & lunch
14:13 countley joined #perl6
14:14 masak no, I think the appropriate syntax is still eval($code, :$lang)
14:15 moritz one of the appropriate syntaxes :-)
14:16 au interesting. I thought $lang is of type Grammar now
14:16 au # http://perlcabal.org/syn/S29.html#eval
14:23 masak I've never seen that implemented, so I'm correspondingly skeptical.
14:23 pmurias au: niecza still does eval('...',:lang<perl5>)
14:23 au k, great to know.
14:23 masak you can't eval something with a Grammar anyway, you need a whole language :)
14:24 pmurias i think the assumption was that the Grammar will produce Perl6 AST
14:27 fsergot joined #perl6
14:28 fsergot joined #perl6
14:34 dfg_ joined #perl6
14:46 tadzik cosimo: ping
14:50 [Coke] masak++, au++ !
14:53 * [Coke] is almost sad that he has plans today, and probably can't do much on pugs!
14:57 PacoAir joined #perl6
14:59 fsergot I've been learning perl6 for last few months. I mean writing some p6's apps, scripts, etc. What should I learn next? :)
15:00 [Coke] pugs: use Test; done;
15:00 p6eval pugs b927740: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/197NuiTk7P line 1, column 1␤»
15:00 tadzik more Perl 6? :)
15:00 [Coke] :(
15:00 fsergot pugs, nqp? :)
15:01 tadzik no, I mean, learn Perl 6 deeper :)
15:01 tadzik maybe dive into compiler guts?
15:01 fsergot tadzik, of course, but what do You mean? :)
15:01 [Coke] masak - I just did a git pull, 'cabal install Pugs', but the installed pugs ($HOME/.cabal/bin/pugs) doesn't have access to the done function.
15:01 fsergot What is it?
15:01 tadzik I mean working on the Perl 6 compiler in general
15:02 fsergot tadzik, oh, sorry my mistake.
15:03 nebuchadnezzar joined #perl6
15:05 fsergot Thanks tadzik++. :)
15:06 au [Coke]: git pull, "cabal install"
15:06 au not "cabal install Pugs"
15:06 au also, export PUGS_USE_EXTERNAL_TEST=1
15:07 au or, alternately, git pull, "make", and ./pugs -Iext/Test/lib -MTest -e done_testing
15:08 au (but still export PUGS_USE_EXTERNAL_TEST=1)
15:12 noam joined #perl6
15:12 [Coke] $ PUGS_USE_EXTERNAL_TEST=1 /home/coke/.cabal/bin/pugs -e "use Test;done"
15:12 [Coke] *** No such subroutine: "&done"
15:13 [Coke] (that after "cabal install")
15:14 [Coke] same error using the ./pugs line.
15:15 [Coke] ah. missed the "make" step, which also copies dist.../pugs to ./pugs
15:15 [Coke] sucks that the installed version doesn't work. I'll see about re-doing the tests to assume you have ./Pugs/pugs instead of $HOME/.cabal/bin/pugs
15:15 [Coke] au++
15:15 [Coke] (heading out now)
15:26 fsergot How does "return -> ..." work?
15:27 flussence it returns a closure
15:27 flussence -> { } is called a "pointy block", which is basically shorthand for an anonymous sub
15:28 fsergot flussence++ thank You.
15:28 tadzik nom: for 1..5 -> $a { say $a }
15:28 p6eval nom 1e966b: OUTPUT«1␤2␤3␤4␤5␤»
15:28 tadzik nom: for 1..5 sub($a) { say $a }
15:28 p6eval nom 1e966b: OUTPUT«===SORRY!===␤Missing block at line 1, near "sub($a) { "␤»
15:31 xinming joined #perl6
15:38 colomon you know, http://perl6.org/compilers/features is somewhat out of date WRT niecza.
15:43 colomon niecza: @evens = ($_ * 2 if * %% 2 for 0..100);
15:43 p6eval niecza v14-43-gc4ecd5c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable @evens is not predeclared at /tmp/Dd3MRy2twr line 1:â�¤------> [32m<BOL>[33mâ��[31m@evens = ($_ * 2 if * %% 2 for 0..100);[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
15:44 colomon niecza: my @evens = ($_ * 2 if * %% 2 for 0..100);
15:44 p6eval niecza v14-43-gc4ecd5c: OUTPUT«Potential difficulties:â�¤  @evens is declared but not used at /tmp/xC9JHLg_Tb line 1:â�¤------> [32mmy [33mâ��[31m@evens = ($_ * 2 if * %% 2 for 0..100);[0mâ�¤â�¤Â»
15:44 colomon niecza: my @evens = ($_ * 2 if * %% 2 for 0..100); say @evens
15:44 p6eval niecza v14-43-gc4ecd5c: OUTPUT«␤»
15:44 colomon ah
15:47 flussence perl6: my @evens := (1..* X+< 1); say @evens[400]
15:47 p6eval rakudo 1e966b, niecza v14-43-gc4ecd5c: OUTPUT«802␤»
15:47 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected end of input␤    expecting "\\", variable name, ">" or "<"␤    at /tmp/3_3WaDKl42 line 2, column 1␤»
15:47 flussence (should be 0..*)
15:49 Psyche^ joined #perl6
15:57 TimToady colomon: you can't use a WhateverCode in an 'if', btw
15:58 colomon oh!  duh.
15:58 TimToady needs 'when'
15:58 colomon niecza: my @evens = ($_ * 2 if $_ %% 2 for 0..100); say @evens
15:58 p6eval niecza v14-43-gc4ecd5c: OUTPUT«␤»
15:58 colomon still doesn't work.
15:58 TimToady but I don't think niecza does comprehensions yet
15:59 TimToady btw, that expr should make 0, 4, 8, 12 ... *
16:00 TimToady nom: my @evens = ($_ * 2 if $_ %% 2 for 0..100); say @evens
16:00 p6eval nom 1e966b: OUTPUT«0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 192 196 200␤»
16:00 TimToady which is only the even evens :)
16:01 peteretep Learning Perl 6 by reading the Specs is perhaps a mistake
16:01 TimToady it's easier than learning Perl 6 by writing the specs :)
16:02 au or handwriting the specs :)
16:02 peteretep I thought Perl was like Common Law
16:02 au (agentzh++ used to do that)
16:02 peteretep You discovered it, and it had retroactively always been there
16:02 TimToady it's more like picking the multiverse we want to live in
16:03 TimToady s/the multiverse/which universe of the multiverse/
16:03 peteretep hrm, S02-bits.pod is looong
16:03 TimToady ENOCOFFEE
16:03 TimToady yes, the specs could use to be reorganized; it's one of the many things we have to to first next :)
16:03 TimToady *to do
16:04 peteretep After taking the adjective 'spunky' off the Perl6 site? :-)
16:05 masak what's wrong with 'spunky'? :)
16:06 peteretep For a significant subset of English speakers, it's easily interpreted as something obscene.
16:06 TimToady so is STD :)
16:06 tadzik heh
16:07 tadzik google translate told me that it means "courageous" somewhat
16:07 peteretep TimToady: Yes, but I don't have to make sure my 12 year old has Google Safe Search turned on before googling the latter
16:07 TimToady yes, but you can see how it would be used as a euphemism for "easy" :)
16:08 TimToady nevertheless, I don't like giving up words to the dark side without a fight
16:08 masak was gonna say.
16:10 peteretep TimToady: Isn't that natural language evolution at its purest?
16:11 peteretep my Dog $spot .= new; # What's new being applied to here? The Dog prototype object?
16:11 tadzik it's a Type Object
16:11 TimToady sure, but pretty much every other word in the language can be taken as something prurient if you try hard enough
16:12 peteretep TimToady: That's absolutely true
16:12 peteretep TimToady: Most words don't return 95% pornography when you google them though
16:13 peteretep Ah, ok "Type Object" is short-hand for the type's prototype object
16:14 TimToady we don't call them prototype objects anymore, just type objects
16:14 TimToady prototype was getting too overloaded
16:14 peteretep OK
16:14 TimToady and easily confused with prototype-based languages like Self and JS
16:15 peteretep ooh, type coercian using type objects is neat
16:16 alvis joined #perl6
16:16 peteretep perl6: Num("2")
16:16 p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Num␤  at /tmp/XHiwsZCrTq line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3774 (module-CORE @ 65…
16:16 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&Num"␤    at /tmp/nuK3iL9MAQ line 1, column 1 - line 2, column 1␤»
16:16 p6eval ..rakudo 1e966b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Num' called (line 1)␤»
16:16 tadzik huh. How does paying the conference fee on the Act website work? I've just clicked "purchase", and it said "okay, done". Makes me wonder, who paid?
16:18 TimToady peteretep: if only it worked :)
16:18 peteretep TimToady: Does it not work because I'm doing something stupid, or because it isn't implemented yet?
16:18 jnthn TimToady: Do we know how it should work yet? :)
16:18 TimToady perl6: say '2'.Num
16:18 p6eval rakudo 1e966b, niecza v14-43-gc4ecd5c: OUTPUT«2␤»
16:18 p6eval ..pugs b927740: OUTPUT«*** No such method in class Str: "&Num"␤    at /tmp/DqK8nXzIio line 1, column 5 - line 2, column 1␤»
16:19 TimToady it should failover to that somehow if Num doesn't defined postcircumfix:<( )>
16:19 * jnthn loves the "somehow" :D
16:19 TimToady types *are* predeclared, so we know when we see the call that it's probably intended to be a coercion
16:20 jnthn TimToady: OK, but we can't just assume that this form *always* means coercion?
16:20 TimToady sure, but someone might define the coercion as a sub Num somewhere
16:21 TimToady it's only if they don't that it wants to look for .Num
16:21 jnthn But...subs are post-declared.
16:22 TimToady at the point that we say "No such subroutine", we make the decision
16:22 jnthn The point we say "no such subroutine" is in the optimizer :P
16:23 jnthn Unless you mean runtime failover.
16:23 TimToady well, for known types we can say they must be predeclared
16:23 TimToady so you can't postdeclare a coercion
16:23 peteretep rakudo: "2".elems
16:23 p6eval rakudo 1e966b:  ( no output )
16:23 peteretep rakudo: "2".bytes
16:23 p6eval rakudo 1e966b:  ( no output )
16:24 janosik joined #perl6
16:24 tadzik rakudo: "2".bytes.say
16:24 p6eval rakudo 1e966b: OUTPUT«1␤»
16:24 peteretep thanks
16:24 tadzik no problem
16:24 jnthn OK, so Foo(...) will (a) look for an &Foo, and if it exists emit the call to it as we do today, or (b) failing that, emit a method call .Foo ?
16:24 TimToady or we just always parse TypeName() as Typename with a .() call on it, and failover at run time
16:24 peteretep msg is probably better for the general case here
16:24 TimToady but then it's hard to use at compile time in a constant expression
16:25 jnthn (in my above, I assume Foo is a known type)
16:25 TimToady so for optimizing we want to decide at parse time, and for flexibility we want to defer
16:25 jnthn TimToady: Well, I've also long pondered whether SomeType(...) actually desugars to SomeType.^coerce(...)
16:25 TimToady I think your ab is sane(ish)
16:26 jnthn So it's the meta-object we're trying to coerce towards that decides what this really means
16:26 TimToady use case?
16:26 peteretep rakudo: [2,3,4].bytes.say
16:26 p6eval rakudo 1e966b: OUTPUT«5␤»
16:26 TimToady that's bogus
16:27 peteretep I was excpecting a three there
16:27 TimToady it should not be assuming an encoding
16:27 jnthn TimToady: Mostly, giving meta-space an opportunity to play in to coercions. :)
16:27 masak rakudo: say [2,3,4].Str
16:27 p6eval rakudo 1e966b: OUTPUT«2 3 4␤»
16:27 masak hence 5.
16:27 jnthn TimToady: So we don't hardwire the "coercing to X is a method call .X on the target object".
16:28 masak peteretep: if you wanted to sum the byte counts of the elements, you have to say so.
16:28 jnthn TimToady: Maybe I'm trying for too much future-proofing.
16:28 masak nom: say [+] [2,3,4]>>.bytes
16:28 p6eval nom 1e966b: OUTPUT«3␤»
16:28 jnthn masak: And that's still a dubious thing to do without specifying an encoding.
16:28 masak peteretep: but I'd go with .chars (unless you really, really want bytes), for the reasons TimToady and jnthn said.
16:28 tadzik note that it's still byte count in the "2", "3" and "4" strings
16:29 masak aye.
16:29 peteretep masak: The docs say: "You can also ask for the total string length of an array's elements ... ".bytes", ".codes" or ".graphs"
16:29 peteretep Am I misreading them, or are they out of date?
16:29 masak sounds like a fossil.
16:29 TimToady just never implemented
16:30 masak what's happening now is that Array is Cool, and Cool pretends it's a Str when you do .bytes
16:30 peteretep OK
16:30 peteretep Sorry that I'm asking all these questions. I'm testing my assumptions as I go
16:30 masak don't be sorry, be anti-sorry.
16:31 cosimo tadzik: late pong
16:31 TimToady jnthn: a big problem with coercions is that they're in the same infrastructural category of "maybe this should be a submethod unless you are specifically writing for your derived classes"
16:31 peteretep "It's not done yet" and variations are fine, "You don't understand it" is what I'm trying to make sure isn't the case
16:31 masak we're at the stage where we need newcomers to rub up against the spec and the language and the implementations.
16:31 masak "You don't understand it" is fine too, because then we get to explain, and then we get better at that :)
16:31 peteretep I'll be asking for code reviews later in the week :-P
16:31 masak \o/
16:31 TimToady yes, you are in no danger of irritating us by asking good questions
16:32 TimToady we do have some folks who use us *instead* of reading the specs, and that's a bit irritating
16:32 masak we love it when people get the channel back on topic :)
16:33 masak TimToady: I only find it irritating when they do it repeatedly (for the same thing).
16:33 jnthn TimToady: More than that, I worry whether assuming the type that needs to become something else is always the thing with knowledge about how that should happen will always be right.
16:33 TimToady that's the bit that's irritating :)
16:33 tadzik cosimo: mind if I bother you on query a bit?
16:34 cosimo tadzik: go ahead
16:34 jnthn TimToady: That is, Str(x) assumes x will know how to turn itself into a Str. Well, that makes sense...but will we have kinds of type where maybe that isn't so sane?
16:34 jnthn TimToady: Take enumerations. SomeEnumType(x) perhaps shouldn't be doing x.SomeEnumType.
16:34 TimToady eh, if you define .() it's Str that is knowing it, not x
16:34 jnthn TimToady: In fact, I think S12 wants it to do otherwise...
16:34 * jnthn checks
16:35 jnthn TimToady: Oh, you're thinking implementing .() on the type object is the mechanism for overriding coercion?
16:36 peteretep "Some object types can behave as value types." <-- what is a "value type"? Presumably it's not a native type
16:36 jnthn TimToady: OK. I was more wondering if the way that mechanism works is something that belongs in meta-space, not normal object space.
16:36 masak peteretep: a value type is a type defined entirely by its attributes.
16:37 peteretep I was just starting to think that way
16:37 peteretep OK
16:37 peteretep Thanks
16:37 TimToady it's trying to express immutable, I think
16:37 masak peteretep: it has no mutators. common examples are numeric types, or strings.
16:37 peteretep So the native types /are/ value types, too?
16:37 masak guess so.
16:37 masak but it's most often used for object classes.
16:37 peteretep Would that be a notable difference between Int(5) and int(5)?
16:37 TimToady types for which you expect my $a = $b.clone; $a === $b
16:38 TimToady hopefully not
16:38 TimToady int is just a restriction on how many bits you can store
16:38 TimToady they're supposed to have the same semantics
16:38 peteretep OK
16:39 * peteretep decides to not think about this bit too hard
16:39 TimToady might not be right in the implementations though
16:39 TimToady also, int(5) is relatively useless if you don't store it, since it might just turn back into an Int for temporary purposes
16:39 jnthn In Rakudo, int certainly restricts you. It's also often faster. Sometimes it's very faster. BUT we don't get overflow right yet.
16:40 TimToady nom: my Int $x = 5; my int $y = 5; say $x === $y
16:40 p6eval nom 1e966b: OUTPUT«True␤»
16:40 TimToady \o/
16:40 TimToady I presume that works because int boxes to Int before the ===
16:41 jnthn TimToady: I'm almost certain that's what happens.
16:41 TimToady though, of course, with intimate knowledge of the Int type one could probably optimize it to something lower level
16:41 peteretep === is just like JS === then?
16:42 peteretep Hrm, I used JS Type Coercians as an example of something too weird to be easily remembered recently
16:42 MayDaniel joined #perl6
16:42 TimToady === is value equivalence; two identical objects that are not value types will compare false under === but true under eqv
16:43 TimToady that is, a non-value type's identity is its location, not its contents, while a value type's identity is its value
16:43 kmwallio joined #perl6
16:43 TimToady (for some nebulous definition of "location" that is not, perhaps, fixed in memory)
16:44 peteretep hrm
16:44 peteretep a.WHICH === b.WHICH implies a == b?
16:44 TimToady a === b
16:45 TimToady a == b is coerced to numeric comparison
16:45 peteretep I am being confused by the docs. .WHICH returns an ObjAt, or returns a coerced value type?
16:45 TimToady which is not useful unless you're dealing with numbers
16:45 TimToady ObjAt is intended to express a non-valuetype object's identity
16:46 peteretep Ah, .WHICH can return whatever it wants. It should use ObjAt for locations though, but can return a different value if it's being used a a value type
16:46 peteretep Got it
16:46 * peteretep goes back to change his flashcard
16:46 TimToady my $fido = Dog.new; my $spot = Dog.new;  $fido !=== $spot
16:47 peteretep If I've defined a .WHICH() for dog that returns constant 5
16:47 peteretep Then does $fido === $spot?
16:47 TimToady yes
16:47 peteretep ok
16:48 peteretep Is ther eany difference between: my Dog $spot; and my Dog $spot = Dog; ?
16:49 TimToady presumably the second is less efficient :)
16:49 jnthn Also
16:49 jnthn nom: class Dog { }; my Dog $spot; $spot = 42
16:49 p6eval nom 1e966b: OUTPUT«Type check failed in assignment to '$spot'; expected 'Dog' but got 'Int'␤  in block <anon> at /tmp/81LH3NJVuP:1␤␤»
16:49 jnthn nom: class Dog { }; my $spot = Dog; $spot = 42
16:49 p6eval nom 1e966b:  ( no output )
16:50 jnthn Only the first puts a type constraint on what the variable can store
16:51 peteretep ah, ok
16:51 peteretep Right, yes, that makes perfect sense
16:51 TimToady so does everything else, except for the bits that don't :)
16:52 peteretep I'm sure I'll get to those bits in time :)
16:52 peteretep I don't suppose there's a nice pretty PDF version of the Specs kicking around is there? Reading it via perldoc is a hassle.
16:54 TimToady http://perlcabal.org/syn/ has html links
16:54 * peteretep skips over thanks
16:54 peteretep gah
16:54 peteretep I mean: thanks
16:55 TimToady in fact, when we say something like S13:135 here, it makes a link in the irc logs to that line in the html file
16:56 TimToady as you can see at http://irclog.perlgeek.de/perl6/2012-02-18#i_5168168
17:10 overrosy joined #perl6
17:12 jnthn > my $x = Int('42'); .say for $x, $x.WHAT
17:12 jnthn 42
17:12 jnthn Int()
17:12 masak \o/
17:14 jnthn Passed spectest so...
17:14 dalek rakudo/nom: 76e282a | jnthn++ | src/Perl6/ (3 files):
17:14 dalek rakudo/nom: Support SomeType(x) falling back to being a coercion call (x.SomeType). If SomeType already overrides postcircumfix:<( )> then we call that directly, just as before.
17:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/76e282a1ba
17:14 masak jnthn++
17:14 jnthn Let's see how this works out.
17:14 jnthn masak: Was there an RT for this?
17:15 masak not to my knowledge.
17:15 masak but my Bloom filter is extra unreliable today.
17:15 jnthn Dang, wanted to add it to testneeded :)
17:15 masak I only add RT for features when people are adamant about the feature.
17:16 jnthn fairy nuff
17:20 * TimToady goes to look for his adamantium stash
17:21 peteretep I do like how this does Unicode properly right from the start
17:22 dalek roast: 85e742b | jnthn++ | S13-type-casting/methods.t:
17:22 dalek roast: Add at least one test for the SomeType(...) coercion syntax; didn't find any existing ones to turn on.
17:22 dalek roast: review: https://github.com/perl6/roast/commit/85e742ba5c
17:23 ab5tract joined #perl6
17:23 jnthn oh what on earth, I did something silly in that patch...
17:23 peteretep perl6: ArabicChars(1).say
17:23 p6eval rakudo 1e966b: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&ArabicChars' called (line 1)␤»
17:23 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&ArabicChars"␤    at /tmp/3DgAe65zpJ line 1, column 1 - line 2, column 1␤»
17:23 p6eval ..niecza v14-43-gc4ecd5c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'ArabicChars' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) â�¤  at …
17:28 peteretep substr( 'Humans welcomed', 3.as(Bytes), 2.as(Bytes) ).say; -- what's wrong with this?
17:28 peteretep I'm getting "Undefined routine &Bytes"
17:28 peteretep https://github.com/perl6/roast/blob/master/S02-types/unicode.t#L29-L48
17:29 TimToady there's no .as anymore; where are you finding that?
17:29 jnthn In a spectest
17:30 peteretep in the URL I posted
17:30 peteretep How should I have written that?
17:31 masak that's a spunky use of '.as' :P
17:31 masak I'm glad we didn't keep that around.
17:33 peteretep "If a StrPos or StrLen is forced into a numeric context, it will assume the units of the current Unicode abstraction level." <-- that abstraction level is stored where? Are we talking about the abstraction level of the operation, of the string itself? of the scope?
17:33 JimmyZ_ joined #perl6
17:33 masak of the scope.
17:33 masak but it's all a bit wishy-washy due to no implementation support.
17:33 noam_ joined #perl6
17:34 benabik_ joined #perl6
17:35 rsimoes11 joined #perl6
17:35 retup-wo1k joined #perl6
17:35 kaare__ joined #perl6
17:35 `patch`_ joined #perl6
17:35 d4l3k_ joined #perl6
17:35 peteretep OK
17:35 peteretep So what's the best-practice here for a substr?
17:36 perimoso1ordiae joined #perl6
17:36 shachaf_ joined #perl6
17:37 colomon_ joined #perl6
17:37 wknight8111 joined #perl6
17:37 doy_ joined #perl6
17:37 moritz joined #perl6
17:37 cooper joined #perl6
17:37 aloha joined #perl6
17:37 szabgab_ joined #perl6
17:37 szbalint_ joined #perl6
17:37 __sri joined #perl6
17:37 skids joined #perl6
17:37 mattp_ joined #perl6
17:37 PerlJam joined #perl6
17:37 raiph joined #perl6
17:37 overrosy joined #perl6
17:37 p6eval joined #perl6
17:37 cooper joined #perl6
17:37 mathw joined #perl6
17:37 Util joined #perl6
17:38 lestrrat joined #perl6
17:38 leprevost joined #perl6
17:38 danishman joined #perl6
17:38 ab5tract joined #perl6
17:38 cotto joined #perl6
17:39 stepnem joined #perl6
17:40 rsimoes joined #perl6
17:43 * jnthn afk for a bit
17:43 peteretep Perl 6 has several ways of performing partial function application
17:43 peteretep A hyphen would help there
17:43 peteretep Because I assume you mean partial function-application
17:43 peteretep Rather than partial-function application
17:44 peteretep Am I right? If so, I'll patch it
17:45 masak I see where you're coming from, but that's not usually written with a hyphen, I think.
17:45 peteretep masak: I was confused about if it was talking about partial functions or not
17:45 peteretep It's not, afaict
17:45 masak what's a partial function?
17:46 peteretep http://en.wikipedia.org/wiki/Partial_function
17:46 benabik A function that is not defined over the entire range of inputs.
17:47 benabik Scala uses them for pattern matching.
17:47 peteretep Sometimes written -+-> instead of --->
17:49 TimToady it's funny that the first line there is: Not to be confused with partial function of a multilinear map.
17:51 masak so, a partial function is just an ordinary function, but someone gave it too large a domain :P
17:52 masak if we're to change the text, I'd prefer to have it as "partial application of functions" instead.
17:52 peteretep Is there any point to my forkign the repo and bunching up little changes?
17:52 peteretep Or is it quicker if I just mention them here?
17:52 TimToady nevertheless, the literature is full of the current phrase
17:53 TimToady without the hyphen
17:53 masak nod
17:53 peteretep Can I change them to what masak said?
17:53 peteretep I cound two instances
17:55 * masak afk for a bit
17:55 * peteretep gives up
17:57 TimToady peteretep: around here, people just change things if they think they're sufficiently non-controversial
17:57 TimToady our phrase is "forgiveness > permission"
17:57 peteretep OK
17:58 TimToady though it works the other way too; you have to forgive someone if they undo your change :)
17:58 peteretep ha
17:58 peteretep { $^x + $^y } ... these are the antecedent and consequent?
17:58 TimToady if I thought the phrase was unclear, I'd probably change it to: what is commonly known as "partial function application"
17:59 TimToady but google does in fact find a whole lot of examples of that phrase, so you should really go out and change wikipedia too :)
17:59 TimToady that what and the what?
17:59 peteretep *shrug* I did a course in Z Notation recently, so my mind is primed to interpret partial functions in a certain way
18:00 TimToady that's just a funny way to write a lambda: -> $x, $y { $x + $y }
18:00 peteretep OK, I was about to say, this Autopriming thing looks a lot like lambda abstractions
18:01 TimToady yes, * + 2 is another way to write -> $x { $x + 2 }
18:01 * peteretep hasn't got to the part describing: -> yet
18:01 TimToady perl6: (0, 1, *+* ... *)[^20].say
18:02 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "[^"␤    at /tmp/N6O3YvAkdM line 1, column 18␤»
18:02 p6eval ..rakudo 76e282, niecza v14-43-gc4ecd5c: OUTPUT«0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181␤»
18:02 peteretep perl6: { * - 1 }.HOW
18:02 p6eval pugs b927740, rakudo 76e282, niecza v14-43-gc4ecd5c:  ( no output )
18:02 peteretep perl6: { * - 1 }.HOW.say
18:02 p6eval rakudo 76e282: OUTPUT«Method 'say' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <anon> at /tmp/bzPl8sL0Oh:1␤␤»
18:02 p6eval ..niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method say in class ClassHOW␤  at /tmp/1eMbiOn_QQ line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3774 (module-CORE @ 65) ␤  at /ho…
18:02 p6eval ..pugs b927740: OUTPUT«<obj:Class>␤»
18:02 TimToady I suspect you want WHAT
18:03 peteretep ok
18:03 TimToady HOW is the metaobject, not the type object
18:03 TimToady nom: (*-1).WHAT.say
18:03 p6eval nom 14c84d: OUTPUT«WhateverCode()␤»
18:04 TimToady note the brackets are not wanted there
18:04 TimToady { *-1 } would be a lambda returning a WhateverCode
18:04 peteretep OK
18:04 peteretep thanks
18:05 TimToady nom: {*-1}.WHAT.say
18:05 p6eval nom 14c84d: OUTPUT«Block()␤»
18:05 TimToady otherwise known as a Block :)
18:05 TimToady nom: {$_-1}.WHAT.say
18:05 p6eval nom 14c84d: OUTPUT«Block()␤»
18:05 peteretep How can I see the parent typs of a type?
18:05 TimToady that, however, is equivalent to -> $_ { $_ - 1 }
18:05 TimToady nom: say Int.^parents
18:06 p6eval nom 14c84d: OUTPUT«Real()␤»
18:06 TimToady nom: say Int.^parents(:all)
18:06 p6eval nom 14c84d: OUTPUT«Real() Cool() Any() Mu()␤»
18:06 peteretep nom: say {*-1}.^parents
18:06 p6eval nom 14c84d: OUTPUT«Code()␤»
18:06 peteretep ok
18:07 fridim_ joined #perl6
18:08 TimToady nom: say Int.^methods
18:08 p6eval nom 14c84d: OUTPUT«Int Num Rat FatRat abs Bridge chr succ pred sqrt base floor round ceiling WHICH perl Bool Str Rat abs sign conj sqrt sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh floor cei…
18:08 TimToady nom: say Str.^methods
18:08 p6eval nom 14c84d: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split␤»
18:08 peteretep This ^ thing ... is giving you the union of climbing up the inheretence chain? Or just the parent?
18:09 peteretep Hrm, or is it returning the prototype
18:09 peteretep The latter makes the most sense
18:09 TimToady $obj.^foo(...) is equivalent to $obj.HOW($obj, ...)
18:09 TimToady it's the metaobject
18:09 peteretep OK
18:09 TimToady which defines whether it's class-based, prototype-based, or whatever
18:09 peteretep Excellent
18:10 TimToady since the invocant is the metaobject, we have to pass the actual object as the first arg
18:11 TimToady .^ is a convenient notation for that
18:11 TimToady nom: say Int.can('sqrt')
18:11 p6eval nom 14c84d: OUTPUT«sqrt sqrt sqrt␤»
18:11 TimToady heh
18:12 peteretep that's odd
18:12 TimToady not if you know why
18:12 peteretep That's surely part of the definition of 'odd' :)
18:12 TimToady nom: say Int.can('sqrt')».sig
18:12 p6eval nom 14c84d: OUTPUT«Method 'sig' not found for invocant of class 'Method'␤  in method dispatch:<hyper> at src/gen/CORE.setting:838␤  in block <anon> at /tmp/pjiARW5uu3:1␤␤»
18:12 TimToady nom: say Int.can('sqrt')».signature
18:12 p6eval nom 14c84d: OUTPUT«:(Int:D , Mu %_!) :(Real , Mu %_!) :(Cool , Mu %_!)␤»
18:13 peteretep Out of interest, what's the recommended Perl 6 reference guide these days?
18:13 peteretep uh, not reference guide
18:13 peteretep learning resource
18:13 benabik I like to use #perl6
18:13 TimToady depends on how you learn
18:14 peteretep Currently using flashcards :-)
18:14 TimToady if you learn by example and by comparison to other languages, rosettacode.org is nice
18:14 TimToady tutorials are more in the department of masak++ and moritz++
18:14 TimToady there's a book in progress
18:15 TimToady various things are mentioned on perl6.org/documentation
18:18 TimToady then there are the advent readings :)
18:18 TimToady those jump around a bit
18:18 peteretep nom: say Real.parents
18:18 p6eval nom 14c84d: OUTPUT«Method 'parents' not found for invocant of class 'Real'␤  in block <anon> at /tmp/AfL4Ll8g1u:1␤␤»
18:18 peteretep nom: say Real.^parents
18:18 p6eval nom 14c84d: OUTPUT«␤»
18:19 benabik .^parents excludes Any?
18:19 * peteretep was indeed trying to get to Any
18:19 TimToady by convention .^methods and .^parents leave out anything Cool or above
18:19 TimToady add :all
18:19 peteretep nom: say Real.^parents:all
18:19 p6eval nom 14c84d: OUTPUT«Method 'parents:all' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in method dispatch:<.^> at src/gen/CORE.setting:796␤  in block <anon> at /tmp/wPlgVW81nB:1␤␤»
18:19 benabik nom: say Real.^parents(:all)
18:19 p6eval nom 14c84d: OUTPUT«Cool() Any() Mu()␤»
18:19 peteretep ah
18:19 TimToady otherwise you get a zillion conversion routines
18:20 peteretep Is :all a symbol like in Ruby?
18:20 TimToady it's a Pair object
18:21 benabik nom: say( (:all).perl )
18:21 p6eval nom 14c84d: OUTPUT«"all" => Bool::True␤»
18:21 peteretep nom: say ( (:foo).perl )
18:21 p6eval nom 14c84d: OUTPUT«"foo" => Bool::True␤»
18:21 TimToady S03:3593
18:22 TimToady which the irclog links to http://perlcabal.org/syn/S03.html#line_3593
18:23 * peteretep is considering skipping the rest of S02 to come back to later
18:23 TimToady er, except I should have said S02:3593
18:24 TimToady which points to http://perlcabal.org/syn/S02.html#Adverbial_Pair_forms
18:24 birdwindupbird joined #perl6
18:25 TimToady it's okay to skim the bits where your eyes glaze over :)
18:26 peteretep I have an irrational fear of reading out of date documentation, and then needing to relearn soething
18:26 TimToady just remember "There's something in there about xyzzy, which I can grep for later."
18:26 [Coke] (spunky), honestly, I'm more offended by all the religious connotations on the specs. If you're worried about "spunky", then you damn well BETTER have google safe search turned on.
18:27 peteretep I get the feeling that particular discussion has already been had, and positions already locked on polarized.
18:27 TimToady peteretep: we've all had to relearn a lot of things :)
18:28 TimToady but usually only for good reasons
18:30 peteretep hrm, +@array ... this is asking for @array in scalar context, or something more fundamental?
18:30 [Coke] peteretep: this is IRC. you're going to have people coming in that see conversations in backscroll and wish to comment on them.
18:30 TimToady numeric context
18:30 peteretep [Coke]: Oh, I meant simply that I think this conversation was had several years ago
18:30 peteretep [Coke]: Not that I'm through discussing it :-)
18:31 TimToady there are several conversations going on right now, and it's not clear which one is the referent
18:31 TimToady if it's 'spunky', then you should know we're a bunch of linguists here, and say the darnedest things all the time
18:32 au nom: <organized spunky religious>.pick(2)
18:32 p6eval nom 14c84d:  ( no output )
18:32 au nom: <organized spunky religious>.pick(2).say
18:32 p6eval nom 14c84d: OUTPUT«organized spunky␤»
18:32 au \o/
18:33 peteretep TimToady: How many different contexts are there? As many as there are types?
18:33 TimToady it's a fractal concept, and lazily applied in Perl 6, unlike in Perl 5
18:34 TimToady so there's some correspondence to the type system, yes
18:35 TimToady but every method call supplies a context in some sense
18:35 TimToady every binding
18:35 peteretep What I think I was getting at is do Type Objects describe how they're coerced in to other types
18:35 TimToady they can
18:35 peteretep And is that essentially what's happening when @array is coerced in to a numeric context?
18:36 TimToady +@array calls @array.Numeric, which is a generic type
18:36 peteretep ah ha!
18:36 peteretep right
18:37 peteretep Do all operators have a Generic type they apply to their operands?
18:37 TimToady many of them do
18:37 TimToady for a lot of them, it's Cool
18:37 * peteretep hasn't gotten to Cool yet
18:38 TimToady S02:1294 and S02:1874
18:38 peteretep Is there a simple answer to: what's the difference between: @array[] and @array[*]?
18:39 TimToady nom: say @array[].WHAT
18:39 p6eval nom 14c84d: OUTPUT«===SORRY!===␤Variable @array is not declared␤at /tmp/AHpHd7uxjO:1␤»
18:39 TimToady nom: my @array; say @array[].WHAT
18:39 p6eval nom 14c84d: OUTPUT«Array()␤»
18:39 TimToady nom: my @array; say @array[*].WHAT
18:39 p6eval nom 14c84d: OUTPUT«Parcel()␤»
18:39 TimToady is that simple enough?
18:39 peteretep Yes. I'll remember to keep an eye out for Parcel
18:39 TimToady a Parcel is a list that has not yet had a context applied to it, basically
18:40 peteretep Oh. OK, that makes sense on the other side too then
18:40 peteretep Uh, intuitive sense, I mean
18:40 TimToady the Zen slice, .[], is really a kind of no-op, though it has a parsing effect inside strings
18:41 TimToady it's a 0-dimensional slice, so it just returns the Array
18:41 TimToady whereas .[*] is a 1-dimensional slice
18:41 TimToady so returns the toplevel
18:41 peteretep ok
18:42 TimToady perl6: my @array = <a b c>; say "peteretep@array.com"
18:42 p6eval pugs b927740, rakudo 14c84d, niecza v14-43-gc4ecd5c: OUTPUT«peteretep@array.com␤»
18:42 TimToady perl6: my @array = <a b c>; say "peteretep@array[].com"
18:42 p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: No value for parameter 'index' in 'postcircumfix:<[ ]>'␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (postcircumfix:<[ ]> @ 1) ␤  at /tmp/_3xmlwped8 line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @…
18:42 p6eval ..pugs b927740, rakudo 14c84d: OUTPUT«peteretepa b c.com␤»
18:42 TimToady niecza doesn't do Zen slice yet
18:43 peteretep ok
18:43 TimToady .[] is also a contextualizer, like @
18:43 TimToady just postfix
18:43 TimToady supposed to be a contextualizer, but maybe nyi
18:43 TimToady (not yet implemented)
18:44 peteretep When you say .[], is that distinct from []?
18:44 peteretep I hear [] and {} are just methods
18:45 TimToady any postfix may be expressed with or without the dot, so we often include the dot to distinguish postfixes from circumfixes
18:45 * peteretep googles circumfix
18:46 peteretep Can you give me an example where you might confuse a circumfix with a postfix, and hence use the dot?
18:46 TimToady well, I could have been talking about [1,2,3] the array composer, or {...} a block
18:47 peteretep oh, ok
18:47 peteretep of course, sorry
18:47 TimToady the . is a meta-notation for use in discussion, though it also works in code
18:47 benabik joined #perl6
18:47 TimToady perl6: my @array = <a b c>; say @array.[1]
18:47 p6eval pugs b927740, rakudo 14c84d, niecza v14-43-gc4ecd5c: OUTPUT«b␤»
18:47 GlitchMr joined #perl6
18:47 TimToady perl6: my $x = 'a'; say $x++; say $x.++
18:48 p6eval rakudo 14c84d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&postfix:<.>' called (line 1)␤»
18:48 p6eval ..pugs b927740, niecza v14-43-gc4ecd5c: OUTPUT«a␤b␤»
18:48 TimToady ooh, rakudo parsefail
18:48 TimToady well, parseflub
18:48 Trashlord joined #perl6
18:49 TimToady the only place where the . is not optional is on normal method calls
18:49 TimToady perl6: say 4i; say 4.i
18:49 p6eval pugs b927740: OUTPUT«0 + 4i␤*** No such method in class Int: "&i"␤    at /tmp/D4wJI2wa7v line 1, column 13 - line 2, column 1␤»
18:49 p6eval ..niecza v14-43-gc4ecd5c: OUTPUT«0+4i␤Unhandled exception: Unable to resolve method i in class Int␤  at /tmp/hNF3nfnRwh line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3774 (module-CORE @ 65) ␤  at /home…
18:49 p6eval ..rakudo 14c84d: OUTPUT«0+4i␤Method 'i' not found for invocant of class 'Int'␤  in block <anon> at /tmp/bd4P0BDH_z:1␤␤»
18:50 TimToady going the other way, you can't use .i to mean the i postfix
18:51 TimToady nom: my $x = 4; say ($x).i; say $x\i;  # these work though
18:51 p6eval nom 14c84d: OUTPUT«Method 'i' not found for invocant of class 'Int'␤  in block <anon> at /tmp/yE3jwxpTx8:1␤␤»
18:51 TimToady niecza: my $x = 4; say ($x).i; say $x\i;  # these work though
18:51 p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Unable to resolve method i in class Int␤  at /tmp/WVllhreXIg line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3774 (module-CORE @ 65) ␤  at /home/p6ev…
18:51 TimToady duh
18:51 TimToady niecza: my $x = 4; say ($x)i; say $x\i;  # these work though
18:51 p6eval niecza v14-43-gc4ecd5c: OUTPUT«0+4i␤0+4i␤»
18:51 TimToady nom: my $x = 4; say ($x)i; say $x\i;  # these work though
18:51 p6eval nom 14c84d: OUTPUT«0+4i␤0+4i␤»
18:52 huf what makes one postfix work as a method and another not?
18:52 TimToady a postfix starting with alpha like 'i' is what distinguishes it
18:53 huf ah
18:53 TimToady .++ and ++ mean the same, but .i and i don't
18:53 peteretep OK, I think I am now done for the day
18:53 peteretep Thanks for the advice
18:53 TimToady shore
18:57 [Coke] au, masak: new Test.pm doesn't like fudge.
18:57 [Coke] t/spec/S05-modifier/perl5_8.t
18:57 [Coke] *** No compatible multi variant found: "&todo" at t/spec/S05-modifier/perl5_8.pugs line 75, column 1-24
18:58 noam_ joined #perl6
18:58 [Coke] and that line is:
18:58 [Coke] #?pugs todo "pugs regression"
18:58 [Coke] todo("pugs regression"); ok(("bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ~~ rx:P5/.X(.+)+X/), 're_tests 1115  (1319)');
18:58 [Coke] (the actual call to todo())
19:00 au [Coke]: interesting. checking
19:01 [Coke] I have a change in progress to t/fudgeandrun that sets the PUGS_USE_EXTERNAL_TEST, and then uses ./Pugs/pugs to run the test, after fudging.
19:02 [Coke] er, thought I did. might be missing the PUGS_USE...
19:03 [Coke] (I was, but nope, dies same way)
19:06 au $ ./pugs -Iext/Test/lib -MTest -e 'todo("pugs regression");'
19:06 au ok 1 - 2 # TODO pugs regression by Christmas
19:06 au # Looks like you planned  tests, but ran 1
19:07 au er, that was 'todo("pugs regression"); ok(1,2)'
19:07 au so seems to work for me
19:08 au ./pugs -Iext/Test/lib /home/coke/sandbox/Pugs.hs/t/spec/S05-modifier/perl5_8.pugs
19:08 au ok 103 - re_tests 1214  (1418)
19:08 au # FUDGED!
19:08 au seems to wfm too.
19:08 au (PWD is /home/audreyt/Pugs.hs/Pugs, PUGS_USE_EXTERNAL_TEST is set to 1)
19:08 au (on feather)
19:09 * [Coke] adds the -I.
19:09 au maybe try adjusting the -I flag?
19:09 [Coke] heh. ;)
19:09 au :)
19:10 [Coke] aye, that's it.
19:11 [Coke] au++, sorry I know that was in the examples yesterday.
19:13 au np at all.
19:16 karamorf joined #perl6
19:18 karamorf I can't seem to figure out what the equivelent is for [^/] is in regex for perl6, anyone know?
19:18 moritz <-[/]>
19:18 karamorf thanks
19:21 [Coke] sweet, with "done", we automatically get several more test files.
19:23 TimToady karamorf: though if it's a single character, ^ '/' is probably more readable
19:23 TimToady oh wait
19:23 TimToady that's a negation, nevermind
19:23 * [Coke] is glad to see even TimToady has brainos. ;)
19:23 TimToady for some reason I read it as ^[/]
19:24 TimToady either that, or I read the [] as p6 brackets :)
19:27 * [Coke] waits for the p5->p6 regex translator.
19:28 TimToady finishing the STD_P5 parser is another of those things I have to do first next...
19:29 TimToady but it keeps turning into one of those things I have to do first later...
19:29 TimToady in the fwiw department, the P5 regex parsing is in the best shape
19:31 TimToady std: m:P5/foo\d/
19:31 p6eval std 52f3895: OUTPUT«ok 00:01 120m␤»
19:32 TimToady hmm, though I see it's not parsing [a-z] correctly...
19:39 raiph riddle me this: if the answer is metadsl, what's the domain, what's the language, and does it work?
19:42 raiph Perl 6 is a snaklab. (The Balkans is a region of many small countries, where many language families meet. The individual countries fight a lot and they're poor. Perl 6 turns this around, integrating the best from many language families into a rich and happy unity.)
19:48 thou joined #perl6
19:50 TimToady well, Perl 6 is *a* metadsl, and bits of it work
19:51 raiph what about domain = marketing,  lang = techspeak; does it work?
19:51 moritz meta marketing? that sounds scary :-)
19:54 moritz jnthn: I found out why 'use Test;' fails so spectacularly
19:54 moritz jnthn: sink annotations aren't done in routines, thus also not in EXPORT_SYMBOL
19:55 sorear good * #perl6
19:55 moritz \o sorear
19:56 raiph o/ sorear
20:06 fridim_ joined #perl6
20:11 dalek Pugs.hs: e908a6b | coke++ | / (3 files):
20:11 dalek Pugs.hs: update spec test/dirs for updated Test.pm
20:11 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/e908a6b276
20:11 dalek Pugs.hs: 7b09c64 | coke++ | t/spectest.data:
20:11 dalek Pugs.hs: run more tests (now that we have "done")
20:11 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/7b09c64036
20:14 pmurias joined #perl6
20:14 pmurias sorear: hi
20:14 pmurias sorear: i found out what's responsible for the unit_ magic, what i'm now trying to figure out is how to add lexicals (the stuff imported from the p5 module)
20:15 dalek roast: 1faa488 | moritz++ | .gitignore:
20:15 dalek roast: .gitignore *.pugs
20:15 dalek roast: review: https://github.com/perl6/roast/commit/1faa488087
20:15 pmurias and i don't know what the second argument to add_common_name is supposed to be
20:19 pmurias that now seems to be the wrong method
20:25 [Coke] masak: *** No such subroutine: "&nok"
20:27 moritz should be easy enough to add to Test.pm
20:31 pmurias do we really need nok
20:31 moritz no, but it's nice to have
20:31 moritz in theory it would be enough to have just one test function, &ok
20:32 retupmoca joined #perl6
20:32 moritz but it's nice to provide some convenience to the test writers
20:32 sorear pmurias: add_common_name($lexical_name, $package, $in_package_name)
20:32 pmurias sorear: what does that do?
20:33 pmurias sorear: to add a sub i should use add_my_sub?
20:34 localhost joined #perl6
20:35 * moritz blug: http://perlgeek.de/blog-en/perl-6/prisoners-dilemma-results.html
20:41 sorear pmurias: add_common_name is the business end of "our" declarations
20:41 sorear $sub.add_common_name('$foo', $sub.cur_pkg, '$foo') is like 'our $foo'
20:42 pmurias sorear: thanks
20:49 pmurias sorear: add_my_sub for adding empty stubs works
20:51 moritz oh, it seems that the main code of a routine appears as the argument to .clone() call
20:51 moritz (at rakudo's PAST level, that is)
20:51 moritz and that's why Perl6::Sinker doesn't find it
21:06 simcop2387_ joined #perl6
21:06 pothos_ joined #perl6
21:08 peterete1 joined #perl6
21:08 ocharles- joined #perl6
21:09 Yappoko____ joined #perl6
21:09 robins joined #perl6
21:10 fsergot joined #perl6
21:10 pothos joined #perl6
21:12 fsergot o/
21:13 pothos joined #perl6
21:15 sorear o/ fsergot
21:16 pothos joined #perl6
21:19 pothos joined #perl6
21:25 sorear colomon: I beleive that I have kept features up to date wrt niecza
21:28 colomon sorear: I don't have the page open at the moment, but we've got the Set, KeySet, KeyBag entry mostly covered (as an example)
21:28 colomon and didn't you do ObjAt from WHICH?
21:29 colomon and we've got more than regex protos now
21:29 sorear no, we still only have regex protos.
21:29 sorear perl6: proto foo() { say "here" }; multi foo() { 5 }; foo;
21:29 p6eval pugs b927740, niecza v14-43-gc4ecd5c: OUTPUT«here␤»
21:29 p6eval ..rakudo 14c84d:  ( no output )
21:29 * sorear blinks
21:30 sorear "who implemented that?"
21:30 sorear perl6: proto foo() { say "here"; {*} }; multi foo() { 5 }; say foo;
21:30 p6eval niecza v14-43-gc4ecd5c: OUTPUT«here␤Whatever.new(...)␤»
21:30 p6eval ..pugs b927740: OUTPUT«here␤Inf␤»
21:30 p6eval ..rakudo 14c84d: OUTPUT«===SORRY!===␤{*} may only appear in proto at line 1, near " }; multi "␤»
21:31 colomon sure wasn't me.  I thought you did?
21:31 sorear ok, protos are still insufficiently implemented to be useful for anything
21:31 sorear so I say still "-"
21:31 sorear I haven't been tracking KeySet well enough to know what to put - colomon, do you know how to update features?
21:32 colomon no
21:32 sorear check out git://github.com/perl6/features
21:32 sorear go in features.json
21:33 sorear try line 448, "n-" becomes "n+-" or whatever
21:33 sorear niecza doesn't have object hashes so n+ is definitely wrong
21:33 colomon okay, I'll take a look at that tonight.  (working on cooking nom now)
21:34 colomon might take a look at implementing qx as well, any hints where to hook that in?
21:34 tarch joined #perl6
21:35 sorear the compiler hook is already in place
21:35 sorear niecza: say qx/ls/
21:35 p6eval niecza v14-43-gc4ecd5c: OUTPUT«Unhandled exception: Run NYI␤  at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3183 (rungather @ 3) ␤  at /tmp/Zgp4E24gpd line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3773…
21:35 sorear I'm not sure what the return type of rungather is
21:36 sorear and you'll have to fight the braindamaged process-start interface of mono
21:36 colomon right, but I think the internals of the shell command I already added are probably enough to brute-force qx
21:37 colomon okay, found rungather in the source.  danke!
21:38 sorear Mono.Posix seems to lack popen()
21:41 doy_ windows in general lacks popen(), cygwin has to go to ridiculous (gross) lengths to emulate it (if i remember correctly)
21:43 masak does anyone remember a blog post by moritz asking (and answering) the question "what happens when Rakudo hits 100% spectest coverage?"
21:43 au would Process.Start not work?
21:45 dalek roast: 4e26707 | coke++ | S05-mass/properties-general.t:
21:45 dalek roast: pugs fudge
21:45 dalek roast: review: https://github.com/perl6/roast/commit/4e26707be6
21:45 dalek Pugs.hs: fac101c | coke++ | t/spectest.data:
21:45 dalek Pugs.hs: run another fudged test
21:45 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/fac101ce58
21:46 noam_ joined #perl6
21:46 sorear au: Process.Start is (not suprisingly) closely based on the CreateProcess api
21:47 [Coke] "pugs",      1718,     1,   389,     9,  2117, 22754
21:47 sorear au: which kind of sucks on Unix because there's no way to pass a pre-parsed @*ARGS, the command tail *has* to be passed as a single string
21:48 au yeah, one'd need a String::ShellQuote equivalent.
21:48 sorear colomon: insane idea of the day: use GLib.Process.SpawnSync if available.  It takes string[] argv and string[] envp
21:49 sorear doy: what does cmd.exe use for pipe redirections?  is it still based on temp files like DOS 2 COMMAND.COM used?
21:49 colomon sorear: I will take a look at that?
21:49 colomon s/that?/that/
21:50 sorear doy: wait, nevermind, got popen mixed up with the passing-pipe-HANDLEs-to-CreateProcess facility
21:50 [Coke] b: print 1718+280
21:50 p6eval b 1b7dd1: OUTPUT«1998»
21:58 MayDaniel joined #perl6
22:00 masak [Coke]++
22:01 sftp joined #perl6
22:04 [Coke] IWBNI autounfudge's --jobs worked on a single file.
22:06 colomon IWBNI?
22:08 [Coke] it would be nice if
22:11 countley joined #perl6
22:16 ribayr joined #perl6
22:31 shachaf joined #perl6
22:34 raiph masak: http://perlgeek.de/blog-en/perl-6/when-we-reach-100-percent-we-did-something-wrong.html
22:45 masak raiph: thank you.
22:57 x3nU haven't been around for a while
22:57 x3nU so
22:57 x3nU pugs is now alive?
22:57 sorear yes
22:57 sorear and so is au
22:57 x3nU great news :)
22:57 sorear well, I guess au was always alive, but ey came back to #perl6
23:00 sorear o/ masak, x3nU
23:01 x3nU \o
23:01 x3nU where latest pugs source can be found?
23:01 x3nU github repo seems to be seriously out of date
23:08 geekosaur these days it's a proper package on haskell's hackage:  http://hackage.haskell.org/package/Pugs
23:08 geekosaur if there's a repo it'll be shown in the package details
23:11 bkolera joined #perl6
23:14 masak x3nU! \o/
23:15 masak x3nU: http://github.com/perl6/Pugs.hs
23:23 snearch joined #perl6
23:31 x3nU thanks :)
23:31 x3nU and good night everyone o/
23:37 masak \o
23:53 jferrero joined #perl6

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

Perl 6 | Reference Documentation | Rakudo