»ö« 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:00 btyler joined 00:12 Psyche^_ joined 00:15 Psyche^ left 00:22 mstwu00 joined 00:31 risou is now known as risou_awy 00:45 dayangkun joined
Mouq r: macro infix:<d>($a, $b) {quasi { (1..{{{$b}}}).roll({{{$a}}}) }}; say 5 d 20 00:51
camelia rakudo 776f18: OUTPUT«10 4 3 14 3␤»
colomon not rolling very well there. ;) 01:12
not sure why you'd want your dice rolls to be a macro? 01:15
Mouq Originally I was hoing to be able to do "5d20", but that requires weird parsing 01:16
r: sub infix:<d>($a, $b) { ($b-3..+$b).roll($a)}; say 5 d 20 01:17
camelia rakudo 776f18: OUTPUT«18 18 20 17 19␤»
colomon much better… hey, you cheated! 01:18
Mouq Sorry, looks like I may have over-loaded my dice 01:19
colomon r: sub infix:<d>($a, $b) { ($b-3..+$b).roll($a)}; say 5d20 01:20
camelia rakudo 776f18: OUTPUT«===SORRY!=== Error while compiling /tmp/gfKe6HEi3t␤Confused␤at /tmp/gfKe6HEi3t:1␤------> >($a, $b) { ($b-3..+$b).roll($a)}; say 5⏏d20␤ expecting any of:␤ whitespace␤»
colomon r: sub infix:<d>($a, $b) { ($b-3..+$b).roll($a)}; say 5d 20
camelia rakudo 776f18: OUTPUT«===SORRY!=== Error while compiling /tmp/EQN5LTMK41␤Confused␤at /tmp/EQN5LTMK41:1␤------> >($a, $b) { ($b-3..+$b).roll($a)}; say 5⏏d 20␤ expecting any of:␤ whitespace␤»
colomon r: sub infix:<d>($a, $b) { ($b-3..+$b).roll($a)}; say 5 d 20
camelia rakudo 776f18: OUTPUT«20 18 18 20 20␤»
colomon hmm
01:23 EvanTeitelman left 01:24 EvanTeitelman joined 01:25 woosley joined, xenoterracide joined 01:29 bruges joined 01:37 FROGGS joined 01:43 benabik joined 01:47 FROGGS left 01:56 EvanTeitelman left
TimToady nr: sub postfix:<d20>($a) { (1..20).roll($a)}; say 5d20 02:20
camelia rakudo 776f18: OUTPUT«6 8 20 19 8␤»
..niecza v24-95-ga6d4c5f: OUTPUT«7 2 10 16 3␤»
TimToady surely you don't have that many kind of dice :)
02:21 FROGGS joined
TimToady *kinds 02:22
colomon TimToady: good point! d4 d6 d8 d10 d12 d20 d100 … maybe d3 02:23
would it be possible to make a macro to make defining a new die really easy?
TimToady nr: sub postfix:<d6> ($a) { ('⚀'..'⚅').roll($a) }; say 5d6 02:25
camelia rakudo 776f18: OUTPUT«⚁ ⚅ ⚂ ⚅ ⚄␤»
..niecza v24-95-ga6d4c5f: OUTPUT«⚅ ⚀ ⚁ ⚁ ⚀␤»
benabik I've seen a fair number of d30
02:25 FROGGS left
colomon benabik: really? I can't recall ever seeing one. Nor having a desire for it. 02:30
colomon is mostly diceless anyway.
benabik colomon: They're not usually in ye standard red box set, but they're in most game stores. 02:31
lue wonders if an "is parsed(...)" on the macro would allow 5d20 ... 02:32
colomon has a sudden urge for a d17 02:33
TimToady nr: sub postfix:<p50> ($a) { ('①'..'⑳','㉑'..'㉟','㊱'..'㊿').pick($a) }; say 6p50 02:34
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
..rakudo 776f18: OUTPUT«㉞ ① ⑯ ㉔ ③ ㊺␤»
TimToady n: sub postfix:<p50> ($a) { ('①'..'⑳','㉑'..'㉟','㊱'..'㊿').pick($a) }; say 6p50
lue wants to find a d1
benabik colomon: Erm, I don't think there is a regular 17-hedron
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
colomon benabik: I'd be surprised if there was 02:35
benabik lue: sphere or mobius strip, I'd thing
TimToady wonders shy that takes niecza so long...
*why
(works locally, eventually)
lue n: sub postfix:<p50> ($a) { my @z = ('①'..'⑳','㉑'..'㉟','㊱'..'㊿'); @z.pick($a) }; say 6p50
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)» 02:36
benabik n: my @z = ('①'..'⑳','㉑'..'㉟','㊱'..'㊿'); say @z
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
colomon :(
TimToady is guessing it is generating a very long list somehow
benabik .u ① ㉑
yoleaux U+0020 SPACE [Zs] ( )
U+2460 CIRCLED DIGIT ONE [No] (①)
U+3251 CIRCLED NUMBER TWENTY ONE [No] (㉑)
TimToady unfortunately, the ranges are not contiguous 02:37
benabik n: '㉑'.say
camelia niecza v24-95-ga6d4c5f: OUTPUT«㉑␤»
benabik n: ('㉑'..'㉟').say
camelia niecza v24-95-ga6d4c5f: OUTPUT«"㉑".."㉟"␤»
TimToady n: sub postfix:<p50> ($a) { ('①'..'⑳','㉑'..'㉟').pick($a) }; say 6p50
benabik n: ('①'..'⑳').say
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
niecza v24-95-ga6d4c5f: OUTPUT«"①".."⑳"␤»
benabik n: ('㊱'..'㊿').say 02:38
camelia niecza v24-95-ga6d4c5f: OUTPUT«"㊱".."㊿"␤»
benabik n: ('a'..'f','q'..'z').say
camelia niecza v24-95-ga6d4c5f: OUTPUT«"a".."f" "q".."z"␤»
benabik Dunno.
TimToady n: sub postfix:<p50> ($a) { ('①'..'⑳','㊱'..'㊿').pick($a) }; say 6p50
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)» 02:39
lue r: sub postfix:<p50> ($a) { my @z = ('①'..'⑳','㉑'..'㉟','㊱'..'㊿'); @z.pick($a) }; say 6p50
camelia rakudo 776f18: OUTPUT«㊶ ⑭ ⑰ ㊱ ⑮ ㉙␤»
Teratogen does Perl 6 do infix, prefix, AND postfix!?
Why Perl 6 is a Reverse Polish Notation Calculator! 02:40
TimToady n: sub postfix:<p50> ($a) { ('①','⑳','㉑','㉟','㊱','㊿')».chars }; say 6p50
Teratogen =)
camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/eV5CWEInjv line 1:␤------> sub postfix:<p50> (⏏$a) { ('①','⑳','㉑','㉟','㊱','㊿')».chars }␤␤1 1 1 1 1 1␤»
benabik RPN.pm6 that defines a postfix operator on lists for all the normal mathematics?
Teratogen If I can use Perl 6 as a RPN calculator I am SOLD! 02:41
benabik Would probably need to (ab)use macros to use it without using enough parentheses to make it look like Lisp. 02:42
TimToady it's not quite so simple
no space allowed before a postfix, and postfixes by default bind rather tightly
colomon fantasizes about having the time to implement Forth in NQP... 02:46
dylanwh Sixth 02:47
colomon yeah, the temptation would be to make it more Factor than Forth 02:51
diakopter . 02:53
TimToady .u .
yoleaux U+002E FULL STOP [Po] (.)
diakopter .u ENERGY 02:54
yoleaux No characters found
diakopter .u VOLT
yoleaux U+26A1 HIGH VOLTAGE SIGN [So] (⚡)
diakopter .u WATT
yoleaux U+3357 SQUARE WATTO [So] (㍗)
diakopter .u PIKACHU
yoleaux No characters found
diakopter .u QUIETFANATIC
yoleaux No characters found
TimToady .u mouse 02:55
yoleaux U+1F401 MOUSE [So] (🐁)
TimToady .u 𒁏 02:57
yoleaux U+1204F CUNEIFORM SIGN BU OVER BU UN [Lo] (𒁏)
03:02 mstwu00 left
Mouq n: sub postfix:<p50> ($a) { my @z = ('①'..'⑳'),('㉑'..'㉟'),('㊱'..'㊿'); @z.roll($a) }; say 6p50 03:29
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
Mouq n: my @a = 'a'..'z'; @a.pick.say 03:31
camelia niecza v24-95-ga6d4c5f: OUTPUT«k␤»
Mouq n: my @a = 'a'..'z'; @a.pick(5).say
camelia niecza v24-95-ga6d4c5f: OUTPUT«k l u a i␤»
Mouq rn: my @a = '™',*.ord.succ.chr ... *.ord >= 9000; @a.roll(5).say 03:35
camelia niecza v24-95-ga6d4c5f: OUTPUT«⅀ ⇴ ⅎ ⋫ ∗␤» 03:36
..rakudo 776f18: OUTPUT«⊮ ⊬ ⊿ ≍ ⊫␤»
TimToady n: sub postfix:<p50> ($a) { ('①'..'⑳','㊱'..'㊿')[^40].pick($a) }; say 6p50 03:38
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
TimToady n: sub postfix:<p50> ($a) { (('①'...'⑳'),('㊱'...'㊿'))[^40].pick($a) }; say 6p50 03:39
camelia niecza v24-95-ga6d4c5f: OUTPUT«㊳ ㊻ ① (Any) (Any) ⑫␤»
TimToady n: say ('①'..'⑳')[20] 03:40
camelia niecza v24-95-ga6d4c5f: OUTPUT«(Any)␤»
TimToady n: say '㉑'.succ 03:43
camelia niecza v24-95-ga6d4c5f: OUTPUT«WTF␤»
TimToady there you go
n: say '㉑'...'㉟'
camelia niecza v24-95-ga6d4c5f: OUTPUT«㉑ ㉒ ㉓ ㉔ ㉕ ㉖ ㉗ ㉘ ㉙ ㉚ ㉛ ㉜ ㉝ ㉞ ㉟␤»
TimToady n: say '㉑'..'㉟'
camelia niecza v24-95-ga6d4c5f: OUTPUT«"㉑".."㉟"␤»
TimToady well, maybe not 03:44
n: say ('㉑'..'㉟').elems 03:45
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
TimToady n: say ('㉑'..'㉟').list
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
TimToady n: say ('㉑'..'㉟')[^20]
camelia niecza v24-95-ga6d4c5f: OUTPUT«㉑ WTF WTG WTH WTI WTJ WTK WTL WTM WTN WTO WTP WTQ WTR WTS WTT WTU WTV WTW WTX␤»
TimToady yes, it tries to do .. directly rather than convert to ... 03:46
n: say ('㉑'...'㉟')[^20]
camelia niecza v24-95-ga6d4c5f: OUTPUT«㉑ ㉒ ㉓ ㉔ ㉕ ㉖ ㉗ ㉘ ㉙ ㉚ ㉛ ㉜ ㉝ ㉞ ㉟ (Any) (Any) (Any) (Any) (Any)␤»
diakopter rn: say ()[^20] 03:47
camelia niecza v24-95-ga6d4c5f: OUTPUT«(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)␤»
..rakudo 776f18: OUTPUT«␤»
diakopter rn: say ()[^20000]
camelia niecza v24-95-ga6d4c5f: OUTPUT«(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) …»
..rakudo 776f18: OUTPUT«␤»
Mouq rn: my @a = '㉑'...'㉟'; ({say shift @a} xx 5)».() # unrelated 03:57
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«㉑␤㉒␤㉓␤㉔␤㉕␤»
Mouq rn: my @a = '㉑'...'㉟'; say ({shift @a} xx 5)».() # unrelated 03:58
camelia rakudo 776f18: OUTPUT«㉓ ㉕ ㉒ ㉔ ㉑␤»
..niecza v24-95-ga6d4c5f: OUTPUT«㉑ ㉒ ㉓ ㉔ ㉕␤»
Mouq rn: my @a = '㉑'...'㉟'; say ({shift @a} xx 5)map(*.()) # alas
camelia rakudo 776f18: OUTPUT«===SORRY!=== Error while compiling /tmp/CPW6EHCMyb␤Two terms in a row␤at /tmp/CPW6EHCMyb:1␤------> my @a = '㉑'...'㉟'; say ({shift @a} xx 5)⏏map(*.()) # alas␤ expecting any of:␤ postfix␤ infix stopper␤ …» 03:59
..niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/OKz6GOYwDc line 1:␤------> my @a = '㉑'...'㉟'; say ({shift @a} xx 5)⏏map(*.()) # alas␤␤Parse failed␤␤»
Mouq rn: my @a = '㉑'...'㉟'; say ({shift @a} xx 5).map(*.()) # alas
camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Whatever␤ at /tmp/wzw_L8TGHt line 1 (mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-C…»
..rakudo 776f18: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Whatever'␤ in block at /tmp/Pj5wdmCblU:1␤␤»
04:00 preflex_ joined, ChanServ sets mode: +v preflex_
Mouq If it were DWIM, it would make *.() into a WhateverCode. 04:00
04:01 preflex left, preflex_ is now known as preflex
Mouq …I can't really think of a time where "*.()" makes sense as acting on Whatever. 04:04
Here's the dumb one-liner that spawned the question in the first place: 04:05
rn: my @u = 0.chr, *.ord.succ.chr ... *; loop { say (({(shift @u).perl} xx 5).map({$_()}))».fmt("% -10s"); sleep 1}
camelia niecza v24-95-ga6d4c5f: OUTPUT«(timeout)»
..rakudo 776f18: OUTPUT«(timeout)"\x[0]" "\x[1]" "\x[2]" "\x[3]" "\x[4]" ␤"\x[5]" "\x[6]" "\x[7]" "\b" "\t" ␤"\n" "\x[b]" "\x[c]" "\r" "\x[e]" ␤"\x[f]" "\x[10]" "\x[11]" "\x[12]" "\x[13]" ␤"\x[14]" "\x[15]" "\x[16]" …»
Mouq .u ෴ 04:11
yoleaux U+0DF4 SINHALA PUNCTUATION KUNDDALIYA [Po] (෴)
04:14 Ghost___ joined 04:22 Ghost___ left 04:30 Mouq left 04:38 fridim__ left 04:42 mattp_ left, mattp_ joined 04:48 logie left 04:52 logie joined 05:18 mattp_ left 05:19 logie left 05:20 mattp_ joined 05:38 btyler left 05:45 xenoterracide left 05:51 FROGGS joined 05:53 SamuraiJack__ joined 06:24 FROGGS left
BenGoldberg .u iota 06:28
yoleaux U+0196 LATIN CAPITAL LETTER IOTA [Lu] (Ɩ)
U+0269 LATIN SMALL LETTER IOTA [Ll] (ɩ)
U+0345 COMBINING GREEK YPOGEGRAMMENI [Mn] (◌ͅ)
06:31 xinming left
BenGoldberg How hard would it be to write APL with perl6? 06:32
06:32 xinming joined 06:37 FROGGS joined 06:43 BenGoldberg left 06:46 denis_boyun joined 06:49 FROGGS left 07:12 FROGGS joined, SamuraiJack__ left 07:15 SamuraiJack__ joined 07:18 darutoko joined 07:19 SamuraiJack__ left 07:22 FROGGS left 07:25 mstwu00 joined 07:32 FROGGS joined 07:49 ssutch left 08:10 denis_boyun left 08:12 Rotwang1 joined 08:18 xinming left 08:23 xinming joined 08:28 xinming_ joined, mstwu00 left 08:32 Rotwang1 left, xinming left 08:36 spider-mario joined 08:39 sqirrel joined 08:46 PZt left 08:57 iSlug joined 09:03 iSlug left
masak good Sunday antenoon, good #perl6 people. 09:05
bonsaikitten I claim it be afternoon, but a good day to all y'all either way 09:06
09:11 PZt joined
lizmat good *, #perl6! 09:11
does anybody know why jakudo dropped to 61% ?
BenGoldberg: shuddering at the thought of APL (it's been 30+ since I last touched that), but generally should be doable, I think 09:12
*years 09:13
FROGGS hi all 09:18
masak hi FROGGS
FROGGS is there an easy way to glue apache2 and perl6 together? 09:19
masak I know the allure of turning Perl 6 into "your language" is very strong... but I look at the 5d20 thing in the backlog, and it seems very quixotic to not just .roll given Die.new("5d20"); or something
good design is knowing when to stop bending the language, and to bend a little yourself :) 09:20
bonsaikitten FROGGS: CGI :D
FROGGS :(
bonsaikitten: don't I need a handler to execute the perl 6 scripts? 09:21
bonsaikitten #! should work
FROGGS k, will try
I feared I had to do more
09:24 SamuraiJack__ joined 09:36 dmol joined, krokite left
FROGGS r: #!/usr/local/bin/perl6 09:41
camelia ( no output )
lizmat r: #foo 09:43
camelia ( no output )
lizmat shebang handling is a property of the shell you're running in, afaik 09:44
FROGGS lizmat: was just a test if this triggers a warning in apache's error log
[Sun Sep 22 11:40:48 2013] [error] [client 127.0.0.1] use of uninitialized value of type Any in string context
[Sun Sep 22 11:40:48 2013] [error] [client 127.0.0.1] in any at src/gen/ModuleLoader.nqp:349
this is method load_setting, but I don't know why that happens when running under apache2 09:45
hmmm, just spitting out an html snippet takes 0.9 seconds :/ 09:46
lizmat "perl6 is fast enough, except when it isn't" :-) 09:47
FROGGS hehe, I hear TimToady saying it like that :o)
masak get off my lawn. I delivered web content using Rakudo Perl back in 2008. 09:48
it was slow as all that, but through various tricks we managed to bring the typical response time from 17 s to 1.5 s. 09:49
lizmat don't we have a Perl6 PSGI layer already ?
masak HTTP::Server::Simple claims to have PSGI support. 09:50
so yeah, there's no legitimate reason not to kill CGI. with fire.
lizmat FROGGS: fwiw, apache2 / mod_perl is on the way out with many outfits, including e.g. Booking
09:51 hummeleB1 joined
FROGGS so, I'd use HTTP::Server::Simple together with CGI/FastCGI or mod_perl? 09:53
GlitchMr Perl 6? Web?
Last time I checked, sending a webpage took 1 second.
lizmat FROGGS: just HTTP::Server::Simple and your script as a PSGI app 09:54
plackperl.org/psgi-faq.html for some Plack / PSGI background 09:55
09:57 clkao left
FROGGS so, still then configure my apache like before? AddHandler cgi-script .pl? 09:58
lizmat I don't think apache is in that picture anymore 10:00
FROGGS that is a problem
lizmat ah, ok, I didn't know apache was a prerequisite
sorry for the noise, then
FROGGS because the other ten webpages/vhosts would be sad if apache is not the listener enymore
anymore*
thanks anyway for the tips, I really appreciate it 10:02
lizmat is bored running a 5 minute make, perl6 -e '01' cycle trying to find out where it gets into a RAM gobbling loop 10:03
FROGGS :/ 10:04
lizmat I guess I should be glad it's only 5 minutes per iteration
FROGGS could be worse, yeah 10:05
hmmm, maybe I write my webapp in nqp :P
lizmat FROGGS: or run this on another port, and reverse proxy to it from apache2 10:11
FROGGS hmmmm, that sounds good
10:14 SamuraiJack joined
lizmat
.oO( sometimes I forget that these tricks, that I have been using since ~1995, may be new to other people )
10:15
10:16 SamuraiJack__ left 10:20 clkao joined
FROGGS well, not new, but I forgot about that right now :o) 10:21
I was thinking about a listener on another port a few days ago, and we have reverse proxies at work... 10:22
but sometimes the connection between these is not properly established correctly in my head 10:23
lizmat ok, seems X::Comp::Group.gist is sending us into oblivion 10:30
masak lizmat++ # perseverence 10:33
10:34 dayangkun_ joined 10:35 dayangkun_ left, eternaleye left 10:37 dayangkun left 10:40 spider-mario left 10:41 spider-mario joined 10:46 spider-mario left 10:47 spider-mario joined
itz_ shouldn't the debugger be in star? 10:47
10:50 hummeleB1 left
lizmat isn't it ? 10:54
10:58 nebuchadnezzar left 11:01 sqirrel left
lizmat the rabbit hole goes deeper: X::Comp.gist 11:03
11:03 PacoAir joined
lizmat for @.modules.reverse[1..*] seems to be the line that hangs 11:08
what does that actually mean ??? 11:11
moritz added/changed that on 30 August 2012 11:12
11:13 nebuchadnezzar joined
lizmat r: my @a=1,2,3; say @a.reverse[1..*] # also hangs 11:14
camelia rakudo 776f18: OUTPUT«2 1␤»
11:15 wtw joined
lizmat ah, not here, but on my perl it does 11:15
11:17 darutoko left
lizmat removing the [1..*] solves the problem 11:19
but I'm still not sure what this is supposed to do:
reverse the array and drop the originally last element ?
11:22 darutoko joined 11:25 iSlug joined 11:35 EvanTeitelman joined
lizmat Anybody have any suggestions about this AST gist.github.com/lizmat/6659103 for $ perl6 --target=ast -e 'my @a; @a.reverse[1..*] 11:36
it does not seem to call any of the [Callable] candidates, so I'm assuming it's generating 1..*
r: say (1..*).list 11:38
camelia rakudo 776f18: OUTPUT«(timeout)»
lizmat seeing the same behaviour for @a.reverse[1..*]
tadzik .gist of a list
11:39 iSlug left
lizmat tadzik: shorter 11:39
r: 1 for 1..*
camelia rakudo 776f18: OUTPUT«(timeout)» 11:40
tadzik well, what did you expect? :P
sink?
lizmat ok, then what should: @a.reverse[1..*] do ? 11:43
11:44 rindolf joined
FROGGS r: map { 1 } 1..* 11:45
camelia rakudo 776f18: OUTPUT«===SORRY!=== Error while compiling /tmp/Rq2556pPxW␤Two terms in a row␤at /tmp/Rq2556pPxW:1␤------> map { 1 } ⏏1..*␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modi…»
FROGGS r: map { 1 }, 1..*
camelia rakudo 776f18: OUTPUT«(timeout)»
FROGGS r: map { 1 }, 1..*; 1
lizmat still greedy
camelia rakudo 776f18: OUTPUT«(timeout)»
FROGGS gah 11:46
tadzik something is fishy, yes
FROGGS r: my @a = map { 1 }, 1..*; 1
w/e
lizmat r: my @a=^10; say @a.reverse[1..*] # what is this really supposed to do ?
camelia rakudo 776f18: OUTPUT«(timeout)»
rakudo 776f18: OUTPUT«8 7 6 5 4 3 2 1 0␤»
lizmat r: my @a=^10; say @a[1..*] # what is this really supposed to do ? 11:47
camelia rakudo 776f18: OUTPUT«1 2 3 4 5 6 7 8 9␤»
lizmat just skip the first element ?
aha, I guess I know what's going on now
because [] is now a subcall, the whatever is not able to get at the .elems of the array anymore 11:48
masak yes, just skip the first element.
lizmat would that be a valid theory?
masak it needs to get at it in a different way, but surely it should still be just as possible?
11:51 eternaleye joined
lizmat I guess we need to generate different AST for the Whatever case 11:52
11:52 eternaleye left 11:53 krokite joined
lizmat which would be a new thing for me... 11:54
FROGGS: any suggestions?
FROGGS is thinking
lizmat simplest case: my @a; @a[1..*]
FROGGS r: my @a; @a[1..*]
camelia ( no output )
FROGGS lizmat: this only hangs on your box, right? 11:55
lizmat in the method2sub branch
FROGGS do you have additional local changes?
lizmat nope
FROGGS k 11:56
lizmat just debug statements that I just removed
so double checking now, will tell you in about 4 mins
FROGGS k, building too 11:58
lizmat yup, perl6 -e 'my @a; @a[1..*]' in method2sub as on github 12:02
hangs
.tell jnthn in method2sub, my @a; @a[1..*] hangs because, most likely, the whatever cannot see the .elems of the object anymore 12:04
yoleaux lizmat: I'll pass your message to jnthn.
FROGGS lizmat: which candidate gets called, do you know that? 12:06
lizmat I don't think the candidate gets called
it seems to expect a QAST::WVal(Int) for the infix<..> 12:08
I guess the WVal is not set up correctly 12:09
looking at perl6 --target=ast -e 'my @a; @a[1..*]'
12:09 sqirrel joined
FROGGS gist.github.com/FROGGS/88fe1bfcd2385b027656 12:09
lizmat will try that 12:10
FROGGS lizmat: the ast seems fine
lizmat oops, nothing to try yet
colomon Is Grammar::Debugger broken atm?
lizmat except that the WVal on method2sub is probably not set up correctly 12:11
colomon > rf
Cannot modify an immutable value
in block at lib/Grammar/Debugger.pm:100
lizmat colomon: could be 12:12
FROGGS: what sets up the WVal in either case ?
FROGGS this: perl6 --target=ast -e '1' 12:13
so, decint or so
12:14 eternaleye joined 12:19 eternaleye left
FROGGS r: multi sub test(\SELF, Callable $block) { say 1 }; my @a; test(@a, 1..*) 12:20
camelia rakudo 776f18: OUTPUT«Cannot call 'test'; none of these signatures match:␤:(\SELF, $block)␤ in sub test at /tmp/WmMVWXS6dZ:1␤ in block at /tmp/WmMVWXS6dZ:1␤␤»
FROGGS r: multi sub test(\SELF, Whatever) { say 1 }; my @a; test(@a, 1..*)
camelia rakudo 776f18: OUTPUT«Cannot call 'test'; none of these signatures match:␤:(\SELF, Whatever )␤ in sub test at /tmp/p287VEdfnw:1␤ in block at /tmp/p287VEdfnw:1␤␤»
FROGGS r: multi sub test(\SELF, Positional \pos) { say 1 }; my @a; test(@a, 1..*) 12:21
camelia rakudo 776f18: OUTPUT«1␤»
FROGGS ahh
lizmat indeed
hmmm...
12:24 krokite left
FROGGS I added debug statements, so in a few minutes we should know which candidate gets called (if we end up in one) 12:25
lizmat yup, pos candidate 12:27
which then does an pos.map{}.eager.Parcel
which then hangs 12:28
12:29 eternaleye joined 12:30 spider-mario left
lizmat aha, ok 12:30
found it
FROGGS multi sub postcircumfix:<[ ]>( \SELF, $pos ) is rw { # NOT SELECTED
nqp::say($?LINE);
fail "Cannot use negative index $pos on {SELF.WHAT.perl}" if $pos < 0;
SELF.at_pos($pos);
}
lizmat seems I lost some code in the positional candidare
12:30 spider-mario joined
FROGGS it calls this, over and over again 12:30
lizmat yup,
I think I found the pb now 12:31
FROGGS cool
lizmat FROGGS++
FROGGS :o)
glad to help :o)
you have to fix moarvm now in exchange :P 12:32
lizmat ok, what do I need to do ?
12:32 Mouq joined
FROGGS I even can't explain what goes wrong 12:32
lizmat I guess I need to clone moarvm now 12:33
12:33 eternaleye left
FROGGS it has something todo with lexial scopes, and it can't find its outer scope under some circumstances 12:33
12:33 eternaleye joined
FROGGS I guess it is too hairy for all except jnthn 12:33
lizmat then most definitely too hairy for me
12:34 Rotwang1 joined, Rotwang1 left
FROGGS yeah, I wasn't that serious about the need for exchange :o) 12:34
lizmat r: my @a; @a[1..*]:k # should also hang 12:35
camelia ( no output )
lizmat Hmmm...
12:36 spider-mario_ joined
FROGGS it does, locally 12:37
12:37 spider-mario left
FROGGS even if the output is not identical 12:37
lunch& 12:40
12:40 denis_boyun joined
lizmat $ perl6 -e 'my @a=^10; say @a[1..*]' 12:58
1 2 3 4 5 6 7 8 9
:-)
12:59 lue left
FROGGS push push push :o) 13:02
lizmat not before I run a spectest 13:04
$positions.map( { last if $_ >= $list.gimme( $_ + 1 ); $_} ).eager.Parcel; # wonder whether $positions[0] .. $list.elems wouldn't do the trick either 13:06
timotimo the first one is lazy, the second one is eager. dunno if it makes a difference really 13:08
dalek kudo/method2sub: 1b704cc | (Elizabeth Mattijsen)++ | src/core/array_slice.pm:
Handle [1..*] properly (somehow got lost in the refactor :-( )
13:11
lizmat yes, but the result of the map is made eager, so I don't think there is a difference 13:12
timotimo the result is made eager, but there's a last in it
13:12 lue joined 13:13 sqirrel left
lizmat there's another reason I just realize 13:13
$positions doesn't need to have contiguous values in them 13:14
*it
timotimo gimme returns an element from the list, yes? 13:15
lizmat no, just reifies, afaik
timotimo so what's the if for? :/
lizmat it returns the index of the last element reified
timotimo ah, ok 13:16
so basically this stops as soon as the gimme doesn't reify a new element?
lizmat yes, that's how I understand it
13:17 spider-mario_ left, denis_boyun left
timotimo doesn't know 13:17
13:18 spider-mario joined
lizmat # return the number of elements we have now 13:18
$count
I guess it's .elems really, not index
masak it is. 13:20
that's why *-1 is the index of the last element of the array, for example, because it's .elems-1 13:21
lizmat seems t/spec/S29-os/system.t is failing the last 2 tests, timotimo ? 13:27
(on OS X)
ah, of course, I didn't merge the hot fix yet
some :v tests still failing, will look at that after some cycling& 13:29
13:33 EvanTeitelman left 13:40 pmurias joined
pmurias hi 13:40
diakopter hi 13:41
tadzik hi 13:42
diakopter hi 13:43
masak hi
diakopter hi 13:45
.
timotimo hi
oh shit i missed it ;(
diakopter . 13:46
13:51 EvanTeitelman joined
masak he said with a wink and a frown 13:51
13:57 cogno joined 14:04 cogno left 14:05 sqirrel joined 14:06 zakharyas joined
dalek kudo-js: 9dbb04d | (Pawel Murias)++ | runtime/sixmodel.js:
Stop cloned objects from having a pointer to the SC of the orginal.
14:06
kudo-js: 891eab7 | (Pawel Murias)++ | / (5 files):
Refactor CodeRef to a seperate file.
14:09 EvanTeitelman left 14:10 kaare_ joined, ggoebel joined 14:14 cogno joined
TimToady points out that 1..* is not ever going to ask for .elems; it's just an infinite range 14:15
14:15 EvanTeitelman joined, spider-mario left
TimToady the * in 1..* behaves differently from *-1 14:15
masak good point. 14:16
TimToady and .[1..*] quits because the range runs off the end, not becauase .elems was fed to it
14:17 ajr joined
TimToady S09:218 14:17
synopsebot Link: perlcabal.org/syn/S09.html#line_218
14:18 ajr is now known as Guest30747, Guest30747 is now known as ajr_ 14:20 fridim__ joined 14:21 cogno left 14:24 xinming_ left 14:25 cogno joined, EvanTeitelman left 14:26 cogno left, cogno joined 14:28 mtj_ joined 14:35 cogno left 14:42 iSlug joined 14:56 xinming joined
GlitchMr ` 15:13
masak rn: say ord('`')
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«96␤»
GlitchMr My mistake
masak rn: say [+] "My mistake".lc.subst(" ", "").comb>>.ord >>->> ord("a") >>+>> 1 15:15
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«116␤»
masak rn: say 116 - 96
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«20␤»
masak rn: say "GlitchMr".chars * 2.5 15:16
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«20␤»
masak coincidence? I think not! 15:17
GlitchMr ;-)
15:18 EvanTeitelman joined
GlitchMr olive.undo.it/log?channel=perl6&...30502#1281 15:19
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...ml?id=1281
GlitchMr coincidence? I think not!
15:25 spider-mario joined 15:27 Rotwang1 joined 15:33 kaare_ left
masak synopsebot: false positive. shame on you. 15:34
synopsebot: clearly when there is \H *before* the '#', you shouldn't... g'ah.
15:36 xenoterracide joined
masak GlitchMr: yes, I tend to use that phrase when making fun of a conspiracy theory. I believe I picked it up from Slashdot many years ago. 15:36
15:41 EvanTeitelman left 15:43 PZt left
colomon github.com/colomon/perl6-WSN 15:49
masak .oO( it was definitely Wirth it ) 15:53
colomon: so, {} means 0..* repetitions, it seems. what do () and [] mean? 15:54
colomon masak: en.wikipedia.org/wiki/Wirth_syntax_notation 15:55
masak ah, [] means 0..1
colomon () is grouping, [ ] is optional
masak and parens are just for gr... right.
I gathered from wsn2p6 :)
colomon yes, it's pretty straightforward there.
may still have bugs, I'm just now trying the code it outputs. 15:56
this is me exercising my laziness, as I have a 344 WSN grammar I'd like to convert to p6 15:57
*344 line
16:03 denis_boyun joined 16:12 rindolf left, rindolf joined 16:14 rindolf left, rindolf joined
FROGGS lizmat++ # seems to work 16:16
16:19 ajr_ left, rindolf left
colomon FROGGS: that's not fair at all. lizmat clearly works hard. ;) 16:19
16:21 rindolf joined
GlitchMr oh noes, I killd IRC logs. 16:21
(well, at least olive.undo.it/log?channel=perl6 does work) 16:22
Oh, it's just me.
FROGGS colomon: it wasn't meant that way... 16:23
:P
colomon FROGGS: yes, I know. :) 16:24
16:27 rindolf left 16:28 rindolf joined, iSlug left 16:31 ajr joined, ajr is now known as Guest98283, Guest98283 is now known as ajr_ 16:32 rindolf left
masak meh. I'm editing a gist, and I keep feeling that clicking "Edit", editing the text in a textarea, and then "Update gist". I wish there were a "Quick edit" operation where I could highlight some text, hit a key to get a small popup edit box, make the change, and then just hit a key again to save the change. 16:33
16:33 rindolf joined
masak reloading the page twice just to make a small change feels so 1990s. 16:33
colomon I got the output from my WSN to perl 6 grammar convertor working. But I had to manually change two of the rules to regexes to get it working. :(
16:37 rindolf left 16:38 rindolf joined 16:39 denis_boyun left 16:43 rindolf left, rindolf joined 16:46 rindolf left 16:47 rindolf joined 16:49 rindolf left, rindolf joined
FROGGS masak: one problem too is that the edit button is at the top... which is not very handy if you spotted something to change on a bigger gist 16:57
17:01 rindolf left, rindolf joined 17:02 rindolf left, rindolf joined, rindolf left, rindolf joined
masak FROGGS: troo. context is lost. 17:03
FROGGS and it is work to scroll all up
masak [Home] 17:04
timotimo you don't have a "pos 1" key on your keyboard?
FROGGS so, a double click on the thing to change might be nicer
timotimo: I dont use that on laptops usually
timotimo well ... 17:05
17:05 BenGoldberg joined 17:08 rindolf left, rindolf joined 17:10 Rotwang1 left 17:13 rindolf left 17:14 rindolf joined
dalek albot: 43baccc | Mouq++ | evalbot.pl:
Un-bug (fix?) utf8 truncation (Issue #3)
17:14
pmurias colomon: what grammar are you converting from WSN to perl6? 17:15
colomon ISO-10303 part 11's grammar 17:16
github.com/colomon/perl6-WSN/blob/...04-raw.wsn
17:17 rindolf left 17:18 rindolf joined 17:22 BenGoldberg left
colomon r: say '\q' 17:22
camelia rakudo 776f18: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀ ␀␀␀E␀␀␀r␀␀␀r␀␀␀o␀␀␀r␀␀␀ ␀␀␀w␀␀␀h␀␀␀i␀␀␀l␀
colomon errrr....
timotimo those golfs get shorter and shorter each day
colomon n: say '\q'
camelia niecza v24-95-ga6d4c5f: OUTPUT«␤»
Mouq Oh no! Sorry 17:23
colomon rn: say '\'
Mouq Bad Mouq
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/N08o7EIFgO line 1:␤------> say⏏ '\'␤␤Confused at /tmp/N08o7EIFgO line 1:␤------…»
..rakudo 776f18: OUTPUT«===SORRY!=== Error while compiling /tmp/R_tvmU_ReS␤Unable to parse expression in single quotes; couldn't find final "'"␤at /tmp/R_tvmU_ReS:1␤------> say '\'⏏<EOL>␤ expecting any of:␤ argument list␤ prefix or…»
colomon rn: say '\\'
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«\␤»
timotimo one day it'll be enough to say "i'm going to ask you a very personal question" and it'll blow up
camelia: don't worry, i'm not actually going to ask you a personal question 17:24
geekosaur heh
lizmat is back, and not working yet :-)
FROGGS *g*
Mouq Wait, I don't think that's my fault... What is '\q' doing? 17:25
geekosaur thinks that thing above was not Mouq's fault at all but a longstanding rakudo weirdness (possibly related to mixing different representations in an error message) 17:27
errr
^different rep^different unicode rep
notably, that looks a lot like utf32 being output as utf8 17:28
Mouq That's my thought as well…
moritz \o 17:30
colomon geekosaur++
timotimo i thought it kinda looked like stack data; like lots of small integers
17:33 EvanTeitelman joined, rindolf left 17:36 EvanTeitelman left 17:38 ssutch joined 17:43 denis_boyun joined 17:48 denis_boyun left
geekosaur timotimo: all the right characters are there but there are 3 NULs being output with each one 17:48
Mouq i.e., "\x[0]", i.e. buf8(0).new.decode("utf8") 17:51
*buf8.new(0) 17:52
17:59 benabik left 18:00 benabik joined 18:05 ajr_ left
colomon anyone know if using :i in grammars works yet? 18:10
pmurias it should 18:11
colomon it's spec'd, yes.
looks like it compiles, at least 18:12
colomon would like to know why ISO 10303 defines all the keywords in lower case, but always uses them upper case. :\ 18:13
18:17 darutoko left
masak rn: say "AAAAAA" ~~ / :i a / 18:26
camelia rakudo 776f18, niecza v24-95-ga6d4c5f: OUTPUT«「A」␤␤»
masak colomon: my p6eval is shorter than your question :P
colomon masak: but do grammars use the same code? That is the question. 18:27
I'll have my generated grammar capable of testing it shortly. ;)
18:29 ajr joined, ajr is now known as Guest40947 18:30 Guest40947 is now known as ajr_
masak colomon: yes, grammars use the same code. 18:30
colomon: there are not two engines, one running regexes and another running grammars. it's all the same code paths.
timotimo well, there's the NFA and the straight up regex matching, so *kind of* two engines, but not really 18:33
colomon masak: \o/
18:36 SamuraiJack left 18:37 denis_boyun joined 18:39 spider-mario left
masak timotimo: huh? 18:39
timotimo that's a slightly different mode of parsing, but they are just part of the same process 18:40
and the nfa part isn't always a part of the matching
18:40 benabik left
masak right. 18:41
18:42 spider-mario joined 18:47 denis_boyun left 18:48 SamuraiJack joined 18:49 benabik joined
colomon is now debugging a 334 line auto-generated grammar. ;) 18:51
diakopter o_O
18:53 Mouq left
colomon mind you, it hasn't successfully parsed anything yet 18:53
masak colomon: did you consider writing tests for both the code generation and using the generated result to parse stuff? 18:56
colomon masak: I did consider it
masak colomon: I tend to forget TDD in such situations, even when it's really appropriate.
colomon it's not really clear to me how to write effective tests for this. 18:57
In general, that is -- and in specific, at the moment I'm hand modifying the generated grammar to see what works 18:58
I can confirm that :i works in grammars, btw 18:59
I'm running Grammar::Tracer, and it's getting past there.
masak colomon: is parse($wsn).parse($input), $expected_output; 19:00
(or equivalent)
colomon the problem is, you can have multiple valid outputs for one grammar
masak oh, sorry, I meant 19:01
ok parse($wsn).parse($input1)
lue hello world o/
masak not parse($wsn).parse($input2)
lue! \o/
nok*
colomon oh, wait, I see, you're running parse on the output of the parser. that is an interesting notion, indeed. 19:02
masak yes, that was my main point.
treating the generated result as a black box, and just testing for its expected semantics.
colomon does that work? I assumed I'd have to write out a file, or at least call eval
masak that was the handwaving part.
in these cases, I tend to write the ideal API client code first, and then the API ;) 19:03
19:06 sqirrel left
arnsholt WSN sounds like another ideal place for slangs \= 19:07
Er, =)
(Keyboard-layout-confusion strikes again)
colomon arnsholt: :)
I'm not wildly optimistic about the prospects, just because it seems WSN is not really well-specified. 19:09
19:10 SamuraiJack left
masak colomon: what about it doesn't feel well-specified? 19:10
colomon Using p6 terminology, some rules want :sigspace and some don't, and there's no rhyme or reason I can see for it. 19:11
masak oh, and that's why you're having trouble with "regex" vs "rule"...?
colomon yes, exactly 19:12
sergot hi! o/
colomon if you look at that one on the wikipedia page, you'll see that it makes no allowances for whitespace 19:13
meaning if you take it without :sigspace, it cannot parse itself
but at the same time, if you add :sigspace everywhere, then identifiers can have spaces in them.
also, it never defines "letter" or "character" 19:14
19:14 benabik left 19:15 benabik joined
masak sergocie! \o/ 19:16
sergot masak! \o/ 19:20
19:35 ssutch left 19:43 gdeepi joined
gdeepi can anyone help me with perl script to download youtube video _ 19:50
19:51 ssutch joined
FROGGS gdeepi: is this a perl 6 related question? 19:51
gdeepi i want a perl script ..is this channel not for that ? 19:53
masak gdeepi: note the '6' at the end of '#perl6' :)
diakopter gdeepi: you probably have perl version 5..
FROGGS and yes, that makes a huge difference :o) 19:54
gdeepi ok am not sure act the diff ..if this question is not meant to b answered here .sorry abt that
geekosaur likes how they joined both #perl and #perl6 but asked here instead of there 19:55
colomon wonders what the answer is
geekosaur also wonders what's wrong with youtube-dl
gdeepi yes i hv ver 5 but i guess i can upgrade it to 6 ! isn't it ?
colomon gdeepi: but no one has written a youtube downloader in perl 6. 19:56
gdeepi ok got it
colomon is not sure if there is one in perl 5 or not.
gdeepi thanks colomon !
19:57 gdeepi left
colomon match! 20:07
20:10 ssutch left
masak \o/ 20:13
colomon turns out rule doesn't work at all, the grammar cannot ratchet. 20:14
so the first half is regex, and the second half is regex :sigspace 20:15
(this is the huge ISO-10303 part 11 grammar)
20:17 denis_boyun joined
timotimo ah, interesting 20:20
for some reason, my lexical-to-local optimization is a bit too shy for simple things 20:22
20:22 zakharyas left
pmurias timotimo: how do you test your optimalisations? 20:26
timotimo i see if they work by using --target=optimize and if they do work, i run perl6-bench with all the microbenchmarks for nqp 20:27
(actually, i did it the other way around this time, which was dumb)
20:37 PacoAir left 20:40 xenoterracide left
timotimo oh! 20:50
interesting
the outermost block doesn't have a Stmts as its first child
instead, it has a QAST::Var(lexical @ARGS :decl(param))
20:50 denis_boyun left
timotimo that's why my optimization wouldn't optimize the outermost block in a program 20:51
20:51 FROGGS left 20:54 logie joined 20:56 ajr_ left
dalek p/r-lex-to-local: 7642d39 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
handle the outermost block as well. it's special.
21:01
timotimo i wonder why most of the benchmarks don't run at all with current nqps. 21:09
21:10 xinming left 21:11 xinming joined 21:15 spider-mario left 21:19 denis_boyun joined
[Coke] came down with narsty head cold Thursday night. still not right. 21:25
timotimo oh no! :(
21:34 flussence left, flussence joined
masak [Coke]: get well soon. 21:37
dalek rl6-roast-data: fb978ed | coke++ | / (5 files):
today (automated commit)
21:56
21:58 pmurias left 21:59 PZt joined
lizmat [Coke]: best wishes! has rakudo.jvm also caught a cold at 61.15% ? 22:01
timotimo seems like
22:02 denis_boyun left
woolfy [Coke]: did I infect you in Frankfurt? I should not have touched you at all. I am dangerous! 22:02
geekosaur misreads "did I infer you..." 22:03
[Coke] woolfy: my wife was ill when I returned, and my daughter was before I left. It was -probably- not you. 22:08
woolfy I hope so. I still don't know what is wrong with me. Well, some bits I know, harharhar... :->
So, leaves me with a "get well soon" and a virtual bear-hug. Done. 22:10
22:11 EvanTeitelman joined
[Coke] woolfy: ow 22:11
lizmat: *cough* maybe. 22:13
22:24 EvanTeitelman left 22:30 logie left 22:47 dmol left 22:51 BenGoldberg joined
dalek kudo/method2sub: 42a5487 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Convertd SLICE_ONE to use slurpy hash + adapted multi candidates accordingly

This will now also properly notice invalid combinations, and unknown named params.
23:06
lizmat more tomorrow, first sleep&
dalek gs.hs: acfb3a5 | coke++ | t/spectest.data:
don't run this test until we :delete
23:24
ast: af0d83a | coke++ | S29-os/system.t:
pugs fudge

use BEGIN with a block for pugs
23:25
23:26 dmol joined 23:36 logie joined
dalek ecza: 434ff8f | coke++ | t/spectest.data:
can't run :delete tests...
23:36
23:41 logie left
[Coke] colomon: had to eliminate a test about array:delete for niecza 23:42
23:43 dmol left
masak 'night, #perl6 23:45
[Coke] ~~ 23:46
23:51 mcglk joined 23:52 mcglk left, mcglk joined