freenode/#lisp - IRC Chatlog
Search
21:40:32
aeth
The implementation-specific read-eval optimization is probably unnecessary, though. Especially since you'd almost always initialize it *with* a pointer provided.
21:43:25
anamorphic
I guess my subclass would be via (defstruct (foo-wrapper (:include wrapper))) and in CFFI, i'd be doing something like (cffi:defctype foo (:wrapper :to-lisp #'make-wrapper :from-lisp #'wrapper-ptr))
21:45:31
anamorphic
and for the high level cffi wrapping function, something like this: (defun my-func (foo bar) (check-type foo 'foo-wrapper) (check-type 'bar-wrapper) (low-level-cffi-my-func foo bar ...
21:47:36
aeth
Are you using autowrap? I wouldn't pull in that very large library for what's essentially a two-liner
22:14:55
atgreen
I just built a containerized mirror of the full quicklisp archive, and hacked the quicklisp client to use it in my environment (OpenShift). Xach - if you can suggest a better way to access it, I'd love to hear...
22:25:47
hjudt
antoszka: it has been posted earlier today by Xach: https://github.com/quicklisp/quicklisp-client/tree/pgp
22:26:16
asarch
From Slime manual: "Now we need to create the tunnel between the local machine and the remote machine."
22:27:26
asarch
And why do I get: ssh -L 1.0.0.1:4005 asarch: Bad local forwarding specification '1.0.0.1:4005'
22:28:30
hjudt
asarch: from server to client. try ssh -nNTR <someport>:localhost:4005 user@client-host
22:32:12
Xach
atgreen: hmm, I don't know - do you need access to everything just in case? or are there subsets you need for a particular task?
22:33:36
asarch
Just for fun. With CL REPL I can easily: | CL REPL [Server] |--->| Swank |--->| 1.0.0.1:4005 [Listening] |<---| Slime [Client] |
22:34:36
asarch
However, this time I am trying to use the SBCL of another PC: | SBCL |<---| Slime |--->| Swank |--->| 1.0.0.1.4005 [Listening] |<---| Slime [Client] |
22:34:58
atgreen
Xach - the mirror is no problem. I build the whole thing. The question is really about the best way to access it. I hack the quicklisp client for now
22:35:10
atgreen
https://github.com/container-lisp/s2i-lisp/commit/7367dcda4d70bf24eb995b1cdc211c2153de3fd4
22:36:42
Xach
atgreen: hmm, maybe it could be done with the ql-http:*fetch-scheme-functions* instead.
22:37:52
Xach
atgreen: i think a mirror is a fine thing to do but I am not currently sure of the best way to use it with quicklisp. i'll have to think about it.
22:38:42
atgreen
ok, thanks. The mirror is useful as a container because it's easy to deploy, and helpful in my case where I am doing regular CI builds
22:40:05
atgreen
patching the client works fine for now. I had a quick look at *fetch-scheme-functions*, and I suppose you could map "http" to a new mirrored-http-fetch function that swaps the hostname before calling http-fetch.
22:40:47
hjudt
Xach: another question about quicklisp. when you build a system, you also test it by calling the -tests package or similar. i suppose this is done automatically and there is some scheme to follow to implement this correctly?
23:00:24
hjudt
Xach: in case of packages using foreign libs, do your tests also check which foreign libraries those need and whether they are present?
23:44:15
phoe
hjudt: the basic test done by Xach means that a library is loaded into the Lisp image; if a Lisp system depends on a foreign library, that means the foreign library is loaded as well. And, for that, it needs to be present on the system.
2:17:41
hectorhonn
how to execute some common lisp code at slime startup? such as setting optimization level
2:19:58
verisimilitude
A cursory glance with C-h v shows a slime-connected-hook you may be interested in.
2:21:10
aeth
If it's common initialization code between multiple implementations and multiple methods of starting Lisps (not just SLIME) you could put it in a quicklisp system in ~/quicklisp/local-projects/ and then do (ql:quickload :foo :silent t) at the start
2:26:00
hectorhonn
verisimilitude: i thought of putting it in sbclrc, but that would affect non-slime sessions. i think slime-connected-hook run elisp instead of cl?
2:27:11
hectorhonn
aeth: erm, that works? does that mean any other quicklisp package can declaim things and it will affect my package as well?
2:29:34
aeth
Those are both tied to a function name which is hopefully local to a package that the system created, though.
2:32:26
verisimilitude
You can always tell slime to place, say, :SLIME in *FEATURES* and then do the further distinguishing in your initialization file.
2:52:54
verisimilitude
I'm going through the logs and noticed four days ago there was discussion of Weboob and CL programs for scraping websites.
2:53:33
anamorphic
When CCL gives me "Exception on foreign stack", and drops into the low-level debugger and prints out the CPU's registers, how would I go about getting the foreign stack address? (i.e. to plug into GDB after attaching the CCL process so I can find where it came from)
2:54:02
verisimilitude
Those of you concerned may find it interesting that I've been doing some work related to this, mostly concerning the ``booru'' style of website; I can see my efforts leading to the creation of at least two libraries.
2:54:50
verisimilitude
I was using DRAKMA:HTTP-REQUEST for a time, but I've unfortunately been using GNU wget lately, since I've yet to have DRAKMA:HTTP-REQUEST properly continue downloads when interrupted and all of that.
3:15:29
sindan
i've tried many things, basically scraping the html, but lately the one thing that works is selenium driver + scraping the DOM after the js has built it
3:38:27
verisimilitude
I was referring to scraping websites that may have tricks involving JavaScript or cookies, but nothing to that extent, no.
3:39:43
sindan
the first couple of times i got cross-eyed looking at obfuscated js i abandoned my 90s era trick of trying to dig the html in any way.
3:40:40
verisimilitude
I've only come across a few websites comprised almost entirely of JavaScript and not one was worth scraping.
3:41:13
verisimilitude
I simply noticed the conversation and noted how I've been interested in writing Common Lisp clients of sorts for a few websites or types of websites.
3:41:30
verisimilitude
I'm glad I didn't bother researching into how tumblr works, considering that would've been a waste.
3:43:08
sindan
I've come across a few, specially if they try to make it hard to copy. Libraries, for one. I wrote a python client to download books.
3:44:08
sindan
from two libraries, one spanish, one norwegian. Piece of cake with selenium and the python wrapper for it.
5:33:32
krwq
Hey, does anyone know if there are any circumstances where this code: https://pastebin.com/gnqUAwdZ can fail (assuming 123 is not constant)
5:36:32
krwq
i converted it to not use *standard-output* and it never failed again but I'm curious if I'm missing something or is it like a sbcl bug
5:37:50
krwq
im almost sure the extra character was the '.' coming from quicklisp which was loading my system
5:40:23
krwq
the code was working for a while and then i started updating various systems and it suddenly started failing
5:41:03
krwq
and then when i used one of the restarts with 'recompile' in the name it loaded everything fine
5:41:40
krwq
it was super weird but it would be nice to track this down is it might bite me or someone else in the future (assuming im not missing something)
5:48:51
no-defun-allowed
you'd also have to change the FORMAT target to that stream instead of T as well
5:50:30
krwq
so I'm not sure I'll be able to repro right now, when i don't touch *standard-output* everything works fine
5:51:25
krwq
thrig: but when i do with-output-to-string it technically is not using the same *standard-output*
5:53:39
krwq
without clearing .cache/common-lisp no repro, after clearing (that's when it happened the first time) i got repro
6:00:08
krwq
hopefully beach comes back from his break soon and explains that to or at least say that's a bug in sbcl or something - it bothers me since weekend and can't find the answer :P
6:01:38
edgar-rft
krwq: *standard-output* might be buffered. Try FORCE-OUTPUT and/or FINISH-OUTPUT before and after printing to *standard-output*
6:07:49
krwq
and also even if that is in fact buffering issue it technically should buffer different stream, shouldn't it?
6:10:29
krwq
the extra '.' seems to be before my output so i presume putting it after won't make a difference
6:33:37
buffergn0me
FINISH-OUTPUT is supposed to wait until buffered output is flushed before returning. FORCE-OUTPUT can issue an async flush and return right away