Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gosu
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
gosu
10y ago
How useful is a lock-free (not wait-free) approach in a real-time context? The point is that any thread contending on lock-free data is liable to starve, so the worst-case behavior is still quite bad, no? The only benefit I see is freedom f
2.
▲
by
gosu
12y ago
Probably the fact that it eagerly coalesces newly freed blocks where high performance allocators like tcmalloc and jemalloc use slabs of fixed-sized blocks which are never coalesced. Coalescing will load adjacent blocks into cache, and it p
3.
▲
by
gosu
12y ago
You don't need to have a single frontier, and IIRC no one does these days. A stack of slabs per "arena" suffices, and the extra cost is only a read from a cacheline you'll soon need anyway. It looks like jemalloc uses a
4.
▲
by
gosu
12y ago
I'm a very happy user. It's pretty well designed, and extensible in javascript. It's nice having EVERYTHING about the browser at your fingertips in fully customizable way, not just the the link-following mechanism. I use lots
5.
▲
by
gosu
12y ago
I suppose it was bound to happen.
6.
▲
by
gosu
12y ago
By storing the struct in union with an integral type - or, if you need a value but not an address, casting to such a union. You might also think to just abuse pointer casting, but IIRC that breaks C strict aliasing assumptions and causes GC
7.
▲
by
gosu
12y ago
But, like you said, you still need protection of kernel data, which means that you need to execute kernel code on a stack not writeable by the user, at a greater permission level that allows ONLY the kernel code to modify kernel pages. Sing
8.
▲
Generic pretty printing and tracing in C11
(github.com)
2 points
by
gosu
12y ago
|
0 comments
9.
▲
by
gosu
13y ago
Well, I'd done a small kernel for a class. Later, I wrote a lockfree malloc and realized that large lockfree programs are actually pretty managable, and that was the start. It's generally just a matter of designing around simple d
10.
▲
by
gosu
13y ago
Lockfree OS kernel. Give it a couple weeks.
11.
▲
by
gosu
13y ago
For that price, I can buy 10 pairs of jeans on ebay, in a style that I like. Or I can go to the thrift store and get 50. I'll have wet ankles when I bike in the rain in a poncho, but whatever.
12.
▲
by
gosu
13y ago
CMU's got a fairly nice one. It guides students as they build a series of compilers for increasingly large subsets of C, effectively from scratch. Course materials are public, I believe. http://www.cs.cmu.edu/afs/c
13.
▲
by
gosu
13y ago
1) Math is way more than calculus. Writing proofs is the best way to train the general skills that will get you recognized as smart. 2) Stop being a coward. Always push yourself to do embarrassing, uncomfortable, or hard things, or you'
14.
▲
by
gosu
13y ago
It's true that, if you learn to enjoy CS-related work, it's thrilling and rewarding. You'll find dazzling solutions to interesting problems, and have a blast doing it. But as respectable a craft as CS work is, does your outpu
15.
▲
by
gosu
13y ago
That's a really good (and horrific) image. Thanks.
16.
▲
by
gosu
13y ago
facepalm What was happening is that I was trying to keep the mouse in the control strip, and it would go off the right side of the image. Thanks a lot, Josh. Edit: By the way, the fullscreen functionality isn't launching. But I do ha
17.
▲
by
gosu
13y ago
This looks fantastic. Watching people's reactions in that example image was really interesting, and it occupied me for a good few minutes. "Why can't you do the same thing with video?" Because rewinding video is really p
18.
▲
by
gosu
13y ago
> Why not? Obvious ethical considerations. I'm sick of living on the death star. It doesn't seem possible to me that any non-transparent organization with such capabilities will ever live up to some promise to "just spy on
19.
▲
by
gosu
13y ago
Snowden is a story too. As someone who considers him a hero, and one of the rare few who I can relate to, I'd like to know more about him views so that I can learn from him. That's not irrational, unless you think biographies are
20.
▲
by
gosu
13y ago
Not if you compile via LLVM/clang.
21.
▲
by
gosu
13y ago
The same party is already in control of the world's PCs and laptops - things everyone with an XBone will already use for many of their favorite illegal activities. What new danger does this introduce? I also expect that if video/a
22.
▲
by
gosu
13y ago
Surely you must mean C**, which is the type of a thing which you can dereference twice to get C. Otherwise, you're dereferencing C twice, which gets you machine instructions, I guess.
23.
▲
by
gosu
13y ago
What if, like the second best selling book ever, it takes almost a decade for the book to begin selling well? If books can cease to produce money just as their popularity begins to crest, then I imagine publishers will be less eager to publ
24.
▲
by
gosu
13y ago
It's true that some governments have killed their own citizens unjustly and en masse. I don't think that my own government poses such a threat to me. If you're a US citizen who feels like their government was designed to efficiently kill it
25.
▲
by
gosu
13y ago
None of those were designed to efficiently kill people like me. The OP's point is that I should be worrying more about handguns, and he's right - but that doesn't mean I can't worry about other things designed to pose a threat to my person
26.
▲
by
gosu
13y ago
AK-47s scare me about as much as any other gun. It's "good" that rifles are used to kill fewer people than other weapons, and we should choose our battles accordingly. That doesn't change the fact that I want to make it as hard as possible
27.
▲
by
gosu
13y ago
I wouldn't call that canonical. You can take a further step, as in the Linux version that someone posted below: http://kernelnewbies.org/FAQ/LinkedLists
28.
▲
by
gosu
13y ago
Very cool. What kind of lockfree linked lists? Did you work from one of the papers on the subject? (Searching "rust lockfree" reveals a feature request for a lockfree malloc. I happen to have one of those, but the reality is that synchroniz
29.
▲
by
gosu
13y ago
The correct way to do linked lists is to store the list traversal fields next to the data. In C, this would mean storing next/prev pointers inside of the structs which will be placed on lists. In light of this, the things in the OP are ofte
30.
▲
by
gosu
13y ago
I think that such a developer would be equally as likely to forget to free() memory or overflow a buffer. I assume that the reasoning is that people who don't know C well enough or are too forgetful shouldn't be working on the Plan9 codebas
More ›