Stream of Consciousness
Random ramble at the edge of reason.
Sat Nov 21 02:24:05 PM CET 2020
Note for later: NetGear Orbi passwords are made of two english words in lowercase followed by 3 digits. For example bravecream283. If we limit ourselves to the 10000 most common english words, that's 10¹¹ possibilities. This sounds very much manageable.
Wed Nov 4 12:19:36 PM CET 2020
Somehow I find myself dealing with imperial units a lot lately, so here are some tricks to easily compute the (approximate) corresponding SI values:
Pounds to kg: divide by 2, 100 pounds = 50kg
Inches to cm: multiply by 5 then divide by 2, 5 inches = 12.5 cm
Farenheit to Celsius: subtract 32, divide by 2 then add 10%. 120°F -> 120-32=88, 88/2=44, 10% of 44 = 4.4, 120°F=48.4°C
Miles to km: take the next Fibonacci number: 1 1 2 5 8 13 21 34 55 89 144… So for example 80 mph = 130km/h since 8 is followed by 13 in the sequence.
That last trick may sound strange, but it so happens that the conversion ratio is very close to the golden ratio φ=1.6180… and the ratio of one Fibonacci number to the previous one goes closer to φ as we advance in the sequence. It's easy enough to find the first numbers by successively adding in your head or on paper and then you've got a conversion table laid before you. 90km/h? 55mph. Easy.
Thu Oct 22 09:49:13 PM CEST 2020
Isn't it strange that we all have (mostly) clearly defined areas of our brains that happen to both have the same functions from human to human, but also be at the same place?
Maybe it doesn't seem strange yet, but computer neural networks for example don't work that way at all. They start in a generic state and build random connections that are later strengthened by repeated exposition to stimulus and comparison to the right answer. This process does result in different zones, but they are random: training two identical neural networks with the same data will result in different zones.
Furthermore these zones do not follow human logic at all. For example let's take a network trained to recognize hand-written digits. We could expect a human to assign a zone to straight vertical lines, a zone to curves, a zone to angles, a zone to loops... But if we actually train that neural network and study the resulting zones we see that they correspond to unclear areas of the image, without rhyme or reason as far as humans are concerned.
Yet our brains have well defined areas that we all (except exceptions) happen to share and all in the same place. The information of "the map of the brain" must therefore be stored somewhere, and the only place is our DNA. The other possibility is that the map is not stored, but there is a physical or biological reason that this organization is the only one possible, for example if any other configuration results in a deadly biochemical reaction... This seems highly unlikely and therefore I would favor the genetic hypothesis.
Sat Oct 10 12:27:39 PM CEST 2020
Youtube channel recommendation time! I'm not really big on Youtube, but there are some quality content creators out there that I think deserve mention. So here's a disparate list focusing on probably less mainstream channels.
Bernadette Banner, hand sewing historical costumes in a calm and soothing atmosphere. I mean, just listen to the music!
Rex Krueger, making woodwork more accessible by teaching simple techniques and researching affordable hand tools.
Economics Explained, great resource to understand why our world works the way it does with an Australian accent.
Tech Ingredients, If you're into long videos taking engineering and physics projects and pushing them really far really well, this is the channel for you.
Experimental biohacking, GMO design, quantum physics, organic materials... what is there not to love at the Thought Emporium?
Rhystic Studies analyses the art of Magic the Gathering cards. I find it quite enlightening to see such art analysis of a trading card game. Definitely worth watching if you're interested in colors and framing of a painting to communicate an idea
3blue1brown is probably the most well known math channel, but it's not that well known outside of the math groups. If you did some math in your studies but left at some point feeling "I don't get why anyone would study these abstract ideas" then this channel is for you.
Sat Oct 10 11:17:02 AM CEST 2020
So, yesterday I was discussing what math research is all about and I decided on this example: let's imagine that there's a room with a hundred boxes, that are either empty or full, but you cannot see which without opening the box. The room master comes and asks "How many boxes should you open to tell me whether there's at least one full box in this room?".
Now, the question is difficult, and you really cannot say. If no box is full you have to open them all to prove it, if even one box is full you could find it on your first try or on the last. On average if one box only is full you'd have to open about 50 boxes to know... that's a lot. With a sigh you decide to start opening boxes. The 20th happens to be full. You turn to the master and say "I found one after opening 20, so clearly I needed 20". The master then says "But now, can you tell me how many full boxes there are in the room in total?".
You first want to answer "Of course not without opening all of them." but a thought catches your mind. You already opened 20 boxes, one of which was full. You now know that there's a maximum of 81 full boxes in the room including the one you already found. But it would be a real feat of chance to have opened precisely the 19 empty boxes of the room first, so there being 81 full boxes is really improbable. For the same reason 80 full boxes or 79 full boxes are a little more probable but not by much. The box could very well be the only one in the room, but on the other hand you only looked at a fifth of the boxes so maybe 2 is more probable than 1? You start getting an intuition. Maybe you can't tell with certitude how many boxes there are, but you could find the number of boxes that is the most probable.
You start reasoning... You found 1 full box in 20 so, assuming that ratio stands, if there's about 1 full box every 20 boxes there must be around 5 full boxes among the 100 of the room. You cannot be certain of course, but you could compute the probability that there's 1 or 2 or 3 and that you found the first full box on the 20th try and it would show that 5 is the most probable count in the room. All from one full box (and 19 empty of course).
This intuition is interesting, and it has applications! For example, a website I use quite often is https://www.suggestmemovie.com/. The concept is simple, it has a movie database, reload the page and it'll show a movie at random. I happen to be quite picky so I generally keep reloading and noticed that quite often I'd get movies that were already proposed. Nothing really strange there, randomness can very well hit the same place twice, but in the same fashion as for the boxes I recognized that it said something about how many movies there was in the database, so I could estimate its size based on how rare duplicates were. If you would like to do the same, there's a related technique named Mark-Recapture that is very common in ecology https://en.wikipedia.org/wiki/Mark_and_recapture
But the reason I'm writing this today is that there's another angle to all that story. Let's come back to our room full of boxes. That time the master asks another question: "You found a full box by opening 20. How many should you open to tell me that this is the only full box in the room?". Confident after your first success, you start thinking. Of course opening only one box could be sufficient, if the next box is full then there's more than one. And if you open all but one and they were all empty it's very unlikely that you managed not to open the only other full box of the room. So it's probably empty as well and you can stop a bit before... but when?
You knew that if you found 1 box in 20, that 1/20 ratio gave you 5/100 so you estimated that there had to be 5 full boxes in the room. So the question is, how many empty boxes should you have to have a ratio that's closer from 1/100 than 2/100? In other word, if 1/x=1.5/100, what is x? A cross product quickly yields x=66.666... so about 67 boxes. If you open 47 more empty boxes, you can quit ahead saying that, although there could be other full boxes, the most probable is that the one you found was the only one.
It's interesting because we've turned a problem about numbering unknown things, a search problem, into an optimization problem. We could extend this to the case where there's more than one full box of course, and now we have a method to probabilistically find all full boxes without looking at all of them. We can even adjust more precisely the probability we seek to increase our confidence in the result just by opening a bit more or a bit less boxes. A bit. Bit. These boxes full or open start to look an awful lot like 0s and 1s... Could we use this for data compression for example?
Let's consider some data, in binary form. We could randomly sample bits until we found all 1s (using the exact same method as above), then forcibly replace all remaining bits with 0s. There is some loss of information here, maybe they weren't all 0s, but the error rate we accept can be measured and adjusted. So far we haven't compressed anything, we still have the exact same number of bits, but we have almost all 1s... The hope is that losing the rest of them simplifies the data at hand by creating more pattern that, in turn, get easier to compress. In particular, if we do that reading data sequentially (from highest bits from the lowest ones) we would create trails of 0s in the lowest bits... Could that lead to some improvement? I doubt this method will ever be useful for compression, it's easier to get rid of the lowest bits altogether which is known to have garbage compression rates anyway, but I think it is very interesting to consider the possibility and see how an abstract problem can have so diverse ramifications.
Sat Sep 26 02:42:09 PM CEST 2020
I'm completely battered from a sleepless night due to an unexpected intervention on a client's network, but somehow I still managed to turn an old jean into a proper new pocket for one of my favorite pants. The fabric was flimsy and easily torn apart by the various items I keep in my pocket everyday.
It was my first real sewing project and I'm very glad with how it turned out. It was also quite easy overall:
Cut the old pocket
Reproduce its shape on the jean's fabric, leaving a bit more fabric to reattach it to the pants afterward. Also prepare the mirror image of that part.
I first used a blanket stitch to sew the two halves of my pocket inside out (interior outside), that helps reduce tearing
I then collapsed the pocket on itself like a sock to get the interior inside and used a back stitch along the edge to reinforce the blanket stitch and protect it from items within the pocket
The most tedious part was attaching the pocket back to the leg, I used a back stitch for that which was good, but not as clean as I'd have liked it to be. I should think about that part more the next time I attempt it.
(reference video for the basics of sewing: https://www.youtube.com/watch?v=1FknfumFPX8
All in all a very clean result from the outside, it doesn't look like it's going to tear easily and the visual result is quite nice even though my techniques definitely needs some work. The entire project took maybe 3 or 4 hours.
I think I'll get more sewing supplies and try other things, such as sewing some elastic fabric to create a sub-pocket that holds my knife tight in place. This could be less work than a full fledged pocket while still improving drastically the longevity by restricting motion.
Wed Sep 9 02:40:10 PM CEST 2020
I feel like many people would like some way to donate back to the community without giving money. Seeding distribution torrents is a good way to do so, but major distributions are already covered quite nicely.
I'm thinking, what about a system that does the following:
reads the list of distribution torrents on distrowatch
rates distributions by priority using a ratio (popularity / lack of seeders)
given a set amount of disk space determined by the user, dynamically downloads as many distributions as possible in that space, ordered by priority, and seeds them
periodically updates the priority list, cleans up from the disk distributions that no longer fit the bill, and downloads the new ones
That would provide people with a completely automated "community give-back" platform that would actually help projects in need instead of adding to the mass of Ubuntu seeders (with all respects due to Ubuntu seeders, you're needed too).
It's not an easy project, but I think it's an attainable goal.
Sun 05 Jul 2020 10:55:52 PM CEST
Since Boehm GC scans the stack for things that look like pointers to objects, could we "plant" an address to a dead struct then remove it to trigger a double free just by manipulating stack data?
Sun 05 Jul 2020 01:30:27 PM CEST
Sora Yori mo Tooi Basho, “A place further than the universe”...
There are many feel good stories following the life of a group of high school girls, but none like SoraYori. It's a story of unlikely people running away to discover something more in their lives. The kind of story that would motivate anyone to try anything. A story about learning what friendship means, what making a choice means, what being alive means. A story about doing the impossible no matter what.
A story about Antartica.
Each of the four unlikely friends has a strong personal development which is hard to do in only 13 episodes yet the producers manage it perfectly. The show is well written to the point where even background characters feel alive and unique. The artistic direction is also extremely good and I found myself thinking several times that they way the image was framed or cut was very ingenious. It served to present its subject with emotion and tact.
Definitive recommendation to anyone.
Fri 19 Jun 2020 03:07:25 PM CEST
You know how in fantasy stories there's always a huge prophecy that the hero will defeat the forces of evil? It always bugs me that, when the main character and prophesied hero comes, basically no country bothers raising an army or trying to deal with the issue by itself. It's all „Well, we can't do anything about it anyway, it's all in the hero's hands”. And fortunately it turns out ok because prophecies in fantasy novels are always right.
I'd like a board game about that. Let's call it Prophecy.
Players could be "prophesied hero" but we'd have no way to know which is the actual hero (or if one even is a hero). The goal would be to stop waves of monsters and finally the demon Lord after a set number of rounds.
Fighting waves of demons can be done either by convincing countries to raise an army or by becoming strong in their own right and fighting the horde yourself. But the demon Lord would be special and require either a one-on-one combat with the true hero of the prophecy or an army gathering all nations of the world.
If someone fights off a wave alone its reputation grows, bards chant his name and countries start getting lazy because they've found the hero or so they think. This makes it harder to motivate them to raise an army. On the contrary if people do not trust our heroes raising armies will be easier but they are less likely to do as the hero says and in particular let them fight one-on-one or set aside diplomatic issues to gather all armies of the world.
Players win if the world survives the demon Lord.
Maybe there should be something if a true prophecy was made but the true hero wasn't found or decided not to fight the demon Lord... It sounds cool but I'm not sure how it fits the rest of the game.
The actual mechanics behind all that are...not there. But I like the ideas and concepts and I think it could be as simple as a card game where people have a face-down card indicating whether they are the true hero and action cards that are spent on convincing other countries to act as we'd like them too. Monster waves would be a deck of cards too, last of which is the demon lord, and each turn a card is turned face up to know what horrors invaded the country.
I'll have to think more about all this.
Fri 19 Jun 2020 02:30:05 PM CEST
Just had a nice thought... Is there a real x such that x^x=i ?
Suppose by contradiction
Then, by taking the derivative on both sides
We can't simplify if 1+ln(x)=0 which happens for x=e^-1, so let's consider that case first.
which is false. So e^-1 can't be solution of our equation. Let's continue with x≠e^-1 by simplifying left and right the (1+ln(x)) term:
But as previously established
Which is false. Therefore since supposing the existence of a solution leads only to contradiction we proved that no real number is solution.
Nothing groundbreaking, just a thought. It's funny how all my proofs end up being proofs by contradiction one way or another even though it is frowned upon in serious circles.
Wed 17 Jun 2020 07:43:58 PM CEST
I just tried cooking Corned Beef for the first time.
With the whole Covid-19 thing I noticed that my main issue with food wasn't longevity but diversity and while I had no issue finding really good canned fish, beef was another matter entirely.
And now I think I know why. It's pretty strange stuff. The can I used was as "pure" beef as you can get, 98.7% beast and a dash of salt and E250. The smell is not nice. You can get used to it I think. It's has a vibrant red color which, for some reason, didn't change at all when cooked in a hot pan. This is unusual. Beef turns grey normally when cooked. This did not change color a bit. There's no colorant indicated though. Weird.
I had some rice and pasta leftovers so I mixed them all in a hot pan with a dash of olive oil and the meat. Really basic, just to get a feel of the food. I ended up adding quite a lot of black pepper and garlic as well as some hot pepper and salt. I would really have liked an onion but there was none to be found. Generally trying to overspice food is not a good sign, and rightly so, but now it kind of smell like American hamburgers, where there is more spice and herbs than actual meat.
Weird. Not bad though. Bit too much to pepper.
Will I start pilling beef cans in my stock? Probably not. The taste isn't worth it and these cans are too big for a single meal so I'm stuck with it for the next day at least. I would much rather have more kind of fish cans and complete dishes such as canned raviolis in case I really start craving meat. Still, this was a nice experience overall.