ChubakPDP11+TakeWithGrainOfSalt

  • 0 Posts
  • 79 Comments
Joined 9 months ago
cake
Cake day: February 10th, 2024

help-circle









  • This is egregious. standards(7) says Linux is both SuS and POSIX. Either mkdev.h is neither and I am wrong, or there’s some shit going on because LXRs list it in older versions of the kernel. In fact if you, I mean me, with my Google recommender system cache, search for ‘mkdev.h’, an LXR comes up! Just stupid and egregious. I was looking forward to running them. But see, time’s moving on from POSIX. People are writing cool supersets of these utilities in Rust. Like: fish, ripgrep, fd, exa and oh so many more! Also, Core Utils is entirely useless now. I just got introduced to the ‘Miller’ utility, an AWK-like string processor that, instead of doing line-based, does key-value. There’s jq too. I think I am the ‘new generation’ of terminal users. I am not very young, 31, but when I started using a PC at 10, it was a Windows XP machine — I did not even get to experience the ‘clunky’ days of graphical shells. But it’s been a while now that I am just constantly using Kitty to interface with my system. Barely use the WM. That’s why I have decided to make my own WM that fuses in a terminal but let’s more on or now.

    So yeah Heirloom Toolchest is useless. But at any case, you wanna try the original AWK, someone has pushed it to most of the repositories for Debian-based systems. sudo apt install oawk. It’s good if you suck Kernighan’s dick whilst fondling Aho’s balls like I do. But besides historical reasons why use it. AWK was made useless in fucking 1985 when Perl came lol.




  • True, but see, all these build up on the theoretical regex. The theoretical regex indeed has only 3 operators: dot for concatenation, pipe for alteration and the ‘kleene star’ [re: Sipser’s]. These 3 operators can express a finite state automata. You don’t really need all that other operators. Read this: https://swtch.com/~rsc/regexp/regexp1.html Algorithms like Thompson construction can translate a regex to a non-deterministic automata quite quickly, and then from there you can make a DFA or just simulate the NFA.

    I would not call PCRE ‘regular expression’ really. If you read the article I gave you it explains why they are mostly a practical utility than a theoretical groundwork. The regex in use today is far from the regex one learns about in books.

    I think regex is abused. People use it to parse context-free grammars. Extremely intricate and feature-rich patterns cause people to make mistakes, and end up with security holes!

    That being said, I really enjoy NeoVim’s regex. I also like Perl’s. But I would not rely on them for parsing, or even lexing.