• 1 Post
  • 140 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle





  • C++:

    int i = 5;
    i ^= printf("The initial value of i is %d\n", i)^
    printf("i=i+1; // this increments i\n")^
    printf("Trigger very obscure FPU bug %c",(int)((float)8.5953287712*(double)8.5953287713-'?'))/10;
    printf("i has now been incremented by 1 : %d\n", i);
    

    Output:

    The initial value of i is 5  
    i=i+1; // this increments i  
    Trigger very obscure FPU bug  
    i has now been incremented by 1 : 6
    

    I didn’t test other values but they’re probably OK.


  • Instead of dropping a system on her that she can’t/won’t use, try asking her what she wants to do. You can explain why passwords need to be different, but you can simplify it by sharing passwords across sites that don’t matter. So someone gets her BBC password and finds they can also use it on the Daily Fail, whoop-de-doo. Different pw for the bank.

    Simplify your own life. You have to do free tech support for your Mum, and to be fair she changed your nappies for years, but everyone else is expected to trade, especially if they expect you to pay for their services when you need them.

    Of course tinkering with something makes it your fault any time anything goes wrong, and the lesson we learn from that is …?


  • Well don’t write 600 lines of code without hitting compile then! You’re not writing an essay that has to be handed in once.

    The only time I ever “write” more than a few 10s of lines at a time (dev since the 1970s, pro since 1991) is when I’m scaffolding a new application with a code generator, and that usually compiles first time. And source control is revolutionary. Check in stuff that works, then no matter how bad things get you can always just roll back to the last good commit. Unpicking the last few hours without source control is horrible. Been there, done that way too many times.

    And even when you do get 700 errors just look at the first few. The rest are most likely junk caused by the compiler not being able to resynchronise with the remainder of the code.








  • Couples can do different things at the same time. It doesn’t mean the relationship is over, on the contrary it means you’re both comfortable with the other being independent. If you both like Chinese and Mexican, have Chinese this time and Mexican next. Or as you say, order from two different places. If you always have Mexican then she’s getting her way all the time which isn’t meeting halfway.

    Women do seem to like showing of their husbands. So you’ll need to go places with her sometimes, providing that you also get some restful weekends at home where she is either present or off with her girlfriends somewhere. If you don’t ever want to do stuff with her then she’s right to be concerned: why did you get together if you don’t actually want to be together?

    Where to draw the line: I’d suggest keeping count. If you compromise all the time and she never does, then that would suggest something of a lopsided relationship. But as others have said, you don’t want to count everything otherwise you’ll be the asshole.




  • how does housing come into being?

    Well one “simple” way is for all the builders to be rolled up into the civil service: the government pays them to do their job, i.e. build houses, which the government then owns and allows people to live in. This must necessarily be rent-free, otherwise the government becomes one massive landlord therefore not solving the problem, and also takes the bottom out of the mortgage market because why would anyone buy when they can just move into government-provided housing without a 25-year millstone tied round their necks. It also creates a ton of job security because it means you can just walk away from a shitty employer without fear of becoming homeless.

    It also drops anyone with a mortgage into the worst possible negative equity problem, which will be a massive problem for a massive number of people, therefore has zero chance of ever being voted in. So for this to work there has to be a solution to the mortgage problem, e.g. the government buys all that housing stock for the current outstanding mortgage amount, but that’s a massive investment into something that now necessarily has zero value, which would likely crash the economy. IANAE so it’d be interesting to get a real economist’s view on how this might all work in practice.



  • Yes of course. Nobody wants someone walking the streets who thinks it’s their right to dish out the death penalty without due process. Who’s he going to pick next?

    That said, obviously with limited resources the police have to pick what cases take priority over others. For example Sheffield police don’t do anything about motorbike theft (even if there’s a tracker installed) because they’re too busy chasing down all those people who hurt others’ fee-fees by misgendering them.