Search
Thursday, 20th of September 2018, 4:39:56 UTC
10:19:50
phoe
I've come here to ask for a review on https://github.com/Shinmera/array-utils/pull/2
10:19:51
Colleen
github.com/Shinmera/array-u... Website (HTML), Title: Add VECTOR-POP-{FRONT,POSITION}* by phoe · Pull Request #2 · Shinmera/array-utils · GitHub
10:24:59
Shinmera
phoe: why do you return two values? None of the other functions do this
10:25:30
phoe
Likely a leftover from our discussion at #lisp
10:25:39
Shinmera
also wouldn't shiftf already return the value we want
10:26:09
phoe
It would, yep, so the prog1 is unnecessary
10:26:12
Shinmera
so it'd be just decf+shiftf
10:28:54
Shinmera
heh, uses its own ad-hoc thing even
10:30:01
Shinmera
alright, if the tests pass this looks good to me
10:32:00
phoe
and the tests pass on my machine
10:32:51
phoe
https://plaster.tymoon.eu/view/925#925
10:32:51
Colleen
plaster.tymoon.eu/view/925#... Website (XHTML), Title: - Plaster
10:32:57
phoe
can't see the newly added tests there, one second
10:33:16
phoe
I didn't add them to the define-test array-utils
10:34:02
Shinmera
I'll rewrite this for parachute later, don't sweat it
10:37:47
phoe
well, the tests pass anyway
10:37:54
phoe
but they aren't active when you run your test suite
10:39:56
phoe
well, https://github.com/Shinmera/array-utils/pull/3
10:39:57
Colleen
github.com/Shinmera/array-u... Website (HTML), Title: woops by phoe · Pull Request #3 · Shinmera/array-utils · GitHub
10:40:06
phoe
so my conscience stops bothering me
11:26:59
Shinmera
ACTION looks at his github issue list
12:04:54
phoe
I'd happily jump on the #shirakumo bandwagon and try doing some of these
14:11:14
Shinmera
Biggest thorn in my side at the moment is the problem in lichat-tcp-server, where it somehow gets into a state that leaves connections on a pending close, and then after a while stops accepting new connections, causing any attemp to time out
14:16:48
Shinmera
It happens on the production server often enough, but reproducing it locally is probably gonna be tough
14:17:26
Shinmera
might also have something to do with the way that the production server runs in multi-mode with the ws-server, but I really don't know
16:06:18
phoe
Shinmera: okay, I'll try to take a look at it during the weekend
16:06:55
phoe
leaves connection on a pending close? what do you mean?
16:08:36
Shinmera
the connection is left in the CLOSE state
16:08:46
phoe
they look like a possible source of trouble there
16:10:19
Shinmera
Here's the script to run the server http://plaster.tymoon.eu/view/926#926
16:10:19
Colleen
plaster.tymoon.eu/view/926#... Website (XHTML), Title: - Plaster
16:11:03
Shinmera
let me remove the ldap stuff
16:11:26
phoe
bt:interrupt-thread also smells icky to me
16:16:27
Shinmera
And here's the client I use that seems to cause things to go awry in some cases http://plaster.tymoon.eu/view/926#927
16:16:27
Colleen
plaster.tymoon.eu/view/926#... Website (XHTML), Title: - Plaster
16:17:58
Shinmera
anyway, any improvemets at all (removing the gross locks, etc) would be welcome
16:18:20
phoe
I'm working on a very similar server right now, anyway
16:18:35
phoe
something event-driven that has a basic event loop and no gross locks like that
16:18:50
phoe
and no thread per connection
16:19:38
Shinmera
can't really do that here because I don't control the ws connection handling
16:20:20
Shinmera
lichat-ws-server uses hunchensocket
16:20:30
Shinmera
hunchentoot is threaded.
16:20:53
Shinmera
which would be another thing to do though: make the same tcp server also handle ws requests
16:21:01
Shinmera
though that would be pretty trick'
16:23:24
phoe
hunchensocket uses a single thread per connection?
16:23:40
Shinmera
well yea, hunchentoot does
16:25:50
phoe
https://edicl.github.io/hunchentoot/#taskmasters
16:25:51
Colleen
edicl.github.io/hunchentoot... Website (HTML), Title: Hunchentoot - The Common Lisp web server formerly known as TBNL
16:26:26
phoe
it should be possible to write a taskmaster that has a thread waiting for input on a list of connections and utilizes an lparallel kernel to deal with the requests
16:28:43
phoe
I guess nobody did it just yet though
16:29:03
phoe
This is more or less parallel to me writing my https://octo.sh/Gateway/Gateway/blob/master/doc/CONNECTOR.md
16:29:03
Colleen
octo.sh/Gateway/Gateway/blo... Website (HTML), Title: doc/CONNECTOR.md · master · Gateway / Gateway · GitLab
16:29:26
Shinmera
if I remember correctly there's a thing about hunchentoot forcing a close so you can't do it async
16:29:39
phoe
forcing a close? what do you mean?
16:30:08
phoe
oh, via unwind-protect of sorts?
16:30:14
Shinmera
it forces a close on exit from connection handling
16:30:20
phoe
so you have to do it in a lexical environment
16:30:45
phoe
(unwind-protect (handle-connection) (close-connection))
16:32:11
Shinmera
I ain't a fan of async and rewriting it all to be async instead of just debugging this seems like overkill
16:32:38
phoe
I'd focus on the locks first
16:32:46
Shinmera
and if you were going to rewrite it all then make a merged tcp/ws server that can do both
16:33:30
phoe
though I have no idea if interrupting threads is a good idea
16:34:04
Shinmera
interrupting threads is not great, no, but if you're not the thread to shut down there's often no other way
16:34:18
phoe
can't you pull the carpet that the thread is standing on?
16:34:30
phoe
and literally close the connection's socket while the thread is executing?
16:34:41
phoe
the thread will then *&#&@*&^[ and die in pain
16:34:46
phoe
which will achieve the goal
16:35:05
Shinmera
that would prevent a proper close handshake
16:35:31
phoe
I can't see a handshake there
16:35:39
phoe
https://github.com/Shirakumo/lichat-tcp-server/blob/master/server.lisp#L179
16:35:40
Colleen
github.com/Shirakumo/lichat... Website (HTML), Title: lichat-tcp-server/server.lisp at master · Shirakumo/lichat-tcp-server · GitHub
16:36:10
phoe
but again, I don't know that code too well
16:37:01
Shinmera
the unwind in lichat-serverlib causes it to try and send a close message
16:37:12
Shinmera
if I remember correctly
16:38:50
Shinmera
ech, I don't remember how this clusterfuck is supposed to work
16:39:00
phoe
hold the connection's lock, emit an exit message, handshake, close the socket
16:39:45
phoe
I'm kind of used to Erlang concurrency where everything is async and you can freely pass messages around
16:39:54
Shinmera
Colleen: look up lichat 4.3
16:39:54
Colleen
4.3 connection closure https://shirakumo.github.io/lichat-protocol#4.3_connection_closure
Thursday, 20th of September 2018, 16:39:56 UTC