180 comments

[ 4.4 ms ] story [ 208 ms ] thread
Here is a rudimentary alerting system I could write quickly in shell and execute on my laptop:

  while true; do echo ok | nc -l 8000; for i in 1 2 3 4; do printf '\a'; sleep 1; done; done
While the above command worked fine on macOS with the default /usr/bin/nc, on Debian 11.2, I had to modify the above command as follows to make it work:

  while true; do echo ok | nc -q 1 -l -p 8000; for i in 1 2 3 4; do printf '\a'; sleep 1; done; done
Now anytime someone connects to port 8000 of my system by any means, I will hear 4 beeps! The other party can use whatever client they have to connect to port 8000 of my system, e.g., a web browser, nc HOST 8000, curl HOST:8000, or even, ssh HOST -p 8000, irssi -c HOST -p 8000, etc.

If your port 8000 is already occupied, I recommend port 41327 as an alternative for this alerting service. After all, 41327 reads "ALERT" in leetspeak.

By the way, visit http://susam.net:8000/ right now to send me some beeps! :)

I bet you're having a fun morning with the beeps :-)
Indeed I am! HN readers are a fun group. I am receiving beeps almost every second, so I updated my previous shell script to keep a record of the connections netcat receives. Also, converted the beeping loop to a background job, so that the outer netcat loop does not have to wait for the inner beeping loop to complete before handling the next connection. Notice the '&' before the last 'done' in the improved alerting service below:

  while true; do (echo ok | nc -q 1 -vlp 8000 2>&1; echo; date -u) | tee -a beeper.log; for i in 1 2 3 4; do printf '\a'; sleep 1; done & done
Here is a log of the timestamps of the connections received so far: https://gist.github.com/susam/159c7d92659b3185eb0b0d683998a3...
DDoSaS.

Distributed denial of service and sleep. Nice work.

Now I know you can programmatically push to Github gists, thanks!
neat! here's mine:

  while true; do curl -q --http0.9  http://susam.net:8000/; sleep $(( $RANDOM % 10 )); done
> This site can’t be reached - REDACTED refused to connect.

Am disappointed and my day is ruined

In the written command you can see that nothing serves a HTTP server, so the peep works even though you dont get a response.
The error is that it doesn't connect, not that it doesn't serve an HTTP response.

But now it connects, correctly.

This sound like a great way to prank someone’s laptop you have access to!
On macOS you can replace printf '\a' with something nicer like 'say Lunch time!', or accept a query param and 'say $msg'

while true; do echo Coming! | nc -l 8000; for i in 1 2 3 4; do say "Lunch time!"; sleep 1; done; done

If you are on the client end of the equation and have ssh access to their mac: ssh user@host say "get your ** here right now"

Almost anything is less nice than BEL for me, since I've had terminals set to flash-on-BEL for decades.
It's essentially the Hacker News Hug of Deaf.
Thank you, sending you 4 beeps and seeing that 'ok' was the most web-based fun I had in a very long while!
Batman made exactly the same thing for Commissioner Gordon to use… the Bat Signal.
Are you saying Batman and Commissioner Gordon were a thing?
(comment deleted)
Robin isn't going to like where this is going
(comment deleted)
Brings back memories! I've had several such hacky things for my GF (now wife) and vice-versa.

`eject` + a post-it on the CD-rom tray 'Hey, look behind you!'

`ssh my-machine.local espeak 'dinner is ready'` or `ssh her-machine.home espeak "please pick up the phone! important!"`.

With a simple button exposed via a .desktop file.

This seems to be worse than just having your girlfriend send you a DM on Discord. Discord will make a noise and show you a notification. Discord will also show you that you have an unread message where with this it's easy to miss (what's probably a LED) flash 6 times in 5.7 seconds.

Being able to attach a message also lets you get some context on what she may need. It might not be that urgent.

Building something to show her you care: priceless
+1.

As software engineers I think we should explore more the part of our skills that can create things that are not useful per-se, but creative and funny, such as the best gifts (at least for me) are

