freenode/#lisp - IRC Chatlog
Search
1:50:57
pjb
defunkydrummer: you can define accessors for condition slots, just like any slot in CLOS classes.
1:52:45
defunkydrummer
probably. in this case the class was defined by a lib, and you couldn't access the slots using slot-value, etc.
1:52:59
pjb
Using with-slots or slot-value is not a good idea anyways, because slot-value accesses the slot directly, without the mediation of the accessor methods that could be overriden for subclasses.
2:36:28
krwq
hey, i got around 2M strings which have assigned id - is there some library which would allow me to lookup quickly? when I've tried hash-table it exhausted heap
2:37:41
krwq
strings are urls and prefixes are reasonably similar - perhaps some prefix tree or something?
2:45:26
neeasade
hi again all. I'm using a lib with some cffi and when I load it in quicklisp, I get a failure building grovel types? https://pastebin.com/raw/u6vNT0y5
2:52:00
krwq
beach: I've (setq inferior-lisp-program "sbcl") (setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "4096")))) - but (sb-ext:dynamic-space-size) still shows 1GB, am I doing something wrong?
2:54:40
krwq
pjb: will try ccl if can't get it to work with sbcl (although expecting couple of things to break since I've never tried it before)
3:02:43
White_Flame
How can I have quicklisp show compile-time warnings when loading a local-project?
3:07:17
White_Flame
just got finished debugging a nasty compilation order bug, where first-time load would have shown compilation warnings
3:11:36
aeth
It's verbose for *every* project so if there's something that's really noisy (like UIOP) you have to manually load it first, not verbose, just to silence it
3:13:22
aeth
(UIOP gives a lot of redefinition warnings because of its with-upgradeability and similar macros)
4:00:50
pjb
White_Flame: loading a project is not compiling it. It cannot provide compile-time warnings, because it doesn't save them!
4:01:54
pjb
White_Flame: if you want to compile the project, then note that ql:quickload does not have a :force-compile option. I usually just rm -rf ~/.cache/common-lisp …
4:02:29
pjb
White_Flame: I would find it a nice feature, if indeed, ql did save the compilation error and warnings, and produced them each time the system is loaded…
4:03:34
White_Flame
I guess the proper solution is for QL to distinguish "I am using this as a library" vs "I am developing this" roles under local-projects
4:04:45
White_Flame
or maybe an indicator in an .asd for "debug mode" that doesn't muffle the output
4:05:15
pjb
White_Flame: you don't understand. It doesn't muffle anything. It doesn't compile at all!
4:06:10
White_Flame
pjb: I guess your development cycle is not mine, if you never have compiles invoked by ql
4:07:08
pjb
Or you need to modify a root file in your dependency graph. But most system have rather flat dependency graphs.
4:07:29
pjb
The point of the asdf dependency graph is to make sure you compile only ONE file after you modify it.
4:29:46
aeth
pjb: For recompiling, it's easier/faster just to modify a "base" file that everything else depends on (obviously it will depend on the structure of the project in question), triggering a full recompilation of the project in question (though probably not its dependencies)
4:31:25
pjb
Easier, I don't know. But you could write a lisp function to search all the root files of an asdf system and do that. Call it (recompile-system :foo)…
4:46:26
aeth
I guess I structure things very differently, which is why I probably will wind up having a core/conditions.lisp just like I have a core/constants.lisp and a core/settings.lisp and you can probably even count utils/utils.lisp (and the other utils)
7:54:17
flip214
White_Flame: you can always just touch the .asd file, this causes recompilation - and will give you all the warnings anew
8:07:40
White_Flame
flip214: the main thing was what :verbose t gave me, not actually triggering the recompile
10:47:02
TheWild
#' just gives a reference to function/macro instead of executing it or using as variable. Can the #' itself be referenced?
10:58:23
phoe
but they don't expand into code like macros - in a way, they are the implementation's primitives
10:58:57
phoe
(it is permitted for an implementation to define a special operator as a macro, but it's not common to see an implementation that does this - I am not even aware of one)
11:09:50
makomo
but iirc it just expands into a non-standard special operator %HANDLER-BIND or something
11:11:11
makomo
TheWild: every comma has to have its matching backquote. you can't have a "lonely comma". further, the backquote is just a reader macro that expands into an *implementation-defined* form which upon evaluation constructs the list according to the template
11:15:42
Bike
i think clisp has a special operator of some kind for handler-bind, or maybe handler-case
11:17:10
Bike
https://clisp.sourceforge.io/impnotes/instr-set.html#instr-handler this is what i'm thinking of
11:18:10
no-defun-allowed
TheWild: by the way, you have the character comma in your list, not a quasiquoting comma
11:20:35
TheWild
I want (eval x) to evaluate into list (+ 1 5), but the part (+ 2 3) shouldn't be evaluated when in a list. Only when put into eval.
11:26:47
makomo
Bike's (list '+ 1 (+ 2 3) evaluates to the same thing that `(+ 1 ,(+ 2 3)) evaluates to
11:30:10
makomo
since the backquote syntax (reader macro) just stands for (expands to) some implementation-defined form, it is a Lisp form like any other, and can be quoted
11:45:05
TheWild
I wanted to ask how to convert a string into a symbol, put pointed out that it's (make-symbol "string")
11:45:09
didi
Where can I read about the effect of the built-in method combination types (+, and, max, progn, etc) on HyperSpec?
11:53:55
no-defun-allowed
TheWild: MAKE-SYMBOL makes an uninterned symbol, which means it has no package and is printed with a #: prefix
11:54:28
no-defun-allowed
also, 'FOO will use the package used at read time, INTERN will return a symbol in the current package
13:09:00
TheWild
darn, I tried to construct an evaluable list like there was no syntactic sugar in Lisp
13:09:07
TheWild
(LIST (INTERN "LET") (LIST (LIST (INTERN "X") 5)) (LIST (INTERN "*") (INTERN "X") (INTERN "X")))
13:23:11
phoe
quote is the most basic Lisp operator ever if you ever want to use raw literal data in Lisp
13:27:33
TheWild
I keep forgetting that when a list is quoted like here: '(((1 2) (3 4)) ((5 6) (7 8))) all the sublists are automaticallly quoted too