Re: Simple Print/Say Question

2006-05-23 Thread Gabor Szabo
On 5/23/06, Chris Yocum [EMAIL PROTECTED] wrote: 1|2|3 I would say something like: print $array[0] . | . $array[1] . | . $array[2] . \n; not the best way but it works. In Perl6 if say something like this: print @array[0] ~ | ~ @array[1] ~ | ~ @array[2] . \n; I get 1 2 3 | | | My

perldoc or pod parser in Perl6

2006-05-25 Thread Gabor Szabo
sligthly related to the Perl6 wiki issue, is there a perldoc command or a podparser implemented in Perl6 already ? Gabor

Re: [Padre-dev] Padre Perl6 Outline view

2009-04-27 Thread Gabor Szabo
On Sun, Apr 26, 2009 at 12:14 AM, Ahmad Zawawi ahmad.zaw...@gmail.com wrote: Hi people, I just finished Perl6 Outline view which i promised Gabor 3 or 4 months ago :) So you can now see Perl 6 packages/modules/grammars/roles in parent nodes and under them you can see

Re: Perl 6 IDEs

2009-12-07 Thread Gabor Szabo
2009/12/6 Víctor A. Rodríguez (Bit-Man) vic...@bit-man.com.ar: Hi perlsixers, we've been working a bit on Perl 6 lately [1] and some work, even the basic coding, would be great if we use some IDE. I'm a regular Eclipse user and EPIC seems the natural choice for me, but it doesn't support

Re: Perl 6 IDEs

2009-12-07 Thread Gabor Szabo
2009/12/7 Gabor Szabo szab...@gmail.com: 2009/12/6 Víctor A. Rodríguez (Bit-Man) vic...@bit-man.com.ar: Hi perlsixers, we've been working a bit on Perl 6 lately [1] and some work, even the basic coding, would be great if we use some IDE. I'm a regular Eclipse user and EPIC seems the natural

Re: Perl 6 IDE: Perl 5 XL 0.02 with Padre and the Perl 6 plugin

2009-12-09 Thread Gabor Szabo
On Wed, Dec 9, 2009 at 2:18 PM, Richard Hainsworth rich...@rusrating.ru wrote: Gabor, Thanx this is a good step forward. With simple files, no problem. I tried a larger file and got the following in the terminal window: ./perl-5.10.1-xl-0.02/perl/bin/padre.sh Thread 1 terminated

Questions for Survey about Perl

2010-12-28 Thread Gabor Szabo
the greater Perl Ecosystem please let me know that too. regards Gabor Gabor Szabo http://szabgab.com/ Perl Ecosystem Group http://perl-ecosystem.org/

Re: Questions for Survey about Perl

2010-12-29 Thread Gabor Szabo
On Wed, Dec 29, 2010 at 11:02 AM, Richard Hainsworth rich...@rusrating.ru wrote: Gabor, there is a big gap between 'i wrote snippets' to 'i wrote modules'. How about 'i have written programs to solve real problems' ? How about a question on involvement in the perl6 development process, so as

Re: Questions for Survey about Perl

2011-01-01 Thread Gabor Szabo
On Sat, Jan 1, 2011 at 9:39 AM, Richard Hainsworth rich...@rusrating.ru wrote: On 01/01/11 03:41, Daniel Carrera wrote: On Sat, Jan 1, 2011 at 1:26 AM, Chas. Owenschas.ow...@gmail.com  wrote: On Wed, Dec 29, 2010 at 21:39, Xue, Brianbrian@amd.com  wrote: I want to adding one more

Re: Questions for Survey about Perl

2011-01-02 Thread Gabor Szabo
On Sun, Jan 2, 2011 at 9:48 PM, Guy Hulbert gwhulb...@eol.ca wrote: I'm not sure what 'TPF survey' is. http://survey.perlfoundation.org/ Gabor

Re: Questions for Survey about Perl

2011-01-02 Thread Gabor Szabo
On Sat, Jan 1, 2011 at 1:36 PM, Moritz Lenz mor...@faui2k3.org wrote: On 01/01/2011 10:15 AM, Gabor Szabo wrote: So for example: I'll start learning Perl 6  (select one or more that fits your opinion) *) when Larry Wall declares that Perl 6.0 is ready *) after Rakudo 1.0 is released Given

Fwd: FOSDEM - perl 6 critic

