programming.dev

devilish666, to piracy in Special Ubisoft announcement
floofloof, to programmer_humor in Infinite Loop

Can we arrange some swaps? I’m not getting paid enough and neither are you.

jubilationtcornpone, to programmer_humor in Infinite Loop

Project A: Has 6 different implementations of the same complex business logic.

Project B: Has one implementation of the complex business logic… But it’s ALL in one function with 17 arguments and 1288 lines of code.

“The toast always lands the buttered side down.”

QuazarOmega,

Project B is just called neural network

CanadaPlus,

Actually, I bet you could implement that in less. You should be able to legibly get several weights in one line.

QuazarOmega,

You have my interest! (Mainly because I don’t know the first thing about implementing neutral networks)

CanadaPlus, (edited )

At the simplest, it takes in a vector of floating-point numbers, multiplies them with other similar vectors (the “weights”), sums each one, applies a RELU* the the result, and then uses those values as a vector for another layer with it’s own weights (or gives output). The magic is in the weights.

This operation is a simple matrix-by-vector product followed by pairwise RELU, if you know what that means.

In Haskell, something like:

layer layerInput layerWeights = map relu $ map sum $ map (zipWith (*) layerInput) layerWeights

foldl layer modelInput modelWeights

Where modelWeights is [[[Float]]], and so layer has type [Float] -> [[Float]] -> [Float].

  • RELU: if i>0 then i else 0. It could also be another nonlinear function, but RELU is obviously fast and works about as well as anything else. There’s interesting theoretical work on certain really weird functions, though.

Less simple, it might have a set pattern of zero weights which can be ignored, allowing fast implementation with a bunch of smaller vectors, or have pairwise multiplication steps, like in the Transformer. Aaand that’s about it, all the rest is stuff that was figured out by trail and error like encoding, and the math behind how to train the weights. Now you know.

Assuming you use hex values for 32-bit weights, you could write a line with 4 no problem:

wgt35 = [0x1234FCAB, 0x1234FCAB, 0x1234FCAB, 0x1234FCAB];

And, you can sometimes get away with half-precision floats.

QuazarOmega,

That’s cool, though honestly I haven’t fully understood, but that’s probably because I don’t know Haskell, that line looked like complete gibberish to me lol. At least I think I got the gist of things on a high level, I’m always curious to understand but never dare to dive deep (holds self from making deep learning joke). Much appriciated btw!

CanadaPlus,

Yeah, maybe somebody can translate for you. I considered using something else, but it was already long and I didn’t feel like writing out multiple loops.

No worries. It’s neat how much such a comparatively simple concept can do, with enough data to work from. Circa-2010 I thought it would never work, lol.

prof, to programmer_humor in Infinite Loop
@prof@infosec.pub avatar

Recently switched jobs from maintaining a 15 year old Windows Forms .NET Framework legacy codebase.

At the new job we stick to Clean Architecture, use unit and integration tests, have a code generation tool, actually make nice use of generics and use dependency injection. Also agile processes, automatic build tools, whatever. The difference is night and day and I’m so glad my ex boss fired me because I told him he’s an asshole and his codebase is shit.

LeafOnTheWind,

My first job out of college I have been able to see a steady improvement in the codebase. A little while ago I had to go back to an old tag and was horrified with what it used to be and impressed how much it improved.

marcos, to programmer_humor in Infinite Loop

As long as their salary keeps increasing, I’d say go for it!

alcoholicorn, to programmer_humor in Infinite Loop

Meanwhile, Dev of company C driving off a bridge, getting laid off after modernizing the 90s era codebase.

Venator, to programmer_humor in Infinite Loop

Sometimes a fresh pair of eyes on a code base can reveal some opportunities for big improvements in maintainability 😜

MajorHavoc,

Ahahhahhahha. Ha…ha. Ahem.

Sorry. The idea that any of the opportunities for improvement at my last “job A” code base might need “revealed” struck me as really funny.

Venator,

Sometimes there’s an opportunity to delete it and start again 😜

tkk13909,

Looks like we found the hr employee! Get 'im Bois!

Venator,

Lol, nah I’m a developer.

gregorum, (edited )

Sometimes it takes a new dev coming in for management to give the greenlight for a major overhaul. It’s shitty, but it’s true.

Feyr, to programmer_humor in Programming: The Horror Game

You have been eaten by a grue

BurningnnTree, to programmer_humor in Programming: The Horror Game

It should play a jump scare sound when you get an exception

Ubettawerk, to comicstrips in Tie on the doorknob

Felipe is such an arbitrary name for a praying mantis! lol

quaddo,

He has a brother named Jesús.

Serpent7776, to programmer_humor in ifn't

I can actually define this in TCL:


<span style="color:#323232;">% proc ifn't {cond cmds} {if {!$cond} {uplevel $cmds}}
</span><span style="color:#323232;">% ifn't false {puts </span><span style="color:#0086b3;">12</span><span style="color:#323232;">}
</span><span style="color:#323232;">12
</span><span style="color:#323232;">% ifn't true {puts </span><span style="color:#0086b3;">12</span><span style="color:#323232;">}
</span><span style="color:#323232;">% 
</span>
fibojoly, to programmer_humor in Programming: The Horror Game

Anti-peeking filter is looking dope! Nobody will be able to look at my screen anymore, me included!

lowleveldata, to lemmyshitpost in Special Ubisoft announcement

Not a game from you, no.

prole, to comicstrips in Tie on the doorknob

Perry Bible Fellowship -esque

trustnoone, to programmer_humor in Programming: The Horror Game

Does anyone remember when something like this actually happened? Maybe it’s the Mandela effect but U sweat at one stage a whole heap of sites were using black/dark mode to save the planet

SqueakyBeaver,

I use it to save my eyeballs

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #