News for hackers. Stuff that matters.

aleksi

Re:MongoDB API compatible DocumentDB announces 1.0 on Monday October 19, 2026 @03:08PM (#50156589)
You know what you did
Re:Better HTTP/1 connection reuse in Go 1.27 on Wednesday October 14, 2026 @02:10PM (#50092234)
https://pkg.go.dev/net/http#Client.Do

> Note, however, that Transport will automatically try to read a Response Body to EOF asynchronously up to a conservative limit when a Body is closed.

Similar wording appears in a few other places; search for “asynchronously”.

Re:Better HTTP/1 connection reuse in Go 1.27 on Wednesday October 14, 2026 @02:02PM (#50092108)
I can finally remove a similar helper that I copied from project to project and from company to company since r60
> The pull requests are public, and the prompts, raw model outputs, judge verdicts, bug-class labels, repeat runs and scoring scripts are committed with this article.

Okay, but where are they? This quote says that PRs are public. Does that mean that everything else is private and we can’t actually reproduce those results?

This, and the fact that the article doesn't mention reasoning levels, sounds fishy to me.

Re:Malus – Clean Room as a Service on Thursday March 12, 2026 @01:04PM (#47353948)
I was on this talk expecting to hear about MongoDB abusing open source (as you could guess from my profile, that’s a topic dear to my heart). Instead, I saw the most entertaining talk in my life.
Re:Inspecting the Source of Go Modules on Sunday February 15, 2026 @01:43PM (#47026210)
Yet most, if not all, READMEs of official branches recommend using mutable vM tags. Not even branches — tags that they re-create.
Re:Inspecting the Source of Go Modules on Sunday February 15, 2026 @07:23AM (#47023149)
See also https://github.com/golang/go/issues/66653 (that I don’t think is linked from the article)
You omit the fact that he took those words back and said “Crimea is Ukraine” while being in prison, knowing well it will not make his life (and death) easier
Re:Clicks Communicator on Friday January 02, 2026 @12:54PM (#46467418)
> What languages will be supported?

> As a real keyboard with the QWERTY layout, Communicator supports languages that use the Latin alphabet: [...] Russian

Weird

Re:62 chapter open-source Zig book on Tuesday November 18, 2025 @01:00AM (#45961859)
Aaaand it's gone!
Re:Baldur's Gate 3 Steam Deck – Native Version on Wednesday September 24, 2025 @05:04AM (#45357909)
You can make it run much better by increasing the game's process priority with `renice`. I know that sounds like something that should not work, but it does.
Re:Go has added Valgrind support on Tuesday September 23, 2025 @10:45AM (#45347788)
You are right; I stand corrected
Re:Go has added Valgrind support on Tuesday September 23, 2025 @08:34AM (#45346144)
> If you have a struct with a simple int field, and you store that somewhere as an *int, the entire struct and anything it points to will be kept alive.

While Go allows interior pointers, I don't think what you say is true. runtime.KeepAlive was added exactly to prevent GC from collecting the struct when only a field pointer is stored. Take a look at this blog post, for example: https://victoriametrics.com/blog/go-runtime-finalizer-keepal...

Re:Logging in Go with Slog: A Practitioner's Guide on Saturday September 13, 2025 @05:31AM (#45230692)
As a producer of the response, if I didn't care about being understood, I would use a made-up language. As a consumer, you may care about understanding my response, but you cannot do anything about it.
Re:Logging in Go with Slog: A Practitioner's Guide on Saturday September 13, 2025 @05:27AM (#45230669)
I think you missed the “any handler” part. Currently, the types that my library package could use depend on the handler used by the caller. This limits types to an unspecified subset, making things quite impractical.
Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @10:11AM (#45222357)
1) The idea is that your library should accept the slog logger and use it. The caller would create a logger with a handler that defines how log messages are handled. But there are problems with supported types; see my other comments.

2) It is improved in 1.25. See https://github.com/golang/go/issues/59928 and https://pkg.go.dev/testing#T.Output. Now it is possible to update slogt to provide correct callsite – the stack depth should be the same.

Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @09:56AM (#45222224)
My problem with that is that it makes it impossible to use slog logger safely without knowing what handler is being used. Which kind of defeats the purpose of defining the common structured logging interface.
Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @09:53AM (#45222190)
Not sure I understand your sarcasm. I read the documentation, source code, handler writing guide, and issues in the Go repository multiple times over two years, and I use slog extensively. Go is my primary language since r60. I think I know how to read Go docs.

Now, please point me to the place in the documentation that says if I can or can't use a value implementing the error interface as an attribute value, and will the handler or something else would call the `Error() string` method.

My definition of "supported" is simple – I could pass a supported value to the logger and get a reasonable representation from any handler. In my example, the JSON handler does not provide it for the fmt.Stringer.

Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @07:49AM (#45221123)
So clearly not all values are supported.

And I know that I can create a wrapper for unsupported types. My problem is exactly that – I don't know what types are supported. Is error supported, for example? Should I create a wrapper for it? And, as a handler author, should I support it directly or not?

Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @07:22AM (#45220981)
Well, is fmt.Stringer supported? The result might surprise you:

  req := expvar.NewInt("requests")
  req.Add(1)
  
  attr := slog.Any("requests", req)
  
  slog.New(slog.NewTextHandler(os.Stderr, nil)).Info("text", attr)
  slog.New(slog.NewJSONHandler(os.Stderr, nil)).Info("json", attr)
This code produces

  time=2025-09-12T13:15:42.125+02:00 level=INFO msg=text requests=1
  {"time":"2025-09-12T13:15:42.125555+02:00","level":"INFO","msg":"json","requests":{}}
So the code that uses slog but does not know what handler will be used can't rely on it lazily calling the `String() string` method: half of the standard handlers do that, half don't.
Re:Logging in Go with Slog: A Practitioner's Guide on Friday September 12, 2025 @05:34AM (#45220388)
My biggest gripe with slog is that there is no clear guidance on supported types of attributes.

One could argue that supported types are the ones provided by Attr "construct" functions (like slog.String, slog.Duration, etc), but it is not enough. For example, there is no function for int32 – does it mean it is not supported? Then there is slog.Any and some support in some handlers for error and fmt.Stringer interfaces. The end result is a bit of a mess.

Re:Ask HN: Have you ever regretted open-sourcing something? on Wednesday August 06, 2025 @09:17AM (#44811561)
I open-sourced my MongoDB alternative, and all I got was this lousy lawsuit.
Re:Go's race detector has a mutex blind spot on Thursday July 31, 2025 @09:28AM (#44745430)
> It's too slow to run in prod to be worth it

I disagree there. It is reasonable to run a few service instances with a race detector. I have a few services where _all_ instances are running with it just fine.

Re:Timescale Is Now TigerData on Wednesday June 18, 2025 @04:54AM (#44308007)
> Tigris means tiger

I'm pretty sure Tigris Data is named after the Tigris river (https://en.wikipedia.org/wiki/Tigris), and the name does not mean "tiger".

Older »