Hacker Newsnew | past | comments | ask | show | jobs | submit | machiavelli1024's commentslogin

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++.


Your comment was killed very quickly, strangely, but I though it had valid content so I revived it. The actual issue against inlining is that anybody can intercept method calls, even from places that the compiler cannot know about such as bundles loaded at runtime. So this isn’t even an issue with Turing-completeness; it’s an impossible problem to solve at compile time.


> at compile time

That's the key thing - other languages which solve this solve it dynamically.


Yeah, that’s what a JIT does. Unfortunately that’s not something that Apple really wants to open the door to on their platforms, especially for native code.


I don’t think that comes into play here. Objective-C is C, and although you could JIT any language, C isn’t made for it, both philosophically (one of its main claims to fame is ‘close to the metal’) and technically (a source file cold be compiled multiple times with different macro definitions or with a different set of #included files)


C isn't made for JIT because it's static; that's why inclining exists. Objective-C has room to improve because it has dynamic function calls.


C can also benefit from inline caching - function pointers!


Did you mean to say "NP-Complete" where you said "Turing-complete"?


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.


>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.


Works fine as long as you generate x,y,z randomly and not their squares.

Same process but minor tweak.

https://jsfiddle.net/w8zLvsy2/


This approach is still incorrect, and the bias toward the set of 4 points S = {(1,0),(-1,0),(0,1),(0,-1)} can be seen in the diagram. There is no way to break out of this bias by flipping or reordering coordinates because those two operations preserve the symmetries of S:

- if you flip the x-coord of a point near S, e.g. (-.9,0), you still get a point near S, e.g. (.9,0)

- if you swap the x-coord and y-coord of a point near S you still get a point near S.

- etc.


Notice how the rejection method becomes useless for higher dimensions.

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


While that's interesting, I'm having a complete lack of imagination fail on why one would be trying to solve this problem for higher dimensions, other than academic pursuits. Could you give a practical example?


“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...


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


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.


If I'm woken up right in the middle of very intense R.E.M. sleep I'll sometimes see geometric patterns for a little while.


In other words: horror vacui


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.


You might consider looking up the word "sarcasm", while you're at it.


Thanks, I've checked it! If I understand it correctly, your comment is a poor attempt at it.


Oink, what.cd, redacted


first rule about private trackers is not to talk about private trackers.


I believe in freedom of information ;)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: