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.

Norgur , in Null terminator

Doing that to annoy devs who didn't sanitize their database inputs is like walking along parking lot just to see if anyone has forgotten to lock their car, just to put a post it in the steering wheel.

daw_germany ,

Nah man, not sanitizing Inputs could pose serious security risks as someone could use this shit to escape and run arbitrary database queries potentially leaking passwords or other info or just wiping it (Afa I have learnt on the internet)

YonatanAvhar ,

Just like @Norgur said, leaving your car unlocked is a serious security issue and you’d be lucky if someone walked by and just left a post-it note

Mikina , in Why is it so hard finding up-to-date docs and guides?

My favorite story about docs is when I tried implementing multithreaded Raycast in Unity.

I needed it to hit multiple targets per ray. Should be pretty easy, after all - there is this parameter right in the constructor:

maxHits: The maximum number of Colliders the ray can hit.

And this is how you use it, straight from the docs:

The result for a command at index N in the command buffer will be stored at index N * maxHits in the results buffer.

If maxHits is larger than the actual number of results for the command the result buffer will contain some invalid results which did not hit anything. The first invalid result is identified by the collider being null. The second and later invalid results are not written to by the raycast command so their colliders are not guaranteed to be null. When iterating over the results the loop should stop when the first invalid result is found.

Well, no. It’s not working like that. I was always getting just a single hit, but sometimes, I received two or more hits. After a few days of debugging, I have found a typo in bubblesort, which caused the multiple hits, and I was in fact getting only one hit every time.

Strange, must be a bug then. And then I found it. A bug report from 3 years ago. But it was closed as solved. And the resolution?

I have some news about the issue where RaycastCommand will only return a maximum of 1 hit regardless what you set maxHits to.

According to our developers, each individual raycast in a batch only does a Raycast single in PhysX which will only return the first hit, and not multiple hits if the ray passes through several objects which would require a different raycast function. The documentation simply doesn’t explain this very well.

The docs above are from 2021. Three years after this. The fuck “doesn’t simply explain it very well”? It literally explains it pretty damn well.

But looks like they’ve finally changed the docs for 2022+ at least, it did happen few years ago.

Psaldorn ,
@Psaldorn@lemmy.world avatar

Ah, reminds me trying to implement multiplayer just as there was some churn regarding unet/llapi/hlapi and every update something would break.

I just gave up. Add it to the failed projects list.

Mikina ,

We’ve once received an investor offer from a major studio for our game we are making since college in our free time, but the catch was that they wanted us to implement online multiplayer into a coop-only top-down shooter we’ve been actively making in our free time for the past 4 years at that point.

We ultimately rejected the offer, even though we managed to get a prototype working. MP is such a pain to implement in the first place, and adding it into an almost finished game is near impossible. But, if you ever resume the project you’ve scratched due to unet being awfull, I highly recommend checking out Mirror. It’s free, open-source and has an amazing Discord community - every time I had an issue or needed help with something, there was someone willing to help me there.

DaPorkchop_ , in Movies vs life

<span style="color:#323232;">sudo apt install hollywood
</span>
beneeney ,
@beneeney@lemm.ee avatar

It’s also on the AUR. Hilarious package. Would be fun to somehow turn into a screensaver

iByteABit , in OK, now what?

What’s the point of even “modernising” task manager?

Normies that would care about task manager being too ugly probably don’t know it even exists.

There goes the last dependable program that Windows had to offer

MJBrune ,

It happened a while ago too. Like windows 8 I think. Old task manager popped up no matter how laggy your computer was. It has some sort of highest priority and didn’t depend on much. Making it reliable. Since 8, this changed. Any changes since have been add-ons and reskins. I like how it shows things like gpu now but at what cost.

danwardvs , in OK, now what?

Install Linux

trimmerfrost , in Alpha Programmer

Man I wish we could have such fun conversations here

SpaceNoodle ,

Be the change you want to see in the world.

ditherwither ,

we should be the change in other lemmy instances too, not just lemmy.world

dreadedsemi ,

Moom, the lemmings escaped again!

Ocelot , in One command to rule them all

fuck it. rm -rf repository; git clone repository

Been using git since almost as long as its been around, still can’t be bothered to learn to how to fix conflicts.

loutr , in Apple's Xcode Ladies and Gentlemen
@loutr@sh.itjust.works avatar

After a decade as a Java (and Kotlin) dev I recently got to work on an iOS app. The transition from Jetbrains products to Xcode has been painful, to say the least.

I tried appcode before it was retired, and it was a much better experience all around. I can’t understand why Apple insists on maintaining this pile of crap instead of working with JB like Google.

cabbage , in Writing C++ is easy.

Sounds like Rust propaganda to me >:(

JakeHimself ,

Tbf, you have to be pretty far with Rust to get to a point where Rust’s compiler errors stop helping you (at least, as far as I’ve seen). After that, it’s pretty much the same

philm ,

Yep use a little bit more deeply cascaded generic rust code with a lot of fancy trait-bounds and error messages will explode and be similar as C++ (though to be fair they are still likely way more helpful than C++ template based error messages). Really hope that the compiler/error devs will improve in this area

Boinketh ,

Rust has better runtime errors, too. If you run a dev build, it should pretty much never segfault unless you use unsafe and will instead tell you what went wrong and where, no valgrind necessary.

JakeHimself ,

Would know, I’ve never had a runtime error in Rust /s

eth0p ,

Can’t have a runtime error if you don’t have a compiled binary taps forehead

(For the record, I say this as someone who enjoys Rust)

asdfasdfasdf ,

This is actually unironically a major benefit of Rust - compile time errors are supposed to be for dev mistakes and runtime errors supposed to be for user mistakes. Way easier to debug something at compile time instead of runtime.

Beanie ,

‘it should pretty much never segfault’ uh, isn’t that the entire point of Rust? Unless you’re counting failing a bounds check as a segfault

xoggy , in Some people just can't pace themselves
@xoggy@programming.dev avatar

Think about it though. When people say they want to “code AI” what they typically mean is they want to play with prompts and waste electricity on garbage models, not actually write any of the underlying models that power AI.

dimath ,

Well yes, but also people can use TenserFlow and other AI tools without learning how to properly code. And they can also get the results they want. So be afraid of the question “do you really need to know how to code” anymore.

Phoenix ,
@Phoenix@programming.dev avatar

If you want to disabuse yourself of the notion that AI is close to replacing programmers for anything but the most mundane and trivial tasks, try to have GPT 4 generate a novel implementation of moderate complexity and watch it import mystery libraries that do exactly what you want the code to do, but that don’t actually exist.

Yeah, you can do a lot without writing a single line of code. You can certainly interact with the models because others who can have already done the leg work. But someone still has to do it.

CeeBee ,

There’s a huge gap between “playing with prompts” and “writing the underlying models” and they entire gap is all coding.

Phoenix ,
@Phoenix@programming.dev avatar

It really is big. From baby’s first prompting on big corpo model learning how tokens work, to setting up your own environment to run models locally (Because hey, not everyone knows how to use git), to soft prompting, to training your own weights.

Nobody is realistically writing fundamental models unless they work with Google or whatever though.

mrnotoriousman ,

I've even heard people try and call slightly complex bots "AI" and claim they can code them (or their friend totally can lol). It's infuriating and hilarious at the same time.

Phoenix ,
@Phoenix@programming.dev avatar

w++ is a programming language now 🤡

philm , in when you see this posture you know the code gonna be fire

And yet, he’s using the mouse and an Apple keyboard.

Where’s mech-vim-hacker-typer-power?

dept ,

he’s at an apple store

ImplyingImplications , in unrolling loops is efficient, right?
addie , in Javascript is the most popular scripting language in use today
@addie@feddit.uk avatar

Javascript might be the most widely-used scripting language in use today, due to its browser dominance. Most popular would imply that it’s not completely despised by everyone that has to use it, which is misleading. Even TypeScript tutorials are about 50% ‘you have to understand what Javascript does wrong here’.

Guilvareux , in Too close to home

Oh and .clone()

Vlhacs , in It's almost done

I try to remember to always under promise expectations. Even after all these years I keep forgetting that a simple change is never really that simple and has lots of overhead.

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