»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:18 Viestinik left
sorear aloha, seen pmichaud 00:25
aloha sorear: pmichaud was last seen in #perl6 2 days 7 hours ago saying "yes, nom here also".
sorear aloha, seen TimToady
aloha sorear: TimToady was last seen in #parrot 22 hours 36 mins ago joining the channel.
00:48 bluescreen left 00:51 kiithroen joined
sorear OK. 00:54
00:54 risou_ left
sorear \o/ 00:54
00:55 QinGW joined 01:02 Viestinik joined, zostay left 01:03 zostay joined 01:17 flatwhatson left 01:24 colomon left 01:30 colomon joined 01:35 flatwhatson joined, [particle] left 01:36 [particle] joined 01:48 steffen123__ joined 02:02 whiteknight left
sorear huh. /usr/bin/time says that compiling STD took 28.88s user 369.84s system 02:04
02:06 rvrgs left 02:19 barika left 02:24 meppl joined 02:31 jjore left 02:32 jjore joined
sorear 2 + 2\n is working 02:33
dalek ecza/master: a4be785 | sorear++ | lib/Cursor.cs:
Make LTM robust to missing subrules
ecza/master: 351fbdd | sorear++ | / (5 files):
More STD fiddles
ecza/master: b46f714 | sorear++ | lib/Kernel.cs:
Implement our %@ vars
ecza/master: d4cfcab | sorear++ | / (4 files):
Run mergeback
ecza/master: f288668 | sorear++ | v6/tryfile:
Allow .shift from an empty list like P5
02:50 pythonian4000 is now known as pythonian4000afk, pythonian4000afk is now known as pythonian4000, pythonian4000 is now known as pythonian4000afk
sorear /usr/bin/time says 30s user 360s system 800s elapsed. dstat says system never went over 10%. what gives? 03:04
03:12 pythonian4000afk is now known as pythonian4000 03:13 pythonian4000 is now known as pythonian4000afk, pythonian4000afk is now known as pythonian4000 03:23 meppl left 03:29 meppl joined 03:33 pythonian4000 is now known as pythonian4000afk, pythonian4000afk is now known as pythonian4000 03:41 pythonian4000 is now known as pythonian4000afk 03:46 dengel10 joined 03:48 flussence_ joined 03:50 flussence left 03:57 shelling_lab joined 03:59 pythonian4000afk is now known as pythonian4000 04:01 kiithroen left
dengel10 Hello :) 04:07
I'm planning on modernizing an IRC infobot I built years ago.
and figure Perl 6 should be fun :)
would anyone know of a skelleton irc bot in Perl 6?
so I can build on top the fetures of my infobot 04:08
meppl someone could write a irc-module modules.perl6.org/ 04:12
dengel10 looking 04:32
well... I tried. Found a pretty compact and easy one in C. Will build on top of that. 04:33
THanx anyways.
04:33 dengel10 left
dalek ecza/master: 5b07e77 | sorear++ | / (3 files):
More STD fiddles - 'foo' and "foo" work
04:46
ecza/master: 412a5eb | sorear++ | src/CompilerDriver.pm:
Generate Mono debug symbols
ecza/master: 4c508d4 | sorear++ | lib/SAFE.setting:
Improve Numeric context handling

Also regexes use Str context
04:47 steffen123__ left 04:52 kiithroen joined, kaare joined 04:53 kaare is now known as Guest50678, dju_ joined 04:57 dju left
sorear hmm, niecza is running into memory issues with STD 05:00
05:01 grew left 05:02 cls_bsd joined 05:10 grew joined 05:19 pythonian4000 is now known as pythonian4000afk 05:22 HarryS joined 05:52 kiithroen left, kiithroen joined 06:01 kanishka joined 06:05 wtw joined 06:06 cjk101010 joined 06:11 barika joined
dalek ecza/master: aee9ca3 | sorear++ | lib/Cursor.cs:
Fix <.nonexistant> LTM crash, broken default <.ws>
06:22
ecza/master: 421c88f | sorear++ | v6/ (3 files):
More STD tweaks

