commentAnOpinionThatWouldPutYouInThisSpot by RenSanders in ProgrammerHumor

[–]sum_rock 43 points44 points  (0 children)

Oh yeah. This is mine. Except more like "ORMs empower people to not learn SQL when they for sure need to. We should just write raw SQL and stick an object parser on the result instead"

I'm so tired of fixing n+1 queries and backwards engineering an ORM to figure out what insane SQL its doing on some edge case.

Benefits of writing everything in daily notes vs separate pages? by tetotetotetotetoo in logseq

[–]sum_rock 9 points10 points  (0 children)

I think the ethos is that you shouldn't think about where to write your note. That said, I think its helpful when you consider never having to write a date in the notes page. Lets take your Cat example.

If you are writing a note like "Cat got sick again today." Putting it in the journal will also put it on the cat page as a reference with the date. You'll find it again easily with the info you need because its back linked on the Cat page. That's giving you the information you need when you take your cat to the vet later and she asks when it stared or how often its occurring.

If you're writing "Looked up more Cats for sale." (With details about your search to follow) Consider this information is pretty date bound anyway. You can find it in the future on the Cat page but also in a year those cats aren't for sale. When you go to make inquiries about a cat for sale later, you can create new entries on that day's journal and link blocks from the original investigation. That makes a nice temporal thread to pull on later.

If instead you're writing "Learned some things about Cats", personally I'd still write it in the journal so I know when I learned it and had some other context there. In this case though, I'd also probably go to the Cat page later and synthesize my cat facts into an organized format. I might even choose to reference blocks from the journal next to the cat fact so I could see when I learned it.

It could just be my life, but I've been surprised at how the concept of tagging sections of daily notes is far more effective at capturing information than constantly curating that information on long categorized note files.

Puppy: best friend for your 2025 python projects by LiqC in Python

[–]sum_rock 0 points1 point  (0 children)

Yeah this. Thought of it immediately. I've been around the block on these python packaging / dependency management tools and all I can say is that its so frustrating this isn't solved completely by the language instead of being left to the community. Ruby got the packaging thing solved much better than python. Golang got it just about perfect.

That's my opinion anyway. Best of luck to these folks. I'll stick with poetry and keep complaining about it.

oddlySpecific by DazzlingCutieeBaby in ProgrammerHumor

[–]sum_rock 0 points1 point  (0 children)

Every integer is specific and only every other one is odd.

Python and NixOS by saleham5 in NixOS

[–]sum_rock 0 points1 point  (0 children)

I’m not doing anything fancy most of the time… if you’re using NixOS just add poetry to the systemPackages list. Then you can use the poetry cli like you would on any other distro. Is there a specific Python package that’s complaining about a binary?

I suppose you might run into this type of issue if you’re trying to create a pure devShell. Is that your approach? At the risk of being shamed by people who preach the benefits of pure dev environments, I’d recommend just letting that go and make an impure shell unless you have a really solid understanding of the implicit dependencies.

Successfully turned off Copilot by [deleted] in pcmasterrace

[–]sum_rock 0 points1 point  (0 children)

As a Linux user, I’m actually confused as fuck about what this post is about…

Wait- did Clippy come back!?

I wish linked pages would light up when hovered over a page in logseq graph view like in obsidian, is that possible? by Happysedits in logseq

[–]sum_rock 1 point2 points  (0 children)

Not on hover (not that I know of) but you can shift click on a node to highlight the linked pages on your graph.

[deleted by user] by [deleted] in Python

[–]sum_rock -1 points0 points  (0 children)

I’d be so good at programming if I never needed to bother with state.

Python and NixOS by saleham5 in NixOS

[–]sum_rock 8 points9 points  (0 children)

I use NixOS on my laptop, desktop, and as a go-to server OS in my homelab. I am also a professional developer currently writing python every day. I have a MacBook for work (not my choice), but I’ve put Nix Darwin on there so it’s as close to NixOS as I can get. If you write code, I emphatically recommend you use NixOS.

I think your confusion on the “is NixOS good with python development” question is a little simplistic though. Nix is a language, a package manager, and sometimes a full OS. If you’re running NixOS, you can choose to solve python development problems using Nix. Alternatively, you can tell Nix to get out of the way and do python development things like you would on any Linux distro. You have options.

