[33142] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4421 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 25 03:09:18 2015

Date: Sat, 25 Apr 2015 00:09:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 25 Apr 2015     Volume: 11 Number: 4421

Today's topics:
    Re: How do I use "when" to check for "one of two option <rweikusat@mobileactivedefense.com>
    Re: How do I use "when" to check for "one of two option <rweikusat@mobileactivedefense.com>
    Re: How do I use "when" to check for "one of two option <rweikusat@mobileactivedefense.com>
    Re: Mentifex Strong AI Perlmind Programming Journal: 20 mentificium@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 24 Apr 2015 15:43:55 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: How do I use "when" to check for "one of two options"?
Message-Id: <87oamdfuxg.fsf@doppelsaurus.mobileactivedefense.com>

gamo <gamo@telecable.es> writes:
> El 23/04/15 a las 13:22, Rainer Weikusat escribió:
>> [*] As a recent example showed, recursing 15,000 levels deep can
>> outperform a flat multiplication of 15,000 numbers.
>
> You doesn't understand the difference between having a factorial
> to calculate various factorials than one-shot computation.
>
> Do you?

I don't understand this sentence but that's more of a property of the
sentence.

> I think not, as you experiment with factorials without my
> reading my record in time script to computate the 10000!

 ... and I don't understand what this is supposed to communicate in the
given context. As stated above, a recursive algorithm isn't necessarily
slower than an iterative one. Further, I read the name you posted. It
was "test.gmp", suggesting that it refers to some code you (AFAICT)
didn't post which uses the GNU multiprecision arithmetic library. Pretty
irrelevant in the context of a question about the Perl Math::Bigint
module.




------------------------------

Date: Fri, 24 Apr 2015 16:06:47 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: How do I use "when" to check for "one of two options"?
Message-Id: <87k2x1ftvc.fsf@doppelsaurus.mobileactivedefense.com>

gamo <gamo@telecable.es> writes:
> El 23/04/15 a las 13:22, Rainer Weikusat escribió:
>> - flamebait ahead -
>>
>> It's really not that difficult to create something useful provided one
>> can muster the moral courage to tell one bazillion twentysomething CS
>> students that
>>
>> 	a) nobody in the world is waiting for their weird ideas
>>
>>          b) especially so since they're likely not even new, anyway
>
> Do you think a person who wrote trivial solutions,
> to trivial problems are "idiot" CS students?

