Gemini took 4 seconds to answer this prompt: "Here is a number 4200020010101. Think deeply about it and tell me if it is not or or not even."
So if you're concerned with privacy issues, you can run the assembly version proposed in the article locally and be well within the same order of performance.
Let's thank the author of the article for providing a decent alternative to Google.
ah, but the license is not that good we can't reproduce his code.
Selection sort is arguably the easiest sort, and arguably the easiest to see that it is correct. Given an array a with n elements A[0], A[1], ..., A[n-1], let the notation A[x:y] mean the set {A[x], A[x+1], ..., A[y]}.
for i = 0 to n-1
find an index j in A of the smallest member of A[i:n-1]
swap A[i] with A[j]
I think that selection sort is easy to understand and easier to see that it is correct because it can be separated into a two array version. Given input array A and an empty array B, do this:
while A is not empty
find a smallest element of A
append that to B
The in place version earlier is essentially that, just storing B and A together in one array.
That is something most non-programmers could easily come up with for physical sorting. For instance you have a row of books on a shelf that are in random order, and you want to move them to another shelf and have them sorted by author's last name.
1. Scan the first row to find the book that should come before all the rest on that row.
2. Move it to the end of the books on the second row.
3. Repeat until all the books have been moved.
Selection sort is in a sense just a computer implementation of a procedure that ordinary people have a good chance of coming up with when they need to sort physical items.
Selection sort performs better than bubble sort on random data. They are both O(n^2) but selection sort will perform fewer writes.
If you deal with data that is mostly already sorted though then bubble sort with early stopping is O(n) and wins.
With bubble sort I can't think of a two array version that makes it easier to understand. I also don't think many ordinary people would come up with bubble sort when sorting say their bookshelf.
There's also insertion sort. The two array version would be
while A is not empty
take the first element of A
insert that into B keeping B sorted
In bookshelf form
1. Pick a book from the first row.
2. Find where that belongs in alphabetical order in the second row and put it there.
3. Repeat until you run out of books on the first row.
I think this is what most ordinary people who don't come up with selection sort would come up with.
The two array form can be converted to in place the same as selection sort.
Insertion sort is, like the others O(n^2). Like selection sort it is faster than bubble sort on random data. Unlike selection sort whose runtime is about the same no matter how the data is ordered, it is fast on almost sorted data.
Here's all three (bubble, selection, insertion) illustrated by folk dancers:
Almost all talks by Geoffrey Hinton (left side on https://www.cs.toronto.edu/~hinton/) are in very approachable if you're passingly familiar with some ML.
I am thinking about opening my own shop, distinguished by digitally sovereign offerings, for instance, Stormshield over Cisco, Proxmox over VMware, Matrix/Element over Microsoft Teams, Nextcloud over SharePoint...
I've been doing m365 and azure for more than three years by now and I just feel terrible. Especially regarding some of our customers, which are small gGmbH (kind of NGO). Instead of making a secure, privacy focused offering we just sell them the usual m365 package. We basically push them into the data industrial complex just to get some collab tools and mail.
You're right that everyone should be using X-Frame-Options: DENY (for ancient browsers, plus CSP for newer browsers), but the author managed to pull it off on Google Docs. If even Google can't consistently stick to it, I feel like I should be worried.
The discussion is about triangles in hyperbolic space. In hyperbolic space, if you keep extending a triangle's lines out by moving the intersection farther away, you'll tend toward a triangle with a constant area (pi in the article because the curve was chosen for that, you can have any arbitrary finite value you want by varying the curvature) even though the perimeter keeps going up.
If that sounds like so much technobabble, that's because this article assumed what I think is a very specific level of knowledge about hyperbolic space, as it doesn't explain what it is, yet this is one of the very first things you'll ever learn about it. So it has a rather small target audience of people who know what hyperbolic space is but didn't know that fact about triangles. If you'd like to catch up with what hyperbolic space is, YouTube has a lot of good videos about it: https://www.youtube.com/results?search_query=hyperbolic+spac... And as is often the case with geometry, videos can be a legitimate benefit that is well taken advantage of and not just a "my attention span has been destroyed by TikTok" accomodation.
Including CodeParade's explanations, which are notable in that he made a video game (Hyperbolica) in which you can even walk around in it if you want, with an option for doing it in VR (though that is perhaps the weirdest VR experience I had... I didn't get motion sick per se, but my brain still objected in a very unique manner and I couldn't do it for very long). It's been out and on Steam for a while now, so you can run through the series where he is talking about the game he is in the process of creating at the time and go straight to trying it out, if you want.
I think you're both right. But there are two ways to do what you said and you didn't specify which one.
First, a rectangle of height 1 and width 1/2. The perimeter is 1 * 2 + 1/2 * 2, two sides of height 1 and two sides of width 1/2.
You "glue" the second rectangle. As one may understand this, you glue them by putting them one beside the other standing up, i.e. you glue them along one of the heights. Sorry for the crude ascii art:
Now you have a single rectangle, height 1, and width 1/2 + 1/4. The perimeter is 1 * 2 + (1/2+1/4) * 2. The "added perimeter" in this step is just 1/4 * 2 = 1/2.
Go on doing that and for a rectangle of width 1/n, you only add 2 * 1/n to the perimeter. In the end you get a single rectangle with height 1 and width 2. The perimeter is 2 * 1 + 2 * 2.
---
Now, maybe, you may want to specify that you glue the rectangles along their widths, not their heights.
That way, the resulting shape when you add the second rectangle is not a rectangle but an irregular shape with 6 sides. Sorry for the crude ascii art again:
The added perimeter now is exactly 2 * 1 on each step. Now the final perimeter is infinite but the area is not.
But you didn't specify this option over the other one. And, honestly, if we talk about putting rectangles in a sequence, I think it's more common to think of the rectangles as standing up side by side with their heights together as in the first option. For the second option I would describe the rectangles as having a fixed width of 1 and decreasing heights.
I also have it set up to do adaptive theme, so in light mode the galaxy is mostly just a little noise on the black text but in dark mode it’s like I’m piloting a space ship. Highly recommend.
Here's my `npm` command these days.
It reduces the attack surface drastically.
alias npm='docker run --rm -it -v ${PWD}:${PWD} --net=host --workdir=${PWD} node:25-bookworm-slim npm'
- No access to my env vars
- No access to anything outside my current directory (usually a JS project).
- No access to my .bashrc or other files.
A black hole, or neutron star, would make much more sense in that scenario than a white dwarf.
A white dwarf smaller than the moon seems unlikely, if not impossible. If it were that small, unless it was in the (fast) process of collapsing to a neutron star, it wouldn't have enough mass to remain that compact.
A neutron star or black hole would work fine, because both can easily have radii much smaller than the Moon's.
> “There are just so many things wrong with [the idea of a white dwarf inside the moon],” says Romer. “Now, a white dwarf is a very compact object. But, you know — people have heard of neutron stars — neutron stars are ultra-compact objects, they’re a few tens of kilometres across. White dwarfs are actually about the size of a normal star.”
You can come up with scenarios where white dwarfs are much smaller than a star, but smaller than the Moon is iffy at best.
As for the Dyson sphere idea, the biggest problem with it in this scaled-down scenario is stability. You can't exactly support it with struts, or something.
On that subject, I highly recommend the video "dyson spheres are a joke": https://www.youtube.com/watch?v=fLzEX1TPBFM , by astrophysicist Angela Collier. But you need to either watch all 53 minutes, or skip to near the end, to find out just how literal the title is.
And he tried to disprove the general conjecture, that every convex polyhedron has the Rupert property, by proving that the snub cube [1] doesn't have it. Which is an Archimedean solid and a much more "natural" shape than the Noperthedron, which was specifically constructed for the proof. (It might even be the "simplest" complex polyhedron without the property?)
So if he proves that the snub cube doesn't have the Rupert property, he could still be the first to prove that not all Archimedean solids have it.
Rather interesting solution to the problem. You can't test every possibility, so you pick one and get to rule out a bunch of other ones in the same region provided you can determine some other quality of that (non) solution.
I watched a pretty neat video[0] on the topic of ruperts / noperts a few weeks ago, which is a rather fun coincidence ahead of this advancement.
I'm personally a big fan of asymmetrical games. A game I've wanted to play but have never had the board to play it on is Unlur [0]. Arimaa [1] is another one with some history behind it that is uncommon.
It is very much appreciated that I don't have to make an account to play. That is one of the most annoying thing on sites like these to play games.
There is a lot of good news in open source audio these days. Also see this video presenting the work done and planned for the future version 4 of Audacity: https://www.youtube.com/watch?v=QYM3TWf_G38
"Given that our civilization is unable to assimilate well even those concepts that originate in human heads when they appear outside its main current, although the creators of those concepts are, after all, children of the same age—how could we have assumed that we would be capable of understanding a civilization totally unlike ours, if it addressed us across the cosmic gulf?"
Not Tom Scott, but Dylan Beattie has done a handful of interesting talks[1] effectively on "there's no such thing as plain text" which in part covers this sort of thing. In fact, I think your Danish cities list is actually one of his examples.
The best part is one of the cited articles: "Rebuttal of Sweatman, Powell, and West's "Rejection of Holliday et al.'s alleged refutation of the Younger Dryas Impact Hypothesis"
A rebuttal of a rejection of an "alleged refutation". You can tell there's a lot of academic egos involved here.