.
If you are wanting to actually mutate a Dog in a user-visible way rather
than deriving another Dog, then I don't think that calling Dog a value type
is appropriate.
-- Darren Duncan
Darren Duncan wrote:
4.5207196*10**30 - 45207196*10**37
Before anyone nitpicks, I meant to say on that line:
4.5207196*10**44 - 45207196*10**37
-- Darren Duncan
is already defined? If so I think
that is clearly distinct from Rat.
-- Darren Duncan
sin() that results in an exact rational is just
a wrapper over the last 2 operations combined, and it takes rounding-control
parameters. I see no problem here. -- Darren Duncan
that
sensitivity is special whereas sensitivity should be considered normal, and
rather insensitivity should be considered special.
-- Darren Duncan
problem.
It sure is.
-- Darren Duncan
Tom Christiansen wrote:
In-Reply-To: Message from Darren Duncan [EMAIL PROTECTED]
There is ABSOLUTELY NO WAY I've found to tell whether these utf-8
string should test equal, and when, nor how to order them, without
knowing the locale:
RESUME,
Resume
resume
Resum\x{e9
wonder about how to make an anonymous
literal of a KeyHash|KeySet|KeyBag. And also how does one specify a Rat vs a
Num or what does 18.2 or 4/3 actually get you? And also is there such a
thing as a Buf literal and if so how do you write one?
Thank you. -- Darren Duncan
Moritz Lenz wrote:
Darren Duncan wrote:
But some significant ones I don't know and really want to know:
Bit
Blob
Set
Bag
Mapping
I guess that Mapping is analog to the List/Seq case:
:a(2), :ab;
Sure, but given how Pair literals work, how would you know whether the above
collections, as is already the case for Array
and Hash, for both value declaration and element addressing.
-- Darren Duncan
Daniel Ruoso wrote:
Em Seg, 2008-12-01 às 18:21 -0800, Darren Duncan escreveu:
I'm wondering how to write anonymous value literals of some Perl 6 basic types,
and I didn't see mention of this in synopsis 2.
Getting away from your question entirely, I think the issue here is that
while Perl 6
is styled like .codes|.graphs etc of Str).
Bit is certainly not a replacement for Bool. If only one stays then Bool needs
to stay.
-- Darren Duncan
TSa wrote:
Darren Duncan wrote:
Strong typing in Perl means that Perl is conveniently and reliably
keeping track of this user-intended interpretation of the data, so it
is easy for any piece of code to act on it in a reasonable way.
Strong typing lets user code be clean and understandable
--name=value :namevalue # don't care
Is that right? Should the right column example not also be shortened to :n ? I
thought the single-dash names only allowed a single character in a name on
purpose, since multiple chars after a - were multiple options. -- Darren Duncan
do they still differ? -- Darren Duncan
the self-hosted shared one are in separate files.
So have I made any sense here, and what do you think?
-- Darren Duncan
are analogous to the Perl 6 Prelude. As long as the
Perl 6 Prelude is written in sufficiently high-level a fashion, it should be
effectively reusable.
-- Darren Duncan
Jon Lang wrote:
Forgive my ignorance, but what is a Prelude?
The Prelude is a file written in Perl 6 that defines some Perl 6 built-ins.
See http://perlcabal.org/svn/pugs/view/src/perl6/Prelude.pm for what AFAIK is
the newest version.
-- Darren Duncan
implementations, where each implementation wants to use it. Or just to take
advantage of the fact that Perl 6 itself should be easier to write some kinds of
code in than other languages, including itself. We can go further than the
minimal bit we have now.
-- Darren Duncan
Dave Whipp wrote:
Darren Duncan wrote:
Dave Whipp wrote:
sub sqrt(Num where { 0 = $_ = Real::Max } $x) {
(0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 }
}
So do you really mean as declarative a manner as possible? Or would
you consider this example to go beyond possible
hyper-ops
over explicit loops)
Yes, I agree; what you stated in the second paragraph here is what I considered
important for a prelude.pm. -- Darren Duncan
could be wrong on that point.
-- Darren Duncan
Larry Wall wrote:
On Fri, Jan 30, 2009 at 03:30:02AM -0800, Darren Duncan wrote:
What's with this NFG / Normal Form G that you refer to? I don't see any
mention of that in http://unicode.org/reports/tr15/ ... did you mean NFC?
Nope, this is a Perl/Parrot idea. It started out with a notion
to construct a reasonably sizeable pure sandbox of sorts
within their program, where it can be easier to get correct results without
errors and better performing auto-threading etc code by default. By allowing
certain markings and restrictions as I mention, this can work in Perl.
-- Darren
of purity also includes being deterministic,
isolated, and effectively atomic. I would consider a printout to be a side
effect that strictly speaking wouldn't belong in a pure system. However, having
a printout strictly for the purposes of debugging is okay.
-- Darren Duncan
or what have you.
After that Set::Relation is improved, then Muldis::Rosetta would then be
implemented, doing that on a larger scale.
-- Darren Duncan
have to
be the same of course.
-- Darren Duncan
Timothy S. Nelson wrote:
On Tue, 17 Feb 2009, Darren Duncan wrote:
Second of all, I think a more generic term than DateTime should be
used to name an object that represents an instant in time; for example
I suggest calling it Instant. The name Instant fits in a lot
better in the company
. -- Darren Duncan
Darren Duncan wrote:
Presumably the other enhancements we discussed like using the 'Instant'
name will follow soon.
Well, I spoke too quickly; its already done with r25405; good start there. --
Darren Duncan
don't know.
-- Darren Duncan
Timothy S. Nelson wrote:
On Thu, 19 Feb 2009, Darren Duncan wrote:
You could make month/day into positive integers or subtype of Int
where 1..12 etc, though it isn't strictly necessary. Leave year as
Int of course, since at least in the proleptic Gregorian etc you can
have negatives or zero
Dave Rolsky wrote:
On Thu, 19 Feb 2009, Darren Duncan wrote:
And which is why subsecond and whole-second *can* be combined.
Appropriate separation allows better accuracy in letting people
express what they mean rather than shoehorning it into a less accurate
space, like DateTime.pm shoehorns
Dave Rolsky wrote:
On Thu, 19 Feb 2009, Darren Duncan wrote:
So something like that. So Date and Time mean all Date|Time details,
and DateTime means all details of both. And Instant means any
combination of defined or not of said member attributes. And that's
actually why I advocated
Darren Duncan wrote:
Dave Rolsky wrote:
It's not necessary to store each unit internally in order to get
everything right, and not doing so makes some things a lot easier
(though it makes other things harder ;)
I prefer to make value representation simpler at the possible cost
since that is more
future-proofed (a specified date+time that is in the future won't change on you
between storage and retrieval with persistent memory).
-- Darren Duncan
no relationship to integers apart from cultural artifacts.
Let's keep our integers in the libraries, not in the fundamental
definition of what now and then mean.
Yep, couldn't agree more.
-- Darren Duncan
/all/etc this also means that
junctions would have to work with the non-enumerable set. -- Darren Duncan
Jon Lang wrote:
Darren Duncan wrote:
I was thinking that Perl 6 ought to have a generic interval type that is
conceptually like Range, in that it is defined using a pair of values
. Whatever it was, it sounded useful
at the time. -- Darren Duncan
is expensive and potentially never needs doing. I plan to demonstrate
this as part of my next major Set::Relation module reimplementation, in a few
weeks, though I don't expect a demonstration is necessarily required for people
to understand it.
-- Darren Duncan
Jon Lang wrote:
I'm not sure
Jon Lang wrote:
Darren Duncan wrote:
What I'm proposing here in the general case, is a generic collection type,
Interval say, that can represent a discontinuous interval of an ordered
type. A simple way of defining such a type is that it is a Set of Pair of
Ordered, where each Pair defines
if the parameters in question are named instead. Then one could
invoke it with say $r1.natural_join( [$r2, $r3] ) or some such.
I'm thinking maybe there was an answer to this in Synopsis 6 but I didn't see
it.
Thank you. -- Darren Duncan
Darren Duncan wrote:
So, is there some way, or is it reasonable for there to be, to declare a
method in Perl 6 such that say it is declared with say an Array of R or
Set of R etc parameter and that parameter is marked somehow, maybe with
a trait, to say it automatically gains the invocant
about is just that information about a Rat in terms of Ints can be extracted in
either format.
-- Darren Duncan
to know for my planning purposes.
Thank you. -- Darren Duncan
Duncan
Darren Duncan wrote:
I have a quick question about the Str type, described in Synopsis 2:
Str Perl string (finite sequence of Unicode characters)
Specifically, and partly in the interest in future-proofing, is there
support in Str for representing codepoint numbers that are beyond
acceptable.
I would assume that invoking .perl on a Junction would result in Perl code
consisting of the appropriate any/all/etc expression. -- Darren Duncan
Jon Lang wrote:
Darren Duncan wrote:
Jon Lang wrote:
Larry Wall wrote:
This is basically a non-problem. Junctions have one public method,
.eigenstates, which is vanishingly unlikely to be used by accident by
any mere mortal any time in the next 100 years, give or take a year.
If someone does
, putting the lot on the right side of
the --.
Note that this request is only useful to me if the existing -- means 'of' and
not 'returns'.
Thank you in advance for considering this request.
-- Darren Duncan
Larry Wall wrote:
On Thu, Mar 19, 2009 at 02:18:35PM -0700, Darren Duncan wrote:
Yes, -- is the of type, not the as type, as S02 I think says.
Good to know.
Second, since the sub NAME (PARAMS -- RETTYPE) {...} form looks nice
visually, I would like to request a variant of that form
be
indistinguishable at a glance, or regardless I think it can serve as reasonable
examples of how Perl 6 itself could look.
-- Darren Duncan
as black and white line-art. I know they are more examples, but some things I
saw suggested looked a bit too complicated. On the other hand, arguably the
gimel is too simple. But I'm sure something good can be worked out.
-- Darren Duncan
. Who
needs 200K individual emails when a 3K email and a link works fine.
Thank you. -- Darren Duncan
Attack Butterfly
that is about to bite your face off... :)
Please don't. I think the happy version is much better than any angry or
violent version. We want the logo to evoke happiness after all.
-- Darren Duncan
... I still have to
port it to Perl 6, unless someone else wants to do that, but I designed it so
that would be easy to do. The port could stand for some additional Perl 6
savvyness too.
-- Darren Duncan
Timothy S. Nelson wrote:
On Sat, 4 Apr 2009, Darren Duncan wrote:
Speaking of libraries, I already implemented a table type ... it's
called Set::Relation/::V2 and its on CPAN right now ... for Perl 5 ...
I still have to port it to Perl 6, unless someone else wants to do
that, but I designed
useful to have a library to wrap the
functionality, as it can remember those details for you. Set::Relation
currently does keys but not column types; Muldis::Rosetta will do both; either
way, those constraints are optional, though highly recommended in practice.
-- Darren Duncan
On 4/4/09
shows up often.
-- Darren Duncan
==
SQL:
SELECT 1
Muldis D Text:
function func1 (NNInt --) {
main {
1;
}
}
or:
function func1 (Relation --) {
main {
Relation:{ { attr1 = 1 } };
}
}
==
SQL:
SELECT
example code is meant to be a more literal translation
of what the SQL is saying. If the SQL spelled out columns to return, so does my
example. If the SQL said return all columns, then mine doesn't spell them out.
Anyway, thank you for your time.
-- Darren Duncan
==
SQL:
SELECT 1
;
}
... is like this (pseudo?) SQL code:
CREATE PROCEDURE proc1 (result ARRAY INOUT)
BEGIN
SELECT * INTO result FROM foo;
END;
I hope that answers your question.
-- Darren Duncan
there.
-- Darren Duncan
and B depends on an
incompatible version of Foo; then both versions of Foo need to work together.
And that's just one reason to have this support. -- Darren Duncan
already documents them quite well.
However, I think some set ops could also be used with hashes. For example, an
alternate way of spelling exists %foo{$bar} is $bar ∈ %foo or %foo ∋ $bar.
So, any thoughts?
-- Darren Duncan
anticipate that a Perl 6 standard
setting that exploits Unicode would only involve a few dozen math/etc symbols,
not too many to deal with I think.)
-- Darren Duncan
likely be used often enough.
-- Darren Duncan
= for assignment and == etc for comparison because you
thought that looked prettier, or because that was the C/etc convention that you
decided to copy?
-- Darren Duncan
why its good to take advantage of the real thing when
we are able to, and take the approximated spellings for what they are,
approximations.
exists has already been changed to an adverb on the lvalue, but I
suppose a macro could still be made to work.
Sure.
-- Darren Duncan
and one low precedence, I have no opinion as to whether ^^ goes to 'odd' or
'one', since AFAIK that isn't a standard symbol for the op from math anyway.
-- Darren Duncan
doesn't short-circuit.
Regardless of the above, I think Perl 6 should have both operators, testing
exactly 1 or an odd number.
-- Darren Duncan
, but explanation order too.
-- Darren Duncan
of Str/etc should
not include any file-system operations.
If you go ahead and put stat ops in Str anyway, then you might as well put
things like a delete_from(Hash $arg) method on Object, which is a less
objectionable version of such backwardness.
-- Darren Duncan
shouldn't have to use one explicitly if they don't
want to. Eg, FileSystem.stat($str, :e) should just DWIM.
But my main point is still that stat() etc should not be methods of Str.
-- Darren Duncan
something to mean log to the base 10 then it
should be spelled say log10, not log. See, log is the most generic
version of the name and so it should be the most generic version of the
operator, taking base as an argument. -- Darren Duncan
deal with.
-- Darren Duncan
that if the # are treated more like delimiters, then potentially we
could also have \# to escape literal #, same as we have \' or \ etc.
Having # at both ends makes it easier to see at a glance where comments begin
and end, and potentially it makes it easier to make a parser or syntax colorer.
-- Darren Duncan
literal, except for a lack of interpolation abilities, and literal # are
escaped.
That is essentially how I do comments in Muldis D, and it works quite well.
-- Darren Duncan
Darren Duncan wrote:
Personally, I think that comments should have trailing # as well as
leading ones, so they are more like
divider line, like ## (to 80
chars or something).
-- Darren Duncan
if or insomuch perhaps as a
symbol/identifier is a Str. Or it could be less like a Str in the whole but
it would at least contain a Str as an attribute.
-- Darren Duncan
think this can be made to work without much fuss, and it will be valuable.
Both for introspection of op-tree as well as the ability to regenerate the
original or as-if-original Perl code from the op-tree with more pleasing results.
-- Darren Duncan
Timothy S. Nelson wrote:
I had
, Instant and Duration are disjoint from Num/Rat. When I say
disjoint, I mean conceptually that FileName say has an attribute of type Str
rather than being defined as a subtype of Str. -- Darren Duncan
, are accessible under
'/Volumes/drive-name/...', and Unix in general lets you mount drives anywhere.
I imagine Windows supports more ways of denoting drives than the drive letter,
but either way I don't see a problem here.
-- Darren Duncan
more closely soon.
But one thing I'm not sure whether or not it was addressed is regards to whether
free-form documentation is still supported or can be effectively combined with
embedding documentation into the places that it is documenting.
-- Darren Duncan
current working
directory, such as because its going to spawn another non-Perl process, then
this should use some separate mechanism to what all of Perl's own IO uses, and
any such change would have no effect on any Perl $*CWD.)
-- Darren Duncan
.
-- Darren Duncan
of that doi,
meaning all urls visually are absolute. This might mean that the name
bookmark isn't as appropriate if it implies you can go to a parent of the
doi by way of it, but this is a minor quibble and if the feature is called
bookmark I won't really object.
-- Darren Duncan
Timothy S
abstracting away all
kinds of IO into a single uri scheme, but only abstracting the file system. Not
that it can't be further extended in appropriate ways.
-- Darren Duncan
Mark J. Reed wrote:
On Wed, Aug 19, 2009 at 2:35 AM, Darren Duncan dar...@darrenduncan.netwrote:
(If Perl really must have the ability to change the non-virtual current
working directory, such as because its going to spawn another non-Perl
process, then this should use some separate mechanism
Darren Duncan wrote:
The named filesystem roots can be defined or altered at runtime by Perl
code, and each one is defined within the context of another.
I should clarify my intention here, which is that each DOI is mapped behind the
scenes by Perl to a standalone absolute filesystem url
Jon Lang wrote:
'home' should be spelled '~'.
Yes, of course. And conceptually a DOI can be any string at all. Logically
we'd probably have non-alpha names for many of the common/standard ones. --
Darren Duncan
should be a hash with all the available file: roots,
i.e. $IO::Root is a hash-of-hashes where the keys are
{protocol-name}{arbitrary-name}. And the default arbitrary-name might
just be default.
-- Darren Duncan
and flexibility, but truly now I think my first suggestion of adding
branch and leaving ver and auth as is would be better.
So, what do the rest of you think about this?
-- Darren Duncan
Moritz Lenz wrote:
Darren Duncan wrote:
The question I have is what to do when a single same authority wants to release
multiple forks or branches of the same module,
It splits up into multiple authorities, conceptually. For example for
the development branches for perl5 one could write
.
Generally speaking, the simpler/terse looking numeric operators like / should
produce exact results from exact inputs where possible, and leave the inexact
(float) results from exact inputs to more complex/verbose looking operators.
Much appreciated.
-- Darren Duncan
Patrick R. Michaud wrote:
On Mon, Aug 31, 2009 at 01:28:08PM -0700, Darren Duncan wrote:
This is a great move; thanks for this change.
So now writing things like 5/43 in code will DWIM and produce a Rat which
maintains the intended value exactly, with no floating-point imprecision;
and so
that .pl6 is better than .p6, because
that more clearly states that we're talking about Perl 6 and not say Python 6 or
Pascal 6 or PHP 6 or whatever, all of which already have filename extensions
starting with p and that differ by other letters or lack thereof.
-- Darren Duncan
that an analogy of Perl's require
would be used instead to bring in other modules, at runtime.
-- Darren Duncan
it.
-- Darren Duncan
that should make
this distinction even clearer...
-- Darren Duncan
guess as
to the correct atomic time.
This said, the S02 definition should be made more specific as to whether it is
counting from the 1958 epoch or the 1977 one; presumably the former is implied
now if it says TAI.
-- Darren Duncan
the meaning of ^ consistent as up to but
not including. Then also saying ^4 means you get a range of 4 elements, so
there is that consistency too.
Also, the code example still reflects the 0..3 meaning that I prefer, so it is
an error if the meaning you picked is chosen.
-- Darren Duncan
201 - 300 of 444 matches
Mail list logo