Re: vtables and multimethod dispatch

2002-07-12 Thread Ariel Scolnicov
--- Dave Mitchell <[EMAIL PROTECTED]> wrote: > On Thu, Jul 11, 2002 at 01:18:51PM -0700, John Porter wrote: > > Nicholas Clark wrote: > > > I was thinking that the metric (x*x + y*y) would be fast to > > > calculate, as that's all we need for ordering. > > > > Point is, it's rather *more* than w

Re: what's new continued

2002-07-03 Thread Ariel Scolnicov
Ariel Scolnicov <[EMAIL PROTECTED]> writes: [...] > will apply to any method? To any sub? Can I call a sub 17 times by > saying > > (undef) x 17 = foo(1,2,3); That should be (undef) x 17 = ^foo(1,2,3); of course. Sorry. [...] -- Ariel Scolnicov|http:/

Re: what's new continued

2002-07-03 Thread Ariel Scolnicov
=== > : > : > if ($x == any($a, $b, $c) { ... } > > The wave function of QS has not yet collapsed in Perl 6. > It's still in the same state(s) as the cat. I believe you will find that it is impossible to copy a quantum wave function. -- Ariel Scolnic

Re: Apoc 5 questions/comments

2002-06-10 Thread Ariel Scolnicov
e to get > these days. > Cut the Smalltalk. It's off-topic. -- Ariel Scolnicov

Re: stringification of objects, subroutine refs

2002-05-11 Thread Ariel Scolnicov
le situation. Every time I want to serialize a bunch of closures, I have to serialize all of them in one go. And I have to deserialize them all if I want to access any bit of them. What do I do if I have 10_000 copies of some huge bunch, and I want to access just one bit of it? Seems lik

Re: Loop controls

2002-04-30 Thread Ariel Scolnicov
t to steal features from that powerful language): PLEASE ABSTAIN -- Ariel Scolnicov|http://3w.compugen.co.il/~ariels Compugen Ltd. |[EMAIL PROTECTED]"Sometimes people write an 72 Pinhas Rosen St.|Tel: +972-3-7658117 accidental haiku. Damn! Tel-Aviv 69512

Re: Regex and Matched Delimiters

