Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
graphitemaster
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
1.
▲
by
graphitemaster
9mo ago
To add, Go has nil pointers which lead to panics when de-referenced. No one would call Go memory unsafe for this behavior likely because it's a "panic". The thing is, the 0 address is a guaranteed panic too. It's just th
2.
▲
by
graphitemaster
9mo ago
I mostly agree. Null pointer de-references aren't a dominant or hard-to-detect failure mode for my code either. Removing them does meaningfully complicate language design and ergonomics too. It's reasonable to call them a "pr
3.
▲
The atrocious state of binary compatability on Linux
(jangafx.com)
19 points
by
graphitemaster
2y ago
|
1 comments
4.
▲
by
graphitemaster
5y ago
In this case the problem is more specifically the use of uint32_t. I never quite mentioned in the article that if you're going to use unsigned integers for this sort of thing to always use the native-word-size unsigned type, e.g size_t
5.
▲
by
graphitemaster
5y ago
Author here. I believe many of the complaints here are concerned about what is more common rather than what is universally better over all possible inputs which is actually the point of view this article is written from. The issue with the
6.
▲
Breaking the physical limits of fonts
(github.com)
112 points
by
graphitemaster
7y ago
|
23 comments
7.
▲
Use your printer as a display
(github.com)
3 points
by
graphitemaster
9y ago
|
0 comments
8.
▲
by
graphitemaster
10y ago
~2 years ago I golfed a 15 line hash table for fun and it got some traction here; I figured maybe this would also get some traction too ;)
9.
▲
15 LoC binary tree in C
(pastebin.com)
3 points
by
graphitemaster
10y ago
|
1 comments
10.
▲
by
graphitemaster
10y ago
On desktop NV and desktop AMD I've observed (at least on Linux) via /proc/self/maps, that the pointer returned by glMapBuffer is a shared memory mapping owned by libGL. Further inspection shows coalesced reads and writes
11.
▲
50-lines AVL binary search tree in C
(pastes.archbsd.net)
4 points
by
graphitemaster
12y ago
|
1 comments
12.
▲
by
graphitemaster
12y ago
With things like PaX the trampoline method won't work, gcc now creates thunks, which are essentially heap allocated thunks of memory (hence the name) with PROT_EXEC.
13.
▲
by
graphitemaster
12y ago
Correct, the problem is to call the function you cannot treat it as a standard function since it's pointing to a struct, the struct does contain the actual function pointer but there is an implicit `this' first argument to that fu
14.
▲
by
graphitemaster
12y ago
Lambdapp inserts #line directives into the source code, compilers are required to respect those directives and utilize them when producing debug sections in the binary. For instance in the case of gcc/clang on *nix the compiler will pr
15.
▲
by
graphitemaster
12y ago
Nope, they're an ObjectiveC object with some specialties at the compiler level. Google how they're implemented.
16.
▲
by
graphitemaster
12y ago
The problem with clang blocks is they're represented as a Objective-C object, this makes them unusable in APIs that expect a function pointer, the only way you can cast them to a function pointer is to define the structure which repres
17.
▲
by
graphitemaster
12y ago
If you look at Redroid (a project which makes extensive use of lambdapp) you'll see how map/list/etc can take advantage of this https://github.com/graphitemaster/redroid hashtable.c and list.c look for [
18.
▲
Boolean in C/C++ done wrong.
(graphitemaster.github.io)
1 points
by
graphitemaster
13y ago
|
0 comments