TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A “Better C” Benchmark

20 pointsby Liskni_siabout 4 years ago

2 comments

coldteaabout 4 years ago
I was fairly hyped up about Zig with various HN pieces I&#x27;ve read and wanted to check it out. After reading the status of strings in Zig in this post, and going on and reading this ludicrous exchange: [1], I wouldn&#x27;t touch it with a 100-ft pole.<p>Half of the brokage of C is in the string handling (safety aside), and this is what passes for a &#x27;better C&#x27; candidate in 2021?<p>And don&#x27;t get me started on their discussion on Unicode support. It&#x27;s like some bizarro alternative universe, where ASCII or a bag of bytes is good enough...<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ziglang&#x2F;zig&#x2F;issues&#x2F;234" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ziglang&#x2F;zig&#x2F;issues&#x2F;234</a>
评论 #26579465 未加载
评论 #26575982 未加载
评论 #26577848 未加载
kristoff_itabout 4 years ago
Copied from my reply on Lobsters (<a href="https:&#x2F;&#x2F;zserge.com&#x2F;posts&#x2F;better-c-benchmark&#x2F;" rel="nofollow">https:&#x2F;&#x2F;zserge.com&#x2F;posts&#x2F;better-c-benchmark&#x2F;</a>)<p>---<p>For what it&#x27;s worth, we do understand that the lack of stdlib documentation is a problem. Before I expand on that, here&#x27;s the current &quot;workarounds&quot; to be immediately productive:<p><a href="https:&#x2F;&#x2F;ziglearn.org" rel="nofollow">https:&#x2F;&#x2F;ziglearn.org</a> is a structured introduction to Zig that covers an introduction to Zig that is very friendly to newcomers. Chapter 2 in particular helps solving common problems and showcases some parts of the standard library while doing so.<p>On the Zig SHOWTIME YouTube channel there are a few videos that can help. One video in particular is about how to approach the Zig standard library today [1], while we wait for better docs.<p>Asking for help in a Zig community [2] is so easy it&#x27;s like cheating, and it&#x27;s also a door to knowing when new resources pop up.<p>So, what&#x27;s up with the stdlib docs? We have an experimental build [3] and, as the name implies, they&#x27;re incomplete and not considered good. Why are we not working on them? Because the docs are a JS interface to a bunch of metadata generated by the compiler during the build phase. We are currently transitioning to a self-hosted implementation [4] of the compiler and, until it&#x27;s complete enough, we are stuck with the incomplete and buggy metadata that the current C++ compiler generates. I personally plan to get involved in the docs effort once the situation gets unblocked.<p>&gt; I wish Zig had a better documentation to gain popularity before it becomes too niche and obscured.<p>Oh, don&#x27;t worry about that :)<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=NQgju_2mX-8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=NQgju_2mX-8</a> [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;ziglang&#x2F;zig&#x2F;wiki&#x2F;Community" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ziglang&#x2F;zig&#x2F;wiki&#x2F;Community</a> [3] <a href="https:&#x2F;&#x2F;ziglang.org&#x2F;documentation&#x2F;master&#x2F;std&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ziglang.org&#x2F;documentation&#x2F;master&#x2F;std&#x2F;</a> [4] <a href="https:&#x2F;&#x2F;kristoff.it&#x2F;blog&#x2F;zig-new-relationship-llvm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kristoff.it&#x2F;blog&#x2F;zig-new-relationship-llvm&#x2F;</a>