dev,
@dev@discuss.systems avatar

Just learned about two bit floats, want to use them,,,

dan,
@dan@discuss.systems avatar

@dev meanwhile, in VHDL, booleans can have up to nine different values. That's twice as many as these floats!

https://en.wikipedia.org/wiki/IEEE_1164

ricci,
@ricci@discuss.systems avatar

@dan @dev all my booleans are don't cares

kstatz12,
@kstatz12@discuss.systems avatar

@ricci @dan @dev I sometimes declare a Boolean and never check it just to show how much I don't care

dev,
@dev@discuss.systems avatar

@kstatz12 @ricci @dan i leave lots of such stuff around so the compiler can get the joy of optimizing away most of my code.
I literally wrote an inefficient (but safer as it does not use unsafe code) function today with the comment
// we’ll let the compiler optimize this one

dan,
@dan@discuss.systems avatar

@dev @kstatz12 @ricci one of @irene's first jobs at VMware was to replace every if statement with a switch to see if that made the code size smaller.

Narrator: it didn't.

ricci,
@ricci@discuss.systems avatar

@dan @dev @kstatz12 @irene I'll have my next new student put every line of code in single-case switch statements to see if the compiler is any good

dan,
@dan@discuss.systems avatar

@ricci @dev @kstatz12 @irene 20+ years ago, I read a webpage about object-oriented programming that said, without a hint of irony, "every if statement is a lost opportunity to use dynamic polymorphism" and that phrase has been living in my head since

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • megavids
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • JUstTest
  • lostlight
  • All magazines