HNHacker News
TopNewBestAskShowJobs

redcalx

528 karma · joined June 29, 2015

http://heliosphan.org/
submissionscomments
redcalx··on Orange Pi 3 review: A Raspberry Pi rival that's a serious disappointment
Thanks. Huh, they're far more expensive on amazon.co.uk (£132)!
redcalx··on Orange Pi 3 review: A Raspberry Pi rival that's a serious disappointment
What CO2 sensors are you using? (I understand that the cheaper ones infer CO2 levels from measuring other things, but interested all the same).
redcalx··on Sunlight through glass does not provide Vitamin D
I've occasionally posed this question to people during casual conversation, and I've always received the same answer - 'of course!' (... you make vitamin D behind glass).

It's still not clear to me if there are some types of glass that do allow vitamin D synthesis or not.

redcalx··on Fixing Random
Yeh that sounds right. Had forgotten the details as it's been a while since I went through all the issues and wrote and tested the redzen code.
redcalx··on Fixing Random
There are a number of issues with System.Random, all of the known issues to date are described in this open github issue:

https://github.com/dotnet/corefx/issues/23298

The redzen library contains RNGs that address all of the known issues, e.g. see:

https://github.com/colgreen/Redzen/blob/master/Redzen/Random...

https://github.com/colgreen/Redzen/blob/master/Redzen/Random...

That Xoshiro256StarStarRandom source has also been merged into Math.Net.

redcalx··on Fixing Random
See NextDoubleHighRes() here:

https://github.com/colgreen/Redzen/blob/master/Redzen/Random...

There's an explanation in the comments, and a link to the original fuller explanation and source, here:

https://mumble.net/~campbell/tmp/random_real.c

I.e. I'm pretty sure your approach gives a non uniform distribution, but happy to discuss in more detail if you want.

redcalx··on Why We Sleep, and Why We Often Can’t
I had a similar experience but with magnesium citrate, I think any organic salt of mg will likely help as they all have good uptake/absorption qualities, as opposed to mg oxide. I also got some beneficial effects from medium strength b vitamin pills and a high dose of b12 in the methylcobalamin form, taken sublingually.
redcalx··on UK police release airport drone suspects, admit there may not have been drones
As per a sibling comment, the names were leaked, they were not officially announced.
redcalx··on UK police release airport drone suspects, admit there may not have been drones
Indeed. If they can't link it to anyone or even any time, then it can't be used as evidence. Although it may be a fruitful line of enquiry if was one of the problem drones from last week. E.g. tracing sale of parts from serial numbers.
redcalx··on UK police release airport drone suspects, admit there may not have been drones
The paper's that did that made clearly libellous claims - because the couple had not yet been charged with an offence when their names were published. Those paper's can now expect libel claims against them, although given the clear breach of libel law I expect they will wish to settle out of court rather than take on the extra expense of a court case they can't win.
redcalx··on Gut bacteria may offer a treatment for autism
I am very interested in learning more. I will Google etc. of course, but if there are links, blog posts or bits of info you would be willing to share I would be most grateful. Thanks.
redcalx··on Sick Building Syndrome
Maybe a longish walk at lunchtime? Depends on where the office is of course.
redcalx··on Sick Building Syndrome
For me removal of carpets is the #1 thing to do if you have allergic rhinitis, especially if there are pets.
redcalx··on Randomness in .NET
Heh, fair enough :) Not easy to find though eh (v. similar colour for normal and anchor text).
redcalx··on Randomness in .NET
I think this is the github issue referred to:

https://github.com/dotnet/corefx/issues/23298

I wrote some replacement classes that address all of the known issues, here:

https://github.com/colgreen/Redzen/tree/master/Redzen/Random

https://www.nuget.org/packages/Redzen/

redcalx··on The IceCube Neutrino Detector at the South Pole Hits Paydirt
I believe all the poo is taken away.
redcalx··on Timsort is a sorting algorithm that is efficient for real-world data
I ported timsort to C#/dotnet recently. Available in this nuget:

https://www.nuget.org/packages/Redzen/

Source code here (there are three variants):

https://github.com/colgreen/Redzen/tree/master/Redzen/Sortin...

