~philipwhite

~philipwhite/webpad

Last active 1 year, 10 months ago

~philipwhite/test-list

Last active 2 years ago
View more

Recent activity

Re: Thanks and feedback for euchre-live 1 year, 10 months ago

From Philip White to ~akarle/public-inbox

> Thanks for reporting this -- your analysis is spot-on; it was indeed a
> websocket closing.
> 
> I was mid-typing a lengthy email about why it shouldn't happen (pings
> and pongs keep it open, etc) when I reproduced it myself.

The pings and pongs would keep it alive for users with consistent connections,
but what about users on WiFi that doesn't quite reach to their corner of the
house (or who's laptop has a finicky WiFi setup)? If the user is disconnected
WiFi long enough that the pong is not sent in time, the connection would be
closed, right?

> so I updated it to 2.5 hrs, so that connections shouldn't drop mid game. So
> far, I haven't seen any issues.

Thanks and feedback for euchre-live 1 year, 10 months ago

From Philip White to ~akarle/public-inbox

Hi,

I just used http://euchre.live this evening. Thanks for making it!
Overall I thought it worked pretty well. The one bug we ran into very
frequently while playing was that the page would stop updating and could
not perform any actions. I opened dev-tools in my browser while playing
so that I could see if it would say anything when I got disconnected.
Sure enough, the issue appears to be that the WebSocket got closed
somehow, and that any messages sent over the wire could not be sent.

To fix this, I believe you can add a callback whenever the websocket
gets closed; in the callback, you can just try to reconnect. To make the
user-experience better as well, you could show an indication on the page
that the client is currently disconnected.

How do I depend on a Zig library that has a complicated build process? 2 years ago

From Philip White to ~andrewrk/ziglang

I know the build system hasn't yet been given in-depth documentation, so
perhaps the effort to answer this question is better put toward writing
the documentation. However, it may be that my question has a short
answer.

I've made a small library for making wayland windows. The library
includes a mix of C and Zig code, so my `build.zig` has to include code
to include the C standard library as well as the wayland libraries that
I need.

The way I've been figuring out the build system is by reading the source
code to see the API. I found `addPackagePath` to depend on the main
module of a library, but from what I understand, this doesn't use the
`build.zig` of the library, so any dependencies and build steps have to