Fwd: Re-thinking file test operations

2009-07-10 Thread Mark J. Reed
My reply to the message Aaron sent directly to me by mistake... -- Forwarded message -- From: Mark J. Reed Date: Fri, Jul 10, 2009 at 7:23 PM Subject: Re: Re-thinking file test operations To: Aaron Sherman You replied just to me, you know. > In re-thinking it, we don

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Mark J. Reed
scripts don't do logs, in > EITHER sense of the word. I don't want to replace one bit of namespace > clutter with another one. All you web guys can use the Apache::log > method, or whatever.) > > =Austin > -- Sent from my mobile device Mark J. Reed

Re: Huffman's Log: svndate r27485

2009-07-10 Thread Mark J. Reed
0. On Fri, Jul 10, 2009 at 3:16 PM, yary wrote: > +1 on using ln() instead of log() > > Also, systems I know of that implement both log() and ln() default > ln() with base e, as perl6 does, log() uses base 10. > -- Mark J. Reed

Re: Re-thinking file test operations

2009-07-09 Thread Mark J. Reed
/09, Aristotle Pagaltzis wrote: > * Moritz Lenz [2009-07-10 00:25]: >> stat($str, :e) # let multi dispatch handle it for us > > This gets my vote. > > -- > Aristotle Pagaltzis // <http://plasmasturm.org/> > -- Sent from my mobile device Mark J. Reed

Re: XOR does not work that way.

2009-06-22 Thread Mark J. Reed
ator behind Perl's design. So while it should be considered, it's not a knockout punch to say "but logic doesn't work that way." -- Mark J. Reed

Amazing Perl 6

2009-05-30 Thread Mark J. Reed
; | Name: Tim Nelson                 | Because the Creator is,        | >> | E-mail: wayl...@wayland.id.au    | I am                           | >> - >> >> BEGIN GEEK CODE BLOCK >> Version 3.12 >> GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ >> PGP->+++ R(+) !tv b++ DI D G+ e++> h! y- >> -END GEEK CODE BLOCK- >> > > -- Mark J. Reed -- Mark J. Reed

Re: Amazing Perl 6

2009-05-29 Thread Mark J. Reed
ght-alt + [ and ]. Mac (standard US keyboard): option + \ for «, same key shifted for » Linux: Lots of variables: X input manager, modifier keymap, etc. But digraphs work in vim: control-K < < and control-K > > -- Mark J. Reed

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
ecessarily binary, but while prefixes tend to be slurpy, I was thinking one could also declare a prefix op with a finite arity. And does [...] only reduce if what's inside is an operator? How do you do a reduce using a plain old binary subroutine? -- Mark J. Reed

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
ially related: why doesn't simple &+ or &<+> work for what we're currently spelling &[+] (and which is more specifically spelled &infix:<+>)? On 5/28/09, Larry Wall wrote: > On Thu, May 28, 2009 at 09:43:58AM -0400, Mark J. Reed wrote: > : So that much

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
+ inside and the list as argument... The operator '[+]', which you get by applying the meta-operator '[...]' to the infix binary operator '+', is a prefix list operator. So that much makes sense. But I still think the two different meanings of square brackets in operators are going to confuse people. -- Mark J. Reed

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
So how is this: > Any infix operator (except for non-associating operators) can be surrounded > by square brackets in term position to create a list operator > that reduces using that operation: reconciled with this: > Any ordinary infix operator may be enclosed in square brackets with the sam

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
ht up, although with the addition > of Unicode operators Perl 6 could now go ahead.) Perhaps Perl 6 should not aspire to the expressiveness of APL. :) As nice as it is that you can write Conway's Life in a one-liner(*), I think that a little verbosity now and then is a good thing for legibility.

Re: How to write this "properly" in Perl 6?

