<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Liz3 Blog</title>
    <link>https://blog.liz3.cat/</link>
    <description>Recent content on Liz3 Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 18 Aug 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.liz3.cat/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The VATSIM Network and how a Virtual airline helps to connect with new people</title>
      <link>https://blog.liz3.cat/posts/2025-08-18-vatsim-world/</link>
      <pubDate>Mon, 18 Aug 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2025-08-18-vatsim-world/</guid>
      <description>&lt;p&gt;For quite a while now(since Autumn 2024) i&amp;rsquo;ve been back into flight simulation. I was playing around with flight simulation using &lt;a href=&#34;https://en.wikipedia.org/wiki/Microsoft_Flight_Simulator_X&#34;&gt;FSX&lt;/a&gt; back as a young teen, it died down when i started my professional career as a developer around 2016.
The initial reason for getting back into it was that i watched some youtube content talking about and discuss plane accidents on a technical level and a personal level for the pilots, since the videos are created by a pilot.
As a child it was my dream to become a airline pilot myself, this was rendered impossible due to physical health reeasons early in my life already and later combined with mental health issues.&lt;/p&gt;</description>
      <content>&lt;p&gt;For quite a while now(since Autumn 2024) i&amp;rsquo;ve been back into flight simulation. I was playing around with flight simulation using &lt;a href=&#34;https://en.wikipedia.org/wiki/Microsoft_Flight_Simulator_X&#34;&gt;FSX&lt;/a&gt; back as a young teen, it died down when i started my professional career as a developer around 2016.
The initial reason for getting back into it was that i watched some youtube content talking about and discuss plane accidents on a technical level and a personal level for the pilots, since the videos are created by a pilot.
As a child it was my dream to become a airline pilot myself, this was rendered impossible due to physical health reeasons early in my life already and later combined with mental health issues.&lt;/p&gt;
&lt;p&gt;So with becoming a pilot not being a option i became a software engineer, a decision i don&amp;rsquo;t regret. But for flying theres the silver lining that flight simulation is a field which has a very dedicated scene, making it possible to go from flying with a gamepad to full on rooms converted to cockpits.&lt;/p&gt;
&lt;h2 id=&#34;vatsim&#34;&gt;VATSIM&lt;/h2&gt;
&lt;p&gt;Further there is &lt;a href=&#34;https://vatsim.net&#34;&gt;VATSIM&lt;/a&gt;, which adds a entirely new aspect to flight simulation: ATC(Air Traffic control).
Vatsim itself is a server component you use in combination with your simulator software, the client you install gets live information from the simulator and transmits it to the networks server, the client also takes care of the voice protocol with the controllers, who are also real humans. With the speciality that controllers on vatsim go through schooling, while you can go on vatsim pretty directly as a pilot, to become a controller you need to apply to a vatsim region and then go through schooling as a controller. A process which depending on what level you want to control can take a good amount of time.&lt;/p&gt;
&lt;p&gt;To fly on vatsim you do need some level of knowledge though, its not enforced explicitly but is implicitly. Going on Vatsim without prior information you will have a bad time as controllers and other pilots do have a certain expectation towards others.&lt;/p&gt;
&lt;h2 id=&#34;virtual-airlines&#34;&gt;Virtual airlines&lt;/h2&gt;
&lt;p&gt;When doing Flight simulation on VATSIM you won&amp;rsquo;t get around Virtual airlines. Since (usually) you fly as a certain airline on the network, it seams logically to look at them. It is &lt;strong&gt;not&lt;/strong&gt; required to join a virtual airline to fly on vatsim, it is entirely optional but it can add further aspects like planning, fleets, ranks and community to the flight sim experience.
The amount of features and expectations from virtual airlines towards their pilots differs a lot, from very serious to very lax. But it won&amp;rsquo;t involve monetary aspects.
Besides Virtual airlines which are subsidiaries for real airlines there are also purely virtual airline which do not exist in the real world. It actually helps them make it easier to build a own identity. But of course it also requires some level of fantasy and acceptance. Something which not all simulation flyers want, a good chunk thrive to get as close to reality as possible.&lt;/p&gt;
&lt;p&gt;Two months ago i joined a purely virtual airline: &lt;a href=&#34;https://nordfly-vag.com&#34;&gt;Nordfly&lt;/a&gt; myself, it provides everything you expect from a airline and more, the Dashboard(called Operations Center there) is very sophisticated, further the quality of brand identity build by the airline offers a experience i think is pretty unique. You are expected to fly a certain amount of flights for the airline in a certain timeframe, but those requirements are very fair and part of most virtual airlines to some degree.&lt;/p&gt;
&lt;p&gt;The other aspect i really enjoy about having joined Nordfly is that as a developer i am able to assist with the implementation and maintainance of the Website and Dashboard(and more). Something which the Owner and sole developer had problems with before.&lt;/p&gt;
&lt;p&gt;Lastly it allowed me to connect with more people again, something i was quite lacking before.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Generally speaking something i noticed is that in this simulation community. drama is not something common, its about the shared interest of flight simulation and enthusiasm for Aviation in general, nothing else. That fact helps it maintain a healthy environment for everyone, a aspect lost in other parts of the internet and especially social media.&lt;/p&gt;
&lt;p&gt;Vatsim itself is pretty big in size and also provides a bunch of public APIs for various things. I have been using it for one of my data projects(mentioned in the blog article about bun-ui too).
Which i think my next article will be about, until then!&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>A guide and explanation of Bun ui</title>
      <link>https://blog.liz3.cat/posts/2025-07-19-bun-ui/</link>
      <pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2025-07-19-bun-ui/</guid>
      <description>&lt;p&gt;Bun UI is a project i started a good while ago without a set goal per se, but it has grown to something i think is pretty cool, this is a explanation and introduction to it!&lt;/p&gt;
&lt;h1 id=&#34;what-is-bun-ui&#34;&gt;What is Bun UI&lt;/h1&gt;
&lt;p&gt;In short it&amp;rsquo;s nodejs bindings for displaying RGB(a) buffers using &lt;a href=&#34;https://www.glfw.org/&#34;&gt;GLFW&lt;/a&gt; layered in different levels of abstraction and a &lt;a href=&#34;https://github.com/Automattic/node-canvas&#34;&gt;canvas&lt;/a&gt; based plotting drawing library.&lt;/p&gt;
&lt;h1 id=&#34;how-it-came-to-be&#34;&gt;How it came to be&lt;/h1&gt;
&lt;p&gt;I didn&amp;rsquo;t mention this on the blog yet, but from time to time i like to do some data projects, as in i collect data from some services public api and then later do data things on it.
My current project involves &lt;a href=&#34;https://vatsim.dev/api/data-api/&#34;&gt;VATSIM&lt;/a&gt; btw.&lt;/p&gt;</description>
      <content>&lt;p&gt;Bun UI is a project i started a good while ago without a set goal per se, but it has grown to something i think is pretty cool, this is a explanation and introduction to it!&lt;/p&gt;
