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,
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 --
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$/
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
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
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
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
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];
}
}
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,
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
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:
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
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]/
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
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
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,
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,
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.
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
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
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
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
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;
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
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
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.
--
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
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?
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
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
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
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
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
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
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
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
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
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
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),
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
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
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
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
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-()}}
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
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
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
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
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
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
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
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 :-)
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
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
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
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
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
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
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
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
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
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
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
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-
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
65 matches
Mail list logo