»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend! Set by Tene on 14 May 2009. |
|||
00:04
snarkyboojum joined
00:18
icwiener joined
00:37
bacek joined
00:41
Chillance left
00:44
DemoFreak left
00:50
seb_ joined
01:10
agentzh left
01:19
c9s left,
c9s joined
01:23
jferrero left
01:33
agentzh joined
01:38
daemon left,
seb_ left
|
|||
pugs_svn | r26978 | ron++ | added test for call to multimeth with wrong number of args RT #66006 | 02:03 | |
02:09
icwiener left
02:11
lichtkind left
02:16
jonathanturner left
02:21
alanhaggai joined
02:27
ruoso joined
|
|||
ruoso | Hello! | 02:28 | |
02:30
dextius joined
|
|||
skids | So anyone want to talk about macros, now that lichtkind has left? :-) | 02:30 | |
Tene | what about macros? | 02:31 | |
skids | Nothin. Joke. | ||
dextius | I "use macro" in Perl5, very useful, for avoiding function call overhead :-) | ||
I have made a small update to a Rakudo test, what is the process for getting this reviewed / checked in? | 02:32 | ||
skids | Is it rakudo-specific, or good for all Perl6? | 02:33 | |
dextius | it's a spec test in the pugs suite.. | ||
S03-operators/autoincrement.t | |||
skids | Ah, well, either get someone to give you a commit bit if you expect to contribute often, or try to hook up with morris or masak who may put it in for you | 02:34 | |
since they do tests often. | 02:35 | ||
Tene | dextius: /msg me an email address and preferred username, and I'll give you a commit bit for pugs | ||
dextius | Tene: What is the review process for changes? | ||
skids | "ask forgiveness not permission" I think, for pugs. | 02:36 | |
dextius | I'll be careful then. | 02:37 | |
Tene | that's right | ||
skids | Though if you are unsure, it can be good to get someone's attention here or on p6l for comments first. | ||
dextius is excited.. have wanted to contribute to this since the Parrot O'Reilly books came out! | 02:40 | ||
02:44
FurnaceBoy_ joined
|
|||
skids | dextius: fwiw, pmichaud was working on postfix:<++> and prefix:<++> today | 02:51 | |
Don't think his changes are in yet though, unless I missed dalek. | |||
02:51
FurnaceBoy left
|
|||
dextius | I'll keep clear for at least a week and update both parrot and rakudo before I do anything :-) | 02:53 | |
g'night! | |||
02:53
dextius left
|
|||
pasteling | "ruoso" at 189.97.61.71 pasted "odd behavior by rakudo" (62 lines, 2K) at sial.org/pbot/36941 | 02:57 | |
ruoso | the paste above has a code that presents some odd behavior in rakudo... | ||
it initializes an array with some values, but it gets reset to zero for some reason | 02:58 | ||
when executing, note the output from lines 33 vs 35 | 03:00 | ||
03:04
meppuru joined
03:14
veritos joined
03:18
synth joined,
synth left
03:19
kate21de joined,
sri_kraih left
|
|||
skids | ruoso: not that it has anything to do with the problem, but shouldn't it be for 0..^$.width? | 03:19 | |
03:20
meppl left
03:27
justatheory joined
03:31
veritos left
|
|||
skids | Ah... i think... [] xx foo = foo copies of the same exact anonymous array. | 03:35 | |
each @new[$x] bound to the same array. | |||
03:38
alester joined
03:39
crugix joined
|
|||
skids | ruoso: try for 0..^$.width { @new.push([]) }; instead of [] xx $.width | 03:40 | |
03:58
crugix left
|
|||
pmichaud | correct -- [] xx $n results in a list with $n elements, all referring to the same array. | 04:02 | |
04:03
skids left
04:20
synth joined
04:22
sri_kraih joined
04:29
justatheory left
|
|||
ruoso | pmichaud, but is that expected or is it a bug? | 04:33 | |
pmichaud | as far as I know, it's expected | ||
it's the same as | 04:34 | ||
my $a = []; ($a, $a, $a) | |||
ruoso | ok... | ||
pmichaud | or, more precisely: | ||
my $a = []; $a xx $n | 04:35 | ||
ruoso | rakudo takes 23s to compute 4 iterations of a 15x15 grid | ||
pmichaud | well, what we learned yesterday is that postfix:<++> and ranges (which use postfix:<++>) are really slow. | ||
I've been working on speeding them up today, but I keep running into roadblocks | 04:36 | ||
pasteling | "ruoso" at 189.97.61.71 pasted "working conway's game of life in rakudo" (57 lines, 1.7K) at sial.org/pbot/36942 | ||
ruoso | the code could be prettier... but cascading maps and greps don't quite work | 04:38 | |
04:40
sri_kraih left,
Lectus joined
04:46
flexibeast joined
|
|||
ruoso | while implementing game-of-life, I realized how cool "for ^$width X ^$height -> $x, $y { ... }" is | 04:47 | |
pmichaud | why does the pastbot code show 0..^$.width, ooc? | ||
why not just ^$.width ? | |||
ruoso | because I only reduced that in the last minute | 04:48 | |
;) | |||
pmichaud | ahhhhh | ||
04:48
meppuru left,
FurnaceBoy_ left
|
|||
pmichaud | it's still a range (and still slow in current rakudo) | 04:48 | |
pasteling | "ruoso" at 189.97.61.71 pasted "simplified working conway's game of life in rakudo" (51 lines, 1.6K) at sial.org/pbot/36943 | 04:51 | |
ruoso | pmichaud, do you see any other way of making that code even simpler? | 04:54 | |
pmichaud | nothing major | 04:55 | |
but I'm still heads-down in the postfix:<++> stuff at the moment, so not looking too closely | |||
ruoso | ok... | ||
pmichaud | last line could be: say .perl for $g.list | ||
or say .perl for @($g) | 04:56 | ||
04:57
nihiliad left
05:04
[particle]1 joined
05:05
jwest- joined,
flexibeast left
05:12
synth left,
alester left,
kate21de left,
ruoso left,
Eevee left,
mikehh left,
elmex left,
broquaint left,
hcchien left,
synth joined,
alester joined,
kate21de joined,
ruoso joined,
Eevee joined,
mikehh joined,
elmex joined,
broquaint joined,
hcchien joined,
ascent_ joined
05:13
flexibeast joined
05:17
alester left
05:23
justatheory joined
05:24
alanhaggai left
|
|||
JDlugosz | Helllo anyone | 05:27 | |
05:27
frew|work left
05:35
eMaX joined
05:36
zamolxes left
05:39
finanalyst1 joined
05:40
finanalyst1 left
|
|||
Tene | JDlugosz: Hi! | 05:41 | |
05:41
finanalyst1 joined
05:52
justatheory left,
justatheory joined
06:02
RogerRabbit joined
06:03
ab5tract left
06:29
RogerRabbit left,
synth left
06:30
synth joined
06:33
synth left
06:34
synth joined
06:36
xinming_ joined
06:40
synth left,
synth joined
06:47
synth left,
synth joined,
eMaX left
06:49
synth left
06:54
xinming left,
eMaX joined
06:55
viklund joined
06:58
dakkar joined
06:59
mickej joined
07:01
zamolxes joined,
jwest- left
07:18
unitxt left
07:23
DemoFreak joined
07:24
viklund left,
viklund joined
07:30
zamolxes_ joined
|
|||
Matt-W | Morning | 07:30 | |
07:31
xinming joined
|
|||
mberends | morning Matt-W | 07:38 | |
07:39
eiro joined
07:40
eiro left,
eiro joined
07:41
eiro left
07:42
zamolxes left,
eiro joined
07:44
ejs joined
07:47
mickej left
07:48
xinming_ left
07:52
ejs left
07:54
ejs joined,
zamolxes_ left
07:56
iblechbot joined
08:02
zamolxes joined
08:15
mikehh_ joined
08:16
bacek left
08:17
agentzh left
08:18
agentzh joined
08:26
eMaX left
08:27
mikehh left
08:34
ZuLuuuuuu joined
08:39
barney joined
08:48
DanielC joined
08:49
tulcod joined
|
|||
mberends | DanielC: hi! | 08:49 | |
DanielC | moin | ||
hi mberends | |||
mberends: perl6-examples/misc/Fletcher.pl <-- Unicode friendly implementation of Fletcher-16, and a small script to make the file names we were talking about yesterday. | 08:52 | ||
mberends | I hope not to burst your bubble, but after your nice Fletcher algorithm work I began to doubt whether any kind of hashing at all is appropriate to the problem being addresses, namely telling apart the conflicting file names originating from a very small number of authors/authorities | ||
*addressed | |||
DanielC | ok | ||
It was just an idea. What's the problem with hashing? | 08:53 | ||
mberends | particularly since hashing alone is by definition not a complete solution | ||
DanielC | I have an issue with that statement. | ||
Any reasonable hash should be a complete solution. | 08:54 | ||
Use Fletcher-32 and the chances of collision are really remote. | |||
mberends | collisions will happen. there is such a thing as a "Perfect Hash", but it is based on constructing a custom hashing function for a finite set of possible strings. | 08:55 | |
DanielC | 32-bit hash => 64k authors with the same module name and the same version before you can expect a collision. | ||
160-bit hash (e.g. sha1) => 1e14 authors with the same module name and the same version before you can expect a collision | 08:56 | ||
mberends | the whole hashing approach looks like overengineering for the small variety of :auth values that will be required. | 08:57 | |
DanielC | 512-bit hash (e.g. whirlpool) => 1e77 authors with the same module name and the same version before a collision. | ||
It's just a matter of choosing a hash length that is appropriate. | |||
There are 6e9 people on earth. A 64-bit hash would allow almost everyone on earth to be an author of the same module with the same version. | 08:58 | ||
mberends | adding more bits is so... brute force :( | 08:59 | |
09:00
masak joined
|
|||
mberends | I have to go afk for a few hours, but I'd like to ask if you can think of non-hashing alternative, because I think I can. | 09:00 | |
DanielC | I think 64 bits is far more than we need. I'm just making a point here, that the hash length can be selected to make the chance of collision small enough. | ||
masak | ni hao, #perl6 adventurers. | ||
DanielC | I think that a hashing alternative is very elegant. I think a 32-bit hash would be an excellent choice. | ||
mberends: On a different topic: Can you tell me if a single module can have more than one file? | 09:01 | ||
masak: hi! | |||
masak waves happily | |||
DanielC | mberends: A non-hashing alternative is to urlencode all the fields instead of hashing them. | ||
mberends | sorry, I have to go, but am very interested in continuing this discussion later. | 09:02 | |
DanielC | sure | ||
mberends | afk & | ||
09:02
mikehh_ left
09:03
mikehh_ joined
|
|||
DanielC | Maybe masak can tell me if a module is always one file or if it can contain several files :-) | 09:03 | |
masak | DanielC: been thinking a bit more about your dir structure auth/Foo::Bar/ver. | ||
DanielC | yeah, that's what mberends was just talking about, forget about the dir structure :-) | ||
masak | oh, ok. | ||
I see I need to backlog. :) | 09:04 | ||
DanielC | Yesterday we were talking about putting all the files in one single directory and naming them with: Foo::Bar-auth:4ca03-ver:1.2.0 | ||
masak | DanielC: of course a module can consist of several files. that's what 'augment' gives us. | ||
DanielC | thanks | ||
masak | DanielC: that sounds sane. | ||
DanielC | The naming scheme is automatically extensible (more metadata) | 09:05 | |
masak: Take a look at perl6-examples/misc/Fletcher.pl | |||
masak does so | |||
DanielC: nice. real code is always pleasant to look at. | 09:07 | ||
DanielC++ | |||
DanielC | :-) | ||
09:07
jferrero joined
|
|||
masak | DanielC: one small nit: must we have a dir called 'misc'? :) | 09:08 | |
everything in this world is misc. | |||
it's like calling it 'stuff' or 'data'... | |||
DanielC | I didn't know what to call it... | ||
yeah | |||
masak | DanielC: perhaps because it contains two very different things. | ||
DanielC | I'm happy to put Fletcher.pl elsewhere, but where? | ||
masak | DanielC: we might move out the bf thing into some other directory, and call this one 'modules' or something. | 09:09 | |
DanielC | We can put bf in a directory called 'acme'. | ||
masak | that works. | 09:10 | |
'acme' has CPAN connotations. | 09:11 | ||
DanielC | I still need a name for the module holding Fletcher.pl I can't think of anything... | ||
he he... s/module/dir/ | |||
masak | DanielC: I'd go with 'modules' or 'module-management'. | 09:12 | |
DanielC | ok | ||
ah, I see why you said 'modules' | |||
I was thinking "but Fletcher.pl is not a module..." | |||
masak | :) | 09:13 | |
DanielC | I'll pick module-management for now. | ||
masak | nod. | 09:14 | |
DanielC | updated | ||
viklund | masak: I'm adding errorchecking for the run commands in proto, should it say "buildt" even if there is no Makefile? | 09:15 | |
masak | viklund: yes. | ||
viklund: the idea behind that is that there might not be a build system, and then building is trivially a no-op. | 09:17 | ||
viklund | yes, I thought so too | ||
09:17
mikehh__ joined
|
|||
DanielC | masak: If a module can have many files then Foo::Bar-auth:4ca03-ver:1.2.0 would have to be a directory, not a file. Right? | 09:19 | |
masak | viklund: and I think we should also accept both forms of build systems currently out there, the Makefile.PL one and the Configure.p6 one. | ||
viklund runs the test './proto install all' | |||
masak | DanielC: yes, I think it needs to be that anyway. even CPAN does it like that. | 09:20 | |
viklund | yes, I'm not changing anything about that, just adding error handling | ||
DanielC | masak: ok | ||
viklund | previously it said built even if the configure failed | ||
masak | viklund: yes. :( | ||
viklund | very user unfriendly | ||
masak | viklund: thank you for giving that part of proto some love. | 09:21 | |
viklund | it has bitten me too many times ;) | ||
masak | "inspiring people by writing a crappy prototype" :P | ||
viklund | oh, the bleeding branch of proto defaults to bleeding rakudo now, that needs to be remembered when merging over to the master branch | 09:22 | |
masak | well, as long as we merge soon after the next release, that should be ok... | ||
because then release and bleeding will not have diverged too much yet. | |||
viklund | the master branch will fail eventually if it's not changed to default to release, but the release version needs to be changed anyways so some editing needs to be done anyways | 09:24 | |
*sigh* | |||
masak | viklund: not sure I see what you perceive to be the problem... | 09:27 | |
09:27
ZuLuuuuuu left
|
|||
viklund | well, there won't be a problem as long as the master branch defaults to release | 09:28 | |
masak | it does. | 09:30 | |
09:30
mikehh_ left
|
|||
viklund | yes, and when bleeding is merged to master, it will default to bleeding, so that needs to be changed | 09:31 | |
it's not a problem, just something that we need to remember | |||
or else it will be a problem | |||
masak | viklund: when you say 'default to bleeding', are you talking about what proto pulls down when installing Rakudo? | 09:32 | |
09:32
mikehh__ left
|
|||
viklund | masak: yes, the generated configuration file defaults to bleeding. | 09:33 | |
masak | viklund: ok. then I see. | ||
viklund: why does it default to bleeding in the branch? because it's tedious to change the proto.config file? | 09:34 | ||
viklund | yep, but I also thinks it matches the expectations, if you run the bleeding branch of proto you excpect to get bleeding rakudo as well | 09:36 | |
s/exc/ex/ | |||
masak | fair enough. | ||
there's an interesting dissonance in there somewhere between the need to have a sane default for the branch and the wish to do clean merges back to master. | 09:37 | ||
I wonder if that phenomenon has a name... | |||
09:38
barney left
|
|||
Matt-W | masak: 'Reality' | 09:38 | |
masak | Matt-W: :P | 09:39 | |
Matt-W | we were just talking about a similar problem at work | ||
one of the lead techs is shying away from making an incompatible change because he doesn't want to tell people they need to migrate their database | |||
even though it's a really easy migration | |||
DanielC | Matt-W: Rule 1 of tech support: users are idiots. | 09:40 | |
viklund | how would I write to reduce on zip? [Z] [[<a b>], [1, 2]], doesn't work for example... | 09:41 | |
Matt-W | DanielC: that's why I'm a developer :) | ||
DanielC | :-) | 09:42 | |
viklund | and I can't find reductive cross mentioned in S03... | ||
masak | rakudo: my @a = <a b>, (1, 2); .perl.say given [Z] @a | 09:48 | |
p6eval | rakudo 0b9c9a: OUTPUT«Statement not terminated properly at line 2, near "@a"in Main (src/gen_setting.pm:0)» | ||
masak | rakudobug, p'haps? | ||
Matt-W | possible | ||
I'd expect that [Z] makes sense to have | |||
So I'd expect it to work | 09:49 | ||
viklund | whatabout [X]? That's not even mentioned... | ||
Matt-W | what about [infix:<foo>] | 09:50 | |
viklund | ;) | ||
Matt-W | surely it should work with anything :) | ||
masak | std: my @a; [Z] @a | 09:51 | |
p6eval | std 26978: OUTPUT«ok 00:02 38m» | ||
masak | if it's good enough for STD... | ||
Matt-W | std:my @a; [X] @a | ||
std: my @a; [X] @a | |||
p6eval | std 26978: OUTPUT«ok 00:02 38m» | ||
Matt-W | then it's good enough for me! | ||
viklund | std: my @a; [X~] @a | ||
p6eval | std 26978: OUTPUT«ok 00:02 38m» | ||
viklund | ahh | 09:52 | |
Matt-W | std: sub infix:<foo>($a, $b) { }; my @a; [foo] @a; | ||
p6eval | std 26978: OUTPUT«ok 00:03 41m» | ||
Matt-W | yay! | ||
masak | foo++ | 09:54 | |
viklund | git-cherry-pick++ | 09:58 | |
10:01
donaldh joined
|
|||
Matt-W | foo does make a nice change from x, y and z | 10:09 | |
10:11
clintongormley joined
10:12
agentzh left,
ruoso left
10:13
agentzh joined
10:14
payload left
10:21
agentzh left
11:00
Chillance joined
|
|||
DanielC | In Perl 6, is it possible (for example) to define a Matrix type, and then overload infix:<+> so it can do the right thing when you give it two matrices? | 11:06 | |
masak | DanielC: sure. | 11:07 | |
DanielC | cool | ||
masak | DanielC: just type the arguments to that infix:<+> sub to be matrices. | ||
11:08
Chillance left
|
|||
DanielC | I was wondering about Perl 6's ability to grow in the future... | 11:08 | |
How do you define a type? | |||
masak | DanielC: many ways. see S12. | 11:09 | |
DanielC | thanks | ||
masak | most common is perhaps defining a class, but it all depends. | ||
DanielC | Well, the main thing I wanted to know is that it is possible. | ||
Point being, the language is not stuck in time but can grow in unexpected ways. | 11:10 | ||
Yesterday I saw a video of a Google talk by Larry. | |||
I learned that the Perl 6 core is actually tiny (Larry said non-existent) and all of the operators are defined using the language itself. | 11:11 | ||
e.g. postfix:<++> | |||
So I extrapolated from that, that the language should be very maleable then. | |||
11:20
donaldh left,
donaldh joined
11:26
DanielC left
11:33
beggars joined
11:44
iblechbot left
11:46
mib_1i2pid joined,
mib_1i2pid left
11:48
meppl joined
11:56
Muixirt joined
|
|||
Matt-W | @tell DanielC Yes, Perl 6 is very mallable. Ultimately we'll be writing macros and mucking about with the grammar to our hearts' content. | 11:56 | |
lambdabot | Consider it noted. | ||
jnthn | o/ | ||
masak | jnthn: ahoj! | 11:57 | |
jnthn | masak: ahoj :-) | 11:58 | |
Matt-W | hi jnthn | 11:59 | |
hi masak | |||
masak | hi Matt-W. | ||
pmichaud | Good morning, #perl6 | ||
masak | morning, pm. | ||
jnthn has a pile of not-perl6 stuff to do for the next hour or two | 12:00 | ||
Then it's dispatcher debugging time. | |||
pmichaud | it's likely to take me an hour or two to recover from yesterday | 12:01 | |
Matt-W | pmichaud: what did you do yesterday? | ||
jnthn | postfix:<++> was quite an ordeal? | ||
pmichaud | jnthn: *is* still an ordeal | 12:02 | |
jnthn | pmichaud: oh, ouch. | ||
pmichaud | yeah. | ||
I'm discovering lots of little issues | |||
(nopasting) | 12:03 | ||
gist.github.com/121365 # part 1 | 12:04 | ||
gist.github.com/121366 # part 2 | |||
Matt-W blinks | 12:06 | ||
oh my | |||
pmichaud | I've got more. :0| | ||
but gotta finish getting kids to school | |||
Matt-W | although I'm sure I've seen something similar with that being the faster way to get classes | 12:07 | |
jnthn | pmichaud: Looks like PMCProxy all over again. | ||
as in, multiple creation of... | |||
At first guess. | |||
Matt-W | It still seems very odd that something that takes more lines of PIR to do is so much faster | 12:09 | |
12:09
perlmongo joined
|
|||
Matt-W | Is it something to do with it being in a loop and making needless temporaries? | 12:09 | |
12:10
ruoso joined
|
|||
pmichaud | jnthn: yes, I'm thinking it's PMCProxy again. | 12:11 | |
We have to switch all of our isa's to use the faster form anyway, but I was shocked to discover such a speed difference | |||
ruoso | Hello! | ||
ruoso with no time to backlog | 12:12 | ||
Matt-W | It really is a very surprising thing | ||
pmichaud | in postfix:<++> I ended up needing a call to '!DEREF', and simply calling !DEREF produced a 3x slowdown | ||
(because !DEREF does isa $P0, ['ObjectRef'] | |||
Matt-W | is this also something to do with the faster form tells Parrot where to look, so it doesn't have to go hunting as much for the class? | 12:13 | |
pmichaud | I guess. | 12:14 | |
jnthn | pmichaud: Yeah, in the dispatcher changes !DEREF is dead. | ||
pmichaud: Well, I didn't kill it yet. | |||
pmichaud: But there's a dynop to replace it. | |||
pmichaud | ah | ||
I was thinking about a dynop | |||
works for me | |||
jnthn | Yeah. The performance hit was horrid without it. | ||
pmichaud | well, changing !DEREF to just use the get_namespace form instead of isa $P0, ['ObjectRef'] produced a huge speedup | 12:15 | |
jnthn | Oh, I lost a bit on dispatcher performance too so we no longer quite beat sub dispatch speed. I had to stick the check in for Whatever and create the closure. | ||
I'll work out a way to avoid that cost on every dispatch though. | 12:16 | ||
Somehow. | |||
12:18
viklund left
|
|||
pmichaud | well, checking for Whatever can be fast | 12:19 | |
it's fast if you already have the Whatever class stashed away somewhere that doesn't require a lookup | |||
jnthn | We still shouldn't pay the cost on every dispatch. | 12:20 | |
pmichaud | anyway, to describe a bit more of the saga | ||
jnthn | I have a whole bunch of stashing-away-style optimizations to do on the dispatcher though. | ||
pmichaud | turns out that changing postfix:<++> broke enums | ||
jnthn | ooh. | 12:21 | |
pmichaud | took me about 2 hours to track down why | ||
jnthn | Did you by any chance get an infinite recursion issue? | ||
pmichaud | it's because it started returning parrot Integer PMCs instead of rakudo Int objects | ||
so that broke infix:does | |||
I have that fixed now | |||
jnthn | infix:does should be able to handle that. :-S | ||
pmichaud | well, it doesn't. Or, it does now. :-) | 12:22 | |
but it's orse | |||
*worse | |||
along the way I said "okay, let's try hll_map" | |||
and ran into... | |||
gist.github.com/121374 # part 1 | 12:23 | ||
gist.github.com/121376 # part 2 | 12:24 | ||
creating our Int, Num, Str is five times slower than creating parrot Integer, Float, String | |||
afk, taking kids to school | 12:25 | ||
Matt-W | oh dear | ||
jnthn | Well, it does create 3 times as many PMCs. :-| | 12:26 | |
Matt-W | yes but then it should only be three times slower :) | ||
(yes I know that makes no sense at all) | 12:27 | ||
jnthn | Matt-W: The overhead really comes because it's now not just a PMC, but a high-level Object. | ||
12:27
ZuLuuuuuu joined
|
|||
Matt-W | I wasn't aware of a difference | 12:27 | |
I should find some time to learn more about Parrot | 12:28 | ||
and do some Form.pm again | 12:29 | ||
I got into a bit of a rut of not doing anything, due to the next big thing being handling numbers | |||
which just looks hideously difficult | 12:30 | ||
pmichaud | back | 12:40 | |
pugs_svn | r26979 | pmichaud++ | [t/spec]: Fudge autoincrement.t -- test may be incorrect | 12:47 | |
pmichaud | jnthn: when you have some time for a few discussion items, let me know | 12:49 | |
(no rush -- I have plenty else to do also) | |||
jnthn | pmichaud: OK, give me 30mins-1 hour. | 12:51 | |
12:54
snarkyboojum left
13:04
pmurias joined
|
|||
pmurias | ruoso: hi | 13:04 | |
ruoso | hi pmurias | ||
pmurias | if $!attr gets translated into self.instance_storage{$?PACKAGE~'attribute'} how will we handle role Foo {method bar {$!foo}} | 13:05 | |
jnthn | Badly. ;) | 13:06 | |
ruoso | pmurias, by doing a hack when composing the role | ||
by injecting a new value for $?PACKAGE in the lexical tree of the method composed in the class | |||
jnthn | Alternatively, go of $?CLASS, which is generic. | 13:07 | |
*off | 13:08 | ||
pmichaud | gist.github.com/121388 # Huh?!?!?! | ||
ruoso | pmurias, jnthn, I guess $?CLASS should work as well... and makes more sense to be overriden | ||
I mean... it already needs to be overriden | |||
jnthn | pmichaud: Hm? I'm guessing Str is :vtable('get_string')'d. | 13:10 | |
pmichaud | jnthn: .... but it's not | ||
:vtable('get_string') is Str | |||
but more to the point, afaik there's no vtable:('get_string') or Str for Range | 13:11 | ||
which is really the source of my "Huh?" | |||
jnthn | There's no generic one in Object that calls .Str? | ||
pmichaud | yes, there's a generic vtable in Object that calls .Str | ||
but Range doesn't define .Str | |||
jnthn | Oh. | ||
pmurias | ruoso: and how does 'is rw' recognize immutable values so that they get wrapped? | ||
jnthn | So which one's it inheriting? :-S | ||
ruoso | pmurias, "is rw" is something that applies to the accessor method | 13:12 | |
pmurias, we will be able to handle it when we handle "is rw" routines | 13:13 | ||
pmurias | i meant is rw in signatures | 13:14 | |
all routines are is rw now | |||
13:16
hanekomu joined
13:17
cmarcelo joined
|
|||
jnthn | pmichaud: OK, free now. | 13:19 | |
ruoso | pmurias, all routines are "is ref" right now... but we still need a spec clarification on how to fix that | ||
pmichaud | jnthn: I'm thinking seriously about making the switch so that containers have a "rw" property and everything else is assumed readonly. | 13:22 | |
ruoso | pmichaud, I'm not sure if what you're saying is related with me and pmurias' conversation... but storing that in the container doesn't really solve the problem | 13:23 | |
pmichaud | ruoso: it's not related. | ||
ruoso | ah... ok | ||
pmichaud | ruoso: it's a slightly different conversation that I've been having with jnthn++ off-and-on | 13:24 | |
13:24
skids joined
|
|||
masak | pmurias: seen Jonathan Leto's email about GSoC updates? | 13:24 | |
ruoso | but anyway... it would be nice to have a solution to the "enforcing ro in captures" thing... | ||
jnthn | pmichaud: That could be a win. | 13:25 | |
13:25
barney joined
|
|||
jnthn | pmichaud: I'm hoping an optimizer will be able to optimize away a lot of checks though. | 13:25 | |
pmichaud | jnthn: the reason I was avoiding it previously was to avoid creating a bunch of properties on aggregates.... but we're going to end up with those anyway | 13:26 | |
and I still hope we can get all of the elements of an aggregate to share a common prophash | |||
jnthn | Well, plus we can share them for the mostpart IIRC. | ||
pmichaud | right. | ||
jnthn | *nod* | ||
pmichaud | would that switch likely interfere with your dispatch work? | ||
I'm thinking I'll want to wait until after that's done. | |||
and, do you see any immediate negatives? | 13:27 | ||
jnthn | It's unlikely to. I actually jsut locally comitted what I had so far and pulled latest trunk and no conflicts to resolve by hand. | ||
pmichaud | okay. I may look into that soonish. | 13:28 | |
Another question: enum MyEnum <a b c d> | |||
jnthn | We still need to check things are rw in a lot of places though... | ||
(Increment being one of them.) | |||
pmichaud | I'll come back to my second question | ||
jnthn | But again, optimizer I hope will inline it. | 13:29 | |
pmichaud | checking for rw isn't hard | ||
really we just do it in assign | |||
jnthn | Yes, true. | ||
pmichaud | even increment is implemented in terms of assign | ||
13:29
DanielC joined
|
|||
jnthn | By assign you mena infix:=? | 13:29 | |
pmichaud | yes. | ||
jnthn | ok | ||
Then yes. | |||
DanielC | Sigh... I just had to spend an hour or two rescuing my local system... Thank God for backups. | ||
lambdabot | DanielC: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
DanielC | @messages | 13:30 | |
lambdabot | Matt-W said 1h 34m ago: Yes, Perl 6 is very mallable. Ultimately we'll be writing macros and mucking about with the grammar to our hearts' content. | ||
13:30
mizioumt joined
|
|||
pmichaud | basically, anywhere that we have to type check a value to a container ends up going through infix:= | 13:30 | |
and rw is just part of that. | |||
anyway, back to my second q | |||
enum MyEnum <a b c d> | |||
each of "a", "b", "c", "d' currently end up with "does Abstraction". Is that important? | 13:31 | ||
I mean, are they really abstractions? | |||
(same go for Bool::True and Bool::False at the moment) | |||
jnthn | They need to be parsed as type names. | ||
pmichaud | ah. | 13:32 | |
Actually, STD has changed that | |||
jnthn | The alternative is a special case. | ||
Oh? | |||
pmichaud | they need to be parsed as *names*, but not necessarily types | ||
jnthn | Names, type names... | ||
pmichaud | STD.pm now has ".is_name" instead of ".is_type" | ||
jnthn | :-/ | ||
pmichaud | where a "name" can be something more than a type, or something that "does Abstraction" | ||
jnthn | OK, we probably need to catch up with that distinction at some point. | ||
pmichaud | I might be close to that point. | ||
jnthn | OK. | 13:33 | |
It's probably not going to be so painful. | |||
pmichaud | So, is the only reason that enum/True/False have "does Abstraction" is to get .is_type to work? | ||
jnthn | Yes. | ||
pmichaud | okay. | ||
I wasn't sure if there was something more there. | |||
Good that there's not. Yes, it shouldn't be too painful a fix. | |||
jnthn | Above, you wrote enum, I think you meant enum values? | ||
The name of an enum itself probably wants to stay a type name. | 13:34 | ||
pmichaud | correct, enum values | ||
jnthn | OK. | ||
pmichaud | I agree that the enum name itself remains Abstraction | ||
jnthn | OK, good. | ||
pmichaud | okay, if enum values don't need Abstraction (nor True nor False), then that makes it easier to get True/False/pi/e/Inf/Nan/etc to act like constants | 13:35 | |
jnthn | Feel free to go ahead and do the changes you need on that. | ||
pmichaud | I will. | ||
jnthn | Don't see it impacting me. | ||
pmichaud | I just needed to make sure there wasn't something I was missing :-) | ||
jnthn | If there is, I don't see it. :-) | 13:36 | |
pmichaud | okay, I think that's all I have at the moment for questions. | ||
jnthn holds some vain hope that the exit segfaults will have vanished with the upgrade to a later Parrot revision. | |||
13:37
FurnaceBoy joined
|
|||
pmichaud | no such luck from what I've seen thus far | 13:37 | |
jnthn | pmichaud: Are you seeing exit segfaults too then? | ||
pmichaud | oh, Range.Str does exist, but it's in setting | ||
okay, I see the problem now. | |||
yay. | |||
easy fix. | |||
(segfaults) -- yes, I consistently get an exit segfault in slice.t or something like that | |||
t/spec/S09-subscript_slice/slice.rakudo 0 11 27 0 ?? | 13:38 | ||
jnthn | OK, I've been seeing several more after my refactor. | ||
pmichaud | that's the only one, although a few others popped up yesterday while I was mucking about with hll_map | ||
13:38
ZuLuuuuuu left
|
|||
pmurias | S28 mentions $?CLASS type as a Class, which is not a valid type right? | 13:39 | |
pmichaud | pmurias: correct. | 13:40 | |
jnthn | pmichaud: I'm thinking it probably is the proto-object. | ||
ruoso | pmurias, yeah... there's no "meta-type" | ||
jnthn | Last I remember, TimToady was speculating Class might mean "a metaclass" | 13:41 | |
ruoso | wasn't that ClassHOW? | ||
jnthn | Which makes sense in the context of traits. | ||
ruoso: No, something that means "any meta-class" | 13:42 | ||
Not just ClassHOW, but WhateverHOW :-) | |||
ruoso | hmm... seems a fragile definition... | ||
jnthn | So long as we have a mechanism of knowing, "was this declared as a knowhow" it can probably fly. | 13:43 | |
pmichaud: Wow, make spectest feels faster these days... | |||
pmichaud | jnthn: it should be faster | ||
last weekend spectest was taking 45 minutes on my benchmarking machine | 13:44 | ||
as of yesterday noonish, I had it down to 25 minutes | |||
jnthn | Wow. | ||
I don't have ICU, and still it feels faster... | |||
pmichaud | oh, yes. | ||
the change I made to speed up parsing doesn't require ICU | |||
jnthn | Oh, cool. | ||
:-) | |||
pmichaud | bacek++ fixed TT #24 -- the one about the hash keys not comparing correctly | 13:45 | |
that meant I could go straight to iso-8859-1 instead of ucs2 | |||
jnthn | Oh nice. | ||
Hey, does that mean we can parse unicode hypers now? | |||
pmichaud | so now parsing is slow only for files that contain unicode beyond the first 256 codepoints | ||
oh, we're already parsing unicode hypers | 13:46 | ||
jnthn | ah, ok | ||
pmichaud | I fixed that about a week or so ago, I think | ||
ruoso | jnthn, but remember that not only knowhows can be used as HOW... | ||
jnthn | OK, nice. | ||
ruoso: Huh? | |||
pmichaud | rakudo: say «hello, jnthn»; | ||
p6eval | rakudo 0b9c9a: OUTPUT«hello,jnthn» | ||
ruoso | jnthn, the HOW is just an object like any other... | ||
jnthn, knowhow is simply a pure prototype object... | 13:47 | ||
pmichaud | jnthn: you changed BUILD recently, yes? | ||
jnthn | Can you translate pure prototype from smop terminology? | ||
ruoso | jnthn, it's an object that has its storage and its meta definitions all stored in itself | ||
jnthn | pmichaud: yes. | ||
pmichaud | jnthn: hmmm. In Range objects, $!from and $!to are now being held as ObjectRef->Int instead of just Int | 13:48 | |
ruoso | jnthn, so it doesn't depend on external objects to dispatch its methods | ||
jnthn | pmichaud: Should be Perl6Scalar->Int | ||
pmichaud: It's because they're constructed like normal objects now. | |||
pmichaud | should just be Int | ||
a normal container would be just Int | |||
rakudo: my $a = 3; say $a.PARROT; | 13:49 | ||
p6eval | rakudo 0b9c9a: OUTPUT«Int» | ||
jnthn | OK, then I only migrated what was already wrong in the existing BUILD. | ||
pmichaud | hmmm. | ||
jnthn | I essentially moved it over to CREATE. | ||
pmichaud | do you remember the approximate date of the change? | ||
jnthn | ruoso: Heh, sounds like what Parrot's default Object/Class is. | ||
pmichaud | I'd like to compare then to now. | ||
jnthn | pmichaud: I did it shortly before starting the dispatch refactor IIRC. | 13:50 | |
pmichaud | so, after the stockholm release? | ||
jnthn | Yes | ||
pmichaud | okay, I'll just try the release copy | ||
jnthn | Think so. | ||
pmichaud | thanks. | ||
ruoso | jnthn, the idea of a knowhow is precisely to allow you to use a low-level implementation... and its use is mostly related to bootstrapping... | ||
jnthn | pmichaud: oh | ||
pmichaud: Friday 19th May or Monday 25th May according to my log. | 13:51 | ||
pmichaud | jnthn: thanks. | ||
DanielC wonders if mberends is around now. | |||
jnthn | pmichaud: So it may have been just before the release. | ||
pmichaud | release was 18th, iirc | 13:52 | |
jnthn | Oh, OK | ||
pmichaud | (yes, time flies.) | ||
jnthn | Yes, you're right. | ||
ruoso: OK, the point is that you probably need to be able to write a trait that applies to class-ish things. | |||
ruoso | jnthn, but what are "class-ish" things? | 13:53 | |
jnthn | And it'd be nice to be able to do that without having to implement them per HOW. | ||
ruoso: Probably, things declared with a package declarator. | |||
But maybe that's too weak a definition. | |||
ruoso | so a mixed-in anon class doesn't match... | 13:54 | |
jnthn | I meant semantically more than syntactically. | ||
ruoso | thing is, I thought the concept of "type object" was enough | ||
jnthn | Me too, but TimToady seemed to have the impresstion that the thingy passed to the trait was the metaclass rather than the type object. | 13:55 | |
Which is fine but then needs an answer do, "what do we write to capture that notion in the trait's signature". | 13:56 | ||
ruoso: At the moment I think TimToady++ is having a re-think/review/re-design etc on traits though. | |||
So fro now I'm just waiting to see what comes out of that. | |||
ruoso | yeah... as every corner of the spec the implementations didn't fully implement ;) | 13:57 | |
I think it comes with the territory | |||
as we implement, we find the inconsistencies... | |||
;) | |||
jnthn | pmichaud: Oh hey! The exit segfaults have mostly gone away... | ||
(With an upgrade ot the current build/PARROT_REVISION) | |||
ruoso: Yes, indeed. :-) | 13:58 | ||
13:59
pochi left,
pochi joined,
nnunley joined
14:00
beggars left
|
|||
pmichaud | Pretty soon we'll all just be handwaving like TimToady++ :-) | 14:06 | |
Matt-W | it's a new dance craze | ||
DanielC just figured out that TimToady's nick is based on TIMTOWTDI | |||
jnthn | Heh. Well I hand-waved my way through implementing enums in Rakudo. | ||
14:07
mj41 left
|
|||
Matt-W | and now look what's happened | 14:07 | |
People are USING THEM | |||
jnthn | Yeah, but anyone who attempts to ask me to explain how I implemetned it just gets told to read the source. I can't remember, nor do I want to. :-) | ||
Which is unfortunate given the two failing tests I now have are...enum related. | 14:08 | ||
Matt-W | That, I think, is a clear indication that the implementation could've been done better :) | ||
jnthn | :-| | ||
Matt-W: Heh, it was already done better than the last one. | |||
Matt-W | I remember | ||
jnthn | Matt-W: The main issue is that the spec seems to want enums to be lots of things all at once. | ||
And is rather weak on how to hold those together coherently. | 14:09 | ||
Matt-W | hmm | ||
irritating | |||
pmichaud | yes, I looked at the enums code yesterday and thought... "Huh?" | ||
Matt-W | they're rather more than just aliases for integers | ||
they're members of a new type | |||
and... other things too | |||
jnthn | pmichaud: Go read the spec and you'll probably think "Huh wtf" :-) | ||
pmichaud | jnthn: well, yes, I knew that part also. | ||
rjh | are they comparable to java "enums" | 14:10 | |
pmichaud | they do tend to want to be magical dwim thingies | ||
rjh | which is little more than syntactic sugar around subclasses | ||
Matt-W | no I think they're quite different to java ones | ||
jnthn | rjh: No, it's possible for an implementor to understand the Java ones. ;-) | ||
Matt-W | I'm not quite sure what needs to be magical and dwimmy about enums | ||
pmichaud | lol | ||
Matt-W | I should look at the spec | ||
pmichaud | Matt-W: given enum Day <Sun Mon Tue Wed Thu Fri Sat> | 14:12 | |
we should get | |||
rjh | turning integers back into enum objects is evil | ||
pmichaud | my day $d = 3; say $d.name; # "Wed" | 14:13 | |
er, Day | |||
rjh | my $x = 0 but Yes; | ||
:S | |||
jnthn | pmichaud: No, that one is Wed I think | ||
14:13
mj41 joined
|
|||
jnthn | :-) | 14:13 | |
Matt-W | pmichaud: hmm | ||
14:13
hanekomu_ joined
|
|||
pmichaud | now, the question becomes -- how does that 3 turn into a Day-type thingy? | 14:14 | |
jnthn | pmichaud: That's one of the bits, I didn't yet figure out... | ||
Matt-W | Well if it was C++, I'd say that Day gets a constructor which takes an int | ||
can we do things like that? | |||
would that even work? | |||
jnthn | pmichaud: It may be along the lines of a type-check-that-actually-coerces kinda thing. | ||
pmichaud | Matt-W: except that "Day" isn't a constructor here | ||
it's a type constraint | |||
and... what jnthn++ just said | |||
jnthn | Because of course you can write those. ;-) | 14:15 | |
14:15
[particle]1 left
|
|||
Matt-W | I suppose you ahve to be able to intrude into the 'is 3 a Day' check and say 'yes, yes it is, it's this one' | 14:15 | |
pmichaud | type names on variables aren't coercers -- they're constraints | ||
jnthn | See subset AutoIncrement ;-) | ||
pmichaud | (they can be coercers, but they aren't by default) | ||
jnthn | Making them coercers is evil. | ||
Matt-W | yes | ||
jnthn | But do-able. | ||
pmichaud | my Str $x = 3; # type mismatch, not a coercion | ||
Matt-W | and I'm happy with that | ||
I'm just used to having implicit constructors running in those circumstances | 14:16 | ||
pmichaud | right | ||
but anyway, that means that Day has to act like a subset type | |||
jnthn | Anyway, this is just one of the areas where enums feel insanely dwimmy to me. | ||
Matt-W | in a way... I'm not sure why we want to be able to do that | ||
pmichaud | my Day $x = 18; # probably a constraint violation | ||
jnthn | Yeah, expect os. | 14:17 | |
*so | |||
pmichaud | but in addition to acting like a subset, it also acts like a role | 14:18 | |
because we can do: | |||
my $x = 'hello' but Tue; | |||
14:18
hanekomu left
|
|||
pmichaud | which means that $x.Day and $x.Tue become valid | 14:18 | |
jnthn | OH NO DON'T MAKE ME RELIVE THE HORROR | ||
;-) | |||
Matt-W | umm | 14:19 | |
do we? | |||
why? | |||
jnthn | pmichaud: They're done mostly as roles. | ||
pmichaud | jnthn: right | ||
rjh | Matt-W: rakudo.org/2008/07/enums-and-the-bu...rator.html | ||
pmichaud | jnthn: I'm just saying it's a role that also has to act like a subset type that also has to act like .... | ||
jnthn | pmichaud: Yes, I know, which is why it was horrible to try and implement. | ||
pmichaud | agreed. | ||
jnthn | pmichaud: At the end of the day, ACCEPTS is what really decides how something type checks. | 14:20 | |
So we've got a hook there. | |||
ish. | |||
pmichaud | which is what answers Matt-W's statement.... | ||
14:10 <Matt-W> I'm not quite sure what needs to be magical and dwimmy about enums | |||
:-) | |||
anyway, I'm afk for a bit | 14:21 | ||
Matt-W | okay so that's nice and crazy | ||
I'm not sure why you'd want to use enums like that, but I'm sure somebody has thought of a very clever example | |||
jnthn | rakudo: role Foo { }; say Foo | 14:22 | |
p6eval | rakudo 0b9c9a: OUTPUT«Foo()» | ||
14:22
sri_kraih joined
|
|||
rjh | does this still work | 14:23 | |
rakudo: enum Maybe <No Yes>; my $x = 0 but Yes; say $x.Maybe; | |||
p6eval | rakudo 0b9c9a: OUTPUT«1» | ||
jnthn | rjh: Apparently, yes. :-) | ||
rjh | rakudo: enum Maybe <No Yes>; my $x = 0 but Yes; say $x.Yes; | ||
p6eval | rakudo 0b9c9a: OUTPUT«1» | 14:24 | |
rjh | i am confused here | ||
it's 0-valued, but has the enum type of an index of 1 | |||
jnthn | How so? | ||
I don't follow | |||
rjh | i seem to have that problem a lot :) | 14:25 | |
jnthn | .Maybe is returning the current value. | ||
.Yes and .No return true/false dpending on the current value. | |||
(that is, only value of .Maybe ) | |||
so it's a bit like method Yes { self.Maybe === Yes } or something | 14:26 | ||
Matt-W | the enum-related value stuff is completely different | ||
to the 0 | |||
rjh | okay, but when you do my Maybe $m = 0; | ||
it'll set it to No? | |||
Matt-W | you just get a 0 with some extra methods | ||
rjh: yes | |||
rjh | that seems inconsistent to me | 14:27 | |
jnthn | Matt-W: correct | ||
14:27
finanalyst1 left
|
|||
Matt-W | it's not | 14:28 | |
in the second case, you make a new object which is a Maybe, initialised with a value of 0 (or somehow told that it should have the value of the entry in the enum corresponding with 0) | |||
in the first case, you start with an Int object and add the Maybe stuff to it | |||
rjh | ok | 14:29 | |
Matt-W | rather like you could add the function of a bottle of milk to your salt shaker using some duct tape | ||
14:29
DanielC left
|
|||
rjh | perhaps the better word is 'usability nightmare' | 14:29 | |
but that comes with the territory with perl 6 | |||
so if you were to do "return 0 but Maybe" | |||
would it set the enum type the same way as "my Maybe $m = 0" | |||
jnthn | It's the same difference between having a varible typed as a role vs mixing in the role. | 14:30 | |
rjh: The difference there is that you're mixing in. | |||
Matt-W | "0 but Maybe" is an Int with a Maybe mixed in | ||
rjh | right | ||
14:30
DanielC joined
|
|||
rjh | I can see there is a difference | 14:30 | |
jnthn | You're saying "I take the integer 0 and add another attribute storing the current enum value" | ||
DanielC | @seen mberends | 14:32 | |
lambdabot | mberends is in #perl6. I last heard mberends speak 5h 30m 23s ago. | ||
rjh | Can you think of a situation where you'd want to do "0 but Maybe" and not have it get changed to Yes or No...? | 14:33 | |
I suppose the 'but' operation has to be general | |||
jnthn | Yeah, it is a general role mix-in mechanism. | 14:35 | |
Matt-W decides that saying 0 but Hash is probably rarely a good idea due to a lack of implementations | 14:36 | ||
rjh | lol | ||
jnthn | some(!$tobaco but Hash) | 14:37 | |
rjh | so just for fun, how would I do "return 0 but Maybe" and expect to get No out the other end | ||
jnthn | *smoke | ||
DanielC | masak: You made a new branch of Rakudo, right? (to work on the modules thing). Is it published somewhere? | ||
jnthn | rjh: say $ret_val.Maybe.name | ||
IIRC | |||
masak | DanielC: github.com/rakudo/rakudo/tree/ver-auth-modules | 14:38 | |
rjh | well .Maybe is good enough | ||
DanielC | *click* | ||
masak | DanielC: I've only branched so far, not made any cool commits or anything. | ||
DanielC | masak: Ok. | ||
masak: What part of the source code will you be working on? I'm not familiar with the Rakudo source tree. | 14:39 | ||
rjh | rakudo: enum F<A B C>; say 0.F; | ||
p6eval | rakudo 0b9c9a: OUTPUT«Method 'F' not found for invocant of class 'Int'» | ||
masak | DanielC: src/parser/ contains the grammar and actions of the compiler. | ||
DanielC: the first step would probably be to make the use_statement action recognize versions and/or auths. | 14:40 | ||
rjh | rakudo: enum F<A B C>; say (0 but Maybe).Maybe.name; | ||
p6eval | rakudo 0b9c9a: OUTPUT«Null PMC access in isa()in Main (/tmp/3aLSHuEuG8:2)» | ||
rjh | yay | ||
DanielC | masak: ok | ||
masak | rjh: care to submit a rakudobug? | ||
rjh | rakudo: enum Maybe<A B C>; say (0 but Maybe).Maybe.name; | ||
p6eval | rakudo 0b9c9a: OUTPUT«Method 'name' not found for invocant of class 'Undef'» | ||
14:40
ejs1 joined
|
|||
rjh | rakudo: enum Maybe<A B C>; say (0 but Maybe).Maybe.WHAT; | 14:41 | |
p6eval | rakudo 0b9c9a: OUTPUT«Failure()» | ||
pmichaud | masak: where "recognize" means...? | ||
masak: parse? | |||
masak | no, it already parses them fine. | ||
it means "take some action based on" | |||
pmichaud | oh, I can add a few more details. Currently there's a function called 'use' | ||
so the next step would be to make sure that the vers/auth/other colonpair items are passed to that function | |||
masak | ah. I see. | 14:42 | |
pmichaud | (there won't always be a function called 'use', but that's what we have atm) | ||
14:42
eMaX joined
|
|||
masak | thanks for the pointer. I'll investigate that. | 14:42 | |
14:42
zamolxes left
|
|||
pmichaud | more directly, it might be nice to have a way of grabbing the colonpair items out of a <longname> parse subtree | 14:42 | |
masak | aye. | 14:43 | |
pmichaud | could be an action method, although I don't know if we want to invoke that method on every longname (as the majority of them don't need colonpairs) | ||
maybe an action method only if colonpairs are parsed. | |||
14:44
ejs1 left
|
|||
masak | why not just put that logic in the use_statement action? | 14:45 | |
rjh | rakudo: say (0 but F); | ||
p6eval | rakudo 0b9c9a: OUTPUT«Null PMC access in isa()in Main (/tmp/Pt4uZk2g0i:2)» | ||
rjh | rakudo: 0 but F; | ||
p6eval | rakudo 0b9c9a: OUTPUT«Null PMC access in isa()in Main (/tmp/reA32i3Q4j:2)» | ||
14:46
hanekomu_ left
|
|||
rjh | masak: done, let me know if it sucks | 14:47 | |
DanielC | pmichaud: You are the author of PmWiki? | 14:48 | |
pmichaud | DanielC: Yes. | ||
DanielC | cool | ||
I didn't know that. | |||
masak | rjh: looks fine. | 14:49 | |
rjh++ | |||
rjh | rakudo: enum Maybe <A>; say (0 but Maybe).WHAT | 14:50 | |
p6eval | rakudo 0b9c9a: OUTPUT«Int()» | ||
rjh | rakudo: enum Maybe <A>; say (0 but Maybe).Maybe | 14:51 | |
p6eval | rakudo 0b9c9a: OUTPUT«» | ||
rjh | rakudo: enum Maybe <A>; say (0 but Maybe).Maybe.WHAT | ||
p6eval | rakudo 0b9c9a: OUTPUT«Failure()» | ||
14:51
ejs left
|
|||
rjh | rakudo: enum Maybe <A>; say (0 but Maybe).A | 14:51 | |
p6eval | rakudo 0b9c9a: OUTPUT«0» | ||
rjh | rakudo: enum Maybe <A>; say (0 but A).A | 14:52 | |
p6eval | rakudo 0b9c9a: OUTPUT«1» | ||
Matt-W | I'd have expected that second one to be 0 | 14:57 | |
pmichaud | what's the question being asked here? | ||
14:57
kidd left
14:58
kidd joined
|
|||
rjh | I'm trying to come to terms with the behaviour of enums when mixed in as roles | 14:58 | |
pmichaud | keep in mind that (I think) 0 but Maybe is not the same as Maybe(0) | ||
rjh | rakudo: say Maybe(0).WHAT | 14:59 | |
p6eval | rakudo 0b9c9a: OUTPUT«Could not find non-existent sub Maybe» | ||
rjh | oops | ||
pmichaud | (we don't support that form yet, sorry) | ||
rjh | ah | ||
initially i assumed that was the point of "0 but Maybe", but a constructor-style method would make a lot more sense there | |||
pmichaud | "0 but Maybe" would mean 0 with the Maybe enum role mixed in. | 15:00 | |
rjh | yeah | ||
pmichaud | But the Maybe enum role has its own attribute with the Maybe value. It doesn't use the 0. | ||
rakudo: enum Maybe <A B>; say (3 but B) * 2; | |||
p6eval | rakudo 0b9c9a: OUTPUT«6» | ||
pmichaud | the 3 is still a Int 3 | 15:01 | |
rakudo: enum Maybe <A B>; say (3 but B).B | |||
p6eval | rakudo 0b9c9a: OUTPUT«1» | ||
pmichaud | but it has a Maybe value of 1 (B) | ||
rakudo: enum Maybe <A B>; say (3 but B).Maybe | |||
p6eval | rakudo 0b9c9a: OUTPUT«1» | ||
rjh | got it | ||
thanks | |||
but crucially, when you do my Maybe $m = 0; | 15:02 | ||
you are assigning to the Maybe value, because that's it's actual type | |||
*its | 15:03 | ||
pmichaud | I'm not sure about that (reading spec) | ||
15:04
pmurias left,
flexibeast left,
c9s left,
andreasg_ left,
Jedai left,
kidd left
15:05
pmurias joined,
flexibeast joined,
c9s joined,
andreasg_ joined,
Jedai joined
|
|||
pmichaud | the spec doesn't explicitly say that my Maybe $m = 0 would result in the 0 being coerced | 15:06 | |
15:07
kidd joined
|
|||
pmichaud | although one could reasonably infer that from | 15:08 | |
my day $d = 3; | |||
which is talking about native types | |||
15:09
[particle]1 joined
|
|||
pmichaud | so I'm guessing that's probably the case. | 15:09 | |
and enum type constraints are really coercers (that also check that whatever they're coercing is compatible with the enum) | |||
i.e., through their ACCEPTS method | 15:10 | ||
DanielC | rakudo: "next cmd=a" ~~ m/ \s* next \s+ cmd \s* '=' \s* <alpha>/ | 15:11 | |
p6eval | rakudo 0b9c9a: ( no output ) | ||
DanielC | S05 says that m/ <.ws> next <.ws> cmd <.ws> '=' <.ws> <condition>/ is equivalent to m/ \s* next \s+ cmd \s* '=' \s* <condition>/ | 15:14 | |
pmichaud | Yes, it should be. | 15:15 | |
DanielC | Why is it that some times <.ws> means \s* and other times it means \s+ ? | ||
pmichaud | it means \s+ when we require that we're not in the middle of a word | ||
for example | |||
next <.ws> cmd / will match "next cmd" but not "nextcmd" | |||
while | 15:16 | ||
jnthn | rakudo: enum Color <white gray black>; say Color.pick(2) | ||
p6eval | rakudo 0b9c9a: OUTPUT«12» | ||
jnthn | rakudo: enum Color <white gray black>; say Color.pick(2)>>.name | ||
p6eval | rakudo 0b9c9a: OUTPUT«blackgray» | ||
pmichaud | / next <ws> '=' / will match either "next=" or "next =" | ||
more precisely | |||
DanielC | interesting | ||
pmichaud | / next <ws> . $ / will match "next=" or "next =" and "next b" but not "nextb" | 15:17 | |
DanielC | What does the '.' (dot) do in <.ws> ? | ||
pmichaud | in the case of matching against "next=", the <.ws> acts like a \s*; in the case of matching against "nextc", the <.ws> won't match because it wants a space between any pair of word characters | 15:18 | |
(and so it acts like a \s+) | |||
<ws> means "capture", <.ws> means "don't capture" | |||
DanielC | I see. | ||
So in / next <ws> '=' / if there is a match the $0 variable will contain the spaces? | 15:19 | ||
pmichaud | no, it would be in $<ws> | ||
named subrules capture to the hash interface | |||
DanielC | ok, so it's a different capture from ( ) | ||
pmichaud | yes. | ||
( ) capture to $0, $1, $2, etc. | |||
15:20
donaldh left
|
|||
pmichaud | <foo> captures to $<foo> | 15:20 | |
DanielC | ah, I didn't know that. | ||
pmichaud | (which is the same as $/<foo>, which is the same as $/{'foo'} | ||
15:20
donaldh joined
|
|||
DanielC | But what if you have / <foo> bar <foo> / ? | 15:20 | |
pmichaud | then $<foo> is an array of matches | ||
DanielC | ok | ||
pmichaud | same for quantified parens | ||
DanielC | thanks | 15:21 | |
pmichaud | / (bar)+ / # $0 will be an array | ||
DanielC | that's new... | ||
(I think) | |||
It's a good idea. | |||
With your example, can I do '$size = scalar $0' to find how many times the word 'bar' appears in the text? | 15:22 | ||
pmichaud | '$size = +$0' | ||
DanielC | ok | ||
pmichaud | we don't have a 'scalar' keyword anymore | 15:23 | |
DanielC | ok | ||
Thanks. | |||
15:24
nihiliad joined
|
|||
pmichaud | can also do $size = $0.elems | 15:24 | |
to be slightly more explicit | |||
DanielC | Can you do 0..$^0 too? | ||
pmichaud | yes, although that might give you one more than what you want | ||
rakudo: my $a = [<a b c>]; say 0..$a; # just curious | 15:25 | ||
p6eval | rakudo 0b9c9a: OUTPUT«0123» | ||
pmichaud | okay, good. | ||
normally would do | |||
DanielC | rakudo: my $a = [<a b c>]; say 0..$^a; | ||
p6eval | rakudo 0b9c9a: OUTPUT«0123» | ||
pmichaud | rakudo: my $a = [<a b c>]; say 0..^$a; # just curious | ||
p6eval | rakudo 0b9c9a: OUTPUT«012» | 15:26 | |
pmichaud | rakudo: my $a = [<a b c>]; say ^$a; # or even | ||
p6eval | rakudo 0b9c9a: OUTPUT«012» | ||
DanielC | ah, that's the one. | ||
So @^arr means the same as +@arr but ^@arr means (+@arr - 1) ? | |||
pmichaud | no, I misread earlier | 15:27 | |
@^arr would be a positional param, and what you wrote earlier woulnd't work | |||
lambdabot | Maybe you meant: arr yarr | ||
pmichaud | 0..^@arr means 0..(+@arr - 1) | ||
it actually parses as 0 ..^ (+@arr) | |||
15:28
barney left
|
|||
pmichaud | which means from 0 up to (but not including) the number of elements in @arr | 15:28 | |
DanielC | rakudo: my $a = [<a b c>]; say $^a; | ||
p6eval | rakudo 0b9c9a: OUTPUT«a b c» | ||
pmichaud | $^a is a parameter shortcut | ||
i.e., it's a placeholder param | |||
(man, I can't type straight this morning, or get my terms correct.) | |||
DanielC | rakudo: my $a = [<a b c>]; say $a; say $^a | 15:29 | |
p6eval | rakudo 0b9c9a: OUTPUT«a b ca b c» | ||
pmichaud | in this case rakudo is treating $^a as the same as $a. It should probably complain about a redeclared $a | ||
you probably recognize $^a better from: sort: { $^a cmp $^b } | |||
DanielC | ah, yes... $^a is what you use in a sub. | ||
masak | DanielC: also, those [] are redundant. | ||
DanielC | Yes, I recognize it now. | ||
pmichaud | the [] aren't redundant. | 15:30 | |
(they used to be, but are no longer) | |||
masak | oh. | ||
rakudo: my $a = [<a b c>]; say $a.perl; $a = <a b c>; say $a.perl | |||
p6eval | rakudo 0b9c9a: OUTPUT«["a", "b", "c"]["a", "b", "c"]» | ||
pmichaud | (rakudo still implements the "used to be" semantic, though | ||
masak | aye. | ||
how will it be when it's no longer how it used to be (which it still is)? | 15:31 | ||
pmichaud | DanielC: anyway, ^(value) is the same as 0 ..^ (value) | ||
so ^3 is the same as 0 ..^ 3 which gives the elements 0, 1, and 2 | |||
DanielC | rakudo: say ^3 | 15:32 | |
p6eval | rakudo 0b9c9a: OUTPUT«012» | ||
DanielC | interesting | ||
pmichaud | ^@arr is the same as 0 ..^ @arr which gives the elements 0, 1, 2, ... , @arr-1 | ||
DanielC | Is $a = <a b c> supposed to give an error now? | ||
rjh | rakudo: my Undef $u; [$x.WHAT, $x.HOW, $x]>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«Malformed declaration at line 2, near "Undef $u; "in Main (src/gen_setting.pm:0)» | ||
rjh | rakudo: my Any $u; [$x.WHAT, $x.HOW, $x]>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/62DbxdhcOt:2)in Main (src/gen_setting.pm:3166)» | ||
rjh | i'm an idiot | 15:33 | |
rakudo: my $x; [$x.WHAT, $x.HOW, $x]>>.say | |||
p6eval | rakudo 0b9c9a: OUTPUT«Failure()Could not find non-existent sub die» | ||
pmichaud | DanielC: $a = <a b c>; isn't an error, but it won't end up being an Array | ||
DanielC | ok | ||
masak | pmichaud: what's that "Could not find non-existent sub die" error there? | ||
pmichaud | masak: I have no clue. PerlJam said he was seeing those also. | ||
masak | I've seen it before too. | 15:34 | |
pmichaud | oh! | ||
masak | rakudo: my $x; $x.HOW | ||
p6eval | rakudo 0b9c9a: ( no output ) | ||
jnthn | masak: Gone in dispatch refactor I expect. | ||
pmichaud | I'm guessing that the P6object stuff is still looking for "die"(...) | ||
masak | ah. | ||
pmichaud | which disappeared when we switched HLLs | ||
jnthn | Right. | ||
masak | :) | ||
masak submits rakudobug | |||
rjh | aren't Failure() objects going out of vogue | ||
jnthn | masak: It's already fixed locally... | ||
masak | jnthn: then you get to close one more! :) | 15:35 | |
pmichaud | rjh: yes -- we still need to turn Failure into a role | ||
jnthn | Yeah I just lvoe the administrative overhead! | ||
15:35
Lectus left
|
|||
jnthn | :-P | 15:35 | |
rjh | anyways I was attempting to do Ruby's .methods | ||
pmichaud | masak++ is just trying to pad his bug resume | ||
rjh | i found it! | ||
;) | |||
masak | I don't know if I should laugh or go on strike. :P | ||
DanielC | The ^ is surprisingly logical: ^foo == 0..^foo == 0..(foo - 1). That works whether foo is 3, $val or @arr... because (@arr - 1) is in scalar context. | ||
pmichaud | DanielC: correct. | 15:36 | |
In general, it's the "up to" operator :-) | |||
DanielC | ok | ||
masak | jnthn: if you dislike the administrative overhead, stop creating so many new bugs. :P | ||
pmichaud | s/bugs/features/ | ||
rjh | rakudo: say $x.methods | ||
p6eval | rakudo 0b9c9a: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/q8licMqPP4:2)in Main (src/gen_setting.pm:3166)» | ||
rjh | rakudo: my $x; say $x.methods | ||
p6eval | rakudo 0b9c9a: OUTPUT«Method 'methods' not found for invocant of class 'Failure'» | ||
jnthn | rjh: it's meta | 15:37 | |
pmichaud | rakudo: my $x; say $x.^methods | ||
p6eval | rakudo 0b9c9a: OUTPUT«ACCEPTSdefinedhandledperl!exception!throw_unhandled» | ||
DanielC | rakudo: say (^ 3).perl | ||
p6eval | rakudo 0b9c9a: OUTPUT«0..^3» | ||
rjh | rakudo: my $x; $x.methods>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«Method 'methods' not found for invocant of class 'Failure'» | ||
DanielC | rakudo: say (^3).perl | ||
p6eval | rakudo 0b9c9a: OUTPUT«0..^3» | ||
rjh | rakudo: my $x; $x.^methods>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«ACCEPTSdefinedhandledperl!exception!throw_unhandled» | ||
rjh | thanks | ||
pmichaud | omg.... looks like postfix:<++> might actually be pretty close to almost being finished for real this time | 15:38 | |
rjh | rakudo: Any.methods>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«Could not find non-existent sub die» | ||
rjh | i notice .^methods doesn't include itself? how do I get a list of meta methods? | ||
pmichaud | rakudo: Any.HOW.methods>>.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«too few arguments passed (1) - 2 params expectedin Main (src/gen_setting.pm:3166)» | ||
pmichaud | rakudo: Any.HOW.methods(Any.HOW)>>.say | 15:39 | |
p6eval | rakudo 0b9c9a: OUTPUT«doesparentsmethodsdispatchWHATisacanadd_parentadd_parentadd_methodadd_methodadd_attributeadd_rolecompose_roleregisternew_classget_protoget_parrotclass» | ||
rjh | neat | ||
jnthn | Any.HOW.^methods>>.say | ||
rakudo: Any.HOW.^methods>>.say | |||
p6eval | rakudo 0b9c9a: OUTPUT«Method '!.^' not found for invocant of class 'P6metaclass'» | 15:40 | |
jnthn | wtf | ||
oh | |||
pmichaud | metaobjects don't have .^methods | ||
rjh | why not? ;) | ||
jnthn | Hmm? | ||
pmichaud | (they probably could, if Any.HOW.HOW == Any.HOW) | ||
pugs_svn | r26980 | pmurias++ | [re-smop] attributes should have a unique private_name (TBD) | ||
r26980 | pmurias++ | instead of playing games with $?PACKAGE | |||
pmichaud | Any.^methods is the same as Any.HOW.methods | ||
pugs_svn | r26981 | pmurias++ | [re-smop] | ||
r26981 | pmurias++ | added &PRIMITIVE::storage_name | |||
r26981 | pmurias++ | started work on $! | |||
r26981 | pmurias++ | sketched out in sig.t how Signature might be implemented | |||
pmichaud | or, in general | 15:41 | |
masak | pmichaud: ping | ||
pmichaud | $x.^methods is the same as ($x.HOW).methods | ||
masak: pong | |||
masak | pmichaud: oops, tab completion fail. :/ | ||
pmurias: ping | |||
pmurias | ruoso: could you look at re-mildew/sig.t | ||
masak: pong | |||
masak | pmurias: did you see Leto's mail from earlier today? | ||
pmurias: he mentioned you. | |||
pmurias | masak: haven't seen it... where was it sent to? | 15:42 | |
pmichaud gazes hopefully at his spectest run, noticing no failures yet. | 15:43 | ||
masak | pmurias: tpf-gsoc | ||
don't know if it's public, but here: groups.google.com/group/tpf-gsoc/br...6e0767e2f1 | |||
jnthn gazes at his hopefully now being down to just one test file that has a fail he needs to fix before comitting the dispatch branch | 15:44 | ||
rjh | jnthn: looking forward to it :) | ||
jnthn | Good news: 1 failing test file. Bad news: it fails by segfaulting. | ||
pmichaud | afk for a bit | 15:45 | |
15:45
REPLeffect joined
|
|||
pmurias | masak: i don't think it's public | 15:45 | |
masak | no, me neither. | 15:46 | |
pmurias | masak: was the mail something worrying? | ||
masak | pmurias: he simply wondered why he hadn't heard from some GSoC students. and he listed you as one of them. | ||
that seemed strange to me, since you are here a lot. | 15:47 | ||
pmurias: but you should perhaps consider joining that list. | |||
since it seems that at least Leto is trying to reach you through it. :) | |||
15:48
eMaX left,
xalbo left
15:49
payload joined,
dakkar left
15:50
mizioumt left
|
|||
jnthn | oooh...I see potential for accidental collection of referenced stuff... | 15:51 | |
16:05
icwiener joined
16:07
Chillance joined
|
|||
jnthn | ...unfortunately, fixing that didn't fix the problem. :-( | 16:08 | |
16:09
abra joined
|
|||
TimToady | DanielC: actually, int $a/$b will not do long term, so I recommend writing int($a/$b) | 16:12 | |
the problem is that int is a type name, and so can't also parse like a prefix operator | |||
dalek | kudo: b9bfabc | pmichaud++ | src/ (8 files): Fix postfix:<++> to be faster in general, and faster still for Ints. In order to get this to work, we also: * Fixed ++/-- to auto-promote to Num/BigInt as needed * Changed !DEREF to check isa using a class object instead of a Key * Refactored all of the autoincrement/decrement operators * Fixed infix:<does> to now work on Integer/Float/String PMCs * Cleaned up .succ and .pred in Bool * Rewrote the .succ and .pred rules for Str in PIR (was C), made it extensible to unicode ranges, and removed no-longer-the-right-place increment/decrement vtable in Perl6Str * Removed the not-quite-working Range.clone method -- we can inherit from Object anyway. |
||
DanielC | TimToady: ok | ||
masak | pmichaud++ | ||
16:13
PacoLinux joined
|
|||
TimToady | and .split('') is better writting .comb now | 16:13 | |
jnthn | rakudo: enum day <Sun Mon Tue Wed Thu Fri Sat>; say day.perl; | ||
TimToady | since it defaults to combing single chars | ||
p6eval | rakudo 0b9c9a: OUTPUT«» | ||
DanielC | rakudo: say ("hello".comb).perl | ||
p6eval | rakudo 0b9c9a: OUTPUT«["h", "e", "l", "l", "o"]» | ||
DanielC | TimToady: thanks | 16:14 | |
masak | rakudo: 'hello world!'.words.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«helloworld!» | ||
masak | rakudo: 'hello world!'.words.perl.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«["hello", "world!"]» | ||
masak | words++ | ||
TimToady | rakudo: '/etc/passwd'.lines.say | 16:15 | |
p6eval | rakudo 0b9c9a: OUTPUT«Method 'lines' not found for invocant of class 'Str'» | ||
TimToady | rakudo: '/etc/passwd'.slurp.say | ||
p6eval | rakudo 0b9c9a: OUTPUT«Method 'slurp' not found for invocant of class 'Str'» | ||
16:15
jhorwitz joined
|
|||
jnthn | rakudo: slurp('/etc/passwd').say | 16:15 | |
p6eval | rakudo 0b9c9a: | ||
..OUTPUT«root:x:0:0:root:/root:/bin/bashdaemon:x:1:1:daemon:/usr/sbin:/bin/shbin:x:2:2:bin:/bin:/bin/shsys:x:3:3:sys:/dev:/bin/shsync:x:4:65534:sync:/bin:/bin/syncgames:x:5:60:games:/usr/games:/bin/shman:x:6:12:man:/var/cache/man:/bin/shlp:x:7:7:lp:/var/spool/lpd:/bin/shmail:x:8:8:m… | |||
masak | o_O | ||
TimToady | rakudo: lines('/etc/passwd').say | 16:16 | |
jnthn | oh noes safe mode is has a fail | ||
p6eval | rakudo 0b9c9a: | ||
..OUTPUT«root:x:0:0:root:/root:/bin/bashdaemon:x:1:1:daemon:/usr/sbin:/bin/shbin:x:2:2:bin:/bin:/bin/shsys:x:3:3:sys:/dev:/bin/shsync:x:4:65534:sync:/bin:/bin/syncgames:x:5:60:games:/usr/games:/bin/shman:x:6:12:man:/var/cache/man:/bin/shlp:x:7:7:lp:/var/spool/lpd:/bin/shmail:x:8:8:mail:/var… | |||
pmichaud | changing the namespace symbol entries won't elimnate the methods :-) | ||
masak | oh noes! | ||
jnthn | hehe | 16:17 | |
Phew...got my segfault down from a 70 test script to a 1 liner. | |||
pmichaud | I've always hated the term "safe mode" in the PHP world, though. | ||
It's misnamed. | 16:18 | ||
jnthn | Because PHP is never safe? ;-) | ||
pmichaud | It's really "crippled mode". In most environments, "safe mode" doesn't actually make things significantly safer. | ||
jnthn | Well, so far Rakudo's one seems to fir the name perfectly. | ||
pmichaud | kinda like barricading the door while leaving the windows open. | ||
jnthn | ;-) | ||
masak goes swimming | 16:19 | ||
ruoso | pmichaud, re Any.HOW.HOW... nothing stops Any.HOW.HOW to be different from Any.HOW... it's just another object... | ||
16:19
masak left
|
|||
pmichaud | Worse, working around PHP's "safe mode" often means that we have to do things that actually make the overall system less safe. | 16:20 | |
ruoso: I know -- that was kinda what I was saying (albeit not clearly) | |||
that Any.HOW.HOW wasn't necessarily Any.HOW | |||
ruoso | ah... ok... | ||
so metaobjects do have .^methods | 16:21 | ||
pmichaud | and thus Any.HOW.^methods would be the same as Any.HOW.HOW.methods (I think) | ||
ruoso | Any.^methods is Any.HOW.methods(Any) | ||
pmichaud | right. | ||
ruoso | Any.HOW.^methods is Any.HOW.HOW.methods(Any.HOW) | ||
pmichaud | yes, we agree. | ||
ruoso | cool | ||
jnthn | Me too. :-) | ||
The problem now is just the way .^ is implemented. | 16:22 | ||
pmichaud | ?? | ||
pmurias | ruoso: have you seen re-mildew/sig.t | ||
pmichaud | why is that currently a problem? | ||
ruoso updating in this second | |||
jnthn | pmichaud: As a method !.^ on Object. | ||
ruoso | jnthn, .^ is syntax | ||
pmichaud | oh. | ||
jnthn | ruoso: yeah, I know | ||
pmichaud | that part | 16:23 | |
ruoso | the compiler itself can implement .^foo to be expanded as .HOW.foo($invocant) | ||
jnthn | pmichaud: Yeah, I've avoid that anti-pattern elsewhere. :-) | ||
ruoso: It could. Doesn't have to be done that way. | |||
ruoso: But it may be what I end up fixing it to do. | |||
TimToady | at some point we've got to stop defining non-primitives :) | 16:24 | |
ruoso | true... but notice the signature from Foo.^methods and Foo.HOW.methods differ | ||
jnthn | ruoso: Yeah, that mangling is why it was easier to do it the way it currently is. | ||
16:25
sparc left
16:26
iblechbot joined
|
|||
ruoso | pmurias, wow... that looks nice | 16:27 | |
pmurias | bjj& | 16:30 | |
16:30
pmurias left
|
|||
TimToady | ruoso: if you want new [] each time, instead of [] xx $n, use [] for ^$n | 16:32 | |
though I don't think rakudo implements list comprehensions yet | |||
ruoso | TimToady, yeah... pmichaud told me that already... I submitted my final version to the list | 16:33 | |
TimToady | k, still backlogging :) | ||
and I always figure it's better to be told too many times than too few :) | |||
ruoso | heh... indeed.. | 16:34 | |
16:35
mizioumt joined,
nihiliad left
|
|||
ruoso | pmurias++ # mildew has "map" now | 16:37 | |
mildew: say "evalbot up?" | |||
p6eval | mildew: OUTPUT«Bareword found where operator expected at perl6-snapshot/STD.pm line 4, near "$LANG is" (Missing operator before is?)Bareword found where operator expected at perl6-snapshot/STD.pm line 5, near "$PKGDECL is" (Missing operator before is?)Bareword found where operator expected | ||
..at… | |||
16:37
Zooix joined
|
|||
ruoso | nah | 16:37 | |
16:37
Psyche^ joined
|
|||
Zooix | Hi all ! I would like to try Perl 6 but I don't know where to start ! Can you give me some links (in French if you can, if not in english) to start on good basis with Perl 6 please | 16:38 | |
16:39
Patterner left,
Psyche^ is now known as Patterner,
jferrero left
|
|||
DanielC | Zooix: Do you have a Perl 6 compiler installed? | 16:39 | |
sbp | Zooix: try in the sense of "install", or in the sense of "learn the language"? | ||
Zooix | sbp, both | ||
DanielC, no | |||
DanielC | Zooix: rakudo.org/how-to-get-rakudo | ||
Zooix | I've just Parrot | 16:40 | |
just* | |||
DanielC | Zooix: All Perl 6 compilers today are incomplete, but Rakudo is complete enough to make a lot of real programs. | ||
sbp | Zooix: to install, I did this: | ||
$ git clone git://github.com/rakudo/rakudo.git | |||
$ cd rakudo | |||
$ perl Configure.pl --gen-parrot | |||
Zooix: if you already have parrot and want to use it, you'd have to use another process | 16:41 | ||
Zooix | sbp, ok, thanks | ||
sbp | (as --gen-parrot means to get parrot for you) | ||
DanielC | sbp: It's easier if Zooix just uses the standard method. | ||
Zooix | I'll notice it cause I'm on WIndows now but I'll installa GNU/Linux distrib tonight | ||
sbp | rakudo is a (well, the) leading perl6 implementation; there are others | ||
Zooix | surely Zenwalk :D | ||
thank you two ! Bye ^^ | 16:42 | ||
16:42
Zooix left
16:44
armagad left
|
|||
rjh | does parrot/rakudo have localisation for built-in error messages? | 16:48 | |
jnthn | rjh: Not yet, but I remember someone starting some work on that for Parrot. | 16:49 | |
rjh | jnthn: cool, i don't think many other languages do it | ||
pmichaud | use.perl.org/comments.pl?sid=43083&cid=68891 | 16:50 | |
rjh | does it still use 1.4 gigs of ram | 16:52 | |
pmichaud | I don't know. Doubtful. | 16:54 | |
I suspect many of those gigs were due to extra PMCProxys or something. | |||
what's an easy way to measure? | |||
16:54
ejs joined
|
|||
rjh | ps? | 16:54 | |
pmichaud | looks like 83 megabytes on my box, unless I'm reading it incorrectly. | 16:56 | |
rjh | yikes | ||
1.4gbs seems like an error on his part, or something incredibly strange | 16:57 | ||
pmichaud | no, he did 10x the number of iterations that I did | ||
16:58
ejs0 joined
|
|||
jnthn | pmichaud: So, segfault avoided. | 17:03 | |
pmichaud | \o/ | ||
jnthn | pmichaud: And a previously todo'd spectest fixed in the process. | ||
pmichaud | \o/ x 2 | 17:04 | |
jnthn | I'm running make spectest now. But that test was my final failure that I could see was related to my dispatcher changes. | ||
Which means I can probably push them. | |||
pmichaud | good. did you merge in my changes yet? | ||
jnthn | No, that might have been wise before my spectest run actually... | ||
jnthn cancels and does so. | |||
pmichaud | yes, I think so. | 17:05 | |
jnthn | Did you bump parrot revision again? | ||
pmichaud | no. | ||
not for that. | |||
currently 39288 | |||
(or later...) | |||
17:07
M_o_C joined
|
|||
jnthn | Whoa...that makes a difference in tools/benchmark.pl :-) | 17:08 | |
('cus the ranges are faster) | |||
pmichaud | I'm about to make another change to improve ranges even more | 17:09 | |
17:09
nihiliad joined
|
|||
jnthn | OK, spectesting with mine and yours. :-) | 17:10 | |
jnthn crosses fingers | |||
pmichaud | merged cleanly? that's a good sign. | ||
jnthn | pmichaud: Yes. | ||
17:16
ejs left
17:18
nihiliad1 joined,
nihiliad left
17:19
nihiliad1 left
17:29
DanielC is now known as DanielC_away
17:30
nihiliad joined
17:33
kane__ joined
|
|||
jnthn | \o/ | 17:38 | |
17:39
[particle] left
17:40
mizioumt1 joined,
[particle] joined
|
|||
dalek | kudo: 711bd6d | jnthn++ | (14 files): Large refactor of method dispatch, providing deferal, eliminating some levels of indirection in method dispatch and improving performance. Also starts a refactor of roles since various past tricks will no longer fly and we should fiddle less with Parrot's Role PMC, though much remains to be cleared up there so roles are a little messy for now. |
17:41 | |
kudo: ff312ab | jnthn++ | : Merge branch 'master' of [email@hidden.address] |
|||
kudo: 03e90ad | jnthn++ | src/ (4 files): Track down a couple of issues relating to enums and role punning, which were causing test fails, plus track down a bug with .perl on roles. |
|||
kudo: 2044332 | jnthn++ | : Merge branch 'master' of [email@hidden.address] |
|||
17:41
zippete joined
|
|||
pmichaud | I should review jnthn++'s changes, but I'm afraid of what I might see.... :-P | 17:43 | |
jnthn | pmichaud: 1500+ line diff. ;-) | ||
pmichaud: Role punning is The Mess now. I've got some re-org to do. | |||
pmichaud | AIIIIGH, MY IIIZ IS BURNIN! | ||
jnthn | hehe | ||
P6Invocation and P6opqaue are where the interesting bits are. | 17:44 | ||
pmichaud | IZ READIN YR CODE THRU MY FINGERZ | ||
no major changes to P6object, other than what's already in Parrot? | |||
jnthn | Nope. | 17:45 | |
pmichaud | Cool. | ||
jnthn | Apart from | ||
One less method that we poke into it. | |||
Also | |||
We subclass Parrot's Roke PMC | |||
pmichaud | less filling --> tastes great | ||
the second version of that PMC is likely B-Roke :-) | |||
jnthn | I need to rename/move Role.pir out of src/parrot/ into src/classes/ now or something. | ||
pmichaud | anything that runs in the Parrot HLL namespace should stay in src/parrot | 17:46 | |
jnthn | *Role :-P | ||
pmichaud | anything else should go out | ||
jnthn | Yes, the point is that it doesn't now. :-) | ||
So we're fudging methods into one less Parrot thingy. | |||
One thing that is awkward is "what to pun and what not to" | 17:47 | ||
Example: we can't pun .ACCEPTS because if we do we break type checking. | |||
pmichaud | ummm, Role.pir is still in the Parrot HLL namespace? | 17:48 | |
jnthn | We got away with this before because we only punned things sent through !dispatch_method so we could sneakily call whatever we wanted without it getting punned by not going through that. | ||
It is? | |||
Oh | |||
It's adding methods to a PMC still. :-| | |||
And all PMCs live in the Parrot namespace. :-/ | |||
OK, it has to stay there then. | |||
It should be adding to the P6role rather than the Role ns now though. | 17:49 | ||
pmichaud | Correct | ||
okay, I feel better now. | |||
jnthn | OK, good. | ||
17:49
kane_ left
|
|||
pmichaud | maybe change Role.pir to P6Role.pir, though. | 17:51 | |
so it's not confused with the other Role.pir that is in the perl6 hll | |||
jnthn | Yes | ||
I've got some do-less-class-checks-by-name things to do yet which should win some extra performance. | 17:52 | ||
Plus other ideas to try. | 17:53 | ||
So this is as much a start as a finish. :-) | |||
payload | i want to use a git-svn repo of parrot with rakudo... I currently hack the --gen-parrot to use git-svn and a custom directory... though it takes time, cause i am rel new to perl :) | ||
pmichaud | I'm looking at parrot's isa_pmc right now to see why it's so slow. | 17:54 | |
I'm wondering if we'll want a root_isa opcode to go along with root_new | |||
actually, a dynop might be even better. | 17:55 | ||
we could make a table of fast isa checks. | |||
jnthn | aye | ||
isa_pmc should be just poitner arith, surely? | |||
pmichaud | HAHAHAHAHAHAHAHAHAHAHAHAHAHA | 17:56 | |
tell me another good one :-) | |||
here: | |||
jnthn | for each parent { if it == the_thing_we_look_for { return 1 } } | ||
pmichaud | pmc_name = VTABLE_get_string(interp, lookup); | 17:57 | |
return parrot_hash_exists(INTERP, isa_hash, (void *)pmc_name); | |||
jnthn | !! | ||
That sounds a little more expensive... | |||
pmichaud | sure, since we create a gc-able string on each lookup. | ||
oh, it gets better. | 17:58 | ||
jnthn | ouch | ||
pmichaud | that's default.pmc:897 | ||
jnthn | why isn't it just copy on write... :-S | ||
pmichaud | for Object PMCs, which first does the call I just gave | ||
we then proceed to ask the Class PMC for it to check | 17:59 | ||
it then does | |||
classobj = Parrot_oo_get_class(interp, lookup); | |||
(which is probably where our extra PMCProxys come from) | 18:00 | ||
and then | |||
we do the get_string trick all over again | |||
and then | |||
we recursively call isa_pmc for any parent classes | |||
which does that call to Parrot_oo_get_class and get_string trick again for each parent class (and their parents) | 18:01 | ||
there is one short-circuit on pointer arithmetic if we happen to hit the match directly | |||
but otherwise we're comparing strings | 18:02 | ||
doesn't the mro already have *all* of the parents in it? | |||
(including their ancestors?) | |||
i.e., we don't need the recursive call? | 18:03 | ||
jnthn | all_parents should contain...all parents. | 18:04 | |
Even if they are from different class universes | |||
pmichaud | right | ||
18:04
renormalist joined
|
|||
jnthn | It should have at some point asked for them. | 18:04 | |
pmichaud | so we're taking an O(n) operation and turning it into O(n^2) | ||
jnthn | Right. | ||
18:04
renormalist left
|
|||
jnthn | With a bit factor to boot. | 18:04 | |
pmichaud | with string lookups all the way | ||
jnthn | I had assumed that isa called isa_pmc... | 18:05 | |
pmichaud | so when you get to something that is deeply nested | ||
this *is* isa_pmc | |||
jnthn | No, I mean | ||
pmichaud | this *is* VTABLE_isa_pmc | ||
jnthn | VTABLE)isa (string) would have been implemented by a lookup + then VTABLE_isa_pmc | ||
pmichaud | even that doesn't help. | ||
$I0 = isa $P0, ['Integer'] | 18:06 | ||
jnthn | Sure, not if isa_pmc is doing that crazy stuff! | ||
pmichaud | callsa isa_i_p | ||
18:06
renormalist joined
|
|||
pmichaud | (actually isa_i_pc) | 18:06 | |
the problem is actually *in* VTABLE_isa_pmc | |||
so, if we have an object of type Perl6Array | 18:07 | ||
and we're doing an isa check on it | |||
we end up doing | |||
18:07
mizioumt left
|
|||
pmichaud | O( (Perl6Array, List, Any, Perl6Object, P6object, Object, ResizablePMCArray, FixedPMCArray) ** 2) | 18:08 | |
jnthn | Yes, I follow, I'm just not being too clear. | ||
pmichaud | and if we happen to have a Perl6Scalar referencing the Perl6Array, we add that to the list above as well. | ||
jnthn wonders what happens if we rip the crap out and just iterate a list of pointers | |||
pmichaud | I might do that. | ||
But this is what I've been really complaining about when saying we do class membership checks with strings | 18:09 | ||
it's deep in Parrot | |||
(all the way down to VTABLE_isa_pmc, as you can see) | |||
jnthn | We're dynamic so we need to be able to somewhat _but_ when we already have something resolved from a name we should be able to use it directly. | ||
Not turn things we can do fast back into named checks. | |||
pmichaud | exactly | 18:10 | |
even if it's not pointer arithmetic -- every unique type gets a type id, yes? | |||
jnthn | Also, the fact that we can ever get multiple PMCProxy instances disturbs me (I had never intended that to be a possible occurence). | ||
Yes but the point is it *should* be doable by a pointer comp. | |||
pmichaud | sure, but the type id would "solve/workaround" the issue of when we end up with multiple PMCProxys, for now. | 18:11 | |
jnthn | The PMC representing a class (be it a PMCProxy for a Class) should be canonical. | ||
jnthn wonders why we aren't attaching the PMCProxy to a slot in the VTABLE rather than screwing around with namespace storage. | |||
pmichaud | well, namespaces still need to be able to map to their class. | ||
even for non-PMCProxy items | 18:12 | ||
jnthn | Sure we can _cache_ it in the namespace too. | ||
But at least hanging it there might help keep it canonical. | |||
pmichaud | anyway, I'll probably work on this a bit later | ||
jnthn | *nod* | ||
It'd be worth it. Fast isa checks would help us plenty. | |||
does-a too. | 18:13 | ||
pmichaud | Not only in Rakudo. | ||
PGE does a lot of isa checks. | |||
And I don't know what Parrot's MMD dispatch uses -- if it uses VTABLE_isa | |||
jnthn | erm, does. | ||
It calls ACCEPTS | |||
And does whatever that dos. | |||
*does | |||
pmichaud | no, not Rakudo's MMD | ||
*Parrot's* MMD | |||
jnthn | Oh, Parrots. | ||
Who knows. :-) | |||
pmichaud | right | ||
jnthn | It doesn't even have a cache. ;-) | ||
(For MultiSub) | |||
pmichaud | but if it's using _isa, then it would be also adding GC pressure | ||
like, a tone | 18:14 | ||
*ton | |||
18:14
nihiliad left
|
|||
jnthn | right | 18:14 | |
18:14
amoc left
|
|||
jnthn | Speeding that up would get PAST::Compiler faster I guess? | 18:15 | |
'cus that uses Parrot's MMD. | |||
pmichaud | yes | ||
and PGE, too. | |||
and P6object | |||
jnthn | :-) | ||
Speed. We needs it. | 18:16 | ||
pmichaud | Lunch. I needs it also. | ||
I'm waiting to see how our spectest runs goes. | |||
jnthn | Ah, with my changes in? OK, here's hoping. :-) | ||
pmichaud | yes. | ||
as of May 21, "make spectest" was requiring 51 minutes on my laptop. | 18:17 | ||
as of yesterday, it was down to 25 mins. | |||
with your dispacher improvements and the changes to postfix:<++>, it's now.... | |||
still running. :-P | |||
18:19
abra left
|
|||
pmichaud | I'm guessing there's about another 10 mins to go on my box | 18:19 | |
oh, is assign.t much faster on your system now? | |||
jnthn | Didn't watch the spectests running too closely...can try it | 18:20 | |
pmichaud | yeah, just try the one test | ||
jnthn | Still takes a while to get started but I think not as long as it sued to. | 18:21 | |
I didn't have a timing though... | |||
pmichaud | I went from 2:30 to :30 | 18:22 | |
jnthn | oh, it was far closer to the second of those | 18:23 | |
OK, dinner time... | |||
cotto | does per6 specify a standard deviation function? | 18:25 | |
TimToady | not currently | 18:26 | |
would be pretty trivial to write one | |||
pmichaud | $mean = ([+] @array) / @array; | 18:27 | |
$std = sqrt( ([+] (( @array >>->> $mean ) >>**>> 2 ) ) | |||
or something like that. | |||
spectest now 23m22. I has 2 failz. | 18:29 | ||
lunchtime. | |||
cotto | Thanks. | ||
It'll be fun getting used to thinking in terms of meta and hyper ops. | 18:30 | ||
except when I have to go back to php | 18:31 | ||
18:31
ejs0 left
|
|||
literal | spack: multimethod | 18:32 | |
how does this work again... | |||
TimToady | spack: multiple dispatch | 18:35 | |
18:37
nihiliad joined,
amoc joined
|
|||
[particle]1 | buubot: spack multimethod | 18:38 | |
buubot | [particle]1: S09-data.pod:1 | ||
18:38
[particle]1 is now known as [particle]-
18:48
amoc left
18:57
pmurias joined
|
|||
pmurias | ruoso: mildew's map is doesn't return an array yet | 18:58 | |
i just use it as a for | |||
ruoso | pmurias, ah... ok | ||
TimToady | is it lazy? | ||
:) | |||
pmurias | ruoso: do you need any Cish things in smop to write a lazy map? | 19:06 | |
ruoso | TimToady, speaking about lazyness... did you happen to see my post in perl6-l about threading and events? | ||
pmurias, we need a proper definition on how lazy things need to behave | 19:07 | ||
the post I'm talking about starts to address it | |||
TimToady | ruoso: when? if it was last week, I probably read it during my 6-day headache, and promptly forgot it | 19:08 | |
ruoso | right... the subject is "RFC: Implicit threading and Implicit event-loop (Was: Re: Continuations)" | ||
19:13
perlmongo left
|
|||
ruoso | TimToady, after some time, I realized every lazy list should be seen as a "continuation" of its own registered in the interpreter, so the main event-loop will raise them as their "buffer" is ready... | 19:18 | |
actually... every lazy object, not just list | |||
19:19
zamolxes joined
19:20
donaldh left
|
|||
TimToady | yes, this seems logical; one can view every gather as establishing an internal thread that know its "standard takeout" | 19:20 | |
19:20
donaldh joined
|
|||
ruoso | TimToady, if you consider gather/take as the basis for all lazynes | 19:22 | |
I tend to see it as just one of the syntaxes | |||
I mean... every map, grep, for, assignment of lazy lists etc | |||
should register themselves as "internal threads" | 19:23 | ||
TimToady | sure, you can view it like that too | ||
needs to be very lightweight on context switching | |||
ruoso | TimToady, the easy part is that it being event-based, it only switch context when something happens | 19:25 | |
so idle threads cause no cost | |||
I also mean that I wouldn't implement a preemptive scheduler, but rather have a "worker thread" pool | 19:26 | ||
which eventually spawn new worker threads on a given condition (i.e. a "continuation" waiting for more than X miliseconds) | 19:27 | ||
sjohnson | i think "say()" being backported to perl 5.10.0 is an urban legend | 19:31 | |
TimToady | it's only enabled if you ask for it | ||
sjohnson | never have i ever got it to work on that version of perl, despite everyone and their dog raving about how it's backported | ||
*sad face* | |||
waaah! | |||
TimToady | tried "use feature 'say'"? | ||
sjohnson | *sob* | ||
payload | \o/ my gen parrot uses git svn | ||
TimToady | or use 5.010; | 19:32 | |
sjohnson | no, i suppose i shuold do that | ||
TimToady: will try it out | |||
Tene | :( rakudo's 'use' updates broke foreign HLL loading. | ||
TimToady | considering Cursor.pmc is using it in 5.10 | ||
Tene | Fixing... | ||
ruoso | TimToady, but you think the ControlExceptionWouldBlock, Observable, Observer thingies are ok? | 19:34 | |
TimToady | have to go back and reread now that I'm sane, or less insane | 19:36 | |
can't right now, timesharing $job | |||
19:37
meehav left
|
|||
ruoso | ok | 19:39 | |
sjohnson | TimToady: have you ever met / heard of a man named Dr. Alan Paeth? | 19:42 | |
jnthn back from dinner | 19:44 | ||
TimToady | can't say that I have, but every time I learn a Japanese verb I forget a name | 19:45 | |
19:45
M_o_C left
|
|||
TimToady | and then I'll forget the verb without remembering the name... | 19:45 | |
19:46
unitxt joined
|
|||
sjohnson | he wrote the Paeth rotation algorithm that's used in things like adobe photoshop. , he was a teacher for me for computer studies. he programs in perl too, old school unix fellow. he has met bill gates and i was hoping you too :) | 19:47 | |
TimToady | if anyone says they've met me, they're probably correct, regardless of what I say. :) | 19:48 | |
sjohnson | maybe he was one of your toadies :) | 19:49 | |
19:53
clintongormley left
|
|||
sjohnson | is it true that people have emailed you / tracked you down so that they could have a hand with their Perl homework? | 19:55 | |
19:56
Scorp2us left,
Scorp1us joined,
masak joined
|
|||
masak | jnthn: ping | 19:56 | |
19:56
kane_ joined
19:57
kane_ is now known as kane[laptop]
|
|||
jnthn | mmaska: pong | 19:59 | |
erm | |||
masak | |||
masak | almost. :) | ||
your latest commit, in src/classes/List.pir on line 218. | 20:00 | ||
just curious if it should be something other than "# XXX this is due to can giving dubious answers due to auto-thread/pun/closure creation" | |||
jnthn | No, it's a todo. | 20:01 | |
Just one I didn't yet decided who is going to be todone. :-) | |||
erm, how | |||
masak | jnthn: what I mean is, the comment is a bit... unclear. | ||
please try and read it yourself, and you'll see. | 20:02 | ||
pmichaud | you want proper grammar in our code?!? | ||
masak | :P | ||
jnthn | You are parsing can as a noun (name of an opcode) rather than as a transative verb? | ||
If not, that's why it might sound bad. ;-) | |||
masak | ooh. | ||
pmichaud | maybe C<can> instead of just "can" | ||
jnthn | Yes. :-) | 20:03 | |
20:03
szabgab left
|
|||
masak | I C<can> fix that. | 20:03 | |
jnthn | I'm hoping that comment doesn't live too long anyways. | ||
pmichaud | ....and people wonder why we think sigils are important :-) | ||
masak | hehe | ||
pmichaud | it's pretty easy to tell that $can is a lot different from can :-) | 20:04 | |
dalek | kudo: a0d09b3 | masak++ | src/classes/List.pir: [src/classes/List.pir] C<> clarification |
20:06 | |
jnthn | When can can actually tells us if we can the comment can go away. | 20:07 | |
masak doesn't manage to parse that after two readings | 20:13 | ||
pmurias | masak: why can't everyone view tpf-gsoc archive? | ||
masak | pmurias: perhaps the discussions there are deemed private to gsoc participants in some way. I'm not sure. | 20:14 | |
pmurias: but you're doing a tpf-gsoc, so you definitely belong. | |||
20:18
[particle]- left
|
|||
masak | }ï{ -- nice. | 20:19 | |
20:22
[particle]1 joined,
DanielC_away is now known as DanielC
|
|||
DanielC | hi all | 20:22 | |
mberends | DanielC: hi again | 20:23 | |
DanielC | hey! | ||
mberends: I've been thinking about the hash thing. Do you have a minute? | |||
mberends | yes, quite a few ;) | ||
DanielC | We can add a counter to the file name: Foo::Bar-auth:92de-ver:1.2.0--0 | 20:24 | |
masak reviews viklund++'s proto changes | |||
DanielC | The counter doesn't mean anything, it's just a counter. | ||
masak | apparently, viklund has the pumpkin right now. :) | ||
mberends | :) | ||
DanielC | mberends: If Rakudo gets another module with the same name, just save it with --1 and so on. | ||
s/same name/same name, version and auth hash/ | 20:25 | ||
mberends | a counter is no problem, in fact that was approximately what I was planning to discuss as a substitute for an :auth hash :) | ||
DanielC | So this can deal with arbitrarily many collisions. | ||
mberends | quite | ||
DanielC | Yeah, with a counter the :auth hash is no longer needed. That said, I wonder if it's still useful to identify different modules that come from the same author. | 20:26 | |
mberends | no, not within Rakudo, only in library management utilities | ||
DanielC | If we keep the author hash, it is easy to get a list of all modules from the same author. I have no idea if that is useful for anything. | 20:27 | |
mberends | not within Rakudo, only outside in other tools | 20:28 | |
it's more beneficial to keep Rakudo streamlined | |||
20:29
eMaX joined
|
|||
DanielC | Yeah, but if the directory name doesn't include the auth: hash the other tools can't benefit (they'd have to actually read each module's metadata). | 20:29 | |
On the other hand, it probably makes sense to skip the hash until there is a proven need. | |||
s/need/benefit/ | |||
mberends | yes | ||
DanielC | So we start with Foo::Bar-ver:1.2.0--0 then? | 20:30 | |
(or something similar) | |||
mberends | yes, (something similar) | ||
the exact format can still be ironed out, other principles come first | 20:31 | ||
DanielC | such as? | ||
mberends | a single directory scales very badly on many file systems | ||
DanielC | hm | ||
Foo/Bar-ver:1.2.0--0 | 20:32 | ||
mberends | directory Foo, filename Bar* etc | ||
DanielC | yeah | ||
that's what I meant by Foo/Bar-ver:1.2.0--0 | |||
mberends | the Perl 5/Java etc idea is too good to throw away | 20:33 | |
DanielC | If you want to go crazy, you could even do Foo/Bar/1.2.0--0 | ||
mberends | maybe, but it's not too crowded in the Foo directory most of the time | 20:34 | |
DanielC | Yeah. | ||
As a guideline, how many files/directories can Foo contain before it is a problem? | 20:35 | ||
masak | DanielC: as a guideline, Perl 5 has a directory structure that has worked very well over the years. | 20:36 | |
mberends | it varies per file system, my intuition says a few hundred/thousand is a tipping point | ||
masak | DanielC: so if you don't do more directories than that, you'll be fine. :) | ||
DanielC | masak: ok | ||
mberends | the implementors of the squid cache had a good look at this issue, but maybe only on Unix | ||
DanielC | masak: But we might have to, if we are going to store multiple versions of the same module. | ||
masak | DanielC: the number of versions will not be very large, I think. | 20:37 | |
mberends | when you configure squid, you set the directory tree width and depth | 20:38 | |
masak | I don't see it exceeding three versions very often, and definitely not ten except in pathological cases. | ||
DanielC | Btw, in Perl 6 applications will have to use the same package manager as the cpan modules. Otherwise, how does the package manager know whether it's ok to delete Foo/Bar-v1.2.0--0 when you install Foo::Bar-v2.1.1 ? | ||
pmichaud | seems to me they ought to be the same manager | 20:39 | |
mberends | the format chosen will apply to Rakudo, proto and all relevant utilities | ||
pmichaud | or at least build from the same codebase | ||
20:39
icwiener left
|
|||
masak | is there a type of block that only runs after a loop has completed by falling out the bottom of its last iteration? | 20:40 | |
DanielC | pmichaud: Not just the same code base, but also the same database. The package manager needs to know that there is something installed that depends on Foo::Bar-v1.2.0 so it doesn't remove it. | ||
pmichaud | DanielC: that's far more complex than I was envisioning. | ||
I'd be surprised if the package manager tries to keep track of every Perl script on the system. | 20:41 | ||
DanielC | pmichaud: Yes. It's more complex than what I had in mind too. | ||
pmichaud | I'd say that would be a site policy. | ||
DanielC | But how else do you deal with dependencies? | ||
pmichaud | by failing when a dependency isn't met | ||
or by having the package manager mark a module as "don't delete this" | |||
or by having a site policy that says "never delete" | 20:42 | ||
or .... | |||
DanielC | pmichaud: Imagine your software breaking every time you upgrade Foo::Bar... | ||
"never delete" seems a bit like a sledgehammer approach. | |||
pmichaud | DanielC: in the most common case, your software probably doesn't want to request a specific version of Foo::Bar | ||
usualy it will want to require a minimum version | |||
if you have software that depends on a specific version of Foo::Bar, then you probably need somewhat more advanced package management than the default policy | 20:43 | ||
DanielC | pmichaud: But Perl 6 allows a software to request a specific version of Foo::Bar, therefore it will happen from time to time. | ||
pmichaud | agreed, which is why I think it becomes a policy issue | ||
mberends | pmichaud: where else should we study implementation of 'use' in addition to src/parser/actions.pm:385-443 (use_statement) ? | 20:44 | |
pmichaud | mberends: src/builtins/eval | 20:45 | |
mberends: src/builtins/eval.pir -- sub 'use' | |||
but that function will change quite a bit | 20:46 | ||
you'll also want to look at 'require', which is what 'use' uses in order to load a module | |||
mberends | pmichaud: thanks :) | ||
masak | if we don't know the encoding of a string, can we really do ord() on it? | ||
pmichaud | yes. | 20:47 | |
each string knows its own encoding | |||
masak | aha. the only thing that's wrong is to assume that it's utf-8, or any other specific encoding. right? | ||
pmichaud | in Parrot, "ord" is not simply "give me the first byte". It's really "give me the first codepoint" | ||
masak | that's neat. | 20:48 | |
20:49
tulcod left
|
|||
masak | mberends: if you have a bit of time, you could help me figure out what's wrong with my Druid web app. I tried to make it show SVG like your web server does, but it wouldn't comply. | 20:49 | |
DanielC | pmichaud: We can delegate package management to a higher-level tool. We can offer a simple, dumb program that simply installs and uninstalls packages. Someone else is free to make a wrapper around that which uses a database to track dependencies. | ||
20:49
szabgab joined
|
|||
pmichaud | DanielC: sounds good. | 20:50 | |
mberends | masak: I read that. I never managed to inline SVG, although the spec describes a way. It may be a browser thing, to have to link to an SVG file rather like referencing a JPG. | 20:52 | |
masak | mberends: I just pushed to druid at github. please try to run bin/web-druid and see if you too get the HTML page repeated inside the <object> inclusion. | 20:53 | |
mberends: there should be an SVG canvas there, but I'm doing something wrong. probably just a path somewhere. :/ | |||
mberends begins trying | |||
masak | when I surf directly to the path, it shows SVG. | ||
I'm writing up Weeb 8 of Web. it would be nice if we got SVG to work before I post. :P | 20:54 | ||
mberends | Weeb is a nice unit of time ;) | ||
masak | it is. :) | ||
it complements the concept of Tuits quite nicely. | 20:55 | ||
FurnaceBoy | is it like a Pomodoro? | 20:57 | |
20:57
kane[laptop] left
|
|||
masak | FurnaceBoy: is a Pomodoro round as well? | 20:58 | |
FurnaceBoy | arguably. www.google.com/search?client=opera&...p;oe=utf-8 | ||
masak | oh, I see it is. | 20:59 | |
FurnaceBoy | :) | ||
round as a tomato | |||
i need tuits | |||
desperately | |||
masak | they're in short supply. | 21:00 | |
21:00
justatheory_ joined
|
|||
masak | but new ones are being minted as we speak. | 21:00 | |
FurnaceBoy | cool. | 21:01 | |
i'd pre-order... if I had time | |||
masak | FurnaceBoy: I'd recommend the book "Momo", but chances are you've already read it... | ||
FurnaceBoy | no I haven't. | 21:02 | |
sounds like something Bruce Mau did? | |||
masak | Michael Ende, actually. | ||
FurnaceBoy | ah. completely off track :) | ||
masak | of "Neverending Story" fame. | ||
FurnaceBoy | i'll check it out. how did it help you? | ||
masak | it's a very #perl6 kind of book, I'd say. | 21:03 | |
FurnaceBoy: it gives a wonderful perspective on time and the values in life. | |||
oh, and it's basically childrens fiction, just like Neverending Story. | |||
but still very enjoyable. | |||
FurnaceBoy | ok neat I have located it. www.abebooks.com/servlet/SearchResu...=0&y=0 | ||
masak | that's the one. | 21:04 | |
mberends | masak: the /board.svg itself is an empty 400x400 rectangle, both called directly or embedded in the home page. First signs are that the containers are all working but the contents are missing. | 21:06 | |
21:07
justatheory left
|
|||
masak | mberends: yes, it should be an empty 400x400 rectangle. but that's not what I see embedded. is that what you see embedded? | 21:07 | |
mberends | the Epiphany browser (Debian) shows the 400x400 rectangle embedded | 21:09 | |
masak | oki. Safari doesn't. | ||
I'll try it in Firefox as well, hold on. | |||
mberends | Iceweasel (aka Firefox) ok here too. | 21:10 | |
jnthn | Iceweasel? lol | ||
masak | huh. works in Safari now, too. | 21:11 | |
mberends: thank you! your extra eyeballs made the bug so shallow it disappeared. :) | |||
FurnaceBoy | :) | ||
mberends | always willing to help in this way :) | ||
FurnaceBoy invites mberends to come over with his powerful tuits | 21:12 | ||
masak | it's more of a combination of tuits and weebs, I think... | ||
mberends | these tuits are so round, they keep falling off the table | 21:13 | |
FurnaceBoy | hm. need to introduce deliberate imperfections | ||
masak supresses a 'your mom' joke | |||
FurnaceBoy | fractal tuits? | ||
21:13
REPLeffect left
|
|||
FurnaceBoy | lol | 21:13 | |
jnthn | masak: I supress a lot of those... | ||
21:13
kane_ joined
21:14
kane_ left
|
|||
jnthn gets out his shaver and heads for some post-dispatch-refactor yaks. | 21:14 | ||
pmichaud | jnthn: okay, I improved the speed of 'isa' a fair bit, but also figured out why the default walks mro recursively | ||
is there a way to look at class immediate parents, instead of all parents? | |||
jnthn | pmichaud: Do I want to know why? :-) | ||
DanielC | mberends: Ok, we picked a naming scheme. What's the next step? :-) | ||
jnthn | pmichaud: Yes, that's what ->parents is. | ||
pmichaud | jnthn: individual classes can override VTABLE_isa | ||
jnthn | pmichaud: Ah. | 21:15 | |
pmichaud | so we have to go through their check | ||
jnthn | ouch. | ||
mberends | masak: web-druid is going to be brilliant! | 21:16 | |
pmichaud | but that might also mean that we should only walk parents instead of mro | ||
DanielC | rakudo: package Foo; | ||
p6eval | rakudo a0d09b: OUTPUT«Unable to parse package definition at line 2, near ";"in Main (src/gen_setting.pm:1435)» | ||
pmichaud | (instead of all_parents) | ||
DanielC | I guess packages are not implemented yet. | ||
masak | mberends: glad you are into the concept. :) | ||
jnthn | pmichaud: Would an override saying "no" mean we stop looking? | ||
Or should it? | |||
21:16
eMaX left
|
|||
masak | mberends: still much left to do, but give me 8 uninterrupted hours of coding... | 21:16 | |
pmichaud | it probably ought to mean we stop looking for that parent | ||
jnthn | Aww. | ||
DanielC | masak: What is web-druid again? | ||
pmichaud | if a parent is changing its notion of 'isa', should we be bypassing it? | 21:17 | |
21:17
om454545445 joined
|
|||
mberends | masak: you can take a Weeb if you want | 21:17 | |
masak | DanielC: ok, so Druid is a board game, with a bit of 3D in it. | ||
DanielC | ah, now I remember. | ||
jnthn | Could we use a flag on the class PMC to mean "no isa overrides"? | ||
21:17
om454545445 left
|
|||
masak | DanielC: Web.pm is a web framework-toolkit-thingie. | 21:17 | |
DanielC: web-druid is Druid running on Web.pm. | |||
DanielC | I like web framework toolkit thingies. | ||
jnthn | pmichaud: That is, we work it out once that there isn't, and the rest of the times we just walk the mro... | ||
masak | jnthn: that sounds a bit like lolspeak. | 21:18 | |
jnthn | I HAZ A OPTIMIZASHUN | ||
pmichaud | jnthn: why would it be bad to just ask the parents ? | ||
masak | DanielC: this web framework toolkit thingies looks a lot at other web framework toolkit thingies out there, and steals the best parts from them. | ||
pmichaud | (ooc) | ||
instead of all_parents ? | |||
mberends | DanielC: next just a Simple Matter Of Programming, around the file references pmichaud++ mentioned earlier ;) | 21:19 | |
jnthn | pmichaud: Because then rather than walking through an array we gotta then go recurse and so on. | ||
DanielC | masak: That's how the best tools are made. Perl is great precisely because it's willing to copy a good idea from someone else. | ||
jnthn | And check for overrides. | ||
pmichaud | I don't think the recursion is so bad. | ||
jnthn | Which I expect has a cost that for _most_ classes does not exist? | ||
pmichaud | well, we currently have the worst of both worlds, in that we're recursively checking every class' "all_parents" | 21:20 | |
ruoso decommute & | |||
21:20
ruoso left
|
|||
masak | DanielC: so far we're copying Rack and Hpricot (from Ruby), Genshi (from Python), and Jifty/Catalyst (from Perl 5). and I probably forgot a few. | 21:20 | |
DanielC | mberends: I think I missed the file references thing. I guess that you mean that someone has to teach Rakudo to look for a module in a certain location. Is that what masak is doing? | ||
jnthn | pmichaud: Ah, no wonder it sucks! | ||
masak | DanielC: yes, that's what I plan to do in the branch. | ||
DanielC | masak: I'll be very interested in your work. | 21:21 | |
masak | DanielC: help welcome. | ||
DanielC | masak: I'm not a brilliant programmer. I'm not sure how much help I can be. | ||
pmichaud | note that "look for module in a certain location" really means "select a module from a set matching x, y, and z characteristics" | ||
DanielC | masak: The grammar stuff looks like Greek to me. | 21:22 | |
masak | DanielC: as far as I can tell, you're quickly building up knowledge about the territory of this problem. keep doing that, and help me design the thing to work in Rakudo. that's all. :) | ||
DanielC | masak: I did find the use_statement method in actions.pm, but it was a bit over my head. | 21:23 | |
masak | DanielC: actually, I might take some weebs to explain it to you. that might help me too. | ||
DanielC | masak: :-) I'll try. | ||
sure | |||
masak | just going to finish this blog post. give me... 10 minutes. | ||
DanielC | ok | ||
pugs_svn | r26982 | pmurias++ | [re-smop] Signature is now part of CORE | ||
pmichaud | how many Weebs is 10 minutes? ;-) | ||
pugs_svn | r26983 | pmurias++ | [re-smop] added a test for assigning to an readonly variable | 21:24 | |
r26983 | pmurias++ | HashBvalue.STORE propagates exceptions correctly | |||
masak | pmichaud: depends on the length of those weebs, duh. :) | ||
pmichaud | looks like 10 minutes ~=~ 1 milliWeeb | ||
jnthn | length? I thought they were round? | ||
masak | no, that's tuits. | ||
pmichaud | there is no length in Perl 6. | 21:25 | |
masak | *lol* | ||
mberends | Perl 6 has great depth | ||
tuits have circumference | |||
jnthn | .oO( there's no length...that's why we don't know how long it will take ) |
||
pmichaud | lol! | 21:26 | |
pmichaud has another quote to add. | |||
21:26
REPLeffect joined
|
|||
masak | "- How far to Christmas? - Don't know, Larry removed .length" | 21:26 | |
21:26
mib_75bhow86 joined
|
|||
mib_75bhow86 | hello | 21:27 | |
masak | mib_75bhow86: hey there. welcome. | ||
mib_75bhow86 | thanks | ||
masak | mib_75bhow86: since you're from mibbit, please start by proving that you're not a bot and that your intentions are friendly. :P | 21:28 | |
mib_75bhow86 | ya sure thing | ||
jnthn hopes git just did the Right Thing with his rename... | |||
masak | git is a he? | 21:29 | |
FurnaceBoy fights bzr :( | |||
jnthn | masak: The rename was mine. ;-) | ||
mib_75bhow86 | do any of you have MKW? | ||
jnthn | masak: git is probably female, because I can't understand it at all... | ||
FurnaceBoy | lulz | ||
masak groans | |||
mberends | mib_75bhow86: is that a disease, or Mark Williams Company? | 21:30 | |
masak | mib_75bhow86: "MKW" == "Milky Way"? it's right outside your window! | ||
mib_75bhow86 | :)hello | ||
FurnaceBoy | Masak Keeps Watch | ||
masak | he does indeed. | ||
FurnaceBoy | mib_75bhow86, hello. why not change your nick to something more personal? | ||
mib_75bhow86 | no that a video game MKW=mario kart wii | 21:31 | |
FurnaceBoy | Mild Kleptomania Warning | ||
mib_75bhow86, you're in the wrong channel. | |||
masak | mib_75bhow86: you're not doing very well on the Turing test so far, I'm afraid. why don't you tell me a bit about Shakespeare poems? | ||
mberends | and don't nobody say W-H-O-Z | ||
mib_75bhow86 | k bye then | ||
masak | mberends: wut wrong wit whoz? | 21:32 | |
mberends | /kick ma<tab> | ||
dalek | kudo: 6ed6997 | jnthn++ | (3 files): Rename Role.pir to P6role.pir now it's adding methods to Rakudo's subclass of Parrot's Role PMC. |
||
masak | Matt-W: watch out! | ||
jnthn | mberends: Using /kick and tab completion considered dangerous. | ||
mberends | jnthn: in the wrong hands | 21:33 | |
the enter key's the problem | |||
masak | :) | ||
mberends: "it's not the fall that's the problem, it's the sudden stop at the end" | 21:34 | ||
21:35
snarkyboojum joined
|
|||
mberends | yup. Mario Kart is quite nice on the DS, don't you think? | 21:35 | |
Muixirt | what is wrong with that line: | 21:36 | |
parrot/parrot -O2 perl6.pbc ~/test/ackermann/ackermann.p6.pl | |||
21:36
Whiteknight joined
|
|||
mberends | masak: I've forked yarn to mutilate it beyond recognition | 21:36 | |
Muixirt | i get following error message: | ||
masak | mberends: sounds excellent. looking forward to your blogging. | ||
Muixirt | too few arguments passed (0) - 1 params expected | 21:37 | |
masak | Muixirt: and the script is... where? | ||
Muixirt | in Main (src/gen_setting.pm:0) | ||
jnthn | Muixirt: Sounds like -O2 makes the program get the wrong answer quickly. | ||
Muixirt | masak, the coomans was invoked inside the rakudo dir | ||
masak | Muixirt: I see. | 21:38 | |
Muixirt: well, I don't have a test/ in my rakudo dir. | |||
Muixirt | masak, oh the p6 script lies somewhere in my home dir | 21:39 | |
masak | Muixirt: it's hard to help you further, then. :) | ||
Muixirt | this works: parrot/parrot -R cgoto perl6.pbc ~/test/ackermann/ackermann.p6.pl | 21:40 | |
masak | strange. | ||
mberends | Muixirt: please paste your ackermann.p6.pl file on sial.org/pbot/perl6 | ||
21:41
lichtkind joined
|
|||
lichtkind | masak: viklund still seems quit? | 21:41 | |
21:42
skids left
|
|||
pasteling | "muixirt" at 91.47.109.66 pasted "little perl6 test script" (30 lines, 607B) at sial.org/pbot/36963 | 21:42 | |
masak | lichtkind: I met him on Friday, when we went to the hackathon. I didn't have the precense of mind to remind him about the account, unfortunately... :/ I'll send him another nudge now. | ||
lichtkind: out of curiosity, what is it that you plan to do on the wiki? | |||
lichtkind | masak: im not quit shure but i maybe make a wiki with small texts and lot of pointers for people who are interestet and come from outside | 21:44 | |
masak: for everything else we have already our internal perl 6 wikis for devs and perl heads | |||
masak | aye. | 21:45 | |
there sure could be some more information about November itself on the site. | |||
21:45
Chillance left,
mib_75bhow86 left
|
|||
lichtkind | of course | 21:46 | |
masak: fortunately i finished my p6tutorial yesterday so i have more mind resources now | |||
masak | sounds good. | ||
mberends | Muixirt: are you implementing en.wikipedia.org/wiki/Ackermann_Function ? | ||
jnthn | pmichaud: By the end of your enhancements, do you expect isa_pmc to be faster than isa (with the string)? | 21:47 | |
Muixirt | mberends, yes | ||
masak | ok, I'll post this blog post, mail-nudge viklund, and then show DanielC around the use_statement action. | ||
pmichaud | jnthn: I think the string is still faster than the pmc. | ||
DanielC | \o/ | ||
lichtkind | masak: is lexikon a english term? | ||
DanielC | lexicon | ||
pmichaud | isa_pmc is faster *if* you happen to pass it the class object directly | ||
lichtkind | thanks :) | ||
masak | lichtkind: what DanielC said. | ||
pmichaud | if you send it a string, that's next fastest | ||
jnthn | pmichaud: OK, I can send it a class PMC. | 21:48 | |
pmichaud | the pain is constantly looking up the class PMC | ||
lichtkind | masak: yeah but dont forget my effort to make a perl 6 lexicon are consume much more time that the 8 part tut i just wrote | ||
pmichaud | if doing it from a dynop, not so painful. A bit painful from PIR. | ||
jnthn | OK, but if I have a situation where I can cache it... | ||
pmichaud | yes, caching it helps. | ||
lichtkind | cheers jnthn | ||
masak | lichtkind: I'm very well aware of that. I've been compiling a TODO for u4x over the past few months. | 21:49 | |
pmichaud | anyway, I'm about to improve isa dramatically for us | ||
jnthn | lichtkind: hi :-) | ||
pmichaud: Great. :-) | |||
pmichaud | I'll give an amount shortly. | ||
lichtkind | masak: whats that? | 21:50 | |
masak | lichtkind: use.perl.org/~masak/journal/38279 | ||
pasteling | "muixirt" at 91.47.109.66 pasted "some error messages" (8 lines, 366B) at sial.org/pbot/36964 | 21:52 | |
21:52
payload left
|
|||
mberends | Muixirt: it works with -O1 and fails as you reported with -O2, making it likely to be a Parrot bug. It may be already known, but I think you would have to ask at #parrot on irc.perl.org. The code is fine otherwise, although there are nitpickers here who might want to rewrite it a little/lot. | 21:52 | |
jnthn | Agree, almost certainly Parrot bug. | 21:53 | |
Muixirt | ok | ||
mberends, if you can come up with a better one :-) | 21:54 | ||
masak comes swinging in on a rope | 21:55 | ||
I sense some nitpicking to be done here! | |||
mberends | Muixirt: no, not me, I make nits for my esteemed colleagues to pick ;) | ||
masak | Muixirt: ($n>0) and ($m==0) don't need parens. | 21:56 | |
mberends | Muixirt: see? | 21:57 | |
Muixirt | as a challenge, the perl5 version is *much* faster | ||
masak | whoa! cool trick with the recursion depth! | ||
Muixirt++ | |||
21:57
jhorwitz left
21:58
zamolxes left
|
|||
masak | Muixirt: oh, and if you ask me, 'loop($n=0;$n<4;$n+=1) {' is better written 'for 0..4 -> $n {' | 21:58 | |
ah, sorry, 'for 0..3 -> $n {' | |||
...of course. | |||
mberends | took the words out of my ... nevermind | ||
masak | Muixirt: that way, you need predeclare only %test, because $n and $m are declared with the loop blocks themselves. | 21:59 | |
mberends | rakudo: for ^4 X ^10 -> $n,$m { "$m,$n ".print } | 22:02 | |
p6eval | rakudo a0d09b: OUTPUT«sh: ./perl6: No such file or directory» | ||
masak | mberends: even nicer! | 22:03 | |
mberends | ruoso++'s idea | 22:04 | |
masak | DanielC: you still there? | ||
DanielC | yup | ||
masak | ok, let's spend a weeb or two on actions.pm, shall we? | 22:05 | |
jnthn | pmichaud: Elimited !DEREF. Little but wrothwhile performance win, especially for deleting code. ;-) | ||
mberends sits up for the lesson | |||
DanielC | sure | ||
jnthn | (Using the dynop instead.) | ||
masak | so, we're at line 386 in actions.pm. | 22:06 | |
DanielC | yup | ||
pmichaud | I'm getting a build failure. | ||
DanielC | my $name := ~$<name>; | ||
masak | yes. | 22:07 | |
DanielC | I have a question already, what is ~$ | ||
jnthn | pmichaud: Oh? | ||
masak | DanielC: the prefix:<~> makes a string out of a value. | ||
jnthn | pmichaud: From isa changes? | ||
Or something else? | |||
masak | DanielC: it might help to refer to line 346 of grammar.pg also. | ||
jnthn | Remember to re-configure, I renamed a file. | ||
masak | DanielC: that rule calls the corresponding sub in actions.pm. | 22:08 | |
DanielC | rule use_statement { | ||
$<sym>=[use] <name><colonpair>* | |||
<EXPR>? | |||
{*} | |||
} | |||
Muixirt | masak, thanks for the suggestions ... but it doesn't run faster :-) | ||
masak | DanielC: aye. and we might want to keep excessive pasting down on the channel. :) | ||
DanielC | I don't know Perl 6 well enough to understand this. | ||
ok | 22:09 | ||
masak | Muixirt: I never promised that... | ||
Muixirt | ok | ||
masak | DanielC: hang in there. | ||
pmichaud | jnthn: from P6role.pir | ||
jnthn | pmichaud: oh wtf | ||
masak | DanielC: what you see in grammar.pg is a rule. it parses use statements. | ||
jnthn | pmichaud: Do you have the file? | 22:10 | |
Or is it missing? | |||
pmichaud | missing. | ||
jnthn | shit | ||
moment | |||
pmichaud | (there's also tons of stuff happening around the house here, so I'm a bit distracted in case you hadn't noticed the delays on my responses :-) | ||
masak | DanielC: the rule says '$<sym>=[use]', which means "first, we expect the literal string 'use', which we'll store in $<sym>". | 22:11 | |
pmichaud | yeah, it doesn't appear in the repo. | ||
DanielC | ok | ||
jnthn | pmichaud: pushed | ||
pmichaud | jnthn: got it | 22:12 | |
now building | |||
masak | DanielC: that <name> is the module, something like "Foo::Bar", and <colonpair>* is what we're interested in taking care of, :ver<> and :auth<> and such. | ||
dalek | kudo: f43c644 | jnthn++ | src/parrot/P6role.pir: Sometimes, git doesn't do what you want. Add p6role.pir, which it lost in the rename but didn't show as not under version control when I did git status. How awesome. |
22:13 | |
masak | DanielC: since this is in essence a very rich regex, the asterisk means "zero or more" | ||
pmichaud | masak/DanielC: also, note that rakudo's grammar should probably be updated a little bit to match recent changes in STD.pm | ||
DanielC | masak: So there is already a <name> rule defined somewhere that takes are of Foo::Bar, yes? | ||
masak | pmichaud: noted. I haven't been following those recent changes. | ||
DanielC: indeed. | 22:14 | ||
pmichaud | masak: neither have we, obviously. | ||
masak | DanielC: line 858. | ||
pmichaud: :) | |||
pmichaud | Usually when implementing a new feature or fixing something I first check the specs and STD.pm for guidance | ||
so that we don't get too out-of-sync | |||
masak | sounds sound. | 22:15 | |
pmichaud | jnthn: perl6multisub compile fail | ||
let me see if it's rakudo or parrot that is the problem. | |||
masak | DanielC: the <EXPR>? part, I don't know what that might be used for, but I guess we'll find out when we peruse actions.pm again. | 22:16 | |
DanielC: any questions so far? | |||
pmichaud | masak: it's because use statements take arguments | ||
for example | |||
DanielC | masak: Not yet. | ||
pmichaud | use Math :trig | ||
the ":trig" is an argument | |||
note that this is different from | |||
masak | pmichaud: but isn't that also a colonpair? | ||
pmichaud | use Math:ver<1.2.1> :trig | ||
masak | ok. | ||
pmichaud | the colonpair is abutted with the module name | ||
masak | I see. | 22:17 | |
DanielC | masak: The {*} means that the can be 0 or more use statements, yes? | ||
pmichaud | the arguments are separated by a space | ||
masak | DanielC: no, it means 'action here'. | ||
mberends | it's odd that use_statement calls <name> and no_statement calls <module_name> | ||
DanielC | ok | ||
masak | DanielC: note that there are {*} on every rule and token in grammar.pg. | ||
pmichaud | mberends: in STD.pm, 'use' calls <module_name> | ||
mberends | ok | ||
masak | DanielC: ok, so let's go back to actions.pm now. | 22:18 | |
DanielC | masak: Yes, I see... every rule has a {*}... | ||
masak | DanielC: aye, it simply means "here's where we call the corresponding action sub". | ||
DanielC | ok | ||
masak | DanielC: now, in actions.pm, the $<name> var that you found before... | ||
pmichaud | jnthn: looks like my build fail may be due to recent parrot -- investigating further | 22:19 | |
DanielC | masak: Ok, so {*} in a rule means "run the method with the same name as this rule". | ||
masak | DanielC: exactly. | ||
DanielC | k | ||
masak | DanielC: $<name> simply contains the parse tree for the <name> rule that we called in the use_statement rule. | ||
DanielC: but we're only interested in the name itself, not the parse tree, so we stringify with ~. | |||
DanielC | ok | 22:20 | |
masak | then, two lines down, we check that $name isn't 'v6' or 'lib'. | ||
those two seem to be no-ops here. | |||
ah, line 392 is the call to the 'use' sub that pmichaud talked about earlier. | 22:21 | ||
DanielC | At this point $name could be something like "warnings" or "strict"... | ||
masak | aye. | ||
(except we don't have those two in Perl 6.) | |||
but you got the idea. | |||
DanielC | Ok. | 22:22 | |
masak | and the thing below '## Handle tags.' takes care of things like :trig, as pmichaud showed just now. | ||
note that $<EXPR> is referred to here, so it all makes sense. | |||
oh, look! we have '## Handle versioning' too! | 22:23 | ||
DanielC | use Foo::Bar:ver<1.2.3> :foo --> "foo" is an <EXPR> yes? | ||
pmichaud | the ":foo" is the expression | ||
it's a pair | |||
masak | DanielC: yup. | ||
DanielC | ok | ||
Do I need to know what @?BLOCK is? I don't know "@?" | 22:24 | ||
22:24
payload joined
|
|||
pmichaud | DanielC: you might be able to figure it out though :-) | 22:24 | |
You know what @ is | |||
masak | pmichaud: the 'Handle versioning' part of the code, is it used for anything? can one see the effects of typing in a version in a use statement? | ||
pmichaud | masak: it's currently set up as being a named parameter to 'use' | 22:25 | |
masak | pmichaud: ok, I'll defer my question to after having read the 'use' sub. | ||
pmichaud | I'm not sure it should be that way ultimately, but that's how it's set up at the moment. | ||
I think the 'use' sub ignores it. | |||
i.e., doesn't use it. | |||
masak | oki. | ||
DanielC | pmichaud: I know that @ means array... I guess that "@?" could mean "maybe this is an array" but that sounds really weird. | ||
pmichaud | DanielC: the ? twigil generally means "compiler variable" | 22:26 | |
DanielC | ah! | ||
masak | anyway, if we want to add :auth, it should be fairly straightforward, if we already have :ver as an example. | ||
pmichaud | for example $?LINE means "what source line am I on?" | ||
mberends | it would also handle :auth or :anything as it stands | ||
the name is not checked | |||
masak | mberends: oh! you're right. | ||
pmichaud | 'ver' is misnamed, currently | ||
it should not be called 'ver' | |||
masak | :) | ||
pmichaud | it should be called whatever we call the string-of-colonpairs-that-follow-a-longname | 22:27 | |
pmichaud checks S11 | |||
mberends | masak: TODO | ||
masak | aye. | ||
DanielC | What is PAST::Op ? | 22:28 | |
22:29
cmarcelo left
|
|||
pmichaud | probably should be called "adverbs" | 22:29 | |
they're called adverbs in S11 | |||
masak | DanielC: it's a part of a PAST tree, what the actions.pm program generates from the parsing. | ||
pmichaud | jnthn: something in latest parrot causes perl6multisub to fail. Bisecting. | ||
masak | DanielC: the PAST::Op is one of seven(?) types of PAST node in that tree. | ||
DanielC: anyway, this whole use_statement sub amounts to calling the 'use' sub in the right way, yes? | 22:30 | ||
DanielC | AFAICT yes | ||
masak | DanielC: now, if you turn to src/builtins/eval.pir and line 141... you'll find that very sub. | 22:31 | |
DanielC | There are bits I don't understand. Most notably, the PAST thing. | ||
masak | DanielC: the PAST tree is an intermediate representation, waiting to be turned into Parrot opcodes. | ||
DanielC | Wait... I need to catch up. Where in actions.pm does it call a sub? I see .ast, and .name | ||
22:32
araujo left
|
|||
jnthn | pmichaud: Fail to compile? | 22:32 | |
masak | hm, let me check. | ||
pmichaud | jnthn: yes, fail to compile. | ||
jnthn | Ouch. | ||
22:32
nihiliad left
|
|||
jnthn | Parrot fail... | 22:32 | |
I'm actually just in Perl6MultiSub doing some bits... | |||
mberends | DanielC: actions.pm:436,438 | ||
DanielC finds line 141 of eval.pr | |||
mberends: thanks, I see the use() call | 22:33 | ||
masak | mberends: oh! I had missed that part myself. :) | ||
so... there are actually _two_ kinds of 'use' call here... | 22:34 | ||
one stored in the PAST::Op node, and one made directly. | |||
that kinda makes sense. | |||
DanielC | ok | ||
pmichaud | eventually they'll likely be the same, when we get BEGIN semantics built-in | ||
(which I've already figured out how to do, just need to implement) | |||
masak | that also makes sense. | ||
DanielC: ok, so now we're in PIR land. | 22:35 | ||
pmichaud | i.e., we'll be able to say BEGIN($past) and it will automatically compile+invoke the $past at compile time, and we still emite the $past in the compiled output (so it'll run at 'load' time) | ||
masak | pmichaud++ | ||
DanielC | masak: Abandon Hope, All Who Enter Here... | ||
masak | DanielC: I never said it'd be easy :) | 22:36 | |
22:36
fuad joined
|
|||
DanielC | :-) | 22:36 | |
pmichaud | if it was easy, we'd be done already :-) | ||
dalek | kudo: def4e6d | jnthn++ | src/ (7 files): Do a little optimization to the deref_objectref dynop, and then eliminate the !DEREF PIR sub in favor of it. Wins a modest but worthwhile performance improvement. |
||
[particle]1 | not me, i'd just code slower. | ||
masak | DanielC: actually, I see the 'ver' thing being referred to here, quite early in the PIR code. | ||
line 151. | |||
fuad | hello | ||
pmichaud | we use 'ver'? | ||
DanielC | .local pmc ver, compiler_obj | ||
ah, yes ver = options['ver'] | 22:37 | ||
masak | pmichaud: we use it to get :lang, it seems. | ||
pmichaud | yes. | ||
that feels... wrongish also. | |||
masak | fuad: oh hai! | ||
pmichaud: aye :) | |||
fuad | is someone knows sql here?:) | ||
mberends steps forward | 22:38 | ||
masak | fuad: people might, but remember that this is #perl6, not #mysql. | ||
fuad | yes i know | ||
i just asked | |||
masak | good. | ||
fuad | coz no one there knows | ||
22:38
chromatic joined
|
|||
mberends | fuad: that's not even funny | 22:38 | |
pmichaud | hola chromatic! | ||
chromatic | jnthn, you're missing semicolons at the end of SETATTR/GETATTR in P6 multi sub PMC. | 22:39 | |
masak | mberends: actually, I thought it was a bit funny. :) | ||
mberends | (swedish humor)?? | ||
DanielC | fuad: Go to #postgres, I'm sure someone knows SQL there... | ||
masak | mberends: might be. | ||
jnthn | chromatic: It just started needing 'em? | 22:40 | |
chromatic: heh, can add. | |||
pmichaud | chromatic/jnthn: yeah, that's kinda weird. The file compiles okay in r39298 :-) | ||
chromatic | NotFound changed the macro a few commits ago. | ||
fuad | mberends:sorry( | ||
pmichaud | ahhhhhhh | ||
jnthn | Any particular reason? | 22:41 | |
chromatic | I think it's the right choice myself; the code reads better with the semicolons. | ||
masak | DanielC: I think I need to sleep now. | ||
jnthn | chromatic: Did it work with semis before? | ||
masak | DanielC: it was fun spelunking with you! | ||
chromatic | It didn't prohibit them; the macro expanded to do { ... } ;; | ||
DanielC | masak: ok, thanks for showing me around the code. | ||
masak | my pleasure. | ||
jnthn | chromatic: OK. I'm doing a bunch of edits to that file at the moment anyway... | ||
chromatic | Double semis aren't a problem. | 22:42 | |
No semis are. | |||
masak sleeps | |||
mberends | DanielC: from here on, we have to stop reading and start writing ;) | ||
22:42
masak left
|
|||
DanielC | :-) | 22:42 | |
22:42
charsbar_ left
|
|||
pmichaud | jnthn: how long til you commit? I'm eager to see how my oo.c improves things, and I'm blocked at the moment. | 22:43 | |
DanielC | mberends: Honestly, I think that writing a compiler is probably outside my abilities. I never learned about compilers or grammars, my degree is in math. | ||
mberends | degrees are not that relevant. | 22:44 | |
DanielC | mberends: But I can tell you a lot about cryptography though :-D | ||
chromatic | I can nopaste a patch for you, pmichaud. | ||
pmichaud | c - that would help. I'm sure I could do it as well. | ||
but a patch is easier. | |||
22:45
charsbar joined
|
|||
DanielC | mberends: I know, but I've never done anything remotely similar to this before. | 22:45 | |
chromatic | Having already patched it myself.... | ||
It ended up in #parrot. | |||
mberends | DanielC: the beauty of this little community is that we shall learn to do it within only a few Weebs. | ||
DanielC | mberends: What is weeb anyways? I saw masak say that before. | 22:46 | |
mberends | DanielC: it was a typo for week, being thrashed to death. See backlog. | ||
22:46
iblechbot left
|
|||
DanielC | ok | 22:47 | |
pmichaud | chromatic: got it, thanks. | 22:48 | |
jnthn | pmichaud: Not sure, it's a fairly big but in theory not too dangerous change. | 22:49 | |
mberends | DanielC: we're all learning, and the knowledge available in #perl6 is fantastic | ||
jnthn | pmichaud: Feel free to apply. | ||
pmichaud: If git complains I'll just do mf (mine full) to resolve. | |||
DanielC | mberends: :-) | ||
pmichaud | I'll apply if I get past "make test" | 22:50 | |
chromatic | It pushed me past make test anyway. | ||
mberends senses bedtime in .nl and waves to #perl6 | |||
pmichaud | looks good to me so far. | ||
22:51
mberends left,
fuad left
|
|||
pmichaud | anyway, what I discovered is that Parrot_oo_get_class would nearly always create a new PMCProxy on each call (which would happen from isa $P0, ['Something'] ) | 22:52 | |
Muixirt | chromatic, parrots command line parsing might need some love, or the documentation thereof, and parrot -h seems outdated | ||
chromatic | I'm sure it is. What was most confusing for you there? | 22:53 | |
dalek | kudo: 9421bca | pmichaud++ | src/pmc/perl6multisub.pmc: Add semicolons after GETATTR/SETATTR (chromatic++). |
||
Muixirt | chromatic, things like --CGP-core (see Ticket 639) | 22:55 | |
22:55
[particle]2 joined
|
|||
Muixirt | chromatic, you might have a look at sial.org/pbot/36964 | 22:55 | |
22:56
skids joined
|
|||
chromatic | I can look at #639 tomorrow. Do you know if there's a ticket for your nopaste? | 22:56 | |
Muixirt | there is no ticket | 22:57 | |
23:00
ssm left
|
|||
lichtkind | chromatic: cheers :) | 23:01 | |
23:02
ssm joined
|
|||
pmichaud | jnthn: I get a unicode-related fail now from the dispatch changes | 23:03 | |
23:03
mizioumt1 left
|
|||
jnthn | pmichaud: Oh? | 23:03 | |
pmichaud | (I'm fine with regressing, as it's a bit ugly) | ||
jnthn | Ah, I have a build without ICU, so... | 23:04 | |
pmichaud | the line | ||
A.new().äöü() | |||
ends up producing PIR like | |||
jnthn | But I can't think of much I'd have done to explode it... | ||
pmichaud | $P59 = $P58.unicode:"\x{e4}\x{f6}\x{fc}"() | ||
jnthn | Oh | ||
pmichaud | and IMCC can't handle that unicode:"..." there. | ||
jnthn | That sounds like a code-gen issue. | ||
Or an IMCC issue. | |||
All I'm doing is producing a PAST::Op node with pasttype callmethod. | 23:05 | ||
pmichaud | please please please don't make it a code gen issue. That will be.... ugly/complex | ||
jnthn | OK, I can be an IMCC issue. | ||
pmichaud | I guess we can work around it in PCT if need be, but Parrot really ought to be able to handle unicode string method names :-P | ||
jnthn | The only reason we didn't see it before is because we weren't using Parrot's dispatch syntax to actually dispatch. | ||
pmichaud | right. | ||
jnthn | Yes, agree. Parrot issue. | ||
pmichaud | The error message we get is | ||
error:imcc:syntax error, unexpected USTRINGC ('unicode:"\x{e4}\x{f6}\x{fc}"') | |||
jnthn | bwah | ||
Yeah, missed it because I don't run the ICU tests. | 23:06 | ||
pmichaud | right. | ||
as I said, I don't mind regressing for now -- it's only two tests. | |||
jnthn | But a little surprised that Parrot complains. | ||
pmichaud | I'm not | ||
jnthn | OK, sure. One of us should file Parrot bug. | ||
pmichaud | I'll file ticket | ||
jnthn | Thanks | ||
I'm tracking down a segfault in my MMD caching refactor. | |||
pmichaud | it seems like for every string constant that exists in IMCC we end up having to do this STRINGC -> USTRINGC conversion :-| | 23:07 | |
23:07
[particle]1 left
|
|||
jnthn | (Trying to both decrease our startup time *and* get multi-method dispatch speedy as multi-sub dispatch.) | 23:07 | |
pmichaud | lexicals. sub names. subid names. method names. named parameters. and now method calls :-P | ||
fortunately I've filed enough of these tickets that I actually have a template for it :-P | 23:08 | ||
jnthn | lol! | ||
lichtkind | jnthn: what do you think about the idea do put a bit of life into november wiki and make a newbee friendly overview with lot of pointers | 23:10 | |
jnthn: because perl 6 wiki is not newbee friendly | 23:11 | ||
chromatic | I'll take a look at that IMCC problem tomorrow. I know how to fix them. | ||
pmichaud | lichtkind: maybe the github wiki instead? wiki.github.com/perl6/misc/ | ||
lichtkind: I can even create a repo for it if we want. | |||
We could also create a githubpages repo to hold docs or other information | 23:12 | ||
lichtkind | pmichaud: tha main idea is to give november a purpose | ||
pmichaud | ah | ||
that's fine with me also, if it can handle the load :-) | |||
lichtkind | pmichaud: what you mean by that? | ||
23:13
ruoso joined
|
|||
lichtkind | its like the waterfall chart, real usage improve november which improves rakudo which improves parrot | 23:13 | |
which also improves perl 6 :) | |||
pmichaud: ah now i understand yes november is slow | 23:15 | ||
dont worry there will be shot texts :) | |||
if can handle the workload :) | |||
pmichaud | chromatic: TT #730, when you get around to it. Thanks as always for shepherding these and saving me from OH MY GOD ITZ SO PAINFUL! | 23:16 | |
23:20
donaldh left
23:21
donaldh joined
|
|||
chromatic | Don't say I never do everything for you! | 23:21 | |
I should be able to fix these tomorrow. I need to finish an edit and rush out of here soon. | |||
I may also get a grant proposal to you tomorrow afternoon. | 23:22 | ||
jnthn | \o/ | 23:23 | |
pmichaud | \o/ | ||
jnthn | chromatic++ | ||
pmichaud | as you may have detected, we're rapidly in desperate need of that work. I'll push it along quickly. | ||
preliminary new spectest timing after isa fixes and other additions from jnthn++: 21m51 | |||
as of yesterday we were over 25m | 23:24 | ||
jnthn | OK, the 10,000 multi-method dispatch benchmark now runs in 60% of the time it used to. | ||
02 - 10,000 sub dispatches: 3.546252 | 23:25 | ||
03 - 10,000 multi dispatches: 3.280236 | |||
04 - 10,000 method dispatches: 3.749337 | |||
05 - 10,000 multi-method dispatches: 3.671236 | |||
That gets the common cases of dispatch on a fairly level playing field now. | |||
(Before: 05 - 10,000 multi-method dispatches: 5.968184) | 23:26 | ||
pmichaud | oh, I should bump PARROT_REVISION | ||
skids stops his make :-) | 23:27 | ||
jnthn spectets hopefully | |||
I'm tired, if I don't get a clean pass I'll debug tomorrow. | 23:28 | ||
dalek | kudo: b91e089 | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION to get latest isa fixes and other stuff. |
23:34 | |
23:38
andreasg_ left,
avar left,
literal left,
andreasg_ joined,
literal_ joined,
avar joined
23:39
chromatic left,
jferrero joined
|
|||
jnthn | Oh noes...I haz one fail. :-( | 23:43 | |
23:43
pmurias left
23:45
frew|work joined
|
|||
jnthn | lol I fixez it | 23:46 | |
23:47
kate21de left
|
|||
Tene | yay | 23:47 | |
jnthn | spectesting again just to be safe. | 23:49 | |
23:49
jferrero left
|