GitHub and the Ekoparty 2022 Capture the Flag
Learn about the design behind, and solutions to, several of GitHub’s CTF challenge for Ekoparty’s 2022 event! ⌘ Read more
Unlikely events can be good, likely events can be bad.
Erlang Solutions: Change data capture with Postgres & Elixir
CDC is the process of identifying and capturing data changes from the database.
With CDC, changes to data can be tracked in near real-time, and that information can be used to support a variety of use cases, including auditing, replication, and synchronisation.
A good example of a use case for CDC is to consider an application which inserts a record into the database and pushes an event to a message queue after the record has … ⌘ Read more
Erlang Solutions: Advent of Code 2022 – Every Puzzle Solved in Erlang
Day 1Christmas is getting closer and with that, the annual Advent of Code begins. For those who do not know, Advent of Code is a fun and inclusive event which provides a new programming puzzle every day. The fun is that these puzzles can be solved in any programming language and are accessible for varying levels of coding experience and skills. The real test is in your problem-solving. This year, we’ll be solving each of the problems in … ⌘ Read more
Git Merge 2022 – that’s a wrap! 🎬
Git Merge 2022 just wrapped up bringing the community together for 16 talks, three workshops, one Git Contributor Summit, and lots of great conversations over two days. Read on for more info, photos from the event, and all of the session recordings. ⌘ Read more
GitHub at the 77th United Nations General Assembly
Read about how the GitHub Social Impact, Tech for Social Good and Policy teams participated in the 77th session of the United Nations General Assembly, including events we hosted with the World Health Organization and the UN Development Programme. ⌘ Read more
Introducing GitHub Advanced Security SIEM integrations for security professionals
Learn about using GitHub Advanced Security (GHAS) alerts with Security Information and Events Management (SIEM) tools. Check out the integrations, and read more about getting started. ⌘ Read more
9 Tips for Containerizing Your Node.js Application
Over the last five years, Node.js has maintained its position as a top platform among professional developers. It’s an open source, cross-platform JavaScript runtime environment designed to maximize throughput. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient — perfect for data intensive, real-time, and distributed applications. With over 90,500 stars […] ⌘ Read more
“Command Line Week” starts tomorrow!
Schedule of events and how to get yourself ready. ⌘ Read more
Two ways you can experience GitHub Universe
GitHub Universe is back and more robust than ever, with two great ways to engage with everything this global developer event has to offer. ⌘ Read more
Historical Dates
⌘ 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.
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
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.
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
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