Konstantin Nazarov
69 subscribers
18 photos
7 videos
3 files
72 links
Konstantin Nazarov's blog posts and updates
Download Telegram
to view and join the conversation
Will be filming a new video today
This is my new filming setup that has arrived today. What you’ve seen yesterday is the older one, with a Canon m50 camera, and a teleprompter mounted on a lens.

My original idea with buying this setup was to kill 2 birds with one stone: be able to record videos on my Mac with OBS, and to do live streams and meetings through Zoom.

Unfortunately, it didn’t work well with Canon m50. It requires additional software to provide a continuous video stream to the Mac through USB, which is highly unreliable and will stop “seeing” the camera every now and then. After struggling with it, I tried replacing the USB connection with a cheap $15 USB dongle that takes HDMI input from the camera and presents it as a regular “webcam” in MacOS.

It turns out, that in this mode the Canon camera will turn off at most after 30 minutes of usage. This is because Canon didn’t want to pay the “video camera tax” in the EU, and so to evade the charges they have to turn off their devices after 30 minutes. In addition, when using HDMI output, it is impossible to remove the status HUD from the recording.

So, after looking through various reviews, I arrived at a different camera: Sony a6400, which can work indefinitely. But since this camera is more expensive than Canon m50, I decided that I won’t mount the teleprompter to the lens. Instead, I purchased another teleprompter from GlideGear, that has a proper mount for the camera.

The thing that holds all the stuff is Manfrotto 244 variable friction arm. This arm is pure magic: it can hold ridiculous amount of weight. The tripod I’ve used before will always tip over and fall if I wasn’t careful enough.
This is DOOM running on Ikea smart light bulb: https://youtu.be/7ybybf4tJWw
While working on the note taking scripts, I decided that it’d be cool to be able to publish my notes on the internet. I already have a Wordpress site, and it should’ve been possible to write a script that takes my markdown notes and sends them through the Wordpress API and have some sort of Wordpress markdown plugin convert them on the fly.

But as you may guess, I didn’t go with that. Wordpress is for “normies” and I wanted to get rid of it someday anyway. Instead of Wordpress, I decided to implement a plaintext publishing workflow that will take Markdown notes as the input and produce html pages on my local machine.

Enter markdown.awk. This is a pure awk implementation of markdown->html that I’m currently working on. It should cover most of the critical Markdown features in the future, while being easily copy-pastable and no-deps. You can find the code on GitHub as usual: https://github.com/knazarov/markdown.awk
My markdown->html converter in awk is getting in shape. It now supports code blocks, headers, nested blockquotes, numbered and bullet lists, paragraphs and simple text formatting. The next step will be to add support for properly escaping special symbols like “<“, “>” and others because they have special meaning in html.

But what can I say in general? Awk is pretty nice to program in. It turned out, that it has a fully featured programming language that doesn’t look obscure and is even easily readable if you know a little bit of C. Given how old awk is, I can only admire its creators for how good this piece of engineering is.

I’m not joking. Go ahead and look at the code if you don’t believe me. It’s a bit dirty in places, but you should be able to understand what’s going on.
There will be multiple updates today, so buckle up 🙂
First, I’ve got a chance to get back to qemu-virgl. Purchased myself a cheap-ish M1 Mac Mini to be able to continue the development and dedicated a day to hacking on it.

The latest patchset that I’ve pulled in has better support for 3d acceleration, and various fixes related to sound hiccups. It started using a paravirtualized CoreAudio device which should solve the problems for those who had them.

In addition to that, there is some upstream work to bring clipboard sharing to mainline qemu. While that work is not yet there, it’s been landed to Akihiko Odaki’s patchset. I’ll try to pull it to my branch as well and make it work by default.

In addition to that, I moved on from recommending Ubuntu by default, since Fedora 34 has made a huge progress and is now in many ways both more bleeding-edge and stable at the same time. Ubuntu doesn’t even have arm64 iso builds for some reason!

Using Linux on M1 mac is now even easier than before.
Little-by-little I also made some more progress on markdown.awk. I didn’t think that I’d get it to anywhere close to what it is right now, but well, it now supports most of the useful markdown features.

I’m not super happy with the quality of the code, but it’s covered with tests and should be fine as a daily driver to publish stuff on the web.

Don’t get me wrong: I could’ve taken any of the existing markdown converters and call it a day. It’s just an exercise in clever hackery and getting to know my unix tools better. Plus maybe someday it’d end up somewhere on suckless.org, who knows 🙂

Maybe I’d do something like markdown-to-gmi, to publish my texts to Gemini as well. If you’ve never heard about Gemini, take a look here: https://gemini.circumlunar.space.
While working on various command-line utilities and scripting languages, I decided that I want to write my own language as well. The core reason for that is I want a language that will not change its spec. Something that you could use for prototyping small things and be sure that they keep working for a long time even if you’re not touching them.

Desired features:

⁃ Tiny core
⁃ Not cross-platform (Unix only)
⁃ Reference counting GC (maybe with deferred loop detection)
⁃ Dynamic typing
⁃ Shared-nothing threads (e.g. separate heaps per thread)
⁃ No GIL
⁃ UTF-8 only
⁃ No compilation/jit, only interpretation
⁃ Non-ambiguous syntax, parseable with a really dumb parser
⁃ Only basic data structures like lists/sets/maps/structs, no OO
⁃ No linking of external libraries. Want to interact with something? Use sockets/file IO.

Ideally, the language should be easily supportable by one person in spare time.
This Sunday I was able to hack a little bit on side projects, so here’s an update for you.

qemu-virgl received support for clipboard sharing (yay!) and an updated README with instructions on getting seamless mouse pointer integration.
markdown.awk has been ported to OS X flavor of awk. Basically, BSD awk has less features than its GNU counterpart, so I had to bring it to a common denominator.
I’ve built a static site generator based on markdown.awk and ported my personal site to it. It’s not yet deployed, but I’m planning to do it sometime next week.

Building a static site generator was especially pleasant, since it ties well into the whole command line tool suite I’m designing.
Today I've finally completed the reimplementation of https://knazarov.com
It's now based on a completely plain-text content authoring system that
consists of notes.sh and markdown.awk.

It's somewhat minimal, but still I'm proud of it.
Added an RSS feed to my website (https://knazarov.com). Surprisingly, it was easy enough to code from scratch. The standard is pretty straightforward.
And here's a short note about the new thing I'm working on: https://knazarov.com/posts/calendar_widget_for_sway_and_wayland_alpha/