Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tapirl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
tapirl
9mo ago
This is one reason why I created TapirMD, which offers better specificity.
32.
▲
by
tapirl
9mo ago
CSS sucks because it is sometimes elegantly simple and intuitive, other times a maze of quirky, frustrating hacks.
33.
▲
by
tapirl
9mo ago
Similar to my "Go 101" books website, about 1000 line of Go code (started from 500 lines at 9 years ago). The whole website can be built into a single Go binary.
34.
▲
by
tapirl
9mo ago
typo: s/with/without/
35.
▲
by
tapirl
9mo ago
> Tabs should be navigable by arrow keys [4], which also requires JavaScript. It supports this now (with JavaScript). If not, try to refresh the page.
36.
▲
by
tapirl
9mo ago
for "accessible", do you mean getting focused when pressing TAB key?
37.
▲
by
tapirl
9mo ago
The pure-css effects I mentioned both don't use <detail>/<summary>.
38.
▲
by
tapirl
9mo ago
I really don't know. I'm not a CSS expert. I've just picked up bits and pieces of CSS knowledge from Google and AI agents. These results often aren't perfect, so you'll need to make some adjustments.
39.
▲
by
tapirl
9mo ago
The details / summary feature can also be implemented with pure css without JavaScript. Here is an example: https://docs.go101.org/std/pkg/io.html , just click all "+" signs to expand contents. We ca
40.
▲
by
tapirl
10mo ago
SetFinalizer is deprecated by AddCleanup: https://pkg.go.dev/runtime#AddCleanup AddCleanup might be too heavy, it is cheaper to just set a bit in the header/info zone of memory blocks.
41.
▲
by
tapirl
10mo ago
> Rust can also do arena allocations, and there is an allocator concept in Rust, too. Just a pure question: Is Rust allocator global? (Will all heap allocations use the same allocator?)
42.
▲
by
tapirl
11mo ago
So I designed TapirMD [1], a new markup language which is still readable but more powerful, to help me (a tech writer) create web content. [1]: https://tmd.tapirgames.com
43.
▲
by
tapirl
11mo ago
They can fix the issue by just changing the semantics of "for-range" loops, almost no negative effects. But they also applied the change to 3-clause-for loops, which causes many problems, some of which have been pointed out before
44.
▲
by
tapirl
11mo ago
The problem is, when you modified the go version in go.mod, the behaviors of some code change, but the change is not easy to detect in time. Go team never plan to develop a tool to identify/detect code affected by such breaking changes
45.
▲
by
tapirl
11mo ago
> Go stands by its compatibility promise—the old way will continue to work in perpetuity ... It is so weird that they still claim this after they have made the the semantic change for 3-clause for-loop in Go 1.22. When a Go module is upg
46.
▲
by
tapirl
11mo ago
Thank you very much for your feedback. I truly appreciate it. TapirMD is not a superset of Markdown or CommonMark. It simply inherits some of its DNA from Markdown. While Markdown is very simple, it is also highly underspecified and syntact
47.
▲
by
tapirl
11mo ago
There's a newcomer, TapirMD, in case you're interested: https://tmd.tapirgames.com/index.html It hasn't reached its v0.1.0 milestone yet, but soon.
48.
▲
by
tapirl
11mo ago
still less than Rust posts.
49.
▲
by
tapirl
1y ago
Subtleties are not necessary to be very useful. They, are just real subtleties. :) > > “for true {...} and for {...} are not eqivalent” > So what? The compiler will tell you the first time you try to run that “for true” abominatio
50.
▲
Some (Real) Go Subtleties
(go101.org)
3 points
by
tapirl
1y ago
|
0 comments
51.
▲
by
tapirl
1y ago
The wording "Subtleties" used here is some weird/improper. I see nothing subtle here. They are all basic knowledge a qualified Go programmer should know about. They are many real subtleties in Go, which even many professional
52.
▲
by
tapirl
1y ago
My last comment has imprecision and misunderstanding. > ... [1024]float64 will be always allocated on one whole page, aka, always 64-byte aligned. if it is allocated on heap and at the start of allocated memory block. > For "Arra
53.
▲
by
tapirl
1y ago
The "_ [0]byte" trick has no base in my knowledge. For the author's specified example, [1024]float64 will be always allocated on one whole page, aka, always 64-byte aligned. For "Array of Structs vs Struct of Arrays"
54.
▲
by
tapirl
1y ago
sorry, the False Sharing tick works. See https://news.ycombinator.com/item?id=45547441
55.
▲
by
tapirl
1y ago
sorry, the False Sharing tick works. See https://news.ycombinator.com/item?id=45547441
56.
▲
by
tapirl
1y ago
Many thanks for providing the source. It also works on my machine. TIL.
57.
▲
by
tapirl
1y ago
Could you share the benchmark source code of the first example?
58.
▲
by
tapirl
1y ago
None of the tricks in this article get verified. It is totally solemn drivel. Interesting and surprisingly, there are numerous praising comments here.
59.
▲
by
tapirl
1y ago
None of the tricks in this article get verified. Almost all of them are false.
60.
▲
by
tapirl
1y ago
"[0]uint64" only guarantees 8-byte alignment (and only under certain scenarios), not 64-byte.
More ›