2011-02-22 Thread Gabor Szabo
hi, At FOSDEM I met Arne Wichmann who is a long time sysadmin, Debian developer and Perl user. We had a short chat in which he expressed his concerns about the complexity, the size (memory footprint) and speed of Perl 6, Without even taking in account the current memory requirements and speed of

Re: Fwd: FOSDEM - perl 6 critic

2011-02-22 Thread Gabor Szabo
On Tue, Feb 22, 2011 at 6:14 PM, Guy Hulbert gwhulb...@eol.ca wrote: On Tue, 2011-22-02 at 17:57 +0200, Gabor Szabo wrote: For a better comparison that takes in account the features as well see http://www.modernperlbooks.com/mt/2010/07/an-accurate-comparison-of-perl-5-and-rakudo-star.html Just

Re: Fwd: FOSDEM - perl 6 critic

2011-02-22 Thread Gabor Szabo
On Wed, Feb 23, 2011 at 3:10 AM, Frank S Fejes III fr...@fejes.net 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 ... Let me just link to the recent blog post of

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

2012-06-28 Thread Gabor Szabo
On Thu, Jun 28, 2012 at 5:15 PM, Tadeusz Sośnierz tadeusz.sosni...@onet.pl wrote: On Thursday, June 28, 2012 14:32:58 Gabor Szabo wrote: In panda all the projects, where there is a source URL, are listed with their git:// url except of https://github.com/perlpilot/p6-File-Temp.git Where

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

2012-06-28 Thread Gabor Szabo
fixed, but I haven't seen a reason to change back to https either. Am 28.06.2012 16:48, schrieb Gabor Szabo: On Thu, Jun 28, 2012 at 5:15 PM, Tadeusz Sośnierz tadeusz.sosni...@onet.pl wrote: On Thursday, June 28, 2012 14:32:58 Gabor Szabo wrote: In panda all the projects, where

showing more than one compilation error?

2012-06-29 Thread Gabor Szabo
Is it possible to get more than one compilation error at once? Currently after the first undeclared variable Rakudo stops and I have many Once I fixed them it starts to complain the missing subs... A bit too much of running and editing and with the current start-up speed this is a bit

Odd number of elements found where hash expected while bootstrapping Panda

2012-07-01 Thread Gabor Szabo
Hi, after updating Rakudo I started to get these errors so I updated (git pull) Pand removed ~/.perl6 and ~/.panda and tried to bootstrap Panda again: This is what I got: $ ./bootstrap.sh Odd number of elements found where hash expected in method STORE at src/gen/CORE.setting:6136 in block

Where to put examples?

2012-07-04 Thread Gabor Szabo
Neither the META.info specification at https://github.com/perl6/ecosystem/blob/master/spec.pod nor http://wiki.perl6.org/Create%20and%20Distribute%20Modules mentions where one should put example files. Does that mean they can go in any directory or should those document tell people to put the

File content is not written if close not called

2012-07-12 Thread Gabor Szabo
The following script leaves and epty 'data.txt' behind. Only if I call $fh.close is the file contents saved. Is this a feature? use v6; my $fh = open 'data.txt', :w; $fh.print(hello\n); Gabor

Cannot bootstrap Panda on Windows

2012-07-27 Thread Gabor Szabo
I just built Rakudo on Windows and tried to set up Panda. After installing wget I got the following: C:\work\pandaperl6 bootstrap.pl SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc --2012-07-27 16:13:17-- http://feather.perl6.nl:3000/list

Re: Is there a p6doc equivalent to perltoc?

2013-02-08 Thread Gabor Szabo
There is the index.pl in https://github.com/perl6/doc that generates the index.data file and can now list the words it found. It is a humble beginning of some indexing. regards Gabor On Fri, Feb 8, 2013 at 6:46 PM, Brian Wisti brian.wi...@gmail.com wrote: Hi all, Is there a documentation

Is this a strange regex bug in my code?

2014-12-29 Thread Gabor Szabo
I am puzzled by this. I have code like this: my @files = dir($.source_dir).map({ $_.basename }); for @files - $tmpl { if $tmpl !~~ m/\.txt$/ { debug(Skipping '$tmpl' it does not end with .txt); next; } debug(Source file $tmpl); } and

Re: Is this a strange regex bug in my code?

2014-12-29 Thread Gabor Szabo
haven't been able to golf it further to be certain. Pm On Tue, Dec 30, 2014 at 09:11:52AM +0200, Gabor Szabo wrote: Just to follow-up: The problem appears in https://github.com/szabgab/Perl6-Maven/commit/4346c96d63e97def55e789bbeebdbdaebe8b0b33 After that I have replaced the regex

Re: Is this a strange regex bug in my code?

2014-12-30 Thread Gabor Szabo
is happening to the Match object, and where negation is taking place. It would be interesting to know if the following fails for you also: if not $tmpl ~~ m/\.txt$/ { ... } Pm On Tue, Dec 30, 2014 at 09:29:39AM +0200, Gabor Szabo wrote: No. If I remove the leading m from the regex

Profiling Perl 6 code

2014-12-30 Thread Gabor Szabo
The Perl 6 Maven site is a static site generated by some Perl 6 code. Currently it takes about 8 minutes to regenerate the 270 pages of the site which is quite frustrating. Is there already a tool I could use to profile my code to see which part takes the longest time so I can focus my

Found no writable directory into which panda could be installed

2014-12-31 Thread Gabor Szabo
After installing Rakudo star into some other directory using --prefix I tried to run panda and got the following error: Found no writable directory into which panda could be installed in sub make-default-ecosystem at /home/travis/rakudo-2014-12-1/languages/perl6/lib/Panda/App.pm:18

Re: Found no writable directory into which panda could be installed

2014-12-31 Thread Gabor Szabo
I found a solution for myself, but I still think this is a problem: DESTDIR=rakudo-2014-12-1/languages/perl6 ./rakudo-2014-12-1/bin/panda install YAML Gabor On Wed, Dec 31, 2014 at 8:20 PM, Gabor Szabo ga...@szabgab.com wrote: After installing Rakudo star into some other directory using

External call like Capture::Tiny of Perl 5 ?

2015-01-02 Thread Gabor Szabo
I see there are 'run' and 'shell' functions that return the exit status in Proc::Status, and QX that returns the output. Wouldn't it be better to have a function the returns and object that contains both the status, the stdout and the stderr? e.g. extending Proc::Status to be able to hold those

Re: Profiling Perl 6 code

2015-01-05 Thread Gabor Szabo
On Wed, Dec 31, 2014 at 09:35:33AM +0200, Gabor Szabo wrote: The Perl 6 Maven site is a static site generated by some Perl 6 code. Currently it takes about 8 minutes to regenerate the 270 pages of the site which is quite frustrating. Is there already a tool I could use to profile my

Could method calls warn in void context?

2015-01-10 Thread Gabor Szabo
I keep writing code like this: $str.substr(/regex/, 'replaement) when I should write $str.=substr(/regex/, 'replaement) The former will *return* the replaced string to the void but not change it. I don't know if the above can be ever useful, but maybe this kind of constructs should warn. Or

Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread Gabor Szabo
I have Rakudo Start 2014.12.1 compiled with MoarVM running on OSX and it seems to be leaking memory, but I need your help in confirming my understanding: I created this script to show it: use v6; sub MAIN(Int $count) { prompt(Start); for 1 .. $count - $i { my $x = 42; }

time and now showing different time?

2015-01-10 Thread Gabor Szabo
say time; say now; say time; say now; 1420898839 Instant:1420898874.659941 1420898839 Instant:1420898874.663946 This looks really strange to me. Why do the calls to 'now' show different full seconds than the calls to 'time' ? Gabor

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread Gabor Szabo
On Sat, Jan 10, 2015 at 10:25 PM, t...@wakelift.de wrote: On 01/10/2015 08:39 PM, Gabor Szabo wrote: Well, whatever it is, this means that the web application fills all the memory and crashes every 30-40 requests. Luckily there are not many people who read the site :) Gabor I'm

Re: Missing or wrong version of dependency

2015-01-10 Thread Gabor Szabo
BTW the same happens if I try to run this command in the freshly cloned copy of https://github.com/supernovus/perl6-http-easy On Sat, Jan 10, 2015 at 11:28 PM, Gabor Szabo ga...@szabgab.com wrote: I have the Rakudo Star installation with HTTP::Easy in it. I was trying to play a bit

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread Gabor Szabo
On Sat, Jan 10, 2015 at 9:01 PM, t...@wakelift.de wrote: On 01/10/2015 07:53 PM, Gabor Szabo wrote: On Sat, Jan 10, 2015 at 7:57 PM, t...@wakelift.de wrote: 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

