Readit News logoReadit News
lmh commented on How safe is Zig?   scattered-thoughts.net/wr... · Posted by u/orf
kristoff_it · 4 years ago
Somebody implemented part of it in the past, but it was based on the ability to observe the order of execution of comptime blocks, which is going to be removed from the language (probably already is).

https://github.com/DutchGhost/zorrow

It's not a complete solution, among other things, because it only works if you use it to access variables, as the language has no way of forcing you.

lmh · 4 years ago
Thanks, that's interesting.
lmh commented on How safe is Zig?   scattered-thoughts.net/wr... · Posted by u/orf
pron · 4 years ago
Not as it is (it would require mutating the type's "state"), but hypothetically, comptime could be made to support even more programmable types. But could doesn't mean should. Zig values language simplicity and explicitness above many other things.
lmh · 4 years ago
Thanks, that's informative. This was meant to clarify the bounds of Zig's design rather than as a research proposal. Otherwise, one might read it as an open invitation to just the sort of demonic meta-thinking that its users abhor.
lmh commented on How safe is Zig?   scattered-thoughts.net/wr... · Posted by u/orf
lmh · 4 years ago
Question for Zig experts:

Is it possible, in principle, to use comptime to obtain Rust-like safety? If this was a library, could it be extended to provide even stronger guarantees at compile time, as in a dependent type system used for formal verification?

Of course, this does not preclude a similar approach in Rust or C++ or other languages; but comptime's simplicity and generality seem like they might be beneficial here.

lmh commented on A new, undocumented INT1 tensor core instruction in Nvidia Ampere   github.com/NVIDIA/cutlass... · Posted by u/lmh
lmh · 6 years ago
For the hardware and architecture nerds, CUTLASS now appears to include support for an INT1 (binary) AND-popcount matrix multiplication, in addition to the XOR-popcount present in Turing.
lmh commented on A Peek at GNU Radio’s Buffer Architecture   gnuradio.org/blog/buffers... · Posted by u/ptr
zump · 9 years ago
SDR strikes me as good in theory, but breaks down for anything practical.

My core 2 duo was 100% cpu utilization simply from decoding 56kbps 2-BPSK, even with SIMD extension enabled (within GR).

lmh · 9 years ago
You may find this SDR LTE eNodeB interesting: http://bellard.org/lte/

There's also this open-source LTE library: https://github.com/srsLTE/srsLTE

u/lmh

KarmaCake day173July 4, 2010View Original