freenode/#lisp - IRC Chatlog
Search
18:06:33
didi
So I have a priority queue which shuffles objects around. I want the objects to know their indexes inside the priority queue, but I also want the priority queue to hold any object. So I declared a class IDX-CLASS with an object slot called IDX. How do I set IDX only of objects that are instances of IDX-CLASS? In my solution, I declared a generic function SET-IDX and 2 methods: (defmethod (i (x idx-class)) ...) which sets IDX, and
18:09:56
Bike
usually instead of set-foo you should just define a setf method, but since it doesn't always set it this makes sense.
18:10:00
|3b|
ACTION might just define accessors to do nothing instead of making a separate function
18:10:45
|3b|
or calculate it when you read it, if that happens less often than moving things, then it works for everything
18:20:39
didi
I want to keep track of indexes because I want to efficiently change objects' priority, so I can call (increase-priority i queue) instead of linear searching for it and then increase its priority. Does anyone have a better idea for keeping track of priority queue indexes? Maybe a priority queue algorithm that doesn't need it (I am using a heap)? I am uncomfortable with the priority queue functions changing values of elements it holds.
18:22:22
didi
|3b|: My heap implementation uses a vector. So it is the index of the object on this vector.
18:26:49
|3b|
ACTION 's first thought is just to have a separate hash table as an index, not sure if that is actually good or not though
18:32:09
mfzap
hi all... anyone know the easiest way to grab the socket remote IP address for an inbound request in WOOKIE (runs sockets via CL-ASYNC which is via LIBUV)?
18:52:26
aeth
jackdaniel: (setf cffi::*cffi-ecl-method* :c/c++) doesn't seem to change the issue. render-entities (which calls all the draw calls) runs at 0.028471, which is more than the 0.016666... that is allowed for 60 FPS
18:53:05
aeth
I don't think it's a cache error because it recompiled everything after I made that change, starting at the gl file.
19:03:18
aeth
Actually, this doesn't appear to be the case. It probably has to do with the cache of compiled files.
19:17:42
aeth
The actual individual draw call is 0.000014, which is still about twice as slow as SBCL's and CCL's (I'm getting 0.000007 now for SBCL, yesterday I got 0.000009 for both SBCL and CCL iirc)
19:21:29
aeth
(The reason I accidentally thought nothing changed is because I saw SLIME recompile my engine's files... when, of course, it needed to recompile the cl-opengl bindings in order to make a change.)
21:32:10
msmith
anyone know if there is a way to append a stream to a broadcast stream after it is created?
21:40:44
|3b|
or if the stream needs to stay constant, maybe use a synonym stream pointing to a broadcast stream and swap it out with another broadcast stream with the extra stream
21:45:47
msmith
|3b| just read up on synonym streams and can't really see the point in them. Are they mainly used for the kind of use case you described? to be able to do something the the stream it points to while data is moving through the synonym stream?
0:30:27
sausages
in SLIME's 'all functions that call this function' feature, is there some option somewhere that tells SLIME not to kill the buffer whenever I select one of the listed functions?
0:47:14
BusFactor1
The Interpretation and Compliation of Nock Programs (in Common Lisp) #Urbit https://gist.github.com/BusFactor1Inc/e85dbd369bb5fdb67644a75e65a71c12
1:04:49
whoman
sausages, i have a feeling there is a general emacs way to do this, like C-u, but i do not know it
1:41:45
axion
pjb: SYMBOL-PACKAGE was what we needed. This problem that has plagued us for 3 years is finally solved. Thank you very much for your input.
4:16:45
John[Lisbeth]
what is the lisp equivelent of tail in haskell where you fetch the tail of a list
4:19:25
beach
whoman: You realize that John[Lisbeth] has been learning Common Lisp for almost 2 years, right?
4:20:34
beach
15.07.26:10:31:22 <John[Lisbeth]> I am on the learn lisp the hard way website, and I can't get to the next page in the tutorial
4:23:14
whoman
sorry i do not know what to say, there are some really simple and common things that not everyone learns at the same time as others.
4:23:49
John[Lisbeth]
and I often program mutably so I am not processing lists as much as arrays and hash tables
4:24:25
John[Lisbeth]
Though right now I am programming immutably and I have a function that takes arbitrary arguments and I have a list of values and I want to feed that function the list of values as it's aguments
4:25:32
axion
i tend to use cdr when dealing with cons cells, and rest when dealing with lists, as a means to help self-document my code.
4:35:04
emaczen
What advice do you all have about "passing along" errors i.e. a handler gets invoked which then determines some state information and then calls error again with a new condition -- is this strange or common?