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..
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
02:53 dextius left
pasteling "ruoso" at 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 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 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
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 :-)
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...
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
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
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
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
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...