back
user profile

lerno

1,422karma·409submissions·April 1, 2014
recent activity (409 total)
comment
No, there is an incomplete proposal for it here though: https://github.com/c3lang/c3c/issues/1451 What would you like to use it for?…
1y ago·view thread
comment
I know it’s hard.
1y ago·view thread
comment
You could do faultdef FOO, // comment BAR, // comment QUX; // comment There are third party tools to generate docs. You can also get some…
1y ago·view thread
comment
Odin isn’t as well known as Zig, true. But what you seemed to argue was that this was a deliberate choice by the Odin community: to look for hype on Hacker News rather than doing the leg work of getti…
1y ago·view thread
comment
What works for Rust works for Rust. My intent is to make code feel similar to C namespacing. What works and what doesn’t is fairly contextual, depending other language semantics as well.
1y ago·view thread
comment
Destructors and Ownership implies RAII and all the design and architecture that are assumed with such things. This is far from C semantics, and so out of scope for C3. Any RAII language will be consid…
1y ago·view thread
comment
I asked and got Bas's[1] permission to use C3 as a name when I first started out. [1] Bas van den Berg, the author of C2.
1y ago·view thread
comment
It is possible to use a single-header library as part of C3 libraries or your project. However, it must be noted that this will inhibit the ability to cross compile, as the compilation of the header i…
1y ago·view thread
comment
C3 allows arbitrary extensions of any types, so things like `vec1.dot(vec2)` is actually implemented as a generic method macro over all vector types added by the math module. Given Zig's preferen…
1y ago·view thread
comment
Back in the day when C's closest competitor was Pascal, C wasn't particularly hard to use. Pascal was easier for manipulating strings and C better at doing low level data manipulation. But a…
1y ago·view thread
comment
No, they are the same.
1y ago·view thread
comment
Ah, that is indeed true. However, the plan is to have the language fixed at 1.0, only updating stdlib and tooling after that.
1y ago·view thread
comment
If you want to have your own Base32 where giving a padding = 0xFF instead returns an error, it's commonplace to have a wrapper that will explicitly do the check and return an error if it fails, a…
1y ago·view thread
comment
For grabbing the CPU features, there is some rudimentary implementation for x86 here: https://github.com/c3lang/c3c/blob/master/lib/std/core/priva...…
1y ago·view thread
comment
Yes: https://c3.handmade.network/blog/p/8486-the_case_against_a_c... …
1y ago·view thread
comment
The hard thing is staying with the project. Lots of interesting C-like projects have died over time, such as https://www.kitlang.org …
1y ago·view thread
comment
I tried Zig in 2017-2018 span (and as part of research I've read quite a bit of Zig over the years). To me the language had some details not previously tried out: special operators for wrapping o…
1y ago·view thread
comment
There is an overlap between module and class namespacing through static members and functions. Zig sees this and says "let's only have the latter" (on structs), which means among other …
1y ago·view thread
comment
I don't like to say "never", because other things make change that invalidates previous conclusions. For example, let's say that for some reason macros were removed (this is very …
1y ago·view thread
comment
Now I'm confused, what do you mean? What grammar changes?
1y ago·view thread
comment
It's a good language, you should try it out as well.
1y ago·view thread
comment
(Funny story, I seem to have a bout of visual migraine at the moment and misread your comment until just now and had to remove what I wrote). I didn't mean to give the impression that I'm pu…
1y ago·view thread
comment
If I would have liked, I could have done something like `import std::io::file as file;` but I noticed that we keep getting this issue that we’re renaming things all of the time, and usually in the sam…
1y ago·view thread
comment
Did you know that Wikipedia editors will aggressively remove Wiki entries about less known languages. There are already several wiki articles on Odin by various authors that have been removed over the…
1y ago·view thread
comment
Blake2 and other hashes are most welcome. As for HashMap you are completely correct: there are many different types of maps that are needed. Concurrent maps, insertion ordered maps etc. And even varia…
1y ago·view thread
comment
This is not that novel. It is inspired by the similar feature in the Odin language.
1y ago·view thread
comment
Also, `fn` is used to make type inference for lambdas syntactically simple. But I would lie if I said I haven’t been considering removing `fn` many times. But there are good reasons for keeping it, de…
1y ago·view thread
comment
Isn’t it a somewhat unfair characterization that ”C3 promotes itself more” and ”is pushed on HN and other social media” and that because of this C2 for some reason experiences harm? C2 is over 11 year…
1y ago·view thread
comment
The difference here is that a preprocessor runs before parsing and semantic analysis. In C3 compile time if runs in the analysis step, so after parsing. So the macros and compile time execution occurs…
1y ago·view thread
comment
Yes, this is a very real problem that I've also written about: https://c3.handmade.network/blog/p/8486-the_case_against_a_c... …
1y ago·view thread