Idea: Literate programing

2009-05-25 Thread Daniel Carrera
Hello, I really like POD and I like the changes in the upcoming Perl 6 Pod. Have you ever heard of literate programing? (see Wikipedia). I think it would be neat if Pod could do literate programing. It is already very close. For reference, please see this article: For reference, please see

Re: Idea: Literate programing

2009-05-25 Thread Daniel Carrera
Carl Mäsak wrote: In this way, a relatively simple change makes Perl 6 Pod able to do literate programing for anyone who is interested. What do you think? That it sounds like a good idea for a sublanguage-extending module. I'm not familiar with those. Are they hard to make? I guess that it i

Unexpected behaviour with @foo.elems

2009-05-26 Thread Daniel Carrera
Hello, The following construction doesn't do what a user might expect: for 0...@foo.elems -> $k { do_something($k,@foo[$k]) } Obviously, the intention is to step through every key/value in @foo. Buf @f...@foo.elems] does not exist. If @foo = (1,2,3); then @foo.elems is 3, and @foo[3] is unde

Re: Unexpected behaviour with @foo.elems

2009-05-27 Thread Daniel Carrera
yary wrote: I'm a relative beginner at perl6, but pretty good with perl5 (and C and a few others), so I read "for 0...@foo.elems" as saying "Give me a list with one item longer then @foo", not "give me the indexes of @foo". But a Perl non-beginner did make that mistake. The problem is that it

Re: Unexpected behaviour with @foo.elems

2009-05-27 Thread Daniel Carrera
Patrick R. Michaud wrote: An even cleaner shortcut might be to use ^...@foo instead of ^...@foo.elems: for ^...@foo -> $k { do_something($k, @foo[$k]) } Somewhat clearer could be: for @foo.keys -> $k { do_something($k, @foo[$k]) } And some may prefer: for @foo.kv -> $k, $v { do_s

Submission for Perl 6 examples

2009-05-27 Thread Daniel Carrera
Hello, I thought it would be a good idea to take the benchmarks from the Debian language shootout and port them to Perl 6. That would test several aspects of the language and later in the future they could be useful locate performance problems. I have only done *one* benchmark so far. The re

Re: Submission for Perl 6 examples

2009-05-27 Thread Daniel Carrera
Daniel Carrera wrote: http://daniel.carrera.bz/_2009/perl/shootout-perl6-2009.05.27.tgz To run the benchmark: perl6 regex-dna.p6.pl < regex-dna.input On my computer it takes about 99s to run on Rakudo, compared to 0.18s for Perl 5 (the Perl 5 benchmark is included in the .tgz f

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,

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

New CPAN

2009-05-28 Thread Daniel Carrera
Hello all, There was some talk on IRC about a new version of CPAN to match the new version of Perl. Recap: wayland76 wants to integrate CPAN with the local package manager (RPM, DEB). He proposed using Software::Package for that (which is incomplete). Now some ideas of my own: A) Can we a

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Mark Overmeer wrote: In March 2006, Sam Vilain and I started to think about a new CPAN what we named CPAN6. There is a lot of information about the project on http://cpan6.org I know about CPAN6, thanks. It's come up a couple of times on IRC. Perhaps you could hang out on the IRC channel so w

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Jonathan Scott Duff wrote: See http://perlcabal.org/syn/S11.html#Versioning Yeah, I reached that part earlier today (but after I sent my email). Thanks. Daniel.

Re: New CPAN

2009-05-28 Thread Daniel Carrera
Darren Duncan wrote: Because we need things to work effectively in the general case where what was originally a single module Foo with one name becomes forked with each creator (authority) going off in their own direction, or alternately the creator makes incompatible changes, and then later s

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Daniel Carrera
Hi Alex, I hve comments. Alex Elsayed wrote: While lurking in IRC, I've seen several discussions of what CPAN 6 should look like. Honestly, wayland76++'s idea for packaging seems the best to me. Most of the suggestions so far, especially those based on alien, apt, yum, or other existing packa

