Made with KolourPaint and screenshots from Kate (with the GitHub theme).
Combating artificial intelligence with natural stupidity.
- 12 posts
- 21 comments
HiddenLayer555@lemmy.mlto
World News@lemmy.ml•A Gaza father recounts how Israeli soldiers killed his three-year-old son in his arms and mocked himEnglish
5 daysAnimals run on instinct and are not capable of anything close to this kind of stuff. This level of cruelty is only possible with humans and any attempt to equate the perpetrators with animals in Western discourse is an attempt by humans not doing shit about the horrors our fellow humans are committing to feel better about themselves by insinuating that the people committing atrocities are somehow “not” human like us.
Don’t get me wrong, animals are fucking brutal to each other, but they are not cruel for the sake of being cruel. Unduely cruel animals are selected out of the gene pool. A predator that constantly hunts for sport will wipe out their prey and go extinct. Individuals that waste energy torturing their prey for their own enjoyment will be out competed by members of their own species that simply do what they need to survive. Animals actually have mechanisms to prevent excessive cruelty in an overwhelmingly cruel existence, meanwhile we actively encourage and send resources to support cruelty and allow it to expand. This is a choice, not nature. We have the unique ability to build a safe, thrivable world for every member of our species through our technology. We choose not to.
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Production breaking driven developerEnglish
1 yearI like testing my helper/utility functions mainly so I can be sure I implemented them correctly. That way I can focus on my main implementation and narrow down where the problems are coming from.
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Production breaking driven developerEnglish
1 yearWith a fun side quest of figuring out if your actual code has the error or the tests!
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Production breaking driven developerEnglish
1 yearKaren incident in the customer service call center driven development.
If someone hasn’t yelled at a minimum wage phone rep over it, it doesn’t need to be fixed.
One thing that annoyed me about C# as a Java guy is that it really wants you to use camel case for function and property names, even private ones. I don’t like it specifically because it’s hard to differentiate between a function/property and a type.
But C# has quite a few keywords and seem to like adding them more than Java.
Maybe that’s their way of ensuring keywords don’t clash with stuff?
Interesting. Thanks!
any new keyword could break backwards compatibility
Wouldn’t that happen anyway with variable and function names? Any type other than primitive/built in ones are usually camel case so lower case keywords are more likely to clash with single word variable and function names, unless you restrict the cases of those too or allow keyword overriding or something.
How do you do nested parameterized types without it becoming ambiguous though? That’s IMO the biggest advantage of the bracket syntax. For example:
Map<Tuple<Int, Int, Int> Int>
TIL PHP has statics.
Also, does PHP actually enforce the type declarations? I’d assume it would but knowing PHP…
Doesn’t Basic use
Dim a As String?
It’s commonly used in math to declare variables so I assume programming languages borrowed it from there.
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Python needs an actual default functionEnglish
1 yearLuckily Python is one step ahead:
Python 3.13.3 (main, Apr 22 2025, 00:00:00) [GCC 15.0.1 20250418 (Red Hat 15.0.1-0)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> if __name__ = "__main__": ... ... main() ... File "<python-input-0>", line 1 if __name__ = "__main__": ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Python needs an actual default functionEnglish
1 yearHeard of it, was too lazy to do it that way.
To be fair I now do it that way, but not when I was learning Python.
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Python needs an actual default functionEnglish
1 yearBasically, when you compile a program written in Rust or C/C++ (the first and second panels respectively), the compiler needs to know what’s supposed to be executed first when the program is run directly (i.e. when you click on the executable), which in these languages, is denoted by a special function called
main(). Executable files can also contain functions and data structures that can be called by other programs, and when they are, you wouldn’t want to run an entire complex and resource intensive program if another program only needs to call a single function from it. In that case, the other program will call the function it wants but not main, so only that function executes and not the entire program.However, Python is a scripting language that’s interpreted. So every Python source file is executable provided you have the Python runtime. Python also doesn’t have native support for main functions in the same way Rust and C/C++ does, and it will execute every line of code as it reads the source file. This is why a single line Python file that just calls print is valid, it doesn’t need to be wrapped in a main function to execute. However, what if your Python file is both meant to be executed directly and provides functions that other Python files can call? If you just put the main routine in the root of the file, it would be executed every time another program tries to import the file in order to call functions from it, since the import causes the file to be interpreted and executed in its entirety. You can still just have a main function in your file, but since Python doesn’t natively support it, your main function won’t do anything if you run the file directly because as far as Python is concerned, there is no executable code at the root of the file and you haven’t called any functions.
The workaround is to have a single if statement at the root of the file that looks like this:
if __name__ == '__main__': main()It checks a special variable called
__name__. If the Python file is directly executed,__name__will have the value of the string'__main__', which satisfies the if statement so main() is called. If another Python file imports it, the value of__name__will be the name of that file, so main() isn’t called. It’s clunky and not that efficient, but, 1, it works, and 2, if you cared about efficiency, you wouldn’t be writing it in Python.
HiddenLayer555@lemmy.mlto
Programmer Humor@programming.dev•Python needs an actual default functionEnglish
1 yearLooks at all the Python scripts in my bin folder that I wrote.
Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?





Basically because we as individuals can’t compete with corporations, so when there are large corporate clients they will drive the price up for individuals. It’s not guaranteed to happen, but these types of business to business contracts are usually not a good sign for us.