Re: The last shall be last

2004-09-25 Thread Jonadab the Unsightly One
Richard Proctor [EMAIL PROTECTED] writes: Conflict with last LOOP? Hm, the context should be enough to distinguish them, no? (Hey, maybe they can be unified somehow -- last -1 to skip to the penultimate pass through the loop? =P) That could be generalised, next +1 skipping next iteration,

Re: A..Z alternatives

2004-09-25 Thread Jonadab the Unsightly One
Andrew Rodland [EMAIL PROTECTED] writes: What about BASIC? Aren't all the little kids today raised on BASIC? :) I don't know about the kids _today_, but for about twenty years starting circa 1980 most home computers came with exactly one programming language tool, and it was BASIC --

Re: Ordinals, Hashes, and Arrays, oh my

2004-09-25 Thread Jonadab the Unsightly One
Jonathan Lang [EMAIL PROTECTED] writes: ISAM? From the RDBMS world, a kind of index I think, or something along those lines. MySQL for example has a type of table called MyISAM. -- $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b-()}} split//,[EMAIL PROTECTED]/ --;$\=$ ;- ();print$/

Re: What Requires Core Support (app packaging)Z

2004-09-25 Thread Jonadab the Unsightly One
Adam D. Lopresto [EMAIL PROTECTED] writes: On Sat, 18 Sep 2004, Jonadab the Unsightly One wrote: The question is whether any of that needs to be core, and I'm starting to strongly think it doesn't. I was about to say that perl should only go trying to figure out that the file is an archive

Re: Synopsis 9 draft 1

2004-09-21 Thread Jonadab the Unsightly One
John Macdonald [EMAIL PROTECTED] writes: If a int1 (or int2 or nybble or other sub-addressable sized value) is being referred to, a similar issue arises since most machines these days have byte addressing, but do not have bit addressing. If you can't refer directly to it, the value will have

Re: Synopsis 9 draft 1

2004-09-21 Thread Jonadab the Unsightly One
Aaron Sherman [EMAIL PROTECTED] writes: It took us some time discussing this... we weren't sure what tense you were using. At first we thought it might be the past subjective, but after a while, we decided to coin a new tense: the vapor tense. ;-) Actually, it's not new at all; there's

Re: Synopsis 9 draft 1

2004-09-21 Thread Jonadab the Unsightly One
Larry Wall [EMAIL PROTECTED] writes: int1, int2, int4, int8, int16, int32, int64, uint1, uint2, uint4, uint8, uint16, uint32, uint64, num32, num64, num128, complex32, complex64, complex128, ... Well, all that is harmless enough, as long as I don't ever have the misfortune to inherit

Re: Pipeline Performance

2004-09-19 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: That's actually a very good idea. That's why Perl 6 has it :-) sub MediansBy5 ([EMAIL PROTECTED]) { gather { while @list = 5 { # there's no .length; it's .elems take (sort @list.splice(0,5))[2]; } }

Re: Pipeline Performance

2004-09-18 Thread Jonadab the Unsightly One
Rod Adams [EMAIL PROTECTED] writes: One solution I see to this would be to have a lazy return of some kind, where you can send out what results you have so far, but not commit that your execution is over and still allow further results to be posted. For lack of better word coming to mind,

Re: What Requires Core Support (app packaging)

2004-09-17 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: Most worlds don't use file extensions, except for humans. You exaggerate their lack of importance. File extensions don't matter to most operating system *kernels*, but they are nevertheless important for more than just Windows: * They are of critical

Re: Progressively Overhauling Documentation

2004-09-07 Thread Jonadab the Unsightly One
Mark Overmeer [EMAIL PROTECTED] writes: Oops, someone starts the holy war (again). Wether you put the docs in begin or end of the file, or intermixed with the code has a lot to do with your personal background. Sorry for the late reply, but I can't let this stand without further elaboration:

Re: Return with no expression

2004-08-24 Thread Jonadab the Unsightly One
Alexey Trofimenko [EMAIL PROTECTED] writes: I wanna ask, could be there in perl6 any difficulties with recognizing C:: as part of C... ?? ... :: ... and C:: as module sigil? Does it involve some DWIM? Among other things, the ?? will tip off the parser that it's looking for an expression

Re: - as - with automatic is rw

2004-08-21 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: Sick would be if - were introduced to make the variable write-only ;) Sicker still would be if - were introduced to make the variable neither readable nor writeable. HTH.HAND. -- $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b-()}} split//,[EMAIL PROTECTED]/

