[27158] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8997 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 26 18:05:39 2006

Date: Sun, 26 Feb 2006 15:05:03 -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           Sun, 26 Feb 2006     Volume: 10 Number: 8997

Today's topics:
    Re: A Problem With GD <markem@airmail.net>
    Re: A Problem With GD <markem@airmail.net>
    Re: A Problem With GD <tadmc@augustmail.com>
    Re: A Problem With GD <uri@stemsystems.com>
        HELP -- UBUNTU -- Do not have a proper compiling system <ignoramus20905@NOSPAM.20905.invalid>
    Re: HELP -- UBUNTU -- Do not have a proper compiling sy <1usa@llenroc.ude.invalid>
    Re: HELP -- UBUNTU -- Do not have a proper compiling sy <ignoramus20905@NOSPAM.20905.invalid>
    Re: HELP -- UBUNTU -- Do not have a proper compiling sy <ignoramus20905@NOSPAM.20905.invalid>
    Re: HELP -- UBUNTU -- Do not have a proper compiling sy <matthew.garrish@sympatico.ca>
    Re: HELP -- UBUNTU -- Do not have a proper compiling sy <jurgenex@hotmail.com>
    Re: simple pointer operations (newbe) <vtatila@mail.student.oulu.fi>
    Re: simple pointer operations (newbe) <abigail@abigail.nl>
    Re: simple pointer operations (newbe) <vtatila@mail.student.oulu.fi>
    Re: simple pointer operations (newbe) <abigail@abigail.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 26 Feb 2006 09:53:18 -0600
From: Mark Manning <markem@airmail.net>
Subject: Re: A Problem With GD
Message-Id: <1203jl9ogihbnd3@corp.supernews.com>


To clarify for everyone else - here is the answer:

	1. Remove all of the colorAllocate lines.
	2. Replace them with:

	      $rgb = ($fg_r << 16) | ($fg_g << 8) | $fg_b;

That is the answer and look!  I didn't have to rag on anyone about their 
program.  I didn't have to rag on anyone about what their posted program 
looked like.  Or say it is their problem when it is the posting 
program's problem.  I didn't have to put anyone down.  And I didn't have 
to act like you did.

All that BS just to remove three lines of code and replace it with one 
line of code.  My - what can I say?

Well, what can I say except this:

	1. I didn't want your help.  I was looking for one of the GD
	   people so I could talk with them.
	2. You took what I'd originally said out of context and started
	   making what I took to be rude comments.  And yes!  That is
	   my fault.  You probably thought you were just going to help.
	   But that is also why I went ahead and posted.  I wasn't
	   looking for help - but I went "whatever".

	   2a. That is to say - it wasn't "Can someone please help me
	       out with GD?"  It was "Whomever works on GD" as in,
	       "Who ever is working (or maintaining) the GD library".

	3. Perl programs do benefit from "use strict" and "use warnings"
	   but in this case they are unnecessary.  Not all Perl scripts
	   require strict or warnings - especially when someone already
	   knows a bit about coding.

And to everyone else who may read this - you may like how Mr. Unur 
writes and what he says - but I do not.  Therefore, in the future, if 
you side with Mr. Unur, please put me on your exclusion list as I will 
with Mr.Unur.  He may be smart - but he's not nice.  Don't need the 
ugliness.


A. Sinan Unur wrote:

> To clarify for the benefit of others: I am particularly sensitive to 



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

Date: Sun, 26 Feb 2006 09:55:58 -0600
From: Mark Manning <markem@airmail.net>
Subject: Re: A Problem With GD
Message-Id: <1203jq9fdaoe738@corp.supernews.com>


Actually, the answer is to remove all of the colorAllocate commands (or 
colorExact or whatever other color command you want) and to just replace 
them with:

	$rgb = ($fg_r << 16) | ($fg_g << 8) | $fg_b;

To create the RGB Hex information and then to just put that into the 
image via setPixel.  If I wanted to do transparency I'd use the (x<<24) 
and give the transparency byte a value.

Uri Guttman wrote:

>>>>>>"S" == Sisyphus  <sisyphus1@nomail.afraid.org> writes:



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

