News for hackers. Stuff that matters.

Pete_D

Re:Clear Your Terminal in Style on Thursday March 05, 2020 @03:40PM (#22497931)
Good point, I should have said TTY driver (all my information is from half-remembered reading of https://www.linusakesson.net/programming/tty/index.php, any mistakes are my own).

With respect to rebinding, what is "stty intr ^D" doing if not rebinding the interrupt character to ^D?

I feel your pain about not having SIGINFO though.

Re:Clear Your Terminal in Style on Thursday March 05, 2020 @01:34PM (#22496496)
The terminal can optionally catch some characters and convert them to signals. By default, ^C sends SIGINT, ^\ sends SIGQUIT, and ^Z sends SIGTSTP. Programs can disable that for their own purposes (stty -isig) and you can rebind them to other characters if you want (stty intr, stty quit, stty susp) but I don't know why anyone would these days.
Re:500 Byte Images: The Haiku Vector Icon Format (2016) on Thursday February 20, 2020 @01:56PM (#22377561)
Amiga icons really felt like they were miles ahead of the competition and I'm surprised more of their possibilities didn't take off in other OSes.

- could change the icon for individual files/folders

- could have differently-sized icons

- different icons for unclicked + clicked state

Re:Dawn, a WebGPU Implementation in C++ on Saturday February 08, 2020 @12:13PM (#22276862)
Thanks! I'd actually been looking for that software rendering article for a while as well and couldn't find it.
Re:Dawn, a WebGPU Implementation in C++ on Friday February 07, 2020 @01:05PM (#22268817)
Genuine question from someone looking at toying with graphics programming who had never heard of WebGPU before today: does this mean I should hold off on learning WebGL? How different are the two?
I didn't appreciate how big of a deal washing machines were until mine broke down and I had to do all my laundry in the bathtub for a couple of weeks waiting for a replacement. Hand-washing is a lot more of a workout than you'd expect, and getting things dry without a spin-cycle afterwards is a pain too.
Re:Twitter to label deepfakes and other deceptive media on Wednesday February 05, 2020 @01:48PM (#22249854)
The problem is that this allows a neat loophole in which governments can sidestep any inconvenient civil rights obligations by privatisation of otherwise public space. For a real-life example, see https://en.wikipedia.org/wiki/Paternoster_Square#Occupy_Lond....
Re:Some Useful Probability Facts for Systems Programming on Thursday January 30, 2020 @01:09PM (#22193643)
There are lots of fun ways to smooth out short-term variation in game randomness. This article shows a few used by various Tetris games, with one of them being your deck-of-cards approach: https://simon.lc/the-history-of-tetris-randomizers

One of my favourite techniques not listed there is weighting the probabilities by distance, so individual outcomes get more likely the longer you've not seen them (making the gamblers' fallacy real, I guess).

Re:New brain networks come ‘online’ during adolescence on Thursday January 30, 2020 @12:59PM (#22193538)
Depression has quite a few weird effects on memory, e.g. https://en.wikipedia.org/wiki/Overgeneral_Autobiographical_M...
Re:Let's Destroy C on Thursday January 30, 2020 @12:55PM (#22193503)
Off topic, but in today's bitter and divided world, it's reassuringly wholesome that people can still get together to recite the alphabet in GitHub comments.
Re:The Effect of Cold Showering on Health and Work (2016) on Wednesday January 29, 2020 @01:41PM (#22184261)
> cold showers can be dangerous for people with per-existing heart conditions

I think cold showers trigger the diving reflex[0] ("most noticeable effects are on the cardiovascular system, which displays ... in humans, heart rhythm irregularities"). I don't have a real source for that, but I tried cold showers a few times and found it impossible to breathe when I had cold water spraying on my face, like I could feel my airway closing involuntarily. Warm/hot water doesn't do that.

[0] https://en.wikipedia.org/wiki/Diving_reflex

Re:Luis von Ahn, co-founder and CEO of Duolingo on Tuesday January 28, 2020 @01:42PM (#22172638)
Thanks! Recognizing and remembering tones is one of the things I struggle with most, so I'd use this a lot.

A couple of comments: for 水果, it only accepts shŭi gŭo, not shúi gŭo. I know that is technically correct, but the voice synthesis sounds it out with the sandhi. More a question of philosophy I guess, but thought it was worth mentioning.

Also, it might be nice to have an option that hides the characters, so you're forced to rely on hearing rather than just knowing that e.g. 多 is dūo.

Looking forward to seeing what else you do with it!

> Shrooms seem to be the next wave of legalization an in some ways it seems like it is already partly legal.

Weirdly, fresh shrooms were legal in the UK right up to 2005, when they were put in the same category as heroin and cocaine. I remember walking past shops openly advertising them. (Peyote cactuses too, which according to Wikipedia are still legal.)

Re:Into the Personal-Website-Verse (2019) on Monday January 27, 2020 @02:27PM (#22162824)
May as well chip in: https://petedeas.co.uk

Sometimes I wonder if I should do more with it, but I don't know what.

Re:Into the Personal-Website-Verse (2019) on Monday January 27, 2020 @02:09PM (#22162664)
I hope you keep the pure-CSS version around somewhere, because that is technically amazing. I thought I'd accidentally disabled umatrix when I first saw it.
Re:Luis von Ahn, co-founder and CEO of Duolingo on Monday January 27, 2020 @01:56PM (#22162541)
> App is currently live @ https://fluent.academy

I'd love to try this but I don't have a Google account. Do you have any plans to add registration using an email address?

I've seen a similar accidental case where some internal cable in the PSU had gotten dislodged and was partially in the path of the fan blades, with the repeated contact making a chainsaw-like noise. Luckily it was discovered before the fan cut through the casing on the wire.
Re:The Internet of Beefs on Tuesday January 21, 2020 @01:22PM (#22109742)
Here's a strategy that might help. I mostly read HN logged-out on my lunch break. If I see something I want to comment on, I email it to myself for when I get home. Usually, by then, the urge has passed or I've realised that whatever comment I was going to make was actually dumb.

If that won't help because you can't resist the temptation to log in, I guess you could try "banning" yourself using the noprocrast setting in the HN profile?

Re:Scripting tmux on Saturday January 04, 2020 @09:34AM (#21955058)
This is a common property of software with BSD-ish roots. For example, neither does OpenSSH's ssh.
> When I didn't, I got very itchy skin like an allergy

Any kind of skin reaction to -afinils would scare me off using them entirely, due to the link with Steven-Johnsons syndrome (warning: do not google, or use a text-only browser to do so)

They also tested with synthetic caffeine and coffee-extracted caffeine, but didn't find much difference. Page 6 of the study has a graph, and this excerpt:

> 3.2. Caffeine, independently of its origin, abrogated lipid accumulation via regulation of lipogenic genes in vitro

> Mate tea and fractionated caffeine and decaffeinated samples were assayed for their anti-adipogenic potential in 3T3-L1 adipocytes (Fig. 3). Synthetic caffeine (SC) and caffeine extracted (CO2 super-critical extraction) from coffee (CC) were also evaluated. All samples but DM [decaffeinated mate] significantly (p < 0.05) reduced lipid accumulation (from 20.6 to 40.7%) (Fig. 3A).

We already knew caffeine had various effects on fat metabolism, so the most interesting part of the study is probably the "but not other phytochemicals in mate tea" part.

Re:Windows disk space requirements (log-log scale) on Friday January 03, 2020 @02:18PM (#21949305)
I totally believed that was real until I clicked through to some of the other last-post links.

> The reason you need to install a karaoke captioning library if you want to change your desktop wallpaper

> Why using a can opener backwards doesn’t close the can back up

> Best haircuts for Wi-Fi reception

> Losing weight in 14 minutes a day with PostgreSQL

Re:On Privacy versus Freedom on Friday January 03, 2020 @01:34PM (#21948837)
> XMPP was supposed to solve all those problems when it came out in the early 2000s.

The really frustrating thing is that it almost did. I swear I remember at some point in the mid-2000s being able to send a message from Google Chat to Facebook. I think the option was hidden behind some account flags to enable external messages, but it was there.

Older »