freenode/#lisp - IRC Chatlog
Search
12:26:08
jmercouris
I'm getting strange behavior with a macro: https://gist.github.com/1bc275b5bfbe54cd2603331ebb76384d
12:40:31
jmercouris
I'm just saying, any time a signal is raised due to some error, I have no idea what all the things in SBCL mean
12:40:44
_death
there's no need to read the backtrace in this case.. it's enough to read the error text: The variable ATHENA::DEFINE is unbound.
12:51:15
flip214
jmercouris: don't worry, reading backtraces is one of the harder things in CS - in any language.
12:51:50
flip214
you need to know enough about all the things in use to determine which frame might be the real cause, and which ones are just noise.
12:52:39
jmercouris
flip214: Yeah, I would agree with that, I can't say I've ever been so truly enlightened in any language as to grasp immediately a backtrace
14:02:35
shka
anyway, as others pointed out, there are different strategies for implementing remove-duplicates
15:49:21
jmercouris
I'm getting an interesting stream error when I'm trying to return an image from my lisp web server: https://gist.github.com/36f339d186996b2f8c40cab099739366
15:57:48
jmercouris
or what is it? more like a buffer? excuse my ignorance, as I still don't know what streams are :\
16:02:48
eminhi
jmercouris: https://stackoverflow.com/questions/7441992/how-to-create-a-binary-stream-not-a-file-in-common-lisp
16:04:31
tfb
I'm the wrong person to answer this but traditionally streams either deal with (a subtype of) character, or (a subtype of) integer. And CL-the-standard is missing some stuff around this I think
16:07:21
tfb
Somewhere there is stuff (also not in the standard) about bivalant sreams which are streams which can contain both characters and bytes, and which I think you really kind of need for webby stuff
16:08:30
eminhi
tfb: we can use *open* with different :element-type, when finer control over stream is needed
16:08:33
tfb
(and. doh, flexi-streams is 'Flexible bivalent streams for Common Lisp': I should have looked at it!)
17:56:58
jasom
skidd0: If nobody mentioned it, EXIT should not be in the CL package, so if you don't use CL-USER there should be no conflict...
17:58:31
jasom
cl-user is an implementation-defined superset of the CL package; it has non-portable but useful things (most implementations define QUIT for example; SBCL defined EXIT in addition to QUIT because they changed the interface IIRC)
18:05:40
skidd0
the general user story is "I want to add a task." > "I execute 'to-do-binary --add-task'"
18:06:10
skidd0
which, in code would then open a connection (since the binary doesn't live in memory and thus can't maintain an open connection)
18:07:09
skidd0
so in my understanding, every db op (like add-task) would need to be wrapped in the with-connection
19:47:47
jasom
skidd0: that is correct. I would recommend doing a with-connection around your main function though (assuming *most* invocations of your program will need to connect to the database).
19:48:51
skidd0
well the "main" function that the end-user interacts with is a cli function with CLON
19:49:48
jasom
skidd0: assuming the commands are functions, just put it in the body of those functions.
19:50:17
jasom
I'm just suggesting you not do (with-connection <lookup some data>) (with-connection <modify some data>) ... or something stupid like that
19:51:38
skidd0
and for each command line option from clon, have a with-connection at the start of that commands function body
19:52:36
skidd0
so i'm thinking it'd be better to wrap each of the functions in the to-do package rather than the functions in the cli
0:04:14
esthlos
heya, I want to make an array containing a bunch of bit vectors which are not eq (different memory locations). how can I do this without much pain?
0:12:30
esthlos
Bike: if I change a bit in one of the vectors with setf, I don't want it to change in every vector
0:13:03
Bike
let me guess: you're doing something like (make-array n :initial-element (make-array m :element-type 'bit ...))?
0:19:31
esthlos
Bike: is there a way, then, to get around make-array warning that the type is incorrect when calling make-array?