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.

Jakylla , in Returns a sorted list in O(1) time
@Jakylla@sh.itjust.works avatar

inplace sort be like:


<span style="color:#323232;">def sort(list: list):
</span><span style="color:#323232;">    list.clear()
</span>
moody , in You may call me a monster but I know I'm not the only one
gencha , in Every Family Dinner Now
  1. People vastly overestimate the abilities of AI.
  2. Developers vastly overestimate their own abilities.
  3. There are people on any level of seniority that would be perfectly replaced by a noise generator.
taanegl ,

The company had avoided certain destruction, after having fired the previous CEO and putting a new one in it’s place. The new CEO had managed to bring a newfound calm to the company and it’s ranks, and brought an air of meditative discipline to board room meetings.

Some said it was crazy, but making the LectoFan EVO the new CEO was the best decision the company board had ever made.

brbposting ,

I’ve had it with fan shills.

Glorious leader box fan is sufficient. Glorious leader box fan is perfect.

JasonDJ ,

There are people on any level of seniority that would be perfectly replaced by a noise generator.

Im fairly certain that this is what happened I my CISO.

rab ,
@rab@lemmy.ca avatar

Overestimate now, but I think that AI is going to be insane within like 5 years, given current investment trends

frezik ,

If they stick around, maybe. If it falls into a rut, then investors are going to pull out and we’ll be in another AI winter.

firelizzard ,
@firelizzard@programming.dev avatar

I find it very hard to believe that AI will ever get to the point of being able to solve novel problems without a fundamental change to the nature of “AI”. LLMs are powerful, but ultimately they (and every other kind of “AI”) are advanced pattern matching systems. Pattern matching is not capable of solving problems that haven’t been solved before.

gencha ,

Replace “AI” with “metaverse” or “Bitcoin”. Same bullshit

rab ,
@rab@lemmy.ca avatar

Not really. Crypto is a pyramid scheme.

ObviouslyNotBanana , in You may call me a monster but I know I'm not the only one
@ObviouslyNotBanana@lemmy.world avatar

What’s that porn, URL? I’m feeling

Picture of Randy from My Name Is Earl

YaBoyMax , in Returns a sorted list in O(1) time

Lossy sort

awesomesauce309 , in You may call me a monster but I know I'm not the only one

You know the kind of guy who does nothing but browse the internet and then wonders why his life sucks? One by one I’m gonna make up for all the grass I didn’t touch.

shovingleopardnsfw , in You may call me a monster but I know I'm not the only one

Oh god, not this shit again. I’m sure there’s a GIF somewhere about this issue.

pythonoob OP ,

I made this meme in a giffy

QuazarOmega , in You may call me a monster but I know I'm not the only one

If URL then I am Kira

rikudou , in Returns a sorted list in O(1) time

While this doesn’t work all the time, when it does, it’s really fast. Similar to the isPrime function, it’s correct most of the time and is much faster than alternative implementations:


<span style="color:#323232;">function isPrime(number) {
</span><span style="color:#323232;">    return false;
</span><span style="color:#323232;">}
</span>
itslilith ,
@itslilith@lemmy.blahaj.zone avatar

asymptotically this is 100% correct!

mumblerfish ,

What would be the accuracy on something like a 64bit unsigned integer?

itslilith ,
@itslilith@lemmy.blahaj.zone avatar
dgriffith , (edited )

What your code can do is run this first and if it returns false then do a quick double check using a traditional isPrime function. Really speeds things up!

rikudou ,

I mean, it has a 99.999%+ success rate on a large enough sample and I can live with that.

dgriffith ,

Nah, you’ve always got to check the corner cases. It’s a variation on Murphy’s Law - you don’t encounter corner cases when you’re developing a program but corner cases are 99 percent of an everyday user’s interaction.

docAvid ,

Good idea, but it would be much faster if you do the double-check on true instead.

xmunk ,

This is a power(ful) idea.

Are my stats/programmers in the house?

fibojoly ,

Better. Return true if the number is in a stored list of known primes, otherwise return false right away. But then, start a separate thread with an actual verification algorithm. When the verification is done, if it was actually a prime number, you just crash the program with a WasActuallyPrime exception.

Asudox ,
@Asudox@lemmy.world avatar

50/50 chance of being right in O(1) time

rikudou ,

It’s right much more often than just 50/50.

andnekon ,

50/50 would be for isOdd with the same implementation

Lmaydev ,

Primes are not that common especially as numbers get bigger.

It’ll be right the vast majority of times.

xmunk , in Returns a sorted list in O(1) time

Copilot is fucking killing it these days.

Scoopta , in X is just better!
@Scoopta@programming.dev avatar

As someone using Wayland I can confirm it’s indeed not a hot a mess

fl42v ,

Seconded. Although that very much depends on the compositor of choice: I’ve been trying out a few new shiny things (well, pinnacle, strata, buddaraysh), and they aren’t exactly usable rn. With the exception of the latter one, probably (since the author claims to use it), but I haven’t been able to start it so far… On the other hand, major players like hyprland and sway work perfectly fine on my machine :tm

Adanisi ,
@Adanisi@lemmy.zip avatar

I’m on KWin Wayland, it also works great. I actually never noticed that I was switched from X11 to Wayland when I reinstalled Debian.

Scoopta ,
@Scoopta@programming.dev avatar

I personally run sway. I was really looking forward to kiwmi but that project looks dead

smpl ,
@smpl@discuss.tchncs.de avatar

Okay, but that would have made a shitty joke wouldn’t it?

https://discuss.tchncs.de/pictrs/image/548074ce-5791-48c7-8c5f-28d5e501b0d2.png

Hmm… I don’t know maybe it’s fine as a joke.

docAvid ,

Can I use AwesomeWM, XMonad, or StumpWM on Wayland?

Can I run a GUI program over ssh?

Does it support the X selection and clipboard protocols?

(These are not rhetorical questions, I’m really asking.)

fl42v ,

Can I use AwesomeWM, XMonad, or StumpWM on Wayland?

Can you run macos software on linux?

Can I run a GUI program over ssh?

This is more of a why would you… Although, waypipe

Does it support the X selection and clipboard protocols?

Too lazy to google, but overall clipboard works as expected, both C-c and text selection. I remember experiencing problems with clipboards in vim (like 2 yrs ago) which were fixed by switching to nvim

Chewy7324 ,

Wayland only keeps the clipboard until the application exits. This means a clipboard manager is basically a requirement. Iirc desktop environments might solve those issues by default, but on a wm just add a clipboard manager and enjoy the history.

fl42v ,

Correct, yet I personally don’t find it too useful and sometimes harmful when dealing with, for example, password managers

Chewy7324 ,

I’ve added a keybind for deleting history, but it’d be great to have a way to specify short lived clipboard entries. But this might also be one of those standards that no one implements.

Scoopta ,
@Scoopta@programming.dev avatar

No you cannot run any of those WMs, some of those do have ports with varying degrees of completeness but only sway(i3) and hyprland(hypr) are ready for prime time.

Yes, using waypipe

Yes, primary selection does work along with Ctrl+c although as others have mentioned it forgets when the app you copied from gets closed

SomethingBurger ,

OK cool. When will it support nVidia?

inb4 it’s nShitia who must support Wayland

Wayland compositors run entirely in userspace and do not interact directly with hardware drivers. If Wayland doesn’t work on nVidia but X does, it’s a Wayland problem.

Scoopta ,
@Scoopta@programming.dev avatar

Compositors do directly interact with the drivers though. The reason Wayland doesn’t work on Nvidia is because Wayland uses an API called GBM(generic buffer management) to draw directly to the Linux VT. The Nvidia drivers don’t implement that API, the API that both AMD and Intel drivers support. It very much IS an Nvidia problem and not the other way around. Nvidia tried to convince all the Wayland developers to use EGLStreams instead but no other drivers use(or even support) that API, everyone agreed on GBM except Nvidia. That’s not Wayland’s problem.

OsrsNeedsF2P ,

Iirc Nvidia also skipped the initial meetings that AMD and Intel attended, where it was decided they would move forward with GBM

Scoopta ,
@Scoopta@programming.dev avatar

Amusing video covering this topic www.youtube.com/watch?v=5VGMdLAKQ0c

funkajunk , in You may call me a monster but I know I'm not the only one
@funkajunk@lemm.ee avatar

Valid acronym.

pythonoob OP ,

Still, I’ve gotten some looks

funkajunk ,
@funkajunk@lemm.ee avatar

Probably because you’re sexy 😉

abbadon420 ,

Go on. I wanna see where this leads

funkajunk ,
@funkajunk@lemm.ee avatar

I put on my robe and wizard hat

pythonoob OP ,

Role for initiative

SzethFriendOfNimi , in Returns a sorted list in O(1) time

Honey, wake up. The new Def Leppard Album just dropped

Anticorp , in Every Family Dinner Now

I have no other skills that would pay anywhere close to what this career pays. I’d need to go back to school and become a surgeon or something. I don’t think they let people become surgeons at 50 years old, and I don’t have the energy for an internship and residency. I’m just hanging on and hoping that it doesn’t all vanish in the next few years. I’m also spending time learning how to leverage AI, since I think that’ll put me a step ahead. Good luck to all of us, we’re going to need it!

xilliah , in I just wanted to build a 20 mb app.

Or try to send a message on discord

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