freenode/#lisp - IRC Chatlog
Search
20:41:45
HerrBlume
phoe: It does not compile on my machine without throwing errors. And I think it should not be needed for clsql/clsql-sys. So my thought was to remove the cffi/uffi thingy. Writing a clsql-jdbc part should be trival (no other dependency, since the jdbc drivers are loaded via the classpath)
20:43:51
phoe
HerrBlume: hm - I think you might need to fork the github repostory for clsql and add your modifications there.
21:06:24
emaczen
phoe: If I create a bunch of threads with bt:make-thread and then do (format t ...) on them, each threads output gets tangled together
21:08:18
phoe
emaczen: make a lock and hold it around each call that prints something to *\standard-output*
21:08:23
sjl
Write a thread-safe-output-stream with trivial-gray-streams that wraps another output stream and uses locks from bordeaux-threads or whatever to synchronize writes to it, then (setf *standard-output* (make-thread-safe-output-stream *standard-output*)
21:24:34
emaczen
phoe: What you suggested seems to work, why go through the extra work with the gray stream?
21:25:56
phoe
and you can forget about locks altogether and just write FORMAT like you usually would.
21:26:35
phoe
it just writes to a stream; and the fact that the stream happens to be thread-safe is just a handy coincidence.
21:30:52
no-defun-allowed
are there any native machine vision libraries (similar to opencv without the floating point traps) for cl?
21:33:10
sjl
Note that you might also want to deal with *terminal-io* -- for anything but FORMAT, a stream of t means *terminal-io*, not *standard-output*
21:33:40
sjl
e.g. (format t "foo") writes to *standard-output*, but (princ "foo" t) writes to *terminal-io*
21:33:50
aeth
I'm considering implementing BLAS in native CL (and possibly also in a Lispy-lang-on-GPU as well) because the current options for this sort of thing disappoint me that much. From there it's only 3-4 steps to a useful library.
22:28:49
jcowan
Does anyone have practical experience with loading third-party plugins into their application with LOAD?
22:45:31
aeth
The only differences with that and ASDF (assuming you load the files in the same order) are, afaik, that you'll recompile every time and the FASL will be in the same directory (possibly implementation-specific?) instead of in ~/.cache/common-lisp
22:46:33
jcowan
but what I'm asking about is whether people exploit the ability to load a file whose name is computed at runtime.
22:48:28
aeth
The laziest way to do this would be to use Quicklisp to quickload an ASDF system. There's probably a proper way to do this via ASDF.
22:53:59
aeth
jcowan: I think the idiomatic way to solve that problem in modern CL would be to compute the directory containing the foo.asd file that describes the system foo and then have ASDF recognize that directory (would that be by pushing it to asdf:*central-registry*? not sure here)
22:56:18
jcowan
I see two problems, or perhaps only one: you can't sandbox what you load easily, and you don't know how to interface with it except by convention or reflection.
22:58:04
aeth
Sandboxing is apparently impossible in current implementations. Iirc, beach is working on an implementation that permits sandboxing as one of its goals.
22:58:07
aeth
https://github.com/robert-strandh/SICL/blob/e19613c61d8797a9ea586e3c513efdaeb0860d68/Papers/Global-environments/sec-benefits.tex#L92-L119
23:48:01
griddle
I've got a quick question. I've been working on implementing a small lisp interpreter and I'm interested in how '(...) and (quote (...)) relate
0:09:52
jcowan
If you had a sandbox, you could statically examine what it does and see if you are willing to load it into the live image, but of course there are no guarantees about what crimes it might commit dynamically.
3:17:45
r0sebush
question from a sbcl newbie.. What's is the best method to include libraries, like cl-ppcre into your lisp code for production release? .sbclrc or include (ql:quickload ...) in your code base?
3:39:49
gendl
2. When ready for release, use (asdf:operate 'asdf:monolithic-compile-bundle-op <your-application-system-name>)
3:40:24
gendl
that will produce one big .fasl with your whole application including its depended-upon stuff, presumably in the right order.
3:40:52
gendl
then start a fresh sbcl image, load this .fasl, then dump image. (I'm not sure the specifics of that with sbcl). ASDF also has built-in operators for doing that.
3:41:43
gendl
See this ancient blog post which needs to be updated/added to: http://gendl.blogspot.com/2013/03/saving-images-with-asdf3.html
3:43:37
gendl
it was suggested earlier today that someone needs to make a do's-and-don'ts for production application release and maybe a how-to. It's something which should be pretty routine and well known at this point but doesn't seem to be.
5:45:44
no-defun-allowed
- use burgled-batteries to interface python module that interfaces opencv for images
6:22:44
no-defun-allowed
still, most of this box-mangling and vision stuff would read better in lisp but common-cv is just a very fine wrapper over C unfortunately