freenode/lisp - IRC Chatlog
Search
19:32:57
ikrabbe
actrually the readtable seems to be restored to its original afterwards, so I still don't know if this happens here.
19:33:49
PuercoPop
ralt: Secret Service is the fdo API, gnome-keyring is one of the implementations. Althought tbh I use my own gpg-backed solution from Emacs for my personal needs.
19:35:05
phoe
like, explicitly create a new readtable, set the macro character inside it only, and then read with this readtable set
19:35:35
PuercoPop
ralt: No, I haven't mainly because my homegrown solution works 'good enough'. But I remember you had a stumpwm contrib for passwords
19:38:34
phoe
I assume that the second set-macro-character might be invalid, because it does not set non-terminating-p
19:39:25
phoe
still, you're mutating global state, my first advice would be to grab yourself a custom readtable for that
19:45:25
ikrabbe
it reads the output of an ascii program (actually the plan9 one) and builds a table of keywords with the names from the ascii table, that I can remember better, than the CL character names
19:47:32
ikrabbe
(tostring '("This is a" :nl "simple multiline string." :nl "Actually I used the code to write sed statements with" :tab " and " :esc "chracaters".)
19:51:23
ikrabbe
I wondered for years now how to escape the quoting problem, when writing commands for remote contexts, because what you do there is:
19:52:27
ikrabbe
ssh -l user system "bash -c \"sed -e \\\"s/\\\\\\\\/\\\\\\\\\\\\\\\\/\\\"\"" # of course with a bit more sense ;)
19:53:14
ikrabbe
then I found lisp as the only language to get around that problem without too much problems.
19:54:28
ikrabbe
Now I write my commands as embedded lists: '("ssh" "-l" "user" "system" ("bash" "-c" ("sed" "-e" ("s/\\/\\\\/"))))
19:55:10
ikrabbe
and I can decide through the level how many escapes I need for such \" and \\ characters.
21:03:37
v3ga
so how do you go about removing an undefined variable warning. i've tried makunbound and unintern...neither one of those seem to be what I want.
21:10:05
v3ga
phoe: basically i'm getting an undefined variable for a function I mispelled and removed. https://pastebin.com/Nr398e6q
21:15:41
aeth
This is a case where having variables and functions with the same name can lead to confusion because you were thinking the issue was renaming the function, when the issue was related to a typo in a variable name.
21:20:41
v3ga
Jesus It's right there too... I'm coming from clojure and not used to a usable stacktrace. -_-
0:46:24
Bike
i think i found a bug in sbcl's type simplifier but i'd appreciate a sanity check: could someone else compare (let ((c (cons 2 4))) (typep c '(or (cons (integer 0 8) (integer 5 15)) (cons (integer 3 15) (integer 4 15))))) against (let ((c (cons 2 4))) (or (typep c '(cons (integer 0 8) (integer 5 15))) (typep c '(cons (integer 3 15) (integer 4 15)))))
0:59:03
Nilby
Bike: That the second form is T seems like a bug to me. But I hardly every use such specific type checking.
1:05:44
_death
yeah.. a "simpler" case that shows it is (let ((c (cons 'a '0))) (typep c '(or (cons number symbol) (cons symbol number))))
1:16:49
Bike
also i wouldn't be surprised if ccl cribbed logic from sbcl. and the sbcl logic has a comment saying "UGH." so i don't have the greatest confidence in it
1:18:54
Bike
sbcl simplifies the type to (cons (unsigned-byte 4) (integer 4 15)) but i think (or (cons (unsigned-byte 4) (integer 5 15)) (cons (integer 3 15) (integer 4 4))) would be more correct
3:18:41
aeth
charles`: I mean, it's possible that gensym's a nonnegative (or positive? does it start at 0?) fixnum
3:19:57
aeth
Well, no, I don't think that would be conforming for an implementation to do that because you can rebind *gensym-counter* to any integer
3:20:55
aeth
(let ((*gensym-counter* (expt 2 123))) (gensym "FOO")) => #:FOO10633823966279326983230456482242756608
3:21:22
aeth
at least, going off of this: http://www.lispworks.com/documentation/HyperSpec/Body/v_gensym.htm
3:23:00
charles`
I'm not having any issues, I just want to make sure I wont run into any in the future
3:24:18
aeth
well, this seems to work in SBCL... (let ((*gensym-counter* (expt 2 999))) (gensym "FOO"))