Search
Tuesday, 3rd of January 2017, 18:13:25 UTC
18:14:03
borodust
malice`: i've researched quite a few approaches/libs
18:18:56
borodust
data-flow-driven sugar can be nicely put on top
19:48:29
borodust
oGMo malice`: https://github.com/borodust/cl-flow
19:48:59
borodust
unfortunately, tests depend on the home-grown concurrency lib, so my apologies
19:49:34
borodust
althou it is available too
19:50:31
borodust
https://github.com/borodust/cl-muth
20:03:52
macdavid314
** NICK macdavid313
20:10:34
jasom
borodust: Is there a need for -> ? Couldn't >> and ~> assume that any undecorated compound forms are to be executed?
20:12:34
borodust
-> is needed, because any form cannot be actually executed
20:12:56
borodust
-> macroexpands to special callback that can be then used by other operators as they see fit
20:14:00
borodust
i prefer to keep format of this callback as an implementation details for now
20:15:19
borodust
essentially, >> and ~> operators work with list of lists of callbacks under the hood
20:16:51
borodust
jasom: but, maybe somewhere in the future this feature might take plax
20:19:15
borodust
as a quick workaround i defined (define-flow value-flow (value) (-> :generic () value)) to use in the dependent code
20:19:51
borodust
it might be as well be just a defun
23:08:35
phoe
https://github.com/npatrick04/timer-wheel <- I'm interested in this.
23:08:46
phoe
Are there any systems already on QL similar to that?
23:09:01
phoe
Something that will do its best to fire events every N milliseconds?
23:15:25
antoszka
phoe: would that work for you? http://www.sbcl.org/manual/#Timers
23:18:13
phoe
antoszka: it would, but is implementation-dependent.
23:18:30
antoszka
Definitely. That's why I'm asking.
23:23:42
phoe
Basically, that timer has a repeat interval.
23:23:55
phoe
I want something to be executed every N milliseconds with an option of pausing and unpausing it.
23:24:42
axion
Is this for a game by chance?
23:35:32
phoe
I want internal commands to be issued every 100 milliseconds.
23:35:51
phoe
And I'm using an LPARALLEL queue for that.
23:38:45
axion
phoe: I would google for "Gaffer's Fix Your Time Step". This is actually a non-trivial problem.
23:39:06
phoe
axion: I know. With multithreading and non-deterministic GC, it's nontrivial.
23:39:15
axion
There is more to it than probably anticipated
23:39:31
axion
To avoid the spiral of death, etc
23:39:32
phoe
Actually, I'm more than fine with delays in this case as this is not a real-time game. So half a second here, half a second there would even be acceptable.
23:51:52
phoe
axion: ugh, my implementation would be fine with something as simple and messy as (loop (when running-p (do-stuff)) (sleep 0.1))
23:52:07
phoe
but I want to find something better in order to avoid heresy
0:00:08
phoe
Once again - I don't this need to run at a constant framerate. I want some things to occur about ten times per second on my server.
0:24:14
cyberlard
** NICK grace_host
0:46:51
aeth
phoe: afaik (sleep n) is okay for what you need, you just need n to be variable based on measured time.
0:47:33
aeth
So afaik you just need a simple timer, time how long the loop takes, and then sleep the rest of the time.
0:47:47
aeth
It's not bulletproof, but it's better than (sleep 0.1) without taking days to implement
0:48:07
aeth
s/the loop takes/the loop iteration takes/
1:01:10
phoe
aeth: I've just created something like that.
1:05:36
raynold
ahh it's a wonderful day
1:19:56
grace_host
** NICK cyberlard
Wednesday, 4th of January 2017, 6:13:25 UTC