PiSquared Blog | Index | Tags | About me

PiSquared Blog

Blog about geeky stuff, computers, physics and life.


Защо онлайн гласуването НЕ Е добра идея?

Tags: Български, политика, технологии, мнения
Created on Tue, 27 Apr 2021

За хората незапознати с този блог - здравейте, аз съм Даниел Цветков, специализирам в област сигурност на облачните технологии и работя в Гугъл, Швейцария. Мнението си е мое и не представлява това на компанията ми, но се надявам че с това ще ми повярвате, че имам бегла представа за какво говоря. Мнението ми се споделя от специалисти в бранша, вижте връзките най-долу (на английски предимно)

Ако нямате търпение за цeлия пост, основното, което трябва да знаете е, че технологиите нямат вграден морал или етика. Те не могат да ускорят само добрите неща без да направят лесни и лошите неща - те просто ускоряват.

Технологиите улесняват гласуването от вкъщи, но в същото време правят много по-лесно манипулирането на гласовете. Ако истинността на избора на суверена е важна за вас, то онлайн гласуването, колкото и да е примамливо в днешно време, НЕ трябва да става истина.

Гледайки развитието на новините тези дни по всичко личи, че българите ще трябва да гласуваме поне няколко пъти в

...more

The forbidden topic

Tags: English, politics
Created on Wed, 14 Apr 2021

#BlackLivesMatter. #MeToo. #WomenInTech. #GenderPayGap.

I'm going to talk about something that may get me fired, dead or worse - canceled. It's the dogma of our time. We do not talk that there are differences between people that may influence their career. We try to fool nature but as Feynman said - "Nature cannot be fooled". As we tried not to care about O-rings that will break under certain temperature that have killed people we try so hard not to care that different people - men, women, gays, blacks and especially - people that have sharp noses vs people who don't - have different capabilities. We talk only about equalizing the playing field. And some parts of it are smart and we need less bias, more understanding of different perspectives that different people bring. But many initiatives are annoyingly stupid and completely detached from reality, trying to fool nature. I'm going to agree with my corp bullshit that I have to swallow everyday, attend brainwashing trainings, li

...more

Morse

Tags: English, learning
Created on Thu, 25 Feb 2021

Yesterday, out of nowhere, I decided to try to learn Morse code.

In general, I hate learning languages - I can express something already in one language and learning how to do that in another seems useless with very little added benefit.

But Morse is a different type of language - it's a different communication medium, an almost universal human-binary protocol that can be communicated through timings in different mediums including wires, light or sound.

It can be argued that is is actually a tertiary protocol because it actually uses 3 types of signals - Dots are short signals, dashes are longer ones (3 times as long by standard) but then you also put silence between the letters (which is by standard the length of a dash or 3 beats). However if we think in binary representations - i.e. high and low set of signal - then a dot is a 1, a dash is a 111 and silence depends on where it should be. A silence between individual dots and dashes is a single 0. So for example le

...more

Afterlife

Tags: English, essays
Created on Tue, 01 Dec 2020

There is nothing more final than death; I had both my grandmas die within a year about a decade ago and it's really this terrible empty feeling and all the good memories just come every once in a while and wash you away unexpectedly - time is the only healer. People left behind who have spent a long time feel the miss the most and again, time is the only medicine, no substitute can be enough to fill the void but friends and family help.

I'm quite scientific minded and of course - I wonder a lot. Although science doesn't stop belief (it actually requires it in a certain way) my mind reasons about the experience about death in a way that tries to be consistent with what I know. And that means that since we have no idea what the internal experience of dying and death might be - all bets are off. Therefore if you tell me you feel like going to heaven - okay. If you tell me you feel like there is nothing - okay. It's unknowable at this stage so any hypothesis is probably equally valid.

...more

Относно вестниците (1807)

Tags: Български, политика, мнения
Created on Fri, 04 Sep 2020

Тази сутрин ми попадна пост от Hacker News озаглавен "Не може да се вярва на нищо, което се вижда във вестниците" с дата 1807, написано от Томас Джеферсън.

Ето няколко цитата от Относно вестниците (1807):

На първо четене идеята много ми харесва - всички новини започват със статус Възможности. Така може да се пуска всичко в мрежата с най-бързата скорост, което така или ин

...more

Фейсбук срещу другите

Tags: Български, технологии, мнения
Created on Wed, 02 Sep 2020

