Page 2 of 3

Posted: Fri Feb 06, 2004 10:40 pm
by VLSmooth
Btw, is there a reason you have to do this in C++? Or is the perl interpreter not installed? Or do you simply like pain? 8)

Posted: Fri Feb 06, 2004 11:38 pm
by Peijen
VLSmooth wrote:Btw, is there a reason you have to do this in C++? Or is the perl interpreter not installed? Or do you simply like pain? 8)
what's wrong with C++?

Posted: Sat Feb 07, 2004 12:20 am
by VLSmooth
C++ is great for speed and large complicated projects. However, imho, perl is faster to develop and much easier to not make mistakes in for tasks like these.

Different tasks, different tools 8)

Posted: Sat Feb 07, 2004 12:22 am
by Jason
Peijen wrote:
VLSmooth wrote:Btw, is there a reason you have to do this in C++? Or is the perl interpreter not installed? Or do you simply like pain? 8)
what's wrong with C++?
it's kind of old. it's getting a lot easier to use Java or C# instead.

Posted: Sat Feb 07, 2004 12:25 am
by VLSmooth
Also, for the record, I have to work with C, C++, Java, RPC, and CORBA here (primarily only the first 3 so far).

I just use Perl to make my life easier 8)

Posted: Sat Feb 07, 2004 12:27 am
by Jonathan
Jason wrote:it's kind of old. it's getting a lot easier to use Java or C# instead.
Ewww.

How about Python? Ruby, anyone?

Personally, I try to use the right tool for the job whenever possible.

Posted: Sat Feb 07, 2004 12:30 am
by Jason
Dwindlehop wrote:
Jason wrote:
Peijen wrote: what's wrong with C++?
it's kind of old. it's getting a lot easier to use Java or C# instead.
Ewww.

How about Python? Ruby, anyone?

Personally, I try to use the right tool for the job whenever possible.
this is dave we're talking about here. he never knows how to use the right tool.

I can't believe I just typed that.

Posted: Sat Feb 07, 2004 12:31 am
by Jonathan
Anyway, I use perl for most things at work and home. But there are always reasons to use another language beyond what you've listed here. Maintainability is a big one. Reuse of existing code and libraries is the other big one for me. It's all about the path of least resistance.

Posted: Sat Feb 07, 2004 12:32 am
by VLSmooth
Heh, I agree wholeheartedly. I just prefer the term "Laziness" most of the time.

Posted: Sat Feb 07, 2004 12:36 am
by Jonathan
And "Hubris" and "Impatience" as well, no doubt.

Posted: Sat Feb 07, 2004 12:49 am
by VLSmooth
"Impatience" yes. "Hubris" no.

Too easy to get burned by different interpretations ^^;

Posted: Sat Feb 07, 2004 12:51 am
by Jonathan
Laziness, Impatience, Hubris

"We will encourage you to develop the three great virtues of a programmer:
Laziness, Impatience, and Hubris."

LAZINESS: The quality that makes you go to great effort to reduce overall energy
expenditure. It makes you write labor-saving programs that other people will find
useful, and document what you wrote so you don't have to answer so many
questions about it. Hence, the first great virtue of a programmer.

IMPATIENCE: The anger you feel when the computer is being lazy. This makes you
write programs that don't just react to your needs, but actually anticipate them. Or
at least that pretend to. Hence, the second great virtue of a programmer.

HUBRIS: Excessive pride, the sort of thing Zeus zaps you for. Also the quality that
makes you write (and maintain) programs that other people won't want to say bad
things about. Hence, the third great virtue of a programmer.

- _Programming Perl_, p. xiv, by Randall Scwartz & Larry Wall

Posted: Sat Feb 07, 2004 4:18 am
by Peijen
Jason wrote:it's kind of old. it's getting a lot easier to use Java or C# instead.
how could you say that. vinny been a perl fanboy is understandable but thinking java or c# is better? why not use visual basics instead?

Posted: Sat Feb 07, 2004 4:26 am
by Jason
Peijen wrote:
Jason wrote:it's kind of old. it's getting a lot easier to use Java or C# instead.
how could you say that. vinny been a perl fanboy is understandable but thinking java or c# is better? why not use visual basics instead?
for some of the shit I have to code up, or at least I'm supposed to code up, C# looks like a very good alternative. especially instead of using EJBs.

Posted: Wed Feb 11, 2004 5:23 pm
by Dave
cuz i dunno anything about it! only know simple C+!

Posted: Wed Feb 11, 2004 5:34 pm
by VLSmooth
Then you should learn simpler perl and make your life easier 8)

Posted: Wed Feb 11, 2004 10:38 pm
by Jonathan
Yeah! here's a short perl program for you to learn:

Code: Select all

@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print

Posted: Wed Feb 11, 2004 10:49 pm
by Dave
sweet. I think it says Hello WOrld!

Posted: Wed Feb 11, 2004 11:16 pm
by Peijen
"\nrekcah xinU / lreP rehtona tsuJ"
weak :roll: if they are really hardcore they would have come up with code that reverse this

"n\rekcah xinU / lreP rehtona tsuJ"

Posted: Thu Feb 12, 2004 1:55 am
by quantus
Uh, that code does reverse that string.