Re: [RFC] CPAN6 requirements analysis

2009-05-28 Thread Daniel Carrera
Larry Wall wrote: I support the notion of distributing binaries because nobody's gonna want to chew up their phone's battery doing unnecessary compiles. The ecology of computing devices is different from ten years ago. By binaries, I assume you mean native binaries, as opposed to Parrot bytec

Re: [RFC] CPAN6 requirements analysis

2009-05-29 Thread Daniel Carrera
Alex Elsayed wrote: On Thursday 28 May 2009 4:54:50 pm Daniel Carrera wrote: On the other hand, distributing Parrot bytecode (or PIR, or PASM) seems fine. But I don't know what to suggest for modules that require a C compiler. The problem with that is that Rakudo isn't the

Re: [RFC] CPAN6 requirements analysis

2009-05-29 Thread Daniel Carrera
Timothy S. Nelson wrote: I can confirm that Redhat supports multiple versions: $ rpm -q kernel kernel-2.6.27.5-117.fc10.i686 kernel-2.6.27.12-170.2.5.fc10.i686 kernel-2.6.27.5-117.local.fc10.i686 AFAIK the way RPM implements "multiple versions" is by making an entirely different package.

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Mark Overmeer wrote: I know about CPAN6, thanks. It's come up a couple of times on IRC. Perhaps you could hang out on the IRC channel so we don't have different people going off in different directions with CPAN. It's not a discussion like "let's make a change to the current set-up", so IRC

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Mark Overmeer wrote: * Daniel Carrera (daniel.carr...@theingots.org) [090529 08:17]: Workshops, Hackathons and YAPCs are more suitable. But those venues are not available on a day-to-day basis. At least, you get the time to discuss it in depth. Some even basic meta- data issues are just too

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Timothy S. Nelson wrote: While I've no objection to building the end-user software to support multiple repositories, I know that there are certain segments of the community who are very very keen to keep everything in the one repository. After reading the Zen of Comprehensive Archive Netw

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Nicholas Clark wrote: On Fri, May 29, 2009 at 02:43:13PM +0200, Mark Overmeer wrote: * Daniel Carrera (daniel.carr...@theingots.org) [090529 11:42]: "CPAN shall not piggyback another language" -- from ZCAN. Judging from the ZCAN page, I don't expect that uploading Ruby modules

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Mark Overmeer wrote: CPAN is the Comprehensive Perl Archive Network. Not the Comprehensive Perl 5 Archive Network. What's in a name. Much, actually. As the ZCAN document explains, the set of mirrors are donated to Perl by various donors who agreed to hold *Perl* modules. These computers do

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Larry Wall wrote: I think this is an important point, philosophically. The internet, and later the web, both succeeded primarily because they unified identity *without* resorting to centralization (except to bootstrap the top-level nameservers, of course). But identity must not be confused with

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Daniel Carrera wrote: Btw, if the majority wants to start uploading Ruby, Python and Lua modules to CPAN, we can rename CPAN so that the P stands for something else that doesn't mean anything. "Comprehensive Peacock Archive Network"? "Comprehensive Platypus Archive Network&

Re: New CPAN

2009-05-29 Thread Daniel Carrera
John Macdonald wrote: On Fri, May 29, 2009 at 07:26:11PM +0200, Daniel Carrera wrote: Btw, if the majority wants to start uploading Ruby, Python and Lua modules to CPAN, we can rename CPAN so that the P stands for something else that doesn't mean anything. "Comprehensive Peaco

Re: New CPAN

2009-05-29 Thread Daniel Carrera
John Macdonald wrote: Comprehensive Programming Archive Network. Another problem with "Programming" is that it assumes that other languages will actually use the system. We don't know that currently and it is a bit presumptions to assume that they will. It would look awkward if only Perl used

Commentary on S22 (CPAN [DRAFT])

