Re: vulgar?

2019-12-05 Thread Tobias Leich
"it's the level of vulgarity you'd expect from a guy called S***ov." ... and know it's getting personal... -.- Erez Schatz schrieb am Do., 5. Dez. 2019, 11:42: > it's the level of vulgarity you'd expect from a guy called S***ov. > > But seriously, it's nothing you won't see on basic cable or

Re: How to properly represent c++ class hiearchy in nativecall?

2016-07-24 Thread Tobias Leich
Hi, the $.vtable Pointer is just there to allocate more space for the CPPStruct, and to properly align the struct attributes. C++ itself cares about the vtable, not NativeCall. What would help to fix any issues would be to prove a sample code in the style of the rakudo/t/04-nativecall/*

Re: capture through regex variable

2016-02-22 Thread Tobias Leich
As a rule of thumb: Every non-Letter character after the opening angle bracket makes it non-capturing. Am 22.02.2016 um 11:37 schrieb Theo van den Heuvel: Thanks Patrick, it works great. Theo Patrick R. Michaud schreef op 2016-02-22 11:16: Dynamic subregexes such as <$top> are

Announce: Mac OS X Installer for release 2016.01

2016-02-12 Thread Tobias Leich
Thanks to Steve Mynott a Mac OS X installer is now available. This installer has the ".dmg" file extension and is available from http://rakudo.org/downloads/star/.

Re: Mooch a regex

2016-01-12 Thread Tobias Leich
seTag> / { # ... This is alled a "regex assertion". Am 12.01.2016 um 20:59 schrieb ToddAndMargo: On 01/11/2016 11:24 PM, Tobias Leich wrote: hi, what's in ${BaseTag}? Is it a regex rule or just a plain string? (Because that matters in Perl 6) It is a string and can vary. Would you

Re: Erratic timings

2016-01-04 Thread Tobias Leich
Would be nice if someone could reproduce also. Am 04.01.2016 um 14:38 schrieb Parrot Raiser: Could the jumps to >1 seconds be explained by automatic pre-compilation taking place after you re-compiled rakudo ? Why would that happen occasionally, after a number of executions of the same code?

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

2015-09-26 Thread Tobias Leich
Itemization helps: m: my %h = x => 6, y => 7; my @a = $%h; say @a[0] rakudo-moar 0132b6: OUTPUT«x => 6, y => 7␤» m: my %h = x => 6, y => 7; my @a; @a.push: $%h; say @a[0] rakudo-moar 0132b6: OUTPUT«x => 6, y => 7␤» Am 26.09.2015 um 07:58 schrieb Gabor Szabo: > In the first two cases the hash

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

2015-09-26 Thread Tobias Leich
You need to upgrade HTTP::Easy, it already contains a fix. Am 26.09.2015 um 12:26 schrieb Gabor Szabo: > And just to clarify launching this simple script (and then accessing > it via a browser) would show the same problem: > > use lib 'lib'; > > use Bailador; > > get '/' => sub { > "hello

Announce: Windows MSI Installers for release 2015.06

2015-07-14 Thread Tobias Leich
The Windows MSI installers are now available, coming again in two versions. One installer targets x86 (32bit) platforms, and the other installer targets x86_64 (64bit) platforms (probably Windows 7 or better). Only the version for x86_64 comes with JIT enabled. The two MSIs are available from

Re: Possible bug in NativeCall CStruct

2015-06-02 Thread Tobias Leich
Hi, when you install latest MoarVM, you can do this: $ perl6 -e 'use NativeCall; class Foo is reprCStruct { has str $.bar is rw }; my $foo = Foo.new(bar = bar); say $foo; $foo.bar = baz; say $foo' Foo.new(bar = bar) Foo.new(bar = baz) Note the lowercase str type. The normal Str type can be set

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

2015-05-30 Thread Tobias Leich
Please also take a look at $*EXECUTABLE, $*PROGRAM and $*PROGRAM_NAME. Am 30.05.2015 um 15:00 schrieb Tom Browder: I finally found the Perl 6 version of Perl 5's $0 listed in: tablets.perl6.org/appendix-b-grouped.html#special-variables as '$*EXECUTABLE_NAME', and I expected it to act the

Re: Will Perl 6 save a compiled version of a source program like Python?

2015-05-18 Thread Tobias Leich
We precompile modules using a command line option like in: 'perl6 --target=mbc --output=foo.pm.moarvm'. Though, since this is for modules, only this incantation will work: 'perl6 -I. -Mfoo -e1' We are working on creating executables such as 'foo.exe' from a given Perl 6 script, though I expect

Re: generating grammars, capturing in regex interpolation, etc.

2015-04-17 Thread Tobias Leich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The comment in INTERPOLATE is about subcaptures... but if you do not capture the interpolated regex itself, you break that chain. Am 17.04.2015 um 04:34 schrieb Nathan Gray: On Wed, Apr 15, 2015 at 09:45:39PM -0400, Nathan Gray wrote: I had given

Re: Writing New Modules for Submission

2015-03-21 Thread Tobias Leich
Hi, a Makefile, Changelog and MANIFEST or LICENSE files belong into the root directory, and should not be removed. Module that you write for tests might go under t/lib. Other files like media files that shall be installed should be in resource or share. Am 21.03.2015 um 16:51 schrieb Tom Browder:

Re: Object Introspection for Existence of Methods: How?

2015-03-20 Thread Tobias Leich
if $obj.^can($method_name) {... Am 20.03.2015 um 19:38 schrieb Tom Browder: I am trying to create a testing subroutine to detect if a class object has a certain method. I want it to look something like this: my $obj = Foo.new(); can_ok($obj, 'method1'); sub can_ok($obj, Str

Re: Function Signatures: Return Types (replace wantarray?)

2015-03-19 Thread Tobias Leich
The multi dispatcher *only* chooses the multi candidate by matching arguments to parameters. The return type is not considered. Btw, the syntax for returning an arrayish thing might be: method foo($a, $b -- Positional) { ... } Am 19.03.2015 um 23:53 schrieb Darren Duncan: I think as a general

Re: time and now showing different time?

2015-01-12 Thread Tobias Leich
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 does not gobble args Am 12.01.2015 um 08:55 schrieb Gabor Szabo: Neat. Based on that I tried to explain it here:

Re: time and now showing different time?

2015-01-12 Thread Tobias Leich
that you know is slow... yuo can either have several variables that record every step, or reassign to after every measurement, or you just put this whereever you want: say $?FILE:$?LINE ~ now - BEGIN now; Am 12.01.2015 um 10:36 schrieb Gabor Szabo: On Mon, Jan 12, 2015 at 10:35 AM, Tobias Leich

Re: time and now showing different time?

2015-01-12 Thread Tobias Leich
Am 12.01.2015 um 10:46 schrieb 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

Re: Could method calls warn in void context?

2015-01-10 Thread Tobias Leich
In case we would know that certain methods had no side effects (and are not called because of their side effects), ... But at the moment we don't know and therefore we can't warn for every method. Am 10.01.2015 um 15:50 schrieb Gabor Szabo: I keep writing code like this: $str.substr(/regex/,

Re: Profiling Perl 6 code

2015-01-06 Thread Tobias Leich
There is only one file to look for: profile-\d+.html in your cwd. And as a side note: do not profile code that runs that long. 8 minutes of execution will produce an html file (with a json blob) of several hundreds of megabytes. Your browser won't cope with that. Try to profile only for a single

Re: External call like Capture::Tiny of Perl 5 ?

2015-01-02 Thread Tobias Leich
This is in discussion right now, and since the recent pipe() addition, we have another bit implemented to actually make your proposal work. Though, we've not yet decided where we want to go, how one opens such a pipe or captures stdout/err, or does redirections of said handles... I hope we can

Announce: Rakudo Star Release 2014.09

2014-09-26 Thread Tobias Leich
## 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 2014 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the September 2014 release is available from

Re: Getting startes with Perl6 / Rakudo Star / MoarVM

2014-09-15 Thread Tobias Leich
, not just a plain black/white page. 2014-09-14 14:07 GMT+02:00 Tobias Leich em...@froggs.de mailto:em...@froggs.de: There is already a shurtcut to the perl6 interpreter (REPL) in the start menu. And since the msi is for windows only, we don't have to care about linux

Re: Getting startes with Perl6 / Rakudo Star / MoarVM

2014-09-15 Thread Tobias Leich
message. 2014-09-14 14:07 GMT+02:00 Tobias Leich em...@froggs.de mailto:em...@froggs.de: There is already a shurtcut to the perl6 interpreter (REPL) in the start menu. And since the msi is for windows only, we don't have to care about linux and mac here :o

Re: Getting startes with Perl6 / Rakudo Star / MoarVM

2014-09-14 Thread Tobias Leich
) This idea should be portable, providing shortcuts on Mac or any other Linux box should, work, too. Best regards and thanks for all the answers! Am 11.09.2014 um 10:56 schrieb Tobias Leich em...@froggs.de: My question would be: shall we install the book too, and add the book and useful links

Re: Rewrite using map? Trasformation array into hash of hash

2014-06-13 Thread Tobias Leich
Hi, like that? class A { has $.a; has $.b }; my @array = A.new(a='a', b='11'), A.new(a='a', b='22'), A.new(a='v', b='33'), A.new(a='w', b='44'), A.new(a='v', b='55'); say @array.map({ .a = .b = $_ }) OUTPUT«a = 11 = A.new(a = a, b = 11) a = 22 =

Re: rakudo 2014.04

2014-05-13 Thread Tobias Leich
Hi, the binary installed as 'perl6' is the first backends you specify in the --backends=... option. There are also binaries like perl6-j, perl6-m and perl6-p, in case you've build for these backends also. Cheers, FROGGS Am 13.05.2014 10:54, schrieb Serge A. Ribalchenko: Hi there, Just wonder

Rakudo Star Release 2014.03 - A useful, usable, early adopter distribution of Perl 6

2014-04-01 Thread Tobias Leich
# Announce: Rakudo Star Release 2014.03 ## 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 2014 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the March 2014 release

Re: Unusual use of x string repetition operator

2014-02-10 Thread Tobias Leich
Hi Am 10.02.2014 14:19, schrieb Kamil Kułaga: Hi, I've played wit x and xx repetition operators and found interesting result using rakudo star: join(|, (1,2) x 10) 1 21 21 21 21 21 21 21 21 21 2 Is this ok? If true please explain this to me :) Because I expected 12121212121212121212 or

Re: Unusual use of x string repetition operator

2014-02-10 Thread Tobias Leich
comes around. Thanks for fast reply On Mon, Feb 10, 2014 at 2:29 PM, Tobias Leich em...@froggs.de wrote: Hi Am 10.02.2014 14:19, schrieb Kamil Kułaga: Hi, I've played wit x and xx repetition operators and found interesting result using rakudo star: join(|, (1,2) x 10) 1 21 21 21 21 21

Re: isn't :nl awkward ?

2013-09-24 Thread Tobias Leich
Hi, what you can do now is: So, my $doc = /path/to/file.IO.slurp..split( $line-sep ).split( $field-sep ); Which seems pretty short and readable, at least to me :o) Example: my $doc = a:b:c_d:e:f_g:hi_aaa.split('_').split(':'); say $doc.perl rakudo b78da4: OUTPUT«$((a, b, c).list, (d, e, f).list,

Re: Problem in using inline C with perl6

2013-08-13 Thread Tobias Leich
Hi, Inline::C is working now without the NativeCall patch. https://github.com/FROGGS/p6-Inline-C/commit/554fbb99d0c3491c69263e8238d8df8957e63fe0 Cheers! Am 11.08.2013 11:24, schrieb Tobias Leich: Hi, you are mixing up Perl 5 and Perl 6 code. Tools like h2xs won't work in the Perl 6 world, so

Re: Problem in using inline C with perl6

2013-08-11 Thread Tobias Leich
Hi, you are mixing up Perl 5 and Perl 6 code. Tools like h2xs won't work in the Perl 6 world, so do this instead: |#!/usr/bin/env perl6 use soft; use Inline; my sub a_plus_b( Int $a, Int $b ) is inline('C') returns Int {' DLLEXPORT int a_plus_b (int a, int b) { return a + b; }