Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tapirl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
151.
▲
by
tapirl
2y ago
Could you elaborate more?
152.
▲
by
tapirl
2y ago
Agree. Now, the old built-in iterators (containers) are incompatible with the new custom iterators. But it looks the Go core team never care about the consistency problem. The old built-in generics are also incompatible with the new custom
153.
▲
by
tapirl
2y ago
Correction: // Only care about the iteration count for range aContainer { ... } // Just the values for v := range myChannel { ... } // Indexes and values (or keys and values for a ma
154.
▲
by
tapirl
2y ago
> One literal interpretation of Pike's quote is that message passing is different than sharing memory for pedantic reasons. Copying values between sender/receiver stacks is safer than sharing memory. But it is also possible to
155.
▲
by
tapirl
2y ago
The core problem here is that "Go promotes explicitness" ended at Go 1.21. Since Go 1.22, it is no longer valid. The change of "for-range" loops is good is because no implicit code is introduced. And the change of "
156.
▲
by
tapirl
2y ago
The cost of making the consistency is too large and the benefit is too tiny.
157.
▲
by
tapirl
2y ago
If you can guarantee that every gophers know the effects of the change. :D The problem of the change is that, if you upgrade your go version in go.mod files, the behavior of the your old code might change. And the change might be not easily
158.
▲
by
tapirl
2y ago
I know that, the change of "for-range" is good. But it creates more surprises in the uses of "for;;" loops. Please read the cases in that article.
159.
▲
by
tapirl
2y ago
I never doubt it is a good change for "for-range" loops. The change for "for-range" loops didn't introduce magic hidden code. But the change on "for;;" loops creates more surprises than before and gets rar
160.
▲
by
tapirl
2y ago
The arena allocator implementation for general uses absolutely should not do the zero work. This is specific use case, which can be implemented in an app-specific custom allocator.
161.
▲
by
tapirl
2y ago
But is this a problem?
162.
▲
by
tapirl
2y ago
> ... No hidden magic ... This has been changed since Go 1.22. Go 1.22 introduced magical hidden code: https://go101.org/blog/2024-03-01-for-loop-semantic-changes-...
163.
▲
by
tapirl
2y ago
Obsidian supports html->md natively. Just copy the texts in browser and paste them in Obsidian.
164.
▲
by
tapirl
2y ago
Good reason. But I think it is not the responsibility of memory allocators to do the zero work. It is what the application code should do.
165.
▲
by
tapirl
2y ago
Maybe someone think "func" listens like another word.
166.
▲
by
tapirl
2y ago
If needed, you should zero memory on allocation succeeds, instead of zeroing it after it is freed.
167.
▲
by
tapirl
2y ago
Need varies. Some memory needs to be still alive after the parse process.
168.
▲
by
tapirl
2y ago
Go has almost no requirements on project directory structure. Could you elaborate more?
169.
▲
by
tapirl
2y ago
Year 1997, Seagate 4.3G, $200
170.
▲
by
tapirl
2y ago
1. some people turn JS off 2. it slows down page rendering
171.
▲
by
tapirl
2y ago
JQuery, React, Vue, Svelte etc indeed do some essential functionality things a few users need. Houdini is different. It is more about layout and styling.
172.
▲
by
tapirl
2y ago
> If your language’s compiler toolchain can manage to produce useful Wasm in a file that is less than a handful of over-the-wire kilobytes, you can win. Zig is perfect for this. Personally, I don't think this is an important factor
173.
▲
by
tapirl
2y ago
Houdini needs JavaScript, which is a big obstacle for it to become popular.
174.
▲
by
tapirl
3y ago
A similar tool for Go: https://go101.org/apps-and-libs/gotv.html
175.
▲
by
tapirl
3y ago
Does WebRTC still ignore web proxies?
176.
▲
by
tapirl
3y ago
> Would it be accurate to say that the variable values are fresh per iteration as of 1.22 and fresh only per initialization prior? Yes, if the loop variables are declared in the init-statement of a loop (using := ).
177.
▲
by
tapirl
3y ago
Most Go scripts are not public. But anyway, just being rare, so deserves to be ignored?
178.
▲
by
tapirl
3y ago
Could you elaborate more on "fresh only per initialization prior"? I don't very get it.
179.
▲
For-Loop Semantic Changes in Go 1.22: Be Aware of the Impact
(go101.org)
10 points
by
tapirl
3y ago
|
6 comments
180.
▲
by
tapirl
3y ago
"go run" was a great way to run go code as scripts. But maybe it is not now. Why? because Go 1.22 introduced a change that breaks backwards compatibility (changing the semantics of "for;;" loops). Without language versio
More ›