[30761] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2006 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 26 09:09:59 2008

Date: Wed, 26 Nov 2008 06:09:11 -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           Wed, 26 Nov 2008     Volume: 11 Number: 2006

Today's topics:
    Re: CGI and PERL help - no image <jurgenex@hotmail.com>
    Re: CGI and PERL help - no image <spamtrap@dot-app.org>
    Re: comp.lang.* newsgroups seems dying <spam@bde-arc.ampr.org>
    Re: comp.lang.* newsgroups seems dying <brian.d.foy@gmail.com>
    Re: comp.lang.* newsgroups seems dying <xahlee@gmail.com>
    Re: comp.lang.* newsgroups seems dying <brian.d.foy@gmail.com>
        Efficient Code <hirenshah.05@gmail.com>
        my variable is recognized in following sub <michaelgang@gmail.com>
    Re: my variable is recognized in following sub <someone@example.com>
        new CPAN modules on Wed Nov 26 2008 (Randal Schwartz)
        Unofficial Phone,the most cheap mobile phones from chin <yingwen@1dis.cn>
        what's so difficult about namespace? <xahlee@gmail.com>
    Re: what's so difficult about namespace? <gene.ressler@gmail.com>
    Re: what's so difficult about namespace? <noone@lewscanon.com>
    Re: what's so difficult about namespace? <Pidgeot18@verizon.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 25 Nov 2008 21:08:59 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: CGI and PERL help - no image
Message-Id: <q8mpi4toleu5d33m43p4a1cqhj032efqc6@4ax.com>

secSwami <bhasin@pacbell.net> wrote:
>print "Content-type:  image/gif\n\n";
>print "<img src=\"angry.gif\">";

I may be be wrong but to me this 
	<img src="angry.gif">
looks like text or maybe an HTML snippet but by no means like an image
in gif as claimed by your content type.

Your question has nothing to do with HTML.
Had you written your CGI script in C or Haskell, you would have exactly
the same problem.

jue


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

Date: Wed, 26 Nov 2008 02:02:30 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: CGI and PERL help - no image
Message-Id: <m1ljv79dh5.fsf@dot-app.org>

secSwami <bhasin@pacbell.net> writes:

> #!/usr/bin/perl
> use CGI;
>
> print header;
> print "Content-type: image/gif\n\n";
> print "<img src=\"/images/angry.gif\">";

Your script is sending HTML, not a GIF image.

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Tue, 25 Nov 2008 23:10:16 -0800
From: "D. Stussy" <spam@bde-arc.ampr.org>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <ggito3$ni8$1@snarked.org>

"Xah Lee" <xahlee@gmail.com> wrote in message
news:0ce02b6e-035f-40e2-82e1-953228138c87@e1g2000pra.googlegroups.com...
it appears to me, that comp.lang.lisp is dying, and i think
comp.lang.* newsgroup is dying in general. (perhaps all newsgroups)

my experience in the last couple of years, i noticed fewer posts, and
much more spams, especially this year.
 ...
-----
it's funny that in comp.lang.perl.misc, half of the post these days
are Perl FAQs. lol. The Perl community's fanatical fuckhead priests
are practical and loud bunch, thinking they are mavericks and messiahs
among the programing geekers. They post their FAQ frequently, but not
only that, they cut it into 1 Question/Answer format and post several
of it per day. They've been doing that for years. (but even so, Perl's
popularity has been decreasing long-term in the past decade ...
(because, if good people keeps communication and info going, no amount
of marketing and fucking lies will perpetually sell yourself. The
other reason for decreasing perl use is that actually lots and lots
languages are coming into the scene)
 ...
-----

Well, with regards to perl, the topic has its own hierarchy in Usenet, so
I'd expect the lone group to be neglected.  They're all over at perl.*.




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

Date: Wed, 26 Nov 2008 07:36:44 -0600
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <261120080736449947%brian.d.foy@gmail.com>

