TonyToniToneOfficial,
@TonyToniToneOfficial@lemmy.ml avatar

Last one should be // still a student

xmunk,

Every single entry other than thief is “still a student”

pomodoro_longbreak,
@pomodoro_longbreak@sh.itjust.works avatar

Yoink.

Actually I’ve probably been all of these at various times in my career.

Windex007,

I use 8, but only when I’m operating on unsigned longs.

scroll_responsibly,
@scroll_responsibly@lemmy.sdf.org avatar

my $max = $x > $y ? $x : $y;

affiliate,

here’s another mathematical approach (that has the added benefit of only working when x and y are both positive).

let f denote the linear functional on ℝ^2^ defined by f(1,0) = x and f(0,1) = y (and extend by linearity). then the operator norm || f || is equal to max(x,y).

crandlecan,

I’m mostly lost and in over my head

GTG3000,

Why use const max = (x, y) => x > y ? x : yinstead of function max(x, y) { return x > y ? x : y } ?

dinckelman,

2, but I’m incredibly embarrassed to say that I’ve had to do 9 before

tigerhawkvok,

9 is objectively better if you have untrusted inputs and need a stable failure mode.

dinckelman,

That was precisely the reason. I prefer strongly typed languages languages, so it just felt gross to write that

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines