freenode/#lisp - IRC Chatlog
Search
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
4:23:09
nixfreak
Hello I am looking for away to create "hot folders" like a workflow, where I can drop files in a folder and it goes through a workflow
4:41:16
beach
nixfreak: If you are going to make something like that compatible with the underlying operating system, i.e., use OS directories for the folders and OS files for the files, then I suspect you won't get much help from Common Lisp compared to other languages.
4:42:25
loke
nixfreak: There are libraries that hook into the file notification infrastructure of your operating system
4:43:05
loke
Since this meahcnism is different in all different operating systems, I don't knwo which one is the best one.
4:54:12
turkja
hey still about SLIME... i wonder if there are good libraries for python or other language to connect to slime server?
4:56:00
turkja
well i don't know about SLIME protocol, maybe it's simple enough to connect with raw tcp and start throwing expressions?
5:02:13
Zhivago
Having unrestricted communication is probably not a good idea for purposes of security.
5:03:18
Zhivago
They also require the caller to be able to print things as expected for that lisp implementation.
5:03:41
turkja
i don't know, i didn't see what exactly vutral is trying to do... but to his initial question, i think "socat" can do the job in a dirty way
5:07:39
Fare
oh, I misread Xach's blog as meaning there was brokenness and e.g. an infinite loop. But reproducing the bug, I see that's it's the known behavior of asdf < 3.3.0 and has nothing to do with uiop.
5:16:21
mfiano
Hello all. I found a nasty bug in the fast-io library. I wrote a little test case to reproduce it, but I'm having a hard time figuring out why it occurs.
5:18:17
mfiano
This is supposed to behave similarly to cl:read-sequence, except when I read a single byte from a stream, it reports that it read the entire stream's contents. this does not occur when reading from a vector. https://github.com/rpav/fast-io/blob/master/src/io.lisp#L142-L163
5:25:31
Zhivago
But there's no documentation, so it's not clear what it ought to be doing in the first place.
5:26:08
mfiano
indeed. there lies my problem. sad part is this is being used by quite a few projects so i'm surprised it hasn't been detected
5:29:17
mfiano
I'm using a third party library that uses fast-io, and it doesn't depend on a C library
5:30:50
mfiano
Also the author moved away from lisp, so I'd have to become familiar enough with it to fork and maintain it
5:41:07
mfiano
I maintain enough libraries, and if I were to maintain this, I'd rewrite it from scratch. The code is a bit...obtuse
5:52:31
beach
thebardian: Are you just planning to learn Common Lisp for kicks, or do you have any particular projects in mind?