#unix

1 messages ยท Page 5 of 1

misty yew
#

ESC

#

@reef sluice

reef sluice
#

Ys

#

I did try q

misty yew
#

ctrl + c?

#

ctrl + d?

reef sluice
#

Wait lemme see

#

Yes it workedd

#

๐Ÿ˜‰๐Ÿ˜‰๐Ÿ˜‰๐Ÿ˜Ž

#

Fron where do u got dem kali skillz g

#

Man i put in commands but it says command not found

misty yew
#

its basic unix skills lmao

#

its not specific to kali

reef sluice
#

Oh

misty yew
#

I would recommend you to get familiar with unix by using linux

reef sluice
#

I dont got a linux device

#

Im using nethunter through termux

misty yew
#

where are you running kali?

misty yew
#

just use plain termux

reef sluice
#

On mobile too

misty yew
#

no need to use kali

reef sluice
#

No its because i had some mighty plans....

#

โ˜ ๏ธ

misty yew
#

!rule 5

shy yokeBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

reef sluice
#

Lol man was so fast to pop that up

misty yew
#

I have it memorized ๐Ÿ˜Ž

reef sluice
#

No ofc brother would never do something like thst

#

๐Ÿ™ƒ๐Ÿ™ƒ

misty yew
#

if you want to learn just plain termux

reef sluice
#

Go on..

#

Im a newbie.. trying to learn python

misty yew
#

install lunarvim

#

its usable

#

with that

reef sluice
#

From where did u learn this stuff

misty yew
#

u will have a learn a bit of vim bindings

misty yew
#

asking

reef sluice
#

Mmmm

misty yew
#

looking up

reef sluice
#

Courses??

misty yew
#

I didnt take any courses for this

reef sluice
#

If theres any free interactive courses pm me

#

FREE

misty yew
reef sluice
#

ah

misty yew
#

basic unix commands are plenty too

reef sluice
#

Alright ill try then

#

Thx man ๐Ÿ˜‡

barren temple
#

vimtutor is good for learning vim keys. It's a command

#

(better do it yourself, than watch someone else do, imo)

toxic acorn
#

yea vim is all muscle memory

#

you gotta get in the reps to get competent at it

#

or at least get to a point where its not getting in your way

fallow tusk
#

ESC ESC i Yeah. Until you do them subconcESC``hxsciouslyESC

half crest
#

Hi guys
I tried updating my ubuntu and when I rebooted all I got was white screen

Then I tried recovery m9de but I could login

And fixing all broken packages dkpg could connect to network in terminal

half crest
toxic acorn
fallow tusk
#

It's the ESC tick that often gets me - leaves the field I was typing in and clears it rather than entering it!

#

For me delete word is either dw or the more explicit diw

toxic acorn
#

that's interesting, I've never used esc tick before

#

ctrl-w is a terminal shortcut to delete one word back

fallow tusk
#

Ah, the bash prompt sequence, yes.

#

I assumed we were still talking vi ;)

toxic acorn
#

I mean, I use that shortcut in vim

hexed rose
#

Anyone here use Anaconda?

real vapor
#

dw is delete with a motion (effectively "delete until next word")

#

daw and diw will delete the whole word with/without surroundings

fallow tusk
#

yeah, you're explicitly stating that extra information

real vapor
#

(tl;dr: not the same w)

#

(w the word motion and w the word text object)

real vapor
#

which is not true

fallow tusk
#

Yeah, I agree. I've always thought of diw/daw as being an extension of dw

real vapor
#

the i and a are pretty special

#

they allow stuff like ', ", (, ... as well

#

(for any interested reader)

ab cdef gh  ---dw->  ab cgh
    ^
ab cdef gh  --diw->  ab  gh
    ^
ab cdef gh  --daw->  ab gh
    ^
real vapor
#

fwiw, ciw, ci" and the like are quite nice if you remember to use them ๐Ÿ˜…

#

there is also s for sentence and p for paragraph

#

and t for tag, though I never use that

#

lots of fun stuff

fallow tusk
#

Yep, I'd been using vi for yonks before coming across the i/a versions. Now I use that quite often. I probably don't use ciw as much, although I do think I've had occasion to ;) The s and p I knew of, but they haven't entered my repertoire - probably because I seldom need them, and so seldom use them even when I could.

fallow tusk
#

Having said I don't use ciw much, I just found myself using ci" - to replace everything inside a pair of quotes. That and similar I do use a heck of a lot ;)

real vapor
#

vim is this constant learning experience

#

even after like a decade

#

@fallow tusk
I recently jotted down some notes about useful but maybe less known vim stuff, maybe you'll find something interesting.
https://algmyr.se/vim/

Or maybe you even have suggestions about things to write an article about. I for sure have stuff I don't know about vim, and probably a bunch of stuff I use without realizing it's kinda obscure

fallow tusk
#

* and # I didn't know. That's quite useful (and also works in VSCode with its own Vim emulation)

dense kernel
#

Why is my swap full, and how can I clear it?

#

(I'm processing some data in the background)

real vapor
real vapor
#

I probably wouldn't do that when you're so close to the limit

dense kernel
#

there is still some space

real vapor
#

13 + 2.1 = 15.1 which is kinda close to 16.5

dense kernel
real vapor
#

you can do it by turning swap off
sudo swapoff -a
and then back on again
sudo swapon -a

#

but I would probably try to reduce some memory usage first

dense kernel
#

yeah thats what I need to do

real vapor
#

so that you're not hitting swap again immediately at the first spike

dense kernel
#

but as of lately I see it uses alot of swap, even when its only using like 50 - 70% of the RAM

real vapor
dense kernel
#

look at this shit:

#

I just interrupted the script but its not even clearing the SWAP (or moving it)

real vapor
#

it should theoretically be swapped back eventually as memory is actually accessed

#

but you can force things with swapoff/swapon

wise forge
#

there is possible to configure rules for priorities pithink swap is supposed to be less priority

real vapor
#

but as said, try to avoid swapping in the first place ๐Ÿ˜›

#

swap is a crash cushion, not extra ram

wise forge
wise forge
real vapor
#

it should clear up a bit as ram in swap is accessed

#

if I had to guess it's probably stuff belonging to a web browser or something, lots of caching, few accesses

dense kernel
#

I'll try to clean up a bit the script, but I'm already doing everything in batches, weird ...

real vapor
#

looking at your ram you have really high base usage

#

and then some fluctuation on top

#

which I guess might be your batches

dense kernel
#

exactly, the fluctuation was bringing the chunk in memory (list of dictionaries) and then writing it to a parquet

real vapor
#

so I guess look into what causes the high base memory usage

dense kernel
#

the thing is that the base should be the same troughout the execution of the script, but instead it grows slowly slowly, so I'm thinking there is a memory leak somewhere

real vapor
#

if it's plain python probably not a leak per se

#

do you have stuff that gets added to throughout all batches?

dense kernel
#

idk what you mean by added, but I'm basically reading some data, create new data, and wrting the new data to a parquet

#

and I'm doing everything using Iterators/Generators both for reading, processing, and writing

#

but I need to double check how pyarrow handles an Iterator when its passed to pyarrow.dataset.write_dataset(data=it), cuz I suspect it might create some very large dataset with all the batches and then write it to the disk

real vapor
#

yeah, that sounds possible

real vapor
main olive
#

What distro is everyone using?
And is it 'unix' or more commonly 'unix like'?

wise forge
# main olive What distro is everyone using? And is it 'unix' or more commonly 'unix like'?

Everyone uses their own favourite
It is very common to use something Ubuntu/Debian based in its distro origins.
(Good choice commonly used for servers too, and Debians are most often choice for Docker images too)
(Ubuntu is based on Debian)

I can recommend my favourite Kubuntu 22.04 LTS. A bit heavy in GUI, but very nice.
Plus general GUI layout is my favourite. (KDE Plasma)
And good enough default console terminal with multi window split screen support

wise forge
fallow tusk
#

Indeed, anything "Linux" is going to be "unix-like", as that was the original intent of the university project - to produce a "unix-like" operating system

#

I guess the other main "unix-like" group of OSes are the BSD ones. Again, I don't think they are "Unix", just "unix-like".

#

Ah, no, BSD is actually a UNIX (according to Wikipedia, at least), along with AIX, HP-UX , SunOS/Solaris, Xenix

toxic acorn
#

I use endeavor os

#

its basically arch but with a good installer and good defaults

dapper musk
#

unix itself was operating system developed by AT&T

#

and apparently wikipedia isnโ€™t consistent with itself on this. It brings up BSD as an Unix-like on Unix-like page while categorizing is an Unix on BSD page. Either way distinction of Unix group from Unix-like is blurry at best and when people refer to Unix nowadays they mean Unix-like

fallow tusk
#

I guess the original AT&T UNIX (bought by Novell?) is no longer in use (except, perhaps, in an archaeocomputing environment - although I wouldn't be completely surprised if there's some vestigial system that still relies on it somewhere!), and all that remains are the descendants ;)

wise forge
#

It had unusual gray GUI interface that looked like from Windows 98 era or older, and taskbar on the right

fallow tusk
#

Psh. A GUI? That might have been something Solaris-y.

wise forge
#

Considering that Fortran (with on purpose compiler from 1970x years!) and Prolog were in our program too, it speaks nothing about how ancient it can be ๐Ÿ˜

fallow tusk
#

!pypi pylog

shy yokeBOT
fallow tusk
#

}:D

wise forge
runic goblet
#

.... just seeing the name "prolog" brings back memories. not good ones at that.

dapper musk
# wise forge I remember relatively recently we learned and used something named Unix during u...

In computing, Motif refers to both a graphical user interface (GUI) specification and the widget toolkit for building applications that follow that specification under the X Window System on Unix and Unix-like operating systems. The Motif look and feel is distinguished by its use of rudimentary square and chiseled three-dimensional effects for i...

#

this perhaps?

wise forge
#

Found name!

#

it is Neutrino! QNX!

dapper musk
#

oh thats really bad lol

#

but i guess in real time operating system it was't their priority...

wise forge
#

more correct authentic background ๐Ÿ˜

fallow tusk
#

Oh. QNX is quite a lot more recent than UNIX, iirc.

#

1980s, apparently

#

OK. It was written for the 8088 ;)

dapper musk
#

and apparently it is still used

fallow tusk
#

Yep.

#

Although it was rewritten from the ground up in the 90s.

#

And presumably tweaked by Blackberry since then

shrewd stratus
#

Blackberry Unix ๐Ÿ‘€

fallow tusk
#

BBX :)

main olive
# dapper musk no BSD isnโ€™t unix it is unix derivative just like linux

My understanding is that Unix is a licensing specification provided to OSes. One major difference between Linux and Unix distributions is that Linux is a separately packaged kernel + user space tooling, where Unix is an all in one synchronization. In that respect, BSD distros are Unix though in the respect that packages/ports are now available it could be considered Unix-like.

fickle parrot
#

I am having SSL Error when I try to pip install a package in venv.
I tried to run the pip install with --trusted-host pypi.org --trusted-host files.pythonhosted.org which still didn't work.
I have no issue when pip installing outside of venv. Is there something I'm missing?

#

I'm running ubuntu 22.04

fickle parrot
#

I think the reason was my python was installed with wrong SSL configuration

runic goblet
#

how did you get your python? did you compile it yourself?

dapper musk
# main olive My understanding is that Unix is a licensing specification provided to OSes. One...

The Single UNIX Specification (SUS) is a standard for computer operating systems, compliance with which is required to qualify for using the "UNIX" trademark. The standard specifies programming interfaces for the C language, a command-line shell, and user commands. The core specifications of the SUS known as Base Specifications are developed and...

#

but according to this BSD's don't comply

summer trail
real vapor
warm birch
#

Mint vs Manjaro vs Fedora, which is best on a slow, old laptop with low ram, and which would you recommend a Linux noob?

runic goblet
#

personally i like to stick to ubuntu/debian-family in tems of distro.. (for personal use and recommendation alike)
that just leaves mint on your list, it's probably fine with an old laptop
though i prefer XFCE (so xubuntu instead of mint) if you really want to be super resource efficient while being beginner friendly

vagrant fern
wet mountain
#

Hey there, to anyone who may be looking at this tired or fresh!

Been hitting my head constantly figuring out how github pull-requests work via Git or command line interface!
Kinda stuck hard right now!
If anyone could shoot me up a DM, would waste a little time of yours, I bet!

Step 1 and Step 2 have been shown in the image, Step 2 is basically me clicking on the pull request option.

Expected Behavior: Should show a box to write message for my pull request!

Do shoot me a DM, if you choose to answer to this.
Thanks have a lovely night/day!

vagrant fern
wet mountain
#

Sorry mate, but you need to dive deeper with that explaination, for me to understand!

#

Tried googling a lot.
Got some keypoints-
--github recently changed master to main!
-- so i need to first put git add -M main and make that branch in my local repo as well
--after doing that confirming I am the user of the repo I am currently practicing at either by SSH or token keys or other ways!

#

Also rebase-ing dosen't work, neither does --allow-combined-histories something!

#

@vagrant fern

vagrant fern
#

if you have master locally and main is an empty branch on github and it's a mess trying to get it to work then maybe it's just simpler to just change the default branch of that repo on github to master

#

are there any commits on main?

warm birch
vagrant fern
#

cinnamon comes with a WM built in

#

not sure about choosing each separately tbh

#

I just run i3

fickle granite
#

you should be able to use the package manager to swap window managers easily. I can't give you any details since I've never used Mint

wet mountain
#

@vagrant fern anyways, thanks mate!

I'll try all the solutions today and let you know!

vernal pagoda
#

Hi guys

fast barn
#

I have a log files, it might contain an error lines or not, i want to make a code that can understand each error line and print just a unique from each no need to duplicate

Example

Input file :
Leakage value 1.2 for circuit 1 is greater than the standard

1)Leakage value 0.9 for circuit 2 is greater than standard

2)Capacitance is huge in circuit 3

3)Capacitance is huge in circuit 4

4)Capacitance is huge in circuit 5

5)Capacitance is huge in circuit 6

6)High delay in circuit 7

Output: must be the unique ignoring instance information like circuit number or certain value

  1. Leakage value 1.2 for circuit 1 is greater than the standard

  2. Capacitance is huge in circuit 3

  3. High delay in circuit 7

The log file may contain over than 10000 errors but not ,however its might be just 10 unique errors as shown in the output ,,,

Anyone can suggest a library, or a place to start from?is it possible to make code clever enough to determine these things ?

fallow tusk
#

I'd use Python, although I'm sure some combination of grep, cut, sort and the like could do it. If it is just a Python question you might be better off asking in a #1035199133436354600 channelโ€ฆ

wise forge
wise forge
#

Sentry should be possible to self host

#

Among lightweightest self hosted ones, logging stack : Loki + Prometheus+ Grafana should be having same feature, while giving cool interface to navigate logs

#

Your task kind of sounds more like u need perhaps Prometheus metrics custom agent perhaps instead of real Logging

#

Just check Prometheus integrations, there should be python library too

wise forge
wise forge
# fast barn I have a log files, it might contain an error lines or not, i want to make a cod...

Fourthly, in such tasks shines the best solution made in Golang, because it is the best for such logging/monitoring tools due to small end weight result binary without dependencies. Always great to augment easily existing infrastructure
U would be able to make it on same Inbuilt libraries to read file / and some data structure to deduplicate it (if u have just ten unique records, it means just using hashmap/set in python, or map in Golang)

fast barn
# wise forge Fourthly, in such tasks shines the best solution made in Golang, because it is t...

Thank you so much sir, you put me on the road again, i really donโ€™t know that this problem are under devops, since i work as a chip design i automate and know very well bash and linux and of curse some python, but never delt with such a problem, all the topics u mentioned was totally new to me, however i am excited to learn about it and make this script which will save me and my team lot of time,,,appreciated again

wise forge
main olive
#

find . -type d -name "recup_dir*" -exec find {} -name "*.zip" \; -exec mv -t /home/k/recovery {}/* \;

#

i'm in a folder.... trying to scan through these directories.. each directory is named recup_dir.xxxx < xxxx being a number

#

locate the zip's and move them into a recovery folder

#

when i run this it says file cannot be found

#
v: cannot stat './recup_dir.257/*': No such file or directory
mv: cannot stat './recup_dir.817/*': No such file or directory
mv: cannot stat './recup_dir.4184/*': No such file or directory
mv: cannot stat './recup_dir.4171/*': No such file or directory
mv: cannot stat './recup_dir.2774/*': No such file or directory
mv: cannot stat './recup_dir.3013/*': No such file or directory
mv: cannot stat './recup_dir.2301/*': No such file or directory
mv: cannot stat './recup_dir.1870/*': No such file or directory
mv: cannot stat './recup_dir.106/*': No such file or directory
mv: cannot stat './recup_dir.978/*': No such file or directory
mv: cannot stat './recup_dir.1004/*': No such file or directory
mv: cannot stat './recup_dir.101/*': No such file or directory
#

i know this is a stupid issue with my syntax.. any ideas?

fickle granite
#

you're running find twice. Is that intentional?

fallow tusk
#

Oh, the -execs are seen as belonging to the top-level find; the second one isn't for the inner find

#

Might need the sh -c (iirc) trick to run the inner find

fickle granite
#

don't think you should have two finds at all; it's confusing. Maybe find . -wholename '*/recup_dir.*/*.zip' -exec mv {} /home/k/recovery ';'?

fallow tusk
#

I can see the logic behind the two finds; that's not confusing. Combining them produces something that is, though :)

haughty rock
#

what's the worst that could happen if i do nano /etc/sudoers instead of visudo?

shrewd stratus
#

do you mean sudo nano /etc/sudoers?

main olive
#

anyone wanna help me with copying files from a server to my local PC while using WSL / ubuntu?

#

the paths are.. never straightforward and i can't seem to get it right

haughty rock
#

i meant first doing su

#

then doing nano /etc/sudoers

#

but anyway i figured it out

#

/usr/sbin wasn't in path for some reason

vagrant fern
#

check your secure_path setting in /etc/sudoers. it should have

Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
tepid drift
#

how to write in the 4th line of a file a text using command line

file before

a
b
c
d
e

file after

a
b
c
text you typed
e
fallow tusk
#

You could use sed I guess.

shrewd stratus
#

yep

tepid drift
#

how you are going to override of the 4th line using sed?

fallow tusk
#

sed -i '4i line 4' filename

#

override or insert?

shrewd stratus
#

4s/d/stuff would work too I think

fallow tusk
#

that inserts

tepid drift
#

thanks for your help

tepid drift
fallow tusk
#

I guess that could be sed -i '4d;4i new line' filename - not sure. Moyen's suggestion using s would work, but you'd have to specify the entire line as the search pattern (^.*$) which seems a little unnecessary ;)

tepid drift
#

it did work

#

thanks

fast barn
#

This must check if this path exist or not, however it didnโ€™t pass it

#

In Bash

wise forge
# fast barn

raised InputException: "Help requests do not work with code provided in screenshots ^_^"

fast barn
#

The thing is my laptop is restricted to the company i work for, so i cant download discord or anything there,

#

So i use my phone

haughty rock
vagrant fern
fallow tusk
fast barn
fast barn
vital scaffold
#

Hello everyone,
I have created a little python program with which you can create a beautiful readable chapters txt file (of the format "h:mm:ss YOUR_CHAPTER_TITLE") .ย 
Then you can use the txt file to add your chapter titles and afterwards use the script to attach it to the video.ย 
Keep in mind though that this program only works in Unix systems like macOS and you need FFmpeg installed on your machine.ย 
The github repo of the project is: https://github.com/amireza007/ChapterForVideos
There are some TODO things, available in the code such as a UI and exception handling.
I would really appreciate if you take time to test and even more if you have any comments regarding it or improvements or edits to the project.ย 
Thanks for your attention

main olive
#

s

#

a

#

yo

#

anyone there

#

that can help me please

#

anyone hell

vital scaffold
main olive
#

ubuntu sway when

#

opinions on this?

main olive
#

I like Cinnamon

#

more than KDE in fact

#

1- sway/i3
2- Cinnamon
3- GNOME
4- KDE
for me

unkempt hamlet
#

any idea why there is no python 3.9 installer?

fickle granite
#

I assume they only keep a few minor versions of each old version

#

there's files for a bunch of other minor versions though

unkempt hamlet
#

thanks

#

any idea why there is no installer for 3.9.16

fickle granite
#

other than that, no

#

if you're that set on exactly that version, and no other, then build it from source

#

or try pyenv -- it might let you specify a version that precisely

#
โฏ ~/.pyenv/versions/3.9.16/bin/python3 --version
Python 3.9.16
โ•ญโ”€๎‚ถ ๏…น ๎‚ด ~ โ–“โ–’โ–‘ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทโ–‘โ–’โ–“ โœ” ๎‚ถ 17:25:20 ๎‚ดโ”€โ•ฎ
โ•ฐโ”€
``` ๐Ÿ™‚
radiant kraken
unkempt hamlet
#

got it
thanks

barren temple
#

Linux is no longer unix. Only exception is slackware. Use slackware.

dapper musk
#

sure there is nothing better than installing dependencies manual...

barren temple
#

Package managers nowdays do database, interwebs, packages, installation.... Soon they will brew coffee. It is so easy to ldd to see what your deps are and just install them. And packages are just tarballs. And init files are good old bsd style init scripts. Who needs more?

#

It's the ||april trolls|| truth. Do not question it. Linux is just inferior to slackware.

dapper musk
#

oh i have't checked the date

grand lynx
#

Linux is no longer unix

barren saffron
#

Can anyone help me with this?

  File "/usr/bin/add-apt-repository", line 3, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'```
spark mulch
spark mulch
#

What's your python/python3? Is it the system-installed Python, and have you messed with it in any way?

barren saffron
#

Is the problem maybe that I installed python 3.11.2 and made it the default version

spark mulch
#

Yes.

barren saffron
#

oof

spark mulch
#

Don't ever change the system python.

barren saffron
#

okay

spark mulch
#

If you want a newer Python to work with, I recommend using pyenv to install it in addition to the system Python

barren saffron
#

so I have both installed python 3.11.2 and the system one but python 3.11 is set to default

barren saffron
spark mulch
#

What do you mean by "set to default"? With update-alternatives?

barren saffron
#

my problem

barren saffron
spark mulch
#

First try to set the previous version as the default again and/or uninstall Python 3.11

barren saffron
spark mulch
#

Re: deleted ๐Ÿ‡ฉ๐Ÿ‡ช question: It should, yes

barren saffron
#

Im sorry ๐Ÿ˜‚

#

I wanted to say: If I uninstall python 3.11, does the system python version automatically set itself as the default again?

spark mulch
#

It should, yes.

spark mulch
barren saffron
#

22.10

spark mulch
#

That seems to have come with 3.10.
If after uninstalling 3.11 it doesn't work yet, reinstall python3

barren saffron
#

huh

#

I can't uninstall this

spark mulch
#

How did you install 3.11? deadsnakes?

barren saffron
#

sudo apt install python3.11

spark mulch
#

Did you first add some PPA, e.g. the deadsnakes one?

barren saffron
#

And then I used update alternatives

barren saffron
spark mulch
#

Hm.. can you run sudo update-alternatives --config python3 and select 3.10 there?

spark mulch
#

And it let you select 3.10?

barren saffron
#

Wait I will try if it work now

barren saffron
#

side question

#

How to install graphics driver for nvidia gtx 1050 ti?

spark mulch
#

ยฏ_(ใƒ„)_/ยฏ

barren saffron
#

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

#

I'm sorry

#

Oh and the python problem is now solved

#
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.```
barren saffron
#

this pops up when I do $ sudo apt update

spark mulch
#

And as I said, I recommend using pyenv for newer Python versions these days.

#

(Deleting works with the same add-apt-repository call, but with an added --remove. Or just remove the corresponding .list file from /etc/apt/sources.list.d/)

barren saffron
#

Oh its solved

#

Thank you so much

barren saffron
#

Please help what did I do wrong

fallow tusk
#

The driver you should be able to find with something like sudo apt search nvidia

barren saffron
#

Yes but now I just have a black console window

#

Nothing else

fallow tusk
#

Does startx do anything? (it may notโ€ฆor it may give you an error)

barren saffron
barren saffron
#

When I type startx it says command not found

fallow tusk
#

OK. That's one option I was expecting :)

barren saffron
#

Can I fix my kubuntu?

fallow tusk
#

kubuntuโ€ฆrunning SDDM, I'm guessing?

barren saffron
#

Kubuntu dual boot

#

Help me please

fallow tusk
#

Assuming it's using SDDM (iirc, that's default for Plasma/KDE), have a look - do you have a /etc/sddm.conf?

shrewd stratus
#

apparently startplasma-wayland should work

fallow tusk
#

If it's defaulting to Wayland, that would be why startx isn't present :)

#

I wonder what DM runs for Kubuntu, thenโ€ฆcan't recall how to find out :/

barren saffron
#

I reinstall it

#

But

#

What is the right way to install a graphic drive for 1050 ti?

fallow tusk
#

Reinstall what?

barren saffron
fallow tusk
#

Do you know it's the missing graphics driver that's causing the problem right now? If not, and you had it working previously, don't go adding more complexity in until you've got things back to a working state

barren saffron
#

What is the right way to install a graphic drive for 1050 ti?

#

In kubuntu

#

Because I wanna play Minecraft or something

fallow tusk
#

There should be a dkms package, iircโ€ฆ

#

I was hoping to see something like nvidia-dkms, but all I see are versioned packagesโ€ฆyou probably just want to choose the latest (nvidia-dkms-525, maybe?)

barren saffron
craggy tartan
#

how do i add a help for a shell script program

#

My teacher is asking me to: "Include a usage description (otherwise known as a help message) that describes how to use the script if the user calls the script with a command line argument of -h"

fickle granite
#

write something that looks at the script's arguments, and if it see one of them is -h, it emits the help message

prime magnet
fickle granite
#

that's for python, not shell scripts

craggy tartan
#

im not learning python, im already over that phase. I am learning unix scripting and i need to do this for bonus marks for an assignment.

fickle granite
#

very simple example (cadged from stackoverflow) ```
#!/bin/sh

OPTIND=1

while getopts "h?:" opt; do
case "$opt" in
h|?)
echo "Usage: $0 [whatever]"
exit 0
;;
esac
done

shift $((OPTIND-1))

[ "${1:-}" = "--" ] && shift

echo "OK, now let's get to work: $*"

#

there's a million other ways to do it

craggy tartan
fickle granite
#

I don't understand the question

#

Also there's probably no "best" way; or, rather; the best way is the one that is best for you

#

'course this is homework, so it's all about making the instructor happy ๐Ÿ™‚

vagrant fern
candid dove
#

shellscripts are often especially hard to read so its even more important to use standards

wise forge
fallow tusk
vagrant fern
#

shell script is the best way to script shell commands. if you have a deployment script that copies something from a to b and restarts a service, shell is what most people will understand best

main olive
#

I need help

#

[DEBUG]: In file included from <built-in>:382:
[DEBUG]: <command line>:6:9: warning: 'ANDROID_API' macro redefined [-Wmacro-redefined]
[DEBUG]: #define ANDROID_API 21
[DEBUG]: ^
[DEBUG]: <built-in>:375:9: note: previous definition is here
[DEBUG]: #define ANDROID_API ANDROID_MIN_SDK_VERSION
[DEBUG]: ^
[DEBUG]: 1 warning generated.

fallow tusk
#

Warnings are just warningsโ€ฆ

main olive
#

but it's interrupting my build

#

I can't create build with this warning

#

what to do?

fickle granite
#

tell your build not to stop when it sees a warning, I guess?

fallow tusk
#

-Wno-macro-redefined (or just remove the existing -W)

fallow tusk
#

Or, of course, fix the redefinition.

#

The compilation is using -Wmacro-redefined (as shown in your output)

main olive
#

ohh

#

So, how can I remove the -W

fickle granite
main olive
#

I'm converting .py to apk with kivy using buildozer

#

In Ubuntu

fickle granite
#

never heard of buildozer; sorry

fallow tusk
#

Kivy?

main olive
#

yup

fallow tusk
#

Yep.

#

No idea why it's doing thatโ€ฆiirc I had to make it rerun at last once to get it building when I played with that

main olive
#

ohh

rugged sentinel
urban escarp
#

Hey

west umbra
#

Do you know who Richard Stallman is?

urban escarp
#

Ofc!

#

One of the developer

west umbra
west umbra
urban escarp
#

Unix

west umbra
# urban escarp Unix

You are wrong, he started GNU project which is Free(opensource) operating system. And GNU stands for GNU's Not Unix

#

Its not Unix

#

Its Unix-like

urban escarp
#

No no no

#

He is one of the original develop of UNIX! Come on read!

#

No sorry my mistake!

#

He did not make unix

#

Rather GNU which is a copy of UNix

west umbra
urban escarp
west umbra
#

Come to the the offtopic channel

fickle granite
#

you know, there's this thing called "Wikipedia" which answers these sorts of questions.

urban escarp
west umbra
urban escarp
#

If software should be free, why also not hardwares!

quick tapir
#

everything should be free!

misty yew
#

i can tell you didn't even bother reading the homepage

vagrant fern
#

I finished setting up my selfhosted email server ๐Ÿฅณ

#

Works and delivers. I have a clean IP from a reputable provider so that probably helps

#

For anyone wanting to make their own, I used this guide: http://workaround.org I may also publicize my Ansible role to host it sometime.

fickle granite
#

wow, I'm surprised. I assumed that in practice you'd have to pay someone a lot of money to get a "clean" ip address

vagrant fern
#

I thought the same, but figured might try anyhow ๐Ÿคทโ€โ™‚๏ธ

#

I have a friend who selfhosts with mailcow and the only hurdle he had was that one German ISP asks for contact data on your website (for abuse etc. I'm assuming)

fickle granite
#

out of curiosity, why did you do it?

vagrant fern
#

just curiosity and interest in learning about postfix and dovecot, apart from that I'm a big fan of selfhosting

fickle granite
#

curiosity is the best motivator IMO

vagrant fern
#

indeed :D

fallow tusk
#

Cue comments about cats.... }:)

fickle granite
#

wouldn't dream of it

bitter salmon
fallow tusk
#

I'm here, but not at home.

bitter salmon
#

well. let me boot into manjaro and share some errors with you

fallow tusk
#

Sure.

bitter salmon
#

so you can know about it, and maybe give some feeback

bitter salmon
#

alright, 501 updates later and im here

#

@fallow tusk how can I share details with whats going on. whenever I activate wayland after install i just fall back to a black TTY (I think at least) and some emacs like shortcut pressing later i am back to the login screen

#

the hardware relevant but the same errors are there before x11 enters

fallow tusk
#

Can you ctrl-alt-2 to get tty2 up?

#

Not sure about the errors, tbhโ€ฆcan't tell if they're important or not!

bitter salmon
#

KDE plasma works well with that error at least

#

you mean ctrl alt 2 while im trying to get into wayland?

fallow tusk
#

Plasma X11, I assume :)

#

Yeahโ€ฆ should give you a tty you can use to execute commands to see what's going on

bitter salmon
#

yes, Plasma X11

#

should ctrl-alt-2 work now? because it does not do anything

#

let me switch and try

fallow tusk
#

Sorry - c-a-F2!

bitter salmon
#

I get to the same TTY screen shown in my screenshot, cant input commands

#

same when im in X11

fallow tusk
#

Hmm. And the same with C-A-F3 or C-A-F8?

bitter salmon
#

yes, no change when i use one of the other F keys

fallow tusk
#

That's unusual, but I think you can disable that...

#

Just starting up a VM to check what I'm telling you!

bitter salmon
#

maybe my KDE version is to new?

#
Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.9-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 24 ร— AMD Ryzen 9 7900X 12-Core Processor
Memory: 125,0 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4090/PCIe/SSE2
Manufacturer: ASUS
fallow tusk
#

This is what I get from C-A-F2

bitter salmon
#

that is what I used to get on my old system

#

It might be purely driver oriented and i know that nvidia is a pain

#

might have to wait for plasma 6 to arive

fallow tusk
#

Yeah, but it ought to work. I'm sure I've had a Plasma/Wayland setup running on Arch.

#

I guess you can view the logs from Plasma X11. I was going to suggest a live USB and digging from there (arch-chroot is a wonderful thing!)

#

Any instructions that end with the step 7. Profit have to be good, right? :D

bitter salmon
#

it looks promising, but i never installed GNOME as far as im aware

#

ahh part 4

fallow tusk
#

Yep, ignore the Gnome stuff

bitter salmon
#

well, part4 is very implicit for me, no idea what they want me to do

#

should i add it to MODULES='' you think?

#

MODULES="nvidia, nvidia_modeset, nvidia_uvm, nvidia_drm" like so, with commas between?

#

or without?

fallow tusk
#

Let me have a look at mine - if I recall correctly it is space-separated

bitter salmon
#

space seperated worked

#

and i already had the second part of part4 done

#

alright.. rebooting into GNOME Wayland now.. lets see

fallow tusk
#

Gnome?

bitter salmon
#

the link said gnome wayland, but it did not work, same thing

#

I can try to install another distro though

#

would booting another distro and formating my SSD with manjaro mess up my boot loader and my option to boot into windows you think?

#

and do you have any distro recomendations?

fallow tusk
#

It shouldn't. The grub installation will try to detect other OSes, and it's usually good at finding Windows

bitter salmon
#

nice to know

fallow tusk
#

Manjaro's probably a good one, or Ubuntu of whatever flavour you fancy (I like Lubuntu for its size - LXDE, but Kubuntu is the KDE Plasma variant)

bitter salmon
#

so maybe manjaro GNOME could be a good fit to test out?

fallow tusk
#

Maybe, although I tend to stick clear of Gnome - it's always seemed slow and clunky; trying to use everything the machine has just to add a few bells and whistles to the GUI. (But, yes, this is like me preferring petrol manual cars because historically I've found them better, even if the automatic diesels are a heck of a lot better now)

bitter salmon
#

I also have the same general feeling about Gnome

#

but since Manjaro Plasma is not working as I want it to, I can just try and see

fallow tusk
#

Have you tried a full reinstall of Manjaro Plasma?

bitter salmon
#

yes, this is a clean new install

fallow tusk
#

Weird.

bitter salmon
#

yeah, I cant even get i3 to work, so im opting for a driver issue

fallow tusk
#

Yeah, almost certainly.

bitter salmon
#

I do however have no idea how to debug it. it all worked very well with my RTX 3090

fallow tusk
#

Probably something to do with those errors you're getting at the start ;P

#

I'm unlikely to be able to replicate if it's an nVidia issue - I have a Radeon card in the laptop. It's the desktop that's got an nVidia.

#

(but the desktop is out of action atm, anyway)

#

Of course it just defaulted to X11

bitter salmon
#

yeah, thats the default.. but I might just get a new SSD and test out other distros via that one. I just want to test out new stuff and see if i like it.

fallow tusk
#

I like to play with distros every so often, too. Although I do tend to use VMs to do that.

bitter salmon
#

yeah, but you know, hardware and nvidia

#

im getting a new SSD tomorrow or order it online and have it ready for the next weekend

fallow tusk
#

Good luck!

weak otter
#

Hi everyone. Having this weird problem with running a large matrix computation using np.memmap. I can't tell if it's an issue with python or something about the hard disk. I had the disk wiped clean, checked for errors, formatted in ext4. The disk space is 2 TB, and I make 11 large matrices of size 90 GB. That's just 990 GB, but then suddenly, the computation stops and the terminal disappears. The memory consumed also just shows 500 GB, when there are 7 large arrays. Is there a way to track exactly where this issue is originating from? I just know that it stops while making a specific array, and that's it. From what I know so far, disk looks clean and no issues with reading/writing. But I don't know, maybe there is some sector that is bad?

fickle granite
#

if this is Linux, you can tell if it's an out-of-memory error by looking in /var/log/syslog for hints that the "OOM killer" ran

urban drift
#

+1 to this being an OOM issue, also check your ulimits with ulimit -a

#

Bad sector would hang or silently rearrange, especially if you're only writing out half the available disk space

fast barn
#

I try to use this command
ls files_{7..10}
However since the default shell in my terminal is csh, this didnt work.
I find a solution to use

foreach i ( 7 8 9 10 )
ls files_i{$i}
end

But how i can apply this on the terminal since it takes just one line?

fickle granite
#

another solution is to use a different shell

#
โฏ bash -c 'echo ls files_{7..10}'
ls files_7 files_8 files_9 files_10
fast barn
#

Nice
So this will run the command in a bash, regardless of your default shell right?
Because my default shell is csh

shrewd stratus
#

you can also replace csh with bash by putting exec bash as the only line in your cshrc, if you don't have the access to change your default shell

fast barn
#

I will try this out, as you say i have limited access to lot of things

#

another question
When i check the machine i work on using lscpu command
I found that i have total 4 threads.
so if i need to make parallel execution it canโ€™t be more than 4 at once.
ls directories |xargs -n 1 -P 15 du -sh

And then check cpu using top command i found that its list the 15 job, is that possible to work on all of them in parallel with the 4 thread system

shrewd stratus
#

one CPU core can make work on multiple threads concurrently (by switching between them periodically)

#

specifying the process count equal to the number of available cores minimizes the number of such context switches

#

you can do that like xargs -P $(nproc)

craggy kite
#

I made a thing. It makes Python CLI tools start much faster.

I now use it to make my pre-commit hooks blazing fast. It's nice for git commit to be near-instant again, even with pre-commit checks!

It's called JumpTheGun, because it makes Python tools win the race by cheating ๐Ÿ˜‰
https://github.com/taleinat/jumpthegun/

So I'm looking for early adopters. If you like, give it a whirl and let me know how it goes.

spark mulch
runic goblet
# craggy kite I made a thing. It makes Python CLI tools start much faster. I now use it to ma...

neat! had a quick look at the repo, doesn't seem to be malicious (can't be too careful with the recent wave of malicious packages found in the wild)

i am not sure what is the cause, but some entrypoint scripts seem to be written with " as opposed to ' (maybe it was generated by a different template or something), as such the find_entrypoint_func_in_entrypoint_script in your lib fails to detect the entrypoint func

fwiw, i was testing using sqlfluff

main olive
#

what is the lightest possible linux? my laptop is a potatato so i need sped

wise forge
fallow tusk
#

If you don't need a gui, there are much smaller footprint linuxen

#

Alpine, for exampleโ€ฆbut it's light for a reason - it doesn't have much more than the minimum necessary to get an OS up and running

wise forge
#

small footprint OSes aren't good for desktop, hardly anything can be booted on them easily

#

laptop mentioned hints, he needs desktop stuff probably

fallow tusk
#

I agree, but with just "lightest possible linux" to go on, the rest is just assumption (and I specified my assumptions so they could choose based on what they actually need, or come back stating their assumptions)

main olive
#

yes, I did mean "fast in performance", but I might still check out the one you sent me

fallow tusk
#

A gui is always going to be slower than a command-line only interface :D

runic goblet
lethal trail
#

How to bypass grub rescue mode?

fallow tusk
#

That usually indicates that a valid boot config can't be found. iirc the way I've got around that previously is to use a live environment, chroot into my system, and fix the boot - which has usually been caused by an update that got interrupted.

#

I've sometimes managed to use rescue mode to boot into an existing system, but that tends to involve reading howto instructions on the web :D

vagrant fern
main olive
craggy kite
vagrant fern
#

not the โ€žlightest possibleโ€œ, if you want the lightest possible probably slackware in text mode or something

main olive
vagrant fern
# main olive thx

if you want something lightweight to manage files on your desktop, install pcmanfm and run it with the desktop flag

#

runs nicely on an ancient laptop with 2gb of ram

main olive
#

ight

fast barn
safe stirrup
#

Do interpreters running inside cygwin still provide access to the win32 API via ctypes?

safe stirrup
#

there's no start menu in it, you right click on the desktop to bring up the menu

#

otherwise the default UI will probably be somewhat familiar

#

The latest release is based on Debian stable (11) so it might be a little less current than other distros, but it should still get the job done

fading thorn
#

Hello everyone, i would i like to build my python app for MacOS and Linux, but i don't know how to do this. How exactly should i do this?

#

[My machine is a windows 10 computer and i dont have any ways of running macos or linux]

spark mulch
fading thorn
fading thorn
main olive
#

I don't think people generate executables for python

#

specially on linux and mac, you just run it

fading thorn
#

(the Portal 2 editor addon)

fading thorn
main olive
#

I don't know any way to turn python code into unix executables so

fading thorn
#

Thanks anyway

main olive
#

your welcome

#

actually

#

I think pyinstaller can turn python code into executables for unix

#

let me see wait

#

see this

ember quiver
main olive
#

I saw that sof post, I think they want to build a executable they can share or something

fickle granite
ember quiver
fading thorn
#

actually i'm too lazy windows only it is

acoustic ridge
#

anyone know what are these pipes in the shell thingy called

#

the one which looks like a maze

dapper musk
acoustic ridge
hallow herald
#

do i need adwaita for dark mode in gtk?

#

can i theme a gtk application window without adwaita?

urban drift
#

that's just the default in gnome 3 (citation needed)

hallow herald
#

so what is the theme getting used by gtk without libadwaita?

urban drift
#

ohh libadwaita is something different

#

isn't that the one that adds CSS support to GTK

hallow herald
#

idk i am just trying out gtk on windows

#

built it some time ago with gvsbuild

urban drift
#

ah
yes you can apply themes without putzing with libadwaita
afaik libadwaita gives you the ability to customize themeing on a per-application basis

#

global themes can be applied like normal

hallow herald
#

that shouldn't matter on windows right tho?

#

since gnome is separated from windows anywyas

urban drift
#

my educated guess says the only thing that gtk on windows changes is the path location for the themes

#

it'll be somewhere in %APPDATA%

#

but I'm not certain it'll all work the same

hallow herald
#

gtk on windows is surely a mess

urban drift
#

i wouldn't know, my windows install is strictly for league of legends

hallow herald
#

although, all that gnome jank and all the dlls are still somehow half the distribution size of pyqt's wheels

urban drift
#

lol pyqt

hallow herald
#

what an overbloated lib

urban drift
#

QT is a dead technology since 6 went proprietary anyway, we just gotta wait the couple years for qt5 to go EOL

hallow herald
#

what will happen to kde then?

urban drift
#

last I checked they had plans to continue security patches on qt5

hallow herald
#

And isn't wayland qt also?

urban drift
#

naw, not strictly

hallow herald
#

i mean qt was a sizeable part of linux gui

urban drift
#

qt6 is like a full rebuild of the thing that the Qt foundation is trying to push

#

nobody's going to be on a qt5 -> qt6 upgrade path

#

5 will probably just get forked, idk, I haven't looked at the licensing

hallow herald
#

forks that try to make Qt stick more with std C++ exist

#

like copper spice

urban drift
#

cool stuff. then maybe qt5 simply won't die

#

laughing at how GTK opted to implement its entire own object system instead of trying to interface with C++

hallow herald
#

qt did the same thing

#

but it has no c interface

urban drift
#

that is powerful a power move

hallow herald
#

i wonder if i can go ahead and publish gtk wheels for windows

hallow herald
#

Since those exist at all

urban drift
#

don't native wheels on windows need specific versions of visual studio installed

hallow herald
#

for the compilation, yes

urban drift
#

iirc it was a pain in the ass

hallow herald
#

but gvsbuild automates the entire build process, even creates the pygobject wheels

#

and i ran a quick pyinstaller test of my hello world gtk example so I know what dlls and dirs are needed for the whole gnome-gtk thing

urban drift
#

The script requires a working installation of Visual Studio for Windows Desktop, Python 3 and msys2.
ahhh, so it is still a pain in the ass lol

#

gvsbuild looks handy though

hallow herald
#

Imagine requiring vs and msys2 both

#

some unix libs haven't yet shifted to cmake land

urban drift
#

mixed feelings on cmake. whenever im on windows and a tool uses cmake I'm relieved. when a linux tool uses cmake I prepare for the worst

hallow herald
#

btw i am allowed to distribute wheels for gtk right?

#

from a legal pov?

#

since that might be a reason nobody has done it before

urban drift
#

uhh, I think that falls pretty squarely under "you have to relicense your code under the GPL as well" but as long as you do that I think you're fine

hallow herald
#

i mean it will be all on github anyways

urban drift
#

yeah afaict distributing wheels constitutes "conveyance" under the GPL so your code also must be GPL

#

/shrug if it's all open source on github you're fine

hallow herald
#

@urban drift u got any gtk experience?

urban drift
hallow herald
#

have u used a listview?

urban drift
#

ostensibly yes but any help I give would be out of the docs lol

hallow herald
#

ok but anyways i am trying to add a listview to a window

#

and the rows appear very thin and have no text in them

#
def on_activate(app: Gtk.Application, file: pathlib.Path | None) -> None:
    lv = Gtk.ListView(
        model=Gtk.NoSelection.new(Gtk.StringList.new(["A", "B", "C"])),
        factory=Gtk.ListItemFactory(),
        show_separators=True,
    )
    Gtk.ApplicationWindow(
        application=app, default_height=600, default_width=800, title="", child=lv
    ).present()

This is what I am trying

#

@urban drift by any chance could u help with this?

urban drift
lethal trail
#

Which is the best Linux dusto which i can run in my old low end laptop,
I am shifting from windows so i want a windows like desktop

#

Is there any Destro which fills my recruitment best

#

I am so confused there are maaaaaannnnnyyy destro and everyone have there specific advantages

#

๐Ÿ˜ฑ

main olive
lethal trail
#

linux come with a grub boot loader do it stuck to grub rescue mod if i plug ssd out?

#

i have win8.1 in internal hdd

#

and i want to learn some basic of linux before jumping completly to it

fallow tusk
#

If you just want to play with Linux first, I recommend putting it on a VM. That way you can try out different distros and different setup quite easily

main olive
#

i dont think low end laptop can run VM easily

fallow tusk
#

You could set up a VM that mimics your internal and external drives and investigate what happens, and how to set them up

wise forge
fallow tusk
#

True, although if it's the only thing runningโ€ฆ

wise forge
#

VMs are hungry

craggy kite
#

I'm writing a shell script that will run my Python code via exec, but first I need it to run a background process. Considering that this going to be run in a container as the main process, would it enough to run my background process as python my_background_task.py </dev/null >/dev/null 2>&1 &? Should I be using something like nohup, or something else?

wise forge
# craggy kite I'm writing a shell script that will run my Python code via `exec`, but first I ...
  1. make rethink, maybe your background process should not be background, launch it as side car additional container. Try to keep one container per process

  2. if choice one is not available and you still want background process... check, if your logic allows launching it with your programming language mulththreading (or multiprocessing) in background, along side with main process. That is very optimal good choice as well. (especially if using multithreading, because threads used right in a use way, make sure to crash parent as well if problem happened, which makes properly restarted your container. At least this is how it is handled in golang. Not checked in python)

  3. ... mm other options are way less prefered at this point, but next prefered choice having parallel process launched in parallel with main one (in same ENTRYPOINT/CMD command!) through & linux shell syntax
    https://www.cyberciti.biz/faq/how-to-run-command-or-code-in-parallel-in-bash-shell-under-linux-or-unix/

  4. other options should be not even mentioned at this point

craggy kite
# wise forge 1) make rethink, maybe your background process should not be background, launch ...

Thanks for the detailed response and multiple options!!

Option 1 isn't relevant in my specific case, unfortunately, though "one process per container" is indeed a good guideline to follow.

Option 2 seems basically like 3, where 3 does it using the shell language's API.

I think 3 should be fine, since with exec the current process is replaced, so the background sub-process should be fine until the main process ends, after which it is no longer needed.

ember quiver
lethal trail
#

ok

river raptor
#

i can try

#

helping you

fallow tusk
#

@lavish adder Do not spam across channels. My suggestion was to narrow your focus to the part that is relevant to this channel.

lament tide
# lethal trail I am so confused there are maaaaaannnnnyyy destro and everyone have there specif...

If you are new, just use Linux Mint and be done with. It is based on ubuntu and is better than ubuntu in all sense.

Ubuntu creates problem as time goes on. It is not a beginner friendly distro. I always get surprised when Ubuntu is recommend to new Linux folks. Especially if u have time constraints. If u want ubuntu spwcifically, I recommend Xubuntu for a good experience.

If you aren't tied to ubuntu related stuff, I recommend Arch but it is for advanced users. A lot of reading and tinkering stuff needed initially. But extremwly rewarding for long term use. My installation is 5+ years old with zero hiccups.

Pop!OS is somewhere in the middle. A better Ubuntu I have heard. But I haven't used it. But have heard praises from my dev friends.

lethal trail
#

its similar to windows desktop

lament tide
#

Good choice. Its community based distro. It provides full out of the box experience which is expected by a windows user. And works with all the things needed for a dev or a normal user. Like GPU drivers etc. ๐Ÿ™‚

#

Hangout in their forums. They have a wonderful community. ๐Ÿ™‚

lethal trail
#

thanks

hard pilot
trail crater
#

user friendly

#

similar to windows

#

easy to use

#

ubuntu has a bunch of issues with snap, performance errors and so forth

#

mint doesn't have those

#

and i dont recommend pop os

#

tried installing it for a friend and the ui was confusing asf

#

like, why tf do i have to use command line to install a friggin taskbar?

urban drift
#

idk what's with all the ubuntu hate, GNOME 4 has had some serious performance improvements + canonical is still the most reliable when it comes to rolling out security patches

#

u can simply not use snapd if you don't want it, but most packages that "require" it... don't. It gives you a choice whether you want to download a version from apt or from snapd, it's just that the apt versions are tied to ubuntu releases and the snapd versions are rolling

frank orchid
#

!e

shy yokeBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

frank orchid
#

e

#

e
print('hello world')

#

!e
print('hello world')

shy yokeBOT
#

@frank orchid :white_check_mark: Your 3.11 eval job has completed with return code 0.

hello world
frank orchid
#

!e
print('hello world'

shy yokeBOT
#

@frank orchid :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     print('hello world'
003 |          ^
004 | SyntaxError: '(' was never closed
minor coral
#

!e
import os

shy yokeBOT
#

@minor coral :warning: Your 3.11 eval job has completed with return code 0.

[No output]
shrewd stratus
#

use #bot-commands instead

minor coral
trail crater
#

who comes from windows expecting to deal with all that snapd bla bla bla

#

not me, i began with ubuntu but they weren't forcing snap down our throats when i first joined (20.04)

#

firefox was still apt back in april 2021

drowsy patrol
#

if I got 2 folders as ./test/folder1 ./test/folder2

#

would sudo chmod o+rw ./test

#

add rw to other on ./test and its subfolders/files?

shrewd stratus
#

you'd need chmod -R for that AFAIK

cyan rapids
#

!e

shy yokeBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

heady elm
#

!e
from time import time
print(time())

shy yokeBOT
#

@heady elm :white_check_mark: Your 3.11 eval job has completed with return code 0.

1682629934.2222834
heady elm
#

omg ๐Ÿ˜ฑ๐Ÿ˜ฑ๐Ÿ˜ฑ

fickle granite
#

wat

#
$ decode_time_t 1682629934.2222834
2023-04-27T21:12:14.222283+00:00
true delta
#

does anyone use EBPF with python?

trail crater
#

!e
import os
print(os.getcwd())

shy yokeBOT
#

@trail crater :white_check_mark: Your 3.11 eval job has completed with return code 0.

/home
trail crater
#

!e
import os
os.system("pwd")

shy yokeBOT
#

@trail crater :warning: Your 3.11 eval job has completed with return code 0.

[No output]
vagrant fern
#

Please use #bot-commands

vale cloak
#

!e

shy yokeBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

vale cloak
#

!e
print("a")

fallow tusk
vale cloak
#

Ah

#

Sorry

real vapor
#

perks of having an ISP that mirrors the arch repos

Total (237/237)         3.6 GiB   276 MiB/s 00:13
#

2.2Gbit/s package slurping

#

now, I could upgrade my computer with a network card and get 10Gbit...

vagrant fern
#

wow which ISP mirrors linux packages lol

#

thatโ€™s impressive

ornate stone
#

Ah

fallow tusk
#

If your ISP is a university, then lots of universities have mirrors :D

river raptor
fickle granite
#

I assume AWS mirrors Amazon Linux ๐Ÿ™‚

real vapor
river raptor
#

they have two plans, was it the private one?

#

also, is it fasterb ecause you are connected to it?

real vapor
#

considering in the private one you can get up to 25Gbit/s

#

but you need pretty serious hardware for that

real vapor
river raptor
#

Okay

normal dagger
#

for some reason after adding plugins in pycharm, it just crashes.(mostly themes)

fallow tusk
#

So is this a unix question or a Pycharm question?

normal dagger
fallow tusk
#

What is "it" here? Pycharm?

normal dagger
#

but it happens after I switched to Ubuntu.

fallow tusk
#

I don't use Pycharm, so can't say whether that's a known issue with running it on Linux or not.

normal dagger
normal dagger
fallow tusk
#

VSCode mostly.

normal dagger
#

vs code?

normal dagger
fallow tusk
#

Yes

#

Well, I don't know about "good". I've used it to work with some github repositories

normal dagger
#

gonna try that, I don't want to struggle with this issue for years.

wise forge
#

pure inbuilt functionality is kind of enough for 98%+ cases though

#

since it can already make code reviews and solving merging conflicts

#

Git Lens just extends functionality and has inbuilt git blame running, and allowing to see Git diff between any chosen brances, and other stuff doing

deep rivet
#

Hi everyone, I am having issues installing Python3.10 on Raspbian 11.
Here's my approach to installation:
wget https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz
tar -zxvf Python-3.10.11.tgz
cd Python-3.10.11
./configure --enable-optimizations
make altinstall

The error I get is the following (excerpt):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)

#

As I understood, I need to set the two variables $PYTHONHOME and $PYTHONPATH, but I have no idea how to do so.

ember quiver
deep rivet
#

Both ๐Ÿ™‚

#

I actually managed to install python3.10.11, but I still get this error when I try to run it

#

I mean, I am able to set a variable on linux but I don't know what to set it to

fallow tusk
#

prefix and exec_prefix will be defined by the configure script

#

Iirc, exec_prefix is usually /usr/bin

fallow tusk
#

It tells you to bash Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>], yes? You can find those in one of the output files that was generated when you ran bash ./configure --enable-optimizations (they'll be one of the newer files in the Python-3.10.11 directory; I can't recall the name - something like configure.conf, perhaps)

deep rivet
#

aaaaah ok I'll have a look!

#

I got the following:
prefix='/usr/local'
exec_prefix='${prefix}'
What do I do with it now?

fallow tusk
#

Do prefix and exec_prefix are both /usr/local, so the suggestion is to set PYTHONHOME=/usr/local (although that doesn't feel quite right to me. Perhaps it is...)

deep rivet
#

I tried "export PYTHONHOME=/usr/local" but when I try to start a service (home-assistant) based on python 3.10, I receive the very same error

fallow tusk
#

I assume that make altinstall completed successfully

deep rivet
#

I actually used "apt install python3.10"

#

root@GC01hass:~# python3 -V
Python 3.10.11

fallow tusk
#

I'm unsure. It's claiming it can't find encodings, which is part of the standard library. That suggests that something didn't go well with the installation. I'm a bit worried that you've tried to install by both a manual compile and using apt; I wonder if they are interfering. I would go through and uninstall the versions you have installed, and clean up from the manual install steps, then just do the apt install from clean.

deep rivet
#

ok! I'll give it a try ๐Ÿ™‚

#

thank you so much in the meantime

fallow tusk
#

(tbf, this is almost the "turn it off and back on again" approach to problem solving!)

deep rivet
#

LOL, I can't even apt purge because I get the same error!

fallow tusk
#

That sounds like it's trying to use the installed version for the system python. Try unsetting PYTHONHOME

#
export PYTHONHOME=```
deep rivet
#

but it says
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)

fallow tusk
#
which python
which python3``` ?
deep rivet
#

(how did you write formatted as code?)

#

root@GC01hass:~# which python
root@GC01hass:~# which python3
/usr/local/bin/python3
root@GC01hass:~#

fallow tusk
#

!code

shy yokeBOT
#
Formatting code on discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

fallow tusk
#

OKโ€ฆso no python; I am going to hazard a guess that you also have a python3 in /usr/binโ€ฆ

deep rivet
#
root@GC01hass:~# whereis python3
python3: /usr/bin/python3.9 /usr/bin/python3 /usr/lib/python3.9 /usr/lib/python3 /etc/python3.9 /etc/python3 /etc/python3.7 /usr/local/bin/python3.10 /usr/local/bin/python3.9 /usr/local/bin/python3.9-config /usr/local/bin/python3 /usr/local/bin/python3.8-config /usr/local/bin/python3.8 /usr/local/lib/python3.9 /usr/local/lib/python3.7 /usr/local/lib/python3.8 /usr/share/python3 /usr/share/man/man1/python3.1.gz
fallow tusk
#

Yep, so what is your PATH?

deep rivet
#

python3 = /usr/local/bin/python3.10

#

I think...

fallow tusk
#

I'm a bit unsure, but either /usr/bin/python3 has been linked to the wrong version or it's not being found (due to PATH??)

deep rivet
#

aaaaah yes I think it's my fault

#
root@GC01hass:~# ls -l /usr/bin | grep python
lrwxrwxrwx  1 root root       23 12 mar  2021 pdb3.9 -> ../lib/python3.9/pdb.py
lrwxrwxrwx  1 root root       31  5 apr  2021 py3versions -> ../share/python3/py3versions.py
lrwxrwxrwx  1 root root       25  7 mag 14.37 python3 -> /usr/local/bin/python3.10
-rwxr-xr-x  1 root root  4703672 12 mar  2021 python3.9
#

should I remove the softlink?

fallow tusk
#

It probably needs to be linked to /usr/bin/python3.9

deep rivet
#

still doesn't purge :;(

fallow tusk
#

I'm a bit stumped, now :(

deep rivet
#

Yeah

#

I think I might reinstall the whole OS...

fallow tusk
#

Probably easiest at this point

deep rivet
#

Thank you so much for trying to help ๐Ÿ™‚

#

really appreciated!

fallow tusk
#

Yw :)

wanton star
#

Hey guys I followed instructions from a book (copied and pasted): $ pip3 install jupyter; sudo pip3 install virtualenv
No idea why the book used sudo in the 2nd command but not the first.
Now every time I do anything I get errors:

Traceback (most recent call last):
File "/usr/bin/pip3", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 575, in _build_master
ws = cls()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 568, in init
self.add_entry(entry)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 624, in add_entry
for dist in find_distributions(entry, True):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2066, in find_on_path
for dist in factory(fullpath):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2128, in distributions_from_metadata
if len(os.listdir(path)) == 0:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/platformdirs-3.5.0.dist-info'

#

Can someone help fix my python3/pip3?

wise forge
#

also this does not specifies which Linux distribution you have

wanton star
#

Just running pip3 on its own produces the above errors

#

Ubuntu 20.04 LTS Desktop x64

wise forge
#

oh, i am user of similar distro ^_^ used Kubuntu 20.04 LTS for the last 2-3 years

wise forge
#

which installed some new files with permissions of a root user

#

and since you work from a regular user -> you are no longe rhaving right permissions to acces it

wanton star
#

Great! Thats what I get for following instructions from a book

wise forge
#

ergh, this situation is easiest to fix by reinstalling OS i believe.
if you have nothing important on it, it is the easiest way, unless u wish to find some obscure instructions to repair it regardless

#

screwing up System Python is one of those reasons where reinstallation is easiest to fix ^_^

wanton star
#

Honestly, do python authors ever check their articles?

For the last 10 years (I kid you not) everytime I follow an article about Python it always ends up in disaster

#

Every. Single. Time

wise forge
#

for any dubious risky stuff i run docker run -it ubuntu:20.04 bash first

#

it creates me temporal container isolated from main system and connects me to its bash console

#

that is very lightweight and has its own... simulated system inside

#

from there i can do more risky stuff (including safely running deleting everything)

wanton star
#

I could literally follow instructions on a Python 'Hello World' script and it would break my system

#

because the idiot author would fail to mention things like: oh, this code is for Python2. Like, seriously

#

This is why I will never buy handover money for a Book or Subscription. Its all utter garbage. All of it

wise forge
#

technically

#

technically

wise forge
#

and its activation

#

after that you are able to screw up stuff too, it will mess up only local created venv copy

#

it is easy to do at ubuntu

#

venv is already usually installed

wise forge
#

once venv is activated, you are safe in isolated venv environment

#

where you can break stuff if u wish ^_^

wise forge
#

i just created venv in my user folder (~/venv), that i connect in parts for globally installed stuff

#

alias jypiter="~/venv/bin/jypiter" in my ~/.bash_aliases file create me global access easily to venv installed stuff for global specific stuff

candid dove
#

What is Jypiter? Something different from jupyter?

fickle granite
#

typo probably

candid dove
#

probably. Just wanted to make that sure

#

Anyway, so you got a global jupyter installation and just install ipython in other environments if you want to use the kernel in a notebook, right?

wanton star
#

Nah I've since uninstalled that piece of $shit. The author can't explain why jupyter is installed without sudo but the 2nd command has sudo, jupyter installed with a bunch of errors and warnings in red and orange respectively. Seriously the world of python is garbage

#

I remember last year in a different distro (EndeavourOS), python venv f'ed the package manager. Somehow it decided it was the default python. All from following a hello world tutorial

#

10 bloody years and I still havent been able to follow a Hello World tutorial without something breaking across 100 Linux installations in 10 years

#

Forget about something more complicated like web scraping a page, these idiots don't even fact check their articles

#

or their books.

My tip: Don't ever pay $$$ for a python book. Pirate it. The author aint worth a single cent

wanton star
#

Well I thought I uninstalled jupyter but the binaries are still in ~/.local/bin
So I had to install the garbage pip3 again, add myself to the 'staff' group so pip3 doesn't shit itself with PERMISSIONS errors (genius development there folks)
Attempted to uninstall jupyter, it tells me jupyter is not installed - WTF
So I pip3 install jupyter - that "works", there is a red error, nice one guys, my Ubuntu install isn't tainted with 3rd party repos whatsoever, never has been
So now I can finally run pip3 uninstall jupyter, that "works" but the binary files are still in ~/.local/bin
I uninstall python3-pip package. F this python platform

#

Removed myself from staff group too to unf*ck the mess

fallow tusk
#

I don't think you can put the blame on Python for issues you had installing Jupyter - especially if you were following something other than the official docs.
I've definitely had issues when I've made a mistake in an install - especially when I mis-linked the system python to a user-installed Python. But that was definitely an error on my part.
You certainly can't put blame on Python for something some third party writes. Stuff on the web is often wrong, or even if wasn't wroog when written, it may now be out of date. This is the case for any evolving system

#

And, in the end, there's nothing we on the server can do for you. If you want help or advice, ranting about how terrible Python is is likely to get you ignored rather than helped.

wanton star
#

Its easy enough to do a 'sudo apt install python3-pip', but then pip3 shits itself with PERMISSIONS errors just running it without any parameters

opaque ginkgo
#

what error

wanton star
#

If the answer to the above is YES, I would say Python3 really is a pile of poo

#

Error is:

Traceback (most recent call last):
File "/usr/bin/pip3", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 575, in _build_master
ws = cls()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 568, in init
self.add_entry(entry)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 624, in add_entry
for dist in find_distributions(entry, True):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2066, in find_on_path
for dist in factory(fullpath):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2128, in distributions_from_metadata
if len(os.listdir(path)) == 0:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/platformdirs-3.5.0.dist-info'

opaque ginkgo
#

and that's from running pip3 install jupyter?

wanton star
#

yes, or just running 'pip3' on its own

opaque ginkgo
#

the sudo fucked up everything

fallow tusk
#

pip is part of the standard install nowadays, although it was a separate piece previously (but I believe that was pre 3.8). You do still seem to have to apt install it separately, though. It should default to installing packages to a user-accessible location (there used to be a --user option that would enable that, but it should now happen by default)

#

I don't have access to a Ubuntu install right now, so I can't try to recreate what's happening.

#

Looks like Ubuntu has 3.10 in the repos from 22.04โ€ฆare you on an older Ubuntu?

opaque ginkgo
fallow tusk
#

23.04 has Py3.11โ€ฆ

#

20.04 has 3.8.2; that should still be pretty standard. I'm reasonably certain that even by then --user was unnecessary

runic goblet
#

if i remember correctly, using the system's installation of python's pip will usually print out a warning saying you shouldn't be doing that. this is maybe a new thing from the past year or two, i don't really remember.

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
from a quick google search.

imo the most correct thing to do is just use pyenv to install your desired python version, make a venv out of that, then install jupyterlab in said venv. (venv is virtual environment in case you aren't already aware.)

re. your point to book author not fact checking their content, the python packaging system is a quickly evolving system, the author might have the correct ideas at the time of writing it, but it might have been outdated now. and in any case, ditto on Hsitirb's point, ranting will unlikely get you the help you require

wise forge
#

if u need global python packages installed, better creating user specific venv and aliasing stuff from it ^_^

fallow tusk
#

I think I've probably needed system pip installed for things like pipenv - basically anything that's needed to bootstrap a venv, but nothing more

runic goblet
#

i take a more paranoid approach of installing a completely separate installation of python with pyenv, but the principle of "don't touch system installation of python if possible" is still the same

wise forge
#

not installed pip, and using alias flake8="~/venv/bin/flake8" in my ~/.bash_aliases i think is more reliable and less messing around

runic goblet
#

to each their own ๐Ÿ˜‰

wise forge
wise forge
steep sequoia
# runic goblet i take a more paranoid approach of installing a completely separate installation...

good principle- i once replaced /usr/bin/python3 to be the newest version of python and a lot of stuff broke. i still had the other version of python installed, it was just that python3 pointed to a different version (3.11 instead of 3.10). i would think that if they've got something version specific they would use that specific version (e.g. /usr/bin/python3.10 if they have something specific to python 3.10) but no, apparently not

#

ยฏ_(ใƒ„)_/ยฏ

fallow tusk
#

It's not version-specific, thoughโ€ฆit's release-specific (they may need to update a script or two when the version of Python is updated for a new release, but they don't have to change every single Python script)

hexed cave
wise forge
#

i have it as main running OS anyway ^_^

#
$ sudo apt list --installed | grep "python"
python3.10-venv/jammy-updates,jammy-security,now 3.10.6-1~22.04.2ubuntu1 amd64 [installed]
python3-pip-whl/jammy-updates,jammy-updates,jammy-security,jammy-security,now 22.0.2+dfsg-1ubuntu0.2 all [installed,automatic]
hexed cave
#

I did pip config set global.require-virtualenv True instead

steep sequoia
#

there shouldn't be any version specific stuff

river raptor
#

I still use KDE Plasma But i might Switch to another DE or a WM, im Not sure yet

fallow tusk
flat echo
#

I am trying to manipulate Windows filepath in an application running on ubuntu and centOS. What is the best way to do this?

fallow tusk
#

You can probably use pathlib with the windows-specific class.

#

!e py from pathlib import PureWindowsPath p = PureWindowsPath("C:\\") print(p) print(p / "User")

shy yokeBOT
#

@fallow tusk :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | C:\
002 | C:\User
fallow tusk
#

(The bot's running on a unix system...)

granite aspen
#

Does anyone know a command similar to more where I can look at a .py file with syntax highlighting? (Please do not tell me how to make more relay colors that are already encoded in the file--that is not my question.)

fallow pumice
#

bat, either find it in a Linux distro or then compile it in via Rust.

granite aspen
granite aspen
# ember quiver Vim?

vim sometimes plays poorly with tmux, which is annoying when I'm not trying to edit the file anyway

shrewd stratus
#

you can open the file in vim as readonly as well

granite aspen
#

that doesn't fix the problem

shrewd stratus
#

which is?

#

bat is definitely the best solution, ngl

granite aspen
#

if I'm using tmux (which I often am), opening something with vim sometimes makes the terminal all fucky. whether I plan to edit the file or not.

shrewd stratus
#

hmm, that's strange
I (and many others) use the tmux + vim combination daily

#

it could be a tmux and/or vim configuration issue

granite aspen
#

I've never configured either

shrewd stratus
#

or the terminal as well

granite aspen
#

I use cmder

shrewd stratus
#

I've never used that, so can't tell ยฏ_(ใƒ„)_/ยฏ

granite aspen
#

it's the best bash console for windows that I've used so far (my host machine is a windows laptop, but I do everything on linux VMs)

shrewd stratus
#

not a Windows user, but I've heard good things about Windows Terminal

granite aspen
#

isn't that win11?

shrewd stratus
#

it's also available on Win 10

#

Win 11 is when it became the default

granite aspen
#

hmm

#

did they finally get rid of cmd

shrewd stratus
#

in true Windows fashion, no

granite aspen
ember quiver
#

Terminal can use CMD or PowerShell or WSL at the same time

steep sequoia
#

nano -v for readonly mode

steep sequoia
#

if worst comes to worst, you could always write a syntax highlighting script and pipe into it with cat <file> [file...] | highlight.py

#

or something similar

#

if you do that, then you could probably cheat by using things like tokenise and ast

#

but that still sounds like a lot of work

#

im fairly late to the conversation but hopefully my confused ramblings were a bit helpful

narrow fern
#

time.process_time() calculates its value from /proc/[pid]/stat, right?

#

is it (utime + stime) / sysconf(_SC_CLK_TCK)?

summer trail
#

looks like it uses clock_gettime if CLOCK_PROF or CLOCK_PROCESS_CPUTIME_ID is available, or getrusage if RUSAGE_SELF is available, or times if times is available (in that order), finally falling back onto clock() / CLOCKS_PER_SEC

narrow fern
#

Well, that makes it complicated