Re: [perl6/specs] 40163b: reverse associativity on R ops

2015-03-30 Thread Martin D Kealey
with differing associativity? Which then would mean that R would have to tweak the precedence slightly, to avoid an implicit infraction. So perhaps we could have a rule that meta-ops generate new operators of marginally looser precedence than the originals? -Martin On Sun, 29 Mar 2015, GitHub wrote

Re: Grammars and biological data formats

2014-08-16 Thread Martin D Kealey
Hmmm, what about just implementing mmap-as-string? Then, assuming the parsing process is somewhat stream-like, the OS will take care of swapping in chunks as you need them. You don't even need anything special to support backtracking -- it's just a memory address, after all. -Martin On Thu, 14

Re: [perl6/specs] 5277fe: Add expmod and is-prime as built-ins in Int

2012-09-20 Thread Martin D Kealey
up front that the test might change. -Martin

Re: [perl6/specs] 5277fe: Add expmod and is-prime as built-ins in Int

2012-09-20 Thread Martin Kealey
) ) * a logical contradiction (return an unthrown exception) * a formal error (throw an exception) -Martin

Re: How to make a new operator.

2012-03-22 Thread Martin D Kealey
. Likewise for AscendingArithmeticIteratorExclusiveTerminalSmartMatch (=) DescendingArithmeticIteratorInclusiveTerminalSmartMatch () and DescendingArithmeticIteratorExclusiveTerminalSmartMatch (=). -Martin

Re: Setting private attributes during object build

2012-02-02 Thread Martin D Kealey
it clear that BUILDALL is NOT required? Is there an answer to this conundrum? -Martin

Re: [perl6/specs] ff11f1: define %%; clarify that % is not quantmod

2011-09-28 Thread Martin D Kealey
fan, but that feature has a particularly wholesome appeal about it.) -Martin On Sun, 25 Sep 2011, nore...@github.com wrote: Date: Sun, 25 Sep 2011 17:33:22 -0700 From: nore...@github.com To: perl6-language@perl.org Subject: [perl6/specs] ff11f1: define %%; clarify that % is not quantmod

Re: Encapsulating the contents of container types

2011-09-10 Thread Martin D Kealey
until after the sub returns. (BTW this would have a lot of benefits for auto-threading code.) -Martin

Re: exponentiation of Duration's

2010-11-18 Thread Martin D Kealey
, including sometimes latent ones in ported code. Duration is a fairly clear example of a dimensioned quantity, and I think we should think twice about abandoning its dimensionality, and the restrictions that implies. -Martin

Re: Tweaking junctions

2010-10-29 Thread Martin D Kealey
when the threads are recombined; the result often won't be what's expected. Don't get me wrong, I think Junctions are a really clever way of writing concise conditional expressions, but I think algebraic consistency is more important than clever conciseness. -Martin

Re: Tweaking junctions

2010-10-27 Thread Martin D Kealey
rule produces the same junction type, or like !=, where the distributive rule produces the inverse junction type? Or do we not invert junctions, and run the risk of unexpected action-at-a-distance instead? -Martin

Re: Smart match isn't on Bool

2010-08-03 Thread Martin D Kealey
, and then A ~~ B just works like ?! (A) xor B, if B is a Bool. -Martin PS: I also considered some other possibilities, but I don't like them as much: if - VALUE-TO-MATCH {...} when - VALUE-TO-MATCH {...} - if VALUE-TO-MATCH {...} - when VALUE-TO-MATCH {...} .if VALUE-TO-MATCH {...} .when

Re: Suggested magic for a .. b

2010-08-01 Thread Martin D Kealey
. To paraphrase Dante, the road to hell is paved with Reasonable Defaults. Or in programming terms, your reasonable default is the cause of my ugly work-around. -Martin

Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-07 Thread Martin D Kealey
would be written as Set(Set(X,Y,...)) or perhaps more mathematically as 2 ** Set(X,Y,...) -Martin

Re: You never have privacy from your children in Perl 6

2010-03-29 Thread Martin D Kealey
? Well, privacy, trust, ... -Martin

Re: numerics, roles, and naming

2010-03-16 Thread Martin D Kealey
suggest Predicate as the name of the role which implements a single true-or-false value (as distinct from a bit, which implements a 0-or-1 value). -Martin

Re: numerics, roles, and naming

2010-03-16 Thread Martin D Kealey
quadrant, take them in turns. Extends to 3D and higher in a logic fashion. But totally useless as a greater than/equal to/less than comparison test. -Martin

Announcing Rakudo Perl 6 Development release #26 (Amsterdam)

2010-02-19 Thread Martin Berends
On behalf of the Rakudo development team, I'm pleased to announce the February 2010 development release of Rakudo Perl #26 Amsterdam. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine (see http://www.parrot.org). The tarball for the February 2010 release is available from

