freenode/#lisp - IRC Chatlog
Search
10:10:00
shrdlu68
I want to iterate over a range of integers while skipping some. Would using the series package be more efficient than a simple loop?
10:47:47
capitaomorte
Hello all. My friend Arthur tells me there was some SLY questions here. I can answer a couple if you wish.
10:51:47
capitaomorte
Thanks. If you see him/her, please tell him it's ok to open simple question issues on github.
11:04:45
ioa
Hi lispers. Three more weeks to paper submission deadline for the ELS2020: https://european-lisp-symposium.org/2020
13:49:32
beach
Nilby: If you want to be acknowledged for helping me find information about SBCL breakpoints, I need to know how you would like your name to appear. You can give it here, or send it by email.
14:04:57
ck_
asdf_asdf_asdf: I think you just try to coerced value as best as you can. But more seriously, this sounds like a question for #sbcl.
14:53:45
dlowe
one looks up the protocol and uses a network socket library (like usocket) to implement the protocl
15:55:08
jmercouris
can someone please remind me how to break from a loop and return the element that is true for some predicate?
15:57:40
Bike
and thereis apparently does return the element, so that works too, but it'll be the value returned by the predicate.
15:58:48
jmercouris
let us say this, how to go through values in hash table and check for predicate and return first value that matches
16:00:33
galdor
generally speaking, if you need to regularly find a specific value in a hash table, I'm not sure the hash table is not the right data structure
16:00:54
jmercouris
it is for a sanitation function that checks the state of the objects in the hash table
16:03:25
Bike
your implementation will go and put in a bunch of weird shit, but usually you can get it down to a simple form
16:05:18
Bike
though it might still be kind of weird in the end with hash tables, since with-hash-table-iterator is kind of weird.
17:00:39
sjl_
*every* object can trivially have an infinite number of types of the form `(or actual-type (member 1 2 3 ...))`
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!