»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:01
donaldh left
00:04
molaf_ joined
00:06
whiteknight joined
00:07
molaf left
00:09
lestrrat left
00:10
lestrrat joined
00:16
hundskatt left
|
|||
dalek | ast: c027a2f | jnthn++ | S05-match/make.t: Untodo a test. |
00:22 | |
kudo/nom: bcf2a4e | jnthn++ | src/Perl6/Actions.pm: Fix a couple of $/ handling issues. Of note, $/ was not available to code blocks inside of regexes, and the code that shoulda been setting it was binding, whereas we assign to $/. |
00:24 | ||
kudo/nom: dba6048 | jnthn++ | src/core/ (2 files): Fix using make inside a regex (it only worked when used in the action method before now). |
|||
kudo/nom: d3471b9 | jnthn++ | t/spectest.data: Run S05-match/make.t. |
|||
sorear | jnthn: you... assign to $/ ? | 00:26 | |
jnthn | phenny: tell moritz I fixed 'abc' ~~ / (a) { say $0 } bc / this evening, but don't immediately see a test to cover it...well, tbh, tired and need sleep now, so only looked so hard. ;-) If you don't find one, one of us can always file a ticket and tag it testneeded... ;) | ||
phenny | jnthn: I'll pass that on when moritz is around. | ||
jnthn | sorear: Yeah, pmichaud++ and I settled on assigning it rather than binding it ages back. Guess the reasoning is some way back in the ir clog... | 00:27 | |
jnthn remembers a discussion on that here, just not the outcome. | 00:28 | ||
er | |||
not the details, I mean. | |||
grr, my fingers won't type what my brain is thinking :) | |||
00:28
huf left
|
|||
sorear | I remember a discussion involving myself and one or more of {jnthn, TimToady, pmichaud} that decided on binding | 00:28 | |
jnthn | er:/ | 00:29 | |
Well, it doesn't matter much. | |||
The problem was that we were doing assignment in all cases but one. | |||
Which, innevitably, made a mess. | 00:30 | ||
sorear | jnthn: what do you think of $CALLER::x seeing 'has $x' ? | ||
00:30
huf joined
|
|||
jnthn | sorear: Ugh. | 00:30 | |
sorear: I'm not going to make that work without serious contortions. | 00:31 | ||
sorear | I started to implement that in niecza but the yak shaving got quite out of hand | ||
jnthn | sorear: We re-write $x to $!x at compile time in Rakudo | ||
meh. S04-declarations/constant.t thinks that constants are still spec'd as my-scoped... | 00:33 | ||
And thanks to $other-bug I fixed earlier today, we passed a test for that. | |||
constant yak = 'shaving'; | 00:34 | ||
bwaha | |||
dalek | ast: 1a61221 | jnthn++ | S04-declarations/constant.t: Constants are spec'd as our scoped by default, not my scoped. |
00:37 | |
sorear | perl6: say pi | 00:40 | |
p6eval | rakudo 77e31a: OUTPUT«3.14159265» | ||
..pugs b927740: OUTPUT«3.141592653589793» | |||
..niecza v13-285-g83e8bea: OUTPUT«3.1415926535897931» | |||
jnthn | perl6: say pi.WHAT | ||
p6eval | rakudo 77e31a, niecza v13-285-g83e8bea: OUTPUT«Num()» | ||
..pugs b927740: OUTPUT«Rat» | |||
jnthn | eek, time is WHAT? | 00:42 | |
TimToady | with latest spec change should be a RatStr, I think | ||
(pi) | |||
jnthn -> sleep & | 00:43 | ||
TimToady | perl6: time.WHAT.say | 00:45 | |
p6eval | niecza v13-285-g83e8bea: OUTPUT«Num()» | ||
..pugs b927740: OUTPUT«Rat» | |||
..rakudo 77e31a: OUTPUT«Int()» | |||
TimToady | rakudo appears to be the only correct one here... | 00:46 | |
that is, according to perlcabal.org/syn/S32/Temporal.html#time | 00:47 | ||
00:50
simcop2387 left
00:52
simcop2387 joined
00:54
Radvendii joined
00:56
Radvendii left
01:00
am0c left
01:02
pat_js left
|
|||
sorear | niecza: say time | 01:12 | |
p6eval | niecza v13-285-g83e8bea: OUTPUT«1326760281.4643641» | ||
01:23
Chillance left,
Chillance joined,
Chillance left
01:24
Chillance joined
|
|||
dalek | ecza: b5b8434 | sorear++ | lib/ (4 files): Truly vile hack to allow defining dualvar types |
01:24 | |
01:33
sudokode left
01:37
sudokode joined
01:39
shinobicl_ joined,
shinobicl_ left
01:41
tokuhirom left
01:58
Patterner left
01:59
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
dalek | ast: bc6e9d2 | (Solomon Foster)++ | S04-declarations/constant.t: Refudge for niecza. |
02:00 | |
02:16
xinming joined
02:20
packetknife left
|
|||
colomon | hmmm, how to do runtime base conversion in Niecza? | 02:21 | |
TimToady | there's always eval | 02:22 | |
niecza: say eval '0xffff' | 02:23 | ||
p6eval | niecza v13-287-gb5b8434: OUTPUT«65535» | 02:24 | |
colomon | TimToady++ # I was just about to try making a hacky call into Niecza's internals to do it... | 02:26 | |
02:29
zjmarlow left
|
|||
colomon | Action method assertion:sym<...> not yet implemented :\ | 02:29 | |
proto token value { <...> }; | 02:31 | ||
sorear | it's spelled proto token value {*} nowadays | 02:32 | |
02:33
zjmarlow joined
|
|||
colomon | that's what I was just trying to figure out | 02:33 | |
sorear++ | |||
I'm working on trying to get panda running on niecza. | 02:34 | ||
interesting, lots of the grammar bits seem to be obsolete | |||
<pair> ** [ \, ] is now <pair>+ % [\,] ? | 02:35 | ||
sorear: any suggestions? gist.github.com/1624222 | 02:40 | ||
02:43
leprevost joined
|
|||
sorear | colomon: yes, althoguh the old syntax should still work | 02:44 | |
niecza: / [a] / # curious | |||
p6eval | niecza v13-287-gb5b8434: ( no output ) | ||
sorear | looks like I never got around to porting over check_old_cclass | ||
colomon | sorear: any thoughts on the gist? it's the error I get, apparently while still loading the use statements in panda. | 02:46 | |
sorear | yes | ||
that would be an error from use | |||
somehow, one of your .ser files has come out of alignment with one of your .dlls | 02:48 | ||
colomon | in the core niecza stuff, or in the project I'm working on? | 02:49 | |
sorear | which shouldn't even be possible | ||
colomon | "King of the impossible!" | 02:50 | |
sorear | I don't understand | ||
what did you do last/ | 02:51 | ||
did you get any errors before this? | 02:52 | ||
colomon | Not like this one | ||
just your usual run-of-the-mill problems, like the <pair> ** [\,] one | 02:53 | ||
sorear | any other internal errors? | ||
colomon | I don't think so | ||
sorear | that's not an error | ||
niecza: / . ** . / | |||
p6eval | niecza v13-287-gb5b8434: OUTPUT«Potential difficulties: Unsupported use of atom ** . as separator; nowadays please use atom+ % . at /tmp/cmSXvOMvZ7 line 1:------> / . ** .⏏ /» | ||
colomon | ah, well, there were definitely the ($a as Str) errors | 02:54 | |
sorear | delete the offending .ser files | ||
colomon | in niecza/obj | ||
? | |||
sorear | yes | ||
that's the only place they are kept | |||
colomon | you're going to love this: just got the error again | 02:55 | |
sorear | which ser files did you delete? | 02:56 | |
but yes, I do love it when errors are reproducable | 02:57 | ||
colomon | the ones that went with these: gist.github.com/1624270 | 02:58 | |
I'm assuming ContainsUnicode is core niecza, it was created 30 minutes before any of the others | |||
sorear | no | ||
colomon | (Or spectest, anyway, if not core.) | ||
sorear | and there isn't a distinction between "core' and "not core" here | 02:59 | |
colomon | it's spectest | ||
I just meant core versus panda | |||
sorear | obj/ is just the compiled module cache... it cares not from whence the modules came | ||
colomon | do I need to delete all .ser files? | 03:00 | |
sorear | but anyways, that error you got, should NEVER happen | ||
if you can reproduce it, please send everything needed to reproduce it my way | |||
deleting all .ser files will help since this is fundamentally a .ser staleness problem | 03:01 | ||
03:01
whiteknight left
03:02
am0c joined
|
|||
colomon | can still duplicate after deleting all .ser files | 03:02 | |
03:03
jferrero left
|
|||
colomon | give me a minute to figure out how to send it all to you | 03:03 | |
sorear | do you get '[auto-compiling setting]'? | 03:05 | |
colomon | yes | 03:06 | |
Do you know how to switch a local git repo to a different external source? | 03:07 | ||
I'm thinking I should fork panda, commit my changes to the fork, and send you that link | 03:08 | ||
guess I could just send it as a patch against the standard if you're okay with that. | |||
03:13
xinming left
|
|||
colomon | sorear: github.com/colomon/panda | 03:21 | |
you'll need to tweak bootstrap.sh to match your paths, and then run it. should duplicate the error for you | 03:22 | ||
03:24
agentzh joined
03:27
Chillance left
03:29
xinming joined
03:31
am0c left,
orafu left
03:32
orafu joined
03:33
am0c joined
03:36
cognominal joined
03:37
xinming left,
lestrrat left,
xinming joined
03:38
Psyche^ joined
03:39
lestrrat joined
03:42
Patterner left,
Psyche^ is now known as Patterner
03:47
lutok left
|
|||
sorear | colomon: \o/ it works! | 03:54 | |
colomon | as in you don't see the bug, or you fixed it? | ||
sorear | as in, the bug reproduces fine for me | 03:55 | |
colomon | ah, well, that's the first step! | ||
04:07
am0c_ joined
04:10
am0c left
|
|||
colomon | 'night | 04:11 | |
04:21
am0c_ left
04:44
molaf_ left
|
|||
sorear | phenny: tell colomon The root problem is the proto in JSON::Tiny. Importing modules that import modules that export protos is broken, and that proto is wrong anyway; it should be an only sub | 05:00 | |
phenny | sorear: I'll pass that on when colomon is around. | ||
sorear | I feel like the only person in this channel who believes "don't use a multi when only will suffice" | 05:01 | |
phenny: tell colomon (it appears to be alpha code, in terms of the contents of the proto) | 05:02 | ||
phenny | sorear: I'll pass that on when colomon is around. | ||
05:02
birdwindupbird joined
|
|||
geekosaur suspects that feels to most people a bit like Java's "final", with similar "don't prematurely optimize" cautions (don't assume your only calling sequence will necessarily remain the only one) | 05:04 | ||
sorear | multi doesn't just make code slower, it also makes it more complicated and fragile | 05:13 | |
05:18
_jaldhar left
05:19
jaldhar joined,
am0c joined
|
|||
moritz | \o | 05:24 | |
phenny | moritz: 00:26Z <jnthn> tell moritz I fixed 'abc' ~~ / (a) { say $0 } bc / this evening, but don't immediately see a test to cover it...well, tbh, tired and need sleep now, so only looked so hard. ;-) If you don't find one, one of us can always file a ticket and tag it testneeded... ;) | ||
sorear | o\ morits | ||
z | |||
sorear is mucking around in code ey no longer really understands | 05:26 | ||
05:28
kaare__ joined,
mikemol left
05:30
am0c_ joined
05:33
am0c left
05:41
jaldhar left
|
|||
dalek | ast: 6bcda09 | moritz++ | S05-capture/subrule.t: test availability of $/ in embedded blocks in regexes |
05:45 | |
moritz | phenny: tell jnthn tests added | ||
phenny | moritz: I'll pass that on when jnthn is around. | ||
05:45
jaldhar joined
05:58
panterax left
|
|||
moritz | jnthn: oh, turns out we have a passing TODO test in t/spec/S05-metachars/closure.t for it too :-) | 05:59 | |
06:01
am0c_ left
|
|||
dalek | ast: 11b621b | moritz++ | S (5 files): rakudo refudging; make S06-signature/errors.t a bit more liberal |
06:06 | |
ecza: ee02ddf | sorear++ | lib/ (2 files): Tweaks to allow saving and thawing cross-unit deep sub clones, such as when a proto is imported |
06:08 | ||
sorear | phenny: tell colomon The niecza issue is now fixed | ||
phenny | sorear: I'll pass that on when colomon is around. | ||
TimToady | nom: my $d = Duration.new(1/2); say "one"; sleep 1/2; say "two"; sleep $d; say "three" | 06:12 | |
p6eval | nom d3471b: OUTPUT«(timeout)onetwo» | ||
TimToady | nom: my $d = Duration.new(1/2); say "one"; sleep 1/2; say "two"; sleep $d.Rat; say "three" | ||
p6eval | nom d3471b: OUTPUT«onetwothree» | ||
TimToady | shouldn't have to convert a Duration to a Rat in order to sleep it | ||
moritz | $d = Duration.new(1/2); say "one"; sleep 1/2; say "two"; sleep $d.Num; say "three" | 06:13 | |
nom: $d = Duration.new(1/2); say "one"; sleep 1/2; say "two"; sleep $d.Num; say "three" | |||
p6eval | nom d3471b: OUTPUT«===SORRY!===Variable $d is not predeclared at line 1, near " = Duratio"» | ||
moritz | nom: my $d = Duration.new(1/2); say "one"; sleep 1/2; say "two"; sleep $d.Num; say "three" | ||
p6eval | nom d3471b: OUTPUT«(timeout)onetwo» | ||
06:21
koban joined
|
|||
moritz | nom: say 1 <=> 2 | 06:27 | |
p6eval | nom d3471b: OUTPUT«Order::Increase» | ||
06:29
kaleem joined
06:31
ponbiki joined
|
|||
TimToady | nom: my $d = Duration.new(1/2).Num; say "alive" | 06:32 | |
p6eval | nom d3471b: OUTPUT«(timeout)» | 06:33 | |
moritz | nom: say Duration.^methods(:local) | ||
p6eval | nom d3471b: OUTPUT«new Bridge Str perl x» | ||
06:34
wolfman2000 left
06:36
hundskatt joined
06:40
koban left
|
|||
sorear | TimToady: I find myself thinking that +val('1_2') should strip the Str nature and return a pure Int | 06:44 | |
TimToady | seems reasonable | 06:46 | |
sorear | is IntStr supposed to be a user-visible class? | 06:47 | |
TimToady | I was thinking of it that way | ||
moritz | nom: eval 'class A { }' for 1..3 | ||
p6eval | nom d3471b: OUTPUT«===SORRY!===Illegal redeclaration of symbol A at line 1, near "{ }"» | ||
moritz | should that work? | ||
sorear | -1 | ||
moritz | ok | 06:48 | |
TimToady | it has a collision in package space | ||
not in lexical space | |||
moritz | ok, then we have a wrong test for that | ||
... which rakudo incidentally just started to fail :-) | |||
TimToady | std: { class A {} }; { class A {} } | ||
p6eval | std dc62e1d: OUTPUT«===SORRY!===Illegal redeclaration of symbol 'GLOBAL::<A>' (from line 1) at /tmp/QcSkRkYiZt line 1:------> { class A {} }; { class A ⏏{} }Check failedFAILED 00:01 107m» | 06:49 | |
TimToady | much like that, I think | ||
std: { my class A {} }; { my class A {} } | |||
p6eval | std dc62e1d: OUTPUT«ok 00:01 107m» | ||
dalek | ecza: 69e36aa | sorear++ | lib/CORE.setting: Add a prototype val(). Only numbers and strings for now. |
||
TimToady | no problem with the lexical parts of the names | 06:50 | |
dalek | ast: d843543 | moritz++ | S02-names-vars/names.t: correct a test, sorear++ TimToady++ |
||
sorear | std: :(:$foo, :$bar?) | 06:51 | |
p6eval | std dc62e1d: OUTPUT«===SORRY!===Cannot put optional positional parameter after variadic parameters at /tmp/7VUp10jepV line 1:------> :(:$foo, :$bar?⏏)Check failedFAILED 00:01 109m» | ||
moritz | niecza: sub MAIN() { say 'x' } | ||
p6eval | niecza v13-288-gee02ddf: OUTPUT«Potential difficulties: &MAIN is declared but not used at /tmp/bkI5kquhqj line 1:------> sub MAIN⏏() { say 'x' }» | ||
sorear | no MAIN quite yet | ||
(however, the blocker of MAIN was ... val!) | |||
moritz | but you're working on it, right? | ||
sorear | not as such :) | ||
06:51
thou left
|
|||
moritz | you should. MAIN seems to be the main (sic) blocker to running most Perl 6 coding contest submissions (both last year and this year) straight in niecza | 06:52 | |
07:00
wtw joined,
zby_home left
07:01
satyavvd joined
|
|||
moritz | niecza: say 124.base(2) | 07:05 | |
p6eval | niecza v13-288-gee02ddf: OUTPUT«1111100» | ||
dalek | d: 13da5b0 | sorear++ | STD.pm6: Fix :(:$x. :$y?) |
07:09 | |
sorear | TimToady: that's a copy of the fix I used in niecza... I don't think there's too much potential for controversy in it | 07:11 | |
TimToady: So... *which* shell is «» supposed to emulate the quoting and interpolation rules of? :) | 07:12 | ||
niecza: my $x = 'a b'; say < \qq[$x] >.perl | 07:14 | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«["a", "b"].list» | ||
dalek | ecza: 32cb82d | sorear++ | src/STD.pm6: Fix overlooked case in optional-named handling |
||
sorear | niecza: say val('3+4i').WHAT | 07:15 | |
p6eval | niecza v13-289-g69e36aa: OUTPUT«Str()» | ||
sorear | oh, forgot a case | 07:16 | |
niecza: say +val('123_456') | |||
p6eval | niecza v13-289-g69e36aa: OUTPUT«123456» | ||
sorear | niecza: say ~val('123_456') | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«123_456» | ||
sorear | niecza: say val('123_456') | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«123_456» | ||
sorear | niecza: say val('123_456').perl | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«val("123_456")» | ||
sorear | niecza: say val('123_456').WHAT | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«IntStr()» | ||
moritz | that's cool | ||
sorear | niecza: say IntStr ~~ Cool | 07:17 | |
p6eval | niecza v13-289-g69e36aa: OUTPUT«Bool::True» | ||
moritz | niecza: say IntStr.^parents | 07:19 | |
p6eval | niecza v13-289-g69e36aa: OUTPUT«Unhandled exception: Unable to resolve method parents in class ClassHOW at /tmp/SGWL32KHLF line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3050 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3051 (module-CORE @ 63)  a… | ||
dalek | ecza: ca7eb73 | sorear++ | lib/CORE.setting: ComplexStr needs to exist too |
||
07:19
kaare__ left,
ponbiki left
|
|||
moritz | niecza: say val('1') + val('5') | 07:19 | |
p6eval | niecza v13-289-g69e36aa: OUTPUT«6» | 07:20 | |
moritz | niecza: say (val('1') + val('5')).WHAT | ||
p6eval | niecza v13-289-g69e36aa: OUTPUT«Int()» | ||
sorear | pugs: say pi.FatRat | 07:21 | |
p6eval | pugs b927740: OUTPUT«*** No such method in class Rat: "&FatRat" at /tmp/3dzsZlb2qd line 1, column 5 - line 2, column 1» | ||
07:21
fridim_ joined
|
|||
moritz | nom: say pi.Rat(1e-14).perl | 07:22 | |
p6eval | nom d3471b: OUTPUT«62831853/20000000» | ||
moritz | nom: say pi.perl | ||
p6eval | nom d3471b: OUTPUT«3.14159265e0» | ||
sorear | niecza: say pi.Rat(1e-14).perl | 07:23 | |
p6eval | niecza v13-289-g69e36aa: OUTPUT«<58466453/18610450>» | ||
dalek | kudo/nom: 02d6448 | moritz++ | src/core/Duration.pm: more conversion methods in Duration |
||
ast: a6a06ef | moritz++ | S02-names/our.t: another small rakudo unfudge |
07:24 | ||
sorear | phenny: tell TimToady Perhaps (2/3).perl should return '+<2/3>' instead of '<2/3>' -- since the latter is actually RatStr not Rat | ||
phenny | sorear: I'll pass that on when TimToady is around. | ||
sorear | to everyone: I would like to see a better nailing-down of just what « and » are supposed to do | 07:27 | |
I get that «'$x' "$y"» is supposed to mean ('$x', $y), possibly with a val() call thrown in on $y | 07:28 | ||
I also get that «12 23» should be (val(12), val(23)) | |||
moritz | afaict they are supposed to parse the contents as a whitespace-delimited list of val-things, falling back to just plain strings if a piece can't be parsed | ||
sorear | and «$y» should be either map &val, $y.comb(/\S+/) or $y.comb(/\S+/) | 07:29 | |
moritz | the former, I think | ||
sorear | moritz: It's more than that. Internal quotes are supposed to affect behavior. | ||
moritz | sorear: doesn't val() handle string literals too? | 07:30 | |
ah, but probably not interpolation | |||
then you're right, it's more than just val | |||
sorear | val doing string literals feels wrong to me, because then how do you get at the original string? | 07:32 | |
moritz | hm, right | 07:33 | |
moritz -> commute | 07:34 | ||
masak | morning, #perl6 | ||
sorear | o/ masak | 07:36 | |
07:36
lutok joined
|
|||
dalek | ecs: 8e232ce | masak++ | S02-bits.pod: [S02] fix tiny typo |
07:42 | |
07:46
GlitchMr joined
07:47
fridim_ left
|
|||
masak | new S02: "In case multiple dispatch determines that it could dispatch as either string or number, a tie results, while may result in an ambiguous dispatch error." | 07:49 | |
so... it's not quite pure MI, but something else applied on top of it? | |||
geekosaur | "while may results in"? | 07:51 | |
er, result | |||
sorear | s/while/which/ | ||
masak: no, that's pure MI | 07:52 | ||
masak: our multiple dispatch doesn't respect C3 ordering | |||
masak | this is news to me. | 07:53 | |
masak patches the s/while/which/ typo | 07:54 | ||
dalek | ecs: 5675fe8 | masak++ | S02-bits.pod: [S02] fix another typo |
07:55 | |
masak | sorear: I'm pretty sure I've seen "C3MRO" sprinkled all over Rakudo's MOP. | 07:59 | |
08:05
jrockway_ left
08:06
jrockway joined
|
|||
sorear | masak: that's only used for method (single) dispatch | 08:09 | |
currently, all the multiple dispatch implementations in use require that candidates can be statically partial-ordered | 08:13 | ||
given :(Int $x) and :(Str $x), neither is more specific than the other | 08:14 | ||
I just came up with an extension of Perl 6 MMD to support C3, but it requires variable candidate ordering | |||
(my algorithm in a nutshell: A is more specific than B if A precedes B in the MRO of the value under consideration) | 08:15 | ||
moritz | nom: say Str.^methods() | ||
p6eval | nom 02d644: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split» | ||
moritz | nom: say Str.^methods(:all) | 08:16 | |
p6eval | nom 02d644: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split abs conjugate sqrt sign rand sin asin cos acos tan atan atan2… | ||
sorear | I wonder if it would be worth implementing this in niecza | 08:17 | |
(niecza already diverges slightly from Rakudo on MMD) | 08:18 | ||
masak | we definitely want to converge on MMD in the long run. | ||
but that doesn't mean we can't do some exploration now. | |||
sorear | perl6: class A {};class B is A {}; class C is B {}; multi foo(A,A){"AA"};multi foo(A,B){"AB"};multi foo(A,C){"AC"};multi foo(B,A){"BA"};multi foo(C,A){"CA"}; say foo(B,C) | 08:20 | |
p6eval | niecza v13-291-gca7eb73: OUTPUT«Unhandled exception: Ambiguous dispatch for &foo; matched candidates are: A, A A, B A, C B, A at /tmp/exlFcyxt46 line 1 (mainline @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3052 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.set… | ||
..rakudo 02d644: OUTPUT«AC» | |||
..pugs b927740: OUTPUT«***  Unexpected "A" expecting word character, "|", ":", "*", parameter name or ")" at /tmp/jMxCrHpfdc line 1, column 56» | |||
sorear is curious what masak's reaction to this example is | 08:23 | ||
masak | sorear: I think you've brought this up before. | ||
sorear | masak: yes, I have | 08:24 | |
I don't think *you* responded though | |||
also, I didn't have that great example before | |||
masak | and I'm tentatively in jnthn's camp, that while your way of doing MMD might sift out a few more ambiguous cases, it also loses some of the nice static features that Rakudo's MMD has. | ||
it's a good example in that it's short. it's still a bit artificial. :) | 08:25 | ||
the thing that's on the line here is static predictability. I don't consider that worth sacrificing for a few extra disambiguations in cases which are not use cases for anyone right now. | 08:26 | ||
08:38
hundskatt left
|
|||
sorear | masak: what do you mean by 'static predictability'? | 08:39 | |
08:40
satyavvd left
|
|||
masak | good question. :) jnthn explained over a beer once, and I've forgotten the details. | 08:41 | |
but it's to do with the type DAG that is computed for determining narrowness. | |||
every dispatch should fall out of the information in that DAG, and only that. | 08:42 | ||
sorear | um, where clauses | ||
moritz | modulo that, yes :-) | ||
masak | right :) | ||
sorear | the current niecza model does everything using a DAG too | ||
masak | oh, ok. | 08:43 | |
well, then you and jnthn have something to talk abou. | |||
about* | |||
sorear | the model I proposed at XX:15 requires the DAG to be recomputed every time, which is LTA | 08:44 | |
masak | ah -- and that must be what is meant by "static predictability" (or whatever the term was) | 08:45 | |
sorear | given class A { }; class B { }; class C is A is B { }; class D is B is A { }; | 08:46 | |
multi foo(A) { }; multi foo(B) { } | 08:47 | ||
which candidate is narrower? | |||
C and D both match both candidates | |||
but they have different C3 MROs | |||
if everything is decided based on a static DAG, C3 | |||
cannot be respected | |||
clear? | |||
masak | yes, I think so. | 08:49 | |
though I understand the example, I don't feel qualified to argue things one way or the other. | 08:50 | ||
moritz | same here | ||
masak | I'm wary about burning out jnthn though, and he didn't seem enthused by re-doing Rakudo's MMD again :) | ||
moritz | I think the real question is how to build the DAG in the case of method dispatch | ||
ie if you build a single DAG, or one per inheritance level | 08:51 | ||
and I think the spec has gone back and forth here a few times | |||
sorear | this change can implemented as a small patch | ||
moritz | and I don't remember what the current iteration says :-) | ||
sorear | basically, niecza keeps an int[] blockers; on each candidate | ||
08:51
drbean_ joined
|
|||
sorear | both rakudo and niecza linearize the DAG for fast access | 08:51 | |
and linearly scan for a matching candidate | 08:52 | ||
08:52
mj41 joined
|
|||
sorear | rakudo groups the candidate list into "levels", and declares a tie if there is a second match from the same level | 08:52 | |
niecza explicitly tracks which candidates tie which others | |||
if cand_A precedes cand_B in the list, but cand_A is not narrower than cand_B, then cand_A.blockers contains cand_B | 08:53 | ||
that was iff | |||
08:54
nornagest joined
|
|||
masak | meeting & | 08:58 | |
sorear | sleep & | 09:14 | |
moritz | fwiw I've written a script twice, once in p6 and once in p5. niecza took 4 seconds, perl 5 took 2.6s | 09:25 | |
09:26
dakkar joined
|
|||
tadzik | 'morning | 09:26 | |
jnthn | < sorear> the model I proposed at XX:15 requires the DAG to be recomputed every time, which is LTA | 09:27 | |
phenny | jnthn: 05:45Z <moritz> tell jnthn tests added | ||
jnthn | ==> then that model is broken. | ||
moritz: thanks! :) | |||
10:19 < moritz> I think the real question is how to build the DAG in the case of method dispatch | |||
10:19 < moritz> ie if you build a single DAG, or one per inheritance level | |||
10:20 < moritz> and I think the spec has gone back and forth here a few times | |||
moritz | jnthn: though it turns out we had a passing TODO to for it anyway | ||
s/to/test/ | |||
jnthn | ==> you build a DAG incorporating all candidates visible at the current level | 09:28 | |
(Which is differnt from a DAG per level with only the candidates at that level.) | |||
09:30
daxim joined
|
|||
jnthn | moritz: May be worth an autounfudge run, btw - I think there may be more tests dependent on the Role(42) thingy I implemented last night that I didn't find. | 09:37 | |
dalek | ast: 1d471ee | moritz++ | S05-metasyntax/angle-brackets.t: yet another rakudo unfudge |
||
moritz | jnthn: that's the result of the autounfudge run (which I forgot to push earlier) | 09:38 | |
jnthn | moritz: ah, ok :( | 09:39 | |
jnthn had hoped for more than that | |||
dalek | ast: ed909c2 | moritz++ | S16-filehandles/unlink.t: tweak a fudge message |
||
09:42
xinming left
09:44
xinming joined
|
|||
moritz | perl6: enum A <b c d>; say A(2) | 09:47 | |
p6eval | rakudo 02d644: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&A' called (line 1)» | ||
..niecza v13-291-gca7eb73: OUTPUT«A::d» | |||
..pugs b927740: OUTPUT«*** No such subroutine: "&enum" at /tmp/lyIYyJLyJj line 1, column 1-15» | |||
moritz | perl6: enum A <b c d>; say A.(2) | ||
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&enum" at /tmp/YKa43aP0EZ line 1, column 1-15» | ||
..rakudo 02d644, niecza v13-291-gca7eb73: OUTPUT«A::d» | |||
moritz | hm | ||
jnthn | std: enum A <b c d>; say A(2) | 09:56 | |
p6eval | std 13da5b0: OUTPUT«ok 00:01 108m» | ||
jnthn | Guess we have a missing check somewhere. | 09:57 | |
moritz | I guess that falls under the same coercive forms as Int("42") | 09:59 | |
jnthn | Yeah. | 10:00 | |
10:00
xinming left
10:01
xinming joined
|
|||
jnthn | moritz: Any chance you could ticket it? I'll try and fix those coercive forms soon...gotta focus on $dayjob for a bit now though. | 10:03 | |
moritz | jnthn: ok, will do | 10:04 | |
10:08
olanol joined
10:11
olanol left
10:19
nornagest left
|
|||
moritz | jnthn: turns out we already have a ticket for that: rt.perl.org/rt3//Ticket/Display.html?id=65658 | 10:33 | |
jnthn | moritz: ah, nice :) | 10:34 | |
moritz | (and tests!) | ||
jnthn | \o/ | 10:35 | |
Will see what tuits I get at le hotel this evening. :) | |||
...though I should probably spend them on that backtracking bug. | 10:37 | ||
10:39
xinming left,
xinming joined
10:42
spine_ joined
|
|||
moritz | what does the fix involve? when we parse Foo(), check if &Foo is in scope, and if not, but a type Foo is predeclared, change the codegen to invoke Foo instead of &Foo? | 10:42 | |
niecza: enum A <b c>; sub A($x) { $x }; say A(0) | 10:43 | ||
jnthn | moritz: I'm not sure quite how STD makes the distinction. | ||
p6eval | niecza v13-291-gca7eb73: OUTPUT«A::b» | ||
moritz | I'm pretty sure that's wrong | ||
jnthn | moritz: oh? | ||
moritz | <identifier>() should always decide in favor of the sub, no? | ||
jnthn | nom: enum A <b c>; sub A($x) { $x }; say A(0) | ||
p6eval | nom 02d644: OUTPUT«0» | ||
jnthn | moritz: Hm, even in the type case? | 10:44 | |
If so, then STD is wrong, but also Int($x) is dubious too. | |||
Unless we plan to go on "if there's a sub", but that's very problematic because subs are post-declared. | |||
moritz | ah, I mis-remembered | 10:46 | |
this disambiguation rules applies to the short name of enum *values* | 10:47 | ||
ie | |||
perl6: enum A <b c>; sub b() { 'sub' }; say b(); say b | |||
p6eval | rakudo 02d644: OUTPUT«subA::b» | ||
..niecza v13-291-gca7eb73: OUTPUT«Unhandled exception: No value for parameter $key in CommonEnum.postcircumfix:<( )> at /home/p6eval/niecza/lib/CORE.setting line 0 (CommonEnum.postcircumfix:<( )> @ 1)  at /tmp/f4au61f2Nq line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting… | |||
..pugs b927740: OUTPUT«*** No such subroutine: "&enum" at /tmp/pi5TszGbpz line 1, column 1-13» | |||
moritz opens niecza issue | 10:48 | ||
jnthn | aha | ||
10:49
arlinius left
10:50
arlinius joined
|
|||
moritz | std: Foo() | 10:51 | |
p6eval | std 13da5b0: OUTPUT«===SORRY!===Undeclared name: 'Foo' used at line 1Check failedFAILED 00:01 107m» | ||
moritz | std: foo() | ||
p6eval | std 13da5b0: OUTPUT«===SORRY!===Undeclared routine: 'foo' used at line 1Check failedFAILED 00:01 107m» | ||
moritz | std: Foo(); sub Foo() { } | 10:52 | |
p6eval | std 13da5b0: OUTPUT«ok 00:01 108m» | ||
10:54
xinming left,
xinming joined
10:58
nornagest joined
|
|||
felher | Here we go: rosettacode.org/wiki/Miller-Rabin_p...est#Perl_6 | 11:06 | |
moritz++ for enhancing the code :) | |||
moritz | felher++ for writing it; I just commented on trivialities | ||
masak | felher++ # nice use of subtypes | 11:07 | |
I'd've inlined that modexp sub, but that's probably just me ;) | 11:08 | ||
er, I mean I'd've put it inside the other sub. not eliminated it altogether. | 11:09 | ||
dalek | ast: dbb6654 | moritz++ | S03- (16 files): rename S03-operator/binding-*.t to S03-binding/*.t |
11:10 | |
kudo/nom: 8975299 | moritz++ | t/spectest.data: track test file renaming |
|||
ecza: ad5617d | moritz++ | t/spectest.data: track test file renaming |
11:12 | ||
11:14
stefanZ joined
|
|||
felher | masak: Yeah, i though about it, too. I didn't do it, because modexp is a utility function that is only in the file because we currently lack a math-module that handles it. Putting it in the function may suggest, that it is something that is special to that function (so special, that it won't get a module). But i totally see your point. I just couldn't really decide :) | 11:17 | |
11:19
dbr joined
|
|||
masak | rosettacode.org/wiki/Symmetric_difference#Perl_6 should have a solution involving sets, too. | 11:21 | |
felher | masak: right :) | 11:24 | |
moritz | felher: fwiw I've locally changed the call to modexp to the nqp::expmod_I opcode, and it reduced runtime from 9.3 seconds to 6.7..7.0s | 11:25 | |
though the call is a bit ugly: | |||
my $x = nqp::expmod_I(nqp::p6decont($a), nqp::p6decont($d), nqp::p6decont($n), Int); | |||
felher | moritz: Hm, nice :) | 11:26 | |
moritz | I'm pretty sure one can speed up things more by using a loop with native ints as iterators | 11:28 | |
jnthn | Pushed handouts fixes. | ||
er, oops | |||
ww | |||
moritz: libtommath seems to make quite a cost out of creating and freeing loads of mp_ints. | 11:31 | ||
moritz: If I get the tuits, I may see about maintaining a free list of them or something. | 11:32 | ||
moritz | felher: and if I rewrite the inner loop to use a native int as iterator, I get down to 5.4s | 11:35 | |
11:35
pothos_ joined,
jnthn joined
11:36
felher left,
kthakore joined,
HarryS left,
felher joined
11:37
chra joined
|
|||
felher | moritz: nice :) Quite a speedup :) | 11:37 | |
11:37
cooper left,
pothos left,
pothos_ is now known as pothos
|
|||
moritz | it looks a bit ugly though | 11:37 | |
11:37
cooper joined
|
|||
moritz | that's the thing I'd do in a math library, not on a show-off page like rosettacode :-) | 11:37 | |
11:38
HarryS joined
|
|||
felher | moritz: yeah :D | 11:38 | |
11:38
jasonmay joined
|
|||
felher | moritz: gist of the loop? :) | 11:38 | |
11:40
c1sung left,
Maddingue left,
xinming left,
Maddingue joined,
cognominal left,
cognominal joined,
c1sung joined
11:43
zjmarlow left
|
|||
colomon | o/ | 11:54 | |
phenny | colomon: 05:00Z <sorear> tell colomon The root problem is the proto in JSON::Tiny. Importing modules that import modules that export protos is broken, and that proto is wrong anyway; it should be an only sub | ||
colomon: 05:02Z <sorear> tell colomon (it appears to be alpha code, in terms of the contents of the proto) | |||
colomon: 06:08Z <sorear> tell colomon The niecza issue is now fixed | |||
11:55
lestrrat left,
lestrrat joined,
nornagest_ joined,
nornagest_ left
11:59
zjmarlow joined,
nornagest left
12:12
bluescreen10 joined
12:13
xinming joined
|
|||
colomon | niecza: say $*CWD | 12:26 | |
p6eval | niecza v13-291-gca7eb73: OUTPUT«Any()» | ||
12:26
lichtkind joined
|
|||
moritz | felher: gist.github.com/75b078d082ce95d5972a | 12:39 | |
jnthn | moritz: my int $max = nqp::unbox_i($s); | ||
...did you need that explicit unbox? | |||
If you did, and it generates different code without it, then it's a Rakudo bug. | 12:40 | ||
moritz | jnthn: it's not needed, but iirc we emit a vtable call otherwise | ||
jnthn | moritz: I thought I fixed that once... | ||
moritz | jnthn: ah, maybe my information is outdated | ||
jnthn | darn | 12:41 | |
no, you're right :/ | |||
QAST is going to have language-configurable coercion, to solve this once and for all. | 12:42 | ||
12:42
bluescreen10 left
12:45
sftp left
12:46
sftp joined
12:48
bluescreen10 joined
12:50
donri joined
12:53
xinming left
|
|||
moritz | jnthn: well, what should it compile to? | 12:56 | |
just an unbox? | |||
or type check + unbox? | |||
jnthn | An unbox is a type check in a sense. | 12:57 | |
If it fails to unbox, it's not assignable. | |||
nom: nqp::unbox_i('lol') | |||
p6eval | nom 897529: OUTPUT«This type cannot unbox to a native integer in block <anon> at /tmp/jRi65R2Cgi:1 in <anon> at /tmp/jRi65R2Cgi:1» | ||
dalek | ecza: 3649559 | (Solomon Foster)++ | lib/ (2 files): cwd plus crude implementations of $*CWD, chdir. |
12:59 | |
ecza: 49b1577 | (Solomon Foster)++ | t/spectest.data: Turn on S28-named-variables/cwd.t. |
|||
colomon | phenny: tell sorear $*CWD is a complete hack and chdir isn't catching exceptions properly -- but never-the-less both are there enough to be useful atm | 13:00 | |
phenny | colomon: I'll pass that on when sorear is around. | ||
dalek | kudo/nom: 0ac25d0 | jnthn++ | src/core/ (2 files): First cut implementation of <prior>; seems to work, but sadly not for the m/.../ form. |
13:08 | |
jnthn | Just had time for that quick hack before I head to the station. Feel free to improve it. | ||
travel to Gothenburg & | |||
13:10
xinming joined
13:16
mtk joined
13:17
am0c_ joined
13:23
GlitchMr left,
drbean_ left
13:27
molaf joined
13:28
Chillance joined
13:29
drbean_ joined
|
|||
colomon | roast has no tests for cwd or printf. :( | 13:30 | |
moritz | well, sprintf is much easier to test :-) | 13:31 | |
colomon | granted | ||
dalek | ecza: b11c7b5 | (Solomon Foster)++ | lib/CORE.setting: Wholesale theft of printf from Rakudo. |
13:32 | |
13:33
drbean_ left
13:41
xinming left
13:47
kaleem left
|
|||
PerlJam | greetings | 13:47 | |
colomon | o/ | 13:48 | |
masak | \o | ||
moritz | -o- | 13:49 | |
13:49
am0c_ left
|
|||
PerlJam | starting to look like semaphores :) | 13:49 | |
dalek | ecza: 64527c0 | (Solomon Foster)++ | lib/CORE.setting: Rearrange chdir a bit, it doesn't actually work any better, alas. |
13:51 | |
felher | moritz: interesting, thnx :) | 14:02 | |
14:12
overrosy left
14:13
overrosy joined
14:18
mikemol joined
14:22
Chillance left,
Chillance joined
14:36
agentzh left
14:38
muixirt joined
|
|||
muixirt | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; my @a3=@a2[1 ..^ @a2] | 14:40 | |
p6eval | nom 0ac25d: OUTPUT«(timeout)» | 14:41 | |
moritz | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; say 'alive' | ||
p6eval | nom 0ac25d: OUTPUT«alive» | ||
moritz | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; say @a2; say 1..^@a2 | 14:42 | |
p6eval | nom 0ac25d: OUTPUT«3 41..^[3, 4]» | ||
muixirt | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; say @a2; say 1..^@a2.elems | 14:43 | |
p6eval | nom 0ac25d: OUTPUT«3 41..^2» | ||
masak doesn't like "1..^[3, 4]" | 14:44 | ||
muixirt | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; my @a3=@a2[1 ..^ @a2.elems]; say 'alive' | ||
p6eval | nom 0ac25d: OUTPUT«alive» | ||
moritz | nom: my @a1=1,2,3,4; my @a2=@a1[2 ..^ @a1]; say @a2; (1..^@a2).list | ||
p6eval | nom 0ac25d: OUTPUT«3 4» | ||
14:48
mikemol left
14:49
mikemol joined,
tokuhirom joined
14:52
benabik joined,
PacoAir joined
14:56
xinming joined
14:58
cognominal left
14:59
nornagest joined
|
|||
masak | what's the word on :instanceof in Parrot? | 14:59 | |
will Parrot release with or without it? | |||
moritz | with; the commit has been reverted | ||
15:00
cognominal joined
15:02
xinming left
|
|||
masak | \o/ | 15:02 | |
15:12
xinming joined
15:16
wtw left
15:19
xinming left
15:20
xinming joined
15:24
xinming left,
xinming_ joined
15:26
sayu joined
15:30
skids joined
15:31
xinming_ left,
xinming joined
15:36
xinming left
|
|||
flussence successfully saves nyan cat from crash land | 15:39 | ||
15:46
xinming joined,
xinming left
15:47
GlitchMr joined
15:48
xinming joined
15:50
xinming left,
xinming joined
|
|||
masak | quiet here today. everybody's holding their breath for Parrot 4.0.0, p'haps? | 15:53 | |
16:03
thou joined
|
|||
skids | jnthn++ for fixing regexp make and $/ in block. That was a blocker for my dabblings. | 16:04 | |
16:04
nnunley left
16:05
sayu left
|
|||
skids | .oO(its a good thing I don't have a commit bit judging by how many times I accidentally told git to try to push to rakudo/rakudo while trying to fast forward my github fork.) |
16:12 | |
muixirt | masak: oh, everybody is waiting for big enhancements in Parrot 4.0.0? | 16:19 | |
muixirt wasn't aware of that... | |||
16:20
nebuchadnezzar left
|
|||
colomon | muixirt: not that I'm aware of | 16:20 | |
benabik | There tends to be a lull in Rakudo around Parrot's release in preparation for its own release. | 16:21 | |
colomon | jnthn's traveling right now, that's my explanation. | 16:22 | |
and sorear's asleep. ;) | 16:23 | ||
masak | muixirt: I wasn't entirely serious. at least I don't think I was. :) | ||
muixirt keeps a straight face | |||
masak | :| | 16:24 | |
muixirt | but benabik++, moritz++ and others for updating the links | 16:25 | |
masak: do you have an explanation for the ..^@a hang ups? | 16:27 | ||
masak | muixirt: I don't. | ||
seems the @a doesn't get numified, and that causes problems in some loop or other. | 16:28 | ||
but that much is obvious. | |||
muixirt | on the bright side: it doesn't eat up memory :-) | ||
masak | \o/ | ||
16:30
hundskatt joined
16:33
nebuchadnezzar joined
16:35
zjmarlow left
|
|||
jnthn makes it to Gothenburg | 16:37 | ||
Train was on time! o.O | |||
16:37
tokuhirom left
|
|||
colomon | \o/ | 16:39 | |
16:40
jferrero joined
16:51
stefanZ left
|
|||
masak | jnthn: just you wait until the snow arrives... :) | 16:58 | |
masak decommutes | |||
17:00
birdwindupbird left
17:01
jerome_ joined
17:03
cognominal_ joined
17:04
cognominal left
|
|||
[Coke] kicks off the daily run. | 17:08 | ||
17:11
localhost left
17:12
ggoebel_ joined
17:14
kaleem joined
|
|||
ggoebel_ | perl6: 'Happy Easter'.say | 17:15 | |
p6eval | pugs b927740, rakudo 0ac25d, niecza v13-296-g64527c0: OUTPUT«Happy Easter» | ||
ggoebel_ | glad to see the distributions lifting each other to greater heights | ||
PerlJam | you're a little early for easter :) | ||
ggoebel_ | perhaps it is time for perl6.org/compilers/ to be updated? "not yet well realized" no longer seems to apply to Niecza | 17:16 | |
[Coke] | PerlJam: easter is a reference to niecza beating rakudo in the spec tests. | 17:17 | |
ggoebel_ | And here I thought I was late ;-) | ||
[Coke] | for one apparently brief moment. ;) | ||
17:18
Chillance left
|
|||
ggoebel_ | looks forward to celebrating Easter every other day... | 17:18 | |
PerlJam | ggoebel++ | ||
17:19
HarryS left
17:20
HarryS joined
17:23
cognominal___ joined
17:26
cognominal_ left
17:27
BinGOs left,
jerome_ left
17:31
fridim_ joined
17:32
daxim left
17:33
BinGOs joined
|
|||
dalek | href="https://perl6.org:">perl6.org: 042d48e | moritz++ | source/compilers/index.html: be less pessimistic about niecza. ggoebel++ |
17:35 | |
17:35
bluescreen10 left
17:38
ggoebel_ left
17:40
ocharles left
17:42
ocharles joined
17:45
lichtkind_ joined,
lichtkind left,
lichtkind_ is now known as lichtkind
17:46
mj41 left
|
|||
tadzik | 'evening | 17:46 | |
sorear | good * #perl6 | 17:47 | |
phenny | sorear: 13:00Z <colomon> tell sorear $*CWD is a complete hack and chdir isn't catching exceptions properly -- but never-the-less both are there enough to be useful atm | ||
colomon | \o | ||
TimToady | vv probably | 17:48 | |
phenny | TimToady: 07:24Z <sorear> tell TimToady Perhaps (2/3).perl should return '+<2/3>' instead of '<2/3>' -- since the latter is actually RatStr not Rat | ||
17:48
ocharles left
|
|||
TimToady | but then maybe (2/3) is good enuf | 17:48 | |
since other .perl emissions seem to rely on some degree of constant folding and/or construction | 17:49 | ||
17:49
ocharles joined
17:50
bluescreen10 joined
|
|||
TimToady | or maybe we need a rule that says spaceless <> constructs throw away the Str component | 17:50 | |
so <2/3> and <1+2i> are really special forms | 17:51 | ||
colomon | +1 | ||
17:51
spine_ left
|
|||
colomon thought that's the way it was going to work originally.... ;) | 17:52 | ||
17:52
dakkar left
|
|||
TimToady | the main oddity of that is that ~<2/3> makes .66666666 while ~< 2/3 > makes 2/3 | 17:53 | |
but we could probably live with that | |||
sorear: opinions? ^^ | |||
17:53
fridim_ left
|
|||
TimToady | sorear: certainties? ^^ :) | 17:53 | |
sorear | I think I could live with that | 17:54 | |
would <abc> continue to be allowed? | |||
17:55
alester joined
|
|||
TimToady | sure | 17:55 | |
and if we allow enums in val, don't apply the rule to those, I think | |||
that is, <False> woudl stay a string | 17:56 | ||
[Coke] | b: say 19223-19135 ; # niecza at 99.54% | ||
p6eval | b 1b7dd1: OUTPUT«88» | ||
17:57
ocharles left
|
|||
[Coke] | rakudo has 27 more failures than it did yesterday. | 17:57 | |
TimToady | I've been looking at rosettacode.org/wiki/Miller-Rabin_p...est#Perl_6 and wondering how close our optimizers are to moving $n - 1 out of the loop as effectively nonmutating | ||
jnthn | [Coke]: ugh, I thought I'd cleared up the regressions last night :/ | ||
17:57
BinGOs left
|
|||
moritz | my last spectest run showed a single failure, in t/spec/S12-methods/multi.rakudo | 17:58 | |
17:58
ocharles joined
|
|||
TimToady | it's interesting that the Perl 6 code follows the pseudocode so closely at the beginning, but I suspect right now an implementation that precalculated $n - 1 would be significantly faster | 17:58 | |
and maybe 1 | $n - 1 as well | |||
jnthn | TimToady: The underlying variable analysis that would support such a transformation is relatively high on my optimizer todo list. But the optimizer todo list is just one of my todo lists. :) | 17:59 | |
[Coke] | moritz: we're up to 57 total. | ||
gist.github.com/1476841 | 18:00 | ||
jnthn | [Coke]: Platform? | ||
[Coke] | feather | ||
jnthn | k | ||
[Coke] | 32bit linux mumble. | ||
TimToady | jnthn: I have a great appreciation for your todo lists, and for how often you mutate them :) | 18:01 | |
[Coke] | hurm. maybe not? Linux feather 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 GNU/Linux | ||
18:01
zby_home_ joined
|
|||
[Coke] | jnthn: feather.perl6.nl/~coke/rakudo_summary.txt | 18:01 | |
... wait a sec. | 18:02 | ||
feather.perl6.nl/~coke/rakudo_summary.out , sorry. | |||
jnthn wonders why his hotel room is so hot when outside it's below freezing. | |||
moritz | oh drat, the overflow tests are platform dependent | 18:03 | |
jnthn | Very. Some fail here too. | ||
Though less than before. | |||
[Coke] | moritz: yah, we knew this already. | 18:04 | |
18:04
BinGOs joined
|
|||
moritz | jnthn: maybe the constant folder changed that? | 18:04 | |
or isn't that wired up for those cases yet? | |||
jnthn | moritz: The only place it's wired up is for enums | 18:05 | |
18:06
ocharles left
|
|||
TimToady | perl6: (1 .. 1_000_000_000_000).pick(5).say # another potential problem with the Miller-Rabin code | 18:07 | |
moritz | nom: try { die "foo" }; say so $! ~~ /foo/ | ||
p6eval | niecza v13-296-g64527c0: OUTPUT«(timeout)» | ||
..pugs b927740: OUTPUT«pugs: out of memory (requested 1048576 bytes)» | |||
..rakudo 0ac25d: OUTPUT«Failed allocation of 4096 bytesParrot VM: PANIC: Out of mem!C file src/gc/alloc_memory.c, line 105Parrot file (not available), line (not available)We highly suggest you notify the Parrot team if you have not been working onParrot. Use parrotbug (located in p… | |||
nom 0ac25d: OUTPUT«Method 'substr' not found for invocant of class 'Exception' in method Str at src/gen/CORE.setting:7276 in method Stringy at src/gen/CORE.setting:678 in sub prefix:<~> at src/gen/CORE.setting:961 in method ACCEPTS at src/gen/CORE.setting:7437 in block <anon> … | |||
moritz | TimToady: oh, that one should be easy to fix | 18:08 | |
TimToady | I think .pick needs to switch to a different algorithm for large ranges and small selections | ||
18:08
ocharles joined
|
|||
tadzik | perl6: (1 .. 1_000_000_000_000).roll(5).say | 18:09 | |
TimToady | that's actually what MR specifies | ||
moritz | jnthn: that seems to be the problem, the regex engine now calls .substr on the topic instead of coercing it to Str first | ||
p6eval | niecza v13-296-g64527c0: OUTPUT«(timeout)» | ||
..pugs b927740: OUTPUT«pugs: out of memory (requested 1048576 bytes)» | |||
..rakudo 0ac25d: OUTPUT«Failed allocation of 4096 bytesParrot VM: PANIC: Out of mem!C file src/gc/alloc_memory.c, line 105Parrot file (not available), line (not available)We highly suggest you notify the Parrot team if you have not been working onParrot. Use parrotbug (located in p… | |||
18:09
itz left
|
|||
TimToady | it doesn't say you can't pick the same number twice, at least according to the pseudocode | 18:09 | |
moritz | now for .roll there's really no reason to evaluate the list at all | 18:10 | |
TimToady | yes, .roll should just work | ||
tadzik | looks like my roll optimization was not ported to nom | ||
TimToady | but .pick can also be made to work by filtering out previously seen values | ||
moritz | aye | ||
18:11
fridim_ joined
|
|||
jnthn | moritz: oops, which patch did I do that in? | 18:11 | |
TimToady | interestingly, using .pick in the MR code gives you more certainty for smaller candidates, since it exhausts the set of possible composites faster | ||
and if $k is big enough, considers each candidate once | 18:12 | ||
but .pick should degrade gracefully when possible | |||
18:12
Chillance joined
|
|||
felher | Yes, i used pick because it doesn't make sense to pick things twice. | 18:13 | |
TimToady | but the pseudocode does :) | ||
moritz | tadzik: I'll backport your Range.roll thingy | ||
tadzik | ++moritz | ||
that was my first patch, I think :) | |||
felher | TimToady: indeed. Yeah, maybe one should change that. I don't have any time right now. If someone wants to do it, go ahead. Otherwise i will look at it as soon as i'm home :) | 18:14 | |
TimToady | also been thinking about how $x == 1 or $x == $n - 1 is or is not equivalent to $x == 1 | $n - 1 or to not( 1 < $x < $n - 1 ) or to not( $x ~~ 1 ^..^ $n -1 ) | 18:15 | |
and whether all those can be optimized to whatever is fastest | |||
oh, there's also 1 != $x != $n - 1 I imagine | 18:16 | ||
18:17
fridim_ left
|
|||
TimToady | felher: but the .pick reads better, and is arguably more correct :) | 18:17 | |
18:19
_dbr joined
18:20
dbr left
18:21
cognominal___ left
|
|||
TimToady | felher: I agree with your reasoning on leaving modexp outside too | 18:21 | |
18:22
cognominal joined
|
|||
TimToady | masak: re irclog.perlgeek.de/perl6/2012-01-17#i_5002372, that's one of the reasons I was writing the new Set.pm I gisted a while ago | 18:23 | |
felher fehler is to busy to answer, but will backlog :) | 18:24 | ||
TimToady | and the next optimization is probably to run each of the $k tests in a separate core :) | 18:25 | |
that would probably be worth adding a second entry; leaving the first as a beautiful translation of the pseudocode | 18:26 | ||
(and you guys think libtommath produces garbage fast with one core... :) | 18:27 | ||
I still think we're likely to see pointer robbing for smallish integers on any VM that can support it, for just this reason | 18:28 | ||
.o(Crook: "It's not really stealing; they'll never miss it...") | 18:29 | ||
actually, I think the parallel version should (eventually) simply work from saying "hyper for (2 ..^ $n).pick($k)" | 18:32 | ||
any core can falsify by returning False, but True is returned only if all the core's threads terminate for the hyper statement's sequence point | 18:34 | ||
that would be | |||
Way Cool | |||
18:34
kaleem left
|
|||
moritz | is it 'sink hyper for' or 'hyper sink for'? | 18:34 | |
TimToady | sink hyper | 18:35 | |
but the sink is implied by not being the final statement | |||
18:35
kaleem joined
|
|||
jnthn | dinner & | 18:35 | |
TimToady | and it might eventually be a common optimization to throw an implicit hyper on the front of any loop statement that provably does not have interactions from one iteration to the next | 18:37 | |
masak | TimToady: oh! I wish I had time to help you debug your Set.pm -- it looked like a really good start. | 18:42 | |
18:43
Bucciarati left
|
|||
masak | TimToady: is 'hyper' a special form? I don't really see how it can have the effect it does on for. | 18:55 | |
moritz | masak: remember that 'for' is just a call to map, really | 18:56 | |
masak: so it returns a lazy list | |||
masak: and 'hyper @lazy_list' can does its non-lazy magic | |||
dalek | ecs: ea9fd14 | larry++ | S13-overloading.pod: imported multis automatically re-export The rationale is to get as close as we can to "global MMD" without sacrificing lexically static candidate lists. |
18:57 | |
TimToady | remember also that "hyper" is just a modified form of "eager" | ||
"so eager we don't care which parts of it you do first" | 18:58 | ||
perl6: say hyper 1 ... 5 | 18:59 | ||
p6eval | rakudo 0ac25d: OUTPUT«===SORRY!===CHECK FAILED:Calling 'hyper' will never work with argument types (Mu) (line 1) Expected any of: :(Any \$op, Any \$a, Any \$b, Any :dwim-left(:$dwim-left), Any :dwim-right(:$dwim-right)) :(Any \$op, Any \$obj) :(Any \$op, Associative \$… | ||
..niecza v13-296-g64527c0: OUTPUT«Unhandled exception: No value for parameter $dwimr in hyper at /home/p6eval/niecza/lib/CORE.setting line 0 (hyper @ 1)  at /tmp/UFoAu_cWoD line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3068 (ANON @ 3)  at /home/p6eval/niecza/… | |||
..pugs b927740: OUTPUT«***  Unexpected "5" expecting operator, ":" or "," at /tmp/MhB6RWVPXZ line 1, column 17» | |||
TimToady | wow | 19:00 | |
perl6: say eager 1,2,3,4,5 | |||
p6eval | pugs b927740: OUTPUT«12345» | ||
..niecza v13-296-g64527c0: OUTPUT«===SORRY!===Undeclared routine: 'eager' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2)  at /home/p6eval/niecza/src/STD.pm6 line 1144 (P6.comp_unit @ 32)  at /ho… | |||
..rakudo 0ac25d: OUTPUT«1 2 3 4 5» | |||
TimToady | pugs: say hyper 1,2,3,4,5 | 19:01 | |
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&hyper" at /tmp/CyReSqHviX line 1, column 5 - line 2, column 1» | ||
dalek | kudo/nom: aa1d8b6 | moritz++ | src/core/Range.pm: optimize Range.roll, and Range.pick if the number of range elems is much larger than the number of elements to pick |
19:03 | |
ast: b896f6d | moritz++ | S32-list/ (2 files): tests for Range.roll and .pick |
|||
[Coke] | huh.rakudo autounfudge run hangs on t/spec/S02-types/mixed_multi_dimensional.rakudo during the actual call to "fudge" | ||
masak | EMULTIDIMENSIONALFUDGE | 19:06 | |
moritz | [Coke]: I've had hangs in fudge before, but they are rare | 19:07 | |
19:11
Trashlord left
19:13
spine joined
19:15
Trashlord joined
19:19
birdwindupbird joined
|
|||
[Coke] tries just a subset in a higher synopsis. | 19:20 | ||
moritz: have you autounfudged lately? | 19:21 | ||
(if so, I won't bother.) | |||
moritz | [Coke]: yes | ||
[Coke] | ok. | ||
masak | perl6: { our sub foo { say "OH HAI" } }; our &foo; foo | 19:22 | |
p6eval | rakudo 0ac25d, niecza v13-296-g64527c0: OUTPUT«OH HAI» | ||
..pugs b927740: OUTPUT«*** Cannot use Undef as a Code object at /tmp/b1ToOCQhas line 1, column 45 - line 2, column 1» | |||
masak | perl6: { our sub foo { say "OH HAI" } }; { our sub foo { say "OH HAI again" } }; our &foo; foo | 19:23 | |
p6eval | pugs b927740: OUTPUT«*** Cannot use Undef as a Code object at /tmp/WbeTpy39he line 1, column 85 - line 2, column 1» | ||
..niecza v13-296-g64527c0: OUTPUT«===SORRY!===Two definitions found for symbol ::GLOBAL::&foo first at ??? line 0 second at ??? line 0 at /tmp/kEDMC3OaDH line 1:------> b foo { say "OH HAI" } }; { our sub foo ⏏{ say "OH HAI again" } }; our &foo; fo… | |||
..rakudo 0ac25d: OUTPUT«OH HAI again» | |||
masak | rakudobug? | ||
moritz | std: { our sub foo { say "OH HAI" } }; our &foo; foo | 19:24 | |
p6eval | std 13da5b0: OUTPUT«===SORRY!===Illegal redeclaration of routine 'GLOBAL::<&foo>' (from line 1) at /tmp/NIvKzhGKZg line 1:------> our sub foo { say "OH HAI" } }; our &foo⏏; fooCheck failedFAILED 00:01 113m» | ||
moritz | seems like yes | ||
19:24
x3nU left
|
|||
masak | not the one I meant, but sure. :) | 19:24 | |
if STD is correct, then it's a nieczabug too. | 19:25 | ||
moritz | I don't think STD makes sense. | ||
either rakudo or niecza | |||
19:26
_ilbot joined,
Trashlord left
|
|||
moritz | it seems I've broken Range.pick for many cases :( | 19:27 | |
TimToady | yes, STD is being too strict there, and isn't distinguishing declaration from definition | 19:29 | |
masak | ah, so no nieczabug. | ||
but rakudo allows the second 'our sub foo' to overwrite the first. | |||
TimToady | in fact, niecza++ is being very accurate in detecting two *definitions* | ||
19:29
x3nU joined
|
|||
masak submits rakudobug | 19:29 | ||
sorear: "line 0"? | 19:33 | ||
moritz | can somebody on a recent-ish rakudo build please tell me how large their src/gen/CORE.setting.pir is? | 19:35 | |
w 19 | |||
sorry | |||
masak hugs silly irssi user moritz! :D | 19:36 | ||
[Coke] | 281562L | ||
tadzik | moritz: 14Msrc/nom/src/gen/CORE.setting.pir | ||
[Coke] | that's < 1 hour old. | ||
tadzik | 14 MB I guess | ||
moritz | tadzik: thanks | ||
[Coke]: also thanks | |||
[Coke] | 281562 991826 13849492 src/gen/CORE.setting.pir # wc output. | 19:37 | |
TimToady | perl6: my $d = Duration.new(1/2); sleep $d | 19:39 | |
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&Duration" at /tmp/hkzbbEWazS line 1, column 4-26» | ||
..rakudo aa1d8b: OUTPUT«This type cannot unbox to a native number in <anon> at src/gen/Metamodel.pm:2674 in sub sleep at src/gen/CORE.setting:496 in block <anon> at /tmp/lH41l6Pcxg:1 in <anon> at /tmp/lH41l6Pcxg:1» | |||
..niecza v13-296-g64527c0: OUTPUT«===SORRY!===Undeclared name: 'Duration' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2)  at /home/p6eval/niecza/src/STD.pm6 line 1144 (P6.comp_unit @ 32)  at /ho… | |||
TimToady | well, nom is closer... | 19:40 | |
nom: my $later = now + 1; sleep $later - now; # more to the point | 19:42 | ||
p6eval | nom aa1d8b: OUTPUT«This type cannot unbox to a native number in <anon> at src/gen/Metamodel.pm:2674 in sub sleep at src/gen/CORE.setting:496 in block <anon> at /tmp/VQEpGWqiKx:1 in <anon> at /tmp/VQEpGWqiKx:1» | ||
19:42
overrosy left,
mj41 joined
19:44
overrosy joined
19:46
molaf left
19:47
MayDaniel joined
|
|||
jnthn | om nom | 19:52 | |
masak | jnthn: eating? :) | ||
jnthn | eated :) | 19:55 | |
19:56
mattp_ left
|
|||
jnthn | perl6: { our $x = 42 }; { our $x = 43; } | 19:56 | |
p6eval | pugs b927740, rakudo aa1d8b, niecza v13-296-g64527c0: ( no output ) | ||
jnthn | So...why is that declaration OK, but the sub one not? | ||
sorear | masak: ??? line 0 means "unknown" ... might be worth adding a special case to the printer | 19:57 | |
jnthn: Because 'our $x' has COMMON semantics | |||
and the = 42 isn't really part of the declarator | |||
jnthn | heh | ||
yeah, assignments aren't part of declarators...apart from the majority of situations when they are :) | 19:58 | ||
jnthn still hopes STD changes the way it parses those. | |||
sorear: COMMON - is that a spec term? | 19:59 | ||
sorear | No, it's a FORTRAN term | ||
so, now you expect *consistency*? you're so difficult :p | |||
jnthn | Oh. The only FORTRAN I did was fixing some physicists attempt to write it. :) | 20:00 | |
It got it to work, but it was probably as much luck as judgement. :) | |||
sorear | I've never actually written any FORTRAN | 20:02 | |
TimToady | our is supposed to do the initialization at INIT time, and should probably ensure that the values are eqv at that point | 20:03 | |
slavik | fortran looks very similar to C | ||
although I realize that is a redundant statement | 20:04 | ||
geekosaur | except it's not really fortran COMMON, or all your "our"s would have to be in the same order in every file using them (or at least overlap sensibly) | ||
masak | sorear: ah. | 20:05 | |
PerlJam | What's that saying? "You haven't lived until you've done X"? In this case, it's more like "you haven't died a little until you've written fortran" :) | 20:08 | |
geekosaur | but then "you can write FORTRAN in any language"... | 20:09 | |
doy | i worked on a c project once that was ported from fortran | ||
contained a file block_data.c with ~500 lines of global variable declarations | |||
PerlJam | when I first met pmichaud, he had converted a 90-ish page fortran program to about a 2 page perl program. | 20:10 | |
(that's the only allowable fortran operation ... getting rid of it) | |||
felher is back. | 20:15 | ||
sorear | hola, felher | 20:16 | |
felher | So about the pick/roll issue. Do we prefer translation of the pseudo-code to using pick? | ||
TimToady | there's a choice to make if declarators parse their pseudoassignment; either the declarator has to detect assignment to a tighter operator on the left, or it has to be an assymetric precedence loosener like a listop | 20:17 | |
felher | Also i like to change the 'or's to '|' as TimToady mentioned. I really like '|', just didn't think of it when writing the code :) | 20:18 | |
TimToady | I prefer pick because in some sense it's even smarter than the standard algorithm, which can duplicate work | 20:19 | |
(though mostly only for small candidates) | |||
20:19
zjmarlow joined
|
|||
sorear | TimToady: you are speaking of the 5 * constant $x = 2 funny business? | 20:20 | |
TimToady | though there may be intermediate values where it's more overhead to tracked which values have been tried than to just use roll semantics | ||
yes, though in this case the subject is 'our' | |||
20:21
thou left,
thou joined
|
|||
TimToady | it looks hard to tell the term what its leftward context is, so I'm inclined to just make it drop precedence to = level | 20:21 | |
it's kinda what people will expect half the time anyway | 20:22 | ||
20:23
MayDaniel left
|
|||
felher | Okay. So i just use the junctive-ors. I like them. Nobody would say "if the car is blue or the car is red or the car green". Everybody just says "if the car is red, green or blue" :) | 20:25 | |
TimToady | and we already do it that way for s[foo] = 'bar' | ||
the only difference being that in sibble, the assignment is not optional | 20:29 | ||
dalek | ast: 2fae5d6 | moritz++ | S32-list/ (2 files): more Range.{roll,pick} tests |
20:31 | |
kudo/nom: 0deac24 | moritz++ | src/core/control.pm: try to fix sleep() with non-Num argument |
|||
kudo/nom: 2fd18f4 | moritz++ | src/core/Range.pm: fix Range.{roll,pick} |
|||
masak | what, if anything, does 'sibble' stand for? | 20:36 | |
tadzik | Super Nibble! | 20:37 | |
benabik | Wikipedia: Sibble is a locality situated in Botkyrka Municipality, Stockholm County, Sweden with 280 inhabitants in 2005. | ||
masak | heh. | ||
felher | wow, using "$x == 1 | $n - 1" instead of "$x == 1 or $n - 1" triples execution-time for MR in nom. | ||
PerlJam | that's not surprising (to me) | 20:38 | |
masak | felher: not surprized. | ||
TimToady | it has to reconstruct the junction each time | ||
which is why I thought about factoring that out along with the $n - 1 | |||
jnthn | masak: Wow, that must be the 10th biggest city in Sweden or something! :) | ||
tadzik | :> | ||
TimToady | and why I was thinking about all the other forms of comparison that it could be optimized to | ||
masak: it's for substitution nibble | 20:39 | ||
masak | aha! | ||
TimToady | to go with tribble, etc | ||
masak | jnthn: you laugh now, but one day small hamlets will take over the world. mwhahaha. | 20:40 | |
jnthn | masak: A hamlet sounds like a cute little ham. :) | ||
felher | Hm, then maybe changing 'or's to '|'s should wait until its faster. Although it is nicer, there may be people to try that code and ^C it after 20 seconds... :) | 20:41 | |
TimToady | and a bullet is a cute little bull | 20:42 | |
masak | or a cute little bul | ||
felher: use the fast version and add a comment. | |||
jnthn | Well, I don't really want a bull or a bullet coming at me :) | 20:43 | |
20:44
kaare__ joined
|
|||
TimToady considers jnthn's feelings and omits pun on seeing red... | 20:44 | ||
jnthn | :) | ||
20:47
kaare__ left,
kaare_ joined,
birdwindupbird left,
kaleem left
|
|||
jnthn | Gee, Pm wasn't joking when he said getting this backtracking into subrules in place would be tricky... | 20:48 | |
masak | well, I guess subrules are methods. then it's tricky simply because that method has already returned and now it needs to be resumed. | 20:58 | |
at least conceptually. | |||
jnthn | omgz, I think it...might have just worked or something | 20:59 | |
masak | o.O | ||
[Coke] | jnthn++ | 21:00 | |
dalek | ast: 7176c48 | coke++ | S (6 files): niecza (auto)unfudge |
21:01 | |
felher | masak: done :) | ||
felher goes back to $job | |||
dalek | p: 08e07d7 | jonathan++ | src/Q (2 files): First crack at getting backtracking into subrules working. Needs testing with Rakudo yet. |
21:03 | |
masak | felher++ | ||
sorear | TimToady: so... «». which shell is it supposed to emulate? :-) | 21:04 | |
jnthn | sorear: How about cmd.exe on Windows? ;-) | 21:05 | |
</windows_trolling> | 21:06 | ||
sorear | .oO( my $x; say « foo %x% bar » |
||
) | |||
21:07
GlitchMr left
|
|||
jnthn | There will be modules. | 21:08 | |
masak | :) | 21:11 | |
jnthn | nom: say ('aaaaabaaaaa' ~~ /^(<[a..z]>*) b/) | 21:12 | |
p6eval | nom 2fd18f: OUTPUT«#<failed match>» | ||
jnthn | Locally: | ||
> say ('aaaaabaaaaa' ~~ /^(<[a..z]>*) b/) | |||
=> <aaaaab> 0 => <aaaaa> | |||
tadzik | nice :) | 21:14 | |
sorear | jnthn++ jnthn++ | 21:15 | |
jnthn | oh, I had a question | 21:16 | |
/(.)($0)/ | |||
Should that match e.g. 'aa' | |||
niecza: say 'aa' ~~ /(.)($0)/ | |||
p6eval | niecza v13-296-g64527c0: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 979 (warn @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 188 (Mu.Str @ 10)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/u0K9A6pmwy line 0 (ANON @ 5) … | ||
jnthn | I've an RT that expects it to, but I'm not sure it should. | 21:17 | |
sorear | I'm not sure either way | ||
jnthn | At least it's not just me that thinks it ain't obvious :) | 21:18 | |
sorear | I lean towards 'it should work' | ||
PerlJam | Why wouldn't it? | ||
sorear | with a side order of 'invariant meaning of $/ in a regex' | ||
PerlJam | (I think it should work too :) | ||
jnthn | Well, but inside the (...) it's a "different $/" really | 21:19 | |
(The match object you'll get back from $/[0] of the regex overall) | |||
masak | of course it should work. | ||
jnthn | Note that | 21:20 | |
TimToady | not obvious | ||
jnthn | nom: 'ab' ~~ /((a)(b))/; say $0 | ||
p6eval | nom 2fd18f: OUTPUT«=> <ab> 0 => <a> 1 => <b>» | ||
jnthn | nom: 'ab' ~~ /((a)(b))/; say $1 | ||
p6eval | nom 2fd18f: OUTPUT«Any()» | ||
jnthn | nom: 'ab' ~~ /((a)(b))/; say $0[1] | ||
p6eval | nom 2fd18f: OUTPUT«=> <b>» | ||
jnthn | etc | ||
TimToady | and we start $0 renumbering in alternatives | ||
21:21
fridim_ joined
|
|||
TimToady | niecza: say 'aa' ~~ /(.)($OUTER::0)/ | 21:21 | |
p6eval | niecza v13-296-g64527c0: OUTPUT«===SORRY!===Variable $OUTER:: is not predeclared at /tmp/ac2xHzHdfh line 1:------> say 'aa' ~~ /(.)(⏏$OUTER::0)/Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) … | ||
21:22
y3llow_ joined,
bluescreen10 left,
pothos_ joined
|
|||
TimToady | niecza: say 'aa' ~~ /((.)$0)/ | 21:22 | |
p6eval | niecza v13-296-g64527c0: OUTPUT«#<match from(0) to(2) text(aa) pos([#<match from(0) to(2) text(aa) pos([#<match from(0) to(1) text(a) pos([].list) named({}.hash)>].list) named({}.hash)>].list) named({}.hash)>» | ||
TimToady | I think that is conclusive :) | ||
it can't be that and the other at the same time | |||
sorear | Nice try, but niecza is very careful to only count explicit braced constructs as OUTER | 21:23 | |
21:23
ksi joined
|
|||
TimToady | () makes a lexical scope in regex | 21:23 | |
so does [] | |||
jnthn | Bad news. My patch breaks stuff. :( | ||
21:24
y3llow left,
pothos left,
y3llow_ left
21:25
y3llow joined
|
|||
TimToady | .oO( $<..>[0] ) # runs away |
21:25 | |
21:25
pothos_ left,
pothos joined,
cognominal_ joined
|
|||
jnthn | Better news: it doesn't look deep. | 21:26 | |
TimToady | niecza: say 'aa' ~~ / (^) (^) ((.)$0)/ # make sure it's not working accidentally on partial outer $0 | ||
21:27
y3llow left
|
|||
p6eval | niecza v13-296-g64527c0: OUTPUT«#<match from(0) to(2) text(aa) pos([#<match from(0) to(0) text() pos([].list) named({}.hash)>, #<match from(0) to(0) text() pos([].list) named({}.hash)>, #<match from(0) to(2) text(aa) pos([#<match from(0) to(1) text(a) pos([].list) named({}.hash)>].list)… | 21:27 | |
TimToady | no, $0 is truly referring to the inner () | ||
21:27
y3llow joined
|
|||
jnthn | OK, so if I follow, /(.)($0)/ ain't gonna work? | 21:27 | |
TimToady | so it can't also refer to the outer () | ||
nope, can't | |||
PerlJam | TimToady: Could $¢.[0] wor or would it suffer the same problem as $0 ? | 21:28 | |
TimToady | same | ||
PerlJam | s/wor/work/ | ||
jnthn | The cursor is also scoped to the inner thingy | ||
Now I understand why pmichaud++ has it the way he does. | |||
PerlJam | that's what I thought | ||
21:28
pothos left,
pothos joined
|
|||
TimToady | hmm | 21:29 | |
21:29
cognominal left,
y3llow left
|
|||
TimToady | niecza: say 'aa' ~~ /(.)$1=$0)/ | 21:29 | |
p6eval | niecza v13-296-g64527c0: OUTPUT«===SORRY!===Unable to parse regex; couldn't find final '/' at /tmp/RNKwMQxpi0 line 1:------> say 'aa' ~~ /(.)$1=$0⏏)/Parse failed» | ||
21:29
y3llow joined
|
|||
TimToady | niecza: say 'aa' ~~ /(.)$1=$0/ | 21:29 | |
p6eval | niecza v13-296-g64527c0: OUTPUT«#<match from(0) to(2) text(aa) pos([#<match from(0) to(1) text(a) pos([].list) named({}.hash)>, Cursor.new(...)].list) named({}.hash)>» | ||
TimToady | tada | ||
niecza: 'aa' ~~ /(.)$1=$0/; say $1 | 21:30 | ||
jnthn | oh, clever. | ||
p6eval | niecza v13-296-g64527c0: OUTPUT«Cursor.new(...)» | ||
jnthn | oh, less clever :) | ||
TimToady | niecza: 'aa' ~~ /(.)$<foo>=$0/; say $<foo> | 21:31 | |
p6eval | niecza v13-296-g64527c0: OUTPUT«Cursor.new(...)» | ||
TimToady | hmm | ||
buglet of some sort | |||
21:31
pothos left
|
|||
TimToady | which is, of course, a small bugle | 21:31 | |
21:31
pothos joined
21:34
pothos left,
pothos joined
|
|||
PerlJam | while "hamlet" made me think of food, none of the others gave that reaction | 21:35 | |
21:37
pothos left
|
|||
TimToady | a pilot is also food | 21:37 | |
21:37
pothos joined
|
|||
TimToady | a cutlet, however, is not | 21:38 | |
colomon | ?? | 21:39 | |
21:41
benabik left,
benabik joined,
benabik left
|
|||
PerlJam | gives new meaning to the "let" varaibles :) | 21:41 | |
s/ai/ia/ | |||
21:47
spine left
|
|||
mj41 | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); $a.succ; say $a; | 21:47 | |
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 1)» | ||
jnthn | mj41: .succ is not in place | 21:50 | |
dalek | p: a2b60b7 | jonathan++ | src/QRegex/Cursor.nqp: Prevent a crash when building CAPHASH if one of the cstack entries is there solely for backtracking into rather than serving as a capture. |
||
mj41 | jnthn: thx, just found problem is elsewhere | 21:51 | |
tadzik | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); $a.=succ; say $a | ||
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 2)» | ||
21:51
benabik joined
|
|||
mj41 | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); $a += 1; say $a.perl | 21:52 | |
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 2)» | ||
mj41 | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); say $a.perl | 21:55 | |
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 1)» | ||
21:57
wooden_ is now known as wooden
|
|||
jnthn | phenny: ask moritz if he could run a spectest of Rakudo on latest NQP master to see if there's any serious regressions from fixing the backtracking into subrules. (I assume you have ICU, which I don't.) | 21:57 | |
phenny | jnthn: I'll pass that on when moritz is around. | ||
jnthn | sleep...teaching tomorrow & | 21:58 | |
mj41 | why Date instead of myDate ? | ||
jnthn: dobrou noc | 21:59 | ||
colomon | rakudo: class myDate is Date { has $.dummy = 1; }; my $a=myDate.new("2011-01-01"); say $a.perl | ||
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 1)» | ||
colomon | bug | ||
mj41 | jnthn: or 'dobrú noc' in Slovak | 22:00 | |
PerlJam | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); say $a.WHAT | ||
TimToady | obvioiusly anything named "dummy" isn | ||
p6eval | rakudo 2fd18f: OUTPUT«myDate()» | ||
TimToady | isn't really there | ||
colomon | rakudo: class myDate is Date { has $.timtoady = 1; }; my $a=myDate.new("2011-01-01"); say $a.perl | 22:01 | |
p6eval | rakudo 2fd18f: OUTPUT«Date.new(2011, 1, 1)» | ||
colomon | not bug | ||
TimToady | I'm not there either; I'm just here | ||
colomon | mj41 if you don't define a .perl for your class, you get the parent's .perl | ||
TimToady | maybe .perl should be a submethod, and we inherit a reasonable default like .new does | 22:02 | |
colomon | :\ | 22:04 | |
PerlJam | I guess we could get a reasonable default with sufficient introspection. | 22:05 | |
22:06
kaare_ left
|
|||
TimToady | submethod PERL {...} | 22:06 | |
and .perl is more like BUILDALL | |||
mj41 | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); my myDate $b = $a; $b += 1; | ||
p6eval | rakudo 2fd18f: OUTPUT«Type check failed in assignment to '$b'; expected 'myDate' but got 'Date' in block <anon> at /tmp/4_R8K2Adj9:1 in <anon> at /tmp/4_R8K2Adj9:1» | ||
colomon | rakudo: class myDate { has $.member:timtoady = 1; }; my $a=myDate.new("2011-01-01"); say $a.perl | 22:07 | |
p6eval | rakudo 2fd18f: OUTPUT«Default constructor only takes named arguments in method new at src/gen/CORE.setting:561 in block <anon> at /tmp/vlFM1pUrhd:1 in <anon> at /tmp/vlFM1pUrhd:1» | ||
colomon | rakudo: class myDate { has $.member:timtoady = 1; }; my $a=myDate.new(timtoady => "2011-01-01"); say $a.perl | ||
p6eval | rakudo 2fd18f: OUTPUT«myDate.new(member:timtoady => 1)» | ||
mj41 | rakudo: class myDate is Date { }; my $a=myDate.new("2011-01-01"); my myDate $b = $a; say $b.WHAT; $b += 1; | ||
p6eval | rakudo 2fd18f: OUTPUT«myDate()Type check failed in assignment to '$b'; expected 'myDate' but got 'Date' in block <anon> at /tmp/X2ikut2pcx:1 in <anon> at /tmp/X2ikut2pcx:1» | ||
colomon | does seem odd that if you don't have a parent, you get a decent .perl for free, but if you do have a parent, you get an incorrect .perl unless you write your own... | 22:08 | |
TimToady | which is why a .perl override should probably be a PERL submethod | 22:11 | |
it cannot speak for its descendants without a lot of extra work | |||
colomon | +1 | 22:12 | |
TimToady | same for GIST maybe | 22:13 | |
colomon | what would the default do? | ||
dalek | p: c9fd128 | jonathan++ | src/QRegex/Cursor.nqp: Oops, I meant this... |
22:14 | |
TimToady | something like a .perl wrapper around internal gists, maybe | 22:15 | |
jnthn was just about to hit the sack when he realized he'd done a silly | |||
OK, really bed now | |||
dobru noc ;) | |||
TimToady will nap on this a bit hisownself... | 22:16 | ||
22:23
dnewkirk joined
22:30
fridim_ left
|
|||
colomon | perl6: class Foo is Cool { method Str() { "t"; }; }; my $a = Foo.new; say $a.Foo.IO ~~ :d | 22:31 | |
p6eval | rakudo 2fd18f: OUTPUT«Method 'Foo' not found for invocant of class 'Foo' in block <anon> at /tmp/UgavqbevJ1:1 in <anon> at /tmp/UgavqbevJ1:1» | ||
..pugs b927740: OUTPUT«*** No such method in class Foo: "&Foo" at /tmp/BJRpjQlbZm line 1, column 68 - line 2, column 1» | |||
..niecza v13-296-g64527c0: OUTPUT«Unhandled exception: Unable to resolve method Foo in class Foo at /tmp/kg8NV0OQWy line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3068 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3069 (module-CORE @ 64)  at /home/p… | |||
colomon | perl6: class Foo is Cool { method Str() { "t"; }; }; my $a = Foo.new; say $a.IO ~~ :d | 22:32 | |
p6eval | pugs b927740: OUTPUT«*** No such method in class Foo: "&IO" at /tmp/o7ld7Eqnza line 1, column 68 - line 2, column 1» | ||
..niecza v13-296-g64527c0: OUTPUT«Unhandled exception: Unable to resolve method IO in class Foo at /tmp/ULvA5scUWI line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3068 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3069 (module-CORE @ 64)  at /home/p6… | |||
..rakudo 2fd18f: OUTPUT«Bool::False» | |||
colomon | should that work or not? | ||
22:39
lichtkind left
|
|||
masak | good night, #perl6. | 22:40 | |
colomon | o/ | ||
felher | o/ masak :) | 22:46 | |
22:48
muixirt left
22:51
mj41 left
22:52
bacek left,
_dbr left
23:01
bacek joined
23:06
whiteknight joined
23:08
fk_ joined,
fk_ left
23:09
donri left
23:14
donaldh joined
23:18
nornagest left
23:22
donaldh left
23:24
overrosy left
23:26
overrosy joined
23:30
benabik left
23:33
tokuhirom joined
23:39
cognominal___ joined
23:41
whiteknight left,
whiteknight joined
23:42
cognominal_ left
23:58
bacek left,
bacek joined
23:59
zjmarlow left
|