@UnrelatedString No, but if you know roughly how big certain variables are likely to be relative to one another, by changing how quickly they grow relative to another you can really improve the average case
For backups, would y'all recommend an HDD (cheaper, might last longer in storage) or an SSD (wayyy faster)? Trying to decide between a SanDisk Extreme Pro, which would make backing stuff up super pleasant due to the speed, or a USB hard drive cage which I could stick a nice reliable NAS/enterprise HDD in to get maybe half to a third of the speed, but maybe better reliability
(worth noting I do have USB Gen 2x2, so I can make use of the speed from the SanDisk SSD)
(whereas with an HDD it wouldn't matter anyway since SATA would be the bottleneck, unless they make SAS external drive cages which...that's probably a bit niche)
Okay the only one I can find with SAS has USB 3.0 which is even worse of a bottleneck than SATA 💀
Write a function that take ASCII-only(charcode 32-126) input x and provide ASCII-only output f(x), such that
f(f(x))=x
f(x) consist of non-number(charcode not in 48-57) iff x don't consist of non-number
You can assume input is not empty and never provide empty output, or treat empty input as "d...
A new opportunity has arisen for people who are capable of following instructions and sending simple messages online. This position is perfect for anyone who is reliable and seeks to earn around $288 per day.
What you will be doing: You wll work as a live chat assistant, sending messages to websi...
LDQ I'll have 3 types of input commands: As a single string, as a array of lines, and as stuctured data (like JSON.parse but much more permissive) which type should the implicit input be?
I do dislike languages where primitives work completely differently from everything else. If there is a "base" type for classes primitives should have the same functionality
Capture the Flag... with a twist
code-golf math
Taken from the OUCC 2022 Seniors competition.
Background
Two teams of students are playing "capture the flag". They take turns invading each other's base and capturing their opposing team's flag in the shortest amount of time. The attacking players...
@Jacob yeah we have a bunch of chat specific memes; you might hear of avocado juice, the steggan hivemind, fridge nukes, or lyxal's limb stealing business
in chat, you have to escape backslashes in messages
so when you send an emoticon that uses backslashes (like ¯\_(ಠ_ಠ)_/¯), if you don't remember to escape the backslash it disappears and you get something like ¯_(ಠ_ಠ)_/¯
@Jacob theres also a related one where the mods keep putting nukes under lyxal's fridge, and he uses the revenue from his limb stealing business to get new ones :P
multiline messages don't work at all with it, strikethrough syntax is --- for some reason, it's almost impossible to escape certain things correctly, and that's just the tip of the metaphorical iceberg
tbh python is great for single file quick scripts, such as when i need to do mass curling or do some special file copying, but not for big (or medium) projects
so technically the code on the main branch works, in that it can package projects, but it doesn't work well and I'm about 90% sure that it can't install packages correctly yet
did you know that due to the byzantine structure of Python packages there is no way to ascertain what dependencies a package will have before installing it?
like if theres a.py with a = "hello" and b.py with b = "world" and c.py with import a "a.py" import b "b.py" print a + b (i don't know how python importing works) . i'm sure this wouldn't work but something like that? obv ur the expert tho
basically what pypackage does is it packages the program and all its dependencies into a single file, and to install it uses virtualenv to create a completely isolated, clean environment with nothing in it but the program and its dependencies
at least that's how it'd ideally work
the problem is with modules like gi, which are basically C libraries with Python bindings and as such are very picky about how they're installed
for example, gi isn't available on PyPI because it's not actually a Python module: it's a C library with Python bindings
oh one more thing: The one good feature of Python package management is virtualenv, which is such a good idea that I wish would be used more often in OS package management
I specifically chose hard byte limites because most if not all code challenges that try to combine code length and accuracy in a score are badly balanced
@Ginger Give a man a fish, he'll have food for a day. Teach a man to fish, he'll have food for a lifetime. Teach a village to fish and they'll fish the fish to extinction then starve anyways
@user I learned functional programming things like mapping, filtering, etc as well as other cool things like lambdas from interacting with code golf. Now I use them as much as I can in real code
Plus you learn a whole bunch of different ways to solve problems with techniques such as Cartesian products, take/drop while, finer array/list manipulation and more
I have unironically learned more about real world programing from code golf than I have from school and uni