Now working: %*MYSTERY, q (foo), class { }
ecza/master: ff5e4b8 | sorear++ | src/RxOp.pm:
<x> || <x> should not cause List
06:22 baest_ is now known as baest 06:53 [particle]1 joined 06:55 pnu left 06:57 [particle] left 07:01 mavrc joined 07:02 araujo left 07:11 pythonian4000afk is now known as pythonian4000 07:15 baux joined 07:20 barika left 07:24 Trashlord joined
dalek ecza/master: cb10d14 | sorear++ | v6/ (5 files):
More STD tweaks; my $foo = 2 works now
07:26
07:26 kjeldahl left 07:30 kanishka left
sorear soooo many bugs. 07:34
Trashlord bugs on pugs
au|irc snoopy on snails 07:35
sorear au o/ 07:36
au|irc hey sorear \o :)
sorear niecza-compiled STD can parse 1000 repetitions of $*foo = $*bar / $*quux orelse $*moo(1,2,3); in 1 minute exactly 07:38
au|irc woot!
"niecza-compiled STD" is music to my ears
sorear viv-compiled STD requires 2m 5s 07:41
it only barely works
it's riddled with inscrutable miscompilations
I have reached one peak, and only now do I see how long the road is 07:42
au|irc *nod* the journey of a thousand miles continues with another single step :) 07:43
sorear I am not sure how I will ever compete with Perl 5 on parsing speed
(perhaps by focusing on precompiler support?) 07:44
anyways it's far from the "30 times faster" I expected from the JSON::Tiny work
the current handling of lists, I suspect, is much of the problem 07:45
especially as I don't really understand them all that well - they're stolen from Rakudo and pmichaud's notes
au|irc this is the "my class List is Cool" linked list from lib/SAFE.setting? 07:48
sorear yes 07:52
and its two subclasses Array and Seq 07:53
looking at the runtime call traces, most uses of arrays are creating iterators built on iterators built on iterators
07:53 hanekomu_ joined
sorear lots of time spent around List!fill, ListIterator.reify, List.shift, List.clone 07:54
au|irc *nod* 07:55
dalek ecza/master: 28714cc | sorear++ | lib/Cursor.cs:
Avoid creating List objects for tokens/rules

This gets us a 4-5% speedup in STD.
07:57
08:01 kjeldahl joined 08:11 barika joined
sorear au|irc: I want to blame lazy semantics 08:12
08:12 Trashlord left
au|irc lazy semantics would happily take infinite blame 08:12
au|irc just freshly got "ok 608" from "./niecza_eval test.pl" - a long way from <100 in July! 08:15
08:16 dakkar joined 08:21 drbean left, drbean_ joined 08:24 flatwhatson_ left 08:29 PZt left 08:35 pnu joined 08:44 flussence_ is now known as flussence 08:48 hanekomu_ left 08:51 lge joined 09:00 rgrau joined 09:06 MayDaniel joined 09:16 dukeleto left, [particle]1 left, dukeleto joined 09:17 [particle] joined 09:22 kiithroen left 09:34 bbkr joined 09:35 daxim joined 09:44 risou joined, _twitch joined
colomon argh. what error was "the too few positional arguments: 2 passed, 3 (or more) expected" message hiding? 09:51
oh, right, use of an undeclared varible. 09:58
dalek ecza/master: e671cca | sorear++ | lib/SAFE.setting:
Fix test failures
09:59
ecza/master: cfa7a9d | sorear++ | src/ (2 files):
Delete optrees after code generation

