freenode/lisp - IRC Chatlog
Search
14:29:27
opfez
does anyone have experience with cl-sdl2 on raspberry pi? can't get it to compile because it fails trying to run c2ffi
14:30:53
phoe
check the inferior-lisp buffer and/or the REPL, it should contain either the c2ffi invocations or c2ffi error messages
14:31:24
phoe
in the earlier case, you'll have a shell command that you will be able to repeat yourself in a terminal, and you'll get the error messages
14:34:08
opfez
yep, tried running that. the 8.0.1 part is wrong which i replaced with my actual clang version, still didn't work
14:39:58
phoe
weird, I can see that the C-INCLUDE form is supposed to include stdint.h which has these C type definitions.
14:53:20
opfez
in addition to this, i manually went into the sdl2 include file and added a #include <stdint.h>, didn't work either
16:27:39
splittist
How do I programmatically create a NaN (Not a Number) on those implementations that support them? Alternatively, what would be good libraries to look for such an answer?
16:50:51
jackdaniel
scymtym: the regression was caused by the fact that normalize-keyboard-physical-gesture tries to enforce a fixed set of keywords
16:53:02
jackdaniel
during upcoming days there may be few more regressions (most likely due to my screw ups)
17:27:01
splittist
Bike: yes. I'm looking at nan.lisp (which does not seem to be part of the system)
17:34:35
splittist
It works! (Underlines previous note to self: when looking for libraries start with Shinmeraware)
17:59:12
splittist
I confess I am too stupid to know how to use the nan constants in a function (without sbcl complaining about an invalid comparison)
18:18:37
scymtym
jackdaniel: yes, for some of the commits, cherry-picking will not work without adaptations
18:52:44
Krystof
then sb-kernel:make-single-float <bits> (and sb-kernel:make-double-float <bits> <more bits>)
20:34:39
makomo
the closest i got so far was using get-setf-expansion and then checking if the setter form is of the form (funcall (setf <something>) ...) and checking whether (setf <something>) is fbound, because calling (setf <something>) is the fallback if no setf expander exists
20:35:03
makomo
the only problem i see with this is the fact that the setter doesn't necessarily have to be of the form (funcall (setf <something>) ...), but it could still perform the same job
20:39:42
Bike
yeah, that's about the best there is, probably. why do you need to know if something is a place?
20:45:12
makomo
Bike: i was writing a small dsl that allows me to define functions with various parameter passing strategies (call by value/reference/const/result/value-result/name) and somewhere along the line i needed to know whether to generate a (setf <something>) for an expression, depending whether it's a place or not
20:45:48
makomo
it also allows me to report a nice compile-time if you pass in expressions that aren't places for e.g. the reference passing strategy
20:48:22
makomo
hm, why regardless? i would get something like that if i didn't include my check for whether the form is an actual place
20:48:45
makomo
it would blow up somewhere inside the generated macro and be really confusing, which is why i wanted to handle it before it ever got expanded
20:50:43
makomo
ahh, good point i guess. so the first form would be something like (my-macro ... (foo ...) ...)?
20:52:25
phoe
the latter would work fine, the former looks weird because macroexpanders must be idempotent
20:53:16
makomo
during macroexpansion is when my PLACEP would be called, but the setf expansion would be present in the expansion of my-macro somewhere
20:53:43
phoe
looks like a case of "if it ain't broken, don't fix it" simply because the place can be defined after your PLACEP is called
20:54:55
makomo
does sbcl normally generate a warning in such a case? when you're using a function before it's been defined?
20:55:21
phoe
I mean, if you explicitly require that all places must be defined before your macro is expanded, then your PLACEP is going to work and be useful
20:56:13
makomo
speaking of caveats, there's a peculiar thing that i noticed in jensen's device https://en.wikipedia.org/wiki/Jensen%27s_device
20:56:45
phoe
also (progn (defun (setf foo) ...) (my-macro ... (foo ...))) - is this going to work without an EVAL-WHEN around the DEFUN?
20:58:00
makomo
regarding jensen's device: the parameter k that's passed by value is weird, because it's also used within the syntax of the for loop construct to introduce a binding that's not really called k
20:58:45
makomo
or rather, the for loop construct is weird, or maybe just the whole call by name strategy in algol
21:00:09
makomo
i'm aware of the "capture-free substitution (copy) rule" that's used to define call by name, but it's still weird to me that the k gets substituted in that context, because you would think it's part of the for loop's syntax, and not in a place that's to be "evaluated"
21:00:54
phoe
like, FBOUNDP on (setf foo) returns NIL even if DEFUN (SETF FOO) occurs earlier in the same PROGN
22:40:27
copec
I've previously only done math things in CL as a hobby, but I'm trying to interface with Plesk panels that I manage for my work
22:41:53
phoe
the naïve way would be to use emacs with some sorta xml-mode since a schema is just an xml document
22:42:23
phoe
a more involved way would be to try and convert that into s-expressions and/or a nested Lisp object mayhaps
22:44:09
copec
They have them rendered as .svg's but without a legend or anything, I guess I can look at the actual .xsd files and lookup what the tags mean in the branches
22:45:22
copec
I have two initial thoughts on implementation, simple functions that wrap the stream with tags, but it would be neat to figure out a macro to write a defclass hierarchy from the xsd