Search found 46 matches
- Tue Jun 29, 2010 8:19 pm
- Forum: Common Lisp
- Topic: Continuations in lisp
- Replies: 5
- Views: 5418
Re: Continuations in lisp
true, though maybe placing the unwind protect code in a function which can be passed to the continuation will create a closure and you can use that function? no matter, i was just curious dont really need them.
- Tue Jun 29, 2010 6:27 am
- Forum: Common Lisp
- Topic: Continuations in lisp
- Replies: 5
- Views: 5418
Re: Continuations in lisp
not exactly sure why that is true. with a code walker, code which creates a continuation could be informed of the surround protect form and add it to its continuation. Similar for dynamic variables, im pretty sure the lisp compiler knows which variables are special and which are not, the continuatio...
- Mon Jun 28, 2010 9:32 pm
- Forum: Common Lisp
- Topic: Continuations in lisp
- Replies: 5
- Views: 5418
Continuations in lisp
I was looking at cl-cont and the statement: "call/cc cannot appear within the body of catch, throw, progv, or unwind-protect." I was wondering why this was and could there be a way around it? After all, at the very least unwind-protect is used at least somewhat frequently and so is error h...
- Mon Jun 28, 2010 9:29 pm
- Forum: Common Lisp
- Topic: scientific numbers to string without scientific notation
- Replies: 5
- Views: 5836
Re: scientific numbers to string without scientific notation
Thanks! Fortunately i didn't really need to parse a number from a string as non-scientific just the opposite, and coercing it to double-float and using ~f did the trick, at least for the size of numbers i was dealing with. yay!
- Mon Jun 28, 2010 6:10 am
- Forum: Common Lisp
- Topic: scientific numbers to string without scientific notation
- Replies: 5
- Views: 5836
Re: scientific numbers to string without scientific notation
The joys of unaccurate results - ok, so figured it out, it appears common lisp remains the true identity of the number internally somehow, but i need to coerce it into a double float or (setq *READ-DEFAULT-FLOAT-FORMAT* 'double-float) to get it automatically. then the ~f option works just fine and t...
- Mon Jun 28, 2010 5:55 am
- Forum: Common Lisp
- Topic: scientific numbers to string without scientific notation
- Replies: 5
- Views: 5836
Re: scientific numbers to string without scientific notation
~D still keeps scientific notation and while round gets rid of scientific notation it gives an incorrect result. This really puzzles me, i thought lisp had bignum math, what is up with this. (round 2.5e10) =
24999999488
0.0
I tried with ecl and sbcl and they both give the same answer! huh?
24999999488
0.0
I tried with ecl and sbcl and they both give the same answer! huh?
- Sun Jun 27, 2010 9:13 pm
- Forum: Common Lisp
- Topic: scientific numbers to string without scientific notation
- Replies: 5
- Views: 5836
scientific numbers to string without scientific notation
im trying to convert a scientific number, say 4.3e7, to the string "43000000" using (format nil "~A" 4.3e7). Is there any way to prevent format from using scientific notation in its string conversion? Similarly ive tried something like (format nil "~f" 29029987) but i g...
- Mon Jun 14, 2010 4:14 pm
- Forum: Common Lisp
- Topic: Is this legal Lisp?
- Replies: 8
- Views: 8323
Re: Is this legal Lisp?
I couldnt resist :twisted: My totally unhelpful code for this (it uses other libraries, but i just wanted to show that you dont have to stick with vanilla lisp, make your own 'cl' library named something else which contains extremely convenient functions for everything. For this, i like to use the c...
- Sat Jun 12, 2010 7:14 am
- Forum: Common Lisp
- Topic: How to mask password when login?
- Replies: 4
- Views: 5327
Re: How to mask password when login?
read-passwd is for elisp, which is used in GNU emacs and is not common lisp (which i assume you want). if youre talking about masking a password when typing it in on a regular terminal, i dont know, in linux when you type in a password on the terminal nothing is shown, i do not know if it is possibl...
- Fri Jun 11, 2010 6:13 pm
- Forum: Common Lisp
- Topic: How to mask password when login?
- Replies: 4
- Views: 5327
Re: How to mask password when login?
you need to provide more details on what are u doing, what library are u using.