about summary refs log tree commit diff
path: root/users/tazjin/blog/posts
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/blog/posts')
-rw-r--r--users/tazjin/blog/posts/nixery-layers.md2
-rw-r--r--users/tazjin/blog/posts/reliably-switch-buffers.md18
-rw-r--r--users/tazjin/blog/posts/reversing-watchguard-vpn.md2
-rw-r--r--users/tazjin/blog/posts/thoughts.md142
-rw-r--r--users/tazjin/blog/posts/tvix-eval-talk-2023.md19
5 files changed, 181 insertions, 2 deletions
diff --git a/users/tazjin/blog/posts/nixery-layers.md b/users/tazjin/blog/posts/nixery-layers.md
index 38ca2294a8..26526d11b5 100644
--- a/users/tazjin/blog/posts/nixery-layers.md
+++ b/users/tazjin/blog/posts/nixery-layers.md
@@ -267,6 +267,6 @@ NixCon talk][talk] about Nixery for a review of some of this, and some demos.
 [nixery.dev]: https://nixery.dev
 [dominator trees]: https://en.wikipedia.org/wiki/Dominator_(graph_theory)
 [gonum/graph]: https://godoc.org/gonum.org/v1/gonum/graph
-[layers.go]: https://cs.tvl.fyi/depot/-/blob/tools/nixery/builder/layers.go
+[layers.go]: https://cs.tvl.fyi/depot/-/blob/tools/nixery/layers/layers.go
 [popcount]: https://cs.tvl.fyi/depot/-/tree/tools/nixery/popcount
 [talk]: https://www.youtube.com/watch?v=pOI9H4oeXqA
diff --git a/users/tazjin/blog/posts/reliably-switch-buffers.md b/users/tazjin/blog/posts/reliably-switch-buffers.md
new file mode 100644
index 0000000000..ec56c4b2d0
--- /dev/null
+++ b/users/tazjin/blog/posts/reliably-switch-buffers.md
@@ -0,0 +1,18 @@
+Вчера вечером написал некоторые патчи для моего emacs-конфига. Их на самом деле давно уже хотел написать, они решают маленькие проблемы которые мне постоянно мешали. Об одной из проблем я хочу рассказать, потому что она привела к тому, что "порог раздражения" был переступлен.
+
+Emacs у меня основная часть своей рабочей среды. Он у меня является, конечно, текстовым редактором, но и еще менеджером окон, мэйл-клиентом, чат-клиентом и много другого.
+
+Внутри emacs есть концепция "буферов", один буфер может быть один открытый файл в текстовом редакторе, один чат на Телеграме, или одно десктопное окно (например, браузер). Навигация между ними осуществляется с помощью команды `switch-to-buffer` (или кое-каких альтернатив, например `ivy-switch-buffer`, `helm-switch-buffer` и так далее). Буфер - на стороне emacs-lisp является объектом с некоторыми полями. Одно из них: `buffer-name`.
+
+У всех buffer-switch команд есть одинаковая проблема: Они берут список буферов из emacs, показывают *имена* буферов пользователю, и в результате получают выбранное *имя*. Затем они просят emacs открыть буфер с этим именем.
+
+Кто-то наверно уже понял какая тут проблема. Имени буферов могут меняться, и да, не только могут, но и делают! Например, Телеграм-клиент может показать каличество непрочитанных сообщений в названии, окно с Яндекс Музыкой меняет названия по треку, и так далее. Получается довольно часто такая ситуация, что название меняется при выборе буфера, и `switch-to-buffer` больше не найдет выбранный буфер и просто открывает новый, пустой буфер с старым названием! Когда разработывали эти команды в emacs (да, это совершенно давно, где-то в 70х/80х, большинства нас пока не было тогда!), они никогда не сталкивались с такими ситуациями, и это решение, которое тогда хорошо работало теперь больше просто не адекватно.
+
+Фикс был не очень сложным. Вместо списка имен буферов создаю alist с названием и *с самим объектом*, и после выбора буфера с списка передаю именно этот объект, а не только его название, в функтцию, которая открывает буфер.
+
+Коммит с этой новой функцией здесь: cl/9147
+Советую её особенно всем пользователям EXWM!
+
+Для меня это настоящее улучшение жизни. Конечно, это странно звучит, но даже если бы у меня была такая проблема всего раз в день, это каким-то образом привело бы к ухудшению моего настроения. Как маленький камешек в твоем ботинке.
+
+Выньте камни из своих ботинок!
diff --git a/users/tazjin/blog/posts/reversing-watchguard-vpn.md b/users/tazjin/blog/posts/reversing-watchguard-vpn.md
index 8968dc8645..e000d7a764 100644
--- a/users/tazjin/blog/posts/reversing-watchguard-vpn.md
+++ b/users/tazjin/blog/posts/reversing-watchguard-vpn.md
@@ -1,5 +1,5 @@
 TIP: WatchGuard has
-[responded](https://www.reddit.com/r/netsec/comments/5tg0f9/reverseengineering_watchguard_mobile_vpn/dds6knx/)
+[responded](https://web.archive.org/web/20230326041952/https://www.reddit.com/r/netsec/comments/5tg0f9/reverseengineering_watchguard_mobile_vpn/dds6knx/)
 to this post on Reddit. If you haven\'t read the post yet I\'d recommend
 doing that first before reading the response to have the proper context.
 
diff --git a/users/tazjin/blog/posts/thoughts.md b/users/tazjin/blog/posts/thoughts.md
new file mode 100644
index 0000000000..7ce23f9c87
--- /dev/null
+++ b/users/tazjin/blog/posts/thoughts.md
@@ -0,0 +1,142 @@
+<!--
+
+  This file contains a bunch of random thoughts I don't want to lose,
+  often resulting from conversation with other people, but that are
+  too far removed from what most people can relate to for me to just
+  publish them. Sometimes it's convenient to be able to share them,
+  though.
+
+  For that reason, if you stumble upon this file without me having
+  linked it to you intentionally, feel free to read it but keep the
+  sharing to a minimum (though do feel free to share the thoughts
+  themselves, of course).
+
+-->
+WARNING: This is not intended for a large audience. If you stumble
+upon this page by chance, please keep the sharing to a minimum.
+
+TIP: It's always work-in-progress. Things come and go. Or change. Who
+knows?
+
+---------
+
+### Three things
+
+*[mid/late 2020]*
+
+All things in the universe take the shape of one of approximately
+three things. If you had Hoogle for the entire universe, you'd
+probably find that one of them is `fmap`.
+
+There might be a few more, or a few less (or some may have been
+deprecated), but you get the idea. I guess [five][] would be a good
+number.
+
+[five]: https://principiadiscordia.com/book/23.php
+
+----------------------
+
+### Free energy principle
+
+*[mid/late 2020]*
+
+Karl Friston wrote:
+
+> The free-energy principle says that any self-organizing system that
+> is at equilibrium with its environment must minimize its free
+> energy.
+
+Or, somewhat paraphrased:
+
+> Any Markov blanket capable of modeling its environment aims to
+> reduce its level of surprise by either adapting its model, or
+> through other action.
+
+Seems reasonable to me.
+
+### More bizarre universe
+
+*[many years ago]*
+
+Douglas Adams wrote:
+
+> There is a theory which states that if ever anyone discovers exactly
+> what the Universe is for and why it is here, it will instantly
+> disappear and be replaced by something even more bizarre and
+> inexplicable. There is another theory which states that this has
+> already happened.
+
+### Alpha decay
+
+*[late 2022]*
+
+Finance people say:
+
+> Alpha Decay is commonly referred to as the loss of prediction power
+> of a trading strategy over time. As a consequence, the profitability
+> of a strategy tends to gradually decrease. Given enough time, the
+> strategy converges to having no superior predictive power and
+> returns when compared to a suitable benchmark.
+
+A market is a big optimiser. Any successful trading strategy adds
+friction in a place that the optimiser wants to remove.
+
+Alpha decay is unavoidable without changing and adapting the strategy.
+
+### Optimising universe
+
+*[late 2022]*
+
+*(thanks edef for helping me think through this one!)*
+
+Assume that the universe acts as a giant optimiser, and consider that
+the three things above are related and specialisations of more generic
+ideas:
+
+1. Every delineable entity in the universe (i.e. every *Markov
+   blanket*) attempts to reduce its level of surprise (the free energy
+   principle).
+
+2. The universe needs replacement (a more bizarre universe) if global
+   surprise drops to a minimum[^heat].
+
+3. Without improvement that outpaces the optimiser of the universe,
+   any strategy leading to (2) will get eroded by alpha decay long
+   before.
+
+4. We don't know if it is possible to outpace the optimiser from
+   within.
+
+On a personal note, it seems to me that achieving (2) is likely
+undesirable. It probably takes god[^god] a lot of resources to create
+an ever more complex universe and this process might be much less
+enjoyable than "running" (for lack of a better word) a universe. Under
+this assumption, a universe that achieves (2) faster than others might
+be a failure, and on a higher level conditions leading to its creation
+might be subject to another optimiser.
+
+Or it could be the other way around, but this seems more likely to me
+personally.
+
+### Superintelligence
+
+*[late 2022]*
+
+Under the previous assumption, achieving superintelligence is likely a
+bad idea for anyone feeling some kind of attachment to *this*
+universe.
+
+Or it might be the exact opposite, but I don't think so.
+
+-------------------------------
+
+[^heat]: Note that this is consistent with the heat death of the
+    universe.
+
+[^god]: I'm using the word "god" as the best English approximation of
+    a concept that different religions and philosophies all attempt to
+    approach. I think that for many cognitive purposes, an
+    anthropomorphised idea (as in the abrahamic religions) is useful,
+    but ideas from some Eastern religions or modern philosophers like
+    Bach or Watts are likely more aligned with the "nature of things"
+    as such.
diff --git a/users/tazjin/blog/posts/tvix-eval-talk-2023.md b/users/tazjin/blog/posts/tvix-eval-talk-2023.md
new file mode 100644
index 0000000000..4a0ec56881
--- /dev/null
+++ b/users/tazjin/blog/posts/tvix-eval-talk-2023.md
@@ -0,0 +1,19 @@
+7 сентября я выступил с докладом про реализацию языка Nix на Rust, на
+[Московском Rust-митапе][rustmsk] / [Московском клубе
+программистов][progmsk].
+
+<iframe width="800" height="500" src="https://www.youtube.com/embed/7zS2_ZhwPfY?start=4013" title="RUST - современный язык программирования" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
+
+Вот все связанные с ним ссылки, которые могут быть интересны:
+
+* [Tvix](https://tvix.dev), главный сайт проекта
+* [TVL](https://tvl.fyi), наше онлайн-сообщество
+* [Tvixbolt](https://bolt.tvix.dev/), наш "godbolt" для tvix
+* [MMTk](https://www.mmtk.io/), Rust-библиотека с компонентами для garbage-collection
+* [Интервью / доклад](https://www.youtube.com/live/0Lhahzs-Wos?si=BlFDVBUPsIpHg0p5), Nix -- не только пакетный менеджер
+* [NixCon 2023](https://2023.nixcon.org/)
+* [Yew](https://yew.rs/), WASM-фреймворк для Rust
+* [tazlog](https://t.me/tazlog), мой канал на Телеге
+
+[rustmsk]: https://t.me/ruRust_msk
+[progmsk]: https://prog.msk.ru/