Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-11-18

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:00 jnthn 2 and 6 would need extra NFA building. I dunno how hard it'll be.
00:00 jnthn 5 is probably just a bit more state tracking in run.
00:02 diakopter seriously though, I've never done repetition ranges above 100
00:02 jnthn diakopter: If you want to do the explode out approach, that's fine for me; I guess we leaave the common case of ?, + and * as they are?
00:02 jnthn *leave
00:03 diakopter I suppose
00:03 jnthn Unless the NFA you get from the general approach is the same or just as good, of course...
00:03 diakopter has anyone else used {x,y} above 100?
00:04 * jnthn has never seen it
00:14 diakopter jnthn: hm, zero-width is ... uh oh
00:15 diakopter how to .... zugh
00:20 japhb_ joined #perl6
00:21 japhb_ Not that I in any way mind the extra credit, but I got credited twice in the release announcement.  ;-)
00:22 japhb_ Str.Numeric() changes did not make it in, BTW, because of some strange spectest failures that I haven't had the tuits to figure out -- hopefully soon.
00:23 jnthn japhb_: oops, I shoulda spotted that...but glad you see it as a positive ;-)
00:24 japhb_ jnthn, I guess two of my dominant personalities must have wanted credit of their own.  ;-)
00:24 jnthn ;-)
00:25 jnthn diakopter: As they're zero width, I wonder if they actually can influence the fate calculation anyway
00:25 jnthn diakopter: That is, if we actually were to start off by skipping over them and letting the actual rule invocation rule them out, would be get wrong results, or just be sub-optimal?
00:25 jnthn *we
00:25 jnthn I'm too tired to think that through properly. :)
00:26 jnthn But if we can do that with assertions in code, I suspect it holds for these ones too.
00:26 jnthn So it's probably just less optimial than we maybe could be
00:26 jnthn (e.g. we don't rule some possibilities out as early as we could)
00:27 diakopter hm
00:27 jnthn diakopter: A one character zero-width assertion is kinda like a special epsilon
00:28 jnthn Handling that would get us the <?[a]> style cases
00:28 jnthn (that is, if it matches we treat it like an epsilon; if not, we don't proceed)
00:33 diakopter nqpq takes 1 minute to rebuild after changing NFA.nqp. kindof a slow dev cycle
00:34 bluescreen10 joined #perl6
00:35 diakopter jnthn: should I commit in a branch or master
00:38 jnthn diakopter: Whichever you feel most comfortable doing.
00:39 jnthn (e.g. if you're happy the patches are gonna be fine or not bust exsting stuff, just go straight for master. If not, do a branch. :-))
00:39 diakopter jnthn: you didn't put quant in alphabetical order like the other rxtype methods :P
00:40 jnthn ...wow, I didn't even notice they were alphabetical!
00:40 jnthn Typical. I miss the pattern...in the code that's doing patten matching. :P
00:41 jnthn Feel free to shuffle it into place :)
00:41 jnthn Time for me to get a bit of rest
00:41 jnthn Should have plenty of Rakudo tuits tomorrow
00:41 jnthn Got one smallish thing to do in the morning first...then rest of day for Perl 6 :)
00:41 jnthn 'night o/
00:41 diakopter o/
00:48 diakopter I don't see how Busted1 would fire on Grammar's termconj
00:48 diakopter there's no &
00:49 diakopter oh wait; lol
00:52 dalek nqp: ec2f2a8 | diakopter++ | src/QRegex/NFA.nqp:
00:52 dalek nqp: skip non-declarative code when building NFAs
00:52 dalek nqp: review: https://github.com/perl6/nqp/commit/ec2f2a8fe3
00:59 hypolin joined #perl6
01:14 japhb_ diakopter, did you mean to leave what appears to be a debugging 'nqp::say()' in that last commit?
01:47 flussence joined #perl6
02:05 autin joined #perl6
02:14 am0c joined #perl6
02:20 dalek nqp: 9dd7eab | diakopter++ | src/QRegex/ (2 files):
02:20 dalek nqp: make the NFA work with () captures
02:20 dalek nqp: review: https://github.com/perl6/nqp/commit/9dd7eab62c
02:22 sivoais joined #perl6
02:24 diakopter japhb_: nope; thanks
02:31 dalek nqp: f5ad380 | diakopter++ | src/QRegex/NFA.nqp:
02:31 dalek nqp: make NFA work with rxtype subcapture (= captures)
02:31 dalek nqp: review: https://github.com/perl6/nqp/commit/f5ad380182
02:38 wolfman2000 joined #perl6
02:41 kaotikko joined #perl6
02:47 diakopter oh goody; Busted7 was fixed along with Busted1
02:47 japhb_ Is the output of a 'make spectest' saved anywhere automatically?
02:47 diakopter phenny: tell jnthn I fixed Busted1,3,4,7
02:47 phenny diakopter: I'll pass that on when jnthn is around.
02:48 diakopter japhb_: I don't know
02:48 japhb_ WBN if it did, but I suppose I can tee manually
02:50 japhb_ Oooh, but it looks like 'make rakudo_test_run.tar.gz' might do the trick
02:51 diakopter phenny: tell jnthn and Busted8
02:51 phenny diakopter: I'll pass that on when jnthn is around.
02:57 vmspb left #perl6
02:59 benabik joined #perl6
03:03 Trashlord joined #perl6
03:07 cognominal joined #perl6
03:09 diakopter std: /<?foo>/
03:09 p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
03:10 nine joined #perl6
03:10 avar joined #perl6
03:23 sftp joined #perl6
03:24 benabik joined #perl6
03:29 satyavvd joined #perl6
03:37 daniel-s joined #perl6
03:42 LoRe joined #perl6
03:49 bluescreen10 joined #perl6
04:02 jackfu joined #perl6
04:03 thowe joined #perl6
04:04 thowe A couple months ago or so I was having this problem installing Rakudo.  Apparently there was a bug preventing compilation on OpenBSD that was probably fixed in HEAD.  I was told a new release would be out that weekend.
04:04 thowe Did the band break up or something?
04:04 thowe :(
04:04 thowe But seriously, something big coming down the pipe?
04:05 thowe Just curious...
04:05 thowe Nothing but love for ya
04:05 jackfu left #perl6
04:06 molaf joined #perl6
04:19 PerlJam thowe: eh?
04:21 birdwindupbird joined #perl6
04:21 thowe Y no Rakudo in a long time?
04:22 thowe The latest has the bug that prevents OpenBSD compilation.  Never got a newer one.  Bumming me out.  Was just kind of wondering about a status if anyone knew.  I wanna do some Perl 6.
04:24 thowe That is all.  How's life for you?
04:24 PerlJam thowe: the compiler release is actually due out today  (I'm not sure if it went or not)  and I did the release last month.  I don't know about any particular problem on OpenBSD
04:24 PerlJam thowe: are you talking about Rakudo Star?
04:24 DarthGandalf joined #perl6
04:28 mkramer joined #perl6
04:30 sorear good * #perl6
04:30 PerlJam greets sorear
04:31 sorear thowe: what do you mean?  how long a time?
04:31 sorear I've been releasing monthly :p
04:31 thowe Yes.  I mean Rakudo star.
04:31 thowe I didn't know there was something else for me to mean.
04:33 PerlJam thowe: There's a compiler release that happens monthly and a "distribution release" that happens roughly quarterly.
04:33 PerlJam the distribution is called Rakudo Star
04:33 thowe oh
04:34 PerlJam if you have access to an openbsd box, you migth want to get the latest rakudo from the git repo and try building it.
04:35 thowe I have access to nothing but OpenBSD boxes...  I'll take a look.
04:36 PerlJam thowe: or you could try sorear's perl 6 implementation called niecza.
04:39 thowe are these the right instructions for that? http://rakudo.org/how-to-get-rakudo-nom/
04:42 PerlJam looks about right
04:49 envi_ joined #perl6
05:31 worr joined #perl6
06:12 buubot_backup joined #perl6
06:42 koban joined #perl6
06:43 cognominal joined #perl6
06:57 wtw joined #perl6
07:01 preflex joined #perl6
07:26 lestrrat joined #perl6
07:47 simcop2387 joined #perl6
08:05 aindilis` joined #perl6
08:14 praful joined #perl6
08:14 cxreg joined #perl6
08:54 mj41 joined #perl6
09:14 icwiener joined #perl6
09:21 masak morning, #perl6
09:21 tadzik morning masak
09:21 icwiener_ joined #perl6
09:29 icwiener joined #perl6
09:35 jrockway joined #perl6
09:37 daxim joined #perl6
09:38 masak nom: .say for [\^^] <1 0 0 0 0>
09:38 p6eval nom ecc46f: OUTPUT«1␤1␤1␤1␤1␤»
09:39 masak anyone else got a Parrot release announcement email yet? I didn't.
09:40 tadzik I think I did
09:40 tadzik or maybe that was rss
09:41 masak ah, yes. it's in the feed.
09:42 mishin joined #perl6
09:50 jnthn morning, #perl6
09:50 phenny jnthn: 02:47Z <diakopter> tell jnthn I fixed Busted1,3,4,7
09:50 phenny jnthn: 02:51Z <diakopter> tell jnthn and Busted8
09:50 jnthn \o/
09:51 jnthn tadzik: Did you send the perl6-compilers email after the release? I didn't see it...
09:54 masak morning, jnthn
09:55 jnthn o/ masak
09:56 the-golem joined #perl6
09:57 jnthn diakopter: I fear https://github.com/perl6/nqp/commit/ec2f2a8fe3 may be too liberal...it may also catch normal code blocks, which should terminate LTM.
10:02 jnthn phenny: tell diakopter I fear https://github.com/perl6/nqp/commit/ec2f2a8fe3 may be too liberal...it may also catch normal code blocks, which should terminate LTM.
10:02 phenny jnthn: I'll pass that on when diakopter is around.
10:04 jnthn phenny: tell diakopter In https://github.com/perl6/nqp/commit/9dd7eab62c I think it's likely also not quite right - I think due to src/QAST/Compiler.nqp:396 that just dropping an extra node into the tree will cause mis-generated code; it'll pass an extra arg to the subrule?
10:04 phenny jnthn: I'll pass that on when diakopter is around.
10:35 jnthn phenny: tell diakopter actually, now I read more carefully, 9dd7eab62c is fine - QAST::Compiler only look into the first child after all.
10:35 phenny jnthn: I'll pass that on when diakopter is around.
10:42 dalek nqp: 5523be6 | jnthn++ | src/QRegex/NFA.nqp:
10:42 dalek nqp: Make sure we terminate LTM on imperative pastnode cases.
10:42 dalek nqp: review: https://github.com/perl6/nqp/commit/5523be6d9d
10:42 jnthn phenny: tell diakopter ec2f2a8fe3 was a bit too liberal though; corrected that.
10:42 phenny jnthn: I'll pass that on when diakopter is around.
10:51 passanger joined #perl6
10:52 passanger hi perl6
10:52 passanger what is this operator ^^
10:52 passanger i never seen it before
10:54 jnthn short-circuiting exclusive or
10:54 passanger thanks jnthn
10:55 jnthn passanger: There's more info in S03
10:55 jnthn phenny: tell moritz the JSON::Tiny parse test harness has a nasty bug that made it look like we pass all the parse tests. However, it never actually checked the return value of .parse, just that we don't throw an exception.
10:55 phenny jnthn: I'll pass that on when moritz is around.
10:56 passanger I'll read it , thanks
10:59 masak passanger: you know how || means "this OR that" and && means "this AND that"?
11:00 masak passanger: well, ^^ means "exactly ONE of this or that"
11:01 masak jnthn: s/imperative/procedural/, no?
11:01 passanger why ? 1 ^^ 1 got Nil
11:03 masak passanger: well, that's the correct truth value. remember the "exactly ONE" rule from above. :)
11:03 masak it's supposed to return Bool::False
11:04 passanger i see
11:06 jnthn masak: imperative is the opposite to declarative, no?
11:06 masak jnthn: the terminology in S05 is declarative/procedural.
11:06 jnthn S05 says many curious things :)
11:06 masak :)
11:07 jnthn Don't worry though, we only flag zerowidth and declarative in the code
11:07 masak nodnod
11:07 jnthn Imperative/procedural is inferred by lack of either of those :)
11:07 jnthn So when tadzik++ found JSON::Tiny passed all it's parse tests yesterday...it's 'cus the parse tests didn't actually check the result :(
11:08 moritz that's because when  ~ is implemented, all parse errors actually throw exceptions
11:08 phenny moritz: 10:55Z <jnthn> tell moritz the JSON::Tiny parse test harness has a nasty bug that made it look like we pass all the parse tests. However, it never actually checked the return value of .parse, just that we don't throw an exception.
11:08 jnthn moritz: Oh!
11:08 moritz at least they did in b
11:08 jnthn moritz: Still, worth hardening, I guess.
11:09 jnthn Is it meant to throw by spec?
11:09 * jnthn is going to try and put ~ back in today
11:09 moritz jnthn: TimToady never gave a clear answer to that. But if not, we'd have no way to access the error message
11:10 jnthn moritz: OK. I'll make it throw then :)
11:10 passanger hi moritz: what is "b"
11:10 mkramer joined #perl6
11:10 moritz passanger: the rakudo version/branch before nom
11:10 masak there's an RT ticket somewhere (filed by me) about how it's quite surprising that ~ throws an exception.
11:11 passanger oh ! thanks ! moritz
11:11 masak the in-band channel for .parse is the True/False distinction. throwing an exception is a third kind of reaction, and one that doesn't seem commensurate to the initial action (wanting to parse a bit of text).
11:12 passanger moritz:where can i found it
11:12 jnthn Oh great, now I have two of you wanting different things :P
11:13 moritz masak: how would you propose to get the error message then?
11:14 masak moritz: anywhere on the Match is fine by me.
11:14 moritz masak: on which Match?
11:14 masak the one returned from the failed parse.
11:14 dalek roast: 08133b6 | jnthn++ | S05-grammar/protoregex.t:
11:14 dalek roast: Some more LTM tests for protoregexes.
11:14 dalek roast: review: https://github.com/perl6/roast/commit/08133b617a
11:14 moritz passanger: in the rakudo repository, type   git checkout Beijing
11:14 moritz masak: which one?
11:14 moritz :-)
11:15 dalek rakudo/nom: 81c23d2 | jnthn++ | src/Perl6/Actions.pm:
11:15 dalek rakudo/nom: Mark :my declarations as declarative for the purposes of LTM.
11:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81c23d2e5f
11:15 dalek rakudo/nom: 2f44b37 | jnthn++ | tools/build/NQP_REVISION:
11:15 dalek rakudo/nom: Bump to an NQP with various LTM improvements by diakopter++.
11:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2f44b37457
11:15 moritz problem is, the match usually fails ina subrule
11:15 moritz and the Match for a failed subrule isn't even constructed usually
11:16 ggoebel joined #perl6
11:16 jnthn As another data point, STD is precedent for grammars throwing exceptions (see mass panic)
11:16 jnthn er, use of panic :)
11:16 masak fair point.
11:16 moritz and we need exceptions anyway, because it unwinds an arbitrary number of regex stack frames
11:17 masak yeah, I can see how what I'm proposing would be a crappy reinvention of exceptions.
11:17 moritz the question is just if the exception should be caught at a code <-> regex boundary somewhere
11:17 moritz I'd go with "no" for simplicity reasons for now
11:17 masak well, it could be argued that it should, because ~ is just supposed to be sugar.
11:18 masak but OTOH it could be argued that ~ introduces the *expectation* of a matching paren or whatever, and that its absence is worthy of a .panic
11:18 moritz but sugar for what?
11:18 moritz right
11:18 masak I'm now more OK with it than when I filed that RT ticket :)
11:19 moritz it's supposed to be sugar for something which contains something panicy
11:19 * moritz handwaves towards S05
11:19 moritz speaking of S05
11:20 moritz iirc it tells pretty well what happens on zero-width assertions and LTM
11:21 masak yes.
11:21 cognominal I don't see the % operator in QRegex/P6Regex/Grammar.nqp
11:21 masak there's a whole little section on the declarative/procedural boundary.
11:21 moritz iirc it says that the assertion participates in LTM as if it was not zero-width, but ends the declarative prefix
11:21 masak cognominal: not sure QRegex has it yet.
11:22 masak moritz: better check that. ISTR assertions are made "afterwards" so as not to upset the LTM.
11:22 moritz it probably does the old ** syntax still
11:28 jnthn (assertions) will try and find that bit of S05; thanks
11:29 passanger masak: you are a good teacher! Hanks!!
11:32 dalek nqp: 5a3575c | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
11:32 dalek nqp: Get ~ goal matching syntax working again; Cursor.FAILGOAL is missing yet, so the error sucks, but otherwise it seems to do the right thing.
11:32 dalek nqp: review: https://github.com/perl6/nqp/commit/5a3575cd38
11:35 Woodi is somewhere Niecza Star distribution[*] ? :)
11:41 dalek nqp: 0b22858 | jnthn++ | src/QRegex/Cursor.nqp:
11:41 dalek nqp: Basic FAILGOAL implementation so we at least get a bit better error.
11:41 dalek nqp: review: https://github.com/perl6/nqp/commit/0b228580d7
11:46 dalek rakudo/nom: 4456cdd | jnthn++ | tools/build/NQP_REVISION:
11:46 dalek rakudo/nom: Bump to NQP revision with goal matching syntax implemented.
11:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4456cdd639
11:49 dalek roast: 04961ff | jnthn++ | S05-metachars/tilde.t:
11:49 dalek roast: Unfudge a bunch of ~ tests for Rakudo.
11:49 dalek roast: review: https://github.com/perl6/roast/commit/04961ffe54
11:52 domidumont joined #perl6
11:53 jnthn OK, that gets us a bit further with JSON::Tiny::Grammar. Next problem: whitespace.
11:54 colomon jnthn++
11:54 jnthn oh, maybe...
11:57 jnthn nah, it's something in the string parsing.
11:58 mkramer left #perl6
11:59 masak Woodi: there hasn't been a Rakudo Star release in a while. latest one was 2011.07.
12:00 jnthn Next one will be 2011.12 :)
12:00 Woodi i wondered about Niecza :)
12:01 Woodi I use Debian-included Rakudo whitch is 2011.07 :)
12:01 prammer joined #perl6
12:01 daxim $ pugs --version | ack -o 'Version:(.*)'
12:01 daxim Version: 6.2.13.20111008
12:06 robinsmidsrod joined #perl6
12:12 cosimo joined #perl6
12:12 Psyche^ joined #perl6
12:39 masak Woodi: Niecza's version goes up to v11.
12:43 koban left #perl6
13:12 bluescreen10 joined #perl6
13:21 pat_js joined #perl6
13:39 [Coke] Are we still needing to know how to increase nom's (parrot) recursion depth?
13:43 [Coke] PIR: $P0 = getinterp ; $P0.'recursion_limit'(10000)
14:06 tyatpi_ joined #perl6
14:25 mtk joined #perl6
14:27 jnthn $other-task done, Perl 6 time again :)
14:27 [Coke] jnthn: YAY
14:31 jnthn aha
14:31 jnthn multiple reasons that string parsing is busted.
14:32 sayu joined #perl6
14:33 flussence `now` works on my netbook again \o/
14:33 jnthn flussence: \o/
14:33 jnthn flussence: That'll be thanks to bigint support :)
14:34 jnthn (so we don't overflow horribly on 32-bit now)
14:35 flussence `now.Num` still hangs though :)
14:35 jnthn ...oh :/
14:35 jnthn flussence: does e.g. 0.5.Num hang too?
14:36 flussence wfm
14:36 jnthn flussence: hm
14:36 jnthn nom: say now.WHAT
14:36 p6eval nom 4456cd: OUTPUT«Instant()␤»
14:36 jnthn oh
14:36 * jnthn wonders what Instant.Num does
14:36 flussence (I've got a ulimit -t 60 on that shell from running the spectest, so maybe it's just really slow...)
14:36 jnthn flussence: Feel free to ticket the hang.
14:37 flussence nom: say now.Numeric
14:37 p6eval nom 4456cd: OUTPUT«Instant:1321624751.28904␤»
14:37 flussence that can't be right either...
14:38 flussence if nobody else does it first, I'll file a bug about it when I get home from $dayjob later
14:38 masak ++flussence
14:39 jnthn nom: say "abc" ~~ /<before 'a'> \w+/
14:39 p6eval nom 4456cd: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in before at src/stage2/QRegex.nqp:959␤  in regex <anon> at /tmp/IAM7XjAmiw:1␤  in method ACCEPTS at src/gen/CORE.setting:6634␤  in block <anon> at /tmp/IAM7XjAmiw:1␤  in <anon> at /tmp/IAM7XjAmiw:1␤»…
14:39 [Coke] 7
14:39 * colomon really hopes that 0.5.Num is tested somewhere in the spectest....
14:40 mkramer joined #perl6
14:41 [Coke] nom: say 0.5.Num
14:41 p6eval nom 4456cd: OUTPUT«0.5␤»
14:41 [Coke] nom: say 0.5.Rat.Str.Num.HOW.WHY
14:41 p6eval nom 4456cd: OUTPUT«Method 'WHY' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <anon> at /tmp/XjvM8S1ixJ:1␤  in <anon> at /tmp/XjvM8S1ixJ:1␤»
14:41 [Coke] nom: say 0.5.Rat.Str.Num.HOW
14:41 p6eval nom 4456cd: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in sub say at src/gen/CORE.setting:5262␤  in block <anon> at /tmp/i5asgHWEpY:1␤  in <anon> at /tmp/i5asgHWEpY:1␤»
14:42 [Coke] *blah*
14:43 alester daxim: It makes me happy to see people using ack -o
14:44 colomon ack -o?
14:45 colomon " Show only the part of a line matching PATTERN", interesting
14:45 cognominal alester++  daxim++  # useful enough
14:45 flussence same as grep -o, but less typing :)
14:45 colomon never have used grep -o
14:59 flussence .oO( I wish perl5 had a debug thing that allowed you to pause the program and get a breakdown of current memory usage by package... )
15:00 PerlJam alester: I use that feature all the time
15:02 [Coke] flussence: isn't there a module for that that sugalski did?
15:03 [Coke] Devel::Size is the one I'm thinking of. doesn't look quite like what you want.
15:07 flussence I found Devel::MemoryTrace::Light, looks useful...
15:07 dalek nqp: 3071d43 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
15:07 dalek nqp: Handle nibbler case of named assertions.
15:07 dalek nqp: review: https://github.com/perl6/nqp/commit/3071d43c67
15:10 moritz nom: say now ~~ Numeric
15:10 p6eval nom 4456cd: OUTPUT«Bool::True␤»
15:11 moritz that's why the output from now.Numeric isn't wrong
15:11 moritz nom: say now.Num
15:11 masak nom: say Instant ~~ Numeric
15:11 p6eval nom 4456cd: OUTPUT«(timeout)»
15:11 p6eval nom 4456cd: OUTPUT«Bool::True␤»
15:12 masak I thought Instant was Real but not Numeric...
15:12 jnthn uh, Real ~~ Numeric, no?
15:12 moritz nom: say Real~~ Numeric
15:12 p6eval nom 4456cd: OUTPUT«Bool::True␤»
15:14 bluescreen10 joined #perl6
15:14 [Coke] nom: say Instant ~~ Real ~~ Numeric
15:14 p6eval nom 4456cd: OUTPUT«Bool::False␤»
15:16 masak std: say Instant ~~ Real ~~ Numeric
15:16 p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
15:17 masak S02 lists Instant as Real but not Numeric.
15:18 masak (S02:1458)
15:18 masak whereas for example Num is listed as both Real and Numeric.
15:18 masak so Rakudo is wrong on this one.
15:18 jnthn er
15:18 colomon no it's not.
15:18 colomon Real is Numeric
15:18 jnthn No, the spec is wrong.
15:19 colomon the spec is just not saying everything
15:19 masak interesting notion.
15:19 colomon I mean, they're Cool, too, no?
15:19 colomon Num is definitely Cool
15:19 masak no idea.
15:19 jnthn Real not being Numeric sounds...really odd
15:19 masak also, I don't see what that's got to do with anything.
15:20 masak jnthn: I think the underlying idea is that Instant not be readily contertible to numeric types. but they're still "measuers", and fall on a continuum of some kind -- hence Real.
15:20 masak measures*
15:20 colomon "These types do (at least) the following roles"
15:20 colomon emphasis on "(at least)"
15:21 masak well, you can prove anything by saying "the spec is wrong".
15:21 colomon masak: Real is Numeric.  honest
15:21 colomon that's very fundamental
15:21 masak :)
15:21 [Coke] masak: just because it is not DIRECTLY numeric doens't mean it isn't numeric at all.
15:22 [Coke] if something is Real, it has to be Numeric. Or it isn't Real.
15:22 masak you all seem terribly convinced. this is duly noted.
15:23 masak [Coke]: note that according to the spec, both Numeric and Real are roles.
15:23 [Coke] masak: I like how you're not saying we're RIGHT, just SINCERE. ;)
15:23 masak I acknowledge that you all really think you're right.
15:24 masak nowhere does S02 state that Real ~~ Numeric.
15:24 [Coke] that's the part I was going to double check now. :)
15:24 masak it also makes a point of having some types do both Real and Numeric, and some only Real.
15:24 PerlJam masak: is that your way of encouraging us to edit the spec? :)
15:25 masak PerlJam: do I want the spec to reflect consensus view of what the spec "should" say? yes.
15:25 PerlJam masak: are you training to be a politician?  ;)
15:25 masak PerlJam: but in this case I'm arguing for the spec meaning what it says, not the spec being wrong.
15:26 masak PerlJam: this is difficult, because (1) I am in a minority, and (2) y'all aren't open for the possibility of my interpretation being the correct one.
15:26 * [Coke] cannot find the "Real role does these things" list.
15:26 alester colomon: You can also use --output= to put out $1, $2, etc
15:28 colomon masak: yeah, that's because you interpretation is insane.
15:28 colomon S02's list you are looking at specifically says it is not a complete list of the roles each type does.
15:29 mkramer left #perl6
15:29 colomon Are you going to also argue that Ints are not Real?
15:29 colomon (based on the same list?)
15:30 PerlJam colomon: The spec indentifies 2 roles Real and Numeric and does not mention the relationship between the two  (I haven't found any yet)
15:30 [Coke] I agree that masak's correct in that the spec doesn't seem to actually say that Real ISA Numeric Role.
15:30 [Coke] I agree with colomon that this seems insane. ;)
15:30 [Coke] Is the role anything other than a placeholder type? Do you get methods when you Does this role?
15:31 masak colomon: yes, I argue that Int is not Real.
15:31 masak colomon: we have different interpretations of what Real does and means.
15:31 masak to me, it means "some kind of continuum". Int is not that.
15:32 colomon masak: unfortunately for you, I both wrote big hunks of that spec and implemented it
15:32 masak colomon: the reason I don't like your argument with "(at least)" is that it would've been very easy to list Instant as both Real and Numeric. this wasn't done.
15:32 colomon Int is very clearly Real in the Perl 6 sense
15:33 masak colomon: I respect the fact that you wrote and implemented big hunks of the spec. if I'm wrong on this, then we should fix the spec to conform to Rakudo. if I'm right on this, we should fix Rakudo to conform to the spec.
15:33 masak at this point, it just seems we don't have enough data.
15:34 masak nom: say Int ~~ Real
15:34 p6eval nom 4456cd: OUTPUT«Bool::True␤»
15:34 [Coke] So, I don't see anything in the spec about what You get if you "do" Real. Can someone point me in the right spot?
15:34 PerlJam ah! S32-setting-library/Numeric.pod line 212:   role Real does Numeric;
15:34 colomon also: class Num does Real;
15:34 jnthn PerlJam++
15:34 masak I do agree that if you think of "Real" as "a Numeric which is not Complex or any other strange thing", then Int ~~ Real.
15:35 masak PerlJam: sure, but S02 is and has always been more canonical than S32.
15:35 colomon oh, for heaven's sake
15:35 PerlJam masak: granted.
15:36 masak I feel as stubborn as Woodi right now... ;)
15:36 PerlJam (that doesn't mean S32 is insane though :)
15:36 masak PerlJam: granted.
15:36 masak colomon: please don't take this as anything else than wanting to know the truth. I don't like disagreeing either.
15:37 masak colomon: somehow I seem to have gotten a fairly specific picture of the relation between Numeric and Real. I *think* I got most of it from discussion about Instant on p6l.
15:37 masak these discussions might have been only partially turned into spec, or overruled, or whatever.
15:37 colomon masak: listening to p6l is probably your first mistake....
15:37 pat_js 15:39 <p6eval> nom 4456cd: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in before at src/stage2/QRegex.nqp:959␤  in regex <anon> at /tmp/IAM7XjAmiw:1␤  in method ACCEPTS at src/gen/CORE.setting:6634␤  in block <anon> at /tmp/IAM7XjAmiw:1␤  in <anon> at /tmp/IAM7XjAmiw:1␤»…
15:37 PerlJam heh
15:38 masak colomon: well, specifically, TimToady on p6l...
15:38 pat_js sorry
15:38 masak I could try to find the email(s) in question...
15:38 PerlJam colomon: no, I think what masak is doing is useful and important. If the spec doesn't nail something down that should be nailed down, then we've got a problem.
15:41 masak specifically, if it lists some types as doing Real *and* Numeric and some types as doing only Real, and that is ground for people disagreeing over whether the distinction makes a difference, then the spec needs clarifying.
15:41 flussence figured out why my $dayjob perl5 code was getting OOM crashes... Test::More stores all the current test results in RAM. Not well-suited for sanity-checking a 5GB dataset... :(
15:44 PerlJam masak: which types?
15:45 dalek specs: 4fe7d34 | (Solomon Foster)++ | S02-bits.pod:
15:45 dalek specs: Explicitly state that Int is Real and Instant and Duration are Numeric to make masak happy.
15:45 dalek specs: review: https://github.com/perl6/specs/commit/4fe7d34dab
15:45 masak PerlJam: Num (on S02:1441) is listed as Numeric Real. so are Rat and FatRat. Instant (on S02:1458) is listed as Numeric only.
15:45 sftp_ joined #perl6
15:45 masak PerlJam: now, colomon's argument is essentially that this is an *oversight*.
15:46 colomon which has now been fixed
15:46 dalek nqp: 7fc7a08 | jnthn++ | src/QRegex/Cursor.nqp:
15:46 dalek nqp: Fix implementation of <before ...>.
15:46 dalek nqp: review: https://github.com/perl6/nqp/commit/7fc7a08483
15:46 masak well, that's one way to resolve the issue. :)
15:46 masak TimToady: ^^
15:47 jnthn ...fixing that took a bit of fathoming stuffs.
15:47 masak TimToady: did I completely dream up the "Instant is Real but not Numeric" meme?
15:47 jnthn src/QAST/Compiler.nqp is starting to become readable almost... )
15:48 masak jnthn++
15:48 jnthn Let's see how much it helps JSON::Tiny::Grammar...
15:49 PerlJam colomon, masak: now all we need is what Coke was saying:  where is the list of what behaviors you get from "does Real" or "does Numeric"?  (What's the distinction?)
15:50 [Coke] PerlJam++ # I wasn't sure anyone saw that. ;)
15:50 masak indeed.
15:50 masak I'm not sure the spec nails down the purpose and function of either Numeric or Real.
15:51 PerlJam masak: I don't see it, but I have on ack-shaped googles right now.
15:51 PerlJam er, goggles even
15:51 jnthn whoa, I think we just passed the JSON grammar tests for real...
15:51 colomon PerlJam: see Real in S32 Numeric.  Basically it adds methods that only make sense on real numbers, like sign and round
15:51 masak jnthn: \o/
15:52 colomon PerlJam: more importantly, perhaps, it lets you use Real as a argument type, so you can specify that you want to deal with a numeric value which is not complex or otherwise weird
15:53 dalek rakudo/nom: a0e51ac | jnthn++ | tools/build/NQP_REVISION:
15:53 dalek rakudo/nom: Get <before ...> fixes. Seems we can now parse with JSON::Tiny::Grammar again.
15:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a0e51acce9
15:53 colomon jnthn++
15:54 [Coke] yay!
15:54 wolverian joined #perl6
15:54 masak wolverian! \o/
15:55 jnthn The actions seem hosedish though
15:57 PerlJam colomon: ah ... I was mis-reading the pod I think.  It's clearer if I use perldoc
15:57 colomon PerlJam: I always use perlcabal.  :)
15:58 cognominal hosedish?
15:58 cognominal ho, hosed-ish!
16:00 PerlJam btw, is there some reaon that pi and e go out to 35 decimal places?
16:00 PerlJam why not 30?  why not 50?
16:01 daxim calculate what accuracy this mantissa(?) gives you
16:01 colomon PerlJam: I think that's just what someone happened to have handy.
16:01 PerlJam ok  :)
16:01 colomon I don't think the actual implementation can be that precise.
16:02 colomon at least, that sounds like more than a Rat can handle, and that's what they're defined as...
16:02 PerlJam I only have them to 20 places in my head and that's always been more than enough for my usages
16:02 colomon 20 is more than enough for any sane usage for pi, for sure.
16:03 alester 37 decimal places is all anyone should ever need.
16:03 PerlJam alester: why 37?
16:03 alester I was making a funny.
16:03 PerlJam ah.
16:03 vmspb joined #perl6
16:03 daxim an example: circumference of earth = 40_000_000m  divided by both 3.1415296 and 3.1415295, the error is only 1 metre
16:03 * PerlJam recalibrates :)
16:03 MayDaniel joined #perl6
16:03 daxim 7 places already give you that.
16:03 jnthn nom: "aaaaa" / (.) /; say $0.list.perl
16:03 p6eval nom 4456cd: OUTPUT«===SORRY!===␤Confused at line 1, near "\"aaaaa\" / "␤»
16:03 alester I think Mantissa would be a fantastic superhero.
16:03 jnthn nom: "aaaaa" ~~ / (.) /; say $0.list.perl
16:03 p6eval nom 4456cd: OUTPUT«().list␤»
16:03 PerlJam daxim: that's way too much for calculating the speed of a neutrino  ;)
16:04 alester "Let's get out of here!  It's…. Mantissa!"
16:04 masak ISTR 30 or so decimals allows you to determine a circle the size of the known universe with a resolution of a proton, or whatever.
16:04 jnthn nom: "aaaaa" ~~ / (.)+ /; say $/; say $0.list.perl
16:04 p6eval nom 4456cd: OUTPUT«=> <aaaaa>␤ 0 => <a>␤ 0 => <a>␤ 0 => <a>␤ 0 => <a>␤ 0 => <a>␤␤(Match.new(orig => "aaaaa", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new()), Match.new(orig => "aaaaa", from => 1, to => 2, ast => Mu, list => ().list, hash => EnumMap.new()), Match.n…
16:04 jnthn nom: "aaaaa" ~~ / (.)+ /; say $0
16:04 p6eval nom 4456cd: OUTPUT«=> <a>␤ => <a>␤ => <a>␤ => <a>␤ => <a>␤␤»
16:04 daxim that's what I wanted to express, masak++
16:04 jnthn nom: "aaaaa" ~~ / (.)+ /; say $0.list
16:04 p6eval nom 4456cd: OUTPUT«a a a a a␤»
16:04 jnthn nom: "aaaaa" ~~ / (.)+ /; say $0.list.perl
16:04 p6eval nom 4456cd: OUTPUT«(Match.new(orig => "aaaaa", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new()), Match.new(orig => "aaaaa", from => 1, to => 2, ast => Mu, list => ().list, hash => EnumMap.new()), Match.new(orig => "aaaaa", from => 2, to => 3, ast => Mu, list => ().…
16:05 jnthn nom: regex a { a }; "aaaaa" ~~ / (<&a>)+ /; say $<a>.perl
16:05 PerlJam masak: the planck length is on the order of 10 ** (-35)
16:05 p6eval nom 4456cd: OUTPUT«Useless declaration of a has-scoped method in mainline␤===SORRY!===␤Symbol '&a' not predeclared in <anonymous> (/tmp/GJMaH73xeZ:1)␤»
16:05 jnthn nom: my regex a { a }; "aaaaa" ~~ / (<&a>)+ /; say $<a>.perl
16:05 p6eval nom 4456cd: OUTPUT«Any␤»
16:05 jnthn aha
16:05 jnthn oh
16:06 jnthn Guess that may be same as $other-bug...
16:07 kaare_ joined #perl6
16:09 flussence (oh wait, false alarm on what I was saying before... apparently I've got a real mem leak somewhere else and Test::More isn't to blame at all)
16:14 colomon masak: can you explain more about what you thought would happen if a class was Real but not Numeric?  The more I think about it, the more it seems to me like Instant and Duration should be neither Real nor Numeric...
16:15 colomon masak: seems like they should "has Real" rather than "does Real".
16:16 masak colomon: yes, that sounds sane.
16:17 moritz masak: in case of numbers, consider S02 to contain the broad ideas and S32 the gory details
16:17 masak moritz: right.
16:17 masak moritz: but they were in opposition in this case, and I seemed to remember why.
16:17 masak moritz: colomon resolved it in favour of S32.
16:17 moritz colomon++
16:17 masak indeed.
16:18 masak colomon: as I said, ISTR the reason Instant was made Real but not Numeric was so that it should be possible to use it in additions-subtractions, but not get a numeric value out of it.
16:20 moritz but we abandoned that
16:20 moritz because of an example that masak++ supplied, no less
16:20 colomon masak: the problem with that is it is pretty darned easy to get a numeric value out of a Real.
16:20 moritz (calculating the standard deviation of a sample of Durations, iirc)
16:21 masak moritz: I remember the example (and your blog post).
16:22 masak I hadn't made the connection before between the typology and the restrictions on Duration.
16:22 masak in fact, they still seem pretty orthogonal to me.
16:23 jnthn Hmm. Does anybody understand CAPHASH... :)
16:26 colomon masak, moritz: if you ask me, Instant and Duration should be measure objects, not numbers.  So it represents 10 seconds, not just 10.
16:26 colomon afk # noms
16:27 aindilis joined #perl6
16:28 masak agree fully for Durations.
16:28 masak don't see how it applies to Instants.
16:57 jeffreykegler joined #perl6
16:59 jeffreykegler left #perl6
17:02 molaf joined #perl6
17:22 Chillance joined #perl6
17:32 orafu joined #perl6
17:34 [Coke] ooh, paypal exposes people's registered names when you email them money!
17:35 [Coke] jnthn: I tried to send you a beer card. Please let me know if there are any issues (other than not enough beer. ;)
17:35 jnthn [Coke]: ooh! Will check, thanks! :D
17:36 * jnthn thinks he's finally worked out what on earth is going on with the ratcheting+capturing bug.
17:42 tyatpi_ joined #perl6
17:42 moritz colomon: (how) do we support measure objects?
17:43 moritz it might be an overstretch for a general purpose programming language to provide such things. Or it might not :-)
17:44 PerlJam moritz: no way!  This is *perl* we're talking about!  :)
17:47 tadzik 'evening
17:47 jnthn o/ tadzik
17:47 tadzik jnthn: I did send it
17:47 jnthn tadzik: ok :)
17:47 tadzik did you get it eventually?
17:48 jnthn I...don't see it yet
17:48 tadzik hrm
17:52 PerlJam I didn't get it either.
17:52 rindolf joined #perl6
17:52 sayu joined #perl6
17:56 tadzik should I resend it?
17:56 jnthn tadzik: Give it just a little longer...maybe it got stuck in moderation.
18:00 joneskoo_ joined #perl6
18:00 PerlJam oh!  yes, that happened to me too.
18:00 PerlJam if you prod Ask, he may get to moderating faster.
18:01 joneskoo_ I guess this is old news but try.rakudo.org does not seem to work.
18:01 joneskoo_ no matter how simple, A serious error seems to occur
18:01 PerlJam joneskoo_: it's new news to me.  :(
18:01 flussence one sec
18:02 joneskoo_ HTTP 500 Internal Server Error from cmd
18:02 colomon moritz: I kind of think it is over-reach for the core to provide general purpose measure objects, yeah.
18:02 [Coke] colomon++
18:04 flussence hm, it's getting *some* of the input, but not mine on the server...
18:04 joneskoo_ {"stdin":null,"error":"Cannot connect to Rakudo eval server: IO::Socket::INET: connect: Connection refused at \/var\/www\/try.rakudo.org​\/frontend\/try-rakudo.pl line 38.\n","stdout":""}
18:06 joneskoo_ strange, http://try.rakudo.org/cmd?input=say%20%22hi%22 seems to produce sane output but through the main page form it fails
18:08 flussence usually this is because the backend crashed, but it's running fine...
18:09 joneskoo_ the only difference I can tell between the requests is that the form has content-type application/x-www-form-urlencoded
18:11 flussence time to try the nuclear option, I guess
18:11 * flussence restarts apache2
18:12 joneskoo_ nope.
18:12 joneskoo_ looks like some frontend bug to me since it's working with http://try.rakudo.org/cmd?input=say%20%22hi%22 but not from the form
18:14 flussence oh, I wonder if running out of disk space might have something to do with it...
18:14 joneskoo_ could be :)
18:17 flussence that'd make sense, since Mojolicious probably dumps form-encoded requests into a temp file for parsing or something like that...
18:19 flussence Tene: your ~/.ccache on feather3 ate the disk. I'll have to rm it
18:20 flussence looks like that fixed it... once it stops timing out with all the disk thrashing going on :)
18:21 flussence there, fixed!
18:22 flussence .oO( 640k inodes should be enough for everybody... )
18:22 joneskoo_ I'm still getting timeouts
18:22 flussence refresh the page, if it does that once it tends to get confused
18:23 joneskoo_ curl -vvv http://try.rakudo.org/cmd?input=say%20%22hi%22  is also not getting a response in reasonable time
18:23 flussence hm, I see
18:24 flussence any better now?
18:24 PerlJam Is there a try-neicza page?  Could the machinery for try.rakudo.org be used for that as well?
18:24 PerlJam er, niecza even
18:24 PerlJam try.perl6.org  "please select an implementation"  :)
18:27 joneskoo_ it's better, though quite slow :)
18:27 Juerd flussence: This happened before. Could you please write a cronjob that purges old files in ~tene/.ccache?
18:28 joneskoo_ still hitting timeouts
18:28 joneskoo_ got it to work once on the browser already :p
18:30 flussence oh, I think it's dying of swap death now :(
18:31 PerlJam Juerd: Could you remind me of the differences between the various feathers?
18:33 flussence it's alive, for now. That machine isn't well built to cope with multiple instances of rakudo...
18:33 joneskoo_ rakudo is memory-hungry?
18:34 joneskoo_ I'm thinking it's not staying alive well.
18:35 joneskoo_ either it's dying on the command print "hi" or it's dying every time after my first successful command on the browser..
18:35 tadzik yeah, rakudo is... a bit memory hungry
18:35 [Coke] Is there a name for the process where you take something like "ñ" and get "n" out?
18:35 jnthn Asciification? ;)
18:35 joneskoo_ hmh.
18:35 flussence [Coke]: asciificat- :)
18:36 joneskoo_ [Coke]: decomposition is where you decompose n and ~
18:36 * [Coke] was hoping for something that sound more like he could make Oracle do it. ;)
18:36 joneskoo_ [Coke]: I don't know if there's a better name for decomposing and then stripping non-ascii :)
18:37 joneskoo_ diacritic removal?
18:38 PerlJam "character decomposition" sounds like something Oracle could do  ;)
18:38 joneskoo_ I think diacritics stripping is a pretty accurate name
18:38 daxim it's called butchering characters and everytime you do that, daxim kills a kitten
18:38 flussence joneskoo_: the rakudo that runs there takes about 32MB to start up, and each website visitor gets a separate instance (which eventually times out), but the server's very tight on RAM. We've had lots of problems keeping it working there :(
18:38 PerlJam (right after it does some character assassination)
18:38 daxim so please, think of the kittens
18:38 colomon Texas-ification
18:39 joneskoo_ flussence: ok and there's apparently nothing like a POE-like event based runner that could eval the code without huge startup cost?
18:39 joneskoo_ flussence: where is it running if 32 MB is such a large part of the memory?
18:40 PerlJam If rakudo were better at sandboxing, we could only have one instance running and only make a separate sandbox for each request
18:40 flussence the server's got about ¼GB total, I don't think it was ever intended for the kind of abuse we throw at it :)
18:40 joneskoo_ if apache is heavy, perhaps nginx could offer some memory savings - but on a low traffic site I'd imagine that the problem is not only the webserver. I don't know about the traffic numbers though
18:40 joneskoo_ ouch. :)
18:40 joneskoo_ perhaps you should get a amazon micro instance free or something? ;)
18:40 joneskoo_ I think they offer more memory than that
18:42 joneskoo_ 613 MB apparently for the micro
18:42 localhost joined #perl6
18:43 flussence I think the whole point of the persistence stuff was that rakudo used to take an ice age to start up. Maybe it'd be better just invoking it directly and throwing it away per-request...
18:44 joneskoo_ I haven't looked at perl6 much yet. read the book (big pdf), or skimmed it actually. I have used perl5 earlier.
18:45 joneskoo_ then I switched to python basically and now out of curiousity looked what's on the other side of the fence
18:45 vmspb joined #perl6
18:46 joneskoo_ the book did not really discuss unicode at all, which was a bit odd.
18:46 joneskoo_ I don't care about unicode operators - what about strings? is everything unicode by default like in py3k and what does the decoding look like?
18:46 flussence yep
18:47 joneskoo_ in perl5 I think it was somewhat painful
18:47 PerlJam joneskoo_: it's becoming less painful in perl 5
18:47 PerlJam joneskoo_: and yes, perl 6 is unicode everywhere out of the box
18:47 joneskoo_ oh, so perl5 is still alive and evolving, good.
18:47 flussence everything's unicode, if you want something else then you have to explicitly convert it to/from a Buf first
18:47 daxim side discussion:  trim in perl 6   https://plus.google.com/10572597​7711317285348/posts/ienzxqHJmRe
18:48 PerlJam yeah, perl 6 has long had trim
18:49 colomon I think it's been rewritten at least twice since Poe's version.
18:49 PerlJam easily
18:50 joneskoo_ PerlJam: do you have a link in memory to show how unicode works with perl5 now?
18:50 joneskoo_ I remember that some time in 2006 or so it involved some use open or some magic like that
18:51 PerlJam joneskoo_: I do not,  but it's been a topic of discussion on p5p lately.  troll the archives :)
18:51 wolverian joneskoo_: perldoc perlunitut
18:51 wolverian (http://perldoc.perl.org/perlunitut.html)
18:52 benabik Hm.  Trolling p5p… "Why isn't Perl 5 finished yet?  Why do you keep changing it?"
18:52 joneskoo_ wolverian: thanks for the link
18:52 wolverian you're welcome
18:52 PerlJam benabik: :)
18:53 Tene flussence, Juerd: I haven't even logged in since the last time that happened.  I have no idea why that's happening.  Please feel free to purge my account.
18:53 PerlJam joneskoo_: When the new Camel book comes out (next month?) there's a section on unicode in there too.
18:53 flussence Tene: might be a cronjob...
18:53 daxim benabik, I'm doing it for the lulz
18:53 joneskoo_ PerlJam: nice
18:53 joneskoo_ PerlJam: is camel book also the PDF I read earlier?
18:54 PerlJam joneskoo_: no.  camel book == Programming Perl
18:56 flussence Tene: I see the problem... your crontab already has a line to clean up .ccache, but only for month old files and it's also recompiling parrot 4 times an hour.
18:57 benabik In theory, not too many files should change in Parrot in only 15 minutes.
18:57 joneskoo_ PerlJam: ah. the one I have about perl5 on my shelf
18:57 PerlJam joneskoo_: aye.  There's a new edition coming soon (Dec or Jan or so)
18:59 flussence ok, I'll change that to 1 compile an hour and purge 7 day old files. Since the last time we ran out of disk space was more than a week ago, that should do it :)
19:01 joneskoo_ hmh. everything unicode by default and regexp.. instantly brings to my mind locales :(
19:01 joneskoo_ I'll keep reading
19:04 joneskoo_ hmh. try.rakudo.org really needs an IDLE like editor with history for repeating old commands
19:06 sorear good * #perl6
19:06 colomon \o
19:08 rindolf sorear: hi.
19:08 joneskoo_ hmh, is there something like dir() in python?
19:08 joneskoo_ it's quite useful in an interactive prompt
19:09 sorear o/ rindolf
19:09 rindolf sorear: what's up?
19:10 Tene flussence: oh, right, I vaguely remember running an evalbot there...
19:11 rindolf joneskoo_: what does dir() do?
19:11 flussence rakudo: say [1, 2, 3].perl
19:11 p6eval rakudo a0e51a: OUTPUT«[1, 2, 3]␤»
19:12 flussence something like that :)
19:12 joneskoo_ >>> [x for x in dir("foo") if not '_' in x]
19:12 joneskoo_ ['capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
19:12 joneskoo_ so dir lists the methods (and attributes?) of an object
19:12 flussence rakudo: my $a = Int.^methods(:local); say $a.perl
19:13 p6eval rakudo a0e51a: OUTPUT«(Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new(), Method.new())␤»
19:13 flussence bah
19:13 flussence rakudo: my $a = Int.^methods(:local)».name; say $a.perl
19:13 p6eval rakudo a0e51a: OUTPUT«("Int", "Num", "Rat", "abs", "Bridge", "chr", "succ", "pred", "sqrt", "base", "perl", "Bool", "Str")␤»
19:13 joneskoo_ ok so no shorthand in the language then I guess
19:13 Tene flussence: I don't even see 'evalbot' joined to the channel, so as far as I know, that parrot checkout isn't used by anything.  I'd prefer for you to just kill it.
19:13 flussence righto.
19:20 [Coke] email visible.
19:21 [Coke] tadzik++
19:27 Woodi what CPU is on feather(s) ?
19:28 sorear sorear@feather:~$ cat /proc/cpuinfo | grep model\ name
19:28 sorear model name      : QEMU Virtual CPU version 0.12.5
19:28 sorear looks like a vm
19:29 sorear Juerd might know details of the hosting setup
19:29 sorear rindolf: busy IRL.  Not a lot of tuits for p6 hacking :(
19:29 rindolf sorear: ah.
19:29 Woodi hard to compare that with anything :)
19:30 Woodi sorear: do you plan Niecza distributions like Rakudo Star ?
19:30 sorear it identifies MHz = 3006, cache size = 4096 KB, if that means anything at all
19:31 sorear `arch` => x86_64
19:31 flussence sounds fairly new and high end
19:31 sorear _shrug_ it's a professionally run server, iirc donated by Juerd's employer
19:32 sorear Woodi: I haven't really thought about it much.  I also don't know very much about Rakudo Star
19:32 Woodi we can donate some RAM to :)
19:33 sorear Woodi: the niecza binary releases are designed to work if you unzip them anywhere on any platform and run Niecza.exe, although there are currently LF/CRLF issues
19:35 Woodi 'distribution' sugests core + something other
19:36 sorear my understandaing of R* was that it existed mostly to sidestep the pain of installing Parrot on random systems
19:36 sorear but looking at tadzik's last mailing seems not quite so
19:39 mkramer joined #perl6
19:39 Woodi no idea what was cause but i think obout it as 'moust stable' release in that period of time, good for 'general' using and putting into Linux distros...
19:41 Woodi sorear: I do not sugest anything close to month releases but one per year would be nice :)
19:42 masak Woodi: not sure I see what need you're trying to meet here...
19:42 dalek nqp: 87bb1c3 | jnthn++ | src/ (2 files):
19:42 dalek nqp: In a token foo { <bar>+ }, the captures would not be stored. This was due to a bad interaction between :r and the cstack; the bstack contains the current cstack index we're at, but we don't grow the bstack when :r is on. We thus lost the count of captures, popping the entire cstack. This adds an extra bstack frame when :r is on to keep such counts, fixing the issue.
19:42 dalek nqp: review: https://github.com/perl6/nqp/commit/87bb1c3b6e
19:43 Woodi masak: probably marketing something only. but such things sometimes helps in perspective
19:44 pyrimidine left #perl6
19:44 masak Woodi: sorear is making an admirable job putting out a release each month, fixing bugs as he goes. so far, he's not running up any significant bug queue or technical debt. a "most stable" release would just be... another monthly release.
19:44 masak oh, marketing is important, I agree.
19:45 masak but I see the visibility thing being solved already by the monthly release announcements.
19:46 masak if it were up to me, the thing I'd choose to make sorear more visible would be to get an RSS/Atom feed. :)
19:46 mkramer1 joined #perl6
19:46 masak some people are mailoids, others are more feedly.
19:48 Woodi I didn't know about monthly Niecza... but, by analogy to *, i see Niecza as compiler. so i wonder about distribution... maybe not needed, just asking
19:48 mkramer joined #perl6
19:50 masak :)
19:51 masak Woodi: I'd recommend subscribing to perl6-compiler at http://dev.perl.org/perl6/lists/
19:51 Woodi and about Rakudo Star on nom - how complete Perl6 it will me in Dec(+1)?
19:52 Woodi masak: will check this
19:52 masak Woodi: when you're asking that question, what's the unit you expect the answer to be in?
19:53 masak or, more exactly, is there any particular Perl 6 feature that you'd like to see sooner than other features? I'm sure we can arrange something ;)
19:54 Woodi masak: no priv business now this time :)
19:55 Woodi and about feature: i would like 100% :)
19:56 Woodi and would like to hear "more complete then not" :)
19:56 pyrimidine joined #perl6
19:57 masak Woodi: Pugs, Rakudo, *and* Niecza are "more complete than not".
19:57 mkramer joined #perl6
19:57 masak Pugs keeps bitrotting steadily, but it's still quite impressive, (almost) seven years later.
19:58 Woodi masak: you sponsor my perl6 depression :)
19:58 masak not intentionally. Woodi, why are you depressed, and how did I unintentionally make it worse?
19:58 Woodi but: autoritative >50% is realy nice marketing thing :)
19:59 mkramer left #perl6
19:59 sftp_ joined #perl6
19:59 masak here's the thing: the Big Three can do *a lot*. but that's not what the general populace are looking for. they want polish, a product that's been tried and used so that all bugs have been shaken out.
20:00 Woodi masak: by making words that should sounds possitive sound military-realistic :)
20:00 masak they want excellent documentation, spot-on tutorials, fantastic blog posts, a thriving community.
20:00 masak Woodi: I'm all for realism. feel free to close your eyes and imagine ponies cotton candy, if that makes you feel better. :P
20:02 masak s/ponies/ponies and/
20:02 joneskoo_ left #perl6
20:02 Woodi realism is probably from other category then optimism and pessimism :)
20:03 sorear what _I_ want to see in Perl 6 is efficiency, efficiency, efficiency
20:03 masak yeah!
20:03 colomon sorear++
20:04 sorear Perl 6 can run decently fast now, but Perl 5 - starts within the measurement error of time(1) (0.008s, 0.004s or 0.000s user time?)
20:04 sorear - parses close to 1000x faster than any current Perl6 implementation
20:04 TimToady for various bad reasons :)
20:04 sorear - uses <1MB, compared to 20-100MB for current Perl 6 implementations
20:05 sorear you'd be insane to try and write a cgi script in perl 6, for instance.  (This is independant of the fact that you'd be somewhat insane to use CGI at all in 2011)
20:06 TimToady the obvious solution on anything that runs many times is precompilation of some sort
20:06 masak sorear: hi. I wrote CGI in Perl 6 back in 2008 ;)
20:07 TimToady but basically P5 cheats all over the place, and only parses a single, not-terribly-extensible, language
20:07 masak (and yes, it was slow)
20:07 sorear and perl5, as cool as it is, is not the state of the art in dynamic language VMs anymore.  the massive inflexibility of the perl5 system has left it stuck in the era when bytecode was just starting to be popular
20:08 sorear Perl 6 needs to have implementations that can compete with LuaJIT and YARV
20:08 sorear masak: Have I ever called you sane? :P
20:08 TimToady we don't expect our C and C++ programs to recompile every time they run
20:08 colomon sorear++  ;)
20:08 * masak bows, flattered
20:09 benabik FCGI can ameliorate some of the startup pain for scripts.
20:09 masak TimToady: I expressed some confusion about Real in the backlog, starting at http://irclog.perlgeek.de/​perl6/2011-11-18#i_4724224
20:10 masak TimToady: when you have time, it would be nice to be set straight about that.
20:10 TimToady Real is basically orderable, and Numeric does not guarantee that
20:10 TimToady not confusing orderable with sortable here...
20:11 sorear ordered fields...
20:11 TimToady Real is ordered naturally, Numeric can be ordered only when you're desperate not to blow up :)
20:12 TimToady don't ask me where Surreal fits in there...
20:12 masak Surreal is not a total order.
20:13 sorear it doesn't, Surreal !~~ Countable
20:13 sorear :(
20:13 TimToady Real !~~ Countable
20:13 Woodi benabik: how Perl6 implementation can start to aim to be the best platform for FCGI ? :)
20:14 masak TimToady: S32 (and Rakudo) treats Real not as "orderable" but as "a real (non-complex) number"
20:14 TimToady sure, orderable is just one part of real
20:15 TimToady I was just giving examples of the difference
20:15 masak aha.
20:15 sorear This is the part where I go, "But what are the use cases?"
20:15 TimToady however, a computer cannot adequately represent real numbers, so Real actually allows approximations
20:15 ksi joined #perl6
20:16 masak TimToady: was there any particular reason Instant was marked up as doing the Real role and not the Numeric role?
20:16 masak more to the point, does Real imply Numeric?
20:16 TimToady yes, it does, as far as I'm concerned
20:16 masak ok.
20:17 TimToady how could reals not be numeric?
20:17 benabik Woodi: Probably robust signal and socket handling.  Threading is nice, but you can just run multiple FCGI servers instead.
20:17 geekosaur don;t give them ideas :)
20:17 sorear o/ geekosaur
20:17 TimToady Instant is Real in the sense of a number line that you don't care where 0 is
20:18 TimToady it does, however, have a basic unit of 1 second
20:18 masak TimToady: I had a fanciful notion of Instants doing some orderable but not being part of the number system. I was wrong.
20:19 sorear well, to be part of a ring you need a zero element and a well-defined multiplication
20:19 masak TimToady: I'm not sure I like Instant pretending to be on the real number line. just as I wouldn't like degrees expressed in Kelvin to pretend to be simple real numbers.
20:19 colomon sorear: well-defined addition as well, no?
20:19 masak TimToady: just because things are unitless doesn't mean they're ordinary numbers.
20:19 sorear colomon: that falls out from having a zero element
20:19 TimToady well, it's more that it has to behave linearly and divisibly
20:19 sorear colomon: affine space + zero = vector space
20:21 TimToady Instant is more like a dimension
20:21 mj41 joined #perl6
20:21 TimToady physics doesn't care where you set the 0 point
20:22 TimToady it does care that vectors sum correctly
20:24 TimToady Instants don't care where the epoch is, but they do care that adding a Duration twice puts you twice as far away in Instant space
20:25 masak I'm with sorear on this one. what does Instant ~~ Real mean, practically, in terms of use cases?
20:25 TimToady I don't really care if they're Real, as long as they work right
20:25 sftp_ joined #perl6
20:28 sorear masak: practically, it means being able to write ($t1 + $t2) / 2 and have it DWIM
20:29 sorear having Durations be full-fledged Reals means you can write sqrt [+] (@instants »-» $mean) »**» 2 and have _that_ DWIM
20:29 TimToady except you can't add two instants without a 0, but you can subtract them
20:30 TimToady the average of two instants is $t1 + ($t2 - $t1) / 2
20:31 TimToady which is adding a duration to an instant, not adding two instants
20:31 colomon TimToady: are you saying that (if $t1 and $t2 are Instants), you cannot say ($t1 + $t2) / 2  ?
20:31 TimToady correct
20:31 masak and yet they're Real.
20:31 IngisKahn joined #perl6
20:32 TimToady I DON'T CARE IF THEY'RE REAL
20:32 masak oh, ok.
20:32 [Coke] Presumably addition is overriden for Instants.
20:32 TimToady as long as they behave right
20:32 masak I say they shouldn't be Real.
20:33 sorear Q: Why can't I say ($t1 + $t2) / 2  A: Because of the Pugs legacy and the Haskell philosophy of forbidding nonsensical sub-expressions.  ($t1 + $t2) / 2 may be meaningful, but ($t1 + $t2) is nonsensical.
20:33 TimToady they are naturally orderable though
20:33 TimToady um, this goes way back before Haskell and Pugs where ever thought of
20:33 TimToady for me this is straight out of Ada
20:33 [Coke] "I miss Modula-3"
20:34 sorear oh.
20:34 TimToady and dimensional analysis from undergrad physics
20:34 [Coke] wait, YOUR undergrad physics? ;)
20:34 TimToady nodnod
20:34 TimToady back when we still used slide rules, mostly, unless you were rich
20:35 masak ($t1 + $t2) isn't so much nonsensical as undefined.
20:35 TimToady something's flying out your nose
20:35 colomon it does seem kind of like Instant shouldn't be Real, but should have a Real internally and a whole slew of methods / operators which just work on the reals internally.  That feels ugly, though.
20:36 [Coke] I'm still waiting for my list of "what Real means." ;)
20:36 sorear $t1 + $t2 should refer to an Instant 13.7 billion years in the future, or about 2**60 seconds.  Also it reduces all values to 3 significicant digits.
20:36 TimToady well, maybe we need a generic type that works like a dimension in physics, with all the appropriate symmetries
20:36 masak if Instant wants to disallow a bunch of arith, it definitely shouldn't be Real.
20:36 [Coke] (though to be fair I didn't follow everything since TT came back.)
20:37 masak [Coke]: I read that as s/everything/anything/ :P
20:37 sorear == masak
20:38 colomon TimToady: I was leaning towards the dimension idea earlier, but it does seem awfully fiddly for a core class.
20:38 masak yeah. could be awesome as a module, though.
20:38 colomon oh, absolutely, we should have it as a module
20:38 masak use Units;
20:38 colomon but that leaves Instant in a hard place.
20:39 sorear "does 'use Units' default to 'use Units :MKS' ?"
20:39 TimToady standard generic math should not be in modules if it means the same thing everywhere
20:40 masak my $distance = 42\ km; my $duration = 2\ h; say $distance / $duration; # 21 km/h
20:40 sorear perl6: say 42i
20:40 p6eval niecza v11-24-gcdd4e66: OUTPUT«0+42i␤»
20:40 p6eval ..pugs b927740, rakudo a0e51a: OUTPUT«0 + 42i␤»
20:41 sorear masak: you don't need the unspace for literals.
20:41 TimToady and last I checked, a kilometer was the same thing everywhere
20:41 masak sorear: no, but I liked a bit of space there.
20:41 [Coke] relatively speaking.
20:41 masak sorear: plus it scales better for multiple units.
20:42 colomon prior art?
20:42 sorear masak: what syntax would you like for, say, wavenumbers?  3200 cm^-1
20:42 sorear I was going to say s^-1 but I guess we'd have "Hz" for that
20:43 [Coke] Ugh. All this talk of units hertz.
20:43 TimToady cm⁻¹  is available :)
20:43 colomon I think I'm strongly against having unit abbreviations as part of the language by default
20:44 masak yeah, bloat warning.
20:44 [Coke] Aye.
20:44 masak though it's been discussed before.
20:44 masak ON P6L! BWHAHAHA
20:44 TimToady it should at least be easy to get to though
20:44 masak use Units;
20:44 TimToady or units
20:45 sorear if we don't want this in a module, we could have it in the setting so you use 'import Units' :)
20:46 sorear .u ⁻¹
20:46 phenny U+207B SUPERSCRIPT MINUS (⁻)
20:46 phenny U+00B9 SUPERSCRIPT ONE (¹)
20:46 colomon (just so it's clear -- I'm okay with the idea of have a dimensional object type in core, it's just having all the abbreviations there too that strikes me as too much clutter.)
20:47 TimToady well, natural languages have large lexicons, so it's not something I fear much in a language where anything is overrideable locally
20:47 TimToady p6 is designed to allow a large lexicon in the setting, if we decide that's okay
20:48 sorear colomon: you don't want lots of abbreviations in CORE::.keys, you mean?
20:48 sorear perl6: say CORE::.keys # wondering if nom or pugs can do this yet
20:48 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "CORE"␤    expecting bare or pointy block construct, ":", "=>" or operator␤    at /tmp/rAlTSxJTDp line 1, column 5␤»
20:48 p6eval ..rakudo a0e51a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&CORE' called (line 1)␤»
20:48 p6eval ..niecza v11-24-gcdd4e66: OUTPUT«0␤»
20:48 colomon sorear: I'm not 100% sure what CORE::.keys is, but that sounds like what I'm trying to say, yes.  :)
20:49 thou joined #perl6
20:49 sorear CORE:: is a hash-like object representing the standard namespace
20:50 sorear niecza: (CORE::){'&say'}("hi")
20:50 p6eval niecza v11-24-gcdd4e66: OUTPUT«hi␤»
20:51 cbk1090 Hi all.  quick grammar question...  Is "token remarks { \T* [ <item> ]? }" the right way to find <item> zero or more times within <remarks> ?
20:51 masak colomon: I don't think the risk of clutter is that big. postfixes tend to stay out of the way, since they're not confusable with any other grammatical class.
20:51 masak cbk1090: that [] looks redundant.
20:51 pmurias joined #perl6
20:51 sorear cbk1090: no
20:52 sorear cbk1090: ? is 0 or 1, + is 1 or more, * is 0 or more
20:52 TimToady masak: well, except that these postfixes could be construed as type coercions, which maybe means they live in typename space
20:52 sftp joined #perl6
20:52 colomon masak: but there are dozens of units out there.  I just don't like the implication that they all have a default place in the language's keyword space.
20:53 colomon CORE::.keys  :)
20:53 TimToady colomon: I suggest you avoid dictionaires.  :)
20:53 sorear cbk1090: also, \T* looks dubious there
20:53 masak colomon: me neither. but not because of clutter. postfixes don't clutter much.
20:53 sorear cbk1090: \T* will gobble up all non-tab characters, which seems lke not what you want
20:54 TimToady units are more like instantiations of generic types
20:55 sorear TimToady: this reminds me.  Kahan says that the only correct way to do complex numbers is to have an Imaginary type, because the doublet nature of 0+1i and -0+1i messes up various algorithms.  Opinions?
20:55 cbk1090 sorear, the \T* works for me: http://pastebin.com/vCaBC5PB
20:55 * TimToady admires math in its various forms, but does not profess to be a mathematician  :)
20:56 cbk1090 $text as an example line of input.
20:56 colomon masak: for instance, I've muttered before about adding postfix F or R or something to the language to mean "FatRat".  Should I really need to be checking against http://physics.nist.gov/cuu/Units/units.html to make sure there's no conflict there?  F is Farad,  but it looks like R might be safe...
20:57 sorear cbk1090: the '# NOT WORKING' is what I mean
20:57 sorear cbk1090: <item> doesn't match anything because all the non-tabs were already eaten by \T*
20:57 TimToady sorear: I guess the question would be what the Imaginary api offers that such algorithms would be written in, if not in terms of the real and imaginary parts?
20:57 sorear colomon: No
20:58 tyatpi_ joined #perl6
20:58 sorear colomon: If you add postfix:<F> to your program, it will shadow postfix:<F> in the setting
20:58 TimToady and why the Complex api can't offer the Imaginary api as a subset?
20:58 colomon sorear: yes, but I'd like to add postfix:<F> (or something) to the setting
20:59 cbk1090 sorear, So I go rewrite my Grammar now... :-(
20:59 TimToady colomon: or how 'bout ℉
21:00 [Coke] .u ℉
21:00 phenny U+2109 DEGREE FAHRENHEIT (℉)
21:00 [Coke] (big ole box here.)
21:00 TimToady you need a boxer rebellion, I guess
21:00 sorear cbk1090: another issue is that your <item> cannot match 'KEY: someValue,' because you didn't include anything that can match a space
21:01 sorear cbk1090: token remarks { [ <item> || \T ]* } would work
21:01 cbk1090 I did have an \s in there but took it out to test some different things.
21:01 [Coke] whoa, the literal xlation was something like "Righteous Fists of Harmony". BOOYAH.
21:02 cbk1090 sorear, let me try that...
21:04 sorear colomon: point taken re. congestion in CORE itself.  We need to make sure CORE defines only one &postfix:<F>
21:04 thou_ joined #perl6
21:04 colomon sorear: defines at most one &postfix:<F>.   :)
21:05 sorear .u DEGREE RANKINE
21:05 phenny sorear: Sorry, no results for 'DEGREE RANKINE'.
21:10 sorear we certainly need selectivity, which I think is a large argument for 'use Units :MKS'
21:10 sorear R would also go to the degree Rankine and to the Röntgen
21:11 [Coke] We must support beard-seconds.
21:17 * [Coke] kills the convo!
21:17 colomon "The symbol for degrees Rankine is R[1] (or Ra if necessary to distinguish it from the Rømer and Réaumur scales)."
21:19 cbk1090 sorear, I get an error now: too many positional arguments: 2 passed, 1 expected. I think it is when it matches an <item>...?
21:19 cbk1090 I have updated the code: http://pastebin.com/vrMZmB9v
21:21 masak [Coke]: you just can't improve on beard-seconds! :)
21:27 y3llow_ joined #perl6
21:27 pothos_ joined #perl6
21:33 dalek nqp: 2c0f695 | jnthn++ | src/QAST/Compiler.nqp:
21:33 dalek nqp: Fix fail in setting the cursor variable.
21:33 dalek nqp: review: https://github.com/perl6/nqp/commit/2c0f695a12
21:33 dalek nqp: f599448 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
21:33 dalek nqp: Avoid name leakage that led to action methods get invoked at weird times.
21:33 dalek nqp: review: https://github.com/perl6/nqp/commit/f599448568
21:39 jnthn tadzik, moritz: JSON::Grammar works, JSON::Actions almost does; one small issue left with actions for [] and {} (e.g. empty ones), which I'll track down. But otherwise, it seems to work. :)
21:40 ksi joined #perl6
21:40 PerlJam jnthn++
21:40 dalek rakudo/nom: 472ec45 | jnthn++ | tools/build/NQP_REVISION:
21:40 dalek rakudo/nom: Get NQP revision with fixes that make JSON::Tiny mostly work.
21:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/472ec45897
21:41 PerlJam jnthn: Are there tests that exercise these issues?
21:43 jnthn PerlJam: The ones I fixed today?
21:43 jnthn PerlJam: Well, I turned on the tests for ~
21:44 jnthn PerlJam: Need to hunt down or write tests for some of the others
21:44 jnthn I suspect we have some before tests.
21:44 jnthn And yes, JSON::Tiny has tests :)
21:44 PerlJam heh
21:45 masak tiny tests.
21:45 jnthn std: my regex fishy2 { $not_really_a_mammal = (.*)shark };
21:45 p6eval std be1f10e: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $not_really_a_mammal is not predeclared at /tmp/VGlc2eZTfR line 1:�------> [32mmy regex fishy2 { [33m�[31m$not_really_a_mammal = (.*)shark };[0m�Check failed�FAILED 00:01 122m�»
21:46 jnthn Thought that was wrong.
21:46 jnthn Test file I am disappoint.
21:47 TimToady std: my $not_really_a_mammal; my regex fishy2 { $not_really_a_mammal = (.*)shark };
21:47 p6eval std be1f10e: OUTPUT«ok 00:01 122m␤»
21:47 TimToady std: my regex fishy2 { :my $not_really_a_mammal; $not_really_a_mammal = (.*)shark };
21:47 p6eval std be1f10e: OUTPUT«ok 00:01 122m␤»
21:49 PerlJam does  my regex fooey { :my $foo = (.*) }  not work?
21:49 TimToady it does not
21:49 sorear cbk1090: *shrug* I don't see the issuew
21:49 jnthn TimToady: The test was expecting it to be a named capture
21:49 sorear cbk1090: but I don't really think grammars are the best way to approach this
21:50 TimToady jnthn: nodnod
21:50 sorear cbk1090: grammars are great for bottom-up languages, where a field is defined by what it can contain
21:50 sorear cbk1090: you've got a top-down language - fields are delimited by tabs
21:51 sorear cbk1090: something more like my ($stardate,$topic,$remarks) = $text.split('\t') would probably work better
21:52 sorear cbk1090: also, $remarks.comb(/(\w+) \: \s* (\w+) \,/, :match)
21:52 sorear my ($y,$m,$d,$h,$m,$s) = $stardate.comb(/\d+/)
21:53 sorear TimToady: is comb a P6 innovation?
21:54 sorear (I know P5 doesn't have it, but you might've stolen it from Ruby or SNOBOL or something)
21:54 dalek roast: 65eb2c3 | jnthn++ | S05-capture/named.t:
21:54 dalek roast: Correct some capturing syntax.
21:54 dalek roast: review: https://github.com/perl6/roast/commit/65eb2c354f
21:54 dalek roast: 007a6b7 | jnthn++ | S05-metasyntax/lookaround.t:
21:54 dalek roast: Fudge lookaround tests; we don't have after yet, but should test before.
21:54 dalek roast: review: https://github.com/perl6/roast/commit/007a6b760c
21:55 dalek rakudo/nom: c732039 | jnthn++ | t/spectest.data:
21:55 dalek rakudo/nom: Turn on a couple of tests.
21:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c732039bca
21:55 TimToady it's p6
21:55 TimToady but its inspiration is perhaps the figure/ground discussions in GEB:EGB
21:56 masak I wonder if there are any other such figure/ground pairs of which we have only one half in the language :)
21:57 TimToady well, we can't just return the trimmed whitespace :)
21:57 PerlJam p5 had the other half ... it just used @stuff = /.../g
21:58 PerlJam (as the dual to split)
21:58 TimToady PerlJam++ is correct on that
21:58 masak did we ever figure out how to make Perl 6 do that?
21:58 TimToady the difference being that m//g won't default
21:58 cbk1090 sorear, Thanks.  I try that when I get back. Have to walk the dog now :-)
21:58 TimToady at least, not the way p6 does
21:59 jnthn is($/[0], substr($str,1,-1), 'Correctly captured 1');
21:59 jnthn hmm...we don't do negative args to substr any more, do we?
22:00 masak TimToady: does the $offset parameter in .splice accept whatever-y things like *-1 ?
22:00 masak spec doesn't say.
22:01 sorear jnthn: substr takes *-1 now
22:01 sorear and <3 GEB:EGB
22:02 jnthn sorear: I wondered if that was the case but don't see any mention of it in S32.
22:02 jnthn Found the bit where it says negatives are fail though.
22:02 jnthn missed that in the first read through
22:02 masak perl6: my @a = 1, 2, 3; @a.splice(-2, 1, 42); say @a.perl
22:02 p6eval pugs b927740: OUTPUT«[1, 42, 3]␤»
22:02 p6eval ..niecza v11-24-gcdd4e66: OUTPUT«Unhandled exception: Unable to resolve method splice in class Array␤  at /tmp/IcHQtewzF1 line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ 58) ␤  at /ho…
22:02 p6eval ..rakudo a0e51a: OUTPUT«Array.new(1, 42, 3)␤»
22:02 jnthn oh
22:02 jnthn duh, I missed the other thing too :)
22:02 masak perl6: my @a = 1, 2, 3; @a.splice(* - 2, 1, 42); say @a.perl
22:02 p6eval niecza v11-24-gcdd4e66: OUTPUT«Unhandled exception: Unable to resolve method splice in class Array␤  at /tmp/JzamAtGf56 line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ 58) ␤  at /ho…
22:02 p6eval ..pugs b927740: OUTPUT«[42, 2, 3]␤»
22:02 p6eval ..rakudo a0e51a: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:614␤  in sub infix:<<> at src/gen/CORE.setting:2032␤  in method splice at src/gen/CORE.setting:4402␤  in block <anon> at…
22:03 masak I think .splice should accept whatever-y things and not negative numbers, in line with array indexes and .substr
22:03 jnthn masak: Makes sense at first blush.
22:04 TimToady that is the intent
22:05 masak it's not spec'd.
22:05 masak at all.
22:05 masak not even the negative number semantics is spec'd. but I guess that inherits by default from Perl 5.
22:08 masak I'll make a deal: if someone else specs it, I'll submit an RT ticket ;)
22:08 PerlJam S32-setting-library/Str.pod line 534
22:09 PerlJam Would S32/Str.pod:534 link properly?  /me looks
22:10 PerlJam nope. bummer
22:11 PerlJam oh, splice ... /me was still thinking substr
22:11 masak now you have some inspiration for spec'ing splice ;)
22:11 PerlJam but wrt substr, does it need another signature for the WhateverCode args?
22:12 sorear funny that splice has managed to slip through the cracks for so long
22:12 sorear in niecza
22:12 masak sorear: should be relatively LHF, no?
22:13 sorear masak: relatively, sure.  It does want C# coding for the copy loop
22:14 PerlJam masak: looks specced already.
22:14 TimToady note that p5 optimized splice to figure out which end of the array to copy :)
22:14 * sorear ponders some kind of arrayCopy in Perl 6
22:14 PerlJam "... Either of offset or size may be specified relative to the end of the array using a WhateverCode whose argument will be the position of the end of the array. ..."
22:15 TimToady but p5 can do that because the offset to element 0 is independent of the memory pointer
22:16 TimToady PerlJam: I almost remember doing that, but was too lazy to change the synopsis
22:17 masak PerlJam: oh!
22:17 masak missed that.
22:17 * masak submits rakudobug
22:17 masak rakudo: my @a = 1, 2, 3; @a.splice(-2, 1, 42); say @a.perl # should fail
22:17 p6eval rakudo a0e51a: OUTPUT«Array.new(1, 42, 3)␤»
22:18 masak PerlJam++
22:19 sorear TimToady: niecza does that too, and I've gotten the impression it's on the agenda for Rakudo too - having shift(@array) not be O(1) is slightly insane
22:19 masak rakudo: my @a = 1, 2, 3; @a.splice(*-2, 1, 42); say @a.perl # should work
22:19 p6eval rakudo a0e51a: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤  in method Numeric at src/gen/CORE.setting:614␤  in sub infix:<<> at src/gen/CORE.setting:2032␤  in method splice at src/gen/CORE.setting:4402␤  in block <anon> at…
22:19 dalek roast: 32590b6 | jnthn++ | S05-match/non-capturing.t:
22:19 dalek roast: Bring a test in line with the spec.
22:20 dalek roast: review: https://github.com/perl6/roast/commit/32590b6d86
22:20 PerlJam sorear: *slightly* insane?!?
22:20 jnthn It's O(1) in Rakudo...on an unevaluated list :P
22:22 sorear TimToady: niecza actually uses resizable circular buffers for this, so @array.push(@array.shift) while True; never has to reallocate @array :)
22:23 wooden joined #perl6
22:23 TimToady makes .rotate pretty easy too :)
22:23 wooden joined #perl6
22:23 masak um. `uniq` isn't spec'd?
22:24 TimToady perl6: my @array = 'a' .. 'z'; say @array.rotate(13)
22:24 p6eval rakudo a0e51a: OUTPUT«n o p q r s t u v w x y z a b c d e f g h i j k l m␤»
22:24 p6eval ..niecza v11-24-gcdd4e66: OUTPUT«Unhandled exception: Unable to resolve method rotate in class Array␤  at /tmp/RKYxkQadXp line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ 58) ␤  at /ho…
22:24 p6eval ..pugs b927740: OUTPUT«*** No such method in class Array: "&rotate"␤    at /tmp/NDY0YB4TPk line 1, column 29 - line 2, column 1␤»
22:24 dalek rakudo/nom: cf8c0e1 | jnthn++ | src/core/Str.pm:
22:24 dalek rakudo/nom: Make substr handle *-1 style third arg.
22:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf8c0e1e69
22:24 [Coke] oh, and can we call it unique if it is? ;)
22:24 TimToady why?
22:24 * PerlJam preferes uniq
22:24 PerlJam er, perfers
22:24 PerlJam gah!
22:24 masak I prefer `uniq`, too.
22:24 dalek rakudo/nom: 5d5940c | jnthn++ | t/spectest.data:
22:24 dalek rakudo/nom: Turn on non-capturing.t.
22:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d5940c690
22:24 PerlJam prefers even
22:25 masak could we spec it and have it have a :$by parameter, just like .min and .sort ?
22:26 PerlJam I could have sworn that uniq was specced at one time.
22:26 TimToady .sort should also have a :uniq option, probably, since some sorting algos can do both more efficiently together
22:26 masak +1
22:26 masak but don't throw out .uniq :)
22:26 TimToady if the algorithm can delete one side of an equality
22:26 PerlJam TimToady: and a :uniq_by on sort too?
22:27 TimToady not necessary
22:27 sorear will .uniq work like uniq(1) or like Haskell's nub?  what is <a b a>.uniq?
22:27 TimToady perl6: say <a b a>.set
22:27 p6eval rakudo a0e51a: OUTPUT«Method 'set' not found for invocant of class 'Parcel'␤  in block <anon> at /tmp/3dDU0gJfc9:1␤  in <anon> at /tmp/3dDU0gJfc9:1␤»
22:27 p6eval ..niecza v11-24-gcdd4e66: OUTPUT«Unhandled exception: Unable to resolve method set in class Parcel␤  at /tmp/Jo1iwdCnQh line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2224 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (module-CORE @ 58) ␤  at /home…
22:27 p6eval ..pugs b927740: OUTPUT«*** No such method in class Array: "&set"␤    at /tmp/36OFZ3yC9X line 1, column 5 - line 2, column 1␤»
22:28 TimToady perl6: say set(<a b a>)
22:28 p6eval niecza v11-24-gcdd4e66: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'set' used at line 1â�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 880 (die @ 2) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1139 (P6.comp_unit @ 32) â�¤  at /home…
22:28 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&set"␤    at /tmp/KnC5CgzX0W line 1, column 5 - line 2, column 1␤»
22:28 p6eval ..rakudo a0e51a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&set' called (line 1)␤»
22:28 TimToady b: say set(<a b a>)
22:28 p6eval b 1b7dd1: OUTPUT«ab␤»
22:28 TimToady knew it was there somewhere...
22:29 sorear TimToady: I'm wondering if Perl6 should have an operation that rearranges and/or elements between >=1 array
22:29 PerlJam Is set() specced?  :)
22:29 sorear TimToady: splice and rotate cannot be written in terms of each other but they both should be writable in terms of a single mangle() operator
22:29 sorear also, why does Pugs think method names have a & in front? o_O
22:30 masak sorear: because it's old.
22:30 masak sorear: methods used to be incestuous with subs.
22:30 sorear *rearranges and/or copies
22:30 masak there was this idea that every method also got exported into the global namespace.
22:31 sorear I've wondered why Perl 6 doesn't do that
22:31 masak it used to.
22:31 masak didn't work very well :)
22:31 sorear worked fine for CLOS.
22:32 TimToady PerlJam: yes, it is
22:33 sorear also *aaaa* I'm starting to imagine Perl 6 using finger trees for arrays, O(log N) splice (but also O(log N) indexing)
22:34 PerlJam TimToady: S02 acknowledges its existence, but that's as much of a spec as I've seen so far.
22:34 jnthn TimToady: Am I right to assume you expect natively typed arrays to also work lazily?
22:34 MayDaniel joined #perl6
22:34 jnthn TimToady: Or are they more primitive than that?
22:34 TimToady PerlJam: Sets themselves are defined in S32/Containers
22:35 TimToady from that it's pretty clear what a 'set listop or method' would do
22:36 Mowah_ joined #perl6
22:37 Moukeddar joined #perl6
22:38 TimToady doing sets right really needs hash keys with === semantics though
22:39 masak looking forward to that.
22:39 masak my current workaround for such things is to do %h{.WHICH}
22:39 jnthn oh yes, that was on my todo list too...
22:39 masak I just did that in a program.
22:39 TimToady historically this is one area where parrot made blatant P5ish assumptions
22:39 jnthn TimToady: I think it actually can do non-string keys; it's just not the default.
22:40 donaldh joined #perl6
22:40 TimToady well, one has to hook up the notion of identity to the hash function somehow
22:40 jnthn Or so is my memory last time I looked at implementing them...
22:40 jnthn *nod*
22:40 zby_home_ joined #perl6
22:41 benabik Parrot Hash PMC docs say you can use arbitrary objects for keys with a VTABLE for hashing.
22:41 TimToady okay, maybe I'm just confusing parrot with rakudo :)
22:41 benabik I have no idea how function that is, having never tried it.  :-D
22:41 TimToady certainly other parrot-targeted languages need object keys
22:41 benabik functional
22:42 TimToady jnthn: I would not expect native arrays to be lazy
22:43 diakopter <WHEW>
22:43 phenny diakopter: 10:02Z <jnthn> tell diakopter I fear https://github.com/perl6/nqp/commit/ec2f2a8fe3 may be too liberal...it may also catch normal code blocks, which should terminate LTM.
22:43 phenny diakopter: 10:04Z <jnthn> tell diakopter In https://github.com/perl6/nqp/commit/9dd7eab62c I think it's likely also not quite right - I think due to src/QAST/Compiler.nqp:396 that just dropping an extra node into the tree will cause mis-generated code; it'll pass an extra arg to the subrule?
22:43 phenny diakopter: 10:35Z <jnthn> tell diakopter actually, now I read more carefully, 9dd7eab62c is fine - QAST::Compiler only look into the first child after all.
22:43 phenny diakopter: 10:42Z <jnthn> tell diakopter ec2f2a8fe3 was a bit too liberal though; corrected that.
22:43 diakopter phenny: :)
22:43 jnthn TimToady: NICE!
22:44 jnthn TimToady: That...makes me happy ;)
22:44 TimToady native arrays have to be feedable directly to your GPU when you do hypers on them :)
22:44 jnthn yeah, I may need a bit longer to get the GPU stuff in :P
22:45 TimToady that's one of those places we're just trying to get close to for now
22:45 jnthn std: / a ** 1..10 % ',' /
22:45 p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
22:45 jnthn std: / a ** 1..10 %% ',' /
22:45 p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
22:45 jnthn Good, it parses 'em.
22:45 * TimToady recollects that sorear hacked 'em in last week or so
22:46 TimToady maybe he's hallucinatin'
22:46 TimToady STD doesn't actually use % yet itself...
22:47 jnthn TimToady: yeah, they're in there
22:47 sorear niecza's STD uses %.  however niecza doesn't quite support % in any case except a+ % b
22:47 jnthn Figuring I should get us to parse them...
22:48 sorear niecza's regex AST has actually always represented a ** b as a**1..* % b, but I guess there's an assumption somewhere that breaks %b when a can match 0 times
22:49 * TimToady is still thinking about the notion of restricting sigspace to only work immediately after actual matching atoms
22:49 sorear TimToady: ISTR that my %hash; # string keys; my %hash{*}; # object keys
22:50 sorear TimToady: also we haven't specced yet any way for classes to override hash code calcualtion, which will become... necessary.
22:50 TimToady well, my %hash{Any}
22:51 TimToady that should mostly fall out of .WHICH
22:51 TimToady if you have a value type
22:51 bluescreen10 joined #perl6
22:51 TimToady assuming .WHICH is itself hashable
22:52 jnthn TimToady: Is .WHICH just a method?
22:52 jnthn TimToady: Not macroesque like .HOW, .WHAT, etc?
22:52 * TimToady shrugs
22:54 diakopter sounds like a yes
23:07 dalek nqp: 879321b | jnthn++ | src/QRegex/P6Regex/ (2 files):
23:07 dalek nqp: First stab and % and %%.
23:07 dalek nqp: review: https://github.com/perl6/nqp/commit/879321be41
23:07 jnthn ...at...
23:07 jnthn grr
23:11 jnthn Hmm. nqpq can now parse its own actions :)
23:12 jnthn Aww. But not its own grammar yet.
23:22 pomysl joined #perl6
23:22 pomysl joined #perl6
23:24 whiteknight joined #perl6
23:28 cooper joined #perl6
23:28 jnthn OK, enough for today.
23:28 diakopter o/
23:29 dalek rakudo/nom: 43be3c4 | jnthn++ | tools/build/NQP_REVISION:
23:29 dalek rakudo/nom: Get % and %% support in regexes.
23:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43be3c4933
23:39 skangas joined #perl6
23:49 masak so, `list $x` isn't equivalent to `$x.list`, is it?
23:51 jnthn uh
23:51 jnthn don't think so
23:51 jnthn @$x is equivalent to $x.list
23:55 sorear list $x is probably closer to ($x,).list

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

Perl 6 | Reference Documentation | Rakudo