[25558] in Perl-Users-Digest
Perl-Users Digest, Issue: 7802 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 20 06:05:44 2005
Date: Sun, 20 Feb 2005 03:05:22 -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, 20 Feb 2005 Volume: 10 Number: 7802
Today's topics:
Re: ±M·~ºô¶±H¦sªA°È ¦P¨B¤ä´© PHP+MySQL, Access+ASP, AS <sonet.all@msa.hinet.net>
Re: =?ISO-8859-1?Q?=B1M=B7=7E=BA=F4=AD=B6=B1H=A6s=AAA=B <CarlosRivera@badnamefornospam.to>
Re: =?ISO-8859-1?Q?=B1M=B7=7E=BA=F4=AD=B6=B1H=A6s=AAA=B <yyusenet@yahoo.com>
[perl-python] exercise: partition a list by equivalence <xah@xahlee.org>
Creditwrench <creditwrench@gmail.com>
Re: emacs AAAAAAAAAAAAAHHH!!! <Juha.Laiho@iki.fi>
Re: emacs AAAAAAAAAAAAAHHH!!! babydoe@mailinator.com
Re: exercise: partition a list by equivalence <xah@xahlee.org>
Re: exercise: partition a list by equivalence <sjmachin@lexicon.net>
Re: Google Groups and indentations ioneabu@yahoo.com
Re: Google Groups and indentations <tassilo.von.parseval@rwth-aachen.de>
How should I interpret this set of laptop specification <FrancisChee@hotm@il.com>
Re: How should I interpret this set of laptop specifica <saxifrax@pacbell*dot*net>
Re: How should I interpret this set of laptop specifica <jeff@tigger.net>
Importing records with both space and quoted text quali <ljames@apollo3.com>
Re: Importing records with both space and quoted text q <nobull@mail.com>
Re: Importing records with both space and quoted text q <ljames@apollo3.com>
Re: Regex combining /(foo|bar)/ slower than using forea <comdog@panix.com>
Re: sorting just the largest values (David Combs)
Re: The Problem with Perl <groleau+news@freeshell.org>
Re: The Problem with Perl <groleau+news@freeshell.org>
Re: The Problem with Perl <groleau+news@freeshell.org>
Re: The Problem with Perl <groleau+news@freeshell.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 20 Feb 2005 13:21:44 +0800
From: "sonet" <sonet.all@msa.hinet.net>
Subject: Re: ±M·~ºô¶±H¦sªA°È ¦P¨B¤ä´© PHP+MySQL, Access+ASP, ASP.NET, CGI, SSI ¹q¶l¯f¬r¹LÂo, ©U§£¹q¶l¹LÂo ¤ÎWebMail ..................................
Message-Id: <cv96qb$g69$1@netnews.hinet.net>
This is spam!
It is from hk/tw or china.
"YYusenet" <yyusenet@yahoo.com> ??? news:cv8iqh$o2l$1@news.xmission.com
???...
dummyboy@hongkong-hosting-service.com wrote:
> ©Ò¦³¦b¥»¤ë§C«e¥Ó½Ðªº¨ä¥¦¤½¥qÂಾ«È¤á§Y¦h°e±z¤TÓ¤ëªA°È
> ¤ä´© PHP+MySQL, Access+ASP, ASP.NET, CGI, SSI ¹q¶l¯f¬r¹LÂo, ©U§£¹q¶l¹LÂo
¤Î
[snip[
>
http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=E
>
>
> «È ¤á ¦C ªí : http://www.uhostnet.com/modules.php?name=clients
> .................................
Is this spam or someone actually trying to post?
--
k g a b e r t (at) x m i s s i o n (dot) c o m
*Support Mozilla Firefox*!
http://www.spreadfirefox.com/?q=user/register&r=71209
------------------------------
Date: Sat, 19 Feb 2005 23:37:33 GMT
From: CarlosRivera <CarlosRivera@badnamefornospam.to>
Subject: Re: =?ISO-8859-1?Q?=B1M=B7=7E=BA=F4=AD=B6=B1H=A6s=AAA=B0=C8_=A6?= =?ISO-8859-1?Q?P=A8B=A4=E4=B4=A9_PHP+MySQL=2C_Access+ASP=2C_ASP=2E?= =?ISO-8859-1?Q?NET=2C_CGI=2C_SSI_=B9q=B6l=AFf=ACr=B9L=C2o=2C_=A9?= =?ISO-8859-1?Q?U=A7=A3=B9q=B6l=B9L=C2o_=A4=CEWebMail_=2E=2E=2E=2E=2E?= =?ISO-8859-1?Q?=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E?= =?ISO-8859-1?Q?=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E?=
Message-Id: <15QRd.1628$DC6.1@newssvr14.news.prodigy.com>
don't you want to put something in the headers to indicate what
charset/language that you are using. I don't see anything:
Path:
newssvr14.news.prodigy.com!newsdbm04.news.prodigy.com!newsdst01.news.prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!newscon06.news.prodigy.com!prodigy.net!news-FFM2.ecrc.net!news-mue1.dfn.de!news-nue1.dfn.de!newsfeed.r-kom.de!newsfeed.freenet.de!nntp.gblx.net!nntp3.phx1!news.hgc.com.hk!not-for-mail
From: dummyboy@hongkong-hosting-service.com
Newsgroups: comp.lang.perl.misc
Subject: ?M?~?????H?s?A?? ?P?B???? PHP+MySQL, Access+ASP, ASP.NET, CGI,
SSI ?q?l?f?r?L?o, ?U???q?l?L?o ??WebMail ..................................
Date: Sat, 19 Feb 2005 10:27:11 +0000 (UTC)
Organization: HGC Boardband
Lines: 84
Message-ID: <cv749v$peo$34@news.hgc.com.hk>
NNTP-Posting-Host: 221.126.135.128
X-Trace: news.hgc.com.hk 1108808831 26072 221.126.135.128 (19 Feb 2005
10:27:11 GMT)
X-Complaints-To: abuse@net-yan.com
NNTP-Posting-Date: Sat, 19 Feb 2005 10:27:11 +0000 (UTC)
Xref: newsmst01a.news.prodigy.com comp.lang.perl.misc:552963
dummyboy@hongkong-hosting-service.com wrote:
> ?????b?????C?e?????????????q?????????Y?h?e?z?T?????A??
> ???? PHP+MySQL, Access+ASP, ASP.NET, CGI, SSI ?q?l?f?r?L?o, ?U???q?l?L?o ??
> WebMail ??......
> ?????C?e????W1000?Y?e?????w?????????{?? osc.
> http://shop2.uhostnet.com
>
> ?C???u?? $20 ?_
>
> ????
> http://www.uhostnet.com
>
> ?s?????}?q???O
> http://dummy.uhostnet.com
>
> ?s???????????C???K?O???????C
> ?i?????????q?K?O???????????W?C
> ?A???p???R?Q?e?G?A?Z?w???Q?????A?????O?A?h?e???????C
> ?{?Y?????????q?????????A?Y?h?e?z?T?????A???C(???????W????)
> ?H?W?p????????????WIN2003???x?A???????i?????????q??Linux???x?A???p???C
>
> ???e?????{??
> ASP ?d????,??????,ASP ?H????,PHP ?H????,ASP ???W?q?l????,ASP ???????z?{??,???W????,?????t?????U???????{??..
>
> ?C?? $20 ?????H?s?A??
> Basic Plan W200: (?C?? $20)
> -- 200MB ????????
> -- ?L???q?l?H?c
> -- ?L???????????q
> -- ???? ASP+Access / CGI
> -- ?q?l?f?r?L?o?t??
> -- ?U???q?l?L?o?t??
> http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=A
>
> Windows W300: (?C?? $38)
> -- ?@?~?????s???W
> -- 300MB ????????
> -- ?L???q?l?H?c
> -- ?L???????????q
> -- ???? PHP+MySQL, ASP+ACCESS, CGI, SSI
> -- 1 ?? MySQL ?????w (5MB)
> -- ?q?l?f?r?L?o?t??
> -- ?U???q?l?L?o?t??
> http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=B
>
> Windows W500: (?C?? $48)
> -- ?@?~?????s???W
> -- ?l???? 3 ?? (?v?g???P???¤)
> -- 500MB ????????
> -- ?L???q?l?H?c
> -- ?L???????????q
> -- ???? PHP+MySQL, ASP+ACCESS, CGI, SSI
> -- 1 ?? MySQL ?????w (10MB)
> -- ?q?l?f?r?L?o?t??
> -- ?U???q?l?L?o?t??
> http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=C
>
> Windows W800: (?C?? $58)
> -- ?@?~?????s???W
> -- ?l???? 5 ?? (?v?g???P???¤)
> -- 800MB ????????
> -- ?L???q?l?H?c
> -- ?L???????????q
> -- ???? PHP+MySQL, ASP+ACCESS, CGI, SSI
> -- 1 ?? MySQL ?????w (20MB)
> -- ?q?l?f?r?L?o?t??
> -- ?U???q?l?L?o?t??
> http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=D
>
> Windows W1000: (?C?? $68)
> -- ?@?~?????s???W
> -- ?l???? 10 ?? (?v?g???P???¤)
> -- 1GB ????????
> -- ?L???q?l?H?c
> -- ?L???????????q
> -- ???? PHP+MySQL, ASP+ACCESS, CGI, SSI
> -- 1 ?? MySQL ?????w (50MB)
> -- ?q?l?f?r?L?o?t??
> -- ?U???q?l?L?o?t??
> -- ?e?????w???????{?????W?j???W?????t??
> http://www.uhostnet.com/modules.php?name=service&file=index&func=windetails&plan=E
>
>
> ?? ?? ?C ?? : http://www.uhostnet.com/modules.php?name=clients
> .................................
------------------------------
Date: Sat, 19 Feb 2005 16:41:14 -0700
From: YYusenet <yyusenet@yahoo.com>
Subject: Re: =?ISO-8859-1?Q?=B1M=B7=7E=BA=F4=AD=B6=B1H=A6s=AAA=B0=C8_=A6?= =?ISO-8859-1?Q?P=A8B=A4=E4=B4=A9_PHP+MySQL=2C_Access+ASP=2C_ASP=2E?= =?ISO-8859-1?Q?NET=2C_CGI=2C_SSI_=B9q=B6l=AFf=ACr=B9L=C2o=2C_=A9?= =?ISO-8859-1?Q?U=A7=A3=B9q=B6l=B9L=C2o_=A4=CEWebMail_=2E=2E=2E=2E=2E?= =?ISO-8859-1?Q?=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E?= =?ISO-8859-1?Q?=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E?=
Message-Id: <cv8iqh$o2l$1@news.xmission.com>
dummyboy@hongkong-hosting-service.com wrote:
> =A9=D2=A6=B3=A6b=A5=BB=A4=EB=A7C=ABe=A5=D3=BD=D0=AA=BA=A8=E4=A5=A6=A4=BD=
=A5q=C2=E0=B2=BE=AB=C8=A4=E1=A7Y=A6h=B0e=B1z=A4T=AD=D3=A4=EB=AAA=B0=C8
> =A4=E4=B4=A9 PHP+MySQL, Access+ASP, ASP.NET, CGI, SSI =B9q=B6l=AFf=ACr=B9=
L=C2o, =A9U=A7=A3=B9q=B6l=B9L=C2o =A4=CE
[snip[
> http://www.uhostnet.com/modules.php?name=3Dservice&file=3Dindex&func=3D=
windetails&plan=3DE
>=20
>=20
> =AB=C8 =A4=E1 =A6C =AA=ED : http://www.uhostnet.com/modules.php?name=3D=
clients
> .................................
Is this spam or someone actually trying to post?
--=20
k g a b e r t (at) x m i s s i o n (dot) c o m
*Support Mozilla Firefox*!
http://www.spreadfirefox.com/?q=3Duser/register&r=3D71209
------------------------------
Date: 20 Feb 2005 01:15:25 -0800
From: "Xah Lee" <xah@xahlee.org>
Subject: [perl-python] exercise: partition a list by equivalence
Message-Id: <1108890925.941814.45860@g14g2000cwa.googlegroups.com>
when i try to run the following program, Python complains about some
global name frozenset is not defined. Is set some new facility in
Python 2.4?
=A9# from Reinhold Birkenfeld
=A9def merge(pairings):
=A9 sets =3D {}
=A9 for x1, x2 in pairings:
=A9 newset =3D (sets.get(x1, frozenset([x1]))
=A9 | sets.get(x2, frozenset([x2])))
=A9 for i in newset:
=A9 sets[i] =3D newset
=A9
=A9 return [list(aset) for aset in set(sets.itervalues())]
it would be nice if the two working programs do not use some package.
This problem shouldn't need to.
Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
------------------------------
Date: Sat, 19 Feb 2005 23:31:00 GMT
From: "Creditwrench" <creditwrench@gmail.com>
Subject: Creditwrench
Message-Id: <1108855575.9247da9b927a6b72c38d7d33ddd1a139@teranews>
And the truth shall set ye free
http://www.creditwrench-thetruth.blogspot.com/
Uncle Normie
------------------------------
Date: Sun, 20 Feb 2005 07:00:14 +0000 (UTC)
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: emacs AAAAAAAAAAAAAHHH!!!
Message-Id: <cv9chu$nvn$1@ichaos.ichaos-int>
ioneabu@yahoo.com said:
>Sorry for the annoying subject, but I cannot express my frustration any
>better here. I am willing to take on learning anything new that will
>help me to program better and more efficiently.
I understand your frustration - emacs can be (and easily is) pretty
intrusive. It's meant to be considered as a way of life. If you spend
enough of your time writing code so that you can accept the emacs way
of life, then your life really will become easier. On the other hand,
if you just dabble at a piece of code every now and then, then emacs
may well be too intrusive (by default, at least). Of course, as emacs
is pretty much completely customisable through writing snippets of
elisp, you could tell emacs to keep out of your way. But then, writing
this amount of elist I guess would mean you're doing so much with emacs
that it is your way of life, so we have a slight chicken-and-egg
problem here.
Mind you, the same seems to be true for every large piece of software:
most fullblown GUI IDEs I've seen (like NetBeans for Java) are the
same -- and even MS Word is the same, if you just want to write a simple
one-page note. So, if you're spending a lot of your time with some
computer-related activity, get good tools for that, and learn to
utilise them. After the initial shock, they will ease your work. If
you're just dabbling occasionally, use as lightweight tools as you
can get away with -- they'll not be in your way.
>I see that many people use and love emacs and think it is the greatest
>for programming and everything else. I cannot find a decent online
>tutorial for using emacs to write Perl. Everyplace I look just gives
>the same few lines for the .emacs file and little else. I don't even
>see a Perl/emacs book on amazon.com.
Don't look for perl/emacs book. Look for a emacs book: because it's emacs
anyway, it'll be more or less the same. Learn elisp to some extent (more
than just copy-paste). Have a look in the cperl-mode.el file for insights
into how/why cperl mode does something in the way it does (and also to
possibly find some useful settings that are not documented for a reason
or another).
But as said, I understand your frustration. For the time being, I'm not
spending enough time writing code to really use Emacs, so I've reverted
to the small tools. Back when I did write more code, I did find emacs
a good tool - but did remember having a similar frustration as you
describe.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
------------------------------
Date: 20 Feb 2005 00:48:55 -0800
From: babydoe@mailinator.com
Subject: Re: emacs AAAAAAAAAAAAAHHH!!!
Message-Id: <1108889335.639297.37940@g14g2000cwa.googlegroups.com>
wana writes:
>
> All I really wanted up front was to see my Perl syntax color coded
> and to compile and run my Perl program from within emacs, just
> to see it work.
>
I'll start you off :
1. download the file 'mode-compile.el'
http://www.tls.cena.fr/~boubaker/distrib/mode-compile.el
and store it in your site-lisp directory.
2. download the file perl-54-info.tar.gz from CPAN and
extract the files and store in your 'info' directory.
3. in your info directory open up the 'dir' file and add
the following line at the bottom of the file.
Development
* Perl Modules: (pm).
* Perl - Practical Extraction and Report Language: (perl).
(be careful that the very last line in the 'dir' file is
a blank line otherwise it won't be read by Emacs)
4. in your site-lisp directory create a file 'default.el'
(you will have to look at variable exec-path to point
to your perl and Emacs binaries)
;;
------------%<---------------------------------------------------------
;; default.el should contain any convenience settings
;;
;;
;; look and feel customizing
;;
(setq debug-on-error t)
(setq default-frame-alist
'((top . 15)(left . 15) ; indent for cascade frames
(width . 80)(height . 30)
(cursor-color . "Red")
(cursor-type . bar)
(foreground-color . "black")
(background-color . "ivory")
(font . "-*-Courier New-normal-r-*-*-11-82-96-96-c-*-iso8859-1")))
(set-face-background 'modeline "navy")
(set-face-foreground 'modeline "gold")
(set-face-font
'italic "-*-Courier New-normal-i-*-*-11-82-96-96-c-*-iso8859-1")
(set-face-font
'bold "-*-Courier New-bold-r-*-*-11-82-96-96-c-*-iso8859-1")
(set-face-font
'bold-italic "-*-Courier New-bold-i-*-*-11-82-96-96-c-*-iso8859-1")
(setq initial-frame-alist '((top . 0) (left . 0)))
;;; coloring syntax
(global-font-lock-mode t)
(setq font-lock-maximum-decoration 3)
;; set exec-path explicitly, and then Sync exec-path to PATH
(setq exec-path '("c:/perl/bin" "c:/Emacs/bin"))
(setenv "PATH" (mapconcat 'identity exec-path path-separator))
(require 'cperl-site)
(require 'mode-compile-site)
;;
------------%<---------------------------------------------------------
5. also in site-lisp directory create 'cperl-site.el' and
paste the following into it (changing for your CPERL5LIB)
;;
------------%<---------------------------------------------------------
;; CPERL-SITE.EL
;;
;; Make cperl-mode the normal mode for Perl
(setenv "PERL5LIB" "c:/perl/lib/;c:/perl/site/lib")
(require 'cperl-mode)
(defalias 'perl-mode 'cperl-mode)
(setq cperl-hairy t)
(setq auto-mode-alist (cons '("\\.plx$" . cperl-mode) auto-mode-alist))
(provide 'cperl-site)
;; CPERL-SITE ends here.
;;
------------%<---------------------------------------------------------
6. create 'mode-compile-site.el' is site-lisp and paste
;;
------------%<---------------------------------------------------------
;;; MODE-COMPILE-SITE ---
(defvar mode-compile-map (make-sparse-keymap)
"Keymap for mode-compile mode.")
(setq mode-compile-expert-p t)
(condition-case err
(progn
(require 'easymenu)
(easy-menu-define mode-compile-menu mode-compile-map
"Call compilation according to mode"
'("Compile..."
["Run" mode-compile t]
["Next error" next-error t]
["Kill" mode-compile-kill t])))
(error (message "%s" err)))
(easy-menu-change '("tools") "compile" mode-compile-menu)
(autoload 'mode-compile "mode-compile"
"Command to compile current buffer file dependently of the major
mode" t)
(autoload 'mode-compile-kill "mode-compile"
"Command to kill a compilation launched by `mode-compile'" t)
(global-set-key "\C-cc" 'mode-compile)
(global-set-key "\C-ck" 'mode-compile-kill)
(provide 'mode-compile-site)
;;; END MODE-COMPILE-SITE.EL ---
;;
------------%<---------------------------------------------------------
7. You should now be able to run perl by typing 'ctrl-C c'
8. An aside, on win32, I use TEI Emacs : it's the duck's guts.
http://www.tei-c.org/Software/tei-emacs/
Also useful are some ported Unix tools (msys):
http://www.mingw.org/msys.shtml
------------------------------
Date: 19 Feb 2005 17:26:51 -0800
From: "Xah Lee" <xah@xahlee.org>
Subject: Re: exercise: partition a list by equivalence
Message-Id: <1108862810.984641.234950@f14g2000cwb.googlegroups.com>
an interesting problem so developed now is to write a function that
generate test cases for the purpose of testing performance. (just for
fun)
the design of this function could be interesting. We want to be able to
give parameters in this function so as to spit out all possible screw
test cases. First of all, a range of n (some millions) numbers. Then, a
fraction that specifies the percentage of these number are equivalent.
1 being all equivalent. 0 being all "distinct" (having only one
equivalent member (since the input comes in pairs)). Then we want to
have a parameter that says something like the sizes of the equivalence
groups. Suppose 50% of number are equal among themselves (i.e. have
more than one equivalent member). 1 would be all in one group. 0 would
mean all partitions have size 3 or 2. (there are more to it here...
since this is a distribution) ... Then, we need to turn this range of
integers into pairs. That's something more to think about.
So with this function at hand, we'll be able to say for sure which code
performs better (and under what type of input)
the Order notion in computing mathematics is fairly useless for finer
details.
PS it is not trivial to design this pair generating function. I don't
know if the above is on the right track, but essentially we want to
categorize the type of inputs according to the mathematical operational
performance aspect of partition by equivalence, and distill them into
parameters.
another func to write is one that canonicalize the output. Such as
sorting. So that all results can be compared simply by = in Python.
failing to design a elaborate pair_gen, we can just have pairs of
random numbers. But exactly what nature is such input... is more to
think about.
(in my original application, each number represent a computer file,
there are up to tens of thousands of files, and much less than 0.1% is
same as another, and for files that are same, each equivalent group
number no more than 10 or so.)
Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
John Machin wrote:
> FWIW, here's a brief UAT report:
>
> Appears to work: Reinhold, David, Xah...
> Has bug(s): ...
------------------------------
Date: 20 Feb 2005 02:29:33 -0800
From: "John Machin" <sjmachin@lexicon.net>
Subject: Re: exercise: partition a list by equivalence
Message-Id: <1108895373.013257.192310@l41g2000cwc.googlegroups.com>
Xah Lee wrote:
> when i try to run the following program, Python complains about some
> global name frozenset is not defined. Is set some new facility in
> Python 2.4?
http://www.python.org/doc/2.3/whatsnew/
http://www.python.org/doc/2.4/whatsnew/whatsnew24.html
You must be running 2.3. If you persist in running 2.3, put the
following at the top of the file:
import sys
PY_VERSION = sys.version_info[:2]
if PY_VERSION == (2,3):
from sets import Set as set
from sets import ImmutableSet as frozenset
That will get Reinhold's gadget working under 2.3. The bearophile's
function uses collections.deque which is built-in to 2.4.
> it would be nice if the two working programs do not use some package.
> This problem shouldn't need to.
Look at the newsgroup again. By my count there are apparently-working
versions from SIX people: Reinhold, bear.+, Brian Beck, David Eppstein,
yourself, and me. Only David's uses stuff that's not in the Python 2.4
off-the-shelf distribution.
------------------------------
Date: 19 Feb 2005 16:41:29 -0800
From: ioneabu@yahoo.com
Subject: Re: Google Groups and indentations
Message-Id: <1108860089.465392.165330@l41g2000cwc.googlegroups.com>
Tassilo v. Parseval wrote:
> Yesterday I saw an article posted via google rather by accident (I
only
> saw the follow-up and then wanted to look up the parent, too). I did
> notice the indentation but wanted to have more evidence that this has
> really been fixed.
>
> Apparently it has so I can remove the killfile entry again. Others
will
> follow, I am sure.
I noticed it too, I think at least a week back. There is still some
weird artifacts that show up if you view with google, but they are not
there with other news readers or even google's show original option.
I don't know if I really believe this whole 'killfile' thing. I think
it's a myth, like skinny people saying that they don't watch what they
eat. I think that the temptation to see what dumb newbies like me and
worse are posting is too great to filter out. How boring would it be
just to read the proper postings?
People could write a filter that runs code in usenet postings through
perltidy just so all formatting is to their liking.
This would be a great feature to be built into a Perl newsreader, a
program-as-module built on CGI::Application or something like that.
wana
------------------------------
Date: Sat, 19 Feb 2005 11:47:32 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: Google Groups and indentations
Message-Id: <slrnd1e6a4.pn.tassilo.von.parseval@localhost.localdomain>
Also sprach ioneabu@yahoo.com:
> Tassilo v. Parseval wrote:
>
>> Yesterday I saw an article posted via google rather by accident (I
>> only saw the follow-up and then wanted to look up the parent, too). I
>> did notice the indentation but wanted to have more evidence that this
>> has really been fixed.
>>
>> Apparently it has so I can remove the killfile entry again. Others
>> will follow, I am sure.
>
> I noticed it too, I think at least a week back. There is still some
> weird artifacts that show up if you view with google, but they are not
> there with other news readers or even google's show original option.
>
> I don't know if I really believe this whole 'killfile' thing. I think
> it's a myth, like skinny people saying that they don't watch what they
> eat. I think that the temptation to see what dumb newbies like me and
> worse are posting is too great to filter out. How boring would it be
> just to read the proper postings?
It was certainly not a myth in my case. Also, it's not necessarily about
clueless posters but simply about postings with scrambled code snippets
that I cannot be bothered to decipher.
> People could write a filter that runs code in usenet postings through
> perltidy just so all formatting is to their liking.
It's not that there wouldn't be enough other postings in this group.
Still plenty to read if a certain amount of them disappears.
Apart from that, a perltidy filter isn't as easy as it may appear. First
you have to identify which parts are code and which are text. They are
usually interleaved. Furthermore, you have to deal with long lines,
especially comments at the end of the line that wrap around. Perltidy
cannot handle this.
> This would be a great feature to be built into a Perl newsreader, a
> program-as-module built on CGI::Application or something like that.
Go ahead. I'll promise to use it when it's better than slrn. :-)
Tassilo
--
use bigint;
$n=71423350343770280161397026330337371139054411854220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
------------------------------
Date: Sun, 20 Feb 2005 14:02:29 +0800
From: "Francis Chee" <FrancisChee@hotm@il.com>
Subject: How should I interpret this set of laptop specifications?
Message-Id: <cv97kt$hfr$1@mawar.singnet.com.sg>
Hi, there:
This is not C++, but I think it will get some quick response for my Laptop
decision.
I expect my notebook doesn't inhibit me from editing digital pictures due to
LCD displays.
What does the "Maximum Resolution1024x768" and "Max resolution (with max
video
RAM)2048x1536" mean?
If I order this machine with RAM upgraded to 512MB, will I get a resolution
of 2048x1536
anyway?
Thanks.
-------------------------
Display/MonitorExternal display supportedYesSimultaneous external
displayYesScreen Type DescriptionTFTViewable Image Size (Diagonal)
Inches15.0Screen IlluminationBacklitGrey Shades or Colours Max Built in
Screen16777216Maximum Resolution1024x768
Graphics SubsystemDescriptionIntel Extreme Graphics 2TypeXGAVideo RAM
typeDVMTMax resolution (with max video RAM)2048x1536 16777216 coloursMaximum
Simultaneous Colours16777216Graphics bus interfaceDirect AGPVideo on
PlanarYes
-----------------------
http://www-605.ibm.com/webapp/wcs/stores/servlet/ProductDisplay?productId=33
068122&storeId=702&langId=702&categoryId=8655975&dualCurrId=97&catalogId=-70
2
begin 666 c.gif
K1TE&.#EA`0`!`(#_`,# P ```"'Y! $`````+ `````!``$```("1 $`.P``
`
end
------------------------------
Date: Sat, 19 Feb 2005 22:24:53 -0800
From: "Tim Williams" <saxifrax@pacbell*dot*net>
Subject: Re: How should I interpret this set of laptop specifications?
Message-Id: <u6MsjTxFFHA.2756@TK2MSFTNGP15.phx.gbl>
Definitely OT, but I'd assume the first spec is the number of physical
pixels availalbe in the laptop's display whereas the second is the max
resolution the laptop's video output could handle if hooked up to a
suitable external display if you have purchased the maximum possible
video RAM.
tim.
"Francis Chee" <FrancisChee@hotm@il.com> wrote in message
news:cv97kt$hfr$1@mawar.singnet.com.sg...
> Hi, there:
>
> This is not C++, but I think it will get some quick response for my
> Laptop
> decision.
>
> I expect my notebook doesn't inhibit me from editing digital
> pictures due to
> LCD displays.
> What does the "Maximum Resolution1024x768" and "Max resolution (with
> max
> video
> RAM)2048x1536" mean?
>
> If I order this machine with RAM upgraded to 512MB, will I get a
> resolution
> of 2048x1536
> anyway?
>
> Thanks.
>
>
> -------------------------
> Display/MonitorExternal display supportedYesSimultaneous external
> displayYesScreen Type DescriptionTFTViewable Image Size (Diagonal)
> Inches15.0Screen IlluminationBacklitGrey Shades or Colours Max Built
> in
> Screen16777216Maximum Resolution1024x768
>
> Graphics SubsystemDescriptionIntel Extreme Graphics 2TypeXGAVideo
> RAM
> typeDVMTMax resolution (with max video RAM)2048x1536 16777216
> coloursMaximum
> Simultaneous Colours16777216Graphics bus interfaceDirect AGPVideo on
> PlanarYes
> -----------------------
>
>
> http://www-605.ibm.com/webapp/wcs/stores/servlet/ProductDisplay?productId=33
> 068122&storeId=702&langId=702&categoryId=8655975&dualCurrId=97&catalogId=-70
> 2
>
>
>
>
------------------------------
Date: 19 Feb 2005 23:27:48 -0800
From: "HuckinFappy" <jeff@tigger.net>
Subject: Re: How should I interpret this set of laptop specifications?
Message-Id: <1108884468.484336.96150@l41g2000cwc.googlegroups.com>
Francis Chee wrote:
> This is not C++, but I think it will get some quick response for my
Laptop
> decision.
<boggle>
Just when i thought I'd seen everything.
Someone please give Francis a quick whack with a clue by four.
~Jeff
------------------------------
Date: Sat, 19 Feb 2005 20:03:39 -0500
From: "L. D. James" <ljames@apollo3.com>
Subject: Importing records with both space and quoted text qualifiers...
Message-Id: <111fofbqjcv91ab@corp.supernews.com>
Can someone advise me of how to input a file into perl that has quoted
text qualifiers? An example lines is as follows:
1) Field_1 Field_2 "This is field 3" This_is_field_4 "the 5th field" field_6
2) one two "This is 3" four "This is 5" six
Normally I would read the file into an @array variable. Then each
line, I'd use @fields = split(/ /,$eachline). From there I would use
@fields[x] for each field.
My question is, is there a easy (or standard way) to use some variation
of split() to, not just split the recorders into space files, but to grab
the contents of the text qualified fields.
Thanks in advance for anyone that has comments or suggestions. Please
advise me if my question isn't clear.
-- L.
James
--------------------------
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
------------------------------
Date: Sun, 20 Feb 2005 08:05:45 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Importing records with both space and quoted text qualifiers...
Message-Id: <cv9g2o$aji$1@sun3.bham.ac.uk>
L. D. James wrote:
> Can someone advise me of how to input a file into perl that has quoted
> text qualifiers? An example lines is as follows:
>
> 1) Field_1 Field_2 "This is field 3" This_is_field_4 "the 5th field" field_
>
> 2) one two "This is 3" four "This is 5" six
This is FAQ: "How can I split a [character] delimited string except when
inside [character]?"
> Thanks in advance for anyone that has comments or suggestions.
The whole point of the FAQ is that you should check it bafore you ask a
question so that the discussion fora are not overrun with the same
questions over and over.
------------------------------
Date: Sun, 20 Feb 2005 05:44:53 -0500
From: "L. D. James" <ljames@apollo3.com>
Subject: Re: Importing records with both space and quoted text qualifiers...
Message-Id: <111gqh5aese1j98@corp.supernews.com>
Thank you, Brian. Believe me, I had studied the docs, the faq and the
board. My problem is that I was having a little difficulty in the
description. Your input made the description very clear and easy to find
the solution.
I'm aware that a standard (of is it all) csv files are comma
delaminated (or separated). The lines/records I'm working with are space
separated, except when in the quoted text qualifiers. For your information
I'm writing a script to analyze a web access log output.
The example I found in the faq works perfect with comma separated
records. I'm spending time now trying to figure out which commas to remove
from the following to replace with what would specify the separator as a
space.
----------------
@new = ();
push(@new, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",? # groups the phrase inside the
quotes
| ([^,]+),?
| ,
}gx;
push(@new, undef) if substr($text,-1,1) eq ',';
----------------
Please excuse some of my method of definition, but if someone could
suggest how change the above code to use the space character rather than the
comma, this would go far in helping me to solve the problem.
Thanks again for any suggestions or comments.
-- L. James
---------------
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
"Brian McCauley" <nobull@mail.com> wrote in message
news:cv9g2o$aji$1@sun3.bham.ac.uk...
>
>
> L. D. James wrote:
>
>> Can someone advise me of how to input a file into perl that has
>> quoted text qualifiers? An example lines is as follows:
>>
>> 1) Field_1 Field_2 "This is field 3" This_is_field_4 "the 5th field"
>> field_
>>
>> 2) one two "This is 3" four "This is 5" six
>
> This is FAQ: "How can I split a [character] delimited string except when
> inside [character]?"
>
> > Thanks in advance for anyone that has comments or suggestions.
>
> The whole point of the FAQ is that you should check it bafore you ask a
> question so that the discussion fora are not overrun with the same
> questions over and over.
>
------------------------------
Date: Sun, 20 Feb 2005 02:27:23 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: Regex combining /(foo|bar)/ slower than using foreach (/foo/,/bar/) ???
Message-Id: <200220050227234401%comdog@panix.com>
In article <cv75e5$ljh$1@sun3.bham.ac.uk>, Brian McCauley
<nobull@mail.com> wrote:
> Darren Dunham wrote:
>
> > Brian McCauley <nobull@mail.com> wrote:
> >>jolly@tavern.de wrote:
> >
> >>>Using a /(foo|bar)/ regex on strings is slower than using a foreach
> >>>loop doing the matching one after another.
> >
> >>Yes, this is even mentioned in the FAQ, albeit in an oblique way.
I missed this discussion before, but the blead version of the FAQ
does have an alternation example, but punts to Mastering Regular
Expressions for the full details on why alternation can be really
slow. If anyone has a better answer, they can post a patch. :)
http://faq.perl.org/perlfaq6.html#How_do_I_efficiently
--
brian d foy, comdog@panix.com
Subscribe to The Perl Review: http://www.theperlreview.com
------------------------------
Date: Sun, 20 Feb 2005 01:28:17 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: sorting just the largest values
Message-Id: <cv8p3g$6n3$1@reader2.panix.com>
In article <ctb88g$ng0$1@mamenchi.zrz.TU-Berlin.DE>,
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>...
>In general, the solution to the "bottom-n" problem is a heap. In pseudo-
>code (using a mythical module Heap, but there are real ones on CPAN):
>
> use Heap;
> my $h = Heap->new();
> my $n = 50;
> for ( @data ) {
> $h->insert( $_);
> $h->extract_maximum if $h->size > $n;
> }
> my @top_n = map $h->extract_maximum, 1 .. $h->size;
>
>If the heap implementation doesn't have a ->size method, it is easy to
>use an external counter instead.
>
>If $n is larger than the data size, the algorithm does a heap sort on
>the data. If $n is smaller, it is faster than the equivalent sort.
>
>Anno
Perhaps (not sure about this) it would be faster (fewer steps?)
to use one of the *newer* (than heapsort) priority-queue methods,
eg splay trees and the like?
(Or maybe no real difference?)
David
------------------------------
Date: Sat, 19 Feb 2005 21:18:03 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: The Problem with Perl
Message-Id: <37qaaqF5choeeU1@individual.net>
William Goedicke wrote:
> My best understanding of what they think the problem is that Perl is
> "context sensitive". That is it behaves differently when data
> changes, if lists slip in where scalars were intended the results may
> be wildly different than expected. This wouldn't be true in strongly
> typed languages like C or lisp.
C is _not_ a strongly typed language. Sure, a newbie might
be surprised by @LIST being a list sometimes and the size of
the list other times. But C programmers--even experts--are
often surprised by the results of C's implicit automatic casts,
or it's ability to add two positive numbers and get a negative
without complaint.
------------------------------
Date: Sat, 19 Feb 2005 21:25:41 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: The Problem with Perl
Message-Id: <37qap2F5choeeU2@individual.net>
Rhugga wrote:
> To me this makes perl a very sloppy language and I certainly wouldnt
> use it to process any mission critical data, just leaves to much to
But for a lot of non-"mission-critical" purposes, perl is great.
Heck when it comes to mission-critical, I am highly unlikely to
consider C, either.
------------------------------
Date: Sat, 19 Feb 2005 21:34:39 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: The Problem with Perl
Message-Id: <37qb9vF5fu8k2U1@individual.net>
William Goedicke wrote:
> Do "Java, Python"... really "hold your hand" to an extent that bad
> programming is diminished. If so, that's a good thing. I would still
Sometimes--not always--people who speak of "hand-holding"
with contempt are those that most need their hands held.
(Preferably held a safe distance from the keyboard.)
One question I've heard before: "What do you want to catch
your errors--the compiler or the core dump?"
------------------------------
Date: Sat, 19 Feb 2005 21:45:52 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: The Problem with Perl
Message-Id: <37qbuvF46pru0U1@individual.net>
Eric Bohlman wrote:
> It can't. C requires that functions be called with the same number of
> parameters they're declared with, and that can't be expressed in a CFG.
However, is it still true (I haven't done C in ages)
that in C you can compile a function call without first
compiling the declaration? In which case the compiler
will assume the result is int, and stack as many parameters
as you give it. If it turns out to actually return a float,
"that's life."
If it turns out to pop from the stack more params than
it was called with, that's death. :-)
------------------------------
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 7802
***************************************