* 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/
* 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.
* 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
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/
the speculative parse machinery in place. It seems
like this should be implementable with reasonable effort?
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
+ .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/
* 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/
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/
* 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
be simply
@array».values».=trim;
Imagine writing this in another language.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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/
to type `.trim(:start)` when I could just do
`.ltrim` though.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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
,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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
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/
and right
trimming are infrequent compared to the frequency of basic
input editing.
Good point, rings true.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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/
$write_pid = pid_file_handler( $optionspid_file );
become_daemon();
$write_pid();
# ...
}
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
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/
,
--
Aristotle Pagaltzis // http://plasmasturm.org/
to provide even a rudimentary abstract
interface.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
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
* 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/
/OsListdirProblem
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
their own second system. You want to invite a
bunch of PHP kids? I’m game. :-)
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
, and then it breaks down
visually, particularly if you throw an arrow in there.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
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/
: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
,(,$\/, )[defined wantarray]/e;$1}
Just-another-Perl-hack;
#Aristotle Pagaltzis // http://plasmasturm.org/
say
IF NOT loop.last ; ... ; END ;
to do something on all iterations but the ultimate.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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
) {
$_-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/
* 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
, which says TMTOWTDI yet tries to
provide one good default way of doing any particular thing.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
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/
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/
passes and the operation is
attempted.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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/
attempted at -e line 1.
--
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(,$\/, )[defined wantarray]/e;$1}
Just-another-Perl-hack;
#Aristotle Pagaltzis // http://plasmasturm.org/
likely for class-
private ones. So Perl 6 defaults the right thing here, it would
seem.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
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/
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/
, of course, you explicitly stick your hands in),
kind of like the safety that hygienic macros provide.
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
, 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/
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/
* 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/
* 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/
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/
* 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/
.
http://tinyurl.com/2uk5m5#head-20b1c1d3a92f0c61515cb88d15e06b686eba6cbc
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
6 do in that respect? Maybe semantics could be
borrowed from there?
Regards,
--
Aristotle Pagaltzis // http://plasmasturm.org/
* 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
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/
* 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
.
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/
.)]
* 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
58 matches
Mail list logo