Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lochsh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
lochsh
7y ago
I haven't been able to find anything in the C11 standard about the initialisation of bar being a constraint violation. In 6.7.3, the only constraints for type qualifiers listed are for _Atomic and restrict. Could you let me know where
32.
▲
by
lochsh
7y ago
It would only be a VLA if defined in a block, I intended the code snippet to be at file-scope, giving the buffer size and array static storage duration. But it does indeed compile in Clang, and I'm looking into why. I think this line i
33.
▲
by
lochsh
7y ago
This is what I was going for in the blog post, but I got confused after seeing these comments as Clang _does_ compile this when the buffer is of static storage class. Which I don't think is standard -- but it's not using VLAs. I w
34.
▲
by
lochsh
7y ago
Being told my web design is kinda cyberpunk is a great compliment, thank you ^_^ I like the banner image on yours.
35.
▲
by
lochsh
7y ago
I've converted it to jpg and it's now 448K :)
36.
▲
by
lochsh
7y ago
Thank you! ^_^
37.
▲
by
lochsh
7y ago
Thank you so much! This is lovely to hear. ^_^ I like it too.
38.
▲
by
lochsh
7y ago
Yes, I think I made an embarrassing mess up here by using a compiler that doesn't support VLAs, and not fully understanding VLAs. Thanks for pointing it out.
39.
▲
by
lochsh
7y ago
I should probably make it smaller! 6MB is pretty indulgent. But I do like how it looks and this is mostly just a fun blog for myself :)
40.
▲
by
lochsh
7y ago
Ah yes, what I meant was that more optimisations can be made on memmove if we restrict src and dst, as the overlap case no longer needs to be considered. I've never used restrict, so I could be missing something, but this is what I mea
41.
▲
by
lochsh
7y ago
This is all totally fair -- I've never used restrict, so it's hard for me to have a useful opinion on it. I think it's easy to dismiss things that can help optimisation when you've never seen their effect first-hand. I i
42.
▲
by
lochsh
7y ago
I think it's quite a common thing for people to say if they're not actually experienced in writing the languages. I've heard it from multiple people. As I say in the blog post, it's common knowledge for people who are ex
43.
▲
by
lochsh
7y ago
Thanks, this is useful! I'll have to look at the standards again and be more precise in my language.
44.
▲
C++ is not a superset of C
(mcla.ug)
107 points
by
lochsh
7y ago
|
107 comments
45.
▲
What actually is object oriented programming? Where does Rust fit in?
(mcla.ug)
4 points
by
lochsh
10y ago
|
0 comments
46.
▲
Let's get rusty: Fast and safe systems programming with Rust
(mcla.ug)
2 points
by
lochsh
10y ago
|
0 comments