Search
Tuesday, 21st of January 2020, 16:14:31 UTC
16:17:22
phoe
golly, I've become unusually proficient at using the chanserv commands as of late
16:27:09
seok
with dexador, if I do (dex:get ..) with keep-alive to true every time, does the connection remain open?
16:33:46
phoe
if it works like a HTTP keepalive, then yes, it must stay open
16:45:37
_death
seok: it has a connection pool.. note that keep-alive is true by default.. if you have many requests to many servers, you'll run out of file descriptors unless you clear the connection pool every now and then :/
16:46:09
seok
the documentation says the default is nil though
16:47:01
seok
_death: so would it be fine if I am connecting to one server only?
16:47:08
_death
https://github.com/fukamachi/dexador/blob/master/src/backend/usocket.lisp#L428
16:47:31
_death
looks like doc or code needs a fix
16:48:44
_death
when there's a mismatch like that, hard to tell which one is wrong
16:49:44
_death
wrong(doc|code) or wrong(code|doc)
16:50:54
seok
apparently ArangoDB's http api supports keep alive, so I figured it would be right to use it
16:51:59
_death
I guess it's best to specify it explicitly
19:44:20
jmercouris
what shell do you guys use?
19:45:09
hiroaki
bash, ksh when i have to
19:46:39
jmercouris
no shell with lispy syntax?
19:47:04
pjb
jmercouris: if you want that, scsh is cool (but scheme).
19:47:11
pjb
You could re-implement it in CL./
19:47:30
LdBeth
There’s a package running clisp as a login shell
19:48:25
LdBeth
However, trust me you won’t like an interactive shell without command/path completion
19:49:09
LdBeth
scheme shell and it’s variants are ok while only used for scription
19:50:05
LdBeth
That’s say, it’s solely a Unix program oriented script language
19:52:49
LdBeth
Actually, there’s an Emacs fork that was optimized to be used as login shell
19:54:06
jackdaniel
there is a shelisp program written in CL which allows you to mix the repl and the shell (like bash) with a special reader macros
19:54:22
jackdaniel
(and underneath - a run-program)
19:55:00
jackdaniel
http://dan.corlan.net/shelisp/
19:56:30
LdBeth
I hope they could provide features like Do What I Mean or command abbreviation to make it useable
20:44:06
asdf_asdf_asdf31
** NICK asdf_asdf_asdf
22:08:18
asdf_asdf_asdf
Hi. How check type of function? (defun hello (a b) (+ a b)) (typep #'hello '(function (fixnum fixnum))
22:10:18
phoe
asdf_asdf_asdf: no portable way of doing this
22:10:40
phoe
especially since HELLO can also accept non-fixnum arguments
22:10:51
phoe
e.g. (hello 1/2 1/2) is valid
22:11:29
Shinmera
asdf is trying to use CL as if it were C. Unsurprisingly, it is not going well.
22:12:09
asdf_asdf_asdf
OK, how check type #'hello with (function ...?
22:12:51
eeeeeta
ACTION read that 3 times and still has no idea what is being asked
22:13:01
White_Flame
do you need anything more than FUNCTIONP?
22:13:19
no-defun-allowed
You can only really test (typep #'hello 'function) which is a given if it's in the function namespace.
22:13:37
phoe
asdf_asdf_asdf: in standard CL, you don't. The language doesn't work that way.
22:13:38
eeeeeta
> (typep (function ...) 'function)
22:13:47
phoe
TYPEP won't work that way because
22:13:48
phoe
http://clhs.lisp.se/Body/f_typep.htm
22:13:55
phoe
> An error of type error is signaled if type-specifier is values, or a type specifier list whose first element is either function or values.
22:13:56
pnp
Hi all, which is the command to indent the whole buffer in Emacs? ... M-x mark-whole-buffer and M-x indent-region does not works
22:14:03
White_Flame
also, there's (and (symbolp obj) (fboundp obj)) if you want to check for funcallable symbols
22:14:04
phoe
So (typep x '(function ...)) will blow up.
22:14:25
phoe
pnp: C-x M-x indent-region
22:14:31
phoe
pnp: C-x h M-x indent-region
22:14:37
phoe
so basically, select all + indent region
22:15:24
Shinmera
I typically do C-x h TAB
22:16:09
pnp
yes the last works for me too
22:20:18
asdf_asdf_asdf
I want to slot of struct put type function.
22:21:02
phoe
I didn't manage to parse that grammar
22:21:19
no-defun-allowed
You want a structure where a slot has a function type?
22:21:41
asdf_asdf_asdf
Yes, no-defun-allowed.
22:21:53
phoe
you can have that, but you won't really make use of that function type
22:21:59
no-defun-allowed
(defstruct asdf\'s-structure (function-goes-here (error "please provide a function") :type function))
22:23:20
LdBeth
Since it is a function object, the defstruct would only allocate a reference to the function
22:25:41
asdf_asdf_asdf
No, I want type function like (get-type/signature-func 'func2).
22:26:39
no-defun-allowed
So you want to get the type of a value?
22:26:41
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_tp_of.htm
22:29:03
phoe
asdf_asdf_asdf: what is get-type/signature-func?
22:29:45
asdf_asdf_asdf
Derived type of SB-ALIEN::ALLOC-TMP is
22:30:19
asdf_asdf_asdf
I must write (values (member func2) &optional), how get this type?
22:30:32
White_Flame
if I understand this correctly, 1) you can with implementation internals, and since that's the case, 2) are you sure you need that info?
22:31:24
asdf_asdf_asdf
What I should put into type instead int (signed-byte 32)?
22:31:37
phoe
judging by what you say you must do in order to keep on writing lisp, you are likely doing something horribly wrong now
22:31:45
phoe
what are you trying to do?
22:31:57
White_Flame
also, if this is a FFI question and not a plain function question, you need to be a lot more specific
22:32:18
no-defun-allowed
asdf_asdf_asdf: Can you do me a favour and avoid the FFI, and more so SBCL's FFI and its internals, until you learn Common Lisp please?
22:33:01
asdf_asdf_asdf
I learn SBCL and Common Lisp.
22:33:30
White_Flame
you should never be hitting anything SB-ALIEN: if you're just learning CL
22:33:43
phoe
I honestly have no idea how you ended up trying to write VALUES types by hand
22:33:56
phoe
and I say it's high time to backtrack
22:34:10
Nilby
For me (lambda-list 'print) -> (sb-impl::object &optional stream)
22:34:40
Nilby
First thing I tried to write in CL was an implementation independant FFI.
22:35:05
phoe
so basically a UFFI and/or a CFFI?
22:35:30
Nilby
Yes. It was before CFFI was written, and UFFI didn't work right.
22:36:15
Nilby
It was both hightly educational & highly boring & frustrating.
22:37:38
Shinmera
highly boring and frustrating is how I feel every time I do FFI
22:37:51
Shinmera
eh, whatever, you get what I mean. I'm off to bed.
22:48:59
cl-arthur
How to check the metaclass of an object? And how to check whether an object is an instance or a class object?
22:50:36
no-defun-allowed
A class is an instance of a class (circular much?) by the way.
22:50:41
phoe
metaclass == class of class
22:50:52
phoe
metaclass of object == class of class of object
22:50:57
no-defun-allowed
You said it even; the metaclass is...that.
22:51:26
phoe
;; also, all class objects are instances - no-defun-allowed mentioned that up there
22:51:37
phoe
;; so you might want to double-check your nomenclature
0:04:50
Lord_of_Life_
** NICK Lord_of_Life
Wednesday, 22nd of January 2020, 4:14:31 UTC