Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cihangir
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
cihangir
2y ago
Years ago, I attempted to build a user-space network stack in C [0] that processes raw packets through the TUN interface and got it working to a certain point. It currently includes a simple shell that allows configuring IP addresses, route
2.
▲
by
cihangir
2y ago
Plan 9’s ARG(2) [0] macros are worth a look too. No dependencies at all, just plain macros, super lightweight and easy to use. [0] https://9fans.github.io/plan9port/man/man3/arg.html
3.
▲
by
cihangir
4y ago
Last time I checked, C++ used function pointers behind the scenes to achieve virtual method dispatch.
4.
▲
by
cihangir
4y ago
Linux kernel code makes heavy use of object-oriented design patterns [0]. It's not the best of its kind, but still provides a reasonable example of how OOP can be achieved in C: https://gist.github.com/cakturk/cd75
5.
▲
by
cihangir
4y ago
> That is a special page of memory that is mapped read-only into user mode from kernel mode, and it contains things like the current time, so that applications can get this information quickly without having to take a kernel transition.