jbrains

joined 2 years ago
[–] jbrains 1 points 1 day ago

Excellent! Indeed, I'd completely forgot about H2, H3, and so on, so I'm glad you found it comfortable to figure that out!

I read Mastering Regular Expressions about 25 years ago and it's one of the best and simplest investments I ever made in my own programming practice. Regex never goes out of style.

Enjoy!

[–] jbrains 1 points 2 days ago* (last edited 2 days ago) (2 children)

I don't mind at all. Beyond my explanation, you might like to try to use an online regular expression checker to explore small changes to the regex to see how it matches what it matches.

Headings always match #\s+, because that's the character # followed by whitespace (\s) one or more times (+). Other text matches this, but so not all matches are headings, but all headings match. (You might have # blah in the middle of the text, which would match. If that's a problem, then you can change the regex to ^#\s+, where ^ means "from the beginning of a line".

Tags always match #[^\s], which means the character # followed by one not whitespace character. Be careful: tags match this regex, but this regex doesn't match the entire tag. It only says "there is a tag here".

Fortunately, that doesn't hurt, because your Python code could match #[^\s] and then turn that # into \# and thereby successfully avoid escaping the #s at the beginning of headings. You could even use regex to do this by capturing the non-whitespace character at the beginning of the tag and "putting it back" using regex search and replace.

Replace #([^s]) with \#\1.

The parentheses capture the matching characters (the first character of the tag) and \1 echoes back the captured characters. It would replace #a with \#a and so on.

I hope I explained this clearly enough. I see the other folks also tried, so I hope that together, you found an explanation that works well enough for you.

Peace.

[–] jbrains 5 points 4 days ago (5 children)

The most bulletproof way to do this seems to be to escape the # characters before running the document through Markdown. It might suffice to use a regex. (Insert regex and two problems joke here.) That seems promising because headings always match #\s+ whereas tags match #[^\s].

I hope someone has an even better idea, but this ought to work.

[–] jbrains 4 points 5 days ago

Excessive apologies can feel disingenuous and perfunctory. That makes it difficult for me to know when an apology is genuine. That erodes my trust.

Excessive apologies can signal to me that the other person sees me as a threat, and I don't want to feel like a threat, so I feel attacked.

But I could also choose to interpret excessive apologies as a sign of past trauma, so I could choose to have compassion and patiently ask the other person to talk to me about what's going on. I can share how I feel and hope that they feel ready to discuss what's happening for them. Patience would be key.

[–] jbrains 6 points 6 days ago

What's normal is that you had a traumatic experience, then internalized a Survival Rule to avoid repeating the behavior that led to the trauma. Depending on your age when the original incident happened, the Survival Rule might sit very deep, causing you to follow it even without thinking and without knowing why.

All that is normal: expected, sensible, reasonable.

The rule itself might no longer be needed. Can you imagine a situation in which it would be perfectly fine to interpret as a joke something that someone says without specifying it as a joke? Can you imagine three? Ten?

[–] jbrains 10 points 1 week ago

Now it depends whether you mean actual DEI or the nonsense that companies do in the name of DEI or the unfortunate overreaction that some people support related to DEI due to the resistance to actual, reasonable, sensible DEI.

"... regardless of all other factors..." sounds like the second of these.

[–] jbrains 6 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Obligatory mention of lazygit for those who prefer vi and its descendants.

No, I'm not making any claim regarding which is better. Hold your cards and letters. In many other universes, I'm a daily user of magit.

[–] jbrains 5 points 3 weeks ago

Teach the fish git. Or even cvs!

[–] jbrains 77 points 3 weeks ago

"I broke up with you, not with him. And definitely not with my rating."

[–] jbrains 1 points 3 weeks ago

Not constantly changing things until there is something significant to release is a path to the stability that I value. Meantime, packages run and the system works.

[–] jbrains 3 points 3 weeks ago (2 children)

I never wanted a hobby, but rather an operating system. I've been using Pop! for over six years. I only had one stretch where I felt like I was chasing annoying bugs and I don't remember it clearly enough to remember how long it lasted.

 

I run a lemp10. I saw a notification of a firmware update, but when I applied the update---apparently successfully---the firmware version did not change. Now I see no pending firmware update.

What happened? Is this normal? Task failed successfully?!

3
submitted 2 years ago by jbrains to c/unket
 

... men jag minns inte varifrån jag känner igen den.

 

I tried to upgrade my recovery partition today and it failed with "No such device"/OS error 19.

I found this discussion on Reddit in which @mmstick suggested restarting, but with no explanation as to why that was needed or would work. It worked for me.

https://www.reddit.com/r/pop_os/comments/xun8vu/error_updating_recovery_partition_no_such_device/

I'd like to know why it worked and why it was needed, mostly for two reasons: to generally understand the situation better and to imagine what I might have been able to do that didn't require restarting.

Thanks.

view more: next ›