#footgun — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #footgun, aggregated by home.social.
-
The footgun of right-to-left decorative characters
https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters
Comments: https://news.ycombinator.com/item?id=48813246
#HackerNews #footgun #righttoleft #decorativecharacters #cybersecurity #techblog
-
The footgun of right-to-left decorative characters
https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters
Comments: https://news.ycombinator.com/item?id=48813246
#HackerNews #footgun #righttoleft #decorativecharacters #cybersecurity #techblog
-
The footgun of right-to-left decorative characters
https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters
Comments: https://news.ycombinator.com/item?id=48813246
#HackerNews #footgun #righttoleft #decorativecharacters #cybersecurity #techblog
-
The footgun of right-to-left decorative characters
https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters
Comments: https://news.ycombinator.com/item?id=48813246
#HackerNews #footgun #righttoleft #decorativecharacters #cybersecurity #techblog
-
The footgun of right-to-left decorative characters
https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters
Comments: https://news.ycombinator.com/item?id=48813246
#HackerNews #footgun #righttoleft #decorativecharacters #cybersecurity #techblog
-
And appropriately enough, this photo also looks an awful lot like the map of the Straight of Hormuz we've all been looking at for the last three-and-a-half months.
-
And appropriately enough, this photo also looks an awful lot like the map of the Straight of Hormuz we've all been looking at for the last three-and-a-half months.
-
And appropriately enough, this photo also looks an awful lot like the map of the Straight of Hormuz we've all been looking at for the last three-and-a-half months.
-
And appropriately enough, this photo also looks an awful lot like the map of the Straight of Hormuz we've all been looking at for the last three-and-a-half months.
-
And appropriately enough, this photo also looks an awful lot like the map of the Straight of Hormuz we've all been looking at for the last three-and-a-half months.
-
Google is so fearful that another company will make its dominant position in search irrelevant that it decided to kill the golden goose itself and play on a new field where it no longer has a moat. Stupid MBA brain rot. (Yes, I read Clayton Christenson, too.) #FootGun #SpreadsheetJockeys
RE: https://bsky.app/profile/did:plc:uoxulaetdigublaslop63mvv/post/3mmh3gzjwmk2o -
-
You can try this in a terminal:
```
python -c "from unittest.mock import MagicMock; open(MagicMock(), 'w'); print(0)"
``` -
You can try this in a terminal:
```
python -c "from unittest.mock import MagicMock; open(MagicMock(), 'w'); print(0)"
``` -
You can try this in a terminal:
```
python -c "from unittest.mock import MagicMock; open(MagicMock(), 'w'); print(0)"
``` -
You can try this in a terminal:
```
python -c "from unittest.mock import MagicMock; open(MagicMock(), 'w'); print(0)"
``` -
You can try this in a terminal:
```
python -c "from unittest.mock import MagicMock; open(MagicMock(), 'w'); print(0)"
``` -
But why didn't the tests fail under pytest?
pytest wraps, substitutes or otherwise messes with `sys.stdout` enough that fd 1 being dead doesn't cause prints to fail.
The best part? The method that calls `shutil.copy` is called `_safe_copy`, but it doesn't check whether the values it receives are strings or `Path`s. So it happily passes a `MagicMock` along as the copy destination.
So yeah, test your tests, and if you call something safe make it at least careful.
-
But why didn't the tests fail under pytest?
pytest wraps, substitutes or otherwise messes with `sys.stdout` enough that fd 1 being dead doesn't cause prints to fail.
The best part? The method that calls `shutil.copy` is called `_safe_copy`, but it doesn't check whether the values it receives are strings or `Path`s. So it happily passes a `MagicMock` along as the copy destination.
So yeah, test your tests, and if you call something safe make it at least careful.
-
But why didn't the tests fail under pytest?
pytest wraps, substitutes or otherwise messes with `sys.stdout` enough that fd 1 being dead doesn't cause prints to fail.
The best part? The method that calls `shutil.copy` is called `_safe_copy`, but it doesn't check whether the values it receives are strings or `Path`s. So it happily passes a `MagicMock` along as the copy destination.
So yeah, test your tests, and if you call something safe make it at least careful.
-
But why didn't the tests fail under pytest?
pytest wraps, substitutes or otherwise messes with `sys.stdout` enough that fd 1 being dead doesn't cause prints to fail.
The best part? The method that calls `shutil.copy` is called `_safe_copy`, but it doesn't check whether the values it receives are strings or `Path`s. So it happily passes a `MagicMock` along as the copy destination.
So yeah, test your tests, and if you call something safe make it at least careful.
-
But why didn't the tests fail under pytest?
pytest wraps, substitutes or otherwise messes with `sys.stdout` enough that fd 1 being dead doesn't cause prints to fail.
The best part? The method that calls `shutil.copy` is called `_safe_copy`, but it doesn't check whether the values it receives are strings or `Path`s. So it happily passes a `MagicMock` along as the copy destination.
So yeah, test your tests, and if you call something safe make it at least careful.
-
Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutilm = MagicMock()
m.__fspath__.__index__() # → 1shutil.copy(filename, m)
[errors omitted]print(1) # → OSError: [Errno 9] Bad file descriptor
```Much head scratching!
-
Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutilm = MagicMock()
m.__fspath__.__index__() # → 1shutil.copy(filename, m)
[errors omitted]print(1) # → OSError: [Errno 9] Bad file descriptor
```Much head scratching!
-
Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutilm = MagicMock()
m.__fspath__.__index__() # → 1shutil.copy(filename, m)
[errors omitted]print(1) # → OSError: [Errno 9] Bad file descriptor
```Much head scratching!
-
Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutilm = MagicMock()
m.__fspath__.__index__() # → 1shutil.copy(filename, m)
[errors omitted]print(1) # → OSError: [Errno 9] Bad file descriptor
```Much head scratching!
-
Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutilm = MagicMock()
m.__fspath__.__index__() # → 1shutil.copy(filename, m)
[errors omitted]print(1) # → OSError: [Errno 9] Bad file descriptor
```Much head scratching!
-
okay so: omemo sucks?
https://github.com/dino/dino/issues/850
this is basically the same story I've heard everywhere omemo is used: it's extremely hostile towards anyone who wants to back up their messages. forgetful? have multiple computers? fuck you I guess.
I like XMPP overall but I'm going to be telling all my friends "oh yeah turn that off for any message you don't want to lose forever"
#xmpp #omemo #wtf #footgun -
okay so: omemo sucks?
https://github.com/dino/dino/issues/850
this is basically the same story I've heard everywhere omemo is used: it's extremely hostile towards anyone who wants to back up their messages. forgetful? have multiple computers? fuck you I guess.
I like XMPP overall but I'm going to be telling all my friends "oh yeah turn that off for any message you don't want to lose forever"
#xmpp #omemo #wtf #footgun -
okay so: omemo sucks?
https://github.com/dino/dino/issues/850
this is basically the same story I've heard everywhere omemo is used: it's extremely hostile towards anyone who wants to back up their messages. forgetful? have multiple computers? fuck you I guess.
I like XMPP overall but I'm going to be telling all my friends "oh yeah turn that off for any message you don't want to lose forever"
#xmpp #omemo #wtf #footgun -
okay so: omemo sucks?
https://github.com/dino/dino/issues/850
this is basically the same story I've heard everywhere omemo is used: it's extremely hostile towards anyone who wants to back up their messages. forgetful? have multiple computers? fuck you I guess.
I like XMPP overall but I'm going to be telling all my friends "oh yeah turn that off for any message you don't want to lose forever"
#xmpp #omemo #wtf #footgun -
okay so: omemo sucks?
https://github.com/dino/dino/issues/850
this is basically the same story I've heard everywhere omemo is used: it's extremely hostile towards anyone who wants to back up their messages. forgetful? have multiple computers? fuck you I guess.
I like XMPP overall but I'm going to be telling all my friends "oh yeah turn that off for any message you don't want to lose forever"
#xmpp #omemo #wtf #footgun -
Python Path is great. Until it isn't.
Don't try this at home.
remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")The result is disastrous, as it it is:
ssh homeserver rm -rf /*
Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.
It should have been remotePath / "*" or, even saner, just remotePath.
-
Python Path is great. Until it isn't.
Don't try this at home.
remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")The result is disastrous, as it it is:
ssh homeserver rm -rf /*
Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.
It should have been remotePath / "*" or, even saner, just remotePath.
-
Python Path is great. Until it isn't.
Don't try this at home.
remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")The result is disastrous, as it it is:
ssh homeserver rm -rf /*
Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.
It should have been remotePath / "*" or, even saner, just remotePath.
-
Python Path is great. Until it isn't.
Don't try this at home.
remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")The result is disastrous, as it it is:
ssh homeserver rm -rf /*
Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.
It should have been remotePath / "*" or, even saner, just remotePath.
-
Python Path is great. Until it isn't.
Don't try this at home.
remotePath = Path("data", "stuff")
pbexec("ssh", HOST, "rm", "-rf", remotePath / "/*")The result is disastrous, as it it is:
ssh homeserver rm -rf /*
Not run as root, the server's installed software was not accessible, but it proceeded to my home directory before I could stop it and made a mess of it. Luckily nothing terminally lost.
It should have been remotePath / "*" or, even saner, just remotePath.
-
Zig needs to add a hard copiler error for using spaces for indentation instead of tabs, because it is a #footgun to use a non-flexible indentation, and also for writing too many comments in one place because if you can't read the code to understand, you already have too many #footguns , and you are a bad programmer, and you have to stop programming, as we have stated in zig zen "Focus on code rather than style.
", this is not about style. #zig #ziglang #Zigtools #programming #codestyle -
Zig needs to add a hard copiler error for using spaces for indentation instead of tabs, because it is a #footgun to use a non-flexible indentation, and also for writing too many comments in one place because if you can't read the code to understand, you already have too many #footguns , and you are a bad programmer, and you have to stop programming, as we have stated in zig zen "Focus on code rather than style.
", this is not about style. #zig #ziglang #Zigtools #programming #codestyle -
Zig needs to add a hard copiler error for using spaces for indentation instead of tabs, because it is a #footgun to use a non-flexible indentation, and also for writing too many comments in one place because if you can't read the code to understand, you already have too many #footguns , and you are a bad programmer, and you have to stop programming, as we have stated in zig zen "Focus on code rather than style.
", this is not about style. #zig #ziglang #Zigtools #programming #codestyle -
Zig needs to add a hard copiler error for using spaces for indentation instead of tabs, because it is a #footgun to use a non-flexible indentation, and also for writing too many comments in one place because if you can't read the code to understand, you already have too many #footguns , and you are a bad programmer, and you have to stop programming, as we have stated in zig zen "Focus on code rather than style.
", this is not about style. #zig #ziglang #Zigtools #programming #codestyle -
I love variadic template arguments until ... #footgun. #cpp #metaprogramming
-
I love variadic template arguments until ... #footgun. #cpp #metaprogramming
-
I love variadic template arguments until ... #footgun. #cpp #metaprogramming
-
I love variadic template arguments until ... #footgun. #cpp #metaprogramming
-
I love template #metaprogramming in #C++ but am constantly afraid of #footgun.
-
I love template #metaprogramming in #C++ but am constantly afraid of #footgun.
-
I love template #metaprogramming in #C++ but am constantly afraid of #footgun.
-
I love template #metaprogramming in #C++ but am constantly afraid of #footgun.
-
Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?
https://www.cnn.com/2025/08/06/tech/apple-investment-us-trump
100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.
Where's that Trump-pissing-into-a-fan meme when you need it...
#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU
-
Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?
https://www.cnn.com/2025/08/06/tech/apple-investment-us-trump
100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.
Where's that Trump-pissing-into-a-fan meme when you need it...
#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU
-
Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?
https://www.cnn.com/2025/08/06/tech/apple-investment-us-trump
100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.
Where's that Trump-pissing-into-a-fan meme when you need it...
#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU
-
Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?
https://www.cnn.com/2025/08/06/tech/apple-investment-us-trump
100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.
Where's that Trump-pissing-into-a-fan meme when you need it...
#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU
-
Guess who's about to discover that #microprocessors (and other chips, of course) are in ... well, virtually everything these days?
https://www.cnn.com/2025/08/06/tech/apple-investment-us-trump
100% tariff on imported chips will double manufacturers' costs for what is the most expensive component of many products. Cars have dozens-to-hundreds of MCUs in them now, and effectively none of them are made in the USA.
Where's that Trump-pissing-into-a-fan meme when you need it...
#tariff #moron #MangoMussolini #OrangeUtan #FootGun #trade #tech #CPU
-
TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (https://www.jerf.org/iri/post/2957/ argues this and has details).
But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.
This can make:
if (x != nil) { x.Foo() }
cause a segfault (inside Foo) because it gets called with a nil pointer (full code: https://go.dev/play/p/2SeoJj2Go_l)
Anyone know the rationale behind this #footgun?
-
TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (https://www.jerf.org/iri/post/2957/ argues this and has details).
But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.
This can make:
if (x != nil) { x.Foo() }
cause a segfault (inside Foo) because it gets called with a nil pointer (full code: https://go.dev/play/p/2SeoJj2Go_l)
Anyone know the rationale behind this #footgun?
-
TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (https://www.jerf.org/iri/post/2957/ argues this and has details).
But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.
This can make:
if (x != nil) { x.Foo() }
cause a segfault (inside Foo) because it gets called with a nil pointer (full code: https://go.dev/play/p/2SeoJj2Go_l)
Anyone know the rationale behind this #footgun?
-
TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (https://www.jerf.org/iri/post/2957/ argues this and has details).
But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.
This can make:
if (x != nil) { x.Foo() }
cause a segfault (inside Foo) because it gets called with a nil pointer (full code: https://go.dev/play/p/2SeoJj2Go_l)
Anyone know the rationale behind this #footgun?
-
TIL that #golang interfaces have two different nil values (typed and untyped nil). This is a bit confusing, but I can see the value (https://www.jerf.org/iri/post/2957/ argues this and has details).
But I do not understand the language designers chose to make the "contains a typed nil" case not equal to nil.
This can make:
if (x != nil) { x.Foo() }
cause a segfault (inside Foo) because it gets called with a nil pointer (full code: https://go.dev/play/p/2SeoJj2Go_l)
Anyone know the rationale behind this #footgun?
-
And today, while peeling the #disaster #recovery onion, I found that I had a mild case of self-inflicted #footgun that went unnoticed for months because I didn’t read a certain bit of vendor documentation that I didn’t know about until today because of a link in another vendor’s documentation.
The fix is not difficult. Many (two? three?) new stories are about to spawn as a result of this discovery.