I plan on giving my mother a prison tattoo gun for Christmas this year as a joke gift (she’s really not happy I got a tattoo, despite living 3000km away). Does that count?
My boyfriend once presented me with a 3-doors game for my birthday. I was to click one door for my present. I wandered around all day trying to decide which one to choose and when I did, the other two doors disappeared and my warm and snugly new bathrobe was revealed. I married that guy about as fast as I could and twenty-six years later he's still good for a digital surprise. :-)
Yeah, forcing her to use Discord just to get his attention.
Pretty much everyone uses Discord now. It's not about forcing her, it's about using a chat program you use already. If you two happen to not use Discord to talk to each other surely there is some other app which you use to communicate with each other.
> Pretty much everyone uses Discord now

This statement is indicative of living in a bubble but being unaware that it exists.

It's likely that someone's girlfriend is in the same bubble as themself.
This is yet another generalization that doesn't hold true for the vast majority of the couples that I am aware of.

(scope = me) != (scope = the world)

Your bubble is unique to you, even if it seems like that's the whole world because you haven't seen much outside of your bubble (almost by definition) that does not mean that you are going to be able to generalize outside of your bubble from data collected inside of it except for the most obvious of cases.

> Pretty much everyone uses Discord now.

Errm. No. Not everyone uses Discord now. When making general statements like that it always helps to keep a bit of perspective: am I or am I not involved in a crowd that on average is more likely than other such crowds to be using piece of software 'x'?

At any one point in time 'everybody uses IRC', 'everbody uses ICQ', 'everybody uses Messenger' and so on would have all been equally false.

Almost everybody who is not a child in the developed world has a mobile phone. But not all of those are smartphones and there are still large numbers of people in the world who don't have any of this, nor do they have internet access (about 40% of the people, some because they are too young, some too old and some for other reasons), which is a pre-requisite for using something like discord.

By the time you're done with taking all this into account you end up with a paltry 140M MAU, a far cry from 'pretty much everyone'.

friends: all my friends use discord

school: there were various discord groups most people joined

work: Most of my communication with coworkers is over discord

fun: all online communities I'm a part of have a discord server

>But not all of those are smartphones and there are still large numbers of people in the world who don't have any of this, nor do they have internet access

Everyone I know IRL has access to the internet and except for some kids everyone has a cellphone.

By everyone I didn't mean literally everyone. I meant that if I want to chat to someone or about something 99% of the time discord is the place where that happens because that person uses discord or a discord server exists for that topic.

This is just your social circle.

For work it is IRC, zoom, slack. Never been asked, or know a single person using discord.

And here it's email first, phone second, sms if I can't be reached immediately. And I guess there are as many variations on that as there are people, with the number of comms options comfortably exceeding 33.
> By everyone I didn't mean literally everyone.

ok

> I meant that if I want to chat to someone or about something 99% of the time discord is the place where that happens because that person uses discord or a discord server exists for that topic.

But that's a completely different thing than what you originally said ("Pretty much everyone uses Discord now.").

I is the operative part here. Personally I've never used discord, and I don't know anybody IRL that has to the point that they have asked me to join and if they did I would probably refuse. I have enough comms channels as it is.

It is important to realize that when you speak in generalized terms you are usually just speaking for yourself, so better to phrase things that way.

LOL.

GF: "Hey, can you come have a look at this shirt I bought?"

Parent: "Yeah can you please file a JIRA ticket for that, and appropriately tag its priority? I'll get notifications through my regular workflow channels and this will enable me to respond to your requests in a more timely manner! Thanks!"

There is a software for running a house [1] in which you can do meal plan, etc.. (which is nice) but it has also repeating tasks like clean the windows, do the dishes and it was too Work-like for my liking.

[1] https://grocy.info/

Fortunately, having discord running in the background will interrupt you another 1927329 times that day for equally important things
He said he was a gamer, so there is a very good chance he already has Discord open.
Not everyone plays online.
Discord isn't about online playing only. It is also about just being part of some community.
TIL that people that prefer single player games are no longer considered gamers...

I hate multiplayer gaming, and believe that is the single biggest problem in gaming today

//I dont use Discord either

The first discord server I ever joined was for a solo hobby of mine. Discord servers aren't just for multiplayer things.
The point of this project isn't necessarily to make a useful tool but for the author to demonstrate to his girlfriend that he cares about her and is willing to stop what he's doing to listen.
Which is important overall, but not important when engrossed at work unless suitable urgert.

I think that was the point of joke/parent. A GF may abuse this.

I've seen couples break up, because significant others can't understand being present, doesn't mean available.

> A GF may abuse this.

Then he's dodged a bullet by discovering this before he marries her. Either way, it's a no-lose situation.

You're already assuming that A: they use Discord, B: that while he's focused on whatever it is he's doing, he'll pay attention to Discord pings, and C: that someone asked for you to come up with alternative solutions.
Someone just moving by 1 centimeter in the corridor next to me or coughing in any bedroom (if I don't wear my headset) will do.

OH, a bird at the window!!

I'm still able to concentrate. By the way, what was I doing already? (more seriously, I can progress and I am able to get things done and recover from interruptions quite easily, but almost never focused at a point I can't notice what is going on around me. Which suits me well actually)

I have the same thing, I can easily break out of code and get right back in to where I was, I can even pretty much do it with hours break, unless things are going very badly with the code in which case I cannot handle being interrupted.

I wonder if it's my ADHD that does it actually, I can handle quick changes of attention because after all that is what I do, but if things are a problem I need all effort to not switch attention and lose what I am doing.

This code looks like it was written in 2004. Why aren't you using react and nodejs?
Simple is beautiful. Some people don't use frameworks for simple stuff. I sometimes create low-tech websites just using html+css with a minimal jquery. The speed is insane compared to usual web 2.0 sites.
I could make it simpler by using 1 scripting language instead of 2. There are almost as many languages as LoC there.
I think that's my only point of contention.

It's clearly a for fun project but you've already got python there to run the raspi gpio pins why not move the server stuff in there? I'm assuming they learned bare minimum python to get the pi stuff going but that's enough python to run a web server too.

not sure this is a joke or not ... :-) 30MB of dependencies vs a few tens of lines of code? :-)
It's a joke, they're just referencing modern trends in web development and a dose of /r/programmerhumor
Shame no one picked up on the sarcasm.
well phew! relieved. I'll try and instantly pick up on those in the future.. :-)
I don't know, it seems that most here have been burnt-out of humour. To be fair to them, the burn-out is mainly caused by ignorant managers hearing "Node! React!" and forcing on the developers whether it makes sense or not.
Poe's law, ironic content can be hard to differentiate from non-ironic content, and a proliferation of ironic content will bring the quality of HN down.
There could be other reasons that it's downvoted, even if it's not taken "seriously". The fact that it's a low effort comment that has barely anything to do with the OP, that it's a rehashing of the same old "unpopular opinion" that's not really unpopular here, the fact that it takes a nice little post of a small utility and shifts the tone to something negative just because they have an axe to grind - all of these are other possible options people might downvote this oh-so-ironic comment.
Poe's law: there's nothing so ironic or sarcastic that someone hasn't actually argued for real somewhere. You just can't tell any more.

Besides being in text, HN has an international audience. It's really hard to make jokes land, and you usually need to include an explanation to avoid being downvoted.

SarCasM CaSE AnD EmoJis HaVE thEre PlACE.
One can never be completely sure through text alone, hence such things as the closing sarcasm tag: </s>
Because, as this thread demonstrates, there's a lot of people with Opinions who will unironically push $language on any post that is not about $language, <_<.
NodeJS is last decade; Deno is the one to go for now. But why JS based? Rust is the future, accept no substitutes. It is the perfect language for everything, forever.
Those little /ducks/ Amazon iot buttons are fun for this. I wired one up to their connect service to make a voice call. I would let my kids troll me with it or take it to work to clandestinely make calls to myself when it was advantageous to receive one.
I would love to see open source copies of those. Apparently they use NO power unless you press their buttons which means they can last for years.
100%. Plus they could be way cheaper (i think).
I got some Aqara buttons and switches from cloudfree.shop, they're closed-source but local network (Zigbee) only—combined with Home Assistant, which is open source, I think this is what you want!
I use a wife alert: She Never picks up her phone, that is until I use Home Assistant to flash the lights and have the Sonos say (via HA's tts): "Pick up the Phone!". Very handy.

I know a family where the kitchen table lights turn green when their (temporarily) disabled son needs something and he is upstairs. My mom used to hit the radiator pipes with her wedding ring for that (in the opposite situation).

I have something like this for myself: a server listens for POSTs on LAN, plays a loud customizable sound on speaker, macOS pops up a persistent alert through a Shortcut, and all iOS devices receive an urgent push notification through Pushover. I can hook arbitrary high priority jobs and watchers to it since it only takes an HTTP request to activate.
This is amazing hahahaha :) you can also put an upgrade - Wife Alert for us older. :D
Interestingly the TLDR is longer than the rest of the README.
Wife just sits opposite me and waves her arm.
This is sweet. Now, my wife uses Apple's Find My's "Play Sound" as I'm perpetually on Silent DND and I sometimes do not see her calls (she is in the whitelist and is allowed to use voice calls).

I would like to narrate a personal story from the late 80s. I grew up in a multi-family where my uncles own a lot of vehicles, including the left-handed drive Jeeps from the World War era (India uses Right-Hand Drive). Our siblings were raised by our grandmother. After she finishes cooking lunch, she always have the problem of gathering us around to eat. We would have all gone to the locality and the neighbors to play. She was always frustrated and furious about our lack of timing.

So, I repurposed a truck's horn so she can just press a switch and blow the horn loud enough for us to hear across the neighbors. I had it on the roof-top for quite a while, even after she passed away the next year. Thinking about it now, I know it was pretty reckless. It was so loud, that other families would remind their kids that -- that is the Food-Time-Horn.

We to this day have a cowbell mounted below the stairs to call everyone when dinner is ready
In the French countryside where my father is coming from, every house had an external bell for the diner/lunch whatever important call. You quickly learnt to recognize the different tones and ways to ring the bell.

My parents had also the bell at the bottom of the stairs... and as a father of 3, I understand all the parents having one!

Yeah we used a cowbell- farm living.
My grandmother had a kind of wall-mounted metal xylophone at the foot of the stairs to call the family for meals.
> Now, my wife uses Apple's Find My's "Play Sound" as I'm perpetually on Silent DND and I sometimes do not see her calls

I had this exact problem until I scheduled my DND to automatically turn on during work hours and off afterwards. That has helped immensely

It does not sound like a problem for GP.

Your recommendation, depending on apps installed, could lower their quality of life. Proceed with caution, here.

My mom used a referee's whistle. There were 5 of us and the number of toots indicated which of the 5 she wanted (two toots for me). If we were outside playing in the neighborhood, we'd get alerted directly or indirectly from someone who was tired of hearing the whistle.

If it was dinner time and she needed us all, she'd blow 'Shave-and-a-haircut-two-bits'.

Was your Dad an Austrian naval captain by any chance?
My mom used a cowbell... hadn't thought of that in years
My stepmum used to use a rape alarm to call us back from across the fields back in the 1980s
We had a 6" bell hung next to the back door. The same type as in churches where a rope pulls to get the bongs. It could be heard from a looooong way off. If it rang and we couldn't hear it, we were too far away from what was allowed.
My dad whistled between his teeth. He was a prodigious whistler. As I recall, it was two tones alternating. Too bad we never measured how far away we could hear him whistling, because now I’m wondering. I’d guess half a mile though.
We had a metal tube/pillar supporting the top floor of our self-made summer house and a piece of metal to strike it with. You could hear that for miles!
This may be the same thing as what you call the whitelist, but in case it isn't: on iPhones, you can mark some contacts as "Emergency Bypass On." Even in silent mode, you will always hear calls and texts from them. You can also choose sounds unique to that person. I have the bypass on for my fiancee, and I chose a pleasant, unobtrusive sound for her texts. I have found this works quite well.
Oh my, this is a really great suggestion. I never heard about the emergency bypass before. I'll check it out. Thank you
This is brilliant. I was today years old learning this trick. I will still maintain a whitelist for in-laws, business partners, and others (limit of 20). However, I will add this to the core family (wife, daughters, and home).

For those looking, check this out https://www.igeeksblog.com/how-to-turn-on-emergency-bypass-o...

Great, now you've gone and ruined it for those looking for excuses! Sorry honey, my phone was on silent!
iOS also has a contacts only whitelist, you can set "Silence Unknown Callers" to On.

It's great - my only feature request would be to allow an API for app access so things like door dash, uber, amazon, etc. could be optionally allowed through.

Something I've found is that, in particular for calls, Apple isn't able to retain object permanence around contacts.

If I assign a contact a custom ringtone, I expect all devices to know that, especially if they're going to do the insane Apple thing where every.single.device.I.own rings at the same time.

I swear Apple thinks any call which hasn't been pre-selected for voicemail has world changing importance.

Great suggestion. Surprising Apple hasn’t implemented that.

It’s alarming when both your phone and your computer start ringing. I freeze. I do the same thing when I’m on a call and the options pop up - “hold and accept”, “decline”, or “end and accept”. My brain locks up.

The best is when you try to pause your music on the computer before picking up your phone. Nope, while ringing this either does nothing (for phone calls) or picks up the call on the computer (FaceTime).
I got called by full name when my mother wanted me.
My mother had a heart-shaped "triangle" (about a foot across, so much larger than an orchestral triangle) that she used to call us in when dinner was ready. As a kid who did not enjoy hauling wood, my hearing was exquisitely tuned to hear that bell.
My parents had huge a train bell that they'd ring.
My son always has his headphones on these days, which often makes it hard for us to reach him. I wouldn't mind being able to talk directly into his headphones.
That does sound like a cool app idea.
The child might refuse to install it though.
I'd say it depends on the parents. If the relationship is somewhat healthy, there might be a chance. But those who require their kids to be on constant alert may have a problem.

Source: I grew up with a parent who got multiple times diagnosed with HPD. I would have never installed something like that. Installing and showing how Discord works was already a major mistake.

https://en.wikipedia.org/wiki/Histrionic_personality_disorde...

Really made me think. I would have HATED op's idea - that my experience is suddenly interrupted by a parent. So yes it's definitely up to the people and their relationship.
For headphones to work there has to be a communication platform. I reckon it wouldn't be too hard to pick up a computer yourself, join his channel and talk to him. Wildly depends on your sons age though, I guess I wouldn't have been too keen on my mum having access to my teamspeak when I was 15.
I don't need to hear who he's talking to. I just want an interrupt button to say it's dinnertime, or something like that.
This seems like a nightmare. If I’m focused on something I don’t really want anyone distracting me, especially not a girlfriend.
It somehow bothers me that the TLDR is much longer than the actual text, but nice little tool anyway.
Not only is the TLDR longer than the actual text, it repeats it almost verbatim before adding additional information.
I am glad we found something to complain about on this post. Good job!
If it dings occasionally, it means your girlfriend is trying to reach you. If it dings continuously, it means she's breaking up with you.

Yes, I'm trying to be a little funny but the point is that (outside perhaps work?), you should probably be a bit more engaged with the people that mean something to you.

I really wouldn't assume too much about his situation.

My girlfriend has autism and when I want her attention I need to ask for it like 5 times over a space of 20 seconds, if I don't ask multiple times she will literally forget I even asked in the first place. Sometimes it literally takes a minute. This isn't because she doesn't care about me, it's just how her brain works.

Maybe this is just a better form of communication for him while he's focused on work. Please don't assume ill-intent, it just seems unnecessarily rude.

Out of curiosity, how does your girlfriend react if you just start talking to her without asking attention? (Reason I ask, occasionally I think I might be on the spectrum, and my SO has a habit of just starting to talk to me. Most of the time I miss the beginning, which annoys to no end my SO...)
It's just not processed whatsoever sometimes I catch her attention halfway through but I usually just have to start over again...
(comment deleted)
Different from the person you replied to, but my wife is also autistic, and she does the exact same thing (both needing for me to ask for her attention multiple times and not hearing anything for the first little bit if I don't get it). It used to annoy me but then I realized that was a silly thing to be annoyed about, and I just had to change my mode of talking to her.
I think it's a nice thing to do, in any occasion (except when it's urgent) (friends, coworkers, family,…), to call someone (by saying their name or with a gesture, or something), let them take time to focus on you (and possibly write some note so they can come back to whatever they were doing easily), and then speak.

