News for hackers. Stuff that matters.
Re:Lua Is So Underrated by gerdesj on Thursday December 26, 2024 @08:51PM (#42519332)
"Don't forget that not equals is ~=, the horror."

I get you are taking the piss but ~= is just as logical as != being the symbols for: "not equals", if you've been exposed to some math(s) as well as ... well, ! means factorial, doesn't it?

Syntax is syntax and so is vocabulary! In the end you copy and paste off of Stack Exchange and all is golden 8)

Re:Lua Is So Underrated by ctippett on Friday December 27, 2024 @12:37AM (#42520178)
I'm more familiar with CSS than I am with Lua. The syntax for the former has a very different meaning[1].

  [attr~=value]
  Represents elements with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_s...
Re:Lua Is So Underrated by bingo3131 on Friday December 27, 2024 @02:22AM (#42520510)
! is commonly used as the unary not operator, so "a != b" makes sense as a shortcut for "!(a == b)". a not equals b.
Re:Lua Is So Underrated by xigoi on Friday December 27, 2024 @07:18AM (#42521586)
But in Lua, the unary not is written as “not”.
Re:Lua Is So Underrated by astrobe_ on Friday December 27, 2024 @08:18AM (#42521838)
For a language apparently inspired from Wirth, one would have expected <> (greater-or-lesser-than). But the real horror, to me, is Windows not letting one disable the so~called "dead keys" easily.