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.

programmerhumor

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

BartyDeCanter , in Those who know

I use the “short meetings” option in gcal, which shortens meetings by 5-10 minutes to give me a passing period between meetings. Twice this week people have had the audacity to try and schedule a meeting in that break. 😬

laranis ,

Jesus fucking Christ. We’re all so broken.

flambonkscious ,

Psychopaths!

fschaupp , in Those who know
@fschaupp@lemmy.ml avatar

You guys get formal meetings?

superkret , (edited ) in Those who know
  • Try to break your own fingers to get off work, fail
  • Try to break your own neck, fail
  • Shit your pants
  • Open Outlook
eldavi , in Those who know

i intentionally do middling-at-best work on projects that i don’t like so that i’m never asked to perform them again nor join meetings about it; and i think my mostly empty calendar reflects the effectiveness of my strategy.

osef897 , in Hexed by async

Promise.resolve(‘haha, good one’);

naught ,

asyncio.run(easy_peasy())

pimeys , in Hexed by async

That’s why you write your protocol as a sync library, then implement the async IO separately and mapping the data over the protocol modules.

astrsk ,
@astrsk@fedia.io avatar

Or just make a bunch of static helpers >:)

shikogo ,

I… Don’t know what this means

pimeys ,

So basically your typical network protocol is something that converts an async stream of bytes into things like Postgres Row objects. What you do then is you write a synchronous library that does the byte conversion, then you write an asynchronous library that talks with the database with async functions, but most of the business logic is sync for converting the data coming from the async pipe.

Now, this can also be done in a higher level application. You do a server that is by nature async in 2024. Write the server part in async, and implement a sync set of mapping functions which take a request coming in and returns a response. This can be sync. If you need a database, this sync set of functions maps a request to a database query, and your async code can then call the database with the query. Another set of sync functions maps the database result into http response. No need to color everything async.

The good part with this approach is that if you want to make a completely sync version of this library or application, you just rewrite the async IO parts and can reuse all the protocol business logic. And you can provide sync and async versions of your library too!

jaybone ,

What is computer science degree?

pimeys ,

Never had one, just partied in the uni and dropped out :D

jaybone ,

Perfect

azimir ,

This approach is so much nicer than the threading/queuing approaches we used to have. One async showed up, a ton of the work go pulled out of protocol handing and distributed subsystem sync efforts.

Long lived the multi threaded C++ server buffer! Today, async beging to rule the roost.

pimeys ,

It kind of fails with certain protocols. I once wrote an async MSSQL client for Rust, and some data doesn’t say its size in the headers. So this kind of forced the business logic to be async too.

azimir ,

Yeah, those durn data size fields. At first you’re like “why would you do this? It’s specified in the spec, right?” Then you start consuming the data stream and go “oh, yeah need this”.

I was doing some driver work for a real time location tracking board. The serial stream protocol was very well documented and designed. Plenty of byte length count fields, though.

bitfucker ,

Long live sans io!

muntedcrocodile , in Hexed by async
@muntedcrocodile@lemm.ee avatar

I hate asyncs, but I don’t mind the way Python does it.

psivchaz ,

I like async but dislike await. I spend entirely too much time on everything I build trying to maximize how much I can do in parallel because I find it tremendously satisfying.

bitfucker ,

Then Promise.all is for you!

entropicdrift ,
@entropicdrift@lemmy.sdf.org avatar

TaskGroup in Python is great

Vent ,

You probably already know this, or are talking about another language, but JavaScript is inherently single threaded, so unless you’re running blocking I/O in parallel, you won’t actually see any performance boost. Service workers get their own thread though.

Luvon ,

Await is usually there either because the performance doesn’t matter and the legibility is much higher with it, and/or because there are a series of asynchronous actions that depend on each other and await lets you write them as if they are sync because related to each other they are.

grandma ,

I hate python async with a burning passion but I’ll admit most of it is a consequence of skill issues

muntedcrocodile , (edited )
@muntedcrocodile@lemm.ee avatar

What do u hate about it so much? I find it a very intuitive way to do async. Especially with asynchronous loops.

GissaMittJobb , (edited )

Kotlin-style async is pretty neat, ngl.

otarik , in Those who know

And the free slots aren’t for coding but for writing docs, creating jira tickets and code review.

nik9000 , in Those who know

I feel lucky to have avoided this so far. It’s really not like this on my team. I write a fair bit of code and review a ton of code.

yogthos OP ,
@yogthos@lemmy.ml avatar

I find this tends to be more of a case in bigger companies where middle management becomes dominant.

skullgiver , in Hexed by async
@skullgiver@popplesburger.hilciferous.nl avatar

I know about overhead and fairness guarantees and context switching impact, but for simplicity’s sake I just generally start new threads in Rust. Introducing async isn’t that much harder, but for what I write it’s generally fine.

Java’s project Loom looks pretty cool, though I’ve read scheduling remains challenging and several libraries seem to have the occasional deadlocking issues.

Thcdenton , in Hexed by async

I heard the pop in my head

HStone32 , in 1 hour in Java

can you really call python programming though? The reason why python is so quick to write is because its so-called libraries are pre-compiled C programs. so you’re not writing new programs, you’re scripting existing ones.

jeena OP ,
@jeena@piefed.jeena.net avatar

Is scripting programming?

HStone32 ,

not really, imo. its more like a sequenced list of pointers to various instruction sets.

jeena OP ,
@jeena@piefed.jeena.net avatar

But there are still if, while, function definitions, etc. in scripting languages. It doesn't seem to me that different than even programming in assembler. In Assembler you also call subroutines, etc. and in every other language you also call functions from libraries.

aidan ,

The same is true for JVM bytecode, and C operations really are just aliases for ASM operations, and ASM (sometimes) is just aliases for microcode operations

ImplyingImplications , in Nothing beats that sobering taste

My work has barrels full of IPA. Unfortunately, isopropyl alcohol doesn’t taste great.

netvor ,
@netvor@lemmy.world avatar

Be grateful to your taste buds. Enjoy the life they have saved for you (and them).

cizra , in Nothing beats that sobering taste
@cizra@lemm.ee avatar

192.168.0.00? 'Shopped.

tetris11 OP ,
@tetris11@lemmy.ml avatar

Nah, it’s a real public IP

ekky ,

There has to be a law against such heretical actions somewhere! Even if it’s .00, this computer is an affront to order! I propose we burn it alongside those frivolous computers who think they can simply name themselves .0 or .255!

nonentity ,

It could be a real address, but not within a /24, nor publicly routable.

qprimed ,

…that wireless mac is looking suspiciously shopped and non-existent.

floral_toxicity ,

I agree. 00:cf:00 yields that no actual manufacturer has been assigned that OUI.

tetris11 OP ,
@tetris11@lemmy.ml avatar

I had to protect myself from you detailheads somehow!

davel , in Nothing beats that sobering taste
@davel@lemmy.ml avatar

Thanks to using MacOS as my desktop, I still reach for ifconfig like a caveman.

crazycaveman ,

ifconfig is good enough for me!

LarkinDePark ,

It’s like that everywhere now though. Fucking heathens man.

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