Re: Amazing Perl 6

2009-06-01 Thread Larry Wall
On Sun, May 31, 2009 at 04:45:12PM -0400, Brandon S. Allbery KF8NH wrote: > On May 29, 2009, at 15:43 , John M. Dlugosz wrote: >> Care to try ☃ ? That's alt-meta-hyper-doublebucky-cokebottle. > > > *puzzled as to why OSX Character Map thinks that's related to 雪* Maybe they can't tell the diffence

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 29, 2009, at 22:40 , Timothy S. Nelson wrote: On Fri, 29 May 2009, John M. Dlugosz wrote: Ah yes, on the PC historically you hold down the ALT key and type the code with the numpad keys. At least when I used it, this was a decimal, rather than hex number, and had to be preceded by a

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 29, 2009, at 21:50 , Timothy S. Nelson wrote: some Linux programs support it too. Unfortunately my e-mail program (Pine) seems to have some trouble with unicode -- I may have to look at alternatives after 14 years of use :(. http://www.washington.edu/alpine/ -- brandon s. allbery [

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 29, 2009, at 15:43 , John M. Dlugosz wrote: Care to try ☃ ? That's alt-meta-hyper-doublebucky-cokebottle. *puzzled as to why OSX Character Map thinks that's related to 雪* -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 28, 2009, at 06:43 , Jon Lang wrote: What I'm wondering is how the list knows to feed two items into '[+]'. While 'infix:<+>' must accept exactly two arguments, '[+]' can accept an arbitrarily long (or short) list of arguments. I thought that at first too, then remembered a discussion a

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 27, 2009, at 18:05 , John M. Dlugosz wrote: And APL calls it "|¨" (two little dots high up) buh? Metaoperator / (+/LIST). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 27, 2009, at 15:42 , Daniel Carrera wrote: Mark J. Reed wrote: Note that of the examples given, only Perl 6 and Common Lisp do two things that help immensely simplify the result: 1. reference the built-in * operator directly, without having to wrap it in a lambda expression; 2. actua

Re: Amazing Perl 6

2009-05-31 Thread Brandon S. Allbery KF8NH
On May 27, 2009, at 13:59 , Daniel Carrera wrote: Wow... That's a foldl! In a functional language, that would be called a fold. It's very popular in Haskell. I like that Perl 6 seems to be taking steps in the direction of functional languages. First lazy lists (0..Inf) and now a fold. :-D

Amazing Perl 6

2009-05-30 Thread Mark J. Reed
Assuming you have the right key set in the Registry, you can enter hex Unicode in Windows. Hold down alt, press the + key on the numpad and then type the hex code (using the main keyboard and/or the numpad), then release alt. On Sat, May 30, 2009 at 2:11 AM, John M. Dlugosz wrote: > The same tr

Re: Amazing Perl 6

2009-05-30 Thread John M. Dlugosz
The same tradition has variations in Windows. I recall the leading zero means ANSI code page. I thought I recall a way to give more digits and specify Unicode, but I can't find it on Google. --John Timothy S. Nelson wayland-at-wayland.id.au |Perl 6| wrote: On Fri, 29 May 2009, John M. Dlugo

Re: Amazing Perl 6

2009-05-29 Thread Geoffrey Broadwell
Tim Nelson: > There's some standard that says this is how to generate unicode: > > 1.Hold down Ctrl+Shift > 2.Press U > 3.Type the hexadecimal for the unicode character > 4.Release Ctrl+Shift This works under GNOME, which also has a variant that is a little friendlier to the fi

Re: Amazing Perl 6

2009-05-29 Thread Timothy S. Nelson
On Fri, 29 May 2009, John M. Dlugosz wrote: Ah yes, on the PC historically you hold down the ALT key and type the code with the numpad keys. At least when I used it, this was a decimal, rather than hex number, and had to be preceded by a 0 (zero). So if anyone is still on eg. Windo

Re: Amazing Perl 6

2009-05-29 Thread John M. Dlugosz
Ah yes, on the PC historically you hold down the ALT key and type the code with the numpad keys. There's some standard that says this is how to generate unicode: 1.Hold down Ctrl+Shift 2.Press U 3.Type the hexadecimal for the unicode character 4.Release Ctrl+Shift I'

Re: Amazing Perl 6

2009-05-29 Thread Timothy S. Nelson
On Fri, 29 May 2009, Jon Lang wrote: On Fri, May 29, 2009 at 6:52 AM, John Macdonald wrote: Yep, I've done that. But comparing the difference in effort between: - press a key - Google for a web page that has the right character set, cut, refocus, paste means that I don't bother for the one

Re: Amazing Perl 6

2009-05-29 Thread Larry Wall
On Fri, May 29, 2009 at 05:50:57PM -0500, John M. Dlugosz wrote: > Copy and paste it from the message into a word processor or other > program that lets you choose a font where it is not missing and make it > very large so you can see the details. > > Or see for

Re: Amazing Perl 6

2009-05-29 Thread John M. Dlugosz
Buddha Buck blaisepascal-at-gmail.com |Perl 6| wrote: On Fri, May 29, 2009 at 3:43 PM, John M. Dlugosz <2nb81l...@sneakemail.com> wrote: Buddha Buck blaisepascal-at-gmail.com |Perl 6| wrote: In response to this thread, I activated the "US International" keyboard layout, and once that's

Re: Amazing Perl 6

2009-05-29 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: On Fri, May 29, 2009 at 6:52 AM, John Macdonald wrote: Yep, I've done that. But comparing the difference in effort between: - press a key - Google for a web page that has the right character set, cut, refocus, paste means that I don't bothe

Re: Amazing Perl 6

2009-05-29 Thread John M. Dlugosz
Buddha Buck blaisepascal-at-gmail.com |Perl 6| wrote: In response to this thread, I activated the "US International" keyboard layout, and once that's done theoretically one can get "Spanish style quote mark" with RightAlt+[ and RightAlt+] like so: « and ». The questions which remain (for me, at

Re: Amazing Perl 6

2009-05-29 Thread Patrick R. Michaud
On Fri, May 29, 2009 at 10:04:39AM -0700, Larry Wall wrote: > On Fri, May 29, 2009 at 09:50:36AM -0700, yary wrote: > : Show that much of the basics still work: > : > my @x=('a' .. 'z'); @x[3,4]=qw(DeeDee Ramone); > : say @x.splice(2,4).join(',') > : c,DeeDee,Ramone,f > > That qw is not a good e

Re: Amazing Perl 6

2009-05-29 Thread John M. Dlugosz
John Macdonald john-at-perlwolf.com |Perl 6| wrote: On Thu, May 28, 2009 at 08:10:41PM -0500, John M. Dlugosz wrote: John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if "process" is supposed to mean that everyone is capable of generating Unicode in the m

Re: Amazing Perl 6

2009-05-29 Thread Larry Wall
On Fri, May 29, 2009 at 09:50:36AM -0700, yary wrote: : Back to the question of "cool things about perl6"- after showing some : of the extended syntax and its expressiveness, put up a slide saying : "it's still Perl". : : Show that much of the basics still work: : > my @x=('a' .. 'z'); @x[3,4]=qw(

Re: Amazing Perl 6

2009-05-29 Thread Larry Wall
On Fri, May 29, 2009 at 10:47:44AM -0400, Buddha Buck wrote: : The questions which remain (for me, at least) is if (a) the symbols : survive in email, and (b) if they really are the proper marks for : Perl6. Yes, and yes. Me, I just defined a compose key, and compose << does the right thing. (tho

Re: Amazing Perl 6

2009-05-29 Thread yary
Back to the question of "cool things about perl6"- after showing some of the extended syntax and its expressiveness, put up a slide saying "it's still Perl". Show that much of the basics still work: > my @x=('a' .. 'z'); @x[3,4]=qw(DeeDee Ramone); say @x.splice(2,4).join(',') c,DeeDee,Ramone,f

Re: Amazing Perl 6

2009-05-29 Thread Mark J. Reed
On Fri, May 29, 2009 at 10:56 AM, Austin Hastings wrote: >> Agreed.  Given the frequency with which « and » come up in Perl 6, I'd >> love to be able to have a simple keyboard shortcut that produces these >> two characters. Windows; set keyboard to US-International. Right-alt + [ and ]. Mac (st

Re: Amazing Perl 6

2009-05-29 Thread Austin Hastings
Jon Lang wrote: Agreed. Given the frequency with which « and » come up in Perl 6, I'd love to be able to have a simple keyboard shortcut that produces these two characters. Unfortunately, I am often stuck using a Windows system when coding; and the easiest method that I have available to me th

Re: Amazing Perl 6

2009-05-29 Thread Buddha Buck
On Fri, May 29, 2009 at 10:23 AM, Jon Lang wrote: > On Fri, May 29, 2009 at 6:52 AM, John Macdonald wrote: >> Yep, I've done that. >> >> But comparing the difference in effort between: >> >> - press a key >> - Google for a web page that has the right character set, cut, refocus, paste >> >> means

Re: Amazing Perl 6

2009-05-29 Thread Jon Lang
On Fri, May 29, 2009 at 6:52 AM, John Macdonald wrote: > Yep, I've done that. > > But comparing the difference in effort between: > > - press a key > - Google for a web page that has the right character set, cut, refocus, paste > > means that I don't bother for the one or two "weird" characters >

Re: Amazing Perl 6

2009-05-29 Thread John Macdonald
On Thu, May 28, 2009 at 08:10:41PM -0500, John M. Dlugosz wrote: > John Macdonald john-at-perlwolf.com |Perl 6| wrote: >> However, the assumption fails if "process" is supposed to mean that >> everyone is capable of generating Unicode in the messages that they >> are writing. I don't create non-En

Re: Amazing Perl 6

2009-05-28 Thread Tom Christiansen
· Quoth Larry: ˸ So let’s not make the mistake of thinking something ˸ longer is always less confusing or more official. ⋮ I already have too much problem with people thinking the ⋮ efficiency of a perl construct is related to its length. So you’re saying the Law of Parsimony has its uses… a̲n̲d

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 08:06:14PM -0500, John M. Dlugosz wrote: > Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: >> >> So that much makes sense. But I still think the two different >> meanings of square brackets in operators are going to confuse people. >> >> >> > > I agree. The previous

Re: Amazing Perl 6

2009-05-28 Thread Timothy S. Nelson
On Thu, 28 May 2009, John M. Dlugosz wrote: John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if "process" is supposed to mean that everyone is capable of generating Unicode in the messages that they are writing. I don't create non-English text often enough to h

Re: Amazing Perl 6

2009-05-28 Thread John M. Dlugosz
John Macdonald john-at-perlwolf.com |Perl 6| wrote: However, the assumption fails if "process" is supposed to mean that everyone is capable of generating Unicode in the messages that they are writing. I don't create non-English text often enough to have it yet be useful to learn how. (I'd just

Re: Amazing Perl 6

2009-05-28 Thread John M. Dlugosz
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: So that much makes sense. But I still think the two different meanings of square brackets in operators are going to confuse people. I agree. The previously quoted passages in the synopses are confusing, too, since it doesn't make the

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Daniel Ruoso asked: >> &prefix:<[+]> > > Is that really? I mean... [ ] is a meta-operator, Sure. But once you "[]-meta" an infix operator, you get a prefix operator. See http://perlcabal.org/syn/S03.html#Reduction_operators, which states: "Any infix operator (except for non-associating opera

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 03:33:34PM -0400, Mark J. Reed wrote: : On Thu, May 28, 2009 at 3:13 PM, Larry Wall wrote: : > :  I mean, prefix ops can be used in reduce, too, right? : > : > I will let you ponder the meaning of "reduce" a bit more, and the : > relationship of that to the respective arity

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
On Thu, May 28, 2009 at 3:13 PM, Larry Wall wrote: > :  I mean, prefix ops can be used in reduce, too, right? > > I will let you ponder the meaning of "reduce" a bit more, and the > relationship of that to the respective arity of infixes vs prefixes. Well, infixes are necessarily binary, but whil

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 02:55:10PM -0400, Mark J. Reed wrote: : Tagentially related: why doesn't simple &+ or &<+> work for what we're : currently spelling &[+] (and which is more specifically spelled : &infix:<+>)? Oh, and why not &<+>? Mainly because we have lots of infix operators containing <

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 02:55:10PM -0400, Mark J. Reed wrote: : Since when are we limited to ASCII again? :) Well, we used some of Latin-1's bracket offerings, and people already carp about that. :) : If this is just a question of prefix vs infix telling you what [+] is : shorthand for, OK. But

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
Since when are we limited to ASCII again? :) If this is just a question of prefix vs infix telling you what [+] is shorthand for, OK. But it seems there's still scope for conflict between the two meanings of the square brackets. I mean, prefix ops can be used in reduce, too, right? Tagentially r

Re: Amazing Perl 6

2009-05-28 Thread John Macdonald
On Thu, May 28, 2009 at 09:30:25AM -0700, Larry Wall wrote: > On Thu, May 28, 2009 at 10:51:33AM -0400, John Macdonald wrote: > : Yes. The full expression in raw APL for n! is: > : > : */n > : > : (where is the Greek letter iota - n is Perl's 1..$n). > > Only if the origin is 1. This breaks u

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 09:43:58AM -0400, Mark J. Reed wrote: : So that much makes sense. But I still think the two different : meanings of square brackets in operators are going to confuse people. You're welcome to introduce more bracketing characters into ASCII. :P But seriously, this is one

Re: Amazing Perl 6

2009-05-28 Thread Larry Wall
On Thu, May 28, 2009 at 10:51:33AM -0400, John Macdonald wrote: : Yes. The full expression in raw APL for n! is: : : */n : : (where is the Greek letter iota - n is Perl's 1..$n). Only if the origin is 1. This breaks under )ORIGIN 0. $[ By the way, the assumption here is that everyone can

Re: Amazing Perl 6

2009-05-28 Thread Uri Guttman
> "DC" == Damian Conway writes: DC> * Grammars built into the language: DC> grammar Expr::Arithetic { DC> rule Expression { ** $=< + - > } DC> rule Mult { ** $=< * / % > } DC> rule Pow{ ** $=< ^ > } DC>

Re: Amazing Perl 6

2009-05-28 Thread John Macdonald
On Wed, May 27, 2009 at 05:42:58PM -0500, John M. Dlugosz wrote: > Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: >> On Wed, May 27, 2009 at 6:05 PM, John M. Dlugosz >> <2nb81l...@sneakemail.com> wrote: >> >>> And APL calls it "|¨" (two little dots high up) >>> >> >> Mr. MacDonald just

Re: Amazing Perl 6

2009-05-28 Thread Mark J. Reed
On Thu, May 28, 2009 at 8:43 AM, Daniel Ruoso wrote: > Em Qui, 2009-05-28 às 21:36 +1000, Damian Conway escreveu: >> &prefix:<[+]> > > Is that really? I mean... [ ] is a meta-operator, so > >  [+] 1, 1, 2, 3 > > isn't a prefix, but a [ ] meta with + inside and the list as argument... The operator

Re: Amazing Perl 6

2009-05-28 Thread Daniel Ruoso
Em Qui, 2009-05-28 às 21:36 +1000, Damian Conway escreveu: > Mark J. Reed asked: > > ? And if &[+] means &infix:<+>, how do I refer to the Code of the > > list operator [+]? > &prefix:<[+]> Is that really? I mean... [ ] is a meta-operator, so [+] 1, 1, 2, 3 isn't a prefix, but a [ ] meta with

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Mark J. Reed asked: > 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

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 Damian Conway
Jon Lang suggested: > Start with the addition operator, '1 + 1'.  Apply the reducing > metaoperator to it so that it works syntactically like a function: > '[+] 1, 1'.  Instead of calling it, pass a code reference to it: > '&[+]'. No. &[+] isn't the Code object for [+]; it's the Code object for &

Re: Amazing Perl 6

2009-05-28 Thread Jon Lang
On Thu, May 28, 2009 at 1:37 AM, Daniel Carrera wrote: > Hi Damian, > > This is a really good list. Mind if I copy it / modify it and post it > somewhere like my blog? One question: > >>    * Compactness of expression + semi-infinite data structures: >> >>       �...@fib = 1,1...&[+]        # The

Re: Amazing Perl 6

2009-05-28 Thread Damian Conway
Daniel Carrera wrote: > This is a really good list. Mind if I copy it / modify it and post it > somewhere like my blog? That's fine. > One question: > >>    * Compactness of expression + semi-infinite data structures: >> >>       �...@fib = 1,1...&[+]        # The entire Fibonacci sequence > >

Re: Amazing Perl 6

2009-05-28 Thread Daniel Carrera
Hi Damian, This is a really good list. Mind if I copy it / modify it and post it somewhere like my blog? One question: * Compactness of expression + semi-infinite data structures: @fib = 1,1...&[+]# The entire Fibonacci sequence Very impressive. That's even shorter than

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
On Wed, May 27, 2009 at 2:39 PM, John Macdonald wrote: > Historically, the name reduce was used (first?) in APL, which also > provided it as a meta-operator.  op/ would use op to reduce the array > on the right of the meta-operator. It's quite possible that APL was the first use of the term "redu

Re: Amazing Perl 6

2009-05-27 Thread Damian Conway
Here are a few of my favourite Perl 6 selling points: * Compactness of expression: say 'Hello, World!'; * Compactness of expression + semi-infinite data structures: @fib = 1,1...&[+]# The entire Fibonacci sequence * Junctions make comparisons much more natur

Re: Amazing Perl 6

2009-05-27 Thread John M. Dlugosz
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: On Wed, May 27, 2009 at 6:05 PM, John M. Dlugosz <2nb81l...@sneakemail.com> wrote: And APL calls it "|¨" (two little dots high up) Mr. MacDonald just said upthread that the APL reduce metaoperator was spelled "/". As in: +/1 2

Re: Amazing Perl 6

2009-05-27 Thread John M. Dlugosz
Mark J. Reed markjreed-at-gmail.com |Perl 6| 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 Perl6 chose "reduce" for consistency with the Perl5 List::Util module. Comm

Re: Amazing Perl 6

2009-05-27 Thread John M. Dlugosz
Mark J. Reed markjreed-at-gmail.com |Perl 6| wrote: 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 developmen

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Larry Wall wrote: $dot_product = <@vector1,@vector2>; Is that possible? That would be uber-cool. More likely just use sub infix:<·> (@a,@b) { ... } $dot_product = @vector1 · @vector2; Thanks. And for Daniel R. and other observers, how about this: # Courtesy of Larry sub infix:<·>

Re: Amazing Perl 6

2009-05-27 Thread Larry Wall
Sorry, only answered half of your question. On Wed, May 27, 2009 at 07:56:42PM +0200, Daniel Carrera wrote: > Oh oh oh... is it possible to define a circumfix function for > the dot product? Something like: > > $dot_product = <@vector1,@vector2>; > > Is that possible? That would be uber-cool.

Re: Amazing Perl 6

2009-05-27 Thread Larry Wall
On Wed, May 27, 2009 at 07:56:42PM +0200, Daniel Carrera wrote: > Here is another idea: Is it possible to declare a circumfix function > that calculates the magnitude of a vector? > > $magnitude = |@vector|; > > You know how in math, two vertical bars are a standard notation for > magnitude. Oh

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
On Wed, May 27, 2009 at 3:38 PM, Daniel Carrera < daniel.carr...@theingots.org> wrote: > The terms I've seen are "fold" and "reduce". The "fold" term is not just > from Haskell. I've seen it elsewhere. If you had said "inject" I wouldn't > have known what you meant. > The name "inject" comes from

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Mark J. Reed wrote: Note that of the examples given, only Perl 6 and Common Lisp do two things that help immensely simplify the result: 1. reference the built-in * operator directly, without having to wrap it in a lambda expression; 2. actually name the function "!" Yes, very neat. Haskell doe

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
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"; The terms I've seen are "fold" and "reduce". The "fold" term is not just from Haskell. I've seen it elsewhere. If y

Re: Amazing Perl 6

2009-05-27 Thread Henry Baragar
On May 27, 2009 01:52:58 pm Mark J. Reed wrote: > On Wed, May 27, 2009 at 1:42 PM, Daniel Carrera > > wrote: > > sub postfix: { [*] 1..$^n } > > say 5!; > > > > WOW!! That *IS* cool. Can you explain to me how it works? I figured out > > postfix: myself, but the rest is obscure to me. > > Key conc

Re: Amazing Perl 6

2009-05-27 Thread John M. Dlugosz
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote: Please post impressive Perl 6 code snippets, we all know there are several, and I really would like to give people some idea of why Perl 6 is so cool. Of late, new languages have been created that are going backwards. That is, they are re

Re: Amazing Perl 6

2009-05-27 Thread John Macdonald
On Wed, May 27, 2009 at 02:21:40PM -0400, Mark J. Reed wrote: > On Wed, May 27, 2009 at 1:59 PM, Daniel Carrera < > daniel.carr...@theingots.org> wrote: > > Wow... That's a foldl! In a functional language, that would be called a > > fold. > > In Haskell it may be called fold (well, foldl and foldr

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
Note that of the examples given, only Perl 6 and Common Lisp do two things that help immensely simplify the result: 1. reference the built-in * operator directly, without having to wrap it in a lambda expression; 2. actually name the function "!" The Lisp version suffers from the lack of a built-

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
On Wed, May 27, 2009 at 1:59 PM, Daniel Carrera < daniel.carr...@theingots.org> wrote: > Wow... That's a foldl! In a functional language, that would be called a > fold. 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 one

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Mark J. Reed wrote: 3. the reduction meta-operator [...] : [OP](@list) collects the result of applying OP to the elements of the list in order. That is, assuming foo() is a binary sub, [foo](1,2,3,4) = foo(foo(foo(1,2),3),4). So [+](@list) generates a sum of the listed values, [*] generate

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Daniel Carrera wrote: sub postfix: { [*] 1..$^n } say 5!; WOW!! That *IS* cool. Can you explain to me how it works? I figured out postfix: myself, but the rest is obscure to me. Here is another idea: Is it possible to declare a circumfix function that calculates the magnitude of a vector?

Re: Amazing Perl 6

2009-05-27 Thread Mark J. Reed
On Wed, May 27, 2009 at 1:42 PM, Daniel Carrera wrote: > sub postfix: { [*] 1..$^n } > say 5!; > > WOW!!  That *IS* cool. Can you explain to me how it works? I figured out > postfix: myself, but the rest is obscure to me. Key concepts: 1. placeholder variables. The ^ in $^n means it's a placeh

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Mark J. Reed wrote: I really like the factorial example on the wiki page. That really gets across the expressiveness of P6, without being too hard to understand despite its brevity. sub postfix: { [*] 1..$^n } say 5!; WOW!! That *IS* cool. Can you explain to me how it works? I figured out p

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Daniel Ruoso wrote: I know this is not the approach you had in mind, but what do you think? 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 ;) I understand. Your experience with Perl 6 makes you harder

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 Daniel Ruoso
Em Qua, 2009-05-27 às 18:46 +0200, Daniel Carrera escreveu: > Hi Daniel, Hi Daniel, :P > Sounds very interesting. Can you post slides? It'd be cool if the talk > was taped, like the Google tech talks. Will it be in English? I don't > speak Portuguese (I do speak Spanish and some German). It wil

Re: Amazing Perl 6

2009-05-27 Thread Daniel Carrera
Hi Daniel, Sounds very interesting. Can you post slides? It'd be cool if the talk was taped, like the Google tech talks. Will it be in English? I don't speak Portuguese (I do speak Spanish and some German). I'm planning to do a presentation to highlight the most impressive aspects to Perl 6,

Amazing Perl 6

2009-05-27 Thread Daniel Ruoso
Hi, As I recently mentioned in IRC, I'm going to give a talk about Perl 6 in the International Free Software Forum in Porto Alegre, Brazil. For those who don't know FISL, it's one of the biggest events in the world with ~ 5k people attending (http://www.fisl.org.br). This talk is not targetted on