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.
🧮 USERS:1 FEEDS:2 TWTS:326 ARCHIVED:36217 CACHE:1658 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:325 ARCHIVED:36174 CACHE:1662 FOLLOWERS:13 FOLLOWING:14
user/bmallred/data/2022-08-12-12-15-20.fit: 2.82 miles, 00:11:40 average pace, 00:32:51 duration
🧮 USERS:1 FEEDS:2 TWTS:324 ARCHIVED:36126 CACHE:1630 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:323 ARCHIVED:36095 CACHE:1620 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:322 ARCHIVED:36071 CACHE:1610 FOLLOWERS:13 FOLLOWING:14
user/bmallred/data/2022-08-09-14-44-31.fit: 2.73 miles, 00:11:22 average pace, 00:31:03 duration
🧮 USERS:1 FEEDS:2 TWTS:321 ARCHIVED:36041 CACHE:1614 FOLLOWERS:13 FOLLOWING:14
Scientific Field Prefixes
⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:320 ARCHIVED:36015 CACHE:1629 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:319 ARCHIVED:35977 CACHE:1621 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:318 ARCHIVED:35951 CACHE:1608 FOLLOWERS:13 FOLLOWING:14
user/bmallred/data/2022-08-05-14-43-38.fit: 2.85 miles, 00:11:06 average pace, 00:31:35 duration
🧮 USERS:1 FEEDS:2 TWTS:317 ARCHIVED:35790 CACHE:1611 FOLLOWERS:13 FOLLOWING:14
R to @mind_booster: “O Governo está a fazer com a avaliação ambiental, aquilo que fez com a conservação da natureza e a proteção da biodiversidade.” 2/7
“O Governo está a fazer com a avaliação ambiental, aquilo que fez com a conservação da natureza e a proteção da biodiversidade.” 2/7 ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:316 ARCHIVED:35745 CACHE:1618 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:315 ARCHIVED:35714 CACHE:1620 FOLLOWERS:13 FOLLOWING:14
R to @mind_booster: So what next in the vaportech train? Metaverse 2.0?
So what next in the vaportech train? Metaverse 2.0? ⌘ Read more
user/bmallred/data/2022-08-02-15-16-21.fit: 2.64 miles, 00:11:30 average pace, 00:30:20 duration
🧮 USERS:1 FEEDS:2 TWTS:314 ARCHIVED:35694 CACHE:1628 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:313 ARCHIVED:35653 CACHE:1609 FOLLOWERS:13 FOLLOWING:14
Still two unresolved issues with WeeChat:
- How can I mark the current buffer as read? There is
/input set_unreadto mark it as unread (although I can’t tell that it does actually anything in the TUI) but there’s noset_readcommand that would put my read marker below the last message. Sure I can switch buffers and then the read marker is at the bottom, but this sounds like a silly workaround. There must be something better.
- I want the beep trigger to also fire when a regular message is sent. But the adjusted condition
${tg_displayed} && ${tg_tags} !!- ,notify_none,with the&& (${tg_highlight} || ${tg_msg_pv})removed then also includes joins and parts, which I don’t want to be alerted by. Now fiddling around with${tg_message_nocolor} !~ ^(-->|<--), let’s see.
How do you folks do that?
🧮 USERS:1 FEEDS:2 TWTS:312 ARCHIVED:35548 CACHE:1535 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:311 ARCHIVED:35521 CACHE:1525 FOLLOWERS:13 FOLLOWING:14
“we looked at how damaging the journey of overshooting the 2°C temperature target would be,
[…]
The results suggest that a temporary overshoot would cause waves of irreversible extinctions and lasting damage to tens of thousands of species”
https://theconversation.com/climate-crisis-even-temporarily-overshooting-2-c-would-cause-permanent-damage-to-earths-species-185929?utm_source=twitter&utm_medium=bylinetwitterbutton
“we looked at how damaging the journey of overshooting the 2°C temperature target would … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:310 ARCHIVED:35401 CACHE:1496 FOLLOWERS:13 FOLLOWING:14
GitHub Sponsors available in 30 new regions
GitHub Sponsors expands globally with 30 newly supported regions, bringing the total to 68. ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:309 ARCHIVED:35369 CACHE:1481 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:308 ARCHIVED:35338 CACHE:1485 FOLLOWERS:13 FOLLOWING:14
user/bmallred/data/2022-07-26-07-55-48.fit: 2.70 miles, 00:12:05 average pace, 00:32:40 duration
🧮 USERS:1 FEEDS:2 TWTS:307 ARCHIVED:35290 CACHE:1458 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:306 ARCHIVED:35250 CACHE:1455 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:305 ARCHIVED:35225 CACHE:1459 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:304 ARCHIVED:35175 CACHE:1452 FOLLOWERS:13 FOLLOWING:14
Physics Cost-Saving Tips
⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:303 ARCHIVED:35163 CACHE:1475 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:302 ARCHIVED:35148 CACHE:1473 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:301 ARCHIVED:35133 CACHE:1463 FOLLOWERS:13 FOLLOWING:14
find the next number in the sequence 0,2,2,46,3640
🧮 USERS:1 FEEDS:2 TWTS:300 ARCHIVED:35117 CACHE:1470 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:299 ARCHIVED:35064 CACHE:1473 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:298 ARCHIVED:35034 CACHE:1450 FOLLOWERS:13 FOLLOWING:14
I’m trying to switch from Konversation to irssi. Let’s see how that goes. Any irssiers out there who can recommend specific settings or scripts? I already got myself 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:
- better, more colorful and compact theme (just removed clock from statusbar so far)
- getting bell/urgency hints working on arriving messages
- nicer tabs in status bar, maybe even just channel names and no indexes
- decluster status bar with user and channel modes (I never cared about those in the last decade)
🧮 USERS:1 FEEDS:2 TWTS:297 ARCHIVED:35006 CACHE:1434 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:296 ARCHIVED:34976 CACHE:1413 FOLLOWERS:13 FOLLOWING:14
Research: How GitHub Copilot helps improve developer productivity
We surveyed more than 2,000 developers about whether GitHub Copilot helped them be more productive and improved their coding. Then, we matched this qualitative feedback and subjective perception with quantitative data around objective usage measurements and productivity. ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:295 ARCHIVED:34938 CACHE:1394 FOLLOWERS:13 FOLLOWING:14
Ignite Realtime Blog: Openfire 4.7.2 released
The Ignite Realtime Community is pleased to announce the release of Openfire version 4.7.2. This version fixes a number of bugs and signifies our efforts to produce a stable 4.7 series of Openfire whilst work continues on the next feature release 4.8.0.
A major highlight of this release is fixing of BOSH bugs found under load testing.
You can find [download artifacts](https://ign … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:294 ARCHIVED:34917 CACHE:1389 FOLLOWERS:13 FOLLOWING:14