Author Archive: ebvalaim

Landscapes and atmospheric refraction

Sometimes I'm bored and I'm getting involved in discussions with various kinds of pseudoscientists. Such discussions are often a waste of time, but it's possible occasionally to get something out of them - after all, if you want to explain to someone why there are wrong, you need to have a good understanding of the topic yourself. If your knowledge is not enough to counter the opponent's arguments, you need to expand it, and so you are learning. It was the case for me this time.

It all began with two flat-earthers appearing on a certain forum. The exchange started with standard arguments like timezones, seasons, eclipses, the rotation of the sky... what have you. As usual in such cases, those arguments were met with silence or really far-fetched alternative explanations. I'll omit the details, interested people can find standard flat-earth arguments on the web.

Well, you can't sway a person that is completely confident in their beliefs with arguments, so the discussion has become somewhat futile. Both sides stuck to their positions and mulling over the same issues time and time again has started. That is, until one of the flat-earthers started presenting photos which, according to them, proved that the Earth "can't be a ball with a 6371-6378 km radius", with descriptions that can be expressed shortly as "explain THAT!". Alright.

Challenge accepted!

(more…)

MaidSafe and PARSEC - a new distributed consensus algorithm

I'll write something about my work for a change.

I've been employed at MaidSafe for over a year and a half now. It's a small, Scottish company working on creating a fully distributed Internet. Sounds a bit weird - the Internet is already distributed, isn't it? Well, it isn't completely - every website in the Internet exists on some servers belonging to some single company. All data in the Internet is controlled by the owners of the servers that host it, and not necessarily the actual owners of the data itself. This leads to situations in which our data is sometimes used in ways we don't like (GDPR, which came into force recently, is supposed to improve the state of affairs, but I wouldn't expect too much...).

MaidSafe aims to change all of this. It counters the centralised servers with the SAFE Network - a distributed network, in which everyone controls their data. When we upload a file to this network, we aren't putting it on a specific server. Instead, the file is sliced into multiple pieces, encrypted and distributed in multiple copies among the computers of the network's users. Every user shares a part of their hard drive, but only controls their own data - the rest is unreadable to them thanks to encryption. What's more, in order to prevent spam and incentivise the users to share their space, SAFE Network is going to have its own native cryptocurrency - Safecoin - but it won't be blockchain-based, unlike the other cryptocurrencies.

(more…)

Educational GIFs

I'm slowly preparing a new post for the category "Physics for everyone". The post will describe the Lorentz transformation a bit more in depth, and say something about the consequences of it being the correct description of reality. I prepared two GIFs for this purpose:

The transformation of the coordinate system by a rotation (click for an animation)

The transformation of a coordinate system by a Lorentz transformation (click for an animation)

A more detailed description of those GIFs will be a part of the new post in the category Physics for everyone :)

I published the code I used to generate them on GitHub: https://github.com/fizyk20/spacetime-graph/tree/blog-post

Events and space-time

The first entry in the series will be quite basic, but I think that some problems will nevertheless be quite interesting. We'll be talking about what is the space-time, events, and we will show where the theory of relativity comes from. So, let's go :)

The notion of space-time is briefly mentioned at school, but usually the profound consequences of combining space and time into a single entity aren't explained too much. To understand this, one must first go a bit deeper into the details of this idea.

(more…)

Hyperbolic functions - what sorcery is this?

If you are like me, your first contact with the hyperbolic functions was as "this strange, useless something on the calculator". There were just some weird buttons labeled "sinh" and "cosh". The school finally explained what "sin" and "cos" are, but there was no mention of those variants with the final "h". What is this about? The names suggest some similarity to the trigonometric functions, let's see what happens:

 \begin{array}{ll} \cos (1) = 0.54030230586 & \cosh (1) = 1.54308063482 \\ \cos (10) = -0.83907152907 & \cosh (10) = 11013.2329201 \end{array}

(You will get these results if you have the calculator set to radians - if you use degrees, then the cosine results will be different; it has no influence on the hyperbolic functions and we'll see later why that is.)

Right, these 11 thousand for cosh(10) look very similar to the trigonometric functions. This "h" apparently changes quite a bit, but what exactly...?

If you encountered complex numbers during your later education, you could stumble upon such definitions:

 \begin{array}{ll} \cos x = \frac{e^{ix} + e^{-ix}}{2} & \cosh x = \frac{e^x + e^{-x}}{2} \\ \sin x = \frac{e^{ix} - e^{-ix}}{2i} & \sinh x = \frac{e^x - e^{-x}}{2} \end{array}

Some similarity is visible here, but... Why such a form? What does this have to do with hyperbolas? If you don't know it yet, you will know after reading this article.

(more…)

Generic-array reached 100 000 downloads!

My project, generic-array (a Rust crate) has now been downloaded 100 000 (in words: one hundred thousand) times! This is my first project of such a popularity.

It began with a simple hack, working around a limitation of the language - and apparently this limitation bothered many people, because a few sent me pull requests (also a first for me), and a large number downloads the library. I actually have no idea what else to write, I'm just happy that people are finding it useful ;)

The shape of a black hole's event horizon

Yesterday, while browsing the internet, I stumbled upon a thread which looked like a typical question asked by someone interested in science, and turned out to be a really interesting problem.

The question that has been asked concerned the shape of a black hole. A few people replied that the event horizon (the boundary - or the "surface" in a way - of a black hole) has the shape of a ball (which should be actually described as a sphere, since the horizon is a 2-dimensional surface, and not a 3-dimensional shape). Someone suggested that it's not exactly true, because black holes usually spin, which flattens them. I entered the thread then and said that even when a black hole is spinning, its horizon is still spherical - it's described by an equation like r = const. But is that really so...?

(more…)

What can you do with a phone that has a broken touchscreen?

I have been asked recently to try to recover some data from a broken phone. The catch: the data was in the internal memory, the option to connect the phone as an external drive via USB was turned off and the touchscreen was broken. So what can you do in such a situation? It turns out that quite a lot, and even though I haven't eventually managed to recover the data, the fight with the phone was pretty interesting and I think it deserves a bit of attention.
(more…)

Get Noticed - post-mortem

As you could have noticed, my participation in the competition has ended a while ago by me not adding new posts on the blog. Unfortunately, it turned out that finding time for regularly developing a software project is something that is beyond me. My job and private life need some attention, too.

However, it doesn't mean that the project for the competition will get abandoned. Admittedly, I'm working on different things at the moment (which I'll also attempt to describe in the near future), but I'll definitely go back to Ktulu Online. When exacly? Time will tell.

It's a shame that it ended this way, but it happens in life. If the competition launches again next year, I'll definitely try again :)

Ktulu Online - progress (20.03.2017)

The project keeps going forward, although slowly. Using TDD has let me overcome my creative blockade and I managed to make good progress, especially taking into account the time I could spend on the code. The main improvements are in the area of the Manitou (server) and player (client) API, which has finally started taking shape - starting with writing the tests helped a lot in forming a pretty detailed vision.

Even though I still don't have much to show in the project, I'm hoping that something interesting will emerge this week. Coding hasn't felt this easy to me since a long time :)

That's pretty much it with regards to the progress. I'll write a bit more about the problems I have encountered when trying to define the API of the objects in the next entry - some of the problems have interesting aspects related to the properties of Rust. It might be an interesting read for people who still don't know much about this language :)