»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
jnthn 2 and 6 would need extra NFA building. I dunno how hard it'll be. 00:00
5 is probably just a bit more state tracking in run.
00:00 benabik_ left
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?
*leave
diakopter I suppose 00:03
jnthn Unless the NFA you get from the general approach is the same or just as good, of course...
diakopter has anyone else used {x,y} above 100?
jnthn has never seen it 00:04
diakopter jnthn: hm, zero-width is ... uh oh 00:14
how to .... zugh 00:15
00:20 japhb_ joined
japhb_ Not that I in any way mind the extra credit, but I got credited twice in the release announcement. ;-) 00:21
00:21 bluescreen10 left
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:22
jnthn japhb_: oops, I shoulda spotted that...but glad you see it as a positive ;-) 00:23
japhb_ jnthn, I guess two of my dominant personalities must have wanted credit of their own. ;-) 00:24
jnthn ;-)
00:24 snearch left
jnthn diakopter: As they're zero width, I wonder if they actually can influence the fate calculation anyway 00:25
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?
*we
I'm too tired to think that through properly. :)
But if we can do that with assertions in code, I suspect it holds for these ones too. 00:26
So it's probably just less optimial than we maybe could be
(e.g. we don't rule some possibilities out as early as we could)
diakopter hm 00:27
jnthn diakopter: A one character zero-width assertion is kinda like a special epsilon
Handling that would get us the <?[a]> style cases 00:28
(that is, if it matches we treat it like an epsilon; if not, we don't proceed)
diakopter nqpq takes 1 minute to rebuild after changing NFA.nqp. kindof a slow dev cycle 00:33
00:34 bluescreen10 joined
diakopter jnthn: should I commit in a branch or master 00:35
jnthn diakopter: Whichever you feel most comfortable doing. 00:38
00:38 mberends left
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
jnthn ...wow, I didn't even notice they were alphabetical! 00:40
Typical. I miss the pattern...in the code that's doing patten matching. :P
Feel free to shuffle it into place :) 00:41
Time for me to get a bit of rest
Should have plenty of Rakudo tuits tomorrow
Got one smallish thing to do in the morning first...then rest of day for Perl 6 :)
'night o/
diakopter o/
I don't see how Busted1 would fire on Grammar's termconj 00:48
there's no &
oh wait; lol 00:49
00:50 Chillance left
dalek p: ec2f2a8 | diakopter++ | src/QRegex/NFA.nqp:
skip non-declarative code when building NFAs
00:52
00:52 Lothbot is now known as Lothar 00:59 hypolin joined 01:10 tokuhirom left
japhb_ diakopter, did you mean to leave what appears to be a debugging 'nqp::say()' in that last commit? 01:14
01:46 flussence left 01:47 flussence joined 02:05 autin joined 02:14 am0c joined
dalek p: 9dd7eab | diakopter++ | src/QRegex/ (2 files):
make the NFA work with () captures
02:20
02:22 sivoais joined 02:24 lue left
diakopter japhb_: nope; thanks 02:24
dalek p: f5ad380 | diakopter++ | src/QRegex/NFA.nqp:
make NFA work with rxtype subcapture (= captures)
02:31
02:37 wknight8111 left 02:38 wolfman2000 joined 02:41 kaotikko joined
diakopter oh goody; Busted7 was fixed along with Busted1 02:47
japhb_ Is the output of a 'make spectest' saved anywhere automatically?
diakopter phenny: tell jnthn I fixed Busted1,3,4,7
phenny diakopter: I'll pass that on when jnthn is around.
diakopter japhb_: I don't know 02:48
japhb_ WBN if it did, but I suppose I can tee manually
Oooh, but it looks like 'make rakudo_test_run.tar.gz' might do the trick 02:50
diakopter phenny: tell jnthn and Busted8 02:51
phenny diakopter: I'll pass that on when jnthn is around.
02:57 vmspb left 02:59 benabik joined, Trashlord left 03:01 japhb_ left 03:03 Trashlord joined 03:07 cognominal left, cognominal joined
diakopter std: /<?foo>/ 03:09
p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
03:09 avar left 03:10 nine left, nine joined, LoRe left, avar joined 03:16 kaotikko left 03:23 sftp left, sftp joined 03:24 benabik left, benabik joined 03:29 satyavvd joined 03:36 bluescreen10 left 03:37 daniel-s joined 03:42 LoRe joined 03:49 bluescreen10 joined 04:02 jackfu joined 04:03 thowe joined
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
Did the band break up or something?
:(
But seriously, something big coming down the pipe?
Just curious... 04:05
04:05 DarthGandalf left
thowe Nothing but love for ya 04:05
04:05 jackfu left 04:06 molaf joined
PerlJam thowe: eh? 04:19
04:21 birdwindupbird joined
thowe Y no Rakudo in a long time? 04:21
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:22
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
thowe: are you talking about Rakudo Star?
04:24 DarthGandalf joined 04:28 mkramer joined
sorear good * #perl6 04:30
PerlJam greets sorear
sorear thowe: what do you mean? how long a time? 04:31
I've been releasing monthly :p
thowe Yes. I mean Rakudo star.
I didn't know there was something else for me to mean.
PerlJam thowe: There's a compiler release that happens monthly and a "distribution release" that happens roughly quarterly. 04:33
the distribution is called Rakudo Star
thowe oh
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:34
thowe I have access to nothing but OpenBSD boxes... I'll take a look. 04:35
PerlJam thowe: or you could try sorear's perl 6 implementation called niecza. 04:36
thowe are these the right instructions for that? rakudo.org/how-to-get-rakudo-nom/ 04:39
PerlJam looks about right 04:42
04:49 envi_ joined 05:31 worr joined 05:40 risou_awy is now known as risou 05:48 molaf left 05:52 buubot_backup left 05:53 risou is now known as risou_awy 06:12 buubot_backup joined 06:24 envi_ left 06:26 c1sung left 06:42 koban joined 06:43 cognominal left, cognominal joined 06:57 wtw joined 06:59 preflex left 07:01 preflex joined 07:24 lestrrat left 07:26 lestrrat joined 07:44 simcop2387 left 07:47 simcop2387 joined 08:05 aindilis` left, aindilis` joined 08:13 cxreg left 08:14 praful joined, cxreg joined 08:16 praful left 08:17 aindilis` left 08:54 mj41 joined 09:05 jrockway left 09:14 icwiener joined 09:20 nine left
masak morning, #perl6 09:21
tadzik morning masak
09:21 icwiener_ joined 09:22 icwiener left 09:28 risou_awy is now known as risou 09:29 icwiener joined 09:30 icwiener_ left 09:36 jrockway joined, am0c left 09:37 daxim joined
masak nom: .say for [\^^] <1 0 0 0 0> 09:38
p6eval nom ecc46f: OUTPUT«1␤1␤1␤1␤1␤»
masak anyone else got a Parrot release announcement email yet? I didn't. 09:39
tadzik I think I did 09:40
or maybe that was rss
masak ah, yes. it's in the feed. 09:41
09:42 mishin joined
jnthn morning, #perl6 09:50
phenny jnthn: 02:47Z <diakopter> tell jnthn I fixed Busted1,3,4,7
jnthn: 02:51Z <diakopter> tell jnthn and Busted8
jnthn \o/
tadzik: Did you send the perl6-compilers email after the release? I didn't see it... 09:51
masak morning, jnthn 09:54
jnthn o/ masak 09:55
09:56 the-golem joined
jnthn diakopter: I fear github.com/perl6/nqp/commit/ec2f2a8fe3 may be too liberal...it may also catch normal code blocks, which should terminate LTM. 09:57
phenny: tell diakopter I fear 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:03 hypolin left
jnthn phenny: tell diakopter In 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:17 autin left 10:19 risou is now known as risou_awy, risou_awy is now known as risou 10:30 plobsing_ left 10:34 mkramer left 10:35 cosimo left
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.
dalek p: 5523be6 | jnthn++ | src/QRegex/NFA.nqp:
Make sure we terminate LTM on imperative pastnode cases.
10:42
jnthn phenny: tell diakopter ec2f2a8fe3 was a bit too liberal though; corrected that.
phenny jnthn: I'll pass that on when diakopter is around.
10:51 passanger joined
passanger hi perl6 10:52
what is this operator ^^
i never seen it before
jnthn short-circuiting exclusive or 10:54
passanger thanks jnthn
jnthn passanger: There's more info in S03 10:55
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.
phenny jnthn: I'll pass that on when moritz is around.
passanger I'll read it , thanks 10:56
masak passanger: you know how || means "this OR that" and && means "this AND that"? 10:59
passanger: well, ^^ means "exactly ONE of this or that" 11:00
jnthn: s/imperative/procedural/, no? 11:01
passanger why ? 1 ^^ 1 got Nil
masak passanger: well, that's the correct truth value. remember the "exactly ONE" rule from above. :) 11:03
it's supposed to return Bool::False
passanger i see 11:04
jnthn masak: imperative is the opposite to declarative, no? 11:06
masak jnthn: the terminology in S05 is declarative/procedural.
jnthn S05 says many curious things :)
masak :)
jnthn Don't worry though, we only flag zerowidth and declarative in the code 11:07
masak nodnod
jnthn Imperative/procedural is inferred by lack of either of those :)
11:07 bluescreen10 left
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:07
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.
jnthn moritz: Oh!
moritz at least they did in b
jnthn moritz: Still, worth hardening, I guess.
Is it meant to throw by spec? 11:09
jnthn is going to try and put ~ back in today
moritz jnthn: TimToady never gave a clear answer to that. But if not, we'd have no way to access the error message
jnthn moritz: OK. I'll make it throw then :) 11:10
passanger hi moritz: what is "b"
11:10 mkramer joined
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.
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).
passanger moritz:where can i found it 11:12
jnthn Oh great, now I have two of you wanting different things :P
moritz masak: how would you propose to get the error message then? 11:13
masak moritz: anywhere on the Match is fine by me. 11:14
moritz masak: on which Match?
masak the one returned from the failed parse.
dalek ast: 08133b6 | jnthn++ | S05-grammar/protoregex.t:
Some more LTM tests for protoregexes.
moritz passanger: in the rakudo repository, type git checkout Beijing
masak: which one?
:-)
dalek kudo/nom: 81c23d2 | jnthn++ | src/Perl6/Actions.pm:
Mark :my declarations as declarative for the purposes of LTM.
11:15
kudo/nom: 2f44b37 | jnthn++ | tools/build/NQP_REVISION:
Bump to an NQP with various LTM improvements by diakopter++.
moritz problem is, the match usually fails ina subrule
and the Match for a failed subrule isn't even constructed usually
11:16 ggoebel joined
jnthn As another data point, STD is precedent for grammars throwing exceptions (see mass panic) 11:16
er, use of panic :)
masak fair point.
moritz and we need exceptions anyway, because it unwinds an arbitrary number of regex stack frames
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
I'd go with "no" for simplicity reasons for now
masak well, it could be argued that it should, because ~ is just supposed to be sugar.
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?
right
masak I'm now more OK with it than when I filed that RT ticket :)
moritz it's supposed to be sugar for something which contains something panicy 11:19
moritz handwaves towards S05
speaking of S05
iirc it tells pretty well what happens on zero-width assertions and LTM 11:20
masak yes. 11:21
cognominal I don't see the % operator in QRegex/P6Regex/Grammar.nqp
masak there's a whole little section on the declarative/procedural boundary.
moritz iirc it says that the assertion participates in LTM as if it was not zero-width, but ends the declarative prefix
masak cognominal: not sure QRegex has it yet.
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:23 the-golem is now known as the-golem_ 11:24 the-golem_ is now known as the-golem 11:27 satyavvd left
jnthn (assertions) will try and find that bit of S05; thanks 11:28
passanger masak: you are a good teacher! Hanks!! 11:29
11:30 passanger left
dalek p: 5a3575c | jnthn++ | src/QRegex/P6Regex/Actions.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
Woodi is somewhere Niecza Star distribution[*] ? :) 11:35
dalek p: 0b22858 | jnthn++ | src/QRegex/Cursor.nqp:
Basic FAILGOAL implementation so we at least get a bit better error.
11:41
11:41 the-golem is now known as the-golem_ 11:42 the-golem_ is now known as the-golem 11:45 prammer left
dalek kudo/nom: 4456cdd | jnthn++ | tools/build/NQP_REVISION:
Bump to NQP revision with goal matching syntax implemented.
11:46
11:48 domidumont left
dalek ast: 04961ff | jnthn++ | S05-metachars/tilde.t:
Unfudge a bunch of ~ tests for Rakudo.
11:49
11:52 domidumont joined
jnthn OK, that gets us a bit further with JSON::Tiny::Grammar. Next problem: whitespace. 11:53
colomon jnthn++ 11:54
jnthn oh, maybe...
nah, it's something in the string parsing. 11:57
11:58 mkramer left
masak Woodi: there hasn't been a Rakudo Star release in a while. latest one was 2011.07. 11:59
11:59 robinsmidsrod left
jnthn Next one will be 2011.12 :) 12:00
Woodi i wondered about Niecza :)
12:00 risou is now known as risou_awy
Woodi I use Debian-included Rakudo whitch is 2011.07 :) 12:01
12:01 prammer joined
daxim $ pugs --version | ack -o 'Version:(.*)' 12:01
Version: 6.2.13.20111008
12:06 robinsmidsrod joined 12:12 cosimo joined, Patterner left, Psyche^ joined, Psyche^ is now known as Patterner
masak Woodi: Niecza's version goes up to v11. 12:39
12:43 koban left 13:12 bluescreen10 joined 13:21 pat_js joined 13:36 mishin left
[Coke] Are we still needing to know how to increase nom's (parrot) recursion depth? 13:39
PIR: $P0 = getinterp ; $P0.'recursion_limit'(10000) 13:43
14:06 tyatpi_ joined 14:21 mtk left 14:23 _jaldhar left 14:25 mtk joined 14:27 wtw left
jnthn $other-task done, Perl 6 time again :) 14:27
[Coke] jnthn: YAY
jnthn aha 14:31
multiple reasons that string parsing is busted.
14:32 sayu joined, the-golem left
flussence `now` works on my netbook again \o/ 14:33
jnthn flussence: \o/
flussence: That'll be thanks to bigint support :)
(so we don't overflow horribly on 32-bit now) 14:34
flussence `now.Num` still hangs though :) 14:35
jnthn ...oh :/
flussence: does e.g. 0.5.Num hang too?
flussence wfm 14:36
jnthn flussence: hm
nom: say now.WHAT
p6eval nom 4456cd: OUTPUT«Instant()␤»
jnthn oh
jnthn wonders what Instant.Num does
flussence (I've got a ulimit -t 60 on that shell from running the spectest, so maybe it's just really slow...)
jnthn flussence: Feel free to ticket the hang.
flussence nom: say now.Numeric 14:37
p6eval nom 4456cd: OUTPUT«Instant:1321624751.28904␤»
flussence that can't be right either...
if nobody else does it first, I'll file a bug about it when I get home from $dayjob later 14:38
masak ++flussence
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␤»…
[Coke] 7
colomon really hopes that 0.5.Num is tested somewhere in the spectest....
14:40 mkramer joined
[Coke] nom: say 0.5.Num 14:41
p6eval nom 4456cd: OUTPUT«0.5␤»
[Coke] nom: say 0.5.Rat.Str.Num.HOW.WHY
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␤»
[Coke] nom: say 0.5.Rat.Str.Num.HOW
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␤»
[Coke] *blah* 14:42
alester daxim: It makes me happy to see people using ack -o 14:43
colomon ack -o? 14:44
" Show only the part of a line matching PATTERN", interesting 14:45
cognominal alester++ daxim++ # useful enough
flussence same as grep -o, but less typing :)
colomon never have used grep -o
14:46 sayu left
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... )
14:59
PerlJam alester: I use that feature all the time 15:00
15:02 bluescreen10 left
[Coke] flussence: isn't there a module for that that sugalski did? 15:02
Devel::Size is the one I'm thinking of. doesn't look quite like what you want. 15:03
15:06 wolfman2000 left
flussence I found Devel::MemoryTrace::Light, looks useful... 15:07
dalek p: 3071d43 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Handle nibbler case of named assertions.
moritz nom: say now ~~ Numeric 15:10
p6eval nom 4456cd: OUTPUT«Bool::True␤»
moritz that's why the output from now.Numeric isn't wrong 15:11
nom: say now.Num
masak nom: say Instant ~~ Numeric
p6eval nom 4456cd: OUTPUT«(timeout)»
nom 4456cd: OUTPUT«Bool::True␤»
masak I thought Instant was Real but not Numeric... 15:12
jnthn uh, Real ~~ Numeric, no?
moritz nom: say Real~~ Numeric
p6eval nom 4456cd: OUTPUT«Bool::True␤»
15:14 bluescreen10 joined
[Coke] nom: say Instant ~~ Real ~~ Numeric 15:14
p6eval nom 4456cd: OUTPUT«Bool::False␤»
masak std: say Instant ~~ Real ~~ Numeric 15:16
p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
masak S02 lists Instant as Real but not Numeric. 15:17
(S02:1458) 15:18
whereas for example Num is listed as both Real and Numeric.
so Rakudo is wrong on this one.
jnthn er
colomon no it's not.
Real is Numeric
jnthn No, the spec is wrong.
colomon the spec is just not saying everything 15:19
masak interesting notion.
colomon I mean, they're Cool, too, no?
Num is definitely Cool
masak no idea.
jnthn Real not being Numeric sounds...really odd
masak also, I don't see what that's got to do with anything.
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
measures*
colomon "These types do (at least) the following roles"
emphasis on "(at least)"
masak well, you can prove anything by saying "the spec is wrong". 15:21
colomon masak: Real is Numeric. honest
that's very fundamental
masak :)
[Coke] masak: just because it is not DIRECTLY numeric doens't mean it isn't numeric at all.
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.
[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. ;)
masak I acknowledge that you all really think you're right.
nowhere does S02 state that Real ~~ Numeric. 15:24
[Coke] that's the part I was going to double check now. :)
masak it also makes a point of having some types do both Real and Numeric, and some only Real.
PerlJam masak: is that your way of encouraging us to edit the spec? :)
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? ;)
masak PerlJam: but in this case I'm arguing for the spec meaning what it says, not the spec being wrong.
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.
alester colomon: You can also use --output= to put out $1, $2, etc
colomon masak: yeah, that's because you interpretation is insane. 15:28
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
colomon Are you going to also argue that Ints are not Real? 15:29
(based on the same list?)
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.
I agree with colomon that this seems insane. ;)
Is the role anything other than a placeholder type? Do you get methods when you Does this role?
masak colomon: yes, I argue that Int is not Real. 15:31
colomon: we have different interpretations of what Real does and means.
to me, it means "some kind of continuum". Int is not that.
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.
colomon Int is very clearly Real in the Perl 6 sense
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
at this point, it just seems we don't have enough data.
nom: say Int ~~ Real 15:34
p6eval nom 4456cd: OUTPUT«Bool::True␤»
[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?
PerlJam ah! S32-setting-library/Numeric.pod line 212: role Real does Numeric;
colomon also: class Num does Real;
jnthn PerlJam++
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.
PerlJam: sure, but S02 is and has always been more canonical than S32. 15:35
colomon oh, for heaven's sake
PerlJam masak: granted.
masak I feel as stubborn as Woodi right now... ;) 15:36
PerlJam (that doesn't mean S32 is insane though :)
masak PerlJam: granted.
colomon: please don't take this as anything else than wanting to know the truth. I don't like disagreeing either.
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
these discussions might have been only partially turned into spec, or overruled, or whatever.
colomon masak: listening to p6l is probably your first mistake....
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␤»…
PerlJam heh
masak colomon: well, specifically, TimToady on p6l... 15:38
pat_js sorry
masak I could try to find the email(s) in question...
15:38 risou_awy is now known as risou
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:38
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... :(
PerlJam masak: which types? 15:44
dalek ecs: 4fe7d34 | (Solomon Foster)++ | S02-bits.pod:
Explicitly state that Int is Real and Instant and Duration are Numeric to make masak happy.
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
masak PerlJam: now, colomon's argument is essentially that this is an *oversight*. 15:45
colomon which has now been fixed 15:46
dalek p: 7fc7a08 | jnthn++ | src/QRegex/Cursor.nqp:
Fix implementation of <before ...>.
masak well, that's one way to resolve the issue. :)
15:46 sftp left
masak TimToady: ^^ 15:46
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?
jnthn src/QAST/Compiler.nqp is starting to become readable almost... )
masak jnthn++ 15:48
jnthn Let's see how much it helps JSON::Tiny::Grammar...
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:49
[Coke] PerlJam++ # I wasn't sure anyone saw that. ;) 15:50
masak indeed.
I'm not sure the spec nails down the purpose and function of either Numeric or Real.
PerlJam masak: I don't see it, but I have on ack-shaped googles right now. 15:51
er, goggles even
jnthn whoa, I think we just passed the JSON grammar tests for real...
colomon PerlJam: see Real in S32 Numeric. Basically it adds methods that only make sense on real numbers, like sign and round
masak jnthn: \o/
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:52
dalek kudo/nom: a0e51ac | jnthn++ | tools/build/NQP_REVISION:
Get <before ...> fixes. Seems we can now parse with JSON::Tiny::Grammar again.
15:53
colomon jnthn++
[Coke] yay! 15:54
15:54 wolverian joined
masak wolverian! \o/ 15:54
jnthn The actions seem hosedish though 15:55
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. :)
cognominal hosedish? 15:58
ho, hosed-ish!
15:58 fsergot left
PerlJam btw, is there some reaon that pi and e go out to 35 decimal places? 16:00
why not 30? why not 50?
daxim calculate what accuracy this mantissa(?) gives you 16:01
colomon PerlJam: I think that's just what someone happened to have handy.
PerlJam ok :)
colomon I don't think the actual implementation can be that precise.
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
colomon 20 is more than enough for any sane usage for pi, for sure.
alester 37 decimal places is all anyone should ever need. 16:03
PerlJam alester: why 37?
alester I was making a funny.
PerlJam ah.
16:03 vmspb joined
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
daxim 7 places already give you that. 16:03
jnthn nom: "aaaaa" / (.) /; say $0.list.perl
p6eval nom 4456cd: OUTPUT«===SORRY!===␤Confused at line 1, near "\"aaaaa\" / "␤»
alester I think Mantissa would be a fantastic superhero.
jnthn nom: "aaaaa" ~~ / (.) /; say $0.list.perl
p6eval nom 4456cd: OUTPUT«().list␤»
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!"
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.
jnthn nom: "aaaaa" ~~ / (.)+ /; say $/; say $0.list.perl
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…
jnthn nom: "aaaaa" ~~ / (.)+ /; say $0
p6eval nom 4456cd: OUTPUT«=> <a>␤ => <a>␤ => <a>␤ => <a>␤ => <a>␤␤»
daxim that's what I wanted to express, masak++
jnthn nom: "aaaaa" ~~ / (.)+ /; say $0.list
p6eval nom 4456cd: OUTPUT«a a a a a␤»
jnthn nom: "aaaaa" ~~ / (.)+ /; say $0.list.perl
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 => ().…
jnthn nom: regex a { a }; "aaaaa" ~~ / (<&a>)+ /; say $<a>.perl 16:05
PerlJam masak: the planck length is on the order of 10 ** (-35)
p6eval nom 4456cd: OUTPUT«Useless declaration of a has-scoped method in mainline␤===SORRY!===␤Symbol '&a' not predeclared in <anonymous> (/tmp/GJMaH73xeZ:1)␤»
jnthn nom: my regex a { a }; "aaaaa" ~~ / (<&a>)+ /; say $<a>.perl
p6eval nom 4456cd: OUTPUT«Any␤»
jnthn aha
oh
Guess that may be same as $other-bug... 16:06
16:07 kaare_ joined
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:09
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:14
masak: seems like they should "has Real" rather than "does Real". 16:15
masak colomon: yes, that sounds sane. 16:16
moritz masak: in case of numbers, consider S02 to contain the broad ideas and S32 the gory details 16:17
masak moritz: right.
moritz: but they were in opposition in this case, and I seemed to remember why.
moritz: colomon resolved it in favour of S32.
moritz colomon++
masak indeed.
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:18
moritz but we abandoned that 16:20
because of an example that masak++ supplied, no less
colomon masak: the problem with that is it is pretty darned easy to get a numeric value out of a Real.
moritz (calculating the standard deviation of a sample of Durations, iirc)
masak moritz: I remember the example (and your blog post). 16:21
I hadn't made the connection before between the typology and the restrictions on Duration. 16:22
in fact, they still seem pretty orthogonal to me.
jnthn Hmm. Does anybody understand CAPHASH... :) 16:23
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
afk # noms
16:27 aindilis joined
masak agree fully for Durations. 16:28
don't see how it applies to Instants.
16:33 birdwindupbird left 16:57 jeffreykegler joined 16:59 jeffreykegler left 17:02 molaf joined 17:18 vmspb left 17:20 sftp_ left 17:22 Chillance joined 17:29 tyatpi_ left 17:31 orafu left 17:32 orafu joined
[Coke] ooh, paypal exposes people's registered names when you email them money! 17:34
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
jnthn thinks he's finally worked out what on earth is going on with the ratcheting+capturing bug. 17:36
17:42 tyatpi_ joined
moritz colomon: (how) do we support measure objects? 17:42
it might be an overstretch for a general purpose programming language to provide such things. Or it might not :-) 17:43
PerlJam moritz: no way! This is *perl* we're talking about! :) 17:44
tadzik 'evening 17:47
jnthn o/ tadzik
tadzik jnthn: I did send it
jnthn tadzik: ok :)
tadzik did you get it eventually?
jnthn I...don't see it yet 17:48
tadzik hrm
PerlJam I didn't get it either. 17:52
17:52 rindolf joined, sayu joined
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
PerlJam oh! yes, that happened to me too. 18:00
if you prod Ask, he may get to moderating faster.
joneskoo_ I guess this is old news but try.rakudo.org does not seem to work. 18:01
no matter how simple, A serious error seems to occur
PerlJam joneskoo_: it's new news to me. :(
flussence one sec
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.
[Coke] colomon++
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":""}
strange, try.rakudo.org/cmd?input=say%20%22hi%22 seems to produce sane output but through the main page form it fails 18:06
flussence usually this is because the backend crashed, but it's running fine... 18:08
joneskoo_ the only difference I can tell between the requests is that the form has content-type application/x-www-form-urlencoded 18:09
18:09 mj41 left
flussence time to try the nuclear option, I guess 18:11
flussence restarts apache2
joneskoo_ nope. 18:12
looks like some frontend bug to me since it's working with try.rakudo.org/cmd?input=say%20%22hi%22 but not from the form
flussence oh, I wonder if running out of disk space might have something to do with it... 18:14
joneskoo_ could be :)
flussence that'd make sense, since Mojolicious probably dumps form-encoded requests into a temp file for parsing or something like that... 18:17
Tene: your ~/.ccache on feather3 ate the disk. I'll have to rm it 18:19
looks like that fixed it... once it stops timing out with all the disk thrashing going on :) 18:20
there, fixed! 18:21
.oO( 640k inodes should be enough for everybody... )
18:22
joneskoo_ I'm still getting timeouts
flussence refresh the page, if it does that once it tends to get confused
joneskoo_ curl -vvv try.rakudo.org/cmd?input=say%20%22hi%22 is also not getting a response in reasonable time 18:23
flussence hm, I see
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?
er, niecza even
try.perl6.org "please select an implementation" :)
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?
joneskoo_ still hitting timeouts 18:28
got it to work once on the browser already :p
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?
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?
I'm thinking it's not staying alive well. 18:34
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
[Coke] Is there a name for the process where you take something like "ñ" and get "n" out?
jnthn Asciification? ;)
joneskoo_ hmh.
flussence [Coke]: asciificat- :)
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. ;)
joneskoo_ [Coke]: I don't know if there's a better name for decomposing and then stripping non-ascii :)
diacritic removal? 18:37
18:37 tyatpi_ left
PerlJam "character decomposition" sounds like something Oracle could do ;) 18:38
joneskoo_ I think diacritics stripping is a pretty accurate name
daxim it's called butchering characters and everytime you do that, daxim kills a kitten
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 :(
PerlJam (right after it does some character assassination)
daxim so please, think of the kittens
colomon Texas-ification
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
flussence: where is it running if 32 MB is such a large part of the memory?
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 :)
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
ouch. :)
perhaps you should get a amazon micro instance free or something? ;)
I think they offer more memory than that
18:41 localhost left
joneskoo_ 613 MB apparently for the micro 18:42
18:42 localhost joined
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:43
joneskoo_ I haven't looked at perl6 much yet. read the book (big pdf), or skimmed it actually. I have used perl5 earlier. 18:44
then I switched to python basically and now out of curiousity looked what's on the other side of the fence 18:45
18:45 vmspb joined
joneskoo_ the book did not really discuss unicode at all, which was a bit odd. 18:46
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?
flussence yep
joneskoo_ in perl5 I think it was somewhat painful 18:47
PerlJam joneskoo_: it's becoming less painful in perl 5
joneskoo_: and yes, perl 6 is unicode everywhere out of the box
joneskoo_ oh, so perl5 is still alive and evolving, good.
flussence everything's unicode, if you want something else then you have to explicitly convert it to/from a Buf first
daxim side discussion: trim in perl 6 plus.google.com/105725977711317285...enzxqHJmRe
PerlJam yeah, perl 6 has long had trim 18:48
colomon I think it's been rewritten at least twice since Poe's version. 18:49
PerlJam easily
joneskoo_ PerlJam: do you have a link in memory to show how unicode works with perl5 now? 18:50
I remember that some time in 2006 or so it involved some use open or some magic like that
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
(perldoc.perl.org/perlunitut.html)
18:51 Ingis left
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
wolverian you're welcome
PerlJam benabik: :)
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.
flussence Tene: might be a cronjob...
daxim benabik, I'm doing it for the lulz
joneskoo_ PerlJam: nice
PerlJam: is camel book also the PDF I read earlier?
PerlJam joneskoo_: no. camel book == Programming Perl 18:54
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:56
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
PerlJam joneskoo_: aye. There's a new edition coming soon (Dec or Jan or so)
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 :) 18:59
19:00 daxim left
joneskoo_ hmh. everything unicode by default and regexp.. instantly brings to my mind locales :( 19:01
I'll keep reading
hmh. try.rakudo.org really needs an IDLE like editor with history for repeating old commands 19:04
sorear good * #perl6 19:06
colomon \o
rindolf sorear: hi. 19:08
joneskoo_ hmh, is there something like dir() in python?
it's quite useful in an interactive prompt
sorear o/ rindolf 19:09
rindolf sorear: what's up?
Tene flussence: oh, right, I vaguely remember running an evalbot there... 19:10
rindolf joneskoo_: what does dir() do? 19:11
flussence rakudo: say [1, 2, 3].perl
p6eval rakudo a0e51a: OUTPUT«[1, 2, 3]␤»
flussence something like that :) 19:12
joneskoo_ >>> [x for x in dir("foo") if not '_' in x]
['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']
so dir lists the methods (and attributes?) of an object
flussence rakudo: my $a = Int.^methods(:local); say $a.perl
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
rakudo: my $a = Int.^methods(:local)».name; say $a.perl
p6eval rakudo a0e51a: OUTPUT«("Int", "Num", "Rat", "abs", "Bridge", "chr", "succ", "pred", "sqrt", "base", "perl", "Bool", "Str")␤»
joneskoo_ ok so no shorthand in the language then I guess
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.
flussence righto.
19:14 aindilis left 19:16 molaf left 19:19 risou is now known as risou_awy
[Coke] email visible. 19:20
tadzik++ 19:21
Woodi what CPU is on feather(s) ? 19:27
sorear sorear@feather:~$ cat /proc/cpuinfo | grep model\ name 19:28
model name : QEMU Virtual CPU version 0.12.5
looks like a vm
Juerd might know details of the hosting setup 19:29
rindolf: busy IRL. Not a lot of tuits for p6 hacking :(
rindolf sorear: ah.
Woodi hard to compare that with anything :)
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
`arch` => x86_64 19:31
flussence sounds fairly new and high end
sorear _shrug_ it's a professionally run server, iirc donated by Juerd's employer
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 :)
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:33
Woodi 'distribution' sugests core + something other 19:35
sorear my understandaing of R* was that it existed mostly to sidestep the pain of installing Parrot on random systems 19:36
but looking at tadzik's last mailing seems not quite so
19:39 mkramer joined
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:39
sorear: I do not sugest anything close to month releases but one per year would be nice :) 19:41
masak Woodi: not sure I see what need you're trying to meet here... 19:42
dalek p: 87bb1c3 | jnthn++ | src/ (2 files):
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.
Woodi masak: probably marketing something only. but such things sometimes helps in perspective 19:43
19:44 pyrimidine left
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
oh, marketing is important, I agree.
but I see the visibility thing being solved already by the monthly release announcements. 19:45
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
19:46 mkramer1 joined
masak some people are mailoids, others are more feedly. 19:46
19:47 mkramer left, mkramer1 left
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
19:48 mkramer joined
masak :) 19:50
Woodi: I'd recommend subscribing to perl6-compiler at dev.perl.org/perl6/lists/ 19:51
Woodi and about Rakudo Star on nom - how complete Perl6 it will me in Dec(+1)?
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?
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:53
Woodi masak: no priv business now this time :) 19:54
and about feature: i would like 100% :) 19:55
19:55 mkramer left
Woodi and would like to hear "more complete then not" :) 19:56
19:56 pyrimidine joined
masak Woodi: Pugs, Rakudo, *and* Niecza are "more complete than not". 19:57
19:57 mkramer joined
masak Pugs keeps bitrotting steadily, but it's still quite impressive, (almost) seven years later. 19:57
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?
Woodi but: autoritative >50% is realy nice marketing thing :)
19:59 mkramer left, sftp_ joined
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. 19:59
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.
Woodi: I'm all for realism. feel free to close your eyes and imagine ponies cotton candy, if that makes you feel better. :P
s/ponies/ponies and/ 20:02
20:02 joneskoo_ left
Woodi realism is probably from other category then optimism and pessimism :) 20:02
sorear what _I_ want to see in Perl 6 is efficiency, efficiency, efficiency 20:03
20:03 icwiener left
masak yeah! 20:03
colomon sorear++
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
- parses close to 1000x faster than any current Perl6 implementation
TimToady for various bad reasons :)
sorear - uses <1MB, compared to 20-100MB for current Perl 6 implementations
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:05
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 ;)
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)
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
Perl 6 needs to have implementations that can compete with LuaJIT and YARV 20:08
masak: Have I ever called you sane? :P
TimToady we don't expect our C and C++ programs to recompile every time they run
colomon sorear++ ;)
masak bows, flattered
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 irclog.perlgeek.de/perl6/2011-11-18#i_4724224
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
not confusing orderable with sortable here...
sorear ordered fields... 20:11
TimToady Real is ordered naturally, Numeric can be ordered only when you're desperate not to blow up :)
don't ask me where Surreal fits in there... 20:12
masak Surreal is not a total order.
sorear it doesn't, Surreal !~~ Countable 20:13
:(
TimToady Real !~~ Countable
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"
TimToady sure, orderable is just one part of real
I was just giving examples of the difference 20:15
masak aha.
sorear This is the part where I go, "But what are the use cases?"
TimToady however, a computer cannot adequately represent real numbers, so Real actually allows approximations
20:15 ksi joined
masak TimToady: was there any particular reason Instant was marked up as doing the Real role and not the Numeric role? 20:16
more to the point, does Real imply Numeric?
TimToady yes, it does, as far as I'm concerned
20:16 rindolf left
masak ok. 20:16
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.
geekosaur don;t give them ideas :)
sorear o/ geekosaur
TimToady Instant is Real in the sense of a number line that you don't care where 0 is
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.
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.
colomon sorear: well-defined addition as well, no?
masak TimToady: just because things are unitless doesn't mean they're ordinary numbers.
sorear colomon: that falls out from having a zero element
TimToady well, it's more that it has to behave linearly and divisibly
sorear colomon: affine space + zero = vector space
20:21 sayu left
TimToady Instant is more like a dimension 20:21
20:21 mj41 joined
TimToady physics doesn't care where you set the 0 point 20:21
it does care that vectors sum correctly 20:22
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:24
masak I'm with sorear on this one. what does Instant ~~ Real mean, practically, in terms of use cases? 20:25
20:25 sftp_ left
TimToady I don't really care if they're Real, as long as they work right 20:25
20:25 sftp_ joined
sorear masak: practically, it means being able to write ($t1 + $t2) / 2 and have it DWIM 20:28
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
the average of two instants is $t1 + ($t2 - $t1) / 2 20:30
which is adding a duration to an instant, not adding two instants 20:31
20:31 sftp_ left
colomon TimToady: are you saying that (if $t1 and $t2 are Instants), you cannot say ($t1 + $t2) / 2 ? 20:31
TimToady correct
masak and yet they're Real.
20:31 IngisKahn joined
TimToady I DON'T CARE IF THEY'RE REAL 20:32
masak oh, ok.
[Coke] Presumably addition is overriden for Instants.
TimToady as long as they behave right
masak I say they shouldn't be Real.
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
um, this goes way back before Haskell and Pugs where ever thought of
for me this is straight out of Ada
[Coke] "I miss Modula-3"
sorear oh. 20:34
TimToady and dimensional analysis from undergrad physics
[Coke] wait, YOUR undergrad physics? ;)
TimToady nodnod
back when we still used slide rules, mostly, unless you were rich 20:35
masak ($t1 + $t2) isn't so much nonsensical as undefined.
TimToady something's flying out your nose
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.
[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.
TimToady well, maybe we need a generic type that works like a dimension in physics, with all the appropriate symmetries
masak if Instant wants to disallow a bunch of arith, it definitely shouldn't be Real.
[Coke] (though to be fair I didn't follow everything since TT came back.)
masak [Coke]: I read that as s/everything/anything/ :P 20:37
sorear == masak
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.
colomon oh, absolutely, we should have it as a module
masak use Units;
colomon but that leaves Instant in a hard place.
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 wooden left
masak my $distance = 42\ km; my $duration = 2\ h; say $distance / $duration; # 21 km/h 20:40
sorear perl6: say 42i
p6eval niecza v11-24-gcdd4e66: OUTPUT«0+42i␤»
..pugs b927740, rakudo a0e51a: OUTPUT«0 + 42i␤»
sorear masak: you don't need the unspace for literals. 20:41
TimToady and last I checked, a kilometer was the same thing everywhere
masak sorear: no, but I liked a bit of space there.
[Coke] relatively speaking.
masak sorear: plus it scales better for multiple units.
colomon prior art? 20:42
sorear masak: what syntax would you like for, say, wavenumbers? 3200 cm^-1
I was going to say s^-1 but I guess we'd have "Hz" for that
[Coke] Ugh. All this talk of units hertz. 20:43
TimToady cm⁻¹ is available :)
colomon I think I'm strongly against having unit abbreviations as part of the language by default
masak yeah, bloat warning. 20:44
[Coke] Aye.
masak though it's been discussed before.
ON P6L! BWHAHAHA
TimToady it should at least be easy to get to though
masak use Units;
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' :)
.u ⁻¹ 20:46
phenny U+207B SUPERSCRIPT MINUS (⁻)
U+00B9 SUPERSCRIPT ONE (¹)
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 pyrimidine left
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
p6 is designed to allow a large lexicon in the setting, if we decide that's okay
sorear colomon: you don't want lots of abbreviations in CORE::.keys, you mean? 20:48
perl6: say CORE::.keys # wondering if nom or pugs can do this yet
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "CORE"␤ expecting bare or pointy block construct, ":", "=>" or operator␤ at /tmp/rAlTSxJTDp line 1, column 5␤»
..rakudo a0e51a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&CORE' called (line 1)␤»
..niecza v11-24-gcdd4e66: OUTPUT«0␤»
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
sorear CORE:: is a hash-like object representing the standard namespace 20:49
niecza: (CORE::){'&say'}("hi") 20:50
p6eval niecza v11-24-gcdd4e66: OUTPUT«hi␤»
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.
cbk1090: that [] looks redundant.
20:51 pmurias joined
sorear cbk1090: no 20:51
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
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:52
CORE::.keys :) 20:53
TimToady colomon: I suggest you avoid dictionaires. :)
sorear cbk1090: also, \T* looks dubious there
masak colomon: me neither. but not because of clutter. postfixes don't clutter much.
sorear cbk1090: \T* will gobble up all non-tab characters, which seems lke not what you want
TimToady units are more like instantiations of generic types 20:54
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: pastebin.com/vCaBC5PB
TimToady admires math in its various forms, but does not profess to be a mathematician :)
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 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...
sorear cbk1090: the '# NOT WORKING' is what I mean 20:57
cbk1090: <item> doesn't match anything because all the non-tabs were already eaten by \T*
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?
sorear colomon: No
20:58 tyatpi_ joined
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?
colomon sorear: yes, but I'd like to add postfix:<F> (or something) to the setting
cbk1090 sorear, So I go rewrite my Grammar now... :-( 20:59
TimToady colomon: or how 'bout ℉
[Coke] .u ℉ 21:00
phenny U+2109 DEGREE FAHRENHEIT (℉)
[Coke] (big ole box here.)
TimToady you need a boxer rebellion, I guess
sorear cbk1090: another issue is that your <item> cannot match 'KEY: someValue,' because you didn't include anything that can match a space
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.
[Coke] whoa, the literal xlation was something like "Righteous Fists of Harmony". BOOYAH.
cbk1090 sorear, let me try that... 21:02
sorear colomon: point taken re. congestion in CORE itself. We need to make sure CORE defines only one &postfix:<F> 21:04
21:04 thou_ joined, thou left
colomon sorear: defines at most one &postfix:<F>. :) 21:04
sorear .u DEGREE RANKINE 21:05
phenny sorear: Sorry, no results for 'DEGREE RANKINE'.
sorear we certainly need selectivity, which I think is a large argument for 'use Units :MKS' 21:10
21:10 jesk left
sorear R would also go to the degree Rankine and to the Röntgen 21:10
[Coke] We must support beard-seconds. 21:11
[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)."
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
I have updated the code: pastebin.com/vrMZmB9v
masak [Coke]: you just can't improve on beard-seconds! :) 21:21
21:24 pat_js left 21:27 y3llow_ joined, pothos_ joined 21:29 pothos left, pothos_ is now known as pothos, y3llow left 21:30 y3llow_ is now known as y3llow
dalek p: 2c0f695 | jnthn++ | src/QAST/Compiler.nqp:
Fix fail in setting the cursor variable.
21:33
p: f599448 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Avoid name leakage that led to action methods get invoked at weird times.
21:35 ksi left 21:37 thou_ left
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:39
21:40 ksi joined
PerlJam jnthn++ 21:40
dalek kudo/nom: 472ec45 | jnthn++ | tools/build/NQP_REVISION:
Get NQP revision with fixes that make JSON::Tiny mostly work.
PerlJam jnthn: Are there tests that exercise these issues? 21:41
21:42 cooper left
jnthn PerlJam: The ones I fixed today? 21:43
PerlJam: Well, I turned on the tests for ~
PerlJam: Need to hunt down or write tests for some of the others 21:44
I suspect we have some before tests.
And yes, JSON::Tiny has tests :)
PerlJam heh
masak tiny tests. 21:45
jnthn std: my regex fishy2 { $not_really_a_mammal = (.*)shark };
p6eval std be1f10e: OUTPUT«===SORRY!===␤Variable $not_really_a_mammal is not predeclared at /tmp/VGlc2eZTfR line 1:␤------> my regex fishy2 { ⏏$not_really_a_mammal = (.*)shark };␤Check failed␤FAILED 00:01 122m␤» 21:46
jnthn Thought that was wrong.
Test file I am disappoint.
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␤»
TimToady std: my regex fishy2 { :my $not_really_a_mammal; $not_really_a_mammal = (.*)shark };
p6eval std be1f10e: OUTPUT«ok 00:01 122m␤»
PerlJam does my regex fooey { :my $foo = (.*) } not work? 21:49
TimToady it does not
sorear cbk1090: *shrug* I don't see the issuew
jnthn TimToady: The test was expecting it to be a named capture
sorear cbk1090: but I don't really think grammars are the best way to approach this
TimToady jnthn: nodnod 21:50
sorear cbk1090: grammars are great for bottom-up languages, where a field is defined by what it can contain
cbk1090: you've got a top-down language - fields are delimited by tabs
cbk1090: something more like my ($stardate,$topic,$remarks) = $text.split('\t') would probably work better 21:51
cbk1090: also, $remarks.comb(/(\w+) \: \s* (\w+) \,/, :match) 21:52
my ($y,$m,$d,$h,$m,$s) = $stardate.comb(/\d+/)
TimToady: is comb a P6 innovation? 21:53
(I know P5 doesn't have it, but you might've stolen it from Ruby or SNOBOL or something) 21:54
dalek ast: 65eb2c3 | jnthn++ | S05-capture/named.t:
Correct some capturing syntax.
ast: 007a6b7 | jnthn++ | S05-metasyntax/lookaround.t:
Fudge lookaround tests; we don't have after yet, but should test before.
kudo/nom: c732039 | jnthn++ | t/spectest.data:
Turn on a couple of tests.
21:55
TimToady it's p6
but its inspiration is perhaps the figure/ground discussions in GEB:EGB
masak I wonder if there are any other such figure/ground pairs of which we have only one half in the language :) 21:56
TimToady well, we can't just return the trimmed whitespace :) 21:57
PerlJam p5 had the other half ... it just used @stuff = /.../g
(as the dual to split) 21:58
TimToady PerlJam++ is correct on that
masak did we ever figure out how to make Perl 6 do that?
TimToady the difference being that m//g won't default
cbk1090 sorear, Thanks. I try that when I get back. Have to walk the dog now :-)
TimToady at least, not the way p6 does
jnthn is($/[0], substr($str,1,-1), 'Correctly captured 1'); 21:59
hmm...we don't do negative args to substr any more, do we?
masak TimToady: does the $offset parameter in .splice accept whatever-y things like *-1 ? 22:00
spec doesn't say.
sorear jnthn: substr takes *-1 now 22:01
and <3 GEB:EGB
jnthn sorear: I wondered if that was the case but don't see any mention of it in S32. 22:02
Found the bit where it says negatives are fail though.
missed that in the first read through
masak perl6: my @a = 1, 2, 3; @a.splice(-2, 1, 42); say @a.perl
p6eval pugs b927740: OUTPUT«[1, 42, 3]␤»
..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…
..rakudo a0e51a: OUTPUT«Array.new(1, 42, 3)␤»
jnthn oh
duh, I missed the other thing too :)
masak perl6: my @a = 1, 2, 3; @a.splice(* - 2, 1, 42); say @a.perl
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…
..pugs b927740: OUTPUT«[42, 2, 3]␤»
..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…
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
masak it's not spec'd. 22:05
at all.
not even the negative number semantics is spec'd. but I guess that inherits by default from Perl 5.
22:05 alester left
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
Would S32/Str.pod:534 link properly? /me looks 22:09
nope. bummer 22:10
22:10 localhost left
PerlJam oh, splice ... /me was still thinking substr 22:11
masak now you have some inspiration for spec'ing splice ;)
PerlJam but wrt substr, does it need another signature for the WhateverCode args?
sorear funny that splice has managed to slip through the cracks for so long 22:12
in niecza
masak sorear: should be relatively LHF, no?
sorear masak: relatively, sure. It does want C# coding for the copy loop 22:13
PerlJam masak: looks specced already. 22:14
TimToady note that p5 optimized splice to figure out which end of the array to copy :)
sorear ponders some kind of arrayCopy in Perl 6
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. ..."
TimToady but p5 can do that because the offset to element 0 is independent of the memory pointer 22:15
PerlJam: I almost remember doing that, but was too lazy to change the synopsis 22:16
masak PerlJam: oh! 22:17
missed that.
masak submits rakudobug
rakudo: my @a = 1, 2, 3; @a.splice(-2, 1, 42); say @a.perl # should fail
p6eval rakudo a0e51a: OUTPUT«Array.new(1, 42, 3)␤»
masak PerlJam++ 22:18
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
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…
dalek ast: 32590b6 | jnthn++ | S05-match/non-capturing.t:
Bring a test in line with the spec.
PerlJam sorear: *slightly* insane?!? 22:20
jnthn It's O(1) in Rakudo...on an unevaluated list :P
sorear TimToady: niecza actually uses resizable circular buffers for this, so @array.push(@array.shift) while True; never has to reallocate @array :) 22:22
22:23 wooden joined
TimToady makes .rotate pretty easy too :) 22:23
22:23 wooden left, wooden joined
masak um. `uniq` isn't spec'd? 22:23
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␤»
..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…
..pugs b927740: OUTPUT«*** No such method in class Array: "&rotate"␤ at /tmp/NDY0YB4TPk line 1, column 29 - line 2, column 1␤»
dalek kudo/nom: cf8c0e1 | jnthn++ | src/core/Str.pm:
Make substr handle *-1 style third arg.
[Coke] oh, and can we call it unique if it is? ;)
TimToady why?
PerlJam preferes uniq
er, perfers
gah!
masak I prefer `uniq`, too.
dalek kudo/nom: 5d5940c | jnthn++ | t/spectest.data:
Turn on non-capturing.t.
PerlJam prefers even
masak could we spec it and have it have a :$by parameter, just like .min and .sort ? 22:25
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
masak +1
but don't throw out .uniq :)
TimToady if the algorithm can delete one side of an equality
PerlJam TimToady: and a :uniq_by on sort too?
TimToady not necessary 22:27
sorear will .uniq work like uniq(1) or like Haskell's nub? what is <a b a>.uniq?
TimToady perl6: say <a b a>.set
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␤»
..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…
..pugs b927740: OUTPUT«*** No such method in class Array: "&set"␤ at /tmp/36OFZ3yC9X line 1, column 5 - line 2, column 1␤»
TimToady perl6: say set(<a b a>) 22:28
p6eval niecza v11-24-gcdd4e66: OUTPUT«===SORRY!===␤␤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…
..pugs b927740: OUTPUT«*** No such subroutine: "&set"␤ at /tmp/KnC5CgzX0W line 1, column 5 - line 2, column 1␤»
..rakudo a0e51a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&set' called (line 1)␤»
TimToady b: say set(<a b a>)
p6eval b 1b7dd1: OUTPUT«ab␤»
TimToady knew it was there somewhere...
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? :)
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
also, why does Pugs think method names have a & in front? o_O
masak sorear: because it's old. 22:30
sorear: methods used to be incestuous with subs.
sorear *rearranges and/or copies
masak there was this idea that every method also got exported into the global namespace.
sorear I've wondered why Perl 6 doesn't do that 22:31
masak it used to.
didn't work very well :)
22:31 MayDaniel left
sorear worked fine for CLOS. 22:31
TimToady PerlJam: yes, it is 22:32
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:33
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
jnthn TimToady: Or are they more primitive than that? 22:34
TimToady PerlJam: Sets themselves are defined in S32/Containers
from that it's pretty clear what a 'set listop or method' would do 22:35
22:36 Mowah_ joined 22:37 Moukeddar joined
TimToady doing sets right really needs hash keys with === semantics though 22:38
masak looking forward to that. 22:39
22:39 bluescreen10 left
masak my current workaround for such things is to do %h{.WHICH} 22:39
jnthn oh yes, that was on my todo list too...
masak I just did that in a program.
TimToady historically this is one area where parrot made blatant P5ish assumptions
jnthn TimToady: I think it actually can do non-string keys; it's just not the default.
22:40 donaldh joined
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...
*nod*
22:40 zby_home_ joined
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 :)
benabik I have no idea how function that is, having never tried it. :-D
TimToady certainly other parrot-targeted languages need object keys
benabik functional
TimToady jnthn: I would not expect native arrays to be lazy 22:42
diakopter <WHEW> 22:43
phenny diakopter: 10:02Z <jnthn> tell diakopter I fear github.com/perl6/nqp/commit/ec2f2a8fe3 may be too liberal...it may also catch normal code blocks, which should terminate LTM.
diakopter: 10:04Z <jnthn> tell diakopter In 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?
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.
diakopter: 10:42Z <jnthn> tell diakopter ec2f2a8fe3 was a bit too liberal though; corrected that.
diakopter phenny: :)
jnthn TimToady: NICE!
TimToady: That...makes me happy ;) 22:44
TimToady native arrays have to be feedable directly to your GPU when you do hypers on them :)
jnthn yeah, I may need a bit longer to get the GPU stuff in :P
TimToady that's one of those places we're just trying to get close to for now 22:45
jnthn std: / a ** 1..10 % ',' /
p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
jnthn std: / a ** 1..10 %% ',' /
p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
jnthn Good, it parses 'em.
TimToady recollects that sorear hacked 'em in last week or so
maybe he's hallucinatin' 22:46
STD doesn't actually use % yet itself...
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
jnthn Figuring I should get us to parse them...
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:48
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
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}
that should mostly fall out of .WHICH 22:51
if you have a value type
22:51 bluescreen10 joined, vmspb left
TimToady assuming .WHICH is itself hashable 22:51
jnthn TimToady: Is .WHICH just a method? 22:52
TimToady: Not macroesque like .HOW, .WHAT, etc?
TimToady shrugs
diakopter sounds like a yes 22:54
23:02 ksi left 23:05 MayDaniel left
dalek p: 879321b | jnthn++ | src/QRegex/P6Regex/ (2 files):
First stab and % and %%.
23:07
jnthn ...at...
grr
Hmm. nqpq can now parse its own actions :) 23:11
Aww. But not its own grammar yet.
23:16 donaldh left 23:18 Moukeddar left 23:21 breinbaas left 23:22 pomysl joined, pomysl left, pomysl joined 23:24 whiteknight joined 23:25 whiteknight is now known as Guest4946 23:28 cooper joined
jnthn OK, enough for today. 23:28
diakopter o/
dalek kudo/nom: 43be3c4 | jnthn++ | tools/build/NQP_REVISION:
Get % and %% support in regexes.
23:29
23:34 skangas left 23:39 skangas joined
masak so, `list $x` isn't equivalent to `$x.list`, is it? 23:49
jnthn uh 23:51
don't think so
@$x is equivalent to $x.list
sorear list $x is probably closer to ($x,).list 23:55
23:59 pmurias left