Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lisp Questions

Name: Anonymous 2011-11-18 19:59

So I have some questions about lisp. I've been learning programming but I hear some conflicting information so I need some things cleared up.

First of all, I keep hearing that the ability to wrote code others can read is huge, but since lisp is incredibly hard to read, wouldn't that make lisp programmers inherently bad programmers?

Also, can someone post some non-trivial lisp code? Every time I see someone post lisp code it's always something very short and trivial. Is it possible to write anything real with lisp?

Name: Anonymous 2011-11-20 1:35

>>35
No, rationals are different. In CL (and in math, in general), a rational is just a pair of 2 integers which are coprime.
Floats are this weird thing which approximately store a rational (masquerading mostly as output of functions which in math would be reals, but since reals require infinite amount of information, they may or may never exist in reality, but certainly won't exist in computation) using a fixed number of bits (32 or 64). However, CL does let you have floats as long as you want, but how long depends on the implementation. CLISP, unlike most other implementations decided to use gmp to implement this type of float, and you have a special (dynamically scoped) variable which you can bind or set that will control the amount of precision (how many decimal places, and thus the size in bits) a float can have.
To put it simple: rational = pair of coprime numbers (fixnum or bignum), float = fixed in size, limited to some decimal precision, in some implementation precision can be changed by the user, but typically it's 32bits or 64bits (inexact).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List