• 0 Posts
  • 11 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle


  • I understand the idea. But many people have hugely mistaken beliefs about what the C[++] languages are and how they work. When you write ADC EAX, R13 in assembly, that’s it. But C is not a “portable assembler”! It has its own complicated logic. You might think that by writing ++i, you are writing just some INC [i] ot whatnot. You are not. To make a silly example, writing int i=INT_MAX; ++i; you are not telling the compiler to produce INT_MIN. You are just telling it complete nonsense. And it would be better if the compiler “prevented” you from doing it, forcing you to explain yourself better.







  • I wanted to publish a tiny utility I created to GitHub (you know, it might be useful to someone else…). Before that, I wanted to some cleanup, rebasing/squashing a bit, etc. In the middle of that:

    $ git checkout featurebranch
    The following untracked working tree files would be overwritten by checkout:
    .gitignore
    .idea/…
    etc...
    

    Oh, sure, no problem…

    $ rm -rf * .*
    $ git checkout featurebranch
    fatal: not a git repository (or any of the parent directories): .git
    

    D’oh! (Never mind, it probably wouldn’t have been useful to anyone else, anyway.)