pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
[particle] when did STD.pm grow backslashes after the opening block markers in statement_control:foo rules? 00:31
and why?
hercynium are those european backslashes or african backslashes? 02:00
Ontolog moritz_: thanks for the checkin 02:25
moritz_: why can't we just move Str.split(Str) now? Did you try and have tests fail because of it?
Ontolog Why do the perl6 tests on my machine always get stuck after t/spec/S29-trig/trig........................................... ok 04:04
cpu is 100%
and whatever test is running just isn't budging 04:05
i see it's t/spec/S04-statements/gather.rakudo
s1n Ontolog: 64-bit system? 04:06
Ontolog nope
32-bit Linux
s1n nevermind then
Ontolog what is gather / take and where are the docs on it? 04:13
nevermind found the docs 04:15
s1n @tell pmichaud check your email 04:47
lambdabot Consider it noted. 04:48
Ontolog There is yet another .sub 'split' method in Str.pir, this one does not have :multi in the method signature 06:35
Ontolog should it be removed? i'm not even sure what it does 06:40
it just takes two strings, makes them into Perl6Str, and runs a.'split'(b)
Which 'split' method would it be running in this case?
could this cause a recursive call? 06:41
moritz_ Ontolog: yes, I had some failures 07:10
Ontolog moritz_: I ran a sepctest_regression and I get Files=166, Tests=5084, 372 wallclock secs ( 1.85 usr 0.11 sys + 345.99 cusr 8.55 csys = 356.50 CPU) 07:13
Result: PASS
moritz_ Ontolog: then nopaste your patch 07:15
Ontolog pasted to #parrot 07:19
however there is still another split method 07:20
that i am confused about
removing also seems to not affect the tests
moritz_ there's a sub form of split also 07:21
for split("delim", "longstring") 07:22
Ontolog isn't $string.split("delim") and split("delim", $string) the same? 07:23
also if you look at 350 .return a.'split'(b) of Str.pir 07:24
which 'split' method is being called here?
moritz_ it's the same in terms of semantics, but it needs to be declared separately
because you can't call a method as a sub
usually we can use the export mechanism, but that would translate to split(lonstring, delim), which is not what we want 07:26
weird stuff
Ontolog i see 07:29
so should all three forms of split be in any-str.pir then?
or should this one stay in Str.pir?
moritz_ I think it should also be moved... 07:31
rakudo_svn r31250 | moritz++ | [rakudo] move Str.split(Str) to any-str.pir, Ontolog++ 07:35
r31250 | moritz++ | Now Str.split(/regex/) works because the method is no longer masked.
r31250 | moritz++ | I still don't understand why it fails with :multi(_,'String') though
Ontolog hmm moving the non-method split causes compile to fail 07:36
moritz_ yes 07:41
which is quite weird
I guess because it has no :multi
and then it's in the same namespace as the other subs with the same name
Ontolog in what namespace should normal subroutines be in? 08:02
Ontolog normal as in , not a method attached to an object 08:02
Ontolog .sub 'split' :multi('String','String') 08:15
Method 'split' not found for invocant of class 'String'
humph
moritz_ Ontolog: I couldn't find an easy way of moving the split sub, so I just left it as it is now 09:20
rakudo: say 'abc2345df56'.split(/\d+/).perl
p6eval rakudo 31254: OUTPUT[["abc", "df", ""]␤]
moritz_ I'm very happy this works, that will help the November hackers a lot 09:21
Ontolog cool 09:22
masak Ontolog++ # Str.split(Regex) 09:51
moritz_ uhm, I meant november development, not rakudo ;)
in that mail
perlbot: karma Ontolog
perlbot Karma for Ontolog: 5
Ontolog haha 09:52
just getting started :p
perlbot: karma cdavaz
perlbot Karma for cdavaz: 1
Ontolog ok so 6 ;-)
perlbot cdavaz is Ontolog
perlbot added cdavaz to the database
Ontolog perlbot Ontolog is cdavaz
perlbot added Ontolog to the database
masak moritz_: I've been known to confuse Rakudo and November, too :)
moritz_ perlbot moritz is moritz_ 09:53
perlbot added moritz to the database
moritz_ perlbot, karma moritz_
perlbot Karma for moritz_: 74
masak perlbot masak is masak
perlbot added masak to the database
moritz_ perlbot, karma moritz
perlbot Karma for moritz: 1148
Ontolog moritz_: i have no idea if that actually merges my karma haha
guess not
moritz_ perlbot, moritz?
perlbot moritz_
moritz_ Ontolog: no, it just stores answers ;)
masak karma merging could be badly abused 09:54
moritz_ aye
masak also, I agree with Andrei: "Please also implement :g for .subst :-)" 09:55
:)
moritz_ [X] Patches welcome 09:56
rakudo: say ['abcd'.split(/<before .>/)].perl 09:57
p6eval rakudo 31254: No output (you need to produce output to STDOUT) 09:58
moritz_ so it loops
masak shouldn't it? 09:59
moritz_ masak: no, it should bump along after each match, just like in perl 5, and split into characters (I hope so, at least) 10:00
masak ah. reasonable.
actually, what's the shortest way to write // in perl 6?
moritz_ /''/ 10:01
masak oki
moritz_ but if you want to split into characters, no need for a regex
rakudo: say ['abcd'.split('')].perl
p6eval rakudo 31254: OUTPUT[sh: ./parrot: No such file or directory␤]
masak oops :)
moritz_ it's 12:01, rebuild time ;)
rakudo: say ['abcd'.split('')].perl 10:02
p6eval rakudo 31254: OUTPUT[sh: ./parrot: No such file or directory␤]
masak speaking of errors: on www.november-wiki.org/cgi-bin/w?act...nt_changes how do I change "[no address given]" into some email address? 10:02
moritz_ takes a few minutes on that server, it's not the fastest
eternaleye Is there an operator which takes a List on the left and an Int on the right and returns a slice containing the list repeated Int times? 10:03
so <a b c d> OP 2 would return [a,b,c,d ; a,b,c,d]
moritz_ infix:<xx> 10:04
in slice context
(but no implementation does slice context yet)
eternaleye Ah, that's why it didn't work. It assumed array context, and nothing does slice context yet 10:05
Dang
(I tried it in seevral incaarntions on p6eval but it died every time)
moritz_ as a workaround you can use map {[@list]}, ^$x
eternaleye *several (cursed key-reordering bug
moritz_ rakudo: say ['abcd'.split('')].perl
p6eval rakudo 31254: OUTPUT[Parrot VM: Can't stat languages/perl6/perl6.pbc, code 2.␤main: Packfile loading failed␤]
moritz_ rebuild still in progress :( 10:06
eternaleye ooh, that map trick looks cool
moritz_ rakudo: say [map {[1, 2, 3]}, ^3].perl
p6eval rakudo 31254: OUTPUT[Parrot VM: Can't stat languages/perl6/perl6.pbc, code 2.␤main: Packfile loading failed␤]
moritz_ (slow servers)-- 10:07
masak: can I register an account online yet?
rakudo: say [map {[1, 2, 3]}, ^3].perl
p6eval rakudo 31254: OUTPUT[[[1, 2, 3], [1, 2, 3], [1, 2, 3]]␤] 10:08
moritz_ rakudo: say (map {[1, 2, 3]}, ^3).perl
p6eval rakudo 31254: OUTPUT[[[1, 2, 3], [1, 2, 3], [1, 2, 3]]␤]
masak moritz_: not quite there yet 10:12
I'll bump it up in priority, just for you
moritz_ masak: no need, I was just curious
masak I have this wild idea about honeypotting people so that they can edit everything and see their changes, but all they do is queued up for moderation 10:13
until they are approved, then everything goes in
moritz_ like the wikipedia did it?
masak they did? 10:14
moritz_ (at least the German did, I think)
masak and here I thought I had an original idea :)
they don't anymore?
moritz_ no 10:15
masak was it a bad idea? 10:16
masak is curious
moritz_ I think it discouraged contributions
and it expresses that you don't trust people 10:18
(which is generally not a bad idea on the internet, but people don't want to hear that anyway)
masak hm 10:19
makes sense
I guess it's one of those ideas that seems technologically cool, but that turns people off
eternaleye masak: also, it doesn't scale well - it requires that mod_hours/editor_hours remain near-constant, meaning that either moderators must do nothing but mod, or more (possibly unreliable) moderators must be added 10:33
masak eternaleye: aye.
so, for a small-size wiki engine, what's common practice?
moritz_ don't worry about abuse until it becomes a problem 10:34
masak moritz_: hm. :/
I like thinking ahead...
also, I've had problems on my home wiki of this kind
they started after I began publishing addresses to it on mailing lists 10:35
and they are very real, and time-consuming once they've begun
masak hates wiki spammers
moritz_ hates all kind of spammers 10:36
ruoso had just received a mail that points out that Lehman Brothers was one of the cases in the Get The Facts series of Microsoft... and now... 12:48
ruoso Get The Facts, it broke!
moritz_ ruoso b0rked the Lehman Brothers, we blame him 12:49
oh, wait ;-)
rakudo_svn r31263 | pmichaud++ | [rakudo]: spectest-progress.csv update: 166 files, 3399 passing tests
moritz_ rakudo: ['a1b23dc'.split(/\d+/)].join('|') 13:56
p6eval rakudo 31264: RESULT["a|b|dc"]
Ontolog moritz_: could you apply the latest patch I sent? it fixes the split function 15:20
moritz_ Ontolog: looking... 15:21
moritz_ Ontolog: is that against the newest version of rakudo? 15:23
Ontolog: it doesn't apply cleanly
Ontolog oh? 15:24
let me seesee
moritz_ patching file src/builtins/any-str.pir
Reversed (or previously applied) patch detected! Assume -R? [n] n
Ontolog hm? 15:25
moritz_ that's what I got when trying to apply your patch 15:26
maybe I'm looking at the wrong patch...
the one from p6c about 40min ago 15:27
Ontolog yeah i sent one about 40 min ago 15:27
let me try something
what's the command to patch? 15:28
moritz_ patch -p0 < patch_file
Ontolog no problems here 15:30
moritz_ I'm currently testing what pmichaud has written on the list
Ontolog: which svn revision?
that seems to work 15:31
Ontolog Revision: 31264
Last Changed Rev: 31263
moritz_ weird, same here
Ontolog i did this: svn update; svn revert src/builtins/any-str.pir; svn revert src/classes/Str.pir; patch -p0 < split.diff 15:47
and my result is: patching file src/builtins/any-str.pir
patching file src/classes/Str.pir
with on errors
maybe you need to revert yours too
moritz_ I thought I had a clean working tree 15:48
ok, I'll try again
ah, I guess stored it in the wrong directory, and tried to apply an old version of a patch 15:49
moritz_ that one works 15:55
pmichaud it would be good to make sure we have spectests for all of the edge cases being discussed on november-wiki 15:56
lambdabot pmichaud: You have 2 new messages. '/msg lambdabot @messages' to read them.
masak indeed. 15:57
moritz_ feels very frustrated by the inaccessability of the current split test 16:02
Ontolog what's the url to that wiki? 16:07
i googled for it but just get references to it not the wiki itself 16:08
pmichaud oh, the discussions are on the november-wiki mailing list 16:08
november-wiki is a wiki being written in Rakudo 16:09
Ontolog ahh
you are talking about split.t in the pugs tests?
moritz_ yes 16:10
Ontolog i see it's a bit complicated at the top
i don't know what all the is_deeply stuff is either :p
pmichaud moritz_: I think I may able to get an 'eqv' operator working this weekend, at least for lists.
afk, lunch. 16:11
TimToady pmichaud: eqv on a hash could be optimized greatly over naive comparison of serializations 16:41
first of all, you can reject if the number of keys differs
it would also be relatively easy for the hash header to maintain an XOR of all hash values for existing keys 16:42
TimToady and comparing those would give you an almost instantaneous rejection of hash equality most of the time 16:43
and for the situation where they are equal, you're just wanting to make sure that all keys in one are also in the other
and since the keys are identical, when the hash bucket layout is the same, you can just walk the buckets in parallel, and make sure each pair of buckets contains the same keys 16:45
and in general, for more complicated data structures, there's something to be said for checking all the components for easy falsifiability before checking any of them for trueness, if there is any way to compute such a traversal cheaply 16:50
or lazily 16:51
for immutable values a hash of the .perl of everything might be lazily cached the first time we use a value in an eqv 16:52
anyway, just some random premature optimizations :) 16:53
oh, wait, eqv requires the hash values to be eqv too, so a hash-wide key xor only tells you if the keys are unequal; you still have to walk the buckets for both keys and values if the keys hash equally 16:54
pmichaud also, hash keys aren't constrained to be strings :-) 17:40
but yes, I get the idea. :-)
rakudo_svn r31278 | particle++ | [rakudo] add some cleanups to the makefile 20:53
pugs_svn r22284 | bacek++ | [spec] Explicitly stringify .WHAT result to avoid 'use uninitialised variable' warnings 20:58
pugs_svn r22285 | bacek++ | [spec] Drop second declaration of same variable 21:20
r22286 | bacek++ | [spec] Explicitly stringify .WHAT result to avoid 'use uninitialised variable' warnings 21:23
pugs_svn r22287 | ruoso++ | [smop] starting to put map in place... 21:38
ruoso pugs: say false.defined(); 22:58
p6eval pugs: OUTPUT[*** No such subroutine: "&false"␤ at /tmp/kOAzrSNDfE line 1, column 5-20␤]
ruoso pugs: say Bool::False.defined();
p6eval pugs: OUTPUT[1␤]
pugs_svn r22288 | ruoso++ | [smop] YAY! SMOP now supports lazy map, for now there is only map in Void context, which means eager evaluation... 23:04
ruoso heh... although the above statement might look weird, it actually means that at the moment a generic lazy list is implemented, it can be used with map... 23:15
it's still missing the map in item context, which provides a flattened iteration, independent of the number of items returned in each iteration...
[particle]1 that ci comment is indeed confusing then :) 23:43
ruoso++
ruoso [particle], the thing is that as smop have late context propagation... and all the implicit things that happen by syntax are visible in the low-level... 23:44
[particle], you can see test/30 in the smop sources :) 23:45
[particle] i'll have a look after errands & 23:46