Re: Fwd: Working with a regex using positional captures stored in a variableperl6-us...@perl.org

2021-03-11 Thread Moritz Lenz
Hi there, On 11.03.21 17:43, William Michels wrote: > Hi Moritz your book is mentioned below. Care to chime in? Reply to > perl6-users . > > Thx, Bill. > W. Michels, Ph.D. > > -- Forwarded message - > From: Joseph Brenner > Date: Thu, Mar 11,

[perl #125555] [NYI] Comparison ops for DateTimes in Rakudo

2018-02-05 Thread Moritz Lenz via RT
Tests added in https://github.com/perl6/roast/commit/ff0472adfc

Re: Where is "Subject"?

2017-02-23 Thread Moritz Lenz
contains both the headers and the body ($email in the README), and the subject is part of the headers. The only reason that $from and @to have a separate interface is that SMTP handles them separately. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: per 5 converter?

2017-02-12 Thread Moritz Lenz
ry to stay away from it. Cheers, Moritz On 12.02.2017 07:47, ToddAndMargo wrote: > Hi All, > > I know I asked this once before and I had though I'd written it > down, but do you have any favorite Perl5 to Per6 converters? > > Many thanks, > -T > -- Morit

Re: [perl #130638] [LTA] X::Seq don't say which Seq the exception occurred on

2017-01-25 Thread Moritz Lenz
> >> Cheers, >> Mority >> >> > > I don't want the values of the Seq, I want the name of the variable. Trying to find the name of a variable (if there is one at all) from the object is inherently brittle, and has lead to many false positives in the past (like reporting the name of a parameter from a routine in CORE somewhere). -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: mocking $*OUT

2017-01-24 Thread Moritz Lenz
y > the code above doesn't work. Any ideas? Because say() is a high-level function that uses the lower-level $*OUT.print under the hood. >From rakudo's src/core/io_operators.pm: multi sub say(Str:D \x) { my $out := $*OUT; $out.print(nqp::concat(nqp::unbox_s(x),$out.nl-out)); }

Re: A stricter typed variable

2017-01-07 Thread Moritz Lenz
onstraint, ask yourself: could there be an object from another type that my could would also work with? Maybe I'm just calling a method that's implemented in type Str, but a user-supplied object could implement the same method as well. If it walks like a duck, and quacks like a duck, d

Re: A stricter typed variable

2017-01-07 Thread Moritz Lenz
= 'gzip', 'uuencode'; or even test format => 'gnutar', filter => my Str @ = ; My general advise is to not exaggerate the usage of container types. Think of Perl 6 as a dynamically typed language, and only add types where they make life easier for everybody involved. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

[perl #130396] [BUG] =:= operation aginst item contextualized object returns incorrect result

2016-12-23 Thread Moritz Lenz via RT
This is not a bug. $b is a container that contains the array @a, so @a !=:= $b. : An easy test is assigning to $b, and see if it's reflected in @a: $ perl6 -e 'my @a = 1,2; my $b = @a.item; $b = 42; say @a' [1 2]

Re: [perl #130371] [REGRESSION] return in block does not return from sub that is parameterised with that block

2016-12-18 Thread Moritz Lenz
pretty sure that's not a bug; &return is supposed to be tied to the lexically outer Routine, and in this example, there is no lexically outer Routine, so the error message is valid. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Need some help to understand how modify an AST.

2016-12-05 Thread Moritz Lenz
e for the toto environment > variable. > > > > _Program2:_ > > __cat test052.pl6 > > grammar TEST { > rule TOP { :i \s*} > token varenv {'$' } > token mot { <[a..z A..Z 0..9 =\-_!~'():@&+$,\']>+ } > } > > class

Re: What is rakudo-star?

2016-11-18 Thread Moritz Lenz
On 19.11.2016 03:14, _ ifdog wrote: > So why there is not a star release of 2016.10 for windows ? Because nobody one yet. I'm happy to upload it for you if you provide it. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Where to start?

2016-11-18 Thread Moritz Lenz
rogram in Linux. #!/usr/bin/env /path/to/your/rakudo/inst/bin/perl6 use v6; > Also, do I need to run perl6 through a compiler or > does it compile on the fly like perl 5? There's no separate compilation step. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: What's involved in the creation of a new Rakudo * version?

2016-10-16 Thread Moritz Lenz
e is: https://github.com/rakudo/star/blob/master/tools/star/release-guide.pod Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: think I found a bug in the doc's

2016-10-04 Thread Moritz Lenz
$mod)returns Int:D it needs > three parameters Yes, that's right. If you tell me your github username, I can give you access so that you can change it directly on https://github.com/perl6/doc/. Otherwise a pull request would be very welcome. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: What are variables/parameters that start with a pipe | char

2016-10-01 Thread Moritz Lenz
ot;| (parameter)", which points to relevant documentation. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Sorting Multidimentional Arrays

2016-10-01 Thread Moritz Lenz
For the record, you can simplify this a bit: @opposite = @opposite.sort(*[3]); > for @opposite -> $line { say $line; } > --- > > I have adapted this from: > http://www.wellho.net/resources/ex.php?item=p600/mapper > > I wanted to ask about the syntax, buy I have understood

Re: unicode

2016-09-17 Thread Moritz Lenz
.0 docs/ChangeLog in MoarVM says + Updated to Unicode 8 in the section of the 2015.07 release, so it's not that bad :-) Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: grammars and indentation of input

2016-09-13 Thread Moritz Lenz
t that has gone into it. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Inline::Python panda installation fails

2016-07-13 Thread Moritz Lenz
ork/1468400277_1/resources/libraries/libpyhelper.so -fPIC -g pyhelper.c:1:20: fatal error: Python.h: No such file or directory It seems you do need a Python.h, so a libpython-dev of python-devel or so package that includes the header files. Cheers, Moritz

Re: [perl #128428] [BUG] Behaviour of div / mod on Non-Ints

2016-06-20 Thread Moritz Lenz
;s Int mod Rat, so it explicitly falls into this category: : Not coercive, so fails on differing types. So I don't see the bug yet. Cheers, Moritz -quote from spec-- === infix:, integer division $numerator div $denominator Dispatche

Re: NativeCall interface for a char ** argument

2016-05-27 Thread Moritz Lenz
use CArray[Str] for the parameters, see for example https://github.com/perl6/DBIish/blob/master/lib/DBDish/Pg/Native.pm6#L83-92 Cheers, Moritz

Re: How to capture an div 0 exception

2016-05-18 Thread Moritz Lenz
.WHAT.say; when X::Numeric::DivideByZero { $r = 65; .resume; } default { $r = 55; .resume; } If you want to only catch exceptions of type X::Numeric::DivideByZero, don't supply a default block. Cheers, Moritz

Re: Fwd: perl6 INC

2016-05-11 Thread Moritz Lenz
ust a temporary hack until a mature solution is hammered out. We'd love it to be temporary, but until all target platforms (Linux, Mac OS X, Windows) can offer fully Unicode-capable, case sensitive file systems, we *have* make our own workarounds. Cheers, Moritz

Re: Unwanted failure and FAILGOAL

2016-05-11 Thread Moritz Lenz
rently: rule statement { [ '=' || { self.panic($/, "Invalid declaration.") ] } And maybe also TOP: rule TOP{ ^ [ || . { self.panic($/, "Expected a statement") } ] $ }; That extra dot before the panic ensures it's not called at the end of the string. If you don't want that, you could also do [ || $ || { self.panic(...) } ] Cheers, Moritz

Re: Work around to "unwanted fail"

2016-05-11 Thread Moritz Lenz
paths "at the same time" (no extra threading involved, just notionally). You really want to use || instead, which is "first try the first path, and if it doesn't work, try the second path". Cheers, Moritz

Re: DBIish: Why can't I interpolate variable holding database name?

2016-05-01 Thread Moritz Lenz
x27;, :$database); (and it's a feature I miss surprisingly often when back in perl 5 or python land). Cheers, Moritz

Re: question about Supply.act()

2016-04-28 Thread Moritz Lenz
might still be running and do other things. Cheers, Moritz

Re: Perl 6 pod-handling code seems widely scattered

2016-04-27 Thread Moritz Lenz
on for that chunk? Yes, that's the module that turns Pod AST into HTML. That's what you're looking for :) It's a document tree, not really an AST. The AST is an intermediate format inside the compiler that user-space modules don't see. Cheers, Moritz :-)

Re: [perl #127890] [IMPROVEMENT PROPOSAL] Test.pm6 make subtest multi to take description first

2016-04-13 Thread Moritz Lenz
arguments is always a string or String-alike (probably Cool), and the other is always Callable, there shouldn't be any ambiguous cases. All in all I approve of this idea though. Cheers, Moritz

Re: [perl #127878] UTF8-C8 + Str.subst either dumps core or corrupt memory

2016-04-12 Thread Moritz Lenz
On 11.04.2016 17:00, Moritz Lenz wrote: > On 04/11/2016 03:04 PM, Nicholas Clark wrote: >> On Mon, Apr 11, 2016 at 04:39:59AM -0700, H. Merijn Brand wrote: >> >>> In a one-liner: >>> >>> $ p6 -e'my$b=Buf.new(61,^2048 .map({256.rand.Int}));my Str

Re: [perl #127878] UTF8-C8 + Str.subst either dumps core or corrupt memory

2016-04-11 Thread Moritz Lenz
rings. that one liner changes from ASAN barfage to no output. (which means that the SEGV is fixed). That means it's now "tests needed" ? It is. I'd also be grateful if somebody could provide a deterministic string of numbers that made Rakudo segfault, because I hate having fuzzy/random tests in the test suite. Cheers, Moritz

[perl #66820] Null PMC access in find_method() while accessing bound return value from gather/take

2016-03-12 Thread Moritz Lenz via RT
On Sun Jun 21 11:24:57 2009, moritz wrote: > $ perl6 -e 'my @a := gather { for 1..3 { take $_; say @a.perl } }; say > @a.perl' > Null PMC access in find_method() > in Main (:1) Current behavior: Type check failed in binding; expected Positional but got Seq (?) If

Re: Confused about rakudobrew and Rakudo Star

2016-02-08 Thread Moritz Lenz
ldn't specify a Rakudo by version. Which means Rakudo releases are still quite relevant. Cheers, Moritz

Re: Installing both from rakudobrew and Rakudo Star

2016-02-05 Thread Moritz Lenz
o that. Cheers, Moritz

Re: Confused about rakudobrew and Rakudo Star

2016-02-04 Thread Moritz Lenz
le to do something like "panda install Task::Star=2016.01" and get the exact same thing. I see Moritz replied to this also saying that the tarball is the way to go. I'd love to know what I'm missing out on by doing it this way. Exactly what you speculated above. The correct

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. In short: rakudo

Re: Rationale for $!

2016-01-28 Thread Moritz Lenz
Hi, On 01/28/2016 04:06 PM, Todd C. Olson wrote: > Is there a way to make the exception be thrown eagerly, at the devision > statement rather than waiting until use, at the say statement? Yes, 'use fatal;' Cheers, Moritz

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 04:32 PM, Felipe Gasper wrote: On 27 Jan 2016 10:15 AM, Moritz Lenz wrote: On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex) Interesting. JavaScript programmers that I’ve known bemoan that their

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex)

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
lobal. Cheers, Moritz

Re: Is there another way to define a regex?

2016-01-17 Thread Moritz Lenz
it actually contains a Str, it is always taken to match literally, so my $dir1 = '/home/user/.cpan'; my $dir2 = '/home/tbowde/.emacs'; my regex ignore_dirs { $dir1 | $dir2 } does what you want. If you want the interpolated string to be treated as a regex, you have to use it as my regex dirs { <$dir1> }. Cheers, Moritz

Re: [perl #127263] Cannot pass a Method object to .^can

2016-01-14 Thread Moritz Lenz
me, you get weird behavior? Please also read the disclaimers at https://doc.perl6.org/language/mop#Power%2C_Convenience_and_Pitfalls Cheers, Moritz

Re: Jonathan's "Perl 6 Introductory course"

2015-12-31 Thread Moritz Lenz
ert from >> the generated html to pdf but can't say for sure yet, but it is the >> good looks of his slides that I'm primarily interested in. > > Looks like Beamer (latex+beamer). The meta data of the PDF agrees, it says "LaTeX with Beamer class version 3.10" in the "creator" field. Cheers, Moritz

Re: Constants as members of a class

2015-12-18 Thread Moritz Lenz
to be a waste for a constant. Just do class MyClass { method TheConstant { 42 } } Then you can use it both on the class: say MyClass.TheConstant or on an instance: say MyClass.new.TheConstant Cheers, Moritz

Re: Gather/take & return, PHP7-style

2015-12-10 Thread Moritz Lenz
s with the list. Cheers, Moritz

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 s

Re: &MAIN signature to preserve @*ARGFILES ?

2015-11-28 Thread Moritz Lenz
ing. Since $*ARGFILES (the thing behind lines() for example) uses @*ARGS to determine what files to open, you can say sub MAIN(*@*ARGS, Bool :$mean) { ... } Cheers, Moritz

Re: [perl #126664] .roll on a Range of Num ain't random

2015-11-27 Thread Moritz Lenz
them -- which isn't traditionally perl's approach. Cheers, Moritz

Re: confused about 'try'

2015-11-24 Thread Moritz Lenz
exceptions fall through } 2) When you want to access some variables from the inner scope that produced the exception. Since CATCH runs before the stack is unwound, you can even inspect dynamic variables. Cheers, Moritz

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 i

Re: combine hashes

2015-11-06 Thread Moritz Lenz
is point you have lost the keys, and .kv helpfully supplies the integer indexes of the list as keys. What you really want is %x< login first >:p This works for me: my %x = < login jdoe first john last doe >; my %y = flat (:enable, %x< login first >:p); say %y.perl;# {:enable, :first("john"), :login("jdoe")} Cheers, Moritz

Re: Ecosystem problems

2015-11-02 Thread Moritz Lenz
, one open github issues, since all modules are also gibhut repos, and msot have issues enabled. > or for the ecosystem maintainer to remove them? You open a pull request that removes them from the META.list in perl6/ecosystem. Cheers, Moritz

Re: Missing documentation

2015-10-29 Thread Moritz Lenz
On 10/29/2015 09:14 AM, Steve Mynott wrote: > I renamed it to 5to6-nutshell.html. ... and I created a redirect from 5to6 to 5to6-nutshell: https://github.com/perl6/doc/commit/df1b189dec Cheers, Moritz

Re: How to call a super class method?

2015-10-28 Thread Moritz Lenz
rg is meant for users; this has consequences on the number of examples, language, information density etc.) Cheers, Moritz

Re: How to profile Perl 6 applications?

2015-10-24 Thread Moritz Lenz
Hi, On 10/24/2015 09:52 AM, Timo Paulssen wrote: > On 24/10/15 09:40, Moritz Lenz wrote: >> Hi Gabor, >> >> On 10/24/2015 09:26 AM, Gabor Szabo wrote: >>> The Devel::NYTProf helped me a lot locating the source of slowness on >>> the Perl Maven site. >>

Re: Forking or running external process in background

2015-10-24 Thread Moritz Lenz
uot;, :out); There's a shell() function that might be closer to what you want, if you don't want to pass each argument separately. There's also Proc::Async: http://doc.perl6.org/type/Proc::Async But to me, it also looks like a perfect use case for threads. Have you tried that? Cheers, Moritz

Re: How to profile Perl 6 applications?

2015-10-24 Thread Moritz Lenz
line option, which generates a HTML file containing a single-page JS app that presents the profiling data. But you should take care to only profile short program executions that way (a few seconds at most), otherwise the result will be unusable in the browser. Cheers, Moritz

Re: Backwards compatibility and release 1.0

2015-10-15 Thread Moritz Lenz
On 10/15/2015 10:47 AM, Smylers wrote: Moritz Lenz writes: On 10/13/2015 10:52 AM, Richard Hainsworth wrote: Following on the :D not :D thread, something odd stuck out. On 10/13/2015 03:17 PM, Moritz Lenz wrote: We have 390+ modules, and hand-waving away all trouble of maintaining them

Re: Backwards compatibility and release 1.0

2015-10-14 Thread Moritz Lenz
On 10/13/2015 10:52 AM, Richard Hainsworth wrote: Following on the :D not :D thread, something odd stuck out. On 10/13/2015 03:17 PM, Moritz Lenz wrote: But hopefully none of them breaking backwards compatibility on such a large scale. The last few backwards incompatible changes still cause

Re: To :D or not to :D

2015-10-13 Thread Moritz Lenz
On 10/12/2015 09:51 PM, Mark Overmeer wrote: * Moritz Lenz (mor...@faui2k3.org) [151012 15:32]: . are they using :D correctly? Yes, though not everybody uses :D as much as they do. Do you check that all the parameters that your Perl 5 methods/subs receive are defined? If not, you

Re: To :D or not to :D

2015-10-12 Thread Moritz Lenz
more, which is a really neat thing to have. > . :D looks really ugly, don't you think? Try to explain to students > to add this smiley everywhere. It's not uglier than a 'die "Must be defined" unless defined $x' Cheers, Moritz

Re: [perl #126208] [BUG] Many threads results in data corruption

2015-09-28 Thread Moritz Lenz
On 09/27/2015 11:58 PM, Benjamin Goldberg (via RT) wrote: # New Ticket Created by Benjamin Goldberg # Please include the string: [perl #126208] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126208 > The code at https://gist.

Re: Misunderstanding when usng elems on undefined Array

2015-09-28 Thread Moritz Lenz
urns 1. if .push wouldn't autovivify a defined array, thinks like my %h; %h.push: $new_value; couldn't work. But the real advise is it use @-sigiled variables when dealing with arrays; they don't exhibit such interesting corner cases. Cheers, Moritz

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 wi

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
se rakudobug it so that it doesn’t fall through the cracks? > This change did not fire any spectest alarm either, so maybe we need a test > for it as well :-) I've opened https://rt.perl.org/Ticket/Display.html?id=126096 and later rejcted it when learning about the desired behavior. Cheers, Moritz

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
re than one list item from a .map call, for example. Cheers, Moritz

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
old that the proper way to require a module name (and not a file name) is require ::($name); which does work in 2015.09. I guess there's no deprecation, because it was only an accident that the string form worked before. Cheers, Moritz

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

2015-09-26 Thread Moritz Lenz
# 2 > say @c[0]; # x => 6 I would have expected the traiing comma to help here too: my @b; @b.push: %h, ; say @b.perl;# [:a(1), :b(2)] but alas, not. I wonder if this is a bug. This works: my @b; @b.push: $%h; say @b.perl;# [{:a(1), :b(2)},] Cheers, Moritz

perl6-all@perl.org

2015-09-20 Thread Moritz Lenz
On 09/20/2015 09:55 AM, Tobias Leich (via RT) wrote: > # New Ticket Created by Tobias Leich > # Please include the string: [perl #126113] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=126113 > > > > t/spec/S02-names/pseud

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

2015-08-26 Thread Moritz Lenz
Perl 5 are still stuck in the past, with no good way forward. Cheers, Moritz

Re: [perl #125745] Custom infix:<~~> multi not used by rakudo

2015-08-03 Thread Moritz Lenz
se of login problems; I hope I'll be able to do so later). Cheers, Moritz

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 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: Is < > creating and Array or Parcel ?

2015-07-31 Thread Moritz Lenz
r %. It just wraps things into a Scalar, which is normally invisible. But, you can observe the difference still> my @a = ; my $s = @a' for @a { } # two iterations for $s { } # one iteration Cheers, Moritz

Announce: Rakudo Star Release 2015.07

2015-07-27 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 July 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the July 2015 release is available from

Re: perl6/book fonts: why Adobe commercial fonts?

2015-07-22 Thread Moritz Lenz
some parts. (There are plenty of free and handsome fonts to be had.) Some other questions: 1. Are there plans for a table of contents? 2. Are there plans for page numbering? No and no. perl6/book is a dead project, only good for salvaging pieces of it for perl6/doc. Cheers, Moritz

Re: Passing a hash to a subroutine: best method?

2015-07-03 Thread Moritz Lenz
ch element is an Int. This interpretation (which is explicitly not what the design docs state right now, nor what rakudo implements) would also make sense with slurpies (Int *@a) and/or coercion types (Int() *@a). Unfortunately, I have no idea how that could be realized, since binding to a parameter binds the caller's object unchanged, pretty much by definition. yours ranting, Moritz

Re: Sub args: choose one of two?

2015-06-28 Thread Moritz Lenz
sage: ./door open ./door close $ ./door open Opening door Cheers, Moritz

Re: Problem documentation and/or compiler

2015-06-18 Thread Moritz Lenz
github.com/perl6/doc/commit/ec673618159fc85249c105d76f4157bf76880759 The right place to report errors to the docs is https://github.com/perl6/doc/issues/ Cheers, Moritz

Re: New Logo Design for perl6 modules

2015-06-10 Thread Moritz Lenz
elation to Perl is a trademark by O'Reilly. Cheers, Moritz

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

2015-05-30 Thread Moritz Lenz
.org/build-log/ building the docs alone takes ~17min; the cron job runs every 5 minutes, so it's more likely 17-22min before it becomes available :-) And thanks for adding $*PROGRAM to the docs! Cheers, Moritz

Re: [perl #125211] Error "Function X::Panda needs parens to avoid gobbling block" when running panda on JVM, but not on Moar

2015-05-18 Thread Moritz Lenz
On 05/18/2015 04:07 AM, Rob Hoelz (via RT) wrote: # New Ticket Created by Rob Hoelz # Please include the string: [perl #125211] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125211 > The full error message: ===SORRY!=== Fu

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

Re: [perl #125153] Pod nesting needs some clarity

2015-05-11 Thread Moritz Lenz
On 05/11/2015 02:47 PM, (via RT) wrote: # New Ticket Created by # Please include the string: [perl #125153] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125153 > It's not clear which =begin is not terminated here, based on

Re: class/object variables

2015-04-23 Thread Moritz Lenz
e only attributes in a class and use our variables to share between objects? If you want per-object local storage, use attributes, yes. Cheers, Moritz

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

2015-03-28 Thread Moritz Lenz
rs, not for user errors; and programmers should be able to understand the error message (or we need to improve the error messages, if that's not the case). Also it makes it harder for others to extend your API by providing additional multi candidates. Cheers, Moritz -BEGIN PGP

Re: Example module and its use

2015-03-28 Thread Moritz Lenz
ls, because the parens of the subroutine call disambiguate subs from constants, types and other sigilless terms, but I'm pretty sure we can't get away with this imprecision. And if I remember correctly, that error in S11 confused me enough not to implement 'use Module ' correctly w

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

2015-03-26 Thread Moritz Lenz
but it is rather questionable use of the MOP. Cheers, Moritz

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

2015-03-25 Thread Moritz Lenz
refer to the attributes in a method? The > above doesn't work (with or without the '()'). the indirect method call syntax is the right approach, you just got too many other details wrong to make it work. Cheers, Moritz

Re: rakudo Test module: expanding tests considered?

2015-03-24 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24.03.2015 13:51, Nicholas Clark wrote: > On Tue, Mar 24, 2015 at 09:44:19AM +0100, Moritz Lenz wrote: > >> I'd suggest developing those test functions in a separate module, >> and after gathering some experience wi

Re: rakudo Test module: expanding tests considered?

2015-03-24 Thread Moritz Lenz
y tolerances as > 'delta_ok' does. The ability to specify tolerances would be useful > for the core 'is_approx' function. I'd suggest developing those test functions in a separate module, and after gathering some experience with it, when can discuss putting them into rakudo's Test.pm. Cheers, Moritz

Re: Object Introspection for Existence of Methods: How?

2015-03-23 Thread Moritz Lenz
why tests need introspection at all. I mean, you test by doing example calls and comparing to expected example return values. (If those are generated methods, IMHO there is no point in testing all generated instances). Cheers, Moritz

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: Need help with: Cannot find method 'postcircumfix:<( )>'...

2015-03-20 Thread Moritz Lenz
rt for $(self.elem); if you want direct access to the variable you'd write $!elem. Also, an "indirect method call" would be self."$elem", small correction: self."$elem"(). self."$elem" is an error, which is useful to catch p5 programmers who use . for string concatenation. Cheers, Moritz

Re: Passing arrays to subroutines

2015-03-19 Thread Moritz Lenz
@a, @b; 2. Can I flatten the arrays into elements inside the foo call? foo(|@combined) Cheers, Moritz

Re: [perl #124108] [BUG] reduce meta-operator fails with 'max' on list larger than 2**15 with MoarVM

2015-03-19 Thread Moritz Lenz
7316==by 0x401250: main (main.c:189) Is this something to do with P6Int having alternative storage representations? sounds more like the number of arguments is a signed 16 bit int somewhere, and overflows for calls with >= 2**15 arguments (which a long list flattened into an argument list can cause). Cheers, Moritz

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

2015-03-19 Thread Moritz Lenz
e 'x'. See also http://doc.perl6.org/language/objects#Attributes So, you can have an attribute $!x and a method x, but if you write class A { has $.x; method x() {... } } then the method will prevent the automatic accessor from being generated. Cheers, Moritz

Re: Object Contruction

2015-03-18 Thread Moritz Lenz
ing one is BUILDALL with a callsame; see the last example (or example skeleton) in that section. Cheers, Moritz

Re: Perl 6 Debugging

2015-03-14 Thread Moritz Lenz
ment. When I run your code with perl6-m (Rakudo with the MoarVM backend), I get ===SORRY!=== Error while compiling /home/moritz/Ellipsoid.pm6 Variable '$class' is not declared at /home/moritz/Ellipsoid.pm6:154 --> my( $class⏏, %args ) = @_; expecting any of: postf

  1   2   3   4   5   6   7   8   9   10   >