L.s.,
I found a small problem when writing a piece of grammar. A simplified
part of it is shown here;
...
token tag-body { ~ }
token body-start { '[' }
token body-end { ']' }
token body-text { .*? }
...
I needed to do something on body-end so I wrote a method for it using an
actions c
L.s.
The following piece of code shows that one must be careful using my or
state variables in a class. They have the same behavior as an our
variable if I am right. Are they all kind of global to the class/object?
---
class A {
my $a;
has $.a;
our $p;
state $q;
method set ($b) {
L.s.
The following piece of code shows that one must be careful using my or
state variables in a class. They have the same behavior as an our
variable if I am right. Are they all kind of global to the class/object?
---
class A {
my $a;
has $.a;
our $p;
state $q;
method set ($b) {
Ls,
Following piece of code gets an error when calling $b.get-t0.
---
#!/usr/bin/env perl6
#
use v6;
role A {
has $!t0;
method get-t0 ( ) {
return self!get-t0-helper;
}
method !get-t0-helper ( ) {
my $t0 = $!t0 // 'T0';
}
}
class B does A { }
my $a = A.new;
say "A: ", $a.g
L.s.
Reading though synopsis S17 concurrency I tried the following
$*SCHEDULER.cue: in=>10, { say "10s later" }
which will deliver the string after 10 seconds. However the moar will
work like hell at a 100% cpu time before and afterwards! Removing the
option 'in' didn't show this problem.
A
ls,
Found another problem in the new rakudo (understood that was from 4/8).
Version: 'This is perl6 version 2015.05-139-g2281689 built on MoarVM
version 2015.05-49-g07fbd62'
It seems that perl6 doesn't understand the environment variable PERL6LIB
anymore.
Example (in tcsh shell);
$ setenv
ls,
Also seems to go wrong for RAKUDOLIB
Example (in tcsh shell);
$ setenv RAKUDOLIB ".:lib:/home/marcel/Software/lib/perl6/lib"
$ setenv PERL6LIB ".:lib:/home/marcel/Software/lib/perl6/lib"
$ perl6 some-program.pl6
some-program.pl6 .. ===SORRY!===
Could not find Semi-xml in any of:
file#.:lib
On 06/08/2015 09:24 PM, Tobias Leich wrote:
say $*DISTRO.cur-sep
Hi Tobias,
It returns a comma.
I've used this in the path and processing is now ok. I was stuck with
panda unable to do anything. As a workaround I can continue now.
Hopefully this separator will be set back to ':' again.
G
l.s.
Running newest panda code on newest perl6 (This is perl6 version
2015.05-139-g2281689 built on MoarVM version 2015.05-49-g07fbd62).
$ panda list
...
Method for (from Any) seen at:
/home/marcel/Software/Pack
l.s.
Installing the BSON module gives the following fault when it runs the
tests. It fails in t/700-encodable.t as shown below
$ panda install BSON
...
t/100-double.t . ok
t/101-binary.t . ok
t/102-int.t ok
t/500-native.t . ok
t/600-extended.t ... ok
===SORRY!===
Merging G
l.s.
Can't push/unshift onto an array of pairs!
Below a repl session with pushes
my @p = a => 1, b => 2;
a => 1 b => 2
@p.push(x=>1);
a => 1 b => 2
my Pair @p = a => 1, b => 2;
a => 1 b => 2
@p.push(x=>1);
a => 1 b => 2
my Array $p = [ a => 1, b => 2];
a => 1 b => 2
$p.push(x=>1);
l6 and we would
have known that there was a typo or in the case below a wrong argument
to the push method. Something like 'named attribute x not recognized'.
Greets,
Marcel
On Sat, Jun 13, 2015 at 12:25 PM, mt1957 <mailto:mt1...@gmail.com>> wrote:
Can't push/unshi
l.s.
I am having a problem installing my BSON package with panda locally. It
fails when it compiles the files to moarvm using perl6 version
2015.05-186-g15c6fbf built on MoarVM version 2015.05-74-gc14339c.
$ panda install .
==> Installing BSON from a local directory '.'
==> Fetching BSON
==>
Hi,
I there a way to prevent some type of mistake I now have made several
times merely because the error messages are not helping me to point to
the problem.
Example;
grammar Turtle::Grammar {
rule TOP { * }
...
rule directive { | }
...
rule base {
'@base'*
Hi,
I can not do the following;
my Buf $b = 'abc'.encode;
Type check failed in assignment to '$b'; expected 'Buf' but got 'utf8'
But I can do this;
my Buf $b = 'abc'.encode ~ Buf.new();
Buf:0x<61 62 63>
Does the concatenation convert utf8 into Buf? Will there be a problem
when it is converted
I was wondering if the long name of sub/method/submethod also includes
the named arguments to differentiate between multi's. I had problems
using multi on BUILD submethods which only accept named arguments. The
dispather (also with other named methods) always takes the first method
of the mult
Hi,
noticed that grep doesn't accept a Match operation anymore
In repl ...
> grep { /\.pl6/ },
Method 'match' not found for invocant of class 'Any'
Must now do explicitly match on the topic variable
> grep { $_ ~~ /\.pl6/ },
(a.pl6)
Is this change correct?
perl6 version 2015.09-206-g8a195
ri, Oct 2, 2015 at 5:12 PM mt1957 <mailto:mt1...@gmail.com>> wrote:
Hi,
noticed that grep doesn't accept a Match operation anymore
In repl ...
> grep { /\.pl6/ },
Method 'match' not found for invocant of class 'Any'
Must now do
Hi,
According to synopsis 12 I could defer methods to methods in another object.
The case in which one can map some name into another didn't work out.
*
**
**class A {**
** method say-i (Int $i ) { say "I: $i"; }**
**}**
**
**class B {**
** has A $.n handles { :x };**
**
** submethod BUILD { $
L.s.
I'am a bit confused about the use of ':' in an identifier. I've read a
bit about the ':' twigil but that seems to be used at the front of the
id giving it a special use. Under 'identifiers' on the syntax page I
couldn't find any about it. So I am referring to things like $abc:def
and the
Hi Tobias,
$foo:bar and Foo:bar are variable/package names with an colonpair
appended. The entire thing is then called a longname, at least
internally.
Test:ver(v1) makes it clearer what it does. You $abc:def example boils
down to $abd:def(True) btw.
Thanks for your answer. I now found someth
L.s.
I've seen that the order of input to a Capture is not kept. Is this a bug?
REPL interaction;
> my Capture $c = \(a=>1,10,{w=>2},[2,3],(e=>2),(b=>3,),Buf.new(^3))
\(10, {:w(2)}, [2, 3], :e(2), (:b(3),), Buf.new(0, 1, 2), :a(1))
> for $c.list -> $item { $item.WHAT.say;}
(Int)
(Hash)
(Array)
Thanks for the information I didn't know about this detail.
What about the order of input, when a call is made and a Capture created
the order is preserved
otherwise the arguments would be bound to the wrong values isn't it? But
the example shows otherwise.
On 01/11/2016 06:58 PM, mt1957 wrote:
Thanks for the information I didn't know about this detail.
What about the order of input, when a call is made and a Capture
created the order is preserved
otherwise the arguments would be bound to the wrong values isn't it?
But the exa
L.s.
I have written my documentation in separate pod files. How do I mention
this in the META.info file and
where will panda install the documentation
Greetings
Marcel
L.s.
I got the following error
'Tried to read() on a socket from outside its originating thread'
This socket is created while in another thread using Promise and the
object is retrieved using
$promise.result. The weird thing is also that just a few lines before
that the same socket is used fo
is Rakudo version 2015.12-201-g2a8ca94 built on MoarVM
version 2015.12-29-g8079ca5
implementing Perl 6.c.
Can you post the code that causes the issue?
On Wed, Jan 13, 2016 at 4:00 AM, mt1957 wrote:
L.s.
I got the following error
'Tried to read() on a socket from outside its originatin
Op 10-03-16 om 20:14 schreef yary:
There's "require" to load a module at runtime
http://docs.perl6.org/syntax/require
The $*REPO object controls how to search for modules,
http://docs.perl6.org/language/5to6-perlvar mentions it. I don't know
much more than that,
Thanks for your answer,
I've p
Hi Timo,
Thanks for the code snippets, I can use that too. There is already some
code to test endianness
see mail from David Warring at my question about Union. Date April 4 2016.
Greetings,
Marcel
On 19/04/16 16:25, Elizabeth Mattijsen wrote:
> I’ve been looking at nativecast, but haven’t
On 19-04-16 10:21, Elizabeth Mattijsen wrote:
FWIW, I’ll take PR’s for the PackUnpack distribution to make ‘f’ and ‘d’ work
:-)
Hi Elizabeth,
For the PackUnpack distro this might come in handy... or might go in the
examples corner?
Done some experiments and looks well. Please check the a
Hi,
The documentation about the method act explains that 'the given code is
guaranteed to be only executed by one thread at a time'.
Can I assume from this that any other thread including the main thread
isn't running? I want to know if I need to guard the data with
semaphores I am changing
Hi Tom,
Pod::To::PDF
==
Nice to have. It could use something like p6pod2latex as an
intermediate filter and then use popular LaTeX tools to generate the PDF.
At the moment I am writing pod6 in separate files with the following at
the top of such a file. It needs wkhtmltopdf for this t
On 18-05-16 13:07, Richard Hainsworth wrote:
use v6;
my $d = 1;
my $e = 2;
my $f = 0;
#my $r;
my $r = 5;
CATCH {
# when X::AdHoc {
when Exception {
.Str.say;
# $r = 5;
.resume
} }
$r = try {
( $d + $e ) / $f;
};
# my $r = try EVAL ' ( 1 + 2 ) /0 ';
say "r is $r";
Hi Ric
Hi Richard,
This has something to do with lazy evaluation. It triggers the
calculation when it wants to show the value in $r. So commenting out the
first 'say' will error on the second with the shown response. The CATCH
is not at the same scope than the second 'say' statement so there you
get
Hi,
I am running tests with a lot of threads. I've seen that when I push it
to about 200 threads, it can get into trouble when the task of the
thread is large enough. Now, looking at some system monitor(atop on
linux), I can see that the user time of 3 or 4 processors(of 8) soared
up to 100%
Hi everyone,
I am trying to create a subset but get errors when used. Surely I do
something wrong here or is it a bug?
In REPL
> my Map $p .= new(.kv.reverse);
Map.new((:aa(4),:bb(5),:d(0),:f(1),:ff(6),:g(2),:h(3)))
> subset pv of Str where $_ (elem) $p;
(pv)
> my pv $x = 'aa';
Type check fai
.
It works fine if the three statements are on the same line and if the
program is being read from a file, so I guess it's bug of the REPL.
On Fri, Sep 16, 2016 at 1:49 PM, mt1957 <mailto:mt1...@gmail.com>> wrote:
Hi everyone,
I am trying to create a subset but get er
The files are PRECIS.pm6 and 100-precis.t in the attachment
The Map definitions is at 13 and subset on line 20 of file PRECIS.pm6.
Use is at method exceptions at line 172 in the same file.
The error is generated on line 85 in 100-precis.t
> prove -e perl6 -v t/100-precis.t
t/100-precis.t ..
Hi everyone,
I wanted to share something here of my newest experience about testing
on appveyor. I had pinched a configuration file for an appveyor test,
because it was new for me and I am not experienced on windows. It worked
for several of my modules so I was happy until I ran into a problem
Hi,
I've made a small test program to run a particular test file in an
infinite loop until it fails. I was investigating some race problem in
BSON and the test run was successful most of the time. I got some raw
fingers to repeat the commands so this is the result, simple and maybe
useful for
On 11/07/2016 04:05 AM, Mike South wrote:
On Sat, Nov 5, 2016 at 1:10 PM, mt1957 <mailto:mt1...@gmail.com>> wrote:
Hi,
I've made a small test program to run a particular test file in an
infinite loop until it fails. I was investigating some race
problem in BSO
Hi,
Recently after pulling the newest rakudo/moarvm (2016.11-238-g2f502b4
built on MoarVM version 2016.11-41-gd2139b5 implementing Perl 6.c) I saw
errors in my code which compiled ok before. This is difficult to golf
down because it disappears when used in another context. So better
explain m
On 01/25/2017 10:00 AM, Richard Hainsworth wrote:
Lots of traffic on this group about syntax highlighting, which
indicates the work has a broad application.
I've looked at the atom-language-perl6 and the main atom site, but it
all seems quite narrow: running highlighted scripts in a single (at
Hi,
Is it true that the '=for' is taken out of the pod language? I get
errors when I use it. It should take the line and the next lines as a
block. I've also seen that it has the same effect now when I don't use it.
Regards,
Marcel
On 03/01/2017 03:50 PM, Will Coleda wrote:
Not true, '=for' is part of POD6. See below.
If you're getting errors, it's helpful to reduce the example to a
reasonably small bit of code that duplicates the same error; either
you'll realize the issue as you remove unrelated bits of code, or
you'll e
Hi,
I've encountered a little problem using dies-ok() from the Test module;
The case was that I made an error within the block used as the first
argument to dies-ok. In that particular case the perl6 compiler hurled
an exception and dies-ok accepted it as an ok action which was not ok
because
46 matches
Mail list logo