Re: Musings on operator overloading

2008-03-20 Thread Mark J. Reed
Object to a numeric Object wll in some cases convert the string to a number and add instead of concatenating!), but + still works. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-20 Thread Mark J. Reed
can do that... > > The P in Perl stands for Practical, not Pedantic. > > I consider well designed interfaces as practical not pedantic ;) Of course, good design is extremely practical. Just not necessarily objectively measurable. :) -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-20 Thread Mark J. Reed
gative result, while Apple and Atari return a positive one. I find it particularly interesting that not even all of the BASICs from the same codebase (Microsoft's original Altair release) agree with each other... We now return you to your regularly scheduled Perl 6 mailing list, already in progress. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-21 Thread Mark J. Reed
; if you're completely changing the meaning of an operator, the reader should > have > nearby indication of what is really going on. Ah, so you want the types of typed vars to be apparent where those vars are used. Well, there's an easy solution there: Hungarian notation! (ducks und

Re: local $@ has an unwanted side effect

2008-03-22 Thread Mark J. Reed
erl6, which has a real "try" instead. If the eval'ed code fails, the eval itself just fails right along with it; so there's no need for a split along the lines of $! vs [EMAIL PROTECTED] -- Mark J. Reed <[EMAIL PROTECTED]>

What's the current state of the onion?

2008-03-22 Thread Mark J. Reed
), and some chunks of p6 have been backported into 5.10 via "use features". So, is there a consensus recommendation on the current best way to play around with something approximating the current state of the design? -- Mark J. Reed <[EMAIL PROTECTED]>

Re: [tutorial] pct tutorial language: Squaak implementation

2008-03-25 Thread Mark J. Reed
> (on parrotblog), but I don't know if that's possible. > > > (I tried to send this earlier, having attached files separately; > apparently that wasn't accepted maybe because it's executable code?, > so now a zipped version) > > kjs > -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-26 Thread Mark J. Reed
uot; is just shorthand for "x + -y". -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-26 Thread Mark J. Reed
On Wed, Mar 26, 2008 at 1:06 PM, TSa <[EMAIL PROTECTED]> wrote: > > 1 + a(x)²! Seems like a mathematician would be inclined to write that one as this instead: 1 + a²(x)! But I'm not suggesting that you try to make (a**2)(x) work for (a(x))**2 in Perl. :) -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-26 Thread Mark J. Reed
nd leave the rest of us alone? :) Oh, and I've always mentally filed -x as shorthand for (-1*x); of course, that's an infinitely recursive definition unless -1 is its own token rather than '-' applied to '1'. Maybe I should have adopted dc(1)ese and spelled it _1. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Musings on operator overloading

2008-03-27 Thread Mark J. Reed
Is it just me, or is all this talk about precedence and functions vs operators vs methods creating a niggling sensation in anyone else's head? It feels like we're in the vicinity of another one of them Big Simplifying Idea things. Unfortunately, I don't have the actual Big Idea, so it could just

Re: Integerizing a rat involves truncating its tail

2008-03-28 Thread Mark J. Reed
to be generalized to non-integers, since there is nothing in the above formulae that requires integral inputs. f mod 1 would then return the fractional part of a number, for instance. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Integerizing a rat involves truncating its tail

2008-03-28 Thread Mark J. Reed
... If you have a rational number and need to turn it into an integer, best be explicit about how you want the conversion done. I'd almost be tempted to have no default coercion there, but that'd break too much ported code. -- Mark J. Reed <[EMAIL PROTECTED]>

Query re: duction and precedence.

2008-03-29 Thread Mark J. Reed
In general, is [op] (p1,p2,p3,p4...) expected to return the same result as p1 op p2 op p3 op p4... including precedence considerations? That is, should [**](2,3,4) return 2^(3^4)=2^81, or (2^3)^4 = 4096? -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Query re: duction and precedence.

2008-03-29 Thread Mark J. Reed
You anticipated me. So, is there a core method for foldl/foldr/inject/reduce, or do you have to roll your own as in p5? On 3/29/08, Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote: > : In general, is > : > :

Re: Query re: duction and precedence.

2008-03-30 Thread Mark J. Reed
seful, so I've never been swayed by arguments from "what is it good for?"... On 3/30/08, Darren Duncan <[EMAIL PROTECTED]> wrote: > Mark J. Reed wrote: > > You anticipated me. So, is there a core method for > > foldl/foldr/inject/reduce, or do you have to roll y

Re: Query re: duction and precedence.

2008-03-31 Thread Mark J. Reed
, i.e., (2^(3^4)) > > Etc. > > - > Hugh Miller > e-mail: [EMAIL PROTECTED] > > > -Original Message- > From: Darren Duncan [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 30, 2008 2:00 AM > To: p6l > Subject: Re: Query re: duction and precedence.

Re: question on max | min op

2008-04-01 Thread Mark J. Reed
On Tue, Apr 1, 2008 at 5:39 AM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > Perl5, all the builtin "functions" are really defiend as operators, "defined", even. (However fiendishly.) Anyway, "function" vs "operator" is mostly a difference in termin

Re: question on max | min op

2008-04-01 Thread Mark J. Reed
all the builtin "functions" are really defiend as operators, including "print" etc. But you can always call an operator as if it were a function/method, and in most cases you will. pugs> [1,2,3].max 3 pugs> min(1,2,3) 1 -- Mark J. Reed <[EMAIL PROTECTED]>

Re: question on max | min op

2008-04-01 Thread Mark J. Reed
I sit corrected. Guess that's one of the places pugs is out of date. On 4/1/08, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Tue, Apr 01, 2008 at 05:39:36AM -0400, Mark J. Reed wrote: > > On Tue, Apr 1, 2008 at 1:44 AM, Xiao Yafeng <[EMAIL PROTECTED]> wrote: &g

Re: cross operator and empty list

2008-04-04 Thread Mark J. Reed
h X basically is with preserved > order. > > Regards, TSa. > -- > > The Angel of Geometry and the Devil of Algebra fight for the soul > of any mathematical being. -- Attributed to Hermann Weyl > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Conceptual questions about Objects

2008-04-04 Thread Mark J. Reed
You have completely lost me, John. What the heck are you asking? $obj.foo: calls public method "foo" on the object referenced by $obj. $.foo shorthand for calling "foo" on self (in scalar context). As I understand it, although I could be confused, these have absolutely nothing to do with w

Re: Nomenclature Question - BEGIN etc.

2008-04-09 Thread Mark J. Reed
ocks? CO> They control in what phase of compilation/runtime the code runs in. I don't know, "phase" sounds too specific to me. Does the catching of an exception really bring us into a new phase of execution? What about the LAST time through a loop? etc. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Nomenclature Question - BEGIN etc.

2008-04-09 Thread Mark J. Reed
e a closure and have traits, which aren't necessarily these particular ones... -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Mark J. Reed
"traits" is also problematic; it says what they are, but not really > what they do. They're really "come froms" with predefined names that > are automatically called at the appropriate time. So I think perhaps > the best term for them might be something more like "event blocks", > blocks that are called if and when a particular event happens. That's > a more user-oriented definition. > > Larry > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Mark J. Reed
escription, which fails to convey anything about the semantics. So maybe "event tags" and "event blocks", with the combination of the two constituting an "event handler"? Also: a CB reference? Really? (Y)our age is showing. :) -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Mark J. Reed
On Thu, Apr 10, 2008 at 7:41 PM, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote: > On the other hand, that may be the answer right there: "when-blocks". We have those already: given...when. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread Mark J. Reed
On Thu, Apr 10, 2008 at 8:49 PM, Juerd Waalboer <[EMAIL PROTECTED]> wrote: > My suggestion: > > consequential blocks ...which would make other blocks inconsequential? Nuh-uh. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: What is the "self pragma"?

