Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lerno
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
211.
▲
by
lerno
2y ago
C3 has "path shortening", so for example given `open(...)` in std::io::file is usually used as `file::open(...)`. If we would to write this as `file.open(...)`. Consider now the case of mistyping `open`: `file.openn(...)`. Is this
212.
▲
by
lerno
2y ago
C3 follows the C ABI, so no it doesn't do it and it's not planned.
213.
▲
by
lerno
2y ago
What kind of conditional compilation are you missing?
214.
▲
by
lerno
2y ago
Other than C3, there is Jai, Odin, Zig and Hare which are the ones that have any traction right now that I know of. Many interesting projects have been started but ultimately later abandoned. Going to C++ competitors there is obviously Rust
215.
▲
by
lerno
2y ago
Just to be clear, I don't mean the description of Zig to put down the language or the community. It's the best I can do to describe the difference between Zig on one hand and Odin/C3 on the other. A more concrete example that
216.
▲
by
lerno
2y ago
If you pass them as parameters, then there are in/out/inout annotations to limit usage. But other than that, there isn't anything.
217.
▲
by
lerno
2y ago
For what it's worth, I found the Zig community on the biggest Zig discord very nice and welcoming. But that said , there is a lot of "you have to understand Zig" sentiment. Also, there is a lot of "I discovered Zig an
218.
▲
by
lerno
2y ago
Did you see this? https://c3-lang.org/language-common/cinterop/
219.
▲
by
lerno
2y ago
I wrote a short blogpost about this before, trying to answer the question: https://c3.handmade.network/blog/p/8886-why_does_c3_use_%252...
220.
▲
by
lerno
2y ago
As the author, let me add something beyond the comparison. Zig and Odin are very different languages, Odin is – as its slogan goes - "for the Joy of Programming". Zig on the other hand doesn't feel that this is a goal. From w
221.
▲
by
lerno
2y ago
`::` simplifies the module vs identifier resolution. In C3 there is something called "path shortening", allowing you to use `foo::bar()` in place of something like `std::baz::foo::bar()`. To do something similar with `.` is proble
222.
▲
Show HN: The C3 programming language (C alternative language)
(github.com)
175 points
by
lerno
2y ago
|
185 comments
223.
▲
by
lerno
2y ago
The other articles on C3 can found here: https://ebn.codeberg.page/programming/c3/
224.
▲
Evolving C: Interview with C Lernö, the author of C3
(youtube.com)
7 points
by
lerno
2y ago
|
2 comments
225.
▲
Interview with the author of the C3 programming language
(youtube.com)
1 points
by
lerno
2y ago
|
0 comments
226.
▲
by
lerno
2y ago
1. C is universal, any other language is a dependency. 2. If you're using something like C# or Kotlin or whatever, then you're not serious about compilation speed. 3. You will need to provide a C API anyway.
227.
▲
by
lerno
2y ago
No, just no
228.
▲
by
lerno
2y ago
The QBE author has said that good compilation speed was not a design goal. It also outputs asm which then has to be run through GCC or Clang, which nullifies any benefit of being a standalone backend.
229.
▲
by
lerno
2y ago
There isn't anything official. Tonis maintains an "Awesome C3" repo on GitHub: https://github.com/tonis2/Awesome.c3 (curation is all done by Tonis, I don't have any say what goes into it). Share it
230.
▲
by
lerno
2y ago
Feel free to post any questions about C3 and compiler dev in the comments.
231.
▲
C3 (a C-like programming language) hits 0.6.6
8 points
by
lerno
2y ago
|
6 comments
232.
▲
by
lerno
2y ago
I find that the hard part with designing macros and other metaprogramming constructs that run at compile time is not adding POWER - that part is easy, but to make it readable and easy to understand. If a reader of the code needs to stop to
233.
▲
by
lerno
2y ago
Some people love this, some think it’s a necessary sacrifice - a rite of passage to endure in order to produce ”optimal” software. Others try Odin or C3 instead.
234.
▲
RISC-V Bare Metal Hello World in C3 [video]
(youtube.com)
3 points
by
lerno
2y ago
|
0 comments
235.
▲
by
lerno
2y ago
`goto` is trivial to implement. `goto` doing the right thing jumping over `defer` and implicitly unwrapping optionals (flow-typing) is less nice as you suddenly need to track much more things in the front end. And you might say "so wha
236.
▲
Tsoding livestreams trying out C3 (programming language) [video]
(youtube.com)
48 points
by
lerno
2y ago
|
20 comments
237.
▲
by
lerno
3y ago
Then again, out of the C alternative languages Zig, Odin and C3 - Zig’s always been the one with the most open bugs despite (or due to?) having by far the most amount of people working on it. Ironic now when the compiler is written in Zig c
238.
▲
A Gameboy Emulator Written in C3
(github.com)
1 points
by
lerno
3y ago
|
0 comments
239.
▲
by
lerno
3y ago
The `any*` fat pointer in C3 is a version of this: https://c3-lang.org/anyinterfaces/ Once this is available the step to embedding some runtime type information isn't far.
240.
▲
Syntax: When in doubt, do not innovate
(c3.handmade.network)
2 points
by
lerno
3y ago
|
0 comments
More ›