Piggybacking onto this to mention my go-to online RegEx editor: RegExr. It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this).
Wait. Are there flavors of regex? Every time I have to use regex it hurts my brain and I never need to do it enough to actually sit down and learn it properly like OP is doing. Just knowing there are different ways of doing the same things in an already mind baffeling language blows me away even more.
Yes. Most things use pcre, or Perl Compatible Regular Expressions, but there are other flavors. Usually they lack features or have slightly different syntax.
Yeah. The only one you really need to care about (especially under Linux) is PCRE, the good 'ol Perl Compatible Regular Expressions. For the most part, every other flavor is a derivative of that. Microsoft had a weird version for a while, but that may be completely dead now, thankfully.
Learning the syntax of regex is fairly easy. Hell, I still have to use this cheat sheet more often now that my perl skills are no longer needed or even relevant.
Regex isn’t that hard. The challenge is identifying and understanding patterns in the data that you are filtering. Here is a brain hack: As an example, if to have pages and pages of logs that you need to filter, open up one of the log files, stare at the screen and hold the page down key for several dozen pages. Patterns can be easily seen in the blur of text that is quickly scrolling across the screen. (Our brains love to find patterns in noise, btw.) The patterns that you see will give you focus points for developing regular expressions to match. ie: You start breaking strings into chunks and seeing the ebb and flow of data streaming across a screen helps. Anomalies in the data “stream” are are easy to spot as well.
From a security and efficiency standpoint, you should also understand where the most processing takes place so you don’t kill whatever platform you are working on.
Sorry for the rambling, but I am getting older and feel the need to pass on a ton of tips and tricks whenever I can for these “archaic” languages.
Thanks for the comprehensive reply! I have only used it for quite simple things like getting the id’s out of log lines where this and this key word exist. Great tip about pattern searching!
The only one you really need to care about (especially under Linux) is PCRE,
Well, no. sed, grep, awk, vi etc. use POSIX regexes. GNU implementations also provide perl compatible mode via an unportable option. In modern programming languages like go and rust standard regex engines are compatible to RE2 - relatively new dialect developed in Google that is not described in the Friedl’s book (you may think of it as an extension of extended POSIX dialect). Even raku has its own dialect incompatible to perl as well as other ones.
Nowadays it is common to move away from perl-like engines, however they are still widely used in PCRE based software and software written in python, JS etc.
Perl has introduced powerful backtracking regexes that were widely adopted. However they can be damn slow in some cases, that’s why RE2 refused backtracking while using some perl-like elements. Both basic and extended POSIX regexes are also non-backtracking because they are older than perl.
Regex101 is amazing. It tends to balk at backtracing which we rely on a lot for work, but it’s such a good visual.
Chat GPT can also save a lot of time writing regex, but it tends to write very unreadable regex because it thinks it’s being clever when it really isnt.
Regex is an art form, and writing readable regex is another step above that.
If the goal is to have the most up to date bleeding edge software, but have it on a critical machine, consider immutable distro like Fedora Silverblue or OpenSuse Aeon. Especially the latter will be just days behind Arch, and if an update breaks something you just roll back and try updating again in a week.
I used Silverblue as my main work system and this saved me a few times.
Yeahh immutable system is the way, I spent so much energy reinstalling systems that felt dirty and slow or just distro hopping. Then I tried NixOS believe me I’m not going anywhere else
can you rollback on boot like with NixOS? This is one feature I found really cool, but NixOS itself completely turns me off. They have several bootloader entries where you could just boot into a previous system configuration, which is not a filesystem snapshot like with grub-btrfs+pacman-boot-backup-hook or similar.
I am but a simple man. All my music is FLAC. It is arranged neatly in folders. I just want to select an album to play. I do not need album covers, playlists, search, streaming, tags, lyrics, analyzers, or scrobbling.
“By default it displays kanji as Chinese characters” Not quite sure what you mean by that
Edit: my bad, I read the other comment’s link and had not encountered the issue yet. Wish you luck to solve this
I think it’s pure luck what font does your OS prefer, I was using Pop_OS and it defaulted to Japanese, but I think it’s more common to default to Chinese because of the population size.
This a plea for help: is there any other distro that does immutability like nix without the configurstion of nixos. I love nix but its just so complicated. When something breaks i spend half an hour just to fix some small problem because i have to get the config then rebuild then test, etc. Idk if i was the one making nixos how would i fix it tho. Also its too teminal based for most people.
There’s the WIP NixOS-based SnowflakeOS that aims to make NixOS approachable for mere mortals but that’s still declarative configuration and of course still NixOS under the hood.
There’s a bunch of immutable distros out there that use OStree or some other imperatively managed snapshotting mechanism such as Fedora Silverblue or VanillaOS.
Timeshift with BTRFS kicks ass. I have mine set for daily snapshots, retained for a week. Only the changes between snapshots are stored, so the extra disk usage is minimal, and easily justified by the peace of mind in case of fuck-ups or broken updates.
Only the changes between snapshots are stored, so the extra disk usage is minimal
If you want to use a similar approach for backups, Borgbackup is a pretty nice piece of software. I have two backups of my most important files: One on my NAS at home, and one “in the cloud” on a storage VPS (ends up way cheaper than using S3, B2 or anything like that).
I’ve got one with HostHatch that’s 10TB of space for $10/month. It was an offer they had during Black Friday 2020. They had a similar offer during Black Friday 2023 but I think it was around $20/month, paid yearly.
I live in the San Francisco Bay Area and my storage server is in Los Angeles, which is around 10ms round-trip ping time from my home internet connection.
Hetzner is good too. They have relatively cheap “storage boxes” that are a shared environment rather than a VPS. You don’t get proper SSH access, but they do support FTPS, SFTP, Samba, Borgbackup, Restic, rclone, rsync and WebDAV. www.hetzner.com/storage/storage-box
Borgbackup encrypts the backups, so the host won’t be able to actually view your backups.
I’ve seriously been writing down the pros and cons thinking about switching over to Linux on my main desktop at home. It covers all the games I play now. I was very surprised.
Without the games to hold me back, I don’t see why I wouldn’t.
Follow Up: I’m on Linux mint! And my two favorite Windows games work just fine with zero configuration with Steam.
Do it. I switched a couple of months ago. I hated it at first, then cought on to what’s different. Long story short; I never want to go back to windows.
I’m also running NVIDIA (RTX 4070), and while I did have to try drivers from a few different sources, I eventually got it working pretty quickly.
But my mistake was choosing an OS that doesn’t bundle non-free drivers (Fedora), from what I’ve heard some distros like Ubuntu come with NVIDIA support by default, so I guess that’s also an option.
I’m on an Ubuntu derivative called Mint, and on the first boot it gave me a pop up from the driver tool recommending that I change to the proprietary driver with an option for one click automatic download and install.
You are correct that this is detected and handled.
I know some Linux users trash talk Nvidia on Linux like it just a piece of shit. But it’s simply okay. Don’t get me wrong it’s not great. But it works.
But if you have a simple setup it will probably work. My SO PC has a rtx 2060 and one monitor and it works fine.
You can of course always dual boot. I still have windows for VR gaming and just in case. I do recommend a stable os with Nvidia (especially if you just starting out with Linux). Something like pop os. Don’t go with arch just for the meme.
With dual booting you can try Linux and test if it’s okay for you. If not just give the disk space back to windows. If not great keep using Linux.
I have used nVidia on OpenSUSE since 2017, it has been 100% fine, no issues. it may help that nVidia maintains their own OpenSUSE repo for leap and tumbleweed etc
The more the number change in that direction, the more game devs will not choose to ignore non-Microsoft Windows options too moving the needle to native support. Imagine a future where a game only works after enabling WSL with command flag workarounds if you want to play on a proprietary OS 😂
I literally did this two weeks ago, switched Win11 for Fedora and so far it has been an amazing experience. So far, I only had to dual boot to Win once, and that was because I wanted to play some SteamVR games, which is the only thing I didn’t manage to get working (I know there’s ALVR, but SteamVR refuses to launch for me unfortunately).
Just go for it, get a new SSD drive and dual boot your choice of distro. You can always go back, and unless you use bitlocker you can just access your windows files from the Linux, so there’s not need to move stuff around that much. With dualboot, you have nothing to loose.
I don’t have money for a new SSD right now but my current SSD is mostly empty, 2TB. I turned off BitLocker to facilitate easy copying of files and because I’m pretty sure secure boot would be a pain. I’m running Linux Mint and I hope to go back into the windows install as little as possible. Maybe one day I’ll dump it entirely.
The EU regularly forces DNS server operators to remove entries or redirect certain domains. It’s super easy to circumvent but most users don’t know that.
The sites I’m thinking of never had their IPs completely blocked, the DNS entries for the domains were just removed. If you were to switch to a non-EU or self-hosted DNS server you’d get to the site.
But the domains in question are generally ones the US/EU/NATO propaganda machine has told people are bad, so there’s no outrage when they’re blocked. In many cases there are often cheers.
You seriously need to stop what you’re doing. Log in with ssh only. If you need multiple terminals use multiple ssh sessions, or screen/tmux. If you need to search something do it on your desktop system.
The server should not have Firefox installed, or KDE, or anything related to desktop apps. There’s no point and nothing good can come of it.
For me the turning point was when a failed Windows forced upgrade ended up deleting me important files. I had backups, but I lost days of work because Microsoft felt so insecure in the face of piracy that they had to upgrade my computer despite me constantly telling them not to do so.
That was around 10 years ago. I went through various KDE distros; in the end I settled for Kubuntu.
The recent developments in KDE plasma are excellent. I haven’t had to open a command prompt in years. I hadn’t had a tech problem until this year when my tmp folder got full.
I’m from the other side, though. I’m a developer and systems administrator on Kubuntu and I live by the command line. I use yakuake, which is totally awesome, and have about 50 or so shells open pretty much permanently, all nicely tucked away in tabs and sub sections in a programmable drop down that automatically starts all those command line shells when my computer boots. It’s pure awesomeness, Linus os pure awesomeness!
Damn, you know, I love automation and customization, and your description sounds awesome. I certainly will jump the gap at some point, but the thought of having to relearn an entire OS and suite of tools, and inevitably make mistakes that will cost me time and -probably- multiple reinstalls discourages me quite a bit. I remember using Fedora 20-something ten years ago on my laptop and the amount of things for which I needed a terminal was overwhelming. I also remember trying to learn file management by copying/backing up files from the terminal, and ending up batch-deleting entire folders worth of pictures. I never had a reliable “readme” for learning all this, that didn’t already assume I knew all the lingo and was proficient in some programming language.
I started using powershell more because it comes with a lot of bash aliases out of the box. Besides a brief period of using ubuntu in like 2006 because my windows install got corrupted, its my first foray into linux. Ive been daily driving debian 12 and i love it. I feel like getting used to the lingo helped ease the transition.
But if you actually use powershell for more than simple tasks and take advantage of its object oriented nature, it might make the switch harder. If you plan to use the command line as little as possible i think the switch is trivial. Your biggest worry is going to be analysis paralysis with all the options, but i just installed debian with the defaults and trying out different desktop environments is really easy and i havent yet had a problem that wasnt simple to solve with a google search.
Rhythmbox. It was pre-installed on Ubuntu back when I was on Ubuntu, and I kinda just got used to it. Strawberry looks really cool though, I may have to give it a try
Rhythmbox is great and works well for editing tags for my 15,000 track library. I went to Lollypop for a while trying to get some more features but I ended up back at Rhythmbox.
linux
Active
This magazine is from a federated server and may be incomplete. Browse more on the original instance.