Фейсбук не се кефи като им ограничават свободите:

...more

Асфалтови палатки

Tags: Български, политика, мнения
Created on Thu, 06 Aug 2020

Престъпниците рано или късно осъзнават, че с престъплението си предават протекцията на закона.

Хората на палатките са престъпници. Ако утре някой дойде да ви изгори палатките (не го промотирам) или ви прегази трактор (или ховъркрафт - малко го промотирам) вие сте си виновни, че сте там. Дали няма да сте нагли да викнете полиция, ако някой ви разкара незаконната палатка?

Съжалявам, но не се прави така. Блокирате 1М+ град и искате да блокирате държавата с още палатки и там други хипи-неща. Имате щастието, че повечето софиянци са по морето и все още другите, които могат, работят от вкъщи.

Имате щастието, че и явно по някакъв начин сте удобни на властта, иначе имате ли си представата колко бързо се разрива една подобна незаконна сбирщина? 5 минути и няма да се усетите кога вече сте в арестите, а палатките (и диваните?!) в неизвестност.

Не сте избрани от народа да представлявате мнението. Откъде знаете, че 6M+ българи са съгласни с ~3 организатори и ~10к протестиращи (в порядък)

...more

Две Българии

Tags: Български, политика, есета
Created on Sat, 18 Jul 2020

На 37ия ден на протестите, правителството подаде оставка. Това беше на цената на стотици жертви на вируса, но "това е цената на революцията" - така говореха Младите и Умните. На ръба на гражданската война, хората бяха неуморими, викаха по площадите и постигнаха своето.

На следващия ден президента Радев сформира временно правителство с цел да насрочи дата за предсрочни избори. Хората се прибраха по домовете си, подготвяха децата за новата несигурна учебна година и гледаха БТВ и Нова, за да се информират за последното от деня. Социологическите агенции даваха малка преднина на БСП, но ГЕРБ я следваше на едва няколко процента разлика. Хората не вярваха вече на социологическите агенции, защото смятаха, че след почти 40 дена протест истинският българин ще се събуди и ще гласува по съвест. Редовните Кънчовци обикаляха студията и си говореха техните неща и хората гледаха - нямаше какво друго да правят, освен да се доверят, че нещата ще са различни. И все пак си шушнеха и дразнеха вечерно вр

...more

Curious Bunch

Tags: Български, проекти
Created on Wed, 24 Jun 2020

Пост 1/N: Защо го правя?

Скъпи любопитковци,

Мненията в тия постове са си мои, но CuriousBunch е >> мен.

Защо го правя? Обичам да си говоря с любознателни хора. Имам доста любознателни познати и приятели и това ми е добър начин да се чуя с тях за неща, които са ни взаимно интересни. Обичам да се занимавам с техничните неща около продуцирането.

Следете тия постове за още #ИскреноИЛично

=====

Пост 2/N: Защо съквам?

Скъпи любопитковци,

Правя ютуб канал от > година и някои хора [citation needed] ще кажат, че тая работа не си заслужава.

Защо съквам? Не умея да промотирам, да поствам социални неща и да съм инфлуенсър. Не мога да правя кратки клипчета или да говоря с хората на кратко (smalltalk). Обичам да навлизам в детайли, да задавам въпроси, докато не разбера нещата от първи принципи. Не умея да казвам на хората какво да правят. CuriousBunch е изградено от доброволци, на които не се плаща и всеки го прави с леко различна цел. Вижте моите в пост 1.

Аз

...more

My University Blog

Tags: English, university
Created on Sun, 06 Jan 2019

During year 3 at University on one of the courses we had to write a blog post every week. I have written a blog before (this one) but 3rd year at University of Glasgow is crazy busy - almost everyone has developed a depression, panic attacks, disorders and has become a goat. I have discovered my old University blog on the interwebs and copied it over to this new/old blog of mine.

Few things of note:

...more

Bullsh8t, Episode #1 - Astrology

Tags: English, opinions
Created on Sat, 29 Sep 2018

This episode of bulls8t is sponsored by my own desire to limit some of the bullsh8t in the world

Horoscopes are the worst thing since the invention of God(s). The stupid idea that planets and stars somehow influence your day to day life is idiotic and should have died pretty much whenever it was conceived. Like most of humanity. Or at least ever since we know that it doesn't influence your life. Which in all practical terms has been forever.

Hey babeee, Which sign are you?

Astrology, a.k.a. horoscopes, a.k.a. these things in the websites you read "just for fun but you actually don't really believe" (but deep down you actually do believe them because you think there is a grand scheme of things, but deeper, deeper down you know you don't know anything) revolves around an idea called a sign. Signs are twelve words that sound funny in English so that's why we stick with much hipster Latin.

achzually

ACKCHYUALLY. Signs are constellat

...more

Facebook (and the rest) - wait a minute - this way is wrong!

Tags: English, technology, opinions
Created on Thu, 19 Jul 2018

This is not the way we wanted computers to work. We don't want people addicted to their phones all the time, looking like zombies, internally feeling depressed and anxious and always trying to outcompete everybody in the world; trying to show off to get a few more likes, to get a few more comments. We don't want this poisonous competition of individuals for meaningless virtual points. And all the while these same people are being exploited by Facebook to click on things so that advertisers can show them ads to things they probably don't even want. We don't want people reading shallow automatically generated articles of confirmation bias, which are being promoted by Facebook to get even more clicks for more ads for more things you don't want.

We wanted to connect with the people we care about. It's our intrinsic desire in this more and more isolated society. We wanted to know what is going on in the lives of the people we cared about but not to compete with them in this ugly jelaous

...more

Build a memory graph in linux terminal

Tags: English, technology, hacks
Created on Wed, 11 Jul 2018

I was searching for a terminal based graph of usage of memory but I couldn't find one, so I built it using simple bash and python.

First create a directory called mem and enter it with cd mem

Then run the daemon part of the monitor:

while true; do free -m | head -2 | tail -1 | awk '{print $3}' > `date +'%Y-%m-%dT%H:%M:%S%z'`; sleep 1; done

To actually build the graph, use this:

watch -n1 'for f in `ls -r | head -30`; do num=`cat $f`; python -c "print(\"{} {}\".format(\"$f: $num\", \".\" * ($num/10)))"; done'

And the result is something like this:

``` 2018-07-11T11:26:36+0000: 330 ................................. 2018-07-11T11:26:35+0000: 316 ............................... 2018-07-11T11:26:34+0000: 285 ............................ 2018-07-11T11:26:33+0000: 236 ....................... 2018-07-11T11:26:32+0000: 235 ....................... 2018-07-11T11:26:31+0000: 236 ....................... 2018-07-11T11:26:30+0000: 236 ..............

...more

On the difficulty of trying again

Tags: English, essays, life
Created on Mon, 02 Jul 2018

Chess

I don't even know how I ended up here. Something - was it an article, or a video - but something prompted me to watch some comentary on the chess matches between AlphaZero vs Stockfish. AlphaZero is Google's/Alphabet's AI machine - both the software of deep learning and through their proprietary TPUs hardware. Stockfish is (was) the best chess computer program in the world. Now, ever since 1997 match between the then world champion Garry Kasparov and Deep Blue, playing chess against computers has been useless in terms of actually beating them.

It's of course because computers are not like people - once you create great software, you can copy it, distribute it and improve it - even if it's illegal or whatever, you can do it if you want to. Humans not so much - once a human dies the best way he can (so far) transfer the knowledge of his lifetime experience is through the slow, inneficient and incomplete multi-level interface of brain-words-mouth-air-ear-words-brain. Or simi

...more

This blog is now written in Markdown and synced with OwnCloud

Tags: English, technology, hacks
Created on Sat, 30 Jun 2018

This has been an idea that has been brewing in my mind for a while - create a simple blog that I can write from anywhere, using standard Markdown syntax. Here's the repo of the project.

The blog itself is a Flask webapp with sqlite database that has a BlogPost table. The trick is that the table is acutally synced with flat files in a folder. Each file is a blog post entry. The folder itself is synced by owncloud client which is running as a daemon (currently behind a tmux but will do it as a systemd service soon).

The key of the syncer is in the flatfile_syncer.py file. The sync is currently one-directional - when a file is created/updated/deleted, a blog post is created/updated/deleted. As an admin, you can CUD blog posts from the web interface but these are currently not synced to the file system.

So whenever I start writing a (non-hidden) file in that fol

...more

Google Duplex and the Struggle of the Moth

Tags: English, essays, life
Created on Thu, 10 May 2018

There is this one episode of the TV-Series LOST that I can’t seem to shake off my mind. It’s episode 7 of season 1 titled “The Moth”. I believe it’s one of the best hours of TV I have watched and the metaphor certainly comes to my mind quite often. One of the main characters (Locke) teaches another one (Charlie — who is struggling with withdrawal symptoms of heroin) that nature’s way of finding the best is through struggles. Locke demonstrates that by showing him a moth in its cocoon shortly before emerging from it. He says that he could help the moth — he has a knife and he can rip open the cocoon, helping the moth and letting him out. But the moth is not ready if it can’t break his own cocoon. The episode is worth watching as the two larger stories represented in the episode are also an expansion of the metaphor.

{% rawhtml %}<iframe width="560" height="315" src="https://www.youtube.com/embed/oo7yIEAh65M" frameborder="0" allow="accele

...more

If you like being a pirate...

Tags: English, technology, essays
Created on Wed, 09 May 2018

Keep on reading, I am not going to judge you - I (may) do this all the time. I just want to pose you an interesting question to think about…

Take a look (if you can and at your own risk) at the most seeded audiobooks on one of these sites where Johnny Depp might find himself if he was so inclined as to make an Internet movie 😉

At the time of writing (May 2018) titles include: * "12 Rules for life" [#1 with 396], * "Influence: The Psychology of Persuasion by Rober Cialdini" [#3 with 226] * "Be Obsessed or Be Average" [#4 with 175] * "Anthony Tony Robbins - Awaken The Giant Within" [#8 with 126] * "The Subtle Art of Not Giving a Fuck" [#9 with 125] * "The Millionaire Booklet" [#10 with 121] * "The Five Elements of Effective Thinking" [#14 with 103] * "No Excuses - The Power of Self-Discipline" [#15 with 93] * "You are a Badass" [#17 with 93] * "Maps of Meaning" (#1's author's previous book) [#19 with 91]

The unmentioned books include "Harry Potter book series 1-7", "Th

...more

Ode to professionals

Tags: English, technology, essays
Created on Thu, 19 Apr 2018

A professional doesn't dress well to impress and fake his professionalism. He dresses well to feel professional.

A professional is not hack-y, quick or dirty. He is a thorough and precise.

A professional is not arrogant or know-it-all. He works together with his colleagues, learns from them and helps them.

A professional understands planned work, unplanned work and plans for the unplanned work.

A professional takes responsibility but never blames.

A professional always learns.

A professional uses the right tool for the job. Not the one that is most hyped at the moment, nor the one he is just most familiar with but too complex or too simple for this job.

A professional understands his human limitations. Thus he never overworks to show off or mistreats the rest of his life for his craft.

A professional always tells the truth, voices his opinions where they are relevant to the work and protects his craft and his colleagues.

A professional understands or tries to

...more

Auto adapting signal to day-night scheme

Tags: English, hacks
Created on Mon, 02 Apr 2018

So I wanted to automatically change the day/night theme of my brand new Signal desktop app. The way that it is manually done is through the File -> Preferences... menu. Now that's not convinient for programatic person like me. Let's investigate!

.config folder

My first stab is looking into the mostly standard ~/.config folder in Linux for Signal if one actually exists. It turns out it does. Let's see. It even has a ~/.config/Signal/config.json file. Unfortunately, that file doesn't contain the settings for the theme, just window positions.

grep -ring in the folder for any of android or theme just returns the logfile that Signal is writing to.

... ./logs/log.log.1:{..."theme-setting changed to android-dark",...} ...

No luck.

Another stab is at /opt/Signal directory. Again - no luck. And the app is a binary ELF executable $ file signal-desktop signal-desktop: ELF 64-bit LSB executable,...

strace-ing

My next attempt

...more

Here's how I got my music from Google Music (as of March 2018)

Tags: English, technology, hacks
Created on Sat, 31 Mar 2018

At some point I uploaded all my music on Google Music - they provided 20,000 songs upload for free. Then of course, they started pushing their paid service - fair enought. I tried the trial several times, I paid subscriptions several times over the years, but I never enjoyed the suggestions it was giving me and somehow the music I wanted, wasn't there. So eventually I always just went to YouTube to listen to music.

But now that I am trying to detach a little bit from the cloud and get my data back I wanted to try to download my music from Google Music.

Google Checkout

My first attempt was the assumption that I can get my music as a part of the standard Google Get Back My Data or whatever. It was fairly easy to get there - MyAccount from my profile image, then Takeout then click

...more
1 2 3 4 5 6 7