There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Kolanaki , in We did this to ourselves
@Kolanaki@yiffit.net avatar

🎵 Millions of theorems,

Theorems for free.

Millions of theorems,

Theorems for me, look out! 🎵

apprehentice , in We did this to ourselves

Okay, but what’s a theoren?

Pok ,

It may or may not be a string.

Cwilliams , in thisIsGoingToBeASeriousDebate

I thought the whole point of rust macros was to abstract away the scary asm at zero cost!

kronicmage , in We did this to ourselves

This is referencing Philip Wadler’s 1989 paper “Theorems for Free”, which is fairly well known in the Haskell community: home.ttic.edu/~dreyer/course/papers/wadler.pdf

kronicmage , in We did this to ourselves

This is referencing Philip Wadler’s 1989 paper “Theorems for Free”, which is fairly well known in the Haskell community: home.ttic.edu/~dreyer/course/papers/wadler.pdf

spicyemu ,

That looks like something I’ve seen somewhere and didn’t understand.

jasondj , in We did this to ourselves

I’m sorry, I’m only a novice Python guy. Know enough to get two RESTful APIs to talk to each other and do some network automation or rudimentary Ansible plugins.

What’s wrong with if isinstance(x, str):?

Knusper ,

Apparently, “Theorems for free!” is a paper that talks about an extensive ability to reason about parts of programs, if you follow some rather basic rules.

However, lots of popular programming languages throw this ability out the window, because they do not want to enforce those basic rules.
Most languages, for example, allow for rather uncontrolled side effects and to be able to reason as a programmer, you have to make the assumption that no one else abused side effects.

The instanceof is rather referring to dynamic typing, though, as e.g. employed by Python and JS, which makes it difficult to make any assumptions at all.

So, in statically typed languages, when you’re implementing a function, you can declare that a given parameter is a number or a string etc. and the compiler will enforce that for you. In dynamically typed languages, you have to assume that anyone calling your function is using it correctly, which is a difficult assumption to make after a refactoring in a larger codebase.

All in all, such different levels of rigorosity can be fine, but the larger your codebase grows, the more you do want such rules to be enforced, so you can just ignore the rest of the codebase.

257m , (edited ) in thisIsGoingToBeASeriousDebate

<span style="color:#323232;">#include &lt;stdio.h>
</span><span style="color:#323232;">
</span><span style="color:#323232;">int main(int argc, char** argv)
</span><span style="color:#323232;">{
</span><span style="color:#323232;">    printf("hello, world");
</span><span style="color:#323232;">}
</span>
ChickenLadyLovesLife , in They used coding and algorithms

And they were roommates!

rubythulhu , in Think of the children

i meant it when i said -9. fuck that process.

Jamie ,
@Jamie@jamie.moe avatar

Chaotic evil: Send SIGSEGV

alr ,

Is kill -11 even allowed?

Jamie ,
@Jamie@jamie.moe avatar
CanadaPlus ,

I love making the kernel a liar.

Scoopta ,
@Scoopta@programming.dev avatar

You can send any signal manually including SIGSEGV and SIGABRT

alr , in Think of the children

On the other hand, the OOM killer is worst of all: “kill process or sacrifice child.”

andrew , in Think of the children
@andrew@lemmy.stuart.fun avatar

Yes but sometimes their kids just talk forever, or they themselves just ignore the reality that their time has come, and we’ve got places to be. So the nice request comes with a deadline.

andrew ,
@andrew@lemmy.stuart.fun avatar

And don’t push your luck or I’ll go get Mr. Sysrq Reisub.

radiofreeval , in Think of the children
@radiofreeval@hexbear.net avatar

Bob decides he’s had enough shit and enters D state, never to return.

GeorgiaHerrera , (edited ) in Okay, which one of you Java devs did this

Maybe I’m a dumb chicken, is it similar to apk 😂 😅

Ferk , in Think of the children
@Ferk@kbin.social avatar

be nice

What niceness level exactly?
The most nice I can be in my system is -20.. but being too nice to one process leaves others with less time and resources in their life.

fsniper , in Think of the children

I wouldn't ever imagine to shed a tear for the processes I have killed in my whole life. I feel like a homicidal maniac.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines