ProgrammerHumor

elephantIsMostAbusedAnimalInIT

elephantIsMostAbusedAnimalInIT
https://i.redd.it/m3fguds9jacf1.jpeg
Reddit

Discussion

abscando

More like tildeMostAbusedSymbol, sometimes it's an operator, an alias or a syntactic element. You know this little squiggle has caused a lot of people a lot of grief.

15 hours ago
Widmo206
:gd::py:

And sometimes it's the home directory

14 hours ago
TOMZ_EXTRA
:j::lua::js:

And it's almost impossible to type on a Czech keyboard!

14 hours ago
rosuav

I should build a language where you do database queries with ~/SELECT .... /~ and call it the elephant operator. The language would come with PostgreSQL bindings and nothing else, because elephants.

11 hours ago
TacticalFaux

It's similar to the symbol for approximation which also is accurate for what it's doing cause the integer division approximates the actual value. So that's how I would remember.

But sure I guess you can also throw elephant trunk in there lol.

11 hours ago
Ronin-s_Spirit
:js:

Don't mind me with my parseInt(22/7). The operator seems neat but I don't know if adding more and more operators to a flexible language is a good idea, this might not be clear to read.

8 hours ago
Eva-Rosalene
:ts::c::bash::powershell:

Why not just Math.trunc(22/7), why convert to string and then parse it, risking getting scientific notation instead of normally formatted number?

parseInt(1000000000000000000000000 / 3) // => 3
5 hours ago
Ronin-s_Spirit
:js:

Where did you see me convert it to a string? Also I just said the first working thing that came to mind.

4 hours ago
MattiDragon

In JS parseInt implicitly converts its argument to a string before parsing

4 hours ago
Eva-Rosalene
:ts::c::bash::powershell:

Where did you see me convert it to a string?

Implicitly, when passing as argument to parseInt

4 hours ago
suvlub

That's potentially lossy

>>> int((2**63-1)/2)
4611686018427387904
>>> (2**63-1)//2
4611686018427387903
2 hours ago
Ronin-s_Spirit
:js:

It doesn't matter, my comment wasn't about that, I wrote JS for years and never had to use parseInt anyway. Why won't redditors let me at least write it in comments, why do y'all think I need corrections??

2 hours ago
suvlub

You wrote it. Well done. We aren't going to erase your comment. We are just remarking on it the same way you remarked on the post. What horrible thing did the designers of Dart do that you get to tell them it's not good idea, while telling you the same is unfair?

2 hours ago
Ronin-s_Spirit
:js:

The difference is that I said something off the top of my head, I didn't design a language syntax with poor readability.

59 minutes ago