freenode/#lisp - IRC Chatlog
Search
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
13:51:30
pjb
TheWild: the thing is that lisp syntax is not lisp. backquote and comma, but also parentheses, spaces, double-quotes, etc, are not lisp things.
13:51:48
pjb
TheWild: for example, (first '(a b c)) #| --> a |# shows that there's no parenthesis here!
13:52:39
pjb
TheWild: similarly, backquotes and comma don't exist in lisp. They're characters that are used by the lisp reader to build a lisp sexp, ie. a tree of conscells and atoms.
13:53:18
pjb
TheWild: the characters are in the source text; the conses and atoms are in lisp, they're lisp objects. The readers creates the lisp objects from the characters.
13:55:48
pjb
TheWild: now, this may be a little confusing, because some reader macro and translated to some specific lisp expressions. For example 'x is read as (CL:QUOTE x) #'x is read as (CL:FUNCTION x) But ' is not CL:QUOTE. ' is actually the character #\' in the source text; CL:QUOTE is a symbol in the lisp image.
13:56:34
pjb
TheWild: you cannot have a comma alone in the source text, because it will signal an error when read outside of the context of a backquote.
13:56:51
pjb
TheWild: You could override the reader macro for the comma, and make it read as something.
13:57:31
pjb
TheWild: or you can read a comma character #\, a comma string ",", or a symbol named ",": \, or |,|.
13:58:59
TeMPOraL
a question: is there a portable-ish CL way to ensure an array of data has items contiguously in memory (as opposed to getting an array of pointers to objects)?
13:59:31
TeMPOraL
i.e. I'm looking for CL equivalent of C: struct foobar { some stuff }; foobar array[123];
13:59:33
Xach
TeMPOraL: i don't think anything is specified about memory layout of arrays in that way
14:01:11
TeMPOraL
Xach: a portability layer over specific implementations (SBCL and CCL) would work too; I wonder if anything like this exists
14:01:38
TeMPOraL
I see that in SBCL one could abuse the "alien" interface to do that, but I worry that bookkeeping will kill performance gains if I wanted processing of the data to happen on Lisp side
14:11:18
_death
if the items are octets/words/floats, it's possible that a specialized simple-array would work
14:16:26
beach
TheWild: Common Lisp was designed so that it could be compiled to fast native code, unlike some modern so called "scripting languages" designed by people who don't have a clue about language design or compilation techniques.
14:16:56
beach
TheWild: If EVAL could make use of lexical variables that way, there would be very little a compiler could do to optimize the code.
14:52:32
beach
TheWild: So "is" is ambiguous. Do you mean "as typed" "as read", or "as evaluated after being read".