&lt;h1 id=&#34;what-is-bun-ui&#34;&gt;What is Bun UI&lt;/h1&gt;
&lt;p&gt;In short it&amp;rsquo;s nodejs bindings for displaying RGB(a) buffers using &lt;a href=&#34;https://www.glfw.org/&#34;&gt;GLFW&lt;/a&gt; layered in different levels of abstraction and a &lt;a href=&#34;https://github.com/Automattic/node-canvas&#34;&gt;canvas&lt;/a&gt; based plotting drawing library.&lt;/p&gt;
&lt;h1 id=&#34;how-it-came-to-be&#34;&gt;How it came to be&lt;/h1&gt;
&lt;p&gt;I didn&amp;rsquo;t mention this on the blog yet, but from time to time i like to do some data projects, as in i collect data from some services public api and then later do data things on it.
My current project involves &lt;a href=&#34;https://vatsim.dev/api/data-api/&#34;&gt;VATSIM&lt;/a&gt; btw.&lt;/p&gt;
&lt;p&gt;But last year i started collecting data and needed a way to easily display aggregation of that data on the screen.&lt;/p&gt;
&lt;p&gt;I knew i wanted to use node.js, as i prefer it over python(it&amp;rsquo;s personal preference, no bad blood). But i wanted to have easy, easy as in one/max two liners way to open a window on my desktop and display a graph/plot/pie chart. Like theres in python.&lt;/p&gt;
&lt;p&gt;I had experience using GLFW and opengl prior so i quickly developed a plan of how i wanted to approach this, i did not want to use &lt;a href=&#34;https://www.electronjs.org/&#34;&gt;Electron&lt;/a&gt; as that was way to heavy for my planned usecase, But there wasn&amp;rsquo;t anything existing either which matched my needs.&lt;/p&gt;
&lt;h1 id=&#34;why-bun-in-bun-ui&#34;&gt;Why Bun in Bun ui?&lt;/h1&gt;
&lt;p&gt;When i started working on this project i was working at &lt;a href=&#34;https://bun.sh&#34;&gt;bun&lt;/a&gt;, bun has a FFI api slightly different from nodes and so i wanted to combine them in order to be able to discover bugs in bun aswell as develop the project.&lt;/p&gt;
&lt;p&gt;Then bun let me go pretty unfairly. After which i also added node support via &lt;a href=&#34;https://github.com/nodejs/node-addon-api&#34;&gt;node-addon-api&lt;/a&gt;. But by then the name was set.&lt;/p&gt;
&lt;h1 id=&#34;so-how-does-it-work&#34;&gt;So how does it work&lt;/h1&gt;
&lt;p&gt;Bun ui basically consists of a GLFW window with a RGBA texture shader with exposing a api to JS land.
Then in JS land using the canvas module it also exposes a bunch of apis for drawing plots, graphs, pie charts and so on, besides some utility to save images to file system.&lt;/p&gt;
&lt;h2 id=&#34;building&#34;&gt;Building&lt;/h2&gt;
&lt;p&gt;You will need a cpp compiler and cmake.
Then you can add a git dependency to a nodejs project via &lt;code&gt;npm i --save https://github.com/liz3/bun-ui.git&lt;/code&gt;.
When using Bun, &lt;em&gt;here you are good to go&lt;/em&gt;, assuming there wheren&amp;rsquo;t any issues, canvas itself also needs some deps to build but they have a great wiki.&lt;/p&gt;
&lt;p&gt;If you are on node, you will need to &lt;code&gt;cd&lt;/code&gt; into &lt;code&gt;node_modules/bun-ui&lt;/code&gt; and run &lt;code&gt;npm run build-node&lt;/code&gt; which will build the node.js bindings. &lt;strong&gt;Now everything is good to go&lt;/strong&gt;.&lt;/p&gt;
&lt;h1 id=&#34;the-most-simple-example-of-displaying-something&#34;&gt;The most simple example of displaying something&lt;/h1&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;import&lt;/span&gt; {&lt;span style=&#34;color:#a6e22e&#34;&gt;toWindow&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;graph&lt;/span&gt;} &lt;span style=&#34;color:#a6e22e&#34;&gt;from&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;bun-ui&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;await&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;toWindow&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Hello BUN UI&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;graph&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;a Graph&amp;#34;&lt;/span&gt;, [[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;]], [[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;]]));
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Thats it&lt;/strong&gt;, this will display a graph with one point x=0,y=0 and another x=1,y=1, and a line at 0 and another at 1. The window returns a promise which resolves once the window is closed by the user.
&lt;img src=&#34;https://blog.liz3.cat/images/bunui/image.png&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Bun uis plotting library entirely works with values normalized between 0/1, thats because you can rescale the buffer and the window. Independently of each other.
You can make a graph with a very high resolution and display it on a small window and vise versa(even though that might be a bit pixelated).&lt;/p&gt;
&lt;h1 id=&#34;going-down-the-abstraction&#34;&gt;Going down the abstraction&lt;/h1&gt;
&lt;p&gt;The simple example is good but what if you want more control, can you update what&amp;rsquo;s displays, how the window behaves? Yes you can.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;toWindow&lt;/code&gt; and its version which uses arrow keys to display different images &lt;code&gt;iterativeWindow&lt;/code&gt; are all abstraction layers of &lt;code&gt;Window&lt;/code&gt;.
For &lt;code&gt;toWindow&lt;/code&gt; this looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// toWindow() -&amp;gt; easyWindowWithBounds:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;easyWindowWithBounds&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; (
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;buffer&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;) =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; Promise((&lt;span style=&#34;color:#a6e22e&#34;&gt;resolve&lt;/span&gt;) =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; window &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Window&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;title&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;ww&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;wh&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    window.&lt;span style=&#34;color:#a6e22e&#34;&gt;setCloseCallback&lt;/span&gt;(() =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e22e&#34;&gt;resolve&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    window.&lt;span style=&#34;color:#a6e22e&#34;&gt;create&lt;/span&gt;();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    window.&lt;span style=&#34;color:#a6e22e&#34;&gt;setClearColor&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;240&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;240&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;240&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;winCb&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#a6e22e&#34;&gt;winCb&lt;/span&gt;(window);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    window.&lt;span style=&#34;color:#a6e22e&#34;&gt;updateBuffer&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;buffer&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;type&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;};
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This might give a better insight. The window class has a bunch of callbacks &lt;a href=&#34;https://github.com/liz3/bun-ui?tab=readme-ov-file#window&#34;&gt;see github for a full list&lt;/a&gt; and functions which can be called again to mutate the windows state and so on. By default the event polling and re rendering is done for you but even that you can take control over!
I should mention too that theres no thread stuffs going on here, the calls into native land happen on the main thread and are designed to be as short as possible to occupate the nodejs event loop as little as possible. windows poll with a interval.&lt;/p&gt;
&lt;p&gt;Window has callbacks for mouse, key and close events among others. The clear color is for the parts of the window not covered by the buffer.&lt;/p&gt;
&lt;p&gt;I should point out that you won&amp;rsquo;t be programming the next GTA with this, but as long as what you have can be represented in a RGB, RGBA or BGRA buffer you can display it with various levels of control. Which is what the plotting library also does, it uses node-canvas to create the plots and then passes that buffer to be displayed.&lt;/p&gt;
&lt;p&gt;Bun ui is cross platform amd works on anything that runs nodejs and GLFW! the default build scripts work on mac, linux and windows.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;I do not think theres anything comparable and while i do not want to self compliment too much i believe this is a pretty cool small tool for anything involving display of pixel data on a screen. For more visit the &lt;a href=&#34;https://github.com/liz3/bun-ui&#34;&gt;Github&lt;/a&gt;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Reverse engineering Volanta to understand how it calculates the landing rate</title>
      <link>https://blog.liz3.cat/posts/2025-07-13-volanta-landing-rate/</link>
      <pubDate>Sun, 13 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2025-07-13-volanta-landing-rate/</guid>
      <description>&lt;img src=&#34;https://blog.liz3.cat/images/volanta/image.png&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/volanta/image2.png&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;p&gt;&lt;a href=&#34;https://volanta.app/&#34;&gt;Volanta&lt;/a&gt; is a application to track sessions and flights in Flight simulators. Besides tracking where you go and when, it also provides information about the landing, among that the &lt;strong&gt;Landing rate&lt;/strong&gt;, which describes the value in feet per minute at which the plane touched the ground.&lt;/p&gt;
&lt;p&gt;Within the flight simulation Community that &lt;em&gt;feet per minute&lt;/em&gt; value is the defacto standard measurement of how &amp;ldquo;smooth&amp;rdquo; the touch down was.&lt;/p&gt;</description>
      <content>&lt;img src=&#34;https://blog.liz3.cat/images/volanta/image.png&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/volanta/image2.png&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;p&gt;&lt;a href=&#34;https://volanta.app/&#34;&gt;Volanta&lt;/a&gt; is a application to track sessions and flights in Flight simulators. Besides tracking where you go and when, it also provides information about the landing, among that the &lt;strong&gt;Landing rate&lt;/strong&gt;, which describes the value in feet per minute at which the plane touched the ground.&lt;/p&gt;
&lt;p&gt;Within the flight simulation Community that &lt;em&gt;feet per minute&lt;/em&gt; value is the defacto standard measurement of how &amp;ldquo;smooth&amp;rdquo; the touch down was.&lt;/p&gt;
&lt;p&gt;Twitch streamer &lt;a href=&#34;https://twitch.tv/elmoradar&#34;&gt;elmoradar&lt;/a&gt; uses this value to decide the winners of a prediction where you can win or loose points(no real life monetary value).&lt;/p&gt;
&lt;h2 id=&#34;expectaction&#34;&gt;Expectaction&lt;/h2&gt;
&lt;p&gt;I had no set expectation or theory i wanted to prove/disprove. But some values you get made me wonder whether &lt;strong&gt;Volanta adds some randomness&lt;/strong&gt; to the landing rate.&lt;/p&gt;
&lt;h2 id=&#34;researching&#34;&gt;Researching&lt;/h2&gt;
&lt;p&gt;Volanta is a &lt;a href=&#34;https://www.electronjs.org/&#34;&gt;Electron&lt;/a&gt; app which means, its a website running on your desktop with access to the file system and so on, a lot of apps a build that way.&lt;/p&gt;
&lt;p&gt;Electron apps are relatively easy to reverse engineer as all the assets are packed in a &lt;code&gt;app.asar&lt;/code&gt; file, which is basically a zip like format. Asar is open so we can simply use its utility to decompress it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npx asar extract app.asar ./decompressed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Electron apps are written in Javascript, which means you can only obfuscate and minify(compress) the code, there are various levels of that. There are also more advanced techniques. But volanta made it relatively easily for me to figure out that:&lt;/p&gt;
&lt;p&gt;The app spawns a sub exe file, then opens a tcp(network) server to which (assumingly) the exe connects. Within the electron(javascript) code theres is only data forwarding but we can still deduce a lot, which is that.&lt;/p&gt;
&lt;p&gt;The subprocess constantly sends data to the electron app retrieved by the simulator through simconnect(which is a official link to the sim).&lt;/p&gt;
&lt;p&gt;Those consists of values in that moment like plane position, speed, altitude and so on. It also contains values for vertical speed and a true or false value whether the sim currently senses its on the ground.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Volanta considers a landing if the last dataframe did indicate the plane was in the air and the current data frame indicates the plane is on the ground. Additionally it checks if the actual speed of the plane is greater then zero.&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;checkLanding&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; (
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;previousData&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;previousData&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;onGround&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;onGround&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#f92672&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;inReplayMode&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;groundSpeed&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;r&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#a6e22e&#34;&gt;landingRate&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;verticalSpeed&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;              };
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;            }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But to actually know whether the value is edited or comes directly from the sim we need to go deeper, we know its somewhere in that sub exe.&lt;/p&gt;
&lt;p&gt;The sub exe turns out to be native code, which does make sense since using SimConnect does require native code.
Compiled native code is &lt;strong&gt;considerably harder to reverse&lt;/strong&gt; then electron. Since compiling strips the code of most information we use as humans to read it.&lt;/p&gt;
&lt;p&gt;But the fortune is with us! For debugging purposes compilers can generate a extra file which saves the lost information alongside the native code, Volanta conviently provides that file for us.
I used &lt;a href=&#34;http://ghidra.net/&#34;&gt;Ghidra&lt;/a&gt; to load the native file, iot automatically loads the extra info file and as a result it gives us code that is much closer to how it was and most important makes it easier to search it.&lt;/p&gt;
&lt;p&gt;From there i searched references to the landing rate which did not take long to find:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; __thiscall ESPPlatform&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;handle_acf_data(ESPPlatform &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;,ObjectData &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;param_1)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  FlightData &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;this_00;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;      (&lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt;sim_state).flight_data.gravity &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; param_1&lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt;dGravity;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;      (&lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt;sim_state).flight_data.vertical_speed &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; param_1&lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt;dVerticalSpeed &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;60.0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From here we can see that the vertical speed from the sim is used while being multiplied by 60.&lt;/p&gt;
&lt;p&gt;This might seam weird, but theres a logical reason, the default unit provided for vertical speed is &lt;em&gt;feet per second&lt;/em&gt;, not &lt;em&gt;feet per minute&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So to have &lt;em&gt;feet per minute&lt;/em&gt; multiplying the value by 60 is logical, but does mean theres a loss of precision over another approach like average of &lt;em&gt;feet per second&lt;/em&gt; from multiple frames.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Against expectation we can see the calculation of the landing rate is very simple, it&amp;rsquo;s not even really a calculation. &lt;strong&gt;The landing rate is the vertical speed converted from feet per second to feet per minute on the data frame of touch down&lt;/strong&gt;. At least currently!&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Do you need a Base ring ontop of a Base ring with rollei magnetic round filters</title>
      <link>https://blog.liz3.cat/posts/2025-07-10-rollei-filters/</link>
      <pubDate>Thu, 10 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2025-07-10-rollei-filters/</guid>
      <description>&lt;p&gt;Recently i bought a bunch of &lt;a href=&#34;https://www.rollei.de/en/collections/magnetic-round-filter&#34;&gt;Rollei round filters&lt;/a&gt;. Those filters are special in the regard that they are not classic screw filters, but magnetic filters you clip onto each other.&lt;/p&gt;
&lt;p&gt;This does mean though, that you need a &lt;em&gt;Base Ring&lt;/em&gt; which actually attaches to the lense by screwing. The filters themselfs do not have to have the same diameter as the lens though, for that purpose Rollei sells seperate &lt;a href=&#34;https://www.rollei.de/en/products/fx-pro-magnetic-round-filter-mark-ii-step-up-ring?variant=41598964662466&#34;&gt;Step up rings&lt;/a&gt;, which connect a smaller diameter size to a bigger one.&lt;/p&gt;</description>
      <content>&lt;p&gt;Recently i bought a bunch of &lt;a href=&#34;https://www.rollei.de/en/collections/magnetic-round-filter&#34;&gt;Rollei round filters&lt;/a&gt;. Those filters are special in the regard that they are not classic screw filters, but magnetic filters you clip onto each other.&lt;/p&gt;
&lt;p&gt;This does mean though, that you need a &lt;em&gt;Base Ring&lt;/em&gt; which actually attaches to the lense by screwing. The filters themselfs do not have to have the same diameter as the lens though, for that purpose Rollei sells seperate &lt;a href=&#34;https://www.rollei.de/en/products/fx-pro-magnetic-round-filter-mark-ii-step-up-ring?variant=41598964662466&#34;&gt;Step up rings&lt;/a&gt;, which connect a smaller diameter size to a bigger one.&lt;/p&gt;
&lt;p&gt;This gives the advantage that you only need the actual filters in one size and with the Step up rings can connect them with smaller lenses.
For lenses which are already the correct size, you need a fitting &amp;ldquo;Base ring&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The Big question i had was: If i buy the Step up ring, do i still need a classical Base ring on top for the actual filters.&lt;/p&gt;
&lt;p&gt;Since the order was quite pricy i searched a lot but could not find a definite answer. I went ahead and betted that i do not need extra Base rings.&lt;/p&gt;
&lt;p&gt;Which luckily turned out to be &lt;strong&gt;True, you do not need a Base ring with a Step up ring&lt;/strong&gt;. The Step up ring also has a screw mechanism for the lense directly.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Disclaimer: The links are not affiliate links, i am just writing the blog post which i needed when i bought them.&lt;/em&gt;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>So whats the fuzz about Pigeons?</title>
      <link>https://blog.liz3.cat/posts/2025-06-30-pigeons/</link>
      <pubDate>Mon, 30 Jun 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2025-06-30-pigeons/</guid>
      <description>&lt;p&gt;Pigeons are special, but me saying that might surprise you, let me give you some context.&lt;/p&gt;
&lt;h1 id=&#34;what-is-a-pigeon&#34;&gt;What is a pigeon&lt;/h1&gt;
&lt;p&gt;The Pigeon is a very long domesticated bird. Thousands, yes thousands of years ago we used their extreme good navigational sense or for food.
Pigeons you see in cities are rock pigeons, one of a few existing pigeon species like the Common wood pigeon, Eurasian collared dove or the Diamond Pigeon.&lt;/p&gt;</description>
      <content>&lt;p&gt;Pigeons are special, but me saying that might surprise you, let me give you some context.&lt;/p&gt;
&lt;h1 id=&#34;what-is-a-pigeon&#34;&gt;What is a pigeon&lt;/h1&gt;
&lt;p&gt;The Pigeon is a very long domesticated bird. Thousands, yes thousands of years ago we used their extreme good navigational sense or for food.
Pigeons you see in cities are rock pigeons, one of a few existing pigeon species like the Common wood pigeon, Eurasian collared dove or the Diamond Pigeon.&lt;/p&gt;
&lt;p&gt;Rock Pigeons are like their name suggests living in Rocks and Cliffs. Which is also why they feel &amp;ldquo;safe&amp;rdquo; within our cities. The tall buildings of cities resemble the Rocks and Cliffs enough that they use them as nesting grounds, &lt;strong&gt;note especially Bridge support beams are a very common home for the Rock Pigeon&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;During World War 2, Pigeons where used to transmit messages which saved a lot of lives, a few pigeons even received medals of honours for their role in coordination during the War.&lt;/p&gt;
&lt;p&gt;After pigeons where no longer needed for that purpose a lot of the breeders simply set free their flocks, their descendants are the pigeons living in our cities now.&lt;/p&gt;
&lt;h1 id=&#34;about-the-pigeons-bad-image&#34;&gt;About the pigeons bad image&lt;/h1&gt;
&lt;p&gt;Today most people will simply ignore pigeons within cities, but the perception is largly negative. And yes i can understand that people can get upset when a bird poops everywhere on their car or Subway stations Stairways.&lt;/p&gt;
&lt;p&gt;That is a fundamentally flawed view since we put pigeons on the street, they are simply fighting for survival.&lt;/p&gt;
&lt;p&gt;Which is also why from time to time when driving you will encounter pigeons on the street, who are either desperately trying to eat some food or are dissoriented and/or weak.&lt;/p&gt;
&lt;h2 id=&#34;food&#34;&gt;Food&lt;/h2&gt;
&lt;p&gt;Contradictory to a spread belief, Bread is not natural food for Pigeons, you can compare it to us eating raw Flour or sugar, yes it has calories but its probably not a good diet and might leave us with a upset stomache. Which is exactly what happens with Pigeons, their urine and poop is ejected at the same time, but normally is solid and does not splash. The splashing most people despite comes from the poor, very poor diet they have to live with, &lt;strong&gt;if you ate basically nothing for 2 weeks im sure you would love the plate full of sugar.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pigeons depend on us Humans feeding them their diet of seeds they naturally need, within the city they are unable to find enough food, not speaking of a healthy diet.&lt;/p&gt;
&lt;h2 id=&#34;hygiene&#34;&gt;Hygiene&lt;/h2&gt;
&lt;p&gt;Pigeons are very clean birds, they meticulously clean their feathers for flight with their beak and do take baths too.
Yes like any animal living with humans, they carry deseases of which a very few they can transmit to us, among them being salmonella and Psittacosis.
Although to catch those you need to be working with the birds directly and need to either inhale feather dust or have poor hygenic routines. &lt;strong&gt;To put it short, it is as likely you will catch something from your dog or even more likely then from a pigeon&lt;/strong&gt;, especially without direct contact. It is much more likely you will transmit a virus or a bacteria to the pigeon which it can get sick of.&lt;/p&gt;
&lt;h2 id=&#34;behaviour-and-mating&#34;&gt;Behaviour and Mating&lt;/h2&gt;
&lt;p&gt;There are people who will say that they saw &amp;ldquo;Fat&amp;rdquo; Pigeons, the thruth though, pigeons do not get fat.
If you experience a larger then usual pigeon it is almost certain that stems from the fact it fluffed up, which means it puts air between the skin and the feathers. This serves two purposes, 1. Male will use it to impress females when trying to mate. 2. By fluffing up they preserve heat, which is a indicator a pigeon is not doing well, pigeons do not get fever. When sick they cool down and thus fluffing up is a way to preserve body temperature, which is around 40-41 degrees celcius.&lt;/p&gt;
&lt;p&gt;Pigeons usually mate for life. Once a couple found together they stay together until one of them dies. Parents further share the feeding of chicks, with both producing a milk from what they eat.
Gay and lesbian pigeons are also a thing btw!&lt;/p&gt;
&lt;h2 id=&#34;population-spread&#34;&gt;Population spread&lt;/h2&gt;
&lt;p&gt;Pigeons are not very picky about nests and so they mate year around.
Denying feeding will make the problem worse as when starved, couples will start laying even more eggs in a attempt to preserve their existance.
Chemical approaches like &amp;ldquo;the pill for pigeons&amp;rdquo; can of course work but usually do not take side effects into account and are hard to monitor.&lt;/p&gt;
&lt;p&gt;The best way to effectively and sustainably control the population is to build controlled breading spaces where eggs are replaced by fake ones.&lt;/p&gt;
&lt;h1 id=&#34;a-note-on-pigeon-racing&#34;&gt;A note on Pigeon racing&lt;/h1&gt;
&lt;p&gt;Yes Pigeon racing is a sport.
But like with most sports involving animals, its only the human who is enyoing it.&lt;/p&gt;
&lt;p&gt;Pigeons homing sense allows them to find their home from a very far distance.
Pigeon racers abuse that trait and the extreme need of a bird to return to their partner or chicks to force them flying over large distance, exhausting themselfs or being eaten by other predators. Often they also strand in cities exhausted, sometimes unable to continue.&lt;/p&gt;
&lt;h1 id=&#34;so-what-should-you-do&#34;&gt;So what should you do&lt;/h1&gt;
&lt;p&gt;I hope this changed your view on those birds the next time you see one, you do not have to love them. But please don&amp;rsquo;t hate them. If you want to feed them, prefer seeds or unsalted peanuts over bread.&lt;/p&gt;
&lt;p&gt;And if you find a weak animal not flying away help it by putting it in a cartbox, make a nest out of a towel to put the pigeon in, &lt;em&gt;do not give water or food!&lt;/em&gt; and research locals in your cities or vets(which are familiar with birds) to contact them and hopefully help the pigeon. Pigeons cannot scream, they suffer in silence. And if it does not fly away. It means its urgent time to help!&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/pigeons/img1.jpeg&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
</content>
    </item>
    
    <item>
      <title>Experience turning a color e-ink paper display into a digital picture frame...and learning rust along the way.</title>
      <link>https://blog.liz3.cat/posts/2024-06-21-eink-display/</link>
      <pubDate>Fri, 20 Sep 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2024-06-21-eink-display/</guid>
      <description>&lt;p&gt;This is not something i expected myself to be writing about, but i think the hurdles, learning and overall experience doing this project are worth a blog post.&lt;/p&gt;
&lt;p&gt;A close friend of mine had started tinkering with a color e-ink display a while ago, we talked about it and she proposed me to buy a bigger version of the display. Since we had planned to meet up it was a good idea for a time sink anyway, so i ordered a &lt;a href=&#34;https://www.waveshare.com/7.3inch-e-paper-hat-f.htm&#34;&gt;7.3inch ACeP 7-Color E-Paper E-Ink Display Module&lt;/a&gt;, a &lt;a href=&#34;https://www.amazon.de/dp/B09WRBHS7B?ref=ppx_yo2ov_dt_b_product_details&amp;th=1&#34;&gt;starter electrics bundle&lt;/a&gt; and a &lt;a href=&#34;https://www.amazon.de/dp/B0CG3BV1TZ?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details&#34;&gt;debug probe for the Raspberry Pico W&lt;/a&gt;, totally unaware of what rabbithole i was signing up to. I should mention that my friend provided the PI pico at first.&lt;/p&gt;</description>
      <content>&lt;p&gt;This is not something i expected myself to be writing about, but i think the hurdles, learning and overall experience doing this project are worth a blog post.&lt;/p&gt;
&lt;p&gt;A close friend of mine had started tinkering with a color e-ink display a while ago, we talked about it and she proposed me to buy a bigger version of the display. Since we had planned to meet up it was a good idea for a time sink anyway, so i ordered a &lt;a href=&#34;https://www.waveshare.com/7.3inch-e-paper-hat-f.htm&#34;&gt;7.3inch ACeP 7-Color E-Paper E-Ink Display Module&lt;/a&gt;, a &lt;a href=&#34;https://www.amazon.de/dp/B09WRBHS7B?ref=ppx_yo2ov_dt_b_product_details&amp;th=1&#34;&gt;starter electrics bundle&lt;/a&gt; and a &lt;a href=&#34;https://www.amazon.de/dp/B0CG3BV1TZ?psc=1&amp;ref=ppx_yo2ov_dt_b_product_details&#34;&gt;debug probe for the Raspberry Pico W&lt;/a&gt;, totally unaware of what rabbithole i was signing up to. I should mention that my friend provided the PI pico at first.&lt;/p&gt;
&lt;h1 id=&#34;whats-a-e-ink-paper-display-anyway&#34;&gt;What&amp;rsquo;s a E-Ink paper display anyway?&lt;/h1&gt;
&lt;p&gt;It&amp;rsquo;s a display but rather then using lid pixels it uses pigments which physically alter the display creating the image.
This has the advantage that the image is clearer and does not have the issue of edges you can have with normal pixel displays.
Further if you cut the power to the display, the image stays, theres no blackout like on classsical displays.
One of the disadvantages is that a update of the frame can take a long time, multiple seconds. Also that most E-Ink display&amp;rsquo;s do not support a lot of colours.&lt;/p&gt;
&lt;h1 id=&#34;whats-about-the-pico&#34;&gt;What&amp;rsquo;s about the Pico&lt;/h1&gt;
&lt;p&gt;The Pico is a super tiny computer. It does not run a classical operating system. It only runs your code, but still has multicore capabilities, has a wifi chip(the W version) and has a usb port you can use to flash the 2mb ROM of the Pico, a clock chip and so on.
But Of course besides the extremely low power consumption, the appeal is that it is designed to interact with external hardware like LEDs, sensors, displays and more over PIO(Programmable Input/Output).&lt;/p&gt;
&lt;p&gt;For that interaction it has a range of connectors, Pins which support different protocols, by that i mean that they do not only support setting or reading or removing a voltage, but they also support more complex protocols for data transfer, analog reading and much more.&lt;/p&gt;
&lt;h1 id=&#34;getting-started&#34;&gt;Getting started&lt;/h1&gt;
&lt;p&gt;When starting i had no experience working with the pico or those e-ink displays. My idea was simply put to have this display rotate through some of my images and display them like a digital picture frame.&lt;/p&gt;
&lt;p&gt;After getting the display the first thing was not to use it actually but to get familiar with the pico by just playing around with some LEDs.
That went pretty well, the pi has a bunch of input and output pins you can control by simply setting them high or low, or in other cases use more advanced protocols for data transfers like i2c, spi and so on.&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/eink/diagram.png&#34; style=&#34;width: auto&#34; /&gt;
&lt;p&gt;This might seam like a lot but once you get the idea of it, the usage actually becomes pretty simple and intuitive.&lt;/p&gt;
&lt;h2 id=&#34;getting-the-waveshare-display-to-work&#34;&gt;Getting the Waveshare display to work&lt;/h2&gt;
&lt;p&gt;The display we use is the &lt;a href=&#34;https://www.waveshare.com/7.3inch-e-paper-hat-f.htm&#34;&gt;7.3inch ACeP 7-Color E-Paper E-Ink Display Module&lt;/a&gt;, it supports 7 colors, the data transfer is done via the SPI protocol.&lt;/p&gt;
&lt;p&gt;The first hurdles is getting the pins connected, the display has 8 pins, not all of them can be connected to any slot of the Pico, because for example not all pins of the Pico support the SPI protocol.&lt;/p&gt;
&lt;p&gt;After the pins are connected, getting the default code setup is the next step. This is not really complicated per se. The issue is that you need specific toolchain setups and libraries for the Pico. After all you are running software directly on the chip, theres no operating system inbetween.
For this after some time i decided to use &lt;a href=&#34;https://github.com/embassy-rs/embassy&#34;&gt;embassy-rs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are &lt;a href=&#34;https://github.com/caemor/epd-waveshare&#34;&gt;dedicated libraries&lt;/a&gt; for those displays but i decided against using it because at time of starting the project the implementation for the specific display was just merged into the main branch but even then it did not seam to work and besides that the code needed for the display is not very complicated anyways.
Although i should mention that the reason the display was not working might have been another one.&lt;/p&gt;
&lt;h2 id=&#34;issues-getting-the-display-to-power-on&#34;&gt;Issues getting the Display to Power on&lt;/h2&gt;
&lt;p&gt;I would argue the biggest issue while getting the display to work is that Waveshare does provide little to no effective documentation regarding the hardware setup. When starting with this, it could have eliminated a lot of uncertainity while trying to get it to work.
This comes from the fact that besides the &lt;em&gt;busy&lt;/em&gt; pin theres no feedback from the display, the pin can be low showing the display is busy and high indicating it&amp;rsquo;s not busy, but thats all.&lt;/p&gt;
&lt;p&gt;One of the biggest issues i encountered during that, was that the display not doing anything and the driver board of the display heating up a lot. That came from the fact, that the ribbon cable from the display&amp;rsquo;s driver board and the display has a connector which can be hard to understand.
Tne reason is that the connector has a closing mechanism which is not intuitive to use, if you do not know the mechanism for opening and closing it, you might aswell think it has no closing function at all. Besides that you need a lot of force equaly distribution to open it.&lt;/p&gt;
&lt;p&gt;&lt;video style=&#34;height: auto; width: auto; display: block; margin: 0 auto; max-height: 600px;&#34; controls&gt;&lt;source src=&#34;https://blog.liz3.cat/images/eink/connector.mov&#34; type=&#34;video/mp4&#34;&gt;&lt;/video&gt;
So the thing is: &lt;strong&gt;even after understanding this, the display still did not update. Making me believe it was broken, but the next day it started working&lt;/strong&gt;. That was very confusing and to this day i am not sure why it just started working randomly.&lt;/p&gt;
&lt;p&gt;Another issue was the confusion about the voltage the display needs, 3.3V or 5V? The datasheet from Waveshare does not make that obvious. It states it supports both. I can confirm it does work with 3.3V, connecting the VCC line to a 3.3V power connector on the pico.&lt;/p&gt;
&lt;h2 id=&#34;display-something&#34;&gt;Display something&lt;/h2&gt;
&lt;p&gt;As mentioned earlier i decided to not use a library but to implement the driver code myself.
Doing that requires a SPI interface, a bunch of functions which send hardcoded set of data over spi for control like: init, turn on, update, turn off. Another function to reset the display(this uses a dedicated pin) and the busy pin for knowing if the display is busy.
The resource i used to write that code is the &lt;a href=&#34;https://github.com/waveshareteam/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_7in3f.c&#34;&gt;waveshare c driver&lt;/a&gt;, porting this to rust was not very difficult using the &lt;a href=&#34;https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/spi.rs&#34;&gt;spi example&lt;/a&gt; for embassy rs.&lt;/p&gt;
&lt;p&gt;The issue there was that the code i wrote was not very maintainable.
Because i had not used rust for a while and this is pretty low level code, there was a lot of duplication of code, non optimal patterns and bad practices.&lt;/p&gt;
&lt;p&gt;Now the abstract code to display something is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-rust&#34; data-lang=&#34;rust&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.send_init();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.send_command(&lt;span style=&#34;color:#ae81ff&#34;&gt;0x10&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; _ &lt;span style=&#34;color:#66d9ef&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;..&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WIDTH&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;HEIGHT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    display_driver.send_data(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;[&lt;span style=&#34;color:#ae81ff&#34;&gt;0x11&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.turn_on();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.refresh();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.wait_busy();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.turn_off();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.deep_sleep();
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After the &lt;code&gt;init&lt;/code&gt; and spi command &lt;code&gt;send_command&lt;/code&gt;, the reason that we only send half the pixels in bytes is that the 7 colors the display supports means we can fit two colors in one byte. &lt;code&gt;0x11&lt;/code&gt; means we are sending the white color for both the pixels in the byte, &lt;code&gt;send_data&lt;/code&gt; takes a byte array to send over spi.
The actual update happens during the &lt;code&gt;refresh&lt;/code&gt; call, this call takes ~30 seconds.
What the difference between &lt;code&gt;turn_off()&lt;/code&gt; and &lt;code&gt;deep_sleep()&lt;/code&gt; is, im not entirely sure about. But deep_sleep does not release the busy pin ever. Meaning it is something final(probably).&lt;/p&gt;
&lt;h1 id=&#34;display-a-picture-on-the-frame&#34;&gt;Display a Picture on the frame&lt;/h1&gt;
&lt;p&gt;The biggest part of displaying a picture on the eink display is reducing the colors to the 7 by using dithering, which means putting two of the 7 colors next to each other in a way which from further away seams like a different color.
To archive that we use the &lt;code&gt;convert&lt;/code&gt; tool from ImageMagick.&lt;/p&gt;
&lt;p&gt;We can give it a color palette in form of a BMP and a input file in order to dither the image.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ convert /input/image.jpg -alpha off -dither FloydSteinberg -remap /assets/palette_file.bmp /output/image.jpg&lt;/code&gt;&lt;/p&gt;
&lt;div style=&#34;display: flex;width: 100%; flex-wrap: wrap&#34;&gt;
  &lt;img src=&#34;https://blog.liz3.cat/images/eink/pre_diter.jpg&#34; style=&#34;width: 50%;min-width: 200px&#34; /&gt;
  &lt;img src=&#34;https://blog.liz3.cat/images/eink/dither.jpg&#34; style=&#34;width: 50%;min-width: 200px&#34; /&gt;
&lt;/div&gt;
&lt;p&gt;Left is &lt;strong&gt;before&lt;/strong&gt; and right is after &lt;strong&gt;dithering&lt;/strong&gt;, as you can see while the right version is much darker, it does not loose a lot of detail even though it is only made of &lt;strong&gt;7 colours&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Another thing is that the waveshare display is 800x480 and so we need to scale the image to it:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ convert /input/image.jpg -alpha off -resize 800x480^ -gravity Center -extend 800x480 +depth -dither FloydSteinberg -remap /assets/palette_file.bmp /output/image.jpg&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After that we can send the file to the display, even though of course we need to send the raw pixel data, not the entire BMP file.&lt;/p&gt;
&lt;p&gt;This is very easy, the data offset is simply reading a &lt;code&gt;uint32_t&lt;/code&gt; at offset &lt;code&gt;0x0A&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Sending the image to the Display can be another thing though.&lt;/p&gt;
&lt;h1 id=&#34;using-the-tcp-stack-to-receive-a-image&#34;&gt;Using the TCP Stack to receive a image&lt;/h1&gt;
&lt;p&gt;We first need to setup the TCP stack, here is a reduced version of loading the wifi chip firmware, joining the network and setting up the api stack:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-rust&#34; data-lang=&#34;rust&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; pwr &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Output::new(p.&lt;span style=&#34;color:#66d9ef&#34;&gt;PIN_23&lt;/span&gt;, Level::Low);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; cs &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Output::new(p.&lt;span style=&#34;color:#66d9ef&#34;&gt;PIN_25&lt;/span&gt;, Level::High);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; pio &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Pio::new(p.&lt;span style=&#34;color:#66d9ef&#34;&gt;PIO0&lt;/span&gt;, Irqs);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; spi &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; PioSpi::new(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; pio.common, pio.sm0, pio.irq0, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    cs, p.&lt;span style=&#34;color:#66d9ef&#34;&gt;PIN_24&lt;/span&gt;, p.&lt;span style=&#34;color:#66d9ef&#34;&gt;PIN_29&lt;/span&gt;, p.&lt;span style=&#34;color:#66d9ef&#34;&gt;DMA_CH0&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;STATE&lt;/span&gt;: &lt;span style=&#34;color:#a6e22e&#34;&gt;StaticCell&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;cyw43::State&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; StaticCell::new();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; state &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;STATE&lt;/span&gt;.init(cyw43::State::new());
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; (net_device, &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; control, runner) &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; cyw43::new(state, pwr, spi, &lt;span style=&#34;color:#66d9ef&#34;&gt;FW&lt;/span&gt;).&lt;span style=&#34;color:#66d9ef&#34;&gt;await&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; stack &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;*&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;STACK&lt;/span&gt;.init(Stack::new(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  net_device,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  config,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;RESOURCES&lt;/span&gt;.init(StackResources::&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;::new()),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  seed,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;unwrap!(spawner.spawn(net_task(stack)));
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See the complete example here &lt;a href=&#34;https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/wifi_tcp_server.rs&#34;&gt;github.com/embassy-rs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After this we can use a pretty ordinary Network API to talk with other devices over TCP:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-rust&#34; data-lang=&#34;rust&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; rx_buffer &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;; &lt;span style=&#34;color:#ae81ff&#34;&gt;4096&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; tx_buffer &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;; &lt;span style=&#34;color:#ae81ff&#34;&gt;4096&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; socket &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; embassy_net::tcp::TcpSocket::new(stack,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; rx_buffer, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; tx_buffer);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;socket.set_timeout(Some(Duration::from_secs(&lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;)));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;info!(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Connecting...&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; host_addr &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; embassy_net::Ipv4Address::from_str(&lt;span style=&#34;color:#66d9ef&#34;&gt;IP&lt;/span&gt;).unwrap();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; Err(e) &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; socket.connect((host_addr, &lt;span style=&#34;color:#66d9ef&#34;&gt;PORT&lt;/span&gt;)).&lt;span style=&#34;color:#66d9ef&#34;&gt;await&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  warn!(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;connect error: {:?}&amp;#34;&lt;/span&gt;, e);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// reading:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; result &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; socket.read(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; buffer);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// write
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; result &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; socket.write_all(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;bytes);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is actually pretty cool, it is a very c like api, so wrapping my head around it was not hard.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A small catch: With the amount the embassy rs runtime takes + the wifi stack, we fill up the RAM of the pico very fast. Making it unable to have a entire image (800 * 480 /2) bytes available on top.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But we can work around that, by directly sending the data through to the waveshare display, because the stack is not slow, so speed is not a issue.
Since the display itself only starts actually updating the displayed content on the refresh command, it is inherently able to handle the entire data size.&lt;/p&gt;
&lt;p&gt;So basically we need to just connect to our remote source and then transfer the data directly to the display driver:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-rust&#34; data-lang=&#34;rust&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;display_driver.send_init();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;display_driver.send_command(&lt;span style=&#34;color:#ae81ff&#34;&gt;0x10&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; socket &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; embassy_net::tcp::TcpSocket::new(stack, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; rx_buffer, &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; tx_buffer);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;loop&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; data_buffer &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;; &lt;span style=&#34;color:#ae81ff&#34;&gt;4096&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; read &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; socket.read(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;mut&lt;/span&gt; data_buffer).unwrap();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; read &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;break&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  display_driver.send_data(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;data_buffer[&lt;span style=&#34;color:#f92672&#34;&gt;..&lt;/span&gt;read]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;socket.close();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;display_driver.turn_on();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;display_driver.refresh(); &lt;span style=&#34;color:#75715e&#34;&gt;// display updates here
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;//...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This does give you a working example of how to send data, even though of course that code snippet &lt;strong&gt;is simplified&lt;/strong&gt;.&lt;/p&gt;
&lt;h1 id=&#34;putting-it-all-together&#34;&gt;Putting it all together&lt;/h1&gt;
&lt;p&gt;At this point you probably have a good idea of how to drive such a display.&lt;/p&gt;
&lt;p&gt;I ended up writing a Node.js server using its &lt;a href=&#34;https://nodejs.org/api/net.html&#34;&gt;tcp api&lt;/a&gt;, which first of all has a folder with jpeg files of a lot of my favorite images, which acts as a source.
Since this is all in LAN theres no authentication.&lt;/p&gt;
&lt;p&gt;The node.js app waits for connections to the tcp server, first reads a few bytes from the connection which are controlled by physical buttons(or a touch display) on the pico for going back, forward or get a random image.&lt;/p&gt;
&lt;p&gt;It then gets that image out of that folder, invokes the &lt;code&gt;convert&lt;/code&gt; command with the output to stdout(simply by giving this as the last argument rather then a output path: &lt;code&gt;BMP3:-&lt;/code&gt;) using Node&amp;rsquo;s &lt;a href=&#34;https://nodejs.org/api/child_process.html&#34;&gt;child_process&lt;/a&gt; api and just sending the BMP data to the connection, updating the image.&lt;/p&gt;
&lt;p&gt;As a final step i put the image display in a actual image frame to act like a digital image frame displaying my favorite images.&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/eink/final.jpg&#34; style=&#34;width: auto&#34; /&gt;
&lt;h2 id=&#34;a-small-detour-on-the-e-ink-touch-display&#34;&gt;A small detour on the e-ink touch display&lt;/h2&gt;
&lt;p&gt;The touch display you can see on the left is pretty simple, it is a &lt;a href=&#34;https://www.waveshare.com/2.9inch-touch-e-paper-hat.htm&#34;&gt;2.9&amp;quot; black/white touch eink display&lt;/a&gt; it works basically like the big one, with the only noticable differences being that it for one only has black or white, reducing the data amount a lot to a bit per pixel and secondly it has a &lt;em&gt;touch surface&lt;/em&gt;, which i use to control the signals send to the tcp server in order to get different results.&lt;/p&gt;
&lt;p&gt;It uses &lt;a href=&#34;https://docs.rs/embedded-graphics/latest/embedded_graphics/&#34;&gt;embedded_graphics&lt;/a&gt; which has static bitmap fonts and functions to render shapes and text, this is done on the pico directly.&lt;/p&gt;
&lt;h1 id=&#34;final-thoughts&#34;&gt;Final thoughts&lt;/h1&gt;
&lt;p&gt;Even though this project is done for a good while it is one of my favorites, i am not per se a hardware guy. My big projects are gui applications and a programming language i contribute to.&lt;/p&gt;
&lt;p&gt;This project has tought me a lot how to connect easy hardware components to each other, i have learned about SPI, i2c and other protocols. But most importantly i have had a lot of fun building and coding it, further the projects result gave me a useful way to display some of the images i took in a nice way.&lt;/p&gt;
&lt;h2 id=&#34;on-rust&#34;&gt;On Rust&lt;/h2&gt;
&lt;p&gt;The reality is that i am not sold on rust, rust is a very good language. It does give you a lot of safety and modern features amongst the memory safety given by the compiler&amp;rsquo;s borrow checker.&lt;/p&gt;
&lt;p&gt;But there are a few things for me which make using it very annoying like that for example when upcasting a integer type, even though it is not possible to have UB you &lt;strong&gt;have&lt;/strong&gt; to explicitly cast it, which leads to a lot of casting around numbers which could also happen automatically. Another thing is lifetimes, lifetimes and the way they require to have types and functions writted is very unintuitive and seams to be more for readability then actual function. The compiler could infer them.&lt;/p&gt;
&lt;p&gt;Another thing is async functions and their expectation regarding lifetimes, but that might be due to my limited knowledge of them and might not be a issue with the language or the implementation of async/await in rust.&lt;/p&gt;
&lt;p&gt;I like C and i like C++, sometimes i feel rust&amp;rsquo;s safety features get more in my way then to assist me at writing better code. But overall Rust is a very capable tool and i understand everyone who loves it, is it going to steer me away from C++ though? probably not.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>My experience going to Dokomi for the first time</title>
      <link>https://blog.liz3.cat/posts/2024-07-02-dokomi-2024/</link>
      <pubDate>Tue, 02 Jul 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2024-07-02-dokomi-2024/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve never been to a Anime convention before, infact due to the social anxiety created by the [Depression]({% link _posts/2024-01-07-depression.md %}) i had avoided big crowds alltogether for a good while.&lt;/p&gt;
&lt;p&gt;But after the stay at the Day clinic was over at the start of June, i decided to go with my friends, as i was staying in the area of the convention anyways.&lt;/p&gt;
&lt;h1 id=&#34;what-is-dokomi&#34;&gt;What is Dokomi&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.dokomi.de/en&#34;&gt;Dokomi&lt;/a&gt; is one of the biggest anime and manga conventions in europe, receiving well over 100.000 guests.&lt;/p&gt;</description>
      <content>&lt;p&gt;I&amp;rsquo;ve never been to a Anime convention before, infact due to the social anxiety created by the [Depression]({% link _posts/2024-01-07-depression.md %}) i had avoided big crowds alltogether for a good while.&lt;/p&gt;
&lt;p&gt;But after the stay at the Day clinic was over at the start of June, i decided to go with my friends, as i was staying in the area of the convention anyways.&lt;/p&gt;
&lt;h1 id=&#34;what-is-dokomi&#34;&gt;What is Dokomi&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.dokomi.de/en&#34;&gt;Dokomi&lt;/a&gt; is one of the biggest anime and manga conventions in europe, receiving well over 100.000 guests.&lt;/p&gt;
&lt;h1 id=&#34;why-would-i-go-there&#34;&gt;Why would i go there&lt;/h1&gt;
&lt;p&gt;To be entirely honest the main reason i wanted to go was because my friends where going. But i have a weakness for Anime art, especially drawings. I did draw some manga myself a while back. I never really watched a lot of anime but that didn&amp;rsquo;t stop me from really getting to like the drawing style.&lt;/p&gt;
&lt;p&gt;And since the main friend i was going with is also into art, we spend the time together mostly in the Artists Alley. Where you could see art from over 700, yes 700 artists and buy prints, stickers, pins, cards, key chains and more&amp;hellip;
Besides the Artists Alley there are stands from game devs, manga sellers, merch sellers&amp;hellip;its huge.&lt;/p&gt;
&lt;h1 id=&#34;how-my-experience-was&#34;&gt;How my experience was&lt;/h1&gt;
&lt;p&gt;Better then i thought, before the first day it was not entirely clear if i would be able to handle the big crowds and i mean there where extremely crowded moments, especially on the weekend. But the extreme anxiety i was fearing did not come and besides some small incidents it went pretty well.&lt;/p&gt;
&lt;p&gt;The saturday was the worst day on which it was hard to keep moving sometimes, the other two days where fin&amp;rsquo;ish but still full of course.&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/people.jpg&#34; style=&#34;height: auto; width: auto; max-height: 360px;&#34; /&gt;
&lt;p&gt;I was entirely blown away by the amount of amnazing anime art there and fully emerged there for a good while, looking and (also) buying amazing art.&lt;/p&gt;
&lt;p&gt;Besides the art we bought on sunday we also participated in a scavenger hunt which gave you tasks like to do a photo at stand x or play a game at y and so on&amp;hellip;(and follow our sponsor on instagram). After finishing the scavenger hunt we got to choose from some goods and i went with a blue mousepad to have a cool reminder.&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/mp.jpg&#34; style=&#34;height: auto; width: auto; max-height: 360px;&#34; /&gt;
&lt;p&gt;Besides that there where a &lt;strong&gt;lot&lt;/strong&gt; of cosplayers from across the entire gaming and film scene, though anime characters from popular games or shows where represented the most obviously.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;If you are someone who likes anime and manga you will not want to miss this convention, you will find something to do or buy you love, but for art enthusiasts i warn you, &lt;strong&gt;your wallet will suffer&lt;/strong&gt;. But for me me that was definitely worth it.&lt;/p&gt;
&lt;p&gt;Here are the artworks i claimed at the convention(&lt;em&gt;the video contains one NSFW piece!&lt;/em&gt;):&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/genshin1.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px;&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/genshin2.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px;&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/stickers.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px;&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/big1.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/big2.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/dokomi2024/big3.jpg&#34; style=&#34;height: auto; width: auto; max-height: 480px;&#34; /&gt;
&lt;p&gt;&lt;video style=&#34;height: auto; width: auto; display: block; margin: 0 auto; max-height: 600px;&#34; controls&gt;&lt;source src=&#34;https://blog.liz3.cat/images/dokomi2024/video.mp4&#34; type=&#34;video/mp4&#34;&gt;&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;See you at Dokomi in 2025 maybe!&lt;/em&gt;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>What Cameras i use and why</title>
      <link>https://blog.liz3.cat/posts/2024-02-06-cameras/</link>
      <pubDate>Sun, 02 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2024-02-06-cameras/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve done a lot of photography in my teens, mostly animal photography. But i stopped around 2020-2021.
Recently though ive found a big interest again in picking up photography again as a way to distract myself and keep myself busy with something i enjoy.
I mostly do street photography and animal photography.&lt;/p&gt;
&lt;h2 id=&#34;do-you-even-need-cameras-though&#34;&gt;Do you even need cameras though?&lt;/h2&gt;
&lt;p&gt;No you don&amp;rsquo;t, the aspect for me that makes photography special is the moment you capture, the play with subjects, light and so on.
Our phones these days have thanks to very good sensors and software gotten to the point where from a technical standpoint the pictures they produce are extremely good, but i still do not photograph with my phone at all, i&amp;rsquo;ll say why next but know i really don&amp;rsquo;t mind Smartphone photography and i think its a great medium.
But why don&amp;rsquo;t i use my phone then?&lt;/p&gt;</description>
      <content>&lt;p&gt;I&amp;rsquo;ve done a lot of photography in my teens, mostly animal photography. But i stopped around 2020-2021.
Recently though ive found a big interest again in picking up photography again as a way to distract myself and keep myself busy with something i enjoy.
I mostly do street photography and animal photography.&lt;/p&gt;
&lt;h2 id=&#34;do-you-even-need-cameras-though&#34;&gt;Do you even need cameras though?&lt;/h2&gt;
&lt;p&gt;No you don&amp;rsquo;t, the aspect for me that makes photography special is the moment you capture, the play with subjects, light and so on.
Our phones these days have thanks to very good sensors and software gotten to the point where from a technical standpoint the pictures they produce are extremely good, but i still do not photograph with my phone at all, i&amp;rsquo;ll say why next but know i really don&amp;rsquo;t mind Smartphone photography and i think its a great medium.
But why don&amp;rsquo;t i use my phone then?&lt;/p&gt;
&lt;p&gt;Theres two reasons, the first is technical: a actual camera has a way bigger sensor then a phone and also a actual lens, something which a phone needs to compensate by software or multiple sensors/lenses. The bigger sensor allows to capture a lot more light and as a result a lot more details then a phone.
But for me the more important reason is the factor of having a camera in my hand, this is purely emotional but having a real camera in your hand which weights something and has controls and a big optical zoom ring is just a different experience, i simply love having the physical controls, the finder and so on. Its just a very different experiences.&lt;/p&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-04-12-11.jpg&#34; style=&#34;width: auto&#34; /&gt;
&lt;h2 id=&#34;what-cameras-do-i-use&#34;&gt;What cameras do i use?&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ll go into the details here of which cameras i use, when and why.&lt;/p&gt;
&lt;h3 id=&#34;fujifilm-x100v&#34;&gt;Fujifilm X100V&lt;/h3&gt;
&lt;p&gt;This is a mirrorless APS-C compact camera with a built in lens which is a prime 23mm f2 lense. This camera has a few factors though which make it very special.
For one it has a very retro design reminding of older film cameras which where not DSLR&amp;rsquo;s, but thats just a skin. The X100V is full of modern tech and systems.
The second reason is that it has film simulations for actual old film roles which allow the camera to create very unqiue looks out of the camera without needing post processing RAW files.&lt;/p&gt;
&lt;p&gt;The fact its a prime lens might sound like a disadvantage but its not, it fuels creativity by forcing you to think more about positioning and framing. Which a zoom lens lets you cheat out of to some degree.&lt;/p&gt;
&lt;p&gt;The camera also has physical controls for all settings(shutter speed, aperture, iso, white balance&amp;hellip;), now the way they are designed can require you to stop using the finder(if you are) but gives a great feeling of control, i mostly shoot entirely manually on this camera, since its mirrorless it allows to preview the actual view of the sensor on the screens.
I save JPEGS and RAWS but almost never use the RAWS since the JPEGS are pretty amazing out of camera.&lt;/p&gt;
&lt;p&gt;Its a great camera to have with you all the time(i often just put it in the jacket pocket and have it ready fast that way) since its super compact but still produces stunning pictures and it handles ISO noise very very well.
I should add that this camera has had a surge in popularity through social media but i only learned later of that. I bought it after seeing a review of it which also introduced me to it in early 2022.
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-03-30-7.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-03-29-11.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-03-26-10.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;&lt;/p&gt;
&lt;h3 id=&#34;nikon-z7-ii&#34;&gt;Nikon Z7 II&lt;/h3&gt;
&lt;p&gt;This is a professional Fullframe DLSM i bought in 2024, i use it for everything related to animal photograhpy and anything where i need a fullframe sensor, anything where i explicitly go to photograph, its my main work horse.
Since it has a very good 46mp sensor it allows cropping without a big issue and is good for printing too.
The Z7II is a professional DSLM with a lot of modern features and a very good digital view finder, a big touch display. It also has a amazing handling of ISO noise and is pretty accurate and dynamic in colours and how it captures them. I only shoot in RAW using the Z7II and always post process the images in lightroom.
Oh and also the shutter sound is absolutely amazing and unique.
I have 3 lenses for the Z7II:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Nikkor 70-200mm f2.8&lt;/strong&gt;: This lense is a zoom lense, i bought it with the my first Fullframe DSLR(Nikon D750) back in 2019 since i was mostly doing animal photography back then, its a massive lense, nothing you can casually carry on a day trip, but the f2.8 means its able to capture a lot of light and creates a stunning bokeh, it also has a optical stabilizer. Nikon does not sell this lense for DSLR&amp;rsquo;s anymore, only for their mirror less mount.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nikkor 24-70mm f2.8&lt;/strong&gt;: This is a pretty good alrounder, i bought it at the start of 2024 refurbished. Its still big but a lot smaller then the 70-200 and its focal length range allows for wide angle into start of zoom lense which makes it useful in most cases. The autofocus is a bit slower then the 70-200 but still absolutely fine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nikkor 35mm f1.8&lt;/strong&gt;: This is a lense i bought with the Z7II, it is a amazing quality prime lense i use for most of my street photography.
I use a ZTF II Adapter for the 70-200mm f2.8 and the 24-70mm f2.8 since they are not made for the Nikon Z mount.
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-04-14-14.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-04-12-3.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-04-06-8.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;nikon-f80&#34;&gt;Nikon F80&lt;/h2&gt;
&lt;p&gt;This is a Film camera, so it does not have a digital sensor but an analog film. I got this camera from my mother, after i discovered i can use the 24-70mm f2.8 and the 70-200mm mentioned above with it, such that the auto focus and the aperture can be controlled from the Camera.
Even though modern cameras are better in most ways, shooting with analog film is a very different experience and is a lot of fun too, i find that i am more careful regarding composition and motive then when i use digital.&lt;/p&gt;
&lt;p&gt;But analog film depending on the brand of film have very very unique looks and create emotions and feelings, which are not easy to reproduce digitally.&lt;/p&gt;
&lt;p&gt;I use the &lt;strong&gt;Nikkor 70-200mm f2.8&lt;/strong&gt; and the &lt;strong&gt;Nikkor 24-70mm f2.8&lt;/strong&gt; with the F80 since they are natively supported, Further i have a &lt;strong&gt;Nikkor 50mm f1.8&lt;/strong&gt; for it which i got from my mum, i have used this lense but less because for me 50mm is not a very desirable focal length, but rarely it does come in handy.
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-04-02-film-41.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;
&lt;img src=&#34;https://blog.liz3.cat/images/cameras/2024-03-28-film-17.jpg&#34; style=&#34;height: auto; width: auto&#34; /&gt;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Depression 2</title>
      <link>https://blog.liz3.cat/posts/depression-2/</link>
      <pubDate>Tue, 09 Apr 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/depression-2/</guid>
      <description>&lt;p&gt;In the last post i talked about my first experience with &lt;a href=&#34;https://blog.liz3.cat/posts/depression/&#34;&gt;Depression&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;what-happened-since-then&#34;&gt;What happened since then&lt;/h2&gt;
&lt;p&gt;I wrote the first article in January. I was sadly at the start of my second depressive phase there.&lt;/p&gt;
&lt;p&gt;Compared to the first Depressive phase, this had some events which i think triggered or &amp;ldquo;supported&amp;rdquo; the worsing of the second phase.&lt;/p&gt;
&lt;p&gt;On the one hand i lost my job at Bun in late November(i also created a blog post about that), which was very surprising and also took away a purpose, a thing i had to do. I lost that purpose unexpectedly without a connecting job, i&amp;rsquo;ve done a few small jobs since then but these where for the money more then for actual purpose.&lt;/p&gt;</description>
      <content>&lt;p&gt;In the last post i talked about my first experience with &lt;a href=&#34;https://blog.liz3.cat/posts/depression/&#34;&gt;Depression&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;what-happened-since-then&#34;&gt;What happened since then&lt;/h2&gt;
&lt;p&gt;I wrote the first article in January. I was sadly at the start of my second depressive phase there.&lt;/p&gt;
&lt;p&gt;Compared to the first Depressive phase, this had some events which i think triggered or &amp;ldquo;supported&amp;rdquo; the worsing of the second phase.&lt;/p&gt;
&lt;p&gt;On the one hand i lost my job at Bun in late November(i also created a blog post about that), which was very surprising and also took away a purpose, a thing i had to do. I lost that purpose unexpectedly without a connecting job, i&amp;rsquo;ve done a few small jobs since then but these where for the money more then for actual purpose.&lt;/p&gt;
&lt;p&gt;Further in December/January i lost a extremely important online friendship which was crucial through the first phase. And further someone i met in the dayclinic, i became friends with over the 6 weeks i was there, started ghosting me entirely in october 2023, we had contact since then where they explained that their social network suffers and they have problems holding contact. But only sparely, it is not entirely ghosting anymore like at the start but its still basically radio silence.&lt;/p&gt;
&lt;p&gt;These events together with the fact i had to borrow money from family and friends to cover taxes for 2022 created a deep feeling of helplessness, hopelessness. Which even with the Sertraline(zoloft) threw me entirely back into the severe depression and suicidal thoughts.&lt;/p&gt;
&lt;h2 id=&#34;whats-stayed-good-since-the-last-phase&#34;&gt;Whats stayed good since the last phase&lt;/h2&gt;
&lt;p&gt;The social phobia especially did not get nearly as bad as it was last year. I still have trouble with big crowds and strangers, but i do not have problems with friends and family.
I&amp;rsquo;m still able to do things like get groceries and do the household, both of these where impossible last year.&lt;/p&gt;
&lt;p&gt;I think that the therapy from last year and the antidepressant have helped maintaining those.&lt;/p&gt;
&lt;p&gt;Further i have developed a interest in &lt;em&gt;understanding depression&lt;/em&gt;, so ive done some research into the psychology and biology of depression and how it works. And some research on how antidepressants work.&lt;/p&gt;
&lt;h2 id=&#34;coping-mechanisms&#34;&gt;Coping mechanisms&lt;/h2&gt;
&lt;p&gt;Iv&amp;rsquo;e managed to develop a few Skills over the last few months which help me survive and cope with depression.
A skill is something you have or do to help in tense situations and to cope with bad thoughts in healthy ways.&lt;/p&gt;
&lt;h3 id=&#34;wasabichilli&#34;&gt;Wasabi/Chilli&lt;/h3&gt;
&lt;p&gt;Sometimes if the suicide thoughts get really bad i land in something i call a tense-state.
This is a state where the suicide thoughts are screaming so loud that they almost entirely disable the rational brain. Using a keyboard, talking and other tasks become extremely taxing if not impossible.
Further the &lt;em&gt;tense&lt;/em&gt; term comes from the fact that in these phases often my body phsyically tenses. I physically tense in the presence of the extremely bad suicide thoughts.
Those phases last 15-20 minutes and end after that naturally, but often thats a very long time in that state.
What can end that state is a extreme physical sensation like eating something extremely hot. Its purpose is to be so extreme that it forces a interruption in that bad thoughts cycle, reactivating the rational brain. It has worked the times i managed to get to chilli or wasabi.&lt;/p&gt;
&lt;h3 id=&#34;photography&#34;&gt;Photography&lt;/h3&gt;
&lt;p&gt;This is the most important skill i have, unlike the wasabi/chilli which is for a specific bad state, this is a longer term self therapy not bound to a specific state.
I do a lot of photography since mid february, mostly street photography and animals, i have a &lt;a href=&#34;https://instagram.com/liz3de&#34;&gt;instagram&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While i am photographing i&amp;rsquo;m occupied, im in the moment paying a lot of attention to my surroundings looking for compositions. Doing that helps extremely in stopping rumination, rumination is often the entry door to more bad thoughts and then a tense-state in the worst case. Having something like photography to stop that is super valuable.
I Photograph about 3-4 hours a day.&lt;/p&gt;
&lt;h3 id=&#34;diary&#34;&gt;Diary&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve been writing diary digitally for a while now. Most of my writing is thought dumping but it&amp;rsquo;s very helpful processing emotions, thoughts and feelings. Although i do not write that &lt;em&gt;every day&lt;/em&gt;. But i also have a &amp;ldquo;depression diary&amp;rdquo; which is more structured then just blank space, it asks you a few things with multiple choice rather then only free text, i do that every day, it helps tracking mood over time.&lt;/p&gt;
&lt;h3 id=&#34;structure&#34;&gt;Structure&lt;/h3&gt;
&lt;p&gt;My dad has a australian shepard which i know since i spend time living with him and got to see the doggo grow up.
In february and right now, besides photography i got the dog to live at my home.
The fact he has to be walked 3 times a day, is a living being and someone to cuddle, but especially the structure does help me not let the bad thoughts get too bad since he gives me purpose.&lt;/p&gt;
&lt;h2 id=&#34;timeline-sincetriggerwarning-suicide&#34;&gt;Timeline Since(Triggerwarning: Suicide)&lt;/h2&gt;
&lt;p&gt;I cought covid 19 for the second time during the later half of February, which is also when i gave back the dog to my dad.
Shortly before start of march i contacted my best friend to come to me during the first weekend of march because i was in a really bad state, i was aware of how bad the thoughts where, even without the tense-states. The constant cycling in suicide thoughts.&lt;/p&gt;
&lt;p&gt;It turned out this was a life saving decision probably, because on the night of the 3rd to 4th March i attempted suicide.
I survived it because my best friend was there and called EMS.&lt;/p&gt;
&lt;p&gt;The next 14 hours where spend on the ICU recovering, after that i talked with a psychatrist, we agreed that i would stay in the hospital in the Psych ward, but ended up not doing that due to the experience i made with the receiving nurse, which made me feel even more unsecure, ontop of being very insecure anyways. It shows again how important kind nurses are in such wards.&lt;/p&gt;
&lt;p&gt;With my best friend i decided that after they drive back home i will stay at my mums place to not be alone since that was too dangerous. She received me very welcoming and supportive.
I was not extremely suicidal after the attempt but it wasn&amp;rsquo;t gone.
I spend most of march doing photography and talking a lot with my mum. It was a good support but did not heal the thoughts, towards the end of march it became obvious that even though i had a therapist by that point. We agreed that it was not enough.&lt;/p&gt;
&lt;p&gt;So again with the help of my mum and a friend i was taking into a Psych ward in a Hospital and stayed there for a week. I learned more things about myself there, especially that a lot of my issues resolve around helplessness. Further that it is okay to have bad thoughts, just that i had and have unhealthy ways of coping with them.
Also i was reassured that photography is a good skill, i also started writing diary since i was admitted there.&lt;/p&gt;
&lt;p&gt;After the stay in the hospital i was free of all the suicide thoughts and tense-states, which was extremely relaxing. They have also not returned extremely since, but sadly i still have issues with self harm and passive suicide thoughts.&lt;/p&gt;
&lt;p&gt;On friday last week i went to the day clinic i was the last year and let me put on the waitlist. I was told(as i expected) to have a waiting time of 4-6 months. But that was not the case, because later the same day i was called that i can start on the 11th april, which is the thursday after tomorrow. That made me extremely thankful because i did not expect it to go that fast, which goes without saying that i need the help. Even though the suicide thoughts are not present right now they can return and so getting intensive help again is crucial for me.&lt;/p&gt;
&lt;h2 id=&#34;antidepressants&#34;&gt;Antidepressants&lt;/h2&gt;
&lt;p&gt;The antidepressant i take was bumped to 150mg a day 3 weeks ago, but i&amp;rsquo;m attempting to switch antidepressants during this day clinic stay, because i do not think the sertraline(Zoloft) actually helps me, besides making me sweat a lot and i mean a lot. It&amp;rsquo;s a bit exhausting to know the medication does not help currently but there are enough other antidepressants and i only tried sertaline until now.&lt;/p&gt;
&lt;h2 id=&#34;future&#34;&gt;Future&lt;/h2&gt;
&lt;p&gt;My future isn&amp;rsquo;t set, i do not have a set plan for after the day clinic, maybe because i&amp;rsquo;m at a very early state of the 8 weeks, maybe because depression has disconnected me from a imagination/idea of my future, why exactly i dont know.
But i&amp;rsquo;m very glad to be distanced enough from acute suicidal thoughts and stable enough to parttake in the entire program of the clinic and also pursue my hobby of photography. It&amp;rsquo;s still to early for me to think about a job after clinic of long term future, yet at least.&lt;/p&gt;
&lt;p&gt;Thats it for now&amp;hellip;as always thanks for reading!&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Depression</title>
      <link>https://blog.liz3.cat/posts/depression/</link>
      <pubDate>Sun, 07 Jan 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/depression/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m not even sure where exactly to start here, who this is for or why exactly i&amp;rsquo;m writing it but supposedly it&amp;rsquo;s if you want to learn about the topic or hear my experiences with it, how it changed me and how i cope with relapse.&lt;/p&gt;
&lt;h2 id=&#34;what-is-depression&#34;&gt;What IS depression&lt;/h2&gt;
&lt;p&gt;This might seem unnecessary but its very important. In my experience the word &amp;ldquo;depression&amp;rdquo; is not only stigmatized but also misused a lot.
It&amp;rsquo;s, how do i put this, what people often call depression on a short notice isn&amp;rsquo;t depression. moreover its feelings of boredom, sadness or remorse. I don&amp;rsquo;t want in any way to discredit or downplay those feelings, they are very real and might well require treatment, but they are not depression.&lt;/p&gt;</description>
      <content>&lt;p&gt;I&amp;rsquo;m not even sure where exactly to start here, who this is for or why exactly i&amp;rsquo;m writing it but supposedly it&amp;rsquo;s if you want to learn about the topic or hear my experiences with it, how it changed me and how i cope with relapse.&lt;/p&gt;
&lt;h2 id=&#34;what-is-depression&#34;&gt;What IS depression&lt;/h2&gt;
&lt;p&gt;This might seem unnecessary but its very important. In my experience the word &amp;ldquo;depression&amp;rdquo; is not only stigmatized but also misused a lot.
It&amp;rsquo;s, how do i put this, what people often call depression on a short notice isn&amp;rsquo;t depression. moreover its feelings of boredom, sadness or remorse. I don&amp;rsquo;t want in any way to discredit or downplay those feelings, they are very real and might well require treatment, but they are not depression.&lt;/p&gt;
&lt;p&gt;So what is depression then?
Depression is uhmm, id say a collection of sensations and emotions that &lt;strong&gt;stay for a long time and affect your day to day live in noticeable negative ways&lt;/strong&gt;.
There are a few common symptoms like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Social retraction&lt;/li&gt;
&lt;li&gt;Fear&lt;/li&gt;
&lt;li&gt;Sadness&lt;/li&gt;
&lt;li&gt;Neglection of bodily needs&lt;/li&gt;
&lt;li&gt;Sleep issues
&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But the experience can also vary a lot from person to person and depression can present itself in a lot of different ways.&lt;/p&gt;
&lt;h2 id=&#34;how-did-it-start-for-you&#34;&gt;How did it start for you&lt;/h2&gt;
&lt;p&gt;I started getting actually depressed around May/June 2023, i can&amp;rsquo;t tell you exactly when because back then i didn&amp;rsquo;t know it was depression.
The sensation started with social retraction, i should add that i was always very introverted but during that time i pretty much turned into a &lt;a href=&#34;https://en.wikipedia.org/wiki/Hikikomori&#34;&gt;hikikomori&lt;/a&gt;, for no particular reason other that i didn&amp;rsquo;t have a reason to be with others, i do have friends but these are not in my area and i didn&amp;rsquo;t have anyone else really here where i live.&lt;/p&gt;
&lt;p&gt;The next what happened after 1-2 weeks was a deep feeling of sadness and pain in my chest, i was aware the pain was mental, don&amp;rsquo;t ask me why but i assume because it was always or often accompanied by this sadness. By this time social retraction has gotten to a point seeing even family members became a strain.&lt;/p&gt;
&lt;p&gt;Shortly after i started with another very common depression effect: being unmotivated(but not that you don&amp;rsquo;t want to do something, you literally can&amp;rsquo;t make up the energy to do it even though you wan&amp;rsquo;t). I stopped working and also stopped programming entirely. Yes entirely, i could not bring myself to do them, even not for fun.
Added to that i also actively started with self harm, cutting myself specifically.
I only played Lost ark during that time out of habit and it was a last resort escape place for the most severe effect depression had on me:&lt;/p&gt;
&lt;p&gt;The most extreme sensation i had and have sometimes still from depression is the sensation of feeling &lt;strong&gt;no emotions&lt;/strong&gt;, none. Neither joy nor sadness nor anything. As in i just felt nothing, anything was equal, even though when i had visits from family or friends it did nothing with me which wasn&amp;rsquo;t easy for them either. Touching me physically during that time also became impossible for anyone, the social retraction and resulting social phobia got to a point getting a hug from a family member or friends was not possible.
I should also add that family was not the first to learn i had depression but rather friends, simply because i felt more comfortable sharing it with them, over family. But when they learned they tried to be supportive to the degree i was able to support, since for me a lot of stuff which you would call normal like talking or getting groceries or making appointments became basically impossible for me.&lt;/p&gt;
&lt;h2 id=&#34;how-did-you-get-help&#34;&gt;How did you get help&lt;/h2&gt;
&lt;p&gt;I probably won&amp;rsquo;t go into much detail here because it&amp;rsquo;s still &amp;ldquo;fresh&amp;rdquo; for me and also resolves a lot about suicide thoughts/attempts.&lt;/p&gt;
&lt;p&gt;At a certain point it became obvious to me that even though friends and family where very supportive, that it was not going to last much longer without professional help, the suicide thoughts where too present at that point and also otherwise it wasn&amp;rsquo;t like there was much of my prior self left i guess?&lt;/p&gt;
&lt;p&gt;So on a Wednesday midday i wen&amp;rsquo;t into the ER of a big hospital here in Berlin with a friend who was in Berlin then by accident(I&amp;rsquo;m not sure i would have made it alone). I didn&amp;rsquo;t have to wait very long because of a big cut on my forearm which apparently needed stitching, but after that it was a waiting game for most parts of the day. I then talked to a psychiatrist, i should mention that keeping eye contact was not possible for me, just merely trying to answer the questions he had took a big part of my energy. After evaluation he also shared the view that it was very urgent for me to get professional help and also asked me to stay at the hospital, even though not that hospital, because it turns out i had to move to a different hospital which is responsible for the district i&amp;rsquo;m living at. So after waiting a bunch more and getting there(by a kind of ambulance but not really) and waiting a good while longer, getting blood taken and a EKG written in the meanwhile, i spoke to a psychiatrist there(it was 11pm by then). He also asked me to stay but i said i can only do that if you have single bed rooms, which again i had a bad social phobia back then.
So after some discussion back and forth he brought up &amp;ldquo;Tagesklinik&amp;rdquo; which translates to &amp;ldquo;Day Clinic&amp;rdquo; which is a part of a hospital for people for mental health issues where you basically stay from morning through the afternoon but then sleep at home, looking back at it now it would probably have been better to stay at the hospital because from the day i was in the ER to the day i was taken by the day clinic, &lt;strong&gt;two weeks passed&lt;/strong&gt; and it only worked because of help from my friends and family through other friends pushing the urgency.&lt;/p&gt;
&lt;p&gt;I should maybe reiterate that i don&amp;rsquo;t think i would have lived much longer without that step, depression and resulting suicide thoughts is a very dangerous cycle and you might realize to late, i only did realize just in the right time because i had the luck of having contact with friends(even if not irl) who pushed me to do that step and went with me the entire way of it and everything after.&lt;/p&gt;
&lt;h3 id=&#34;day-clinic&#34;&gt;Day Clinic&lt;/h3&gt;
&lt;p&gt;It&amp;rsquo;s the place which saved me i suppose? (alongside some amazing friends, even if remote).
I stayed there for 6 weeks in total, most of the activities you do are in a group and obviously resolve around depression and depression related stuff but there&amp;rsquo;s also stuff like dance therapy, music and so on. On top of course 1:1 sessions with therapists.&lt;/p&gt;
&lt;p&gt;The Fact it was group based made it very very very difficult at first for me because of the social phobia but it was also the best ground for improving that, especially since you are around people who have similar experiences and &lt;strong&gt;don&amp;rsquo;t judge you&lt;/strong&gt; or wonder, most of them have been there(even if maybe not such an extreme social phobia).
The Social phobia, suicide thoughts, self harm events and most importantly feeling emotions slowly came back over the 6 weeks and I&amp;rsquo;ve received a lot of good feedback about the improvements there from friends.
Overall the things i learned there, the people i met, the structure it gave me had a huge impact on me in a positive way.&lt;/p&gt;
&lt;h2 id=&#34;learnings&#34;&gt;Learnings&lt;/h2&gt;
&lt;p&gt;The most important learning not only from the day clinic but the entire experience since it started is that I&amp;rsquo;ve learned a lot about myself and how i work emotionally, so even though it was a horrific experience it had as positive to understand more how i work, react and response emotionally and taught me a lot to deal with sensations and emotions, positive and negative.&lt;/p&gt;
&lt;h3 id=&#34;positive&#34;&gt;Positive&lt;/h3&gt;
&lt;p&gt;I think the most important positive lesson i took from this experience is that &lt;em&gt;it can get better&lt;/em&gt; and there are people who genuinely care about you even though it might seem unreal in a bad depression.
Further that depression is something even if dangerous can be dealt with and improved.
do not be judged over it by family or friends(even if a lot couldn&amp;rsquo;t relate) non ever judged me over it.&lt;/p&gt;
&lt;h3 id=&#34;negative&#34;&gt;Negative&lt;/h3&gt;
&lt;p&gt;There are a few negatives but i don&amp;rsquo;t want to put them too much in the spotlight but to make it short: knowing such an episode can happen again, I&amp;rsquo;ve taken a few physical scars from that episode and lastly I&amp;rsquo;ve become very sensitive around the topic of depression or anything remotely related because it instantly puts me back in a faint shadow of the sensations i guess?&lt;/p&gt;
&lt;h2 id=&#34;antidepressiva&#34;&gt;Antidepressiva&lt;/h2&gt;
&lt;p&gt;I wan&amp;rsquo;t to quickly touch the subject here, i take an antidepressant called &lt;a href=&#34;https://en.wikipedia.org/wiki/Sertraline&#34;&gt;Sertraline&lt;/a&gt; (zoloft), 100mg a day.
It has had a very positive effect, admittedly it had a few side effects at first(i was at 50mg/day then) like sleep issues, sweating, and some light trembling of the jaw, but these went away after a few weeks. The Sertraline was not the main reason the depression got so much better, that was people and the Day Clinic but it did gradually help by supporting a better mood, i should point out though that it was very gradual and not something which happened over night.&lt;/p&gt;
&lt;h2 id=&#34;relapse&#34;&gt;Relapse&lt;/h2&gt;
&lt;p&gt;This is the main reason i&amp;rsquo;m writing this because while the depression was entirely gone for 2-3 months after the day clinic it has been manifesting itself again since the Christmas time, a little before Christmas i also saw my local psychiatrist who advised to increase Sertraline to 100mg/day due to my worsening mood there already. It&amp;rsquo;s not close as bad as it was in August/September. But the chest pain, lack of emotions and so on has been manifesting itself a bit over the last few weeks.
&lt;strong&gt;But I&amp;rsquo;ve had this before and also have learned a lot how to deal with it and how to combat it so i&amp;rsquo;m confident its going to get better soon again, maybe a bit from Sertraline but mostly from experience and friends, having people knowing you have depressions and being there for you can make it so much easier&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s it for now&amp;hellip;Thanks for reading, &lt;a href=&#34;https://blog.liz3.cat/posts/depression-2/&#34;&gt;part 2&lt;/a&gt;.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Getting let go suddenly of a company i liked working at</title>
      <link>https://blog.liz3.cat/posts/2023-11-28-getting-fired/</link>
      <pubDate>Tue, 28 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2023-11-28-getting-fired/</guid>
      <description>&lt;p&gt;In my last post i proudly said im working for &lt;a href=&#34;https://bun.sh&#34;&gt;Bun&lt;/a&gt;, well that didn&amp;rsquo;t exactly last long.
To be clear i don&amp;rsquo;t want to accuse anyone of the bun team, its more just writing down my thoughts.&lt;/p&gt;
&lt;h2 id=&#34;what-happened&#34;&gt;What happened&lt;/h2&gt;
&lt;p&gt;Frankly i&amp;rsquo;m still processing that myself and if i had a definite answer i would give you it but i don&amp;rsquo;t have one so this is just thoughts.&lt;/p&gt;
&lt;p&gt;On friday Jarred asked if we could chat, i answered a bit later but didn&amp;rsquo;t get a response, i tried again Saturday and Sunday,
but i only got a response on Monday evening(my time) short notice which i was fine with, buuut it was basically: We are terminating the contract effective immediately.&lt;/p&gt;</description>
      <content>&lt;p&gt;In my last post i proudly said im working for &lt;a href=&#34;https://bun.sh&#34;&gt;Bun&lt;/a&gt;, well that didn&amp;rsquo;t exactly last long.
To be clear i don&amp;rsquo;t want to accuse anyone of the bun team, its more just writing down my thoughts.&lt;/p&gt;
&lt;h2 id=&#34;what-happened&#34;&gt;What happened&lt;/h2&gt;
&lt;p&gt;Frankly i&amp;rsquo;m still processing that myself and if i had a definite answer i would give you it but i don&amp;rsquo;t have one so this is just thoughts.&lt;/p&gt;
&lt;p&gt;On friday Jarred asked if we could chat, i answered a bit later but didn&amp;rsquo;t get a response, i tried again Saturday and Sunday,
but i only got a response on Monday evening(my time) short notice which i was fine with, buuut it was basically: We are terminating the contract effective immediately.&lt;/p&gt;
&lt;p&gt;That caught me very off guard since i wasn&amp;rsquo;t expecting it at all and there was no prior communication that something was not up to expectation.&lt;/p&gt;
&lt;p&gt;The abstract reason seamed to be that the communication and quality of the contributions was not meeting expectations.&lt;/p&gt;
&lt;h3 id=&#34;communications&#34;&gt;Communications&lt;/h3&gt;
&lt;p&gt;This is partly probably due to the reason that i&amp;rsquo;m remote and the bun team does not have a lot of experience working with remote people, which is fine.
I think when i started i was even asked if i would consider moving to the US but i have friends here in Germany and i have Diabetes typ 1 which means that
for me it would be pretty hard there considering the insulin price. So that was never really a option for me, at least not long term.&lt;/p&gt;
&lt;p&gt;I should really point out that prior to starting at bun i didn&amp;rsquo;t have any real experience in the zig language, but that can be learned.
I did although create some bigger prs pretty early even before working for them, which is maybe something i should have reconsidered but at that time i thought
its a good approach to challenge myself and surely i would get good reviews pointing me into the right directions.&lt;/p&gt;
&lt;p&gt;Well thats the big point, reviews: Getting reviews was very hard due to to the fact i often requested reviews but these requests got left unanswered,
where answered with little explanation but most importantly: &lt;strong&gt;no followup&lt;/strong&gt;, there was almost never a follow up after me answering or asking a question on reviews, neither on github nor discord.
And for the most part i did write follow up questions asking what the correct or better approach would be, knowing that i didn&amp;rsquo;t have a lot of experience in zig.&lt;/p&gt;
&lt;p&gt;One time i was even offered advice where to investigate a bug, but me asking about that was left unanswered.&lt;/p&gt;
&lt;p&gt;Note that in no point was i ever informed that this is something i should know, which understandably is not something a team would just do but id rather have that
then being let go instantly, i mean afterall don&amp;rsquo;t we all have to learn at some point? Learning was the most important thing for me besides helping the project,
it seams that view was not really shared&amp;hellip;at least in the aftermath now.&lt;/p&gt;
&lt;h3 id=&#34;quality-of-contributions&#34;&gt;Quality of Contributions&lt;/h3&gt;
&lt;p&gt;This is somewhat subjective but il try to keep it as objective as possible.&lt;/p&gt;
&lt;p&gt;Knowing i was new to the codebase its likely contributions would initially have more mistakes and be more bug prone, thats unavoidable.
There also lies part of my fault maybe for trying bigger contributions early. But thats how you learn, and its not like there was ever broken code merged.
A example is this Pull request: &lt;a href=&#34;https://github.com/oven-sh/bun/pull/6693&#34;&gt;bun:6693&lt;/a&gt; which i firstly implemented wrongly based on a flawed assumption, after a short
conversation that the code might be flawed and me arguing it seams to work we left the pr open with the explanation that this needs more tests, since this
included edits to a third party library maybe also running their test suite(Something another engineer had on their TODO).&lt;/p&gt;
&lt;p&gt;Fast forward a few weeks the maintainer of the third party library wrote that the implementation is flawed, the next day after some comments i implemented the &amp;ldquo;correct&amp;rdquo;
approach and also added a lot of extra tests, note that in the weeks from opening that Pull Request and the new comments i also learned more of course and got more experiemce with the codebase.&lt;/p&gt;
&lt;p&gt;Now you get to decide whether this is something worth getting let go over, i don&amp;rsquo;t know the answer but my subjective opinion is that knowing im &lt;strong&gt;learning&lt;/strong&gt;,
and implemented the fix within a day and also addressed further reviews very fast it seams somewhat hard but again thats my subjective view.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Im not entirely sure what the takeaway is here, because the mistakes i was let go over seam like something you should &lt;strong&gt;expect&lt;/strong&gt; from someone new to the project and i made clear
very early that im new to zig too but willing to learn. Id argue im generally not someone who needs a &lt;em&gt;lot&lt;/em&gt; of guidance.&lt;/p&gt;
&lt;p&gt;But my only real critique is that i &lt;strong&gt;really really&lt;/strong&gt; tried to get feedback and advice the entire way through. And im not referring to being spoon-fed the solution,
but just being pointed in the right direction. And maybe questions not ignored. Further maybe giving a &lt;strong&gt;single&lt;/strong&gt; headsup that its not going as expected,
before ultimately just being let go instantly.&lt;/p&gt;
&lt;p&gt;I like the bun project and the way it works and maybe i will continue open-source contributing to it if it works out, but the way i was let go was a punch in the face, since i did try to do it the right way but trying was not enough.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>My issue with Next.js and other react based frameworks</title>
      <link>https://blog.liz3.cat/posts/2023-11-14-nextjs/</link>
      <pubDate>Tue, 14 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2023-11-14-nextjs/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m aware this is a controversial topic, i don&amp;rsquo;t want to suggest that these frameworks are bad or unnecessary, but rather add my opinion to what i think over them&lt;/p&gt;
&lt;h2 id=&#34;how-this-started&#34;&gt;How this started&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve not done a lot with react lately, im more working with native languages, doing zig and c++ at &lt;a href=&#34;https://bun.sh&#34;&gt;bun&lt;/a&gt;, but ive done a fair share of react development in my life at blitz, giggl and personally too.
But i&amp;rsquo;m coming from the &lt;a href=&#34;https://create-react-app.dev&#34;&gt;create react app&lt;/a&gt; days, long before frameworks like next, remix and the likes where that popular.&lt;/p&gt;</description>
      <content>&lt;p&gt;I&amp;rsquo;m aware this is a controversial topic, i don&amp;rsquo;t want to suggest that these frameworks are bad or unnecessary, but rather add my opinion to what i think over them&lt;/p&gt;
&lt;h2 id=&#34;how-this-started&#34;&gt;How this started&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve not done a lot with react lately, im more working with native languages, doing zig and c++ at &lt;a href=&#34;https://bun.sh&#34;&gt;bun&lt;/a&gt;, but ive done a fair share of react development in my life at blitz, giggl and personally too.
But i&amp;rsquo;m coming from the &lt;a href=&#34;https://create-react-app.dev&#34;&gt;create react app&lt;/a&gt; days, long before frameworks like next, remix and the likes where that popular.&lt;/p&gt;
&lt;p&gt;Now if you where doing react in that time you remember react as being a soley client side operating library, as in the files which the server side &amp;ldquo;served&amp;rdquo; where purely static and didn&amp;rsquo;t need execution at all,
that had and has the advantage of being a lot less server load and traffic but has the disadvantage of being bad for SEO and also requires the client to run a relatively large javascript bundle before having a contentful paint(in a lot of cases at least).&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;I think the main question is whether do you need server side execution for SEO only or to actually serve prerendered content. Since if the client runs your application its less compute your server has to do, so maybe a tradeoff between server side rendered and client side rendered has to be done.&lt;/p&gt;
&lt;p&gt;The problem is that react was designed as a client side framework, so running it server side was never actually the intention, that also becomes very evident when you watch the documentary Honeypot did on react, facebook at the time had to move more execution to the client.
And if you actually think about it it does seam more logical, transfering raw json data over a api is less traffic then serving rendered html and again it reduces the cost you have to pay on your server because more of the execution is spend on the client.
With most clients these days being so fast that arguing whether the tradeoff of having to wait a bit for a contentful paint becomes very real. It was back when react was created and id argue that our computers and phones did not become slower since then.&lt;/p&gt;
&lt;p&gt;But a bigger issue is the way especially next.js tries to blur the lines between whats a feature of the facebook based react library and whats part of the apis provided by the framework like next.
It&amp;rsquo;s pretty obvious that the react team does promote these frameworks quite heavily, if you go to &lt;a href=&#34;https://react.dev/learn/start-a-new-react-project&#34;&gt;how to create a react project&lt;/a&gt; you get the frameworks as the suggested option and if you wan&amp;rsquo;t to use react as a standalone library you get a big block of text explaining why you shouldn&amp;rsquo;t with a small note at the end giving you the two packages you need without any further explanation. CRA is entirely gone from the react documentation.&lt;/p&gt;
&lt;p&gt;But my biggest issue by far that Next.js is by &lt;a href=&#34;https://vercel.com/&#34;&gt;Vercel&lt;/a&gt; which is a serverless cloud provider which is for-profit so they have a massive commercial interest in promoting more server side heavy architectures since they directly profit from that, which also gives it a reasonable explanation why they are actively trying to blur the lines between whats react and whats next js and make it more difficult to deploy next outside of vercel then on vercel, its possible to deploy outside of vercel but a lot less convenient.&lt;/p&gt;
&lt;p&gt;I also distinctly remember at blitz.gg that their site was hosted on vercel(called zeit back then) for a good while and switched off it again because the server cost was so absurdly high, the app had very limited SSR back then.&lt;/p&gt;
&lt;h2 id=&#34;whats-a-solution&#34;&gt;Whats a solution?&lt;/h2&gt;
&lt;p&gt;I don&amp;rsquo;t think thats very easy to answer, i don&amp;rsquo;t mind vercel promoting next as easy to deploy on their platform, them making money of vercel also means that they can re invest it into next development making better developer tools while paying the bills of people doing it.&lt;/p&gt;
&lt;p&gt;But i do mind them trying to blur the lines between next and react. I think a clearer seperation and especially re-adding documentation for client side only react, simpler projects only with the react library and making clear that is an option, since it is possible to use react standalone with build tools(like esbuild etc) and also create react app is still a thing even though it is maybe a bit out of date.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>About loosing a discord account, getting it back and the Discord support</title>
      <link>https://blog.liz3.cat/posts/2022-03-10-discord-account/</link>
      <pubDate>Thu, 10 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2022-03-10-discord-account/</guid>
      <description>&lt;p&gt;Hah, i would never lose my discord account, how could this ever happen to anyone EVER whos not actively trying to,
believe me i thought that too, i was sure i wouldnt ever get my account stolen,
but i still did, so let me tell you a story, with some key takeaways along the way, even for experienced users.&lt;/p&gt;
&lt;h2 id=&#34;how-it-started&#34;&gt;How it started&lt;/h2&gt;
&lt;p&gt;Date: 13th January 2022&lt;/p&gt;
&lt;p&gt;I am Administrator on a larger Discord server, &amp;gt; 100.000 users, i wont be mentioning the name here,
not because i want to hide it, but rather because its not important for this story.&lt;/p&gt;</description>
      <content>&lt;p&gt;Hah, i would never lose my discord account, how could this ever happen to anyone EVER whos not actively trying to,
believe me i thought that too, i was sure i wouldnt ever get my account stolen,
but i still did, so let me tell you a story, with some key takeaways along the way, even for experienced users.&lt;/p&gt;
&lt;h2 id=&#34;how-it-started&#34;&gt;How it started&lt;/h2&gt;
&lt;p&gt;Date: 13th January 2022&lt;/p&gt;
&lt;p&gt;I am Administrator on a larger Discord server, &amp;gt; 100.000 users, i wont be mentioning the name here,
not because i want to hide it, but rather because its not important for this story.&lt;/p&gt;
&lt;p&gt;A day before this happened, another admin on that server stepped down from their permissions,
they did not remove the roles doing hoisting or sorting but the roles actively giving permissions where removed from that user.&lt;/p&gt;
&lt;p&gt;I have Administrator on that Server&amp;hellip;
That night, the account of that Admin contacted me, note that i was aware of them being a admin, but i was not aware they stepped down, neither did we ever message before.&lt;/p&gt;
&lt;p&gt;This is important as it meant i was not aware of how the person normally behaves in direct messages,
after a certain while of writing with a person you learn how they behave, their writing style, quirks and the likes.
Notheless since they where a Admin, they had a certain trust level already from me, a strange account would not have from me by default.&lt;/p&gt;
&lt;p&gt;So during their initial messages, i was watching youtube, i was not on alert, their initial contact was,
(i will be using Person rather then their real name, from here and for the rest of the story):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Person &amp;gt; Liz
Me &amp;gt; Hey
Person &amp;gt; Can you help me?
Me &amp;gt; depends
Person &amp;gt; i am *persons name*
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The person then proceeded to send a link to the big server, along with a screenshot of their roles on that Server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: A real person is not likely to mention its them in a direct message channel.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I can only mention again i never wrote with that person before,
but here i did the first f-up, i did not get suspicious when they introduced themselfs, which normally shouldnt happen.&lt;/p&gt;
&lt;p&gt;i then answered:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Me &amp;gt; ik
Me &amp;gt; it still depends
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;i actively ignored that warning signal.&lt;/p&gt;
&lt;h2 id=&#34;what-the-scam-was&#34;&gt;What the scam was&lt;/h2&gt;
&lt;p&gt;This was a targeted phishing attack towards people with high roles,
this was and is my main discord account which i have since 2016, it has dms with over 50.000 messages:&lt;/p&gt;
&lt;p&gt;The person then proceeded to pretend the following:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;They where applying as a Discord verified moderator and i would need to vote for them,
along with a link which was not discord.com, but neither was a obvious typo of discord.com, it was a extra word,
which without context could have been valid.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For context here: Discord does have a certified Moderator program, but it does not have a vote system(i was not certain about that at that date),
so before i did click the link i googled it, sadly google did not have that site as first result,
but a discord blog article which after checking it was close enough to me with the trust not instantly marking this as a red flag obvious scam, but the article also didnt link a external site anywhere.&lt;/p&gt;
&lt;p&gt;So i clicked the link and it brough me to a discord login page, i was not sure here, i had a bad feeling about it being legitimate,
i went back to the discord chat and saw they &lt;em&gt;deleted the message with the link&lt;/em&gt;!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: If a person deletes a link in a chat they want you to do something, thats a clear red flag!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: if a domain isnt high up on googles result, do not trust it!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;i then wrote:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Me &amp;gt; did you delete the link?
Person &amp;gt; i accidentally deleted
Person &amp;gt; did you get to vote for me?
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Takeaway: Them pressuring you to do something should make you very suspicious&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I then refreshed the page to check if the QR code refreshed, it did.&lt;/p&gt;
&lt;p&gt;So i tried to login with a QR code, but that did not work, it failed with the following message on my phone:
&lt;img src=&#34;https://blog.liz3.cat/images/discord/scam_qr_error.png&#34; style=&#34;height: 400px; width: auto&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: Discord has these systems centralized, if this fails its, 10000% a scam&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But i didnt think that in that moment, i thought that discord was just having issues with it&amp;hellip;
So i manually logged into the site, together with 2FA.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: 2FA is not a protection against phishing!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After logging in into the site, i was instantly redirected to that login site and there i realised it&amp;hellip;.&lt;/p&gt;
&lt;p&gt;Within the 30 seconds time frame of the 2FA code, the scam automatically replaced the 2fa token AND the backup codes, it was not possible to login with the backup codes, yes i actually save them,
this was probably one of my darkest moments ever.&lt;/p&gt;
&lt;p&gt;The main issue here again was that i had that initial trust towards a person, i had no direct contact with before but knew as a admin from a big server.&lt;/p&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;Whats Next?&lt;/h2&gt;
&lt;p&gt;Wow what a shock, i just lost my discord account to a scam&amp;hellip;.it really happened to me.
After about 5 minutes of trying, i gave up on getting back into it, i would not.&lt;/p&gt;
&lt;p&gt;The first thing i did then was messaging the owners/important persons outside of discord, i.e whatsapp, iMessage and so on to remove my account from servers,
remember this was a targeted attack, not a mass thing, further i asked to be removed from the bot teams i was on, well get to this later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeway: message server owners of servers your account could do damage to instantly, to minimize impact as far as possible, further message your friends, make people aware your account was compromised as much as you can to protect them!&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-server-incident&#34;&gt;The Server incident&lt;/h2&gt;
&lt;p&gt;The server of which the scammers got the account from which they messaged me, did not have people online who would have been able to remove my roles or kick my account,
there happened so much on that server, this would deserve its own blog entry to be honest, but in short, i tried to kick my account using bots, waiting for people but in the end non worked and yes,
here the worst of the worst happened, the entire server got destroyed because my account was compromised, remember the other account had no actual permissions left&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaways:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stand to your mistake, like i did, to this day i fully stand to what happened there, its my and only my responsbility.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;True friends will not leave you or be mad at you, even after this, funny this is a test to see directly if the people who entrusted you are real friends or people only using you against payment of roles&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Having to witness the server being destroyed was probably one of, if not the worst feeling i ever had.&lt;/p&gt;
&lt;p&gt;Since then the server learned a lot, im still admin there, although i learned a lot too.&lt;/p&gt;
&lt;p&gt;Even though the first reaction of a server owner would probably be to not trust people anymore with permissions,
i deeply think thats the wrong approach, why?&lt;/p&gt;
&lt;p&gt;You need people you as a owner can trust and this happening will always be a risk, just try to minimize it as much as you can, not entrusting people with permissions is one way but it comes at a big price of extra work and possible distrust&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;getting-my-account-back-or-discord-support-choose-the-one-you-like&#34;&gt;Getting my account back OR Discord support, choose the one you like&lt;/h2&gt;
&lt;p&gt;This section will cover two incidents, one was getting the account, the other lasts to this day,
further i want to open how TERRIBLE and BROKEN the discord support is, told from my experiences.&lt;/p&gt;
&lt;h3 id=&#34;getting-the-account-back&#34;&gt;Getting the account back&lt;/h3&gt;
&lt;p&gt;I would not have gotten my account back through the normal support.&lt;/p&gt;
&lt;p&gt;So rapidly after loosing the account, messaging the people of work and other servers,
i opened a support ticket with the normal support, both from my original email the account was under and the email of my alt.
Discord uses Zendesk, you can answer tickets in two way, the one is through the website although you need to login here, the other is through answering emails send to the address associated with the ticket.&lt;/p&gt;
&lt;p&gt;Since i lost the account, that in returns means i would only be able to answer per email to the ticket opened from the original email the account was under.&lt;/p&gt;
&lt;p&gt;Discord even required you to answer per email in order to confirm the ticket regarding a compromised account,
WELL JOKES ON YOU!!!&lt;/p&gt;
&lt;p&gt;I use mailbox.org, a very very good german email provider which takes the work of hosting a email server from you, against a small price you can use custom domains and have a very reliable email service,
i never had problems with them before.&lt;/p&gt;
&lt;p&gt;But my emails answering the ticket, where always &lt;strong&gt;rejected&lt;/strong&gt;, not on a mail server layer, but by a zendesk filter, it does not matter if i used links or not, it simply did not work, here the answer:
&lt;img alt=&#34;Discord email rejection&#34; src=&#34;https://blog.liz3.cat/images/discord/email.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Im pretty sure in total i tried to answer 25 times to tickets without a single success.&lt;/p&gt;
&lt;p&gt;Because the next day, with the help of a friend, the original ticket was answered and they reset the account to my original email,
with the site effect of the account being active again resulting from that(the account was disabled luckily later the morning it got compromised).&lt;/p&gt;
&lt;p&gt;But they didnt reset the 2FA! so i was unable to reset the password because the 2fa was still set to the scammers one, since the account was active again that meant the scammer /could/ theoretically login again,
again due to the 2FA of the scammers being still active on the account.&lt;/p&gt;
&lt;p&gt;And i was unable to answer emails and let them know&amp;hellip;.&lt;/p&gt;
&lt;p&gt;so i was in the air,
the request from my alt, the account i used while i did not have my original, clearly mentioned in the ticket that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is the seccond request i do but i cannot answer the email to the first because it gets rejected by zendesk.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But still got a copy paste answer stating:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hey Yann,&lt;br&gt;
To protect our users&amp;rsquo; privacy and security, we&amp;rsquo;re only able to discuss account details with the email address associated with that Discord account. Since it looks like you&amp;rsquo;re currently writing in about another account associated with another email address, please send us a new ticket through that other email address via our support form instead and I can help check on that request through there.&lt;br&gt;
For General Support - &lt;a href=&#34;https://dis.gd/contact&#34;&gt;https://dis.gd/contact&lt;/a&gt;&lt;br&gt;
If you have any other questions in the meantime, please let me know here!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;i.e the support did not even READ my request, i totally get those protective measures and they make sense, but the support should at least read and try to provide a way to work around the issue, we will get back to something similar in the next section.&lt;/p&gt;
&lt;p&gt;In the end i got the account back the next morning through a friend who had directly contacted a employee at discord, who manually reset the 2fa code and all spam flags on the account, giving me it back, thank you.
To this day i stand by the statement, i would not have gotten the account back through the normal support, because of the email issue. which shows a fatal flaw in their system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: The discord support might not be able to help you, if you loose your account!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After this happened, i made a suggestion, that:&lt;/p&gt;
&lt;p&gt;Discord should allow accounts who got important credentials like the email changed and which also have higher roles in big servers, allow the original entity, i.e the old email address to &lt;strong&gt;suspend&lt;/strong&gt; the account through a link in a timeframe of maybe 12 hours,
freezing the account until manual verification is done, this would have prevented the destruction of the server which was destroyed by my account being compromised.&lt;/p&gt;
&lt;p&gt;In total i lost the account for about 30 hours, maybe +- 2 hours.&lt;/p&gt;
&lt;h3 id=&#34;the-early-verified-developer-badge-story&#34;&gt;The Early verified Developer Badge story&lt;/h3&gt;
&lt;p&gt;This is pretty insane and goes to this day!&lt;/p&gt;
&lt;p&gt;I worked at Animesoul for a long time, making anime.pics, working on their main site and also the bot Shoob, which i had written major parts in.
That bot also got verified before discord discontinued the badge, so i had that badge,
&lt;strong&gt;and of course badges are cool, i would be lying to say i dont like them&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When this happened i messaged the original admin to remove me from the team the bot was on in order to &lt;strong&gt;Protect the bot&lt;/strong&gt;:
&lt;img alt=&#34;whatsapp1&#34; src=&#34;https://blog.liz3.cat/images/discord/wa1.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Sadly doing that, also had as a side effect that i lost the badge, in the conversation we even quickly talked about the badge:
&lt;img alt=&#34;whatsapp2&#34; src=&#34;https://blog.liz3.cat/images/discord/wa2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Now lets forward a while,
two days after i got my account back, the Admin of the bot readded me to the team, where i was hoping to get the badge back, but i didnt, so i opened a support ticket in order to attempt to regain it,
one could argue that i lost it because of own dumbness and thats not even wrong, But i lost it in the process of protecting the bot, not as a direct effect of the compromise.&lt;/p&gt;
&lt;p&gt;Here the message i wrote to the support:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hey there,&lt;br&gt;
this means a lot to me so i would be happy to get a short attention from whoever reads this on the supporting end.&lt;br&gt;
I lost this account a couple days ago to a scammer for a time period of about 26 hours.&lt;br&gt;&lt;br&gt;
My account had the Early verified bot developer badge for the bot Shoob, bot id: 673362753489993749.&lt;br&gt;
I lost my Early verified bot developer badge during the time period the scammer had the account, although not because he did something, but because i asked the admin of the discord developer team to remove me in order to protect the bot.&lt;br&gt;
After i got the account back, the admin of shoobs team already added me back to the team but sadly it seams that does not reinstate the badge :((((&amp;hellip;i would lie to say the badge didnt make me proud and i would love to have it back although i will accept all outcomes, my id: 195906408561115137.  &lt;br&gt;
I love discord and it would mean the world to me if it was possible to get it back.&lt;br&gt;&lt;br&gt;
here the data again&lt;br&gt;
Bot id: 673362753489993749&lt;br&gt;
My account(this) id: 195906408561115137&lt;br&gt;
The Developer teams id(i am a part of it again): TEAM ID&lt;br&gt;
I added a screenshot of a old chat with the animesoul owner where we got the badges&amp;hellip;&lt;br&gt;
Kind regards,&lt;br&gt;
Liz3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I quickly got a answer, note that for the account restoration it took almost 16 hours, this answer came within 15 minutes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hey Liz3,&lt;br&gt;
Thanks for reaching out to us!&lt;br&gt;
As we recently announced in our official Discord Developers server, we discontinued the verified developer profile badge for anyone who submitted their bot for verification after August 19th, 2020. Any bot which requested verification prior to that date and is approved for verification will still receive the profile badge, now renamed the Early Verified Developer badge.&lt;br&gt;
When we announced the Bot Verification process, we promised that it wouldn&amp;rsquo;t be a long and difficult process. We wanted to maintain a five-day turnaround time, and we haven&amp;rsquo;t done that. We’re taking the following step to try and better meet that commitment.&lt;br&gt;
We’ve approved thousands of bots so far. As time goes on, the verification queue has become more and more filled with fraudulent submissions by individuals that are not submitting actual bots, but are going to extreme lengths to get a profile badge. These submissions are hindering the ability for legitimate bots to get verified in time for the deadline.&lt;br&gt;
All verified bots will continue to receive the Verified checkmark. The checkmark for your bot is an important way for our community to recognize your bot as a trusted bot partner. The only thing we&amp;rsquo;ve discontinued is the special badge on a developer&amp;rsquo;s profile.&lt;br&gt;
I sincerely apologize for any confusion or disappointment this causes. If you have any further questions regarding this change or anything else, I&amp;rsquo;d be happy to help further, and please consider joining our Developers server as well for further announcements regarding the Discord API and our bot verification program.&lt;br&gt;&lt;br&gt;
Sincerely,&lt;br&gt;
Support person&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I cannot express how incredibly disgusting the answer is, i was really thinking to include the persons name, but i have enough respect not to,
but this answer shows the support person did NO EFFORT to even READ my request and just went on with a simple copy paste answer&amp;hellip;which is extremely disrespectful, considering i spent time detailing the case.&lt;/p&gt;
&lt;p&gt;Do i not even deserve a human answer?
I then annoyed answered them with:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;did you read my question? i had it.&lt;br&gt;
the bot is verified and i had the badge.&lt;br&gt;
Why does the support seam to just paste answers copy paste, i spent time detailing my case and get hit like that. Please read my case and give he a human answer if possible.&lt;br&gt;
Liz3.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and importantly:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any bot which requested verification prior to that date and is approved for verification will still receive the profile badge, now renamed the Early Verified Developer badge&lt;br&gt;
This applies here&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;They then just answered with, no sorry cant do anything&amp;hellip;&lt;/p&gt;
&lt;p&gt;wow, not a single interest in providing help, not only in the regards that the &lt;strong&gt;important request&lt;/strong&gt; to lock or restore the account took almost a day and this was answered in 15 minutes, but also that they really do no effort in helping.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But it gets even better!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Out of frustration i opened a new ticket, with a very similar content to the original above,
to which i got this answer&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hey Yann,&lt;br&gt;
Thanks so much for gathering all of that info for me! I just wanted to let you know that I&amp;rsquo;ll be escalating this ticket to our dev team to look into further. I genuinely apologize for the inconvenience in the meantime and will keep you updated here as soon as I hear back!&lt;br&gt;
Let me know if you have any other questions at any time!&lt;br&gt;&lt;br&gt;
Best,&lt;br&gt;
Another support person&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That sounded so good, i answered thanking and that i would wait patiently,
wait, wait, &lt;em&gt;wait to this day&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Yes to this day they did not answer that ticket, i still want a answer as i think i made a good argument,
in the mean while discord removed the sign in on their support site, so all these texts are from the received emails&amp;hellip;.&lt;/p&gt;
&lt;p&gt;Thats it!&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>iRacing and kernel developing</title>
      <link>https://blog.liz3.cat/posts/2021-12-18-iracing-and-devs/</link>
      <pubDate>Sat, 18 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2021-12-18-iracing-and-devs/</guid>
      <description>&lt;p&gt;So you do windows kernel development but then one day decide you want to play iRacing? Heres my story:&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;I like motorsport, its not a secret, on that day i wanted to play some iRacing to see the Mercedes Benz AMG W12 which was developed for the iRacing simulator.
But surprise i also develop! And while i do not mainly work on windows, i have a ssd in my tower running windows for some games or when i test/develop windows specific things&amp;hellip;and it happens that around 4-5 months ago i did some kernel development/testing regarding Genshin impact reverse work.&lt;/p&gt;</description>
      <content>&lt;p&gt;So you do windows kernel development but then one day decide you want to play iRacing? Heres my story:&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;I like motorsport, its not a secret, on that day i wanted to play some iRacing to see the Mercedes Benz AMG W12 which was developed for the iRacing simulator.
But surprise i also develop! And while i do not mainly work on windows, i have a ssd in my tower running windows for some games or when i test/develop windows specific things&amp;hellip;and it happens that around 4-5 months ago i did some kernel development/testing regarding Genshin impact reverse work.&lt;/p&gt;
&lt;p&gt;iRacing installed correctly, everything fine. But when i then tried to launch the test track, &lt;strong&gt;It got stuck at &amp;ldquo;Loading Sim: 0%&amp;rdquo;&lt;/strong&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;Mh i wondered, what could that be, did the install fail? did i need to restart?(iRacing comes with EasyAntiCheat, which i can understand since its a competitive simulator)
So i re reinstalled everything, but still, nothing&amp;hellip;.so i did some digging where iRacings logs are and after i found them i saw: &amp;ldquo;Cannot launch Easy anti Cheat with Forced driver signing disabled&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Oh okay&amp;hellip;.&lt;/p&gt;
&lt;h2 id=&#34;the-solution&#34;&gt;The solution.&lt;/h2&gt;
&lt;p&gt;Since i did the kernel testing i had test mode enabled&amp;hellip;.&lt;em&gt;The sim could have warned me but whatever, just lost 30 minutes trying to search for the reason&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So the fix in the end was rather simple but i wanted to write it down incase this might help someone.
Run a CMD as Admin and use&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;bcdedit /set TESTSIGNING off
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then you will need to restart but that should let iRacing be happy and start normally&amp;hellip;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>Weed experienced the other way...</title>
      <link>https://blog.liz3.cat/posts/2021-12-13-weed-the-other-way/</link>
      <pubDate>Mon, 13 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2021-12-13-weed-the-other-way/</guid>
      <description>&lt;p&gt;&lt;em&gt;note the times are in european standard but 12-23 is pm, 0-8 is am&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Where do i start on this one, well at the beginning i suppose.
I am generally open towards drugs, not extreme since i am very aware of the dangers but i also see the benifits and thus i am rather open towards them.&lt;/p&gt;
&lt;h2 id=&#34;the-beginning&#34;&gt;The beginning.&lt;/h2&gt;
&lt;p&gt;I will try to hold this short, basically this friday evening i planned to do &lt;strong&gt;hash brownies&lt;/strong&gt; with two of my friends&amp;hellip;  i will not disclose their names for privacy reasons since this is about me.
But all of us are adults and non of us is imature or silly in their actions, normally&lt;/p&gt;</description>
      <content>&lt;p&gt;&lt;em&gt;note the times are in european standard but 12-23 is pm, 0-8 is am&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Where do i start on this one, well at the beginning i suppose.
I am generally open towards drugs, not extreme since i am very aware of the dangers but i also see the benifits and thus i am rather open towards them.&lt;/p&gt;
&lt;h2 id=&#34;the-beginning&#34;&gt;The beginning.&lt;/h2&gt;
&lt;p&gt;I will try to hold this short, basically this friday evening i planned to do &lt;strong&gt;hash brownies&lt;/strong&gt; with two of my friends&amp;hellip;  i will not disclose their names for privacy reasons since this is about me.
But all of us are adults and non of us is imature or silly in their actions, normally&lt;/p&gt;
&lt;p&gt;I have had some experiences with smoking weed but nothing intense, &lt;strong&gt;im not a active smoker&lt;/strong&gt;, this was my first time doing hash brownies.&lt;/p&gt;
&lt;p&gt;So we started the evening(19:00), when i arrived the brownies where not done and thus we had some good talks and &lt;em&gt;ordered pizza, so we had eaten enough&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Again this was my first time so i didnt know exactly what to expect but i was aware brownies act slower but more intense and longer then smoking it.&lt;/p&gt;
&lt;p&gt;Around 21:30(might have been from 21:00 i cannot remember exactly) the brownies where done and i ate one, we continued to watch stuff, feeling nothing yet.&lt;/p&gt;
&lt;h2 id=&#34;the-waiting&#34;&gt;The Waiting&lt;/h2&gt;
&lt;p&gt;The first brownie was already a while ago&amp;hellip;.nothing yet, it was 22:15 now, so we talked for a while and then decided to eat a &lt;strong&gt;second hash brownie&lt;/strong&gt;&amp;hellip;this was probably the dumbest decision i made in a long time.
We then continued watching star wars the clone wars&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;the-relaxed-phase&#34;&gt;The relaxed phase.&lt;/h2&gt;
&lt;p&gt;Id say around 23:00 i started feeling something which wasnt extreme but it was a sense of having to concentrate more then usually to what happened in the episodes.&lt;br&gt;
10 minutes later i got a wave of heaviness/foginess rolling my body up and into my head&amp;hellip;i knew now it was starting to take effect.&lt;/p&gt;
&lt;h2 id=&#34;whats-this&#34;&gt;Whats this?&lt;/h2&gt;
&lt;p&gt;My friends started feeling something around the same time id say but the action started at 23:30 when my friend started feeling somewhat overwhelmed by the high of what i think was the first brownie kicking in.&lt;/p&gt;
&lt;p&gt;I started feeling a lot too but i was fine, i was aware and it was enjoyable actually, besides the fact of a very very dry mouth making chewing very hard and the fact time seams to slow down a lot.
we went into the garden and got some fresh air, i was high at that point but still fine&amp;hellip;&lt;/p&gt;
&lt;p&gt;When we went upstairs thats when it started to get bad for me.&lt;/p&gt;
&lt;h2 id=&#34;my-adventure&#34;&gt;My Adventure&lt;/h2&gt;
&lt;p&gt;It started that thinking clear was becoming harder and harder, i was very high at that point but still felt it was managable, we went down again for a while into the garden, there in one instance my friend was breathing out into the cold night and i believed he was throwing cartoonish flames into the air.&lt;/p&gt;
&lt;p&gt;After we got up again it got really bad because i wasnt really oriented anymore. I forgot things i did 2 minutes ago, they have a cat i think when wanted to pat the cat and then suddenly was sitting in a chair again, there was another instance of me wondering where my phone is, with one of my friends then pointing out to me it was right next to me on the table.&lt;/p&gt;
&lt;p&gt;Now the bad stuff begins&amp;hellip;i always &lt;em&gt;tend&lt;/em&gt; to have a faster heart when excited but im used to that and i can control it with breathing and slow it and all good&amp;hellip;&lt;br&gt;
After the orientation started getting worse, i started feeling my heart more and more.&lt;/p&gt;
&lt;p&gt;And that wasnt playing, i was setting doing nothing but trying to relax myself with a every increasing heart rate. At that point i was aware and trying to slow it with controlled breathing but nothing it just wouldnt decrease.&lt;br&gt;
As a side note, a little earlier there was already police there out of another reason and one of my friend asked them and got told to just wait the high out unless theres a critical health issue&amp;hellip;.well..&lt;/p&gt;
&lt;p&gt;So after 5-10 minutes, &lt;strong&gt;it was 0:30 now i told my friend to call an ambulance&lt;/strong&gt; since he confirmed too my heart was going fast and at this point i was just panicking while trying to be calm, as a funfact while he was on the phone i almost changed my mind and was about to tell him to leave it when it started getting extreme so i thought its probs the right thing to do.&lt;/p&gt;
&lt;p&gt;So after he called them we decided to go down, they actually took a bit longer but i was already out, i was not feeling well and just trying to wait for the ambulance&amp;hellip;and it was a long wait&amp;hellip;or it felt like it, since in reality it was just what, 7 minutes?
I stod there infront of street, trying to understand where i was, what was going on. was the ambulance there and i was just at the wrong exit? where they not coming? i just stod there waiting&amp;hellip;.luckily they did come.
Still very stressed and as a result decided to sit down on the street floor.&lt;/p&gt;
&lt;p&gt;And then yes shortly after the ambulance did arrive.&lt;/p&gt;
&lt;p&gt;I was still able to walk and think luckily, after i went into the car. The medic put a small clip on my finger which does heart rate and such, after seing it from the clip that the heart rate was high, he asked me to lay down and they started putting the pads on my chest and (shoulders?) for more exact measurings.&lt;/p&gt;
&lt;p&gt;Then they also took blood pressure and from there it was clear i was going to the hospital.
The medic asked me stuff while i was being driven, things like address and such and rightfully critised the consume of weed i had done but also saw that my current situation wasnt enjoyable.&lt;/p&gt;
&lt;p&gt;As we arrived at the hospital, i was so high tihnking was hard and i didnt stand up either. i remember i had forgotten if i was in the ambulance with the back against or facing driving directions.
In the hospital things went their way, blood taked, and prepared for observation after i had switched beds, not walking.&lt;/p&gt;
&lt;p&gt;The doctor who was consise but nice did a good analysis and then just put me on watch&amp;hellip;&lt;/p&gt;
&lt;p&gt;From there nothing extremely exciting happened except that the heart rate did not decrease, by 2 am it was still around 145bpm, which is why the doctor gave me medication which both times reduced the heart rate by about 15-20 bpm.&lt;/p&gt;
&lt;p&gt;I spent the night there and around 5:00 got some sleep, when i woke up at 6:30 my heart rate was at 95 which is still fast but acceptable&amp;hellip;at 8 i left the hospital&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;final-thoughts&#34;&gt;Final thoughts&lt;/h2&gt;
&lt;p&gt;Some notes, first to recap heres the heart rate in time from what i know since thats the reason i was brought to the hospital:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Time&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Blood Presure&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Heart Rate(BPM)&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;0:51&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;158/80&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;144&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;1:07&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;152/77&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;142&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;4:09&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;116/70&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;116&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Again Note that it was consistently above 130 until 3am which is where i got the medication&amp;hellip;
Even though in the aftermath i would have survived without the ambulance it was still the right thing to do.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;But most of all value the health care people, the fact they acted so fast on whats basically a drug overdose and the work they do day in and day out is incredible and i pull my hat and thank every doctor, nurse and paramedic for the incredible work they do, its really a amazing job.&lt;/em&gt;
&lt;em&gt;Thank you&lt;/em&gt;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>How to debug Docker CLI api calls</title>
      <link>https://blog.liz3.cat/posts/2021-11-24-docker-api-debug/</link>
      <pubDate>Wed, 24 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2021-11-24-docker-api-debug/</guid>
      <description>&lt;p&gt;So at &lt;a href=&#34;https://giggl.app&#34;&gt;Giggl&lt;/a&gt; we do quite some stuff with Docker and i wanted to do some more specific things with the &lt;a href=&#34;https://docs.docker.com/engine/api/v1.41/&#34;&gt;Docker Engine API&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;The Problem is that the CLI arguments passed to the &lt;code&gt;docker&lt;/code&gt; tool are not 1:1 the same passed to the daemon api, and for things like the &lt;em&gt;seccomp&lt;/em&gt; you actually read files before sending the content to the Docker daemon.&lt;/p&gt;
&lt;p&gt;It would be good if i could see what the &lt;code&gt;docker&lt;/code&gt; tool sends to the API, because while the Engine Api has a documentation, it is missing certain things or does not dive into detail to the degree i would need&amp;hellip;.well turns out i can do that using a little hack!&lt;/p&gt;</description>
      <content>&lt;p&gt;So at &lt;a href=&#34;https://giggl.app&#34;&gt;Giggl&lt;/a&gt; we do quite some stuff with Docker and i wanted to do some more specific things with the &lt;a href=&#34;https://docs.docker.com/engine/api/v1.41/&#34;&gt;Docker Engine API&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;The Problem is that the CLI arguments passed to the &lt;code&gt;docker&lt;/code&gt; tool are not 1:1 the same passed to the daemon api, and for things like the &lt;em&gt;seccomp&lt;/em&gt; you actually read files before sending the content to the Docker daemon.&lt;/p&gt;
&lt;p&gt;It would be good if i could see what the &lt;code&gt;docker&lt;/code&gt; tool sends to the API, because while the Engine Api has a documentation, it is missing certain things or does not dive into detail to the degree i would need&amp;hellip;.well turns out i can do that using a little hack!&lt;/p&gt;
&lt;h2 id=&#34;the-solution&#34;&gt;The Solution&lt;/h2&gt;
&lt;p&gt;I have this tool called &lt;a href=&#34;https://github.com/liz3/dbg-server&#34;&gt;dbg-server&lt;/a&gt; which is a very simple http server to debug clients, its made to be spawned in a terminal or be piped but basically it prints what it receives to the console, note that it will accept any method and path, it will show us which path the request was.&lt;/p&gt;
&lt;p&gt;So first we need to start the tool, if you have node/npm thats easy using the npx utility provided with npm:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npx dbg-server -p &lt;span style=&#34;color:#ae81ff&#34;&gt;2020&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we need a way to tell the docker tool to send to that server, basically we will make it think thats the docker daemon. since the returned response is empty, sometimes the docker tool might complain but we do not care since it send the request, though note that &lt;em&gt;dbg-server&lt;/em&gt; can be passed the &lt;code&gt;-b&lt;/code&gt; option followed by a string to return to the requester.&lt;/p&gt;
&lt;p&gt;To tell docker to send its request to our client, we can use a ENV var it will check for, since this is a http server we need to use &lt;code&gt;tcp://&lt;/code&gt; as the protocol, since we do not want to persist this change just execute it in a terminal window and we will have it for this session:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export DOCKER_HOST&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;tcp://0.0.0.0:2020&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And thats it!&lt;/p&gt;
&lt;p&gt;Now in the terminal window/tab where we executed the &lt;code&gt;export&lt;/code&gt; command we can use any docker command, lets try &lt;code&gt;docker ps&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; docker ps
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;mmhhh that didn&amp;rsquo;t return any data, but we expect that, lets check the console where the dbg-server is running&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; npx dbg-server -p &lt;span style=&#34;color:#ae81ff&#34;&gt;2020&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;server ready on &lt;span style=&#34;color:#ae81ff&#34;&gt;2020&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HEAD &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&amp;gt; /_ping&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;undefined&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HEAD &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&amp;gt; /_ping&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;undefined&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HEAD &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&amp;gt; /_ping&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;undefined&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GET &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&amp;gt; /v1.24/containers/json&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;undefined&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;LOOK AT THAT, we can see the client tried to &lt;code&gt;GET /v1.24/containers/json&lt;/code&gt;!&lt;/p&gt;
&lt;p&gt;Lets try to run a container with a volume:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; docker run -v &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Users/liz3:/root&amp;#34;&lt;/span&gt; -ti ubuntu:latest
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker: EOF.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;See &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;docker run --help&amp;#39;&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Again &lt;code&gt;EOF&lt;/code&gt;, again lets check the server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;POST &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&amp;gt; /v1.24/containers/create&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;application/json&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Hostname&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Domainname&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;User&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Image&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ubuntu:latest&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Labels&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;HostConfig&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Binds&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Users/liz3:/root&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ContainerIDFile&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;LogConfig&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Type&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Config&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;NetworkMode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;PortBindings&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;RestartPolicy&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;no&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;MaximumRetryCount&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;AutoRemove&amp;#34;&lt;/span&gt;: false,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ConsoleSize&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Isolation&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;CpuShares&amp;#34;&lt;/span&gt;: 0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Memory&amp;#34;&lt;/span&gt;: 0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;NanoCpus&amp;#34;&lt;/span&gt;: 0,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;CgroupParent&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ReadonlyPaths&amp;#34;&lt;/span&gt;: null
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;NetworkingConfig&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;EndpointsConfig&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Platform&amp;#34;&lt;/span&gt;: null
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Woah so thats how it does that! As example we can see that the &lt;code&gt;-v&lt;/code&gt; turned into a entry IN &lt;code&gt;Binds&lt;/code&gt; IN &lt;code&gt;HostConfig&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This helped me solve a real world problem in software and maybe will you too, it was definitely a useful thing. thats why i like sometimes say i do software engineering &amp;amp; hacking, because isnt that what hacking is? thinking outside the box?
&amp;hellip;&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>How do time media over the network or when playing back</title>
      <link>https://blog.liz3.cat/posts/2021-11-23-media-timing/</link>
      <pubDate>Tue, 23 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2021-11-23-media-timing/</guid>
      <description>&lt;p&gt;So you&amp;rsquo;ve got your discord bot or a library for playing video files but somethings just off? Lag after some time or even directly from the beginning?
Chances are that maybe the timing is off, and to be fair its really hard to get it right. Heres how to solve it.&lt;/p&gt;
&lt;h2 id=&#34;the-naive-approach&#34;&gt;The naive approach&lt;/h2&gt;
&lt;p&gt;Timing video/audio cant be hard can it? Turns out its not as straight forward as you might think.&lt;/p&gt;</description>
      <content>&lt;p&gt;So you&amp;rsquo;ve got your discord bot or a library for playing video files but somethings just off? Lag after some time or even directly from the beginning?
Chances are that maybe the timing is off, and to be fair its really hard to get it right. Heres how to solve it.&lt;/p&gt;
&lt;h2 id=&#34;the-naive-approach&#34;&gt;The naive approach&lt;/h2&gt;
&lt;p&gt;Timing video/audio cant be hard can it? Turns out its not as straight forward as you might think.&lt;/p&gt;
&lt;p&gt;The Naive and also my first attempt was just to, send &lt;em&gt;x&lt;/em&gt; amount of data for a time period, measure how long that takes and then &lt;em&gt;sleep&lt;/em&gt; for the time that took.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;start = now()

to_send = prepare_data() // some encoder/decoder maybe
send_data(to_send)  // send data to a blip frame or some network endpoint.

elapsed = now() - start
if elapsed &amp;gt; 0 do
  sleep(data_time_amount - elapsed)
end
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That seams reasonable right?&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;The issue with that approach is that its &lt;em&gt;relative&lt;/em&gt;.
The time passed is suspect to the operating system suspending the process, giving it other priority and other factors.
Which means while the approach is &lt;em&gt;theoretically&lt;/em&gt; correct, its not going to work unless there is 0 delay beyond your desired one, which will never happen.&lt;/p&gt;
&lt;p&gt;Regarding that its also interesting because you learn about kernel schedulers, when i did this, it was often more a problem on macOS then on gnu/linux because the linux kernel scheduler is a lot more aggressive and resource &lt;em&gt;giving&lt;/em&gt; then macOS, macOS will make sure its own services have enough priority to keep certain things like the desktop running smoothly.&lt;/p&gt;
&lt;h2 id=&#34;the-solution&#34;&gt;The solution&lt;/h2&gt;
&lt;p&gt;I put &lt;em&gt;relative&lt;/em&gt; in the previous section in italic for a reason because in that problem is the solution, we need to time in a &lt;em&gt;absolute&lt;/em&gt; approach.
That works because(assuming we know the audio packet/frame or video frame duration) we can calculate the position we &lt;strong&gt;should&lt;/strong&gt; reach.&lt;/p&gt;
&lt;p&gt;Great how do we do that?&lt;/p&gt;
&lt;p&gt;Here the solution in c++ from my project &lt;a href=&#34;https://github.com/liz3/tokio&#34;&gt;tokio&lt;/a&gt; in c++&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;thread&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#include&lt;/span&gt; &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;chrono&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;using&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;namespace&lt;/span&gt; std&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;chrono;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;high_resolution_clock&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;time_point start_point &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; high_resolution_clock&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;now();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;size_t elapsed_frames &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt; frame_duration &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0.02&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt;(should_play) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  send_data();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  elapsed_frames&lt;span style=&#34;color:#f92672&#34;&gt;++&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  high_resolution_clock&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;time_point point_now &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; high_resolution_clock&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;now();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  duration&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; absolute_elapsed &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; duration_cast&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;duration&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&amp;gt;&lt;/span&gt;(point_now &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; start_point);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt; current_play_head &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; frame_duration &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; elapsed_frames;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt; to_delay &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; current_play_head &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt; absolute_elapsed.count();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(to_delay &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    std&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;this_thread&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;sleep_for(std&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;chrono&lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt;microseconds((&lt;span style=&#34;color:#66d9ef&#34;&gt;int&lt;/span&gt;) (to_delay &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1000000&lt;/span&gt;)));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So what do we do here?
First we need to know 2 things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;the current time in a high resolution - &lt;code&gt;start_point&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;how long in absolute time one iteration of our loop passes, here &lt;code&gt;frame_duration&lt;/code&gt; 2% of a second.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the loop we send our data and then increment a simple counter per iteration.&lt;/p&gt;
&lt;p&gt;Then we calculate the &lt;strong&gt;absolute&lt;/strong&gt; time elapsed since we started playing(&lt;code&gt;absolute_elapsed&lt;/code&gt;), that gets rid of that relative issue from the naive approach.
After that we calculated the &lt;code&gt;current_play_head&lt;/code&gt;, basically where the audio should be after the sleep we are now starting.
Lastly we calculate the actual amount to sleep(&lt;code&gt;to_delay&lt;/code&gt;) by substracting the elapsed time from the play head.&lt;/p&gt;
&lt;p&gt;Then if needed we sleep by that amount.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I learned this way of calculating by reading the discord.py source code and how they do it.&lt;/p&gt;
&lt;p&gt;I hope you where able to take something from this and maybe even use it!&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>How Disney ruined Star Wars</title>
      <link>https://blog.liz3.cat/posts/2021-08-10-how-disney-killed-star-wars/</link>
      <pubDate>Tue, 10 Aug 2021 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/posts/2021-08-10-how-disney-killed-star-wars/</guid>
      <description>&lt;p&gt;Im a huge star wars fan, theres no doubt in that, its amazing how the first 6 parts combine science-fiction with spiritual topics and even some deep theming.
Of course its not perfect. Lucasfilm didnt always do everything perfect and its still confusing how they wrote out the Anakin &amp;amp; Padmé to she being what, 18 years older? but thats another topic.&lt;/p&gt;
&lt;h2 id=&#34;how-the-problem-was-able-to-be-created&#34;&gt;How the problem was able to be created&lt;/h2&gt;
&lt;p&gt;The first 6 parts where compared to the later parts a lot more serious. Not necasserily really darker, but they definitely had more seriousness to them.
Why is that?&lt;/p&gt;</description>
      <content>&lt;p&gt;Im a huge star wars fan, theres no doubt in that, its amazing how the first 6 parts combine science-fiction with spiritual topics and even some deep theming.
Of course its not perfect. Lucasfilm didnt always do everything perfect and its still confusing how they wrote out the Anakin &amp;amp; Padmé to she being what, 18 years older? but thats another topic.&lt;/p&gt;
&lt;h2 id=&#34;how-the-problem-was-able-to-be-created&#34;&gt;How the problem was able to be created&lt;/h2&gt;
&lt;p&gt;The first 6 parts where compared to the later parts a lot more serious. Not necasserily really darker, but they definitely had more seriousness to them.
Why is that?&lt;/p&gt;
&lt;p&gt;In the first 6 movies the emphasis is strongly on holding to the code of the jedi and following it closely. A good example is the 2 part when Anakin asks the ship to be landed and he gets in an argument with his master kenobi.&lt;/p&gt;
&lt;p&gt;Theres also a great focus on the aspect of master/apprentice and the fact you should be thriving to get more closely with the force and become wiser.
That does not mean there cant be fun, in the second and third part how count doku tries to hold his fights very very &amp;ldquo;english style&amp;rdquo; being polite is one example.&lt;/p&gt;
&lt;p&gt;And lastly while yes of course it was possible to do things which even in the star wars galaxy where crazy there was still a system behind it, disney broke the system a lot of times for no real reasons.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;Disney!&lt;/p&gt;
&lt;p&gt;Disney tried to turn star wars into a bad comedy show half serious in the star wars franchise?&lt;/p&gt;
&lt;p&gt;One of my facorite examples is in the 8th film where Snoke tries to recrute kailo and speaks: &amp;ldquo;a new Vader&amp;rdquo;, which is just mind boggling. Vader was created because anakin over estimated his skills in a battle with his old master kenobi. Vader was just the name.
I shows how little disney tried to develop the story and how desperately they tried to not let old characters disappear. a good counter example is kenobis master Qui-Gon Jinn, he was one of the main actors in the first part and had one more appearance at the end of the 3 part. but thats it. he character is gone.&lt;/p&gt;
&lt;p&gt;Another example that shows how they couldnt let characters go, is how lea saved herself randomly out of space pulling herself back to the ship using the force, yes theres the jedi jump but this would not hve been possible normally, again becasuse they couldnt let a main character die.&lt;/p&gt;
&lt;p&gt;Then the scene where rai gives luke anakins light saber and he just throws it away&amp;hellip;disney trying to be funny in the wrong way. In a normal star wars he would have maybe also turned down the request to train ray, but not in that way.&lt;/p&gt;
&lt;p&gt;I could give endless more examples but i think i made the point.&lt;/p&gt;
&lt;h2 id=&#34;how-to-solve-the-problem&#34;&gt;How to solve the problem&lt;/h2&gt;
&lt;p&gt;Bring back the old style to think about the force, manners and the style to write the films.&lt;/p&gt;
&lt;p&gt;But most importanly. LET GO OF MAIN CHARCTERS, move the story.
Yes they let Luke, lea and han go but bring back palpatine without explanation?!&lt;/p&gt;
&lt;p&gt;And please also film some scenes on coruscant, i miss that place.&lt;/p&gt;
</content>
    </item>
    
    <item>
      <title>About</title>
      <link>https://blog.liz3.cat/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://blog.liz3.cat/about/</guid>
      <description>&lt;p&gt;Hey im Liz3 and im a developer and write about topics which interest me. If you want to learn more about me visit my website at: &lt;a href=&#34;https://liz3.cat&#34; target=&#34;_blank&#34;&gt;liz3.cat&lt;/a&gt;&lt;/p&gt;</description>
      <content>&lt;p&gt;Hey im Liz3 and im a developer and write about topics which interest me. If you want to learn more about me visit my website at: &lt;a href=&#34;https://liz3.cat&#34; target=&#34;_blank&#34;&gt;liz3.cat&lt;/a&gt;&lt;/p&gt;
</content>
    </item>
    
  </channel>
</rss>
