Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yoklov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
55 ms
·
451.
▲
by
yoklov
11y ago
Once saw a polyglot program used as both a build script and the program to build. It was part C++ and part batch script, though for the most part the C++ part just #included several cpp files.
452.
▲
by
yoklov
11y ago
Yes, I'm a bit jaded on C++, despite using it regularly. And a functional programming approach here would suffer the same issues as an object oriented approach. The issue with both is that they like to operate on the data elements one
453.
▲
by
yoklov
11y ago
I don't think it's a worthless goal (it's not that bad writing different versions of the code for different processors, since it's pretty mechanical and really only done at the end, but it would be nice not to have to),
454.
▲
by
yoklov
11y ago
A compiler isn't actually that much more difficult than an interpreter. Extending an interpreter to compile instead of interpret is not that much code, and the code won't be that difficult or complex either. The hard part is makin
455.
▲
by
yoklov
11y ago
I'd be interested in seeing a version of the demo with HSL, for comparison.
456.
▲
by
yoklov
11y ago
It's massively unfortunate that a tradeoff like this has to be made (speed vs responsiveness). But FWIW, you can do canvas pixel operations with a web worker, which you then blit to the canvas, which is acceptable in some cases.
457.
▲
by
yoklov
11y ago
The way I understand it is that they usually just move the pointer to the ArrayBuffer's underlying data store. No block copy occurs.
458.
▲
by
yoklov
11y ago
> Which is only going to get worse with Vulkan (around 600 LOC for the triangle) Does this really matter? Vulkan isn't meant for beginners, nor should it be. Beginners would be much better off served using OpenGL, or on a higher lev
459.
▲
by
yoklov
11y ago
Wow, theres actually a lot of cool stuff in that. HolyC[0] also has some very nice features and is much more practical than I had previously thought, although I'm not sure I could last for long with it -- a lack of type checking is so
460.
▲
by
yoklov
11y ago
Uh, what exactly about this is questionable? Only think I can think you could mean is the lack of curly braces, but that's so common it can't be it. EDIT: Unrelated sidenote: GLFW doesn't really make OpenGL itself any less te
461.
▲
by
yoklov
11y ago
Never tried soylent, but as someone who has had a lot of trouble with this in the past, that does sound a lot like dehydration... But maybe not, who knows!
462.
▲
by
yoklov
11y ago
Not sure. We have an early version of one where I work (game dev), and to my knowledge it requires the steam DLL, and doesn't expose XInput/DirectInput bindings (I wasn't the one who added support for it, so this could be a l
463.
▲
by
yoklov
11y ago
That looks pretty awesome. Haxe is fairly interesting to me (and I've used it in the past, but only to target flash), but I have no great love for the flash APIs, so the prospect of writing a game using OpenFL didn't excite me muc
464.
▲
by
yoklov
11y ago
Ha! Very true. I've sunk well over a thousand hours into Dungeon Crawl Stone soup, and hundreds into Spelunky, Binding of Isaac, and other roguelike/lites. I don't think I'd consider them better games than Braid, however
465.
▲
by
yoklov
11y ago
Gotta disagree with you there. IMO Limbo was mostly polish with little substance (and don't get me wrong, I think it does a great job at that, it has amazing aesthetics). FWIW I've revisited Braid multiple times, but don't th
466.
▲
by
yoklov
11y ago
Libraries depend on what you need to do. A lot of work is done with just the std lib. For domain specific stuff you use domain specific stuff. For generic stuff, well, you tend not to want generic data structure libs that come with other la
467.
▲
by
yoklov
11y ago
Definitely. Not only is it worth doing the wrong thing first to understand why its wrong, its also often worth revisiting after you have more experience with the other alternatives. Especially when it comes to programming paradigms and stuf
468.
▲
by
yoklov
11y ago
Probably in memory? Most GPUs use different ISAs, and they're mostly proprietary, so they usually have to be compiled (at least partially) at runtime. Then again, never used CUDA so who knows
469.
▲
by
yoklov
11y ago
Goto is fine. The 'harmful' style was using them in favor of ifs and loops. The things I've seen people do to avoid a goto are pretty awful though. If you ever use a 'do {} while (0)' just to break out of it, you sh
470.
▲
by
yoklov
11y ago
There are several large differences you're missing. Many of these are elaborated upon in other posts, and some in his twitch stream. His methodology basically completely eschews dynamic dispatch in favor of static dispatch. No function
471.
▲
by
yoklov
11y ago
Typically these sorts of things drive technological innovation.
472.
▲
by
yoklov
11y ago
If Apple gave you the laptop for free and paid you that money, it would be comparable.
473.
▲
by
yoklov
11y ago
This seems ( http://www.chilliant.com/rgb2hsv.html ) to have a few implementations of color space conversions (in HLSL but that shouldn't be a difficult translation). They're not perfect but they're a good star
474.
▲
by
yoklov
11y ago
Just tried it on the two examples I provided. It doesn't remove conditionals, which was basically my whole point FWIW, I don't think it can without assuming the input lies in a certain range.
475.
▲
by
yoklov
11y ago
Tell that to end users who leave bad reviews for your game, complaining that it doesn't make 60fps. Not to mention the fact that the landscape of GLSL compilers is fairly broad and you have absolutely no control over whether or not you
476.
▲
by
yoklov
11y ago
Shader code is extremely performance sensitive, and poorly written or complex shaders can absolutely destroy framerate. Conditionals, loops, and even function calls on bad drivers are all things that need to be avoided, when possible, and i
477.
▲
by
yoklov
11y ago
Does `#pragma glslify : foo = require('foo')` leave an awful taste in anyone elses mouth? Not sure if it's because it's totally opaque, or because it adds a dependency and potentially a whole heap load of transitive depe
478.
▲
by
yoklov
11y ago
Not really. I'm sure this happens some of the time, but I suspect that's more common with developers who haven't written either. In my experience, a lot of the developers who prefer C to C++ are developers who wrote a lot of
479.
▲
by
yoklov
11y ago
Eh, macs have a Cmd key which is basically the same thing. The real question is whether or not it has a physical right mouse button. Right-click+drag is basically impossible (without a separate mouse) on apple hardware, which is sort of its
480.
▲
by
yoklov
11y ago
Against all odds, the PhD thesis itself is both approachable and extremely interesting to read, even for someone who has never written in Julia (and in all likelihood never will): https://github.com/JeffBezanson/phdthes
More ›