#soylent | Logs for 2022-02-21
« return
[00:02:35] <Runaway1956> https://www.debugpoint.com
[00:02:38] <systemd> ^ 03Visually Transform Your Arch Linux with Stunning XMonad WM Setup
[00:02:54] <Runaway1956> Doesn't xmonad sound like something you should discuss with your doctor?
[00:31:50] <chromas> "Has number pad" should be a filter option for laptop shopping
[00:32:41] <FatPhil> it would be too easy to parody the lyrics of /Mona/ to be about window managers.
[00:37:32] <Bender> [SoylentNews] - CISA's List of Free Cybersecurity Services and Tools - https://sylnt.us
[00:44:10] <FatPhil> Fuck me, BBC has a bad case of Ukrainstipation. Keeps pushing and pushing, but nothing's dropped yet.
[00:45:03] <FatPhil> Russia's now "on the brink", for about the 20th time in 5 days.
[01:10:55] <Runaway1956> Question:
[01:11:16] <Runaway1956> If Russia were to steamroll Ukraine, WTF would the west do about it, after the fact?
[01:12:03] <Runaway1956> No mention has been made of airborne troops hundreds of miles away from the border who might be ready.
[01:12:47] <Runaway1956> So, Ukraine wakes up with 200,000 troops on the ground around Kiev, and another 300,000 plus pushing in through the borders, game over
[01:15:05] <Bytram> Runaway1956: those numers are larger than the ~100,000 troops that I've heard bandied about. What is your source?
[01:16:10] <Runaway1956> I made them up Bytram - but surely Russia has a half million troops at it's disposal
[01:16:59] <Bytram> Location. Location. Location.
[01:17:37] <Runaway1956> The United States and Ukraine say there are now around 150,000 Russian troops massed on Ukraine's borders in Russia and Belarus.
[01:17:48] <Runaway1956> Those are just the ones we know about, lol
[01:18:18] <Bytram> They are not so useful if sited in the eastern Siberia
[01:19:07] <Runaway1956> True, but I'm speculating about an airborne assault in Kiev, while all those troops poised at the border make a simultaneous assault
[01:19:25] <Runaway1956> Ukraine wouldn't have much of a chance, would fold in days I think
[01:20:04] <Bytram> unless they have several working Star Trek transporter rooms
[01:20:46] <Runaway1956> Those sneaky Russians may just have that!
[01:23:46] <Bytram> About a dozen years ago. I made friends with a couple recent college grads from Ukraine.
[01:23:58] <Bytram> biab
[02:45:57] <tedious> I haven't had the time to pay attention to all the different propaganda throwers lately.
[02:47:00] <tedious> Hmm so I guess russia isn't invading ukraine yet?
[02:52:08] <tedious> https://tass.com
[02:52:12] <systemd> ^ 03Biden ready to meet with Putin, if "invasion" of Ukraine hasn’t happened - White House
[02:52:52] <tedious> https://www.ctvnews.ca
[02:52:53] <systemd> ^ 03U.S. says Russia closer to invading Ukraine, agrees to meeting
[02:53:48] -!- boru` [boru`!~boru@nowhere] has joined #soylent
[02:53:51] -!- boru has quit [Killed (NickServ (GHOST command used by boru`))]
[02:53:54] boru` is now known as boru
[02:53:59] <tedious> https://www.nytimes.com
[02:54:01] <systemd> ^ 03President Biden agreed ‘in principle’ to meet with Putin to discuss the Ukraine crisis.
[02:54:23] <tedious> So that looks like both extremes agree that there's no invasion yet.
[03:43:31] <tedious> https://www.youtube.com
[03:43:32] <systemd> ^ 03What’s Going on in Ukraine?
[03:44:17] <tedious> Much better history and analysis than you'll get on some cable news channel.
[04:26:50] -!- AzumaHazuki [AzumaHazuki!~hazuki@the.end.of.time] has joined #soylent
[05:17:37] <Bender> [SoylentNews] - Scientists Identify How Caffeine Reduces Bad Cholesterol - https://sylnt.us - C-is-for-coffee,-that's-good-enough-for-me!
[06:39:50] <FatPhil> how can Russia be "closer" than "imminent", which is what they've been screaming for the last fucking week every fucking day.
[07:02:23] <Runaway1956> https://www.newsplate.org
[08:45:38] -!- AzumaHazuki has quit [Remote host closed the connection]
[10:06:20] <Bender> [SoylentNews] - ConocoPhillips is Selling Extra (Natural) Gas to Bitcoin Miners in North Dakota - https://sylnt.us
[10:17:48] <boru> Indeed, the propaganda from the US is comedy at the moment. It's like watching Dr. Strangelove.
[10:20:51] <boru> Since they've been unsuccessful with North Korea, Iran and China, the US is seeking war with Russia because: 1) the MIC is profitable and the backbone of the US economy and will help them dig said economy out of the gutter after covid and 2) is a distraction from the various civil dissent going on in several countries around the big pharma whistleblowers providing evidence of political corruption throughout
[10:20:58] <boru> the last two years.
[10:21:29] <boru> "Never let a good crisis go to waste"
[10:33:00] <FatPhil> Dr. Strangelove was too "out there" last time I tried to watch it. It's in my queue for giving another chance.
[10:33:54] <FatPhil> It ticks so many boxes that I would like, but there's just a terrible 60s influence that winds me up the wrong way.
[10:40:46] <FatPhil> ug, what's sed for 'a double-quoted string which is permitted to have backslash-escaped double quotes in it'?
[10:43:11] <boru> Too much of a context switch for me at the moment.
[10:44:11] <FatPhil> np :)
[10:49:10] <inz> FatPhil, does "\(\\.\|[^\\"\)*" work
[10:49:52] <inz> oops, missing ]
[10:50:03] <inz> "\(\\.\|[^\\"]\)*"
[10:57:19] <FatPhil> $ echo '"foo": "quoted \"bar\" here", "baz": "quux"' | sed -ne 's/.*"foo": "\(\\.\|[^\\"]\)*".*/[\1]/p'
[10:57:22] <FatPhil> [e]
[10:57:38] <FatPhil> hoping for [quoted \"bar\" here]
[10:58:52] <FatPhil> was hoping for sequence of anything apart from quotes followed by escaped quote any number of times followed by nonquotes, but that didn't work
[10:58:55] <FatPhil> $ echo '"foo": "quotes \"bar\" here", "baz": "quux"' | sed -ne 's/.*"foo": "\(\([^"]\)*\\\)".*/[\1]/p'
[10:58:58] <FatPhil> [quotes \]
[10:59:24] <FatPhil> as soon as I add more of my description to that sed command it fails to match
[10:59:38] <FatPhil> e.g $ echo '"foo": "quotes \"bar\" here", "baz": "quux"' | sed -ne 's/.*"foo": "\(\([^"]\)*\\"\)".*/[\1]/p'
[11:00:45] <FatPhil> herp derp, squiffy eyes
[11:00:46] <FatPhil> $ echo '"foo": "quotes \"bar\" here", "baz": "quux"' | sed -ne 's/.*"foo": "\(\([^"]*\\"\)*[^"]*\)".*/[\1]/p'
[11:00:49] <FatPhil> [quotes \"bar\" here]
[11:01:11] <FatPhil> you guys are great teddy bears - thanks!
[11:02:27] <FatPhil> https://www.statista.com
[11:02:29] <systemd> ^ 03Infographic: Where A "Cheap Date" Still Costs a Fortune
[11:03:03] <inz> yeah, my original didn't capture the contents, (or only the last element of it)
[11:03:15] <inz> You'd need additional \(\) to capture it
[11:03:30] <inz> But your version does the same, just a little differently
[11:04:16] <inz> There's also jq if you're working with json data
[11:04:45] <FatPhil> confirmed: $ echo '"foo": "quotes \"bar\" here", "baz": "quux"' | sed -ne 's/.*"foo": "\(\(\\.\|[^\\"]\)*\)".*/[\1]/p'
[11:04:48] <FatPhil> [quotes \"bar\" here]
[11:05:48] <FatPhil> yeah, I installed jq last week as I feared I'd need to resort to it
[11:06:02] <FatPhil> but if I can make sed last one more month...
[11:07:02] <FatPhil> yours is simpler
[11:07:39] <FatPhil> sequence of non-quote or escaped quotes
[11:09:20] <inz> Escaped anything, but yeah
[11:10:21] <inz> If you only check for escaped quotes, the result will be wrong if the string ends in an escaped backslash
[11:10:24] <inz> "foo\\"
[11:12:30] <FatPhil> yup, safer to take all escape pairs together in one chunk, no matter what's being escaped.
[14:47:16] <Bender> [SoylentNews] - NASA's Perseverance Celebrates First Year on Mars by Learning to Run - https://sylnt.us - another-birthday-to-celebrate-this-week
[15:08:53] <requerdanos> Honestly, if "\(\\.\|[^\\"]\)*" is simpler than something else you are doing, you are doing some complicated stuff.
[15:23:19] -!- requerdanos has quit [Ping timeout: 264 seconds]
[15:26:23] -!- requerdanos [requerdanos!~requerdan@Soylent/Staff/Editor/requerdanos] has joined #soylent
[15:26:23] -!- mode/#soylent [+v requerdanos] by Imogen
[15:28:15] <Bytram> grep puzzle: How can I display all records that contain "foo" AND "bar"... *in any order* ... preferably generalizable to the case of 3 or more: "foo", "bar", AND "buzz" in any order? So it would find "this foo that bar them" or "this bar that foo them"?
[15:29:15] <inz> Easiest: grep|grep
[15:31:52] <Bytram> inz: so like this?: cat $file | grep 'foo' | grep 'bar'
[15:32:38] <inz> yeah
[15:38:05] <Bytram> inz: works, yes, but for very large files I would think that requires 2 separate passes through the files? compare to: grep -E '((foo|bar)|(bar|foo))' filename
[15:38:38] <requerdanos> three or's don't make an and
[15:39:00] <Bytram> requerdanos++
[15:39:00] <Bender> karma - requerdanos: 48
[15:39:05] <Bytram> LOL!
[15:40:05] <requerdanos> you could try using the time command to see how long each takes, and judge for yourself whether the two passes are reasonable (just add the word time in front of whatever command)
[15:40:56] <Bytram> in the case of matching 3 separate strings, the pattern would contain 6 elements
[15:43:34] <Bytram> requerdanos: nod nod, but I am looking for a "design pattern", if you will, that offers a general solution.
[15:44:06] <requerdanos> honestly, pipe chains are a pretty tried and tested design pattern, no offense intended
[15:46:20] <Bytram> kind of like: grep -E 'foo|bar|baz|fizz|buzz|blah' etc.
[15:46:54] <requerdanos> https://www.thegeekstuff.com - search this page for "Grep AND"
[15:46:55] <systemd> ^ 037 Linux Grep OR, Grep AND, Grep NOT Operator Examples
[15:47:16] <Bytram> clicky
[15:58:16] <Bytram> requerdanos: that very nicely summarizes things...
[16:01:31] <Bytram> I was thinking in the general case (think slow, spinning rust) that embedding the alternation operation so the data would remain memory-resident with a single pass through the data, instead of needing to load it in N times.
[16:02:15] <Bytram> break time
[16:02:35] <chromas> there's only one pass
[16:02:52] <chromas> first grep reads file, second grep reads output of first
[16:03:31] <requerdanos> in the case of cat something|grep this|grep that I am pretty sure it's only read from disk once and every other process gets it out of the cache, but my understanding is pretty limited, hence suggestion to check it with `time`
[16:11:24] <requerdanos> or out of the pipeline maybe. how do pipes even work at the system level? above my pay grade.
[16:13:10] <inz> also the speed may depend on the ratio of lines-with-foo and lines-with-foo-and-bar
[16:13:41] <Bytram> requerdanos: I'll try 'time' later, gtg!
[16:13:47] <requerdanos> peace.
[16:14:17] <Bytram> inz: yes, good point!
[16:14:22] <Bytram> laters!
[16:55:07] -!- requerdanos has quit [Ping timeout: 264 seconds]
[17:00:10] -!- requerdanos [requerdanos!~requerdan@Soylent/Staff/Editor/requerdanos] has joined #soylent
[17:00:10] -!- mode/#soylent [+v requerdanos] by Imogen
[18:55:39] -!- xuser [xuser!~xuser@154.21.lmr.soz] has joined #soylent
[19:15:46] <Bender> [SoylentNews] - Linux Questions 2021 Software Poll Results - https://sylnt.us
[20:56:50] <halibut> I am pretty sure pipes are in-memory copies. There's some slowdown as it gets routed through system read() and write() calls, but it does not get written back to disk and then read back out (unless you are really memory constrained and there is swapping taking place).
[21:04:28] <FatPhil> https://github.com
[21:04:29] <systemd> ^ 03GitHub - goldsborough/ipc-bench: Benchmarks for Inter-Process-Communication Techniques
[21:08:00] <FatPhil> But don't copy his code, he can't code for toffee.
[21:22:43] -!- xuser has quit [Ping timeout: 264 seconds]
[21:30:24] -!- goatquest [goatquest!~goatquest@is.a.socialist] has joined #soylent
[21:35:15] <Bender> [SoylentNews] - Linux Questions' 2021 Software Poll Results - https://sylnt.us
[23:56:05] <Bender> [SoylentNews] - Forget State Surveillance. Our Tracking Devices are Now Doing the Same Job - https://sylnt.us - big-brother-(and-everyone-else)-is-watching