2009-05-29 Thread Daniel Carrera
Hello, I finished reading S22 (CPAN [DRAFT]). This synopsis is about the package format, not about the network. I have some comments: 1) Instead of calling the format "JIB", how about "PAR"? It can stand for Perl ARchive or the recursive PAR ARchive. This is more memorable. 2) S22 proposes

Re: Commentary on S22 (CPAN [DRAFT])

2009-05-29 Thread Daniel Carrera
Daniel Carrera wrote: 4) Lastly, while we are at it, why don't we add a signature file to the _par directory? _par/ META.info CHECKSUMS.asc The CHECKSUMS.asc file would contain the SHA1 sums of every file in the archive except for itself. The file could be GPG-signed

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Mark Overmeer wrote: And the next consideration: when we have a piece of software which administers Perl5 or Perl6 or Nokia.bin or Elf. Why stop there? What is the overlap? It is basically all just some blob of data with some associated meta-data to search and retreive the blobs. It is only th

Re: New CPAN

2009-05-29 Thread Daniel Carrera
Wayland wrote: Allow me to point something out. He wants to write a freely available software package that can share data, and is useful for the Perl6 environment. He's not suggesting that we have holiday photos on CPAN-the-network, I'm not sure about that. We were talking about what thi

Re: Commentary on S22 (CPAN [DRAFT])

2009-05-30 Thread Daniel Carrera
jesse wrote: 1) Instead of calling the format "JIB", how about "PAR"? It can stand for Perl ARchive or the recursive PAR ARchive. This is more memorable. It might make sense to adopt the same naming as .jar and .epub, two very different zipfile-as-container formats. Both use a top-level directo

CPAN -- moving forward

2009-05-30 Thread Daniel Carrera
Hello, In the hopes of helping the CPAN discussion move forward, in the direction of tangible work, I have made a wiki page with a proposal: http://wiki.github.com/perl6/misc/cpan-and-package-format Please read the "Basics" section, which is quite short. The main point of this section is to

Re: CPAN -- moving forward

2009-05-30 Thread Daniel Carrera
Mark Overmeer wrote: A pity you didn't want to read the paper. I have better things to do with my life than read your 30-page paper. I'd rather participate in a consensus process where I feel I can make a difference. Please clarify ... how would you specify that? And how would you denot

Re: CPAN -- moving forward

2009-05-30 Thread Daniel Carrera
Daniel Ruoso wrote: The leap you make from the source package to the different binary formats is overlooking a lot of details. It would be interesting if you could take a look in the previous discussions on the matter. I'll be happy to. I was just trying to make a small iterative step on Synop

Re: CPAN -- moving forward

2009-06-01 Thread Daniel Carrera
Parrot Raiser wrote: One of the common factors that has contributed to the longevity of Unix (in the generic sense), and the Internet, is their layered architectures. +1 for layered architectures. If this discussion can be split into clear layers, (what gets stored, where, how, &c.) it might

Module naming conventions

2009-06-01 Thread Daniel Carrera
Hi all, Currently in CPAN you have modules like: Digest::MD5 Digest::SHA Digest::MD5::Perl Digest::SHA::PurePerl The difference is that the first two are implemented in C and the later two in Perl. Naming issues are likely to become worse in Perl 6 when we also have modules that use Parrot.

Re: Module naming conventions

2009-06-01 Thread Daniel Carrera
Jon Lang wrote: On Mon, Jun 1, 2009 at 5:44 PM, Daniel Carrera wrote: I think we might need to come up with some sort of standard naming convention to distinguish dependencies. Something that the *user* can recognize quickly when he browses CPAN. Why do we need the dependencies to be part of

Re: Module naming conventions

2009-06-02 Thread Daniel Carrera
John M. Dlugosz wrote: The front-end should figure out which binary is proper for your platform. I don't like that idea in the slightest. (1) It is not Perl's job to know if you have a C compiler, C libraries and tool chain. (2) If my computer can handle Perl, C and Parrot, I want the choice

Re: Module naming conventions

