freenode/#lisp - IRC Chatlog
Search
9:59:24
phoe
On SBCL: (trace (setf config)) ;;=> WARNING: (SETF CONFIG) is not a valid function name, not tracing.
10:06:18
Shinmera
It's been a while since I implemented it, but I remember discussing the available options at the time and coming to the begrudging conclusion that a SETF "pre-processor" is the best way to go
10:06:55
Shinmera
It was something about the SETF facility not giving you access to a variable amount of multiple values, which I needed.
10:07:06
phoe
AFAIK needs to be a custom one because of how Qtools hacks around the reader - only the symbols requested by the client code are generated, et cetera.
10:09:33
Shinmera
Essentially (setf (q+:size foo) (values 400 500)) is read as (setf (q+ set-size foo) (values 400 500)), so in that case it needs two values, but let's say (setf (q+:rect foo) (values a b c d)) needs four and so forth.
10:10:35
Shinmera
Anyhoot, the SETF wrapper turns that into (q+ set-size foo 400 500) or whatever else depending on the VALUES form.
10:11:34
Shinmera
You might think I could just specify like a hundred values or something expecting that no function call will ever need that many, but then you also never get any information from SETF about which values were actually passed and which weren't, so you can't compose the proper call.
11:01:09
makomo
jasom: regarding that cl-json hash table thing from yesterday, are you sure that works?
11:01:35
makomo
because i keep getting an error from the internals of cl-json when the body of my *beginning-of-object-handler* is run
11:13:01
beach
I just hate that kind of error message. It contains absolutely no information that is of value to even the most novice Common Lisp programmer.
11:13:29
phoe
Haha, I just got hit by a similar message an hour ago and spent thirty minutes debugging it.
11:14:23
Shinmera
Rust's compiler is pretty nice about error messages, but I don't know if you could replicate that kind of experience for run-time errors.
11:14:32
makomo
jasom: yup, my bad. i delayed the writing of your "to-keyword" and in *object-key-handler* just forwarded the call to the original handler, but that makes no sense because that handler expects all sorts of internal state to be already built (set up by *beginning-of-object-handler*, etc.)
15:22:35
Xach_
Shinmera: i'm having an odd issue where i can't build qtools from a warm fasl cache due to VERBOSE symbol issues. i suspect it's a case where something builds the fasl with :verbose but then a subsequent load of the fasl is done without verbose.
15:49:04
Shinmera
fe[nl]ix: In this case they just provide some debug info if a logging system is present
15:49:39
fe[nl]ix
since Quicklisp makes it easy to download all dependencies it makes no sense to resort to that kind of optimization
15:50:13
Shinmera
fe[nl]ix: I don't want to force a dep that launches threads and stuff onto people that don't need it.
16:41:31
antoszka
Guys, trying to fire up sbcl in shell with linedit (which I do sometimes, nvm the reasons), I'm now getting: http://wklej.org/id/3330582/ ← any hints where to look for problems? madeira-port quickloads without any issues in Slime.
16:46:24
makomo_
what does "expanded" mean in "If the backquote syntax is nested, the innermost backquoted form should be expanded first."? http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm
16:54:32
makomo
Zhivago: so "expansion" here refers just to the process of "substitution". whether any substitutions are made or not is a matter of the level of quoting/unquoting done, right?
16:55:15
makomo
for example, ``(,,a2); (,a2) is the "innermost backquoted form" but the substitution process doesn't actually substitute any values
16:56:15
makomo
true, but i thought "substitution" is somehow more clear, however "substitution" is also used only once on that page
17:08:46
rpg
Does anyone know how to refer to the currently inspected object using slime-inspector-eval?
17:09:12
rpg
The docstring isn't very helpful: "Evaluate an expression in the context of the inspected object."
17:50:35
peterpp
I'm new to lisp and am about to use s-expressions for the first time as a configuration file format... I'm wondering if there's anything I should watch out for
17:51:17
peterpp
my understanding is that using s-expressions for this purpose is a rather common thing to do?
17:58:47
shka
it is not urgent, just regarding documentation-utils -- i think that we don't connect perfectly
17:59:21
peterpp
ebrasca, do you happen to have an example of a config file that uses s-epxrs that you could show me?
18:02:05
Xach_
Shinmera: hmm, it's not sufficient just to rebuild qtools with fresh fasls, it seems that other projects that require qtools will trigger the fasl symbol issue.
18:03:04
peterpp
oh man I had no idea stumpwm is so well maintained... I just looked at the recent commit history on github
18:03:41
sjl
peterpp: if you're using READ to parse the config file, be aware that it can execute arbitrary code, e.g. (:username #.(run-program "rm -rf /")
18:04:36
peterpp
no, just generally wanted to take inspiration from config file formats that rely on s-expressions
18:05:40
sjl
so if you want to use untrusted config files, you'll probably want something like cl-secure-read
18:07:04
__sigjuice__
.swank.lisp is another example that comes to mind. https://common-lisp.net/project/slime/doc/html/Other-configurables.html#Other-configurables
18:12:43
__sigjuice__
peterpp: my imagination should be considered very limited, but I can't envision needing anything more complicated than a pile of special variables
18:33:25
sjl
I've looked at Shen a little bit, but the development environment isn't nearly as mature as something like CL+Slime
18:34:45
jasom
makomo: cool, also note cl-json ships with two different ways of generating keywords from strings, one of which will refuse to intern new symbols (which is good if you're concerned about someone sending you a billion different keywords to use up all your server RAM)
18:37:48
peterpp
I'm struggling with how lisp-mode indents my source code: https://gist.github.com/anonymous/d87c3cf2a2c4fc85e0ee60b12e71f183
18:39:37
jasom
peterpp: that would be code that is calling the function named :foo with the arguments :bar :baz :boom
18:42:20
jasom
though I'm not in pure lisp-mode, I'm running slime, I don't think it makes a difference for this case, but I can try in a bit
18:42:38
peterpp
hmm for me lisp-mode still indents the wrong way... good to know it works on your machine though, I guess I messed something up
18:46:02
jasom
hmm, bare lisp-mode does seem to do it the way you see (e.g. *scratch* indents my example wrongly)
18:46:08
parjanya
parjanya: I’m a newcomer (too?), but I’ve seen a good chunk of that attitude of melancholia and lack of interaction with other people
18:51:41
jasom
peterpp: don't worry about it. That sounds like a problem with emacs or slime. If you figure out how to reproduce it, let me know
18:54:52
jasom
parjanya: Taver's essay is problematic, if for no other reason than that the symptoms described are not bipolar.
19:00:33
peterpp
I must say... you folks are a lot more enjoyable to talk to than the folks I met in most other programming-related irc channels
19:04:05
parjanya
jasom: yes, it’s quite an imprecise use of the term... I don’t know enough about lispers to say anything meaningful, but I know plenty of the kind of people he describes, from school on
19:06:11
mlau
: don't worry about it. That sounds like a problem with emacs or slime. If you figure out how
19:20:17
makomo
jasom: mhm, i remember you mentioned that. however, cl-json:*identifier-name-to-key* isn't mentioned anywhere in the docs
19:20:33
makomo
the variable holds the function which turns a string into an object that will be used as the key
19:21:28
makomo
there's just a little note somewhere about JSON-INTERN and JSON-SAFE-INTERN, but no mention of how to actually swap one with the other (or use your own version)
19:21:53
makomo
i.e. *IDENTIFIER-NAME-TO-KEY* isn't documented, at least not in https://common-lisp.net/project/cl-json/
19:22:48
pjb
You can measure how bad a system is by measuring how much it's talked about in help channels. JSON is very bad. Why don't you just use SEXPS?
19:23:28
makomo
well, the data i pulled from the web is in JSON, so i have no other choice right now
19:23:42
makomo
however, i was thinking of switching the data over to either sexps or into an SQL database