»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:06 arlinius joined
tadzik lue: the former is deprecated 00:16
00:22 cognominal__ left 00:25 Woodi_ left, Woodi joined, jerome left 00:26 jerome joined 00:28 dayangkun joined 00:43 Chillance left 00:47 erkan left 00:55 alec__1 is now known as alec_ 01:13 anuby joined 01:16 hypolin joined, kst` joined 01:18 kst left 01:24 shinobicl joined 01:29 sevin left 01:39 UberFoX left 01:42 sevin joined 01:49 shinobicl left 01:52 sampo joined 01:56 sampo left 01:57 sampo joined 02:02 vmspb left 02:12 MikeFair left 02:15 _jaldhar joined, jaldhar left 02:17 MikeFair_ joined 02:24 MikeFair__ joined 02:27 MikeFair_ left 02:30 arlinius left, MikeFair__ left 02:34 MikeFair joined 02:39 MikeFair left 02:48 raiph_ joined
lue r: my %h; my %g; :(%g, %h) := \(1=>2,3=>4); say %h.perl; say %g.perl 02:55
p6eval rakudo 935c90: OUTPUT«This type cannot unbox to a native string␤ in method Capture at src/gen/CORE.setting:5104␤ in block at /tmp/tj28pwJCK5:1␤␤»
02:56 MikeFair joined 03:02 MikeFair left, MikeFair__ joined 03:12 swarley- joined 03:14 swarley| left 03:26 swarley| joined 03:29 swarley- left 03:34 dayangkun left, skids left 03:35 skids joined 03:43 dayangkun joined 03:46 arlinius joined 03:53 TimToady left 04:07 preflex_ joined 04:08 preflex left, preflex_ is now known as preflex 04:21 sevin left 04:42 dayangkun left 05:00 shinobicl joined 05:01 hulu joined
hulu helo 05:01
r: my $step = 3; say map({ '192.168.1.' ~ "$_\n"; }, (0, { $^a + $step } ... (256 - (256 % $step))); 05:02
p6eval rakudo 935c90: OUTPUT«===SORRY!===␤Unable to parse expression in argument list; couldn't find final ')'␤at /tmp/b2vUWu9iT9:1␤------> ^a + $step } ... (256 - (256 % $step)));⏏<EOL>␤ expecting any of:␤ postfix␤ infix or meta-infix␤ …
hulu why this can't run 05:03
r: my $step = 3; say map({ '192.168.1.' ~ "$_\n"; }, (0, { $^a + $step } ... ((256 - (256 % $step)) / $step) * $step));
p6eval rakudo 935c90: OUTPUT«192.168.1.0␤ 192.168.1.3␤ 192.168.1.6␤ 192.168.1.9␤ 192.168.1.12␤ 192.168.1.15␤ 192.168.1.18␤ 192.168.1.21␤ 192.168.1.24␤ 192.168.1.27␤ 192.168.1.30␤ 192.168.1.33␤ 192.168.1.36␤ 192.168.1.39␤ 192.168.1.42␤ 192.168.1.45␤ 192.168.1.48␤ 192.168.1.51␤ 192.168.1.54␤ 192…
hulu why this run 05:04
geekosaur first one loses for exactly the reason it says. specifically you lost the closing ) for the map
try counting parens
hulu r: my $step = 3; say map({ '192.168.1.' ~ "$_\n"; }, (0, { $^a + $step } ... (256 - (256 % $step)))); 05:05
p6eval rakudo 935c90: OUTPUT«192.168.1.0␤ 192.168.1.3␤ 192.168.1.6␤ 192.168.1.9␤ 192.168.1.12␤ 192.168.1.15␤ 192.168.1.18␤ 192.168.1.21␤ 192.168.1.24␤ 192.168.1.27␤ 192.168.1.30␤ 192.168.1.33␤ 192.168.1.36␤ 192.168.1.39␤ 192.168.1.42␤ 192.168.1.45␤ 192.168.1.48␤ 192.168.1.51␤ 192.168.1.54␤ 192…
hulu geekosaur: thx
05:07 juiko joined 05:08 Tabrenus joined 05:09 shinobicl left 05:10 sevin joined
hulu r: my $step = 3; say map({ '192.168.1.' ~ "$_\n"; }, (0, { $^a + $step } ... (256 - (256 % $step)))); 05:11
p6eval rakudo 935c90: OUTPUT«192.168.1.0␤ 192.168.1.3␤ 192.168.1.6␤ 192.168.1.9␤ 192.168.1.12␤ 192.168.1.15␤ 192.168.1.18␤ 192.168.1.21␤ 192.168.1.24␤ 192.168.1.27␤ 192.168.1.30␤ 192.168.1.33␤ 192.168.1.36␤ 192.168.1.39␤ 192.168.1.42␤ 192.168.1.45␤ 192.168.1.48␤ 192.168.1.51␤ 192.168.1.54␤ 192…
hulu geekosaur: what's means of $^a 05:12
geekosaur $^ indicates an implicit parameter; rather than declaring them (which would be ``-> $a { ... }'') you just use it, and the first $^something gets the first parameter and the next different $^something will get the second, etc. 05:13
it doesn't care what you call them, only the order of use matters
hulu 0, { $^a + $step } ... 255 where the parameter 05:14
geekosaur the thing there that is doing parameters is map 05:15
wait
actually that's a good question, hm
oh, I see 05:16
it'sa range expression with a WhateverCode; $^a is the previously generated value 05:17
05:17 xinming_ joined
geekosaur I think you could also say (0, * + $step ... (256 - (256 % $step))) 05:17
benabik It's a range expression with a code block. A WhateverCode is a auto-generated block from a Whatever (*) 05:18
... Like that.
05:19 am0c joined 05:21 xinming left 05:23 Patterner left
hulu r: say (0, * + 3 ... (256 - (256 % 3))) 05:24
p6eval rakudo 935c90: OUTPUT«0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 105 108 111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159 162 165 168 171 174 177 180 183 186 189 192 195 198 201 204 207 210 213 216 219 222 225…
05:26 Psyche^ joined, Psyche^ is now known as Patterner
hulu geekosaur: what a WhateverCode 05:26
geekosaur I may be using the wrong term for this one... 05:27
actually I think the *+3 is a whatevercode, yours is just a block
benabik You can also give a code block for the last entry. So (0, *+3 ...^ * >= 256) 05:28
Er. s/>=/>
geekosaur so, you have a list defined as (start, next ... end) 05:29
next and end could be literal numbers, or whatevercode (thing using "*" as the previous value to specify the next or final value as apporpriate) or a {block} which can use a parameter the same way
if you use a block, you either need to use a pointy block (-> $a { ... }) or use an implicit parameter like $^a 05:30
if you use whatevercode, it's just * (as, for example, * + 3)
hulu what (start, next ... end) 05:31
geekosaur (0, * + $step ... (256 - (256 % $step)))
it's a range
hulu the start is must have
geekosaur start at 0, next item is * + $step ... end is 256 - (256 % $step)
benabik S03:1779 05:32
05:32 kaleem joined
benabik It's a sequence. There is also a range operator, which is somewhat simpler. 05:32
geekosaur is heading back to bed now...
hulu benabik: what the parameter of {$^a + $step} 05:35
benabik hulu: The previous value of the sequence.
hulu benabik: what the parameter of {$^a + $^b + $step} 05:37
benabik hulu: When given a closure that takes N arguments, the sequence calls it with the previous N values of the sequence. 05:38
05:45 alec_ is now known as alec
hulu r: say 0, 1, 2, { $^a + 1 } ... 255 05:45
p6eval rakudo 935c90: OUTPUT«0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91…
05:45 juiko left, alec is now known as ohrmazd
hulu benabik: why this not 0 1 2 0 1 2 05:45
05:45 ohrmazd is now known as alec
benabik hulu: Each value is produced by giving the block the last value. So {$^a + 1} gets 2 the first time, returning 3. Next time it gets 3 and gives 4. And so on. 05:46
05:49 lestrrat is now known as o_, o_ is now known as lestrrat
hulu r: say 0, 1, 2, { $^a + $^b + 1 } ... 255 05:50
p6eval rakudo 935c90: OUTPUT«(timeout)»
hulu r: say 0, 1, 2, { $^a + $^b + 1 } ... 3
p6eval rakudo 935c90: OUTPUT«(timeout)»
benabik r: say 0,1,2,*+*+1 ... * > 100
p6eval rakudo 935c90: OUTPUT«0 1 2 4 7 12 20 33 54 88 143␤»
benabik Sequences only stop on exact matches. 05:51
hulu r: say 0, 1, 2, { $^a + $^b + 1 } ... > 100 05:52
p6eval rakudo 935c90: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix > instead␤at /tmp/MsxQc1lKrU:1␤------> say 0, 1, 2, { $^a + $^b + 1 } ... >⏏ 100␤»
hulu r: say 0, 1, 2, { $^a + $^b + 1 } ... * > 100
p6eval rakudo 935c90: OUTPUT«0 1 2 4 7 12 20 33 54 88 143␤»
hulu $^a is 2 $^b is 1 05:53
benabik: ok?
benabik I think it's the other way around.
r: say 0,1,2,{say $^a; say $^b; $^b+1}...5 05:54
p6eval rakudo 935c90: OUTPUT«1␤2␤2␤3␤3␤4␤0 1 2 3 4 5␤»
benabik goes AFK
hulu r: say 0,1,2,{say $^a; say $^b;}...5 05:55
p6eval rakudo 935c90: OUTPUT«(timeout)1␤2␤2␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤…
hulu benabik: what's means 1␤2␤2␤3␤3␤4␤0 1 2 3 4 5 05:57
r: say 0,1,2,{say $^a; say $^b;say $^c; $^b+1}...5 06:08
p6eval rakudo 935c90: OUTPUT«0␤1␤2␤1␤2␤2␤2␤2␤3␤2␤3␤3␤3␤3␤4␤3␤4␤4␤0 1 2 2 3 3 4 4 5␤»
hulu r: say 0,1,2,{say $^a; say $^b;say $^c; $^b+1}...5 06:09
p6eval rakudo 935c90: OUTPUT«0␤1␤2␤1␤2␤2␤2␤2␤3␤2␤3␤3␤3␤3␤4␤3␤4␤4␤0 1 2 2 3 3 4 4 5␤»
hulu r: say 0,1,2,{say $^a; say $^b;say $^c; $^c+1}...5
p6eval rakudo 935c90: OUTPUT«0␤1␤2␤1␤2␤3␤2␤3␤4␤0 1 2 3 4 5␤»
hulu n: say 0,1,2,{say $^a; say $^b;say $^c; $^c+1}...5 06:12
p6eval niecza v24-18-gaf64300: OUTPUT«012{ ... }␤»
06:13 dayangkun joined 06:28 viewer joined 06:33 drbean joined 06:35 FROGGS joined 06:57 PacoAir joined 07:03 PacoAir left 07:08 sevin left
FROGGS morning 07:10
diakopter o/ 07:15
arnsholt 'lo 07:17
07:34 cxreg left 07:39 Tabrenus left 07:43 domidumont joined 07:44 am0c left 08:02 domidumont left 08:04 domidumont joined
nwc10 come back fijal. I want to ask you why "(libffi - not recommended)" 08:13
FROGGS nwc10: maybe you write him/her via github: github.com/fijal 08:14
08:17 fgomez left
GlitchMr github.com/perl6/std/pull/4 08:18
Sounds interesting 08:19
moritz nwc10: or simply message him/her 08:20
GlitchMr Because the code wasn't written by Perl 6 developers? But seriously, I think that libffi is interesting choice. 08:22
Already used in other programming languages.
arnsholt It may just be because it's not very nice to work with, or something like that 08:23
GlitchMr github.com/atgreen/libffi/blob/mas...ibffi.info 08:24
Is it so hard?
arnsholt Looking at it now
Dyncall looks more convenient, to be honest 08:28
But not sure what fijal meant about libffi
08:38 nebuchadnezzar left 08:41 nebuchadnezzar joined 08:56 hoelzro|away is now known as hoelzro
hoelzro happy Monday, #perl6! 08:57
tadzik happy happy hoelzro
mathw not a happy Monday 08:59
maybe next week's will be happier
09:00 dayangkun left, kresike joined
kresike hello all you happy perl6 people 09:00
tadzik am I the only one around here who is suffering because they had to get up from the bed? ;) 09:06
mathw possibly 09:07
I've got to have an unpleasant conversation with my boss
09:10 oliver_ joined 09:11 oliver_ left, GlitchMr- joined 09:13 dayangkun joined
arnsholt tadzik: Nope =) 09:13
My gf started work at 8 this morning, and I usually leave with her
So I had to get up a bit earlier than I'm used to =)
09:14 GlitchMr left
tadzik oh, the horror 09:14
I wasn't able to wake up at my usual 7.30, and had to postpone it to 8.30 09:15
yes, that's late, but I'm barely conscious anyway :|
arnsholt Hehe
FROGGS I was pretty awake when I got up at 6 (have the coffee machine + timer in bedroom now ...), but now I cant move my head (sleeping at $kids-bedroom.floor() isnt that comfortable as it seems) 09:16
09:20 sqirrel joined 09:31 wtw joined 09:38 swarley| left, swarley| joined 09:45 Psyche^ joined 09:48 Patterner left, Psyche^ is now known as Patterner, dakkar joined 09:57 sqirrel left
grondilu ;;ticker 10:02
FROGGS 7deb9d7: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'ticker' used at line 1␤Check failed␤FAILED 00:00 41m␤» 10:04
10:10 dayangkun left
moritz :-) 10:13
10:13 bbkr__ joined 10:17 fhelmberger joined, bbkr_ left 10:19 imarcusthis- joined 10:20 imarcusthis left, anuby left, bbkr_ joined 10:23 bbkr__ left 10:24 bbkr__ joined 10:25 bbkr_ left 10:26 bbkr_ joined 10:28 bbkr__ left 10:29 grondilu_ joined 10:30 bbkr__ joined 10:32 grondilu left 10:34 bbkr_ left 10:35 bbkr__ left
hulu r: say ~<abstract Concrete>.sort; 11:00
p6eval rakudo 935c90: OUTPUT«Concrete abstract␤»
hulu what's means ~<> 11:01
hoelzro r: say ~0.WHAT 11:02
p6eval rakudo 935c90: OUTPUT«use of uninitialized value of type Int in string context in block at /tmp/D_hnEYr1mh:1␤␤␤»
hulu r: say ~0; 11:03
p6eval rakudo 935c90: OUTPUT«0␤»
hulu r: say 0~0;
p6eval rakudo 935c90: OUTPUT«00␤»
hoelzro =(
hulu: I *think* it's "stringify"
hulu hoelzro: what's stringify 11:04
hoelzro hulu: converting the argument to a String
r: say 0.WHAT
p6eval rakudo 935c90: OUTPUT«Int()␤»
hoelzro r: say (~0).WHAT
p6eval rakudo 935c90: OUTPUT«Str()␤»
hulu r: say (~<abstract Concrete>).WHAT; 11:05
p6eval rakudo 935c90: OUTPUT«Str()␤»
hulu r: say <abstract Concrete>.WHAT; 11:06
p6eval rakudo 935c90: OUTPUT«Parcel()␤»
hoelzro hmm
r: say ~Int
p6eval rakudo 935c90: OUTPUT«use of uninitialized value of type Int in string context in block at /tmp/gz52w_NsxM:1␤␤␤»
hoelzro interesting, but not unexpected
moritz infix ~ concatenates, prefix ~ stringifies
11:07 Su-Shee_ joined
hulu r: say <abstract Concrete>.sort; 11:07
p6eval rakudo 935c90: OUTPUT«Concrete abstract␤»
hulu r: say <abstract Concrete>.sort.WHAT;
p6eval rakudo 935c90: OUTPUT«Parcel()␤»
11:10 Su-Shee left
hulu moritz: what means of stringifies 11:12
moritz hulu: to turn into a string
hulu: by the way, the correct way to ask the question is: "What does stringifies means?"
arnsholt s/means/mean/ # =)
hulu moritz: thx my english is poor 11:13
11:16 SmokeMachine joined 11:22 viewer left, SmokeMac_ joined 11:25 SmokeMachine left 11:28 SmokeMachine joined, domidumont left 11:31 SmokeMac_ left 11:42 sampo left 11:51 erkan joined, erkan left, erkan joined 11:52 hulu_ joined, hulu left, hulu_ left 11:53 hulu joined
hulu r: my @doors = False xx 101;($_ = !$_ for @doors[0, * + $_ ...^ * > 100]) for 1..100;say "Door $_ is ", <closed open>[ @doors[$_] ] for 1..100; 11:56
p6eval rakudo 935c90: OUTPUT«Door 1 is open␤Door 2 is closed␤Door 3 is closed␤Door 4 is open␤Door 5 is closed␤Door 6 is closed␤Door 7 is closed␤Door 8 is closed␤Door 9 is open␤Door 10 is closed␤Door 11 is closed␤Door 12 is closed␤Door 13 is closed␤Door 14 is closed␤Door 15 is closed␤Door 16 is…
11:57 Liz_ joined, Liz_ is now known as lizmat
hulu what does '@doors[0, * + $_ ...^ * > 100]' mean? 11:58
11:58 SmokeMachine left 11:59 SmokeMachine joined
hulu helo 12:01
12:01 cognominal joined 12:02 SmokeMac_ joined, breinbaas joined 12:05 SmokeMachine left 12:07 brrt joined
hulu moritz: what does '@doors[0, * + $_ ...^ * > 100]' mean? 12:09
12:10 SmokeMac_ left
hulu who can help me 12:16
brrt hulo, whats your question? 12:19
hulu, sorry :-)
let me see…..
12:20 hypolin left
hulu brrt: what does '@doors[0, * + $_ ...^ * > 100]' mean? 12:20
12:21 swarley- joined
brrt honestly 12:21
i do not know :-)
it seems like constructing a slice
obviously
but i'm not sure why the 0 is neccessary
hoelzro you need it to give the sequence a place to start, I think 12:22
...^ is "up until", I think
cognominal nr: $_=5; 0, * + $_ ...^ * > 100
p6eval rakudo 935c90, niecza v24-18-gaf64300: ( no output )
hoelzro * > 100 is the ending condition
cognominal nr: $_=5; say 0, * + $_ ...^ * > 100
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100␤»
brrt clearly
ah
it is a sequence from up to where * is higher than 100 12:23
hulu thx
brrt * is replaced by a magic variable or something
hulu what does 'up until' mean?
FROGGS nr: say 0 ...^ 10
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
brrt nr: say ^10 12:24
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0..^10␤»
hoelzro hulu: it means up to, but not including
brrt nr: say ( ^10 );
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0..^10␤»
12:24 swarley| left
FROGGS nr: say ( @( ^10 ) ); 12:24
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
hulu r: say ( ^10 ); 12:25
p6eval rakudo 935c90: OUTPUT«0..^10␤»
hulu r: say ( ( ^10 )); 12:26
p6eval rakudo 935c90: OUTPUT«0..^10␤»
hulu say ( @( ^10 ) ); what does '@' mean?
FROGGS: say ( @( ^10 ) ); what does '@' mean?
12:26 Gruber joined
FROGGS it is a list contextualizer, it populates the (lazy) list into its elements 12:27
12:27 bruges joined
FROGGS should be the same as: 12:27
12:27 swarley- left
FROGGS nr: say ^10.list 12:27
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0..^1␤»
FROGGS hmmm
nr: say( ^10.list )
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0..^1␤» 12:28
cognominal rn: say $_=5; 0, * + $_ ...^ { $_ > 100 }
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«5␤»
cognominal rn: $_=5; say 0, * + $_ ...^ { $_ > 100 }
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100␤»
12:28 imarcusthis- left 12:29 pjcj left 12:30 imarcusthis joined, breinbaas left
cognominal because that a simple list, perl 6 could figure it out itself 12:30
12:30 breinbaas joined
cognominal rn: say 0, 5, 10 ...^ { $_ > 100 } 12:30
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100␤»
12:31 pjcj joined, bruges_ left
FROGGS nr: say (^10).list 12:31
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0 1 2 3 4 5 6 7 8 9␤» 12:32
FROGGS there you go
12:32 Su-Shee_ is now known as Su-Shee
brrt nr: say 0.list 12:32
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«0␤»
cognominal nr: say 0.list.perl 12:36
p6eval rakudo 935c90: OUTPUT«(0,).list␤»
..niecza v24-18-gaf64300: OUTPUT«(0, ).list␤»
12:36 bbkr_ joined
cognominal which is redundant 12:36
nr: say (0,).perl 12:37
p6eval rakudo 935c90: OUTPUT«(0,)␤»
..niecza v24-18-gaf64300: OUTPUT«(0, )␤»
cognominal or not :)
nr: say (0,).WHAT.perl
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«Parcel␤»
cognominal I keep forgetting about parcels
12:44 hulu left 12:51 sqirrel joined 12:57 bbkr left, kaleem left 13:04 SmokeMachine joined 13:36 onlooker989781 joined 13:37 cognominal left, Targen left
[Coke] grumbles at himself for not finding any time to hack on nqp-jvm this weekend. bad Coke. 13:48
jnthn++ # blog post.
13:54 GGG joined, GGG left
dalek rl6-roast-data: f73924b | coke++ | / (4 files):
today (automated commit)
14:02
rl6-roast-data: c1edff8 | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: 6949883 | coke++ | / (4 files):
today (automated commit)
14:06 b1rkh0ff left 14:08 atrodo joined, bluescreen10 joined
[Coke] looks like a few more rakudo failures crept in. 14:13
14:14 PacoAir joined 14:20 bluescreen10 left, b1rkh0ff joined
moritz huh 14:20
my last spectests were all clean
14:20 bluescreen10 joined 14:21 cognominal joined 14:27 kaare_ joined
FROGGS mine too 14:29
14:38 arlinius left 14:54 PacoAir left 15:01 PacoAir joined, stopbit joined 15:03 isBEKaml joined
[Coke] 865c95f roast, rakudo has 25 failures. doesn't say which version of rakudo, but it's... 15:03
6d5dc67 15:04
15:04 SamuraiJack joined
[Coke] this is with whatever config we have available on rakudo. Could be something due to ICU, due to the fact that's running via cron and not a login shell... 15:04
Note that the command line "dash-e" failures have been occurring for a while as well. 15:05
if I need more env vars in github.com/coke/perl6-roast-data/b...rakudo.sh, that can be arranged
15:05 FROGGS left
[Coke] also, I'm running via t/spec/test_summary, not "make spectest" 15:06
timotimo [Coke]: it would be super weird if ICU were missing due to not having a login shell :| 15:09
15:11 benabik left
isBEKaml hello, #perl6! 15:11
15:33 nuba left
[Coke] timotimo: those are 2 different issues. 15:37
yes, it would be super weird if they were related. 15:38
timotimo oh, haha d) 15:46
:) okay
15:46 kresike left 15:47 FROGGS joined
timotimo is "moreinput" the mechanism in STD that detects when a line isn't complete yet? 15:58
moritz s/line/statement/ I think
15:58 SamuraiJack_ joined
timotimo er, yeah 15:59
you would register a function that does, for instance, a prompt and readline to that moreinput thing?
moritz yes
timotimo hm, that seems pretty simple to port over to rakudo. i must be missing something obvious 16:00
16:02 SamuraiJack left
moritz I hope you are right 16:02
timotimo you hope i'm missing something obvious? :P 16:05
moritz no, I hope you are righ that it is easy to port 16:06
16:06 SmokeMac_ joined
timotimo if i see correctly, it only touches the whitespace rule and the unspace rule 16:07
16:08 SmokeMachine left 16:11 TimToady joined 16:12 kaleem joined 16:20 cognominal left
masak is back home o/ 16:22
ingy /o\ 16:26
timotimo \o\ 16:27
masak /o/
PerlJam _o_ 16:28
masak ^o^
isBEKaml |o|
masak ~o~
ingy |+ö+|
isBEKaml *o*
masak [o]
PerlJam o
isBEKaml /o/\ 16:29
16:29 SunilJoshi joined
TimToady »o̤« 16:29
ingy örz
masak »ő« 16:30
ingy pines for TimTöady 16:31
TimToady hums The Pines of Röme
isBEKaml (˚இ˚) 16:32
16:32 kaleem_ joined
masak isBEKaml: vute! 16:33
cute*
TimToady is that an elephant with its nose tied in a knot? 16:34
16:34 cognominal joined
timotimo ˇ[ˇ 16:34
isBEKaml TimToady: kind of. :D
16:35 kaleem left, alec left
isBEKaml it's a Tamil letter, pronounced "e" (like how you pronounce the letter "e") 16:35
16:35 fgomez joined
TimToady that's part of why I suggested it was an elephant 16:35
isBEKaml or a swirling vortex. 16:36
Ah, I see what you did there. ;)
TimToady I looked up the actual Unicode (and its sound, which suggests an elephant trumpeting) before suggesting the elephant :) 16:40
though I would not go as far as to claim that it's how an elephant trumpeting would actually be represented in the Tamil language 16:41
isBEKaml Then that audio must have been quite loud! :) 16:44
masak maybe it's a capital இ ? :)
isBEKaml :D 16:45
16:46 kaleem_ left
masak TimToady: any reactions to my suggestion to add defaults to subtypes? 16:47
TimToady: should I patch STD.pm6 while I patch the spec? ;) 16:48
16:48 alec joined 16:49 [hds] joined 16:50 [hds] left, palakas_ left
jnthn evening, #perl6 16:51
brrt hi jnthn
jnthn masak: Add...what? :) 16:52
masak jnthn: irclog.perlgeek.de/perl6/2013-02-03#i_6406843
brrt jnthn, is there a repo / branch for the nqp-jvm port? 16:53
isBEKaml hello, jnthn
masak brrt: irclog.perlgeek.de/perl6/2013-02-03#i_6406843
ugh.
brrt: github.com/jnthn/nqp-jvm-prep 16:54
16:54 SamuraiJack_ left
brrt masak++ thanks :-) 16:54
masak brrt: when in doubt, check someone's github account ;)
brrt right
i had looked at the perl6 account only :-)
16:54 SamuraiJack_ joined
jnthn masak: OK, can you demonstrate the use case for them? 16:55
masak: Their semantics, where they'd apply, etc.
16:55 PacoAir left
masak jnthn: the default is used for uninitialized variables and unbound parameters. the default is *checked* against the subtype constraint at BEGIN time. 16:56
I'm undecided about whether the default should be thunked, like the lhs of infix:<xx>.
but mostly because I haven't thought about a use case for either choice yet. 16:57
jnthn would be more convinced if he saw a prototype implementation also ;)
FROGGS ahh, hi all! 16:58
masak aaaaaahhhh hi FROGGS! \o/
jnthn bbi10 16:59
masak jnthn: I'll... see what I can do.
isBEKaml masak: are we trying to take over programmer errors too? :)
masak isBEKaml: please be more specific.
jnthn masak: Failing that though, concrete use cases would be nice :)
masak jnthn: I hate it that the default value of Odd (as defined in the spec) is divisible by 2 17:00
FROGGS (°o°)
TimToady: have you seen my pull request?
masak jnthn: I think this should be addressed. I think defaults is the right fix. Ada has'em.
isBEKaml masak: uninitialized variables form a subset of programmer errors. That said, I don't see where we can use defaults for subtype constraints.
masak jnthn: it's like giving the subtype a new "zero". 17:01
isBEKaml: you *don't* see why we *can* use? did you forget a negation? :P
tadzik hi!
isBEKaml masak: I don't don't see. :P
masak oh, *where* we can...
tadzik! \o/ 17:02
tadzik \o/
isBEKaml tadzik!
timotimo are those defaults relevant to autovivification at all?
masak depends if you can type container types with subtypes.
I guess you can.
isBEKaml like my Parent $foo = Child.new(blah) ? 17:03
masak those are not the subtypes I'm talking about. 17:04
isBEKaml linky on irclog, please? (I have no context) :(
tadzik nothing like a good starwars reference :)
timotimo "you don't need to see this subtype's ident card. move along" *waves hand*
masak r: subset Odd of Int where { $_ % 2 }; my Odd $n; say $n
p6eval rakudo 935c90: OUTPUT«Odd()␤»
masak r: subset Odd of Int where { $_ % 2 }; my Odd $n; say $n % 2
p6eval rakudo 935c90: OUTPUT«Parameter '' requires an instance, but a type object was passed␤ in method Bridge at src/gen/CORE.setting:3117␤ in sub infix:<%> at src/gen/CORE.setting:3034␤ in block at /tmp/ppcw3JC6AV:1␤␤»
masak r: subset Odd of Int where { $_ % 2 }; my Odd $n; say +$n % 2
p6eval rakudo 935c90: OUTPUT«use of uninitialized variable $n of type Odd in numeric context in block at /tmp/eNFecDoxuf:1␤␤0␤»
masak r: subset Odd of Int where { $_ % 2 }; my Odd $n; say so +$n % 2 17:05
p6eval rakudo 935c90: OUTPUT«use of uninitialized variable $n of type Odd in numeric context in block at /tmp/sOt4exUmiD:1␤␤False␤»
masak see?
Odd can be *even*.
(because we don't have a defaults mechanism)
17:05 hoelzro is now known as hoelzro|away, brrt left
masak the current proposal is 'subset Odd of Int where { $_ % 2 } default 1;' -- but I'm not married to the syntax. 17:05
isBEKaml Okay, I see you're talking of constrained types. ( I was confused by the wording of subtypes) 17:07
masak sorry for confusing you.
they're called subtypes in the spec.
FROGGS masak: what are you proposing to change? an implicit default value? 17:08
timotimo an explicit default value
masak right. 17:09
FROGGS who? :P
isBEKaml be explicit!
masak for when the default (type object) of the wrapped type doesn't cut it.
like with 'Odd'.
isBEKaml r: my Int $foo; say $foo;
p6eval rakudo 935c90: OUTPUT«Int()␤»
isBEKaml :/
r: my Int $foo; say +$foo; 17:10
p6eval rakudo 935c90: OUTPUT«use of uninitialized variable $foo of type Int in numeric context in block at /tmp/7F5njj5t9Q:1␤␤0␤»
masak FROGGS, isBEKaml: the default value is *implicit* if you don't supply it, and *explicit* if you do.
jnthn masak: I think S09 may have something about the default value of an array slot.
masak I'm not proposing it has to be supplied, always.
jnthn masak: It may be nice if we can unify these things.
masak jnthn: ooh
isBEKaml masak: Taking yoru example of subset Odd of Int, why not used Int's defaults? (is that how it is, currently? - I'd guess so)
FROGGS .oO( unicorns++ ) 17:11
masak I may or may not be proposing that if you *don't* supply a default and the implicit default doesn't pass the subtype's test, that's a compile-time error.
isBEKaml: yes, that's how it is now. and the Int() type object, when modulo'd by 2, produces a warning and results in 0, falsy. so Int() is *not* Odd.
isBEKaml: and that bothers me.
isBEKaml: if you were to use the subtype in a parameter list, for example, it's technically possible (just by not passing anything) to get a value in the variable that doesn't pass the subtype test. which makes it rather a weak precondition. :/ 17:12
isBEKaml masak: Right - so you want to allow the programmer to specify defaults explicitly and at the same time ban weak predicates? (The latter is not what you said, but hey, it's a nice topping. ;) 17:15
masak jnthn: didn't find anything in S09 about array slot defaults :/
isBEKaml: something like that. I want subtypes to always hold, and currently, type objects (and the inability to supply defaults) can make them not hold. 17:16
japhb I agree with that argument, FWIW. 17:17
masak \o/
isBEKaml masak: I agree, it would be nice to have.
japhb Especially the bit about parameter constraints not actually constraining the arguments.
That's ... a real problem. 17:18
masak it's been bothering me for years.
jnthn Is it me, or did the "view raw" link disappear on github.com/perl6/specs/blob/master/S02-bits.pod
masak now please discuss (1) whether the default (explicit or implicit) not passing the subtype test should be a compile-time error, and (2) syntax. I'll be away for ~45 minutes ;)
isBEKaml jnthn: "Sorry, blob took too long to generate" :) 17:19
jnthn isBEKaml: Yes, there used to be a "view it as raw text" link.
FROGGS raw.github.com/perl6/specs/master/S02-bits.pod
dont see the link either
17:20 palakas joined
cognominal me neither 17:20
jnthn masak: Oh, I was thinking of the "is default" trait in S02...
japhb An explicit default that doesn't pass the subtype test is clearly insane. Compile time error, no question in my mind. 17:21
FROGGS japhb: an implicit default that doesnt pass is insane too 17:22
japhb I would argue having an implicit default that doesn't pass is not a good thing, but it's also not clearly insane, because you as the programmer might know that the default never gets used.
masak jnthn: an "is default" trait might be cleaner, yes.
japhb (I'm not saying it's clear that it *shouldn't* whine, but I am saying that it's *not* clear it *should*.)
FROGGS I vote for an 'is insane' trait ;o) 17:23
isBEKaml what about the case where we specify constrained types on custom types? What if there were an implicit default? (I'm not sure if this is even possible, constrained types on custom types)
TimToady
.oO(subset roles...)
17:24
masak japhb: agreed. 17:25
TimToady the idea of defaults has been in the air for several years now; it shows up in the discussion KeyHash for instance, and we've talked about it several times on IRC
it kinda makes sense to put defaults on a subtype, and it kinda doesn't 17:26
it feels like a too-concrete thing for a subtype to be claiming 17:27
japhb TimToady, it almost feels like the base types not having explicitly declared defaults is "a magic list of constants to remember"
So I don't think subtypes are special in this sense.
TimToady otoh, it might be the most convenient peg to hang it, if we don't have a better peg
base types are designed to allow at least one out-of-band value (Maybe types in H-land) 17:28
and subtypes are more like Just types 17:29
I suspect there are conflicting use cases for defaults interacting here...
unmarked value vs identity value vs out-of-band value vs [your ad here] 17:31
most likely value 17:32
(and hence, can usually be omitted)
most likely starting value
japhb Don't identity values come from operators, not operands?
TimToady there are just a lot of different reasons you might want a default
japhb: sure, but my confidence was shaken recently 17:33
japhb oh?
TimToady in thinking about longest-zip, I was thinking the missing value could be determined by the operator 17:34
but then a recent RC entry wanted 0 default for *
japhb I'm not entirely sure what to make of that. 17:37
17:37 benabik joined
japhb My immediate reaction is to blame the RC entry, because of years of government training ... er, I mean public schooling. 17:37
17:37 arlinius joined
japhb OTOH, I have myself seen cases where I wanted a 0 to fall out of multiplying an empty list. 17:38
TimToady well, only relates to the current topic tangentially
japhb Must go afk, will backlog 17:39
TimToady it's in rosettacode.org/wiki/Numeric_error_...ion#Perl_6 in the calculation of covariance 17:41
if there was a longest zip that could default Z* to 0, I wouldn't have to jump through hoops with the @INDEP array
which is just a backdoor to lengthen all the independent error vectors to the same length, so that Z works 17:42
moritz r: say roundrobin((1, 2, 3); (10, 20)).map({ [+] @$_ }).perl 17:47
p6eval rakudo 935c90: OUTPUT«(1, 10, 2, 20, 3).list␤»
moritz r: say roundrobin((1, 2, 3); (10, 20)).tree.map({ [+] @$_ }).perl
p6eval rakudo 935c90: OUTPUT«(11, 22, 3).list␤»
moritz looks like a longest zip with default 0 to me
jnthn dinner & 17:49
TimToady r: say roundrobin((1, 2, 3); (10, 20)).tree.map({ [*] @$_ }).perl 17:52
p6eval rakudo 935c90: OUTPUT«(10, 40, 3).list␤»
TimToady moritz: doesn't default to 0 for *
moritz oh right 17:53
17:53 Chillance joined
TimToady mind, I'm just cargo-culting the formulas from the p5 code without thinking about what they mean :) 17:57
masak TimToady: maybe a :default adverb on reduction metaops would help in your use case? 17:58
17:59 dakkar left
TimToady it feels like it very nearly defeats all the notational convenience of Z, but perhaps it's still clearer than the alternatives 18:04
18:06 SamuraiJack_ left 18:15 fhelmberger left, SamuraiJack joined
moritz is there any other metaop than Z that might benefit from a default? 18:15
18:16 PacoAir joined
masak oh, I meant [op], not Zop 18:17
18:18 arlinius left 18:24 benabik_ joined, benabik left, benabik_ is now known as benabik 18:27 spider-mario joined
moritz when would a default for [op] kick in? for undefined values? 18:32
[Coke] wonders what calling out to native java classes from nqp-jvm would look like. 18:33
18:38 zby_home joined 18:39 domidumont joined 18:41 SamuraiJack left, zby_home left
cognominal moritz, indent with a negative indent as used per heredoc messes up with tabs after the indent zone in a line. That's makes heredoc poor suited to generate Makefiles 18:42
* poorly 18:43
japhb r: my @a; my @b = (5); say [*] @a; say [*] @b; say +@a && [*] @a; say +@b && [*] @b; 18:44
p6eval rakudo 935c90: OUTPUT«1␤5␤0␤5␤»
masak cognominal: oh, interesting use case.
japhb ^ FWIW, a solution to at least *my* problem with the default of [*];
masak cognominal: might be indent is not the solution for Makefiles, though.
oh, heredocs. hm. 18:45
18:45 zby_home_ joined
japhb It works, but it's a tad too "clever". 18:45
cognominal rn: say " \t".indent(-2).perl
p6eval rakudo 935c90, niecza v24-18-gaf64300: OUTPUT«" "␤»
masak cognominal: yeah.
by design.
cognominal I would prefer by default and have an option to preserve tabs :) 18:46
masak mulls over this 18:47
cognominal for what should be the default, I am not sure; but I advocate the possibility to override it 18:49
We generate Makefiles in rakudo btw, but with Perl 5, I think. :) 18:50
18:52 raiph__ joined
felher Am I missing something or doesn't Buf have a elems method as per specification? 18:52
Oh, maube in Stringy... 18:53
cognominal nr: say Buf.^find_method('elems').WHAT 18:54
p6eval rakudo 935c90: OUTPUT«Method()␤»
..niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Unable to resolve method find_method in type ClassHOW␤ at /tmp/AByE40xTEL line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4218 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4219 (module-CORE @ 580) ␤…
cognominal Not sure to know the way to find where a method is defined 18:55
18:56 spider-mario_ joined, spider-mario left
felher r: say Buf.^mro 18:57
p6eval rakudo 935c90: OUTPUT«Cannot look up attributes in a type object␤ in method list at src/gen/CORE.setting:7362␤ in method gist at src/gen/CORE.setting:7372␤ in method gist at src/gen/CORE.setting:5128␤ in sub say at src/gen/CORE.setting:7595␤ in block at /tmp/mHccnIBN92:1␤␤»…
felher hm...
18:58 SunilJoshi left 18:59 fgomez left
cognominal it's defined here github.com/rakudo/rakudo/blob/nom/...Buf.pm#L41 18:59
felher cognominal: thanks :) I'm more interested if it is specced, though. 19:01
Ah, I guess S02-bits.pod:928 is what I wanted :0 19:03
* :) 19:04
19:06 spider-mario joined 19:07 spider-mario_ left
swarley I'm getting a core dump trying to compile the latest nqp 19:09
swarley@OctaviasViolin ~/Programming/rakudo/nqp (git)-[master] % ./nqp
src/call/context.c:708: failed assertion 'Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx'
timotimo you do your programming on a violin? mad props. 19:10
swarley I also do programming on a viola, mandolin, and cello
building a fresh version to test 19:12
[Coke] swarley: how did you configure your nqp?
swarley perl Configure.pl 19:13
[Coke] (using a local parrot or a pre-installed one - I'm assuming local - did you clean it out first?
ok. what does `which parrot` say, and what about parrot --version?
swarley It appears to be using /usr/bin/local/parrot 19:14
err
/usr/local/bin/parrot
19:14 fgomez joined
swarley I can tell you more about it in a second, I'm building from a fresh repo, and if it fails again I'll rebuild parrot 19:15
Are there plans to develop a more featureful repl for nqp/perl6?
[Coke] not for nqp. 19:16
jnthn swarley: What features do you want?
[Coke] rakudo, I think someone is trying to improve partial command detection. 19:17
jnthn improved the error reporting a week or so back.
swarley jnthn; just prettifying. I'm not sure if you do any sort of work with ruby but I work closely with the pry team, and I helped with fancy-lang's repl as well.. I'm a fan of pretty repls :) 19:18
Also auto indent, auto multiline, syntax hilighting, etc. Things you don't need but are neat 19:19
19:22 japhb_ joined 19:24 FROGGS left 19:28 araujo left 19:29 araujo joined, FROGGS joined 19:36 Targen joined
dalek rl6-roast-data: c508ac1 | coke++ | / (4 files):
today (automated commit)
19:40
[Coke] notes that the rakudo failures are gone today.
(except for the long standing issues with dash-e
19:42 grondilu_ is now known as grondilu 19:43 grondilu left, grondilu joined 19:49 sqirrel left 19:53 palakas left 19:55 fgomez left 20:02 bruges left, fhelmberger joined, bruges joined 20:04 fgomez joined 20:08 fhelmberger left
swarley recompiling parrot seems to have worked 20:09
20:10 benabik left
swarley yup all tests successful 20:11
grondilu about REPL: relaxed mode in REPL by default would be nice 20:17
[Coke] relaxed? 20:19
you mean "no strict;" ?
(that doesn't work anywhere yet)
20:22 domidumont left
grondilu [Coke]: yes that's what I meant. I mean, once it works, I'd like it to be the default for REPL. 20:23
this and a persistent history
20:24 benabik joined, SmokeMac_ left 20:25 SmokeMachine joined 20:26 onlooker989781 left 20:29 SmokeMachine left
swarley how do I add a directory to the use path? 20:29
grondilu push @INC, $dir 20:30
or @*INC maybe
r: say @*INC
p6eval rakudo 935c90: OUTPUT«/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib /home/p6eval/.perl6/2013.01-97-g6d5dc67/lib␤»
grondilu yep, push @*INC
20:37 cognominal left
[Coke] you can also use the env var PERL6LIB 20:38
eiro hello everyone
masak, www.africafornorway.no/
20:40 isBEKaml left 20:44 cognominal joined
swarley how do I compile my nqp file to pbc? 20:47
masak eiro: yes, I found it the same night. funny and thought-provoking. 20:48
swarley whenever i try to use a file it says it cant find the pbc 20:50
nevermind, I figured it out 20:53
dalek p-jvm-prep: 64838dd | jonathan++ | src/org/perl6/nqp/runtime/Ops.java:
Fix nqp::substr; patch from nwc10++.
[Coke] swarley++ 20:54
20:55 fgomez left
swarley How do I declare a sub to be global? 20:55
tadzik hey eiro 20:56
swarley I declared a sub at the bottom of this file, but it says it can't find the sub
But it can find the classes 20:57
huf how are you calling it?
jnthn swarley: mark the sub with "is export"
huf oh shit this is one channel over :D
disregard me, bash.org quote
swarley sub my_sub() is export ?
jnthn *nod*
swarley still can't find it 20:58
jnthn Did you recompile to the PBC after the change?
swarley yes
jnthn Hm.
Not sure. there's a bunch of working examples in e.g. nqp-jvm-prep 20:59
See helper.nqp or so.
swarley yesCan only use get_who on a SixModelObject
I get that when I 'use' it
And then the parrot error from earlier when I exit
jnthn You're doing the use from the REPL? 21:00
swarley yes
jnthn I know it works in the Perl 6 one. I've no idea about NQP.
I don't see why it wouldn't, mind. 21:01
If it works from a file, feel free to file an nqp bug about it not working in the repl.
swarley I'm going to try to run it outside of the repl
21:03 cognominal left 21:05 cognominal joined 21:08 fgomez joined
swarley What method is called for ~($foo) ? 21:08
sorear .Str or .Stringy, I forget the current spec 21:10
[Coke] r: class A { method Str { return "eek" }}; my $foo = A.new; ~($foo).say;
p6eval rakudo 935c90: OUTPUT«A.new()␤»
[Coke] r: class A { method Stringy { return "eek" }}; my $foo = A.new; ~($foo).say;
p6eval rakudo 935c90: OUTPUT«A.new()␤»
swarley Yeah neither is working in nqp either 21:12
jnthn r: class A { method Str { return "eek" }}; my $foo = A.new; (~$foo).say
p6eval rakudo 935c90: OUTPUT«eek␤»
jnthn Precedence :)
swarley oh, so you need (~$foo) 21:13
[Coke] mmm. I'm wondering what ~($foo) is doing.
stringify the listify of $foo?
er, no, since ($foo) isn't what it once was.
eiro hey tadzik :) 21:14
masak, sure but it can be prophetic in some way: we can't see clearly how global warning will affect the weather :)
masak eiro: in fact, Norway is fairly cold already. 21:15
eiro right :)
jnthn [Coke]: the .say method was called and then it stringified the result of say in void context, I tink.
21:15 cxreg joined
masak I'm pretty sure humans didn't evolve at this latitude... :) 21:15
eiro they can't evolve anymore: you're all so perfect! 21:16
21:16 simcop2387 left
swarley nqp: class A { method Str() { return "eek" }}; my $foo := A.new; (~$foo).say() 21:16
p6eval nqp: OUTPUT«Method 'say' not found for invocant of class 'String'␤current instr.: '' pc 92 ((file unknown):52) (/tmp/i9o1JZQlmt:1)␤»
swarley nqp: class A { method Str() { return "eek" }}; my $foo := A.new; say((~$foo))
p6eval nqp: OUTPUT«A<2452302>␤»
swarley :/
jnthn I don't think NQP supports that, off hand. 21:17
Or there's some is parrot_vtable hack
Though probably that's going away in favor of making the thing you just wrote work...
eiro btw: i finally try to explore the rakudo code to figure out where my encoding problem can have a long term solution
but i guess it will not be a cross-vm solution
21:18 simcop2387 joined
swarley swarley@OctaviasViolin ~/Programming/nqp-yarv (git)-[master] % nqp lib/RAST/Nodes.nqp 21:21
Method 'Str' not found for invocant of class 'Integer'
seriously?
jnthn swarley: Seriously. 21:22
swarley: NQP is quirky. 21:23
swarley: In some places, too much so.
swarley I just want to unify how I dump data
so that natives and complex data dont need to be separated 21:24
tadzik jnthn: what do we really expect of nqp::existpos? 21:25
it's not really test-covered in our nqp. I would assume that it says "does such index exist in the array", but looking at Parrot I see that it checks for definedness 21:26
jnthn swarley: ah, we wrap stuff in QAST/JAST in QAST::IVal etc...
tadzik: eek
tadzik: I...wonder where it's used
tadzik jnthn: nowhere
swarley Can someone please just tell me how to stringify everything the same way? :( 21:27
tadzik jnthn: the only place I found is t/nqp/52-vtable.t
plus the bindings in nqp
tadzik checks rakudo
jnthn tadzik: Maybe in Rakudo?
tadzik ok, rakudo uses it
yeah
I'll just figure out what does it expect :)
jnthn tadzik: I think it uses it to know if there's any such an index in the array 21:28
swarley or at least tell me how to tell what an object's class is :(
tadzik jnthn: so it's practically nothing more than "is this index lower than the number of elements?" 21:29
swarley Can anyone point me to overloading of operators in nqp/perl6?
jnthn swarley: You can't overload operators in NQP. 21:30
In Perl 6 it's declaring a multi
swarley blargh
jnthn tadzik: Something like that.
swarley Well, how do I get the class of an object in nqp? 21:31
oh
.WHAT
does nqp have case?
nqp: class Test {}; class Foo is Test { }; my $bar := Foo.new(); say($bar.WHAT == Test); 21:33
p6eval nqp: OUTPUT«1␤»
21:34 PacoAir left
swarley how would I tell if it inherits a class? 21:34
21:35 kaare_ left
swarley sighs 21:35
I suppose it just won't be that easy
[Coke] swarley: OOC, what are you doing that needs NQP and not rakudo? 21:36
jnthn nqp::istype($obj, TheClass) 21:37
21:42 benabik left
swarley swarley@OctaviasViolin ~/Programming/nqp-yarv (git)-[master] % nqp lib/RAST/Nodes.nqp 21:45
['YARVInstructionSequence/SimpleDataFormat', 1, 2, 1, { arg_size: 0, local_size: 0, stack_max: 0}, '<compiled>', '<compiled>', nil, 1, :top, 0, 0, 0, 3]
Starting to come out
I need to dump those arrays at the end correctly though 21:46
eiro the goal of making rakudo portable is removing the pir::* in the code, right ? 21:48
PerlJam eiro: the way you said it sounds backwards to me, but the gist seems right :) 21:49
eiro sorry i'm french. bad accent, bad presidents. (but pretty good wine and cheese) 21:51
thanks PerlJam
masak eiro: at least you replaced that sarcasm president.
;)
eiro sure: the other doesn't need sarcasm to make us laught 21:52
tadzik what's nqp for 'Mu'? 21:54
diakopter NQPMu
eiro 'night everyone
tadzik diakopter: thanks 21:55
diakopter yw XD 21:56
tadzik jnthn: sent you a pull request with my shot at existspos 21:59
I guess I should add those tests to nqp as well
jnthn tadzik: yes, please 22:00
tadzik sure
22:00 PacoAir joined
dalek p-jvm-prep: 543db9d | tadzik++ | / (6 files):
Implement and test existspos
22:01
p-jvm-prep: c50cd3c | jonathan++ | / (6 files):
Merge pull request #13 from tadzik/existspos

Implement and test existspos
jnthn tadzik++
tadzik I contributed \o/ 22:02
now deletepos :)
dalek p: edf9493 | tadzik++ | t/nqp/59-nqpop.t:
Add tests for nqp::existspos
p-jvm-prep: 5cd217a | (Gerhard R)++ | Makefile:
New Makefile with mostly atomic rules suitable for parallel make
22:04
p-jvm-prep: cd0e5d1 | jonathan++ | Makefile:
Merge pull request #12 from gerdr/newmakefile

New Makefile with mostly atomic rules suitable for parallel make
jnthn 'night, #perl6 22:13
tadzik good knight jnthn 22:14
swarley Sweet, it works 22:17
colomon \o/ 22:18
[Coke] yay, make rules updated for nqp-jvm 22:19
colomon seeing lots of jvm commits brings a smile to my face every time.
[Coke] sweeeet.
22:25 bbkr__ joined 22:26 PacoAir left 22:27 bbkr_ left
swarley That terrible moment when the VM you're working with is only documented in japanese 22:28
swarley prays to god that the method signature says that the last argument is 22:29
dalek p: 44054e8 | tadzik++ | t/nqp/59-nqpop.t:
Add tests for nqp::deletepos
22:32
swarley doesn't quite know where to go from here. 22:41
I suppose I need to add more nodes
nqp: class Foo { has $!bar; }; class Baz is Foo { method BUILD() { $!bar := 1; }; method test() { say($!bar); } }; Baz.new().test() 22:45
p6eval nqp: OUTPUT«Attribute '$!bar' not declared at line 2, near " := 1; }; "␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
swarley :s
tadzik private attributes are private :) 22:46
swarley oh, duh
nqp: class Foo { has $bar; }; class Baz is Foo { method BUILD() { $bar := 1; }; method test() { say($bar); } }; Baz.new().test()
p6eval nqp: OUTPUT«Use of undeclared variable '$bar' at line 2, near " := 1; }; "␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
swarley err
tadzik nqp: class Foo { has $.bar; }; class Baz is Foo { method BUILD() { $b!ar := 1; }; method test() { say($!bar); } }; Baz.new().test() 22:47
p6eval nqp: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "has $.bar;"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
tadzik oh, duh
swarley nqp doesn't have $.
tadzik right
I also put ! in the wrong place :) 22:48
so you'd have to write your own accessors I guess
swarley also 22:51
How do i write a BUILD method with just one argument that isn't named?
tadzik phenny: tell jnthn deletepos pullrequested as well :) 22:53
phenny tadzik: I'll pass that on when jnthn is around.
tadzik swarley: it seems that BUILD in nqp is completely manual 22:54
unlike Perl 6
so you can write it any way you want, as it'd be you who'd be calling it
swarley Well, I don't quite know why when I only put one argument in the signature and call it with one, it says i'm calling it with too many 22:55
nqp: class Foo { method BUILD($foo!) { say($foo); } }; Foo.new("bar"); 22:56
p6eval nqp: OUTPUT«too many positional arguments: 2 passed, 1 expected␤current instr.: 'new' pc 4377 (src/stage2/gen/NQPCORE.setting.pir:2047) (src/stage2/NQPCORE.setting:228)␤»
swarley What am I doing incorrectly?
tadzik I suppose that the auto-generated new() receives 0 arguments, you're calling it with 1
swarley But it says I'm passing 2 22:57
r: class Foo { method BUILD($foo!) { say($foo); } }; Foo.new("bar");
p6eval rakudo 935c90: OUTPUT«Default constructor for 'Foo' only takes named arguments␤ in method new at src/gen/CORE.setting:730␤ in block at /tmp/Fc9j4KCe4z:1␤␤»
swarley o-o 22:58
tadzik swarley: one is the invocant
yeah, BUILD in Perl 6 is quite extraordinary
swarley i thought that :$foo! would make it named?
tadzik I plegded to not say any opinions about it though :)
r: class Foo { method BUILD(:$foo!) { say($foo); } }; Foo.new("bar");
p6eval rakudo 935c90: OUTPUT«Default constructor for 'Foo' only takes named arguments␤ in method new at src/gen/CORE.setting:730␤ in block at /tmp/LbhrfKDKKv:1␤␤»
tadzik ah
r: class Foo { has $!foo; method BUILD(:$foo!) { say($foo); } }; Foo.new(foo => "bar"); 22:59
p6eval rakudo 935c90: OUTPUT«bar␤»
tadzik there you go
1) you need to declare it
2) default new does indeed only take named arguments
the common practice is:
swarley oh
tadzik r: class A { has $.b; method new($b) { self.bless(*, b => $b) } }; A.new(5).b.say 23:00
p6eval rakudo 935c90: OUTPUT«5␤»
swarley nqp: /hello/.Str()
p6eval nqp: ( no output )
swarley nqp: say(/hello/.Str())
p6eval nqp: OUTPUT«␤»
swarley o-o
tadzik what did you expect? :) 23:01
swarley More of a string?
masak I think that is a string.
swarley Well, considering I got no string at all for Num and Int 23:02
tadzik I guess a regex stringifies to ""
masak rn: say ~/hello/
p6eval niecza v24-18-gaf64300: OUTPUT«Regex()<instance>␤»
..rakudo 935c90: OUTPUT«␤»
tadzik nqp: say(5.Str())
p6eval nqp: OUTPUT«Method 'Str' not found for invocant of class 'Integer'␤current instr.: '' pc 49 ((file unknown):39) (/tmp/WB9srYCwql:1)␤»
masak 'night, #perl6
swarley nini
tadzik good knight masak
swarley [3] pry(main)> /hello/.to_s 23:03
=> "(?-mix:hello)"
That was what I was hoping for.. that being from ruby
tadzik I don't think we spec how the regex should stringify
[Coke] swarley: plus also nqp ain't perl6. 23:05
tadzik yeah, not quite
23:06 bluescreen10 left
swarley well I think I've done enough on it for today.. I've got a working example, and a few primitives that can convert into data i can use in the bytecode 23:19
tadzik awesome 23:21
23:24 lorn joined, Targen left 23:27 stopbit left 23:32 marloshouse_ joined 23:35 marloshouse left, marloshouse_ is now known as marloshouse 23:37 benabik joined 23:38 cognominal left 23:39 cognominal joined 23:46 nebuchadnezzar left 23:52 spider-mario left 23:57 zby_home_ left