2009-06-02 Thread Daniel Carrera
Mark Overmeer wrote: Currently in CPAN you have modules like: Digest::MD5 Digest::SHA Digest::MD5::Perl Digest::SHA::PurePerl The difference is that the first two are implemented in C and the later two in Perl. This is comparible to adding a "target" to each of the modules, a suggestion when

Re: Module naming conventions

2009-06-02 Thread Daniel Carrera
John M. Dlugosz wrote: So CPAN6 is basically only going to be for Parrot? What are you talking about? Did you even read my email? I said that a module might be implemented in multiple languages (see Digest::SHA VS Digest::SHA::PurePerl) and someone might have both versions installed. Daniel

Re: Module naming conventions

2009-06-02 Thread Daniel Carrera
Chris Fields wrote: Speaking as an almost complete outsider (I'm a bioperl core dev writing up a perl6 port), I find the tone of several of these more recent posts (re: CPAN6 and module conventions) counterproductive. TimToady recently posted about snippiness and 'tensegrity', so I'm not the on

Re: Module naming conventions

2009-06-03 Thread Daniel Carrera
John M. Dlugosz wrote: Yes. did you read mine? Yes, I read your email. Sounds like you are thinking of Parrot vs pure perl, and missed my point about being utterly different implementations, not choices within one. Chances are, the most popular implementations of Perl 6 will allow C bind

Re: Module naming conventions

2009-06-03 Thread Daniel Carrera
Hi Patrick, To reduce list traffic, I'm replying to both of your emails together. Just because these are the only adverbs mentioned doesn't necessarily mean they're the only ones that will be allowed. Ok. My interpretation was that adding adverbs would require updating the spec. More import

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5?

2009-06-03 Thread Daniel Carrera
Hi Chris, In addition to Patrick's excellent reply, I'd like to mention that one way to help the project is to just write code in Perl 6. This is a good way to find bugs, including performance bugs. One little project I'm doing is I'm porting the benchmarks from the Debian language shootout

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5?

2009-06-04 Thread Daniel Carrera
Fagyal Csongor wrote: I very much agree with Patrick: an order-of-magnitude speed difference compared to Perl5 is kind of the point where many will just stop caring about performance and start using Rakudo/Perl6. Actually I expect a significant increase in the number of new Perl6ers at around <

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5?

2009-06-04 Thread Daniel Carrera
Chris Mair wrote: ... I'm porting the benchmarks from the Debian language shootout to Perl 6... why don't you help me? ... Yes, why not? I was planning to exercise a little bit, anyhow. google gave me this: http://daniel.carrera.bz/_2009/perl/shootout-perl6-2009.05.27.tgz Do you keep an over

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5? (Benchmarking Tool?)

2009-06-04 Thread Daniel Carrera
Joshua Gatcomb wrote: I know these benchmarks have their value, but I am more interested in real practical code that I have previously written to solve a problem. I know that the Rakudo code will be slower than the perl 5. The point of the benchmark is not "oh look, it's slower than Perl 5". T

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5? (Benchmarking Tool?)

2009-06-04 Thread Daniel Carrera
Joshua Gatcomb wrote: I think you are confusing profiling with benchmarking. Profiling helps you identify where a problem is. Benchmarking helps you compare two different versions of the same routine. Whatever. I have a series of programs that test the speed of various aspects of the languag

Re: the file slurping is not working

2009-06-05 Thread Daniel Carrera
Carl Mäsak wrote: Aruna (>): I tested the below code on parrot-1.1.0 and it read all the lines in the file and tested same code on the latest git update (4th June 2009), it outputs only the first line. That's what C<$file.get> does -- it gives you one line per default. You want C<$file.lines>.

Re: the file slurping is not working

2009-06-05 Thread Daniel Carrera
Leon Timmermans wrote: Then why is it that .get works fine for $*IN? while $*IN.get -> $line { say $line } Because you're using a while loop instead of a for loop ;-) Worse. The code I wrote has a subtle but horrible error. The condition will fail as soon as you hit a blank line!!

RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Hi all, I just wrote a blog post showing how to make a reverse polish notation calculator in Perl 6. In the process I show some of Perl 6's grammar features. Someone in IRC thought it was good, so I decided to post here in the off chance that someone else finds it interesting or useful. ht

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Ruoso wrote: TIMTOWTDI ;) The objective of the blog was more about the learning + teaching experience than anything else. http://sial.org/pbot/37075 % perl rpn.pl "2 2 +" Semicolon seems to be missing at rpn.pl line 2. String found where operator expected at rpn.pl line 13, near

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Carrera wrote: http://sial.org/pbot/37075 % perl rpn.pl "2 2 +" Tee hee... that should have been "perl6". :-) Ok, try again: % perl6 rpn.pl "2 2+" 2 2

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Carrera wrote Ok, try again: % perl6 rpn.pl "2 2+" 2 2 You can probably fix that with a different split() line. I tried using instead of \s+ but the program just hangs forever. I also tried a more complex expression, and the calculator didn't like it: % perl6 rpn.pl

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Ruoso wrote: You can probably fix that with a different split() line. I tried using instead of \s+ but the program just hangs forever. Hmm.. it certainly is in the split, I'm not sure how to get the barrier between the 2 and the + Does Perl 6 still have the word barrier \b regex?

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Ruoso wrote: Yes... that's what wasn't implemented... But now it is ;) http://sial.org/pbot/37085 Close, but... % perl6 rpn.pl "5 4 + 3 / 5 3 - *" -6 That should be a positive 6. Are you planning to write a post explaining how your program works? I figure that the explanation is as

