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