2002-04-23 Thread Ariel Scolnicov
r (like ASCII 32) is going to produce many references to the FAQ "Why doesn't /a word/ match 'a word'?". (Having to escape #s is not as bad, as they are less common). [...] -- Ariel Scolnicov|http://3w.compugen.co.il/~ariels Compugen Ltd. |[EMAIL

Re: Defaulting params

2002-04-11 Thread Ariel Scolnicov
most one * named arguments Note that the first 2 *can* be done together (but I'm not sure that would be a good idea, either). And we already have 3, kinda, by passing a hash of arguments. -- Ariel Scolnicov|http://3w.compugen.co.il/~ariels Compugen Ltd. |[EMAIL PROTECTED] 72

Re: [A-Z]+\s*\{

2002-01-21 Thread Ariel Scolnicov
, not to continually frustrate them. I'd be inclined to > let people choose their own level of pain by setting DbC strictness > thresholds. Please set my threshold of side effect pain to undef... -- Ariel Scolnicov|http://3w.compugen.co.il/~ariels Compugen Ltd. |[EMAIL PROTECTED] 72 Pinhas Rosen St.|Tel: +972-3-7658117 "fast, good, and cheap; Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 pick any two!"

Re: An overview of the Parrot interpreter

2001-09-04 Thread Ariel Scolnicov
out: 1. "Ariel, you didn't understand anything..." 2. The $rf gets assigned some weird trampoline that does the translation from a list in PMC register 0 to Int register 0 and a Foo in PMC register 0. 3. intfoo has another entry point that does #2, and $rf poin

Re: Damian Conway's Exegesis 2

2001-05-16 Thread Ariel Scolnicov
\n"; print $x; then (I hope) we're agreed printing would happen in the *wrong* order (first the output of show($root, $post), then the value of $x (and $x eq "Post order: \n"). So how come `print' gets to mung about with evaluation order? [...] Hoping for illumination,

Re: Please make "last" work in "grep"

2001-05-03 Thread Ariel Scolnicov
Lazy. But it would need a completely different algorithm. Which is not too bad. And even my ($first, $second, $third) = sort {...} @list; is kind-of plausible. So we'd definitely want ((undef)x((@list+1)/2), $median) = sort {...} @list; to apply Perl's patented MindReader(tm)

Re: Larry's Apocalypse 1

2001-04-10 Thread Ariel Scolnicov
print $_; > >} > > to dump the HTML for the main page of www.perl.org to get dumped to stdout. > > Well, this seems innocent enough, but how far do you want to stretch it? use ICBM; unlink 'http://www.macrosoft.com/'; # You get the idea Just as

Re: Larry's Apocalypse 1

2001-04-09 Thread Ariel Scolnicov
ed to be SHORT. `--cmd' is LONG. If we MUST go the multiflagged way, why not reflect `-e' to get the `-6' flag? At the very least, I want a short flag! -- Ariel Scolnicov

Re: Schwartzian Transform

2001-03-28 Thread Ariel Scolnicov
the above 2 senses; you can always memoize (2), and you can do (3) if the semantics of it are "good enough" for what you want to do). So you can say use Memoize; # ... memoize 'f'; @sorted = sort { my_compare(f($a),f($b)) } @unsorted to get a lot of the effect of the S

Re: assign to magic name-of-function variable instead of "return"

2001-02-07 Thread Ariel Scolnicov
ocs/cltl/clm/node96.html . > All that POST and such do, is obfuscate the flow of control. I doubt > that outweighs the small benefits. However, unwind-protect is useful. It's either use that or use something destructor-related. That just sits on top of some unwind-protect-like hac

Re: Speaking of signals...

2001-01-04 Thread Ariel Scolnicov
ful in curses programs, though terminal resetting can be achieved by the library itself. =back I can see these issues from the list: =over 4 =item I/O =item Prodding daemons =item Process management =item Exit cleanups =item Text-window cleanups (also related to above) =item Timer

Re: TIL redux (was Re: What will the Perl6 code name be?)

2000-10-27 Thread Ariel Scolnicov
[re-sent to -internals; sorry, Chaim] Chaim Frenkel <[EMAIL PROTECTED]> writes: > [cc'ed to perl6-internals] > > >>>>> "AS" == Ariel Scolnicov <[EMAIL PROTECTED]> writes: > > AS> A TIL doesn't stand in the way. You jus

Re: TIL redux (was Re: What will the Perl6 code name be?)

2000-10-24 Thread Ariel Scolnicov
like that. So almost all the things you'll be threading will be words from the Perl core (rather than words defined in the program). [...] > inline threaded code is something whose time has come again. Agreed. But does it have to do it here? :-( -- Ariel Scolnicov|"GCAAGAATT

Re: IDEA: lexically scoped subs anyone

2000-09-30 Thread Ariel Scolnicov
ursive objects using the (letrec ...) form. In Scheme, say: (letrec ((even? (lambda (x) (if (= x 0) t (odd? (- x 1) (odd? (lambda (x) (if (= x 0) nil (even? (- x 1)) (even? 11)) [No, this is not a good way to write these functions.] I'm uns

Re: RFC 290 (v1) Remove -X

2000-09-26 Thread Ariel Scolnicov
file: > > is_text > is_sticky > is_writable I refer you to my previous message (archived in http://tmtowtdi.perl.org/archive?35:mss:4575). Basically, not have a prefix predicates should have! Another option is to stuff the long names into some namespace, and export them up

Re: Perl6Storm: Intent to RFC #0101

2000-09-24 Thread Ariel Scolnicov
hers) speak, and saying "readable(file)"? The "is_" prefix serves only to make predicates impossible to read out, leading to thinkos. [...] -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +97

Pre-withdrawal notice for RFC184

2000-09-18 Thread Ariel Scolnicov
there is no call for this RFC. Unless I hear otherwise from people interested in the RFC, I shall be withdrawing it Friday. -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \ We recycle all our Hz

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Ariel Scolnicov
ocument line. The same (without indentation, of course) works for Perl today, and confuses no-one. And just because Perl has some feature does not mean you are obligated to use it in all programs. -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compuge

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-14 Thread Ariel Scolnicov
FIRST_HERE_DOC; print << SECOND_HERE_DOC; This is on the left margin. This is indented one char. FIRST_HERE_DOC This is indented one char. This is on the left margin. SECOND_HERE_DOC But (1) needs to be resolved (and don't say "use tabs 8"!). --

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-11 Thread Ariel Scolnicov
on. When I started reading this thread, I was *sure* it would be immediately clear that sets are bit vectors, drawn on some pre-specified world! -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \

Re: $a in @b

2000-09-11 Thread Ariel Scolnicov
e to do its things. And while you are doing > that please take this EXPR from me. When you put it this way, isn't C spelled C in Perl5? (Except, of course, that C inside a C does a whole lot more nowadays). -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"

Re: RFC 114 (v2) Perl resource configuration

2000-09-04 Thread Ariel Scolnicov
ig. BTW, > it's not something I'm against, I'm just trying to find a way I could use > it. But for this to work, the users must not have filesystem access to the installed modules (otherwise they'll just C). In which case the whole point is moot. [...] -- Ariel Sc

Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace and Here Docs)

2000-09-04 Thread Ariel Scolnicov
of C is unclear. This issue was raised during previous discussion of the RFC. -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \ We recycle all our Hz 72 Pinhas Rosen St.|Tel: +972-3-7658514 (M

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-09-04 Thread Ariel Scolnicov
can pass a string and know if it has a chance of being completed into a syntactically legal construct (this is a difference between "2+" and "))};;"). Access to the parser needs to be in the core... -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL P

Re: RFC 114 (v2) Perl resource configuration

2000-09-01 Thread Ariel Scolnicov
l it what type of C code the system administrator has decided to mandate! Configuration files for C, an interactive Perl, C, and any other application written in Perl are a nice idea (one that TomC seems to support). This has nothing to do with wanting to configure the language itself. [...] -- Ariel S

Re: RFC 184 (v1) Perl should support an interactive mode.

2000-08-31 Thread Ariel Scolnicov
configuration files for code. But I fear actually evaluating > configuration data (even in tainted mode). The end result is that I come up > with my own syntax which I parse with reg-exs. Sadly I find myself > reproducing the complexity of hashes / arrays needlessly. Ideally

Re: RFC 122 (v1) types and structures

2000-08-29 Thread Ariel Scolnicov
nite loop results. I don't think we want this to happen automatically in Perl. Languages with assignments do not have readily-comprehensible closures (see e.g. Scheme's call/cc (call-with-current-continuation), which has well defined but difficult semantics). For one thing, closures in the

Re: RFC 111 (v2) Here Docs Terminators (Was Whitespace and Here Docs)

2000-08-28 Thread Ariel Scolnicov
text. # This isn't a comment; it's part of the here-document! #EOT#2#This is a comment I'm not sure if this is a good idea. However, bear in mind that if you want a comment on the end-of-here-document line, you probably aren't going to add more `#' characters to

Re: RFC 148 (v1) Add reshape() for multi-dimensional array reshaping

2000-08-26 Thread Ariel Scolnicov
0,1,2] returns exactly $a[2], since it is a $calar context. Perhaps you were thinking of @a[0,1,2]? In any case, having good multi-dimensional syntax for scalar access but not for list access is not very orthogonal. Also, C<,> inside (scalar) square brackets is B useless! Consider e.g.

Re: Pre-RFC: Require a warning on spaces after here-document "terminator"

2000-08-21 Thread Ariel Scolnicov
give me a regex getline terminator or pattern matches against > filehandles (a la RFC 93) and I'll never mention $/ again ;-) Heresy! AWK has to be better for something :-) -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel

Pre-RFC: Require a warning on spaces after here-document "terminator"

2000-08-20 Thread Ariel Scolnicov
I was asked to debug a weird Perl5 problem yesterday. The code in question looked roughly like this (indented 4 spaces, but otherwise unchanged): #!perl -w use strict; print

Re: Maximum length input lines

2000-08-19 Thread Ariel Scolnicov
of data with no line termination, Perl will require at least 128GB of swap to read it all in. This is an easy denial of service attack (for large values of "128"). Using substr would not be an option, as the damage is done before substr ever gets to see the "li

Re: RFC 120 (v2) Implicit counter in for statements, possibly $#.

2000-08-18 Thread Ariel Scolnicov
, this suggests that C should return C<(@array)> (a copy of the values), and C the list C<(0..$#array)>. But those aren't very useful. [...] -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +972-2-6795059 (Jeru

Re: RFC 106 (v1) Yet another lexical variable proposal: lexical variables made default

2000-08-18 Thread Ariel Scolnicov
my $old_verbosity = PKG::get_verbose; PKG::set_verbose(1); PKG::frobnicate; PKG::set_verbose($old_verbosity); } but that doesn't work in the presence of eval{}/die. So you also need unwind-protect. [...] -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Ariel Scolnicov
e of suffocation at speeds above 12kmh" old-fashioned perl4-head !@#$&*#@$[->}})[-lovers will have a concrete proposal in front of our eyes. I contend that any consistently extendable proposal will lead to horrors at least on the scale of the example above. I hate the example abo

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Ariel Scolnicov
John Porter <[EMAIL PROTECTED]> writes: > Ariel Scolnicov wrote: > > John Porter <[EMAIL PROTECTED]> writes: > > > foo = bar; > > > > > > foo could be just about anything: a string, a hashref, some other > > > blessed ref (with op"

Re: RFC 114 (v1) Perl resource configuration

2000-08-17 Thread Ariel Scolnicov
the way". This is scary. Until, that is, we add the inevitable "-." flag to avoid loading rc files, and then all scripts will start with "#!perl -w.". -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED] Compugen Ltd. |Tel: +

Re: RFC 76 (v1) Builtin: reduce

2000-08-17 Thread Ariel Scolnicov
Nathan Torkington <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > > > > The $a and $b of the sort comparator were A Bad Idea to begin with. > > > > > > Ditto. Can we ditch these in Perl 6? Don't see why $_[0] and $_[1] can't > > > be used, or even a more standard $1 and $2. Either one makes

Re: RFC 109 (v1) Less line noise - let's get rid of @%

2000-08-17 Thread Ariel Scolnicov
probably take a look at Algol68 references; I've never actually seen an Algol program, but I seem to remember a professor at the university going on about how Algol68 did _some_ dereferencing automatically. -- Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED]

Re: RFC 84 (v1) Replace => (stringifying comma) with =>

2000-08-16 Thread Ariel Scolnicov
tage of hashes over arrays you refered to. It seems like a tied hash would be suitable for what you want. If ties were efficient, it would be trivial to implement a SortedHash which would perform "each"-style accesses in sorted order. Standard Perl library, anyone? -- Ariel Scolnicov

Re: RFC 24 (v1) Semi-finite (lazy) lists

2000-08-05 Thread Ariel Scolnicov
numbers onto the integeers. Note that the ordering is different than ...,-2,-1,0,1,2,... Similarly, the only useful meaning of C<@negs = (..-1)> would simply be C<@negs = map {-$_} (1..)>, and the ordering of the result is again "wrong". Somebody please prove