freenode/#lisp - IRC Chatlog
Search
15:23:03
ted_wroclaw
Me neither. I usually just hack around until I get whatever I'm working on to look nice and leave it at that. Then I forget how I did it. My template document header is an enormous collection of commented out packages. Shameful, really.
18:11:41
skidd0
one of these flags allows the creation of an object by prompting for a name and other info
18:13:08
jackdaniel
normally in the terminal lines are buffered, so you need to end your prompt with a new line (this may be changed, but I don't remember the specifities - it is a terminal emulator setting)
18:17:31
skidd0
has anyone done any work with object persistence? like cl-prevalance, where the objects are serialized and use transactions for updates. Or, another question, what's a common method for saving objects to disk?
18:18:40
skidd0
see, i feel like taking my objects and converting them to sql models is unneccessary
18:21:06
phoe
You should be able to use some kind of simple object store. BKNR.DATASTORE should be a good tool for the job.
19:25:17
flip214
is there some special like *print-base* that says how many digits a float number should be printed with?
19:41:53
flip214
pjb: no, in this case I only care about the first two digits (and the exponent, if not 0)
19:58:41
flip214
pjb: sorry, I'm doing electronic engineering right now... you know, using +-20% capacitors and so on....
20:11:02
pjb
flip214: perhaps it's possible to do something with the pretty printer. Otherwise, wrap your floats in a clos object, and define a print-object method for them.
20:11:36
Bike
right want to do that anyway, so you can have components with the same nominal value but different tolerqances
20:21:50
pjb
flip214: (set-pprint-dispatch (quote float) (lambda (stream value) (format stream "~,2F" value))); seems to work, for: (let ((*print-pretty* t)) (print (list pi 0.12000001d0 0.12999999d0)))
20:28:33
didi
We should decide if we want to deprecate structs or not. /me votes for no, but he is not very bright
20:34:19
buffergn0me
Structs are really useful apart from generic functions and objects. For example with the :type options to generate accessors for lists/vectors returned by various things
20:37:18
Bike
if you give defstruct :type, it mostly just defines a bunch of functions to do (aref x 0) or whatever.
20:37:27
buffergn0me
Yup. See the :type option 2/3rds of the way down the page http://www.lispworks.com/documentation/lw70/CLHS/Body/m_defstr.htm
21:37:55
aeth
:type in defstruct is a lot more widely respected than :type in defclass, and is probably more optimizable where it is respected
0:13:04
mfiano
I would like to write a macro that allows specifying types for each argument, so that I can include an ftype declaration in the expansion. Can you give me some pointers on how to use your library to do that? :)
0:14:59
Bike
i can't recommend using that library, i think it's better to use an actual parser with a grammar. i don't know if there are other independent parsers though. i know sicl has one
0:16:23
mfiano
Ha fair enough. I really don't want to parse a lambda list myself. My library is in disrepair right now ever since I ripped out the defstar library due to being GPLv3.
0:16:52
mfiano
There doesn't seem to be many choices here to just add typed arguments to a defun wrapper
3:08:29
loke
pjb: Right, but in the discussion I had the person was arguing that the object orientation in Objective C was somehow fundamentally different from that of, say, Java because it's “message passing”.
3:18:27
aeth
It's harder than it looks in edge cases. I don't currently have typed keyword/optional/rest, for instance. I'll probably copy the syntax from pillton's specialization-store there. Similar syntax already, except I don't provide a return type