Search found 59 matches

by I X Code X 1
Sun Jul 17, 2011 9:40 pm
Forum: Common Lisp
Topic: Read only a single element
Replies: 2
Views: 3806

Read only a single element

Hello, I'm writing a function and I am allowing the user to input a number/character (anything on the keyboard really). However, I only want them to be able to enter a single element. For example, if the user enters the letter m or the letter 5 it's fine, but I don't want the user to be able to ente...
by I X Code X 1
Wed Jul 13, 2011 10:55 am
Forum: Common Lisp
Topic: is there a way to replace the elements in a list?
Replies: 7
Views: 11454

Re: is there a way to replace the elements in a list?

gugamilare wrote:@marcoxa and Duke: I think you guys misunderstood him, he wants to destructively replace the elements.
yesimthetaxman wrote:I don't actually mean destructively replace.

I don't think he wants it to be destructively replaced.
by I X Code X 1
Fri Jul 08, 2011 10:09 pm
Forum: Common Lisp
Topic: Telling the time
Replies: 6
Views: 5864

Re: Telling the time

Thanks for the Suggestion, Paul! I ended up just using the beep. Not a very effective alarm clock, but I just wanted to see if I could make one that actually does function. Mission accomplished! :D
by I X Code X 1
Fri Jul 08, 2011 8:13 pm
Forum: Common Lisp
Topic: Ide help for the confused
Replies: 16
Views: 28957

Re: Ide help for the confused

Well you could always write them to files. But even easier with LisdIDE you can try functions out at the REPL and when you think you've got it working the way you want it, write it into the top part. You can then save the top part the same way you'd save any file in any program and can open it the n...
by I X Code X 1
Fri Jul 08, 2011 7:54 pm
Forum: Common Lisp
Topic: Ide help for the confused
Replies: 16
Views: 28957

Re: Ide help for the confused

I've used it. Doesn't do anything special but it is a IDE so you don't have to use the REPL at all times (though you should learn to use the REPL), and it does match parens. Should be a good starting IDE.
by I X Code X 1
Fri Jul 08, 2011 10:49 am
Forum: Common Lisp
Topic: Telling the time
Replies: 6
Views: 5864

Re: Telling the time

There is a library called chronicity (available through quicklisp) which allows parsing descriptive time strings. It uses local-time library for time management, which I believe is the usual for more complex time manipulation. I have never written code which significantly involved time, so I don't ...
by I X Code X 1
Fri Jul 08, 2011 10:38 am
Forum: Common Lisp
Topic: Telling the time
Replies: 6
Views: 5864

Re: Telling the time

I've written this: (defun set-alarm (m h d mo y) (loop if (equal (encode-universal-time 0 m h d mo y) (get-universal-time)) return "wake up!")) However, I would like to just have the user input minute and hour. Is there any functions like this: get-current-day, get-current-month, get-curre...
by I X Code X 1
Fri Jul 08, 2011 10:14 am
Forum: Common Lisp
Topic: Telling the time
Replies: 6
Views: 5864

Telling the time

Okay, I am playing around with getting the time in Common Lisp. (encode-universal-time 6 22 19 25 1 2002) This encodes a calendar time into universal time. It's somewhat readable, but was wondering if there is anyway to just enter an hour? I am trying to make a very simplistic representation of an a...
by I X Code X 1
Fri Jul 08, 2011 6:24 am
Forum: Common Lisp
Topic: Ide help for the confused
Replies: 16
Views: 28957

Re: Ide help for the confused

I've just started using Common Lisp a few months ago and have experimented with many different implementations. I've used Clisp, ACL, CUSP (which is built on SBCL) and probably some more that I can't think of right now. I do like CUSP (because I've spent so much time with Eclipse from Java), but for...
by I X Code X 1
Thu Jul 07, 2011 6:12 am
Forum: Common Lisp
Topic: counting if equal
Replies: 9
Views: 7741

Re: counting if equal

Ohh yeah, that's true. Counting would definitely work in this instance. :lol:

I noticed he was supposed to use 'do' right after I posted, decided to keep it up anyway.