freenode/lisp - IRC Chatlog
Search
17:28:21
dlowe
and in that case, it would be legal, but still inadvisable, since it's clearly intended to be constant-ish
17:46:44
_user
does anyone know of a common lisp docstring documentation generator that works with org-mode markup, other than this one: https://github.com/jphmrst/cl-org-sampler
18:33:46
butterthebuddha
"The ~t directive is for tabulating. The ~10t tells FORMAT to emit enough spaces to move to the tenth column before processing the next ~a. A ~t doesn't consume any arguments."
18:39:43
malice
I believe it inserts at least 1 space, and at most enough to get into the nth column
20:20:01
malice
I have something like #<someobject>, but when I press C-c I in there I get error about illegal sharp macro character
20:44:41
gnuhurd
hi, if I have a function that setf's a variable, and I want to return the variable at the end, can I use eval? will it pose any risks? if not, what should I do to return it?
20:47:34
Xach
the value of the last form evaluated in the function is what gets returned. and evaluation is "automatic" in this context.
20:50:39
jasom
are there any decent refactoring tools for lisp (e.g. rename a lexical binding)? I currently make do with find/replace but that seems slightly awkward for some code.
20:51:17
Xach
jasom: there was redshank, but i never tried it and i think it was pretty limited in scope.
20:51:26
jasom
other things that would be nice to automate is: turn this block into a defun, with parameters named the same as all externally-bound values referenced in the block
20:52:22
jasom
(let (foo) (let (bar) (baz foo bar))) <-- e.g. it would be nice to be able to turn the (let (bar) ...) into (defun _CURSOR_ (foo) (baz foo bar)) at the toplevel somewhere
22:30:13
malice
How do you declaim type of &key arguments? (declaim (ftype (function (first-arg ???) return-type) func-name))
22:38:10
axion
malice: Keyword arguments are slower than regular function arguments. If you are trying to provide type annotations to the compiler for optimization purposes, might just want to use regular arguments if speed is important.
22:38:51
basket
malice: You can normally look at things like that by asking Lisp to describe things, eg after (defun f (&key x) (declare (fixnum x)) x), (describe #'f) on SBCL tells me the derived type is (FUNCTION (&KEY (:X FIXNUM)) (VALUES FIXNUM &OPTIONAL))
22:49:55
slyrus
is there a dedicated channel to lisp web stuff, particularly caveman/clack/ningle/lack/etc...?
1:36:03
lerax
Pipelines in Python: https://gist.github.com/ryukinix/1e99bac3d49f81f006c620d102675e16 :v
2:52:43
eeyyy
Hey i just started learning this a week ago and i put in the code (defmacro unless (condition &rest body) '(if (not ,condition) (progn ,@body))) and got an error. Anyboody know what i did wrong?
2:58:31
Bike
you'll probably get a complaint for trying to redefine the CL macro "unless", so give it a different name.
3:21:56
emaczen
If I run (sb-thread:make-thread ...) in a loop, will the threads be running concurrently?
3:43:19
loke
emaczen: It also depends on what they do. If each thread is using 100% CPU, then obviously there is little benefit of starting more than the number of threads in the CPU (where by "cpu thread" i refer to "virtual" cpu's, = cores*hyperthread)
3:43:54
loke
Once you start nmore than, say, 20Ă—the number of cores in the machine, you'll start to feel it.
3:44:16
loke
If, on the other hand, the threads are mostly idle, you can easily start thousands without any problems.
3:47:07
loke
emaczen: Um... no. I doubt you'll be able to run any program in eshell that uses terminal controls.
3:48:49
loke
I seem to recall there is an emacs package that does something similar to top, in a buffer?
3:50:01
malice
emaczen: if you just want to check how many cores you have though, nproc is more than enough
3:51:14
loke
That saiid, I figured that emaczen also wanted to monitor CPU load during his threading examples.
3:53:08
malice
also, if you have some simple task that you just want to parallelize, GNU parallel is also a good choice