@sourcejedi I just worry that user will now go off to answer SE's survey and be taken as an expert on how non-welcoming U&L SE is, and how we should never do such things again.
Lusci has a separate spam plan, so it's possible they are deliberately disabling spam filtering. That would go some way towards explaining why the spam filtering is so bad.
Weird, I lost the connection to SE Chat on the line I was using, though the internet connection still seemed to be up. Oh, well. Switched to my other line.
It's at times like this that I'm glad I have two lines. Sigh.
@StephenKitt @cas: The Debian Lua packages are in a horribly unmaintained state, but in many cases, uploading new/fixed versions would not be hard. In fact, quite easy. Do you know anyone who would be willing to sponsor Lua package uploads?
@FaheemMitha Ondřej possibly; given that Enrico is on the LowNMU list, you could prepare an upload (even adding yourself as co-maintainer) and file an RFS, even look for a sponsor on debian-mentors
The usual caveats with a language apply: you should test reverse-dependencies as much as possible, at least rebuild them with the updated package...
And of course the upload should take care of as many bugs as possible (in particular, the security issue, although since I haven’t reviewed it I don’t know whether it really is important).
@StephenKitt I've tried asking for sponsors on debian mentors in the past. I think there is also a web site one can upload on. I've got a whole lot of nothing in return.
I've found it more productive to try to contact people directly. Not that I'm found much interest in that direction either.
My experience of debian-mentors is the opposite: every time I’ve picked up an RFS and started the back-and-forth with the uploader, someone else has come along and sponsored the package without comment. I’ve pretty much given up reviewing packages now as a result.
@FaheemMitha I don’t think it’s a case of “ill-mannered”, more a case of trying to be helpful by doing things quickly (which of course could be considered “ill-mannered”).
@Wildcard well... let's try not to bring up the firestorm, if we don't need to. IMO it wouldn't hurt for SE to have another look at user feedback on the specific feature they felt so strongly about.
@sourcejedi hi there. yesterday I was suprised that "closing as duplicate" will redirect the OP links, which is sort off a hidden operation. But those OP can still be found but tend to be upvoted less often I guess
@sourcejedi a closed duplicate has its original link redirected which is quite unsuspected after it seemed to work and point to the OP at first, but no longer does. some might not savour this, including myself.
it would be better if the popupWindow that announces "dupe closing" would make that abundantly clear instead of clouding the "bitter reality" of redirection
sourcejedi: fyi : the site does a weird instant redirect AWAY FROM the duplicated-against question, in EVERY situation without consent of the OP. seen as unfriendly by some.
@dotbit The reasoning behind the automatic redirect is that a dupe with no answers is unhelpful to someone landing on the page from a search engine. Sometimes they will just see the question, that it has no answer, and then they leave. It does not matter how many hours you spent on crafting your question if it's a duplicate, it's still a duplicate.
@sourcejedi well, it looks like Google sees the original page but then the user gets redirected immediately anyway. So the existence of the duplicate does still help search engines, except most users can’t see that.
and other search engines show weird content, e.g. DDG shows the summary of dotbit’s question, with the title of the linked dupe!
@Kusalananda Kusa, that really depends. I did not find the dupe, for example, because it was dubiously worded . at one point you stop searching and post yourself, naturally.
@Kusalananda Kusa, actually you are wrong in that the case in point is not strictly a duplicate. A true 100% verbatim duplicate would be wortless, bus as u ureself point out: the secondary post was meticulously crafted and THUS NOT A DUPLICATE in the true sense. You misapply the word.
@dotbit a friendly general warning, try not to clutter the tech questions up with too much meta discussions about how the site features work. I'm making sure to answer your question on Meta, because a lot of the comments on the main Q&A site are likely to get "cleaned up".
@dotbit SE’s definition of “duplicate” is indeed confusing, which is why the phrasing around the whole issue was reworked recently. SE allows questions which are answered by answers to another question, to be closed, with a link to the other question.
There’s a conflict of interest here: the user wants an answer to their specific question, with all its subtleties; but SE wants to have all the best answers in the same place.
And usually the older question ends up being used as the link target, even if it’s not the best question.
I'm perfectly happy with users reopening a duplicate question if the answers to the linked question does not answer the question. If the linked question's anwers do answer the question, there is no point in reopening the dupe.
In fact, it happens with some frequency taht a question gets closed as a dupe, the user modifies the question to point out the points that are not answered by the other question's answers, and the question is reopened. No drama.
I'm not "suqqing" up to anyone. I'm agreeing with them that a question that has the same exact answers as another question is a dupe of that question.
As I said. No two questions will ever be the same, apart from by accident. Answering questions that have already been answered is tiring and unnecessary, and the quality of answers will go down over time if that is allowed to happen.
Better then to mark one question as a dupe of another. That way, if someone comes up with a new and novel way to solve the issue (like you did!), that can be added to the other answers.
A consequence of this is that more people will see your answer.
@dotbit I am having trouble understanding what bothers you, to be honest. Surely the objective is to get an answer, right? And the duplicate's answer did provide you with an answer, right? And your own post is still indexed by search engines, so its presence will make it easier for the next person to find the duplicate. I really don't understand what the issue is.
Is it that you want your post to be seen? Why? It's a question, those exist to be answered. Why is seeing the question so important?
And if you've shared the original link, then people will still find the answer (and more easily since they will be redirected). Isn't all this a good thing? What am I missing?
@terdon They may or may NOT find my answer, and in a more difficult way since they will be redirected elsewhere. In this case, I not only asked a Q but later actually provided a solution myself as part of the question text block.
the link given initially after posting did no longer work as intended which is "surprising" to say the least.
@Kusalananda Using your full name: "Oh powerful and merciful god of great answers, our savior of shell perils, our god Kusalananda" may be a bit long, don't you think? ;-) ;-)
@dotbit There are two things here. First, questions should be questions and answers need to be posted separately. That is essential since that is the only way people can vote on answers and the entire system is based on votes. So no matter what, the answer would always have been removed from the question.
Second, if your question was closed as a dupe, @dotbit, then why not post your answer on the duplicate? That way, everyone will benefit!
As for the link, you give a link, people click on it and get taken to where they can find an answer to their question. How else should it work? If you post your answer on the dupe, you will then be able to link to your answer directly.
@StephenKitt Well, I don't think I'm going to be building any new Lua packages. At least not without a significant investment of time. I tried to get a library to build for 5.3, and it promptly failed with a C compile error.
@derobert So going from left to right, the first match grabs everything possible?
yep. Conceptually, the a* first grabs everything. But then the match fails (because a+ fails), so it "backtracks", trying a* grabbing one less than everything. That succeeds.
@derobert @MichaelHomer I'm considering using LPEG in desperation. The default pattern stuff is a bit underpowered (and my best effort doesn't quite work), and I can't get rexlib to build for 5.3.
@derobert Does this backtracking actually start over from the beginning. Or is more a sort of tree search kind of thing?
@derobert If you had to do Lua pattern matching, what would you use?
Or I guess I could ask for help on SO? I've got a version that almost works, though it wouldn't win any points for elegance.
@FaheemMitha Actual implementations employ a lot of tricks to avoid the backtracking. But its conceptually a go back to the last match, try the next possibility, see if that works brute-force type of thing
Replacing strings in files based on certain search criteria is a very common task. How can I
replace string foo with bar in all files in the current directory?
do the same recursively for sub directories?
replace only if the file name matches another string?
replace only if the string is found...
@Kusalananda :-) So, are you giving me permission to "abbreviate your name" to the simple and more mundane Mr. Kusalananda ? Thanks for such high honor. ... You may address me by my abbreviated name of: "Isaac, God solver of all shell mysteries" for short, you can skip the other 20 titles and degrees. :-P ( nothing to be taken seriously in any sense! )
I just answered (or actually, undeleted and modified an old answer of mine) the most downvoted, still not closed, question on the site (-23). It is a fairly interesting issue relating to parsing out directories from $PATH and looking for specific files in them. It's not a trivial issue.
I wonder why it was voted into oblivion? Well, it's a homework question, obviously, but it's still an interesting thing to poke at (and it's quite old by now).
@FaheemMitha if you're going to learn one flavor, I would suggest PCRE. It is the most powerful of the three (by far), it has better syntax (IMO) and it is ubiquitous in the GNU world. Sed doesn't suport it (but GNU sed supports some of its features) but grep does and so do many, many programming languages.
@Kusalananda really? You don't see why \s would be better than [:[space]:]?
Or whatever that weird BRE syntax is?
I'm starting to understand why you're a Windows user... :P
@terdon Ok, I'll do that. I'm unclear how LPEG fits into this, but it seems it's not a regular expression thingy. And my background in this area is too deficient for me to have an idea of what it is. At least, without more study.
@JeffSchaller yes, that's fair. But I find the double brackets really confusing (as I just demonstrated by showing my inability to even remember the damn things)
Also, the [[:space:]] is longer which means not only harder to type but more error prone. You need to enter 11 characters. That's 11 opportunities for error as opposed to two with \s.
\s and [[:space:]] are not the same. \s matches spaces or tabs. This is what [[:blank:]] is for. [[:space:]] additionally matches newlines, carriage returns, form feeds, and vertical tabs.
Same as isspace() in C.
As I said. \s is fine if you have trouble writing, or have an extremely short attention span, or if you're extremely eager to get things going.
@Kusalananda there are so many regex flavors I had to actually check. In Vim, \. is interpreted differently depending whether "magic" or "nomagic" is set. But turns out the same is true of [.] vs. \[.]. And then there's \_. which will match newlines also, but so far as I know that's unique to Vim. :)
@FaheemMitha Use regular-expressions.info to learn (all flavors of regexes) and regex101.com to try (some/several) regexes on line. Of course, teh easiest to learn are BRE expressions but the least powerful, then jumping the gap to ERE (extended) comes quite easy. PCRE are quite complex as there are many options/alternatives. Just my 2¢ here.
@Isaac Thanks. I'm actually looking at regular-expressions.info right now. PCRE looks like a reasonable choice, but for now I'll just learn enough to get my job done.
@Isaac Oh, I'm just trying to do a simple bit of pattern matching. Split a pathname. So for example if I have /foo/bar/baz.jpg, I want to extract the baz.
But I also want it to handle corner cases the way I want.
@Isaac I understand that LPEG is different from regexes, but I don't know what it is.
@Kusalananda It's in the context of LuaTeX. I'm trying to process files based on their extensions for appending to a LaTeX document. It's mostly working, but one case I'm trying to handle got a bit complicated.
@Kusalananda Oh, a shell utility. Got it.
Probably C code under there. I see it's in coreutils.
@FaheemMitha There is a place to try LPEG: lpeg.trink.com/share/split. However, why are you using lua? Furthermore why ask about LUA in a UNIX forum? Unix doesn't use the Lua language and has no equivalent of LPEG.
@Isaac I'm using Lua because I'm writing LuaTeX. Are you familiar with TeX? And I'm asking here, because regular expressions and their cousins are quite close to Unix. At least pattern matching of various kinds are definitely popular in Unix.
Even if it's only globbing.
I doubt I'd choose to use Lua if I wasn't using LuaTeX. What you use Lua for?
@Kusalananda I believe that that question has been so downvoted because people are searching for away to list executables (commands) and the question makes some restrictions that most users doesn't find helpful (do not use completion). Maybe a question with the same title and without restrictions would be helpful to people seeking to find lists of commands.
@Isaac Interesting. Thanks for pointing that out. I don't understand Henri Menke's answer at all right now - it looks extremely complicated. Are you a TeX user too?
@FaheemMitha I have used TeX several times in the past to solve some particular problem(s). But I am not a proficient user in that language (nor in Lua). But I can find my way around if that is needed.
@Isaac About to sleep now. But I'm curious what "particular problem" would be solved by TeX. Me, I just use it write stuff. Nearly everything that isn't plain text.