HNHacker News
TopNewBestAskShowJobs

ArchieMaclean

282 karma · joined January 21, 2020

submissionscomments
ArchieMaclean··on Autumn Lisp Game Jam 2021
OK, thanks.

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

ArchieMaclean··on Autumn Lisp Game Jam 2021
Is there going to be a theme?
ArchieMaclean··on Record number of environmental activists murdered
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.
ArchieMaclean··on Record number of environmental activists murdered
Of course I'm not "okay with corporate murder".

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

ArchieMaclean··on Record number of environmental activists murdered
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)
ArchieMaclean··on Record number of environmental activists murdered
Ah, that makes a lot of sense.
ArchieMaclean··on Record number of environmental activists murdered
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.
ArchieMaclean··on Record number of environmental activists murdered
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

ArchieMaclean··on You want enabling CSS selectors, not disabling ones
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!

ArchieMaclean··on A new way of blogging about Golang
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?

ArchieMaclean··on Understanding Rust futures by going way too deep
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.

ArchieMaclean··on Julia and the Reincarnation of Lisp (2020)
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/

ArchieMaclean··on Fuckin' user interface design, I swear
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

ArchieMaclean··on The Kilobyte’s Gambit
See also nanochess https://nanochess.org/chess4.html
ArchieMaclean··on Navigate your code like it's 2021
> 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.

ArchieMaclean··on A mundane use of dependent types
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! :)

ArchieMaclean··on The Framework Laptop
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.

ArchieMaclean··on 50 Years Ago, Sugar Industry Quietly Paid Scientists to Blame Fat (2016)
- 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

ArchieMaclean··on Node.js 14 is over 20x faster than Python3.8 for fib(n)
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.

ArchieMaclean··on Why I still Lisp
Can you give an example of where doing this is useful?
ArchieMaclean··on Ask HN: Anyone know any funny programming jokes?
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

ArchieMaclean··on Ask HN: Anyone know any funny programming jokes?
Programmer: I'm going out for a walk.

Programmer's partner: While you're out, could you buy some milk?

And the programmer never returned.

ArchieMaclean··on MuseScore 3.6
I'm a bit worried about performance with QML since already the UI is a bit slow (not much, but noticeable) and switching to JavaScript might negatively impact that. We'll see.
ArchieMaclean··on MuseScore 3.6
[1] should be https://musescore.org/en/MuseScore4
ArchieMaclean··on Ask HN: Show me your half baked project
Thanks :) There's a very heavy focus on gracenotes in piping - that's probably the main difference. There are a lot of different embellishments (probably more than 200) used very frequently with 3 to 10 individual gracenotes in them. Most general music notation apps are not so good with dealing with this - MuseScore, for example, has a massive list of all possible embellishments which you have to scroll through to try and find the one you want. PipeScore tries to take advantage of the patterns in gracenotes to reduce the number of options by categorising them (e.g. the 'doubling' class has 27 different embellishments in it, but they are all dependent on the notes immediately before and after the embellishment, so instead of manually choosing the correct doubling you just choose 'doubling' and it automatically gives the right one)

There are other dedicated bagpipe apps but none of them are as frictionless as I'd like.

ArchieMaclean··on Ask HN: Show me your half baked project
https://github.com/macarc/PipeScore music notation for bagpipes.

I started this a year and a half ago and I keep throwing it away and restarting, but I'm hopeful for this iteration.

I haven't got around to making a README yet unfortunately.

ArchieMaclean··on Python at Scale: Strict Modules
e.g. say you're writing some code that does something like this:

account = queryDatabase(email)

updatedUser = update(account)

ping(account)

queryDatabase returns a dictionary. Later on, someone decides that a single username can have multiple accounts, so someone changes queryDatabase to return a list of dictionaries instead of a single dictionary. Now the above code is broken, since update expects a single dictionary. Of course, you could grep through the whole codebase to try and find all the problems, but it would be easier and less prone to human error to rely on the type system to fail, especially if the change was something less contrived, and if changes like this were happening all the time.

The effect of this could be limited by other means (e.g. naming the function better) but type systems are just another way of adding robustness to a program.

ArchieMaclean··on Playing chess is a life lesson in concentration
...unless it's bullet
ArchieMaclean··on Ask HN: Which general programming language is good for learning/exploring math?
Julia[1] It has Python-like syntax, macros, and is general purpose while being designed for maths/science.It runs on LLVM so performance is great [2]. It supports easily writable matrices and Unicode maths symbols.

You may be interested in a free online MIT course about 'computational thinking' that's being run right now using Julia. [3]

In not affiliated with Julia or anything, just think it's a really good language.

[1] https://julialang.org/

[2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... (graph at bottom of page)

[3] https://computationalthinking.mit.edu/Fall20/

ArchieMaclean··on Show HN: Random Roads
The code is at https://repl.it/@EdwardCunningh2/Random-Roads
← PreviousPage 2 of 3Next →