HN user

tapirl

871 karma
Posts81
Comments624
View on HN
go101.org 9mo ago

Some (Real) Go Subtleties

tapirl
3pts0
go101.org 1y ago

Go toolchain v1.22.n breaks Go 1 compatibility

tapirl
1pts0
go101.org 2y ago

For-Loop Semantic Changes in Go 1.22: Be Aware of the Impact

tapirl
10pts6
go101.org 3y ago

Golds – a godoc alternative which lists all type implementation relations

tapirl
2pts0
old.reddit.com 3y ago

Since Go 1.22, loop {for I, p:= 0, new(int); p = &I; {p = &I}} might never exit

tapirl
26pts17
go101.org 3y ago

Go Built-In Slice Manipulations Are Incomplete

tapirl
2pts0
twitter.com 3y ago

The docs of Go 1.20's arenas experiment feature

tapirl
1pts0
go101.org 3y ago

AConstStr[I] in Go is not a constant, it is a pity and it is a luck

tapirl
1pts0
go101.org 3y ago

No safe efficient ways to do three-way string comparisons in Go

tapirl
175pts150
go101.org 4y ago

Go Optimizations 101: suggestions and tricks for high performance Go programming

tapirl
2pts1
go101.org 4y ago

Use Go Maps Efficiently

tapirl
2pts0
go101.org 4y ago

Add one more line will improve Go program performance much

tapirl
1pts0
www.reuters.com 4y ago

PayPal offered to buy Pinterest for $45B

tapirl
2pts0
github.com 5y ago

Go is not C, so there is not an extreme fast way to merge slices

tapirl
2pts0
github.com 5y ago

Writing qualified Go benchmarks is not easy

tapirl
1pts0
github.com 5y ago

Golds: A code reader for reading and studying Go code in a mouse-click way

tapirl
1pts0
twitter.com 5y ago

Intel's Fate (2014)

tapirl
1pts0
www.quora.com 5y ago

Intel's market share will be occupied by ARM, sooner or later (2014 by He Shang)

tapirl
1pts0
github.com 5y ago

FyneDesk is an easy to use Linux/Unix desktop environment built in Go

tapirl
4pts0
aeon.co 5y ago

Sex Is Real

tapirl
41pts32
js13kgames.com 5y ago

A wonderful 3D game in browser with 13k code size

tapirl
2pts0
github.com 5y ago

Img2css – Convert any image to pure CSS

tapirl
15pts0
zzz.dog 5y ago

Zdog – Round, flat, designer-friendly pseudo-3D engine for canvas and SVG

tapirl
2pts0
github.com 5y ago

Go might support converting a slice []T to an array pointer *[N]T soon

tapirl
1pts0
www.tapirgames.com 5y ago

Full List of Open Source Physics Engines

tapirl
15pts0
www.go101.org 5y ago

Golang Channel Use Cases

tapirl
2pts0
twitter.com 5y ago

“make+copy” calls run faster than a single “make” call in Go

tapirl
2pts0
github.com 5y ago

Gold: A local docs server for Go, shows type implementation relations in brower

tapirl
1pts0
github.com 6y ago

An experimental Go local docs server which shows type implementation relations

tapirl
1pts0
imgur.com 6y ago

There is a function which has 18 return results in the K8s project

tapirl
1pts0

Performance alone doesn't always imply verbosity, but combining it with other goals—such as increased security and more power std APIs—often does.

Zig is indeed verbose in some aspects, but not overall. For example, its `try error-union` syntax eliminates a lot of boilerplate code.

The main reason why Zig is verbose in some aspects is the main goal of Zig is program performance. It is a worthy tradeoff.

Zig by Example 1 month ago

Having quick viewed all the chapters, the examples are too simplistic to fully demonstrate Zig's syntax and semantics.

Mojo 1.0 Beta 2 months ago

It might be feature richer, but it is hard to say it is more powerful. Sometimes, features (especially constraints) will reduce powerlessness.

Mojo 1.0 Beta 2 months ago

..., comptime that is more powerful than Zig

It would be great if you can elaborate more here. I can't make the conclusion from Mojo's docs now.

... and perhaps `go fix` should add a check for this (

This is an impossible task. For a library function, you can't know whether or not the function is defer called.

Maybe this is not an important problem. But it would be better if the blog article mentions this.

similar:

    package main

    //go:fix inline
    func foo[T [8]byte | [4]uint16]() {
        var v T
        var n byte = 1 << len(v) >> len(v)
        if n == 0 {
            println("T is [8]byte")
        } else {
            println("T is [4]uint16]")
        }
    }

    func main() {
        foo[[8]byte]()
    }

It looks the following code will be rewritten badly, but no ways to avoid it? If this is true, maybe the blog article should mention this.

    package main
    
    //go:fix inline
    func handle() {
        recover()
    }
    
    func foo() {
        handle()
    }
    
    func main() {
        defer foo()
        panic("bye")
    }

This one is just an example to demo one case of backward-capability breaking.

All the examples in that article are very exotic.

Have you carefully read that article? All? You must be kidding. The article shows several cases used in practice.

The change made in Go 1.22 for 3-clause-for loops is not a new feature. It simply broke backward compatibility and old Go principles. It is much worse than C++'s stuff features.