In article <ggito3$ni8$1@snarked.org>, D. Stussy
<spam@bde-arc.ampr.org> wrote:

> "Xah Lee" <xahlee@gmail.com> wrote in message
> news:0ce02b6e-035f-40e2-82e1-953228138c87@e1g2000pra.googlegroups.com...
> it appears to me, that comp.lang.lisp is dying, and i think
> comp.lang.* newsgroup is dying in general. (perhaps all newsgroups)
> 
> my experience in the last couple of years, i noticed fewer posts, and
> much more spams, especially this year.
> ...
> -----
> it's funny that in comp.lang.perl.misc, half of the post these days
> are Perl FAQs. lol. The Perl community's fanatical fuckhead priests
> are practical and loud bunch, thinking they are mavericks and messiahs
> among the programing geekers. They post their FAQ frequently,

Actually, it's just me posting the FAQ excerpts, and it's once every
four hours (so only six a day). They always come from the same posting
address so they are easy to filter, and I use my real email address as
the sender so people know who's doing it and how to contact me.

It's really just me, the maintainer of the Perl FAQ. The other
fuckheads have nothing to do with it.


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

Date: Wed, 26 Nov 2008 05:56:20 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <f28ebe62-ec11-48a7-ac0a-076c14217fd6@q30g2000prq.googlegroups.com>

On Nov 25, 11:10 pm, "D. Stussy" <s...@bde-arc.ampr.org> wrote:

> Well, with regards to perl, the topic has its own hierarchy in Usenet, so
> I'd expect the lone group to be neglected.  They're all over at perl.*.

Wow, amazing!

when did this happen?

is this announced in somewhere official perl community?

btw, what is the method or process of creating new newsgroup
hierarchy?

i don't imagin there now should also be root hierachy like =E2=80=9Cpython.=
*=E2=80=9D,
=E2=80=9Cjava.*=E2=80=9D ... is there any reason why perl can do it?

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84


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

Date: Wed, 26 Nov 2008 07:44:36 -0600
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <261120080744368302%brian.d.foy@gmail.com>

In article
<0ce02b6e-035f-40e2-82e1-953228138c87@e1g2000pra.googlegroups.com>, Xah
Lee <xahlee@gmail.com> wrote:

> it's funny that in comp.lang.perl.misc, half of the post these days
> are Perl FAQs. lol. The Perl community's fanatical fuckhead priests
> are practical and loud bunch, thinking they are mavericks and messiahs
> among the programing geekers. They post their FAQ frequently, but not
> only that, they cut it into 1 Question/Answer format and post several
> of it per day. They've been doing that for years. 

Actually, there's only one fuckhead posting the FAQ, and that's me. :)

It's once every four hours (so only six a day). They always come from
the same posting address so they are easy to filter, and I use my real
email address as the sender so people know who's doing it and how to
contact me. Posting these excerpts to comp.lang.perl.misc is the only
reason the FAQ is as healthy as it is. The readers send me patches for
errors, updates, and so on.

It might seem like half the *messages* are PerlFAQ, but it's more like
half of the new *threads*.  Depending on your newreader, that can be
confusing I guess.

It's really just me, the maintainer of the Perl FAQ. No other fuckheads
have anything to do with it, so don't credit or blame them.


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

Date: Wed, 26 Nov 2008 06:03:16 -0800 (PST)
From: "friend.05@gmail.com" <hirenshah.05@gmail.com>
Subject: Efficient Code
Message-Id: <fd546995-1e9d-4ef5-b6ae-32b2b76672bb@x14g2000yqk.googlegroups.com>

I have large file in following format.

Table A {
	17.64.0.0|17;
	32.58.34.192|26;
	32.58.157.0|24;
	32.106.15.0|24;
	}

Table B {
                32.106.80.0|21;
	32.106.88.0|24;
	32.106.192.0|20;
                }


I want to read the file and store it in some data structure and then I
will go through the data structure and according to some codition I
will value I need and then I should also able to find it belongs which
table (Table A or Table B).

