Search
Tuesday, 7th of August 2018, 10:54:55 UTC
10:59:46
galdor1
pjb: I'm curious regarding the way you name package, (e.g. com.informatimago.common-lisp.cesarum.ascii) do you use package name aliases ? or do you always :USE for DEFPACKAGE ?
11:02:07
phoe
galdor1: there are several schools for that.
11:02:28
phoe
the one I use: I mostly USE-PACKAGE, except for when I use IMPORT-FROM.
11:02:50
phoe
Another one is: never import anything and explicitly use package prefixes.
11:03:33
galdor1
I use very short names for my own packages, which I find more practical, but it's easier to get conflicts
11:13:24
phoe
yep - package-local nicknames is a solution for that, and it's kinda-widely-adopted now.
11:21:58
AeroNotix
is it normal/expected to use defsetf expander code to implement assertions on the value being setf?
11:22:09
AeroNotix
or is that typically/supposed to be done somewhere else?
11:24:26
phoe
AeroNotix: uh, inside the setf function?
11:24:50
phoe
(defun (setf foo) (new-foo ...) (assert (frobnicable-p foo)) ...)
11:26:03
AeroNotix
Well I'm using defsetf
11:26:16
AeroNotix
Need to learn the difference between defsetf and (defun (setf ...)))
11:27:38
phoe
I almost exclusively use (defun (setf foo) ...)
11:28:04
phoe
unless I need to avoid double evaluation of arguments somewhere, at which point I define-setf-expander or define-modify-macro
11:28:54
schweers
hm, ccl doesn’t seem to support package local nicknames, at least not by the same feature convention as sbcl does.
11:29:31
AeroNotix
phoe: and the (setf foo) part can be anything like (setf (lookup foo blah blah)) instead, right?
11:29:42
AeroNotix
when using (defun (setf ..))
11:31:37
phoe
(setf (foo bar baz quux) fred)
11:31:49
phoe
(defun (setf foo) (new-value bar baz quux) ...)
11:32:06
phoe
in that case, the value FRED gets bound to the variable NEW-VALUE
11:32:26
phoe
so if (defun foo (...)), then (defun (setf foo) (new-value ...))
11:32:37
phoe
the variables in ... SHOULD stay the same
11:32:50
AeroNotix
righto, will have a play
11:45:06
akr
Hello, does anyone know whether there is a CL implementation of CLDR ( https://en.wikipedia.org/wiki/Common_Locale_Data_Repository )?
11:45:26
akr
specifically, I need to use the country-dependent regexes for postal codes
11:45:51
akr
I don't think cl-unicode has it
11:47:28
akr
oh okay looks like it's been deprecated from CLDR anyway :( http://unicode.org/cldr/trac/ticket/8421
11:48:41
akr
I wonder what are the "other sources of such information"
12:33:44
drmeister
How would I get a random available port and the port number using sbcl sockets?
12:34:19
drmeister
I know open port 0 (zero) - but getting the port address afterwards ...
Tuesday, 7th of August 2018, 22:54:55 UTC