Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yoklov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
67 ms
·
601.
▲
by
yoklov
12y ago
There's a pretty big difference in that the web has far more features. Unless, you intend for C++'s replacement to have even more features than C++, which hardly seems even possible.
602.
▲
by
yoklov
12y ago
Err, header-only libraries exist mostly because templates require them, not because people don't like linking (well, there's some of that too, but it's the minority).
603.
▲
by
yoklov
12y ago
Most people who write C professionally have no trouble doing this, but memory leaks still occur. It's easy to miscommunicate what part of the code manages what memory if you're working in a group, not to mention just normal human
604.
▲
by
yoklov
12y ago
As someone who has written C professionally in the past, I agree. IMO this is fairly ugly C. Definitely can't see why someone would consider it to be beautiful. That said, there are some neat things I've seen in the ruby C code in
605.
▲
by
yoklov
12y ago
You'd want to kill yourself pretty quickly. JSON is great as an interchange format, but there are many reasons editing it by hand is painful, lack of comments and lack of newlines in strings not being the least of them.
606.
▲
by
yoklov
12y ago
Are you sure? You're not allowed to invalidate iterators or pointers to elements in a deque, so it shouldn't be reallocating memory (aside from its underlying map of nodes, which will need to grow very rarely). Libstdc++ describes
607.
▲
by
yoklov
12y ago
Not really. Only if a hash table lookup is the first part of every iteration of the for loop. It does allow some recursive algorithms to reduce their algorithmic complexity significantly, however.
608.
▲
by
yoklov
12y ago
You actually fell asleep, but didn't enter a deep enough sleep for you to actually notice it. You can't tell if you're in NREM1 sleep.
609.
▲
by
yoklov
12y ago
Signed wrapping behavior is well-defined in the machine language for every architecture that ever existed (or at least, that I've ever heard of). If the assembly code depends on the wrapping behavior and you translated that to C, yo
610.
▲
by
yoklov
12y ago
Nope. You're describing implementation-defined behavior. The compiler is free to assume undefined behavior never happens, and optimize it away if it does. This can be a big problem, whether or not you are trying to write portable cod
611.
▲
by
yoklov
12y ago
Interesting. To be honest, I'm somewhat surprised a mechanical translation of assembly to C didn't result in a lot of hard to track down bugs, considering how much of what's well-defined in assembly being undefined behavior i
612.
▲
by
yoklov
12y ago
I don't think anyone saw the open source version coming. Development had totally halted for several years before that happened.
613.
▲
by
yoklov
12y ago
Not really. Most do escape analysis/SROA. Allocation sinking is much more general. It works even if the allocation escapes (the allocation is sunk to the point where it escapes). Additionally, all allocations can be sunk, not just stuf
614.
▲
by
yoklov
12y ago
Not sure if it's related, but LuaJIT can remove allocations all-together in a lot of cases. This[0] talks about how it works some. [0]: http://wiki.luajit.org/Allocation-Sinking-Optimization
615.
▲
by
yoklov
12y ago
The author open sourced his last game, Liberal Crime Squad, and its... The work of a madman. IIRC it was one ~40kloc C++ file full of globals and switch statements 6+ levels deep. I'm sure someone's cleaned it up some now, but it
616.
▲
by
yoklov
12y ago
It's called _Generic (which should be easier to Google), but the fact that you have to modify the macro wherever you want to use it with a new type severely limits its usefulness.
617.
▲
by
yoklov
12y ago
This is exactly what people should use WebGL for. Software skinning sucks, esp. if you can avoid it (e.g. with a vertex shader). (That said, there are plenty of other areas for using SIMD in JS)
618.
▲
by
yoklov
12y ago
JavaScript isn't that bad. It certainly has it's faults but there are much worse languages that could have become ubiquitous than JavaScript. Honestly, I find web programming to be generally terrible. JavaScript is actually one
619.
▲
by
yoklov
12y ago
Rust doesn't require all communication to be done by message passing. One of the big reasons it's effective in Servo is that it can prove that multiple threads working on a shared, mutable data structure are operating in a safe ma
620.
▲
by
yoklov
12y ago
You don't always get to use a modern, popular STL. Sometimes you need to use the hardware vendor's crappy, unoptimized STL (because they assume you won't use it). This is part of the reason the STL is unpopular in game develo
621.
▲
by
yoklov
12y ago
He means that the performance intensive portion of Objective C programs (the tight loops, aka the 10% of the code that your code spends 90% of its time in, or whatever) are written in the subset of Objective C closer to C. E.g. they avoid
622.
▲
by
yoklov
12y ago
Any renderer which isn't CPU (read: driver) bound doesn't take performance seriously or hasn't been optimized yet. (Not that that refutes what you're saying, I'm just saying that most serious engines are in the same
623.
▲
by
yoklov
12y ago
I think NVidia might be betting on OpenGL prevailing through this mess. Not a bad bet, if you ask me...
624.
▲
by
yoklov
12y ago
Nothing unique to rust. The biggest thing I see is that it's an imperative language with functional-style ADT's, tuples, sum types, etc. It also looks fairly similar syntactically (all those let's). Not sure if there are othe
625.
▲
by
yoklov
12y ago
They're actually pretty different. LightTable is a much less conventional text editor than Atom.
626.
▲
by
yoklov
12y ago
The reason for this is that graphics cards have evolved to be enormously complex. Every (well, hopefully) graphics engineer knows how the data goes over the wire into the graphics card, and understands the stages of the graphics pipeline (o
627.
▲
by
yoklov
12y ago
Among other things, yes, the GPU is a computer that supports more parallelism than the CPU. But not in the way you want. There are a few issues. One is that the GPU does much more than map/scatter/gather (reduce is hard in paralle
628.
▲
by
yoklov
12y ago
OpenGL ES isn't really a departure from OpenGL, and most of the problems with OpenGL (all the ones mentioned here, I believe) apply to OpenGL ES. OpenGL ES isn't trying to be a clean break. It's just a stripped down version o
629.
▲
by
yoklov
12y ago
This is the list I typically see given to newbies (on freenode ##OpenGL, and /r/opengl) wanting to learn modern OpenGL. 1. Arcsynthesis's gltut ( http://www.arcsynthesis.org/gltut/ ) is good and reasonably
630.
▲
by
yoklov
12y ago
Where I work (game company with about 20 people) we solve this by versioning unimported assets separately (in svn, because that's what we used before git). We bring them into the git repo after running them through our asset pipeline,
More ›