~whereswaldon

North Carolina

https://waldon.blog

Interested in Linux, decentralization, cryptography, golang/rust/c, and communication.

I spend most of my free time on:

  • Arbor, a tree-based, decentralizable chat platform
  • Gio, an immediate-mode UI framework for Go
  • Gio-Extras, my collection of libraries to extend Gio

If you get value out of my work, please consider sponsoring me on Liberapay or GitHub.

~whereswaldon/public-inbox

Last active 12 days ago

~whereswaldon/arbor-dev

Last active 19 days ago

~whereswaldon/arbor-announce

Last active a month ago

~whereswaldon/arbor-ci

Last active 2 months ago

~whereswaldon/arbor-infra

Last active 7 months ago

~whereswaldon/pointstar-devel

Last active 1 year, 4 months ago

~whereswaldon/pointstar-announce

Last active 1 year, 4 months ago
View more

Recent activity

Re: vulkan/vulkan.h: No such file or directory 5 days ago

From Chris Waldon to ~eliasnaur/gio

I've just updated the website install instructions to include the
vulkan headers. You should be able to fix this with:

sudo apt install libvulkan-dev

Cheers,
Chris

On Wed, Sep 22, 2021 at 2:20 PM Rajiv Kanchan <rajiivkanchan@gmail.com> wrote:
>
> Compiling with the latest version of Gio, I get the following error.
> What dependencies need to be installed on Ubuntu to get Vulkan
> working?
>

Re: Rename NE, NW, SW, W (...) to TopRight, TopLeft, BottomLeft, Top (...). 7 days ago

From Chris Waldon to ~eliasnaur/gio

> Rename (or create alias) for CSS-like style. In CSS, we usually use `TopLeft`, `TopRight`, `Top`,
> `Bottom`, `Left`, `Right`, `BottomLeft` and `BottomRight`... Using `layout.TopLeft` seems easier to
> understand, comparing to `layout.NW`. Personally, I never know what is NE or NW.

I'd be fine with this, either as a set of aliases or as an API change
with provided go fmt rewrite rules that fixed up old codebases
automatically.

[PATCH gio v2] widget,widget/material: scroll using only drag position delta 11 days ago

From Chris Waldon to ~eliasnaur/gio-patches

From: Elias Naur <mail@eliasnaur.com>

This commit is based on a patch by Elias that improved drag scrolling
on the scrollbar by locking some parameters of the math at the start
of the scroll event.

I discovered while playing with that implementation that there was
an even simpler approach within his changeset. You can actually
use no information other than the delta between the current and
previous frame's scroll position to compute the scroll distance.
By simplifying the math to rely on no other inputs, the jitter that
we've been fighting simply disappears (it came from other inputs).

Turns out my attempts to make the logic smart were the problem.
[message trimmed]

Re: How to change the font 11 days ago

From Chris Waldon to ~eliasnaur/gio

Hi, you can do so by parsing a different font file and passing that to
material.NewTheme. Here's an example of Elias using the Google Roboto
font in the Tailscale Android client:

https://github.com/tailscale/tailscale-android/blob/d98827df0305a15d2a1a311bd54360a09fdc0183/cmd/tailscale/ui.go#L202

Cheers,
Chris

On Thu, Sep 16, 2021 at 6:55 AM 赵毅 <qianniancn@gmail.com> wrote:
>
> Hello, I want to change the font

[PATCH gio 1/1] widget,widget/material: scroll using only drag position delta 12 days ago

From Chris Waldon to ~eliasnaur/gio-patches

From: Elias Naur <mail@eliasnaur.com>

This commit is based on a patch by Elias that improved drag scrolling
on the scrollbar by locking some parameters of the math at the start
of the scroll event.

I discovered while playing with that implementation that there was
an even simpler approach within his changeset. You can actually
use no information other than the delta between the current and
previous frame's scroll position to compute the scroll distance.
By simplifying the math to rely on no other inputs, the jitter that
we've been fighting simply disappears (it came from other inputs).

Turns out my attempts to make the logic smart were the problem.
[message trimmed]

[PATCH gio 0/1] Simple, no-latency, non-jittery scrollbars 12 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This is a revision of Elias' patch from here:

https://lists.sr.ht/~eliasnaur/gio/patches/25116

Elias' work made me realize that I had been computing the drag offset
using math that took the current viewport position into account. The
viewport position calculations are where all of the jitter actually
comes from. By instead remembering the previous frame's drag position
and using only the current and previous drag positions to compute
the scroll delta, the jitter can be eliminated entirely.

This commit just simplifies Elias' work.

NOTE: this scrollbar implementation does not solve the issues in

[PATCH chat v2 8/8] example/carousel: adapt to new Loader signature 13 days ago

From Chris Waldon to ~gioverse/chat

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 example/carousel/main.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/example/carousel/main.go b/example/carousel/main.go
index 40912b3..d9d0abc 100644
--- a/example/carousel/main.go
+++ b/example/carousel/main.go
@@ -54,7 +54,7 @@ func (i imageElement) Serial() list.Serial {
}

// loader creates new elements in a given direction by pulling a new image from unsplash.com.
func loader(dir list.Direction, relativeTo list.Serial) []list.Element {
[message trimmed]

[PATCH chat v2 7/8] example/kitchen: update to new Loader signature 13 days ago

From Chris Waldon to ~gioverse/chat

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 example/kitchen/row-tracker.go | 10 ++++---
 example/kitchen/ui.go          | 50 ++++++++++++++++++----------------
 2 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/example/kitchen/row-tracker.go b/example/kitchen/row-tracker.go
index 9b7a238..9f71980 100644
--- a/example/kitchen/row-tracker.go
+++ b/example/kitchen/row-tracker.go
@@ -99,7 +99,7 @@ func (r *RowTracker) NewRow() list.Element {
// Load simulates loading chat history from a database or API. It
// sleeps for a random number of milliseconds and then returns
// some messages.
[message trimmed]

[PATCH chat v2 6/8] list: update Loader to return if more elements 13 days ago

From Chris Waldon to ~gioverse/chat

This commit changes the signature of the Loader hook so that it
also returns whether there are more elements in a given direction.
This greatly simplifies some of the state management logic, and
actually eliminates several spurious invocations of the Loader
hook.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 list/async.go        |  5 +++--
 list/async_test.go   | 21 +++++++++++++++------
 list/element.go      | 11 ++++++-----
 list/manager.go      |  4 ++--
 list/manager_test.go | 11 +++++------
 5 files changed, 31 insertions(+), 21 deletions(-)
[message trimmed]