I admit I am short sighted, because I am struggling with basics of distributed systems.
cross reading several materials. figuring out what is what.
Do any of you experience using or writing internal web applications? For example, in your organization/company, in your backend teams, do you write nonfancy web applications to provide web interface to monitor the status of your backend services?
Like to know the basic architecture of such nonfancy web applications and what technologies are involved
Approximately how long will the chatroom automatically separate conversations? So that I don't have to use dash lines?
Writing several unrelated topics in one block is not nice to read
Today is a big day for UK people. Bless you all whether you are living there or not.
can anyone tell that I am writing several unrelated things?
@StephenKitt maybe that's what I should suggest when my spouse asks what I want for a Christmas present. Gives me shivers to see "Also by Brian Kernighan: The AWK Programming Language, with Al Aho and Peter Weinberger" to know they ARE the A, W, and K
@Tim reminds me a bit of Nagios! But semi-unrelatedly, I wrote a really simple CGI program to help me manage my work/todo items. read/wrote a CSV file. Very non-fancy.
and last I knew, Nagios was very similar in spirit -- the web page displayed the current status (based on an updated data file) and interfaced to scripts when you clicked the right "action" commands like entering downtime windows
@FaheemMitha It especially works then because there would be no politics. However to say that is the current state of things is an extreme exaggeration.
This general technique, as described in the first couple of paragraphs seems useful, but still quite limited.
Because one does not have the actual match in hand. Just the start position of the match. The article doesn't appear to address it. Though I might be missing something.
Hmm, perhaps I am indeed missing something.
The article has, further down:
> After that, the last \b in the regex is guaranteed to match where the second \b inside the lookahead matched.
But I don't see why that is the case.
Trying to read the associated article on word boundaries now.
I guess I could ask on SO. Would it be on topic there? Presumably it's not on topic here.
@Tim Monitoring we mostly use existing stuff here (Nagios, Cacti, Smokeping, ...) but yeah, a few. Most of them are pretty straightforward, some even CGI... Depending on how plain, HTML is hardcoded or comes from a template (with Template Toolkit or HTML::Template)
Some are as trivial as cron jobs dumping HTML (or plain text files) somewhere in the web root
Mostly though custom monitoring is by writing Nagios plugins
@Tim One of the ones I wrote here is more complicated (even including client/server stuff and a model of the system to analyze logs)... but that's rare.
I was reading https://www.regular-expressions.info/lookaround2.html
I might post a question on SO, but not if the answer is simple. Though I suppose it might help someone later. The more simple-minded and trivial my questions are, the more upvotes I get.
Oh... So the lookahead guarantees that at the position we're matching, there is a match for \b\w{6}\b ... a 6-letter word, i.e., a 6 "word" characters surrounded by a word break
\b\w*cat\w*\b then matches a word break (same as in the lookahead), followed by 0+ word characters, "cat", followed by 0+ word characters, followed by a word break.
Since "cat" is all word characters, the only way that both match is if the final \b line up
@FaheemMitha does that make any sense? (Did I even try to answer the right question?)
> After that, the last \b in the regex is guaranteed to match where the second \b inside the lookahead matched.
I don't why that is the case. I've actually been looking for a while for something to save position, but the docs for word boundaries don't say anything about this.
Though perhaps I'm looking in the wrong place.
Or perhaps I'm simply misunderstanding what the writer is saying. Wouldn't be the first time.
Ah, I think I see what the writer is saying. If the beginning word boundary is the same in both the lookahead and the following regex, then the next \b must match the end of the word, since there is only one end of the word.
@FaheemMitha Perl has a bunch of regexp extensions for doing stuff like that... at some point though, you switch to something simpler to maintain.
@FaheemMitha well, it's because they both only allow word characters. \w does not permit, e.g., space
So "hi bye" (two words) wouldn't match, because the space between the words doesn't match \w. Even though after editing the message its now 6 characters ;-)
@derobert Suppose one wanted to do something similar to the example at the beginning of that page, but just a text string with no blanks on either side. I.e. not a word.
Could one still use a similar technique? Because here one wouldn't have the helpful word boundary to tell you when to stop.
Nowadays, it's part of the standard library. Back then, it wasn't, but of course implementations were available.
(Trying to think of an easy way to match "cat" with at least 3 characters total around it... without using any crazy Perl features, or just writing all the permutations)
Anyway, I'll think about it, but I should probably move on. I learned a little bit about regexes. I should probably entitle this episode - Look! I Can Write Line Noise Too!
@derobert Don't worry about it. I just thing that the regex specs are a bit crippled.
But perhaps it's by design. If you want to do something outside this, write a program.
@derobert So, how you feeling about your job ending? Looking forward to a change?
Sure, some of it is code... but most of it has no use outside the company. Some of it I need to ask about open sourcing. But most of it is going to die.
And of course all the servers are being decommissioned, drives wiped, etc
@derobert You should try to save what you can save. And you should ask about license changes sooner rather than later. Once the company is gone, presumably that would be harder.
There might be some useful standalone bits, I need to find any and see about open sourcing them. Some of the bigger code things aren't standalone (e.g., customer portal which integrates a couple things) and/or aren't useful outside the company (e.g., survey creation tool... the first thing I wrote after being hired back in '05)
A lot of what I've been doing here is sysadmin work. All that stuff is going away. A few of the servers will have a future life, but only after wiping them (which I've already started on...)
@derobert Have you thought about going more in a development direction? Perhaps something with a bit more of a research type component? There are a lot of interesting software projects out there. Not sure how easy it is to get paid to work on them, though.