Searching txt.sour.is

Twts matching #updates
Sort by: Newest, Oldest, Most Relevant

iOS 17.2 Update for iPhone Released with Journal app, PDF Autofill, Messages Catch-up, etc
iOS 17.2 update for iPhone, and iPadOS 17.2 for iPad, have been released by Apple. iOS 17.2 includes the Journal app for iPhone, while both iOS 17.2 and iPadOS 17.2 include PDF autofill capabilities, some improvements to Messages app like the ability to add stickers from contextual menus in messages and a catch-up arrow, new … [Read More](https://osxdaily.com/2023/12/11/ios-17-2-update-released-download-i … ⌘ Read more

⤋ Read More

macOS Sonoma 14.2 Update Released with PDF Autofill, New Weather Widgets, etc
Apple has released macOS Sonoma 14.2 as a software update for Mac users running the Sonoma operating system. macOS Sonoma 14.2 includes a few minor new features like the ability to use autofill with PDF files, new Weather widget options, some minor additions to Messages like the ability to add stickers from the reactions contextual … Read MoreRead more

⤋ Read More

iOS 17.1.2 & iPadOS 17.1.2 Released for iPhone & iPad with Security Fixes
iOS 17.1.2 has been released for iPhone users, along with iPadOS 17.1.2 for iPad. The small software update includes security fixes and is recommended for all users to install onto their eligible devices. It is unclear if any bug fixes are included in the release, as none are mentioned in the release notes, which are … [Read More](https://osxdaily.com/2023/11/30/ios-17-1-2-ipados-1 … ⌘ Read more

⤋ Read More

MacOS Sonoma 14.1.2 Update Released with Security Fixes
macOS Sonoma 14.1.2 update has been released for Mac users running the Sonoma operating system. The software update includes unspecified bug fixes and security enhancements, and is recommended for all Mac users running Sonoma to install. Full release notes are included below. Separately, Apple has also released iOS 17.1.2 update for iPhone, and iPadOS 17.1.2 … [Read More](https://osxdaily.com/2023/11/30/macos-sonoma-14-1-2 … ⌘ Read more

⤋ Read More

Get the M3 iMac Default Wallpapers
Apple recently released updates to the iMac lineup, bumping the processor up to the all-new speedy M3 chip. And with new Macs means new default wallpapers, but you don’t have to buy an all new M3 iMac (though you can!) simply to appreciate and enjoy the new wallpapers. Click on any of the pictures below … Read MoreRead more

⤋ Read More

Apple Watch Battery Draining Rapidly? Don’t Miss the watchOS 10.1.1 Update
A fair number of Apple Watch users have been experiencing battery life issues lately, where the Apple Watch battery would drain much faster than expected or desired. In some instances, users would experience the Apple Watch battery draining from 100% to 50% or less in less than an hour, even with a perfectly healthy battery. … [Read More](https://osxdaily.com/2023/11/10/watchos-10-1-1-update-fixes-battery- … ⌘ Read more

⤋ Read More

How to Use Standby Mode on iPhone with iOS 17
StandBy Mode is perhaps the most interesting feature for iPhone users who update to iOS 17, transforming the iPhone into a customizable display clock whenever the iPhone is placed horizontally and is charging. With StandBy Mode, your iPhone can become a table clock, a photo frame, an information display, amongst other possibilities, and since it’s … Read MoreRead more

⤋ Read More

How to Use Standby Mode on iPhone with iOS 17
StandBy Mode is perhaps the most interesting feature for iPhone users who update to iOS 17, transforming the iPhone into a customizable display clock whenever the iPhone is placed horizontally and is charging. With StandBy Mode, your iPhone can become a table clock, a photo frame, an information display, amongst other possibilities, and since it’s … Read MoreRead more

⤋ Read More

iOS 17.1.1 Released for iPhone, & iPadOS 17.1.1 for iPad
Apple has released iOS 17.1.1 for iPhone, along with iPadOS 17.1.1 for iPad. The point release updates offer bug fixes and security enhancements, and are therefore recommended for all users to install on their devices. Specifically, iOS 17.1.1 fixes an issue where the Lock Screen Weather widget may not display snow correctly, and an issue … [Read More](https://osxdaily.com/2023/11/07/ios-17-1-1-released-for-iphone-ipad … ⌘ Read more

⤋ Read More

MacOS Sonoma 14.1.1 Released
Apple has released macOS Sonoma 14.1.1 for Mac users running the Sonoma operating system. The update is said to include bug fixes and security enhancements for Sonoma, though no bugs are specifically mentioned in the release notes, which are included below. Separately, Apple has released iOS 17.1.1 for iPhone, iPadOS 17.1.1 for iPad, watchOS 10.1.1 … Read MoreRead more

⤋ Read More

M3 MacBook Pro & iMac Released by Apple
Apple has used their Halloween-eve “Scary Fast” event to release updates to the MacBook Pro and iMac lineup, both featuring the all-new M3 processor. And, for the MacBook Pro, there’s an all new Space Black color option, but only for the M3 Pro and M3 Max versions of that computer. M3 MacBook Pro Series The … Read MoreRead more

⤋ Read More

Release Radar · Hacktoberfest 2023 Edition
As Hacktoberfest comes to a close, you still have a day or so left to complete and submit your pull requests. If you’re struggling to think of projects to contribute to, our picks below might help you. This edition of the Release Radar covers a few projects that shipped major version updates this August and […]

The post Release Radar · Hacktoberfest 2023 Edition appeared first on [The GitHub Blog](https://github.bl … ⌘ Read more

⤋ Read More

How to change media sync options on iPhone & iPad to make more storage available
If you’re trying to use a Mac to update iOS on iPhone or iPadOS on iPad, you may see an error message that says something along the lines of “Updating to iOS 17.1 requires at least 975.2 MB of free space on your iPad. Please change your media sync options to make more storage available.” … [Read More](https://osxdaily.com/2023/10/28/how-to-change-media-sync-options-on-ip … ⌘ Read more

⤋ Read More

MacOS Ventura 13.6.1 and MacOS Monterey 12.7.1 Released
Apple has released MacOS Ventura 13.6.1 and MacOS Monterey 12.7.1 for Mac users who have not yet updated to macOS Sonoma. The macOS software updates include security enhancements, and come alongside Safari 17.1 as well. Separately, macOS Sonoma 14.1 has also been released, alongside iOS 17.1 update to iPhone, iPadOS 17.1 for iPad, iOS 16.7.2, … [Read More](https://osxdaily.com/2023/10/26/macos-ventura-13-6-1-and-macos-mont … ⌘ Read more

⤋ Read More

iOS 16.7.2, iPadOS 16.7.2, iOS 15.8, & iPadOS 15.8 Released for Older iPhone & iPad Models
Apple has released a series of software updates for older model iPhone and iPad devices, that have either not yet updated to iOS 17 and iPadOS 17, or are not able to run those versions of system software. The updates include important security fixes, and are therefore recommended for all users to install, especially if … [Read More](https://osxdaily.c … ⌘ Read more

⤋ Read More

iOS 17.1 Update Released for iPhone, & iPadOS 17.1 for iPad
Apple has released iOS 17.1 for iPhone, and iPadOS 17.1 for iPad, as the first major point release updates to the iOS 17 and iPadOS 17 system software versions. iOS 17.1 and iPadOS 17.1 include bug fixes, security enhancements, as well as some new features, like the ability to continue AirDrop transfers over the internet … [Read More](https://osxdaily.com/2023/10/25/ios-17-1-update-released-for-iphone-ipados-17-1 … ⌘ Read more

⤋ Read More

MacOS Sonoma 14.1 Update Released for Mac
Apple has released MacOS Sonoma 14.1 for Mac users running the Sonoma operating system. The software update includes a handful of bug fixes and security enhancements, but no significant new features are included. Full release notes are included below. Separately, Apple has also released iOS 17.1 for iPhone, iPadOS 17.1 for iPad, updates to watchOS, … Read MoreRead more

⤋ Read More

Apple Event Scheduled for October 30, Grab a Cool Spooky Mac Wallpaper to Match
Apple has announced a special event for the evening of October 30, titled “Scary Fast”. The event is widely assumed to be focused on the Mac, due to the event webpage having an Apple logo that morphs into the Finder icon, perhaps with refreshed updates to the iMac and MacBook line. Obviously the name “Scary … [Read More](https://osxdaily.com/2023/10/24/apple-event-scheduled-fo … ⌘ Read more

⤋ Read More

Get a Personal Update from Siri on iPhone, iPad, Mac
Siri has a neat largely unknown feature called Personal Update, that, when requested, will give you a summary of information from various apps that you may find useful. Specifically, Personal Update will give you the weather forecast for the day, whatever your calendar events that day are, your reminders, an travel time estimate to locations … [Read More](https://osxdaily.com/2023/10/11/get-a-personal-update-from-siri-on-iphone-ip … ⌘ Read more

⤋ Read More

iOS 16.7.1 Released for iPhones & iPads Not Running iOS 17
Apple has released iOS 16.7.1 and iPadOS 16.7.1 for iPhone and iPad users who are not running iOS 17 and iPadOS 17 on their respective devices. For most users, the 16.7.1 update will be available on an older device that doesn’t support the 17 versions of iOS/iPadOS, which includes iPhone 8 series, iPhone X, iPad … [Read More](https://osxdaily.com/2023/10/10/ios-16-7-1-released-for-iphones-ipads-not-running-ios-17/ … ⌘ Read more

⤋ Read More

How to Install macOS Monterey/Ventura Updates Without Installing Sonoma
While many Mac users have already downloaded and installed MacOS Sonoma onto their Macs and are enjoying the great new features, not every Mac user wants to upgrade to Sonoma. In fact, many Mac users want to stay put with macOS Monterey, or MacOS Ventura, and not upgrade to MacOS Sonoma for now, or even … Read MoreRead more

⤋ Read More

iOS 17.0.3 Released to Fix Overheating iPhone 15 Pro Problem
Apple has released iOS 17.0.3 for iPhone to address an issue where many iPhone 15 Pro users were experiencing overheating iPhones and slow performance sometimes along with rapid battery drain. The update is recommended for all iPhone users to install, even though apparently the overheating issue is limited to iPhone 15 Pro devices. While a … [Read More](https://osxdaily.com/2023/10/04/ios-17-0-3-released-to-fix-o … ⌘ Read more

⤋ Read More

How to Install iPadOS 17 Update on iPad
Now that iPad users can update to iPadOS 17, have you done so? If not, you’re certainly not alone, as a lot of people sit on the sidelines with no particular rush to install the latest system software versions. But iPadOS 17 offers some nice improvements, like interactive widgets, FaceTime Video Voicemail, new Messages features, … Read MoreRead more

⤋ Read More

How to Install iOS 17 on iPhone
Installing iOS 17 onto your iPhone is easy to do, and you’ll gain access to the neat new features available in iOS 17. This includes everything from customizable contact cards, FaceTime Video voicemail, interactive widgets on your Home Screen, NameDrop easy contact sharing, new stickers features in Messages, new ringtones and text tones, new autocorrect … Read MoreRead more

⤋ Read More

How to Stop Getting Beta MacOS Updates in MacOS Sonoma
If you’ve already installed and updated to MacOS Sonoma, and you were previously in the beta testing programs (either public beta or developer beta), you may wish to no longer receive beta updates to your Mac. If you don’t do this, and you were previously enrolled in the MacOS Sonoma beta testing program, you will … Read MoreRead more

⤋ Read More

How to Remove iOS 17 Beta From Your iPhone & iPad
If you were part of the iOS 17 beta test or iPadOS 17 beta testing programs, and now you’re on the latest stable build (iOS 17.0.2), you may wish to remove the beta updates from your iPhone or iPad, so that you no longer receive beta updates and stay on the stable builds of system … Read MoreRead more

⤋ Read More

MacOS Sonoma 14.1 Beta Available to Download
Apple has issued the first beta version of MacOS Sonoma 14.1 beta to users enrolled in the beta testing program for Apple system software. The beta update arrives just a day after the final release and availability of MacOS Sonoma 14.0 became available to download and install for all Mac users. Separately, Apple has released … Read MoreRead more

⤋ Read More

** Updates from the end of summer **
Today was the last real day of summer for us. Tomorrow the kids go back to school.

Image

You know those last few weeks before the dark of autumn — the ones that hold the last bursts of summer? Those days where you try to squeeze in as many chill summer vibes as humanly possible?

I’ve bee … ⌘ Read more

⤋ Read More

Release Radar · July 2023 Edition
After the last Release Radar, I promised the next one wouldn’t be far away, so here it is. This is the low down on some of the best open source projects that shipped major version updates in July. There’s lots of cool stuff from natural language processing, to APIs, money, and SDKs. I won’t spoil […]

The post Release Radar · July 2023 Edition appeared first on The GitHub Blog. ⌘ Read more

⤋ Read More

Smarter, more efficient coding: GitHub Copilot goes beyond Codex with improved AI model
We’re thrilled to announce two major updates to GitHub Copilot Code Complete’s AI capabilities that will help developers work even more efficiently and effectively. ⌘ Read more

⤋ Read More

Closing vulnerabilities in Decidim, a Ruby-based citizen participation platform
This blog post describes two security vulnerabilities in Decidim, a digital platform for citizen participation. Both vulnerabilities were addressed by the Decidim team with corresponding update releases for the supported versions in May 2023. ⌘ Read more

⤋ Read More
In-reply-to » (#khu32eq) @xuu "yet"? It's supported ipv6 for like 6 years now.

My home ISP has had a few prefixes allocated. They haven’t rolled of out yet because their custom CRM system needs to be updated to be able to allocate/bill for it. Along other reasons they gave when I asked last.

⤋ Read More
In-reply-to » been using the iphone for some days now, and I must say im impressed. I really like it. I will not buy android phone ever again.

Funny.. I would never buy an iPhone again. My wife switched back this last phone update and I can’t stand the interface.

⤋ Read More

GitHub’s revamped VIP Bug Bounty Program
GitHub’s VIP Bug Bounty Program has been updated to include a clear and accessible criteria for receiving an invitation to the program and more. Learn more about the program and how you can become a Hacktocat, and join our community of researchers who are contributing to GitHub’s security with fun perks and access to staff and beta features! ⌘ Read more

⤋ Read More

Unlocking inclusive design: how Primer’s color system is making GitHub.com more inclusive
How Primer’s updated light and dark theme color contrast strategy resolved hundreds of color-contrast-related accessibility issues over one thousand use cases. ⌘ Read more

⤋ Read More
In-reply-to » @darch I think having a way to layer on features so those who can support/desire them can. It would be best for the community to be able to layer on (or off) the features.

@xuu@txt.sour.is @prologic@twtxt.net Yarn.social without threading (as it would be the case in a “truncated” feed) does not make sense to me.

Put another way: Yarn.social is not twtxt. The content that we all have in our feeds really is much closer to a web forum or usenet or whatever. It’s threaded conversations. twtxt, as I believe it was originally intended, are short little status updates – that’s it. The formats of Yarn.social and twtxt might be very similar, but the content is vastly different and, in a way, incompatible. (As such, I think I understand very well that the original twtxt crowd is disgruntled.)

That proposed truncated feed doesn’t really provide any value, if you ask me. 🤔 It’d just be chaotic.

⤋ Read More

Pwning Pixel 6 with a leftover patch
In this post, I’ll look at a security-related change in version r40p0 of the Arm Mali driver that was AWOL in the January update of the Pixel bulletin, where other patches from r40p0 was applied, and how these two lines of changes can be exploited to gain arbitrary kernel code execution and root from a malicious app. This highlights how treacherous it can be when backporting security changes. ⌘ Read more

⤋ Read More
In-reply-to » Posting from c++, fltk GUI.

Got the cmake file updated, compiles and now it opens a GTK window, need to add the timeline and buttons that I had in FLTK, the other code related to parsing the statuses and all that is independent from the GUI so it’ll be pretty quick to switch over once I have defined the new GUI elements.

⤋ Read More

GitHub Enterprise Server 3.8 is now generally available
With updates to GitHub Actions, repositories, and GitHub Advanced Security, this new version of GitHub Enterprise Server is focused on bringing the best developer experience to companies. ⌘ Read more

⤋ Read More

📣 Update on Activity Pub: Just a quick update on the Yarn.social <-> Activity Pub (aka Mastodon and others):

  • Can follow other Activity Pub actors ✅
  • Can be followed by other Activity Pub actors ✅
  • Your posts can be seen by Activity Pub actors ✅
  • You can see posts from Activity Pub actors ✅

What does not yet work:

  • Translating replies (aka threading) ❌

⤋ Read More

Lindypress Bug Fix
Just a brief note that for the past couple of days, you might’ve been unable to buy books on LindyPress.net if you are in the United States, Canada or Australia (which is a lot of you). This has now been fixed, so you can place your orders now!

The issue was that there was a silent API update that kept addresses from validating states and provinces. Note that if your order placed, it’s all okay, this is only for people for whom the site would not let place an order.
… ⌘ Read more

⤋ Read More

** Accessibility updates **
I’m feeling pretty chuffed! Last week I wrote about my intention to make this website more accessible. My motivations were many-fold, but, primarily, mostly shame. I’ve worked as an accessibility specialist in the past, and now spend a bunch of my days at work looking for ways to make public infrastructure online more accessible. It seemed fitting to at least make sure the little bit I contribute to the web here is also accessible.

I thought it was going t … ⌘ Read more

⤋ Read More

In reply to: Oatmeal - week notes

The worst kind of blogging is blogging about blogging, so, I’ll keep this blogging about blogging short!

I’ve made some minor updates to the design of the website that have improved it’s usability a wee bit, and are a step in the right direction toward upping my accessibility game. The major remaining accessibility issues are around color contrast and some structura … ⌘ Read more

⤋ Read More

I’ll visit South-East Europe (Greece, Albania, Montenegro, Constantinople) this Summer
I’ll be in south eastern Europe this summer (of 2023) in late June and early July.

Specific plans are still in the air, but I’ll be visiting Greece, Albania, Montenegro and possibly the European side of Turkey.
I’ll also be in Kosovo, and while I know I have some fans in Serbia, I’m not sure I can cross into Serbia proper easily since the US accepts Kosovo as independent, but I believe that being there would be a … ⌘ Read more

⤋ Read More

H3: Instead of C3
[Updated with correct Gemlog link.]

A version of this was posted on on 2023-01-06 but I thought it might
also fit here. Go to my gemlog for somewhat more personal takes and
see what I publish first. IPv6 only!

gemini://gem.hack.org/mc/log/

As long-time readers know I have participated in the Chaos
Communication Congress (C3) in Germany every year since 2008.

Since C3 was cancelled this year I thought I’d arrange a very small
conference of my own. I would at least try to gather some friends and
acquaintances … ⌘ Read more

⤋ Read More

Unlocking security updates for transitive dependencies with npm
How Dependabot integrated with npm to address security vulnerabilities on transitive dependencies and increase the likelihood of success for JavaScript security updates by 40%. ⌘ Read more

⤋ Read More

@prologic@twtxt.net I have updated to kinda follow this. It now redirects to other webfingers if the resource has a different hostname. I’m still not sure what I should put multiple services with the same domain name. Like if they were to have conflicting properties.

⤋ Read More
In-reply-to » I decided to become popular in decentralized social networks. 1. Pixelfed: https://pixelfed.social/win0err — mostly landscape photography; 2. Mastodon: https://mastodon.online/@win0err — software engineering content

@lyse@lyse.isobeef.org: Thank you, it’s really nice to hear that! Sometimes I think I’m a moss, because I really love northern nature :D Pixelfed is very slow indeed, and also buggy. @prologic@twtxt.net: I plan to add an RSS feed for the photography page instead of cross-posting to twtxt.txt. Maybe I should post updates of my website here? For example, I made a fancy New Year’s design of https://kolesnikov.se (which makes @lyse@lyse.isobeef.org’s eyes hurt, haha)

⤋ Read More
In-reply-to » I switched from twtxt client to twtwt (https://github.com/win0err/twtwt). It's a pre-alpha version now, but it works pretty well and so much faster than the official twtxt client by @buckket. Feel free to check it out :-)

@prologic@twtxt.net: Hmm, I just checked, it should work. Anyway, I will post updates about the project. First of all, I want to complete some features and create packages with pre-compiled binaries

⤋ Read More

Retiring My Fiat Donation Portal
I’ve decided to retire my fiat donation portal at donate.lukesmith.xyz, where people could donate to me via debit and credit cards.
This will happen by the end of this calendar year.

It’s more in keeping with my principles of free software, self-ownership and everything else to only allow cryptocurrency donations.
This also is a subtle nudge to people who want to donate in streams to get into Bitcoin and Monero, as opposed to using fiat o … ⌘ Read more

⤋ Read More
In-reply-to » I made a thing. Its a multi password type checker. Using the PHC string format we can identify a password hashing format from the prefix $name$ and then dispatch the hashing or checking to its specific format.

Circling back to the IsPreferred method. A hasher can define its own IsPreferred method that will be called to check if the current hash meets the complexity requirements. This is good for updating the password hashes to be more secure over time.

func (p *Passwd) IsPreferred(hash string) bool {
	_, algo := p.getAlgo(hash)
	if algo != nil && algo == p.d {

		// if the algorithm defines its own check for preference.
		if ck, ok := algo.(interface{ IsPreferred(string) bool }); ok {
			return ck.IsPreferred(hash)
		}

		return true
	}
	return false
}

https://github.com/sour-is/go-passwd/blob/main/passwd.go#L62-L74

example: https://github.com/sour-is/go-passwd/blob/main/pkg/argon2/argon2.go#L104-L133

⤋ Read More
In-reply-to » I made a thing. Its a multi password type checker. Using the PHC string format we can identify a password hashing format from the prefix $name$ and then dispatch the hashing or checking to its specific format.

Here is an example of usage:

func Example() {
	pass := "my_pass"
	hash := "my_pass"

	pwd := passwd.New(
		&unix.MD5{}, // first is preferred type.
		&plainPasswd{},
	)

	_, err := pwd.Passwd(pass, hash)
	if err != nil {
		fmt.Println("fail: ", err)
	}

	// Check if we want to update.
	if !pwd.IsPreferred(hash) {
		newHash, err := pwd.Passwd(pass, "")
		if err != nil {
			fmt.Println("fail: ", err)
		}

		fmt.Println("new hash:", newHash)
	}

	// Output:
	//  new hash: $1$81ed91e1131a3a5a50d8a68e8ef85fa0
}

This shows how one would set a preferred hashing type and if the current version of ones password is not the preferred type updates it to enhance the security of the hashed password when someone logs in.

https://github.com/sour-is/go-passwd/blob/main/passwd_test.go#L33-L59

⤋ Read More

To infinity and beyond: enabling the future of GitHub’s REST API with API versioning
We’re introducing calendar-based versioning for our REST API, so we can keep evolving our API, whilst still giving integrators a smooth migration path and plenty of time to update their integrations. ⌘ Read more

⤋ Read More
In-reply-to » Tried to pull down the latest yarn, but I get this: unable to access 'https://git.mills.io/yarnsocial/yarn/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

@prologic@twtxt.net Tried that - but that did not seem to change anything. But still - worth to do the update anyways, that way I do not have to worry about that for a good while. It’s a pain when it falls too far behind.

⤋ Read More
In-reply-to » Hmmm, after fixing my feeds to move the <author> from <entry>s to <feed>, Newsboat marked all old affected articles as unread. IDs were untouched, of course. Need to investigate that. Had something similar happen with another feed change I did some time ago. Can't remember what that was, though.

Great, last system update broke something, building from current master I get:

/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: unknown type [0x13] section `.relr.dyn'

What the heck!?

And it also appears that I’m not really able to reproduce this unread bug. It only kind of works a single time. And it has something to do with my config. Not sure what it is yet. I also noticed that the <updated> timestamps in the entries somehow shifted between the old and new feed. Da fuq!?

⤋ Read More
In-reply-to » Trying to figure out what sql query maddy does to change user passwords, but first, i'm looking for the subcommand that actually does that... on the source code

it uses the queries you define for add/del/set/keys. which corrispond to something like INSERT INTO <table> (key, value) VALUES ($key, $value), DELETE ..., or UPDATE ...

the commands are issued by using the maddycli but not the running maddy daemon.

see https://maddy.email/reference/table/sql_query/

the best way to locate in source is anything that implements the MutableTable interface… https://github.com/foxcpp/maddy/blob/master/framework/module/table.go#L38

⤋ Read More

Release Radar · August 2022 Edition
We’ve been gearing up to launch GitHub Universe 2022 and our community has been launching cool projects left right and center.  These projects include everything from world-changing technology to developer tooling, and weekend hobbies. Here are some of the open source projects that released major version updates this August. Read more about these projects in […] ⌘ Read more

⤋ 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
In-reply-to » Hi, I am playing with making an event sourcing database. Its super alpha but I thought I would share since others are talking about databases and such.

I have updated my eventDB to have subscriptions! It now has websockets like msgbus. I have also added a in memory store that can be used along side the disk backed wal.

⤋ Read More

Kids are in bed, dog is sleeping, Marlyn is watching Tv, and I’m on the computer trying to figure out what to do for the rest of the night. Last week of vacation now, so I get more and more interrested in doing things on the computer. Played around a bit with my Risc-v SBC today (Mangopi), it runs debian, got everything updated and all that, thinking about setting up a webserver on it. It has 512mb ram, so it should be fine to host some static website on it.

⤋ Read More

Release Radar · July 2022 Edition
While some of us have been wrapping up the financial year, and enjoying vacation time, others have been hard at work shipping open source projects and releases. These projects include everything from world-changing technology to developer tooling, and weekend hobbies. Here are some of the open source projects that released major version updates this July. […] ⌘ Read more

⤋ Read More

Release Radar · June 2022 Edition
It’s been a crazy couple of months with the end of financial year and lots of products shipping. Our community has been hard at work shipping projects too. These projects can include everything from world-changing technology to developer tooling, and weekend hobbies. Here are some of these open source projects that released major updates this […] ⌘ Read more

⤋ Read More
In-reply-to » I launched a new version of my website (https://kolesnikov.se) last night. What do you think about it? Don't forget to leave a message in my guestbook ;-)

@win0err@kolesnikov.se I agree with @prologic@twtxt.net about the text size. Adding content="width=device-width" to your viewport meta tag will help massively with scaling on different device widths.

Eg. The first screenshot is the current site with a device width of 440px and the second is with the updated viewport meta tag.


Other than that, I like the aesthetic of it 😊 It gives me early-ish internet vibes, which I wasn’t online for (I’m a ‘90s baby) but I’ve seen some pretty early websites.

⤋ Read More