~akarle

https://alexkarle.com

Mostly a mirror of my self-hosted repos, but here to support the FOSS and enjoy the speedy load times!

~akarle/dkim-test

Last active 8 months ago

~akarle/public-inbox

Last active 1 year, 2 months ago
View more

Recent activity

Re: [PATCH v2] chathistory: Fix truncated backlog due to timezones 11 days ago

From Alex Karle to ~emersion/soju-dev

On Thu, Oct 07, 2021 at 10:03:35AM +0000, Simon Ser wrote:
> Pushed, thanks!

Awesome, thank you for the help iterating on this!

> That said, converting the logs to UTC on read isn't enough: it's still
> necessary to convert the input timestamps to local time, because the log
> filenames (stored in YYYY-MM-DD sub-directories) use local time.

Oh yes, good catch--timezones are hard :)

[PATCH v2] chathistory: Fix truncated backlog due to timezones 12 days ago

From Alex Karle to ~emersion/soju-dev

Because msgstore_fs writes logs in localtime, the CHATHISTORY timestamps
(UTC) must be converted to localtime prior to filtering ranges ensure
the right range is sent back to the client.

Prior to this patch, the iteration back from the BEFORE time failed to
load the hours between midnight UTC and midnight localtime in each day's
logged messages. This is because the final time to be considered in a
day's log file (the "start" time) reuses the previous start time's
locale:

    start = time.Date(year, month, day, 0, 0, 0, 0, start.Location()).Add(-1)

By converting the original start and end from the CHATHISTORY commands
to localtime in Load*Time and ListTargets, we ensure we read through
[message trimmed]

Re: [PATCH] chathistory: Fix truncated backlog due to timezones 12 days ago

From Alex Karle to ~emersion/soju-dev

Thanks for the quick response and extra context!

> If possible, I'd prefer to keep this fix local to msgstore_fs.go -- other
> message stores may not have this limitation (e.g. the in-memory store doesn't,
> and a DB-based store wouldn't either). Maybe we can just convert time values to
> the local timezone at the start of each fsMessageStore.LoadXXX functions?

Makes sense and agreed that'd be a bit cleaner! I'll work on a v2
later today or tomorrow!

[PATCH] chathistory: Fix truncated backlog due to timezones 13 days ago

From Alex Karle to ~emersion/soju-dev

Because msgstore_fs writes logs in localetime, the CHATHISTORY
timestamps must be parsed as localtime too to ensure the right range is
sent back to the client.

Prior to this patch, the iteration back from the BEFORE time failed to
load the hours between midnight UTC and midnight localtime in each days
logged messages. This is because the final time to be considered in a
days log file (the "start" time) reuses the previous start time's
locale:

    start = time.Date(year, month, day, 0, 0, 0, 0, start.Location()).Add(-1)

By setting the original start (from the BEFORE timestamp) to localtime,
we ensure we read through midnight each day.
[message trimmed]

Re: test2 8 months ago

From Alex Karle to ~akarle/dkim-test

On Tue, Sep 01, 2020 at 11:15:21PM -0400, Alex Karle wrote:
> Check check

2021, how about now?

Re: test2 1 year, 1 month ago

From Alex Karle to ~akarle/dkim-test

Check check

On Tue, Aug 04, 2020 at 01:07:11PM -0400, Alex Karle wrote:
> Hi
> 
> On Tue, Aug 04, 2020 at 01:04:56PM -0400, Alex Karle wrote:
> > change of domain?

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

From Alex Karle to ~akarle/public-inbox

> 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?

Correct -- I think it would be feasible to add smarts to both the client
and server to rejoin, but in (very limited) practice, we haven't seen
connections drop.  The server doesn't consider connections closed for 30
seconds, and the client pings every 5, so there's some built in
redundancy there.

A smarter client/server that rejoined automatically is pretty high on
the list of things we'd need to make this more production-grade (that

test 1 year, 2 months ago

From Alex Karle to ~akarle/dkim-test

hello?

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

From Alex Karle to ~akarle/public-inbox

> Hi,

Hello!

> I just used http://euchre.live this evening. Thanks for making it!

Thanks for trying it out! I appreciate the feedback.

> 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.

Re: Test 1 year, 4 months ago

From Alex Karle to ~akarle/public-inbox

> Just testing the public inbox!

Nice!