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.

eluvatar , (edited ) in isEven API

The errors are great api.isevenapi.xyz/api/iseven/1.5

~~Sadly it’s not always accurate api.isevenapi.xyz/api/iseven/0~~ Edit: nevermind I’m an idiot

It’s also greatly lacking in number support api.isevenapi.xyz/api/iseven/one

huf ,

zero is even, so i dont see how that one’s wrong

eluvatar ,

Oh you’re right, I’m not sure what I was Ln thinking

xmunk ,

Is even states that it only returns true for even, passing in an odd number is technically unsupported.

frobeniusnorm , in Not mocking cobol devs but yall are severely underpaid for keeping fintech alive

I swear to god, companies are nowadays just picking the solution with the most buzzwords. Any compiler engineering student knows how to write a transpiler from one language to another, while getting this right is a cumbersome task, it still completly automated afterwards. Just hire a few compiler engineering phds and the job is done in at least half a year.

Look what i found after a quick google search:

yggdar ,

You want to translate COBOL to another language? That exists as a commercial product! The complexity is not the syntax though, it is the environment and subsystems surrounding the code. A lot of COBOL is designed for mainframe systems, and emulating a mainframe is complex.

You also end up with code that is still written as if it were COBOL. The syntax for COBOL is the easy part and that is all you can easily replace. Afterwards you’re still stuck with the way of working and mindset, both of which are quite peculiar.

The company I work for recently looked at all of this, and we decided not to translate our code.

BestBouclettes ,

Also, isn’t COBOL extremely fast ? Which is not necessarily true for newer languages

ignotum ,

Rust: am i a joke to you?

Hawk ,

I think that’s mostly because of the systems COBOL usually runs on, not so much because of the language

CanadaPlus ,

You’re probably thinking of Fortran, which is still used for hardcore number crunching in areas like physics.

jaybone ,

Just make the devs learn the language if they don’t know it already. What kind of shitty mid to senior dev can’t learn a new language in a reasonable amount of time.

abraxas ,

I think it’s a matter of expertise. I am stuck dealing with people who write Javascript/Typescript like it’s C# because they’re C# senior devs. It’s not world-ending until issues of speed, scale, or other “why we use best practices” raise their ugly heads. Then it is world-ending. I can only help with so many design standards when you still see everything show up in a classes-and-subclasses mindset with hard-to-catch concurrency bugs. I actually caught a developer trying to spin up a child process to wait on a socket response.

So in FinTech, I can imagine it becomes a bigger deal faster.

driving_crooner , in Programmer tries to explain binary search to the police
@driving_crooner@lemmy.eco.br avatar

I used to do this when having problems while rendering video in my past life.

MonkderZweite , (edited ) in GoOn

My PC’s is now Bob, My router’s Billy…

Nighed , in Merge then review
@Nighed@sffa.community avatar

Kinda acceptable if you have a slow release cadence. Everything needs to be reviewed and fixed/accepted (with defect/US raised) before production though.

Needs to be in a smaller team with decent Devs too though!

018118055 , in GoOn

0/0

NigelFrobisher , in Merge then review

It’s insane to me that gitflow won over TBD and Continuous Integration to the point that this is now considered an extreme position. Not all projects are open source with many remote collaborators.

gatelike , in Merge then review

this made my heart rate go up a little bit in a way that doesn’t feel good

reverendsteveii , in JavaScript's days are numbered

I’ve got a bunch of freeze dried food from my backpacking days. Who wants to jump in on a business selling Y275.76K Survival Kits?

Turun , in JavaScript's days are numbered

That’s because this is the maximum integer that can be stored in a double precision floating point number without loss of precision, lol

interolivary ,
@interolivary@beehaw.org avatar

That’s one thing that really bugs me about Javascript (weirdly enough I’m okay with eg prototypal inheritance and how this works, or at least worked before the bolted on classes that were added because apparently I’m like one of the dozen or so people who had no problems with those concepts). The fact that all numbers are floats can lead to a lot of fun and exciting bugs that people might not even realize are there until they suddenly get a weird decimal where they expected an integer

dadGPT , in JavaScript's days are numbered

please hide this. this is how john connor defeats skynet.

Speiser0 , (edited ) in thisIsGoingToBeASeriousDebate

Definitely left. Right one won’t be optimized. (And there are so many some mistakes in your inline asm…)

TadoTheRustacean OP ,

What mistakes?

Speiser0 ,

Mostly the missing listing of clobbered registers. Other than that it’s mostly just that you’re doing useless things, like manually putting the stuff into the registers instead of letting the compiler do it, and the useless push and pop. And the loop is obviously not needed and would hurt performance if you do every write like that.


<span style="color:#323232;">asm!(
</span><span style="color:#183691;">"syscall"</span><span style="color:#323232;">,
</span><span style="font-weight:bold;color:#a71d5d;">in</span><span style="color:#323232;">(</span><span style="color:#183691;">"rax"</span><span style="color:#323232;">) </span><span style="color:#0086b3;">1</span><span style="color:#323232;">,
</span><span style="font-weight:bold;color:#a71d5d;">in</span><span style="color:#323232;">(</span><span style="color:#183691;">"rdi"</span><span style="color:#323232;">) </span><span style="color:#0086b3;">1</span><span style="color:#323232;">,
</span><span style="font-weight:bold;color:#a71d5d;">in</span><span style="color:#323232;">(</span><span style="color:#183691;">"rsi"</span><span style="color:#323232;">) text_ptr,
</span><span style="font-weight:bold;color:#a71d5d;">in</span><span style="color:#323232;">(</span><span style="color:#183691;">"rdx"</span><span style="color:#323232;">) text_size,
</span><span style="color:#323232;">
</span><span style="color:#323232;">)
</span>

(“so many” was inappropriate, sorry.)

TadoTheRustacean OP ,

I am hopeless at getting the text_ptr simpler than i64::from_str_radix(&format!(“{:p}”, my_string)[2…], 16).unwrap(); How can i get it the normal way?

Speiser0 ,

Just use str::as_ptr().

Here’s an example (disclaimer: I haven’t used inline asm in rust before, expect issues): godbolt.org/z/sczYGe96f

Crow , in Hobbyte
@Crow@lemmy.world avatar

How about a hobnibble?

zqwzzle ,

But what about second hobnibble?

XTornado , in I am God's greatest programmer

Make him unit test it all and then they can do changes that don’t break.

justJanne ,

Often enough, the old code is so badly intertwined that it’s impossible to actually test. Those are the moments where all you can do is nuke it from orbit.

XTornado ,

Well I was going for that… They will surrender before they do any changes.

tooclose104 , in Microsoft Edge could use a win
@tooclose104@lemmy.ca avatar

The weirder thing is I was replacing a users desktop the other day and updating default apps. Edge did its usual “pleas love me” bit but then so did Windows Mail as I was changing it to Outlook 365 of all things…

darcy ,
@darcy@sh.itjust.works avatar

noo dont replace me with another microsoft email program!

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