Plugins can now be enabled and disabled in production (when running in gunicorn/uWSGI) without bringing the server down 😀.
The issue was that only a single process (the one that handled the request) got the plugin dynamically enabled. When the other processes tried to lookup urls/templates from the plugin, it didn't exist as it's not enabled and returned an error.
When enabling or disabling plugins in Tanzawa, for urls to register correctly across all sub-processes, you must restart all processes, not just fiddle with the process that made the request.
The complete changes are in PR #121, but the line of interest is below.
import os import signal os.kill(os.getppid(), signal.SIGHUP)
Where getppid gets the process id of the parent process (gunicorn, uwsgi, etc...) and sends it a HUP signal.
For decades, the development of information technology has been characterized by a very strong growth orientation, which is now coming to an end with the fading of Moore's Law and environmental change. Academic research in computing has only recently begun to wake up to the fact that there are limits to growth, and that a more fundamental paradigm shift is required to achieve sustainable computing; mere technical tinkering is not enough.
Growth-centricity has also dictated the development of digital esthetics, which will thus need to change as well. I suggest that the guidelines for this change should be sought in subcultures of computer art whose esthetic ideals are very different from the mainstream Maximalism and Virtualism – the self-serving glorification of the big and plentiful and the hiding of the technical basis of things. I have chosen demo art, chip music, pixel graphics and glitch art as examples of these subcultures. The ideals of "digitality" are also being challenged by post-digitality, so I will also look at these subcultures through this concept.
I will conclude with reflections on the possible impacts of environmental change on digital esthetics and computing more generally, and on the ways in which computer art subcultures could play a pioneering role in these developments.I haven't actually read all of this, but from what I have I'm completely on board. Mostly a reminder for myself to finish reading this.
SerenityOS is a love letter to ’90s user interfaces. Andreas Kling demos some of the best aspects of his new operating system.Maybe it's just nostalgia, but SerenityOS looks great. As the big OSes integrate into opaque web services, the mental model of your PC has become too complex. In many ways it feels like usability is getting worse. SerenityOS is such a breath of fresh air.
Commuting with noise canceling ear buds, in my case AirPodPros, changes the experience entirely. Just putting them in transports you to a quiet, peaceful place. When you take them out and your eardrums get assaulted by the noisy world is when you realize, you can’t go back.
I've been blocked with Tanzawa development for a while as I mull how to simultaneously use Tanzawa to make my own unique site and let it be flexible enough for others without making them adapt to everything I do. If someone else is using Tanzawa to power their site, I want it to be an expression of them, not me.
I recently figured out the answer to allow this: plugins.
Inspired by @maique's Tanzawa Love post, I finally sat down and started working on what plugins might look like. Ideally a plugin should be able to customize or extend anything anywhere, but I'm starting small: adding things to public pages.
This is the first plugin: a widget to display the current localtime in the top nav.
I imagine the capabilities growing over time. I'd like to let plugins store and manage data (e.g. settings), let them schedule periodic work ( e.g. call this api every hour and do something ), and maybe even run background tasks. But for now they're simple. Thank you for the inspiration @maique!
At the office.
I'd donate to you for a theme decoupling. This is high on my list! :)I appreciate the sentiment 😃. It's not money that's preventing me, it's time.
I've been thinking about how to handle theming for Tanzawa properly. It's a big task, but not impossible. There's 2 different ways to think of theming: 1) css only changes theme support, 2) complete theme support (i.e. colors and layout). The move from css only changes wouldn't be much less work than allowing full customization.
Roughly here's what I think would be required:
- Extract all mentions of tailwind colors from templates/public (e.g. bg-negroni-700 ) and replace them with a common name – perhaps role based?
- Create a record / setting somewhere ( django-admin?) to track the active theme.
- Create a custom template loader (or other shim) that will prioritize rendering with the selected theme's public themes.
- Set Tanzawa to only include the css of the selected theme.
- Document how to make a custom theme.
Inspired by James, I'll chime in with the technology I use. Most of it is a few years old at best.
Computer SetupMy main computer is a mid-2014 15" Macbook Pro with a 2.8Ghz Intel i7 CPU, 16GB ram, and 512GB SSD hard drive. It got a fresh battery back in January so it should be good for another few more years.
I do feel the limits of it occasionally, but not often. As it's been a while since I've gotten a new computer, I am getting the urge to replace or augment it. If I replace it outright, it would probably be with another Mac, Thinkpad, or a Frame.work.
If I were to replace it with a desktop, it would probably be a used Mini PC coming off lease from some business. But since I mostly use my personal laptop from the kitchen table (not my home office), I'd need to remote into the desktop most of the time. But I'm not sure I'd do that.
Home ServerI have a 2012 MacMini with 16GB of ram acting as a home media server. I got it from my brother and the clips that hold the ram in are broken / missing (I have no idea how). So it's using a broken cd-r (as is how I received it) to create pressure to keep them in place.
This server also runs mac OS and is hooked up to my ScanSnap and a Drobo with 14TB of storage. Since it redundant, only half is actually usable. As is, it'ss fairly under-utilized with just Plex and iTunes. Maybe spending time on r/SelfHosting could improve that. If I were to get a new Mini computer, it would likely be replacing both my laptop and my home server.
Work SetupI've been working remotely / working from home for all but 2 years of the past decade. I've always kept my work setup separate from my home setup in that period. Currently my work computers are provided by my employer and they're generally the latest MacBookPro that's refreshed every 3 years.
- Keyboard: Happy Hacking Lite2 USB with a US layout
- Headphones: Airpods on mobile. Sony MDR7506 Professional Large Diaphragm at my desk.
- Mouse: Magic Trackpad and a random Microsoft Optical mouse
- Webcam/Microphone: Built in. (I really should upgrade this)
- Monitor: Dell U2720QM 27 inch 4K
- Operating System: macOS Catalina at home, BigSur at work. Ubuntu on my servers.
- Browsers: Firefox
- Terminal: Terminal.app / iTerm2
- Code Editor: PyCharm / emacs
- Music: Plex / YouTube
PhoneiPhone XR (Yellow, 64GB)
WatchApple Watch (Series 5)
I don't follow YCombinator investments (though I spend too much time on HN), but the first company on Demo Day is a company meant to increase production of oil & gas wells. The exact opposite of what we should be doing right now. Disappointing.