freenode/#lisp - IRC Chatlog
Search
6:41:48
fiddlerwoaroof
aeth: the other alternative is to target Cocoa/Gnustep/Cocotron and interact via Objc
6:43:39
fiddlerwoaroof
I think it's feasible, although those projects aren't necessarily the healthiest. However, the Objc runtime is a bit nicer to interface with than most plain-C libraries, since the Smalltalk influence makes it a "lispier" environment.
7:24:14
phoe
fe[nl]ix: is a squash into a single commit acceptable? In case it is, that is what I've done; in case it is not, I'll work a little bit more on the commits.
8:14:58
fiddlerwoaroof
for example, when you want to get a nicer printed-format for hash-tables, but don't want to specialize print-object
8:40:33
asarch
This is what I've been looking for: http://www.crategus.com/index.php/projekte/gallery/
11:32:09
stylewarning
My FOSDEM talk had some Lisp in it, and the video is finally published: https://youtu.be/qwfMzzKJDXI
12:06:58
jackdaniel
flip214: maybe it means: function was declared to return NIL, but returned not-NIL
12:42:13
flip214
apart from doing some (FTYPE (FUNCTION (&REST T) T)) or so, which is likely to be wrong anyway?
12:46:09
pjb
flip214: yeah, declarations are bitches. Don't do them. Or like docstrings, put all the declarations in a separate file, and load it only when compiling the production code?
14:47:45
pjb
flip214: otherwise, you could write a CDR defining an API to have access to the declarations, and implement it in the various implementations.
14:51:40
pjb
Note also that this API can exist in an implementation specific mode in some implementations.
14:52:16
pjb
But probably ad-hoc. For example, IIRC, some implementations have a specific API to access the optimization levels.
15:09:21
flip214
pjb: for my usecase it might be much easier to have CFFI always generate declarations, so that previous wrong ones get clobbered ;)
16:50:19
flip214
stylewarning: be careful what you wish for... there's a lot of fuzzy testing around ;/
16:52:09
makomo
stylewarning: the readme links to https://github.com/rigetti/cl-quil, but that gives a 404? is that repo private or?
16:52:45
makomo
the readme also says the cl-quil can be found under ./src/, so i'm not sure what the link is for?
16:54:15
stylewarning
The repos used to be separate, so it’s probably just a typo that didn’t get cleaned out
17:19:48
skidd0
i'm swapping out that macro I had issues with (from yesterday) so that I don't have to call it with every database action
17:20:51
skidd0
some documentation suggests using a open-db function that has an (unless *database* (setf *database* ..))
17:21:45
skidd0
i found a thread on reddit that's helping me understand the difference between defvar and defparameter, which i believe should be used here instead of setf
17:28:11
sjl
defparameter defines a special variable and sets it to something. defvar defines a special variable and sets it only if it didn't already exist. (unless ... (setf ...)) sets an EXISTING variable to something if it's currently set to NIL.
17:29:23
sjl
You might want something like (defvar *foo* nil) ... (unless *foo* (setf *foo* ...)) to define the variable and lazily initialize it later
17:30:29
sjl
Oh, reading scrollback, I'd guess your problem is that you're not importing the *database* symbol (or using postmodern:*database* to refer to it).
17:31:32
sjl
So you're saying (unless *database* (setf *database* ...)) but *database* is just some random symbol in your own package that happens to have the same name as one in the postmodern package.
17:32:20
sjl
You import the SYMBOL *database* from the postmodern package (packages in Common Lisp are containers for symbols. you don't import a variable, you import a SYMBOL).
17:33:57
sjl
So, to back up. You have a special variable. This variable is named by a particular symbol. In your case: the symbol *database* in the postmodern package.
17:34:45
sjl
So if you want to set the variable, you have to use its name (that symbol). You can either say postmodern:*database*, or if that's too wordy to type all the time, you can import that symbol into your own package.
17:35:06
sjl
Then when you're in your package, saying *database* refers to that postmodern:*database* symbol.
17:36:08
sjl
(or :use'ed it, because :use is essentially something like `import *` from e.g. Python)
17:37:26
sjl
Well, and because if you have a function foo in your package, and then later one of the packages you :USE adds a function `foo` and exports it, suddenly your code will be redefining their `foo` function
17:37:29
skidd0
so i'll try importing pomo:*database* with the suggested (unless *database* (setf *database* ..)) and see if it still complains about unbound
17:52:04
stylewarning
ebrasca: none that I know of. Debugging them requires working knowledge of C and some skill in good abstraction
18:11:54
ebrasca
Sometimes it gives "Unhandled memory fault at #x4." istead of "Unhandled memory fault at #x0."