~nloomans

Amsterdam, The Netherlands

https://noahloomans.com/

I like symlinks and git.

I enjoy writing low-level C code, building servers, making webapps, and learning how stuff really works.

~nloomans/public-inbox

Last active 2 years ago

~nloomans/inbox

Last active 2 years ago

~nloomans/minishell

Last active 3 years ago

~nloomans/test

Last active 3 years ago
View more

Recent activity

[PATCH hare] cmd/hare: fix not erroring on unsupported target 5 months ago

From Noah Loomans to ~sircmpwn/hare-dev

The variable 'target' has been renamed to 'build_target' to avoid it
shadowing the type 'target'.

Signed-off-by: Noah Loomans <noah@noahloomans.com>
---
 cmd/hare/subcmds.ha | 39 ++++++++++++++++++---------------------
 cmd/hare/target.ha  | 13 +++++++++++--
 2 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/cmd/hare/subcmds.ha b/cmd/hare/subcmds.ha
index 57190a13..813652ec 100644
--- a/cmd/hare/subcmds.ha
+++ b/cmd/hare/subcmds.ha
@@ -77,8 +77,8 @@ fn build(args: []str) void = {
[message trimmed]

[PATCH goguma v3] page/buffer: render action msgs as annoucements 8 months ago

From Noah Loomans to ~emersion/goguma-dev

When using an action in irc (also known as /me), you are writing in a
way that it feels like an external narrator is dictating what the user
is doing, instead of the user saying that themselves. Rendering this
text inside of a chat bubble breaks this model, so change the looks to
render it as an annoucement instead.
---
Forgot to actually commit the change where the dot would be grey if
sender is self

 lib/page/buffer.dart | 87 +++++++++++++++++++++++++++++---------------
 1 file changed, 58 insertions(+), 29 deletions(-)

diff --git a/lib/page/buffer.dart b/lib/page/buffer.dart
index f1daf70..c09551c 100644
[message trimmed]

[PATCH goguma v2] page/buffer: render action msgs as annoucements 8 months ago

From Noah Loomans to ~emersion/goguma-dev

When using an action in irc (also known as /me), you are writing in a
way that it feels like an external narrator is dictating what the user
is doing, instead of the user saying that themselves. Rendering this
text inside of a chat bubble breaks this model, so change the looks to
render it as an annoucement instead.
---
Changes from v1:

 - showSender is now isFristInGroup
 - use ! instead of ? to crash when assumptions are broken
 - render dot as grey when sender is self

 lib/page/buffer.dart | 81 +++++++++++++++++++++++++++++---------------
 1 file changed, 53 insertions(+), 28 deletions(-)
[message trimmed]

Re: [PATCH] page/buffer: render action msgs as annoucements 8 months ago

From Noah Loomans to ~emersion/goguma-dev

On Wednesday 6 April 2022 at 19:42 CEST, Simon Ser wrote:
> On Wednesday, April 6th, 2022 at 19:33, Noah Loomans <noah@noahloomans.com> wrote:
>
> > > >  		var prevIrcMsg = prevMsg?.msg;
> > > > +		var prevCtcp = prevIrcMsg != null ? CtcpMessage.parse(prevIrcMsg) : null;
> > > >  		var prevEntry = prevMsg?.entry;
> > > >  		var prevMsgSameSender = prevIrcMsg != null && ircMsg.source!.name == prevIrcMsg.source!.name;
> > > > +		var prevMsgIsAction = prevCtcp != null && prevCtcp.cmd == 'ACTION';
> > > >
> > > >  		var nextMsgSameSender = nextMsg != null && ircMsg.source!.name == nextMsg!.msg.source!.name;
> > > >
> > > > +		var isAction = ctcp != null && ctcp.cmd == 'ACTION';
> > > >  		var showUnreadMarker = prevEntry != null && unreadMarkerTime != null && unreadMarkerTime!.compareTo(entry.time) < 0 && unreadMarkerTime!.compareTo(prevEntry.time) >= 0;
> > > >  		var showDateMarker = prevEntry == null || !_isSameDate(localDateTime, prevEntry.dateTime.toLocal());

Re: [PATCH] page/buffer: render action msgs as annoucements 8 months ago

From Noah Loomans to ~emersion/goguma-dev

On Wednesday 6 April 2022 at 16:40 CEST, Simon Ser wrote:
> On Sunday, April 3rd, 2022 at 15:54, Noah Loomans <noah@noahloomans.com> wrote:
>
> > When using an action in irc (also known as /me), you are writing in a
> > way that it feels like an external narrator is dictating what the user
> > is doing, instead of the user saying that themselves. Rendering this
> > text inside of a chat bubble breaks this model, so change the looks to
> > render it as an annoucement instead.
>
> Very nice! A few nitpick comments below, but overall this looks good to me.

Good to hear!

> >  		var prevIrcMsg = prevMsg?.msg;

[PATCH] page/buffer: render action msgs as annoucements 8 months ago

From Noah Loomans to ~emersion/goguma-dev

When using an action in irc (also known as /me), you are writing in a
way that it feels like an external narrator is dictating what the user
is doing, instead of the user saying that themselves. Rendering this
text inside of a chat bubble breaks this model, so change the looks to
render it as an annoucement instead.
---
This is my first time writing in flutter, so please be critical with the
feedback! I'm particially uncertain about the following:

> if (isAction) {
>       // isAction can only ever be true if we have a ctcp
>       assert(ctcp != null);
>       var actionText = stripAnsiFormatting(ctcp?.param ?? '');
[message trimmed]

Re: builds: information about which branch is being built 2 years ago

From Noah Loomans to ~sircmpwn/sr.ht-discuss

You could do something like this in your deploy script.

    # We only want to deploy when on master. We cannot check if
    # --abbrev-ref is master because the HEAD is detached.
    if [ "$(git rev-parse master)" = "$(git rev-parse HEAD)" ]; then
        # Deploy
    else
        # Do not deploy
    fi

Re: [PATCH] made memset significantly faster for very long strings. 2 years ago

From Noah Loomans to ~nloomans/inbox

Pushed, thanks!

To git.sr.ht:~nloomans/libft
   ec9beb4..8457a55  master -> master

Re: [PATCH] improvement: made memset faster for long sizes 2 years ago

From Noah Loomans to ~nloomans/inbox

It failed to compile for me:

[39/65] Compiling C object 'ft@sta/src_ft_memset.c.o'.
FAILED: ft@sta/src_ft_memset.c.o
cc -Ift@sta -I. -I.. -I../inc -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c99 -g -MD -MQ 'ft@sta/src_ft_memset.c.o' -MF 'ft@sta/src_ft_memset.c.o.d' -o 'ft@sta/src_ft_memset.c.o' -c ../src/ft_memset.c
../src/ft_memset.c:25:3: error: variable 'chunk' is uninitialized when used here [-Werror,-Wuninitialized]
                chunk <<= 8;
                ^~~~~
../src/ft_memset.c:19:26: note: initialize the variable 'chunk' to silence this warning
        unsigned long long      chunk;
                                     ^
                                      = 0
1 error generated.
[44/65] Compiling C object 'ft@sta/src_ft_strclr.c.o'.

Regression in PGP patch 2 years ago

From Noah Loomans to ~sircmpwn/aerc

Hey all,

I have found a regression when trying out the latest PGP patches.

Let's say I have an email which looks like this:

multipart/mixed
	multipart/mixed
		text/plain
		application/pgp-keys (some_key.asc)
	application/pgp-signature (signature.asc)

Before the PGP patch, trying to :save the application/pgp-keys file
worked fine. Now, I get the following error: