c0de517e's journal
log_002

logo: back home toot
- Raspberry Pi home config.
- Be honest with yourself.
- The rise of the console-indie.
- All political discourse is populist.
- Tidying up
[Previous log file]

- Raspberry Pi home config. (permalink)

I think I just lost my wsl2 machine learning configuration (I wanted to post a journal entry for it exactly so I wouldn't end up here... oh well), so I guess it's a good time to at least "save" my rPI setup as of today.

I actually wrote most of the following in /etc/motd, so it was easy to retrieve. It's running on a rPI 3, I also have a 4 but it is just automating some downloads at work, unfortunately to migrate I needed to re-do all the setup and there is no good reason for me to do that right now.

The rPI started as a way for me as a personal file store, only for files I don't mind losing nor for them to become public, I'm far from a sysadmin. In the end it effectively failed at that (I use the rPI for other things now), but I still occasionally use the FTP and it helps to keep my dropbox light.

- SMB, FTP (vsftpd) - the latter exposed to the internet (open ports in my router)
-- FTP and SMB serve the same files. As SMB by default is "global" while FTP is per-user this required mounting the SSD also to the user's home - and some permission trickery.
-- External SSD configured w/TRIM - in the end I gave up on exfat (SMB issues), it's using ext4. I wanted exfat originally because I planned to be able to easily unplug the SSD and connect it to laptops, but in practice I never do that anyways so... who cares.
-- I also have an http server (lighttpd), and TBH if I were to redo it all, I would settle on FTP and HTTP access to the same directory, ignore SMB. I know there are systems that can give you a self-hosted dropbox alternative, but they are all big, bloated, ugly - I looked quite a bit at what is out there, found nothing I want to run, learn how to setup etc.

SMB was needed because on OSX the native FTP connection is read-only. In the end, native SMB is so bad that I don't use that either, so I could kill that and make my setup easier next time. I now use filezilla or winscp, and on iOS there is a FTP browser that is actually free & brilliant: FTPManager.

- I use duckdns to post the dynamic IP to DNS, so I can access everything over the internet.

- SSH is also exposed to the internet, for obvious reasons, I only changed the default port via my router for a pretend thin veil of extra safety.
-- I installed fail2ban for some degree of "security" - had to configure it for nftables as raspbian uses that and in the end it's doing... something, I'm not sure I got it 100% right, but can't hurt
-- Can be used from VS Code via the "remote SSH" extension! This is KEY! It's a game changer as it allows me to develop remotely just as it was a local install, and I keep all my website/blog stuff there. Posting on my blog involves logging into my home rPi and triggering some scripts.

The rPI is also helping my home wifi to some degree, namely:

- Pi-Hole! DNS and DHCP (to force all devices to use the DNS...)
-- My router's DHCP is DISABLED!
-- This is currently the only service I use for the home. I also have a rPI camera module so in theory I can trigger it, but in practice I never use that.

I also did a few things that I don't actually know if they are that useful or not... but are part of good rPI practices it seems:

- Log2Ram is installed to reduce the write load on the SD card
-- Had to ensure logrotate and journald were set to reduce the size of the logs...
-- Forced systemd-journald to write log to memory, reducing SD writes (check w/sudo glances)
- Also disabled the swapfile, added noatime and commit=900 to fstab / mount
-- Made the system fsck at boot the / partition (via tune2fs)

I guess I could/should perhaps just redirect all of these things to the SSD, but I don't know how wise that would be either, as logs are quite a fundamental part of linux and the SSD is an external device that in theory could have its own issues etc. Not that it ever caused me grief, but neither the microSD card I'm using has... The entire system is so low-traffic, I dunno. Also rPI 5 supports proper SSDs on board so this is not even a concern for the future...

- A backup is scheduled via crontab and https://github.com/lzkelley/bkup_rpimage
- Should perform updates automatically (via unattended-upgrades), so far this seems to be working correctly too...
- The entire setup is console only (no x11 etc, I think I achived this by removing one of the core x11 libraries and from there all dependents)
- Also removed avahi-daemon, could remove bluetooth and wifi but did not bother...
- Setup only for a single user so far, did not bother to create anything by my own admin user...

I could send logs to Logz.io (free plan, rsyslog) - but did not, it is an interesting option. Could enable the hw watchdog to reboot if it detects a crash, but I never needed that so far.

- Some packages I added:
-- mc, micro, tmux, tldr, smartmontools, weechat, googler, glances, nnn, exa, ag, fd, http
-- youtube-dl, yt-dlp (via pip3), bsdgames
-- tmux commands: new, ls, a(ttach) ... Ctrl+b d = detach!

VScode + piHole make this setup really useful for me. But in all honesty, if I were to upgrade it in the future, I'd probably move away from the rPI and use a small x64-computer-on-a-stick instead or even a mini PC. The rPI is still not really a good solution for anything in particular in my life, I just happened to have one lying around and now, after many many years, it finally found a way to make itself useful :)
Sat, 22 Jun 2024 12:22:40 -0700


- Be honest with yourself. (permalink)

It's ok to reinvent the wheel. It's ok to love the act of programming for programming's sake. It's great to learn new stuff. But try to be honest with yourself, I promise, it will help you.

Most people I see writing small custom engines (and you can replace "engine" with anything else) try to rationalize their choices as ones of utility.

It's said that superstition is born out of our brain's need to find causal relationships, which biases us towards inventing fantasy when we can't find obvious ones.
In a similar vein, I think engineers' brains are wired towards the delusion of being able to find optimal solutions to their problems, i.e. to be purely rational machines, and so when we tend to live in the illusion that what we do always, objectively, matters.

It's ok to have fun! It's ok to even have mindless fun, it's definitely ok to learn, to have hobbies and so on. And if you admit to yourself that perhaps that you are reinventing the wheel because you like it, not because it is going to save the world, it has a few added bonuses:
1) You might be less depressed, as you have aligned your expected outcomes to the reality of things 2) You might understand what you really like. Maybe you never wanted to make a game, maybe you enjoy building tools, or maybe you just want to learn something new.
3) You might dedicate the right amount of effort to the task, both in the sense of not consuming too much time if you end up honestly evaluating that you should not, and in the sense of spending the time you decide to allocate in a guilt-free way.

I started writing this entry after stumbling upon https://legendofworlds.com/blog/4 - I read webgpu, wasm, multithreading, rust, ecs... while seeing screenshots of a something 2d-zelda like and my blood levels of grumpiness immediately raised - but I don't intend to point fingers, in fact the opposite!
Bless people who want to reinvent the world, and tinker with tech. I do it myself, and I don't even pretend to be able to always know where I am in between false rationalizations and real ability to assess the right amount of energy to put into something based on my objectives, knowledge, and areas of productivity.

But being aware is half of the battle. And forgiving yourself is one of the secrets to a happy life. I like pens, not because they make me a better writer. I collect cameras, not because they make me a better photographer (in fact, the more cameras, the worse you are going to be). I fix old computers that I know I won't really use. And yes, I even write code at times just because I like it. And it's ok.

p.s.
Years ago Leonard Ritter / Paniq blocked me over similar suggestions that his game (that I was backing) would never ship, and that he might find more happiness in making a Patreon as everyone would just love to follow his crazy experiments regardless.
Still today, I don't think I was wrong, but I know it was not kind - and I wish to apologize. Making games is hard, nobody needs people criticizing you when you are already doing one of the hardest things.
Mon, 17 Jun 2024 12:22:40 -0700


- The rise of the console-indie. (permalink)

It's interesting how engine-wars go. During the ps3 era, Unreal managed to edge out the competition by being among the first engines you can license that aggressively targeted the console market (and probably helped by how hard ps3 development was, especially initially).

Then the age of Unity came - AAA developers consolidated more and more in a few big studios/publishers who could afford to create ad-hoc technology for their titles, eliminating the need of licensing engines. Unity was first to understand the importance of new markets, of "3d for everyone", indies, mobile and so on...

For the longest time I thought that was it. Commercial engines make sense only at the "bottom end", where creatives are plentiful but small. And that the winner overall would not be about the engine, but the whole ecosystem i.e. cloud services.

Epic was safe, in this scenario, due to its pivot to the metaverse, fueled by Fortnite, i.e. reaching out for the next obvious step towards expanding the availability of the real-time 3d media to a broad base of creators. UGC et al.

But now, looking at the xbox showcase, at the sony showcase... most games are on Unreal 5! This is quite impressive, I don't know how much it matters in monetary terms, but this generation of console is much friendlier to indie/AA, in fact, most of the spotlight is on them, even more so than when xbox invented xbla! We reached a point where there are only a handful of megaproductions, the gigantic blockbusters, and so most of games on offer on console are... not that, numerically.

Interesting.
Fri, 14 Jun 2024 14:01:25 -0700


- All political discourse is populist. (permalink)

One thing that I ponder sometimes is the role of the person of culture. What to do once you have enough knowledge to understand the nuance of the world - the basic fact that no complex problem has simple solutions?
On HN, one of the most hotly debated subjects is the housing/crime/drug crisis, surely because most of that audience lives in the bay area and other affluent bigtech cities, that inevitably trend all towards the same problems.

And you always see the same camps. The "crime is bad mmkay", people who offer their sympathy to the neglected, but not at any personal expense, and the ones who justify any action in what they perceive as a fundamentally unjust society. Then lots of "debate" ensues - in quotes, because in the end, there is no real difference.
Everyone falls for the same basic instincts - solutions that are simple, painless, and do not involve them. It's the 1% problem, just prohibit ownership of houses for investment, just build more and so on and so forth.
As the economy is not a connected affair. As any action that causes houses to lose value wouldn't affect everyone. As landlords are making extraordinary ROI over their properties. As, fundamentally, is not a proven mathematical fact that higher wealth causes larger disparities.
But maybe we'll solve society with an app, or AI, or bitcoins. Democratize bullshit.

Social media, "the algorithm", likes et al - make populism faster, make it the only option to have reach, as nobody clicks like on nuanced opinions. But it has always been there, it is a byproduct of democracy, it is why politicians have to lie, even beyond the inevitable compromises that are necessary once you do not receive 100% of the votes.

This is a mad ramble - and it doesn't really matter, the specifics above were just an example. The wider problem, the meta, I haven't resolved in myself yet, is what to do. Once you know enough of the world to see the bullshit in either side of populist arguments. While at the same time, in the good old Machiavellian sense, you also are aware of the inevitability - no - the necessity of such arguments.
I doubt any inch of social progress has been attained on the basis of pure rationality. You need the passion, the youth, to move forward, even stumbling in idiotic arguments along the way. At the same time, it's impossible to partake, one can bite its tongue and not start pedantic arguments when the ends justify the means, but to enthusiastically espouse positions that one knows to be incorrect, only because of their inevitability - knowing they will be mediated down towards something reasonable (in the best case) or that anyways, society is always a messy affair - requires some kind of sociopathy I have not yet evolved into.

A conundrum. I'll let you know if I figure it out one day.
Sun, 9 Jun 2024 14:34:22 -0700


- Tidying up (permalink)

I have a few old PC laptops and many more emulators, of various systems on various systems. I wrote a bit about it here https://c0de517e.blogspot.com/2022/04/dos-nostalgia-on-using-modern-dos.html
Thing is, I don't end up using these things much. There is more pleasure in setting up things and researching and so on, than in the actual day to day usage.

I think this is a pretty common thing. At its worst it's a form of procrastination, where doing mundane tasks makes us feel productive even if our output is not different than scrolling cat videos on instagram.

Busy work.

But as a hobby, as a pastime, I think it's perfectly fine. Especially if one can resist consumerism - which is an unfortunate side effect. Setting up, researching stuff often leads to collectionism, "gear acquisition syndrome" is what photographers call it, where the cult of the object becomes a pursuit of its own, even if the objects themselves are not really enjoyed past their accumulation.

FWIW - I try to control that by self imposing some amount of usage before getting the next thing, by keeping lists of things I'd like - instead of buying them, and by selling stuff.

I wonder if there is some fancy German word to describe the pleasure of aimlessly tidying up.

Related: https://store.steampowered.com/app/1629520/A_Little_to_the_Left/
Wed, 5 Jun 2024 13:11:10 -0700


[Previous log file] [Home]