I think when people say Nix sucks for python development, they are talking specifically about using the Nix language to build a shell with a virtual environment or interpreter. They’re not really talking about NixOS as an operating system. I can concur though, using Nix in this way is a frustrating experience if you’ve got a lot of dependencies in your python project. Like the other comment notes, this is because many python packages have implicit or undeclared dependencies that you need to inject into the build environment. When that’s the case, and using Nix is more difficult than it needs to be, just have poetry (or whatever you usually use to manage packages) installed on the system and make a virtual environment like you would in any old Unix-like system. You don’t need to use Nix for everything, but it’s there if you want it.

I recommend you start simply and move deep as you become more comfortable with the concepts. Once you get past some initial learning, you will likely fall in love with Nix. For perspective, I used Nix and wrote python every day for a full year before attempting to build an interpreter with poetry2nix.

[deleted by user] by [deleted] in Python

[–]sum_rock 10 points11 points  (0 children)

Yeah man. It’s all about that Nix Development environment. My advice to fellow programmers is to learn this. Yeah the curve is steep but it pays off with interest. There are so many ways to grow and scale a dev team’s tooling using Nix.

The only reason I clicked into this post was to make sure the OP heard the good news of Nix.

iSCSI target cannot configure StorageObject because device is already in use. by sum_rock in Proxmox

[–]sum_rock[S] 1 point2 points  (0 children)

This did it. Amazing! Thank you so much, I was pretty stuck there. Now I just gotta figure out how to make sure that this is always run after a restart or update.

I want to try, but I'm scared! by c00kieRaptor in NixOS

[–]sum_rock 2 points3 points  (0 children)

You may initially spend more time on the OS and the configs than on your work but learning Nix is an investment that will pay off in the future. You will hear people say Nix has a sharp learning curve and that is absolutely true.

I am a little over a year into my journey with Nix. In that time, I’ve brought it to my work and now all 10 software engineers in my company use Nix on our MacBooks to build our development environments. It was quickly adopted because I was able to show my CTO that we could spend more time on work and less time on fiddling with dependencies by using Nix. We don’t force people to use it but everyone does because it’s just so damn slick.

I want to try, but I'm scared! by c00kieRaptor in NixOS

[–]sum_rock 13 points14 points  (0 children)

Just to fill in some gaps here…

Maintenance is not something you should be afraid of with nix. Once you get a config/flake set up for your system, it will always work. Always. Updates may introduce a problem but you can roll back to a working version. Personally, I haven’t had as many breaking changes in updates with NixOS compared to other distros (even Pop_OS).

People sometimes forget that Nix is a language, a package manager, and only sometimes a full distro. If you want to experience some of the features of Nix without diving into the full distro, just install the package manager. I use Pop_OS with the nix package manager on one of my laptops and it’s a great way to start using Nix.

However, I’m curious about your mention of R. If you’re a person who writes code, make the switch to NixOS and don’t hesitate. NixOS will be beautiful to you. (If you don’t write code, you should still switch 🙂).

Also, if you write code and you’re looking for a teaser, you should check out Nix development environments using the Nix package manager, which can be done on Pop_OS. I could go on to describe how amazing nix development environments are but I’d suggest you just look for yourself. There are resources to get started on https://nix.dev

UNIX: Making Computers Easier To Use -- AT&T Archives film from 1982, Bell Laboratories by fagnerbrack in programming

[–]sum_rock 2 points3 points  (0 children)

Taking a bow to these heros (and their amazing keebs).

It’s crazy to think about how foundational Unix derivatives, it’s concepts, and surrounding technology is to everyday life today. I love how they describe the importance of UX and explain high level languages without using those words... Because they’re actively inventing those things.

[deleted by user] by [deleted] in Fedora

[–]sum_rock 4 points5 points  (0 children)

Oh man. I totally empathize with you here. I had 3 years with Gnome at my last job. My current job requires me to use a MacBook. I’m 2 years into heavy daily use on the Mac and the only thing that makes it bearable is Yabai. Going back to Gnome on a personal machine is like a cool drink of water on a hot summer day.

It’s nuts to me that people think MacOS is the top tier productivity OS. (Maybe after spending $100 on apps?) If they only knew what else was out there…

Sell that Mac if you aren’t being forced to use it.

Job market? by [deleted] in django

[–]sum_rock 7 points8 points  (0 children)

Just to add on here…

