Smalltalk, anyone?

This forum is for actual topics of discussion that do not fit the above categories.
Locked
User avatar
y2kwizard
Joined: Sun Aug 18, 2002 2:54 pm
Location: Memphis, TN
Contact:
Org Profile

Post by y2kwizard » Sun Mar 02, 2003 12:23 am

ALSO, I was wondering if anyone here has ever used Lisp. Apparently, it's a langauge that was way ahead of its time back in the '50's. Anyone know about this oen?
"When I got fat, I decided to grow a beard" -- The Great Andy
"Is it a DARTH visor?" and "It's funny cuz it's pants" -- The Master of on-the-spot Funniness
"You're too young for your age" and "I'm sorry for apologizing so much" -- The Master of on-the-spot Randomness

User avatar
fyrtenheimer
Joined: Sun May 05, 2002 11:34 am
Org Profile

Post by fyrtenheimer » Sun Mar 02, 2003 12:24 am

lmao
Image

User avatar
jonmartensen
Joined: Sat Aug 31, 2002 11:50 pm
Location: Gimmickville USA
Org Profile

Post by jonmartensen » Sun Mar 02, 2003 12:24 am

Of courspe, you thilly fellow
Image

User avatar
dokidoki
c0d3 m0nk3y
Joined: Tue Dec 19, 2000 7:42 pm
Status: BLEEP BLOOP!
Location: doki doki space
Contact:
Org Profile

Post by dokidoki » Sun Mar 02, 2003 12:36 am

I used SmallTalk in university. They used it in first year to teach OO concepts. This was before Java was invented, so that wasn't an option. I'm not sure about different implementations, but the one we used had functionality to do "canvases" and GUIs fairly easily, so it was kind of fun.

We used Scheme (similar to Lisp) in second year. That was, uh, not as fun. (but not as bad as PROLOG. holy crap) We had to work with a meta-circular interpreter. (A program, written in Scheme, that ran Scheme code)
Image Image Image
"Comedy is a dying breed." -- kisanzi // "Comedy. Serious business." -- dokidoki

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Sun Mar 02, 2003 1:54 am

y2kwizard wrote:ALSO, I was wondering if anyone here has ever used Lisp. Apparently, it's a langauge that was way ahead of its time back in the '50's. Anyone know about this oen?
Most of my experience with Lisp comes around with playing around with it in my spare time. I haven't done nearly as much, uh, "experimentation" with the language as I have with others, so I can't really give a seriously authoritative opinion on the subject, but here goes my attempt:

Lisp was designed for AI programming, and its structure shows that. Everything -- data, code, whatever -- in Lisp is a fully parenthesized list (well, a linearized binary tree, but that's something that we only have to go into if you really want to know).

John McCarthy was the inventor of Lisp; one of his projects was finding a way to store, manipulate, analyze, and synthesize data from world information. World information was stored in lists; the processor for those lists was Lisp. LISt Processor.

Examples of LISP lists:

(+ 1 2 3 4)
(hi there)

Lisp also forces a different programming style. Loops in Lisp are done pretty much exclusively by recursion and conditionals:

Code: Select all

(defun factorial (x)
 (if (= 0 x) 1
     (* x (factorial ((- x 1)))
]
The "]" basically says "close all parentheses", which I know is counter to the idea of "fully parenthesized", but it's sometimes a nice shortcut.


As opposed to, say:

Code: Select all

int factorial(int num)
{
   int accum = num;
   for(i = num; i > 0; --i)
   { 
     accum = accum * i;
   }
   return accum;
}
A lot of people aren't really comfortable with such constructs, which is why Lisp is a good way to broaden your horizons. Because of Lisp's representation, it also has natural, powerful capabilities for things which would be extremely difficult in other programming languages, such as self-modification.

Incidentally, I probably messed up both examples, but whatever. :)

dokidoki: They teach the intro CS courses in Java at my university. Also, I get to write a Scheme interpreter in Scheme next year ;)
It's really that painful, eh?

User avatar
dokidoki
c0d3 m0nk3y
Joined: Tue Dec 19, 2000 7:42 pm
Status: BLEEP BLOOP!
Location: doki doki space
Contact:
Org Profile

Post by dokidoki » Sun Mar 02, 2003 3:02 am

trythil wrote:Because of Lisp's representation, it also has natural, powerful capabilities for things which would be extremely difficult in other programming languages, such as self-modification.
One thing I remember in SmallTalk was being able to send code strings around and execute them. That was kind of neat.
dokidoki: They teach the intro CS courses in Java at my university. Also, I get to write a Scheme interpreter in Scheme next year ;)
It's really that painful, eh?
I did well in the course, but it wasn't as "fun" as SmallTalk. Now that Java's been invented and I've graduated, they use Java now. But one prof was (still is?) a SmallTalk nut. He taught a fourth-year graphics course that I took that was just garbage. The first assignment was parsing a VRML file, which was stupid. (it's a graphics course, not a parsing course!)

Furthermore, most people bombed the first assignment because they tried implementing semantic parsers when it turned out he wanted a syntactic one. I just wrote a program to generate code based on the VRML spec, so I could interpret all the nodes. (we didn't have to do anything with the data)

It was a month before we could draw a line. Lame. We were using SmallTalk with some bogus C library he wrote for speed. For the final project, I wanted to improve this library, but I could never get it to compile, and he never answered my questions about it.
Image Image Image
"Comedy is a dying breed." -- kisanzi // "Comedy. Serious business." -- dokidoki

MegaMouth
Joined: Mon Dec 02, 2002 11:06 pm
Org Profile

Post by MegaMouth » Sun Mar 02, 2003 12:28 pm

For a second I thought you were talking about Hexidecimal. Guess not.
Your breast are firm and nice, like rotten mangoes. GImme some o dat akshun.

Locked

Return to “General Off Topic”