Spare brackets :-)

2003-01-27 Thread martin
ould still need different syntaces, but has anyone else thought about this? - Martin

Re: L2R/R2L syntax

2003-01-27 Thread martin
that they should 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: Bytecode metadata

2003-01-28 Thread martin
different parts of the file (one to the zip archive, another to the unarchiver). And how is this going to interact with "-T" or whatever we're going to use? Under my suggested scheme, the data would be untainted if it's covered by a verified signature, and tainted if not. -Martin

Re: Spare brackets :-)

2003-01-29 Thread martin
inted out) for auto-vivification, where the object doesn't exist before we operate on it. Maybe we would get away with the shorthand "$ref[$index]" *except* where autovivification 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

Re: [PATCH] File Spec

2003-09-04 Thread martin
file? Or a new name E which it will refer to? And do all the above without requiring A and C to be in the same directory? I would strongly recommend deprecating any distinction between "volume" and "path", and instead provide functions which focus on allowing us to answer

Re: Event design sketch

2004-06-14 Thread martin
count clock drift, while "system elapsed time" is left unaffected. Which you want depends on whether you want to sleep for a specific time, or wake up at a specific time, and it would be nice if Parrot didn't rule out making use of that. -Martin

Re: More on slices and iterators

2004-06-16 Thread martin
13,17], and a concatenation iterator over those. Whether the iterator over [2] is created over a singleton array or directly from the scalar would seem to be simply a matter of economy. -Martin

Re: Semantics for regexes - copy/snapshot

2004-09-07 Thread martin
On Tue, 7 Sep 2004, Leopold Toetsch wrote: > > [*] Unless it's a _feature_ that given tied $a, > >($a = "aaa") =~ s/a/b/g > > would call STORE four times ("aaa", "baa", "bba", "bbb"). > > I'd expect two stores here. One for the initial setting of the value and > one for the final result

Re: Semantics for regexes - copy/snapshot

2004-09-08 Thread martin
;) =~ s/a/b/g>. I would agree with you in general, but since we're generally after speed, surely we want to allow for optimisations such as "don't store unless something's changed"; this would also be compatible with the boolean context value of s///. -Martin -- CAUT

Re: Synopsis 9 draft 1

2004-09-13 Thread martin
" (native) method to each integer register, which could implement the required logic for each of the above cases? Or would we need perhaps a vtable, with both "store" for when we're interpreting, and "generate_jit_store" for when we're jitting? -Martin

Re: Namespaces again

2004-10-04 Thread martin
string? Then you wouldn't have to generate extra temporary strings to hold the concatenations, but where you did have a string that included the appropriate sigil, it could be used directly by having an empty prefix. -Martin

Re: [PATCH] File Spec

2003-09-05 Thread martin
On Thu, 4 Sep 2003 [EMAIL PROTECTED] wrote: > On Mon, 1 Sep 2003, Michael G Schwern wrote: > > You also must worry about volumes. [my long explanation snipped] Sorry, wrong list; this is a standard-module issue, not an implementation issue or even a core-language issue. -Martin

Re: Next Apocalypse

2003-09-13 Thread martin
at compile time. Of course having a "no subclasses" tag means the compiler can change a method call 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.

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: [Bug 239279] Re: Totem Plugin isn't working properly with LiveStream in Firefox RC1

-- Thread martin
- end of tSliceCur class --> Re: [Bug 239279] Re: Totem Plugin isn't working properly with LiveStream in Firefox RC1 martin Reply via email to mobile-mac-fr mobile-mac-fr   Par sujet

Re: Simple Print/Say Question

2006-05-24 Thread Martin Kjeldsen
in class Scalar: "&kv"' in the line for %buckets.kv -> $i, $w { Is it just me? Regards Martin A. Pagaltzis (10:52 2006-05-24): > my %buckets = ( > w => { > count => 4, > scale => 10.5, > }, &

Re: Simple Print/Say Question

