Better HN
topnewbestaskshowjobs
Log inSign up

panic

29,749 karma · joined Sep 16, 2009 (17y ago) · 3,593 submissions

Submissions

comment 9y ago · link · parent

the sort of things that go on at Yale these days

What do you mean by this?

comment 9y ago · link · parent

In our modern economy, lots of people do things they aren't passionate about in order to live a life of relative freedom. You happened to find success programming, but that doesn't mean I'll find success writing music (or whatever else my real passion may be).

comment 9y ago · link · parent

In what way is it dangerous? It's a good description of what programming languages do, even if we don't know exactly how our minds work.

comment 9y ago · link · parent

Exactly. It's a difference of will, not of resources. America could easily do all of this if our government and people cared.

comment 9y ago · link · parent

Yeah, have the people arguing for Vulkan on the web actually experienced what it's like to use Vulkan? Here's a small taste: https://renderdoc.org/vulkan-in-30-minutes.html

2226.

Thoughts about a WebGL-Next (2016)(floooh.github.io ↗)

67 points · by panic · 9y ago · 21 comments

comment 9y ago · link · parent

IMO, we need to fundamentally rethink the design of our computing infrastructure so that it suits our current way of using computers. This would start from the CPU microarchitecture and instruction set, through the programming interface of the operating system, up to the middleware used by most programs.

Do you know if there's anyone seriously working on this? I feel like there are a lot of people on this website who want something like this and would love to help out.

comment 9y ago · link · parent

There are reasons to disable exceptions aside from performance. Google's C++ style guide (which bans their use) discusses some of the pros and cons: https://google.github.io/styleguide/cppguide.html#Exceptions

2229.

I hate almost all software (2011)(tinyclouds.org ↗)

226 points · by panic · 9y ago · 144 comments

comment 9y ago · link · parent

All his advice already comes from people like that. If Trump were planning to swap out Bannon for Kalanick, what you're saying would make sense, but this is a relatively unimportant advisory council. It's not exactly Trump's inner circle.

comment 9y ago · link · parent

Yes, it's spent carrying out the fundamental operations of the language (mostly method lookup and dispatch in this case).

comment 9y ago · link · parent

It's a completely different situation. Their job is to represent the people who elected them. How would you know your representative actually represents you without knowing how they vote?

comment 9y ago · link · parent

But once you've optimized those sections, the rest of the performance problems are left scattered through your code. I've had to rewrite a system in C++ just a few weeks away from shipping because even after optimizing all the performance-critical sections, we still needed that extra 15% or so of "ambient" performance.

comment 9y ago · link · parent

Because we don't have a general-purpose tree file format.

comment 9y ago · link · parent

- know how your congressman votes on each of the vote

If anyone from Facebook is reading, this would be a great feature for the site. Imagine following your representatives and getting their votes automatically in your newsfeed.

comment 9y ago · link · parent

Why are we giving up? Tech workers, startups, and VCs collectively control huge amounts of money and skilled labor. Organizing it all would obviously be a challenge, but fighting this is a solvable problem!

comment 9y ago · link · parent

This is a nice Tetris implementation even ignoring the technology used. The shake effect when you drop a piece is particularly satisfying!

comment 9y ago · link · parent

Paste this into the editor to see the difference:

    varying vec3 vPos;
    
    float sRGB(float x) {
       if (x <= 0.00031308)
          return 12.92 * x;
       else
          return 1.055 * pow(x, 1./2.4) - 0.055;
    }
    
    void main() {
       float v = (vPos.y + 1.) / 2.;
       if (vPos.x < -0.5)
          gl_FragColor = vec4(pow(v, 1./2.2));   // 2.2 Gamma
       else if (vPos.x < 0.0)
          gl_FragColor = vec4(sRGB(v));          // sRGB 
       else if (vPos.x < 0.5)
          gl_FragColor = vec4(sqrt(v));          // sqrt approximation
       else
          gl_FragColor = vec4(v);                // unadjusted
    }
The sqrt() function adjusts for the output curve of your display (usually sRGB nowadays, but in the past various gamma values have been used). The strips on the left should have an approximately linear gradient between light and dark, whereas the rightmost gradient will be too dark.

The question of why your display doesn't just output linear colors is more interesting. Small differences in dark colors are more easily perceived than differences in lighter colors, so it's useful to spend more encoding space on the low end. With more bits, you could use linear colors throughout, but all color data would take up proportionally more memory. It ends up more efficient to just decode from sRGB, do your computation, and encode into sRGB again each time.

Modern graphics APIs can automate this sRGB coding for you by letting you specify an sRGB format for textures: each time you read from an sRGB texture, the system will decode the color into linear space, and all writes will automatically encode back into sRGB.

2239.

End-to-End Arguments in System Design (1984) [pdf](web.mit.edu ↗)

3 points · by panic · 9y ago · discuss

comment 9y ago · link · parent

This makes C's approach sound worse than it really is: in practice you'll either get a compiler warning or a segfault, not the potential nose-demons typically associated with undefined behavior. C also gives you a type-level way to track static strings (the const qualifier) though it isn't as strictly enforced.

comment 9y ago · link · parent

Do you really think a peripheral advisory council is "Trump's sphere of influence?" Trump isn't even consistently listening to people in his own executive branch.
1
747576
120