Re: enhanced open-funktion

2004-08-06 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: Not a problem, assuming that these are named arguments as in: open :r, $file; open :w, $file; open :rw, $file; open :r :w, $file; # Hmm... I like this approach. :a seems a probable replacement for $file then; one imagines that :a would be

Re: This week's summary

2004-07-26 Thread Jonadab the Unsightly One
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] writes: [surreal numbers] Care to explain what those are, O great math teacher? Surreal Number theory was an attempt in the latter half of the twentieth century to unify several existing sets of numbers (including the complex numbers, generalized

Re: Why do users need FileHandles?

2004-07-26 Thread Jonadab the Unsightly One
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] writes: hopefully without dependencies on external non-Perl things like gcc). Don't think it'll be possible for modules that have C components, I'm really hoping Perl6 will be sufficiently powerful that C components won't be needed or wanted. Oh,

Re: Why do users need FileHandles?

2004-07-24 Thread Jonadab the Unsightly One
JOSEPH RYAN [EMAIL PROTECTED] writes: Well, that's what all of the ruckus is about. There is a strong leaning towards including *no* builtin modules with the core. Surely, at bare minimum, there must be something included in core to allow things that are not in core to be easily installed,

Re: String interpolation

2004-07-24 Thread Jonadab the Unsightly One
Michele Dondi [EMAIL PROTECTED] writes: Well, it seems that there's still a big confusion/indecision about the default behaviour. But then an interesting point, and one that has already been raised, is that it should be somehow possible to customize string interpolation bu means of e.g.

Re: String interpolation

2004-07-24 Thread Jonadab the Unsightly One
Correct me if I'm wrong, but, by analogy with $foo.bar(), ... No Yes -- --- @foo@foo[1] %bar%bar{a} or %bar«a» $foo.bar$foo.bar() foofoo(1) @foo@foo.join( ) Yes? /me idly wonders whether map and grep and

Re: String interpolation

2004-07-24 Thread Jonadab the Unsightly One
Johan Vromans [EMAIL PROTECTED] writes: Larry Wall [EMAIL PROTECTED] writes: : my $d=a; : print --$d--{my $d = b }--$d--\n; Yes, that is correct. I'm afraid things like this will keep many popular editors and IDEs from implementing perl6 support... Then maybe people will switch to

Re: push with lazy lists

2004-07-19 Thread Jonadab the Unsightly One
Ph. Marek [EMAIL PROTECTED] writes: This is obviously some new definition of Inf of which I was not previously aware. Well, after reading my sentence one more, I see what may have caused some troubles. Inf is not in N; but *in my understanding* it fits naturally as an extension to N, that

Re: scalar subscripting

2004-07-17 Thread Jonadab the Unsightly One
Larry Wall [EMAIL PROTECTED] writes: And if we do that, I guess that means that $«file».ext could be made to work as a replacement, which seems conceptually clean if you don't think about it too hard. Now that you put it that way, $( $file ).ext doesn't seem so bad, the visually-distracting

Re: enhanced open-funktion

2004-07-17 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: my $fh = open $filename :excl; Can we please not name it with a random character generator? How about something that communicates what it does in some fashion, at least well enough to function as a mnemonic? my $fh = open $filename :rw :noreplace;

Re: enhanced open-funktion

2004-07-17 Thread Jonadab the Unsightly One
Larry Wall [EMAIL PROTECTED] writes: 1 .. (some_big_hairy_expression) ^:by(3) But we'd have to pay really close attention to how indenting is done. Maybe we should just pass this suggestion on to Guido... :-) Yes, please leave column-alignment tricks to Python. I don't even

Re: push with lazy lists

2004-07-16 Thread Jonadab the Unsightly One
Austin Hastings [EMAIL PROTECTED] writes: Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which collapses to the range [Inf, Inf). It's not that simple. By that reasoning, 10% of all numbers in [0,Inf) would be in [Inf/10,Inf), also reducing to the range [Inf,Inf). For that

Re: push with lazy lists

2004-07-16 Thread Jonadab the Unsightly One
David Storrs [EMAIL PROTECTED] writes: Does it even make sense to take the Infiniteth element of an array? No. At best, it would be undefined, so we could define it to return undef. I think I would prefer if using Inf as an array index resulted in a trappable error. Or that, yeah. --

Re: push with lazy lists