Re: r29113 - docs/Perl6/Spec

2009-11-17 Thread Martin D Kealey
of the mathematical over-bar notation) ⌇ verticle squiggly line ⇅ up-and-down arrow (since it inverts imaginary but not real parts) -Martin

Re: unusual invocants

2009-10-24 Thread Martin D Kealey
of the roles (by passing them through to the appropriate methods on the original object). This could be done transparently to formal parameters, so that when they're used locally they would dispatch the expected method based on the locally declared type for the object. -Martin

Re: $*CWD and chdir()

2009-08-20 Thread Martin D Kealey
} I wonder if this is becoming the new Perl mantra use lexically scoped pragmata. perl6 -MCwd=fake ... # legacy behaviour -Martin

Re: XOR does not work that way.

2009-07-03 Thread Martin D Kealey
On Thu, 2 Jul 2009, TSa wrote: Martin D Kealey wrote: This solves both the human expectation (Would you like wine or beer or juice? Beer and juice please Sorry...) and the associativity problem: (a ^^ b) ^^ (c ^^ d) == a ^^ (b ^^ (c ^^ d)). I don't understand how the associativity

Re: XOR does not work that way.

2009-06-24 Thread Martin D Kealey
operand (which should be false). This solves both the human expectation (Would you like wine or beer or juice? Beer and juice please Sorry...) and the associativity problem: (a ^^ b) ^^ (c ^^ d) == a ^^ (b ^^ (c ^^ d)). -Martin PS: Given that my suggested definition would always return one

Re: Why pass by reference?

2009-06-19 Thread Martin D Kealey
, and - that invariance should be enforced passing a deep immutable clone (*5) in place of any object that isn't already immutable. -Martin Footnotes: *1: There are many possible reasons, but for example the caller didn't declare it :readonly in turn to its callers because it *did* plan to meddle

Re: Why pass by reference?

2009-06-19 Thread Martin D Kealey
On Fri, 19 Jun 2009, Martin D Kealey wrote: To that end I would propose that: - parameters should be read-only AND invariant by default, and - that invariance should be enforced passing a deep immutable clone (*5) in place of any object that isn't already immutable. Sorry, typo

Re: [Fwd: Re: junctions and conditionals]

2009-04-02 Thread Martin D Kealey
state. Indeterminate states aren't sufficiently value-like to justify constant folding. -Martin

Re: simultaneous conditions in junctions

2009-04-02 Thread Martin D Kealey
, but I hope you get the idea.) -Martin

Re: junctions and conditionals

2009-04-01 Thread Martin Kealey
) $x OP none($y,$z) none($x OP $y, $x OP $z) -Martin (*1: An argument could be made that none should leave the junction alone, the same as all.) (*2: I would like to suggest that the semantics of one be changed to mean pick one (randomly) rather than exactly one. In this respect it would

Re: Junction Algebra

2009-03-30 Thread Martin D Kealey
; # matches for -1 +1 -Martin

Re: Junction Algebra

2009-03-30 Thread Martin Kealey
after their results are flattened by the junctive operator. -Martin

Re: .map/.reduce with larger arity

2009-03-10 Thread Martin D Kealey
); @list = iterator(@list); But I suspect they should logically be the other way around: iterator = code.map($signature); @list = iterator(@list); @list = @array.for(code); -Martin

Re: r25490 - docs/Perl6/Spec

2009-02-26 Thread Martin D Kealey
On Thu, 26 Feb 2009, Martin D Kealey wrote: On Wed, 25 Feb 2009, Timothy S. Nelson wrote: I'm in favour of retaining the $[ functionality, but lets give it some name like $*INDEX_BEGINNING or something like that, so that it's quite long for people to type :). Surely the interpretation

Re: r25573 - in docs/Perl6/Spec: . S32-setting-library

2009-02-26 Thread Martin D Kealey
. On some implementations SIGUSR1 and/or SIGUSR2 are ignored by default. Core dumps are subject to ulimit controls, even when the signal in question would normally trigger them. -Martin

Re: r25490 - docs/Perl6/Spec

2009-02-25 Thread Martin D Kealey
? role OffsetArray[::ElementType = Object;; int $MinIndex = 1] { is Array; has ElementType @.contents; method circumflex:? [ ] ? (int $index where { $_ = $MinIndex } ) { return @.contents[$index - $MinIndex]; } } -Martin

Re: Comparing inexact values (was Re: Temporal changes)

2009-02-24 Thread Martin D Kealey
) would mostly be useful for expressing solutions to polynomials. Perhaps we could define infix:± as a range generator and prefix:± as a set generator: $y + ±5 # same as ($y - 5) | ($y + 5) (also same as $y - ±5) $y ± 5# same as ($y - 5) .. ($y + 5) -Martin

