Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-23

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 hypercube31 joined #perl6
00:31 nsh joined #perl6
00:53 whiteknight joined #perl6
01:15 am0c joined #perl6
01:23 lue Anyone can point me to where the spec talks about use ? I can't find it
01:28 lue nvm
01:52 Exodist joined #perl6
01:56 Exodist joined #perl6
01:56 Exodist_ joined #perl6
01:58 bacek joined #perl6
02:13 Exodist joined #perl6
02:19 lue colomon: ping
02:19 colomon o/
02:19 lue I'm just wondering about Numeric
02:20 lue I want to write some math-based modules, and S32::Numeric looks pretty.... sparse.
02:21 lue [not in terms of length]
02:21 colomon it is sparsish.
02:21 colomon what are you trying to do?
02:22 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 lue I could build a demo of what I want it to.
02:23 lue Basically, define numbers similar to their classification in math; numbers of type Integer, Rational, Complex, and so on.
02:25 lue rakudo: say pi.WHAT
02:25 p6eval rakudo 5cb546: OUTPUT«Num()␤»
02:26 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:28 arnsholt Having irrationals as a standard type wouldn't make a lot of sense I think
02:29 arnsholt The only encoding scheme possible AFAICT is floating point, in which case it should probably be named accordingly
02:30 lue rakudo: say (3.5234).WHAT
02:30 p6eval rakudo 5cb546: OUTPUT«Rat()␤»
02:30 lue rakudo: my $a = pi; say $a; say $a.WHAT
02:30 p6eval rakudo 5cb546: OUTPUT«3.14159265358979␤Num()␤»
02:32 lue rakudo: say e
02:32 p6eval rakudo 5cb546: OUTPUT«2.71828182845905␤»
02:32 lue rakudo: say e.WHAT
02:32 p6eval rakudo 5cb546: OUTPUT«Num()␤»
02:34 lue I just don't think the current state of S32::Numeric is really nice for complex math.
02:35 lue How the heck am I supposed to define Aleph, for (a fringe) instance?
02:38 lue rakudo: my $a = {1,3,4}; say $a; # fun with sets — The Math Way
02:38 p6eval rakudo 5cb546: OUTPUT«_block48␤»
02:38 lue rakudo: my $a = (1,3,4); say $a; # fun with sets — The Perl Way
02:38 p6eval rakudo 5cb546: OUTPUT«1 3 4␤»
02:39 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.
02:40 lue This, IMO, is the sort of thing to discuss in #rs, but I never make them (and never will until after June 17)
02:41 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? :)]
02:42 lue 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.
02:43 lue Then I should 1) create a demo to demonstrate my idea 2) compose a message for p6l
02:44 colomon sounds like a plan.
02:47 lue Just out of curiosity, how many times has my head been used as a gavel in #rs ?
02:48 colomon not once
02:48 colomon when I've been watching, anyway.
02:49 lue It was in my first (and only) #rs meeting.
02:53 lue rakudo: use v6.1.0
02:53 p6eval rakudo 5cb546:  ( no output )
02:53 lue I wonder, should Perl 6 guard against scripts written in the future?
02:53 lue rakudo: use v7
02:53 p6eval rakudo 5cb546:  ( no output )
03:00 lue afk
03:01 diakopter pugs: use v7; say ::v7
03:01 p6eval pugs: OUTPUT«v7␤»
03:19 ajs just to see if anyone who's around now has an idea...
03:19 ajs rakudo: sub a { return [ <1 2 3>, <4 5 6> ] }; for a() -> $x { say "List: $x" }
03:19 p6eval rakudo 5cb546: OUTPUT«List: 1 2 3 4 5 6␤»
03:19 ajs did I miss something there? Shouldn't that be List: [1, 2, 3] and List: [4, 5, 6]?
03:20 ajs 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␤»
03:20 ajs urk?
03:21 TimToady no, the inside of [] is flattening
03:22 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
03:23 TimToady 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>␤»
03:23 TimToady rakudo: sub a { return [ [<1 2 3>], [<4 5 6>] ] }; for @(a()) -> $x { say "List: $x" }
03:23 p6eval rakudo 5cb546: OUTPUT«List: 1 2 3␤List: 4 5 6␤»
03:23 TimToady there's one way
03:23 ajs ah
03:23 ajs I can work with that
03:23 TimToady rakudo can only do it with explicit arrays currently
03:24 TimToady it doesn't really do slices yet
03:25 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; say a().WHAT
03:25 p6eval rakudo 5cb546: OUTPUT«Parcel()␤»
03:25 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[0].WHAT
03:25 p6eval rakudo 5cb546: OUTPUT«Parcel()␤»
03:25 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[1].WHAT
03:25 p6eval rakudo 5cb546: OUTPUT«Parcel()␤»
03:25 ajs It's very parcelish
03:25 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; say @(a()).elems
03:25 p6eval rakudo 5cb546: OUTPUT«6␤»
03:26 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; say a()[1]
03:26 p6eval rakudo 5cb546: OUTPUT«456␤»
03:26 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; for |a() { .say }
03:26 p6eval rakudo 5cb546: OUTPUT«Capture()<0x3da3f00>␤»
03:27 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; for a() { .say }
03:27 p6eval rakudo 5cb546: OUTPUT«1␤2␤3␤4␤5␤6␤»
03:27 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; for a().slice { .say }
03:27 p6eval rakudo 5cb546: OUTPUT«Method 'slice' not found for invocant of class 'Parcel'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:27 TimToady rakudo: sub a { return <1 2 3>, <4 5 6> }; for a().values { .say }
03:27 p6eval rakudo 5cb546: OUTPUT«1␤2␤3␤4␤5␤6␤»
03:27 TimToady ah well, not quite there yet
03:28 TimToady at least it can create a parcel of parcels
03:29 patspam joined #perl6
03:29 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:49 masonkramer_ joined #perl6
04:35 eternaleye joined #perl6
05:00 eternaleye joined #perl6
05:00 xinming joined #perl6
05:06 lue hello!Q
05:07 lue sans Q
05:25 envi^home joined #perl6
05:29 jakk joined #perl6
05:29 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 ajs For returning lists of paths, I had to break down and use gather/take, but hey, it works.
05:30 ajs Off to Zzzzzz
05:31 snarkyboojum joined #perl6
05:37 pugssvn r30759 | lwall++ | [advent2009-day19.t] fix parsefail
05:38 TiMBuS joined #perl6
05:46 lue goodnight
05:49 frooh joined #perl6
05:55 am0c joined #perl6
06:43 Exodist joined #perl6
06:47 snarkyboojum TimToady++ # fixing my mistakes :)
06:48 isBEKaml joined #perl6
06:48 isBEKaml hey, folks!
06:53 snarkyboojum isBEKaml o/
06:56 isBEKaml snarkyboojum: how's things? I haven't still gotten around to writing up those tests for day 13. :D
06:57 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:59 isBEKaml snarkyboojum: -Ofun++ :)
06:59 snarkyboojum isBEKaml: aye :)
07:09 BrowserUk joined #perl6
07:18 dual joined #perl6
07:20 eternaleye joined #perl6
07:24 BrowserUk ?
07:34 isBEKaml \o/
07:34 isBEKaml rakudo: my %hash = {a => 1, b=> 2}; say %hash.keys.fmt("'%s'", ', ');
07:34 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)␤»
07:35 isBEKaml > my %hash={a=>1, b=>2}; say %hash.keys.fmt("'%s'", ', ');
07:35 isBEKaml 'b', 'a'
07:36 isBEKaml well, I just need to sort it.. :)
07:39 moritz_ good morning
07:40 isBEKaml guten morgen, moritz_
07:43 isBEKaml moritz_: I was able to make fmt work well with %hash.keys...
07:43 moritz_ o//
07:44 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
07:45 moritz_ please submit the path to rakudobug@perl.org
07:45 isBEKaml I don't know any that used fmt with Iterators or MapIterators. Will check anyway..
07:46 moritz_ write a new one :-)
07:46 moritz_ oh wait
07:46 moritz_ isn't there an advent calender test for that?
07:47 isBEKaml oh, yeah. totally forgot about that.. :D
07:47 Trashlord joined #perl6
07:48 moritz_ but I'm not sure the tests are correct
07:48 isBEKaml advent days 2 and 8.
07:48 isBEKaml I'm not sure about 2, look kind of odd with hashes..
07:49 moritz_ I'm looking at day09
07:50 moritz_ sub detector(:$foo!, *%bar) { %bar.keys.fmt("'%s'", ', ');
07:50 moritz_ }
07:50 moritz_ is (detector(:foo(1), :bar(2), :camel(3))), ('bar', 'camel'), 'Capturing arbitrary named parameters';
07:50 moritz_ this is so wrong
07:50 moritz_ .fmt returns a string, not a list
07:50 moritz_ and the test should be a junction
07:50 moritz_ because the order is not defined
07:51 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:52 iblechbot joined #perl6
07:54 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.
07:57 pugssvn r30760 | moritz++ | [t/spec] fix up advent2009-day09.t
07:57 pugssvn r30760 |
07:57 pugssvn r30760 | * remove reliance on hash ordering
07:57 pugssvn r30760 | * Add a plan
07:57 pugssvn r30760 | * remove say() calls that interact badly with TAP output
08:00 pugssvn 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:06 Su-Shee joined #perl6
08:08 moritz_ bkeeler: is the commit e5f7e19e2d8bbf8ee1d26cecbbe99a61a41bab9d in your regex-interpolation branch still up-to-date?
08:08 moritz_ (modulo bumping PARROT_REVISION)
08:09 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 isBEKaml not ok 10 - Capturing arbitrary named parameters #      got: "'bar', 'camel'"          ## without any changes
08:10 isBEKaml 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
08:11 isBEKaml moritz_: I merely removed the double quotes, ok seemed to match precisely against them...
08:12 moritz_ isBEKaml: let's try to keep the tests as close as possible to the advent calendar entry
08:18 pugssvn r30762 | moritz++ | [t/spec] add missing quotes, isBEKaml++
08:18 bkeeler moritz_: I believe so
08:18 isBEKaml heh, the RHS is wrong
08:19 moritz_ bkeeler: i'm compiling now, will see in a moment if it still works
08:19 moritz_ bkeeler: at least there was no merge conflict
08:19 bkeeler Cool!
08:19 moritz_ git++
08:19 moritz_ ./perl6 -e 'my $x = "a"; say "foobar" ~~ /b $x a/'
08:19 moritz_ # empty line
08:20 moritz_ :(
08:22 bkeeler I would not expect that to match
08:22 bkeeler maybe /b $x r/
08:22 moritz_ erm
08:23 moritz_ right
08:23 moritz_ works
08:23 moritz_ \o/
08:23 bkeeler hehe
08:23 moritz_ running spectest now
08:23 moritz_ shall I push it if there's no fallout?
08:23 moritz_ (please say "yes" here :-)
08:24 bkeeler Sure
08:24 bkeeler S05-interpolation/regex-in-variable.t is the interesting test
08:24 moritz_ passes
08:25 isBEKaml moritz_: I just ran the advent test09 after your changes and it worked fine..
08:25 isBEKaml moritz_: running make spectest now ## JIC
08:25 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 :-)
08:26 bkeeler moritz_: Sounds great, thanks
08:27 moritz_ now at S29.. looks good so far
08:44 moritz_ hugme: tweet rakudoperl Rakudo now supports variable interpolation into regexes
08:44 * hugme hugs moritz_; tweet delivered
08:44 bkeeler Wow, I didn't know it tweeted too
08:44 isBEKaml variable interpolation! \o/
08:44 isBEKaml bkeeler++ :)
08:45 bkeeler Been a long time coming
08:45 moritz_ aye
08:45 moritz_ bkeeler++
08:45 [mark] joined #perl6
08:47 isBEKaml spec test is slow in coming through.... Still stuck in S02.. :(
08:48 Trashlord joined #perl6
08:48 dalek rakudo: b9f260d | (Bruce Keeler)++ |  (8 files):
08:48 dalek rakudo: Regex Interpolation
08:48 dalek rakudo: Also bumps PARROT_REVISION to get nqp-rx support for interpolation, and adds a
08:48 dalek rakudo: test file.
08:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b9f260d67840c2013c4abbc90491bea52533142b
08:48 dalek rakudo: 6ec9b6a | moritz++ | t/spectest.data:
08:48 dalek rakudo: run advent day 09 integration test
08:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6ec9b6a0ac3077d680f3752a73477a05d2a99a45
08:48 dalek rakudo: e36cbae | moritz++ |  (2 files):
08:48 dalek rakudo: update ChangeLog, CREDITS
08:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e36cbae3c253154440d9544d3d8c7c9512866e81
08:50 Ross joined #perl6
08:53 moritz_ rakudo: use Test;  is_approx 2.2**2.2, 5.66669577875008
08:53 p6eval rakudo 5cb546: OUTPUT«ok 1 - ␤»
08:53 moritz_ could somebody on a 32 bit platform please run that test and tell me if passes?
08:55 isBEKaml moritz_: 32 bit linux here. Failed.
08:56 moritz_ isBEKaml: thanks
08:56 moritz_ isBEKaml: if you remove the last 5 or 6 digits of the RHS, does it pass?
08:58 isBEKaml moritz_: 5 digits removed: PAST::Compiler can't compile node of type BigInt and stacktraces
08:58 Trashlord joined #perl6
08:58 isBEKaml perl6 -e 'use Test; is_approx 2.2**2.2, 5.666695778'
08:58 moritz_ :(
09:00 isBEKaml perl6 -e 'use Test; is_approx 2.2**2.2, 5.66669577'  ##PASS!
09:01 moritz_ isBEKaml: then I guess is_approx 2**2.2,   4.59479341  also passes?
09:01 moritz_ rakudo: my $x = 'o'; say 'foo' ~~ / $x+/
09:01 p6eval rakudo 6ec9b6: OUTPUT«oo␤»
09:02 moritz_ \o/
09:02 isBEKaml moritz_: yes, passes.
09:02 meppl joined #perl6
09:03 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 Ross joined #perl6
09:04 exodist joined #perl6
09:06 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␤»
09:06 isBEKaml :(
09:08 moritz_ why wouldn't it be?
09:08 isBEKaml that's what failed on me here..
09:08 isBEKaml wait, lemme try with the latest Rakudo (have to build it first)
09:10 eternaleye joined #perl6
09:11 isBEKaml ah, I figured out (my local changes were crashing it)
09:15 isBEKaml I was playing with EnumMap and since an Hash is EnumMap - oh, well... :)
09:18 pugssvn r30764 | moritz++ | [t/spec] rakudo unfudges
09:33 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:34 moritz_ snarkyboojum: that number includes TODOed and SKIPped tests
09:35 moritz_ snarkyboojum: which is why we have tools/test_summary.pl
09:35 moritz_ which gives us the numbers we are interested in
09:36 snarkyboojum moritz_: ah - sweet - test_summary.pl crashes for me at the end of the run, will have to investigate
09:45 muixirt joined #perl6
09:52 uniejo joined #perl6
10:11 patrickas joined #perl6
10:11 patrickas hello
10:12 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 -
10:12 isBEKaml hello patrickas
10:12 moritz_ 32492 passing tests
10:13 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
10:13 patrickas Oh that's good ... cause I have tons of patches I ca push
10:13 patrickas unless someone else wants to work on it more
10:14 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 moritz_ so go ahead
10:14 patrickas isBEKaml: how are the advent scripts progressing ?
10:15 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 #perl6
10:16 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
10:16 snarkyboojum so that means it's never created
10:16 patrickas isBEKaml: that's cool ... yea I have an oldish machine too ... so i feel your pain
10:17 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..
10:17 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
10:17 moritz_ yes, doesn't like rats with lots of decimals
10:18 moritz_ patrickas: that's why I'm in favour of leaving out spaceys for now - it's platform dependent, hairy and not essential
10:19 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:20 snarkyboojum moritz_: sorry - line 367 :)
10:22 dalek rakudo: 85866d5 | moritz++ | tools/test_summary.pl:
10:22 dalek rakudo: make tools/test_summary.pl warn instead of die if some file handles cannot be
10:22 dalek rakudo: closed, snarkyboojum++
10:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/85866d5b050e81b9e068d75a18c3e199f39f371f
10:26 jhuni joined #perl6
10:29 snarkyboojum thanks moritz_ - will give it a go
10:32 hercynium joined #perl6
10:48 snarkyboojum moritz_: nice - 32471 passing tests here - that fix worked nicely
10:52 moritz_ rakudo: say 2**15
10:52 p6eval rakudo 85866d: OUTPUT«32768␤»
11:00 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)␤»
11:01 moritz_ std: say e ** (i * 2 * pi)
11:01 p6eval std 30764: OUTPUT«ok 00:01 114m␤»
11:01 snarkyboojum oh.. in the REPL
11:01 moritz_ rakudo: e
11:01 p6eval rakudo 85866d:  ( no output )
11:01 moritz_ rakudo: say e 3
11:01 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)␤»
11:02 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
11:02 moritz_ rakudo: say i
11:02 p6eval rakudo 85866d: OUTPUT«Could not find sub &i␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
11:02 moritz_ ah
11:02 moritz_ rakudo: say e ** (1i * 2 * pi)
11:02 p6eval rakudo 85866d: OUTPUT«1 + -2.44929359829471e-16i␤»
11:03 snarkyboojum ah.. (say i) is enough for it to coredump in the reply as well
11:03 moritz_ ouch
11:03 snarkyboojum actually - just 'i'
11:03 snarkyboojum is enough
11:03 snarkyboojum :|
11:05 quester_ joined #perl6
11:05 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 snarkyboojum e.g. 'abc' segfaults
11:07 XaeroOne joined #perl6
11:07 quester_ .
11:08 moritz_ i also segfaults here
11:08 moritz_ time for a bug report
11:09 snarkyboojum I noticed that the repl autoprints now.. maybe related :)
11:09 moritz_ snarkyboojum: let me guess... anything that throws an exception?
11:09 snarkyboojum maybe
11:09 snarkyboojum I'm doing a clean build atm
11:11 moritz_ bug report submitted
11:11 moritz_ it's trapped in infinite recursion in Parrot_gc_mark_PMC_alive_fun
11:12 snarkyboojum moritz_++
11:16 isBEKaml joined #perl6
11:17 isBEKaml oh, crap! power reset here. :( ## lost patience with having to do another make spectest.. :/
11:18 snarkyboojum moritz_: yep - looks like any exception is segfaulting the REPL
11:20 masak joined #perl6
11:20 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?
11:20 isBEKaml yo, masak!
11:20 snarkyboojum masak o/
11:20 masak isBEKaml, snarkyboojum! \o/
11:22 masak 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.. :/
11:23 isBEKaml masak: we even got regex interpolation here courtesy bkeeler++
11:23 colomon masak: IMO yes.
11:23 isBEKaml rakudo: my $x = 'o'; say "hellooo" ~~ /$x+/;
11:23 p6eval rakudo 85866d: OUTPUT«ooo␤»
11:24 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:25 colomon 1 2 3 1,2 1,3 2,3 1,2,3
11:25 colomon that's 7.
11:26 colomon masak++
11:28 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:33 rurban joined #perl6
11:42 JimmyZ joined #perl6
11:47 patrickas joined #perl6
11:47 Ross joined #perl6
12:05 gbacon joined #perl6
12:09 jaldhar joined #perl6
12:15 whiteknight joined #perl6
12:20 JimmyZ /usr/local/bin/parrot  perl6.pbc  --target=pir --output=Test.pir Test.pm Could not find sub &notresults
12:20 JimmyZ build rakudo failed
12:21 moritz_ JimmyZ: did you reconfigure before building?
12:23 masak 卓明亮! \o/
12:25 isBEKaml joined #perl6
12:25 kel__ joined #perl6
12:27 masak hm. GGE tests segfaulted again. it's non-reproducible, and occurs after a random amount of time. not exactly bug reporting material.
12:28 arnsholt GC bug perhaps?
12:28 moritz_ snarkyboojum++ found a GC bug earlier that's quite easy to reproduce
12:28 masak arnsholt: likely.
12:29 dalek rakudo: d1c7d26 | moritz++ | t/spectest.data:
12:29 dalek rakudo: run four more advent test files
12:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d1c7d26481e2967d60565a087ea8c6630b097979
12:29 moritz_ at least it manifests itself in an infinite recursion in Parrot_CallContext_mark
12:29 arnsholt moritz_: Impressive. Got a link? I'm curious =)
12:29 jnthn o/
12:29 moritz_ arnsholt: http://rt.perl.org/rt3/Ticket/Display.html?id=75292
12:29 arnsholt Infinite recursion is always fun ^^
12:29 moritz_ \o
12:30 moritz_ anything on the REPL that throws an exception triggers it
12:30 jnthn moritz_: Ewww...I've seen those come up before too.
12:30 masak std: use v7;
12:30 p6eval std 30764: OUTPUT«ok 00:01 113m␤»
12:30 masak could be argued that STD.pm6 should catch that.
12:31 arnsholt Fun. Hopefully that recursion bug should be reasonably fixable?
12:32 jnthn Yay, the regex interpolation patch got in!
12:32 jnthn bkeeler++, moritz_++!
12:32 masak bkeeler++ moritz_++
12:34 isBEKaml moritz_: anything on the spectest that I asked earlier?
12:35 moritz_ isBEKaml: which one? the .fmt?
12:35 * moritz_ lost overview
12:35 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:36 isBEKaml 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 isBEKaml :/
12:37 moritz_ non-zero exit or a failed test don't interrupt the other tests
12:37 moritz_ so I'm not sure what you mean :/
12:37 isBEKaml moritz_: power reset, computer reboots... :(
12:39 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..
12:40 isBEKaml erm, s/build/spectest/
12:40 whiteknight joined #perl6
12:40 moritz_ log the test output to a file
12:40 dalek rakudo: 1d3f5ea | jonathan++ | docs/ROADMAP:
12:40 dalek rakudo: Move lexical variables in regexes to the completed section of the ROADMAP.
12:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1d3f5eae82c2abbc55a3a45bb543623ae35df543
12:40 moritz_ extract the file names of the completed tests
12:40 moritz_ copy spectest.data to localtest.data, omitting those tests you've already run
12:40 moritz_ just a SMOP in perl :-)
12:41 isBEKaml SMOP ?
12:41 Ross joined #perl6
12:41 moritz_ small matter of programming
12:41 isBEKaml next time, definitely. :)
12:42 isBEKaml are the integration tests reasonably complete that I can rely on them now?
12:45 moritz_ relying on it for what purpose?
12:45 quester_ left #perl6
12:45 isBEKaml skip spectest. ;)
12:46 isBEKaml > my %hash={a=>2, b=>3.0}; say %hash.keys.fmt("'%s'", ', ');
12:46 isBEKaml 'b', 'a'
12:46 moritz_ nope
12:46 jnthn No, should run spectest suite.
12:46 athomason joined #perl6
12:47 moritz_ there's a good reason why we run these 32k tests regularly :/
12:47 isBEKaml "power" struggles. #pun intended...
12:47 mdxi joined #perl6
12:47 isBEKaml I'm running it for the fourth time in the last 8 hrs... :/
12:47 lestrrat joined #perl6
12:48 moritz_ "business as usual"
12:48 jnthn isBEKaml: That doesn't strike me as odd. :-)
12:48 isBEKaml lol, there is a reason why you guys are awesome! #perl6++
12:49 isBEKaml 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
12:51 isBEKaml moritz_: only 5 test files..
12:52 moritz_ btw now that variables properly interpolate into regexes, it'll be easy to rewrite subst in terms of match
12:53 moritz_ 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 moritz_ well, almost for free
12:53 moritz_ and I'm not sure what :overlap on subst is supposed to do :/
12:54 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.
12:55 moritz_ jnthn: would be nice... for :s/// I failed
12:57 JimmyZ moritz_:  thanks. it builds now
13:00 colomon I don't think :overlap or :exhaustive are supposed to work on subst.  :)
13:00 colomon and moritz_++ of course, too.  :D
13:01 isBEKaml rakudo: "Perl 6 Advent".comb(/<alpha>/).join("|").say;
13:01 p6eval rakudo d1c7d2: OUTPUT«Cannot take substr outside string␤current instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)␤»
13:01 colomon actually, I'm not quite sure we have the combined adverbs right yet -- :x :nth together, say.
13:01 isBEKaml moritz_: day08 is wrong too..
13:02 colomon and how the heck do you implement :i?
13:02 colomon oh, ouch, my latest patch devastates the spectests.  :\
13:03 moritz_ colomon: :i must be handed to the regex compiler at regex compile time
13:03 moritz_ colomon: so match($regex, :i) has no effect
13:03 moritz_ and .subst($regex, $subst, :ii) only applies the samecase function
13:03 iblechbot joined #perl6
13:03 colomon that seems like a bad thing....
13:03 moritz_ that's what the spec says
13:03 moritz_ by recent change
13:03 jnthn Maybe it should warn, at least?
13:04 moritz_ jnthn: that could be done easily
13:04 jnthn People will try it.
13:04 moritz_ aye
13:05 colomon jnthn: just got
13:05 colomon Ambiguous dispatch to multi 'infix:<<=>'. Ambiguous candidates had signatures:
13:05 colomon :(Numeric $a, Numeric $b)
13:05 colomon :(Real $a, Real $b)
13:06 jnthn rakudo: say Real ~~ Numeric
13:06 p6eval rakudo d1c7d2: OUTPUT«0␤»
13:06 jnthn rakudo: say Numeric ~~ Real
13:06 p6eval rakudo d1c7d2: OUTPUT«0␤»
13:06 colomon huh.
13:06 colomon Real does Numeric
13:06 moritz_ not in rakudo :/
13:06 jnthn role Real does Numeric {
13:06 jnthn hmm.
13:06 colomon role Real does Numeric {
13:12 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␤»
13:13 isBEKaml rakudo: my $string ="Perl World"; $string.comb(/<alpha>/).join("|").say;
13:13 p6eval rakudo d1c7d2: OUTPUT«Cannot take substr outside string␤current instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)␤»
13:13 jnthn Hmm. Bug in <alpha>?
13:13 isBEKaml Don't know.. found that in Adventday 08.t
13:13 moritz_ maybe bug in .comb?
13:14 isBEKaml probably
13:14 moritz_ rakudo: 'Perl World'.match(/<alpha>/, :g)
13:14 p6eval rakudo d1c7d2: OUTPUT«Cannot take substr outside string␤current instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)␤»
13:14 moritz_ unlikely
13:14 jnthn rakudo: say "" ~~ /<alpha>/
13:14 p6eval rakudo d1c7d2: OUTPUT«Cannot take substr outside string␤current instr.: 'perl6;Regex;Cursor;alpha' pc 1622 (ext/nqp-rx/src/stage0/Regex-s0.pir:948)␤»
13:15 arnsholt Does Rakudo do type parametrisation yet?
13:15 isBEKaml According to S05, .match is equivalent to .comb ??
13:15 moritz_ parameterized roles, yes
13:15 jnthn arnsholt: Yes
13:15 jnthn arnsholt: It even works. Ish. :-)
13:15 moritz_ isBEKaml: .comb has :g enabled by default
13:16 jnthn colomon: Building a latest Parrot/Rakudo.
13:16 arnsholt Cool
13:17 isBEKaml moritz_: I see $string.comb(/pattern/, :match); what switches are used in place of :match here? :g - enabled by default...
13:17 isBEKaml moritz_: same as in s/// I believe?
13:18 moritz_ isBEKaml: I don't know if .comb should accept any other switches
13:18 moritz_ isBEKaml: that's what .match is for
13:19 masak joined #perl6
13:23 jnthn yayitsmasak!
13:23 jnthn colomon: Hmm. The Obvious Fix didn't cut it. Will dig deeper.
13:23 masak lolcomputerdiedaviolentdeath
13:23 jnthn oh noes halp!
13:23 jnthn Violent?
13:24 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
13:24 masak took the time to do some system-wide upgrades.
13:24 masak I seldom reboot. :)
13:24 jnthn ;-)
13:24 colomon jnthn++
13:24 jnthn Heh, that's not *so* violent.
13:25 masak you're right. my Firefox tabs survived. :P
13:25 masak again.
13:25 jnthn I guess I'm biased after one of my computers once managed to start shooting flames out of the PSU.
13:26 jnthn Which was a decidedly violent death.
13:26 masak that's like, a Hollywood computer death!
13:26 jnthn Remarkably, I did manage to shut it down cleanly before it set fire to anything else though.
13:26 jnthn Yeah, that was the amazing thing - it still ran!
13:27 masak o.O
13:27 jnthn Needless to say, I replaced the PSU after that little incident. :-)
13:27 jnthn Terrified the guy sat on the desk accross from me.
13:27 masak jnthn: did you 'hotswap' it? :P
13:27 jnthn :P
13:28 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. ;-)
13:30 isBEKaml the poor guy must have ran out and dialled 911.. HALP! ;)
13:31 isBEKaml that'd have been more cinematic!
13:31 snarkyboojum is there a known problem chaining hyperoperators?
13:32 snarkyboojum 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
13:32 p6eval rakudo d1c7d2: OUTPUT«Perl6␤»
13:32 snarkyboojum rakudo: say ("0x50", "0x65", "0x72", "0x6C", "0x36")>>.fmt("%s")>>.chr
13:32 p6eval rakudo d1c7d2: OUTPUT«
13:32 M_o_C joined #perl6
13:32 moritz_ rakudo: say '0x50'.chr.fmt('%s')
13:32 p6eval rakudo d1c7d2: OUTPUT«P␤»
13:33 moritz_ rakudo: say '0x50'.fmt('%s').chr
13:33 p6eval rakudo d1c7d2: OUTPUT«
13:33 moritz_ snarkyboojum: it's just that that expression produces some control characters
13:33 snarkyboojum oh it's that
13:33 snarkyboojum alpha: say '0x50'.fmt('%s').chr
13:33 p6eval alpha 30e0ed: OUTPUT«P␤»
13:33 moritz_ never trust your terminal - only hexdump -C doesn't lie to you
13:33 snarkyboojum alpha was ok with it
13:34 snarkyboojum 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..
13:34 snarkyboojum yep
13:35 snarkyboojum I left em in as failing tests, but was going to fudge them with meaningful messages
13:35 snarkyboojum .comb(/<alpha>/) fails
13:36 masak uasi++ # new messagepack-pm6 module is up on proto.perl6.org -- and it has all three medals!
13:36 jaldhar joined #perl6
13:36 * moritz_ stupid enough to need about 4 iterations on a .match based .subst
13:38 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!
13:39 masak dåligt. :P
13:39 jnthn :P
13:39 jnthn OTOH, my only module on proto is lolsql. :-)
13:39 moritz_ is there a good reason for zavolaj not to be on that list?
13:40 * masak was just going to ask that
13:40 masak zavolaj also lacks one medal.
13:40 JimmyZ masak: 麦高 \o/
13:40 jnthn oh
13:40 jnthn Yes, probably Zavolaj should be on there
13:41 jnthn Given that e.g. FakeDBI depends on it.
13:41 masak JimmyZ: 你怎么了?
13:41 masak jnthn: zavolaj *is* on there.
13:41 pugssvn r30765 | snarkyboojum++ | [t/spec] Fudging some failing tests for Advent Calendar Day 8
13:41 jnthn Oh.
13:41 jnthn :-)
13:41 JimmyZ masak: 哈哈,没什么
13:41 masak just follow the alphabetical sorting...
13:41 jnthn Why does proto have a happy bowling ball next to it in the list? :-)
13:42 masak JimmyZ: no?
13:42 masak jnthn: that's proto's logotype. :)
13:42 masak jnthn: I showed it to you in my kitchen.
13:42 jnthn Oh, yes!
13:42 masak november has one, too, but it was never activated, I think.
13:42 snarkyboojum just needs a t/ folder :P
13:43 * jnthn should try and make one for zavolaj
13:43 masak ++jnthn
13:46 * isBEKaml wonders why the logo is bigger than the adjacent text...
13:47 jnthn colomon: Ah, may have found it.
13:47 jnthn Subtle. :-/
13:48 colomon jnthn++
13:48 patrickas isBEKaml we guessed 32x32 px should be fine ... I am wondering if 16x16 would have been a better choice!
13:48 patrickas masak: did you take a look at my latest november attempt for 32x32 ? http://92.243.14.59/tmp/november.png
13:48 masak I suspect 16x16 is too small for a project icon.
13:48 jessejames joined #perl6
13:49 masak patrickas: yes, and I really like it!
13:49 isBEKaml Sweet November! :)
13:49 jnthn Red October.
13:49 isBEKaml No, not the movie... ;)
13:49 masak isBEKaml: clearly there is *something* wrong with the way icons and project names are laid out on the page. suggestions, patches welcome.
13:50 jnthn Oh, not that one either.
13:50 jnthn :)
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
13:50 masak jnthn: I remember the movie 'The Hunt for Pink November' with fondness :)
13:50 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.
13:51 jnthn rakudo: say Real ~~ Numeric; say Numeric ~~ Real;
13:51 p6eval rakudo d1c7d2: OUTPUT«0␤0␤»
13:51 jnthn > say Real ~~ Numeric; say Numeric ~~ Real;
13:51 jnthn 1
13:51 jnthn 0
13:51 jnthn Hopefully I didn't decimate the spectests.
13:51 colomon \o/
13:51 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 #perl6
13:53 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 masak s/line/row/
13:53 mberends joined #perl6
13:53 jnthn mberends! \o/
13:54 mberends hai jnthn!
13:54 masak mberends! ✌
13:55 masak 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?
13:56 masak mberends: gladly.
13:56 frex joined #perl6
13:57 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 Pat__ joined #perl6
13:57 masak isBEKaml: it's definitely not a simple thing to get it right. people's browsers have varying default font sizes, too.
13:58 masak but don't let my bikeshedding stand in the way of improvements. patches speak louder than words.
13:59 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.
14:00 masak mberends: aye. based on that, I think it's time to switch over to installed-rakudo.
14:00 masak 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.
14:00 masak mberends: now that there is, it doesn't as much.
14:00 masak I think a fair bit of code can be safely ripped out.
14:02 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..
14:03 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 masak mberends: managing, how?
14:04 isBEKaml masak: Cookies need more love - Oracle, Matrix.. :D
14:05 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:06 masak isBEKaml: aye. the third movie. :)
14:07 masak 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:08 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.
14:08 mberends *nod*
14:08 masak rakudo and parrot probably fall under the 'bootstrap' category as well.
14:08 mberends yes, definitely
14:08 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.
14:09 masak 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:10 mberends okay, that clarifies a point for me. It matters whether Rakudo is already installed when proto bootstraps itself.
14:10 masak yes.
14:11 masak 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.
14:11 masak the defense for that odd behaviour was that they hadn't configured proto to find those already-installed things for them.
14:12 masak mberends: the conf file probably needs a version bump, yes.
14:12 mberends masak: no problem with that at all
14:12 masak nowadays, we *can* detect an already-installed 'perl6' executable, since it's in a global location. so we should probably do that.
14:12 masak and default to it if it exists.
14:14 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/
14:14 masak they are special ones.
14:15 masak for one thing, the p5 part of proto must be able to handle them.
14:16 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?
14:16 masak *nod*
14:17 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
14:20 moritz_ isBEKaml: it's better if you fudge it, since it passes forme
14:21 rv2733 joined #perl6
14:23 BrowserUk Hi all; Anything for me Phenny?
14:23 moritz_ hi BrowserUk
14:24 moritz_ 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)␤»
14:24 moritz_ that's... not many candidates
14:25 isBEKaml I thought ~ is applicable only to Str? :O
14:25 moritz_ rakudo: say 2 ~ 4
14:25 p6eval rakudo d1c7d2: OUTPUT«24␤»
14:25 moritz_ it coerces to Str
14:25 isBEKaml Stringified, of course..
14:25 moritz_ rakudo: Mu + Mu
14:25 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,
14:25 p6eval ..Date…
14:25 moritz_ many more candidates
14:25 moritz_ which is why I wondered
14:26 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.
14:26 dalek rakudo: 03da863 | jonathan++ | docs/ROADMAP:
14:26 dalek rakudo: REPL actually prints now thanks to pmichaud++ and sorear++, so move that item to
14:26 dalek rakudo: the Done section of ROADMAP.
14:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/03da86380962a9c997d579f361f4100a7595fbee
14:26 dalek rakudo: eb84e91 | jonathan++ | src/ (3 files):
14:26 dalek rakudo: Make R1 ~~ R2 work when role R1 was never yet consumed. Also add a does to
14:26 dalek rakudo: RoleHOW so the check works directly there, rather than working less efficiently
14:26 dalek rakudo: through a fallback to punning and .does on the punned class.
14:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/eb84e910972613eb05426fcdd0348162bda95f4c
14:26 isBEKaml mberends: cpan? there were quite a lot of user inputs...
14:26 masak mberends: I'm against it, for just the reasons you specify.
14:27 masak 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:28 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?
14:29 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 ;-)
14:30 masak mberends: as long as the conf file stays relevant, I see no problem. it's opt-in, that's all.
14:30 masak mberends: people who want to configure will care enough to venture in there.
14:30 masak also, I bet it's still shorter than CPAN's config process :P
14:31 moritz_ and that config file is only long because of the many comments
14:31 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 #perl6
14:31 isBEKaml moritz_: Note, the child pid is Nil.
14:32 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:33 masak +1
14:33 masak it's a bit arbitrary with the "\n", but at least the stack trace is gone.
14:34 moritz_ rakudo: my $x = 'h'; say 'hello'.match(rx{ $x }).to
14:34 p6eval rakudo d1c7d2: OUTPUT«1␤»
14:34 moritz_ rakudo: my $x = 'h'; say 'hello'.match(rx{ $x })
14:34 p6eval rakudo d1c7d2: OUTPUT«h␤»
14:35 * jnthn gone for a bit
14:36 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
14:37 moritz_ 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?
14:38 moritz_ mberends: about twice a year - not too bad
14:38 mberends heh
14:39 * masak .oO( masak und moritz_... )
14:41 masak 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
14:44 moritz_ should a failing .match return Nil, or a False match object?
14:44 moritz_ rakudo: say 'abc'.match(rx{.}, :x(0))
14:44 p6eval rakudo eb84e9: OUTPUT«a␤»
14:48 masak the latter, I think.
14:48 masak because ~~ and .parse do, no?
14:48 agentzh joined #perl6
14:49 moritz_ there are situations when .match tries to match multiple times
14:49 isBEKaml rakudo: my $temp = ("Soemtiing" ~~ Nil); $temp.WHAT.perl.say;
14:49 p6eval rakudo eb84e9: OUTPUT«Int␤»
14:50 moritz_ in which case an empty list seem seems more appropriate
14:50 moritz_ and cases where only one match is attempted
14:50 moritz_ where a False match object would make more sense
14:50 isBEKaml rakudo: ("Something" ~~ Nil).WHAT.perl.say;
14:50 p6eval rakudo eb84e9: OUTPUT«Int␤»
14:51 moritz_ should be Bool
14:52 moritz_ and easy to fix
14:52 masak and reported already.
14:53 masak 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:56 isBEKaml we don't have real enum types yet?
14:57 masak they're not up to spec, no.
14:58 masak 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:59 masak rakudo: enum A <a b c>; say A.WHAT
14:59 p6eval rakudo eb84e9: OUTPUT«EnumMap()␤»
14:59 masak I'm pretty sure that's wrong.
14:59 masak but jnthn++ for making it work a little, so that mathw can get on with his Form.pm work. \o/
15:00 masak just waiting for him to bounce back from his performace two days ago. :)
15:00 * masak submits a rakudobug
15:00 isBEKaml what's Form for?
15:00 * isBEKaml "acks" pods.
15:00 masak it's for formatting text.
15:01 masak there is an exigesis about it somewhere.
15:01 isBEKaml .>>>> .<<<<< stuff from p5..
15:01 isBEKaml I see.. They never looked nice in p5..
15:01 masak http://dev.perl.org/perl6/doc/design/exe/E07.html
15:01 skangas joined #perl6
15:01 isBEKaml though the output was pretty formatted, the code read just horribly..
15:02 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 iblechbot joined #perl6
15:06 * 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 patrickas behaviour
15:06 masak :)
15:07 masak it's a good question whether't will.
15:07 masak since functions tend not to detect their called context in Perl 6.
15:09 patrickas Oh well... c'est la vie :-(
15:12 pugssvn r30766 | masak++ | [S29] removed 'wantarray' fossil
15:12 pugssvn r30766 |
15:12 pugssvn r30766 | Perl 6 tends to employ coercion rather than switching on caller's context.
15:12 pugssvn r30766 | See discussion in S08 about this.
15:12 orafu joined #perl6
15:14 masak rakudo: role A {}; role B does A {}; say B ~~ A
15:14 p6eval rakudo eb84e9: OUTPUT«1␤»
15:14 masak huh. locally, I got 0 :)
15:16 patrickas same here ... but my rakudo is a few days old ...
15:17 isBEKaml huh? I built it about 3 hrs ago... I got 0.
15:18 patrickas make p6eval is runing rakudo* already ?
15:18 synth joined #perl6
15:18 masak oh well.
15:18 patrickas s/make/maybe/
15:18 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_++
15:21 isBEKaml yes, I don't have jnthn++'s commits yet in my local build..
15:22 masak hey peeps. there's now a 'buf' branch, containing the first commit of my GSoC work: http://github.com/rakudo/rakudo/tree/buf
15:22 mberends \o/ yay!
15:23 masak in other words, I'm programming 'in the buf... branch' :P
15:23 masak SCNR
15:24 kcwu joined #perl6
15:25 mberends masak: writing barewords ?
15:25 masak :D
15:25 masak this pun is barely working...
15:34 Ross joined #perl6
15:52 dual joined #perl6
15:56 Trashlord joined #perl6
16:00 nimiezko joined #perl6
16:00 nimiezko joined #perl6
16:01 nimiezko joined #perl6
16:01 BrowserUk joined #perl6
16:05 masonkramer joined #perl6
16:13 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)␤»
16:13 isBEKaml hmmm, foo.enums should basically be a wrapper around foo.pairs, right?
16:14 masak no.
16:14 masak the .enums method on foo should return what is now (incorrectly) foo itself.
16:14 isBEKaml a, b, c, d?
16:14 masak right now, foo ~~ EnumMap, which shouldn't be so. foo.enums ~~ EnumMap, however, should be.
16:15 masak isBEKaml: I don't understand the question. :)
16:15 tedv rakodu: pack('h4', '1234').say
16:15 tedv rakudo: pack('h4', '1234').say
16:15 p6eval rakudo eb84e9: OUTPUT«Could not find sub &pack␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:16 tedv This feature NYI?
16:16 isBEKaml masak: (foo.enums.perl) ~~ (a,b,c,d) ?
16:16 isBEKaml :)
16:17 masak isBEKaml: well, first off, the value returned from .perl is always a Str, not a List or a Parcel.
16:17 masak rakudo: say (enum <a b c d>).perl
16:17 p6eval rakudo eb84e9: OUTPUT«{"c" => 2, "d" => 3, "a" => 0, "b" => 1}␤»
16:17 masak secondly, I think it should be that.
16:18 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 :)
16:19 masak just answering the question you actually asked, rather than what I think you asked, which won't do either of us any good. :)
16:20 masak 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 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
16:22 masak pmichaud! \o/
16:23 isBEKaml hello, pmichaud
16:23 masak isBEKaml: I like that. have you read the 'Enumerations' section in S12 lately? maybe start there...
16:25 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:28 jferrero joined #perl6
16:32 XaeroOne joined #perl6
16:33 masak enums in Perl 6 are fairly different from those in Java.
16:34 masak 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:36 masak std: my sub foo(::T $a --> T) {}
16:36 p6eval std 30766: OUTPUT«ok 00:02 116m␤»
16:36 masak std: my ::T sub foo(T $a) {}
16:36 p6eval std 30766: OUTPUT«ok 00:01 113m␤»
16:38 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 isBEKaml s/IRRC/IIRC/
16:39 isBEKaml btw, what are those pirs in glue/ for? Line 50, glue/enum.pir. gee...
16:39 isBEKaml Actions.pm calls on this from PAST::Op call...
16:41 isBEKaml did I miss anything?
16:45 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 masak jnthn++ created setup_named_enum, I guess.
16:45 masak it has this comment:
16:45 masak # For now, just install EnumMap under the main name.
16:46 masak that's what http://rt.perl.org/rt3/Ticket/Display.html?id=75296 points out is wrong.
16:47 masak 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 nadim joined #perl6
16:48 masak hm, or not subs. symbol table entries.
16:58 isBEKaml joined #perl6
17:01 isBEKaml masak: [backlogging a bit] Is there any problem in changing EnumMap in glue/enum.pir to Enum ?
17:02 plobsing joined #perl6
17:03 masak that's not going towards the spec :)
17:03 masak by spec, an Enum is one (immutable) pair in an EnumMap.
17:05 odkl joined #perl6
17:05 snikkers joined #perl6
17:05 odkl left #perl6
17:11 isBEKaml oh, the situation here is, it makes it an EnumMap of Hashes..
17:12 isBEKaml If I'm understanding the code in enum.pir correctly..
17:13 masak no, an EnumMap is already quite a bit like a Hash.
17:17 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
17:18 lue mortiz_: I'll remember that next time.
17:19 lue I think I was more concerned with getting the examples as close as possible to actual advent code than good test practices :P
17:20 lue [not that I explicitly knew what those practices were]
17:23 hudnix joined #perl6
17:23 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:24 masak where 'smallest' occasionally gives way to other concerns, such as simplicity or speed.
17:25 lue Looks like someone removed src/old . Any reasons why it didn't happen sooner ? :)
17:27 masak because we don't have more people like moritz_++, who take initiatives and carry things through.
17:27 masak if you can find more moritz_es, let us know.
17:28 isBEKaml 'moritz_'es... :)
17:28 lue Any reason why it was kept? Was it actually _used_ at any point?
17:28 lue In compiliation and such.
17:28 pmichaud lue: we used it a bit while we were converting from alpha to the new branch
17:28 pmichaud 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
17:29 pmichaud (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 :) )
17:31 isBEKaml wow, day17 has 2 tests entirely in loops... :O
17:31 isBEKaml checking every line of snowman, I guess... :)
17:33 Ayk joined #perl6
17:34 Ayk left #perl6
17:34 * lue is attempting to create a new system for dealing with numbers via demo, _not_ modification of the core.
17:35 * lue needs to study Numeric and its implementation extensively first, however.
17:38 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 masak 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.
17:39 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:40 lue 99% chance this demo won't be finished today :P
17:53 lue rakudo: say (3.4).WHAT
17:53 p6eval rakudo eb84e9: OUTPUT«Rat()␤»
17:53 lue rakudo: say (3.4).Bridge
17:53 p6eval rakudo eb84e9: OUTPUT«3.4␤»
17:53 lue rakudo: my Real $a = 3; say $a.Bridge
17:53 p6eval rakudo eb84e9: OUTPUT«3␤»
17:57 lue rakudo: my Real $a = 3; say $a.WHAT
17:57 p6eval rakudo eb84e9: OUTPUT«Int()␤»
17:57 lue I don't know why, but the Bridge command seems somewhat redundant [I'm most likely wrong however]
17:59 isBEKaml joined #perl6
18:00 arnsholt masak: In the context of Perl 6 I understand core as "required for spec compliance"
18:01 arnsholt Others may see it differently
18:01 masak lue: this seems to be the first post on Bridge: http://justrakudoit.wordpress.com/2010/04/18/numeric-progress-report/
18:02 masak lue: colomon will be the person to talk to about whether Bridge is redundant or not.
18:03 isBEKaml moritz_: ok, all tests seemed to pass and I have submitted the patch. :)
18:04 masak lue: hm, probably these two posts, from where Bridge was called RealX, further clear things up: http://justrakudoit.wordpress.com/2010/03/03/thoughts-on-real/ http://justrakudoit.wordpress.com/2010/03/05/further-thoughts-on-real/
18:04 lue All I've seen it is return self, so... [ah well, I'll go ask colomon later]
18:08 lue 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 lue afk
18:11 arnsholt The basic idea looks sound and pretty sane to me
18:11 arnsholt Leaving the exact implementation of .Bridge undefined sounds like a good idea as well
18:12 colomon arnsholt: thank you.  ;)
18:14 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.
18:15 masak 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 #perl6
18:18 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...
18:19 masak noms. now there's an idea.
18:19 masak o/
18:20 arnsholt colomon: Absolutely
18:52 justatheory joined #perl6
19:08 whiteknight joined #perl6
19:18 Ross^ joined #perl6
19:26 M_o_C joined #perl6
19:47 BrowserUk ?
19:59 ajs Anybody around who could verify a git install for me?
19:59 ajs git://www.ajs.com/rakudo.git
19:59 moritz_ like, cloning it?
19:59 ajs sure
19:59 ajs anything
19:59 ajs just want to know it works
19:59 * moritz_ tries
20:01 moritz_ seems to hang while connecting
20:01 ajs OK, so my firewall change probably is borked. Thanks for trying
20:03 dalek rakudo: 25cff28 | moritz++ | src/core/Cool-str.pm:
20:03 dalek rakudo: also accept non-Regex objects as pattern in Any.match
20:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/25cff2886e4cc3899a164a6ee5186c2a01ead641
20:03 dalek rakudo: 0aed40a | moritz++ | src/core/Cool-str.pm:
20:03 dalek rakudo: rewrite .subst in terms of .match
20:03 dalek rakudo: This wins us correct support of most options that .match understands (except
20:03 dalek rakudo: :overlap probably).
20:03 dalek rakudo: Also make Any.match(:x(0)) return Nil
20:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0aed40a1e1dad1756b594ba9954ad628597d6203
20:03 pugssvn r30767 | moritz++ | [t/spec] unfudge some substitutioni test for Rakudo
20:09 moritz_ rakudo: sub f(:$x) { say "*" if $x ~~ Whatever }; f :x(*)
20:09 p6eval rakudo eb84e9: OUTPUT«*␤»
20:11 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:13 moritz_ maybe the git daemon itself checks IPs too?
20:17 eternaleye joined #perl6
20:18 moritz_ rakudo: sub f(:$x is copy) {  undefine($x) if $x ~~ Whatever; say $x.defined }; f :x(*)
20:18 p6eval rakudo eb84e9: OUTPUT«1␤»
20:19 moritz_ that's a bug
20:19 moritz_ rakudo: sub f($x is copy) {  undefine($x) if $x ~~ Whatever; say $x.defined }; f :x(*)
20:19 p6eval rakudo eb84e9: OUTPUT«1␤»
20:19 moritz_ rakudo: sub f($x is copy) {  undefine($x) if $x ~~ Whatever; say $x.defined }; f *
20:19 p6eval rakudo eb84e9: OUTPUT«1␤»
20:19 moritz_ rakudo: sub f($x is copy) {  undefine($x); say $x.defined }; f *
20:19 p6eval rakudo eb84e9: OUTPUT«1␤»
20:19 moritz_ rakudo: sub f($x is copy) {  $x = Any; say $x.defined }; f *
20:19 p6eval rakudo eb84e9: OUTPUT«1␤»
20:19 moritz_ rakudo: sub f($x is copy) {  $x = Any; say $x.defined; say $x.perl }; f *
20:19 p6eval rakudo eb84e9: OUTPUT«1␤!whatever_dispatch_helper␤»
20:20 moritz_ rakudo: sub f($x is copy) {  $x = Any; say $x.defined; say $x.perl }; f 'a'
20:20 p6eval rakudo eb84e9: OUTPUT«0␤Any␤»
20:20 moritz_ rakudo: my $x = *; $x = Any; say $x.perl
20:20 p6eval rakudo eb84e9: OUTPUT«Any␤»
20:20 moritz_ rakudo: sub f($x is copy) {  $x = 'abc'; say $x.defined; say $x.perl }; f *
20:20 p6eval rakudo eb84e9: OUTPUT«1␤!whatever_dispatch_helper␤»
20:21 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 #perl6
20:41 synth joined #perl6
20:47 colomon moritz_++ # match and subst
20:49 * moritz_ despairs while trying to implement :x(*)
20:49 moritz_ due to the bug that I've demonstrated above with p6eval I can't just say  $x = Any if $x ~~ Whatever
20:53 pugssvn r30768 | moritz++ | [t/spec] correct some test for :x/:nth interaction, and refudge for rakudo
20:57 lisppaste3 moritz_ pasted "S05 patch: clarify interaction of :x and :nth" at http://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 #perl6
20:58 moritz_ it's how I've implemented :x, and the only sane interpretation of :x/:nth interaction that I could come up with
21:13 hercynium joined #perl6
21:22 iblechbot joined #perl6
21:26 * jnthn returns
21:29 colomon moritz_: back and checking
21:30 colomon hmmmm
21:39 lue zhoom.......Hello!
21:46 lue From what I understand, bridge is supposed to make two completely different numbers play nice (?)
21:46 lue [i.e. a `compatibility mode', if you will]
21:47 lue rakudo: say ((3+5i) cmp (6.1))
21:47 p6eval rakudo 0aed40: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:97)␤»
21:47 lue ō.o
21:50 * lue goes to find the cause of the recursion is the cause of the recusion is the cause....
21:55 mathw Hello
21:55 jnthn o/ mathw
21:57 mathw Hi jnthn
21:58 jnthn mathw: More relaxed day today after the gig excitement of yesterday? :-)
21:58 mathw well the gig was actually on Friday night
21:58 jnthn Oh :-)
21:58 mathw but yesterday was more a sort of haze of post-gig tiredness
21:58 jnthn ;-)
21:59 mathw accompanied by some... interesting messages from Rakudo
21:59 exodist_ joined #perl6
21:59 jnthn "lol your code won't compile"
21:59 mathw but then I decided not to push it and did some knitting instead
21:59 jnthn :-)
22:00 * 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
22:00 lue [with stacktrace]
22:00 mathw today I had a couple of friends over and had a bbq
22:00 lue rakudo: say (3 cmp 4)
22:00 jnthn Nice
22:00 p6eval rakudo 0aed40: OUTPUT«-1␤»
22:01 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?
22:01 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
22:01 lue rakudo: say ((3+5i).Bridge cmp (6.1).Bridge)
22:01 p6eval rakudo 0aed40: OUTPUT«Method 'Bridge' not found for invocant of class 'Complex'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:02 jnthn mathw: Hmm.
22:02 colomon lue: Bridge is for Real numbers.
22:02 jnthn rakudo: class Form::TextFormatting { sub fit-in-width() { say "ok" } }; Form::TextFormatting::fit-in-width();
22:02 p6eval rakudo 0aed40: OUTPUT«Can not find sub Form::TextFormatting::fit-in-width␤current instr.: 'perl6;Perl6Exception;throw' pc 15629 (src/builtins/Associative.pir:32)␤»
22:03 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.
22:03 mathw jnthn: no
22:03 jnthn rakudo: class Form::TextFormatting { our sub fit-in-width() { say "ok" } }; Form::TextFormatting::fit-in-width();
22:03 mathw hold on
22:03 p6eval rakudo 0aed40: OUTPUT«ok␤»
22:03 lue Ah. Not that they would match anyway. Still, recursion is an extreme error for that.
22:03 colomon I think jnthn++'s fixed it, but I haven't had time today to re-install it and try again.
22:03 jnthn mathw: Note that subs are lexically scoped by default now.
22:03 jnthn mathw: So you maybe need to sprinkle some "our"s.
22:04 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 zero␤current instr.: 'perl6;Perl6Exception;throw' pc 15629 (src/builtins/Associative.pir:32)␤»
22:04 lue Well then it wouldn't be Complex anymore! :)
22:04 lue [mathematically, of course]
22:04 mathw jnthn: ahah
22:05 mathw jnthn: if I 'our' a sub without an export, I can then call it explicitly from another package?
22:05 mathw interesting
22:05 eternaleye joined #perl6
22:05 mathw the test is now behaving differently to last night
22:05 mathw and I've not updated anything
22:05 mathw bum
22:05 jnthn mathw: Yes, "our" installs it in the package also.
22:06 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]
22:06 mathw so I've got a .pm which is module Form::Grammar and defines grammar Format
22:06 mathw when I import it, Format seems to land in my namespace
22:06 mathw should it do that?
22:07 jaldhar joined #perl6
22:08 jnthn "in my namespace"?
22:08 jnthn mathw: There may well be some issues with nested packages.
22:08 mathw in that I can call it 'Format' and Rakudo can find it
22:09 mathw if I call it Form::Grammar::Format, it doesn't like it
22:09 mathw This is a fairly general trend, actually
22:09 mathw So yes, there may well be some issues with nested packages :)
22:09 mathw on the bright side, I no longer have to fully qualify the names of classes defined in the same module
22:09 jnthn :-)
22:10 ajs joined #perl6
22:10 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
22:10 mathw but I will do it :)
22:10 mathw it's like a bit of namespace leakage
22:11 mathw 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) ?
22:12 colomon lue: yes
22:13 lue both?
22:13 jnthn mathw++
22:13 lue (gradians&degrees) ?
22:14 colomon you can ask either of those to use radians, gradians, degrees, and "revolutions"
22:15 lue Well, I completely skipped over the $base parameter :)
22:16 lue rakudo: say to-radians(39,"radians")
22:16 p6eval rakudo 0aed40: OUTPUT«Could not find sub &to-radians␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:16 BrowserUk joined #perl6
22:16 lue rakudo: say Numeric.to-radians(39,"radians")
22:16 p6eval rakudo 0aed40: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤current instr.: 'to-radians' pc 459205 (src/gen/core.pir:58520)␤»
22:17 colomon rakudo: say 39.to-radians(Radians)
22:17 p6eval rakudo 0aed40: OUTPUT«39␤»
22:17 colomon rakudo: say 39.to-radians(Degrees)
22:17 p6eval rakudo 0aed40: OUTPUT«0.680678408277788␤»
22:17 lue I'm assuming we'd prefer the abolishment of PIR in Perl code? :)
22:18 colomon lue: that's a goal.
22:21 lue I don't see how using PIR to call a simple array does radian conversion.
22:21 lue Esp. seeing how Numeric.pm says it's expanded upon in Int and Num, but I can't find it...
22:24 jferrero joined #perl6
22:24 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:25 lue Ah.
22:26 christine joined #perl6
22:27 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 exodist joined #perl6
22:28 colomon (though maybe it isn't needed now?  hmmm....)
22:28 lue Custom indices?
22:28 lue That seems to be what it's doing
22:28 colomon lue: not needed, the TrigBase enum has values 0 to 3.
22:30 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)␤»
22:30 lue rakudo: my @a{TrigBase} = 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)␤»
22:31 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)␤»
22:31 lue rakudo: my @a<TrigBase> = 1,2,3,4; say @a<Radians>
22:31 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)␤»
22:31 colomon lue: I don't think TrigBase itself actually works yet.
22:31 lue guess it's NYI :(
22:32 colomon but
22:32 lue from- and to-radians apparently work with it....
22:32 colomon rakudo: my @a = 5..10; say @a[Radians]
22:32 p6eval rakudo 0aed40: OUTPUT«5␤»
22:32 colomon rakudo: my @a = 5..10; say @a[Degrees]
22:32 p6eval rakudo 0aed40: OUTPUT«6␤»
22:32 colomon rakudo: my @a = 5..10; say @a[Gradians]
22:32 p6eval rakudo 0aed40: OUTPUT«7␤»
22:32 colomon rakudo: my @a = 5..10; say @a[Revolutions]
22:32 p6eval rakudo 0aed40: OUTPUT«Could not find sub &Revolutions␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:33 colomon blast, what is that one called.
22:33 lue rakudo: my @a = 5..10; say @a[Revs]
22:33 p6eval rakudo 0aed40: OUTPUT«Could not find sub &Revs␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:33 colomon rakudo: my @a = 5..10; say @a[Circles]
22:33 p6eval rakudo 0aed40: OUTPUT«8␤»
22:34 lue Just found that. How weird.
22:34 lue [although technically true]
22:34 * jnthn -> early sleeps, Stuff To Do tomorrow
22:34 lue so I guess the PIR code is redundant then.
22:34 lue night, jnthn o/
22:42 lue but now something about the conversion array being not defined!
22:42 exodist joined #perl6
22:43 lue rakudo: my @a-dash = 1,2,3; say @a-dash[Radians]
22:43 p6eval rakudo 0aed40: OUTPUT«1␤»
22:43 lue so it's not the dash...
22:46 lue Here's the specific error. The array is defined in INIT and created with our :
22:46 lue Symbol '@trig-base-conversions' not predeclared in to-radians
22:46 colomon then the bug still exists in Rakudo.
22:47 colomon just pushed the code to make Complex / Real comparisons "work".
22:47 lue darn :)
22:47 * lue goes to find the bug in RT
22:49 dalek rakudo: 9a7fc8a | (Solomon Foster)++ | src/core/ (3 files):
22:49 dalek rakudo: Add Numeric.reals method, and comparison operators based upon it.
22:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9a7fc8a24c8429767886e8ae40932ff1c13d6e9f
22:52 ruoso joined #perl6
22:54 plobsing joined #perl6
22:58 lue It doesn't seem to have been reported [unless I'm searching wrong]
22:59 Psyche^ joined #perl6
22:59 dalek nqp-rx: 04de3a0 | bacek++ |  (2 files):
22:59 dalek nqp-rx: Fix subst for non-matching patterns
22:59 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/04de3a0c772952fb797529377fb6a8cf7fdd2f8f
22:59 dalek nqp-rx: c62409b | bacek++ | src/stage0/ (3 files):
23:00 dalek nqp-rx: Rebootstrap files to generate new settings
23:00 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c62409b73f3662d6d62d53aba531139015e0c3a3
23:01 whiteknight joined #perl6
23:03 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 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1812 (ext/nqp-rx/src/stage0/Regex-s0.pir:1008)␤»
23:03 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 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1812 (ext/nqp-rx/src/stage0/Regex-s0.pir:1008)␤»
23:08 colomon moritz_: On consideration, I'm not convinced it makes sense for :x and :nth to work at the same time....
23:09 colomon moritz_: makes sense if :nth is a single number, but in other cases it gets really weird really fast.
23:16 masonkramer_ joined #perl6
23:23 snarkyboojum joined #perl6
23:24 lue could the bug be because we declare it as 'our' array? I'm just trying to find the cause right now :)
23:29 * lue must remember Day 16's one-liner. Dankon colomon!
23:29 lue s/colomon/masak/
23:29 lue Whoever wrote Day 16 :)
23:31 snarkyboojum masak-san I think
23:32 * snarkyboojum eventually catches up with what lue is saying :)
23:37 * lue goes and fixes some other PIR dependant things, leaving radian conversion for now
23:55 masonkramer_ joined #perl6
23:56 lue rakudo: say 4**(ln(e)/2)
23:56 p6eval rakudo 0aed40: OUTPUT«Could not find sub &ln␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:57 exodist_ joined #perl6
23:58 lue rakudo: say e**(log(4)/2)
23:58 p6eval rakudo 0aed40: OUTPUT«2␤»
23:58 lue rakudo: say e**(log(16)/2)
23:58 p6eval rakudo 0aed40: OUTPUT«4␤»
23:58 lue .oO(Thanks to my volunteer work at Perl 6, I finally learned how to calculate square roots by hand!)
23:58 eternaleye rakudo: role xyzzy { INIT { our @x = 1,2,3;}; sub fool($a) { say @x[$a]; }; }; xyzzy.fool(1);
23:58 p6eval rakudo 0aed40: OUTPUT«Symbol '@x' not predeclared in fool␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:59 eternaleye lue: You had been missing 'sub' before fool($a)
23:59 eternaleye or 'method'
23:59 eternaleye rakudo: role xyzzy { INIT { our @x = 1,2,3;}; method fool($a) { say @x[$a]; }; }; xyzzy.fool(1);
23:59 p6eval rakudo 0aed40: OUTPUT«Symbol '@x' not predeclared in fool␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
23:59 BrowserUk ?

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo