»ö« 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. |
|||
00:16
arlinius left
00:40
hash_table joined
00:53
thou left
00:58
anuby left
01:04
anuby joined
01:05
adu joined
01:08
dayangkun left
01:21
hypolin joined
01:22
thou joined
01:24
dayangkun joined
01:25
dayangkun left
01:42
ph1ur3 left
01:43
ph1ur3 joined
01:57
hash_table left
02:11
balders_dod joined
02:20
b1rkh0ff joined
02:30
adu left
02:35
jaldhar joined
02:44
adu joined
02:49
thou left
02:50
adu left
02:51
sqirrel_ joined,
FROGGS_ joined
02:52
thou joined
02:54
sqirrel left,
FROGGS left
03:22
MikeFair_ joined
03:31
adu joined
03:42
PZt joined
03:43
atrodo left
03:45
SamuraiJack joined
03:46
thou left
03:50
grondilu_ joined
03:53
grondilu left
03:58
orafu left,
orafu joined
04:19
preflex_ joined
04:20
preflex left,
preflex_ is now known as preflex
04:28
japhb_ left
04:30
b1rkh0ff left
04:39
s1n left
04:41
daniel-s_ left
04:43
s1n joined
04:51
odoacre left
04:52
odoacre joined
05:21
telex left
05:22
telex joined
05:23
thou joined
05:30
telex left
05:38
telex joined
|
|||
diakopter | .u balloon | 05:44 | |
phenny | U+2749 BALLOON-SPOKED ASTERISK (❉) | ||
diakopter | .u streamer | ||
phenny | diakopter: Sorry, no results for 'streamer'. | ||
adu | .u pile of poo | 05:49 | |
phenny | adu: Sorry, no results for 'pile of poo'. | ||
diakopter | .u phenny | 05:52 | |
phenny | diakopter: Sorry, no results for 'phenny'. | ||
lue | Interesting: In a Pod6 document (docs.pod6), where the first line is =begin pod and the last line is =end pod , if there is no final newline after =end pod, perl6 --doc fails miserably (i.e. "=end pod\n" == OK, "=end pod" == fail) | 05:53 | |
(docs.pod6 being a placeholder name, if that wasn't obvious) | |||
moritz | \o | 06:09 | |
lue | o/ | 06:10 | |
ooc, would perl6 -MPod::To::HTML --doc document.pod6 dwim? | 06:11 | ||
moritz | no | 06:13 | |
but --doc=HTML would | |||
and does | 06:14 | ||
06:14
marloshouse_ left,
marloshouse__ joined
06:15
marloshouse__ is now known as marloshouse
06:44
adu left
|
|||
tadzik | lue: oh, hm. Could you file a bug about it? | 06:50 | |
diakopter | time for a Taco Bell frozen lemonade to celebrate finally fixing a bug I've been hunting for untold hours | 06:51 | |
06:52
sqirrel_ left
|
|||
dalek | kudo/nom: 0b5899a | moritz++ | src/core/IO/Socket/INET.pm: attempt to fix $socket.get with non-ASCII characters |
06:58 | |
moritz | this commit works for me, but I've only tested in on parrot 5.0.0 | 06:59 | |
FROGGS_ | moritz: will test in a bit | 07:13 | |
is the a special test for it? | |||
07:13
FROGGS_ left
07:16
kaleem joined
|
|||
diakopter | (#*%@ Taco Bell is no longer selling frozen lemonade. now it's this frozen blueberry baja thing. :< | 07:26 | |
so much for celebration | 07:27 | ||
jnthn | Using...lemonade to celebrate? I use beer! :P | 07:49 | |
morning, #perl6 | 07:50 | ||
-18C :D | |||
jnthn walked to work instead of taking the metro to see how cold it feels to walk in :) | |||
arnsholt | Yeah, that's chilly | 07:54 | |
tadzik | heh, it's merely -8 here :) | ||
arnsholt | The number of days with that kind of temperatures has been limited this winter, thankfully | 07:55 | |
Same here, tadzik | |||
benabik | It's actually -11 here, although it's the middle of the night... Guh. Forcast says it won't warm up any tomorrow. | 07:56 | |
arnsholt | The temperatures 'round here are remarkably stable here as well | 07:58 | |
Just a few degrees variation between day and night | 07:59 | ||
moritz | how many hours of light to do you have? | ||
arnsholt | Not enough? =) | 08:01 | |
Sunrise at 0847, sunset at 1611 | |||
So almost six and a half hours | 08:02 | ||
moritz | not too bad | 08:03 | |
arnsholt | Yeah, it's noticeably better than early January | 08:04 | |
It's not actually pitch black when we go to work anymore, which helps | |||
08:19
thou left
08:25
snearch joined
08:28
balders_dod left
08:45
FROGGS joined
|
|||
FROGGS | morning | 08:45 | |
moritz | \o FROGGS | 08:57 | |
FROGGS: with my latest patch, t/spec/S32-io/IO-Socket-INET.t should pass all tests, including the fudged ones | |||
08:59
hoelzro|away is now known as hoelzro
|
|||
FROGGS | moritz: k | 09:08 | |
moritz: Result: PASS | 09:20 | ||
will check the open RT tickets | 09:21 | ||
09:24
snearch left
09:25
bane_ joined
|
|||
FROGGS | r: say 24681 * 100 / 24723 | 09:25 | |
p6eval | rakudo 0b5899: OUTPUT«99.830118» | ||
FROGGS | so we pass 99.8% of the spectests? can this be true? | ||
tadzik | yes, possible | ||
note that we usually don't have spectests for things that aren't there :P | 09:26 | ||
like threads | |||
FROGGS | hmmm | ||
I see | |||
tadzik | it's like panda passing 100% of its tests :P | ||
FROGGS | would be cool to have tests for things that are clear how it should be | ||
tadzik: haha | |||
tadzik++ | |||
moritz | FROGGS: where did you get the number 24723 from? | 09:30 | |
09:35
fhelmberger joined
|
|||
FROGGS | github.com/coke/perl6-roast-data/b...s_rates#L5 | 09:36 | |
I guess the diff between plan and spec are the examples and rosetta-codes | 09:37 | ||
09:40
dakkar joined
09:43
Psyche^ joined
09:46
Patterner left,
Psyche^ is now known as Patterner
|
|||
masak | good forenoon, #perl6 | 09:52 | |
jnthn | good not-quite-afternoon masak :P | ||
masak .oO( that's what "forenoon" means... ) :P | 09:53 | ||
jnthn | .oO( when I say something, it means exactly what I want it to mean ) :P |
||
Su-Shee | this is quite an early "not quite afternoon" - in germany you'd still say "good morning" :) | 09:54 | |
moritz | or just "servus" :-) | ||
masak .oO( waiter, come here! servus! ) | |||
Su-Shee | moritz: I'm from the north, I say "Moin" anyways :) | ||
jnthn | .oO( it's still morning...servus more coffee! ) |
||
Su-Shee | jnthn: HA HA HA :) | 09:55 | |
hoelzro | Su-Shee: Winter is coming. | ||
moritz | Su-Shee: that's OK :-) | ||
masak | hoelzro: I always wondered what it would be like brandishing the Stark motto during early spring. wouldn't it feel a little bit silly? | 09:56 | |
hoelzro | masak: Winter is coming (but not for a while). | ||
masak | I have an unexpected Perl 6 day today. | 09:57 | |
Su-Shee | hoelzro: winter is already there, I had naked breasts every day under the shower AND I HAVE GOTTEN NO DRAGON STILL. | ||
masak | let's resume the .delta / postfix discussion, shall we? | ||
jnthn | masak: Do something unexpected! Like textual macros :D | ||
hoelzro | Su-Shee: only works with fire showers ;) | ||
Su-Shee | hoelzro: dammit. | ||
hoelzro | masak: maybe it's both literal and figuritive? | ||
kinda like saying "bad stuff is always coming"? | |||
masak | jnthn: at this point, people have been mentioning textual macros so much that *not* doing them would be the unexpected thing. :P | ||
hoelzro | Su-Shee: you also need to say "Where are my dragons?!" | 09:58 | |
Su-Shee | literal programming.. i've just read again this old story about knuth's 10 pages of pascal versus the 6 lines shell script.. wonderful lesson. | ||
hoelzro: I yelled it every day. Didn't help. | |||
literate. | |||
masak | Su-Shee: to Knuth's defense, his solution is better. but it's better in a way that doesn't much matter. | 09:59 | |
Su-Shee: and isn't the reviewer, Ken Iversen, the guy who *invented* pipes? talk about "bad luck". | |||
Su-Shee | masak: you hopefully know the excellent articles by Richard Gabriel about "worse is better"? | ||
moritz | it just took me more than two hours to write 10 tests for a $work project :/ | 10:00 | |
10:01
cognominal joined
|
|||
masak | Su-Shee: yes. | 10:01 | |
moritz: why? were they very long tests? | |||
moritz | masak: no, not very (more) | 10:02 | |
masak: two main reasons: 1) many interdependencies 2) very slow test runs | |||
and 2) leads to 2a) distractions | |||
Su-Shee | moritz: we can totally district you some more :) | ||
masak | anyway, on reflection I find it ironic that people reacted so badly to the string in .delta(3, 'days'), as if it were a big design smell. because the named arg in .delta(:days(3)) is really no better. | ||
and if we go the postfix route, we still have the ordering problem, because you can do $dt + (3days + 1months) | 10:03 | ||
Su-Shee | masak: uhm, I find .delta(amount, unit) pretty clear. | ||
jnthn | masak: Just define an enum | 10:04 | |
masak | Su-Shee: I was pondering whether 'unit' could be made an enum. | ||
hah! | |||
Su-Shee | masak: I would immediately assume .delta(57, 'minutes') would work too | ||
masak | Su-Shee: right, exactly. | ||
jnthn | masak: It's smell to me 'cus there's an obviously checkable improvement :) | ||
masak | jnthn: enum it is, then. | ||
Su-Shee | masak: also, it looks less cluttered. | ||
masak specs this | |||
which is the lesser evil: .delta(1, 'minute'), or only accepting the plural forms like 'minutes'? | 10:05 | ||
10:05
hypolin left
|
|||
jnthn | no quotes if it's an enum ;) | 10:06 | |
masak | (uhm, but with enums instead. I haven't adapted yet) | ||
question still stands. | |||
jnthn | minutes is right an infinite number of types. minute is right for only one value :) | ||
*tiems | |||
masak | I know, that's why "only plural" is one of the options :) | 10:07 | |
10:07
anuby left
|
|||
moritz | but if its method delte($amount, $unit) { }, then the $unit should be singular, no? | 10:07 | |
*delta | |||
jnthn | true :) | ||
arnsholt | jnthn: Did you spec anything concrete on the REPR compose stuff? | ||
jnthn | arnsholt: yes | 10:08 | |
I commat it to the nqp repo | |||
masak | moritz: the important part is not the parameter name $unit, the important part is how it looks in code. | ||
arnsholt goes a-logging | |||
masak | if we support both Time::minute and Time::minutes, some people will be pleasantly surprised when they find they can write .delta(1, minute) | 10:09 | |
it's a little extra code with the double checks in the .delta method, but that doesn't feel so bad. | 10:10 | ||
Su-Shee | masak: user-wise you also don't have to remember which one it really was - singular or plural | 10:11 | |
arnsholt | Feels similar to the 1st, 2nd, etc. adverbs for regex replacements | ||
jnthn | aye | ||
and just as you can write 4st, you can write .delta(2, minute) without getting moaned at | 10:12 | ||
10:13
cognominal left
|
|||
jnthn | r: say '123456' ~~ m:3nd/\d/ | 10:13 | |
p6eval | rakudo 0b5899: OUTPUT«「3」» | ||
jnthn | :) | 10:14 | |
ok, back to teaching :) | |||
arnsholt | jnthn++ # REPR compose docs and protocol | 10:15 | |
FROGGS | r: say '123456' ~~ m:nth(4)/\d/ | 10:17 | |
p6eval | rakudo 0b5899: OUTPUT«「4」» | ||
moritz | r: say '123456' ~~ m:4nth/\d/ | ||
p6eval | rakudo 0b5899: OUTPUT«「4」» | ||
FROGGS | r: say '123456' ~~ m:4th/\d/ | 10:18 | |
p6eval | rakudo 0b5899: OUTPUT«「4」» | ||
moritz | r: sub named(*%a) { say %a.perl }; named :42ed | ||
p6eval | rakudo 0b5899: OUTPUT«===SORRY!===Malformed radix numberat /tmp/hpSJJWdwN9:1------> ub named(*%a) { say %a.perl }; named :42⏏ed expecting any of: number in radix notation» | ||
FROGGS | r: say '123456' ~~ m:20th/\d/ | 10:19 | |
p6eval | rakudo 0b5899: OUTPUT«#<failed match>» | ||
FROGGS | good boy | ||
moritz: you fixed: rt.perl.org/rt3/Ticket/Display.html?id=116302 , rt.perl.org/rt3/Ticket/Display.html?id=114866 and rt.perl.org/rt3/Ticket/Display.html?id=109306 | 10:23 | ||
moritz | good lord, it was just four lines | 10:24 | |
masak | moritz++ | ||
timotimo | moritz++ | 10:25 | |
masak | r: say '01234567890123456789' ~~ m:20nd/\d/ | ||
p6eval | rakudo 0b5899: OUTPUT«「9」» | ||
masak | mwhehehe. | ||
try to read "20nd" aloud :P | 10:26 | ||
timotimo | r: sub named(*%a) { say %a.perl }; named :42nd | ||
p6eval | rakudo 0b5899: OUTPUT«===SORRY!===Malformed radix numberat /tmp/dYwtSQKijY:1------> ub named(*%a) { say %a.perl }; named :42⏏nd expecting any of: number in radix notation» | ||
timotimo | this only works in regex matchings? | ||
moritz | FROGGS: though I suspect the second ticket (.recv) was your doing, not mine | ||
10:27
bbkr joined
|
|||
FROGGS | moritz: hmm, maybe, thats why I took the tickets | 10:27 | |
bbkr | moritz++ # socket get() fix, testing it right now | ||
masak | timotimo: yes, because :42 outside of them means radix stuff. | 10:28 | |
r: say :42<100> | |||
p6eval | rakudo 0b5899: OUTPUT«===SORRY!===Radix 42 out of range (allowed: 2..36)at /tmp/1jPeJobrnH:1------> say :42<100>⏏<EOL>» | ||
timotimo | OK | ||
r: say '01234567890123456789' ~~ m:20th/\d/ | 10:29 | ||
p6eval | rakudo 0b5899: OUTPUT«「9」» | ||
timotimo | so you can use any of the suffixes? | ||
r: say '01234567890123456789' ~~ m:1th/\d/ | |||
p6eval | rakudo 0b5899: OUTPUT«「0」» | ||
moritz | timotimo: yes | 10:30 | |
masak | I've never considered before why we're so fine with those numbers being 1-based. :) | 10:36 | |
arnsholt | Huh. Good point =) | 10:40 | |
masak | .truncated-to should be switched to use the enum, too. | ||
heh, it currently requires exactly one named arg, like we discussed yesterday ;) | 10:41 | ||
(but the enum idea is better) | |||
10:47
MayDaniel joined
10:59
SmokeMachine joined,
b1rkh0ff joined
|
|||
masak | wow, this code is a lot of fun to write :) | 11:02 | |
I'll gist it in a little while. | |||
11:02
cog joined
|
|||
timotimo | this code? another mini-challenge? :) | 11:03 | |
masak | then I need to take a step back and write some tests... | ||
no, I'm hacking on DateTime.delta ;) | |||
timotimo: if you want a mini-challenge, skids++' gist.github.com/4609751 seems suitable ;) | |||
.delta is all about managing overflow. like an odometer. | 11:04 | ||
if you .delta(100, days), suddenly questions about which month you're in and how many days the subsequent months have become important. | |||
you could easily overflow on months and need a new year ;) | |||
11:07
Su-Shee left
|
|||
masak | oh darn, and I need .delta to work with negative amounts, too! :) | 11:07 | |
but, hm. I should be able to delegate practically all of the pure Date handling logic to Date. | 11:08 | ||
(which already does that very well) | |||
timotimo | in my head i *think* i've already figured it out perfectly and quite quickly. i bet when i go to implement it there's some kind of catch | 11:09 | |
masak loves catches of that sort | 11:10 | ||
11:11
Su-Shee joined
|
|||
masak | interesting about ridiculing someone's code on Twitter: news.ycombinator.com/item?id=5106767 | 11:23 | |
11:26
daniel-s joined
|
|||
Su-Shee | masak: I've just initiated a day of saying nice things about projects, languages and technologies you hate :) | 11:28 | |
11:34
MikeFair__ joined,
MikeFair_ left
|
|||
masak | Su-Shee: I find many good points were made in the apology and non-apology blog posts. for example, this had nothing to do with misogeny. (the author just happened to be a woman, and they didn't know that.) most of the tweeters were criticising Node.js, but it came off sounding like criticism of the project. | 11:37 | |
personally I find "sed and other Unix tools already do this" to be a very weak criticism of any project. | 11:38 | ||
timotimo | i, too, laughed at the idea of recreating sed in an "application server" and "ick, javascript!" and only learnt the author was a woman a few minutes ago | ||
masak | the same could be said of `rename`, for example. but I'm really glad I don't have to re-implement it each time. | ||
Su-Shee | masak: it indeed didn't. I'm also kind of wary about being supposedly a professional developer working for mozilla and then not being aware of that employers reading code on github and "and then I sobbed some more" - sorry, but this is uhm.. infantile. | 11:39 | |
masak: but yes, I know the feeling exactly because the open source world is a really harsh one. | |||
masak | Su-Shee: yes, the "and then I sobbed some more" was so unexpected that my first reaction was to wonder whether it was ironically meant. | 11:40 | |
timotimo | may just be hyperbole for "felt really bad" - also from her perspective it may have looked pretty darn overwhelming | 11:41 | |
masak | seeing as it wasn't, that was a bit more sensitive than I would expect of a person of that accomplishment and rank. | ||
but having said that, I wouldn't want to use my expectations in any way to invalidate her reactions to the situation. | 11:42 | ||
Su-Shee | masak: oh, I actually did cry more than once because someone said something which I interpreted as me being stupid. | ||
masak | just because I think "she should have expected insensitive comments" doesn't mean the comments weren't insensitive. | ||
Su-Shee | it's a socialization thing which is difficult to jump over when joining the open source world. | 11:43 | |
it took me a couple of years. Now I can just shrug if someone doesn't like my code.. | 11:44 | ||
timotimo | so far i have evaded that by only contributing to low-visibility projects and doing tiny bits of stuff. that's very obviously not something most people should or would want to do, though … | ||
(not meaning to call perl6 a low-visibility project!) | |||
masak | Su-Shee: I wonder how I'd react if someone said something hurtful about my Perl 6 code. I honestly don't know. I know my code isn't always perfect, and it would certainly be possible to criticise it in various ways. | 11:46 | |
Su-Shee: I think I'd try to separate the factual criticism (and try to fix or improve that) from the personal dickheadedness (and try to rationalize that in an appropriate way). | 11:47 | ||
but maybe that's a particularly male approach to criticism. or so I've heard. ;) | |||
sorear | learning not to take comments personally was one of the hardest parts of niecza | ||
Su-Shee | masak: it's a healthy one, that's why I adopted it. | ||
masak | to his great credit, chromatic is *very* good (in Reddit comments and elsewhere) at making that separation, and simply ignoring the emotional bits. | 11:48 | |
Su-Shee | masak: I had to learn it when I published my first articles and then realized that I just wrote for a mass audience. :) | ||
masak | sorear: "was"? are you already thinking about Niecza in the past tense? :/ | 11:49 | |
sorear | masak: I think I'm mostly over that particular bump in the road, at least. | ||
it is not, now, the hardest part by a longshot | 11:50 | ||
masak | good. :) | ||
Variable '$minutes' is not declared. Did you mean '$minute'? | |||
whoa! | 11:51 | ||
h... how... :) | |||
timotimo++ | |||
timotimo | first time it's been used in production :D | ||
masak | in the sense that Rakudo is a production project, yes :) | 11:52 | |
11:53
cog left
11:54
SmokeMachine left
|
|||
moritz | timotimo: it's been used before, it's just the first report | 11:54 | |
timotimo: only when features fail do you notice how many people are acutlly using it | |||
11:55
jokar left
|
|||
sorear | sleep& | 11:55 | |
12:00
cog joined
12:02
am0c joined
|
|||
jnthn | Most of the time I hear about Grammar::Tracer is when it breaks. Though I wrote a test for it now at least... :) | 12:05 | |
So the ecosystem tests can tell me :) | |||
12:05
cog left
|
|||
timotimo | moritz: seems very true :( | 12:14 | |
12:15
cog joined
12:18
cog left
12:34
b1rkh0ff left
|
|||
bbkr | moritz: your Socket.get() unicode fix works like a charm. also tested with unicode separators | 12:39 | |
moritz | bbkr: great. Thanks for testing | 12:43 | |
FROGGS | awesome | 12:50 | |
moritz++ | |||
bbkr++ | |||
12:53
SmokeMachine joined
13:04
cog joined
13:06
SmokeMachine left
13:15
stevan_ joined,
stevan_ left
13:23
bbkr left,
SmokeMachine joined
13:31
skids left
13:34
sqirrel joined
13:35
SmokeMachine left
|
|||
gfldex | oh well: github.com/search?p=6&q=path%3...h%2Fid_rsa | 13:37 | |
so prepare yourselves to replace your github private keys | 13:38 | ||
tadzik | ahahaha | ||
moritz | www.reddit.com/r/programming/commen...og/c82h3mg has some more nice search terms | 13:39 | |
FROGGS | uhh | ||
timotimo | sigh. | ||
moritz | one can at least hope that the private keys are procted with strong passwords | 13:40 | |
BooK | timotimo: I've fixed the 404, by the way | 13:41 | |
timotimo | do these repos also have the known_hosts files? | ||
BooK: oh nice! didn't realize you were here :) | |||
gfldex | no wonder why china is blocking github :) | ||
BooK | timotimo: actually look for know_hosts, because usually the id_dsa will be there too | 13:42 | |
and with any luck, the config will give you the username / host pairs anyway | |||
that won't give you the passphrase, though | 13:43 | ||
masak | DateTime.delta submitted for early review: gist.github.com/4621729 | ||
I'm going to write tests for subtracting time now :) | 13:44 | ||
figure I'll just take all of my addition tests and reverse them. | |||
(vim macros)++ | |||
this feels like the first time I've used the full power of 'given' statements. succeed, proceed, the whole deal. | 13:45 | ||
BooK | apparently, I've never published my script to build a family tree using git | 13:47 | |
every person is a commit, pointing to a tree with all related files (so checking out someone take a whole new meaning), and pointers to their parents | 13:48 | ||
the only slight issue is that you need to regenerate the commits for all descendants whenever you edit something about someone | |||
masak | ...just like in real life :P | 13:49 | |
BooK: I remember that talk. good fun. | |||
BooK: though clearly what you should be storing that way is people's DNA. | |||
BooK | hehe | 13:50 | |
DNA is the SHA-1 of people | |||
masak | well, wouldn't you know. all the auto-generated dualized tests for subtracting time... just passed, right off. | ||
I didn't expect that :) | |||
[Coke] | masak: I would be worried. | 13:52 | |
gfldex | masak: do you take leap seconds into account? | ||
[Coke] | not that you should be, but I"ve had too many cases where unexpected passing tests means I screwed up. ;) | ||
masak | gfldex: no, that's the one thing I've skipped so far. writing tests for it now. | ||
arnsholt | Yay. I was cleverer than the average bear when setting up my dotfiles repo =D | ||
gfldex | masak: and Samoa? | 13:53 | |
masak | [Coke]: as far as I can see, those tests are passing for legit reasons. | ||
gfldex | well, and all the other places that changes TZ | ||
masak | gfldex: the Perl 6 approach to time zones right now is that you can specify them all you want, but you need to manage them yourself. | ||
gfldex: unlike CPAN, we don't keep a register of known time zone names and DST and such. | 13:54 | ||
13:55
bluescreen10 joined
|
|||
masak | gfldex: that is, you're never on CET with Perl 6's DateTime, you're on +01:00 or +02:00, and you have to keep track of which one. | 13:55 | |
timotimo | BooK: when a person changes only slightly, the whole DNA looks completely different? | 13:56 | |
13:57
bluescreen100 joined
|
|||
BooK | timotimo: no, that's what masak meant | 13:58 | |
whereas with my example where photos and other files related to a person change, that changes the tree and so the sha1 | |||
timotimo | ah | ||
13:59
hash_table joined
|
|||
BooK | regarding dotfiles repos: that means people have a bunch of symlinks in ~ pointing to that repo | 13:59 | |
are there tools to manage that? | |||
masak | ln | 14:00 | |
tadzik | :> | ||
masak loves being facetious | |||
14:00
bluescreen10 left
|
|||
BooK | masak: that's plumbing | 14:00 | |
I was thiking porcelain :-) | |||
masak | don't go reimplementing ln! they'll laugh at you on Twitter! | ||
gfldex | masak: multi method delta(*@pairs){ for @pairs delta($amount, $unit); } # or something along the lines would be nice | ||
masak | gfldex: problem is, order matters. | ||
BooK | it would be nice though, to have soemthing to manage those symlinks for you | 14:01 | |
(the somewhat difficult problem being when files are removed from the repo) | |||
masak | gfldex: oh, but you want to be able to send in an even number of positionals. I see. | ||
gfldex: nah, that's not a big win over doing several different .delta calls ;) | |||
gfldex | i was told laziness is a virtue! | 14:02 | |
masak | yes, but I'm wary of prematurely overloading APIs. | 14:05 | |
it's easier to make something too complicated than to make it too simple. | 14:06 | ||
14:06
hash_table left
14:14
bluescreen100 is now known as bluescreen10
14:15
PacoAir joined
14:17
atrodo joined
14:21
erkan left,
PacoAir left,
PacoAir joined
14:24
Vlavv joined
|
|||
masak grumbles about those leap seconds | 14:26 | ||
FROGGS | time is crap, I tell you | ||
jnthn | .oO( ain't got time for dat ) |
14:27 | |
14:27
Vlavv_ left
|
|||
masak | jnthn: "ain't *nobody* got time for that!" | 14:28 | |
Su-Shee | Haha. wow, now that is the single most coolest resume I've ever seen :)) www.phildub.com/ (scroll down, too :) | ||
moritz | leap seconds suck up your time (if you you are a developer) | ||
masak | Su-Shee: hah :) | ||
[Coke] | moritz: I've never worked on something where a leap second would impact the actual result meaningfully. | 14:29 | |
masak | help me check my reasoning here. when you're delting anything *except* seconds (minutes, for example), leap seconds don't matter at all. | 14:30 | |
but when you're delting seconds, they matter all the time. | |||
moritz | well, what's the result of subtracting a minute when you're on a leap second? | 14:31 | |
and what if you are subtracting $n days, and land on another leap second? | |||
masak | moritz: same as subtracting 60 seconds, if you ask me. | ||
FROGGS | if it is the same like when adding months, you got the same leap second, but just on another minute | ||
masak | what FROGGS said. | ||
but if I'm going from May 2012 to August 2012 by just adding seconds all the time, the leap second in June 2012 matters. | 14:32 | ||
14:33
vividsnow joined
|
|||
FROGGS | right | 14:33 | |
masak | so even if I'm adding tens of thousands of seconds at a time, I need to check all the dates in the range between start date and end date. | ||
FROGGS | hmmm, really? | ||
if you add 10months to january, you dont care about how many days feb has | 14:34 | ||
masak | right. | ||
we care only about the resolution of the unit we're adding/subtracting. | |||
FROGGS | you check if the date is valid after adding ten months, if it is not, you have to fiddle with days | ||
masak | which is why leap seconds don't matter *unless* we're adding seconds. | ||
moritz | depends on how you define 'matter' | 14:35 | |
FROGGS | 'matter' is, what perl 5's DateTime does | ||
moritz | if you are on a leap second, and add $n days and land on another leap second, you'll end up in second 60 | ||
masak | hm, I wonder if I could just convert to Instant, add the seconds, and convert back? :) | ||
masak tries | 14:36 | ||
moritz | if you add $n+1 days, you can't land on a leap second. Which second do you land on? 0 of the next minute? or 59? | ||
it's pretty much the same as adding one or two months to Jan 31 | 14:37 | ||
and I notice that I don't know what tha does either | |||
masak | moritz: you land on 0 of the next minute. | 14:38 | |
moritz: the reasoning is exactly like that of days and months, like FROGGS pointed out. | 14:39 | ||
yay, the Instant idea worked perfectly, and made the code simpler! | |||
moritz | masak: ok, thanks | ||
masak | latest code here: gist.github.com/4621729 | 14:40 | |
I'm going to add a few tests about leap seconds and adding days, just to make sure it works. | |||
(and yes, what we just said makes .delta non-commutating. which is why ordering matters so much.) | 14:42 | ||
14:44
alec left,
benabik left
|
|||
moritz wonders how long the delta's commute is :-) | 14:45 | ||
masak | *non*-commutating :) | 14:48 | |
arnsholt | Infinitely long commute, then =) | 14:49 | |
moritz | masak: just means that the commutator is non-zero, which makes it interesting | ||
moritz had too much algebra + QM | |||
masak | ;) | 14:50 | |
if I add 365 days to 1972-12-31T23:59:60, what do I get? | 14:52 | ||
or, if it helps, if I add a year to 1972-12-31T23:59:60. same question, really. | 14:53 | ||
moritz | 1974-01-01T00:00:00 ? | ||
masak | I'm asking because 1973-12-31 has a leap second. | 14:54 | |
moritz | oh. | ||
masak | writing tests is good for the soul :) | ||
moritz | then you'll land on the leap second | ||
masak | yeah. | ||
moritz | ie 1973-12-31T23:59:60 | ||
masak | it's a very special case. | ||
good. we agree. | |||
just wanted to check. | |||
moritz | it's why I was sceptical about the whole "does not matter" subject earlier | 14:55 | |
you cannot ignore leap seconds when adding something >= minute, because you might start and you might land at one | |||
so in some sense, leap seconds do matter | |||
masak | I don't see how you could land on one without starting on one, though. | 14:56 | |
arnsholt | How does Perl 5 DateTime handle this problem_ | ||
s/_/? | |||
masak | good question. please find out :) | 14:57 | |
moritz | masak: right, you can only land on one if you start from one | 14:58 | |
14:58
alec joined
|
|||
moritz | at least if all the minutes are integral :-) | 14:58 | |
14:58
Targen joined
|
|||
arnsholt | masak: Can't really. I'm supposed to be writing slides for my lecture tomorrow, but procrastinating in here instead >.< | 15:00 | |
gfldex | masak: you can land on a negative leap second by starting at a leap second or by starting on a non leap second | ||
15:00
skids joined
|
|||
moritz | what is a "negative leap second"? | 15:00 | |
gfldex | the last minute of dec 31 or jul 31 can have only 59 seconds | 15:01 | |
moritz | OH WHAT THE FUCK | ||
gfldex | happens every few dozen years because of wobbly earth orbit | ||
masak | moritz: oh, I'm *so* gonna forbid non-integral non-seconds! | ||
gfldex | so please stop rockign your chair :) | 15:02 | |
moritz | I mean, why can't they just leave it be, and wait until all is back to normal? | ||
masak | moritz: and then instead of explaining when people complain about it, I'm going to *slap* them! | ||
moritz | masak: *and* delete their code :-) | ||
masak | repeatedly, if that's what it takes. | ||
gfldex | because they can't tell if it goes back to normal. Three body problems are a bitch. | ||
they expect the earch to slow down but can't be sure about it | 15:03 | ||
PerlJam | gfldex: note that there has never been a negative leap second :) | ||
masak | gfldex: have there been fun New Year's Eve celebrations with leap seconds where people had to say "three... two... one... wtf... Happy New Year!" | ||
? | |||
gfldex | let me check | ||
masak | :) | ||
I know there's been 31 Decembers with leap seconds. | 15:04 | ||
I'm asking about actual celebrations where this happened because $big-monitor was leap-second-aware. | |||
gfldex | no negative leap seconds yet | ||
15:05
alec left
|
|||
moritz | oh man, we do know that earth rotation becomes slower. We just need to be patient if it comes to some oscillations. | 15:05 | |
PerlJam | I'm pretty sure negative leap seconds won't actually happen given the normal friction-induced slowing of the Earth's rotation. | 15:06 | |
masak | leap seconds handled. code updated. all tests pass. gist.github.com/4621729 | 15:07 | |
I feel ready to add this to the spectests, to Rakudo, and to the spec. | |||
gfldex | masak: are you aware of the fact that dinosaures had one hour less per day? | ||
15:07
stopbit joined
|
|||
gfldex giggles | 15:07 | ||
masak | gfldex: no, I wasn't aware. | ||
gfldex | please don't build a time machine, will ya? | 15:08 | |
PerlJam | gfldex: no wonder they went extinct! The didn't have enough time to get all of their stuff done. | ||
masak | gfldex: did the dinosaur scientists start messing with leap hours, getting all of them killed in the process? :P | ||
gfldex | they may have calculated their departure date wrongly and got hit by that big rock | ||
15:09
adu joined
|
|||
[Coke] points masak at syfy's new time travel show to annoy him. | 15:09 | ||
masak | (no-one has said anything about .delta(1, week) -- but I think it's a good addition. will make sense with the .truncated-to method as well) | ||
PerlJam wonders what the intelligent insects that will inhabit the earth 65 million years from now will think about us. | |||
masak | [Coke]: who's syfy? | ||
[Coke]: and what kind of pointer is that? I see no URL. :P | 15:10 | ||
gfldex | masak: i have toyed with perl 6 date arithmetics before and found that i would need two versions | 15:11 | |
one that answers questions like: when will we meet at the train station | |||
masak | should Date have a .delta method, too? I think it should. | 15:12 | |
gfldex | and one that asnwers questions like: how much do i have to pay you for providing a service that you subscribed to x days ago | ||
[Coke] | masak: googling for that phrase gets you reaaaaaly close, but here's a URL: www.syfy.com/continuum | ||
nwc10 | You might also want to read this message, if you're considering dates & times on the scale of 65 million years from now: www.xray.mpe.mpg.de/mailing-lists/p...00480.html | 15:13 | |
masak | gfldex: why are those two different versions? | ||
[Coke]: thank you. | |||
FROGGS | ppl: there is no spec about $(...) in regexes, how do I call that construct? example: | 15:14 | |
r: say "abc" ~~ m/$($_)/' | |||
r: say "abc" ~~ m/$($_)/ | |||
p6eval | rakudo 0b5899: OUTPUT«===SORRY!===Two terms in a rowat /tmp/jcWiC1a1N4:1------> say "abc" ~~ m/$($_)/⏏' expecting any of: postfix infix or meta-infix infix stopper statement end statement modifier … | ||
rakudo 0b5899: OUTPUT«#<failed match>» | |||
FROGGS | n: say "abc" ~~ m/$($_)/ | ||
p6eval | niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(3) text(abc) pos([].list) named({}.hash)>» | ||
gfldex | masak: because when you want to meet somebody you may do some rounding (do we meet on mo or thu?) and in that case leap seconds do count as you will have to take TZ into account too | ||
masak | [Coke]: I'm currently going through Fringe episodes. this looks promising, too. | ||
FROGGS | here id the report: rt.perl.org/rt3/Ticket/Display.html?id=115298 | ||
gfldex | in fact, having deltas without TZ is rather pointless because you need that to make reasonable rounding | ||
the problem i see with your .delta is that you give a programmer a nice tool that will lead to bugs if the programmer in question doesn't know for sure what he/she is doing | 15:16 | ||
and how many programmers Know For Sure(tm)? | 15:17 | ||
15:17
alec joined
|
|||
[Coke] | masak: I ... haven't... watched fringe. bad coke. | 15:17 | |
moritz | gfldex: well, it's as safe a default as we can make it, afaict | ||
gfldex | in the end i found myself to want to implement a calender and move pointers in that calendar around instead of assuming that dates are numbers i can apply arithmetics to | 15:18 | |
15:19
SmokeMachine joined
|
|||
gfldex | and as slashdot is telling us on a regular basis even very big companies have huge problems to get dates right | 15:19 | |
[Coke] | mmm. with my worky date math, I might need to know what the date is a year from *today*, but not *this second*. | ||
gfldex | much to my amusement i have to say :) | ||
FROGGS | TimToady: what's the difference between say "abc" ~~ m/$( $_ )/ and say "abc" ~~ m/{ $_ }/ ? ( #115298 got a patch in queue ) | 15:20 | |
[Coke] | most complicated thing that's come up recently is something like "last business day before <date>" which is more complicated from keeping track of work days than anything leap secondy. | 15:21 | |
15:21
cog left
|
|||
gfldex | [Coke]: the problem with that is that you do the underlaying math in UTC and then convert to local TZ. So something innocent like 6 o'clock in the morning in a +6 TZ can move the underlying numbers dangerously close to midnight, and therefore close to leap seconds. | 15:21 | |
[Coke] | no. | ||
Su-Shee | a short explanation: jvm, perl6 - it's "perl6 on jvm like rakudo on parrot and niecza on .net"? | ||
[Coke] | Su-Shee: sort of except that the perl6 on the jvm is the same perl6 on parrot, sort of. | 15:22 | |
15:22
vividsnow left
15:23
adu left,
adu joined
|
|||
Su-Shee | [Coke]: because the intermediary <?> allows to just exchange the jvm and parrot? | 15:23 | |
[Coke] | gfldex: If the question is, "what date does this company in poland have to file their tax return", I'm not looking at time zones. | ||
basically. | |||
15:23
cog joined
|
|||
[Coke] | intermediary being a dialect of perl6 called 'nqp' | 15:24 | |
gfldex | if you ask that question for Samoa tho, you might end with a date that never existed | 15:25 | |
FROGGS | Su-Shee: it should be possible some day to use the rakudo source for both nqp on parrot and nqp(js) on jvm | ||
Su-Shee | then I remembered correctly, thanks. | ||
gfldex | ignoring TZs is ... brave | ||
Su-Shee | FROGGS: I'm waiting for the clojure way, basically. | ||
[Coke] | gfldex: is samoa on a different calendar? | ||
You're looking for too much detail. If they have to file on Friday, it doesn't matter that they are 4.5 time zones away with a leap second. | 15:26 | ||
gfldex | no they changed TZ by skipping a day because they wanted to be in the same TZ then australia | ||
[Coke] | ... they presumably they didn't have any tax returns due that day. :) | 15:27 | |
*then | |||
gfldex | i do not agree. If i want to query all companies that would have to pay until jul 31 but didn't I could miss out some money. | ||
[Coke] | which is a different scenario that what I posed. | 15:29 | |
masak | gfldex: we don't ignore time zones so much as leave most of the handling to the programmer or non-core modules. | 15:32 | |
gfldex: this was a conscious decision at the time we refactored S32/Temporal back in 2010, to delimit the scope of DateTime and surrounding classes. | 15:33 | ||
15:33
SmokeMachine left
15:34
SunilJoshi joined
15:37
am0c left
15:38
hash_table joined,
FROGGS left
15:39
stevan_ joined
15:40
stevan_ left,
stevan_ joined
15:45
FROGGS[mobile] joined
15:52
werwerwer joined
15:59
SunilJoshi left
16:01
adu left,
SunilJoshi joined
|
|||
masak | Could not find sub &infix:<+> | 16:02 | |
getting this when trying to compile CORE with the new enum and the .delta method. | |||
16:03
FROGGS joined
16:04
kaare_ joined
|
|||
masak | seems to be emanating from within the enum declaration. | 16:08 | |
jnthn | masak: Maybe you declared it too early. | 16:09 | |
16:09
SamuraiJack_ joined,
SamuraiJack left
16:10
FROGGS[mobile] left
|
|||
masak | oh huh. | 16:10 | |
jnthn | Well, + is defined in the setting :) | 16:11 | |
masak | Temporal.pm is fairly late, though. | ||
jnthn | Consider givign the enum keys explicit values using the pair syntax | ||
masak | ok. | ||
jnthn | See Order; that's an enum declared in the setting and it works. | ||
masak | ok. | 16:12 | |
16:15
benabik joined
|
|||
jnthn | hotel * | 16:19 | |
^ | |||
no, ffs | |||
& | |||
diakopter | ? | ||
something about the hotel? | 16:20 | ||
FROGGS | a weird cat | 16:21 | |
16:26
SmokeMachine joined
|
|||
masak | the '^' instead of '&' is due to assuming Swedish keyboard (because of the physical keyboard) where an English keyboard applied (because of Putty/SSH) ;) | 16:26 | |
diakopter | oh heh | 16:27 | |
masak | I can't similarly explain the '*'. | ||
diakopter | * is beside & | 16:28 | |
so is ^ | |||
masak | oh, you're right. | ||
so the '*' can be explained by overcompensating. | 16:29 | ||
16:29
SmokeMachine left
|
|||
diakopter | everytime I see ffs I have to rederive what it means; for some reason I can't learn it | 16:29 | |
masak | (the '&' is on the 6 on Swedish keyboard. it's on the 7 on US keyboards. the '*' is on the 8 on US keyboards.) | 16:30 | |
FROGGS | get a german one, you cant mix <[&*^]> there :o) | 16:33 | |
16:33
hoelzro is now known as hoelzro|away
|
|||
dalek | ast: 16c9071 | masak++ | S32-temporal/DateTime.t: [S32-temporal] added tests for DateTime.delta |
16:38 | |
kudo/nom: 943ecc5 | masak++ | src/core/Temporal.pm: [core/Temporal.pm] implemented DateTime.delta |
|||
16:39
fhelmberger left
|
|||
FROGGS | nr: say $( | 16:39 | |
p6eval | rakudo 0b5899: OUTPUT«===SORRY!===Unable to parse expression in contextualizer; couldn't find final ')'at /tmp/6fnNIoqTLM:1------> say $(⏏<EOL> expecting any of: argument list prefix or term prefix or meta-prefix … | ||
..niecza v24-18-gaf64300: OUTPUT«===SORRY!===Unable to parse contextualizer at /tmp/m8a9hsVxLA line 1 (EOF):------> say $(⏏<EOL>Couldn't find final ')'; gave up at /tmp/m8a9hsVxLA line 1 (EOF):------> say $(⏏<EOL>Parse failed… | |||
16:48
kaleem left
|
|||
dalek | ast: 6454b13 | masak++ | S32-temporal/DateTime.t: [S32/Temporal] switched truncated-to to enum |
16:56 | |
16:57
cog left
|
|||
dalek | kudo/nom: 7e10a0d | masak++ | src/core/ (2 files): switched .truncated-to to enum The exception type X::Temporal::Truncation also goes away, being replaced by ordinary parameter type checking. |
16:58 | |
17:04
cog joined
17:09
Pleiades` left,
Pleiades` joined
|
|||
dalek | ast: eaf297e | masak++ | S32-temporal/Date.t: [S32/Temporal] added tests for Date.delta |
17:16 | |
kudo/nom: b49cbe0 | masak++ | src/core/ (2 files): [core/Temporal.pm] implemented Date.delta |
17:17 | ||
FROGGS | masak++ | ||
17:21
benabik left
17:28
cog left
17:29
sjn left,
sjn joined
|
|||
dalek | ecs: 9d8bc5f | masak++ | S32-setting-library/Temporal.pod: [S32/Temporal] spec DateTime.delta and Date.delta Clarify the .truncated-to method as well; it also uses the C<TimeUnit> enum, instead of named parameters. |
17:29 | |
masak | ladies and gentlebots, we now have .delta :) | 17:30 | |
FROGGS | \o/ | 17:31 | |
17:39
Chillance joined
17:40
eiro joined
17:43
spider-mario joined
17:45
SmokeMachine joined
17:48
spider-mario_ joined,
spider-mario left,
SmokeMac_ joined
|
|||
moritz | now I want .epsilon too :-) | 17:49 | |
masak++ # unexpected temporal hackery | |||
japhb | masak, FWIW IIRC the original reason for Perl 5 DateTime to exist at all was to try to finally have one module that everyone could rely on that did the calculations as correct as possible. Add-ons to it came in the form of parsers, formatters, non-Julian/Gregorian style calendars, and such. But the basic calculations were (intended to be) rock solid, and users didn't have to think about whether they needed to pull in more modules to get | ||
stuff like DateTime + Duration correct. | |||
I still think that was a good line to draw. | 17:50 | ||
(None of which detracts from masak++ for doing the present work. ;-) | 17:51 | ||
17:52
SmokeMachine left,
alec left
17:55
SmokeMachine joined
|
|||
masak | japhb: I have a huge respect for the delineation drawn by DateTime the CPAN module. and yes, maybe all the world's timezones *should* be part of src/core. it's still not too late to change that. but it's too far outside my area of expertise, and as far as I know, our current delineation works too. | 17:56 | |
for a definition of "works" which admittedly doesn't take all the world's timezones into account. | 17:57 | ||
17:57
dakkar left
17:59
SmokeMac_ left
|
|||
timotimo | r: say ("Foo -> Bar" ~~ m:s/ <ident> $<edgeop>=< -- -\> \<- > <ident> /) # is it unreasonable to expect this to work without escaping the <- and ->? | 17:59 | |
p6eval | rakudo 7e10a0: OUTPUT«「Foo -> Bar」 ident => 「Foo」 edgeop => 「->」 ident => 「Bar」» | ||
timotimo | ah, apparently no space is required before the > that ends the quotewords construct | 18:00 | |
PerlJam | japhb: mktime() already did the calculations correctly long before DateTime existed :) | 18:01 | |
moritz | PerlJam: I don't think mktime does addition of non-second units, for example | 18:02 | |
japhb | masak: I guess I fear that we seem to have an obsessive compulsion to get graphemes correct, but not timezones. And I don't understand that difference, given that both are reflections of the craziness of human social constructs. | ||
moritz | japhb: TimToady is a linguist :-) | ||
japhb | I totally understand worry about bloat and complexity. | 18:03 | |
And you're a physicist, right? :-) | |||
moritz | japhb: yes. And as such I'm very happy to have a TAI time source in Perl 6 | ||
masak | japhb: I repeat: it is still not too late to put things right, and include all the world's timezones in core. are you our man? | ||
japhb | I guess I just want us to choose the set of social constructs we are planning to address, and approaching them all with the same fervor that we do Unicode. | 18:04 | |
18:04
SmokeMac_ joined
|
|||
masak | agreed. | 18:04 | |
japhb: I'm glad we got S32/Temporal straightened up after years of fumbling in the dark. | |||
moritz | now somebody please do the same for IO :-) | 18:05 | |
japhb | masak, I don't know if I am the man for that. On the one hand, I have spent some time trying to get datetime handling "correct", but I really don't feel encyclopedic in such knowledge, and I have already committed to too many Perl 6 projects as it is. So I am torn. :-/ | ||
(time spent on a previous project) | 18:06 | ||
18:06
alec joined
|
|||
japhb | As for IO, I have a feeling that is going to become an implementation-first solution -- first person to create a really good IO implementation will get their design canonized. | 18:07 | |
.oO( bombarded ) |
18:08 | ||
18:08
SmokeMachine left
|
|||
PerlJam | japhb: isn't that how IO has always been done? (see Unix :) | 18:08 | |
18:09
SunilJoshi left
|
|||
japhb | PerlJam, yes, but difference being that with very high level languages, we get to export our Unix-inspired designs to all the other OSen as well. :-) | 18:09 | |
(Bah, my command of English is sucking this morning.) | 18:10 | ||
jnthn | hm, I should go through the RT queue's old end at some point | 18:11 | |
A glance suggests there are some easy closes and even some easy rejects in there. | |||
18:11
bane_ left
18:16
cog joined
18:23
Pleiades` left
|
|||
timotimo | hm, segfaults are not supposed to happen, right? | 18:27 | |
jnthn | No, not unless you were doing something naughty with NativeCall :) | 18:30 | |
nom & | |||
18:30
Pleiades` joined
|
|||
arnsholt | What jnthn said. OTOH, if you -are- using NativeCall, it may very well be not your fault as well | 18:32 | |
masak .oO( NaughtyCall ) | |||
nwc10 | :-) | ||
arnsholt | Hmm. Sounds like an idea for ACME:: | ||
18:33
SmokeMachine joined,
Exodist left
18:34
Exodist joined
18:36
SmokeMac_ left
18:38
Pleiades` left
|
|||
timotimo | what's going wrong again now? trying to --gen-parrot, tells me it can't find a MANIFEST.generated and aborts the configure phase >_< | 18:38 | |
must have accidentally deleted it?! | 18:39 | ||
no idea how that might have happened. | |||
18:42
Pleiades` joined
18:54
Targen left
18:58
SmokeMachine left
19:00
benabik joined,
xinming left
19:01
SamuraiJack_ left
19:02
xinming joined
|
|||
FROGGS | timotimo: IMO this is more readable: | 19:03 | |
r: say ("Foo -> Bar" ~~ m:s/ <ident> $<edgeop>=[ '--' | '->' | '<-' ] <ident> /) | |||
p6eval | rakudo b49cbe: OUTPUT«「Foo -> Bar」 ident => 「Foo」 edgeop => 「-> 」 ident => 「Bar」» | ||
FROGGS | can somebody tell whats wrong with this? | 19:04 | |
r: say ("Foo -> Bar" ~~ m:s/ <ident> $<edgeop>=< '--' '->' '<-' > <ident> /) | |||
p6eval | rakudo b49cbe: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀U␀␀␀n␀␀␀r␀␀␀e␀␀␀c␀␀␀o␀␀␀g␀␀␀n␀␀␀i␀␀␀zxE2x90 | ||
masak | no, but I recognize the behavior. | ||
FROGGS | is it p6eval's fault? | ||
because of the char right after OUTPUT | |||
timotimo | FROGGS: the version i have in "production" now is / <ident> <.ws> $<edgeop>=( '--' | '->' | '<-' ) <.ws> <ident> / | 19:06 | |
i prefer the edgeop without trailing whitespace | |||
FROGGS | ya, and quiet more readable than having backslashes there | 19:07 | |
timotimo | in-very-deed | ||
FROGGS | btw, TZ +1, but one-step-after-the-other (tm) | 19:08 | |
19:09
WAABC47 joined
|
|||
[Coke] | (MANIFEST.generated) you can't do a rebuild in parrot/ over every commit in parrot, sometimes you have to clean it. (cd parrot && git clean -xdf might help, as would rm -rf parrot/) | 19:14 | |
masak | moritz: I'd be interested to hear what you think about the AbstractList.removeRange() example of the usefulness of protected things in this interview: www.artima.com/intv/blochP.html (under the heading "Trusting Subclasses") | ||
19:22
SmokeMachine joined
19:26
werwerwer left
19:38
rindolf joined
19:42
SmokeMachine left
19:57
SmokeMachine joined
19:58
SmokeMachine left
|
|||
dalek | rl6-roast-data: d0dec55 | coke++ | / (4 files): today (automated commit) |
20:04 | |
jnthn | masak: Some Temoral fail in ^^ | 20:12 | |
FROGGS | maybe spec is new and rakudo isnt? | ||
I should run spectest to be sure | |||
20:13
dduncan joined,
dduncan left
|
|||
jnthn | FROGGS: ah, yeah, could easily be | 20:15 | |
20:15
PacoAir left,
PacoAir joined
|
|||
[Coke] | +S32-exceptions/misc.rakudo passed 461 unplanned test(s) | 20:16 | |
O_o | |||
masak .oO( that's why it's "misc"! ) | |||
20:16
hoelzro|away is now known as hoelzro
|
|||
nwc10 | does that translate as "the percentage for Pugs is about to get worse"? | 20:16 | |
flussence | that translates into "missing plan line!" | 20:17 | |
20:18
cog left
|
|||
FROGGS | masak: you removed an exception type, right? | 20:18 | |
github.com/perl6/roast/blob/master...isc.t#L293 | |||
flussence | (I can see why nobody wanted to count them...) | ||
masak | FROGGS: oh! yes :/ | 20:19 | |
FROGGS: that's my fault. sorry about that. | |||
[Coke] | there's a done - guessing that one of the last things failed. | ||
masak | I thought I re-ran all the spectests after making that change. apparently not. | ||
FROGGS | np | ||
masak fixes | |||
nwc10 | github.com/perl6/roast/blob/master...isc.t#L350 -- try eval('class TestClassFactoryInterfaceBridgeMock is TooLongOfANameToBeConsideredGoodPerl { }'); | 20:20 | |
:-) | |||
dalek | ast: 6d12d5e | masak++ | S32-exceptions/misc.t: remove the mention of X::Temporal::Truncation The class has been removed from Rakudo. |
20:21 | |
skids | OOh. Add "Enterprise" to that! | ||
timotimo | "ToBeConsideredGoodEnterprisePerl"? | ||
skids | no smurfword collection is complete without "Enterprise" | 20:22 | |
flussence | needs at least two or three more levels of "Factory" :) | 20:23 | |
[Coke] | masak++ | 20:24 | |
FROGGS | .oO( ...API, ...DATA ) |
20:26 | |
masak | well, there's something to be said for systems with just the right layers of abstraction. | 20:30 | |
20:30
hoelzro is now known as hoelzro|away,
cog joined,
grondilu_ left
|
|||
masak | things like "Factory" or "Bridge" do fill a role, but they need to pull their own weight. | 20:31 | |
FROGGS | masak: t/spec/S32-temporal/calendar.t fails | ||
misc.t PASSES now btw | |||
Not enough positional parameters passed; got 1 but expected 2 in block at t/spec/S32-temporal/calendar.t:22 | 20:32 | ||
skids | Having a core language powerful enough that several of those types of abstractions become unworthy of code sharing is the best solution IMO :-) | ||
timotimo | would you mind if i tried adding a name to the "default constructor only takes named arguments" error message? | 20:34 | |
FROGGS | timotimo: a name? what name? | 20:37 | |
timotimo | the name of the class used for instance - if that is possible. | ||
Foo.new([1, 2, 3]) would ideally complain about a Foo | 20:38 | ||
FROGGS | ya.... | 20:39 | |
you maybe could even list the arg names | 20:40 | ||
timotimo | hm, you think? | ||
20:40
bruges_ joined
|
|||
timotimo | as in, "passed 5 positionals and the following nameds: ..."? | 20:40 | |
skids | r: multi sub a(Int $a) { }; multi sub a(Num $a) { }; a("3"); | 20:41 | |
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===CHECK FAILED:Calling 'a' will never work with argument types (str) (line 1) Expected any of: :(Int $a) :(Num $a)» | ||
skids | r: class A { multi method a(Int $a) { }; multi method a(Num $a) { }; }; A.a("3") | ||
p6eval | rakudo b49cbe: OUTPUT«Cannot call 'a'; none of these signatures match::(A : Int $a, Mu *%_):(A : Num $a, Mu *%_) in method a at src/gen/CORE.setting:434 in block at /tmp/1Tm6fRF31Q:1» | ||
skids | second error is LTA compared to the first. | 20:42 | |
20:42
bruges left
|
|||
timotimo | r: sub test($what, @*list) { .WHAT.^name.say for @list }; test(1, "foo", NaN); | 20:43 | |
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===Variable '@list' is not declaredat /tmp/k_VLeIoZf1:1------> hat, @*list) { .WHAT.^name.say for @list⏏ }; test(1, "foo", NaN); expecting any of: postfix» | ||
timotimo | r: sub test($what, @*list) { .WHAT.^name.say for @*list }; test(1, "foo", NaN); | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===CHECK FAILED:Calling 'test' will never work with argument types (Int, Str, Num) (lines 1, 1) Expected: :($what, @*list)» | ||
dalek | ast: eeaa7f6 | masak++ | S32-temporal/calendar.t: [S32/Temporal] fixed calendar.t Chase the .truncated-to API change. |
20:44 | |
timotimo | hm. | ||
oh, yeah | 20:45 | ||
masak runs spectests himself | |||
timotimo | r: sub test($what, *@list) { .WHAT.^name.say for @list }; test(1, "foo", NaN); | ||
p6eval | rakudo b49cbe: OUTPUT«StrNum» | ||
timotimo | i suppose that could be done. however, i'm experiencing some other problems first | ||
r: class Testclass { multi method new($, *@) { say self.WHAT.^name } }; class Subtestclass is Testclass; Testclass.new(1, 2, 3); Subtestclass.new(4, 5, 6) | 20:46 | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===Too late for semicolon form of class definitionat /tmp/iiKF1sjBDp:1------> e } }; class Subtestclass is Testclass; ⏏Testclass.new(1, 2, 3); Subtestclass.new expecting any of: method arguments p… | ||
timotimo | r: class Testclass { multi method new($, *@) { say self.WHAT.^name }; }; class Subtestclass is Testclass { }; Testclass.new(1, 2, 3); Subtestclass.new(4, 5, 6); | ||
p6eval | rakudo b49cbe: OUTPUT«TestclassSubtestclass» | ||
timotimo | this works, but the same code in src/core/Mu.pm doesn't :| | ||
but it seems like there's a method WHICH which is exactly what i need anyway | 20:47 | ||
hm, that still gives me "use of uninitialized value of type Any in string context". maybe i'm looking the wrong way | 20:49 | ||
skids | Maybe the "self" sugar is less fully fleshed in Mu.pm -- so see if it works with "method new($selfish : *@)" | 20:50 | |
timotimo | what's the : there for? | ||
skids | It's the named invocant comma substitute | ||
jnthn | I don't think self is very sugary | ||
timotimo | mhm | 20:51 | |
skids | of so I guess I meant "method new($selfish : $, *@)" | ||
jnthn: one can always lick oneself to find out. | 20:52 | ||
timotimo | OK. | 20:53 | |
20:57
kaare_ left
|
|||
FROGGS | All tests successful. \o/ | 21:01 | |
FROGGS .oO( "I love it when a plan comes together" ) | |||
[Coke] is reminded he still hasn't see the last 10m of the ateam movie! | 21:02 | ||
tadzik still didn't see the first 10m | 21:03 | ||
timotimo | ooooh m( | ||
dalek | p-jvm-prep: b172cc3 | jonathan++ | / (3 files): Implement getcurhllsym and bindcurhllsym. |
||
timotimo | what did i do? | ||
FROGGS | there is an A-Team movie? | ||
timotimo | X::Constructor::Positional.new.throw(name => self.WHAT.^name) | ||
and i was wondering why it said "use of any in string context" | |||
jnthn | The .WHAT there is redundant. | 21:04 | |
timotimo | i added it after i saw that it didn't work without :P | ||
masak | jnthn: I read "getcurhllsym and bindcurhllsym" and thought "great, now jnthn is just piling consonants on top of each other!" :P | 21:06 | |
skids | FROGGS: yes but Mr.T. proved irreplaceable. | ||
[Coke] thought it was a fun action flick that a decent job paying homage to the show. | |||
moritz | masak: re removeRange, none of the arguments contradict it being a public method | 21:07 | |
masak | moritz: heh. | ||
FROGGS | skids: ahh, from 2010... since I have kids since 2009 I dont watch new films anymore :/ | ||
moritz | masak: his logic is quite good, but he doesn't think it to the end | ||
masak | moritz: except that you're meant to use .clear as an external user | ||
jnthn | masak: hey, there's loads of vowels in there! | ||
Go eat your zmrzlina :P | 21:08 | ||
moritz | masak: afaict .clear is higher level | ||
masak: there's no damage to exposing the lower level method too | |||
FROGGS | rn: say "test" ~~ /. ** 0/ | 21:09 | |
p6eval | rakudo b49cbe: OUTPUT«「」» | ||
..niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(0) text() pos([].list) named({}.hash)>» | |||
FROGGS | r: say("test" ~~ /. ** 0/) | 21:10 | |
p6eval | rakudo b49cbe: OUTPUT«「」» | ||
masak | masak: I see what you mean. and I think I agree. | 21:12 | |
moritz just assumes he was meant | |||
masak | heh. | ||
masak .oO( even I start confusing us now ) | 21:13 | ||
I take that as the cue it's time to zzz. | |||
'night, #perl6 | |||
diakopter | o/ | ||
flussence | .oO( getcurhllsym sounds vaguely Welsh ) |
21:14 | |
jnthn | heh, it kinda does :) | 21:16 | |
skids | Speaking of ".clear" does anyone know what the "KitchenSink" ".clear" method mentioned in S06 is/was supposed to do? | 21:21 | |
jnthn | .oO( The dishes? ) |
21:24 | |
dalek | p-jvm-prep: 37b31a7 | jonathan++ | lib/QAST/JASTCompiler.nqp: Implement QAST::VarWithFallback. |
21:27 | |
p-jvm-prep: f27702d | jonathan++ | t/qast_variable.t: Test QAST::VarWithFallback. |
|||
p-jvm-prep: 79a1301 | jonathan++ | docs/ROADMAP: ROADMAP update. |
21:28 | ||
21:31
bluescreen100 joined,
bluescreen10 left
|
|||
timotimo | should i really add the types of the arguments for the error that gets thrown by the default constructor? | 21:33 | |
jnthn | timotimo: No, that seems more info than needed and not really that helpful | 21:34 | |
FROGGS | the types of the args you passed to it? no, but maybe the named args you can pass | ||
timotimo | good. | 21:36 | |
FROGGS: so, inspect self.new.candidates? is there a common method that lists the candidates with their signatures? | 21:37 | ||
FROGGS | like "Default constructor of 'Foo' only takes named arguments: Str host, Int port" | ||
timotimo: no idea | |||
jnthn | You can't easily do that. | ||
FROGGS | meh | 21:38 | |
jnthn | As in, reliably. | ||
If you know all that's there is the default constructor, you can do it. | |||
FROGGS | hmmm, true | ||
jnthn | If the user has written their own, or written a BUILD somewhere, you just don't know. | ||
21:39
nyuszika7h left
|
|||
timotimo pullrequested | 21:42 | ||
21:45
nyuszika7h_ joined
21:46
nyuszika7h_ is now known as nyuszika7h
21:47
skids left
|
|||
FROGGS | r: say "foo" ~~ m/. ** 0/ | 21:48 | |
p6eval | rakudo b49cbe: OUTPUT«「」» | ||
FROGGS | r: say "foo" ~~ m/. ** {0}/ | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===Quantifier quantifies nothingat /tmp/4T0R419hH4:1------> say "foo" ~~ m/. ** ⏏{0}/ expecting any of: postfix infix or meta-infix infix stopper prefix or term prefix or m… | ||
21:50
Rix left
|
|||
dalek | ast: 9a11e22 | (Tobias Leich)++ | S05-mass/rx.t: RT #116415, test that /. ** 0/ doesnt match entire string |
21:52 | |
21:55
benabik left
22:02
Rix joined,
PacoAir left
22:04
ph1ur3 left,
ph1ur3 joined
22:08
spider-mario_ left
22:10
hash_table left
|
|||
jnthn | 'night, #perl6 | 22:12 | |
diakopter | o/ | 22:13 | |
22:28
MegaTraveller joined,
MegaTraveller left
|
|||
[Coke] | timotimo: did you test pugs on that one or just guessing? Either way, thanks! | 22:38 | |
22:38
cog left
|
|||
timotimo | that one, which one? | 22:41 | |
FROGGS | [Coke]: I guess you mean me, I didnt tested, but similar ones are already skipped for pugs (/. ** N/ that is) | 22:42 | |
22:43
sqirrel left
22:44
cog joined
|
|||
timotimo | it's weird to me. putting a pull request up and holding on to the roast changes | 22:44 | |
rindolf | Hi all, is there an official Perl 6 Beginners' Site? www.begin-site.org/ | 22:45 | |
FROGGS | fiddling something else right now, otherwise I would apply locally and merge afterwards | ||
timotimo: you could add the tests to a branch | 22:46 | ||
22:46
snearch joined
|
|||
timotimo | that makes some sense. could be pretty noisy, though | 22:46 | |
TimToady | FROGGS: $($_) is exactly the same as $_, which matches the contents of $_ literally; { $_ } is a mistake, since a bare closure is evaluated only for its side effects | 22:51 | |
FROGGS | TimToady: thanks | 22:52 | |
TimToady | <{ $_ }> would interpolate $_ as a regex | ||
FROGGS | TimToady: are the some special test cases I should add, except for working $($_) ? | 22:53 | |
TimToady | probably don't need tests for bare closures since we use them frequently, but dunno about things like <{ $_ }> offhand | 22:54 | |
22:54
swarles joined
|
|||
TimToady | I imagine they have some tests already | 22:54 | |
FROGGS | k, thank you | ||
TimToady | but yes, $($_) should work, along with $$_ and $$$$$$$_ | 22:55 | |
FROGGS | r: say "abc" ~~ m/ $$_ / | ||
p6eval | rakudo b49cbe: OUTPUT«「abc」» | ||
TimToady | r: say "abc" ~~ m/ <{ $_ }> / | 22:56 | |
p6eval | rakudo b49cbe: OUTPUT«「abc」» | ||
TimToady | r: say "a.c" ~~ m/ <{ $_ }> / | 22:57 | |
p6eval | rakudo b49cbe: OUTPUT«「a.c」» | ||
TimToady | r: say "a\wc" ~~ m/ <{ $_ }> / | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\w'at /tmp/HsgBYeWV59:1------> say "a\⏏wc" ~~ m/ <{ $_ }> / expecting any of: argument list prefix or term prefix or meta-prefix double quotes… | ||
dalek | kudo/nom: b5a63c6 | (Timo Paulssen)++ | src/core/ (2 files): Constructor::Positional tells what class it came from. |
22:58 | |
kudo/nom: ebe7eb4 | (Tobias Leich)++ | src/core/ (2 files): Merge pull request #99 from timo/positional_new_error Constructor::Positional tells what class it came from. |
|||
TimToady | r: say "a\\wc" ~~ m/ <{ $_ }> / | ||
p6eval | rakudo b49cbe: OUTPUT«#<failed match>» | ||
timotimo | oh yay :) | ||
swarles | r: say Q/'test \'\' \n test'/ ~~ /\'(<-['\\]*[\\.<-[\'\\]>*]*)\'/ | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===regex assertion not terminated by angle bracketat /tmp/JWmRkJHcnp:1------> ay Q/'test \'\' \n test'/ ~~ /\'(<-['\\]⏏*[\\.<-[\'\\]>*]*)\'/ expecting any of: postfix infix or meta-infix i… | ||
swarles | r: say Q/'test \'\' \n test'/ ~~ /\'(<-['\\]>*[\\.<-[\'\\]>*]*)\'/ | ||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 0 => 「test \'\' \n test」» | ||
dalek | ast: b832056 | (Timo Paulssen)++ | S32-exceptions/misc.t: check for X::Constructor::Positional .name attribute. |
||
swarles | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\'(<-['\\]>*[\\.<-[\'\\]>*]*)\'/ | 22:59 | |
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 0 => 「test \'\' \n test」» | ||
swarles | \o/ | ||
TimToady | r: say 'a\wc' ~~ m/ <{ $_ }> / | ||
p6eval | rakudo b49cbe: OUTPUT«#<failed match>» | ||
TimToady | good | ||
[Coke] | rindolf: nope, though I imagine we'd pick some other site than one with such `blue' links. | ||
[Coke] chuckles at For more information about this topic, see: masak - “How Perl 6 could kill us all!” | 23:00 | ||
TimToady | swarles: that seems way more complicated than it needs to be... | ||
rindolf | [Coke]: well, I have yet to assign a better style for www.begin-site.org . | ||
[Coke]: and it's not a high priority for me for now. | |||
[Coke] | rindolf: the "motherfucker" kind of puts me off. | ||
rindolf | [Coke]: heh, well that's Zed Shaw for you. | 23:01 | |
It's still a useful resource. | |||
[Coke] | *that* kind of blue, not CSS kind. | ||
rindolf | What? | ||
swarles | I was just testing another version of the expression that I found laying around the web | ||
TimToady | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' (\\.|.)*? \'/ | ||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 0 => 「t」 0 => 「e」 0 => 「s」 0 => 「t」 0 => 「 」 0 => 「\'」 0 => 「\'」 0 => 「 」 0 => 「\n」 0 => 「 」 0 => 「t」 0 => 「e」 0 => 「s」 0 => 「t」» | ||
TimToady | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' (\\.|.)*?: \'/ | 23:02 | |
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===Unrecognized regex metacharacter : (must be quoted to match literally)at /tmp/ijXra6jjE4:1------> re this isn't greedy'/ ~~ /\' (\\.|.)*?:⏏ \'/Unable to parse regex; couldn't find final '/'at /tmp/ijXra6jjE4:1-… | ||
swarles | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' (<-[\'\\]|\\.) \'/ | ||
p6eval | rakudo b49cbe: OUTPUT«===SORRY!===regex assertion not terminated by angle bracketat /tmp/Kju7FtI2dq:1------> ure this isn't greedy'/ ~~ /\' (<-[\'\\]⏏|\\.) \'/ expecting any of: postfix infix or meta-infix infix stopper… | ||
swarles | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' (<-[\'\\]>|\\.) \'/ | ||
p6eval | rakudo b49cbe: OUTPUT«#<failed match>» | ||
swarles | whoops | 23:03 | |
r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' (<-[\'\\]>|\\.)* \'/ | |||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 0 => 「t」 0 => 「e」 0 => 「s」 0 => 「t」 0 => 「 」 0 => 「\'」 0 => 「\'」 0 => 「 」 0 => 「\n」 0 => 「 」 0 => 「t」 0 => 「e」 0 => 「s」 0 => 「t」» | ||
swarles | Is there a way to capture with named groups? | ||
TimToady | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' ( [\\.|.]*? ) \'/ | ||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 0 => 「test \'\' \n test」» | ||
TimToady | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' $<insides>=( [\\.|.]*? ) \'/ | 23:04 | |
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 insides => 「test \'\' \n test」» | ||
TimToady | r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' $<insides>=[ [\\.|.]*? ] \'/ | ||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 insides => 「test \'\' \n test」» | ||
swarles | oh, fun. | ||
TimToady | like that | ||
that | should even work in the other order, given LTM | |||
r: say Q/'test \'\' \n test' making sure this isn't greedy'/ ~~ /\' $<insides>=[ [.|\\.]*? ] \'/ | 23:05 | ||
p6eval | rakudo b49cbe: OUTPUT«「'test \'\' \n test'」 insides => 「test \'\' \n test」» | ||
TimToady | yes, it does | ||
swarles | Hm, that expression seems almost too good to be true | ||
23:05
hash_table joined
|
|||
TimToady | but it shows in essence why it doesn't matter what order you add your rules to your grammar, since it will always try to match the longest token | 23:06 | |
the ordering only matters on ties | |||
23:07
japhb_ joined
|
|||
TimToady | the | is just a very small alternation, and a grammatical category such as "infix" is just a large alternation written a little differently so that multiple grammars can contribute to the same alternation | 23:08 | |
mind, I'd never write . | \\. because that is intentionally misleading to the reader | 23:09 | ||
who will at least read the code left-to-right, even if the compiler is smart enough to match the right side first | |||
23:11
benabik joined
|
|||
TimToady | the other important thing to note there is that I used *? rather than * | 23:11 | |
the . forms would not work with * very well, at least not without backtracking | |||
often when you are using quantified . in Perl, you really want the minimal matching, not the greedy | 23:12 | ||
23:13
fgomez left,
hash_table left,
fgomez joined
|
|||
TimToady | so the combination of LTM with *? is what makes the "almost too good to be true" actually guaranteed to work right | 23:13 | |
swarles | hm. I didn't actually consider that | ||
TimToady | P5 regexes are always left-to-right without LTM, so there you *have* to write the \\. | . form (along with *?) | 23:14 | |
can do the same in P6 with \\. || . | 23:15 | ||
the || alternation is left-to-right, like | in P5 | |||
swarles | I really need to take time to read the full specification | 23:16 | |
TimToady | hard to know which form will actually run faster in P6, but I'd guess the || form is likely faster in this case | ||
23:17
MayDaniel left
|
|||
swarles | Well in the case of the grammar, is it only evaluated once or is it evaluated everytime it's invoked if I'm using the PCT | 23:17 | |
TimToady | the alternation has to be evaluated for each "loop" of the outer quantifier, so once for each character (not counting backslashes) | 23:18 | |
your character class form might actually run faster if it can be hoisted up into the LTM regex engine | 23:20 | ||
a DFA engine then would only be invoked once for the whole thing, as long as the innards are not too complicated to do in DFA | 23:21 | ||
23:22
stopbit left
|
|||
TimToady | DFAs work well with * quantifiers that way, and don't really work with the *? of my "dotty" forms, so don't let me persuade you that the . form is necessarily better, at least from a performance point of view | 23:22 | |
otoh, after the LTM matcher, it still has to traverse the string in the normal way, especially if you want to capture anything, so maybe it's a wash, and you should just use the more readable form | 23:24 | ||
.o(Go not to the Elves for advice, for they will say both 'yes' and 'no'.) | 23:25 | ||
actually, if you're using PCT, you probably can't rely on LTM, so be sure to write \\. first | 23:26 | ||
TimToady didn't notice the "if I'm using the PCT" earlier... | |||
timotimo | good *, happy perl6 people! | 23:27 | |
dalek | p: b8a381e | (Tobias Leich)++ | src/QRegex/P6Regex/ (2 files): allow the use of $(...) in P6Regex |
||
TimToady | what about the rest of us? | ||
timotimo | really looking forward to the day when i contribute something other than spectests and improved error messages x) | ||
japhb | timotimo, those are really important things | ||
benabik | timotimo++ # doing really important things | 23:28 | |
TimToady | timotimo++ # for so expertly fishing for compliments :) | 23:29 | |
23:36
cog left
23:59
snearch left
|
|||
dalek | kudo/nom: d97ad43 | (Tobias Leich)++ | tools/build/NQP_REVISION: bump nqp rev for $(...) in regexes |
23:59 |