Binary distributions

2006-01-27 Thread Gabor Szabo
Why do we need to reinvent this wheel ?

Most of the platforms out there have some binary packaging system.
Solaris has their own, Linuxen have rpm/deb or whatever else they have.
ActiveState with its binary Perl distributions have ppm and while that's
not perfect we read that they are working on fixing the issues.
As someone just mentioned the FreeBSD ports are kept very up-to-date.

I have just moved to Ubuntu and thought I will try to rely on apt-get
to install my Perl modules. Quckly I hit a wall and could not install some
of the basic modules. I did not have the time to investigate and check
if I made a mistake or if there is a .deb repository with the latest CPAN
modules for Ubuntu. I reverted to use CPAN.pm.
BTW here is an article on how to build Debian packages of Perl modules:
http://www.debian-administration.org/articles/78


Anyway I think instead of trying to setup our own binary distribution
we might want to make sure there are up to date repositories of
Perl modules for the major distributions
(and I am not talking only about Linux distributions here).
It can be done by helping the people who already maintain some of these
distributions or by setting up repositories such as debian.cpan.org,
fedora.cpan.org, etc...

Gabor


Re: Binary distributions

2006-01-28 Thread Gabor Szabo
On 1/28/06, Tels <[EMAIL PROTECTED]> wrote:
> Moin,
>
> On Saturday 28 January 2006 08:20, Tyler MacDonald wrote:
> > Gabor Szabo <[EMAIL PROTECTED]> wrote:
> > >
> > > Anyway I think instead of trying to setup our own binary distribution
> > > we might want to make sure there are up to date repositories of
> > > Perl modules for the major distributions
> > > (and I am not talking only about Linux distributions here).
> > > It can be done by helping the people who already maintain some of
> > > these distributions or by setting up repositories such as
> > > debian.cpan.org, fedora.cpan.org, etc...
> >
> >   That is such an incredibly good idea. I've got plenty of bandwidth
> > to burn and I'm willing to set up debian.cpan.org.
>
> Of course you must reliaze that, except for pure-perl modules and very
> controlled environments, binary distributions are doomed to fail.
>
> You simple cannot guess what libraries/compiler/system/kernel the user
> has installed, unless you know the distribution and version *and* require
> that the user never updates anything.

I think I agree. That's what I would like to see solved. If I stick to
the standard
apt-get (or whatever) of my distribution I would like to be able to get all the
CPAN modules by saying

# apt-get install Module::Name

> There is a reason that modules are compiled/linked against the target
> system prior to installation, and there is also a reason to run the
> tests: to assure that that step really worked.
>
> FreeBSD might get away with that because the user will ever only install
> their ports and they can make sure that they all play together. For
> everything else, this becomes a maintanance nightmare and I wish to be no
> part of that :)

This is for those who want specialized systems with non default versions
of libraries/applications etc. They should indeed install from source and run
the tests.

Others should be able to rely on the fact that the distributor has
already successfully ran the tests in a system with the same software
she has.

Gabor


Warnings during test

2006-03-04 Thread Gabor Szabo
When installing a module ( in this case Sub-Uplevel-0.09 on 5.8.8)
using CPANPLUS I saw many warnings passing by but as all the tests
were successful the report to the CPAN Testers was sent as PASS.

it would be useful to capture warnings printed on the screen
and then even somehow report this minor (?) failor to the author.

Gabor


UNIX commands: chmod

2006-03-25 Thread Gabor Szabo
Hmm, I don't really know how to do this but Gaal told me to
write up some proposal here.

So we had chmod in Perl5, I would like to make sure it works in
Perl6 as well with slight modifications.

LIST = chmod MODE, LIST

1) In list context it would return the names of the files successfully
 changed .
 In scalar context it should be the number of files successfully changed
 as it is in Perl5
2) In addition to the octet representation it would also be ready to receive
the unix style mode representation which is string
 one or more of the letters ugoa,
 one of the symbols +-=
 one or more of the letters rwxXstugo

3) While some of the modes are UNIX specific, it would be nice to find similar
modes in other operating system and do the right thing there too.
e.g. "all" in UNIX would map to "Everyone" in Windows/NTFS

4) "filename".chmod(MODE)  should also work and I guess
.chmod(MODE) should also work on those 3 files


I committed a test file t/builtins/system/chmod.t
but we really need the built in stat() function in order to test this.

Gabor


Re: UNIX commands: chmod

2006-03-25 Thread Gabor Szabo
On 3/25/06, Nicholas Clark <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 25, 2006 at 12:58:30PM +0200, Gabor Szabo wrote:
> > 4) "filename".chmod(MODE)  should also work and I guess
> > .chmod(MODE) should also work on those 3 files
>
> That seems to be implying a chmod method on all strings, and all lists.
> Assuming chmod doesn't get special favours, how many methods would it need
> to implement all the existing builtins like this?

Not that I understand the problem here but "filename".slurp seems to work.
Did it get special favour?

Gabor


Re: UNIX commands: chmod

2006-03-26 Thread Gabor Szabo
On 3/26/06, Mark Overmeer <[EMAIL PROTECTED]> wrote:
> > LIST = chmod MODE, LIST
>
> My feeling is that this function design is a bit of a mistake.  Usually,
> one perl function maps on one operating-system function, but in this case
> it doesn't: it simulated the common chmod(1) user command.

[...]

> Of course, besides that you may implement a version which accepts a list,
> but that is certainly not needed except for perl5 compatibility...

If we look at Perl just as a high-level language than you might be right,
and I really liked the object being returned idea, but I think Perl should
also keep serving the system administrators with much simpler needs.

Perl was quite a good replacement to shell scripting but there are several
places where writing shell commands is sill much simpler. It would be nice
if the this end of the programming spectrum - writing one liners and
small scripts - would be also further strengthened.

Gabor


W3C validator

2006-05-08 Thread Gabor Szabo

I must be missing something but I don't understand why is there
no module that would provide the W3C validation without hitting
http://validator.w3.org and without the need to setup a similar web site?

WWW::CheckSite::Validator uses that web site
WebService::Validator::HTML::W3C provides an interface to the W3C web site.

Did I miss the module or is there some difficulty in creating such module,
something I don't see?

As an alternative, is there a downloadable and free command line tool
that would do this job ?

Gabor


Re: W3C validator

2006-05-08 Thread Gabor Szabo

I checked it again, one can download the source code of their service
from here http://validator.w3.org/source/
and it is even packaged in some of the linux distros.

(It is of course slightly outdated on Debian)

Someone might want to write a wrapper around it
or maybe use WebService::Validator::HTML::W3C with a
local URL instead of the real W3C service.

Gabor


Re: Getting to hello world?

2006-05-22 Thread Gabor Szabo

On Ubuntu it was quite straigt forward, I think this is everything I needed:

sudo apt-get install subversion
sudo apt-get install ghc6

mkdir ~/src
cd ~/src

# To compile Parrot
svn co https://svn.perl.org/parrot/trunk parrot
cd parrot
perl Configure.pl --prefix=$HOME/parrot --cc=cc --cxx=CC --link=cc --ld=cc
make
make test
make install

# added the following to ~/.bashrc and ran source ~/.bashrc
export PATH=$HOME/parrot/bin:$PATH
export LD_LIBRARY_PATH=$HOME/parrot/lib/
export PARROT_PATH=$HOME/work/parrot


# To compile Pugs I use the following:
cd ~/src
svn co http://svn.openfoundry.org/pugs
perl Makefile.PL
make

I have not "installed" it anywhere

# Now I can use it
./pugs -e 'say "Hello world"'


Gabor


Re: Getting to hello world?

2006-05-22 Thread Gabor Szabo

On 5/23/06, James E Keenan <[EMAIL PROTECTED]> wrote:

Gabor Szabo wrote:

> On Ubuntu it was quite straigt forward, I think this is everything I
> needed:
>
> sudo apt-get install subversion
> sudo apt-get install ghc6
>

Given that, in the above, you installed subversion and ghc6 for all
users ...
>
... is there some reason why you chose to install parrot only under your
home directory?


There was no particular reason besides the fact that I went the way of
least resistance. Installed using apt-get what I could and from source
the rest.

Besides this is my notebook so I am the one and only user.
Hopefully :-)

But as I have not played with Pugs for some time I only realised after
sending the
e-mail that in the meantime Pugs started to require GHC 6.4.1.
The onethat I got with apt-get was 6.4 so Pugs does not compile any more
on my machine.

I have just downloaded the GHC 6.4.2 source and will try to compile it later.

Gabor


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 question is: why is it doing that or, more to the point, what am I
doing wrong?



I am not sure, maybe the . before "\n" cause the problem but why not try this
one:

my @array = (1, 2, 3);
say join "|", @array;

Gabor


eval

2006-05-24 Thread Gabor Szabo

if eval "command" fails, where can I get the error message ?

aka  $@ in P5 ?

Gabor


Re: perl 6 hosting?

2006-05-24 Thread Gabor Szabo

On 5/25/06, David Cantrell <[EMAIL PROTECTED]> wrote:

I might be able to host a virtual machine with perl6 on it and give out
accounts.  I need to think about how to stop people being naughty
though.


Probably the easy part is to to remove the most dangerous calls such as
eval and system and then chroot the users.

The hard part is to make sure they won't write code to exploit other sites or
create hug load on your machine...
... but if someone does it in Perl6 that might be a good sign of the
maturity of Pugs.

Ah and you could also declare that all the code uploaded to that
server is automatically copyright Perl Foundation and can have a
public log of it.

Gabor


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: 3 Good Reasons...

2006-05-26 Thread Gabor Szabo

[
  I am sorry this will not respond directly to the message in question as
  I have not seen it in my inbox. I hope the attribution is correct though.
]

On 5/26/06, Dr.Ruud <[EMAIL PROTECTED]> wrote:

>> Not really. Think about a Cobol-to-Parrot translator. You could for
>> example use Perl (glue) to add GUI stuff to old Cobol programs.


Ocassionally I have this dream of having a Cobol-to-Parrot compiler and being
able to go into these huge financial institutions with a solution on how to add
GUI to Cobol, or just how to make it a lot easier to add more features
but then I wake up.

One of the reasons these companies still use Cobol is that they are afraid
of anything new.
They want a reliable (read blame-able, sue-able) company to provide
for their hardware, OS and Cobol compiler. Unless they are forced (eg.
by SWIFT) they
won't leave their current setup.

Even if another reliable (read as above) supplier comes along IMHO their
sales people would have tough time to convince the company to switch.

IMHO - and I really saw only a few such companies - these companies have 0
automatic tests so it would cost them a lot of time and money to test their
application on the new and shiny Cobol compiler.

Gabor


Using Perl in QA departments

2006-06-17 Thread Gabor Szabo

If anybody is interested on this list,
the slides and the examples of my 2 days course are available here:

http://www.szabgab.com/perl_in_test_automation.html

regards
  Gabor


Re: Using Perl in QA departments

2006-06-27 Thread Gabor Szabo

