Better HN
topnewbestaskshowjobs
Log inSign up

wlamartin

84 karma · joined Aug 29, 2016 (10y ago) · 61 submissions

Submissions

comment 3mo ago · link · parent

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.

comment 4mo ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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!

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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?

comment 2y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

When recording finishes you are given the option to upload or save to local file.

comment 3y ago · link · parent

Northern Irish, living in the Netherlands, commenting on hacker news, there must be severals of us!

comment 3y ago · link · parent

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.

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

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?

comment 4y ago · link · parent

Such a thing exists: https://github.com/BurntSushi/go-sumtype

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

I find "A Secret Sleeping in the Deep Sea" really takes me back to my childhood.

comment 4y ago · link · parent

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

comment 4y ago · link · parent

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.

comment 4y ago · link · parent

tRPC is a good choice for TypeScript: https://trpc.io/

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

Awesome thank you for the clarification. I extra agree with the confusion then since `fmap` sounded exactly like `flatMap` to me!

comment 5y ago · link · parent

Seems like this would be a bit confusing though? `fmap` (flatMap) corresponds to `bind` or `chain` (Monad) rather than `map` (Functor) right?

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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!"

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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

comment 5y ago · link · parent

Sounds interesting, can you share a snippet?
123