Search
Tuesday, 5th of December 2017, 19:37:29 UTC
20:07:50
Shinmera
scymtym: Yeah. It's worth reading anyway, though.
20:26:08
paule32
(defvar cw00001 '("hallo" "hello"))
20:26:21
paule32
(setf (gethash cw1 *word-table*) cw00001)
20:26:32
paule32
(maphash #'(lambda (k v) (print k)) *word-table*)
20:27:35
jurov
Hi all, when I do (ql:quickload 'usocket) (usocket:socket-server #(127 0 0 1) 8910 nil nil) I get undefined function error.
20:28:31
jurov
NFI how to approach this? In dists/quicklisp/software/usocket-0.7.0.1/ the function does exist
20:29:04
Xach
jurov: hi! what does (ql:where-is-system "usocket") say?
20:29:24
jackdaniel
oh, there is such function? interesting!
20:30:06
Xach
i use that function very much when troubleshooting
20:30:15
Xach
since systems can be not what or where you expect
20:30:31
Xach
it is just a thin layer over a couple of asdf functions, but so handy
20:30:39
jurov
(ql:where-is-system "usocket") has output ~/quicklisp/dists/quicklisp/software/usocket-0.7.0.1/ which is right, and which I've checked
20:33:13
jurov
but (find-package "usocket") returns nil
20:33:28
Xach
jurov: (find-package "USOCKET") is more likely to work
20:35:01
Xach
jurov: i don't think usocket:socket-server is meant to be a function, is it? is it documented as such?
20:35:41
jurov
(do-external-symbols (s (find-package "USOCKET")) (print s)) does list USOCKET:SOCKET-SERVER
20:35:52
Xach
jurov: sure - but that doesn't mean it names a function
20:35:54
jurov
and it's documented: https://common-lisp.net/project/usocket/api-docs.shtml
20:37:39
jurov
it is definitely something that can be called. and it worked fine on this machine few months ago.
20:38:03
_rumbler31
jurov: can you restart your lisp, ql usocket and then re-issue your test and paste full output?
20:38:32
Xach
I also get an undefined function error. Hmm.
20:40:07
jurov
http://dpaste.com/23FD2HV
20:40:42
Xach
jurov: i think it would be good to discuss on the list, because that seems like a strange oversight
20:45:03
paule32
jurov: you could be try: 127.0.0.1 instead 127 0 0 1
20:45:54
paule32
jurov: note: this is a string
20:46:11
paule32
jurov: may be: "127.0.0.1"
20:46:36
jurov
paule32:but that has no influence on whether the function exists. and I remeber this working with the vector parameter
20:48:53
paule32
jurov: if you would like to set the vector value, try: (setf ip-address (vector 127 0 0 1))
20:50:29
jurov
paule32: and what's the problem with #() notation?
20:51:50
Xach
jurov: the usocket-devel list, which is not very busy, but still quite responsive
20:55:16
Xach
jurov: i think i have sussed it
20:55:43
Xach
jurov: (ql:quickload "usocket-server") will load the file that defines what you want to use.
20:56:22
jurov
Yep, I found it announced here: https://mailman.common-lisp.net/pipermail/usocket-devel/2016-October/000618.html
20:58:01
jurov
But then symbols should not be exported either, i guess? what is the usual practice?
20:58:23
Xach
jurov: it is not too unusual to act as it does.
20:58:32
Xach
there is no problem exporting symbols that are not fbound
20:59:57
jurov
Xach tyvm! Seeing from that thread, you actually had the same problem :)
21:00:19
_rumbler31
oh dang, I forgot about that
21:07:44
Zakkor
(defun square (x) ... ; how come (x) isn't a function call in this case?
21:08:10
Bicyclidine
defun is a macro, so it can define its own syntax.
21:08:34
pjb
macros and special operators have special rules.
21:09:08
Zakkor
is it something you could do within the language?
21:09:22
Bicyclidine
you can define your own macros, yeah.
21:09:52
pjb
Zakkor: (defmacro defun (name lambda-list &body body) `(setf (symbol-function ',name) (lambda ,lambda-list ,@body))) ; basically.
21:10:07
Bicyclidine
(defmacro myquote (form) (list 'quote form)). now (myquote (7)) => (7), whereas (print (7)) would be an error
21:10:17
pjb
lambda is a macro that expands to (function (lambda …)) and function is a special operator, so special rules.
23:10:13
foschia
help me!! i'm lost in Stupid Parentheses ahahaha
23:13:18
foschia
i'll solve my problem in a next moment.. bye bye :)
4:30:35
beach
Good morning everyone!
6:48:30
whoman
Control stack guard page temporarily disabled: proceed with caution
6:54:11
beach
whoman: Runaway recursion?
6:54:19
whoman
is there a way to create a graph of lisp forms, like "box notation" from gentle introduction to symbol computation ?
6:54:35
whoman
yes, experimenting with #1= and cons cells =)
6:55:22
beach
There is such software, yes. But I can't remember the name now.
6:57:10
whoman
no problem =) i will explore closer after i digest this book
6:57:38
whoman
good to know it exists for an idea i have later (geometry)
6:57:55
beach
Yes, I even remember trying it out.
6:59:00
shka
graphviz can be used for that as well
6:59:18
beach
That would require some work.
6:59:54
shka
not that much, cl-graphviz even has tutorial just for drawning lists
7:01:08
beach
But I can't remember the link. :(
7:02:23
beach
whoman: http://www.cs.cmu.edu/~dst/Lisp/sdraw/
7:10:20
Zhivago
whoman: I would suggest the dot language of graphviz.
7:11:43
whoman
alright i will try that first
7:12:16
whoman
"The Common Lisp standard specifies the interface between a Lisp implementation and the editor it provides. The interface is a function called ED."
7:17:16
aeth
Implementation-specific. Doesn't work in SBCL out of the box, but describe gives me enough information. Looks like in sbcl it uses *ed-functions*
7:17:25
aeth
(setf *ed-functions* (list (lambda (x) (declare (ignore x)) (uiop:run-program "emacs"))))
7:17:39
aeth
That almost works, errors on exit, though. I'd also need to figure out how to use its argument.
7:18:05
aeth
It's probably not used enough for there to be a trivial-ed package that makes all this easy.
7:18:54
whoman
strange type errors with it
7:19:13
whoman
; Evaluation aborted on #<TYPE-ERROR expected-type: (OR CONS (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING PATHNAME SYMBOL)
7:29:10
pjb
whoman: see also hemlock
7:37:25
whoman
ah yea! swi-prolog has a nice editor also
7:37:27
jackdaniel
hem, I've tried to start hemlock (both clx and tty) but it failed
Wednesday, 6th of December 2017, 7:37:29 UTC