Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-04

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:02 woolfy joined #perl6
00:04 woolfy joined #perl6
00:15 BenGoldberg joined #perl6
00:31 dayangkun joined #perl6
00:35 japhb timotimo: Oddly, when you start doing "interesting" stuff like simulating particular clients, HTTP headers are effectively ordered.  Mind you, maybe that just means an ordered hash ....
00:36 hoverboard joined #perl6
00:52 jack_rabbit joined #perl6
01:36 FROGGS_ joined #perl6
01:39 Su-Shee joined #perl6
01:48 btyler joined #perl6
01:48 klapperl joined #perl6
02:01 chenryn joined #perl6
02:26 araujo joined #perl6
02:37 xragnar_ joined #perl6
02:44 hoverboard joined #perl6
02:48 kaare_ joined #perl6
02:54 treehug88 joined #perl6
02:56 treehug88 joined #perl6
03:01 thou joined #perl6
03:18 BenGoldberg joined #perl6
03:20 SamuraiJack joined #perl6
03:30 rindolf joined #perl6
03:36 Alula joined #perl6
03:42 jack_rabbit joined #perl6
03:53 dayangkun joined #perl6
03:53 dayangkun joined #perl6
04:13 anaeem1 joined #perl6
04:15 kaare_ joined #perl6
04:37 anaeem1_ joined #perl6
04:48 uniejo joined #perl6
05:01 pdcawley joined #perl6
05:02 rindolf joined #perl6
05:17 bjz joined #perl6
05:27 kaleem joined #perl6
05:32 Alina-malina joined #perl6
05:37 xinming_ joined #perl6
06:02 dalek mu: a5b3848 | 唐鳳++ | docs/feather/index.html:
06:02 dalek mu: Redirect par.perl.org to par.wikia.com
06:02 dalek mu: review: https://github.com/perl6/mu/commit/a5b38489bc
06:08 TimToady http://rosettacode.org/wiki/F​ibonacci_word/fractal#Perl_6  <-- braille graphics strikes again
06:12 TimToady actually, there's no reason to track x and y separately...
06:13 TimToady updating
06:15 TimToady okay, now just uses complex addition to move on the complex plane
06:15 TimToady I suppose I might have my left and right turns backwards, but it doesn't matter for this problem
06:17 sergot morning o/
06:18 sergot timotimo: sounds good, thank you, I'll think it over. :)
06:24 TimToady changed picture to do the 17x3 fractal instead, which seems a bit prettier
06:24 denis_boyun_ joined #perl6
06:32 rurban joined #perl6
06:33 bjz joined #perl6
06:34 rurban1 joined #perl6
06:36 TimToady should probably put braille-graphics into a module one of these years
06:38 TimToady makes it easy to sneak graphics onto RC despite the image upload ban
06:40 jack_rabbit joined #perl6
06:45 woolfy left #perl6
06:50 bjz joined #perl6
06:52 darutoko joined #perl6
06:58 FROGGS joined #perl6
07:03 jack_rabbit joined #perl6
07:03 bjz joined #perl6
07:07 zakharyas joined #perl6
07:07 Ven joined #perl6
07:20 igorsutton joined #perl6
07:30 rindolf joined #perl6
07:38 moritz m: my $p = Proxy.new(FETCH => { 42 }, STORE => -> $, $value { say 2 * $value }); $p = 8; say $p
07:38 camelia rakudo-moar a8798f: OUTPUT«8␤»
07:38 moritz m: my $p := Proxy.new(FETCH => { 42 }, STORE => -> $, $value { say 2 * $value }); $p = 8; say $p
07:38 camelia rakudo-moar a8798f: OUTPUT«16␤42␤»
07:41 lizmat some more sightseeing&
07:50 igorsutton joined #perl6
08:03 dmol joined #perl6
08:05 jnthn morning o/
08:16 moritz \o
08:18 FROGGS o/
08:20 nwc10 good *, *
08:20 dalek Perlito: ae7547e | (Flavio S. Glock)++ | src5/lib/Perlito5/Javascript2/Emitter.pm:
08:20 dalek Perlito: Perlito5 - js - code cleanup
08:20 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/ae7547e43b
08:20 nwc10 p5-to-p6: print "Hi\n"
08:20 camelia p5-to-p6 : OUTPUT«print('Hi' ~ chr(10))␤»
08:20 nwc10 p5-to-p6: ******
08:20 camelia p5-to-p6 : OUTPUT«Syntax Error near 0 at perlito5.pl line 14105.␤»
08:21 nwc10 oh noes. the right answer is 1
08:22 jnthn m: ****** # :)
08:22 camelia rakudo-moar a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NmuZSqccgO�HyperWhatever (**) not yet implemented. Sorry. �at /tmp/NmuZSqccgO:1�------> [32m**[33m�[31m**** # :)[0m�»
08:22 nwc10 m: 0 ** 0
08:22 camelia rakudo-moar a8798f: ( no output )
08:22 nwc10 m: say 0 ** 0
08:22 camelia rakudo-moar a8798f: OUTPUT«1␤»
08:23 nwc10 OK, so that part works
08:23 nwc10 but Perl 6 doesn't have typeglobs
08:23 nwc10 and doesn't have a special variable *
08:23 jnthn m: * * * * *
08:23 camelia rakudo-moar a8798f: ( no output )
08:23 jnthn ;)
08:23 nwc10 and doesn't treat typeglobs as numeric 0
08:23 nwc10 so the other bits of sick don't work
08:23 jnthn m: say (* * * * *)(2, 3, 7)
08:23 camelia rakudo-moar a8798f: OUTPUT«42␤»
08:24 nwc10 m: say (* * * * *)(2, 3, 7).WHY
08:24 camelia rakudo-moar a8798f: OUTPUT«Life, the Universe and Everything␤»
08:24 nwc10 :-)
08:27 bjz joined #perl6
08:32 dayangkun joined #perl6
08:36 rurban joined #perl6
08:48 integral joined #perl6
08:48 integral joined #perl6
08:49 lue joined #perl6
08:49 [Sno] joined #perl6
08:49 pdcawley joined #perl6
08:49 salv0 joined #perl6
08:49 woosley joined #perl6
08:51 dakkar joined #perl6
08:52 tadzik whhhaht
08:52 cognominal joined #perl6
08:57 sivoais joined #perl6
09:00 fhelmberger joined #perl6
09:06 donaldh joined #perl6
09:14 spider-mario joined #perl6
09:15 anaeem___ joined #perl6
09:18 telex joined #perl6
09:20 sqirrel joined #perl6
09:32 rurban joined #perl6
09:47 klapperl joined #perl6
10:03 denis_boyun_ joined #perl6
10:14 Bhavik joined #perl6
10:25 bjz joined #perl6
10:31 jnthn Thw Swiss Perl Workshop has room for small workshop-y things: http://blogs.perl.org/users/swiss_perl_worksh​op/2014/06/swiss-perl-workshop-has-room.html
10:31 donaldh joined #perl6
10:32 jnthn If there's any interest, I could do a (probably fairly informal) half-day course on something. Perl 6 concurrency is one option.
10:33 rurban joined #perl6
10:35 dmol joined #perl6
10:35 cognominal__ joined #perl6
10:55 Ulti in a sub signature can I specify a junction of types?
10:55 cognominal__ joined #perl6
10:56 Ulti do I do it in the where ?  where $.WHAT any ((Type1)|(Type2))
10:58 jnthn r: sub foo($a where Int | Str) { say $a }; foo(1); foo("2"); foo(3.3)
10:58 camelia rakudo-jvm a8798f: OUTPUT«(timeout)»
10:58 camelia ..rakudo-{parrot,moar} a8798f: OUTPUT«1␤2␤Constraint type check failed for parameter '$a'␤  in sub foo at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
11:00 Ulti k k thanks
11:00 kurahaupo joined #perl6
11:02 nwc10 I think that http://venturebeat.com/2014/06/03/a-progr​ammers-view-of-apples-new-swift-language/ misses a trick:
11:02 nwc10 Objective-C is great and really powerful. It has served Apple well for a really long time. It’s older than the web though. It is ...
11:02 nwc10 where's the bit about "the web was first created using software written in Objective C"
11:02 pecastro joined #perl6
11:02 nwc10 they also missed running the spell checker over that article
11:03 nwc10 maybe I should consider that when judging its value
11:03 Ulti that is quite nice since I have different dispatch for loads of other stats functions higher order ones now can take either Baggy or Positional since the correct version of more basic functions know how to deal with the types :)
11:24 pdcawley joined #perl6
11:30 virtualsue joined #perl6
11:33 rurban joined #perl6
11:36 rurban1 joined #perl6
11:50 cognominal__ joined #perl6
11:50 Ven joined #perl6
12:00 FROGGS joined #perl6
12:05 brrt joined #perl6
12:22 brrt left #perl6
12:35 guru joined #perl6
12:37 rurban joined #perl6
12:41 brrt joined #perl6
12:42 jnap joined #perl6
12:52 [particle] joined #perl6
12:55 [particle]1 joined #perl6
13:31 skids joined #perl6
13:32 anaeem1_ joined #perl6
13:33 kaare_ joined #perl6
13:34 btyler joined #perl6
13:38 rurban joined #perl6
13:40 rindolf joined #perl6
13:44 rurban joined #perl6
13:49 prevost joined #perl6
14:05 zengargoyle joined #perl6
14:05 dayangkun joined #perl6
14:06 thou joined #perl6
14:08 treehug88 joined #perl6
14:11 robinsmidsrod joined #perl6
14:26 SamuraiJack_ joined #perl6
14:28 jsn_ joined #perl6
14:34 bluescreen10 joined #perl6
14:36 bluescreen100 joined #perl6
14:37 dalek rakudo-star-daily: 41b620c | coke++ | log/ (13 files):
14:37 dalek rakudo-star-daily: today (automated commit)
14:37 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/41b620c6a2
14:42 dalek rakudo-star-daily: 13151ca | (Will Coleda)++ | README.md:
14:42 dalek rakudo-star-daily: Create README.md
14:42 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/13151ca39f
14:42 pdcawley joined #perl6
14:51 anaeem1_ joined #perl6
15:13 hoverboard joined #perl6
15:14 guru joined #perl6
15:16 FROGGS m: my $*PID; $*PID := 1
15:16 camelia rakudo-moar a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/27ZxWVlzBdâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/27ZxWVlzBd:1â�¤------> [32mmy $*PID; $*PID := 1[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
15:17 dalek rakudo/nom: 609fb8f | (Tobias Leich)++ | src/Perl6/Actions.nqp:
15:17 dalek rakudo/nom: allow to bind to dynamic variables
15:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/609fb8f56d
15:22 FROGGS perl6-m -I. -MCOBOL -e1
15:22 FROGGS ===SORRY!===
15:22 FROGGS P6opaque: no such attribute '$!from'
15:23 Rotwang joined #perl6
15:23 FROGGS so, if we could solve this, perhaps by marshalling NQPCursor to Cursor and vice versa, we finally would have Perl 6 level slangs (and a panda installable v5)
15:24 FROGGS is marshalling the right word here?
15:25 FROGGS jnthn: it would be cool if you could tell me your ideas about that, maybe I can work something out?
15:30 timotimo FROGGS: maybe that's kind of like a "hllize" operation?
15:31 FROGGS yeah, I think so
15:32 mr-foobar joined #perl6
15:34 timotimo i'm not actually sure if the hllize mechanism is limited to stuff like strings, integers, nums, arrays, hashes
15:35 timotimo or if you can just add a mapping that turns an NQPCursor to a Cursor when you hllize it
15:35 Kyote_ joined #perl6
15:36 Kyote_ hello
15:36 JimmyZ hi
15:36 timotimo hello there
15:37 FROGGS timotimo: it is capable of hllizing int/num/str/array/hash and code
15:37 masak good afternoon, #perl6
15:37 FROGGS masak: hi
15:37 FROGGS hi Kyote_
15:38 bjz joined #perl6
15:39 timotimo there *is* a "hll_sym_get" thing that could store NQPCursor and Cursor for the given hll i suppose
15:39 timotimo though i don't see a place where those syms are stored
15:40 timotimo oh, huh, the hll_syms is actually on the instance
15:40 timotimo ah, wrong again. the hll_syms is a hash of hashes
15:41 FROGGS I'd thought the hll syms are about the current high level languages
15:41 FROGGS so a hll_sym would be 'perl6' vor example
15:42 timotimo it seems like there's a whole symbol table for hlls
15:49 zengargoyle left #perl6
15:51 jnthn FROGGS: Where exactly does the error come from?
15:52 FROGGS jnthn: when calling the foreign statementlist: https://gist.github.com/FROGGS/100​079bd927d239e8ab2#file-example-p6
15:52 zengargoyle joined #perl6
15:52 FROGGS so it happens when making the call to $cursor."statementlist"() in method LANG
15:53 FROGGS really when making the call, not when processing the return value
15:53 FROGGS maybe it even happens within the call... I'm not sure there
15:53 jnthn I guess it'd have to be within the call, but that doesn't immediately make a lot of sense...
15:54 FROGGS I added a <!!{ say("in COBOLs statementlist") }> to the statementlist token, and I don't see the output
15:56 FROGGS jnthn: btw, when I turn the token into a method, it calls the method, I get the bootint (1), and it returns to method LANG
15:56 FROGGS and then it ends up as P6opaque: invalid native access to object attribute
15:57 FROGGS ahh, that last error message is about trying to access an attribute from the return value of say()
15:58 jnthn I can see why we might fail to process the return value of LANG.
15:58 jnthn But not why we might fail to call the rule in the other langauge.
15:59 FROGGS yeah, I kinda get further by returning an NQPCursor from my statementlist method
15:59 FROGGS but yeah, why does the call fail...
16:00 FROGGS I guess the called token wants to access $!from already and fails
16:00 TimToady r: say (1, 1, *+* ... *)[^10]
16:00 camelia rakudo-{parrot,jvm,moar} a8798f: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
16:01 carlin joined #perl6
16:02 TimToady r: say (1, 1, * R+ * ... *)[^10]
16:02 FROGGS linenoise, all the way down :o)
16:02 camelia rakudo-moar a8798f: OUTPUT«===SORRY!===␤Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤»
16:02 camelia ..rakudo-parrot a8798f: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1222␤  in method Numeric at gen/parrot/CORE.setting:1034␤  in sub infix:<+> at gen/parrot/CORE.setting:4249␤  in sub infix:<+> at gen/p…»
16:02 camelia ..rakudo-jvm a8798f: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1215␤  in sub infix:<+> at gen/jvm/CORE.setting:4245␤  in block  at gen/jvm/CORE.setting:17315␤  in block  at /tmp/tmpfile:1␤␤»
16:02 carlin Hi
16:02 FROGGS hi carlin
16:02 carlin I made a simple bcrypt interface for perl6 using NativeCall
16:02 carlin https://github.com/carbin/p6-Crypt-BCrypt
16:02 TimToady n: say (1, 1, * R+ * ... *)[^10]
16:02 camelia niecza v24-109-g48a8de3: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
16:03 colomon woah, why doesn't that work in Rakudo?
16:03 FROGGS jnthn: I guess it calls something in QRegex... starting with method !protoregex
16:03 colomon TimToady: is that why you didn't use * R~ * in the fib palindrome script?
16:04 TimToady n: say (1, 0, { $^b ~ $^a } ... *)[^10]
16:04 FROGGS calls something in QRegex that tries to access $!from*
16:04 camelia niecza v24-109-g48a8de3: OUTPUT«1 0 01 010 01001 01001010 0100101001001 010010100100101001010 0100101001001010010100100101001001 01001010010010100101001001010​01001010010100100101001010␤»
16:04 timotimo carlin: do you know of the LibraryMake module?
16:04 btyler carlin: cool!
16:04 TimToady p6: say (1, 0, R~ ... *)[^10]
16:04 TimToady oops
16:04 camelia rakudo-{parrot,jvm,moar} a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared name:â�¤    R used at line 1â�¤â�¤Â»
16:04 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤       'R' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @…»
16:04 colomon TimToady: come to think of it, is the order of arguments on *~ * defined?
16:04 TimToady p6: say (1, 0, * R~ * ... *)[^10]
16:04 camelia rakudo-moar a8798f: OUTPUT«1 0 Whatever<140632640989856>0 Whatever<140632640999808>W​hatever<140632640989856>0 Whatever<140632641005888>Whatever<1406​32640999808>Whatever<140632640989856>0 Whatever<140632641011560>Whatever<140632641005888​>Whatever<140632640999808>Whatever<140632640989…»
16:04 camelia ..rakudo-jvm a8798f: OUTPUT«1 0 Whatever<775261730>0 Whatever<1040609761>Whatever<775261730>0 Whatever<421431959>Whatever<10​40609761>Whatever<775261730>0 Whatever<605867107>Whatever<421431959>W​hatever<1040609761>Whatever<775261730>0 Whatever<1588496922>Whateve​r<605867107>Whatever<4214…»
16:04 camelia ..niecza v24-109-g48a8de3: OUTPUT«1 0 01 010 01001 01001010 0100101001001 010010100100101001010 0100101001001010010100100101001001 01001010010010100101001001010​01001010010100100101001010␤»
16:04 carlin timotimo: no I don't
16:04 timotimo should that be &[R~] perhaps?
16:04 camelia ..rakudo-parrot a8798f: OUTPUT«1 0 Whatever<8984232829931442042>0 Whatever<8984232829939462246>W​hatever<8984232829931442042>0 Whatever<8984232829930390376>Whatever<898423​2829939462246>Whatever<8984232829931442042>0 Whatever<8984232829938245729>Whateve​r<8984232829930390376>Whatever<898…»
16:04 FROGGS carlin++
16:05 timotimo carlin: it could make your makefile obsolete and also compatible with parrot and jvm backends ... perhaps
16:05 colomon carlin++
16:06 carlin timotimo: thanks, I'll look into it
16:06 TimToady p6: say (* R~ *)('bar','foo')
16:06 camelia niecza v24-109-g48a8de3: OUTPUT«foobar␤»
16:06 camelia ..rakudo-{parrot,jvm,moar} a8798f: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in block  at /tmp/tmpfile:1␤␤»
16:06 denis_boyun_ joined #perl6
16:07 TimToady eh?
16:07 colomon p6: say (* ~ *)('bar','foo')
16:08 camelia rakudo-{parrot,jvm,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«barfoo␤»
16:08 TimToady R screws up the argcount somehow
16:08 colomon p6: say "bar" R~ "foo"
16:08 camelia rakudo-{parrot,jvm,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«foobar␤»
16:08 TimToady at least, in conjunction with *
16:10 TimToady or R isn't sufficiently transparent to WhateverCode transformation
16:10 TimToady p6: say (* R.. 1)(10)
16:11 camelia rakudo-{parrot,jvm,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«1..10␤»
16:11 TimToady interesting
16:11 FROGGS what... Cursor already does the NQPCursorRole
16:11 TimToady arguably R.. should suppress WhateverCode just as .. does
16:12 * colomon may have to switch his $work "make_build" script to p6 just so it's easy to figure out what the command line arguments are supposed to be
16:12 TimToady but leaving that aside, * Rop * shouldn't be expecting 1 arg
16:13 colomon TimToady: are you thinking what I'm thinking?
16:13 colomon p6: say (* R~ *)('bar')
16:13 camelia rakudo-jvm a8798f: OUTPUT«Whatever<786887898>bar␤»
16:13 camelia ..rakudo-parrot a8798f: OUTPUT«Whatever<-6726042392605811182>bar␤»
16:13 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: No value for parameter 'anon_1' in 'ANON'␤  at /tmp/tmpfile line 0 (ANON @ 1) ␤  at /tmp/tmpfile line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.sett…»
16:13 camelia ..rakudo-moar a8798f: OUTPUT«Whatever<139850726241000>bar␤»
16:14 TimToady it's quite a spectacular fail
16:15 zengargoyle left #perl6
16:15 TimToady it's now a function taking 1 arg but that returns two values, one of which is one of the whatevers
16:16 * TimToady could see that happening on a stack machine, but on a register machine?  Wha???
16:16 grondilu joined #perl6
16:16 grondilu R prevents thunking, doesn't it?
16:16 grondilu r: say 4 Rxx rand
16:16 camelia rakudo-moar a8798f: OUTPUT«0.245826499877056 0.245826499877056 0.245826499877056 0.245826499877056␤»
16:16 camelia ..rakudo-jvm a8798f: OUTPUT«0.14997246391421026 0.14997246391421026 0.14997246391421026 0.14997246391421026␤»
16:16 camelia ..rakudo-parrot a8798f: OUTPUT«0.390265019002499 0.390265019002499 0.390265019002499 0.390265019002499␤»
16:16 grondilu n: say 4 Rxx rand
16:16 camelia niecza v24-109-g48a8de3: OUTPUT«0.75332688714998164 0.75332688714998164 0.75332688714998164 0.75332688714998164␤»
16:17 TimToady it does, but arguably it could be made to reverse the thunk policy too
16:17 hoverboard joined #perl6
16:18 TimToady at least where it's not then used as a higher-order function, but then it gets problematical
16:18 sorear joined #perl6
16:18 zengargoyle joined #perl6
16:18 TimToady the only way to fix that would be thunk everything and let the run-time sort it out, not a recipe for performance...
16:19 TimToady but I'm not sure thunking has much to do with the * transform
16:20 grondilu well, yeah.  My bad.
16:20 TimToady p6: say &[R~]('bar','foo')
16:21 camelia niecza v24-109-g48a8de3: OUTPUT«foobar␤»
16:21 camelia ..rakudo-{parrot,jvm,moar} a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '&infix:<R~>' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32msay &[R~]('bar','foo')[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
16:21 TimToady oh yeah, rakudo is still defective there
16:22 TimToady basically, doesn't believe in metaops in rvalue code names
16:22 TimToady p6: say &infix:<R~>(2,4)
16:23 camelia rakudo-jvm a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    &infix:<R~> used at line 1. Did you mean '&infix:<~>>', '&infix:<||>', '&infix:<∋>', '&infix:<->', '&infix:<..>'?â�¤â�¤Â»
16:23 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤    'infix:<R~>' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6…»
16:23 camelia ..rakudo-parrot a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    &infix:<R~> used at line 1. Did you mean '&infix:<X>', '&infix:<Z>', '&infix:<=>>', '&infix:<%>', '&infix:<%%>'?â�¤â�¤Â»
16:23 camelia ..rakudo-moar a8798f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    &infix:<R~> used at line 1. Did you mean '&infix:<~~>', '&infix:<~>', '&infix:<x>', '&infix:<eq>'?â�¤â�¤Â»
16:23 TimToady well, neither does neicza there...
16:23 SamuraiJack_ joined #perl6
16:26 sorear joined #perl6
16:28 raiph joined #perl6
16:29 TimToady n: say (* R.. 1)
16:29 camelia niecza v24-109-g48a8de3: OUTPUT«{ ... }␤»
16:30 TimToady not transparent in niecza either
16:30 TimToady maybe it's a "feature"
16:31 TimToady p6: say (1 [..] *)
16:31 camelia niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  Useless use of [] around infix op at /tmp/tmpfile line 1:â�¤------> [32msay (1 [33mâ��[31m[..] *)[0mâ�¤â�¤1..Infâ�¤Â»
16:31 camelia ..rakudo-{parrot,jvm,moar} a8798f: OUTPUT«1..Inf␤»
16:31 TimToady okay, that's transparent
16:32 TimToady p6: say (1 «..» *)
16:32 TimToady hello?
16:32 camelia rakudo-{parrot,jvm,moar} a8798f: OUTPUT«(timeout)»
16:32 camelia ..niecza v24-109-g48a8de3: OUTPUT«{ ... }␤»
16:32 rurban joined #perl6
16:32 tadzik is it me you're looking for?
16:33 TimToady no, lionel
16:33 timotimo who is?
16:35 TimToady so hypers are transparent to * introspection as well as precedence
16:35 TimToady but R isn't
16:36 TimToady p6: say 1 R+ 2 * 3
16:36 camelia rakudo-jvm a8798f: OUTPUT«(timeout)»
16:36 camelia ..rakudo-{parrot,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«7␤»
16:37 masak that's what I got too.
16:37 TimToady p6: say 1 + 2 R* 3
16:38 camelia rakudo-jvm a8798f: OUTPUT«(timeout)»
16:38 camelia ..rakudo-{parrot,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«7␤»
16:38 masak still good. :)
16:38 TimToady so R is at least transparent to precedence, if not *
16:39 masak basically, R on any commutative op should have no visible effect :)
16:39 TimToady and RR should produce the same on non-commutatives
16:39 TimToady p6: say 'foo' RR~ 'bar'
16:40 camelia rakudo-jvm a8798f: OUTPUT«(timeout)»
16:40 camelia ..rakudo-{parrot,moar} a8798f, niecza v24-109-g48a8de3: OUTPUT«foobar␤»
16:40 * TimToady should stop tormenting the jvm, he guesses
16:41 * TimToady looks around for an implementor :)
16:47 masak "Well now, here's the thing: automating sarcasm detection is *easy*." -- via http://www.antipope.org/charlie/blog-static/​2014/06/we-need-a-pony-and-the-moon-on.html -- if that's an autopun, it's a bit of a new type.
16:47 molaf joined #perl6
16:53 rjbs- TimToady: off-topic: at long last, 20 year old deprecation carried out: http://perl5.git.perl.org/perl.git/commitdi​ff/b5adc3e5c5c4fa9a0d3b230a000a7644b71a169f
16:53 rjbs- masak: That bit of news blew my mind.  I guess I'm not cynical enough yet.
16:53 sorear joined #perl6
16:55 rjbs joined #perl6
16:56 TimToady Well now, here's the thing: is that sarcasm detection algorithm required to return a correct result?
16:57 TimToady rjbs: \o/ with a bit of orz
16:57 masak that's a weird thing to ask about an algorithm.
16:58 rjbs [ ] Click here to indicate that your tweets are never sarcastic
16:58 TimToady okay, what now?
16:59 rjbs Twitter staff are now reviewing your Tweet history.
16:59 masak rjbs: maybe tweets can be equipped with a "sarcasm bit"...
16:59 rjbs (also Twitter defense contractors)
16:59 TimToady <unclick!> <unclick!>
16:59 rjbs This explains the spate of content-transfer-encoding:9-bit I've been seeing lately!
16:59 TimToady wait, what happens if I unclick it twice?
16:59 rjbs "We added an extra bit to tell whether any given character of the message was sarcastic."
17:00 rjbs Unclick is a synonym for click.
17:00 masak TimToady: what I unclick you three times is true.
17:00 anaeem1__ joined #perl6
17:01 TimToady I unclick you. I unclick you. I unclick you.
17:02 * rjbs greys out.
17:02 * TimToady goes into a brown study.
17:03 * TimToady is greying, unless he's graying, but in either case, not out just yet
17:08 rjbs In unrelated news, updating my months-old perl6m.
17:14 masak \o/
17:15 virtualsue joined #perl6
17:16 dalek specs: fe5c01d | TimToady++ | S03-operators.pod:
17:16 dalek specs: Mandate autogeneration of indirect metaops
17:16 dalek specs: review: https://github.com/perl6/specs/commit/fe5c01dc98
17:16 dalek specs: 73cdf29 | TimToady++ | S03-operators.pod:
17:16 dalek specs: and update the date
17:16 dalek specs: review: https://github.com/perl6/specs/commit/73cdf2980c
17:17 sorear joined #perl6
17:17 vendethiel TimToady: not sure what "operator is generated" means ?
17:17 * vendethiel is thinking about c-style auto function decl ...
17:19 TimToady basically that means it has to parse the string as an operator, then curry the higher-order function implementing the metaop using the base op as a curried argument
17:21 vendethiel ah, much better :P
17:23 fhelmberger joined #perl6
17:23 TimToady nr: my &prod = &prefix:< [*] >; say prod 1..10
17:24 camelia rakudo-jvm 609fb8: OUTPUT«(timeout)»
17:24 camelia ..niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤    'prefix:< [*] >' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147…»
17:24 camelia ..rakudo-moar 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    &prefix:<[*]> used at line 1. Did you mean '&prefix:<~>', '&prefix:<~^>', '&prefix:<++>', '&prefix:<-->', '&prefix:<?>'?â�¤â�¤Â»
17:24 camelia ..rakudo-parrot 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    &prefix:<[*]> used at line 1. Did you mean '&prefix:<temp>', '&prefix:<let>', '&prefix:<+^>', '&prefix:<?>', '&prefix:<so>'?â�¤â�¤Â»
17:24 TimToady basically, that oughta do what people expect
17:24 jnthn I can't see how it easily can...
17:25 jnthn At least, not without some reparsing of what's inside the <...>
17:25 TimToady I just said that
17:25 jnthn Which is ugly.
17:25 masak jnthn: <TimToady> basically that means it has to parse the string as an operator, then curry the higher-order function implementing the metaop using the base op as a curried argument
17:25 jnthn Yeah, I didn't read the backlog yet :P
17:25 jnthn urgh
17:26 masak "torment the implementors" :)
17:26 * jnthn shoves that one some way down his priority list :P
17:26 masak fwiw, I agree with TimToady
17:26 jnthn .oO( "6.1" :P )
17:26 TimToady niecza gets there partway wait &[Rop]
17:26 TimToady *with
17:26 TimToady .oO(how did that turn into "wait"?)
17:26 jnthn Well, the &[...] form is less of a problem 'cus we know to parse an infix in there, no?
17:26 masak I also expect metaops to be user-definable, and I expect the op parsing to work for them, too :)
17:27 colomon user-definable metaops +1  :)
17:28 TimToady I'll note that infix:<> is also reparseable at compile time like &[]
17:28 jnthn I just said &[...] didn't look like a reparse to me...
17:29 jnthn No, it ain't.
17:29 jnthn || '&'
17:29 jnthn [
17:29 jnthn | :dba('infix noun') '[' ~ ']' <infixish('[]')>
17:29 jnthn ]
17:29 TimToady similar magic might attain for infix:<>
17:30 TimToady in any case, &[] doesn't help with prefixes or postfixes
17:31 TimToady "might attain", now there's a high-falutin' phrase
17:32 TimToady maybe I meant "might obtain"
17:32 sorear joined #perl6
17:32 * TimToady should learn English someday
17:35 * TimToady puts that off till he learns Perl 6 better
17:36 FROGGS P6opaque: no such attribute '$!from'
17:36 FROGGS at /home/froggs/dev/rakudo/../v5/COBOL.pm:7  (<ephemeral file>:statementlist:49)
17:36 treehug8_ joined #perl6
17:36 FROGGS okay, it really happens *in* statementlist
17:37 FROGGS shopping &
17:37 FROGGS[mobile] joined #perl6
17:37 treehug8_ joined #perl6
17:42 * masak wishes we had &?BLOCK implemented. that would save him a named sub in this code
17:42 timotimo i once thought "oh, that ought to be easy!" ... then i tried to implement it.
17:43 masak m: for 1..4 -> $n { sub ($k) { return if !$k; say $k; &?ROUTINE($k - 1) }($n) }
17:43 camelia rakudo-moar 609fb8: OUTPUT«1␤2␤1␤3␤2␤1␤4␤3␤2␤1␤»
17:44 masak ok, that works as a workaround.
17:45 timotimo mhm
17:46 itz joined #perl6
17:46 masak nope, it failed the readability test ;)
17:47 timotimo well, *this* particular piece of code could be expressed easier; and also is it supposed to infiniloop for negative starting values?
17:48 timotimo hmm. with &?BLOCK, can we just recurse into any block at all?
17:48 * jnthn guesses masak is aware of anon sub foo() { ... } ?
17:48 TimToady but then you can't call foo()
17:48 timotimo jnthn: inside the sub, it'll be available as "foo", but not outside?
17:49 masak right.
17:49 timotimo m: anon sub foo() { say &foo }; foo();
17:49 camelia rakudo-moar 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/g3xMoKHLbqâ�¤Undeclared routines:â�¤    &foo used at line 1â�¤    foo used at line 1â�¤â�¤Â»
17:49 jnthn TimToady: You can inside of the sub.
17:49 timotimo er, duh :)
17:49 timotimo m: anon sub foo() { say foo };
17:49 camelia rakudo-moar 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IaUx5ASoZEâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
17:49 timotimo apparently not
17:49 jnthn Hm
17:49 jnthn Or maybe the spec says that but NYI
17:50 zakharyas joined #perl6
17:51 TimToady hah, japhb++ put that in
17:51 TimToady no wonder I didn't remember doing it...
17:51 sorear joined #perl6
17:52 masak TimToady: you made the name available inside the sub, though :)
17:52 TimToady so I guess it needs to install the name into the inner lexical scope, much like parameter names
17:53 TimToady git blame blames japhb
17:53 masak see 23e517.
17:54 TimToady hmm, well, okay
17:54 masak japhb++'s commit is just and edit.
17:54 masak an*
17:55 * TimToady blames git blame
17:55 TimToady the trouble with making sensical decisions is that you immediately forget them, because you only need to remember the exceptions :)
17:57 rurban joined #perl6
17:58 zengargoyle m: my %h = enum << :Mon(1) Tue Wed Thu Fri Sat Sun >>;
17:58 camelia rakudo-moar 609fb8: ( no output )
17:59 itz is there a vim tags making script for perl6?
17:59 TimToady ntiko
18:01 zengargoyle m: my %h = enum << :Mon(1) Tue Wed Thu Fri Sat Sun >>; say %h.perl;
18:01 camelia rakudo-moar 609fb8: OUTPUT«("Tue" => 0, "Sun" => 5, "Wed" => 1, "Mon" => 1, "Sat" => 4, "Thu" => 2, "Fri" => 3).hash␤»
18:01 TimToady otoh that could be one of those sensical things I've forgotten :)
18:02 TimToady er...
18:02 sorear joined #perl6
18:03 TimToady m: my %h = enum :Mon(1), < Tue Wed Thu Fri Sat Sun >; say %h.perl
18:03 camelia rakudo-moar 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/q5XZC0nS0Fâ�¤Undeclared routine:â�¤    enum used at line 1â�¤â�¤Â»
18:03 TimToady m: my %h = enum (:Mon(1), < Tue Wed Thu Fri Sat Sun >); say %h.perl
18:03 camelia rakudo-moar 609fb8: OUTPUT«("Mon" => 1, "Sun" => 5, "Fri" => 3, "Wed" => 1, "Tue" => 0, "Thu" => 2, "Sat" => 4).hash␤»
18:03 zengargoyle in moar at least, the anon version is handled specially and passed off to a QAST generator of some sort.
18:04 TimToady htat would appear to no be following S02:4834
18:04 synopsebot Link: http://perlcabal.org/syn/S02.html#line_4834
18:04 zengargoyle and that's the limit of my knowledge, but if we're collecting things the spec said should work....
18:04 TimToady *that *not
18:05 TimToady Multiple code paths for the same thing is a good way to get half your constructs working right.
18:06 TimToady Also has the benefit of making your image bigger.
18:07 TimToady so zengargoyle++ for the rakudobug
18:07 TimToady perhaps the masakbot knows whether it's been filed already?
18:08 zengargoyle i'm just starting to play around with p6 now, hard to tell sometimes if it's a bug, a not implemented yet, or a spec has changed
18:08 * TimToady wonders if there's a test for that yet
18:09 rindolf joined #perl6
18:10 TimToady S12-enums/anonymous.t does not appear to test for that
18:10 TimToady and there are no anonymous enum tests anywhere containing 'enum.*Tue'
18:10 sorear joined #perl6
18:11 TimToady they're all nonymous
18:11 TimToady or would that be nymous?
18:11 FROGGS onymous of course
18:12 * masak .oO( chocolate mous )
18:12 FROGGS http://www.thefreedictionary.com/onymous
18:13 FROGGS I'm surprised that it exists
18:14 geekosaur I'm not
18:16 sorear joined #perl6
18:17 * TimToady forgot that "onuma" means name, sigh
18:18 TimToady that must mean it's sensical...
18:26 segomos_ non inane
18:28 * PerlJam suddenly wonders why we don't pronounce it as  an-onymous
18:29 PerlJam usually it comes out as aNONymous
18:29 geekosaur because it's been assimilated and anglicized? (and english pronunciation rules, to the extent they exist, are weird)
18:30 zengargoyle and so often shortened to anon that anon becomes a chunk
18:33 masak PerlJam: also explain to me why we no longer pronounce it "a napple".
18:33 masak and "a norange".
18:34 masak hm, maybe the former actually never happened. but "a nuncle" did, I think.
18:37 PerlJam .oO( a no range? )
18:38 PerlJam .oO( I have no tea )
18:43 anaeem1 joined #perl6
18:45 geekosaur I would not be surprised about "norange" given its origin
18:45 dmol joined #perl6
18:48 masak ...Spain?
18:49 geekosaur from Arabic via Spanish
18:49 geekosaur but effectively yes, `naranja`
18:50 masak dictionary.com says Dravidian(?)->Sanskrit->Persian->​Arabic->Italian->French->English.
18:50 geekosaur although I could not say if whoever imported it into English started out with the "n" in the right place or not
18:50 geekosaur huh, ok
18:50 geekosaur even more places for it to get scrambled
18:52 guru joined #perl6
19:03 dwarring joined #perl6
19:07 kivutar joined #perl6
19:10 molaf joined #perl6
19:12 anaeem1 joined #perl6
19:26 itz is there a perl6ish way of calling private methods for testing?
19:28 jnthn Not really; the point of them is you can't call them from outside of the class so you can safely refactor them and know you only need to consider their containing class.
19:29 * jnthn has come to view tests as just another client of the object, not something that deserves any extra privs on the object.
19:29 nwc10 ha! london.pm now top: http://act.useperl.at/apw2014/stats
19:29 itz I did wonder but a quick google suggests .NET and Java workarounds for this
19:30 nwc10 itz++
19:31 jnthn itz: Well, you can always get at them with the MOP, but it's inconvenient for a reason...
19:33 itz I'll be good and atone for  years of my perl5 OO sins
19:33 FROGGS jnthn: how can I debug that token calling problem that results in an error about '$!from'?
19:33 FROGGS jnthn: I dunno where to start
19:34 jnthn FROGGS: Well, can look at the regex compiler and see where it emits lookups to $!from maybe...
19:35 jnthn That's the only ones I can imagine being to blame...
19:35 FROGGS k
19:35 FROGGS thank you :o)
19:36 FROGGS in QASTRegexCompilerMAST.as_mast and .scan
19:49 rurban joined #perl6
19:49 dwarring r: multi sub trait_mod:<is>(Routine $r, :$funny!) {say 42}; sub blah is funny {say "hi"}; blah()
19:50 camelia rakudo-{parrot,jvm,moar} 609fb8: OUTPUT«42␤hi␤»
19:50 dwarring r: multi sub trait_mod:<is>(Routine $r, :$cached!) {say 42}; sub blah is cached {say "hi"}; blah()
19:50 camelia rakudo-{parrot,jvm,moar} 609fb8: OUTPUT«hi␤»
19:50 dwarring r: sub blah is cached {say "hi"}; blah()
19:50 camelia rakudo-{parrot,jvm,moar} 609fb8: OUTPUT«hi␤»
19:51 itz can someone add https://raw.githubusercontent.com/stmuk​/p6-String-Koremutake/master/META.info to the ecosystem please?
19:52 dalek perl6-roast-data: 3db9a92 | coke++ | / (4 files):
19:52 dalek perl6-roast-data: today (automated commit)
19:52 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/3db9a92ac5
19:54 dalek ecosystem: c58902d | (Tobias Leich)++ | META.list:
19:54 dalek ecosystem: add String-Koremutake, stmuk++ / itz
19:54 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c58902d183
19:54 FROGGS itz++
19:54 [Coke] +S17-supply/on.t 5 - basic 3 supply with array 'on' works - fails on jvm & moar
19:55 [Coke] still no clean rakudo spectests. :(
19:55 itz ty
19:58 colomon hmmm… simple statement to filter the non-ASCII characters out of a string?
19:59 FROGGS jnthn: for this message: P6opaque: no such attribute '$!from'
19:59 FROGGS it means that it gets the curclass wrong, in this piece, right?
19:59 FROGGS op('getattr_i', $pos, $cur, $curclass, sval('$!from'), ival(nqp::hintfor($*cursor_type, '$!from'))),
19:59 jnthn colomon: .subst(/<[\x0..\x7F]>+/, '', :g) or so?
19:59 moritz colomon: $str = $str.comb(/<[\c[0]...\c[127]]>+/).join # untested
20:00 moritz colomon: or   $str = $str.comb.grep(*.ord < 128).join
20:00 colomon jnthn++ moritz++
20:00 * colomon does not trust his phone's filesystem to be able to handle non-ASCII characters, you so....
20:01 moritz puny-encode it! UTF-7 encode it!
20:01 FROGGS m: say "abcöö" ~~ / <:!ASCII>+ / # perhaps most readable
20:01 camelia rakudo-moar 609fb8: OUTPUT«「öö」␤␤»
20:01 moritz FROGGS++
20:01 FROGGS p: say "abcöö" ~~ / <:!ASCII>+ / # perhaps most readable
20:01 jnthn ooh, I forgot about that :)
20:01 camelia rakudo-parrot 609fb8: OUTPUT«Unicode property 'ASCII' not found␤  in regex  at /tmp/zRq79fYQ0z:1␤  in method ACCEPTS at gen/parrot/CORE.setting:13197␤  in method ACCEPTS at gen/parrot/CORE.setting:801␤  in block  at /tmp/zRq79fYQ0z:1␤␤»
20:01 FROGGS j: say "abcöö" ~~ / <:!ASCII>+ / # perhaps most readable
20:02 camelia rakudo-jvm 609fb8: OUTPUT«(timeout)»
20:02 FROGGS use with caution :o)
20:02 Fabian_ joined #perl6
20:02 moritz use j: with caution, right
20:02 FROGGS that too
20:03 colomon I'm using r-m by default, thank you.  ;)
20:03 [Coke] r: "hello world…".comb().grep({.ord < 256}).join
20:03 camelia rakudo-{parrot,jvm,moar} 609fb8: ( no output )
20:03 [Coke] # aw, moritz beat me.
20:03 colomon FROGGS++ # ended up using that version, more readable and I could subst with "_" so as to easily see something was missing.
20:04 Fabian_ Hi there. I got a little question. What is the difference between: my @numbers = (1, 2, 3); say @numbers.WHAT and say (1, 2, 3).WHAT;?
20:05 FROGGS Fabian_: in the first case you shove it into an Array, in the last case not
20:06 jnthn fwiw, in Perl 6 you can write the first as just "my @numbers = 1, 2, 3;" without the parens..
20:06 FROGGS jnthn: can you take a look at what I wrote like 6mins ago?
20:06 jnthn FROGGS: Well, I read it, but figured it was part of yur ongoing exploration...
20:07 jnthn It could well mean the cur_class is wrong...
20:07 beastd joined #perl6
20:07 Fabian_ And is this valid too: my $numbers = 1, 2, 3; ?
20:07 jnthn Where does the cursor itself come from? It's the return value of !cursor_start?
20:07 vendethiel probably valid, maybe surprising
20:08 jnthn Fabian_: That isn't what you want, probably. Assigning to a scalar is different; since it can only hold a single value, it just takes the 1.
20:08 jnthn m: my $numbers = 1, 2, 3;
20:08 camelia rakudo-moar 609fb8: ( no output )
20:08 FROGGS jnthn: like that:
20:08 FROGGS $*cursor_type := $node.cursor_type();
20:08 FROGGS my $wval := $*QASTCOMPILER.as_mast(QAST::WVal.new( :value($*cursor_type) ));
20:08 FROGGS op('set', $curclass, $wval.result_reg),
20:08 jnthn Hm, I thought it may warn...
20:08 vendethiel m: my $numbers = 1, 2, 3; say $numbers; // here, see
20:08 camelia rakudo-moar 609fb8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9Dze0aKopc�Null regex not allowed�at /tmp/9Dze0aKopc:1�------> [32mmy $numbers = 1, 2, 3; say $numbers; //[33m�[31m here, see[0m�»
20:08 vendethiel m: my $numbers = 1, 2, 3; say $numbers; # here, see
20:08 camelia rakudo-moar 609fb8: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $numbers = 1, 2, 3" in sink context (line 1)␤1␤»
20:09 vendethiel uh.
20:09 vendethiel is it Lazy(TM)?
20:09 jnthn ah...
20:09 jnthn vendethiel: No, last line of the program isn't sunk so far as compile-time analysis cares..
20:09 jnthn FROGGS: No, I meant $cur
20:09 FROGGS ohh
20:09 Fabian_ What is the difference between an Array, a Parcel and a List?
20:10 Fabian_ I don't get it.
20:10 vendethiel welcome in the club...
20:10 FROGGS jnthn: seems to be the result of the call, aye: call($method, [ $Arg::obj ], :result($cur), $self )
20:10 jnthn Parcel is an immutable, non-resizable, bunch of things that doesn't imply any kind of flattening and so keeps structure of any Parcels within it
20:10 FROGGS '!cursor_start'
20:11 [Coke] it would be nice if docs.perl6.org -> doc.perl6.org
20:11 jnthn List flattens non-items and can be pushed/shifted etc but doesn't cause the elements to be mutable
20:12 jnthn Array is what you expect a "my @a" to do - a bunch of mutable containers.
20:12 jnthn Array is just a List that you can assign into, really.
20:13 Fabian_ Thanks jnthn. By the way. Just saw your Perl 6 - What can you do today talk. Really great!
20:13 jnthn Fabian_: Glad you enjoyed it :)
20:13 jnthn FROGGS: Hmmm...well, that's meant to return something correct...
20:15 Fabian_ What do you mean with non-items in Lists?
20:15 jnthn FROGGS: What happens if you disable the cursor_type optimization and have it always fall back to looking that up?
20:15 jnthn m: my @a = 1, (2, 3), 4; say @a.perl
20:15 camelia rakudo-moar 609fb8: OUTPUT«Array.new(1, 2, 3, 4)␤»
20:15 jnthn m: my @a = 1, [2, 3], 4; say @a.perl
20:15 camelia rakudo-moar 609fb8: OUTPUT«Array.new(1, [2, 3], 4)␤»
20:16 FROGGS let's see
20:16 jnthn Just mean that parens so far as a List/Array cares are just about grouping.
20:16 jnthn Whereas [...] is an array as an item (in Perl 5 speak, array ref)
20:17 jnthn m: my $x = (1, 2); my @a = 1, $x, 4; say @a.perl
20:17 camelia rakudo-moar 609fb8: OUTPUT«Array.new(1, $(1, 2), 4)␤»
20:17 jnthn Note that anything in a $ is kept as a single item.
20:18 jnthn And [...] is like $(Array.new(...))
20:18 FROGGS jnthn: doesn't change anything sadly
20:18 jnthn hmm
20:20 Fabian_ Thank you very much. That makes things clearer.
20:21 labster joined #perl6
20:22 Fabian_ m: my @a = 1, (2, 3), 4; say @a.perl
20:22 camelia rakudo-moar 609fb8: OUTPUT«Array.new(1, 2, 3, 4)␤»
20:25 Fabian_ m: my @a = 1, [2, 3], 4; say @a.perl
20:25 camelia rakudo-moar 609fb8: OUTPUT«Array.new(1, [2, 3], 4)␤»
20:32 FOAD joined #perl6
20:43 spider-mario joined #perl6
20:47 dalek roast: 78a53ed | (David Warring david.warring@gmail.com)++ | integration/advent2011-day0 (3 files):
20:47 dalek roast: adding advent 2011 days 3, 4 and 5
20:47 dalek roast: review: https://github.com/perl6/roast/commit/78a53ed391
20:48 dmol joined #perl6
20:54 SevenWolf joined #perl6
20:55 brrt joined #perl6
21:01 dalek Perlito: de93b43 | (Flavio S. Glock)++ | src5/lib/Perlito5/Javascript2/Emitter.pm:
21:01 dalek Perlito: Perlito5 - js - optimization - inline substr() when possible
21:01 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/de93b43c15
21:14 pochi_ joined #perl6
21:23 fhelmberger joined #perl6
21:33 FROGGS jnthn: I think I got further
21:34 jnthn FROGGS: what'd you find?
21:34 FROGGS I cloned method LANG into Perl6::Grammar.LANG2, and removed the :shared(self.'!shared'()) from the call to !cursor_init
21:35 jnthn Ohhh
21:35 FROGGS now the call does work as it seems
21:35 jnthn Hmmm
21:35 jnthn Yeah, that explains it
21:35 jnthn shared contains a cur class iirc
21:35 FROGGS and since this returns a Match, that has a $!to but no $!pos, it explodes about $!pos after the call
21:36 FROGGS right... when I just add $!pos to Match it fails with: P6opaque: no such attribute '$!name'
21:36 jnthn Huh?
21:36 jnthn This is nothing to do with Match and all about NQPCursor vs Cursor, no?
21:37 FROGGS hmmm
21:37 jnthn my class ParseShared is export {
21:37 jnthn has $!CUR_CLASS;
21:37 FROGGS yeah, I see now that NQPMatch looks like Match
21:37 jnthn Well, but it's a cursor that it's trying to get $!from in, not a Match...
21:37 FROGGS yeah, reverting my change to Match...
21:38 jnthn I think the trick is checking whether we can re-use the ParseShared.
21:38 jnthn In LANG
21:38 jnthn By checking if the type of the new cursor type-matches the $!CUR_CLASS in ParseShared
21:38 jnthn If it does they're based on the same HLL cursor, and the re-use is OK. If not, need to do something smarter...
21:39 jnthn uh
21:39 jnthn or just not pass shared.
21:39 FROGGS okay, if you say so :o)
21:39 jnthn Taht'll deal with the $!from issue
21:40 jnthn The follow-up problem is that when we want to check if a Cursor was a success or not we currently obtain $!pos from it...
21:40 FROGGS hmmmm
21:40 jnthn Not immediately sure what to do with that. Tricky.
21:41 jnthn Short of changing the code-gen to obtain the appropriate cur_class each time...
21:41 FROGGS where is the problem? a Cursor has a $!pos
21:41 jnthn NQPCursor vs Cursor
21:42 jnthn Both compose the role, but attributes from a role are copied into the class
21:42 jnthn They are then, at lookup time, needing to be qualified with that class.
21:42 jnthn So "has a $!pos" isn't the issue, it's that the class name-spacing the attribute is being wrongly passed
21:45 dalek joined #perl6
21:50 FROGGS it fails now in !cursor_capture btw, complaining about $!name, which is the same issue as $!pos it seems
21:50 jnthn Yeah.
21:51 jnthn Hm, getting caught cheating...
21:51 jnthn Thing is, performance kinda matters there...
21:51 timotimo "kinda", haha
21:51 FROGGS I guessed so *g*
21:52 * FROGGS would love to know what exactly the cheat is, but understands that it is perhaps too late for that today :o)
21:53 FROGGS but very nice, it really runs the statementlist of COBOL.pm now... (I see my print statement)
21:54 jnthn Well, there's an assumption that the cursor you get back from a rule always derives from the same class as the current cursor
21:54 jnthn Doesn't have to be same type
21:54 jnthn Just should have the same base.
21:54 FROGGS ahh
21:54 jnthn NQPCursor is the base for all NQP ones, Cursor from Rakudo's CORE.setting for the rest.
21:55 jnthn And here we're mixing them.
21:55 FROGGS "Don't cross the beams!"
21:55 jnthn Pretty much. But it'd be good to be able to.
21:56 FROGGS and that assumptions is made in the RegexCompiler.as_mast I suppose?
21:56 donaldh joined #perl6
21:58 jnthn Yeah
21:58 jnthn And in src/QRegex/Cursor.nqp I suspect. In the capture thingy you noticed.
21:59 FROGGS ohh!
22:02 masak 'night, #perl6
22:03 FROGGS gnight masak
22:06 jnthn 'night, masak
22:07 sergot joined #perl6
22:15 ivanshmakov joined #perl6
22:17 skids joined #perl6
22:18 brrt left #perl6
22:19 ivanshmakov joined #perl6
22:19 rurban joined #perl6
22:36 hoverboard joined #perl6
22:40 rurban joined #perl6
22:42 BenGoldberg joined #perl6
22:42 avuserow joined #perl6
22:44 lizmat joined #perl6
22:51 lizmat joined #perl6
22:58 skids joined #perl6
23:04 woolfy joined #perl6
23:07 donaldh If I commit a new test file to roast, it won't be used, right?
23:08 sorear joined #perl6
23:08 donaldh or is it just rakudo that has a spectest.data ?
23:08 avuserow joined #perl6
23:09 [Coke] every implementation has spectest.data
23:09 [Coke] add away
23:09 donaldh it's new tests for IO::Socket::Async, but not finished and will need fudged for parrot.
23:11 dalek roast: 150f484 | (Donald Hunter)++ | S32-io/spurt.t:
23:11 dalek roast: Add missing test descriptions.
23:11 dalek roast: review: https://github.com/perl6/roast/commit/150f4841a4
23:11 dalek roast: 17d7071 | (Donald Hunter)++ | S32-io/IO-Socket-Async.t:
23:11 dalek roast: Initial async socket tests.
23:11 dalek roast: review: https://github.com/perl6/roast/commit/17d70718ec
23:21 sorear joined #perl6
23:22 aindilis joined #perl6
23:26 pdurbin joined #perl6
23:29 japhb m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; %h{@k}.perl.say
23:29 camelia rakudo-moar 609fb8: OUTPUT«(("1", "2", "3").list.item, ("4", "5", "6").list.item)␤»
23:30 japhb What's the most idiomatic way to get back a single flat list of < 1 2 3 4 5 6 > from that hash slice?
23:31 japhb m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; %h{@k}>>.flat.flat.perl.say   # ewww
23:31 camelia rakudo-moar 609fb8: OUTPUT«("1", "2", "3", "4", "5", "6").list␤»
23:32 jnap joined #perl6
23:35 TimToady m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; %h{@k}».flat.list.perl.say
23:35 camelia rakudo-moar 609fb8: OUTPUT«("1", "2", "3", "4", "5", "6").list␤»
23:36 TimToady m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; .say for %h{@k}».flat
23:36 camelia rakudo-moar 609fb8: OUTPUT«1␤2␤3␤4␤5␤6␤»
23:36 TimToady don't really need the .list if you're gonna use it in list context
23:38 TimToady m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; .say for %h{@k}»[]
23:38 camelia rakudo-moar 609fb8: OUTPUT«1␤2␤3␤4␤5␤6␤»
23:38 TimToady even shorter
23:40 rurban joined #perl6
23:40 japhb m: my %h; %h<a> = "1 2 3".words; %h<b> = "4 5 6".words; my @k = <a b>; my @a = %h{@k}»[]; @a.perl.say
23:40 camelia rakudo-moar 609fb8: OUTPUT«Array.new("1", "2", "3", "4", "5", "6")␤»
23:40 japhb OK, that works.  Bit magical, but it works.
23:40 rindolf joined #perl6
23:40 * TimToady is not sure in what sense Zen slice is more idiomatic, but it feels that way, if idiomatic means not what you expect naïvely :)
23:41 TimToady Zen slice is what I usually use for that anymore
23:41 japhb It's a Zen thing.
23:41 japhb You have to achieve enlightenment first.
23:43 * TimToady would like to get the point where you could write %h{@k;*} for that
23:44 TimToady and it would somehow know that you're switching to array indexing in the middle
23:45 TimToady though perhaps only if you declare my %h of Array or so
23:46 TimToady multidimensional arrays basically let you skip a » between subscripts
23:47 TimToady s/arrays/subscripts/
23:47 TimToady or s/arrays/slices/
23:47 aindilis` joined #perl6
23:48 TimToady anyway, every time someone writes @foo[@bar]>>[@baz] I'd like them to think to themselves "if only I could write that @foo[@bar;@baz] as S09 specs..."  :)
23:49 japhb Is that one of the "Waiting for Godot^Wpmichaud" issues?
23:50 TimToady not really, it's just not bubbled up to the top of anyone's Todo list
23:50 BenGoldberg joined #perl6
23:50 TimToady for native multi-dimensionals, probably depends on a deep understanding of reprs
23:51 TimToady and perhaps some understanding of how APL handles multidim arrays
23:54 TimToady such that a 3x3 matrix [[0,1,2],[3,4,5],[6,7,8] is really stored as 2, 3, 3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
23:56 TimToady but we aren't planning to restrict multi-dim slices to shaped arrays, where it's obvious how to emulate things in the presence of references
23:58 TimToady so, actually, I think your hash would be declared as %h{*}[*]
23:58 TimToady std: my %h{*}[*];
23:58 camelia std ec3d853: OUTPUT«ok 00:01 126m␤»
23:59 TimToady std: my %h{*}[*] of Int;
23:59 camelia std ec3d853: OUTPUT«ok 00:01 126m␤»
23:59 japhb TimToady: I'd be even happier to have your example turn into {...shape header...} --> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] so that we can do PDL-like change of dimensionality without moving data
23:59 TimToady just checking
23:59 TimToady sure, was just being notional on the header thing

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

Perl 6 | Reference Documentation | Rakudo