« first day (2848 days earlier)      last day (2404 days later) » 

Tim
Tim
01:17
Is there some website which can translate between regex of different flavors, for example from Perl regex to Python regex? Thanks. — Tim 1 min ago
 
7 hours later…
08:43
@Tim Perl regex is python regex
Or, more correctly, Python regexes are PCREs
 
5 hours later…
Tim
Tim
13:29
@terdon Not sure what you mean. in regex101.com, type in "(?s)image\s+?not\s+?available.*?$\K" for both PCRE and Python, it is not recognized for Python.
13:41
@Tim Ah yes, sorry, the (?s) might not be supported in Python. But Python uses PCREs so most of it should be.
The (?s) just makes . match newline characters, so you can search multiline strings.
There's bound to be a similar idiom in python.
Tim
Tim
I didn't know (?s) not work for Python regex. I was referring to "\K"
Is there a reference (webpage, book,) which compares equivalent syntax between Python regex and Perl regex, so that I can manually convert between them?
@terdon if you're doing Python regex fun you can pass it when you compile the regex though, re.compile(r'REGEXHERE', re.MULTILINE + re.IGNORECASE) as an example.
(both re and regex support that). Just as an FYI :P
recently struggled with multiline searches recently in a project with regex
Tim
Tim
Does (?s) really not work for Python regex? I thought yes.
@ThomasWard Neat!
@terdon but also, (?s) does work
13:47
@Tim I don't know, I just know that python's regular expressions are a PCRE implementation.
but you can do that with the re.[MATCHTYPE], so re.DOTALL would be (?s)
if you really want to be specific :P
The \K should be irrelevant anyway, that just means "forget everything you matched until here" so since it's at the end of the pattern, there is very little reason to use it at all
I am guessing this comes from an answer that was using it to match but suppress output
Tim
Tim
I'd appreciate some reference (webpage, book,) which compares equivalent syntax between Python regex and Perl regex, so that I can manually convert between them.
What references do you use to master different regex flavors?
huh, actually I don't see any reference to (?s) or such anymore, in Py3, I guess you need to compile the regex with the option calls now?
@Tim Practice
Tim
Tim
13:49
Are you sure?
@Tim Python 2 refers to (?x) syntax in the re but for re and regex in 3.7.0 apparently it's not doing that anymore
@Tim Python docs
Tim
Tim
link?
oop there it is nevermind
work's IExplore sucks
@Tim Not exactly a complete guide but I find this pretty useful: unix.stackexchange.com/a/119906/237982
13:50
not my fault they force Windows >.<
also contains links to some documentation
Tim
Tim
Python3 doc says re.DOTALL "Corresponds to the inline flag (?s)." It doesn't say (?s) is no long in use.
@Tim it's listed but whether it's actually still supported i can't say. it might be prudent to consider that it isn't necessary if you also call `re.compile(r'pattern', flag + flag + flag + ...)
@Tim you need to read my last message:
@Tim Mastering Regular Expressions
1 min ago, by Thomas Ward
oop there it is nevermind
to be fair, it could just be regex101's evil not having it
Jul 20 at 0:21, by Jeff Schaller
@Jesse_b "I had a problem, so I tried to solve it with regular expressions. Now I have two problems."
it's not uncommon that those sites don't have all the features available
(?flags) needs to be at the very beginning for Regex101 :P
Tim
Tim
@ThomasWard But Python3 doc says re.DOTALL "Corresponds to the inline flag (?s)." It doesn't say (?s) is no long in use.
that's why i said "OOp there it is nevermind"
which should be read as: "nevermind what I said, I misread and my find pattern didn't work"`
Tim
Tim
13:55
Thank you for clarification.
My apology
no problem. sorry if I come off as irritable, i'm still waking up (coffee hasn't kicked in)
Tim
Tim
14:17
Some open ended question. Being a Linux/Unix user, how would you consider a switch to working on .Net with C# under Windows in your career, short term or long term? I feel it is detrimental if haven't used Windows for a long time, and still in the stage of becoming familiar with Linux and development tools that are not binded to Windows. Some said then it is my problem, as if a qualified person shouldn't have such problem of switching back and forth
(thankfully for me, I'm a sysadmin not a developer so I don't have to deal with that as much heh)
Tim
Tim
I don't want to learn cmd or powershell, because I have already invested so much on learning Bash, and don't want to take a break or give it up, and have another headach with Windows.
Even if .Net and C# may not use cmd or powershell much, the tools on Windows are so different and restrictive, and I am not familiar with Windows for so long.
sysadmin can admin both Linux and Windows, however
I have a short experience of working on .Net and C# in Windows, it is just so different, and I feel all my previous experience in Linux can't be useful as they should be, and when I got out out that C# experience, I feel I was lost.
I felt being more restricted on WIndows, and so much to learn from beginning. When I got out of that experience, I don't even want to think about it any more. But someone seems to blame it on me.
@ThomasWard I think sysadm may have more challenge to work with different OSes.
true, but when your company only works with Windows and Ubuntu Linux servers/systems I don't have to know the rest of the LInux world
but since i'm not the only sysadmin here, I get handed the LInux sysadmin tasks
the other sysadmin gets the windows ones ;P
Tim
Tim
14:36
I don't mind being said unqualified. Just want to know anyone out there: how you think about such switch, and whether you are willing to switch, and if you do, how you coped or would cope with that.
Personally I would avoid it at all my best, at least for now, considering that I am still developing my skills not related to Windows, and leave it open in the future.
@Tim I'm also an admin not a developer but I recently moved from 15 years working almost exclusively on windows to working in an all unix environment and I actually am really happy about it. It's not like I completely forgot everything I know about windows and it has been a very fun challenge to come up to speed with unix. I was becoming bored with windows.
@Tim Also I am a strong supporter of powershell and do not agree with your suggestion that it is restrictive. It's a great language and helped me transition fairly easily into bash, however I can't speak much to going the opposite direction.
Tim
Tim
:) I didn't have chance to use or learn powershell before I got out.
I guess it's a very difficult situation though. I have always fantasized about specializing in one thing and having the time to truly master it, but in practice I have always become restless and try to work on/learn as many different things as possible
jack of all trades and master of none :(
Tim
Tim
14:53
@StephenKitt Thanks for mentioning the book Mastering regular Expression.. I don't find it mention \K (not \k) though.
@Jesse_b Being versatile is more valuable probably, since it is virtually impossible to master one.
@Tim I agree, also most of a sysadmin's job is the ability to google so you normally just need a basic understanding of what to google
15:11
@Jesse_b Agree that PowerShell is not restrictive... Batch files on the other hand are a pain.
I've written a few PowerShell scripts, mostly to screw with an Exchange server whose options weren't in their management GUI
but Batch scripts, no thanks :P
@Jesse_b If that's all sysadmins are required to be able to do, it explains a lot.
@FaheemMitha To be fair, almost any "sysadmin" task can be googled to solve the issue
that extends to computer network design, firewall design/rulesets, etc. too
at least, in the modern era, with StackExchange sites and SO and such
meshing all that knowledge together with an IT Security background though, that can't be done easily, so some of us have to actually know the things and adapt that knowledge when you weave in proper IT SEcurity at the same time
Tim
Tim
Also with database systems?
all kinds of systems.
@ThomasWard In my experience people in IT security seem to have the least IT knowledge
@Jesse_b And then there's me, the sysadmin/network engineer/security guy :p
@Jesse_b you're not wrong about that though, a lot of the 'security' people don't have an understanding of the underlying tech and knowledge
those that do are a rare breed indeed :P
15:33
@ThomasWard Heh yeah I kid, but I have worked with many security people that came from a non-IT background. They were good at setting policy without really knowing why
indeed, most of the "security" people are policy minded and/or "executives" rather than the front-lines soldier (so to speak)
there are those of us who are regularly on the "front lines" who also have the policy training to design and enforce policies
but mostly you find executives who push policy and it causes issues or because they don't know why.
shrugs
My current company's security team made such a big deal out of the fact that all our usernames are publicly available. Which granted it's not ideal but I don't see it as a security issue
They would say "It's half of your authentication challenge, it should be private" (not even true because we use two factor auth so it's 1/3rd of our auth challenge). Also it's the public "half", also every companies usernames are public because it's either first initial last name, first name . last name, or first name last name with no space
@Jesse_b not necessarily, many companies use randomly-generated logins
for exactly that reason
(which I agree is rather silly)
I am willing to bet they are the vast minority
@Jesse_b probably, but they include many large companies (at least in Europe) so the number of affected users is quite large
many Chinese companies even use randomly-generated email addresses
15:48
@StephenKitt That's probably a much more useful thing since I have emailed chief level staff of several companies when their customer support isn't helping me :-P
if their support person's email is [email protected] it almost always means their ceo will also be [email protected], and their name is listed on the website
@Jesse_b yup
@Jesse_b Did it help?
@FaheemMitha Oh yeah. I spoke to the ceo of centurylink recently and then got called by 3 different directors who all gave me their cell number and told me to call them if I ever have issues in the future
Their noc responds to our emails almost immediately now. Their phone line is still trash though but that's all companies
at least you didn't have to sit on the phone dealing with Sophos for five hours just to be told "Oh yeah the virtual email appliance you're using is totally fubar and we can't make it work again, so you need to redeploy it from scratch"
(this was me on Monday... that was NOT a good day)
@ThomasWard Do you at least have a headset? I ask all my companies provide one so I can do other things when on hold
Also I find the edges of cisco voip phone handsets are fairly sharp and start to hurt the ear after a while
15:59
@Jesse_b I wish I had a headset. But since all email in/out from the company was dead I was dedicated to that, nobody else bothered me :P
the Polycom VoIP phones we have here don't have comfortable headsets either
but i made the call from my cell phone so I had comfortable ear buds and a mic :P
it was the 5 hours just to be told "Sorry you're screwed" I was not happy about
NOW we have a cluster of appliances so we have failover but
still Monday was not a good day
(also, apparently, all Email system questions that aren't end user support are now mine to deal with here? :| )
oops
@ThomasWard Do something well once and it becomes your job
well it also doesn't help that since i've been brought on full time I've been the spearhead behind multiple major changes to system infrastructure here
email system mail flow, email gateway system replacement, firewall configurations, network layouts...
to be fair sometimes I think I'm not paid enough, but at the same time it's a chance to use all my knowledge in practice so :p
Not to mention a complete overhaul so that VLAN ACLs actually work (there were ACLs, and they were actually sane, but they didn't function previously because reasons)
@Jesse_b better to be able to help make things work than to sit there on your hands unable to make things work or make them be secure, in my opinion :P
@ThomasWard One of my companies had over 50k lines of ACL on their firewalls because one of the admins would just add a new rule every time he needed something and forget it
16:22
lol
16:44
@Jesse_b That reminds me of the time when I wrote to Jeff Bezos after spending weeks of frustration trying to get Amazon India to fix a simple problem.
Suddenly I had people calling me.
@Jesse_b That sounds like it belongs in your "getting to know you" answer. Hint, hint.
@Jesse_b What is ACL?
@FaheemMitha How did that work out?
@FaheemMitha Access control list.
@Jesse_b They fixed it, at least for me. I was a bit alarmed at the implication that they might have fixed it just for me. In India they have something called Net Banking, which is basically direct electronic transfer of funds from one account to another. Amazon India listed my bank, but then it stopped working - as in, if I selected the option, it would give me an error, saying it wasn't available.
But then I realised that if I deliberately failed the payment process, it would let me try again - possibly an indefinite number of times. And if I tried to redo the failed process, it would work. I then wrote to Amazon India repeatedly, and also talked to their customer service with no effect. It was very frustrating.
Such things are not unknown elsewhere, but in india the fractured English and general cluelessness + the fact that everyone apparently reads from the same script, definitely adds to the frustration.
I think customer service in the US was pretty dire too, but things broke down far less often there.
@FaheemMitha I think the customer service in the US is from India, they just make up names like "Steve" and "Bob"
Anyway, after I wrote to Bezos, I got calls telling me it would be fixed right away. It wasn't, but they did, eventually. Actually, I think I might have written to Bezos a second time.
I wrote Satya Nadella a message on linkedin once about a bug in windows 10 but I don't think it was ever fixed
16:53
@Jesse_b Not all of them. I can tell when I'm speaking to an Indian. Their speech patterns are very recognizable, and distressingly uniform. Doesn't anyone read books any more? There is a whole universe of possible sentences out there. You don't have to be a poet to explore it.
And in general Amazon CS is stellar, compared to some others. E.g. Airbnb, which mostly sucks.
@Jesse_b Did anyone acknowledge the message?
@FaheemMitha Nope
The thing is, since the bank option still worked with my workaround, as described above, there was obviously nothing really wrong, and it should have been easy to fix. But this went on for months, I think.
If Amazon has any competent coders, they clearly weren't working on that issue.
@Jesse_b Too bad?
Plus, payment gateways, or whatever they are called, are not exactly rocket science.
@FaheemMitha Yeah I don't work professionally with windows anymore so I don't mind. My issue was that windows 10 comes prepackaged with "candy crush soda saga" installed from the microsoft app store on the user account you set it up with. So when you go to sysprep the machine it gives an error since that is not installed globally, and the only way to uninstall it is through powershell
really? That wasn't actually on my Win10 Pro installation from scratch
probably because I selected "business network" so it didn't install but shrugs
@Jesse_b No idea what "candy crush soda saga" is. A game?
16:58
@FaheemMitha yes
@ThomasWard ok
@ThomasWard Yeah it was candy crush and one other app. I dunno if it was something I did during install but when I was googling it I found others with the same issue (granted it didn't seem to be a very well documented issue) so I know I wasn't the only one but it may be a semi isolated issue
@Jesse_b I think in the latest version of the installer ISOs they adjusted it so it'd be different for "I use this for work" instead of the "I use this for personal" options
Win10 Pro seems to have that inquiry anyways
and of course if you have oodles of money, Win10 Enterprise doesn't come with that stuff anyways
It was candy crush and twitter
well Twitter i can understand lol
Twitter's used by a bunch of companies as part of their marketing / exposure to the markets
but Candy Crush, no that needs to not be installed :P
17:06
Even still, twitter is a website I don't see much use for a twitter app
well you also have to remember Win10 was written to be "converging" between Tablet and PC
so the 'app' is for the people who use it as a pure tablet and not a computer with a mouse and keyboard
at least, IMO
the only reason I keep Win10 on my laptop in dual boot is for gaming. and my work computer has it, but that's the work computer :P
I would argue that windows 10 was written to be the final straw for fans of windows
I still use windows 7 on my gaming pc
win7 was... painful... and actually wouldn't let me play games because of the age of the graphics drivers (not updated for win7 anymore)...
and I had a free key of Win10 lying around so
nvidia still regularly updates my drivers for win7 although I find with nvidia it's best to use a driver at least 1 year old in order to not have bugs
I've also yet to run into a windows 10 program that wont run on win7
except for all the new bash/linux on windows stuff which is the only thing tempting me to upgrade
if that's your only motivation just run a Linux Server VM
because it doesn't do GUI stuff currently
17:11
centos/fedora ftw :-P
 
2 hours later…
18:53
hah. I had a cron job misconfigured to run every minute for several hours per day
 
2 hours later…
20:49
Recursion n.:
	See Recursion.
 
3 hours later…
23:36
what was the name of that script that allows you to download different color schemes for gnome-terminal, such as monokai, dracula, etc. as a big list. i think it may have been made in python

« first day (2848 days earlier)      last day (2404 days later) »