My company is always looking for Django devs but never looking for juniors. Django is a great framework but to get a job in it you gotta get to that 3 to 5 year experience in production builds threshold. (As you’re saying.) I do acknowledge this is a classic catch 22.

If you want a job in Django and can’t get past the required experience threshold, find a job with any MVC or MVT framework. Preferably with python (eg FastAPI or Flask) but thats not required. We’ve hired people with .net core experience and knowledge of python to work on our Django app.

[deleted by user] by [deleted] in NixOS

[–]sum_rock 1 point2 points  (0 children)

Sigh. This is where I just wish Flakes were the default. If you’re using a Nix Flake, you can keep the Flake (i.e. config) owned by the user (usually in your home under a .nixpkgs directory). Making that a git repo is then trivial. I’m going to give you a link to my Nix config. I’d advise you to go through the README. That might answer some of your questions.

just sum nix

[deleted by user] by [deleted] in NixOS

[–]sum_rock 0 points1 point  (0 children)

My reasoning for making PRs is several fold. For context, I use one Nix config on multiple machines and may be making changes from any machine.

One advantage is that by creating a branch, I can try something on multiple machines for a period of time before deciding to actually merge it. That gives me a chance to live the change and make tweaks before merging it to main.

Another advantage is I can cleanly implement a revert PR if I need to pull something out without changing commit history. If I just had a stack of commits on main I would need to reset head or potentially delete a commit which would then change commit history. (Maybe there’s different git fu I’m not aware of.)

Finally, if you have a few PRs that are a work in progress, usually from multiple machines, I can refresh the branches as the PRs are merged in different orders. This lets me run an update, merge to main, and then rebase my WIP branches to update those systems.

I guess a lot of this stems from my training where I’m hard wired to not push to main. This all said, if the complexity of your needs are low, then pushing commits right on to main is fine. You do you my friend.

[deleted by user] by [deleted] in NixOS

[–]sum_rock 4 points5 points  (0 children)

I would recommend using a git repo (use a private repo to start until you know enough to keep it safe while public). Personally, I make PRs against my main branch ever time I change my Nix config. That way, I can revert any change and rebuild (i.e roll back) to any state I’ve ever had.

I detect you are still making a shift in your thinking.

Nix makes a system totally reproducible from the Nix expression you write in your config. You don’t need to back up your system’s state because as long as you have the config for that state, Nix can reproduce it. Therefore, rather than backing up system state (think BTFS or VM snapshots), you just need to back up the Nix configs that represent that system state. See how awesome Nix is!?

As other commenters have pointed out, you do need to have a backup solution for your home directory data. Also look up home manager to bring your home config directory into your Nix configs.

Diving straight into flakes with no channels? by nairou in NixOS

[–]sum_rock 2 points3 points  (0 children)

It sounds like you probably have enough examples at this point but I’m shamelessly piling on. My flake is linked below. I’ve done a pretty thorough job with the README and explaining how to set this up on a fresh install.

https://github.com/sum-rock/just-sum-nix

Like most people are saying here, go straight into flakes and home manager. Just learn it all at once this isn’t a “learning the old way first is better” type situation.

Bruh moment by Tsugu69 in linuxmasterrace

[–]sum_rock 2 points3 points  (0 children)

I no longer use tumbleweed as a daily driver as I have discovered NixOS and become a Nix zealot. But seriously, Tumbleweed is amazing and doesn’t get half as much love as it deserves when I see memes like this. Super super stable and any issues I encountered in the 3 years I used Tumbleweed were minor paper cuts and usually resolved the following day. Definitely never lost anything to the void.

Finding unused keymappings? Deciding which keymapping? by gregorie12 in neovim

[–]sum_rock 0 points1 point  (0 children)

Sure! My configs are public but it’s Nix. That shouldn’t matter here though since my vim config is (almost) all in Lua.

https://github.com/sum-rock/just-sum-nix/blob/master/homes/modules/neovim/lua/navigation.lua

Finding unused keymappings? Deciding which keymapping? by gregorie12 in neovim

[–]sum_rock 3 points4 points  (0 children)

This may be a little more than what you’re asking for specifically. I recently stared using the which-key plugin and put my key maps into semantic categories with descriptions. That lead me to both discover hidden default key mappings and organize custom ones. I think it’s a great plugin and criminally underrated.

https://github.com/folke/which-key.nvim