Search
Tuesday, 12th of September 2017, 2:52:36 UTC
2:58:57
drmeister
There may be - I've got problems much later - when methods are being defined and wiping out the specializer-profile slot that I added.
3:00:35
drmeister
I can't seem to find the point where the lambda-list is defined and the generic-function is initialized for the first time.
3:03:56
loke
Isn't that in ENSURE-GENERIC-FUNCTION? There is a cond clause for (not (fboundp name))
3:04:56
drmeister
The lambda-list doesn't appear to be defined in some cases - although I may have done something wrong.
4:51:41
JohnTalent
Bueller?... Bueller?... anyone?... Bueller?
5:00:51
lexicall
hi, I wonder is there an elegant way to call a method of super class? In order to do that I have to use CHANGE-CLASS but I think it's quite ugly.
5:02:52
loke
lexicall: (call-next-method)
5:19:44
jasom
did sbcl core images get a lot smaller recently?
5:20:18
jasom
I'm seeing 44MB uncompressed for a fairly simple image on x86_64, and I rememberd that number being higher...
5:37:12
beach
Good morning everyone!
5:43:27
iqubic
I hate still being banned from #emacs
5:43:45
iqubic
It been a week and a half now.
5:51:40
scottj
iqubic: fwiw when it happened I think they said a 24 hour cooling off period so maybe message the op that banned you.
5:52:01
iqubic
I don't remember who banned me.
5:55:00
pillton
jasom: I don't think so. http://paste.lisp.org/display/355631
6:13:25
Shinmera
jasom: Stassats has been continuously working on reducing core sizes.
8:00:59
shka
question regarding non standard generic function metaclass
8:03:13
shka
will performance be hurt under sbcl even if i won't use non-standard dispatch?
8:04:30
shka
well, i guess we should check
8:04:50
beach
What does your non-standard generic function class look like?
8:06:33
shka
beach: no members, no specializing CL GFs
8:06:47
shka
i need it just to add my own methods
8:14:57
shka
beach: i will show code once i will write it
8:15:02
TMA
GF abbreviation is very context dependent... it means girlfriend outside of lisp related chat
8:15:17
shka
TMA: girlfriend? What is that?
8:17:38
Shinmera
And in yet other contexts it means Galois Field
8:18:16
TMA
a much more approachable concept
8:31:10
JuanDaugherty
grammatical framework to me
8:31:44
JuanDaugherty
(for which there's a channel here)
8:33:30
shka
JuanDaugherty: btw, your nick
8:33:52
JuanDaugherty
it's on my birth certificat
8:36:02
JuanDaugherty
but take it you are referring to Don Juan's Reckless Daughter
8:36:58
JuanDaugherty
the Irish name Daugherty doesn't actually come from daughter, just sounds like it does
8:47:16
shrdlu68
Good morning, Commoners.
9:21:50
Posterdati
shrdlu68: commodores please!
9:26:18
Posterdati
yes, seems resonable
9:52:07
Posterdati
please, is there a way to trigget a call to the io-handler in the iolib multiplexer?
9:52:25
pjb
Can't you call it directly?
9:53:49
Posterdati
pbj: I do not know how to funcall it
9:54:11
Posterdati
it is set by set-io-handler
9:55:54
pjb
(set-io-handler #'my-nice-handler) (my-nice-handler) ?
9:57:40
Posterdati
pjb: I have no access to my-nice-handler
9:59:05
Posterdati
pjb: I modified the ex8-server code in iolib sockets example
9:59:06
pjb
Why do you want to do that?
9:59:29
Posterdati
pjb: because I do not need an echo server!
10:01:05
pjb
I don't see the relationship between "you do not need an echo server!" and "trigger a call to the io-handler".
10:01:51
Posterdati
pjb: I'm modifying the echo server example
10:02:20
Posterdati
pjb: because a I need a server capable to get some commands over a socket and then answer back
10:02:21
pjb
(iomux:set-io-handler eb socket :read (setf *saved-handler* (make-whatever-handler-you-want socket id etc))) (funcall *saved-handler* fd event exception)
10:02:43
pjb
Again, I don't know why you would want to do (funcall *saved-handler* fd event exception)
10:03:06
pjb
If there's no I/O why would you want to call it? If there is I/O then it's already called by iolib!
10:03:07
Posterdati
because I want to write out data to client
10:03:24
pjb
(write-sequence data socket)
10:03:44
Posterdati
not using a multiplexer io handler?
10:04:16
pjb
The multiplexer is for asynchronous I/O.
10:37:54
hajovonta
guys are you aware of a CL library that can do asynchronous ICMP echoes? I need to ping a host periodically and I couldn't find one. Is it a thing that is practically done via FFI?
10:41:19
pillton
All I/O is done by FFI.
10:43:54
loke
To my knowledge there is no FFI library to do direct IP
10:44:28
fe[nl]ix
iolib has an example of how to create ICMP packet
10:45:13
loke
wait what? IOLIB can do it?
10:45:38
fe[nl]ix
but you most likely don't want to do that because creating raw sockets requires basically root privileges
10:46:21
fe[nl]ix
you're better off spawning a thread that runs /bin/ping and reads its stdout
10:50:34
fe[nl]ix
loke: https://github.com/sionescu/iolib/blob/master/extras/ping.lisp
10:52:31
hajovonta
I'm just a little worried that different linux ping versions may print different output
10:52:41
fe[nl]ix
a more sophisticated approach would be to make a small C binary that creates a raw socket and sends it to the main process via a Unix socket
10:52:50
fe[nl]ix
then you can setuid that binary
10:53:42
hajovonta
I've already seen the example you wrote above but wasn't able to make it work
10:54:13
hajovonta
I don't have C knowledge
10:54:15
fe[nl]ix
iolib already has code for receiving file descriptors via a Unix socket, but you'd have to write the C to create and send the file descriptor
10:54:45
fe[nl]ix
hajovonta: when I wrote that code I was running Gentoo
10:55:09
fe[nl]ix
and I modified the kernel to not require root for raw sockets
10:55:21
fe[nl]ix
recompiling your kernel is easy on Gentoo
10:56:02
hajovonta
everything is routine when you've done it enough times :)
10:56:29
fe[nl]ix
hajovonta: the output of /bin/ping can vary between OSes but it should be pretty stable on the same OS
10:57:48
hajovonta
that's true. The output is not standardized
10:57:51
fe[nl]ix
you can safely assume that /bin/ping is the GNU variant
10:58:05
hajovonta
also, the switches of /bin/ping can differ
10:58:40
shrdlu68
How about using iolib and setting suid?
10:58:50
fe[nl]ix
on weird distros it could be a symlink to Busybox, but I doubt you care about those
10:58:53
shrdlu68
ping essentially does that...
10:59:31
fe[nl]ix
shrdlu68: sbcl re-executes itself on start and I don't think that setuid carries along
10:59:37
hajovonta
or maybe I can write a python lib that uses raw icmp and uses standardized output and just call that. ;)
11:00:07
fe[nl]ix
also, if you save a new executable image you have to setuid it again, etc...
11:00:09
hajovonta
but I don't know C, so...
11:00:37
fe[nl]ix
look at this as a good opportunity to learn C
11:00:51
fe[nl]ix
you have a specific goal, which is very good
11:00:58
fe[nl]ix
instead of generically "I want to learn C"
11:01:14
hajovonta
I already got in touch with C several decades ago...
11:01:23
shrdlu68
fe[nl]ix: I can't confirm, have you tried it?
11:01:31
hajovonta
the same is true for Java, PHP and Perl :)
11:01:36
fe[nl]ix
shrdlu68: in the past, yes
11:02:26
shrdlu68
Well he could use a different lisp...
11:05:44
shrdlu68
If the problem here is that one can't effectively use setuid with sbcl, there are other implementations that hopefully don't have this limitation.
11:12:25
_death
you could just use setcap instead of the suid bit
13:17:23
francogrex
hi is it possible to reconnect to a running thread: debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread #<THREAD "main thread" RUNNING {23EE7E89}> sbcl hangs and i would like to open another sbcl and "attach" it to that hanging running thread
13:23:34
antoszka
otwieracz: ^ haven't you been dealing with a similar problem recently?
14:15:41
hjudt
can anyone help me with cl-json? i want to generate json output like this: { headers: ["h1", "h2", "H3"], data: ["d1", "d2", "d3"] }. i have headers and data as lists. what do i need to do?
14:16:33
Bike
according to the manual, you can get a js object if you feed it an alist or a hash table.
14:16:35
hjudt
simply (list headers data) gives indexed arrays, but i'd like to have named arrays
14:16:48
Bike
so you could do like (list (cons 'headers headers) (cons 'data data))
14:18:17
hjudt
(cl-json:encode-json-to-string (list (cons 'headers '(h1 h2 h3)) (cons 'data '(d1 d2 d3)))) => "[[\"headers\",\"h1\",\"h2\",\"h3\"],[\"data\",\"d1\",\"d2\",\"d3\"]]"
14:18:51
hjudt
not what i want. i'd need "[ headers: ..., data: ...]"
14:19:50
Bike
can't believe the manual would deceive me.
14:20:28
Bike
oh, i guess it's because they're lists. genius.
14:21:08
Bike
okay, if you do a hash table it does work properly.
14:21:27
Bike
as in, i get {\"headers\" ... } out.
14:21:35
scymtym
(json:encode-json-alist '(("headers" . ("h1" "h2")) ("data" . ("d1" "d1")))) should also work
14:22:13
hjudt
scymtym: thanks. that's the solution.
Tuesday, 12th of September 2017, 14:52:36 UTC