This profile is from a federated server and may be incomplete. View on remote instance

Python is great, but stuff like this just drives me up the wall ( lemmy.world )

Explanation: Python is a programming language. Numpy is a library for python that makes it possible to run large computations much faster than in native python. In order to make that possible, it needs to keep its own set of data types that are different from python's native datatypes, which means you now have two different bool...

renzev OP ,

reasoning

What reasoning? I'm not trying to make any logical deductions here, I'm just expressing annoyance at a inevitable, but nevertheless cumbersome outcome of the interaction between numpy and mypy. I like python and I think mypy is a great tool, I wouldn't be using it otherwise.

renzev OP ,

Gradual typing isn't reinventing the wheel, it's a new paradigm. Statically typed code is easier to write and harder to debug. Dynamically typed code is harder to debug, but easier to write. With gradual typing, the idea is that you can first write dynamic code (easier to write), and then -- wait for it -- GRADUALLY turn it into static code by adding type hints (easier to debug). It separates the typing away from the writing, meaning that the programmer doesn't have to multitask as much. If you know what you're doing, mypy really does let you eat your cake and keep it too.

renzev ,
renzev ,

Jokes aside, LLMs are actually pretty nice, since they lower the barrier to entry for programming. A guy I know has been doing all of his data processing with obscure Excel hacks his entire life. But recently he had to parse a file with like a million or so lines, which would take forever in excel, so now he's hacking together a python script using ChatGPT and meta ai. And in the process, he's actually picking up a bit of python knowledge himself. He now knows what lists are, how loops and if statements work, and he even understands "intermediate" features like list comprehension and regex. They said llms would replace programmers, but in reality they're making more of us lol

renzev ,

A while ago I saw this meme about the exact experience you're having right now. We've come full circle lol.

https://lemmy.world/pictrs/image/324a5a36-4864-4663-b0a8-127de74f74a8.png

renzev ,

I remember reading a post from some person who struggled with hallucinations and was absolutely creeped out when that large, semi-ominous text appeared on their laptop screen out of nowhere lol. Then again, this was on r*ddit, 97% chance they were making it up for upvotes.

renzev ,

| A snapshot isn’t a backup so you can’t move it outside of the drive

You can tho https://wiki.archlinux.org/title/Btrfs#Send/receive

renzev ,

Spent like a few hours learning about and setting up snapshots, only to never every use them lol. I guess I just don't break my computer often enough nowadays. Copy-on-write is great tho, especially for making quick backups of a large directory structure before running that risky shell one-liner.

renzev ,

If you wanted me to do that in literally any programming language, once the psudocode is done, you just spend an hour or so looking up the details.

In some cases, you can even use an AI chatbot as a “pseudocode compiler”. Just tell it to translate your pseudocode to an actual language. I’ve done it for shell scripts a couple of times, works surprisingly well. Not that I would do this at a job interview haha.

renzev OP ,

have to find weird corner cases

Lol. Lmao even. I needed to do this because I wanted to learn the miryoku keyboard layout , and I wanted a way to quickly switch between Miryoku and standard QWERTY. The best way to do this that I could come up with was to bind a special key on my keyboard to toggle kmonad on and off. So I wrote a service for kmonad and gave my user permission to manage it. Running kmonad as my user wouldn’t work, because kmonad needs root to create a virtual input device.

Luckily, I am running Void, so the solution was a single well-documented command. Out of curiosity I decided to take a look at what this would look like on systemd distros, leading to this meme. Honestly, I had to do a double take by the time the guy started talking about Javascript.

I feel kind of useless typing this out because you’re just gonna ignore it anyway. In my post, I am talking about needing to do X. Your response is “why are you doing X, you should do Y”. Why am I not surprised that you’re a systemd user? Do you also use Gnome by any chance?

renzev OP ,

pretty sure the runnit solution won’t allow this either

I’m no expert, but I think you could make a special group, set the supervise directory to be owned by that group, and add all relevant users to that group? Either way, as I explained in a different reply, running the service as a user vs letting that user control a root service are completely different things, and one is not always a substitute for the other.

renzev OP ,

Don’t bother arguing with systemd bots. They spent time and effort learning the ins and outs of their overcomplicated init system, so naturally when someone suggests that there is a simpler solution, they interpret it as a personal attack.

renzev OP ,

your job security

I think I finally understand why systemd bots defend their init system so aggressively.

renzev OP ,

With the systemd approach

What about this makes it “the systemd approach”? runit supports user services too. These are just two different tasks that are needed in different contexts. Sometimes what you need is to “pass a control handle around” to a privileged service. And sometimes you need to actually make a service unprivileged.

renzev OP ,

