freenode/lisp - IRC Chatlog
Search
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?
3:10:20
equwal
Looks pretty neat, definitely better than w3m which I use for most of my non-firefox browing.
3:10:24
iqubic
DO you run Linux? I run linux and I'm not sure I want to go through the pain of getting it to work.
3:10:44
equwal
I'll just start it up and review it now I guess, I'm used to compiling stuff from source at this point.
3:24:18
figurelisp
why do people call javascript same as lisp? in what sense they are talking about and is that true?
3:26:29
mange
I don't think anyone would say that Javascript is the same as Lisp, but people often want to claim that it's very "Scheme-y". I think the biggest thing that lets people claim that is first-class functions.
3:28:26
drewc
figurelisp: because people from C++ and Java think Lisp is functional, and think ECMAscript is as well.