2008-04-12 Thread Mark J. Reed
e it has. Perl 6 would be less confusing without this pragma. Agreed. Being able to change the invocant name strikes me as one of those things that sounds like a good idea at first but might not be -like $[. Although of course much better since pragmas are lexically scoped. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: cross operator and empty list

2008-04-14 Thread Mark J. Reed
On Mon, Apr 14, 2008 at 06:28:06PM +0200, TSa wrote: > The original question was sort of about how to write a list > that has .elems == 1 but "no" content. Wouldn't that just be [[]] ? Mark J. Reed <[EMAIL PROTECTED]>

Re: Idea: infer types of constants

2008-04-14 Thread Mark J. Reed
quick and > unobtrusive way to get the type of the value instead of "Any"? Can we > use a "whatever" type? > > my * $x = 12.34;# my Num $x > my * $y = "abc";# my Str $y > const * $z = $foobar; # const Foo::Bar $z > > > -David > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Idea: infer types of constants

2008-04-14 Thread Mark J. Reed
On Mon, Apr 14, 2008 at 2:32 PM, Jonathan Worthington > my Dog $fifi .= new(); # works in Rakudo too ;-) And even in Pugs! :) Doesn't help with literals, though, e.g. my Float $approx_pi = 3.14; -- Mark J. Reed <[EMAIL PROTECTED]>

Re: static types, checking, conversions

2008-04-15 Thread Mark J. Reed
for scalars so far. > Not for elements of an array or hash! > > > Regards, TSa. > -- > > The Angel of Geometry and the Devil of Algebra fight for the soul > of any mathematical being. -- Attributed to Hermann Weyl > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: static types, checking, conversions

2008-04-15 Thread Mark J. Reed
I apologize for the vagueness; I was away from browser when I sent that. Go to http://www.ecmascript.org for the nitty gritty on ECMAScript 4th Edition, a.k.a. "JavaScript 2", which is what I was talking about. White papers, specs, reference interpreter. The link from the Firefox developers page

Re: static types, checking, conversions

2008-04-16 Thread Mark J. Reed
gt; system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] > electrical and computer engineering, carnegie mellon university KF8NH > > > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: Are coroutines still there?

2008-04-21 Thread Mark J. Reed
ot;The unavoidable price of reliability is simplicity" >-- C.A.R. Hoare > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: given vs for

2008-04-25 Thread Mark J. Reed
AIUI, this is the difference: given (@foo) { # this code runs exactly once, topic is @foo } vs for (@foo) { # this code runs once per item in @foo, topic # is @foo[0], then @foo[1], etc. } So eseentially, given (@foo) means the same as Perl5 for ([EMAIL PROTECTED])

Re: given vs for

2008-04-25 Thread Mark J. Reed
, "state" (enables state vars), "switch" (enables given/when). > Or is that the CPAN module that basically rewrites the entire file? No. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: given vs for

2008-04-25 Thread Mark J. Reed
The topic should always be $_ unless explicitly requested differently via the arrow. Now in the case of for, it might be nice if @_ bound to the entire collection being iterated over (if any)...

Re: Basic help navigating individual characters of a string

2008-04-25 Thread Mark J. Reed
akes multiple arguments and concatenates them, and you can interpolate variables in strings, you don't need printf most of the time: print "The first character of the string is '", substr($str,0,1), "'\n"; ...although it is arguably clearer in this case. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: [English] what is a flack? (Re: Minimal Distance)

2008-05-08 Thread Mark J. Reed
f vests, and the > term "flak" now means flying debris and shrapnel. > > I think I used "flak" to refer to the situation of being bombarded by > small bits of debris rather than the debris itself because it sounds a > lot like "raise a flap", meaning an excited state of agitation. So I > think British "flap" has become American "flack". > > --John > -- 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]>

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: 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: 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: Renaming Plumhead"

2008-06-14 Thread Mark J. Reed
, maybe "Phoebe" or "PHoePe?" ;-) > >Ron > > Or "Phoenix"? Does this count as a resurrection from the ashes of > Plumhead? ;-} > > -- Bob > -- Sent from Gmail for mobile | mobile.google.com 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: 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
s, currency conversion, brokerage stuff... -- 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: 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: encoding vs charset

2008-07-15 Thread Mark J. Reed
equences within that source code. "\ab" should mean U+00AB no matter whether the surrounding source code is UTF-8, ISO-8859-1, Big-5, whatever; if the source language wants to work differently, it's up to its parser to convert. -- Mark J. Reed <[EMAIL PROTECTED]>

Re: encoding vs charset

2008-07-15 Thread Mark J. Reed
ot encoding bytes >> for a single codepoint. > > And that shall be the distinguished from: > > U+AB65: ꭥ > > by what? > >> Pm > > leo > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>

Re: [perl #63922] Fresh rakudo fails to build on FreeBSD

2009-03-18 Thread Mark J. Reed
onfig' option to explicitly specify > the location of parrot_config. > > % cat build/PARROT_REVISION > 37414 > > -- > Alex Kapranoff. > -- 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: [perl #63922] Fresh rakudo fails to build on FreeBSD

2009-03-18 Thread Mark J. Reed
Nm, installed libparrot was interfering. On Wed, Mar 18, 2009 at 5:00 PM, Mark J. Reed wrote: > I'm getting further but still failing to get Rakudo working (OS X > 10.5.6, gcc 4.0.1), same parrot revision (r37414): > > ... > c++ -o perl6_ops_switch.bundle perl6_ops_switch

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: 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: .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: 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: 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
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: 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: 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: 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: [perl #64712] something is wrong with gen_parrot.pl

2009-04-14 Thread Mark J. Reed
ckout -r" . $required . " " . " >> > https://svn.parrot.org/parrot/trunk parrot"); >> > >> > Regards, >> > Sam >> >> Out of curiosity, what error messages are you getting? >> >> BTW, this command looks right to me, passing a list to system() instead >> of a string avoids shell escaping issues. >> >> -- >> Will "Coke" Coleda >> > -- Sent from my mobile device 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: 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: "Unicode in 'NFG' formation" ?

2009-05-18 Thread Mark J. Reed
gt; > Helmut Wollmersdorfer > -- Sent from my mobile device 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
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: 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: 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: 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
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
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
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: 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
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: 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-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
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
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-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

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

Re: [perl #67050] $str.Num should be the same as +$str

2009-06-30 Thread Mark J. Reed
sing you saw + used to get the length of an array, and that's where you got that it's equivalent to P5 scalar(). -- 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: 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: 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

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: indentation with multiple languages

2009-07-25 Thread Mark J. Reed
On Sat, Jul 25, 2009 at 5:03 AM, Moritz Lenz wrote: > Presumably you want here-docs, which can be indented in Perl 6: > >    perl 6 code >    perl 6 code >    $script.say(Q:to); >         output code >         output code >         END > > The leading whitespace will be pruned from the string. All

Re: confusing list assignment tests

2009-07-28 Thread Mark J. Reed
at are aware of whether they're being used as singular or plural. > > -- > Jonathan "Dataweaver" Lang > -- Sent from my mobile device Mark J. Reed

Re: Rakudo release numbers

2009-07-30 Thread Mark J. Reed
ime components. Offhand, the only mandatory delimiter I can think of is the "W" used with week-based dates to distinguish them from month-based ones. -- Mark J. Reed

Fwd: Rukudo-Star => Rakudo-lite?

2009-08-10 Thread Mark J. Reed
Wrong reply button... -- Forwarded message -- From: "Mark J. Reed" Date: Mon, 10 Aug 2009 07:36:52 -0400 Subject: Re: Rukudo-Star => Rakudo-lite? To: Gabor Szabo That has the same problem as lots of other themes - it puts a hard limit on the number of releases b

Re: Rukudo-Star => Rakudo-lite?

2009-08-10 Thread Mark J. Reed
Given the Japanese behind the name Rakudo, "rakudone" looks like a question: "Rakudo, right?" Beats "rakuod", though. On 8/10/09, James Fuller wrote: > how about > > 'raku' > > then the final version could be called > > 'rakudone' > > Jim Fuller > -- Sent from my mobile device Mark J. Reed

Re: Embedded comments: two proposed solutions to the comment-whole-lines problem

2009-08-10 Thread Mark J. Reed
lly interchangeable. :) I still like the double-bracket idea. I don't much mind the extra character; 5 characters total still beats the 7 of HTML/XML. -- Mark J. Reed

Re: Filename literals

2009-08-14 Thread Mark J. Reed
etter. Nope. Have to use the drive letter. But / is understood as a synonym for \ by the Windows API. -- Mark J. Reed

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

2009-08-18 Thread Mark J. Reed
ich does a search/replace on the current working directory; the bash equivalent "cd ${PWD/old/new}" which is not quite as handy. $*CWD could make that simple, too. -- Mark J. Reed

Re: $*CWD and chdir()

2009-08-18 Thread Mark J. Reed
as chdir() has.  What am I missing? >> >> > > chdir is a familar function with predictable behaviour. > $*CWD, as a variable that "magically" changes to something other than > what it was set to, is unfamiliar and unpredictable. > > Now there's nothing wrong with introducing new, unfamiliar > functionality, if it provides a discernible benefit, but that doesn't > seem to be the case here. > > -- > Carlin > -- Sent from my mobile device Mark J. Reed

<    1   2   3   4   5   6   >