freenode/lisp - IRC Chatlog
Search
4:36:50
no-defun-allowed
drmeister: I have ABCL running as a Minecraft (Forge) mod, but I haven't a clue how any classes work, nor how to use Java or the Java FFI.
5:07:58
no-defun-allowed
well you can use Atom but I don't know if it has the SLIME inspector, debugger, all that jazz
5:08:50
AndrewYoung
Yeah, the plugin looks like it is a work in progress, so some things might not work right.
6:00:57
wooden
when asdf fails to load my project the backtrace in slime is all about asdf -- no links to the code of mine that actually failed to compile. is there a way to jump to the code that failed to load via asdf? the best i've found has been to go back to the sbcl repl and search the buffer up for "error", but sometimes there is no error.
6:04:01
flip214
in CFFI, is there a way to get automatic translator functions (from eg. an alist or a plist) to the foreign type?
6:04:41
pjb
flip214: yes. Write a library of such automatic translator functions, publish it, and then use ql:quickload to get it!
6:07:28
wooden
beach: it says that it failed compiling one of my source code files, but then every level of the stack is all about where asdf failed in *its* code
6:09:35
beach
I understand your problem. Welcome to the mediocre tool support for free Common Lisp implementations.
6:12:41
flip214
pjb: reading the source reveals that (cffi:defcstruct (name :conc-name my-struct-name-) ...) does 99% of what I need... why is that not in the documentation?
7:22:14
thijso
Annoying! The machine I run IRC on has a sdd with I think a loose connection on the board where the cables are, so randomly it dies because the HD gets lost. Trying not to bump my desk too much...
7:25:57
sindan
I'm loading a value from a place that might not exist; in order to implement a defalu value, is there any practical problem to writing (or val 0) instead of (if val val 0), "val" being the expression that might be nil? The expression is long so it's best to not have to write it twice.
7:27:48
beach
sindan: Semantically, you can write (or val 0), but you are sending the wrong message to the person reading your code.
7:29:09
beach
That says "If val is NIL, by which I mean that it does not have the right value, then use 0 instead."
7:29:42
beach
sindan: On the other hand, it would probably be better to use "unbound" to mean "not exist".
7:31:10
sindan
beach: I agree it's not the best optimization; the program is only for myself, so I was trying to not copypaste the expression twice.
7:37:51
beach
sindan: If val can be an arbitrary expression (and therefore not an unbound variable), you should bind it to a lexical variable to avoid multiple evaluations.
7:40:24
sindan
beach: ah yes, but rather use gensym if I'm going to use the macro in several places?