Reply

Join Date: Mar 2006
Posts: 12
Reputation: coolman2006 is an unknown quantity at this point 
Solved Threads: 0
coolman2006 coolman2006 is offline Offline
Newbie Poster

Lisp

 
0
  #1
Mar 17th, 2006
Does anyone know about LISP Programming

I am trying to make this program where I have 3 types of cars, which are ford bmw merc

ford has focus and fiesta BMW has 1series and 2series and the merc has SK100 and SK200

well basically i am trying to put them in the correct list for example focus will go into ford list and SK100 will go to the merc list.

the keyword here is sorted, so the cars r sorted to the correct list.

at the moment to store the data i will use defparameter

example

(defparameter *cars* ' ( focus fiesta 1series 2series SK100 SK200))

so now i want to create a funtion where the cars will go into the correct list. so fiesta will go and focus will go to the ford list.

so bascially I need to sort these cars out so they will be sorted to the correct list and to run it i will want to use defun

(test-a-car 2) the 2 means 2 cars a list so then it will display the cars in the correct list.

if u have any idea please help, cos i have no idea, so i would be so grateful if anyone could help
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 12
Reputation: coolman2006 is an unknown quantity at this point 
Solved Threads: 0
coolman2006 coolman2006 is offline Offline
Newbie Poster

Re: Lisp

 
0
  #2
Mar 18th, 2006
some one please say something i am desprate to learn Lisp I am stuck big i knwo there some one out there to help

HELP ME!!!

please
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 71
Reputation: indienick is an unknown quantity at this point 
Solved Threads: 2
indienick's Avatar
indienick indienick is offline Offline
Junior Poster in Training

Re: Lisp

 
0
  #3
Jan 22nd, 2007
Even though this thread is approximately 10 months old, I'm going to resurrect it anyways.

What is the purpose of this? Normally I wouldn't ask, but what you're asking for here is for a list of cars to be provided, and reference it against an already existing library of cars - somewhat redundant, no?

(defparameter focus (cons "focus" "ford"))
(defparameter fiesta (cons "focus" "ford"))
(defparameter 1series (cons "1series" "BMW"))
(defparameter 2series (cons "2series" "BMW"))
(defparameter sk100 (cons "SK100" "Mercedes"))
(defparameter sk200 (cons "SK200" "Mercedes"))
(defparameter *cars* (list 'focus 'fiesta '1series '2series 'sk100 'sk200))
(defparameter *ford-cars* '())
(defparameter *merc-cars* '())
(defparameter *bmw-cars* '())

(defun test-a-car (car-to-test &optional cars-per-list)
  ;; NOTE: I've made the arguemtn to TEST-A-CAR optional, because it's useless
  ;; since the only way to do this is to reference the car in question to a pre-made
  ;; library, as I'm going to do, here.
  (cond ((equalp (cdr car-to-test) "ford") (push car-to-test *ford*))
            ((equalp (cdr car-to-test) "BMW") (push car-to-test *bmw*))
            ((equalp (cdr car-to-test) "Mercedes") (push car-to-test *merc*))))

(dolist (i *cars*)
  (test-a-car i))
Angel-headed hipsters burning for the ancient heavenly connection, to the starry dynamo in the machinery of the night.
-Ginsburg

Don't tell me to "google it" - I already have.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Lisp

 
0
  #4
Jan 24th, 2007
Hi nick, good to see your enthusiasm. But please refrain from responding to threads that are clearly dead.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Lisp

 
0
  #5
Jan 27th, 2007
Originally Posted by iamthwee View Post
Hi nick, good to see your enthusiasm. But please refrain from responding to threads that are clearly dead.
Why? It seems like a perfectly good question that someone who knows LISP can answer. It the resurrections that have no questions that are useless bumps.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Lisp

 
0
  #6
Jan 27th, 2007
Originally Posted by WaltP View Post
Why? It seems like a perfectly good question that someone who knows LISP can answer. It the resurrections that have no questions that are useless bumps.
No offense Mr Disney, but if you allow such a precedent to be set I could drag up all other posts that haven't been answered and answer them.

On the basis that it was aperfectly good question and I know the answer.

If nick wants to help with anyone learning lisp he can. There's a code snippet section, which looks empty , and also a tutorial section.
Last edited by iamthwee; Jan 27th, 2007 at 7:10 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Lisp

 
0
  #7
Jan 28th, 2007
Originally Posted by iamthwee View Post
No offense Mr Disney, but if you allow such a precedent to be set I could drag up all other posts that haven't been answered and answer them.
Mr. Thwee, the mods and Dani have had this discussion. It is OK to resurrect a thread with relevant information or question. Not being a mod, you would not have been privy to this information.

The official word:
Originally Posted by cscgal View Post
Keep in mind that the majority of people find DaniWeb through the search engines and land on specific threads. Therefore, while a thread might be a year old, thousands upon thousands of people might still be ending up at that thread daily via a google search, and it might still be helping all of them.

For this reason, I have no problem with members resurrecting dead threads so long as the reply is on topic and relevant. Remember, the thread helps a lot more people than just the thread starter.

If someone provides an alternative solution a year after the original thread starter's question has been solved, then great. That solution might help thousands of other people who ended up at the thread because they have the same problem as the thread starter.

Also keep this in mind - what is the difference between forums and live chat? In live chat, if someone posts a question, and someone else answers it, only that person got helped. The advantage to forums is that questions and answers live on to help others, and conversations can live on infinitely, with lots of people contributing to them over time. A thread is never really "dead" then if someone feels that they can contribute something additional to it. Posting time is irrelevant when everyone's posts live on forever here.
OK?
Last edited by WaltP; Jan 28th, 2007 at 5:20 am.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Lisp

 
0
  #8
Jan 28th, 2007
Originally Posted by WaltP View Post
Mr. Thwee, the mods and Dani have had this discussion. It is OK to resurrect a thread with relevant information or question. Not being a mod, you would not have been privy to this information.

The official word:
You do realize that precedent could be open to abuse. I could in theory begin to answer say ten dead threads per day in all the forums I am active in for the next month. That's about 50 resurrected threads per day.

I bet you that will peeve off a lot of regular members. I'm not gonna do that of course. And I doubt anyone will.

Thanx for the secret info Mr Disney. :lol:
Last edited by iamthwee; Jan 28th, 2007 at 7:26 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,617
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 466
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Lisp

 
0
  #9
Jan 29th, 2007
Originally Posted by iamthwee View Post
I bet you that will peeve off a lot of regular members.
No, it won't, as long as you have something useful to contribute.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC