News for hackers. Stuff that matters.

askee

Re:A review of endianness bugs in Qt, and how they were fixed on Saturday January 02, 2021 @09:28AM (#25613019)
It's also about performance. The snippet assumes the byte order of the buffer or byte stream is little endian so only covers two of four cases. If you want to read a little-endian byte stream on a big-endian machine, of course you need swapping. But, considering portability, if that byte stream had been written by the big-endian machine before (or came directly from network) it would be in big-endian ordering and swapping would be wrong.

Assuming LE ordering on the writer side, you would need to swap again on a BE machine. Usually, however, you want to store in your target byte order, though. One could argue this is irrelevant as long as the memory doesn't leave your application, of course. Yet, by explicitly having macros _to_cpu, _to_be, _to_le and so on you make all of this explicit.

Wasn't the mostly unanimous agreement in this thread that this paper was of low quality and its conclusions are questionable at best?
Re:Blockchains from a Distributed Computing Perspective [pdf] on Saturday January 20, 2018 @12:35PM (#16194279)
Also, it's "deus absconditus" not "abscondidus" in 1.
The k'th largest element in an array can also be found by the nth_element() algorithm already included in the STL. It has linear complexity as opposed to the O(n log k) and O(k log n) variants proposed here.
Re:Image unshredding using a TSP solver on Monday October 10, 2016 @03:19AM (#12675592)
How good does it work with non-natural images where rows/columns are not similar to each other? White noise for example should prove rather difficult.
No it doesn't, unfortunately. I misunderstood OP's questions at first. You can connect owncloud to a mail server (a la Roundcube) but nothing more.
Self-hosted owncloud works for me except for the gruesome woes every single time I try to update it.
Re:Don’t invert that matrix (2010) on Thursday May 12, 2016 @03:56PM (#11686266)
You would solve e.g.

min_x* ( ||A x* - b|| (+\lamba regularization(x*) )

Re:Don’t invert that matrix (2010) on Thursday May 12, 2016 @03:54PM (#11686247)
In general there are no shortcuts, and when the matrix A is not small (e.g. m x n with m,n << 100), you don't want to invert A, especially if you are only interested in x (from A x = b). Instead, use numerical minimization schemes like conjugated gradients and variants thereof or Quasi-Newton methods (BFGS). Combined with preconditioning as well as regularization or denoising this usually yields good results. Compressive sampling methods (total variation regularization) have received lots of attention in the last ten years.
I find the wording somewhat peculiar: 'the resulting address will change dramatically, by (4 - 2^(32+2)). In 32-bit mode (all addresses modulo 2^32), this is just an increase by 4 as usual; the "wraparound" part is a multiple of 2^32 and hence invisible'

Why would it matter that the address will change "dramatically"? Even if it didn't (and only change by say 16 bytes or whatever) you'd have to deal with it. The problem is that int overflows at 2^31 while long/a larger type doesn't. In order to cope with the overflow you'll have to "simulate" an overflow in the larger type as well (or at least do what the smaller type does) which is achieved via a sign-extend.

Rasterization also is of highly-parallelizable nature and this parallelism has been exploited to great effect in the last decade(s). Given that Ray Tracing's only advantage over Rasterization is specular reflection it seems unlikely it is really superior in terms of efficiency. Especially since specular reflections and many other effects can be achieved via cheating in Rasterization.

For real GI, Path Tracing, Photon Mapping and so on are the methods of choice and not Ray Tracing.

Re:Parallel STL on Saturday May 09, 2015 @03:16AM (#9515772)
GCC already has something alike, the parallel mode [1]. It is based on the Multi-Core STL (MCSTL) developed at Karlsruhe University. In [2] you can also find some publications. As far as I know this already works quite well.

[1] https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mod... [2] http://algo2.iti.kit.edu/singler/mcstl/

Re:Ask HN: How's working in the Silicon Valley today? on Sunday December 07, 2014 @06:01PM (#8713964)
> The important upside is that SV is the center of the universe for interesting computer science work.

This is so true! (Even by my limited experience) Comparing job offerings in my home area vs offerings of any random company in the valley, the SV company wins. It's unbelievable how few interesting CS jobs there are in the rest of the world in comparison.

Ask HN: How's working in the Silicon Valley today?

I'm currently on the lookout for a new job after finishing my PhD in CS, but my last question didn't receive much love.Therefore now, all-new, condensed and brief: How is working in the valley today? Especially if you are not much into the social media side of things and like to get your hands dirty the old-fashioned way (e.g. C,C++, system-level stuff, infrastructure, bare-metal development...

( Read More... | 23 comments | 37 points | on HN )

Ask HN: No interesting CS jobs in home market, moving to California worthwhile?

Dear HN, I'm currently on the lookout for a new job. I studied CS and finished my PhD a year roughly a year ago. Since then I have been working in the same institute and things are getting worse by the hour.My first plan was to try self-employment and startup stuff but this hasn't worked out as planned for various reasons. In general my interests include the infrastructure level of "things",...

( Read More... | no comments | 3 points | on HN )