Which will efficient data structure to store this type data and then
also retrive it fast to see in which table it exist.

Right now I am using two dimensional array. But since it is very slow.


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

Date: Wed, 26 Nov 2008 05:22:25 -0800 (PST)
From: david <michaelgang@gmail.com>
Subject: my variable is recognized in following sub
Message-Id: <beacf259-e454-4499-944a-a18a85811ba2@k36g2000yqe.googlegroups.com>

Hi all,

I wanted to share my findings about my variables and following sub.

The following program works:

use strict;
use warnings;

my $a = 30;
foo();

sub foo {
	print $a,"\n",
}

It prints 30 as output. At the first glance it was suprising for me
how the  $a variable is recognized by the sub. They are really in the
same scope. If this is intended by the user (closures) this is
wonderful but it can cause bugs.
The only solution is to write the function at the beginning.

use strict;
use warnings;

sub foo {
	print $a,"\n",
}

my $a = 30;
foo();

This won't compile

Hope this will save from other programmers to get unexpected errors.

Have a nice and productive day,
David


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

Date: Wed, 26 Nov 2008 05:44:02 -0800
From: "John W. Krahn" <someone@example.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <BocXk.4370$kn7.2162@newsfe08.iad>

david wrote:
> 
> I wanted to share my findings about my variables and following sub.
> 
> The following program works:
> 
> use strict;
> use warnings;
> 
> my $a = 30;
> foo();
> 
> sub foo {
> 	print $a,"\n",
> }
> 
> It prints 30 as output. At the first glance it was suprising for me
> how the  $a variable is recognized by the sub. They are really in the
> same scope. If this is intended by the user (closures) this is
> wonderful but it can cause bugs.

That is not a closure.

perldoc -q closure


> The only solution is to write the function at the beginning.
> 
> use strict;
> use warnings;
> 
> sub foo {
> 	print $a,"\n",
> }
> 
> my $a = 30;
> foo();
> 
> This won't compile

It *will* compile.  It will also warn about the use of $main::a and with 
warnings disabled it won't even do that.

$ perl -ce'
use strict;
use warnings;

sub foo {
print $a,"\n",
}

my $a = 30;
foo();
'
Name "main::a" used only once: possible typo at -e line 6.
-e syntax OK




John
-- 
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


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

Date: Wed, 26 Nov 2008 05:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Nov 26 2008
Message-Id: <KAxEIn.pLt@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Algorithm-SVMLight-0.09
http://search.cpan.org/~kwilliams/Algorithm-SVMLight-0.09/
Perl interface to SVMLight Machine-Learning Package 
----
Apache-SWIT-0.42
http://search.cpan.org/~bosu/Apache-SWIT-0.42/
mod_perl based application server with integrated testing. 
----
CGI-Session-BitBucket-1.2
http://search.cpan.org/~jbuhacoff/CGI-Session-BitBucket-1.2/
a module that loses your session data 
----
CGI-Session-Driver-bitbucket-1.06
http://search.cpan.org/~jbuhacoff/CGI-Session-Driver-bitbucket-1.06/
a module that loses your session data 
----
CPAN-Mini-0.573
http://search.cpan.org/~rjbs/CPAN-Mini-0.573/
create a minimal mirror of CPAN 
----
Catalyst-Plugin-ENV-0.01
http://search.cpan.org/~plcgi/Catalyst-Plugin-ENV-0.01/
getter for value from enviroment 
----
Catalyst-View-XSLT-0.05
http://search.cpan.org/~janus/Catalyst-View-XSLT-0.05/
XSLT View Class 
----
CatalystX-CRUD-0.35
http://search.cpan.org/~karman/CatalystX-CRUD-0.35/
CRUD framework for Catalyst applications 
----
CatalystX-CRUD-Model-RDBO-0.17
http://search.cpan.org/~karman/CatalystX-CRUD-Model-RDBO-0.17/
Rose::DB::Object CRUD 
----
CatalystX-CRUD-YUI-0.010
http://search.cpan.org/~karman/CatalystX-CRUD-YUI-0.010/
YUI for your CatalystX::CRUD view 
----
Coro-5.11
http://search.cpan.org/~mlehmann/Coro-5.11/
the only real threads in perl 
----
DBIx-Tree-MaterializedPath-v0.05
http://search.cpan.org/~larryl/DBIx-Tree-MaterializedPath-v0.05/
fast DBI queries and updates on "materialized path" trees 
----
Data-Dumper-Names-0.03
http://search.cpan.org/~ovid/Data-Dumper-Names-0.03/
Dump variables with names (no source filter) 
----
DateTime-0.4501
http://search.cpan.org/~drolsky/DateTime-0.4501/
A date and time object 
----
Device-Gsm-1.52
http://search.cpan.org/~cosimo/Device-Gsm-1.52/
Perl extension to interface GSM phones / modems 
----
Git-PurePerl-0.35
http://search.cpan.org/~lbrocard/Git-PurePerl-0.35/
A Pure Perl interface to Git repositories 
----
Google-Chart-0.05009
http://search.cpan.org/~dmaki/Google-Chart-0.05009/
Interface to Google Charts API 
----
Graphics-SANE-0.03
http://search.cpan.org/~pfaut/Graphics-SANE-0.03/
Perl extension for the Sane scanner access library. 
----
Gtk2-Ex-WidgetBits-6
http://search.cpan.org/~kryde/Gtk2-Ex-WidgetBits-6/
miscellaneous Gtk widget helpers 
----
HTML-Tested-0.47
http://search.cpan.org/~bosu/HTML-Tested-0.47/
Provides HTML widgets with the built-in means of testing. 
----
HTTP-Session-0.24
http://search.cpan.org/~tokuhirom/HTTP-Session-0.24/
simple session 
----
IO-Lambda-0.43
http://search.cpan.org/~karasik/IO-Lambda-0.43/
non-blocking I/O in lambda style 
----
JSON-DWIW-0.28
http://search.cpan.org/~dowens/JSON-DWIW-0.28/
JSON converter that Does What I Want 
----
Kephra-0.3.10_24
http://search.cpan.org/~lichtkind/Kephra-0.3.10_24/
crossplatform, GUI-Texteditor along perllike Paradigms 
----
Mail-SPF-Iterator-1.00
http://search.cpan.org/~sullr/Mail-SPF-Iterator-1.00/
iterative SPF lookup 
----
Module-DevAid-0.24
http://search.cpan.org/~rubykat/Module-DevAid-0.24/
tools to aid perl module developers 
----
Module-Release-2.01
http://search.cpan.org/~bdfoy/Module-Release-2.01/
Automate software releases 
----
Module-Release-Git-0.12
http://search.cpan.org/~bdfoy/Module-Release-Git-0.12/
Use Git with Module::Release 
----
Mozilla-ConsoleService-0.06
http://search.cpan.org/~bosu/Mozilla-ConsoleService-0.06/
Perl interface to Mozilla nsIConsoleService 
----
Net-Autoconfig-1.01
http://search.cpan.org/~kevin/Net-Autoconfig-1.01/
Perl extension for provisioning or reconfiguring network devices. 
----
Net-Autoconfig-1.01a
http://search.cpan.org/~kevin/Net-Autoconfig-1.01a/
Perl extension for provisioning or reconfiguring network devices. 
----
Net-BitTorrent-0.039_001
http://search.cpan.org/~sanko/Net-BitTorrent-0.039_001/
BitTorrent peer-to-peer protocol class 
----
Net-Libdnet-0.90
http://search.cpan.org/~gomor/Net-Libdnet-0.90/
binding for Dug Song's libdnet 
----
Net-eBay-0.52
http://search.cpan.org/~ichudov/Net-eBay-0.52/
Perl Interface to XML based eBay API. 
----
PICA-Record-0.39
http://search.cpan.org/~voj/PICA-Record-0.39/
Perl extension for handling PICA+ records 
----
POE-Component-Server-SimpleSMTP-1.36
http://search.cpan.org/~bingos/POE-Component-Server-SimpleSMTP-1.36/
A simple to use POE SMTP Server. 
----
Pairtree-0.2
http://search.cpan.org/~jak/Pairtree-0.2/
routines to manage pairtrees 
----
Passwd-Unix-0.42
http://search.cpan.org/~strzelec/Passwd-Unix-0.42/
----
Rose-HTMLx-Form-Related-0.13
http://search.cpan.org/~karman/Rose-HTMLx-Form-Related-0.13/
RHTMLO forms, living together 
----
Storable-AMF-0.21
http://search.cpan.org/~grian/Storable-AMF-0.21/
Perl extension for serialize/deserialize AMF0/AMF3 data 
----
SysAdmin-0.07
http://search.cpan.org/~marr/SysAdmin-0.07/
Parent class for SysAdmin wrapper modules. 
----
Test-Most-0.20_01
http://search.cpan.org/~ovid/Test-Most-0.20_01/
Most commonly needed test functions and features. 
----
Text-NLP-Stanford-EntityExtract-0.05
http://search.cpan.org/~zarquon/Text-NLP-Stanford-EntityExtract-0.05/
Talks to a stanford-ner socket server to get named entities back 
----
Text-NLP-Stanford-EntityExtract-0.06
http://search.cpan.org/~zarquon/Text-NLP-Stanford-EntityExtract-0.06/
Talks to a stanford-ner socket server to get named entities back 
----
Text-RewriteRules-0.16
http://search.cpan.org/~ambs/Text-RewriteRules-0.16/
A system to rewrite text using regexp-based rules 
----
Tie-TZ-1
http://search.cpan.org/~kryde/Tie-TZ-1/
tied $TZ setting %ENV and calling tzset() 
----
Tk-VisualBrowser-0.14
http://search.cpan.org/~ldomke/Tk-VisualBrowser-0.14/
Visual Browser for image directories 
----
WWW-Mechanize-1.52
http://search.cpan.org/~petdance/WWW-Mechanize-1.52/
Handy web browsing in a Perl object 
----
WWW-MobileCarrierJP-0.24
http://search.cpan.org/~tokuhirom/WWW-MobileCarrierJP-0.24/
scrape mobile carrier information 
----
WWW-Wikipedia-TemplateFiller-0.09
http://search.cpan.org/~diberri/WWW-Wikipedia-TemplateFiller-0.09/
Fill Wikipedia templates with your eyes closed 
----
XML-Entities-0.0305
http://search.cpan.org/~sixtease/XML-Entities-0.0305/
Decode strings with XML entities 
----
XML-Entities-0.0306
http://search.cpan.org/~sixtease/XML-Entities-0.0306/
Decode strings with XML entities 
----
ZConf-Mail-0.0.0
http://search.cpan.org/~vvelox/ZConf-Mail-0.0.0/
Misc mail client functions backed by ZConf. 
----
cnutt-feed-1.0
http://search.cpan.org/~iderrick/cnutt-feed-1.0/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Wed, 26 Nov 2008 03:06:52 -0800 (PST)
From: "yingwen@1dis.cn" <yingwen@1dis.cn>
Subject: Unofficial Phone,the most cheap mobile phones from china
Message-Id: <3e33ef44-3ef3-4fbc-9205-b056af15d72f@r37g2000prr.googlegroups.com>