Date: Sun, 26 Feb 2006 11:29:48 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: A Problem With GD
Message-Id: <slrne03pcc.vun.tadmc@magna.augustmail.com>

Mark Manning <markem@airmail.net> wrote:

> please put me on your exclusion list


I had, of course, already done that even before your gracious request.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 26 Feb 2006 13:18:35 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: A Problem With GD
Message-Id: <x7zmke56h0.fsf@mail.sysarch.com>

>>>>> "MM" == Mark Manning <markem@airmail.net> writes:

  MM> Actually, the answer is to remove all of the colorAllocate commands
  MM> (or colorExact or whatever other color command you want) and to just
  MM> replace them with:

the solution is to learn how to code better. but you know more than all
the rest of us combined. please be our new perl coding guru! we will
worship your code and exalt it throughout the land. but first learn how
to use better names and data structures because we don't worship idiots.

your humble perl code review servant,

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Sun, 26 Feb 2006 16:01:01 GMT
From: Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid>
Subject: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <1hkMf.28583$mP4.15292@fe53.usenetserver.com>

I am a little bit pissed. I installed edubuntu for my 4.5 year old
son, and discovered that it does not have a working gcc! WTF!

(I am trying to install mplayer)

I did install gcc with apt-get install gcc-3.4, or some such, but it
seems to lack important stuff. 

When I am compiling mplayer MPlayer-1.0pre7try2, it complains during
 ./configure that:

Checking for bitypes.h (inttypes.h predecessor) ...
Error: Cannot find header either inttypes.h or bitypes.h (see
DOCS/HTML/en/faq.html).

Check "configure.log" if you do not understand why it failed.

the log file says that sys/bitypes.h was not found. Where does this
file come from and how can I properly get it?

The whole /usr/include/sys directory is missing on my install, whereas
it is present on fedora core. Any idea how to find what I am missing? 

thanks!

i



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

Date: Sun, 26 Feb 2006 16:07:38 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <Xns9776714B39EC1asu1cornelledu@127.0.0.1>

Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid> wrote in 
news:1hkMf.28583$mP4.15292@fe53.usenetserver.com:

> I am a little bit pissed. I installed edubuntu for my 4.5 year old
> son, and discovered that it does not have a working gcc! WTF!

Do you realize you are posting this to comp.lang.perl.misc?

I thought I had asked you a long time ago to stick with a single posting 
address so I did not have to plonk you each time.

> (I am trying to install mplayer)
> 
> I did install gcc with apt-get install gcc-3.4, or some such, but it
> seems to lack important stuff. 
> 
> When I am compiling mplayer MPlayer-1.0pre7try2, it complains during
> ./configure that:
> 
> Checking for bitypes.h (inttypes.h predecessor) ...
> Error: Cannot find header either inttypes.h or bitypes.h (see
> DOCS/HTML/en/faq.html).
> 
> Check "configure.log" if you do not understand why it failed.
> 
> the log file says that sys/bitypes.h was not found. Where does this
> file come from and how can I properly get it?
> 
> The whole /usr/include/sys directory is missing on my install, whereas
> it is present on fedora core. Any idea how to find what I am missing? 

Try another group.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



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

Date: Sun, 26 Feb 2006 16:15:58 GMT
From: Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid>
Subject: Re: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <2vkMf.6020$Gz4.3086@fe13.usenetserver.com>

oops, wrong newsgroup!!!

i

On Sun, 26 Feb 2006 16:01:01 GMT, Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid> wrote:
> I am a little bit pissed. I installed edubuntu for my 4.5 year old
> son, and discovered that it does not have a working gcc! WTF!
>
> (I am trying to install mplayer)
>
> I did install gcc with apt-get install gcc-3.4, or some such, but it
> seems to lack important stuff. 
>
> When I am compiling mplayer MPlayer-1.0pre7try2, it complains during
> ./configure that:
>
> Checking for bitypes.h (inttypes.h predecessor) ...
> Error: Cannot find header either inttypes.h or bitypes.h (see
> DOCS/HTML/en/faq.html).
>
> Check "configure.log" if you do not understand why it failed.
>
> the log file says that sys/bitypes.h was not found. Where does this
> file come from and how can I properly get it?
>
> The whole /usr/include/sys directory is missing on my install, whereas
> it is present on fedora core. Any idea how to find what I am missing? 
>
> thanks!
>
> i
>



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

Date: Sun, 26 Feb 2006 16:16:35 GMT
From: Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid>
Subject: Re: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <DvkMf.6021$Gz4.2839@fe13.usenetserver.com>

On Sun, 26 Feb 2006 16:07:38 GMT, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> Ignoramus20905 <ignoramus20905@NOSPAM.20905.invalid> wrote in 
> news:1hkMf.28583$mP4.15292@fe53.usenetserver.com:
>
>> I am a little bit pissed. I installed edubuntu for my 4.5 year old
>> son, and discovered that it does not have a working gcc! WTF!
>
> Do you realize you are posting this to comp.lang.perl.misc?
>
> I thought I had asked you a long time ago to stick with a single posting 
> address so I did not have to plonk you each time.

No, I posted here by mistake, and yes, I am a little drunk indeed. 

i

>> (I am trying to install mplayer)
>> 
>> I did install gcc with apt-get install gcc-3.4, or some such, but it
>> seems to lack important stuff. 
>> 
>> When I am compiling mplayer MPlayer-1.0pre7try2, it complains during
>> ./configure that:
>> 
>> Checking for bitypes.h (inttypes.h predecessor) ...
>> Error: Cannot find header either inttypes.h or bitypes.h (see
>> DOCS/HTML/en/faq.html).
>> 
>> Check "configure.log" if you do not understand why it failed.
>> 
>> the log file says that sys/bitypes.h was not found. Where does this
>> file come from and how can I properly get it?
>> 
>> The whole /usr/include/sys directory is missing on my install, whereas
>> it is present on fedora core. Any idea how to find what I am missing? 
>
> Try another group.
>
> Sinan
>



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

Date: Sun, 26 Feb 2006 12:52:03 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <4VlMf.2411$972.18983@news20.bellglobal.com>


"Ignoramus20905" <ignoramus20905@NOSPAM.20905.invalid> wrote in message 
news:1hkMf.28583$mP4.15292@fe53.usenetserver.com...
>I am a little bit pissed. I installed edubuntu for my 4.5 year old
> son, and discovered that it does not have a working gcc! WTF!
>

Poor kid; all the cools kids have gcc these days. Was there a Perl question 
you forgot to ask?

Matt 




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

Date: Sun, 26 Feb 2006 20:23:04 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: HELP -- UBUNTU -- Do not have a proper compiling system
Message-Id: <I6oMf.15948$3W5.3029@trnddc02>

Ignoramus20905 wrote:
> I am a little bit pissed. I installed edubuntu for my 4.5 year old
> son, and discovered that it does not have a working gcc! WTF!
[whatever]

Your name is program, isn't it?
Anyway, why are you keeping inventing new email alias? It doesn't improve 
your standing and justs adds one more entry in my kill file.

Bye bye

jue 




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

Date: Sun, 26 Feb 2006 16:34:11 +0200
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: simple pointer operations (newbe)
Message-Id: <dtse9g$vmd$1@news.oulu.fi>

Dirk Lehmann wrote:
> Okay, I think that I should learn much more about the differences between
> a pointer and a reference. I'm just at the beginning to understand
> references because the most introductions to Perl let references shown
> like a pointer and don't tell the reader what are the differences.

Hi,
I'm pretty new to Perl but here's how I've understood this reference Vs 
pointer question:
It is quite a common question and there are often misconceptions between the 
two. A friend of mine heavily disliked a particular language because not 
knowing references, he thought that the lack of pointers would be cripling 
(i.e. no linked lists or function pointers, for instance).

Maybe it would help to think of references as a restricted form of pointers. 
Just like a pointer a reference points to an address in memory and in Perl 
has a type i.e. a reference to a scalar, array, hash or subroutine, for 
example. Again like pointers you can ask  something for its memory address 
and assign this address to a reference. Given another reference you can also 
de-reference it get the thingy to which the reference is pointing, though 
you'll need to explicitly specify the dereferenced type you're expecting to 
get out. Other operations for references include the equality comparison, 
seeing if they point to the same thing, and asking for the type of the 
reference with the ref function. Stringgification of memory addresses to 
which the references point is also possible, but its only use seems to be as 
hash keys. Technically references like strings and numbers are one kind of 
scalar in addition to numbres and strings.

Unlike pointers references don't support address arithmetic and when you 
come to think of it it is not truely necessary, either. But then again, you 
can index to an array of references, rather than dangerously dealing with 
the raw memory addresses. Similarly, in stead of using statically defined 
structs as in C, you've got the more dynamic hashtables, and references to 
hashes can easily be put in an array or a hash  as values, for that matter. 
Lastly, note that unlike in C, the array notation is not simply syntactic 
sugar for pointer arithmetic.

Hope this helps.

-- 
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/ 




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

Date: 26 Feb 2006 16:17:54 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: simple pointer operations (newbe)
Message-Id: <slrne03l5i.h1.abigail@alexandra.abigail.nl>

Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi) wrote on MMMMDLXII
September MCMXCIII in <URL:news:dtse9g$vmd$1@news.oulu.fi>:
''  
''  Maybe it would help to think of references as a restricted form of pointers.
''  Just like a pointer a reference points to an address in memory and in Perl 

No, it doesn't. At least, not directly. It does indirectly, but so does
*every defined value* in Perl.

The pointing to a memory address (and then it's a memory address of the
SV/AV/HV, not the actualy data) happens internally, far away from the Perl
language. 

You'r not doing anyone learning about references a favour by telling them
a reference has anything to do with memory locations. That's just an 
implementation detail - one that could in principle change, without having
it any effect on the language level.



Abigail
-- 
perl -le 's[$,][join$,,(split$,,($!=85))[(q[0006143730380126152532042307].
          q[41342211132019313505])=~m[..]g]]e and y[yIbp][HJkP] and print'


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

Date: Sun, 26 Feb 2006 23:22:24 +0200
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: simple pointer operations (newbe)
Message-Id: <dtt66s$4sn$1@news.oulu.fi>

Abigail wrote:
<snip>
> You'r not doing anyone learning about references a favour by telling them
> a reference has anything to do with memory locations. That's just an
> implementation detail - one that could in principle change, without having
> it any effect on the language level.
Hmm now that I think of what you said, quite right. The reason why I started 
talking about memory addresses is that I didn't think abstractly enough and 
actually encountered pointers before references. So I often still think of 
references mostly as a neat subset of pointer functionality, my bad I guess. 
Conceptually, though, neither the concept of a memory address nor the size 
of the element to which you are refering to matters much as there's no 
arithmetic. Knowing that there are some similarrities between pointers and 
references might or might help the confused OP, I'm not sure.

One question on references, even though it comes down to yet another 
implementation detail, <grin>:
I said earlier that they support equality comparisons. Is the real memory 
address checked when you use the equals operator or does it simply compare 
the references after stringification? Does it matter, in case of references, 
whether the equals operator is numerical or string based? I'm a bit confused 
here myself, oh well.

-- 
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/ 




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

Date: 26 Feb 2006 22:48:02 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: simple pointer operations (newbe)
Message-Id: <slrne04c12.h1.abigail@alexandra.abigail.nl>

Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi) wrote on MMMMDLXII
September MCMXCIII in <URL:news:dtt66s$4sn$1@news.oulu.fi>:
//  
//  I said earlier that they support equality comparisons. Is the real memory 
//  address checked when you use the equals operator or does it simply compare 
//  the references after stringification? Does it matter, in case of references,
//  whether the equals operator is numerical or string based? I'm a bit confused
//  here myself, oh well.


Yes and no. If you do a numeric compare, it compares memory addresses.
If you do a string compare, it compares the stringification. But that
doesn't really matter, in both cases, (in the absense of overload magic)
the result is true if, and only if the references are the same.

If overload magic is present, all bets are off.


Abigail
-- 
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
 |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
 |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
 |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;


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

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 8997
***************************************


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