»ö« 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! | YAPC::NA talk submissions due end of Month. Have you submitted your talk?
Set by toddr_ on 18 March 2013.
FROGGS std: use v5; TODO: { say 1 }; 00:35
p6eval std 86b102f: OUTPUT«ok 00:01 52m␤»
FROGGS well, would be nice if it more DWIM, since we don't have to do exactly the same as the P5 module 00:40
*if it is
dalek ecs: 6d47309 | lue++ | S02-bits.pod:
[S02] Minor typo fix
03:34
moritz labster: I think the right solution is to stat everything, but also provide some low-level API that just does readdir, without stat 07:26
labster moritz: sounds reasonable 07:40
moritz and good morning everybody :-) 07:41
FROGGS morning 07:43
labster morning *technically AM here* 07:45
FROGGS std: SKIP: { say 1 } 07:46
p6eval std 86b102f: OUTPUT«ok 00:00 42m␤»
FROGGS we can haz labels?
lizmat NYI afaik, and good morning! 07:47
FROGGS that doesn't matter (for me right now) 07:48
labster rn: label: say "alive"
p6eval rakudo 23847e: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/Py0vgajrP_:1␤------> label⏏: say "alive"␤ expecting any of:␤ argument list␤ postfix␤ infix stopper␤ infix or meta-infix␤ statement end␤ stateme…
..niecza v24-35-g5c06e28: OUTPUT«alive␤»
labster Maybe even "readdir" for the bare list of file names. That's not yet taken. 07:50
FROGGS lizmat: my problem is that when I 'use v5', tokens which are up the tree to statement_control:use can't be changed 07:55
like in v5, there is already an additional token label, which is used in token statement, but it ignores it and uses token statement from Perl6 instead 07:56
it is using the actions from v5 though 07:57
lizmat FROGGS: I'm not quite sure I follow you
but I'm about to be offline for the rest of today
FROGGS k, np
lizmat so, later!
dalek pan style="color: #395be5">perl6-examples: fcc2adb | grondilu++ | rosalind/dbpr-grondilu.pl:
Create dbpr-grondilu.pl

  (rosalind)  DBPR