Re: RPN calculator in Perl 6

2009-06-06 Thread Daniel Carrera
Daniel Ruoso wrote: Are you planning to write a post explaining how your program works? Maybe, but if you want to beat me to it, feel free ;) I figure that the explanation is as useful as the example. I sure spent a lot of time writing the blog post. I'm not sure I'll have the time to write

The Josephus Problem

2009-06-12 Thread Daniel Carrera
Hello, Some list members may be interested in this blog post: http://daniel.carrera.bz/2009/06/perl-6-and-the-josephus-problem/ I use the Josephus Problem to compare the OOP syntax of Perl 6, Python and Ruby. It turns out that Perl 6 is *a bit* shorter and no less clear. The point is that one

Re: Multi-d array transforms (was Re: Array rotate)

2009-06-12 Thread Daniel Carrera
Damian Conway wrote: In fact, I would even be happy with requiring @a.=push and @a.=shift, if it meant that there were *no* special cases. One extra character is a small price to pay for perfect SWIM (and not just "Say What I Mean", the real benefit is the other SWIM: "See What I Meant"). I don

Re: Multi-d array transforms (was Re: Array rotate)

2009-06-13 Thread Daniel Carrera
Larry Wall wrote: Nevertheless, for any major methods borrowed from Perl 6, I'm not inclined to change them that drastically. Much more likely to define them as sugar for the more general list operators: .push means .=append .unshiftmeans .=prepend .splice means

Re: Filename literals

2009-08-18 Thread Daniel Carrera
+1 Carl Mäsak wrote: Very nicely put. We can't predict the future, but in creating something that'll at least persist through the next decade, let's not do elaborate things with lots of moving parts. Let's make a solid ground to stand on; something so stable that it works uphill and underwater.

Q: Code example in "Using Perl 6" - methods and spaces.

2010-12-27 Thread Daniel Carrera
Hello, After a long absence (been busy) I'm trying to re-learn Perl 6. I'm reading the book "Using Perl 6", from Jonathan S, Moritz, Mäsak, PM and Jonathan W.: http://github.com/downloads/perl6/book/2010.08.a4.pdf I tested the first program using the latest release of Rakudo Star. The first pro

Re: Q: Code example in "Using Perl 6" - methods and spaces.

2010-12-27 Thread Daniel Carrera
On Mon, Dec 27, 2010 at 8:37 PM, Darren Duncan wrote: > A relevant reading would be > http://perlcabal.org/syn/S02.html#Whitespace_and_Comments I think; what > you are trying to do may not directly be allowed, though there may be > workarounds such as by using "unspace". > Thanks. The blacklash "

Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
Hello, Looking at the first example in "Using Perl6", I have: if $r1 > $r2 { %matches{$p1}++; } else { %matches{$p2}++; } I was thinking that it should be possible to make this more compact, but the two ideas I tried didn't work: # Idea 1 gives: Unable to parse postcircumfix:sym<{ }>, c

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Mon, Dec 27, 2010 at 9:49 PM, Chas. Owens wrote: > The [conditional operator][1] is now spelled test ?? true !! false not > test ? true : false. > Thanks! Now the following code works: %matches{ $r1 > $r2 ?? $p1 !! $p2 }++; I'm still having trouble with the other alternative: $r1 > $r2

Re: Q: Code example in "Using Perl 6" - methods and spaces.

2010-12-27 Thread Daniel Carrera
On Mon, Dec 27, 2010 at 10:00 PM, Moritz Lenz wrote: > But there's a good reason: .method is a term on its own, and actually > means $_.method. So if you write @names.foo .bar, that's two terms in a > row. > That is indeed a good reason. I think I knew about it but forgot. That now the $_ varia

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Mon, Dec 27, 2010 at 10:03 PM, Chas. Owens > { } by itself creates a lambda (i.e. an anonymous function), so it may > > be that you are returning an anonymous function that never gets > > executed. Try using parentheses instead of braces. > > Or better yet, don't use anything. Since ++ has hi

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Mon, Dec 27, 2010 at 10:03 PM, Moritz Lenz wrote: > or > > my $closure = $r1 > $r2 ?? { %matches{$p1}++ } !! { %matches{$p2}++ }; > # invoke it > $closure(); > That's very cool. Perl 6 is a functional language with lambdas and everything. Daniel. -- No trees were destroyed in the generation

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Tue, Dec 28, 2010 at 12:38 AM, Mason Kramer wrote: > One method-like thing that's come in handy for me as I've tinkered with the > language is .WHAT. > > { ... }.WHAT > Block() > > AFAIK, you can use .WHAT on *any* term, because every term in Perl6 is an > object that is implemented by a class,

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Tue, Dec 28, 2010 at 1:21 AM, Mason Kramer wrote: > Sorry. > > TTIAR = Two Terms In A Row. > > It's always a syntax error in Perl6, unlike Perl 5. > > print, say, and sin as you've used them are not terms, actually. They're > expressions which happen to be function calls. You're calling .WHAT

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Daniel Carrera
On Tue, Dec 28, 2010 at 2:06 AM, Chas. Owens On Mon, Dec 27, 2010 at All of your examples are in fact terms. A term is a thing that is > considered one unit. So, numbers, strings, and variables are all > obviously terms. A function or method call that includes parentheses > is also a term. But

Re: Q: Is there a reason why I can't do this?

2010-12-28 Thread Daniel Carrera
On Tue, Dec 28, 2010 at 5:27 AM, yary wrote: > On Mon, Dec 27, 2010 at 8:50 PM, Daniel Carrera > wrote: > > > > So TTIR just means that any two terms must be separated by something, > like > > an operator (2+5). Which basically is common sense and I'm actually &g

Various questions

2010-12-28 Thread Daniel Carrera
Hello, I have a few miscellaneous questions: 1) Does anyone know what a "Parcel" is? <1 2 3 4>.WHAT => Parcel() <1 2 3 4 ; 2 3 4 ; 5>.WHAT => Parcel() 2) How do you figure out the length of an array? The "scalar" function is gone. I tried "len", "length" and "size" without success. 3) Mor

Re: Various questions

2010-12-28 Thread Daniel Carrera
Thanks. On Wed, Dec 29, 2010 at 12:51 AM, Will Coleda wrote: > On Tue, Dec 28, 2010 at 6:32 PM, Daniel Carrera wrote: >> 1)  Does anyone know what a "Parcel" is? >> >> <1 2 3 4>.WHAT  => Parcel() >> <1 2 3 4 ; 2 3 4 ; 5>.WHAT  => Pa

Re: Questions for Survey about Perl

2010-12-29 Thread Daniel Carrera
On Wed, Dec 29, 2010 at 10:02 AM, Richard Hainsworth wrote: > Gabor, > > there is a big gap between 'i wrote snippets' to 'i wrote modules'. How > about 'i have written programs to solve real problems' ? I agree. Although I don't use Perl 6 in production yet, for Perl 5 I can say that I've never

Re: Questions for Survey about Perl

2010-12-29 Thread Daniel Carrera
On Wed, Dec 29, 2010 at 10:16 AM, Gabor Szabo wrote: > So in relation to what Katherine wrote earlier we should have a > question trying to figure out what are people waiting for before they > start using Perl 6. That's an excellent question. Possible answers: * I'm waiting for a specific featu

Re: Announce: Rakudo Star 2010.12 released

2010-12-31 Thread Daniel Carrera
Out of curiosity, is it possible to get Rakukdo to talk to C, C++ or Fortran? On Thu, Dec 30, 2010 at 8:04 PM, Patrick R. Michaud wrote: > > On behalf of the Rakudo and Perl 6 development teams, I'm happy to > announce the December 2010 release of "Rakudo Star", a useful and usable > distribution

Re: Announce: Rakudo Star 2010.12 released

2010-12-31 Thread Daniel Carrera
On Fri, Dec 31, 2010 at 3:41 PM, Moritz Lenz wrote: > For C, see https://github.com/jnthn/zavolaj > Fortran uses the same calling conventions, albeit with weird name > mangling rules that depend on the compiler. So you can use Zavolaj for > Fortran too, if you're ready to suffer. Hmm... I don't l

Re: Questions for Survey about Perl

2010-12-31 Thread Daniel Carrera
On Fri, Dec 31, 2010 at 7:17 PM, Paul Makepeace wrote: > On Tue, Dec 28, 2010 at 23:02, Gabor Szabo wrote: >> We will have questions about usage of Perl 5 and we think there should >> be also questions >> about Perl 6. > > Should Perl 6 be called something else? >   * No >   * Yes, not sure what

Re: Questions for Survey about Perl

2010-12-31 Thread Daniel Carrera
On Sat, Jan 1, 2011 at 1:26 AM, Chas. Owens wrote: > On Wed, Dec 29, 2010 at 21:39, Xue, Brian wrote: >> I want to adding one more answer about what are people waiting for before >> they >> start using Perl 6. >> >> There hasn't an official release of PERL6.0, just Rakudo. I'm afraid of >> Raku

Re: Questions for Survey about Perl

2011-01-01 Thread Daniel Carrera
On Sat, Jan 1, 2011 at 10:15 AM, Gabor Szabo wrote: > It would be nice to figure out what is the percentage of people who > don't yet look at Perl 6 because there was not official Perl 6.0 > release or in more general what are the blocking issues for them. > I just would like to make sure that by

Re: Questions for Survey about Perl

2011-01-01 Thread Daniel Carrera
On Sat, Jan 1, 2011 at 12:36 PM, Moritz Lenz wrote: > Given the current version number scheme (year.month), it's highly > unlikely that we'll ever see a Rakudo 1.0. > > So I'd change that to "after a production release of a Perl 6 compiler" People might be expecting that when Rakudo is ready it

Re: Questions for Survey about Perl

2011-01-02 Thread Daniel Carrera
On Sun, Jan 2, 2011 at 5:27 PM, Patrick R. Michaud wrote: > Out of curiosity (because I think it will illuminate some of the difficulty > Rakudo devs have in declaring something to be a "production release"): > >  - What constitues a "production release"? The developers judge that the software is

