state_electrician ,

The best Hello World I saw used a random library. Because there's no true random without hardware, the author figured out the correct seed to write Hello World with "random" characters. I've used that to show junior devs that random in programming doesn't mean truly random.

Mikelius ,
@Mikelius@lemmy.ml avatar

What is that weird >>=== symbol? Looks like a cross breed between C and JavaScript here.

underscore_ ,

It’s a the right shift assignment operator so x >>= 4 right shifts x by 4 and assigns the result back to x. The code editor is displaying single double wide symbol (ligature) instead of the three character long operator >>=, I discovered today these are in fact well loved by some coders.

underscore_ ,

LGTM. Though do people really code with ligatures turned on?

Edit: Ok so there are some big advocates of ligatures, I’m going to have to give them a second chance. I’ll try for a week, and either way that Fira Code font looks great.

kogasa ,
@kogasa@programming.dev avatar

Yes, with Iosevka font

tyler ,

Ligatures make code way easier to read, especially if you’re using lambdas or a language with different comparison operators than “normal”.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines