#unix

1 messages · Page 13 of 1

wise forge
#

Human factor is the most terrible delay to wait for devs.

pliant quest
#

thanks for your advices

wise forge
#

For a right way u should be trying/attempting to do stuff on your own
And writing a wall of text, how u do it and what errors u encountered

#

than any human passing by could help if they encoutnered such problem before and not lazy to add input

#

then even if other humans do not help, by voicing all your steps and errors => u are very likely to reach answer on your own

#

like u just rubber ducked your way to finish
Otherwise other people could give small advices for else to try to feed your inspiration what else to try to fix it or make in a right way.
People are way more willing to help if they see your effort, and if effort on their part required is very small (and they don't need to interrogate you what u have)

pliant quest
#

i'm trying stuff on my own but it's not giving results for now
my problem is that i don't encouter any errors when it comes to python , only a broken file at the end, so i have no clue where to search and this is why i can't give much information
as of now i'm trying a new way

#

thanks for your advices i'll try all of this

wise forge
wise forge
# pliant quest i'm trying stuff on my own but it's not giving results for now my problem is tha...

Otherwise for actually discovering problems related to debian at every commit u could be just using Github Actions
You code could be having pytest unit tests, and GH ci could be autolaunching them to run at linux and check all is okay
https://github.com/darklab8/py-typelog/blob/master/.github/workflows/ci.yml

WSL2 is more rapid solution to iterate locally, and develop with comfort (or just developing straight from linux 😁 )
CI can be just an extra to ensure preventing degradation if u stopped using wsl2 at this point of time (u will receive Emails if it they crash, plus seeing red mark to commit as they don't pass)

wise forge
#

Docker is able to encapsulate inside not only Python dependencies
but also imitating Linux OS filesystem inside and having installed different system level dependencies (apt, and etc stuff)

#

that makes built docker a reliable artifact for launching, with 99.999%+ guarantee that it will work as intended on another machine

pliant quest
wise forge
#

it makes a lot of stuff way simpler

#

like if u need postgres, or redis, it makes it possible in a single command, within few minutes of your effort to find Docker hub and launch them

#

And also... if u will build from WSL2 Docker image for the correct CPU architecture of your friend (Amd64 / Arm64 for example) and save to docker registry (at docker hub)
the friend will be able to launch your app in a single command effort with all your dependencies being inside already installed (no relying on whatever python is installed at remote server, it will be already smth inside the image)

#

Docker is lightweight VM imitator, that creates an illusion of VM, imitates its own filesystem inside, but actually fully reuses resources of a current Linux machine
It is a really good "artifact" to build for launching at othe rmachines
Consider docker being a "binary" to build for web world. A real way to frozen all your python/system level dependencies and not relying on having then installed later and being available

pliant quest
#

ooooh dammn seems interesting

#

i with i had time to learn about that but class goes again in a week and i'm hoping for my bug to be fixed before this 😭

#

i'm saving all of this for next holidays to read and learn definitively

#

for now i'll just try with wsl for my tests

wise forge
#

Docker is not usable from Windows directly. That's Linux technology only. (there exist ugly tools to workaround it, but they should not be used due to problems they create, WSL2 or direct Linux usage is a way to go. Or optionally just using remote server or regular VM, but those choices are less comfy)

pliant quest
wise forge
#

there exists only extra important caveat

#

you said your friend uses RetroPi, which is likely having Arm64 CPU architecture. And your Windows is Amd64 CPU architectured.

#

Docker builds CPU architecture dependended artifacts

#

so u would have to build it on arm64 and save result ot docker registry for friend able to run, or provide friend with dockerfile to rebuild at arm64 on its own

#

any programs built for amd64 can't run on arm64 😅

#

you are separated by CPU architecture wall

pliant quest
wise forge
#

u have regular windows which usually runs on some intel/amd CPUs having amd64 arch

#

she has Raspberry PI server, which has arm64 architectured CPUs

pliant quest
#

this is what the server shows when i launch the ssh

wise forge
#

anyway, test your things on WSL2 for a start

pliant quest
#

ok lets go

fluid warren
#

Sounds good just a warning lfs is harder than gentoo, lfs is basically gentoo but you run every single make command manually while gentoo does most of them for you

#

I'll probably try lfs again sometime since I'm way more comfortable with the Linux system

rancid aurora
obtuse magnet
#

Figured out how to launch a transient systemd service via SystemD's API. Took me a minute

lapis cloud
#

So, there's Timeshift. It's a tool for making automated system backups. It works (by default) via rsync - when a new backup is made, it's compared to the last one and files that weren't changed get symlinked to the last one, whereas new and changed files get stored for real. This is a cool feature that saves tons of space.
Is there a way to achieve something like this, except also compressing all the files? Not for system backups, just for use on various directories one may want to backup.

#

(I don't just mean "is there a tool for this", but also "how can this be implemented at all". E.g. I was thinking of just adding each version to a single big zipfile, but this only sometimes manages to deduplicate the files, it seems.)

obtuse magnet
#

And sending of the snapshots via btrfs send, with no garbage, as opposed to plain dd

lapis cloud
#

Oh, that's an interesting idea. I wonder if I can make a BTRFS in a file via FUSE...

lapis cloud
#

hmm, is it possible to mount a file as a filesystem without binding it to a loop device? because the latter needs sudo, which is an annoying limitation to have

lapis cloud
#

The main issues are:

  • this is unix-only
  • this needs sudo to do sudo mount mycoolfs.img mycoolfs_mnt -o loop -o compress=zstd, which is quite a big thing to ask just for one feature.
    I wonder if I can avoid that last one somehow...
#

also btrfs needs a 120MB file at least, even if you don't use all that space

obtuse magnet
#

I had my own investigation on doing backups that don't suck, look into rclone and all of the backends/options available for it, maybe you'll find something suitable

magic sentinel
#

a question

#

what is the command to execute a querry in a SQLite database

#

on linux?

spark mulch
#

sqlite3 nameofdb 'your query'

magic sentinel
#

how do i locate my poetry enviroment to execute the poetry update?

#

i need to find it to install

fickle granite
#

are you sure? You can just run poetry in the directory that holds pyproject.toml, or any directory below that

#

but anyway: poetry env info --path will tell you

rancid aurora
#

I swear to god manjaro has been the only distro that ive used that works perfectly on a VM. other isos ive used have always had issue but only manjaro works well. is there a reason for this?

urban merlin
ember quiver
rancid aurora
#

I use vmware

maiden wigeon
#

i use windows because i am lazy

signal bane
#

you can make a good ssh with termux

#

and you can install zsh on it and oh-my-zsh

ionic goblet
#

is there an opensource alternative to something like thinlinc?

#

I want to do gpu intensive work remotely within the lan with multiple users that can login

ionic goblet
#

This is a discord server, correct?

#

I didn't know it's a search engine

#

I did find xrdp and tigervnc somewhat relatable for my usecase, but tigervnc isn't persistent. Not sure if any are suitable for gpu intensive work

#

I would use sunshine/moonlight if they could handle multiple users logged in at once

prime magnet
#

such kind person, I wish my boss would have your personality. Would be great to get so warmed feedback everyday, what a joy

ionic goblet
#

I don't know whats the point in trying to answer a question that you don't know the answer for, and in turn, misleading the person. Perhaps just...don't respond?

prime magnet
#

people from different experience levels come here everyday. I can't tell with just a single line question what you did or not before answering. Perhaps you can post your questions with more contexts next time to avoid vague responses. I did not mean to mislead you.

ionic goblet
strong gate
#

how to install python on ubuntu? i tried multiple times from website but it didn't worked?

fickle granite
#

"24.04 LTS (Noble Numbat)" comes with version 3.12.3, e.g.

strong gate
#

i'am a beginner, not aware about terminal

fickle granite
#

ah well if you're a beginner, your life will be simpler if you use the built in one

#

installing is not as easy as it should be

strong gate
#

where to get built in one?

fickle granite
#

I don't know what you mean by "get"

#

you already have it

strong gate
#

i mean access?

fickle granite
#

as above: it's /usr/bin/python3. If you don't know what that means, then you need to learn a little bit about Unix.

strong gate
#

Ty, moving ahead

fickle granite
#

how were you planning on using Python?

strong gate
#

for CP

fickle granite
#

I have no idea what CP is, sorry

strong gate
#

competitive prog

fickle granite
#

huh, well good luck.

gleaming fox
#

Shouldn’t need to install it

gleaming fox
#

@strong gate did you get it worked out?

strong gate
#

Yes

gleaming fox
#

Good deal

#

In the terminal, have you used the idle yet?

round lily
#

Any one need a website or an App developer?

wise forge
shy yokeBOT
#

6. Do not post unapproved advertising.

9. Do not offer or ask for paid work of any kind.

ionic goblet
strong gate
strong gate
rotund girder
main olive
rotund girder
#

What do you mean, no pycharm?

coral panther
#

Use VSCode, PyCharm Pro and Visual Studio 2022

mint fox
#

Use vi

#

usage: vi <filename>.py

bleak flame
#

My favorite but hard OS to grasp

rotund girder
bleak flame
#

lol

rotund girder
#

I see 👍 ☺️

#

I can use windows, but I can't use windows.

bleak flame
#

What? Why not?

rotund girder
#

Well, I have no idea how it works under the hood. Windows is magical, Unix is understandable.

rotund girder
#

Cross posting from general since I figured that's the wrong xhannel for this question:

How to make a python script behave differently if it's invoked by a command that pipes to another command?

$ my_script.py | fzf
formal schooner
#

Not sure how to do [ -t 1 ] in Python though

final island
#

actually scratch that I would backflip on my neck very soon after having to use windows

#

my environment matters a lot to me so I wouldn't be able to handle it

final island
#

very cozy

fickle granite
#

disclaimer: I just made this up now, I've never tried it

rotund girder
#

Good enough for me, thanks! @formal schooner @fickle granite

fickle granite
#

marginally cleaner: ```shell
🙂 [2024-09-11T06:33:22-0700][discord-recipes] % python3 -c 'import sys; print(sys.stdout.buffer.isatty())'
True
🙂 [2024-09-11T06:38:32-0700][discord-recipes] % python3 -c 'import sys; print(sys.stdout.buffer.isatty())' | cat
False

#

just in case stdout isn't fd 1 for some reason 🤷

#

also it avoids making the reader wonder "wtf is this 1 doing"

fickle granite
#

huh, I failed to notice that existed. That's better yet

ocean geyser
#

Should I convert my w11 Lenovo to freebsd 🤔

#

High key wanna learn unix

ember quiver
ocean geyser
#

Actually

#

Might wait a bit until I'm done with my project to tackle that lmfao

prime magnet
#

I remember installing Debian on my only pc (circa 2002) and I had no internet connection. I had to download dependencies one by one at college and then install them back home at night. Just to figure out I missed another bunch 😄

ocean geyser
#

Lmfaaaaooo

#

I might dual boot Linux on my PC I need to get back to using something besides windows

#

I haven't been using my VMs since I stopped studying for certs

ember quiver
ocean geyser
#

Yea my only experience with bsd is pfsense so I'll definitely spin up a freebsd VM before trying to convert my laptop

ember quiver
ocean geyser
#

Interesting, I might try that out

prime magnet
#

on Windows you also have WSL2 which is somewhat descent compared to version 1. It will help you to understand a lot of commands. Also Docker is another option these days.

ocean geyser
#

Ive used docker to spin up labs on linux

final island
rotund girder
#

How to make a command that wraps my script so that the default behavior is to always pipe the result to fzf?

# alias shortname  # how to write this so that
# short_name --banana, translates into
path_to_script.py --banana | fzf --ansi

But not for shortname --help 😬

upbeat lotus
rotund girder
#

Yeah, I'm wondering if this is my best approach. I just want the script accessible, convenient and transparent

#

Once again I think an abbreviation like fish has would have been the best.

formal schooner
#

depending on how the program handles its options, you might instead want to do something like this:

function short_name {
  local use_fzf=1 arg
  for arg; do
    case "$arg" in
      -h|--help|-V|--version) use_fzf=0 ; break ;;
    esac
  do

  if (( $use_fzf )); then
    path_to_script.py "$@" | fzf --ansi
  else
    path_to_script.py "$@"
  fi
}
#

interestingly this is one of the cases where shell scripting is actually a bit more parsimonious than python

rotund girder
#

Persimmon? 🍑

#

Thanks @formal schooner this looks great 👍

spark mulch
#

E.g. in zsh you can do alias -g H='| head'

formal schooner
spark mulch
winged abyss
rotund girder
#

Is it possible to do something like fish abbreviations in bash or zsh? I remember googling for this before without finding anything.

But. Worst case. It should be possible to hack something on top of tab completion, right? 🤔

formal schooner
#

And yes in Zsh there is something called Zle which lets you run pretty much arbitrary code to process your text input

#

Not to mention the wildly complicated completion system

rotund girder
#

For example you type ga<space> and it expands to git add on the prompt so that you can add more options before entering the command

#

It's nice because the command history will only contain full commands and never aliases that are personal to yourself. Good if you want to copy the history to someone else.

formal schooner
#

Ah that would be a Zle thing then

spark mulch
# rotund girder Is it like a suffix alias? And why is it cursed?

It's a global alias, it expands anywhere in the line. The cursed thing I'm referring to is actually suffix aliases, which work differently:

$ alias -s txt=vim
$ foo.txt  # opens vim with the file
$ alias -s net=ssh
$ myserver.net

It's similar to Windows file extension associations :D

rotund girder
#

Scary 😬 both global and the suffix stuff

rotund girder
formal schooner
#

i once tried using global aliases for things like piping to grep and head but i didn't use them enough to make them worth using, and they were spooky to have sitting around

fickle granite
#

aliases creep me out; for years I only used shell functions

#

Now that I've switched to Zsh (at Apple's gentle encouragement 😐 ) I use a few simple ones

summer trail
#

of the two, I could probably get rid of the L one and not miss it too much, but I use the D one only once in a while, and I've never memorized that incantation

spark mulch
scenic adder
#

hi

upbeat lotus
wide parcel
#

is "Unix" short for a Linux based system?

ember quiver
wide parcel
#

ah ohkay i was not shure about it, i was shure Linux systems are the base for Unix, but to be frank i dont know what Unix actually is 🙂 so thank you

formal schooner
hexed cave
#

No

#

Linux Is Not UniX

#

It's also just a kernel

#

Eg you can make an operating system distribution like alpine. That's not GNU but uses Linux

upbeat lotus
hexed cave
#

Typo

formal schooner
# hexed cave It's also just a kernel

I didn't want to get into that, also I don't really agree with the GNU kernel/OS distinction. Maybe if it were some kind of tiny core kernel, sure, but Linux has a huge surface area and very much shapes the way that programs can operate the computer -- that's good enough as the core of an operating system IMO

#

And practically there is no Linux OS that is not GNU-based, moreover GNU itself as an OS is vaporware, instead GNU is more like a userspace toolkit that you can build a complete OS on top of

#

So yeah there are some layers to it: your Linux-based OS (Debian, Arch, Fedora, Alpine) is built in part on GNU software and running the Linux kernel, but the kernel very much shapes how that higher level stuff behaves. It's not a clean separation.

spark mulch
formal schooner
#

IIRC it's Musl + Busybox but I don't know how extensively the GNU has been eradicated from the overall base system

spark mulch
green iron
#

How can I fix this ? Someone please help

fickle granite
#

you can start by pasting that text as text, not a photo of your screen

#

@green iron

green iron
#

i cant boot

#

something got messed while grading to ubuntu 24

final island
#

in that case, that is a horrible screen shot regardless

#

we can't even see all the output

#

you can do better than that

ember quiver
green iron
#

Okay I'll try to take a better pic next time and share here. Sorry

formal schooner
# green iron How can I fix this ? Someone please help

I can see it well enough to tell you that the error message is very clear about what the problem is: python-numpy and python3-numpy both install the same file and therefore are incompatible. personally i think this a packaging bug (the conflicting scripts should have different names, eg "f2py3") but it sounds like for now you need to remove one of those two packages. But none of this is relevant at all to booting into a graphical system...

green iron
#

so how do i remove one of it ? 🥲

formal schooner
green iron
final island
#

I was gonna say "oh yeah I would sudo pacman -Rns to uninstall it including extra unneeded dependencies it installed" but then realized that ubuntu

#

too archbrained

final island
final island
#

it will probably point you to some stackoverflow thing or some such

#

where you'll be able to learn what it actually means

green iron
#

oh okay. i will check that out

#

thanks guys

#

i'll update on the issue if there's any progress

formal schooner
final island
#

"aptly remove" hehe

formal schooner
final island
#

I've been using linux (excepting WSL) for around a year, and it's worked every time

formal schooner
#

I strongly discourage asking the autocomplete bot when an actual manual exists and is easy to read

final island
#

you should sorta know what the commands are doing

#

which is where you ask follow up questions if you don't understand some command it's giving you

#

but that goes without saying

formal schooner
#

Right, it's not a tool for a beginner who is already in over their head just trying to get their system working and doesn't understand its basic tools yet

final island
final island
#

@green iron listen to the lamp

formal schooner
#

Right, but for questions like "how do i remove a package" then yeah you should at least try to read the manual to understand the fundamentals of your own system

final island
#

yeah hahahahaha

#

when you put it that way, absolutely

formal schooner
#

Sorry to be cantankerous

final island
#

what I thought of is "why does this conflict happen, why is this package required by something (or why is it installed), what's the discussion about this issue that probably already happened, what will happen if I remove it", where at least for me, AI would help solve all or some of these questions

#

I never considered that the "remove a package" part of the deal could be an issue, but ig it is in this case

final island
formal schooner
final island
formal schooner
#

I mean heck try it

final island
#

so they are basically google that do some filtering for me

#

you gotta develop a balance of how much you should trust them, of course, but I make good use of them

formal schooner
#

More than likely it'll tell you that you have a package conflict and you will be able to Q&A your way to the right commands to investigate and fix

final island
#

cause usually, if I'm having an issue, there's a really good chance someone else already has; but searching for it myself can be cumbersome, and so it's often easier and faster to use an AI for that

formal schooner
#

So it will probably work -- but that's more than just asking the bot, you need to treat it like an expert with dementia

final island
#

oh well yeah, that goes without saying

#

ig I got used to that?

formal schooner
#

Yup it's a skill

final island
#

I have enough overall experience where I generally know what the right answer will be, even if I don't know the technical details

#

so I can tell when the ai is right or wrong, even if I didn't know that information beforehand

#

to highlight that you pointed out correctly that pointing a newbie at an ai is probably a bad idea

formal schooner
#

Once there was a time when people had to establish the same skills and instincts for search engines like Google

final island
#

there's a use that happens often with me

#

I want to know if something is possible in configuration of some software

#

and so I ask the AI "is it possible to [blank] in [blank]"

#

if it starts spewing gibberish, I assume it's impossible

#

simply so that I don't have to waste time and effort on things that are less likely to be possible, and focus on the billion other things I already know are possible

#

(I have a long todo list)

formal schooner
final island
#

:3

green iron
green iron
#

so basically., soemthing went wrong while i was upgrading from ubuntu 22 to 24. and i need to fix that

final island
green iron
#

i see "something went wrong " screen if i boot apart from tty

green iron
final island
#

has a lot of good features and is really powerful

#

I can't buy it because I'm in russia

#

but otherwise I would

green iron
#

i cant either. how aboout the free gpt 4o?

final island
#

I don't know about that one, haven't tried it

#

personally I use perplexity ai

#

if you are going to use ai, MAKE SURE to assume it's always lying to you

#

ask questions that you can prove right or wrong

#

blindly trusting an ai is a bad idea

green iron
#

oh okay okay

shut fractal
#

What's this channel for lolmau xD

final island
#

but then it sparked a conversation

peak inlet
#

Hi, I'm using Ubuntu 22.04.5 LTS. This morning I installed some software updates... and now my file view stopped working (the files are still there), I just open files and it keeps loading as shown in the image without showing me any folders or files... does anyone have any idea of ​​how to fix this?

fickle widget
#

can you provide the details of the updates you installed

median garden
#

i would open it from a terminal and see if there's any errors in stderr

shut fractal
final island
empty sky
#

username censored for obvious reasons

fickle widget
#

gorgeous

empty sky
empty sky
# fickle widget how did you set this up

The stuff that's visible there is:
Alacritty(terminal emulator)
Grubbox dark hard
Neofetch
The blue thing which shows the cwd is power something sorry can't remember exactly

fickle granite
clever phoenix
#

What’s the biggest difference between a Unix os and a windows os

wise forge
wise forge
# clever phoenix Linux sure

Then biggest difference:

  • Linux is free. Licensed version is seriously free for all mainstream stuff.
    • that alone makes it easy to abuse in server infrastructure for raising hundreds servers for free if necessary. That allows handling horizontal scaling where we increase numbers of servers instead of their power. Destroy and create server instances as much often as u desire
    • that simple fact built ecosystem around to automate its configuration and having all server infra dedicated only for it.

Since it is free and open source as well as many its mainstream diatros...
Even if u a using it for desktop as dev machine...
...u a really left in control to be full admin of it and able to change literally everything. As long as u inserted admin authorization, the OS is not fighting you or restricting in any way, including not forcing onto you auto updates, unwanted antivirus, or any other dumb decision windows makes.

  • also since it is real user oriented, each new version of distros is not hiding settings, configuration away behind some new marketing move.

So... In a short Linux OS is built with comfort at least for developers.

clever phoenix
wise forge
# clever phoenix How about like structure wise

All Linux OSes usually adhere to be very similar at console level

Having same rules, folder names where everything should be and it should be organized and working.

All same rules to commands and how to read their help

As mainstream most of Linux OSes are based on debian, so once u learn how to work with Ubuntu (based on debian)/debian, u are able to with with 2/3 of Linux OSes in exactly same way

Visual interface can variate for desktop machines, people choose whatever they want.
I am fan of KDE plasma interface, so I go with Kubuntu for desktop (Kubuntu + KDE)
By default Ubuntu is shipped with Gnome interface

#

Between majorly different Linuxes, having entirely different under it distro, usually biggest difference for user only which package manager is installed.
Well.. sometimes can variate default shell language too.

Anyway I just stick with debian/Ubuntu family and I am good then

#

So in the end, u usually learn how to use Linux at console level for specific family, and then u are good to use it

#

Console is quite comfy, because often faster to use, and devs are not lazy to output detailed information what is happening
Also not least importantly, easy automatable for configuration of servers

clever phoenix
#

No like structure wise how is Linux and windows different

wise forge
clever phoenix
wise forge
clever phoenix
#

Cool

wise forge
#

Never touched its kernel. It is there.

#

For me Linux kernel is important only from point Docker is able to run multiple containers in efficient way
By grabbing same host kernel

At windows it can not, without running somewhere Linux vm

clever phoenix
#

Thanks

rotund girder
#

#editors-ides message

As mentioned, my terminal breaks after suspending applications like vim/nvim/helix. This happens in bash after I have used fg from a key binding.

Every 2nd time I do ctrl-z to suspend the editor to the background, my terminal enters a broken state where I can't see anything I type. To reset my terminal state I have to blindly do stty sane<enter> to get it back into functional state. so weird!

If I compare my tty settings with stty -a command and diffing, I get this: (The red settings is when my terminal is "sane" and working. The green settings is a broken terminal)

#

Does anyone have any guess or idea what could be going on?

spark mulch
rotund girder
#

So the annoying part of my input not showing is due to stty -echo being set.

$ echo $TERM
xterm-256color
#

I also noticed I get the same behavior when ctrl-z (suspending) python3, so it's not only for alternative screen (fullscreen) TUI application.

rotund girder
#

I also experience the issue in xfce4-terminal 0.8.10, which has this:

$ echo $-
himBHs
$ echo $TERM
xterm-256color
#

shell is bash version 5.1.16(1)-release (x86_64-pc-linux-gnu)

rotund girder
#

And I noticed by inspecting tty from another terminal that the strange settings are set when I do ctrl-a to foreground the process

empty sky
#

thanks for the find

rotund girder
#

👀

#

I think I asked at one point, how to make a poll. And someone was angry because I asked and didn't look it up myself 😩

royal wasp
shut fractal
#

Is it possible to make my Crostini use a partition of my external HDD to store all of my debian VM container's data? (basically the whole "/" directory)?

sterile shell
#

@scarlet pivot what you rocking

broken kelp
#

What desktop environnement would you recommand that doesn't use mutter nor wayland ?

wise forge
tiny flint
#

crip

broken kelp
#

I need to be able to create virtual monitors. Mutter has a bug preventing it, and wayland doesn't handle it for the moment. iirc virtual monitor didn't work on kwin either

wise forge
broken kelp
#

so I can have some app on fullscreen on 2 monitors

#

I have a xrandr scripts that does it and it works great

#

I was using Cinnamon, but I've upgraded from Ubuntu 22.04 to Ubuntu 24.04 and now playing with virtual monitors makes Cinnamon crashs...

#

Apparently it's a bug in mutter

formal schooner
#

But not Ubuntu blech

broken kelp
broken kelp
broken kelp
formal schooner
#

LxQt is low-key great anyway

#

Feels a bit more like "WM + apps" than most DEs, not well integrated

#

Xfce also great if you want something more coherent

rotund girder
#

I'm trying to have Firefox as default browser, but I can only get xdg-open to launch chromium. Is there a way to debug why this is happening? xdg-open didn't have many options on the cli.

I'm guessing maybe missing .desktop file. Where is that located on Ubuntu (with xfce)?

#

I do have a /usr/share/applications/firefox.desktop

shrewd stratus
rotund girder
#

I solved this!

Had to use xdg-settings set default-web-browser firefox.desktop 🥳

hexed cave
shy yokeBOT
#

Modules/socketmodule.c line 7924

#ifndef __GNU__```
knotty igloo
hexed cave
#

Oh hurd

#

Why is there no issue for this commit?

spark mulch
final island
broken kelp
#

that would be my choise otherwise

main olive
#

Anyone know how to use symlinks for automating the management of dotfiles? I have a system that works for me, but I'm curious how others manage their dotfiles ^^

fickle granite
#

Mine are in a git repo, and I have a (fairly nasty) script that symlinks them into place.

final island
#

I should switch those to be hardlinks though ngl

spark mulch
#

I used to do this as well, with a self-written symlink manager thing, but I've since become enlightened. My home directory is a (bare) git repo.

shy yokeBOT
#

.zshrc lines 27 to 30

alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# git clone --bare ... $HOME/.cfg
# config config --local status.showUntrackedFiles no
# config checkout```
spark mulch
#

No symlinks, just real files. I config add files I want to track, config push to sync it to Github, etc.

final island
#

the big reason I like the symlink approach is that I get to make the file structure / file names that make the most sense to me, rather than what a given program expects

#

then in fuzzy searching, I don't have to shovel through a million files called "rc" or "config"

spark mulch
#

I see that, but you could also just search files tracked in your repo, I think

#

E.g. config ls-tree -r master --name-only | fzf (which you could of course alias)

final island
spark mulch
#

True. If that's more important to you, then perhaps it's not for you.

final island
#

so basically I'm putting in a bunch more effort to have a nicer filestructure that I interact with

spark mulch
#

For me it was a pure upgrade, since I anyways copied the same structure inside my dotfiles repo and then recursively symlinked them into the correct place based on the directory and file structure.

spark mulch
final island
#

I heard stow does exactly that

final island
#

via symlinks

spark mulch
final island
final island
spark mulch
#

I see

final island
#

and this script ↑ tracks the overall install process of things

#

so if I ever need to reinstall my os, I follow a bunch of scripts that do that

spark mulch
#

Yeah, I had a similar thing (with a single curl | bash setup script)..

formal schooner
#

I used to use dotbot to manage symlinks

#

I liked the level of control vs GNU Stow

rotund girder
#

I use chezmoi to manage my dotfiles as a separate repo. It keeps a copy of the tracked files and alleviates syncing the used file with the copy in chezmoi directory.

It's a bit complicated but supports file properties and encryption. It's a bit too complicated for me, but I got it working and it works very well now after I learnt it.

final island
final island
fickle granite
rotund girder
#

If anyone is doing chezmoi with vim I recommend this config:

" Quick way to edit config file(s)
map <leader>e <cmd>Files $CHEZMOI_HOME<cr>

" Automatically apply update to config files with chezmoi
  autocmd BufWritePost ~/.local/share/chezmoi/[^.]* ! chezmoi apply --source-path <afile>
#

So, only update the tracked, and automatically sync to the real file on every save.

final island
rotund girder
final island
#

yeah indeed, for what I do, symlinks are enough

#

I need to look into using hardlinks more though

main olive
main olive
formal schooner
final island
#

what's the benefit over hardlinks / symlinks?

#

a reflink just seems like a worse hardlink, I'm sure it's more helpful than I imagine though

spark mulch
#

reflinks are just copies that don't copy any data until something is changed

final island
#

and also how do you make them? with the ln command also using some flag?

spark mulch
#

conceptually they are just copies

#

You make them with cp, on supported filesystems (e.g. BTRFS)

final island
#

yep, got that

#

my question is why is that potentially more useful than a hardlink

#

which is as real of a file as can be, without taking the extra space

spark mulch
#

Well, it has different uses. If you change the file, all (hard) links to the file notice that change. If you "make a reflink" and change the original, the copy doesn't see those changes. Because it's a copy.

#

A reflink also doesn't take up space (until one of the copies are modified)

final island
#

so editing a copy updates the original, but editing the original doesn't update the copies?

spark mulch
#

No, they act like regular copies. Edit one, it doesn't change the other one

final island
#

wait so it's literally just a copy, no other fancy special behavior?

final island
spark mulch
#

Yes, exactly.

final island
#

oh

#

I got my hopes up lol

rotund girder
#

Trying to use pyenv for the first time to install pylsp globally. But for some reason I have another path in front of my pyenv in $PATH 🤔
But after launching bash inside my bash, it's fixed. URGH I dont like how $PATH works ...

fickle granite
#

Yo dawg I heard you like $PATH

rotund girder
#

Why does pyenv go into ~/.bashrc and not ~/.profile ? 🤔

#

Seems wrong >.> I'm trying to learn now and I'm becoming confused by tools telling me to modify my PATH in .bashrc ... 🤯

fickle granite
#

I think .profile only affects "login shells", which in this day and age, are rare

#

whereas .bashrc affects any interactive shell

#

I hate it when tools fiddle with my dotfiles 😦

rotund girder
#

.bashrc is called whenever an interactive shell starts, so if I do bash inside bash, I will source my .bashrc again

fickle granite
rotund girder
#

If I append to PATH in .bashrc it will grow (not good)

fickle granite
#

otoh iirc if you "do bash inside bash", the child will inherit variables from the parent, which could be confusing

rotund girder
#

.profile seems to be called only the first time the shell is started, not for each invocation of bash inside the first one

fickle granite
#

yes, that's roughly what "login shell" means

rotund girder
#

yes, so I dont understand why login shells would be rare?

#

Isn't it just PATH should be appended to in .profile and not .bashrc ?

fickle granite
#

nobody has "logged in" to a computer since about 1982

#

or at least, you don't get a shell after you log in; instead you get windows or MacOS

#

and you can then manually start a shell if you like, but only about 0.0000001% of all computer users ever do so

#

you, me, and a couple of weirdos over there --->

rotund girder
#

uhm but, I'm meddling with config files related to my shell, of course I will use a terminal and do weird things and want it to behave? o.O

fickle granite
#

yes, you are one of those 0.00001%

#

anyway, the idea behind .profile was that stuff in there only needed to happen once, when you "logged in".

rotund girder
#

But, all instructions that tell you to modify PATH in .bashrc, who are those written for? >.>

fickle granite
#

most .profiles these days basically just source .bashrc iirc

rotund girder
#

that's quite sad

fickle granite
#

here's mine in its entirety ```

~/.bash_profile: executed by bash(1) for login shells.

Allow core dumps

ulimit -c unlimited

if [ -f ~/.bashrc ] ; then
. ~/.bashrc;
fi

Change the terminal's title to include the hostname. "help echo"

says I can use \E instead of \033, but it lies.

echo -e "\033]2;$HOSTNAME\a"

I don't really know what this is for, but I do know that if it's

set, some python stuff doesn't install properly on Amazon Linux.

e.g., "pip install acme-nginx" puts the Crypto library someplace

that Python doesn't find it.

unset PYTHON_INSTALL_LAYOUT

#

haven't looked at it in years

rotund girder
#

Where do you modify PATH and how do you make sure you don't get multiple appends of the same path into it?

fickle granite
#

that's two questions

rotund girder
#

indeed

fickle granite
#
  • I have a nasty python script that creates my environment variables
  • it takes care of eliminating duplicates
rotund girder
#

I see 👍 This shouldn't be needed T_T

fickle granite
#

🤷

#

cuda
shuda
wuda

formal schooner
#

I have a solution for this as well, I built my own framework for it

#

(mine is just posix shell scripts)

rotund girder
#

My environment became much more sane today when I started using .profile 👍

#

I think I'm confused or missing some knowledge, what is going on here?

$ pip install asciinema
Collecting asciinema
  Downloading asciinema-2.4.0-py3-none-any.whl.metadata (19 kB)
Downloading asciinema-2.4.0-py3-none-any.whl (97 kB)
Installing collected packages: asciinema
Successfully installed asciinema-2.4.0

$ asciinema --help
Traceback (most recent call last):
  File "/usr/local/bin/asciinema", line 5, in <module>
    from asciinema.__main__ import main
ModuleNotFoundError: No module named 'asciinema'
#

Also:

$ pipx --version
Traceback (most recent call last):
  File "/home/david/.local/bin/pipx", line 5, in <module>
    from pipx.main import cli
ModuleNotFoundError: No module named 'pipx'
fickle granite
#

it makes me sad that we all have to go to such effort just to get a sane setup

rotund girder
#

Agreed, that's what I was getting at with "shouldn't be needed T_T" remark earlier.

What's the escape path?

formal schooner
#

Depends: escape from what?

rotund girder
#

Freeing future devs to come up with there own fixes for this

#

Making it simpler to learn and use.

formal schooner
#

Yeah, but it depends on what aspect of "this" you have in mind

#

For example PATH being just string means we lack idempotency and it's generally difficult to work with safely

#

Zsh for example exposes a path array that keeps PATH in sync

#

That's a solution if you're a shell user, but maybe instead we need a standard C API/ABI for manipulating "array" environment variables

#

And I think a big part of the problem in general is that every shell does it differently, and here we are trying to adapt something designed for shells, that only works in shells, for use in things that aren't shells

#

Every OS does things differently too, for example, on Mac every shell by default is a login shell, whereas in other systems only your first login on TTY is a login shell, and you never get a login shell at all in a GUI terminal

#

So then you have another problem, not only does every shell do it differently, but every graphical environment does it slightly differently

#

And there is more than one way to do it

#

Ultimately I actually think the idea of setting environment variables in a dedicated process and then printing them (null-separated ofc) to be merged in by the parent process is a nice compromise that doesn't require everybody in the world to redesign everything

#

It's very Unixey at least

#

Unless you want to do it all in a C shared library but that makes it significantly harder for a typical user to interact with, and relies more on application developers

rotund girder
rotund girder
formal schooner
#

As in, terminals are free to do it one way or the other, but the conventions vary

formal schooner
#

Eg on Mac there's no way to set env vars for the entire login session, there's no .xsession equivalent

#

So I do it in my Neovim config because I like using a GUI frontend that I launch from the dock, not a shell

shadow cradle
#

Idk what i am speaking

#

..

#

Sry

#

Wrong place

rotund girder
final island
#

I hate installing python software ngl

shrewd stratus
final island
#

haven't heard of uvx though!

#

what is that?

rotund girder
#

I used pyenv for first time last week and succeeded, I think

#

I had to tbomb my Ubuntu system python with some --break flag though

spark mulch
#

that.. doesn't sound like you succeeded tbh

rotund girder
#

I think I really did, why not? 🙂

#

It was stuff I installed 3 years ago into system python, so wanted to get rid off it now.

fickle granite
undone idol
#

Hi I just updated my Ubuntu from 22.04 to 24.04
But now for every action such as running python files and others, I need to create virtual environments repeatedly

When I am running it as normally. Message of externally managed environment pops up

What to do for this problem?

formal schooner
#

it's trying to stop you from pip installing something system-wide, which can and will ruin your ubuntu installation

#

sudo pip install is the equivalent of running sudo make install into /usr/lib for some C library -- you would never do that

#

pip install --user is better but not better enough

undone idol
formal schooner
#

and if you are installing python CLI tools, use pipx or uv tool which creates the venvs for you

undone idol
formal schooner
obtuse magnet
rotund girder
#

Complicated issue? 🧠

What happens with current directory for the exec command during an interactive rebase? I'm seeing strange issue with git grep complaining that my glob is matching files outside the repo root. I'm running git grep as part of a make invocation that looks like make -C a/b/c/ target

Outside of rebase -i --exec I'm not able to recreate the issue

formal schooner
#

Do you have a stray .git directory in a parent directory?

rotund girder
#

I can make a minimal example. I'm wondering if this is related to git bisect restriction that you have to stand in the repo root.

formal schooner
#

Huh interesting

formal schooner
fickle granite
#

I'm surprised I've never run into that. Maybe it's because I never use rebase -i --exec

rotund girder
#

Successfully rebased and updated refs/heads/main. ugh! Not what I want, damnit 😛

fickle granite
#

I love git, but it does have some dark corners

rotund girder
#

I will have to compare git version when I get back to office tomorrow

#

I'm on git version 2.43.0 on my personal laptop

fickle granite
#

I can't remember the last time that the git version made a difference to anything I needed to do

rotund girder
#

You dont use --fixup=":amend:newmessage <or whatever the syntax is>" daily? 😛

fickle granite
#

I fixup, squash, and edit dozens of times per day

#

but I have a slick UI handle the actual commands for me

rotund girder
fickle granite
#

I am not sure which versions I use!

rotund girder
#

I dont use a gui though, only tig (which is a TUI)

fickle granite
#

the UI hides that

#

pretty sure I reword often, and amend often

rotund girder
#

aha, then it's probably just regular fixups. reword: is a fixup that only changes the commit message but not the content

fickle granite
#

yep I do that a lot

rotund girder
#

I doubt it creates a fixup commit though, it's probably just doing a rebase reword under the hood

fickle granite
#

bet it does both

rotund girder
#

git commit --fixup reword:HEAD is rather new, what UI do you use? 🙂

fickle granite
#

I see this ```
0 git … add -u -- project/app/tests.py
0 git … commit --no-gpg-sign --no-edit --fixup=959fef8 --
ruff.....................................................................Passed
ruff-format..............................................................Passed
djLint formatting for Django.........................(no files to check)Skipped
djLint linting for Django............................(no files to check)Skipped
[just-for-fun a9f6205] fixup! Maybe it's time for a nap --
1 file changed, 3 insertions(+)

0 git … rebase -i --autosquash --autostash --keep-empty 959fef8^
Successfully rebased and updated refs/heads/just-for-fun.

#

not sure how to interpret that

#

the ui is called "magit", and it's the best UI for anything that I've ever seen. Unfortunately it is not available to you, or to any normal human.

rotund girder
#

I know it's emacs plugin 🙂

fickle granite
#

you must be a member of the super-sekrit "Crazy Emacs Users" club to use it

#

and much as I love Emacs, I would not recommend that you use it just for magit.

#

Unless you're into weird-for-the-sake-of-weird

rotund girder
#

At the office (20 engineers) emacs was the most used editor until 4 years ago. Now vscode and vim users are more numerous.
Everyone uses emacs through script or command line tool for 1 specific feature of 1 specific plugin/mode 😛

fickle granite
#

wow, curious

#

I've never run into more than a couple co-workers who used it, and that's when I worked for a giant globe-spanning company

#

anyway, the word "reword" doesn't appear in magit's own git log more recently than 6 years ago, so you're right: it doesn't use that fancy new feature

#

I imagine they don't use fancy new features unless there's a huge benefit, since of course doing so would break backwards compatibility

rotund girder
#

there's no reason to use the fixup reword: unless you want to delay the rewrite of the commit history (updating/replacing the original commit would give you new commits for all following commits.

fickle granite
#

...

#

that just proves I have no idea what that feature does

#

git has added piles of new features in the last couple of years, and I haven't learned any of them 😐

rotund girder
rotund girder
#

scarily close to my issue, but I doubt I have that old of a git version at work 🤔

2.15.1.txt: * A recent regression in "git rebase -i" that broke execution of git
2.15.1.txt:   commands from subdirectories via "exec" instruction has been fixed.
#

On the other hand git v2.16 is 5 years old, and I run Ubuntu 18.04, so ...

final island
#

I also have a git question

#

I forked helix, added some commits of my own

#

currently the fork is both behind and ahead of upstream/master in commits

#

there's a PR in upstream, that I want to take

#

it starts from a considerably older commit than my fork starts on

#

the pr also has messy multiple branches, with merge commits here and there, so I can't just cherry pick the PR's commits to then put onto my fork

#

how would I go about merging in / rebasing a PR like this? git merge-base is returning nothing, merging errors with the message of "refusing to merge unrelated histories"

#

is the best course of action to just give up, because the PR is too messy, or is there a reasonably good solution?

fickle granite
#

it's odd that "git merge-base" says they're unrelated, I wonder if you're doing it wrong

#

is your work someplace where I can see it?

final island
final island
#

I've implemented a few other PRs into my fork, with those the commit history was clean, so I could just cherry pick the commits and place them onto my branch, however this PR wasn't this straightforward

#

cherry picking has a nice advantage: I could squish all those commits into an older "merge #123 by @author" commit, retaining the commit messages and co-authors; seems like it won't be that straightforward with this PR
I considered just doing some sort of reset, but it's hard to understand where the commits of the PR start, they mix together with master in such a way where it's hard to understand how I'm supposed to get just the PR's changes

fickle granite
#

I'd add upstream as a remote (if you don't already have it), and just try merging ... lemme see if I can do it

final island
#

I'd add upstream as a remote
if I understand this correctly, yeah I already have this

#

upstream is available in my remote branches

fickle granite
#

looks like upstream never merged it fwiw

final island
final island
#

this is not a show-stopping feature, so I'm just interested to learn more about the dynamics of project maintenence, most of all

final island
#

which is why I started my fork, to add things in. so far, with far better success than expected!

fickle granite
#

hm, I'm stuck; the PR doesn't exist as a branch in the original repo; and I don't have the "gh" command set up, so I don't know how to get it

final island
#

the cli is very simple, and often times interactive, so there's no setup required really, and if there is, it tells you

fickle granite
#

in the Old Days® a pull request included a URL from which you could fetch 😐

final island
#

however checking out the pr with gh still gives me the branch

fickle granite
#

well I'm making dinner at the moment; might get back to this in an hour or two

final island
final island
fickle granite
#

ok, just tried git … merge --no-edit prompt-history, and got a conflict in a single file

#

which should be solvable. (I am not about to try; I have no idea what this project does, and I don't remember any Ruby)

final island
#

thank you very much :3

formal schooner
final island
#

I really want to learn how fixup commits are useful

#

considering that I can just amend a commit anyway

#

or rebase and blammo

formal schooner
#

well i have definitely wanted to amend a commit that wasn't the most recent commit

final island
#

so I feel like I can already do things fixup commits do, more easily, and don't quite get their usecase

formal schooner
#

but i don't understand how --fixup works after reading the manual

#

right, same here

#

i can just do reword or fixup or squash inside an interactive rebase and be on my way

final island
#

I use lazygit fwiw, and amending an older commit just does a rebase automatically for me

formal schooner
#

or is the idea that i can do a non-interactive rebase and still get fixups? i prefer interactive anyway so i can check that the todo list makes sense

final island
#

while also providing easy functionality for fixup commits, for not sure which reason

formal schooner
final island
final island
fickle granite
#

my hunch: traditional git tools discourage you from "modifying history", and instead create new commits whose log message starts with "fixup:"

#

However, I, and I suspect many other people, modify history willy-nilly, so we don't really need such things

rotund girder
#

If you are more than one person working on a branch, it's less disruptive to create new fixup commits and modify the commit history later when others are ready for the change.

#

I create fixup commits with keybinding directly in tig, or by doing interactive rebase directly from tig as well. Lazygit just automates this somehow for you. Since I know how to do it by myself, I just prefer the control that gives.

spark mulch
#

Ah, I looked it up, so to sort out the confusion for people like me who've never used --fixup:

It's a flag for git commit that makes it actually not do a fixup (yet), only mark the new, regular commit as being destined to be upfixed (?) on a specified commit later: When you rebase with the --autosquash option, which will reorder and squash/fixup the commits based on this prior annotation.

final island
#

so I'm trying to figure out why them, instead of just rebasing directly

final island
final island
#

but don't fixup commits simply work on the commit right before them?

#

so say you have these commits:

banana
orange
potato
scalpel

and you want to fixup potato.
you would have to insert the fixup commit like this:

banana
orange
fixup!: whatever
potato
scalpel

, changing the history regardless. you might as well have just rebased

#

this is even truer if all of these commits are already pushed

#

because if they aren't, there's no loss in rebasing anyway

#

but if they're pushed, you'll be changing commit history twice (by adding the fixup commit, and then later squashing it), rather than once (by just doing a rebase once)

#

would be happy to be proven wrong as I'm desperately trying to find a usecase for fixup commits

rotund girder
final island
#

okay, that gives them a lot of worth

#

however, completely useless to me in specific, I don't work in repos that do development in main, rather than extra branches

#

so I wonder if they have more usecases than this one, for them to be useful to me too

rotund girder
#

And then you can do rebase --autosquash

#

We always do work on branches as well, but we are always co-working at least 2 on each branch

final island
#

haven't heard of that before

#

it's probably more common than I think though

#

hmmm yeah I do see the value for them, from your side, definitely

rotund girder
#

Currently we are all 5 members of the team on the same branch, which requires a little bit of discipline. Not too much though 🙂

final island
#

huh!

rotund girder
fickle granite
#

heh?

rotund girder
rotund girder
#

Aha!

rotund girder
#

This is a command sequence that causes the error I had. Please see if reproducible if interested.

It mixes git rebase exec, make -C and git worktrees:

mkdir repo
cd repo/
mkdir dir
echo -e 'lint:' > dir/Makefile
echo -e '\tgit rev-parse --show-toplevel' >> dir/Makefile
echo -e '\tgit grep "banana" -- "$$BANANA"' >> dir/Makefile
git init
git add dir
git commit -m"Intial commit"
git worktree add ../repo2
cd ../repo2/
BANANA=$PWD GIT_EDITOR='sed -i "1s/noop/exec make -C dir\/ lint/"' git rebase -i HEAD
formal schooner
rotund girder
#

You should be able to reproduce by just running that short script in a new folder.

#

The worktree misunderstands where the repo root is.

formal schooner
#

Interesting

#

Is that a bug?

rotund girder
#

In a sense. I raised an issue about worktrees a year ago that the first "main" worktree is handled differently than other worktrees, but at that point it was just a small layout/print difference. It's a known issue.

So this might caused by the same underlying issue.

rose bear
#

Hey back there, I have question about python monorepo

#

I was here yesterday

final island
#

and for very widely used software, to boot

#

super appreciated

#

even though I don't use git worktrees, it's continually nice to hear you contribute through issues and such

final island
rotund girder
final island
#

commonly used to praise someone

#

and there's the opposite "L"

#

which stands for loss

rotund girder
#

Oh, never seen 😁👌

rotund girder
#
+                   9/24
+                   ----
+jobs.c
+    - start_job: don't fetch the tty settings if we're being called from
+      a readline key binding (bind -x) or programmable completion
+      From a report by David Moberg <kaddkaka@gmail.com>

🤩 😎

grave lagoon
#

heyyy

rotund girder
#

👋

chilly anvil
#

My grandpa made unix what it is today RIP

fickle granite
#

Your grandpa was Ken Thompson?

spark mulch
fickle granite
#

wikihoovia agrees with you

#

just curious who MasterOfNun's grandpa is/was

junior comet
#

guys do i pick linux or mint? or is there any other os you guys recommend cause i wanna dual boot linux on my system

fickle granite
#

mint is linux

#

I think you're asking: "which distro should I choose to dual-boot"? My answer would be: find other people who are doing it, and see what works for them.

#

If I had no other data, I'd go with Ubuntu, simply because it's the most popular distro

final island
fickle granite
#

sure whatever

final island
#

which is relevant, because as a beginner, you'll be able to get more help more easily

#

@junior comet if you have no clue, good enough idea to pick one of them

fickle granite
#

hence my suggestion to see what other people are using

junior comet
#

idk brain got fried or somn

final island
#

I've heard better things about mint than about ubuntu, fwiw

junior comet
final island
#

I cannot name a single of those things, but the general consensus I heard is that people enjoy mint more

final island
shrewd stratus
junior comet
final island
#

god forbid snaps

junior comet
junior comet
final island
#

I know a guy that actively uses them

#

flabbergasts me

#

surprised I haven't blocked him yet /j

junior comet
#

i have seen few vids that talk of it as a positive point

fickle granite
#

I used a snap once by mistake. It was ... annoying

shrewd stratus
#

to say the least

junior comet
#

idk what it exactly does nor why its used as much

final island
fickle granite
#

it's super-containerized

junior comet
#

bruh i searched snap and first comment is why do people hate snap

final island
#

with linux, you'll need to do that a lot, make sure to retain patience

junior comet
fickle granite
#

the snap I used was of some software that creates a file, and the docs for the software clearly stated that the file gets created in the current directory. But because it was a snap, instead of a normal program, it actually created the file in /var/snap/)#(*$&()*#*$(*&#(*&$(*&/youll-never-find-me-mua-ha-ha-, which took me a long time to track down

shrewd stratus
#

IIRC, a major point against snap is that the backend is proprietary

final island
junior comet
#

i see

final island
#

for now you don't really need to worry about our nerd points about snaps

fickle granite
#

it's probably telling that nobody but Ubuntu uses them. If they were genuinely useful, I'd expect to see them used more widely

shrewd stratus
#

it was developed by Canonical, so of course Ubuntu uses them

final island
#

if it's something you would be interested in

#

on metal, I've tried debian (hated it) and then switched to endeavor os, and loved it ever since

junior comet
junior comet
#

and ubuntu feels nice on my vmware

fickle granite
# final island oof that's sucky

It's faintly conceivable that if I used snaps a lot, I'd come to appreciate their advantages ... but that hasn't happened yet 🙂

junior comet
#

i use ubuntu whenever i wanna do something related to networking

final island
#

hope your journey isn't going to be too difficult

junior comet
#

yeah hopefully

final island
#

linux performance is insane

fickle granite
junior comet
#

prolly will be debating it for a while, might put some on my vms and see which one i like

junior comet
fickle granite
final island
fickle granite
#

well you could say that

junior comet
fickle granite
#

ok, Linux it is then

junior comet
#

indeed

#

so far i have tested mint and ubuntu

#

kali as well but not that interested to use kali

fickle granite
#

OK you might as well check out FreeBSD 🤣

#

I think I'm 15% serious

final island
#

lmao don't

junior comet
#

damn

final island
#

a funnier suggestion would be nix

fickle granite
#

yep

junior comet
#

i should try arch just for the memes

fickle granite
#

there was a time when I was fascinated to try out all the distros.

final island
fickle granite
#

that's true for ... any technology at all, really

#

my biggest gripe about most technical documentation is: they rarely explain the problem that the tech is intended to solve

#

it's impossible to make a rational choice if you don't know that

final island
#

so it's not just a direct benefit

#

you're paying for that benefit, basically

fickle granite
#

what's the big tradeoff?

junior comet
#

yeah i currently have no real problems so far
i have like 2 main criteria atm for what i wanna do in linux

  1. tutorials and troubleshooting stuff should be easier, aka when i run into an issue or need to do something in linux, there should ideally be a tutorial for it
  2. ease of use, i will prolly not be doing much other than just projects or work related stuff rather than configuring the system considering most of my time is just gonna be spent on the ide or browsing
final island
#

because the versions are very up to date, less stability because of less testing of all those different versions together

#

it's not catastrohpic, unlike some people suggest, but it can be noticeable

fickle granite
final island
#

I'm having a hard time coming up with the example, but something like python2->python3 is just a direct upgrade of the software, while debian and arch more so use different tradeoffs to give you different things, rather than one of them being directly better

junior comet
final island
junior comet
#

yeah prolly a week long holiday where i have no other commitments

final island
#

although I'm unsure how reasonable of an adventure it is for a complete beginner

#

I wouldn't recommend it

junior comet
#

yeah going through it, there is a lot

final island
#

yeah dw about it for now, or ever honestly

#

get comfortable with actually using linux at first

junior comet
#

fair enough

final island
#

get acquainted with the command line to some degree

#

there is a LOT of power in the commandline, although idk how much power you even need

#

so, focus on solving problems you actually have, basically

junior comet
#

hmm so far i dont use the cli as much even in ubuntu, maybe it will change for future projects ig

#

maybe its cause most of my projects just involve web dev or aiml stuff

final island
#

I would strongly recommend proactively learning about the commandline

#

get youtube to recommend you some shell tutorials and such

#

things like "top 10 most useful bash commands!"

junior comet
#

yea ig i can browse through some of it

final island
#

even iceberg level knowledge is beneficial

#

since you seem to be a developer, linux commandline is a pretty strongly important skill

chilly anvil
#

I am a cli junkie

#

I like making interpreters for my microcontroller

#

Oh and i make all my own commands i don't use linux anymore

rotund girder
chilly anvil
#

Got hacked too much

#

Sure ask me questions plz do

#

Plymouth is for persistence or was and bluez is how they hacked me for a long time

#

Bluesnarf

#

I h8 hacking btw love code i'm like the younger richard stallman imo

rotund girder
#

I know 59% of the words you use..

chilly anvil
#

I destroyed the arduino language in days moved on to the raspberry pi pico w and been here for weeks love it i'll teach ya if you want

#

Ik inline asm bin hex dec chr etc everything. you interested?

#

Oh and do you use python3 or micropython? i will give free code today

#

Anyways my grandfather helped build unix and now i will present to you all my own custom version made entirely from scratch TyWin OS no kernel none needed

#

while True:

#

Indent

#

a=str(input("$: ")

#

if (a=="clear"):

#

Print \n

#

There is your code you can now make a microcontroller your base or house or heaven hahaha

#

Tywin wins

#

Also i'm a sexy 24 year old man lookin for a computer girl lmk if there are any unix girls out there 🥰😍

#

I have more on registers if you wanna learn

#

More code

fluid warren
#

troubleshooting and things breaking is an inherent part of linux and if you hope for a step by step guide for every issue you might not have a great time

#

at least in my experience

#

but if it works for you. pop off, my opinion is pretty irrelevant

rotund girder
fluid warren
#

(but fr gentoo made me a linux machine)

rotund girder
fluid warren
#

you manually build everything, configure grub, kernel, ect

rotund girder
#

ah I see

fluid warren
#

you can do basicalyl whatever you want from a fresh install

#

and things break a lot if you arent a linux god

#

but since you are in complete control it can be insanely stable

#

basically the issue is always the user not the system

#

and portage is godly if you use it right its one of the most stable dependency managers in unix

#

i am bias though since i daily drive gentoo on my computer

rotund girder
#

I see, I just run Ubuntu as it's what we have at the office.

#

So... how would you compare gentoo+portage and NixOS, different beasts altogether I guess

fluid warren
#

nix is like, if i need 100 comptuers to work out of the box for my employees

#

ill use nix

rotund girder
#

Because that is what some of colleagues are using, so that would be my convenientest option to ubuntu

fluid warren
#

gentoo is like, i brick my system weekly so i need as much control as possible to bring it back from the depths of hell

#

source: i brick linux a lot and gentoo has saved me

#

arch fucked me over multiple times

#

pacman is just terrible IMO

#

and i cant stand the arch community

#

the 2 things i hate

#

oh and they think installing arch is hard 3D_Laugh

rotund girder
#

good to know

umbral sluice
#

I wiped my system to install nixos a few weeks ago

#

It's great when it works, but when stuff doesn't work there's a bit more work involved to get everything working since a lot of how nixos does things is different

fluid warren
tribal finch
#

No; Why do you brick your system weekly?

fluid warren
#

portage has been stable, arch was not

tribal finch
#

So use something more stable? Lol

fluid warren
#

i do

#

gentoo

#

everytime ive broken gentoo its been me, not the PM

tribal finch
#

I've never had any issues like that with normal distros - Ubuntu, RHEL or SUSE based, Clear Linux, etc.

fluid warren
#

i just like the control you get with gentoo

#

building gentoo yourself step by step is fun

#

if i ever get tired of gentoo ill probably just go to mint and never touch a config file again though

tribal finch
#

smh. Idk how that's fun. I have 500,000 other things to do besides waiting for my system to compile instead of using it

fluid warren
#

i do it all the time

#

you can set how many threads you want to use on portage

#

so i could use 2 threads then use the rest for any other comptuer activity

#

or just sudo emerge -auDvn @world then go to bed

#

wake up with an updated system

#

to be honest we are at the point of computing where compiling something isnt crippling a machine

#

maybe in 2001 gentoo wasnt useable while compiling a kernel but thats not the case at all anymore

#

(i dont even think gentoo existed in 2001 lol)

tribal finch
#

it's not about resources, it's about time. I don't have time to compile something everytime I want to use it shrug

fluid warren
#

and theres bins for things like firefox and chromium now

#

even a kernel bin

tribal finch
#

at that point, you might as well just use any other distro that hosts a repository for you ;)

fluid warren
#

i still compile plenty of stuff

#

i also only have 8gb of ram and i prefer to have as much available as possible

#

gentoo has by far been the fastest system ive used

#

and the part i enjoy is that a fresh install comes with completely nothing

#

bare bones linux

#

i also find that the learning experience you get from gentoo to be very rewarding

#

you probably arent digging though xorg logs on mint very often

#

oh i forgot my favorite feature

#

portage USE flags are godly

#

i can set something like USE= 'X nvidia -bluetooth -telemetry which tells portage to always install optional X and nvidia deps, but ignore optional bluetooth or telemetry deps

#

you can also set portage to only allow certain licenses which is super cool

tribal finch
fluid warren
#

and thats probably why you dont use gentoo

#

i love doing stuff like this

tribal finch
#

exactly, lol. Like i said, I have 500,000 other projects to work on at home, I need to operating systems to be stable so I can I actually do them

fluid warren
#

anyways

#

that was a very unconstructive conversation

#

and a long way of saying people have different wants and needs

astral grove
#

I kept saying for several years that I'd stop using arch when my system properly broke because I didn't have time/interest in maintaining it. It refused to break on me

#

trying to use a fancy distro gives me nightmares nowadays

fluid warren
#

Arch self destructed a few times

junior comet
#

so its just a lot more convenient to not try to troubleshoot issues on a different os cause everyone is showing troubleshooting and tutorials based on ubuntu

#

for this ns3 thing, i couldnt even find anything related to being done on mint or something else

final island
#

could someone please explain / point to the correct docs about git's "fast forward"ing? I don't really get what that means, and the wording doesn't make it obvious for me. I've been using git for a while and I've made several programs around git, so I understand most things fairly well, except fast forwarding

spark mulch
# final island could someone please explain / point to the correct docs about git's "fast forwa...

When merging a completely linear history (i.e. the commits are all based on the one you're on right now), Git by default doesn't create a merge commit, but instead just advances your head to the thing you're merging; or it fast-forwards. You can force it to create an (empty) merge commit instead to better show that some group of commits were on a branch.

HEAD       somebranch
   |           |
   a - b - c - d

If you are at HEAD and git merge somebranch, you will just move to commit d.

final island
#

the name "fast forward" makes more sense now

#

thank you!!

formal schooner
#

@final island it's not unlike git reset-ing

#

basically it just moves HEAD without creating a merge commit, but it will only do it if it's "safe" to do so (i.e. not with the full power of git reset)

final island
#

so it's a metaphorical git reset --hard branchie --unless

#

or --ask-for-consent, opposing --force

#

which I'm pretty sure doesn't even exist for git reset ahahahaha

radiant kraken
#

@formal pasture I wrote an example package for implementing daemon processes in both Unix (double-forking) and Windows (detached processes), if you want to look through it:
https://github.com/thegamecracks/daemon-example sh $ thedaemon start $ thedaemon start Daemon already running $ thedaemon ping pong $ thedaemon stop stop $ thedaemon ping Failed to connect to daemon; did you start it? Given my lack of experience in the subject I can't say if the implementation is good, but that might be sufficient for your project. Of course, it's still up to you to decide how to handle re-scheduling; if you stick with a selector-based server like mine, it would be theoretically possible to implement sleeping by setting a .select(timeout=) to wake up at a given timestamp, but asyncio can also work for this purpose as well

(hmm i probably should have posted this in #async-and-concurrency )

formal pasture
#

Wow! Awesome!

formal pasture
formal schooner
#

The name is a metaphor for "fast forward" on a VCR or cassette tape -- just jump forward in history without changing anything

tribal finch
#

speaking of git

#

I accidently added a file to be staged when I wasn't ready for it, so I ran git restore --staged $file, then did a commit. Now git status doesn't show the file at all, but it also wasn't committed, and git add --all still doesn't add the file. I'm confused, how did it get completely untracked?

formal schooner
tribal finch
#

yup

formal schooner
#

Does it still contain your changes?

tribal finch
#

yup

#

but the repo doesn't, it's the old version

formal schooner
#

it's not visible at all in git status as changed?

tribal finch
#

nope

formal schooner
#

huh

#

hold that thought, baby is crying

summer trail
#

whoops, meant to reply to @tribal finch

tribal finch
summer trail
#

and: does git show HEAD:$file show your changes, or show the old version?

tribal finch
#

sorry, just got back to my desk

tribal finch
tribal finch
ivory warren
#

Is there an area for docker ?

summer trail
#

why do you say it doesn't?

tribal finch
summer trail
#

maybe you missed a git push ?

tribal finch
#

anyway, learned some new things about git, so thank you!

#

I did one, but I guess I ended up with a commit, push, and then commit, but not a second push pandaconfused

brazen wren
#

What is Unix anyway?

foggy laurel
# brazen wren What is Unix anyway?

Unix is a basically a dead operating system, but most operating systems besides Windows are based on it and are call "Unix-like" systems. Here are some key differences between Windows and Unix(-like) systems:

  • There is a standard set of utility applications for the command line
  • Programs are usually stored either /bin/, /usr/bin/ (less common apps), and or somewhere in a user's user folder.
  • Slashes are used instead of backslashes for directories and there is no C:\ D:\ etc, there is one main drive and every other drive gets mounted in /mnt/
  • root is the user which has all control of the system and Unix usually has better permission systems for files and users
#

Unix ( , YOO-niks; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.
Initially intended for use inside the Bell System, AT&T licensed Unix to outside partie...

#

Some OS's based on Unix include Linux, MacOS, FreeBSD, Android, and iOS

summer trail
#

Basically every OS that's widely used today, with the sole exception of Windows

wise forge
# brazen wren What is Unix anyway?

And if we extend Unit to Unix like, then it becomes the most used OS indeed
which dominates ...pretty much everything except Windows Desktop.

  • Android? Unix like (some Linux based)
  • Servers? Linuxes
  • Embedded devices, Arduinos? Linuxes
  • Favourite desktop dev machine? Linuxes 😏
summer trail
#

Arduino isn't Linux, actually

wise forge
# summer trail Arduino isn't Linux, actually

Raspberry Pi OS is a Unix-like operating system based on the Debian Linux distribution for the Raspberry Pi family of compact single-board computers. Wikipedia
okay, unix like too
Based on debian though, soo... Linux 😏

i meant apperently Raspberry Pi then.
not sure what is used there for Arduino

prime magnet
#

it would be great that Microsoft releases a unix-flavored version of Windows