freenode/#lisp - IRC Chatlog
Search
19:57:23
|3b|
Shinmera: possibly starting to figure out the spi stuff, will try to send a pull request with my changes at some point
19:58:15
Shinmera
Thanks, much appreciated. Sorry that I couldn't deliver on the "just works" experience
19:58:26
|3b|
Shinmera: any thoughts on naming for a function that does (possibly multiple) fixed size read through ioctl?
20:00:11
|3b|
ACTION tried reading a bunch of packets at once and got errors, but looping on single packet-sized ioctl reads seems OK
20:02:46
|3b|
though maybe single packet per ioctl calls is fast enough, if i can get it running on another thread
20:03:26
|3b|
multiple per call would hopefully make it less CPU intensive and less sensitive to GC though
20:09:45
phoe
Okay - this is a hack (obviously), but I have created a MOP-based toolkit for creating and using classes that are named with lists of symbols, not only symbols (as in ANSI CL).
20:28:37
|3b|
Shinmera: looks like read-chunked works on my device with a small delay, can read 24 packets per call (apparently limited by kernel buffer size, so maybe more if i adjust kernel/module parameters)
20:32:31
Shinmera
I initially wrote it for a set of plates called "PiPlates" that use some weird custom spi based command protocol
20:32:54
ealfonso
anyone familiar with postmodern have any suggestion on how to handle jsonb types? for example, I'd like to serialize/deserialize with cl-json
20:33:19
|3b|
this thing uses i2c for command/status stuff, so spent most of last day or 2 implementing that part
20:34:34
|3b|
a lot of that was just typing in boilerplate once i got the basics done though... (define-get-set-enum command-name x y z enum1 enum2 enum3) etc
20:37:46
Shinmera
A somewhat direct translation is here, but it doesn't work yet and I never found the energy to debug https://github.com/Shinmera/pi-plates
20:39:44
|3b|
ACTION has enough things to hook up to my pi for now, but maybe next time i buy stuff :)
20:39:44
jmercouris
I'm having a weird issue reading from a stream: https://gist.github.com/jmercouris/9c756df70f44b3055aff7cd6ca15f811
20:40:03
jmercouris
here's the doc for circular-streams: https://github.com/fukamachi/circular-streams
20:44:16
|3b|
q i think uses first 'abort' restart, in case that happens to matter at some point (sometimes you need to pick a different one when there are multiple)
20:45:02
jmercouris
I wish I knew more about streams, where can I learn about them that isn't the CLHS?
20:47:53
|3b|
looks like with that circular stream, you should be able to keep reading after that error
20:50:38
jmercouris
yeah, #<SB-SYS:FD-STREAM for "socket 127.0.0.1:5000, peer: 127.0.0.1:58816" {10020E3713}> is closed
20:54:31
no-defun-allowed
Are there any web servers that give you streams instead of creating large strings?
20:54:47
|3b|
(presumably buffered in memory though, so you can't get more data from server that way, or send to it)
20:55:35
|3b|
though you might need to adjust the default thread per connection model if you have lots of clients and long requests
21:07:48
jmercouris
I just wasted like an hour thinking, why would this framework convert a file to a string?
21:15:20
nyingen_
I had no trouble using sqlite with CL, but for mysql it looks like the choices are cl-mysql, which behaves strangely on my system (sbcl on linux) and CLSQL whose website and docs are 404
21:17:41
nyingen_
jmercouris: I did see that one. According to the QL site, it uses cl-mysql to connect with MySQL
21:18:44
|3b|
ACTION has the impression postgres is more popular with CL devs, though hard to say if that is cause or effect of quality of mysql support :)
21:18:46
nyingen_
I'm no stranger to the debugger but since it hangs, I can't see what the problem is
21:20:49
jmercouris
best of luck, if that doesn't work, and you don't have to use mysql, I would also suggest just switching to postgres
21:21:06
nyingen_
Yeah, unfortunately I do have to use MySQL. I'm migrating a huge database to couchdb
21:21:33
|3b|
did you try interrupting it when it hangs? (C-c C-c in repl, C-c C-b in other lisp buffers)
21:23:22
nyingen_
jmercouris: Interesting. I might try that as a last resort, but I've never used postgres and would rather not bring it in if I can avoid it
21:24:05
nyingen_
This project started out as a perl script using perl's DBI, but the devil is in the details so I rewrote it to CL, not anticipating the trouble I was going to have with the mysql libs
21:25:05
jmercouris
oh, I misunderstood, I assumed it was a legacy perl application using mysql and you were moving to CL + couchdb
21:26:43
|3b|
nyingen_: hmm, if interrupting it didn't work, did you check *inferior-lisp*? might have run out of memory or printed some other fatal error there
21:26:47
nyingen_
yeah, unexpected issues cropped up with the migration and so I switched to using CL so I could use the debugger, sane data types, and so on
21:28:03
nyingen_
The DB is very large, yeah, but for testing purposes I'm only using 500 records, which should be only a few hundred KB at most
21:28:21
nyingen_
also the SQL lib is not supposed to fetch them all, but return them row-by-row when asked
21:30:48
jmercouris
are you sure your specifying the sql path correctly? are your credentials valid?
21:32:19
nyingen_
the trouble I was having there was figuring out mappings to couchdb's json, etc, and that problem is much better approached in CL
21:32:22
jmercouris
I know this is going to sound very dumb, but have you tried restarting your inferior lisp?
21:34:33
jmercouris
maybe you have an old version of cl-sql? idk, I'm just guessing here, because the behavior you've described is very strange
21:34:48
jmercouris
and I can't imagine how one would even begin troubleshooting it, some queries work, some hang, but they all work in the sql CLI
21:35:09
nyingen_
my guess would be some sort of threading issue with cl-mysql or cl-mysql + swank or whatever
21:39:38
nyingen_
jmercouris: ok, I get the same hanging in the standalone repl, so now I need to make sure my code is doing what I think it's doing, and if that's all good, check what cl-mysql is doing internally
21:41:29
nyingen_
Ideally I would switch to a different MySQL lib and try that, but the only other one seems to be CLSQL, whose website is 404 so I'm not too sure about that, even if its code is in the quicklisp repository
22:52:56
katco
hey everyone, i've created a library to generate OpenAPI clients: https://github.com/kat-co/openapi2cl. i'd love feedback on coding standards/readibility, as well as bugs from folks working with it. just please read the numbered list of caveats in the readme first :)
22:57:50
|3b|
katco: i see a (check-type ... function), any reason for not allowing function designators?
22:58:38
|3b|
ACTION frequently just uses 'foo instead of #'foo in situations where it doesn't matter
22:59:49
|3b|
using symbols in cl-user sounds like a bad idea, better to make a specific package for it
23:01:05
katco
re. symbols in cl-user; that is purely so that when the code is piped through format it doesn't prepend everything with a package. if i specify another package, will it do the same?
23:03:15
katco
if y'all are up for it, opening issues would be great. i'm traveling tomorrow and i don't want to lose this input. cool if not though!
23:26:59
katco
i have to go pack, but tyvm for your comments so far :) i've logged them as issues here: https://github.com/kat-co/openapi2cl/issues
2:40:33
comborico1611
I'm looking for a pdf of Common LISP: The Reference. Anyone know where to get it?
6:10:41
no-defun-allowed
now ab is convinced i'm doing 24,000 requests/second and wrk only thinks i'm doing about 1000
7:19:21
beach
splittist: Did you notice the creation of the channel #sicl, where I can blab as much as I want about what I am doing?
7:20:15
beach
I have no news right now, but I am working pretty hard on bootstrapping at the moment.
7:22:41
splittist
sicl (and the general beachverse of projects) is one of my favourite contemporary examples of people (not you) overestimating what can be done in a year, but underestimating what can be done in 5/10 years.
7:27:03
no-defun-allowed
using sbcl internals to turn off nagles algorithm takes the speed from 24,000 to 31,800 requests a second.
7:30:08
jackdaniel
I still need to get the whole bounding box right, but I need other codebases to attend to now
7:34:32
no-defun-allowed
ab and wrk still aren't agreeing, wrk says woo is two magnitudes faster than my http server but ab says they're about the same