Unofficial Phone,the most cheap mobile phones from china

http://www.unofficialphone.cn/


Free Russia Girls Pictures, Free Chinese Girls Pictures
Free Girls Picture
http://freegirlspictures.blogspot.com/

Chinese Girls Pictures
http://www.cn.1dis.cn/

Russia Girls Pictures
http://www.russia.1dis.cn/

Cartoon Girls Pictures
http://cartoongirlspictures.blogspot.com/

India Girls Pictures
http://www.india.1dis.cn/

Non-mainstream Pictures
http://non-mainstream.1dis.cn/

Western Girls pictures
http://www.western.1dis.cn/

koreagirls  pictures
http://koreagirls.blogspot.com/

other
www.chinesegirls8.cn
www.freegirlspictures.cn
free sexy videu
www.henub.cn


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

Date: Tue, 25 Nov 2008 22:29:43 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: what's so difficult about namespace?
Message-Id: <67b23938-1761-4bd7-92b4-6972a73fedb6@d42g2000prb.googlegroups.com>

comp.lang.lisp,comp.lang.functional,comp.lang.perl.misc,comp.lang.python,co=
mp.lang.java.programmer

2008-11-25

Recently, Steve Yegge implemented Javascript in Emacs lisp, and
compared the 2 languages.

http://steve-yegge.blogspot.com/
http://code.google.com/p/ejacs/

