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.

Zuberi ,
@Zuberi@lemmy.dbzer0.com avatar

Genius honestly

balance_sheet ,

I unironically love return 👎

ICastFist ,
@ICastFist@programming.dev avatar

I think you could pull a similar breach of geneva conventions quite easily with Nim, probably even beyond what you can with C++

No, I’m not intelligent, nor crazy enough to try that

S3verin ,

Ive written a transpiler for JS that allows emojis. I call it emojs: github.com/f-kirchhoff/emojs

sznio ,

Surprisingly more readable than standard C++

nothacking , (edited )

This just prints:


<span style="color:#323232;">💩
</span><span style="color:#323232;">🍊
</span><span style="color:#323232;">🍉
</span><span style="color:#323232;">🍉
</span><span style="color:#323232;">🍍
</span><span style="color:#323232;">🍎
</span>

Line 38 and 39 just check if a function that always returns false is false and if so, prints “💩\n”. (C++ uses the bit shift operator for file IO for some reason)

Line 41 creates a vector of shared pointers to an abstract class, or in other words, an array of functions. Each function prints the emoji, mostly the same as the name, but not always. ( 🍒 is the exception, it prints “🍉\n”)

43 and 44 just loop over the array and call every function inside, printing a bunch of emoji.

Line 46 returns the result of std::rand(), but because the programer forgot to call srand, the result is always the same (1804289383 for me).

(There are also a few missing includes, but I doubt this is intentional)

flashgnash ,

Now imagine the poor sod who gets this as an interview question

“Please extend the following code in the same code style to sort [😀,😃,😄,😁,😆] using bubble sort”

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