Readit News logoReadit News
mufasachan commented on Replacing Kubernetes with systemd (2024)   blog.yaakov.online/replac... · Posted by u/birdculture
kaylynb · 8 months ago
I've run my homelab with podman-systemd (quadlet) for awhile and every time I investigate a new k8s variant it just isn't worth the extra hassle. As part of my ancient Ansible playbook I just pre-pull images and drop unit files in the right place.

I even run my entire Voron 3D printer stack with podman-systemd so I can update and rollback all the components at once, although I'm looking at switching to mkosi and systemd-sysupdate and just update/rollback the entire disk image at once.

The main issues are: 1. A lot of people just distribute docker-compose files, so you have to convert it to systemd units. 2. A lot of docker images have a variety of complexities around user/privilege setup that you don't need with podman. Sometimes you need to do annoying userns idmapping, especially if a container refuses to run as root and/or switches to another user.

Overall, though, it's way less complicated than any k8s (or k8s variant) setup. It's also nice to have everything integrated into systemd and journald instead of being split in two places.

mufasachan · 8 months ago
Same experience, my workflow is to run the container from a podman run command, check it runs correctly, podlet to create a base container file, edit the container file (notably with volume and networks in other quadet file) and done (theorically).

I believe the podman-compose project is still actively maintened and could be a nice alternative for docker-compose. But the podman's interface with systemd is so enjoyable.

mufasachan commented on Stop Writing `__init__` Methods   blog.glyph.im/2025/04/sto... · Posted by u/todsacerdoti
mufasachan · 8 months ago
I appreciate the motivation of the author but the examples of this blog do not convince me at all. For every situation, there would be an alternative (with init or not) that addresses the design issues. The first example is solved with namedtuple[1] which is not a recent feature. Then the rest of article is about IO. Although, the special methods for the context managment interface and the std lib for context managment (which do a great job at async btw) are not mentioned.

__init__ in Python already has a lot of alternatives. IMO a situation encountered similar to the example is when you do not take advantages of the alternatives or your code design is bad.

Also, specifically for this case, if I need an object for this IO operation, I __would not__ uses dataclass. The first solution would be to create a context manager[2] and a NamedTuple (or dataclass if needs some mutations). If it's not a fit, the classmethod and the dunders __enter__, __exit __ are good if this fd implementation is important for the design of my object. Alternatively, I would just make a builder function outside my object if the implementation of the fd capability should be considered as extra and not a builtin for the object. The dataclass decorator could be added to save 1 line of code but would confuse the intent of the object which is a content manager with some state management.

A side geniune question, why not a type[3] statement to alias the int as a fd? What is the difference with using NewType[3]? In which situation creating a NewType from a base type - here int - is useful?

[1]: https://docs.python.org/3/library/collections.html#collectio... [2]: https://docs.python.org/3/library/contextlib.html#contextlib... [3]: https://docs.python.org/3/reference/simple_stmts.html#type [4]: https://docs.python.org/3/library/typing.html#typing.NewType

mufasachan commented on A year of uv: pros, cons, and should you migrate   bitecode.dev/p/a-year-of-... · Posted by u/bertdb
oefrha · 10 months ago
Oh I'm not saying conda is a good solution for all ML/scientific. I was making the assertion that it's terrible for basically everything else.
mufasachan · 10 months ago
My bad! As you said, this part of Python code bases is chaotic (:
mufasachan commented on A year of uv: pros, cons, and should you migrate   bitecode.dev/p/a-year-of-... · Posted by u/bertdb
oefrha · 10 months ago
Conda is the dreaded solution to the dreadful ML/scientific Python works-on-my-computer dependency spaghetti projects. One has to be crazy to suggest it for anything else.

uv hardly occupies the same problem space. It elevates DX with disciplined projects to new heights, but still falls short with undisciplined projects with tons of undeclared/poorly declared external dependencies, often transitive — commonly seen in ML (now AI) and scientific computing. Not its fault of course. I was pulling my hair out with one such project the other day, and uv didn’t help that much beyond being a turbo-charged pip and pyenv.

mufasachan · 10 months ago
Eh, ML/scientific Python is large and not homogeneous. For code that should work on cluster, I would lean towards a Docker/container solution. For simpler dependancy use cases, pyenv/venv duo is alright. For some specific lib that have a conda package, it might be better to use conda, _might be_.

One illustration is the CUDA toolkit with torch install on conda. If you need a basic setup, it would work (and takes age). But if you need some other specific tools in the suite, or need it to be more lightweight for whatever reason then good luck.

btw, I do not see much interest in uv. pyenv/pip/venv/hatch are simple enough to me. No need for another layer of abstraction between my machine and my env. I will still keep an eye on uv.

mufasachan commented on The Tensor Cookbook (2024)   tensorcookbook.com/... · Posted by u/t55
mufasachan · a year ago
I do not know the people's background of a lot of comments here. They might have much more experiences than me with tensors. But, in my deep learning code and works, when I need to design an operation that involves a mix as little as 3 tensors with 4+ dimensions, I always struggle. I need to draft some slices to understand which slice should be contracted etc.. Many times the shape of the output is not even clear in my mind. Plus, add some padding maskS on the tensors and it confuses me quite a lot. I really like this notation, the last example of 1.1 is readable in its sum formulation, but the diagram formulation is much more "alive" in my mind.

I am really lost here if I have missed something about indices notations with tensors or some visualization techniques. Or maybe the confusion of a tensor operation depends of the field? Or maybe I just miss practices and experiences with indices notations...

mufasachan commented on I still like Sublime Text   ohdoylerules.com/workflow... · Posted by u/james2doyle
tcoff91 · a year ago
LSP and formatter were really fast to set up. I used kickstart.nvim to get started and lsp and formatter are already mostly configured.

DAP is trickier to set up but is doable. How often are you really debugging though? In the beginning just run both neovim and your ide and just switch when you debug.

Back when LSP wasn’t a thing I still used vim but would just switch to an IDE when I needed to go code exploring and needed to be able to jump to definition and stuff like that. Wasn’t a big deal and was worth it to use both tools because vim is such a superior method for editing text.

mufasachan · a year ago
Thank you for your answer. Some code base have chaotic execution path through a monolithic code base (by design). So, for these code bases, I heavily rely on the debugger. But I like your suggestion to use both of them, I think it's a good way to transition slowly and efficiently.
mufasachan commented on I still like Sublime Text   ohdoylerules.com/workflow... · Posted by u/james2doyle
diggan · a year ago
> Did you face similar issues?

I don't remember what exact year I did the transition at, but around 2014 - 2016 I think. At the time I was working on a PHP Symfony application (and its frontend made with Backbone.js) powering Typeform, and I think this was right about when docker entered the scene, we were still using Vagrant with what I think was NFS syncing or something else dog-slow. But both Docker and Vagrant works fine with vim, as long as you have a generic VM/container setup, it shouldn't matter what editor you use, in my mind.

But before that I was using Sublime Text 2, with minimal plugins/extensions, so moving to vim was mostly getting used to moving around and manipulating text, using some very basic text-based autocomplete, before eventually migrating to a "proper" setup years later. Since then, I honestly haven't touched my config much, so I'm sure there are smoother/better ways now.

Since then, I've used (neo)vim to write JavaScript (+HTML+CSS), Ruby, Go, Python, Rust, various other languages, but mostly Clojure/Script. When trying out a new language, I find some (neo)vim plugin that seems suitable and try it out. If it works well, great, otherwise try another one.

mufasachan · a year ago
Thanks for sharing your experience!
mufasachan commented on I still like Sublime Text   ohdoylerules.com/workflow... · Posted by u/james2doyle
diggan · a year ago
> Emacs and Neovim are things one gets into in ones free time and gets good enough to make the switch at some point at the job.

I'd probably never end up proficient with vim (and today neovim) if I didn't do the complete opposite of this and forced myself to use it for real work directly. True, I went a bit slower for one/two weeks, but if you really have to use something foreign for most of your work, you'll learn it really quickly, as long as you're up for looking things up as you go along. Of course, YMMV and all that yadda yadda.

mufasachan · a year ago
I would be curious to know how you managed to do this. I really tried to do this but the tons of dev tools I am using was too much for transitioning to neovim for my daily work. Namely, I need a DAP, multiple dev tools (lsps, linters, formatters) because I work with several projects which do not have the same tools[^1]. Luckily, I do not mix multiple programming languages. Plus, I containerize all my dev env. There might be some elements missing, but the point is the number of tools is overwhelming and it makes me think that I should do the whole configuration/setup on my free time.

Did you face similar issues? If yes, how did you solve them? Or maybe your work does not need that much tools? Or you have been more minimalistic than me for the number of features to be included in the neovim configuration?

[1]: I work in R&D, I need to tweak and contribute in many papers code or different toolboxes/frameworks on top of the team projects.

mufasachan commented on DeepSeek R1 just dropped – but don't ask it about Tiananmen Square   sherwood.news/tech/a-free... · Posted by u/helloplanets
jmward01 · a year ago
I vaguely remember something similar when querying google's gemini models about yt-dl. We need a diverse ecosystem quickly to combat this.
mufasachan · a year ago
fair comparison: tiananmen square versus yt-dl. Hilarious.

(I 100% agree with you, just your comment gave me a funny smile. The comparison is relevant.)

mufasachan commented on Nvidia Project Digits – Nvidia Workstation   nvidia.com/en-us/project-... · Posted by u/mufasachan
gnabgib · a year ago
Discusion (604 points, 2 days ago, 481 comments) https://news.ycombinator.com/item?id=42619139
mufasachan · a year ago
Thanks, my bad.

u/mufasachan

KarmaCake day18April 25, 2023View Original