Re: Comparing inexact values (was Re: Temporal changes)

2009-02-24 Thread Martin D Kealey
ranges will match; back to the original question, I'd only expect one match from: $time ~~ $date-yesterday $time ~~ $date-today $time ~~ $date-tomorrow even if $time falls precisely on midnight. -Martin

Re: Signals question for S16: IPC / IO / Signals

2009-02-23 Thread Martin D Kealey
-level code that receives signals and arranges not to leave a (broken) partially-formed call frame in the chain while setting up a call frame to invoke the handler function. -Martin

Re: Temporal changes (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-22 Thread Martin D Kealey
), and Localtime and Date (which believe fictions 3 and 4). For each of these you have corresponding variants of Duration. So my question is, which of these fictions should the core temporal type(s) believe or disbelieve? Then we should name them appropriately. -Martin PS: IMHO core types should

Re: Temporal changes (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-22 Thread Martin D Kealey
more :). Ah, we want a noun that isn't readily confused as an adjective. Suitable terms might include: Instant Jiffy Juncture Moment Occasion Snap Tick ... -Martin

Re: Temporal and purity (was: Re: IO, Trees, and Time/Date)

2009-02-19 Thread Martin Kealey
On Fri, 20 Feb 2009, Timothy S. Nelson wrote: On Thu, 19 Feb 2009, Martin D Kealey wrote: Rather, let's have immutable time values, and methods which return other values where various computations (*1) have been applied. Provide constructors which take the Y/M/D/h/m/s/dst_now/dst_rule tuple

Re: IO, Trees, and Time/Date

2009-02-18 Thread Martin D Kealey
/Geneva'), :no_dst ); -Martin *1: Operations on localtime objects involve differences, offsets and baselines, expressed in a range of units. The core units are seconds, minutes and days which are almost-but-not-quite exact multiples of each other (consider leap seconds (*2) and daylight saving

Re: Detecting side-effects in Perl 6 (Was: Re: infectious traits and pure functions)

2009-02-17 Thread Martin D Kealey
). Question: does/should MMD differentiate between :ro and :rw parameters or invocants that are otherwise identical? -Martin *1: actually it's a bit more complicated; a mutable object can be re-tagged as immutable iff it's at end-of-life according to data-flow analysis AND all its contained sub-objects

Re: infectious traits and pure functions

2009-02-16 Thread Martin D Kealey
function parameters (that can't be changed by someone else while the function is looking at them, even by other threads or coroutines) * deep auto-cloning mutable container objects into immutable value ones * auto-boxing immutable value objects into container objects -Martin (*1

Re: infectious traits and pure functions

2009-02-16 Thread Martin D Kealey
On Mon, 16 Feb 2009, Jon Lang wrote: if there's any doubt about the matter (e.g., conclusively proving or disproving purity would be NP-complete or a halting problem), then Deciding whether you have a halting problem IS a halting problem... :-) -Martin

Re: infectious traits and pure functions

2009-02-16 Thread Martin Kealey
mistake. Please read as s/NP-complete/halting problem/g -Martin

Re: RFD: Built-in testing

2009-01-28 Thread Martin D Kealey
. :-) -Martin

Re: S16: chown, chmod

2008-12-01 Thread Martin D Kealey
file away); } } # can't (or don't need to) give file away POSIX::chmod $filename, Fcntl::ST_PERM($stat.mode); POSIX::utime $filename, $stat.mtime, $stat.atime; } -Martin

Re: Recommended Perl 6 best practices?

2008-09-30 Thread Martin D Kealey
a logical inversion, so that conjunctions and disjunctions can be alternated? -Martin Kealey

RE: Split with negative limits, and other weirdnesses

2008-09-30 Thread Kealey, Martin, ihug-NZ
= split($pat, $src); return @r[0..$limit-2], join($pat, @r[$limit-1..*]); } except of course it works where $pat isn't a string literal, and does sensible things if $limit is 0 or 1, and is implemented more efficiently. -Martin -Original Message- From: Mark J

RE: assignable mutators (S06/Lvalue subroutines)

2008-06-03 Thread Kealey, Martin, ihug-NZ
If a routine is rw, you may optionally define a single slurpy scalar (e.g., '*$value') in its signature. A good start, but why limit the Lvalue to a scalar? A list l-value seems like a pretty useful thing to me. -Martin

RE: All classes imply the existence of a role of the same name.

2008-05-16 Thread Kealey, Martin, ihug-NZ
isn't implemented simply as a singleton reference to a value object (and there may be good efficiency reasons for this too: think String vs StringBuf in Java). -Martin (*1: At least that one works; is you want to see something that doesn't know whether it's a value or a container, have a look

RE: All classes imply the existence of a role of the same name.

