freenode/#lisp - IRC Chatlog
Search
16:34:18
beach
I was just thinking that, for implementations that don't have first-class global environments, that could be a bootstrapping trick.
16:40:38
|3b|
code using strange readtables/case/etc is fine, loading other peoples code in strange readtables/etc is when you deserve to lose :)
16:41:50
|3b|
ACTION is willing to make some allowances for 'modern mode', since it seems like a reasonable thing to change, but anything beyond that is user error :)
16:45:28
|3b|
Shinmera: speaking of uppercase constants, does cl-spidev have any way to do unbuffered reads?
16:45:43
on_ion
me as well. hey what do you think of this, beach ... moving backspace to top left (tilde ~?) and moving space to top right (bkspc)
16:46:45
beach
on_ion: Maybe. What I really want is a narrow space key so that there is room for more mode keys there.
16:46:46
|3b|
my code seems to be breaking due to buffering (i can read large chunks correctly, but any pauses give me bad data, with apparent missing parts so i lose sync with device's fixed size packets)
16:48:08
beach
It could be Control I guess. I would like to keep my home position while pressing control.
17:17:03
hugbubby
well I don't see any FAQ or nothing in the MOTD so I'll just ask: Is SICP still a good book to learn lisp with?
17:20:40
phoe
nonetheless, SICP is still a rather good read, and the SICP lectures are still very good to watch
17:20:55
minion
hugbubby: please see pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
17:20:57
minion
hugbubby: have a look at gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
17:37:13
phoe
an instance looks like #<#<STANDARD-CLASS (COMMON-LISP-USER::FROB) {100FF27103}> {1010049DD3}>
17:38:20
jcowan
in any case, OO and FP are duals: "objects are poor man's closures, but then again, closures are poor man's objects"
17:41:40
jcowan
phoe: https://www.math.purdue.edu/~lucier/615/Meroon-Doc/MeroonV3.ps describes Meroon, a highly portable (and probably familiar) object system in Scheme
18:25:54
beach
phoe: I don't know what is said about printing class objects. But I don't think there is such a thing as an anonymous class. CLASS-NAME probably always returns a name that you can not unset.
18:28:10
phoe
beach: I've searched for it; printing unreadable objects is implementation-dependent, so, in particular, printing standard-classes is implementation-dependent.
18:28:29
phoe
beach: also, (allocate-instance 'standard-class) gives you a class instance whose name slot is *not* set.
18:48:55
Shinmera
|3b|: I don't remember. It's a library I have very little memory of since I wrote it quite quickly and barely used it. Haven't gotten to working on the project that I initially wrote it for
18:50:56
|3b|
Shinmera: ok, looks like i might be able to just use transmit, otherwise i can make a copy of it that does what i need
18:51:14
|3b|
(assuming i can get anything to work, keep getting "message too long" from it currently)
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?