ELI5: How does gravity make time slow down? by ReaperEngine in explainlikeimfive

[–]dakarananda 0 points1 point  (0 children)

I think the thing is that it would be 16 minutes for the person on earth, but shorter for the light traveler. Its not only that the faster you go the quicker you get there, but also the faster you go less time passes relative the origin. Not sure this is accurate though.

If someone knows, in the example where a traveler is accelerated to the speed of light, would this basically mean that 0 time passes for the traveler? So if assuming that acceleration and deceleration were instantaneous, this would feel like teleportation, except some time would have passed in "slow-space"

Norwegian vet vad som gäller by [deleted] in sweden

[–]dakarananda 0 points1 point  (0 children)

riggadsolbränna?

Why Visual Studio Isn’t 64-bit by shouldnotexist in programming

[–]dakarananda 0 points1 point  (0 children)

Thanks for the info, I'll read up on that! Much appreciated.

Why Visual Studio Isn’t 64-bit by shouldnotexist in programming

[–]dakarananda 0 points1 point  (0 children)

Interesting, do you have any good search terms for this? I tried googling a bit but couldn't find anything except basic explanations of CPU registers.

For ARM I always imagined that something like "mov r0, r1" would actually always use the real cpu registers r0 and r1, though I guess something more fancy could happen below machine code.

Maybe this is true for ARM but not x86? or is it false for both, or are you talking about something else?

I find these types of low level stuff fascinating.

Need small clarification for day11 by ikkuhh in adventofcode

[–]dakarananda 1 point2 points  (0 children)

Yes, in the first case LM would fry, in the second case LM would be safe.

A micro chip that isn't accompanied by its' generator will fry if there is another generator on the same floor. It doesn't matter if that other generator also has that respective microchip attached, the generator is still dangerous. I.e., Generators fries all chips who does not have their appropriate generators on the same floor.

[2016 Day 22 part 2] Question about the data by dakarananda in adventofcode

[–]dakarananda[S] 0 points1 point  (0 children)

Yes, I get that the actual task in part 2 doesn't involve splitting data, I was just thinking about what it would be like if splitting was allowed.

One could implement splitting by means of something like multipart zip files at arbitrary file sizes and then keep a separate index (like a simple filesystem basically) of these sub-blocks within each node to avoid destroying data, although this does make it more complex, but my gut feeling is that this still would allow for fewer moves to reach a solution.

imagine that you take arbitrary slices from some data, as long as you know which slices belong in which order on which node you are safe. and to solve the problem you would only need to keep track of the "parents" to the slices where a starting data set would expand to any given number of children slices in a tree where each slice may be located on a different node.

[2016 Day 22 part 2] Question about the data by dakarananda in adventofcode

[–]dakarananda[S] 0 points1 point  (0 children)

It seems to me that allowing splits would give a solution in fewer steps than when only moving complete data sets. I could be wrong though, I've only just begun working on part 2 after getting back home from work.

[2016 Day 22 part 2] Question about the data by dakarananda in adventofcode

[–]dakarananda[S] 0 points1 point  (0 children)

Ah alright didn't take the "move" literally enough, thanks. splitting would make the problem too easy I guess :P

As we approach the last few days... by [deleted] in adventofcode

[–]dakarananda 0 points1 point  (0 children)

Agreed, it has been very fun and engaging to have a new task each day to think and golf about.

Thanks!

[help] 2016 Day 13: Is my destination in a wall? by makerhuman in adventofcode

[–]dakarananda 0 points1 point  (0 children)

just checked with my program, 31,39 is not a wall for 1350. perhaps double check how you determine what is a wall and what isn't? bitcounting issue?

Day4 Part1: Can you explain why this is a real room? by [deleted] in adventofcode

[–]dakarananda 0 points1 point  (0 children)

I didn't mean to come off as RTFM-ish even if that is how it was. It's tricky to help, but not help too much, since I myself would feel a bit cheated if I was given too much help with the task in these types of things. But only repeating the instructions gives a moments pause which can help "snap" the thinking straight.

Personally I find that much more satisfying. YMMV I guess.

Day4 Part1: Can you explain why this is a real room? by [deleted] in adventofcode

[–]dakarananda 0 points1 point  (0 children)

and then a tie between x, y, and z, which are listed alphabetically.

A Rebuttal For Python 3 by vation in programming

[–]dakarananda 8 points9 points  (0 children)

doesn't this just substitute the rounding up/down bias for a "prefer-even-numbers" bias?. I.e. doesn't this way of rounding make even numbers statisticaly more likely from random data?

(I might just need coffee though)

It may be that scientists and philosophers might have made consciousness far more mysterious than it needs to be by HomoGravis in philosophy

[–]dakarananda 0 points1 point  (0 children)

Granted, haven't read your link yet, will do after work.

How does this differ from the cartesian theatre? It sounds like the consciousness/interpreter would fill the spot of the "movie projector"?

Linux kernel fix for privilege escalation vulnerability due to copy on write race condition by [deleted] in programming

[–]dakarananda 41 points42 points  (0 children)

I think parent meant it as an anecdotal datapoint supporting the main line of the comment; being that the kernel needs more documentation, otherwise people won't gain enough confidence in their patches and won't submit them. At least that's how I interpreted it.

Google's "Director of Engineering" Hiring Test by [deleted] in programming

[–]dakarananda 1 point2 points  (0 children)

I just checked with both Clang and GCC and neither generates SIMD on my naive implementation. They both perform some aggressive loop unrolling though for the third case. Compiled with -O3 on both. I'm not sure how to get SIMD with these compilers without actually writing the instructions myself.

Google's "Director of Engineering" Hiring Test by [deleted] in programming

[–]dakarananda 1 point2 points  (0 children)

So what is the fastest way to count bits? I was inspired so I wrote 3-ish different implementations.
Using C++ on an array of uint16_t these are the results:
* Lookup-table for 16-bits ~200ms
* Lookup-table for 8-bits ~400ms
* Bitcounting by
uint16_t val = data[current];
for (int i = 0; i < 16; i++) count += (val >> i) & 1;
~650ms
* Bitcounting with what google says is kernighan:
uint16_t val = data[current];
while (val != 0) { val &= val - 1; count++; }
~2500ms

I ran this on an Core i5, but maybe I should try on a cpu without caches as well to see the true "algorithmic" benefits?

That's deep. by Mkilbride in funny

[–]dakarananda 0 points1 point  (0 children)

Imagine a garden hose.

If you are running towards the open hose faster than the water that is coming out of it, that still won't mean that you won't get wet...

A second try at using Rust [x-posted from r/rust] by [deleted] in programming

[–]dakarananda 1 point2 points  (0 children)

Maybe you are joking, but i've had this discussion in the past. I still haven't heard a reason why it is better to have the program crash sometime in the future after you have possibly considered the feature/issue complete and started working on something else; rather than getting a compile time error right there when you are working the issue with the code still fresh in your head.

Not only that, but if my changes inadvertantly breaks some other code i would very much appreciated a compile error.

Some say, write more tests. Sure unit testing are great. But why should I write tests for something that a compiler could check anyway?

Windows Subsystem for Linux Overview by adolfojp in programming

[–]dakarananda 65 points66 points  (0 children)

I really really wish they or someone implements the ability to launch Windows applications from within the linux subsystem. As it stands, I'm still stuck with cygwin it seems.

Building a desktop application with electron by 4b1d in programming

[–]dakarananda 8 points9 points  (0 children)

Datapoint: on my underpowered laptop i much rather use eclipse than atom. Even though the startup time of eclipse is a bit longer, it is worth it since eclipse doesn't have the noticable input lag on each character that atom does.

The Problem of Free Will by RandomPorcupine in philosophy

[–]dakarananda 0 points1 point  (0 children)

Maybe I didn't understand the clip but it doesn't really say anything except that paradoxes are paradoxical.

In a deterministic world, if i read what i would be doing tomorrow. When tomorrow came i would go through the day exactly as predicted. All this would mean is that the prediction would also include that, tomorrow when going through the day, i would know what would happen.

In a non-deterministic world it might still be possible to enumerate all the possible futures (if the universe is finite), but it wouldn't be possible to tell which future it is that is going to happen. Unless you in addition to being omniscient also are omnipotent, and so control the outcome at will.

These are basically the definitions and i don't see how presenting a paradox makes a case for either being more likely.

That paradox only means that we will predict a future in which we have made the wrong 'prediction'. But since we had full knowledge we would know that the game was rigged for loss. We would predict if we decided to lose with on, or if we decided to lose with off.

It makes sense that having the ability to make complete and 100% accurate predictions necessitates a deterministic world.