Re: Questions for Survey about Perl

2011-01-02 Thread Daniel Carrera
On Sun, Jan 2, 2011 at 6:05 PM, Guy Hulbert wrote: > I think freezing a subset of what you eventually want to have and then > getting as close as you can on a fairly tight schedule is the best way > to get buy-in from users. That is generally what I expect to see in a production release, yes. I d

Re: Questions for Survey about Perl

2011-01-03 Thread Daniel Carrera
On Mon, Jan 3, 2011 at 8:13 AM, Gabor Szabo wrote: > I think it largely depends on who do you ask and I believe there will > be a huge gap between private people and company people. Or between > people who are involved in open source development and in-house developers. I don't see the open sour

Re: Questions for Survey about Perl

2011-01-03 Thread Daniel Carrera
On Mon, Jan 3, 2011 at 8:27 AM, Gabor Szabo wrote: >> So I'd change that to "after a production release of a Perl 6 compiler" > > I think I'll include both answers. > If we learn that people desperately need a 1.0 numbering then the > Rakudo developers > can make up their mind to either change the

Re: Can't download Rakudo Dec 2010 without git

2011-01-04 Thread Daniel Carrera
That's rather annoying. Isn't there a way to fix that? On Tue, Jan 4, 2011 at 8:25 AM, Moritz Lenz wrote: > On 01/04/2011 03:19 AM, gvim wrote: >> Does this mean I have no option but to install git in order to keep my Perl >> 6 up to date? > > No. You can download and install a release tarball o

Re: Can't download Rakudo Dec 2010 without git

2011-01-04 Thread Daniel Carrera
On Tue, Jan 4, 2011 at 9:38 AM, Jan Ingvoldstad wrote: > On Tue, Jan 4, 2011 at 09:30, Daniel Carrera wrote: >> >> That's rather annoying. Isn't there a way to fix that? > > Yes, install Rakudo Star instead, that bundles a suitable version of Parrot. Oh, gvim w

Re: Production Release - was Re: Questions for Survey about Perl

2011-01-05 Thread Daniel Carrera
Although everything you said is technically true, I must point out that without a definitive release, potential users will tend to avoid the software. For people not involved in the process (i.e. 99.995% of Perl users) it is impossible to know when the software is good enough for use. You may talk

Re: Production Release - was Re: Questions for Survey about Perl

2011-01-05 Thread Daniel Carrera
On Wed, Jan 5, 2011 at 2:13 PM, Anderson, Jim wrote: > Hear! Hear! Uhmm... sorry if I looked angry or whatever. Email is at times a poor medium of communication because you lose details like tone of voice and body language. I just wanted to highlight something that I think is relevant to anyone wh

Re: Production Release - was Re: Questions for Survey about Perl

2011-01-05 Thread Daniel Carrera
On Wed, Jan 5, 2011 at 5:05 PM, Richard Hainsworth wrote: > It is blindingly obvious that the majority of language users, ..., will only > start to use a language > when it is recommended by 'those in authority'... > > I think the issue of a version number is irrelevant 1) You have more or less

Re: Production Release - was Re: Questions for Survey about Perl

2011-01-05 Thread Daniel Carrera
On Wed, Jan 5, 2011 at 6:22 PM, Richard Hainsworth wrote: > From what Larry has already said, I dont think he ever will say the Perl 6 > spec is ready. The spec and the language are evolving together. That is what > the waterfall and attractor stuff was all about. Not relevant. The question is wh

Re: Production Release - was Re: Questions for Survey about Perl

2011-01-06 Thread Daniel Carrera
I would be very interested to see something that allowed Rakudo to talk to Fortran 95. I am going to use Fortran 95 for my thesis work, and maybe I could write a module to give Rakudo a basic array language. Nothing fancy like MATLAB, NumPy or PDL, but enough to try out algorithms and prototype id

  1   2   >