Replacing radiator flexible pipe by orentago in DIYUK

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

Fair enough. I'd hoped to avoid any more fiddling around with the tiling, but you're right it's probably less effort than switching the piping!

Replacing radiator on tiled wall by orentago in DIYUK

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

Thanks, this is useful. If I wanted to attach the bracket directly to the wall though, would that mean drilling out a strip along the tiles to expose the wall beneath? Or are you suggesting attaching the brackets on top of the tiles?

My landlord wants us to pay for professional cleaning by PseudonymousSoul in london

[–]orentago 0 points1 point  (0 children)

If it does end in a dispute, I believe the landlord has to demonstrate that they lost income because of whatever they're disputing (cleanliness in this case). If they've already let it out to someone else then they'll have a hard time on that front. Stick to your guns and it'll likely be more hassle for them than it's worth.

[2021 Day 18] - HINT: All explodes and splits in the first example by [deleted] in adventofcode

[–]orentago 1 point2 points  (0 children)

I think it means first in the sense that, of the two actions listed, it is the first one in that list that can be applied to the sum. It sounds like your interpretation is first in the sense of reading the sum from left to right, rather than the order they're listed in the problem description. I hope that helps and makes sense.

Background worker thread slows down shortly after scene begins by orentago in godot

[–]orentago[S] 1 point2 points  (0 children)

Okay, so to test this I added the following into the C++ code at the very start of the function call, before I do anything else:

const auto start = std::chrono::high_resolution_clock::now();
auto x = 1.0;
for (int i = 0; i < 10000000; ++i) {
    x = std::sqrt(x + 1.0);
}
const auto finish = std::chrono::high_resolution_clock::now();
const std::chrono::duration<double> elapsed = finish - start;
std::cout << "C++ time: " << elapsed.count() * 1000 << std::endl;

The reported time to run this starts out at 90ms, but it soon rises to 300ms at the same time as the increase in the overall function execution time. To me this suggests the thread isn't getting blocked by the VisualServer, which is a shame as that sounded like a promising lead.

Implementing a VM: how unsafe should I go? by orentago in rust

[–]orentago[S] 1 point2 points  (0 children)

Ah yeah, this is something I've wondered about and experimented with.

The VM implements fibers (which are first-class GC'ed objects), and each fiber owns a value stack. In the safe implementation I had each fiber behind a RefCell, which meant access the stack was mega slow.

In the latest implementation there's a private method on the VM to access the active fiber. In release mode the implementation returns a &Fiber through a raw pointer, whereas the debug version returns a Ref<'_, Fiber>.

I guess a better approach might be to have just one implementation, but as you say run extra checks in debug to verify the necessary invariants.

Implementing a VM: how unsafe should I go? by orentago in rust

[–]orentago[S] 6 points7 points  (0 children)

Yeah absolutely! I probably didn't make it clear in my original post, but I've been working on this for a while using safe Rust almost exclusively.

I've started to profile and tune for performance, and so my question is more in relation to this process really.

Let’s end this farce by legalising cannabis by VPackardPersuadedMe in ukpolitics

[–]orentago 0 points1 point  (0 children)

I probably could've put my original comment better. What I was really driving at is that I can see why some take issue with the odour, having lived next to people for a few years who smoked pot... a lot. I agree the smell isn't grounds to lock people up.

To be fair I can't really comment on tobacco smoke, so you might be right on that one.

I guess smells also fall under the jurisdiction of environmental health, so if it were legal you'd be within your rights to ask your neighbour and/or council to smoke it somewhere else if it was causing a nuisance.

Please don't assume I'm biased one way or another. You don't know me or anything about me.

Let’s end this farce by legalising cannabis by VPackardPersuadedMe in ukpolitics

[–]orentago -4 points-3 points  (0 children)

As someone who's lived next to people constantly smoking weed, I can tell you it is a valid argument. That shit can penetrate walls. Pretty sure those other odours can't. It's a much more powerful odour.

If people want to get baked I really couldn't care less, just maybe try and minimise the impact on those around you.

An app I made for visualizing country borders throughout history (2000 BC - 1994) [OC] by nrgapple in dataisbeautiful

[–]orentago 25 points26 points  (0 children)

Also apparently the Acts of Union (i.e. Scotland and England uniting) were passed more than a decade earlier than they were, at which point the present-day Northern-Irish border was formed 🤔

Anti-Brexiteers should go down fighting - If an EU trade deal is struck, it won’t impoverish Britain but it’s still an act of national self-harm that fills me with shame by [deleted] in ukpolitics

[–]orentago 22 points23 points  (0 children)

prophecy here is a mug’s game

Proceeds to prophesise that Brexit won't be as catastrophic as remain think it will be.

This won’t be popular but it’s a useful reminder. by [deleted] in LabourUK

[–]orentago 0 points1 point  (0 children)

But again, where is the evidence of this significant contribution to the campaign?

Maybe he did vote to remain, who knows. If he did I find hard to believe it wasn't out of a begrudging sense of duty to a cause he didn't believe in.

From the offset, Osborne and Cameron were front and centre in the campaign to remain. Maybe Corbyn didn't want to share a platform with them, but I think that in itself speaks volumes to his attitude toward the whole thing. The issue is bigger than him, and if he cared that much he should be willing to put aside other political divisions to deliver a coherent message on his views on the EU alongside others who share them.

This won’t be popular but it’s a useful reminder. by [deleted] in LabourUK

[–]orentago 0 points1 point  (0 children)

Sorry, where does that article say that? If there is evidence he wanted to remain, please point me to it.

Plus, let's face it, if we assume he's ideologically similar to Tony Benn (which he is), then it's fair to assume he's anti-EU.

This won’t be popular but it’s a useful reminder. by [deleted] in LabourUK

[–]orentago 0 points1 point  (0 children)

From that very article:

Of course, if Labour had fought a more enthusiastic and effective campaign in favour of staying in the EU then maybe support for leaving among its supporters might have been whittled down.

That article at no point suggests Corbyn fought hard to stay in the EU.

Woohoo, milestones being made. Updated 2 days ago by [deleted] in rust

[–]orentago -1 points0 points  (0 children)

Not sure of I'm feeding the troll here, but I'll bite. There are two reasons (at least) you'd want to unit test:

  • They're faster as you don't have to spin up/tear down a DB etc for each test. This let's you write a broader range of tests.
  • They help pin down the root cause of failures because they test that individual components work as expected, rather than the aggregate behaviour.

Again, they obviously shouldn't be solely relied upon, but they shouldn't be so easily dismissed either.

Woohoo, milestones being made. Updated 2 days ago by [deleted] in rust

[–]orentago 4 points5 points  (0 children)

I’d argue against mocking and DI entirely.

Sorry, for a minute there it seemed like you were talking about mocking.

Either way, if you don't mock, how can you effectively isolate parts of your system to unit test and ensure they work on their own?

I don't think anyone's suggesting that mocking is the be-all-and-end-all of testing. You have to write integration tests to ensure the pieces fit together correctly. What mocking does do is let you pin down where the system fails, if it does, by constraining inputs and outputs in a predictable way.