2009-05-27 Thread Mark J. Reed
You can write a sub to return the next step: sub bondigi { state $n=1; return (, xx $n, xx $n++); } but I think an idiomatic Perl 6 solution would have a proper lazy Iterator. How do we write one of those?

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
quot;compress" (no example cited) as additional names. In Perl6, I assume [...] automatically folds left on left-associative operators and right on right-associative ones? -- Mark J. Reed

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
of a built-in range constructor. On Wed, May 27, 2009 at 2:21 PM, Mark J. Reed wrote: > > In Haskell it may be called fold (well, foldl and foldr), but the concept > has has a variety of names. Two of the more common ones are "reduce" and > "inject"; I believe Per

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
def fact(n): return reduce(lambda x,y: x*y, range(1,n+1)) While Ruby calls it "inject". def fact(n) (1..n).inject { |x,y| x*y } end Perl 6 has a lot of functional features. IMO the nice thing about its version of reduce is the way it's incorporated into the syntax as a metaoperator. -- Mark J. Reed

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
sion. > > >> I do think captures are inherently impressive, but not easy to explain... > > Got a link? > > Daniel. > -- Mark J. Reed

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
> Well, you really made me realize that I'm looking for things that make > me impressed, and probably I don't get impressed that easy nowadays ;) Well, maybe you should relax your expectations. People who haven't been following P6 development for the last near-decade may be impressed by stuff tha

Re: Unexpected behaviour with @foo.elems

2009-05-27 Thread Mark J. Reed
gt; > Even if there is no language change, at least it'd be good to ensure > that "0...@foo.elems" doesn't appear in the documentation. Instead, > whoever writes the docs should use @foo.keys and @foo.kv. Those are > *very* clear, and they do the right thing. > > Daniel. > -- Sent from my mobile device Mark J. Reed

Re: "Unicode in 'NFG' formation" ?

2009-05-18 Thread Mark J. Reed
said, that *normally* shouldn't be necessary outside encoding and decoding, where you need to do things bytewise anyway; just trying to cover all the bases...) -- Mark J. Reed

Re: "Unicode in 'NFG' formation" ?

2009-05-18 Thread Mark J. Reed
t assignments of arbitrary negative numbers to graphemes. If you're doing arithmetic with the code points or scalar values of characters, then the specific numbers would seem to matter. I'm looking for the use case where the fact that it's an integer matters but the specific value doesn't. -- Mark J. Reed

Re: "Unicode in 'NFG' formation" ?

2009-05-18 Thread Mark J. Reed
gt; > Helmut Wollmersdorfer > -- Sent from my mobile device Mark J. Reed

Re: Whitespace in \c[...], \x[...], etc.

2009-04-28 Thread Mark J. Reed
is field 1 ("", in this case). The field whose value is "LINE FEED (LF)" is the Unicode_1_Name field, wihch for control characters supplies the ISO 6429 name. -- Mark J. Reed

Re: Whitespace in \c[...], \x[...], etc.

2009-04-28 Thread Mark J. Reed
> According to the 5.0.0 standard, section 4.8: "Unicode character names contain only uppercase Latin letters A through Z, digits, space, and hyphen-minus." So it seems the notes in parentheses are not considered part of the char name. -- Mark J. Reed

Re: junctions and conditionals

2009-04-01 Thread Mark J. Reed
urate amount of cleverness in the support of that feature. Basically, I want the specified behavior to make sense as much as possible, and for it to be easy to explain the places where it doesn't seem to make sense. Even if it means we don't get that behavior in 6.0.0. -- Mark J. Reed

Re: simultaneous conditions in junctions

2009-04-01 Thread Mark J. Reed
implementors' lives harder, what's > wrong with trying to find a way to get Jonathan's example to work the > way people expect it to? > > I don't understand this aversion to everything remotely hinting of > eigenstates/eigenthreads/threshing/whatever. > > -- > Jonathan "Dataweaver" Lang > -- Sent from my mobile device Mark J. Reed

Re: Junction Algebra

2009-03-30 Thread Mark J. Reed
be. Isn't it just syntactic sugar for the RHS? Logically, you might want it to mean something like ∃$x: $x == any(-1,+1) && $a <= $x && $x <= $b, but I don't think it does. -- Mark J. Reed

Re: On Sets (Was: Re: On Junctions)

2009-03-27 Thread Mark J. Reed
On Fri, Mar 27, 2009 at 11:45 AM, Mark J. Reed wrote: > Given two > junctions $d and $p, just adding $d + $p gives you all the possible > sums of the eigenstates.  Given two sets D and P, is there an equally > simple op to generate { d + p : d ∈ D, p ∈ } ? Dropped a P there - shoul

Re: On Sets (Was: Re: On Junctions)

