Advertisement · 728 × 90

Posts by George Haidar

Hey @sockpuppet.org @fly.io, just wanted to flag that the flydotio Twitter account appears to be hijacked and is spreading crypto coin spam. I can't DM on bsky sadly, sorry for the public message.

6 months ago 0 0 1 0

Ghostty is great but I am too reliant on iTerm's tmux integration so I'm switching back for now :|

10 months ago 1 0 0 0
Post image

Since we're not going to get keyword arguments in @golang.org in the foreseeable, I've become very invested in using type definitions to "brand" common types in our codebase e.g. string, int, uuid.UUID and so on...

11 months ago 2 0 1 0
Preview
Clean room tests with JavaScript's `using` keyword And a slick approach to test encapsulation when you need a database

I think it has super interesting uses that were tedious to pull off in the past. Here’s one way I take advantage of it.

blog.disintegrator.dev/posts/clean-...

11 months ago 2 0 0 0
Running scripts | uv A guide to using uv to run Python scripts, including support for inline dependency metadata, reproducible scripts, and more.

It would be so cool if @pnpm.io could support single file scripting the same way `uv` does including specifying dependencies in at the top of the script file.
docs.astral.sh/uv/guides/sc...

11 months ago 3 0 0 0

There are 2 kinds of structs in a codebase: 1. structs that act as configuration/options for components in the system and 2. structs that carry state to/from DBs, to/from http endpoints, etc... In the case of 1. there is some affordance for unset fields but with 2. it can be really bad to miss one.

1 year ago 0 0 0 0
Post image

Consider what happens to code shown below when a new field is added to the ProductResult struct. To compound the problem, imagine a larger codebase where you're creating `ProductResult` values in a few places. Similarly imagine adding a field to `Product` and forgetting to fill it out before INSERT.

1 year ago 0 0 1 0

I now firmly believe that the zero value concept for structs in @golang.org does more harm than good and have taken to running the exhaustruct linter through golangci-lint to prevent me from ever accidentally relying on it. I might write a post about this some day.

1 year ago 1 0 1 0
Advertisement

Incredible pun. Hat tip and 🫡.

1 year ago 3 0 0 0

Pleas hire Adam so he can keep making incredibly content and educate the rest of us. If I’m at all good at CSS, it’s because of him.

1 year ago 0 0 0 0
proposal: spec: anonymous struct literals · Issue #35304 · golang/go Currently it is not possible to write a struct literal without mentioning its type (with the exception of struct literals in map and slice composite literals). This can make it extraordinarily hard...

I actually have a proposal for something like that. github.com/golang/go/is...

1 year ago 2 1 1 0

Oh my, that is spot on haha! Thanks for sharing :)
Here's hoping it gets more eyes.

1 year ago 2 0 0 0
Code snippet:

foo := {
  "Name": "Georges",
  "Employer": "Speakeasy",
}

type Person struct {
  Name     string
}

type Employee struct {
  Name     string
  Employer string
}

p := foo.(Person)
e := foo.(Employee)

fmt.Println(p.Name, e.Employer)
// all good

Code snippet: foo := { "Name": "Georges", "Employer": "Speakeasy", } type Person struct { Name string } type Employee struct { Name string Employer string } p := foo.(Person) e := foo.(Employee) fmt.Println(p.Name, e.Employer) // all good

I wonder if Go could benefit from object literal syntax that can be late-bound (if that's even a word) #golang

1 year ago 3 0 1 0

- Classes are confusing when used as types. Not nominally typed and you can mistakenly pass a compatible literal object.
- Classes cannot be augmented like interfaces iirc.
- Far easier to discriminate union of classes than union of object types that don’t have a natural discriminator key.

1 year ago 2 0 0 0

No corepack? No problem, mise and aqua are here to make life easier. You can have different versions in different repos and mise will switch to the right ones automatically. And I haven't gone into how useful mise tasks are - so much better than `make` and npm scripts.

1 year ago 1 0 0 0

I love the evolution of projects like TanStack Query where stewardship is shared/passed over to deeply aligned & invested folks. The way Query passed hands from Tanner to Dominik and the project only continued to thrive is inspiring. similar great examples on the Vue/Vite/VoidZero side of the world.

1 year ago 2 0 1 0
Advertisement

I thought about this and I couldn’t come up with an example where open governance wasn’t ceased by big players or used to greatly slow down progress on an otherwise great project. I also don’t think I’m looking hard enough for counter-examples. To me @tanstack.com is setting an important standard.

1 year ago 1 0 1 0

That’s actually genius hahaha

1 year ago 1 0 0 0

Amazing… One of our competitors just copies our docs for features we’ve built and they haven’t yet. Basically selling through.

1 year ago 2 0 1 0

Excitement intensifies!!!

1 year ago 1 0 0 0

Who’s the best Python developer you know that’s looking for a job? You know… the sort that sets all
linters to strictest and has their finger on the pulse of the ecosystem. I want to meet them.

1 year ago 1 0 0 0

Waaaaaait what? Are we going to be able to support SSE APIs and various AI libraries with this?

1 year ago 4 0 1 0

@dr-axel.de you might find this interesting after your recent post on enums too 🙂

1 year ago 3 0 0 0
Preview
An ode to TypeScript enums Pouring one out for a fallen friend

I wrote about the main feature of @typescriptlang.org enums that I'm going to miss: TSDoc support on enum members. I hope the TypeScript team can port this over to union members as more folks migrate towards string unions instead of enums.

blog.disintegrator.dev/posts/ode-to...

1 year ago 21 4 2 0
Screenshot of the Exhaustiveness Checks section of Axel's blog post on TypeScript Enums

Screenshot of the Exhaustiveness Checks section of Axel's blog post on TypeScript Enums

A great tip with exhaustiveness checks using switch blocks is to add a `value satisfies never;` expression to the default branch. This adds a compile time check and you'll spot that you missed a case in your IDE. Demo:
tsplay.dev/w2y48W

1 year ago 5 1 1 0
Advertisement

The Event Destinations Initiative is a community effort aimed at creating a model for event interoperability between event producers and their consumers.

1 year ago 7 2 1 1

I love TypeScript so effing much. I’m laughing so hard at the commitment to the bit.

1 year ago 3 0 0 0

I did this with `uvx posting` yesterday and it was soooo magical!

1 year ago 3 0 0 0

Oh and if I recall correctly, @thedsp.bsky.social mentioned that he worked on LSPs before creating MCP so there's lineage there I guess.

1 year ago 0 0 0 0
Preview
arktype/ark/attest at main · arktypeio/arktype TypeScript's 1:1 validator, optimized from editor to runtime - arktypeio/arktype

Maybe @ssalbdivad.dev can tell you more about @ark/attest

github.com/arktypeio/ar...

1 year ago 3 0 1 0