go
zig
go | zig | |
---|---|---|
2,151 | 840 | |
123,211 | 34,037 | |
0.8% | 1.7% | |
10.0 | 10.0 | |
5 days ago | 4 days ago | |
Go | Zig | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go
-
SwissTable: A High-Performance Hash Table Implementation
In 2022, ByteDance proposed an issue recommending that Golang adopt SwissTable for its map implementation. In 2023, Dolt published a blog post titled SwissMap: A Smaller, Faster Golang Hash Table, detailing their design of a swisstable, which garnered widespread attention. The Go core team is reevaluating the swisstable design and has added some related code in the runtime. With some free time during the holidays, let's delve deeper into the principles, compare it to the runtime map, and understand why it might become the standard for map implementation.
-
Some Go web dev notes
https://github.com/golang/go/issues/54380
I didn't know about that. I agree it qualifies as a "weird issue".
-
The perils of transition to 64-bit time_t
Exactly. This is also highly problematic if you try to perform atomic operations against bare 64 bit integers on those systems, because the atomic instructions do require them to be 8 byte aligned. In C11 and later it’s not an issue, because _Atomic(int64_t)’s alignment may be stricter than int64_t.
This was also an issue in Go, because it tries to use the same alignment rules as C to make cgo work. There they also solved it by adding dedicated atomic types.
https://github.com/golang/go/discussions/47141
- gRPC: onde vive? o que come?
-
gRPC: what is it? An introduction...
gRPC is not more than an abstraction over the conventional RPC, using protobuf as the serializer and making requests over http/2. There are some performance considerations when using http/2, and in some cases, using http/1 can be faster! I recommend you to read this benchmark and this open issue on golang/go about the http/2. However, when dealing with requests with a large/complex body, gRPC turns out to be a great solution due to having the protobuf as the serializer, which is much faster than serializing JSON as an example. Elton Minetto wrote a great blog post explaining better those alternatives and benchmarking them. Another great benefit of using protobuf is solving the contract inconsistency between the client and the server since they both use the same .proto files.
-
Register Allocation in the Go Compiler
Really appreciate the article and the pointer to Go's SSA backend, which appears to implement common optimization passes like SCCP succinctly with good comments[0]. It's always nice to see harder concepts implemented with simplicity and readability in mind.
[0] https://github.com/golang/go/blob/master/src/cmd/compile/int...
-
Decrypt Go: varint
Recently, I discovered that the Go standard library includes a built-in implementation of varint, found in encoding/binary/varint.go. This implementation is similar to the varint used in protobuf. Using the Golang standard library's varint source code, we will systematically learn and review the concept of varint. If you're familiar with protobuf, you probably already know that all integer types (except fixed types like fixed32 and fixed64) are encoded using varint.
- Go crypto package: obtain a FIPS 140-3 validation
-
Interning in Go
We agreed to make the threadsafeness more explicit in the documentation of the 'unique' package: https://github.com/golang/go/issues/69637
-
The implications of running Go in a containerised environment.
Now Go is NOT CFS aware golang/go#33803 therefore GOMAXPROCS will default to using all 8 cores of the Task.
zig
-
Pledging $300k to the Zig Software Foundation
> And there's also the aliasing issue
Plans to address this were shared just last week: https://github.com/ziglang/zig/issues/5973#issuecomment-2380...
-
One must imagine Sisyphus writing a new JS framework
You crave the simplicity of C, but miss modern features and a nice build system? You got Zig
-
The Python Package Index Should Get Rid of Its Training Wheels
I raise you https://github.com/ziglang/zig/issues/20875
It is not entirely clear what any of this means, and in any case, it keeps changing all the time.
-
Don't defer Close() on writable files
Arguably, one should call `flush()` on the file first. Resource allocation must always succeed; otherwise a lot of invariants break. This is why Zig's close method[0] ignores errors (with the exception of `EBADF`).
[0]: https://github.com/ziglang/zig/blob/fb0028a0d7b43a2a5dd05f07...
- Zig: Prefer depending on NtDll rather than kernel32 or other higher level DLLs
-
Book – Writing a C Compiler: Build a Real Programming Language from Scratch
Zig is moving away from LLVM (https://github.com/ziglang/zig/issues/16270) and Rust has added Cranelift as a debug backend (https://lwn.net/Articles/964735/).
Not sure about Jai.
-
C Macro Reflection in Zig – Zig Has Better C Interop Than C Itself
It won't require build.zig, you'll just have to run `zig translate-c` on the C file. Andrew's comment here[1] says that @cImport is basically @import + the compiler implicitly running `translate-c` for you. There was some discussion of removing the `translate-c` subcommand as well (which _would_ force you to use build.zig), but I don't think it's been decided to do that.
[1] https://github.com/ziglang/zig/issues/20630#issuecomment-225...
-
Zen 5's 2-Ahead Branch Predictor: How a 30 Year Old Idea Allows for New Tricks
We would need more branch hints? https://github.com/ziglang/zig/issues/5177
Cold, warm, warmer, hot? Sometimes you would set all branches to be cold except one
-
Aro – Zig's new C compiler
It's the major area of focus right now. You can track the issues with this tag/link if you'd like:
https://github.com/ziglang/zig/issues?q=is%3Aissue+is%3Aopen...
- Use Zig cc to cross‐compile a CMake project
What are some alternatives?
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Odin - Odin Programming Language
Angular - Deliver web apps with confidence 🚀
rust - Empowering everyone to build reliable and efficient software.
golang-developer-roadmap - Roadmap to becoming a Go developer in 2020
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!
RxGo - Reactive Extensions for the Go language.
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266