2008-05-16 Thread Kealey, Martin, ihug-NZ
the value class automatically). So it makes sense to associate these two approaches with the suggested Value and Class keywords. -Martin (Or you could call them CONSTANT and VARIABLE I suppose; the names aren't important at this stage

Re: ./method

2005-05-19 Thread Martin Kuehl
in a corner, scared and shaking. But maybe I should just get used to that. :-) Juerd Martin

Re: Next Apocalypse

2003-09-15 Thread martin
On Mon, 15 Sep 2003, Dan Sugalski wrote: Great. But will it also be possible to add methods (or modify them) to an existing class at runtime? Unless the class has been explicitly closed, yes. That strikes me as back-to-front. The easy-to-optimise case should be the easy-to-type case;

Re: Next Apocalypse

2003-09-13 Thread martin
into a direct subroutine call, but I would hope that method calling will be fast enough that it won't need to. Will we require methods in subclasses to use the same signatures as the methods they're overriding? -Martin -- 4GL ... it's code Jim, but not as we know it.

L-valueness of Arrays vs. Lists

2003-02-22 Thread Martin D Kealey
don't break things by making them so later. -Martin -- Help Microsoft stamp out software piracy: give Linux to a friend today...

Re: Arrays, lists, referencing

2003-02-22 Thread Martin D Kealey
require L-valueness. All this is orthogonal to the concept of object: in C++ an object can be used to implement either a value (such as string) or a container (such as vector); it would be nice to be able to do this in P6 too. -Martin PS: sorry for the long post...

Re: Spare brackets :-)

2003-01-29 Thread martin
is desired, and then we'd have to use the long-hand $ref@[$index] and $ref%[$index] versions? Hm, actually, I think I could class that as a feature, if the reader -- human or compiler -- could know just by looking whether auto-viv is expected. -Martin

Spare brackets :-)

2003-01-27 Thread martin
, but has anyone else thought about this? - Martin

Re: L2R/R2L syntax

2003-01-27 Thread martin
be overloadable on a per-arrayish-class basis, no? Then what happens to @A = map { ! $_ } @B, @C; when @B and @C are different classes? Does that transmogrify into @A = ( @B.map { ! $_ }, @C.map { ! $_ } ) or into @A = [ @B, @C ] .map { ! $_ } ? -Martin

RE: Unifying invocant and topic naming syntax

2002-11-21 Thread Martin D Kealey
of visible is that it would make a lexically scoped thing accessible to an inner dynamic scope at run-time. By default that would only apply to $_, but the mechanism should be generalisable to any name. -Martin

Re: String concatentation operator

2002-11-20 Thread Martin D Kealey
... now I know that's not entirely realistic, but it should be able to run at least say 60 times faster. It's not that we necessarily want *preemptive* threads, but if we can't do that, we certainly can't do multiprocessor threads. -Martin

RE: Unifying invocant and topic naming syntax

2002-11-20 Thread Martin D Kealey
) be more closely controlled... and of course the former can be used to implement the latter: use visible '$topic'; no visible '$_'; -Martin

Re: String concatentation operator

2002-11-20 Thread Martin D Kealey
On Thu, 2002-11-21 at 06:57, Mark Biggar wrote: Martin D Kealey wrote: I want Perl to run 128 times faster on a 128 CPU machine... now I know that's not entirely realistic, but it should be able to run at least say 60 times faster. Amdahl's law applies here: no amount of paralellism

[OT] linguistics and cultural bias?

2002-10-30 Thread Martin D Kealey
kava or coffee one would be expected to provide both if answered yes. -Martin (* This from annecdotal memory of 20 years ago, so I don't vouch that it still applies in any particular culture, but the essential point remains that the disambiguation is not as universal or consistent as may seem

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Martin D Kealey
a [??] b [::] c But it's not clear whether we can parse a = [undef][...] What about $a = $x lazy:? $y : $z so that $a is thus an object which when stringified (or numified or whatever) chooses whether it's $y or $z, but not until? -Martin

Re: perl6 operator precedence table

2002-10-30 Thread Martin D Kealey
of assignment statements; why should this type of assignment be any different? (Do we want a let keyword? Personally I don't think so, but what do others think?) -Martin -- How to build a Caspian Sea oil pipeline - step one: get elected president...

Re: perl6 operator precedence table

2002-10-29 Thread Martin D Kealey
.= grep {/foo/}; should a be the elements that Ido contain foo or those that Idon't? -Martin

Re: perl6 operator precedence table

2002-10-25 Thread Martin D Kealey
extend pattern-matching in a similar way to substr, making it an L-value, so that one gets $str ~ /[aeiou]+/ = vowels($) or $str ~ /\d/ {hyper-symbol}= (0) x {size-of-LHS-array}; (hyper, however it's spelt, will have some way for the RHS to reference the LHS, won't it?) -Martin -- 4GL