uch as the automatically generated new method) take an
implicit *%_ parameter, which will slurp up the excess named parameters.
This is called "interface consistency". You can find more about it in
the synopsis here:
http://perlcabal.org/syn/S12.html#Interface_Consistency
Hope to help!
- T
appy/
https://github.com/retupmoca/P6-Compress-Zlib-Raw/
https://github.com/dagurval/perl6-gd-raw/
https://github.com/perl6/gtk-simple/
https://github.com/mrhdias/perl6-Imlib2/
Hope to help!
- Timo
signature.asc
Description: OpenPGP digital signature
://perlcabal.org/syn/S32/Containers.html#categorize will allow you
to return a parcel from the "categorization" you provide (such as -> $_
{ (.a, .b) }) and build a multi-leveled hash.
Sadly, I wasn't able to make it work right away.
Cheers,
- Timo
signature.asc
Description: OpenPGP digital signature
s a result. Could that be
the problem?
Cheers
- Timo
signature.asc
Description: OpenPGP digital signature
to imply that :p
for subparse doesn't work. I'll look into that, because I believe it
ought to be implemented already. Perhaps not properly hooked up, though.
Hope to help!
- Timo
potential confusion before it can arise
- Timo
give us a
battle-hardened interface (meta::cpan or something?) for our modules,
but until then I see no reason to have modules.perl6.org be less than
awesome.
If you'd like to implement things yourself, you can find the repository
here:
https://github.com/perl6/modules.perl6.org
Thank you for your interest and time!
- Timo
t full seconds than the calls
> to 'time' ?
>
> Gabor
>
One of them counts leap seconds, the other doesn't. Instant is supposed
to be a monotonic clock, the other isn't.
regards
- Timo
That happens because the result of the for statement is a list that is
then sunk; it contains one scalar and one Int object for each iteration
and rakudo doesn't yet know to throw it away immediately.
Regards
- Timo
ing kept around.
There was also an optimization that turns a for ^1000 loop into a while
loop with a native counter for great performance improvements, but that
got b0rked at some point ;(
regards
- Timo
out
https://github.com/szabgab/Perl6-Maven/
Can you point me at the actual pieces of code where this problem appears?
regards
- Timo
t as a POC and then as a module.
The module code now lives on github here: https://github.com/timo/ADT/ and is
also available to be panda-installed from modules.perl6.org
I'm looking forward to hearing your comments as well as your issues and pull
requests on github :)
- Timo
8< -
I'm crossposting this from perl.perl6.language, because I feel this place is
more appropriate.
Since that mail was written, an ADT module has been added to modules.perl6.org,
it's hosted in this github repository: https://github.com/timo/ADT/
Looking forward to comments as well as
does" the given role. So in the upper example, with role X
and class Y, you could "is X" and get the same behavior as in the lower
example.
Hope to help (and hope what I wrote is actually accurate)
- Timo
do
*, so we haven't released a Rakudo * for JVM yet.
I'd be glad if you could give me a bit of help with the formulation of
that section about the different versions.
And yes, you can use the JVM Rakudo version to call to Java Code and
back. I don't have a good example for you right now, though :(
Hope to Help!
- Timo
n them are $_
and $^foobar variables, like in:
@foobar.sort({ $^a.chars < $^b.chars })
So all you'll have to do is give your set_custom_ellipsoid method a
proper signature with $name, $major and $recip in them - and you can
even give $recip a default value so that you can get rid of the $recip =
0 unless defined $recip line, too.
regards
- Timo
On 03/15/2015 09:41 PM, Tom Browder wrote:
> On Sun, Mar 15, 2015 at 2:55 PM, Timo Paulssen wrote:
> ...
>
> Thanks, Timo! Subroutine arg handling is an awkward but very exciting
> improvement for an old but non-expert Perl 5 user.
>
> Very briefly, how does one properly tra
st short for $(self.elem); if you want direct
access to the variable you'd write $!elem. Also, an "indirect method
call" would be self."$elem", self.$elem is basically equivalent to
$elem(self), which is why you get the "cannot find method
postcircumfix:<( )> error, as whatever's in $elem is probably not
callable like that
Regards
- Timo
variable called RAKUDO_MODULE_DEBUG that you can set in order to get a
verbose account of what's going on inside rakudo's head.
For more help, maybe visiting the IRC channel would be helpful, because
we can get a more direct back-and-forth going.
Hope to help!
- Timo
On 04/24/201
I didn't
get terribly far. Just a few days ago I actually remembered it'd be a
good idea to resume that work and - given the right amount of tuits - I
suppose I can do just that.
If you have any particular ideas for API, behavior, stuff you want to
have available etc, please go ahead and share :)
- Timo
n surprises newcomers is that this works:
> sub takes_int_array(Int @bar) { say @bar }
> my Int @foo = 1, 2, 3;
> takes_int_array(@foo)
but this does not
> sub takes_int_array(Int @bar) { say @bar }
> takes_int_array([1, 2, 3])
because the type match is against the defined type. We do not
automatically infer that [1, 2, 3] could be a Positional[Int].
Hope that helps and I've also successfully predicted your next stumbling
block for you :)
- Timo
On 07/03/2015 10:02 PM, yary wrote:
> On Fri, Jul 3, 2015 at 3:03 PM, Timo Paulssen wrote:
>> but this does not
>>
>>> sub takes_int_array(Int @bar) { say @bar }
>>> takes_int_array([1, 2, 3])
>> because the type match is against the defined type. We do n
; sigil simply tells perl6 how it should behave in a given context.
>
>
> LL
Please note that the <> was a recent experiment that is going away soon,
during the Great List Revisit/Refactor
- Timo
t have much async I/O in them:
http://jnthn.net/papers/2014-yapceu-async.pdf
if you have any more questions, feel free to also visit us on the IRC:
#perl6 on freenode
MfG
- Timo
Have you considered hash flattening into argument lists yet?
method new(Int $a) {
my %args;
with $a { %args<$a> = $a }
self.bless(|%args);
}
Does that help you forward at all?
- Timo
pect that helps
tremendously, though i have not actually measured anything beyond a new
feeling of "snappyness".
regards
- Timo
Order::name
I hope this helps!
- Timo
On 12/28/2015 01:58 PM, Brock Wilcox wrote:
>
> Rakudo, as far as I know, passes all of the 6.c tests :). But that
> might mean that we need more tests!
>
Actually, there's a whole bunch of tests declared "TODO" or skipped.
But rakudo does pass a vast number of the existing tests.
I'm sorry, but the JVM back-end of rakudo is currently known to not
compile and/or run very well.
he time to read through your code yet, but perhaps it'd
be feasible to use our async sockets, which all run in the single
"asynchronous IO stuff thread" we have.
Regards
- Timo
On 13/01/16 10:00, mt1957 wrote:
L.s.
I got the following error
'Tried to read() on a socket
Text::CSV_XS:from;
my $csv = Text::CSV_XS.new() or die "Cannot use CSV: " ~
Text::CSV_XS.error_diag();
[...]
That should work. For more information, see the Readme of Inline::Perl5,
which also has a whole bunch of examples.
Regards
- Timo
here unless the build system
messes up, or our libuv dependency doesn't support the host system.
The only difficult thing is porting the JIT compiler to different
architectures, as it has large portions of per-platform assembly
language source in it.
Hope that helps?
- Timo
ook at, too.
I've opened a ticket in the perl6-user-experience repository for this:
https://github.com/perl6/user-experience/issues/8
Thank you for your time!
- Timo
.org/language/classtut
I hope this'll get you towards your goal. If not, just keep asking :)
Have fun with Perl 6!
- Timo
::Capture::Simple or IO::MiddleMan are not right for you, you can
also try working with
http://doc.perl6.org/type/Proc - Proc
http://doc.perl6.org/type/Proc::Async - Proc::Async
Those two are for running commands and capturing their stdout.
Good Luck!
- Timo
On 02/03/16 08:00, H
#L122-L142
These configuration options get set during the build stage of moar
itself, so if you want to make this work properly on your system, you
can compile moar from source manually and it should be set up properly.
Hope that helps!
- Timo
erl6 look for the
module in the right places.
By now, rakudo will automatically pre-compile anything you "use" or -M
(if that isn't prevented by "no precompilation" or things that aren't
supported), so that'll be easier.
Hope that helps!
- Timo
gt;
> -Tom
>
Could you try using $filename.IO.slurp.lines instead of
$filename.IO.lines and see if that makes things any faster?
- Timo
On 03/30/2016 03:45 AM, Timo Paulssen wrote:
> Could you try using $filename.IO.slurp.lines instead of
> $filename.IO.lines and see if that makes things any faster?
> - Timo
Actually, the method on an IO::Handle is called "slurp-rest"; slurp
would only work with a filename instead.
- Timo
On 30/03/16 13:40, Tom Browder wrote:
On Tue, Mar 29, 2016 at 10:29 PM, Timo Paulssen wrote:
On 03/30/2016 03:45 AM, Timo Paulssen wrote:
Could you try using $filename.IO.slurp.lines instead of $filename.IO.lines
and see if that makes things any faster?
...
Actually, the method on an IO
ed with as much guidance and
praise as you need :)
- Timo
completely what with the recent changes i made :S
...
That looks like the place to start to me...
The one big problem with the qt-based profiler is that the json library
it uses refuses to work with files over a certain limit, and we easily
reach that limit. So that's super dumb :(
- Timo
symbol is pretty much guaranteed to already be
loaded in the program.
HTH
- Timo
index
entry that the search feature would then allow you to use.
- Timo
quot; variable that you pass.
Apparently we don't give a good error message when you say you want the
CArray[uint32] to be passed as is, but accidentally declared it "is rw"
in the signature.
Can you see if removing the "is rw" from the CArray makes things work?
- Timo
uot;nativecast" for this task.
That should also be a few hundred times faster than what BSON does, and
it also works for Int types.
You just might have to be careful with regards to endianness.
- Timo
perl6 -e 'use NativeCall; my CArray[num64] $foo .= new(1234e9); say
Buf[uint8].new(nativecast(CArray[uint8], $foo)[^8])'
Buf[uint8]:0x<00 00 40 1b 02 f5 71 42>
Hope that helps!
- Timo
I didn't actually read the other mail in this thread yet, but you can
catch a control exception (like warn uses) with a CONTROL block. Don't
forget to .resume the exception unless you want it to break out of your
code, too.
Hope to help!
- Timo
I just have a ~/perl6 where i have a clone of MoarVM/MoarVM, perl6/nqp,
and rakudo/rakudo. You just have to provide each Configure.pl with the
same --prefiix - in my case that's ~/perl6/install - then everything
will find each other.
There's some extra paths in my $PATH:
/home/
in that list in the speculations. Fortunately, the list is
introduced "standard semantic blocks include:", which implies the list
isn't exhaustive.
Hope that helps!
- Timo
It should now install on windows even if you lack the .dll files.
HTH
- Timo
On 22/06/16 11:16, Theo van den Heuvel wrote:
Hi all,
I am trying to install GTK::Simple using panda. On Windows10
installation fails and the log contains the line:
Could not parse URI: http://gtk-dlls.p6c.org/l
On 06/22/2016 06:33 PM, Theo van den Heuvel wrote:
> Thanks Timo,
>
> this brings be further, but not quite out of the woods. I now get the
> following (Windows 10):
>
>
> # Failed test at t/01-sanity.t line 10
> # Dynamic variable @*INC not found
>
> with the e
You might have more luck with HTTP::UserAgent:
https://github.com/sergot/http-useragent
Hope that helps!
- Timo
On 21/08/16 09:19, ToddAndMargo wrote:
> Hi All,
>
> Where are the directions to use
>
> http://modules.perl6.org/#q=LWP
>
> (I do not have Perl 6 install
Could I interest you in focusing your time on the project arnsholt and
me started long ago to make a Jupyter/IPython compatible kernel?
https://github.com/timo/iperl6kernel
a native Electron binding, which is the thing
that powers the Atom Editor if i'm not mistaken.
Maybe the "most wanted" document for native bindings wants a bit of a
touch-up in this area:
https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/bindings.md#user-interfaces
Hope that helps!
- Timo
On 26/08/16 11:03, Andreas Mueller wrote:
> on Windows i have to install git to download a Module
>
> maybe, one day there is a 'git' written in P6
>
>
> Andreas
I think we should be able to grab modules without using git if we can
rely on github and gitlab and whoever hosts modules to give
I haven't read your code, but your question immediately made me think of
this module:
https://github.com/masak/text-indented
Would be interested to hear if this helps you!
- Timo
s/codepoints/etc in a character string? MVMString
> declares its "num_graphs" as a MVMuint32, but a graph can be
multiple codepoints and as such multiple bytes when encoded.
> Following the above, does the Perl 6 language specify any such > limits, or
> does it define the above things to be infinite? I don't
think it does.
Hope that helps!
- Timo
On 09/13/2016 02:26 PM, Elizabeth Mattijsen wrote:
>> On 13 Sep 2016, at 14:15, Timo Paulssen wrote:
>>
>> I'll answer based on the data structures MoarVM uses internally:
>>
>> On 09/13/2016 05:13 AM, Darren Duncan wrote:
>>
>>> (Pretend the actu
On 09/13/2016 03:12 PM, Timo Paulssen wrote:> If one big integer is
allowed to be 14 gigabytes big (if we use the > default of 28 bits per
"mp digit"; it's also possible to use 31 or > 60.), we can still safely
say "limited only by memory" for now.
Something els
On my machine it's about 0.1 seconds.
The machine i'm using has this CPU in it:
Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
And it runs off an SSD.
- Timo
ch uses MoarVM's GC
as an example:
https://www.infoq.com/presentations/terminology-garbage-collector
Please feel free to ask more questions
- Timo
t=mbc \
--stagestats --output=CORE.setting.moarvm gen/moar/m-CORE.setting
maybe even under GDB.
That should give you a little more detail on what's going on.
- Timo
!
- Timo
Surely you could already build a decent zenity-like in Perl 6 using
GTK::Simple. But I suggest using qx for calling the zenity binary from
your system.
- Timo
Something like this should do what you want:
timo@schmand ~> perl6 -e 'my $a = gather for ^5 { say "get from a!";
take $_ }; my $b = gather for ^5 { say "get from b!"; take 10 * $_ + 1
}; .say for (|$a, |$b)'
get from a!
0
get from a!
1
get from a!
2
get from a!
does expect is just the
"self", aka the invocant).
BTW, there's two modules in the ecosystem that basically do exactly what
you're trying to do here. They are called IO::String and
IO::Capture::Simple.
Hope that helps!
- Timo
On 01/24/2017 11:28 PM, Brian Duggan wrote:
It is usually considered The Right Thing to output error messages to
stderr instead of stdout; you can use "note" to output to stderr (and
it'll also put a newline at the end for you, which print doesn't do).
amples were confusing your original question where you
said "reverse of .lines", but you meant "inverse of .lines". So you can
just leave out the .reverse from these examples.
Hope that helps!
- Timo
On 18/02/17 06:04, ToddAndMargo wrote:
> Hi All,
>
> Sorry for the 1000 questions today, but I have anb entire
> week to think them up. And I have another one.
>
> In Windows, I am noticing that Cobian Backup and Windows
> Explorer (not Internet Explorer) can tool around CIFS
> (Windows) shares ba
Normally it's enough to override $*ERR for this purpose. I suggest using
IO::MiddleMan to do that, or maybe IO::Capture::Simple.
HTH
- Timo
ntil something
gets figured out by all the involved parties.
HTH
- Timo
assignment form which looks like s{ foo } =
"bar").
Sadly, I couldn't find any docs about the assignment form of s///, but
it does explain the thing with balanced parenthesis:
https://docs.perl6.org/syntax/s$SOLIDUS%20$SOLIDUS%20$SOLIDUS
Hope that helps!
- Timo
ram is "not all that
useful" as you correctly point out.
HTH
- Timo
>
And then a bit lower you can see:
> Date: 4 Aug 2000
> Last Modified: 14 Sep 2000
thanks
- Timo
Oh, another question:
please tell us how you reached that site? I expect you did a google
search or something; can you tell us what search terms you've used to
get there? We should obviously improve the docs so that they get found
instead of the archive …
On 02/19/2017 11:15 PM, ToddAndMargo wrote:
> On 02/19/2017 07:15 AM, Timo Paulssen wrote:
>> Oh, another question:
>>
>> please tell us how you reached that site? I expect you did a google
>> search or something; can you tell us what search terms you've used to
&
its "new" method, and the raw interface has
"switch-to-ssl()" and "starttls()" methods.
HTH
- Timo
This is because of how xclip works. It keeps running until you kill it,
or until the number of pastes has been reached that you specify with -loops.
You will want to use Proc::Async or run with an :in parameter instead of
shelling into a redirect with echo, here's why:
timo@schmand ~
Doesn't seem to be, but there's $*DISTRO.is-win, which is usually enough
(i.e. you have to do one dumb thing on windows and another sane thing on
literally anything else)
> Is there a way to send and "end of file" marker to terminate the pipe?
That is exactly what the call to .close does.
On 07/03/17 10:54, Brandon Allbery wrote:> Perl compiles to an internal
AST, as does Python --- but there are > "compilers" for both, at various
levels [...]
more precisely, python code compiles down to bytecode rather than
sticking around at an AST level.
r lists:
sub postfix:(Int(Cool) $n) { [*] 2 .. $n }
That'll explode early when the string you pass doesn't intify properly.
It'll also allow you to pass lists and use their length for example -
not sure if you want that.
Hope that helps!
- Timo
ommand 'echo "oh my "what do we have here
> " | cat' exited unsuccessfully (exit code: 1)
> in block at -e line 1
Or what if there's backtick quotes?
> timo@schmand ~> perl6 -e 'my $Str = $*IN.slurp-rest(:close); shell
> qq/echo "$Str"
"my" variables are lexically scoped to the curly braces that contain
them. That means that your $IAm is limited exactly to that init block.
Also, =~ isn't in perl6.
You can put "my $IAm" outside that block and assign to it inside the
block, though.
HTH
- Timo
Hey,
X11::Xlib::Raw is buggy. It has to have all modules it uses internally
inside its "provides" section in the META6.json, otherwise "use" will
not find them.
I'll open a ticket with the module author.
HTH
- Timo
On 08/03/17 22:08, ToddAndMargo wrote:
> Hi All,
Hi,
Wouldn't it be enough to use something that backtracks? As you might
know, "token" is "regex + ratcheting" and "rule" is "token + sigspace".
HTH
- Timo
ed plugins for
atom, so they are generally of high quality.
HTH
- Timo
rce a full recompile of
all used modules (transitively) in memory, but you can copy-paste the
modules you're interested in into a "lib/" folder and just -Ilib on the
commandline. just make sure to rm -rf lib/.precomp between runs, i think!
hope that helps!
- Timo
I don't quite understand what's wrong with just
my $TheValue = $?FILE.subst(/.* "/"/, "" :g);
near the top of your module?
@*ARGS.perl ~ ">\n";
But even with "" you don't have to backslash the @ and the * there. You
only would have to do that if you had a method call that includes
parenthesis or if you had a subscript after something that looks just
like an array variable. (these rules
On 03/16/2017 04:44 PM, Theo van den Heuvel wrote:
> Earlier I tried using rakudobrew, before I learnt that that was
> actually discouraged,
> despite comments in doc/perlintro.pdf. I think I made a full clean-up.
perl6intro.com, which is where the pdf is generated from, has been
updated to no lon
of elements or if it does a
bit of unnecessary work.
HTH
- Timo
I seem to recall you asked about performance recently
the regex engine has a significant overhead. Your regex is equivalent to
$Terminal.contains('xterm' | 'linux')
though of course if you only test this once at the beginning of the
program, you can ignore that.
On 25/03/17 06:15, ToddAndMargo wrote:
>> while || tries the left side first, then the right side.
>> Basically use | in regexes unless you need ||.
>
> Would this be the logical AND equivalent?
>
> if $Terminal ~~ /xterm && linux/ {}
>
> Thank you!
>
> -T
>
There is no &&, but there is &.
th
On 25/03/17 12:53, Tom Browder wrote:
> On Fri, Mar 24, 2017 at 10:36 PM, Timo Paulssen wrote:
>> I seem to recall you asked about performance recently
>>
>> the regex engine has a significant overhead.
> ...
>
> Isn't that somewhat mitigated by defining
lying on the
garbage collector to do file handle closing for you, which is
nondeterministic and a bad idea in general.
HTH
- Timo
you use inside it is
already declared with a "my".
HTH
- Timo
!"789" is just False.
On 27/03/17 18:53, ToddAndMargo wrote:
> Hi All,
>
> What am I doing wrong in my "AND not 789"?
>
> $ perl6 -e 'my $x="abc123def456";
> my $y="123"; if $x.contains( $y & "abc" & ! "789" )
> {say "Yes"} else {say "no"};'
>
> no
>
> -T
>
Yeah, junctions are super useful, but not very fast.
compare these two pieces of code:
so "hello how are you today?".contains("hello" & "u t") for ^1_000_000
and
my $target = "hello how are you today?"; so
$target.contains("hello") && $target.contains("u t") for ^1_000_000
On my machi
1 - 100 of 281 matches
Mail list logo