Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-26 Thread Luke Palmer
Chip Salzenberg writes: I'm working on enhancing Perl6::Subs[*] to support more parameter traits than just Cis required. I have some questions about parameters and traits. (These questions all apply to pure Perl 6, which I know I won't be able to translate completely, but I want to know

Re: S28ish [was: [Pugs] A couple of string interpolation edge cases]

2005-03-26 Thread Luke Palmer
Larry Wall creates Sish28: On Sat, Mar 26, 2005 at 02:11:29PM +0800, Autrijus Tang wrote: : On Fri, Mar 25, 2005 at 10:03:45PM -0800, Larry Wall wrote: : Hmm, well, if it got that far. Given strict being on by default, : this particular example should probably just die on the fact that $ :

Re: [PATCH] support make DESTDIR=/... install

2005-03-27 Thread Luke Palmer
Rafael Garcia-Suarez writes: This fixes installing to a different DESTDIR. Thanks, applied. Luke Index: Makefile.PL === --- Makefile.PL (revision 1233) +++ Makefile.PL (working copy) @@ -105,10 +105,10 @@

Re: More Makefile.PL patches

2005-03-27 Thread Luke Palmer
Rafael Garcia-Suarez writes: This one fixes make test, by forcing the fix of test target of the generated Makefile. I'd rather have Ingy reviewing it or something, because AFAICT it's his territory -- dark makemaker places where black magic hides behind obscure curtains. (make install still

xx and closures

2005-03-28 Thread Luke Palmer
We were discussing on #perl6, and thought that the feature: sub foo () { say Blech; } { foo() } xx 5; Would be useful. Since it is dwimmery, and you wouldn't want the closure to execute if you didn't know it was there, we decided that it would probably be best if this were

Re: string/list division

2005-03-28 Thread Luke Palmer
Juerd writes: What if instead of my @copy = @array; while (my @chunk = splice @copy, 0, $chunksize) { ... } # ^1 Well, I for one never write that. I very seldom use splice. we could just write for @array [/] $chunksize - @chunk { ... } Well, we could also

Re: .method == $self.method or $_.method?

2005-03-29 Thread Luke Palmer
Piers Cawley writes: Larry Wall [EMAIL PROTECTED] writes: I've been thinking about this in my sleep, and at the moment I think I'd rather keep .foo meaning $_.foo, but break the automatic binding of the invocant to $_. Instead of that, I'd like to see a really, really short alias for

Re: Unknown level of hash

2005-03-29 Thread Luke Palmer
Zhuang Li writes: Yes. I think it's both useful and fun. I was thinking something similar to @[EMAIL PROTECTED] = map{1} @a; But getting $hash-{E1}-{E2}-...-{En} = 1; instead of $hash{E1} = 1; ... $hash{En} =1;. Yeah, like this: %hash{dims @a} = (1) xx Inf; What I'd really like to

Re: Pugs IO Bugs (?)

2005-03-29 Thread Luke Palmer
Stevan Little writes: Hello all, I am not even 100% sure these are bugs. I assume I should be able to do this, but I dont know for sure. These two test groups (taken from t/builtins/io/io_in_for_loop.t) below will fail with the error: pugs: tempfile: hGetLine: illegal operation

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-29 Thread Luke Palmer
Thomas Sandla writes: Luke Palmer wrote: So if you want things modified, you'd have to pass in a reference. Arrays and hashes would not generally have this restriction, since we pass references of those guys anyway. But I would really like to see a declaration of any possible modification

Re: Pugs IO Bugs (?)

2005-03-29 Thread Luke Palmer
Stevan Little writes: On Mar 29, 2005, at 8:38 AM, Luke Palmer wrote: Hmm... I believe that the behavior in this case is undefined. It sure would be nice if it worked, but you see: for =$fh - $line { ... } Evaluates `=$fh` in list context. In an eager world, this eats up

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Luke Palmer
Aaron Sherman writes: On Tue, 2005-03-29 at 16:00 -0700, Luke Palmer wrote: Unless the caller can't see the signature, as is the case with methods. I need to understand this piece. In this code: class X { method meth() {...} } class Y is X

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-30 Thread Luke Palmer
Thomas Sandla writes: And of course the builtin functionality and the packages available from CPAN save the typical small scale programmer from extensive declarations. But to use a complex module you have to read documentation to get the idea to call .meth() in the first place. And then I

Re: Again the infix ops

2005-03-31 Thread Luke Palmer
Leopold Toetsch writes: But with one more indirection a PIC-like scheme can work with read-only bytecode too (probably). E.g. the assembler emits instead of the proposed: infix __add, Pd, Pl, Pr this opcode: infix (.MMD_ADD 24) | n, Pd, Pl, Pr Just 256? Why don't you add another

Re: Documentary annotations: $what docwhy

2005-03-31 Thread Luke Palmer
Chip Salzenberg writes: I'd like to annotate Perl 6 parameters and other entities using traits, since that's the best way (I know of) to have them appear immediately in the text of the program where they are. Supposing I had a doc trait, could I say: sub f2c (Num $temp docTemperature

Re: identity tests and comparing two references

2005-04-01 Thread Luke Palmer
Sam Vilain writes: Darren Duncan wrote: Now I seem to remember reading somewhere that '===' will do what I want, but I'm now having trouble finding any mention of it. So, what is the operator for reference comparison? As someone who wrote a tool that uses refaddr() and 0+ in Perl 5 to

Re: Definitive and Complete Perl 6 Operator List

2005-04-02 Thread Luke Palmer
Andrew Savige said: Is there a definitive, official, complete list of all Perl 6 operators, along with their precedence levels? I believe that Kurt Gödel, in a corollary to his famous theorem, also showed that Any Perl 6 list is either indefinitive or incomplete. Well, Synopsis 3 is the list

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

2008-02-24 Thread Luke Palmer
On Sun, Feb 24, 2008 at 3:00 PM, Aristotle Pagaltzis [EMAIL PROTECTED] 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: Query re: duction and precedence.

2008-03-30 Thread Luke Palmer
On Sun, Mar 30, 2008 at 12:56 PM, Mark J. Reed [EMAIL PROTECTED] wrote: I'm a believer in generalizing where possible, modulo the principles of KISS and YAGNI. The latter essentially means at least make it general enough that you can extend it later without major retooling if it turns out

Re: Easy question: what is a list comprehension ?

2008-04-05 Thread Luke Palmer
On Sat, Apr 5, 2008 at 7:32 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote On Apr 5, 2008, at 15:07 , John M. Dlugosz wrote: What is a list comprehension? I've seen that term bantered around here. The term comes from Haskell and Python; it's a shorthand notation for list

[PATCH] Re: Register stacks organization

2004-01-18 Thread Luke Palmer
Leopold Toetsch writes: Luke Palmer clearly should, that optimizations WRT register frame stacks are possible. The follwing numbers seem to second that: FRAMES_PER_CHUNK time real user 4 1.2s 0.9 8 1.6 16 2.3 1.4

Re: [PATCH] Re: Register stacks organization

2004-01-18 Thread Luke Palmer
Luke Palmer writes: -memcpy(buf-data.bufstart, chunk-data.bufstart, stack-chunk_size); +memcpy(buf-data.bufstart, chunk-data.bufstart, +stack-frame_size * FRAMES_PER_CHUNK); Silly me -- left over from benchmarks. Of course I mean: + memcpy(buf-data.bufstart

Re: Vtables organization

2004-01-18 Thread Luke Palmer
Benjamin K. Stuhl writes: Other than the special case of :readonly, can you give me an example of when you'd need to, rather than simply writing a PMC class that inherits from some base? I'm having trouble thinking of an example of when you'd want to be able to do that... After all, since

Re: Start of thread proposal

2004-01-19 Thread Luke Palmer
Dan's thread proposal mentions: =item Automatic PMC sharing will be provided When a PMC is placed into a container which is shared (including lexical pads and global namespaces) then that PMC will automatically be marked as shared. It is acceptable for this to trigger an exception if for

Re: Calling conventions, IMC

2004-01-19 Thread Luke Palmer
Will Coleda writes: I didn't expect the code to be very usable, merely compilable. =-) If I want to call myself from myself, how do I do that then? For anything else, I do: .local Sub foo_sub newsub foo_sub, .Sub, __foo .pcc_begin prototyped .arg $S1 .pcc_call foo_sub

Semantics of vector operations

2004-01-20 Thread Luke Palmer
A thought occurred to me. What should this return: [1,2,3] + [4,5,6] At first glance, one might say [5,7,9]. But is that really the best way to go? I'm beginning to think that it should be the same as whatever [1,2,3]+[4,5,6] is, hopefully an error. Here's my reasoning. Substitute $a =

Re: Semantics of vector operations

2004-01-21 Thread Luke Palmer
Warning: spacey, tangential semi-argument ahead. Larry Wall writes: On Tue, Jan 20, 2004 at 01:54:33AM -0700, Luke Palmer wrote: : A thought occurred to me. What should this return: : : [1,2,3] + [4,5,6] : : At first glance, one might say [5,7,9]. But is that really the best : way

Re: Q: Sub vs Closure lexical pads

2004-01-21 Thread Luke Palmer
Leopold Toetsch writes: While trying to generate a small example that shows the memory corruption problem reported by Steve, I came along these issues: a) [1] is .Sub, [2] is turned off The subroutine prints main's $m - very likely wrong. Well, Subs don't do anything with pads, so I'd

Re: [RESEND] Q: Array vs SArray

2004-01-21 Thread Luke Palmer
Dan Sugalski writes: At 9:38 AM +0100 1/21/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Okay, at this point we've a pile of different array classes Before we go any further we need to figure out what we want. 1) Unify setting/getting element count - the

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Luke Palmer
Jonathan Scott Duff writes: On Thu, Jan 22, 2004 at 01:10:23PM -0500, Austin Hastings wrote: In reverse order: %languageometer.values += rand; This is the same as all( %languageometer.values ) += rand; right? Well, yes. It's also the same as each of: any(

Re: Semantics of vector operations

2004-01-22 Thread Luke Palmer
Austin Hastings writes: How do you handle operator precedence/associativity? That is, $a + $b + $c If you're going to vectorize, and combine, then you'll want to group. I think making the vectorizer a grouper as well kills two birds with one stone. $a + $b + $c vs. $a +

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Luke Palmer
Austin Hastings writes: Sortof. I think Larry was implying that rand returned an infinite list of random numbers in list context. If not, then what he said was wrong, because it would be sick to say that: (1,2,3,4,5) + foo() Calls foo() 5 times. Why would it be sick, and

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Luke Palmer
Luke Palmer writes: (1,2,3,4,5) + foo() # Maybe the same as above? What does infix:+(@list,$scalar) do? Well, what does a list return in scalar context? In the presence of the C comma, it returns 5 for the last thing evaluated. In its absence, it returns 5 for the length

Re: Semantics of vector operations

2004-01-22 Thread Luke Palmer
Larry Wall writes: On Thu, Jan 22, 2004 at 08:08:13PM -0500, Joe Gottman wrote: :I just realized a potential flaw here. Consider the code : $a = 1; : :Will this right-shift the value of $a one bit and assign the result to $a : (the current meaning)? Or will it assign the

Re: Semantics of vector operations

2004-01-23 Thread Luke Palmer
Larry Wall writes: On Thu, Jan 22, 2004 at 07:03:26PM -0700, Luke Palmer wrote: : Larry Wall writes: : On the other hand, we've renamed all the : other bitwise operators, so maybe we should rename these too: : : +bitwise left shift : +bitwise right

Re: IMCC - PerlArray getting trounced

2004-01-25 Thread Luke Palmer
Will Coleda writes: I'm trying to track down a problem with a PerlArray that is getting modified on me. I have a snippet of code like: typeof $S12, tcl_words $I12 = tcl_words print TYPEOF: print $S12 print \n print SIZEOF: print $I12 print \n

Re: Benchmark Suite

2004-01-25 Thread Luke Palmer
Matt Fowles writes: All~ Of late it seems that everybody has been throwing around their own little homegrown benchmarks to support their points. But many people frequently point out that these benchmarks are flawed on one way or another. I suggest that we add a benchmark/ subdirectory

Re: Security problems with UnManagedStruct

2004-01-28 Thread Luke Palmer
Leopold Toetsch writes: This is unlimited self-inspection and self-modification :) With little additions (nested structs) one could read/write all Parrot_Interp internals (including possible security bits) and not only registers like above. But current state is already sufficient to

Re: OO inheritance in a hacker style

2004-01-28 Thread Luke Palmer
Dmitry Dorofeev writes: Hi all. Sorry if this idea|question has been discussed or has name which i don't know about. I am not very good at OO but I tried at least 2 times to develop with it though :-) Last time it was Java. The problem is that when i going to use some 'standard' class or

Re: Semantics of vector operations

2004-01-30 Thread Luke Palmer
Jonathan Lang writes: Luke Palmer wrote: Scott Walters writes: Would it be possible to subclass things on the fly, returning a specialized object representing the argument that knew how to vectorize when asked to add? Aren't add, subtract, multiply, and so on, implemented

Re: calling functions/class methods

2004-01-30 Thread Luke Palmer
Ph. Marek writes: Hello everybody, first of all please forgive me if I'm using the wrong words - I'm not up to date about the (current) meanings of methods, functions, etc. I read the article http://www.cuj.com/documents/s=8042/cuj0002meyers/ There is stated (short version -

Re: Semantics of vector operations

2004-01-30 Thread Luke Palmer
Scott Walters writes: On 0, Rod Adams [EMAIL PROTECTED] wrote: Also, isn't it a pain to type all these characters when they are not on your keyboard? As a predominately Win2k/XP user in the US, I see all these glyphs just fine,but having to remember Alt+0171 for a is going to get

Re: Semantics of vector operations

2004-01-30 Thread Luke Palmer
Luke Palmer writes: Scott Walters writes: This would lend itself a P5 backport that did overload on its argument, too. If it found that the thing on the right hand side was also overloaded into the same class, it is could use a single iterator on both sides, otherwise it would treat

Re: Semantics of vector operations

2004-01-29 Thread Luke Palmer
Austin Hastings writes: I think you guys may be talking at cross purposes. Robin, I think, is talking primarily about coding, while Damian talks of reading. Perhaps Damian's solution is a Unicode2Ascii perl script that emits formal names, combined with the implementation in Perl of the

Re: OO inheritance in a hacker style

2004-01-30 Thread Luke Palmer
Austin Hastings writes: Hmm. The text and examples so far have been about methods and this seems to be about multi-methods. Correct me if I'm wrong ... You're wrong. Consider my example, where via single inheritance we reach a layered list of methods, each of which replaces the previous

Re: Some namespace notes

2004-01-29 Thread Luke Palmer
Jeff Clites writes: We could certainly do some sort of language-specific prefixing, as Tim suggested, but it seems that we are then going to trouble to unify, only to immediately de-unify. Certainly, a random Java programmer shouldn't have to worry about naming a class so that it doesn't

Re: Semantics of vector operations

2004-01-31 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Gordon Henriksen [mailto:[EMAIL PROTECTED] Austin Hastings wrote: OTOH, Robin's concern for how to code when you're stuck with 7 bit ascii on the boot console of a Sun box remains valid, and *I* sure would rather have a

Re: Semantics of vector operations

2004-01-31 Thread Luke Palmer
I wrote: But I think that literal and are quite nice alternatives for and [1], and if the only think that's holding us back is the bitshift operators, we should kill them -- turn them into functions or something. Cshl and Cshr aren't so bad, are they? Or named operators. As in:

Compiler writing tools

2004-02-02 Thread Luke Palmer
I've been writing a lot of compiler recently, and figuring as how Perl 6 is aiming to replace yacc, I think I'll share some of my positive and negative experiences. Perhaps Perl 6 can adjust itself to help me out a bit. :-) =over =item * RegCounter I have a class called RegCounter which is

Re: Semantics of vector operations

2004-02-02 Thread Luke Palmer
Alex Burr writes: --- Andy Wardley [EMAIL PROTECTED] wrote: Adding unicode operators to Perl will just reinforce its reputation as a line noise language. Perl6, the language with *real* runes. Come to think of it, some of the ogham runes would look more incharacter as a

Re: Compiler writing tools

2004-02-03 Thread Luke Palmer
Larry Wall writes: On Mon, Feb 02, 2004 at 02:09:33AM -0700, Luke Palmer wrote: : method if_statement::code($rc) { # $rc is the regcounter : self.item[0].code($rc.next('condition')) : ~ unless $rc{condition}, $rc{Lfalse}\n : ~ self.item[1].code($rc.next

Re: OO inheritance in a hacker style

2004-02-04 Thread Luke Palmer
Joseph Ryan writes: It's surely possible by modifying that class's DISPATCH. Whether it should actually be in the language is up for debate. I'd say that if you need to do this with any frequency whatsoever, you're not thinking about roles right. A good example might be in order... :-)

Re: Some minor decisions and timetables

2004-02-04 Thread Luke Palmer
Leopold Toetsch writes: I'd add some syntax additions and some notes: - Pn above is a NameSpace PMC, derived from Hash - an interpreter has a current namespace - located in the context, so that its restored after sub calls getinterp P2 find_global Pn, P2[.] # get current NS

Re: crash in HEAD

2004-02-04 Thread Luke Palmer
Sterling Hughes writes: Hey, The following PIR crashes CVS head: .sub _main $P0 = new PerlUndef .sym PerlUndef i i = new PerlUndef i = 0 L0: $I0 = 0 $P1 = new PerlUndef $P1 = 10 unless i $P1 goto L3 $I0 = 1

Re: The Sort Problem

2004-02-12 Thread Luke Palmer
Aaron Crane writes: I have one other idea, but I can't decide if I like it: @unsorted == sort rinfix:cmp == @sorted; That is, rinfix: (or some other name) is like infix:, but gives you a function that reverses its arguments before actually running the operator. Perhaps it could even be

Re: dynamic arguments (was: The Sort Problem)

2004-02-12 Thread Luke Palmer
Jonathan Lang writes: How about including something similar to ==, but which binds the elements of the list to the various positional parameters? For instance: @sorted = sort {infix:= args map {$_.foo('bar').compute}, $^a, $^b } @unsorted; Where @x = $a, $b, $c;

Re: The Sort Problem (was: well, The Sort Problem)

2004-02-12 Thread Luke Palmer
Jonathan Lang writes: We already have that. It's spelled: routine [EMAIL PROTECTED]; Or routine * == @x; Then you've got your solution: @sorted = sort {infix:= * map {$_.foo('bar').compute}, $^a, $^b } @unsorted; or @sorted = sort {($^a, $^b)

Re: Rules for method resolution?

2004-02-14 Thread Luke Palmer
Michal Wallace writes: On Fri, 13 Feb 2004, Dan Sugalski wrote: We also have to have a way to fetch the method PMC for a named method for later use, which is where the interesting bits come in. This is required for a number of reasons, including Python, so we have to have it. The

Re: The Sort Problem

2004-02-15 Thread Luke Palmer
Uri Guttman writes: because that would be the default comparison and the extracted key value would be stringified unless some other marker is used. most sorts are on strings so this would be a useful huffman and removal of a redundancy. While I like where most of this is going, I beg to differ

Re: The Sort Problem

2004-02-16 Thread Luke Palmer
Uri Guttman writes: LP == Luke Palmer [EMAIL PROTECTED] writes: LP Uri Guttman writes: because that would be the default comparison and the extracted key value would be stringified unless some other marker is used. most sorts are on strings so this would be a useful huffman

Re: The Sort Problem

2004-02-16 Thread Luke Palmer
Damian Conway writes: type KeyExtractor ::= Code(Any) returns Any; type Comparator ::= Code(Any, Any) returns Int; type Criterion::= KeyExtractor | Comparator Pair(KeyExtractor, Comparator) ; type Criteria ::=

Re: The Sort Problem: a definitive ruling

2004-02-19 Thread Luke Palmer
Dave Whipp writes: Damian Conway [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] type KeyExtractor ::= Code(Any) returns Any; # Modtimewise numerically ascending... @sorted = sort {-M} @unsorted; One thing I've been trying to figure out reading this: what is

Re: The Sort Problem: a definitive ruling

2004-02-19 Thread Luke Palmer
Uri Guttman writes: DC == Damian Conway [EMAIL PROTECTED] writes: DC # Modtimewise numerically ascending... DC @sorted = sort {-M $^a = -M $^b} @unsorted; DC # Fuzz-ifically... DC sub fuzzy_cmp($x, $y) returns Int; DC @sorted = sort fuzzy_cmp, @unsorted;

Re: The Sort Problem: a definitive ruling

2004-02-19 Thread Luke Palmer
Luke Palmer writes: Yes. Commas may be ommitted on either side of a block when used as an argument. I would argue that they only be omitted on the right side, so that this is unambiguous: if some_function { ... } { ... } Which might be parsed as either

Re: The Sort Problem: a definitive ruling

2004-02-20 Thread Luke Palmer
Smylers writes: Luke Palmer writes: Uri Guttman writes: DC == Damian Conway [EMAIL PROTECTED] writes: DC @sorted = sort {-M}={$^b cmp $^a} @unsorted; but there is no comma before @unsorted. is that correct? Yes. Commas may be ommitted on either side of a block

Re: The Sort Problem: a definitive ruling

2004-02-20 Thread Luke Palmer
Smylers writes: Joe Gottman writes: sort {$_.key} (1= 'a', 10 = 'b', 2 ='c'); There is nothing in the signature of the key-extractor to suggest that all the keys are numbers, but as it turns out they all are. Are they? I'd been presuming that pair keys would always be strings

Re: The Sort Problem: a definitive ruling

2004-02-20 Thread Luke Palmer
Smylers writes: Luke Palmer writes: After this statement: $x = '345'; C$x is a number. Oh. I'd been assuming that quote marks indicated strings, and that, while a string containing only digits could obviously be treated as a number (as in Perl 5), it wouldn't be one

Re: How do I recognize an array element access?

2004-02-22 Thread Luke Palmer
Austin Hastings writes: Suppose I want to say: sub sublist(@a, $start, $cnt) { return @a[$start] +next --$cnt; } where +next is a binary macro that takes as its lhs an array element access, and its rhs a number, and returns a list of the array element followed by the next RHS

Re: [perl #25960] [PATCH] COWed stack bug (was IMCC - PerlArray getting trounced)

2004-02-23 Thread Luke Palmer
Leopold Toetsch writes: Matt Fowles [EMAIL PROTECTED] wrote: This patch make the problem case submitted by Jeff Clites work. All tests pass, and his sample has been added to the tests. struct RegisterChunkBuf* top = stack-top; if (top-used 1) { +top-used--;

Re: Another object bug

2004-02-26 Thread Luke Palmer
Leopold Toetsch writes: Dan Sugalski [EMAIL PROTECTED] wrote: At 4:54 PM -0500 2/25/04, Simon Glover wrote: If I'm understanding the docs correctly, this should print '0'. Instead, it prints 'Array index out of bounds!' Another bug, though the offset ought to be 2 right now.

Re: Another object bug

2004-02-26 Thread Luke Palmer
Dan Sugalski writes: At 2:38 PM +0100 2/26/04, Leopold Toetsch wrote: Simplifies compilers: newclass P1, Foo addattribute P1, i findclass I1, Foo new P2, I1 classoffset I2, P2 In static cases, where P2 is known to be a CFoo, attrib #0 (i) would be always 0. That

Re: Thinking about Accessors

2004-02-27 Thread Luke Palmer
John Williams writes: I want to get from here method bar_attr(?$val) is accessor { $.bar_attr = $val if exists $val; return $.bar_attr; } to here method bar_attr() is rw { return my $x is Proxy ( for = $.bar_attr, FETCH = {

Re: Compile-time undefined sub detection

2004-03-06 Thread Luke Palmer
Austin Hastings writes: Perhaps this is one of those places where properties can help. Instead of having BEFORE, REALLY_BEFORE, NO_I_MEAN_REALLY_BEFORE, DONE, MOSTLY_DONE, PARTIALLY_DONE, WELL_DONE, DONE_AND_PROCESS_SPACE_ALMOST_RECLAIMED, etc., we could simply use some ordering properties:

[PATCH] Prettifying parrotbench output

2004-03-09 Thread Luke Palmer
Here's a patch that prettifies parrotbench's output. It also redirects errors to /dev/null, and replaces them with !!! in the output. The benchmarking program is not the correct place to debug errors. Luke Index: tools/dev/parrotbench.pl

Re: [PATCH] Prettifying parrotbench output

2004-03-09 Thread Luke Palmer
Leopold Toetsch writes: Luke Palmer [EMAIL PROTECTED] wrote: Here's a patch that prettifies parrotbench's output. It also redirects errors to /dev/null, and replaces them with !!! in the output. The benchmarking program is not the correct place to debug errors. Must be soemthing wrong

Re: Mutating methods

2004-03-10 Thread Luke Palmer
Juerd writes: Perlists, In Perl 5, lc, lcfirst, quotemeta, uc and ucfirst don't mutate. chomp and chop do mutate. I imagine these will all be methods in Perl 6: $foo.lc $foo.quotemeta $foo.chomp I'd like a mutating version of lc, and a non-mutating version of chomp.

Re: Mutating methods

2004-03-10 Thread Luke Palmer
Larry Wall writes: On Wed, Mar 10, 2004 at 11:19:52AM -0800, Brent Dax Royal-Gordon wrote: : Luke Palmer wrote: : The reason we couldn't just decalre it with Cinfix:.= is because its : right hand side is not a usual expression. : : Isn't that what macros are for? : : macro infix

Re: Mutating methods

2004-03-10 Thread Luke Palmer
Larry Wall writes: On Wed, Mar 10, 2004 at 12:42:00PM -0700, Luke Palmer wrote: : I can think of a couple that I like better: : : ^foo : *foo : : ^foo is my favorite at the moment (even though *foo is more : visually pleasing), because it looks like it's transferring

Re: Mutating methods

2004-03-12 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] On Thu, Mar 11, 2004 at 06:49:44AM -0800, Gregor N. Purdy wrote: : So, will mutatingness be a context we'll be able to inquire on : in the implementation of a called routine? Probably

Re: imcc concat and method syntax

2004-03-13 Thread Luke Palmer
luka frelih writes: But how should the two interpretations of x.x be resolved? Is that concatenation or method calling? currently, the pir line S5 = S5 . 'foo' produces error:imcc:object isn't a PMC concatenation with . seems to be gone i cannot think of a good replacement

Re: Operators that keep going and going...

2004-03-14 Thread Luke Palmer
Carissa writes: The other thought that grew from these random neurons firing was whether or not it would be possible to have operators that don't actually do anything until the data they're dependent upon changes. I should hope that would be possible, since it's possible in Perl 5! See

Re: hash subscriptor

2004-03-15 Thread Luke Palmer
Larry Wall writes: On Mon, Mar 15, 2004 at 11:56:26AM -0700, John Williams wrote: : On Wed, 10 Mar 2004, Larry Wall wrote: : You subscript hashes with {...} historically, or these days, ..., : when you want constant subscripts. So what you're looking for is : something like: : :

Re: Some questions about operators.

2004-03-19 Thread Luke Palmer
Joe Gottman writes: 2) Do all of the xor variants have the property that chained calls return true if exactly one input parameter is true? I would imagine not. Cxor is spelled out, and by definition XOR returns parity. On the other hand, the junctive ^ (one()) is exactly one. 3)

Re: Some questions about operators.

2004-03-19 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: Friday, 19 March, 2004 10:06 PM To: Joe Gottman Cc: Perl6 Subject: Re: Some questions about operators. Joe Gottman writes: 2) Do all of the xor variants have the property

Re: Optimizations for Objects

2004-03-21 Thread Luke Palmer
Piers Cawley writes: You seem to be mixing up different issues with that statement. Using plain Continuation PMCs for returning just from subroutines was dead slow, w or w/o COWed stacks. But when a Continuation is simply a collection of pointers to the tops of the various stacks (and I

Outer product considered useful

2004-03-22 Thread Luke Palmer
I found myself writing a perl script today in which I did (I'll perl6-ize it for sake of discussion): for 98,99 - $i { for 0..255 - $j { # testing IP addresses with $i.$j } } I was thinking about what would happen if I allowed the user to input those ranges,

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Luke Palmer writes: I believe it could be programmed lazily. Like this: sub _outer_coro(*$first is context(Scalar), [EMAIL PROTECTED] is context(Scalar)) is coroutine { if @rest { _outer_coro [EMAIL PROTECTED

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Luke Palmer writes: Which is of course wrong. sub _outer_coro(@prev, @data) is coroutine { if (@data) { _outer_coro([ @prev, @data[0] ], @data[1...]) } else { yield [EMAIL PROTECTED]; } } sub outer([EMAIL

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Austin Hastings writes: Before this gets simonized, let me add that this seems genuinely useful: It provides a way of constructing a loop in a dimension that is not really accessible, except via recursion. Luke: Would that have to be for outer([EMAIL PROTECTED]) - @cp {...} ? -

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Austin Hastings writes: - @cp makes about as much sense as sub(@cp). Couter returns a list of array references, right? So it binds each one to @cp (the right of - is a subroutine parameter list, remember?). Are you saying that sub(@cp) is not, in fact, an alias for Cmap sub, @cp ?

Re: Ulterior Reference Counting for DoD?

2004-03-24 Thread Luke Palmer
[EMAIL PROTECTED] writes: Hi guys, I know approximately zero about the DoD and GC mechanisms which are currently used by Parrot, but I did attend a talk a few weeks ago about a promising new method of garbage collection called Ulterior Reference Counting:

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Luke Palmer
Aaron Sherman writes: I would expect [] to force itself into scalar context anyway. Is there ever a reason to want otherwise? Clearly the entire point of [] is to create a scalar array ref from a list of arguments. More to the point is there ever a reason to want any array ref in list

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-26 Thread Luke Palmer
Larry Wall writes: : Also, how does the use of *$foo differ from @$foo here? Is the later : going away? (I'd think that horrible, for the same reason as above: C : is confusing because it's not always clear what you get when you *.) No, @$foo is not going away. You can write it that way

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-26 Thread Luke Palmer
Juerd writes: Larry Wall skribis 2004-03-25 12:33 (-0800): On Thu, Mar 25, 2004 at 11:35:46AM -0800, Brent 'Dax' Royal-Gordon wrote: : Larry Wall wrote: : say @bar.elems;# prints 1 : Csay? Not Cprint? It's just a println spelled Huffmanly. Can't we instead just have a

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-26 Thread Luke Palmer
Larry Wall writes: On Fri, Mar 26, 2004 at 09:41:23AM -0700, Luke Palmer wrote: : Is @{$foo} going away? More specifically, how do I write that map if : $baz is some more complex expression, and I don't want to use * (say I : want to adhere if map decides to change its signature to take

Re: Fun with nondeterministic searches

2004-04-06 Thread Luke Palmer
Dan Sugalski writes: I'm OK with moving the return continuation out of P1 and into somewhere else--I can even see throwing it on the control stack. (Or a special register, I can live with that as well) I'd like to express my vote of confidence for an RC register, which is put in the context

Re: Compatibility with perl 5

2004-04-13 Thread Luke Palmer
David Cantrell writes: A few days ago I briefly discussed with Nicholas Clark (current perl 5.8 pumpking) about making perl5 code forward-compatible with perl6. A quick look through the mailing list archives didn't turn up anything obvious, and I don't recall any mechanism being presented in

Re: backticks

2004-04-14 Thread Luke Palmer
Scott Walters writes: Juerd, You'd do well to not remove the conclusion of my post when the conclusion is that the I strongly support you. Otherwise, your reply, read out of context, sounds like you're fending off an attacker ;) People would do well to seperate the merits of the idea from

Re: Array/Hash Slices, multidimensional

2004-04-15 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Abhijit A. Mahabal [mailto:[EMAIL PROTECTED] Sent: Thursday, 15 April, 2004 05:13 PM To: [EMAIL PROTECTED] Subject: Array/Hash Slices, multidimensional As the hash syntax is being worked out, I thought it'd be a good time

Re: backticks

2004-04-15 Thread Luke Palmer
Austin Hastings writes: -Original Message- From: Juerd [mailto:[EMAIL PROTECTED] Austin Hastings skribis 2004-04-15 18:38 (-0400): $foo % bar % is 4 keys: space, shift, 5, space. Too much, IMHO. Typability and readability are both VERY important. In that case, why

<    7   8   9   10   11   12   13   >