2009-03-27 Thread Mark J. Reed
On Fri, Mar 27, 2009 at 10:27 AM, Moritz Lenz wrote: > Mark J. Reed wrote: >> From a high-level perspective, the blackjack example seems perfect for >> junctions.  An Ace isn't a set of values - its one or the other at a >> time.  It seems to me if you can't make

Re: On Sets (Was: Re: On Junctions)

2009-03-27 Thread Mark J. Reed
As an aditional idea... > > multi infix:<⋃>(Set $a, Set $b) {...} > multi infix:<⋂>(Set $a, Set $b) {...} > ...as well as the rest of the set theory... > > daniel > > -- Sent from my mobile device Mark J. Reed

Re: .map/.reduce with larger arity

2009-03-25 Thread Mark J. Reed
#x27;ve been known to use map for quickie in place mutations, and not necessarily in void context: my @prev = map { $_++ } @values; I'm not arguing for the binding to default to rw - you can always use "is rw" when needed. I just don't see any reason why the default binding behavior of map and for should be different. -- Mark J. Reed

Re: Logo considerations - 3 logos needed

2009-03-25 Thread Mark J. Reed
Perl 6 is more than just the test suite. It's a language specification, a reference parser, a test suite, and perhaps a reference setting implementation. All of the things about the language that are not tied to a particular implementation are part of "Perl 6". Rakudo is a particular implementat

Re: Logo considerations

2009-03-24 Thread Mark J. Reed
While I wasn't really serious about it... > > > > -- Sent from my mobile device Mark J. Reed

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Mark J. Reed
s it looks. > multi sub fib (0) desugars to (Any $ where 0), Shouldn't that desugar to (Int $ where 0)? After all, 0.WHAT is Int... Of course, then someone will expect multi sub fib (0|1) { return @_[0] } to DTRT here... > > Cheers, > Moritz > -- Mark J. Reed

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

2009-02-25 Thread Mark J. Reed
I think the use of % for the modulus operator is too deeply ingrained to repurpose its infix incarnation. I do quite like the magical postfix %, but I wonder how far it should go beyond ±: $x += 5%; # becomes $x += ($x * .05)? Or maybe $x *= 1.05 ? $x * 5%; # becomes $x * .05 ?

Re: min= (from "Rakudo Built-ins Can Now Be Written In Perl 6")

2009-02-24 Thread Mark J. Reed
instead of any of the above? Silently replacing the assigned value seems like a Bad Idea. -- Mark J. Reed

Re: Temporal changes

2009-02-24 Thread Mark J. Reed
On Mon, Feb 23, 2009 at 5:01 PM, Graham Barr wrote: > Juncture As has already been pointed out, that has extremely high potential for being confused with Junctions. -- Mark J. Reed

Re: Temporal changes

2009-02-23 Thread Mark J. Reed
u might as well call it a Millisecond or Microsecond. > Time Brings a lot of expectational baggage with it. -- Mark J. Reed

Re: Temporal revisited

2009-02-20 Thread Mark J. Reed
f it. I > refer you to DateTime and DateTime::Duration, which provide a reasonable API > for this. > > > -dave > > /* > http://VegGuide.org http://blog.urth.org > Your guide to all that's veg House Absolute(ly Pointless) > */ > -- Mark J. Reed

Re: Perl's internal time (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-20 Thread Mark J. Reed
On Fri, Feb 20, 2009 at 2:36 PM, Chris Dolan wrote: > Yes, just as I said: a constant offset between each of the proposed > epochs. No, because the offset is not constant. The delta between TAI and UTC is currently 34 seconds. Two months ago it was 33 seconds. The next time there's a leap seco

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

2009-02-20 Thread Mark J. Reed
omes > time-ranges. > > Or perhaps don't make them coercible and require an explicit conversion via > $date.morning or $date.evening or something. (Maybe require $time ∩ $date > or $time ⊂ $date?) > > > -David > > -- Mark J. Reed

Re: Perl's internal time (was: Re: r25445 - docs/Perl6/Spec/S32-setting-library)

2009-02-20 Thread Mark J. Reed
Considering time scales, there are three that significantly interrelate, and no matter what Perl 6 uses internally, it needs to be able to convert to and from these: TAI: continuous count of time using SI seconds as measured by atomic clocks, 60 seconds in every minute, 60 minutes in every hour, 2

