TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Open-source interactive C tutorial in the browser

256 点作者 Buttons84016 天前

18 条评论

herewulf16 天前
As great as this looks, I think it should heavily emphasize moving on to using GCC (or maybe LLVM).<p>I learned C in the mid nineties using a copy of Visual C++ 1.0 that a friend had gotten from his father (and probably he got it from work). It was the only compiler I knew of and once I was ready to move beyond toy programs, I was seriously hampered by the fact that this compiler couldn&#x27;t produce text mode executables (any call to printf opened its own new window that definitely wasn&#x27;t cmd.exe) and it couldn&#x27;t set the graphics mode for blitting pixels. It was heavily oriented around this new fangled MFC thing but I was a teenager so I wanted to program <i>games</i> not business apps or whatever. That meant I wanted text mode or graphics mode.<p>My high school CS class had Borland C++ and I could set mode 0x13 with that in DOS. But I had no way of obtaining this compiler as a kid. And it probably didn&#x27;t work on Windows 95 anyway.<p>Anyways, it wasn&#x27;t until the early 2000s that I finally learned about GCC, a free as in beer and freedom compiler and the simplicity of it would have been amazing for learning.. <i>If only I had known</i>.
评论 #43816540 未加载
评论 #43811431 未加载
评论 #43816538 未加载
评论 #43813757 未加载
评论 #43810140 未加载
Buttons84016 天前
Saw this mentioned in a HN comment and thought it deserved more attention: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34106174">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34106174</a>
atiedebee15 天前
Skimming through the pages, there is some things that aren&#x27;t really accurate.<p>&gt; Integers - whole numbers which can be either positive or negative. Defined using char, int, short, long or long long<p>char is either signed or unsigned depending on the platform&#x2F;implementation. Use signed char if you want signed integers.<p>Telling people who are new to C to define booleans with macros is not a good idea, as they have had a proper implementation since c99.<p>It also feels weird to treat structs and pointers as advanced topics. They are basically required to be productive in the language.<p>stdint.h was introduced in c99, not c11.<p>Explaining bitwise operators as &quot;bitmasks&quot; is also quite weird. Bitmasking is just one of the few things you can do with them.<p>&gt; In C, functions must be first defined before they are used in the code. They can be either declared first and then implemented later on using a header file or in the beginning of the C file, or they can be implemented in the order they are used (less preferable).<p>This paragraph reads weird. I haven&#x27;t found any place where the tutorial mentions how to properly write header files. It might be because of the interactive part, but if that is the case then this tutorial doesn&#x27;t really teach you how to program in C because the tooling around it is an important part of actually using the language. It is also fairly common to declare functions in order of use. Discouraging that is like telling people they need to use tabs over spaces instead of actually focussing on language semantics.
fuhsnn16 天前
&gt; Defined using char, int, short, long or long long<p>&gt; Note that C does not have a boolean type<p>`_Bool` and `long long` are both introduced in C99, this is mixed up info.<p>Edit: probably tailor-made for old MSVC, which didn&#x27;t support _Bool until VS2013.
评论 #43810189 未加载
anovikov16 天前
Unbearable with ads all around.
评论 #43811725 未加载
评论 #43811079 未加载
eigenvalue15 天前
When I see a page filled with junky ads like that, I instantly close it. On mobile especially, it’s unusable.<p>I’m amazed something like this gets traction here.
评论 #43815189 未加载
评论 #43812356 未加载
评论 #43812362 未加载
codr715 天前
The more, the merrier, here is another one I&#x27;ve been working on lately:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;hacktical-c">https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;hacktical-c</a>
doublerabbit16 天前
The issue I always find with these tutorials that they never seem explain the finer details.<p>On the Array Page:<p>&#x2F;* print the 7th number from the array, which has an index of 6 *&#x2F;<p>printf(&quot;The 7th number in the array is %d&quot;, numbers[6]);<p>There is no mention of what %d is or does. Once you know, it&#x27;s fine, it&#x27;s the display placeholder for the variable but that&#x27;s what throws me off on tutorials.
alabhyajindal15 天前
I need to brush up on C for my dissertation. How does this compare to Head First C?<p>I read the first chapter of that book and loved it! Very unlike other books on C which dedicate an entire chapter to `for` loop for instance. How do other programmers even read a book like that? Isn&#x27;t it tiring to read through how a `for` loop works for the 70th time.
评论 #43822463 未加载
Borzadaran15 天前
Interactive tutorials are great for lowering the entry barrier, but technical accuracy is crucial for beginners. It&#x27;s suggested to stick to a single C standard (like C99), properly cover essential topics like structs and pointers, and prefer _Bool over macros for booleans. Overall, the effort is appreciated.
dalton_zk15 天前
C is a great language to learn if you want understand the fundamentals of computer. Personally, C was on of the first language that I learned, and until today help me if I want to learn a new language!<p>I loved the interactive tutorial!!!
评论 #43814363 未加载
larfus16 天前
Had a bunch of inconsistencies last time i checked. Not quite comprehensive nor does it have much clarity. I also could hardly see when I disabled my ad block momentarily.<p>Moral of the story: books are better for learning when it comes to C.
dbacar16 天前
They host lots of other languages as I see. <a href="https:&#x2F;&#x2F;www.learnshell.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.learnshell.org&#x2F;</a> <a href="https:&#x2F;&#x2F;www.learnjavaonline.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.learnjavaonline.org&#x2F;</a> ...
评论 #43822518 未加载
BiraIgnacio14 天前
I love initiatives like this one. Thanks for working on it.
orionblastar16 天前
We need more resources like this. Thank you.
kubb16 天前
Good luck to the author with the tutorial. I&#x27;m really beginning to accept that despite all of the new languages, like Rust and Zig being available, they won&#x27;t be able to displace C for the next couple of decades at least. A good programmer will need to learn all the techniques for working with C code safely, efficiently and reliably, with all the inconveniences that implies.
评论 #43810775 未加载
arcmechanica16 天前
no thanks
immibis16 天前
We should call things free software if they&#x27;re free software and open source if they&#x27;re not. Also, what&#x27;s this cookie consent dialog about? Are those 999 business partners open source?