Enjoy forums? Start your own community for free.
zIFBoards - Free Forum Hosting
Welcome to Haven Of Wiidom. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Name:   Password:


 

 Which language is better?
 
Which programming language kicks more @$$?
LISP [ 2 ]  [66.67%]
PERL [ 1 ]  [33.33%]
Total Votes: 3
Guests cannot vote 
DataSnake
Posted on Jan 15 2008, 04:31 PM


Emperor of Mankind


Group: Members
Posts: 487
Member No.: 9
Joined: 10-January 08



LISP: LISt Processor. Capable of doing anything, and doing it WELL, given a sufficiently skilled programmer. An elegant language, from a more civilized age.
PERL: Practical Extraction and Report Language. Described as a "Swiss-Army Chainsaw". Quick-and-dirty solution generates quick-and-dirty programs. Marked similarities to other programming languages.

PROGRAMS IN EACH LANGUAGE (SAME FUNCTION)
-----------------------------------------------------------

LISP

(define (count-change p)
(define (h-loop x h)
(define (q-loop x q)
(define (d-loop x d)
(if (= d 0)
(+ x (max-n p h q d) 1)
(d-loop (+ x (max-n p h q d) 1) (- d 1))))
(if (= q 0)
(d-loop x (max-d p h q))
(q-loop (d-loop x (max-d p h q)) (- q 1))))
(if (= h 0)
(q-loop x (max-q p h))
(h-loop (q-loop x (max-q p h)) (- h 1))))
(h-loop 0 (max-h p)))

PERL

#!/usr/bin/perl
sub countchange
{
my($amount)=@_;
$result=0;
for($h=maxh($amount);$h>=0;$h--)
for($q=maxq($amount,$h);$q>=0;$q--)
for($d=maxd($amount,$h,$q);$d>=0;$d--)
$result += (maxn($amount,$h,$q,$d)+1);
return $result;
}

both assume existence of functions giving the maximum number of half-dollars, quarters, dimes, and nickels available for a given amount of change.


--------------------
Points:

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
Top
DataSnake
Posted on Jan 15 2008, 04:36 PM


Emperor of Mankind


Group: Members
Posts: 487
Member No.: 9
Joined: 10-January 08



For some reason, it didn't indent the programs properly. Let me try this:
LISP
CODE

(define (count-change p)
  (define (h-loop x h)
    (define (q-loop x q)
      (define (d-loop x d)
        (if (= d 0)
            (+ x (max-n p h q d) 1)
            (d-loop (+ x (max-n p h q d) 1) (- d 1))))
      (if (= q 0)
          (d-loop x (max-d p h q))
          (q-loop (d-loop x (max-d p h q)) (- q 1))))
    (if (= h 0)
        (q-loop x (max-q p h))
        (h-loop (q-loop x (max-q p h)) (- h 1))))
  (h-loop 0 (max-h p)))


PERL
CODE

#!/usr/bin/perl
sub countchange
{
  my($amount)=@_;
  $result=0;
  for($h=maxh($amount);$h>=0;$h--)
    for($q=maxq($amount,$h);$q>=0;$q--)
      for($d=maxd($amount,$h,$q);$d>=0;$d--)
        $result += (maxn($amount,$h,$q,$d)+1);
  return $result;
}


--------------------
Points:

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
Top
Wingman
Posted on Jan 15 2008, 05:43 PM


I'm better than you. That's all I know.


Group: Admin
Posts: 2,439
Member No.: 14
Joined: 11-January 08



I know next to nothing about computer code or writing computer code. I was born in 92, so when I was old enough to use computers, you no longer had to feed lines of code to make it do something. You just used the mouse, keyboard, and went to town.


--------------------
"Never in the course of human history has so much been owed by so many to so few."- Winston Churchill, commenting on the heroic struggles of the RAF against the German Luftwaffe.

----
I don't smoke, I don't chew... and I don't date girls who do.

----

War produces classic remarks by military commanders; on February 26, 1991, the US 1st Armored Division, the famous Big Red One, encountered the allegedly elite Iraqi Republican Guard. The divisional commander, Major General Ronald Griffiths, radioed his deputy, who was riding with the armored spearhead. "I understand we are engaging the Medina Division?" he said, referring to one of the crack Iraqi Guard divisions. "Negative, sir," came the reply. "We are destroying the Medina Division."
Great proof that despite their quantity, the Soviet tanks that NATO planners feared above all else could be shredded by the M1 Abrams, Challenger 2, Leopard 2, LeClerc, Ariete, and Merkava with ease. Patton would be proud.

Top
DataSnake
Posted on Jan 15 2008, 06:55 PM


Emperor of Mankind


Group: Members
Posts: 487
Member No.: 9
Joined: 10-January 08



QUOTE (Wingman @ Jan 15 2008, 05:43 PM)
I know next to nothing about computer code or writing computer code. I was born in 92, so when I was old enough to use computers, you no longer had to feed lines of code to make it do something. You just used the mouse, keyboard, and went to town.

It is still a useful skill, and a lot of fun once you get used to it.


--------------------
Points:

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
Top
Wingman
Posted on Jan 15 2008, 06:59 PM


I'm better than you. That's all I know.


Group: Admin
Posts: 2,439
Member No.: 14
Joined: 11-January 08



QUOTE (DataSnake @ Jan 15 2008, 01:55 PM)
QUOTE (Wingman @ Jan 15 2008, 05:43 PM)
I know next to nothing about computer code or writing computer code. I was born in 92, so when I was old enough to use computers, you no longer had to feed lines of code to make it do something. You just used the mouse, keyboard, and went to town.

It is still a useful skill, and a lot of fun once you get used to it.

I could try it sometime. Hey, check out my US vs CHina fight. Hamboy and I are sure to get into a whopper of an argument there. cool.gif tongue.gif tongue.gif


--------------------
"Never in the course of human history has so much been owed by so many to so few."- Winston Churchill, commenting on the heroic struggles of the RAF against the German Luftwaffe.

----
I don't smoke, I don't chew... and I don't date girls who do.

----

War produces classic remarks by military commanders; on February 26, 1991, the US 1st Armored Division, the famous Big Red One, encountered the allegedly elite Iraqi Republican Guard. The divisional commander, Major General Ronald Griffiths, radioed his deputy, who was riding with the armored spearhead. "I understand we are engaging the Medina Division?" he said, referring to one of the crack Iraqi Guard divisions. "Negative, sir," came the reply. "We are destroying the Medina Division."
Great proof that despite their quantity, the Soviet tanks that NATO planners feared above all else could be shredded by the M1 Abrams, Challenger 2, Leopard 2, LeClerc, Ariete, and Merkava with ease. Patton would be proud.

Top
Wingman
Posted on Jan 15 2008, 09:53 PM


I'm better than you. That's all I know.


Group: Admin
Posts: 2,439
Member No.: 14
Joined: 11-January 08



If you really wanted my honest opinion...*grins an evil grin*

English is the best language.


--------------------
"Never in the course of human history has so much been owed by so many to so few."- Winston Churchill, commenting on the heroic struggles of the RAF against the German Luftwaffe.

----
I don't smoke, I don't chew... and I don't date girls who do.

----

War produces classic remarks by military commanders; on February 26, 1991, the US 1st Armored Division, the famous Big Red One, encountered the allegedly elite Iraqi Republican Guard. The divisional commander, Major General Ronald Griffiths, radioed his deputy, who was riding with the armored spearhead. "I understand we are engaging the Medina Division?" he said, referring to one of the crack Iraqi Guard divisions. "Negative, sir," came the reply. "We are destroying the Medina Division."
Great proof that despite their quantity, the Soviet tanks that NATO planners feared above all else could be shredded by the M1 Abrams, Challenger 2, Leopard 2, LeClerc, Ariete, and Merkava with ease. Patton would be proud.

Top
DataSnake
Posted on Jan 16 2008, 02:59 PM


Emperor of Mankind


Group: Members
Posts: 487
Member No.: 9
Joined: 10-January 08



QUOTE (Wingman @ Jan 15 2008, 09:53 PM)
If you really wanted my honest opinion...*grins an evil grin*

English is the best language.

Some marketroid actually made a programming language called "English" once, sp that their company's computers could be advertised as "programmable in English." The language sucked.


--------------------
Points:

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
Top
Wingman
  Posted on Jan 24 2008, 01:38 PM


I'm better than you. That's all I know.


Group: Admin
Posts: 2,439
Member No.: 14
Joined: 11-January 08



QUOTE (DataSnake @ Jan 16 2008, 09:59 AM)
QUOTE (Wingman @ Jan 15 2008, 09:53 PM)
If you really wanted my honest opinion...*grins an evil grin*

English is the best language.

Some marketroid actually made a programming language called "English" once, sp that their company's computers could be advertised as "programmable in English." The language sucked.

That sounds really dumb.


--------------------
"Never in the course of human history has so much been owed by so many to so few."- Winston Churchill, commenting on the heroic struggles of the RAF against the German Luftwaffe.

----
I don't smoke, I don't chew... and I don't date girls who do.

----

War produces classic remarks by military commanders; on February 26, 1991, the US 1st Armored Division, the famous Big Red One, encountered the allegedly elite Iraqi Republican Guard. The divisional commander, Major General Ronald Griffiths, radioed his deputy, who was riding with the armored spearhead. "I understand we are engaging the Medina Division?" he said, referring to one of the crack Iraqi Guard divisions. "Negative, sir," came the reply. "We are destroying the Medina Division."
Great proof that despite their quantity, the Soviet tanks that NATO planners feared above all else could be shredded by the M1 Abrams, Challenger 2, Leopard 2, LeClerc, Ariete, and Merkava with ease. Patton would be proud.

Top
SilverSurfer092
Posted on Jan 24 2008, 10:02 PM


Unregistered









I'm learning Java right now. My friends already know VB, but I didn't take that class. Right now, it looks as if LISP is better.
Top
hamboy
Posted on Jan 24 2008, 10:04 PM


Unregistered









*Takes on look atb the opening post*
Remind me to drop computers when I go to college. I'm not touching that with a ten foot pole.
Top
« Next Oldest | Rantings and Ravings | Next Newest »
DealsFor.me - The best sales, coupons, and discounts for you

Topic Options



Hosted for free by zIFBoards* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0357 seconds · Archive