What’s a flatpak? Is that like a worse NixOS package?
NostraDavid
- 0 Posts
- 27 Comments
Uh, just yesterday. Installed NixOS (with KDE) because I learned Debian at work, but am really missing the ability to track what I’ve installed via configuration. I like the idea of dotfiles in a repo, but want a bit more control like that for my OS.
Context: I’m a data engineer that writes Python. Python has
pyproject.toml
files (toml ~= ini files) where you can specify which libraries you want to use, defining which version you minimally, maximally, or just specifically want. And I wished that setup existed for Debian as well, but it doesn’t. So after searching I found that NixOS is pretty much the closest thing. Windows 10 is EOL soon enough, so might as well switch beforehand and not wait until the last second.
(Seriously what would you even have multiple computers do.)
Setup k3s (pronounces “kubes”) on each computer as a node. Run scalable software - a website, database, some LDAP setup for users, maybe.
Check out /c/selfhosted@lemmy.world for inspiration :D
NostraDavid@programming.devto TenForward: Where Every Vulcan Knows Your Name@lemmy.world•Klingons stan Trans rights220·1 month agoNeither Curzon or Jadzia needed to fly an ugly flag to be themselves :^)
NostraDavid@programming.devto Programming@programming.dev•Programming book recommendations?3·3 months ago“Have you read your SICP today?” still rings in my head, occasionally.
NostraDavid@programming.devto Programming@programming.dev•Programming book recommendations?4·3 months agoRefactoring
Once you know how to write code (in any language) it’s important to learn how to rewrite it (into something better)
Test-Driven Development with Python
Because manually stepping through your code is a PITA, so it’s better to put that process into code that you can save and re-run without thinking about it.
Head first java
Any of the Head First series are great introduction books. Head First Design Patterns is great to learn programming patterns that you can typically re-use in any language :D
Fundamentals of Software Architecture
Haven’t read this one, but learning about architecture is important so you can keep your UI, logic and data layers separate, so when you need to replace one layer (like the UI, because the boss wants a refresh), you don’t need to pull out all your hairs due to frustration!
Domain Driven Design
I don’t do DDD (at least not consciously), but understanding what a domain is really really important once you need to talk to business people (not something I like, but it’s necessary to write the right code).
Neuromancer
“The sky above the port was the color of television, tuned to a dead channel.” is such a banger of a first line. Outdated, because “dead channel” won’t make sense to younger kids, but I bet they’ll get a kick out of learning about how TVs used to be.
Do better.
Improve the world, start with yourself. You muppet.
NostraDavid@programming.devto Opensource@programming.dev•Monthly update on the FOSS "Ladybird" browser engine11·3 months agoDo you have a better description? I think “Cuck license” actually covers it very well: You build your bestest robotic waifu, when Intel-sama kicks in the door, and fucks her right in front of you, impregnating her, and then leaving and never coming back, leaving everyone a victim.
Because that’s effectively what happened to Andrew Tanenbaum’s Minix kernel (which was used by intel to enable the Intel Management chip, which has even more control over your machine than your own CPU). Had Tanenbaum used GPL, intel would’ve been legally forced to open source the code, enabling us users to see what’s actually running inside.
NostraDavid@programming.devto Programming@programming.dev•The Pain That is GitHub Actions - Feldera Blog1·4 months agoJenkins is neat if you use a shared repo. Yes, the functions are weird (a file is a function, and the function inside is named
call
.), but having a default list of*Pipeline.Jenksfile
(ingestionPipeline, modelPipeline, parserPipeline, dataProductPipeline, etc - data engineer here) is so nice. You can also specify which branch of that repo you are running as well!It’s less neat if you previously had to migrate off of a Jenkins that had everything running as root, to a Jenkins that doesn’t.
At least if you fix a bug for a function that’s used in multiple pipelines, it’s fixed everywhere. Or if you fix a bug in a single pipeline, it’s fixed for multiple repos.
edit: the Groovy language isn’t great though. Not being able to pass kwargs in my own order, unclear how to define the pipeline (somewhat lacking docs, grabbing working examples from SO). I wish something like Python would’ve been used instead.
You can see here my theme with autodetect of Python (I work a lot in Python). The orange bit is the error code returned by the previous command. Git is supported as well, and looks pretty much like
powerline-gitstatus
, as you’ll read about below.First, lets make Bash a little better:
# throw this in your `~/.bashrc`, and then `source ~/.bashrc` for it to take effect, or just restart your terminal. # == shopts == # https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html shopt -s autocd # cd into folder without cd, so 'dotfiles' will cd into the folder shopt -s cdspell # attempt spelling correcting on folders shopt -s direxpand # expand a partial dir name shopt -s checkjobs # stop shell from exit when there's jobs running shopt -s dirspell # attempt spelling correcting on folders shopt -s expand_aliases # aliases are expanded shopt -s histappend # append to the history file, don't overwrite it shopt -s histreedit # lets your re-edit old executed command shopt -s histverify # I'm confused. shopt -s hostcomplete # performs completion when a word contains an '@' shopt -s cmdhist # save multiple-line command in single history entry shopt -u lithist # multi-lines are saved with embedded newlines rather than semicolons; explictly unset shopt -s checkwinsize # update LINES and COLUMNS to fit output
Autocd is a big one here, cdspell and direxpand as well. Ensures I don’t need Zsh for the same experience. With Zsh I’d just get annoyed by small stuff like having to wrap things in quotes (I think
pip install some_lib[some_extra]
works in Bash, but not in Zsh And Ohmyzsh just felt it kept slowing things down, so I actually dislike Zsh ^(please don’t kill me) >_>Anyway, I based this on
powerline-status
+powerline-gitstatus
(if you want to use that instead (no, my config doesn’t work), justsudo apt install powerline-status powerline-gitstatus
- DO NOT USE THEPYPI
VERSION (it’s too outdated, and a pain to install)) because I had issues with finding the right combination of my configuration and which libraries to install for bash - there are too damn many: powerline-bash, powerline-status, powerline-rs, powerline-go, etc, etc. And they all do things just that little bit different.Anyway, here is my
~/.config/starship.toml
(archive1, archive2). It’s a little long, and can probably be shortered, but that might break something again, and I’m not willing to risk anything right now.https://gist.github.com/NostraDavid/675a0706716b98816fd2809560ffe42c
Also make sure it has a decent SSD
That means any SATA SSD that can pull 500MB/s. No need to try to stick an m.2 7000GB/s SSD into such a weak laptop. Not trying to poop on his hardware - just staying realistic for when you look for an SSD (presuming he does not already have one).
After 10 years, I still remember switching to an SSD from a classic HDD. Probably the biggest hardware upgrade I’ve ever done.
NostraDavid@programming.devto Linux@programming.dev•Linux or Landfill? End of Windows 10 Leaves PC Charities with Tough Choice1·4 months agoThe technical requirements for 11 were reasonable
My 8700k (from 2018) disagrees.
NostraDavid@programming.devto Programming@programming.dev•Does Visual Studio Rot the Mind?31·4 months agoHere’s a summarization of the summary (also done by AI, because lazy):
The author recalls his initial reluctance to speak publicly after a past misstep and later revisits the subject by examining how movies, such as 2001: A Space Odyssey and WarGames, dramatize computers. He contrasts these cinematic portrayals with the subtle influence of everyday technologies like email and PowerPoint, and criticizes modern development tools like Visual Studio and IntelliSense for potentially diminishing deep coding skills. Ultimately, he champions a return to fundamental programming to rediscover the pure joy of coding.
NostraDavid@programming.devto Linux@programming.dev•Linux System Performance Tuning: Optimizing CPU, Memory, and Disk4·4 months agoI just dug a little deeper. Looks like the site is 95% George Whittaker since April 2023, which is a month after GPT-4 was released.
The site literally turned into AI slop since then. Good job, Slashdot. /s
NostraDavid@programming.devto Programming@programming.dev•The power of interning: making a time series database 2000x smaller in Rust41·4 months agoFFS, you could just have run gzip on it probably.
Gzip doesn’t reduce your data’s size by 2000x. Of course this could be done by other languages as well, but running gzip on your data doesn’t keep it accessible.
Even turning the data into a Parquet file would’ve been a massive improvement, while keeping it accessible, but it likely would not have been 2000x smaller. 10x, maybe.
edit: zip: about 10x; 7zip about 166x (from ~10GB to 60MB) - still not 2000x
NostraDavid@programming.devto Opensource@programming.dev•Monthly update on the FOSS "Ladybird" browser engine4·4 months agoWhat’s wrong with BSD?
NostraDavid@programming.devto Programming@programming.dev•Falsehoods programmers believe about languages2·4 months agoUntil you use exit codes, which flips the logic.
Multiple ones.
- Wave Function Collapse for an existing tileset (Warcraft 2) - it’s really hard to figure out how to build the data on whether a tile fits on a certain side of another tile. From the top of my head: Some 180 tiles total * 4 sides to compare * 180 options per side = 129_600 total checks I would need to do, which is just wayyy too much. Need to figure out how to reduce these checks (or automate them using OpenCV or something - not sure yet)
- Comparing dual datasets of people who worked on certain games (the games being all Warcraft games), so I can see who worked on Game A, who on Game B, and who on both. Am currently (manually) cleaning up the data, because Blizzard has been very inconsistent in how they structure their credits. At least WoW had everything available in HTML - having to manually copy over 600+ people would be no fun (per expansion).
- A cryptocoin predictor for my friends and I. One part ingestion from an API into a Postgres DB, one part Streamlit + some stats / data science stuff that I’m very much a beginner in. The platform we’re on doesn’t provide much predictive power. Using the typical Simple Moving Averages and the like simply doesn’t predict clearly enough, IMO.
Oh, and I’m also setting up a private ProxMox server, over at a friends house, and need to connect that to the NAS over at my house, so we can copy over our data for redundancy/backup purposes.
I’m bouncing between these projects.
How is Nifi? I’ve seen it pass by at work, as a generic ingestion application, but for most ingestions we’re using custom-written Python for better flexibility.
I’ve never worked with it, but it looked pretty daunting (as an initial view).
Having all your configuration hidden in
~/.config/
, so you can have~
all to yourself is nice, IMO. Just having a handful of folders (including hidden ones) makes things a little more readable.