Re: [perl6/specs] 58fe2d: [S12] spec setting and getting values of attribute...
On Fri, 1 Oct 2010, Damian Conway wrote: Jonathan wrote: Sounds like the encapsulation breaking thingy probably wants to be looking for some pragma to have been used in the lexical scope of the caller, maybe. I'd rather that we called it something other than MONKEY_TYPING though. Different evil, different pragma. :-) As long as it's easily searchable and vaguely pejorative (e.g. has the work MONKEY in it). Hm. You need to use MONKEY_TYPING when you're monkeying with typing, so maybe when you're monkeying with what can be seen (and abusing Perl 6 as if it were C) then you need to use MONKEY_SEE We could even have one for looking at internals (called MONKEY_SEE), and one for changing them (MONKEY_DO). :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [perl6/specs] 58fe2d: [S12] spec setting and getting values of attribute...
On Thu, 30 Sep 2010, Damian Conway wrote: And thus C.get_value and C.set_value are just convenient access points for the same behaviour. Yes. People are going to shoot themselves in the foot anyway, so let's legalize semi-automatic weapons as well. Well, of course! What are you, a socialist Australian or something? Next you'll be telling me you don't even vote Libertarian! :) [Before anyone complains, I'm an Australian too :) ] - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Natural Language and Perl 6
On Tue, 3 Aug 2010, Carl Mäsak wrote: Jason (): No specific tool is best suited for natural language processing. There was apparently a time in which everyone thought that a formal grammar could clearly define any natural language, but I don't think anyone succeeded at creating a complete formal grammar for any language other than something like Esperanto. Even Esperanto is about on the same level of complexity as your regular Indo-European language. Sure, the word-formation is more regular, but the freedom in creating sentences with non-obvious antecedents and all manner of ambiguity, is just as large as in any national language. Now, had you said Lojban, I'd have believed you. :) Or maybe Ithkuil: http://en.wikipedia.org/wiki/Ithkuil :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Natural Language and Perl 6
Hi. I'm wondering if any thought has been given to natural language processing with Perl 6 grammars. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Reversible grammars
Hi. I've been thinking more about reversible grammars. Specifically, I'm wondering if the following pseudo-code will be possible: ## Match a grammar here $match = Grammar.match($text) ## Need some code here to get $submatch from $match $submatch.Str = fred ## Reverse Grammar $text = Grammar.reverse($match) My idea is that I could read in a file, find the part I wanted in the match tree, change that part, and then write it back to the file. Is that going to be a possibility? Also, while I was trying to investigate this, I was wondering about S32/Rules. I've added a few more lines to it, but there are some things I'm having trouble figuring out (this may be due to a few months absence from the p6 community -- sorry :) ). Anyway, my questions are: - I note that, while S32/Rules says that .from returns an Int, S05 has a call $/.from.bytes . Does this mean that there's a StringSize type that does maybe .bytes, .chars, .graphs, and .codes that's returned by maybe .from, .to, and .pos ? - I've also noticed that there's a .chars method on the match object; wouldn't this exist by default because of the Str method? HTH, :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Reversible grammars
On Fri, 4 Jun 2010, Stefan O'Rear wrote: On Sat, Jun 05, 2010 at 09:19:01AM +1000, Timothy S. Nelson wrote: Hi. I've been thinking more about reversible grammars. Specifically, I'm wondering if the following pseudo-code will be possible: ## Match a grammar here $match = Grammar.match($text) ## Need some code here to get $submatch from $match $submatch.Str = fred ## Reverse Grammar $text = Grammar.reverse($match) My idea is that I could read in a file, find the part I wanted in the match tree, change that part, and then write it back to the file. Is that going to be a possibility? Look at emit_p5 in viv, where we do basically exactly that (but combined with a recursive traversal). Thanks. What I guess I'm really asking is, can we add an emit method to the Match object in the P6 spec? Usually I just be bold and add things, but I thought people might want to discuss this one first :). Also, while I was trying to investigate this, I was wondering about S32/Rules. I've added a few more lines to it, but there are some things I'm having trouble figuring out (this may be due to a few months absence from the p6 community -- sorry :) ). Anyway, my questions are: Higher-numbered synopses are much more speculative, poorly implemented, and get little love from the janitorial staff; so, in case of disagreement, the lower number has the correct answer. Yes, I know the lower ones are correct, but sometimes I have trouble finding where they mention things (eg. I skimmed over S02 before posting this, but because I was only looking at the tables of types, and not reading the text, I missed StrPos). - I note that, while S32/Rules says that .from returns an Int, S05 has a call $/.from.bytes . Does this mean that there's a StringSize type S32 is wrong. Yes, I know that. I wrote most of it myself :). that does maybe .bytes, .chars, .graphs, and .codes that's returned by maybe .from, .to, and .pos ? Yes, it's called StrPos; see S02:813. Thanks! :) I've also added does Positional does Associative to the Match role. Does that make sense, or should I instead be adding methods with postfix () and postfix [] ? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Ideas for a Object-Belongs-to-Thread threading model
On Tue, 11 May 2010, Daniel Ruoso wrote: 2 - The interpreter implements a scheduler, just like POE. I don't have a clue about threading, but I saw POE, and since I know that's an event loop mechanism, I thought I'd comment that I want to be able to do GTK programming, which I think requires using the GTK event loop. There may be some way to hook all this together, but I just thought I'd put this thought into the collective mind again. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: A new era for Temporal
On Thu, 8 Apr 2010, Carl Mäsak wrote: We (mberends and masak) just pushed a commit to S32::Temporal which completely replaces what we had before. The changes are rooted in hours of discussion on #perl6, and we feel rather more confident with what we have now than with what we had before. That said, discussion is very welcome. I do want to explicitly credit Dave Rolsky, whose work on the DateTime family of modules on CPAN has informed much of the current spec, sometimes to the point of verbatim copying. Allow me to point out that Dave Rolsky acually wrote or designed a reasonable portion of what was there before the edit by lue (with other parts having been written by myself). I figure Dave is the biggest expert we have on the topic, and hopefully he's learned from his mistakes in implementing DateTime. My understanding was that the spec at that time incorporated things he'd learned. Thus, I'd like to see his work as the basis for this. Thus, I'd like to see an incremental evolution from the pre-lue version, based on discussion between Dave Rolsky and other interested parties. Times and dates are not as straightforward as they look. Feel free to turf out anything I wrote, though :). Allow me to point you all to at least one previous discussion on the matter. http://www.nntp.perl.org/group/perl.perl6.language/2009/02/msg30780.html HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: r29976 - docs/Perl6/Spec
On Mon, 8 Mar 2010, Carl Mäsak wrote: Meanwhile, the uncanny similarities between Perl 6 and Algol 68 continue to strike me: http://en.wikipedia.org/wiki/ALGOL_68 (]): ] ALGOL 68 [...] was conceived as a successor to the ALGOL 60 programming ] language, designed with the goal of a much wider scope of application and more ] rigorously defined syntax and semantics. Algol 68 is notorious as a failure. Let's hope things are different here. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Functional-style pattern matching
On Tue, 9 Mar 2010, Daniel Ruoso wrote: Em Seg, 2010-03-08 às 12:45 -0800, Little Walker escreveu: I've been looking around to see if there's been any discussion of introducing functional programming-style pattern matching for method/ function dispatch. Could someone point me to any such discussions? a Tree matching language is on discussion for about three years already (I remember discussing this during YAPC::EU 2007). We have considered several things including XPath/XSLT but haven't come to any viable conclusion. I'm planning to write a Tree module, but I'm waiting for Rakudo to stabilise a bit (ie. to catch up after the -ng branch). I have some code written already, but it relies on features that aren't implemented yet, and I haven't gotten around to coding workarounds. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Temporal seems a bit wibbly-wobbly
On Tue, 23 Feb 2010, Nicholas Clark wrote: On Tue, Feb 23, 2010 at 10:02:02AM +0300, Richard Hainsworth wrote: - Time Zone, which can differ from GMT by halves of an hour. quarter hours in at least one place (Nepal) This doesn't affect your reasoning. Also, time zone abbreviations are ambiguous. PST can be Pacific Standard Time, Pakistan Standard Time, Phillippine Standard Time. Probably others are similarly overloaded. EST = Eastern Standard time, ie. +1000 from GMT. Has anyone noticed that I'm referring to Australia? Both Aust. USA have Eastern Standard Time, but they're quite different times :). This means that even a well formed time string complete with timezone abbreviation isn't actually absolute. That's why we use +1000 now :). - The legal jurisdiction. And oh gosh is *that* one fun. eg do we or don't we have daylight saving time? ...and are we starting 3 months early this year to accomodate the Olympics? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Gripes about Pod6 (S26)
On Wed, 10 Feb 2010, Jon Lang wrote: John Gabriele wrote: Personally, I've always thought that Perl has a very natural feel to it, and deserves a doc markup format that's also natural: [Markdown] (and [Pandoc]'s Markdown has just the right additions, IMO). [Markdown]: http://daringfireball.net/projects/markdown/ [Pandoc]: http://johnmacfarlane.net/pandoc/ I definitely prefer Markdown's approach to inline markup over POD's approach: e.g., _italic_ strikes me as much more legible than Iitalic. That's one of the things that's always annoyed me with Markdown; I think it should be *bold*, /italic/, and _underline_. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Gripes about Pod6 (S26)
On Fri, 12 Feb 2010, Brandon S. Allbery KF8NH wrote: On Feb 12, 2010, at 19:57 , Timothy S. Nelson wrote: On Wed, 10 Feb 2010, Jon Lang wrote: John Gabriele wrote: Personally, I've always thought that Perl has a very natural feel to it, and deserves a doc markup format that's also natural: [Markdown] (and [Pandoc]'s Markdown has just the right additions, IMO). [Markdown]: http://daringfireball.net/projects/markdown/ [Pandoc]: http://johnmacfarlane.net/pandoc/ I definitely prefer Markdown's approach to inline markup over POD's approach: e.g., _italic_ strikes me as much more legible than Iitalic. That's one of the things that's always annoyed me with Markdown; I think it should be *bold*, /italic/, and _underline_. There's a school of thought, common among printing/publishing types, that insists that underline was intended solely to replace italics when they couldn't be represented (i.e. no fonts, as with ASCII terminals and printers). Thus Markdown's use of _italic_. (See also nroff.) I'm aware of that idea, and don't use underlining myself for that reason. But since /italic/ looks like italic, and _underline_ looks like underline, why are we using the thing that looks like underline for italics? I mean, sure, I'm happy to get rid of _underline_ if that's what people want, but using _ for italic is just ... well, I don't see any sense in it. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Type system for Perl 6
On Fri, 5 Feb 2010, Giuseppe Castagna wrote: Hi, I would like to know where I can find the latest documentation on the type (and above all subtype) system for Perl 6. The synopsis does not say much about it. http://perlcabal.org/syn/ There's no one document there that contains all the information about types, but those are the latest, most authoritative documents. If the code doesn't do what these documents say, then it's the code that is wrong, not the documents. You probably want the links in the Specification column. Without knowing exactly what you mean by type system (I'm not one of the experts around here), I'd suggest that the places you want to look are parts of: - S02: Bits and Pieces - S09: Data Structures - S12: Objects - S14: Roles and Parametric Types Possibly the following may also be useful: - S10: Packages - S11: Modules - S13: Overloading - S32: This contains API information for some of the individual types I would like to know the current status of the Perl6 in order to adapt my presentation. In particular, a complete syntax for types would be welcome (the most complete description I found is this one http://www.programmersheaven.com/2/Perl6-FAQ-Types). See link above. As for the status; let me start by stating that (unlike Perl 5), Perl 6 is a specification that has multiple (incomplete) implementations. The sections marked [DRAFT] at the link above are still far from final. The others, while still changing daily, are more ... thorough and community-approved. Thanks in advance for your help. Of course I will be happy to discuss the details of my proposal on this list, if there is any interest, of course. As I've said, I'm no expert; I didn't completely understand your original message. Hopefully one of the experts will be able to chime in as the discussion progresses. Just before I end this e-mail, I should maybe also provide a link to http://perl6.org/ since it links to things that may be useful to you. HTH, :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Lenses?
I've been wondering about lenses recently. The page at http://www.seas.upenn.edu/~harmony/ seems to give an overview, and I know that augeas also uses lenses. It seems to me that a grammar can be thought of as a one-way lens. I was wondering whether the bi-directional idea might be interesting in this context. It seems to me that, at the moment, when we want to do a format conversion, we: - Read the data in with a grammar - Output the data with something like Form.pm I'm wondering if there isn't some way that the whole thing can be turned into lenses. Anyway, I'm sort of half thinking out loud, and wondered if anyone had any relevant thoughts. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: How can i contribute for perl 6 ?
On Tue, 15 Sep 2009, Patrick R. Michaud wrote: On Tue, Sep 15, 2009 at 10:02:02PM +1000, Timothy S. Nelson wrote: On Tue, 15 Sep 2009, Saravanan Thiyagarajan wrote: Would like to be a volunteer in working for perl-6. Can some one help me to get into right direction ? Sure. The best way to help depends on your skill-set. One place to start is at http://www.rakudo.org/how-to-help [...] See also http://use.perl.org/~masak/journal/39445 , which undoubtedly ought to be preserved somewhere on rakudo.org . +1. I have a set of 7 bookmarks that load in tabs that I call my Perl 6 bookmarks. I load this group of tabs into a separate web browser window when I'm doing Perl 6 stuff. That link is one of the 7 links. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: How can i contribute for perl 6 ?
On Tue, 15 Sep 2009, Saravanan T wrote: Thanks Tim for the link, I tried IRC channel felt like not to disturb from their serious discussion with a newbie question. Feel free. There are a few people in the serious discussions who will ignore questions not directly targetted at them, but a lot of the #perl6 regulars are happy to field newbie questions. In fact, if discussions are happening, that's the best time to ask -- if there's no discussion, everyone may be asleep :). My skillset is 5+ yrs of exp in perl,unix with a computerscience engineering background Worked in various domains like banking domain(Standard chartered - Gui tool in Tk/perl ) , telecom domain( cisco - clearcase wrappers in Perl/unix ) , storage domain( NetApp - parsers in perl/unix ). Sorry for adding my personal blah,blah . Hope this skillset information will be helpfull to start with . Looking forward for your suggestions .. That'll be helpful, but I'm afraid all the help I could've provided is pretty much covered in one or another of the links that have been sent out. But others (again, especially on #perl6) may have more suggestions. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
On Wed, 16 Sep 2009, Carl Mäsak wrote: Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. It doesn't work, though. That's probably one reason it wasn't in proto :). Until either we get role stubs (role foo {...}) or I figure a way to work around that, it will continue not to work. But after that, I'll be able to move forward with it (well, if I have tuits -- I hope to be back to Perl 6 stuff within the next month). I don't want to complain, though. Great work so far, Rakudo implementors! :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: How can i contribute for perl 6 ?
On Wed, 16 Sep 2009, Geoffrey Broadwell wrote: On Wed, 2009-09-16 at 19:49 +1000, Timothy S. Nelson wrote: +1. I have a set of 7 bookmarks that load in tabs that I call my Perl 6 bookmarks. I load this group of tabs into a separate web browser window when I'm doing Perl 6 stuff. That link is one of the 7 links. Perhaps your other Perl 6 bookmarks ought to appear on rakudo.org or perl6.org as well. :-) They probably mostly do: - rakudo.org - parrot.org - P6 specs - Moritz' blog (especially because of the monthly summaries) - #perl6 IRC logs - perl6.org - That link to Masak's blog I'm pretty sure most of those are linked somewhere. I'd actually be in favour of Masak's post being copied to the site (with attribution) and expanded, rather than just linked, if Carl is happy with the idea. Unfortunately no tuits at the moment. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: How can i contribute for perl 6 ?
On Tue, 15 Sep 2009, Saravanan Thiyagarajan wrote: Would like to be a volunteer in working for perl-6. Can some one help me to get into right direction ? Sure. The best way to help depends on your skill-set. One place to start is at http://www.rakudo.org/how-to-help That doesn't cover everything, though. I recommend going to the #perl6 IRC channel (irc.freenode.net) and asking the same question, and telling them your skill-set. They'll be able to give you immediate feedback on the best way to help. If you're unable to access IRC, then please let us know on the mailing list and we can discuss your skill-set here. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Synopsis 02: Range objects [recap]
On Wed, 26 Aug 2009, Michael Zedeler wrote: Thanks to everyone who has posted their thoughts on Ranges. Here are the conclusions I have drawn: Ranges are for checking whether something is within a given interval. RangeIterators are for iterating over elements in a Range with a given step size using :by. We discussed using Series or Sequence in place of RangeIterator, but Series seems too general and Sequence has already been taken. Up to this point, there are no changes to the spec afaik. Proposed changes: It shouldn't be possible to construct RangeIterators over Str (apart from single length strings) or Complex using the Range operator (..). I haven't been following the conversation, but I've had an idea -- maybe it should be possible to construct a RangeIterator if an ordered set is provided. For example, if the ordered set was '0'.. '9', then the RangeIterator would know that the thing went '0' .. '9', '10' .. '19', '20', etc, whereas if the ordered set was 'a' .. 'z' then it could be something like 'a' .. 'z', 'aa', 'ab' ... 'az', 'ba'... I realise that maybe the first set should've been '1' .. '0' instead, but the general idea is the thing at the moment. I wrote all this, and then saw Jon Lang's idea of providing steppers, which is also good. I think a Complex range only makes sense if you provide 4 endpoints, not 2, but I haven't been following the conversation, so I'll leave it up to the Complex number experts :). HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: directories of interest, a multiplicity alternative to CWD
On Wed, 19 Aug 2009, Darren Duncan wrote: My proposal is to have all filesystem paths as seen within Perl being relative paths, and that there are multiple filesystem roots which can be referred to by name and each relative path is explicitly relative to a named root; each of these named roots is called a directory of interest or doi. I briefly mentioned a similar idea, but with no theoretical background :). I would've called them bookmarks instead of doi, though. For those who shied away from Darren's large theoretical background, fearing that it would lead to pie-in-the-sky or something, the simple version of his proposal was to have a magic global hash, and have it work like: %*DOIhome = /home/foo; $path = p{home/Music}; # $path points at /home/foo/Music I disagree with the syntax, but the idea has merit. Your idea for making everything a relative path isn't one that appeal to me. But having a predefined set of bookmarks that could be used is certainly an interesting idea. I don't like your syntax, though :). But see below. fsroot - the root of the real file system, analogous to / I think we should stick with / as it's well-understood. Unless the Windows users among us see some advantage to fsroot -- I'd be happy to discuss it with them. fscwd - the dir that was the fs CWD when Perl started up Stick with $*CWD for this, I reckon, and have it implicit in all paths that don't start with an absolute path. But all the other variables below should be absolute paths. docs - the dir that contains the usual files we want to work with temp - the dir where we can put temporary files home - the current user's home dir mycwd - some other cwd-dir, which is virtual-changeable in Perl Vote yes to temp and home. Don't understand what you mean by docs. So to refer to common things on a Unix system like the fully-qualified ways, you can write paths like: fsroot/home/me/myfile fsroot/usr/bin/perl fsroot This is a great example of why fsroot is a bad idea. For something analogous to traditional CWD sans modifications: fscwd/mynewfile.txt fscwd/lib/doit.pl ...and a great example of why fscwd is a bad idea. To define a new doi at runtime, something like: %DOI{'mycwd'} = %DOI{'fscwd'}; %DOI{'mycwd'} ~= 'subdir'; # later my $fh = IO.open( 'mycwd/myfile.txt' ); If I were doing it, I'd make it look like this: %bookmarkmycwd = $*CWD; %bookmarkmycwd.push('subdir'); # later my $fh = IO.open( p{#mycwd#/myfile.txt} ); The only part I don't like is marking the mycwd with the hashes. I think we can't do without markers altogether because it would absolutely confuse everyone :). Putting a hash before and after is also a bad idea because it's like nothing else in Perl. The only other idea I can think of is to come up with another quote adverb/pragma pair. Something like: use hashinterpolate %*bookmark; ...and have the :hi (short for :hashinterpolate) quote modifier make $mycwd refer to %*bookmarkmycwd, and then have :path automatically do :hi as well, unless :qq is used, or something. Anyway, I home someone who knows more about Perl interpolation than me has an idea here. Anyway, I like my terminology better, because it's less scary, and I've shaved off some of the scariest bits of syntax from your proposal, but there is still some work to be done on it here. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Wed, 19 Aug 2009, Mark J. Reed wrote: I don't think $file1.name == $file2.name should talk to the FS, because I think File#name t+r whatever) should return a plain Str. Having magical FilePathName objects is handy, but sometimes you want to get the filename as a dumb string to do stringish things without having to worry about the fact that the string started life as the name of a file somewhere. I could convert it explicitly, but it's not obvious that I need to; 'name' sounds like something that should return Str. $file1.name == $file2.name is kinda strange because it does a numeric comparison between the filenames (see S03). Methinks you want $file1 eq $file2 (both of which are assumed to be of type Path) which does a string comparison between them without consulting the filesystem. Having said that, you've made me realise that $file1 == $file2 might be the perfect operator for comparing inodes, since inodes are numbers. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
I should've mentioned, though, we're currently using the smartmatch operator for this, so I'm thinking maybe I'll just stick with that. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: r28017 - in docs/Perl6/Spec: . S32-setting-library
On Tue, 18 Aug 2009, David Green wrote: On 2009-Aug-18, at 2:29 am, Carlin Bingham wrote: chdir provides functionality that would be quite convoluted to mimic through manually setting $*CWD, such as changing to a relative directory. Maybe setting $*CWD just calls chdir() under the hood? Same implementation, brand new shiny Perl-style interface! That was my intent, but we had some discussions on IRC about the whys and wherefores, and it will return as soon as I do my next commit (hopefully sometime within the next 4-5 hours). Unless you can think of a good way to do relative paths. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: r28017 - in docs/Perl6/Spec: . S32-setting-library
On Tue, 18 Aug 2009, Mark J. Reed wrote: On Tue, Aug 18, 2009 at 11:04 AM, David Greendavid.gr...@telus.net wrote: On 2009-Aug-18, at 2:29 am, Carlin Bingham wrote: chdir provides functionality that would be quite convoluted to mimic through manually setting $*CWD, such as changing to a relative directory. Maybe setting $*CWD just calls chdir() under the hood? Same implementation, brand new shiny Perl-style interface! If $*CWD is really a Path object and not a Str, then it should be easy to use mutator methods to change to a relative directory and do other chdir()ish things. Say, concatenation works in terms of path components, for instance: $*CWD ~= $subdir; # chdir($subdir) With a method for getting the parent: given $*CWD { $_ = $_.up ~ $sibling } # chdir(../$sibling) and so on. My favorite kshism is cd old new which does a search/replace on the current working directory; the bash equivalent cd ${PWD/old/new} which is not quite as handy. $*CWD could make that simple, too. It's not in the revised spec, but I think that, even though we've revived chdir, we should still have it so that changing $*CWD will do a chdir under the hood. My intent is that Path should be able to act as a string, at least to a certain extent, and should also be able to act as an array of Str. So Mark's second example could be done as: pop $*CWD; push $*CWD $sibling HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Tue, 18 Aug 2009, David Green wrote: On 2009-Aug-17, at 8:36 am, Jon Lang wrote: Timothy S. Nelson wrote: Well, my main thought in this context is that the stuff that can be done to the inside of a file can also be done to other streams -- TCP sockets for example (I know, there are differences, but the two are a lot the same), whereas metadata makes less sense in the context of TCP sockets; But any IO object might have metadata; some different from the metadata you traditionally get with files, and some the same, e.g. $io.size, $io.times{modified}, $io.charset, $io.type. Ok, now you're giving me ideas :). [snipped a bit and moved it further down the e-mail] I guess what I'm saying here is that I think we can do the things without people having to worry about the objects being separate unless they care. So, separate objects, but hide it as much as possible. Is that something you're fine with? Yes -- to me that means some class/role that wraps up all the pieces together, but all the separate components are still there underneath. But I'm not too bothered about how it's implemented as long as it's transparent for casual use. my $file = io p[/some/file]; my $contents = $file.data; my $mod-date = $file.times{modified}; my $size = $file.size; That sounds like the kind of thing I'm heading for. Pathnames still are strings, so that's fine. In fact, there are different As for pathnames being strings, you may be right FSVO string. But I'd say that, while they may be strings, they're not Str, but they do Str Agreed, pathnames are almost strings, but worth distinguishing conceptually. There should be a URL type that does Str. Actually, there are other differences, like case-insensitivity and illegal chars. Unfortunately, those depend on the given filesystem. As long as you're dealing with one FS at a time, that's OK; it probably means we have IO::Name::ext3, IO::Name::NTFS, IO::Name::HFS, etc. But what happens when you cross FS-barriers? Does a case-sensitive name match a case-insensitive one? Is filename-equality not commutative or not transitive? If you're looking for a filename foo on Mac/Win, then a file actually called FOO matches; but on Unix it wouldn't. (Actually, Macs can do both IO::Name::HFS::case-insensitive and IO::Name::HFS::case-sensitive. Eek.) I think it should depend on the set of constraints involved. I'd like Perl 6's treatment of filenames to be smart enough that smart-matching any of these pairs of alternative spellings would result in a successful match. So while I'll agree that filenames are string-like, I really don't want them to _be_ strings. Well, the *files* are the same, but the pathnames are different. I'm not sure whether some differences in spelling should be ignored by default or not. There are actually several different kinds; S32 has a method realpath, but I think canonical is a better name, because aliases can be just as real as the canonical path, e.g. a web page with multiple addresses. Or hard links rather than soft links -- though in that case, there is no one canonical path. It may not even be possible to easily tell if there is one or not. Some ways in which different paths can be considered equivalent: Spelling: C:\PROGRA~1, case-insensitivity Simplification: foo/../bar/ to bar/ Resolution: of symlinks/shortcuts Content-wise: hard links/multiple addresses Depending on the circumstances, you might want any of those to count as the same file; or none of them. We'll need methods for each sort of transformation, $path.canonical, $path.normalize, $path.simplify, etc. Two high-level IO objects are the same, regardless of path, if $file2 =:= $file2 (which might compare inodes, etc.). There should be a way to set what level of sameness applies in a given lexical scope; perhaps the first two listed above are a reasonable default to start with. Ok, my next commit will have canonpath (stolen directly from p5's File::Spec documentation), which will do No physical check on the filesystem, but a logical cleanup of a path, and realpath (idea taken from p5's Cwd documentation), which will resolve symlinks, etc, and provide an absolute path. Oh, and resolvepath, which does both. I'm not quite sure I followed all your discussion above -- have I left something out? Anyway, my assumption is that there should be a number of comparison options. Since we do Str, we should get string comparison for free. But I'm expecting other options at other levels, but have no idea how or what at this point. There's something that slightly jars me here... I don't like the quotation returning an IO object. But doesn't normal quoting return a Str object? And regex quoting return an object (Regex? Match? Something, anyway). Certainly, but a regex doesn't produce a Signature object, say. I don't object to objects, just to creating objects
Re: $*CWD and chdir()
On Tue, 18 Aug 2009, Jan Ingvoldstad wrote: On Tue, Aug 18, 2009 at 2:33 PM, David Green david.gr...@telus.net wrote: Huh. Thank you, I did not know that. It makes sense (in that I understand what's going on now that I see it, and indeed it seems almost obvious), but I certainly couldn't call it expected because I didn't. And I can guarantee I'm not the only one; in fact, I have no qualms about classifying that as a bug. You think it's a bug that PWD=/etc doesn't change your working directory to /etc in bash? Please tell me you're joking. ..but Perl is more magic than bash :). Seriously, I can see both sides of the argument, and I'm leaning towards the $*CWD = chdir idea (as an option if people want to use it), but I realise that a lot of people are leaning the other way. So I'll argue for it, but don't care if I lose :). The environment variables are generally just descriptive variables. If you mess with them, they may no longer have bearing on reality. That is also expected behaviour; if you shoot yourself in the foot, you may get hurt. It can also be said to be expected behaviour because that's the way it has been behaving for maybe as long as environment variables have been in existence in Unix systems. Here's another example of something that, if I understand you correctly, you find as unexpected behaviour: j...@krakas ~ USER=root j...@krakas ~ echo $USER root # Am i root now? j...@krakas ~ whoami jani # I'm not root. While there have been programs assuming that %ENV{USER} indicates who the current user is, and adjusting their behaviour based on that, such behaviour has generally been classified as a security vulnerability, and rightly so. I think David Green's argument would be that, in something as magic as Perl, doing USER=root should call setuid(), and chuck an error when it fails. And note that Perl 5 allows you to do exactly this, if I understand the documentation for EFFECTIVE_USER_ID in the perlvar manpage correctly. So, if P5 does it for some global (note: global != environment) variables, then why not do it for some in P6? Note that no-one's stopping you from doing this: chdir(/usr/bin); say %*ENVPWD -- $*CWD\n $*CWD = /usr/lib; %*ENVPWD = /foo/notadirectory; say %*ENVPWD -- $*CWD\n ...which would print: /usr/bin/ -- /usr/bin /foo/notadirectory -- /usr/lib So, you can still set %*ENVPWD how you want, but $*CWD ties to getcwd and chdir the way some other people want. Yes? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Tue, 18 Aug 2009, Leon Timmermans wrote: Reading this discussion, I'm getting the feeling that filename literals are increasingly getting magical, something that I don't think is a good development. The only sane way to deal with filenames is treating them as opaque binary strings, making any more assumptions is bound to get you into trouble. I don't want to deal with Windows' strange restrictions on characters when I'm working on Linux. I don't want to deal with any other platform's particularities either. Portability should be positive, not negative IMNSHO. Sounds to me like you need p:bin{/path/to/file} -- that does what you want it to. I'll make it more obvious in the S16 documentation. As for comparing paths: reimplementing logic that belongs to the filesystem sounds like really Bad Idea? to me. Two paths can't be reliably compared without choosing to make some explicit assumptions, and I don't think Perl should make such choices for the programmer. That's why I want multiple comparison options, so that people have to explicitly choose what they want. How to do this, though, I'm unsure. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: $*CWD and chdir()
On Wed, 19 Aug 2009, Carlin Bingham wrote: 2009/8/19 Timothy S. Nelson wayl...@wayland.id.au: So, if P5 does it for some global (note: global != environment) variables, then why not do it for some in P6? Because if (for some reason) I do: $ = 5; # Which calls setuid(5); print $; # 5 Whereas: $*CWD = '..'; # which hypothetically calls chdir '..'; print $*CWD; # /home Ok, so suppose we only allowed direct assignment to absolute paths? - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: $*CWD and chdir()
Ok, here's a fairly significant point posted on IRC. TimToady wayland76: the point of using $*CWD would be (and would *have* to be, given how context vars work) to give each thread its own working directory, independent of the process as a whole Now, given that chdir is an OS concept that applies to the process as a whole, rather than individual threads, but $*CWD is designed for individual threads, that pretty much means that it is a really bad idea to have $*CWD do chdir() for us. Now, having said that, I think the idea of a per-thread CWD is a great idea, and I'd be in favour of using $*CWD over whatever getcwd retrns in Perl6 as much as possible. So I think it would be cool if all relative paths specified via p{} were relative to $*CWD, not getcwd(). So something like this: chdir(/usr/bin); $*CWD = /home/username; $path = p{Music}; say $path.canonpath(); # prints /home/username/Music My question is, what else uses chdir/getcwd style paths? I know qqx/$cmd @args[]/ ...will pass its current dir to the child. Maybe we could have Perl6 do something like this pseudocode under the hood when someone does a qqx. olddir = getcwd(); chdir($*CWD); exec(qqx string here); chdir(olddir); That would mean that $*CWD would effectively act as a per-thread working directory. No doubt someone will write in and tell me how bad an idea this is. I look forward to having my ignorance exposed :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Last IO discussion
See this link. http://archive.netbsd.se/?ml=perl6-languagea=2008-11t=9170058 In particular, I thought Tom Christiansen's long message had some relevant info about filename literals. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Mon, 17 Aug 2009, Jon Lang wrote: Well, I definitely think there needs to be a class that combines the inside and the outside, or the data and the metadata. Certainly the separate parts will exist separately for purposes of implementation, but there needs to be a user-friendlier view wrapped around that. Or maybe there are (sort of) three levels, low, medium, and high; that is, the basic implementation level (=P6 direct access to OS- and FS- system calls); the combined level, where an IO or File object encompasses IO::FSnode and IO::FSdata, etc.; and a gloss-over-the-details level with lots of sugar on top (at the expense of losing control over some details). Hmm. With the quoting idea, I don't see the need for a both type of object. I mean, I'd see the code happening something like this: if (path{/path/to/file}.e) { �...@lines = slurp(path{/path/to/file}); } Or... if (path{/path/to/file}.e) { $handle = open(path{/path/to/file}); } (I'm using one of David's suggested syntaxes above, but I'm not closely attached to it). For the record, the above syntax was my suggestion. Ok, as long as I don't have to take the blame :). Seriously, I was confused by trying to reply to two e-mails at once. Sorry. In fact, having q, Q, or qq involved at all strikes me as wrong, since those three are specifically for generating strings. Pathnames still are strings, so that's fine. In fact, there are different Hmm. I'm not so sure; maybe I'm just being picky, but I want to clarify things in case it's important (in other words, I'm thinking out loud here to see if it helps). First, Q and friends don't generate strings, they generate string-like objects, which could be Str, or Match, or whatever. Think of quoting constructs as a way of temporarily switching to a different sublanguage (cf. regex), and you'll have the idea that I have in mind. As for pathnames being strings, you may be right FSVO string. But I'd say that, while they may be strings, they're not Str, but they do Str, as in role IO::FSNode does Str {...} (FSNode may not be the right name here, but is used for illustrative purposes). I'd go one step further. Consider the Windows path 'C:\Program Files\'. Is the string what's really important, or is it the directory to which the string refers? I ask because, for legacy reasons, the following points to the same directory: 'C:\PROGRA~1\'. Then there's the matter of absolute and relative paths: if the current working directory is 'C:\Program Files\', then the path 'thisfile' actually refers to 'C:\Program Files\thisfile'. And because of parent directory and self-reference links, things like '/bin/../etc/.' is just an overcomplicated way of pointing to '/etc'. I'd like Perl 6's treatment of filenames to be smart enough that smart-matching any of these pairs of alternative spellings would result in a successful match. So while I'll agree that filenames are string-like, I really don't want them to _be_ strings. Good ideas. But I still want it to have the same interface, so I can concatenate them easily in error messages :). things going on here; one is to have a way of conveniently quoting strings that contain a lot of backslashes. Just as Perl lets you pick different quotation marks, to make it easier to quote strings that have a lot of or ' characters, so it should have a way to make it easy to quote strings with a lot of backslashes. (The most obvious example being Windows paths; but there are other possibilities, such as needing to eval some code that already has a lot of backslashes in it.) Now, you can already turn backwhacking on or off via Q's :backslash adverb; Q:qq includes :b (and Q:q recognises a few limited escape sequences like \\). So you could say Q[C:\some\path], and you could add scalar interpolation to say Q:s[C:\some\path\$filename]. But there's no way to have all of: literal backslashes + interpolation + escaped sigils. Perhaps instead of a simple :b toggle, we could have an :escapeStr adverb that defaults to :escape\? Then you could have Q:scalar:escape(^)[C:\path\with\literal^$\$filename]. Maybe a global variable? It's an interesting idea, and I'll see how others feel :). I'm leery of global variables, per se; but I _do_ like the idea of lexically-scoped options that let you customize the filename syntax. Changing the default delimiter would be the most common example of this. Yeah, global variable is probably a bad idea. But it *feels* like it should be some kind of global or semi-global setting :). By semi-global, I mean something that you can override in your local scope, and have it revert, much as with the $*IN, etc, filehandles. Now, isn't Q:path[/some/file] just creating an IO object? Unlike /foo/, where foo just IS the pattern, /some/file is *not* an IO object, it's just a filename. So if the special path-quoting returned an
Re: Filename literals
On Sun, 16 Aug 2009, David Green wrote: On 2009-Aug-15, at 9:22 am, Jon Lang wrote: IOW, your outside the file stuff is whatever can be done without having to open the file, and your inside the file is whatever only makes sense once the file has been opened. Correct? Pretty much, yes. If so, could you give some examples of how such a distinction could be beneficial, or of how the lack of such a distinction is problematic? Well, my main thought in this context is that the stuff that can be done to the inside of a file can also be done to other streams -- TCP sockets for example (I know, there are differences, but the two are a lot the same), whereas metadata makes less sense in the context of TCP sockets; I guess this was one of the thoughts that led me to want separate things here. Well, I definitely think there needs to be a class that combines the inside and the outside, or the data and the metadata. Certainly the separate parts will exist separately for purposes of implementation, but there needs to be a user-friendlier view wrapped around that. Or maybe there are (sort of) three levels, low, medium, and high; that is, the basic implementation level (=P6 direct access to OS- and FS- system calls); the combined level, where an IO or File object encompasses IO::FSnode and IO::FSdata, etc.; and a gloss-over-the-details level with lots of sugar on top (at the expense of losing control over some details). Hmm. With the quoting idea, I don't see the need for a both type of object. I mean, I'd see the code happening something like this: if (path{/path/to/file}.e) { @lines = slurp(path{/path/to/file}); } Or... if (path{/path/to/file}.e) { $handle = open(path{/path/to/file}); } (I'm using one of David's suggested syntaxes above, but I'm not closely attached to it). I guess what I'm saying here is that I think we can do the things without people having to worry about the objects being separate unless they care. So, separate objects, but hide it as much as possible. Is that something you're fine with? In fact, having q, Q, or qq involved at all strikes me as wrong, since those three are specifically for generating strings. Pathnames still are strings, so that's fine. In fact, there are different Hmm. I'm not so sure; maybe I'm just being picky, but I want to clarify things in case it's important (in other words, I'm thinking out loud here to see if it helps). First, Q and friends don't generate strings, they generate string-like objects, which could be Str, or Match, or whatever. Think of quoting constructs as a way of temporarily switching to a different sublanguage (cf. regex), and you'll have the idea that I have in mind. As for pathnames being strings, you may be right FSVO string. But I'd say that, while they may be strings, they're not Str, but they do Str, as in roleIO::FSNode does Str {...} (FSNode may not be the right name here, but is used for illustrative purposes). things going on here; one is to have a way of conveniently quoting strings that contain a lot of backslashes. Just as Perl lets you pick different quotation marks, to make it easier to quote strings that have a lot of or ' characters, so it should have a way to make it easy to quote strings with a lot of backslashes. (The most obvious example being Windows paths; but there are other possibilities, such as needing to eval some code that already has a lot of backslashes in it.) Now, you can already turn backwhacking on or off via Q's :backslash adverb; Q:qq includes :b (and Q:q recognises a few limited escape sequences like \\). So you could say Q[C:\some\path], and you could add scalar interpolation to say Q:s[C:\some\path\$filename]. But there's no way to have all of: literal backslashes + interpolation + escaped sigils. Perhaps instead of a simple :b toggle, we could have an :escapeStr adverb that defaults to :escape\? Then you could have Q:scalar:escape(^)[C:\path\with\literal^$\$filename]. Maybe a global variable? It's an interesting idea, and I'll see how others feel :). The ultimate in path literals would be to establish a similar default delimiter. [...] `path`.size # how big is the file? Returns number. There's something that slightly jars me here... I don't like the quotation returning an IO object. (I like the conciseness, but there's something a bit off conceptually.) Hmm. But doesn't normal quoting return a Str object? And regex quoting return an object (Regex? Match? Something, anyway). Now, isn't Q:path[/some/file] just creating an IO object? Unlike /foo/, where foo just IS the pattern, /some/file is *not* an IO object, it's just a filename. So if the special path-quoting returned an IO::File::Name object, I would be perfectly happy. But you can't have $filename.size -- a fileNAME doesn't have a size, the file itself does. To get from the filename to the
Re: Filename literals
On Fri, 14 Aug 2009, Darren Duncan wrote: Richard Hainsworth wrote: Would it be possible to remove the special purpose of \ from strings within IO constructs? This would mean '\' could be used in naming paths as an alternative to '/', thus allowing windows and unix strings to be equivalent, eg. IO(:path{$root-path}/data/new) would be equivalent to IO(:path{$root-path}\data\new) The usefulness would be most evident for sub-directories as windows and unix have different ways of describing root, viz. 'C:\' versus '/' I see problems with this considering that \ is quite universally recognized in Perl (and many other languages) as meaning an escape character, and that moreover you generally need to be able to escape characters in any context building a string. Considering, though, that we're talking about a magic perl quoting syntax, we could offer people the option of the following two: q:io{C:\Windows} # Does what you want q:io:qq:{C:\\Windows} # Does the same thing Wouldn't that cover the bases pretty well? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Sat, 15 Aug 2009, Timothy S. Nelson wrote: Considering, though, that we're talking about a magic perl quoting syntax, we could offer people the option of the following two: q:io{C:\Windows} # Does what you want q:io:qq:{C:\\Windows} # Does the same thing Wouldn't that cover the bases pretty well? My bad -- try these: $file = foo Q:io{C:\Windows\$file} # Results in C:\Windows\$file q:io{C:\\Windows\\$file} # Results in the same thing qq:io{C:\\Windows\\$file} # Results in C:\Windows\foo HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Sat, 15 Aug 2009, Austin Hastings wrote: This whole thread seems oriented around two points: 1. Strings should not carry the burden of umpty-ump filesystem checking methods. 2. It should be possible to specify a filesystem entity using something nearly indistinguishable from standard string syntax. I agree with the first, but the relentless pursuit of the second seems to have gone beyond the point of useful speculation. What's wrong with File('C:\Windows') or Path() or Dir() or SpecialDevice()? Not to get all Cozens-y or anything, but chasing after ways to jam some cute string-like overloading into the syntax so that we can pull out the other overloading (which at least had the virtue of simplicity) seems pointless. The File::* functionality is probably going to be one of the very early p6 modules, and it is probably going to be in core. If that's true, why not allocate some really short names, ideally with 0 colons in them, and use them to spell out what's being done? S32/IO already specifies all these things as living in the IO namespace. That could be changed, of course. Neither q:io:qq:{.} nor qq:io{.} really stand out at excellent ways to say q:io{.} would be the normal case, unless you want variable interpolation or the like. And it would be possible to come up with shorter versions (someone suggested qf). this is a path, or directory, or file, or whatever. If it's plug-in-able, I'd take qq:file{.} or qq:dir{.} or qq:path{.}, but I'd rather see C File q{.} . I'm not particularly attached to :io if we can think of something better. These things often have a short name and a long name. I'm against file because the IO::File object models what is inside the file (ie. open/read/write/close/etc), whereas the IO::FSNode/IO::FileNode/IO::DirectoryNode/IO::LinkNode objects model stuff on the outside of the file. It's things of this second type that I'm recommending that we return here. We could change the names of the objects of course, but I'm keen on keeping the class that does stuff to the inside of the file separate from the class that does stuff to the outside of the file. Path might be a good alternative in my mind. Anyway, back to the :io name. An alternative might be to have the short name be :p and the long name be :path. That would mean that we could do: q:p{.} That's a fair bit shorter than Path(q{.}). Hmm. Let's compare some code samples: if (q:p'/path/to/file' ~~ :r) { say Readable\n; } if (Path('/path/to/file') ~~ :r) { say Readable\n; } $fobj = new IO::File(FSNode = q:p'/path/to/file'); $fobj = new IO::File(FSNode = Path('/path/to/file')); I used single quotes for the Path() things because I think that's what people would probably do. Now, say we want to use backslashes. if (Q :p {C:\Windows\file} ~~ :r) { say Readable\n; } if (Path(Q {C:\Windows\file}) ~~ :r) { say Readable\n; } Ok, so they're comparable. I've used curlies here just because I thought it was a good idea :). Anyway, we have possibilities. Further thoughts anyone? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
More ideas: On Thu, 13 Aug 2009, Hinrik Örn Sigurðsson wrote: # bin/perl on Unix my $rel = qf/usr bin perl/; # /usr/bin/perl my $abs = qf[/usr bin perl]; ...and on Windows, would the above result in C:\/usr\bin\perl ? :) # The following both result in the same object (kinda): # /usr/bin/perl on Unix, C:\usr\bin\perl on Windows my $abs = qf:unix[/usr/bin/perl]; my $abs = qf:win[C:\usr\bin\perl]; Just thinking out loud. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Thu, 13 Aug 2009, Hinrik Örn Sigurðsson wrote: Imagine two roles, Filename and Dirname (or Path::File / Path::Dir). I ...or imagine just one, called IO::FSNode. http://perlcabal.org/syn/S32/IO.html#IO::FSNode Btw, kudos for the special quoting idea -- I love it :). And in response to David Green and his comment about working with file data vs. metadata, as a systems programmer, I've written a fair number of programs that have worried a fair bit about the metadata in the filesystem; sometimes you want to read data, and sometimes metadata. That's why the Draft IO spec specifies two separate objects. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Filename literals
On Fri, 14 Aug 2009, Timothy S. Nelson wrote: On Thu, 13 Aug 2009, Hinrik Örn Sigurðsson wrote: Imagine two roles, Filename and Dirname (or Path::File / Path::Dir). I ...or imagine just one, called IO::FSNode. Sorry, I was stupiding again. I'll ask you to imagine 4: IO::FSNode | +-IO::FileNode | +-IO::DirectoryNode | +-IO::LinkNode Role composition tree depicted above. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: comments as preserved meta-data (was Re: Embedded comments ...)
I had an interesting idea I wanted to put out there. If I'm being a good boy and commenting my code, I do things like the following pseudocode: # Get the stuff and do other stuff with it @lines = slurp(file); @otherlines = map { s/foo/bar/ } @lines putfile(file, @lines); $t = 3; Anyway, my point is, how much of the code does the comment apply to. I was thinking it might be a good idea to have a comment that indicates when the code that the previous comment applies to ends. So you could have something like this: #{ Get the stuff and do other stuff with it @lines = slurp(file); @otherlines = map { s/foo/bar/ } @lines putfile(file, @lines); #} $t = 3; ...and then both people and parsers would be able to determine which part of the code your comment applies to, and we'd be able to automatically determine the comment coverage of our code, as well as the test coverage. I'm perfectly well aware that the syntax I suggested about conflicts with the existing Perl 6 spec, and I'd love it if people suggested a better alternative. Just to make myself clear, in the above example, I'm not commenting out any of the code, merely indicating which code the comment applies to. Anyway, just some thoughts... :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: xml grammar
On Fri, 31 Jul 2009, Raphael Descamps wrote: Hi, I have seen that wayland76 was playing with an XML Grammar on #perl6, so I think that it was maybe the time to send what I already have done. Raphael: I don't say any of this to discourage you, but to present alternatives to the list. Everyone: Just to note that, while I did essentially the same thing (starting with moritz's work, and going from there), When Krunen's grammar was pointed out to me, I used that instead: http://github.com/krunen/xml/tree/master However, Krunen's grammar has two bugs and no actions. One bug was an extraneous colon, and the other was something to do with comments, and was mentioned on #perl6, but I've forgotten it. However, my main reason for modifying it was that I needed actions for what I'm doing. So I'll keep working on that. The stuff I've done is here: http://github.com/wayland/Tree/tree/master :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Building on an installed Parrot (was: Re: Announce: Rakudo Perl 6 development release #19 (Chicago))
On Thu, 23 Jul 2009, Reini Urban wrote: Following up on the parrot-1.4.0 release check on cygwin the release errors are still not being touched. rakudo is still not being able to be built without a parrot build_dir. Building with installed parrot is unsupported, which means creating a package which is reproducible is impossible. Distros which do not have the policy to be reproducible to create binary packages from the src might have more luck. Sounds like you're just the man we need. There's a ticket that is specifically dedicated to Update configure script and makefiles for installed Parrot. http://rt.perl.org/rt3/Ticket/Display.html?id=63360 The latest patch (provided by me, but based on one by pmichaud) works for me on Fedora 10. pmichaud's patch is guaranteed *not* to work on Windows. I made the obvious changes, but we need some testing from a Windows person. I know there are a number of other problems on Windows (have you opened a ticket(s) for them), but I'd ask you to keep them out of this ticket unless they're related to the changes needed to build on an installed Parrot. Also, the patch I provided is against HEAD. $ git rev-parse HEAD 7b81c0590b4c371ba32f9998a35be5c48d6039e3 I'm informed that the command above tells me the relevant revision ID. Thanks, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Re-thinking file test operations
On Thu, 9 Jul 2009, Mark J. Reed wrote: A few months ago (or maybe more) I proposed making pathnames their own type, distinct from (or perhas a subclass of) strings, but easily constructed from strings, maybe with an operator. Having those 29 single-letter methods on such a class would not bug me as much as having them on Str. See S32/IO document for a rough outline I did of this some time ago. Feel free to hack away at it. Note that the documentation is spread across - IO::FSNode - IO::FileNode (does IO::FSNode) - IO::DirectoryNode (does IO::FSNode) - IO::LinkNode (does IO::FSNode) There's also an IO::FSNodeACL class for handling permissions, but that's only if you actually *want* to use these; the Unix ones are still there too. I got part way through speccing this, and then was told that my idea for Tree-related classes couldn't be part of the core, and so I'd have to monkey-patch them on afterwards; at that point, I went back to working on Tree, and left the Filesystem stuff alone. (Tree-related classes could be a role composed into both filesystem node classes, and Match thingies returned by grammars, but alas, monkey-patching will be necessary :) ). :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: YAPC::EU and Perl 6 Roles
On Wed, 8 Jul 2009, Ovid wrote: Note that I have no idea where (if anywhere) the type goes in this. Hopefully someone will correct me here. Note that this does not use the roles as roles; it uses them punned as classes. But it does what you asked :). Though I have issues with Jonathan's approach (I don't like classes silently discarding role methods as this has caused us many bugs at the BBC), it's much cleaner that what I see here. You see, with Jonathan's, you only have to provide methods for what you're disambiguating, It seems like your code would require that I specifically list every method which is handled, which would clearly get unwieldy with large roles or many roles. Did I miss something? I agree that's a problem, and hopefully one that should be solved. The solution I offered solves only your immediate problem. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: YAPC::EU and Perl 6 Roles
On Tue, 7 Jul 2009, Ovid wrote: role Bomb { method fuse (){ say '3 .. 2 .. 1 ..' } method explode () { say 'Rock falls. Everybody dies!' } } role Spouse { method fuse (){ sleep rand(20); say Now! } method explode () { say 'You worthless piece of junk! Why I should ...' } } class PracticalJoke does Bomb does Spouse { } class PracticalJoke { has Bomb $bomb handles fuse; has Spouse $spouse handles explode; } Note that I have no idea where (if anywhere) the type goes in this. Hopefully someone will correct me here. Note that this does not use the roles as roles; it uses them punned as classes. But it does what you asked :). :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: XOR does not work that way.
I'm just thinking out loud in this e-mail, trying to generate alternatives. What would happen if we had an operator that returned the number of true values? Say we call it boolean plus, or bop. To give one example: 1 bop 3 = 2 Say we're looking at: ($x 1) bop 3 bop ($y 0) To get the boolean-logic definition, we'd do: ($x 1) bop 3 bop ($y 0) % 2 To get the natural-language one, we'd do: ($x 1) bop 3 bop ($y 0) == 1 Drawbacks: - Extra typing - bop doesn't do xor for just 2 values, so we'd still need something for that Or, maybe we could somehow overload the and operator to do bop. Anyway, just thinking out loud. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: S03- Unicode feed operator, no prefix:=
On Wed, 10 Jun 2009, John M. Dlugosz wrote: I have trouble using the arrow character in general. It's because of the fonts: they have such tiny heads the arrow doesn't show well at all, or match the surrounding character style. So I tend to avoid them on web pages, and any document where I'm not fully controlling the font mapping and rendering. Allow me to mention that similar problems have existed for years in confusing '0' with 'O' and '1' with 'l' and 'I'. Note that some fonts have been particularly designed to distinguish these well (mostly the fixed-width fonts that programmers use). I would expect that similar well-distinguished fonts will appear as unicode becomes more popular. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: S03- Unicode feed operator, no prefix:=
On Wed, 10 Jun 2009, yary wrote: I'm about halfway through reading Synopsis 3 and have a couple comments/questions. Is there, should there be unicode synonyms for the feed operators? eg == is also ? lArr; LEFTWARDS DOUBLE ARROW == is also ? rArr; RIGHTWARDS DOUBLE ARROW I don't see as obvious candidates for == and ==, maybe LEFTWARDS , RIGHTWARDS TWO HEADED ARROW ? and ?. That's good in that the two headed arrow looks like the angle brackets, but then the arrow shaft isn't doubled, so it's more of a unicode synonym for -- I admit I haven't been following recent discussion, but I've been presuming that use Unicode::Operators (or whatever we're calling it now) will be an external module, and as such, not in the spec. Obviously there are some exceptions, such as those Unicode operators documented in the current specs. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: CPAN -- moving forward
On Sat, 30 May 2009, Daniel Ruoso wrote: 1) A package format. This is supposed to be a source format, but different from current model used in CPAN, it's pretty clear already that it can't include a build system, like ExtUtils::MakeMaker or Module::Install. There's already some consensus that this source package format should describe what it contains, not how it should be built or installed. For instance, it should only say something like in the lib directory there's a set of STD Perl 6 modules that don't require any low-level integration. Would it be accurate to describe this as specifying where things should be installed, but only at a high enough level that it's platform independent? Thanks, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Sat, 30 May 2009, Mark Overmeer wrote: * Timothy S. Nelson (wayl...@wayland.id.au) [090530 03:11]: On Fri, 29 May 2009, Alex Elsayed wrote: Instead, it would go to the distributions, who are already well-prepared to handle packaging. We'd just be providing the tools and material they need to do so. Let me reiterate that, while I'd love to have the complete CPAN available pre-packaged for my distro, it doesn't seem like that's necessarily going to happen. Certainly not if you need recent releases of modules, because someone fixed a bug for you. It can easily take a year before a distribution picks that up. ...or if I need a rare package that I need but isn't commonly requested. Thus, what I want is a tool that will allow me to download the source, turn it into a package for my distro, and install it. This is why I want the Software::Packager solution. Empower the user :). But that module does not contain anything which is required to produce packages for Linux distributions. Well, ok, I should say: it does not handle any of the complex things. Well, it should have the metadata; are you saying it won't have the build-install scripts? What decides how it gets built and installed then? Yesterday, I drew a picture of how I see services to happen. Having an automated service which is specialized in building debs and such. Now, such tools do exist, but are usually not published by the distribution makers. Maybe, you can collect those (and unify them) Could be far more complex than you wish for. Well, presumably, completely new ones will need to be developed to use this new framework[*] we're talking about. If we provide an interface that does some of the work for them, they might make adaptor modules for that interface instead of completely rolling their own. That's what I'm hoping for. [*] I'm using the word framework in the vaguest general sense here, that covers everything we've been discussing. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Daniel Carrera wrote: Timothy S. Nelson wrote: I can confirm that Redhat supports multiple versions: $ rpm -q kernel kernel-2.6.27.5-117.fc10.i686 kernel-2.6.27.12-170.2.5.fc10.i686 kernel-2.6.27.5-117.local.fc10.i686 AFAIK the way RPM implements multiple versions is by making an entirely different package. Like, for example, if you have Gimp 1.x installed, the package might be called gimp. When Gimp 2.0 comes out, if you don't want to remove the old Gimp, you make an entirely separate package called gimp2 with its own set of versions. No, this is not necessary. Let me paste what I said on IRC to Daniel after he sent the mail to which I am replying. [20:00] wayland76 Let me give the kernel example [20:01] wayland76 kernel-2.6.27.5-117.local.fc10.i686 [20:01] wayland76 package = kernel [20:01] wayland76 version = 2.6.27.5 [20:01] wayland76 release = 117-local [20:01] wayland76 distro = fc10 [20:02] wayland76 arch = i686 [20:02] wayland76 (I'm not 100% sure about distro there) The point is that we may have trouble scaling that to cover all the stuff that S11 says. I'm not saying it can't be done. I'm saying it might be difficult, as we'd be using RPM and DEB in a way that they were not intended. Well, I suggest that we do our best within their frameworks, and if necessary, allow people the option of installing outside their package manager if it can't support the features we're offering. Empower the user! Easy things easy, hard things possible. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: New CPAN
On Fri, 29 May 2009, Mark Overmeer wrote: * Daniel Carrera (daniel.carr...@theingots.org) [090528 16:07]: Mark Overmeer wrote: In March 2006, Sam Vilain and I started to think about a new CPAN what we named CPAN6. There is a lot of information about the project on http://cpan6.org I know about CPAN6, thanks. It's come up a couple of times on IRC. Perhaps you could hang out on the IRC channel so we don't have different people going off in different directions with CPAN. It's not a discussion like let's make a change to the current set-up, so IRC doesn't seem to me a good spot to discuss it. I gave various talks on YAPC's and interviewd a few of the CPAN maintainers. Workshops, Hackathons and YAPCs are more suitable. I support Daniel in that you should expect to miss things if you don't hang out on IRC. But I support Mark in the idea of longer formats, although I think 30 pages is a bit long. I've skimmed the document, though, enough to know what I need to know at the moment, I think (please correct me if I'm wrong). I'd like to suggest to Mark and Daniel that, seeing as I won't be making it to any Perl event outside Australia, and maybe not even some inside, and Mark can't keep up with IRC (my sympathies there), that the best place for such a discussion might be a mailing list such as p6l! (No sarcasm intended -- I'm saying you're doing the right thing, keep it up :) ). Trying to keep-up with normal email is already a daily struggle. Besides, having 9 hours time-difference with the West Coast doesn't help: when they wake-up at 8, I am just getting my 2 yr old son from Kindergarten back home. And when he finally sleeps, I am tired ;-) Mark: There's usually someone awake somewhere, even if it's only me here in Australia. DanielC: Don't argue with his time management until you have children. I don't, either, but I can see what a time-sink a family would be (even good things have their downsides). A) Can we add version, target flags to CPAN metadata? I was thinking that current modules would all be version=1 and target=perl5. CPAN does not have an official concept of version numbers on distributions, but only on the pm files which are inside the distribution. I know, thanks. I was suggesting a change. I had a discussion of two days about versions with Sam Vilain. What we came up with, is that there is only one solution: versions need to be strings without meaning. Of course, you can help yourself using some kind of logic sequencing these strings, but everyone has different ideas about how to do that. Who (besides Perl people) expect 5.10 after 5.8? Err, lots of people? The Linux kernel does its versions this way, so most people in the Open Source world are familiar with it. RPM seems to be able to handle things just fine, too. Example: kernel-2.6.27.5-117.local.fc10.i686 Version = 2.6.27.5 Release = 117.local The Version can be split up on the dots, and each compared numerically if available, and as strings if there are non-numerics. Allow me to point out that all the package managers out there have solved this problem, so it must be solveable. The solution is simple: each release has a unique version string. The release also lists as meta-data what kind of follow-up it is to which existing release. For instance: 5.10.0 diverts from 5.8.8 (upgrade) 5.8.9replaces 5.8.8 (update) 5.10.1-blead diverts from 5.10.0 (devel) 5.10.1 replaces 5.10.0 and 5.10.1-blead (merge) It may be useful to have these as recommendations, but I would hope that user policies and choices would be able to override them. D) In addition to target=perl5 and target=perl6 we could have target=parrot. IMO, we need many more. What you call target is actually a namespace. The current CPAN archive has only one target. Target, namespace, same difference. It's an identifier to divide modules into categories. Well... do you need all archives to share one infrastructure? I think it is nicer to have people being able to open-up CPAN-like archives with additional features. For instance, if someone wants to publish pre-compiled PIR versions of modules, then s/he should not need the assistence of the core CPAN. With an URI namespace, you address an archive where you can find the data. A part of that namespace (URI fragment) could be a target within the archive. While I've no objection to building the end-user software to support multiple repositories, I know that there are certain segments of the community who are very very keen to keep everything in the one repository. I'd agree with them, on the following conditions: - CPAN accepts packages in Perl5, Perl6, and anything else that runs on Parrot - Some of the other changes mentioned here get implemented (ie. Larry's idea of putting binary packages on CPAN as well) I have also been wondering about the idea of making CPAN a clearing
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Mark Overmeer wrote: * Alex Elsayed (eternal...@gmail.com) [090528 22:17]: While lurking in IRC, I've seen several discussions of what CPAN 6 should look like. I would really like to see a split in terminology being used for the various seperate problems. The traditional confusion about what CPAN is: an archive or an install tool. Package manager discussions are in the process AFTER the install tool: to distribute OS changes to be made. In the messages on the list, I see people merge requirements of these very independent tasks. Ok, here's some terms I've picked up: These are from Mark's Paper: - CPAN6: a general infrastructure to create and distribute archives - Pause6: one implementation of archive management - CPAN6.pm one transport mechanism to install Perl modules from Pause6 archives (or presumably any CPAN6 server) I've rephrased them in S22 as: * CPAN6; this is a piece of software for managing an archive network (such as Pause6, below). This is not specified in this document; see http://cpan6.org/ * PAUSE6; this is an actual network based on the CPAN6 software (see above). It also is not documented here. * CPAN6.pm; this is a piece of software that starts with what it can get on PAUSE6, and attempts to give you an installed perl module (this is a replacement for CPANPLUS/cpan2dist) I've replicated that here so that Mark et. al. can verify or deny that we're thinking the same thing. Please keep in mind that if I got them wrong, I'll be using the S22 definitions in the rest of this e-mail. The area I'm interested in overlaps mainly with CPAN6.pm. I think that package managers are not a CPAN related problem at all. The Perl install tool decides which files it wants to have within some file-system tree and versioned environment, and then package managers distribute those files and meta-data. The terms you've used here are so general that they could describe any one of a number of things. I'd like some concretification or something. Example? Also, there are various different package managers around for Linux distributions, and they tend to be replaced every few years. If you want people to use Perl modules on their Linux systems in a convenient way, you have to distribute each perl module in all of the existing formats. Of course, a tool like alien can be used to simplify the task of creating all these flavors. Have you seen Software::Packager? It's a Perl5 module that's designed to create a source package* for any supported package manager. Unfortunately, CPANPLUS has never used it. This is the part of the whole discussion that interests me the most, because it's where my problems have lain. Just for the record, I'm interested in having a Software::Packager port/rewrite be part of the installation tool; overlapping what you're calling CPAN6.pm. I'd like to suggest a further terminology split: - 6PAN: command-line install tool - CPAN6.pm: Module relied upon by 6PAN for interactions with Pause6 - Software::Packager: Module relied upon by 6PAN for interactions with the local packaging system, and for installing files. If there are no objections, I'll pop these in S22 as well. Having clarified the terms, I'd urge people not to use the term CPAN without qualifiers in the discussion any more, as it conflates things. IMO, that discussion should go in the direction of additional services: the CPAN archive distributes what authors publish. The install tools (CPAN.pm/CPANPLUS/successors) make that code fit in specific operating systems. As a service, other people can publish the results of their specific module installation via package-managers to the world, such that those people can use they platform native software management tools. Just like search.cpan.org is an independent additional service on the CPAN archive. Are you arguing here for eg. a yum/apt/whatever repository on Pause6? I personally believe that there are a few requirements for a package format that is sufficient for Perl 6: * It must enable packaging for both binary- and source-based distros * It must enable automatic generation of packages for supported systems (although it may well not be capable of it out of the box) Just to clarify, this is what I want :). * It must permit (or preferably help with) attempts to support new systems * It must be simple to submit packages in the correct format * It must enable the design and building of an automatic testing system The worst flaws in software design are based on the idea that you can organize the outside world. The Perl community will never be able to push its packaging mechanism into Linux distributions. We may be able to select the ideal packaging mechanism, and then they will wrap that in their own packaging mechanism. Agreed. I've chosen my package manager, and I'm
Re: New CPAN
On Fri, 29 May 2009, Daniel Carrera wrote: Timothy S. Nelson wrote: While I've no objection to building the end-user software to support multiple repositories, I know that there are certain segments of the community who are very very keen to keep everything in the one repository. After reading the Zen of Comprehensive Archive Networks (ZCAN), I think there is very good reason for retaining the current infrastructure with the current, large, set of mirrors. That is not to say that we can't upgrade the packages and metadata. Agreed. I'd agree with them, on the following conditions: -CPAN accepts packages in Perl5, Perl6, and anything else that runs on Parrot CPAN shall not piggyback another language -- from ZCAN. Judging from the ZCAN page, I don't expect that uploading Ruby modules to CPAN will go well, even if that module can be compiled to Parrot. The ZCAN page gave good reasons for this. I didn't find them compelling, myself. Because it's possible to call the Ruby modules from Perl6 now, if they're compiled on Parrot, it may be worth thinking about. -Some of the other changes mentioned here get implemented (ie. Larry's idea of putting binary packages on CPAN as well) I personally don't care. But some mirrors might object to having their disk usage go up 5-fold because we decided to include binaries for many operating systems and CPUs. I agree that's a problem. However, the recent suggestion of multiple repos on CPAN for the different OSs has given me an idea; make it possible to mirror CPAN for a certain set of architectures, ie. Source only (this is the default), Fedora, Debian, Nokia, etc. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Amazing Perl 6
On Fri, 29 May 2009, Jon Lang wrote: On Fri, May 29, 2009 at 6:52 AM, John Macdonald j...@perlwolf.com wrote: Yep, I've done that. But comparing the difference in effort between: - press a key - Google for a web page that has the right character set, cut, refocus, paste means that I don't bother for the one or two weird characters every few months that is my current Unicode usage. If I were working with Unicode frequently, it would be worth setting up links and mechanisms, or learning the keyboard compose sequences for frequently used characters. I'm sure that there are many people in a similar situation. Agreed. Given the frequency with which « and » come up in Perl 6, I'd love to be able to have a simple keyboard shortcut that produces these two characters. Unfortunately, I am often stuck using a Windows system when coding; and the easiest method that I have available to me there (that I know of) is to pull up Character Map. There's some standard that says this is how to generate unicode: 1. Hold down Ctrl+Shift 2. Press U 3. Type the hexadecimal for the unicode character 4. Release Ctrl+Shift I'm under the impression that Windows supports this in some circumstances, and I know some Linux programs support it too. Unfortunately my e-mail program (Pine) seems to have some trouble with unicode -- I may have to look at alternatives after 14 years of use :(. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [Fwd: Re: New CPAN]
On Fri, 29 May 2009, Austin Hastings wrote: How about Parrot? Because the SMOP Perl 6 implementation doesn't target Parrot, and won't, and we want to include them too. Likewise other P6 implementations. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Mark Overmeer wrote: * PAUSE6; this is an actual network based on the CPAN6 software (see above). It also is not documented here. Pause6 is one implementation of archive maintenance software. In the first version written in Perl5, it implements things like I'm still not sure we're on the same page. Let me give an example: - HTTP is a specification - Apache is an implementation of a server for that specification - www.example.com runs a copy of Apache Or another example: - Perl6 is a specification - Rakudo is an implementation of that specification - www.example.com runs a copy of Rakudo (to serve their site) So we have: - Specification - Implementation - Installation Which of those is CPAN6? Which is Pause6? Your use of the word implementation is confusing me; I'm saying Pause6 is the installation (accessible to the world). Is that what you're saying? HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Daniel Ruoso wrote: So, I'd expect to have a Debian archive, in the Debian case, hosted by the Debian Perl group (which packages about ~ 500 CPAN modules to Debian today) with the binary packages targetting each of the Debian versions... The same would go for RedHat and other linux distros, while for the Win32 world, we would have something in the lines of what ActiveState already does... But, I insist, CPAN should only store the source packages and the source metadata should only describe what are the sources, and not how to compile and install them... Nononono. Some of this is what I'm trying to get away from. I semi-regularly want to use packages that have never been RPM-ed by anyone, or at least not a recent version. I want an auto-building tool. I could live without CPAN-or-whatever having the binaries stored in a public place, but I want to be able to auto-generate an RPM from and CPAN package. I hope we can work out a sensible solution that keeps us all happy. I'm following the discussions of DanielC and MarkOv with interest. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Alex Elsayed wrote: This problem strikes me as intractable - I think the only thing we can do is provide a dependency specifier, clearly tagged as being external to the CPAN 6 archive, with a sensible name that allows a human to intervene and find the correct package for their distro. ...and a store of common mappings for various distros :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Amazing Perl 6
On Fri, 29 May 2009, John M. Dlugosz wrote: Ah yes, on the PC historically you hold down the ALT key and type the code with the numpad keys. At least when I used it, this was a decimal, rather than hex number, and had to be preceded by a 0 (zero). So if anyone is still on eg. Windows 98, this may be the way to go :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Fri, 29 May 2009, Alex Elsayed wrote: IMO, that discussion should go in the direction of additional services: the CPAN archive distributes what authors publish. The install tools (CPAN.pm/CPANPLUS/successors) make that code fit in specific operating systems. As a service, other people can publish the results of their specific module installation via package-managers to the world, such that those people can use they platform native software management tools. Just like search.cpan.org is an independent additional service on the CPAN archive. And once again we run into an issue: This workflow would require that each end user, rather than using /only/ CPAN(PLUS)? or /only/ their package manager to install, they are forced to use one to generate packages, and then the other to install them! By providing a very open metadata spec, we can make it so that neither the Perl community nor the end-users need to take on that burden. Instead, it would go to the distributions, who are already well-prepared to handle packaging. We'd just be providing the tools and material they need to do so. Let me reiterate that, while I'd love to have the complete CPAN available pre-packaged for my distro, it doesn't seem like that's necessarily going to happen. Thus, what I want is a tool that will allow me to download the source, turn it into a package for my distro, and install it. This is why I want the Software::Packager solution. Empower the user :). Also. TMTOWTDI. I'd like it so that the solution allows for: - People who want to install distro-packages from repos (this would require nothing on the client side except yum/apt repo config) - People who want to build their distro-packages locally and install them - People who want to build their distro-packages locally and not install them - People who want to install the software directly into the Perl directories without packaging them for their distro at all Metadata++, though. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: renaming or adding some operators
On Fri, 29 May 2009, Jon Lang wrote: On Fri, May 29, 2009 at 6:53 PM, Darren Duncan dar...@darrenduncan.net wrote: I had some thoughts lately about the Perl 6 operators, and wanted to bounce some ideas. Firstly, regarding the string replication ops as documented in Synopsis 3, 'x' and 'xx', I'm wondering whether it might be better to have something that incorporates a '~', since that operation is about catenation. Would perhaps '~*' work better than 'x' to signify better what the operation is doing; the '~' in this case means catenation and the '*' is meant to invoke 'multiply', not 'whatever'. So '~*' means catenate a multiple of times. This would then free up 'x' to be used for something else, if anything. As for a substitution for 'xx', I'm less sure about that. Thoughts? I wouldn't mind 'x' becoming '~x' and 'xx' becoming 'x'; it strikes me as a lot more intuitive - and I've wanted to see this done for a while now. I suppose that you might also introduce a '?x' and/or a '+x' to complete the set, though for the life of me I can't think of how they'd work or what they'd be good for. How about if xx became x, and then we did things like: [~] @list x $count ...to get the string replciation? HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: New CPAN
On Fri, 29 May 2009, Mark Overmeer wrote: * Timothy S. Nelson (wayl...@wayland.id.au) [090529 11:26]: I'd like to suggest to Mark and Daniel that, seeing as I won't be making it to any Perl event outside Australia, and maybe not even some inside, and Mark can't keep up with IRC (my sympathies there), that the best place for such a discussion might be a mailing list such as p6l! (No sarcasm intended -- I'm saying you're doing the right thing, keep it up :) ). Once some people want to spend time on details of the subject, I suggest to revive a separate mailinglist for it. The list which we started two years back was never used. Installation/distribution is a complex matter with many aspects to be discussed, so deserves its own list simply not to bother the (quite independent subject of) Perl6. What's the mailing list called? And is it gone, or active-unused? Who (besides Perl people) expect 5.10 after 5.8? Err, lots of people? kernel-2.6.27.5-117.local.fc10.i686 Eh, yes of course. That problem is only inside perl programs, where version numbers are considered floating point numbers. Where 5.8.8 == 5.008008 == 5.008_008. And then you have test versions like 68.17_02, which are broken floats and therefore flagged as development versions. I believe Perl 6 explicitly supports a version type that handles some of this (I know that's not a general solution, but still...). Allow me to point out that all the package managers out there have solved this problem, so it must be solveable. Yes... but that also means that for some packaged products, versions need to get translated into a different versioning scheme. That may be the case, but it's probably the worry of Software::Packager. Hopefully we can make it cope. One of the main problems with the current set-up is the very limited pre-information about the installation available to CPAN.pm. It downloads a 02packages.details file which does not contain info about dependencies and such. One of the much heart complaints from normal Fixing this++ My internet connection is very fast. Yours probably as well. We don't care about this, do we? I do! :) IMO, fragmentation is crucial: you can not stack the load on a small group of dedicated people because they burn-up that way. People must be able to fork their own pet project, like search.cpan.org. And yes, that enlarges the chance that such a project dies. But that's normal evolution. At least, you have dedicated people with a work-load of their own choice. The thing is, CPAN is mirrored everywhere. If fragmentation occurs, some parts that are not mirrored may not be completely lost. I guess that's my fear. Anyway, I hope some of this helps. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: renaming or adding some operators
On Fri, 29 May 2009, Darren Duncan wrote: Timothy S. Nelson wrote: How about if xx became x, and then we did things like: [~] @list x $count ...to get the string replciation? Maybe you meant this? [~] $item x $count No, I'm pretty sure I meant what I wrote. But if x coerced $item into a list (treated it as a list of one item), then that would work too. I like that a lot. And we could still have ~x as a shorthand for that specific case since it would likely be used often enough. Well, if we think it warrants it. About the only P5 operator I use less than x are the bitwise ones, and the '...' operator. And maybe modulus. If I only had the one replication operator to remember, I think I'd prefer it. But I'm happy with whatever Larry decides. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [RFC] CPAN6 requirements analysis
On Thu, 28 May 2009, Alex Elsayed wrote: On Thursday 28 May 2009 4:04:28 pm Daniel Carrera wrote: At first I liked wayland76's proposal, but now I have a new concern: Most package managers are not designed to hold multiple versions of the same package. As indicated in S11, it is important that a computer can hold multiple versions of the same package. I fear that using the native package manager will make this difficult. This could probably be resolved, but it would probably require distro-specific code. On Gentoo, the way to do it would be with 'slots', which are specifically designed for that use; on Debian, it would seem that the names would have to be distinguished by an identifier, allowing multiple versions. I can confirm that Redhat supports multiple versions: $ rpm -q kernel kernel-2.6.27.5-117.fc10.i686 kernel-2.6.27.12-170.2.5.fc10.i686 kernel-2.6.27.5-117.local.fc10.i686 ... Whether it supports everything that Perl 6 wants is a different question. The options would be: - Embed more metadata into the version (version can contain arbitrary text) - Tell people that if they want to use multiple versions at the same time, they have to not use RPM for those modules at least. There may be some middle way, where we can keep the extra metadata out of the version unless there are conflicts. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Amazing Perl 6
On Thu, 28 May 2009, John M. Dlugosz wrote: John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if process is supposed to mean that everyone is capable of generating Unicode in the messages that they are writing. I don't create non-English text often enough to have it yet be useful to learn how. (I'd just forget faster than I'd use it and have to learn it again each time - but Perl 6 might just be the tipping point to make learning Unicode composition worthwhile.) Just copy/paste from another message or a web page. Perhaps a web page designed for that purpose... Or: setxkbmap -device $kbd-{ID} 'us(intl),gr(basic),il(biblical)' \ -option grp:switch,grp:scroll_toggle,grp_led:scroll,lv3:ralt_switch (Worksforme on Fedora 10) Where the -device option chooses a keyboard (defaults to the core keyboard); if you need the number, use xinput list. That will let you type in English, Greek, and Hebrew, with lots of funny symbols accessible by pressing the right alt key, and using the scroll lock key to switch groups. Oh, actually, I thing the scroll lock stuff only works on my computer. But I'm sure you get the idea :). And the APL keyboard layout will appear in xorg soon, as soon as the xkeybaord-config exotic layouts issue is closed. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Idea: Literate programing
On Tue, 26 May 2009, Daniel Carrera wrote: Carl Mäsak wrote: In this way, a relatively simple change makes Perl 6 Pod able to do literate programing for anyone who is interested. What do you think? That it sounds like a good idea for a sublanguage-extending module. I'm not familiar with those. Are they hard to make? I guess that it is perfectly reasonable to make this a separate module. How would it work? They may not be possible as the code currently stands, but according to the spec, they'll be relatively easy once you have a grip on grammars. A grammar groups regexes in the same way a class groups methods. Perl 6 itself is a grammar. So you have 3 steps: 1. Make your own grammar that inherits from the Perl 6 one 2. Override the rules that need changing 3. Replace the Perl 6 grammar with your own. Steps 1 and 3 are dead easy. Step 2 varies in difficulty depending on the changes you're making. Step 1 is something like this: grammar MyPerl6 is STD { ... } Step 3 will be something like this, I think: $~MAIN = MyPerl6; See the section on Grammars in S05. http://perlcabal.org/syn/S05.html HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Meditations on a Loop
On Fri, 22 May 2009, Jonathan Worthington wrote: Daniel Ruoso wrote: Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu: @primes = do $_ if prime($_) for 1..100; becomes @primes = $_ when prime($_) for 1..100; you gained one stroke, it's certainly better... I think it's time to play golf with Perl 6 already ;) jokes aside, $_ when prime($_) looks more natural than do $_ if prime($_) Yes and: @primes = 1..100.grep: { prime($^n) }; Is actually vaguely, like, readable AND two characters shorter than the best you've managed so far. Oh, if we're looking for readability, I'd look for: 1..100.grep: { prime($^n) } == @primes; It's longer, though :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Meditations on a Loop
On Wed, 20 May 2009, John M. Dlugosz wrote: If you would be so kind, please take a look at http://www.dlugosz.com/Perl6/web/med-loop.html. I spent a couple days on this, and besides needing it checked for correctness, found a few issues as well as more food for thought. John, I very much enjoyed your article. I'm hoping that at some point, it would be possible to merge it into U4X, which is the Userdocs for Christmas project (I think Carl Masak is the appropriate contact person for this). And I think Daniel Ruoso is probably the appropriate person to be able to talk intelligently about iterators. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Unicode bracketing spec question
On Thu, 23 Apr 2009, Helmut Wollmersdorfer wrote: Timothy S. Nelson wrote: I note that S02 says that the unicode classes Ps/Pe are blessed to act as opening and closing quotes. Is there a reason that we can't have Pi/Pf blessed too? I ask because there are quotation marks in the Pi/Pf set that are called Substitution and Transposition which I thought might be cool quotes for s/// and tr/// :). You mean 2E00 - 2E2F Supplemental Punctuation New Testament editorial symbols [...] 2E02 LEFT SUBSTITUTION BRACKET 2E03 RIGHT SUBSTITUTION BRACKET [...] 2E09 LEFT TRANSPOSITION BRACKET 2E0A RIGHT TRANSPOSITION BRACKET That sounds like them. But if you really want to use these characters, your source will be hard to read without exotic fonts. You have been warned;-) My fonts don't show them either. But we could call it job protection ;). :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Unicode bracketing spec question
I note that S02 says that the unicode classes Ps/Pe are blessed to act as opening and closing quotes. Is there a reason that we can't have Pi/Pf blessed too? I ask because there are quotation marks in the Pi/Pf set that are called Substitution and Transposition which I thought might be cool quotes for s/// and tr/// :). Key for those like me who are not /au fait/ with Unicode. [Ps]Punctuation, Open [Pe]Punctuation, Close [Pi]Punctuation, Initial quote (may behave like Ps or Pe depending on usage) [Pf]Punctuation, Final quote (may behave like Ps or Pe depending on usage) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
%ARGH
Hi all. Can we change %*OPTS to %*ARGH ? By analogy with @ARGS, but a hash of args? I've always used that, and kind of like the amusement factor :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: some questions about S02(type)
On Sat, 4 Apr 2009, Darren Duncan wrote: Speaking of libraries, I already implemented a table type ... it's called Set::Relation/::V2 and its on CPAN right now ... for Perl 5 ... I still have to port it to Perl 6, unless someone else wants to do that, but I designed it so that would be easy to do. The port could stand for some additional Perl 6 savvyness too. Can it be attached to an SQL backend? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: some questions about S02(type)
On Sat, 4 Apr 2009, Xiao Yafeng wrote: 3. Could I define primary key for a bag variable? All items in a Bag are primary keys, but there's no data additional data associated with it. I mean whether I can see Set as a table and Bag as a table with a unique constraint? like: subset test of Bag(test_name Str, test_ID Int, primary key(test_ID)) I don't think you can really do something like that. Perl 6 as specified leaves many things up to libraries. Implementing a Table type will no doubt be one of those things. I would like to have a Table type that will work well with the Tree/Plex type that I am working on. In the meantime, a table would need to be represented as an array of hashes, or a hash of arrays. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: some questions about S02(type)
On Fri, 3 Apr 2009, Moritz Lenz wrote: Xiao Yafeng wrote: 1. Could I set multi-return type?like sub test as (Int, Str) {...} as is coercion - so to what would it coerce? Int or Str? How could the compiler know? Or do you mean something like a tuple? I think he wants something like: sub example( - Int, Str) { ... return(3, 4); } my($a, $b) = example(); $b.isa('Str') and say b is a string; # says b is a string ...and hasn't learned the p6isms that express that. In other words, he wants to return multiple values, but enforce certain types on them. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Grammars that generate stuff
Hi all. I've been thinking about stringification, forms, and things like that. As exegesis 7 points out, sprintf, pack, and the forms language all essentially take data and specifies how to turn it into a string (I'm using string loosely here). Likewise with .perl -- it takes some data, and turns it into a string formatted in a particular way. Perl 6 has a general language (grammars) for taking some input and a grammar, and separating the data from the formatting, as it were. What's made Perl 6 so much more powerful in this area is the grouping of regexen into grammars. I'm wondering if we can't come up with a language that does for output formatting what grammars do for input formatting. For example, say we could create something called an outputgrammar. We could do something like this: grammar XMLIn {...} outputgrammar XMLout {...} My thought is that you would then be able to read an XML document using the XMLin grammar, do a transform or two, and then rewrite it almost identically (except the changes) with the outputgrammar. Ideally, it'd be possible to specify one grammar that would act both for parsing output and formatting input. This may not be possible, but I like the idea. It may already be possible to mock up some of these things (a hash array of sprintf formats?), but I'd be interested in seeing some discussion on what's possible. Of course, if this has already been discussed, I'd love to read about it -- please send links. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Logo considerations - 3 logos needed
On Wed, 25 Mar 2009, Nigel Hamilton wrote: I like the Camelia it's colourful, fun - it even has an embedded, sideways reference to a Camel. But IMHO there is a need for three logos: I'm not so sure 1. Combined Parrot + Rakudo [snip] 2. Rakudo My understanding was that Rakudo only runs on top of Parrot. Either way, I don't see why we need a logo for Parrot + Rakudo, any more than we need separate logos for Perl on Linux and Perl on Windows. Or, to look at it a different way, I thought the definition of Rakudo *is* that it's Perl 6 on Parrot. Additionally, while you recommended Camelia for Rakudo, my understanding was that Larry was recommending it for Perl 6 rather than Rakudo. So, I guess I see a need for 3 logos as well, but one of them is already decided: 1. Parrot needs and already has a logo (already decided) 2. Perl 6 needs a logo. My current vote for this is for Camelia. When I say Perl 6 here, I'm including the specs, the test suite, STD.pm, and any Perl 6 implementations. 3. Rakudo needs a logo. My current vote would be for some combination of Camelia (or whatever we choose as the Perl6 logo) and the Parrot logo. Maybe you're thinking the same thing as me, and using different words. Or maybe not. Anyway, I think something here needs clarification for at least one of us. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Logo considerations
On Tue, 24 Mar 2009, Damian Conway wrote: Earlier I wrote: Maybe just something like one of the attached graphics (only redone by someone with actual graphical design skills ;-)? It occurs to me that this comment might be misread as an implied criticism of Conrad's original artwork as well. Just wanted to make it very clear that was definitely not the case. Feel free to criticise mine, though -- the logo I did needs rework using graphic design skills, rather than cut + paste. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Logo considerations
Firstly, I'd like to speak in favour of the idea of designing a logo for Perl6, and then creating a Rakudo logo based on the Perl6 logo and the Parrot logo. From here on, I'll be addressing the Perl6 logo. On Tue, 24 Mar 2009, Larry Wall wrote: On Tue, Mar 24, 2009 at 09:49:42AM -0700, Jon Lang wrote: : 2009/3/24 Larry Wall la...@wall.org: : http://www.wall.org/~larry/camelia.pdf I vote for this at the moment, but I'd still like to see other proposals now that we have some more direction. Not picking on you in particular, but I think there's a tendency to go way too abstract in most of these proposals. I want something with gut appeal on the order of Tux. In particular I want a logo for Perl 6 that is: Fun Cool Cute Named Lively Punable Personal Concrete Symmetric Asymmetric Attractive Relational Metamorphic Decolorizable Shrinkable to textual icon Shrinkable to graphical icon These criteria seem to eliminate all of the other existing logo proposals. However, some of them could be redesigned to fit these criteria. I'd like to ask, though, that all future logos include both the text and the graphical version. In addition, you can extend just about anything by attaching P6 wings to it. I also take it as a given that we want to discourage misogyny in our community. You of the masculine persuasion should consider it an opportunity to show off your sensitive side. :) In spite of what you said about the butterfly being enormous, I'd like to suggest that one advantage of having a butterfly is that we could believably have it sitting on top of the Parrot (enormous parrot too?). In response to those asking for a professional designer, I'd like to see us go around a few more times here, and see if we can't come up with at least a good concept that could hopefully be used/stylised by a real graphic designer, so that we might end up with something like the Parrot logo. Now that Larry's provided some criteria, let round 2 of the design process begin! :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Btw, I think these logo discussions have just proved the bikeshedding idea :)
- | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Logo considerations
On Mon, 23 Mar 2009, Richard Hainsworth wrote: My choice would be a lion, perhaps one lazing in the sun. The meaning that it is lazy, but it has raw power when it needs, and is the king of the jungle. Is there a way we can also show it to be impatient and hubristic? :) Alternatively, if we stay away from animals, then how about something to do with parallelism, or super-positioning, or even a strange attractor, since perl6 can be strange and yet it is attractive. Ok, I've attached a logo mockup of lazy, (supposedly) parallel lions that are strangely attracted to each other. Think of this logo mockup as a wiki -- feel free to hack on it, especially if you can get the lions to be hubristically superpositioned while also remaining parallel and attracted. HTH, - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK- attachment: logo.jpg
Re: Logo considerations
On Tue, 24 Mar 2009, Timothy S. Nelson wrote: On Mon, 23 Mar 2009, Richard Hainsworth wrote: My choice would be a lion, perhaps one lazing in the sun. The meaning that it is lazy, but it has raw power when it needs, and is the king of the jungle. Is there a way we can also show it to be impatient and hubristic? :) Alternatively, if we stay away from animals, then how about something to do with parallelism, or super-positioning, or even a strange attractor, since perl6 can be strange and yet it is attractive. Ok, I've attached a logo mockup of lazy, (supposedly) parallel lions that are strangely attracted to each other. Think of this logo mockup as a wiki -- feel free to hack on it, especially if you can get the lions to be hubristically superpositioned while also remaining parallel and attracted. Or, if we made the magnetic lines of force hexagonal (inspired by Conrad Schneiker), and superpositioned (ie. superimposed) the whole thing over the Parrot logo, that would be kinda cool. Although if we keep going like this, the logo will look like a Graeme Base picture. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Dallas.p6m
On Thu, 19 Mar 2009, Andy Lester wrote: I think it would be better to call it Dallas.pm and just talk about Perl 6 in the meeting announcements. The key is that we don't want people to think they must choose one or the other. Technologically, Perl 5 and Perl 6 are very different, but culturally, they're very similar. Keeping Perl 5 and Perl 6 groups together also means that we will increase cross-pollination of Perl 6 onto the Perl 5 people. While I don't deny the truth of what you're saying, it seems to me that languages get a buzz with the newness factor; people are interested in them for no reason other than that they're new. It seemed this way to me with Python and Ruby, and probably Java too. I'm wondering if we can't get the newness factor by branding Perl 6 slightly differently, while at the same time carrying the existing Perl community across the 5/6 boundary. In other words, I think the situation should be a both/and, not an either/or. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Masak List, take 3
On Mon, 9 Mar 2009, Patrick R. Michaud wrote: On Fri, Mar 06, 2009 at 01:37:16PM +1100, Timothy S. Nelson wrote: I guess the way I decide things like this is: - If it's a method on a role/object, then it lives in S32 - If it's not a method, then it lives in S29 Do we have many things that aren't methods? As few as possible :). The things that remain in S29 are mostly not methods, but even a few of those are. * Should there be a way to extract information about a Rat's numerator/denominator? What methods does a Rat have? I'm also curious about extracting real and imaginary components from Complex. Specced. Feel free to suggest name changes. # true(), not(), also methods On? Ctrue is a method on Object (S02:3391), I suspect that Cnot is also (S03:3282). Beyond that, I think that what one would think of as true() or not() are really prefix:true and prefix:not, and not functions in the normal sense. Operators, rather than functions? But if they're also methods, won't they have to be defined separately, rather than putting is export on the method? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: [pugs-commits] r25698 - docs/Perl6/Spec/S32-setting-library
On Thu, 5 Mar 2009, Patrick R. Michaud wrote: Log: - Moved defined and undefined from Scalar.pod to Any.pod, as per signature ... +=item defined + + our Bool multi defined ( Any $thing ) + our Bool multi defined ( Any $thing, ::role ) + our Bool multi method defined ( Any $self) + our Bool multi method defined ( Any $self, ::role ) Surely defined is a method on CObject ? I made the assumption of Any because the existing signature allowed Any as its type. Presumably the question we need to answer is whether Junctions can be undefined, since, if I understand correctly, Junction and Any compose from Object, and everything else composes from one of these. Of course, I could be wrong again :). After reading S02, though, I think I come to the same conclusion as you -- .defined should be on Object. In the methods above, if $self is intended to be the invocant, I think it needs to have a colon after it. I was wondering about this. In that case, I think this mistake needs correcting elsewhere. I'll do it. Also, I personally would prefer to not see explicit typing on the invocants to most methods. Agreed. I wonder what I was thinking :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Masak List, take 3
I've done some more fiddling based on Carl Masak's updated list. * I see the sub version of defined declared in S29. Is the method version (used in S02:519) also in S29? I can't see it, but I might be missing something about how method signatures work. I've moved it to S32/Any.pod, and declared the method version. * Should the methods .new and .clone be covered by S29? They're slightly different beasts than abs or push, but they're still in a sense builtin functions in Perl 6. I guess the way I decide things like this is: - If it's a method on a role/object, then it lives in S32 - If it's not a method, then it lives in S29 - If it's a method, but can also be used as a function, then it lives with its object in S32, but has a cross-reference from S29 * Same question for BUILD and CREATE. * What about metaclass methods, like .HOW.methods? Should they be covered in S29? S32, according to above theory. * Should there be a way to extract information about a Rat's numerator/denominator? What methods does a Rat have? Rat.avoid_trap(), Rat.eatcheese(), Rat.race(), etc. Oh, wait, *that* kind of Rat :). # The filetest operators. These are covered in S16, so maybe just mention them. I should mention that these are now in IO.pod. # true(), not(), also methods On? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Rakudo newbies
Hi all. I've been hanging around on #perl6, and have heard a fairly regular complaint in the last few days. 3 or 4 people have turned up wanting to work on Rakudo, and not always been able to get the information that they wanted. I promised to write a message to the list complaining about this, but before I did, the main developers recognised the problem and discussed on IRC the steps they're planning to take to fix it. As such, this is both a complaint message and an answer to it :). The basic plan is to turn rakudo.org into a centralised rakudo info point. The plan is that all the information needed to be a developer will appear on it. If you want to help in the process, ask for some rakudo.org editing power on #perl6, and go to work on the docs. This new site is new enough that it's still very incomplete, but hopefully with a bit of teamwork, in a month or so we should have it to the point where it can help beginning developers. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Fwd: More S29/S32 Masak ideas (fwd)
Sorry, forgot to send this to the list. -- Forwarded message -- Date: Wed, 4 Mar 2009 17:16:22 +1100 (EST) From: Timothy S. Nelson wayl...@wayland.id.au To: Carl Mäsak cma...@gmail.com Subject: Re: Fwd: More S29/S32 Masak ideas On Tue, 3 Mar 2009, Carl Mäsak wrote: # context(). Added to S29, but I still don't know where these should go.. Maybe on Block? S06:1940 seems to treat it as a pure function, not as methods. That kind of makes sense, given its argument list. Yeah, I agree. I guess I just like for everything to be a method on something, and some of them just have forms that work as functions as well :). And S06:2072 seems to imply that it goes on the Context; but maybe... context() === $?CONTEXT $?CONTEXT.context() === context().context() ? # callsame, callwith, nextsame, nextwith, lastcall. Didn't know where these should go, but probably the same place as context()/caller(). S06:2072 seems to say Block. Ok, thanks. I have a question about that section. Immediately above that list just above the section you talked about, it refers to the returned context object. I want to know what this can be. Is it synonymous with Block? With Code? With something else? Is it its own role? # Method descriptor objects: .name, .signature, .as, .multi, .do. In Callable.pod .name is on Routine .signature is on Code .do is on Code (I'm guessing here) I'm not sure where the others go: .multi must be on something that gets it into Routine .as must be on something that gets it into Method (higher?) See S12:1987 for this. Are these line numbers you're using? POD line numbers? I don't see a line 1987 in this (the file isn't big enough). I still believe that must be interpreted as there being a specific MethodDescriptor object on which all of .name, ..signature, .as, .multi, .do are attached. I'm guessing that .^methods should really return a bunch of Method objects. No, MethodDescriptor objects. See S12:1987. Hmm. I don't like it :). You may be right, but I was assuming that we were returning *Method* objects. # Attribute descriptor objects: .name, .type, .scope, .rw, .private, .accessor, .build, .readonly. I wonder what type would be appropriate for an attribute descriptor object. I haven't done anything with these either. See S12:1999. Only has 1764 lines in my editor. And wc says 1763. I presume you're implying there should be an AttributeDescriptor role, yes? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK- - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Fwd: Masak's S29 list
On Tue, 3 Mar 2009, Carl Mäsak wrote: # .ACCEPTS and .REJECTS on most everything -- provided by the Pattern role. Likely a mistake to put one under each section, though. Perhaps put one under Object and put a reference to S03. What does Pattern? Should we have Object does Pattern? See S03:3104 and on. Object should probably one of the few things not doing Pattern, due to the junctions business. Ok, I've put it in Any.pod. # The cat contextualizer. There's a .cat() method on Container in Containers.pod. Is this what you want? Sure, if you by 'method' mean 'function'. I note that it is indeed defined as a function. I think it should be defined as a method, and have an alternate calling interface as a function; I won't alter it now, though. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: $?OS change
On Mon, 2 Mar 2009, Daniel Ruoso wrote: Em Seg, 2009-03-02 às 17:04 +1100, Timothy S. Nelson escreveu: Hi. I note that we have $?OS, $?VM, and $?DISTRO (and their $* counterparts). I'd like to recommend that we eliminate $?OS, and replace it with $?KERNEL (ie. Linux) and maybe $?ARCH (ie. i386). Thoughts? The usual way to handle this is by something called arch triplet, as you can find out if you call gcc -dumpmachine This triplet is formed by the Instruction Set (usually called CPU), the Platform (pc for most people) and the Operating System (linux-gnu in my case, while the -gnu specifies that you're using the gnu libc). (gcc omits the pc part, usually). I got i386-redhat-linux, so that works for me. So, I think the proper name to the variables would be $?ARCH and $*ARCH Where they would stringify to the arch triplet, while providing convenience methods for .cpu, .platform and .os. Hmm. But we want versions for Platform and OS as well. But thinking about it, I wonder if we shouldn't have actually two compile-time variables, which are HOST_ARCH and TARGET_ARCH so cross compiling is possible, or at least make $?ARCH to mean TARGET_ARCH while still providing $?HOST_ARCH, and since we're talking about compiling Perl code, we should probably have $?HOST_PERL and $?TARGET_PERL as well.. Are we talking about $?VM vs. $?XVM here? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: $?OS change
On Mon, 2 Mar 2009, Daniel Ruoso wrote: Em Seg, 2009-03-02 às 23:47 +1100, Timothy S. Nelson escreveu: On Mon, 2 Mar 2009, Daniel Ruoso wrote: So, I think the proper name to the variables would be $?ARCH and $*ARCH Where they would stringify to the arch triplet, while providing convenience methods for .cpu, .platform and .os. Hmm. But we want versions for Platform and OS as well. I don't really think this information is that all easy to get. For the platform I'm pretty sur you can't get versions, if you have a config.guess script anywhere, you'll see the amount of effort it does to try to recognize what it already does recognize. Believe me, if there was a way to get more information in a generic way, it would be in that script. Hmm. Well, there's a ruby library called facter that seems to be able to do this for a bunch of Linux distros, but I agree that it's not very cross-platform :). http://reductivelabs.com/products/facter/ OTOH, the dependency on the libc for instance pretty much tells you which version of the OS you have (in Linux, at least). Ok. But one way or another, what do you want to achieve that wouldn't be solved by the arch triplet (and that would be solved by having the OS version)? No idea :), but I thought it would be nice to be able to get. But I guess we could fetch it where we can, and use Undefined where we can't. But thinking about it, I wonder if we shouldn't have actually two compile-time variables, which are HOST_ARCH and TARGET_ARCH so cross compiling is possible, or at least make $?ARCH to mean TARGET_ARCH while still providing $?HOST_ARCH, and since we're talking about compiling Perl code, we should probably have $?HOST_PERL and $?TARGET_PERL as well.. Are we talking about $?VM vs. $?XVM here? Well, yes... that adresses $?HOST_PERL and $?TARGET_PERL... but still leaves $?HOST_ARCH and $?TARGET_ARCH, assuming not all compiled Perl modules are platform independent. Agreed. We're thinking the same thing, but I wasn't expressing it clearly :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: pod variables?
On Fri, 27 Feb 2009, Darren Duncan wrote: Jon Lang wrote: Under the section about twigils in S02, $=var is described as a pod variable. I'm not finding any other references to pod variables; what are tey, and how are they used? (In particular, I'm wondering if they're a fossil; if they aren't, I'd expect further information about them to be in S26.) The principle of pod variables as I recall them discussed a few years ago is that it is a way for code to programmatically access its own documentation, such as, for example code introspecting a routine could also print out the documentation for that routine, I suppose. Whatever it was, it sounded useful at the time. -- Darren Duncan To further clarify, I put this exact question to Larry, and he basically said that the clarification of POD variables will happen as Damian continues work on S26-Documentation. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: r25541 - docs/Perl6/Spec
On Fri, 27 Feb 2009, Henry Baragar wrote: I am starting to get overwhelmed by the number of special names and I am wondering why we need to have a flat naming space? For example, wouldn't it be easier to remember (and to introspect) the following? I vote in favour of the general idea, although I disagree with some aspects of this. I think there are many things that could be grouped together, but I think we should be careful not to go too far. Larry wanted to Huffmanise many of these too, hence the great number. I think we could probably reduce the number by maybe 1/3. If I get around to doing this before someone else does, I'll certainly refer to your groupings below for ideas. $*SYSTEM.uid $*SYSTEM.euid $*SYSTEM.pid $*SYSTEM.perl $*SYSTEM.env $*SYSTEM.program_name $*SYSTEM.error_handle $?COMPILER.vm $?COMPILER.svm $?COMPILER.perl $?COMPILER.parser $?COMPILER.setting $?COMPILER.os_distro $?PROGRAM.scope $?PROGRAM.routine $?PROGRAM.role $?PROGRAM.class This way we only have a few special names (objects?) that organize everything in this synopsis. Regards, Henry pugs-comm...@feather.perl6.nl wrote: Author: wayland Date: 2009-02-25 07:08:52 +0100 (Wed, 25 Feb 2009) New Revision: 25541 Modified: docs/Perl6/Spec/S28-special-names.pod Log: S28: Incorporated some more stuff from the old documentation lower down, and a few variables from S02. Modified: docs/Perl6/Spec/S28-special-names.pod === --- docs/Perl6/Spec/S28-special-names.pod 2009-02-25 05:31:24 UTC (rev 25540) +++ docs/Perl6/Spec/S28-special-names.pod 2009-02-25 06:08:52 UTC (rev 25541) @@ -50,6 +50,7 @@ $?CLASS # current class (as variable) %?CONFIG # configuration hash $=DATA# data block handle (=begin DATA ... =end) + $?DISTROS02 # Which OS distribution am I compiling under $*EGID# effective group id %*ENV # system environment $*ERR S16 # Standard error handle; is an IO object @@ -71,16 +72,20 @@ $?OSVER # operating system version compiled for $*OSVER # operating system version running under $*OUT S16 # Standard output handle; is an IO object + $?PARSERS02 # Which Perl grammar was used to parse this statement? $?PACKAGE # current package (as object) $?PACKAGENAME S10 # name of current package - $?PERLVER # perl version compiled for - $*PERLVER # perl version running under + $?PERL S02 # Which Perl am I compiled for? + $*PERL# perl version running under $*PROGRAM_NAME# name of the program being executed $*PID # system process id ::?ROLE # current role (as package name) $?ROLE# current role (as variable) ?ROUTINE S06 # current sub or method (itself) + $?SCOPE S02 # Current my scope $*UID # system user id + $?VMS02 # Which virtual machine am I compiling under + $?XVM S02 # Which virtual machine am I cross-compiling for Note that contextual variables such as C$*OUT may have more than one current definition in the outer dynamic context, in which case @@ -166,10 +171,11 @@ $^H - These were only ever internal anyway %^H - - $! Current exception (see LS04-control) - $! $ERRNO $OS_ERROR - Can get some info from new $! - $? $CHILD_ERROR- - $@ $EVAL_ERROR - Just throws an exception now (see LS04-control) - $^E - + $! $ERRNO $OS_ERROR - Use shiny new $! + $? $CHILD_ERROR- Use shiny new $! + $@ $EVAL_ERROR - Use shiny new $! + $^E - Use shiny new $! + $^S - $. $NR $*IN.input_record_number() $/ $RS $*IN.input_record_separator() $| $*OUT.autoflush() @@ -203,14 +209,22 @@ ARGVOUT $*ARGVOUT Another IO object @F @*INPLACE_AUTOSPLIT_FIELDS ..or some such %ENV%*ENV + ${^OPEN}- This was internal; forget it =head2 Old stuff for p5/p6 comparison This section will eventually die, but for now, it contains some old information on which -Perl5 special variables will turn into Perl6 special variables. +Perl5 special variables will turn into Perl6 special variables. The reason they are +retained is either: -=over 4 +=over +=item * Their status is undecided + +=item * They have some commentary on stuff that needs consideration + +=back + Because a blank entry in either column could be taken to mean either not
$?OS change
Hi. I note that we have $?OS, $?VM, and $?DISTRO (and their $* counterparts). I'd like to recommend that we eliminate $?OS, and replace it with $?KERNEL (ie. Linux) and maybe $?ARCH (ie. i386). Thoughts? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Masak's S29 list
On Fri, 27 Feb 2009, Moritz Lenz wrote: # Code has a .sig Seems (from what I can tell) to be synonymous with .signature, so I standardised on .signature. This leads me to another question - afaict we also have .arity on the code object, but shouldn't that be method on the .signature instead? Do we have any methods in Code that are not related to the signature? [reorg] # Block types have .next, .last, .redo and .leave on them. These are also functions, and need to be specced as such. Ah, that answers my previous question already ;-) No it doesn't. Block and Code are different (see S02). But have a look over the S32/Callable.pod document, and you may find that you have an answer. Also, some of the things that I wasn't able to cope with on masak's list may be relevant here. # .ACCEPTS and .REJECTS on most everything -- provided by the Pattern role. Likely a mistake to put one under each section, though. Perhaps put one under Object and put a reference to S03. What does Pattern? Should we have Object does Pattern? If everything does Pattern, I see no good reason to have a role at all - just stuff the thing into Object. Exactly, but I thought I'd better ask; I assumed it really went somewhere else, and I just hadn't understood. # .match, .subst and .trans from S05. Now in S32/Str.pod. But I wasn't sure what subst() returns. The modified string. (It doesn't do in-place substitution by default). Spec modified. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Exceptions question
On Wed, 25 Feb 2009, Larry Wall wrote: On Thu, Feb 26, 2009 at 02:05:28PM +1100, Timothy S. Nelson wrote: Does this mean that $! is a container of some sort? It's an object, which (in the abstract) can contain anything it jolly well pleases. The main question beyond that is how it responds if used like one of the standard containers. I don't see any great motivation for that offhand, but we'll have to examine the use cases as things progress. Hmm. S04 says: : That implicit topic is the current exception object, also known as C$! and also: : Because the contextual variable C$! contains all exceptions collected in : the current lexical scope... ...that implies to my mind that $! is an exception object, but that an exception object can contain more than one exception. Is that correct? But the spec also says: : Exceptions are not resumable in Perl 6unless the exception object does the : CResumable role. ...so Resumable is attached to a group of exceptions, not a single exception. Now I'm really confused :). My suggested solution would be to change $! to an exception container object. But then we have to use it in the implicit given in the CATCH block. If we used an any() Junction, would that do what we want? :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Exceptions question
On Thu, 26 Feb 2009, Timothy S. Nelson wrote: My suggested solution would be to change $! to an exception container object. But then we have to use it in the implicit given in the CATCH block. If we used an any() Junction, would that do what we want? Ok, Moritz told me on IRC that this won't work. My next suggestion is to have @! be an array that replaces $! completely (freeing it up for $!foo things), and then have the CATCH block implicitly do: given(any(@!)) { ... } :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Exceptions question
On Thu, 26 Feb 2009, Daniel Ruoso wrote: Em Qui, 2009-02-26 às 08:55 -0300, Daniel Ruoso escreveu: for @! {} might provide the needed semantics... After sending this mail I've just realized I don't know exactly which are the needed semantics... what happens if you have several unthrown exceptions in the block, does it throw every one of them? in sequence? autothreading? what happens if one CATCH handles one of the exception but only an outer CATCH handles the other? I'm not sure there is a sane way of having several unthrown exceptions at the same block, so I think the best thing we can do is to throw the first unthrown exception if a second exception happens... meaning... if $! is already set with an unhandled exception that exception is thrown. If that happens to be a resumable exception, the code can be resumed and the other exception will be stored in $! for a later evaluation. Moritz suggested on IRC (in different words) that, as Match objects can do the Associative role, that maybe Exception objects could do the associative role as well. That would mean that we would retain $!, but would still have the others there, just as $/ is the most recent Match, but can also be a container of matches. That doesn't answer your question about how to handle multiple exceptions, though :). - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Masak's S29 list
Here's my comments on Carl Masak's S29 list. Note that some of the things that say that they're now in something still need a lot of work. # Range objects have .from, .to, .min, .max and .minmax methods Now in S32/Containers.pod # .contains on Hash and Array Where's this from? # Code has a .sig Seems (from what I can tell) to be synonymous with .signature, so I standardised on .signature. # .ACCEPTS and .REJECTS on most everything -- provided by the Pattern role. Likely a mistake to put one under each section, though. Perhaps put one under Object and put a reference to S03. What does Pattern? Should we have Object does Pattern? # The cat contextualizer. There's a .cat() method on Container in Containers.pod. Is this what you want? # Object has .print and .say. Ok, this makes things difficult. The algorithm of these functions is obviously something like: 1. Object - Str 2. Output Str on handle Something that makes this interesting is, what happens when you call IO.print? At the moment, S16 says that this will print a string on the IO object. So to print the IO object itself, you would have to do the algorithm above manually. The obvious solution is to rename the function on the IO object to something like doprint, and have Object.print, Object.say, and Object.printf all call on IO.doprint. Where this starts to get difficult is that the IO object currently has input/output record/field separators specced on it. If the new algorithm converts an array to a string, it's obviously going to have to call on these. My question is, would we be better off having the string conversion routine for arrays worry about the input/output record/field separators, rather than the IO object? The downside I can see is that you couldn't have separate separators for different IO objects; you'd have to code specially if you wanted that functionality. Is this too much of a downside, or is it a good way to go? # Block types have .next, .last, .redo and .leave on them. These are also functions, and need to be specced as such. # Block also has a .labels method. Now in S32/Callable.pod # fail and .handled (the former is in S29, but has no signature/summary). Now in S32/Exceptions.pod. But note the role/class Failure double declaration. This is not allowed by the spec, but according to how I read the spec for Failure, that's how it has to be. Obviously I need someone to explain how Failure should *really* be implemented :). # .match, .subst and .trans from S05. Now in S32/Str.pod. But I wasn't sure what subst() returns. # Match objects: .from, .to, .chars, .orig and .text. # Match state objects: .pos. Now added to S32/Regex.pod The rest I'll leave for another time. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-