»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend!
Set by Tene on 14 May 2009.
00:00 mberends left 00:06 eternaleye_ left 00:10 lichtkind left 00:13 amoc joined 00:20 DanielC left, kate21de1 left 00:22 justatheory left 00:33 sri_kraih_ joined 00:42 snarkyboojum joined 00:43 xinming_ is now known as xinming 00:45 sri_kraih__ joined 00:51 sri_kraih left 01:03 sri_kraih_ left 01:09 ihrd joined 01:10 ihrd left 01:17 meppl left 01:19 Whiteknight left 01:35 cosimo left 02:01 Limbic_Region left 02:03 cspencer joined 02:14 jferrero left 02:26 kate21de joined 02:31 justatheory joined 02:38 alester joined 02:48 snarkyboojum left 03:00 xomas left 03:15 agentzh left, agentzh joined 03:18 alanhaggai joined 03:20 alester left, lambdabot left 03:23 lambdabot joined 03:25 lambdabot left 03:27 cosimo joined 03:28 lambdabot joined, lambdabot left 03:29 mkfort joined, xinming_ joined 03:30 alester joined 03:31 lambdabot joined 03:33 mkfort left 03:34 cosimo left, skids_ left 03:35 mkfort joined 03:38 xinming left, cosimo joined 04:05 cspencer left, FurnaceBoy left 04:12 payload left 04:17 payload joined 04:56 alanhaggai left 04:57 cottoo joined, cotto left 05:05 cottoo is now known as cotto 05:06 DemoFreak joined 05:10 dmpk2k joined 05:22 nihiliad left 05:31 xomas joined 05:40 finanalyst joined 05:43 justatheory left 05:50 sri_kraih__ left 05:51 ejs joined 05:52 iblechbot joined 06:45 xinming_ left 06:48 xinming joined 06:50 mycelium joined
mycelium hello. can i find builded debian packages for last parrot and perl6 releases anywhere? 06:55
07:10 agentzh left 07:11 agentzh joined
unitxt mycelium: I do not think so. You might have better luck asking over in #debian though. *But*, this url is very nice, 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:12
07:13 payload left 07:14 viklund joined 07:21 snarkyboojum joined, dakkar joined 07:22 alester left, mkfort left 07:24 kate21de left
mycelium unitxt: thanks. rakudo.org/how-to-get-rakudo i saw. if i will not find packages then will get sources from git 07:26
07:28 alester joined
Matt-W mycelium: Most of us use the latest git, because Rakudo changes so quickly 07:28
It is usually a very straightforward build 07:29
mycelium Matt-W: i understood. but dpkg/apt is great comfortable :) 07:34
Matt-W Yes :)
However, if you just had packages of the monthly releases, you'd be way behind in a couple of weeks 07:35
07:36 DemoPhreak joined 07:37 mkfort joined
mycelium Matt-W: now i am jast a junior perl6 user, and it's consistent with my need 07:42
07:42 pmurias joined
pugs_svn r27031 | pmurias++ | [re-smop] compacted t/multi.t 07:43
Matt-W mycelium: If you spend much time here, I think that would change 07:44
07:50 Muixirt joined 07:51 DemoFreak left
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.
Tene debian packages do exist for parrot, but they're not standard of part of apt
or something 07:54
we don't have a sponsor, iirc
I've missed a lot of those political issues.
mycelium in official debian repo exist parrot 1.0.0-1 07:55
but actual monthly release is 1.2 07:56
Matt-W and I think rakudo needs at least 1.2 at the moment
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
pmurias ruoso: hi 08:04
08:06 DemoPhreak is now known as DemoFreak
moritz_ oh hai 08:08
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
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?
moritz_ I hope eternaleye has his commit bit already?
@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
on #moose suggests even active p5 developers don't quite realize how shoestring the effort is.
wayland76 said 9d 3h 52m 44s ago: Can eternaleye have a commit bit for the Specs so he can work on S22 please?
pugs_svn r27032 | pmurias++ | [re-smop] 08:18
r27032 | pmurias++ | added PRIMITIVES::SMOP_RI and PRIMITIVES::ritest
r27032 | pmurias++ | experimenting with adding types to signatures
08:19 Sark is now known as Sark23
Sark23 hi, use here anyone a mysql database? 08:24
pmurias propably a few people, including me 08:25
Matt-W I haven't for years 08:28
pmurias ruoso: could you take a look at t/multi.t and check if the type support is going in the rightish direction? 08:33
08:41 snarkyboojum left 08:50 pmurias left 08:58 DanielC joined
Matt-W hi DanielC 08:58
DanielC o/
09:00 payload joined, masak joined
Matt-W hi masak 09:03
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.
masak s1n: cool.
Matt-W: did you disappear on Friday? I made a few commits to Form, and then fell asleep. :)
Matt-W masak: I kind of drifted away 09:06
I saw your commits though
some nice improvements to the tests, thank you
masak you're welcome. 09:07
Matt-W never thought of using given on a type object like htat
masak I'm always on the lookout for reducing boilerplate. :)
Matt-W :)
I did a bit of number formatting stuff
masak nice.
Matt-W got very frustrated with floating point arithmetic
masak I'll have a look at it when time permits.
Matt-W got even more frustrated when we didn't have Rat yet 09:08
and started playing sims 3
masak Matt-W: you shouldn't stringify the floats directly, you should use .fmt and sprintf... 09:10
Matt-W argh
masak no, that's what they're for.
Matt-W argh! 09:11
masak {>>>.<<} corresponds to %3.2f or something...
Matt-W but then
you have to line up the decimals
and do weird and wonderful groupings
masak I don't understand.
Matt-W things that go a bit beyond printf formatting 09:12
masak oh, I'm sure you do.
but don't anticipate problems. do TDD instead! :P
Matt-W sorry
but that doesn't excuse me from thinking ahead with the design
trying to see how it can do everything it needs to do 09:13
rather than just the next test
masak oh, sure.
Matt-W is trying to digest an enormous specification document for work 09:19
09:19 mberends joined
Matt-W it's not as fun as the perl 6 spec :( 09:19
jnthn o/ 09:22
09:22 donaldh joined
Matt-W hi jnthn 09:23
the problem with this is that it mentions 'statistics' and my eyes glaze over
even though tthere's nothing related to statistics as the branch of mathematics 09:24
it's just streams of information, the kind of thing you might want to subject to analysis
09:25 mycelium left 09:29 synth left
DanielC Matt-W: What do you do for a living? 09:32
Who do you work for?
09:38 payload left
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.
(1) No dependencies => makes sense.
(2) Why PIR? (not that I care much) 09:50
masak mberends: ack on all points.
DanielC (3/4) But we still store the actual file in the filesystem, right? The database is just to find them faster, right?
mberends DanielC: 2) to interface to the existing actions.pm implementation 09:51
DanielC ok
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:53
DanielC You are the expert, I trust your judgment. 09:54
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
DanielC If the work is in C one can use an off-the-shelf database like BerkeleyDB or SQLite. 09:56
But I haven't written C in many years.
mberends DanielC: if designed correctly, module sharing should work
DanielC I guess that using a standard DB would go a long way toward making module sharing practical.
mberends the functionality of each other database is not quite what is needed in this case 09:57
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
DanielC: we don't want the startup cost of transaction journals etc etc
what fits the requirments more closely is a kind of archive store, such as (but not exactly) a .jar file 09:59
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
10:00 hanekomu joined
mberends Rakudo eventually spits out PBC code. Running Perl 6 programs is actually running PBC on the Parrot VM 10:00
therefore other languages that compile to PBC can join the party 10:01
the module library required is a PBC library
jnthn DanielC: (recreate all that) I think mberends point is that we don't need "all that".
DanielC mberends: So, for example, you envision SMOP compiling C to PBC to access the modules? 10:02
10:02 ejs left
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.
mberends DanielC: I don't know about SMOP, but Parrot based languages interoperate 10:03
DanielC I was thinking about alternate Perl 6 implementations (SMOP, Pugs). 10:04
I don't know if sharing modules with those is a goal.
mberends they would have to interoperate outside of the Parrot VM
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
mberends sharing modules as source code is fine
masak uurgh. ETOOMUCHMONDAY. will backlog this interesting discussion later. :)
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:07
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:08
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.
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
But I don't envisage them being binary compatible
DanielC Source compatible ++
mberends *nod* 10:11
Matt-W obviously less compatible is a C binding that's written in PIR
SMOP's not going to be importing the opengl bindings from Parrot...
DanielC Does anyone know anything about DB design? I don't. What's wrong with Berkeley DB anyways? 10:12
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.
Matt-W Berkeley DB has some nice characteristics
like not requiring a server running
but you get that with SQLite as well
DanielC y
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:14
10:15 snarkyboojum left
mberends I would like a new, original purpose built librarian even more :) 10:16
Matt-W why?
mberends SQL would be at least a 2:1 performance hit, probably much worse
DanielC BerkeleyDB 10:17
antiphase Which of the 10 versions?
DanielC antiphase: Your favourite.
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
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
masak: the code review awaits :)
DanielC Does anyone here know how to design a DBM? 10:20
Matt-W And do they want to?
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.
mberends DanielC: a DBM may be a bit overkill for this job. But yes, I could design one :)
10:21 ruoso left, iblechbot left
DanielC ok 10:21
mberends DanielC: what fits the requirements is something like ar, or zip
but complression may be counterproductive
*comp 10:22
DanielC You want to put *every* module in one big huge zip file?
Btw, a good property of zip is that you can extract an individual file, unlike tar.
mberends the "installed" ones. there will be local dirs and files for local work.
dakkar uh… isn't that called "jar"?
DanielC dakkar: ? 10:23
mberends dakkar: that's close, but would not support :ver and :auth
dakkar DanielC: the Java way of keeping installed libraries in the filesystem, by stuffing them into a zip file
mberends: true
jnthn mberends: I worry a bit about putting every module into one file.
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.
jnthn That wins us sharing between processes - they don't all need to have their own copy of the bytecode in memory.
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"
mberends :(
DanielC decides to leave this question to jnthn an mberends 10:26
Matt-W jnthn: that would be nice
jnthn Ah, you're thinking more of being able to mash together a load of PBCs into one file?
mberends jnthn: yes
jnthn That's going to get you some Parrot guts hacking to do if it's going to work, I suspect.
Though nothing too major.
10:26 payload joined
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
(many files)--
DanielC Can someone explain the part about smashing together PBCs? 10:28
mberends 'smash' is a new technical term for 'store together'
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.
masak mistake?
mberends zip, without compression , with more metadata
jnthn Yes.
DanielC ok
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.
DanielC So we can, for example, use the directory layout we talked about, but put it inside an un-compressed zip.
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
antiphase Networks are fast these days
mberends jnthn: does mmap have to align to certain address boundaries?
Matt-W antiphase: can always compress them for distribution and expand on install
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?
DanielC mberends: Does zip have a size limit? I thought it didn't.
mberends DanielC: it does, because of binary size and address fields
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.
mberends DanielC: the sizes are plenty big for now, but "nobody needs more than 640K"
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.
mberends: ok
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.
I hate mysterious binary formats. 10:35
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.
mberends DanielC: indeed
maybe binary at the front, then offsets to binary PBC content at the back 10:37
*text at the front, sorry
DanielC reads the man page for "ar" 10:38
mberends .deb packages are based on ar, not tar 10:39
DanielC .deb packages are two .tgz files inside an "ar". 10:40
control.tgz and I forget the other one.
mberends so, ar and tar
DanielC y
10:41 Molaf joined
mberends too compicated to write in PIR 10:41
*complicated
DanielC It seems unnecessary too.
I imagine that they picked .tgz to reduce bandwidth. But that's not a problem we need to worry about.
mberends agreed 10:42
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:45
10:46 payload left
DanielC I just scanned through the "ar" man page. It looks good. It seems to be designed for the things we want. 10:46
"ar archives are most often used as libraries holding commonly needed subroutines"
mberends how would :ver and :auth be represented? name mangling? 10:47
DanielC Insert a file called META.yml
You only need to extract META.yml if the user actually specifies an :auth, which should be uncommon. 10:48
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?
DanielC I don't know PIR. Did I suggest something hard to do? 10:51
My suggestions will often be dumb the first time they come out :)
mberends I'm planning to learn PIR. It's somewhere between Perl and assembler. I t would be hard for me :) 10:52
DanielC Ok. I sort of assumed that everyone here would be a PIR expert :-) 10:53
Btw, why does it have to be PIR? Why not Perl 6?
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...
mberends :) there's a recursive dependency that needs to bottom out 10:55
you could write it in Perl 6, compile to PIR, and then finish the job in PIR 10:56
s/it/META.yml handler/
DanielC The meta format could be something fairly simple. For example, say every package gets 4 lines: package name, version, author and directory location.
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
DanielC I would have like ar compatibility, to make the archive hackable. 10:58
mberends I would not like the extra effort required 10:59
DanielC ok
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
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
mberends searches his debian package list for 'ar' 11:03
mberends gets ETOOMANYPACKAGES 11:04
it might be libarchive1, but 'ar' is not named in the description while 'tar' is 11:06
DanielC afk 11:07
11:09 rjh_ joined
mberends libarchive1 is not installed, ar is, so that library is not the one 11:09
11:09 jferrero joined 11:13 payload joined, clintongormley joined 11:15 Su-Shee joined
Su-Shee hi. 11:15
mberends the debian binutils package contains ar and depends only on libc6, so a separate ar library does not exist 11:19
Su-Shee: hi
11:20 donaldh left
mberends rakudo: say ~Time.gmtime 11:20
p6eval rakudo 5f70a6: OUTPUT«2009-06-08T11:20:52+0000␤»
11:21 donaldh joined
Su-Shee mberends: a time module? 11:22
mberends just added a few days ago 11:23
Su-Shee within rakudo or something separate in git?
mberends within rakudo, according to S32-Temporal.pod 11:24
masak mberends++
that rocks.
Su-Shee ui, have to update.
mberends rakudo: say Time.gmtime.date.day-name
p6eval rakudo 5f70a6: OUTPUT«Monday␤»
masak see if we can use it in November somehow.
mberends rakudo: say Time.gmtime.date.month-name
p6eval rakudo 5f70a6: OUTPUT«June␤»
mberends masak: no, you'll have to wait 5 more months ;) 11:25
masak phthp. :)
Su-Shee and then its output will always be christmas? ;)
mberends always 11:26
Su-Shee well, with perl6 it's always christmas.. ;)
mberends rakudo: say ~Time.gmtime.time
p6eval rakudo 5f70a6: OUTPUT«11:26:24␤»
11:27 om454545445 joined
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.
mberends we're too nice
masak yes, we're just such nice chaps, all of us.
Su-Shee I've always found perl communities very laid-back, relaxed and somewhat hippie-esk and very women-friendly. 11:29
masak aye.
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:30
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.
DanielC mberends: Maybe we don't need to mangle the :auth at all, since the file will be inside an "ar" anyways. 11:32
mberends: Just put the module in "Foo-Bar-v1.2.0-Jose Pequeño" or whatever.
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.
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.
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
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.
DanielC mberends: ok
Su-Shee masak: there's always some I'm the cooler perl hacker than you are, but that's nothing to worry about.
masak Su-Shee: I believe you. and I'm glad you like the community.
11:35 Jaaap joined
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:37
Jaaap In a Grammar, how can i make something like 11:38
token comparison { <variable> [ <operator> <variable> ]* {*} };
11:38 om454545445 left
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?
masak Jaaap: looks like you want <variable> ** <operator>
Jaaap If i parse 3 + 4 it only parses the variable 3, then moves on.
masak: what does the ** do? 11:39
masak Jaaap: repetition. S05 explains it quite well.
Jaaap cool thx
masak mberends: we need to write that web-based grammar debugger RSN! and call it 'context' :) 11:40
mberends: maybe we should decide a time for a hackathon for that.
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).
mberends yeah, better than 'mausoleum'
masak mberends: :P
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.
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".
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.
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?
masak mberends: I rejected cars and dinosaurs when I was little. I liked dolls, though.
Jaaap: no, I don't think so. I'll have a shot at explaining. 11:44
mberends I liked bits of wood and nails
viklund masak: there's always exceptions ;)
mberends I still like bits of wood and nails 11:45
masak Jaaap: \d+ ** '.' means "as many numbers as possible, separated by single dots"
Jaaap ph
i mean oh.
like that
viklund this is fun:
Su-Shee it seems like the arduino platform is massively attracting women and girls.
viklund rakudo: my $s=****; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«4␤»
viklund rakudo: my $s=***; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«Statement not terminated properly at line 2, near "**; say $s"␤in Main (src/gen_setting.pm:0)␤»
Jaaap masak: i'm gonna try it. thx. 11:46
viklund rakudo: my $s=** *; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«4␤»
viklund rakudo: my $s=******; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«Statement not terminated properly at line 2, near "**; say $s"␤in Main (src/gen_setting.pm:0)␤»
viklund rakudo: my $s=* ** ** *; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«8␤»
viklund rakudo: my $s=*******; say $s(2)
p6eval rakudo 5f70a6: OUTPUT«16␤»
viklund I wonder how that parses
11:47 om454545445 joined
masak viklund: you're evil, you know that? :) 11:47
viklund sometimes rakudo sees times and sometimes raised to
clintongormley there was an article on new scientist about how monkeys preference for 'toys' varied with gender: www.newscientist.com/article/dn1359...-toys.html
viklund after a while it seems to only be multiplication 11:48
masak viklund: ((* * *) * *) * *
proabbly.
11:49 xomas is now known as Xomas
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:49
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?
Jaaap nopaste?
masak here, for example: gist.github.com/ 11:51
Jaaap: 'nopaste' is an IRC term for 'instead of pasting it directly to the channel, paste it to a site and give the URL'
viklund masak: *** -> parse fail, * * * -> parses, **** -> (* ** *) but ****** -> parsefail and ******* -> * * * * * * * 11:52
Jaaap masak: gist.github.com/125772
viklund My guess would be that ****** -> * ** ** *, but no
masak viklund: that's... just sick. :)
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 * ** * ** * ** *
Jaaap masak: lemme try
masak Jaaap: (I see you have a lot of 'token' and almost no 'rule')
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
viklund masak: I might 11:54
now it's lunchtime here
masak Jaaap: well, without rule you'd have to specify whitespace explicitly.
Jaaap masak: the string thingy doesn seem to work atm 11:57
masak Jaaap: ok, that was a bit vague. :)
Jaaap what was?
11:57 mizioumt joined
masak Jaaap: 'the string thingy'. I don't know what you refer to. 11:58
Jaaap that was in reference to "have you tried to match on a string that contains no whitespace?" 11:59
11:59 lichtkind joined
masak ok. 11:59
lichtkind mberends: ah you were active :) i seen that tablet are over 3 years old :)
masak Jaaap: and removing the whitespace didn't help, that's what you're saying? 12:00
12:00 om454545445 left
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.
Jaaap: that seems to be what your grammar matches at present.
Jaaap: since you don't use 'rule' and don't explicitly specify whitespace matching.
Jaaap that's it! Man i am an idiot. Thx a lot. 12:02
me = st00pid
masak Jaaap: please don't call people idiots. :) you're welcome.
Jaaap not even myself? ;-)
masak Jaaap: especially not yourself. :)
Jaaap lol
12:08 alester left
rjh_ masak: why? 12:10
masak rjh_: why not call onself an idiot?
rjh_ pretty much 12:11
12:11 Jaaap left
masak rjh_: because (without getting all new-agey) I believe self-image is affected by such things. 12:11
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.
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
I can't shield myself from all criticism
DanielC mberends: code.google.com/p/libarchive/ <-- A BSD library that supports various archive formats including ar.
masak rjh_: recognising that one has done something idiotic, and using that recognition to improve is, of course, beneficial. 12:14
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?
masak absolutely.
rjh_ I can see that
masak I'm very convincing. :)
so are most people, when talking to themselves, I think.
rjh_ self-talk is known to be very powerful, yes 12:18
I've noticed this channel is very positive
12:18 windsok^ joined
masak aye. 12:18
rjh_ No personal attacks, constructive criticism, people debate rather than argue 12:19
Something of a rarity for IRC
masak indeed.
I've been here since 2005. it's been like that all that time.
#perl6 is an oasis among IRC channels.
rjh_ Takes a certain kind of person to follow progress on #perl6, half the world think the language isn't even in development
Fools! 12:20
masak :)
rjh_ Oh sorry, shouldn't call people fools :)
masak they simply don't know any better.
it's our duty to educate them!
12:20 donaldh left, kidd_ joined, donaldh joined
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.
rjh_: not saying "Perl 6 is ready!" but saying "Perl 6 is very usable today! Try it out!" 12:22
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.
rjh_ Key factors are speed, bugs and incomplete implementation 12:23
masak aye.
rjh_ If I didn't warn people about the speed, they might be disappointed
masak indeed.
DanielC @tell mberends code.google.com/p/libarchive/ <-- supports "ar".
lambdabot Consider it noted.
rjh_ Do you happen to know the current status of DBI for perl 6? 12:24
12:24 agentzh left
rjh_ Last I heard, it was aimed at Parrot and emulated the JDBC 12:24
12:24 azawawi joined
azawawi hello 12:25
masak rjh_: haven't heard much lately, no.
12:25 alester joined
masak rjh_: this is the last I heard: perlbuzz.com/2008/12/database-acces...icely.html 12:25
Su-Shee it's in the parrot-tree. 12:26
somewhat hidden. ;)
rjh_ ah, thank you
azawawi hmmm
Su-Shee in ext/ 12:27
rjh_ I see, parrot can interact with object libraries 12:30
It might be fun to base off this work and support MySQL and Postgres
masak rjh_: yes, please :) 12:31
Su-Shee the parrot-rakudo-module-library-entanglement is still some mystery to me.
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 donaldh left, kidd_ left
masak azawawi: 'off'? 12:33
12:33 donaldh joined
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
masak azawawi: I'm confused, as you maybe can tell. 12:35
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.
(mberends is on it)
azawawi masak: no we havent. how r u btw? :)
masak azawawi: I'm confused, thanks for asking. :) 12:37
azawawi masak: any updates on november? 12:38
masak azawawi: actually, yes. viklund++ did a lot of bugfixing over the weekend.
azawawi: we now have lichtkind as a tester/user of the web site.
azawawi masak: cool 12:39
masak: so how can i help out?
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
masak azawawi: try to crash the program. you _will_ succeed, if you put your mind to it. 12:40
azawawi: report the crash as a bug. 12:41
Su-Shee wish me luck, I'm applying for a perl job now. ;)
masak Su-Shee: good luck! 12:42
rjh_ yes, good luck 12:44
and make sure the company is following PBP
;)
12:45 viklund left, alester left
masak or at least some WTOP. 12:46
12:46 donaldh left
Su-Shee well at least it's not the usal web stuff. :) 12:46
12:47 donaldh joined, payload left 12:48 barney joined
rjh_ looked wtop up on github and is confused ;/ 12:49
hmm, looks like Microsoft's DLR is stepping on Parrot's toes a bit.
masak rjh_: sorry about that confusion. :) been meaning to flesh out that project for quite some time now. 12:50
rjh_ doing a perlcritic for rakudo will be awesome because we can (presumably) use the real perl 6 parser instead of PPI 12:52
masak rjh_: yes. 12:53
rjh_: pmichaud++ has been helping in making that more possible in the past week.
12:56 FurnaceBoy joined 13:00 azawawi left 13:04 rjh_ is now known as rjh, Jedai left
masak if someone would create a Rakudo wrapper for Parrot's curses library, that'd be swell. 13:05
13:05 Jedai joined
rjh masak: I'd like to write a roguelike in perl 6 someday, so I could take a look 13:05
masak rjh: funny, I was just reading this when I said that: www.gamasutra.com/view/feature/4013...__you_.php 13:06
:)
13:08 donaldh left, donaldh joined
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:10 donaldh left 13:14 pmurias joined 13:25 davidad left
masak about time someone wrote that Perl 6 wrapper, I'd say! :) 13:25
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.
pmurias: I'd be perfectly happy being shown a way to use it directly from Perl 6 code. 13:27
(without inlining PIR, that is)
13:28 davidad joined 13:29 cls_bsd left, ruoso joined
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
masak jnthn: sounds promising.
ruoso pmurias, hi...
13:31 synth joined
pmurias ruoso: could you look at re-mildew/t/multi.t 13:31
ruoso svn updat'ing
masak rakudo: sub foo { return }; say foo.WHAT; say ?(foo ~~ Nil) 13:32
p6eval rakudo 5f70a6: OUTPUT«Nil()␤0␤» 13:33
ruoso pmurias, I don't think "int" is a role 13:35
they are native types
and the compiler can know it
TimToady, can the compiler presume native type names? 13:36
I think it can... but... better be sure...
pmurias ruoso: i just intended int to be any kind of object with an ACCEPT method 13:37
ruoso I see... but "int" is really an exception, as so is every native type 13:38
13:38 Jedai left
ruoso pmurias, but anyway... that test looks great... I'm amazed in how far we're going in so few time 13:39
pmurias, but maybe it's easier to implement the native types as roles at this point... 13:40
13:40 payload1 left
ruoso (which seems to be what you're suggesting) 13:40
13:42 sri_kraih joined
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.
mberends lambdabot: yes, I backscrolled :) 13:43
DanielC mberends: ok
mberends: Of course, the libarchive idea assumes that we have C bindings. Does Rakudo have C bindings? 13:44
mberends DanielC: via the minor hurdle of Native Call Interface (NCI) 13:45
DanielC k
mberends sorry, afk for a bit over an hour
jnthn Also, it relies on libarchive being available/running everywhere that we want to run Rakudo.
pmurias ruoso: i don't depend on the type being a role anything with an ACCEPTS methods will do
masak Rakudo doesn't support '=begin SUMMARY' Pod syntax!? 13:47
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"
p6eval rakudo 5f70a6: OUTPUT«OH HAI␤»
masak hm.
rakudo: role A;␤=begin SUMMARY␤This be a summary.␤=end SUMMARY␤say "OH HAI"
p6eval rakudo 5f70a6: OUTPUT«Unable to parse role definition at line 2, near ";\n=begin S"␤in Main (src/gen_setting.pm:1452)␤»
masak ah. there we go.
masak submits rakudobug
DanielC jnthn / mberends: Do you think that the final archive format needs to support Unix groups + permissions? 13:51
Of course, the format is easier to make if it doesn't have to preserve those things. 13:52
pmichaud good morning, #perl6
DanielC moin
jnthn DanielC: Unlikely given they're only relevant to some of the target platforms.
pmichaud: morning
DanielC jnthn: thanks
13:53 estrabd joined
masak my Rakudo returns 0 (success) when encountering syntax errors. could anyone confirm this? 13:58
jnthn yes, I noticed that one too. bug.
think already ticketed.
masak it's very bad. :( 13:59
it screws up make.
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
clkao /win 27 14:01
masak 27 windows? wow.
mberends DanielC: (back) no, the permissions will probably be controlled by the administrator who also installs Perl 6
DanielC k 14:02
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. :)
oh, hasty. sorry. :P
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.
mberends: maybe do those at the same time.
mberends tasty hack ?
masak
.oO( cut-n-pasty hack )
14:05
mberends masak: the Daemon is refactored and working at gitorious.org/http-daemon
masak mberends: ooh!
mberends++
mberends also japhb++ for numerous tweaks and patches 14:10
14:10 alester joined
masak yes, I notice. cool. 14:12
rjh help! 14:13
rt.perl.org/rt3/Public/Bug/Display.html?id=61618 contains a patch for various Range functionality 14:14
it's written in parrot, but I notice that most of the rakudo Range code is in perl 6 now...?
masak rjh: is that your question? 14:16
looks more like a statement...
rjh Has the Range code moved from parrot to the setting 14:17
Rendering that patch obsolete
masak that seems likely.
rjh question mark
masak full stop.
rjh That's a shame
masak shame happens. 14:18
14:18 PacoLinux joined
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?
pmichaud previously there wasn't a setting.
rjh okay 14:19
pmichaud that's only existed since feb or mar
rjh So, is it preferable to move code from PIR to Perl 6 where possible? 14:20
pmichaud yes. 14:21
the exceptions are
(1) where we need to keep the PIR for speed reasons
(2) where something has to be in the stage-1 compiler in order to compile the setting
(end) 14:22
rjh I see, thanks 14:23
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:28
ISTR there was a spec change to allow exactly that. 14:29
pmichaud I know it came up for discussion; I didn't see the spec change. 14:30
let me see if STD.pm changed, though
(Rakudo followed STD.pm more than the spec, there.)
dalek kudo: 5c065e0 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 399 files, 11428 passing, 0 failing
14:31
pmichaud std: use Foo; module Bar; say 'ok!'; 14:33
p6eval std 27032: OUTPUT«ok 00:02 35m␤»
14:33 [particle] left
pmichaud std: say 'ok'; module Bar; say 'ok!'; 14:33
p6eval std 27032: OUTPUT«ok 00:02 35m␤»
masak oh, STD.pm is very permissive.
14:33 [particle] joined
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:␤------> k'; module Bar; say 'ok!'; module Foo; say 'no!';␤ expecting any of:␤ trait␤ whitespace␤FAILED 00:02 35m␤»
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.
maybe that's sane.
better than to whitelist things, to be sure.
pmichaud it definitely contradicts S11, though.
masak yes.
masak files a specbug 14:36
TimToady I think the S11 statement is aimed more at making it possible to recognize P5 vs P6 14:37
whereas STD is assuming P6 from the start
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
masak oh. I should have looked at what S11 says before talking. :) 14:39
so, there's no conflict in the spec, or between STD.pm and the spec? 14:40
in that case, all that remains is a Rakudobug.
TimToady perl6 file can assume Perl 6 from the start. perl file can't
but I don't know if we'll every persuade the P5 community to let the "perl" executable do that... 14:41
*ever
for now we can assume we know the file is p6
masak ok.
TimToady the other is just a wrapper anyway
pmichaud can we just remove that line from S11, then? 14:44
"The first form is allowed only as the first statement in the file." 14:45
14:45 [particle]1 joined
TimToady I suppose, or at least weaken it to a possible restriction imposed by autorecognition someday 14:46
literal alester: ping 14:47
alester yes?
literal wondering about having you merge my vim-perl changes 14:48
alester Whoa re yOU?
14:48 cls_bsd joined
alester Who are you? 14:48
And what are you wondering?
literal Hinrik
I see you added indent/perl.vim, so there will probably be some merge conflicts...
alester ok
I haven't looked at any of that, but I suspect I'll incorporate most of what others have done.
others = not me. 14:49
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
14:50 payload joined
alester I don't think you can get a commit bit in the git model. 14:50
or maybe I misunderstand the model
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
then I can push to it
alester Let me get initial merging working before I even think about any of that. 14:52
literal alright then 14:53
ruoso later & 14:58
14:58 ruoso left
rjh wonders what is needed to have :by(...) on Range objects 14:58
14:59 [particle] left, estebann_ joined
masak rjh: operator adverbs. that's task A in the ROADMAP. 15:01
says it'll happen this summer.
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.
but I'll update the spec. Rakudo to be updated shortly thereafter. 15:02
rjh masak: adverbs for methods are in, right?
seem to be
pmurias pmichaud: if rakduo is called as rakudo it assumes the file is perl6
s/assumes/should assume
pmichaud pmurias: yes. 15:04
Rakudo was simply following the literal interpretation of the spec.
rjh: note that Ranges are likely to undergo a significant refactor soon. 15:05
The postcircumfix:<[ ]> work I did over the weekend was the precursor to fixing Range.
rjh pmichaud: I thought there might be some overlap with lazy lists
pmichaud There is.
Also, the Range spec changed during NPW; Rakudo needs to catch up with that. 15:06
15:07 nihiliad joined
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
pmichaud is that a change from what exists today? 15:10
iirc, the current implementation had adverbs on whatever was the top operator in the stack, or something like that.
15:11 lee__ joined, lee__ is now known as leedo 15:12 hv2 joined
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.
hv2 I was searching for tests of the :t filetest (is a tty), and couldn't find any. 15:14
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.
pmichaud better still is to fix the bug and commit :-)
er, fix the spectest and commit :-) 15:16
commitbits are readily available for spectests
masak hv2: t/spec/S16-filehandles/filetest.t seems to be it.
hv2 masak: no ref to ':t' in there. 15:17
masak correct.
hv2 pm: I'm in no rush to add tests for something I don't know how to use, just yet ...
masak guess nobody thought to write such a test yet.
did I mention the spectest is incomplete? :) 15:18
s/test/test suite/
15:18 justatheory joined
pmichaud hv2: good reasoning. Anyway, sending a note to [email@hidden.address] should get it into RT, where someone can take a look at it. 15:18
hv2 Heh, I didn't mean to suggest otherwise.
Ok, will do.
Can you confirm it isn't supported in Rakudo yet?
pmichaud Yes.
hv2 Thanks. 15:19
pmichaud rakudo: say ?('perl6' ~~ :e)
p6eval rakudo 5c065e: OUTPUT«1␤»
pmichaud rakudo: say ?('perl6' ~~ :t)
p6eval rakudo 5c065e: OUTPUT«Method ':t' not found for invocant of class 'Str'␤»
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
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:21
pmichaud Tene: that doesn't fit my mental model, for some reason. 15:22
In particular, I think that "use Foo:from<parrot>" ought to give me a plain ['perl6';'Foo']
Tene pmichaud: Just an idle thought while waking. Nothing more. 15:23
Okay.
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:27
pugs_svn r27034 | lwall++ | [S03] reduce prececedence of adverbs from inside comma to inside item_assignment 15:28
rjh @karma lwall
lambdabot lwall has a karma of 355
rjh @karma TimToady
lambdabot TimToady has a karma of 49
pmichaud would have to do it via PIR
we don't have inline C
hv2 Hmm ok, I'll skip it for now then. 15:29
Back to see if I have better luck with line 10 of my translation. :)
pmichaud looks like isatty is already available for Parrot FileHandle objects, though.
so...
masak hv2: check out src/builtins/any-str.pir and you'll see examples: :e, :f, :d... 15:30
hv2 cool, thanks
pmichaud yes, but I think hv2 is looking for it on an existing filehandle
TimToady pmichaud: yes and no, adverbs in STD adjust the top of the term stack, but only after reducing operators tighter than the adverb
pmichaud as opposed to a tring 15:31
*string
masak oh.
hv2 $*IN, $*OUT, in fact
masak ok, then my reference is of little help.
pmichaud and is :t defined in the spec?
mberends hv2: it may help that parrot has a stat() function
hv2 I only see it in S30/IO.pod
pmichaud actually, it's just $!PIO.isatty 15:32
so it can actually be done in setting, I think, depending on what it's to be called
for example, the following would work
method isatty() { ?$!PIO.isatty; }
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 =
pmichaud then one could do $*IN.isatty 15:33
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
i.e., perhaps better is simply a method on filehandles
masak ...and a method on Str which always returns False...? 15:36
15:36 cj left
pmichaud maybe. In perl 5, I think -t only works on filehandles. 15:37
rjh yes, -t fails even for "-"
masak fair enough. 15:38
pugs_svn r27035 | lwall++ | [S03] slight clarifications to previous adverbial changes
15:40 finanalyst left 15:45 pyrimidine joined
pmichaud TimToady: is STD.pm consistent with the recent spec changes on adverbs? 15:46
or is that yet-to-come ?
TimToady I believe it's correct currently
pmichaud okay, great. Thanks.
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
was too hard to manage the AST otherwise
pmichaud yes, I'm thinking that's now possible. 15:48
which is a plus.
TimToady spent far too much of the weekend just trying to get viv to translate %x{$y}:delete to delete $x{$y}
because of AST misattachments 15:49
pmichaud that was somewhat of the difficulty I was envisioning with the old way, yes.
This way seems much more straightforward.
TimToady now I'm trying to figure out why the "then" part of my if looses its AST when I add an else :(
a bug in Cursor, I think 15:50
hv2 Confirm: multi method isatty() { ?$!PIO.isatty; } appears to do the right thing.
TimToady actually, losing its .caps, not the ast itself 15:51
15:51 pyrimidine_ joined
TimToady but ast is generated from caps by default 15:51
(in viv)
pmichaud hv2: excellent!
TimToady since most of the "making" hangs off of an AUTOLOAD
(where rakudo currently has the make calls all hardwired) 15:53
(but I presume rakudo can also become more generic that way, someday)
pmichaud yes, I presume so also. 15:54
autoload hasn't been well-thought-out in parrot, afaict 15:55
I mean, some of the hooks are there, but someone has to implement it :-)
15:55 cj joined
jnthn What do we need for autoload? 15:56
OMGZ NO METHOD! And then call it instead?
pmichaud yes, somethinglike that
jnthn oh, that's probably quite easy when we have a custom dispatcher. ;-) 15:57
s/when/given/
pmichaud Yes. Now if only we had a cus... oh, wait! :-)
jnthn Is it spec'd?
pmichaud autoload?
jnthn yes 15:58
Which synopsis?
pmichaud S10 and S12
S10, heading "Autoloading"
jnthn didn't remember seeing it in S12..
pmichaud autoloading is briefly mentioned along with CANDO
(in S12)
16:00 dakkar left 16:01 payload left
rjh jnthn: when's your next blog entry coming out? :) 16:02
jnthn rjh: Hoping to get one written today.
Got a few that I want to write. 16:03
And want to try and do them before I go on vacation.
rjh I have no idea why you're not aggregated on planet perl 6
jnthn I'm not? Heh. 16:04
rjh since your work is so integral to the development
...of perl 6
jnthn I thought that I was aggregated thre.
*there
rjh planetsix.perl.org/ ?
jnthn Yeah
rjh You're not there! 16:05
jnthn doh
So, anyone know how to add me there?
obra_ jnthn: um. I _used_ to be able to 16:07
let me see if I still have the bits
jnthn I scribble at use.perl.org/~JonathanWorthington/journal/
jnthn afk for a little bit 16:09
obra_ While I'm here, what other feeds should end up on planetsix? 16:11
16:12 pyrimidine left
Tene I don't think I'm on planet perl six either. 16:12
dunno if I should be
obra_ do you blog about perl 6? 16:14
Tene pmichaud: ETA on S11 review?
obra_ if so, give me an rss/atom feed url that has content not just titles and the name you should be under
is there a way to get an atom feed of changes only tto docs/Perl6/spec?
Tene blogs.gurulabs.com/cgi-bin/mt-searc...i?tag=Perl 6&Template=feed&IncludeBlogs=13&limit=20 16:15
blogs.gurulabs.com/cgi-bin/mt-searc...p;limit=20
obra_ Was gonna say ;)
16:16 pyrimidine_ is now known as pyrimidine
obra_ ok. 5 more minutes then I commit 16:17
anyone else who has a p6 blog that they think is of general interest.
Tene is masak there?
masak he is. 16:18
I got added sometime in November, when I was bloggin daily.
Tene hi masak :)
masak oh hai.
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.
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.
antiphase++
16:20 hanekomu left
Tene can we actually introspect a match object in rakudo now? 16:20
And can we run STD.pm from rakudo? 16:21
masak Tene: no, and no. :/
would appreciate help with that, too, if you know how.
16:21 mizioumt1 joined
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:21
masak pmichaud++ brought us part-way there, by enabling Perl6::Grammar.parse in Rakudo. 16:22
Tene: sure.
Tene my $templatesub = eval($template, :lang<hitomi>); say $templatesub(...);
something kinda like that? 16:23
masak hm, maybe.
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...
use Masaks::Cool::Template:from<hitomi>; Masaks::Cool::Template.render(...); 16:25
I can do that (or variants).
masak yes, something like that.
I'll send an email.
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.
p6eval rakudo 5c065e: OUTPUT«Null PMC access in isa()␤in Main (/tmp/ZjSWMyvvHY:2)␤»
masak submits rakudobug
Tene: yes, I'll need to look into that myself, but that's likely a good thing. :)
Tene masak: idea for a Perl 6 irc bot: submit rakudobugs straight from IRC. 16:27
you like?
masak Tene: there's often a bit of editing going on too. :)
Tene Bah. Just have it paste the last n lines of the log into the email. 16:28
!rakudobug 20
16:28 hanekomu joined 16:29 viklund joined, payload joined
masak have to run now. 16:29
16:29 Psyche^ joined, masak left 16:30 Scorp1us is now known as QLabel, QLabel is now known as Scorp1us 16:33 pmurias left 16:37 barney left, barney joined 16:40 mizioumt left 16:42 jferrero left 16:45 Patterner left, Psyche^ is now known as Patterner
hv2 Hmm, S09-autovivification\/autovivification doesn't get run by 'make spectest', is that intentional? 16:49
jnthn Is it in t/spectest.data? 16:54
hv2 ah, no
Should it be? 16:55
jnthn Depends if we pass any of it.
No point running a test we will entirely fail. :-)
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.
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. :)
jnthn Yeah, there's two levels. :-) 16:57
t/spectest.data is a whitelist of files to run.
#?rakudo directives in files blacklist tests not to run within that file.
jnthn -> cooking
16:58 meppl left
hv2 Good point, time to go find some dinner. 16:58
16:58 hv2 is now known as hv2_ 17:01 Mahen23 joined
Mahen23 as u said 17:01
how is perl6 going
is it code complete yet?
DanielC Mahen23: It is usable for a lot of simple programs, but it is not code complete. 17:02
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 pyrimidine left, Mahen23 left 17:16 cwilson joined 17:17 payload left, payload joined
cwilson hm. perl6 newbie here, compiled the latest rakudo-2009-05 (macosx), trying to run svn.pugscode.org/pugs//examples/alg...ization.pl 17:18
./perl6 fib.pl
Malformed routine definition at line 8, near "fib (UInt "
in Main (src/gen_setting.pm:0)
?
17:19 barney left
viklund hmm 17:19
cwilson: I don't think UInt is a type in rakudo, I changed that to Int but got another error-message 17:21
(elements() not implemented for class Integer)
cwilson: Ok, I'll paste a working version 17:24
pasteling "viklund" at 130.243.195.243 pasted "fibonacci_memoization.pl" (11 lines, 242B) at sial.org/pbot/37120 17:25
viklund cwilson: there you go
mberends viklund: you beat me to it :) 17:26
viklund ;)
but I wonder if there's a bug here somewhere 17:27
17:28 windsok^ left
viklund std: (state @s=3,4,5)[1] //= 22 17:28
p6eval std 27035: OUTPUT«ok 00:02 37m␤»
viklund rakudo: (state @s=3,4,5)[1] //= 22
p6eval rakudo 5c065e: OUTPUT«elements() not implemented in class 'Integer'␤in Main (/tmp/q5YGPjP8xg:2)␤»
viklund rakudo: (my @s=3,4,5)[1] //= 22 17:29
p6eval rakudo 5c065e: ( no output )
viklund rakudo: (my @s=3,4,5)[1] //= 22;
p6eval rakudo 5c065e: ( no output )
viklund rakudo: (my @s=3,4,5)[1] //= 22;say @s.perl
p6eval rakudo 5c065e: OUTPUT«[3, 4, 5]␤»
viklund rakudo: (my @s=3,4,5)[4] //= 22;say @s.perl
p6eval rakudo 5c065e: OUTPUT«[3, 4, 5, undef, 22]␤»
viklund std: (my @s=3,4,5)[4] //= 22;say @s.perl
p6eval std 27035: OUTPUT«ok 00:02 38m␤»
viklund rakudo: (state @s=3,4,5)[4] //= 22;say @s.perl
p6eval rakudo 5c065e: OUTPUT«elements() not implemented in class 'Integer'␤in Main (/tmp/HiLgg9G2Hf:2)␤»
viklund state bug?
mberends looks like it 17:30
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␤»
mberends rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(10).say
p6eval rakudo 5c065e: OUTPUT«55␤»
viklund \o/
mberends rakudo: sub fib($n){state @seen=0,1,1;@seen[$n] //= fib($n-1)+fib($n-2)}; fib(42).say
p6eval rakudo 5c065e: OUTPUT«267914296␤»
DanielC mberends: daniel.carrera.bz/_2009/perl/storage-format.html <-- Just an idea. 17:34
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␤»
viklund nice try
rjh runs it at home 17:36
are you kidding me? rakudo has a maximum recursion depth?!
dalek kudo: dbebac0 | pmichaud++ | src/parser/grammar.pg:
Update "module Foo;" to allow statements before it.
17:43
viklund rakudo: (my @a)[0] //= 1; @a.perl.say 17:44
p6eval rakudo 5c065e: OUTPUT«[1]␤»
viklund rakudo: (my @a)[2] //= 1; @a.perl.say
p6eval rakudo 5c065e: OUTPUT«[undef, undef, 1]␤»
viklund hmm
bug sent... 17:49
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
:)
viklund perhaps, I guess it depends on the type of bugs 17:51
FurnaceBoy maybe bug objects and tasks. 17:52
Room Dirty. Deadline: Monday.
Homework.
viklund I was more thinking along the lines "Child wakes up at 4 in the morning, requesting food"... 17:53
17:53 pyrimidine joined, Molaf left, Molaf joined
FurnaceBoy viklund yeah i think these things are basically unfixable, they generally fix themselves over time. 17:54
viklund there's no specific action you can take to stop this happening
you just have to wait :)
plus, it's not a defect, it's a normal part of the process 17:55
(most people get blindsided by it regardless)
viklund ;) 17:56
pmichaud rakudo doesn't have a maximum recursion depth, but Parrot does. 17:59
raudo: (my @s = 3,4,5).perl.say;
rakudo: (my @s = 3,4,5).perl.say;
p6eval rakudo dbebac: OUTPUT«[3, 4, 5]␤»
pmichaud rakudo: (my @s = 3,4,5)[1].perl.say;
p6eval rakudo dbebac: OUTPUT«4␤»
pmichaud rakudo: (my @s = 3,4,5)[1] // = 3; 18:00
p6eval rakudo dbebac: ( no output )
pmichaud rakudo: (my @s = 3,4,5)[1] //= 3;
p6eval rakudo dbebac: ( no output )
pmichaud rakudo: (my @s = 3,4,5)[1] //= 3; @s[1].say;
p6eval rakudo dbebac: OUTPUT«4␤»
Muixirt what is //= anyway? 18:01
Gothmog_ like ||=, but tests if the left side is defined rather than true 18:02
Muixirt where is it specced? 18:03
pmichaud S03, probably.
look for //
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:05
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.
rjh it can presumably be turned off
pyrimidine what is the max recursion depth?
(what is it set to?) 18:07
rjh 10000 18:08
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").
jnthn rjh: I thought 1000
DanielC mberends: The two-file format is simpler, and it's easier to hack (e.g. we can make a prototype more easily).
rjh jhthn: you're correct (10000 is for yacc :/) 18:10
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:11
mberends DanielC: agreed for ease of implementation, although the risk of content inconsistency is a little higher. An acceptable tradeoff. 18:12
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
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;
p6eval rakudo dbebac: OUTPUT«meep!␤meep!␤meep!␤meep!␤»
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;
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;
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)␤»
pyrimidine grr...
pmichaud I understand the need for the package list -- why the second file?
rjh fib(10000) is apparently Inf
jnthn pyrimidine: Array doesn't yet take type parameters.
pyrimidine I thought so
jnthn pyrimidine: For now, use Positional of Beaker.
pmichaud jnthn: actually, I think that my @a; doesn't build an array that is "of Beaker"
i.e., even when Array does take type parameters, it's still a type mismatch. 18:15
jnthn pmichaud: Actually it's both. :-)
Right.
viklund_ rakudo: sub r($i=0) {if $i>0 { r($i-1) }}; r(495)
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;
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 »
rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/Qz0XWyukWh:2)␤called from Main (/tmp/Qz0XWyukWh:2)␤»
viklund_ rakudo: sub r($i=0) {if $i>0 { r($i-1) }}; r(494)
p6eval rakudo dbebac: ( no output )
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;
p6eval rakudo dbebac: OUTPUT«meep!␤meep!␤meep!␤meep!␤» 18:16
viklund_ max recursion depth seems to be 495...
18:16 nnunley joined
viklund_ (494) 18:16
rjh viklund_: it's 1000 according to interp->recursion_limit
pmichaud when using p6eval, you may be hitting the timeout limit and not the recursion limit.
jnthn pmichaud: Your last post to the list (from RT) had some incomplete content?
pmichaud extra content, actually.
viklund_ what's the timeout?
jnthn Oh
pmichaud viklund_: 5 seconds. But in reality it's much less than that.
jnthn (recursion depth) remember a block counts too. 18:17
rjh fib(2000) is a 418-digit number, parrot says Inf - no bignum support?
pmichaud right, recursion depth is of Parrot subroutines, not of Rakudo subroutines
parrot doesn't have bignum support yet, correct.
jnthn sub foo { for 1..5 { foo() } } # foo here is 2 calls to reach
viklund_ I get the same error running from a file...
rjh it did seem to coerce int to double which is neat
pmichaud coercing to double is our workaround for no bigint support
viklund_ ah
jnthn: ahh 18:18
jnthn viklund_: ahhhhhhh!
;-)
rjh is it really accurate to return Inf for overflows?
pmichaud I'm guessing that's parrot's doing.
rjh I suppose you get NaN eventually
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.
I suppose if the index contains offsets, then yes.
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
pmichaud I won't bikeshed it since I'm not the one playing with the implementation yet
mberends pmichaud: we should try several implementations anyway, because most of the discussion is purely speculative 18:21
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
(or pre-empt)
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 :)
pmichaud oh, I agree totally with that.
only 10x? I actually find that encouraging.
TimToady p5 ain't fast at fib
rjh yes, me too
TimToady if you're doing it with recursion
rjh TimToady: worse, recursion with cached array 18:24
TimToady it should be pretty easy to optimize 0,1,1...&[+] in P6 :)
I'm kinda surprised linux doesn't have a /dev/fib yet... 18:25
errands &
rjh oh what the fuck 18:27
/msg evalbot pwd
perhaps this was always there and I never noticed it 18:28
18:32 clintongormley1 joined 18:34 jdv79 joined
rjh who runs evalbot? 18:34
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
18:36 kidd_ joined
DanielC daniel.carrera.bz/_2009/perl/storage-format.html 18:37
18:37 clintongormley left
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 :/
antiphase 19:39.44 <antiphase> kill -9 1 18:40
19:39.47 <evalbot> no output
rjh i tried shutdown -h now, it doesn't work ;)
antiphase I don't think it's particularly stupid
18:40 jamtech joined
rjh i thought the perl evalbot had gone nuts for a moment 18:40
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: en.wikipedia.org/wiki/Trie 18:43
DanielC *click*
mberends Tries are very efficient in memory, must consider how they perform on disk. 18:44
DanielC I'm not familiar with tries. I'm reading... 18:45
Anyways, a third file with indexes sounds like a good idea.
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.
mberends including rudimentary compression by not repeating prefixes 18:47
DanielC ok
A trie sounds great. 18:51
It sounds very fast - O(n)
(n = key length) 18:52
18:52 pyrimidine left
jdv79 besides November are there any comprehensive things written in p6? 18:53
rjh druid!
mberends DanielC: indeed, only hashes can beat O(n) afaik
DanielC jdv79: Define comprehensive. masak has written a few applications, like Druid.
jdv79 more than a script 18:54
modular, has tests, etc...
DanielC jdv79: I think Druid would qualify. It's a board game. Ask masak about it.
jdv79 ok 18:55
DanielC jdv79: Also, there is a Perl 6 compiler being written in Perl 6 :-)
jnthn mberends: Sorted list + binary search is O(log(n))
DanielC jdv79: That's certainly an application with tests and stuff.
lichtkind mberends: on what your are currently?
jnthn mberends: (provided the list is pre-sorted of course)
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?
DanielC jdv79: Rakudo itself is a very large application and much of it is written in Perl 6, including the Perl 6 parser.
mberends jnthn: yes, something like that.
jnthn A lot of the Rakudo built-ins are written in Perl 6 too.
mberends: IIUC tries divide the search space by a constant factor each level down, which would give logarithmic complexity I guess. 18:57
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
jnthn: locality of reference is a massive win on disk
jnthn mberends: Right. 18:59
lichtkind mberends: no i just fill some gabs in appendix B later i give you link to check translation
jnthn mberends: There's probably more than one way to store a trie on disk...
The less long seeks, the better, so I guess spacial locality is a good thing to optimize for.
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
DanielC jnthn/mberends: For what it's worth, most databases use B+ trees to store database indexes because they minimize disk seeks.
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).
mberends jnthn: I know B-trees very well from MSSQL. I wouldn't choose them for this job
19:01 clintongormley1 left
DanielC mberends/jnthn: Note, a B+tree is a variation on a B-tree. It requires fewer disk seeks. 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.
DanielC ok 19:03
jnthn mberends: Agree we don't profit from the balanced part, no.
mberends: The aspects of it that give less seeks, OTOH...
mberends the fixed block size loses against the trie 19:04
space consumption (therefore IO and RAM) much higher too
B(+)-tree is really for read/write applications 19:06
jnthn OK, makes sense.
mberends DanielC/jnthn: whatever needs the least seeks will perform best. 19:07
DanielC y
jnthn mberends: Fully agree, I'd just suggested B[-+]Tree 'cus I thought it meant less seeks. :-) 19:09
DanielC ditto
mberends when it's a finite number of files, Rakudo 6.1 can add a data cache to eliminate many seeks and reads
jnthn But the fixed block size argument has me.
mberends jnthn: B+ less than B, that's all
19:16 pyrimidine joined 19:19 xinming_ joined 19:20 donaldh left 19:21 donaldh joined 19:23 xinming left
DanielC mberends: 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
19:38 pyrimidine left
DanielC s/tree/trie/ 19:38
Stupid phonetics...
mberends: Anyways, it's a type of trie. 19:39
mberends DanielC: definitely consider it
DanielC I'm just reading the "10 minute explanation of why Judy is so fast". 19:40
On the other hand, I don't like complex solutions, even if the complexity is hidden by a C API. 19:47
hv2_ Hmm: "ResizablePMCArray: Can't pop from an empty array!" 19:48
Is this expected, in a program that doesn't use pop?
19:48 hv2_ is now known as hv2
rjh Judy seems rather esoteric to say the least 19:49
jnthn hv2: Probably indicates some kind of other bug.
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.
rjh Judy's source is something like 20,000 lines long
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.
mberends yes, pity
rjh this might be interesting: www.nothings.org/computer/judy/ 19:52
19:53 Sunbeam joined
jnthn hv2: thanks 19:53
19:53 Sunbeam is now known as H1N1
DanielC rjh: I just read that. It doesn't sound very good for Judy. 19:53
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
It seems like an ideal data structure, yet it isn't in common use
19:54 meppl joined 19:57 kane__ joined
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 kane__ is now known as kane[laptop]
jnthn :: is !! in Perl 6. 19:57
rakudo: our @a; (0 ?? shift(@a) !! 1);
p6eval rakudo dbebac: ( no output )
hv2 Ok, I guess that should make it easy to track down then. :) 19:58
I would suggest your exact words as the new error message ...
jnthn hv2: Actually I think it explodes in the parser...
DanielC Another data structure: en.wikipedia.org/wiki/Ternary_search_tries
jnthn Rather than at runtime.
std: our @a; (0 ?? shift(@a) !! 1); 19:59
hv2 Yes, it should be giving a parse error.
p6eval std 27035: OUTPUT«ok 00:02 36m␤»
jnthn std: our @a; (0 ?? shift(@a) :: 1);
p6eval std 27035: OUTPUT«##### PARSE FAILED #####␤Please use !! rather than :: at /tmp/1I21IvdgEg line 1:␤------> our @a; (0 ?? shift(@a) :: 1);␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ terminator␤FAILED 00:02 36m␤»
mberends DanielC: it's raining tries!
rjh hallelujah!
DanielC :-)
jnthn Wonder if we can steal how STD does that :-)
hv2 What is STD, is that pugs? 20:00
rjh hv2: Larry Wall-coded reference parser
hv2 Ah ok.
rjh it says okay if the code is valid Perl 6, syntax-wise
that might != what rakudo can handle atm
hv2 Oops, gotta run, let me know if you want a ticket for the parse failure
20:00 hv2 is now known as hv2_ 20:02 Su-Shee left 20:04 pyrimidine joined
sjohnson Question: can Perl 6 return multiple matches from a line using the ~~ match thingy? 20:15
if this is something that can be done even in p5, how is it done?
maybe a while instead of an if (m/goose/) ?
sjohnson is trying it out for himself
DanielC sjohnson: yes 20:17
20:17 pyrimidine left
rjh try 20:18
my @matches = ($text =~ /regex/g);
that's perl 5 right?
DanielC sjohnson: You might find this interesting: daniel.carrera.bz/2009/06/rpn-calcu...in-perl-6/
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.
skids_: But my blog post shows multiple matches with Perl 6 tokens without ever using :g 20:20
rjh for $/<...> -> $item ? 20:23
20:25 kate21de joined 20:31 jferrero joined 20:38 [particle] joined
DanielC mberends: Do you have any idea if Parrot's implementation of hashes is efficient? 20:49
pugs_svn r27036 | jnthn++ | [t/spec] A bunch of new tests that exhaust .^parents (without :tree). 20:50
jnthn s/exhaust/exercise/ # my english sucks... 20:51
DanielC jnthn: You are the local expert on Parrot, right?
jnthn DanielC: I know Parrot guts pretty well. 20:52
Used to hack Parrot core before Rakudo.
DanielC Do you know if the implementation of hashes is reasonably efficient?
[particle] DanielC: what type of efficiency are you looking for?
jnthn I know it's had quite a bit of profiling and tweaking of late.
[particle] it's written in c, though not as optimized as perl 5's hash impl 20:53
yep, jnthn is correct there
jnthn I suspect that more could the squeezed out of it.
20:53 pyrimidine joined
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.
DanielC $P0["Foo::Bar"] <-- contains the line number in packages.data where I can find Foo::Bar
pugs_svn r27037 | jnthn++ | [spec] Rename :hierarchical option to :tree in the spec for some meta-class method, as suggested on p6l. 20:56
20:56 cwilson left 21:03 Whiteknight joined
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:05
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:06
21:07 pmurias joined
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.
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?
jnthn pyrimidine: We create the Array, then mix in Positional[Foo].
pyrimidine: Similar for typed hashes.
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.
jnthn pyrimidine: Well, Positional of Foo will work.
DanielC: If you plan to build the Hash from PIR every time you need it, that'll kinda suck.
DanielC: If instead you plan to build it and have it frozen, then it's just thawed, that'd be more efficient. 21:11
Or should be much more efficient anyway.
DanielC ok
How about straight bytecode? 21:12
jnthn ?
pyrimidine hmm, still getting a type check error
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;
p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/w0uBR9hJ8h:2)␤called from Main (/tmp/w0uBR9hJ8h:2)␤»
DanielC store the index as PBC
PIR hash -> PBC -> file
jnthn DanielC: That's what I meant by the thaw thing
DanielC ah
jnthn DanielC: erm, freeze
Oh, OK
Maybe we mean different things. 21:13
DanielC I'm just thinking about ideas for that index file that mberends wanted.
jnthn pyrimidine: I'm a little surprised that one doesn't work.
DanielC: I didn't mean compiling the PIR that makes the hash to bytecode.
DanielC: I meant getting Parrot to freeze (serialize) the Hash that is produced.
DanielC ok
21:14 ejs joined, meppl left, decasm left
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;
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;
p6eval rakudo dbebac: OUTPUT«Type check failed on return value␤in sub block_17 (/tmp/2T4La1Vhq5:2)␤called from Main (/tmp/2T4La1Vhq5:2)␤» 21:15
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)␤»
jnthn rakudo: class A { }; sub foo returns Positional of A { my A @foo; say @foo.of; return @foo }; foo()
p6eval rakudo dbebac: OUTPUT«A()␤Type check failed on return value␤in sub foo (/tmp/eEyjymxNEA:2)␤called from Main (/tmp/eEyjymxNEA:2)␤»
jnthn rakudo: class A { }; sub foo returns Positional[A] { my A @foo; say @foo.of; return @foo }; foo()
p6eval rakudo dbebac: OUTPUT«Malformed routine definition at line 2, near "foo return"␤in Main (src/gen_setting.pm:0)␤»
pyrimidine rakudo: my sub foo returns Positional {my @a of Int; @a = (1..4); return @a}; foo()>>.say;
p6eval rakudo dbebac: OUTPUT«1␤2␤3␤4␤»
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)␤»
jnthn Ah
pyrimidine: OH! I think I see it! 21:18
rule trait_verb { [ | $<sym>=[of|returns] <typename>
pyrimidine ok 21:19
dalek kudo: acd4cfb | jnthn++ | src/ (2 files):
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.
kudo: a18b1d3 | jnthn++ | t/spectest.data:
Add S12-introspection/parents.t to spectest.data.
jnthn pyrimidine: That typename almost certainly wants to be fulltypename.
21:20 justatheory left
pyrimidine so, for Int that would be... 21:20
jnthn pyrimidine: Your code is correct, I think we were just parsing it wrongly. 21:21
We were parsing it as two traits
of Positional
of Int
Rather than one: Positional of Int
pyrimidine oh, that makes sense
jnthn (well, returns Positional of Int) 21:22
pyrimidine right
jnthn Yes, changing that locally fixes it.
pyrimidine++
pyrimidine bows
jnthn Let me spectest, and I'll add a test case too, then commit.
pyrimidine np 21:23
just to bring this up, I was wondering about the current implementation of .trans
right now it's in hacky PIR
(I can say that b/c I wrote it) ;) 21:24
and I'm wondering if it would work better as maybe a grammar
jnthn Hmm...STD uses <typename> but it's <typename> does what Rakudo's <fulltypename> does...guess there's some STD tracking to do here...
pyrimidine: It would use a grammar internally? 21:25
pyrimidine maybe
21:25 japhb joined
jnthn pyrimidine: Can you give me an example? 21:26
pmichaud yes, STD eliminated <fulltypename> in favor of <typename>
jnthn I don't fancy refactoring that tonight. 21:27
So I'll just s/typename/fulltypename/ in this spot for now so we parse more correctly.
pmichaud I don't think it'll be a difficult refactor (but yes, it's a little late to attempt tonight)
jnthn No, it won't be hard, I don't think. 21:28
Just, like you say, not the time to start on something like that. :-)
pyrimidine got distracted
21:28 DanielC left
pyrimidine student 21:29
21:33 mberends left
pyrimidine rakudo: "&nbsp;&lt;&gt;&amp;".trans( (['&nbsp;', '&nbsp;&lt;', '&lt;', '&gt;', '&amp;'] => [' ', 'AB', '<', '>', '&' ])).say 21:33
p6eval rakudo dbebac: OUTPUT«AB>&␤»
pyrimidine .trans is like a parallelized .subst 21:35
so I'm wondering whether we could make this a bit easier by having a simple regex that alternates 21:36
to find the longest Match, then replaces them 21:37
that's not the way it's implemented ATM
jnthn Ah, build the regex based upon the arguments and then eval it? 21:38
pyrimidine yes
jnthn Makes some sense.
However, relies on working LTM I suspect.
pyrimidine the reason I mention a grammar is that you can pass in closures
yes, I was thinking the same (LTM)
rakudo: my $count = 0; 'hello'.trans(/l/ => { ++$count }).say; 21:39
p6eval rakudo dbebac: OUTPUT«he12o␤»
jnthn pmichaud: if you do a /@a/ will it pick the shortest token in @a to match (under LTM semantics, not current?)
pmichaud jnthn: yes.
jnthn pyrimidine: So you could maybe do it just like that IIUC.
No regex eval needed. 21:40
21:40 ejs left
pyrimidine So, then basically I would just need to keep track of the mapping 21:40
I may try that out
pmichaud an interpolated array acts like @a[0] | @a[1] | @a[2] unless it's part of an || alternation
jnthn Neat. 21:41
pmichaud of course, PGE doesn't have this yet.
jnthn But we don't get LTM quite right yet I guess.
pmichaud nor variable pattern matching
jnthn Plus no interpolation.
pmichaud right.
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.
pyrimidine ok 21:42
it works for now, but it's def. an area that needs optimization
21:42 ruoso joined
ruoso Hello! 21:43
pyrimidine o/
pyrimidine on the way home...
jnthn pyrimidine: OK. And just comitted fix for the bug you spotted :-) 21:44
pyrimidine thx!
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
pugs_svn r27040 | lwall++ | [Cursor] fix problem with if/else losing .caps 21:47
r27040 | lwall++ | [gimme5] now use p5.10's given, so don't need to fake up ; on do {}
dalek kudo: 063f3d5 | jnthn++ | src/parser/ (2 files):
Returns traits should parse a fulltypename, not a typename. Fixes a bug spotted by pyrimidine++.
21:48
21:51 eternaleye joined 21:52 Limbic_Region joined 21:55 [particle]1 left 21:59 hv2_ is now known as hv, hv is now known as hv2 22:05 nihiliad left 22:06 jferrero left 22:07 jferrero joined 22:11 cognominal left, H1N1 left 22:12 alester left, Sunbeam joined 22:13 Sunbeam is now known as H1N1 22:18 eternaleye left, eternaleye joined 22:22 H1N1 left, Sunbeam joined 22:23 justatheory joined, Sunbeam is now known as H1N1 22:27 viklund left 22:31 cognominal joined
jnthn use.perl.org/~JonathanWorthington/journal/39100 # Rakudo day write-up from ages ago that I never got done 22:41
22:49 Muixirt left 22:50 pmurias left 22:52 jamtech left 23:01 DanielC joined 23:02 DanielC left 23:04 kane[laptop] left 23:05 meppl joined 23:11 nihiliad joined 23:12 jferrero left 23:14 mizioumt1 left 23:17 hanekomu left 23:20 donaldh left, DemoFreak left, donaldh joined 23:21 beggars joined 23:31 kate21de1 joined, DanielC joined, ruoso left 23:36 lichtkind left
DanielC Does anyone know how to open()/close()/chdir() in Parrot (PIR) ? 23:38
I can't find that information in the Parrot book.
Ah, I found it. 23:39
23:46 hv2 left 23:48 kate21de left 23:52 xinming joined 23:57 xinming_ left, xinming_ joined 23:58 beggars left