News for hackers. Stuff that matters.

wlamartin

Re:Golang proposal: container/: generic collection types on Saturday August 01, 2026 @12:18AM (#49130986)
I think in a language designed around FP ergonomics and expectations there's a lot to like about it.

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.

Re:Claude Code: Anatomy of a Misfeature on Friday July 17, 2026 @12:55PM (#48949528)
My memory is that once you begin using the alternate screen, you need to turn on mouse reporting, and then you lose native copy. Different terminal emulators also act totally differently when in this state.
Re:MCP's Disregard for 40 Years of RPC Best Practices on Tuesday August 12, 2025 @04:25PM (#44881400)
I don't think people in this thread aren't really confused about MCP. They are confused that you claimed, or at least insinuated that an LLM might skip the schema validation portion of an MCP tool call request/response, which was originally demonstrated via Claude Code. Hopefully you can understand why everyone seems so confused, since that claim doesn't make any sense when the LLM doesn't really have anything to do with schema validation at all.
I'm not sure whether you're confused, or I'm just having a horrible time understanding your point. The MCP server really does just serve requests with responses via a mechanism that satisfies the MCP spec. The MCP hosts (e.g. VSCode) work with an LLM to determine which of those tools to call, and ideally work with users via confirmation prompts to ensure the user really wants those things to happen.

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.

I've been using your app for the last 3-4 months very successfully. There are a few niggles here and there but overall it's been exactly what I needed, and I'm very grateful for it!
Just as a note, the GitHub CLI doesn't use bubbletea itself right now, though it does use other charm libraries such as lipgloss and glamour. That said, it's quite likely that at some point we will use huh for our prompting library, which does use bubbletea.
Ah, I think you might be pleasantly surprised that this is an area being focused on right now with attestations[1] for example, here are the attestations for the GitHub CLI[2].

1: https://github.blog/2024-05-02-introducing-artifact-attestat...

2: https://github.com/cli/cli/attestations

Recently I've been wondering if there is a "build your own X" for some of these concepts. For example, there is https://github.com/xyproto/vt100 which seems relatively straightforward (though maybe not "simple") to learn from but are there any resources that would actually teach this stuff?
Re:Huh – Go library for terminal forms and prompts on Monday December 11, 2023 @09:45AM (#38601063)
I'm a maintainer for the GitHub CLI. When our prompting dependency became unmaintained, the folks from Charm reached out to us looking to collaborate on a replacement (collaborate is a strong word for the amount of work they actually did compared to us).

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.

Recently, I've been toying with including asciinema in automated tests. Spinning up a TUI or richer CLI experience, sending it keystrokes, asserting on the output, all wrapped up in asciinema so that if it fails I can see what went wrong via the playback.

Jury is still out but it's been an interesting experiment.

When recording finishes you are given the option to upload or save to local file.
Re:Early Europeans Ate Seaweed for Thousands of Years on Thursday October 19, 2023 @04:01PM (#37947942)
Northern Irish, living in the Netherlands, commenting on hacker news, there must be severals of us!
Re:On a Great Interview Question on Thursday April 13, 2023 @05:55AM (#35553205)
Years ago when I was starting to interview for Uber in Europe I went through some data structure exercise which I failed at horribly. When I asked the hiring manager whether this was representative of the job, because I would probably not be good at it they said "no", and to follow up, when I asked why we did it they said, "in the next round my colleagues in the USA are going to ask you something similar".

I guess this wasn't entirely without sense but sort of seemed to be missing the point.

Re:Naming Things Is Hard on Saturday August 13, 2022 @04:49AM (#32448043)
https://relatedwords.org/ is also pretty neat for this. It's slightly less strict than a thesaurus so it can aid in exploring the semantic space a bit more.
Re:The Big TDD Misunderstanding on Monday March 21, 2022 @07:46AM (#30752935)
I don't follow this. My assumption for the repository interface is something like (language, error and domain agnostic):

   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?
Re:Hacking sum types with Go generics on Monday March 14, 2022 @12:29PM (#30674441)
Re:Ask HN: Who wants to be hired? (March 2022) on Wednesday March 02, 2022 @06:21AM (#30526087)

  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.
Re:Final Fantasy 7: An oral history (2017) on Monday February 21, 2022 @05:40PM (#30421671)
I find "A Secret Sleeping in the Deep Sea" really takes me back to my childhood.
Re:FP techniques that will help you write better JavaScript on Friday February 11, 2022 @10:09AM (#30302287)
Sure, there's many ways to skin a cat. Given the option, I wouldn't choose either of these, and instead use something like filterMap[1] which I think conveys intent better than a fold or flatMap.

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...

Re:FP techniques that will help you write better JavaScript on Friday February 11, 2022 @09:34AM (#30301917)
They don't want to keep the unmapped value in the resulting collection at all. flatMap allows for removal of an element in one traverse, unlike filter+map with eager behaviour.
tRPC is a good choice for TypeScript: https://trpc.io/
Re:A rough proposal for sum types in Go (2018) on Tuesday November 16, 2021 @04:40AM (#29238664)
> The only thing that's different is that you get a single value you have to check for errors rather than a separate value..

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.

Just some anecdotes from an expat: My landlord is 80+ and cycles everywhere. My parents in law are 75+ and are about to get rid of their car altogether since they either cycle or take public transport. My aunt in law is close to 80 and changed from manual to electric bike a few years ago after a stroke.
Re:Functors, Applicatives, and Monads in Pictures (2013) on Thursday October 21, 2021 @07:26AM (#28942924)
Awesome thank you for the clarification. I extra agree with the confusion then since `fmap` sounded exactly like `flatMap` to me!
Re:Functors, Applicatives, and Monads in Pictures (2013) on Thursday October 21, 2021 @06:32AM (#28942581)
Seems like this would be a bit confusing though? `fmap` (flatMap) corresponds to `bind` or `chain` (Monad) rather than `map` (Functor) right?
At https://story.ai we're using Shipyard ECS to model the data behind the structured editing experience. Although at first I was suspicious, I've come to realise it's an extremely elegant way to handle our complexity.

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.
Re:What it's like to spend 40-50 hours in VR every week on Tuesday September 28, 2021 @08:26AM (#28681972)
Years ago I had a dream that VR companies had released an airborne virus such that the only way for humans to experience outside was to wear VR tech.

I woke up thinking, "I need to invest in drone deliveries!"

Re:Why Lo-Fi Music Draws Listeners In on Wednesday September 22, 2021 @04:00AM (#28614054)
Maybe a little deeper but VSNZ has the same kind of idea. I went nuts for weeks on this Adriatique set: https://youtu.be/mIv_HcNun-w
Re:Object-Oriented Entity-Component-System Design on Tuesday August 17, 2021 @05:25AM (#28207832)
We also use an ECS in Rust (shipyard) to power a bunch of the editing experience in Story.ai

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.

https://story.ai

Re:The Human Side of Elixir on Thursday July 29, 2021 @02:40AM (#27993540)
Sounds interesting, can you share a snippet?

Older »