Help me ! I'm dumb!

Posts you want to find years later go here.
VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post 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)

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post 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++?

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post 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)

Jason
Veteran Doodler
Posts: 1520
Joined: Fri Jul 18, 2003 12:53 am
Location: Fairfax, VA

Post 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.

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post 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)

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post 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.

Jason
Veteran Doodler
Posts: 1520
Joined: Fri Jul 18, 2003 12:53 am
Location: Fairfax, VA

Post 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.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post 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.

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post by VLSmooth »

Heh, I agree wholeheartedly. I just prefer the term "Laziness" most of the time.

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

And "Hubris" and "Impatience" as well, no doubt.

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post by VLSmooth »

"Impatience" yes. "Hubris" no.

Too easy to get burned by different interpretations ^^;

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post 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

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post 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?

Jason
Veteran Doodler
Posts: 1520
Joined: Fri Jul 18, 2003 12:53 am
Location: Fairfax, VA

Post 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.

Dave
Tenth Dan Procrastinator
Posts: 3483
Joined: Fri Jul 18, 2003 3:40 pm

Post by Dave »

cuz i dunno anything about it! only know simple C+!
It takes 43 muscles to frown and 17 to smile, but it doesn't take any to just sit there with a dumb look on your face.

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post by VLSmooth »

Then you should learn simpler perl and make your life easier 8)

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post 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

Dave
Tenth Dan Procrastinator
Posts: 3483
Joined: Fri Jul 18, 2003 3:40 pm

Post by Dave »

sweet. I think it says Hello WOrld!
It takes 43 muscles to frown and 17 to smile, but it doesn't take any to just sit there with a dumb look on your face.

Peijen
Minion to the Exalted Pooh-Bah
Posts: 2790
Joined: Fri Jul 18, 2003 2:28 pm
Location: Irvine, CA

Post 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"

quantus
Tenth Dan Procrastinator
Posts: 4891
Joined: Fri Jul 18, 2003 3:09 am
Location: San Jose, CA

Post by quantus »

Uh, that code does reverse that string.
Have you clicked today? Check status, then: People, Jobs or Roads

Post Reply