Searching yarn

Twts matching #notes
Sort by: Newest, Oldest, Most Relevant
In-reply-to » (replyto http://darch.dk/twtxt.txt 2024-09-15T12:50:17Z) Hmm, but yarnd also isn't showing these twts as being part of a thread. @prologic you said yarnd respects customs subjects. Shouldn't these twts count as having a custom subject, and get threaded together?

@quark@ferengi.one It looks like the part about traditional topics has been removed from that page. Here is an old version that mentions it: https://web.archive.org/web/20221211165458/https://dev.twtxt.net/doc/twtsubjectextension.html . Still, I don’t see any description of what is actually allowed between the parentheses. May be worth noting that twtxt.net is displaying the twts with the subject stripped, so some piece of code is recognizing it as a subject (or, at least, something to be removed).

​ Read More
In-reply-to » @prologic Some criticisms and a possible alternative direction:

@falsifian@www.falsifian.org TLS won’t help you if you change your domain name. How will people know if it’s really you? Maybe that’s not the biggest problem for something with such low stakes as twtxt, but it’s a reasonable concern that could be solved using signatures from an unchanging cryptographic key.

This idea is the basis of Nostr. Notes can be posted to many relays and every note is signed with your private key. It doesn’t matter where you get the note from, your client can verify its authenticity. That way, relays don’t need to be trusted.

​ Read More

@prologic@twtxt.net earlier you suggested extending hashes to 11 characters, but here’s an argument that they should be even longer than that.

Imagine I found this twt one day at https://example.com/twtxt.txt :

2024-09-14T22:00Z Useful backup command: rsync -a “$HOME” /mnt/backup

Image

and I responded with “(#5dgoirqemeq) Thanks for the tip!”. Then I’ve endorsed the twt, but it could latter get changed to

2024-09-14T22:00Z Useful backup command: rm -rf /some_important_directory

Image

which also has an 11-character base32 hash of 5dgoirqemeq. (I’m using the existing hashing method with https://example.com/twtxt.txt as the feed url, but I’m taking 11 characters instead of 7 from the end of the base32 encoding.)

That’s what I meant by “spoofing” in an earlier twt.

I don’t know if preventing this sort of attack should be a goal, but if it is, the number of bits in the hash should be at least two times log2(number of attempts we want to defend against), where the “two times” is because of the birthday paradox.

Side note: current hashes always end with “a” or “q”, which is a bit wasteful. Maybe we should take the first N characters of the base32 encoding instead of the last N.

Code I used for the above example: https://fossil.falsifian.org/misc/file?name=src/twt_collision/find_collision.c
I only needed to compute 43394987 hashes to find it.

​ Read More

Google’s James Manyika: ‘The Productivity Gains From AI Are Not Guaranteed’
Google executive James Manyika has warned that AI’s impact on productivity is not guaranteed [Editor’s note: the link may be paywalled], despite predictions of trillion-dollar economic potential. From the report: “Right now, everyone from my old colleagues at McKinsey Global Institute to Goldman Sachs are putting out these extra 
 ⌘ Read more

​ Read More

I’ve been out a few hours again. I came across a dozen or so forest mice. I heard tons of squeaking and saw a lighting fast moving seething mass under leaves and groves. It was impossible to capture anything but I could watch it for two, three minutes. They even seemed to come as close as 20 centimeters judging by the rustle and moving plant leaves. Pretty cool.

But heaps of people had to fire up their noise machines today. That clouded my overall joy in nature. Once a commercial airliner was about to fade away in the distance, the next one already adumbrated itself. Lots of prop planes and even a helicopter. Obnoxious loud super cars and motorcycles with broken off mufflers or I don’t know what. My felt hat amplifies the sound I noted.

Luckily, the sun hid behind the clouds most of the time, so I survived the 25°C. Even hotter tomorrow, yikes!

https://lyse.isobeef.org/waldspaziergang-2024-04-07/

Image

​ Read More
In-reply-to » Fairfax County Running: 4.32 miles, 00:09:29 average pace, 00:41:01 duration decided to snake through the neighborhoods... rolling hills and quite a bit of traffic. my left knee and glute were piercing and it didn't stop throughout the day. it was better when i stood because sitting aggravated it more. #running #injury

@bmallred@staystrong.run notes from the diary

kept it easy since my left glute is a bit tight w/ some pain. just ran back and forth in the neighborhood hitting those rolling hills. nice chill to the air even though no rain.

​ Read More
In-reply-to » Maybe increase the amount of text we can type on twtxts? I am running out of space! :-)

@bender@twtxt.net I don’t mind the character limit. If I hit it and I still have more to say, it’s a good reminder that I should probably write a note instead. I like to POSSE anything that might have value outside of the current conversation.

​ Read More

Pinellas County - Easy: 3.13 miles, 00:08:27 average pace, 00:26:24 duration
felt crazy relaxed and easy breathing. i did notice at around the mile and a half point (11:30 in?) my HR jumped. around this time i also noticed i had to switch to more mouth breathing because my nose was running. going to try to take note of this because if it is a fault on the watch side then i can not consider it a reliable measurement.
#running

​ Read More

Linus Torvalds Has ‘Robust Exchanges’ Over Filesystem Suggestion on Linux Kernel Mailing List
Linus Torvalds had “some robust exchanges” on the Linux kernel mailing list with a contributor from Google. The subject was inodes, notes the Register, “which as Red Hat puts it are each ‘a unique identifier for a specific piece of metadata on a given filesystem.’”

Inodes have been the subj 
 ⌘ Read more

​ Read More

Update on my Fibre to the Premise upgrade (FTTP). NBN installer came out last week to install the NTD and Utility box, after some umming and arring, we figured out the best place to install it. However this mean he wasn’t able to look it up to the Fibre in the pit, and required a 2nd team to come up and trench a new trench and conduit and use that to feed Fibre from the pit to the utility box.

I rang up my ISP to find out when this 2nd team was booked, only to discover to my horror and the horror of my ISP that this was booked a month out on the 2rd Feb 2024! đŸ˜±

After a nice small note from my provider to NBN, suddenly I get a phone call and message from an NBN team that do trenching to say it would be done on Saturday (today). That got completed today (despite the heavy rain).

Now all that’s left is a final NBN tech to come and hook the two fibre pieces together and “light it up”! đŸ„ł

​ Read More

One thing to note about #AdventOfCode: It is really, really important to inspect your input data.

Your data could be considered part of the puzzle description. By inspecting it, you can find clues and you might find out that you can make certain assumptions.

(I mean, what’s the alternative? There could be a list of allowed assumptions in the textual descriptions, right? That wouldn’t be a lot of fun, I think, as it would give away too much information about the solution. It’s more interesting to find those clues yourself.)

​ Read More

Evernote Pushes Users To Upgrade
After making steep cuts to personnel earlier this year, Evernote’s Milan-based owner Bending Spoons is now experimenting with a new plan that would push more users to upgrade to paid versions of its service. From a report: The company confirmed to TechCrunch it’s been running a small test that placed limits on the number of notes free users could create, but said the new plan is not yet finalized. TechCrunch was al 
 ⌘ Read more

​ Read More

Since I have these simple, yet effective bash shell commands, which allow me to edit notes, plans, todos and statuses from the terminal, I feel liberated from overly complex software - everything is just text files and applications which come preinstalled on every Linux system.

​ Read More
In-reply-to » A GTK 4 application showing an empty window uses about 160 MB of RAM:

@movq@www.uninformativ.de
Doesn’t even compile on my system, which is apparently broken:

> cc -Wall -Wextra -o win win.c $(pkg-config --cflags --libs gtk4)                                                                                                        
cc: error: unrecognized argument in option ‘-mfpmath=sse -msse -msse2 -pthread -I/usr/include/gtk-4.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/graphene-1.0 -I/usr/lib/x86_64-linux-gnu/graphene-1.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgtk-4 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgraphene-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0’
cc: note: valid arguments to ‘-mfpmath=’ are: 387 387+sse 387,sse both sse sse+387 sse,387

​ Read More

Dear Stack Overflow, Inc.

Stack Overflow is being inundated with AI-generated garbage. A group of 480+ human moderators is going on strike, because:

Specifically, moderators are no longer allowed to remove AI-generated answers on the basis of being AI-generated, outside of exceedingly narrow circumstances. This results in effectively permitting nearly all AI-generated answers to be freely posted, regardless of established community consensus on such content.

In turn, this allows incorrect information (colloquially referred to as “hallucinations”) and plagiarism to proliferate unchecked on the platform. This destroys trust in the platform, as Stack Overflow, Inc. has previously noted.

It looks like StackOverflow Inc. is saying one thing to the public, and a very different thing to its moderators.

​ Read More

Still undecided between TiddlyWiki, DokuWiki, Bear, Benotes, Memos, my blog software, standardnotes, apple notes and more. I like them all quite a bit, but standardnotes, the only one that has reall multiplatform is so fucking complicated to host on your own and then they have this stupid offline subscription thing that allows rich text or the block editor that works like notion. I also found codex docs which is really really nice. Unfortunately they lack proper authentication. 1 / 2

​ Read More
In-reply-to » I played around with parsers. This time I experimented with parser combinators for twt message text tokenization. Basically, extract mentions, subjects, URLs, media and regular text. It's kinda nice, although my solution is not completely elegant, I have to say. Especially my communication protocol between different steps for intermediate results is really ugly. Not sure about performance, I reckon a hand-written state machine parser would be quite a bit faster. I need to write a second parser and then benchmark them.

making a note here to check this out.

​ Read More

@jlj@twt.nfld.uk @xuu@txt.sour.is hello! @prologic@twtxt.net and I were chatting about the question of globally deleting twts from the yarn.social network. @prologic@twtxt.net noted that he could build the tools and endpoints to delete twts, but some amount of cooperation from pod operators would be necessary to make it all work together. He asked me to spawn a discussion of the subject here, so here we are!

I don’t have enough technical knowledge of yarn.social to say with any credibility how it all should work, but I can say that I think it ought to be possible and it’d be good to do for those rare times when it’s needed.

​ Read More
In-reply-to » Progress! so i have moved into working on aggregates. Which are a grouping of events that replayed on an object set the current state of the object. I came up with this little bit of generic wonder.

(cont.)

Just to give some context on some of the components around the code structure.. I wrote this up around an earlier version of aggregate code. This generic bit simplifies things by removing the need of the Crud functions for each aggregate.

Domain Objects

A domain object can be used as an aggregate by adding the event.AggregateRoot struct and finish implementing event.Aggregate. The AggregateRoot implements logic for adding events after they are either Raised by a command or Appended by the eventstore Load or service ApplyFn methods. It also tracks the uncommitted events that are saved using the eventstore Save method.

type User struct {
  Identity string ```json:"identity"`

  CreatedAt time.Time

  event.AggregateRoot
}

// StreamID for the aggregate when stored or loaded from ES.
func (a *User) StreamID() string {
	return "user-" + a.Identity
}
// ApplyEvent to the aggregate state.
func (a *User) ApplyEvent(lis ...event.Event) {
	for _, e := range lis {
		switch e := e.(type) {
		case *UserCreated:
			a.Identity = e.Identity
			a.CreatedAt = e.EventMeta().CreatedDate
        /* ... */
		}
	}
}
Events

Events are applied to the aggregate. They are defined by adding the event.Meta and implementing the getter/setters for event.Event

type UserCreated struct {
	eventMeta event.Meta

	Identity string
}

func (c *UserCreated) EventMeta() (m event.Meta) {
	if c != nil {
		m = c.eventMeta
	}
	return m
}
func (c *UserCreated) SetEventMeta(m event.Meta) {
	if c != nil {
		c.eventMeta = m
	}
}
Reading Events from EventStore

With a domain object that implements the event.Aggregate the event store client can load events and apply them using the Load(ctx, agg) method.

// GetUser populates an user from event store.
func (rw *User) GetUser(ctx context.Context, userID string) (*domain.User, error) {
	user := &domain.User{Identity: userID}

	err := rw.es.Load(ctx, user)
	if err != nil {
		if err != nil {
			if errors.Is(err, eventstore.ErrStreamNotFound) {
				return user, ErrNotFound
			}
			return user, err
		}
		return nil, err
	}
	return user, err
}
OnX Commands

An OnX command will validate the state of the domain object can have the command performed on it. If it can be applied it raises the event using event.Raise() Otherwise it returns an error.

// OnCreate raises an UserCreated event to create the user.
// Note: The handler will check that the user does not already exsist.
func (a *User) OnCreate(identity string) error {
    event.Raise(a, &UserCreated{Identity: identity})
    return nil
}

// OnScored will attempt to score a task.
// If the task is not in a Created state it will fail.
func (a *Task) OnScored(taskID string, score int64, attributes Attributes) error {
	if a.State != TaskStateCreated {
		return fmt.Errorf("task expected created, got %s", a.State)
	}
	event.Raise(a, &TaskScored{TaskID: taskID, Attributes: attributes, Score: score})
	return nil
}
Crud Operations for OnX Commands

The following functions in the aggregate service can be used to perform creation and updating of aggregates. The Update function will ensure the aggregate exists, where the Create is intended for non-existent aggregates. These can probably be combined into one function.

// Create is used when the stream does not yet exist.
func (rw *User) Create(
  ctx context.Context,
  identity string,
  fn func(*domain.User) error,
) (*domain.User, error) {
	session, err := rw.GetUser(ctx, identity)
	if err != nil && !errors.Is(err, ErrNotFound) {
		return nil, err
	}

	if err = fn(session); err != nil {
		return nil, err
	}

	_, err = rw.es.Save(ctx, session)

	return session, err
}

// Update is used when the stream already exists.
func (rw *User) Update(
  ctx context.Context,
  identity string,
  fn func(*domain.User) error,
) (*domain.User, error) {
	session, err := rw.GetUser(ctx, identity)
	if err != nil {
		return nil, err
	}

	if err = fn(session); err != nil {
		return nil, err
	}

	_, err = rw.es.Save(ctx, session)
	return session, err
}

​ Read More