Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Snaipe
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
Snaipe
12y ago
I've read with great interest the source of libCello when I first saw it a few days ago on reddit, it seems like a fun experiment. Good luck with your project ! :)
32.
▲
by
Snaipe
12y ago
Yep, but if I just let the system get all the memory back, valgrind would have yelled at us for leaking memory, and it would have been detected by the testing system, slapping us in the face with a malus on our final grade.
33.
▲
by
Snaipe
12y ago
I have to polish a bit my python test suite, but it's coming ;)
34.
▲
by
Snaipe
12y ago
Release tarballs can be uploaded on a third party, I usually don't like to commit binary blobs, especially releases, since you could just clone the release tag and run make distcheck. I'll commit a m4/.keep.
35.
▲
by
Snaipe
12y ago
I guess you're right. This was mostly an exercise on the attributes provided by gcc and clang/llvm, since I haven't seen anything really using RAII.
36.
▲
by
Snaipe
12y ago
I've only been actively programming in C for the past three years, so I'm not that much informed either, but from my researches on the subject, I haven't seen any. The probable reason behind this is that most people programmi
37.
▲
by
Snaipe
12y ago
Haha, I guess, but I think it's not about using them all over your code base -- there are always pros and cons in using RAII, smart pointers, GCs, and manual memory management, it's the programmer's job to balance it correctl
38.
▲
by
Snaipe
12y ago
Ah, yes, good point. Great care should be taken for these cases to not happen.
39.
▲
by
Snaipe
12y ago
Not really, otherwise even the standard library would not exist, and we would manually ask pages to the kernel every time we want memory. C, as a language, is indeed low level, but that does not mean that programs and libraries shouldn'
40.
▲
by
Snaipe
12y ago
I guess it's more about writing less & better than using known functions -- in the same reasoning, I /could/ use new/delete in C++, but I always end up using unique_ptr<T>(...) because it's just better, an
41.
▲
by
Snaipe
12y ago
Yup, these are just pointers, usage is still the same, and no cast/special functions are needed to manipulate them.
42.
▲
by
Snaipe
12y ago
GCC and Clang specific, as said in the readme page. I know, apply.h is ugly, but I did not want to lose too much time on that (and it was easy to dump these lines from a shell command), as it is only used for an optional macro. When the rec
43.
▲
by
Snaipe
12y ago
Article: http://snaipe.me/c/c-smart-pointers/ Feedback appreciated, be it on the article, project or website ! Be wary that english is not my mother tongue, so there might be some grammatical weirdities and such.
44.
▲
Show HN: Smart pointers for the C programming language
(github.com)
126 points
by
Snaipe
12y ago
|
58 comments