»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:11
mattp_ joined
00:14
kyclark joined
00:15
telex left
00:17
rindolf left
00:19
kyclark left
00:24
RabidGravy left
00:25
dj_goku joined,
dj_goku left,
dj_goku joined
00:30
sufrostico left
00:31
telex joined
00:34
pierre_ joined
00:40
bazzaar left
01:02
cooper_ left,
pierre_ left
01:10
mohae_ joined
01:12
mohae left
01:16
cooper_ joined
01:20
geraud left
|
|||
dalek | c: 5e0175f | seatek++ | doc/Language/regexes.pod6: Added POSIX character classes Didn't test *all* of them. |
01:29 | |
synopsebot6 | Link: doc.perl6.org/language/regexes | ||
01:35
travis-ci joined
|
|||
travis-ci | Doc build errored. seatek 'Added POSIX character classes | 01:35 | |
travis-ci.org/perl6/doc/builds/177192209 github.com/perl6/doc/compare/87c25...0175f0919d | |||
01:35
travis-ci left
|
|||
seatek | dalek: exterminate travis | 01:39 | |
BenGoldberg | Daleks only exterminate Doctors, everyone knows that. | 01:51 | |
01:54
richi235 left
|
|||
gfldex | viki: on it | 01:55 | |
yoleaux | 18 Nov 2016 22:27Z <viki> gfldex: FYI: github.com/gfldex/perl6-pod-to-bigpage/issues/5 | ||
01:56
bitmap joined
02:02
itaipu left
|
|||
gfldex | does anything speak against adding IO::Socket::SSL as a dep of LWP::Simple? | 02:04 | |
dylanwh | I would argue for that -- HTTP pretty much means HTTPS these days | 02:07 | |
02:07
travis-ci joined
|
|||
travis-ci | Doc build errored. seatek 'Added POSIX character classes | 02:07 | |
travis-ci.org/perl6/doc/builds/177192209 github.com/perl6/doc/compare/87c25...0175f0919d | |||
02:07
travis-ci left
|
|||
gfldex | travis is happy with Pod::To::BigPage now so the next doc build should be fine | 02:10 | |
seatek | don't make excuses for him. travis just hates me. DALEK!! | 02:17 | |
Xliff | What is the difference between '|' and '||' in a grammar? | 02:20 | |
BenGoldberg | m: use MONKEY-SEE-NO-EVAL; BEGIN 'my $fourtwo = 42;'; say $fourtwo | ||
camelia | rakudo-moar bca0ae: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$fourtwo' is not declaredat <tmp>:1------> 3NO-EVAL; BEGIN 'my $fourtwo = 42;'; say 7⏏5$fourtwo» | ||
Xliff | seatek: EXX - TEEER - MIIIIIN - AAAATE! | ||
Er.. *cough*... Sorry. I couldn't resist. | 02:21 | ||
seatek | happy happy! :) | ||
gfldex | | is longest token || is just or | ||
Xliff | seatek: joy joy! ;) | ||
gfldex: Ah! I got it. | |||
I think. | |||
gfldex | when it comes to grammars "I think" is pretty much the default :) | 02:22 | |
Xliff | gfldex: In some cases, those can mean the same thing, right? | ||
gfldex | i think so :D | ||
Xliff | gfldex: LOL! | ||
AlexDaniel | well the idea is that you should prefer |, I think | 02:26 | |
Xliff | Not really. | 02:27 | |
AlexDaniel | but code blocks and other stuff actually work like if it was || | ||
Xliff | "longest token" is important. Much of what I am doing wants "shortest token" which is "||" which has been what I have been using. | ||
AlexDaniel | ummmmm… | ||
Xliff | "longest token" I think is more appropriate to TOP, or something similar. | ||
AlexDaniel | can you show some examples? | ||
because it does not sound right | |||
Xliff | By something similar, I mean a rule that encompases many other alternative subrules. | 02:28 | |
Look at DateTime::Parse. | |||
The TOP rule there gives a good example of using "|" over "||" | 02:29 | ||
Just took the gfldex's explanation to get the bulb to light. | |||
02:33
Coleoid_ns left
|
|||
seatek | I always use | instead of ||, and it always works, and i don't know why | 02:34 | |
looks like dalek finally took care of travis. excellent. | 02:37 | ||
02:44
obfusk left,
obfusk joined
02:45
ilbot3 left
02:47
ilbot3 joined
|
|||
Xliff | EXX - TEEER - MIIIIIN - AAAATE! | 02:53 | |
(Don't blame me! seatek said "dalek" again!!!) | |||
Oooh! | 02:55 | ||
www.youtube.com/watch?v=YQLbwOGT8e...abbitastic | |||
And... with that... I'm done. | |||
My point has been made. | 02:56 | ||
02:57
Herby_ left
|
|||
Xliff | (Hmm.... I may have overplayed my hand.... ) | 02:57 | |
(That | |||
(That last link might be a bit too....excessive) | |||
seatek | mmm. calming ambient background noise - thanks Xliff! | 02:58 | |
Xliff | LOL! | 02:59 | |
02:59
dextertzu left
03:05
canopus left
03:07
dextertzu joined
03:10
canopus joined
03:22
Celelibi left
03:26
Celelibi joined
|
|||
samcv | seatek, you mean for regex? | 03:31 | |
03:32
Steve_____ joined
|
|||
samcv | or anything? | will compare and not specify what order the things are checked. but || forces it to always check the same way, | is not guaranteed and can be optimized by the compilier | 03:32 | |
03:36
noganex_ joined
03:39
noganex left
03:43
Unavowed left
|
|||
samcv | hmm perl 6 regex section needs a part on the equivilants of things like \S which is <-ws> and \s which is <ws>. i think i might work on a section for that | 03:53 | |
or maybe it would go better in another section? anybody have any opinion on that before i start working on a PR for perl6doc? | |||
gfldex | samcv: all the details should go into docs.perl6.org/type/Regex | 03:55 | |
samcv | ok thanks gfldex :) | ||
gfldex, so it should go in type/Regex not Language/Regex? | 03:57 | ||
found the pod page for the type. will work on that the next few days | |||
seatek | samcv, yeah i was talking about use as tokens in grammar actually. i always use the single | there. || i usually use in normal code. i had no idea about that distinction :) thanks! | 04:05 | |
samcv | np :) | ||
also it's the same for & and && fyi | |||
at least in regex | |||
seatek | i had already lept to that wild and reckless conclusion! :) | ||
samcv | heh | 04:06 | |
04:09
khw left,
BenGoldberg left
|
|||
MasterDuke | | is longest match, || is first match. so if you order your alternations from longest to shortest with ||, it should be the same as using | | 04:13 | |
AlexDaniel | what's the list of exceptions for this, by the way? | 04:14 | |
seatek | and what does "longest" mean in this context? | ||
length of the regex? for processing? so that the fastest processing goes first? | 04:15 | ||
or does it analyze the complexity of the regex... ;) | 04:16 | ||
MasterDuke | well, 'abc' is longer than 'ab'. i believe 'ab*' is longer than 'ab', but i'm not 100% sure | ||
AlexDaniel: what do you mean exceptions? | 04:17 | ||
PerlJam | longest == length of the string matched. | ||
seatek | ah ok simple length - so it won't go so far as to place regexes with variables in them last necessarily | 04:18 | |
PerlJam | well, not ==, but that's what it's referring to. Whichever alternation matches the most characters, wins. | ||
MasterDuke | Xliff: i was trying to recreate your MAST::Frame bug report, but couldn't with an up-to-date moar/rakudo. do you still get it? | 04:19 | |
samcv | that is true also MasterDuke as well | ||
seatek, if you want to go into the rabbit hole: design.perl6.org/S05.html | |||
most but not all info there is accurate | |||
AlexDaniel | MasterDuke: this kinda answers my question, but not completely: design.perl6.org/S05.html#Longest-token_matching | ||
seatek | no.. no i don't. i just escaped a rabbit hole. i need to get actual work done | ||
i shouldn't be looking at this window | 04:20 | ||
04:20
telex left
|
|||
samcv | haha | 04:20 | |
seatek, "Since "longest-token matching" is a long phrase, we will usually refer to this idea as LTM." | |||
PerlJam | m: "foo" ~~ / fo | fo* /; say $/; | ||
camelia | rakudo-moar bca0ae: OUTPUT«「foo」» | ||
PerlJam | m: "foo" ~~ / fo || fo* /; say $/; | ||
samcv | don't you feel better now? | ||
camelia | rakudo-moar bca0ae: OUTPUT«「fo」» | ||
04:20
telex joined
|
|||
samcv | :) | 04:20 | |
AlexDaniel | m: "foooo" ~~ / foo | fo*? /; say $/; | 04:21 | |
camelia | rakudo-moar bca0ae: OUTPUT«「f」» | ||
AlexDaniel | ah, f | ||
seatek | i do feel better. but it might be the cake | ||
AlexDaniel | m: "foooo" ~~ / fo | fo[o|oo] /; say $/ | ||
camelia | rakudo-moar bca0ae: OUTPUT«「fooo」» | ||
AlexDaniel | m: "foooo" ~~ / fo | fo[o|[o|oo]] /; say $/ | 04:22 | |
camelia | rakudo-moar bca0ae: OUTPUT«「fooo」» | ||
Xliff | MasterDuke: I will test. One sec. | ||
AlexDaniel | ummmmm | ||
so, what's happening there? | 04:23 | ||
Xliff | Rebuilding | ||
AlexDaniel | why not foooo ? | ||
PerlJam | That might be an LTM bug. I dunno | ||
04:24
BenGoldberg joined
|
|||
AlexDaniel | m: "foooo" ~~ / fo[o|[o|oo]] /; say $/ | 04:24 | |
camelia | rakudo-moar bca0ae: OUTPUT«「fooo」» | ||
AlexDaniel | m: "f12345" ~~ / f1[2|[3|34]] /; say $/ | ||
camelia | rakudo-moar bca0ae: OUTPUT«「f12」» | ||
PerlJam | I would have expected "foooo" ~~ / foo | fo*? /; to match "foo" too | 04:25 | |
seatek | pl yjsy | ||
AlexDaniel | ah my bad | ||
m: "f12345" ~~ / f1[2|[2|23]] /; say $/ | |||
camelia | rakudo-moar bca0ae: OUTPUT«「f123」» | ||
seatek | oops drunk i guess | ||
AlexDaniel | PerlJam: not a bug, we're just blind | 04:26 | |
PerlJam | yeah, and tired. Long day and I just got off of a plane an hour ago | ||
04:28
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
PerlJam | I'm still not grokking how "foooo" ~~ / foo | fo*? / only matches "f". That means the second alternation wins, but "foo" is longer than "f" | 04:29 | |
I guess I'm not clear on what it means for *? to "stop" LTM | 04:31 | ||
anyway ... I still think it's a bug | 04:32 | ||
04:32
AlexDaniel left
04:36
kyclark joined
04:47
geraud joined
|
|||
samcv | nice seatek | 04:50 | |
you and me both. though maybe not that much. yet... | |||
ugh i hate how i tell people about perl 6 and how great it is and they always tell me how old and out of date perl 5 is :( nobody knows it's a whole new language | 04:51 | ||
well Perl 5 people understand, but seems only people that *haven't* been a perl programmer pass horrible judgment on perl 6 | |||
perigrin | generally anymore people who haven't been a Perl programmer in the last decade pass horrible judgement on Perl5 too | 04:53 | |
04:55
kyclark left
04:57
mayathecat joined
05:05
mayathecat left
05:07
Xliff left
05:15
Cabanossi left
05:19
Cabanossi joined
05:22
dextertzu left
|
|||
samcv | yeah :( | 05:32 | |
TEttinger | generally people who haven't been part of the Manson Family in the last decade pass horrible judgment on the Manson Family as well. | 05:47 | |
you can substitute a lot in thee | |||
there | |||
05:57
skids left
06:00
dextertzu joined
06:04
pierre_ joined,
pierre_ left,
pierre_ joined
|
|||
seatek | yeah it's weird how much the same perl6 is compared to perl5 - while still being very very different. it's more swooshy than pointy. more twisty than knotty | 06:18 | |
BenGoldberg wants a magic wand which is both swooshy and pointy. | 06:20 | ||
seatek | :) | 06:21 | |
06:37
BenGoldberg left
06:46
chaon joined
|
|||
samcv | Perl 6 "Inspired by Perl 5", oh btw we threw out 100% of the code. (based on a true story) | 06:51 | |
they should make a movie | |||
will be just like those movies ‘based on a true story’ | 06:52 | ||
seatek | they'll have to cut the bit about the UFOs though | 06:57 | |
06:57
chaon left
06:59
ingy left,
ingy joined
07:03
wamba joined
|
|||
samcv | but that's the only true part :( | 07:20 | |
07:23
darutoko joined
07:24
ChoHag left,
ChoHag joined
|
|||
samcv | seatek, i.imgflip.com/1eg2l1.jpg made just now | 07:25 | |
:3 | |||
seatek | :) | 07:29 | |
07:30
zakharyas joined
07:44
chaon joined
07:45
FROGGS joined
07:53
Steve_____ left
08:00
geraud left
08:03
cibs left
08:04
cibs joined
08:06
Tonik joined
08:09
RabidGravy joined
08:11
aborazmeh left
08:24
firstdayonthejob joined
08:52
firstdayonthejob left,
espadrine joined
08:54
wamba left
08:58
chaon left
09:07
pierre_ left
09:16
ilbot3 left
09:17
ilbot3 joined
09:27
itaipu joined
09:39
chaon joined
09:41
rindolf joined
09:47
chaon left
|
|||
nine | Anyone managed to install HTTP::Server::Tiny on current rakudo? I get errors like "No exception handler located for catch" in the tests | 09:55 | |
09:55
amalia_ left
09:56
amalia_ joined
09:57
bjz joined
10:00
espadrine left
|
|||
stmuk_ | nine: works for me fine with rakudobrew of 2 mins ago | 10:03 | |
nine | stmuk_: odd. Ok will dig some | ||
stmuk_: oh, you'll never guess this: those failures are apparently caused by my prove6 wrapper script that does prove -e 'perl6 -Ilib' | 10:13 | ||
10:13
itaipu left
10:14
pierre_ joined
|
|||
stmuk_ | ha | 10:15 | |
"Tea CI is a continuous integration service for Windows developers, free for open source projects." | 10:16 | ||
but | |||
"Cygwin/Msys2 on Wine in order to compile Windows software" | |||
:D | |||
10:18
rpburkholder joined,
espadrine joined
10:25
espadrine left
10:29
labster left
10:31
moritz joined
10:32
pierre_ left
|
|||
moritz | good morning from the other side of an unepected VM reboot | 10:35 | |
[ptc] | mornin' :-) | 10:39 | |
moritz: how did the devops days go? | 10:42 | ||
moritz | [ptc]: very well. I had some interesting discussions with developers of tools that I use, with others in similar positions to mine, and so on | 10:47 | |
[ptc]: and I took home some ideas to pursue | 10:48 | ||
[ptc] | sounds productive :-) | 10:49 | |
when does your article appear in iX, btw? | |||
moritz | [ptc]: 01/2017 | ||
[ptc] | I've looked a couple of times and haven't spotted it. | 10:50 | |
ah, thanks | |||
10:50
setty1 left
|
|||
moritz | it was scheduled earlier, but somehow got delayed | 10:50 | |
10:50
itaipu joined,
setty1 joined,
nowan left
10:51
setty1 left
|
|||
[ptc] | I'd noticed a couple of iX issues with devops stuff in them and thought that the article must be in there somewhere, but wasn't. Had thought that maybe I'd missed it somehow | 10:51 | |
10:51
setty1 joined
10:52
espadrine joined
10:53
kurahaupo__ joined
|
|||
lizmat | www.kickstarter.com/projects/14228...ing-perl-6 at 51% funded ! | 10:54 | |
weee | |||
:-) | |||
[ptc] | yay! | ||
moritz: thanks for the commit bit to community-modules. :-) I'm digging a bit in p6-test-builder; the docs seem a bit outdated, and I was wondering how one specifies the author now | |||
moritz: then I can commit some patches to e.g. the README to bring things up to date | 10:55 | ||
10:56
pierre_ joined
|
|||
[ptc] | my guess was to mention the original author, and then add a note about the current authors being the community-modules maintainers. Is there a standard sentence that is currently used for that? | 10:58 | |
tadzik | hmm, only one dead tree reward and already taken :( I guess I'll have to buy it afterwards then, and back it anyway for now :) | ||
moritz | tadzik++ | 11:00 | |
11:00
espadrine left
|
|||
moritz | [ptc]: you're welcome | 11:00 | |
if anybody else wants access to the perl6-community-modules org, please let me know | 11:01 | ||
dudz | is this my chance to get access while they are up for grabs, my once in a limited time shot? | 11:13 | |
timotimo | as long as you don't throw up mom's spaghetti on your sweater, go for it! | 11:14 | |
moritz | dudz: no, it's a permanent offer :-) | 11:16 | |
dudz: but do tell me your github account name | |||
dudz | :) | ||
dudzorg | 11:17 | ||
please don't judge me by my activity | |||
great :) | |||
i'm part of a team :D | |||
my first gang :D | 11:18 | ||
moritz | dudz: I've invited you to the perl6 org too (because I can) | ||
dudz | :D | ||
thanks moritz | 11:19 | ||
[ptc] | next silly question of the day: is ufo still used? Should it be used? | 11:20 | |
11:20
chaon joined
|
|||
timotimo | i don't see a need for it any more | 11:21 | |
moritz doesn't use ufo anymore | |||
but the README is still great | |||
[ptc] | yes :-) I get the feeling masak had lots of fun writing it | 11:22 | |
timotimo | yup | 11:23 | |
11:25
chaon left
|
|||
stmuk_ | ufo doesn't work anymore but has been usful when panda has been broken | 11:28 | |
moritz | question for the CSS geeks: on perlgeek.de/blog-en/automating-dep...ivery.html what do I have to change to prevent the signup form from aligning with the lower edge of the left sidebar? | 11:31 | |
11:31
petercommand is now known as petrakindle
|
|||
[ptc] | it's mentioned in several READMEs in the ecosystem, so I just wondered if the information was up to date. | 11:31 | |
maybe I should submit a few patches | |||
moritz | [ptc]: I guess it was just a template circulating at that time | 11:32 | |
timotimo | sounds like a plan | ||
[ptc] | come to think of it, are there any plans for something akin to p5's Makefile.PL? | ||
maybe I'm just showing my age, but there's something nice about being able to run 'make test', 'make dist', 'make realclean' etc. | 11:33 | ||
stmuk_ | and then deleting stuff not removed by realclean | ||
[ptc] | ... that's distclean, no? | 11:34 | |
stmuk_ | maybe | ||
mrproper! | |||
[ptc] | .oO( make mrproper ) |
11:35 | |
11:43
domidumont joined,
domidumont left
11:44
domidumont joined
|
|||
[ptc] | who is the copyright-holder of repos hosted under perl6-community-modules? Is it something like: Perl6 Community Modules Team? | 11:46 | |
just wondering how ownership/attribution/etc. works in this case | 11:47 | ||
moritz | I'd just write "The Perl 6 Community" | ||
[ptc] | cool, thanks! | 11:49 | |
11:49
domidumont left
|
|||
[ptc] retreats to his editor again | 11:49 | ||
11:50
domidumont joined
11:52
cdg joined
11:56
cdg left
12:09
chaon joined,
pierre_ left
12:13
pierre_ joined
12:14
chaon left
12:16
pierre_ left
12:17
pierre_ joined,
khw joined
12:18
girafe joined
12:21
pierre_ left
12:39
Unavowed joined
12:45
padal joined
|
|||
RabidGravy | okay that's weird, this is still working, but the rest of the internet isn't from here | 12:46 | |
12:50
chaon joined
12:51
RabidGravy left,
RabidGravy joined
|
|||
RabidGravy | nothing that rebooting the router couldn't fixed | 12:54 | |
[ptc] | anybody have anything against me merging the currently Wiki-based docs for Date::WorkdayCalendar into the repo? | 12:57 | |
the detailed docs are in the wiki on another repo and hence can't be edited by the community, so it seems sensible to merge them into the community-based repo | 12:59 | ||
RabidGravy | sounds good to me | 13:08 | |
FROGGS | +1 | 13:09 | |
13:13
chaon left
13:14
nowan joined
|
|||
[ptc] | okey dokey. Ta :-) | 13:15 | |
13:22
nowan left
13:25
padal left
13:30
seatek left
13:36
nowan joined
|
|||
viki | moritz: *prevent*? Seems like it isn't aligning: i.imgur.com/4pyxPg4.png | 13:47 | |
(or did you fix it already) | 13:48 | ||
oh that was like... 2 hours ago :) | 13:49 | ||
viki mentally does | 13:51 | ||
viki mentally does #mc_embed_signup form { padding: 0; } to avoid that irking misalignment of the signup form | |||
moritz | viki: I fixed it, sorry for not informing you | 13:58 | |
turns out there were a few clear: left and clear:both that needed removing | 13:59 | ||
viki | Ah | ||
14:05
chaon joined
14:08
espadrine joined
14:16
AlexDaniel joined
|
|||
moritz | perlgeek.de/blog-en/perl-6/2016-book.html it's official now :-) | 14:17 | |
14:19
amalia_ left
|
|||
moritz | lizmat: ^^ would be great if you could include that in the next p6weekly | 14:19 | |
masak | moritz++! | 14:20 | |
14:20
amalia_ joined
14:25
bjz_ joined
|
|||
[ptc] | moritz++ | 14:25 | |
14:26
bjz left
|
|||
AlexDaniel | moritz++ \o/ | 14:26 | |
short book to get people started, great idea! | 14:27 | ||
RabidGravy | moritz++ nice one | 14:28 | |
viki | moritz: fwiw, the sign up form on that page shows no indication of anything happening successfully | 14:30 | |
(like it just goes blank after clicking submit) | |||
moritz | viki: uhm, do you use an ad blocker and/or noscript? | ||
viki | Yeah, I got AdblockPlusz | ||
moritz | I'm afraid ad blockers might block mailchimp | ||
MasterDuke | moritz++, btw, kyclark is also writing a book using Perl 6, www.gitbook.com/book/kyclark/metag...cs/details | ||
viki | Ah | 14:31 | |
OK | |||
moritz | MasterDuke: ooh, interesting, will link to it | ||
viki | moritz: hm, disabled adblock, but same result after submitting the form | ||
Just goes blank | |||
moritz | viki: eeks. Does the form at perl6book.com/#signup work better for you? | 14:32 | |
viki | Yeah, that one works. | 14:33 | |
Hm. I now see 3 "please confirm subscription" emails. So I guess the first form works too; it just doesn't say it does :) | 14:34 | ||
moritz | \o/ 3 vikis on my mailing list :-) | 14:36 | |
14:43
chaon left
14:44
obfusk left,
obfusk joined
15:00
bjz joined
15:01
bjz_ left
15:07
canopus left
|
|||
[ptc] | it seems I'm not a robot | 15:09 | |
15:09
NeuralAnomaly left
|
|||
moritz | poor you | 15:09 | |
15:09
NeuralAnomaly joined
|
|||
moritz | docs.perl6.org/type/Array.html#(Li...ethod_from there are two methods "from" in here | 15:10 | |
and they seem to contradict each other | |||
[ptc] | moritz: the subscribe form didn't tell me that I'd submitted anything, however that could just be due to the adblocker | 15:11 | |
the subscribe email, however arrived :-) | |||
moritz hates that stuff doesn't simply work :/ | |||
[ptc] | moritz: oh, and ping me as soon as you need any more proofreading done | ||
15:11
skids joined
|
|||
moritz | [ptc]: sure, will do. Thanks | 15:12 | |
15:13
RabidGravy left
15:14
canopus joined
15:17
NeuralAnomaly left
15:19
NeuralAnomaly joined
15:20
skids left
15:26
RabidGravy joined
15:41
wamba joined
15:45
wamba left
15:54
Herby_ joined
|
|||
Herby_ | \o | 15:54 | |
15:57
NeuralAnomaly left
15:59
NeuralAnomaly joined
|
|||
viki | \o | 16:01 | |
16:02
mohae joined
16:04
mohae_ left
16:05
chris2 left
16:06
petrakindle left
|
|||
timotimo | moritz: "between his and mind project"? :) | 16:15 | |
16:19
woodruffw left,
mtj_ left
16:20
chris2 joined
16:21
NeuralAnomaly left
16:23
NeuralAnomaly joined
16:31
wamba joined
16:36
wamba left
16:39
stux|RC-only left
16:41
stux|RC-only joined
16:48
firstdayonthejob joined
|
|||
moritz | timotimo: fuxed :-) | 16:50 | |
timotimo | jesus christ, that change log is humongous | 17:03 | |
viki | That's good :) | 17:04 | |
Especially considering a relatively small list of contributors for the release | |||
17:04
brillenfux joined,
brillenfux left
|
|||
timotimo | clearly we get more stuff done if we have fewer people helping | 17:05 | |
timotimo goes around kicking people out | |||
viki | :) | ||
timotimo kicks himself out | 17:06 | ||
phew, that's better | |||
17:10
NeuralAnomaly left
17:11
NeuralAnomaly joined
17:15
woodruffw joined
17:21
chaon joined
|
|||
moritz | stmuk_: pl6anet doesn't seem to pick up my blog posts anymore; could you please look into it? | 17:24 | |
17:26
chaon left
|
|||
RabidGravy | eek just discovered that I've been running a rabbitmq instance on the internet with the default password for three years | 17:38 | |
I don't think anything untoward has happened | |||
moritz | at least you can't use rabbitmq to send spam :-) | 17:45 | |
timotimo | so you probably got automated data exfiltration done on it | 17:46 | |
17:46
brillenfux joined,
ggoebel left
|
|||
RabidGravy | yeah it could become the heart of a cracking botnet | 17:47 | |
timotimo | were you yourself using it at all? | 17:48 | |
RabidGravy | it's part of the radio playout system for futuremusic.fm | 17:55 | |
it's probably overkill for this, the message rate doesn't even blip | 18:04 | ||
garu waves | 18:06 | ||
yoleaux | 13 Nov 2016 17:58Z <TimToady> garu: if you want to return multiple values from a function, you should really use binding, which will work argument by argument, rather than list assignment, which will flatten like Perl 5's list assignment | ||
garu | TimToady: thanks! | 18:07 | |
hi everyone! Is there a way to create a trait that bundles different traits or restricts type (but as a trait, not as a subtype)? | 18:08 | ||
psch | garu: traits don't consistently change the type they are applied to | 18:09 | |
garu: what are you trying to do? | |||
garu | psch: something like "has $!foo is awesome" having the same effect as "has Str $!foo is rw is required where { $!foo.chars > 10 } = "this is my default" | 18:10 | |
18:11
davercc left,
sunnavy left
|
|||
garu | how should I go about doing something like that? | 18:11 | |
psch | garu: i don't think you can do that without macros | ||
garu | :( | 18:12 | |
is there a way around it? Or... how far can I go? can "is awesome" at least mean the other traits like "is rw is required"? | |||
then I can wrap the rest in a subtype I think | 18:13 | ||
psch | i guess that might work | 18:14 | |
something like sub trait_mod:<is>(Parameter $x, :$awesome) { $x is rw; $x is required } | 18:15 | ||
but you'd have to try and it might not work | |||
timotimo | needs a ! in the signature, too | ||
garu | cool, I'll give it a try, thanks! | 18:16 | |
timotimo | for examples, see the core setting, i suppose | 18:17 | |
18:17
brillenfux left
|
|||
garu | can I do it the other way around, as a type? i.e. "has Awesome $!foo" meaning "has Int $!foo is rw is required = 15"? | 18:19 | |
psch | i don't think so | 18:24 | |
the type of an Attribute doesn't know if the Attribute is required in the surrounding class | |||
at least afaik | |||
18:25
chaon joined
18:26
chaon left
|
|||
garu | hmm | 18:27 | |
what can I do to achieve something like that in perl 6 then? | |||
can I... create my own "has", maybe? | |||
like "class MyClass { awesome $!foo; } " and have $!foo hold whatever type/constraints/traits I want? | 18:28 | ||
RabidGravy | well you can over-ride the attribute meta class, I can't remember the exact involcation | ||
garu | I just want a shortcut for a type+constraints+traits that might be commonly used | 18:29 | |
RabidGravy | you'd have to alter the grammar to introduce an alternative to 'has' however | ||
garu | not really attached to how it's declared as long as it's short :D | ||
psch | garu: NativeCall defines it's own 'HAS', which is an inlined native attribute | ||
garu: maybe checking out NativeCall.pm can give you ideas | |||
garu | hmm.. thanks! I'll have a look! | 18:30 | |
psch | (although hiding a bunch of things in one keyword seems kinda too esoteric to me :) ) | ||
garu | meanwhile if anyone has any ideas, I'm all ears (or eyes in this case) | ||
18:30
petercommand joined,
petercommand left,
petercommand joined
18:31
petercommand left,
petercommand joined
|
|||
garu | I was hoping I could create a type or trait that would do all that for me... not really looking forward to implementing a DSL for this :X | 18:31 | |
psch | garu: my point is (1) rwness is not a type-thing, so it shouldn't hide in the type (2) default values are not a type thing, so they shouldn't hide in the type | 18:32 | |
garu: i'll yield that having a bunch of Attributes that all have the same default and rwness would demand such a shortcut | 18:33 | ||
but that's what i'd put into a macro i'd define in the scope of the class that needs it | |||
unfortunately our macros aren't quite there yet, from what i know | |||
garu | psch: so the best fit for this would be a class-scoped macro, but they are not implemented yet. Got it! | 18:34 | |
psch | garu: that's just my opinion, you might get others from others :) | 18:35 | |
mst | the trouble with perl6 actually having this stuff as features is it makes it harder to run roughshod over the design like we all do in 5land | ||
psch | dunno, i think arbitrary MOP hackery still kinda counts as 'running roughshod' | 18:36 | |
i mean, sure, it's the intended way to do so, but it still messes up everything everyone who doesn't know what's going would expect | 18:37 | ||
plus replacing %*LANG<MAIN> :P | |||
err, %~LANG it was i think | 18:38 | ||
ah, but we aren't quite there yet either it seems :) | |||
m: say %~LANG.keys | |||
camelia | rakudo-moar 907114: OUTPUT«(0)» | ||
RabidGravy | there is a variable with it | 18:39 | |
geekosaur | I thought that was still being considered speculative, because the original design wasn't flexible enough | 18:41 | |
psch | honestly, i'm not quite sure how useful it is in general to replace arbitrary strands of the language braid with arbitrary other languages | ||
i mean, i'm not saying it wouldn't be nice just for the heck of it, like, "from now on literal strings are in python syntax!" | 18:42 | ||
but when does one actually need the current language in any part of the braid to modify it | |||
18:54
padal joined
18:56
dextertzu left
|
|||
jnthn | Trait application is just function calls, so there's nothing to stop you implmenting a trait that just calls trait_mod:<is>(...) a bunch of times | 18:57 | |
garu | jnthn: interesting! | 18:59 | |
19:01
sunnavy joined
19:04
avalenn_ left
19:06
padal left
19:17
wamba joined
19:18
wamba left,
wamba joined
|
|||
RabidGravy | actually I've got a trait that calls a bunch of other traits somewhere | 19:25 | |
psch | m: multi trait_mod:<is>(Attribute \a, :$awesome!) { trait_mod:<is>(a, :required); trait_mod:<is>(a, :rw) }; class A { has $.x is awesome } | 19:27 | |
camelia | ( no output ) | ||
psch | m: multi trait_mod:<is>(Attribute \a, :$awesome!) { trait_mod:<is>(a, :required); trait_mod:<is>(a, :rw) }; class A { has $.x is awesome }; say A.new.^attributes[0].rw | ||
camelia | rakudo-moar 907114: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it. in block <unit> at <tmp> line 1» | ||
psch | m: multi trait_mod:<is>(Attribute \a, :$awesome!) { trait_mod:<is>(a, :required); trait_mod:<is>(a, :rw) }; class A { has $.x is awesome }; say A.new(:1x).^attributes[0].rw | ||
camelia | rakudo-moar 907114: OUTPUT«True» | ||
psch | so, yeah | ||
that works | |||
19:27
ggoebel joined
|
|||
psch | could probably still cobble default in there somewhere as well | 19:27 | |
m: multi trait_mod:<is>(Attribute \a, :$awesome!) { trait_mod:<is>(a, :default($awesome); trait_mod:<is>(a, :required); trait_mod:<is>(a, :rw) }; class A { has $.x is awesome("phoeey") }; say A.new().^attributes[0].rw | 19:28 | ||
camelia | rakudo-moar 907114: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in argument list; couldn't find final ')' at <tmp>:1------> 3>(a, :required); trait_mod:<is>(a, :rw) 7⏏5}; class A { has $.x is awesome("phoeey"» | ||
psch | orrr something | ||
not sure about 'is required' together with a default though | |||
geekosaur | m: multi trait_mod:<is>(Attribute \a, :$awesome!) { trait_mod:<is>(a, :default($awesome)); trait_mod:<is>(a, :required); trait_mod:<is>(a, :rw) }; class A { has $.x is awesome("phoeey") }; say A.new().^attributes[0].rw | 19:30 | |
camelia | rakudo-moar 907114: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it. in block <unit> at <tmp> line 1» | ||
psch | right, if it still needs a value even with a default... | 19:31 | |
sounds like dropping 'required' is reasonable | |||
19:31
darutoko left
19:33
andrzejku_ joined
19:40
tadzik left,
Matthew[m] left,
ilmari[m] left,
pecastro joined,
M-Illandan left,
Matias[m] left
19:45
avalenn joined
19:48
labster joined
19:49
wamba left
19:52
wamba joined
19:55
pmurias joined
20:08
Ven joined
20:10
domidumont left
20:15
imcsk8_ joined,
dj_goku_ joined,
dj_goku_ left,
dj_goku_ joined
20:17
kurahaupo__ left,
kurahaupo__ joined
20:18
dj_goku left,
imcsk8 left
20:22
Ven left
20:23
Ven joined
20:27
AlexDani` joined
20:30
AlexDaniel left
20:32
espadrine left,
AlexDani` left
20:40
dextertzu joined
20:42
AlexDani` joined,
AlexDani` is now known as AlexDaniel
|
|||
masak | oh, and today's autopun spotting -- best in a while: twitter.com/xaprb/status/799661720440446976 | 20:44 | |
(might have spotted that one before. but it's worth two spottings.) | 20:45 | ||
mst | heh, I just pasted that into shadowcat's internal chat channel | 20:46 | |
it is excellent. | |||
viki | masak: what's autopun? | 20:49 | |
psch | viki: act.yapc.eu/ye2012/talk/4206 | ||
mst | a pun that uses *and* mentions its subject, basically | ||
psch | not sure the lightning talk is online though | ||
ah it is | 20:50 | ||
www.youtube.com/watch?v=3bxLi3Z8lG...oI9mzQUZw5 | |||
s/list.+$// # vOv | |||
viki | what's with the sound on that thing? | 20:51 | |
psch | it bad..? :S | ||
+is | |||
viki | Like an out of tune radio station lots of static | ||
psch | nah, out of tune radio stations don't have that kind of static | 20:52 | |
it's more colorful usually | |||
this is just the loose jack kind of static which adds white noise | |||
well, there *is* some feedback | |||
point being, radio static usually is less... static static | |||
but this static has a clear resonance frequency | 20:53 | ||
viki can | |||
viki can't watch that | |||
mst | psch++ # welcome to #perl6, where static analysis is always on topic | 20:58 | |
masak | viki: like mst hinted, it's a joke that depends on breaking the use/mention barrier. | 21:02 | |
21:03
kurahaupo_ joined,
kurahaupo__ left
|
|||
masak | viki: talk slides for that lightning talk are here: masak.org/carl/gpw-2012-autopuns/talk.pdf | 21:04 | |
'night, #perl6 | 21:06 | ||
psch | i'm still bad at actually discerning what qualifies as an autopun | 21:07 | |
like e.g. twitter.com/aedison/status/800081718107639811 | |||
i'm not sure if that's just punny, or already autopunny | |||
moritz | I think that's an autopun | 21:09 | |
because it uses the concept it mentions (in the "I’ve already decided it means whatever I want it to") | |||
geekosaur inclined to agree | 21:10 | ||
it's not a *clever* autopun, but it is an autopun | 21:11 | ||
psch | right, maybe i'm hung up on "clever" | ||
21:14
andrzejku_ left
21:16
cdg joined
21:17
cdg left,
cdg joined
21:28
wamba left
21:30
Khisanth left
21:36
mtj_ joined
|
|||
garu | psch++ # thanks for the examples! | 21:36 | |
21:39
eisen74 joined
|
|||
eisen74 | anyone know of somone working on Perl6 ML module? | 21:41 | |
[ptc] | masak++: great talk :-D | 21:43 | |
moritz | oh yes, that was epic | ||
21:43
Khisanth joined
21:44
rindolf left
21:48
awwaiid left
21:49
awwaiid joined
21:53
Ven left,
Ven joined
21:58
Cabanossi left
21:59
Cabanossi joined
22:00
rindolf joined
|
|||
moritz | m: say val('foo') | 22:03 | |
camelia | rakudo-moar 84ef8f: OUTPUT«foo» | ||
22:03
cdg left,
seatek joined
22:04
cdg joined
|
|||
seatek | m: say so 'peel9' ~~ /<alnum>+/; | 22:06 | |
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
seatek | m: say so 'peel9' ~~ /<word>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'word' for invocant of type 'Cursor' in block <unit> at <tmp> line 1» | ||
seatek | m: say so 'peel9' ~~ /<ascii>+/; | 22:07 | |
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'ascii' for invocant of type 'Cursor' in block <unit> at <tmp> line 1» | ||
seatek | m: say so 'peel9' ~~ /<space>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
seatek | m: say so 'peel9' ~~ /<lower>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
seatek | m: say so 'peel9' ~~ /<blank>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
seatek | m: say so 'peel9' ~~ /<word>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'word' for invocant of type 'Cursor' in block <unit> at <tmp> line 1» | ||
seatek | m: say so 'peel9' ~~ /<ascii>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'ascii' for invocant of type 'Cursor' in block <unit> at <tmp> line 1» | ||
22:08
cdg left
|
|||
psch | m: say so 'peel9' ~~ /<:ascii>+/; | 22:09 | |
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
seatek | oo | ||
m: say so 'peel9' ~~ /<:word>+/; | |||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
22:09
Ven left,
Ven joined,
rindolf left
|
|||
seatek | should that be how they are to be used in the documentation? | 22:10 | |
if so i'll go change it | |||
m: say so 'peel9' ~~ /<:alnum>+/; | 22:11 | ||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
psch | seatek: i don't know, but i'd like to mention that i'd like "did it" to be followed by the corresponding git-ref | ||
seatek | doesnt' work consistantly | ||
m: say so 'peel9' ~~ /<:alnum>+/; | |||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
seatek | m: say so 'peel9' ~~ /<alnum>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«True» | 22:12 | |
psch | seatek: note that <:...> denotes unicode properties, while <...> is builtin rules | ||
moritz | is there even a Unicode property 'word' or 'alnum'? | ||
if not, maybe that should throw an exception... | |||
seatek | m: say so 'peel9' ~~ /<alnum>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
psch | m: say "foo" ~~ /<:fizzlygoob>/ | 22:13 | |
camelia | rakudo-moar 84ef8f: OUTPUT«Nil» | ||
psch | we probably should throw on unknown uniprops, yeah | ||
seatek | it works :) this was taken from perl5's list of POSIX classes | ||
i don't know what they ARE but i've been thinking of them like pre-defined tokens | 22:15 | ||
psch | m: say uniprop "l" | ||
camelia | rakudo-moar 84ef8f: OUTPUT«Ll» | ||
psch | that's somewhere in <:Letter>, i suppose | ||
m: say "l" ~~ /<:Letter>/ | |||
camelia | rakudo-moar 84ef8f: OUTPUT«「l」» | ||
psch | m: say "ó" ~~ /<:Letter>/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「ó」» | ||
psch | m: say "ó" ~~ /<:Number>/ | 22:16 | |
camelia | rakudo-moar 84ef8f: OUTPUT«Nil» | ||
psch | m: say "2" ~~ /<:Number>/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「2」» | ||
psch | m: say "²" ~~ /<:Number>/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「²」» | ||
seatek | m: say so 'efe9' ~~ /<xdigit>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
seatek | m: say so 'efw9' ~~ /<xdigit>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
psch | m: say 'efw9' ~~ /<xdigit>+/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「ef」 xdigit => 「e」 xdigit => 「f」» | ||
seatek | m: say so 'efw9' ~~ /^<xdigit>+$/; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«False» | ||
psch | so, basically | ||
there's two kinds of things going on there | 22:17 | ||
one is unicode properties, the other is builtin character classes | |||
these might in some cases overlap | |||
like /<alnum>/ eqv /<:Letter>|<:Number>/ # or somesuch | |||
22:18
Tonik left
|
|||
psch | but they are different things and don't check for the same thing | 22:18 | |
seatek | do we have list of builtin character classes? | ||
psch | i'd guess somewhere in P6Regex | ||
hm, maybe in QRegex | 22:19 | ||
seatek | yeah not there. that's actually what i was starting on with posix classes | ||
oh qregex.. i'll check | |||
moritz | is it a bug that sub MAIN doesn't support coercion types? | ||
dalek | c: 045db37 | seatek++ | doc/Language/regexes.pod6: Update regexes.pod6 |
||
synopsebot6 | Link: doc.perl6.org/language/regexes | ||
psch | QRegex has 'method alpha' and 'method alnum' and a bunch more | ||
m: BEGIN my @*ARGS = "5"; sub MAIN(Int(Cool) $) { } | |||
camelia | rakudo-moar 84ef8f: OUTPUT«Usage: <tmp> <Cool> » | ||
psch | m: say IntStr ~~ Cool | 22:20 | |
camelia | rakudo-moar 84ef8f: OUTPUT«True» | ||
psch | m: BEGIN my @*ARGS = "5"; sub MAIN(Int $) { } | ||
camelia | rakudo-moar 84ef8f: OUTPUT«Usage: <tmp> <Int> » | ||
moritz | multi sub MAIN(Date(Str) $) { }; # perl6 date.p6 2016-10-01 | ||
psch | m: BEGIN my @*ARGS = 5; sub MAIN(Int $) { } | ||
camelia | rakudo-moar 84ef8f: OUTPUT«Usage: <tmp> <Int> » | ||
psch | yeah that's probably because we kinda-sorta redo the MMD stuff and cheat around coercion or something..? | 22:21 | |
moritz: i'd consider the behavior as-is a bug, yes | |||
moritz | m: INIT @*ARGS = '2016-10-01'; sub MAIN(Date(Str) $x) { } | ||
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'Date' for invocant of type 'Str' in sub MAIN at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
psch | assuming the BEGIN hacky above works out | ||
i'm not sure Date(Str) is a supporte coercion type though | |||
22:21
BenGoldberg joined
|
|||
moritz | m: sub f(Date(Str) $x) { say $x }; f '2016-10-01' | 22:22 | |
camelia | rakudo-moar 84ef8f: OUTPUT«No such method 'Date' for invocant of type 'Str' in sub f at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
moritz | pity :( | ||
seatek | ah so qregex is in nqp stuff not in normal docs | ||
psch | QRegex is an implementation detail | 22:23 | |
because we need it to build NQP | |||
i'd say that the character classes it exposes can be considered part of Perl 6, as far as they are tested in roast at least | |||
(in general, writing docs should lean onto roast more than on rakudo) | |||
i do recognize that doc'ing completely unimplemented features is kinda wonky, because we might not even know yet how they work out in practice | 22:24 | ||
seatek | i'll dig through that eventually then an pull out the character classes for the light of day | ||
BenGoldberg | m: class ApproxCounter { has $.cnt = 0; }; multi sub prefix:<++>( ApproxCounter $c ) { for ^$c.cnt { return $c.cnt if Bool.pick }; ++$c.cnt }; my ApproxCounter $c .= new; print ++$c for ^80; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«Cannot resolve caller prefix:<++>(Int); the following candidatesmatch the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw)The following do not match for other reasons: (ApproxCounter $c) (Bool $a is rw)…» | ||
BenGoldberg | m: class ApproxCounter { has $.cnt = 0; }; multi sub prefix:<++>( ApproxCounter $c is rw ) { for ^$c.cnt { return $c.cnt if Bool.pick }; ++$c.cnt }; my ApproxCounter $c .= new; print ++$c for ^80; | ||
camelia | rakudo-moar 84ef8f: OUTPUT«Cannot resolve caller prefix:<++>(Int); the following candidatesmatch the type but require mutable arguments: (Mu:D $a is rw) (Int:D $a is rw)The following do not match for other reasons: (ApproxCounter $c is rw) (Bool $a i…» | ||
psch | m: class ApproxCounter { has $.cnt is rw = 0; }; multi sub prefix:<++>( ApproxCounter $c ) { for ^$c.cnt { return $c.cnt if Bool.pick }; ++$c.cnt }; my ApproxCounter $c .= new; print ++$c for ^80; | 22:25 | |
camelia | rakudo-moar 84ef8f: OUTPUT«12223333333333333334444566666666666666666666666666666666666666666666666666666666» | ||
psch | BenGoldberg: rw'ing the wrong thing there :) | ||
BenGoldberg | Ahh, thanks :) | ||
AlexDaniel | m: say ‘abcdef, test’ ~~ /<ww>+/ | 22:26 | |
camelia | rakudo-moar 84ef8f: OUTPUT«(timeout)» | 22:27 | |
AlexDaniel | I wonder if it should be smart enough to cover stupidity of the developer in this case | ||
psch | AlexDaniel: afaik the synopses were explicit that <ww> (and <ws>) are already greedy *and* zero-width | 22:28 | |
AlexDaniel | nah, it's fine | ||
psch | AlexDaniel: i'm not sure that sentiment still holds, but it seems like a trap more than like a "we die cause that's stupid" | ||
DIHWIDT is a thing after all | |||
psch & | 22:29 | ||
AlexDaniel | well, you get an infinite amount of zero-width matches, that's exactly what you've asked for :) | 22:30 | |
seatek | it's nice to die spectacularly sometimes | 22:31 | |
AlexDaniel | m: say ‘abcdef, test’ ~~ /[<?>]+/ | ||
and there are many ways to do it | |||
camelia | rakudo-moar 84ef8f: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 2052259840 bytes» | ||
AlexDaniel | ouch | ||
not exactly what I have expected | 22:32 | ||
seatek | so should i open a bug on this posix <word> and <ascii> not working? Honestly, I wouldn't mind removing <ascii> from the docs...? do we need that even any more? | ||
22:32
dalek left
|
|||
seatek | i suppose maybe for some obscure lingering things | 22:32 | |
AlexDaniel | wtf is <word> ? | ||
seatek | \w | ||
AlexDaniel | but \w is a character, not a word | 22:33 | |
22:33
dalek joined,
ChanServ sets mode: +v dalek
|
|||
seatek | <word> is a POSIX character class, like a token, in a regex | 22:33 | |
like <alnum> | |||
AlexDaniel | why would I care about POSIX insane naming in Perl 6? | ||
22:34
FROGGS left
|
|||
seatek | i ask myself that question about things all the time | 22:34 | |
AlexDaniel | dunno, perhaps it's fine to add it if people expect it, but I have a feeling that it was not added for a reason | ||
seatek | it's already in there being used, that's how i ran across it, and was asked to document it | ||
AlexDaniel | for example | 22:35 | |
seatek | it doesn't work by magic. someone put it in | ||
AlexDaniel | is <ident> a 1-char token or a multichar one? | ||
22:35
Ven left
|
|||
seatek | ask them | 22:35 | |
AlexDaniel | doesn't sound like 1 char, right? | ||
m: say ‘abcdef, test’ ~~ /<ident>/ | 22:36 | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「abcdef」 ident => 「abcdef」» | ||
AlexDaniel | and it isn't! | ||
seatek | only one i ever use from posix is <xdigit> | 22:37 | |
sometimes <graph> is nice | |||
AlexDaniel | “ascii Any character in the ASCII character set.” | ||
seatek | yeah that seems pretty much pointless | 22:38 | |
but maybe not? | |||
old stuff | |||
BenGoldberg | /<foo>/ matches a regex token named foo. /[<foo>]/ matches a character which is a member of the character set foo. | ||
I think. | 22:39 | ||
22:39
travis-ci joined
|
|||
travis-ci | Doc build passed. seatek 'Update regexes.pod6' | 22:39 | |
travis-ci.org/perl6/doc/builds/177335373 github.com/perl6/doc/compare/5e017...5db376bdf0 | |||
22:39
travis-ci left
|
|||
geekosaur | people do sometimes want to match stuff in the 0x20-0x7e subset (usually when trying to catch/fix mojibake) | 22:39 | |
AlexDaniel | BenGoldberg: what is a “character set”? | ||
22:39
firstdayonthejob left
|
|||
AlexDaniel | [<foo>] look like brackets around a subrule to me | 22:40 | |
could be wrong | |||
geekosaur | I think that's supposed to be character class | ||
named character class | |||
AlexDaniel | ok, example? | ||
jnthn | A naemd char class would be <+foo> (or <-foo> to negate it) | 22:43 | |
geekosaur | m: say 'abcdef, test' ~~ /[<xdigit>]/ # where xdigit is one of the POSIX defined classes. in p5 this would be /[[:xdigit:]]/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「a」 xdigit => 「a」» | ||
jnthn | [<foo>] is just useless use of grouping | 22:44 | |
geekosaur | oh, right, I am getting confused | ||
AlexDaniel | seatek: also, \w is <alnum> | ||
seatek | AlexDaniel: <alnum> i believe is a subset of \w | 22:45 | |
22:45
firstdayonthejob joined
|
|||
AlexDaniel | seatek: example? | 22:45 | |
seatek | "crack_your_jaw" is not alnum | ||
AlexDaniel | m: say ‘crack_your_jaw’ ~~ /<alnum>+/ | 22:46 | |
camelia | rakudo-moar 84ef8f: OUTPUT«「crack_your_jaw」 alnum => 「c」 alnum => 「r」 alnum => 「a」 alnum => 「c」 alnum => 「k」 alnum => 「_」 alnum => 「y」 alnum => 「o」 alnum => 「u」 alnum => 「r」 alnum => 「_」 alnum => 「…» | ||
AlexDaniel | m: say ‘crack_your_jaw’ ~~ /<+alnum>+/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「crack_your_jaw」» | ||
AlexDaniel | it's weird, I agree | 22:47 | |
seatek | according to perl5 docs, <word is> alnum' + Unicode marks + connectors, like '_' : | ||
<word> is | 22:48 | ||
AlexDaniel | sure, but this is Perl 6 :) | ||
if we want to keep it similar to perl 5, then yeah, maybe we can count that as a bug | 22:49 | ||
seatek | yeah well why don't you rewrite the regex engine then | ||
AlexDaniel | I wonder if there is any difference between <.foo> and <+foo> | 22:51 | |
jnthn | Just checked S05; alnum is <+alpha+digit> and alpha "Match a single alphabetic character, or an underscore" | 22:52 | |
geekosaur | and <.foo> should be <foo> without the implicit capture into $/<foo> | ||
seatek | it all works great guys -- it's just the <word> and <ascii> don't. everything else is beautiful | 22:53 | |
geekosaur | (which capture is why the tests earlier output the match twice) | ||
AlexDaniel | geekosaur: and <+foo> works exactly like that? :) | ||
geekosaur | [19 22:43:44] <jnthn> A naemd char class would be <+foo> (or <-foo> to negate it) | ||
which was correcting my earlier misspeaking | |||
actually this confuses me, sounds like <+ident> should match 1 char | 22:54 | ||
since it's using the charclass not the token | 22:55 | ||
but | |||
m: say 'abcdef, test' ~~ /<+ident>/ | |||
camelia | rakudo-moar 84ef8f: OUTPUT«「abcdef」» | ||
jnthn | That's...interesting :) | ||
AlexDaniel | huh | ||
ah no | 22:56 | ||
geekosaur: ident is not one character | |||
geekosaur | if it is a *character* class it is not multiple. *tokens* can be multicharacter | ||
er, stress slightly wrong there | 22:57 | ||
AlexDaniel | that's what I'm trying to say, it's not a character class | ||
geekosaur | ok then what about what jnthn said earlier | ||
AlexDaniel | now that's a good question :) | 22:58 | |
22:58
BenGoldberg left
|
|||
AlexDaniel | m: say ‘fooaBcdefg’ ~~ /<+ident -lower>/ | 22:59 | |
camelia | rakudo-moar 84ef8f: OUTPUT«「Bcdefg」» | ||
eisen74 | my $FH = open $CSVFile, :r; | 23:00 | |
for $FH.IO.lines -> $line { | |||
print "line: " ~ $line ~ "\n"; | |||
} | |||
doesn't seem to be recognizing carriage returns | |||
^M | |||
23:01
kurahaupo_ left
|
|||
AlexDaniel | committable6: stdin line oneline twoline three | 23:02 | |
committable6 | AlexDaniel, STDIN is set to «line oneline twoline three» | ||
RabidGravy | you can set the nl when you open the file | ||
AlexDaniel | committable6: HEAD for lines -> $line { print "line: " ~ $line ~ "\n"; } | ||
committable6 | AlexDaniel, gist.github.com/e995d08855a2371def...1310e4a074 | ||
AlexDaniel | committable6: HEAD for lines() -> $line { print "line: " ~ $line ~ "\n"; } | ||
committable6 | AlexDaniel, ¦«HEAD»: line: line oneline: line twoline: line three | ||
jnthn | .u  | 23:03 | |
yoleaux | U+2424 SYMBOL FOR NEWLINE [So] () | ||
jnthn | AlexDaniel: I guess then mean \r as the line separator | ||
geekosaur | what do you mean bu "doesn't seem to be recognizing"? if you mean the lines you receive don't have ^M at the end from a file with ^M^J terminated lines, that is expected | ||
jnthn | Or could be what geekosaur said :) | ||
geekosaur | if uyou mean ^M is the line separator (like old MacOS)... don't recall if that is currently handled | ||
23:03
cibs left
|
|||
jnthn | iirc, the default set of line separators is \n and \r\n | 23:04 | |
eisen74 | I've tried both \r and \r\n. Still reads whole file as one line | ||
my $FH = open $CSVFile, :r, nl => "\r"; | |||
MasterDuke | 'any combination of "\n", "\r\n" or "\r" or any other Unicode character that has the Zl (Separator, Line) property.' according to the docs | ||
geekosaur | hm, trying to remember if there is a gotcha there | ||
23:05
pmurias left
|
|||
geekosaur | not with the reading, but with for | 23:05 | |
23:05
cdg joined
|
|||
eisen74 | I am running on OS X yes | 23:05 | |
jnthn | If you're having issues wiht \r\n something is weird, because that's certainly in the defaults (not to mention Windows folks woulda howled loudly by now :)) | ||
23:05
cibs joined
|
|||
geekosaur | I did not say OS X | 23:05 | |
"old MacOS" is Mac OS 9 and earlier, pre-X | |||
eisen74 | Ah. ok. | ||
AlexDaniel | by the way, there is no need for .IO there | 23:06 | |
$FH.lines should work | |||
stmuk_ | pl6anet.org/drop/ has RC Rakudo Star 2016.11 source, mac binaries and windows binaries | 23:07 | |
jnthn | stmuk_: Nice! :) | ||
seatek | stmuk_++ :) | ||
lizmat | stmuk_ ++ | 23:08 | |
eisen74 | hmm. trying a few other things. | 23:09 | |
my $fh = open $CSVFile, :r, nl => "\r\n"; | |||
23:09
firstdayonthejob left
|
|||
eisen74 | say $fh.get(); | 23:09 | |
tried different nl permutations and all still think file is one line. Trying a few other files but worked fine in Perl 5 | 23:10 | ||
23:10
cdg left
|
|||
AlexDaniel | m: say ‘_25cdefg’ ~~ /<+ident>/ | 23:10 | |
camelia | rakudo-moar 84ef8f: OUTPUT«「_25cdefg」» | ||
AlexDaniel | m: say ‘_25cdefg’ ~~ /<+ident -digit -[_]>/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「cdefg」» | ||
AlexDaniel | m: say ‘_25cdefg25_25ho’ ~~ /<+ident -digit -[_]>/ | ||
camelia | rakudo-moar 84ef8f: OUTPUT«「cdefg25_25ho」» | ||
AlexDaniel | I have no idea. This stuff is crazy, but at the same time it is quite useful | 23:11 | |
jnthn | eisen74: Very strange... Out of curiosity, what does perl6 --version output? | 23:12 | |
But...I think everything has supported \n and \r\n going back years... | 23:13 | ||
geekosaur | m: say ‘_25cdefg25_25ho’ ~~ /<[+ident -digit -'_>/ | ||
camelia | rakudo-moar e9487d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place it as the first or last thingat <tmp>:1------> 3say ‘_25cdefg25_25ho…» | ||
geekosaur | er | ||
AlexDaniel | geekosaur: S05 starts with a great idea of calling this stuff “predefined rules”, but indeed talks about “character classes” a bit later. <ident> is just some sort of magic /o\ | ||
eisen74 | Tried another file and it worked fine. This CSV export from Mac Excel is croaking perl 6 and Text::CSV. Trying to figure out why. | 23:14 | |
I haven't had this kind of error since Perl 4 old Mac files. lol | 23:15 | ||
This is Rakudo version 2016.10 built on MoarVM version 2016.10 | |||
implementing Perl 6.c. | |||
23:16
zacts left
|
|||
geekosaur | oh. so it probably is using ^M only :/ | 23:17 | |
open $CSVFile, :r, nl => "\r" | |||
23:17
zacts joined
|
|||
geekosaur | (because Microsoft still thinks Macs are in the 1980s, or something) | 23:18 | |
eisen74 | geekosaur: that was the first thing I tried. No workie workie | 23:19 | |
AlexDaniel | for $FH.split(“\r”) will probably work | ||
eisen74 | Going to re-export the xls to CSV and see what happens. | ||
AlexDaniel | I can reproduce it here | 23:20 | |
eisen74 | AlexDaneil: bingo, that works! | 23:21 | |
AlexDaniel | yea, I know, but that's not right | ||
eisen74 | Right, this problem breaks alot of stuff. | ||
stmuk_ | classic mac line ending was \r I think | ||
eisen74 | At least for anyone with similar kind of files. | ||
AlexDaniel | that's what I did: echo -e "hello world\rtest\rend\r" > testfile | ||
committable6: HEAD say slurp tesfile | 23:22 | ||
committable6 | AlexDaniel, ¦«HEAD»: ===SORRY!=== Error while compiling /tmp/qQBW9vS0BZUndeclared routine: tesfile used at line 1 «exit code = 1» | ||
AlexDaniel | committable6: HEAD say slurp ‘tesfile’ | ||
committable6 | AlexDaniel, gist.github.com/f6b2ccaf53b4a75881...d17d2450ce | ||
eisen74 | So question is why is my $fh = open $CSVFile, :r, nl => "\r"; not working as expected? | ||
AlexDaniel | committable6: HEAD say slurp ‘testfile’ | ||
committable6 | AlexDaniel, ¦«HEAD»: hello world␍test␍end | ||
jnthn | eisen74: try nl-in => "\r" | ||
23:22
firstdayonthejob joined
|
|||
AlexDaniel | committable6: HEAD my $FH = open ‘testfile’, :r, nl-in => “\r”; for $FH.lines { say ‘hello’ } | 23:23 | |
committable6 | AlexDaniel, ¦«HEAD»: open is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub open at src/RESTRICTED.setting line 9 in block <unit> at /tmp/bSV1pMGf8a line 1 «exit code = 1» | ||
AlexDaniel | awww come on | ||
jnthn | github.com/rakudo/rakudo/blob/nom/...dle.pm#L24 | ||
It is nl-in and nl-out | |||
AlexDaniel | so the docs are wrong | ||
eisen74 | my $fh = open $CSVFile, :r, nl-in => "\r"; works | 23:24 | |
jnthn | OK. Also good to know: nl-in can be given an array | 23:25 | |
eisen74 | Yup, looks like docs are wrong. That's why it wasn't working. | ||
jnthn | So nl-in = ["\r", "\n", "\r\n"] would work | ||
uh | |||
nl-in => ["\r", "\n", "\r\n"] | |||
geekosaur | and now I am remembering some kind of argument over that because the spec said nl but the code did nl-in and nobody wanted to commit to which was right, or something dumb like that | 23:26 | |
jnthn | geekosaur: I'm happy to commit to it being nl-in and nl-out | ||
For the simple fact that an array of options makes sense for input, but not for output | |||
eisen74 | No problem. Just need to fix docs or perhaps update IO::Handle so it allows both. People writing modules are going to trip up on this. Text::CSV in particular | ||
geekosaur | I don't recall the exact argument, just that this was brought up multiple times and people just argued and nothing happened | ||
eisen74 | docs.perl6.org/type/IO#sub_open says nl not nl-in | 23:27 | |
dalek | c: 0414020 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6: There is no “nl”, it is “nl-in” and “nl-out” nl-out is still not documented |
||
synopsebot6 | Link: doc.perl6.org/type/IO | ||
jnthn | Heh, was about to go submit an issue | ||
AlexDaniel++ | |||
AlexDaniel | nl-out is still not documented though | 23:28 | |
eisen74 | Ok, will notify module author(s) | ||
Who maintains Perl docs? They're incorrect on this point: docs.perl6.org/type/IO#sub_open | |||
viki | eisen74: it's community maintained. Submit a PR, if you spot an issue. | 23:29 | |
eisen74 | k. thx. | ||
viki | eisen74: github.com/perl6/doc | ||
AlexDaniel | There's also this one: github.com/perl6/doc/issues/484 | ||
viki | eisen74: in this file in particular: github.com/perl6/doc/blob/master/d...pe/IO.pod6 | ||
(for the URL you gave) | |||
jnthn | Sleep time; 'night | 23:30 | |
viki | night | ||
eisen74 | AlexDaniel tagged it. Thanks. | 23:31 | |
dalek | c: 5ade495 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6: Mention nl-out as well It requires more documentation, but just a quick mention will do for now |
||
synopsebot6 | Link: doc.perl6.org/type/IO | ||
AlexDaniel | eisen74: thanks for asking the question, by the way | 23:32 | |
MasterDuke | another case of silently ignoring unknown named arguments looking like a bug (:nl vs :nl-in) | 23:34 | |
AlexDaniel | what about this? docs.perl6.org/type/Proc#method_new | 23:35 | |
MasterDuke | but compounded by the docs not being quite correct | ||
AlexDaniel | github.com/rakudo/rakudo/blob/nom/...roc.pm#L24 hehe | 23:36 | |
nl-out => $nl | |||
23:38
cygx joined
|
|||
MasterDuke | github.com/rakudo/rakudo/blob/nom/...roc.pm#L42 | 23:38 | |
nl-in => $nl | |||
cygx | o/ | ||
AlexDaniel | this does not look right | 23:39 | |
feels like it should have separate nl-in and nl-out as well | |||
cygx | re documenting &open, note that the posix-y extended open modes are also still undocumented | ||
I still might have a branch for that lying around | |||
I never finished documenting it because there were still questions to be resolved (nl-in/out, bin mode being broken) | 23:40 | ||
AlexDaniel | oh no, github added mass actions on issues | 23:41 | |
23:43
RabidGravy left
|
|||
viki | Mass actions? | 23:43 | |
viki sees no difference | 23:44 | ||
AlexDaniel | viki: files.progarm.org/2016-11-20-01445..._scrot.png | ||
viki | Intersting. | 23:46 | |
23:47
pandorax joined
23:50
pandorax left
23:55
cpage_ left
|
|||
AlexDaniel | anyway: #130136 | 23:57 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130136 | ||
23:59
firstdayonthejob left
|