Re: infectious traits and pure functions

2009-02-16 Thread Martin Kealey
I wrote: In the general case, if your language has both pure and impure functions, proving (at compile time) that something is not impure is an NP-complete problem. On Mon, 16 Feb 2009, Mark Biggar wrote: Worse it's equivalent to the halting problem (I.e., not solvable). Quite correct, my

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

Re: Junction Algebra

2009-03-30 Thread Martin Kealey
On Mon, 30 Mar 2009, Mark J. Reed wrote:        ( $a = any(-1,+1) = $b ) == ( $a = any(-1,+1) any(-1,+1) = $b ) Clearly, the RHS is true for $a == $b == 0, but I'm not sure the LHS shouldn't also be. Isn't it just syntactic sugar for the RHS? I suspect not. Rather I think that

Re: junctions and conditionals

2009-04-01 Thread Martin Kealey
On Tue, 31 Mar 2009, Jon Lang wrote: Another issue: what happens if conditional code mutates a junction that it filtered? For example: $x = any (-5 .. 5); if $x 0 { $x++ }; At this point, which of the following does $x equal? any(-4 .. 6) # the original junction gets mutated

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

2012-09-20 Thread Martin Kealey
On Thu, 20 Sep 2012, Stephen Pollei wrote: If it says it might be prime it's about a 50% 50% split if it's correct. According to Wolfram, it's 75/25; so a positive result after 10 iterations leaves about a one-in-a-million chance of being composite (more precisely, one in 1048576). multi