»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
00:06
hypercube31 joined
00:22
Ross left
00:31
nsh_ is now known as nsh,
nsh left,
nsh joined
00:41
hypercube31 left
00:46
meppl left
00:52
whiteknight left
00:53
whiteknight joined
01:15
am0c joined,
am0c left
|
|||
lue | Anyone can point me to where the spec talks about use ? I can't find it | 01:23 | |
01:24
tlb left
|
|||
lue | nvm | 01:28 | |
01:44
Exodist left
01:52
Exodist joined
01:53
Exodist left
01:56
Exodist joined,
Exodist_ joined
01:57
bacek left
01:58
bacek joined
02:01
Exodist left
02:13
Exodist joined
02:17
Exodist left
|
|||
lue | colomon: ping | 02:19 | |
colomon | o/ | ||
lue | I'm just wondering about Numeric | ||
I want to write some math-based modules, and S32::Numeric looks pretty.... sparse. | 02:20 | ||
[not in terms of length] | 02:21 | ||
colomon | it is sparsish. | ||
what are you trying to do? | |||
lue | I just would like a system for numbers based more around math, similar to how our dealing with strings is based around Unicode. | 02:22 | |
I could build a demo of what I want it to. | |||
Basically, define numbers similar to their classification in math; numbers of type Integer, Rational, Complex, and so on. | 02:23 | ||
rakudo: say pi.WHAT | 02:25 | ||
p6eval | rakudo 5cb546: OUTPUT«Num()» | ||
lue | Well yeah, that's true, but what if that was redefined as an IrRat ? In this example, the only immediate implication would be clarity. | 02:26 | |
arnsholt | Having irrationals as a standard type wouldn't make a lot of sense I think | 02:28 | |
The only encoding scheme possible AFAICT is floating point, in which case it should probably be named accordingly | 02:29 | ||
lue | rakudo: say (3.5234).WHAT | 02:30 | |
p6eval | rakudo 5cb546: OUTPUT«Rat()» | ||
lue | rakudo: my $a = pi; say $a; say $a.WHAT | ||
p6eval | rakudo 5cb546: OUTPUT«3.14159265358979Num()» | ||
lue | rakudo: say e | 02:32 | |
p6eval | rakudo 5cb546: OUTPUT«2.71828182845905» | ||
lue | rakudo: say e.WHAT | ||
p6eval | rakudo 5cb546: OUTPUT«Num()» | ||
lue | I just don't think the current state of S32::Numeric is really nice for complex math. | 02:34 | |
How the heck am I supposed to define Aleph, for (a fringe) instance? | 02:35 | ||
rakudo: my $a = {1,3,4}; say $a; # fun with sets — The Math Way | 02:38 | ||
p6eval | rakudo 5cb546: OUTPUT«_block48» | ||
lue | rakudo: my $a = (1,3,4); say $a; # fun with sets — The Perl Way | ||
p6eval | rakudo 5cb546: OUTPUT«1 3 4» | ||
colomon | I think you might want to define a mathematical set class rather than mess around with Numeric. | 02:39 | |
lue | Yeah, which is why a demo would be better, built on top of existing Perl 6. | ||
This, IMO, is the sort of thing to discuss in #rs, but I never make them (and never will until after June 17) | 02:40 | ||
colomon | lue: this is totally NOT the sort of thing to discuss in #rs. | 02:41 | |
lue | Oh. [well, I've only been to 1. How should I know? :)] | ||
Then the sort of thing to discuss on p6l and/or during heavily congested moments on #perl6 [?] | 02:42 | ||
colomon | It would fit in well on p6l. | ||
lue | Then I should 1) create a demo to demonstrate my idea 2) compose a message for p6l | 02:43 | |
colomon | sounds like a plan. | 02:44 | |
lue | Just out of curiosity, how many times has my head been used as a gavel in #rs ? | 02:47 | |
colomon | not once | 02:48 | |
when I've been watching, anyway. | |||
lue | It was in my first (and only) #rs meeting. | 02:49 | |
rakudo: use v6.1.0 | 02:53 | ||
p6eval | rakudo 5cb546: ( no output ) | ||
lue | I wonder, should Perl 6 guard against scripts written in the future? | ||
rakudo: use v7 | |||
p6eval | rakudo 5cb546: ( no output ) | ||
lue | afk | 03:00 | |
diakopter | pugs: use v7; say ::v7 | 03:01 | |
p6eval | pugs: OUTPUT«v7» | ||
03:09
eternaleye left
|
|||
ajs | just to see if anyone who's around now has an idea... | 03:19 | |
rakudo: sub a { return [ <1 2 3>, <4 5 6> ] }; for a() -> $x { say "List: $x" } | |||
p6eval | rakudo 5cb546: OUTPUT«List: 1 2 3 4 5 6» | ||
ajs | did I miss something there? Shouldn't that be List: [1, 2, 3] and List: [4, 5, 6]? | ||
rakudo: sub a { return [ [<1 2 3>], [<4 5 6>] ] }; for a() -> $x { say "List: $x" } | 03:20 | ||
p6eval | rakudo 5cb546: OUTPUT«List: 1 2 3 4 5 6» | ||
ajs | urk? | ||
TimToady | no, the inside of [] is flattening | 03:21 | |
ajs | is there a way to actually iterate over the sub-lists in a list of lists rather than the flattened elements? | 03:22 | |
TimToady | but in any case, you're only ever passing a single array object as $x | ||
rakudo: sub a { return [ [<1 2 3>], [<4 5 6>] ] }; for |a() -> $x { say "List: $x" } | 03:23 | ||
p6eval | rakudo 5cb546: OUTPUT«List: Capture()<0x3ee2e90>» | ||
TimToady | rakudo: sub a { return [ [<1 2 3>], [<4 5 6>] ] }; for @(a()) -> $x { say "List: $x" } | ||
p6eval | rakudo 5cb546: OUTPUT«List: 1 2 3List: 4 5 6» | ||
TimToady | there's one way | ||
ajs | ah | ||
I can work with that | |||
TimToady | rakudo can only do it with explicit arrays currently | ||
it doesn't really do slices yet | 03:24 | ||
rakudo: sub a { return <1 2 3>, <4 5 6> }; say a().WHAT | 03:25 | ||
p6eval | rakudo 5cb546: OUTPUT«Parcel()» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[0].WHAT | ||
p6eval | rakudo 5cb546: OUTPUT«Parcel()» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[1].WHAT | ||
p6eval | rakudo 5cb546: OUTPUT«Parcel()» | ||
ajs | It's very parcelish | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; say @(a()).elems | ||
p6eval | rakudo 5cb546: OUTPUT«6» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[1] | 03:26 | |
p6eval | rakudo 5cb546: OUTPUT«456» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; for |a() { .say } | ||
p6eval | rakudo 5cb546: OUTPUT«Capture()<0x3da3f00>» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; for a() { .say } | 03:27 | |
p6eval | rakudo 5cb546: OUTPUT«123456» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; for a().slice { .say } | ||
p6eval | rakudo 5cb546: OUTPUT«Method 'slice' not found for invocant of class 'Parcel'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; for a().values { .say } | ||
p6eval | rakudo 5cb546: OUTPUT«123456» | ||
TimToady | ah well, not quite there yet | ||
03:28
whiteknight left
|
|||
TimToady | at least it can create a parcel of parcels | 03:28 | |
03:29
patspam joined
|
|||
TimToady | rakudo: sub a { return <1 2 3>, <4 5 6> }; for a() --> **@x { @x[0].say } | 03:29 | |
p6eval | rakudo 5cb546: OUTPUT«Malformed parameter at line 11, near "**@x { @x["current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
03:37
xinming_ left
03:49
masonkramer left,
masonkramer_ joined
04:00
patspam left
04:12
gbacon left
04:35
eternaleye joined
04:40
eternaleye left
05:00
eternaleye joined,
xinming joined
|
|||
lue | hello!Q | 05:06 | |
sans Q | 05:07 | ||
05:09
eternaleye left
05:25
envi^home joined
05:28
snarkyboojum left
05:29
jakk joined
|
|||
ajs | Well, URI.pm finally parses a basic RFC3986 URI and can fetch its various parts. I'm going to get IRI and legacy URI parsing working tomorrow. | 05:29 | |
05:29
jakk left
|
|||
ajs | For returning lists of paths, I had to break down and use gather/take, but hey, it works. | 05:29 | |
Off to Zzzzzz | 05:30 | ||
05:31
snarkyboojum joined
|
|||
pugssvn | r30759 | lwall++ | [advent2009-day19.t] fix parsefail | 05:37 | |
05:38
TiMBuS joined
|
|||
lue | goodnight | 05:46 | |
05:49
frooh joined
05:55
am0c joined
06:08
am0c left
06:39
Exodist_ left
06:43
Exodist joined
|
|||
snarkyboojum | TimToady++ # fixing my mistakes :) | 06:47 | |
06:48
isBEKaml joined
|
|||
isBEKaml | hey, folks! | 06:48 | |
snarkyboojum | isBEKaml o/ | 06:53 | |
isBEKaml | snarkyboojum: how's things? I haven't still gotten around to writing up those tests for day 13. :D | 06:56 | |
snarkyboojum | isBEKaml: well thanks. Good stuff for having a go. I'm finding I'm getting quite a bit out of writing tests for those things (even if my tests are occasionally wrong) :) | 06:57 | |
isBEKaml | snarkyboojum: -Ofun++ :) | 06:59 | |
snarkyboojum | isBEKaml: aye :) | ||
07:09
BrowserUk joined
07:12
dual left
07:18
dual joined
07:20
eternaleye joined
|
|||
BrowserUk | ? | 07:24 | |
isBEKaml | \o/ | 07:34 | |
rakudo: my %hash = {a => 1, b=> 2}; say %hash.keys.fmt("'%s'", ', '); | |||
p6eval | rakudo 5cb546: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
isBEKaml | > my %hash={a=>1, b=>2}; say %hash.keys.fmt("'%s'", ', '); | 07:35 | |
'b', 'a' | |||
well, I just need to sort it.. :) | 07:36 | ||
moritz_ | good morning | 07:39 | |
isBEKaml | guten morgen, moritz_ | 07:40 | |
moritz_: I was able to make fmt work well with %hash.keys... | 07:43 | ||
07:43
Trashlord left
|
|||
moritz_ | o// | 07:43 | |
isBEKaml | moritz_: wil shortly send the patch over to you after a round of make spectest. Do I need to unfudge any tests? | 07:44 | |
moritz_ | if you find some that pass now, yes | ||
please submit the path to [email@hidden.address] | 07:45 | ||
isBEKaml | I don't know any that used fmt with Iterators or MapIterators. Will check anyway.. | ||
moritz_ | write a new one :-) | 07:46 | |
oh wait | |||
isn't there an advent calender test for that? | |||
isBEKaml | oh, yeah. totally forgot about that.. :D | 07:47 | |
07:47
Trashlord joined
|
|||
moritz_ | but I'm not sure the tests are correct | 07:48 | |
isBEKaml | advent days 2 and 8. | ||
I'm not sure about 2, look kind of odd with hashes.. | |||
moritz_ | I'm looking at day09 | 07:49 | |
sub detector(:$foo!, *%bar) { %bar.keys.fmt("'%s'", ', '); | 07:50 | ||
} | |||
is (detector(:foo(1), :bar(2), :camel(3))), ('bar', 'camel'), 'Capturing arbitrary named parameters'; | |||
this is so wrong | |||
.fmt returns a string, not a list | |||
and the test should be a junction | |||
because the order is not defined | |||
isBEKaml | you're right. I was wondering if I needed to introduce sorting to fmt - decided against it since the input ordering itself isn't defined. | 07:51 | |
07:52
iblechbot joined
|
|||
moritz_ | phenny: tell lue please not to include say() output in spectests. Since the tests work by writing 'ok' and 'not ok' to STDOUT, additional output is harmful | 07:54 | |
phenny | moritz_: I'll pass that on when lue is around. | ||
pugssvn | r30760 | moritz++ | [t/spec] fix up advent2009-day09.t | 07:57 | |
r30760 | | |||
r30760 | * remove reliance on hash ordering | |||
r30760 | * Add a plan | |||
r30760 | * remove say() calls that interact badly with TAP output | |||
r30761 | moritz++ | [t/spec] another fix to advent2009-day09.t: assignment returns the RHS, and when that is 0, the return value is False | 08:00 | ||
08:06
Su-Shee joined,
dual left
|
|||
moritz_ | bkeeler: is the commit e5f7e19e2d8bbf8ee1d26cecbbe99a61a41bab9d in your regex-interpolation branch still up-to-date? | 08:08 | |
(modulo bumping PARROT_REVISION) | |||
isBEKaml | moritz_: one small change in day09, though. Not sure, if that's a valid one or I should be handling that.. :40 s/\"//g | 08:09 | |
not ok 10 - Capturing arbitrary named parameters # got: "'bar', 'camel'" ## without any changes | |||
after stripping the double quotes: ok 10 - Capturing arbitrary named parameters | 08:10 | ||
moritz_ | isBEKaml: better to add the single quotes to the reference values in the test | ||
isBEKaml | moritz_: I merely removed the double quotes, ok seemed to match precisely against them... | 08:11 | |
moritz_ | isBEKaml: let's try to keep the tests as close as possible to the advent calendar entry | 08:12 | |
08:15
plobsing left
|
|||
pugssvn | r30762 | moritz++ | [t/spec] add missing quotes, isBEKaml++ | 08:18 | |
bkeeler | moritz_: I believe so | ||
isBEKaml | heh, the RHS is wrong | ||
moritz_ | bkeeler: i'm compiling now, will see in a moment if it still works | 08:19 | |
bkeeler: at least there was no merge conflict | |||
bkeeler | Cool! | ||
moritz_ | git++ | ||
./perl6 -e 'my $x = "a"; say "foobar" ~~ /b $x a/' | |||
# empty line | |||
:( | 08:20 | ||
bkeeler | I would not expect that to match | 08:22 | |
maybe /b $x r/ | |||
moritz_ | erm | ||
right | 08:23 | ||
works | |||
\o/ | |||
bkeeler | hehe | ||
moritz_ | running spectest now | ||
shall I push it if there's no fallout? | |||
(please say "yes" here :-) | |||
bkeeler | Sure | 08:24 | |
S05-interpolation/regex-in-variable.t is the interesting test | |||
moritz_ | passes | ||
isBEKaml | moritz_: I just ran the advent test09 after your changes and it worked fine.. | 08:25 | |
moritz_: running make spectest now ## JIC | |||
moritz_ | bkeeler: I'll add that test file, bump PARROT_REVISION and squash these two into your commit, so that it looks a bit more atomic :-) | ||
bkeeler | moritz_: Sounds great, thanks | 08:26 | |
moritz_ | now at S29.. looks good so far | 08:27 | |
08:30
Trashlord left
|
|||
moritz_ | hugme: tweet rakudoperl Rakudo now supports variable interpolation into regexes | 08:44 | |
hugme hugs moritz_; tweet delivered | |||
bkeeler | Wow, I didn't know it tweeted too | ||
isBEKaml | variable interpolation! \o/ | ||
bkeeler++ :) | |||
bkeeler | Been a long time coming | 08:45 | |
moritz_ | aye | ||
bkeeler++ | |||
08:45
[mark] joined
|
|||
isBEKaml | spec test is slow in coming through.... Still stuck in S02.. :( | 08:47 | |
08:48
Trashlord joined
|
|||
dalek | kudo: b9f260d | (Bruce Keeler)++ | (8 files): Regex Interpolation test file. |
08:48 | |
kudo: 6ec9b6a | moritz++ | t/spectest.data: run advent day 09 integration test |
|||
kudo: e36cbae | moritz++ | (2 files): update ChangeLog, CREDITS |
|||
08:50
Ross joined
08:51
Exodist left
|
|||
moritz_ | rakudo: use Test; is_approx 2.2**2.2, 5.66669577875008 | 08:53 | |
p6eval | rakudo 5cb546: OUTPUT«ok 1 - » | ||
moritz_ | could somebody on a 32 bit platform please run that test and tell me if passes? | ||
isBEKaml | moritz_: 32 bit linux here. Failed. | 08:55 | |
moritz_ | isBEKaml: thanks | 08:56 | |
isBEKaml: if you remove the last 5 or 6 digits of the RHS, does it pass? | |||
08:58
Trashlord left
|
|||
isBEKaml | moritz_: 5 digits removed: PAST::Compiler can't compile node of type BigInt and stacktraces | 08:58 | |
08:58
Trashlord joined
|
|||
isBEKaml | perl6 -e 'use Test; is_approx 2.2**2.2, 5.666695778' | 08:58 | |
moritz_ | :( | ||
isBEKaml | perl6 -e 'use Test; is_approx 2.2**2.2, 5.66669577' ##PASS! | 09:00 | |
moritz_ | isBEKaml: then I guess is_approx 2**2.2, 4.59479341 also passes? | 09:01 | |
09:01
Ross left
|
|||
moritz_ | rakudo: my $x = 'o'; say 'foo' ~~ / $x+/ | 09:01 | |
p6eval | rakudo 6ec9b6: OUTPUT«oo» | ||
moritz_ | \o/ | 09:02 | |
isBEKaml | moritz_: yes, passes. | ||
09:02
meppl joined
|
|||
isBEKaml | wtf? S02-names_and_variables/fmt tests failed on it.. | 09:03 | |
pugssvn | r30763 | moritz++ | [t/spec] simplify and unfudge two arithmetic tests | ||
09:03
Trashlord left,
Ross joined
09:04
exodist joined
|
|||
isBEKaml | rakudo: my $hash={a=>1.0, b=>2.2}; my $str= $hash.fmt("%s:%d", "_"); say $str; ## is this correct? | 09:06 | |
p6eval | rakudo 6ec9b6: OUTPUT«a:1_b:2» | ||
isBEKaml | :( | ||
moritz_ | why wouldn't it be? | 09:08 | |
isBEKaml | that's what failed on me here.. | ||
wait, lemme try with the latest Rakudo (have to build it first) | |||
09:09
eternaleye left
09:10
eternaleye joined
|
|||
isBEKaml | ah, I figured out (my local changes were crashing it) | 09:11 | |
I was playing with EnumMap and since an Hash is EnumMap - oh, well... :) | 09:15 | ||
pugssvn | r30764 | moritz++ | [t/spec] rakudo unfudges | 09:18 | |
snarkyboojum | at the end of a spectest, does the summary (e.g. Files=453, Tests=34674) indicate the number of passing tests excluding fudges etc? | 09:33 | |
moritz_ | snarkyboojum: that number includes TODOed and SKIPped tests | 09:34 | |
snarkyboojum: which is why we have tools/test_summary.pl | 09:35 | ||
which gives us the numbers we are interested in | |||
snarkyboojum | moritz_: ah - sweet - test_summary.pl crashes for me at the end of the run, will have to investigate | 09:36 | |
09:44
[mark] left
09:45
muixirt joined
09:52
uniejo joined
10:04
uniejo left
10:11
hercynium left,
patrickas joined
|
|||
patrickas | hello | 10:11 | |
moritz_ | hi | 10:12 | |
isBEKaml | moritz_: > say 2.2 ** 2.2; use Test; is_approx 2.2**2.2, 5.66669577875008 ### 5.66669577875008, not ok 1 - | ||
hello patrickas | |||
moritz_ | 32492 passing tests | ||
patrickas | moritz_: it seems there are no other takers for the weekly challenge :-( | 10:13 | |
moritz_ | patrickas: David Green asked some questions about it on p6c | ||
patrickas | Oh that's good ... cause I have tons of patches I ca push | ||
unless someone else wants to work on it more | |||
moritz_ | patrickas: I still have hope to see a submission from him, but it probably won't be in form of extending the one you started | 10:14 | |
so go ahead | |||
patrickas | isBEKaml: how are the advent scripts progressing ? | ||
snarkyboojum | ah - seems that test_summary.pl does a close of docs/test_summary.times at the end of a test run. If it can't close the filehandle the script dies. When the program opens the file at the beginning of a run it doesn't test if it can open it or not | 10:15 | |
isBEKaml | patrickas: I just fixed one of the issues in .fmt not taking Iterators. About to send a patch after the spectest completes. | ||
10:15
synth joined
|
|||
isBEKaml | takes an helluva long time on my poor old machine.. :| | 10:16 | |
moritz_ | snarkyboojum: that's bad... I'll change it to warning instead | ||
snarkyboojum | so that means it's never created | ||
patrickas | isBEKaml: that's cool ... yea I have an oldish machine too ... so i feel your pain | ||
snarkyboojum | moritz_: about line 376 or so | 10:17 | |
isBEKaml | moritz_: see above from my REPL. The result is accurate but is_approx cops out.. | ||
patrickas | moritz_: I just pushed we now pass 28 of the 31 tests , I am still having issues with the spacey things cause it seems on my machine (windows XP) they don't get passed to the script as I ould have expected them too | ||
moritz_ | yes, doesn't like rats with lots of decimals | ||
patrickas: that's why I'm in favour of leaving out spaceys for now - it's platform dependent, hairy and not essential | 10:18 | ||
patrickas | moritz_: I also I did some strange things to get the " :name<value> but False " thingies to pass ... I am not sure what I did is recommended but it seemed to work | 10:19 | |
snarkyboojum | moritz_: sorry - line 367 :) | 10:20 | |
dalek | kudo: 85866d5 | moritz++ | tools/test_summary.pl: make tools/test_summary.pl warn instead of die if some file handles cannot be |
10:22 | |
10:26
jhuni joined
|
|||
snarkyboojum | thanks moritz_ - will give it a go | 10:29 | |
10:32
hercynium joined
|
|||
snarkyboojum | moritz_: nice - 32471 passing tests here - that fix worked nicely | 10:48 | |
moritz_ | rakudo: say 2**15 | 10:52 | |
p6eval | rakudo 85866d: OUTPUT«32768» | ||
10:57
Ross left
|
|||
snarkyboojum | rakudo: say e ** (i * 2 * pi) # this core dumps on my machine | 11:00 | |
p6eval | rakudo 85866d: OUTPUT«Confused at line 11, near "say e ** ("current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
moritz_ | std: say e ** (i * 2 * pi) | 11:01 | |
p6eval | std 30764: OUTPUT«ok 00:01 114m» | ||
snarkyboojum | oh.. in the REPL | ||
moritz_ | rakudo: e | ||
p6eval | rakudo 85866d: ( no output ) | ||
moritz_ | rakudo: say e 3 | ||
p6eval | rakudo 85866d: OUTPUT«Confused at line 11, near "say e 3"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
snarkyboojum | weird.. core dumps in REPL, but gives me the grammar panic using -e | 11:02 | |
moritz_ doesn't understand why it doesn't parse | |||
rakudo: say i | |||
p6eval | rakudo 85866d: OUTPUT«Could not find sub &icurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
moritz_ | ah | ||
rakudo: say e ** (1i * 2 * pi) | |||
p6eval | rakudo 85866d: OUTPUT«1 + -2.44929359829471e-16i» | ||
snarkyboojum | ah.. (say i) is enough for it to coredump in the reply as well | 11:03 | |
moritz_ | ouch | ||
snarkyboojum | actually - just 'i' | ||
is enough | |||
:| | |||
11:05
quester_ joined
|
|||
snarkyboojum | err.. something is strange on my build, I can segfault the REPL by typing any random thing - is this a result of autoprinting? | 11:05 | |
e.g. 'abc' segfaults | |||
11:07
XaeroOne joined
|
|||
quester_ | . | 11:07 | |
moritz_ | i also segfaults here | 11:08 | |
time for a bug report | |||
snarkyboojum | I noticed that the repl autoprints now.. maybe related :) | 11:09 | |
moritz_ | snarkyboojum: let me guess... anything that throws an exception? | ||
snarkyboojum | maybe | ||
I'm doing a clean build atm | |||
moritz_ | bug report submitted | 11:11 | |
it's trapped in infinite recursion in Parrot_gc_mark_PMC_alive_fun | |||
snarkyboojum | moritz_++ | 11:12 | |
11:14
isBEKaml left
11:16
isBEKaml joined
|
|||
isBEKaml | oh, crap! power reset here. :( ## lost patience with having to do another make spectest.. :/ | 11:17 | |
snarkyboojum | moritz_: yep - looks like any exception is segfaulting the REPL | 11:18 | |
11:20
masak joined
|
|||
masak | oh hai, #perl6! | 11:20 | |
isBEKaml | moritz_: is there any way we can continue the spectest from where it last went off in case of a non-zero(fail) exit? | ||
yo, masak! | |||
snarkyboojum | masak o/ | ||
masak | isBEKaml, snarkyboojum! \o/ | ||
so, basically, May/June is the month where we get iterators right in the spec and in Rakudo, right? because that's the main blocker for Rakudo Star, isn't it? | 11:22 | ||
isBEKaml | moritz_: I don't even know where it last finished. I was afk and just noticed the power reset.. :/ | ||
masak: we even got regex interpolation here courtesy bkeeler++ | 11:23 | ||
colomon | masak: IMO yes. | ||
isBEKaml | rakudo: my $x = 'o'; say "hellooo" ~~ /$x+/; | ||
p6eval | rakudo 85866d: OUTPUT«ooo» | ||
masak | TimToady: [backlog] re any(1,2,3) being six different sets. I'd like to see the math behind that. I count 2^3 - 1 = 7. | 11:24 | |
colomon | 1 2 3 1,2 1,3 2,3 1,2,3 | 11:25 | |
that's 7. | |||
masak++ | 11:26 | ||
masak | I tend to think of set memberships as binary strings. there are eight binary strings of length 3. the 000 string is the only one any(1,2,3) doesn't accept. | 11:28 | |
11:32
patrickas left
11:33
rurban joined
11:34
rurban left,
iblechbot left
11:42
JimmyZ joined
11:47
patrickas joined,
Ross joined
11:48
synth left
11:53
athomason left
11:54
lestrrat left,
mdxi left
12:05
gbacon joined
12:08
jaldhar left
12:09
jaldhar joined
12:15
isBEKaml left,
whiteknight joined
12:16
Ross left
|
|||
JimmyZ | /usr/local/bin/parrot perl6.pbc --target=pir --output=Test.pir Test.pm Could not find sub ¬results | 12:20 | |
build rakudo failed | |||
moritz_ | JimmyZ: did you reconfigure before building? | 12:21 | |
masak | 卓明亮! \o/ | 12:23 | |
12:25
isBEKaml joined,
kel__ joined
|
|||
masak | hm. GGE tests segfaulted again. it's non-reproducible, and occurs after a random amount of time. not exactly bug reporting material. | 12:27 | |
arnsholt | GC bug perhaps? | 12:28 | |
moritz_ | snarkyboojum++ found a GC bug earlier that's quite easy to reproduce | ||
masak | arnsholt: likely. | ||
dalek | kudo: d1c7d26 | moritz++ | t/spectest.data: run four more advent test files |
12:29 | |
moritz_ | at least it manifests itself in an infinite recursion in Parrot_CallContext_mark | ||
arnsholt | moritz_: Impressive. Got a link? I'm curious =) | ||
jnthn | o/ | ||
moritz_ | arnsholt: rt.perl.org/rt3/Ticket/Display.html?id=75292 | ||
arnsholt | Infinite recursion is always fun ^^ | ||
moritz_ | \o | ||
anything on the REPL that throws an exception triggers it | 12:30 | ||
jnthn | moritz_: Ewww...I've seen those come up before too. | ||
masak | std: use v7; | ||
p6eval | std 30764: OUTPUT«ok 00:01 113m» | ||
masak | could be argued that STD.pm6 should catch that. | ||
arnsholt | Fun. Hopefully that recursion bug should be reasonably fixable? | 12:31 | |
jnthn | Yay, the regex interpolation patch got in! | 12:32 | |
bkeeler++, moritz_++! | |||
masak | bkeeler++ moritz_++ | ||
isBEKaml | moritz_: anything on the spectest that I asked earlier? | 12:34 | |
moritz_ | isBEKaml: which one? the .fmt? | 12:35 | |
moritz_ lost overview | |||
12:35
whiteknight left
|
|||
isBEKaml | moritz_: no, is there any way we can continue the spectest from where it last went off in case of a non-zero(fail) exit? | 12:35 | |
moritz_: the .fmt is fixed and is available locally as a patch here. I'm still finding it hard with spectests taking a long time and power resets on and off here.. | 12:36 | ||
:/ | |||
moritz_ | non-zero exit or a failed test don't interrupt the other tests | 12:37 | |
so I'm not sure what you mean :/ | |||
isBEKaml | moritz_: power reset, computer reboots... :( | ||
12:38
masak left
|
|||
moritz_ | isBEKaml: you can put names of test files in t/localtest.data and run 'make localtest' | 12:39 | |
isBEKaml | there should be a way out. Like, perhaps, write log files specific to test files and later clean them out once the spectest is complete. So, the next time we run the make spectest, it just picks off after the last incomplete build.. | ||
erm, s/build/spectest/ | 12:40 | ||
12:40
whiteknight joined
|
|||
moritz_ | log the test output to a file | 12:40 | |
dalek | kudo: 1d3f5ea | jonathan++ | docs/ROADMAP: Move lexical variables in regexes to the completed section of the ROADMAP. |
||
moritz_ | extract the file names of the completed tests | ||
copy spectest.data to localtest.data, omitting those tests you've already run | |||
just a SMOP in perl :-) | |||
isBEKaml | SMOP ? | ||
12:41
Ross joined
|
|||
moritz_ | small matter of programming | 12:41 | |
isBEKaml | next time, definitely. :) | ||
are the integration tests reasonably complete that I can rely on them now? | 12:42 | ||
moritz_ | relying on it for what purpose? | 12:45 | |
12:45
quester_ left
|
|||
isBEKaml | skip spectest. ;) | 12:45 | |
> my %hash={a=>2, b=>3.0}; say %hash.keys.fmt("'%s'", ', '); | 12:46 | ||
'b', 'a' | |||
moritz_ | nope | ||
jnthn | No, should run spectest suite. | ||
12:46
athomason joined
|
|||
moritz_ | there's a good reason why we run these 32k tests regularly :/ | 12:47 | |
isBEKaml | "power" struggles. #pun intended... | ||
12:47
mdxi joined
|
|||
isBEKaml | I'm running it for the fourth time in the last 8 hrs... :/ | 12:47 | |
12:47
lestrrat joined
|
|||
moritz_ | "business as usual" | 12:48 | |
jnthn | isBEKaml: That doesn't strike me as odd. :-) | ||
isBEKaml | lol, there is a reason why you guys are awesome! #perl6++ | ||
all for a minor patch yet to be pushed in.. | 12:49 | ||
moritz_ | isBEKaml: I think in that case it's reasonably safe to grep for tests that contain fmt, and only run those | ||
isBEKaml | moritz_: only 5 test files.. | 12:51 | |
moritz_ | btw now that variables properly interpolate into regexes, it'll be easy to rewrite subst in terms of match | 12:52 | |
which means that we get all the goodness of combined adverbs (:x, :nth, :c, :p, :g etc.) for free that colomon++ and I worked on last week | 12:53 | ||
well, almost for free | |||
and I'm not sure what :overlap on subst is supposed to do :/ | |||
jnthn | moritz_: I guess getting the adverbs in so m:g/.../ will work would also be nice. | 12:54 | |
jnthn was glancing over how STD did that. | |||
moritz_ | jnthn: would be nice... for :s/// I failed | 12:55 | |
JimmyZ | moritz_: thanks. it builds now | 12:57 | |
12:59
gbacon left
|
|||
colomon | I don't think :overlap or :exhaustive are supposed to work on subst. :) | 13:00 | |
and moritz_++ of course, too. :D | |||
isBEKaml | rakudo: "Perl 6 Advent".comb(/<alpha>/).join("|").say; | 13:01 | |
p6eval | rakudo d1c7d2: OUTPUT«Cannot take substr outside stringcurrent instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)» | ||
colomon | actually, I'm not quite sure we have the combined adverbs right yet -- :x :nth together, say. | ||
isBEKaml | moritz_: day08 is wrong too.. | ||
colomon | and how the heck do you implement :i? | 13:02 | |
oh, ouch, my latest patch devastates the spectests. :\ | |||
moritz_ | colomon: :i must be handed to the regex compiler at regex compile time | 13:03 | |
colomon: so match($regex, :i) has no effect | |||
and .subst($regex, $subst, :ii) only applies the samecase function | |||
13:03
iblechbot joined
|
|||
colomon | that seems like a bad thing.... | 13:03 | |
moritz_ | that's what the spec says | ||
by recent change | |||
jnthn | Maybe it should warn, at least? | ||
moritz_ | jnthn: that could be done easily | 13:04 | |
jnthn | People will try it. | ||
moritz_ | aye | ||
colomon | jnthn: just got | 13:05 | |
Ambiguous dispatch to multi 'infix:<<=>'. Ambiguous candidates had signatures: | |||
:(Numeric $a, Numeric $b) | |||
:(Real $a, Real $b) | |||
jnthn | rakudo: say Real ~~ Numeric | 13:06 | |
p6eval | rakudo d1c7d2: OUTPUT«0» | ||
jnthn | rakudo: say Numeric ~~ Real | ||
p6eval | rakudo d1c7d2: OUTPUT«0» | ||
colomon | huh. | ||
Real does Numeric | |||
moritz_ | not in rakudo :/ | ||
jnthn | role Real does Numeric { | ||
hmm. | |||
colomon | role Real does Numeric { | ||
isBEKaml | rakudo: my $string ="Perl World"; $string.comb(/\w/).join("|").say; | 13:12 | |
p6eval | rakudo d1c7d2: OUTPUT«P|e|r|l|W|o|r|l|d» | ||
isBEKaml | rakudo: my $string ="Perl World"; $string.comb(/<alpha>/).join("|").say; | 13:13 | |
p6eval | rakudo d1c7d2: OUTPUT«Cannot take substr outside stringcurrent instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)» | ||
jnthn | Hmm. Bug in <alpha>? | ||
isBEKaml | Don't know.. found that in Adventday 08.t | ||
moritz_ | maybe bug in .comb? | ||
isBEKaml | probably | 13:14 | |
moritz_ | rakudo: 'Perl World'.match(/<alpha>/, :g) | ||
p6eval | rakudo d1c7d2: OUTPUT«Cannot take substr outside stringcurrent instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)» | ||
moritz_ | unlikely | ||
jnthn | rakudo: say "" ~~ /<alpha>/ | ||
p6eval | rakudo d1c7d2: OUTPUT«Cannot take substr outside stringcurrent instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)» | ||
arnsholt | Does Rakudo do type parametrisation yet? | 13:15 | |
isBEKaml | According to S05, .match is equivalent to .comb ?? | ||
moritz_ | parameterized roles, yes | ||
jnthn | arnsholt: Yes | ||
arnsholt: It even works. Ish. :-) | |||
moritz_ | isBEKaml: .comb has :g enabled by default | ||
jnthn | colomon: Building a latest Parrot/Rakudo. | 13:16 | |
arnsholt | Cool | ||
isBEKaml | moritz_: I see $string.comb(/pattern/, :match); what switches are used in place of :match here? :g - enabled by default... | 13:17 | |
moritz_: same as in s/// I believe? | |||
moritz_ | isBEKaml: I don't know if .comb should accept any other switches | 13:18 | |
isBEKaml: that's what .match is for | |||
13:19
masak joined
|
|||
jnthn | yayitsmasak! | 13:23 | |
colomon: Hmm. The Obvious Fix didn't cut it. Will dig deeper. | |||
masak | lolcomputerdiedaviolentdeath | ||
jnthn | oh noes halp! | ||
Violent? | |||
masak | as in the nice multi-language Apple memory corruption message that one gets about once a year with a Mac. | 13:24 | |
jnthn | Oh | ||
masak | took the time to do some system-wide upgrades. | ||
I seldom reboot. :) | |||
jnthn | ;-) | ||
colomon | jnthn++ | ||
jnthn | Heh, that's not *so* violent. | ||
masak | you're right. my Firefox tabs survived. :P | 13:25 | |
again. | |||
jnthn | I guess I'm biased after one of my computers once managed to start shooting flames out of the PSU. | ||
Which was a decidedly violent death. | 13:26 | ||
masak | that's like, a Hollywood computer death! | ||
jnthn | Remarkably, I did manage to shut it down cleanly before it set fire to anything else though. | ||
Yeah, that was the amazing thing - it still ran! | |||
masak | o.O | 13:27 | |
jnthn | Needless to say, I replaced the PSU after that little incident. :-) | ||
Terrified the guy sat on the desk accross from me. | |||
masak | jnthn: did you 'hotswap' it? :P | ||
jnthn | :P | ||
isBEKaml | lol, jnthn, did you take a snap of the guy's face? :P | 13:28 | |
jnthn | isBEKaml: Strangely, that didn't occur to me at the time. ;-) | ||
isBEKaml | the poor guy must have ran out and dialled 911.. HALP! ;) | 13:30 | |
that'd have been more cinematic! | 13:31 | ||
snarkyboojum | is there a known problem chaining hyperoperators? | ||
rakudo: say ("0x50", "0x65", "0x72", "0x6C", "0x36")>>.chr | 13:32 | ||
moritz_ | jnthn: it would have been the perfect occasion to ask the PSU vendor (or manufacturer) for a free replacement, in order to avoid some bad press | ||
p6eval | rakudo d1c7d2: OUTPUT«Perl6» | ||
snarkyboojum | rakudo: say ("0x50", "0x65", "0x72", "0x6C", "0x36")>>.fmt("%s")>>.chr | ||
p6eval | rakudo d1c7d2: OUTPUT« | ||
13:32
M_o_C joined
|
|||
moritz_ | rakudo: say '0x50'.chr.fmt('%s') | 13:32 | |
p6eval | rakudo d1c7d2: OUTPUT«P» | ||
moritz_ | rakudo: say '0x50'.fmt('%s').chr | 13:33 | |
p6eval | rakudo d1c7d2: OUTPUT« | ||
moritz_ | snarkyboojum: it's just that that expression produces some control characters | ||
snarkyboojum | oh it's that | ||
alpha: say '0x50'.fmt('%s').chr | |||
p6eval | alpha 30e0ed: OUTPUT«P» | ||
moritz_ | never trust your terminal - only hexdump -C doesn't lie to you | ||
snarkyboojum | alpha was ok with it | ||
it's a failing test in day 8 | 13:34 | ||
isBEKaml | snarkyboojum: another failing test was spotted in day 8 too around .comb.. see above.. | ||
snarkyboojum | yep | ||
I left em in as failing tests, but was going to fudge them with meaningful messages | 13:35 | ||
.comb(/<alpha>/) fails | |||
13:36
jaldhar left
|
|||
masak | uasi++ # new messagepack-pm6 module is up on proto.perl6.org -- and it has all three medals! | 13:36 | |
13:36
jaldhar joined
|
|||
moritz_ stupid enough to need about 4 iterations on a .match based .subst | 13:36 | ||
masak | now that I know about tests, I probably wouldn't trust myself to produce decent code without them. I know I'm too stupid to produce bug-free code. :) | 13:38 | |
jnthn | oh noes my only module on proto only has 2 medals! | ||
masak | dåligt. :P | 13:39 | |
jnthn | :P | ||
OTOH, my only module on proto is lolsql. :-) | |||
moritz_ | is there a good reason for zavolaj not to be on that list? | ||
masak was just going to ask that | 13:40 | ||
zavolaj also lacks one medal. | |||
JimmyZ | masak: 麦高 \o/ | ||
jnthn | oh | ||
Yes, probably Zavolaj should be on there | |||
Given that e.g. FakeDBI depends on it. | 13:41 | ||
masak | JimmyZ: 你怎么了? | ||
jnthn: zavolaj *is* on there. | |||
pugssvn | r30765 | snarkyboojum++ | [t/spec] Fudging some failing tests for Advent Calendar Day 8 | ||
jnthn | Oh. | ||
:-) | |||
JimmyZ | masak: 哈哈,没什么 | ||
masak | just follow the alphabetical sorting... | ||
jnthn | Why does proto have a happy bowling ball next to it in the list? :-) | ||
masak | JimmyZ: no? | 13:42 | |
jnthn: that's proto's logotype. :) | |||
jnthn: I showed it to you in my kitchen. | |||
jnthn | Oh, yes! | ||
masak | november has one, too, but it was never activated, I think. | ||
snarkyboojum | just needs a t/ folder :P | ||
jnthn should try and make one for zavolaj | 13:43 | ||
masak | ++jnthn | ||
isBEKaml wonders why the logo is bigger than the adjacent text... | 13:46 | ||
jnthn | colomon: Ah, may have found it. | 13:47 | |
Subtle. :-/ | |||
colomon | jnthn++ | 13:48 | |
patrickas | isBEKaml we guessed 32x32 px should be fine ... I am wondering if 16x16 would have been a better choice! | ||
masak: did you take a look at my latest november attempt for 32x32 ? 92.243.14.59/tmp/november.png | |||
masak | I suspect 16x16 is too small for a project icon. | ||
13:48
jessejames joined
|
|||
masak | patrickas: yes, and I really like it! | 13:49 | |
isBEKaml | Sweet November! :) | ||
jnthn | Red October. | ||
isBEKaml | No, not the movie... ;) | ||
masak | isBEKaml: clearly there is *something* wrong with the way icons and project names are laid out on the page. suggestions, patches welcome. | ||
jnthn | Oh, not that one either. | 13:50 | |
:) | |||
patrickas | Maybe we should have some explanation on the proto page that anyone who puts a file in the right folder will automatically show up as an icon in the list | ||
masak | jnthn: I remember the movie 'The Hunt for Pink November' with fondness :) | ||
13:50
jessejames left
|
|||
isBEKaml | I can't place my finger on it exactly. It certainly is slow in scrolling through pages.. | 13:50 | |
masak | patrickas: yeah. perhaps not on the page itself, but certainly a link to an explanation somewhere. | ||
jnthn | rakudo: say Real ~~ Numeric; say Numeric ~~ Real; | 13:51 | |
p6eval | rakudo d1c7d2: OUTPUT«00» | ||
jnthn | > say Real ~~ Numeric; say Numeric ~~ Real; | ||
1 | |||
0 | |||
13:51
iblechbot left
|
|||
jnthn | Hopefully I didn't decimate the spectests. | 13:51 | |
colomon | \o/ | ||
isBEKaml | masak: More than that, I was thinking why we should have to display the projects' logo on the page. After all, the logos are of the project not of proto.. | ||
13:52
pmurias joined
|
|||
masak | isBEKaml: I'm willing to be convinced otherwise, but I believe that having the logos there will add life to the list, just like the medals do. a small way for the projects to project their personality on their line of the table. | 13:53 | |
s/line/row/ | |||
13:53
mberends joined
|
|||
jnthn | mberends! \o/ | 13:53 | |
mberends | hai jnthn! | 13:54 | |
masak | mberends! ✌ | ||
isBEKaml: having a logo also Yet Another Small Sign that the project is alive and has contributors who care for it. just like the medals are. | 13:55 | ||
mberends | masak: hi! can we chat about proto? | ||
masak | mberends: gladly. | 13:56 | |
13:56
frex joined
|
|||
isBEKaml | masak: in any case, the logo is too huge for the every row of the project. If there were logos for every project, the page would definitely be cluttered. | 13:57 | |
13:57
Pat__ joined
|
|||
masak | isBEKaml: it's definitely not a simple thing to get it right. people's browsers have varying default font sizes, too. | 13:57 | |
but don't let my bikeshedding stand in the way of improvements. patches speak louder than words. | 13:58 | ||
13:59
patrickas left
|
|||
jnthn | colomon: We make it through S12 and S14, so probably the patch is gonna be OK. :-) | 13:59 | |
mberends | ok. the backlogs showed some people a bit unclear about the configuration process. So far it has tried very well to hide almost in the background, but that may be causing confusion between using an existing Rakudo or proto building a new Rakudo for the user. | ||
masak | mberends: aye. based on that, I think it's time to switch over to installed-rakudo. | 14:00 | |
mberends: at the time, a year ago, there wasn't an 'install' target for Rakudo, so it made more sense for proto to install it locally. | |||
mberends: now that there is, it doesn't as much. | |||
I think a fair bit of code can be safely ripped out. | |||
mberends | masak: I see an alternative solution, that proto could be a bit more forward about managing the installed-rakudo on behalf of the user. | 14:02 | |
isBEKaml | masak: I agree it's not easy to get a balanced look on the page, right. That's always a challenge in any web dev work.. | ||
masak | isBEKaml: yah. I don't want to sound discouraging in saying that, though. I agree that the current appearance needs some love. | 14:03 | |
mberends: managing, how? | |||
isBEKaml | masak: Cookies need more love - Oracle, Matrix.. :D | 14:04 | |
mberends | masak: for example proto performing the the appropriate Rakudo updates when PARROT_VERSION is bumped for a bleeding user, or when a new monthly release is cut for a stable user. | 14:05 | |
masak | isBEKaml: aye. the third movie. :) | 14:06 | |
mberends: one of my never-implemented visions for proto was to have rakudo and parrot appear as 'normal' projects among the rest; so that they could be managed with the usual install/update subcommands. | 14:07 | ||
mberends | masak: aye, I would really like that too. It's almost there in the current proto. | 14:08 | |
masak | mberends: oh, and proto itself, too. that's why it has the type 'bootstrap' in the list. | ||
mberends | *nod* | ||
masak | rakudo and parrot probably fall under the 'bootstrap' category as well. | ||
mberends | yes, definitely | ||
masak | though it must be possible to have a proto install that's fine with already-installed rakudo/parrot and doesn't try to manage them. | ||
I'd like for the default to be "Hi, you don't seem to have Perl 6 installed. If you'd like proto to install them, please run `./proto install perl6`' | 14:09 | ||
mberends | okay, that clarifies a point for me. It matters whether Rakudo is already installed when proto bootstraps itself. | 14:10 | |
masak | yes. | ||
people have often been complaining that proto installs a local Parrot/Rakudo, even though they already have one. | 14:11 | ||
mberends | maybe that needs to be recorded in the conf file, instead of being implied as it currently seems to be. | ||
masak | the defense for that odd behaviour was that they hadn't configured proto to find those already-installed things for them. | ||
mberends: the conf file probably needs a version bump, yes. | 14:12 | ||
mberends | masak: no problem with that at all | ||
masak | nowadays, we *can* detect an already-installed 'perl6' executable, since it's in a global location. so we should probably do that. | ||
and default to it if it exists. | |||
mberends | ok, I'll work on a minor conf file change and its consequences. Treating Rakudo and Parrot as projects (though special ones) was half done already. | 14:14 | |
masak | \o/ | ||
they are special ones. | |||
for one thing, the p5 part of proto must be able to handle them. | 14:15 | ||
mberends | The roadmap goal here is to help novices use Rakudo and modules easily, whilst not overriding the preferences of the advanced (already-having-Rakudo) users. | 14:16 | |
isBEKaml | moritz_: I find that S02-magicals/pid always fail.. Can you fudge that? | ||
masak | *nod* | ||
14:17
snarkyboojum left
|
|||
masak | ideally, proto should be kind both to those who happened to have installed Rakudo already, and those who didn't. probably slightly kinder to the latter crowd, since it's more likely to consist of people in need of assistance. | 14:17 | |
mberends | aye | ||
moritz_ | isBEKaml: it's better if you fudge it, since it passes forme | 14:20 | |
14:21
rv2733 joined
14:22
rv2733 left,
hercynium left
|
|||
BrowserUk | Hi all; Anything for me Phenny? | 14:23 | |
moritz_ | hi BrowserUk | ||
rakudo: say Mu ~ Mu | 14:24 | ||
p6eval | rakudo d1c7d2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<~>'. Available candidates are::():(Any $a, Any $b)current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
moritz_ | that's... not many candidates | ||
isBEKaml | I thought ~ is applicable only to Str? :O | 14:25 | |
moritz_ | rakudo: say 2 ~ 4 | ||
p6eval | rakudo d1c7d2: OUTPUT«24» | ||
moritz_ | it coerces to Str | ||
isBEKaml | Stringified, of course.. | ||
moritz_ | rakudo: Mu + Mu | ||
p6eval | rakudo d1c7d2: OUTPUT«No applicable candidates found to dispatch to for 'infix:<+>'. Available candidates are::():(!whatever_dispatch_helper , !whatever_dispatch_helper ):(Int $a, Int $b):(Rat $a, Rat $b):(Rat $a, Int $b):(Int $a, Rat $b):(Complex $a, Complex $b):(Date $d, Int $x):(Int $x, | ||
..Date… | |||
moritz_ | many more candidates | ||
which is why I wondered | |||
mberends | masak: would you be in favour of or against proto doing some interactive prompting for user input during initial configuration, if that would help clarify the major configuration choices? So far that has gone against the 'low profile' style, but would have avoided much of the user confusion. otoh, many people find cpan's long series of questions tedious. | 14:26 | |
jnthn | colomon: fix is pushed. | ||
dalek | kudo: 03da863 | jonathan++ | docs/ROADMAP: REPL actually prints now thanks to pmichaud++ and sorear++, so move that item to |
||
kudo: eb84e91 | jonathan++ | src/ (3 files): Make R1 ~~ R2 work when role R1 was never yet consumed. Also add a does to through a fallback to punning and .does on the punned class. |
|||
isBEKaml | mberends: cpan? there were quite a lot of user inputs... | ||
masak | mberends: I'm against it, for just the reasons you specify. | ||
mberends: I never liked CPAN's barrage of questions, half of which I'm unqualified to answer, some of which the installer should endeavor to find out by itself. | 14:27 | ||
moritz_ | mberends: btw I had to revert your patch that called exit() when a modul wasn't found... that made it uncatchable in eval | 14:28 | |
masak | mberends: saying "Hi, created a config file for you, inspect/change it if you care, otherwise let's just make the best of it" seems preferable to me. do you have a case where that would be undesirable? | ||
moritz_ | mberends: I find your goal very laudable, but the means were wrong/harmful | 14:29 | |
mberends | masak: the counter to that is proto saying effectively: read my even longer conf file, and override my decisions at your own risk ;-) | ||
masak | mberends: as long as the conf file stays relevant, I see no problem. it's opt-in, that's all. | 14:30 | |
mberends: people who want to configure will care enough to venture in there. | |||
also, I bet it's still shorter than CPAN's config process :P | |||
moritz_ | and that config file is only long because of the many comments | 14:31 | |
14:31
muixirt left
|
|||
moritz_ | it's not hundreds of options that need adapting | 14:31 | |
isBEKaml | moritz_: That was not a fail in pid, per se. They all seemed to pass - an unsightly stacktrace misled me into thinking it failed.. Here's the error message: Could not find sub &PID and last line: ok 1 - My PID differs from the child pid (4012 != ) | ||
14:31
hercynium joined
|
|||
isBEKaml | moritz_: Note, the child pid is Nil. | 14:31 | |
mberends | moritz_: +1, I was of two minds about the change from the moment I pushed the commit. Masking the exception was bad. It's a pity the stacktrace cannot be disabled the way Perl 5 does it, by finishing the error message with a "\n". | 14:32 | |
masak | +1 | 14:33 | |
it's a bit arbitrary with the "\n", but at least the stack trace is gone. | |||
moritz_ | rakudo: my $x = 'h'; say 'hello'.match(rx{ $x }).to | 14:34 | |
p6eval | rakudo d1c7d2: OUTPUT«1» | ||
moritz_ | rakudo: my $x = 'h'; say 'hello'.match(rx{ $x }) | ||
14:34
Pat__ is now known as patrickas
|
|||
p6eval | rakudo d1c7d2: OUTPUT«h» | 14:34 | |
jnthn gone for a bit | 14:35 | ||
mberends | this morning by the Ostsee, a restaurant had a "Max und Moritz" item on the menu ;-) Didn't order it though, it was chicken nuggets and potato frites. | 14:36 | |
moritz_ | mberends: "Max und Moritz" is a famous piece of children's tale (or so) from Wilhelm Busch | ||
and about 95% of jokes concerning my name mention Max | 14:37 | ||
mberends | yes, I remember you saying it. Poor Moritz_. How many times now? | ||
moritz_ | mberends: about twice a year - not too bad | 14:38 | |
mberends | heh | ||
masak .oO( masak und moritz_... ) | 14:39 | ||
I recall that the fate of those two boys involved being ground to pieces and eaten by birds. and that was after they made life unhappy for many people by playing mean tricks on them. so probably not good role models... :P | 14:41 | ||
moritz_ | mostly not evidence of modern pedagogics either | ||
should a failing .match return Nil, or a False match object? | 14:44 | ||
rakudo: say 'abc'.match(rx{.}, :x(0)) | |||
p6eval | rakudo eb84e9: OUTPUT«a» | ||
masak | the latter, I think. | 14:48 | |
because ~~ and .parse do, no? | |||
14:48
agentzh joined
|
|||
moritz_ | there are situations when .match tries to match multiple times | 14:49 | |
isBEKaml | rakudo: my $temp = ("Soemtiing" ~~ Nil); $temp.WHAT.perl.say; | ||
p6eval | rakudo eb84e9: OUTPUT«Int» | ||
moritz_ | in which case an empty list seem seems more appropriate | 14:50 | |
and cases where only one match is attempted | |||
where a False match object would make more sense | |||
isBEKaml | rakudo: ("Something" ~~ Nil).WHAT.perl.say; | ||
p6eval | rakudo eb84e9: OUTPUT«Int» | ||
moritz_ | should be Bool | 14:51 | |
and easy to fix | 14:52 | ||
masak | and reported already. | ||
Bool is a bit of a problem child. it's very central to everything, but it needs the (slightly less central) enum machinery to be a real enum type. | 14:53 | ||
isBEKaml | we don't have real enum types yet? | 14:56 | |
masak | they're not up to spec, no. | 14:57 | |
rakudo: enum A <a b c>; A.enums.WHAT | 14:58 | ||
p6eval | rakudo eb84e9: OUTPUT«Method 'enums' not found for invocant of class 'EnumMap'current instr.: '_block18' pc 29 (EVAL_2:0)» | ||
14:58
TiMBuS left
|
|||
masak | rakudo: enum A <a b c>; say A.WHAT | 14:59 | |
p6eval | rakudo eb84e9: OUTPUT«EnumMap()» | ||
masak | I'm pretty sure that's wrong. | ||
but jnthn++ for making it work a little, so that mathw can get on with his Form.pm work. \o/ | |||
just waiting for him to bounce back from his performace two days ago. :) | 15:00 | ||
masak submits a rakudobug | |||
isBEKaml | what's Form for? | ||
isBEKaml "acks" pods. | |||
masak | it's for formatting text. | ||
there is an exigesis about it somewhere. | 15:01 | ||
isBEKaml | .>>>> .<<<<< stuff from p5.. | ||
I see.. They never looked nice in p5.. | |||
masak | dev.perl.org/perl6/doc/design/exe/E07.html | ||
15:01
skangas joined
|
|||
isBEKaml | though the output was pretty formatted, the code read just horribly.. | 15:01 | |
masak | they're out of core in Perl 6. there's a Perl 5 implementation on CPAN. mathw++ is doing a Perl 6 implementation. | 15:02 | |
15:02
iblechbot joined
15:04
pmurias left
15:05
M_o_C left
|
|||
patrickas love the spec for from's behavious in void context... I hope the code will be faithfull to the text and spirit of the spec :-) | 15:06 | ||
behaviour | |||
masak | :) | ||
it's a good question whether't will. | 15:07 | ||
since functions tend not to detect their called context in Perl 6. | |||
patrickas | Oh well... c'est la vie :-( | 15:09 | |
15:10
orafu left
|
|||
pugssvn | r30766 | masak++ | [S29] removed 'wantarray' fossil | 15:12 | |
r30766 | | |||
r30766 | Perl 6 tends to employ coercion rather than switching on caller's context. | |||
r30766 | See discussion in S08 about this. | |||
15:12
orafu joined
|
|||
masak | rakudo: role A {}; role B does A {}; say B ~~ A | 15:14 | |
p6eval | rakudo eb84e9: OUTPUT«1» | ||
masak | huh. locally, I got 0 :) | ||
patrickas | same here ... but my rakudo is a few days old ... | 15:16 | |
isBEKaml | huh? I built it about 3 hrs ago... I got 0. | 15:17 | |
patrickas | make p6eval is runing rakudo* already ? | 15:18 | |
15:18
synth joined,
synth left
|
|||
masak | oh well. | 15:18 | |
patrickas | s/make/maybe/ | ||
isBEKaml | I think there must be some recent commits, more recent than 3 hrs. p6eval must have built the most recent one based on the cron job by moritz_++ | ||
yes, I don't have jnthn++'s commits yet in my local build.. | 15:21 | ||
masak | hey peeps. there's now a 'buf' branch, containing the first commit of my GSoC work: github.com/rakudo/rakudo/tree/buf | 15:22 | |
mberends | \o/ yay! | ||
masak | in other words, I'm programming 'in the buf... branch' :P | 15:23 | |
SCNR | |||
15:24
kcwu joined
15:25
JimmyZ left
|
|||
mberends | masak: writing barewords ? | 15:25 | |
masak | :D | ||
this pun is barely working... | |||
15:29
whiteknight left
15:33
Ross left
15:34
Ross joined
15:35
agentzh left
15:42
mberends left
15:49
masonkramer_ left
15:52
dual joined
15:56
Trashlord joined
15:59
BrowserUk left
16:00
nimiezko joined,
nimiezko left,
nimiezko joined
16:01
nimiezko left,
nimiezko joined,
BrowserUk joined
16:04
nimiezko left
16:05
masonkramer joined
|
|||
isBEKaml | rakudo: enum foo<a b c d>; foo.pairs.perl.say; | 16:13 | |
p6eval | rakudo eb84e9: OUTPUT«("a" => 0, "b" => 1, "c" => 2, "d" => 3)» | ||
isBEKaml | hmmm, foo.enums should basically be a wrapper around foo.pairs, right? | ||
16:14
XaeroOne left
|
|||
masak | no. | 16:14 | |
the .enums method on foo should return what is now (incorrectly) foo itself. | |||
isBEKaml | a, b, c, d? | ||
masak | right now, foo ~~ EnumMap, which shouldn't be so. foo.enums ~~ EnumMap, however, should be. | ||
isBEKaml: I don't understand the question. :) | 16:15 | ||
tedv | rakodu: pack('h4', '1234').say | ||
rakudo: pack('h4', '1234').say | |||
16:15
frex left
|
|||
p6eval | rakudo eb84e9: OUTPUT«Could not find sub &packcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | 16:15 | |
tedv | This feature NYI? | ||
isBEKaml | masak: (foo.enums.perl) ~~ (a,b,c,d) ? | 16:16 | |
:) | |||
masak | isBEKaml: well, first off, the value returned from .perl is always a Str, not a List or a Parcel. | 16:17 | |
rakudo: say (enum <a b c d>).perl | |||
p6eval | rakudo eb84e9: OUTPUT«{"c" => 2, "d" => 3, "a" => 0, "b" => 1}» | ||
masak | secondly, I think it should be that. | ||
isBEKaml | masak: I surrounded the foo.enums.perl with ( ) ~~ Of course, I know that .perl is always Str returned.. | 16:18 | |
masak | isBEKaml: you phrased the question as if you expected a list of 4 back :) | ||
just answering the question you actually asked, rather than what I think you asked, which won't do either of us any good. :) | 16:19 | ||
in short, the .perl output from an EnumMap should look very much like a Hash, since Hash inherits from EnumMap. | 16:20 | ||
isBEKaml | yeah, I understand. Terminology needs some polishing... :) | ||
16:22
nadim_ left
|
|||
isBEKaml | masak: I'm just trying to understand the problem domain. See if I can have a go at it. I enjoyed it so much last night when I was scouring the source for fixing that .fmt issue. moritz_++ tempted me enough... ;) | 16:22 | |
pmichaud | good morning, #perl6 | ||
masak | pmichaud! \o/ | ||
isBEKaml | hello, pmichaud | 16:23 | |
masak | isBEKaml: I like that. have you read the 'Enumerations' section in S12 lately? maybe start there... | ||
isBEKaml | masak: I was looking at that. I misunderstood when it said... ".. but it wraps an EnumMap". I was thinking of how enums behave in Java. So... | 16:25 | |
16:28
jferrero joined
16:32
XaeroOne joined
|
|||
masak | enums in Perl 6 are fairly different from those in Java. | 16:33 | |
the Perl 6 ones are based on EnumMaps, a Hash-like class, whereas those in Java are derived from the concept of a class. | 16:34 | ||
16:36
Lorn left
|
|||
masak | std: my sub foo(::T $a --> T) {} | 16:36 | |
p6eval | std 30766: OUTPUT«ok 00:02 116m» | ||
masak | std: my ::T sub foo(T $a) {} | ||
p6eval | std 30766: OUTPUT«ok 00:01 113m» | ||
isBEKaml | You're right on that enums in Java are derived from classes. And, not popular, as they were only a late addition (Java 5, IRRC)... | 16:38 | |
s/IRRC/IIRC/ | |||
btw, what are those pirs in glue/ for? Line 50, glue/enum.pir. gee... | 16:39 | ||
Actions.pm calls on this from PAST::Op call... | |||
did I miss anything? | 16:41 | ||
16:42
eternaleye left
|
|||
masak | so src/glue/enum.pir contains two subs. I created !create_anon_enum, that's the one which turns 'enum <a b c>' into an EnumMap with those values. | 16:45 | |
jnthn++ created setup_named_enum, I guess. | |||
it has this comment: | |||
# For now, just install EnumMap under the main name. | |||
that's what rt.perl.org/rt3/Ticket/Display.html?id=75296 points out is wrong. | 16:46 | ||
apart from that, setup_named_enum seems to make sure that if the enum A has an 'a' key, then the subs 'a' and 'A::a' exist and return the right thing. | 16:47 | ||
16:47
nadim joined
|
|||
masak | hm, or not subs. symbol table entries. | 16:48 | |
16:48
isBEKaml left
16:49
patrickas left
16:53
hercynium left
16:58
isBEKaml joined
|
|||
isBEKaml | masak: [backlogging a bit] Is there any problem in changing EnumMap in glue/enum.pir to Enum ? | 17:01 | |
17:02
plobsing joined
|
|||
masak | that's not going towards the spec :) | 17:03 | |
by spec, an Enum is one (immutable) pair in an EnumMap. | |||
17:05
odkl joined,
snikkers joined,
odkl left
|
|||
isBEKaml | oh, the situation here is, it makes it an EnumMap of Hashes.. | 17:11 | |
If I'm understanding the code in enum.pir correctly.. | 17:12 | ||
masak | no, an EnumMap is already quite a bit like a Hash. | 17:13 | |
lue | ohi | 17:17 | |
phenny | lue: 07:54Z <moritz_> tell lue please not to include say() output in spectests. Since the tests work by writing 'ok' and 'not ok' to STDOUT, additional output is harmful | ||
lue | mortiz_: I'll remember that next time. | 17:18 | |
I think I was more concerned with getting the examples as close as possible to actual advent code than good test practices :P | 17:19 | ||
[not that I explicitly knew what those practices were] | 17:20 | ||
17:23
snikkers left,
hudnix joined
|
|||
masak | me neither. but I imagine it's something much like the practices for submitting bugs: provide the smallest possible code that exhibits the phenomenon you're interested in. | 17:23 | |
where 'smallest' occasionally gives way to other concerns, such as simplicity or speed. | 17:24 | ||
lue | Looks like someone removed src/old . Any reasons why it didn't happen sooner ? :) | 17:25 | |
masak | because we don't have more people like moritz_++, who take initiatives and carry things through. | 17:27 | |
if you can find more moritz_es, let us know. | |||
isBEKaml | 'moritz_'es... :) | 17:28 | |
lue | Any reason why it was kept? Was it actually _used_ at any point? | ||
In compiliation and such. | |||
pmichaud | lue: we used it a bit while we were converting from alpha to the new branch | ||
we didn't actually compile it, but many times it was easier to simply copy from another directory than to check out a separate branch of the repo | |||
(and keeping it around didn't hurt much) | 17:29 | ||
lue | Yeah, that seemed to be its only purpose. (something about it being named old gave it away :) ) | ||
isBEKaml | wow, day17 has 2 tests entirely in loops... :O | 17:31 | |
checking every line of snowman, I guess... :) | |||
17:33
Ayk joined
17:34
Ayk left
|
|||
lue is attempting to create a new system for dealing with numbers via demo, _not_ modification of the core. | 17:34 | ||
lue needs to study Numeric and its implementation extensively first, however. | 17:35 | ||
masak | lue: looking forward to seeing results from that. I have a feeling that what Perl 6 already has is a practical compromise between CS and math... but that doesn't mean that other compromises can't be struck. | 17:38 | |
I had the thought yesterday that Complex will probably be much less used than DateTime, so if the latter doesn't belong in CORE (whatever that is), maybe the former doesn't either. | |||
lue | .oO(The core is accessible only thru a small, nearly inaccessible hole on the outside of RD*. Nothing could possibly happen to the core!) :) |
17:39 | |
99% chance this demo won't be finished today :P | 17:40 | ||
17:50
isBEKaml left
|
|||
lue | rakudo: say (3.4).WHAT | 17:53 | |
p6eval | rakudo eb84e9: OUTPUT«Rat()» | ||
lue | rakudo: say (3.4).Bridge | ||
p6eval | rakudo eb84e9: OUTPUT«3.4» | ||
lue | rakudo: my Real $a = 3; say $a.Bridge | ||
p6eval | rakudo eb84e9: OUTPUT«3» | ||
lue | rakudo: my Real $a = 3; say $a.WHAT | 17:57 | |
p6eval | rakudo eb84e9: OUTPUT«Int()» | ||
lue | I don't know why, but the Bridge command seems somewhat redundant [I'm most likely wrong however] | ||
17:59
isBEKaml joined
|
|||
arnsholt | masak: In the context of Perl 6 I understand core as "required for spec compliance" | 18:00 | |
Others may see it differently | 18:01 | ||
masak | lue: this seems to be the first post on Bridge: justrakudoit.wordpress.com/2010/04/...ss-report/ | ||
lue: colomon will be the person to talk to about whether Bridge is redundant or not. | 18:02 | ||
isBEKaml | moritz_: ok, all tests seemed to pass and I have submitted the patch. :) | 18:03 | |
masak | lue: hm, probably these two posts, from where Bridge was called RealX, further clear things up: justrakudoit.wordpress.com/2010/03/...s-on-real/ justrakudoit.wordpress.com/2010/03/...s-on-real/ | 18:04 | |
lue | All I've seen it is return self, so... [ah well, I'll go ask colomon later] | ||
It seems like [after reading] it's meant to be great, but maybe not up to its full potential yet. I'll have to ask colomon later. | 18:08 | ||
afk | |||
arnsholt | The basic idea looks sound and pretty sane to me | 18:11 | |
Leaving the exact implementation of .Bridge undefined sounds like a good idea as well | |||
colomon | arnsholt: thank you. ;) | 18:12 | |
arnsholt | And I agree that FatRat is probably the best candidate for interoperating arbitrary numbers | 18:14 | |
masak | I feel that neither RealX nor Bridge, as names, capture what is going on. I don't have any better suggestion. | ||
of course, colomon++ for laying all this groundwork. | 18:15 | ||
arnsholt | But there should probably be specialised methods for common operations on numbers of different types (like cmp(Int, Rat), and others) | ||
18:17
gbacon joined
|
|||
colomon | arnsholt: agreed, but as long as those are consistent, that's just an optimization. | 18:18 | |
colomon can't talk much, busy cooking noms... | |||
masak | noms. now there's an idea. | 18:19 | |
o/ | |||
18:19
masak left
18:20
envi^home left
|
|||
arnsholt | colomon: Absolutely | 18:20 | |
18:39
isBEKaml left
18:42
XaeroOne left
18:52
justatheory joined
18:53
justatheory left
19:08
whiteknight joined
19:15
iblechbot left
19:18
Ross^ joined
19:20
Ross left
19:26
M_o_C joined
19:35
jferrero left
|
|||
BrowserUk | ? | 19:47 | |
ajs | Anybody around who could verify a git install for me? | 19:59 | |
git://www.ajs.com/rakudo.git | |||
moritz_ | like, cloning it? | ||
ajs | sure | ||
anything | |||
just want to know it works | |||
moritz_ tries | |||
20:01
Ross^ left
|
|||
moritz_ | seems to hang while connecting | 20:01 | |
ajs | OK, so my firewall change probably is borked. Thanks for trying | ||
dalek | kudo: 25cff28 | moritz++ | src/core/Cool-str.pm: also accept non-Regex objects as pattern in Any.match |
20:02 | |
kudo: 0aed40a | moritz++ | src/core/Cool-str.pm: rewrite .subst in terms of .match :overlap probably). Also make Any.match(:x(0)) return Nil |
|||
pugssvn | r30767 | moritz++ | [t/spec] unfudge some substitutioni test for Rakudo | ||
20:05
M_o_C left
|
|||
moritz_ | rakudo: sub f(:$x) { say "*" if $x ~~ Whatever }; f :x(*) | 20:09 | |
p6eval | rakudo eb84e9: OUTPUT«*» | ||
ajs | huh, internal access to my git repository is fine, and I've got the right ports forwarded and open on the server, but can't seem to get external access open to my git repo | 20:11 | |
20:12
whiteknight left
|
|||
moritz_ | maybe the git daemon itself checks IPs too? | 20:13 | |
20:17
eternaleye joined
20:18
eternaleye left
|
|||
moritz_ | rakudo: sub f(:$x is copy) { undefine($x) if $x ~~ Whatever; say $x.defined }; f :x(*) | 20:18 | |
p6eval | rakudo eb84e9: OUTPUT«1» | ||
moritz_ | that's a bug | 20:19 | |
rakudo: sub f($x is copy) { undefine($x) if $x ~~ Whatever; say $x.defined }; f :x(*) | |||
p6eval | rakudo eb84e9: OUTPUT«1» | ||
moritz_ | rakudo: sub f($x is copy) { undefine($x) if $x ~~ Whatever; say $x.defined }; f * | ||
p6eval | rakudo eb84e9: OUTPUT«1» | ||
moritz_ | rakudo: sub f($x is copy) { undefine($x); say $x.defined }; f * | ||
p6eval | rakudo eb84e9: OUTPUT«1» | ||
moritz_ | rakudo: sub f($x is copy) { $x = Any; say $x.defined }; f * | ||
p6eval | rakudo eb84e9: OUTPUT«1» | ||
moritz_ | rakudo: sub f($x is copy) { $x = Any; say $x.defined; say $x.perl }; f * | ||
p6eval | rakudo eb84e9: OUTPUT«1!whatever_dispatch_helper» | ||
moritz_ | rakudo: sub f($x is copy) { $x = Any; say $x.defined; say $x.perl }; f 'a' | 20:20 | |
p6eval | rakudo eb84e9: OUTPUT«0Any» | ||
moritz_ | rakudo: my $x = *; $x = Any; say $x.perl | ||
p6eval | rakudo eb84e9: OUTPUT«Any» | ||
moritz_ | rakudo: sub f($x is copy) { $x = 'abc'; say $x.defined; say $x.perl }; f * | ||
p6eval | rakudo eb84e9: OUTPUT«1!whatever_dispatch_helper» | ||
moritz_ | rakudo: sub f($x is copy) { $x = 'abc'; say $x.WHAT; say $x.perl }; f * | 20:21 | |
p6eval | rakudo eb84e9: OUTPUT«Whatever()!whatever_dispatch_helper» | ||
20:25
Ross joined
20:26
Ross left
20:41
synth joined
|
|||
colomon | moritz_++ # match and subst | 20:47 | |
20:48
ruoso left
|
|||
moritz_ despairs while trying to implement :x(*) | 20:49 | ||
due to the bug that I've demonstrated above with p6eval I can't just say $x = Any if $x ~~ Whatever | |||
20:49
Su-Shee left
|
|||
pugssvn | r30768 | moritz++ | [t/spec] correct some test for :x/:nth interaction, and refudge for rakudo | 20:53 | |
lisppaste3 | moritz_ pasted "S05 patch: clarify interaction of :x and :nth" at paste.lisp.org/display/100327 | 20:57 | |
moritz_ | colomon: could you look at that patch and tell me if it's clear (unambiguous) and sane? | ||
20:58
Su-Shee joined
|
|||
moritz_ | it's how I've implemented :x, and the only sane interpretation of :x/:nth interaction that I could come up with | 20:58 | |
21:13
hercynium joined
21:22
iblechbot joined,
gbacon left
|
|||
jnthn returns | 21:26 | ||
colomon | moritz_: back and checking | 21:29 | |
21:30
kel__ left
|
|||
colomon | hmmmm | 21:30 | |
21:33
plobsing left
|
|||
lue | zhoom.......Hello! | 21:39 | |
21:43
PacoLinux left
|
|||
lue | From what I understand, bridge is supposed to make two completely different numbers play nice (?) | 21:46 | |
[i.e. a `compatibility mode', if you will] | |||
rakudo: say ((3+5i) cmp (6.1)) | 21:47 | ||
p6eval | rakudo 0aed40: OUTPUT«maximum recursion depth exceededcurrent instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:97)» | ||
lue | ō.o | ||
lue goes to find the cause of the recursion is the cause of the recusion is the cause.... | 21:50 | ||
21:50
Su-Shee left
|
|||
mathw | Hello | 21:55 | |
jnthn | o/ mathw | ||
mathw | Hi jnthn | 21:57 | |
jnthn | mathw: More relaxed day today after the gig excitement of yesterday? :-) | 21:58 | |
mathw | well the gig was actually on Friday night | ||
jnthn | Oh :-) | ||
mathw | but yesterday was more a sort of haze of post-gig tiredness | ||
jnthn | ;-) | ||
21:58
exodist left
|
|||
mathw | accompanied by some... interesting messages from Rakudo | 21:59 | |
21:59
exodist_ joined
|
|||
jnthn | "lol your code won't compile" | 21:59 | |
mathw | but then I decided not to push it and did some knitting instead | ||
jnthn | :-) | ||
jnthn accidentally the whole evening in the pub. | 22:00 | ||
lue | Running the cmp I tried above in a terminal wiped out my entire scrollback O.o | ||
[with stacktrace] | |||
mathw | today I had a couple of friends over and had a bbq | ||
lue | rakudo: say (3 cmp 4) | ||
jnthn | Nice | ||
p6eval | rakudo 0aed40: OUTPUT«-1» | ||
mathw | My situation with Form.pm at the moment is that the library itself compiles, but the tests don't work | 22:01 | |
lue | colomon: could your Bridge possibly alleviate the recursion error seen in the faulty cmp? | ||
mathw | Rakudo is not happy about me using, say, Form::TextFormatting (which doesn't export anything), and then calling Form::TextFormatting::fit-in-width or something | ||
lue | rakudo: say ((3+5i).Bridge cmp (6.1).Bridge) | ||
p6eval | rakudo 0aed40: OUTPUT«Method 'Bridge' not found for invocant of class 'Complex'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
jnthn | mathw: Hmm. | 22:02 | |
colomon | lue: Bridge is for Real numbers. | ||
jnthn | rakudo: class Form::TextFormatting { sub fit-in-width() { say "ok" } }; Form::TextFormatting::fit-in-width(); | ||
p6eval | rakudo 0aed40: OUTPUT«Can not find sub Form::TextFormatting::fit-in-widthcurrent instr.: 'perl6;Perl6Exception;throw' pc 15629 (src/builtins/Associative.pir:32)» | ||
jnthn | mathw: Like that? | 22:03 | |
colomon | lue: I've actually got code I think should fix your problem, but it didn't work because of a Rakudo bug this morning. | ||
mathw | jnthn: no | ||
jnthn | rakudo: class Form::TextFormatting { our sub fit-in-width() { say "ok" } }; Form::TextFormatting::fit-in-width(); | ||
mathw | hold on | ||
p6eval | rakudo 0aed40: OUTPUT«ok» | ||
lue | Ah. Not that they would match anyway. Still, recursion is an extreme error for that. | ||
colomon | I think jnthn++'s fixed it, but I haven't had time today to re-install it and try again. | ||
jnthn | mathw: Note that subs are lexically scoped by default now. | ||
mathw: So you maybe need to sprinkle some "our"s. | |||
lue | rakudo: my $a = 1+2i ; my $b = 3.4; say $a == $b; say $a ~~ $b; | 22:04 | |
p6eval | rakudo 0aed40: OUTPUT«You can only coerce a Complex to Num if the imaginary part is zerocurrent instr.: 'perl6;Perl6Exception;throw' pc 15629 (src/builtins/Associative.pir:32)» | ||
lue | Well then it wouldn't be Complex anymore! :) | ||
[mathematically, of course] | |||
mathw | jnthn: ahah | ||
jnthn: if I 'our' a sub without an export, I can then call it explicitly from another package? | 22:05 | ||
22:05
iblechbot left
|
|||
mathw | interesting | 22:05 | |
22:05
eternaleye joined
|
|||
mathw | the test is now behaving differently to last night | 22:05 | |
and I've not updated anything | |||
bum | |||
jnthn | mathw: Yes, "our" installs it in the package also. | ||
mathw | okay | 22:06 | |
lue | Right now, I'm seeing if its possible to remove some ugly inline PIR code in some of the number classes and roles. [i.e. Radian conversion] | ||
mathw | so I've got a .pm which is module Form::Grammar and defines grammar Format | ||
when I import it, Format seems to land in my namespace | |||
should it do that? | |||
22:06
jaldhar left
22:07
jaldhar joined
|
|||
jnthn | "in my namespace"? | 22:08 | |
mathw: There may well be some issues with nested packages. | |||
mathw | in that I can call it 'Format' and Rakudo can find it | ||
if I call it Form::Grammar::Format, it doesn't like it | 22:09 | ||
This is a fairly general trend, actually | |||
So yes, there may well be some issues with nested packages :) | |||
on the bright side, I no longer have to fully qualify the names of classes defined in the same module | |||
22:09
ajs left
|
|||
jnthn | :-) | 22:09 | |
22:10
BrowserUk left,
ajs joined
|
|||
jnthn | OK, if you can file some small examples of the issues as tickets, that would be a huge help in fixing it. | 22:10 | |
mathw | I'll probably have to do that tomorrow | ||
but I will do it :) | |||
it's like a bit of namespace leakage | |||
have to see if I can get it down to a nice example | 22:11 | ||
lue | Do the to-radians and from-radians function convert between radians and (gradians|degrees) ? | ||
colomon | lue: yes | 22:12 | |
lue | both? | 22:13 | |
jnthn | mathw++ | ||
lue | (gradians°rees) ? | ||
colomon | you can ask either of those to use radians, gradians, degrees, and "revolutions" | 22:14 | |
lue | Well, I completely skipped over the $base parameter :) | 22:15 | |
22:15
exodist_ left
|
|||
lue | rakudo: say to-radians(39,"radians") | 22:16 | |
p6eval | rakudo 0aed40: OUTPUT«Could not find sub &to-radianscurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
22:16
BrowserUk joined
|
|||
lue | rakudo: say Numeric.to-radians(39,"radians") | 22:16 | |
p6eval | rakudo 0aed40: OUTPUT«Too many positional parameters passed; got 3 but expected 2current instr.: 'to-radians' pc 459205 (src/gen/core.pir:58520)» | ||
colomon | rakudo: say 39.to-radians(Radians) | 22:17 | |
p6eval | rakudo 0aed40: OUTPUT«39» | ||
colomon | rakudo: say 39.to-radians(Degrees) | ||
p6eval | rakudo 0aed40: OUTPUT«0.680678408277788» | ||
lue | I'm assuming we'd prefer the abolishment of PIR in Perl code? :) | ||
colomon | lue: that's a goal. | 22:18 | |
lue | I don't see how using PIR to call a simple array does radian conversion. | 22:21 | |
Esp. seeing how Numeric.pm says it's expanded upon in Int and Num, but I can't find it... | |||
22:24
jferrero joined
|
|||
colomon | lue: the array doesn't do the conversion, the multiply does the conversion. The array tells you what the conversion factor should be. | 22:24 | |
22:24
christine left
|
|||
lue | Ah. | 22:25 | |
22:26
christine joined
|
|||
colomon | the PIR is in there because that bit of Rakudo doesn't quite work yet, and doing that optimization helps Rakudo performance a good bit. | 22:27 | |
22:27
exodist joined
|
|||
colomon | (though maybe it isn't needed now? hmmm....) | 22:28 | |
lue | Custom indices? | ||
That seems to be what it's doing | |||
colomon | lue: not needed, the TrigBase enum has values 0 to 3. | ||
lue | rakudo: my @a=1,2,3,4; say @a{Radians} | 22:30 | |
p6eval | rakudo 0aed40: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Array'current instr.: '!postcircumfix:<{ }>' pc 14730 (src/builtins/Code.pir:36)» | ||
lue | rakudo: my @a{TrigBase} = 1,2,3,4; say @a{Radians} | ||
p6eval | rakudo 0aed40: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Array'current instr.: '!postcircumfix:<{ }>' pc 14730 (src/builtins/Code.pir:36)» | ||
lue | rakudo: my @a{TrigBase} = 1,2,3,4; say @a<Radians> | 22:31 | |
p6eval | rakudo 0aed40: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Array'current instr.: '!postcircumfix:<{ }>' pc 14730 (src/builtins/Code.pir:36)» | ||
lue | rakudo: my @a<TrigBase> = 1,2,3,4; say @a<Radians> | ||
p6eval | rakudo 0aed40: OUTPUT«Confused at line 11, near "my @a<Trig"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» | ||
lue | guess it's NYI :( | ||
colomon | lue: I don't think TrigBase itself actually works yet. | ||
but | 22:32 | ||
lue | from- and to-radians apparently work with it.... | ||
colomon | rakudo: my @a = 5..10; say @a[Radians] | ||
p6eval | rakudo 0aed40: OUTPUT«5» | ||
colomon | rakudo: my @a = 5..10; say @a[Degrees] | ||
p6eval | rakudo 0aed40: OUTPUT«6» | ||
colomon | rakudo: my @a = 5..10; say @a[Gradians] | ||
p6eval | rakudo 0aed40: OUTPUT«7» | ||
colomon | rakudo: my @a = 5..10; say @a[Revolutions] | ||
p6eval | rakudo 0aed40: OUTPUT«Could not find sub &Revolutionscurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
colomon | blast, what is that one called. | 22:33 | |
lue | rakudo: my @a = 5..10; say @a[Revs] | ||
p6eval | rakudo 0aed40: OUTPUT«Could not find sub &Revscurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
colomon | rakudo: my @a = 5..10; say @a[Circles] | ||
p6eval | rakudo 0aed40: OUTPUT«8» | ||
lue | Just found that. How weird. | 22:34 | |
[although technically true] | |||
jnthn -> early sleeps, Stuff To Do tomorrow | |||
lue | so I guess the PIR code is redundant then. | ||
night, jnthn o/ | |||
22:41
exodist left
|
|||
lue | but now something about the conversion array being not defined! | 22:42 | |
22:42
exodist joined
|
|||
lue | rakudo: my @a-dash = 1,2,3; say @a-dash[Radians] | 22:43 | |
p6eval | rakudo 0aed40: OUTPUT«1» | ||
lue | so it's not the dash... | ||
Here's the specific error. The array is defined in INIT and created with our : | 22:46 | ||
Symbol '@trig-base-conversions' not predeclared in to-radians | |||
colomon | then the bug still exists in Rakudo. | ||
just pushed the code to make Complex / Real comparisons "work". | 22:47 | ||
lue | darn :) | ||
lue goes to find the bug in RT | |||
dalek | kudo: 9a7fc8a | (Solomon Foster)++ | src/core/ (3 files): Add Numeric.reals method, and comparison operators based upon it. |
22:49 | |
22:52
ruoso joined
22:54
plobsing joined
|
|||
lue | It doesn't seem to have been reported [unless I'm searching wrong] | 22:58 | |
22:59
Psyche^ joined
|
|||
dalek | p-rx: 04de3a0 | bacek++ | (2 files): Fix subst for non-matching patterns |
22:59 | |
p-rx: c62409b | bacek++ | src/stage0/ (3 files): Rebootstrap files to generate new settings |
|||
23:01
Patterner left,
Psyche^ is now known as Patterner,
whiteknight joined
|
|||
lue | rakudo: role xyzzy { INIT { our @x = 1,2,3;}; fool($a) { say @x[$a];};}; xyzzy.fool(1); | 23:03 | |
p6eval | rakudo 0aed40: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1812 (ext/nqp-rx/src/stage0/Regex-s0.pir:1008)» | ||
lue | rakudo: role xyzzy { INIT { our @x = 1,2,3;}; fool($a) { say @x[$a]; }; }; xyzzy.fool(1); | ||
p6eval | rakudo 0aed40: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1812 (ext/nqp-rx/src/stage0/Regex-s0.pir:1008)» | ||
23:07
jferrero left
|
|||
colomon | moritz_: On consideration, I'm not convinced it makes sense for :x and :nth to work at the same time.... | 23:08 | |
23:09
hercynium left
|
|||
colomon | moritz_: makes sense if :nth is a single number, but in other cases it gets really weird really fast. | 23:09 | |
23:10
lestrrat is now known as lest_away
23:16
masonkramer_ joined
23:23
snarkyboojum joined
|
|||
lue | could the bug be because we declare it as 'our' array? I'm just trying to find the cause right now :) | 23:24 | |
lue must remember Day 16's one-liner. Dankon colomon! | 23:29 | ||
s/colomon/masak/ | |||
Whoever wrote Day 16 :) | |||
snarkyboojum | masak-san I think | 23:31 | |
snarkyboojum eventually catches up with what lue is saying :) | 23:32 | ||
23:33
masonkramer_ left
|
|||
lue goes and fixes some other PIR dependant things, leaving radian conversion for now | 23:37 | ||
23:43
whiteknight left
23:55
masonkramer_ joined
|
|||
lue | rakudo: say 4**(ln(e)/2) | 23:56 | |
p6eval | rakudo 0aed40: OUTPUT«Could not find sub &lncurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
23:57
exodist_ joined,
exodist left
|
|||
lue | rakudo: say e**(log(4)/2) | 23:58 | |
p6eval | rakudo 0aed40: OUTPUT«2» | ||
lue | rakudo: say e**(log(16)/2) | ||
p6eval | rakudo 0aed40: OUTPUT«4» | ||
lue | .oO(Thanks to my volunteer work at Perl 6, I finally learned how to calculate square roots by hand!) |
||
eternaleye | rakudo: role xyzzy { INIT { our @x = 1,2,3;}; sub fool($a) { say @x[$a]; }; }; xyzzy.fool(1); | ||
p6eval | rakudo 0aed40: OUTPUT«Symbol '@x' not predeclared in foolcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
eternaleye | lue: You had been missing 'sub' before fool($a) | 23:59 | |
or 'method' | |||
rakudo: role xyzzy { INIT { our @x = 1,2,3;}; method fool($a) { say @x[$a]; }; }; xyzzy.fool(1); | |||
p6eval | rakudo 0aed40: OUTPUT«Symbol '@x' not predeclared in foolcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
BrowserUk | ? |