08:19
diakopter . 08:54
moritz : 08:55
jnthn 08:56
labster 09:02
tadzik so, yesterday lizmat mentioned S02:3920... 09:12
synopsebot Link: perlcabal.org/syn/S02.html#line_3920
tadzik purrfect
and it's on Perl 6 :)
labster $*OS isn't in S28, but $*KERNEL doesn't work. change specs? 09:24
nwc10 jnthn: the usual amount of working on "my" machine. 09:25
jnthn nwc10: Thanks. Now I'm back from vacation and teaching, it'll soon be goalpost moving time again :) 09:26
tadzik Timbus, y u make all Net::IRC::Bot methods private :| 09:28
masak tadzik: where's the source to synopsebot? :)
(forenoon, #perl6) 09:29
tadzik masak: gist.github.com/tadzik/5325542 here :)
I may submit it as a Net::IRC::Bot plugin
masak tadzik++ 09:30
nwc10 jnthn: cool 09:35
tadzik now running on MuEvent, and seems to work :) 09:41
jnthn tadzik++ 09:44
Timbus i did what now
i go to extreme effort to not expend any effort. 09:45
tadzik Timbus: thing is, it's quite difficult to extend ::Bot 09:47
Timbus i have tried to make it so you don't :v
tadzik I wrote gist.github.com/tadzik/5325584
Timbus ahh to alter the runloop
tadzik but I needed to make .connect, .disconnect, .conn and .dispatch public in the original code to make it work
Timbus that makes sense. I wasnt really thinking of modifying the bots loop. I was just going to tie in muevent when parrots IO uh.. worked 09:49
Timbus as in i was going to make it a permanent dependency 09:49
FROGGS jnthn: you may need to help me doing the Peril6 <-> Peril5 context switching right... 09:50
jnthn: changes to token statement of P5Grammar have no effect. it is using Perl6:Grammar+P5Actions for token which got hit before 'use v5'
S28:$*OS
S28:1
tadzik oh, I brought it down, sorry ;)
FROGGS awww
tadzik: can it search for a keyword? 09:51
tadzik nope
tadzik it's this simple: gist.github.com/tadzik/5325542 09:51
S28:1
synopsebot Link: perlcabal.org/syn/S28.html#line_1
FROGGS but you could implement that :o)
*cough*
tadzik it's just so I don't have to go to irclogs every time someone mentions something
FROGGS right 09:52
tadzik I'll try to set it up on feather later today
labster S0:0
synopsebot Link: perlcabal.org/syn/S0.html#line_0
FROGGS and my problem is that I usually have no idea where to search
S-1:1e4
S1:1e4
synopsebot Link: perlcabal.org/syn/S1.html#line_1
labster it matches \d, so S150000:123456 works 09:53
synopsebot Link: perlcabal.org/syn/S150000.html#line_123456
labster good night, all 09:55
FROGGS wow, that bot feature is pretty compact
masak 'night, labster
FROGGS gnight labster
Timbus most irc bot features are very compact. most of the effort I ever put into irc bots was in the filtering and dispatch of events, and perl 6 basically does all of that for you 09:58
masak dives back into t2 reviewing 10:57
masak 32 signups for p6cc2012. a question: 11:04
if we leave aside how to increase the number of solutions sent in, how would I go about increasing the number of *signups* for p6cc2013?
masak taking into account that I essentially have from now until December to do it. 11:05
jnthn masak: Given how long review takes, isn't increasing the number of reviewers maybe more hot-path? :) 11:06
bbkr hi. is anyone working on SMTP protocol in P6? I'm considering it as a next module to code. 11:08
moritz bbkr: not that I'm aware of 11:09
jnthn, masak: we could crowdsource the reviews
masak jnthn: yes, sure. the length of the review process is annoying, but it's not a *problem* per se as long as it takes less than a year. and that wasn't my question at all. ;)
bbkr nice
masak if I crowdsource the reviews, I'd still like to do it within a closed invite-only community. 11:10
I don't know why, I just consider that part of the fun of the contest :)
maybe because I consider crowdsourced things as having much lower quality standards. there's no single person to take responsibility for quality and coherence. 11:11
cf. Using Perl 6 book.
moritz masak: well, you could still curate the suggested reviews into a cohesive whole
masak yes. :) 11:12
I can see a workable mechanism in there, for sure.
moritz maybe "accept patches" would be a better term than "crowdsource"
masak oh, I practically do that already.
after the release of a review, that is.
masak usually, only the contestants bother enough to send patches. :) 11:13
which also tells you something.
moritz well, accepting patches afterwards doesn't help decreae the review times :-) 11:14
anyway, back to the original question: increasing the number of signups 11:15
I have a few ideas:
1) offer one or two quite tasks that aren't algorithmically challenging
masak ah. contest too hard? :) 11:16
I got that a bit this year.
surprised me.
moritz 2) make it very, very clear that submissions for only a subset of the problems are totally acceptable
masak aye.
that's a good idea.
emphasize the -Ofun bit of it.
moritz well, if I'd operated under the premise "either I solve them all, or don't participate", I wouldn't have participated
right
I don't complain about too hard; if I had had more time, they would have been all doable 11:17
but I can totally see how it might deter others
masak it's funny the way I pick tasks -- I basically mull over them for *months*, and somehow I end up with five for which I feel that "yes, that's a p6cc task". 11:18
not always perfect. for example t5 this year was kind of a weak one.
moritz which one was t5?
ah, bin packing 11:19
masak distribute weights in bags.
but I absolutely *love* t1, t2, t4 and the solutions I got for them. :)
moritz I found t3 to be fun too 11:20
masak yes. small and fun, indeed.
likewise, t2 (sums of cubes), t4 (hex slide), and t5 (planar trees) last year were lots of fun.
they somehow straddle the puzzle worlds and the slightly mathematical/algorithmic. 11:21
in the 2010 edition, p4 (pick pairs of stones) was like that. oh, how I enjoyed that. :D 11:22
moritz feels that 80% of his twitter activity is retweeting stuff from masak++ and Su-Shee++ 11:23
which is kinda silly, because everybody who follows me should just follow them too 11:24
masak not silly. at any given moment, I bet there are lots who should but don't. 11:28
you're thinking about it like a static thing, when it's really a dynamic thing. :) 11:29
masak hm. emphasizing that submissions for only a subset are acceptable is good. in some sense it's hard though to broadcast both that message and "this is a contest! may the best one win!" 11:32
moritz maybe have two prices; one "jury price" for the "best" contestant, and one random-ish price for everybody has submitted at least one accepted solution 11:34
masak hm. 11:35
or for some other kind of best effort than just submitting all five excellently. 11:36
moritz right 11:38
masak [Coke]++ # putting Lingua::EN::Syllable on modules.perl6.org 11:42
[Coke]: heh, I was gonna point out a bug in the module but your already fixed it in github.com/coke/p6-lingua-en-sylla...5d23b17ef3 :) 11:51
GlitchMr Is it even possible to determine number of syllables in English? 12:15
arnsholt Not in the most general case, I suspect 12:16
You can probably make a pretty good job of it (especially if you manually segment a lot of words and train a statistical model), but some words are just gonna be weird 12:17
GlitchMr I know that in Russian, you can +m:g:i/<[АЕЁИОУЭЮЯ]>/
But English is strange with its all special cases
arnsholt masak, moritz: Another option might be a grand prize as before for the best overall, and five smaller ones for excellence in each subtask 12:18
GlitchMr: Russian doesn't have any diphtongs?
masak arnsholt: yes, I can see that working. then people would be motivated to excel on a single task. 12:19
masak GlitchMr: "Is it even possible"? yes. the problem takes an input and gives an output. 12:20
there are no side effects :)
it's eminently computable in, I strongly suspect, linear time on the length of the string.
GlitchMr In t2, I did +m:i/<[aeiouy]>+/, but it's very likely it's simply wrong
But mostly appears to work
+m:i:g* 12:21
masak it's such a simplistic solution that I'd be tempted to call it "wrong", yes.
"feel" has 1 syllable, not 2.
GlitchMr masak, have you noticed + here?
arnsholt But "liar" has two =)
GlitchMr lolyeah
masak "beautiful" has 3 syllables, not 5. 12:22
arnsholt And "file" has one
GlitchMr "beautiful" is correctly checked by +m:i:g/<[aeiouy]>+/
The + sign is important
masak ah, yes.
but "file" isn't.
GlitchMr English is so annoying 12:23
arnsholt English syllabification has two important points: 1) Is a vowel cluster a diphtong or two syllables? and 2) Is a vowel at the end silent or not?
masak GlitchMr: though I concede that it's interesting that you as a Slavic-speaker chose to completely ignore the subtleties of English syllable-counting, just because it simple doesn't come up in Russian.
masak I'll probably work that into the review and the blog post somehow. 12:24
arnsholt And a couple of other annoyances as well. Is y a vowel or a consonant? Sometimes unstressed vowels can be droppen
s/droppen/dropped/
masak I was trying to come up with an example of 'y' being a consonant in a word where that matters for syllable counting. 12:24
Juerd It's not even clear if it's a consonant or a vowel in words like ahoy. 12:28
masak right. or 'yes'. 12:29
GlitchMr stackoverflow.com/questions/405161/...-in-a-word
That sounds interesting
arnsholt Consonant in both yes and ahoy, I'd say
masak but in all the cases I can think of, the consonant-y 'y' stands next to a vowel. :)
and so it might as well be counted as a vowel cluster. 12:30
arnsholt Yeah, it's probably consonant next to a vowel but vowel between consonants
GlitchMr: Oh, yes. The top answer there is a good one
The TeX algorithm is very good
moritz avoided automatic syllable counting alltogether in his t2 solution 12:31
masak GlitchMr: next time, consider being interested in the interesting problem during the contest :P
I'm going on a Copenhagen excursion. will be back tonight and re-dive into t2. 12:32
moritz masak: did you mean me?
arnsholt OTOH, I think that algorithm optimises for not making false positives, so if you need -all- the syllable breaks it might not be the best option
masak moritz: no, <GlitchMr> That sounds interesting
moritz ok
masak &
moritz have the appropriate amount of Copenhagen! 12:33
GlitchMr But when Russian is rather simple, the Polish isn't so simple (when letter "u" is involved)... 12:35
Or rather, "au"/"eu" 12:37
tadzik ą and ę? :) 12:45
GlitchMr No, I mean "nauka", but "laur". 12:46
In "laur", "u" is spelled like "ł".
Perhaps I simply don't understand the rule, but whatever. 12:47
tadzik true 12:48
GlitchMr But English is more complex than that 12:54
dalek kudo/nom: e489afc | tadzik++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for bumped PARROT_REVISION
14:21
p: 716b35d | tadzik++ | tools/build/PARROT_REVISION:
Bump PARROT_REVISION for Socket fixes
14:22
tadzik my first commits since I-don't-remember :)
FROGGS r: my $I-don't-remember = True 14:27
p6eval rakudo 23847e: ( no output )
BigBear Hi I am relatively new to perl and would like to write a little filter that takes a "csv" file and pretty prints it into a continuous stream of the format "$column_name:\n$column_value\n". Trying to read the very long "csv" line in excel is jsut to painful . 14:49
how do is etup the right hashes to achieve this using Text::CSV ? 14:50
moritz BigBear: I guess you want to do it with Perl 5, not Perl 6. If that's true, you are sadly off-topic here 14:52
BigBear: try #perlhelp instead
BigBear moritz: thanks. what was I thinking, sorry. 15:02
FROGGS .ask jnthn: am I allowed to push that commit? gist.github.com/FROGGS/5fe2eb96e2515bf02a14
yoleaux FROGGS: I'll pass your message to jnthn:.
moritz BigBear: no worries, happens to all of us at least once :-) 15:17
arnsholt "Mainly listed here to shut up the pitiful screams of the pod coverage tests. They keep me awake at night." Who said documentation can't be fun? =D 16:12
timotimo oh, socket fixes eh? i like hearing that :) 16:32
japhb_ arnsholt, masak, moritz: I strongly agree with arnsholt's suggestion at irclog.perlgeek.de/perl6/2013-04-06#i_6672450 ... when reading the earlier part of the discussion, I was going to suggest that very thing. I didn't sign up this year (or in the past) because I knew there was no chance I'd have time to do anything half-decent on all tasks, thus no chance to win, thus ... meh. But a per-task prize would give someone like me a c 16:34
hance to go "I'll put all of my limited tuits into a task or two, and try to do well that way."
The one thing to note about that plan is that you may find a strong differential between the number of people submitting solutions to the easier tasks versus the hard ones ... but the solution to that is to *point it out* in the sign-up promo, along with the point that contestants may want to put more energy into a single hard task (where there will presumably be fewer rivals) than just doing all the easier ones (where there will be much 16:38
competition).
A little brain hacking on your part, in other words. :-)
atroxaper Is there war for make GUI in present implementation of Perl6? 17:28
tadzik there're Gtk programs written to run on niecza 17:35
tadzik opens github.com/sorear/niecza and frowns at github 17:36
anyway, there's examples/ in that repo, and gtk programs inside
atroxaper Thank you! 17:38
And i have one more strange question.
Why Rakudo based on Pattor 4.10 so far? 17:39
dalek : 4bcecb6 | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
disable Perl6s foreach token
17:45
: 2ff3d0d | (Tobias Leich)++ | lib/Perl6/P5 (2 files):
enable parsing of our-vars as loop variable
: b50d721 | (Tobias Leich)++ | / (6 files):
renamed v5.pm to Perl5.pm and added V5DEBUG env var
japhb_ atroxaper, there were bugs in later Parrot releases for a while, but I believe NQP (and thus Rakudo) just bumped to a newer Parrot this morning. 17:55
dalek : 79d389c | (Tobias Leich)++ | / (2 files):
update "make test"-command and mention it in README
18:01
atroxaper japhb_: oh. I see. Thanks! And how do you think, when will be official release of Perl? In which year? :) 18:05
I mean Perl6.
FROGGS atroxaper: there are official releases already 18:06
atroxaper Really? 18:07
FROGGS every month
I guess what you really want is that rakudo gets called "Rakudo Perl 6.0.0" 18:08
atroxaper May be) 18:09
Any way, I want to say Big big Thanks you guys! For your great work! Really) 18:11
dalek : c08ebe5 | (Tobias Leich)++ | Makefile:
increase verbosity-level for single test file runs
FROGGS Perl 6 is pretty awesome, yes
:o)
atroxaper I started learn perl6 recently and i pretty like it! And Perl5 too as well. 18:14
Have a nice weekend! 18:15
FROGGS you too
pmurias FROGGS: what's the problem with switching to perl6 using 'use v5'? 18:38
pmurias FROGGS: I have seen the irc log, but I don't understand what you mean. 18:39
timotimo anyone got an idea when nqp will get OS thread support? 18:40
tadzik well, uh. I'm afraid "never" 18:41
I'd love to be wrong
timotimo i have no clue what's even involved 18:44
nwc10 timotimo: It might be "never" on *OS* thread support, but I believe there's a fair chance of experiments soon on the JVM with threads. (As it's a mature thread implementation, so it's a racing certainty that bugs will be NQP's fault, not the VM's fault) 18:58
japhb Auuuuggggghhh! Adding debug prints to Panda::Builder.build() made it so Rakudo::Debugger installs just fine. 19:04
japhb is wearing his stabby face. 19:05
#$!^@#&()) Heisenbugs
diakopter »ö« 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!
lue hello world o/ 19:53
labster good *, everyone 20:10
japhb diakopter, what did you change about the topic, OOC? 20:29
lue I think he remove the YAPC::NA talks bit at the very end. (May be wrong though)
s/remove/removed/
diakopter yes
japhb Ah, OK
tadzik timotimo: nqp is not taught to be using Proxies when doing lexical lookups, or something 20:43
which is what Parrot threads require to not screw up other threads' memory 20:44
timotimo that doesn't sound terribly bad 20:47
hm, wouldn't that cause immense slowdowns on all assignments on single-threaded nqp programs?
tadzik apparently no
nine++'s experiments showed no noticable slowdowns
iirc
tadzik that was pir though 20:51
japhb OK, finally have a smoking gun -- when I'm in ~/git/rakudo/ and I run `panda install Rakudo::Debugger`, it fails. When I'm in ~/git/panda/ and run the same command, it works. 20:53
tadzik gah 20:55
wtf 20:56
what's the error message, missing Something.pm?
moritz I've had the same thing too, months ago. Runing panda inside panda's source tree is unreliable 20:59
japhb moritz, I'm having the opposite problem. It's running it *outside* panda's source tree that is failing for me. :-/ 21:00
tadzik, give me a sec, I'll paste it when I get it again. 21:01
japhb_ tadzik: 21:02
==> Fetching Rakudo::Debugger
==> Building Rakudo::Debugger
resolve stage failed for Rakudo::Debugger: Could not find Perl6::BOOTSTRAP in any of: /home/geoff/git/rakudo/install/lib/parrot/5.2.0-devel/languages/perl6/site/lib, /home/geoff/git/rakudo/install/lib/parrot/5.2.0-devel/languages/perl6/vendor/lib, /home/geoff/git/rakudo/install/lib/parrot/5.2.0-devel/languages/perl6/lib, /home/geoff/.perl6/2013.03-49-g23847e9/lib, .
japhb_ is now instrumenting R::D's Build.pm to try to nail down exactly when that happens. 21:03
Oh that's odd. It loads the Build.pm, but doesn't call the Build.build() method. 21:04
(when outside the panda source dir, I mean)
tadzik uhh
this is quite fragile, yes :/
but I don't see why it'd fail that miserably 21:05
lue
.oO(Did you update rakudo and not panda recently?)
21:07
japhb OK, interesting. It will show output from a 'BEGIN say "..."' at both the top and the bottom of the Build.pm, but it fails before outputting anything from a 'say "..."' at the top of the mainline code. In other words, it makes it through the compile, but doesn't make it to runtime. 21:08
WTH?!
lue r: my $::{'!@#$#@'}; # from S02 21:09
p6eval rakudo e489af: OUTPUT«===SORRY!===␤ResizablePMCArray: index out of bounds!␤»
japhb .ask jnthn Can you weigh in on the discussion starting at irclog.perlgeek.de/perl6/2013-04-06#i_6673025 ? Pretty please with cherries on top? :-) 21:10
yoleaux japhb: I'll pass your message to jnthn.
japhb lue, I update rakudo and panda at the same time most days -- I have a script that goes through all my public git checkouts and pulls everywhere, and then I have a script that saves the panda state, flattens and rebuilds rakudo, and then rebootstraps panda from the saved state. 21:15
lue OK. I asked because the Perl6::BOOTSTRAP error felt like an outdated panda thing to me.
japhb lue, I'm more than open to ideas of possible causes at this point. This bug is driving me nuts, and even though I have a workaround now, it's JUST WRONG AND MUST DIE BY FIRE. *ahem*. :-) 21:20
gtodd do people love readline or just put up with it ? :-) 21:24
japhb gtodd, way better than nothing ...? 21:25
lue Are you sure your switch is set to the MORE MAGIC pos^U maybe your $PATH isn't updated or you haven't actually put compiled panda in ~/.perl6 (somehow)
japhb I get annoyed when I finish building parrot, nqp, rakudo, panda, and all the modules on a new box, only to realize I forgot to start by installing libreadline-dev, and have to start all over again. :-/ 21:26
What would $PATH have to do with it, if panda is running from either location? 21:27
lue maybe you're still running an older panda that's somehow able to use the newer compiled modules when in-tree ? 21:28
japhb grabs a pair of dikes and summarily removes the MORE MAGIC switch
... 21:29
Um, hmmm.
japhb looks for panda in all the places
lue (`which panda` might be helpful if you haven't used it already) 21:31
japhb lue: there are no pandas in odd places. `which panda` is only unusual in that part of the path is a symlink. 21:32
japhb tries changing $PATH to not contain any paths with symlinks. 21:32
lue
.oO(I have my $PATH set to a symlinked ~/.perl6/bin (because changing a symlink feels less wrong to me than changing $PATH))
21:34
japhb lue: sadly, no change in behavior with using only absolute paths in $PATH 21:35
lue I was thinking which panda would tell you if you were still symlinked to an old version in ~/.perl6 (unless you delete the old directory after update) 21:36
japhb lue, no, ~/.perl6 only contains my stuff. panda is installed into .../rakudo/install/lib/parrot/5.2.0-devel/languages/perl6/site{,/bin}/panda 21:38
lue doesn't install stuff there, if that wasn't obvious already :) 21:39
japhb CWD at BEGIN time in R::D's Build.pm is the same either way, so that's not different either. 21:45
japhb lue, out of curiosity, have you tried recreating this problem? (cd into your panda tree, run `panda install Rakudo::Debugger`, note success, cd into your rakudo tree, try running the R::D install again)? 21:49
lue I don't have recent rakudo or panda (to top it all off I think I still have my forked panda installed), so I'm not sure my recreation would be very useful. 21:50
lue will still try in a moment though 21:51
japhb If you manage to recreate it anyway, that's a useful data point. ;-) 21:52
lue in-tree: first line of output for the build step is ""load_bytecode" couldn't find file 'Perl6/Grammar.pbc'" but it's still going 21:55
timotimo tadzik: these proxies, are they already available in nqp code or would one have to write PIR or a wrapper around them or something? 21:57
lue I think I may have updated rakudo sometime ago and have neglected to update panda with it :/
japhb oops 21:58
Time to pull and reboostrap panda then.
lue
.oO(or just reinstall my fork :P)
22:00
japhb now has a good idea under what circumstances his laptop is locking up, too -- appears to be when the screen tries to blank. So screensaver death or video driver screen disable crash, most likely. Sheesh. 22:00
lue, either way. :-) 22:01
tadzik timotimo: there may be something available in one of rurban++'s nqp branches 22:02
timotimo :\ 22:04
starting to think i'm not the right person to do this
tadzik not with that attitude :P 22:12
tadzik I have a feeling that everyone's waiting for JVM to Magically Fix This :) 22:13
timotimo oracle better step up!
gtodd japhb: yeah I know .. it's just that I used to have bad dreams about readline :) ...
lue I'm still getting that first error. I'm not sure what's happening. 22:14
timotimo: or icedtea, in my case :) 22:16
ravenclaw regex question: I'm using rakudo and oddly enough .*? and (.*?) are not matching. .*? is matching properly, but (.*?) is not. Any particular reason why? 22:36
flussence is that the entire regex? looks like it should work to me 22:37
ravenclaw the full regex code is: <keyword>\:\(.*?\)\:.*?$ 22:38
That code is supposed to process something like, "keyword:arg1:arg2" without quotes. I'm trying to tokenize the args and the colons, but it isn't matching properly. 22:40
flussence well, those backslashed chars are literal... 22:44
/<keyword> [':' .*?]*/ is probably closer to what you meant 22:45
flussence r: our token word {\w+}; 'word:arg1:arg2' ~~ / ^ <keyword=.word> [ ':' <arg=.word> ]* $ / 22:48
p6eval rakudo e489af: ( no output )
flussence r: our token word {\w+}; ('word:arg1:arg2' ~~ / ^ <keyword=.word> [ ':' <arg=.word> ]* $ /).gist.say
p6eval rakudo e489af: OUTPUT«「word:arg1:arg2」␤ keyword => 「word」␤ arg => 「arg1」␤ arg => 「arg2」␤␤»
masak sounds to me like ravenclaw might have trouble understanding just how little a (non-backtracked) frugal quantifier will match. that's just a guess, though, until seeing the actual code. 22:49
timotimo masak: can you elaborate? would he be better off using <-[:]>+ instead? 22:50
timotimo you're saying the .*? will match one character, then no : will be found and it will backtrack and one at a time it'll add characters until there's a : after it? 22:51
masak japhb: thanks for your p6cc feedback in the backlog. I read it and will keep it in mind for p6cc2013. 22:52
timotimo: by default, .*? matches zero characters.
timotimo oh, of course.
masak timotimo: the shortest way to match "zero or more" is to match zero. :)
timotimo i guess i was thinking of + 22:53
masak as TimToady_++ points out in A05, + is kind of unnecessary :) 22:54
(but it's still very common because it's a useful non-primitive primitive)
it's unnecessary because, for any atom 'a', 'a+' equals 'aa*'
timotimo and everything where 'a' in reality is a 50 characters big definition of some structure? 22:56
lue
.oO(But it is necessary! Why would you even type the same atom twice in a row when you don't have to?)
timotimo "factor it out into a token or something"?
lue s/even/ever/
masak lue: you should take a look at the definition of "necessary" ;) 22:57
timotimo to be honest, i am fond of +; i feel like i use it often enough to warrant not using ** 1.. instead 22:58
lue
.oO(necessary, adj: a feature that appeases a programmer's laziness or impatience (or hubris, rarely))
jnthn
.oO( oddly, removing + didn't lead to kleener code... )
22:59
yoleaux 21:10Z <japhb> jnthn: Can you weigh in on the discussion starting at irclog.perlgeek.de/perl6/2013-04-06#i_6673025 ? Pretty please with cherries on top? :-)
flussence a shorthand for "previous regex atom" might be nice to have, actually... though I can't think of any practical use for it other than making this hypothetical /aa*/ shorter
masak timotimo: yes, that's the point. it's a "useful non-necessity".
timotimo ah, okay 22:59
jnthn japhb: While I know about Rakudo::Debugger itself, tadzik++ did the Panda build bits for it. 23:00
masak timotimo: you might want to read the exact wording in A05, but the gist was something like "theoreticians care about orthogonality. practicioners care about ease of use and getting the job done."
timotimo indeed, i've seen that
jnthn japhb: I just had a Makefile that hoped the right things were in the path and didn't know much about installation :) 23:01
timotimo what's the most sensible way to figure out what width the console has in perl6? i'd like to give perl6-debug knowledge of when to abbreviate a line 23:09
jnthn timotimo: Not sure there's a portable way 23:13
timotimo OK 23:14
timotimo started golfing the code that causes perl6-debug to make the code fail 23:16
jnthn timotimo: Yeah, perl6-debug really shouldn't change semantics... 23:21
timotimo oh, that's interesting too: + Uncaught Exception 23:23
| No such method 'name' for invocant of type 'Backtrace::Frame'
timotimo i've got a short one for you 23:26
paste.ee/p/CTTKm - there you go. outputs ok 1 - on perl6, outputs a warning about Any used in numeric context, not ok 1 - on perl6-debug 23:27
jnthn timotimo: Please can you file that as a GitHub issue, so I don't lose/forget it? 23:28
timotimo sure 23:28
i'll gist it. but i think i can make it even more simple yet
indeed. just a tiny bit less complex. 23:29
timotimo oh, i don't have to gist it, i can just put it into the issue directly 23:30
japhb timotimo, Are you skilled with Perl 5? If so, you could probably look at the Perl 5 modules that detect terminal size, such as Term::Size and Term::ReadKey 23:32
timotimo japhb: i have no clue of perl5 23:36
labster I kind of wish I there was a Str.empty method so I didn't have to write " eq '' ". Even though it's the same number of characters 23:38
labster Maybe I should use ! "str".chars ? 23:39
timotimo hm, so $str isn't good? 23:40
r: say so "", so "0", so "False", so " ";
p6eval rakudo e489af: OUTPUT«FalseFalseTrueTrue␤»
timotimo hm, okay.
masak r: my $s = ""; unless $s { say "it's empty" }
p6eval rakudo e489af: OUTPUT«it's empty␤»
masak labster: ^
timotimo r: my $s = "0"; unless $s { say "it's empty" }
p6eval rakudo e489af: OUTPUT«it's empty␤»
japhb timotimo, Perl 5 is just like Perl 6 -- only less butterfly and more velociraptor. ;-)
timotimo masak: ^
masak r: my $s = "0"; unless $s.chars { say "it's empty" } 23:41
labster r: say (0, -0, "0", "-0")».so
p6eval rakudo e489af: ( no output )
rakudo e489af: OUTPUT«False False False True␤»
labster japhb++ 23:42
timotimo masak: that seems better.
japhb jnthn, where would I look for the code that keeps Rakudo::Debugger from single-stepping into subs/methods defined in the setting? Because I want to disable that. ;-) 23:54
jnthn japhb: There is no code to do that; the debugger works by instrumenting code with hooks as it compiles it, and the setting is already compiled. 23:55
japhb Oh.
Dang.