»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 25 June 2010. |
|||
00:00
Patterner left,
Psyche^ is now known as Patterner
00:02
tyru joined,
felliott left
00:04
justatheory left,
masonkramer joined,
hanekomu_9 left
00:07
[bjoern] joined
|
|||
[bjoern] | Shouldn't `say '*'..'~'` print out the characters "*+,-./01234...~"? Rakudo locally consumes lots and lots of memory doing very little, and the bot says ... | 00:08 | |
00:08
timbunce left
|
|||
[bjoern] | [02:05] <p6eval> rakudo 0b1212: | 00:08 | |
[02:05] <p6eval> ..OUTPUT«************... | |||
jnthn | rakudo: say '*'.succ | 00:09 | |
p6eval | rakudo 0b1212: OUTPUT«*» | ||
jnthn | I thought the .. bug had been fixed. :-( | ||
00:09
PZt left
|
|||
[bjoern] | It does work with a..z for instance | 00:10 | |
dalek | kudo: f49e91b | jonathan++ | src/core/Mu.pm: .can helper is only defined on Any, not Mu. Last bug I fixed masked this issue |
||
kudo: 1231260 | jonathan++ | src/glue/subset.pm: Need to attach the originally refined type to the subtype so the signature awesome error and probably much more. |
|||
00:11
cdarroch left
|
|||
tadzik | g'night #perl6 | 00:12 | |
au|irc | g'♞ :) | ||
tadzik | :) | ||
00:12
tadzik left
|
|||
[bjoern] | www.nntp.perl.org/group/perl.perl6....33775.html seems relevant | 00:13 | |
pugssvn | r31771 | jnthn++ | [t/spec] Correct a bunch of spectests that relied on the old Int ~~ Num assumption, including changing one test to ensure that this is indeed not the case. | ||
jnthn | [bjoern]: Yes, there's been quite a lot of discussion about the .. operator of late. I'm not quite up on the latest. | 00:15 | |
[bjoern] | s03 even seems to have related tests, so I don't have to bother filing a bug. Good. | ||
jnthn | Well, filing may help get it dealt with sooner. On the other hand, this one comes up quite a bit. | 00:16 | |
dalek | kudo: 3139735 | jonathan++ | src/builtins/Num.pir: Toss Int ~~ Num hack; from now on, use Int ~~ Numeric. Good to excise this one |
||
kudo: ee1b11b | jonathan++ | src/Perl6/Grammar.pm: Port over a couple more errors from STD - mostly copy/paste/test. |
|||
jnthn | std: sub foo {}; foo(:a :b :c) | 00:20 | |
p6eval | std 31770: OUTPUT«ok 00:01 115m» | ||
jnthn | Aww | ||
Still don't like that :-) | |||
00:21
Sarten-X left
|
|||
jnthn | Phew, back under 640 tickets :-) | 00:24 | |
au|irc | yay :) | ||
00:29
lest_away is now known as lestrrat
|
|||
[Coke] | Think we can do <600 for the release this week? | 00:30 | |
jnthn | [Coke]: That'd be quite a push - especially when there's always more coming in. ;-) | 00:32 | |
[Coke]: As well as closing some tonight though, I've given several to moritz_++ for spectesting too. | |||
[Coke]: We're probably sub-630 if you discount those. | |||
00:40
japhb left
00:44
guest__ joined,
japhb joined,
guest__ left
00:47
whiteknight left
00:58
hudnix left
|
|||
dalek | ecza: d48aa80 | sorear++ | Kernel.cs: Clean up list assignment, allow for custom FETCH / STORE / INVOKE |
01:05 | |
01:06
takadonet1 joined
|
|||
takadonet1 | hey everyone | 01:06 | |
01:07
ashleydev left
01:12
[bjoern] left
01:13
au|irc is now known as au|afk
01:23
PZt joined
|
|||
sorear | hello takadonet1 | 01:24 | |
takadonet1 | sorear: someone is alive! | ||
01:26
payload1 joined
01:27
azert0x left
|
|||
sorear | TimToady: Do you have any thoughts on the matter of ratchet optimization for Perl 6? | 01:27 | |
TimToady: just passing and returning 1-element lazy lists as the spec seems to imply turns into a lot of bonus method calls | 01:28 | ||
01:28
payload left
|
|||
sorear | TimToady: my current plan involves a low-level hack in the method dispatcher | 01:28 | |
takadonet1 | rakudo: class A { $.var is rw; } A.new(); a.var(3); say $a.var(); | 01:40 | |
p6eval | rakudo ee1b11: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
takadonet1 | rakudo: class A { $.var is rw; }; A.new(); a.var(3); say $a.var(); | ||
p6eval | rakudo ee1b11: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
takadonet1 | ... | ||
tired | 01:41 | ||
rakudo: class A { $.var is rw; }; my $ya=A.new(); $ya.var(3); say $ya.var(); | |||
p6eval | rakudo ee1b11: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
01:44
payload1 left
|
|||
TimToady | sorear: not really, though the 'andthen' operator was intended to allow linearization of defined-or-not cascaded hypothesis proving | 01:44 | |
(made it to PDX btw) | 01:45 | ||
01:47
skids joined
01:48
Sarten-X joined
01:53
uvtc joined
|
|||
dalek | kudo: cf3da00 | jonathan++ | src/Perl6/ (2 files): NYI notes for constant, state and macro. Hopefully we get to at least state by |
01:56 | |
takadonet1 | jnthn: I just finished doing make spectest;make install ! | 01:58 | |
jnthn | :P | ||
Well, those are just some better errors rather than anything shiny. :-) | 01:59 | ||
takadonet1 | i know but still :P | ||
hard to keep 3 versions of rakudo in syn | |||
01:59
uvtc left
|
|||
jnthn | Well, I should probably consider some sleep soonish, so I dobut I'll be bothering you with more patches at least until tomorrow. ;-) | 02:00 | |
takadonet1 | going to bed soon as well. Just one more commit... | 02:01 | |
jnthn | :-) | ||
takadonet1 | jnthn: github.com/cjfields/bioperl6/tree/ | ||
jnthn | Well, that was my just one more commit. :-) I've been reading while it spectested. :-) | 02:02 | |
jnthn looks | |||
Wow, there's quite a lot of work in there. :-) | 02:03 | ||
takadonet1 | it's easy to port something that I used everyday in perl 5 :) | 02:04 | |
also without really knowing it, everyone on the channel been helping :) | 02:07 | ||
jnthn | :-) | ||
Next up: make this run fast. :-) | |||
02:08
Sarten-X left
|
|||
jnthn -> sleep | 02:10 | ||
02:11
drbean joined
|
|||
sorear | niecza: sub accum() { sub () { state $x = 0; $x++ }; }; my $y = accum; say $y(); say $y() | 02:17 | |
p6eval | niecza: OUTPUT«===SORRY!===Unsupported scope state for simple variable at (eval) line 1:------> sub accum() { sub () { state $x ⏏= 0; $x++ }; }; my $y = accum; say $y();Attribute (positionals) does not pass the type constraint because: Validation failed for… | ||
sorear | oh right | 02:19 | |
I *did* ask moritz_ to delay starting the updater... guess I should fix that | |||
02:20
marqos joined
|
|||
marqos | rakudo: const @COLORS = <red green blue>; say @COLORS | 02:31 | |
p6eval | rakudo ee1b11: OUTPUT«===SORRY!===Symbol '@COLORS' not predeclared in <anonymous> (/tmp/l_vmcBpon8:22)» | ||
marqos | alpha: const @COLORS = <red green blue>; say @COLORS | ||
p6eval | alpha 30e0ed: OUTPUT«Symbol '@COLORS' not predeclared in <anonymous> (/tmp/P74wAQT149:10)in Main (file <unknown>, line <unknown>)» | ||
TimToady | std: const @COLORS = <red green blue>; say @COLORS | ||
p6eval | std 31771: OUTPUT«===SORRY!===Variable @COLORS is not predeclared at /tmp/J0wrrUQS0D line 1:------> const @COLORS⏏ = <red green blue>; say @COLORSVariable @COLORS is not predeclared at /tmp/J0wrrUQS0D line 1:------> @COLORS = <red green blue>; say | ||
..@COLO… | |||
TimToady | std: constant @COLORS = <red green blue>; say @COLORS | 02:32 | |
p6eval | std 31771: OUTPUT«ok 00:01 117m» | ||
marqos | oh, spelled out. | ||
TimToady | looks like that's gonna be one of those common flubs :) | ||
marqos | Thanks, Larry. I was just about to dive into the synopsis to see what I was missing.. I remembered that working. | ||
02:33
payload joined
|
|||
marqos | rakudo: constant @COLORS = <red green blue>; say @COLORS | 02:33 | |
p6eval | rakudo ee1b11: OUTPUT«===SORRY!===Symbol '@COLORS' not predeclared in <anonymous> (/tmp/bFdfyFaeTF:22)» | ||
TimToady | I think alpha does | 02:34 | |
marqos | alpha: constant @COLORS = <red green blue>; say @COLORS | ||
p6eval | alpha 30e0ed: OUTPUT«redgreenblue» | ||
TimToady | (but it really just means 'my' there) | ||
marqos | freshly-built rakudo says it's not implemented yet... | ||
TimToady | it's supposed not be a scope declarator anymore either, but more like a subset name | 02:36 | |
02:36
masonkramer left
|
|||
TimToady | you might be able to get away with an enum containing one value :) | 02:36 | |
sorear | TimToady: what do you mean by it being like a subset name? | ||
TimToady | std: my subset X of Any where True; | 02:37 | |
p6eval | std 31771: OUTPUT«ok 00:01 115m» | ||
TimToady | std: my constant pi = 3; | ||
p6eval | std 31771: OUTPUT«ok 00:01 116m» | ||
TimToady | alpha: my constnat pi = 3; | ||
p6eval | alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "constnat p"in Main (file <unknown>, line <unknown>)» | ||
TimToady | alpha: my constant pi = 3; | 02:38 | |
p6eval | alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "constant p"in Main (file <unknown>, line <unknown>)» | ||
TimToady | it thinks constant is like 'my', so doesn't allow a 'my' before it | ||
02:39
takadonet1 left,
felliott joined
|
|||
TimToady | dinner & | 02:39 | |
sorear | std: constant = 5; | 02:44 | |
p6eval | std 31771: OUTPUT«ok 00:01 116m» | ||
sorear | Does it really make any sense to allow anonymous constants? | ||
STD.pm6:2938 | 02:45 | ||
02:54
huf joined
|
|||
dalek | ecza: 007fab2 | sorear++ | (2 files): Implement the constant declator, with and without sigils (they aren't actually |
02:56 | |
03:05
brianherman joined
|
|||
brianherman | perl6: say "yay"; | 03:05 | |
p6eval | pugs, rakudo cf3da0: OUTPUT«yay» | 03:06 | |
pmichaud | good evening | 03:07 | |
sorear | hello pmichaud | 03:08 | |
marqos | so is there any way to have an eval affect the surrounding scope? | 03:09 | |
03:09
agentzh joined
|
|||
sorear | elaborate on "affect" | 03:10 | |
an eval is considered to be an ordinary inner scope | |||
03:10
mrsaturn12 joined
03:11
plobsing joined
|
|||
marqos | so you can use %MY .. or however that's spelled ... | 03:12 | |
tylercurtis | pmichaud: if, in a HLL::Grammar.O(...), I don't specify an associativity, is the operator taken to be non-associative? | ||
pmichaud | tylercurtis: I'd have to look. | 03:13 | |
(looking) | |||
marqos | rakudo: eval "$OUTER::x=1;"; say $x | 03:15 | |
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/5pEe2gpDZT:22)» | ||
pmichaud | marqos: an eval is not permitted to add to the outer scope at runtime | 03:16 | |
(and in this case, $x is not predeclared :-) | |||
marqos | rakudo: eval "OUTER::$x=1"; say $x | ||
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/1As4uwbRv_:22)» | ||
pmichaud | tylercurtis: I'm not sure what associativity is assumed. The algorithm basically follows whatever STD.pm6 did (at the time it was written) | 03:17 | |
I think it may be right-associative by default. | |||
tylercurtis | pmichaud: is there a way to specify non-associativity? | ||
marqos | So how does one create a variable/sub/method with a name that's not known till runtime? | ||
pmichaud | :assoc<non>, I think. | ||
looking | 03:18 | ||
tylercurtis | pmichaud++: thanks. | ||
pmichaud | :assoc<unary>, :uassoc<non> # looks like | ||
not sure that HLL::Grammar implements true non-associativity yet, though. | 03:19 | ||
(if non-associativity is missing, it's arguably a bug.) | |||
oh, looks like there's also :assoc<non> | |||
(in STD.pm6) | |||
yes, I'm guessing that HLL::Grammar doesn't implement non-associative yet. We can add it if you need it. | 03:20 | ||
(I probably don't have it yet because I hadn't really needed it.) | 03:21 | ||
03:21
skids left
|
|||
marqos | I guess assigning to MY::{$varname} should work... | 03:22 | |
pmichaud | 03:16 <pmichaud> marqos: an eval is not permitted to add to the outer scope at runtime | ||
marqos | Right. Hence my question of how do you add a dynamic name to a scope at runtime? | ||
Since eval ain't it. | |||
mrsaturn12 | Why would you want to? | ||
pmichaud | From S02: | 03:25 | |
You may not use any lexically scoped symbol table, either by name or | |||
by reference, to add symbols to a lexical scope that is done compiling. | |||
(We reserve the right to relax this if it turns out to be useful though.) | |||
03:26
ruoso joined
|
|||
marqos | But that only applies to lexical scopes, right? You can dynamically add to a class or module? | 03:26 | |
tylercurtis | pmichaud: I'm not sure that I do. Technically, looking at Squaak's grammar in Episode 3 of the tutorial, all the binary ops appear to be associative(although the grammar listed there doesn't describe operator precedence at all, so it's hardly definitive). I'm going to assume left associative for all of them, since it doesn't clearly specify and left associativity is what one would expect for most of its ops. | ||
marqos | In this case I was just playing around with porting some code that dynamically creates a bunch of delegation methods that are all very similar... | 03:27 | |
pmichaud | tylercurtis: best for the tutorial is to explicitly list the associativity, I'd think. | 03:28 | |
marqos | basically $container.$method($key, *@args) is defined as %.children{$key}.$method(@args) for a bunch of different values of $method | ||
tylercurtis | pmichaud: I'm explicitly listing it. I'm just having to guess at what I should explicitly list. Did PGE assume a certain associativity? | ||
pmichaud | I think PGE assumed left. | 03:29 | |
(it did assume something, yes.) | |||
(I'm pretty sure it was 'left') | |||
sorear | Is PGE dead yet? | ||
pmichaud | "It's pining for the fjords..." | 03:30 | |
(or something like that) | |||
tylercurtis | pmichaud: I expect left is the case, too, since geb() or nyr() or fnu() would be very unintuitive if right-associative, for example. | ||
marqos | as far as I can tell, "handles" doesn't quite do that. | 03:31 | |
sorear | marqos: yes, you can add stuff to a class at runtime | ||
try eval "augment Foo { method bar () { } } | |||
brianherman | So I am compiling perl6 from source on mac os x and i get this error auto::va_ptr - Test the type of va_ptr... | ||
step auto::va_ptr died during execution: Unknown va_ptr type at config/auto/va_ptr.pm line 42. | |||
can i ignore that? | |||
marqos | sorear: right, but in this case the method name is the value of a variable. | ||
sorear | brianherman: that doesn't look like a perl 6 build | ||
marqos: eval is a string! | |||
you can interpolate whatever you want | |||
marqos | Oh, sorry, missed the eval. :) | 03:32 | |
sorear | methods and classes don't live in lexical scopes, so you're free to add them in evals | ||
immutability only applies to "my" | |||
pmichaud | also, use single quotes. | ||
otherwise the braces are likely to hurt. | |||
(or use some quoting construct other than "...") | 03:33 | ||
marqos | so if I'm inside Foo, should just eval "my $foo='bar'; method $foo \{ ... }" work? | ||
sorear | It won't work. | 03:34 | |
Perhaps it should. | |||
marqos | (in theory, I mean, not necessarily on current rakudo...) | ||
pmichaud | well, it's possible to have methods that aren't has-scoped, so I suspect one would need to re-list the class explicitly. | ||
I suppose there might be a way to detect that eval is taking place inside of a class scope. | 03:35 | ||
brianherman | sorear: i am sorry that was parrot | 03:36 | |
marqos | Wouldn't it have more to do with the fact that the thing being eval'ed is 'method', which defaults to has? | ||
pmichaud | brianherman: I'm guessing that you're missing a developers library or module that is needed for va_ptr. (It's just a guess.) | ||
03:36
Sarten-X joined
|
|||
pmichaud | brianherman: you might try asking on irc.perl.org/#parrot | 03:37 | |
tylercurtis walk & | |||
pmichaud | (and then let us know here so we can document it somewhere.) | ||
03:37
mrsaturn12 left
|
|||
sorear | Methods are very weird, since they can have two scopes at once | 03:37 | |
"my method" is really "my has method" | 03:38 | ||
it goes into both the lexpad and the class | |||
pmichaud | ...if it's inside of a class declaration. | ||
sorear | my &foo = anon method, by contrast, goes into only the lexpad | ||
pmichaud | right. | ||
brianherman | only 3 people are in parrot | 03:39 | |
pmichaud | brianherman: on irc.perl.org, not freenode | ||
brianherman | oh | ||
pmichaud | (or irc.parrot.org) | ||
brianherman | meh i think ill just use linux | 03:42 | |
thanks guy | 03:43 | ||
s | |||
pugssvn | r31772 | pmichaud++ | [pm.txt]: Add Pm-21 and Pm-22 to request confirmation of lexical regex semantics. | 03:45 | |
03:46
IllvilJa1 joined
03:47
marqos is now known as markjreed
|
|||
pmichaud | phenny: tell jnthn Is there a way from actions to see if an outer scope defines a method (regex, actually) of a given name? See Pm-21 in misc/pm.txt . | 03:47 | |
phenny | pmichaud: I'll pass that on when jnthn is around. | ||
markjreed | sorry, was not myself.. | 03:48 | |
pmichaud | phenny: it doesn't appear that methods are entered in a PAST::Block's symbol table. | ||
phenny: tell jnthn it doesn't appear that methods are entered in a PAST::Block's symbol table. | |||
phenny | pmichaud: I'll pass that on when jnthn is around. | ||
03:48
IllvilJa left,
DemoFreak left
|
|||
markjreed | rakudo: class Foo { }; eval 'augment Foo { method foo { say "Hello, world!" } }' | 03:48 | |
p6eval | rakudo cf3da0: ( no output ) | ||
Tene | rakudo: class Foo { }; eval 'augment Foo { method foo { say "Hello, world!" } }'; my Foo $foo .= new; $foo.foo; | 03:49 | |
p6eval | rakudo cf3da0: OUTPUT«Method 'foo' not found for invocant of class 'Foo' in main program body at line 22:/tmp/BLIbIYqzEX» | ||
markjreed | Locally I get ==SORRY!=== | 03:50 | |
In "augment" declaration, typename Foo must be predeclared (or marked as declarative with :: prefix) at line 1, near " { method " | |||
03:50
DemoFreak joined
|
|||
Tene | rakudo: class Foo { }; augment Foo { method foo { say "Hello, world!" } }; my Foo $foo .= new; $foo.foo; | 03:51 | |
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===In "augment" declaration, typename Foo must be predeclared (or marked as declarative with :: prefix) at line 22, near " { method "» | ||
Tene | rakudo: class Foo { }; eval 'augment ::Foo { method foo { say "Hello, world!" } }'; my Foo $foo .= new; $foo.foo; | ||
pmichaud | augment *class* Foo | ||
p6eval | rakudo cf3da0: OUTPUT«Method 'foo' not found for invocant of class 'Foo' in main program body at line 22:/tmp/Nn0z2sYf2t» | ||
Tene | rakudo: class Foo { }; eval 'augment class Foo { method foo { say "Hello, world!" } }'; my Foo $foo .= new; $foo.foo; | ||
p6eval | rakudo cf3da0: OUTPUT«Method 'foo' not found for invocant of class 'Foo' in main program body at line 22:/tmp/tZfzclAnQV» | ||
pmichaud | I'm guessing the eval fails. | ||
markjreed | class Foo { }; augment class Foo { method foo { say "Hello, world!" } } | ||
Tene | rakudo: class Foo { }; augment class Foo { method foo { say "Hello, world!" } }; my Foo $foo .= new; $foo.foo; | ||
pmichaud | probably need "use MONKEY_TYPING" | ||
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===Can't augment class Foo without 'use MONKEY_TYPING'» | ||
Tene | yeah | 03:52 | |
03:53
ashleydev joined
|
|||
markjreed | rakudo: use MONKEY_TYPING; class Foo {}; eval 'augment class Foo { method foo { say "hello, world" } }'; Foo.new.foo | 03:58 | |
p6eval | rakudo cf3da0: OUTPUT«Method 'foo' not found for invocant of class 'Foo' in main program body at line 22:/tmp/WnPsmWsN6j» | ||
markjreed | rakudo: use MONKEY_TYPING; class Foo {}; augment class Foo { method foo { say "hello, world" } }; Foo.new.foo | ||
p6eval | rakudo cf3da0: OUTPUT«hello, world» | ||
pmichaud | might need the MONKEY_TYPING inside the eval. | ||
(arguably a bug if so.) | |||
markjreed | rakudo: class Foo {}; eval 'use MONKEY_TYPING;augment class Foo { method foo { say "hello, world" } }'; Foo.new.foo | 03:59 | |
p6eval | rakudo cf3da0: OUTPUT«hello, world» | ||
markjreed | ahh. | ||
That will work. Thanks! | 04:00 | ||
dalek | p-rx: b09bf8d | pmichaud++ | src/Regex/P6Regex/Actions.pm: Refactor named_assertion method a bit. |
04:04 | |
p-rx: f7e92b4 | pmichaud++ | src/stage0/ (3 files): Update bootstrap. |
|||
markjreed | Hm. augment seems to re-trigger role composition... | 04:05 | |
04:06
TiMBuS joined
|
|||
tylercurtis | pmichaud: does the bit at trac.parrot.org/parrot/browser/trun...7.pod#L234 beginning with "What happens if you don't specify a pasttype?" still accurate? I'm guessing no, but I wanted to check. | 04:09 | |
04:09
snarkyboojum left
04:10
cls_bsd left
|
|||
markjreed | rakudo: role Bar { has @.on_tap }; class Foo does Bar {}; eval 'use MONKEY_TYPING; augment class Foo { method foo { say "hello, world" } }'; say $! | 04:11 | |
p6eval | rakudo cf3da0: OUTPUT«Attribute '@!on_tap' already exists in the class, but a role also wishes to compose it» | ||
sorear is going to need to start thinking about optimization passes soonish | 04:12 | ||
04:15
markjreed left
04:22
timbunce joined,
mrsaturn12 joined
04:24
brianherman left
04:33
justatheory joined
|
|||
dalek | ecza: 663c423 | sorear++ | (3 files): Implement parsing for simple regexes |
04:40 | |
04:49
PZt left
|
|||
timbunce | jnthn: I hear Zavolaj is broken at the moment. Any ETA for a fix? | 04:51 | |
05:04
snarkyboojum joined
05:05
justatheory left
05:07
colomon left
05:08
PZt joined
05:10
plobsing left
05:11
felliott left
05:21
mrsaturn12 left
05:23
payload left
05:24
daxim joined
05:26
timbunce left
05:28
timbunce joined
05:42
cls_bsd joined
|
|||
sorear | std: / :my $x; /; say $x; | 05:45 | |
p6eval | std 31772: OUTPUT«ok 00:01 118m» | ||
sorear | I argue this is wrong. | ||
regexes should get a new scope around every quant_atom_list | |||
rakudo: / :my $x; /; say $x; | 05:46 | ||
p6eval | rakudo cf3da0: OUTPUT«Any()» | ||
sorear | *blink* | ||
05:47
timbunce left
05:52
synth left
05:56
timbunce joined
06:00
ingy left
06:02
timbunce left,
ingy joined,
cognominal left
06:03
cognomore left
06:04
snarkyboojum left,
ashleydev left
06:12
uniejo joined
06:13
PZt left,
alfieANDfred joined,
PZt joined
06:14
alfieANDfred left,
cognominal joined
|
|||
moritz_ | good morning | 06:19 | |
mathw | Morning | ||
tylercurtis | moritz_: good morning. | 06:20 | |
moritz_ yawns | 06:21 | ||
06:21
uniejo left
06:23
uniejo joined
06:25
_mpu joined
|
|||
sorear | good morning moritz_ | 06:28 | |
I seem to have forgotten to tell you that I no longer need niecza p6eval updates held | |||
moritz_ | crontab installed. | 06:30 | |
I think you did tell me, but I forgot to tadd the cron job | |||
sorear: manually triggered niecza rebuild is finished | 06:46 | ||
sorear: btw if you add a step to make that puts the current revision into a file, I can report that revision from p6eval | 06:47 | ||
./perl6 -e 'my $x = "foo"; $x ~~ s:g/o/u/; say $x' | 06:50 | ||
fuu | |||
ingy | greetings | 06:51 | |
moritz_ | oh hai | ||
ingy is sitting alone in the oscon hotel lobby | |||
I just wrote a p6rules-as-yaml reducer in Python | 06:52 | ||
I have a question | |||
does rakudo use p6rules to parse perl6? | 06:53 | ||
I'm assuming it does | |||
moritz_ | yes | ||
src/Perl6/Grammar.pm | |||
06:53
eternaleye left
|
|||
ingy | so my ambition is to port the p6 grammar to my acmeist p6rules subset called FooParse, that uses a PCRE engine | 06:55 | |
and is thus many times faster | |||
moritz_ | have fun! :-) | ||
ingy | I will! | ||
I feel like I'm really close | 06:56 | ||
maybe | |||
so is it true that rakudo has no access to a regexp engine? | 06:57 | ||
(besides p6rules of course...) | |||
tylercurtis | ingy: if you're really ambitious, try converting STD.pm6 over to your subset. :) | ||
ingy | which is a stretch to call regexp | ||
tylercurtis | ingy: not a stretch, a shrink. | 06:58 | |
sorear | p6rules are far more powerful than regexes and are mostly syntax compatible | ||
ingy | I agree | ||
but I'm just asking if rakudo can invoke a "normal" regexp engine | 06:59 | ||
ie pcre, etc | |||
sorear | no | ||
ingy | does parrot have one? | ||
tylercurtis | ingy: you could use one with NCI. | 07:00 | |
sorear | parrot has a Regex engine but it's actually a p6rules engine | ||
cxreg | tylercurtis: except that without zavolaj, nci is a pain in the ass :) | 07:01 | |
ingy | so here's an example.... | 07:02 | |
I took this 300 line TestML grammar: github.com/ingydotnet/testml-pm6/bl...Grammar.pm | |||
which was ported from this working homebaked-yaml grammar: github.com/ingydotnet/testml-gramma...ammar.yaml | 07:03 | ||
and turned the original into this: github.com/ingydotnet/testml-gramma...ml.grammar | 07:04 | ||
and then reduced it into this 90 line, highly optimized: github.com/ingydotnet/testml-gramma...ammar.yaml | |||
which is pcre compatible | |||
sorear | moritz_: should I just put the capture-command in all? | ||
all: Setting.dll | 07:05 | ||
\tgit rev-parse HEAD > VERSION | |||
sjohnson | hi | ||
sorear | hello | ||
ingy | well anyway, I gotta sleep | ||
or drink | |||
night... | 07:06 | ||
sorear | I look forward to seeing how PCRE handles LTM | ||
sjohnson | hi sorea | ||
r | |||
oops | |||
ingy | sorear: me too :) | 07:07 | |
ingy grabs a smop | |||
sorear | Are you modifying pcre? | 07:08 | |
moritz_ | sorear: I'd prefer it if you could truncate the git rev-parse output to 6 characters or so | 07:12 | |
nopaste.snit.ch/22136 # hacky s:g/// | 07:15 | ||
07:15
_mpu left
|
|||
moritz_ | in STD.pm6 line 960, why is there a <circumfix> after a <.sorry> ? | 07:18 | |
07:20
[particle]1 joined
|
|||
moritz_ | ah, for error recovery, probably | 07:20 | |
07:20
[particle] left
07:23
baest joined
07:24
_mpu joined
|
|||
dalek | ecza: a4a0806 | sorear++ | Niecza/Actions.pm: Small refactor of declaration handling |
07:31 | |
ecza: 1dad6ad | sorear++ | CgOp.pm: Rework CgOp::* to preserve much more structure |
|||
ecza: cebf46b | sorear++ | (2 files): Add a version recorder for moritz |
|||
07:36
mberends left
|
|||
moritz_ | nqp: $_<v> # just want to see if it parses | 07:39 | |
p6eval | nqp: OUTPUT«Symbol '$_' not predeclared in <anonymous>current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:109)» | ||
moritz_ | nqp: my $_; $_<v> # just want to see if it parses | ||
p6eval | nqp: OUTPUT«get_pmc_keyed() not implemented in class 'Undef'current instr.: '_block11' pc 0 (EVAL_1:11596908)» | ||
moritz_ | nqp: my $_; ~$_<v> | ||
p6eval | nqp: OUTPUT«get_pmc_keyed() not implemented in class 'Undef'current instr.: '_block11' pc 0 (EVAL_1:4)» | ||
07:44
[particle]1 left,
[particle] joined
07:46
zulon joined,
meppl joined
07:54
dolmen_ joined
|
|||
pmichaud | moritz_: ping | 08:07 | |
locally: | |||
> my regex abc { ... }; say "abc" ~~ / <abc> /; | 08:08 | ||
abc | |||
dalek | ok: a366001 | pmichaud++ | src/preface.pod: It's no longer true that variables aren't preserved in the REPL. |
08:10 | |
ok: 6e6ccf8 | pmichaud++ | src/ (3 files): Various text improvements. |
|||
ok: 9a5a82a | pmichaud++ | docs/review-notes.txt: Add a place for review-notes and discussion about the text. |
|||
pmichaud | another long day... time for sleep. | 08:13 | |
sorear | ugh. this big codegen refactor is bigger than I thought | ||
sorear puts most of it on hold | |||
Tene | Oh, huh, feeds. Didn't notice when those went in. | ||
Looks like they're eager, though. | 08:14 | ||
08:16
Mowah joined
|
|||
moritz_ | pmichaud: pong | 08:18 | |
probably too late | |||
08:21
thebird joined
|
|||
pmichaud | back | 08:25 | |
(not too late :) | |||
feeds are eager? /me wonders why that would be.... | |||
08:27
perlygatekeeper1 joined
|
|||
frettled | pmichaud: that was a proper powernap :) | 08:27 | |
pmichaud | frettled: no, just hadn't made it to sleep yet. | 08:28 | |
too busy playing on a few other items. | |||
frettled | :) | ||
moritz_ | pmichaud: I wonder how <print> should work... | ||
does the lexical lookup check for regex-ness? | |||
08:29
perlygatekeeper left
|
|||
pmichaud | moritz_: at the moment, no. | 08:29 | |
08:29
tadzik joined
|
|||
pmichaud | moritz_: it really can't check for regex-ness (and in some sense it should not check for that) | 08:30 | |
moritz_ | thought so :( | ||
tadzik | hello #perl6 | ||
moritz_ wouldn't mind renaming <print> to <printable> | |||
pmichaud | yes, the reason I haven't committed is because of the strong potential for collisions between lexical symbols and grammar regexes | 08:31 | |
moritz_ | pmichaud: push it to a branch for now? | ||
pmichaud | I have it in a local branch. I can push it, yes. | 08:32 | |
branch is 'reglex' | |||
dolmen_ | rakudo: say (2i..5i).WHAT | ||
moritz_ | oh, the pain... | ||
p6eval | rakudo cf3da0: OUTPUT«Range()» | ||
dolmen_ | rakudo: say (2i..5i) | ||
p6eval | rakudo cf3da0: OUTPUT«0 + 2i» | ||
dolmen_ | rakudo: say (2..5) | 08:33 | |
p6eval | rakudo cf3da0: OUTPUT«2345» | ||
pmichaud | rakudo: say (2i).succ | ||
p6eval | rakudo cf3da0: OUTPUT«1 + 2i» | 08:34 | |
pmichaud | rakudo: say (2i).succ after 5i | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dolmen_ | what is "after"? | ||
moritz_ | you can't have a ponie, and eat it :-) | ||
dolmen_: a comparison operator | |||
pmichaud | after returns true if the lhs logically succeeds the rhs | ||
rakudo: say "a" after "z" | 08:35 | ||
p6eval | rakudo cf3da0: OUTPUT«0» | ||
moritz_ | rakudo: say 3 after 1 | ||
dolmen_ | rakudo: say (2i.succ) after 2i | ||
pmichaud | unlike > or gt, it doesn't do a type coercion on its arguments | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dolmen_ | rakudo: say "3" after 2 | 08:36 | |
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dolmen_ | should fail, isn't it? | ||
moritz_ | nope | ||
it's magic. | |||
pmichaud | rakudo: say "b" after 2 | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
pmichaud | rakudo: say 2 after "b" | ||
p6eval | rakudo cf3da0: OUTPUT«0» | 08:37 | |
dolmen_ | "type coercion" is magic. No type coercion means no magic, isn't it? | ||
pmichaud | dolmen_: I'd accept that it should fail, yes. Or there's also an interpretation that say that after (and cmp) fall back to stringish semantics | ||
moritz_ | I guess in the case of string and number, it coerces the number to Str, and then compares | ||
pmichaud | rakudo: say "03" after 2 | 08:38 | |
p6eval | rakudo cf3da0: OUTPUT«0» | ||
pmichaud | looks like it's falling back to str comparision | ||
*comparison | |||
dolmen_ | rakudo: say (2i..0) | 08:39 | |
p6eval | rakudo cf3da0: OUTPUT«» | ||
dolmen_ | rakudo: say (1..0) | ||
p6eval | rakudo cf3da0: OUTPUT«» | 08:40 | |
dolmen_ | rakudo: say (2i..0).elems | ||
p6eval | rakudo cf3da0: OUTPUT«0» | ||
pmichaud | okay, I'm really off to sleep this time. | 08:41 | |
bbl | |||
dolmen_ | good night | ||
moritz_ | \o night | ||
dolmen_ | rakudo: say 2i.WHAT | ||
p6eval | rakudo cf3da0: OUTPUT«Complex()» | ||
dolmen_ | rakudo: say Complex ~~ Num | ||
p6eval | rakudo cf3da0: OUTPUT«0» | 08:42 | |
dolmen_ | rakudo: say Complex ~~ Numeric | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dolmen_ | rakudo: say Rat.new(3i, -5i) | 08:43 | |
p6eval | rakudo cf3da0: OUTPUT«too many positional arguments: 3 passed, 1 expected in main program body at line 22:/tmp/TBqNYMu3aY» | ||
dolmen_ | rakudo: say 1i*Rat.new(3, -5) | ||
p6eval | rakudo cf3da0: OUTPUT«0 + -0.6i» | ||
dolmen_ | rakudo: say Rat.new(3, -5i) | 08:45 | |
p6eval | rakudo cf3da0: OUTPUT«too many positional arguments: 3 passed, 1 expected in main program body at line 22:/tmp/0eZVwaQL6q» | ||
dolmen_ | rakudo: say 1i+Rat.new | 08:46 | |
p6eval | rakudo cf3da0: OUTPUT«0 + 1i» | ||
dolmen_ | rakudo: say (3+2i..4).elems | 08:47 | |
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dolmen_ | rakudo: say (3+2i..4).perl | 08:48 | |
p6eval | rakudo cf3da0: OUTPUT«Complex.new(3, 2)..4» | ||
dolmen_ | rakudo: say (3+2i..4) | ||
p6eval | rakudo cf3da0: OUTPUT«3 + 2i» | ||
dolmen_ | rakudo: say (3+2i..5+5i) | ||
p6eval | rakudo cf3da0: OUTPUT«3 + 2i4 + 2i5 + 2i» | ||
dolmen_ | rakudo: say (.) | 08:49 | |
rakudo: say (3.1..5.5) | |||
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
rakudo cf3da0: OUTPUT«3.14.15.1» | |||
dolmen_ | rakudo: say (3+2i..5+1i) | 08:50 | |
p6eval | rakudo cf3da0: OUTPUT«3 + 2i4 + 2i» | 08:51 | |
dolmen_ | rakudo: say (3+2i..^5+2i) | ||
p6eval | rakudo cf3da0: OUTPUT«3 + 2i4 + 2i» | ||
dolmen_ | rakudo: say (3+2i).WHY | 08:54 | |
p6eval | rakudo cf3da0: OUTPUT«Method 'WHY' not found for invocant of class 'Complex' in main program body at line 22:/tmp/gOA4WP5IPV» | ||
dolmen_ | rakudo: say (3).WHY | ||
p6eval | rakudo cf3da0: OUTPUT«Method 'WHY' not found for invocant of class 'Int' in main program body at line 22:/tmp/JqE9yoU7_4» | ||
dolmen_ | rakudo: say (3+2i).^methods() | 08:56 | |
p6eval | rakudo cf3da0: | ||
..OUTPUT«imabsacosechrealsceilingunpolarfloorasechRatroundacosecacoshNumcosechcotanatan2repolartanRealatancosacosnewtanhNumericperlStracotanhfrom-radiansACCEPTSpredatanhcosecexpto-radianssinhacotanrootsComplexlnsecaseccotanhcislogsechlog10randtruncatesinsqrtIntasinBoolcoshsuccsignasinhabsac… | |||
dolmen_ | rakudo: say (3+2i).^methods().join(',') | 08:57 | |
p6eval | rakudo cf3da0: | 08:58 | |
..OUTPUT«Str,acotanh,from-radians,ACCEPTS,pred,atanh,exp,cosec,to-radians,sinh,acotan,roots,Complex,ln,sec,asec,cotanh,cis,log,log10,sech,rand,truncate,sqrt,sin,Int,asin,Bool,cosh,succ,sign,asinh,im,acosech,abs,reals,ceiling,unpolar,floor,asech,Rat,round,acosh,acosec,Num,cotan,cosech,atan2,… | |||
dolmen_ | rakudo: say (3+2i).im | 08:59 | |
p6eval | rakudo cf3da0: OUTPUT«2» | ||
dolmen_ | rakudo: say (3+2i).im.WHAT | ||
p6eval | rakudo cf3da0: OUTPUT«Int()» | ||
dolmen_ | rakudo: say (3+2.0i).im.WHAT | ||
p6eval | rakudo cf3da0: OUTPUT«Rat()» | 09:00 | |
dolmen_ | rakudo: say (3+2.3i).im.WHAT | ||
p6eval | rakudo cf3da0: OUTPUT«Rat()» | ||
dolmen_ | rakudo: say (3+2.3i).im | ||
p6eval | rakudo cf3da0: OUTPUT«2.3» | 09:01 | |
dolmen_ | rakudo: say (3+2.3i).im.denominator | ||
p6eval | rakudo cf3da0: OUTPUT«10» | ||
dolmen_ | rakudo: say (2.3+2.3i).real.WHAT | 09:02 | |
p6eval | rakudo cf3da0: OUTPUT«Method 'real' not found for invocant of class 'Complex' in main program body at line 22:/tmp/bJt0QPCU1c» | ||
moritz_ | .re | ||
09:02
au|afk is now known as au|irc
|
|||
dolmen_ | rakudo: say (2.3+2.3i).re.WHAT | 09:02 | |
p6eval | rakudo cf3da0: OUTPUT«Rat()» | ||
au|irc | \o | ||
sorear | hmm. | ||
moritz_ | o/ | ||
sorear | Hi au|irc ! | ||
au|irc | greetings :) | 09:03 | |
dolmen_ | \o/ | ||
sorear | it looks like implementing Iterator in Perl 6 is not going to work very well | ||
because $!value doesn't remember the flatness bit | |||
au|irc | going into .cs level then? | ||
frettled | au|irc: o/~ - nice bugrep | 09:04 | |
au|irc | thank you :) I tried golfing it... | ||
tylercurtis | good night, #perl6. | ||
09:05
tylercurtis left
|
|||
sorear | Or I'll just try handling flat-bits out of band | 09:06 | |
moritz_ has a not-so-hacky-anymore patch for s:g/// | |||
au|irc | sorear: out of band, as in...? | 09:07 | |
sorear | au|irc: in a separate array | 09:08 | |
but I think I can hack this into working | |||
au|irc | looking forward to the commit then :D | ||
au|irc continues translating masak++'s blogpost, part 2 of 5... | |||
sorear | well. I already have Iterator, I'm trying to implement a form of map | 09:09 | |
getting the sub-parcels to properly flatten is a little tricky | |||
dolmen_ | rakudo: say (2.3+2.3i).^methods()[0].do.perl | ||
p6eval | rakudo cf3da0: OUTPUT«{ ... }» | ||
sorear | because of the CPS conversion, the impedence mismatch between C# and Perl 6 is rather large | ||
moritz_ | dolmen_: .() for invoking, not do() | ||
sorear | my choices are C# (have to do manual CPS, and cannot access CORE:: lexicals without dependency injection) | 09:10 | |
Perl 6 (no direct access to CLR facilities like raw arrays, hard to do low-level introspection of values) | 09:11 | ||
Q:CgOp (easy access to CLR features, with automatic CPS and lexical scoping, but the syntax is awful) | |||
au|irc | uh, there wasn't much syntax to start with :) | 09:12 | |
dolmen_ realizes that au|irc is Audrey... | |||
au|irc confirms the realization | |||
sorear | I'm firmly with TimToady on the "oatmeal with fingernail clippings mixed in" view of sexp languages | ||
they are, however, very expedient | 09:13 | ||
moritz_ pushed the subst_adverbs branch | |||
dolmen_ | moritz_: I wanted the source code of the method. This is what I got, as far as it is possible : { ... } | ||
au|irc | it's slightly better if you allow ({[ and ]}) as synonyms, but yeah. | ||
arnsholt | pmichaud++ # Fixing classes-with-Q-bug | 09:14 | |
moritz_ | dolmen_: yes, deparsing (or storing source code) is NYI | ||
arnsholt | Now Prolog looks like it parses the really perverted forms of Prolog as well =D | ||
sorear | The biggest upshot of switching from RPN to sexps is that I can use % in vim now | ||
09:15
zulon left
|
|||
arnsholt | That sounds like a non-negligeable benefit =) | 09:15 | |
moritz_ | can I use a PAST tree inside the :value of a PAST::Val? | 09:17 | |
std: s:nth[1, 2, 3]/a/b/ | 09:18 | ||
p6eval | std 31772: OUTPUT«===SORRY!===Unrecognized regex metacharacter , (must be quoted to match literally) at /tmp/pfKqqYdWHn line 1:------> s:nth[1,⏏ 2, 3]/a/b/Couldn't find terminator ] at /tmp/pfKqqYdWHn line 1:------> s:nth[1,⏏ 2, | ||
..3]/a/b/Par… | |||
moritz_ | std: s:nth(1, 2, 3)/a/b/ | 09:19 | |
p6eval | std 31772: OUTPUT«ok 00:03 118m» | ||
moritz_ | looks LTA to me | ||
09:23
lue left,
lue joined
|
|||
au|irc | sorear: R6RS defines [...] to be equiv forms of (...). Would you find a change to cgexp:op that allow (prog [...] [...] [...]) to improve ergonomics, and making writing Iterators in CgOp a tiny bit easier? :) | 09:25 | |
sorear | Yes | 09:26 | |
au|irc | on it. | ||
moritz_ | jnthn, pmichaud: in the subst_adverbs branch, s:g/o/u/ works. However passing arguments to adverbs (like :g(1)) gives "undefined identifier 'Capture'" - any idea what might be wrong? | 09:28 | |
09:29
dakkar joined
|
|||
frettled | Woohoo, parser confusion. | 09:30 | |
09:31
snarkyboojum joined
|
|||
dalek | ecza: e538c83 | sorear++ | CgOp.pm: Start drafting a CgOp-level CPS converter |
09:33 | |
ecza: c9d4a66 | sorear++ | (2 files): Add Mu.RAWCREATE anyways for thawing procedutres. Also stub Decl::Regex. |
|||
09:42
xabbu42 joined
09:46
kazoo joined
|
|||
au|irc | sorear: alright, it's in. not yet checked for proper circumfix balancing but works :) | 09:46 | |
sorear | excellent | 09:47 | |
09:48
telling2 joined
|
|||
au|irc finds ":setf lisp" to be great when hacking CgOp | 09:48 | ||
09:49
telling2 left
|
|||
dalek | ecza: f98b0b1 | au++ | (2 files): * Grammar: Allow [] in CgOp as synonym forms for (). readability. |
09:51 | |
ecza: 0fd7044 | au++ | setting: * Also bracketify the prog args in c9d4a66. |
|||
ecza: 0fb98a0 | sorear++ | setting: Implement List.iterator |
09:57 | ||
ecza: 63ae8f5 | sorear++ | rxwork.pl: First draft of the regex engine |
|||
sorear | au|irc: so, what are you trying to do with niecza? | 09:59 | |
au|irc | nothing, really :) | ||
I've never coded C# before | |||
so this is mostly for learning | |||
(I did code some F#, so that helps) | |||
10:00
agentzh left
|
|||
sorear | it's a lot nicer than I expected it would be | 10:00 | |
au|irc | yeah. erik (meijer) was justifiably proud of it (the post-LINQ incarnation, that is) | 10:01 | |
sorear | rakudo: "foo".substr(1,1) | ||
rakudo: "foo".substr(1,1).say | |||
p6eval | rakudo cf3da0: ( no output ) | ||
rakudo cf3da0: OUTPUT«o» | |||
10:09
kazoo left
|
|||
dalek | ecza: 69370b6 | sorear++ | (3 files): Implement Str.chars and Str.substr |
10:16 | |
ecza: 90ad541 | sorear++ | rxwork.pl: Draft the rest of the regex primitives needed here |
|||
au|irc | sorear: so I'm filling in the "..." for Op::Yada::code; it reads | 10:17 | |
CgOp::subcall(CgOp::fetch(CgOp::scopedlex("&warn")), CgOp::clr_string(">>>Stub code executed<<<")); | |||
but it compiles to | |||
return ((IP6)s0).Invoke(th, new LValue[1] { ((System.String)s1).lv }, null); | |||
and of course strings can't be LVs | |||
maybe I'm missing a RV hint somewhere, or is that a misuse of ::subcall? | |||
ah nvm | 10:18 | ||
wrong boxing level | |||
::string_var works | |||
sorear | yeah. you hit it. | 10:19 | |
au|irc | warn($), exit() and "..." are in. | ||
dalek | ecza: 6fd3e0b | au++ | (3 files): * Implement warn($), exit(), and the "..." term. |
10:22 | |
ecza: 29b9da5 | au++ | (2 files): * A bit more bracketification for (prog []) on rxwork.pl and setting. |
|||
au|irc | sorear: btw, is there an aesthetic reason that the .pm files are using Moose instead of MooseX::Declare? :) | 10:26 | |
sorear | no | 10:27 | |
dalek | ecza: e06200c | sorear++ | setting: Implement Parcel & Nil |
10:28 | |
10:31
azert0x joined
|
|||
sorear | argh. I forgot to compile that last one | 10:32 | |
sorear is about to push a fix | |||
this 15,000 line Setting.cs is making me want to increase priority of the code generation refactor | 10:33 | ||
dalek | ecza: b6fa476 | sorear++ | setting: Implement Parcel.iterator & fix build |
10:34 | |
au|irc | alright. MooseX::Declare'ifying Op.pm is pushed too | 10:35 | |
sorear | how big is the load time penalty? | ||
au|irc | 0.7s | 10:36 | |
only pays once, though, not x .pm | |||
wolverian | au|irc: I like your "irc" suffix. is it to remind you you're on irc? :) | 10:37 | |
au|irc | well, it's a carryover from irc.socialtext.net | ||
where we all use |afk |irc |brb etc | 10:38 | ||
it's a makeshift emulation of IM's presence protocol for IRC :) | |||
wolverian | "I require conversation" | ||
right. | |||
au|irc | nice association! | ||
mathw | Conversation you can have | ||
Please select a language | 10:39 | ||
dalek | ecza: 12fb896 | au++ | (2 files): * Op.pm is now using MooseX::Declare syntax. |
10:40 | |
10:41
zulon joined,
colomon joined
|
|||
rokoteko | so how does perl6 fit scientific (where I mean math) computation? | 10:42 | |
daxim | Rats are built-in, which is *sane* | 10:43 | |
rokoteko | well irrats builtin would be *sane* but not easily achieved. ;) | ||
anyhow. ++ for rats :) | 10:44 | ||
how about, let's say power series? that's somehing computers would be useful for. | |||
lazy evalution is something Im waiting for to handle power series. | 10:45 | ||
daxim | pugs: (6/55*17/8).perl | ||
p6eval | pugs: ( no output ) | ||
daxim | rakudo: (6/55*17/8).perl | ||
p6eval | rakudo cf3da0: ( no output ) | 10:46 | |
daxim | pugs: say (6/55*17/8).perl | ||
p6eval | pugs: OUTPUT«51/220» | ||
daxim | aha. | ||
rokoteko | are e, pi and i builtins? | 10:48 | |
colomon | yes | ||
well, maybe not i at the moment. | |||
rakudo: say i | |||
p6eval | rakudo cf3da0: OUTPUT«Could not find sub &i in main program body at line 22:/tmp/DJ15Fo0yF0» | ||
colomon | rakudo: say 1i | 10:49 | |
p6eval | rakudo cf3da0: OUTPUT«0 + 1i» | ||
colomon | rakudo: say e, pi | ||
p6eval | rakudo cf3da0: OUTPUT«2.718281828459053.14159265358979» | ||
daxim | rakudo: say 1i.perl | 10:50 | |
p6eval | rakudo cf3da0: OUTPUT«Complex.new(0, 1)» | ||
rokoteko | eval: ln(0+1i) | ||
colomon | rakudo: say ln(1i) | ||
daxim | prefix with one of the p6 implementation names | ||
p6eval | rakudo cf3da0: OUTPUT«Could not find sub &ln in main program body at line 22:/tmp/On_AC5ge3Q» | 10:51 | |
colomon | oh, right | ||
rakudo: say log(1i) | |||
p6eval | rakudo cf3da0: OUTPUT«0 + 1.5707963267949i» | ||
rokoteko | eval: say log(e^(i*pi)), log(pi) | 10:52 | |
dalek | ecza: efce6ed | au++ | CodeGen.pm: * CodeGen.pm is now in MooseX::Declare syntax. |
||
colomon | what do you want to do with lazy eval and power series? | ||
rokoteko | colomon: so that I can define a power series and evaluate to as much precision I like without the interpreter choking. why are you asking? | 10:53 | |
colomon | well, it's an interesting issue to me, and what you want is probably trivially possible with current rakudo. | 10:54 | |
daxim | you mean by explicit programming, loop until epsilon is small enough? | ||
rokoteko | Can you do an eval example for me, let's say with sin() power series that is lazy? | ||
daxim | also, when did rakudo get laziness? I didn't notice | 10:55 | |
rokoteko | daxim: no, Im not meaning a while loop with last inside. | ||
colomon | daxim: months ago. | ||
hmmm. | 10:56 | ||
dalek | ecza: 4dc75bb | au++ | (3 files): * Body.pm, CgOp.pm and Decl.pm are now in MooseX::Declare syntax. |
10:58 | |
rokoteko | colomon: something like "take 20 power_series_expansion", which takes the first 20 members of the power series in question | 10:59 | |
tadzik | rakudo: my $sq = gather for 0..Inf { take $_ * $_ }; $sq[3].say | ||
p6eval | rakudo cf3da0: OUTPUT«9» | ||
colomon | rakudo: sub sine-power($x) { gather for 1, 3 ... * -> $n { $x ** $n / [*] (1 ... $n) }; }; say sine-power(0.1).munch(10).perl | 11:00 | |
tadzik | now when I leave it without say, REPL hangs. Why? | ||
p6eval | rakudo cf3da0: ( no output ) | ||
colomon | tadzik: because it's trying to evaluate the entire infinite series internally | 11:01 | |
tadzik | ah, to print the result, right | ||
colomon | rakudo: sub sine-power($x) { gather for 1, 3 ... * -> $n { $x ** $n / [*] (1 ... $n) }; }; say sine-power(0.1).munch(2).perl | ||
11:01
ruoso left,
tyru left
|
|||
p6eval | rakudo cf3da0: ( no output ) | 11:01 | |
colomon | hmmm. | ||
oh, duh | 11:02 | ||
rakudo: sub sine-power($x) { gather for 1, 3 ... * -> $n { take $x ** $n / [*] (1 ... $n) }; }; say sine-power(0.1).munch(2).perl | |||
p6eval | rakudo cf3da0: OUTPUT«(0.1, 0.000166666666666667)» | ||
rokoteko | is munch anti-eager? | ||
colomon: very nice thank you. I suppose that is correct. :) | 11:03 | ||
colomon | rokoteko: munch(N) shifts the first N items off a list | ||
rokoteko: well, it's not completely right, because I left off the sign | |||
11:03
ruoso joined,
tyru joined
|
|||
rokoteko | that sounds like that the complete list has to be built first? | 11:03 | |
colomon | but | 11:04 | |
rakudo: say (0.1 * 0.1 * 0.1) / 6 | |||
p6eval | rakudo cf3da0: OUTPUT«0.000166666666666667» | ||
colomon | rokoteko: if it's lazy, certainly not | ||
dalek | ecza: f4ddde8 | au++ | (3 files): * Convert RxOp, Sig and Unit to MooseX::Declare. That's all of them. :-) |
11:05 | |
rokoteko | Ok, brilliant. Ive been wondering if perl6 would be a good language to learn first. Ive been studying Haskell for a year, be perl is more practical. and I have a relatively strong perl5 background, so it's like ... well, what's the word in English. | ||
tadzik | …awesome? :) | ||
au|irc | a perfect fit? :) | 11:06 | |
colomon | rakudo: sub sine-power($x) { my $sign = 1; gather for 1, 3 ... * -> $n { take $sign * $x ** $n / [*] (1 ... $n); $sign *= -1; }; }; say sine-power(0.1).munch(4).perl | ||
rokoteko | perfect fit is good. I was thinking in the lines of "obvious" :) | ||
p6eval | rakudo cf3da0: OUTPUT«(0.1, -0.000166666666666667, 8.33333333333334e-08, -1.98412698412698e-11)» | ||
rokoteko | and also Timtoady impresses me. Ever since I read his talk (I think it was the second state of the onion) that mentioned the similarity between triangles and circles. That is a subject that truly fascinates me. | 11:08 | |
daxim | www.perl.com/pub/a/1998/08/show/onion.html | 11:09 | |
rokoteko | Using power series I hope that I can get a wider knowledge on the subject. :) As computers have rounding errors with irrationals, then I can decide how long they compute. | ||
daxim: nods, thats the talk. "To wrap up, I'd like to talk about triangles. Here's a sample." | 11:10 | ||
sorear | subtraction appears to be doing something insane. | 11:11 | |
mathw | sorear: that would be worrying | 11:12 | |
colomon | sorear: hope that's in niecza and not rakudo... | 11:13 | |
au|irc | niecza -e 'say 1-2' #worksforme... | ||
11:13
lestrrat is now known as lest_away
|
|||
rokoteko | au|irc: in the power series I think he meant. :) | 11:13 | |
au|irc | ahh. certainly :) | ||
sorear | no | ||
0 - 1 = 0 | 11:14 | ||
colomon | rokoteko: in practical terms, however, rakudo doesn't currently have a way of dealing with numbers more precisely than floating point. | ||
sorear | but it doesn't happen when I golf it | ||
only in the middle of Parcel.iterator | |||
au|irc | is it somehow using uint? #wildguess | ||
sorear | no | 11:15 | |
I just found it | |||
au|irc | whee :) | ||
sorear | my $ix = $ll.elems - 1; | ||
this parses as: | |||
(my $ix = $ll.elems) - 1; | |||
au|irc | (my $ix = $ll.elems) -1 | ||
sorear | in the setting | ||
au|irc | *nod* | ||
sorear | because the earlier mention of sub infix:<=> causes STD to forget its builtin knowledge of = | 11:16 | |
and override it with a left-associative additive-prec op | |||
rokoteko | colomon: ok, great. Maybe I should concentrate my studied on perl6 then. perl5 is just so great and it has a lot of practical uses also. | 11:17 | |
sorear | ok I have the build fixed , pushing | 11:18 | |
rokoteko | merely, about the math, Im interested about why circles have pi as in the ratio of radius the circumference and triangle has the pi as the sum of angles. Ive been studying hyperbolic geometry, complex analysis, topology and what all about this drives me forwards is currently trying to understand Atiyah-Singer theorem. | 11:19 | |
it would be nice to have some easy-to-use (ok, perl *is* complex) computing power at use to test thing out. | 11:20 | ||
au|irc | easy-to-use + complex = manipulexity :) #youCanHaveBoth | 11:21 | |
rokoteko | # CamelCaseBoth or camel_case_both | 11:22 | |
colomon | rokoteko: I should warn you that Rakudo currently has a bug which will make dealing with more than one power series at once very tricky. basically, you cannot have two infinite generators going from the same code at the same time. | ||
so I should be able to say something like | 11:23 | ||
11:23
i__ joined
|
|||
dalek | ecza: 50423d2 | sorear++ | test.pl: Tests for Parcel (todo) |
11:23 | |
ecza: bfb226a | sorear++ | setting: Two small bugfixes, Parcel is still not quite working |
|||
ecza: bd00700 | sorear++ | Kernel.cs: Disable p6exceptions until they are properly fixed |
|||
ecza: 1789938 | sorear++ | Niecza/Actions.pm: Implement my @x := foo syntax |
|||
rokoteko | colomon: ok. but it should be fixed relatively soon? | ||
colomon | rakudo: sub sine-power($x) { my $sign = 1; gather for 1, 3 ... * -> $n { take $sign * $x ** $n / [*] (1 ... $n); $sign *= -1; }; }; say (sine-power(0.1) Z+ sine-power(0.2)).munch(4).perl | ||
p6eval | rakudo cf3da0: OUTPUT«(0.4, 0, 0, 0)» | ||
colomon | and you can easily see that's not right. | 11:24 | |
rokoteko: I've been pressing to get it fixed for several months now, but it seems to be tricky. | |||
au|irc | sorear: hrm, I spoke too soon. converting the method arguments into MooseX::Declare imposes a type/signature checking penalty, and on a full "make test" run it slowed things down... (7s vs 18s) | 11:26 | |
sorear | Aww :( | 11:27 | |
au|irc | can revert if you'd like; it's a tradeoff between coding time and dev/compile turnaround time I guess :) | ||
11:27
Lorn left
|
|||
sorear | I think I would prefer it; turnaround time is rather a problem | 11:27 | |
rokoteko | colomon: Z is a zip-operator? | ||
11:28
paul1234 joined
|
|||
colomon | rokoteko: yes | 11:28 | |
rokoteko | something Ive missed in perl5 core also :) | ||
colomon | so Z+ lazily adds two (potentially infinite) lazy lists | ||
au|irc | sorear: ok, reverted :) | ||
11:28
snarkyboojum left
|
|||
dalek | ecza: 2a2ae2d | au++ | (3 files): Revert "* Convert RxOp, Sig and Unit to MooseX::Declare. That's all of them. This reverts commit f4ddde8e73835aeed9e7f2bd747a70ca6b56f5d5. |
11:29 | |
ecza: 58c7a4a | au++ | (3 files): Revert "* Body.pm, CgOp.pm and Decl.pm are now in MooseX::Declare syntax." |
|||
ecza: 39786c2 | au++ | (2 files): Revert "* Op.pm is now using MooseX::Declare syntax." |
|||
ecza: 65fe5e9 | au++ | CodeGen.pm: fa2393d | sorear++ | setting: function. Also fix a thinko with list flattening |
|||
11:29
zulon left
|
|||
rokoteko | so you think someone has found the attempts to understand perl5 interpreter code impossible to understand could do something with perl6 to help it get finally released? | 11:30 | |
colomon | rokoteko: absolutely | 11:31 | |
well, maybe not a ton for the R* release next week. :) | |||
moritz_ | rokoteko: most of us have no deep knowledge of p5 guts, if at all | 11:32 | |
rokoteko: question is, what do you want to do? write modules? compiler? documentation? | 11:33 | ||
colomon | though even then, a good short but useful module could be written in the next week and make it into the release. and that would be entirely working in p6 itself, no compiler guts required | ||
au|irc | sorear: alright, I think I grokked niecza :) many thanks for handholding me through! hopefully I didn't abuse my commit bit too much... | ||
rokoteko | modules, interpreter, documentatio for the stuff Ive written of course. :) I know some of perl5 guts, as in I have some knowledge of cpansearch.perl.org/src/RURBAN/illg...index.html | 11:34 | |
au|irc waves and returns to dinner, then translation, then a repaired MacBookPro and then $dayJobAtApple :) | |||
11:34
au|irc is now known as au|afk
|
|||
rokoteko | moritz_: of course I wish some of the "fun" stuff, as in I enjoy programming perl. I find it fun. :) | 11:35 | |
moritz_ | rokoteko: I've started with a Perl 6 port of CGI::Application, where you can contribute if you want | ||
tadzik | moritz_: are Acme::* modules worth including in proto? | ||
rokoteko | au|afk: bye :) Hope you enjoy your forbidden fruit :) | 11:36 | |
moritz_ | tadzik: yes | ||
tadzik | moritz_: I've ported Acme::Meow :) github.com/tadzik/Acme-Meow-perl6 | ||
rokoteko | moritz_: ah! that's more interesting than catalyst stuff definitely :) | ||
moritz_ | tadzik: btw most Perl 6 modules on github put the perl6- in front... but it's not necessary | 11:37 | |
rokoteko | Ive started to dislike the usual MVC design. That happened while I was programming Java for a while. | ||
tadzik | moritz_: well, I wasn't sure how it should be named | ||
11:37
synth joined
|
|||
moritz_ | rokoteko: github.com/moritz/CGI-Application do you have github ID? | 11:37 | |
rokoteko | moritz_: so most of "you" arent perl5 people? | ||
colomon | here's a better version of the sine series: gist.github.com/482850 | 11:38 | |
moritz_ | rokoteko: most of us can use perl 5, but don't hack the guts | ||
colomon | rokoteko: I've used perl5 a bunch, but I've never even looked inside the source for it. | ||
rokoteko | No, maybe I should. I just set up a git server at work and I kinda liked it. | ||
moritz_: Ill take a look at your project. It well take awhile to take know the syntax but Id be more than happy to help. :) | 11:39 | ||
or "just set up" is like couple weeks ago, Ive been enjoying my holidays ever since. :) | |||
last nice I dreamt of programming perl, so I guess I kinda fond of it! :) | 11:40 | ||
s/nice/night/ | |||
moritz_ | rokoteko: when you've got a github id, just tell me the name, then I can add you as a committer. Most Perl 6 projects are very liberal wrt commit bits :-) | ||
colomon | hmmm, I dreamt of playing football (US) again. | ||
rokoteko | moritz_: ok. Ill contact you then. Ill try to get to know a bit of your project first. Ive mainly been programming in-house projects that also have 5-15 year-old in-house web frameworks. :) | 11:42 | |
sorear | 1, (2, 3), ((4, 5), (Nil, 7)) --> 132Parcel()<instance>Parcel()<instance> | 11:43 | |
parcel flattening is nearly here | |||
rokoteko | but it's kind of fascinating also, to see how people have thought is the best way to do the shit. | ||
moritz_ | rokoteko: ok. There's no documentation yet, but the methods are all named in the same way as the Perl 5 CGI::Application methods | ||
and there are tests :-) | |||
takadonet | morning all | 11:46 | |
rokoteko | moritz_: personally I find code self-documenting, so it's not a problem. :) | ||
moritz_ | :-) | ||
rokoteko | moritz_: but as I written documentation ive also found its best to write it as you write code! | 11:47 | |
ecza: 7b4cabe | sorear++ | (2 files): Improve handling of my @x in subs |
|||
rokoteko | so it's kinda sad its undocumented, but that doesnt scare me. the least so as it is documented in an earlier written code. | ||
moritz_: do you have a todo-list? | 11:48 | ||
moritz_ | rokoteko: it's "port more features from CGI::Application" | 11:49 | |
ie from the perl 5 version | |||
rokoteko | moritz_: ok. | ||
moritz_ | rokoteko: I fear somebody needs to write Cookie module first | ||
rokoteko | the code looks rather clear. | ||
moritz_ | at least for the cookie handling code in CGI::App | ||
rokoteko | some perl6 things I have learn. what on eart is method !foo {} ? | 11:50 | |
tadzik | private method | ||
rokoteko | ahhh! | ||
moritz_ | ! means not, so method !foo is a method you don't call from the outside :-) | 11:51 | |
rokoteko | %ENV{CGI_APP_RETURN_ONLY} .. you have some new CGI headers in ENV? | ||
sorear | stefan@stefans:~/niecza$ ./niecza_eval -e 'my $buf = ""; sub cat(*@x) { while @x { $buf = $buf ~ @x.shift; }; $buf; }; say cat(1, (2, 3), ((4, 5), (Nil, 7)))' | 11:52 | |
123457 | |||
\o/ | |||
moritz_ | rokoteko: no, that's only internally used for testing | ||
colomon | lolibloggedontaylorseries: justrakudoit.wordpress.com/2010/07/...th-series/ | ||
moritz_ | rokoteko: it's much easier to test if it doesn't print out stuff, but returns it | ||
daxim | needs moar loli. | ||
rokoteko | moritz_: ok. | ||
dalek | ecza: 8e5549c | sorear++ | setting: Fix lists interpolating backwards |
11:53 | |
ecza: 6d2ff7d | sorear++ | setting: Fix bad use of signatures - parcel flattening works! |
|||
rokoteko | so about [<prerun>] what is <prerun> there? a method? also how does the type system work like, every type has a "base-type" as I think Ints are Nums? | 11:54 | |
moritz_ | rokoteko: <prerun> is the same as qw/prerun/ in Perl 5 | ||
and yes, it's a method name here | 11:55 | ||
rokoteko | ah .. so the <> is just a sugar for arrays? | ||
moritz_ | [...] is an array, and <foo bar> is a quoted list | ||
rokoteko | ok. I think I need to read the synposes also to get a hang of perl6 also. | 11:56 | |
moritz_ | rakudo: say [<prerun postrun>].perl | ||
p6eval | rakudo cf3da0: OUTPUT«["prerun", "postrun"]» | ||
moritz_ | rokoteko: perlgeek.de/en/article/5-to-6 might be of interest for you | ||
rokoteko | moritz_: bookmarked, thanks. :) | 11:57 | |
ah wait what. POD syntax is the same? | 11:58 | ||
moritz_ | no | ||
but similar | |||
=begin stuff ... =end stuff | |||
instead of =head1 ... =cut | |||
rokoteko | do you have links that absolutely define some functions, so you write like eclipse plugins that browse the docs for you? .. Im a unix+vim user myself but Ive met the just-graduated windows+eclipse user at work. | 11:59 | |
so you are able to write ... that is. | 12:00 | ||
I found that they prefer java also because they can integrate the docs to their editor. | |||
moritz_ | not yet | ||
there's been work on a tool for that, named 'grok' | |||
but it's nto really mature | 12:01 | ||
(afaict) | |||
literal will likely correct me soon enough :-) | |||
literal | nah | ||
rokoteko | but it doesnt work if the documentation isnt written at the beginning like that? | 12:02 | |
or does it? | |||
moritz_ | it's meant to work independently of the location of the POD | 12:03 | |
literal | same as in Perl 5 | 12:04 | |
rokoteko | I just asked him to show how eclipse works with POD and it sucked compare to Java thing. people, at my last workplace where I partly worked progamming java, really tried to force me to use eclipse. but I was just so much faster with vim. | 12:07 | |
moritz_ | right. vim has the advantage of being a decent editor :-) | ||
rokoteko | yes. I took a look, out of interest, at the vim plugin for eclipse. omg. it was nothing like vim :) | 12:10 | |
anyhow. afk for now. Im on a holiday, as stated earlier, but just had an urge to do something with perl after the dream last night. :) | 12:11 | ||
moritz_ | btw there's a perl6 vim syntax file at github.com/petdance/vim-perl | ||
it's not perfect, but works more often than not | |||
dalek | ecza: d740787 | sorear++ | rxwork.pl: Bring rxwork into the debugging phase |
12:12 | |
ecza: 9f72975 | sorear++ | rxwork.pl: rxwork: Fix some iterator issues |
|||
takadonet | sorear++ :) | 12:13 | |
colomon | rakudo: say "10" before "100", "10" < "100" | 12:15 | |
p6eval | rakudo cf3da0: OUTPUT«11» | ||
colomon | rakudo: say "010" before "100", "010" < "100" | ||
p6eval | rakudo cf3da0: OUTPUT«11» | ||
colomon | rakudo: say "20" before "100", "20" < "100" | 12:16 | |
p6eval | rakudo cf3da0: OUTPUT«01» | ||
hejki | rakudo: say 10 before 100 | 12:17 | |
p6eval | rakudo cf3da0: OUTPUT«1» | ||
hejki | rakudo: say 20 before 100 | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
hejki | are they Str() for a reason? :) | ||
in your tests i mean | |||
12:18
masak joined
|
|||
masak | hi #perl6! | 12:19 | |
moritz_ | oh hai masak | ||
looking at the changelog, it's going to be an awesome release. | |||
masak | \o/ | 12:20 | |
cognominal | std: say ,, | 12:21 | |
p6eval | std 31772: OUTPUT«===SORRY!===Preceding context expects a term, but found infix , instead at /tmp/F3hluJKO0T line 1:------> say ⏏,,Parse failedFAILED 00:03 116m» | ||
cognominal | rakudo: say ,, | ||
moritz_ | delegation, binding, Buf and basic binary IO, closures, autoviv, $*ARGFILES, backtracking into captures, | ||
p6eval | rakudo cf3da0: OUTPUT«===SORRY!===Confused at line 22, near "say ,,"» | ||
jnthn | o/ folks | ||
phenny | jnthn: 03:47Z <pmichaud> tell jnthn Is there a way from actions to see if an outer scope defines a method (regex, actually) of a given name? See Pm-21 in misc/pm.txt . | ||
jnthn: 03:48Z <pmichaud> tell jnthn it doesn't appear that methods are entered in a PAST::Block's symbol table. | |||
masak | rakudo: say 3i ~~ (1i .. 5i) | ||
p6eval | rakudo cf3da0: OUTPUT«1» | 12:22 | |
12:22
bluescreen joined
|
|||
masak | lolitsjnthn! | 12:22 | |
moritz_ | and then small things like Mu.perl | ||
masak | rakudo: say (2 + 3i) ~~ (1i .. 5i) | ||
p6eval | rakudo cf3da0: OUTPUT«0» | ||
masak becomes curious | |||
12:22
bluescreen is now known as Guest62932
|
|||
moritz_ | rakudo: say 1i.succ | 12:22 | |
p6eval | rakudo cf3da0: OUTPUT«1 + 1i» | ||
moritz_ | rakudo: say 1i.succ cmp 5i | ||
p6eval | rakudo cf3da0: OUTPUT«1» | 12:23 | |
masak | rakudo: say (1 + 1i) ~~ (0 + 0i .. 2 + 2i) | ||
jnthn | phenny: tell pmichaud no they shouldn't be unless marked "my regex" or "our regex" in which case they then have an entry. And that's the interesting case for the lexical regex things afaik? Can check...catch me when you're awake, I should be around plenty today anyway :-) | ||
phenny | jnthn: I'll pass that on when pmichaud is around. | ||
moritz_ | masak: any more questions? | ||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
masak | moritz_: yes. does complex range smartmatching check whether a complex number is on a given line segment? :) | ||
because all the examples I've tried so far suggests that. | |||
moritz_ | it does not. | ||
masak | s/suggests/suggest/ | 12:24 | |
dalek | kudo: 3370f07 | moritz++ | docs/ChangeLog: update ChnageLog |
||
sorear | I have the regex engine working | 12:26 | |
it takes about .2 seconds to match "xbc" ~~ /ab*c/ though | 12:27 | ||
jnthn | phenny: tell timbunce I'll get to it shortly...just trying to get to a lot of things at the moment | ||
phenny | jnthn: I'll pass that on when timbunce is around. | ||
sorear | now I just need to add regex syntax and fold rxwork back into setting | ||
sorear -> nap | |||
colomon | masak: actually, it might, but only accidentally | 12:29 | |
or rather, it will test for an entire region. | |||
masak | jnthn: src/glue/enum.pir, line 80. here's where I need to install an instance of the mixed-in value, as we discussed yesterday. unfortunately, that part is PIR. is it still feasible, you think? | ||
colomon: aha. line would be slightly cooler :) | 12:30 | ||
rakudo: say (1 + 1.5i) ~~ (0 + 0i .. 2 + 2i) | |||
p6eval | rakudo cf3da0: OUTPUT«1» | ||
dalek | ecza: 1dc23fa | sorear++ | setting: Fix another precendece fail |
||
jnthn | masak: You can call '&infix:<does>' from pir | ||
ecza: 534e6b4 | sorear++ | rxwork.pl: Fix remaining bugs in regex engine |
|||
masak | yes, the rectangle hypothesis now is the prevailing one. | ||
colomon | Range just calls before and after (or maybe cmp) | 12:31 | |
jnthn | masak: Though the whole thing would be a bunch nicer in Perl 6. | ||
masak | jnthn: can I still write the mixin role in Perl 6 and have the PIR see it? | ||
jnthn | masak: I guess you it'd need to then live in a namespace somewhere | ||
masak | yes. that's the part that I have trouble visualising right now. | 12:32 | |
jnthn | masak: What's the reason we have any of it in PIR? | ||
masak: Or maybe we could switch to inline PIR? | |||
masak | jnthn: IIRC, I tried to do it in Perl 6, failed miserably, and then you did it in PIR. | ||
jnthn | And have most of it in Perl 6? | ||
masak | jnthn: how it can eventually look might be a post-* concern. | 12:33 | |
I just want this particular feature to go into the release :) | |||
jnthn | Yeah, I was doing a quick hack to make something work rather than making something it's a good idea to build on... | ||
masak | I don't mind building up a slight further tech debt here just to get the feature in. | ||
I'll assume stewardship over the code afterwards if that helps :) | 12:34 | ||
moritz_ | looks like it could be ported to nqp pretty easily | ||
jnthn | oh, the way I ended up doing it coulda been written in Perl 6 in the end anyway | 12:35 | |
(mostly because this code hasn't got any chance of hanlding lexical enums, for exaple) | |||
12:35
felliott joined
|
|||
jnthn | moritz_: NQP helps little if you want to write $value does role { method key { $name } } and such though. :-) | 12:35 | |
colomon | rakudo: say ("1", "3", "5" ... 100).perl | 12:36 | |
p6eval | rakudo cf3da0: OUTPUT«("1", "3", "5")» | ||
colomon | :\ | ||
jnthn | masak: Anyway, it probably could be turned into Perl 6 and it'd make your life easier on the roles stuff. | ||
masak | jnthn: I could try turning it into Perl 6. it didn't end well last time, though :) | 12:37 | |
12:38
skids joined
|
|||
jnthn | I think last time we tried passing a Parrot namespace PMC in | 12:39 | |
masak | yes, that was it. | ||
maybe that was the big mistake. | |||
by the way, I expect to run out of Internet connection sometime this evening. will be mostly offline tomorrow while travelling home. back Thursday, hopefully with better enumerations :) | 12:40 | ||
moritz_ | is an EnumMap read-only? | ||
jnthn | moritz_: Yes. | 12:41 | |
masak: \o/ | |||
12:42
exodist left
|
|||
masak | rakudo: my $e = EnumMap.new; $e<foo> = "bar"; say $e.perl | 12:42 | |
12:42
exodist joined
|
|||
p6eval | rakudo cf3da0: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/EoUoWpU_sc» | 12:43 | |
moritz_ | jnthn: how do I specify a package in a pasttype('call') ? | ||
like Enum::my_helper | |||
:name('my_helper'), :package('Enum')? | |||
jnthn | moritz_: You don't | 12:45 | |
moritz_: Don't specify a name on the PAST::Op node | |||
moritz_: just set pasttype to call | |||
moritz_: And then make the first child of it a PAST::Var node that looks up the thing to call | 12:46 | ||
moritz_ | ah | 12:47 | |
rakudo: enum A <b c>; say b | 12:48 | ||
p6eval | rakudo cf3da0: OUTPUT«0» | ||
tadzik | hmm. Looking at rakudo/README on github, Rakudo is also in CRUX ports | 12:55 | |
dolmen_ | rakudo: enum A <b c>; say b.^methods().join(',') | 12:58 | |
p6eval | rakudo cf3da0: ( no output ) | ||
dolmen_ | rakudo: say "5".succ | 13:02 | |
rakudo: say ("5".."10") | |||
p6eval | rakudo cf3da0: ( no output ) | 13:03 | |
[Coke] | rakudo: 'whatwhat'.say | ||
p6eval | rakudo cf3da0: OUTPUT«whatwhat» | 13:04 | |
[Coke] | juuuust checking. | ||
masak | could someone sanity-check my thinking here: gist.github.com/482925 introduces a lot of good things, and I like what I see -- expect .day-name and .month-name, which I think belong in some l10n-y non-core module. | 13:06 | |
is this too harsh? should we allow English names in the core module? | |||
it does seem like some formatting letters use those methods, so that's certainly an argument for keeping them... | 13:07 | ||
mathw | if we don't have those, we can't have anything else that renders dates unless it can farm out to the system locale | 13:08 | |
I would say | |||
for consistency :) | |||
masak | that sounds like a "keep 'em" vote to me. | 13:09 | |
moritz_ | keep 'em. Worry about l10n later | ||
masak | thing is, until now I've been advocating a "numbers yes, names no" line for Temporal. | ||
but this patch actually looks farily solid. Kodi++ | |||
I'm also displeased about publishing the name "Calendarical". eww! but everyone knows that by now, and it's still a net win, I think. | 13:10 | ||
[Coke] | masak: if it's any help, I've never heard of it. | ||
dolmen_ | Calendarical is a calendar in iCal format? | 13:11 | |
masak | [Coke]: I think naming something "Calendarical" is a symptom of the general abstract-y-ness that has been haunting S26/Temporal from the start. | ||
[Coke]: there, now you've heard it. :) | |||
dolmen_: if only. it means something like "parent thingy of Date and DateTime". | 13:12 | ||
moritz_ | Dateish! | ||
masak | sorry, *Calendrical | ||
jnthn | Timey! | ||
masak | my point still stands. | ||
jnthn | Wheny | ||
dolmen_ was ironic | |||
masak | dolmen_: yes, I suspected that. :) | ||
dolmen_: I just tend to answer even jokey questions seriously. | 13:13 | ||
jnthn | It's how Swedes do humor. :P | ||
masak | I don't think Calendrical/Wheny/Dateish should be visible. we should be careful about polluting the namespace. | ||
jnthn: yes. it is. | |||
jnthn | :-) | ||
dolmen_ | masak: Good behavior when there is ambiguity | ||
masak | dolmen_: it has been known to lead some conversations into some very interesting tracks. | 13:14 | |
dolmen_ doesn't have access to gist.github.com: dns_server_failure | |||
mathw | namespace polition is BAD | 13:16 | |
pollution | |||
my spelling is also BAD | |||
dolmen_ | masak: there is a major problem in the Temporal spec: DateTime is mutable | 13:17 | |
moritz_ | why is that a major problem? | 13:18 | |
jnthn | masak: If your internets will be FAIL before #phasers, do preport. | ||
dolmen_ | moritz_: this is a problem in the Java API where java.util.Date is mutable | 13:19 | |
moritz_ | dolmen_: can you try to explain it for somebody who doesn't know the Java API? | ||
dolmen_ | moritz_: all APIs use Date objects, but most of the time you just want to expose readonly object | ||
moritz_: for example a database query should return readonly objects | 13:20 | ||
masak | dolmen_: please nopaste a spec patch where you make DateTime immutable. | ||
13:20
macroron joined
|
|||
masak | dolmen_: oh, and a Rakudo patch :) | 13:20 | |
moritz_ | dolmen_: the problem with immutable DateTime objects is that they make some things more complicated, like setting a timezone | 13:21 | |
Leonidas | i am thinking about writing something in Perl 6 and for that I'd like to use a template engine. are there any good template engines that work with perl 6? | ||
moritz_ | also note that most database queries would probably return an Instant, not a DateTime object | ||
dolmen_ | moritz_: I think that a DateTime object must be readonly and a DateTimeCalc object (java.util.Calendar in the Java world) must be used for computations | ||
moritz_ | dolmen_: that sounds more like a Java solution than like Perl solution | 13:22 | |
masak: your turn (re template) :-) | |||
baest | dolmen_: couldn't it just be the reverse? DateTime is readonly and DateTimeImmutable could be returned by databases if needed | ||
isn't readonly | 13:23 | ||
dolmen_ | moritz_: this just a "don't repeat a bad design that will be kept for years" | ||
masak | moritz_: sorry, "template"? ENOCONTEXT | ||
Leonidas | I found HTML::Template which has been ported to p6 by masak, but actually I think the syntax is ugly ;) | ||
masak | ah. | ||
moritz_ | what's wrong with returning an Instant (which is a more light-weight anyway, and immutable) and turning it into a DateTime when more sugar is needed? | ||
masak | Leonidas: yes, I agree. it's ugly. | ||
Leonidas: don't use that one. | 13:24 | ||
moritz_ | or does that lose timezone information? | ||
Leonidas | masak: what other alternatives exist? | ||
moritz_ | Leonidas: I don't know of any usable Perl 6 template modules beyond that. | ||
Leonidas would go for something TAL or Template Toolkit-like :) | |||
masak | Leonidas: this one is my best bet so far: github.com/masak/web/blob/master/dr...xample.xml | ||
Leonidas: haven't worked on it for over half a year, so I don't remember its status. | 13:25 | ||
Leonidas: running the tests will tell you. | |||
Leonidas | masak: TAL-like. Yeah, looks way better. Thanks. | ||
Pugs had the ability to embed Perl 5, can rakudo do the same? | |||
masak | Leonidas: there's also this one: github.com/masak/web/blob/master/t/...1-basics.t | ||
Leonidas: but then we're back on "ugly", I think. :) | |||
Ratel is ugly-but-minimal, Hitomi is pretty-and-flexible. | 13:26 | ||
baest | masak: is this a "you can have working or ugly, pick one" situation? | ||
Leonidas | masak: Hitomi looks better, I don't care that much about minimal at the moment %) | ||
masak | baest: what kind of choice is that? :P | ||
13:27
tadzik left
|
|||
baest | masak: heh, I meant working or pretty | 13:27 | |
masak | Leonidas: let me know if there's some feature missing in Hitomi, and I might get the energy to revisit that code. | ||
Leonidas | For the record, I came here because masak's 10 years of Perl 6 article :D | ||
masak | \o/ | ||
au|afk | \\o// | ||
13:28
au|afk is now known as au|irc
|
|||
[Coke] | \ö/ | 13:28 | |
Leonidas | masak: thanks, will do. | ||
masak | the article seems to have made Japanese Slashdot: slashdot.jp/submission/39299/Perl-610 | ||
PerlJam | good morning all | ||
masak | by the looks of it, that's like normal Slashdot, but without all the annoying comments :P | ||
PerlJam: bonan matenon! | |||
dolmen_ | moritz_: Instant is good for storage. But having the DateTime methods sugar is important | 13:30 | |
13:30
rgrau_ joined
13:33
colomon left
|
|||
masak | std: say "OH { my $x } HAI"; say $x | 13:35 | |
p6eval | std 31772: OUTPUT«===SORRY!===Variable $x is not predeclared at /tmp/vd63FOl5fD line 1:------> say "OH { my $x } HAI"; say $x⏏<EOL>Check failedFAILED 00:01 116m» | ||
masak | std: / :my $x /; say $x | ||
p6eval | std 31772: OUTPUT«===SORRY!===Bogus term at /tmp/YZFxZG2eeA line 1:------> / :my $x /⏏; say $xParse failedFAILED 00:01 119m» | ||
masak | std: m/ :my $x /; say $x | ||
p6eval | std 31772: OUTPUT«===SORRY!===Bogus term at /tmp/JMDvjwXmnM line 1:------> m/ :my $x /⏏; say $xParse failedFAILED 00:01 119m» | ||
masak | oh. | 13:36 | |
std: / :my $x; /; say $x | |||
p6eval | std 31772: OUTPUT«ok 00:01 118m» | 13:37 | |
masak | fwiw, I agree with sorear that this is wrong. | ||
13:37
felliott left
|
|||
PerlJam | The regex should delimit a lexical scope for $x ? | 13:38 | |
13:38
timbunce joined
|
|||
masak | yes. | 13:38 | |
PerlJam | yeah, that seems "intuitive" | 13:39 | |
masak | that's my Least Surprise, at least. | ||
moritz_ | if not, you could ask if /:i a / && / b/ matches the b case-insensitive | ||
jnthn | rakudo: / :my $x; /; say $x | ||
p6eval | rakudo 3370f0: OUTPUT«Any()» | ||
moritz_ | if it doesn't introduce a scope, why should the :i be confined to just one regex? | ||
jnthn | Oh well, at least we're consistent with STD. | ||
masak | jnthn: wow, we support that? cool! | 13:40 | |
mathw | I just had an awesome thought | ||
jnthn | masak: Yeah | ||
mathw | "That can wait until after R*" | ||
mathw gets very excited | |||
masak | mathw: :P | ||
jnthn | masak: Thing is though that { ... } defines a scope is a very clear rule. | ||
masak: Maybe we don't want to break that with a special case to remember. | |||
mathw | but regexes are a different language | ||
moritz_ | jnthn: so you think that :i should leak into the second regex in the same scope? | 13:41 | |
what about rx/.../ vs. rx{...} ? | |||
jnthn | moritz_: No | ||
moritz_ | but why, if it doesn't introduce a new scope? | ||
jnthn | moritz_: But variables have meaning in both the regex and in Perl 6. | ||
moritz_ | yes, and :i has a meaning both in the first and in the second regex :-) | 13:42 | |
mathw | :i is more like a function call argument maybe | ||
jnthn | rakudo: rx/ :my $x /; say $x | ||
PerlJam | why should the lexicalness of :i have any relation to the lexicalness of variables? | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Confused at line 22, near "rx/ :my $x"» | ||
jnthn | rakudo: rx/ :my $x; /; say $x | ||
moritz_ | PerlJam: because both are tied to scopes | ||
p6eval | rakudo 3370f0: OUTPUT«Any()» | ||
jnthn | rakudo: rx{ :my $x; }; say $x | ||
p6eval | rakudo 3370f0: OUTPUT«Any()» | ||
jnthn | heh | ||
Well | |||
moritz_ | std: rx{ :my $x; }; say $x | 13:43 | |
p6eval | std 31772: OUTPUT«ok 00:01 118m» | ||
13:43
tadzik joined
|
|||
jnthn | That certainly breaks the block rule :-) | 13:43 | |
rakudo: regex { :my $x; }; say $x | |||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/83b6jjp1jm:22)» | ||
jnthn | Well, I guess in the rx case it's a quoting construct | ||
Not actually a block | |||
masak | rakudo: / :my $x = 42; /; say $x | ||
p6eval | rakudo 3370f0: OUTPUT«Any()» | ||
tadzik | what's the difference between rule and token, in grammars? | 13:44 | |
masak | rakudo: "foo" ~~ / :my $x = 42; /; say $x | ||
p6eval | rakudo 3370f0: OUTPUT«42» | ||
PerlJam | tadzik: rules have :sigspace turned on. | ||
masak | \o/ | ||
tadzik | they're whitespace-sensitive? | ||
moritz_ | right | 13:45 | |
13:46
Su-Shee joined
|
|||
cognominal | rakudo: eval(("a","b").Seq.perl ).WHAT | 13:47 | |
p6eval | rakudo 3370f0: ( no output ) | 13:48 | |
cognominal | rakudo: say eval(("a","b").Seq.perl ).WHAT | ||
dolmen_ | tadzik: rules ignore whitespace | ||
p6eval | rakudo 3370f0: OUTPUT«Parcel()» | ||
moritz_ | dolmen_: no. tokens ingore whitespace | ||
PerlJam | dolmen_: unless you mean "rules" in a generic sense, but we call those regex. | 13:49 | |
cognominal | doing .perl on a Seq returns a Parcel :( | ||
mathw | shouldn't .perl return a Str? | 13:50 | |
although eval() would be the one returning the Parcel there | |||
moritz_ | cognominal: it's a bug, but a small one. It's rarely necessary to reproduce the exact list type, as they can all be coerced very easily (and often automatically) | 13:51 | |
rakudo: my $x = (1, 2, 3).Seq; say $x.WHAT | |||
p6eval | rakudo 3370f0: OUTPUT«Seq()» | ||
cognominal | mathw: sorry for the imprecision. | ||
tadzik | could someone help me with grammars? I'm trying to write one to parse the config files: wklej.org/id/366783/ | 13:52 | |
mathw | cognominal: don't worry about it, I'm just waiting for the doughnut fairy | ||
13:52
drbean left
|
|||
cognominal | it tripped a test where I checked types and equality | 13:52 | |
moritz_ | tadzik: you don't match \n anywhere | ||
PerlJam | tadzik: you don't have any whitespace eating regex | ||
moritz_ | right, change 'parameter' to be a rule, not a token | 13:53 | |
tadzik | hmm, something like <emptyline>? | ||
cognominal | What is the composer for a Seq? | ||
moritz_ | @list.Seq | 13:54 | |
cognominal | ...if any | ||
dolmen_ | moritz: S05 says: A "rule" is really short for: regex :ratchet :sigspace { ... } | ||
moritz: S05 says: "rule" is a keyword | |||
moritz_ | dolmen_: yes. And it doesn't ingore whitespace. | 13:55 | |
13:55
paul1234 left
|
|||
PerlJam | dolmen_: :sigspace means whitespace within the regex implicitly match whitespace in your string. | 13:55 | |
dolmen_ | moritz_: oh, yes... | 13:56 | |
tadzik | hmm, so why should my parameter be rule, not token? There are whitespaces inside, whereas the line should look like 'key=value' | ||
dolmen_ doesn't follow enough the sysposis changes... Reading planetsix is not enough | 13:57 | ||
moritz_ | tadzik: there's nothing in your regex that eats newlines | ||
tadzik | $$ in paramater is an end of line, no? | ||
PerlJam | tadzik: so that you can match the \n at the beginning of your string (for one thing) | ||
13:57
masonkramer joined
|
|||
timbunce | jnthn: what's the status of zavolaj at the moment? | 13:57 | |
phenny | timbunce: 12:27Z <jnthn> tell timbunce I'll get to it shortly...just trying to get to a lot of things at the moment | ||
PerlJam | tadzik: $$ is zero-width | ||
moritz_ | tadzik: yes, but only the end-of-line, not the newline | ||
tadzik | alright, I added token emptyline { ^^ \s* $$ } | 13:58 | |
timbunce | jnthn: understood. thanks | ||
13:58
masonkramer left
|
|||
masak | is there a list of *features* that'll go into Rakudo Star? www.reddit.com/r/programming/commen...al/c0unjs4 is asking. | 13:58 | |
jnthn | timbunce: I suspect it's mostly going to be a case of hunting down how it broke. | 13:59 | |
masak: That'd be a long list ;-) | |||
PerlJam | tadzik: so ... you want "foo=bar\nads=7" to match <parameter><emptyline><parameter> ? | ||
timbunce | bisect? | ||
13:59
ashleydev joined
|
|||
tadzik | PerlJam: no, parameter has to have \ | 13:59 | |
… to have \n at the end | 14:00 | ||
doesn't it? It ends with $$ | |||
jnthn | timbunce: Once I dig in a can probably debug it pretty quick anyway. | ||
timbunce | I'm currently using an older perl6 to I can make progress on DBDI. They'll come a point where that'll become more difficult. | ||
moritz_ | tadzik: token key { [^\[] (\w+) | 14:01 | |
tadzik: you seem to be using perl 5 character classes | |||
tadzik | maybe I'm still making mistakes, I'm not too fluent with Perl6 regexes yet | 14:02 | |
that's why I'm trying to write something to learn my way around | |||
moritz_ | [...] is just a grouping in Perl 6 regexes | ||
tadzik | they're now <[]>, yes? | ||
moritz_ | right | ||
tadzik | so it should be <[^\[]>? | ||
PerlJam | tadzik: $$ is zero-width, it tells you when you're at the end of a line, but it won't consume the newline for matching purposes | ||
moritz_ | and <-[...]> for negated char classes | ||
masak | I'll do a spectest run, apply Kodi++'s patch, and then do another spectest run. | ||
timbunce | what arg values does the perl6 --trace option take? (They're not in the README or the --help) | ||
tadzik | oh, ok | 14:03 | |
then it should be token parameter { ^^ <key> '=' <value> \\n $$ }, right? | |||
moritz_ | right | ||
tadzik | token not rule, so I can keep the whitespace inside, yep? | ||
14:03
uniejo left
|
|||
moritz_ | right | 14:03 | |
also your string starts with a newline | |||
so you have to think about how to parse that | 14:04 | ||
tadzik | emptyline will match it | ||
wklej.org/id/366787/ | |||
moritz_ | good | ||
tadzik | updated version | ||
still, either it's wrong or I don't know how to extract anything | |||
14:04
ashleydev left
|
|||
moritz_ | if inifile.parse($string) { .say for $<parameter>.flat } | 14:05 | |
tadzik: maybe read the chapters on regexes and grammars in the book? | |||
tadzik | It look a bit complicated to me at the first glance, but I guess I should, yep :) | ||
timbunce | The trace flags also aren't noted in rakudo/docs/running.pod | 14:06 | |
moritz_ | I guess because they don't produce very interesting output :/ | ||
masak | anyone see anything not up-to-date on rakudo.org/status ? | ||
I just provided that as a list of things that work for the Reddit person. | 14:07 | ||
jnthn | timbunce: It's near the top of my hit list. | ||
timbunce | moritz_: how can I track down Null PMC access in type() and similar errors? | ||
the lack of a trace or stack dump or similar (and the lack of a clue on my part) means I hit a wall whenever I get that kind of error. | 14:08 | ||
moritz_ | timbunce: I rename the backtrace printer, so that I get the parrot-level traces, which then show at least a bit of where the error occured - not a good technique overall | ||
timbunce | moritz_: sounds good, but what the heck does "rename the backtrace printer" mean? | 14:09 | |
14:09
patcoll joined,
gbacon joined
|
|||
dolmen_ | rakudo: qp{/etc/passwd}.say | 14:09 | |
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22» | 14:10 | |
moritz_ | timbunce: src/Perl6/Compiler.pir, method backtrace | ||
timbunce: rename to something unrelated (like, add a _) | |||
then recompile | |||
dolmen_ | rakudo: qp{/etc/passwd}.WHAT | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22» | ||
14:10
plobsing joined
|
|||
jnthn | qp NYI | 14:10 | |
[Coke] | (that method overrides the normal parrot backtrace printer.) | ||
14:12
paul1234 joined
|
|||
moritz_ | rakudo: my @a = <a b c>; say @a[1|2] | 14:13 | |
p6eval | rakudo 3370f0: OUTPUT«any("b", "c")» | ||
moritz_ | masak: the autothread over array/hash indexes can be removed from the non-working list | 14:14 | |
dolmen_ | Are qd{} and qt{} used in the spec? | ||
masak sees if he has privs to remove it | |||
PerlJam | dolmen_: what are qd and qt ? | ||
14:15
drbean joined
|
|||
dolmen_ imagines: my $today = qd{2010-07-20}; | 14:15 | ||
14:15
Mowah left
|
|||
PerlJam | oh. no. | 14:15 | |
dolmen_: See perlcabal.org/syn/S32/Temporal.html though | 14:16 | ||
14:17
daxim left
|
|||
timbunce | I know there's huge effort going into getting language features implemented for R* but as a newbie I'd really appreciate better diagnostic tools. At the moment perl6 seems to slap me in the face regularly with "some error occurred but I'm not going to help you find out what". Saying SORRY! doesn't soften the blows much. If I wasn't so motivated I think I'd be quickly turned off exploring perl6. | 14:17 | |
14:18
Mowah joined
|
|||
PerlJam | timbunce: I know the feeling. That's exactly the same feeling I had when I first played with ruby over 10 years ago. I didn't pick it up again until about 4 years ago and the situtation was much improved. | 14:18 | |
jnthn | timbunce: Many of the patches I've put in of late are aimed at improving errors, fwiw. | 14:19 | |
cognominal | I guess some sort of pragma would be nice to get the parrot stack. Does not need to be the default though. | ||
14:19
Lorn joined
|
|||
moritz_ | timbunce: if you can reproduce any of these bugs with a little piece of code, please report them, so that we can improve the situation | 14:19 | |
14:19
au|irc is now known as au|zzz
|
|||
timbunce | moritz_: disabling backtrace helped. I now see "current instr.: 'perl6;DBDI_pg;!class_init_436' pc 5018 (EVAL_5:1918 (DBDI_pg.pm6:107) called from Sub '' pc 874 (EVAL_5:271) (DBDI_pg.pm6:1)" etc. Very handy. | 14:19 | |
takadonet | timbunce: the more you describe yours issues, better chance they will get fixed sooner | 14:20 | |
PerlJam | timbunce: aside from a real debugger, what sort of better diagnostic tools would you like to have? (I fear I've gotten far too used to hacking in says everywhere) | ||
moritz_ | timbunce: and btw, it has already improved a lot. Some weeks ago you'd never get proper line numbers in error messages :-) | 14:21 | |
cognominal | To answer takdonet in the place of timbunce, I think sometimes I could golf the errors faster if I get back the rakudo trace | ||
s/rakudo/parrot/ | |||
timbunce | cognominal: exactly | 14:22 | |
cognominal | I mean the stack trace. | ||
moritz_ | cognominal: I'd welcome a patch for such a pragma/switch/env variable/whatever | ||
14:22
pmurias joined
|
|||
moritz_ | rakudo: say pir::null | 14:23 | |
p6eval | rakudo 3370f0: OUTPUT«error:imcc:syntax error, unexpected '\n' in file 'EVAL_8' line 78===SORRY!===syntax error ... somewhere» | ||
moritz_ | rakudo: say pir::null__p | ||
cognominal | like a 'use trace :stack<parrot>' ? | ||
p6eval | rakudo 3370f0: OUTPUT«Null PMC access in type() in main program body at line 22:/tmp/0UAKy4HxeB» | ||
moritz_ | that even produces a correct line number | 14:24 | |
cognominal | that would leave other options open? | ||
timbunce | It doesn't help that I'm stuck on an older version (currently June 25th) till zavolaj's working again. | ||
moritz_ | cognominal: I don't care much for the syntax now | ||
timbunce | disabling the backtrace method has helped, thanks moritz_++ | ||
dolmen_ | masak: my patch for S32 would be to remove the "Set methods" section entirely. A new object should be always created. truncate() would return a new object like succ() does. | 14:25 | |
masak: $dt.set(:year(2030)) would be instead written DataTime.new($dt, :year(2030)) | 14:30 | ||
s/DataTime/DateTime/ | |||
tadzik | wklej.org/id/366801/ -- straight from the book, but Rakudo complains about it: Useless declaration of has-scoped token in a module; add our or my to install it in the lexpad or namespace. What has changed, how should it look now? | 14:31 | |
masak | dolmen_: that feels insufficiently flexible to me; always "changing" attributes through the constructor. | 14:32 | |
PerlJam | tadzik: straight from an old version of the book perhaps | 14:33 | |
tadzik | probably. 2010.06 | ||
nothing newer prebuilt as I see :\ | 14:34 | ||
cognominal | afk& | ||
PerlJam | tadzik: stick "my" in front of the token and regex declarations. | ||
tadzik: though I'm not sure rakudo does lexical lookup yet for m/ <dup> / to work | 14:35 | ||
tadzik | now it says Method 'dup' not found for invocant of class 'Cursor' | ||
TiMBuS | <&dup> will, work but won't capture | ||
dolmen_ | masak: most of the case of use of a DateTime object are readonly: you get the object from a data source (system time, database data, file attribute) and you do not change it. Only transform it (Str) | ||
tadzik | yeah, that's probably what You just said | ||
dolmen_ | masak: the only case where I see modifying an object would be useful would be as a loop iterator | 14:36 | |
masak | dolmen_: prepare at least the spec patch, and optionally the Rakudo patch, and I will apply it/them. | ||
TiMBuS | (crazy guess) <dup=&dup> might work? | 14:37 | |
14:37
macroron left
|
|||
PerlJam | TiMBuS: it does I do believe. | 14:37 | |
14:37
Mowah left
|
|||
dolmen_ | masak: what is the repo? | 14:38 | |
14:38
plobsing left
|
|||
masak | dolmen_: svn.pugscode.org/pugs/docs/Perl6/Spec/ | 14:38 | |
dolmen_: with your change, we can get rid of set-year et al, which are currently a workaround. | 14:40 | ||
afk # walk | |||
[Coke] | tadzik: this works: | 14:48 | |
nopaste.snit.ch/22146 | |||
the foo=&foo is lame, though. presumably there's a better way. | |||
PerlJam | wait for pmichaud's regelx branch to merge | 14:49 | |
er, regelx | |||
14:49
timbunce left
|
|||
PerlJam | er, reglex! | 14:49 | |
or use a grammar | 14:50 | ||
tadzik | I was about to try some more complex regexes before learning grammars ;) | 14:51 | |
14:54
tylercurtis joined
|
|||
dolmen_ | paste? | 14:58 | |
14:58
pmurias left
|
|||
[particle] | hrmm, there used to be a paste link in /topic | 15:01 | |
dolmen_ | masak: nopaste.snit.ch/22147 | 15:02 | |
15:02
timbunce joined
15:04
baest left
15:09
timbunce left
15:11
snarkyboojum joined
15:13
TiMBuS left
|
|||
tadzik | nopaste.snit.ch/22148 can someone take a look? | 15:13 | |
the line before the last prints name=brad as expected | 15:14 | ||
15:14
patcoll left
|
|||
[particle] | next time, you can paste the output, too. for example, $ cat my-file.p6 ... $ rakudo my-file.p6 ... | 15:17 | |
tadzik | yeah, my bad | ||
[particle] | try $config[0]<key>[0] | ||
tadzik | Any() | 15:18 | |
[Coke] | tadzik: you want: $config[0]<keyval>[0]<key> | 15:19 | |
[particle] | ok, right, two things. | ||
[Coke] | I find it very helpful to dump the match object here. lemme see if I can remembe rhow to do that from perl6. | 15:20 | |
[particle] | if there's a ? or * or + after a regex, you'll always have an array generated, so you need to index it | ||
PerlJam | tadzik: btw, <keyval> is already capturing, you don't need () around it. | ||
tadzik | so named regexes are captured automagically? | 15:21 | |
PerlJam | tadzik: also, <keyval> [ ';' <keyval> ]* can also be written now as <keyval> ** ';' | ||
tadzik | that's useful | ||
[Coke] | tadzik: "say $config[0].perl" might have been helpful to peek into what the structure of the resulting match was. | ||
tadzik | might, but it returns Null PMC access | 15:23 | |
Null PMC access in find_method('perl') | |||
PerlJam | tadzik: not for me. | 15:24 | |
15:24
Eevee joined
|
|||
tadzik | strange | 15:24 | |
[particle] | token TOP { ^ <keyval> ** ';' $ } | ||
tadzik: are you using rakudo from git-master-head, or a release? | 15:25 | ||
tadzik | git master head | ||
15:25
TiMBuS joined
|
|||
PerlJam | huh, I would have guessed you were using a release | 15:25 | |
tadzik | This is Rakudo Perl 6, version Kiev-280-g9005478 built on parrot r48110 | 15:26 | |
PerlJam | tadzik: when did you build it? | ||
ah. | |||
tadzik | I will paste the whole thing | ||
szabgab | rakudo: for <a 1 b 2 c> -> $a, $b { say "$b - $a" } | 15:27 | |
p6eval | rakudo 3370f0: OUTPUT«1 - a2 - b - c» | ||
tadzik | nopaste.snit.ch/22151 | ||
szabgab | will this give an exception again any time soon? | 15:28 | |
PerlJam | szabgab: btw, nice job on the screencasts! | ||
szabgab | thanks | ||
which one is better the first or the second? | |||
in terms of view | |||
PerlJam | I liked the second better. | 15:29 | |
[particle] | why not $config.parse? | ||
szabgab | I think I'll need to enlarge the fonts a bit | ||
[particle] | er, $config.perl | 15:30 | |
PerlJam | szabgab: have you seen railscasts? | ||
szabgab | nope, I should check them out | ||
15:30
mmcleric joined
|
|||
PerlJam | railscasts.com | 15:30 | |
That guy uses some good styles, fonts, etc. Copy what you can and what's appropriate and you can't go wrong :) | 15:31 | ||
oh! He also uses textmate ... it would be really cool to see some screencasts that use padre :) | |||
15:34
salv0 left
15:35
salv0 joined
|
|||
szabgab | but for that I will need to run it from my own server, I guess | 15:35 | |
but otoh it clearly looks a lot better than what I have on youtube | 15:36 | ||
15:43
Mowah joined,
envi^home joined,
jaldhar left
15:44
timbunce joined
15:45
timbunce_ joined,
timbunce left,
timbunce_ is now known as timbunce
|
|||
moritz_ | colomon++ # fun-with-series blog post | 15:52 | |
ingy | morning | 15:53 | |
[Coke] | ingy: hio | 15:54 | |
ingy | I was thinking of writing a blog post for oscon/rakudo* about how I ported a ~1000 line p5 framework to p6, and it all worked | 15:56 | |
moritz_ | do that! | ||
takadonet | ingy: can i see it? :) | ||
ingy | maybe use.perl.org? | ||
takadonet: I need to write it | |||
:) | |||
I'll do it now | 15:57 | ||
takadonet | hehe | ||
15:57
mmcleric left
|
|||
PerlJam | ingy: but ... perl 6 doesn't even exist yet! ;) | 15:57 | |
15:57
mmcleric joined
|
|||
ingy | I think it's an interesting story. A lot of crazy bandaids etc | 15:57 | |
dolmen_ | ingy: the framework or the blog post? | 15:58 | |
ingy | but it is workable | ||
dolmen_: rakudo! | |||
well I needed to do a few crazy things to make it work | |||
including one pir call from jnthn++ | |||
dolmen_ | ingy: you're writing rakudo? | ||
ingy | gah | 15:59 | |
ok, I'll just write the post | |||
PerlJam | ingy++ | ||
dolmen_ | and the framework is done? | ||
ingy | dolmen_: the port is 100% complete | ||
but you can read about it in my upcoming blog post | 16:00 | ||
:P | |||
where did masak post previews of his recent use.perl.org post? | 16:01 | ||
dolmen_ | Is it github.com/ingydotnet/testml-pm6 ? | ||
ingy | dolmen_: correct | ||
dolmen_ | nopaste.snit.ch/ | ||
ingy | ah | 16:02 | |
jnthn | ingy: gist iirc | 16:03 | |
16:04
felliott joined
16:05
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
tadzik | wasn't it gist? | 16:08 | |
ingy | use.perl.org/~ingy == Brian Ingerson | ||
it's been a while | |||
I wonder who can change that | 16:09 | ||
16:10
M_o_C joined
|
|||
PerlJam | ingy: can't you? | 16:11 | |
tadzik | who is caring about november-wiki.org/? | 16:12 | |
ingy | PerlJam: doesn't seem so | ||
PerlJam | ingy: I would contact Pudge. But I haven't seen him since I stopped hanging out on irc.perl.org:#perl | 16:14 | |
dolmen_ | ingy: are you aware of blogs.perl.org? | 16:15 | |
ingy | dolmen_: mst's? | 16:16 | |
pmichaud | good morning, #perl6 | ||
phenny | pmichaud: 12:23Z <jnthn> tell pmichaud no they shouldn't be unless marked "my regex" or "our regex" in which case they then have an entry. And that's the interesting case for the lexical regex things afaik? Can check...catch me when you're awake, I should be around plenty today anyway :-) | ||
takadonet | pmichaud: morning | ||
ingy | that sounds useful | ||
16:17
justatheory joined
|
|||
jnthn | morning, pmichaud | 16:17 | |
tadzik | hmm, is <-[;\n]> a valid character class, capturing anything but semicolons and newlines? | ||
pmichaud reads backscroll | |||
ingy | hi pmichaud | ||
tadzik | hello pmichaud | ||
pmichaud | tadzik: it's valid, but rakudo doesn't recognize \-escapes in character lists yet. | ||
jnthn | tadzik: Believe so. | ||
oh heh | 16:18 | ||
tadzik | oh, ok | ||
so how can I achieve this? | |||
jnthn | I think I copy-pasted something like that from STD into Grammar.pm yesterday :-) | ||
pmichaud | tadzik: looking | ||
PerlJam | tadzik: <subrule> only captures if the character after the < is alphabetic. (just in case "capture" was being conflated :-) | 16:20 | |
pmichaud | tadzik: sadly, I don't have a quick answer. I might be able to get something in place a bit later. | 16:22 | |
tadzik | ok, nothing urgent | ||
I'm trying to write config file parser, ini files it is | 16:23 | ||
pmichaud | you could do something like <![;]> \N | ||
which means any non-newline that is not a semi. | |||
tadzik | hmm, <![;]> is the same as <-[;]>? | ||
pmichaud | no | 16:24 | |
<![;]> is zero-width | |||
basically it says "don't match a semicolon at this point" | |||
jnthn | It's like <!before ';'> iirc | ||
But more efficient. | |||
tadzik | hmm. So [ <![;]> \N ]+ is a positive number of chars not being either semicolon or newline? | 16:25 | |
pmichaud | correct. | ||
PerlJam | pmichaud: you're at oscon now? | 16:26 | |
tadzik | thanks pmichaud | ||
pmichaud | PerlJam: well, I'm in PDX now. :-) | 16:27 | |
haven't made it over to the venue yet :) | |||
might just hang out here for a while anyway -- fewer distractions. | |||
PerlJam | I bet | ||
16:27
dolmen_ left
|
|||
pmichaud | ...and the wireless may be more reliable anyway. | 16:27 | |
last time I was at oscon in PDX my laptop simply wouldn't connect to the OSCON wireless at all | |||
(different laptop then, though) | |||
PerlJam | pmichaud: does the reglex branch work correctly? | 16:29 | |
pmichaud | depends on your definition of "correctly", I suspect. | ||
I suspect I can come up with some cases where it fails. | |||
PerlJam | Well, I tried it on one test case and it worked, which is why I asked :) | ||
pmichaud | PerlJam: I'm more concerned about interactions between regex names and the setting. | 16:30 | |
It should work fine for the simple case of declaring a my-scoped regex. | |||
jnthn | pmichaud: Worried about <print> ? | 16:31 | |
pmichaud | jnthn: well, also worried about things like grammar G { token classify { ... } } | ||
16:31
new_user joined
|
|||
pmichaud | if G then tries to use <classify>, and sees the &classify entry, then it won't use the local one. | 16:31 | |
new_user | rakudo: for 1..5 { say $_ } | 16:32 | |
jnthn | Hm | ||
p6eval | rakudo 3370f0: OUTPUT«12345» | ||
16:32
new_user left
|
|||
PerlJam | that's definitely broken then by my definition of "works" :) | 16:32 | |
pmichaud | any reason why methods can't be in the PAST::Block symtable? | ||
jnthn | They're not to do with the block really. | ||
timbunce | jnthn: FYI adding "is export" to "sub PQntuples( OpaquePointer $res ) returns Int is native('libpq')" only works if the is export comes before the is native. | 16:33 | |
jnthn | Better to look at @PACKAGE[0]'s method table. | ||
16:33
phenny left
|
|||
pmichaud | the problem there is figuring out the relationship between @PACKAGE and @BLOCK, though | 16:34 | |
jnthn | timbunce: It's not surprising taht traits can have ordering dependencies. | ||
timbunce: That particular one surprises me though. | |||
pmichaud: @PACKAGE[0].block should tell you the block associated with the package, if that helps? | |||
pmichaud | ...not really. | 16:35 | |
jnthn | pmichaud: What are you trying to do? | ||
pmichaud | I'm having to scan @BLOCK, so I'd need to know when a particular block corresponds to a package | ||
16:35
phenny joined
|
|||
jnthn | pmichaud: Ah...yeah, I don't think we have the relationship marked up in that direction at the moment. | 16:35 | |
pmichaud | when encountering <foo>, I have to look to see if "foo" refers to a lexical &foo regex or should be left as a grammar method | ||
jnthn | Yes | 16:36 | |
pmichaud | so, we outward-scan the existing symbol tables looking for .symbol("foo")<scope> eq 'lexical' | ||
16:36
alester left
|
|||
jnthn | *nod* | 16:36 | |
pmichaud | but I should probably stop looking if one of the scopes corresponds to a grammar that has a "method foo" | 16:37 | |
jnthn | Hmm. That's not going to handle the inheritance case. | ||
pmichaud | right. | ||
jnthn | But yes, perhaps so. | ||
pmichaud | it doesn't handle the inheritance case, which is why I've very much not been a fan of having <foo> automatically find lexical regexes | ||
because I don't see a good way to handle it at compile time. | 16:38 | ||
jnthn | Anyway, my knee-jerk feeling is that method entries in the block symbols table is wrong, for the same kinda reasons that :method being automatically a namespace entry in Parrot was. | ||
So I'd prefer a solution that sets a block's associated package object so that can be queried. | |||
pmichaud | jnthn: I can see your point. (Not sure I agree with it, though -- block symbol tables simply say 'these are all of the symbols I'm aware of')) | 16:39 | |
anyway -- yeah, it doesn't handle the inheritance case. At the moment I'm still inclined to not merge to master until we get spec clarification. | |||
jnthn | I guess if you install it marked as :scope<has> or something it's not so bad. | ||
But I still am not too keen. | |||
pmichaud | right, I was thinking it'd be :scope<has>, or even without a :scope at all :-) | 16:40 | |
just something to say "this word gets used here." | |||
jnthn | I'll think on it some more. I'm not quite sure I've hit upon my real discomfort about it yet. But of coruse, my real discomfort might be bogus too. :-) | ||
One potential issue is that methods are unsigil'd. | 16:41 | ||
So they may conflict with type names (also unsigil'd) in the .symbol | |||
pmichaud | Yes, I was surprised that lexical regexes were going into .symbol without the sigil. | ||
ingy | is it more properly Rakudo* or Rakudo *? (in prose) | ||
jnthn | pmichaud: We may want to tweak that. | 16:42 | |
pmichaud | ingy: two words. | ||
PerlJam | ingy: I tend to write "Rakudo Star" | ||
pmichaud | so "Rakudo *". Or "Rakudo Star" if you want the prose to be clearer. | ||
jnthn | pmichaud: Since I'm quite sure we install them into the lexpad as &foo | ||
pmichaud | jnthn: yes, we do. | ||
as I said, I was surprised. :) | |||
jnthn | Yeah, I think that's a mistake. | 16:43 | |
Shoudl be in the block as &foo | |||
But in the meta-class as foo | |||
pmichaud | my regex xyz { xyz }; grammar A { regex xyz { XYZ }; }; grammar B is A { regex TOP { <xyz> } }; # which one does TOP see? | 16:44 | |
jnthn | I guess if we do put methods in as &foo too, it does mean that our compile-time idea of the lexpad and our runtime one afe going to not match up. | ||
*are | |||
pmichaud | I wouldn't plan to put methods in as &foo | ||
(unless it's a "my method" of course) | |||
jnthn | pmichaud: Yeah, but then we get conflict with a typename foo too | ||
pmichaud | right | 16:45 | |
jnthn | rakudo: role Bar[::foo] { method foo { foo } }; say Bar[Int].foo | ||
p6eval | rakudo 3370f0: OUTPUT«Int()» | ||
pmichaud | which bolsters your argument that it doesn't belong in the block's symbol table :) | ||
16:46
felliott left
|
|||
jnthn | Yeah, I'm a bit worried what'd happen in the above case. | 16:47 | |
pmichaud | This all reminds me of why we got rid of the "method fallbacks" some time ago. | 16:48 | |
jnthn | Plus just a general sense of "it's hard enough to keep our runtime and compile time story in sync, let alone deciding they're going to be desync'd in some special cases" :-) | ||
Anyway, that "what does TOP see" example, so far as I grok the spec, would lead to the lexical one being seen. | |||
I can understand why that'd potentially be uncomfortable though. | 16:49 | ||
PerlJam | I would have said it should see B::xyz | ||
pmichaud | PerlJam: you mean the one inherited from A? | 16:50 | |
PerlJam | yes | ||
pmichaud | then what about | ||
16:50
supernovus joined
|
|||
pmichaud | grammar A { regex xyz { XYZ }; }; my regex xyz { xyz }; grammar B is A { regex TOP { <xyz> } }; # which one does TOP see? | 16:50 | |
still the one inherited from A? | |||
PerlJam | yes | ||
pmichaud | then what about | ||
PerlJam | I know what you're about to show me and I don't know :) | 16:51 | |
supernovus | phenny: tell Kodi nice work on the Temporal stuff! | ||
phenny | supernovus: I'll pass that on when Kodi is around. | ||
PerlJam | (my answer is "I don't know") | ||
pmichaud | my regex alpha { xyz }; grammar B is Grammar { regex TOP { <alpha> } }; # what does TOP see? | ||
PerlJam | I would tend to lean towards the inherited one | 16:52 | |
pmichaud | maybe we get to be okay if we say that only regexes not part of a grammar declaration participate in the lexical lookups | ||
PerlJam | pmichaud: that seems sane | ||
jnthn | pmichaud: Could work. | 16:53 | |
16:53
felliott joined
|
|||
pmichaud | i.e., a regex that is being installed into a grammar doesn't ever at outer lexicals | 16:53 | |
PerlJam | if they really wanted the lexical one, they could have said <&alpha>, right? | ||
pmichaud | PerlJam: Yes. | ||
and if they really wanted to override alpha, they could do it in the declaration of B | |||
PerlJam | right | ||
so, seems really sane. | |||
pmichaud | (the difference being that <&alpha> is non-capturing, so it'd need to be <alpha=&alpha> or something like that) | 16:54 | |
PerlJam | right | ||
seems like a small-price, low-probability sort of thing to me. | |||
moritz_ | only 'my' or 'our' regexes in grammars would be picked up as lexicals anways | 16:55 | |
PerlJam | (i.e. if they *really* wanted the lexical <alpha> and they wanted a named capture, we should encourage the use of grammars anyway) | ||
pmichaud | I still feel as though I'd like some definite clarity on this point, though. If at some point we disallow <xyz> from finding a lexical &xyz, we'll end up with a fair bit of code breakage. | 16:56 | |
16:56
mmcleric_ joined,
mmcleric_ left,
mmcleric left
16:57
mmcleric joined
|
|||
PerlJam | pmichaud: so ... we don't do that :) | 16:57 | |
pmichaud | PerlJam: we may have to | ||
jnthn | pmichaud: It worked for the wrong reasons in alpha, and a lot of code depended/depends on it. | ||
pmichaud | jnthn: right | ||
jnthn | My sense is that people expect that it's going to start to work again. | 16:58 | |
To some degree. | |||
pmichaud | jnthn: unless we decide that it can't work | ||
PerlJam | jnthn: indeed | ||
pmichaud | jnthn: because by making it work we're conflating method dispatch with lexical dispatch | ||
PerlJam | pmichaud: we'll never know without an implementation that people can hack on :) | ||
jnthn | pmichaud: True, which we've gone to lengths to avoid elsewhere. | 16:59 | |
PerlJam | hmm | ||
pmichaud | jnthn: and for good reason. | ||
jnthn | pmichaud: These kinds of reasons. :-) | ||
moritz_ | brunorc.wordpress.com/2010/07/20/pe...-near-you/ | ||
pmichaud | the fact that <xyz> finds things lexically is actually left over from the days when we also were saying that xyz $y could fall back to $y.xyz (or perhaps it was the other way around, I forget) | ||
moritz_ | still, there are good use cases for it | 17:00 | |
for example importing rules from modules | |||
pmichaud | either way, we eliminated that particular fallback mechanism, but never updated regexes to match. | ||
tadzik | the best way to achieve required parameters in classes is 'has $.a = die "...";'? | ||
moritz_ | where you don't want full grammars | ||
TimToady | perhaps some way of explicitly importing | ||
moritz_ | I'd also be fine with a shorter syntax for explicitly calling lexical rules, and have them capture | 17:01 | |
17:01
xabbu42 left
|
|||
PerlJam | in classes, method dispatch always needs a dot, right? perhaps make the same requirement in grammars (and allow <.foo> to capture) | 17:01 | |
moritz_ | having <&foo> capture, and <.&foo> not capture, for example | ||
pmichaud | PerlJam: ouch. that puts huffman all wrong. | ||
17:01
xabbu42 joined
|
|||
jnthn | PerlJam: I almost suggested as logical, but it felt too wrong :-) | 17:01 | |
moritz_ | but <foo=&foo> feels tedious | ||
TimToady | nothing that starts with punctuation captures right now | 17:02 | |
don't wanna break that | |||
PerlJam | moritz_: or, "if you want capturing, you want a grammar" | ||
pmichaud | agree, don't break that. | ||
moritz_ | PerlJam: no | ||
jnthn | tadzik: heh, that probably works actually... :-) | ||
17:02
plainhao joined
|
|||
jnthn | I hadn't thought of it. :-) | 17:02 | |
17:02
dakkar left
|
|||
tadzik | jnthn: is there a better way? | 17:02 | |
moritz_ | PerlJam: there's nothing wrong with having lexical rules - why force people away from them? | 17:03 | |
jnthn | tadzik: Well, you could also write a new method with a required param. | ||
pmichaud | moritz_: what we're saying is that there may indeed be somethign wrong with lexical rules. | ||
See my examples above. | |||
tadzik | and bless myself, like in Perl 5 | ||
? | |||
pmichaud | until you can resolve those, it's not the case that "there's nothing wrong with lexical rules." | ||
jnthn | Go bless yourself! | ||
uh, I mean :-) | |||
tadzik: Yeah | |||
tadzik | erm, "call 'bless' myself" | ||
:) | |||
moritz_ | or just call self.Mu:::new(|%args) | 17:04 | |
jnthn | Or that | ||
Note that you can also do like | |||
TimToady | maybe the easiest way to fix it is by saying they have to put grammar {...} around everything :) | ||
supernovus | Any idea when Kodi's patch will be applied? I will need to modify my recently added %z in the loadable DateTime::strftime library, as it currently depends on the old timezone attribute format in DateTime. | ||
moritz_ | pmichaud: if there's a short syntax for calling lexical rules (that captures), there's nothing wrong with lexical regexes per so. Only with our current approach, maybe | 17:05 | |
tadzik | is there something like sub BUILD in Moose? | ||
jnthn | method new(%args (:$required-name!, :$another!, *%)) { self.bless(*, |%args) } | ||
tadzik: Yes, submethod BUILD | |||
tylercurtis | Also submethod BUILD. | ||
17:05
stkowski joined
|
|||
PerlJam | pmichaud: how about this ... R* release is too close. Implement something hits the big targets and let the edge cases work themselves out by people using R* :-) | 17:05 | |
tadzik | sounds like a prettier way for required params | ||
jnthn | tadzik: Yes, that'd also work | ||
tadzik | good. Will look more sane | 17:06 | |
17:06
thebird left
|
|||
pmichaud | PerlJam: there's a problem with "hit the big targets" | 17:06 | |
jnthn | rakudo: class Foo { has $.x; submethod BUILD($!x) { } }; say Foo.new(x => 42).x; | ||
p6eval | rakudo 3370f0: OUTPUT«42» | ||
17:06
xabbu42 left
|
|||
jnthn | rakudo: class Foo { has $.x; submethod BUILD($!x) { } }; say Foo.new().x; | 17:06 | |
p6eval | rakudo 3370f0: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'Foo::BUILD' at line 22:/tmp/qAqWBWlP_L in main program body at line 22:/tmp/qAqWBWlP_L» | ||
jnthn | \o/ | ||
pmichaud | the way PGE worked was that it fell back to lexical lookup if a method didn't exist at runtime. i.e., it's a runtime check. That's expensive. | ||
tadzik | jnthn: that looks even more cryptic to me :P | 17:07 | |
pmichaud | it may also be wrong, as the lexical lookup should perhaps take precedence over the method lookup. | ||
PerlJam | pmichaud: it also sound backwards | ||
right | |||
pmichaud | right | ||
TimToady | perhaps lexical lookup works only when you *aren't* in a grammar | ||
pmichaud | so, if we take the reglex approach, that does a lexical lookup and falls back to method if the lexical doesn't exist | ||
jnthn | tadzik: The above works because named parameters get mapped to positional ones of matching names, and $!x in a signature binds to an attribute instead of a lexical :-) | ||
pmichaud | TimToady: we speculated something close to that above | 17:08 | |
jnthn | tadzik: It's pretty logical and declarative when you stop to think about it. :-) | ||
17:08
kalve joined
|
|||
jnthn | Well, somewhat. :-) | 17:08 | |
ash_ | tadzik: once you know the perl6 syntax for stuff, it makes sense, mostly | ||
tylercurtis | rakudo: class Foo { has $.x; submethod BUILD($!x) { } }; say Foo.new(:x(5)).x; | ||
pmichaud | PerlJam: but the problem with the reglex approach is that basically every lexical subroutine blocks that name from being used as a regex in a grammar. | ||
p6eval | rakudo 3370f0: OUTPUT«5» | ||
pmichaud | PerlJam: including the ones in the setting. | ||
tylercurtis | rakudo: class Foo { has $.x; submethod BUILD($!x) { } }; say Foo.new(5).x; | 17:09 | |
p6eval | rakudo 3370f0: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in 'Foo::BUILD' at line 22:/tmp/LftQm02JSa in main program body at line 22:/tmp/LftQm02JSa» | ||
jnthn | tylercurtis: If you want that one to work, you need to write a "new" method. | ||
tylercurtis | jnthn: just checking. :) | ||
jnthn | :) | ||
TimToady | pmichaud: it could ignore anything that isn't declared as method | ||
pmichaud | so then it becomes really strange when you define a grammar with regex item { ... } and it doesn't work because <item> keeps finding &item | ||
TimToady | though, perhaps item is declared as a method, and exported | 17:11 | |
pmichaud | TimToady: yes, that also requires a bit more looking-up than I can easily handle in R* | ||
PerlJam | Least Surprise is hard sometimes | ||
17:13
pmurias joined
|
|||
PerlJam | I think I've mentioned this before, but how about regex declared outside of a grammar all belong to an implicit grammar? | 17:13 | |
17:14
christin1 left
|
|||
PerlJam | (and you always use method dispatch to lookup names) | 17:14 | |
TimToady | or we require an anonymous grammar {...} around them | ||
timbunce | rakudo: say $a; my $a | ||
p6eval | rakudo 3370f0: OUTPUT«Any()» | ||
timbunce | shouldn't that complain that $a is not predeclared? | 17:15 | |
TimToady | known bug | ||
pmichaud | timbunce: yes, it should. | ||
for some reason the check for declared symbols got removed. | |||
tadzik | dying inside CATCH will die outside of the try block, right? | ||
ah, whatever | |||
pmichaud | tadzik: right now dying inside CATCH will infinite loop in Rakudo. | ||
(still having to work on that one) | 17:16 | ||
tadzik | what I really need is not having try block at all ;) | ||
PerlJam | TimToady: so ... is there a singleton anonymous grammar? | ||
pmichaud | PerlJam: can't be singleton. needs to be lexically scoped, I think. | ||
17:17
christin1 joined
|
|||
PerlJam | Hmm. | 17:17 | |
pmichaud | well, I'll phrase it this way | ||
tadzik | so, while I'm asking questions anyway: my $asd = INI.parse($string); How can I check if parsing was sucessful? | ||
I know I can do 'if INI.parse(...)', but then I'll have to parse twice to assign it to variable | |||
pmichaud | in the normal method space, the closest we have to allowing a bare "foo" to correspond to a method call is via indirect object syntax. | ||
PerlJam | pmichaud: so each block would potentially contain a single anonymous grammar that perl knows to look at when someone does / <foo> / | ||
pmichaud | or put another way, in normal method space, we don't have a mechanism that doubles as both lexical and method dispatch. | 17:18 | |
TimToady | alternately, you just have some way of saying 'mix in my current block's regexes' | ||
moritz_ | tadzik: if $asd { ... } | 17:19 | |
tadzik | ah, it will return false in this context? Ok, thanks moritz_ | ||
PerlJam | TimToady: augment :-) | ||
TimToady | not augment, mixin | ||
they are *very* different | |||
pmichaud | trying to get <foo> to handle both cases seems to go down the same path we ultimately avoided with methods | ||
TimToady | unless the current grammar *is* the current scope | 17:20 | |
for instance, simply putting grammar Me is ThatGrammar {...} around the whole thing makes it work | 17:21 | ||
but maybe there can be something with the same effect that is more lightweight | |||
pmichaud | TimToady: does that help with moritz's "import a regex" scenario? | ||
how about this | 17:22 | ||
perhaps we want a punctuation that means "explicitly capture" | |||
I'll use # here | |||
so: | |||
<&foo> # noncapturing | |||
<#&foo> capturing | |||
TimToady | <=&foo> | 17:23 | |
pmichaud | or yeah, that. | ||
moritz_ | +1 to <=&foo> | ||
pmichaud | then one could also have <=$foo> | ||
PerlJam | wfm | ||
pmichaud | and <=@foo> | ||
and the like | |||
masak | heh. Unicode *and* smilies. almost too on-topic for this channel: unicode.org/Public/6.0.0/charts/ver...U1F600.pdf | 17:25 | |
PerlJam | so the first example in the regex chapter of the perl 6 book would become gist.github.com/483251 ? | ||
ash_ | .u 1F640 | 17:26 | |
phenny | ash_: Sorry, no results for '1F640 '. | ||
ash_ | .u DIZZY FACE | ||
phenny | ash_: Sorry, no results for 'DIZZY FACE'. | ||
Su-Shee | ash_: without the 0. | 17:27 | |
[Coke] | .u 1F64 | ||
phenny | U+1F64 GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA (ὤ) | ||
[Coke] | Su-Shee: different character. | 17:28 | |
17:28
supernovus left
|
|||
pmichaud | masak: I'm a little surprised they don't have glyphs for the "faces pain scale" in that table. | 17:28 | |
masak | we should suggest that to them. | 17:29 | |
ash_ | "FACE WITH NO GOOD GESTURE" | ||
lol | |||
ash_ just realized that is a draft | |||
pmichaud | (I've seen that scale a lot in recent months, which is what makes me think of it :-) | 17:30 | |
tadzik | nopaste.snit.ch/22156 -- could anyone take a look at this? The effect bothering me is at the very bottom | ||
masak | second spectest run, now with Kodi++'s patch applied. | 17:31 | |
moritz_ | pmichaud: btw I've pushed a branch called subst_adverbs which implements s:g/// (but not much more) | 17:32 | |
pmichaud | moritz_: I'll definitely take a look. | ||
TimToady | or <:&foo> to be more like pair syntax | ||
moritz_ | it introduces some interesting failure modes, ie ignores s:unknown_pair/// | ||
masak | "DISAPPOINTED BUT RELIEVED FACE" -- nobody takes emoticons as seriously as the Unicode Consortium. | ||
ash_ | tadzik: you found a bug | 17:33 | |
pmichaud | masak: right, that's why I was surprised faces pain scale wasn't there :) | ||
moritz_ | and s:g(1)/// # can't find identifier Capture (or so) - huh? | ||
ash_ | rakudo: grammar Foo::Bar { }; class Foo { }; | ||
p6eval | rakudo 3370f0: ( no output ) | ||
TimToady | or even, since : is reserved, leave off the <> to call :&foo | ||
ash_ | > grammar Foo::Bar { }; class Foo { }; | ||
Illegal redeclaration of symbol 'Foo::Bar' | |||
> class Foo::Bar { }; class Foo { }; | |||
!class_init_11 | |||
tadzik | oh, great :) | ||
TimToady | std: / :&foo / | ||
p6eval | std 31772: OUTPUT«===SORRY!===Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/aRSVIiLKw9 line 1:------> / :⏏&foo /Can't call method "from" on unblessed reference at /home/p6eval/pugs/src/perl6/snap/STD.pm line 53586.FAILED 00:01 | ||
..1… | |||
moritz_ | ash_: please submit rakudobug | ||
ash_ | it seems to be an issue with autovivifiying and grammars | 17:34 | |
pmichaud | bare :&foo looks almost too close to adverbs for me | ||
ash_ | moritz_: will do | ||
pmichaud | i.e., :my, :ignorespace, etc. | ||
ash_ | if you change it from grammar to class it works | ||
moritz_ | yes, I'd prefer <:&foo> or <=&foo> | ||
pmichaud | i.e., I'd almost want :$ignorecase to be :ignorecase($ignorecase) | ||
moritz_ | ash_: as a workaround, you could try 'class Foo::Bar is Grammar' | ||
pmichaud | so far I like <=&foo> because we normally use '=' for capture to an alias anyway. | 17:35 | |
moritz_ | aye | ||
[Coke] | phenny: .u ┌ | ||
17:36
ashleydev joined
|
|||
ash_ | tadzik: moritz_++ suggestion can give you a fix for now | 17:36 | |
tadzik | well, I just renamed grammar to INIfile and moved to the file with a class, but thanks | 17:37 | |
btw, $.param = die "..." does not work | |||
ash_ | tadzik: you could override new if you want to enforce it as an argument for construction of an argument | 17:39 | |
tadzik | ash_: I rather feel like checking this in BUILD, as I'm using it anyway | ||
rakudo: class foo { has $.bar; submethod BUILD { $.bar.perl.say } }; my $a = foo.new(bar => 'moo') # why? | 17:43 | ||
p6eval | rakudo 3370f0: OUTPUT«Any» | ||
jnthn | tadzik: You overrode BUILD | 17:44 | |
tadzik: BUILD is what sets up the attributes, iirc. | |||
tadzik | oh | ||
jnthn | tadzik: Oh, maybe we're meant to set them if you didn't touch them in BUIlD, though. | ||
tadzik | rakudo: class foo { has $.bar; submethod BUILD { nextsame; $.bar.perl.say } }; my $a = foo.new(bar => 'moo') # this way? | ||
p6eval | rakudo 3370f0: ( no output ) | ||
tadzik | …nope | ||
so, if I want to open a file from a string which is passed to a class constructor, what's the best way to do this? | 17:45 | ||
PerlJam | tadzik: you'll have to be a little more precise, but something like my $handle = open $filename, :r; | 17:47 | |
ash_ | if you don't need a file handle, just slurp it | ||
my $string = slurp $filename | |||
rakudo: (slurp "/etc/passwd").say # fails for security reasons | 17:48 | ||
p6eval | rakudo 3370f0: OUTPUT«Operation not permitted in safe mode in 'Safe::forbidden' at line 2:/tmp/ddhB2nFXmI in main program body at line 22:/tmp/ddhB2nFXmI» | ||
ash_ | rakudo: my $string = slurp; $string.say | ||
p6eval | rakudo 3370f0: OUTPUT«Operation not permitted in safe mode in 'Safe::forbidden' at line 2:/tmp/2bBI7sCgKJ in main program body at line 22:/tmp/2bBI7sCgKJ» | ||
tadzik | yeah, I know about slurp, that's what I'm going to use actually. But.. let me write it down | ||
nopaste.snit.ch/22160 | 17:49 | ||
this is what I need | |||
17:50
_macdaddy joined
|
|||
pmichaud | after thinking about it a bit more... | 17:52 | |
(1) I think there's a lot of merit to the <=$var> syntax to enable capturing, and we should consider it | |||
(2) but it's just too complex for the common case of "I want a regex here" | |||
PerlJam | tadzik: depending on how quickly you pull together your INI grammar, you might want to put it up for inclusion in Rakudo Star | 17:53 | |
tadzik | PerlJam: what I'm missing is section support (quite an important feature) but I wanted to fire up a working module first | 17:54 | |
ash_ | rakudo: class Foo { has $.a; has $.b; method new($filename) { self.bless(*, a => $filename, b => $filename.flip); } }; say Foo.new('bar').b | ||
p6eval | rakudo 3370f0: OUTPUT«rab» | ||
tadzik | PerlJam: I have plenty of free time til 29, so it might end up with a success | ||
pmichaud | (3) I'm inclined to say that regexes in grammar definitions never do lexical lookup (and use <=&xyz> if that's what you want), while regexes outside of grammar definition can have <xyz> find a lexical &xyz (and fall back to Grammar.xyz if non-existent) | ||
moritz_ | tadzik: btw the return value from .parse is usually called a "match object" (or short "match"), not a parser | ||
tadzik | oh, ok | ||
moritz_ | +1 to all three points | 17:55 | |
ash_ | rakudo: 'a' ~~ /./; say $/.WHAT | ||
p6eval | rakudo 3370f0: OUTPUT«Match()» | ||
PerlJam | pmichaud: could you elaborate on #2 a bit? | ||
ash_ | $/ is the current match object | ||
pmichaud | PerlJam: the example from the start of the chapter is the best elaboration | 17:56 | |
PerlJam | pmichaud: okay :) | ||
jnthn | #phsers in ~ 1h | ||
pmichaud | having to write =&word to get the thing I just defined seems wrongish. | ||
er, <=&word> | |||
<word> just seems more appropriately dwimmy | |||
TimToady | no, the correct approach is to somehow mix the current namespace in as the most derived grammar | ||
moritz_ | not sure if I'll make it to #phasers | ||
Tene | rakudo: my @fibs := 1,1,{$^a + $^b} ... 50; say @fibs[0..5].perl; | ||
kalve | man, trying to read this gives me a headache | ||
p6eval | rakudo 3370f0: OUTPUT«(1, undef, undef, undef, undef, undef)» | 17:57 | |
Tene | rakudo: my @fibs = 1,1,{$^a + $^b} ... 50; say @fibs[0..5].perl; | ||
p6eval | rakudo 3370f0: OUTPUT«(1, 1, 2, 3, 5, 8)» | ||
tadzik | so, could someone help me with this one? nopaste.snit.ch/22160 | ||
TimToady | use regexes; or something | ||
moritz_ | where "current namespace" means what? | ||
pmichaud | TimToady: I don't intuitively grok the full details of what you're suggesting, but I'd not be opposed to it. | ||
jnthn | TimToady: Does "mix in" not imply that things from the current namespace would override those in the grammar we derive from? | 17:58 | |
TimToady | yes | ||
but as moritz_ points out, the scoping is a bit hard to nail down | 17:59 | ||
pmichaud | (and I'm doubtful it can be readied for R*, fwiw) | ||
jnthn | Me too | ||
Well | |||
pmichaud | somehow "mix in" doesn't feel rightish to me, though. | 18:00 | |
jnthn | I'm more worried about the side-effects we may find it has I guess. | ||
pmichaud | but I do see how it could potentially clarify a lot of issues, if we can get the scoping right. | 18:01 | |
18:01
kensanata joined
|
|||
ash_ | rakudo: class Foo { has $.filename; has $.something_else; method new($filename) { self.bless(*, filename => $filename, something_else => $filename.flip); } }; say Foo.new('bar').something_else; # tadzik slurp in the new maybe? | 18:02 | |
p6eval | rakudo 3370f0: OUTPUT«rab» | ||
TimToady | it's really almost a slang issue. when I say /.../, I really mean the language derived thusly | ||
[particle] | where is the csv file used to generate the rakudo test passing status? | ||
pmichaud | agreed. | ||
and when I say grammar B { ... } in some sense I'm deriving from that current slang | |||
as opposed to deriving from Grammar | |||
[particle] | ooh, and now that i think about it, where is the web home for rakudo *, with distro test status, etc? | ||
tadzik | ash_: and then I'd be able to use BUILD anyway, yep? | ||
ash_ | yea | 18:03 | |
pmichaud | [particle]: web home for R* will likely be rakudo.org . | ||
ash_ | BUILD and new are orthogonal | ||
moritz_ | perlgeek.de/blog-en/perl-6/object-c...ation.html | 18:05 | |
TimToady | well, an explicit grammar takes its derivation from its ISA; the current slang would only influence the language you're writing in, not the language you're writin gabout | ||
pmichaud | PerlJam / moritz_ : in the meantime, I suggest we change the book example to use my $word = token { \w+ [ \' \w+ ]? } to avoid &word altogether for now. | ||
18:05
justatheory left
|
|||
pmichaud | TimToady: okay, I can agree with that also. | 18:05 | |
TimToady | but from a user point of view, it's augment slang Regex { regex ...; token ;;; } | ||
18:05
justatheory joined
|
|||
moritz_ | pmichaud: but then we still have to do <word=$word> to get capturing done, no? | 18:06 | |
TimToady | and then the rest of that scope uses the Regex slang with those "macros" | ||
pmichaud | moritz_: yes. Or maybe we can get the <=$word> syntax approved. | ||
TimToady | augment sort of being the wrong word for slang augmentation | ||
moritz_ | pmichaud: that's exactly what I want to avoid, because it*s *SO* clumsy | ||
TimToady | because it's really lexically scoped, not monkey-typing | ||
moritz_ | with <=$word> it would work better | ||
masak | let's see... #phasers in 24? | 18:07 | |
moritz_ | masak: jnthn meant in 54 | ||
jnthn | I had it as in ...that. | ||
pmichaud | moritz_: I think <word=$word> is far easier to explain to a newbie than trying to figure out the relationship between my token word { ... } and <&word> or <=&word> | ||
masak | #phasers in 54. goodie. | ||
jnthn | masak: ooh you'll has wifis still? | ||
masak: Or internets at least? :-) | |||
moritz_ | pmichaud: I disagree. I'd feel obliged to explain why it feels so clumsy, and contains so much repetition | 18:08 | |
pmichaud | moritz_: in which case that's probably not a good first example anyway :-) | ||
at least, not until we get the handling of anonymous grammars correct per TimToady++ | |||
TimToady | 'nuther idea. regex declarator inside a grammar adds to meta-object, outside adds to current regex slang | ||
pmichaud | TimToady: oh. I thought that's what you meant above,a ctually. | 18:09 | |
moritz_ panics | |||
PerlJam | we could modify that example and take out the "named regex" section of the regex chapter entirely and leave it to the grammars chapter to explain those. (sort of ignore lexical regex for a while) | ||
[particle] | so what happened in the past week that reduced rakudo's spectest count drastically? | ||
moritz_ | [particle]: refactored trig tests | ||
[particle] | ok, figured that. good. | 18:10 | |
pmichaud | moritz_: oh, is that the cause? | ||
TimToady | <foo=&bar> is fine for R* | ||
18:10
envi^home left
|
|||
moritz_ | PerlJam: I don't want that. Because the grammar chapter is hard to swallow anyway | 18:10 | |
pmichaud | TimToady: I agree. | ||
moritz_ | so is <foo> picking up lexicals now officially dead? | ||
tadzik | rakudo: class A { has $.param; method new(Str $a) { self.bless(*, param => $a) }; submethod BUILD { say $.param.perl } }; my $foo = A.new('asd') | 18:11 | |
p6eval | rakudo 3370f0: OUTPUT«Any» | ||
TimToady | moritz_: yes | ||
tadzik | ash_: ↑, am I doing it wrong? | ||
pmichaud | (I did quite a bit of book review on the plane yesterday, but didn't get to the grammars chapter) | ||
moritz_ beats a dead horse | |||
[Coke] | trac.parrot.org/parrot/ticket/1707 | ||
pmichaud | moritz_: we'll likely have something that replaces it, but they won't be lexical. | ||
[Coke] | (rakudobug with a parrot core dump special) | ||
TimToady | the slang is what's lexical | ||
we can decide later how regex declarations can relate to the current Regex slang | 18:12 | ||
jnthn | [Coke]: Huh, what lame computer doesn't have 2325622477335777280 bytes of RAM available? :-) | ||
[Coke]: Getting a stack trace would be good. | 18:13 | ||
(C-level) | |||
PerlJam | TimToady: what about <=&named_regex> capturing? | 18:14 | |
moritz_ | that would save a lot of typing to begin with | ||
TimToady | PerlJam: that is also probably dead for now | ||
PerlJam | :-( | 18:15 | |
pmichaud checks the book | |||
[Coke] | jnthn: pinged him for one. | ||
jnthn | [Coke]++ | 18:16 | |
18:19
eternaleye joined
|
|||
PerlJam | I guess if we removed the first example from the regex chapter and explain named regex better in that section of the chapter and added some minor fixups throughout, using <foo=&foo> wouldn't be too bad. | 18:20 | |
pmichaud | PerlJam: yeah, that's what I'm thinking | ||
moritz_ | so, what should be leading example in that section instead? | ||
pmichaud | I'm thinking that first example is a little too stark to be a first example. | ||
PerlJam | moritz_: dunno. | ||
pmichaud | it's likely to frighten newbies off | ||
moritz_ | that's why I wanted to a nicer syntactic solution | 18:21 | |
pmichaud | even with a nicer syntactic solution like <=&xyz> I think it could scare them off. It requires too many leaps in knowledge. | ||
there are quite a few places like that in the book that I've found thus far. | |||
PerlJam | pmichaud: in general the chapters are "here's a complete working example, now let me explain it in detail" | 18:22 | |
pmichaud | PerlJam: that probably needs to be made more explicit in each chapter, then. | 18:23 | |
moritz_ | I guess that's a trade-off you have to make when you want the intitial examples to be both useful and idiomatic | ||
18:23
macroron joined
|
|||
moritz_ | I know it's problematic, but it's not so easy to find better examples eitehr | 18:23 | |
pmichaud | moritz_: well, we *do* expect that example to work someday | ||
i.e., | |||
regex word { ... } | 18:24 | ||
regex dup { <word> \W+ $<word> } | |||
if / <dup> / | |||
moritz_ | yes, but it doesn't | ||
and the examples should be runnable | |||
pmichaud | it's just that they won't be "lexicals", and it won't happen in time for R* | ||
moritz_ | so it's a moot point wrt the book | ||
pmichaud | right | ||
TimToady | maybe 'my regex' always adds to the current slang | 18:25 | |
pmichaud | I'd prefer 'my' continue to create a lexical regex | ||
(which you get to via ®ex) | 18:26 | ||
and bare 'regex' adds to the current slang, in much the same way that defining a new operator modifies a slang | |||
18:27
hercynium left
|
|||
pmichaud | although there's some inconsistency with that approach, I admit | 18:27 | |
TimToady | possibly confusing inside a grammar, if you're trying to mod the slang instead | ||
pmichaud | do we have an explicit "mod the slang" syntax? | ||
PerlJam | maybe modding the slang .... blah what pm said | ||
TimToady | currently augment slang, but I don't really like using augment that way | 18:28 | |
pmichaud | I'm afk for a bit to fetch noms for the week. bbi30 | ||
PerlJam | (I was typing "maybe modding the slang needs its own declarator or something") | ||
TimToady | pmichaud: where | ||
pmichaud | yeah, "augment slang" seems all wrong. | ||
TimToady: I'm just heading to walgreens up the street from me to get snacks and all-important Dr Pepper to keep in the room :) | |||
(I'm at the LQ again) | |||
TimToady | mkay | 18:29 | |
pmichaud | I don't have explicit lunch plans yet, but will try to be back for #phasers in 31 | ||
(lunch after that, likely) | |||
18:29
_macdaddy left
|
|||
pmichaud | afk | 18:30 | |
tadzik | nopaste.snit.ch/22167 can someone show me the way with this one? | 18:31 | |
lue | y o hai o/ | 18:32 | |
tadzik | s/#12/#14/ | ||
oh hai | |||
18:33
gbacon left
|
|||
tylercurtis | tadzik: "s/#12/#14/" doesn't parse in Perl 6. ;) | 18:34 | |
tadzik | oh come on ;) | ||
PerlJam | heh | ||
18:34
dolmen joined
|
|||
tadzik | I remember some Perl 6 module using sub new for something | 18:35 | |
pugssvn | r31773 | tene++ | Fix minor typo | ||
sorear | good * #perl6 | 18:36 | |
18:36
sorear sets mode: +ov tylercurtis pugssvn
|
|||
Tene | Hi! | 18:36 | |
[particle] | tadzik: you define method new with a signature making $a required (using a trailing !) | ||
masak | \o/ sorear | ||
sorear | TimToady: Did you see the :my query? | ||
[particle] | tadzik: you should look at some examples in t/spec, grep for 'required', 'argument', 'class' etc | ||
tadzik | [particle]: will take a look | 18:37 | |
ash_ | moritz_: i put that bug in, it seems to only happen when you use 'use' | 18:38 | |
TimToady | sorear: yes, but don't really have much time to think about it till after I'm done writing my talk | ||
ash_ | bug 76606 if your curious | ||
tadzik | bleh, that's ugly | ||
TimToady | but to the first approximation, I'd just as soone keep the my coping rules limitied to curlies | ||
you can declare lexicals from inside strings too | 18:39 | ||
masak | ingy: Just Another Crazy Bandaid Rakudo Hacker :P | ||
rakudo: "foo$(my $x = 42)bar"; say $x | 18:40 | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Redeclaration of symbol $x at line 22, near " = 42)bar\""» | ||
masak | hm, redeclaration? | ||
std: "foo$(my $x = 42)bar"; say $x | 18:41 | ||
p6eval | std 31772: OUTPUT«ok 00:01 118m» | ||
masak | rakudo: "foo$(my $x)bar"; say $x | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Redeclaration of symbol $x at line 22, near ")bar\"; say"» | ||
[particle] | what's that dollar for? | ||
masak | [particle]: variable interpolation | ||
[particle] | oh, i missed the quotes. | ||
ingy | masak: :) | ||
masak | ingy: I recognize the feeling. it's like, it's really good and really bad, with lots of promises of getting better soon. | 18:42 | |
ingy | masak: the best part of perl6 is the irc channel | 18:43 | |
:) | |||
ash_ | rakudo: my $x; "foo$($x = 3)bar"; say $x; | ||
timbunce | Is there a perl5-to-perl6 concept map somewhere? ie something that says "if you'd write ... in perl5 then in perl6 you probably want to write ... or ..."? | ||
p6eval | rakudo 3370f0: OUTPUT«3» | ||
masak | ingy: yeah, the language sucks. :P | ||
PerlJam | ingy: wait until we have CPAN! :) | ||
masak | ash_: o.O | ||
masak submits rakudobug | |||
ash_ | timbunce: perlcabal.org/syn/Differences.html | ||
ingy owns bpan.org and is looking for a purpose | |||
masak | ash_: oh. you had 'my $x' before the string. nvm | 18:44 | |
rakudo: "foo$($x = 3)bar"; say $x; | |||
timbunce | ash_++ | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/bOCGOeX_Js:22)» | ||
ash_ | masak: i was just seeing if what you said works if you pre-declare $x | ||
tylercurtis | timbunce: perlgeek.de/en/article/5-to-6 might serve that purpose to some extent. | ||
ingy | timbunce: wanna pair program with me today on some p6 stuff | ||
moritz_ | tadzik: I think you've hit a rakudobug. anyway, has $.b = 2 * $.a; should work just fine | 18:45 | |
ingy | I know enough to be dangerous :) | ||
masak | ash_: right. but the experiment was to declare a variable inside a string which survived to the outside ;) | ||
tadzik | moritz_: so that was the right way to do it? | ||
timbunce | ingy: :) | ||
ash_ | yeah, i know, it was more a sanity check | ||
[particle] | a little learning is a dangerous thing. | ||
PerlJam | ingy: perhaps together, you and timbunce could be more than dangerous | ||
moritz_ | tadzik: yes | ||
ingy | PerlJam++ | ||
PerlJam | ingy: maybe that's "deadly"? :> | ||
tadzik | moritz_: I expected BUILD works like in Moose, so the parameters are alredy set and stuff | ||
moritz_: that's how it should work? | |||
ingy is halfway done with the blog post now | 18:46 | ||
sitting at Powell's cafe. here with @TimToady | |||
tylercurtis | tadzik: Perl 6 BUILD lets you take whatever parameter signature you want. However, that requires that you specify what signature you want. | ||
18:46
cxreg left
|
|||
tadzik | tylercurtis: ah, so I don't bless anymore, but I have to set parameters, right | 18:47 | |
? | |||
ingy | tethered to you via android, cuz teh publik wifi sux | ||
timbunce | It takes 1 minute of cpu time to compile DBDI roles and classes, and there's hardly any actual code yet :( | ||
ingy | timbunce: seriously though, if I see you later, let's spend an hour... | 18:48 | |
PerlJam | timbunce: btw, there is also this: perlgeek.de/blog-en/perl-5-to-6 | ||
lue | quick question: does =:= still exist :) | ||
timbunce | PerlJam: yes, tylercurtis++ mentioned it a moment ago. Helpful, thanks. | ||
PerlJam | ah, missed it | ||
TimToady | lue: it does. don't use it. | 18:49 | |
lue | rakudo: my $a = 3; my $b := $a; say VAR($a) === VAR($b) | ||
p6eval | rakudo 3370f0: OUTPUT«Could not find sub &VAR in main program body at line 22:/tmp/bjDnK0bCYf» | ||
tylercurtis | rakudo: class Foo { has $.a; has $.b; submethod BUILD (:$.a!, $.b = $.a * 2) { } }; my $a = Foo.new(a => 5); say $a.a; say $a.b; | ||
p6eval | rakudo 3370f0: OUTPUT«===SORRY!===Can't put required parameter after variadic parameters at line 22, near ") { } }; m"» | ||
tylercurtis | rakudo: class Foo { has $.a; has $.b; submethod BUILD (:$.a!, :$.b = $.a * 2) { } }; my $a = Foo.new(a => 5); say $a.a; say $a.b; | 18:50 | |
p6eval | rakudo 3370f0: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in 'Foo::BUILD' at line 6255:CORE.setting in 'Foo::BUILD' at line 22:/tmp/rxwDajrsmU in main program body at line 22:/tmp/rxwDajrsmU» | ||
tadzik | moritz_: wklej.org/id/366918/ that should be a working Perl 6 code? | ||
tylercurtis | rakudo: class Foo { has $.a; has $.b; submethod BUILD (:$!a!, :$!b = $.a * 2) { } }; my $a = Foo.new(a => 5); say $a.a; say $a.b; | ||
p6eval | rakudo 3370f0: OUTPUT«510» | ||
tylercurtis | tadizk: ^ | ||
tadzik | oh, great | ||
timbunce | ingy: it's probably too soon at the moment given the kind of thing I'm doing right now. Should be more useful in a couple of days. Catch me thursday or friday. | 18:51 | |
tadzik | tylercurtis: what about this one: wklej.org/id/366918/ ? | ||
tylercurtis | tadzik: the problem with that is that $.a and $.b are readonly by default. You need to ether declare them "is rw" or use $!a/$!b instead of the accessors. | 18:52 | |
masak | #phasers in 8. | ||
tadzik | tylercurtis: where are they readonly, in BUILD? | ||
ah, oh god. Of course | |||
damn | 18:53 | ||
ash_ | tadzik: they are always read only if you use the accessor without 'is rw'; | ||
tadzik | yeah, I know, looks like I forgot about it | ||
ash_ | if you change Foo.new(5) to Foo.new(a => 5); things should work | 18:54 | |
tadzik | but I wasn't planning to pass it via name | ||
ash_ | then you need to override new | ||
PerlJam | tadzik: new is always expecting named things unless you override it. | 18:55 | |
tadzik | so what's BUILD signature for? | ||
if I need to override new anyway? | |||
TimToady | it's for binding the args that BUILDALL will always send as named pairs | 18:56 | |
because BUILDALL isn't in the business of trying to coordinate the positional parameters of N different derived classes | 18:57 | ||
pmichaud | back from nom fetch (epic fail btw) | ||
PerlJam | pmichaud: they didn't have Dr Pepper?!? :) | 18:58 | |
pmichaud | only in cans | ||
tadzik | Symbol 'self' not predeclared in new (class.pl:8) | ||
pmichaud | which is very inconvenient for carrying around the conference venue | ||
tadzik | self.bless(*, a => $a) in sub new. What's wrong here? | ||
pmichaud | also, they didn't have milk | ||
or about 3 or 4 other things I was planning to buy | 18:59 | ||
lue | pmichaud: D: | ||
TimToady | there's a Safeway just north of Lloyd Center | ||
pmichaud | (they had spots for them... they were just out of stock) | ||
yeah, Safeway is my next hit | |||
it's a bit of a further walk from here | |||
ash_ | tadzik: can you update your nopaste with the current code your working with? | ||
tadzik | wklej.org/id/366921/ BUILD might be still broken, but it breaks in new now | 19:00 | |
ash_: ↑ | |||
ash_ | its method, not sub | ||
sub's don't have a self | |||
tadzik | oh, sure | ||
TimToady | new needs to be amethod | ||
tylercurtis | tadzik: I think BUILD still needs a signature, too. | 19:01 | |
tadzik | the named one?> | ||
jnthn | #phasers! | ||
19:01
mberends joined
|
|||
TimToady | if the names correspond to your attributes, you can use the auto-generated BUILD | 19:01 | |
BUILD must be a submethod, btw | |||
even more than new must be a method | |||
tylercurtis | tadzik: Although in this case, you could just do "method new (Int $a) { self.bless(*, a => $a, b => $a * 2); }" without problem, I think. | 19:02 | |
TimToady: he already has BUILD as a submethod, no? | |||
ash_ | yeah, then you don't need to do a BUILD | ||
TimToady | I'm not actually looking at his code, since I officially don't have time to do that. :) | ||
timbunce | If I want to return an undef Str I should just return Str;, right? But then I'm surprised to find that say foo() prints "Str()" rather than complain about undef. Do I just need to get used to this? | 19:03 | |
_sri wonders why rakudo is not yet in homebrew (because parrot is) | |||
ash_ | TimToady your pretty close to spot on for most of the problems he's had, (but BUILD was already a submethod :P ) | ||
TimToady | well, I didn't say his wasn't a submethod, now did I? :P | 19:04 | |
ash_ | timbunce: undef is spelled Mu | ||
TimToady | sometimes | ||
std: undef | |||
PerlJam | ash_: He wants an undef string though | ||
p6eval | std 31772: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as a type | ||
..constraint or fail() as… | |||
TimToady | an undef string is spelled Str | ||
ash_ | oh | 19:05 | |
i see, you mean .defined then | |||
rakudo: say Str.defined, "foo".defined | |||
p6eval | rakudo 3370f0: OUTPUT«01» | ||
TimToady | undefs are typed in Perl 6 | ||
ingy | is there a canonical purl for p6rules? | ||
*url | |||
jjore_ | Is it expected that I get "Malformed UTF-8 string" exceptions when reading text files like perl5's malloc which apparently does something wrong in the string "The Bridge of Khazad-D\xFBm" | 19:06 | |
ingy | and is that the official term? "Perl 6 Rules"? | ||
hi jjore_ | |||
timbunce | perhaps there's a need for some way to tell say how undefs should be handled. | ||
PerlJam | ingy: Perl 6 does rule! :) | ||
jjore_ | Hi ingy | ||
TimToady | no, that's the official slogan. they're called Perl 6 Regexes | ||
see S05 | 19:07 | ||
ingy | TimToady: is s05 the best reference url? | ||
jjore_: are you in pdx? | |||
TimToady | it is if you follow the highlight from the ir clog | ||
jjore_ | Nope. | ||
Just Seattle | |||
ingy | :'( | ||
jjore_ | Yeah, $work. | ||
ingy | jjore_: I'll be back on Wednesday (I know you miss me) | 19:08 | |
jjore_ | Well I do, however I never see you even when you are in town. | ||
I have to go to far-flung places to see you. | |||
TimToady | which will send you to perlcabal.org/syn/S05.html | ||
19:08
justatheory left
19:09
lue is now known as mlue
|
|||
ash_ | std: my $a = Str but ''; say $a # should print nothing | 19:09 | |
p6eval | std 31773: OUTPUT«ok 00:01 118m» | ||
ash_ | but its not working right now in rakudo | ||
jjore_ | you know, just fyi, the unicode on #perl6 really screws with my IRC client. :-( | 19:10 | |
TimToady | fix your client | ||
it's open source right? :) | 19:11 | ||
ash_ | .u frown | ||
phenny | U+2322 FROWN (⌢) | ||
sorear | »ö« is our frient | ||
masak | jjore_: see topic :) | ||
sorear: isn't it 'prient'? :) | |||
19:12
cxreg joined,
kalve left
|
|||
jjore_ | My client is open source. Heck, my client is the editor for itself so I can hot-fix it while it runs. | 19:13 | |
but er, lunch apparently & | |||
TimToady | ö/ | ||
masak | yet another vital open source fix foiled by nom. | 19:14 | |
rakudo: say "OH HAI".bytes | |||
p6eval | rakudo 3370f0: OUTPUT«6» | ||
masak | Buf should have a .bytes method, I guess. should Str? | ||
and I know we've talked about this, but it's hard and my brain is non-sticky sometimes. | 19:15 | ||
TimToady | perhaps "OH HAI" doesn't feel like committing one way or the other yet | ||
19:15
rurban joined
|
|||
masak | does that mean "no, Str shouldn't have a .bytes method"? | 19:15 | |
TimToady | no, it means "yes, Str shouldn't have a .bytes method" :) | 19:16 | |
19:16
mlue is now known as lue
|
|||
masak | TimToady: so if I go ahead and remove the .bytes method from Str, have I understood you 50% or 100% ? | 19:16 | |
tadzik | ===SORRY!=== You can not add an attribute to a module; use a class or role | 19:17 | |
what does he want? Didn't even show a line | |||
masak | tadzik: you tried to do 'has' in a non-class/role. | ||
tadzik | …no I didn't :) will show the code | ||
masak | nopaste! | ||
tadzik | wklej.org/id/366935/ | ||
whoops, too late | |||
pmichaud | it should be possible to implement =:= without Var. | 19:18 | |
tadzik | on 'use Config::INI' rakudo cries as I showed | ||
pmichaud | er, without VAR() | ||
ash_ | line 2 | ||
tylercurtis | tadizk: "has $.file;" | ||
ash_ | has $.file | ||
tadzik | oh | ||
wtf is it doing there | |||
ash_ | i think you mean our | ||
or maybe it shouldn't be there... | |||
tadzik | no, I didn't mean it at all. Suprise keystrokes in vim I guess | ||
[particle] | vim curses in perl6? | ||
tadzik | why curses? | 19:19 | |
must have 'p' accidentally | |||
ash_ | tadzik: did you know you can specify :actions for a grammar? | ||
tadzik | ash_: nope, what does it do? | 19:20 | |
ash_ | GrammarName.parse($string, :actions(Actions.new)); | ||
whenever it parses a token/rule/regex it invokes the action associated with the token/rule/action | |||
takadonet | tadzik: you will love them :) | ||
ash_ | regex* | ||
tadzik | oh | 19:21 | |
triggers it, yeah? | |||
takadonet | yes | ||
tadzik | wklej.org/id/366937/ another problem | ||
ash_ | allowing you to do any magic you need mixed right into the parsing | ||
tadzik | so in this example, where does Actions.new object go? | ||
tylercurtis | tadzik: And you can use the actions to build up a AST or similar from the parse, if that's necessary. | ||
Tene | tadzik: perl6advent.wordpress.com/2009/12/2...d-actions/ | ||
ash_ | Tene++ for giving a real example | ||
Tene | tadzik: that's a quoting problem in your shell. | 19:22 | |
tadzik | /o\ I'm failing today | ||
Tene | tadzik: look, you used the ' quote for the outer, and then ' to try to quote inifile. | ||
tadzik | yeah, I see :( | ||
Tene | but it just ended the shell quote. | ||
tadzik | what a day | ||
Tene | :) | ||
tadzik | but at least this grammar subset works :) | ||
19:23
timbunce left
|
|||
TimToady | masak: yes, you may remove it; my point was just that there could be an ascii buf type for literals that also knows how to promote to Str | 19:23 | |
Tene | ash_: That post was inspired by stuff I was really doing at work at the time. | ||
masak | TimToady: oki. removing. | 19:24 | |
TimToady | just as a utf8 buffer knows how to promote | ||
ash_ | Tene: neat, even better, an actual example based off real work | ||
sorear | rakudo: say (1.0 .. 10.0).flat.Str | ||
Tene | the real source I had was XML, and the real program I wrote was in Perl 5 and used XML::Parser, iirc. | 19:25 | |
p6eval | rakudo 3370f0: OUTPUT«1 2 3 4 5 6 7 8 9 10» | ||
sorear | rakudo: say (1.0 .. 10.5).flat.Str | ||
p6eval | rakudo 3370f0: OUTPUT«1 2 3 4 5 6 7 8 9 10» | ||
sorear | rakudo: say (10.5 .. 1).flat.Str | ||
p6eval | rakudo 3370f0: OUTPUT«» | ||
sorear | rakudo: say (1.5 .. 10.0).flat.Str | ||
p6eval | rakudo 3370f0: OUTPUT«1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 9.5» | ||
TimToady | arguably, defaulting to the indicated precision would be more useful, I suppose | 19:26 | |
sorear | well, I actually care about Num | 19:27 | |
TimToady | say (10.0).perl | ||
rakudo: say (10.0).perl | |||
p6eval | rakudo 3370f0: OUTPUT«10/1» | ||
TimToady | I guess it always reduces, though, so you lose the info | ||
sorear | but really what I'm checking is how infix:<..> deals with 1. reversed arguments 2. dense types | ||
(in list context) | |||
19:27
rotterdam joined
19:28
rotterdam left
|
|||
TimToady | reversed will always produce Nil, and "add 1" is the simpleminded rule, on the assumption anything more complicated should be done with ... anyway | 19:28 | |
ash_ | rakudo: say 1.0 ... 10.5 | 19:30 | |
p6eval | rakudo 3370f0: OUTPUT«12345678910» | ||
ash_ | rakudo: say 1.5, 2.0 ... 10 | ||
p6eval | rakudo 3370f0: OUTPUT«1.522.533.544.555.566.577.588.599.510» | ||
ash_ | i have no idea what i just did... | 19:31 | |
oh | |||
its just missing spaces | |||
nevermind | |||
sorear | I think you just asked p6eval's phone number. | ||
ash_ | lol | ||
mathw | Evening | 19:34 | |
masak | mathw! \o/ | 19:35 | |
Tene | rakudo: say 8675309 | ||
p6eval | rakudo 3370f0: OUTPUT«8675309» | 19:36 | |
dalek | ecza: cb5b9dd | sorear++ | Kernel.cs: Allow for subclassing Sub |
||
ecza: 5b329a4 | sorear++ | rxwork.pl: Implement class Regex & smart-matching |
|||
19:36
rurban left
19:37
gbacon joined
|
|||
mathw | hey masak | 19:37 | |
19:38
plainhao left
|
|||
mathw | time for form-fixing again | 19:38 | |
pugssvn | r31774 | moritz++ | [evalbot] niecza VERSION | ||
tadzik | method postcircumfix:<< >> should work for an object like $object<asd>? | 19:40 | |
mathw | hmm | ||
how to do this | 19:41 | ||
tadzik | it acts funny | ||
Tene | <> is the autoquoting form of postcircumfix:<{ }> | ||
you want to override the latter, not the former. | |||
tadzik | wklej.org/id/366945/ | ||
well, same was happening for the former | |||
19:41
i__ left
|
|||
Tene | Hmm. Dunno. | 19:44 | |
tadzik | bug? | ||
Tene | Probably, yes. | ||
It certainly should not fail like like that. | |||
tadzik | it's alredy two bugs today, let's wait til moritz_ gets back from #phasers | ||
moritz_ upgrades one of his computers to a newer debian version in the hope of then being able to build the book | 19:45 | ||
pmichaud | actually, you probably want to override "at_key" instead of postcircumfix:<{ }> | ||
moritz_ | what exactly is at_key? | ||
pmichaud | return a value at a given key location | ||
it's what postcircumfix:<{ }> calls when it has a single key to resolve | 19:46 | ||
moritz_ | ah | ||
pmichaud | if you override postcircumfix:<{ }>, you're basically taking over all slicing forms | ||
moritz_ | evalbot control restart | ||
19:46
p6eval left
|
|||
ash_ | so... method at_key($key) { } ? | 19:46 | |
19:46
p6eval joined
|
|||
pmichaud | ash_: yes. | 19:46 | |
ash_ | rakudo: class F { method at_key($b) { 'got it' } }; my F $f .= new; say $f<a>; | 19:47 | |
p6eval | rakudo 3370f0: OUTPUT«got it» | ||
tadzik | same effect | ||
ash_ | rakudo: class F { method at_key($b) { 'got it ' ~ $b } }; my F $f .= new; say $f<a>; | ||
p6eval | rakudo 3370f0: OUTPUT«got it a» | ||
tadzik | and I'm not evev calling | ||
dalek | ok: aa1199a | pmichaud++ | docs/release-guide.pod: Update with pmichaud release date. |
||
ash_ | your error was happening in BUILD though... | ||
tadzik | hmm | 19:48 | |
what can cause this? | |||
ash_ | might be related to your for loop | 19:49 | |
take that out and see if it dies still | |||
tadzik | no, it lives | ||
funny, all the code works if it's not inside the class | 19:50 | ||
ash_ | hmm | ||
might be another bug :P | |||
19:51
mmcleric_ joined,
mmcleric left,
mmcleric_ is now known as mmcleric
|
|||
tadzik | saying [0] works | 19:51 | |
and elems prints 4, so it's finite | 19:52 | ||
jnthn | rakudo: (1,2,3,4,5).grep(* > 2).grep(* < 5).perl.say | ||
p6eval | rakudo 3370f0: OUTPUT«Cannot resume dead coroutine. in 'Any::join' at line 1 in 'List::perl' at line 2528:CORE.setting in main program body at line 22:/tmp/tP945QDNyS» | ||
tadzik | %!contents<toplevel>{$param<key>} = $param<value>; this fails | 19:53 | |
assigning anything fails | 19:54 | ||
pmichaud | inside of BUILD, is %!contents already initialized at this point? | ||
tadzik | say $param<key>.WHAT; return Match() | ||
19:54
pyrimidine joined
|
|||
tadzik | pmichaud: I don't think so | 19:54 | |
it isn't being touched before | |||
pmichaud | tadzik: I mean, is it already a Hash? | ||
or at least an Any? | 19:55 | ||
tadzik | well, it has a sigil | ||
if Perl 6 hasn't made it a hash the no | |||
19:55
takadonet left,
whiteknight joined
|
|||
tadzik | now %!contents<toplevel>{$param<key>.Str} = $param<value>.Str; works | 19:55 | |
so just %hash{Match()} is not a good idea | 19:56 | ||
19:56
eternaleye left
|
|||
tadzik | it didn't stringify by itself | 19:56 | |
19:57
eternaleye joined
|
|||
pmichaud | afaik, it's not supposed to stringify by itself | 19:58 | |
(but perhaps there was a spec change there) | |||
tadzik | it doesn't, there have to be .Str in both calls | ||
but I have yet another something, will paste | 19:59 | ||
wklej.org/id/366953/ | 20:00 | ||
Before returning .perl shows the hash, outside the class it Any | |||
perhaps some issue with returning a private value? | 20:02 | ||
[Coke] | (Perl 6 R* Us) | ||
20:03
mberends left,
mberends joined
20:06
patspam joined
|
|||
moritz_ | any objections to filtering out "." and ".." from dir($path) ? | 20:07 | |
pmichaud | that feels wrong to me. | 20:08 | |
moritz_ | why? | ||
pmichaud | because they're entries in the directory, same as others. | ||
moritz_ | but how often to do you actually need to use them? | ||
nearly all of my scripts that recurse throug directories, list them etc. contain separate logic just to ignore them | 20:09 | ||
tylercurtis | moritz_: once Path is implemented, I'm pretty sure it's specced to have a method for that. | ||
PerlJam | moritz_: give dir an adverb to ignore/include them | ||
pmichaud | I'd prefer there to be an adverb/option for including/excluding them, then. | ||
but simply excluding them always feels wrong. | |||
moritz_ | would dir($path, :all) work for you? | 20:10 | |
pmichaud | (and once there's an adverb to include/exclude, it seems like include/exclude should be a Matcher) | ||
with a default that excludes . + .. | |||
PerlJam | moritz_: sure | ||
tylercurtis misunderstood. | |||
[Coke] | if rakudo * is going to bundle the perl6 compiler, what is the R* executable going to be called? | 20:11 | |
moritz_ | pmichaud: so getting them all would be dir($path, :!exclude) | ||
[Coke] | or is the R* executable the perl6 compiler executable? | ||
pmichaud | moritz_: no, that feels wrong to me | ||
tadzik | moritz_: what about this BUILD but? | ||
* bug? | |||
pmichaud | [Coke]: the latter | ||
moritz_ | tadzik: it's a bug. | ||
tadzik | report it? | ||
moritz_ | tadzik: I think it's known, but I'm not sure | ||
[Coke] | any thoughts on making the default name for the installed exe "rakudo" instead of "perl6" ? | 20:12 | |
moritz_ | tadzik: if you can't find it in RT; please report it | ||
pmichaud | moritz_: I think it should be dir($path, test => ... ) | ||
Eevee | imo the executable should be "rakudo★" | ||
[Coke] | (but keeping perl6 as a copy (until we bother with making a symlink) | ||
pmichaud | i.e., "dir" has a built-in 'grep' | ||
[Coke] | Eevee: did you mean to have extra chars there? | ||
moritz_ | pmichaud: 'test' is not very specific about whether it includes or excludes | 20:13 | |
Eevee | [Coke]: yes it's U+2605 BLACK STAR :P | ||
pmichaud | moritz_: it includes | ||
just like with grep | |||
tadzik | er, searching for BUILD on rt is not a good idea | ||
pmichaud | [Coke]: I've considered switching the executable name to "rakudo", yes. | 20:14 | |
tadzik | moritz_: rt.perl.org/rt3/Public/Search/Simpl...=submethod nothing looks like this one | ||
moritz_ | tadzik: then submit | ||
tadzik | moritz_: the bug is, that the class variables are not visible in BUILD? | ||
pmichaud | [Coke]: I've not been able to argue myself into it enough to overcome the inertia of "perl6". | ||
moritz_ | tadzik: that the attributes aren't initialized yet | ||
tadzik | alright | 20:15 | |
pmichaud | moritz/tadzik : should they be? | ||
I thought BUILD was responsible for initializing them. | |||
tadzik | pmichaud: moritz_ told me so :) | ||
pmichaud | and then if left uninitialized, the default initializer grabs them | ||
tadzik | I only know that in Moose they alredy where. And it was the way to make some funny magic after an object construction | ||
pmichaud | but we can't say they should be initialized by default if BUILD is supposed to potentially leave them uninitialized | ||
moritz_ | pmichaud: I kinda thought the bless($candidate, %args) initializes them | 20:16 | |
pmichaud | bless calls BUILD, yes. | ||
moritz_ | wait | ||
it calls BUILD for every class in the hierarchy | |||
pmichaud | including the one you're in, iirc. | ||
jjore_ | hi, what method do I call to get the list of methods available on an object? | 20:17 | |
moritz_ | and shouln't Mu.BUILD initialize all attributes, leaving custom BUILDs free from these chores? | ||
tadzik | moritz_: what's the preffered naming for perl6 modules again? | ||
jjore_: ^methods | |||
TimToady | Mu runs first, not last | ||
moritz_ | jjore_: $obj.^methods | ||
jjore_ | o_O | ||
moritz_ | or $obj.^methods(:local), if you don't want parent attributes | ||
20:17
oZ] joined
|
|||
jjore_ | I guessed .methods, .meta.methods, and .META.methods but wouldn't at have ever arrived /there | 20:17 | |
thanks | |||
moritz_ | TimToady: right, that's why I thought that a custom BUILD already sees initialized attributes | 20:18 | |
jjore_ | Oh, I don't see ^methods in the list of methods | ||
moritz_ | jjore_: that's because it's a method on the meta class | ||
or syntactic sugar for that | 20:19 | ||
tylercurtis | rakudo: say Int.HOW.methods | ||
p6eval | rakudo 3370f0: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected in main program body at line 22:/tmp/gmJgdBhs_q» | ||
moritz_ | rakudo: say Int.HOW.methods(Int) | ||
p6eval | rakudo 3370f0: | ||
..OUTPUT«ACCEPTSfrom-radianspredatanhexpcosecBridgesinhto-radiansWHICHacotanrootsComplexlnsecaseccotanhcislogsechlog10randtruncatesinsqrtasinIntBoolcoshsuccsignasinhacosechabsrealsceilingunpolarfloorasechRatroundacoshacosecNumcosechcotanatan2tanRealatancosacostanhNumericperlStracotanhtrim-t… | |||
tylercurtis | rakudo: say Int.^methods | ||
moritz_ | $obj.^foo is short for $obj.HOW.foo($obj) | ||
mathw mutters and mumbles about action methods | |||
p6eval | rakudo 3370f0: | ||
..OUTPUT«tanhatanhcosecNumWHICHperlrootstanlog10from-radianscospredacosecsinhasinhNumericcosechrealsStrasecacotanhfloorsechACCEPTSasechrandtruncateroundsqrtasinBoolcoshexpsuccacoshsigncotanatan2ComplexseccislogsinIntBridgeto-radiansabsacosechacotanlnceilingcotanhunpolaratanRealacosRattanhat… | |||
jjore_ | ah | 20:20 | |
mathw | okay | ||
it's re-read spec time | |||
moritz_ | because the meta class of Int handles all the objects, and differnt objects can have different methods mixed in | ||
tylercurtis | Ah, right. | ||
jjore_ | Is it weird that .HOW doesn't show up either? | ||
tadzik | moritz_: what's the preffered naming for perl6 modules again? | ||
moritz_ | rakudo: class A { method x() { } }; my $y = A.new; say ~$y.^methods(:local); $y does role { method new_metho() { } }; say ~$y.^methods(:local) | ||
p6eval | rakudo 3370f0: OUTPUT«xnew_metho» | 20:21 | |
moritz_ | tadzik: foo-bar or perl6-foo-bar | ||
tadzik | ok | ||
pmichaud | .HOW is more of a macro than a true method. | ||
(although I am surprised it doesn't appear in Rakudo :) | |||
moritz_ | I'm kinda surprised that x doesn't show up in the second .^methods | ||
jnthn | moritz_: I'm not. | 20:22 | |
moritz_: Mixing in a role derives an anonymous sub-class and mixes into that. | |||
moritz_: If we just replaced methods rather than doing that, you'd not be able to defer up to the original class from the mix-in, for example. | 20:23 | ||
moritz_ | jnthn: ah, so x is one level away | ||
jnthn | moritz_: Yes :-) | ||
moritz_: So if you mix in an x and the original class had an x, you can still get hold of both. | |||
:-) | |||
20:24
_macdaddy joined
|
|||
moritz_ proposes :*foo to mean :foo(*) | 20:25 | ||
... not really :-) | |||
jnthn | :*| | ||
masak | *.O | ||
pmichaud proposes :*| to mean someone just got punched in the nose. | |||
moritz_ | std: :::foo; class foo { }; | ||
p6eval | std 31774: OUTPUT«ok 00:01 114m» | ||
moritz_ | \o/ STD.pm parses colonpairs with :: sigil | ||
masak | pmichaud: wouldn't that be :*( in most cases? :P | ||
moritz_ | rakudo: my $x = :::foo; class foo { }; | 20:26 | |
p6eval | rakudo 3370f0: ( no output ) | ||
20:26
timbunce joined
|
|||
TimToady | um, no | 20:26 | |
moritz_ | rakudo: my $x = :::foo; class foo { }; say $x.perl | ||
jnthn | masak: Depends if you were sad about being punched or just disappointed, I guess. | ||
p6eval | rakudo 3370f0: OUTPUT«undef» | ||
TimToady | anything done with :: is hardwired; it's not a sigil | ||
moritz_ | what is this undef thing? | ||
20:26
perimosocordiae joined
|
|||
masak | jnthn: I think I missed the Unicode codepoints "SAD ABOUT BEING PUNCHED IN THE NOSE" and "JUST DISAPPOINTED ABOUT BEING PUNCHED IN THE NOSE" :) | 20:27 | |
pmichaud | and "HAPPY TO HAVE A CLOWN NOSE" | ||
aka | |||
:*D | |||
masak | pmichaud++ | 20:28 | |
that karma point was for the mental images alone :) | |||
lue | .oO(CIRCLE THAT USED TO BE SQUARE) |
20:29 | |
TimToady | ▢ | ||
pmichaud | wouldn't that be "CIRCLE THAT IS ABOUT TO BE SQUARE"? | ||
lue | SQUARE THAT USED TO BE CIRCLE | ||
masak | lue: was it punched in the nose as well? | ||
lue | Yes. It just has an ose now :) | 20:30 | |
mathw | \o/ got Form successfully not using {* | ||
{*} #= key stuff | |||
pmichaud | \o/ | ||
mathw | thanks to the Book | ||
jnthn | mathw: yay! | ||
tylercurtis | :●D HAPPY TO HAVE A CLOWN NOSE FACING THE READER | ||
mathw | which hinted at me how to pass up the ast from a subrule match in a manner that doesn't drive me insane | 20:31 | |
masak | "Perl 6: HAPPY TO HAVE A CLOWN NOSE" | ||
mathw | although it's still not entirely elegant | ||
pmichaud | sadly, Camelia does not have a clown nose. | ||
masak | and people say we're bad at marketing... | ||
dalek | kudo: 2783660 | moritz++ | src/core/IO.pm: dir() now defaults to filtering out . and .. |
20:32 | |
mathw | only two of seven test files now failing! | ||
lue | .u FFD0 | ||
phenny | U+FFD0 (No name found) | ||
mathw | I think I'll commit this | ||
lue | .oO(should have said EYE OF THE BASILISK) |
||
pmichaud | okay, off to register for oscon and nomhunt | 20:33 | |
bbiaw | |||
lue | goodluck o/ | ||
rakudo: say "\xFFD0" | |||
p6eval | rakudo 3370f0: OUTPUT«» | ||
mathw | and my cat's come to give me a congratulatory nose rub | 20:34 | |
just the encouragement I need to figure out what's wrong with the other two files | 20:35 | ||
tadzik | github.com/tadzik/perl6-Config-INI | 20:36 | |
moritz_ | tadzik++ | ||
tadzik | suggestions/patches/criticism welcome | ||
(see also Acme::Meow :>) | 20:37 | ||
20:37
_mpu left
|
|||
moritz_ | looks nice | 20:37 | |
PerlJam | tadzik: want to add it to Rakudo*? | ||
tadzik | it's missing sections | ||
PerlJam: once I make it finished, sure | |||
20:38
takadonet joined
|
|||
PerlJam doesn't understand "finished" :) | 20:38 | ||
tadzik | hmm | ||
moritz_ | btw the last patch to rakudo shows a nice use case for none() | ||
tadzik | nopaste.snit.ch/22177 | ||
20:39
takadonet_ joined
|
|||
tadzik | nice | 20:39 | |
masak | chromatic is writing interesting things about Little Languages. www.modernperlbooks.com/mt/2010/07/...uages.html -- he's kind of building up to Why We Want Perl 6. | ||
PerlJam | tadzik: wiki.github.com/rakudo/rakudo/whats...nto-rakudo Look just above "Add more here :-)" | 20:40 | |
mathw | Best practice question: should libraries with errors be using 'die' or 'fail'? | 20:41 | |
tadzik | PerlJam: thanks :) | ||
oZ] | Would anyone be willing to point me at any discussions regarding threading in rakudo? | ||
PerlJam | oZ: The discussions would be very brief. There is no threading in rakudo :) | 20:42 | |
ingy | greetings | ||
moritz_ | oZ]: it's not yet implemented, and blocks on parrot not supporting threads for high-level languages | ||
(unless a brave soul ports rakudo to another backend) | 20:43 | ||
oZ] | I'm aware it doesn't yet exist -- just wondering about what thought has gone into it and if it's a goal for later. :) | ||
ingy | would anyone be interested in previewing my log post? | ||
*blog | |||
PerlJam | oZ]: or do you mean threading as in autothreading ala junctions? | ||
ingy | gist.github.com/483546 | ||
PerlJam | ingy: sure! | ||
moritz_ takes a look | |||
oZ] | Nope -- I mean, open a thread, throw something in there for the thread to do. ;) | ||
20:43
rblasch_ joined
|
|||
masak | mberends: ping | 20:44 | |
moritz_ | it's planned, yes | ||
but not any time soon | |||
PerlJam | heh "short ten year wait" | ||
oZ] | Oh. | ||
tylercurtis | oZ]: perlcabal.org/syn/S17.html although I don't know if anyone has much if any of that implemented, so it'll probably change drastically between now and being implemented. | ||
moritz_ | unless somebody takes it up, and implements it | ||
ingy | sorry about the badly formatted gist | ||
one sec | |||
moritz_ downloads the raw thing, and puts it into vim | |||
oZ] | Any pointer on the parrot issue you're talking about? | 20:45 | |
moritz_ | ingy: please remove that 1.0. It's not going to be the official version number | ||
oZ]: just a sec... | |||
ingy | moritz_. PerlJam: regist: gist.github.com/483559 | 20:46 | |
moritz_ | oZ]: trac.parrot.org/parrot/ticket/757 | 20:47 | |
masak | phenny: tell mberends when I remove (Cool-)Str.bytes, t/spec/S32-io/IO-Socket-INET.rakudo fails 10 tests. sure enough, src/core/IO/Socket.pm contains the only use of .bytes in the whole Rakudo code base right now. I'd like to confer with you re what to do with it. | ||
phenny | masak: I'll pass that on when mberends is around. | ||
20:47
_macdaddy left
|
|||
PerlJam | ingy: there's another Rakudo * 1.0 later in the doc | 20:47 | |
oZ] | moritz_++ thank you very much for your help! | 20:48 | |
20:48
literal left,
avar left
|
|||
moritz_ | oZ]: also if you search for 'threads', you'll find that there are quite some patches for it, but they stay unapplied | 20:48 | |
PerlJam | oh, you didn't get rid of the first 1.0 | ||
20:48
rblasch__ joined
|
|||
moritz_ | oZ]: because nobody feels responsible for them, and nobody really understands it | 20:48 | |
masak | reviving Ponie at some point might be a very special kind of fun. | ||
ingy | PerlJam, moritz_: 1.0 removed | ||
moritz_ | oZ]: there's hope though. Currently a student works on a new threading system for parrot. Talk to 'Chandon' on #parrot (irc.perl.org) | 20:49 | |
oZ] | Ooh, OK. Thank you again. | ||
20:50
avar joined
|
|||
tylercurtis | oZ]: parrot.org/blog/836 for more info and Chandon's GSoC. | 20:50 | |
moritz_ | ingy: btw you're welcome to implement JSYNC on top of "my" JSON::Tiny grammar | ||
20:51
literal joined,
rblasch_ left
|
|||
PerlJam | ingy++ interesting post. I like the no-nonsense aspects of it :) | 20:52 | |
ingy: btw, have you learned ruby yet? I find it weird that you like python more than perl 6. | |||
tadzik | I find it weird you like both. They feel completely antagonistic to me | 20:54 | |
cxreg | anyone at oscon that could provide a ubuntu cd or know where to find one? | ||
moritz_ | ingy++ nice blog post | 20:55 | |
tadzik sends a call to arms for the local perl mongers list, call to write perl6 modules | |||
20:56
justatheory joined,
Kodi joined
|
|||
Kodi | masak: ping | 20:56 | |
phenny | Kodi: 16:51Z <supernovus> tell Kodi nice work on the Temporal stuff! | ||
masak | ingy++ # nice post | 20:57 | |
Kodi: *pong* | |||
Kodi | masak: I dropped day-name from DateTime 'cause it ain't specced. I changed stftime.pm appropriately, but maybe novus's patch conflicted with that. | ||
jjore_ | You know, I think I really do like that sigils in ruby denote scope. That's nice coming from perl where there's nothing visible except convention like uppercase variables being constants or class data | ||
masak | Kodi: ah. that means that the spectests are in the wrong. | 20:58 | |
Kodi: in that case, I think I can commit your patch. | |||
moritz_ | jjore_: well, Perl 6 has adoptedthat partially | ||
masak | jjore_: there's twigils in Perl 6. | ||
moritz_ | with twigils | ||
Kodi | masak: No, I if I remember correctly, DateTime.t doesn't try to use a day-name method. [more] | 20:59 | |
PerlJam | apparently everyong thought the same thing when reading jjore_ | ||
moritz_ | $*foo being a dynamic variable, $!foo an attribute, $^foo a formal parameter etc. | ||
jjore_ | we have scoping twigits? | ||
oh, hmm | |||
Kodi | masak: It's just that day-name is called by strftime, and it shouldn't be. | ||
cosimo | oh hai, #perl6. Q: is .pm6 the "cool" extension now? I thought we wanted to keep .pm | ||
Kodi | strftime should have a day-of-week name array and use that. | ||
That ought to fix the failing tests. | 21:00 | ||
cosimo | but i see increasing amounts of .pm6 files | ||
moritz_ | cosimo: it seems some projects have moved to .pm6, due to having to ship both p5 and p6 modules | ||
I don't really care | |||
21:00
paul1234 left
|
|||
masak | Kodi: applying your patch caused failing tests as shown in my email. | 21:00 | |
Kodi: you lost me after that in your above explanation. | 21:01 | ||
cosimo | moritz_: ok, i'll keep using .pm for now, then :) | ||
Kodi | masak: Sorry. Here's what I'm trying to say: the call to DateTime.day-name, if I recall correctly, doesn't happen in any of the test files, it happens in strftime.pm. So strftime.pm is what needs fixing. | ||
21:02
takadonet left
|
|||
Kodi | The tests are correct in thinking that strftime should support names of weekdays. | 21:02 | |
cxreg | is :rw supposed to be a valid open argument? | ||
masak | ah. | ||
moritz_ | cxreg: yes, but NYI | ||
masak | Kodi: is it possible you could prepare a patch with (1) s/Calendrical/Dateish/ and (2) the strftime.pm issue fixed? | 21:03 | |
21:03
kensanata left
|
|||
masak | Kodi: that'd greatly simplify my apply work. | 21:03 | |
cxreg | moritz_: due to seek issues or something? | ||
21:03
Su-Shee left,
takadonet_ left
|
|||
moritz_ | cxreg: probably just because nobody got around to implement it yet | 21:03 | |
Kodi | masak: Sure, I can do that tonight. I just need to run a participant (psychology experiment) and have dinner first. | ||
masak | ++Kodi | 21:04 | |
Kodi: take your time. | |||
moritz_ wonders if #perl6 is just a big psychology experiment | |||
PerlJam | Where does HTTP::Daemon live? In web? | ||
Kodi | masak: And then we'll have working Date and DateTime in Rakudo *! Hooray! | ||
moritz_ | somwhere on gitorious,iirc | ||
21:04
Mowah left
|
|||
masak | yes, gitorious. | 21:04 | |
PerlJam looks | |||
21:05
oZ] left,
hercynium joined
|
|||
masak | rakudo: module M {}; say 42 ~~ M | 21:06 | |
21:06
M_o_C left
|
|||
p6eval | rakudo 278366: OUTPUT«Method 'ACCEPTS' not found for non-object in 'infix:<~~>' at line 397:CORE.setting in main program body at line 22:/tmp/fC9POxlNFX» | 21:06 | |
masak submits rakudobug | 21:07 | ||
mathw++ for discovering it. | |||
moritz_ | what should it do? | ||
is M a type? | |||
masak | print "0\n" | ||
moritz_: I'd expect it to be an object, given that everything is, if pressed. | |||
ingy | moritz_: I plan to implement JSYNC on your code, of course. | ||
21:08
Kodi left
|
|||
moritz_ | \o/ | 21:08 | |
ingy | PerlJam: Python is nice and boring | ||
:) | |||
moritz_ | is anybody *not* getting passing TODOs in t/spec/S32-str/uc.rakudo? | ||
ingy | Rakudo has too much "excitement" ;) | ||
PerlJam | ingy: oh. In that case, I can see quite well how you would like Python over Perl 6 :-) | 21:09 | |
masak | moritz_: I've got them today. haven't paid attention to whether they've been consistent. | ||
Tene | ingy: but you don't put spaces after twigils... | 21:11 | |
pugssvn | r31775 | moritz++ | [t/spec] unfudge some passing TODO tests, and see if we get failure reports from any platforms | ||
masak | moritz_: not consistent. I just ran uc.rakudo again, and didn't get passing TODOs. | 21:13 | |
21:16
patspam left
21:19
paul1234 joined
|
|||
ingy | Tene: *! ;) | 21:23 | |
21:23
perimosocordiae left
|
|||
masak | ingy: did you just punch Tene in the nose? :P | 21:23 | |
ingy: that kind of Pythonista behaviour isn't tolerated around here... :P | 21:24 | ||
Tene | ingy: eh? | ||
masak | poor Tene is all dazed now. | ||
21:25
gbacon left
21:27
macroron left
|
|||
ingy | blogs.perl.org/users/ingy_dot_net/2...ready.html | 21:27 | |
how do I get this post linked to blogs.perl.org front page? | 21:28 | ||
tadzik | it appeared | 21:32 | |
21:33
felliott left
|
|||
jnthn | ingy++ # nice post! | 21:33 | |
21:38
sftp left,
Guest62932 left,
skids left
|
|||
masak | looking closer at the Str.bytes use in src/core/IO/Socket.pm, I think it not only *can* be changed into Buf.bytes, but *should* be. still, it'd be nice to talk to mberends++ before making the switch. | 21:46 | |
god natt, #perl6. | |||
tadzik | o/ | ||
21:46
masak left
|
|||
jjore_ | Hi, my runtimes vary *alot* depending on the contents of the files it is parsing. Anyone want to gesture at this to guess why? diotalevi.isa-geek.net/~josh/100720...rakudo.txt | 21:51 | |
pugssvn | r31776 | dolmen++ | [S32/Temporal] Make DateTime immutable. | ||
21:52
mreed joined,
mreed is now known as markjreed
|
|||
dolmen | ingy++ | 21:52 | |
markjreed | Where in the Synopses is the new hash subscript syntax discussed? Is there any difference between %hash<foo> and %hash<<foo>> (or %hashB+fooB; | 21:53 | |
Ok, so much for Unicode in this irc client. :) | |||
So far I've done a cursory search over S02, S03, and S09.. | 21:54 | ||
jnthn | markjreed: I'd guess S02 or S09. | ||
pmichaud | back | ||
dolmen | phenny, tell masak I have committed my Temporal spec patch | ||
phenny | dolmen: I'll pass that on when masak is around. | ||
jnthn | markjreed: Ah. :-) | ||
21:57
rblasch_ joined,
pmurias left
|
|||
jnthn | jjore_: Those are...interesting. | 21:58 | |
jjore_: There's no correlation with filesize? | 21:59 | ||
ingy | greetings | ||
jnthn | But I guess not looking at just how big the differences are. | ||
pmichaud: diotalevi.isa-geek.net/~josh/100720...rakudo.txt may be interesting to you when you get chance. | |||
jjore_ | Oh! that's what I meant to add to the report, file size. | ||
21:59
hercynium left
|
|||
jjore_ | and whether the pattern succeeded or not | 22:00 | |
jnthn | pmichaud: Wonder if it's hitting some expected pathological backtracking case. | ||
*unexpected | |||
*unexpectedly | |||
gah | |||
:-) | |||
22:00
rblasch__ left
22:01
mce_ro joined
|
|||
jnthn afk for a little | 22:01 | ||
jjore_ | fwiw, I'm merely running that program against the perl5 source. I wrote it last year at use.perl.org/~jjore/journal/39233 | 22:02 | |
markjreed | Based on the Apocalpyse and Exegesis, I would expect it to be in S02, but if it's in there, I don't see it. | ||
tadzik | there will be more then one Rakudo Star? | 22:03 | |
pmichaud | tadzik: Rakudo Star is a series of distribution releases, not a single release. | ||
tadzik | oh, nice | 22:04 | |
pmichaud | looking at timing-rakudo.txt | ||
22:04
justatheory left
22:05
timbunce left
|
|||
pmichaud | adding some judicious ratchets or 'cut' markers would likely speed things up a fair bit | 22:05 | |
for example, \N*:\n can be far more efficient than \N*\n | 22:06 | ||
22:06
hercynium joined
|
|||
pmichaud | with \N*\n, the engine currently keeps a lot of backtracking points for the quantifier on \N* | 22:07 | |
markjreed | ah. "(It also works to say %x<<foo>> as long as you realized it's subject to interpolation.)" | ||
pmichaud | markjreed: briefly, %h<x> is the same as %h{<x>} | 22:08 | |
and %h<<foo>> is the same as %h{<<foo>>} | |||
markjreed | S02. So my $foo="bar baz"; say %x<<$foo>>; should translate to say %x<bar baz> | ||
pmichaud | markjreed: correct. I think <<$foo>> isn't working in rakudo at present. | 22:09 | |
jjore_ | fwiw, I think the perl5 engine ran against *all* the files in approx 3 seconds. | ||
pmichaud | rakudo: my $foo = "bar baz"; say <<$foo>>.perl | ||
p6eval | rakudo 278366: OUTPUT«"\$foo"» | ||
pmichaud | jjore_: that doesn't surprise me | ||
jjore_ | but thanks for the info. I don't know what gyrations the rakudo re engine is doing to make that happen | ||
pmichaud | jjore_: rakudo's engine is still fairly slow, and we get hit hard by gc performance issues in Parrot | ||
markjreed | ah, ok. totally apart from hash subscripting, Texas quotes aren't interpolating. | ||
22:10
rgrau__ joined
|
|||
pmichaud | Texas quotes do interpolate. | 22:10 | |
markjreed | ..but not in current rakudo. | ||
pmichaud | right. | ||
markjreed | We're violently agreeing, then. :) | ||
pmichaud | I wonder how hard it would be to re-implement that. | ||
tadzik | g'night #perl6 | ||
22:10
tadzik left
22:11
rgrau_ left
|
|||
ingy | blogs.perl.org/users/ingy_dot_net/2...ready.html (updated with my photo!) | 22:12 | |
pmichaud | ingy: I enjoyed the post :) | ||
ingy | I <3 my hairdo | ||
pmichaud: \o/ | |||
ingy buggers off to find TimToady | 22:13 | ||
pmichaud | has it been tweeted yet? | ||
ingy | pmichaud: should I tweet it? | ||
pmichaud | hugme tweet rakudoperl Ingy writes about Rakudo Perl: blogs.perl.org/users/ingy_dot_net/2...ready.html | ||
hugme hugs pmichaud; tweet delivered | |||
pmichaud | it's tweeted now :) | ||
ingy | \o/ !!! | 22:14 | |
pmichaud++ | |||
ingy really buggers off to find TimToady | |||
au|zzz | ...and retweeted :) | ||
22:14
au|zzz is now known as au|irc
|
|||
pmichaud | perlbuzz tweeted it also | 22:15 | |
au|irc | ingy++ # lovely writeup | ||
22:15
su_penguin joined
|
|||
sbp | "If your expection of Rakudo * includes blazing speed..." | 22:15 | |
expectation? | 22:16 | ||
su_penguin | Hello all. :) | ||
jjore_ | that | 22:17 | |
er, | |||
ingy, (making fiends)++ | |||
tylercurtis | rakudo: our $ingy += [+] 1..*; # for the Acmeist Perl 6 Regex plans. | 22:19 | |
p6eval | rakudo 278366: ( no output ) | ||
markjreed | Python nicer than Perl6? Heresy! :) | 22:20 | |
22:23
felliott joined
22:24
tylercurtis left,
timbunce joined
|
|||
ash_ | has anyone made a camelia favicon? | 22:25 | |
ingy has located @TimToady / 2; | 22:26 | ||
au|irc: thanks! | |||
au|irc | :) | ||
ingy | sbp: fixing... thanks | 22:27 | |
sbp | :-) | ||
22:27
rblasch_ left
22:28
justatheory joined
|
|||
markjreed | How can an Acmeist like a language whose motto is "There's Only One Way To Do It"? :) | 22:28 | |
ash_ | rhetorically? | ||
markjreed | Perl6.org seems to have a Camelia favicon, ash_. | 22:29 | |
jnthn | ash_: svn.pugscode.org/pugs/misc/camelia32.ico | ||
ash_ | ah, thanks | 22:30 | |
pmichaud | oh dear | ||
twitter.com/obra/status/18969296509 | |||
and reply at twitter.com/OReillyMedia/status/19000614690 | |||
ah well, "rise above" and all that. | 22:31 | ||
22:32
mce_ro left,
gbacon joined
|
|||
ingy | sbp: fixed | 22:32 | |
jnthn | :/ | ||
pmichaud | obra++ for nicely bringing it to oreilly's attention | ||
ingy | markjreed: their motto is a lie :) | ||
markjreed | Typical, really... | 22:33 | |
It's representative of an attitude, though. As the community has grown that attiude may have become less prevalent... | 22:34 | ||
pmichaud | I wonder how many (if any) lightning talks will be created based on that subject :) | 22:35 | |
jjore_ | pmichaud: said earlier that \N*:\n could be more efficient than \N*\n. I didn't realize : was a metacharacter - a cut. Is it really? | 22:36 | |
22:36
felliott left,
pyrimidine left
|
|||
pmichaud | it is | 22:37 | |
jjore_ | woo | ||
pmichaud | it prevents backtracking into the previous item | ||
jjore_ | that must be why I wrote \: in the original regexp | ||
markjreed | Everyone wanted the colon, but the regex engine got it? :) | ||
pmichaud | well, all punctuation is meta in regexes | ||
it's still likely to be slow, but you can save a *bunch* of gcables by not preserving backtracking points when they aren't needed :) | 22:38 | ||
jnthn | The regex engine really got the colon. There :, :: and ::: :-) | 22:39 | |
pmichaud | for example, I would write | ||
Local\ Variables\:\N*\n | |||
as | |||
'Local Variables:' \N*:\n | |||
markjreed | ok, outta here.. | 22:40 | |
22:40
markjreed left
|
|||
pmichaud regrets that he did not bring his Windows flashcard with him | 22:41 | ||
now I might have to learn/use gimp | |||
jnthn | Odd, I never have to remember one of those. ;-) | 22:42 | |
jjore_ | thanks pmichaud. I'm retrying w/ your suggestions on doio.c which was approx 1 minute before. | ||
pmichaud | jjore_: I'm curious to see how much of a difference it makes. | ||
jjore_ | Now seeing 20ish seconds | ||
jnthn | Wow. | ||
jjore_ | for try in $(seq q ...);do... | ||
jnthn | pmichaud: ooc, does backtracking etc result in quite a lot of method calls too? | 22:43 | |
pmichaud | jnthn: not so much | ||
jnthn | OK | ||
pmichaud | actually, it does | ||
those are method calls I've been meaning to inline | |||
yes, each backtracking point results in a method call at present. | |||
jjore_ | ok, well, re-running against the whole set. | 22:44 | |
pmichaud | the code is designed so that I can inline some of those calls easily | ||
jnthn | OK | ||
Grammars are one case where some of the stuff I'm working on for method dispatch performance improvements could *really* win us a bunch. | 22:45 | ||
pmichaud | very much agreed | ||
jnthn | Because all the dispatches are on the invocant. | ||
And we know the type of it. | |||
pmichaud | I'm also very eager to re-look at sorear's work on dfa matching | ||
jnthn | pmichaud: Oh, that's one question I wanted to ask. | ||
pmichaud: Are you using Multiple Inheritance anywhere in the grammar stuff? | |||
pmichaud | jnthn: I'm not aware of any off the top of my head. | 22:46 | |
jnthn | OK | ||
pmichaud | if I am, it's likely easy to work around. | ||
jnthn | OK | ||
I'm not saying we'd not support it there | |||
jjore_ | just eyeballing the times that are coming back, the program is seemingly 3x faster on all of the input files now | ||
jnthn | So much as it makes some opts harder. | ||
jjore_ | Just watched config.h which was 3m58.626s come in at 1m27.769s. | 22:47 | |
pmichaud | jjore_: it may be faster still (and you can avoid the cut marks) if you put :ratchet right after the :i | ||
oh, on second thought, probably not faster | |||
jjore_ | the re is already written to be amenable to only forward matching so I : cut everywhere I previously * quantified | 22:48 | |
pmichaud | right | ||
in that case you might want to look at "token" at some point. | |||
token assumes forward matching (i.e., every expression has an assumed 'cut' after it) | 22:49 | ||
:ratchet does the same thing | |||
i.e., it says "assume ':' after each expression that follows" | |||
jjore_ | I may have made the program incorrect though. I said [ \N*:\n ]*:? but that is the one place which needs backtracking | 22:51 | |
pmichaud | if backtracking is needed there, just don't put the colon | 22:52 | |
22:53
Patterner left
|
|||
jjore_ | yes, just went back to omit it. I had to tell #perl6 though because now I can't trust the 3x prior benchmark | 22:53 | |
it was kind of a fabulous number | |||
pmichaud | sure, make sense | ||
*makes | |||
afk for a bit | |||
PerlJam | should the R* dist contain the perl6 book? | ||
pmichaud | I think a reference to it is sufficient. | 22:54 | |
jjore_ | oh that's nice. maybe approx 3x is still reasonable given config.h timing | 22:55 | |
22:55
stkowski left
|
|||
ingy | I need a name for the Acmeist P6R project. I was going to use pegex, but there's already a Scala based thing called Pegex on github! | 22:56 | |
22:58
Psyche^ joined
|
|||
au|irc | ingy: having a relatively obscure Paragraph Formatter named "par" never really stopped me coopting that name :) | 22:58 | |
22:58
Psyche^ is now known as Patterner
|
|||
au|irc | "pegex" is too good to pass :) | 22:58 | |
and just maybe kmizu can join your forces since you seem to be aiming the same goal... | 23:00 | ||
23:00
sftp joined
23:10
ruoso left
23:11
dolmen left
|
|||
sorear | \o/ it's au|irc | 23:14 | |
au|irc | o/ sorear :) | ||
sorear has 2 unrelated programs named 'monop' in $PATH | |||
jjore_ | K, so like, embed.h is 2.77x. op.c is 2.64. | ||
sorear | jjore_: that looks like you meant #p6p | 23:15 | |
rokoteko | ingy: f33l fr33 t0 l1st3n t0 my 3lit3 t4lk :) | ||
sorear | #p5p | ||
rokoteko | ingy: that mean I assume you are good. not only because someone named your nick is also good ;) | ||
23:16
pnate left,
colomon joined
|
|||
sorear | ingy: out of curiousity, where did that nickname come from? | 23:16 | |
23:18
mberends left
|
|||
jjore_ | sorear: er? I'm editing my perl5 code with a rakudo program | 23:19 | |
23:20
pnate joined
|
|||
colomon | jnthn++ # for posting my status report to #phasers | 23:20 | |
jnthn | colomon: Thanks for thinking to send it along. | ||
colomon: It was a good reminder of the grepgrepbug. | 23:21 | ||
colomon | it was a last minute thing before we left. | ||
jnthn | :-) | ||
colomon | and it would have been hell to type on my phone. :) | ||
jjore_ | very originally I wrote a perl5 program to edit perl5 but then for giggles ported it to ruby and perl6 for the experience points | ||
sorear | jjore_: Yes, I just woke up and didn't backlog far enough | 23:23 | |
jjore_ | oh yeah, and I did it /last/ year in July 09 so it made a bit of retrospective to see if anything was different | 23:24 | |
from the perspective of that program, nothing seemed to have changed | 23:25 | ||
The one 'TODO' I didn't try undoing was I'd originally tried a regexp back reference which didn't work. I tried all the others though. | 23:26 | ||
Oh, though apparently s/// works but I didn't guess my way into working syntax so I kept .substr | |||
jnthn | jjore_: If you came back a year later and we didn't really break your program, that's at least sort of promising. :-) | 23:27 | |
pmichaud | actually, surprising. :) | ||
colomon | very promising! :) | ||
jnthn | s/// should work | 23:28 | |
pmichaud | afk for a short while | ||
23:30
irclogbot_backup joined,
irclogbot_backup left
|
|||
jjore_ | well, "Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 18" at diotalevi.isa-geek.net/~josh/100720/woota2.txt | 23:32 | |
23:32
mberends joined
|
|||
sorear | Would it be acceptable for *.perl to return a Cat? | 23:34 | |
23:35
su_penguin left
|
|||
jnthn | std: s{ x }{ "y" } | 23:36 | |
p6eval | std 31776: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/09lJeqD7m6 line 1:------> s{ x }⏏{ "y" } expecting any of: infix or meta-infix quantifierParse failedFAILED | ||
..00:01 117… | |||
jnthn | std: s{ x } = "y" | ||
p6eval | std 31776: OUTPUT«ok 00:01 117m» | ||
jnthn | jjore_: Like that. | ||
If you're going to use the bracketed form. | |||
jjore_ | but I don't know the contents of "y" until I get some capture variables | ||
jnthn | jjore_: The RHS there is actually closure-ized. | 23:37 | |
So you should be able to refer to them. | |||
rakudo: my $x = "l0l1l2l"; $x ~~ s{\d} = 2 * $/; say $x | 23:38 | ||
p6eval | rakudo 278366: OUTPUT«Could not find sub &s in main program body at line 22:/tmp/aI2KU7h4eu» | ||
jjore_ | Ok, refresh. However the eror is still "Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 18" | ||
23:39
Kodi joined
|
|||
jnthn | rakudo: my $x = "l0l1l2l"; $x ~~ s[\d] = 2 * $/; say $x | 23:39 | |
p6eval | rakudo 278366: OUTPUT«Use of uninitialized value in numeric contextl0l1l2l» | ||
jnthn | :/ | ||
OK, it's still broken, it seems :-( | |||
I know we fixed .subst recently | |||
jjore_ | So then $ostr ~~ s{...} = ...; *isn't* working then? | 23:41 | |
I can keep using .substr. It's ok. | |||
jnthn | jjore_: Seems not. :-( | 23:42 | |
Sorry, thought it was. | |||
ingy | jjore_: get used to it :) | ||
jjore_ | I would just prefer to adjust my syntax if that's all that prevented it | ||
ingy | it's The Way of the Camel | ||
jnthn | "Spits occasinally." | ||
ingy | :) | ||
jnthn | No point getting the hump though. :) | 23:43 | |
sorear | it's awesome having enough foundations in niecza down that I can actually hack setting code in Perl 6 now | ||
jnthn | :) | 23:44 | |
Kodi | phenny: tell masak gist.github.com/483792 I actually think I got the day-name stuff right the first time. At any rate, this time, DateTime-strftime.t works fine for me. If you get that problem again, try double-checking that you're using the right strftime.pm (or strftime.pir). | 23:48 | |
phenny | Kodi: I'll pass that on when masak is around. | ||
Kodi | |||
23:51
cdarroch left
23:52
Kodi left
23:54
[Coke] left
23:56
amkrankruleuen joined
|
|||
amkrankruleuen | Hej :p | 23:56 | |
jnthn | hej hej | ||
23:56
Psyche^ joined
|