One of his point is about emacs lisp's lack of namespace.

Btw, there's a question i have about namespace that always puzzled me.

In many languages, they don't have namespace and is often a well known
sour point for the lang. For example, Scheme has this problem up till
R6RS last year. PHP didn't have namespace for the past decade till
about this year. Javascript, which i only have working expertise,
didn't have namespace as he mentioned in his blog. Elisp doesn't have
name space and it is a well known major issue.

Of languages that do have namespace that i have at least working
expertise: Mathematica, Perl, Python, Java. Knowing these langs
sufficiently well, i do not see anything special about namespace. The
_essence_ of namespace is that a char is choosen as a separator, and
the compiler just use this char to split/connect identifiers.
Although i have close to zero knowledge about compiler or parser, but
from a math point of view and my own 18 years of programing
experience, i cannot fathom what could possibly be difficult of
introducing or implementing a namespace mechanism into a language. I
do not understand, why so many languages that lacks so much needed
namespace for so long? If it is a social problem, i don't imagine they
would last so long. It must be some technical issue?

Could any compiler expert give some explanation?

Thanks.

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84


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

Date: Tue, 25 Nov 2008 23:01:44 -0800 (PST)
From: Gene <gene.ressler@gmail.com>
Subject: Re: what's so difficult about namespace?
Message-Id: <15657765-c99b-40ce-99ea-12ddf5eb6922@r40g2000yqj.googlegroups.com>

On Nov 26, 1:29=C2=A0am, Xah Lee <xah...@gmail.com> wrote:
> comp.lang.lisp,comp.lang.functional,comp.lang.perl.misc,comp.lang.python,=
co=C2=ADmp.lang.java.programmer
>
> 2008-11-25
>
> Recently, Steve Yegge implemented Javascript in Emacs lisp, and
> compared the 2 languages.
>
> http://steve-yegge.blogspot.com/http://code.google.com/p/ejacs/
>
> One of his point is about emacs lisp's lack of namespace.
>
> Btw, there's a question i have about namespace that always puzzled me.
>
> In many languages, they don't have namespace and is often a well known
> sour point for the lang. For example, Scheme has this problem up till
> R6RS last year. PHP didn't have namespace for the past decade till
> about this year. Javascript, which i only have working expertise,
> didn't have namespace as he mentioned in his blog. Elisp doesn't have
> name space and it is a well known major issue.
>
> Of languages that do have namespace that i have at least working
> expertise: Mathematica, Perl, Python, Java. Knowing these langs
> sufficiently well, i do not see anything special about namespace. The
> _essence_ of namespace is that a char is choosen as a separator, and
> the compiler just use this char to split/connect identifiers.
> Although i have close to zero knowledge about compiler or parser, but
> from a math point of view and my own 18 years of programing
> experience, i cannot fathom what could possibly be difficult of
> introducing or implementing a namespace mechanism into a language. I
> do not understand, why so many languages that lacks so much needed
> namespace for so long? If it is a social problem, i don't imagine they
> would last so long. It must be some technical issue?
>
> Could any compiler expert give some explanation?
>
> Thanks.
>
> =C2=A0 Xah
> =E2=88=91http://xahlee.org/
>
> =E2=98=84

When multiple existing systems are combined, namespaces provide a
quick way to prevent name clashes.




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

Date: Wed, 26 Nov 2008 08:11:31 -0500
From: Lew <noone@lewscanon.com>
Subject: Re: what's so difficult about namespace?
Message-Id: <ggjhu3$4ro$2@aioe.org>

Xah Lee wrote:
>> Of languages that do have namespace that i [sic] have at least working
>> expertise: Mathematica, Perl, Python, Java. Knowing these langs
>> sufficiently well, i [sic] do not see anything special about namespace. The
>> _essence_ of namespace is that a char is choosen as a separator, and
>> the compiler just use this char to split/connect identifiers.

That is hardly the essence of namespaces, just a notational convenience to 
help humans relate to namespaces.  The essence of namespaces is that they are 
distinct.

It's also not an accurate statement.  XML namespaces, for example, use many 
characters as separators, not just one, but that's not the essence.  The 
essence is that all the characters matter, not just the putative separators.

>> Although i [sic] have close to zero knowledge about compiler or parser, but
>> from a math point of view and my own 18 years of programing
>> experience, i [sic] cannot fathom what could possibly be difficult of
>> introducing or implementing a namespace mechanism into a language. I
>> do not understand, why so many languages that lacks so much needed

Point not proven.  If they were really needed in every language, every 
language would have them.

>> namespace for so long? If it is a social problem, i [sic] don't imagine they
>> would last so long. It must be some technical issue?

Yeah, like technically they aren't needed everywhere.

>> Could any compiler expert give some explanation?

Compilers are not relevant.  XML has namespaces, and compilers certainly 
aren't the issue there.

-- 
Lew


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

Date: Wed, 26 Nov 2008 08:45:38 -0500
From: Joshua Cranmer <Pidgeot18@verizon.invalid>
Subject: Re: what's so difficult about namespace?
Message-Id: <ggjju2$8e1$1@news-int2.gatech.edu>

Xah Lee wrote:
> In many languages, they don't have namespace and is often a well known
> sour point for the lang. For example, Scheme has this problem up till
> R6RS last year. PHP didn't have namespace for the past decade till
> about this year. Javascript, which i only have working expertise,
> didn't have namespace as he mentioned in his blog. Elisp doesn't have
> name space and it is a well known major issue.

Namespaces are useful for one reason: they allow you to have conflicts 
with names in some cases. In Java, there are two Lists: java.awt.List 
and java.util.List. Since a name must only be unique within a namespace, 
you can use shorter names without fear of conflict.

In languages without these namespaces, you end up with stuff like 
g_type_init, e_data_server_module_init, mysql_connect, etc., where the 
prefixes are used to emulate the unique nature of namespaces.

> Of languages that do have namespace that i have at least working
> expertise: Mathematica, Perl, Python, Java. Knowing these langs
> sufficiently well, i do not see anything special about namespace.

Most features aren't sufficiently appreciated until one has to do 
without it. The avoidance of collision that comes with namespaces has 
shown to be sufficiently useful that I doubt we'll ever see a future 
major language that doesn't have some sort of namespace feature.

 > The
> _essence_ of namespace is that a char is choosen as a separator, and
> the compiler just use this char to split/connect identifiers.

That's just composition of namespace names. It's not what namespaces is 
about.

> i cannot fathom what could possibly be difficult of
> introducing or implementing a namespace mechanism into a language.

Namespaces go to the very core of a language, name resolution. 
Retroactively adding such a feature is extremely difficult because there 
is a strong chance of accidentally breaking existing code.

 > I
> do not understand, why so many languages that lacks so much needed
> namespace for so long? If it is a social problem, i don't imagine they
> would last so long. It must be some technical issue?

It's technical: it would be difficult to retroactively implement such a 
feature.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth


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

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 V11 Issue 2006
***************************************


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