News for hackers. Stuff that matters.

machiavelli1024

Re:Can you recreate Objective-C in C? on Thursday August 09, 2018 @04:27PM (#17728168)
There’s no inlining, because determining whether inlining wpuld be safe is probably Turing-complete. However, IMP cacheing is a thing and that’s enough for most cases. For the rest there is C and (Objective-)C++.
Re:Freeing the Web from the Browser on Monday August 06, 2018 @07:53AM (#17696848)
You can configure your client to ignore comments unless they’re verified by [authority you trust]. Verification would happen cryptographically; like the GPG web of trust. It’s up to you to choose which moderators you subsrcibe to, if any.
While I haven't done anything nefarious other than putting a few tracking/analytics frameworks into our product, I have heard a few stories from my colleagues...

E.g. at a contractor company, a client wanted to lease 5 developers for a project. We didn't have enough free developers, so they assigned a single guy to the project, who was making commits from 5 different accounts. The client was paying for 5 devs of course.

There was also a client who was building slot machines, and we wrote the software for it. We ran experiments to figure out the best way to rip off gambling addicts.

The first company I worked for took EU innovation grants and when the deadline came, they simply copied their existing product, replaced the logo and showcased it as something they used the grant for.

Re:Generating random points inside a sphere on Sunday August 05, 2018 @09:31AM (#17691232)
>Let me know if I am wrong.

You're wrong on multiple levels.

1. Generating random values for x^2, y^2, z^2 and taking their square root will only give you values in the x,y,z > 0 octant.

(But let's say you "fix" this by randomly multiplying them with -1.)

2. Taking the square root of a uniformly distributed random variable is no longer uniformly distributed.

3. Randomly reordering the coordinates won't fix your bias.

Here's a demonstration in 2D: https://jsfiddle.net/tz85wnxy/59/

Uncomment line 17, 18, 20 to see how it's still not uniform even if you randomly multiply the coordinates by -1 and reorder them.

Re:Generating random points inside a sphere on Sunday August 05, 2018 @08:38AM (#17691031)
“Sampling from the uniform distribution on the N-dimensional Euclidean ball (the N-ball) and its surface (the N-sphere) is a tool useful in many diverse research fields, for instance Monte Carlo integration in physics, generating random directions for MCMC sampling on bounded regions, generating random correlation matrices, Monte Carlo analysis of random packing on the sphere, generating random rotations in cryptography as well as various simulation studies in statistics”

https://www.sciencedirect.com/science/article/pii/S0047259X1...

Re:Generating random points inside a sphere on Saturday August 04, 2018 @07:18PM (#17688904)
Notice how the rejection method becomes useless for higher dimensions.

https://en.m.wikipedia.org/wiki/Curse_of_dimensionality

Re:4D toys on Saturday August 04, 2018 @08:53AM (#17686672)
You can’t reconstruct a 3D scene from a 2D projection unless you take educated guesses.

E.g. When you look at a picture with something that looks like a chair, you assume that it’s indeed a chair, and then you can estimate its size/pose/etc. But there are infinitely many non-chair shapes that would produce the exact same projection. It’s just that you won’t encounter them in real life, except maybe in trickshots like this: https://youtu.be/SKpOKXAVjGo

Re:A Mathematical Theory for Why People Hallucinate on Friday August 03, 2018 @11:19AM (#17680580)
Wooooow dude, I bet noone came up with this idea before! Very trippy! 420!
Re:A Mathematical Theory for Why People Hallucinate on Friday August 03, 2018 @11:15AM (#17680553)
I had a similar experience when I forgot to take my SNRI antidepressant. I woke up in the middle of the night, and when I tried to continue sleeping I had these ultra-detailed geometric patterns dancing before me. The visuals were nice, but then my ears started ringing too which started bothering me, so I opened my eyes and woke up completely, which stopped the visuals and the ringing.
Re:The Bullshit Web on Tuesday July 31, 2018 @06:31PM (#17657870)
In other words: horror vacui
Re:Removing Bad Actors on Facebook on Tuesday July 31, 2018 @06:13PM (#17657733)
Thanks, I've checked it! If I understand it correctly, your comment is a poor attempt at it.
Re:Removing Bad Actors on Facebook on Tuesday July 31, 2018 @01:19PM (#17655048)
Google is your friend.

In short: gerrymandering is the practice of redrawing voting district boundaries to ensure your victory in as many districts as possible.

Re:Why I Ripped the Same CD 300 Times on Tuesday July 31, 2018 @05:53AM (#17651823)
I believe in freedom of information ;)
Re:Why I Ripped the Same CD 300 Times on Tuesday July 31, 2018 @03:19AM (#17651176)
Oink, what.cd, redacted
Re:If monads are the solution, what is the problem? on Monday July 30, 2018 @07:24PM (#17649135)
>So it's a way of imperatively declaring execution sequence dependencies that lets you reason as if there's only pure functions most of the time.

No. Monad is just a “design pattern”. It’s nice that this design pattern happens to be useful to force sequential evaluation, but it’s just one of the many things that fits the monad abstraction.

The animations could be optimized further via gifsicle (http://www.lcdf.org/gifsicle/):

    -rw-r--r--@    1 x  staff      538584 Jul 30 17:36 columnblocks_coloured.gif
    -rw-r--r--     1 x  staff      282676 Jul 30 17:42 columnblocks_coloured_opt.gif
    -rw-r--r--@    1 x  staff      131143 Jul 30 17:36 logo.gif
    -rw-r--r--     1 x  staff       92369 Jul 30 17:42 logo_opt.gif
Re:Signaling in tech is some fucked up shit (2016) on Sunday July 29, 2018 @05:46PM (#17640444)
Yep. Funny that HackerNews seem to be unable to wrap their head around the fact that prejudice is just applied Bayesian statistics.
Engineers: we can do X and finish in two weeks, or we can take a shortcut and finish in one week, but the code will be tightly coupled to this particular quirk of OpenGL.

Manager: take the shortcut :)

... repeat this for 15 years ...

The commit message was probably “Implement GDPR compliance”.

You’d be surprised how oblivious layprogrammers are to the privacy implications of their work. They slurp up the kool-aid from management about “learning from data” and merrily implement whatever they’re told to.

Re:The Troubled Quest for the Superconducting Wind Turbine on Saturday July 28, 2018 @06:50PM (#17635463)
What’s up with vertical axis wind turbines though?
It’s pretty simple in Hungarian. The orange fruit is called “narancs”, while the color is “naracssárga” (“narancs” + “sárga”, where “sárga” means yellow).