Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
atiedebee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
91.
▲
by
atiedebee
2y ago
By text formatting, do you mean printf and the like? It is pretty powerful in my experience. Also, DNS resolution isn't part of the C standard, it's a POSIX interface I think.
92.
▲
by
atiedebee
2y ago
> The bad news is that it stores that decompressed data in your RAM, increasing the memory used by the game. Without UPX, my game uses ~53MB of RAM. With UPX, it's up to ~74MB. The decompressed data will be in RAM either way. I assu
93.
▲
by
atiedebee
2y ago
This is great. A very understandable explanation, thanks for sharing!
94.
▲
by
atiedebee
2y ago
Ah I see, I got confused because they mentioned not holding a CS-degree.
95.
▲
by
atiedebee
2y ago
I disagree that front end web development should be taught in a computer science curriculum. It seems like it's more of a designer job rather than science/engineering. I am currently in university, and machine learning is a mandat
96.
▲
by
atiedebee
2y ago
I recently dabbled in "hare" which was quite a nice experienced. I liked how the language stayed pretty simple compared to other C-replacements. The standard library is also pretty nice. It is however an extremely niche language,
97.
▲
by
atiedebee
2y ago
That doesn't really matter for sum types as used in this blog, does it? As long as you're not serialising the struct or accessing it through pointers of different types it ought to work anywhere.
98.
▲
by
atiedebee
2y ago
So you can manage your dotfile manager with a dotfile manager! Nothing against the project, this part just seems pretty amusing
99.
▲
by
atiedebee
2y ago
Why are unions within structs not portable?
100.
▲
by
atiedebee
2y ago
I did not know that it had that feature, and having just tried it out it does work really well. Its output kind of reminds me of the gemini protocol and its markup format[0], [0]: https://geminiprotocol.net/
101.
▲
by
atiedebee
2y ago
I don't think having strftime return a malloc'd pointer is a good idea. The string won't be large at all and can easily fit onto the stack (just like it was done in the example code). If I want to use a custom allocator to st
102.
▲
by
atiedebee
2y ago
Looking at the paper linked on the wikipedia page for Huffman Coding, David Huffman referred to Huffman Coding as just "optimum coding" [0] [0] http://compression.ru/download/articles/huff/huffman_19
103.
▲
by
atiedebee
2y ago
Perhaps I misread it then. I think that if you're at the point of using formal verification you're likely to be very meticulous in whatever you're writing, so an AI would be used quite carefully
104.
▲
by
atiedebee
2y ago
I tested o3-mini yesterday, having it verify a bit-hack for "vectorizing" 8x8bit integer addition using a single 64 bit int value[0]. Suffice to say, I am not impressed. I asked it to give me a counter example that would make the
105.
▲
by
atiedebee
2y ago
They are still general very easy to install. Also, C programmers don't seem to use any package managers other than the default system package manager and maybe git sub-modules (at least, not that I know of).
106.
▲
by
atiedebee
2y ago
In that case, I don't understand why you would bundle the package every time you run tests. What does that do?
107.
▲
by
atiedebee
2y ago
I think "massive" is overstating it. I don't think deploying a new version of a package is something that happens many times a day, so it wouldn't be a constant pain point. Also, since this is a case of having something
108.
▲
by
atiedebee
2y ago
> I believe the test if(!num_lines) is unnecessary, because reallocating a NULL pointer is equivalent to malloc(). I thought that this behaviour was deprecated in C23, but according to cop reference it is still there[0]. An I thinking of
109.
▲
by
atiedebee
2y ago
Interesting read. I run OpenSUSE Leap so I get yast for managing packages graphically, and often times I see separate packages for bash/zsh/fish completion. I'm guessing there is some slight differences between these. It coul
110.
▲
by
atiedebee
2y ago
Oh that's interesting. I guess I should actually look at the standard instead of taking cppreference's word for it next time
111.
▲
by
atiedebee
2y ago
To be more precise, it is defined since c99[0]. In c89 it was undefined, but type punning is the most used/sensible behaviour, so they changed it in c99. [0]: https://en.cppreference.com/w/c/language/unio
112.
▲
by
atiedebee
2y ago
I like the way Dlang does it. It keeps the types on the left like C, but are actually readable.
113.
▲
by
atiedebee
2y ago
There's a reason compression benchmarks often times include the size of the executable when benchmarking compression ratios. Although Matt Mahoney's large text compression benchmark[0] does currently have a transformer model at nu
114.
▲
by
atiedebee
2y ago
Nowhere does that post or the image argue that people should prefer one over the other. Wearing warmer clothes instead of turning up the heater isn't a bad thing either, so I don't understand your hostility towards the idea?
115.
▲
by
atiedebee
2y ago
In my experience, the standard library is inconsistent with its 0 terminator handling. fgets will treat the length passed as the capacity of the buffer, and terminate the last byte with a 0. scanf however treats the length as the number of
116.
▲
by
atiedebee
2y ago
I think those bindings are fine, what is more problematic to me is the inconsistencies or straight up arbitrary mappings (gg and G come to mind). I feel like kakoune did a great job at improving vims bindings to make more sense.
117.
▲
by
atiedebee
2y ago
I dont see how C macros are anything like regex. They match words and replace them with different text. Regex is about matching text with relatively complex patterns, and by itself doesn't do any text replacement.
118.
▲
by
atiedebee
2y ago
But 100s of thousands of lines per minute on 1990s hardware is orders of magnitude faster than 32k lines per second 30 years later.
119.
▲
by
atiedebee
2y ago
cproc from the top of my head uses QBE as the backend
120.
▲
by
atiedebee
2y ago
I wonder why TCC was chosen? As far as I am aware, the code it produces contains hardly any optimisations. It's not like simple, optimizing C compilers don't exist
More ›