Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
building a p6 compiler? * Do you have a good idea for a project name? Any other ideas and comments are welcome as well. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
(Sorry for personal message previously, now my answer to the list) Juerd Waalboer wrote: Moritz Lenz skribis 2007-07-10 12:43 (+0200): $ p6explain '[]' [...] can be * '[$expression]': access to one or more array elements if used as postcircumfix Example: @a[2]; # access

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
Steffen Schwigon wrote: Moritz Lenz [EMAIL PROTECTED] writes: considering the vast number of Operators and the like, I had the idea to implement a tool where you can enter a small piece of p6 syntax, and it explains what that might mean. (like a perldoc -f for operators/syntax elements

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-10 Thread Moritz Lenz
-- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Moritz Lenz
resembling an IDE. I realize that's a long term goal. Which leads me to the question: how should the data be assembled so that it could be used in such a way? Would it be enough to store the name of the token, along with the description? Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http

Re: Project Idea: Perl 6 Syntax Explainer

2007-07-12 Thread Moritz Lenz
Dave Whipp wrote: Moritz Lenz wrote: You're probably right about that, but somebody who writes his own macros and operators probably doesn't need such a tool anyway. And should write very good documentation, otherwise he has lost outright. (I was thinking that your tool would provide

Re: Project Idea: Perl 6 Syntax Explainer: Status

2007-07-12 Thread Moritz Lenz
perlhints5.pl (implemented in p5), and a very basic web interface at http://moritz.faui2k3.org/perlhints/, for example http://moritz.faui2k3.org/perlhints/?q=*. What it lacks mostly is the data ;) Currently all data is read from a single flat file. Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http

Re: In lieu of This Week in Perl 6

2008-04-12 Thread Moritz Lenz
/ to be wrong or outdated, feel free to contact me, and I'll send a patch to our webmasters. I tried to update the most important parts (without being too intrusive), but it's surely not complete. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description

Re: Strange variable behaviour

2008-06-22 Thread Moritz Lenz
the number of tests wrongly. I'll probably move some of the simpler tests to a separate file to work around these limitations for now (currently assign.t has 308 tests, which is way above average anyway) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: [svn:parrot] r28689 - trunk/languages/perl6/t (- versus _)

2008-07-02 Thread Moritz Lenz
Conrad Schneiker wrote: Moritz Lenz wrote (on perl6-compiler) Patrick R. Michaud wrote: +S02-builtin_data_types/num.t S02-builtin_data_types/type.t S02-literals/autoref.t S02-literals/hex_chars.t# pure S02-literals/radix.t S02-polymorphic_types/subset

Re: Modules

2008-10-12 Thread Moritz Lenz
or XML and wants a tester, please let me know. I'm sure the November hackers welcome more tests for CGI (cc-ing their mailing list). -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Argument scoping error or bug?

2008-10-25 Thread Moritz Lenz
, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: assign to Scalar with hash

2008-11-04 Thread Moritz Lenz
; Cannot morph a Perl6Scalar. I didn't know about that, but it could be another manifestation of this bug. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: reporting bugs

2009-01-05 Thread Moritz Lenz
Richard Hainsworth wrote: s/has appeared/has NOT appeared/ Richard Hainsworth wrote: I posted an email to per6-all asking about how one should go about reporting bugs. That message has appeared on the list. That's because perl6-all is a meta list, which subscribes you to p6l, p6c and p6u.

How to use the sockets?

2009-04-27 Thread Moritz Lenz
Hi, I've gathered that Rakudo now implements sockets, and I wanted to do some basic data shuffling for testing purposes. Could anybody point me to a really simple, working example? I tried to cargo-cult it from Web.pm

Re: attributes initialisation

2009-05-18 Thread Moritz Lenz
Hi, Илья wrote: Hi, no one answered at #perl6, so I sending this question in list: ihrd: I have question about attr initialization ihrd: if I have two attr with same name ihrd: like @.args and %.args ihrd: and instance object, like .new(args = {foo = 1}), rakudo init both attr ihrd:

[proto] installing a module if PARROT_DIR is a symlink

2009-06-13 Thread Moritz Lenz
Since viklund++ added proto support to JSON yesterday, I wanted to try it - and I found some problem that I don't know how to fix. This is how my setup looks: rakudo (bleed) lives in ~/rakudo/. Parrot lives in ~/rakudo/parrot/, which is a symlink to ~/tmp/parrot-all/ ~/bin/ is in $PATH, and

Re: Iterate X times

2009-09-14 Thread Moritz Lenz
Christian Sturm wrote: do you know a short and easy way to iterate a block X times? Aye ;-) I know, one could use while, for, ... but there are some reasons, why they don't fit. All these versions are long. I really like Perl, because you can do thing with shorter code. In all these loops

Re: Perl 6 IDEs

2009-12-07 Thread Moritz Lenz
Hi, On Sun, Dec 06, 2009 at 01:47:37PM -0300, Víctor A. Rodríguez (Bit-Man) wrote: but it doesn't support Perl 6 (yet). Also tied to install Padre on top of Ubuntu but just went to nowhere :-P I'm sure the Padre developers will appreciate your feedback, and can help you with the setup. Did

Re: Compiling Perl6 code to bytecode

2010-01-29 Thread Moritz Lenz
Hi, Tadeusz Sośnierz wrote: However, compiling the code for later use makes problems: $ perl6 --target=pir hello.pl hello.pir $ parrot /usr/lib/parrot/2.0.0/languages/perl6/perl6.pbc hello.pir You should use parrot to turn the .pir file, not the Perl 6 compiler. So try parrot hello.pir

Re: Compiling Perl6 code to bytecode

2010-01-30 Thread Moritz Lenz
Tadeusz Sośnierz wrote: On 29-01-2010 14:46:40, Moritz Lenz wrote: Hi, Hi, thanks for your response. Tadeusz Sośnierz wrote: However, compiling the code for later use makes problems: $ perl6 --target=pir hello.pl hello.pir $ parrot /usr/lib/parrot/2.0.0/languages/perl6/perl6.pbc

Re: ^[[A^[[A

2010-03-10 Thread Moritz Lenz
- Does your platform support readline.yes. Then reconfigure and rebuild rakudo, and you should be happy. -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Rakudo Perl 6 development release #28 (Moscow)

2010-04-22 Thread Moritz Lenz
On behalf of the Rakudo development team, I'm pleased to announce the March 2010 development release of Rakudo Perl #28 Moscow. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine (see http://www.parrot.org). The tarball for the April 2010 release is available from

Re: Two questions on Perl 6 functionality

2010-06-21 Thread Moritz Lenz
Hi, Xi Yang wrote: 1: Does Perl 6 has method modifiers like those in Moose? Perl 6 has traits, so you can write for example class A { method x() is rw { ...} } to indicate that it's an lvalue routine (though I don't think it's implemented in Rakudo yet). Where can I get the doc about

Re: Two questions on Perl 6 functionality

2010-06-21 Thread Moritz Lenz
Xi Yang wrote: You might mis-understood method modifiers. I mean: before x() after x() around x() In Perl 6, you do that with wrapping: http://perlcabal.org/syn/S06.html#Wrapping Cheers, Moritz

Re: very basic type checking

2010-06-25 Thread Moritz Lenz
Hi, Am 23.06.2010 13:59, schrieb Hiroki Horiuchi: I asked the same question to #perl6. But now I think it was a wrong place. no, you had the bad luck of asking at a time when nobody was around. My question is: In current Rakudo, my Int $i = '123'; causes a runtime error, not a compile time

Re: implementing every(N)

2010-08-01 Thread Moritz Lenz
Hi, Ted Zlatanov wrote: I have a Perl 5 module called Every which provides, simply, every(5); # true on invocation 5, 10, etc. every(seconds = 5); # true at 5, 10, etc. seconds It's really nice in endless loops, logging, etc. I'd like to translate it to Perl 6 (using Rakudo

Grammars: parse tags of which only some need closing tags

2010-08-28 Thread Moritz Lenz
Hi, I'm currently in the progress of porting a template system [1] to Perl 6 [2]. It's fun to write the parser as a Perl 6 grammar, but there's one thing that I don't know how to solve elegantly. The markup format allows arbitrary text, and optionally some tags interleaved. Some of them stand

Re: New Perl 6 Advent Calendar: call for ideas

2010-11-06 Thread Moritz Lenz
Hi, On 11/06/2010 01:51 PM, Tadeusz Sośnierz wrote: As I accidentally volunteered for managing a list of topics and writers for this year's Advent Calendar [1], Thanks for volunteering! I started to collect some ideas of things it'd be nice to write about. There's a gist [2] with the list

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

2010-12-27 Thread Moritz Lenz
On 12/27/2010 09:12 PM, Daniel Carrera wrote: Thanks. The blacklash unspace works. my @sorted = @names.sort({ %sets{$_} })\ .sort({ %matches{$_} })\ .reverse; Though I'm a bit sad that you need that and you can't just separate methods with spaces.

Re: reading binary stream?

2010-12-28 Thread Moritz Lenz
Hi, On 12/28/2010 03:30 PM, Hiroki Horiuchi wrote: How can I fix the problem? The following works right now in Rakudo, but I don't know if it conforms to the spec: my $h = open '/dev/urandom', :bin; $*OUT.write: $h.read(10) note that read() returns a Buf, which can be printed out again with

Re: Questions for Survey about Perl

2010-12-29 Thread Moritz Lenz
Hi, On 12/29/2010 08:02 AM, Gabor Szabo wrote: I'd be happy to get your input on how else would you put this question or what possible other answers you would allow. Here are some very rough ideas: How much do you know about Perl 6? * nothing except the name * some design ideas or history

Re: Announce: Rakudo Star 2010.12 released

2010-12-31 Thread Moritz Lenz
On 12/31/2010 03:31 PM, Daniel Carrera wrote: Out of curiosity, is it possible to get Rakukdo to talk to C, C++ or Fortran? 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

Re: Questions for Survey about Perl

2011-01-01 Thread Moritz Lenz
On 01/01/2011 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 asking the

Re: Can't download Rakudo Dec 2010 without git

2011-01-03 Thread Moritz Lenz
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 of parrot, and then point rakudo's Configure.pl to the installed parrot. Only if you use the --gen-parrot option, git

Re: Dynamic method generation?

2011-01-08 Thread Moritz Lenz
On 01/08/2011 09:11 PM, Sean McAfee wrote: package MyMatcher; my @SIMPLE_FIELDS = qw(FOO BAR BAZ BLETCH QUUX ...); for my $field (@SIMPLE_FIELDS) { no strict 'refs'; *{ is_\L$field } = sub { shift-_matches($field) }; } class MyMatcher { for FOO BAR BAZ BLETCH QUUX - $field

Re: Dynamic method generation?

2011-01-09 Thread Moritz Lenz
On 01/09/2011 02:26 AM, Sean McAfee wrote: On Sat, Jan 8, 2011 at 3:50 PM, Moritz Lenz mor...@faui2k3.org wrote: class MyMatcher { for FOO BAR BAZ BLETCH QUUX - $field { MyMatcher.^add_method($field, method() { self!matches($field

Re: Fwd: FOSDEM - perl 6 critic

2011-02-22 Thread Moritz Lenz
Am 22.02.2011 16:57, schrieb Gabor Szabo: He, as a sysadmin would like to do the small tasks in a relatively small language. He would like to make sure the modules/applications he will download and will have to support are in such a relatively small language. Whatever Perl 6 will turn out to

Re: Fwd: FOSDEM - perl 6 critic

2011-02-22 Thread Moritz Lenz
On 02/23/2011 02:10 AM, Frank S Fejes III wrote: On Tue, Feb 22, 2011 at 10:46 AM, Moritz Lenz mor...@faui2k3.org wrote: We can't be everybody's darling, as much as we would love to. That's a fair statement, however do consider that perl5 is still a darling for many system administrators

Re: Criteria for production-ready?

2011-04-16 Thread Moritz Lenz
On 04/16/2011 05:02 PM, gvim wrote: Does there currently exist a set of criteria by which Perl6, or an implementation thereof, can be defined as production-ready? No. production-ready is just as subjective as good or fast or mature or beautiful or any other adjective you can think of, because

Re: Current vs future Perl 6 binary size

2011-04-22 Thread Moritz Lenz
On 04/22/2011 01:33 AM, gvim wrote: Do I take it that the Perl 6 binary is, by design, much larger than the current Perl 5.12 (1.6Mb) No, we didn't design either the language or the compiler with the goal of having a large executable. And I seem to recall we already had a similar discussion

Re: Using precompiled modules, Assembling a project into one single file (pbc)

2011-06-17 Thread Moritz Lenz
Am 17.06.2011 11:40, schrieb Георгий Устинов: If you compile Hello.pm to Hello.pir and remove Hello.pm, PIR module does not load. Why? Because .pm files are the authoritative source of information (for example regarding version information, but also regarding actual program code), and .pir

Re: Form of I/O statements

2011-07-12 Thread Moritz Lenz
Am 11.07.2011 23:27, schrieb Parrot Raiser: Printing to STDOUT (by default) works; every attempt to write to a named file has failed. Is this another Not Yet Implemented? No, you just didn't get the syntax right :-) Executing this code: my $skeleton = bones\n; my $new_file = x_file; my

Re: Handling binary files

2011-10-02 Thread Moritz Lenz
Hi, On 10/01/2011 03:39 PM, Klāvs Priedītis wrote: I have a question about binary files. How can I read binary files? I need to do folowing things: read numbers of different widths, strings. The read() method in IO allows you to read binary data. The result is a Buf object. Example: my $file

Announcing the Perl 6 Coding Contest 2011

2011-12-25 Thread Moritz Lenz
Dear all, you can have fun using Perl 6 and win 100€ worth of books -- just join the Perl 6 Coding Contest: http://strangelyconsistent.org/blog/the-2011-perl-6-coding-contest Merry Christmas, Moritz

Re: use v6

2012-01-18 Thread Moritz Lenz
Am 18.01.2012 11:53, schrieb David Arroyo: use v6; This is obligatory in perl 6? What does the module do? 'use v6;' is the declaration that the following program is written in Perl 6. It has the advantage that if you accidentally run the file with a perl 5 compiler, it will give you a much

Re: Is rindex broken or does my brain need a reboot?

2012-05-10 Thread Moritz Lenz
Now fixed in 2012.04.1-93-g128e996: $ ./perl6 -e 'say @*ARGS[0].rindex(e)' perl 1

Re: Perl6 grammars -- Parsing english

2012-06-26 Thread Moritz Lenz
On 06/26/2012 02:04 PM, Lard Farnwell wrote: Hi guys, To understand and play around with perl6 grammars I was trying to do a simple NLP parts of speech parser in perl6 grammars. This is sort of what I did: --- grammar Sentence{ proto rule VP {*}

Re: Panda with git:// or https:// ?

2012-06-28 Thread Moritz Lenz
FWIW the reason I always use git:// over https:// is that at some point cloning from github via https:// would result in strange errors on the client side (iirc something about missing objects). I have no idea if that's fixed, but I haven't seen a reason to change back to https either. Am

Re: say vs print for .WHAT

2012-06-29 Thread Moritz Lenz
Am 28.06.2012 23:43, schrieb Smylers: Patrick R. Michaud writes: print will stringify its arguments and write them to $*OUT. say will invoke .gist on its arguments and write them (along with a final newline) to $*OUT. Hi there. What's the rationale for the difference there? Under what

Re: Capturing warning

2012-07-12 Thread Moritz Lenz
Am 12.07.2012 13:50, schrieb Gabor Szabo: On Thu, Jul 12, 2012 at 2:31 PM, Tadeusz Sośnierz tadzi...@gmail.com wrote: On Thu, 12 Jul 2012 13:27:26 +0200, Gabor Szabo ga...@szabgab.com wrote: Hi, is there a way to capture warnings in Perl 6 - similar to $SIG{__WARN__} in Perl 5 ? Gabor

Re: perl6 spec tests results ?

2012-08-28 Thread Moritz Lenz
Hi, On 08/28/2012 10:09 PM, Marc Chantreux wrote: i'm writing an article on Perl6 and i would like some facts to reassure early adopters. according to the test suite and the will of Perl6 implentors, what proportion (in %) of Perl6 can be concidered as stable? That's a hard question to

Re: the nature of a scalar?

2012-10-24 Thread Moritz Lenz
On 10/24/2012 02:46 PM, Marc Chantreux wrote: use v6; use lib 'lib'; use Bailador; get / (.*) '/' / = sub ($path) { $path||=foo; $path is a subroutine parameter, and thus read-only by default. If you want to modify $path locally, write sub ($path is copy) { ... } Also if Bailador

Rakudo Star 2012.11 released

2012-11-28 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the November 2012 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the November 2012 release is available from http://github.com/rakudo/star/downloads. A Windows .MSI version of Rakudo

Announce: Rakudo Star 2012.12 release

2012-12-27 Thread Moritz Lenz
Announce: Rakudo Star - a useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the December 2012 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the December 2012 release is available

Re: Per-Object Roles..

2013-02-23 Thread Moritz Lenz
Hi Frank, On 02/24/2013 07:27 AM, Frank White wrote: Hi, I am new to Perl6 and I'm interested in the feature that allows you to add roles to classes. From what I understand you can add a role to an object using the does keyword. Is there any way you can remove a role or No, you cannot

Announce: Rakudo Star 2013.02 released

2013-02-24 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the February 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the February 2013 release is available from http://rakudo.org/downloads/star/. A Windows .MSI version of Rakudo star

Re: Packaging Perl 6 (or rather, Rakudo Star)

2013-03-05 Thread Moritz Lenz
On 03/05/2013 12:02 PM, Rob Hoelz wrote: On 3/5/13 11:44 AM, Patrick R. Michaud wrote: On Tue, Mar 05, 2013 at 11:13:51AM +0100, Rob Hoelz wrote: I already have my own package for Arch Linux for Rakudo Star, and I keep the OS X homebrew package up-to-date as well. I'd like to create an RPM

Re: prove that the meaning of live is math

2013-05-26 Thread Moritz Lenz
Hi Marc, On 05/26/2013 12:49 PM, Marc Chantreux wrote: say [+] ('a'..'z')\ .pairs\ .map: { 1 + .key if .value ~~ any m a t h } i already know i have to get used to the anoying \ at the end of the lines but i'm pretty sure there are plenty ways to make this expression

Rakudo Star 2013.08 released

2013-08-24 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the August 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the August 2013 release is available from http://rakudo.org/downloads/star/. A Windows .MSI version of Rakudo star will

Announce: Rakudo Star Release 2013.09

2013-09-26 Thread Moritz Lenz
## A useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the September 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the September 2013 release is available from

Rakudo Star 2013.11 released

2013-11-24 Thread Moritz Lenz
## A useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the November 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the November 2013 release is available from

Re: how to set constants from command line?

2013-12-14 Thread Moritz Lenz
Hi Richard, On 12/12/2013 08:56 AM, Richard Hainsworth wrote: I would like to set a series of magic numbers from the command line. I have in a program constant N-SCENARIOS = 10; which works great. But I would like to set an option in the command line, such as perl6 program.p6 scenarios=15

Re: perl 6 beginner: regex questions

2014-02-04 Thread Moritz Lenz
Hi, On 02/01/2014 10:56 PM, infor...@hushmail.com wrote: Hello, I have a few questions about the regexes. I'm new to perl 6 and I don't know perl 5. I'm proficient with grep/sed. I installed Rakudo with the defaults on Linux (Mandriva 2010.1) and Windows 7. I get identical output for

Re: Does perl have ensue override?

2014-05-16 Thread Moritz Lenz
Hi Kamil, On 05/15/2014 07:48 PM, Kamil Kułaga wrote: Is there any ordinary way (not something like getting list of methods from base class) to ensure we are overriding method? Java has @Override annotation that that causes compilation error if method is not necessary for Interface(Role). It

Re: Regex: fail if ... present

2014-05-30 Thread Moritz Lenz
Hi Peter, On 30.05.2014 20:46, Peter Schwenn wrote: Dear Perl6istes, How does one express in a perl6 match pattern that if a certain subpattern is present the match fails. I had expected something like: $txt ~~ s/... -[ unwanted \s+ pattern ] .../ .../; but its not that. Can't

Re: Regex: fail if ... present

2014-05-30 Thread Moritz Lenz
Hi Peter, On 30.05.2014 22:39, Peter Schwenn wrote: Dear Moritz, $txt ~~ s:g/ !before System \. Guid /.Moniker/; transforms (in $txt):System.Guid - System.Moniker i.e. the match succeeds. So obviously I'm not understanding negative look-ahead correctly. Where's there a good

Re: Perl6 and wxwidgets

2014-06-08 Thread Moritz Lenz
Hallo Erik, On 08.06.2014 12:54, Erik Colson wrote: Is it possible to use an external C-library like wxwidgets from perl6/moarvm ? If so, is there any doc how this can be achieved ? It is, through the NativeCall library: https://github.com/jnthn/zavolaj/ Cheers, Moritz

Re: Code execution during compilation

2014-06-15 Thread Moritz Lenz
Hi, class and role bodies are executed at compile time, so yes, that's expected. The same thing happens in BEGIN blocks. (Actually, the case with roles is more complicated; iirc their bodies are executed at role application time, but in your example, 'class B does Xx' runs at compile time, so

Re: Date truncated-to method argument?

2014-11-10 Thread Moritz Lenz
Hi, On 11/10/2014 01:39 PM, Steve Mynott wrote: http://doc.perl6.org/type/Date says my $c = Date.new('2012-12-24'); say $c.truncated-to(:year); # 2012-01-01 but this doesn't work and what's implemented appears to be year rather than :year $ perl6 my $c = Date.new('2012-12-24');

Re: Rationale for a VM + compiler approach instead of an interpreter?

2014-12-06 Thread Moritz Lenz
Hi, On 06.12.2014 18:55, Mayuresh Kathe wrote: Hello, I have been reading up (a bit) on Perl6 and found most articles mentioning Parrot + Rakudo as the primary tools for development using the language. Well, these days we have three backends (MoarVM, JVM and Rakudo). Is there any rationale

Announce: Rakudo Star Release 2015.01

2015-02-07 Thread Moritz Lenz
# Announce: Rakudo Star Release 2015.01 ## A useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the January 2015 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the January 2015

Re: time and now showing different time?

2015-01-12 Thread Moritz Lenz
On 01/12/2015 10:36 AM, Gabor Szabo wrote: On Mon, Jan 12, 2015 at 10:35 AM, Tobias Leich em...@froggs.de mailto:em...@froggs.de wrote: Also interesting might be the fact that BEGIN statements/blocks do return a value: say now() - BEGIN now; # parens needed to there so that it

Re: Object Contruction

2015-03-18 Thread Moritz Lenz
Hi On 03/18/2015 01:06 PM, Tom Browder wrote: My new object needs some methods run during construction. How can I do that without defining my own new method? http://doc.perl6.org/language/objects#Object_Construction lists at least two possible ways. Probably the most interesting one is

Re: Can a class have an attribute and a method with the same name?

2015-03-19 Thread Moritz Lenz
Hi, On 03/19/2015 12:40 AM, Tom Browder wrote: I have a class with an attribute and a method with the same name and it looks so far like they clash. Attributes are always private. If you write 'has $.x', that generates not only the attribute, but also an accessor method of name 'x'. See

Re: Need help with: Cannot find method 'postcircumfix:( )'...

2015-03-20 Thread Moritz Lenz
On 03/20/2015 11:00 AM, Timo Paulssen wrote: On 03/20/2015 03:40 AM, Brandon Allbery wrote: On Thu, Mar 19, 2015 at 10:33 PM, Tom Browder tom.brow...@gmail.com mailto:tom.brow...@gmail.com wrote: Why do you say that is not a method? The first line says Sorry, somehow I managed to

Announce: Rakudo Star Release 2015.03

2015-03-21 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ## A useful, usable, early adopter distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the March 2015 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the March 2015

Re: How to get indirect access to a class attribute?

2015-03-25 Thread Moritz Lenz
Hi, On 25.03.2015 13:44, Tom Browder wrote: Given a class like: our %attrs = (age=1,wgt=2); class foo { has $.age = rw;} should be 'has $.age is rw'. The is indicates a trait (not an assignment). method a { for %attrs.kv - $k, $v { my $aval = self.$k(); #

Re: Fancy sub arg handling: ability to expand error message?

2015-03-28 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On 28.03.2015 12:27, Tom Browder wrote: I like the subroutine arg handling in Perl 6. Is there any simple way to attach a short error msg in place of or additive to the default for, say, a missing arg? You can always use multi subs, and

Re: Passing arrays to subroutines

2015-03-19 Thread Moritz Lenz
On 03/19/2015 04:05 PM, Tom Browder wrote: In Perl 5 I can do this: my @a = (1, 2); my @b = (3); foo(@a,@b); sub foo { my $n = @_; die Wrong num args: $n if ($n != 3);} In Perl 6 I think this is correct (or nearly so): sub foo(*@args) { die Wrong num args: { @args.elems } if @args.elems

Re: Can a user cheat and call a class's private method?

2015-05-12 Thread Moritz Lenz
Hi, On 05/12/2015 09:40 PM, R. Ransbottom wrote: On Mon, May 11, 2015 at 03:22:46PM -0700, Darren Duncan wrote: you can use trusts. Also having to do this may indicate bad code design. -- Darren Duncan I saw Moritz' and Carl's responses and I agree with the smell issue. Given that

Re: Perl 5's $0 vs. Perl 6's $*EXECUTABLE_NAME

2015-05-30 Thread Moritz Lenz
Hi, On 05/30/2015 04:36 PM, Paul Cochrane wrote: Thanks for pointing out the $*PROGRAM omission! I've just added it to the list of special variables and it should be available online within the next 10-15 minutes. Minor nit pick: according to the last log on http://doc.perl6.org/build-log/

Re: Sub args: choose one of two?

2015-06-28 Thread Moritz Lenz
Hi, On 06/28/2015 12:39 AM, Tom Browder wrote: I'm trying to take advantage of the MAIN suroutine to handle most all of my routine command line arg handling. One idiom I use a lot is for the user to choose only one of two args, but one must be chosen. So since it's not optional, you might

Re: Is creating and Array or Parcel ?

2015-08-02 Thread Moritz Lenz
Hi, On 02.08.2015 06:43, Gabor Szabo wrote: On Fri, Jul 31, 2015 at 4:16 PM, Moritz Lenz mor...@faui2k3.org mailto:mor...@faui2k3.org wrote: On 07/31/2015 03:02 PM, Gabor Szabo wrote: The following code (with comments) is confusing me. Can someone give some explanation

Re: Forking or running external process in background

2015-10-24 Thread Moritz Lenz
On 10/24/2015 10:06 AM, Gabor Szabo wrote: > I am trying to test the Perl6::Maven web application by launching the > full application (which is uses Bailador) and then accessing the pages > using LWP::Simple. > > > Unfortunately so far I could not figure out how to launch an external > program

Re: How to call a super class method?

2015-10-28 Thread Moritz Lenz
On 10/28/2015 08:03 AM, Patrick R. Michaud wrote: On Wed, Oct 28, 2015 at 03:31:09AM +, TS xx wrote: Can I call the Person's constructor (in non static context), pass the required parameter and do more things before returning? There are two answers to this question, both of which likely

Re: combine hashes

2015-11-07 Thread Moritz Lenz
On 11/07/2015 10:17 AM, Marc Chantreux wrote: > hello Moritz, > > On Sat, Nov 07, 2015 at 08:17:21AM +0100, Moritz Lenz wrote: >> my %x = < login jdoe first john last doe >; >> my %y = flat (:enable, %x< login first >:p); > > i tried :p but the thing is

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Moritz Lenz
Hi, On 11.08.2015 14:12, Tom Browder wrote: I have seen several lists of new Perl 6 features (versus Perl 5) but they all seem to be lists that intermix features with varying degrees of value to ordinary Perl 5 users. If one wants to sell long-time Perl 5 users (already using the latest Perl

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
Hi, On 09/26/2015 06:47 AM, Gabor Szabo wrote: > Hi, > > I am really glad Rakudo finally came out. > I've installed in and tried to run the tests of Perl6::Maven. > > They quickly failed as I have been using 'require' on string > to check if all the module compile properly. > > The following

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
On 09/26/2015 01:07 PM, Elizabeth Mattijsen wrote: >> On 26 Sep 2015, at 06:47, Gabor Szabo wrote: >> I am really glad Rakudo finally came out. >> I've installed in and tried to run the tests of Perl6::Maven. >> >> They quickly failed as I have been using 'require' on string

Re: Method 'send' not found for invocant of class 'IO::Socket::INET'

2015-09-26 Thread Moritz Lenz
Hi, method .send was deprecated in favor of .print (for strings) and .write (with bufs/blobs) Maybe Bailador or one of its dependencies needs updating. Cheers, Moritz

Re: How to push a hash on an array without flattening it to Pairs?

2015-09-26 Thread Moritz Lenz
On 09/26/2015 02:26 PM, Aristotle Pagaltzis wrote: > Now of course I must ask – is there an opposite also? I.e. when writing > a list, is there a way I can say “do flatten this item?” Yes, that's what type Slip is for: http://doc.perl6.org/type/Slip It's useful for returning more than one list

Announce: Rakudo Star Release 2015.09

2015-09-26 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm excited to announce the September 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the September 2015 release is available from . This Rakudo Star release comes

Re: Constants as members of a class

2015-12-18 Thread Moritz Lenz
Hi, On 12/18/2015 03:46 AM, TS xx wrote: > Hello dear perl6 users, > > I was in the need of declaring a member variable as a constant integer. I don't understand this. If it's a constant, why does it need to be member at all? A member is per-instance storage, which seems to be a waste for a

Re: Gather/take & return, PHP7-style

2015-12-10 Thread Moritz Lenz
On 12/09/2015 07:35 PM, yary wrote: This feature builds upon the generator functionality introduced into PHP 5.5. It enables for a return statement to be used within a generator to enable for a final expression to be returned (return by reference is not allowed). This value can be fetched using

Re: Jonathan's "Perl 6 Introductory course"

2015-12-31 Thread Moritz Lenz
On 12/31/2015 04:26 PM, Sitaram Chamarty wrote: > On 31/12/15 20:43, Tom Browder wrote: >> Jonathan's intro course, in pdf, here: >> >> https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf >> >> is excellent, of course. But I really like the presentation theme and >> the

Announce: Rakudo Star Release 2015.11

2015-11-28 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the November 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the November 2015 release is available from . This Rakudo Star release comes with

Re: signature to preserve @*ARGFILES ?

2015-11-28 Thread Moritz Lenz
Hi, On 11/28/2015 05:49 PM, Marc Chantreux wrote: > hello, > > i would like to write a better version of the unix `column` with some > options like 'preserve separator' so i started to write it down. > > sub padded-cols ($sep,@sheet) { > my $fmt = > join $sep, >

Re: Confused about rakudobrew and Rakudo Star

2016-02-04 Thread Moritz Lenz
On 02/04/2016 01:26 PM, James E Keenan wrote: On 02/03/2016 10:48 PM, Brandon Allbery wrote: On Wed, Feb 3, 2016 at 10:30 PM, James E Keenan wrote: I am evidently confused as to the relationship, if any, between the 'rakudobrew' utility and the Rakudo::Star distribution.

Re: Confused about rakudobrew and Rakudo Star

2016-02-04 Thread Moritz Lenz
Hi, On 02/04/2016 01:44 PM, Brock Wilcox wrote: If my understanding is correct (might not be), the tarball should be ALMOST equivalent to: rakudobrew build moar 2016.01.1 # Install rakudo 2016.01.1 rakudobrew global 2016.01.1 # Make this the default rakudobrew build

  1   2   >