• 1 Post
  • 25 Comments
Joined 11 months ago
cake
Cake day: December 5th, 2023

help-circle


  • Thanks for the very thorough response! I will absolutely check this out. I would say I have a fair bit of experience in OO programming. A decent amount from JS and also a good bit from C#, which I dabbled in for a good while during my “I’m going to make a game in unity” phase haha.

    I know enough C++ to get myself in trouble, but it seems every time I have to use it I get super frustrated that things aren’t as simple as they are in other languages I’m familiar with. That, and I never seem to know the exact terminology to look up my particular issue (which is half the battle anyways).

    I actually needed to write a UDF in C for my mariadb instance just the other day. It ended up taking me several hours for something that would have taken me just minutes in JS or C#. It ended up being a pointer + memory allocation issue. Basically I wasn’t clearing the allocated memory and resetting the index between function calls. It also frustrates me to no end that I can’t just array.push() to add a new char to the end of a char array lol.

    I also wrote a VST with Juce in C++ a few years back. I got it working eventually, but God I remember it being an absolute nightmare.

    I guess really I have a hard time understanding when and why it’s even necessary to use pointers etc since that stuff has been abstracted away in the higher level languages I know. It seems like you could essentially get the same functionality by just knowing when things are passed by value vs passed by reference.


  • Piggybacking on this:

    I’ve been wanting to learn C++ as well. I am very experienced with JavaScript, and also am very fluent with Arduino. I’ve messed around with actual C++ before but I get lost with all the pointers, header files, and memory allocation stuff.

    Are there any resources y’all would recommend to someone who has all of the programming fundamentals, but wants to learn the specifics of C++?


  • I ended up just making my own helper container for authelia. It can generate a link that expires after a set time and only allows a set number of users to access. Then I can just give the link to whoever I want to join and they can fill in their own username and pwd. It then adds them to the authelia user db with the correct groups and PW hashing. Only issue is I have to manually restart authelia for the changes to take effect. Eventually I want to see if I can automate that.

    I’m still working on editing the configuration through the app though. I want to be able to change the access control rules, etc.

    As far as having the services behind authelia automatically detect and login the user, that will depend on the service, but authelia does pass user credentials and login status in the request headers. Many of the services I host were created myself, so it’s pretty trivial to have it automatically “log in” from the authelia sign on.



  • The only time I’ve ever really needed recursion is when I’m doing something that needs to map out some sort of tree or heavily nested object.

    One example that comes to mind is when I needed a function that acts like querySelector, but also searches through shadowroots. Since querySelector does not natively search within shadowroots, I had to write a recursive function that basically starts at the root and recursively searches each node for a shadowdom, goes inside, and runs itself again.

    It’s definitely not the most performant solution, but it is sometimes necessary.



  • I have been programming for years, and although I did minor in math, I can only think of 2 times that I have ever needed any math beyond that of highschool algebra. And those were very niche one-off situations. As others have stated, logic is much much more important, and a good understanding of Boolean logic will take you MUCH farther than any other math related discipline. But even still, logic is, well… logical if you just think about it. You really don’t need to take any courses on it.

    I think the main barrier for entry is that there are simply too many options and different paths to go down when beginning to learn. Also, there just aren’t too many really cool things you can do as a beginner that are truly interesting and will keep your attention. The typical “hello world” exercises are boring as hell and of course people aren’t going to keep being engaged when they’re bored.

    That’s why I usually recommend beginners who want to learn to start with an Arduino, regardless of what their final goal language is. Generally speaking, once you learn one language it’s pretty easy to learn others, as the foundational knowledge is mostly the same i.e. variables, loops, functions, etc.

    What I think is great about the Arduino is that your code produces a physical, tactile response. Usually one of the very first programs you write (which can be completed in probably 10 minutes by a beginner) is making an led flash something like “SOS”. This is leaps and bounds more interesting than something like “hello world” and will usually keep you interested and engaged much longer while learning the basics.

    I started on an Arduino many years back after stumbling upon a Paul McWhorter lesson randomly on Reddit. After becoming pretty proficient with an Arduino, I transitioned over to JavaScript and started learning web development, and I’m now a full time engineer.


  • So admittedly I’m fairly new to the world of self-hosting, but have been a web dev for a long time. My terminology may be way off here. I always sort of assumed that headless meant that I’m running a version of Linux that does not have a desktop UI (Ubuntu server specifically).

    If I added a PiKVM, would I suddenly get a desktop UI, or would it still be command-line only?



  • As ikidd mentioned, definitely speed and access. It’s just a react web-app. There’s no VM required, and it’s not streaming a video capture of a desktop. I’m actually amazed at how performant it is. It loads almost instantly and feels like a regular desktop, even on mobile.

    Even with all the windows open in the screenshot and streaming a transcoded video, it still uses less memory than a single open YouTube tab.


  • One of the main reasons I ended up building a home server was that one of my drives failed in my main PC, and I lost a lot of my data (I know, I know). When I built my server, I intended it to be used as a backup. I was able to recover most of my data, but a lot of the filenames and directory structure were lost. I ended up just dumping all of this onto my server.

    I wanted a way to go through all my recovered files and organize them. I needed to be able to play any unnamed music files and name them + put them in the appropriate directory. I also produce music so some of the files couldn’t just be re-downloaded. Similarly with any text/video/pictures/etc.

    I’m running Ubuntu server and I can’t watch videos or listen to audio via a shell, so I needed a front end. I initially tried file browser but it was slow and clunky, and I couldn’t have multiple directories open at once for dragging and dropping.


  • Thanks!

    I tried nextcloud initially. It seemed a bit bulky and slow for me, with a lot of extra stuff I wasn’t going to use. I know you can disable features and customize it, but it just wasnt really a good fit for me.

    This initially started as an exercise to find out what is possible and see what I could manage to do by myself. As I progressed, I started realizing the possibilities and am so far very happy with how it’s turning out.

    I honestly didn’t realize there were so many existing alternatives (orb, ArozOS, etc). However, this is built entirely in react and can therefore load and run any JavaScript/HTML easily as a plugin. I think it’s a bit more modular than the alternatives in that sense.

    Either way it’s been a fun project to work on, and it fits my needs exactly how I want.

    After seeing all the responses I’ll very likely make it all open source so maybe others can contribute and customize it for themselves. Although I am a bit shy to release my code to public scrutiny lol 😂. I have a bad habit of not leaving comments and I’m sure there are plenty of places where people will point out flaws and wonder why the hell I did x instead of y…



  • Thanks!

    Another reason for the project was that I too wanted a desktop experience while also being being able to access remotely. I just didn’t want to open any “scary” ports on my server lol. I can throw this whole thing behind 2fa and it’s still completely isolated in a docker container, thus it has as much or as little privilege as I want.

    I actually can ssh into my main server through this, if desired, without opening any ssh ports publicly.





  • Link doesn’t work for me, but I’m starting to see what you mean.

    Either way, this has been a fun project to work on and I’ve only been working on it since around October, so not like years of commitment or anything. I’ve learned a lot, even having been programming professionally for years, so overall I’d say it’s been a worthwhile venture, especially considering I originally was only building this for myself.