Re: Temporal revisited

2009-02-20 Thread Mark J. Reed
You have to take the time zone into account only when translating to a human-readable form. In that case, it makes no sense for time() to have a :tz adverb. If an Instant object also represents a point in time irrespective of location, then there's likewise no point in a :tz adverb. -- Mark J. Reed

Re: IO, Trees, and Time/Date

2009-02-18 Thread Mark J. Reed
w". Side question: are HTTP URI's Writable? If so, I imagine that translates into a PUT. Is there any benefit in abstracting out the functionality of POST in a way that maps to other resource types? -- Mark J. Reed

Re: r25329 - docs/Perl6/Spec

2009-02-14 Thread Mark J. Reed
(IO $handle:) is export; > -our List multi lines (Str $filename); > - > -Returns all the lines of a file as a (lazy) List regardless of context. > -See also C. > - > =item prompt > > our Str prompt (Str $prompt) > > =item Str.readpipe > > -=item IO.recv > - > -=item IO.seek > - > -=item IO.send > - > -=item IO.setsockopt > - > -=item IO.shutdown > - > -=item IO.slurp > - > -our Item multi method slurp (IO $handle: *%opts) is export; > -our Item multi slurp (Str $filename, *%opts); > - > -Slurps the entire file into a Str or Buf regardless of context. > -(See also C.) Whether a Str or Buf is returned depends on > -the options. > - > -=item socket > - > =item IO.sysread > > =item IO.sysseek > > =item IO.syswrite > > -=item IO.tell > +=back > > -=item IO.truncate > +=head1 Removed functions > > -=item warn LIST > +=item IO.eof > > -=item Str.warn > +Gone, see IO::Endable > > -Prints a warning just like Perl 5, except that it is always sent to > -the object in $*DEFERR, which is just standard error ($*ERR). > - > -=back > - > -=head1 Removed functions > - > =item pipe > > Gone, see Pipe.pair > > -- Sent from my mobile device Mark J. Reed

Programmatic REPL history/result access?

2009-02-04 Thread Mark J. Reed
aining both the expression evaluated and the result of that expression... Without bikeshedding the details, does this seem like something worth including in the language, or something that would better be provided by a tool external to the language itself? -- Mark J. Reed

Re: r25102 - docs/Perl6/Spec

2009-01-30 Thread Mark J. Reed
contextual metaphor. Argot, > lingo, whatever... If we're being all linguistical, how about "circumlect"? -- Mark J. Reed

Re: r25122 - docs/Perl6/Spec

2009-01-30 Thread Mark J. Reed
ot. Again, nobody said anything about "code points". We're talking about Perl6's idea of "characters". -- Mark J. Reed

Re: r25102 - docs/Perl6/Spec

2009-01-29 Thread Mark J. Reed
t; > > Did you mean "prelude" instead? > > Moritz > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed

Re: [PATCH] Add .trim method

2009-01-12 Thread Mark J. Reed
On Mon, Jan 12, 2009 at 4:19 PM, Aristotle Pagaltzis wrote: > Maybe :h and :t (head/tail). I like the echo of the csh pathname modifiers there. Unless that confuses people into thinking that .trim has something to do with pathname canonicalization... -- Mark J. Reed

Re: [PATCH] Add .trim method

2009-01-12 Thread Mark J. Reed
trailing"? We really ought to avoid using "left" and "right" to refer to the beginning and end of text strings. -- Mark J. Reed

Re: r24846 - docs/Perl6/Spec

2009-01-10 Thread Mark J. Reed
ou must use a non-derived(*) form, why not choose something that means "non-greedy" in English? Maybe "generous"? (*) Note casual use of "non-" in actual dialogue :) -- Mark J. Reed

Re: Converting a Perl 5 "pseudo-continuation" to Perl 6

2009-01-02 Thread Mark J. Reed
int. >my &more_pid_stuff := pid_file_handler($pid_file); How does binding work with an rvalue like that? > Or does each yield produce a fresh new continuation object like this? That would definitely be my vote. -- Mark J. Reed

Re: 12 hackers hacking...

2008-12-27 Thread Mark J. Reed
On Fri, Dec 26, 2008 at 1:45 PM, Stephen Weeks wrote: > Looks like you found a regression. This has been fixed since r34393. Confirmed fixed in r34454. Thanks! -- Mark J. Reed

