Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nice_byte
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
36 ms
·
361.
▲
by
nice_byte
11y ago
I assume you wrote your code while keeping in mind that it will be compiled by ES. But we're talking about porting legacy code. ES may be reliable, but you have to have the source code for all of your dependencies and not rely on pla
362.
▲
by
nice_byte
11y ago
If you just want to reuse some logic that you already havein C++ and don't care about the performance that much - why not :)
363.
▲
by
nice_byte
11y ago
I guess Emscripten is the less reliable route. I think one can't reasonably expect any C++ code to be readily compileable with emscripten with no modifications whatsoever
364.
▲
by
nice_byte
11y ago
If you're feeling adventurous and don't mind the performance penalty, I guess you could try compiling the C++ source into asm.js with Emscripten for the added bonus of having it work in modern browsers.
365.
▲
by
nice_byte
11y ago
Is the source code of TreeSketch publicly available? If not, is possibly any chance of releasing it?
366.
▲
by
nice_byte
11y ago
> introduced a new approach to delivering and updating the operating system It's not a new idea at all. Rolling release linux distros have been doing that for a long time.
367.
▲
by
nice_byte
11y ago
> I know HN is mostly interested in computers, but plants have some very interesting things to learn about. Indeed, and you can even study them in the context of algorithms: http://algorithmicbotany.org/ - discovered thi
368.
▲
by
nice_byte
11y ago
Please. Next logical step is Half Life 3 :)
369.
▲
by
nice_byte
11y ago
I disagree with almost all of the justifications, but I don't use Swift and mostly program in C++ so I'm pretty biased. > These operators increase the burden to learn Swift as a first programming language - Same could be said a
370.
▲
by
nice_byte
11y ago
Currently the emulator is faster on Linux (because it can take advantage of KVM), but the new version should improve performance on Windows AFAIK
371.
▲
by
nice_byte
11y ago
I find it interesting how you care about a person's race so much.
372.
▲
by
nice_byte
11y ago
Ah, yes. How dare they have fun.
373.
▲
Dependency Injection in C++ Using Variadic Templates
(gpfault.net)
4 points
by
nice_byte
11y ago
|
0 comments
374.
▲
by
nice_byte
11y ago
I've been writing a library that is essentially a wrapper over OpenAL and libogg/libvorbis to provide a simple interface for playing encoded sound samples or streams. However, OpenAL is a pain, and the only decent free implementat
375.
▲
Mapping Types to Values (in C++)
(gpfault.net)
4 points
by
nice_byte
11y ago
|
0 comments
376.
▲
by
nice_byte
11y ago
Awesome, I didn't know that!
377.
▲
by
nice_byte
11y ago
They couldn't make it into the official C++11 standard. Seems like the standards committee still wants to add them, but it's not clear when that would happen.
378.
▲
by
nice_byte
11y ago
"concepts shipwreck" it makes me sad :(
379.
▲
by
nice_byte
11y ago
> kontfossiel LMAO :')
380.
▲
by
nice_byte
11y ago
Actually, there are -40% of them.
381.
▲
by
nice_byte
11y ago
He/she was joking.
382.
▲
by
nice_byte
11y ago
I believe bringing up Rust in a discussion like this is completely warranted. After all, both Rust and C++ try to achieve similar goals (C++ also has a goal of maintaining backward compatibility with decades worth of code, which Rust doesn&
383.
▲
by
nice_byte
11y ago
While it's true that most people have to deal with lots of legacy code, as long as their compilers are up-to-date, it doesn't prevent them from using new language features.
384.
▲
by
nice_byte
11y ago
I think it should work if you define the ctor and dtor for BlackBox in a separate .cpp file where you include gadget.h. The reason it fails to compile is probably that the implicitly generate constructor of BlackBox (which is inline, I gu
385.
▲
by
nice_byte
11y ago
Yes. It seems to work, but it might be a coincidence. The order of argument evaluation is undefined. It might be that the exception gets thrown before the ownership is transferred, but it's just luck. I have modified your example a bit
386.
▲
by
nice_byte
11y ago
Someone brought up this point during another discussion and initially I agreed with them. However, someone else suggested that if the function has more parameters, an exception might happen when passing the arguments for the other parameter
387.
▲
by
nice_byte
11y ago
Because the example is about an idiomatic way of enforcing exclusive pointer ownership. Maybe it wasn't a very good example though. A better example might be this: in the Builder design pattern, an object is built from various "pa
388.
▲
by
nice_byte
11y ago
I agree with you. To be honest, it took me a few tries to understand how move semantics really works (the unfortunate naming of std::move really didn't help). I'm still not sure my understanding is 100% correct according to the st
389.
▲
Writing comments about pointer ownership
(gpfault.net)
42 points
by
nice_byte
11y ago
|
39 comments