84 karma · joined Aug 29, 2016 (10y ago) · 61 submissions
comment 3mo ago · link · parent
In your second example, as a retrofit, I find myself asking "when does MapErr stop consuming the input list?", "which error gets returned if multiple errors could be returned?", "is it a errors.Joim situation", "if there are multiple errors how do I map them to the failed elements in parsed", "if I did want each parse to have either success or fail (think Result type) how would I represent this generically in a language that favours multiple return types"
There's a lot going on with that example that a for loop makes explicit and flexible for other choices.
comment 1y ago · link · parent
comment 1y ago · link · parent
What am I missing?
I do believe there's more that the MCP Server could be offering to protect users, but that seems like a separate point.
comment 2y ago · link · parent
1: https://github.blog/2024-05-02-introducing-artifact-attestat...
comment 2y ago · link · parent
comment 2y ago · link · parent
While we haven't yet been able to prioritise using this package, our discussions with them were great and I think that in typical Charm fashion, they've created something really awesome here. In particular, we mentioned to them our desire to have accessibility as a first class experience and I think they really took that on board.
comment 3y ago · link · parent
Jury is still out but it's been an interesting experiment.
comment 3y ago · link · parent
I guess this wasn't entirely without sense but sort of seemed to be missing the point.
comment 4y ago · link · parent
comment 4y ago · link · parent
interface Repository<T> {
FetchAll() T[]
Fetch(id) T
Persist(T) id
}
Why would the SQL statements be reflected in the behaviour that the interface is providing?comment 4y ago · link · parent
comment 4y ago · link · parent
Location: Amsterdam, The Netherlands
Remote: Yes
Willing to relocate: No
Technologies: Go, TypeScript, Rust, Terraform, Kubernetes, Containers, FP
Résumé/CV: https://www.linkedin.com/in/william-martin-41400517/
Email: william[dot]la[dot]martin[mailsign]gmail[dot]com
Things I enjoy: Mentoring
Pair Programming
Test Driven Development
Systems Engineering
Team Psychological Safety
Balanced Teams
Feedback
Looking for a Senior/Staff level Individual Contributor role. I'd enjoy a job using a language with great domain modelling support (e.g. F#, Rust, Elm) to continue learning how to do that well. I'd enjoy a job where I can continue learning from others directly, as well as mentor others directly.comment 4y ago · link · parent
Btw, I'm assuming that the original map questioner wasn't solely using flatMap for side-effectful iteration, which reading again, I'm a bit suspicious about.
1: https://gcanti.github.io/fp-ts/modules/Array.ts.html#filterm...
comment 4y ago · link · parent
comment 5y ago · link · parent
The type system confines you to a set of reasonable cases that allow a caller to reason about the state of the program. This has two benefits for the caller:
1. It is required that the caller check whether a return value is success or failure in order to access the value they want. There is no possibility to mistake one case for another.
2. In the space of valid return values for idiomatic Go function signatures, 50% of them are unidiomatic and end up being ignored. It is far clearer for a caller to understand what is expected of them when valid values exactly overlap with the space. It is far clearer for an author to convey expectations to a caller for the same reason.
Now I must admit, good conventions and tooling in Go account for the vast majority of cases and I don't personally mind that much, but that's a different conversation than API design.
comment 5y ago · link · parent
comment 5y ago · link · parent
Consider for example, a snippet that reads along the lines of:
when there is a new stripe charge
send a slack message
It's very nice to attach something like a "ScopeContext" component to each Entity that has a "TokenLine" component, that is a Vec of EntityIds that are sharing values into scope. Very easy to model and add without interfering with other data structures.comment 5y ago · link · parent
comment 5y ago · link · parent
After some serious initial difficulty getting my head away from "this is a block" to "this entity has a block" I think it's turned out to make a lot of sense.
For example, checking whether a value shared by a "when there is a new tweet" is in scope when someone wants to use it (i.e. in nested block) is as simple as having a few components to represent a pointer from value to the ID of the block that shares it, and a list of blocks that share scope for this location and then compare the two.