Historical Dates
⌘ Read more
🌠 Dataview Example Vault, Book Club, & Ecosystem Stats
Memes about minimalism, bullet backlinks plugin, timeshifting, a book club, and an upcoming mystery event. ⌘ Read more
Soccer Mommy x Magdalena Bay – Shotgun (Mag Bay remix)
In the unexpected crossover event of the year (so far), Mag Bay turns Soccer Mommy’s anthemic song-of-the-year contender “ Shotgun” into a wavy synth banger, complete with cute shotgun sounds… Continue reading… ⌘ Read more
(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 ObjectsA 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
}
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.
type PA[T any] interface {
event.Aggregate
*T
}
// Create uses fn to create a new aggregate and store in db.
func Create[A any, T PA[A]](ctx context.Context, es *EventStore, streamID string, fn func(context.Context, T) error) (agg T, err error) {
ctx, span := logz.Span(ctx)
defer span.End()
agg = new(A)
agg.SetStreamID(streamID)
if err = es.Load(ctx, agg); err != nil {
return
}
if err = event.NotExists(agg); err != nil {
return
}
if err = fn(ctx, agg); err != nil {
return
}
var i uint64
if i, err = es.Save(ctx, agg); err != nil {
return
}
span.AddEvent(fmt.Sprint("wrote events = ", i))
return
}
This lets me do something like this:
a, err := es.Create(ctx, r.es, streamID, func(ctx context.Context, agg *domain.SaltyUser) error {
return agg.OnUserRegister(nick, key)
})
I can tell the function the type being modified and returned using the function argument that is passed in. pretty cray cray.
お知らせ:制御システムセキュリティカンファレンス2023講演募集(Call for Presentation) ⌘ Read more
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.
It’s super basic. Using tidwall/wal as the disk backing. The first use case I am playing with is an implementation of msgbus. I can post events to it and read them back in reverse order.