I’m on bspwm right now, but I’ve been thinking of switching to wayland (in particular, hyprland). I’ve got nothing against gnome BTW. I have a friend with one of those laptops that turns into a tablet by flipping the keyboard to the back, and he also says Gnome is the only DE that “just works” for touchscreen, even though he uses KDE on his main laptop and desktop.

How are things on wayland by the way? From what I understand, it has partial support for running X11 apps, right? Do you use any X11 apps, or were you able to find wayland-native counterparts for everything?

[void] reminds me of the BSDs for some reason

I’ve heard this comparison a lot, though I don’t know what it means, since I’ve never used BSD haha. Maybe I should give BSD a try sometime.

And the best part about Linux is that we all can make our own choices

Amen to that!

renzev OP ,

Well that would require learning the kmonad config syntax, and I was just looking for a quick solution… but yeah, adding a QWERTY layer is a better solution in the long term, I’ll probably do that some time

renzev OP ,

Miryoku isn’t a regular layout. It has things like keys that change what they do depending on whether you tap them or hold them. Maybe it’s theoretically possible to implement it as a standard XKB layout, but it would not be fun. Usually, Miryoku is implemented in your keyboard firmware. But if your keyboard doesn’t support flashing custom firmware (e.g. builtin laptop keyboard), then you have to use a software solution like kmonad, which is a daemon that has to run as root.

As a sidenote, even for some “standard” keyboard layouts there needs to be background process. For example, Chinese and Japanese have too many characters to fit on a keybaord, so they use something called an Input Method Editor. But those usually don’t need root, in contrast to kmonad.

renzev OP ,

That’s good to hear. I try to avoid electron apps (I just use the website version instead), but thanks for the tip anyway!

renzev OP ,

If you’ve never had a reason to not use it, then it’s fine to continue using it. Systemd has been shown to be more or less stable, fast, and secure. The reason I don’t like it is because it makes simple things really complicated. Some examples:

  • The meme
  • u/[email protected] example with sshd
  • Distros that use systemd init also seems to prefer using other systemd components as well. So you can get caught in weird situations where one task is spread across two different systems (e.g. systemd timers vs cron, systemd-elogind vs acpid)

If none of these sound familiar, then switching to a non-systemd distro likely won’t make your life easier. But if you do, then it might be worth considering.

renzev OP ,

What on earth did I do to offend you this much?

renzev OP ,

I was being serious, but I’m not calling everyone who uses sytemd a bot. It has its merits, I use it on my homeserver (NixOS). When I say “systemd bot” I mean “people who blindly dismiss valid criticism of systemd”. Same as when some people say “russian bot” they mean “troll who is paid to advocate for the actions of russian government”, and not “everyone from russia is a bot”.

renzev OP ,

I don’t support calling people who volunteer their time to develop free software “just shit”, but I can’t help but agree at least a little bit about redhat. Redhat is kind of like Richard Nixon: if you just assume that eveything you dislike is their fault, you would be right surprisingly often.

  • “Predictable” interface naming
  • avahi
  • dbus

That being said, they did also contribute to a lot of kickass software, from btrfs to Firefox to linux namespaces to qemu to pipewire, as well as to software that you can’t really live without like glibc or gdb. So I guess the converse also holds: if you just assume that everything you like is there thanks to redhat, you would be correct pretty often as well. Can’t really say that about Nixon though.

renzev OP ,

Thanks for posting your original comment btw, now that I read over my own comments I do realise that it comes across as very hostile and a little silly, regardless of intention.

renzev OP ,

lol I've been pronouncing nginx as "enn-jinx" for so long before I learned that it was "engine-ex".

renzev ,

Speaking of not recommended, you can technically install arch on an NTFS partition

renzev ,

I admire your dedication to posting watamote linux memes

renzev ,

Flatpak nowadays feels like the spiritual successor to appimage. All the dependencies are containerized, and uninstalling an app doesn’t leave behind a residue of automatically created files on your system… at least in theory. All of these benefits are kind of negated if an app has full disk read/write permission.

Appimage is kind of silly in my opinion. Appimage is just “portable application” (i.e. when an app gets shipped as a folder containing the executable, .so dependencies, and resources), but crammed into a disk image for some reason.

renzev ,

Good software can come from almost any language, but yeah there’s just something about rust CLI tools. I’ve pretty much always had issues with incorrect file type associations on Linux, until I started using handlr. exa (or eza?) is great too. Just like ls but better in every way.

renzev ,

I also have both. VLC’s UI is good for some strange one-off tasks like playing CD’s and stuff. Sure, mpv can do it too, but I would rather push some buttons in a UI than dive head-first into a manual to figure out how to do it with mpv.

renzev ,

