[32613] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3887 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 25 14:09:23 2013

Date: Mon, 25 Feb 2013 11:09:08 -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, 25 Feb 2013     Volume: 11 Number: 3887

Today's topics:
        Cannot get DBD::JDBC working -- any suggestions? rob@sypron.nl
    Re: Cannot get DBD::JDBC working -- any suggestions? <jimsgibson@gmail.com>
    Re: Cannot get DBD::JDBC working -- any suggestions? rob@sypron.nl
        compiling perl 5.16.2 on cygwin on win7 fails with minp visphatesjava@gmail.com
    Re: compiling perl 5.16.2 on cygwin on win7 fails with  <visphatesjava@gmail.com>
        counting '.' in a domain name <nospam@lisse.NA>
    Re: counting '.' in a domain name <marc.girod@gmail.com>
    Re: counting '.' in a domain name <dave@invalid.invalid>
    Re: counting '.' in a domain name <bjoern@hoehrmann.de>
    Re: counting '.' in a domain name <oneingray@gmail.com>
    Re: should we Go now? <rweikusat@mssgmbh.com>
    Re: should we Go now? <bc@freeuk.com>
    Re: should we Go now? <news2009@t3x.org>
    Re: should we Go now? <oneingray@gmail.com>
    Re: should we Go now? <oneingray@gmail.com>
    Re: should we Go now? <ben@morrow.me.uk>
    Re: should we Go now? <rweikusat@mssgmbh.com>
    Re: should we Go now? <rweikusat@mssgmbh.com>
    Re: should we Go now? <visphatesjava@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 25 Feb 2013 03:28:13 -0800 (PST)
From: rob@sypron.nl
Subject: Cannot get DBD::JDBC working -- any suggestions?
Message-Id: <eea51f76-b725-4e5e-8835-031bea007b2d@googlegroups.com>

I am trying to get the DBD::JDBC package working under Cygwin on Windows. =
=20
However I am running into what seems to be a Java-related issue.

The JAR file (dbd_jdbc.jar) from CPAN (http://search.cpan.org/~vizdom/DBD-J=
DBC-0.71/JDBC.pod) is supposed to contain a class com.vizdom.dbd.jdbc.Serve=
r. Yet when I try to run that as per the instructions I get an error that t=
his class is not found (see below). It looks as if  this JAR just doesn't c=
ontain that class, which would be odd.=20

Did anyone come across this, and got it working somehow?
Any suggestions greatly appreciated!

# java -D$DRIVERS -Ddbd.port=3D9001   -classpath .:/home/dbd/dbd_jdbc.jar:/=
home/dbd/log4j-1.2.13.jar:/home/dbd/hsqldb-1.8.0.2.jar com.vizdom.dbd.jdbc.=
Server
Exception in thread "main" java.lang.NoClassDefFoundError: com/vizdom/dbd/j=
dbc/Server
Caused by: java.lang.ClassNotFoundException: com.vizdom.dbd.jdbc.Server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.vizdom.dbd.jdbc.Server.  Program will ex=
it.


Rob V.


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

Date: Mon, 25 Feb 2013 10:14:26 -0800
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Cannot get DBD::JDBC working -- any suggestions?
Message-Id: <250220131014266921%jimsgibson@gmail.com>

In article <eea51f76-b725-4e5e-8835-031bea007b2d@googlegroups.com>,
<rob@sypron.nl> wrote:

