[27413] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9068 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 20 03:05:46 2006

Date: Mon, 20 Mar 2006 00:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 20 Mar 2006     Volume: 10 Number: 9068

Today's topics:
    Re: A Problem With GD robic0
    Re: A Problem With GD robic0
    Re: Code that makes you say hmmm! robic0
    Re: FAQ 3.1 How do I do (anything)? robic0
        unicode conversion <nospam@home.com>
    Re: unicode conversion robic0
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 19 Mar 2006 21:09:12 -0800
From: robic0
Subject: Re: A Problem With GD
Message-Id: <dads12p8m7ekdarjpse9ccg54tdogb84d3@4ax.com>

On Sun, 19 Mar 2006 13:21:22 +0100, "Lukas Mai" <rwxr-xr-x@gmx.de> wrote:

>robic0 schrob:
>> On Wed, 15 Mar 2006 10:37:30 +0100,
>>  "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> wrote:
>> 
>>>Also sprach robic0:
>>>
>>>> For instance, long, short and byte are macro's.
>>>
>>>As to all I know, this is utter nonsense. Do you have any documents
>>>backing up that 'short' and 'long' are macros?
>> 
>> Really? What does a compiler know? It knows the smallest and the largest.
>> The smallest is always a "char", the largest is always an "int".
>
>Wrong. The smallest addressable unit is always a char, but long int or
>long long int are often larger than int.

Jesus, what drugs are you on dude? I'm talking about the *MACHINE WORD*.
That which is *NATIVE* to the cpu, a *REGISTER*, address or data !!!!
These are *INTRINSIC* types to the compiler, there are *NO* others !!!
Everything else you can type in a .cpp file is a *MACRO*, a definition
that resolves to signed or unsigned of the native "char" or "int". This
since the advent of 32-bit compilers. 

Bit map manipulations are extremely dependent on this and are hardcoded
by programmers. Bit masks, bit shifts are usually what needs to be modified
when going to a *larger* machine word compiler.

If you see code that has typing other than int, char, signed or unsigned,
it is a macro! AND its probably code that is 10 or more years older.
"long" is *NOT* a intrinsic type for many years now. Not "long long",
"long short long", "short long char", not any of these things!!!!

Get off drugs as soon as possible..........

<other bullshit snipped>


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

Date: Sun, 19 Mar 2006 21:22:08 -0800
From: robic0
Subject: Re: A Problem With GD
Message-Id: <mnes12t2968q8jge882lcpdkn4g06ia23s@4ax.com>

On Sat, 18 Mar 2006 18:20:01 -0800, robic0 wrote:

>On Wed, 15 Mar 2006 10:37:30 +0100, "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> wrote:
>
>>Also sprach robic0:
>>
>>> But given the RGB function above, calling RGB(255,255,255) would be more appropriate.
>>> The difference is evals are mostly used, if its your purpose, to dynamically
>>> generate unknown code at runtime, then its evaluated. In the RGB case its a known form.
>>> In C/C++, macros are used for "substitution" by the pre-compiler. All instances of the
>>> macro are substituted for "real" code before compiling. Thats why there's always the
>>> perviable, "Beware of Macro's sideaffects" by certain documentation, since many C/C++
>>> constructs are macro's that are not intrinsics. For instance, long, short and byte
>>> are macro's.
>>
>>As to all I know, this is utter nonsense. Do you have any documents
>>backing up that 'short' and 'long' are macros?
>>
>>Tassilo
>
>Really? What does a compiler know? It knows the smallest and the largest.
>The smallest is always a "char", the largest is always an "int".
>Int is the largest bit representation of a native compiler that it knows
>about of the largest data register that it is designed to work with.
>Albeit the data register must be "at least" as big.
>So what is a "short", is it half the "int"? How many bits is that?
>Is a "short" half of the "int"? Nope, its not! 
>
>In your mind, a "short" is 16 bits. Thats 1/4 of an "int" in a 64 bit 
>compiler. Thats why "short" is a macro as well as byte (which has been
>a macro almost since it was named). Macros controlled by either differently
>named "extra-short-short" or whatever. 
>
>Start a short C++ program in VC6 and use the type "short" and "byte"
>and "long" then trace the definition. It leads to a MACRO!
>
>There is only char and int, the min and max. All others are NOT TYPED
>anymore for years!!! They translate into these two.

You know Tassilo, you should at least have the *BALLS* to admit your
wrong. I've traced into mfc, standard 'C' libs for years. Thats where
the documentation is. If your new to that, then maybe Perl was a good 
choice for you...

What a fizzle, thought you had some knowledge based on experience.
Guess I'm wrong again..

robic0


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

Date: Sun, 19 Mar 2006 19:15:11 -0800
From: robic0
Subject: Re: Code that makes you say hmmm!
Message-Id: <og7s12h550e0pgcnmoc79f0co4g65u1sbl@4ax.com>

On Sat, 18 Mar 2006 11:21:32 GMT, "John W. Krahn" <someone@example.com> wrote:

>I downloaded a Perl program recently and encountered this line:
>
>
>    if(exists $_[0]->{"name"} and scalar($_[0]->{"name"}) eq $_[0]->{"name"}){
>
>
>
>
>Comments?  Jokes?
>
>
>John

I'm not suprised this post got 5 replies by the regulars


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

Date: Sun, 19 Mar 2006 21:40:05 -0800
From: robic0
Subject: Re: FAQ 3.1 How do I do (anything)?
Message-Id: <a0gs12d9pei8mpoehdb52o0a14i98e7h87@4ax.com>

On Tue, 14 Mar 2006 18:03:02 -0800, PerlFAQ Server <brian@stonehenge.com> wrote:

>This is an excerpt from the latest version perlfaq3.pod, which
>comes with the standard Perl distribution. These postings aim to 
>reduce the number of repeated questions as well as allow the community
>to review and update the answers. The latest version of the complete
>perlfaq is at http://faq.perl.org .
>
>--------------------------------------------------------------------
>
>3.1: How do I do (anything)?
>
>    Have you looked at CPAN (see perlfaq2)? The chances are that someone has
>    already written a module that can solve your problem. Have you read the
>    appropriate manpages? Here's a brief index:
>
>            Basics          perldata, perlvar, perlsyn, perlop, perlsub
>            Execution       perlrun, perldebug
>            Functions       perlfunc
>            Objects         perlref, perlmod, perlobj, perltie
>            Data Structures perlref, perllol, perldsc
>            Modules         perlmod, perlmodlib, perlsub
>            Regexes         perlre, perlfunc, perlop, perllocale
>            Moving to perl5 perltrap, perl
>            Linking w/C     perlxstut, perlxs, perlcall, perlguts, perlembed
>            Various         http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz
>                            (not a man-page but still useful, a collection
>                             of various essays on Perl techniques)
>
>    A crude table of contents for the Perl manpage set is found in perltoc.
>
>
>
>--------------------------------------------------------------------
>
>The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
>are not necessarily experts in every domain where Perl might show up,
>so please include as much information as possible and relevant in any
>corrections. The perlfaq-workers also don't have access to every operating
>system or platform, so please include relevant details for corrections 
>to examples that do not work on particular platforms. Working code is
>greatly appreciated.
>
>If you'd like to help maintain the perlfaq, see the details in 
>perlfaq.pod.
>*** Free account sponsored by SecureIX.com ***
>*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

I think the subject is paranthetic..


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

Date: Mon, 20 Mar 2006 05:09:00 GMT
From: "Nospam" <nospam@home.com>
Subject: unicode conversion
Message-Id: <MNqTf.2424$g76.118@newsfe2-gui.ntli.net>

I am trying to convert some unicode to their equivalent characters, however
it is not printing out the character

#! perl\bin\perl
use strict;
use warnings;
use utf8;
use Text::Unidecode;

use Data::Dumper;
use WWW::Mechanize;


my $w = print
unidecode("\x{25163}\x{34920}\x{36275}\x{29699}\x{20026}\x{33258}\x{30001}")
;
my $u = print
unidecode("\x{25171}\x{24320}\x{24744}\x{30340}\x{30005}\x{35805}");
my $m = print
unidecode("\x{20570}\x{37329}\x{38065}\x{35835}\x{20070}\x{30005}\x{23376}\x
{37038}\x{20214}");
my $e = print
unidecode("\x{22238}\x{26469}\x{22312}\x{101}\x{98}\x{97}\x{121}\x{32}\x{223
12}\x{24748}\x{28014}\x{20197}\x{21518}");
my $mi = print
unidecode("\x{20415}\x{23452}\x{30340}\x{109}\x{112}\x{51}\x{115}");
my $q = print
unidecode("\x{20572}\x{27490}\x{25277}\x{28895}\x{22312}\x{19968}\x{20010}\x
{26143}\x{26399}");
my $c = print
unidecode("\x{25913}\x{36827}\x{24744}\x{30340}\x{39640}\x{23572}\x{22827}\x
{29699}\x{22312}\x{20108}\x{20010}\x{26143}\x{26399}");
my $p = print
unidecode("\x{20196}\x{20154}\x{24778}\x{35766}\x{30340}\x{112}\x{97}\x{121}
\x{112}\x{97}\x{108}\x{32}\x{28431}\x{27934}\x{91}\x{47}");
my $t = print unidecode("\x{24863}\x{20852}\x{36259}");
my $s = print unidecode("\x{30475}\x{19968}\x{30475}\x{22914}\x{19979}");

 open (FILE2, "samp.txt");
use constant START => "<FILE2>";


    while ()
    {my $mech = WWW::Mechanize->new();

my $START = <FILE2>;
$mech->get( $START );



$mech->field('chinese',"$s
chinese $w
chinese $u
chinese $m
chinese $e
chinese $mi
chinese $q
chinese $c
chinese $p");


close(FILE2);
}




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

Date: Sun, 19 Mar 2006 21:32:54 -0800
From: robic0
Subject: Re: unicode conversion
Message-Id: <nbfs12p8ge1teln4r8qmjm48ublk6vh94d@4ax.com>

On Mon, 20 Mar 2006 05:09:00 GMT, "Nospam" <nospam@home.com> wrote:

>I am trying to convert some unicode to their equivalent characters, however
>it is not printing out the character
>
Won't look through your code.
What do you mean by the phrase:
"trying to convert some unicode to their equivalent characters" ?

Characters are bitmaps, only the "codes" remain the same.
So are you trying to match up bitmaps that look the same?
Or are you actually trying to display code page bitmapped characters?

The last question is the reason I'm not looking at your code.


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

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:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#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 V10 Issue 9068
***************************************


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