This saves 15-20% on the size of store files and reduces compiler memory usage correspondingly.
ecza/master: dd75106 | sorear++ | / (2 files):
Be more aggressive about deleting elided subs
09:59 wallberg joined
10:01 PZt joined 10:04 wallberg left, wallberg joined 10:06 QinGW left
mathw sorear: you've been busy :) 10:15
10:18 icwiener joined 10:32 wallberg left, wallberg joined 10:34 wallberg left 10:35 wallberg joined 10:39 baux left 10:44 baux joined 10:48 PZt left 10:51 PZt joined 10:56 nadim left, PZt left, nadim joined 11:01 tzhs joined 11:07 daxim left 11:09 daxim joined 11:12 orafu left, zulon joined, orafu joined 11:25 uniejo joined 11:31 zulon left 11:33 wamba joined, wamba left 11:34 wamba joined, wamba left 11:37 wamba joined 11:44 PZt joined 11:45 masak joined
masak oh hai, #perl6! 11:45
sjn o/ 11:48
colomon \o 11:55
11:57 pythonian4000 is now known as pythonian4000afk 12:03 am0c joined 12:05 takadonet joined
takadonet morning all 12:05
masak takadonet: 'o
takadonet masak: how are u? 12:06
masak I'm fine, considering that it's Monday.
and u?
takadonet doing ok. Going to be a long week 12:08
masak aye.
12:12 Trashlord joined 12:19 zostay left 12:25 bluescreen joined
jnthn o/ from England 12:27
jnthn made it here alive
masak jnthn! \o/ 12:29
hm, interesting ohloh comparison: twitter.com/dukeleto/status/28675662260
jnthn masak!
lunch time here :) 12:32
masak I must say I like that graph. one can discern a rise in Rakudo contributors from it. 12:35
bbkr moritz++ # article about core modules. 12:36
masak sorear++ # first hill! yay! 12:39
sorear: I just want to say that I think your work on making parsing fast is very important. 12:40
colomon what caught my attention about the graph is the drop-off in Rakudo contributors around R* release...
takadonet wonder if jnthn commits on his branch count toward that counter 12:45
colomon makes me feel again that we need something to push for... 12:49
takadonet improve speed? 12:53
masak easier said than done, but yes.
I think "speed" is at the top of most people's list.
12:54 MayDaniel left
takadonet so the people who can 'easily' change that worry about it while the rest of us write frameworks :) 12:54
13:00 MayDaniel joined
masak something like that. 13:01
daxim what's the best data structure in p6 to represent a multiset and operate on it? 13:02
masak daxim: Bag? 13:03
13:03 Guest50678 left
daxim cool, a built-in 13:03
colomon takadonet: "speed" is great, but it's also very nebulous. 13:04
daxim rakudo: my Bag $b = (1,2,2,3,4,5,5,6,,7,8,); say $b
p6eval rakudo d49eea: OUTPUT«===SORRY!===␤In "my" declaration, typename Bag must be predeclared (or marked as declarative with :: prefix) at line 22, near " $b = (1,2"␤»
masak here's a best-case scenario: during the past two-three years, Rakudo has grown in number of features, and people say "that's very nice, well done, but why is it so slow?". during the next two-three years, Rakudo will get faster through some means (improvements in Parrot, internal optimizations in the nqp-rx/Rakudo stack, trying out a .NET version of Rakudo, etc), and then, in 2014 or so, we will have a fast Rakudo with all the features
of today *and* more.
colomon it's also unclear how much of it is achievable by mere mortals.
masak colomon: please explain to me what you mean by "nebulous" here.
I agree it's not a one-dimensional thing.
but it's clearly something that can be measured in various ways, albeit with difficulty. 13:05
colomon masak: I mean that "R* in April" was an easy to understand goal.
for people to work towards.
masak right, but the "R*" part consisted of a number of subgoals and sub-subgoals. 13:06
colomon The equivalent would be something like "10x faster by Christmas".
Just saying "speed" doesn't provide much direction or urgency 13:07
masak true.
this all reminds me of a certain pie-throwing incident in 2002.
colomon pie-throwing?
masak I wasn't yet active then, but I've backlogged over the event.
colomon I can only recall hearing of mug throwing.
masak yes, the Parrot pumpking was Dan at the time.
he made a bet, concerning Parrot, Python and speed. 13:08
13:08 _twitch left
masak he lost, for various non-trivial technical reasons. 13:08
I've heard it muttered that in some ways, Parrot still suffers from the hasty hacks put into the VM for the sake of winning that bet.
www.sidhe.org/~dan/blog/archives/000370.html 13:10
actually, there's a whole category about it: www.sidhe.org/~dan/blog/archives/ca...ethon.html
(sorted reverse-chronologically, it seems) 13:11
takadonet masak: I find it amazing that you know about this 13:13
masak why? I'm a Perl 6 historian on my spare time.
takadonet I know but you about 10 years to go thry 13:14
thru*
masak I can't claim to have a complete overview of it all. it sure is a lot of text. 13:15
PerlJam I was around and paying attention back then and I don't have a complete overview of it all :) 13:16
colomon anyway, I don't know that "10x faster in N months" is the right thing to go for.
but I do feel like we need something to provide motivation and direction 13:17
perhaps porting N major Perl 5 modules might be a good alternative
PerlJam colomon: What does "porting" mean exactly? 13:18
colomon PerlJam: somehow making them work with Perl 6
PerlJam by hook or crook?
colomon I was thinking rewriting, but if there are better alternatives...
PerlJam Perhaps it's just the mood I'm in this morning, but I see nothing but problems with the ideas of some percentage increase in speed *and* porting some number of modules. 13:19
colomon rewriting would be a great way to stress Rakudo in nice bug-findy ways, while providing useful modules in the end. 13:20
PerlJam (problems with them as rallying points for the Perl 6 community I mean)
colomon PerlJam++
13:20 Patterner left 13:21 Psyche^ joined, Psyche^ is now known as Patterner
PerlJam though as I think it through a little more, most of the problems I see are due to the "parrot implementation barrier" that we're likely to run across. 13:22
colomon Hmmm... maybe we should make N = 6 throughout. six modules & 6x faster, all in 6 months. :)
PerlJam <insert biblical references to 666 at will> 13:23
13:26 estrabd joined 13:30 plainhao joined 13:32 pnu left
colomon The 666 plan! Ooooo.... 13:35
13:38 pnu joined
takadonet colomon: which ones? :) 13:38
colomon which modules?
takadonet yes
colomon I wouldn't know. 13:39
takadonet should find which module are the most used and port them.
minus frameworks 13:40
13:45 Raynes left
colomon stats.cpantesters.org/leadercpan.ht...p20distros 13:46
takadonet colomon: I was just looking at that...
colomon: ali.as/top100/ 13:47
colomon volatile 100, maybe 13:48
?
13:48 Raynes joined
takadonet probably a good place to choice 13:48
some are already build in 13:49
colomon Text-Tabs+Wrap
File-Path
Scalar-List-Utils 13:50
?
(I mean, as possible candidates...)
takadonet I believe some of the fcn of Scalar::List::Utils are built-in 13:52
13:52 kjeldahl left
colomon takadonet: I'm sure you're right there. 13:52
takadonet never heard of Text::Tabs+Wrap
should be easy to do..
colomon actually, List::Utils appears to be entirely in p6's core already. :) 13:53
Scalar::Utils, on the other hand...
13:55 uniejo left 13:56 cjk101010 left
takadonet well I might actually make a commitment here.... I port Text::Tabs and Text::Wrap modules 13:57
13:57 PacoLinux joined 13:58 uniejo joined, phenny left 13:59 uniejo left
colomon takadonet++ 14:00
14:02 timbunce joined 14:05 phenny joined
masak takadonet: make sure you check out the Str.indent built-in (mentioned in S32-setting-library/Str.pod) 14:06
colomon but NYI
takadonet masak: sounds good 14:07
masak colomon: would be a nice weekly challenge, methinks.
takadonet masak: what would?
masak implementing .indent
takadonet ah 14:08
14:08 jhuni joined 14:09 wamba left 14:29 patspam joined 14:31 flatwhatson_ joined
dalek odel: 1364eb1 | mberends++ | dotnet/compiler/ (2 files):
[dotnet/compiler] streamline build and test scripts for Mono on Linux
14:33
14:35 rgrau_ joined 14:39 dukeleto left, dukeleto joined 14:43 wtw left 14:44 vapace joined 14:45 Viestinik left 14:49 am0c left 14:51 Khisanth left 14:53 cognominal left
dalek odel: 07f57e1 | mberends++ | java/runtime/ (8 files):
[java/runtime] catch up to dotnet in throw and catch handlers
14:54
14:59 Exodist left, dukeleto left, exodist joined 15:00 hatseflats left, hatsefla1s joined 15:01 molaf joined, dukeleto joined 15:02 bluescreen left, bluescreen joined 15:03 cognominal joined 15:04 icwiener left, dukeleto left 15:07 Khisanth joined 15:12 lge left 15:14 tzhs left 15:18 icwiener joined 15:29 spq1 joined, spq1 left 15:44 Ross joined
masak I said that the pie was in 2002. however, looking at www.sidhe.org/~dan/blog/archives/ca...ethon.html it is evident that it was in 2004. 15:46
takadonet masak: still looking at that? 15:50
masak off and on, yes.
15:51 Ross left
masak I have an unhealthy relationship to browser tabs... 15:51
takadonet heh 15:53
15:53 Ross joined, Ross left, Ross joined 15:55 wamba joined
masak swim & 15:58
15:58 masak left 16:24 cdarroch joined, cdarroch left, cdarroch joined 16:25 wallberg left 16:29 orafu left 16:30 orafu joined 16:31 daxim left, Ross left 16:35 daxim joined 16:36 Ross joined 16:39 baux left, alester joined 16:49 icwiener_ joined 16:51 icwiener left 16:55 dukeleto joined 17:07 _kaare joined 17:14 isBEKaml joined
isBEKaml OHHAI, #perl6! :) 17:14
phenny isBEKaml: 24 Oct 18:49Z <masak> tell isBEKaml that I'd like to conspire over Yapsi with him. :)
colomon \o
isBEKaml colomon: how's things on a monday? :) 17:15
colomon I'm insanely tired
isBEKaml phenny: tell masak I'd be glad to be a co-conspirator!
phenny isBEKaml: I'll pass that on when masak is around.
colomon but accomplishing things for $work, and it's hourly pay $work, too. 17:16
17:16 skangas` joined
colomon I've also been scheming on how to inspire the Rakudo development process. (Check the backlog.) 17:16
isBEKaml I think I can understand that - I've been terribly tired over the past month as well. One of the reasons I'm off on a vacation this weekend.
17:16 sukria left
colomon In this case, it has something to do with waking up at 4:30 am and having a cat wake me up every time I came close to getting back to sleep. 17:17
17:18 sukria joined
isBEKaml well, I was actually suffering from a bout of insomnia after some lull. So, sleep was becoming insanely difficult and I sorely wanted to sleep! 17:18
[backlog] I think you're referring to the need for adding more libraries to core perl6? 17:19
rakudo: (1/0).say
p6eval rakudo d49eea: OUTPUT«Inf␤» 17:20
PerlJam isBEKaml: more action and excitement to Perl 6 :-)
isBEKaml rakudo: (1/0.0).say
p6eval rakudo d49eea: OUTPUT«Inf␤»
colomon Well, I was mostly looking for things to inspire -- what PerlJam++ says.
modules seemed a good potential choice.
isBEKaml 12:40 colomon what caught my attention about the graph is the drop-off in Rakudo contributors around R* release... 17:21
colomon pretty sure there's been a similar drop-off in actual changes to rakudo's source.
isBEKaml I remember moritz_++ adding a few potential modules as part of weekly (or newbie) challenges... must be somewhere around. 17:22
(mu repo, I think)
phenny: tell masak, about the 1/0 result in java - you'd better understand the difference if you try 1/0 and 1/0.0. Java treats real and integers on different scales. :) 17:23
phenny isBEKaml: I'll pass that on when masak is around.
17:24 dakkar left
isBEKaml one thing I find LTA is the amount of memory rakudo consumes and the high startup times involved. This is especially aggravated on older machines with less than 1G of RAM. 17:26
colomon admits he hasn't had less than 4G of RAM in a machine in years. unless you count his phone.
isBEKaml admits he hasn't seen machines with over 2G of RAM unless you count his phone. 17:27
PerlJam you know how people are always saying how Perl 6 isn't "real"? I don't think they really believe that Perl 6 doesn't exist so much as they believe it isn't on par with other languages. Perl 6 is kind of a toy or a hobby project.
It's got neat features and syntax and such, but it's slow and not all put together. 17:28
17:28 Entonian joined
isBEKaml I think one way to correct the "hobby" perception is more activity on the mailing lists. That'd give out a more serious message to the world than just sticking around on IRC conversations. 17:28
PerlJam isBEKaml: I think the mailing lists are just as invisible. 17:29
isBEKaml PerlJam: that's exactly my point. Why not make it more active and visible?
PerlJam I mean, even if there were more activity on the mailing list, I don't think it would help.
isBEKaml It'd sure help - provided you point people towards mailing lists than IRC channels. Maybe, perl6.org could help in there. 17:30
IMO, IRC channels tend to look like a bunch of people goofing off all day. NOM. 17:31
mkramer isBEKaml: which open source communities have you been involved in building? 17:33
isBEKaml mkramer: this is the first one I'm involved in. :)
PerlJam You what would make developing in Perl 6 nicer for me? If I never saw a parrot error. Granted, I could limit my ability to diagnose and fix some errors that way, but I like having the conceptual wall where I never see parrot. 17:34
(I don't know why that is. I don't have anything in particular against parrot, I just want to see "Perl 6 errors") 17:35
isBEKaml parrot leakages still happen? I thought jnthn++ fixed that a while ago?
PerlJam Maybe that would make a good jihad for Perl 6. Sharpen the boundary between Rakudo and the underlying VM :) 17:38
17:39 Khisanth left
isBEKaml I think that'd be the case for parrot, not for perl6. =) 17:39
17:39 Khisanth joined
isBEKaml (I think the job of demarcating the works between the outside world and the VM is best left to the VM) 17:45
17:52 timbunce left 17:53 javs joined, vapace left, vapace joined
isBEKaml Found the list of project-ideas that moritz_++ put up sometime ago: misc/helpnow/README (mu repo) 17:57
17:59 pyrimidine joined, timbunce joined 18:01 daxim left 18:08 envi left 18:09 meppl left
takadonet can you do a substitution and capture at the same time?? 18:10
flussence "$str ~~ s/(.)//;" doesn't populate $/, but "$str ~~ /(.)/" does... I don't think it's possible 18:15
18:15 rejs joined 18:21 Chillance joined
takadonet I have this perl 5 line : ' $in =~ s/^TEST\s*(\d+)?\s*(\S+)?\n//; ' 18:23
My hack for now is to simply going to call it twice
flussence: thanks anyway :)
18:25 kanishka joined 18:30 sftp joined 18:33 itz left 18:37 Chat2643 joined
Chat2643 horny female 23 years have pics;) 18:39
18:39 ashleydev left 18:40 Chat2643 left, Entonian left, ashleydev joined 18:49 rejs left 18:51 MayDaniel left 18:55 Entonian joined
sorear good * #perl6 18:57
takadonet sorear: yo
isBEKaml hi sorear
18:59 masak joined 19:00 masak left 19:04 isBEKaml left
diakopter Chat2643: that's a tad OT 19:04
Raynes Just a tad. 19:08
19:09 araujo joined, araujo left, araujo joined
dalek odel: fd17228 | mberends++ | dotnet/runtime/ (24 files):
[dotnet/runtime] if the Java version cannot use the var type declaration, I don't see why the C# version should ;)
19:13
19:20 vapace left 19:21 vapace joined, Eliranon joined
Eliranon hi all.. I have simple question, is perl6 going to replacing perl5 or they will always both exist? Perl5 was preferred for all sys admins and web developers.. what about perl 6? 19:24
PerlJam Eliranon: They will coexist. 19:25
Eliranon: we can't say if that will *always* be the case, but that's what we think will happen for the foreseeable future.
takadonet Eliranon: An example would be C and C++
Eliranon so can we say that for a sys admin for example, there will be no need to take a look at perl6? who will be the people who use it mostly? 19:27
takadonet Eliranon: It will be used as broad as Perl 5 and probably beyond 19:28
PerlJam Eliranon: we can't predict the future. People will use what they find useful. 19:29
19:33 plainhao left
Eliranon one last question, I used perl5 regular expressions extensively in my work to create reports effectively and fast.. do you recommend me to check perl6? and why (if yes) :) 19:33
sorear Not yet. 19:36
PerlJam Eliranon: if you have an interest in languages/grammars/regex, you should look at the features Perl 6 has to offer. But if you want fast execution speed, we're not there yet at all. 19:41
19:44 jackyboy joined, jackyboy left, jackyboy joined
Eliranon @PerlJam: When I started using perl for report generation around ten years ago I fell in love with the language.. so I will check the regex/grammar of Perl6.. I am sure perl6 will get fast someday and I may use it for a couple of years (before retirement) :D 19:45
jackyboy Standalone rules are not supported yet are they?
pmichaud good afternoon, #perl6 19:47
standalone rules are only available through variables at the moment -- e.g.: my $rule = rule { ... }; / $rule /
jackyboy ahhh ok
thats what i thought
thanks mate
pmichaud we're still working out how the semantics should work for named rules and regexes outside of a grammar
jackyboy interesting 19:49
PerlJam that read an awful lot like "we're still waiting for miracle to occur" in my head :)
jackyboy shouldn't it be quite simple?
(not that I know much about it)
PerlJam jackyboy: We thought so at first too. Turns out it's not that simple.
But, "waiting for a miracle to occur" is also roughly equivalent to "waiting for Larry's brain to intuit an elegant solution" too, so there's still hope. 19:50
(at least in my head)
pmichaud I think we have the outlines of a solution, although it's not entirely elegant yet
sorear the interesting case is #`( in setting ) sub uc($fo) { ... } #`( in user code ) grammar G { rule uc { .. }; ... <uc> }
19:51 _kaare left
sorear should <uc> bind to the lexical &uc (which would be utterly wrong), or should it "fall back" to looking in the grammar? 19:51
pmichaud that one isn't too bad, it's clear the nested <uc> should use the one from the grammar (due to lexical scoping)
more interesting is
19:52 Eliranon left
pmichaud grammar G { rule uc { ... }; rule xyz { <uc> }; }; rule uc { ... }; / <G::xyz> / 19:52
or a variety of other inheritance-related items
jackyboy ooo 19:53
slavik1 what is the top rule? used to be rule TOP
pmichaud it's still TOP by default
jackyboy so for the moment we should just put everything into a grammar? 19:54
pmichaud or use variables for rules :-) 19:55
jackyboy but if you use variables for rules how do you nest them?
i.e. my $rule = rule {<date> \s+ <name>}
pmichaud my $abc = rule { abc }; my $def = rule { $abc }; # works fine
jackyboy and then defining <date> and <name> rules
ooo 19:56
ok
sorear that ought to be <$abc>
pmichaud can also use <$abc>
and if you want to capture it, it's <abc=$abc>
jackyboy cheers
pmichaud (that's the part we're not very happy about at the moment)
jackyboy yeah it seems a little clunky
19:57 rgrau_ left, rgrau_ joined
jackyboy but I love how perl6 is turning out 19:57
:)
sorear ... yuck. 19:58
S05 really does say that $foo in a regex treats Regex and Str differently
pmichaud basically, $foo means "if it's not a regex, make it a literal string match" 19:59
<$foo> means "if it's not a regex, stringify and compile to regex"
(with special rules for arrays and the like)
sorear well, as a static compiler hacker, I'm not too thrilled with the second one ;) 20:00
pmichaud it's dynamic pretty much no matter what you do :-| 20:01
(since they're variables)
sorear how much of the List guts I stole from you are part of the Perl 6 spec?
will the spectests be directly working with ListIter objects?
20:02 Trashlord left, vapace left 20:10 M_o_C joined
dalek ecza/master: 71c2d1e | sorear++ | / (3 files):
Avoid repeated invalidation while constructing classes

This saves about 1 second on STD load time.
20:33
20:33 javs left 20:44 timbunce left 20:50 timbunce joined, jjore left 20:52 jjore joined
jackyboy so how do you access a named capture? 20:54
I am trying
$/<namedCapture>
after a successful match
20:55 grew left
jackyboy or even $/{'rule_name'}<namedCapture> but that gives Any() 20:57
20:59 Ross left 21:01 MayDaniel joined, Ross joined
jackyboy Not even $/{'rule_name'}[0] works when using a rule. Nor $/[0] 21:04
$/[0] works for the exact same regex but copied and pasted into $string ~~ / query / 21:05
PerlJam jackyboy: show your code 21:10
jackyboy: and show the whole code :) 21:11
jackyboy my $string = "the lazy boy couldn't code"; 21:14
21:14 seb_est_la joined
jackyboy my $reg = regex { the (.*) } 21:15
PerlJam copy-n-paste into gitst.github.com or something rather than on channel
jackyboy ah ok ok
PerlJam (then just paste the link)
sorear gist 21:16
jackyboy gist.github.com/645778 21:17
sorear use <reg=$reg> 21:18
then say $<reg>
PerlJam well, $<reg>[0]
jackyboy hmm where should I put <reg=$reg> in the example code? 21:19
i thought in the match 21:21
but that doesn't work
PerlJam jackyboy: if $string ~~ $reg { say $/[0] } # should work. you introduced an extra level of indirection when you said m/ $reg / I think. 21:22
jackyboy yep
ok
yeah
it does work
cheers mate
and named captures work the same way but with $<reg><namedCapture>
?
PerlJam but m/ <reg=$reg> / should have also worked (and $/<reg>[0] would have given you your string) 21:23
jackyboy it does, I was missing the angle brackets 21:24
I was trying $/reg[0] etc
for a long while
thank you 21:25
PerlJam sure
sorear $/ can be accessed as hash or as an array 21:26
it's not special syntax
21:28 pothos joined 21:29 bluescreen left 21:30 M_o_C left, pothos_ left
PerlJam Hmm. Is there a way to get at the capture when you do my $r = regex { (.) }; "foo" ~~ m/ f $r o /; # ??? 21:32
Tene PerlJam: my $match = "foo" ~~ m/.../;
Or did I misunderstand? 21:33
PerlJam the capture in $r is hidden.
Tene ah 21:34
$<foo>=$r ?
PerlJam rakudo: my $r = regex { (.) }; "foo" ~~ m/ f <r=$r> o /; say $/<r>[0];
p6eval rakudo d49eea: OUTPUT«o␤»
PerlJam I want that but without naming $r
Tene yeah
PerlJam Well, I don't /want/ it as much as I wonder if it's possible now 21:35
Tene rakudo: my $r = regex { (.) }; "foo" ~~ m/ f ($r) o /; say $/[0][0];
p6eval rakudo d49eea: OUTPUT«␤»
PerlJam that's interesting
rakudo: my $r = regex { (.) }; "foo" ~~ m/ f ($r) o /; say $/[0] 21:36
p6eval rakudo d49eea: OUTPUT«o␤»
21:37 Ross left
PerlJam (and by "interesting", I mean "a bug" :) 21:38
21:39 takadonet left, Entonian left 21:40 takadonet joined
takadonet yo 21:40
dalek ecza/master: 08e051c | sorear++ | src/ (5 files):
Allow regex embedded blocks to be inlined
21:42
takadonet so close.... 21:50
What I'm doing wrong here? Error: 'Adverb 'g' not allowed on m ' on line : $x ~~ ms:g/(\N+)/; 21:52
nevermind 21:54
21:55 MayDaniel left
takadonet !!! 21:59
anyone know how to do capturing for repeat matches? 22:04
22:06 mavrc left 22:11 orafu left 22:12 timbunce left 22:15 takadonet left 22:16 takadonet joined 22:19 slavik1 left 22:20 slavik1 joined
sorear takadonet: avoid :g 22:32
do you know about .comb?
takadonet ... probably I forgot 22:33
22:35 Chillance left 22:40 wamba left
jackyboy ooo what is .comb? 22:53
22:53 slavik1 left
arnsholt jackyboy: Inverse of split, essentially 22:57
It returns the bits of the string that match the pattern, instead of the bits that don't match 22:58
23:00 masak joined
masak arnsholt: I wouldn't call .comb the "inverse" of .split so much as the "dual". 23:00
phenny masak: 17:15Z <isBEKaml> tell masak I'd be glad to be a co-conspirator!
masak: 17:23Z <isBEKaml> tell masak about the 1/0 result in java - you'd better understand the difference if you try 1/0 and 1/0.0. Java treats real and integers on different scales. :)
23:01 icwiener_ left
masak isBEKaml: I'm aware of Java's treatment of integer division. :) it seems quite sane to me. 23:01
23:05 orafu joined
jackyboy ahh cool 23:05
masak rakudo: say "1 17 314".comb(/\d+/).perl 23:06
p6eval rakudo d49eea: OUTPUT«("1", "17", "314")␤»
jackyboy rakudo: say "1 17 314".split(/\s/).perl 23:07
p6eval rakudo d49eea: OUTPUT«("1", "17", "314")␤»
jackyboy ahh very cool
masak yep. "dual" :)
23:08 cdarroch left
masak rakudo: say "OH HAI\nthis is a test".comb( / \N+ \n? / ).perl 23:09
p6eval rakudo d49eea: OUTPUT«("OH HAI\n", "this is a test")␤»
avuserow so it's similar to P5's my(@stuff) = $var =~ /(\d+)/g;
but nicer
masak now that you mention it, I guess it is, yeah.
23:10 alester left
avuserow rakudo: say ("1 17 314" =~ m:g/(\d+)/).perl 23:10
p6eval rakudo d49eea: OUTPUT«===SORRY!===␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 22, near " m:g/(\\d+)"␤»
avuserow rakudo: say ("1 17 314" ~~ m:g/(\d+)/).perl
p6eval rakudo d49eea: OUTPUT«===SORRY!===␤Adverb 'g' not allowed on m at line 22, near ").perl"␤»
avuserow rakudo: say ("1 17 314" ~~ m/(\d+)/).perl
p6eval rakudo d49eea: OUTPUT«Match.new(␤ from => 0,␤ orig => "1 17 314",␤ to => 1,␤ positional => [␤ Match.new(␤ from => 0,␤ orig => "1 17 314",␤ to => 1,␤ ),␤ ],␤)␤»
avuserow it's been a while since I've written Perl 6 :(
masak adverb :g not allowed on m? 23:11
I didn't know that.
avuserow me neither. useful error messages though
rakudo: say ("1 17 314" ~~ m/(\d+)/) 23:12
p6eval rakudo d49eea: OUTPUT«1␤»
avuserow okay so, I guess the list form of that is gone?
if that's the case, then .comb makes tons of sense and is a nicer way to write it anyway
masak I'm not sure why m:g// wouldn't work, though. 23:16
seems like it would be a nice service to Perl 5 people.
avuserow rakudo: say "Röyksopp".normalize 23:18
p6eval rakudo d49eea: OUTPUT«Method 'normalize' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/l62lkl3mUD␤»
masak rakudo: say "OH HAI\n\nthis is a test".comb( / \N* \n? / ).perl
p6eval rakudo d49eea: OUTPUT«("OH HAI\n", "\n", "this is a test", "")␤»
takadonet masak++ 23:19
masak is assisting takadonet a bit over privmsg :) 23:20
oh! note that we got a false one at the end, though.
rakudo: say "OH HAI\n\nthis is a test".comb( / \N* [$ | \n?] / ).perl
p6eval rakudo d49eea: OUTPUT«("OH HAI\n", "\n", "this is a test", "")␤»
masak I don't really know why we do. 23:21
takadonet works for my test cases....
masak could be a bug. or could just be me being tired.
takadonet just one more section and I will have it working!
well one sub anyway 23:22
masak and then nothing stands between you and world domination? 23:28
:)
23:32 rvrgs joined 23:37 patspam left
masak 'night, #perl6. 23:37
takadonet masak: no!
night 23:38
masak no? :)
rvrgs print "ei";
masak rvrgs: you Finnish?
takadonet masak: i should have something to show tomorrow for y ou
well.... 12 hourish
masak takadonet: looking forward to it.
masak sleeps-ish
23:38 masak left 23:45 rvrgs left 23:50 whiteknight joined
takadonet whiteknight: hey 23:51
whiteknight hello takadonet
takadonet whiteknight: This is really a long shot but did you every play in a starwars gaming league? 23:52
whiteknight no sir
takadonet whiteknight: ok thanks
23:58 rvrgs joined