25 ms·
> love 1s *!(not= atoi(let Probably my all time favourite C fragment.
by karatinversion 6y ago
> love 1s *!(not= atoi(let
Probably my all time favourite C fragment.
- bqmjjx0kac 6y agoA close second for me is goto hell;
- koolba 6y agoWhen I first read Perl I was convinced all its advocates had some deep seated emotional problems. They kept insisting that the program would perform an action “or die”.
- jerf 6y agoIf you turn strict off, you can have doIt() or die screaming as literal code.
- kbenson 6y agoIf you make a screaming sub, that doesn't even require foregoing strict: $ perl -E 'use strict; use warnings; sub screaming { "SCREAM" } sub doIt { 0 } doIt or die screaming' SCREAM at -e line 1. Hell, we can go full English if we want: $ perl -E 'use strict; use warnings; sub screaming {"SCREAM"} sub it {0} sub do {0} do it or die screaming' SCREAM at -e line 1. For those following along that aren't quite as familiar with Perl, that's a statement "do it or die screaming" which is all completely valid, strict and well defined Perl. When not a one-liner, it would be: use strict; use warnings; sub screaming {"SCREAM"} sub it {0} sub do {0} do it or die screaming
- ak217 6y agoToday git informed me that it "could not detach HEAD" and refused to merge my work with that of my colleagues.
- Falkon1313 6y agoBetter than when it does detach your head. There seem to be about 77 different ways that can happen and 573 different ways to fix it, and if you do the wrong one, then everything's screwed for everyone, and the history log is useless or obliterated; there's no undo. If you haven't flogged it enough, you can try to reflog it, but really the only safe thing to do is kill the clone, birth a new clone, and start over.
- IgorPartola 6y agoDid you forget to grep your man for release?
- hn_throwaway_99 6y agoAgreed! But I'm confused, how does the "1s" work? Is that some kind of old-school definition of a short int literal?
- karatinversion 6y agoExactly. TFA has a bit more detail.
- blake1 6y agoNot that old-school. It’s not depreciated or anything.
- skykooler 6y agoIt is old-school, and while it's not technically deprecated that's only because it never made it into the C standard in the first place.