Re: 12 hackers hacking...

2008-12-26 Thread Mark J. Reed
On Thu, Dec 25, 2008 at 1:55 AM, Stephen Weeks wrote: > Not long ago, Mark J. Reed proclaimed... >> What's the consensus on how to do an idiomatic countdown loop? I used >> for [1..$n].reverse... > > This: will work eventually: >for $n..1:by(-1) { ... } Coo

Re: 12 hackers hacking...

2008-12-25 Thread Mark J. Reed
On Thu, Dec 25, 2008 at 12:39:24PM -0500, Mark J. Reed wrote: >> On Thu, Dec 25, 2008 at 12:00 PM, Patrick R. Michaud >> wrote: >> > On Thu, Dec 25, 2008 at 12:53:06AM -0500, Mark J. Reed wrote: >> >> I also tried this, but it caused Rakudo to throw a StopIteration

Re: 12 hackers hacking...

2008-12-25 Thread Mark J. Reed
On Thu, Dec 25, 2008 at 12:00 PM, Patrick R. Michaud wrote: > On Thu, Dec 25, 2008 at 12:53:06AM -0500, Mark J. Reed wrote: >> I also tried this, but it caused Rakudo to throw a StopIteration and >> then segfault: >> >> for [...@gifts[0..$day-1]].pairs.reverse ->

12 hackers hacking...

2008-12-24 Thread Mark J. Reed
}st" }; multi nth($x where { $^x % 10 == 2 && $^x % 100 != 12} ) { "{$x}nd" }; multi nth($x where { $^x % 10 == 3 && $^x % 100 != 13} ) { "{$x}rd" }; multi nth($x) { "{$x}th" }; And as it's just past midnight here in US/Eastern, Merry Christmas to those who celebrate it! -- Mark J. Reed

Re: Multi constraints and specificity

2008-12-24 Thread Mark J. Reed
Ok, it works with a $^var in place of $x in the where block.Should the parameter be visible there under its declared name? If not, then this is clearly just pilot error, and never mind... On Wed, Dec 24, 2008 at 6:47 PM, Mark J. Reed wrote: > I thought this would work: > > multi th

Multi constraints and specificity

2008-12-24 Thread Mark J. Reed
Rakudo bug or me not understanding how constraints work? -- Mark J. Reed

Perl6's RE(P)L

2008-12-17 Thread Mark J. Reed
ists. Since Perl 5 has no REPL, I'm not sure where such a spec would go. S20, maybe, since the debugger is the closest thing? Sorry if this has come up before; I did a quick search but didn't see any discussion of it. -- Mark J. Reed

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Mark J. Reed
ngified: > pugs> 2 cmp 10 > -1 > pugs> (a => 2) cmp (a => 10) > 1 > -- Mark J. Reed

Re: List.end - last item and last index mixing

2008-12-12 Thread Mark J. Reed
I'd say look at prior art, but "end" in this role isn't very common. It shows up in AppleScript, where it does double duty: "end" serves as an index in ranges ("items 3 through end of someList"), but by itself it returns the last item, not the last index ("end of someList"), and as a lone index it

Re: Roles and IO?

2008-12-11 Thread Mark J. Reed
oes nothing with it but pass it into some other interface? How does it declare that? It seems like there still needs to be a generic superrole that means "some non-empty but unspecified subset of these roles" - maybe "Closable" would work, but it's not real clear. -- Mark J. Reed

Re: For your encouragement

2008-12-05 Thread Mark J. Reed
rscores (though I guess the p6 version might switch to hyphens). I know there's no official preference for camelCase vs wide_names in userland code, but it still seems a tad inconsistent. Unless it's an intentional "make the two levels of DB access obviously different" desig

Re: why infix::(Int, Int --> Rat)

2008-12-05 Thread Mark J. Reed
urpose Quotient type with the desired behavior, but maybe Perl6 would benefit from a generic "stealth list" type, like Lisp's multiple values. Such an object behaves like a simple scalar, even in list context, but if you use the right methods you can access additional values beyond the obvious one. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Re: how to write literals of some Perl 6 types?

