_cnt0

@_cnt0@lemmy.villa-straylight.social
0 Post – 89 Comments
Joined 1 years ago

Add-on: you really don't need to get rid of the quotes. It's a very reasonable behavior. You just need to learn/understand what they mean.

As someone who has used linux for >25 years and has experienced the madness of SysV init scripts for decades (well, only two, but the plural is still technically correct; the best kind of correct), I have a very hard time to take people who make posts like these serious.

2 more...

The backslash escapes the space because it would otherwise denote a seperator to the next argument of the command. ls a b c means invoke ls with the three arguments a,b, and c. ls 'a b c' or ls a\ b\ c means invoke ls with one argument "a b c". That behavior is universal for pretty much all unix/linux shells (ie bash).

2 more...

Why is this so hard?

HP

There's your problem. Buy a Brother, brother.

3 more...

I've seen people, lead and principal engineers, who refuse to learn modern JS, insisting that since it was bad in 2006 its bad today.

It's still bad, though. That's not the reason why, but it still is. All the frameworks and things like TypeScript try to work around and hide the uglyness and stupidity of JavaScript, but they neither remove nor fix it. The way HTML was initially designed is the exact opposite of how it is used. It was intended to present data in a standardized way and leave the rendering and styling to the client application. People tried to create pixel-perfect designs with it. The entire resulting technology stack was created by idiots for idiots. And JavaScript is consistent in the misguidedness of the endeavor. All the marketing talk about platform independence is bullshit. It is easier to write platform independent GUI applications in C than in HTML + CSS + JavaScript. All the frameworks and languages transpiling to JavaScript trying to belie that just lead to a breeding ground of incompetent GUI developers doing esotheric coding ("doing it the way it is done" while understanding zilch about the fundament). The resulting developers are useless outside of their steaming pile of web GUI shit. The least worse of them are the ones promoting and perpetuating this failed technology stack by adding further layers of abstraction to try and hide that it is build on and from shit, creating even more esoteric developers in the process - by idiots, for idiots. Web GUI developers are paid less than any other branch of developers and it is completely justified.

13 more...

I remember this working really well on google. Recently (several months?) it didn't as I would expect. Fictional example: when searching for "asdf123" google would show results just containing 'asdf'. One particular thing I noticed was that google seems to omit underscores from verbatim strings. So for example when searching for "asdf_qwertz" it would show results that contained asdf and qwertz without the underscore.

5 more...

I'd wager a guess, that all file/folder paths that are surrounded by quotes contain at least one space!? And you're talking about the output of ls? It's rather unlikely, that installing any software has changed that behavior. It's just a display feature, to denote that "two" parts separated by a space are actually one.

1 more...

It's really neither a bug nor a problem. It is very reasonable default behavior to enable piping to or parsing by other commands because space is the default separator for arguments.

4 more...

one of those vendors

Which one?

Your so discriminatory! just because someone do'snot have perfect gramner not means their stupid or pourly educated! you're altitude is disgusting. could of said nothing but you like to disrispect other's on the internet. I could care less but pls get lost on the specific ocean!

4 more...

How many stuffed foxes do you have?

Because in unicode strikethrough is achieved by superimposing the strikethrough character on another character. So any regular character, emojis included, can be striked through.

𝕏̶

I just did the questionnaire for shits and giggles, not expecting much. The top two suggestions were fedora and debian. I'm actually running fedora and debian on different machines. I wonder how much of a fluke that is, or if it really is that good. Anybody else, who's already happy with their distribution(s), tried it?

If you take a free newspaper out of your mailbox and move the ad insert straight to the trash without looking at it, are you doing something morally wrong?

I find it astonishing how many people fail to make the mental bridge from our physical world into the internet. Talking about spam emails with my mom, I once asked her: If you find a sandwich from an unknown sender that you didn't order in your mailbox, would you take a bite because it might be tasty?

I think she doesn't understand the analogy to this day ...

I had forgotten about that.

And it was good that way.

If I don't have that song out of my head by tomorrow, I'll stalk your account, find out your irl id, and send you muffins with raisins.

1 more...

Fuck that fucking fuck. Don't you fucking dare to fuck with my fucks!

That being said, OP is obviously an idiot/troll.

Feel free to travel back in time and have a discussion with Ken Thompson in ~1970, whether spaces in file/folder names should be allowed in the first place. I for one use an underscore instead, whenever I have control.

