»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released! Set by diakopter on 6 September 2010. |
|||
sorear | Should role Foo { } be considered a subtype of Mu? | 00:03 | |
I guess it has to bee | 00:16 | ||
otherwise it's impossible to pass Foo into a function like &infix:<~~> or &infix:<but> | |||
which leaves the question - are roles Mu, or Any? | 00:17 | ||
if Foo ~~ Any, then, is it also the case that ClassWhichDoesFoo ~~ Any? Subtyping ought to be transitive | |||
Does *that* mean that class Bar is Mu does Foo is illegal? | 00:18 | ||
TimToady: jnthn: ping | |||
dukeleto | sorear: sounds like some interesting edge cases | 00:22 | |
dukeleto gets popcorn | |||
00:30
jaldhar joined
00:44
saaki left
00:49
saaki joined
|
|||
masak | rakudo: role Foo {}; say Foo ~~ Mu; say Foo ~~ Any | 00:50 | |
dalek | rixel: e438505 | diakopter++ | sprixel/ (5 files): added a TAILCALL_NOT_TRAMPOLINE preprocessor option. it seems 1.5x as slow I'll try it on Mono on Windows and Linux sometime. |
00:51 | |
p6eval | rakudo 668719: OUTPUT«(timeout)» | ||
masak | locally, that says '1\n1\n' | ||
diakopter | the poor p6eval vps is bogged with something. looking. | 00:53 | |
oh. swapping horribly due to rebuilding parrot. | 00:54 | ||
that is getting out of hand. | |||
actually no, gen/perl6.pbc is compiling gen/core.pm | 00:55 | ||
and using 90% of the system ram | |||
6 hours of cpu? | |||
oh, minutes. :) | 00:56 | ||
rakudo: role Foo {}; say Foo ~~ Mu; say Foo ~~ Any | 00:58 | ||
p6eval | rakudo 668719: OUTPUT«11» | ||
00:59
QinGW joined
01:03
QinGW1 joined
01:04
QinGW left
|
|||
masak | diakopter++ | 01:06 | |
01:07
Holy_Cow joined
|
|||
diakopter | I didn't do anything; I just waited for rakudo to be done rebuilding | 01:08 | |
masak | ah. | 01:10 | |
01:12
mavrc left
01:19
jaldhar left
01:40
plobsing joined
|
|||
sjohnson | "perl6: ready to rock and/or roll" | 01:41 | |
01:41
simcop2387 left
01:42
LaVolta joined,
simcop2387 joined
01:47
meppl joined
01:50
redicaps joined
01:54
justatheory joined
|
|||
sjohnson | perl! | 02:00 | |
colomon | 6! | ||
sjohnson | heh | ||
++perl5; ! | 02:01 | ||
02:01
simcop2387 left
02:02
simcop2387 joined
02:05
cdarroch left
02:06
satyavvd joined
02:18
mikehh left
|
|||
masak | sjohnson: "Perl 6: ready to rock, paper or scissors." | 02:45 | |
02:45
satyavvd left,
Chillance left
02:47
araujo joined
02:52
jasonmay joined
|
|||
plobsing | rakudo: "rock", "paper" or "scissors" | 02:53 | |
p6eval | rakudo 668719: ( no output ) | ||
plobsing | rakudo: say "rock", "paper" or "scissors" | ||
p6eval | rakudo 668719: OUTPUT«rockpaper» | ||
02:57
pythonian4000afk is now known as pythonian4000
03:01
jaldhar joined
03:07
pythonian4000 is now known as pythonian4000afk
03:09
orafu left
03:11
orafu joined
03:12
risou joined
03:19
plobsing left
03:23
synth joined
03:24
synth left
|
|||
masak | ok, then. time to go to Paris. | 03:29 | |
03:29
masak left
03:31
risou left
03:32
risou joined
03:35
leprevost joined
03:37
meppel joined
03:40
nymacro joined
03:41
meppl left
03:56
jasonmay left
03:58
jasonmay joined
04:24
mfollett joined
04:31
meppel left
04:34
Holy_Cow left
04:48
mfollett left
04:49
agentzh joined
05:02
pythonian4000afk is now known as pythonian4000
05:22
satyavvd joined
05:27
redicaps left
05:31
pythonian4000 is now known as pythonian4000afk
06:00
satyavvd_ joined
06:01
satyavvd left,
satyavvd_ is now known as satyavvd
06:06
[particle] left
06:11
justatheory left
06:33
envi left
06:37
envi joined,
satyavvd left
|
|||
dalek | ecza/master: a3cf7c1 | sorear++ | / (4 files): Implement type objects for roles |
06:40 | |
ecza/master: 4d2eb8a | sorear++ | / (6 files): Implement compilation of parametric roles |
|||
06:44
nymacro left
06:45
nymacro joined
06:54
envi left
06:57
[particle] joined,
envi joined
07:04
Ross joined,
Ross left,
Ross joined
07:17
molaf joined
07:23
_kaare joined
07:24
araujo left
07:34
envi left
07:43
envi joined
07:45
envi left
08:06
meppl joined
08:08
Mowah joined
08:30
risou left
08:34
risou joined
08:39
mavrc joined
08:42
_kaare left
|
|||
nadim | on p5 someone said to not use this <<<< say~~grep{$_<0}@array >>>> which may be. some one cares to tell me why? | 08:52 | |
moritz_ | what does ~~ as a prefix do? | 08:53 | |
nadim: but the best chances are to ask the one who told you | |||
nadim | in p5 it two unary ~ to force scalar context | 08:54 | |
moritz_ | you can use $(...) for that in Perl 6 | 08:55 | |
sorear | Why are you writing code that ugly? | ||
moritz_ | nadim: there's also the scalar() in p5 | ||
nadim | I know it all started because I wanted to write >>> say scalar grep {$_ < 0} @array ; <<< shorter. please ddon't ask why, there is no reason. | 08:56 | |
09:00
Ross left
09:01
risou left,
masak joined
|
|||
masak | oh hai from OSDC.fr! \o/ | 09:02 | |
09:02
risou joined
|
|||
nadim | you're everywhere K. | 09:02 | |
09:02
icwiener joined
09:06
jnthn_fr joined,
risou left
|
|||
jnthn_fr | o/ #perl6 | 09:06 | |
masak | rakudo: my @i = <rock paper scissors>; my %n = %(@i.kv).invert; sub w($a, $b) { (%n{$a} - %n{$b}) % 3 }; my ($p1, $p2) = @i.roll(2); .say for $p1, $p2; say $_ ?? "Player $_ wins" !! "A tie" given w($p1, $p2) | 09:15 | |
p6eval | rakudo 668719: OUTPUT«paperscissorsPlayer 2 wins» | ||
09:16
cogno joined
|
|||
masak | rakudo: my @i = <⽯ ⎘ ✄>; my %n = %(@i.kv).invert; sub w($a, $b) { (%n{$a} - %n{$b}) % 3 }; my ($p1, $p2) = @i.roll(2); .say for $p1, $p2; say $_ ?? "Player $_ wins" !! "A tie" given w($p1, $p2) | 09:20 | |
p6eval | rakudo 668719: OUTPUT«✄✄A tie» | ||
jnthn_fr | That rocks on paper, but srsly, cut it out. :P | 09:22 | |
masak | :P | ||
masak cuts out of IRC | |||
09:23
masak left
|
|||
sorear | hello jnthn_fr | 09:25 | |
jnthn_fr: niecza's metamodel is not so unlike 6model as I once thought | |||
the mistake I made was to think of DynMetaObject as a bizarre HOW | 09:26 | ||
it's not, it's much closer to STable | |||
the one thing I'm really missing is reification of representations as objects | |||
09:26
jnthn_fr left
|
|||
sorear | blah | 09:27 | |
09:31
cogno left
09:37
cogno joined
09:45
cogno_ joined
09:49
envi joined,
cogno left,
cogno joined,
cogno_ left
09:53
masak joined
09:54
saaki left
09:57
saaki joined,
Mowah left
09:58
Mowah joined
09:59
cogno left
10:02
amkrankruleuen joined,
QinGW1 left
10:05
M_o_C joined
10:08
cogno joined
|
|||
masak | rakudo: class A { has $.x }; say A.new(:x<a b c>).x.WHAT | 10:12 | |
p6eval | rakudo 668719: OUTPUT«Seq()» | ||
10:14
M_o_C left,
Holy_Cow joined
10:19
cognominal left,
cogno left
|
|||
moritz_ wonders why item context turns a Parcel into a Seq | 10:20 | ||
sorear | because S02 says so. | 10:24 | |
TimToady and pmichaud are adamant S02 is right but I haven't grokked their explanations yet | |||
moritz_ hopes that it becomes clearer when pmichaud updates the specs with the new list/iterator API | 10:25 | ||
10:25
LaVolta left
|
|||
masak | "specs" in plural makes it sound like there's more than one spec... :/ | 10:25 | |
it's enough of a bother with the one we have. | 10:26 | ||
moritz_ | we have the written S\d\d documents, the test suite and #perl6 collective knowledge | 10:27 | |
10:27
wamba joined
|
|||
masak | I'm pretty sure you only meant the first of those, though. | 10:27 | |
moritz_ | right | ||
masak | which I'd call "one spec" but "several synopses". | ||
sorry about being so picky. | 10:28 | ||
I'm still a bit un-fine with the repo being called "specs" as in "eyeglasses". | |||
not that there aren't more important matters to attend to, but still. renaming it would make one small thing more right. | 10:29 | ||
jnthn++ says "specs -- how you look at Perl 6" :) | 10:43 | ||
lunch & | 10:44 | ||
10:44
masak left
10:48
MayDaniel joined
10:52
cogno joined
10:55
timbunce joined,
oyse joined
11:02
cogno left
11:12
zulon joined
|
|||
cosimo | any examples of sockets usage in parrot or perl6? | 11:16 | |
moritz_ | cosimo: github.com/mberends/http-server-simple | ||
cosimo | perl6 lwp::simple is working fine for me, while i have really big problems talking to a memcached server | 11:17 | |
as in, i can't get all the bytes the server is sending me, or get just some lines, ... | |||
moritz_: thanks, i'll take a look | |||
oyse | Is the perl6 executable built with debugging symbols by default or do I have to provide som options when running make? | 11:20 | |
moritz_ | oyse: you probably need to change that in parrot's configure step | ||
hm, looks like by default is with debugging symbols | 11:21 | ||
oyse | moritz_: ok. thanks | 11:22 | |
11:25
redicaps joined
11:27
Italian_Plumber joined
11:28
sftp left,
sftp joined
11:29
redicaps left
11:32
Italian_Plumber left
11:34
Holy_Cow left
11:40
_kaare joined
11:43
Holy_Cow joined
11:47
molaf_ joined
11:49
lucas_ joined,
molaf left
|
|||
lucas_ | hello developers | 11:52 | |
I'm just beginning my learning path, so I have some doubts... | 11:53 | ||
STD.pm(6) is written in Perl 6, right? | |||
was it written in Perl 5 at any point in time before? | |||
11:55
Holy_Cow left
12:05
masak joined
|
|||
masak | lucas_: no, STD.pm6 is written in Perl 6 from the start. there's a tool that knows how to translate (the STD-specific subset of) Perl 6 into Perl 5 so that it can run, though. | 12:06 | |
12:10
agentzh left
|
|||
lucas_ | masak: hello | 12:10 | |
what's is the name of this tool? | |||
I run into this file... | |||
masak | lucas_: viv. | ||
lucas_ | std/std_hilite/STD_syntax_highlight | 12:11 | |
and it was written in p5 | |||
masak | lucas_: its name means "vi -> v", i.e. Roman numerals for "6 -> 5". | ||
lucas_ | but it required STD... | ||
moritz_ | lucas_: you can install the compiled-to-p5 version of STD via CPAN | ||
lucas_ | oh, cool, I wouldn't think that about viv name | ||
masak | lucas_: yes, the std_hilite thing is mostly used by Padre, I think. Padre is written in Perl 5. | ||
moritz_ | cpanm STD # and wait a bit | ||
lucas_ | the lesson I learned now it that there is this p5-compiled version of STD. I didn't know about that. thanks | 12:14 | |
masak | well, viv compiles the Perl 6 source code in STD.pm6 to Perl 5. | 12:17 | |
for the purpouse of them running it. | |||
12:25
Trashlord left
|
|||
lucas_ | I'm trying to run std/std_hilite/STD_syntax_highlight | 12:39 | |
it dies because CursorBase.pm can't find setting CORE and asks if I runned make | |||
running make in std source tree dies because of missing package VAST::Assignment_operator | |||
even after installing Mildew dist from CPAN | |||
sub load_lex in CursorBase.pm is trying to load some yaml file syml/CORE.syml | |||
what are those syml files? I've never heard of these before. stands for "syntax" yaml? | |||
where are they installed? | |||
12:41
masak left
12:48
Italian_Plumber joined
12:53
risou joined
12:54
orafu left
|
|||
x3nU | i'm trying to use MiniDBI | 13:00 | |
and that's what i get | |||
The native library 'libmysqlclient' required for 'mysql_affected_rows' could not be located | |||
of course i have libmysqlclient | |||
13:10
thepler left
13:14
araujo joined
13:19
Patterner left
13:22
Italian_Plumber left
13:26
orafu joined
13:29
spinclad left,
spinclad joined
13:31
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
moritz_ | x3nU: do you also have the header files? | 13:33 | |
13:34
Trashlord joined
13:38
masonkramer joined
|
|||
x3nU | moritz_: yes | 13:38 | |
13:49
risou left
|
|||
colomon | loliblogged: justrakudoit.wordpress.com/2010/10/...alindrome/ | 13:55 | |
13:56
satyavvd joined
13:58
avuserow joined
14:17
justatheory joined
14:19
jferrero joined
14:23
timbunce left
|
|||
rjbs | (16, 8, 4 ... 0) | 14:25 | |
So, this gets all Zeno on me and gets to very very small numbers. Fine, I can dig it. | |||
Is there a way to say, "treat everything as integers"? | |||
moritz_ | rakudo: .say for 'abcdedbb'.match(:g, /(\w+)\w?<?{$0.flip}>/) | 14:26 | |
p6eval | rakudo 668719: OUTPUT«abcdedbb» | ||
moritz_ | rakudo: say ~(64, 32, *div* ... 0) | 14:27 | |
14:27
oyse left
|
|||
Juerd | So that matched what, bb? | 14:27 | |
p6eval | rakudo 668719: OUTPUT«64 32 2 16 0» | ||
rjbs wanted to do it without supplying a closure. | |||
moritz_ | Juerd: it matched the whole string, because the <?{...}> seemed to have been ignored | ||
rjbs | (Just for exploration, not because it's important.) | ||
moritz_ | rjbs: then I don't know how to do it | 14:28 | |
rjbs | Ok, thanks! | ||
moritz_ | hm, <?{ is a assertion | ||
rakudo: .say for 'abcdedbb'.match(:g, /(\w+)\w?<{$0.flip}>/) | |||
p6eval | rakudo 668719: OUTPUT«dedbb» | ||
moritz_ | colomon: that's a simpler solution... just look for the match with the highest length | 14:29 | |
colomon | moritz_: isn't that grotesquely inefficient? | 14:30 | |
moritz_ | colomon: it probably is | 14:31 | |
colomon: but it's in the regex engine, which is a bit faster than regular Perl 6 code | |||
colomon | I mean, with a thousand character string, there will be 1,000,000 possible matches to test, no? | 14:34 | |
14:34
nperez left
|
|||
moritz_ | correct | 14:35 | |
colomon | I was figuring a regex solution would look like /(\w)(\w)(\w)$3$2$1/ | ||
moritz_ | that's only for length 6 | ||
14:36
MayDaniel left
|
|||
moritz_ | but it'd be probably more efficient to to look for length 2 and 3 palindromes, and then go to the left and right for there on | 14:36 | |
14:38
nperez joined
|
|||
colomon | moritz_: right, but you can pretty easily generate the equivalent matches for longer lengths, and as soon as you hit one that does match (if you're counting up in length) you know your last match was the correct answer. | 14:39 | |
14:41
lucas_ left
|
|||
moritz_ | colomon: nopaste.snit.ch/24122 is my current approach | 14:42 | |
still a bit buggy, it seems | |||
14:42
mberends joined
|
|||
moritz_ | but takes only 2.3s on the example string from the challenge | 14:43 | |
colomon | ooooooooo | ||
zippy | |||
that only gets the length 3 palindromes, right? | 14:44 | ||
well, and length 2 | |||
moritz_ | length 2 and 3, and then the inner while-loop should expand them | ||
going to left and right simultaneously as long as left and right are the same | |||
colomon | ah, I see. nice. | 14:45 | |
moritz_ | but there's a bug | ||
at walks over the end | |||
that's a bad description | 14:46 | ||
14:46
cls_bsd left,
cls_bsd joined
|
|||
moritz_ | it produces 'allh', which is not a palindrome at all | 14:46 | |
mberends | x3nU: in a debian-ish system, the module required for MiniDBI is libmysqlclient-dev. It's a bit like using libicu-dev when building Parrot. | 14:47 | |
14:47
araujo left
|
|||
x3nU | i'm using CentOS | 14:49 | |
and i have mysql-dev | |||
devel* | |||
/usr/include/mysql.h | |||
is present | |||
/usr/include/mysql/mysql.h * | |||
14:50
xinming_ joined,
justatheory left
|
|||
mberends | x3nU: no other ideas right now, but I'll try installing on CentOS next week. Thanks for pointing this out :) | 14:50 | |
14:51
xinming left
|
|||
x3nU | hope it will eventually work for me :) | 14:53 | |
colomon | moritz_: think you need "my $right = .to;" | 14:59 | |
and then kill the $right--; at the end. | |||
that said, it's generating correct results for me, but not THE correct result, which is weird. | |||
never mind, the correct result is indeed in there. | 15:01 | ||
and this version is screamingly fast. moritz_++ | |||
15:03
MayDaniel joined
15:05
Holy_Cow joined
15:06
zulon left
15:10
cirne100 joined
|
|||
colomon | moritz_: now you need to blog your solution. :) | 15:11 | |
15:14
mberends left
15:17
Axius joined
15:20
satyavvd left
|
|||
moritz_ | colomon: I will | 15:29 | |
colomon | I've updated my post pointing out your brilliance. ;) | 15:30 | |
15:43
Chillance joined
|
|||
moritz_ | lolnowibloggedtoo: perlgeek.de/blog-en/perl-6/longest-...regex.html | 15:46 | |
15:46
nymacro left,
satyavvd joined
15:48
justatheory joined
15:51
Holy_Cow left,
Italian_Plumber joined
|
|||
moritz_ | anyone got a not-so-slow prime tester in perl 6 at hand? | 15:51 | |
15:54
envi left
|
|||
moritz_ | rakudo: foo($x) | 15:55 | |
p6eval | rakudo 668719: OUTPUT«===SORRY!===too few positional arguments: 2 passed, 3 (or more) expected» | ||
moritz_ | now that's really LTA | ||
rakudo: sub foo($) { }; foo($x) | |||
p6eval | rakudo 668719: OUTPUT«===SORRY!===too few positional arguments: 2 passed, 3 (or more) expected» | ||
15:57
risou joined
15:59
MayDaniel left
|
|||
moritz_ | rakudo: say (1, 2, 2).uniq | 16:00 | |
p6eval | rakudo 668719: OUTPUT«12» | ||
16:02
Axius_ joined,
awwaiid joined
16:03
Holy_Cow joined
16:06
Axius left
16:07
amkrankruleuen left
16:13
hercynium left
16:15
justatheory left
16:21
cirne100 left,
Axius joined
16:24
Axius_ left
|
|||
x3nU | win 30 | 16:26 | |
oops | |||
in 30 | |||
TimToady | rakudo: ~(64,32,16 ...^ Rat) | 16:28 | |
that ought work | 16:29 | ||
p6eval | rakudo 668719: OUTPUT«(timeout)» | ||
TimToady | but it doesn't | ||
rakudo: ~(64,32,16 ...^ Num) | |||
p6eval | rakudo 668719: OUTPUT«(timeout)» | ||
TimToady | that's not it... | ||
moritz_ | rakudo: say ~(64,32,16 ... *)[^10]>>.WHAT | ||
p6eval | rakudo 668719: OUTPUT«Int() Int() Int() Rat() Rat() Rat() Rat() Rat() Rat() Rat()» | ||
TimToady | is is not really doing a smartmatch? | 16:30 | |
colomon | moritz_: I used the old 2, 3, *+2 ... * > $possible-prime.sqrt method, which was plenty fast for the second challenge. | 16:31 | |
16:31
risou_ joined
|
|||
TimToady | rakudo: say ~(64,32,16 ...^ 0..^1) | 16:31 | |
p6eval | rakudo 668719: OUTPUT«Method 'shift' not found for invocant of class 'Range' in 'infix:<...^>' at line 838:CORE.setting in main program body at line 22:/tmp/UGYc0ZNN_f» | ||
16:31
satyavvd left
|
|||
TimToady | rakudo: say ~(64,32,16 ...^ (0..^1)) | 16:31 | |
p6eval | rakudo 668719: OUTPUT«Method 'shift' not found for invocant of class 'Range' in 'infix:<...^>' at line 838:CORE.setting in main program body at line 22:/tmp/7LgcdWL3o9» | 16:32 | |
TimToady | rakudo: say ~(64,32,16 ...^ ^1.item) | ||
p6eval | rakudo 668719: OUTPUT«Method 'shift' not found for invocant of class 'Range' in 'infix:<...^>' at line 838:CORE.setting in main program body at line 22:/tmp/WWDCUhFtqJ» | ||
moritz_ | colomon: I've done the same now; fast enough indeed | ||
TimToady | rakudo: say ~(64,32,16 ...^ (^1).item) | ||
p6eval | rakudo 668719: OUTPUT«Method 'shift' not found for invocant of class 'Range' in 'infix:<...^>' at line 838:CORE.setting in main program body at line 22:/tmp/SFdSJozP11» | ||
16:32
risou left
|
|||
moritz_ | colomon: but I don't have a good idea on how to approach the third | 16:32 | |
TimToady | rakudo: my $r = (^1); say ~(64,32,16 ...^ $r) | 16:33 | |
p6eval | rakudo 668719: OUTPUT«Method 'shift' not found for invocant of class 'Range' in 'infix:<...^>' at line 838:CORE.setting in main program body at line 22:/tmp/3UG0Zw9Glp» | ||
colomon | no approach at all, or just no fast approach? | ||
TimToady | yes, that's because I want you to treat the Range as a scalar!!! | ||
maybe Any.shift should be an identity | 16:34 | ||
moritz_ | colomon: there's always brute forcing, but that's ugly, and too slow in Perl 6 | ||
(2**22 would be fine in C, for example) | 16:35 | ||
iterations, that is | |||
colomon | moritz_: okay, yes, I have verify experimentally that brute force is too slow in Rakudo. :) | ||
*verified | |||
TimToady | rakudo: say ~(64,32,16 ... 1); # course, this works fine too | ||
p6eval | rakudo 668719: OUTPUT«64 32 16 8 4 2 1» | ||
16:38
zby left
|
|||
moritz_ | rakudo: .say for [X~] (0, 1) xx 3 | 16:38 | |
p6eval | rakudo 668719: ( no output ) | ||
colomon | TimToady: Range does Positional, so it will try to match it to the @rhs version of sequence op | ||
moritz_ | rakudo: .say for [X~] [0, 1] xx 3 | ||
p6eval | rakudo 668719: OUTPUT«000 001 010 011 100 101 110 111» | ||
moritz_ | \o/ | ||
colomon | I don't know why the rate one doesn't work. | ||
s/rate/Rat/ | 16:39 | ||
moritz_ | the series code uses $limit.defined in a lot of places | ||
colomon | moritz_++ | 16:40 | |
hmmm. wonder if 16, 8, 4 ...^ Rat is a known bug? | 16:44 | ||
TimToady | well, the $r should have shielded the Positionalness in any case | 16:48 | |
16:49
Holy_Cow left
|
|||
TimToady | lunch & | 16:50 | |
16:51
MayDaniel joined
16:52
Italian_Plumber left,
Axius_ joined
16:53
Axius left
16:55
awwaiid left
16:56
mavrc left
16:57
Axius joined,
Axius_ left
16:59
mavrc joined
17:02
draxil left
17:05
Holy_Cow joined
17:16
incucullo joined
17:22
HarryS is now known as K-Lined
17:23
K-Lined is now known as HarryS
17:25
Holy_Cow left
17:27
Axius left
17:29
Axius joined
|
|||
colomon | moritz_: think I have a workable solution for the third problem (currently executing) | 17:32 | |
17:32
risou joined
|
|||
moritz_ | colomon: what approach do you take? | 17:33 | |
colomon | recursion | ||
moritz_ | I considered that too | ||
colomon | my first full run just ended, but I don't know if the result is correct yet or not. | ||
moritz_ | probably a good idea | ||
colomon | it's a lot faster because it is easy to knock out dead ends | 17:34 | |
17:34
risou_ left
|
|||
moritz_ | right, that was the reason not to brute force it with a [X~] [0, 1] xx 21 bitmaks | 17:34 | |
17:34
Trashlord left
17:35
Trashlord joined
17:37
meppl left,
Axius left
17:38
Axius joined
|
|||
colomon | moritz_: my answer was indeed right. | 17:39 | |
btw, [X~] [0, 1] xx 21 never occurred to me. I just counted from 1 to 2**22. ;) | 17:40 | ||
moritz_ | is 2236 correct? | 17:41 | |
nope | |||
colomon | nope | ||
that's much too high | |||
moritz_ sees that he counted lots of cases like 78 + 0 == 78 | 17:43 | ||
17:43
Axius_ joined
17:44
Holy_Cow joined,
Italian_Plumber joined,
Axius left
17:47
sftp left
|
|||
moritz_ | when I remove those I get 200, but that's still wrong :( | 17:47 | |
much better now... | 17:50 | ||
17:52
awwaiid joined
|
|||
colomon | I think you must have another instance of the same sort of error. ;) | 17:54 | |
moritz_ | I've got the right solution now :-) | ||
and I have a complete list of fulfilled equations along the way | 17:55 | ||
colomon | oooo, nice, I didn't try to make a list of equations. | 17:57 | |
moritz_ | very helpful for debugging :-) | 17:58 | |
nopaste.snit.ch/24126 if you're interested in the code | |||
colomon | justrakudoit.wordpress.com/2010/10/...g-subsets/ | 17:59 | |
how fast is yours? | |||
moritz_ checks | |||
23s | 18:00 | ||
probably faster if I skip debugging output, and passing along the already selected values as an array | |||
sorear | Good * #perl6! | ||
colomon | \o | 18:01 | |
moritz_ | o/ | ||
18:01
MayDaniel left
|
|||
colomon | moritz_: interesting, yours seems to be a bit faster than mine. (at a guess, I've not run it locally to get a real comparison.) | 18:01 | |
moritz_ | colomon: I put in some prior knowledge. Like that the last two numbers can never appear on the LHS of a sum | 18:03 | |
16s without the debugging code | |||
but probabaly more important, I don't look for a specific target | |||
but rather at each subsum I look if the sum appears in the array | 18:04 | ||
rakudo: say 40.16 / 15.95 # time ratio on my machine | 18:07 | ||
p6eval | rakudo 668719: OUTPUT«2.51786833855799» | ||
18:09
Italian_Plumber left,
icwiener left
18:13
plobsing joined
18:23
kjeldahl joined
18:28
Chillance left
18:46
kjeldahl left
18:50
plobsing_ joined
18:53
plobsing left,
sftp joined
19:06
Trashlord left,
incucullo left,
M_o_C joined
19:11
Axius joined
19:17
Axius_ left,
Axius left
19:22
M_o_C left
19:33
risou left
19:34
risou joined
19:38
risou left
19:39
levengli joined
19:52
levengli left
19:53
_kaare left
19:54
meppl joined
|
|||
sorear | seen tylercurtis | 19:54 | |
aloha | tylercurtis was last seen in #perl6 1 days 6 hours ago joining the channel. | ||
20:33
Holy_Cow left
20:35
Holy_Cow joined,
Schwern joined
|
|||
dalek | ast: d8e4ca9 | moritz++ | S02-builtin_data_types/array.t: [array.t] unfudge test for RT #63350, also add a similar one for $() Also covers RT #78284, which seems to be mostly a duplicate of 63350 |
20:40 | |
21:02
awwaiid left
21:14
Holy_Cow left
21:22
MayDaniel joined
21:23
synth joined
21:38
pythonian4000afk is now known as pythonian4000
22:07
Schwern left
22:17
MayDaniel left
22:25
Holy_Cow joined
22:58
wamba left
23:01
Mowah left
23:46
mavrc left
23:50
meppl left
23:53
justatheory joined
|