On 6/26/06, Leon Brocard <[EMAIL PROTECTED]> wrote:

This is really neat. You might want to add a link to Test::Expect too,
which makes it almost to easy to test terminal-based programs.


I only recently saw Test::Expect, I'll look at it more deeply and
will include a set of examples using it as well.

If there other ideas what I should include I'd be glad to hear that
and if any of you wants me to give a training class to your fellow
employees just contact me off list. I am willing to travel.

Gabor


Re: Using Perl in QA departments

2006-06-27 Thread Gabor Szabo

On 6/25/06, Ian Langworth <[EMAIL PROTECTED]> wrote:

Looks a little familiar.. Great job!


I first wrote it about 2 years ago but only recently decide to
make it available to the general public.
I decided to do so now so it won't come out after the
Big Perl Testing Book you mentioned in here:
http://www.theperlreview.com/Interviews/ian-ptdn-20050712.html

Gabor


Expect on Windows

2006-06-27 Thread Gabor Szabo

As Test::Expect was just mentioned here, I would like to know why Expect and
thus Test::Expect does NOT work on Windows?


I have also asked this on use.perl:
http://use.perl.org/~gabor/journal/30069

Gabor


check if all the links on an HTML page are working (except the mailto links)

2006-07-06 Thread Gabor Szabo

Using  Test::WWW::Mechanize 1.10 I am trying to
$w->page_links_ok();

on a page that has an e-mail address in it and the test fails.

How could I tell TWM not to bother with the mailto links on the page?

Gabor


Re: check if all the links on an HTML page are working (except the mailto links)

2006-07-08 Thread Gabor Szabo

On 7/6/06, Andy Lester <[EMAIL PROTECTED]> wrote:


On Jul 6, 2006, at 10:22 AM, Gabor Szabo wrote:

> Using  Test::WWW::Mechanize 1.10 I am trying to
> $w->page_links_ok();
>
> on a page that has an e-mail address in it and the test fails.
>
> How could I tell TWM not to bother with the mailto links on the page?

That's silly that it tries the mailto.  I'm fixing it right now.


thanks.
1.12 works well.

Gabor


Testing various HTML constructs

2006-07-08 Thread Gabor Szabo

During web testing using Test::WWW::Mechanize I can check if
the current page has the correct links (by fetching all links)
and if the pages has the correct forms with the correct input fields.

How can I check other HTML constructs?

Specifically I know there should be two tables on the page.
One of them belongs to a form the other one should contain a
list of device names. How can I retreive the list of tables and then how
can I parse the tables?

Later I'll have to check 'ordered lists' and then other constructs.

I guess I can write up something using HTML::Tree but I wonder if there
is something similar to the ->forms method of Mechanize just called ->tables.

Running a new search on CPAN brought up HTML::TableExtract that sounds good.
What about other HTML constructs?


Gabor


WWW::Mechanize 1.18 passing value of submit field

2006-07-11 Thread Gabor Szabo

On a form the submit button looks like this:



when this form is submitted using

$w->submit_form (
   fields => {
   fname => 'Foo',
   });

the field submit and its value Update does not seem to be sent
to web server. If I add

   submit => 'Update',

to the list of the fields, it silently ignores this field.
In my case this causes the application to fail as it derives some state
information from the value of the submit field.

Using Firefox the submit=Update is sent to the server.

How can I fix this?

  Gabor


Re: WWW::Mechanize 1.18 passing value of submit field

2006-07-11 Thread Gabor Szabo

On 7/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> How can I fix this?

WWW::Mechanize(3pm)


$mech->submit_form( ... )

   This method lets you select a form from the previously fetched page,
   fill in its fields, and submit it. It combines the form_number/form_name,
   set_fields and click methods into one higher level call. Its arguments
   are a list of key/value pairs, all of which are optional.

   [stripped]

   * button => button
   Clicks on button button (calls "click()")


Thanks this indeed works.


From the documentation it is not clear (to me) why is the value of the submit

button sent only if I specify button => button
The doc only sais this:

 If button is not passed, then the "submit()" method is used instead.

regards
  Gabor


Re: WWW::Mechanize 1.18 passing value of submit field

2006-07-11 Thread Gabor Szabo

On 7/11/06, Andy Lester <[EMAIL PROTECTED]> wrote:


On Jul 11, 2006, at 9:07 AM, Gabor Szabo wrote:

>  If button is not passed, then the "submit()" method is used
> instead.

Perhaps it could be clearer then: submit() does not pass any button
unless you specify it.


Yes maybe that, in addition to the current sentence.

Also I think if the button is not specified but someone adds a

fields => {
 buttonname  => 'some value'
}

this should generate at least a warning (and not silently ignored as
it seems to be today). After all the coder seems to desperately want
to send the value of the
submit button.

Gabor


fetching module version from the command line

2006-07-12 Thread Gabor Szabo

While checking if the versions of all the modules are as
required in our installation I am using the following one liner to
fetch the version numbers.

perl -MModule -e'print $Module::VERSION'

Some of the modules print extra error messages and some print
only error messages.
I have sent e-mail to the respective module authors reporting this
issue but I wonder if it would this a good practice in the genric case.

Is there a Test module that test just the above?
Is the a CPANST score one can get if all the modules in a distro
provide the correct version information and if they don't print anything
else to STDOUT or STDERR.

Gabor


Re: fetching module version from the command line

2006-07-13 Thread Gabor Szabo

On 7/13/06, Fergal Daly <[EMAIL PROTECTED]> wrote:

I could change it so that it tries to figure out whether it's being
used for real or not and disable the END block code but that's stress
and hassle. As a module author, as far as I'm concerned, if MakeMaker
can figure out my version then my job is done,


So the only thing that would be correct is to search @INC for the .pm file
and then grep it with the same regex MakeMaker uses.

Gabor


Testing code that forks

2006-07-14 Thread Gabor Szabo

Hi all,

what is the current best practices for testing code that forks?
I saw there was a recent discussion about patching Test::More
to support forking.
Is that going to happen or are there better ways to do it?

Gabor


Re: Lessons from the test function parameter placement quibbles?

2006-07-19 Thread Gabor Szabo

On 7/19/06, Michael G Schwern <[EMAIL PROTECTED]> wrote:

Descriptions are optional because they are not necessary for the test.
 Sometimes a test doesn't need a description, its obvious from reading
the code what its doing.  Sometimes it would be redundant.  Sometimes
you're just writing fast.  I write tests without descriptions all the
time.

Its not Test::More's job to enforce style.  The more things are
optional the more useful to more people it is.


What about someone creating a module  Test::HaveNames or similar that
if added to a test file will add a last test being ok only if all the tests
had some name.

There could be also a Test::HaveUniqNames checking - in addition to the
existance of test names also uniqueness.

Gabor


Pugs on Windows

2007-02-06 Thread Gabor Szabo

On http://www.pugscode.org/ when I click "Download"
I get to the wiki on rakudo and (yippi it works again !)
but the link to the Win32 binary builds of Pugs and Parrot
brings me to http://jnthn.net/public_html/perl6/ which is 404.

Gabor


Re: What criteria mark the closure of perl6 specification

2007-02-27 Thread Gabor Szabo

On 2/26/07, Geoffrey Broadwell <[EMAIL PROTECTED]> wrote:

Hmmm.  Let's see if there is a way I can help to get what I want 

Assuming that the answer to my question in the other thread is "packed
arrays aren't implemented anywhere yet", are any implementations close
enough that I can trade tests for implementation?  Given my programming
style, creating a big pile of tests all at once won't really work (I'll
just end up creating a bunch of bad tests).  But I could probably loop
over "add a couple tests, implement piece of feature, add a couple more
tests, implement another piece, ..." with someone.

It wouldn't be a particularly *fast* iteration, but at least there would
be some movement 


wow, I think that's exactly the point.
Just write a missing test that fails as there is no implementation yet,
commit it to the Pugs repository and sooner or later someone will
implement the feature.
Then go to the next part og thre feature.

I wishe there were many people out there writing tests for not-yet
implemented features.

Gabor


Re: Parrot, Perl 5 and performance

2007-03-13 Thread Gabor Szabo

On 12 Mar 2007 14:29:49 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi all,

I'd like to get opinions from developers on this list. I'm looking
into this system that executes massive amounts of Perl 5 code on a
Perl 5.8 interpreter.  The system burns tons of CPU while running Perl
code, and I'm speculating on ways to improve our throughput (say, 50
billion inst per module -> 10 billion inst/modl) and latency (say, 2
sec/modl -> 0.5 secs/modl).


Have you tried to profile your code and see if there are place to do
optimizations?

Gabor


testing script using Term::ReadLine

2004-11-15 Thread Gabor Szabo

I have a script using Term::ReadLine to get input.
I'd like to test it by executing it using another script
and providing answers from the script test script.
I tried IPC::Run with no success but as I notice even simple redirection
such as

input.pl < in.txt

does not work.
Any ideas how to automatically test such a script ?



An example of my script that I would like to test looks like this:


use strict;
use warnings;
use Term::ReadLine;

my $term = new Term::ReadLine('');
my $first = $term->readline("First: ");
my $second = $term->readline("Second: ");

print "\n";
print "First: $first\n";
print "Second: $second\n";




thanks in advance
   Gabor


WWW::Mechanize 1.08 fails on some tests

2004-12-28 Thread Gabor Szabo
While trying to install WWW::Mechanize today some of its tests failed:
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
---
t/live/follow.t 2   512112  18.18%  6-7
t/live/follow_link.t  255 65280 76  85.71%  5-7
t/live/get.t   13  332826   13  50.00%  7 9 11 13 15-17 19-22 
24-25

Looking at t/live/follow.t shows that it wants to follow a link using
   text_regex => qr/Business.Solutions/i
but currently there is no such link on Google.
At least when *I* try to access Google with a browser I 
don't see such a link.

I have not checked the rest of the errors but I guess they are also
due to changes in web sites.
This brings me to the question, or two:
Should any of the module installation processes access web sites ?
If yes, is that OK to that without asking the user first ?
Should it be a public site such as Google that can change and cause the
tests fail or should it be a private site or at least a more static one.
(E.g www.cpan.org ?)
I know you are not sending over data, but still.
Gabor


Re: WWW::Mechanize 1.08 fails on some tests

2004-12-29 Thread Gabor Szabo
On Wed, 29 Dec 2004, Michael G Schwern wrote:
At least when *I* try to access Google with a browser I
don't see such a link.
I do see such a link but its possible Google is showing you a different
page because you're coming from .il.
yes, that might be the case.
This brings me to the question, or two:
Should any of the module installation processes access web sites ?
If yes, is that OK to that without asking the user first ?
If the implication here is that there's some sort of security or politeness
issue, its perfectly ok.  A GET isn't going to hurt you.
me not. but I am not the only one here.
Should it be a public site such as Google that can change and cause the
tests fail or should it be a private site or at least a more static one.
(E.g www.cpan.org ?)
Static is better where static is needed.  cpan.org is a good suggestion.
If the author has reliable hosting available putting up their own page
is good, too.  Shipping the code with a small HTTP daemon is even better.
I should have say stable (that does not change much or you are in
control) as that what I meant.
Gabor


Coverage testing of web application

2005-03-02 Thread Gabor Szabo
So far I have been using Devel::Cover only in cases where I run code
to be analyzed directly.

I wonder how should I setup Devel::Cover to test a web application
while my test suit is
actually using WWW::Mechanize and I am exercising the relevant code
via a real web server?

How to check the coverage of the CGI scripts and the modules used by them ?



Gabor


Re: Phalanx

2005-03-30 Thread Gabor Szabo
On Wed, 30 Mar 2005 21:45:23 -0600, Walter Goulet <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Ok, so I've been trying to get started with testing Net-SSLeay for the
> Phalanx project. Now the problem I've been having is getting my arms
> around how to improve the coverage of the tests included with that
> module. It doesn't look like this module uses the t/ framework, rather a
> series of scripts in a given subdirectory are executed to test the module.
> 
> So I guess my question is, what exactly am I supposed to do to improve
> test coverage? Am I supposed to modify the existing scripts so they
> execute more functions exported by the module? Are any of the other
> modules currently being tested not using the t/ framework?

I would start by replacing the test.pl file with test scripts in the
t/ directory
and start using Test::More. Then I would split it up to several scripts and 
start testing more functions just as you suggested.

I had a similar approach with HTML::Template. You can see the previous version
and current version on http://search.cpan.org

Gabor


Re: [ANNOUNCE] Devel::Cover 0.41

2004-04-29 Thread Gabor Szabo

Where would we be without your work ?

Out in the desert to fall prey to any bug ?
At least we can run and get some cover.


Thank you !

Gabor


reporting bugs to RT

2004-05-05 Thread Gabor Szabo

Is there some command line tool that can be used to report bugs to RT ?

Something that after I saw that make test fails (or even if it just
prints warnings) I can type some command line magic and will submit
a bug report with all the relevant information including the output
of make test.

Similarly during the time I use the module I might want to report
a bug and it would be nice if I did not have to think much about
how to collect the various pieces of information about my installation
and the module.


Gabor


Re: reporting bugs to RT

2004-05-05 Thread Gabor Szabo

On Wed, 5 May 2004, Andy Lester wrote:

> On Wed, May 05, 2004 at 11:40:32PM -0200, Gabor Szabo ([EMAIL PROTECTED]) wrote:
> > Is there some command line tool that can be used to report bugs to RT ?
>
> Sure, it's called "sendmail".
>
> If you want to send a bug on Test::Harness, send an email to
> [EMAIL PROTECTED]

Nice, thanks.

I guess this answer also means that there is no script similar to
perlbug that would report bugs about CPAN modules ?
Wouldn't this help increasing the use or RT ?

AFAIK there were some complains that RT is underused.
Is that complain about lack of reports or lack of responses to the reports?
Or am I just halucinating about the complain ?

Gabor



Re: Devel::Cover: completing $x{foo} ||= 1 conditions

2004-05-21 Thread Gabor Szabo
On Fri, 21 May 2004, Paul Johnson wrote:

> On Thu, May 20, 2004 at 04:34:39PM -0400, Geoffrey Young wrote:
>
> > hi paul.
> >
> > I've found that in a statement like
> >
> > $x{foo} ||= 1;
> >
>
> This is unlikely to be the only case in which I have not fully
> understood the subtleties of the op tree, and so I am grateful for
> reports such as this.

This was in the writing just did not finish the report:
I have not tested you recent patch. That might have solved this one
too as this is very similar.


$a = func() || croak("we have some problem");

According to Devel::Cover the above statetement
has 3 states. One of them, when croak returns 1
will never happen as croak never returns.


regards
   Gabor



Re: Devel::Cover: completing $x{foo} ||= 1 conditions

2004-05-21 Thread Gabor Szabo

purple


>
> >> I might like to signal Devel::Cover that func() has a constant return (or
> >> lack thereof).
> >
> >


>
> however, in the process of development we are required to analyze any of the
> inevitable gaps and decide whether the unhit condition is valid.  if it is
> we write  a test for it.  if it represents a condition we would explain away
> (D::C limitation, or whatnot) then it would be nice to have some way to
> track it within the tool itself.  partially to appease management with heavy
> greens, but more to save development cycles chasing down issues I (or other
> developers) have analyzed before.


D:C might need another color which is displayed in such cases.

Once I got a red, analyzed the situation and decided it is a good red
I'd like to be able to signal Devel::Cover about it. Still I'd like
to be able to easily see which cases were "missed, but OK". It could be
reported somehow with a color such as dark green or purple.

This extra color still leaves place for questions on the side of
the management so there could be a flag such as --mcl
(manager compatible report) that would turn all the purple parts
to be green.


Gabor



how to run test.pl before the t/*.t tests ?

2004-06-18 Thread Gabor Szabo

I am dealing with a module which has a test.pl using Test.pm

Specifically I am talking about HTML::Template for which I try to
act as a hoplite.

I am trying to add a bunch of tests in t/ using Test::More but
in order to make sure we don't lose any previous test we would like to
keep the test.pl file as it is.

The problem is that when running make test it first executes the t/*.t
tests and only then the test.pl so I don't see the printout from Harness
as there are lots of OK lines printed out from the test.pl. Scrolling back
would be very boring. And does not scale well with CPAN.pm I guess.

So first I thought to try to run test.pl before the t/-tests. Hence the
subject. How to do this is still interesting, though maybe not necessary:


Later I played a bit with the t-tests to see what happens if they fail.
I saw that all of the cases I checked when the t/* test failed the test.pl
suit did not run at all. Meaning that I got the error message right in my
face. This is a good thing. My questions: can I rely on this ?

Can I be sure that no matter what error message I get in the t/* tests I
will see them ?



Thinking a bit further, I still have a problem as when all tests
are successful I still would like to see the printouts of the skipped
tests from the t/ directory. So maybe after all I should change the order
of test.pl and t/* if that's possible.


your help is appreciated
   Gabor


testing for unsuccessful require - mocking require ?

2004-06-19 Thread Gabor Szabo

I would like to test a module for unsuccessful "require" while the
required module is installed. That is I'd like ot test how my code would
work if Foo.pm was not present.

In the middle of a module I have code such as

eval {
   require Foo;
};
if ($@) {
   foo();
} else {
   my_own_foo();
}

I already installed Foo so I can test the behaviour of the code
with Foo. How can I test now the behaviour without Foo ?
Removing Foo.pm is not an option.

I have some ideas outlined below, but I'd like to get your recommendation.

The first solution was to reset @INC = (); so that require won't
find Foo. This seems to be good with one minor problem.
Just before require Foo; I have require Bar; and I'd like to
be able to  actually use Bar in the same code.


I thought of overriding the built in require function so it will
selectively either throw an error message or execute the core behaviour.
That is on Foo it will throw an error message while on the rest, including
Bar it will do the work.


According to the Cookbook (2nd) I cannot override require as of 5.8.1.

I am using 5.8.4 right now and tried
1) use ex::override
got:  require cannot be overridden because it doesn't have a prototype at
override.pl line 3


2) use Function::Override;
got: Cannot override the non-overridable builtin 'require'


3) rolled my own override using
use subs qw(require);
and the example code from perldoc -f require

This seems to be working.


So I am a bit confused for why 1 and 2 are not working while using my own
code does.


In general I'd like to get your opinion on how to mock unsuccessful
require.

thanks
   Gabor














Re: Single Sign-on Re: Perl Passport?

2004-07-06 Thread Gabor Szabo
On Tue, 6 Jul 2004, Oliver Schnarchendorf wrote:

> On Tue, 6 Jul 2004 13:12:16 +0800, Kelvin Wu wrote:
> > dunno whether this is the right place to post, but i am looking for a
> > solution(for both win32 and linux), something like microsoft passport,
> > one login account can be used cross over domain names.
> What you are looking for is Single Sign-on. Which is a pretty awful problem to solve.

If you are looking for a web based solution then I think this is what
http://auth.perl.org/  will solve.
I am not sure if the code will be available or just the service.


Gabor



Devel::Cover on Windows, ppm anyone ?

2004-07-15 Thread Gabor Szabo

I can see from the testers page that Devel::Cover is supposed
to work on Windows.
Is there a ppd distribution of it somewhere so I can install
it on ActivePerl without a compiler ?

Currently if I type

ppm install Devel::Cover

I get version 0.2 of Devel::Coverage. Not what I wanted.


Gabor



RE: Devel::Cover on Windows, ppm anyone ?

2004-07-16 Thread Gabor Szabo
On Fri, 16 Jul 2004, Jan Dubois wrote:

> I've forwarded your message to our build engineer to look into.
>
> Please send questions about PPM build process to the ppm mailing list
> (it only accepts messages from subscribers though).
>

Thanks everyone for dealing with this. I hope we'll see DC
built by ActiveState soon.

Gabor


Re: CPANTS preview - coverage in CPAN testers reports

2004-07-24 Thread Gabor Szabo
On Sat, 24 Jul 2004, Thomas Klausner wrote:

> >  - Test coverage.
>
> Impossibly, because CPANTS does not run code.

But it could fetch it from some other place that does it, right ?

What about adding (optional) coverage reports to the reports
the CPAN testers send in ?

Gabor


Re: CPANTS preview - coverage in CPAN testers reports

2004-07-24 Thread Gabor Szabo
On Sat, 24 Jul 2004, Thomas Klausner wrote:

> > What about adding (optional) coverage reports to the reports
> > the CPAN testers send in ?
>
> That might be a good idea. But AFAIK, coverage reports can vary greatly on
> different platforms/Perls/installed modules

IMHO this is exactly the reason it can be interesting to receive it from
several sources. Then CPANTS could display some statistical number about
the reports.

Gabor



CPAN smoking with cpansmoke and CPAN::Nargile

2004-10-16 Thread Gabor Szabo

Good evening,

I am trying to use cpansmoke but I have a couple of issues

1) How can I say if I don't want to test a class of modules ?
   e.g.
 non of the Win32::* modules as I am on linux
 no Oracle related modules as I have no Oracle
 etc.


2) How can I run smoking on a machine that does not get e-mails
   from the CPAN Tester list ?


3) Report issues that seem to originate from CPANPLUS actually.
  e.g. this one:
  Can't coerce array into hash at
  /home/gabor/perl/585/lib/site_perl/5.8.5/CPANPLUS/Internals/Install.pm
  line 169



I hope someone will answer these questions and render my newly uploaded
module unnecessary at all. In case there is no easy or good solution to
the above, or you just want to spend your free time on some useless
material you might try CPAN::Nargile. It is a front-end to cpansmoke that
uses the recent module list from cpan.org to decide which module to test.
One day it will try to address the above issues unless someone explains
me how can I do it with the existing tools.

Your input is appreciated

Gabor


Build Status of CPAN modules from ActiveState

2004-10-02 Thread Gabor Szabo

On this page
http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository
there are two links to the build status of various CPAN modules
using 5.6 and 5.8 respoectively.

http://ppm.ActiveState.com/BuildStatus/5.6.html
http://ppm.ActiveState.com/BuildStatus/5.8.html
Warning: They are big, around 5 Mb each.

The individual build results have their own separate files such as

http://ppm.activestate.com/BuildStatus/5.8-windows/windows-5.8/Acme-1.111.txt

I wonder if there was already a way to get the collected data similarry
to the one you can get from http://testers.cpan.org/

If not, would it make sense to collect the information from their
web site and put them in a separate - searchable - database ?

It could be made available via a link from search.cpan.org and it
could be also included in the results of CPANTS.


Gabor
http://www.szabgab.com/


Devel::Cover - what do the numbers mean ?

2003-10-04 Thread Gabor Szabo

I have just used Devel::Cover successfully for the first time.
I even got the HTML pages.

Great!

But what are those numbers and colors in the columns ?
I could not find in the documentation. Please point me to the
description if it is available somewhere.

thanks
  Gabor



Re: Devel::Cover - what do the numbers mean ?

2003-10-04 Thread Gabor Szabo
On Sat, 4 Oct 2003 [EMAIL PROTECTED] wrote:

> On Sat, Oct 04, 2003 at 11:00:33PM +0200, Gabor Szabo wrote:
> > But what are those numbers and colors in the columns ?
> > I could not find in the documentation. Please point me to the
> > description if it is available somewhere.
>
> Percentage of the code covered, I think.

That's what I thought and recalled from the presentation of Paul
and I understand the red 50 in branch and the red 33 in cond but
I don't understand the green 33 or the green 1 in stmt.
And the best is the green 108 stmt.

Sure I need some hand holding on this.

Gabor





Re: Devel::Cover - what do the numbers mean ?

2003-10-04 Thread Gabor Szabo
On Sat, 4 Oct 2003, Paul Johnson wrote:

> The colours are just eye candy, they map to the numbers.  The idea being
> that the red stuff is what you want to look at first.
>
> I suspect that you are right, and this is probably not documented
> anywhere.


Thanks for the answer !



Another question:

I am running coverage analyzis on the test suit of CGI::Application
with the intention of phalanxing it if Jesse (the author) agrees.

This module is used by sub-classing it. Devel::Cover collects information
and reports about each one of the sub-classes that are there to test only.
I wonder if it possible to to tell Devel::Cover not to waste time on the
coverage of these modules as they are not interesting ?


OK that was my original question but now I am not sure.
Maybe it is actually important to make sure each test sub-class is also
covered well within its tests ? Or maybe that's just the means of achieving
better testing of the real module ?

Gabor








running both test.pl and t/*.t ?

2003-10-12 Thread Gabor Szabo

I was under the impression (I think I read it somewhere) that when
running "make test" if there is a test.pl file and a set of tests
in t/*.t only the former (test.pl) will run an the t/ directory
will  be skipped.
I have just checked it and it seems to be not true.

That is, both test.pl and t/*.t were executed.


So did I remember incorrectly,
did something change in that respect
or am I hallucinating ?

Maybe all of the above ?


Gabor


reducing size of the Devel::Cover html report

2003-10-25 Thread Gabor Szabo

The HTML files generated by Devel::Cover are huge.
I ran coverage on HTML::Template and while the source code
is ~100K the HTML report is 2.5Mb

So I think some work should be done to reduce this size.
I made a simple change - removing leading spaces from the
templates - this reduced the file size by about 60% for HTML::Template.

The resulting file looks the same in Mozilla, please check it with other
browsers, eg. IE.

It is still huge ~870K but I could not find any easy way to remove
further large chunks without changing the resulting page.

What do you think about removing
1) the lines from the source code which are empty
2) removing the lines that display parts of the documentation ?


   Gabor



--- Html_subtle.pm.original Fri Oct 24 21:23:58 2003
+++ Html_subtle.pm  Fri Oct 24 21:43:50 2003
@@ -700,6 +700,10 @@
 [% END %]
 EOT

+foreach my $template (keys %Templates) {
+   $Templates{$template} =~ s/^\s+//gm;
+}
+
 1;

 =pod





Re: reducing size of the Devel::Cover html report

2003-11-12 Thread Gabor Szabo

On Tue, 11 Nov 2003, Michael Carman wrote:

> old format 2192 kB
> new format (default)326 kB
> new format w/ -option=pod,data  391 kB
> new format w/ -option=unified   340 kB
> new format w/ -option=pod,data,unified  406 kB

It sounds like a great work, obviously much better than I could imagine.

Gabor


tesing exceptions of Error.pm

2003-11-27 Thread Gabor Szabo

Hi,


in a code I am writing right now http://yapcom.pti.co.il/
I used to croak from functions deep down.
When testing for such errors I used code like this in my
test script:


eval {
   f(); # will croak
};
like($@, qr/Bad thing happened/, 'successfully tested bad thing');



Now I am trying to replace the croak/eval error handling with
try/catch of Error.pm so in the f() function
I replaced the

  croak('Bad thing happened');

by

  throw MyError('Bad thing happened');



How am I going to test this ?
I came up with the following in the test script:


use Error qw(:try);


my $ex;
try {
   f();
}
catch MyError with {
$ex = shift;
};
like($ex, qr/Bad thing happened/, 'successfully tested bad thing');


Now $ex is global but I think I cannot test within the catch block.
Shall I just add an extra block around the whole snippet above ?



Is this a good thing or a bad thing ?


Gabor



Re: tesing exceptions of Error.pm

2003-11-28 Thread Gabor Szabo
On Fri, 28 Nov 2003, Rafael Garcia-Suarez wrote:

> Andy Lester wrote:
> >
> > > How am I going to test this ?
> >
> > Take a look at Test::Warn for warnings, and Test::Exception for errors.
> >
> > I think qa.perl.org needs a listing of Test::* modules so that people
> > know what's available.
>
> http://search.cpan.org/search?query=Test-&mode=dist
>
> lists many of them, but maybe a more comprehensive list would categorize
> them in 'test modules that use the Test::Builder framework', 'test report utils'
> (such as Test::Harness), 'mod_perl related tests', etc.
>

Hmm, thanks.
Actuall I should have checked that first.

Some time ago I have started Bundle-Test mainly with idea - creating a
list of the Test Modules with a short explanation.
http://search.cpan.org/~szabgab/Bundle-Test/

Probably the right place is not a Bundle but I did not have
better idea then.


Gabor



Testing complex web site

2004-01-19 Thread Gabor Szabo

If this is OT, please point me to some better place to find an answer.

I am looking for a way to functional and load test a web site.

On the functional level:
Basic things can be achieved by WWW::Mechanize but I don't know yet how
to deal with Javascript in the response page.

On the load test:
Once I created functional scripts like :
1) access the home page
2) access the home page, search for xyz, click on the first link
3) like 2) + do a few other searches and then proceed to the
   check-out page and enter an order.


I'd like to be able to run within a short period of time[1]
80 users doing 1)
15 users doing 2)
5 users doing 3)

then of course I'd like to see all kinds of reports about success
and failor.


[1] Which will have to mean these accesses overlap and at some
point I'd like to know how many such visits can I serve in a minute.

Gabor



Re: Testing complex web site

2004-01-19 Thread Gabor Szabo
On Mon, 19 Jan 2004, Abe Timmerman wrote:

> If you're interested in that, I can send you a pre-alpha version, although I
> haven't got the time to work on it right now...

Yes, please send it over.


BTW One of the specific things I will have to automate is
OWA - Outlook Web Access which is said to have some horribly random
and dynamic Javascript based interface. I have not seen it but
I find it difficult to imagine that they can do something we
cannot catch.

Does anyone have experience with this specific web application ?


Gabor


Re: Testing complex web site

2004-01-19 Thread Gabor Szabo
On Mon, 19 Jan 2004, Adrian Howard wrote:

>
> On Monday, January 19, 2004, at 06:10  pm, Gabor Szabo wrote:
>
> > If this is OT, please point me to some better place to find an answer.
> [snip]
>
> Not OT in my opinion, but you also might want to try
> http://groups.yahoo.com/group/TestFirstUserInterfaces.

I hope we can indeed discuss things like this here as all of a sudden a
number of my clients have started to ask me questions about testing with
Perl.

One of them has an application written in .NET with C# and they also want
to run unit tests, regression tests and load tests. They want to know how
can we do that in Perl.

Obviously for that I will have a number of Windows boxen around if I can
convince them that we can solve their problem with Perl. Actually I am
not sure at all if in this case it is good for them to use Perl.



Thanks for the suggestions and pointers so far. Keep the flow !

Gabor




Re: Testing complex web site

2004-01-19 Thread Gabor Szabo

On Mon, 19 Jan 2004, Ed Summers wrote:

> If you are testing from the cmd line
One of the prime problems of my customers is the fact that I don't give
them a nice GUI for the test tool where they can click.

> the nice thing about Perl's testing
> framework is that it would be feasible to write C# programs that write
> test results to STDOUT and STDERR, which are then consumed by Test::Harness.

Actually I think there are frameworks in C# to write such Test::More like
tests. But if there are not and someone writes a Test::More replacement
in some other language (C# in our case) then why not write a replacement
for Test::Harness as well in that language ?
What would perl give me in this case ?


> We do that where I currently work to use Perl to test PHP code...essentially
> we've just got a mini Test::More written in PHP.

I'd be glad if you could share it with the world if it is not ready for real
distribution then only with me.

Gabor



Re: Is Perl 6 too late?

2007-05-14 Thread Gabor Szabo

On 5/14/07, John Macdonald <[EMAIL PROTECTED]> wrote:

 Removing the sigil
on a function call (it used to always be written &sub(args...))
did, I think, lead to the difficulty in perl5 where it became
difficult to add new keyword operators to the language - because
they could conflict with subroutine names in existing code.


Actually I think I never understood  this issue.
We claim that having the sigils saves us from stepping on our future
feet by making sure keywords of the language are always different
from any variable we might create.

The fact that function don't need a sigil any more and it is even
AFAIK discouraged to be used makes *this* argument mute.

Thought this thread might not be the best place to ask this
I'd be glad to read some explanation about this.

regards
  Gabor


build error

2007-08-30 Thread Gabor Szabo
I am experimenting a bit with the compilation of Parrot

perl Configure.pl --gc=malloc-trace
make

stopped with:

src/malloc.c:4719: warning: function call has aggregate value
make: *** [src/malloc-trace.o] Error 1

below is the stderr

  Gabor

print_newline 1211   experimental, not in ops.num
print_newline_p   1211   experimental, not in ops.num
gcd_i_n_n 1212   experimental, not in ops.num
gcd_i_nc_n1213   experimental, not in ops.num
gcd_i_n_nc1214   experimental, not in ops.num
gcd_i_nc_nc   1215   experimental, not in ops.num
gcd_i_i_i_i_i 1216   experimental, not in ops.num
gcd_i_i_i_ic_i1217   experimental, not in ops.num
gcd_i_i_i_i_ic1218   experimental, not in ops.num
gcd_i_i_i_ic_ic   1219   experimental, not in ops.num
splice_p_p_i_i1220   experimental, not in ops.num
splice_p_p_ic_i   1221   experimental, not in ops.num
splice_p_p_i_ic   1222   experimental, not in ops.num
splice_p_p_ic_ic  1223   experimental, not in ops.num
slice_p_p_k   1224   experimental, not in ops.num
slice_p_p_kc  1225   experimental, not in ops.num
slice_p_p_k_ic1226   experimental, not in ops.num
slice_p_p_kc_ic   1227   experimental, not in ops.num
iter_p_p  1228   experimental, not in ops.num
morph_p_i 1229   experimental, not in ops.num
morph_p_ic1230   experimental, not in ops.num
exec_s1231   experimental, not in ops.num
exec_sc   1232   experimental, not in ops.num
classname_p_p 1233   experimental, not in ops.num
trap  1234   experimental, not in ops.num
pow_n_n_i 1235   experimental, not in ops.num
pow_n_nc_i1236   experimental, not in ops.num
pow_n_n_ic1237   experimental, not in ops.num
pow_n_nc_ic   1238   experimental, not in ops.num
getclass_p_i  1239   experimental, not in ops.num
getclass_p_ic 1240   experimental, not in ops.num
new_p_i_s 1241   experimental, not in ops.num
new_p_ic_s1242   experimental, not in ops.num
new_p_i_sc1243   experimental, not in ops.num
new_p_ic_sc   1244   experimental, not in ops.num
instantiate_p 1245   experimental, not in ops.num
pmcinfo_i_p_ic1246   experimental, not in ops.num
new_p_p   1247   experimental, not in ops.num
new_p_p_p 1248   experimental, not in ops.num
new_p_p_pc1249   experimental, not in ops.num
add_io_event_p_p_p_ic 1250   experimental, not in ops.num
need_finalize_p   1251   experimental, not in ops.num
runinterp_p_p 1252   experimental, not in ops.num
runinterp_p_pc1253   experimental, not in ops.num
newpdd15class_p_s 1254   experimental, not in ops.num
newpdd15class_p_sc1255   experimental, not in ops.num
newpdd15class_p_p 1256   experimental, not in ops.num
newpdd15class_p_pc1257   experimental, not in ops.num
setstdout_p  SKIPPED: not in ops.num nor ops.skip
setstderr_p  SKIPPED: not in ops.num nor ops.skip
hash_i_p SKIPPED: not in ops.num nor ops.skip
src/exceptions.c: In function ‘do_panic’:
src/exceptions.c:152: warning: ‘noreturn’ function does return
src/gc/dod.c: In function ‘clear_cow’:
src/gc/dod.c:471: warning: request for implicit conversion from
‘void *’ to ‘struct Buffer *’ not permitted in C++
src/gc/dod.c: In function ‘used_cow’:
src/gc/dod.c:512: warning: request for implicit conversion from
‘void *’ to ‘const struct Buffer *’ not permitted in C++
src/gc/dod.c:530: warning: cast discards qualifiers from pointer target type
src/library.c: In function ‘Parrot_locate_runtime_file_str’:
src/library.c:442: warning: ignoring return value of
‘Parrot_get_runtime_prefix’, declared with attribute
warn_unused_result
src/packfile.c: In function ‘Parrot_load_bytecode’:
src/packfile.c:3388: warning: ignoring return value of
‘PackFile_append_pbc’, declared with attribute warn_unused_result
src/pmc_freeze.c: In function ‘push_opcode_number’:
src/pmc_freeze.c:627: warning: ignoring return value of
‘PF_store_number’, declared with attribute warn_unused_result
src/pmc_freeze.c: In function ‘push_opcode_string’:
src/pmc_freeze.c:648: warning: ignoring return value of
‘PF_store_string’, declared with attribute warn_unused_result
src/spf_render.c: In function ‘handle_flags’:
src/spf_render.c:179: warning: ignoring return value of

Re: build error

2007-08-30 Thread Gabor Szabo
On 8/30/07, chromatic <[EMAIL PROTECTED]> wrote:
>
> What's your platform?  Which compiler are you using?

sorry. this was my third attempt to post this report. I might have forgotten
to include this information:

gcc --version
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

uname -a
Linux notebook 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007
i686 GNU/Linux

Gabor
ps. the previous attempt to post were rejected with the error about possible
"Hi" virus. Even though it seems the problem was that I tried to attach the
stderr file.


perl Configure.pl --gc=malloc does not build either

2007-08-31 Thread Gabor Szabo
gcc --version
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)


perl Configure.pl --gc=malloc
make

this is the STDERR:

[...]
newpdd15class_p_s 1254   experimental, not in ops.num
newpdd15class_p_sc1255   experimental, not in ops.num
newpdd15class_p_p 1256   experimental, not in ops.num
newpdd15class_p_pc1257   experimental, not in ops.num
setstdout_p  SKIPPED: not in ops.num nor ops.skip
setstderr_p  SKIPPED: not in ops.num nor ops.skip
hash_i_p SKIPPED: not in ops.num nor ops.skip
src/exceptions.c: In function ‘do_panic’:
src/exceptions.c:152: warning: ‘noreturn’ function does return
src/gc/dod.c: In function ‘clear_cow’:
src/gc/dod.c:471: warning: request for implicit conversion from
‘void *’ to ‘struct Buffer *’ not permitted in C++
src/gc/dod.c: In function ‘used_cow’:
src/gc/dod.c:512: warning: request for implicit conversion from
‘void *’ to ‘const struct Buffer *’ not permitted in C++
src/gc/dod.c:530: warning: cast discards qualifiers from pointer target type
src/library.c: In function ‘Parrot_locate_runtime_file_str’:
src/library.c:442: warning: ignoring return value of
‘Parrot_get_runtime_prefix’, declared with attribute
warn_unused_result
src/packfile.c: In function ‘Parrot_load_bytecode’:
src/packfile.c:3388: warning: ignoring return value of
‘PackFile_append_pbc’, declared with attribute warn_unused_result
src/pmc_freeze.c: In function ‘push_opcode_number’:
src/pmc_freeze.c:627: warning: ignoring return value of
‘PF_store_number’, declared with attribute warn_unused_result
src/pmc_freeze.c: In function ‘push_opcode_string’:
src/pmc_freeze.c:648: warning: ignoring return value of
‘PF_store_string’, declared with attribute warn_unused_result
src/spf_render.c: In function ‘handle_flags’:
src/spf_render.c:179: warning: ignoring return value of
‘string_substr’, declared with attribute warn_unused_result
src/spf_render.c: In function ‘Parrot_sprintf_format’:
src/spf_render.c:294: warning: ignoring return value of
‘string_substr’, declared with attribute warn_unused_result
src/spf_render.c:807: warning: ignoring return value of
‘string_substr’, declared with attribute warn_unused_result
src/stack_common.c: In function ‘register_new_stack’:
src/stack_common.c:57: warning: ignoring return value of
‘make_bufferlike_pool’, declared with attribute warn_unused_result
src/stm/backend.c: In function ‘Parrot_STM_alloc’:
src/stm/backend.c:216: warning: ignoring return value of
‘make_bufferlike_pool’, declared with attribute warn_unused_result
In file included from src/exec.c:26:
src/jit_emit.h: In function ‘div_rr_n’:
src/jit_emit.h:1720: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘mod_rr_n’:
src/jit_emit.h:1759: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘opt_div_rr’:
src/jit_emit.h:1953: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘Parrot_emit_jump_to_eax’:
src/jit_emit.h:2202: warning: cast from function call of type ‘int
*’ to non-matching type ‘long int’
In file included from src/exec_cpu.c:51:
src/jit_emit.h: In function ‘div_rr_n’:
src/jit_emit.h:1720: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘mod_rr_n’:
src/jit_emit.h:1759: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘opt_div_rr’:
src/jit_emit.h:1953: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘Parrot_emit_jump_to_eax’:
src/jit_emit.h:2202: warning: cast from function call of type ‘int
*’ to non-matching type ‘long int’
In file included from src/jit.c:35:
src/jit_emit.h: In function ‘div_rr_n’:
src/jit_emit.h:1720: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘mod_rr_n’:
src/jit_emit.h:1759: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘opt_div_rr’:
src/jit_emit.h:1953: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘Parrot_emit_jump_to_eax’:
src/jit_emit.h:2202: warning: cast from function call of type ‘int
*’ to non-matching type ‘long int’
In file included from src/jit_cpu.c:51:
src/jit_emit.h: In function ‘div_rr_n’:
src/jit_emit.h:1720: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘mod_rr_n’:
src/jit_emit.h:1759: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘opt_div_rr’:
src/jit_emit.h:1953: warning: cast discards qualifiers from pointer target type
src/jit_emit.h: In function ‘Parrot_emit_jump_to_eax’:
src/jit_emit.h:2202: warning: cast from function call of type ‘int
*’ to non-m

[PATCH] don't allow invalid --gc options

2007-09-01 Thread Gabor Szabo
It has biten me so let's make sure invalid --gc options are not allowed.


Index: lib/Parrot/Configure/Options.pm
===
--- lib/Parrot/Configure/Options.pm (revision 20963)
+++ lib/Parrot/Configure/Options.pm (working copy)
@@ -48,6 +48,9 @@
 }
 $data->{$key} = $value;
 }
+if ($data->{gc} and $data->{gc} !~ /^(gc|libc|malloc|malloc-trace)$/) {
+croak "Invalid value for 'gc' argument.\nType perl
Configure.pl --help to see available values";
+}
 if (@short_circuits_seen) {
 # run all the short circuits
 foreach my $sc (@short_circuits_seen) {


Re: Build Farm

2007-09-01 Thread Gabor Szabo
Hi David,

if non of the core Parrot developers answer you then let me,
the newcomer do so.

Recently I have been involved in a little research where I was looking
at various automatic build and test smoking systems. Among others
I looked at the PostgreSQL build farm as well.
See my blog entries:
http://www.szabgab.com/blog/2007/07/1183825266.html

I liked it very much though I have some issues that I think should be
improved there too.

Regarding Parrot, I think there was some discussion of moving it to use
TAP::Harness and to use Smolder to collect the TAP based results.

I am quite in favor of having something like the PostgreSQL build farm
integrated with TAP::Parser and possibly Smolder and adding some other
features as well. So I'd be glad to participate in your project and help
making sure that the all the needs of the Parrot team are
addressed.

Gabor



On 8/30/07, David Fetter <[EMAIL PROTECTED]> wrote:
> Folks,
>
> I'm working on generalizing PostgreSQL's buildfarm code
> <http://www.pgbuildfarm.org/>, an automated build and test system, and
> of course I thought of Parrot.
>
> The requirements are very light:
>
> * Disk space for the source code and build
> * Connectivity to the internet via HTTP or HTTPS
> * Some way (cron, e.g.) to run jobs regularly
> * Some way to get regular updates to one or more branches of the
>   source code
>
> Would people here be interested in running clients on various
> architectures, OSs, compilers, etc.?  What kinds of things would you
> like to see in a status overview page like this one:
> <http://www.pgbuildfarm.org/cgi-bin/show_status.pl>  How about in
> detailed build reports?
>
> Cheers,
> David.
> --
> David Fetter <[EMAIL PROTECTED]> http://fetter.org/
> phone: +1 415 235 3778AIM: dfetter666
>   Skype: davidfetter
>
> Remember to vote!
> Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
>


-- 
Gabor Szabo
http://www.szabgab.com/


Re: [PATCH] don't allow invalid --gc options

2007-09-01 Thread Gabor Szabo
On 9/1/07, James E Keenan <[EMAIL PROTECTED]> wrote:
> (Gabor:  You didn't cc: the list on this, so I'm replying directly to
> you.  But I think the issues you are raising merit discussion on the
> list.  So please feel free to copy what I write below to the list.)

Sure, I meant to send it to the list actually.
It seems the beer from YAPC::EU still have not fully settled down..


> On Sep 1, 2007, at 12:35 PM, Gabor Szabo wrote:
>
> > Thanks for the pointers, I was not sure where to add this.
> >
> > On 9/1/07, James E Keenan <[EMAIL PROTECTED]> wrote:
> >> 2.  Modify config/auto/gc.pm to have configuration step auto::gc
> >> fail if
> >> any invalid option is provided.  (I did a quick grep on config/
> >> and this
> >> is the only place I saw the 'gc' option handled -- but I might have
> >> gotten confused by the many instances of 'gcc'.)  A statement
> >> along the
> >> lines of 'return unless $gc =~ /list|of|valid|options/;' around
> >> line 62
> >> of that package would probably be the way to go.
> >
> > The problem is that if I place a return;  in the function you
> > recommended
> > the configuration process displays a small error message, then
> > a bigger unrelated one (at least unrelated from the point of view
> > of the
> > user running it) , creates the Makefile and exit()s with exit value 0
> > meaning success.
> > It also suggests to type in 'make' to build Parrot.
> >
> > Even if I croak() in that function, the same happens.
> >
>
> I understand your point -- but it's a much larger point than the
> permissible values for the --gc option.  Read on.
>
> > IMHO if a user supplies an invalid option (to --gc or any other
> > parameter)
> > an appropriate error message should be printed, the configuration
> > process
> > should be halted and exit() should indicate failure.
>
> All of the (currently) 58 Parrot configuration steps are set up to
> return undef on failure.  But Parrot::Configure::runsteps() is set up
> as a harness that reports failures in individual steps/tasks but
> nonetheless tries to keep going forward.  It does nothing with the
> return value of a particular step.
>
> #
> sub runsteps {
>  my $conf = shift;
>
>  my $n = 0;# step number
>  my ( $verbose, $verbose_step, $ask ) =
>  $conf->options->get( qw( verbose verbose-step ask ) );
>
>  foreach my $task ( $conf->steps ) {
>  $n++;
>  $conf->_run_this_step( {
>  task=> $task,
>  verbose => $verbose,
>  verbose_step=> $verbose_step,
>  ask => $ask,
>  n   => $n,
>  } );
>  }
>  return 1;
> }
> #
>
> Whether that's what it ideally *should* be doing is a valid
> question.  But in the refactoring/testing work I've been doing on it
> in recent months, I've viewed it as my mandate to preserve its
> current functioning unless there's a strong consensus that change is
> needed.
>
> Some might argue, "If you're foolish enough to continue on to 'make'
> when your configuration process is spewing error messages, you get
> what you deserve."  That's in effect what happens now.
>
> Another alternative would be to note whether any of the configuration
> steps fails, then change the message which
> Parrot::Configure::Messages::print_conclusion() prints after all the
> configuration steps complete.

At this point I really don't want to get involved any deeper in the development
and I am sure you will clean this up later so I'll try to send a patch according
to what you wrote.

One thing though, I think it would be really good if at least the exit code of
the script would be something different from 0 when any of the steps failed.

That will be very important when we try to integrate with the PG Build Farm
or any other fully automated smoke test suite to make sure we won't go on
when the configuration step fails.

Gabor


[PATCH] don't allow invalid --gc options (2nd try)

2007-09-01 Thread Gabor Szabo
Index: config/auto/gc.pm
===
--- config/auto/gc.pm   (revision 20963)
+++ config/auto/gc.pm   (working copy)
@@ -107,7 +107,7 @@
 gc_flag   => '-DGC_IS_MALLOC',
 );
 }
-else {
+elsif ( $gc eq 'gc' ) {
 $gc = 'gc';
 $conf->data->set(
 TEMP_gc_c => <<"EOF",
@@ -116,7 +116,11 @@
 TEMP_gc_o => "\$(SRC_DIR)/gc/resources\$(O)",
 gc_flag   => '',
 );
-}
+} else {
+print STDERR "Inavlid value '$gc' for the --gc option\n";
+return;
+}
+
 print(" ($gc) ") if $conf->options->get('verbose');

 return $self;


Re: [PATCH] don't allow invalid --gc options

2007-09-02 Thread Gabor Szabo
On 9/3/07, Andy Dougherty <[EMAIL PROTECTED]> wrote:
> On Sat, 1 Sep 2007, Gabor Szabo wrote:
>
> > It has biten me so let's make sure invalid --gc options are not allowed.
>
> But what if I want to work on --gc=libc?  How can I override this?

I am not sure I understand you.
If you want to work on --gc=libc then you shuold put just that on the
command line, it is a valid option.

You should not make a mistake as I did, giving  --gc-libgc as that
would silently fall back to --gc=gc

Gabor


Re: [perl #45137] [TODO] Add a revision control test in Configure.pl

2007-09-03 Thread Gabor Szabo
Can someone explain, please why are there tests that need a version
control system? It sounds strange to me.

Gabor


On 9/3/07, via RT Paul Cochrane <[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  Paul Cochrane
> # Please include the string:  [perl #45137]
> # in the subject line of all future correspondence about this issue.
> # http://rt.perl.org/rt3/Ticket/Display.html?id=45137 >
>
>
> Many tests in the Parrot test suite check for the existence of a given
> revision control system (e.g. svn/svk/git) before determining if the
> test should be run.  This can be done just the once at Configure time;
> the tests can then probe the result.  A new configure step will need
> to be added, and then any tests containing direct tests of the
> existence of svn/svk/git will need to be changed to probe for the
> relevant result.
>


Re: Parrot configuration system: weaknesses and strengths

2007-09-18 Thread Gabor Szabo
I am not sure what to quote so let me reply on a clean page.

I would like to see invalid configuration options and values as being always
fatal. They indicate some kind of user error, a typo or similar that would
probably cause trouble to the Parrot developer as well as the Parrot user.

In order to archive that I wonder if it would be possible to allow two methods:

1) The individual configuration step could report an error as a return value
so the harness can decide if this particular failure is fatal or not.
2) In addition the individual configuration step could declare a fatal error
(e.g. by die-ing) that would be respected by the harness and reported
as fatal.

Gabor


Workshop and Hackathon in Israel

2007-10-01 Thread Gabor Szabo
Hi,

I have announced it elsewhere but I hope it is OK to do it here as well.

On 31 December 2007 we are going to have a one day Perl Workshop in
Israel http://act.perl.org.il/ilpw2007/
Following the workshop, between 1-5 January 2008 we are going to have a
Hackathon in Tel Aviv. http://act.perl.org.il/ilpw2007/hackathon.html

On the Hackathon we would like to deal with all kinds of Perl related issues
including Parrot.

I hope to see some of you on the Hackathon.

If you are interested please register on the site and add yourself to
the wiki page.
If you are coming from overseas, please do it ASAP so we'll see how many
international guests to expect.

regards
Gabor

-- 
Gabor Szabo
http://www.szabgab.com/


Re: Official Perl 6 and Parrot wikis

2007-12-29 Thread Gabor Szabo
On Dec 29, 2007 4:56 PM, Mark J. Reed <[EMAIL PROTECTED]> wrote:
> .cgi?  Is that really a CGI-based implementation?  Because that seems
> a little, I don't know, backward-looking.  Maybe it's just me, but it
> seems like it will just feed the all-too-common perception that Perl
> is for CGI scripts, and "real" web apps need to be written in
> something else (be it Java, PHP, Ruby/Rails, whatever).
>
> Besides, I hope that the language and wiki will be successful enough
> that a cgi-based implementation will completely fail to scale to meet
> demand. :)


Maybe the site maintainers could add an Apache rewrite rule
so the URLs used by the public will be

   http://www.perlfoundation.org/perl6/index.p6
and
   http://www.perlfoundation.org/parrot/index.parrot

That would change the perception and we would not need to explain
about mod_perl running the .cgi scripts at the rate 100-200 faster
than good old CGI.

When asked if they really run on Perl 6 and Parrot we could just smile...

Gabor


Re: Parrot on mobile platforms?

2008-10-22 Thread Gabor Szabo
Thanks for the quick answer.
Then I have another few questions :-)

Don't you think it would be important to start working in this direction?
Maybe to try to get someone work on this or to get sponsorship
in that direction?

Gabor

On Thu, Oct 23, 2008 at 8:33 AM, chromatic <[EMAIL PROTECTED]> wrote:
> On Wednesday 22 October 2008 23:23:46 Gabor Szabo wrote:
>
>> I am totally lack of relevant knowledge so I'd like to get some from you.
>>
>> There are many mobile platforms out there.
>> Linux based, Symbian, Blackberry, iPhone, Windows, Palm, Android, etc..
>>
>> I wonder what are the chances of Parrot running on any of these?
>
> Decent, with some work.
>
>> Has anyone tried?
>
> Not to my knowledge.
>
>> What needs to be done in order to get Parrot on these devices?
>
> With the iPhone or Android-based phones, someone would have to crack the phone
> such that we have access to what passes for bare OS, instead of the Objective
> C/NeXT runtime or Dalvik.
>
> For the other platforms, we need to:
>
> 1) Figure out a cross-compilation strategy (which means improving our
> configuration system such that it takes hints from a file, not from direct
> probes and Perl 5's Config.pm)
>
> 2) Disable certain features (different runcores, JIT, much of NCI)
>
> 3) Add architecture and platform-specific files for the parts of POSIX they
> don't already support
>
> 4) Figure out an installation and execution strategy for bytecode
>
> 5) Revisit #2, to get the installation size down further (500k for a Parrot
> binary seems like a maximum)
>
> -- c
>


Padre 0.22, Padre::Plugin::Parrot and Padre::Plugin::Perl6 released!

2008-12-24 Thread Gabor Szabo
Hi,

as this is relevant to you as well, let me send this announcement here too.

Yesterday we have released v0.22 of Padre the Perl IDE written in Perl 5.
http://padre.perlide.org/

There are many changes as usual but the two important ones for the Parrot/Perl 6
developers are related mostly to two plug-ins of Padre:

1) The Padre::Plugin::Parrot allows the embedding of PASM code in
Padre. This means
you could actually add plug-ins to Padre written in Perl. With the
further enhancement
of Parrot::Embed (and specifically Parrot::Interpreter) we will be
able to write plug-ins
to Padre in any of the languages running on Parrot. (See tickets
#74, #75, #76, #79)
on https://trac.parrot.org/parrot/report/1

2) Padre::Plugin::Perl6, written by Ahmad Zawawi uses STD.pm to provide slow but
 correct syntax highlighting and syntax checking of Perl 6code.
As we have discussed on #padre it is very slow so it can only be
used for really small
files but I hope it will be improved soon. In any case I am really
happy that we have
any kind of *correct* Perl 6 parsing on Christmas Eve 2008.

To install Padre you need Perl 5 compiled with threads and then run

cpan> install Padre

Further help can be found on http://padre.perlide.org/wiki/Download/
or on #padre

Following is the original announcement of Steffen Mueller.

regards
   Gabor

-- Forwarded message --
From: Steffen Mueller 
Date: Tue, Dec 23, 2008 at 9:08 PM
Subject: [Padre-dev] Padre 0.22 released!
To: Padre development discussion list ,
padre-n...@perlide.org


Dear Padre users and developers,

Padre version 0.22 has just been uploaded to the PAUSE. That means it
will propagate to the CPAN mirrors without a few hours. Like the
previous release, the list of changes is quite long, but one particular
achievement is support for highlighting Perl6 code and checking its
syntax if Padre::Plugin::Perl6 is available. Christmas is close.

Once the distribution has reached your CPAN mirror, you will be able to
access the full Change Log at
http://search.cpan.org/src/SMUELLER/Padre-0.22/Changes

The next Padre release is very preliminarily scheduled for December 28th
or 29th and we're still looking for a new release engineer.

Best regards,
Steffen

___
Padre-dev mailing list
padre-...@perlide.org
http://mail.perlide.org/mailman/listinfo/padre-dev


Re: [perl #63038] AutoReply: Test.pm eats the "Use of uninitialized value" warnings

2009-02-04 Thread Gabor Szabo
apparently this is a feature of Test.pm
though I think a very bad one
Gabor

On Wed, Feb 4, 2009 at 9:00 PM, perl6 via RT
 wrote:
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
>"Test.pm eats the "Use of uninitialized value" warnings",
> a summary of which appears below.
>
> There is no need to reply to this message right now.  Your ticket has been
> assigned an ID of [perl #63038].
>
> Please include the string:
>
> [perl #63038]
>
> in the subject line of all future correspondence about this issue. To do so,
> you may reply to this message.
>
>Thank you,
>perl6-bugs-follo...@perl.org
>
> -
> the following code prints a warning "Use of uninitialized value"
>
> 
> use v6;
>
> my %h;
> say %h;
> 
>
> If this is within a test as follows, the warnings is not printed
>
> 
> use v6;
>
> use Test;
> plan 1;
> ok(1);
>
>
> my %h;
> say %h;
>
> 
>
>


Perl 6 pod processor in Perl 5

2009-02-11 Thread Gabor Szabo
As an experiment to check how we could reuse CPAN to distribute Perl 6 packages
I uploaded Perl6::Conf
The code itself is not interesting, my main interest is the "distribution".

One of the issues I encountered is the display on the two search engines:

http://search.cpan.org/dist/Perl6-Conf/
http://kobesearch.cpan.org/dist/Perl6-Conf

Not surprisingly neither of them can handle the perl pod.
I contacted both maintainers asking to look into it suggesting
to use Perl6::Perldoc of Damian but it is quite old.

Is there any other module written in Perl 5 that could parse a perl 6
file, recognize the pod and help with the display?

Gabor


Re: perl6 tutorials

2009-03-12 Thread Gabor Szabo
Hi Lars,

let me add to what Carl wrote that think the blogs of Moritz Lenz
are quite good http://perlgeek.de/blog-en/perl-5-to-6/ but admittedly they
are for Perl 5 programmers.

I also started to write an publish my Perl 6 training slides.
It is very early and basic but you are welcome to fetch them, read them and ask
questions. Those questions will help me flesh out what's missing.
My material should not assume prior experience with Perl.

In addition I've just started a newsletter called "Perl 6 Tricks and
Treats" that
you might or might not find interesting.

Both can be found on http://szabgab.com/perl6.html

Last, but probably most important there is going to be a Perl Workshop in Oslo
next months with lots of Perl 6 talks from some of the most knowledgeable people
in the field http://www.perlworkshop.no/

After that, there is going to be a one day hands-on perl 6 training
and a perl 6 hackathon
where you can practice what you've learned.

If you have time, its worth attending.

Gabor

On Mon, Mar 2, 2009 at 11:51 AM, Carl Mäsak  wrote:
> Hej Lars,
>
> Lars (>):
>> I do not know Perl at all, but I'm very interested in perl6.
>> My problem is I do not find a good tutorial how to do real perl6
>> development, all I find seems to assume you know perl5 and the perl
>> community. And I do not.
>
> That's an interesting question! I guess most of the people heavily
> involved in Perl 6 are also quite familiar with Perl 5. Since people
> scratch mostly their own itches, not much "Perl 6 for newcomers".
>
> I'd recomment the "Perl 6 Programmin" wikibook,
>
>  
>
> but unfortunately it's still in its very early stages, and
> unfortunately its owner writes slightly unidiomatic Perl 6 code.
>
>> As an example I like to build a routine that connects to SAP and fetch data
>> from SAP. I know there are SAP-Perl5 routines, can those be used? how do I
>> find and use them? etc.
>>
>> It is even hard to find someone to ask?
>
> I would recommend that you start by visiting #perl6 on
> irc.freenode.net -- the people there can often provide detailed
> answers and help newcomers. During European daytime, it's not hard to
> find someone to ask.
>
> As to CPAN modules in Rakudo Perl 6 -- if that's what you're asking
> about -- we're not quite there yet. It'll be really sweet once we are,
> but I think integrating the Perl 5 and 6 runloops is fairly
> nontrivial.
>
>> Yeah, I know Perl6 isn't ready yet, but it looks really really good and I'm
>> eager to learn perl6, but not by learning perl5 first if possible.
>
> I think you represent a very important target group for Perl 6: it
> shouldn't be necessary to have prior knowledge of Perl 5 in order to
> learn Perl 6.
>
> At present, however, tutorials and documentation are sorely lacking.
> During the summer, we'll be fleshing out U4X, a documentation effort
> which aims to explain all aspects of Perl 6 to newcomers. But it's not
> summer yet, so the best tip I can give you is to tap the brains of the
> nice people over at #perl6.
>
> Regards,
> // Carl
>


Re: Multiline comments in Perl6

2008-01-03 Thread Gabor Szabo
On Jan 3, 2008 6:36 PM, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Wed, Jan 02, 2008 at 11:28:54AM -0800, Jonathan Lang wrote:
> : Paul Hodges wrote:
> : > http://perl6.org/doc/design/syn/S02.html still says:
> : >  "Intra-line comments will not be supported in standard Perl"

> Note that the document on perl6.org is nearly three years out-of-date!
> Anyone know who runs that site?  We need a better GC algorithm. :)
>
> The best place to read synopses right now is probably perlcabal.org/syn
> because it has the test suite interspersed, so you can easily click
> to see test examples if you don't understand a particular passage.


What about http://dev.perl.org/perl6/synopsis/ ?
Is that also out of date?
http://www.pugscode.org/ links there...

Gabor


Re: the future of testing

2008-01-10 Thread Gabor Szabo
On Jan 10, 2008 12:23 PM, Allison Randal <[EMAIL PROTECTED]> wrote:

> Aye, I would want to improve on the Python solution. But maintaining a
> config file something like:
>
> [darwin]
> t/pmc/foo.t 3 5-7 9 # platform doesn't support libfoo
> t/pmc/bar.t 1 42
> ...
>
> [MSWin32]
> t/pmc/foo.t 32
> ...

This seems to be too obvious to be a real question but what if someone
adds a new test
in the middle of bar.t ?
Will she have to remember to update the numbers in the central config file?

Gabor


Re: Perl 6 fundraising and related topics.

2008-02-23 Thread Gabor Szabo
On Fri, Feb 22, 2008 at 7:38 PM, Dave Rolsky <[EMAIL PROTECTED]> wrote:
> On Thu, 21 Feb 2008, Joshua Gatcomb wrote:
>
>  > I am mostly ignoring the rest of what others have said in this thread
>  > because I think it is detracting from your intention of getting money to
>  > people to work more.  Here is one thing that has frustrated me about TPF.
>  > They are a non-profit organization.  Yeah, kind of suprising that would be
>  > the frustrating thing.  The issue is that they can't take money from Bob to
>  > give to Sue to work on Bob's widget.  This is an extreme oversimplification
>  > but in general, they have to abide by the rules that allow them to keep
>  > their non-profit status.  Where am I going with this?
>
>  This doesn't make any sense to me. There's nothing about being a nonprofit
>  that prevents TPF from accepting donations targeted to a specific program.
>  There's a bit of accounting overhead to make it happen, but it's perfectly
>  legal and in keeping with TPF's 501c3 status and its mission.

I don't know but I think I was told at least once that TPF cannot
handle donations
targeted to a specific person. That might of course be different then targeting
at specific program, I am not familiar what 501c3 means.

Personally - and there might be few others - I'd be much more
comfortable to give
money to a specific target or person than to a general pool.

What I was hoping for a long time is to be able to give a modest amount
on a monthly basis. Currently AFAIK TPF can only accept stand alone payments.

IMHO many people in the community would be ready to give 5-10-20 USD/month but
it would be much harder to get them give 100 or 200 USD once a year.

How hard would it be to enable (Paypal?) recurring monthly payments to TPF?
How hard would it be to allow people to target their money to a
specific project/person?


TPF can then still focus on raising money from corporations.

Gabor


-- 
Gabor Szabo
http://www.szabgab.com/


How to build Rakudo - the site is currently broken

2008-03-03 Thread Gabor Szabo
So I wanted to build Rakudo, but I could not find the instructions in
the Parrot source code
and the links on the rakudo.org site all return 500 error...

Gabor


Re: How to build Rakudo - the site is currently broken

2008-03-03 Thread Gabor Szabo
On Mon, Mar 3, 2008 at 11:24 PM, jerry gay <[EMAIL PROTECTED]> wrote:
>
> On Mon, Mar 3, 2008 at 1:17 PM, Gabor Szabo <[EMAIL PROTECTED]> wrote:
>  > So I wanted to build Rakudo, but I could not find the instructions in
>  >  the Parrot source code
>  >  and the links on the rakudo.org site all return 500 error...
>  >
>  rakudo lives in languages/perl6/ in the parrot source tree. the README
>  file should get you started. as for the website, http://rakudo.org/
>  works for me. if you continue to have trouble, let us know here or on
>  irc.perl.org#parrot and we'll look into it further.

thanks, that's the links in the tag cloud that do not work for me.

Gabor


Re: Perl 6 fundraising and related topics.

2008-03-07 Thread Gabor Szabo
Has anything happened in response to this discussion?

Gabor


qx{} or backtick?

2008-06-18 Thread Gabor Szabo
Hi,

If system() is now called run()

What replaces backtick or qx{} ?

Gabor


Re: [perl #63970] split() returns the delimiter, not the substrings

2009-03-18 Thread Gabor Szabo
On Thu, Mar 19, 2009 at 1:18 AM, Moritz Lenz  wrote:
> Gabor Szabo (via RT) wrote:
>> # New Ticket Created by  Gabor Szabo
>> # Please include the string:  [perl #63970]
>> # in the subject line of all future correspondence about this issue.
>> # http://rt.perl.org/rt3/Ticket/Display.html?id=63970 >
>>
>>
>> perl6 -e'say "a;b".split(";").perl'
>> ["a", "b"]
>>
>> but
>>
>> perl6 -e'say split("a;b", ";")'
>> ;
>
> In the sub form the delimiter still goes first (like in Perl 5), so it
> tries to split ';' by 'a;b', fails, and thus returns the whole string is
> one chunk. Works as designed.

and I even reported it as a bug

how embarrassing

I blame the hour.

Gabor


Re: Oslo Perl 6 Hackathon Notes

2009-04-13 Thread Gabor Szabo
Hi,

On Mon, Apr 13, 2009 at 11:56 PM, Patrick R. Michaud  wrote:
> As some of you are aware, this week is the Nordic Perl Workshop [1],
> and in the days immediately following the workshop we will have
> the Oslo Perl 6 Hackathon [2].  During the first day of the hackathon
> Gabor Szabo will be doing a "Hands-on Perl 6 training" course [3],
> the other two days will be for various hacking tasks (both Perl 6
> and Perl 5).

just to make it clear, on the first day 1 room will be allocated to the
Hands-on and the other 2-3-4 rooms will already be allocated to the
Hackathon.

> I personally have three goals for my participation at the
> workshop and hackathon:
>
> *  Attend Gabor's course and take careful note of where issues
> arise with using Rakudo Perl and/or Perl 6 (including filing
> bug reports and/or answering questions as needed).

That will be great. At least someone in that hands-on will know the stuff.

> [3] http://szabgab.com/blog/2009/03/1235863222.html

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  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 methods/submethods/subroutines/rules/tokens/regexes and even
> macros. Perl 6 is really big, feature rich and you can easily loose
> your way there without an outline. We can now parse Larry Wall's
> STD.pm and display it in our dear Outline view. Yes, it takes 5-6
> minutes on my brand new HP laptop but it is really worth every CPU
> cycle to read STD.pm in that way :)
>
> To see STD.pm in Padre, take a look at:
> http://padre.perlide.org/wiki/Screenshots
>
> And to give you an idea how it works, Perl 6 plugin depends on Padre
> and Syntax::Highlight::Perl6 which depends on bundled p5 STD.pmc which
> is auto-generated by gimme5 from p6 STD.pm. And all that to read
> STD.pm back again in our outline view that was contributed by
> hjansen++ in r2600. Thanks :)
>
> Regards,
> Ahmad M. Zawawi

Ahmad, great!

You should blog about this.
In the meantime let me forward this to some of the perl6 lists as well.

Screenshot: http://padre.perlide.org/wiki/Screenshots

Gabor


Re: Rukudo-Star => Rakudo-lite?

2009-08-10 Thread Gabor Szabo
On Mon, Aug 10, 2009 at 2:02 AM, Patrick R. Michaud wrote:
> On Sun, Aug 09, 2009 at 04:35:42PM -0600, David Green wrote:
>> On 2009-Aug-9, at 3:57 pm, Tim Bunce wrote:
>>> Perhaps it's worth asking what we might call the release after that
>>> one.
>>> "Rakudo not-quite-so-lite"?
>>
>> Rakudo ** (aka "Rakudo Exponentiation")?  Though I think Patrick is
>> optimistic that development will proceed exponentially enough that a
>> single interim release will be enough to hold us over until Christmas.
>
> I'm not sure I'm quite THAT optimistic.  :-)  We may end up with
> multiple interim releases in the Rakudo Star series before we reach
> Christmas.  (And yes, they may even be *+1, *+2, etc.)
>
> In some ways I'm starting to think of "Star" (or whatever designation
> we end up using) as a label for a series of interim releases in the
> same sense that NASA used "Gemini" as the label for the program
> came between "Mercury" and "Apollo".
>
> In other words, "Star" may really end up being a designation for a
> program of planned releases with certain major objectives that
> cumulatively lead up to the ultimate goal of a "full Perl 6 release".
>
> The precise details are still a little ill-formed in my head at the
> moment, but as they come together (and are expressed in planning
> documents) I'll be blogging or writing about them appropriately.
>


my bikeshed would go along the lines of

@rakudo[*-100]
@rakudo[*-99]
...

Gabor


Re: Perl 6 IDEs

2009-12-07 Thread Gabor Szabo
2009/12/6 Víctor A. Rodríguez (Bit-Man) :
> 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 Perl 6 (yet). Also tied to install Padre on top
> of Ubuntu but just went to nowhere :-P

What went wrong?
How could I help you get you going?

Gabor


Re: Perl 6 IDEs

2009-12-07 Thread Gabor Szabo
2009/12/7 Gabor Szabo :
> 2009/12/6 Víctor A. Rodríguez (Bit-Man) :
>> 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 Perl 6 (yet). Also tied to install Padre on top
>> of Ubuntu but just went to nowhere :-P
>
> What went wrong?
> How could I help you get you going?
>

Well, it seems I finally manged to build a very experimental package for Linux.
It even worked on one system I tried on which was not the one I built it on. :-)

If any of you is interested - though it does not contain the perl 6 plugin yet -
you can download the first experimental version of a Perl 5 package
containing Padre.
http://perlide.org/download/binary/perl-5.10.1-xl-0.01.tar.gz

after downloading

$ tar xzf perl-5.10.1-xl-0.01.tar.gz

and

$ ./perl-5.10.1-xl-0.01/perl/bin/padre.sh

notice one needs to run the shell file!

please check it out and let me know what distribution and what version
have you tried and
if it worked or not. Based on this, tomorrow I'll attempt to build a
version that includes the
Perl 6 plugin as well. Or go back to the drawing board to find another
way to build it.

Gabor


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

2009-12-08 Thread Gabor Szabo
Hi,

Let me announce version 0.02 of the XL Perl 5 distribution (temporary
name, I hope :-)
for Linux that contains a full version of Perl 5.10.1, Padre 0.51 and
the Perl 6 plugin of Padre.

This is still very experimental of course.

You can download it from here:

http://perlide.org/download/binary/perl-5.10.1-xl-0.02.tar.gz

tar xzf perl-5.10.1-xl-0.02.tar.gz

./perl-5.10.1-xl-0.02/perl/bin/padre.sh

(Note, running the .sh file!)

In order to use the Perl 6 plugin you will have first enable it:
Plugins/Plugin Manager  - Select Perl 6 and click on Enable
Due to a bug you will have to restart Padre for this to take effect.

Then go to

Edit/Preferences/Files and Colors
Select Perl 6 as File type and Std.pm as Highlighter in order to get
syntax highlighting.

Enjoy and let me know about the issues you encounter or if you are
using it successfully.

regards
   Gabor


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  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 abnormally: Undefined subroutine &Padre::Util::debug
> called at
> /home/richard/webdownloads/perl-5.10.1-xl-0.02/perl/lib/site_perl/5.10.1/Padre/Plugin/Perl6/Perl6StdColorizerTask.pm
> line 216.
>

That's a stupid bug that has already been fixed in the new version of
the Perl6 plugin but it has not been released yet.
We removed the Padre::Util::debug sub from Padre and the plugins were
not yet release with the update.

Sorry for that.
Feel free to remove that line from the Perl6StdColorizerTask.pm file
or any other place you might find.

Gabor


Parrot on Android

2010-04-18 Thread Gabor Szabo
Android already supports various languages. I think it would be cool
to see Parrot being supported there which will allow running
Perl 6 code on Android.

I took the liberty and submitted a request.

http://code.google.com/p/android-scripting/issues/detail?id=296

Please visit the request page and click on the star to upvote it!
You might also add a comment but it is not necessary.

regards
   Gabor


Re: Perl 6 in non-English languages

2010-07-03 Thread Gabor Szabo
On Wed, Jun 23, 2010 at 1:34 AM, SundaraRaman R
 wrote:
> Hi,
>
> This is an idea that originated in #perl6 during a discussion with slavik (
> http://irclog.perlgeek.de/perl6/2010-01-17#i_1907093). The goal is to allow
> Perl 6 source code to be written in natural languages other than English.
> The motivation would be to make programming accessible to a lot of people
> who don't know English well (or at all), to make it easier to teach
> programming to kids in non-English speaking countries, and just plain fun.
>
> Currently, since Perl 6 (afaik) supports Unicode identifiers, the only place
> a modification is required would be in the keywords. However, it is not a
> simple matter of substituting s/keyword/local_language_keyword/ since the
> resultant phrasing might be awkward or meaningless and unreadable (examples
> in the linked discussion). It requires reordering the syntax of each
> construct.
>
> Is it possible to do this at a module level? If so, how much English usage
> would that require before someone could start programming in their own
> language - say, two, for a shebang line and a "use Lang::" line?
> or zero, by using "perl6 -MLang::" in the command line?
>
> Are there any ongoing works in this vein?

It is a bit hard for me to imagine how that would look like in RTL
languages such as Hebrew or Arabic.
Would the sigils be still at the beginning of the word?
Would the assignments go from left to right?

;שלי $משתנה = 42

and I could not manage to type in a for loop via the Gmail interface
as it was turning around all the time.


What I'd like to see is a Scratch-like tool for a subset of Perl 6
that can actually generate Perl 6 code.
http://scratch.mit.edu/

I know, I talked about it already a year ago.

Gabor


Re: Rakudo Star - a useful, usable, "early adopter" distribution of Perl 6

2010-07-29 Thread Gabor Szabo
Congratulations and thank you!



I have started to collect the links to the press coverage of the release:

http://www.perlfoundation.org/perl6/index.cgi?rakudo_star_press

Please help me collect all the important links!

Gabor


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 these to my .bash_profile:

export RAKUDO=/Applications/Rakudo
export PATH=$RAKUDO/bin:$RAKUDO/share/perl6/site/bin/:$PATH
export PERL6LIB=$RAKUDO/share/perl6/site/lib/

reloaded it and then I could use it.

Maybe some notes like this could be added to
http://rakudo.org/how-to-get-rakudo/

regards
   Gabor


  1   2   3   >