Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-06-08

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:13 amoc joined #perl6
00:33 sri_kraih_ joined #perl6
00:42 snarkyboojum joined #perl6
00:45 sri_kraih__ joined #perl6
01:09 ihrd joined #perl6
01:10 ihrd left #perl6
02:03 cspencer joined #perl6
02:26 kate21de joined #perl6
02:31 justatheory joined #perl6
02:38 alester joined #perl6
03:15 agentzh joined #perl6
03:18 alanhaggai joined #perl6
03:23 lambdabot joined #perl6
03:27 cosimo joined #perl6
03:28 lambdabot joined #perl6
03:29 mkfort joined #perl6
03:29 xinming_ joined #perl6
03:30 alester joined #perl6
03:31 lambdabot joined #perl6
03:35 mkfort joined #perl6
03:38 cosimo joined #perl6
04:12 payload left #perl6
04:17 payload joined #perl6
04:57 cottoo joined #perl6
05:06 DemoFreak joined #perl6
05:10 dmpk2k joined #perl6
05:31 xomas joined #perl6
05:40 finanalyst joined #perl6
05:51 ejs joined #perl6
05:52 iblechbot joined #perl6
06:48 xinming joined #perl6
06:50 mycelium joined #perl6
06:55 mycelium hello. can i find builded debian packages for last parrot and perl6 releases anywhere?
07:11 agentzh joined #perl6
07:12 unitxt mycelium: I do not think so. You might have better luck asking over in #debian though. *But*, this url is very nice, http://rakudo.org/how-to-get-rakudo ...I am newbie and had Rakudo w/ Parrot running in no time, just "make sure that all the build requirements" beforehand, like it says on the web page.
07:14 viklund joined #perl6
07:21 snarkyboojum joined #perl6
07:21 dakkar joined #perl6
07:26 mycelium unitxt: thanks. http://rakudo.org/how-to-get-rakudo i saw. if i will not find packages then will get sources from git
07:28 alester joined #perl6
07:28 Matt-W mycelium: Most of us use the latest git, because Rakudo changes so quickly
07:29 Matt-W It is usually a very straightforward build
07:34 mycelium Matt-W: i understood. but dpkg/apt is great comfortable :)
07:34 Matt-W Yes :)
07:35 Matt-W However, if you just had packages of the monthly releases, you'd be way behind in a couple of weeks
07:36 DemoPhreak joined #perl6
07:37 mkfort joined #perl6
07:42 mycelium Matt-W: now i am jast a junior perl6 user, and it's consistent with my need
07:42 pmurias joined #perl6
07:43 pugs_svn r27031 | pmurias++ | [re-smop] compacted t/multi.t
07:44 Matt-W mycelium: If you spend much time here, I think that would change
07:50 Muixirt joined #perl6
07:53 mycelium Matt-W: may be, later. now i already understand then debian packages for latest parrot and perl6 releases not exist
07:53 Matt-W If they do, I never heard about them - not that I've paid a great deal of attention.
07:53 Tene debian packages do exist for parrot, but they're not standard of part of apt
07:54 Tene or something
07:54 Tene we don't have a sponsor, iirc
07:54 Tene I've missed a lot of those political issues.
07:55 mycelium in official debian repo exist parrot 1.0.0-1
07:56 mycelium but actual monthly release is 1.2
07:56 Matt-W and I think rakudo needs at least 1.2 at the moment
07:56 Matt-W it tends to take advantage of the latest parrot developments, although the hope is that we'll be able to target parrot releases at some point
08:04 pmurias ruoso: hi
08:08 moritz_ oh hai
08:08 lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
08:08 phenny moritz_: 30 May 04:20Z <wayland76> tell moritz_ Can eternaleye have a commit bit for the Specs so he can work on S22 please?
08:08 moritz_ I hope eternaleye has his commit bit already?
08:09 moritz_ @massages
08:09 lambdabot mncharity said 2m 2d 8h 18m 54s ago: re p6 project advertising, it might be worth doing a "state of p6", high-visibility general posting to the p5 community at some point. a tiny sample of comments
08:09 lambdabot on #moose suggests even active p5 developers don't quite realize how shoestring the effort is.
08:09 lambdabot wayland76 said 9d 3h 52m 44s ago: Can eternaleye have a commit bit for the Specs so he can work on S22 please?
08:19 pugs_svn r27032 | pmurias++ | [re-smop]
08:19 pugs_svn r27032 | pmurias++ | added PRIMITIVES::SMOP_RI and PRIMITIVES::ritest
08:19 pugs_svn r27032 | pmurias++ | experimenting with adding types to signatures
08:24 Sark23 hi, use here anyone a mysql database?
08:25 pmurias propably a few people, including me
08:28 Matt-W I haven't for years
08:33 pmurias ruoso: could you take a look at t/multi.t and check if the type support is going in the rightish direction?
08:58 DanielC joined #perl6
08:58 Matt-W hi DanielC
08:58 DanielC o/
09:00 payload joined #perl6
09:00 masak joined #perl6
09:03 Matt-W hi masak
09:05 masak Matt-W: good late morning, sir.
09:05 phenny masak: 07 Jun 18:56Z <s1n> tell masak the june invite was the last one on p6l (hence the "don't want to pester p6l" note). i set up a ml for just this monger group and will take your advice and use p6u for july.
09:05 masak s1n: cool.
09:05 masak Matt-W: did you disappear on Friday? I made a few commits to Form, and then fell asleep. :)
09:06 Matt-W masak: I kind of drifted away
09:06 Matt-W I saw your commits though
09:06 Matt-W some nice improvements to the tests, thank you
09:07 masak you're welcome.
09:07 Matt-W never thought of using given on a type object like htat
09:07 masak I'm always on the lookout for reducing boilerplate. :)
09:07 Matt-W :)
09:07 Matt-W I did a bit of number formatting stuff
09:07 masak nice.
09:07 masak I'll have a look at it when time permits.
09:07 Matt-W got very frustrated with floating point arithmetic
09:08 Matt-W got even more frustrated when we didn't have Rat yet
09:08 Matt-W and started playing sims 3
09:10 masak Matt-W: you shouldn't stringify the floats directly, you should use .fmt and sprintf...
09:10 Matt-W argh
09:10 masak no, that's what they're for.
09:11 Matt-W argh!
09:11 masak {>>>.<<} corresponds to %3.2f or something...
09:11 Matt-W but then
09:11 Matt-W you have to line up the decimals
09:11 Matt-W and do weird and wonderful groupings
09:11 masak I don't understand.
09:12 Matt-W things that go a bit beyond printf formatting
09:12 masak oh, I'm sure you do.
09:12 masak but don't anticipate problems. do TDD instead! :P
09:12 Matt-W sorry
09:12 Matt-W but that doesn't excuse me from thinking ahead with the design
09:13 Matt-W trying to see how it can do everything it needs to do
09:13 Matt-W rather than just the next test
09:13 masak oh, sure.
09:19 * Matt-W is trying to digest an enormous specification document for work
09:19 mberends joined #perl6
09:19 Matt-W it's not as fun as the perl 6 spec :(
09:22 jnthn o/
09:22 donaldh joined #perl6
09:23 Matt-W hi jnthn
09:23 Matt-W the problem with this is that it mentions 'statistics' and my eyes glaze over
09:24 Matt-W even though tthere's nothing related to statistics as the branch of mathematics
09:24 Matt-W it's just streams of information, the kind of thing you might want to subject to analysis
09:25 mycelium left #perl6
09:32 DanielC Matt-W: What do you do for a living?
09:32 DanielC Who do you work for?
09:49 mberends DanielC: regarding :ver and :auth for the use and require commands, I've rtfm'd a lot and conclude that 1) the implementation should have no external database dependencies 2) should be written in PIR or C 3) will be hard to implement using "any" file system, therefore 4) would be better to implement with a custom database after all
09:49 DanielC mberends: Hi.
09:49 DanielC (1) No dependencies => makes sense.
09:50 DanielC (2) Why PIR? (not that I care much)
09:50 masak mberends: ack on all points.
09:50 DanielC (3/4) But we still store the actual file in the filesystem, right? The database is just to find them faster, right?
09:51 mberends DanielC: 2) to interface to the existing actions.pm implementation
09:51 DanielC ok
09:53 mberends DanielC: 3/4) for optimal runtime performance, preferably just one filehandle to be opened during the execution of the entire program, therefore preferably store all modules somehow within the one file. Implies seek() to an offset given by an index.
09:54 DanielC You are the expert, I trust your judgment.
09:55 DanielC This does mean, though, that different implementations of Perl 6 cannot easily share modules, and neither can third-party tools.
09:55 mberends my experience is with C etc, not PIR (yet)
09:55 snarkyboojum joined #perl6
09:56 DanielC If the work is in C one can use an off-the-shelf database like BerkeleyDB or SQLite.
09:56 DanielC But I haven't written C in many years.
09:56 mberends DanielC: if designed correctly, module sharing should work
09:56 DanielC I guess that using a standard DB would go a long way toward making module sharing practical.
09:57 mberends the functionality of each other database is not quite what is needed in this case
09:58 DanielC I know that the people behind BerkeleyDB and SQLite and other DBMs have put many years of work into their products. I have no confidence that the Perl 6 guys can recreate all that as a side project.
09:58 mberends the sharing of code would be at the Parrot level
09:58 mberends DanielC: we don't want the startup cost of transaction journals etc etc
09:59 mberends what fits the requirments more closely is a kind of archive store, such as (but not exactly) a .jar file
10:00 DanielC mberends> "the sharing of code would be at the Parrot level"  <-- can you explain this in a few more words? I didn't quite follow.
10:00 hanekomu joined #perl6
10:00 mberends Rakudo eventually spits out PBC code. Running Perl 6 programs is actually running PBC on the Parrot VM
10:01 mberends therefore other languages that compile to PBC can join the party
10:01 mberends the module library required is a PBC library
10:01 jnthn DanielC: (recreate all that) I think mberends point is that we don't need "all that".
10:02 DanielC mberends: So, for example, you envision SMOP compiling C to PBC to access the modules?
10:02 mberends the 'use' command just passes name, :ver, :auth and wants PBC back
10:02 DanielC jnthn: Ok. Well, that much sounds right. Module management probably doesn't require most of the DBM features.
10:03 mberends DanielC: I don't know about SMOP, but Parrot based languages interoperate
10:04 DanielC I was thinking about alternate Perl 6 implementations (SMOP, Pugs).
10:04 DanielC I don't know if sharing modules with those is a goal.
10:04 mberends they would have to interoperate outside of the Parrot VM
10:05 jnthn Sharing modules for the most part yes. But sharing implementation of a module management/location system I guess less so.
10:05 Matt-W Having multiple implementations of the language I think will fracture the module provision to some extent
10:05 mberends sharing modules as source code is fine
10:05 masak uurgh. ETOOMUCHMONDAY. will backlog this interesting discussion later. :)
10:07 DanielC mberends: So... you don't intend to share /installed/ modules between Perl 6 implementations. Right? I just want to be clear on what the goals are.
10:08 Matt-W I don't see how we could share all installed modules, because the interfaces to non-Perl 6 code are going to be slightly different... they could conceivably share pure Perl 6 modules of course.
10:09 mberends each Perl 6 implementation has to implement its own module storage system. A module library could store either source or executable code. For performance reasons, storing executable code is preferable, but executable formats are not portable. PBC is not x86 language, for example.
10:09 DanielC Matt-W: Yeah, I was thinking pure Perl 6 modules, and maybe also modules with C bindings. Obviously you can't share a module that uses Parrot.
10:10 DanielC mberends: Ok.
10:10 Matt-W Modules that use C bindings using Perl 6 constructs to do the binding would be source code compatible, I'd hope
10:10 Matt-W But I don't envisage them being binary compatible
10:10 DanielC Source compatible ++
10:11 mberends *nod*
10:11 Matt-W obviously less compatible is a C binding that's written in PIR
10:11 Matt-W SMOP's not going to be importing the opengl bindings from Parrot...
10:12 DanielC Does anyone know anything about DB design? I don't. What's wrong with Berkeley DB anyways?
10:13 DanielC IIRC you embed Berkeley DB => no external dependencies.
10:13 mberends installing a module consists of downloading it (from 6PAN ;) into a temp area, compiling, testing, then adding the executable code into this planned library.
10:13 Matt-W Berkeley DB has some nice characteristics
10:13 Matt-W like not requiring a server running
10:13 Matt-W but you get that with SQLite as well
10:13 DanielC y
10:14 DanielC Matt-W: SQLite and BerkeleyDB have a very similar feature set. BerkeleyDB doesn't support SQL and in exchange it is supposed to be faster. mberends likes BerkeleyDB better (or did, last time we talked).
10:16 mberends I would like a new, original purpose built librarian even more :)
10:16 Matt-W why?
10:16 mberends SQL would be at least a 2:1 performance hit, probably much worse
10:17 DanielC BerkeleyDB
10:17 antiphase Which of the 10 versions?
10:17 DanielC antiphase: Your favourite.
10:18 mberends BerkeleyDB etc would beat SQL, but is still block based and journaled for fairly frequent transactional updates.
10:18 antiphase XML, 4.1, built under Plan9
10:19 masak mberends: I didn't get to any SVG hacking last night, but I did sift through all Druid classes and methods, and added Pod documentation to them. :)
10:19 mberends besides, BerkeleyDB licensing may paint Perl licensing into a legal corner
10:19 mberends masak: the code review awaits :)
10:20 DanielC Does anyone here know how to design a DBM?
10:20 Matt-W And do they want to?
10:20 masak mberends: Druid is certainly better prepared for it now. I'd also like to experminet with using some Pod tool to output a CPAN-like manual for Druid.
10:20 mberends DanielC: a DBM may be a bit overkill for this job. But yes, I could design one :)
10:21 DanielC ok
10:21 mberends DanielC: what fits the requirements is something like ar, or zip
10:21 mberends but complression may be counterproductive
10:22 mberends *comp
10:22 DanielC You want to put *every* module in one big huge zip file?
10:22 DanielC Btw, a good property of zip is that you can extract an individual file, unlike tar.
10:22 mberends the "installed" ones. there will be local dirs and files for local work.
10:22 dakkar uh… isn't that called "jar"?
10:23 DanielC dakkar: ?
10:23 mberends dakkar: that's close, but would not support :ver and :auth
10:23 dakkar DanielC: the Java way of keeping installed libraries in the filesystem, by stuffing them into a zip file
10:23 dakkar mberends: true
10:23 jnthn mberends: I worry a bit about putting every module into one file.
10:24 jnthn mberends: Parrot does mmap PBC files.
10:24 DanielC dakkar: I know what jar is, but what mberends described didn't sound quite like jar.
10:24 jnthn That wins us sharing between processes - they don't all need to have their own copy of the bytecode in memory.
10:25 mberends jnthn: if the file layout is robust, adding more files just slows Parrot down
10:25 jnthn I'd prefer a "DB that tells us exactly where to look on disk and then we load_bytecdoe it and we're done"
10:25 mberends :(
10:26 * DanielC decides to leave this question to jnthn an mberends
10:26 Matt-W jnthn: that would be nice
10:26 jnthn Ah, you're thinking more of being able to mash together a load of PBCs into one file?
10:26 mberends jnthn: yes
10:26 jnthn That's going to get you some Parrot guts hacking to do if it's going to work, I suspect.
10:26 jnthn Though nothing too major.
10:26 payload joined #perl6
10:27 jnthn I'm not sure the performance win would be hugely worth it though if we can have many files but mmap them?
10:27 mberends and the insert operation would look like ./perl6 --target=lib MyModule.pm
10:27 mberends (many files)--
10:28 DanielC Can someone explain the part about smashing together PBCs?
10:28 mberends 'smash' is a new technical term for 'store together'
10:29 DanielC But you mean in the zip file sense, or in the "cat them together" sense?
10:29 jnthn Please don't compress. Java made that mistake.
10:29 masak mistake?
10:29 mberends zip, without compression , with more metadata
10:29 jnthn Yes.
10:29 DanielC ok
10:30 mberends ar is closer
10:30 jnthn Great for network delivery sure but means you gotta decompress at startup and can't mmap it, which loses you your ability to demand page and share memory.
10:30 DanielC So we can, for example, use the directory layout we talked about, but put it inside an un-compressed zip.
10:31 DanielC mberends: I don't know the pros and cons of ar vs zip.
10:31 Matt-W I think it's fairly crucial that any aggregated library file be uncompressed
10:31 antiphase Networks are fast these days
10:31 mberends jnthn: does mmap have to align to certain address boundaries?
10:31 Matt-W antiphase: can always compress them for distribution and expand on install
10:32 mberends DanielC: ar is uncompressed, multi file, no arbitrary size limits
10:32 Matt-W mberends: it's the same thing used for static .a libraries on unix, isn't it?
10:32 DanielC mberends: Does zip have a size limit? I thought it didn't.
10:32 mberends DanielC: it does, because of binary size and address fields
10:33 DanielC ok
10:33 jnthn mberends: Not that I know of and probably not beyond the point that PBCs already work to align stuff properly.
10:33 mberends DanielC: the sizes are plenty big for now, but "nobody needs more than 640K"
10:33 DanielC If we use a human-readable directory layout inside the ar (e.g. Foo-Bar-v1.2.0--0) that will still be fairly accessible with standard unix tools.
10:34 DanielC mberends: ok
10:34 mberends DanielC: (human-readable) that may be possible with careful design
10:34 DanielC I would really like it if the result was human-readable / hackable.
10:35 DanielC I hate mysterious binary formats.
10:36 mberends the pdf file format is an example of curious binary and text content mixing
10:36 DanielC We already had some ideas for human-readable storage in the filesystem (Foo/Bar-v1.2.0--0). We can do something similar inside the archive.
10:36 mberends DanielC: indeed
10:37 mberends maybe binary at the front, then offsets to binary PBC content at the back
10:37 mberends *text at the front, sorry
10:38 * DanielC reads the man page for "ar"
10:39 mberends .deb packages are based on ar, not tar
10:40 DanielC .deb packages are two .tgz files inside an "ar".
10:40 DanielC control.tgz and I forget the other one.
10:40 mberends so, ar and tar
10:40 DanielC y
10:41 Molaf joined #perl6
10:41 mberends too compicated to write in PIR
10:41 mberends *complicated
10:41 DanielC It seems unnecessary too.
10:41 DanielC I imagine that they picked .tgz to reduce bandwidth. But that's not a problem we need to worry about.
10:42 mberends agreed
10:45 mberends the challenge in writing a table of contents at the front of a file is predicting the offsets to the contents, that's why many formats (but not all) append the table to the end
10:46 DanielC I just scanned through the "ar" man page. It looks good. It seems to be designed for the things we want.
10:46 DanielC "ar archives are most often used as libraries holding commonly needed subroutines"
10:47 mberends how would :ver and :auth be represented? name mangling?
10:47 DanielC Insert a file called META.yml
10:48 DanielC You only need to extract META.yml if the user actually specifies an :auth, which should be uncommon.
10:50 DanielC META.yml --> a single file at the root of the archive with a list of packages, with :ver, :auth and directory.
10:50 mberends DanielC: you gonna write it in PIR?
10:51 DanielC I don't know PIR. Did I suggest something hard to do?
10:51 DanielC My suggestions will often be dumb the first time they come out :)
10:52 mberends I'm planning to learn PIR. It's somewhere between Perl and assembler. I t would be hard for me :)
10:53 DanielC Ok. I sort of assumed that everyone here would be a PIR expert :-)
10:53 DanielC Btw, why does it have to be PIR? Why not Perl 6?
10:54 mberends Perl 6 is effectively written in PIR, apart from the setting library, but this would be Perl 6 core.
10:54 DanielC A program to read META.yml would be really easy to write in Perl 6...
10:55 mberends :) there's a recursive dependency that needs to bottom out
10:56 mberends you could write it in Perl 6, compile to PIR, and then finish the job in PIR
10:56 mberends s/it/META.yml handler/
10:56 DanielC The meta format could be something fairly simple. For example, say every package gets 4 lines: package name, version, author and directory location.
10:57 DanielC It would be relatively easy to search through that (as easy as anything that involves searching and PIR might be).
10:57 mberends then just put those at the front of a custom file and skip the overhead of ar compatibility
10:58 DanielC I would have like ar compatibility, to make the archive hackable.
10:59 mberends I would not like the extra effort required
10:59 DanielC ok
11:01 mberends if the module librarian is fairly self contained, it could be replaced later on with a better version that *does* support ar files
11:01 DanielC ok
11:02 DanielC Is there an "ar" library one can use?
11:02 mberends ar support would be useful long term, to lay the basis for .deb package access as well
11:03 * mberends searches his debian package list for 'ar'
11:04 * mberends gets ETOOMANYPACKAGES
11:06 mberends it might be libarchive1, but 'ar' is not named in the description while 'tar' is
11:07 DanielC afk
11:09 rjh_ joined #perl6
11:09 mberends libarchive1 is not installed, ar is, so that library is not the one
11:09 jferrero joined #perl6
11:13 payload joined #perl6
11:13 clintongormley joined #perl6
11:15 Su-Shee joined #perl6
11:15 Su-Shee hi.
11:19 mberends the debian binutils package contains ar and depends only on libc6, so a separate ar library does not exist
11:19 mberends Su-Shee: hi
11:20 mberends rakudo: say ~Time.gmtime
11:20 p6eval rakudo 5f70a6: OUTPUT«2009-06-08T11:20:52+0000␤»
11:21 donaldh joined #perl6
11:22 Su-Shee mberends: a time module?
11:23 mberends just added a few days ago
11:23 Su-Shee within rakudo or something separate in git?
11:24 mberends within rakudo, according to S32-Temporal.pod
11:24 masak mberends++
11:24 masak that rocks.
11:24 Su-Shee ui, have to update.
11:24 mberends rakudo: say Time.gmtime.date.day-name
11:24 p6eval rakudo 5f70a6: OUTPUT«Monday␤»
11:24 masak see if we can use it in November somehow.
11:24 mberends rakudo: say Time.gmtime.date.month-name
11:24 p6eval rakudo 5f70a6: OUTPUT«June␤»
11:25 mberends masak: no, you'll have to wait 5 more months ;)
11:25 masak phthp. :)
11:25 Su-Shee and then its output will always be christmas? ;)
11:26 mberends always
11:26 Su-Shee well, with perl6 it's always christmas.. ;)
11:26 mberends rakudo: say ~Time.gmtime.time
11:26 p6eval rakudo 5f70a6: OUTPUT«11:26:24␤»
11:27 om454545445 joined #perl6
11:28 Su-Shee masak: I've just read your posting about this ruby discussion and the perl community. i don't think, this problem will ever occur.
11:28 masak Su-Shee: oh, good.
11:28 mberends we're too nice
11:28 masak yes, we're just such nice chaps, all of us.
11:29 Su-Shee I've always found perl communities very laid-back, relaxed and somewhat hippie-esk and very women-friendly.
11:29 masak aye.
11:30 mberends many (even huge) communities work well relying on the basic decency of the majority (ebay, wikipedia). You just need to respond firmly to obvious misbehaviour.
11:31 masak I hear mostly disappointment with the Wikipedia community lately. but it's not manners as much as extreme (content) conservatism that seems to be the issue.
11:31 Su-Shee I've never even encountered any in terms of something even remotely related to gender issues.
11:32 DanielC mberends: Maybe we don't need to mangle the :auth at all, since the file will be inside an "ar" anyways.
11:32 DanielC mberends: Just put the module in "Foo-Bar-v1.2.0-Jose Pequeño" or whatever.
11:33 mberends DanielC: you're assuming "somebody" will write a ar file handler
11:33 DanielC mberends: Well.. I thought we were talking about using ar.
11:33 masak Su-Shee: without going completely overboard, I'd say it's impossible not to have gender issues in programming communities. I know of no community that has a 50%-50% ratio, let alone one that has an larger share of women. I'd be happy to be shown a counterexample.
11:35 DanielC mberends: But if we use "ar" at all, maybe we don't need any special META.yml or whatever. All the filesystem issues probably go away.
11:35 mberends DanielC: ar is nicer than the alternatives, but harder to achieve in PIR than a purpose designed file format
11:35 Su-Shee masak: well I'm hanging around open source/linux/perl etc. communities for about 15 years now (as a woman) and perl is definetly one of the politest communities I've ever ancountered.
11:35 DanielC mberends: ok
11:35 Su-Shee masak: there's always some I'm the cooler perl hacker than you are, but that's nothing to worry about.
11:35 masak Su-Shee: I believe you. and I'm glad you like the community.
11:35 Jaaap joined #perl6
11:37 mberends DanielC: it would be nice to have the module names readable at the front of the file, but the back of the file must store compiled code
11:38 Jaaap In a Grammar, how can i make something like
11:38 Jaaap token comparison { <variable> [ <operator> <variable> ]* {*} };
11:38 om454545445 left #perl6
11:38 masak Su-Shee: do you have any idea why there's such a large gender gap in programming communities? I have a few, but I'd like to know what you think.
11:38 Jaaap match the optional part too?
11:38 masak Jaaap: looks like you want <variable> ** <operator>
11:38 Jaaap If i parse 3 + 4 it only parses the variable 3, then moves on.
11:39 Jaaap masak: what does the ** do?
11:39 masak Jaaap: repetition. S05 explains it quite well.
11:39 Jaaap cool thx
11:40 masak mberends: we need to write that web-based grammar debugger RSN! and call it 'context' :)
11:40 masak mberends: maybe we should decide a time for a hackathon for that.
11:40 Su-Shee masak: Well, there's the scientific literature about the gender gap in humanities versus math but I think it's mostly because women just don't consider programming as an intense hobby in their spare time (if they have some).
11:40 mberends yeah, better than 'mausoleum'
11:40 masak mberends: :P
11:41 masak Su-Shee: agreed. and it seems difficult to know whether the cause for that is mainly social or biological.
11:41 Su-Shee masak: the ones I know being able to program don't do it after work. because they've already done it an entire work day and now it's time for something social.
11:42 masak sounds healthy. :)
11:42 Su-Shee I think pure socialization. maybe some biological comes into play when it comes to "style of programming" or "what kind of apps".
11:43 mberends there are gender differences even in the toys children prefer, even when environmental factors are excluded
11:43 Su-Shee yeah, healthy maybe - but they do see that they're never going to be part of "the open source community" if they don't do stuff.
11:43 Jaaap masak: even reading S05 i don't get it. I want to match 3 or 3 + 6 or 3 + 4 * 4 etc. But for repetition i'd need a "base" of 3 + right?
11:43 masak mberends: I rejected cars and dinosaurs when I was little. I liked dolls, though.
11:44 masak Jaaap: no, I don't think so. I'll have a shot at explaining.
11:44 mberends I liked bits of wood and nails
11:44 viklund masak: there's always exceptions ;)
11:45 mberends I still like bits of wood and nails
11:45 masak Jaaap: \d+ ** '.' means "as many numbers as possible, separated by single dots"
11:45 Jaaap ph
11:45 Jaaap i mean oh.
11:45 Jaaap like that
11:45 viklund this is fun:
11:45 Su-Shee it seems like the arduino platform is massively attracting women and girls.
11:45 viklund rakudo: my $s=****; say $s(2)
11:45 p6eval rakudo 5f70a6: OUTPUT«4␤»
11:45 viklund rakudo: my $s=***; say $s(2)
11:45 p6eval rakudo 5f70a6: OUTPUT«Statement not terminated properly at line 2, near "**; say $s"␤in Main (src/gen_setting.pm:0)␤»
11:46 Jaaap masak: i'm gonna try it. thx.
11:46 viklund rakudo: my $s=** *; say $s(2)
11:46 p6eval rakudo 5f70a6: OUTPUT«4␤»
11:46 viklund rakudo: my $s=******; say $s(2)
11:46 p6eval rakudo 5f70a6: OUTPUT«Statement not terminated properly at line 2, near "**; say $s"␤in Main (src/gen_setting.pm:0)␤»
11:46 viklund rakudo: my $s=* ** ** *; say $s(2)
11:46 p6eval rakudo 5f70a6: OUTPUT«8␤»
11:46 viklund rakudo: my $s=*******; say $s(2)
11:46 p6eval rakudo 5f70a6: OUTPUT«16␤»
11:46 viklund I wonder how that parses
11:47 om454545445 joined #perl6
11:47 masak viklund: you're evil, you know that? :)
11:47 viklund sometimes rakudo sees times and sometimes raised to
11:47 clintongormley there was an article on new scientist about how monkeys preference for 'toys' varied with gender: http://www.newscientist.com/article/dn1​3596-male-monkeys-prefer-boys-toys.html
11:48 viklund after a while it seems to only be multiplication
11:48 masak viklund: ((* * *) * *) * *
11:48 masak proabbly.
11:49 Su-Shee well, even though there might be gender differences: as grown up women there's always a choice to NOT follow your socialization and actually _do_ tech stuff. :)
11:50 Jaaap masak: it still only matches the first part. I must be doing something else wrong.
11:50 masak Jaaap: could you nopaste your script?
11:50 Jaaap nopaste?
11:51 masak here, for example: http://gist.github.com/
11:51 masak Jaaap: 'nopaste' is an IRC term for 'instead of pasting it directly to the channel, paste it to a site and give the URL'
11:52 viklund masak: *** -> parse fail, * * * -> parses, **** -> (* ** *) but ****** -> parsefail and ******* -> * * * * * * *
11:52 Jaaap masak: http://gist.github.com/125772
11:52 viklund My guess would be that ****** -> * ** ** *, but no
11:52 masak viklund: that's... just sick. :)
11:53 masak Jaaap: have you tried to match on a string that contains no whitespace?
11:53 viklund 8 and 9 * don't work, 10 gets translated to * ** * ** * ** *
11:53 Jaaap masak: lemme try
11:53 masak Jaaap: (I see you have a lot of 'token' and almost no 'rule')
11:54 Jaaap that is because i don't want the "free" whitespace of rule
11:54 masak viklund: please, please blog about this. it's hilarious. :)
11:54 skids_ joined #perl6
11:54 viklund masak: I might
11:54 viklund now it's lunchtime here
11:54 masak Jaaap: well, without rule you'd have to specify whitespace explicitly.
11:57 Jaaap masak: the string thingy doesn seem to work atm
11:57 masak Jaaap: ok, that was a bit vague. :)
11:57 Jaaap what was?
11:57 mizioumt joined #perl6
11:58 masak Jaaap: 'the string thingy'. I don't know what you refer to.
11:59 Jaaap that was in reference to "have you tried to match on a string that contains no whitespace?"
11:59 lichtkind joined #perl6
11:59 masak ok.
11:59 lichtkind mberends: ah you were active :) i seen that tablet are over 3 years old :)
12:00 masak Jaaap: and removing the whitespace didn't help, that's what you're saying?
12:00 om454545445 left #perl6
12:01 Jaaap oh wait maybe i misunderstood you. Do you mean remove whitespace in entire input string or in a <string> in the grammar?
12:01 masak input string.
12:01 masak Jaaap: that seems to be what your grammar matches at present.
12:01 masak Jaaap: since you don't use 'rule' and don't explicitly specify whitespace matching.
12:02 Jaaap that's it! Man i am an idiot. Thx a lot.
12:02 Jaaap me = st00pid
12:02 masak Jaaap: please don't call people idiots. :) you're welcome.
12:02 Jaaap not even myself? ;-)
12:02 masak Jaaap: especially not yourself. :)
12:02 Jaaap lol
12:10 rjh_ masak: why?
12:10 masak rjh_: why not call onself an idiot?
12:11 rjh_ pretty much
12:11 Jaaap left #perl6
12:11 masak rjh_: because (without getting all new-agey) I believe self-image is affected by such things.
12:12 lichtkind mberends: B is now complete english and longer
12:12 masak rjh_: I wince when I hear people debase themselves, because I know they might actually be harmed by it, long-term.
12:13 rjh_ When I call myself an idiot it's usually because I have done something idiotic. Recognising it so I can improve is beneficial
12:13 rjh_ I can't shield myself from all criticism
12:13 DanielC mberends: http://code.google.com/p/libarchive/  <-- A BSD library that supports various archive formats including ar.
12:14 masak rjh_: recognising that one has done something idiotic, and using that recognition to improve is, of course, beneficial.
12:15 masak rjh_: calling oneself an idiot... well, it's something I tend to avoid, at least.
12:15 rjh_ You think if you say it enough, you'll believe it?
12:15 masak absolutely.
12:15 rjh_ I can see that
12:15 masak I'm very convincing. :)
12:15 masak so are most people, when talking to themselves, I think.
12:18 rjh_ self-talk is known to be very powerful, yes
12:18 rjh_ I've noticed this channel is very positive
12:18 windsok^ joined #perl6
12:18 masak aye.
12:19 rjh_ No personal attacks, constructive criticism, people debate rather than argue
12:19 rjh_ Something of a rarity for IRC
12:19 masak indeed.
12:19 masak I've been here since 2005. it's been like that all that time.
12:19 masak #perl6 is an oasis among IRC channels.
12:19 rjh_ Takes a certain kind of person to follow progress on #perl6, half the world think the language isn't even in development
12:20 rjh_ Fools!
12:20 masak :)
12:20 rjh_ Oh sorry, shouldn't call people fools :)
12:20 masak they simply don't know any better.
12:20 masak it's our duty to educate them!
12:21 kidd_ joined #perl6
12:21 donaldh joined #perl6
12:21 rjh_ Do you think people should be spreading the word now? Or are we waiting for "Rakudo 1.0" for the marketing
12:21 masak rjh_: I think spreading the word, but using restraint, would be the best.
12:22 masak rjh_: not saying "Perl 6 is ready!" but saying "Perl 6 is very usable today! Try it out!"
12:22 masak what we need are application developers who love Perl 6, and are willing to be early adopters, submit bugs and suggestions, and hang here on the channel.
12:23 rjh_ Key factors are speed, bugs and incomplete implementation
12:23 masak aye.
12:23 rjh_ If I didn't warn people about the speed, they might be disappointed
12:23 masak indeed.
12:23 DanielC @tell mberends http://code.google.com/p/libarchive/ <-- supports "ar".
12:23 lambdabot Consider it noted.
12:24 rjh_ Do you happen to know the current status of DBI for perl 6?
12:24 rjh_ Last I heard, it was aimed at Parrot and emulated the JDBC
12:24 azawawi joined #perl6
12:25 azawawi hello
12:25 masak rjh_: haven't heard much lately, no.
12:25 alester joined #perl6
12:25 masak rjh_: this is the last I heard: http://perlbuzz.com/2008/12/database-acce​ss-in-perl-6-is-coming-along-nicely.html
12:26 Su-Shee it's in the parrot-tree.
12:26 Su-Shee somewhat hidden. ;)
12:26 rjh_ ah, thank you
12:26 azawawi hmmm
12:27 Su-Shee in ext/
12:30 rjh_ I see, parrot can interact with object libraries
12:30 rjh_ It might be fun to base off this work and support MySQL and Postgres
12:31 masak rjh_: yes, please :)
12:31 Su-Shee the parrot-rakudo-module-library-entanglement is still some mystery to me.
12:32 rjh_ hmm, my understanding of JDBC is slim, but it sounds like you'd want to use the existing JDBC drivers
12:32 azawawi masak: fake executables are still off in rakudo... :(
12:33 masak azawawi: 'off'?
12:33 donaldh joined #perl6
12:35 azawawi masak: it is not working until now...
12:35 masak azawawi: have we been discussing this before? you use the word 'still'...
12:35 decasm joined #perl6
12:35 masak azawawi: I'm confused, as you maybe can tell.
12:36 Su-Shee as we're at DBI and MySQL support.. is there a list somewhere of the most important modules to be written preferably first? (I was thinking exactly about Time recently..)
12:36 skids_ see setting/Temporal I think.
12:36 skids_ (mberends is on it)
12:37 azawawi masak: no we havent. how r u btw? :)
12:37 masak azawawi: I'm confused, thanks for asking. :)
12:38 azawawi masak: any updates on november?
12:38 masak azawawi: actually, yes. viklund++ did a lot of bugfixing over the weekend.
12:38 masak azawawi: we now have lichtkind as a tester/user of the web site.
12:39 azawawi masak: cool
12:39 azawawi masak: so how can i help out?
12:40 azawawi masak: im good with confusion if you want that skill :)
12:40 masak azawawi: you could try and install November locally. I'm sure something will result from people attempting that. :)
12:40 payload1 joined #perl6
12:40 masak azawawi: try to crash the program. you _will_ succeed, if you put your mind to it.
12:41 masak azawawi: report the crash as a bug.
12:41 Su-Shee wish me luck, I'm applying for a perl job now. ;)
12:42 masak Su-Shee: good luck!
12:44 rjh_ yes, good luck
12:44 rjh_ and make sure the company is following PBP
12:44 rjh_ ;)
12:46 masak or at least some WTOP.
12:46 Su-Shee well at least it's not the usal web stuff. :)
12:47 donaldh joined #perl6
12:48 barney joined #perl6
12:49 * rjh_ looked wtop up on github and is confused ;/
12:49 rjh_ hmm, looks like Microsoft's DLR is stepping on Parrot's toes a bit.
12:50 masak rjh_: sorry about that confusion. :) been meaning to flesh out that project for quite some time now.
12:52 rjh_ doing a perlcritic for rakudo will be awesome because we can (presumably) use the real perl 6 parser instead of PPI
12:53 masak rjh_: yes.
12:53 masak rjh_: pmichaud++ has been helping in making that more possible in the past week.
12:56 FurnaceBoy joined #perl6
13:00 azawawi left #perl6
13:05 masak if someone would create a Rakudo wrapper for Parrot's curses library, that'd be swell.
13:05 Jedai joined #perl6
13:05 rjh masak: I'd like to write a roguelike in perl 6 someday, so I could take a look
13:06 masak rjh: funny, I was just reading this when I said that: http://www.gamasutra.com/view/feature/4​013/the_history_of_rogue_have__you_.php
13:06 masak :)
13:08 donaldh joined #perl6
13:09 Su-Shee (moritz' recent article series seem to hook some people onto perl6.. :)
13:09 rjh heh, ncurses committed to parrot 6 years ago
13:14 pmurias joined #perl6
13:25 masak about time someone wrote that Perl 6 wrapper, I'd say! :)
13:26 pmurias masak: you need wrappers to use parrot libraries?
13:26 masak pmurias: maybe you don't, I just assumed it'd be easier that way.
13:27 masak pmurias: I'd be perfectly happy being shown a way to use it directly from Perl 6 code.
13:27 masak (without inlining PIR, that is)
13:28 davidad joined #perl6
13:29 ruoso joined #perl6
13:30 jnthn masak: Now that Rakudo emits method calls just as normal Parrot method call syntax, there should be fewer problems than before working with objects from outside Perl 6 now.
13:30 pmurias ruoso: hi
13:30 masak jnthn: sounds promising.
13:30 ruoso pmurias, hi...
13:31 synth joined #perl6
13:31 pmurias ruoso: could you look at re-mildew/t/multi.t
13:31 * ruoso svn updat'ing
13:32 masak rakudo: sub foo { return }; say foo.WHAT; say ?(foo ~~ Nil)
13:33 p6eval rakudo 5f70a6: OUTPUT«Nil()␤0␤»
13:35 ruoso pmurias, I don't think "int" is a role
13:35 ruoso they are native types
13:35 ruoso and the compiler can know it
13:36 ruoso TimToady, can the compiler presume native type names?
13:36 ruoso I think it can... but... better be sure...
13:37 pmurias ruoso: i just intended int to be any kind of object with an ACCEPT method
13:38 ruoso I see... but "int" is really an exception, as so is every native type
13:39 ruoso pmurias, but anyway... that test looks great... I'm amazed in how far we're going in so few time
13:40 ruoso pmurias, but maybe it's easier to implement the native types as roles at this point...
13:40 ruoso (which seems to be what you're suggesting)
13:42 sri_kraih joined #perl6
13:42 mberends DanielC: thanx for the link. libarchive compiles and tests nicely. I'm still skeptical about the approach of an external dependency, or otherwise forking part of that codebase. We might have to try to each build a different implementation, and see what comes out ;)
13:42 lambdabot mberends: You have 1 new message. '/msg lambdabot @messages' to read it.
13:43 mberends lambdabot: yes, I backscrolled :)
13:43 DanielC mberends: ok
13:44 DanielC mberends: Of course, the libarchive idea assumes that we have C bindings. Does Rakudo have C bindings?
13:45 mberends DanielC: via the minor hurdle of Native Call Interface (NCI)
13:45 DanielC k
13:45 mberends sorry, afk for a bit over an hour
13:45 jnthn Also, it relies on libarchive being available/running everywhere that we want to run Rakudo.
13:45 pmurias ruoso: i don't depend on the type being a role anything with an ACCEPTS methods will do
13:47 masak Rakudo doesn't support '=begin SUMMARY' Pod syntax!?
13:48 pmurias ruoso: and having the as a separate parameter type would force as to have a native int is {ref,readonly,rw} params
13:48 masak rakudo: =begin SUMMARY␤This be a summary.␤=end SUMMARY␤say "OH HAI"
13:48 p6eval rakudo 5f70a6: OUTPUT«OH HAI␤»
13:48 masak hm.
13:48 masak rakudo: role A;␤=begin SUMMARY␤This be a summary.␤=end SUMMARY␤say "OH HAI"
13:48 p6eval rakudo 5f70a6: OUTPUT«Unable to parse role definition at line 2, near ";\n=begin S"␤in Main (src/gen_setting.pm:1452)␤»
13:48 masak ah. there we go.
13:48 * masak submits rakudobug
13:51 DanielC jnthn / mberends: Do you think that the final archive format needs to support Unix groups + permissions?
13:52 DanielC Of course, the format is easier to make if it doesn't have to preserve those things.
13:52 pmichaud good morning, #perl6
13:52 DanielC moin
13:52 jnthn DanielC: Unlikely given they're only relevant to some of the target platforms.
13:52 jnthn pmichaud: morning
13:52 DanielC jnthn: thanks
13:53 estrabd joined #perl6
13:58 masak my Rakudo returns 0 (success) when encountering syntax errors. could anyone confirm this?
13:58 jnthn yes, I noticed that one too. bug.
13:58 jnthn think already ticketed.
13:59 masak it's very bad. :(
13:59 masak it screws up make.
14:00 jnthn feel free to fix...just needs looking up how to set the exit code Parrot hands back before the exit call in perl6.pir
14:00 pmichaud sounds like today will need to be a HLLCompiler day for me
14:01 clkao /win 27
14:01 masak 27 windows? wow.
14:01 mberends DanielC: (back) no, the permissions will probably be controlled by the administrator who also installs Perl 6
14:02 DanielC k
14:03 mberends jnthn: thanks for the IO warning. It's not surprising that the NPW code was a hasty hack, true to the Hackathon spirit ;)
14:03 masak no, that would be a Nasty Hackathon. :)
14:03 masak oh, hasty. sorry. :P
14:04 mberends masak: we'll have to rework Socket.pm soon(ish) :) ;)
14:04 masak mberends: aye. and the whole relation between Web.pm and HTTP::Daemon.
14:04 masak mberends: maybe do those at the same time.
14:04 mberends tasty hack ?
14:05 masak .oO( cut-n-pasty hack )
14:05 mberends masak: the Daemon is refactored and working at http://gitorious.org/http-daemon
14:05 masak mberends: ooh!
14:05 masak mberends++
14:10 mberends also japhb++ for numerous tweaks and patches
14:10 alester joined #perl6
14:12 masak yes, I notice. cool.
14:13 rjh help!
14:14 rjh http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=61618 contains a patch for various Range functionality
14:14 rjh it's written in parrot, but I notice that most of the rakudo Range code is in perl 6 now...?
14:16 masak rjh: is that your question?
14:16 masak looks more like a statement...
14:17 rjh Has the Range code moved from parrot to the setting
14:17 rjh Rendering that patch obsolete
14:17 masak that seems likely.
14:17 rjh question mark
14:17 masak full stop.
14:17 rjh That's a shame
14:18 masak shame happens.
14:18 PacoLinux joined #perl6
14:18 pmichaud what part is a shame?
14:18 rjh So if I understand this correctly, previously people couldn't add to the setting, so all the objects were being written in parrot?
14:19 pmichaud previously there wasn't a setting.
14:19 rjh okay
14:19 pmichaud that's only existed since feb or mar
14:20 rjh So, is it preferable to move code from PIR to Perl 6 where possible?
14:21 pmichaud yes.
14:21 pmichaud the exceptions are
14:21 pmichaud (1) where we need to keep the PIR for speed reasons
14:21 pmichaud (2) where something has to be in the stage-1 compiler in order to compile the setting
14:22 pmichaud (end)
14:23 rjh I see, thanks
14:28 masak from S12: "The first form [the 'role A;' one] is allowed only as the first declaration in a compilation unit (that is, file or eval string)." does that mean I can have use statements before the declaration?
14:29 masak ISTR there was a spec change to allow exactly that.
14:30 pmichaud I know it came up for discussion; I didn't see the spec change.
14:30 pmichaud let me see if STD.pm changed, though
14:30 pmichaud (Rakudo followed STD.pm more than the spec, there.)
14:31 dalek rakudo: 5c065e0 | pmichaud++ | docs/spectest-progress.csv:
14:31 dalek rakudo: spectest-progress.csv update: 399 files, 11428 passing, 0 failing
14:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​c065e0db6e5d6718c93d1696e458e621b6c1820
14:33 pmichaud std:  use Foo;  module Bar;  say 'ok!';
14:33 p6eval std 27032: OUTPUT«ok 00:02 35m␤»
14:33 pmichaud std:  say 'ok';  module Bar;  say 'ok!';
14:33 p6eval std 27032: OUTPUT«ok 00:02 35m␤»
14:33 masak oh, STD.pm is very permissive.
14:33 [particle] joined #perl6
14:34 pmichaud std:  say 'ok';  module Bar;  say 'ok!';  module Foo;   say 'no!';
14:34 p6eval std 27032: OUTPUT«##### PARSE FAILED #####␤Unable to parse module definition at /tmp/eqz8LhK58M line 1:␤------> [32mk';  module Bar;  say 'ok!';  module Foo[31m;   say 'no!';[0m␤    expecting any of:␤    trait␤   whitespace␤FAILED 00:02 35m␤»
14:35 pmichaud it looks like STD.pm is allowing only one   "module Foo;"  per compilation unit, but anything can come before it.
14:35 masak ok.
14:35 masak maybe that's sane.
14:35 masak better than to whitelist things, to be sure.
14:35 pmichaud it definitely contradicts S11, though.
14:35 masak yes.
14:36 * masak files a specbug
14:37 TimToady I think the S11 statement is aimed more at making it possible to recognize P5 vs P6
14:37 TimToady whereas STD is assuming P6 from the start
14:38 masak the point with having the class or role declaration on the first line, IIRC, was to clearly distinguish a file as a Perl 6 file.
14:38 TimToady that's what I just said
14:39 masak oh. I should have looked at what S11 says before talking. :)
14:40 masak so, there's no conflict in the spec, or between STD.pm and the spec?
14:40 masak in that case, all that remains is a Rakudobug.
14:40 TimToady perl6 file can assume Perl 6 from the start.  perl file can't
14:41 TimToady but I don't know if we'll every persuade the P5 community to let the "perl" executable do that...
14:41 TimToady *ever
14:41 TimToady for now we can assume we know the file is p6
14:41 masak ok.
14:41 TimToady the other is just a wrapper anyway
14:44 pmichaud can we just remove that line from S11, then?
14:45 pmichaud "The first form is allowed only as the first statement in the file."
14:45 [particle]1 joined #perl6
14:46 TimToady I suppose, or at least weaken it to a possible restriction imposed by autorecognition someday
14:47 literal alester: ping
14:47 alester yes?
14:48 literal wondering about having you merge my vim-perl changes
14:48 alester Whoa re yOU?
14:48 cls_bsd joined #perl6
14:48 alester Who are you?
14:48 alester And what are you wondering?
14:48 literal Hinrik
14:48 literal I see you added indent/perl.vim, so there will probably be some merge conflicts...
14:48 alester ok
14:48 alester I haven't looked at any of that, but I suspect I'll incorporate most of what others have done.
14:49 alester others = not me.
14:50 literal I think it might be easier (after this merge) if you gave me a commit bit, then you won't have to worry about conflicts :)
14:50 payload joined #perl6
14:50 alester I don't think you can get a commit bit in the git model.
14:50 alester or maybe I misunderstand the model
14:51 alester but regardless I just need to look at what's what.  I haven't looked at the actual code.
14:51 literal you can make me a "collaborator" on your vim-perl on github
14:51 literal then I can push to it
14:52 alester Let me get initial merging working before I even think about any of that.
14:53 literal alright then
14:58 * ruoso later &
14:58 * rjh wonders what is needed to have :by(...) on Range objects
14:59 estebann_ joined #perl6
15:01 masak rjh: operator adverbs. that's task A in the ROADMAP.
15:01 masak says it'll happen this summer.
15:01 pmichaud (autorecognition)  -- I think that the spec already says that a file has to begin with "use v6;", "v6;", "module", "class", etc.  in order to be automatically recognized as p6.
15:02 pmichaud but I'll update the spec.  Rakudo to be updated shortly thereafter.
15:02 rjh masak: adverbs for methods are in, right?
15:02 rjh seem to be
15:02 pmurias pmichaud: if rakduo is called as rakudo it assumes the file is perl6
15:02 pmurias s/assumes/should assume
15:04 pmichaud pmurias: yes.
15:04 pmichaud Rakudo was simply following the literal interpretation of the spec.
15:05 pmichaud rjh: note that Ranges are likely to undergo a significant refactor soon.
15:05 pmichaud The postcircumfix:<[ ]> work I did over the weekend was the precursor to fixing Range.
15:05 rjh pmichaud: I thought there might be some overlap with lazy lists
15:05 pmichaud There is.
15:06 pmichaud Also, the Range spec changed during NPW; Rakudo needs to catch up with that.
15:07 nihiliad joined #perl6
15:09 masak wow, developing Perl 6 is really involved.
15:09 TimToady note also that the precedence of operator adverbs is changing to just tighter than item assignment
15:09 meppl joined #perl6
15:10 pmichaud is that a change from what exists today?
15:10 pmichaud iirc, the current implementation had adverbs on whatever was the top operator in the stack, or something like that.
15:11 lee__ joined #perl6
15:12 hv2 joined #perl6
15:13 hv2 Is there a bug tracker for the spectest suite?
15:13 masak hv2: no, but you're free to mention errors in it here, and people will fix.
15:14 hv2 I was searching for tests of the :t filetest (is a tty), and couldn't find any.
15:15 pmichaud spectest bugs can go into rt
15:15 hv2 As far as I can tell Rakudo doesn't support that filetest yet, but I wasn't sure if I had the syntax correct so I went searching for an example.
15:15 pmichaud better still is to fix the bug and commit :-)
15:16 pmichaud er, fix the spectest and commit :-)
15:16 pmichaud commitbits are readily available for spectests
15:16 masak hv2: t/spec/S16-filehandles/filetest.t seems to be it.
15:17 hv2 masak: no ref to ':t' in there.
15:17 masak correct.
15:17 hv2 pm: I'm in no rush to add tests for something I don't know how to use, just yet ...
15:17 masak guess nobody thought to write such a test yet.
15:18 masak did I mention the spectest is incomplete? :)
15:18 masak s/test/test suite/
15:18 justatheory joined #perl6
15:18 pmichaud hv2: good reasoning.  Anyway, sending a note to perl6-bugs@perl.org should get it into RT, where someone can take a look at it.
15:18 hv2 Heh, I didn't mean to suggest otherwise.
15:18 hv2 Ok, will do.
15:18 hv2 Can you confirm it isn't supported in Rakudo yet?
15:18 pmichaud Yes.
15:19 hv2 Thanks.
15:19 pmichaud rakudo:  say ?('perl6' ~~ :e)
15:19 p6eval rakudo 5c065e: OUTPUT«1␤»
15:19 pmichaud rakudo:  say ?('perl6' ~~ :t)
15:19 p6eval rakudo 5c065e: OUTPUT«Method ':t' not found for invocant of class 'Str'␤»
15:20 hv2 I'll file it.
15:20 pugs_svn r27033 | pmichaud++ | Remove line about "module Foo;" needing to be first in file.
15:21 donaldh joined #perl6
15:21 Tene pmichaud: what do you think about the idea of "use Foo:from<ruby>;" putting the namespace returned not in ['perl6';'Foo'], but in ['perl6';'ruby';'Foo'] instead?
15:22 pmichaud Tene: that doesn't fit my mental model, for some reason.
15:22 pmichaud In particular, I think that   "use Foo:from<parrot>"   ought to give me a plain ['perl6';'Foo']
15:23 Tene pmichaud: Just an idle thought while waking.  Nothing more.
15:23 Tene Okay.
15:27 hv2 So, am I likely to be able to emulate :t by forcing a method into IO with inline C that calls isatty()? Or will that also require support that isn't yet present?
15:28 pugs_svn r27034 | lwall++ | [S03] reduce prececedence of adverbs from inside comma to inside item_assignment
15:28 rjh @karma lwall
15:28 lambdabot lwall has a karma of 355
15:28 rjh @karma TimToady
15:28 lambdabot TimToady has a karma of 49
15:28 pmichaud would have to do it via PIR
15:28 pmichaud we don't have inline C
15:29 hv2 Hmm ok, I'll skip it for now then.
15:29 hv2 Back to see if I have better luck with line 10 of my translation. :)
15:29 pmichaud looks like isatty is already available for Parrot FileHandle objects, though.
15:29 pmichaud so...
15:30 masak hv2: check out src/builtins/any-str.pir and you'll see examples: :e, :f, :d...
15:30 hv2 cool, thanks
15:30 pmichaud yes, but I think hv2 is looking for it on an existing filehandle
15:30 TimToady pmichaud: yes and no, adverbs in STD adjust the top of the term stack, but only after reducing operators tighter than the adverb
15:31 pmichaud as opposed to a tring
15:31 pmichaud *string
15:31 masak oh.
15:31 hv2 $*IN, $*OUT, in fact
15:31 masak ok, then my reference is of little help.
15:31 pmichaud and is :t defined in the spec?
15:31 mberends hv2: it may help that parrot has a stat() function
15:32 hv2 I only see it in S30/IO.pod
15:32 pmichaud actually, it's just    $!PIO.isatty
15:32 pmichaud so it can actually be done in setting, I think, depending on what it's to be called
15:32 pmichaud for example, the following would work
15:32 pmichaud method isatty() { ?$!PIO.isatty; }
15:32 TimToady I just saw that $x = %foo{$bar}:delete was going to be a recurring FAQ as to why the :delete was being applied to the =
15:33 pmichaud then one could do    $*IN.isatty
15:35 pmichaud indeed, I'm guessing that :t really only makes sense on filehandles, so I wonder if it should be a :t or not
15:35 pmichaud i.e., perhaps better is simply a method on filehandles
15:36 masak ...and a method on Str which always returns False...?
15:37 pmichaud maybe.  In perl 5, I think -t only works on filehandles.
15:37 rjh yes, -t fails even for "-"
15:38 masak fair enough.
15:38 pugs_svn r27035 | lwall++ | [S03] slight clarifications to previous adverbial changes
15:45 pyrimidine joined #perl6
15:46 pmichaud TimToady: is STD.pm consistent with the recent spec changes on adverbs?
15:46 pmichaud or is that yet-to-come ?
15:46 TimToady I believe it's correct currently
15:46 pmichaud okay, great.  Thanks.
15:47 TimToady main internal change is that it produces a real match node for the adverb now rather than just tweaking the top term
15:47 TimToady was too hard to manage the AST otherwise
15:48 pmichaud yes, I'm thinking that's now possible.
15:48 pmichaud which is a plus.
15:48 TimToady spent far too much of the weekend just trying to get viv to translate %x{$y}:delete to delete $x{$y}
15:49 TimToady because of AST misattachments
15:49 pmichaud that was somewhat of the difficulty I was envisioning with the old way, yes.
15:49 pmichaud This way seems much more straightforward.
15:49 TimToady now I'm trying to figure out why the "then" part of my if looses its AST when I add an else :(
15:50 TimToady a bug in Cursor, I think
15:50 hv2 Confirm: multi method isatty() { ?$!PIO.isatty; } appears to do the right thing.
15:51 TimToady actually, losing its .caps, not the ast itself
15:51 pyrimidine_ joined #perl6
15:51 TimToady but ast is generated from caps by default
15:51 TimToady (in viv)
15:51 pmichaud hv2:  excellent!
15:51 TimToady since most of the "making" hangs off of an AUTOLOAD
15:53 TimToady (where rakudo currently has the make calls all hardwired)
15:53 TimToady (but I presume rakudo can also become more generic that way, someday)
15:54 pmichaud yes, I presume so also.
15:55 pmichaud autoload hasn't been well-thought-out in parrot, afaict
15:55 pmichaud I mean, some of the hooks are there, but someone has to implement it :-)
15:55 cj joined #perl6
15:56 jnthn What do we need for autoload?
15:56 jnthn OMGZ NO METHOD! And then call it instead?
15:56 pmichaud yes, somethinglike that
15:57 jnthn oh, that's probably quite easy when we have a custom dispatcher. ;-)
15:57 jnthn s/when/given/
15:57 pmichaud Yes.  Now if only we had a cus... oh, wait!  :-)
15:57 jnthn Is it spec'd?
15:57 pmichaud autoload?
15:58 jnthn yes
15:58 jnthn Which synopsis?
15:58 pmichaud S10 and S12
15:58 pmichaud S10, heading "Autoloading"
15:58 * jnthn didn't remember seeing it in S12..
15:58 pmichaud autoloading is briefly mentioned along with CANDO
15:58 pmichaud (in S12)
16:02 rjh jnthn: when's your next blog entry coming out? :)
16:02 jnthn rjh: Hoping to get one written today.
16:03 jnthn Got a few that I want to write.
16:03 jnthn And want to try and do them before I go on vacation.
16:03 rjh I have no idea why you're not aggregated on planet perl 6
16:04 jnthn I'm not? Heh.
16:04 rjh since your work is so integral to the development
16:04 rjh ...of perl 6
16:04 jnthn I thought that I was aggregated thre.
16:04 jnthn *there
16:04 rjh http://planetsix.perl.org/ ?
16:04 jnthn Yeah
16:05 rjh You're not there!
16:05 jnthn doh
16:05 jnthn So, anyone know how to add me there?
16:07 obra_ jnthn: um. I _used_ to be able to
16:07 obra_ let me see if I still have the bits
16:07 jnthn I scribble at http://use.perl.org/~JonathanWorthington/journal/
16:09 * jnthn afk for a little bit
16:11 obra_ While I'm here, what other feeds should end up on planetsix?
16:12 Tene I don't think I'm on planet perl six either.
16:12 Tene dunno if I should be
16:14 obra_ do you blog about perl 6?
16:14 Tene pmichaud: ETA on S11 review?
16:14 obra_ if so, give me an rss/atom feed url that has content not just titles and the name you should be under
16:14 obra_ is there a way to get an atom feed of changes only tto docs/Perl6/spec?
16:15 Tene http://blogs.gurulabs.com/cg​i-bin/mt-search.cgi?tag=Perl 6&Template=feed&IncludeBlogs=13&limit=20
16:15 Tene http://blogs.gurulabs.com/cgi-bin/mt-​search.cgi?tag=Perl%206&amp;Template=​feed&amp;IncludeBlogs=13&amp;limit=20
16:15 obra_ Was gonna say ;)
16:17 obra_ ok. 5 more minutes then I commit
16:17 obra_ anyone else who has a p6 blog that they think is of general interest.
16:17 Tene is masak there?
16:18 masak he is.
16:18 masak I got added sometime in November, when I was bloggin daily.
16:18 Tene hi masak :)
16:18 masak oh hai.
16:19 Tene btw masak, I've got a lot going on this week, but if you could send me email giving me a few tasks to work on for Web, I'll probably work on them soon.
16:19 masak Tene: ok, I will.
16:20 * antiphase starts trying to learn PIR
16:20 masak the two things that come to mind immediately are: (1) STD.pm-based color coding for the pastebin, and (2) Hitomi HLL.
16:20 masak antiphase++
16:20 Tene can we actually introspect a match object in rakudo now?
16:21 Tene And can we run STD.pm from rakudo?
16:21 masak Tene: no, and no. :/
16:21 masak would appreciate help with that, too, if you know how.
16:21 mizioumt1 joined #perl6
16:21 Tene 2) Sure.  Email me information about the spec, tests, etc. and some example Perl code showing how you'd like to use it.
16:22 masak pmichaud++ brought us part-way there, by enabling Perl6::Grammar.parse in Rakudo.
16:22 masak Tene: sure.
16:22 Tene my $templatesub = eval($template, :lang<hitomi>); say $templatesub(...);
16:23 Tene something kinda like that?
16:23 masak hm, maybe.
16:24 masak Tene: the main reason I want a HLL is so that templates can be compiled down to PIR and then executed from a web app without any 'Perl 6 overhead'.
16:24 Tene masak: if you're wanting that, then how about...
16:25 Tene use Masaks::Cool::Template:from<hitomi>; Masaks::Cool::Template.render(...);
16:25 masak yes, something like that.
16:25 Tene I can do that (or variants).
16:25 masak I'll send an email.
16:26 masak rakudo: my $a = $_ given $a
16:26 Tene That would be ideal, in fact.  Just define the API of what should exist in the namespaces defined.
16:26 p6eval rakudo 5c065e: OUTPUT«Null PMC access in isa()␤in Main (/tmp/ZjSWMyvvHY:2)␤»
16:26 * masak submits rakudobug
16:26 masak Tene: yes, I'll need to look into that myself, but that's likely a good thing. :)
16:27 Tene masak: idea for a Perl 6 irc bot: submit rakudobugs straight from IRC.
16:27 Tene you like?
16:27 masak Tene: there's often a bit of editing going on too. :)
16:28 Tene Bah.  Just have it paste the last n lines of the log into the email.
16:28 Tene !rakudobug 20
16:28 hanekomu joined #perl6
16:29 viklund joined #perl6
16:29 payload joined #perl6
16:29 masak have to run now.
16:29 Psyche^ joined #perl6
16:37 barney joined #perl6
16:49 hv2 Hmm, S09-autovivification\/autovivification doesn't get run by 'make spectest', is that intentional?
16:54 jnthn Is it in t/spectest.data?
16:54 hv2 ah, no
16:55 hv2 Should it be?
16:55 jnthn Depends if we pass any of it.
16:55 jnthn No point running a test we will entirely fail. :-)
16:55 hv2 There is a #?rakudo in there, for one of the tests, but it seems we autovivify a lot we shouldn't, it's quite possible none would pass.
16:56 jnthn Yeah, we have issues with auto-viv.
16:56 hv2 I hadn't realised there was a file-level filter, I was looking for rakudo skips to tell me what wasn't expected to work. I'll adjust my expectations. :)
16:57 jnthn Yeah, there's two levels. :-)
16:57 jnthn t/spectest.data is a whitelist of files to run.
16:57 jnthn #?rakudo directives in files blacklist tests not to run within that file.
16:57 * jnthn -> cooking
16:58 hv2 Good point, time to go find some dinner.
17:01 Mahen23 joined #perl6
17:01 Mahen23 as u said
17:01 Mahen23 how is perl6 going
17:01 Mahen23 is it code complete yet?
17:02 DanielC Mahen23: It is usable for a lot of simple programs, but it is not code complete.
17:03 Mahen23 ok, clear enough for me, thanks
17:03 DanielC Mahem23: There are already a few programs written in Perl 6 (including a board game and a wiki).
17:07 Mahen23 left #perl6
17:16 cwilson joined #perl6
17:17 payload joined #perl6
17:18 cwilson hm. perl6 newbie here, compiled the latest rakudo-2009-05 (macosx), trying to run http://svn.pugscode.org/pugs//example​s/algorithms/fibonacci_memoization.pl
17:18 cwilson ./perl6 fib.pl
17:18 cwilson Malformed routine definition at line 8, near "fib (UInt "
17:18 cwilson in Main (src/gen_setting.pm:0)
17:18 cwilson ?
17:19 viklund hmm
17:21 viklund cwilson: I don't think UInt is a type in rakudo, I changed that to Int but got another error-message
17:21 viklund (elements() not implemented for class Integer)
17:24 viklund cwilson: Ok, I'll paste a working version
17:25 pasteling "viklund" at 130.243.195.243 pasted "fibonacci_memoization.pl" (11 lines, 242B) at http://sial.org/pbot/37120
17:25 viklund cwilson: there you go
17:26 mberends viklund: you beat me to it :)
17:27 viklund ;)
17:27 viklund but I wonder if there's a bug here somewhere
17:28 viklund std: (state @s=3,4,5)[1] //= 22
17:28 p6eval std 27035: OUTPUT«ok 00:02 37m␤»
17:28 viklund rakudo: (state @s=3,4,5)[1] //= 22
17:28 p6eval rakudo 5c065e: OUTPUT«elements() not implemented in class 'Integer'␤in Main (/tmp/q5YGPjP8xg:2)␤»
17:29 viklund rakudo: (my @s=3,4,5)[1] //= 22
17:29 p6eval rakudo 5c065e:  ( no output )
17:29 viklund rakudo: (my @s=3,4,5)[1] //= 22;
17:29 p6eval rakudo 5c065e:  ( no output )
17:29 viklund rakudo: (my @s=3,4,5)[1] //= 22;say @s.perl
17:29 p6eval rakudo 5c065e: OUTPUT«[3, 4, 5]␤»
17:29 viklund rakudo: (my @s=3,4,5)[4] //= 22;say @s.perl
17:29 p6eval rakudo 5c065e: OUTPUT«[3, 4, 5, undef, 22]␤»
17:29 viklund std: (my @s=3,4,5)[4] //= 22;say @s.perl
17:29 p6eval std 27035: OUTPUT«ok 00:02 38m␤»
17:29 viklund rakudo: (state @s=3,4,5)[4] //= 22;say @s.perl
17:29 p6eval rakudo 5c065e: OUTPUT«elements() not implemented in class 'Integer'␤in Main (/tmp/HiLgg9G2Hf:2)␤»
17:29 viklund state bug?
17:30 mberends looks like it
17:31 mberends rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(2).say
17:31 p6eval rakudo 5c065e: OUTPUT«1␤»
17:31 mberends rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(10).say
17:31 p6eval rakudo 5c065e: OUTPUT«55␤»
17:31 viklund \o/
17:31 mberends rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(42).say
17:31 p6eval rakudo 5c065e: OUTPUT«267914296␤»
17:34 DanielC mberends: http://daniel.carrera.bz/_20​09/perl/storage-format.html  <-- Just an idea.
17:35 rjh rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(1000).say
17:35 p6eval rakudo 5c065e: OUTPUT«maximum recursion depth exceeded␤»
17:35 viklund nice try
17:36 * rjh runs it at home
17:36 rjh are you kidding me? rakudo has a maximum recursion depth?!
17:43 dalek rakudo: dbebac0 | pmichaud++ | src/parser/grammar.pg:
17:43 dalek rakudo: Update "module Foo;" to allow statements before it.
17:43 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​bebac006933cb30b4d3bc9908182641a86fb644
17:44 viklund rakudo: (my @a)[0] //= 1; @a.perl.say
17:44 p6eval rakudo 5c065e: OUTPUT«[1]␤»
17:44 viklund rakudo: (my @a)[2] //= 1; @a.perl.say
17:44 p6eval rakudo 5c065e: OUTPUT«[undef, undef, 1]␤»
17:44 viklund hmm
17:49 viklund bug sent...
17:50 viklund is there a bug tracker for children? could be quite fun ;)
17:50 FurnaceBoy that kind of thing leads to decades of analysis, later, methinks
17:50 FurnaceBoy :)
17:51 viklund perhaps, I guess it depends on the type of bugs
17:52 FurnaceBoy maybe bug objects and tasks.
17:52 FurnaceBoy Room Dirty. Deadline: Monday.
17:52 FurnaceBoy Homework.
17:53 viklund I was more thinking along the lines "Child wakes up at 4 in the morning, requesting food"...
17:53 pyrimidine joined #perl6
17:54 Molaf joined #perl6
17:54 FurnaceBoy viklund yeah i think these things are basically unfixable, they generally fix themselves over time.
17:54 FurnaceBoy viklund there's no specific action you can take to stop this happening
17:54 FurnaceBoy you just have to wait :)
17:55 FurnaceBoy plus, it's not a defect, it's a normal part of the process
17:55 FurnaceBoy (most people get blindsided by it regardless)
17:56 viklund ;)
17:59 pmichaud rakudo doesn't have a maximum recursion depth, but Parrot does.
17:59 pmichaud raudo:  (my @s = 3,4,5).perl.say;
17:59 pmichaud rakudo:  (my @s = 3,4,5).perl.say;
17:59 p6eval rakudo dbebac: OUTPUT«[3, 4, 5]␤»
17:59 pmichaud rakudo:  (my @s = 3,4,5)[1].perl.say;
17:59 p6eval rakudo dbebac: OUTPUT«4␤»
18:00 pmichaud rakudo:  (my @s = 3,4,5)[1] // = 3;
18:00 p6eval rakudo dbebac:  ( no output )
18:00 pmichaud rakudo:  (my @s = 3,4,5)[1] //= 3;
18:00 p6eval rakudo dbebac:  ( no output )
18:00 pmichaud rakudo:  (my @s = 3,4,5)[1] //= 3; @s[1].say;
18:00 p6eval rakudo dbebac: OUTPUT«4␤»
18:01 Muixirt what is //= anyway?
18:02 Gothmog_ like ||=, but tests if the left side is defined rather than true
18:03 Muixirt where is it specced?
18:03 pmichaud S03, probably.
18:03 pmichaud look for //
18:05 mberends DanielC: that's pretty close to what I would like to build, except that I would like to normalize out the module name and store :ver, :auth and perhaps other attributes in a separate sublist per module name. Also, I would like to consider some form of index to avoid sequentially comparing hundreds/thousands of names. The exact layout detail (bits, bytes etc) can be determined by what works best in PIR.
18:06 rjh pmichaud: I may be betraying my naivety here, but is there a need for a maximum recursion depth?
18:06 pmichaud It's in Parrot as a debugging aid, I think.
18:06 rjh it can presumably be turned off
18:06 pyrimidine what is the max recursion depth?
18:07 pyrimidine (what is it set to?)
18:08 rjh 10000
18:09 pyrimidine ok
18:09 DanielC mberends: I have a variation on this idea: We can use *two* files. One with the package list (YAML) and one with the actual data (which then becomes nothing more than "cat").
18:09 jnthn rjh: I thought 1000
18:09 DanielC mberends: The two-file format is simpler, and it's easier to hack (e.g. we can make a prototype more easily).
18:10 rjh jhthn: you're correct (10000 is for yacc :/)
18:11 DanielC mberends: The two-file idea means that you don't have to shuffle all the data every time you change the package list. When you add a new package, you just append to the "packages.data" file and edit "packages.yml".
18:12 mberends DanielC: agreed for ease of implementation, although the risk of content inconsistency is a little higher. An acceptable tradeoff.
18:13 pyrimidine class Beaker {method meep {say 'meep!'}}; my sub foo returns Array {my @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:13 pyrimidine rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Array {my @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:13 p6eval rakudo dbebac: OUTPUT«meep!␤meep!␤meep!␤meep!␤»
18:13 pyrimidine class Beaker {method meep {say 'meep!'}}; my sub foo returns Array of Beaker {my @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:13 pyrimidine rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Array of Beaker {my @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:14 rjh fib(1000) is 4.34665576869374e+208 according to rakudo
18:14 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/6QF5hxvWYw:2)␤called from Main (/tmp/6QF5hxvWYw:2)␤»
18:14 pyrimidine grr...
18:14 pmichaud I understand the need for the package list -- why the second file?
18:14 rjh fib(10000) is apparently Inf
18:14 jnthn pyrimidine: Array doesn't yet take type parameters.
18:14 pyrimidine I thought so
18:14 jnthn pyrimidine: For now, use Positional of Beaker.
18:14 pmichaud jnthn: actually, I think that   my @a;   doesn't build an array that is "of Beaker"
18:15 pmichaud i.e., even when Array does take type parameters, it's still a type mismatch.
18:15 jnthn pmichaud: Actually it's both. :-)
18:15 jnthn Right.
18:15 viklund_ rakudo: sub r($i=0) {if $i>0 { r($i-1) }}; r(495)
18:15 pmichaud rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Array of Beaker {my Beaker @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:15 p6eval rakudo dbebac: OUTPUT«maximum recursion depth exceeded␤in sub r (/tmp/GsAiij0GHN:2)␤called from sub r (/tmp/GsAiij0GHN:2)␤called from sub r (/tmp/GsAiij0GHN:2)␤called from sub r (/tmp/GsAiij0GHN:2)␤called from »
18:15 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/Qz0XWyukWh:2)␤called from Main (/tmp/Qz0XWyukWh:2)␤»
18:15 viklund_ rakudo: sub r($i=0) {if $i>0 { r($i-1) }}; r(494)
18:15 p6eval rakudo dbebac:  ( no output )
18:15 pyrimidine rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Array {my @a of Beaker; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
18:16 p6eval rakudo dbebac: OUTPUT«meep!␤meep!␤meep!␤meep!␤»
18:16 viklund_ max recursion depth seems to be 495...
18:16 nnunley joined #perl6
18:16 viklund_ (494)
18:16 rjh viklund_: it's 1000 according to interp->recursion_limit
18:16 pmichaud when using p6eval, you may be hitting the timeout limit and not the recursion limit.
18:16 jnthn pmichaud: Your last post to the list (from RT) had some incomplete content?
18:16 pmichaud extra content, actually.
18:16 viklund_ what's the timeout?
18:16 jnthn Oh
18:16 pmichaud viklund_: 5 seconds.  But in reality it's much less than that.
18:17 jnthn (recursion depth) remember a block counts too.
18:17 rjh fib(2000) is a 418-digit number, parrot says Inf - no bignum support?
18:17 pmichaud right, recursion depth is of Parrot subroutines, not of Rakudo subroutines
18:17 pmichaud parrot doesn't have bignum support yet, correct.
18:17 jnthn sub foo { for 1..5 { foo() } } # foo here is 2 calls to reach
18:17 viklund_ I get the same error running from a file...
18:17 rjh it did seem to coerce int to double which is neat
18:17 pmichaud coercing to double is our workaround for no bigint support
18:17 viklund_ ah
18:18 viklund_ jnthn: ahh
18:18 jnthn viklund_: ahhhhhhh!
18:18 jnthn ;-)
18:18 rjh is it really accurate to return Inf for overflows?
18:18 pmichaud I'm guessing that's parrot's doing.
18:18 rjh I suppose you get NaN eventually
18:19 mberends pmichaud: we were (prematurely) discussing the possibility of storing all library module PBC's in a single library file to get away from filesystem dependencies and name mangling, when implementing :ver and :auth :)
18:19 pmichaud mberends: that sounds slower to me.
18:19 pmichaud I suppose if the index contains offsets, then yes.
18:20 pmichaud still feels like the filesystem would be the way to go, though.
18:20 TimToady whether it's in one file or many is just a smop, as long as the interface is consistent
18:20 pmichaud I won't bikeshed it since I'm not the one playing with the implementation yet
18:21 mberends pmichaud: we should try several implementations anyway, because most of the discussion is purely speculative
18:22 pmichaud mberends: agreed.  I'm just wanting to register a "this feels a little wrong" note, not to cancel further exploration in the area.
18:22 pmichaud (or pre-empt)
18:23 TimToady to the api, physical locations should probably be opaque anyway
18:23 rjh looks like rakudo is only 10x slower than perl5 for fibonacci :)
18:23 pmichaud oh, I agree totally with that.
18:23 pmichaud only 10x?  I actually find that encouraging.
18:23 TimToady p5 ain't fast at fib
18:23 rjh yes, me too
18:23 TimToady if you're doing it with recursion
18:24 rjh TimToady: worse, recursion with cached array
18:24 TimToady it should be pretty easy to optimize 0,1,1...&[+] in P6  :)
18:25 TimToady I'm kinda surprised linux doesn't have a /dev/fib yet...
18:25 TimToady errands &
18:27 rjh oh what the fuck
18:27 rjh /msg evalbot pwd
18:28 rjh perhaps this was always there and I never noticed it
18:32 clintongormley1 joined #perl6
18:34 jdv79 joined #perl6
18:34 rjh who runs evalbot?
18:36 DanielC mberends: I modified the web document. Now it describes the two-file idea and modules are organized per module name, like you suggested. I'm not sure what to do for an index.
18:36 kidd_ joined #perl6
18:37 DanielC http://daniel.carrera.bz/_20​09/perl/storage-format.html
18:38 mberends DanielC: re-reading. I'm still thinking about possible index implementations. It's like a database, but read-mostly and write-occasionally.
18:38 rjh oh, silly me, evalbot isn't even in this channel, I confused it with p6eval :/
18:40 antiphase 19:39.44 <antiphase> kill -9 1
18:40 antiphase 19:39.47 <evalbot> no output
18:40 rjh i tried shutdown -h now, it doesn't work ;)
18:40 antiphase I don't think it's particularly stupid
18:40 jamtech joined #perl6
18:40 rjh i thought the perl evalbot had gone nuts for a moment
18:43 mberends DanielC: the append idea is nice for the data file. Extending your idea, maybe a third file could contain several indexes of this kind: http://en.wikipedia.org/wiki/Trie
18:43 DanielC *click*
18:44 mberends Tries are very efficient in memory, must consider how they perform on disk.
18:45 DanielC I'm not familiar with tries. I'm reading...
18:45 DanielC Anyways, a third file with indexes sounds like a good idea.
18:46 mberends yes, and if parrot keeps the three files open during execution, all the remaining overheads are only seeks and reads
18:46 DanielC A Trie sounds a lot like how human dictionaries are organized.
18:47 mberends including rudimentary compression by not repeating prefixes
18:47 DanielC ok
18:51 DanielC A trie sounds great.
18:51 DanielC It sounds very fast - O(n)
18:52 DanielC (n = key length)
18:53 jdv79 besides November are there any comprehensive things written in p6?
18:53 rjh druid!
18:53 mberends DanielC: indeed, only hashes can beat O(n) afaik
18:53 DanielC jdv79: Define comprehensive. masak has written a few applications, like Druid.
18:54 jdv79 more than a script
18:54 jdv79 modular, has tests, etc...
18:54 DanielC jdv79: I think Druid would qualify. It's a board game. Ask masak about it.
18:55 jdv79 ok
18:55 DanielC jdv79: Also, there is a Perl 6 compiler being written in Perl 6 :-)
18:55 jnthn mberends: Sorted list + binary search is O(log(n))
18:55 DanielC jdv79: That's certainly an application with tests and stuff.
18:55 lichtkind mberends: on what your are currently?
18:55 jnthn mberends: (provided the list is pre-sorted of course)
18:56 mberends jdv79: we're just getting started with embedded webservers, blog hosts etc
18:56 jnthn mberends: Though I guess the good thing about tries is that they're O(n) on the key length rather than the number of times, so I guess on times they're O(log(n)) too?
18:56 DanielC jdv79: Rakudo itself is a very large application and much of it is written in Perl 6, including the Perl 6 parser.
18:56 mberends jnthn: yes, something like that.
18:56 jnthn A lot of the Rakudo built-ins are written in Perl 6 too.
18:57 jnthn mberends: IIUC tries divide the search space by a constant factor each level down, which would give logarithmic complexity I guess.
18:58 jnthn They probably have better spacial locality of reference than a binary search though.
18:58 mberends lichtkind: doing stuff afk intermittently, if you can reserve a page exclusively for me I can work on that in between other tasks
18:58 mberends jnthn: locality of reference is a massive win on disk
18:59 jnthn mberends: Right.
18:59 lichtkind mberends: no i just fill some gabs in appendix B later i give you link to check translation
18:59 jnthn mberends: There's probably more than one way to store a trie on disk...
18:59 jnthn The less long seeks, the better, so I guess spacial locality is a good thing to optimize for.
19:00 jnthn I think B-Trees (I forget details of them) are meant to have good on-disk properties also.
19:00 mberends jnthn: I did one years ago in C, but it didn't scale well above a few thousand records on a PII-233
19:00 DanielC jnthn/mberends: For what it's worth, most databases use B+ trees to store database indexes because they minimize disk seeks.
19:01 jnthn IIRC, B-Trees do well because they have a whole bunch of "pointers" which, as DanielC says, minimizes seeks (though probably at the cost of more effort to decide where to branch, but that's cheap CPU time).
19:01 DanielC I don't know tries well enough to comment on them (I only just read the wikipedia page).
19:01 mberends jnthn: I know B-trees very well from MSSQL. I wouldn't choose them for this job
19:02 DanielC mberends/jnthn: Note, a B+tree is a variation on a B-tree. It requires fewer disk seeks.  http://en.wikipedia.org/wiki/B%2B_tree
19:02 mberends The B is for Balanced (to improve transactional updates) and we don't profit from that.
19:03 DanielC ok
19:03 jnthn mberends: Agree we don't profit from the balanced part, no.
19:03 jnthn mberends: The aspects of it that give less seeks, OTOH...
19:04 mberends the fixed block size loses against the trie
19:04 mberends space consumption (therefore IO and RAM) much higher too
19:06 mberends B(+)-tree is really for read/write applications
19:06 jnthn OK, makes sense.
19:07 mberends DanielC/jnthn: whatever needs the least seeks will perform best.
19:07 DanielC y
19:09 jnthn mberends: Fully agree, I'd just suggested B[-+]Tree 'cus I thought it meant less seeks. :-)
19:09 DanielC ditto
19:09 mberends when it's a finite number of files, Rakudo 6.1 can add a data cache to eliminate many seeks and reads
19:09 jnthn But the fixed block size argument has me.
19:09 mberends jnthn: B+ less than B, that's all
19:16 pyrimidine joined #perl6
19:19 xinming_ joined #perl6
19:21 donaldh joined #perl6
19:38 DanielC mberends: http://en.wikipedia.org/wiki/Judy_array  <--- very fast tree that is too complex to implement but comes with an easy to use open source C library.
19:38 DanielC s/tree/trie/
19:38 DanielC Stupid phonetics...
19:39 DanielC mberends: Anyways, it's a type of trie.
19:39 mberends DanielC: definitely consider it
19:40 DanielC I'm just reading the "10 minute explanation of why Judy is so fast".
19:47 DanielC On the other hand, I don't like complex solutions, even if the complexity is hidden by a C API.
19:48 hv2_ Hmm: "ResizablePMCArray: Can't pop from an empty array!"
19:48 hv2_ Is this expected, in a program that doesn't use pop?
19:49 rjh Judy seems rather esoteric to say the least
19:49 jnthn hv2: Probably indicates some kind of other bug.
19:50 jnthn hv2: Either bug in Rakudo, or bad error reporting by Rakudo.
19:50 hv2 jnthn: ok, not a well-known one then, I'll try to cut it down to a testcase.
19:50 rjh Judy's source is something like 20,000 lines long
19:51 rjh i quote "Additionally, some of Judy's space and speed improvements come from strategies that could be used by any data structure but aren't because they're not good software engineering. Most abstract data types give you a fixed pointer good for the life of that datatype; Judy omits one level of indirection and gives you a pointer that may change during the life of the associative array as it grows and shrinks"
19:51 DanielC rjh: Yeah... a bit intimidating.
19:51 mberends yes, pity
19:52 rjh this might be interesting: http://www.nothings.org/computer/judy/
19:53 Sunbeam joined #Perl6
19:53 jnthn hv2: thanks
19:53 DanielC rjh: I just read that. It doesn't sound very good for Judy.
19:54 DanielC rjh: Summary: In a few hours the author could write a hash table almost as fast as Judy, which has had tons of development behind it.
19:54 rjh Yes
19:54 rjh It seems like an ideal data structure, yet it isn't in common use
19:54 meppl joined #perl6
19:57 kane__ joined #perl6
19:57 hv2 rakudo: our @a; (0 ?? shift(@a) :: 1);
19:57 p6eval rakudo dbebac: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤in Main (src/gen_setting.pm:0)␤»
19:57 jnthn :: is !! in Perl 6.
19:57 jnthn rakudo: our @a; (0 ?? shift(@a) !! 1);
19:57 p6eval rakudo dbebac:  ( no output )
19:58 hv2 Ok, I guess that should make it easy to track down then. :)
19:58 hv2 I would suggest your exact words as the new error message ...
19:58 jnthn hv2: Actually I think it explodes in the parser...
19:58 DanielC Another data structure: http://en.wikipedia.org/wiki/Ternary_search_tries
19:58 jnthn Rather than at runtime.
19:59 jnthn std: our @a; (0 ?? shift(@a) !! 1);
19:59 hv2 Yes, it should be giving a parse error.
19:59 jnthn std: our @a; (0 ?? shift(@a) :: 1);
19:59 p6eval std 27035: OUTPUT«ok 00:02 36m␤»
19:59 p6eval std 27035: OUTPUT«##### PARSE FAILED #####␤Please use !! rather than :: at /tmp/1I21IvdgEg line 1:␤------> [32mour @a; (0 ?? shift(@a) [31m:: 1);[0m␤    expecting any of:␤ infix or meta-infix␤      infix stopper␤    standard stopper␤ terminator␤FAILED 00:02 36m␤»
19:59 mberends DanielC: it's raining tries!
19:59 rjh hallelujah!
19:59 DanielC :-)
19:59 jnthn Wonder if we can steal how STD does that :-)
20:00 hv2 What is STD, is that pugs?
20:00 rjh hv2: Larry Wall-coded reference parser
20:00 hv2 Ah ok.
20:00 rjh it says okay if the code is valid Perl 6, syntax-wise
20:00 rjh that might != what rakudo can handle atm
20:00 hv2 Oops, gotta run, let me know if you want a ticket for the parse failure
20:02 Su-Shee left #perl6
20:04 pyrimidine joined #perl6
20:15 sjohnson Question:  can Perl 6 return multiple matches from a line using the ~~ match thingy?
20:15 sjohnson if this is something that can be done even in p5, how is it done?
20:15 sjohnson maybe a while instead of an if (m/goose/) ?
20:15 * sjohnson is trying it out for himself
20:17 DanielC sjohnson: yes
20:18 rjh try
20:18 rjh my @matches = ($text =~ /regex/g);
20:18 rjh that's perl 5 right?
20:18 DanielC sjohnson: You might find this interesting: http://daniel.carrera.bz/2009​/06/rpn-calculator-in-perl-6/
20:19 skids_ There will be a :g adverb.  IIRC is isn't there in rakudo yet,.  Unless I missed it.
20:19 DanielC skids_: :g is definitely in Rakudo.
20:20 DanielC skids_: But my blog post shows multiple matches with Perl 6 tokens without ever using :g
20:23 rjh for $/<...> -> $item ?
20:25 kate21de joined #perl6
20:31 jferrero joined #perl6
20:38 [particle] joined #perl6
20:49 DanielC mberends: Do you have any idea if Parrot's implementation of hashes is efficient?
20:50 pugs_svn r27036 | jnthn++ | [t/spec] A bunch of new tests that exhaust .^parents (without :tree).
20:51 jnthn s/exhaust/exercise/ # my english sucks...
20:51 DanielC jnthn: You are the local expert on Parrot, right?
20:52 jnthn DanielC: I know Parrot guts pretty well.
20:52 jnthn Used to hack Parrot core before Rakudo.
20:52 DanielC Do you know if the implementation of hashes is reasonably efficient?
20:52 [particle] DanielC: what type of efficiency are you looking for?
20:52 jnthn I know it's had quite a bit of profiling and tweaking of late.
20:53 [particle] it's written in c, though not as optimized as perl 5's hash impl
20:53 [particle] yep, jnthn is correct there
20:53 jnthn I suspect that more could the squeezed out of it.
20:53 pyrimidine joined #perl6
20:53 DanielC It just occurred to me that the index that mberends was talking about could just be PIR code that feeds straight into Parrot.
20:53 jnthn Though probably by a good understanding of the applicable math more than micro-optimizations on the code.
20:53 DanielC $P0["Foo::Bar"]  <-- contains the line number in packages.data where I can find Foo::Bar
20:56 pugs_svn r27037 | jnthn++ | [spec] Rename :hierarchical option to :tree in the spec for some meta-class method, as suggested on p6l.
21:03 Whiteknight joined #perl6
21:05 pugs_svn r27038 | jnthn++ | [t/spec] Remove (incorrect) .^parents test from the general metaclass tests file; parents.t now provides much more comprehensive and correct testing.
21:06 DanielC jnthn: Is that a stupid idea? To write the index as PIR and let Parrot's implementation of hash tables take care of the searching?
21:07 pmurias joined #perl6
21:08 pyrimidine jnthn: typed arrays seem to work (my @a of Foo), but specifying returning typed arrays doesn't (our Array of Foo sub my_method {}).  Is that correct (i.e. the latter isn't implemented, the former is?)
21:08 jnthn DanielC: Depends how you do it.
21:09 jnthn pyrimidine: That is correct. Actually my @a of Foo cheats a little at the moment.
21:09 DanielC jnthn: How so? What is a good/bad way to do it?
21:09 jnthn pyrimidine: We create the Array, then mix in Positional[Foo].
21:09 jnthn pyrimidine: Similar for typed hashes.
21:10 jnthn pyrimidine: That cheat can go away once Array/List are refactored. Then they can become parametric roles.
21:10 pyrimidine ok, makes sense that returned typed arrays/hashes aren't implemented then.
21:10 jnthn pyrimidine: Well, Positional of Foo will work.
21:10 jnthn DanielC: If you plan to build the Hash from PIR every time you need it, that'll kinda suck.
21:11 jnthn DanielC: If instead you plan to build it and have it frozen, then it's just thawed, that'd be more efficient.
21:11 jnthn Or should be much more efficient anyway.
21:11 DanielC ok
21:12 DanielC How about straight bytecode?
21:12 jnthn ?
21:12 * pyrimidine hmm, still getting a type check error
21:12 pyrimidine rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Positional of Beaker {my @a of Beaker; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
21:12 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/w0uBR9hJ8h:2)␤called from Main (/tmp/w0uBR9hJ8h:2)␤»
21:12 DanielC store the index as PBC
21:12 DanielC PIR hash -> PBC -> file
21:12 jnthn DanielC: That's what I meant by the thaw thing
21:12 DanielC ah
21:12 jnthn DanielC: erm, freeze
21:12 jnthn Oh, OK
21:13 jnthn Maybe we mean different things.
21:13 DanielC I'm just thinking about ideas for that index file that mberends wanted.
21:13 jnthn pyrimidine: I'm a little surprised that one doesn't work.
21:13 jnthn DanielC: I didn't mean compiling the PIR that makes the hash to bytecode.
21:13 jnthn DanielC: I meant getting Parrot to freeze (serialize) the Hash that is produced.
21:13 DanielC ok
21:14 ejs joined #perl6
21:14 decasm left #perl6
21:14 DanielC afk
21:14 jnthn class Beaker {method meep {say 'meep!'}}; my sub foo returns Positional of Beaker {my Beaker @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
21:14 jnthn rakudo: class Beaker {method meep {say 'meep!'}}; my sub foo returns Positional of Beaker {my Beaker @a; @a.push(Beaker.new) for 1..4; return @a}; foo()>>.meep;
21:15 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/2T4La1Vhq5:2)␤called from Main (/tmp/2T4La1Vhq5:2)␤»
21:16 jnthn rakudo: class A { }; sub foo returns Positional of A { my A @foo; return @foo }; foo()
21:16 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub foo (/tmp/k51mNZDAHZ:2)␤called from Main (/tmp/k51mNZDAHZ:2)␤»
21:16 jnthn rakudo: class A { }; sub foo returns Positional of A { my A @foo; say @foo.of; return @foo }; foo()
21:16 p6eval rakudo dbebac: OUTPUT«A()␤Type check failed on return value␤in sub foo (/tmp/eEyjymxNEA:2)␤called from Main (/tmp/eEyjymxNEA:2)␤»
21:16 jnthn rakudo: class A { }; sub foo returns Positional[A] { my A @foo; say @foo.of; return @foo }; foo()
21:16 p6eval rakudo dbebac: OUTPUT«Malformed routine definition at line 2, near "foo return"␤in Main (src/gen_setting.pm:0)␤»
21:16 pyrimidine rakudo: my sub foo returns Positional {my @a of Int; @a = (1..4); return @a}; foo()>>.say;
21:16 p6eval rakudo dbebac: OUTPUT«1␤2␤3␤4␤»
21:17 pyrimidine rakudo: my sub foo returns Positional of Int {my @a of Int; @a = (1..4); return @a}; foo()>>.say;
21:17 p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/U3GyzN0oi1:2)␤called from Main (/tmp/U3GyzN0oi1:2)␤»
21:17 jnthn Ah
21:18 jnthn pyrimidine: OH! I think I see it!
21:18 jnthn rule trait_verb { [ | $<sym>=[of|returns] <typename>
21:19 pyrimidine ok
21:19 dalek rakudo: acd4cfb | jnthn++ | src/ (2 files):
21:19 dalek rakudo: Fixes and improvements to .^parents, to get it passing all of the current tests in S12-introspection/parents.t. Should now be much more stable than before.
21:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​cd4cfb44ab76235538ba8792726d91950189c9e
21:19 dalek rakudo: a18b1d3 | jnthn++ | t/spectest.data:
21:19 dalek rakudo: Add S12-introspection/parents.t to spectest.data.
21:19 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​18b1d34872c1dd69c9156775b533b496c755939
21:19 jnthn pyrimidine: That typename almost certainly wants to be fulltypename.
21:20 pyrimidine so, for Int that would be...
21:21 jnthn pyrimidine: Your code is correct, I think we were just parsing it wrongly.
21:21 jnthn We were parsing it as two traits
21:21 jnthn of Positional
21:21 jnthn of Int
21:21 jnthn Rather than one: Positional of Int
21:21 pyrimidine oh, that makes sense
21:21 jnthn (well, returns Positional of Int)
21:22 pyrimidine right
21:22 jnthn Yes, changing that locally fixes it.
21:22 jnthn pyrimidine++
21:22 * pyrimidine bows
21:22 jnthn Let me spectest, and I'll add a test case too, then commit.
21:23 pyrimidine np
21:23 pyrimidine just to bring this up, I was wondering about the current implementation of .trans
21:23 pyrimidine right now it's in hacky PIR
21:24 pyrimidine (I can say that b/c I wrote it)  ;)
21:24 pyrimidine and I'm wondering if it would work better as maybe a grammar
21:24 jnthn Hmm...STD uses <typename> but it's <typename> does what Rakudo's <fulltypename> does...guess there's some STD tracking to do here...
21:25 jnthn pyrimidine: It would use a grammar internally?
21:25 pyrimidine maybe
21:25 japhb joined #perl6
21:26 jnthn pyrimidine: Can you give me an example?
21:26 pmichaud yes, STD eliminated <fulltypename> in favor of <typename>
21:27 jnthn I don't fancy refactoring that tonight.
21:27 jnthn So I'll just s/typename/fulltypename/ in this spot for now so we parse more correctly.
21:27 pmichaud I don't think it'll be a difficult refactor (but yes, it's a little late to attempt tonight)
21:28 jnthn No, it won't be hard, I don't think.
21:28 jnthn Just, like you say, not the time to start on something like that. :-)
21:28 * pyrimidine got distracted
21:29 pyrimidine student
21:33 pyrimidine rakudo: "&nbsp;&lt;&gt;&amp;".trans( (['&nbsp;', '&nbsp;&lt;', '&lt;', '&gt;', '&amp;'] => [' ',      'AB',         '<',    '>',    '&'    ])).say
21:33 p6eval rakudo dbebac: OUTPUT«AB>&␤»
21:35 pyrimidine .trans is like a parallelized .subst
21:36 pyrimidine so I'm wondering whether we could make this a bit easier by having a simple regex that alternates
21:37 pyrimidine to find the longest Match, then replaces them
21:37 pyrimidine that's not the way it's implemented ATM
21:38 jnthn Ah, build the regex based upon the arguments and then eval it?
21:38 pyrimidine yes
21:38 jnthn Makes some sense.
21:38 jnthn However, relies on working LTM I suspect.
21:38 pyrimidine the reason I mention a grammar is that you can pass in closures
21:38 pyrimidine yes, I was thinking the same (LTM)
21:39 pyrimidine rakudo: my $count = 0; 'hello'.trans(/l/ => { ++$count }).say;
21:39 p6eval rakudo dbebac: OUTPUT«he12o␤»
21:39 jnthn pmichaud: if you do a /@a/ will it pick the shortest token in @a to match (under LTM semantics, not current?)
21:39 pmichaud jnthn: yes.
21:39 jnthn pyrimidine: So you could maybe do it just like that IIUC.
21:40 jnthn No regex eval needed.
21:40 pyrimidine So, then basically I would just need to keep track of the mapping
21:40 pyrimidine I may try that out
21:40 pmichaud an interpolated array acts like    @a[0] | @a[1] | @a[2]     unless it's part of an || alternation
21:41 jnthn Neat.
21:41 pmichaud of course, PGE doesn't have this yet.
21:41 jnthn But we don't get LTM quite right yet I guess.
21:41 pmichaud nor variable pattern matching
21:41 jnthn Plus no interpolation.
21:41 pmichaud right.
21:41 jnthn pyrimidine: So I think it's a good idea, but Rakudo ain't quite there with what's needed to do it that way yet.
21:42 pyrimidine ok
21:42 pyrimidine it works for now, but it's def. an area that needs optimization
21:42 ruoso joined #perl6
21:43 ruoso Hello!
21:43 pyrimidine o/
21:43 * pyrimidine on the way home...
21:44 jnthn pyrimidine: OK. And just comitted fix for the bug you spotted :-)
21:44 pyrimidine thx!
21:44 pugs_svn r27039 | jnthn++ | [t/spec] Tests for returning an array on a sub with a constraint like returns Positional of Foo.
21:45 pyrimidine left #perl6
21:47 pugs_svn r27040 | lwall++ | [Cursor] fix problem with if/else losing .caps
21:47 pugs_svn r27040 | lwall++ | [gimme5] now use p5.10's given, so don't need to fake up ; on do {}
21:48 dalek rakudo: 063f3d5 | jnthn++ | src/parser/ (2 files):
21:48 dalek rakudo: Returns traits should parse a fulltypename, not a typename. Fixes a bug spotted by pyrimidine++.
21:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​63f3d54d284122cd12c7497d57f0c8d7295b61d
21:51 eternaleye joined #perl6
21:52 Limbic_Region joined #perl6
21:55 [particle]1 left #perl6
22:07 jferrero joined #perl6
22:11 cognominal left #perl6
22:12 Sunbeam joined #Perl6
22:18 eternaleye joined #perl6
22:22 Sunbeam joined #Perl6
22:23 justatheory joined #perl6
22:31 cognominal joined #perl6
22:41 jnthn http://use.perl.org/~Jonath​anWorthington/journal/39100 # Rakudo day write-up from ages ago that I never got done
23:01 DanielC joined #perl6
23:05 meppl joined #perl6
23:11 nihiliad joined #perl6
23:20 donaldh joined #perl6
23:21 beggars joined #perl6
23:31 kate21de1 joined #perl6
23:31 DanielC joined #perl6
23:38 DanielC Does anyone know how to open()/close()/chdir() in Parrot (PIR) ?
23:38 DanielC I can't find that information in the Parrot book.
23:39 DanielC Ah, I found it.
23:46 hv2 left #perl6
23:52 xinming joined #perl6
23:57 xinming_ joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo