Re: The invocation operators .* and .+

2015-06-17 Thread Aristotle Pagaltzis
* yary not@gmail.com [2015-06-17 17:10]: Perl6's TEARDOWN Sorry for the confusion. It’s not in Perl 6. I invented .teardown for this example because I didn’t want to call it .destroy – that’s all. -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Language design

2015-06-16 Thread Aristotle Pagaltzis
* Michael Zedeler mich...@zedeler.dk [2015-06-16 18:55]: For instance, why have Complex and Rat numbers in the core? If you're not working in a very specialized field (which probably *isn't* numerical computation), those datatypes are just esoteric constructs that you'll never use.

Re: The invocation operators .* and .+

2015-06-16 Thread Aristotle Pagaltzis
* Michael Zedeler mich...@zedeler.dk [2015-06-16 13:10]: On 06/16/15 12:24, Aristotle Pagaltzis wrote: * Michael Zedeler mich...@zedeler.dk [2015-06-16 11:35]: This is working exactly as specified in the synopsis, but does Perl 6 NEED anything like this? Just because something is possible

Re: The invocation operators .* and .+

2015-06-16 Thread Aristotle Pagaltzis
think they need this in Perl, similar people will inevitably exist in any other language where this can be done). Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Good error messages: going the extra mile

2010-04-06 Thread Aristotle Pagaltzis
the speculative parse machinery in place. It seems like this should be implementable with reasonable effort? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: r30205 - docs/Perl6/Spec

2010-04-02 Thread Aristotle Pagaltzis
+    .doit(1,2,3): { $^a = $^b }       # okay Or how these two differ from each other: +    .doit(1,2,3):{ $^a = $^b }       # okay +    .doit(1,2,3):{ $^a = $^b }       # okay (Neither can I.) Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Re-thinking file test operations

2009-07-09 Thread Aristotle Pagaltzis
* Moritz Lenz mor...@faui2k3.org [2009-07-10 00:25]: stat($str, :e)# let multi dispatch handle it for us This gets my vote. -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: .trim and 'gilding the lilly'

2009-01-26 Thread Aristotle Pagaltzis
for such a relatively rare thing.) Sticking to a single common use-case eliminates the need for configuration API, improving usability as a whole. Keep it simple. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Converting a Perl 5 pseudo-continuation to Perl 6

2009-01-26 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis pagalt...@gmx.de [2009-01-02 23:00]: That way, you get this combination: sub pid_file_handler ( $filename ) { # ... top half ... yield; # ... bottom half ... } sub init_server { # ... my $write_pid

Re: Trimming arrays

2009-01-13 Thread Aristotle Pagaltzis
be simply @array».values».=trim; Imagine writing this in another language. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
* Ovid publiustemp-perl6langua...@yahoo.com [2009-01-12 16:05]: Or all could be allowed and $string.trim(:leading0) could all $string.rtrim internally. ++ Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
to type `.trim(:start)` when I could just do `.ltrim` though. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis pagalt...@gmx.de [2009-01-12 20:55]: Also `:!start` to imply `:end` unless `:!end` (which in turn implies `:start` unless `:!end`)? Ugh, forget this, I was having a blank moment. Actually that makes me wonder now whether it’s actually a good idea at all to make

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
* Larry Wall la...@wall.org [2009-01-12 21:55]: * Aristotle Pagaltzis pagalt...@gmx.de [2009-01-12 21:20]: Plus if there are separate `.ltrim` and `.rtrim` functions it would be better to implement `.trim` by calling them rather than vice versa, so it wouldn’t even be less efficient two

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
in that picture. But of course RTL reverses the relation of left/right in memory and left/right on screen. I think a week’s worth of wolf sleep is catching up to me, sorry. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [PATCH] Add .trim method

2009-01-12 Thread Aristotle Pagaltzis
and right trimming are infrequent compared to the frequency of basic input editing. Good point, rings true. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: r24846 - docs/Perl6/Spec

2009-01-10 Thread Aristotle Pagaltzis
* jerry gay jerry@gmail.com [2009-01-09 22:45]: it's eager for the match to close Impatient, hasty? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Converting a Perl 5 pseudo-continuation to Perl 6

2009-01-02 Thread Aristotle Pagaltzis
$write_pid = pid_file_handler( $optionspid_file ); become_daemon(); $write_pid(); # ... } Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-18 Thread Aristotle Pagaltzis
to say in the absolutely most straightforward manner possible. The order of execution is crystal clear, the intent behind the loop completely explicit. -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(,$\/, )[defined wantarray]/e;$1} Just-another-Perl-hack; #Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-17 Thread Aristotle Pagaltzis
, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-10 Thread Aristotle Pagaltzis
to provide even a rudimentary abstract interface. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-09 Thread Aristotle Pagaltzis
permissions between Win32 and Unix? I don’t see such a thing being possible at all: there are too many differences with pervasive consequences. The most you can reasonably do (AFAICT) is map Win32-style owner/access info to a Unix-style API for reading only. Regards, -- Aristotle Pagaltzis

Re: Files, Directories, Resources, Operating Systems

2008-12-09 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis [EMAIL PROTECTED] [2008-12-10 01:10]: Well go on. Btw, I just realised that it can be read as sarcastic, which I didn’t intend. I am honestly curious, even if skeptical. I am biased, but I am open to be convinced. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-08 Thread Aristotle Pagaltzis
/OsListdirProblem Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-07 Thread Aristotle Pagaltzis
their own second system. You want to invite a bunch of PHP kids? I’m game. :-) Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-06 Thread Aristotle Pagaltzis
, and then it breaks down visually, particularly if you throw an arrow in there. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: how to write literals of some Perl 6 types?

2008-12-05 Thread Aristotle Pagaltzis
. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-04 Thread Aristotle Pagaltzis
in practice. All that’s necessary is to design the interface such that it won’t obstruct subsequent “userland” solution approaches. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-04 Thread Aristotle Pagaltzis
:10]: Aristotle Pagaltzis wrote: * Bruce Gray [EMAIL PROTECTED] [2008-12-03 18:20]: In Perl 5 or Perl 6, why not move the grep() into the while()? Because it's only a figurative example and you're supposed to consider the general problem, not nitpick the specific example… But how

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-04 Thread Aristotle Pagaltzis
,(,$\/, )[defined wantarray]/e;$1} Just-another-Perl-hack; #Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-04 Thread Aristotle Pagaltzis
say IF NOT loop.last ; ... ; END ; to do something on all iterations but the ultimate. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Files, Directories, Resources, Operating Systems

2008-12-04 Thread Aristotle Pagaltzis
* Mark Overmeer [EMAIL PROTECTED] [2008-12-04 16:50]: * Aristotle Pagaltzis ([EMAIL PROTECTED]) [081204 14:38]: Furthermore, from the point of view of the OS, even treating file names as opaque binary blobs is actually fine! Programs don’t care after all. In fact, no problem shows up until

Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Aristotle Pagaltzis
) { $_-do_something( ++$i ) for @stuff; } # plus some way of attaching this fix-up just once { @stuff = grep !$_-valid, @stuff } Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Aristotle Pagaltzis
* Bruce Gray [EMAIL PROTECTED] [2008-12-03 18:20]: In Perl 5 or Perl 6, why not move the grep() into the while()? Because it’s only a figurative example and you’re supposed to consider the general problem, not nitpick the specific example… Regards, -- Aristotle Pagaltzis // http

Re: S16: chown, chmod

2008-11-26 Thread Aristotle Pagaltzis
, which says TMTOWTDI yet tries to provide one good default way of doing any particular thing. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: S16: chown, chmod

2008-11-23 Thread Aristotle Pagaltzis
should be designed to encourage people to do things correctly and to make it hard to even think about the nearly certainly wrong way. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: S16: chown, chmod

2008-11-23 Thread Aristotle Pagaltzis
on NFS filesystems reported 3–6-fold speedups of these commands, without the local case being adversely affected. /offtopic-diversion Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: S16: chown, chmod

2008-11-23 Thread Aristotle Pagaltzis
passes and the operation is attempted. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Store captures and non-captures in source-string order

2008-10-13 Thread Aristotle Pagaltzis
* Larry Wall [EMAIL PROTECTED] [2008-10-13 19:00]: Maybe we're looking at a generalized tree query language That’s an intriguing observation. Another case for having some XPath-ish facility in the language? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Should $.foo attributes without is rw be writable from within the class

2008-09-18 Thread Aristotle Pagaltzis
attempted at -e line 1. -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(,$\/, )[defined wantarray]/e;$1} Just-another-Perl-hack; #Aristotle Pagaltzis // http://plasmasturm.org/

Re: Should $.foo attributes without is rw be writable from within the class

2008-09-18 Thread Aristotle Pagaltzis
likely for class- private ones. So Perl 6 defaults the right thing here, it would seem. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: What should +:21a produce?

2008-09-16 Thread Aristotle Pagaltzis
to say `0`. Although it would be useful if this were an interesting kind of 0 that knows it came from a parse error (and maybe even which radix was asserted). Larry? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Iterator semantics

2008-09-11 Thread Aristotle Pagaltzis
easier than `1..$n`. For the latter’s iterator the answer to “do you have another element” implies a conditional somewhere, whereas for the former’s it’s trivially “yes.” Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

The False Cognate problem and what Roles are still missing

2008-08-20 Thread Aristotle Pagaltzis
, of course, you explicitly stick your hands in), kind of like the safety that hygienic macros provide. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-19 Thread Aristotle Pagaltzis
, but I also don’t care at all about whether they are allowed. I’m not going to use them anyway. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread Aristotle Pagaltzis
this (in particular, variables and functions in XPath), which is where I first encountered identifiers with dashes. I have been wishing I could have them in mainstream languages ever since. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread Aristotle Pagaltzis
* Michael Mangelsdorf [EMAIL PROTECTED] [2008-08-11 20:25]: Unicode guillemets for hyper ops? Unicode? I don’t know about your ISO-8859-1, but mine has guillemets. :-) Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: [svn:perl6-synopsis] r14574 - doc/trunk/design/syn

2008-08-09 Thread Aristotle Pagaltzis
* Larry Wall [EMAIL PROTECTED] [2008-08-08 19:45]: q'foo is now a valid identifier. Qa tlho', Larry. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Rakudo test miscellanea

2008-06-28 Thread Aristotle Pagaltzis
that deal in sub-$0.01 fractions: taxes, currency conversion, brokerage stuff... They use decimal fixed point math where necessary. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Rakudo test miscellanea

2008-06-28 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis [EMAIL PROTECTED] [2008-06-29 02:05]: [repeat of statements made days ago] Sorry, I was only just catching up and didn’t notice this orphan subthread had siblings, where the point was already covered. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: non blocking pipe

2008-03-23 Thread Aristotle Pagaltzis
. http://tinyurl.com/2uk5m5#head-20b1c1d3a92f0c61515cb88d15e06b686eba6cbc Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: local $@ has an unwanted side effect

2008-03-22 Thread Aristotle Pagaltzis
 6 do in that respect? Maybe semantics could be borrowed from there? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Musings on operator overloading

2008-03-21 Thread Aristotle Pagaltzis
* TSa [EMAIL PROTECTED] [2008-03-19 16:00]: Aristotle Pagaltzis wrote: Something like path { $app_base_dir / $conf_dir / $foo_cfg . $cfg_ext } where the operators in that scope are overloaded irrespective of the types of the variables (be they plain scalar strings, instances

Re: Musings on operator overloading

2008-03-21 Thread Aristotle Pagaltzis
in C++? That’s exactly what my proposal was all about: if you’re completely changing the meaning of an operator, the reader should have nearby indication of what is really going on. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: Musings on operator overloading

2008-03-21 Thread Aristotle Pagaltzis
* Mark J. Reed [EMAIL PROTECTED] [2008-03-21 21:35]: On Fri, Mar 21, 2008 at 4:25 PM, Aristotle Pagaltzis [EMAIL PROTECTED] wrote: It makes the meaning of the statement dependent on the types of any variables, which is information that a reader won't necessarily find in close vicinity

Re: Musings on operator overloading (was: File-Fu overloading)

2008-03-20 Thread Aristotle Pagaltzis
. And that’s exactly the point. I find that regular, type-based overloading is *very* exciting… but not in a good way. An approach that makes operator overloading an unexciting business therefore seems very useful to me. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Musings on operator overloading (was: File-Fu overloading)

2008-02-24 Thread Aristotle Pagaltzis
.)] * Eric Wilhelm [EMAIL PROTECTED] [2008-02-24 02:05]: # from Aristotle Pagaltzis # on Saturday 23 February 2008 14:48: I find the basic File::Fu interface interesting… but operator overloading always makes me just ever so slightly queasy, and this example is no exception. Is that because