2 more...

#!/usr/bin/env zsh is better for portability/compatibility. You can set the root shell as whatever you want (including zsh). Leaking the user context with sudo -s is generally a bad idea. Unless you actually share a system with multiple users, I'd advise to set a root password and use su - in favor of sudo -i or sudo -s. Two (proper) passwords are more secure than one.

edit: typo

1 more...

For the kind of workload you're describing, 16GB of RAM was on the low end like 5 years ago. Your number one priority should be getting more RAM. For what you're doing vmware is at least better than HyperV, and depending on what people are doing with their machines there can be pros and cons favoring Windows, linux, OSX, ... in your case Windows is factually the worst choice. When working as a developer with linux native technologies, use linux. If you insist on your kids playing with your work machine (interesting choice), and they "need" Windows, then dual boot. Other than that I'd second another users advice to go with fedora (easy to use, up to date, no bullshit). But do yourself a favor, go bare metal, and get more RAM.

1 more...

I like to cook a spice tea with cinnamon, star anise, cloves, and black pepper (cook it all for 10 minutes), and then add some fresh orange juice and honey. Goes well with deliriously binge-watching a series from my "to do" list.

2 more...

Fuck docker! All my homies use podman!

WTF!

Depends on settings and the amount of availlable RAM. Install fedora KDE spin on three systems, one with 4GB, one with 8 and one with say 16GBs of RAM. You should see, that the vanilla install of KDE uses different amounts of RAM on each system. KDE uses caching of all kinds of stuff to make the overall experience smoother. The amount and aggressivenes of the caching depends on distribution defaults. And KDE using, say, 8GB of RAM when idling isn't bad. RAM is only useful, when it is used. When memory pressure increases (applications are actively using lots of RAM), KDE will automatically reduce cache sizes to free the RAM up again.

The entire notion of the system using as little RAM as possible is really weird and usually (imho) shows that people who say that don't understand how the RAM is used. I want my system to make good use of my RAM, and as much of that as is reasonable.

All those different countries are confusing. It should all just be Germany.

Fyi: An official "Asahi spin" of fedora is coming up. It's going to be released later this year, if I remember correctly.

Heed the warning ;-)

Jk. It's not black magic. Just do as AlpacaChariot said. You might want to read up on it a bit https://www.shell-tips.com/bash/environment-variables/

Type A to C (almost) only describe the physical dimensions of the sockets/connectors. There is a (non-standard) color coding for A sockets that let's you see at one glance which USB version is supported (look for "Usual USB color-coding" here: https://en.wikipedia.org/wiki/USB_hardware). Color coding is rare on laptops, though. The best kind of cable is one that can be plugged in without force on both ends (/s). If you want to use a docking station, more important is, what protocols are supported on which port of your laptop. What you want/need is DisplayPort over USB-C (DP Alt Mode) or Thunderbolt. There is no easy command to check if you have it, and the most common advice to look for certain emblems next to the socket isn't really reliable. A quick google search suggests, that your machine can speak DisplayPort 2.0 and Thunderbolt 4. You should look into the technical specifications of your machine to be sure.

Not sure if you're trolling or being serious ...

Something not aligning with your personal prude morals is not necessarily a crime.

23 more...

My mother always made chicken soup when I was sick with a cold/flu. I always felt worse afterwards and she would be upset when I told her because "that's so unkind to say", like it was a criticism of her cooking. It took me so many years to figure out that I am slightly allergic to celery which I was only fed when I was already sick ...

When I was studying CS I had a few courses on UX/UI design and the most interesting fact I learned there when looking for papers is: ~half the high profile researchers in the UX/UI field are on Microsoft payroll, and everything Microsoft does is highly inconsistent to contrary to all the insights of their own researchers. I think they buy as many of those people off the market as they can, just so they don't work for somebody else, while shitting on their work, so their UX/UI just doesn't look as bad in comparison to others.

I understand the motivation of using the user environment in the root context. It's still a bad idea. The assumption is, that it is easier to compromise a non-privileged desktop user than the root account. Imagine some exploit breaking out of a sandbox and doing some minor modifications to your $HOME: either aliasing ls to a script somewhere in your home by changing your profile or some shell rc file, or prepending your $PATH environment variable with a folder burried somewhere in your home directory where a script ls is placed:

#!/usr/bin/env sh

if (( $EUID == 0 )); then
    # do something evil here
fi