2006-05-24 Thread Martin Kjeldsen
Hi Aristotle, A. Pagaltzis (12:12 2006-05-24): > Hi Martin, > > * Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 11:50]: > > Just curious does this actually run? I'm trying on pugs 6.2.11 > > and it complains quite a bit. First of all shouldn't >

Re: [perl #40058] Disambiguate usage of class PMCs from class name lookup (pdd15, pdd06, pdd19)

2006-08-06 Thread Martin Kealey
ot';'bar'] 2. if myHLL does not actually define ['myHLL';'foo'] but then checks to see if it's usable, and would find ['parrot';'foo'] via the normal inheriting framework. But how often are these actually likely to be the case, and are there any other cases? -Martin

Re: [perl #40058] Disambiguate usage of class PMCs from class name lookup (pdd15, pdd06, pdd19)

2006-08-07 Thread Martin Kealey
7;t talking about *that* namespace. -Martin

Parrot-14347 Patches to get Parrot to build on VMS VAX

2006-09-04 Thread Vorländer , Martin
le generation aborts (probably due to an empty PMC list) - I'm looking into it. cu, Martin -- O Lord, won't you buy me | Martin Vorlaender | OpenVMS rules! an HP OS | work: [EMAIL PROTECTED] its name starts with "Open" | http://w

Re: Parrot-14347 Patches to get Parrot to build on VMS VAX

2006-09-04 Thread Vorländer , Martin
en it's good enough to be published. That said, it was a relatively painless port so far. Thanks to all who wrote the configuration scripts with portability in mind. cu, Martin [1] for a make/MMS comparison, please see http://vms.pdv-systeme.de/users/

Re: ./method

2005-05-19 Thread Martin Kuehl
It also makes me want to propose zsh-extended-glob-compatibility syntax for objects so I can have method/attribute slices, and then I end up curled up in a corner, scared and shaking. But maybe I should just get used to that. :-) > Juerd Martin

Re: [perl #61308] rule's capture ws

2008-12-15 Thread Martin Kjeldsen
Moritz Lenz via RT (09:23 2008-12-14): > Martin Kjeldsen (via RT) wrote: > > # New Ticket Created by Martin Kjeldsen > > # Please include the string: [perl #61308] > > # in the subject line of all future correspondence about this issue. > > # http://rt.perl.org/rt3/T

Re: infectious traits and pure functions

2009-02-16 Thread Martin Kealey
.e., not solvable). Quite correct, my mistake. Please read as s/NP-complete/halting problem/g -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 > > c

[perl #64046] [BUG] an enum does not smartmatch in given ... { when ... { ... } }

2009-03-23 Thread Martin Berends
# New Ticket Created by "Martin Berends" # Please include the string: [perl #64046] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=64046 > Unsure whether the following should work, but it doesn't: perl6

Re: Junction Algebra

2009-03-30 Thread Martin Kealey
() method private. That's almost reasonable, but it assumes that eigenthreads don't work on separate snapshot copies of the world, and that those snapshots aren't discarded after their results are flattened by the junctive operator. -Martin

Re: junctions and conditionals

2009-04-01 Thread Martin Kealey
z)any( $x OP $y, $x OP $z) $x OP one($y,$z)one( $x OP $y, $x OP $z) $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 sugg

[perl #65548] constants defined in modules not visible to code using module

2009-05-11 Thread Martin Berends
# New Ticket Created by "Martin Berends" # Please include the string: [perl #65548] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=65548 > Declaring constants and using them in the same file works, but moving

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 http:

Re: [perl #73350] [PATCH] Add p5chomp and add p5chomp and p5chop to tests

2010-03-08 Thread Martin Kjeldsen
800, Martin Kjeldsen wrote: >> +if $str ~~ /\x0a$/ { >> +$str = $str.substr(0, $str.chars - 1); > > Unless newlines are being canonicalized elsewhere, this seems > *nix-specific. > > (Sorry I haven't researched further, this just caught my ey

Re: [perl #73392] AutoReply: [PATCH] Fix parsing of overflowing numbers with exponent part

2010-03-08 Thread Martin Kjeldsen
This patch is looping and * .1 instead of dividing. Sorry for not being in git format-diff format (unified diff instead) 0002-patch-with-multiplication-instead.patch Description: Binary data On 07/03/2010, at 14.48, perl6 via RT wrote: > Greetings, > > This message has been automatically gen

Version of a Module

2017-06-27 Thread Martin Barth
Hello everyone, I wanted to repeat the question that I asked today on #perl6. I am looking for a way to retrieve the version of a Perl6-Module from within the module itself. there is often a our $VERSION in perl5 modules. is this still idiomatic/a good way to go in perl6 i think the version

Re: Version of a Module

2017-06-28 Thread Martin Barth
Hello, but your approach means you have to state the version in the META6.json AND in the Module.pm6 file again. This would be the similar to having $VERSION in perl5. Shouldnt there be a simpler way? Am 28.06.2017 um 08:45 schrieb Fernando Santagata: Hi Martin, This works for me: File

Re: Version of a Module

2017-06-29 Thread Martin Barth
ion of my module withouth having this suffix in it? Am 28.06.2017 um 14:16 schrieb Simon Proctor: See I'm using mi6 to generate my META6.json file from the report and it picks the version up from the module file. Other options like that seem sensible to me. Simon On Wed, 28 Jun 201

Private Methods in Roles

2017-07-03 Thread Martin Barth
= B.new; $b.public-method()' priv method 2) but can't write its private members: > perl6 -I. -e 'use A; use B; my $b = B.new; $b.set_private(A.new); $b.r' No such private method '!!private' for invocant of type 'B' in method set_private at /home/martin/.w

Re: Version of a Module

2017-07-04 Thread Martin Barth
See I'm using mi6 to generate my META6.json file from the report and it picks the version up from the module file. Other options like that seem sensible to me. Simon On Wed, 28 Jun 2017, 13:01 Martin Barth, <mailto:mar...@senfdax.de>> wrote: Hello, but your approach mean

Re: [perl #131707] [BUG] Private Methods/Attributes in roles do not work as expected

2017-07-07 Thread Martin Barth
my $b = B.new; $b.set_private(A.new); $b.r' No such private method '!!private' for invocant of type 'B' in method set_private at /home/martin/.workspace/p6/realerror/A.pm (A) line 24 in block at -e line 1 WHEN! the set_private looks like this: method s

Error Handling with IO::Socket.:Async::SLL

2017-10-16 Thread Martin Barth
  } } what I am looking for is an example that dosen't shut down the server, or leaves the react block, for incomming http traffic or for ssl negotiation errors that might happen. Thanks Martin

Re: Error Handling with IO::Socket.:Async::SLL

2017-10-16 Thread Martin Barth
I've changed the code to this, It's better but still not correct. 1) curl with http hangs and must be terminated with Ctrl+C 2) the code now restarts the server socket, which I also dont expect to happen. use v6; use IO::Socket::Async::SSL; sub auto-restart(Supply $incoming) {     supply {

Re: odd and even

2018-04-30 Thread Martin Barth
Are you aware of the %% operator? $var %% 2 checks wether it is dividable by 2. Am 30.04.2018 um 08:47 schrieb ToddAndMargo: Hi All, I know it would only take me 25 seconds to write one, but do we have an odd and even function build in? Many thanks, -T $ perl6 -e 'my $x=3; say $x.odd;' No

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

2012-09-20 Thread Martin Kealey
ny(true,false)) * you-get-what-you-ask-for (return "PEBKAC":but(false) ) * a logical contradiction (return an unthrown exception) * a formal error (throw an exception) -Martin

Array containing only elements that implement a role.

2017-01-03 Thread Martin Barth
Hi There, I am not sure if my RoleType @array; is correct, or if there is a better way to declare such an array. But I find the error that is happening when there are no elements in the array confusing on the first sight. It took me a while to realize that my array was empty and therefore it

Re: Input / Output encoding filters.

2006-02-21 Thread Martin D Kealey
whole records, or lines of text, or whatever. Clearly this needs to be discussed in p6-lang, but having separated the two parameter types, the filter can decide which it can implement, and how. -Martin

Re: [perl #40058] Disambiguate usage of class PMCs from class name lookup (pdd15, pdd06, pdd19)

2006-08-06 Thread Martin D Kealey
27;t. Any reason to treat HLL namespaces differently from classes, at least in respect of being an inheritance hierachy? Simply make 'yourHLL' inherit from 'parrot', and the rest follows... -Martin

RE: Stubborn coworkers

2006-08-30 Thread Ryan, Martin G
ot necessarily. The other more simple point to make is to ask her - "How much programming/experimenting with perl6 have you done? Can I have look at the results?" If the answer is "not much" then the obvious question arises - "then how do you know its going to be so hard to write?" Perhaps the above is a little harsh (and unnecessarily long) but its how I'd tackle it. Martin

Re: perl6 operator precedence table

2002-10-25 Thread Martin D Kealey
not simply 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

Re: 64-bit ints and non-capable hardware

2002-10-22 Thread Martin D Kealey
we should if possible allow an extensible type system, possibly including optional automatic promotion to a library-implemented integer type (BigNum, Complex, or whatever). -Martin (I find it quiet disappointing that "modern" languages like Java and C# rely entirely on storage-b

Re: [perl #18044] Assembler doesn't return a useful exit status

2002-10-22 Thread Martin D Kealey
lling how healthy that bytecode is. exit(EXIT_FAILURE); // 1 on most platforms -Martin -- CAUTION: The information contained in this message is consequential and subject to legacy provenance. If you are the intended recipient you are hereby notified that reading this message is permitted. If

Re: 64-bit ints and non-capable hardware

2002-10-23 Thread Martin D Kealey
On Wed, 23 Oct 2002, Rhys Weatherley wrote: > Martin D Kealey wrote: > > [Frank Farance's paper] "specification based extended integer range" > > [at] http://wwwold.dkuug.dk/JTC1/SC22/WG14/docs/c9x/extended-integers/. > Very interesting proposal. I wish they ha

Re: perl6 operator precedence table

2002-10-29 Thread Martin D Kealey
,$count,@insertions); vs @excised = @array . slice($position,$count); @unexcised = @array . splice($position,$count,@insertions); So, in @a = @b .= grep {/foo/}; should @a be the elements that I contain "foo" or those that I? -Martin

[OT] linguistics and cultural bias?

2002-10-30 Thread Martin D Kealey
text implies otherwise. But in many Pacific island cultures (*), if one offers "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 cu

Re: [RFC] Perl6 HyperOperator List

2002-10-30 Thread Martin D Kealey
tomatically get > _[!] for that as well. postfix vs infix ... mumble ... parsing nightmare ... mumble ... > I think we could also allow > > @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
0" > However, I think readability suffers without a hint on the front what > you're trying to do. We don't in general have a "let" on the front 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: String concatentation operator

2002-11-20 Thread Martin D Kealey
achine... 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
eral) be more closely controlled... and of course the former can be used to implement the latter: use visible '$topic'; no visible '$_'; -Martin

Re: Numeric Literals (Summary 2)

2002-11-20 Thread Martin D Kealey
#x27;t ten 0o - Octal 0q - binary (one bit is one "Question") Though to be honest, I don't see that 0o or 0q are any shorter than 8# and 2#. We might also consider allowing leading-zero and leading-nonzero to have different default radixes, such that: use radix 10,8; would yield the traditional behaviour. -Martin

Re: Numeric Literals (Summary)

2002-11-20 Thread Martin D Kealey
:1:1110== 0x6000 60:22.0.-27::-2 == 21.9925 Although now that I look at it, I can't see a lot of point in having both a fractional part *and* an exponent. -Martin

Re: Numeric Literals (Summary)

2002-11-20 Thread Martin D Kealey
t;<14 I'm guessing most people would choose (d) followed by (c) or (b). However (d) doesn't generalize to other bases; powers of 2 are almost OK: (f) 0x500 (g) 16#500 (h) 16#5#6 (i) 5<<24 but others are just plain messy: (j) 3#20 (k) 3#2#9 (l) 2*3**9 -Martin

Re: String concatentation operator

2002-11-20 Thread Martin D Kealey
tion 1.0.8 (1.0.8-10) Date: 21 Nov 2002 15:22:57 +1300 Message-Id: <[EMAIL PROTECTED]> Mime-Version: 1.0 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 rea

RE: Unifying invocant and topic naming syntax

2002-11-21 Thread Martin D Kealey
- that would be pointless as well as error-prone. My idea 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: About multithreading

2005-10-01 Thread Martin D Kealey
ing in a good direction on > concurrency stuff at a language level too. So can we look towards having things like "map" and "grep" be parallel (or at least unordered) by default? -Martin

L-valueness of Arrays vs. Lists

2003-02-22 Thread Martin D Kealey
nd magical references) right from the start of P6, just so as we 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
The relationship to the array/list thing is this: that it's not just pass-by-value to functions and methods, it's about implicit R-valueness in any context that doesn't absolutely 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: Parrot bytecode reentrancy

2005-04-17 Thread Martin D Kealey
etween threads -- but of course, that is only sensible because it is not even shared between multiple closures *within* a thread. -Martin

Re: parrot and refcounting semantics

2005-04-28 Thread Martin D Kealey
t row objects. And when the transaction goes out of scope it needs to be either committed or rolled back. -Martin

Re: parrot and refcounting semantics

2005-04-28 Thread Martin D Kealey
On Thu, 28 Apr 2005, Luke Palmer wrote: > Or, with the "block hooks" that I keep claiming makes timely destruction > almost never needed, it is: > > { > my $s = new CoolClass; > # ... do stuff that may throw ... > LEAVE { destroy $s } > } > > This destroys properly a

Re: Recommended Perl 6 best practices?

2008-09-30 Thread Martin D Kealey
whether either variable contains a junction? As a start, perhaps we should be marking certain operators (not ! none() != ne) with whether they represent a logical inversion, so that conjunctions and disjunctions can be alternated? -Martin Kealey

Re: [perl #60044] [BUG?] rethrow just throwing?

2008-10-28 Thread Martin D Kealey
nclosing dynamic scope that catches it and transmogrifies it into an Uncaught Exception? Or if not, could we have both back-traces available? A "created_by" back-trace and a "thrown_by" back-trace? -Martin

Re: S16: chown, chmod

2008-12-01 Thread Martin D Kealey
at.uid, $stat.gid; return; } if catching_exception(IO_error) { throw IO_error(EPERM, $filename, "Can't give 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: RFD: Built-in testing

2009-01-28 Thread Martin D Kealey
so happens to be an apposite abbreviation. :-) -Martin

Re: infectious traits and pure functions

2009-02-16 Thread Martin D Kealey
er threads or coroutines) * deep auto-cloning mutable "container" objects into immutable "value" ones * auto-boxing immutable "value" objects into "container" objects -Martin (*1: Google for the report by G Y Matthews (Sydney University, 1994) on reformulating the "Magma" mathematical research language as an applicative language.)

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: Detecting side-effects in Perl 6 (Was: Re: infectious traits and pure functions)

2009-02-17 Thread Martin D Kealey
arantee that they won't get mangled, so they can later be passed to more pure code (*2). 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-

Re: IO, Trees, and Time/Date

2009-02-18 Thread Martin D Kealey
($odbc_handle) ); my &gmtime= DateTime::Gregorian.localize( :utc ); my &swatch= DateTime::Gregorian.localize( :tz('Europe/Geneva'), :no_dst ); -Martin *1: Operations on localtime objects involve differences, offsets and baselines, expressed in a range of units. The core units are

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

2009-02-22 Thread Martin D Kealey
s (which must believe fiction 1 and may or may not believe fiction 2), DateTime (which is agnostic about fiction 3), 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 fict

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

2009-02-22 Thread Martin D Kealey
means in the context of "Instant coffee". I think I still > slightly prefer "instant", but I don't mind much any 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: Signals question for S16: IPC / IO / Signals

2009-02-23 Thread Martin D Kealey
core though, just the low-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: Comparing inexact values (was "Re: Temporal changes")

2009-02-24 Thread Martin D Kealey
t; test, whereas "any(-x,+x)" 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
cutive 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: r25490 - docs/Perl6/Spec

2009-02-25 Thread Martin D Kealey
to each array-type? 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-26 Thread Martin D Kealey
istently using lower half-open ranges.) -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 pe

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

2009-02-26 Thread Martin D Kealey
" call will always fail (having delayed until all child processes have exited), whereas if you leave it as "default", your process will still ignore it, but "wait" will work properly. 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: .map/.reduce with larger arity

2009-03-09 Thread Martin D Kealey
r" and "map" @list = @array.map(&code); &iterator = &code.for($signature); @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: Junction Algebra

2009-03-30 Thread Martin D Kealey
$x < $x and die; # must not happen (same eigenstate must # be used on both sides of '<' ?) $x < $x.eigenstates.any() or die; # matches for "-1 < +1" -Martin

Re: [Fwd: Re: junctions and conditionals]

2009-04-01 Thread Martin D Kealey
side that, they are collections of indeterminate state. Indeterminate states aren't sufficiently "value-like" to justify "constant folding". -Martin

Re: simultaneous conditions in junctions

2009-04-01 Thread Martin D Kealey
) infix:«!==»(Object,Object) does(junctive_inversion) (Excuse the rather lose syntax, but I hope you get the idea.) -Martin

Re: Why pass by reference?

2009-06-18 Thread Martin D Kealey
t the optimizer. 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. -Martin Footnotes: *1: There are many possible reas

Re: Why pass by reference?

2009-06-18 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.

Re: XOR does not work that way.

2009-06-24 Thread Martin D Kealey
t exception should be propagated, and the other operand doesn't need to be evaluated. If one operand is true then return it; otherwise return the right-hand operand (which should be false). This solves both the human expectation ("Would you like wine or beer or juice?" "Beer a

Re: XOR does not work that way.

2009-07-02 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

Re: $*CWD and chdir()

2009-08-20 Thread Martin D Kealey
Cwd :chdir; $*CWD = q; # OK, same as {chdir "/tmp"} I wonder if this is becoming the new Perl mantra "use lexically scoped pragmata". perl6 -MCwd=fake ... # legacy behaviour -Martin

Re: unusual invocants

2009-10-24 Thread Martin D Kealey
be to use proxy objects, which only do one 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: r29113 - docs/Perl6/Spec

2009-11-17 Thread Martin D Kealey
Some possible spellings include: conj ⎺ high bar (reminiscent of the mathematical over-bar notation) ⌇ verticle squiggly line ⇅ up-and-down arrow (since it inverts imaginary but not real parts) -Martin

Re: numerics, roles, and naming

2010-03-16 Thread Martin D Kealey
g, but a field or ring over Z(2)^n does have interesting behaviour that depends on n. So I'm in favour of a "Boolean" role including things such as a vector of bits. I 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
drant. If you have more than one 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

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

2010-03-29 Thread Martin D Kealey
what tools are we going to need to build such an ADT? Well, privacy, trust, ... -Martin

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

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

Re: Suggested magic for "a" .. "b"

2010-08-01 Thread Martin D Kealey
, unthrown exception) unless the user tells us how they want it treated. That can be a command-line switch if necessary. 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

  1   2   >