🌠 Doom! & Scrollable Daily Notes
A request for python devs to help out with the community hub vault, a new comprehensive tutorial for beginners, & discussion of YAML APIs. ⌘ Read more
** Occasional notes **
If they aren’t weekly, I guess they’re occasional?
3rd repair procedure to fix brain bleed was a success. I have a few more scans and follow ups, but, knock wood I think I’m through at this point.
I’ve spent about a week laying low and taking it easy navigating some wild pain, but that is subsiding now. I watched a bunch of stuff. It was a nice change of pace. I don’t typically watch much television or many movies. Stand outs (all things I revisited) include:
- Michael Clayton
- Point Break, the o … ⌘ Read more
One-Size-Fits-All? How to Take Big Notes and How to Take Small Notes
Introduction[1]Historically, the length of media content has often been the result of technological restrictions. The SMS, for instance, is restricted to 160 characters due to the underlying GSM-7 protocol. Consequently, a change in the technological conditions can affect the l … ⌘ Read more
I started a notes section of my website. It’s for shorter, less formal posts. https://mckinley.cc/notes/20221101-yet-another-blog.html
JMP: SMS Account Verification
Some apps and services (but not JMP!) require an SMS verification code in order to create a new account. (Note that this is different from using SMS for authentication; which is a bad idea since SMS can be easily intercepted, are not encrypted in transit, and are v … ⌘ Read more
🌠 Improved note relationship sensing & Catppuccinos!
Kepano shared some thoughts about the AI-assisted text generation plugins, there’s a new plugin for RTL/LTR language detection, plus: improved OCR ⌘ Read more
🌠 Obsidian Out of Beta, Obsidian October Extended
Table generators, advanced project management options, & a guide to Charles Darwin’s note taking method. ⌘ Read more
JMP: SMS Account Verification
Some apps and services (but not JMP!) require an SMS verification code in order to create a new account. (Note that this is different from using SMS for authentication; which is a bad idea since SMS can be easily intercepted, are not encrypted in transit, and are v … ⌘ Read more
🌲The Konik Method for Making Useful Notes
How to make notes for reference, not self-improvement: A practical guide to messy notes meant to be used, not admired. ⌘ Read more
🌠 Pandoc, Happiness, & Dataview Tricks
Weekly notes, Eisenhower matrixes, and my new job with Readwise. ⌘ Read more
just wrote a note in my code float* output; /* to write output to physical device, or just the next lower device in the abstraction tower */ feeling pretty proud of that LoL #coding #klebe
** week notes **
Am I allowed to call them“week notes” if I don’t do them weekly?
I went in for what was supposed to be my final brain scan, a diagnostic angiogram (don’t look that up). The good news is that the repair has officially cured my brain bleed! The bad news is that they saw another vessel that looks primed to bleed; I’m due for another repair procedure sometime in October. I’m pretty bummed to not be done with this ordeal, but trying to remain optimistic that this new one was caught before it bled and because the surgeon s … ⌘ Read more
#TIL pencil writing is more permanent and waterproof than most ink. good news, I love pencils! #eco #notes
Une presse française lâche et paresseuse
Ah, finalement, qu’il est doux d’être journaliste en France dans un journal de révérence ! Jadis, c’était un travail fatigant, voire stressant et parfois même risqué : il fallait aller chercher l’information directement sur le terrain et la corroborer le carnet de notes à la main. Certains événements pouvaient impliquer de mettre sa vie en danger ; et […] ⌘ Read more
🌠 Visual Notetaking Guides & Demo Vaults for Managers
You can now push notes to Readwise’s Reader app for improved spaced repetition review. You can also comment on the Roundup! ⌘ 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
}
Command palette and commands for managing a graph of notes: https://merveilles.town/@akkartik/108766067153506592
Preview of a note-taking app I’ve been working on: https://archive.org/details/akkartik-pensieve-2022-07-27 (video; 5 mins)
UAE sells US$3 billion in high-quality debt amid recession fears
The oil-rich Persian Gulf nation on Thursday sold US$1.75 billion in 10-year bonds and US$1.25 billion in notes due in 2052. ⌘ Read more
Ukraine war: Japanese man arrested over Vladimir Putin straw doll nailed to shrine tree
Mitsunobu Hino, 72, is accused of trespassing and making holes in a sacred tree to put up a figure with a note wishing death to the Russian leader. ⌘ Read more
wait, is CIRL incorrigible for the same reason that utility-maximizers don’t wirehead? https://niplav.github.io/notes.html#A-Short-Example-For-Why-CIRL-Is-Incorrigible
NixOS 22.05 released
Hey everyone, I’m Janne Heß,
the release manager for 22.05. As promised, the latest stable
release is here: NixOS 22.05 “Quokka”.
- Release manual - Highlights
- [New\ Services]( … ⌘ Read more
https://goalkicker.com/ Programming notes for professionnals books
Monerotopia Presentation and Website News
Just a note that within two hours (11AM NY time), my edited Monerotopia presentation with slides and all will be premiering here on the Monero Talk channel on YouTube.
I did already do an extended commentary and explanation of my talk here on my PeerTube channel, and I might put this an the edited talk onto my YouTube channel if I feel like it. You shou … ⌘ Read more
Monerotopia Presentation and Website News
Just a note that within two hours (11AM NY time), my edited Monerotopia presentation with slides and all will be premiering here on the Monero Talk channel on YouTube.
I did already do an extended commentary and explanation of my talk here on my PeerTube channel, and I might put this an the edited talk onto my YouTube channel if I feel like it. You shou … ⌘ Read more
Nix 2.8.0 released
We’re pleased to announce the availability of Nix 2.8.0. It will be
available from NixOS -\
Getting Nix / NixOS.
Here are the release notes:
New experimental command:
nix fmt, which applies a
formatter defined by theformatter.<system></system>flake
output to the Nix expressions in a flake.Various Nix commands can now read expressions from standard input
using--file -.New experimental builtin function
builtins.fetchClosurethat c … ⌘ Read more
This isn’t a friendship, it’s a starship. Are you a star or not?” Patch 41 – Release Notes | Star Trek Fleet Command
Code: update to 1.18.1 of opinionated Ansible role for Go
Note: due to an issue no darwin build published for 1.18.1 at the time of writing 1 points posted by Sascha Andres ⌘ Read more
@prologic@twtxt.net yeah. For commercial use even. Just need to put an attribution note in the project README
Note: this seems to be for male chorus, and isn’t the arrangement that I hear in the sixteen recording.
Annotate PDFs on Linux
This post is about a GUI tool called pdfrankestein that
fills a gap on mostly Linux machines where a powerful and easy to use
PDF annotator does not exist.
Adobe Acrobat® on Windows and Mac allow you to add text, drawings and
signatures to PDF documents. This is useful when filling forms or
marking notes to send back to someone. Such a tool with similar
capabilities and easy of use does not exist on Linux. The reason that’s
often cited is that PDF is a c … ⌘ Read more
Docker: Nine Years YOUNG
Nine years ago today, March 15, 2013, Solomon Hykes, the founder of Docker, first demoed Docker publicly to the world at PyCon. On stage Solomon noted that, for developers, “shipping to the server is hard,” and thus he and the early team designed Docker to help developers more easily build, share, and run any app, […]
The post Docker: Nine Years YOUNG appeared first on Docker Blog. ⌘ Read more
Nix 2.7.0 released
We’re pleased to announce the availability of Nix 2.7.0. It will be
available from
NixOS - Getting Nix / NixOS.
Here are the release notes:
Nix will now make some helpful suggestions when you mistype something
on the command line. For instance, if you type nix build
nixpkgs#thunderbrd, it will suggest
thunderbird.A number of “default” flake output attributes have been renamed.
These are:defaultPackage.<system></system>→packag ... ⌘ [Read more](https://nixos.org/blog/announcements.html#nix-2.7.0)
** 2022-02-24 feature/6.0 Android test plan **
OverviewWill test the upgrade path from a known state to new version to ensure that settings and app state are maintained during upgrade process.
V. 6.0 of libro.fm android app introduces an entirely new local database. This testing is focused on ensuring that local data remains intact between versions.
NotesThis evening I was mostly focused on setting up a successful build of feature/6.0 on my test device or the emulator. So far, no dice. My next … ⌘ Read more
GitHub Enterprise Server 3.4 improves developer productivity and adds reusable workflows to CI/CD
The GitHub Enterprise Server 3.4 release candidate delivers enhancements to make life easier and more productive, from keyboard shortcuts to auto-generated release notes! ⌘ Read more
** What is an addressing mode? **
In a recent post I referenced addressing modes. But what the heck are they!?
The instruction register holds the program instruction that is currently being run.
A fixed number of bits within the instruction register represent the operation, e.g. “op. code” — examples of these instructions include things like add, subtract, load, and store. We can imagine the instruction register like this:
[![ASCII diagram of … ⌘ Read more
Stream a USB webcam to HDMI on a Raspberry Pi
This post exists to collect my notes on displaying a USB webcam on the Raspberry Pi HDMI outputs. This is not the same as streaming the webcam (easy), and this is not for use with the Raspberry Pi camera module. This is specifically for USB UVC webcams. ⌘ Read more
** Notes on 6502 Assembly **
The NES runs a very slightly modified 6502 processor. What follows are some very introductory, and not at all exhaustive notes on 6502 Assembly, or ASM.
If you find this at all interesting, Easy 6502 is a really great introductory primer on 6502 Assembly that lets you get your hands dirty right from a web browser.
NumbersNumbers pre … ⌘ Read more
Nix 2.6.0 released
We’re pleased to announce the availability of
Nix 2.6.0.
Instructions how to install Nix on different platforms can be found on
the download page.
Here are the release notes:
New builtin function
builtins.zipAttrsWithwith the same
functionality aslib.zipAttrsWithfrom Nixpkgs, but
much more efficient.The Nix CLI now searches for a
flake.nixup until the
root of the current Git repository … ⌘ Read more
@prologic@twtxt.net, who calls me name when I am busy profiting? 😂 In a less serious note—because nothing is more serious than making profit, of course—yes, it seems your avatar issue has been fixed. I am kind of sad, I looked forward each day to see which random one was going to show. LOL.
GoCN 每日新闻 (2022-01-06)
- Golang profiler 笔记https://github.com/DataDog/go-profiler-notes/blob/main/README.md
- Bundling templates with embedhttps://osinet.fr/go/en/articles/bundling-templates-with-embed/
- Go 通过 Map/Filter/ForEach 等流式 API 高效处理数据https://gocn.vip/topics/20922
- 滴滴夜莺监控发布 v5 正式版,定位 Promet … ⌘ Read more
Go profiler notes
3 points posted by kenny ⌘ Read more
Peter Saint-Andre: Meditations on Bach #9: Musical Monadology
In meditation #7 of this series, I took note of some similarities between the aesthetics of Aristotle and the music of Bach. Another intriguing influence might be the monadology of Gottfried Wilhelm Leibniz (1646-1716), who directly influenced philosophers and musical theorists in the Bach’s orbit: for instance, Bach’s student Lorenz Mizler (1711-1778) was a follower of the Leibniz scholar Christian Wolff (1679-1754). In chapter 5 of his book Music in the Culture of th … ⌘ Read more
PEP 678: Enriching Exceptions with Notes
Exception objects are typically initialized with a message that describes the
error which has occurred. Because further information may be available when the
exception is caught and re-raised, this PEP proposes to add a .__note__
attribute and update the builtin traceback formatting code to include it in
the formatted traceback following the exception string. ⌘ Read more
5 automations every developer should be running
Looking to avoid security vulnerabilities, buttons that don’t work, slow site speeds, or manually writing release notes? This one’s for you. ⌘ Read more
a zero dependency shell script that makes it really simple to manage your text notes [[https://github.com/nickjj/notes]] #links
Notes on the Go translation of Reposurgeon
3 points posted by tomf ⌘ Read more