I know multiple people who need some time to switch to you when they are focused (either they can't listen before, or they can but would lose their track). And that's fine. And they are probably not autistic. They usually don't need to be called multiple times though, that would be a bit annoying but hey, what can one do. I'd probably get used to it.

I don't usually need time to switch to someone interrupting me but certainly don't like it when the other one assumes I'm listening before I showed I'm listening.

I'm very happy that the people I care about don't require me to engage with them constantly. Engaging with them in chats are not the right type of engagement if you ask me. Maybe I'm old.
Or… people who require constant engagement go elsewhere because you’d not giving them constant engagement. ;)
Fine with me. Is this an age thing (I'm 39)? Most of my friend always have their phones on DND, answering usually in a couple of seconds to minutes but sometimes hours, sometimes days... There is not real expectation to answer fast. If you call they do call back soon, usually, or they pick up. Somehow I also find chat apps to have low priority compared to a call. Still I can't imaging a call being high priority, never really been in that situation... At least, unless we are about to meet and didn't pick a date or exact time yet.

Anyway, if any of my friends would be offended by being ignored for some hours, they're going to have bad time in our group.

> you should probably be a bit more engaged with the people that mean something to you

If someone is neurotypical and fully functional... maybe? For someone who isn't, this is basically "try harder to be normal", with all of the guilt and judgement that implies.

For example: Telling a person with chronic clinical depression they have no reason to be depressed and are being ungrateful for having a successful career.

When I don't answer my wife just calls me through the Alexa which is the creepiest ring ever. The sound is so foreign and my hackles rise whenever Alexa does anything on its own so it gets my attention instantly.
Indeed, Alexa make an announcement: dinner is ready!
if you think THAT is creepy, you should tell her to try out the drop-in feature
I need to teach my German Shepherd how to use curl so she can also use this method.
The run.py script indicates this is running on a Raspberry Pi to read GPIO pins i.e. you could literally just hook up a button to a GPIO pin and train your dog to stomp on the button.
It was meant purely as a joke. Even if I built the most elaborate notification system in the world - she basically runs the show. I did a doggy version of 23andme, she is 30% Siberian Husky and 6% Belgian Malinois so the line is blurred between sweet loving companion and psychotic girlfriend.
Was this meant to be cute, or are you actually just telling the world you have a large, therefore dangerous, sled dog, and you haven't trained her? She "runs the show"?

The "psychotic girlfriend" side of untrained large dogs has been known to maul children.

That is quite a conclusion you’ve leapt to. Meant to be cute here. Obviously I run the show, I’m the one who pays the bills and feeds her. But she’s surely not afraid to let you know when she wants something, and doesn’t particularly care if you’re busy with something else.

For the record, most sled dogs are not very large and not particularly aggressive.

I dislike seeing this trope about women being brought into, of all things, a discussion about a dog.
Don't worry, I didn't take you too seriously. But seeing as this is HackerNews, IMO half the fun is coming up with solutions to 1st world "problems" ;)
Any chance you could share the name of the doggy 23andme service? I looked and there are quite a few, but wouldn't know where to start.

We've been meaning to find out what one of our dogs actually is since we've been asked so many times and we have no idea.

Wisdom is the name of the service that I used.
GSD owner here, but her and all of our dogs in the past we've taught to ring a bell hanging from the back door whenever they need to go outside. Great alternative if you don't need/want a dog door.
It’s super easy to teach too!

We also have voice recorder buttons they can use to ask for certain things like brushes, treats, play time etc. but those get much more annoying :)

Bruh, this is a four year old repository with a pretty basic script and you're giving unsolicited relationship advice to someone you don't even know.
(comment deleted)
Haha yeah because one thing a gf (or wife) really appreciates is being ignored ;)
On Android I just star the contact and turn on DND mode. Works flawlessly with one exception - WhatsApp calls.