News for hackers. Stuff that matters.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by jwandborg on Tuesday October 17, 2017 @03:37AM (#15489263)
S?he probably listened to the keyup event instead.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by iaml on Tuesday October 17, 2017 @05:30AM (#15489652)
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by jwandborg on Tuesday October 17, 2017 @09:11AM (#15490592)
Thank you, that is much better than

    /S?he|\w+kin|.*/
This irrational regular expression is an attempt at comedy.

On a serious note, I was looking for that word, but failed to remember it[0].

[0] https://news.ycombinator.com/item?id=15490542

Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by Legogris on Tuesday October 17, 2017 @04:28AM (#15489434)
You'd have to listen to both, right? Otherwise it'd be the same issue when the user tabs into the password input rather than out of.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by thomastjeffery on Tuesday October 17, 2017 @05:32AM (#15489660)
No.

You could listen for the keydown, but you wouldn't hear it, so you may as well ignore what you can't hear.

Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by michaelmior on Tuesday October 17, 2017 @06:39AM (#15489902)
You should get a key down event when moving into the password field since you're coming from a field which is not secure.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by dangero on Tuesday October 17, 2017 @02:02PM (#15493138)
Yes you're right. I made a variable that tracked the current state of keyup keydown and could detect this special case.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by Void_ on Tuesday October 17, 2017 @03:57AM (#15489319)
His name is Dan ...
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by jwandborg on Tuesday October 17, 2017 @09:04AM (#15490542)
- I did not read their username.

- I did not click through to their profile.

The cause for both of these is that my mobile HN experience is horrible for me (a lazy person).

I spent a few seconds looking for a word to replace "She/He", when none came to mind I fell back to a regular expression[1]. As iaml pointed out[2] (along with others) https://en.wikipedia.org/wiki/Singular_they is the proper solution to this issue, and I will try to remember that in the future.

---

[1] as we so often do in our daily lives.

[2] https://news.ycombinator.com/item?id=15489652

---

In my second attempt at comedy today, Trying to perform the error-prone art of interpreting genders based on usernames, the best I came up with for you is

    /^\0_$/
Feedback welcome, this is my first attempt at matching null in a regular expression.

I'll explain the joke, so that no-one feels left out: I interpret name "Void" as gender "null", then carry the underscore over, using artistic license, to make the regex more interesting.

Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by Moter8 on Tuesday October 17, 2017 @04:25AM (#15489423)
People don't first go to the user profile to look for a name. dangero seems like a random nick
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by zbentley on Tuesday October 17, 2017 @08:21AM (#15490308)
dangero . . . us?
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by dan1234 on Tuesday October 17, 2017 @05:14AM (#15489600)
Dan could be short for Danielle or Danika or…
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by jen729w on Tuesday October 17, 2017 @07:09AM (#15490018)
People always assume I’m “Jen”, female, which is often enlightening. They’re my initials.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by novium on Tuesday October 17, 2017 @04:07AM (#15489357)
Still not a reason to assume things here.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by kupiakos on Tuesday October 17, 2017 @04:44AM (#15489492)
Should just default to the singular they then.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by jwandborg on Tuesday October 17, 2017 @09:06AM (#15490557)
My fault. I'm more comfortable with regular expressions than the English language.
Re:Swift-Keylogger – Keylogger for MacOS written in Swift us... by eradicatethots on Tuesday October 17, 2017 @09:40AM (#15490777)
Is it just me or is none of this a big deal?