I think that Perl6 gratuitiously includes a lot of 'computer science
shelf-warmers' justified 'in the usual way' where Perl 5 has technically
superior solutions people with little practical experience beyond said
shelf-warmers tend to disregard, eg, using a tracing garbage collector
instead of reference counting (I wrote various things about this in the
past already I don't feel like repeating right now) and some outright
bizarre stuff, eg, repurposing the bit arithmetic operators on the
grounds that "nobody uses them, anyway".

> BTW, if you do
>
> 	my $c = lc (Record_key());
> 	given ($c) {
> 	}
>
> you limit your alphabet from 52 to 26 possibilities.

Really? Who da thunk ...


------------------------------

Date: Fri, 24 Apr 2015 16:08:48 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: How do I use "when" to check for "one of two options"?
Message-Id: <87d22tftrz.fsf@doppelsaurus.mobileactivedefense.com>

gamo <gamo@telecable.es> writes:
> El 23/04/15 a las 13:22, Rainer Weikusat escribió:
>> sub any_of
>> {
>> 	my $it = $_;
>>
>>          return 1 if $it ~~ $_ for @_;
>
> This have no sense since $var ~~ @list will
> return true if any element of @list match.

I agree that the result of you editing my text doesn't make sense
anymore.


------------------------------

Date: Fri, 24 Apr 2015 06:08:46 -0700 (PDT)
From: mentificium@gmail.com
Subject: Re: Mentifex Strong AI Perlmind Programming Journal: 2015 April 12
Message-Id: <076c7fd7-f143-4c7c-af0b-460c04ecbaa1@googlegroups.com>

On Thursday, April 23, 2015 at 6:50:03 PM UTC-7, Robbie Hatley wrote:
> On 4/16/2015 3:28 PM, mentificium@gmail.com wrote:
>=20
> > On Monday, April 13, 2015 at 1:40:02 AM UTC-7, George Mpouras wrote:
> > > On 12/4/2015 8:48 =CE=BC=CE=BC, mentificium@gmail.com wrote:
> > > What you have done so far [...]
> >
> > My library for coding Perl AI now has five books.
> >
> > On Mon.14.APR.2015 at Goodwill I bought for
> > $01.99 the 1,283-page "PERL Black Book" by Holzner.
> > $00.19 WA Sales tax.
> > $02.18 TOTAL expenditure.
> >
> > On Thurs.16.APR.2015 at Half Price Books I bought:
> > $02.00 Programming Perl, Second Edition, (C) 1996;
> > $09.99 Learning Perl, Second Edition, (C) 1997;
> > $05.99 Programming Perl, Third Edition, (C) 2000;
> > $05.99 PERL In Easy Steps, (C) 2004.
> > $23.97 subtotal
> > $02.30 WA 9.6% Sales tax.
> > $26.27 TOTAL
> >
> > Mentifex
>=20
> That's not quite an answer to what George meant.
> What he meant was, what Perl code have you written so far in
> your attempts to reach your goals?

When George posted his question, I had not even bought=20
the Perl books yet, but I posted my purchases as a=20
report of progress -- putting my money where my mouth is.=20

Meanwhile, yesterday and again today I have uploaded=20

http://ai.neocities.org/perlmind.txt=20

as my first Perl AI code while I learn Perl=20
and I have linked to the code from both=20

http://ai.neocities.org/PMPJ.html and=20

http://ai.neocities.org/AiSteps.html=20

so that Netizens and Google may find it --=20
but not too quickly, before the code becomes=20
more substantial and more AI-functional.=20

>=20
> When I say "my factorial calculating script is too slow and
> gives 'deep recursion errors', what should I do about this?",
> and folks here say "show us what you've done", I don't reply
> "Well, I own paper copies of 'Learning Perl, 4th Ed' and
> 'Programming Perl, 3rd Ed', plus a pdf copy of 'Programming
> Perl, 4th Ed'."
>=20
> No, what I'd actually reply with would be this:
>=20
> #! /usr/bin/perl
> #  /rhe/scripts/math/factorial-recursive.perl
> use v5.14;
> use strict;
> use warnings;
> use Math::BigInt;
> sub Factorial ($);
> warn("Entry time: ", time, "\n");
> my $x =3D Math::BigInt->new($ARGV[0]);
> my $f =3D Factorial($x);
> say "$x! =3D $f";
> warn("Exit  time: ", time, "\n");
> exit 0;
> sub Factorial ($) {
>     my $x =3D shift;
>     return (1 =3D=3D $x) ? 1 : $x * Factorial($x - 1);
> }
>=20
> And others would reply back that perhaps recursion is not
> the best way to tackle this task, and that perhaps using
> the Math::BigInt->bfac() function might be faster, etc.
>=20
> That's how these Usenet programming-language groups work.
> When someone says "show us what you have so far", that's
> an invitation to apply fingers to keyboard and do some
> programming. Computer programming is not a spectator sport.
>=20
> How many decades have you been working on your project?=20

Since college sophomore year, i.e., December 1965.=20

> It *has* been decades, hasn't it? Surely you've written
> some code?

Yes, in Forth and JavaScript, for English, German, Russian AI:

http://www.nlg-wiki.org/systems/Mind.Forth in English=20
  http://dl.acm.org/citation.cfm?doid=3D307824.307853=20
http://www.nlg-wiki.org/systems/Wotan in German=20
http://www.nlg-wiki.org/systems/Mind in English=20
http://www.nlg-wiki.org/systems/Dushka in Russian=20

>=20
>=20
> --=20
> Cheers,
> Robbie Hatley
> Midway City, CA, USA
> perl -le 'print "\154o\156e\167o\154f\100w\145ll\56c\157m"'
> http://www.well.com/user/lonewolf/
> https://www.facebook.com/robbie.hatley

Arthur
--=20
P.S. I am impressed by your Whole Earth 'Lectronic Link address!


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4421
***************************************


home help back first fref pref prev next nref lref last post