freenode/lisp - IRC Chatlog
Search
17:40:28
pjb
asdf_asdf_asdf: you are completely misled. Lisp types have nothing in common with C types. A lisp object can often be stored in several different C variables (or fields or parameters) of different C types. You cannot determine a C type from a lisp object. You can only know in advance what C type a given C variable (or field or parameter) has, and convert the lisp object into a C value of that C type.
17:40:49
pjb
minion: memo for asdf_asdf_asdf: you are completely misled. Lisp types have nothing in common with C types. A lisp object can often be stored in several different C variables (or fields or parameters) of different C types. You cannot determine a C type from a lisp object. You can only know in advance what C type a given C variable (or field or parameter) has, and convert the lisp object into a C value of that C type.
17:57:36
|Pirx|
i've installed it and get a root page, but easy-handler example from the docs gives 404
18:04:45
|Pirx|
warnings the require about system definitions files that should be under hunchentoot, but root page works anyway
18:09:40
|Pirx|
#P"C:/Users/lenovo/quicklisp/dists/quicklisp/software/hunchentoot-v1.2.38/" is what ql:where-is-system returns
18:10:10
Xach
ok, that's what I get too. and things work like the docs suggest. very weird! what lisp do you use? (it generally shouldn't matter, but maybe it does in this cae)
18:11:17
Xach
I know it's not super-helpful to say "works for me", but it does, as described in the docs, work for me.
18:12:34
|Pirx|
i suspect now something about the environment, maybe i have not included some package by default or something like that
18:16:01
Xach
|Pirx|: i started from a fresh session, used (ql:quickload "hunchentoot"), (hunchentoot:start (make-instance 'hunchentoot:easy-acceptor :port 4242)), (hunchentoot:define-easy-handler (say-yo :uri "/yo") (name) (setf (hunchentoot:content-type*) "text/plain") (format nil "Hey~@[ ~A~]!" name)), and got the expected results. i didn't run anything else in the session.
18:23:02
|Pirx|
if i put a "yo" file in the directory it serves it, so the problem is that it's not binding the function to the acceptor
19:47:46
boeg
Can someone help be understand why `(some #'typep (list 1) (list 'number 'string 'number))` returns `T` but `(some #'typep (list 1) (list 'string 'number))` return `NIL` ? And is there a better approach when what I want is test of the type of an object is on a list of "allowed types"?
19:47:49
boeg
Can someone help be understand why `(some #'typep (list 1) (list 'number 'string 'number))` returns `T` but `(some #'typep (list 1) (list 'string 'number))` return `NIL` ? And is there a better approach when what I want is test of the type of an object is on a list of "allowed types"?
19:50:37
Bike
If the list is constant you can just do (typep 1 '(or number string)). Is that what you're doing?
20:00:08
splittist
Is there some MOPery that will allow my subclass to skip the super's :after method on INITIALZE-INSTANCE ?
20:02:00
phoe
the standard method combination states that all :AFTER methods are executed in order, no exceptions
20:02:35
phoe
so if you define your own one, then perhaps you might be able to play around with the method order in some way, including which methods actually are executed and which are skipped
20:03:40
splittist
yes. But I was hoping to plug into an existing protocol in existing project that almost, but not quite, allows enough specialisation. I guess I just fork/replicate and be done with it ): (and once I have it working, perhaps a PR)
20:06:42
Bike
:after methods are called most-specific-last, so the super's after method will be called before yours, so you can't exit early... and even if you could i'm not sure how that would be arranged.
20:11:52
splittist
yeah. I think it will be fewer lines to not inherit, and come at it from the protocol-end (i.e. specialise each of the protocol gfs). Thanks!
22:13:22
splittist
OK. After a few hours work I'm back where I started, with something that almost works, but now with a myriad layers of indirection. Time to declare victory and leave it for the evening. :P
22:18:23
splittist
the indirection/protocol thing actually works fine, now. It's just that I started the day with a slightly-broken thing and I'm ending it with exactly the same brokenness. But there is a slightly sleeker yak, so that's something.
22:26:14
splittist
It started yesterday as a bit of a distraction from something else docx-related. (Which itself is ...) Basically, it 's squirrels all the way down.
22:27:22
phoe
depends on your CPU architecture I guess, same question as "which direction does the stack grow"
23:12:36
no-defun-allowed
(defun lousy-or (value &rest values) (let ((next (apply #'lousy-or values))) (if (null value) next value))) ; but this has non-tail recursion and is slightly cursed
23:14:23
White_Flame
some of the cyc code very, very manually performs a non-shortcutting OR on 2 cleanup items for a "success" return, and I'm wondering if there's some little trick
23:15:45
Xach
White_Flame: so it evaluates everything (unlike OR) and still gives the semantics of only being true if something is true.
23:16:07
White_Flame
ah true, I didn't explore SOME because of that, although I know it's been used for such things
23:32:10
gabc
Is there any external requirement to use Qtools? Or this should be enough? (ql:quickload '(qtools qtcore qtgui))
3:54:11
reepca
I find myself needing to use native namestrings for passing arguments to another program, and it seems that calling (namestring (make-pathname :name "a.b.c")) produces "a\\.b\\.c". I'm quite confused why this is. Does SBCL think that "canonical form" means "shell-special-characters escaped"?
3:59:54
reepca
seems native-namestring is what I want... I vaguely remember running into this problem before
4:23:22
pjb
reepca: if you pass the argument to another program that is NOT written in SBCL, then you want to pass NOT a PATHNAME or a NAMESTRING, but a POSIX path!
4:26:52
White_Flame
reepca: the period is often used to separate name from type (extension), so that's probably the root of the backslashing
4:58:15
emaczen
What can I expect with regards to this $365 bounty: https://www.bountysource.com/issues/75202399-wanted-by-value-structures-in-sb-alien
4:58:15
minion
emaczen, memo from pjb: lisp itself is just an assembler. Just avoid the most sophisticated macros (or consider lisp as a macro assembler and use them!). See for example: https://groups.google.com/forum/#!msg/comp.lang.lisp/T3UZwLoN0lw/4r9q_8cwKoQJ THIS IS YOUR STABLE ASSEMBLER!