\ls "$@"

Now, as an attacker you just wait for some admin on a shared system to come along and use sudo -s.

Yah, what this cunt says.

While this is true for most linux distributions, it's not true for all and there are other POSIX compliant OSs which are not linux at all:

/ # grep -i pretty /etc/*-release
/etc/os-release:PRETTY_NAME="Alpine Linux v3.18"
/ # ls -ld /bin
drwxr-xr-x    2 root     root           862 Aug  7 13:09 /bin
/ # 

As you can see, /bin is not a symlink there.

I have a Slimbook PRO X AMD. Except for the rubber bands on the bottom coming loose after ~2 years, it just works. And I never had a laptop from any manufacturer where the rubber feet/bands did not start to peel of after a few years.

1 more...

Up until now, I've only been commenting on other peoples comments to nitpick. I think it is time to give you a comprehensive answer on my own:

You didn't mention, what distribution you are using. Either way, you should use your distributions package manager to install zsh. Wherever that places the zsh binary is fine; you should not change that! If you want to know where the zsh binary is located, you can issue the command which zsh. That zsh should somehow be dangerous as a root shell because it is not POSIX compliant is nonsense. You can use whatever you like as a shell for root. If you don't want to change the login shell for root, you can just start every shell from any shell by executing it's binary (i.e. in bash type zsh, or the other way around). If you want to know what shells on your system are considered viable login shells by your system, you can issue the command cat /etc/shells; in your case it should list /usr/bin/zsh. If you want to change the login shell for a user, as that user run chsh -s ... where ... is the fully qualified path of a valid login shell; to be sure to not make typos or use an alternate path, you can combine that with which, and for example to use zsh use the command chsh -s $(which zsh). If you are the sole user of your system, I'd strongly recommend using seperate configurations for zsh for your normal user and root.

So now when I drop into a root shell I don’t get [...]

Issuing su - or sudo -i or logging in as root in a full screen TTY (ctrl+alt+F*) will spawn a new shell (the login shell configured for root). If you are unsure, what shell you're currently in, you can find that out, by issuing the command readlink /proc/$$/exe. If readlink is not available on your system, you can use ps -fp $$; be aware though, that that will show you the command the shell was started with, not necessarily the path of the shell executable.

If you want to write scripts you should always specify the shell it should be executed by with a shebang. For maximum portability/compatibility (do you like to distro hop? want to share it with a friend/the internet?) you should use env in the shebang. For you, if you want to script with zsh, that simply means always having #!/usr/bin/env zsh as the first line of scripts.

I'll add my +1 for FreeCAD. It can export to stl (you mentioned that in another comment). Though, if it is a good fit for your father's needs is highly dependent on the kind of designs he's trying to achieve. FreeCAD is good for "geometric" designs, not so good for "organic" shapes. As any tool, it comes with a learning curve.

It's certainly no bad habit to handle spaces in scripts preemptively, and obviously they do occur in the wild. Quotes from ls output do not get piped to other commands. I had to look that up myself right now, because it has been quite a while since it mattered to me.

$ touch 'file with spaces in name'
$ ls
'file with spaces in name'
$ ls | cat
file with spaces in name
$ 

Looking through some scripts I wrote back in the day, I seem to like to use ls -1 in scripts. I guess that reduces ambiguity on what the separator is.

I avoid ads whereever and whenever I can. If the stuff I can't avoid is particularly obnoxious, I make a mental note never to buy the product even if I need something of the sort.

edit: mixed you up with OP, but, meh, unaltered reply:

Where the fuck is the actual executable and its configs?

which ... with ... being the name of the executable. Whyever it matters to you in which exact path an executale is ...

God help you when you uninstall and clean things up if you use compiled packages instead of ones from your repository.

make uninstall or xargs rm < install_manifest.txt will usually do the trick. If neither is an option, observe the output of make -n install and undo the installation manually.

Judging from your post and comments, you'd be much better off with a distro other than arch and using packages from a distros repository plus maybe flatpak or snap.

This has to be my number one gripe about Linux. How every package just spews binaries and libraries and config files all over the place.

99.9% of the times those places are pretty well defined and easy to look up. You seem to lack some basic knowledge about linux/unix conventions and make false assumptions about how things should be and then come to judgemental conclusions when they aren't.

now

They have had it for a while ;-)

ps: I hope I got the tense right. Not a native speaker and slightly drunk. They still have it.