HNHacker News
TopNewBestAskShowJobs

tapirl

871 karma · joined February 7, 2015

submissionscomments
tapirl··on No CSS, No JavaScript. Longevity on the Web
Just use it when it is needed. Try don't use it when it is unnecessary.
tapirl··on Go is still not good
but still a Go newbie?

The article's points feel overly simplistic/shallow and lack the depth you'd expect from an experienced Go programmer.

tapirl··on Go is still not good
Go indeed has some problems. But IMHO, none described in this article is valid.
tapirl··on Go is still not good
Go indeed has its problems. But the ones described in this article just prove the author is a Go newbie.
tapirl··on Zig's Lovely Syntax
Normal function declarations.

This is indeed a point which makes Zig inflexible.

tapirl··on How we replaced Elasticsearch and MongoDB with Rust and RocksDB
It is weird to include "Rust" (a language) in the title. Readers might wonder what is replaced by Rust? Elasticsearch or MongoDB?
tapirl··on There is no memory safety without thread safety
Listens your team had not sufficient review capacity at that time.
tapirl··on Go allocation probe
That is a general rule. Yours is a special case.
tapirl··on Jujutsu for busy devs
Isn't "jj new" what you need?
tapirl··on Jujutsu for busy devs
just when you face some unusual situations ...
tapirl··on Generic interfaces
If Go generics support typeclasses, things will be much better now. At least custom generics and built-in generics will be unified harmoniously. Now, the manners of type argument passing with the built-in `new` and `make` function and custom generic functions are different. The inconsistency increases the load of cognition burden in Go programming.

It is pity that Go generics designer never expressed the intention to unify custom generics and built-in generics.

tapirl··on Generic interfaces
It was also promoted as a language that prioritizes explicitness. But just look at the changes made in Go 1.22 (3-clause for-loop semantic change, [1]) and 1.23 (iterators, [2]). Magic implicitness was introduced in the two versions.

Even worse, it was also promoted to keep backboard-compatibility seriously. But Go 1.22 broke the backward-compatibility so badly ([3] [1]). Despite this, the Go 1.22 release notes still claims "As always, the release maintains the Go 1 promise of compatibility".

[1]: https://go101.org/blog/2024-03-01-for-loop-semantic-changes-...

[2]: https://go101.org/blog/2025-03-15-some-facts-about-iterators...

[3]: https://go101.org/bugs/go-build-directive-not-work.html

And the change makers even have no interests to fix the problems caused by the changes:

* https://github.com/golang/go/issues/66070#issuecomment-19816...

* https://github.com/golang/go/issues/71830

* https://github.com/spq/pkappa2/issues/238

* https://github.com/golang/go/issues/66388

* https://github.com/golang/go/issues/71685

tapirl··on Generic interfaces
> Generic is not about reducing how many keys you press but how you abstract your logic from the type. In go, it reduces a lot code making it safer and faster.

No, this is not true for Go, at least for the current Go generics.

At runtime, Go generics can't be faster than generated repetitive code. Often, generic code is a little slower. Because sometimes values of type parameters are treated as interface values by the Go compiler, even if they are not.

> Handling interface{} was just painful.

Go generics are often helpless for this. Most use cases of interface{} are for reflection purpose and can't be re-implemented by Go generics. Some non-reflection use cases can't be also re-implemented by Go generics, because Go generics don't support type unions.

tapirl··on Generic interfaces
> This idea proves to be surprisingly powerful when it comes to expressing constraints on generic functions and types.

Disagree. IMHO, this idea is the root cause of why Go generics is so complicate but also restrictive at the same time. And it introduces significant challenges in implementation and design: https://go101.org/generics/888-the-status-quo-of-go-custom-g...

tapirl··on ThorVG: Super Lightweight Vector Graphics Engine
pros and cons vs. skia?

Does it has a stable c API?

tapirl··on Pure vs. Impure Iterators in Go
The bug is confirmed: https://github.com/golang/go/issues/71685
tapirl··on Pure vs. Impure Iterators in Go
Be careful there are bugs and design flaws in Go iterators: https://go101.org/blog/2025-03-15-some-facts-about-iterators...
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
Because I am indeed experiencing the fact that AI systems do better and better.
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
I write code in notebook++ and never format my code. :D
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
I believe future AI systems can make correct answers. The rule is clearly specified in Go specification.

BTW, I haven't found an AI system can get the correct output for the following Go code:

    package main

    import "fmt"

    func main() {
        for counter, n := 0, 2; n >= 0; n-- {
            defer func(v int) {
                fmt.Print("#", counter, ": ", v, "\n")
                counter++
            }(n)
        }
    }
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
For the OP's specified case, it is only a little language related. It is more a lib/framework related thing.
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
I have never seen any AI system could explain correctly on the following Golang code:

    package main

    func alwaysFalse() bool {
     return false
    }

    func main() {
     switch alwaysFalse() // don't format the code
     {
     case true:
      println("true")
     case false:
      println("false")
     }
    }
> Go community was trained for the longest time not to make backward-incompatible API updates so that helps quite a bit in consistency of dependencies across time

Not true for Go 1.22 toolchains. When you use Go 1.21-, 1.22 and 1.23+ toolchains to build the following Go code, the outputs are not consistent:

    //go:build go1.21
    package main

    import "fmt"

    func main() {
     for counter, n := 0, 2; n >= 0; n-- {
      defer func(v int) {
          fmt.Print("#", counter, ": ", v, "\n")
          counter++
      }(n)
     }
    }
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
Comparing Rust with Electron is so weird. One is a language, the other is a lib/framework.
tapirl··on Show HN: I rewrote my Mac Electron app in Rust
My surprise is typescipt is so slow. I have never used it yet, but I think will never too.
tapirl··on Show HN: A Database Written in Golang
With Go toolchain [1.17, 1.23.1], it fails to build.
tapirl··on Show HN: A Database Written in Golang
Cool!

btw, README says Go 1.17+ is required, but go.mod says 1.23+.

tapirl··on Go Data Structures: Interfaces (2009)
Storing concrete values into interfaces often cause allocations, which has a larger impact on performance than inlining.
tapirl··on Zig; what I think after months of using it
It seems you are proving Zig will not become very popular, but not Zig will not become more popular than Rust.

I agree that Zig will not become very popular. It needs certain programming experiences to master it. But I'm quite sure it will become more popular than Rust.

tapirl··on Zig; what I think after months of using it
Zig might not become very popular, but IMO, it will become more popular than Rust. Zig is good at all the areas Rust is good at. Zig is also good at game development which Rust is not good at.

And Zig is better when integrating with C/C++ libraries.

tapirl··on TiDB – cloud-native, distributed SQL database written in Go
Is tikv (still) a wrapper of RocksDB?
← PreviousPage 3 of 21Next →