#unix
1 messages · Page 17 of 1
ill have it installed. but some projects are setup with black already
oh
@bitter salmon how's your configuration coming all together? wanna share a few screenshots?
đ why did I pip install tensorflow globally,will it cause any trouble #offtopic
What packages does it overwrite?
pip uninstall it then
That might not be idempotent, but it's definitely worth a try. Depending on the packages @spiral tide , I would reinstall them too
I did the same mistake, I just uninstalled it and cleared the residue and everything works just fine
You know, I admire those IT support people. Specially those in the 90s when people didn't even know how to turn on a computer! I think that cultivates patience more than trascendental meditation!
some of us were not cut out to be support. Ask me how I know đ
anyone here with experience configuring zsh? how can i completely disable zsh from saving duplicates in commands history? i've tried setting all options i've found on google:```zsh
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_REDUCE_BLANKS
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
Is there anything preventing you from saving your settings in ~/.zshrc or a similar file
that is the zshrc
Do the settings revert from what you want them to be?
no that's not the problem
the options are set, but zsh writes to the hist file no matter what and only filters out duplicates when the shell is restarted
I think I understand now
And I assume you run into duplicates while doing incremental search into history or the like?
nope let me show the problem visually
OK
so far all good
the problem starts now
after restarting the terminal its all good again
here it temporarily saved duplicates
Does it interfere with how you intend to use the terminal?
as a result of that temporary save, it interferes with the numbers when i search in history with fzf
while what i wish for, is that a duplicate is never ever saved, so when i search in history, the numbers are always correct
That's how it interferes then
Is this what you're using
i'm running ctrl+r to search the history
As in source <(fzf --zsh)
which has a hook to fzf under the hood
yes
Can you link any Stack Overflow threads that you read but which were not helpful so I don't recommend something you've already read
everything...
i've been googling around for like 3 hours prior to coming here asking for help
i couldn't find anything that worked
I don't want to recommend you anything suggested by Google's LLM without vetting it myself, but the LLM answer led me here:
https://rafaelc.org/posts/copying-previous-commands-with-fzf-and-zsh/
Homepage for Rafael Cavalcanti.
"The history is piped to awk, which removes the duplicates. Without this cleaning, fzf may display multiple repeated lines, which can be annoying."
I was also able to find this
https://www.reddit.com/r/linux4noobs/comments/tm2890/duplicates_in_zsh_history/
This doesn't look too dangerous I think:
fzf-history-widget() {
local selected
selected=$(fc -ln 0 | awk '!a[$0]++' | fzf --tac --header 'Search History' --multi --bind 'enter:become(echo {+1})')
if [[ -n "$selected" ]]; then
BUFFER="$selected"
zle accept-line
fi
zle redisplay
}
zle -N fzf-history-widget
bindkey '^R' fzf-history-widget
Yeah ,I will uninstall and reinstall in project directory Folder and mybe in virtual enev
OMG, I used it in the past, but I didnÂŽt remember about it's existence. I'm reinstalling it again now
Sounds good
Hello, not sure this is the correct place to ask this, but I've installed Jupyter Notebook on ChromeOS/Linux. From Jupyter I can click on the "New" drop down menu and successfully create a new Python 3 notebook, a new folder or text file. When I click New > Terminal, it opens a new tab but never actually gets a terminal going. Is this a feature that doesn't work on ChromeOS, any workarounds to make it work? I can access a proper terminal so not a showstopper, I'm just curious
Hey! Android is based on Linux based Unix?
yes, Android is a very heavily patched/modified linux distribution
and the linux kernel as well as most of the rest of the GNU ecosystem that makes up a linux distribution are modeled after Unix systems and also mostly follows the POSIX standard for unix-like systems
Its an ongoing work in progress to combine the two in a single Kernel.
Probably never gonna happen but you could have the same Kernel for Laptop and phone
Userland is different of course
Thank for the detailed Info!
Oh
Unix is dead everybody clearly uses windows đ (jk arch nerds calm down)
last time i made a joke like this an arch user dmed me about it
Mac is unix based?
A lot of it is based on an earlier distribution of FreeBSD, including all the man pages etc.
(In case anyone reading that wonders)
my impression was that the BSD lineage predates FreeBSD specifically, rather the XNU kernel which was inherited from Nextstep
i believe some of the cli tools are ported from freebsd though
Of course, for sure, but specifically the source tree that Apple used was the FreeBSD distro.
The situation is... nuanced:
NeXTSTEP appears on this second page
There are FOUR pages on this history before the first screenshot
A Unix history's diagram
PWB on this earlier page:
..is where a TON of things we still use first appeared, including find
Programmer's Work Bench UNIX
Here's the specific lineage that "Darwin" (MacOS kernel etc) has:
Originally FreeBSD 3.1, then updated with the 3.3 source tree
(that is an OOLLLLLD FreeBSD version, I am sending you this message through one running FreeBSD 15.0-CURRENT)
While listening to metal music hosted on one running 14.3-RELEASE
this is amazing and insanely more complicated than i realized đ”âđ«
It's totally wild to me that QNX branched off so long ago
oh nice you're running freebsd as your desktop os?
hahahaha that's such a fantastic site, i'm also amazed
Not right this moment as I type this, but my network edge runs 15-CURRENT and all my other machines that aren't gaming boxes are FreeBSD 14.3
very interested in how that's going / what hardware you're running it on. also your music streaming setup đ
I'm working on going back to a FreeBSD desktop env though, now that I've figured out how to make modern nVidia GPUs work there.
I plan to run Xfce since I doubt Cinnamon will work.. if Cinnamon works though I'll prefer that
i assumed bsd + nvidia just was not a thing since bsd isn't popular for machine learning and nvidia couldn't care less otherwise
BSD's "Linuxulator" layer turns out to be insanely full-featured for this kind of thing.
and you can also play some fun IOMMU games to make it not even appear to the host FreeBSD
and just show up in Linux ephemeral VMs where you want the GPU
Which are now one-liners for me with the lovely cbsd tool I back on Patreon
wow https://forums.freebsd.org/threads/do-all-graphics-drivers-require-linuxulator-or-just-nvidia.88835/ nvidia does provide a native bsd driver. cool!
This is how I run the Foundry VTT for myself to do RPG stuff
oh now you're really speaking my language. my friend who likes to DM pays for a foundry server and i've wondered about what hosting is like
Actually if anyone is interested in that, here's the guide I made https://gist.github.com/wilson/8ea5d440c7afcdcc6e1faeced180c185
I wrote this while doing it, then tore it all down and followed the guide, and that's what is still running, so it should be right
Foundry used to work directly on FreeBSD until 12.x came out, but they've broken it
and their community Podman/Docker image makes some crazy syscalls that Podman doesn't support on FreeBSD yet, so this was the best route I could find.
It's better anyway actually because now I can just rsync files directly to it
It gets a real IP on my LAN etc
If anybody isn't sure yet that I'm a lunatic, here's a journal one of my players is keeping that seems pretty accurate for the game.. all-caps speech by this "Roy" character is all me talking: https://publish.obsidian.md/palladium/Journal/Day+3+-+The+Danger+Zone#Chi+Chow
(some of the text here isn't in exactly the right order, I now notice, but you get the idea)
Roy is a Boltzmann Brain that formed in the early universe out of ten Kugelblitzes (what happens when you make a black hole out of photons instead of matter)
He's way into monster trucks and pro wrestling and doesn't break character.
lmao
I will have to go through this later. back to work & cooking dinner for me.
He calls his location "The Danger Zone" because if he lost containment ("died"), the mass-energy conversion would reshape the solar system.
So rare to hear about anyone using any BSD. Decades ago Paul Graham used it for Viaweb; that's pretty much the last usage I can think of đ€Ł
Netflix uses it for everything still
and check out what happened when Tencent paid some devs to port the FreeBSD TCP/IP userland stack to Linux DPDK? https://github.com/F-Stack/f-stack/
by the time your host has 16 cores, it's 8x faster than current Linux
They pin each network card to a CPU, and the interrupts directly trigger userspace code without a kernel mode switch
IMO this is the Linux SOTA circa 2025.
I guess we can't say Tencent never did anything for us anymore.
The utility I use actually, despite having bsd in the name still, works on Linux now.
Yet one more wrapper around jail, bhyve, QEMU and XEN - cbsd/cbsd
(Humble self-description but it's giga-rad)
The author is the guy who pioneered the FreeBSD images for Amazon EC2
Which were actually a massive challenge due to some Linux-ness Amazon had baked in
I thought that was the tarsnap guy -- Colin Percival iirc
Oh actually you're right, he is just who I learned about this from
Colin Percival, yeah
Colin uses this though, or did
I thought he was also a contributor but doesn't look like it
This is probably the most sophisticated POSIX shell project I have ever seen.
You know what I should do someday, is boot a VM of everything on this UNIX family tree, in order.
I wonder if any VM can actually run the 1969 UNICS
Actually I don't even know if we have that source code.
"trailing-edge.com" has emulators iirc
oops, typo
the CPUs they used then were so primitive that you can efficiently emulate them in today's userspace
Hmm. Doesn't seem like maybe we have anything prior to 1970
Gource visualization of unix-history-repo (https://github.com/dspinellis/unix-history-repo).
- UNIX and Linux System Administration Handbook (5th Edition): https://amzn.to/3NxK1bw
- The Unix Programming Environment: https://amzn.to/3NzlT8e
Oh man this is a cool commit message: https://github.com/dspinellis/unix-history-repo/commit/185f8e834621f40c2c49647d08ec6e17acb6bcc0
Oh wait, what epoch date did the UNICS v0 use, prior to 1970???
This trailingedge site is cool, thanks!
wow that's an impressive git repo
There was no Unix or Unics then
there may have been a cast-off PDP-7 under Thompson's desk, but ...
I learned recently that Unix was developed about a 20-minute drive from where I grew up. Wouldn't have meant anything to me at the time, but geez
Oh WOW, the machine that ran Space War, DID have a real-time clock, but we seem to have no records of what it might have been like
and actually it was initially January 1, 1971!
Instead of the modern one-second interval, time was measured in sixtieths of a second, aligning with the 60 Hz frequency of the system's clock. This was stored as a 32-bit unsigned integer. However, the developers, including Ken Thompson and Dennis Ritchie, quickly recognized the limitations of this approach. A 32-bit integer counting at 60 Hz would overflow in a relatively short period, approximately 2.26 years.
To address this impending limitation, the epoch was soon moved to January 1, 1970, and the time was measured in full seconds. This change, which occurred in later versions of Unix, significantly extended the representable time range of the 32-bit integer and established the standard that continues to be the foundation of timekeeping in most modern computing systems.
I had NO IDEA there was a non-1-second epoch system prior to the 1970 choice
Yeah I didn't exist yet at the time, which is clearly why they made that initial short-sighted call 
you'd'a set them right, had you only been asked
If you want a fun AI question, ask it what kind of time format you need to handle the current date in terms of Planck intervals since the Big Bang epoch start.
It's... a lot.
.oO("Planck interval" ... the length of time I can maintain that yoga pose ... maybe one minute)
(Maybe I have occasionally pondered time formats OK?)
Spoiler: ||208 bits!!!|| (For the span defined currently by the TAI64 format)
TIL about "Planck units"
"digital physics" is fun, it's basically why I'm about to go back to college
Its a joke liberal Im using unix to write this message
I know it is a joke.
Also I honestly dont know anybody in real life who would prefer macos over literally any other system but its honestly just personal preference with that stuff
Hi, I have an old laptop that i wanted to refresh a little so i changed my windows 8 to xubuntu as i think it will do fine for my uncle who is an actual user however i run into stupid mistake that i dont know how to fix. What i mean is that i got GRUB loading. Then Welcome to GRUB! and nothing more. Do you have any idea how to fix it or what i should do if i dont know something
This looks to me (I don't currently use GRUB ever, but used to) like a "stage 1 boot is installed, stage 2 is not or is corrupt" situation.
These instructions look correct to me at first glance, and should fix you up without ruining any data: https://askubuntu.com/a/88432
chroot is the key here (potentially)
Actually this answer on that page is even easier, try this first https://askubuntu.com/a/326661
The first link is the "full procedure" that will definitely work
but it looks like they have a GUI shortcut for this now that you should probably try first
considering it's an old laptop there is genuinely a chance that some piece of hardware is bad
but try all the debugging steps above first
i had a random problem with my 2010-12 lenovo and eventually i ruled out any configuration or software issue and concluded that something went wrong with the ram slots on the motherboard
there used to be some CD-ROM or something you could boot from, which would scan all your RAM, looking for errors.
memtest86
Still available as a bootable USB. And some bootloaders ship an option that can boot directly into it by default, too
memtest86 is pretty outdated, and doesn't find a lot of problems with DDR4/DDR5
I recommend TestMem5, using an "extreme" profile config you can find online on forum threads etc. Something like that might be built into the default choices now, not sure.
I use this gnarly config
anta777's "Extreme1"
Sadly I had had a bunch of RAM problems in machines in recent years and memtest86 didnât find any of them, even ones that TestMem5 could find within 30 seconds.
Part of that is that when memtest was written, memory controllers were not yet part of the CPU. Itâs hard to tell the CPU to be totally âfull throttleâ in simple bootable memtest mode, and you need that to ensure that youâre seeing the real world stability of the IMC under load.
Actually though, if you want an even better answer, and something that works on Linux, check out OCCT. I back them on Patreon.
This can stress test everything, not just RAM, and it has aggressive memory test modes.
The âpower supplyâ test is savage, be careful. It uses every resource as hard as possible to try to generate maximum load on your PSU.
I always let it run at least 24 hours on a new PC build in âplatinum stability certificationâ mode.
Oh and see also stress-ng, it is good, I just like OCCT better.
how to learn bash is there any free resources like books?
There's the Bash manual which is not that hard to read if you use the HTML version online
The man page however sucks because it's the entire thing in one giant page
https://www.reddit.com/r/bash/comments/10ltudi/books_or_websites_to_learn_bash_scripting/ lots of resources here
But the #1 lesson to learn about Bash is: if you find yourself writing a non trivial program in Bash, stop and think hard about whether it's really the right tool for the job
the answer might be "yes". but you have to stop and think hard about it.
You might want to focus on the Posix shell standard first
It will force you to learn your way around coreutils instead of relying on Bash builtins, and then it will give you a better understanding of what Bash offers in addition to Posix shell
I doubt I've written anything (apart from my ~/.bashrc) that's longer than 10 lines; when it gets that long, I rewrite it in Python
Yeah, that's usually good advice. Python, Perl, something that is portable and easy to install but less dangerous to actually program in
That said, Python is really clunky and verbose if you need to do a lot of things like piping together external commands
There are a couple of libraries that provide better syntax but they aren't very commonly used
This is in the context of Site Reliability Engineering, and understanding what MBA types are on about. I think it's pretty true.
- Translate to primitives
âWhich revenue, which cost, which risk, by when, owned by who.â If they canât answer in one sentence, itâs fluff.
Crap.
I may be.. switching from FreeBSD to Linux?
I really want the kernel keyring API, eBPF, and DPDK.
I will run some crazy non-GNU userspace somehow, maybe on top of ParticleOS, because I don't like how GNU rolls.
But the Linux kernel is insane now, with the advent of F-Stack to fix the bad network performance.
because I don't like how GNU rolls
oh, why?
I will sleep on it and try to give a better answer, but my gut reaction is that they have cloned an unnecessary number of tools just to GPL-ize them, and I donât love that. Oh, and the thing where the man pages all say to see the info page. I will never have âinfoâ installed on a computer.
Thank you đ
I guess I am literally going to try this. https://omarchy.org/
I will not apologize for my opinion that DHH's taste in software is very good.
TIL! Trying it now (via emulation on an M2 Mac -- verrry slow) .... maybe I'm imagining it, but it seems to be building everything including the kernel from source
Ours is the time of joy, the promised time that all the sad yesterdays waited so long to meet.
QRT: dhh
The prophecy is finally coming true! Microsoft and Apple have been fumbling their offerings for developers, so now is the perfect time to simply decide to try Linux. It literally takes as little as two minutes to install!! https://www.youtube.com/watch?v=GQJZ96l-XQ4
I'd need to actually buy some sorta x86 box to really try it out. I did play with https://omakub.org/, text-only, for a few minutes; and apart from a few hiccups in the installer, it seemed OK
Iâve been using it for a week now. Its great! I do not have the time to rice up arch linux let alone set it up, at least not right now. Its been amazing tho
Cool. I plan to use this for laptops/desktops, and ParticleOS for servers basically, as I explore Linux from the perspective of a long-time FreeBSD troll.
i dont get it. why this and not just arch + hyprland + spend 1-2 hours copying configs/ customizing shortcus??
Hey guys, I know this is controversial, but I would've liked to add the penguin ai chatbot extension, but it looks like it's not compatible with the latest version of GNOME in debian 13.
i'm not one who heavily relies on AI, but I do admit that in certain instances it would be handy to be one keyboard shortcut, or one click, away from a chatbot, without opening an app or another window.
Does anyone know if there's anything similar that fits my needs?
Honestly just firing up Claude Code / Gemini CLI / Codex / etc and pointing it at the repo and saying "make me an extension to enable Penguin AI that works with Debian 13" will probably work, based on some of my recent experiences.
It would be more fun and cause more learning if you tried to do that yourself
but honestly an agentic CLI tool can probably close to one-shot it circa October 2025.
coolercontrol
Guys
Guys, I cannot control my fans from Arch Linux. I switched to Arch a couple of weeks ago. But I cannot control my fans. They are not ramping up even when the laptop reaches 85 degrees. Also my BIOS don't have any options to control fan curve. Do anyone know how to control it? And also I tried many many methods using ChatGPT and DeepSeek but none of them worked
Laptop Model : Acer Aspire Lite AL15-41
CPU: AMD Ryzen 7 5700U
see my answer above
I cannot find your message man
I see it. Whats in it? I don't get why that's message is important.
Guys, I cannot control my fans from Arch Linux ... But I cannot control my fans...
Do anyone know how to control it?
try the program called coolercontrol
do you have paru in your arch install?
if you have, use that, if not get it from the AUR
paru coolercontrol and pick the correct version depending on your system and os
yep
Man, the app is not detecting my fans.
I have tried many methods to control my fans through Linux. Can you tell me what this app uses to control my fans, so I can know if it will ever work?
Or can you tell me any other methods to control my fan, or at least to make this app detect and control fans?
OS: Arch
Laptop: Acer Aspire Lite AL15-41
CPU: AMD Ryzen 7 5700U
Tried an online troubleshoot maybe?
does somebody with a mac here want to investigate errno.ENOTCAPABLE?
it shouldn't be available via Python on Macs at all... errno.ENOTCAPABLE is WASI/FreeBSD-only
i have no idea why it's not available basically on all macOSs except when used with Python 3.13.8, 3.14.0 and 3.15.0-a1
3.13.9 fails attribute access of errno.ENOTCAPABLE with macOS version 15.6.1, but 3.14.0 succeeds errno.ENOTCAPABLE
3.13.8 does succeed as well! but that one used macOS 15.7.1 if that matters
logs
I can take a look a bit later tonight, sure
nothing is working man
Got distracted by moving in RL sorry, will try to do this tonight.
guys one dumb question. why the hell or what the hell is $$ ? is a variable to define pshell process? where is it WHY ?WHY?

yeah it's just a special variable to get the current PID
https://www.hostinger.com/uk/tutorials/bash-variables there are a bunch of them
stuff like $? is also useful, that allows you to find the exit code of the last command to run
Note about $?: If you only check whether or not it is 0, most usecases can be replaced by an if or || ...
thank you guys
let me know if this channel is not the best place for this question I will remove it
I have a Django application that loads multiple sentence transformer models in apps.py. This application runs in two different configurations:
Configuration 1: Gunicorn Server (Main API)
Running with 4 workers, gthread worker class
Models loaded in apps.py
Works fine on CPU
Fails on GPU with CUDA fork errors
Configuration 2: Celery Worker (Background Tasks)
Same codebase, same model loading in apps.py
Running with prefork pool, 4 workers
Segfaults even on CPU
The Confusion is that Both systems:
- Use the same code
- Load the same models in the same way (in apps.py)
- Use forking-based worker models (Gunicorn gthread + Celery prefork)
Yet they behave completely differently:
Gunicorn works on CPU but not GPU
Celery doesn't even work on CPU
The core question: Why does the exact same model-loading code work in one forking scenario (Gunicorn on CPU) but fail in another (Celery on CPU), when both should theoretically have the same fork-safety issues?
Celery does some completely insane things internally, which might contribute to the segfaults. Not to mention it is full of bugs. If you can, I recommend switching it out for another library such as dramatiq
Woah didn't expected that, so I can't even get to root cause here?
Like am trying to understand the os layer around this but it just contradicts with what's happening in my main server so can't make sense right now
you can try your luck with https://docs.python.org/3/library/faulthandler.html
Haha already have this, that's why I got to know it's a segmentation error but nothing more than that
Good Night guys
Good night Jakob
Good night Jakob
Good night Jakob
Good night Jakob
Good night Jakob
Good night Jakob
Is it too late to say "goodnight Jakob"?
good night Jakob!
Good evening everyone
Let's say I have a directory
And I want to pass all files within the directory to a certain command to do stuff on these files
Usually I'll do something like:
command $(ls directory)
However, let's suppose all the files inside the directory have spaces in their filenames:
$ ls file one file two file three....
What's wrong with command directory/*?
Yeah, of course this would work
But I was just wondering how I could pass names with spaces one at a time đ€
isn't that what L3v's suggestion is doing?
~ $ ls TestDirectory/*
'TestDirectory/Test 01.txt'
'TestDirectory/Test 02.txt'
~ $ echo TestDirectory/*
TestDirectory/Test 01.txt TestDirectory/Test 02.txt
~ $ cat TestDirectory/*
~ $ echo Hello >TestDirectory/Test\ 01.txt
~ $ echo World >TestDirectory/Test\ 02.txt
~ $ cat TestDirectory/*
Hello
World
~ $
The standard trick is to get the command to give null-terminated list items, and then use xargs to pull them apart. If your ls supports it, something like ls --zero | xargs -0 command.
but more general handling of tricky filenames... takes more tricks
it's often better to just not try to do the work in shell languages
(now if only there were an alternative that's good for quick one-offs but also has robust quoting and escaping mechanisms, and structured data etc. đ€ )
This is exactly what I was looking for!
Of course @spark mulch solution's works, but I'm always wondering "is there a different way of doing x"? so if I encounter a slightly different problem in a similar situation in the future I'm already prepared
I guess this will work even when passing a bunch of items one at a time in a for loop
if you mean a bash for loop, I don't think it will. it's still going to do its own tokenization
for this case IIRC you instead want to play with the IFS environment variable ("input file separator")
Nah, that's wrong. Bash doesn't word split the matches from shell globs, they're passed to for (or any other command) as separate arguments. ```sh
/tmp$ mkdir test
/tmp$ cd test
/tmp/test$ touch 'foo bar'
/tmp/test$ touch baz
/tmp/test$ for file in *; do echo "file='$file'"; done
file='baz'
file='foo bar'
I stand corrected. (I wonder what other gotcha I was thinking of...)
Wouldnt many modern shells handle this better? Xonsh, oilsh, elvish? (I haven't actually used them myself đ)
(I mean, consider what server we're on....)
hello can anyone help me understand why my linux machine get aborted ...when i tried to sart it again it gave me verr_file_not_found error
have you moved the .vbox file?
(I don't think that's on topic here? and nothing really to be accomplished by venting about it)
yeah it's not
unisex
Iâm new to Linux and I was trying to set a custom cursor, it works on the GNOME environment, and apps installed using apt, but it doesnât work on snap packages for some reason.
Can anyone help me?
unixes
AIUI: the point of snap (and also flatpak) is that it creates an isolated environment with all sorts of dependencies built in, so it can work exactly as the developer intended. That often includes a whole separate desktop environment, so the stuff you did to make cursors work in GNOME is just not applicable.
Linux is designed to be highly modular and customizable, at the expense of smooth just-works GUI experience.
So is there nothing to change cursors in snap packages?
Like I just changed the icons folder for my desktop to change the cursor for gnome, is there anything similar I can do for snap?
In a project with about 10 parallel things that each will use linterĂ3/formatter/fast tests/slow tests/etc
How would you orchestrate running those commands/tools?
Makefiles are alluring. But I'm afraid the complexity will grow and not be nice in the long run đŹ
Bash scripts have similar issue
Just files are perhaps a bit too exotic/custom.
Other ideas?
I use a bash script starting with ```sh
#!/usr/bin/env -S uv run --group lint bash
shellcheck=bash
set -x
but just is great for crossplatform support
what about using pre-commit (https://pre-commit.com/) or prek (https://github.com/j178/prek) to run your tools and such?
No need to support anything but a few Linux envs
Don't really wanna run most of these as git hooks. Some really fast are already hooks (3 seconds). But that's already ~20 seconds on slower machines. Not to mention tools like cppcheck that takes more than a minute to run đŹ
But maybe there is something useful in that framework anyway?
pdm or rye scripts works too
for dependencies we already have nix env, so unsure what pdm can do. Generating bash completions sounds nice though đ€
Can it do that for python CLI tools build on top of argparse?
CTRL+r is so OP
Heck yeah.
Best thing I ever discovered.
Right above ctrl+shift+r
I use just despite the exoticness
With fzf â€ïž
there are many ways to do this. You can:
- download source and compile. If you are familiar with this approach and you don't need different flavors.
- install it from package manager (like apt or rpm). Probably the easier way but limited to repositories inventory.
- use tools like uv or poetry to control python versions (like nvm does for node) and create virtual environments. Probably what most of developers do these days.
- use containers for fully isolated environments. Likely for very specific scenarios like deployment.
most of linux distributions provide package repositories, which is something like a store but definitely better.
i want to add pyenv to the list, it's good if you for one reason or another aren't happy with the python distribution that uv provides
What Linux distro are you using? There's a very good chance you already have Python, because it's common for the distro's tools to be written in Python.
im using linux mint cinnamon
Yes, you definitely already have Python then.
Try to open a terminal window, and use python3.
okay thank you
(Check if python also works. If it doesn't, you may consider sudo apt install python-is-python3 to do some helpful system configuration.)
daaamn , i found a cool command notify-send , it writes ctdin to a pop-up and can display an icon and get input (i don't know how to use that input but i guess it could be useful to you)
I have a massive problem, one of ubuntu services crashed and caused desktop deletion. The space is freed up too. Any one encountered this issue?
i don't run ubuntu much, i use other linux distros and have been doing so for a very long time
i have a very hard time imagining that a system service crashing would delete the desktop
which directory is now missing from your system?
(as you say that the space has been freed up, i assume there should be either a missing directory or a lot of files under a specific path)
i looked them up, cant find them. that is the surprising thing, is the directory was completly missing, i had to recreate the Desktop
okay, the ~/Desktop shouldn't go missing like that, especially not because of a service crashing, i have never seen or heard about something like that happening before without a good reason đ€·
i agree with you until i saw it happen to me đ„Č
would removing the drive and scanning for deletd files recover them?
your guess is as good as ours
given that, like rndpkt, I've never heard of this, and can't imagine what happened
I wouldn't be surprised if "service crashed" and "Desktop vanished" are unrelated, and just happened to occur at about the same time by coincidence
recovering files can be really difficult even more so today with modern file systems and modern hardware (NVMe and other SSDs having TRIM which will "eventually" remove the underlying data to make the storage available for new writes)
Remove the drive, create an image of it dont mount it
attempt any recovery on the image instead of the drive itself
you can try, but as more writes happens to the drive more and more deleted data is lost
ahhh, i see. yeah good point i will try that
since it is new, and the pc was shutdown immediatley after
oh, okay, you haven't used it since?
you have a decent chance at getting some stuff back then, depending on how long stuff had been writing to disk after the deletion occurred before the shutdown
less time and less writes should at least increase the likelihood of more of the data still being intact
đ€
i mean this was the weirdest thing to ever happen
in ubuntu, i was expecting it to happen in windows
Lesson: keep important stuff backed up. I use git and Google Drive
Mess ups happen regardless of the operating system
company dont wanna pay, the code on the ~/Desktop is not significant, cimportant ones are on /home
but there are some data i want from Desktop
a hardware write blocker would be the best for such a recovery job
but those are expensive specialised equipment (at least the ones that really does work properly)
but a live linux distribution with special kernel patches can help somewhat (as even mounting a partition read-only can change/update a small amount of data on the drive that gets updated)
~ means the /home/<username>/ directory, which the Desktop directory should be directly under
which tool do you recommend would do this properly?
so it should be included in the backup of /home unless they have specifically excluded it or symlinked it elsewhere
mac or windows compatible
the good thing about this, it happened with my boss looking at the process đ€Ł
i would use a live linux distro that i would boot from a usb stick
have another drive (can be connected with USB if you don't have any other possibilities) of larger capacity and make a disk image of the drive with the deleted files on without mounting it at all
that would be the master copy of the original, then i would make another copy of the master to work on using different recovery tools
where do i get help for phyton something like nested loops
you can go and ask you question here https://discord.com/channels/267624335836053506/1035199133436354600
yea but i need help urgently
yeah, for drives that are gradually failing (when there is bad hardware, especially in the case of spinning disks) it's important that they run for as little time as possible and read the drive as few times as possible to rescue as much data as possible, but this doesn't seem to be the case for you
its simple but i dont know how to do it
you can the ask it here https://discord.com/channels/267624335836053506/267624335836053506
i see, it is an nvme drive
this is why i wanted to detahc it, it was more of linux deciding to delete
rather than a corruption
okay, they (and other kinds of SSDs) can sometimes start to fail gradually as well, so you can treat them the same way if you suspect that it's the hardware that is starting to fail
@vivid steppe i have used/tried several open source tools for creating disk images of different types of drives and media:
dd- basic utility, not the best for this kind of job as it can get stuck trying to read broken pars of the disk and in worst case making more damage than necessary in cases with failing hardwaredd_rescue- a patched version which is a little better thanddfor this kind of thingddrescue- not based on any of the former two even if the name is very similar, but should be better than both of themdcfldd- a forked ofddfor forensics work by the Department of Defense Computer Forensics Labdc3dd- another fork ofddand a kind of continuation ofdcflddby Department of Defense Cyber Crime Centerguymager- my preferred open source tool for imaging drives
thank you very much, i will use one of them
the last one is a GUI tool while all of the others are CLI tools
Anyone have experience compiling older versions from source on Linux? I discovered that my regular builds for 3.5 and 3.6 will segfault on import of ctypes. (Debug builds work, and 3.4 works)
(actually, 3.4 is not consistent... ?)
$ py3.4
Python 3.4.0 (default, Mar 12 2025, 17:12:30)
[GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes # no problem
>>>
$ py3.4 -c 'import ctypes' # no problem
$ py3.4 -m ctypes.__init__
Segmentation fault (core dumped)
Each of these results seems to be consistent. Bizarre.
With pyenv I can compile pretty ancient versions still
I mean, I compiled them, and compilation was straightforward, but the result had a weird small flaw like this. So I assume there's some subtle dependency issue.
-m anything.__init__ seems pretty fundamentally wrong. Obviously it shouldn't segfault, but it's not a reasonable thing to do, and it ought to result in an error
Does py34 -c 'import ctypes.__init__' crash too?
it's intended as a way to get -m to work for a package that lacks a __main__. And it works for other things, and certainly shouldn't segfault when it doesn't work.
But since you mention it, it does make a difference. And at the REPL, too.
(and it starts working in 3.7.)
(and in the debug versions.)
$ python
Python 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.__file__
'/usr/lib/python3.12/ctypes/__init__.py'
>>> ctypes.__init__
<method-wrapper '__init__' of module object at 0x70b768729da0>
>>> import ctypes.__init__
>>> ctypes.__init__
<module 'ctypes.__init__' from '/usr/lib/python3.12/ctypes/__init__.py'>
>>> ctypes
<module 'ctypes' from '/usr/lib/python3.12/ctypes/__init__.py'>
>>> ctypes is ctypes.__init__
False
e.g. in 3.12
The MrrpOS Package REGistrar is written in Python â€ïž
Not sure what they're going on about.
A single cycle instruction finishes before the next clock or latch pulse. If there are two instructions A then B, and B cannot execute one cycle after A, then A is not single-cycle.
And if you count loading, copying and register moving, most architectures have these as dedicated instructions like MOV, LD, STR so they're still single cycle.
But, most CPUs nowadays have pipelines. 4-deep, 12-deep, 20-deep, whatever.
So on a 12-deep pipeline, between loading a "2+2" and saving a "4" result back, there could be 11 other operations that started 11 cycles before it.
still from outside the result is the same, every cycle 1 input is loaded and 1 output is saved back.
He claims to be an asic expert
i'll see if i can find the "single cycle" example i saw on some datasheet. microcontroller or SRAM, i can't remember right now
He claims to have power to ruin people's lives
It appears what you are currently is a continuation of your previous complaint from November 14 (linked as a reply).
You have yet to explain how any of this is relevant to the channel or the server; you have also yet to explain who the person in the screen captures is, or why we should care.
If you think any of us should be doing anything about it, I can't understand what, how or why.
Im just confused in how you manage to do asic without knowing what a cycle is
why have you chosen this channel, on this server, to express that confusion?
Aren't asic related to programming
Do you use Python to do it? Is the described problem specific to UNIX operating systems?
but beyond that, this seems to be about your interpersonal issues with this other person, who doesn't appear to be on this server. I don't buy that it's actually about the claim presented.
specifically because of commentary like this.
That's what he said
I didn't mean it like that
I'm new to computers that's all
By the way, i saw a tutorial out there showing how to set up a bluetooth GATT server with bluez python bindings for linux.
Is big old bluez the only choice out there of do you guys know of any other bluetooth stack that lets me get away with writing less code?
why continuously bringing outside drama and trying to make fun and degrade people outside of this server? That feels quite toxic and weird
Let's stick to the topic of this channel
Yeah but there's more user-friendly code editors, why use vim??
It's stable and one might be very proficient in it. It's also fun đ
Why would i exit vim?
#evenbeethoven
On the other hand, when I want to get down, I got to get in D
Funky D
Is there any reason why CachyOS would act weirdly on a 5070 and Ryzen 7 9800x3d
Spent days trying to understand why I had CPU cores maxing out and freezing the PC, GPU temps hitting 95 booting minecraft, PC failing to boot entirely until restarted multiple times, etcâŠ
I have no clue what the problem is, itâs a brand new prebuilt PC
have you checked htop / a proc mon to see what is using your cpu?
and is your GPU being loaded for games? Ive had steam load my cpu but not detect the GPU so it ran all the graphics on the cpu
Nah itâs iBuyPower
I usually build my PCs but it was such a deal I couldnât pass it up
But I understand why it was such a deal now when literally none of the parts work properly
PC wonât boot half the time, red CPU light, amber DRAM light, Memory test issues, had to update bios which fixed those but then PC gets stuck with white VGA light for 5+ minutes and doesnât boot. USB voltage failuresâŠâŠ So unimpressed
If you see a 5070 and 9800x3d with 32gb of DDR5 for $1,500 just know itâs too good to be true
Will not be purchasing anything from them again lmfao. I cannot believe that they are selling PCs that have RAM issues unless you update BIOS. Average consumer isnât doing thatâŠ
https://forums.linuxmint.com/viewtopic.php?t=459370
bizarre, anyone ever seen anything like this? everything about the venv contents looks legit and ordinary to me, except that using the venv (whether via the environment's python directly or by activating first) doesn't put the venv's site-packages on path (the base python's user install dir is on path though, implying site ran okay)
vim has a pretty steep learning curve, but the ways of editing text in vim is very powerful
(even enjoyable)
oh lol it's perfect for masochist like me i'm in
Vim is something you can wrestle with for a lifetime and every match renders you stronger for the next one đ
It turned out that the user had an alias set up for python (and python3) in ~/.bash_aliases, so all the activation song-and-dance was irrelevant :)
Should have thought of it đ€Šââïž
Hi, regarding python on mac, I recently learned that MacOS comes with python preinstalled in
/usr/bin/
but I found out I also have python installer in
/opt/homebrew/
as well. By default, "pyhton3 -m pip install [package]" in the terminal installs python-packages in
/usr/bin/python3
but according to ChatGPT, packages should not be installed on the system-version, but instead in the homebrew-version.
Now to the questions:
- Is this something to care about?
- Is it nessecary to even have the homebrew-version?
- Should I expect to encounter problems when starting to work with venvs?
I recommend you install packages only inside the venv
this avoids any issues with multiple installed versions
I once read a compelling blog post (probably this) that said that for MacOS, you should only use Python that you download from python.org; and you can easily keep it updated by occasionally running mopup.
In particular:
- Don't use homebrew python for anything. It's there for use by other homebrew programs, not for you. If you do use it, it will work just fine 98% of the time, lulling you into complacency đ
- Don't use the python that came with your mac. It too is there for use by other programs, and not you. Same 98% caveat applies.
If you search the internet for answers to this question, be wary of any advice that's more than a year old. Things move fast in python-land. I noticed lots of blog posts that suggest you use pyenv, or any of a number of similar tools. I strongly recommend uv instead.
uv is an extremely fast Python package and project manager, written in Rust.
uv managed python is probably the best for most people, amd the simplest
if you need something custom for some reason pyenv installed in your own user account (and not with super user/root privileges) is still an option
or python download from python.org
i too can only agree with not using brew (homebrew) managed python for your own stuff, and definitely not the system provided python
and never ever install modules in your system wide python installation with super user/root privileges, that can mess up things in your system badly if you are unlucky, try to stick with venvs if you can, or as a last resort, user home directory installations of modules (if you still chose to use the system provided python regardless of our warnings, then this can still mess some dependencies up for you between different scripts you use/run, but it should at least not break anything on your system when they are only installed under your user directory)
From before, when learning python, I was never told this and just installed python and ran "pip install ..." in the terminal, so I have all of these on the "/usr/bin/python3"-installation:
/usr/bin/python3 -m pip list
Package Version
absl-py 2.3.1
... [many more] ...
Do you think I need to remove these? In case, what is the best way to do this without braking anything?
I will start using venv's from now while learning about them in a course I take
holy wall of text
I can remove most...
What distro are you on?
Not sure what that is? Distribution? Version?
Like Ubuntu, Fedora, Debian, Arch, ...
What variety of Linux. (I'm assuming this is Linux?)
MacOS
Ah, macOS. Okay. Latest version?
I think the system doesn't actually ship Python anymore, so you could safely remove all of them
Do you have a Homebrew-installed Python?
Sequoia 15.7.3
Yes, I have that as well, but no extra packagaes installed there
I'm a bit confused, I have no /usr/bin/python on my Sequoia install. Do you have an older Mac, pre-M1 era?
Either way, macOS doesn't rely on any Python packages being installed.
for me it's /usr/bin/python3 and not just "python".
Oh right.
Um idk if this is the right place to ask. But what advantage to get out of python coding in linux / mac that u dont really get in windows? I havent made large scale projects or anything only made a few discord bots and random sims. But i am curious why / if there even is an advantage!
most unix based operating systems try to conform to large parts of the POSIX specification which mandates many common standards across unix based systems to provide specific sets of capabilities and APIs, while windows goes its own way and might not have those same capabilities and APIs but instead has its own set of capabilities and APIs
i think you'll often be fine either way, windows also has WSL2 which gives you the ability to run a linux distribution under windows (mostly at least)
unless you find that you really need something from one of the OSs that your current OSs doesn't provide you probably don't have to worry about it too much
other than that it might be good to lear out of educational purposes or or just gaining experience with that other OS, which can be very valuable on its own
Thank you. I have thought about switching to linux for a while. Never wanted to switch because i was scared games wouldnt run on it but thats not been the case anymore. Windows has been quite annoying / AI filled making me want to leave it
Wanted to see why a dev would prefer it over windows. And now i think i get it.
i run linux on my main machines both at home and at work since like forever, but own a mac and have access to windows on a computer at home that isn't mine, so can still test out things on those platforms if i want/need to
yeah thinking to switch to kubuntu or mint or something
you can try out a live distro from a usb-stick before you reinstall if you haven't already
when it comes to gaming i think it's still the case that there are many games that will only work on windows or at least works a lot better under windows, even if the situation has improved substantially on the linux side of things the last couple of years
I mainly play very light weight games nowadays. lessened alot on the gaming after starting my studies so i just play balatro or slay the spire every now and then and those run fine from what my friend tells me. not too worried!
The only thing I haven't been able to play on my xubuntu is LoL/TFT. đ
Probably a good thing LOL
đł
Hey all! I'm planning to swap to Linux since I really have no use for Windows anymore since I don't really game anymore. I've played around with linux from time to time, so I'm not completely blind. I was wondering if anyone knows of any good lists/guides for picking the right distro
I dual booted with ubuntu for a while, was hoping there'd be another good one to try
didn't have anything against it, just wanna spice it up
I'm sure there are other good ones, but ubuntu is the one I know, and is probably the most widely-used one
yeah fair enough
probably worth asking one o' them AIs đ
My vote goes to Debian. Less BS than Ubuntu, stable, boring. Not cutting edge, but I would nowadays consider that a plus.
I agree with all that. My preference for Ubuntu comes from my experience decades ago when it was the only distro on which things like my wifi and trackpad actually worked.
Yeah, that's thankfully no longer the case. Although it might also be a question of hardware; I only really have experience with Thinkpads in the last couple of years.
they had the reputation of being the most Linux-friendly, iirc
I think my last non-Apple laptop was a Thinkpad.
i would recommend linux mint, because it's a pretty good out of the box experience, similar to windows. I've installed it for multiple people already. If you want to customize a bit more, definitely Debian
Arch linux or Void linux
Install Arch
Everyone acting like arch is hard to use đ
I hae installed arch once, went fine. But if people think it's hard, then it's probably hard.
We can finally have a healthy community
I personally went with Mint because I didn't want to expend the mental effort on initial config, even figuring that I would probably have no problem figuring it out. And I knew it shipped with things I knew I was going to want anyway, like Firefox
snek
How can I make vim recognize .h as filetype c and not cpp?
I found the let g:c_syntax_for_h = 1 but unfortunately clangd still gives me cpp diagnostics.
You might need to give clangd a compile flag -xc
I'm not sure I want that. This is a single header file that I include in my cpp project, but that also has to be C compatible if someone else want to implement the interface.
Where would that flag go? Currently I build using cmake+ninja and use compile_commands.json as input to clangd.
it would need to end up in compile commands I think
I don't know enough cmake to say what you need to add there to say "hey these are C files", and have that reflected in the generated compile commands
I guess it's more complicated as this file is both cpp and c. I'm not really sure how that is supposed to be expressed, especially in a build system.
Cmake is crazy, I learn as little as possible đ
So what is the actual issue of treating it like C++ then?
Clangd complaining and giving a lot of warnings like
- "use
usingrather thantypedef" - "modernize deprecated headers
stdint.h->cstdint"
Which would be relevant for a cpp header, but which are not relevant for a C header
Does it have extern "C" guards?
I would hope that the checker could pick up on the
#ifndef _cplusplus
extern "C" {
#endif
idiom and provide lints for both, according to current context
It has, but that doesn't seem to affect it. Maybe that's something that clangd could actually do automatically. đ€ Good idea đ
(wait, are you involved in the development of clangd, then?)
No, but one can suggest it to them đ
(granted, I think extern C just affects how symbols are mangled)
my point is that it's a strong signal that the header is intended to be used in either C or C++ code (or indeed in a mixed-language project)
đ
Hey everyone! I need a bit of help on something related to docker, is it okay if I post here?
Docker is the "tools" in #tools-and-devops
chat should I duoboot windows and Linux mint
I just single boot on GNU/Linux fine
I mean I'm new to Linux thats why
then dual booting is great
I would suggest to pick a beginner distro like mint/ubuntu/fedora/opensuse
keep it simple and stupid
And what matters the most is to use it frequently
the more you use it, the more will have to deal with it and learn
and the easier it will get
I'm planning to either use puppy or mint
Also don't worry too much. Just try things and learn from it đ
Ok
never heard of puppy
I believe it might not be the right name tho
I would stick with the most popular ones since they are the easiest to google errors đ
the more popular the distro, the more likely you can find an answer about someone hitting the same problem. But if you use something not popular, then it's less likely to find someone who has experienced the same issue
True
Mainly I'll stick to user friendly os
Until I understand the terminal properly
so you could definitely want to try different distributions and desktops. But I would still recommend to stick with the popular ones to get started
yeah, beyond distros, you can look at gnome vs kde vs xfce vs a bunch of other ones
unless you use something super specific like autocad, you may end up single booting. Games are going great on GNU/Linux
(except maybe for the ones that require a kernel spyware)
Ik that
Also I will have to dual boot mainly because I plainly wanna use software that may be only available in windows or mac
I do know I could use wine or emulators
I haven't tried. I have only used the CLI version
a) I don't know
b) I'd expect it'd work fine on plain old Windows anyway
Why would you even use linux atp
Like the complete antithesis to the linux philosophy
And with the permissions you can seemingly give Claude desktop it will completely brick your distro at some point
For the love of God. HOW do I push to Github?
I genuinely despise this auth system and the documentation đ
And if I
- manage to find where to generate an ssh token
- Generate an ssh token without expiration date
- Magically underdtand/guess that I can supply this token instead of my password at the password prompt
How do I avoid having to authenticate every single push?
you don't do that 
set your remote URL as the one that goes over SSH instead of the one that goes over HTTPS
You are on linux, right? Do you have your keys in ~/.ssh? Have you cloned your repo with the ssh url?
Wouldn't help, got some UNKNOWN error
The html URL with ssh token as password works (who knows why) and then I used the git credential stash. It's feels fishy ugly and hacky đ
wdym unknown error
The error message contained the string UNKNOWN. I can't recall the full error in my head
You have the wrong remote configured (HTTPS instead of SSH)
I tried both, ssh one errors with s 65k port. Maybe it's firewall rule on my side đ€
Yeah, something like that is likely. At work SSH doesn't work because of our HTTP proxy which doesn't like HTTP/2 or something like that.
Likely the same and thing here
Might be intended, but seems strange that http would work in that case
But we do have a http proxy so
can you try ssh-ing?
to git@github.com
I'll try in the evening maybe
Dont you need to like use the Github CLI and save the authentication on .gitconfig
Github cli - no need.
Not sure about .gitconfig.
no, with ssh auth you don't need anything like that
Rom for what?
@spark mulch if outbound ssh is prevented by your firewall, often you can tunnel ssh through an http proxy by using nc connect in the ProxyCommand option. There's even an example in the ssh_config man page.
Not sure I wanna go that route in this case đ I'll leave it hard to access
(I don't think that's the issue in my case, it's the HTTP access that doesn't work.)
Galaxy Tab au 2020 tm-505 model
I alr found the custom roms dw
Is there an easy way to get a python for android? Not termux, I specifically need the whole python + pip for an app to execute with
I'd be very surprised.
I don't follow; can't you just get termux and then get python for termux?
After all, there will need to be something in place that lets you put Python files in places and then invoke the Python program.
chaquopy is basically the standard for embedding python in android apps
I need it to do this:
Python script -> Minescript API -> minecraft Java edition (android)
So it gets executed under the Minecraft app instead of termux. Is there an easy way to get python to do that?
Or yank termux python and put it into a different folder and have it just work?
I don't understand what you mean by "under".
When you use the script on a desktop, exactly what steps do you take?
I point the minescript mod to user/bin/python or whatever on windows, then type \script_name in chat, and it uses said python to execute the script with redirects for output to in game chat
okay, so point it to termux's copy of python instead?
How does one point to termux from outside of that storage?
...ah.
Has anyone created some more complex bash completions? Any tools to recommend?
I would like to do something like define all project-specific environment variables we have and let an empty command line <TAB> show those plus a description. Something like:
DEBUG=1 # turn on debug prints
FAV_FRUIT= # Pick from [banna|potato]
If the selection can be done with fzf (like fzf_bash_completion) that would be awesome.
Penetrating and understanding bash takes a lot of effort đŹ
A similar completion task I have is:
FRU<TAB>
FRUITS=(|)
(with cursor at the |)
FRUITS=(<TAB>)
Should open a fzf multi-picker and complete to:
FRUITS=(potato,banana,apple)
Hello
I'm pretty new to programming but i wanted some pointers on is there a kind of framework that i can learn to the following, since my corporate laptop has python installed.
I am mainly a SQL developer but we have a ton of stuff that i do where i need to login via SSO and run some sort of export commands , to do curls and stuff.
I wanted to build a sort of an application like how brew works,
So the high level idea is
I am mainly on MacOS so i want to like everyday open my terminal once and type in the password store it in sqllite or keychain.( i honestly dont know what to use but the idea is i expire it once the new day starts)
Then i run command line operations .
Is this possible to run apps with python , i honestly dont want to run python cli.py.
Can i bundle it up like an executable.
Also is there any framework that can do this for me
I found some code that used Popen(prexec_fn=os.setpgrp) and seems like it would be better to modernize it to the two arguments:
What is the the difference/similarity between start_new_session and process_group and why would one want to set them?
What values should I put to keep the same behavior as before? đ€
https://docs.python.org/3/library/subprocess.html#popen-constructor
I guess I need to learn about posix sessions and process groups?
The best docs I know of for this are the GNU LibC manual.
The GNU C Library
Thanks đâșïž
me am linux distro with python 3.13
git stow, yay or nay?
I have chezmoi right now, but it's too bulky and not a right fit for me.
GNU Stow, you mean?
For me nay, I have a simple system just based on Git, no extra tools.
- My dotfiles are all just in a Git repo, which is layed out as if it was my home dir
- I have
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'in my zshrc - To set up a new machine, I
git clone --bare url-of-remote $HOME/.cfg, paste the alias definition in the interactive shell, and then doconfig config --local status.showUntrackedFiles noandconfig checkout. - Finally, any changes to dotfiles can be interacted with using
config:config add,config push, etc.
Yes thanks, gnu stow.
Sounds like you made your own "extra tool". I thought gnu stow was basically something similar
In a sense, but the tool is just git, with no further assumptions
Sounds good đ
Yes
I used to use gnu stow, but abandoned it; I don't remember why đ
I do something like L3viathan -- I have a repo that's laid out like my home directory, and it includes an (annoyingly-complex) shell script that creates symbolic links in my home directory, each pointing to a file in the work tree
Yeah, I used something like that (script that symlinks recursively based on repo structure) before my current solution.
Let's see if I understand.
You make a bare clone inside home ~/.cfg/.git and make a worktree in ~/.git. And by having the alias, you can be inside ~/.cfg/ (correction: inside any folder) and still do commands as if you are in the worktree in the home folder.
Hmm. Why have the bare clone and separate worktree at all? Why not just a full clone into ~/.git?
with an install script that makes hard or symbolic links
No, the bare clone is in ~/.cfg directly (so ~/.cfg is the .git folder, essentially), and the worktree is my home directory itself.
There's no links of any kind, the files are checked out in their proper locations. The git dir is in ~/.cfg and not ~/.git so that tooling (e.g. my shell prompt, or git itself) doesn't realize I'm actually in a Git repo; I have to explicitly say config pull or whatever.
Aha, I see.
I heard there could be issues with .git in subfolders of repo roots. What actual problems do you get around by renaming it? Why not keep .git?
@spark mulch
Oh shell prompt you mentioned
Right
Sounds nice đ
Yeah, that, but also so that I don't accidentally commit something in the "wrong" repo, since all of my real clones are somewhere below my home dir of course.
Thanks
I made a new git subcommand:
git rebase --exec "$1 ; git diff --quiet || git commit -a --fixup=HEAD" "$2" -Xtheirs
and two aliases:
sed = !git grep -z --full-name -l '.' | xargs -0 sed -i -e
rename = "!f() { git grep -l --null $1 | xargs --null -I{} sed -i \"s/$1/$2/\" {} ; } ; f"
the sed is quite bad in that it opens and writes to every tracked file in the repo.
What does --fixup=HEAD do? Is that the same as doing --amend?
It's leaves it as a fixup commit. So doesn't squash it like amend does.
But I will change it to amend or put an option there to select between fixup or amend.
jj
@wheat shoal Meow!
Tell meow more about bsd, like your experience with it. Meow interested
im a beginner
well no actually beginner means not doing it long... im just crap
đ
it wont be anything compared to yours
ive managed to build a nas server. and i ran a dedicated arcade machine in it 15 years ago
It's alright. But I have 0 knowledge about bsd. And learning from people who has seen more failures >>> people who succeeded in first try.
idk if that was sarcasm
Where did you find that arcade machine?
i built it from wood from scratch
and wrote a game in visual basic 6
then i wrote a porter and ported it into python 2
managed to put freebsd on an old machine that ran automatically, wired up the controllers (2 player, 6 button, 2 starts, coin slot)
its flat-packed in my garage but its probabyl half rotted away by now.
meowmeow~
This must have been so much fun Meow!....
I once made a snake game in basic. I don't remember basics anymore. but I wrote my first program in it.
that's cool
ive tried making thousands of games ove r the years,literally thousands, succeded in a handful đ
I made myself a production framework so tht I can rightly translate the realworld problems into programming terms. Did you make something like that for yourself?
Tons of my projects are also pending :3
Meow
Like a point comes where the inputs I have chosen my program doesn't produce the desired output because I can't develop what functions to perform on those inputs I have
Also it was harder in earlier days
we didn't have libs to make our work easy
i dont know I don't fully understand the question
I wrote the first AI music bot that doesn't use internet, though.
đ
that was pretty intense
you click a button and it composers an original album in 10 seconds, then spits out the data in midi
so you put it in a DAW and produce with sounds etc
must be like 10 years ago or so now
i wrote a DAW once for film sound effects
a film needed 7000 sounds put in, microsounds like creaking leather jackets, footsteps etc
and using cubase or something was just overkill so i created this program that allowed you to watch it, and press a randomator thing with a keyboard in real time, then make fast micro adjustments. would ahve taken years without the program.
i dont think i'd use it again though, has limitations. was neccesarily at the time
I guess then that's not the problem you face in programming. Which makes me respect you even more. Meow
oh bless i wasn't expecting that
to be honest i thought at first i was being challenged and braced myself to be belittled and one-upped. as is common in chat rooms talking to other humans!
this makes me respect YOU even more!
I need some time to fully understand HOW YOU MUST HAVE MADE IT. I AM VERY EXCITED about your exceptional intellect. There has not been such an instance in my life where I could implement something as cool as this, I am still learning.
||You must be a prodigy||
I am interested in learning more about your projects. Mind sharing some more? Meow!
I didn't want you to feel that way. Meow sorry.
Python community is a place where work, creativity, and Ideas are appreciated (I mean, that has been the case with meow atleast.)
Btw everytime when you discuss something, you take me back to usually decades ago. I wonder what are you upto now.
difficult subject
to the grey hidden bit
doesn't usually end well in chat rooms
Well, debate sparks there easily. And then mind replays the same thing for days.
if i was a prodigy, it would only make me a target. people dont want to believe in anything like that on discord. an in many many years ive just been trolled, bullied, attacked for it
its a strange human instinct, fear of being inadequate (I'm quite poor by the way so, no worries there!)
For example a week ago, some people argued that books are outdated material to teach yourself about programming, I argued back saying it depends upon the learner. I can't change people's mind, but still mind will make more arguments, makes you angry and all. It's exhausting
also, young people, kids, particularlyl with white cat profile pictures, tend to be the worst of all.. no offense, im not prejudice i just kinda stacked up the statistics. you're going up against 500+ others :p
yeah ti does depends on the learner.
im a pretty decent programmer, good enough to realise ideas. but im flawed because i didnt have the right education or access to that stuff. i didnt even have the books.
so my programming techniques were very inefficient for many years, working around problems to do the best i can and make it work. nobdoy else to compare to, or chat to abotu it. GLOBAL EVERYTHING HAHAHAHA
global global!!!! global A global X!!!
neither me. I learned py and 8080 instruction set from pdfs
one day i actually met a programmer who wrote the same language and was friendly and he said "you know, you sohuldn't global everything..."
pdfs didn't exist :p
the internet didnt either
:S
actually, i just googled
neither did python LOL
oh yea
so i have always been several steps behind
I just came to know
with prodigy ideas, but just lacking the ability to execute them.
dealt a realyl bad hand, learned to play it well
I can't imagine how you managed to raise yourself from where you come. But you know, it inspires.
thanks
and
my main forte is music, composition, piano, and film directing
programming has always been a passion though
I like being against those people who lack acceptance. People who don't know how to respect competency
you're young though aren't you
they haven't chiselled away at you through your whole life.
you've got more fight in you, and if i was in your shoes, i'd do the same
And you smartly used your passion for programming
and abt the global part. There are conventions but who cares about them when you are building for yourself?
People say variables should be understandable
most of key var name in my code starts with meow, meowmeow, meow_meow meow1 etc
i dont global everything anymore
python globals actually.. really annoy me and i use a work around
im willing to almost make a money bet that there's no better way to do them
Hello đ
I get it, ig
i like how all the pedantic people missed an opportunity hours ago to tell us that freebsd 'isn't unix' (shhh keep it to ourselves!)
Anyone, who wants to "create" something, has it in them I think
Lmao
so it's not unix
ahh you ruined it!
it was a test, the subject at the top bar explains the inclusivity!
I don't seem to get it (meow dumb)
could u explain :3
Well I wanted to understand your sense of humour
im nobody
My short working memory got cleared
I need to reload all the characters in the buffer about our chat to make my text sene again
those people in the main chat are far better programmers than i am
This is meow's humour
Programming is a skill, actually any skill cannot be measured. And the way we humans has been measuring it traditionally is just very inaccurate. One slow coder can be good at debugging. Like there are various possibilities.
I try to learn, specially from people who has seen more errors, who learned things from scratch, people who learned like you. I don't have any programming related query either at the moment though.
And at the moment, i am interested in learning about your experiences. Not all programmers tend to share their cool projects like you do.
what is it?
i global everything in a different module, and have to reference the modulename.variablename every time.
becuase its actually less code than externing everything i need in every individual module
(was it extern? or global? i cant rmeember)
you get the idea.
how would YOU do it then? bearing in mind a multi-module project
It's kinda funny but whenever I had a multi-module project I would just define functions or methods. I never used global variables
Except for a few projects
But now that you have mentioned, I will see if I get to use it more often
I can imagine it being easy though. Also, what about readability?
Did it enhance it for you?
its all readable for me i find it very tidy
but i do wish i didn't have to reference the module each time
i wish i could declare a global variable name and thats it. whenever i write it, its global
becuase its working with a lot of data, its referenced a lot
hmm
You must be balancing pros and cons of making vars global
This is another reason I was never be able to fully understand programming
I just, don't make it till I get something that make sense out of the program
the variables must be referenced by several modules
so if they weren't global, whats the point
even if it was one module which is messy and non-modular, the variables would still have to be global at the top.
yeah they should be global
except for when you don't need them, like in functions
or loops
I just make classes and work with objects
OOP seems to be a lil easier for me
yeah i haven't really done the classes thing, i think.
i dont like OOP
i really love procedural
đ
always loved arcade game style
But then you don't need to define variables everytime for most of the things. So app like accounting tool that I was making for myself would work better with oop
i never really grasped teh TRUE definition of OOP.
but i dont think i really ever need to
i mean there's cross-overs
for example a socket, a packet being recieved
at some point in the procedure it'll be dealt with. so is it OOP, or is it still a procedure?
I like to have control of all events happening in a certain order, it hink it comes from drawing graphics
like background first, z-ordering (say, golden axe, streets of rage)
and then dealing with physics in the correct order
that was my forte, smooth physics
games that look old but feel good to play.
The procedural paradigm is also good. I have made many apps with that too. You get desired results matters more
Then you would like what one of my friend made
a game engine
ive written loads of game engines :p
just wish i'd filled them with more games! haha
Do you have them in github?
no i have no idea how to use github
only just learned baout github a few weeks ago
one of them is online but ive never tested the 'mac' version
I asked because I wanted to try them out. :3
Tell me more about other cool projects that you have made
Just like that AI composer
And tell me about the film thingy too
Like have you directed a film, even a short one, or your experiences in that domain
Where do I get it? meow
.
no way!! im scared!!
Why scared ?
Like
You are not used to with showing your creations?
you're anonymous i dont know you.
Oh understood. I respect boundaries. Meow
Hmmm I get it
I don't wanna see em to judge em tho
and also you're a white cat
ginger*
Meow
in fact every time i look at a cat now i just wanna fling it into space. its the face of venom; death
I understand, I am not cat, I am just a cat owner who likes cats.
haha
Meow not cruel. I will change the definition you have for white cats. And you will make meow an exception in your experiences :3
ginger cats * đ
There is no real agreement on this anyway.
Because OO is a moving target, OO zealots will choose some subset of this menu by whim and then use it to try to convince you that you are a loser.
https://paulgraham.com/reesoo.html
thats good to know đ
Haha
I think the object oriented part is more in the representation of how the code you write deals with those concepts. If a socket is represented as an object for example, with a method to write to it, and your code deals in this modeled concept, as a class and object, rather than file handles for example, even if there's procedural code mixed in. I think the overall architecture and how you structure and represent things and some patterns is what practically defines it.
I've never touched true functional programming, but in c, which isn't object oriented, you can program in a way where you can have a lot of the properties oop is good for, like information hiding, polymorphism, probably some form of abstraction through passing function pointers around, etc, and I could have a lot of properties in the python language without any explicit usage of objects I think.
yeah its hard to define. i dont fully get all the terms you said there but i think i get teh idea
oh, then you don't like python đ
in python more or less everything is an object and all data types are classes, even "simple" ones like bool, int and str, python doesn't have any primitive types like many other programming languages do, so even beginners are dealing with classes and objects without even knowing it
I love python
but what you said completely proved my point earlier
because its procedural, i follow it line by line, and yet you've just given a different definition of OOP by classes, data type etc.
which is exactly why i said i never will understand what OOP truly means. I think its just a loose idea.
i was just joking about that you first part ofnthat you don't like python then
and also highlighting how OOP heavy python is under the hood (i would argue even more so then even java which has historically almost been infamous for how OOP heavy it is), something most people coming to the language (python) doesn't realize until much much later when they are getting to know the language in-depth (unless it is explicitly pointed out to them early on), python is just really good at hiding it from beginners than for example java has been (that is however kind of changing now with the latest few releases of java)
yeah, python my look simple on the surface, which makes it quite easy to learn and use
but under the surface it got descriptors and stuff hiding, which is in turn used to hide much of the language underlying complexities đ
yes i can imagine.
I would love to collaborate for my next project
I didn't know that another debate will be sparked, you just told me that it happens to you a lot.
Reason I am learning C now. It's more simple than python
That gives python an edge. You can do very quick prototyping and see quick results.
yeah, you can do a lot with very little code
[C is] a simpler language but much harder to use properly (and securely)
Yep, I use different languages for different type of jobs just like how you choose weapons for different type of fights.
yeah, so that's why i've been learning rust for a while
Memory leaks, undefined behaviour and all, well I know that. But we have Rust now.
We kinda synced, mentioning about Rust lol. I am using their book to learn it.
but i wouldn't say rust is a simple language
Everything has some tradeoffs, "using this would take that from you", I must be wise while choosing a language for next project. Everything is dependent on a few variables such as development cost, time, and compute power and things related to our objective with that program we are writing. This list is not exhaustive though [about variables]
yeah, Go fits well for many projects where Python just doesn't cut it or isn't practical (due to distribution issue for example) and where Rust might be overkill
Rust gives me speed and security, but will take a little bit of simplicity that C has
I've heard that Go takes time on compilation. But it's a good language too.
Go is really fast to compile, it's one of it's strengths in the development cycle (at least compared to many other compiled languages)
Like there was one of my friend, they primarily used Go for most of their projects. They told me the Pros and Cons
I see, I must have misunderstood it then.
It's funny but I never intended to learn Javascript
Rust on the other hand is quite slow to compile, but the resulting binary is really fast and efficient
What trade-off does Go has then?
for web stuff JavaScript and TypeScript is really good to know
Yeah I was never into web development
Go is a pretty good all-rounder, but it isn't as efficient at runtime as for example Rust
we really should go to one of the OT-channels for this discussion though
They were really thoughtful to add cargo check
Well, as far as I know the py community, nobody gives a meow as long as we are not in python-discussion. But sure let's move there
it is bad form, we should stay on topic in topic channels like this one
I respect your emphasis on keeping things organized
so conversation continues at #ot0-psvmâs-eternal-disapproval message
Meow was waiting for you
meow!
python was probably first developed on Unix, and still works a bit better on Unix than on Windows
The overwhelming majority of computers run a Unix operating system, between servers and smartphones and routers and switches and IoT and macOS...
the only significant alternative is Windows, which I assume is (slowly) dying
Doing fine tbh, but Unix has clearly won absolutely every market but desktop
It seems pretty clear to me that Microsoft's priorities lie elsewhere nowadays.
Yes
Can I say that MacOS is Unix too?
Yes
im having problems isntalling python on freebsd, which is kinda rare. i cant actualyl remember what i did before. it says 3.11 or 3.1-something is on there already. i dont recall installing it on this particular box
and pip/pip3 doesn't work and i cant pkg install it. im a bit lost
is anyone able to help?
oh wait i just pkg install the libraries dont i. no such thing as pip...
all solved, disregard. had a brain fart.
hey you know that conversation we had a few days ago about OOP vs procedural
this rich library thing has thrown me right in the deep end. it's now full on OOP and I'm like arghhhh!
oop is kinda nice tho
i think it depends what you're into what you're used to etc.
for me it's a very different way of thinking, and i have been programming a long time lol
Unfortunately you can't choose what style library authors used :) Python supports multiple paradigms and takes a pragmatic approach to a lot of things. Where code is ugly, that's often more from the influence of other languages than from the author not being capable of better
or it is better and im old fashioned ;p
well, even if python has a lot of OOP that is hiding under the surface, besides data types (which by nature in python are all classes) the python standard library generally has the approach of preferring to provide functions as its interface towards developers over classes as far as practically possible, because keeping it simple is generally the goal, if possible, and also:
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
oh okay you consider OOP more simple than procedural?
OOP is complicated and it
- risks programming style where state changes hiddenly.
- risks encapsulating the wrong data by modeling real world "things" and hampering performance (https://www.computerenhance.com/p/the-big-oops-anatomy-of-a-thirty)
- risks making complex objects that are difficult to test
- the use of inheritance (or even multiple inheritance đ± https://journal.stuffwithstuff.com/2011/04/21/multimethods-multiple-inheritance-multiawesome/ )
- risks separating related code so that similar implementations are far away (trouble assessing the overall structure of the code).
- you might risk having pass through methods and need to update multiple classes when the base class method changes.
i would say it depends on the problem that you want to solve, procedural might be simpler conceptually, but sometimes you have a problem that is just easier to solve with OOP
in my opinion, one isn't always simpler than the other, but in many cases i think procedural is the simpler one, at least for simpler problems
!e
print(type(int), type(type(int)), type(type(type(int))))
:white_check_mark: Your 3.14 eval job has completed with return code 0.
<class 'type'> <class 'type'> <class 'type'>
what are you trying to do?
a type is an object đ
Good
Type
Object
Instance
Class
hlo
If we are new to mac , so it's unix based ? And what are the things I have to learn and keep handy . Could someone please help here with any advice or suggestions
yes, it's based on unix
what you need to learn depends entirely on what you want to use it for, what do you want to do?
To um it's a work mac so I just want to keep things handy . What interesting stuffs I can do?
it's a little bit like asking "what can i do with my hands?"
as you could learn to cook food, write a book, build a house or what ever with your hands
it's too broad of a question, you need to figure out what you are interested in doing that can be done on or with a computer
iâm gonna bark at unix
Installing Homebrew makes it easy to install and manage Python itself and various tools (such as Git) with just one command.
Homebrew is installed
Justin Mayer is an investor, SaaS founder, software developer, and open-source maintainer.
If that scares you enough to look for some other way to install python on MacOS, may I recommend https://blog.glyph.im/2023/08/get-your-mac-python-from-python-dot-org.html
There are many ways to get Python installed on macOS, but for most people the version that you download from Python.org is best.
two other favorites of mine are uv (which downloads precompiled versions for your) or pyenv (which compiles python for you)
https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
https://github.com/pyenv/pyenv
https://realpython.com/intro-to-pyenv/
I have loved uv for the year or two I've been using it -- but now this, which does not bode well
yeah, i know, it was a good run while it lasted đ
hopefully we will have some more time before it starts to stagnate
I wonder if companies like Astral are aware of how much people like us hate to see them sell out
I don't recall them saying anything like "we swear we'll keep it open-source; look, we signed a legally-binding document that forces us to do so"
it was bound to happen sooner or later since they were already funded by venture capitalists, that by definition what to make their money back and them some
Makes me feel good about resisting the FOMO and sticking with pip for my admittedly basic needs
uv has really been great and will probably remain so for quite some time even if its development slows down it's far ahead from most of the pack
so i wouldn't say it's FOMO and rather that you are in-fact "missing out" by "resisting" to try it, it doesn't take that much time to try it out and see what the fuzz is all about and if it might improve something in your workflow
if it wasn't so damn good compared to most alternatives i don't think so many people would have much of an issue with it and just move on
It can install packages faster and install versions of python easily, what am I missing out on? Pycharm sets up virtual environments for me automatically, and I don't see it as unreasonable to install something like pipx I think to install other tools without contaminating my virtual environment? Am I missing something?
i wasn't really addressing you, were i?
and maybe you do, maybe you don't, if that is the limited usage you are getting/seeing out of it
it's just does so much for me that i don't need to care about anymore
less different tools as i can use uv tool install instead of pipx amongst others, uv workspace, builds, running stuff in venvs without having to activate them, the list goes on
"python standalone builds" (that are now also managed by Astral), how do you get your many different python versions on your system in more or less seconds then?
also, i don't use pycharme very much, but that is just a personal preference, so uv managing my venvs as well as my dependencies for me is probably a bigger deal that for you that lets pycharm do that for you (because pip alone isn't doing any of that)
and i don't think "faster and easier" creation of projects, venvs, installation of both modules/libraries and python versions, upgrades of those as well is something to just scoff at, but that's just me, maybe something that isn't important to other people đ€·
I've been using venv in VS Code. I'm not saying uv is not good, just that in my case I haven't felt the need to adopt it, and I admit it's probably because I'm doing basic things compared to most Python developers
in fact venv was a bit of a lifesaver as I was trying to run something with Cartopy that wasn't playing well with Python 3.14 so I went back to 3.13 for that bit of code, but I could still run other things on 3.14
It's a public channel I was seconding/adding onto what you responded to. I'm just repeating my possibly ignorant perspective based on what I've heard or little I've seen.
I don't get python versions within seconds but I also typically get a handful from the repositories relatively easily on fedora for example, and if I need others I just install them. If they're needed for testing compatibility I probably have them installed on the ci runners in the workflow files. Yea it sounds nice and I shouldn't scoff at it, but given this controversy and before it I can live without it until there's an alternative.
I'm not really going to argue with you since I hear for how you work the features like workspaces sound like they're better than using venvs manually. To be clear I'm not trying to downplay it or be rude, I'm more coming at this from the perspective of most people (not you) seeming to act like life is shitty without it, and all my use cases get by without it. Isn't it also in the Unix philosophy to have many different small pieces you can use to do something rather than one monolithic one? I'm not trying to be a hater, I see the appeal for some of it, but I'd rather get this stuff from somewhere else.
What is unix
Unix is an operating system that served as the original inspiration for Linux
and for BSD which in turn was the basis of OS X
Today for average Jo it just means Linux in around 99% cases.
The OS used for 99% of modern web servers and game servers and databases hosting, software development, embed development, mobile stuff is based on it too
And sometimes we remember that Mac is technically Unix based too
For me when we say speak about Unix, it means usually about Linux systems and way how they work though. A certain standard of expectations how the system works and u can navigate it, a certain standard of common console level applications that is present in every one how to work with it, all specific folder/application locations. Once u are familiar with one linux system, u become very much familiar with every other one. Where u can find app settings, how to query processes, how to get logs and etc
Ooow I know linux
I use it also
I thought Unix something diff
Thanks for telling @wise forge @quaint tulip
yeah technically diff, very long bearded Nerds would say it is that original OS from 1970s meant that sparkled the life to LInux, became inspiration for linus torvalds to make his OS
But it is too long history, for many dozens of years when we discuss unix related stuff, we discuss only Linux and sometimes MacOs.
Saying unix is that OS from 1970s is same as to be that long bearded person and to say:

If openbsd, freebsd or opensolaris people would connect to discord, they would be very angry
It's a poor excuse/insult for such approximation
They all had their contribution, the BSD crowd and Stallman. Whatever the disagreements, let's not erase them from history
@wise forge it is good to educate users. Many don't even realize that Linux is the kernel nor understand free software and software freedom.
Just asking before I talk about whatever I'll talk about
Is there someone that occasionally edit their $PATH evironment variable?
yeah
$PATH.prepend("~/Env/py315/bin")
$PATH.prepend("/usr/lib/ccache/bin")
$PATH.extend([
"~/Bin",
"~/Bin/Godot",
"~/Bin/UABEA",
"~/Code/FOSS/aseprite/build/bin",
"~/.ghcup/bin",
"~/.cabal/bin",
"~/.cargo/bin",
"~/.elan/bin",
"~/.local/bin",
"~/.local/uv/bin",
])
u got any issues with it?
why would there be any issues?
xonsh
so typically nothing gets wrong when editing the paths
i was saying if someone uses the vanilla way (export PATH="$PATH:...")
i mean like, do u often get issues like duplication or unexisting paths or ur shell handles it?
-# (Yeah gon wait until somebody tells they use the average way)
EnvPath.add does handle duplication, but i dont use it lol
i havent had a moment where duplication would be an issue, it would only happen if i.. sourced my rc twice for some reason?
yess
this is a problem in my mind
ok, lemme say it explicitly anyways
in case you add something to the rc and source it again?
ofc
so, i am working on a utility that fixes your path and filter it from anything unusual like the duplication problem, unexisting paths or even risky ones (for example if u put "." in the paths or an application did)
@uneven arrow thanks for the info
so a login shell is just one that doesnt run your pre-launch lines, right?
man su tells you what the - option does.
man bash or man zsh (or whatever) will tell you about the startup modes of the shells.
When you "log in" the shell you're given is run in login mode, thus a "login shell", and sources (for /bin/sh) /etc/profile and then $HOME/.profile.
For bash and zsh it's similar, with some scope for shell specific stuff.
On most desktops, opening a new terminal also runs a login shell, something I find a bit annoying.
why's that annoying?
Shels run in login mode if their argv[0] starts with a - character. And there's often a conventional CLI switch tool.
IMO, if I ran the setup during the desktop init, my terminals shouldn't waste my time running it again.
On a modern machine the overhead's pretty small though.
ah, that's interesting
See these shells, which are in my terminals:
CSS[~/hg/css-pilfer(hg:pilfer)]fleet2*> psa|fgrep '_ -'
cameron 789 788 67747676 12 \_ -zsh
cameron 838 837 67720552 8 \_ -zsh
cameron 1173 1172 67739436 12 \_ -zsh
cameron 3510 3501 67747628 12 \_ -zsh
cameron 22593 22592 67739436 12 \_ -zsh
cameron 50177 50172 67729196 12 \_ -zsh
cameron 60196 60180 67747644 28 \_ -zsh
cameron 62894 62893 67747628 12 \_ -zsh
cameron 63477 63476 67747628 12 \_ -zsh
cameron 73685 73675 67720552 8 \_ -zsh
cameron 75075 75074 67728744 8 \_ -zsh
cameron 90348 90347 67738412 12 \_ -zsh
cameron 90438 90437 67731244 12 \_ -zsh
cameron 91024 91018 67739032 1688 \_ -zsh
cameron 80192 91024 67643964 740 \_ fgrep _ -
cameron 91204 91199 67747628 12 \_ -zsh
cameron 91301 91299 67747176 8 \_ -zsh
cameron 93125 93115 67747628 12 \_ -zsh
All login shells (because of the dash).
jesus h christ
Of course, I'm on a Mac and I don't get to run the login stuff during the desktop init. So it's kind of necessary anyway.
On Linux systems I tend to run a text console, and explicitly start a GUI desktop from there. So the text login runs the init, then the desktop starts and the env's already there. hence my grumbling.
On a linux both the process tree looks a bit like this:
>>> from cs.lex import printt
>>> printt(['text-console'],
... ( ['text-login -zsh'],
... ( ['xinit # starts desktop'],
... ( ['X Window server'],
... ( ['xterm'], (['zsh # nonlogin'],),
... ['xterm'], (['zsh # nonlogin'],),
... ['xterm'], (['zsh # nonlogin'],),
... ),
... ),
... ),
... ),
... )
text-console
â°âtext-login -zsh
â°âxinit # starts desktop
â°âX Window server
ââxterm
â â°âzsh # nonlogin
ââxterm
â â°âzsh # nonlogin
â°âxterm
â°âzsh # nonlogin
>>>
oh wow
The idea being that the text console runs the .profile etc.
i dont do that, i just use one shell session since ram is precious to me
even tho i have over a terabyte of swap mem
Swap only looks like you've got a lot of RAM. đ
old laptop, just getting by until i get a t14
what's a t14?
"download more ram" and so I did
thinkpad t14
found one for cheap and it has pretty good specs
Ah. I used to have thinkpads. The keyboard nipple was a big feature to me (less trackpad stuff).
I suspect trackpads are better these days.
It's handy with the nipple - big motions with a fast push, precise motions with a slow push.
I imagine there's a similar effect to be had with a trackpad.
thats basically mouse acceleration