Digital music can be taken as easily as it can be given.

Digital does not always mean DRM. You can pry my bandcamp FLACs from my cold dead hands. Physical media nowadays is more about the experience than functionality. Maybe there are snobs who claim that vinyls are somehow functionally superior, but generally the people who use vinyls or CDs or tapes instead of digital are really just looking for that physical experience in a highly digitalized world.

They have sound quality as good as digital

CD quality is actually superior to streaming services like spotify (I personally can’t tell the difference tho).

renzev ,

I don’t know shit about fuck, but you explanation seems correct.

I do remember hearing that precisely because of the limitations of vinyl compared to CD, music is mastered differently for each medium. So the CD master of a certain song might be more compressed (dynamic compression, not digital compression) to make it sound “louder”, while the vinyl release has a wider dynamic range. So some people might prefer the vinyl version because it actually does sound different to the CD version.

Keep in mind tho, I might be spreading misinformation here.

renzev OP ,

You’re completely correct. But what I meant by that graphic is “poor solutions leading to more problems”, not “breaking down problems into smaller ones”. It was inspired by a cube drone comic that made the same complaint, but I can’t find that particular comic now

renzev OP ,

When did I ever tell people not to respond? Where am I being ignorant? I told people to not take the post seriously, because it is a joke post on a community about jokes. By all means, have discussion in the comments, silly or serious. I’ll gladly listen in and maybe learn something. Just don’t try to dissect silly things with serious arguments.

renzev OP ,

XML is great because while most config formats compromise on either being human-readable or machine-readable, XML solves this problem by being utterly incomprehensible to man and machine alike 😍

renzev OP ,

Accurate. LaTeX is great, it makes you feel like you have superpowers compared to “office suite”-style software. But every once in a while you just run into some bullshit that feels like it’s stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable where text in the “date” column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotateboxes, a phantom, a vspace, a hspace and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.

renzev OP ,

I was mainly thinking about how so many Rust projects advertise very loudly that they’re written in Rust. Like, they would have -rs in the name, or “in Rust” as part of their one-line description. You rarely see this kind of enthusiasms for the the language in other languages. Not a bad thing by the way! And also there’s the “rewrite it in rust” meme, where people seem to take perfectly functional projects and port them to Rust (again, not a bad thing! Strength in diversity!)

renzev OP ,

Never heard of it before, but might give it a try at some point. From the website, it seems like something halfway in between LaTeX and Markdown? Sounds exactly like what I need at times, tbh.

renzev OP ,

I mean good point, but if I’m just using bash as a shell and not writing a script, I’m probably first previewing the contents of a file with cat anyway, and recalling the last command and appending a | grep <pattern> to it is less keystrokes than re-writing the last command into grep <pattern> <file>. Especially if you’re playing around with the pattern and trying to get it right, it’s nice to have the pattern at the end of the line.

renzev OP ,

Yeah, what the hell is up with that? I always just echo | pdflatex to make it shut up and exit on error. Maybe one day I’ll learn how to actually use that interactive compilation thing, but not today lol.

renzev OP ,

So there are many different commands that compile LaTeX, right? pdflatex, pdftex, latexmk, etc. But they all do that thing where they ask for your input as soon as they encounter an error, right? Well, if you just pipe an empty echo command to them, it notices that stdin has reached end-of-file, and gives up trying to ask the user for input, and just exits on first error. So instead of pdflatex mydocument.tex, you can do echo | pdflatex mydocument.tex and it won’t ask you for input if it sees an error, it’ll just exit. There’s probably a “proper” way to achieve the same behaviour, but I can’t be arsed to read the docs.

Speaking of stupid TeX hacks, at one point I had a script called latex_compile_and_install_packages_until_it_works.sh. It’s essentially a loop that repeatedly tries to compile a document, searches the output of the compiler for anything that looks like a missing package error, and pipes it to sudo tlmgr install. The “fuck it” of package management, arbitrary code execution exploit included!

https://lemmy.world/pictrs/image/105d8096-b9cd-424e-8578-5482a086c74d.png

(Sorry for the screenshot, I lost the original script in text form, probably for the better)

renzev OP ,

Testing 123

$$ \sigma $$

aww…

renzev OP ,

tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source

Just do all of these in parallel to maximise the change of installing the correct version

renzev OP ,

u/[email protected] suggested Typst as an alternative to TeX. I gave it a try, and I’m loving it so far. It even has built-in support for the rotated text thing typst.app/docs/reference/model/table . I’ve only used it for notes/homework so far, but I’m looking forward to seeing how it fares for more serious typesetting tasks.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tech
  • kbinEarth
  • testing
  • interstellar
  • wanderlust
  • All magazines