freenode/#lisp - IRC Chatlog
Search
18:51:51
jeosol
I am sure this has been said enough. This place is like a hive of connected brains. Problems getting resolved quickly and also, you are getting multiple ideas and gotchas. What's there not to love
18:52:22
jeosol
I am singing to the choir, but with suggestions here over last few weeks, my code is more stable
18:54:26
fourier
jeosol: why dont you just precompute a series of number and run on it until you get some stable results?
18:57:04
jeosol
I am running an optimization problem with > 1000 variables per solution and like 30 solutions per iteration.
19:00:55
jeosol
So I just live with that approach for now. As per stability, for small problems (not expensive computationally), I perform multiple runs and average the results.
19:01:21
jeosol
with SBCL, the code is pretty fast the bottleneck is elsewhere. My current pain is instrumenting code for re-runs
19:11:20
ecraven
is there a way to print a custom "banner" in SLIME from the swank? it just says '; SLIME 2.20', but nothing about the actually connected lisp (only in the buffer name, but I'd love to see the actual lisp somewhere up there on connecting)
19:16:58
sea
Is there a way to tell lisp that a particular function always returns the same value, and can be compiled away?
19:17:15
ecraven
phoe: yea, but I'd love to see it somewhere up top too. I guess I'll have to add some :write-string somewhere to just show it that way
19:18:02
sea
(defun bar (x) (+ x (foo))). How can I make it evaluate that foo once, and store 42 in bar instead?
19:22:08
sea
I have a macro that compiles code to lisp, and I have a function I'm defining with one of those macros in it. I realized that every time I run the function, it re-compiles the code in it for no reason, and I wanted to avoid that
19:28:56
ealfonso
how can I avoid an undefined variable warning when using (cffi:defcvar ("my_var" my-var) :int) and then referring to my-var?
19:32:57
ealfonso
Bike https://pastebin.com/H8SEkxL4 I'm simply referring to the defcvar variable with setf
19:33:48
Bike
ealfonso: i believe defcvar is intended to be used at top level. the compiler won't be aware of the definition while compiling init-lib.
19:35:24
Bike
since defcvar just establishes a symbol macro it's largely pointless to do it at runtime, anyway
19:39:27
pierpa
sea: maybe you can do the computation at read time? (defun foo (x) #.(compute-something x))
19:40:16
sea
That's just the example code. I wanted something slow to take up time, so I could figure out if the macro was being run at compile-time or run-time
19:41:00
Bike
if you just evaluate it it could go either way, but in most implementations now it'll still be expanded just the once.
19:46:17
sea
Hrm, it's still slightly slower than it should be. I took the macro bit out altogether and put it as a global variable it can reference
19:51:25
sea
Maybe it's down to how I write my macros? Is there a better way to do this: (defmacro foo (x) (list 'quote (f x))) ?
19:55:53
ealfonso
any idea why something simple like this causes my sbcl instance to run out of memory and crash when it works fine in C: (cffi:with-foreign-object (g :pointer) (cffi:foreign-funcall "my_alloc_new_very_small_struct" :pointer))
20:12:23
ealfonso
Bike I was calling a binary function with zero args, so there was probably uninitialized data causing a huge malloc
20:59:14
Xach
rme: Sorry to bug you, but ccl.clozure.com is not working for me - what does :SHARED mean in make-hash-table?
21:01:02
Xach
rme: Trying to adapt some sbcl code which uses `:synchronized t` to mean "concurrent writers are safe", so that's my real question - how to get safe concurrent writers for ccl hash tables.
21:04:16
rme
They use a lock-free algorithm which is good for typical access, but slower for rehashing or growing the table.
23:33:53
jasom
Any hints for a fully-remote slime debug; I can connect to slime remotely and use tramp for opening the remote files, but do I need to do anything to get them all to play nicely together?
23:34:13
jasom
also if someone has a script for setting up a slime-over-ssh tunnel easily that would save me some time
0:16:39
cgay
Somehow never saw this before. Fun read. https://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf
5:29:37
drmeister
::notify shiho Pull the latest clasp 'dev' and start building it again. I had introduced a problem in the previous version that only showed up when building quicklisp. The new 'dev' fixes it.
6:14:59
phoe
before I connect to the slime, I mount my Lisp projects directory using sshfs on the same location, so /home/phoe/Projects/Lisp/ refers to the same directory with the same contents both on the remote machine and the local one.
6:15:28
phoe
this way I avoid problems with translating names from local to remote ones, because they are the same.