Better HN
topnewbestaskshowjobs
Log inSign up

ArchieMaclean

282 karma · joined Jan 21, 2020 (6y ago) · 75 submissions

Submissions

comment 5y ago · link · parent

Now that I think about it, I'm not sure I can come up with any non-contrived example (maybe this [1]). I guess what's good is that it fits right into the rest of Vim very nicely, so I can just edit like normal, instead of fiddling with regexes.

[1] https://youtube.com/watch?v=FXCitlsA7eQ

comment 5y ago · link · parent

> In weakly typed languages like TypeScript

I guess you mean JavaScript?

In regards to speed, I really really recommend Vim. Macros are sorely missing in a lot of editors, and they are really a great way to skip a huge amount of repetitive work.

33.

UK Home Secretary considering removing right to anonymity on social media(independent.co.uk ↗)

91 points · by ArchieMaclean · 5y ago · 124 comments

comment 5y ago · link · parent

It's because the paper they are referencing is testing the use of immunosuppressive therapy to treat myocarditis. The conclusion that was reached was that it doesn't work.

Needless to say, that's not how myocarditis is treated in hospitals.

comment 5y ago · link · parent

The source it gives for the mortality of myocarditis is a paper titled "A clinical trial of immunosuppressive therapy for myocarditis" I.e. they were testing a possible treatment. The conclusion was "Our results do not support routine treatment of myocarditis with immunosuppressive drugs."

Referencing this as though it's the true mortality rate is woefully misleading. This is the mortality rate when using this experimental treatment.

In regards to the cardiac arrests and ambulance calls, it seems that the graph almost exactly follows the baseline, except for the two heatwaves. It doesn't say what the baseline is - I guess 2020 figures?

Edit: on further inspection - figures 1a,b,c are from a paper[1] and are showing an increase in cardiac arrest, unconsciousness, e.t.c. however this article ignores 2 graphs from the paper which show a decrease in chest pain and decrease in breathing difficulty, both of which are myocarditis symptoms.

I think this article is wilfully misleading.

[1] https://assets.publishing.service.gov.uk/government/uploads/...

comment 5y ago · link · parent

OK, thanks.

I don't know any Lisps very well but I may have to change that :)

comment 5y ago · link · parent

Is there going to be a theme?

comment 5y ago · link · parent

That's a good point. I'm not sure about murders going down with united activists - it seems the people targeted are generally the ones organising activists into groups, so if there were more they might be of greater focus. It's complicated though.

comment 5y ago · link · parent

Of course I'm not "okay with corporate murder".

I just wanted to see some context as to why the rate was increasing.

comment 5y ago · link · parent

While you won't be able to get a hard number of people, you could get a general number/trend (e.g. by counting the increase of people to rallies)

comment 5y ago · link · parent

Ah, that makes a lot of sense.

comment 5y ago · link · parent

Of course we should be doing all we can to prevent murder! It is just always hard to tell with statistics and having a more honest statistic (that, say, shows that murder rates have doubled while number of activists have increased 30%) would be preferable.

comment 5y ago · link · parent

How does this compare to the growth in the number of environmental activists overall?

Edit: it was pointed out below that it's probably more influenced by an increase in environmentally damaging activities such as logging.

Edit 2: Yes, I think that murdering peaceful, innocent protestors is a disgusting act. I'm just questioning the article's use of statistics

44.

Wheel Reinvention Jam(handmade.network ↗)

1 points · by ArchieMaclean · 5y ago · discuss

45.

Asynchronous Programming in Nim(peterme.net ↗)

7 points · by ArchieMaclean · 5y ago · 2 comments

comment 5y ago · link · parent

I think the hard part with this is that because CSS properties are so context-dependent, the compiler would have to somehow figure out a way to translate your simple property into the correct one, without knowing how your HTML is structured.

For example:

.thing { topgap: 10 }

.other { topgap: 10 }

Would have to compile to different things if .thing was in a flexbox and .other was in a grid or a box. Since a lot of HTML is dynamically generated, we don't actually "know" this, and specifying which to use yourself ahead of time defeats the purpose, since you may as well just use the normal CSS properties. This could however work with completely static HTML. Maybe some JavaScript solution could hack on dynamic CSS but I would be sceptical of accessibility and performance in that case.

In the precompiled case, unless all the CSS was outputted using a very limited subset of CSS along with a large "base" CSS file, I don't quite know how it would work.

I hope somebody proves me wrong!

comment 5y ago · link · parent

On mobile, if I put the cursor on any word and press any key (even backspace), the word gets repeated at the current cursor position.

Something to do with touch events not being handled properly maybe?

48.

Learn the workings of Git, not just the commands (2015)(developer.ibm.com ↗)

2 points · by ArchieMaclean · 5y ago · discuss

comment 5y ago · link · parent

Based on my understanding from the article...

Iterators change over space, Futures change over time.

In iterator, every time you call 'next' you get a value until the end when you get nothing. In Future, every time you call 'poll' you get nothing until the end when you get a value.

comment 5y ago · link · parent

Julia has a fair amount in common with Lisp, especially with macros.

You can use metaprogramming to edit the AST of a Julia program, like Lisp. See https://docs.julialang.org/en/v1/manual/metaprogramming/

comment 5y ago · link · parent

My favourite example of this is Sibelius. The 'Quit Sibelius' button is precisely where you'd expect to find the 'Next' button.

This video shows it at 6:33 https://m.youtube.com/watch?v=dKx1wnXClcI&t=6m33s

comment 5y ago · link · parent

See also nanochess https://nanochess.org/chess4.html

comment 5y ago · link · parent

> Search is not a great solution either, since it is rarely used

As a Vim user, I use search all the time, largely because it's so easy (just / and start typing).

I don't have much experience with large code bases, but this looks interesting, and I'll give it a try. If it plays well with Vim emulation it could be great.

comment 5y ago · link · parent

Idris has 'holes', where you tell the compiler that you haven't written this part yet, and it will compile while ignoring the hole.

They're really useful for rapid prototyping, and also for helping you develop, as you can ask the compiler questions about the hole (like what its type is).

The syntax is just `?name` creating a hole called 'name'.

So you don't have to write the whole program, and you don't need to lie temporarily either! :)

comment 5y ago · link · parent

They may be wondering if the BIOS is FOSS.

E.g. LibreBoot https://libreboot.org/

> Non-free BIOS/UEFI firmware often contains backdoors, can be slow and have severe bugs. Development and support can be abandoned at any time.

56.

America's Can't-Do Spirit(axios.com ↗)

2 points · by ArchieMaclean · 5y ago · discuss

comment 5y ago · link · parent

- Oil industry denying climate change [0] [1]

[0] https://www.theguardian.com/business/2016/apr/13/climate-cha...

[1] original source of Guardian article: https://www.smokeandfumes.org/documents/document16

edit: add original source

comment 5y ago · link · parent

JITs work based on assumptions that types/values will stay constant. So, here it probably assumes that it will always be working with integers. So it will be much more efficient in cases like this as it is pretty much pure, simple computation. At worst there could be one deoptimisation when it moves from 32-bit to 64-bit integers, if v8 uses 32-bit integers first.

So it can emit extremely efficient instructions based on this assumption, while CPython struggles along with infinite precision numbers.

Function calls will have a much lower overhead also since it will just be a single `call` instruction.

comment 5y ago · link · parent

Can you give an example of where doing this is useful?

comment 5y ago · link · parent

The GNU Humour [0] collection may be of interest. Also Dylan Beattie has done some great songs on YouTube [1] (I especially like 'Bug in the JavaScript' and 'You Give REST a Bad Name')

Here's a couple I remember from somewhere:

SEO expert walks into a bar...

...tavern, pub, taproom, alcohol, beer, wine, vodka...

Also, tangentially related:

A farmer wants to section off part of his field with a fixed length of fence. He is unsure what the best strategy is so he unwisely calls the local university, who send an engineer, a physicist and a mathematician.

The engineer makes a circle with the fence, declaring it to have the greatest area for any given perimeter length.

The physicist makes a straight line as far as the eye can see in either direction, and says that, to all intents and purposes, it goes all the way around the world and he has fenced in half the world.

The mathematician fences off a tiny one metre area around himself, and says "I declare myself to be on the outside".

[0] https://www.gnu.org/fun/humor.en.html

[1] https://www.youtube.com/user/dylanhat

123