»ö« 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. |
|||
sorear | TimToady: in J, that's a feature of implicit hypers, not indexing | 00:07 | |
TimToady: imagine it more like @array >>index>> 0,1,3 | 00:08 | ||
TimToady | we've now reached 350 RC entries \o/ | 00:15 | |
00:30
[particle]1 is now known as [particle]
00:33
envi joined
00:37
Limbic_Region joined
00:43
eternaleye_ joined
00:47
LoRe_ joined,
xinming joined
00:51
colomon_ joined,
colomon left,
dual left,
sivoais left,
xinming_ left,
colomon_ is now known as colomon
00:52
sivoais joined
|
|||
TimToady | does anyone know if rakudo (master) can open a file in binary mode? I only seem to get Str() out of it | 00:59 | |
s/anyone/anyone awake/ :) | 01:00 | ||
01:00
dual joined,
noganex_ joined
|
|||
sorear | IIRC the mode is selected on an operation-by-operation basis | 01:01 | |
rakudo: say $*IN.read(16).perl | |||
p6eval | rakudo 922500: OUTPUT«Buf.new(76, 97, 110, 100, 32, 100, 101, 114, 32, 66, 101, 114, 103, 101, 44, 32)» | ||
TimToady | oh, good, thanks | 01:02 | |
01:04
noganex left
01:18
tokuhirom joined
01:19
Chillance left
01:22
bluescreen10 joined
01:50
drbean joined
01:52
bluescreen10 left
02:15
molaf_ left
02:55
tokuhirom left
02:58
Limbic_Region left
03:26
Su-Shee left
03:28
Su-Shee joined
04:26
daniel-s joined,
daniel-s_ joined,
daniel-s left
04:28
perlhack joined
04:31
daniel-s__ joined,
daniel-s_ left
04:32
perlhack left
04:35
daniel-s joined,
simcop2387 left,
daniel-s__ left
04:36
daniel-s left
04:37
simcop2387 joined
05:01
mattp_ left
05:03
mattp_ joined
05:29
daniel-s joined
05:33
daniel-s left,
daniel-s__ joined
05:34
kaare_ joined
05:38
_daniel-s__ joined,
daniel-s__ left
05:42
daniel-s joined,
_daniel-s__ left
05:46
daniel-s__ joined,
daniel-s left
05:50
am0c joined
05:51
_daniel-s__ joined,
daniel-s__ left
05:55
daniel-s joined,
_daniel-s__ left
05:59
daniel-s__ joined
06:00
daniel-s left
06:25
masak joined
|
|||
masak | good morning, #perl6 | 06:25 | |
06:27
kcwu left
|
|||
sorear | hi masak | 06:32 | |
06:37
Mowah joined
06:39
kcwu joined
06:57
am0c left
07:10
am0c joined
|
|||
masak | std: my @nums[3;3;3]; say @nums[ ||(0..2) ] | 07:19 | |
p6eval | std 516268a: OUTPUT«ok 00:01 122m» | ||
masak realizes that Each, if ever implemented anywhere, would sit on the same level as Any and Junction | 07:22 | ||
07:30
am0c left
|
|||
masak | enumerable types in S09 -- what are they and through what mechanism can I make my own class enumerable? | 07:33 | |
I realize that enums are enumerable. from the examples, it also seems that ranges of Int as well as finite lists of Str are enumerable. | 07:35 | ||
07:38
molaf joined
07:39
Jackneill joined
|
|||
masak | perl6: my %h; say %h<foo>.WHAT | 07:39 | |
p6eval | pugs: OUTPUT«Scalar» | 07:40 | |
..rakudo 922500, niecza v7-44-g54b5188: OUTPUT«Any()» | |||
masak | S09:1282 claims that the result here should be Failure. I guess that's a fossil. | ||
S09:1268 also claims that Failure is returned when lookup fails. | 07:41 | ||
masak just learned that lightning talk sessions were introduced by MJD++ | 07:57 | ||
08:15
Instil joined
08:35
masak left
|
|||
moritz | good morning | 08:53 | |
moritz tries his hands on regex adverbs, again | 09:01 | ||
09:02
viklund joined
09:09
masak joined
|
|||
masak | morning, moritz. | 09:09 | |
I found a bug. :) | |||
rakudo: subset Foo of Str where any(<foo bar>); for <foo OH NOES> { when Foo { say "$_ is a Foo" } } # this is fine | |||
p6eval | rakudo 922500: OUTPUT«foo is a Foo» | ||
masak | rakudo: my @strings; subset Foo of Str where any(@strings); for <foo OH NOES> { when Foo { say "$_ is a Foo" } } # OH NOES | ||
p6eval | rakudo 922500: OUTPUT«foo is a FooOH is a FooNOES is a Foo» | 09:10 | |
masak submits rakudobug | |||
09:10
daniel-s__ is now known as daniel-s
|
|||
masak | rakudo: my @strings; subset Foo of Str where { any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } # OH NOES | 09:10 | |
p6eval | rakudo 922500: ( no output ) | ||
masak | hm. | ||
rakudo: my @strings; subset Foo of Str where { $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } | |||
p6eval | rakudo 922500: OUTPUT«foo is a FooOH is a FooNOES is a Foo» | ||
masak | oops, sorry. | 09:11 | |
forgot to populate @strings. | |||
rakudo: my @strings = <foo bar>; subset Foo of Str where any(@strings); for <foo OH NOES> { when Foo { say "$_ is a Foo" } } | |||
p6eval | rakudo 922500: OUTPUT«foo is a FooOH is a FooNOES is a Foo» | ||
masak | even with an empty @strings, it's still wrong, of course. | 09:12 | |
rakudo: my @strings = <foo bar>; subset Foo of Str where { $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } | 09:14 | ||
p6eval | rakudo 922500: OUTPUT«foo is a FooOH is a FooNOES is a Foo» | ||
09:14
Mowah left
|
|||
masak | rakudo: my @strings = <foo bar>; subset Foo of Str where { say @strings.perl; $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } | 09:14 | |
p6eval | rakudo 922500: OUTPUT«Null PMC access in find_method('perl') in <anon> at line 22:/tmp/anRU_Bl9Wt in 'Block::ACCEPTS' at line 6377:src/gen/core.pm in 'infix:<~~>' at line 483:src/gen/core.pm in <anon> at line 1:/tmp/anRU_Bl9Wt in 'Block::ACCEPTS' at line 6377:src/gen/core.pm … | ||
masak | ah; it's the ol' "scope has wrong outer" bug again. | 09:15 | |
I'll submit it anyway because the use case might be worth having a test for. someone who finds the old ticket, if any, is free to merge. | 09:16 | ||
09:21
viklund left
|
|||
moritz | without populated @strings it's still a bug | 09:24 | |
why should 'foo' ~~ any(@empty_list) be true? | |||
masak | <masak> even with an empty @strings, it's still wrong, of course. | 09:25 | |
I made the bug report skip over my confusion, though. | |||
09:25
ab5tract joined
09:26
kytibe left
09:27
lateau joined
|
|||
masak | rakudo: $_ = "foo"; say so /foo/ | 09:27 | |
p6eval | rakudo 922500: OUTPUT«Method 'match' not found for invocant of class '' in 'Regex::Bool' at line 6434:src/gen/core.pm in 'prefix:<?>' at line 497:src/gen/core.pm in 'prefix:<so>' at line 599:src/gen/core.pm in main program body at line 22:/tmp/tMsv4FVbES» | ||
masak | should this work? | 09:28 | |
rakudo: $_ = "foo"; say $_ ~~ /foo/ | |||
p6eval | rakudo 922500: OUTPUT«foo» | ||
09:37
pmurias joined
|
|||
masak | rakudo: $_ = "open"; my @verbs = "open", "close"; say $_ ~~ /^ @verbs/ | 09:37 | |
p6eval | rakudo 922500: OUTPUT«» | ||
masak | rakudo: $_ = "open"; my @verbs = "open"; say $_ ~~ /^ @verbs/ | ||
p6eval | rakudo 922500: OUTPUT«open» | ||
masak | ah, seems array interpolation isn't correctly implemented after all. (the array stringifies instead of acting like any(@verbs)). that's too bad. | 09:38 | |
moritz | rakudo: $_ = "open"; my @verbs = <open close>; say $_ ~~ /^ @verbs | ||
p6eval | rakudo 922500: OUTPUT«===SORRY!===Confused at line 22, near "say $_ ~~ "» | ||
moritz | rakudo: $_ = "open"; my @verbs = <open close>; say $_ ~~ /^ @verbs/ | 09:39 | |
p6eval | rakudo 922500: OUTPUT«» | ||
masak | maybe an appropriate change to src/Perl6/Actions.pm:3109 would fix things. | 09:41 | |
then again, maybe not. :) in any case, it would be too big a yak shave just to get the June 30 blog post out. | |||
the game will have to keep evolving for a while afterwards anyway. | 09:42 | ||
huh. that's odd. | 09:44 | ||
looking at the commit for that area of code, the !MAKE_REGEX routine in src/glue/regex.pir seems to be *specifically* made for handling arrays interpolated into regexes. | 09:45 | ||
but I don't see it applying any infix:<|> semantics. | |||
pmichaud: ^ | 09:46 | ||
09:48
am0c joined
|
|||
masak | S05:1139: "An interpolated array [...] is matched as if it were an alternation of its elements." | 09:54 | |
masak submits rakudobug | |||
10:03
ktbe joined
|
|||
masak | I didn't intentionally put crypt.pl on the envelope of Rakudo's abilities -- but it does turn out that a number of features we *almost* have would make the game code nicer. :) | 10:07 | |
10:07
ktbe left
10:14
MayDaniel joined
10:16
BULGARIAN-BOY joined,
BULGARIAN-BOY left
|
|||
dalek | kudo/nom: a50225a | moritz++ | / (3 files): bring back rx// and :s adverb |
10:23 | |
kudo/nom: 44c8eeb | moritz++ | t/spectest.data: more passing test files |
|||
10:23
dayangkun joined
10:32
donri joined
|
|||
tadzik stops by | 10:32 | ||
Announcement: my laptop's broken, and I have limited computer resources. Not sure if I'll have any replacement until it's fixed. Will try to report on #phasers | 10:34 | ||
moritz | ouch | 10:35 | |
what's broken? | |||
tadzik | power input. No way to charge or to run on AC | ||
We disassembled it on the uni, but no manpower to fix it, the voltage in the insides still looks ok, must be something on the motherboard | 10:36 | ||
So I'll just hope my warranty is still valid, and it'll take less than a couple of gsoc weeks :/ | 10:37 | ||
10:37
wamba joined,
fsntation joined
|
|||
tadzik | anyway, do I see regexes in nom? | 10:38 | |
moritz | /.../ style regexes have been in for some time now | 10:39 | |
I've added rx// just now | 10:40 | ||
masak | tadzik: oh noes! | ||
tadzik: was it the sweets? :/ | |||
10:41
dayangkun left
|
|||
tadzik | masak: no, I highly doubt it. It's broken deeply inside somewhere | 10:42 | |
masak | oh, ok. | ||
tadzik | Funny, I charged it in my flat and on the conference I was already unable to. As if it broke on the bus somewhere :/ | 10:43 | |
10:44
drbean left
10:49
mj41 joined,
kaare_ left
|
|||
tadzik leaves | 10:50 | ||
10:50
woosley joined
10:52
MayDaniel left
10:58
tokuhirom joined
11:09
[Coke] left,
fsntation left
11:13
[Coke] joined
11:25
[Coke] left
11:27
[Coke] joined
11:28
MayDaniel joined
|
|||
masak read and liked www.xray.mpe.mpg.de/mailing-lists/p...01066.html -- tchrist++'s Unicode Shootout slides from OSCON | 11:30 | ||
mathw wonders if it's time to see if Form works in nom yet | 11:38 | ||
11:40
whiteknight joined
|
|||
masak | mathw: ooh! | 11:42 | |
11:53
nimiezko joined
|
|||
masak | rakudo: sub foo(--> Int) { return 42 }; say foo | 11:57 | |
p6eval | rakudo 922500: OUTPUT«42» | ||
masak | rakudo: sub foo(--> Int) { return "OH HAI" }; say foo | ||
p6eval | rakudo 922500: OUTPUT«OH HAI» | ||
masak | meh :/ | ||
rakudo: sub foo() returns Int { return "OH HAI" }; say foo | 11:58 | ||
p6eval | rakudo 922500: OUTPUT«OH HAI» | ||
11:58
mj41 left
|
|||
dalek | kudo/nom: c15a26e | moritz++ | src/Perl6/Actions.pm: enable m//, though without adverb checking and runtime adverbs |
12:01 | |
12:04
kaare_ joined
12:05
perlhack joined
12:07
stm` left
|
|||
masak | heh, I keep finding more uses for this &inverse_index in the game. :) | 12:11 | |
perlhack | :-) | 12:12 | |
masak | perlhack! \o/ | ||
perlhack | masak, hey hey | ||
masak | hi ho :) | ||
perlhack | :-)what are you doing | ||
masak | hacking on my p6 game :) | 12:13 | |
(preparing to make the last June blog post) | |||
perlhack | :-)my my my my god | ||
masak | yes... exciting! | ||
perlhack | :-)nice idea. | ||
masak | rakudo: sub inverse_index(@array, $value) { (first { .value eq $value }, @array.pairs).key }; say inverse_index [<left middle right>], "middle" | 12:14 | |
p6eval | rakudo 922500: OUTPUT«1» | ||
masak | rakudo: sub inverse_index(@array, $value) { (first { .value eq $value }, @array.pairs).key }; say inverse_index <left middle right>, "middle" | ||
p6eval | rakudo 922500: OUTPUT«1» | ||
masak | right. no [] needed. | 12:15 | |
spetrea | hello everyone :) | 12:16 | |
moritz | rakudo: sub inverse_index(@array, $value) { @array.keys.first: { @array[$_] eq $value } );say inverse_index <left middle right>, "middle" | ||
p6eval | rakudo 922500: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
masak | spetrea: hi! :) | ||
perlhack | hi spetrea | ||
moritz | rakudo: sub inverse_index(@array, $value) { @array.keys.first: { @array[$_] eq $value }) ;say inverse_index <left middle right>, "middle" | ||
p6eval | rakudo 922500: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
perlhack | spetrea, send you a smile. | 12:17 | |
masak | moritz: you have one ')' too many and one '}' too few. | ||
moritz | phenny: tell pmichaud that m:s// now works in nom, but not :sigspace -- is that something you want to fix on the qregex level, or should I do it in nom (as best as I can)? | ||
phenny | moritz: I'll pass that on when pmichaud is around. | ||
moritz | rakudo: sub inverse_index(@array, $value) { @array.keys.first: { @array[$_] eq $value }} ;say inverse_index <left middle right>, "middle" | 12:18 | |
p6eval | rakudo 922500: OUTPUT«1» | ||
moritz | masak: thanks. I hate those unspecific error messages. | ||
spetrea | perlhack: thanks :) | ||
masak | moritz: I like your version better. changing :) | 12:23 | |
12:41
drbean joined
|
|||
moritz | $ ./perl6 -e '$_="foo"; say m:c(1)/./' | 12:42 | |
o | |||
\o/ | |||
masak | moritz++ | ||
moritz | the hard part really was done in master already, and now the changes just reflect a different internal API (wihch is much saner) | 12:44 | |
master used a global stack of adverb hashes, and the top of the stack would apply to the current regex | 12:45 | ||
dalek | kudo/nom: 5ee5857 | moritz++ | / (2 files): enable runtime adverbs or m//, enable checks for valid adverbs |
||
moritz | now we have a dynamic var %*RX for adverbs | ||
masak | nice. | ||
moritz | afk& | 12:46 | |
12:47
am0c left
|
|||
mathw grabs and compiles nom, then watches cat watching the compiler output | 12:52 | ||
12:53
kjeldahl_ joined
12:56
Jackneill left
12:59
am0c joined
|
|||
masak | mathw: is cat doing this? icanhascheezburger.files.wordpress....amazed.jpg | 13:06 | |
13:07
perlhack left
13:09
kboga joined
|
|||
mathw | well there was some of that | 13:11 | |
but there is now mostly this kind of thing | |||
farm6.static.flickr.com/5290/523347...23ea0f.jpg | |||
masak | watching compiler output can be exhausting. | 13:13 | |
mathw | I suspect the exhaustion comes from all that strenuous eating he's been doing this morning | ||
not to mention the lying around in the sun | |||
13:14
kboga left
|
|||
masak | I get tired just thinking about it. | 13:15 | |
13:15
kaare_ left
13:16
mj41 joined
|
|||
mathw | :) | 13:16 | |
13:21
kboga joined
13:24
mj41 left,
kjeldahl_ left
13:26
kjeldahl joined
13:30
kboga left
|
|||
masak | I just ran spectests on nom. three test files with non-zero exit status: t/spec/S02-builtin_data_types/assigning-refs.rakudo t/spec/S02-literals/numeric.rakudo and t/spec/S32-num/pi.t | 13:32 | |
in the first, 18 tests ran. in the other two, 0. | |||
no tests failed in any of the files. | 13:33 | ||
13:33
kboga joined
13:36
mj41 joined
13:45
wamba left
13:54
kaare_ joined
13:55
kjeldahl_ joined,
drbean left
13:56
Instil left
14:01
Jackneill joined
14:03
MayDaniel left
|
|||
flussence finally gets around to doing that separate-dirs-per-branch suggestion... | 14:04 | ||
masak | rakudo: role R { method foo { self.bar(42) }; method bar($x) { say "OH HAI" } }; class C does R { method foo { self.R::foo } }; C.new.foo | 14:06 | |
p6eval | rakudo 922500: OUTPUT«OH HAI» | ||
masak | rakudo: role R { method bar($x) {}; method foo { self.bar(42) } }; class C does R { method foo { self.R::foo } }; C.new.foo | ||
p6eval | rakudo 922500: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'bar' at line 22:/tmp/N060_2D3In in 'C::foo' at line 22:/tmp/N060_2D3In in main program body at line 22:/tmp/N060_2D3In» | ||
masak submits rakudobug | |||
only the order of the method declarations in the role differs. | 14:07 | ||
rakudo: role R { method bar($x) { say "OH HAI" }; method foo { self.bar(42) } }; R.new.foo | 14:08 | ||
p6eval | rakudo 922500: OUTPUT«OH HAI» | ||
masak | and it seems that, somehow, the role method delegation is necessary to trigger it. | ||
14:09
mj41 left,
kjeldahl left
14:11
kjeldahl joined
|
|||
dalek | ast: 97a2584 | (Kyle Hasselbacher)++ | TODO: [TODO] There is no t/spec/, only roast |
14:19 | |
14:21
mj41 joined
14:22
wamba joined,
jaldhar left,
jaldhar joined
14:28
Chillance joined
14:30
wolfman2_ left
14:31
wamba left
14:32
wamba joined
14:39
wamba left
14:48
fsntation joined
14:54
Jackneill left
|
|||
masak | by the way, if anyone else feels like beta testing the crypt text adventure game, now is the time: github.com/masak/crypt | 14:57 | |
I've been doing a fair amount of changes lately, and it's possible I've broken something down the line. | |||
plus, there are probably thousands of sensible commands than no-one has thought to try yet. the more coverage, the better. | 14:58 | ||
jlaire: by the way, I just plugged the Hanoi loophole you found in the manner we discussed. jlaire++ | 15:02 | ||
Su-Shee | would be nice to have a perl 6 analysis in comparison... 98.245.80.27/tcpc/OSCON2011/gbu/index.html (tom christiansen's overview over unicode in several languages..) | 15:13 | |
15:16
whiteknight left
15:17
whiteknight joined
15:21
woosley left,
am0c left,
perlhack joined
|
|||
masak | TimToady: has anyone ever proposed interdependent roles? like, 'role P { ... }; role R requires P { ... }' | 15:22 | |
15:22
perlhack left,
wamba joined
|
|||
masak | hm, maybe it can already be done, by twiddling role R's metaobject somehow. | 15:23 | |
15:25
MayDaniel joined
15:33
pmurias left
15:34
am0c joined
15:40
kjeldahl_ left
15:41
kfo joined
15:43
wamba left
15:45
kfo_ left
15:47
Trashlord joined
|
|||
moritz | masak: why not simply role R does P { ... } ? | 15:49 | |
masak | hm. | 15:50 | |
I can think of several reasons why not. | |||
late binding being the foremost. | |||
15:54
lateau left
|
|||
masak | moritz: heh, I realized that at least for the crypt game, your advice applies. so I'm adding a lot of 'does P's to role declarations now :) | 15:55 | |
thanks. :) | |||
15:57
mj41 left
|
|||
moritz | you're welcome | 16:01 | |
16:01
wolfman2000 joined
|
|||
moritz | masak: I don't understand the late binding argument - care to elaborate? | 16:01 | |
masak | I was thinking something like the role R only requiring P[Cool $a], but the class that composes R decides to be narrower and composes P[Str $a]. | 16:05 | |
moritz wonders if that falls under the "a role may never conflict with itself" rule or not | 16:06 | ||
masak | note that under my (imagined) scheme, R doesn't compose or drag in P[Cool $a] in any way. so there's no conflict. | 16:07 | |
kboga | nom: my %hash9; %hash9{1} = 2; %hash9{2} = 3; $_ = ~%hash9; say ?m{^(1\t2\s+2\t3|2\t3\s+1\t2)\s*$} | 16:08 | |
p6eval | nom: OUTPUT«Bool::True» | ||
masak | I just pushed a big refactor of the whole disposition of the crypt script. it's now composed of eight sections, with no (or very few) forward references. | ||
kboga | my %hash9; %hash9{1} = 2; %hash9{2} = 3; $_ = ~%hash9; say ?m{^(11\t2\s+2\t3|2\t3\s+1\t2)\s*$}' | ||
nom: my %hash9; %hash9{1} = 2; %hash9{2} = 3; $_ = ~%hash9; say ?m{^(11\t2\s+2\t3|2\t3\s+1\t2)\s*$}' | 16:09 | ||
p6eval | nom: OUTPUT«Confused at line 1, near "say ?m{^(1"current instr.: 'nqp;HLL;Grammar;panic' pc 23557 (src/stage2/gen/NQPHLL.pir:6323) (src/stage2/gen/NQPHLL.pm:329)» | ||
kboga | nom: my %hash9; %hash9{1} = 2; %hash9{2} = 3; $_ = ~%hash9; say ?m{^(11\t2\s+2\t3|2\t3\s+1\t2)\s*$} | ||
p6eval | nom: OUTPUT«Method 'nqpattr' not found for invocant of class 'Undef'current instr.: 'nqp;NQPCursorRole;_block1352' pc 24914 (src/stage2/QRegex.pir:7668) (src/stage2/QRegex.nqp:467)» | ||
16:10
wamba joined
|
|||
s1n | where's the operator precedence defined? is it in std.pm? | 16:11 | |
moritz | s1n: S03 too | 16:12 | |
masak | the sections are: predeclarations (4%), global variables (7%), utility subroutines (6%), roles for things and rooms (16%), things (14%), directions (4%), rooms (22%), and the game itself (27%). | 16:13 | |
masak --> store | 16:14 | ||
16:14
kjeldahl left
|
|||
s1n | masak: that looks good, thanks | 16:16 | |
what does the "A" column mean in that table? | 16:17 | ||
moritz | Associativity | ||
masak | i.e. whether A op B op C means (A op B) op C or A or (B op C) | ||
or neither :) | 16:18 | ||
moritz | or (A op B) && (B op C) | ||
there's a table of the associativities below the table of precedence levels | 16:20 | ||
16:22
lichtkind joined
|
|||
s1n | i don't see where the associativities are defined | 16:22 | |
(i.e. what is "C"?) | 16:23 | ||
masak | chaining. | ||
16:23
MayDaniel left
|
|||
masak | ISTR S03 has some wording about it. | 16:23 | |
yes, see S03:65. | 16:24 | ||
masak --> store, really | 16:26 | ||
16:27
ymasory_ joined
|
|||
s1n | seems to say what chaining is, but i still don't see a table that tells me what all of the associativity tables are? | 16:27 | |
(that wasn't a question, oops) | 16:28 | ||
moritz | s1n: S03:65 | ||
s1n | i guess i need to pull down the actual files so i can check that line | 16:29 | |
16:29
envi left
|
|||
moritz | s1n: in the IRC logs, S03:65 is a link to the right line | 16:30 | |
irclog.perlgeek.de/perl6/2011-07-24#i_4161348 points to perlcabal.org/syn/S03.html#line_65 | |||
nom: say 'A' ~~ /<.upper>/ | 16:31 | ||
p6eval | nom: OUTPUT«A» | ||
moritz | nom: say 'A' ~~ /<:upper>/ | ||
p6eval | nom: OUTPUT«Unrecognized regex metacharacter (must be quoted to match literally) at line 1, near ":upper>/"current instr.: 'nqp;HLL;Grammar;panic' pc 23557 (src/stage2/gen/NQPHLL.pir:6323) (src/stage2/gen/NQPHLL.pm:329)» | ||
s1n | oh, i can add the line as an anchor tag | 16:32 | |
16:41
perlhack joined
16:48
thou joined
16:51
thou left
16:52
ymasory_ left
16:53
perlhack left
16:56
thou joined
|
|||
moritz | nom: my @a = 1, 2; say 'a', 'b', 'c', 'd' Z @a, * | 17:09 | |
p6eval | nom: OUTPUT«a 1 b 2 c Whatever<57124920>» | ||
moritz | nom: my @a = 1, 2; say 'a', 'b', 'c', 'd' Z @a, @a[*-1] xx * | ||
p6eval | nom: OUTPUT«a 1 b 2 c 2 d 2» | ||
moritz | nom: say 'a' ~~ /<.upper>/; | 17:16 | |
p6eval | nom: OUTPUT«» | ||
moritz | nom: say 'OH NOEZ' if 'a' ~~ /<.upper>/ | 17:18 | |
p6eval | nom: OUTPUT«OH NOEZ» | ||
moritz | nom: say ('a' ~~ /<.upper>/).WHAT | ||
p6eval | nom: OUTPUT«Match()» | ||
moritz | nom: say ('a' ~~ /<.upper>/).Bool | ||
p6eval | nom: OUTPUT«Bool::True» | ||
benabik | Oh noez, indeed | ||
moritz | nom: say ('a' ~~ /<.upper>/).perl | ||
p6eval | nom: OUTPUT«» | ||
moritz | nom: say ('a' ~~ /<.upper>/).from | ||
p6eval | nom: OUTPUT«0» | ||
moritz | nom: say ('a' ~~ /<.upper>/).to | ||
p6eval | nom: OUTPUT«0» | ||
moritz | nom: say ('a' ~~ /<?upper>/).to | 17:19 | |
p6eval | nom: OUTPUT«0» | ||
moritz | nom: say ('a' ~~ /<?upper>/).Bool | ||
p6eval | nom: OUTPUT«Bool::True» | ||
moritz | nom: say ('A' ~~ /<?upper>/).to | ||
p6eval | nom: OUTPUT«0» | ||
moritz | nom: say ('A' ~~ /<.upper>/).to | ||
p6eval | nom: OUTPUT«1» | ||
moritz | nom: say ('a' ~~ /<.upper>/).to | 17:20 | |
p6eval | nom: OUTPUT«0» | ||
moritz | so if ti doesn't match, it simply creates a zero-width match? | ||
TimToady | masak: There is a walls here. x walls --> Method 'lines' not found for invocant of class '' | ||
moritz | pmichaud: see above | 17:21 | |
17:27
am0c left
|
|||
moritz | nom: say ('a' ~~ /^<.upper>$/).to | 17:28 | |
p6eval | nom: OUTPUT«-3» | ||
moritz | nom: say ('a' ~~ /^<.upper>$/).Bool | 17:29 | |
p6eval | nom: OUTPUT«Bool::False» | ||
masak | TimToady: thank you. will investigate. | 17:31 | |
17:32
Trashlord left
17:34
Trashlord joined
17:45
nimiezko left
17:49
shinobicl joined
|
|||
shinobicl | hi... how do i handle a list of arrays as parameters? example : sub myfunc(@arr1, @arr2) and sub myfunc(@arr1, @arr2, @arr3) | 17:51 | |
moritz | for now either you need to define separate multis for each arity, or pass the arrays as yourfanc([@arr1], [@arr2], ...) | 17:52 | |
though in nom you can already declare myfunc(**@LoL) { ... } | 17:53 | ||
and that gets the nested list of all arrays passed to the sub, unflattened | |||
nom: sub f(**@l) { say @l.perl }; my @a = 1, 2, 3; my @b = <a b c>; f @a; @b | 17:54 | ||
p6eval | nom: OUTPUT«LoL.new([1, 2, 3])» | ||
moritz | nom: sub f(**@l) { say @l.perl }; my @a = 1, 2, 3; my @b = <a b c>; f(@a; @b) | ||
p6eval | nom: OUTPUT«LoL.new((Array.new(1, 2, 3),), (Array.new("a", "b", "c"),))» | ||
moritz | nom: sub f(**@l) { say @l.perl }; my @a = 1, 2, 3; my @b = <a b c>; f(@a, @b) | ||
p6eval | nom: OUTPUT«LoL.new([1, 2, 3], ["a", "b", "c"])» | ||
moritz | ah, works with , too | ||
shinobicl | rakudo: sub myfunc(*@arrlist) { for (@arrlist) { say $_.WHAT }}; my @arr1=<1 2 3>; my @arr2 = <a b c d>; myfunc(@arr1); say '---'; myfunc(\@arr1, \@arr2); | 17:56 | |
p6eval | rakudo 922500: OUTPUT«Str()Str()Str()---Capture()Capture()» | ||
shinobicl | rakudo: sub myfunc(@arrlist) { for (@arrlist) { say $_.WHAT }}; my @arr1=<1 2 3>; my @arr2 = <a b c d>; myfunc(@arr1); say '---'; myfunc(\@arr1, \@arr2); | ||
p6eval | rakudo 922500: OUTPUT«Str()Str()Str()---Nominal type check failed for parameter '@arrlist'; expected Positional but got Capture instead in 'myfunc' at line 22:/tmp/CrNp5W2TMA in main program body at line 22:/tmp/CrNp5W2TMA» | ||
moritz | forget about backslashes in Perl 6 for now. | 17:57 | |
17:57
Mowah joined
|
|||
moritz | they don't do what they did in Perl 5 | 17:57 | |
shinobicl | nom: sub myfunc(**@arrlist) { for (@arrlist) { say $_.WHAT }}; my @arr1=<1 2 3>; my @arr2 = <a b c d>; myfunc(@arr1); say '---'; myfunc(@arr1, @arr2); | ||
p6eval | nom: OUTPUT«Array()---Array()Array()» | 17:58 | |
masak | moritz: yes, it works with infix:<,> because arrays do not flatten in captures. | ||
shinobicl | what is the meaning of ** ? | ||
i know that * is 'flatten' | |||
moritz | shinobicl: * means "use up as many as you can" | ||
shinobicl: and ** means "use up as many as you can, without flattening" | |||
17:58
birdwindupbird joined
|
|||
shinobicl | ahhhhh, nice :) | 17:59 | |
sorear | good * #perl6 | ||
shinobicl | but maybe it should be the opposite way | ||
* should be "use up as many as you can, without flattening" | |||
moritz | shinobicl: * is far more often used than ** | ||
masak | good *, sorear | 18:02 | |
moritz | \o sorear | 18:03 | |
nom: say "foo bar" ~~ m:s/\w+ \w+/ | |||
p6eval | nom: OUTPUT«No applicable candidates found to dispatch to for 'ACCEPTS'. Available candidates are::(Mu, Mu $topic, Mu %_)current instr.: 'ACCEPTS' pc 478282 (src/gen/CORE.setting.pir:124539) (src/gen/CORE.setting:280)» | ||
moritz | nom: $_ = "foo bar"; say m:s/\w+ \w+/ | ||
p6eval | nom: OUTPUT«foo bar» | 18:04 | |
masak | nom: $_ = "foo bar"; say m:s/:!s \w+ \w+/ | ||
p6eval | nom: OUTPUT«foo» | ||
masak | :) | 18:05 | |
nom: $_ = "foo bar"; say m:s/:!s \w+: \w+:/ | |||
moritz | nom: $_ = "foo bar"; say m:s:r/:!s \w+ \w+/ | ||
p6eval | nom: OUTPUT«» | ||
masak | great minds regex alike :P | ||
moritz | s/great/similarly conditioned/ :-) | ||
mathw | :) | 18:06 | |
masak | s/conditioned/brain-washed/ :P | 18:08 | |
TimToady: thanks, fixed. | |||
TimToady: also, now some hieroglyphs on the walls of the Hall say "Larry Wall was here" :) | 18:09 | ||
18:12
rgrau joined
18:17
kjeldahl joined
18:22
MayDaniel joined
|
|||
shinobicl | was there an operator for flattening an array? | 18:25 | |
flussence | |@a | ||
moritz | .flat | ||
flussence | oh wait, .flat | 18:26 | |
different things | |||
moritz | both not wrong :-) | ||
shinobicl | i'm still thinking about * and ** | ||
flussence | (is there a use for |@ outside function args?) | ||
shinobicl | * is "use as many as you can" and ** "use as many as you can without flatenning" | 18:27 | |
*@arr, **@arr, |@arr, i don't see a 'pattern' in here :S | 18:28 | ||
masak | I think *@arr is at the callee end, while |@arr is at the caller end. | 18:29 | |
moritz | note that the first two happen at the callee side, and the last on the caller side | ||
18:29
mj41 joined
|
|||
masak | at one point, the view was that they were the same on both ends. | 18:29 | |
for some reason, they're not. | |||
moritz | that's because they don't do the same thing | 18:30 | |
masak | well, that's true for a lot of things on either side of a call with the *same* syntax. | ||
so it can't be just that. | |||
moritz | for example? | ||
masak | :$arg creates a pair. | 18:31 | |
:$param denotes a named parameter. | |||
moritz | ":$arg creates a pair." is too simplistic | ||
masak | agreed. | ||
but they don't do the same thing. | |||
moritz | it does marks it as named | 18:32 | |
so they don't do the same thing, but coressponding things | |||
masak | well, flattening and slurping are the same kind of corresponding things. | ||
moritz | so des | correspond to * or to ** ? | 18:33 | |
s/des/does/ | |||
masak | I'd guess | corresponds to *, and || to ** | ||
but I haven't researched this deeply :) | |||
sorear | note that jnthn++ has talked about making *all* argument modification callee-side | 18:34 | |
moritz | that doesn't really make sense to me in the context of multi dispatch | 18:37 | |
because the multi dispatcher has to act as if it works on a capture in which |@things are already interpolated | 18:38 | ||
mathw | apparently I'm no longer capable of building a usable Rakudo | ||
18:40
Instil joined
18:43
birdwindupbird left
|
|||
mathw | the one make install put into rakudo/install/bin won't work from outside the Rakudo tree :( | 18:46 | |
moritz | mathw: nom or master? | 18:47 | |
nom is know not to install correctly :( | |||
mathw | oh | 18:49 | |
this is nom | |||
well that explains that then :) | |||
I don't feel stupid anymore | |||
18:53
kboga left
18:55
Trashlord left
18:58
Trashlord joined
19:05
Mowah left,
MayDaniel left
19:10
ymasory_ joined
|
|||
moritz is mostly to blame | 19:13 | ||
when I did the hack for the modules to look in blib/ I didn't really consider installed nom | 19:14 | ||
19:14
kboga joined
|
|||
mathw | I would politely suggest that it might be wise t ofix it before releases start off nom :) | 19:15 | |
moritz | before nom becomes master, really | 19:16 | |
mathw | that seems sensible | ||
shinobicl | i'm trying to implement this example i saw here in this irc channel: | 19:17 | |
role Counter[**@ranges] { has @.ranges; method new(*@values) { for (@ranges) -> @onerange { die "Wrong number of args" unless onerange == @values; die "Out of range" @values Z<= @onerange; } self.bless(*, :@values); } }; | |||
nom: role Counter[**@ranges] { has @.ranges; method new(*@values) { for (@ranges) -> @onerange { die "Wrong number of args" unless onerange == @values; die "Out of range" @values Z<= @onerange; } self.bless(*, :@values); } }; | |||
p6eval | nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)» | ||
shinobicl | i don't undesrtand the syntax error :S | ||
the original example was on rakudo, but only nom supports "**" for the moment | 19:18 | ||
moritz | die "Out of range" @values Z<= @onerange; # that's two terms in a row | 19:20 | |
though the error message sucks, yes | |||
shinobicl | nom: role Counter[**@ranges] { has @.ranges; method new(*@values) { for (@ranges) -> @onerange { die "Wrong number of args" unless onerange == @values; die "Out of range" unless @values Z<= @onerange; } self.bless(*, :@values); } }; | 19:21 | |
p6eval | nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3863 (src/Regex/Cursor.pir:244)» | ||
shinobicl | oh well... i try something else then :) | 19:22 | |
thank you for your patience:) | |||
bye! | |||
19:22
shinobicl left
|
|||
moritz | std: role Counter[**@ranges] { has @.ranges; method new(*@values) { for (@ranges) -> @onerange { die "Wrong number of args" unless onerange == @values; die "Out of range" unless @values Z<= @onerange; } self.bless(*, :@values); } }; | 19:22 | |
p6eval | std 516268a: OUTPUT«===SORRY!===Preceding context expects a term, but found infix == instead at /tmp/JA6xg6XpM0 line 1:------> "Wrong number of args" unless onerange ⏏== @values; die "Out of range" unless @vParse failedFAILED 00:01 125m»… | ||
moritz | gone | 19:23 | |
19:26
ymasory_ left
19:31
donri left
19:32
donri joined
|
|||
masak | there's also a 'onerange' there in the middle which should probably have a '@' stuck on it. | 19:36 | |
that might even be the cause of the error, if STD.pm6 assumes it's a listop and switches to term expectry. | |||
(no, 'expectry' isn't a word. maybe it should be.) :P | 19:37 | ||
19:42
Chillance left
19:43
Chillance joined
|
|||
dalek | kudo/nom: e5d914c | moritz++ | / (3 files): implement &samecase |
19:46 | |
kudo/nom: 0376f99 | moritz++ | src/core/Str.pm: implement :x in Str.match |
|||
19:56
kaare_ left
|
|||
Tene | Has anyone here looked at freeformlang.sourceforge.net/ yet? | 20:14 | |
20:15
wamba left
|
|||
masak | not I. but it puts me in mind of eidola.org/ -- a project that caught my attention many years ago. | 20:16 | |
moritz | how do comments work in a representation-independent language? | 20:19 | |
masak | what a Zen question. :) | ||
moritz | it's actually the first question that came to my mind, and very practical at that | 20:20 | |
masak | I'm not sure it's that much of a problem. how do free-form annotations work in sheet music? | 20:21 | |
mathw | umm | ||
you guess | 20:22 | ||
it's not a precise notation system | |||
masak | but it *is* solvable. | ||
mathw | yes | ||
unless the composer/engraver is a total arse | |||
I suppose actually rather than imprecise it's more... incomplete | 20:23 | ||
but really when you get down to it, somebody can write whatever they like on music in order to instruct the player to do something | 20:25 | ||
the problem I have is that people tend to write it in Italian | |||
masak | "sempre in avanti. semaforo." | 20:26 | |
:) | |||
mathw | my favourite was always the direction at the start which translates to "lively, but not too fast" | 20:27 | |
it just looks ridiculous | |||
20:27
wamba joined
20:40
rgrau left
21:02
benabik left
|
|||
moritz | "con spirito ma non tropo" or something | 21:08 | |
masak | "with liveliness, but not too much"? | ||
moritz | right | 21:09 | |
21:09
kjeldahl left
|
|||
moritz | troppo actually | 21:09 | |
21:16
MayDaniel joined
|
|||
masak | heh. I'm finding more bugs by blogging about the game. :) | 21:16 | |
21:22
MayDaniel left
|
|||
moritz | nom: my $x = 'a'; say 'a' ~~ /$x/ | 21:28 | |
p6eval | nom: OUTPUT«Method 'rxtype' not found for invocant of class 'PAST;Regex'current instr.: 'nqp;QRegex;P6Regex;Actions;_block2296' pc 67311 (src/stage2/QRegex.pir:20930) (src/stage2/QRegex.nqp:983)» | ||
dalek | kudo/nom: b6150b2 | moritz++ | src/core/Str.pm: implement limit for Str.comb |
21:29 | |
kudo/nom: 3867e02 | moritz++ | src/core/Str.pm: since the loop in Str.match is not lazy anymore, use push instead of gather/take; might be faster |
|||
kudo/nom: 0cbd875 | moritz++ | src/core/ (2 files): implement limit for Str.split |
|||
21:39
mj41 left
21:43
Psyche^ joined
21:47
Patterner left,
Psyche^ is now known as Patterner
21:55
ggoebel left
21:57
drbean joined
|
|||
dalek | p: 9fe040c | pmichaud++ | src/HLL/Compiler.pm: Eliminate $!commandline_{banner|prompt}, replace with interactive_* methods. |
21:57 | |
p: 9573361 | pmichaud++ | src/HLL/Compiler.pm: Refactor HLL::Compiler.command_line so that compilers can more easily intercept argument processing. |
|||
masak | pmichaud! \o/ | 21:59 | |
dalek | kudo/nom: fedd5b3 | pmichaud++ | / (4 files): Add initial version of @*ARGS. |
||
22:00
ggoebel joined
|
|||
masak | B.L.O.G. POST! strangelyconsistent.org/blog/june-3...venture-ii | 22:01 | |
phew! :) | |||
22:05
bluescreen10 joined
22:20
ascent_ left
22:28
Trashlord left
22:35
wolfman2000 left
22:47
benabik joined,
benabik left
22:49
tokuhirom left
22:53
wamba left
23:00
isBEKaml joined
|
|||
isBEKaml | .u ð | 23:02 | |
phenny | U+00F0 LATIN SMALL LETTER ETH (ð) | ||
isBEKaml | .u æ | 23:03 | |
phenny | U+00E6 LATIN SMALL LETTER AE (æ) | ||
U+0020 SPACE ( ) | |||
masak | 'nighty, #perl6. | 23:08 | |
23:08
masak left
23:10
kfo left
23:20
isBEKaml left
23:29
orafu left,
orafu joined
23:45
shinobicl joined
23:57
molaf left
|
|||
shinobicl | hi all :) | 23:59 |