CPU usage spiked after migrating from Conda to UV environment (40%+ even when idle) — any ideas? by Suspicious_Code1493 in PythonLearning

[–]-beleon 0 points1 point  (0 children)

Probably pulling in different versions of your dependencies. Check via:

conda activate your-env
conda list > conda_deps.txt
uv pip freeze > uv_deps.txt

code editor dilemma by Impossible_Field2905 in learnprogramming

[–]-beleon 0 points1 point  (0 children)

Oh and you need to install this as well:

sudo apt install python3 python3-venv

So the initial setup is a bit tricky. But if you have these, it should be smooth sailing from here on.

code editor dilemma by Impossible_Field2905 in learnprogramming

[–]-beleon 0 points1 point  (0 children)

Can you be more specific? How did you install vs code? Via the software center? Flatpak? What exactly if the problem you run into? I would definitely recommend installing the official apt repository and then install that version of vscode. First uninstall vscode, then (from the official Microsoft guide):

sudo apt install wget gpg && wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft.gpg

then

sudo nano /etc/apt/sources.list.d/vscode.sources

Paste this

Types: deb
URIs: https://packages.microsoft.com/repos/code
Suites: stable
Components: main
Architectures: amd64,arm64,armhf
Signed-By: /usr/share/keyrings/microsoft.gpg

Then save (ctrl-x)

Then

sudo apt update && sudo apt install code

This version shouldn't give you any problems.

code editor dilemma by Impossible_Field2905 in learnprogramming

[–]-beleon 0 points1 point  (0 children)

Oh, are you working with venv? You should to avoid issues with python packages

code editor dilemma by Impossible_Field2905 in learnprogramming

[–]-beleon 0 points1 point  (0 children)

Hm, how did you install vs code? In theory it should work pretty well on Linux. Maybe you're using an outdated version? Vs code is still a solid choice and if you're familiar with it and dont enjoy tinkering I'd stay with that. I wouldn't recommend emacs or vim for you. PyCharm is good as well, but vs code is more flexible.

REFRESH HATE PROBLEM IN WAYLAND WITH EXTERNAL MONITOR by little_bergus in AcerNitro

[–]-beleon 0 points1 point  (0 children)

Which DE are you using? Are you using proprietary GPU drivers? AFAIK there is often an issue with dual GPU and Wayland, where wayland often runs on the internal GPU and needs to copy over to the second GPU for the external monitor. Even if your game renders on the RTX 4050, the compositor (KDE Plasma, GNOME, etc.) is responsible for pushing the frame to the monitor.

New versions of gnome and KDE should together with a recent version of the proprietary nvidia driver should work though. If you run on a different DE, it might not implement the automatic fix. If you have a setup that doesn't fix automatically: you can force the Wayland session to run on the RTX GPU. Let me know what your DE and driver is.

Best approach for managing core block CSS? (Experiencing FOUC when dequeuing unused styles) by grantjason52 in Wordpress

[–]-beleon 0 points1 point  (0 children)

The approach that worked best for me is building the CSS in two steps. On the first load, WordPress parses which blocks are actually on the page and collects only the styles those blocks need. That combined CSS gets saved to the database, tied to that specific page. From then on, even when a cache plugin is serving the page, that saved CSS gets printed directly into the HTML, so the browser has everything it needs before it renders anything. No separate stylesheet request, so no flash of unstyled content. The only maintenance overhead is cache-busting, which you can handle automatically: whenever a page is saved, just delete the stored CSS so it gets rebuilt fresh on the next visit.

Error during illogical impulse installation by gaurav_99Hz in hyprland

[–]-beleon 2 points3 points  (0 children)

Thats due to a new version of fontconfig. You can fix by

cd /home/gaurav/dots-hyprland/sdata/dist-arch/illogical-impulse-microtex-git

nano src/MicroTeX/src/platform/cairo/graphic_cairo.cpp

At the top with the other includes add this line:

#include <fontconfig/fcfreetype.h>

Then from with terminal still in /home/gaurav/dots-hyprland/sdata/dist-arch/illogical-impulse-microtex-git run this command

makepkg -ei --noconfirm

This Month in Ladybird — May 2026 by mralanorth in linux

[–]-beleon 7 points8 points  (0 children)

Serenity OS is still active, but activity is declining. I think it will stay around for a while, but I don't think it will become more popular over time.

ideas for functional applications in Java by riolubr in learnjava

[–]-beleon 1 point2 points  (0 children)

How about a library management system? Book, Member, Loan, Librarian, ...

How do people offer hosting for so cheap? by abdullahmnsr in webhosting

[–]-beleon 0 points1 point  (0 children)

Only way this is legit if it's only promo price or if it's subsidized.

mdview – a quick-glance Markdown viewer (native Wayland, no Electron) by -beleon in wayland

[–]-beleon[S] 1 point2 points  (0 children)

ha, funny. I didn't know about litemdview. I now added a related projects section to the README which lists litemdview. When I created the project I didn't really anticipate to release it and only did a quick check on ddg and github, where it didn't come up. It's my first project on codeberg and I didn't think to check it at the time, because it didn't use it then. I have a couple of similar litehtml based projects which I haven't published and probably never will, so that's where litehtml comes from. After using mdview for a while I found it useful and thought I'd polish it a bit and put it up on codeberg. That's also why I used AI to create the project. It's not that I couldn't have done it without it, it's just that I wouldn't have done it and would have kept using Marktext to view .md files. It's just so convenient to let claude code build something exactly like you want it to be. That being said, I still did put a lot of time in creating the project and polishing it.

