How can my JSON response have any concept of Type? If I return a number and you treat it is a string, my API doesn’t have any concept of that. Now in the actual spec of the API I could say that specific URI will return an int
, but it’s up to your side to classify the array of bits as an int
instead of a str
.
- 1 Post
- 389 Comments
Enlightenment is realizing that variables don’t have nor need a type, they are all just arrays of bits.
PowerCrazy@lemmy.mlto Programmer Humor@lemmy.ml•Python needs an actual default functionEnglish1·1 month agoI can import my_script2.py into my_script.py it doesn’t run the main method unless I specifically invoke my_script2.main() though.
PowerCrazy@lemmy.mlto Programmer Humor@lemmy.ml•Python needs an actual default functionEnglish7·1 month agoIdk, I guess I should ask why python needs a default function? If I’m running it as a script with commandline invocation I just copy and paste the if main namespace thing from stack overflow and it works as I intended. It also works if I invoke via python my_script.py $args, so I don’t really see why I should philosophically care about how other languages that I’m not using do it.
PowerCrazy@lemmy.mlto Europe@lemmy.ml•Berlin declares BDS Movement unconstitutional: 'Aimed at Israel’s destruction'English6·2 months agoFischer clarified that BDS’s ideology is based on “explicit denial of Israel’s right to exist.”
Well he is correct about that. But not sure how that is unconstitutional, unless the German consitution has some extremely problematic language in it, in which case it probably needs to be throw out.
PowerCrazy@lemmy.mlto Europe@lemmy.ml•Alarm over defence agreement giving US ‘unhindered access’ to Danish airbasesEnglish1·2 months agoPretty sure this is literally what Denmark signed up for? I’m not sure where the “alarm” is coming from.
PowerCrazy@lemmy.mlto Europe@lemmy.ml•German foreign minister visits and shakes hands with internationally wanted war criminalEnglish41·2 months agoWhen is the last time anyone was actually sent to The Hague? End of WW2? Saddam Hussein wasn’t afaik.
Here is a link for cases.
https://www.icc-cpi.int/casese: Cases are in alphabetical order not chronological.
PowerCrazy@lemmy.mlto Fuck Cars@lemmy.ml•TIL: violently mentally ill are allowed to own heavy murder SUVs and divers licenses, and aren't immediately charged after murdering 11 people and counting.English51·2 months agoIn a better world, yes. In this world, capitalism won the fight for well-designed cities so now we are in a bind where people that shouldn’t drive “have” to be able to, and a driver’s license is just a suggestion. Cheap cars are abundant and easily available so unless a person is in jail, they can’t practically be prevented from driving.
Common France, W.
I want the same for my city and so does my Alderman.
PowerCrazy@lemmy.mlto Europe@lemmy.ml•Back to Russian gas? Trump-wary EU has energy security dilemmaEnglish52·3 months agoOr maybe stop using fossil fuels? The best time was 20 years ago, the second best time is now.
PowerCrazy@lemmy.mlto Fuck Cars@lemmy.ml•Cars don't belong in cities, says Top Gear's James MayEnglish1124·4 months agoAgreed. Also dog’s do not belong in cities.
PowerCrazy@lemmy.mlto Programmer Humor@lemmy.ml•What's stopping you from writing your Rust like this?English43·4 months agoWhy does even a modern language syntax insist on having end of line characters like semi colons. Surely we have moved beyond that. What is even the point of those characters?
PowerCrazy@lemmy.mlto Fuck Cars@lemmy.ml•Why don't Europeans buy more American cars? (TL;DR: preference for smaller vehicles, higher fuel prices, dominance of local European brands)English7·5 months agoThey are also garbage vehicles, long gone are the days of American innovation or quality. The most innovative American car these days is a Tesla, and well, yea they aren’t good at all, they aren’t even the best american EV. Buying an american car in europe is a status symbol showing that you have more money than sense.
Git is great. Git is Complicated. But assuming you have a protected master branch that requires PRs and will detect merge conflicts before attempting to merge, it’s not really dangerous. It is however frustrating.
Sounds like the perfect evolution of pointers then.
I “understood” on a basic level what pointers were when i was first learning programing as a 12-13year old. But I never understood HOW to use them, or manipulate them, or what functions you use to interact with them, or how to examine them, or how to declare them, etc etc. And since I was young I never got the opportunity to take an actual programming class that taught any of that throughout high school. By the time I got to college I went with Electrical Engineering instead of computer science and so my journey with pointers ended.
Now I do python and never have to think about pointers.
PowerCrazy@lemmy.mlto Antiwork@lemmy.ml•(TWEET WAS FAKE, SORRY!) I'd say Elon Musk said the quiet part out loud but he probably genuinely didn't even know that was the quiet part and thought everyone would wholeheartedly agree with himEnglish241·7 months agoCan we please PLEASE start linking the actual tweet in the future. You can also screen shot it/copy and paste the content if you want, but PLEASE screenshots of tweets are the worst thing on the internet.
PowerCrazy@lemmy.mlto Fuck Cars@lemmy.ml•The US finally takes aim at truck bloatEnglish46·10 months agoYes. EVs shouldn’t exist, just like all vehicles.
Indeed, and currently there exist several cities that execute that ideal more-or-less. NYC is the obvious one, but Washington DC, Chicago, hell even the worst city in America, San Francisco does it adequately. The only reason we can’t have that kind of public transit everywhere is because no one is forcing city officials to plan for the long-term, and reduce sprawl.
Zero Growth Lines are a great way to mandate density, without any other policies needed.
You should replace the middle pic caption with “hates everything about driving, but will never admit it.”