> I am trying to get the DBD::JDBC package working under Cygwin on Windows.  
> However I am running into what seems to be a Java-related issue.
> 
> The JAR file (dbd_jdbc.jar) from CPAN
> (http://search.cpan.org/~vizdom/DBD-JDBC-0.71/JDBC.pod) is supposed to
> contain a class com.vizdom.dbd.jdbc.Server. Yet when I try to run that as per
> the instructions I get an error that this class is not found (see below). It
> looks as if  this JAR just doesn't contain that class, which would be odd. 
> 
> Did anyone come across this, and got it working somehow?
> Any suggestions greatly appreciated!
> 
> # java -D$DRIVERS -Ddbd.port=9001   -classpath
> .:/home/dbd/dbd_jdbc.jar:/home/dbd/log4j-1.2.13.jar:/home/dbd/hsqldb-1.8.0.2.j
> ar com.vizdom.dbd.jdbc.Server
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/vizdom/dbd/jdbc/Server
> Caused by: java.lang.ClassNotFoundException: com.vizdom.dbd.jdbc.Server
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
> Could not find the main class: com.vizdom.dbd.jdbc.Server.  Program will exit.

What does the following produce:

jar tvf /home/dbd/dbd_jdbc.jar | grep com.vizdom.dbd.jdbc.Server.class

-- 
Jim Gibson


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

Date: Mon, 25 Feb 2013 10:51:05 -0800 (PST)
From: rob@sypron.nl
Subject: Re: Cannot get DBD::JDBC working -- any suggestions?
Message-Id: <307598c2-057e-48a8-8bd9-533f236175ad@googlegroups.com>

On Monday, February 25, 2013 7:14:26 PM UTC+1, Jim Gibson wrote:
> In article <eea51f76-b725-4e5e-8835-031bea007b2d@googlegroups.com>,
> 
> <rob@sypron.nl> wrote:
> 
> 
> 
> > I am trying to get the DBD::JDBC package working under Cygwin on Windows.  
> 
> > However I am running into what seems to be a Java-related issue.
> 
> > 
> 
> > The JAR file (dbd_jdbc.jar) from CPAN
> 
> > (http://search.cpan.org/~vizdom/DBD-JDBC-0.71/JDBC.pod) is supposed to
> 
> > contain a class com.vizdom.dbd.jdbc.Server. Yet when I try to run that as per
> 
> > the instructions I get an error that this class is not found (see below). It
> 
> > looks as if  this JAR just doesn't contain that class, which would be odd. 
> 
> > 
> 
> > Did anyone come across this, and got it working somehow?
> 
> > Any suggestions greatly appreciated!
> 
> > 
> 
> > # java -D$DRIVERS -Ddbd.port=9001   -classpath
> 
> > .:/home/dbd/dbd_jdbc.jar:/home/dbd/log4j-1.2.13.jar:/home/dbd/hsqldb-1.8.0.2.j
> 
> > ar com.vizdom.dbd.jdbc.Server
> 
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> 
> > com/vizdom/dbd/jdbc/Server
> 
> > Caused by: java.lang.ClassNotFoundException: com.vizdom.dbd.jdbc.Server
> 
> >         at java.net.URLClassLoader$1.run(Unknown Source)
> 
> >         at java.security.AccessController.doPrivileged(Native Method)
> 
> >         at java.net.URLClassLoader.findClass(Unknown Source)
> 
> >         at java.lang.ClassLoader.loadClass(Unknown Source)
> 
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> 
> >         at java.lang.ClassLoader.loadClass(Unknown Source)
> 
> > Could not find the main class: com.vizdom.dbd.jdbc.Server.  Program will exit.
> 
> 
> 
> What does the following produce:
> 
> 
> 
> jar tvf /home/dbd/dbd_jdbc.jar | grep com.vizdom.dbd.jdbc.Server.class
> 
> 
> 
> -- 
> 
> Jim Gibson


As you would expect, it show the class being there:

# jar tvf dbd_jdbc.jar  | grep com.vizdom.dbd.jdbc.Server.class
  5783 Wed Feb 04 17:01:02 CET 2009 com/vizdom/dbd/jdbc/Server.class

Yet somehow I cannot figure out how to get it running. Since Google turns up preciously little I suppose that means others got it working with ease. SO my best guess is I'm overlooking something trivial...

Thanks in advance,

Rob V.


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

Date: Mon, 25 Feb 2013 10:10:10 -0800 (PST)
From: visphatesjava@gmail.com
Subject: compiling perl 5.16.2 on cygwin on win7 fails with minperl.exe error and I don't know fix, help me obi one
Message-Id: <5f36c718-b0ba-4273-8f8c-65d40a25e3ac@googlegroups.com>

mmon\ Files/Intel/WirelessCommon:/cygdrive/c/Program\ Files\ (x86)/Lenovo/A=
ccess\ Connections:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/=
bin/x86:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x64:/bi=
n:/usr/local:/etc:/usr/lib:/lib:/usr/sbin gcc -Wl,--enable-auto-import -Wl,=
--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector -L/usr/=
local/lib -o miniperl.exe \
    perlmini.o opmini.o miniperlmain.o   gv.o toke.o perly.o pad.o regcomp.=
o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.=
o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb=
 .o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp=
_pack.o pp_sort.o cygwin.o  -ldl -lcrypt
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `PATH=3D/home/gavin.schuette/perl-5.16.2:.:/usr/local/=
bin:/usr/bin:/cygdrive/c/Program\ Files/Common\ Files/Microsoft\ Shared/Mic=
rosoft\ Online\ Services:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/Mi=
crosoft\ Shared/Microsoft\ Online\ Services:/cygdrive/c/Program\ Files/Comm=
on\ Files/Microsoft\ Shared/Windows\ Live:/cygdrive/c/Program\ Files\ (x86)=
/Common\ Files/Microsoft\ Shared/Windows\ Live:/cygdrive/c/Program\ Files\ =
(x86)/Intel/iCLS\ Client:/cygdrive/c/Program\ Files/Intel/iCLS\ Client:/cyg=
drive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/W=
bem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program=
\ Files/ThinkPad/Bluetooth\ Software:/cygdrive/c/Program\ Files/ThinkPad/Bl=
uetooth\ Software/syswow64:/cygdrive/c/Program\ Files/Intel/Intel(R)\ Manag=
ement\ Engine\ Components/DAL:/cygdrive/c/Program\ Files/Intel/Intel(R)\ Ma=
nagement\ Engine\ Components/IPT:/cygdrive/c/Program\ Files\ (x86)/Intel/In=
tel(R)\ Management\ Engine\ Components/DAL:/cygdrive/c/Program\ Files\ (x86=
)/Intel/Intel(R)\ Management\ Engine\ Components/IPT:/cygdrive/c/Program\ F=
iles\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x86:/cygdrive/c/Program\ Files\ (x86)=
/Intel/OpenCL\ SDK/2.0/bin/x64:/cygdrive/c/Program\ Files/Common\ Files/Len=
ovo:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/Ulead\ Systems/MPEG:/cy=
gdrive/c/Program\ Files\ (x86)/Windows\ Live/Shared:/cygdrive/c/SWTOOLS/Rea=
dyApps:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/Lenovo:/cygdrive/c/P=
rogram\ Files/Intel/WiFi/bin:/cygdrive/c/Program\ Files/Common\ Files/Intel=
/WirelessCommon:/cygdrive/c/Program\ Files\ (x86)/Lenovo/Access\ Connection=
s:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x86:/cygdrive=
/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x64:/bin:/usr/local:/etc=
:/usr/lib:/lib:/usr/sbin gcc -Wl,--enable-auto-import -Wl,--export-all-symb=
ols -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib -o mini=
perl.exe \'
GNUmakefile:359: recipe for target `miniperl.exe' failed
make: *** [miniperl.exe] Error 1


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

Date: Mon, 25 Feb 2013 11:00:40 -0800 (PST)
From: johannes falcone <visphatesjava@gmail.com>
Subject: Re: compiling perl 5.16.2 on cygwin on win7 fails with minperl.exe error and I don't know fix, help me obi one
Message-Id: <88339d47-99ae-4da0-ac69-c4d87664db9a@googlegroups.com>

On Monday, February 25, 2013 10:10:10 AM UTC-8, johannes falcone wrote:
> mmon\ Files/Intel/WirelessCommon:/cygdrive/c/Program\ Files\ (x86)/Lenovo=
/Access\ Connections:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.=
0/bin/x86:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x64:/=
bin:/usr/local:/etc:/usr/lib:/lib:/usr/sbin gcc -Wl,--enable-auto-import -W=
l,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector -L/us=
r/local/lib -o miniperl.exe \
>=20
>     perlmini.o opmini.o miniperlmain.o   gv.o toke.o perly.o pad.o regcom=
p.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o s=
v.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o d=
eb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o =
pp_pack.o pp_sort.o cygwin.o  -ldl -lcrypt
>=20
> /bin/sh: -c: line 0: syntax error near unexpected token `('
>=20
> /bin/sh: -c: line 0: `PATH=3D/home/gavin.schuette/perl-5.16.2:.:/usr/loca=
l/bin:/usr/bin:/cygdrive/c/Program\ Files/Common\ Files/Microsoft\ Shared/M=
icrosoft\ Online\ Services:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/=
Microsoft\ Shared/Microsoft\ Online\ Services:/cygdrive/c/Program\ Files/Co=
mmon\ Files/Microsoft\ Shared/Windows\ Live:/cygdrive/c/Program\ Files\ (x8=
6)/Common\ Files/Microsoft\ Shared/Windows\ Live:/cygdrive/c/Program\ Files=
\ (x86)/Intel/iCLS\ Client:/cygdrive/c/Program\ Files/Intel/iCLS\ Client:/c=
ygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32=
/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Progr=
am\ Files/ThinkPad/Bluetooth\ Software:/cygdrive/c/Program\ Files/ThinkPad/=
Bluetooth\ Software/syswow64:/cygdrive/c/Program\ Files/Intel/Intel(R)\ Man=
agement\ Engine\ Components/DAL:/cygdrive/c/Program\ Files/Intel/Intel(R)\ =
Management\ Engine\ Components/IPT:/cygdrive/c/Program\ Files\ (x86)/Intel/=
Intel(R)\ Management\ Engine\ Components/DAL:/cygdrive/c/Program\ Files\ (x=
86)/Intel/Intel(R)\ Management\ Engine\ Components/IPT:/cygdrive/c/Program\=
 Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x86:/cygdrive/c/Program\ Files\ (x8=
6)/Intel/OpenCL\ SDK/2.0/bin/x64:/cygdrive/c/Program\ Files/Common\ Files/L=
enovo:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/Ulead\ Systems/MPEG:/=
cygdrive/c/Program\ Files\ (x86)/Windows\ Live/Shared:/cygdrive/c/SWTOOLS/R=
eadyApps:/cygdrive/c/Program\ Files\ (x86)/Common\ Files/Lenovo:/cygdrive/c=
/Program\ Files/Intel/WiFi/bin:/cygdrive/c/Program\ Files/Common\ Files/Int=
el/WirelessCommon:/cygdrive/c/Program\ Files\ (x86)/Lenovo/Access\ Connecti=
ons:/cygdrive/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x86:/cygdri=
ve/c/Program\ Files\ (x86)/Intel/OpenCL\ SDK/2.0/bin/x64:/bin:/usr/local:/e=
tc:/usr/lib:/lib:/usr/sbin gcc -Wl,--enable-auto-import -Wl,--export-all-sy=
mbols -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib -o mi=
niperl.exe \'
>=20
> GNUmakefile:359: recipe for target `miniperl.exe' failed
>=20
> make: *** [miniperl.exe] Error 1

win7 64 bit cygwin
did ./compile and picked fast io and mostly defaults
using gcc n make on cygwin


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

Date: Mon, 25 Feb 2013 12:53:05 +0200
From: Dr Eberhard Lisse <nospam@lisse.NA>
Subject: counting '.' in a domain name
Message-Id: <ap0u4iFt81dU1@mid.individual.net>

Hi,

can someone point me to where I can read something about how I can
count the '.'s in a domain name, ie lisse.NA = 1 and www.lisse.NA =
2 and so forth, so I can weed out some subdomains from a list?

greetings, el


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

Date: Mon, 25 Feb 2013 03:26:39 -0800 (PST)
From: Marc Girod <marc.girod@gmail.com>
Subject: Re: counting '.' in a domain name
Message-Id: <9601443a-34e2-4417-8ad6-038c24613159@ia3g2000vbb.googlegroups.com>

On Feb 25, 10:53=A0am, Dr Eberhard Lisse <nos...@lisse.NA> wrote:
> can someone point me to where I can read something about how I can
> count the '.'s in a domain name, ie lisse.NA =3D 1 andwww.lisse.NA=3D
> 2 and so forth, so I can weed out some subdomains from a list?

You don't mean...

perl -le '
  print;
  @dn =3D qw(lisse.NA www.lisse.NA);
  for (@dn) {
    @f =3D /(\.)/g;
    print"$_: ", scalar @f;
  }'
> > > > > >
lisse.NA: 1
www.lisse.NA: 2

 ...do you?
Marc


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

Date: Mon, 25 Feb 2013 11:38:15 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: counting '.' in a domain name
Message-Id: <fV45K0OBJxbE-pn2-NBZPjXlUVu1o@paddington.bear.den>

On Mon, 25 Feb 2013 10:53:05 UTC, Dr Eberhard Lisse <nospam@lisse.NA> 
wrote:

> Hi,
> 
> can someone point me to where I can read something about how I can
> count the '.'s in a domain name, ie lisse.NA = 1 and www.lisse.NA =
> 2 and so forth, so I can weed out some subdomains from a list?

my $domain = 'a.b.com';
my $dots = () = $domain =~ m{\.}g;
print $dots;

-- 
Regards
Dave Saville


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

Date: Mon, 25 Feb 2013 12:48:12 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: counting '.' in a domain name
Message-Id: <ifjmi899istr1ickt2qladubf6qp8d0upb@hive.bjoern.hoehrmann.de>

* Dr Eberhard Lisse wrote in comp.lang.perl.misc:
>can someone point me to where I can read something about how I can
>count the '.'s in a domain name, ie lisse.NA = 1 and www.lisse.NA =
>2 and so forth, so I can weed out some subdomains from a list?

For this kind of question you can use the `perldoc` utility that ships
with your Perl distribution like so:

  % perldoc -q count
  Found in perlfaq4.pod
    How can I count the number of occurrences of a substring within a 
    string?
      There are a number of ways, with varying efficiency. If you want a
count of a certain single character (X) within a string, you can
      use the "tr///" function like so:
  
          my $string = "ThisXlineXhasXsomeXx'sXinXit";
          my $count = ($string =~ tr/X//);
          print "There are $count X characters in the string";
  
      This is fine if you are just looking for a single character.
      However, if you are trying to count multiple character substrings 
      within a larger ...
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


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

Date: Mon, 25 Feb 2013 11:54:01 +0000
From: Ivan Shmakov <oneingray@gmail.com>
Subject: Re: counting '.' in a domain name
Message-Id: <87hal08v8m.fsf@violet.siamics.net>

>>>>> Dave Saville <dave@invalid.invalid> writes:
>>>>> On Mon, 25 Feb 2013 10:53:05 UTC, Dr Eberhard Lisse wrote:

	[Cross-posting to news:free.comp.dns.]

 >> can someone point me to where I can read something about how I can
 >> count the '.'s in a domain name, ie lisse.NA = 1 and www.lisse.NA =
 >> 2 and so forth, so I can weed out some subdomains from a list?

 > my $domain = 'a.b.com';
 > my $dots = () = $domain =~ m{\.}g;
 > print $dots;

	Nice, thanks!

	Please note, however, that in the most cases, the domain name
	may also include an insignificant [*] trailing dot.  Thus, it's
	advisable to $domain =~ s/\.$// first.

    [*] In fact, such a trailing dot denotes the "root" of the DNS tree,
	thus distinguishing between relative (host.name) and absolute,
	or fully-qualified, (host.name.example.org.) domain names.  My
	opinion is, however, that relative DNS names are better never to
	be used, and what appears to be one is better to be treated as
	if it's an absolute one.

-- 
FSF associate member #7257


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

Date: Mon, 25 Feb 2013 01:04:28 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: should we Go now?
Message-Id: <87liad431f.fsf@sapphire.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:
> Quoth Ivan Shmakov <oneingray@gmail.com>:
>> 
>> 	Doesn't seem to be all that applicable to Go.  Consider that:
>> 
>> 	* Perl uses GC;
>
> Perl uses refcounting. One of Perl's flaws is that it doesn't use proper
> GC.

After consuming three beer, I feel like writing something positive:
Depending on what angle you come from, perl 5, despite all his warts,
is either 'C++ done right' or 'Lisp done right' and even after two
decades of 'high-end engineering' of the technical excellence company
which went broke while trying to force this camel through the eye of
needle, it is easily two order of magnitude faster for real problems
than Java.

Do you actually understand what you're trying to kill because it
shouldn't exist in the proper universe of whishful thinking? Or are
you just a hardcore terrorist who enjoys blowing up bridges because
they're useful?

I disclaim any responsibility for this because I'm drugged and didn't
start the character assassination :-).



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

Date: Mon, 25 Feb 2013 01:29:23 -0000
From: "BartC" <bc@freeuk.com>
Subject: Re: should we Go now?
Message-Id: <a8zWs.286345$zu7.131490@fx01.fr7>

"Ivan Shmakov" <oneingray@gmail.com> wrote in message
news:874nh1abn5.fsf@violet.siamics.net...


> Other than that, my most major objection to Go's design
> currently is its syntax.

I'm not a fan of C-style syntax. But I think Go has done a good job of
tidying it up, and hasn't been afraid of some radical departures (for
example, getting rid of that mandatory 'break' in switch statements).

> > the lexer always inserts a semicolon after the token.  This could be
> > summarized as, "if the newline comes after a token that could end a
> > statement, insert a semicolon".

I use a similar rule, and at one time it was very simple: semicolons are
inserted unless the last token is a comma, or line-continuation is used.
(Some tolerance of superfluous semicolons is also needed.) It works well
enough that you can look at a thousand lines of my code and not see a single
semicolon.

That's as it should be; it's just something you never need to worry about
again (well, until you post some code and line-breaks get added in the wrong
places...)

> Thus, my earlier "? :" example as it is is impossible here, and
> so is my preferred style of lining the operators up like:
>
>   a = (b
>        + c
> + d * e);

Does Go have line-continuation? It's not pretty, but will allow your style
of coding.

-- 
Bartc 



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

Date: 25 Feb 2013 07:23:28 GMT
From: Nils M Holm <news2009@t3x.org>
Subject: Re: should we Go now?
Message-Id: <ap0hrgFqjdgU1@mid.individual.net>

In comp.lang.misc Rainer Weikusat <rweikusat@mssgmbh.com> wrote:
> [...] not based on the inherently wrong assumption
> that future use of an object will be impossible if no pointer to it
> can be found within the address space of a single process at an
> essentially arbitrary time. [...]

Can you elaborate on this?

F'up-To limited to c.l.m.

-- 
Nils M Holm  < n m h @ t 3 x . o r g >  www.t3x.org


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

Date: Mon, 25 Feb 2013 13:12:57 +0000
From: Ivan Shmakov <oneingray@gmail.com>
Subject: Re: should we Go now?
Message-Id: <878v6c8rl2.fsf@violet.siamics.net>

>>>>> BartC  <bc@freeuk.com> writes:
>>>>> "Ivan Shmakov" <oneingray@gmail.com> wrote in...

	[Dropping news:comp.lang.perl.misc from Followup-To:.]

[...]

 >>> the lexer always inserts a semicolon after the token.  This could
 >>> be summarized as, "if the newline comes after a token that could
 >>> end a statement, insert a semicolon".

 > I use a similar rule, and at one time it was very simple: semicolons
 > are inserted unless the last token is a comma, or line-continuation
 > is used.  (Some tolerance of superfluous semicolons is also needed.)

	The idea isn't new.  Consider, e. g.:

--cut: http://www.gnu.org/software/gawk/manual/html_node/Statements_002fLines.html --
    However, gawk ignores newlines after any of the following symbols
    and keywords:

      ,    {    ?    :    ||    &&    do    else

    A newline at any other point is considered the end of the
    statement.^1
--cut: http://www.gnu.org/software/gawk/manual/html_node/Statements_002fLines.html --

[...]

 >> Thus, my earlier "? :" example as it is is impossible here, and so
 >> is my preferred style of lining the operators up like:

 >> a = (b
 >>      + c
 >>      + d * e);

 > Does Go have line-continuation?

	I believe it doesn't.

	Patching the lexer to count parenthesis and brackets doesn't
	seem like a particularly bright idea, but it might worth trying
	doing it that way.

	Alternatively, I may try to teach the all-mighty Emacs to show
	the code formatted in my style, while it would be stored in the
	one chosen by the Go designers.  (I need a similar trick for
	XML, anyway, as otherwise indentation level changes tend to
	waste a plenty of diff-space.)

 > It's not pretty, but will allow your style of coding.

	Thus, my Go programs are likely to end up having more
	line-continuations than my similar C (or Perl, for that matter)
	ones would have semicolons...

-- 
FSF associate member #7257


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

Date: Mon, 25 Feb 2013 13:32:00 +0000
From: Ivan Shmakov <oneingray@gmail.com>
Subject: Re: should we Go now?
Message-Id: <874nh08qpb.fsf@violet.siamics.net>

>>>>> Ben Morrow <ben@morrow.me.uk> writes:
>>>>> Quoth Ivan Shmakov <oneingray@gmail.com>:

 >> Doesn't seem to be all that applicable to Go.  Consider that:

 >> * Perl uses GC;

 > Perl uses refcounting.  One of Perl's flaws is that it doesn't use
 > proper GC.

	I know about the deficiencies of refcounting.  However, it was
	my understanding that it works quite well for Perl in practice.

[...]

 >> * Go has pointers.

 > Real pointers, or Perl-style safe references?  Real pointers are a
 > major disadvantage, in my book, for any language which isn't C.

	Given that Go has no pointer arithmetic, I'd say that these are
	"safe references."

 >> Somehow, Go seem to lack destructors, although I don't quite
 >> understand how this goes well along with having a GC.  But perhaps
 >> it doesn't.

 > True GC and destructors don't play very well together, because
 > objects get destroyed at arbitrary times.  Mechanisms like the
 > 'defer' you mentioned originally are more appropriate for cleaning up
 > non-memory resources.

	I may be using a wrong term, but the GC's I've worked with
	typically allowed for a procedure to be run when an object
	is about to be removed.

	How would, say, Perl's IO handles be possible without the
	availability of a mechanism to properly give the resources back
	to the underlying system when such a handle is to be removed?

-- 
FSF associate member #7257


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

Date: Mon, 25 Feb 2013 15:28:49 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: should we Go now?
Message-Id: <hicsv9-8lm1.ln1@anubis.morrow.me.uk>


Quoth Ivan Shmakov <oneingray@gmail.com>:
> >>>>> Ben Morrow <ben@morrow.me.uk> writes:
> >>>>> Quoth Ivan Shmakov <oneingray@gmail.com>:
> 
>  >> Doesn't seem to be all that applicable to Go.  Consider that:
> 
>  >> * Perl uses GC;
> 
>  > Perl uses refcounting.  One of Perl's flaws is that it doesn't use
>  > proper GC.
> 
> 	I know about the deficiencies of refcounting.  However, it was
> 	my understanding that it works quite well for Perl in practice.

Yes and no. It works well in simple situations, and has the advantage of
providing prompt destruction (see below), but as soon as a cyclic data
structure is created the programmer has to be very careful to use
weakrefs in all the right places, or the structure will never be
collected. These cycles are not always very obvious; for instance,

    my $parent = Parent->new;
    my $child = Child->new;

    $parent->add_child($child);
    $child->set_callback(sub {
        $parent->do_something;
    });

This now has a circular ref $parent -> $child -> callback -> $parent,
and it isn't easy to see how to break it by weakening one of the refs.

The refcounting also causes major problems internally. There were until
fairly recently a lot of bugs in the symbol table handling, caused by
internal circular references which didn't get appropriately weakened.
(These bugs only showed up when manipulating the symbol table hashes
like %main:: directly, which is why they weren't fixed sooner.) There
are also a whole class of bugs which fall under 'the Perl stack isn't
refcounted', which can probably never be fixed.

[...]
>  >> Somehow, Go seem to lack destructors, although I don't quite
>  >> understand how this goes well along with having a GC.  But perhaps
>  >> it doesn't.
> 
>  > True GC and destructors don't play very well together, because
>  > objects get destroyed at arbitrary times.  Mechanisms like the
>  > 'defer' you mentioned originally are more appropriate for cleaning up
>  > non-memory resources.
> 
> 	I may be using a wrong term, but the GC's I've worked with
> 	typically allowed for a procedure to be run when an object
> 	is about to be removed.

That's true, but this destruction will in general not happen promptly
when the last reference to an object disappears, but will be delayed
until the next GC run. Since GC runs happen in response to memory
pressure, using destructors to clean up arbitrary external resources may
leave those resources allocated for much longer than they needed to be.

> 	How would, say, Perl's IO handles be possible without the
> 	availability of a mechanism to properly give the resources back
> 	to the underlying system when such a handle is to be removed?

I don't know :). I believe Perl 6 will close filehandles when they are
GCed, but relying on this is considered bad form because that
destruction may happen late.

I understand that there are ways of combining GC with timely destruction
of some objects; I don't know much about it, though.

Ben



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

Date: Mon, 25 Feb 2013 17:30:50 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: should we Go now?
Message-Id: <87wqtwmhbp.fsf@sapphire.mobileactivedefense.com>

Nils M Holm <news2009@t3x.org> writes:
> In comp.lang.misc Rainer Weikusat <rweikusat@mssgmbh.com> wrote:
>> [...] not based on the inherently wrong assumption
>> that future use of an object will be impossible if no pointer to it
>> can be found within the address space of a single process at an
>> essentially arbitrary time. [...]
>
> Can you elaborate on this?
>
> F'up-To limited to c.l.m.

Don't try to play this kind of tricks on me. I have no interest in
this discussion beyond that it involved features perl 5 has and Go
hasn't which happen to be among the more prominent reasons why I'm
using perl 5 for certain tasks and won't be using Go. The answer to
your 'mock question' you've attached to the the random fabrication
you've created by picking a coupld of half sentences out of a text I
wrote was contained in the parts of the text you've chosen to delete
and in some other postings as well. Go read them if you're curious.




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

Date: Mon, 25 Feb 2013 17:54:15 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: should we Go now?
Message-Id: <87r4k4mg8o.fsf@sapphire.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:
> Quoth Ivan Shmakov <oneingray@gmail.com>:
>> >>>>> Ben Morrow <ben@morrow.me.uk> writes:
>> >>>>> Quoth Ivan Shmakov <oneingray@gmail.com>:
>> 
>>  >> Doesn't seem to be all that applicable to Go.  Consider that:
>> 
>>  >> * Perl uses GC;
>> 
>>  > Perl uses refcounting.  One of Perl's flaws is that it doesn't use
>>  > proper GC.
>> 
>> 	I know about the deficiencies of refcounting.  However, it was
>> 	my understanding that it works quite well for Perl in practice.
>
> Yes and no. It works well in simple situations, and has the advantage of
> providing prompt destruction (see below), but as soon as a cyclic data
> structure is created the programmer has to be very careful to use
> weakrefs in all the right places, or the structure will never be
> collected.

'Cyclic data structures' are a relative fringe case and the advantage
that code like this doesn't have to be written in Perl:

public ImportInformationDTO importUsers(long domainId)
throws LoginException, NamingException, IOException {
        ImportInformationDTO dto;
        
        if (!trylockADImport(domainId)) {
            log.warn("AD import for #0 already running", domainId);
            return null;
        }

        try {
            dto = doImportUsers(domainId);
        } finally {
            unlockADImport(domainId);
        }

        return dto;
}

by far outweighs the 'inconvenience' of having to use weak
references: This whole method has no other purpose than work around
the deficiencies of the Java garbage collector and if something like
this isn't meticolously distributed throughout a possibly 'large' body
of Java code (48,585 LOC in this case), resource leaks or resource
'hogging' will occur and this has caused numerous user-visible
problems for the people using this code (most often because the JVM
process ran out of file descriptors but it also ran out of memory(!),
out of database sessions and generally 'out of' whatever the tracing
collector cannot manage at all or cannot manage well enough to work
reliably in practice).


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

Date: Mon, 25 Feb 2013 10:35:58 -0800 (PST)
From: johannes falcone <visphatesjava@gmail.com>
Subject: Re: should we Go now?
Message-Id: <dd11f2fe-b7e3-4182-b3d0-ce83bccdd74d@googlegroups.com>

On Sunday, February 24, 2013 5:04:28 PM UTC-8, Rainer Weikusat wrote:
> Ben Morrow <ben@morrow.me.uk> writes:
>=20
> > Quoth Ivan Shmakov <oneingray@gmail.com>:
>=20
> >>=20
>=20
> >> 	Doesn't seem to be all that applicable to Go.  Consider that:
>=20
> >>=20
>=20
> >> 	* Perl uses GC;
>=20
> >
>=20
> > Perl uses refcounting. One of Perl's flaws is that it doesn't use prope=
r
>=20
> > GC.
>=20
>=20
>=20
> After consuming three beer, I feel like writing something positive:
>=20
> Depending on what angle you come from, perl 5, despite all his warts,
>=20
> is either 'C++ done right' or 'Lisp done right' and even after two
>=20
> decades of 'high-end engineering' of the technical excellence company
>=20
> which went broke while trying to force this camel through the eye of
>=20
> needle, it is easily two order of magnitude faster for real problems
>=20
> than Java.
>=20
>=20
>=20
> Do you actually understand what you're trying to kill because it
>=20
> shouldn't exist in the proper universe of whishful thinking? Or are
>=20
> you just a hardcore terrorist who enjoys blowing up bridges because
>=20
> they're useful?
>=20
> =0C
>=20
> I disclaim any responsibility for this because I'm drugged and didn't
>=20
> start the character assassination :-).

I love this guy!  www.cat-v.org approved post!


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

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


Administrivia:

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

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

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


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


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