MacOS Ventura 13.6.3, MacOS Monterey 12.7.2, & Safari 17.2 Released for Macs
MacOS Ventura 13.6.3, MacOS Monterey 12.7.2, and Safari 17.2 are now available as software updates for Mac users who are not installing Sonoma or interested in the just released macOS Sonoma 14.2 update. Many Mac users continue to run older versions of system software for compatibility reasons, general preference, or a multitude of other reasons, … [Read More](https://osxdaily.com … ⌘ Read more
How we’re experimenting with LLMs to evolve GitHub Copilot
Learn how we’re experimenting with generative AI models to extend GitHub Copilot across the developer lifecycle.
The post How we’re experimenting with LLMs to evolve GitHub Copilot appeared first on The GitHub Blog. ⌘ Read more
macOS Sonoma 14.2 RC Issued for Testing, Final Release Coming Soon
Mac users enrolled in the beta testing program for macOS Sonoma will find 14.2 available as a release candidate. Release Candidate builds are typically the final version in the beta cycle, suggesting a release of macOS Sonoma 14.2 to the general public is imminent. Additionally, Apple has issued RC builds for other beta system software … [Read More](https://osxdaily.com/2023/12/06/macos-sonoma-14-2-rc- … ⌘ Read more
GitHub Enterprise Server 3.11 is now generally available
Customers using GitHub Enterprise Server can gain more insight and understanding into the security of their code.
The post GitHub Enterprise Server 3.11 is now generally available appeared first on The GitHub Blog. ⌘ Read more
Interesting thing happening over on Xitter. Apparently some of the women in tech accounts are being exposed as being run by men that hire women to pose for images/videos. They would be invited to tech conferences but would always drop out last minute.
Makes me wonder if maybe there is need for a sort of verifiable web of trust is needed where influencers can be proven as authentic by others. This will only get worse as AI generative content gets pushed into our feeds.
Apple Black Friday Deals from Amazon Available Now
Black Friday is here, and Amazon is offering fantastic deals on a broad range of Apple products. From AirPods, AirTags, Apple Watch, iPad models, MacBook Air, and MacBook Pro, there are fantastic deals, and even more, enjoy these Black Friday discounts. AirPods Deals, from $79 Save big the 2nd generation AirPods Pro with USB-C charging, … [Read More](https://osxdaily.com/2023/11/24/apple-black-friday-deals-from-amazon-available-now/ … ⌘ Read more
Apple Black Friday Deals from Amazon Available Now
Black Friday is here, and Amazon is offering fantastic deals on a broad range of Apple products. From AirPods, AirTags, Apple Watch, iPad models, MacBook Air, and MacBook Pro, there are fantastic deals, and even more, enjoy these Black Friday discounts. AirPods Deals, from $79 Save big the 2nd generation AirPods Pro with USB-C charging, … [Read More](https://osxdaily.com/2023/11/24/apple-black-friday-deals-from-amazon-available-now/ … ⌘ Read more
@movq@www.uninformativ.de Thanks for reaching out - just general wonkiness with the Epson printing job configuration UI. They offer Fedora software, but it seems that not all features are supported
Early Black Friday Deals: iPad 10th Gen for $349 ($100 Off!)
Amazon is back with more great early Black Friday deals for Apple products, this time they’re taking 22% off the iPad 10th gen price of $449, selling the latest model iPad for just $349. That’s $100 off Apple’s standard retail price for the same iPad! The iPad 10th generation features a modern design, 10.9″ Retina … Read More ⌘ Read more
Universe 2023: Copilot transforms GitHub into the AI-powered developer platform
GitHub is announcing general availability of GitHub Copilot Chat and previews of the new GitHub Copilot Enterprise offering, new AI-powered security features, and the GitHub Copilot Partner Program.
The post [Universe 2023: Copilot transforms GitHub into the AI-powered developer platform](https://github.blog/2023-11-08-universe-2023-copilot-transforms-github-into-the-ai-powered- … ⌘ Read more
Demystifying LLMs: How they can do things they weren’t trained to do
Explore how LLMs generate text, why they sometimes hallucinate information, and the ethical implications surrounding their incredible capabilities.
The post Demystifying LLMs: How they can do things they weren’t trained to do appeared first on The GitHub Blog. ⌘ Read more
Deals: $100 Off M1 iPad Air, Discounts on iPad Magic Keyboard, Apple Pencil, & More
Amazon continues to offer excellent deals on select iPad models, this time offering the M1 iPad Air 5th generation at $100 discount. Combine the M1 iPad Air with an also discounted iPad Magic Keyboard, and a discounted Apple Pencil, and you’ve got yourself a full fledged iPad setup, for far less than the retail price … [Read More](https://osxdaily.com/2023/10/23/deals-1 … ⌘ Read more
Ensuring the next generation of open source leaders are truly “all in”
If you are a student from a U.S. minority-serving institution looking to start your journey into open source, join us!
The post Ensuring the next generation of open source leaders are truly “all in” appeared first on The GitHub Blog. ⌘ Read more
Best iPad Deal of Amazon Prime Day? iPad 9th-gen for $249, 24% Off!
Amazon is offering an absolute steal of a deal on the iPad 9th generation for just $249, the lowest price it has ever sold for. That’s 24%, or $80 discount, from the $329 retail price that Apple sells the same iPad for! The iPad 9th generation features a 10.2″ Retina display, A13 Bionic chip, 64GB … Read More ⌘ Read more
5 iCloud Security Features You Should Be Using
iCloud is packed full of features that make using devices in the Apple ecosystem super easy and fluid, but there are some security features and capabilities offered by iCloud that literally everyone should be using because of their added benefits to security, convenience, and capabilities. While it’s generally a good idea to basically use every … Read More ⌘ Read more
@prologic@twtxt.net I will stick around, after thinking about it. Im sure support for both will come. Maybe Ill check if I can make some support in snac2 for yarn, that would be a fun project. I also want to work some more on the yarn desktop client, I miss working on it, polish it and make it more feature complete, and then also make one for snac2/activitypub (or make it into a general client that supports both at the same time).
A developer’s guide to open source LLMs and generative AI
Open source generative AI projects are a great way to build new AI-powered features and apps.
The post A developer’s guide to open source LLMs and generative AI appeared first on The GitHub Blog. ⌘ Read more
How I used GitHub Copilot Chat to build a ReactJS gallery prototype
GitHub Copilot Chat can help developers create prototypes, understand code, make UI changes, troubleshoot errors, make code more accessible, and generate unit tests.
The post How I used GitHub Copilot Chat to build a ReactJS gallery prototype appeared first on The GitHub Blog. ⌘ Read more
Passkeys are generally available
All GitHub.com users can now register a passkey to sign in without a password.
The post Passkeys are generally available appeared first on The GitHub Blog. ⌘ Read more
Announcing general availability of GitHub Advanced Security for Azure DevOps
GitHub Advanced Security for Azure DevOps is now generally available. Enable secret scanning, dependency scanning, and code scanning on your organization directly in Azure DevOps configuration settings.
The post [Announcing general availability of GitHub Advanced Security for Azure DevOps](https://github.blog/2023-09-20-announcing-general-availability-of-github-advanced-security-for- … ⌘ Read more
GitHub Enterprise Server 3.10 is now generally available
Customers using GHES can now ensure secure development is a top priority with enhanced security and compliance controls for their repositories.
The post GitHub Enterprise Server 3.10 is now generally available appeared first on The GitHub Blog. ⌘ Read more
How to responsibly adopt GitHub Copilot with the GitHub Copilot Trust Center
We’re launching the GitHub Copilot Trust Center to provide transparency about how GitHub Copilot works and help organizations innovate responsibly with generative AI. ⌘ Read more
GitHub Repository Rules are now generally available
Repository rules provide an easy, flexible way to define branch protections and ensure consistency in code across repositories. ⌘ Read more
A developer’s guide to prompt engineering and LLMs
Prompt engineering is the art of communicating with a generative AI model. In this article, we’ll cover how we approach prompt engineering at GitHub, and how you can use it to build your own LLM-based application. ⌘ Read more
GitHub merge queue is generally available
Supercharge pull request merges on your busiest branches by enabling your team to queue. ⌘ Read more
GitHub CLI project command is now generally available!
Level up your use of GitHub Projects on the command line and in GitHub Actions with the new project CLI command. ⌘ Read more
Question to all you Gophers out there: How do you deal with custom errors that include more information and different kinds of matching them?
I started with a simple var ErrPermissionNotAllowed = errors.New("permission not allowed")
. In my function I then wrap that using fmt.Errorf("%w: %v", ErrPermissionNotAllowed, failedPermissions)
. I can match this error using errors.Is(err, ErrPermissionNotAllowed)
. So far so good.
Now for display purposes I’d also like to access the individual permissions that could not be assigned. Parsing the error message is obviously not an option. So I thought, I create a custom error type, e.g. type PermissionNotAllowedError []Permission
and give it some func (e PermissionNotAllowedError) Error() string { return fmt.Sprintf("permission not allowed: %v", e) }
. My function would then return this error instead: PermissionNotAllowedError{failedPermissions}
At some layers I don’t care about the exact permissions that failed, but at others I do, at least when accessing them. A custom func (e PermissionNotAllowedError) Is(target err) bool
could match both the general ErrPermissionNotAllowed
as well as the PermissionNotAllowedError
. Same with As(…)
. For testing purposes the PermissionNotAllowedError
would then also try to match the included permissions, so assertions in tests would work nicely. But having two different errors for different matching seems not very elegant at all.
Did you ever encounter this scenario before? How did you address this? Is my thinking flawed?
GitHub Enterprise Server 3.9 is now generally available
GitHub Enterprise Server 3.9 is now generally available. Organizations can now take advantage of more features that enable deeper collaboration, greater observability and faster workflows. ⌘ Read more
The economic impact of the AI-powered developer lifecycle and lessons from GitHub Copilot
Today at Collision Conference we unveiled breaking new research on the economic and productivity impact of generative AI–powered developer tools. The research found that the increase in developer productivity due to AI could boost global GDP by over $1.5 trillion. ⌘ Read more
Russia blowing up the Nova Kakhovka dam is an incomprehensible war crime. Among other things, it drains water from the Zaporizhzhia nuclear power plant, water that is needed for cooling. They are trying to generate a widespread disaster.
They must be stopped, immediately, without hesitation. This is unacceptable behavior, crossing every red line we have no matter our politics, without any doubt.
von Neumann: I came up with this new system that generalizes probability theory to consider convex sets instead of point estimates. I think that I could use this to prove regret bounds…
How companies are boosting productivity with generative AI
Explore how generative AI coding tools are changing the way developers and companies build software. ⌘ Read more
Push protection is generally available, and free for all public repositories
Announcing the general availability of push protection–a feature that proactively prevents secret leaks in your public and private repositories. ⌘ Read more
GitHub code search is generally available
The world’s code is now at your fingertips. ⌘ Read more
I’ve tried twtxt2atom (https://lien.sus.fr/rUluz) but it doesn’t seem to be generating the body for the post
Gonna code a bit tonight. Clean up the image code, then I will rewrite some of the code that uses libcurl, make a more generic function that I use in the calls, instead of many functions. That will be nice.
Private vulnerability reporting now generally available
Open source maintainers and security researchers embrace a new best practice to report and fix vulnerabilities. ⌘ Read more
I’m not super a fan of using json. I feel we could still use text as the medium. Maybe a modified version to fix any weakness.
What if instead of signing each twt individually we generated a merkle tree using the twt hashes? Then a signature of the root hash. This would ensure the full stream of twts are intact with a minimal overhead. With the added bonus of helping clients identify missing twts when syncing/gossiping.
Have two endpoints. One as the webfinger to link profile details and avatar like you posted. And the signature for the merkleroot twt. And the other a pageable stream of twts. Or individual twts/merkle branch to incrementally access twt feeds.
How generative AI is changing the way developers work
Rapid advancements in generative AI coding tools like GitHub Copilot are accelerating the next wave of software development. Here’s what you need to know. ⌘ Read more
Generative AI-enabled compliance for software development
Explore how generative AI may soon help enable optimizing some of the foundational components of compliance. ⌘ Read more
orthogonality of substrate and structure in general
What developers need to know about generative AI
Generative AI has been dominating the news lately—but what exactly is it? Here’s what you need to know, and what it means for developers. ⌘ Read more
go mills()
😅
So. Some bits.
i := fIndex(xs, 5.6)
Can also be
i := Index(xs, 5.6)
The compiler can infer the type automatically. Looks like you mention that later.
Also the infer is super smart.. You can define functions that take functions with generic types in the arguments. This can be useful for a generic value mapper for a repository
func Map[U,V any](rows []U, fn func(U) V) []V {
out := make([]V, len(rows))
for i := range rows { out = fn(rows[i]) }
return out
}
rows := []int{1,2,3}
out := Map(rows, func(v int) uint64 { return uint64(v) })
I am pretty sure the type parameters goes the other way with the type name first and constraint second.
func Foo[comparable T](xs T, s T) int
Should be
func Foo[T comparable](xs T, s T) int
What’s new with GitHub Sponsors
GitHub Sponsors is now generally available for organizations. Also, new tooling for bulk sponsorships and an update on how we’re ensuring sustainability for GitHub Sponsors. ⌘ Read more
slides/go-generics.md at main - slides - Mills – I’m presenting this tomorrow at work, something I do every Wednesday to teach colleagues about Go concepts, aptly called go mills()
😅
Introducing self-service SBOMs
Developers and compliance teams get a new SBOM generation tool for cloud repositories. ⌘ Read more
GitHub celebrates the ingenuity of developers with disabilities in new video series
Learn how developers with disabilities are pushing the boundaries of accessibility with ingenuity, open source, and generative AI on The ReadME Project. ⌘ 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
Unleash your potential with GitHub Octernships: a path to a thriving tech career
Empowering the next generation of students in tech with real-world industry experience. ⌘ Read more
@prologic@twtxt.net it is from the generator. But in the actual go implementation methods are represented with a unsigned short. So 65k is the hard limit in go.
GitHub Actions Importer is now generally available
We’re excited to announce the general availability of GitHub Actions Importer. GitHub Actions Importer helps you plan, forecast, and automate migrations from Azure DevOps, CircleCI, GitLab, Jenkins, and Travis CI to GitHub Actions. This product is an extension of the official GitHub CLI and is available for free to any GitHub user starting today. Migrating […] ⌘ Read more
@eldersnake@we.loveprivacy.club apparently someone that generates graphql endpoints for a biiiig app
10 things you didn’t know you could do with GitHub Codespaces
Unlock the full potential of GitHub Codespaces with these 10 tips and tricks! From generating AI images to running self-guided coding workshops, discover how to optimize your software development workflow with this powerful tool. ⌘ Read more
Secret scanning alerts are now available (and free) for all public repositories
Secret scanning alerts are now generally available for all public repositories. Admins can now turn on the alert experience with one click. ⌘ Read more
@movq@www.uninformativ.de Correct! It’ll be a generic yarn client. :)
@prologic@twtxt.net I’m thinking more in general - about the balloons and stuff that’s been in the news.
It’s just some of the comments they have made publicly, calling it a balloon in one setting, then ‘object’ in another..
I think all of those where just that - balloons, but either way some of those UAP’s are strange.
And I always wonder if someone has a craft from some other world or not.
It would not be weird in any way if some aliens evolved way beyond us, and it would not be weird if someone visited us here.
We would do the same if we found a planet with life.
All in all it’s just fascinating to think about these things.
Tor is technically installed but something is wrong with my system and almost everything I install is outdated. I tried making a hidden service and it generated a v2 address. That is how outdated my Tor daemon is lmao
@prologic@twtxt.net I get the worry of privacy. But I think there is some value in the data being collected. Do I think that Russ is up there scheming new ways to discover what packages you use in internal projects for targeting ads?? Probably not.
Go has always been driven by usage data. Look at modules. There was need for having repeatable builds so various package tool chains were made and evolved into what we have today. Generics took time and seeing pain points where they would provide value. They weren’t done just so it could be checked off on a box of features. Some languages seem to do that to the extreme.
Whenever changes are made to the language there are extensive searches across public modules for where the change might cause issues or could be improved with the change. The fs embed and strings.Cut come to mind.
I think its good that the language maintainers are using what metrics they have to guide where to focus time and energy. Some of the other languages could use it. So time and effort isn’t wasted in maintaining something that has little impact.
The economics of the “spying” are to improve the product and ecosystem. Is it “spying” when a municipality uses water usage metrics in neighborhoods to forecast need of new water projects? Or is it to discover your shower habits for nefarious reasons?
here’s a question: when do NNs generalize, and how hard? as in adding two specific numbers together vs. n-digit integer addition vs. addition in general vs. simple arithmetical operations
pass
on my machine:
@abucci@anthony.buc.ci So.. The issue is that its showing the password by default? Would making an alias to always include the -c help? We can probably engage Jason with a PR to enable a more hardened approach when desired. I’ve spoken to him before and is generally a pretty open to ideas.
I found this app that was created by the gopass author that does copy by default and has a tui or GUI mode https://github.com/cortex/ripasso
@lyse@lyse.isobeef.org As far as I know, they’re still visible in the Web UI. Although, in the mobile app and youtube.com, I believe it tells you that the video isn’t available without having to click on it. They don’t tell you that in the RSS feed, and I agree; it gets annoying.
If we had a custom feed generator that hooks directly into the YouTube API, I’ll bet we could find that information and put “[Scheduled][Scheduled][Scheduled][Scheduled][Scheduled][Scheduled][Scheduled][Scheduled]” in the title for premieres and remove it when the video is available.
@lyse@lyse.isobeef.org As far as I know, they’re still visible in the Web UI. Although, in the mobile app and youtube.com, I believe it tells you that the video isn’t available without having to click on it. They don’t tell you that in the RSS feed, and I agree; it gets annoying.
If we had a custom feed generator that hooks directly into the YouTube API, I’ll bet we could find that information and put “[Scheduled][Scheduled=][Scheduled][Scheduled=][Scheduled][Scheduled=][Scheduled][Scheduled=]” in the title for premieres and remove it when the video is available.
Did something chchange with how the discover feed is generated? My pods logout mode now only shows my twts. It used to be all twts from watcher observation like my logged on discover tab. @prologic@twtxt.net
@prologic@twtxt.net see where its used maybe that can help.
https://github.com/sour-is/ev/blob/main/app/peerfinder/http.go#L153
This is an upsert. So I pass a streamID which is like a globally unique id for the object. And then see how the type of the parameter in the function is used to infer the generic type. In the function it will create a new *Info and populate it from the datastore to pass to the function. The func will do its modifications and if it returns a nil error it will commit the changes.
The PA type contract ensures that the type fulfills the Aggregate interface and is a pointer to type at compile time.
@prologic@twtxt.net I guess that refresh
field could be easily replaced with Expires
HTTP header (I realize that users on neocities.org cannot control this header, for example). And clients should also respect headers like Last-Modified
/If-Modified-Since
(304), you’re right about that. P.S. twtwt doens’t have a caching mechanism for now, but I plan to implement it in generic way using HTTP headers.
Tutorial: Getting started with generics - The Go Programming Language – Okay @xuu@txt.sour.is I quite like Go’s generics now 🤣 After going through this myself I like the semantics and the syntax. I’m glad they did a lot of work on this to keep it simple to both understand and use (just like the rest of Go) 👌 #GoLang #Generics
GitHub Copilot is generally available for businesses
GitHub Copilot for Business is officially here with simple license management, organization-wide policy controls, and industry-leading privacy—all for $19 USD per user per month. ⌘ Read more
My Generation — The Who (Eurobeat Remix)
Also I need to set up a new website with a static site generator. Ill most likely give hugo a try again.
The journey of your work has never been clearer
In July, we launched the general availability of GitHub Projects, and now we are excited to bring you even more features designed to make it easier to plan and track in the same place you build! ⌘ Read more
GitHub Enterprise Server 3.7 is now generally available
GitHub Enterprise Server 3.7 is available now, including a single view of code risk, new forking and repository policies, and security enhancements to the management console. ⌘ Read more
All In for Students: expanding the next generation of open source leaders
We are pleased to announce the expansion of All In for Students! All In for Students introduces college students to open source and provides them with the education, technical training and career development to prepare them for a summer internship in tech. ⌘ Read more
Why we’re excited about the Sigstore general availability
The Sigstore GA means you can protect your software supply chain today with GitHub Actions, and will power new npm security capabilities in the near future. ⌘ Read more
Stable Diffusion in Code (AI Image Generation) - Computerphile ⌘ 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
How AI Image Generators Work (Stable Diffusion / Dall-E) - Computerphile ⌘ Read more
GitHub for Startups is generally available
We’re launching GitHub for Startups to give your startup the tools needed to go from idea to unicorn status on the world’s largest developer platform. ⌘ Read more
“If you don’t make it beautiful, it’s for sure doomed”: putting the Vault in GitHub’s Arctic Code Vault
GitHub this month installed a massive steel vault, etched with striking AI-generated art, deep within an Arctic mountain, finalizing its Arctic Code Vault. This vault contains the 188 reels of hardened archival film which will preserve the 02/02/202 snapshot of every active public GitHub repository for 1,000 years. It also now includes a … ⌘ Read more
GitHub Enterprise Server 3.6 is now generally available
GitHub Discussions and Audit Log Streaming, new automation features, and security enhancements are available now in GitHub Enterprise Server 3.6. ⌘ 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.
Planning next to your code – GitHub Projects is now generally available
Today, we are announcing the general availability of the new and improved Projects powered by GitHub Issues. GitHub Projects connects your planning directly to the work your teams are doing in GitHub and flexibly adapts to whatever your team needs at any point. ⌘ Read more
GitHub Copilot is generally available to all developers
We’re making GitHub Copilot, an AI pair programmer that suggests code in your editor, generally available to all developers for $10 USD/month or $100 USD/year. It will also be free to use for verified students and maintainers of popular open source projects. ⌘ Read more
Prebuilding codespaces is generally available
Teams and GHEC customers can now create blazing fast codespaces, even for your largest and most complex projects. ⌘ Read more
Dependabot Updates hit GA in GHES
Dependabot is generally available in GitHub Enterprise Server 3.5. Here is how to set up Dependabot on your instance. ⌘ Read more
GitHub Enterprise Server 3.5 is now generally available
GitHub Enterprise Server 3.5 is available now, including access to the Container registry, the addition of Dependabot, enhanced administrator capabilities, and features for GitHub Advanced Security. ⌘ Read more
Based.Cooking has become more grandma-usable.
Over the past month, I’ve taken some off-time to tinker with
Based.Cooking, the cooking site I/we made a year or so
ago as a proof of concept for a simple and unintrusive recipe website. There
have been over 250 recipes submitted, but the hobbled-together static site
generator originally used proved unable to keep up and with all the
submissions, there was a big issue of content organization.
There have been two big changes. Firstly, I port … ⌘ Read more
in general, lw feels like a place where it would be good for many people to cross-post to, a content aggregator/archiver
started using esglua, our static site generator | https://compudanzas.net/esglua.html
if you’re not special, generating passwords is like running from bears: you don’t need to be good, you just need to be better than the majority
guy who takes mdma at a techno rave and says “so this is what it’s all about”, but not just about raving culture, but, like, life in general
ssh
client, because that's me, no-matter where I am. The only exception to this rule is I usually create a separate key for any "work" / " company" I am a part of.
@prologic@twtxt.net I have seen single use keys that are signed by a central PKI .. Keybase has one that uses a chatbot to generate the keys on the fly.
It just comes down to your threat model :)
@mutefall I can’t take credit for the CSS on the site, it came from my site generator :D https://kiln.adnano.co
there was a connection between one of the guys who wrote the first pickup advice in the 70s, and general semantics. i could investigate
generic answer to any threat: “if the grease doesn’t get me first”
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
saying “without loss of generality” is a great way to hide bullshit in a proof. i have applied it many times with huge success
I should use twtxt more. I actually like it better than fedi, in general.
GoCN 每日新闻 (2022-01-13)
GoCN 每日新闻 (2022-01-13)
- Golang《基于 MIME 协议的邮件信息解析》部分实现https://gocn.vip/topics/20948
- 泛型可以拯救 Golang 笨拙的错误处理吗?https://blog.dnmfarrell.com/post/can-generics-rescue-golangs-clunky-error-handling/
- 更多的并行,并不等同更高的性能https://convey.earth/conversation?id=44
- 为什么 Go 有两种声明变量的方式,有什么区别,哪种好? [https://mp.weixin.qq.com/s/ADwEhSA1kFOFqzIyWvAqsA](https://mp.weixin.q … ⌘ Read more