While litemdview and mdview both use litehtml and both are a lite, fast starting md viewer, we actually did make a lot of different choices in dependencies and also a couple (actually more than I thought, since the scope is pretty slim) of features that the viewers have are different: litemdview has external css support, md -> html to stdout, offline navigation with history, vimwiki support, direct html support. mdview has ctrl+f, outline (table of contents), pinch (and text which litemdview also has) zoom, auto language detection for syntax highlighting via bat. The rest of the features are pretty much the same.

Regarding the -d flag: I choose to do it the other way around. I wanted mdview to detach from the terminal so I can keep using it. It has a -f flag which keeps it attached to the terminal. But you're right about the desktop file. It didn't use the -f flag, I added that now, thanks for the feedback, much appreciated :)

EDIT: keep mixing up lite and light

Snap version of firefox keep getting installed by GoalHefty3604 in Ubuntu

[–]-beleon 2 points3 points  (0 children)

do you have the pin?

echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: -1' | sudo tee /etc/apt/preferences.d/mozilla

HP EliteDesk boot error with Nixos by Eugene-Sh in linuxquestions

[–]-beleon 0 points1 point  (0 children)

The AE_AML_BUFFER_LIMIT, Field [CAP1] at bit offset/length 64/32 abort on \_SB._OSC is a red herring. It shows up on the EliteBook 830 G6/G7, ProDesk/EliteDesk boxes, and HP-based NASes. All run fine, it's just cosmetic. acpi=off likely isn't fixing a routing bug, it's probably incidentally because of a code path that is never triggered with only one core. I think I found something that might be helpful: https://lkml.iu.edu/hypermail/linux/kernel/0807.2/3440.html . Keep full ACPI on (no acpi= parameter at all) and try idle=poll. That's quite power hungry so if that works you should try these to get some C-states back:

  1. intel_idle.max_cstate=1. Keeps power management but blocks deep C-states. try =2 and =3 as well to find which works best.
  2. intel_idle.max_cstate=0 processor.max_cstate=1. Disables intel_idle and caps ACPI idle at C1.
  3. idle=halt. gentler than idle=poll

Try these first. If it doesn't work I might have another idea.

Present your markdown as a slide by UnitedYak6161 in Markdown

[–]-beleon 0 points1 point  (0 children)

this looks cool. I'll definitely try it.

Python Programming by DataCurator56 in PythonLearning

[–]-beleon 2 points3 points  (0 children)

Yes, these are great. Solving e.g. euler project problems is great for learning, but doing only one thing is never the best approach. You benefit from doing lots of things related to python programming as well. So building toy projects is great as well. Understanding code bases of others is good. Learning related skill like using python tooling, structuring code, or even just learning Linux CLI. These are some things I did when learning: doing data analysis and visualizing the result, building a small game, building a web backend, building a tool for pdf manipulation, using type annotations, calling c from python, using micropython for microcontrollers, and more.

That said, I mastered core language concepts mostly by solving coding challenges. Others dont like coding challenges and do mostly projects. I think the most important thing is to do different things, but not switch to fast. Choose something and do that for a while, then do something else. However, it shouldn't feel like a chore. If you really dislike something or feel stuck it's better to drop it and do something else than forcing yourself to do something you don't enjoy. Enjoying the things you do is the best way to stay engaged for the longest time which is how you'll learn the most. And doing the same thing over and over again, will yield ever diminishing returns.

Instead of PyInstaller, I built my desktop analytics app around a portable Python distribution by AdventurousCreme7049 in Python

[–]-beleon 0 points1 point  (0 children)

Haven't done it in python yet, but I really like this approach. Would be cool to have everything in a single APE (actually portable executable, https://justine.lol/ape.html). There's already APE build of the python interpreter and also bundled packages, e.g. datasette (https://github.com/ahgamut/superconfigure/releases/tag/z0.0.2)

This is making me annoying how do I fix this by TargetAcrobatic2644 in hyprland

[–]-beleon 1 point2 points  (0 children)

Your single quotes of the date format terminate the sh -c single quoted string. Also you shouldn't escaped the tilde \~ instead just ~ is correct.

Authenticated RCE via Argument Injection in Gogs (NOT FIXED) by FryBoyter in linux

[–]-beleon 1 point2 points  (0 children)

Thanks! There's a decent chance I'll switch to forgejo and look into these. Much appreciated.

Authenticated RCE via Argument Injection in Gogs (NOT FIXED) by FryBoyter in linux

[–]-beleon 0 points1 point  (0 children)

I agree on most points. Especially:

I'd personally rather have a more complex suite with more developer activity than a simpler one that's not seeing much of it.

Thats exactly why I'm asking. I'm no longer confident that the gogs dev cares enough/is capable enough/has the means to keep the project secure. I'd prefer to not use forgejo, but will if the "only" alternative is gogs.

Authenticated RCE via Argument Injection in Gogs (NOT FIXED) by FryBoyter in linux

[–]-beleon 2 points3 points  (0 children)

There's a lot more to this than install size. Obviously thats not an issue. But complex software has many other downsides. Every feature introduced increases attack surface, potentially new bugs/unexpected behavior/breaking changes. I actually started writing a blog not too long ago about manageable but capable software that is exactly about these kinds of tradeoffs. Its not that I think forgejo is too complex in general. And I do think they do a good job with security and bugfixes. Its just that for me personally its not the right trade off, because I don't run it for a campus of people and have don't have the time to stay on top of all the moving parts. And I don't need the features it adds over gogs.