WTF Bites
-
@Tsaukpaetra said in WTF Bites:
#if defined DebugHelperDisable
Are the parenthesis optional? I've always written this as:
#if defined(DebugHelperDisable)
-
@coldandtired said in WTF Bites:
Some time ago I set up a team at bitbucket.org, adding myself as the sole member.
Yesterday I decided this makes things more difficult for me so I deleted the team.
Today I noticed I'm still a member, and the test project and repo I added are still on my dashboard.
However, as the only way to manage anything is to first go to the relevant team/project/repo (which all 404) and click the buttons, there seems to be no way to fix this :(
In fairness to Atlassian, the support guy did fix my account pretty quickly after I reported it. Not sure if the original problem is fixed, though.
-
I'm trying to maximize a video but the task bar stays in front of it.
What the fuck. Why do basic things go wrong so often in Windows?
-
@anonymous234 said in WTF Bites:
I'm trying to maximize a video but the task bar stays in front of it.
What the fuck. Why do basic things go wrong so often in Windows?
Because that's how the taskbar is designed? You're not supposed to cover it. You're supposed to just use the workspace area. (or set the taskbar setting to auto hide)
-
@anonymous234 said in WTF Bites:
I'm trying to maximize a video but the task bar stays in front of it.
That's the definition of maximize more or less. You want to find the full screen button.
@anonymous234 said in WTF Bites:
What the fuck. Why do basic things go wrong so often in Windows?
They do, but either you're using words wrong or this isn't an example of one.
-
@anonymous234 said in WTF Bites:
I'm trying to maximize a video but the task bar stays in front of it.
What the fuck. Why do basic things go wrong so often in Windows?
Stop focusing on other apps when fullscreen.
-
@anonymous234 Set the taskbar to autohide.
-
Uninstalling a VPN app that seems fixated on its name
-
@coldandtired I like the thin dotted outline around the title… Apparently a lot of care went into this.
-
@coldandtired I can, however, install a bear in the dev offices. Preferably a mother with cubs. And then block all the exits until nature has run its course. Because anyone who thinks that software should be "cute" deserves a bear mauling.
-
@Atazhaia
Oh, come on, just bear with them. I'm sure after you hibernate on it, you'll find it funny.
-
@izzion is so tempting right now...
-
@Atazhaia
Yeeeeeeesssss! Feel the downboat running through you! Channel the power of the pun side!
-
-
@Zerosquare
Does it take an hour to be able to crack the shell so you can cook them?
-
@Zerosquare I'm not sure but isn't tracability actually one of the things a blockchain is good for?
-
@Rhywden I dunno if you meant traceability or trackability. But either way, they came out of a chicken's asshole.
-
@Zerosquare I'm not sure but isn't tracability actually one of the things a blockchain is good for?
Except when the whole concept is bollocks, yes. Unless you start taking shortcuts, like omitting whole parts of the supply chain...
Salient details, but I'd recommend reading the entire thing for those interested:
it’s impossible – impossible I tell ya! – to properly map a modern supply chain.
One mineral that has to be checked for is wolframite, a source of tungsten. Tungsten is used to harden steel, among other things. Steel is used to make the blades in pencil sharpeners. The demand is actually that someone who imports a dozen or two Chinese pencil sharpeners to sell upon e-Bay needs to be able to track the steel production back to which source of tungsten they used – and to make sure that it’s not from certain mines in DR Congo. This is not a level of knowledge of the economy that anyone at all has. Nor is it a desirable one.
-
@Tsaukpaetra said in WTF Bites:
#if defined DebugHelperDisable
Are the parenthesis optional? I've always written this as:
#if defined(DebugHelperDisable)
They are optional for something this simple. But if you have a more complicated define, then parentheses are necessary to group things together properly. For example:
#define a 1 #define b 2 #define c 3 #define d 4 #define multiply(a,b) (a*b) /* without parentheses */ #define e multiply(d-a,c-b) /* e is defined here as the unexpected result of 4-1*3-2 = 4-3-2 = -1 */ #define multiply(a,b) ((a)*(b)) /* with parentheses */ #define e multiply(d-a,c-b); /* e is (re-)defined here as the expected result of (4-1)*(3-2) = 3*1 = 3 */
However, I think it doesn't make a difference for an
#if defined
preprocessor conditional, because that takes only one parameter.
-
const a: i32 = 1; const b: i32 = 2; const c: i32 = 3; const d: i32 = 4; macro_rules! product { ($a:expr, $b:expr) => { $a * $b } } macro_rules! e { () => { product!(d - a, c - b) } } fn main() { println!("{}", e!()); }
Output: 3
-
@pie_flavor Is that Rust? It's not using the relevant preprocessor rules from C, which are what I was demonstrating.
-
@djls45 Yes, it is.
-
@Zerosquare I'm not sure but isn't tracability actually one of the things a blockchain is good for?
And yet the postal services can track your package without a retarded blockchain. Granted, the truck driver will probably lie on it, but blockchain isn't going to stop that.
-
@pie_flavor Why does it have Perl $igils?
-
@topspin It distinguishes the placeholders, so the pattern can contain identifiers that work like keywords in the macro arguments.
In Rust, the macros are intended to be used, among other things, for embedding domain specific languages, so the macro argument is very flexible. It basically only has to be properly parenthesised and is tokenised using the usual rules. And then the patterns say how to parse it.
-
@pie_flavor said in WTF Bites:
Output: 3
... I'm sure you had some kind of point to make with this post... Maybe that Rust syntax is ugly?
-
@anotherusername said in WTF Bites:
@Rhywden I dunno if you meant traceability or trackability. But either way, they came out of a chicken's asshole.
Kind of. Sort of. Not really. (Since the cloaca can't be used as an asshole when it's being used for laying, IIRC.)
-
e is (re-)defined here
No, it is initially defined. Which throws a compiler error because it has already been defined. I think redefines aren't a thing and you need to explicitly undefine.
-
@heterodox said in WTF Bites:
@anotherusername said in WTF Bites:
@Rhywden I dunno if you meant traceability or trackability. But either way, they came out of a chicken's asshole.
Kind of. Sort of. Not really. (Since the cloaca can't be used as an asshole when it's being used for laying, IIRC.)
Not at the same time. Regardless, eggs don't come out clean.
-
@Zerosquare I'm not sure but isn't tracability actually one of the things a blockchain is good for?
Until farmers figure out they can just swap the barcode stickers on the box of carrots.
"Traceability" in the database isn't the problem; the problem is the hundreds of people at the farm, auction house, trucking company who all have access to it, any one of whom can switch boxes.
-
@PJH Good article, surprised it doesn't mention the easier example of all the US clothing companies that have always had this huge effort to prevent child labor, and yet none of them have any idea where their clothes come from, and every few years like clockwork there's a new "discovery" of child labor being used for The Gap or whatever.
-
e is (re-)defined here
No, it is initially defined. Which throws a compiler error because it has already been defined. I think redefines aren't a thing and you need to explicitly undefine.
No, it gives a warning‡ that the redefinition is not the same as the original, but it will still make the macro use the new definition.
‡ Unless you have the compiler flag set to treat warnings as errors.
-
There's an infamous app here in Poland for parents and schools to interact. It's well known for being god-awful and greedy software.
Today I got a message that the company's interpretation of GDPR means that I'm not allowed to access both of my kids' accounts at the same time, and must log out and back in to switch between them.
-
@ixvedeusi said in WTF Bites:
@pie_flavor said in WTF Bites:
Output: 3
... I'm sure you had some kind of point to make with this post... Maybe that Rust syntax is ugly?
No, just that Rust uses sensible macros instead of drag and drop string replacement.
-
@coldandtired said in WTF Bites:
There's an infamous app here in Poland for parents and schools to interact. It's well known for being god-awful and greedy software.
That is not unique to that app. It's generally taken for granted that all educational technology ever, save for that made by Google, is absolute garbage.
-
@pie_flavor said in WTF Bites:
@coldandtired said in WTF Bites:
There's an infamous app here in Poland for parents and schools to interact. It's well known for being god-awful and greedy software.
That is not unique to that app. It's generally taken for granted that all educational technology ever, save for that made by Google, is absolute garbage.
Even google's software is only mostly garbage.
Educational software (and textbooks, and hardware, and ...) is awful. In part because it caters to huge organizations (seriously, my local school district has ~250k students across 250 schools, with 25k staff) that make purchasing decisions at the highest levels. For that matter, Texas buys textbooks at the state level. And most of these contracts are done by non-competitive bidding.
-
@pie_flavor said in WTF Bites:
That is not unique to that app. It's generally taken for granted that all educational technology ever, save for that made by Google, is absolute garbage.
I can confirm.
Microsoft makes a bunch of plugins (at least 10) to integrate Office365 in Moodle and it's total garbage
-
@pie_flavor That's likely true. This one is doubly so because it contains microtransactions for parents (after presumably already being bought by the school).
-
-
@coldandtired said in WTF Bites:
There's an infamous app here in Poland for parents and schools to interact. It's well known for being god-awful and greedy software.
Today I got a message that the company's interpretation of GDPR means that I'm not allowed to access both of my kids' accounts at the same time, and must log out and back in to switch between them.
Can you run two separate browser sessions to have them both open at the same time?
And then sue them for their violation of GDPR according to their own interpretation of it?
-
@coldandtired said in WTF Bites:
This one is doubly so because it contains microtransactions for parents
Your child got an F in math. Buy a loot-box for only $49.99 and you may find a B+ in it
-
None of that 'the requirement designation option has been set to yes' shit this year, they've streamlined the interface.
-
@TimeBandit: I'm pretty sure someone must be already doing that, except probably a bit more subtly: "Does your child need help in maths? Click here to know more about school support options we can offer."
-
@pie_flavor said in WTF Bites:
@ixvedeusi said in WTF Bites:
@pie_flavor said in WTF Bites:
Output: 3
... I'm sure you had some kind of point to make with this post... Maybe that Rust syntax is ugly?
No, just that Rust uses sensible macros instead of
drag and dropcopy-paste string replacement....for varying perceptions of "sensible." (And drag-and-drop is a move operation, not duplicate.)
C's preprocessor is a preprocessor, which means it runs before the compiler.
Lambdas, inline functions, and other such kinds of macros in other languages are handled by the compiler.
Can Rust's macro system handle variable name concatenation?
-
@djls45 Yes, it can. There's a macro for it (although it's currently in nightly).
fn xy() { println!("Hello world!") } fn main() { concat_idents!(x, y)() }
-
WTF of my day The chemistry lab got a new SmartScreen (you know, one of those huge displays you can also write on). It's 4K, the speakers are nice, has an included Android OS for basic functionality, a lot of HDMI connectors (including an ARC one) and an OPS slot where currently a PC with an i5, 8 GB of RAM and 128 GB SSD resides.
Everything worked fine yesterday. I merely forgot to remove my USB drive from the PC while rebooting - said USB drive contains a bootable Win10 installation medium which the PC then promptly booted into.
Okay, no worries, right, you simply reboot without the stick? Yeah, no. Their UEFI implementation for some reason decided that this was grounds for extermination (i.e. "Please enter valid boot medium!"). This, for once, is not the fault of Windows - I mean, until you actually select anything in the installer, nothing happens (and I actually reproduced it by experimentally booting from a USB drive with a Linux image...)
I also cannot turn off boot from USB - there is an option to "Select Boot Order" but it contains nothing. Figures.Also, they have an included pen for their digitizer which connects to the screen via Bluetooth, is recharged by a slot in the side and has some extra functionality (akin to the Surface pens) like switching to eraser by simply turning it around.
However, said pen now activates the screen when it's still 4 cm away from the surface. This means that I can write by literally waving it like a magic wand. That's nice.
But if you pay attention to the way you usually write stuff you'll notice that if you switch from one word to the next you usually don't move the pen away from the surface more than 4 cm.Support has no clue why either happened.
Okay, writing with you fingers works as well but that's not so great over a longer period of time for various reasons.
So we're now using a pen from a SMARTboard (oh the irony!). While it doesn't have the pressure sensitivity or secondary functions, it does only write when actually touching the screen...
-
@heterodox said in WTF Bites:
@anotherusername said in WTF Bites:
@Rhywden I dunno if you meant traceability or trackability. But either way, they came out of a chicken's asshole.
Kind of. Sort of. Not really. (Since the cloaca can't be used as an asshole when it's being used for laying, IIRC.)
It's still the same hole.
-
@Zerosquare said in WTF Bites:
Hah, I still have one of those somewhere in a box. It's even in a fancy aluminium chassi, entirely without fans.
-
However, said pen now activates the screen when it's still 4 cm away from the surface. This means that I can write by literally waving it like a magic wand.
Use it to convince your students you have magic powers.
-
tokenised using the usual rules
So nothing actually all that exotic?
There have been programming languages where “usual rules” tokenising won't work at all. It's not my fault that people have written horrible FORTRAN, PL/1 and MUMPS… and some of the functional languages have “interesting” rules on how to group non-letter sequences.