Missing or wrong version of dependency

2015-01-10 Thread Gabor Szabo
I have the Rakudo Star installation with HTTP::Easy in it. I was trying to play a bit with the source code of HTTP::Easy, copied the HTTP/Easy.pm6 file to a private lib directory and the tried to launch a simple script using Bailador that uses HTTP::Easy. perl6 -Ilib sample.pl6 This is the

Re: Memory leak in Rakudo Star 2014.12.1 ?

2015-01-10 Thread Gabor Szabo
On Sat, Jan 10, 2015 at 7:57 PM, t...@wakelift.de wrote: 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. The problem happens even without

Re: time and now showing different time?

2015-01-12 Thread Gabor Szabo
On Mon, Jan 12, 2015 at 10:35 AM, Tobias Leich 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 does not gobble args Hmm, actually it does not let me put the parens there:

Re: time and now showing different time?

2015-01-12 Thread Gabor Szabo
On Mon, Jan 12, 2015 at 11:48 AM, Tobias Leich em...@froggs.de wrote: $ perl6 -e 'sleep 3; say now - BEGIN now;' 3.0180351 Oh, so this what they call bending time around space. (Or was that the other way around?) You call now in the BEGIN block which is the first thing to finish in that

Is creating and Array or Parcel ?

2015-07-31 Thread Gabor Szabo
The following code (with comments) is confusing me. Can someone give some explanation please? Specifically the difference between my @x = a b; my $z = @x; and my $z = a b; Gabor use v6; # creates an array here: my @x = a b; say @x.WHICH; # Array|140713422866208 say @x;# a b say

Forking or running external process in background

2015-10-24 Thread Gabor Szabo
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 in the background or how to fork an exec ? I tried

How to profile Perl 6 applications?

2015-10-24 Thread Gabor Szabo
Hi, The Devel::NYTProf helped me a lot locating the source of slowness on the Perl Maven site. Is there something similar for Perl 6 so I can try to improve the speed of the Perl 6 Maven site too? Gabor

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

2015-09-26 Thread Gabor Szabo
and there is also a .moarvm version of the file. regards Gabor On Sat, Sep 26, 2015 at 3:37 PM, Tobias Leich <em...@froggs.de> wrote: > 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 laun

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

2015-09-26 Thread 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 world" } baile; On Sat, Sep 26, 2015 at 1:16 PM, Gabor Szabo <ga...@szabgab.com> wrote: > In

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

2015-09-26 Thread Gabor Szabo
In the cloned repository of Bailador I ran perl6 examples/app.pl It launched the web server printing Entering the development dance floor: http://0.0.0.0:3000 [2015-09-26T10:04:46Z] Started HTTP server. but when I tried to access it with a browser it crashed with: [2015-09-26T10:04:49Z] GET /

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

2015-09-25 Thread Gabor Szabo
In the first two cases the hash was converted to Pairs before assigning to the array. Only the third case gave what I hoped for. How can I push a hash onto an array as a single entity? use v6; my %h = x => 6, y => 7; say %h.perl; # {:x(6), :y(7)} my @a = %h; say @a.elems; # say @a[0];

require on string stopped working in rakudo 2015.09

2015-09-25 Thread Gabor Szabo
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 code now fails: use v6; my $name = 'Bailador'; require $name;

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Gabor Szabo
On Sat, Sep 26, 2015 at 3:39 PM, Moritz Lenz wrote: > > >> I've fixed my script by switching to EVAL "use $module"; > >> but I wonder if this is a regression or a planned deprecation? > > > > I’m not sure yet. > > > > Could you please rakudobug it so that it doesn’t fall

Using Rakudo Start on OSX using the .dmg

2017-03-25 Thread Gabor Szabo
Hi, I just tried to use the .dmg version of Rakudo Star. I might not be the typical Mac user as I spent quite some time trying to figure out what do I need to do in order to start using it after the installation. In the end I found that it was installed to /Applications/Rakudo Then I added

Re: exit code: 141 causes Perl 6 to exit.

2017-03-27 Thread Gabor Szabo
Putting CATCH { default { put .^name, ': ', .Str } }; in the While loop helped with the restarting, but I am still not sure if this is the expected behavior or not. run.pl: while True { say "Starting"; shell("perl6 a.pl"); CATCH { default { put .^name, ': ', .Str } }; }

exit code: 141 causes Perl 6 to exit.

2017-03-27 Thread Gabor Szabo
The lack of open filehandles seem to be fixed. The server now stays up for quite long time, but I've just seen the following on the command line: The spawned command './RUN' exited unsuccessfully (exit code: 141) in block at wrap.pl6 line 5 I'd like to understand what this exit code: 141

Perl 6 docs

2017-03-25 Thread Gabor Szabo
When I search for %INC at https://docs.perl6.org/ it offers "%INC (Perl 5)" but when I search for the more common @INC Luckily the former leads to https://docs.perl6.org/language/5to6-perlvar which also has information on the latter, but it would be nice if that was also recognized in the

write string requires an object with REPR MVMOSHandle

2017-03-29 Thread Gabor Szabo
I was running the following buggy code: sub save { my $fh = open('data.txt', :w); LEAVE: $fh.close; $fh.print("hello\n"); } save(); (note the : after the LEAVE) Which if I am not mistaken is basically the same as: sub save { my $fh = open('data.txt', :w); $fh.close;

Re: Bug report for Crypt::Bcrypt - cannot install

2017-03-28 Thread Gabor Szabo
: > https://github.com/FROGGS/p6-if/issues/2 > > The original module doesn't have a bug queue, and I don't think we > have a community solution to authors that don't have bugqueues. > (except to kindly ask them to enable them) > > > > On Tue, Mar 28, 2017 at 2:33 PM, G

Re: Failed to open file .. too many open files

2017-03-25 Thread Gabor Szabo
Oh so you say that's indeed a bug in my code. That's a relief. Thanks! As I can see I had some $file.IO.slurp and some of the slurp-rest ones. What is the difference between $file.IO.slurp and slurp($file) ? Is the latter just an alias for the former? Gabor On Sat, Mar 25, 2017 at 4:54 PM,

Failed to open file .. too many open files

2017-03-25 Thread Gabor Szabo
The Perl 6 Maven site runs on Bailador. I've just updated the Rakudo underneath to 2017.01 and it seemed to be working fine, but after a while it started crashing with this error message: Failed to open file /home/gabor/work/perl6maven-live.com/main.json: too many open files in sub at

Re: Failed to open file .. too many open files

2017-03-25 Thread Gabor Szabo
On Sat, Mar 25, 2017 at 8:42 PM, Elizabeth Mattijsen wrote: > $file.IO.slurp and slurp($file) are basically the same. > > $handle.slurp-rest does *not* close the handle, as another process might > still be writing to it, so you could do another .slurp-rest. > > > To get back to

Re: Failed to open file .. too many open files

2017-03-25 Thread Gabor Szabo
I still get the same error. I just found another case of slurp-rest which might have been the cause but it might be good time to look at the few other cases of "open" in my code. (And later maybe also the code of Bailador itself.) I tried to read more about how I am supposed to close file handles

Travis-CI and Rakudo seem to be a bit unstable

2017-03-25 Thread Gabor Szabo
Hi, In addition to me breaking my own code, it seems that Travis-CI and Rakudo are rather fragile together. Occasionally my tests fail due to failures in the prerequisites. This failed due to LWP::Simple failing https://travis-ci.org/szabgab/Perl6-Maven/jobs/215147392 even though 20 min earlier

Re: How to limit the list of imported functions?

2017-04-07 Thread Gabor Szabo
That's indeed a good idea for documentation purposes and with the strict function redeclaration prevention of Perl 6 it might be sufficient as well. regards Gabor On Sat, Apr 8, 2017 at 2:27 AM, ToddAndMargo <toddandma...@zoho.com> wrote: > On 04/07/2017 07:21 AM, Gabor Sz

zef not telling what it is going to test for Uzu

2017-04-08 Thread Gabor Szabo
As I understand from installing a number of Perl 6 modules using zef, every time before zef starts testing the module it tells the user what it is going to test, including its version number. eg. this: Testing: Net::DNS:ver('1.0.1'):auth('github:retupmoca') When I try to install Uzu, howerver I

Re: How to limit the list of imported functions?

2017-04-07 Thread Gabor Szabo
thanks! On Fri, Apr 7, 2017 at 6:04 PM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > https://docs.perl6.org/syntax/need > >> On 7 Apr 2017, at 16:59, Gabor Szabo <szab...@gmail.com> wrote: >> >> Thanks. I was only looking at https://docs.perl6.org/syntax/use

Smoke testing Perl 6 Modules on Rakudo

2017-04-08 Thread Gabor Szabo
I wonder if this site is really out of date as the dates at the top indicate? http://smoke.perl6.org/report If so, is there working version of this report? Gabor

Re: Need sub for `LWP::UserAgent`

2017-07-28 Thread Gabor Szabo
web. I need to be able >>> to pass the following to the web page: >>> >>> Caller >>> Host >>> UserAgent >>> Referer >>> Cookies >>> >>> This is the p5 code I want to convert: >>> >>&g

Memory leak or just normal usage in Rakudo?

2017-08-03 Thread Gabor Szabo
Hi, I think I've mentioned earlier that we see some memory leaks in Bailador. I've started to investigate it by creating a small function that would use "ps" to get the memory usage of the current process. The first step was to do some sanity check and so I wrote a test script:

Running external CLI tool and capturing output

2017-08-10 Thread Gabor Szabo
The documentation has a nice example showing how to run an external program and how to get its output or even its standard error. https://docs.perl6.org/type/Proc However it looks a lot more complex than the plain backtick Perl 5 has and more complex than the capture function of Capture::Tiny.

Re: Running external CLI tool and capturing output

2017-08-10 Thread Gabor Szabo
? I guess those don't separate/capture stderr, and don't > separate out the params. > > --Brock > > > On Thu, Aug 10, 2017 at 10:57 AM, Gabor Szabo <szab...@gmail.com> wrote: >> >> The documentation has a nice example showing how to run an external >> pro

clone and deep copy of arrays

2017-07-11 Thread Gabor Szabo
Hi, I wonder what does .clone do and how can I create a deep copy or deep clone of an array? Reading https://docs.perl6.org/type/Array#method_clone I don't understand what does it do as the example there works without clone as well: suggest I'd need a > my @a = (1, 2, 3) [1 2 3] > my @b = @a;

processing misunderstand or bug?

2017-07-15 Thread Gabor Szabo
Hi, I don't understand this, and I wonder could shed some light on the situation? I have the following experimental program: use v6; my $proc = Proc::Async.new($*EXECUTABLE, "-e", "sleep 2; say 'done'"); $proc.stdout.tap: -> $s { print $s }; my $promise = $proc.start; await $promise; If I

Re: processing misunderstand or bug?

2017-07-15 Thread Gabor Szabo
Hi, Brandon, thanks for the explanation. If I understand correctly, then this means Ctrl-C sends a SIGINT to both the main process I ran and the child process I created using Proc::Async. When I run kill -2 PID it only sends the SIGINT to the process I mentioned with PID. (Which in my case was

Re: processing misunderstand or bug?

2017-07-15 Thread Gabor Szabo
Thank you! This helped us solve a major headache we had with processes hanging around after the tests have finished: https://github.com/Bailador/Bailador/issues/194 regards Gabor

Re: Memory usage

2017-07-20 Thread Gabor Szabo
On Thu, Jul 20, 2017 at 12:37 PM, Timo Paulssen <t...@wakelift.de> wrote: > On 19/07/17 21:52, Gabor Szabo wrote: >> Hi, >> >> is it possible to get the size of memory used by the current Perl 6 >> process? (From inside the code) >> Is it possible to g

set (+) set = bag ?

2017-07-21 Thread Gabor Szabo
Looking at Sets https://docs.perl6.org/type/Set I was happy to see (-) to work as I expected, but I was surprised to see that (+) created a bag. Is that intentional? How can I get back the set. Is the only way using the unicode character ∪ ? (This is Rakudo version 2017.04.3 so I might be behind

Re: set (+) set = bag ?

2017-07-21 Thread Gabor Szabo
On Fri, Jul 21, 2017 at 2:07 PM, Timo Paulssen wrote: > You want (|) to get the union of two sets as a set. > > https://docs.perl6.org/language/setbagmix#Set%2FBag_Operators > > hth > - Timo Oh thanks. Now I see there is also a link just under the "Operators" section of the

Re: Need sub for `LWP::UserAgent`

2017-07-27 Thread Gabor Szabo
LWP::Simple now allows you to set the header of your request. See my recent article with examples: http://perl6maven.com/simple-web-client I hope this helps. regards Gabor On Fri, Jul 28, 2017 at 7:42 AM, Todd Chester wrote: > Hi All, > > I am trying to convert a p5

accepting values on the command line

2017-07-01 Thread Gabor Szabo
I was hoping to wrote a simple script that would accept a bunch of filenames on the command line so I wrote: #!/usr/bin/env perl6 use v6; multi sub MAIN(@files) { say @files.perl; } $ perl6 code.pl6 Usage: code.pl6 $ perl6 code.pl6 abc Usage: code.pl6 $ perl6 code.pl6 abc def

Re: accepting values on the command line

2017-07-01 Thread Gabor Szabo
On Sat, Jul 1, 2017 at 4:30 PM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > >> On 1 Jul 2017, at 15:15, Gabor Szabo <szab...@gmail.com> wrote: >> >> I was hoping to wrote a simple script that would accept a bunch of >> filenames on the command line so I w

not enough memory

2017-06-29 Thread Gabor Szabo
hi, I've got this "not enough memory" twice today while trying to upgrade some packages using zef. Once when I ran 'zef upgrade zef' and then again when I ran 'zef --debug upgrade Bailador'. In both cases the error was shown during the running of the tests. After running the first command again

Re: not enough memory

2017-06-29 Thread Gabor Szabo
2017.06 built on MoarVM version 2017.06 implementing Perl 6.c. > > LL > > > On Thu, Jun 29, 2017 at 4:37 PM Gabor Szabo <szab...@gmail.com> wrote: >> >> hi, >> >> I've got this "not enough memory" twice today while trying to upgrade >>

How do you call the variable types?

2017-06-09 Thread Gabor Szabo
Looking at https://docs.perl6.org/language/variables there are 4 variable types with sigil: $, @, %, &. In Perl 5 I used to call them scalar, array, hash, and function respectively, even if the scalar variable had a reference to an array in it. How do you call them in Perl 6? As I understand @

Invoking method by name found in variable

2017-05-23 Thread Gabor Szabo
Hi, given an object $o and the name of a method in $method = "run" how can I invoke the $o.run() ? Something like $o.call($method) Gabor

How to upgrade a module?

2017-05-26 Thread Gabor Szabo
Hi there, So I have been working on Bailador and pushing out changes lately. How can I tell zef to upgrade it? I ran zef update zef install --force Bailador it installed Bailador again, but it was not the most recent code from GitHub. I tried zef upgrade Bailador It told me ===> Searching

Re: Absolute path to directory of the current perl program

2017-05-27 Thread Gabor Szabo
> I'm not sure why .absolute doesn't return an IO::Path object. Maybe that's > being addressed as part of Zoffix++'s IO work. > > > On Sat, May 27, 2017 at 10:07 PM Gabor Szabo <szab...@gmail.com> wrote: >> >> I came up with this: >> >>

Re: Get Better error message that "is trait on $-sigil variable not yet implemented. Sorry."?

2017-05-27 Thread Gabor Szabo
>> >> If you want to actually have the feature, put "[NYI]" in the subject line, >> for "not yet implemented". >> >> You can of course track Perl 6 bugs at in RT, perl6 queue: >> https://rt.perl.org/ >> >> On Fri, May 26, 2017 at 1:34 AM,

zef, zef-j, zef-m

2017-05-28 Thread Gabor Szabo
Hi, I've just noticed that in /Applications/Rakudo/share/perl6/site/bin/ I have 3 copies of every script. One with a -j and one with a -m at the end just as for zef: zef zef-j zef-m The files seem to be identical. Why are there 3 and what is their purpose? Gabor

Re: Absolute path to directory of the current perl program

2017-05-28 Thread Gabor Szabo
o >> 15:58 < Zoffix> .absolute is one of the two ways to stringify an IO::Path >> (the second being .relative) >> 15:58 < Zoffix> And .dirname is part of .parts; all Str objects as well >> >> >> On Sun, May 28, 2017 at 3:54 PM Gabor Szabo <szab...@gm

.add missing from IO::Path?

2017-05-28 Thread Gabor Szabo
Reading https://docs.perl6.org/type/IO::Path#method_child I thought I need to use .child or .add but .add does not seem to work: "foo/bar".IO.add("def") No such method 'add' for invocant of type 'IO::Path' in block at line 1 Gabor

Get Better error message that "is trait on $-sigil variable not yet implemented. Sorry."?

2017-05-26 Thread Gabor Szabo
I just tried: > my $x is Int = 42; ===SORRY!=== Error while compiling: is trait on $-sigil variable not yet implemented. Sorry. --> my $x is Int⏏ = 42; expecting any of: constraint and was a bit disappointed. It took me a while and reading the book of Andrew Shitov till I tried

Re: Compiling Rakudo in parallel

2017-05-26 Thread Gabor Szabo
That just confuses me :( Do I need to type make -j 4 and hope for some concurrency? or export MAKEFLAGS="-j2 --load-average=2" make as I was pointed to off-list? Would someone update the README that comes with Rakudo Star with this information, please? regards Gabor On Fri, May 26,

Re: Are sigils required?

2017-05-26 Thread Gabor Szabo
les#Sigilless_variables > > On Thu, May 25, 2017 at 11:10 PM, Gabor Szabo <szab...@gmail.com> wrote: >> >> https://docs.perl6.org/language/variables >> says: >> "Variable names can start with or without a special character called a >> sigil,"

Are sigils required?

2017-05-26 Thread Gabor Szabo
https://docs.perl6.org/language/variables says: "Variable names can start with or without a special character called a sigil," But then in the examples all 3 have sigils. How can a variable have no sigil? Gabor

Re: run() not capturing exitcode properly?

2017-05-29 Thread Gabor Szabo
On Tue, May 30, 2017 at 7:21 AM, Gabor Szabo <szab...@gmail.com> wrote: >> my $p = run "ls", "dadsad", :out, :err; > Proc.new(in => IO::Pipe, out => IO::Pipe.new(:path(""),:chomp), err => > IO::Pipe.new(:path(""),:chomp)

Re: Is there a linter for Perl 6? (like Perl::Critic or pylint)

2017-06-03 Thread Gabor Szabo
r/Bailador/blob/main/t/00-lint.t regards Gabor On Thu, Jun 1, 2017 at 2:50 PM, Ahmad Zawawi <ahmad.zaw...@gmail.com> wrote: > Hi Gabor, > > Like https://atom.io/packages/atom-perl6-editor-tools for instance or > project-level linting? > > Regards, > Ahmad > > &g

How to install from a specific Git branch?

2017-06-07 Thread Gabor Szabo
Hi There! In the Bailador project we use a branch called 'dev' for development and one called 'main' for releases. Or at least we try to. In the META.list of the ecosystem https://github.com/perl6/ecosystem/blob/master/META.list we have listed the 'main' branch:

Is there a linter for Perl 6? (like Perl::Critic or pylint)

2017-06-01 Thread Gabor Szabo
e.g. I'd like to check that every pl pm and t file in our project has a "use v6;" at the beginning. regards Gabor

The speed (improvement) of Rakudo

2017-06-16 Thread Gabor Szabo
Hi, Is there some measurements regarding the speed of Rakudo? e.g. It would be nice to have a graph of some hand-picked operations measured at different points in time of the development of Rakudo and then graphed in a nice way. Is there anything like that? Gabor

Re: next

2017-06-16 Thread Gabor Szabo
On Sat, Jun 17, 2017 at 4:19 AM, ToddAndMargo wrote: > On 06/16/2017 06:08 PM, Brandon Allbery wrote: >> >> On Fri, Jun 16, 2017 at 9:02 PM, ToddAndMargo > > wrote: >> >> I am afraid I am not understanding "next"

Re: The speed (improvement) of Rakudo

2017-06-17 Thread Gabor Szabo
The first one is the closest to what I was hoping to see. Very impressive. Thanks. Gabor On Sat, Jun 17, 2017 at 9:10 AM, H.Merijn Brand <h.m.br...@xs4all.nl> wrote: > On Sat, 17 Jun 2017 07:46:46 +0300, Gabor Szabo <szab...@gmail.com> > wrote: > >> Hi, >&

Re: How do you call the variable types?

2017-06-09 Thread Gabor Szabo
me that 'scalar' gives the wrong impression compared to >> arrays. A scalar in a vector is a component of a vector. >> >> I was thinking of "generic". >> >> Hence "$variable" is a generic variable because it can hold any type of >> content. >> &g

  1   2   >