Stream of Consciousness
Random ramble at the edge of reason.
Tue May 31 10:38:46 PM CEST 2022
It's been a long time since I last posted articles and I'm very glad to be back with the Dusty Files series. Hopefully this look on the past will also reveal new interesting opportunities! We're starting with a rather short case but more is to come!
Sat Apr 30 06:31:16 PM CEST 2022
I just had the chance to save a weak bee. Putting a bit of honey in water in a plate then bringing the bee to it. It drank a lot then took a 20min nap and after some effort was able to fly off back on its feet. It's a good trick to know :)
Mon Mar 21 09:54:58 AM CET 2022
Interesting. Water is important for coffee and my water is shit. Bottled water is very detrimental to the environment so I don't want to go that way, but I learned about a different strategy. Some companies that sell water minerals specifically chosen for coffee taste that you put in distilled water to create your own water. This sounds intriguing, but is that better?
According to P H Gleick & H S Cooley 2009 Environ. Res. Lett. 4 014009 PET water bottles require a total of 20kJ/g. Furthermore, a 1.5L water bottle requires 32.6g of PET, which corresponds to 724kJ of energy, or 482kJ/L of bottled water.
How much energy would it take to distillate 1.5L of water? Let's start with theory to get a lower bound. A good estimate is that it takes 4J to heat 1g of water by 1°C. So if your water is at 20°C (about room temperature) then we require 4*1000*80 = 320kJ of energy to heat 1L by 80°C to boiling. We also need to cool the resulting vapor to get it back to liquid, which can be done by running the tube through colder water which the vapor will heat, but as this doesn't require additional energy input from our part it doesn't impact the calculation. So in theory, a perfect system should allow us to get distilled water for less energy than bottled water.
But we don't live in a perfect world, so what about real systems that we can buy now as a normal consumer? An electrical distillator found on Amazon claims that it can do 1L in an hour at 750W. That's 750*3600=2700kJ/L, 5 times more than what it takes to bottle 1L of water, and we haven't considered the cost of shipping the minerals etc.
So... Not an option for the moment. Non-electrical distillators exist but I expect them to be less efficient since combustion is a very inefficient process.
Fri Jan 21 11:48:24 AM CET 2022
I noticed that Emmanuel Macron often has his suit jacket open during public speaches. It would be more classical to have it closed, so why is he doing that? Maybe it is a play on familiarity: opening the jacket is less formal and therefore brings it closer to the people. He may also be hot, as I'm sure these meetings are quite intensive although I doubt so little thought is put into that as he is known to be very good at controling his image.
I think that the real reason is that the President both likes raising his arms and wearing cheap suits as he publicly advertised buying them for no more than 350€. Now there is no issue with this tailor, and the president is free to buy whatever he wants, but you get what you pay for. These suits are not made entirely to measure and clearly the armscye (the hole where the sleeve attaches to the shoulder) is too big for him. This means that the sleeve looks fine when he's standing but as soon as he raises his arms it takes the hole jacket with it.
In political meetings he really likes the power pose of standing with both arms raised high, and that would look totally ridiculous with the jacket closed as it would be raised up to his nose so he keeps it open to limit the visual effect.
Sure, there have been a controversy about the price of Fillon's custom suits but I think Macron's example shows that there is a practical reason why politics of the past went this route: photos are an important medium to propagate an image of political figures. Details like this one make the difference between passing for a respectable man or a slob, and with the president it's the entire country's image that is impacted internationally.
tl;dr: let the people that represent us wear nice things please.
Wed Nov 17 01:46:17 PM CET 2021
Ok, I'm getting the hang of it. Exceptional shave with my new Parker A1R razor and Feather blades. I don't think I'm going back, it's just that cool.
Thu Sep 2 11:25:19 AM CEST 2021
So, I decided to make good coffee. And I finally did. Peruvian medium roast, 12g hand-grinded on a Timemore C2 (setting 20), brewed in a French press by steeping 4 minutes in 320mL boiling water, breaking the crust, removing the foam then letting sit for 5 more minutes.
It was a blast. Light, sweet, tea-like but fuller, sweeter, with strong chocolate notes (I know I sound like a snob, but really, chocolate) that came stronger as the cup cooled down and the chocolate aftertaste remains in my mouth since I finished it an hour ago.
It had no bitterness. In fact it maybe lacked bitterness, so I'm going to grind finer until I can get some of that bitterness through, but that's an impressive cup of coffee on its own for me.
Thu Aug 12 11:14:06 AM CEST 2021
My programming must read list:
Structure and Interpretation of Computer Programs
Game Programming Design Patterns
500 lines or less
Don't Just Roll the Dice
Computer Networks by Tanenbaum
The Art of Computer Programming
Sun Apr 18 06:14:41 PM CEST 2021
New 3x3x3 personnal best 17.78s, first ever blind 3x3x3 solve, that is a good weekend for speedcubing.
Tue Mar 23 11:13:29 AM CET 2021
Phishing thought... If I have a target domain that uses sendgrid or similar, the DKIM will be ok, the SPF will authorize sendgrid... Could I use my own sendgrid account to spoof that domain for phishing mail? I think so. Phishing protection is hard.
Thu Mar 18 07:21:20 PM CET 2021
I was finally able to put some order into bm to fix that horrendous import performance and it feels good. Turns out it was as simple as making sure only one database commit was performed. Three lines of code for months of frustration, I have finally divided by 10 the time required to sync my bookmarks.
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.