None of the standard framework sort methods perform a stable sort so it's handy for that, as well as being a lot faster for some data, i.e. with pre-sorted runs. Otherwise the framework now uses introsort which is pretty good, so you should definitely performance test with both. I use both sorts depending on the context and I usually end up using the built in introsort, with timsort used for a few special cases.

redcalx··on Southern Europe Has Not Seen Net Job Creation in over a Decade
Or any large country, e.g. China, Russia, India, Indonesia?
redcalx··on Intel CEO resigns after relationship with employee
> The company said Mr. Krzanich had violated a non-fraternization policy that applies to managers
redcalx··on A new fast hash table in response to Google’s new fast hash table
You do hash % bucketCount to find your bucket/slot. Each array element is also a linked list node (with a next pointer), thus if the slot is populated you follow the linked list until an empty slot is found and attach to the end of the linked list.

I figure it works best if you over allocate slots, so that on average you only have to do very few hops on each linked list walk (or no walk at all).

Aside: This is the method employed by .NET's Dictionary<K,V> class.

Further - it's generally faster to use structure of arrays rather than array of structures, thus in the above scheme the dictionary items/payloads and the linked list pointers could be in separate arrays.

redcalx··on Intel's First 10nm Cannon Lake CPU Confirmed
I did not expect to see AVX-512 support for a Core i3.
redcalx··on Xoshiro256** PRNG
I am not the author, however there is a full discussion in the paper... https://arxiv.org/abs/1805.01407

To summarise...

Xoroshiro256+ is slightly faster but fails some linearity tests in the low order bits, however when generating 64 bit floats only 53 bits are used, thus if you take the most significant 53 bits then Xoroshiro256+ is perfectly fine. It's also probably fine for generating the full 64 bits for the vast majority of cases, unless you have some very specific requirements. But for peace of mind there is the option to take the 15% slower version for a PRNG that is still sub-nanosecond (per 64 bits generated, on contemporary superscalar CPUs) and that passes all tests that the authors were aware of.

redcalx··on Xoshiro256** PRNG
> passes all tests we are aware of.

I.e. your quote relates to xoshiro256+, not Xoshiro256* *.

redcalx··on Xoshiro256** PRNG
xoshiro home page http://xoshiro.di.unimi.it/
redcalx··on Is sorted using SIMD instructions
For reference: https://en.wikipedia.org/wiki/Duff%27s_device
redcalx··on Is sorted using SIMD instructions
I think the reduction in the number of branches inside the loop is a significant factor here, i.e. the if statement is performed per 4,8 or 16 elements instead of per value element. Branches invoke branch prediction logic which is non trivial, thus even though it may not slow execution it may increase power consumption.

On this basis another way of approaching the problem is to loop over the whole array and return the result at the end, but this of course would take N/2 loops on average, whereas the nested if can exit early. A compromise might be to loop over short sub-spans of the array, and do an exit early test at the end of each sub-span.

A good sub-span length for scalar code might be around 16, for one because we hit the law of diminishing returns for longer spans.

Also I think is_sorted_asc() or is_sorted_ascending() might be a better name if this were for a function in a general purpose library.

redcalx··on Users Abandon Facebook After Cambridge Analytica Findings
nitpick: World population is currently about 7.4 billion.
redcalx··on Intel Responds to Security Research Findings
> I guess overall I think this is fair to call a "flaw" but not a "bug."

Yes I agree, it's not a bug in the sense of a silly mistake that slipped through development and testing. It's a flaw / attack-vector that no-one thought of... until now.

redcalx··on Intel Responds to Security Research Findings
Yes it's designed in such a way that in a court of law they could claim they were announcing a bug, but most or many people reading it would come to the opposite conclusion. In other words it's deceptive.
redcalx··on Intel Responds to Security Research Findings
It's kind of semantics though isn't it? If I write a piece of software that follows the spec and fulfils the customer's need, but then someone tries to do something with it that we hadn't thought of and that results in a security hole... around here we call that a bug, a flaw, something we missed. Maybe it's reasonable to have not spotted the bug, but that wouldn't make it not a bug/flaw.
← PreviousPage 2 of 9Next →