2008-12-05 Thread Mark J. Reed
quot;unqualified" - strip off the package name (leading stuff before the ::). As long as no other package in scope defines something named "True", you don't have to specify the package. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: why infix::(Int, Int --> Rat)

2008-12-04 Thread Mark J. Reed
otients typically also involve heavy use of the remainders, and it's only reasonable that both halves be treated with equal respect in terms of language support. A way to get both in one fell swoop would be nice (e.g. Ruby's Integer#divmod), but at the very least, if we have mod (%), we should have div, too. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Mark J. Reed
On Wed, Dec 3, 2008 at 3:44 PM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > On Wed, Dec 3, 2008 at 3:42 PM, <[EMAIL PROTECTED]> wrote: >> loop { >>doSomething(); >> next if someCondition(); >>doSomethingElse(); >> } > > That loops fore

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Mark J. Reed
On Wed, Dec 3, 2008 at 3:42 PM, <[EMAIL PROTECTED]> wrote: > loop { >doSomething(); > next if someCondition(); >doSomethingElse(); > } That loops forever, doesn't it? But I think this works: loop { doSomething(); last unless someCondition(); doSom

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Mark J. Reed
I was just trying to clarify what I think Aristotle was asking for, and am not saying it's needed. I suspect this might be too specific a case to worry about, and I'm willing to settle for the solution in my last message (using an if inside a do or loop block). -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Mark J. Reed
On Wed, Dec 3, 2008 at 2:26 PM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > Overall, the goal is to ensure that by the end of the loop the program is in > the state of having just > called doSomething(), whether the loop runs or not - while also ensuring that > the program is

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-03 Thread Mark J. Reed
OK, so let's look at the general problem. The structure is this: doSomething(); while (someCondition()) { doSomethingElse(); doSomething(); } ...and you want to factor out the doSomething() call so that it only has to be specified once. Is that correct, Aristotle? The "gotcha" is that

Re: Collapsing Junction states?

2008-11-14 Thread Mark J. Reed
one(@a) is. I suppose we could define a > :uniq(true|false) adverb to modify the meaning of one() so we could > have both interpretations. > > Mark Biggar > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

File test ops as string methods

2008-11-07 Thread Mark J. Reed
-- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Split with negative limits, and other weirdnesses

2008-09-29 Thread Mark J. Reed
f utility of the limit parameter, and I can't believe I misremembered. I was even indignant not too long ago when using some other language/library which had a split that behaved as I described instead of as it does in Perl. Javascript, I believe. Please excuse the cerebroflatulence. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Split with negative limits, and other weirdnesses

2008-09-28 Thread Mark J. Reed
arameters don't need to Fail.. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Should $.foo attributes without "is rw" be writable from within the class

2008-09-18 Thread Mark J. Reed
I don't understand why this stuff is confusing; it's not new with Perl 6. There's a long tradition in O-O of distinguishing between the externally visible accessor and the internal storage - Ruby self.foo vs @foo, Java this.foo vs setFoo()/getFoo(), etc. In fact the Ruby case is directly analogous

Re: How to define a new value type?

2008-09-16 Thread Mark J. Reed
s like assignment. If she just peels the label off her hook and moves it next to his hook, that's like binding. Either way she's referencing the same object (driving the same car), but the key copy is a more flexible arrangement. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: What should +":2<1a>" produce?

2008-09-15 Thread Mark J. Reed
uot;, then I still suggest the synopsis > be updated for more clarity, such as using your "essentially means" > sentence. > > -- Darren Duncan > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: adverbial form of Pairs notation question

2008-09-08 Thread Mark J. Reed
ger value and (1,) is a tuple of length 1, but the empty tuple is represented by commaless (). Thus len(()) is 0, len((,)) is a syntax error, len((1,)) is 1, and len((1)) is a type error. Also, all three of the empty tuple (), the empty list [], and the nil value None are distinct from each other. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: adverbial form of Pairs notation question

2008-09-08 Thread Mark J. Reed
more) items", then "1 item", but then "no items". So perhaps it's justifiable in Perl6 as well. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: List.uniq

2008-09-08 Thread Mark J. Reed
t;> function. > > I like the idea with an unary function, but I have my doubts with the > two arg comparison function, because it implies O(n²) runtime. But then > again if the user needs that, he'd have to implement it in O(n²) anyway... > > Moritz > > -- > Moritz Lenz > http://moritz.faui2k3.org/ | http://perl-6.de/ > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: What happened to "err" operator?

