freenode/#lisp - IRC Chatlog
Search
3:37:30
aeth
jcowan: SBCL is in the language benchmark game (roughly around the speed of Java there) so if someone who knows how to write Chez well wants to, that might give some data
3:43:45
jcowan
there is a port to Scheme, but it only works on chibi and gauche, which are Scheme bytecode interpreters without JIT
7:42:38
eviltofu
The reason I asked is because I have several CLOS classes which I use HAS-xxx to describe them. Has-identity, Has-tags, Has-connections, etc. Then I use composition. So sometimes it gets a bit confusing to use has-identity-identity for accessing a slot.
7:44:26
beach
It looks really strange when you do that in subclasses, for instance (sheet-children pane)
7:44:49
beach
I think it is preferable to have more packages instead, and just don't use the prefix.
7:46:28
beach
Also, the HAS- convention looks strange. A person would be what? has-name-and-address-and-telephone-number-and-social-security-number?
7:47:16
eviltofu
For example when I create a network node class (defclass node (has-identity has-connections has-properties) … )
7:49:58
beach
IDENTITY is strange because you have to shadow it so that it would be the Common Lisp symbol.
7:52:04
beach
(defpackage my-stuff (:use #:common-lisp) (:shadow #:identity) (:export #:identity ....))
7:52:46
beach
It means that there is a symbol named IDENTITY in the MY-STUFF package and that symbol is distinct from COMMON-LISP:IDENTITY.
8:22:33
fiddlerwoaroof
I just realized that I can use (eval-when (:load-toplevel) ...) to make fasls that automatically load their dependencies
8:32:23
fiddlerwoaroof
I guess this eval-when trick isn't very useful, since most lisps don't have a stable fasl format, but it could be useful if you want to ship an application with a bunch of dynamically loaded modules: you'd build a base image with only your application in it and then use that image to compile all the modules to fasl files and put them in a well-known location, you could avoid putting all the module dependencies in your .asd
8:50:18
pjb
Yes, documentations are often intimidating. That's why it's better to avoid them altogether.
8:51:31
fiddlerwoaroof
Yeah, I usually just read the code when I want to figure out how to use a library
8:52:23
fiddlerwoaroof
I'll occasionally look at a readme and/or a sample application, but I find it's often easier to look at code and/or docstrings in emacs than it is to try to understand the library's documentaiton
8:53:28
Shinmera
Trying to understand what other people's code is supposed to achieve is far from trivial for almost anything.
11:28:02
r___
I see the function sb-thread:symbol-value-in-thread and the variable sb-debug:*in-the-debugger*
11:30:37
phoe
r___: you could theoretically try interrupting it with (lambda () (symbol-value 'sb-debug:*in-the-debugger*))
11:30:51
phoe
if you want to risk interrupting threads, that is... which *might* be feasible if it's in the debugger anyway
11:31:11
r___
But in trying to use it on a thread which executes a division by zero & is in the debugger, I get an error indicating that the symbol has no thread local value
11:35:45
r___
right. I'm looking to see if someone knows (or has experienced this situation) under what conditions this variable is set & how is my understanding of it & of the function to test it in the context of a given thread is wrong
11:38:45
flowerdts
hey guys I was wondering if there is a way to have a (case) with multiple keys? My code is here https://pastebin.com/KZQBNcTe It's supposed to be a wine expert System :)
11:45:25
fiddlerwoaroof
flowerdts: you should format your code, it's really difficult to read unformatted lisp code
11:49:57
fiddlerwoaroof
flowerdts: case uses EQL to compare the key to the various case clauses, so there's no way to use case unless you're using a type that works appropriately with EQL
11:50:51
fiddlerwoaroof
flowerdts: however, alexandria has destructuring-case that looks like it might do what you need
11:52:55
oleo
The value of a variable may be unavailable to the debugger in portions of the program where Lisp says that the variable is defined. If a variable value is not available, the debugger will not let you read or write that variable. With one exception, the debugger will never display an incorrect value for a variable. Rather than displaying incorrect values, the debugger tells you the value is unavailable.
11:54:41
fiddlerwoaroof
flowerdts: well, one thing you could do is put the output in a hash-table with :test #'EQUAL and then printing the result of getting a list from the hash table
11:55:13
fiddlerwoaroof
e.g. your case statement would turn into something like (format t "~% ~a" (gethash (list color grapes) *choices*))
12:01:16
fiddlerwoaroof
you might read this chapter of pcl to familiarize yourself with the way lisp accessors work: http://www.gigamonkeys.com/book/variables.html
12:01:48
fiddlerwoaroof
This is explained in the section of that web page beginning "generalized assignment"
12:40:56
fiddlerwoaroof
A mac app in pure lisp, with a tiny ffi shim: https://github.com/fiddlerwoaroof/objc-lisp-bridge/blob/master/demo-app.lisp
12:47:10
fiddlerwoaroof
Yeah, I tried that route, but didn't feel like figuring out a couple issues I ran into
13:19:29
Shinmera
Matlab and Fortran are the only two major languages I know of that use column-major.
13:24:01
Shinmera
The quote does not "make a list". It returns a literal, which happens to be a list.
13:59:23
pjb
Bike: if you show (list (list …)) for :initial-contents, you should mention to the naive newbie that this allocates a cons-based copy of all the data at run-time. It would be better to (setf (aref m 0 0) dead (aref m 0 1) dead …) (possibly writting a macro to do it nicely).
14:43:37
dmiles
hrrm i wonder how bad it'd be if i left (class-of :kw) returning #<BUILT-IN-CLASS KEYWORD>
14:48:42
dmiles
of course they the class named KEYWORD is a subclass of class named SYMBOL so it wont hurt
14:50:00
dmiles
also the distinction is in my impl of keywords they are constantp and the symbol-package, symbol-vlaue and symbol-function all go to the same code
15:03:53
dmiles
*nod* well thanks .. updating my impl and might even need to update the work impl https://sourceforge.net/p/larkc/code/HEAD/tree/branches/LarKC_CommonLisp_Extensions/platform/src/com/cyc/tool/subl/jrtl/nativeCode/type/symbol/SubLSymbolKeyword.java#168