freenode/#lisp - IRC Chatlog
Search
14:13:49
pjb
Exercice for a lazy week end: write a CL reader macro to read expressions from such ascii-art representations.
14:14:44
pjb
If you've finished by this evening, follow up tomorrow (assuming it'll be a raining Sunday) with a reader macro to interpret ascii-art graph diagrams into state machine functions.
14:16:41
pjb
Bonus points for combining it with https://github.com/dhobsd/asciitosvg to generate nice documentations.
14:23:51
mo`
is there a way to prevent emacs from blocking stumpwm when I call emacsclient for the mode-line, is there a way to do a timeout for the stumpwm:run-shell-command function ?
14:24:31
mo`
I have (:eval (string-trim '(#\Newline #\") (stumpwm:run-shell-command "emacsclient -e \"(emms-track-description (emms-playlist-current-selected-track))\"" t))) for my mode-line
14:40:17
tazjin
is there a built-in macro for using `(in-package)` in a limited scope? Something like `(with-package ...)`? Failing to google for it.
14:44:20
Shinmera
Because the reader needs to read a full expression, long before things are evaluated.
14:45:34
Shinmera
So a "with-package" cannot possibly work, unless the package change should only influence package and read operations at run time.
15:17:31
Bike
you could have a reader macro that does something similar. a couple implementations allow package::(form...) syntax which i think basically just binds *package*
15:17:54
puchacz
hi, is it a good idea, guys? (setf (symbol-function 'alphanumericp) (symbol-function 'lispworks:unicode-alphanumericp))
15:18:15
puchacz
it works, for example now I can query (alphanumericp (code-char 322)) and it returns T
15:19:40
Bike
kind of unfortunate that lispworks doesn't just use unicode alphanumericp as regular alphanumericp
15:19:42
phoe
"alphabetic n., adj. 1. adj. (of a character) being one of the standard characters A through Z or a through z, or being any implementation-defined character that has case, or being some other graphic character defined by the implementation to be alphabetic[1]. "
15:21:26
Shinmera
Never rely on CL's character set tests if you're working against any kind of specification.
15:21:41
phoe
I'd rather go for #+lispworks unicode-alphanumericp #-lispworks alphanumericp if anything
15:22:11
puchacz
yeah. but cl-ppcre fails to recognise some letters because of this (it uses alphanumeric-p), and hell knows what else does not work with unicode
15:23:02
puchacz
(setf (symbol-function 'alphanumericp) ...) may be undefined but it works under current LW
15:25:01
puchacz
if I put it into .lispworks and remove my .cache/common-lisp, it should recompile cl-ppcre with new function
15:25:04
phoe
puchacz: either ask lispworks for a workaround or file a bug on CL-PPCRE asking for special-casing LispWorks.
15:25:34
Bike
i kind of thought ppcre already special cased lispworks by using some regex engine lispworks provides
15:26:02
puchacz
I already asked them and they told me they have very close equivalents for the functions I need: http://www.lispworks.com/documentation/lw70/LW/html/lw-198.htm
15:27:01
Bike
okay. just be aware that this reassignment is undefined behavior and lispworks could change it without warning (though they're probably not that mean)
15:27:27
puchacz
of course. if they do, I will kindly ask them to restore or merge these functions :-)
15:28:56
phoe
and possibly write a LispWorks-specific test case in CL-PPCRE's unit test suite to make sure it works and keeps on working later.
15:30:30
puchacz
ok - I will have a look. test case is simple, anything like this (scan "\\w" (format nil "~a" (code-char 322)))