I plan to expand it to handle other event sourcing type things like aggregates and projections.
Find it here: sour-is/ev
@prologic@twtxt.net @movq@www.uninformativ.de @lyse@lyse.isobeef.org
Streamline virtual hackathon events with the new Hackathon In The Cloud Experience
Attention all students! Make managing your virtual hackathon events even easier with the new Hackathon In The Cloud Experience. ⌘ Read more
lw events should give one the ability to report probabilities
trackbar.pl and nickcolor.pl as super-essentials. Also trying window_switcher.pl. Somehow my custom binds for Ctrl+1/2/3/etc. to switch to window 1/2/3/etc. doesn't do anything: { key = "^1"; id = "change_window"; data = "1"; } (I cannot use the default with Alt as this is handled by my window manager). Currently, I'm just cycling with Ctrl+N/P. Other things to solve in the near future:
Alright, grepping for line in ~/.weechat made me realize to /set weechat.look.read_marker_always_show on. I also added a new trigger that matches everthings and then beeps (I should probably exclude join and part events). I didn’t realize the default beep trigger is only for highlights and private messages.
UK’s Johnson says don’t boycott Indonesia G20 summit if ‘pariah figure’ Putin attends
Boris Johnson said snubbing the November event in Bali would hand a ‘propaganda opportunity to others’. ⌘ Read more
More than 10 journalists denied permission to cover Hong Kong handover anniversary events due to security reasons, reporters’ group says
Post photographer among those denied permission to cover celebratory events on July 1. Other rejected applicants include photographer from Information Services Department and journalists from Reuters and Agence France-Press. ⌘ Read more
China’s vice-president to attend Marcos inauguration in Philippines
Wang Qishan will be Xi Jinping’s special representative at event on Thursday. ⌘ Read more
Tuvalu minister pulls out of UN Ocean Conference after China blocks its Taiwanese delegates
Foreign Minister Simon Kofe reportedly withdrew from the event after China objected to the presence of Taiwanese delegates. ⌘ Read more
China changes law so it can act if country is insulted at sporting events
National People’s Congress Standing Committee passes revision to the Law on Physical Culture and Sports, but there are no details on what constitutes an infringement of rights or dignity. ⌘ Read more
Hong Kong PLA garrison to be combat-ready for ‘toughest and most complicated’ situations amid security threats, commander vows
Major General Peng Jingtang makes promise ahead of President Xi Jinping’s attendance at events celebrating 25th anniversary of city’s handover. ⌘ Read more
Chinese authorities unveils plans to ‘maximise display of police force’ two weeks after group assault on women
New public security minister Wang Xiahong promises 100-day ‘hard-fist’ campaign to target criminals in run-up to year’s biggest political event ⌘ Read more
Norway ‘hate’ shooting kills 2 in gay bar rampage hours before Pride march
10 people were also seriously injured in the early-hours tragedy shortly before the city’s LGBT community was due to hold its annual Pride event; police have ‘reason to think this may be a hate crime’. ⌘ Read more
Xi Jinping to attend 25th anniversary celebrations of Hong Kong’s return to Chinese sovereignty and swearing-in of new city leader John Lee
President Xi Jinping will officiate the event to mark quarter-century of Chinese sovereignty over city and swearing-in of new city leader. ⌘ Read more
Hong Kong Book Fair to begin on July 20 but some publishers banned with ‘no reason’
This year’s event is themed ‘Reading the World: Stories of Hong Kong’. ⌘ Read more
US-China tech war: top Chinese scientist envisions forked RISC-V chip design standard to cushion decoupling impact
Chinese Academy of Sciences expert Bao Yungang said the country could handle sanctions better than Russia by developing a ‘RISC-X’ chip architecture to be used by Belt and Road countries in the event of technological decoupling. ⌘ Read more
Coronavirus: hotel quarantine for top Hong Kong officials, advisers and lawmakers cut to 1 day ahead of July 1 celebrations; city logs 1,186 local cases
According to a memo seen by the Post, guests at celebratory events to mark handover will have to undergo seven days of self-management from June 23 to 29. ⌘ Read more
World swimming’s governing body bans transgender athletes from women’s events
Fina members voted 71.5 per cent in favour of its new ‘gender inclusion policy’ that only permits swimmers who transitioned before age 12 to compete in women’s events. ⌘ Read more
Philippines: Duterte’s daughter Sara sworn in early as vice-president
Sara Duterte-Carpio’s six-year term with President-elect Ferdinand Marcos Jnr does not officially start until June 30, when he will be inaugurated. Marcos was at Sunday’s swearing in event, as was current leader President Rodrigo Duterte. ⌘ Read more
Boris sings out for Ukraine: UK PM Johnson says nation deserves to host Eurovision
British PM says Ukraine, winner of this year’s contest, ‘can have it’, ‘should have it’ in 2023. European Broadcasting Union has ruled the event cannot take place in the war-torn country, but its public broadcaster wants more negotiations. ⌘ Read more
Singapore’s Pink Dot gay pride rally returns, as MP from ruling party attends for first time – and in a pink T-shirt
After two years of Covid postponements, LGBT event returns, with excitement that archaic colonial-era Section 377A Penal Code law criminalising sex between men will soon be repealed. ⌘ Read more
Chinese President Xi Jinping to host virtual BRICS summit
The event takes place in the shadow of Russia’s war in Ukraine and Moscow is keen to develop links with other emerging economies after being hit by sanctions. ⌘ Read more
Chinese destroyer on long-distance exercises in Sea of Japan, to deter ‘attack on Taiwan’
Japan’s Defence Ministry said 3 ships were spotted on Sunday travelling toward Sea of Japan. Global Times reported the mission was part of China’s military build-up aimed at deterring a foreign intervention in the event of an attack on Taiwan. ⌘ Read more
SCMP picks Catherine So as chief executive, tapping Hong Kong media and tech veteran to run one of Asia’s oldest English newspapers
Liu, who has led the newspaper for five and half years, fundamentally transformed one of Asia’s oldest newspapers into a 21st-century information product that reacted to news events and responded to readers’ preferences in real time. ⌘ Read more
How can the United States build its Open Source Software policy?
We share a recap of a recent roundtable event about what a federal open source software policy could look like in the United States. ⌘ Read more
Health Data
⌘ Read more
Health Data
⌘ Read more
githubevents - GitHub webhook events toolset for Go
1 points posted by cbrgm ⌘ Read more
Your guide to GitHub InFocus: Improving the way software development teams work in 2022
We’re kicking off InFocus, a global virtual event focused on accelerating, securing, and improving the way software development teams work. ⌘ Read more
The wild events that nearly took down the QB64 project (but, thankfully, didn’t)
A story of crazy drama within an amazing Open Source project. ⌘ Read more
Lunduke Journal Events for April - BBS Game Tournament, Linux Sucks, Hangout
Just some nerdy fun. ⌘ Read more
#event Upcomming Meetup in Copennhagen: algolab(the_art_of_live_coding) @ Støberiet / Computer Klub
Erlang Solutions: FinTech Matters newsletter | March 2022
Subscribe to receive FinTech Matters and other great content, notifications of events and more to your inbox, we will only send you relevant, high-quality content and you can unsubscribe at any time.
Read on to discover what really matters for tech in fina … ⌘ Read more
Docker’s Response to the Invasion of Ukraine
Docker is closely following the events surrounding the Russian invasion of Ukraine. The community of Docker employees, Docker Captains, developers, customers, and partners is committed to creating an open, collaborative environment that fosters the free and peaceful exchange of ideas. The tragedy unfolding in Ukraine is in opposition to what our community stands for and […]
The post [Docker’s Response to the Invasion of Ukraine](https://www.docker.co … ⌘ Read more
Modern society compels us to avoid uncomfortable introspection, but current events repeatedly show us how necessary that introspection is.
Event: Generics in Go 1.18 - Introduced using a practical example
Go 1.18 is about to be released (or it is already depending when you’re reading this). One of the big things in it are generics. Axel Wagner will introduce us to generics using a practical example. 1 points posted by Sascha Andres ⌘ Read more
Twosday
Because today is 22-2-22, or 2-22-22, or 2022-2-22, it makes it worth for me to come here, after so many months of silence, to mark the event. So, happy Twosday, everyone! ⌘ Read more
DockerCon: What Makes a Successful CFP Submission
The DockerCon 2022 Call for Papers is now open! DockerCon is one of the largest developer events in the world, with over 80,000 developers registering for each of the last two events. At the core of DockerCon is the chance for members of the community to share their tips, tricks, best practices and real-world experiences […]
The post [DockerCon: What Makes a Successful CFP Submission](https://www.docker.com/blog/dockercon-what-makes-a-succe … ⌘ Read more
Poor night of sleep, woke up late, and spilled a full cup of milk in my car. I hope that’s the last of the unfortunate events today!
Release Radar · December 2021 Edition
Many of us were wrapping up projects, emails, events, and getting ready for Christmas. While we were all busy getting ready for the festive season, our community was still hard at work shipping open source ⌘ Read more
Erlang Solutions: FinTech Matters newsletter | January 2022
Subscribe to receive FinTech Matters and other great content, notifications of events and more to your inbox, we will only send you relevant, high-quality content and you can unsubscribe at any time.
Read on to discover what really matters fo … ⌘ Read more
GoCN 每日新闻 (2021-12-30)
GoCN 每日新闻 (2021-12-30)
- 如何在 Go 中将 [] byte 转换为 io.Reader?https://mp.weixin.qq.com/s/nFkob92GOs6Gp75pxA5wCQ
- 彻底搞懂 Kubernetes 中的 Eventshttps://mp.weixin.qq.com/s/QRIck4M1-CJVrVDoJEsjQA
- 对比 Rust 和 Go 对二进制数据处理[https://medium.com/@protiumx/advent-of-code-rust-go-and-binary-operators-7dd03057c134](https://medium.com/@protiumx/advent-o … ⌘ Read more
直播预告丨和我们一起过圣诞吧!Hackathon 创意攻略等你查收
叮叮当~ 叮叮当~ 圣诞节马上到啦~TiDB Hackathon 2021 的战队集结也接近尾声,已经报名的小伙伴是不是已经等不及啦?2022年1月8日- 9 日,各位小伙伴就要同台竞技啦!( 点击 链接 **,立即� … ⌘ Read more
Prosodical Thoughts: Prosody 0.11.11 released
We are pleased to announce a new minor release from our stable branch.
This release contains some fixes to PEP to control memory usage, along
with a small batch of fixes for issues discovered since the last
release.
This will likely be the last release of the 0.11 branch.
A summary of changes in this release:
Fixes and improvements- net.server_epoll: Prioritize network events over timers to improve performance under heavy load
- mod_p … ⌘ Read more
Docker Community All Hands: Event Recap, December 2021
One year ago, we kicked off the Community All Hands (CAH) event. The goal was to bring together Docker staff and community members for the latest product updates. This time, we’ve evolved the CAH to include multiple community tracks that give our amazing community members the opportunity to share their knowledge and expertise. The event […]
The post [Docker Community All Hands: Event Recap, December 2021](https://www. … ⌘ Read more