2004-07-16 Thread Jonadab the Unsightly One
Ph. Marek [EMAIL PROTECTED] writes: Please take my words as my understanding, ie. with no connection to mathmatics or number theory or whatever. I'll just say what I believe is practical. [...] I'd believe that infinity can be integer, ie. has no numbers after the comma; and infinity is in

Re: scalar subscripting

2004-07-14 Thread Jonadab the Unsightly One
Larry Wall [EMAIL PROTECTED] writes: No, just currently wrong. :-) I changed my mind about it in A12, partly on the assumption that $object.attr would actually be more common than $file.ext, Speaking of which, what's the cleanest way to interpolate filenames with a fixed extension now?

Re: = brother

2004-07-14 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: strange, but :shift«value» looks a little more noisy to me than shift = 'value', For some reason, it looks that way to me, too. Me three. Perhaps: :shift« value » I *think* that's better... To me, that's even worse. My brain sees spaces

Re: The .bytes/.codepoints/.graphemes methods

2004-07-12 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: Or, god forbid, a word? m:base/que mas/ We're not mathematicians: we're allowed to use more than one letter in a row to designate something :-) Well, if it were *me*, *I* would have voted for keeping the core language 100% pure ASCII, untainted by

Re: The .bytes/.codepoints/.graphemes methods

2004-07-10 Thread Jonadab the Unsightly One
Austin Hastings [EMAIL PROTECTED] writes: I think this is something that we'll want as a mode, a la case-insensitivity. Think of it as mark insensitivity. Makes sense to me, but... Maybe it can just roll into :i? It will probably get used in _conjunction_ with case-insensitivity quite a

Re: This week's summary

2004-07-07 Thread Jonadab the Unsightly One
The Perl 6 Summarizer [EMAIL PROTECTED] writes: Different OO models Jonadab the Unsightly One had wondered about having objects inheriting behaviour from objects rather than classes in Perl 6. Urgle. I've completely failed to explain myself so as to be understood. That wasn't

Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: I thought temp replaced local. temp is dynamic scoping, the same thing as Perl5's local. Hypotheticals are the ones that turn permanent if everything succeeds according to plan but revert to the old value if stuff fails -- a rollback mechanism, basically. I

Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Brent 'Dax' Royal-Gordon [EMAIL PROTECTED] writes: Actually, I think you're underestimating the little guys. After all, if they rolled back *all* of your changes, all they could do was repeatedly execute the same code! Except that you can pass the continuation some arguments, possibly

Re: if not C, then what?

2004-07-03 Thread Jonadab the Unsightly One
Jonathan Lang [EMAIL PROTECTED] writes: Strictly from a grammatical perspective, I'd be much more comfortable with C, then instead of Cthen as the perl equivelent of the C-style comma: have the then keyword change the preceeding comma from a list constructor to an expression combiner. From a

Re: if not C, then what?

2004-07-03 Thread Jonadab the Unsightly One
David Storrs [EMAIL PROTECTED] writes: e.g., is this legal? sub infix:before ( $before, $after ){ ... } I should HOPE it would be legal to define infix:before. Some of us don't want to use untypeable characters every time we want to define an operator that doesn't conflict with the core

Re: if not C, then what?

2004-07-03 Thread Jonadab the Unsightly One
Jonathan Lang [EMAIL PROTECTED] writes: For the record, I was mentally parsing this example as: pray_to $_; sacrifice $virgin for @evil_gods; So was I, FWIW. The precedence of Cthen isn't very intuitive to me. Is that an argument for changing its precedence, or for leaving it out

Re: undo()?

2004-07-03 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: Oh no! Someone doesn't understand continuations! How could this happen?! :-) Yes, well, I've only just started reading up on them recently... A continuation doesn't save data. It's just a closure that closes over the execution stack Ah. That helps

Re: Next Apocalypse

2004-06-29 Thread Jonadab the Unsightly One
Austin Hastings [EMAIL PROTECTED] writes: Of course, how hard can it be to implement the .parent property? .parent and also .children, plus .moveto and .remove (which doesn't actually destroy the object but sets its parent to undef, basically, cleaning up the .children property of its parent),

Re: The .bytes/.codepoints/.graphemes methods

2004-06-29 Thread Jonadab the Unsightly One
Dan Sugalski [EMAIL PROTECTED] writes: Hmm. Suppose that I have a system that is friendly to 80 byte records. I want to output meaningful strings, so I want to partition a buffer into 80-ish byte substrings, but preserve any graphemes (i.e., store the data in a legible format). How would I

Re: The .bytes/.codepoints/.graphemes methods

2004-06-29 Thread Jonadab the Unsightly One
Austin Hastings [EMAIL PROTECTED] writes: A couple of alternatives: substr.bytes($string, 2, 4) = $substitute; Well, that's arguably better than bsubstr. substr($string.bytes, 2, 4) = $substitute; I could live with that, although it doesn't allow mixing units. (Someone will pop in here

Re: if, loop, and lexical scope

2004-06-29 Thread Jonadab the Unsightly One
John Williams [EMAIL PROTECTED] writes: $b = 'a'; my $b ='b' , print $b\n; print $b\n; Which seems to show that the my $b doesn't actually come into scope until the end of the statement in which it is defined. The comma operator doesn't guarantee order of operation because it's

Re: The .bytes/.codepoints/.graphemes methods

2004-06-29 Thread Jonadab the Unsightly One
Juerd [EMAIL PROTECTED] writes: substr($string, 2 but graphemes, 4 but bytes); I think but even makes sense, if substr defaults to something. That could be combined with a smart substr that only needs the units once (err, only needs a position object for one of the args) and knows how to

Re: Next Apocalypse

2004-06-29 Thread Jonadab the Unsightly One
Dan Sugalski [EMAIL PROTECTED] writes: Sure, no big deal. Also, don't forget the trival matter of moving from a class-based object system No, the object system in question is still class-based. The object forest is orthogonal to that. -- $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b-()}}

Re: undo()?

2004-06-29 Thread Jonadab the Unsightly One
Michele Dondi [EMAIL PROTECTED] writes: I must say I've still not read all apocalypses, and OTOH I suspect that this could be done more or less easily with a custom function (provided that variables will have a method to keep track of their history, or, more reasonably, will be *allowed* to

Re: The .bytes/.codepoints/.graphemes methods

2004-06-28 Thread Jonadab the Unsightly One
Larry Wall [EMAIL PROTECTED] writes: That all has to be looked at anyway. What does 5 mean when you pass it to substr, anyway? I was just going to ask about substrings, and then didn't because I figured that had been hashed out already and I'd missed it... (I've been trying to make it

Re: Next Apocalypse

2004-06-28 Thread Jonadab the Unsightly One
Dan Sugalski [EMAIL PROTECTED] writes: Speaking of objects... are we going to have a built-in object forest, like Inform has, where irrespective of class any given object can have up to one parent at any given time, Multiple parent classes, yes. Not remotely the same thing. Parent

Re: definitions of truth

2004-06-26 Thread Jonadab the Unsightly One
Paul Hodges wrote: Do note that I realize I can check it. It's just that for no reason I can quite define, my C background wants a null byte to be FALSE without any special chicanery on my part when checking. I can live with the fact it isn't going to be, it just seems odd to me. If that seems odd

Re: definitions of truth

2004-06-25 Thread Jonadab the Unsightly One
Paul Hodges wrote: So a null byte is still Boolean true. Ugh, yarf, ack, etc. But as long as I know -- easy enough to check explicitly. But just tell me thisam I the only guy who thinks this *feels* wierd? It doesn't feel weird to me, but my previous languages of choice were fairly high-level

Re: definitions of truth

2004-06-24 Thread Jonadab the Unsightly One
In Perl5, the following values are FALSE: undef, '0', 0, and ''. What you fail to note is that each of these is false for a reason. undef is false so that you can test an object for truth; if it is undef it obviously contains no data, so it's false. 0 is false so that you can test numbers for

Re: definitions of truth

2004-06-24 Thread Jonadab the Unsightly One
Larry Wall wrote: What do you mean by length? For a string, it obviously either means number of bytes or number of characters. Pick one, document it, and let people who want the other semantic use a pragma. I don't think it matters which one you pick as default, as long as it's clearly

Re: definitions of truth

2004-06-24 Thread Jonadab the Unsightly One
Juerd wrote: That we already have. 0 but true. (perldoc -f fcntl) It's 1 but false that's really special :) No, what's really special is the ability to return entirely different things in string versus numeric context, like the magic $! does in Perl5. That, or interesting values of undef :-)

Re: unicodian monospace fonts for windows(?)

2004-06-21 Thread Jonadab the Unsightly One
but now i have this issue: I'm coding on Windows, there's already two unicode compliant monospace fonts: Lucida Console and Courier New. And I do not like both of them, (f.e. in Courier { and ( looks almost the same, and lucida has too crude letters). Until now I used to use Fixedsys

Re: Next Apocalypse

2003-09-13 Thread Jonadab the Unsightly One
Dan Sugalski [EMAIL PROTECTED] writes: Next Apocalypse is objects, and that'll take time. Objects are *worth* more time than a lot of the other topics. Arguably, they're just as important as subroutines, in a modern language. Speaking of objects... are we going to have a built-in object

Re: E6: assume nothing

2003-09-07 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: A synonym of: delete %h{foo}; would be %h{foo} = nonex; This has the potential, if not documented exactly right, to create bogus expectations. Consider... $s = %h{foo} = nonex; After deleting the foo key (and its value, if any) from %h

Re: Junctions Set Theory

2003-09-02 Thread Jonadab the Unsightly One
Abhijit A. Mahabal [EMAIL PROTECTED] writes: On the other hand, if you wanted to say true for all except exactly one value, I can't think of a way. Easy. The following two statements are equivalent: F(x) is true for all but exactly one x (not F(x)) is true for exactly one x The only

Re: Perl 6's for() signature

2003-08-14 Thread Jonadab the Unsightly One
John Siracusa [EMAIL PROTECTED] writes: Did this ever get resolved to anyone's satisfaction? While reading EX6, I found myself wonder exactly what for() would look like in Perl 6 code... A for loop[1] is basically syntax sugar for a while loop. In general, where foo, bar, baz, and quux are

Re: Perl 6's for() signature

2003-08-14 Thread Jonadab the Unsightly One
Luke Palmer [EMAIL PROTECTED] writes: Yes, it's possible to have two routines with the same name which differ by signature... however, in Perl 6, Cfor has only one signature, and it's the one above. The Cfor loop you are thinking of is spelled Cloop, Oh, yes, forgot about that. To the

Re: Perl 6's for() signature

2003-08-09 Thread Jonadab the Unsightly One
Abhijit A. Mahabal [EMAIL PROTECTED] writes: There is another problem beyond efficiency: the P6 list semantics is lazy. The following is valid P6, AFAIK: for 1 .. Inf { print $_; last when 10; } Yeah, but that's a foreach loop, despite the fact that foreach is spelled for in your

Re: Aliasing an array slice

2003-07-08 Thread Jonadab the Unsightly One
David Storrs [EMAIL PROTECTED] writes: my $r_slice = [EMAIL PROTECTED]; @$r_slice = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 This seems right to me. It would take approximately no time to get used to this semantic, IMO. # Note that it does NOT modify in rvalue

Re: Aliasing an array slice

2003-07-08 Thread Jonadab the Unsightly One
Jonadab the Unsightly One [EMAIL PROTECTED] writes: Does this imply, though, that it's pointing to specific elements, Wow, I wasn't paying attention to what I was thinking there. Obviously it points to specific elements, because the subscripts used to create a slice don't have to be sequential

Re: Perl6 Daydreams (on topic but frivolous)

2003-07-04 Thread Jonadab the Unsightly One
Iain Truskett [EMAIL PROTECTED] writes: * Jonadab the Unsightly One ([EMAIL PROTECTED]) [01 Jul 2003 23:41]: Iain Truskett [EMAIL PROTECTED] writes: Not the only one. And with Parrot being able to execute Z-code, it might be sane to port Inform to Parrot! Did you mean port Inform

Re: Perl6 Daydreams (on topic but frivolous)

2003-07-01 Thread Jonadab the Unsightly One
Iain Truskett [EMAIL PROTECTED] writes: Not the only one. And with Parrot being able to execute Z-code, it might be sane to port Inform to Parrot! Did you mean port Inform to run on Parrot, or port Inform to compile to parrot? If the former, that should be no problem. If the latter, I'm not

Re: printf-like formatting in interpolated strings

2003-06-29 Thread Jonadab the Unsightly One
This was a few days ago, but I just noticed Tim Bunce's comment about the way other languages do it and thought of the way it is in another language I know (one that a lot of people don't know), so I'm chiming in briefly... Austin Hastings [EMAIL PROTECTED] writes: How about a pre- or user-

Re: Perl6 Daydreams (on topic but frivolous)

2003-06-29 Thread Jonadab the Unsightly One
Miko O Sullivan [EMAIL PROTECTED] writes: - I'm looking forward to more Pure Perl modules. I frankly admit that I don't like coding in C. Every time I download a module that has compiled C code I feel like I'm stuck in some place where I want to play baseball and everybody else wants to