Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
brightprogramer
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Show HN: Sum Type and Type Matching in C
(github.com)
2 points
by
brightprogramer
4mo ago
|
0 comments
2.
▲
by
brightprogramer
1y ago
I just tested this, and it works flawlessly! This is amazing! Thanks for the suggestion.
3.
▲
by
brightprogramer
1y ago
It is a bit crazy but forcing this kinda makes a habit. That way, a habitual user will tend to initialize other variable types as well. That's why I call it a standard, because the library has its own coding style. Take the ownership s
4.
▲
by
brightprogramer
1y ago
That sounds like a better idea. I'll test it. Debugging with my existing macros is a PITA, but if your suggestion works then it'll work well with debuggers as well! Thanks :)
5.
▲
by
brightprogramer
1y ago
Ok I'm saying this for the last time so I'll over-explain so everyone can follow the idea properly. Not all people can pronounce names correctly. In a language some names are easier to pronounce if you take away a few letters. Som
6.
▲
by
brightprogramer
1y ago
It also compilers way faster than C++ code if that interests you :-)
7.
▲
by
brightprogramer
1y ago
I especially am in love with how my formatted printer works. It's not a completely new solution and I think people have already done that. I'll also say that it's not very mature but it makes life a lot easier in some cases.
8.
▲
by
brightprogramer
1y ago
Yea the FMT trick uses VA_OPT. I consider myself a noob with C official specification, so you're probably right about that. I do kinda like how foreach is implemented right now. This allows me to perform some strict checking for easy l
9.
▲
by
brightprogramer
1y ago
Because I just don't like it as much and I wanted to see how much farther can we go by just using macro tricks.
10.
▲
by
brightprogramer
1y ago
It's an honor to have you comment here .
11.
▲
by
brightprogramer
1y ago
Std is short for standard :-) It's pretty std.
12.
▲
by
brightprogramer
1y ago
yep, glad you pointed that out. To explain a bit more : MisraStdC is 3 parts : Misra + Std + C - Misra is derived from my name. That's why I needed to specify that the repo is not related to the MISRA standard.
13.
▲
by
brightprogramer
1y ago
because it's my personal standard. I use it more than I use standard C utils.
14.
▲
Yet Another TypeSafe and Generic Programming Candidate for C
(github.com)
72 points
by
brightprogramer
1y ago
|
34 comments
15.
▲
by
brightprogramer
1y ago
been working on this for some time. has some usable features. i keep adding as i feel the need. try to well document everything and maintain it.
16.
▲
Removing Ambiguity from Grammars
(blog.anvielabs.com)
1 points
by
brightprogramer
2y ago
|
0 comments
17.
▲
by
brightprogramer
2y ago
I see, I'd like to give it a try then. I'll try adding some precedence here. I don't know how, though. This calls for some reading...
18.
▲
by
brightprogramer
2y ago
Use mermaid js : https://mermaid.js.org/syntax/stateDiagram.html
19.
▲
by
brightprogramer
2y ago
Precedence is more of a way to remove ambiguity from grammar. Grammars are just hard to figure out in one go.
20.
▲
Fixing left and mutual recursions in grammars
(brightprogrammer.in)
110 points
by
brightprogramer
2y ago
|
29 comments