freenode/#lisp - IRC Chatlog
Search
17:14:53
jmercouris
any difference between (require "something") and (require :something) ? Why is it done sometimes one way and sometimes another?
17:17:02
Josh_2
Chapter 6 of On Lisp is pretty awesome imo, do people use this sort of programming style often in CL?
17:20:37
mfiano
Closures are a good way to queue function evaluation, so make good hybrid data structures for sure.
17:22:23
Josh_2
I think that style or programming is awesome, kinda strange to get my head around though.
17:44:10
emaczen
How would I add a keyboard interrupt to stop program execution? Some kind of handle/condition code I assume?
18:58:23
rumbler31
in my case I don't particularly care when the input character arrives. I suppose that means that I might need to hit enter in my terminal
20:41:23
dim
I think I just optimized the qmynd driver *a lot* (looks like twice as fast with my current test case)
20:46:32
dim
I'm too worried about protocol support and edge cases to switch to another MySQL driver tho :(
20:50:59
Bike
if the compiler's smart enough, it can understand that the result of (aref row ...) will be of type (or nil simple-string), which could help
20:59:35
Shinmera
dim: I'd expect most implementations to give up when encountering compound types for arrays.
21:06:55
scymtym
dim: not that nil is the empty type. (or nil simple-string) is just simple-string. did you mean null instead of nil?
21:09:05
scymtym
dim: also, what sometimes helps is (and <some-kind-of-string> (not (array nil 1))) since otherwise the compiler has to entertain the possibility of your "string" being an (array nil 1)
21:11:17
scymtym
emaczen: if the octets are in an (array (unsigned-byte 8) 1), the nibbles library has all the integer conversions, otherwise what bike says
21:14:34
basket
emaczen: (loop with n = 0 for i from 0 for byte across bytes do (setf (ldb byte 8 (* i 8)) byte) finally (return n))
21:18:06
Bike
if you had two bytes, and wanted to make a two byte number out of them, you would take 256 times the high byte, plus the low byte
21:18:31
Bike
on a computer you might do the "256 times" with a shift or unaligned load, but it's all the same principle
21:21:47
akem
why does emacs have such weird defaults? like paren matching delay, who the hell wants a delay for that??
21:23:04
akem
when I move the cursor over a ), the corresponding ( lights up, but only after a few annoying miliseconds. I've tried to turn it off but no luck so far
21:23:26
Shinmera
With stuff like company the delay is actually necessary because it really slows your editor down to a crawl otherwise.
21:24:47
Shinmera
Can pop you up a small buffer with suggestions. Slow as balls though with a lot of symbols.
21:25:00
Shinmera
Which is a real shame because the delay makes it really annoying too, and other IDEs don't have that much of an issue with that kind of thing.
21:27:21
akem
ah yes, I get a buffer of suggestions. is it possible to have it replace the word at the cursor, cycling through the suggestions directly?
22:21:30
_death
a few minutes ago I had some db row ID 754 and I thought that I must be such a nerd for thinking "ieee floats".. and now it's again confirmed when I'm seeing 921600 and I'm thinking 640x480 24-bit image
22:27:14
pjb
With socket streams, you have to ask yourself the question of what happens when the stream stays open and the bytes never arrive.
22:42:32
pjb
All the network protocols are binary protocols, even when their records are separated with CR-LF and their fields are filed with ASCII codes.
22:43:02
pjb
So, instead, try to open that socket with :element-type 'octet with (deftype octet () `(unsigned-byte 8))
22:45:43
shrdlu68
emaczen: Stream sockets support both character and binary I/O, according to the ccl docs.
22:46:47
pjb
emaczen: with IP, you don't get to choose the order of the bits in 8-bit bytes, but you get to choose the order of the octets in the packets.
23:01:39
aeth
alexandria has a read-stream-content-into-byte-vector (and read-file-into-byte-vector, which uses this)
23:05:12
aeth
I use it (through read-file-into-byte-vector) to read 81204 bytes with no problem, but that's 10x less so if it's O(n!) or something for some reason it won't work for you.
23:53:00
asarch
I am very noob and I was wondering about a good book to learn to program in object-oriented with Lisp
23:58:10
asarch
Currently, I am using "COMMON LISP: A Gentle Introduction to Symbolic Computation" from David S. Touretzky to learn Lisp
3:53:03
Fare
or did you then have an asdf more recent than those earlier versions of uiop, say asdf 3.2.1?
3:56:28
Zhivago
You could have an account which ran the interpreter as its shell. This would allow access via telnet or ssp. It would be simple, but perhaps unwise.
3:57:28
turkja
or maybe play with things like socat? but i don't know how well these things work readline etc.
3:58:20
beach
vutral: Why does it have to be an interpreter. Are you particularly attached to bad performance? Also, insisting that it is an interpreter will limit the number of Common Lisp implementations available to you.
4:00:54
vutral
i guess i should write some kind of tcp server in lisp which evaluates input and returns the result
4:02:45
Fare
vutral: you can make SLIME servers available on a port available through ssh redirection
4:03:28
Fare
I knew someone who did that in a distributed system --- plenty of slaves listening to orders via SWANK
4:05:12
jmercouris
Anything connected to the internet is inherently exposing all of its resources, but I agree, take precautions