freenode/lisp - IRC Chatlog
Search
6:33:26
phoe
beach: regarding the shortness of the condition system, the original isn't very long either - see http://www.nhplace.com/kent/CL/Revision-18.lisp
6:36:21
phoe
the largest bloaters, size-wise, are all the DEFINE-CONDITIONs. And the largest bloater, cognition-wise, IMO, is HANDLER-CASE with its :no-error case
6:38:18
phoe
as Stas once said, a condition system is easy; dynamic variables, UNWIND-PROTECT, and GO/RETURN-FROM are hard
6:50:06
phoe
beach: I will possibly be able to contribute a thing or two, sure. My main focus will be CLUS as soon as my book is finished, but I think I'll be able to add this or that to SICL in meantime.
8:45:04
heisig
I was just made aware that PLDI 2020 is hosted online and participating is for free: https://conf.researchr.org/home/pldi-2020
8:45:54
heisig
(I know this is not strictly on topic, but it might interest plenty of people nevertheless)
10:11:41
splittist
the PLDI talk on Debug Information Validation for Optimized Code looks interesting
10:11:55
McParen
I'm looking for a form that seturns the setf accessor for a symbol the same way fdefinition returns the reader
10:14:01
White_Flame
(let ((sym 'gethash)) (fdefinition `(setf ,sym))) ;=> #<FUNCTION (SETF GETHASH)>
10:56:24
pjb
McParen: the problem as you noted, is that there is NO setf accessor for random places.
10:57:42
pjb
McParen: It can be a special case of the SETF macro, it can be a defsetf (2 forms) or a define-setf-expander, or it can indeed be a function named (setf foo). For places defined in CL, and defstruct, you cannot expect anything. Only for your own definition of a (setf foo) function (or generic function).
10:59:05
pjb
McParen: If you want to extract some information about the implementation of gethash, you can use (macroexpand-1 '(setf (gethash k h) e)) #| --> #+ccl (ccl::puthash k h e) ; t |#
10:59:48
pjb
For people who like to talk about primitives, well, (setf (gethash k h) e) IS a CL primitive! :-)
11:09:06
pjb
jackdaniel: agreed. 1- implementations can allow other lists as function names, perhaps user-defined lists. 2- all places should be defined by such function (but let's check whether it's really possible for all of them).
11:09:08
no-defun-allowed
Less annoying than (set-foo <instance> <new-value>), but I guess it could well be generalised to any list as a name. (SBCL does that at least?)
11:09:34
jackdaniel
no-defun-allowed: I'm not saying that setf is a bad idea, I'm explicitly talking about functions named (setf foo)
11:11:11
jackdaniel
if you really want to have a function, then name it whatever you like, and make setf expansion use it
11:11:32
pjb
and 3- the standard doesn't force implementations to use implementation specific mechanisms or defsetf/get-setf-expansion, instead of all (setf foo).
11:11:35
jackdaniel
but this doesn't matter, I'm just saying that this is an ugly exception and I was surprised that you've called it clever
11:12:32
phoe
some implementations just do stuff like (fdefinition '(setf gethash)) ;=> #<FUNCTION |SETF Expansion for GETHASH|>
11:13:19
dlowe
jackdaniel: if there has to be a name, it's a clever way to name it so that name collisions are not possible.
11:15:02
_death
if (setf foo) was not treated as a function name.. things could still look the same, except you'd have to resolve it yourself before funcall/apply, no?
11:17:49
jackdaniel
what I prefer what? that (setf foo) is never a function? sure, but it doesn't bother me much
11:18:27
_death
jackdaniel: that everything is the same except a (setf foo) list can't be passed to funcall/apply
11:18:28
easye
Hmm. Trying to run McCLIM I get the "McCLIM was unable to configure itself automatically..." condition. The system I am running on is macOS which seems to have both XQuartz and MacPorts X11 packages installed which is what I suspect is causing the confusion.
11:18:59
easye
I don't really remember much about fontconfig under X11. Is there a resource somewhere that could be recommended to refresh my memory?
11:19:16
jackdaniel
_death: sure, then function names could always be compared with eq in the compiler ,)
11:20:38
jackdaniel
I think that restart allows you to provide some other ttf. I want to bundle default fonts with McCLIM in the future
11:22:07
easye
Yeah. there is a restart for specifying an alternate font path, but not an options to merge.
11:22:27
jackdaniel
_death: as I said, I don't think it is critical in any way, it is just an ugly irregularity
11:24:22
Xach
I'm guessing https://github.com/marcoheisig/cl-mpi/blob/master/mpi/utilities.lisp#L135 maybe
11:25:21
easye
Xach: it seems that your code is treating array-element-type as a symbol for some reason.
11:26:04
phoe
suspicious: https://github.com/sionescu/static-vectors/commit/8e38de3935902de49c3f309c2a8f9faf7143f0d2
11:27:46
phoe
(let ((element-type '(unsigned-byte 8))) (static-vectors:with-static-vector (vector 8 :element-type element-type) (print vector)))
11:43:30
ralt
I wonder if it's possible to implement yield/coroutines almost painlessly with some abort-thread/restarts tricks...
11:59:14
jackdaniel
afair cl-cont is made in a roundabout way due to lack of the implementation support
12:04:35
ralt
dlowe: green threads are substantially more useful when I/O blocks every thread, because then you can use an epoll-based event loop
12:08:14
ralt
jackdaniel: the issue is that ideally you need to find a way to monkey patch standard library functions (read-sequence etc) so that you can transparently switch to green threads