Whither Apocalypse 7?
Did I miss something? Was there ever an apocalyse 7? Also, why aren't the apocalyses and excegises announced on any of the p6 lists (like, er, perl6-announce for example)? Yours grumpily, Dave. -- My get-up-and-go just got up and went.
Re: Thinking about Accessors
On Fri, 2004-02-27 at 21:57, Luke Palmer wrote: method bar_attr() will get { $.bar_attr } will set { $.bar_attr = $_ } I'm confused by this in only one way... since method bar_attr and the accessor bar_attr have the same name, how do I write an accessor that recurses? Does C.bar_attr call my method, and not the accessor, or is there some other way to do that? -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback signature.asc Description: This is a digitally signed message part
Re: Whither Apocalypse 7?
On Sat, 2004-02-28 at 14:08, Dave Mitchell wrote: Did I miss something? Was there ever an apocalyse 7? Also, why aren't the apocalyses and excegises announced on any of the p6 lists (like, er, perl6-announce for example)? I suspect that Damian is waiting on finalizing the modules mentioned in E7 before formally announcing it here. Just a guess. Larry has said that he's skipping A7-A10 to do the much more important A11 (I got that numbering right, I think...) on objects. So, it makes sense to fill in the blanks, I think, with a show-em-how-it-works series. How likely it is that there will be an A7 back-fill, I have no idea, but A11 sounds like its going to be big enough to make all of us forget about A7-10 anyway ;-) -- Aaron Sherman [EMAIL PROTECTED] Senior Systems Engineer and Toolsmith It's the sound of a satellite saying, 'get me down!' -Shriekback signature.asc Description: This is a digitally signed message part
Re: Whither Apocalypse 7?
[EMAIL PROTECTED] (Dave Mitchell) writes: Did I miss something? Was there ever an apocalyse 7? Yes, there was. It was tacked on the end of Apocalypse 6, and said essentially No longer in core. See Damian. -- DYSFUNCTION: The Only Consistent Feature of All of Your Dissatisfying Relationships is You. http://www.despair.com
Re: Whither Apocalypse 7?
Dave, I had the same problem you did, if I understand you correctly. Eventually, I found the document I believe people are discussing. I'd tell you how, but I don't recall. See the forward below my signature for what I found. Best wishes, George of Oakland.pm -- Forwarded Message -- Subject: [oak perl] Exegesis 7: Formats [Perl 6] Date: Saturday 28 February 2004 1:11 pm From: George Woolley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Exegesis 7 by Damian Conway February 27, 2004 http://www.perl.com/pub/a/2004/02/27/exegesis7.html Form.pm and form Unlike Perl 5, Perl 6 doesn't have a format keyword. Or the associated built-in formatting mechanism. Instead it has a Form.pm module. And a form function. ___ Oakland mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/oakland --- On Saturday 28 February 2004 11:08 am, Dave Mitchell wrote: Did I miss something? Was there ever an apocalyse 7? Also, why aren't the apocalyses and excegises announced on any of the p6 lists (like, er, perl6-announce for example)? Yours grumpily, Dave.
Re: Thinking about Accessors
On Sun, Feb 29, 2004 at 01:44:47PM -0500, Aaron Sherman wrote: : On Fri, 2004-02-27 at 21:57, Luke Palmer wrote: : : method bar_attr() will get { $.bar_attr } :will set { $.bar_attr = $_ } : : I'm confused by this in only one way... since method bar_attr and the : accessor bar_attr have the same name, how do I write an accessor that : recurses? Does C.bar_attr call my method, and not the accessor, or is : there some other way to do that? Within the class you can always get at the attribute via $.bar_attr. If you call the accessor, it's always virtual, which means it might be calling out to a derived class's wrapper of the same name. That method might end up deferring back to your method, of course. Or did you mean something else by recurse? Larry
Re: Exegesis 7: Miscellany
Smylers asked: * What happens if an undefined format is passed to Cform? I'm presuming (and hoping) that's a run-time error. Currently treated as , with internal warnings. Probably should throw an exception. * In 'What a block art though...' (page 2) I don't think there's supposed to be a citrus fruit in: That means that if we use a one-line field, it only shows as much of the data as will fit on one lime. grin * 'In For the table, sir, it shall be served...' (page 8) the first example has C\r at the end of each name and play, making each piece of data be 2 lines. The second, blank, line of each piece of data presumably should be rendered entirely as spaces, so that anything following it (admittedly nothing in this case) would still be lined up correctly. Perhaps you're forgetting that all output lines are automatically trimmed. A line that is nothing but whitespace (i.e. /\n\s*\n/) is reduced to \n\n. However: » The line after Othello appears to be 2 spaces short. » There are 2 blank lines after Richard III instead of 1, and neither have any spaces after them. I suspect these are whitespace niggles in the Perl-POD-HTML conversion process. » There isn't a blank line after Hamlet. Newlines (and carriage returns) embedded in a data item are preserved. That is, they cause line breaks in the output. See the section on line-breaking for more detail on that. Are those all mistakes? Actually, the last one sounds useful -- being able to put some kind of 'divider' between records but not after the last one; is there any way of doing this with Cform? This is precisely why Cform is a standard Perl function. When you need something more complex than it can handle natively, you fall back to Perl itself: print form +-+, | Index | Character| Appears in |, |=|, join( |---|--|--|\n, map( { form |{=][[=}| {==} | {==} |, $_+1, $name[$_], $play[$_] } 0..$#name)), +-+; to produce: +-+ | Index | Character| Appears in | |=| | | | Othello, The | | 1 | Iago | Moor of| | | |Venice| |---|--|--| | |Henry,| | | 2 | Earl of| Richard III | | | Richmond | | |---|--|--| | | Claudius, | Hamlet,| | 3 | King of| Prince of | | | Denmark| Denmark| +-+ Admittedly, it would be convenient if, for this relatively simple task, one could just write: print form :layout«tabular», +-+, | Index | Character| Appears in |, |=|, :sep«|-|», |{=][[=}| {==} | {==} |, [EMAIL PROTECTED], @name, @play[$_], +-+; but *that's* precisely why Cform is in a module, not a built-in -- so I can evolve it as the real needs of the community become apparent. I'll certainly contemplate adding this feature to the ToDo list. * In 'And now at length they overflow their banks.' (page 6) in the final recipe example, if there happens to be something with a long list of ingredients but a short method then will the final format output an unnecessary blank line? No. * In 'And mark what way I make' (page 3) this: ellipsis (try tilting your head and squinting). should be colons instead of commas. Argh. Yes. * In 'Command our present numbers be muster'd...' (page 4) this reference to accuracy: ... form tries to avoid displaying a number with more accuracy than it actually possesses ... should probably be precision instead (the degree of granularity to which a number is specified, rather than how 'truthful' the number is). I deliberately avoided precision since it's not quite the right word either in this situation. Damian
Re: Exegesis 7: Overflow Fields
Mark A. Biggar wrote: What if I want to interpolate an empty string and let the fill characters work? Then you interpolate a single fill character instead of the empty string. Damian
Exegesis 7: Literal '{' in format string
How do you put a literal '{' or '}' into a format string in Perl 6? Do you use a backslash? Joe Gottman
Re: Exegesis 7: Literal '{' in format string
Joe Gottman asked: How do you put a literal '{' or '}' into a format string in Perl 6? Do you use a backslash? Yes, a backslash will quote anything (including backslash). Note that you really only need to backslash '{', since '}' isn't special by itself. Damian
Re: Exegesis 7: Overflow Fields
Damian Conway wrote: Mark A. Biggar wrote: What if I want to interpolate an empty string and let the fill characters work? Then you interpolate a single fill character instead of the empty string. But that means I have to pre-process data lists that just happen to contain empty strings so that they won't disappear on me. This seems to violate least suprise. This message brought to you by SFTPODAES Society For The Prevention of Descrimination Against Empty Strings. Motto: Empty Strings Are Valid Data Too. -- [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: Exegesis 7: Literal '{' in format string
Damian Conway wrote: Joe Gottman asked: How do you put a literal '{' or '}' into a format string in Perl 6? Do you use a backslash? Yes, a backslash will quote anything (including backslash). Note that you really only need to backslash '{', since '}' isn't special by itself. Would that need to be a double backslash in a double-quoted string, or is there some new Perl 6 magic that keep it from being needed? -- Brent Dax Royal-Gordon [EMAIL PROTECTED] Perl and Parrot hacker Oceania has always been at war with Eastasia.
Re: Exegesis 7: Overflow Fields
But that means I have to pre-process data lists that just happen to contain empty strings so that they won't disappear on me. Huh? An empty string already *has* disappeared on you. ;-) This seems to violate least surprise. I'd be much more surprised if an empty string *didn't* disappear. After all, you wouldn't expect: $str1 = nothing . to . see; to be different from: $str1 = nothing . . to . . see; Damian
Re: Exegesis 7: Overflow Fields
I also don't expect $x = ''; $y = $x ; to assign '' to $y either, but that's the equlvalent of what you say form() will do. I see your point. I was more worried about arrays of items some of which are empty strings and having items disappear out my repost because form() throws them away. The behaviour is a little more sophisticated than I have hitherto tried to explain. Try this: use Perl6::Form; my @data = (foo,bar,,baz); print form | {[[[} |, [EMAIL PROTECTED]; print \n; print map {form | {[[[} |, $_} @data; Damian
Parrot 0.1.0 Released
Parrot 0.1.0 Leaping Kakapo Released! The Parrot team proudly presents the Parrot 0.1.0 leap release. It provides some milestones like objects and multi-threading1[1] and supports many more platforms. After some pause you can grab it from http://www.cpan.org/authors/id/L/LT/LTOETSCH/parrot-0.1.0.tar.gz or just get the latest and best from CVS by following the directions at http://dev.perl.org/cvs/. Turn your web browser towards http://www.parrotcode.org/ for more information about Parrot, get involved, and: Have fun! leo [1] The list of changes includes: - Ladies and gentlemen, I give you... objects! - Huge documentation overhaul - More supported platforms, s. PLATFORMS - Basic thread support for pthread based architectures - Basic event handling for timers and signals including: - PASM callbacks for NCI (native C) functions. - Improved platform configuration - COW stacks now working, stacks code redone - Structure handling vastly improved - Random PMC and rand primitives - Better subroutine call syntax in PIR - Make PIR subroutines compliant with pdd03 - Improved profiling (DOD, GC timings) - Hash code improvements, incl. random key order support - Experimental freeze/thaw code for some PMC types - IO improvements for buffered layer and Win32 - String iterators - String bitwise vtables - Many new opcodes - Suppport for JIT, where malloced memory isn't executable - Priority DOD scheme for objects that need timely destruction - Improved byte code loading (e.g. onLoad functions) - Language updates: forth, Perl6/P6C, m4 - Libraries: Getopt_Long, SDL, Dumper, Sort - new JAPH examples - Unified imcc and parrot test handling - Many new tests (make test reports 1386 tests) - Numerous bug fixes