2008-09-02 Thread Mark J. Reed
low-precidence version of //, been removed? >> >> Yes. >> > It could be recycled as a "fuzzy Boolean", returning a fractional value > between +1 and -1, indicating the confidence with which the result is > offerred. (As in "err, I'm not sure". :-)* )

Re: Speccing Test.pm?

2008-09-02 Thread Mark J. Reed
> 2. The Perl 6 language spec itself would specify a basic set of test > routines built-in to the language, in a Test namespace That sounds like a good idea, but it would require that the above Test functionality be included in the automated tests... which runs the risk of infinite recursion.

Re: [svn:perl6-synopsis] r14574 - doc/trunk/design/syn

2008-08-12 Thread Mark J. Reed
uding other > languages) may be found here: > > http://en.wikipedia.org/wiki/Contraction_(grammar) > > Best regards, > Conrad Schneiker > > www.AthenaLab.com > > Official Perl 6 Wiki — http://www.perlfoundation.org/perl6 > Official Parrot Wiki — http://www.perlfoundation.org/parrot > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-12 Thread Mark J. Reed
ers. That's an Applescript feature that I could do without in Perl. (Not that anyone was proposing such a thing, just getting my objection out there preemptively. :)) -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread Mark J. Reed
Such expressions were covered in John's original message; I said that the presence of sigils 'mitigated' the problem, not 'eliminated'. It's one of the reasons I'm still ambivalent.. Overall, though, it's not a deal-breaker for me one way or the other. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread Mark J. Reed
ion conflict is mitigated by the fact that many subtraction expressions will involve sigils; $x-$y can't possibly be a single identifier. And multi-word-expressions without hitting the shift key! My RSI thanks you. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Quick question: (...) vs [...]

2008-08-09 Thread Mark J. Reed
t the first push fails because the symbol @a was *bound* to the list. After an ordinary assignment my @a = (1,2,3); @a is still an array, which just happens to have been initialized from a list. @a.push(4); # succeeds -- Mark J. Reed <[EMAIL PROTECTED]>

Re: new article, "A Romp Through Infinity"

2008-08-08 Thread Mark J. Reed
o make it too hard to layer such language into Perl6, but I see no point in bending over backwards to make it particularly easy compared to other domain-specific languages... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: step size of nums

2008-07-10 Thread Mark J. Reed
ically "bob"++ is an error, but { my $x = "bob"; return ++$x; } yields "boc". :)) -- Mark J. Reed <[EMAIL PROTECTED]>

Re: step size of nums

2008-07-10 Thread Mark J. Reed
means " += 1 ". -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
s, currency conversion, brokerage stuff... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
al literals become approximations in binary... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Rakudo test miscellanea

2008-06-26 Thread Mark J. Reed
n Int, and > Int does Num > Rat does Num But Int should do Rat, too... > That way a compiler that only implements classes and roles (and no > subset types) can get the hierarchy of numeric types right. ...assuming it's a hierarchy in the first place. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread Mark J. Reed
IQap pagh yIHegh! (Succeed or die!) But you could say something like: SuvwI' yIDa: yIHegh! bIlujchugh yIcheghQo'! (Behave as a warrior: die! If you fail, do not return!) However, I think we are now officially *way* off topic for Perl6... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread Mark J. Reed
efined? > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: ordinal access to autosorted hashes

2008-06-02 Thread Mark J. Reed
is that it's fine for all hashes to support []-indexing. But >> if >> the order isn't important, then you probably wouldn't need to use [] in >> the >> first place (you'd use "for %h:v", etc.)... so maybe it should be limited. >> Hm. > > That's my thought. That said, I'm wiling to consider the prospect > that such a restriction is excessive and/or unnecessary. > >> P.S. Everywhere I said < and > I really meant .before and .after. =P > > :) OK. > > -- > Jonathan "Dataweaver" Lang > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: The Inf type

2008-06-02 Thread Mark J. Reed
ionality and infinitude are not the same thing; in particular, there are an (uncountably) infinite number of irrational numbers... -- Mark J. Reed <[EMAIL PROTECTED]>

<    1   2   3   4   5   >