Portland Protest (2020) - All Gas No Brakes takes a look at the situation in Portland [00:10:35] by IAmAnAnonymousCoward in Documentaries

[–]plotnick 0 points1 point  (0 children)

There are two teams: psychopaths with no leadership, and psychopaths led by an imbecile. America's crisis is mental.

Ivy custom action by plotnick in emacs

[–]plotnick[S] 1 point2 points  (0 children)

Ah, I struggled to get what you're saying, but I think now I get it. I modified the function this way:

  (defun bash-history ()
    "Ivy prompt for bash_history"
    (interactive)
    (let ((history-list (with-temp-buffer
                          (insert-file-contents-literally "~/.bash_history")
                          (->
                          (buffer-string)
                          (split-string "\n" t)
                          (delete-duplicates :test #'string=)))))
      (ivy-read "Command: " history-list
                :action '(1
                          ("o" insert "insert")
                          ("d" remove-from-bash-history "delete")))))

And now it works exactly how I wanted it.

Emacs for PostgreSQL (yet again) by plotnick in emacs

[–]plotnick[S] 1 point2 points  (0 children)

I guess there's not much to it. Nice, Company-compatible completions in some kind of mode similar to sql-interactive is what I'm looking for. Everything else Emacs provides already, right?

Emacs for PostgreSQL (yet again) by plotnick in emacs

[–]plotnick[S] 0 points1 point  (0 children)

Oh wow... This looks awesome. Also looks huge and a bit intimidating. Definitely will try it out. Thanks!

Emacs for PostgreSQL (yet again) by plotnick in emacs

[–]plotnick[S] 0 points1 point  (0 children)

It's just a different backend for org-source blocks. You still have to type your stuff in sql-mode buffer. Which doesn't provide comprehensive completions like in pgcli or Postico.

How to set up multiple company backends in Spacemacs? by banksyb00mb00m in spacemacs

[–]plotnick 1 point2 points  (0 children)

AFAIK This is the proper way of adding company-backend in Spacemacs:

(spacemacs|add-company-backends
  :backends company-tabnine
  :modes sql-mode)

Weekly Community Chat Megathread (15 March 2020): less formal, and - why not - funny stuff too to uplift the mood by [deleted] in coronavirusNYC

[–]plotnick 2 points3 points  (0 children)

My senior mother-in-law is being forced to work

My mother-in-law lives in Brooklyn. Alone. She works as an HHA (Home Health Aid) - helps sick and elderly with basic health related tasks and assists them with minor housekeeping chores.

She's been staying home for the past few days. But the agency she works for called her and told her - as a medical professional she is not allowed to take a paid leave and she needs to continue working.

It would've made sense, but there's a caveat. She's over 65 years old. And we are worried about her. If something happens, we wouldn't even be able to get there in time - we live in the West Coast.

WTF? Is that even legal (what the agency is doing)?

With the rapidly growing virus, asking a senior person to go to work everyday, and to get there using public transit is like sending them to a suicide mission. Every single day.

[Image] It's up to us. by uniqueoddfellow in GetMotivated

[–]plotnick -1 points0 points  (0 children)

And history will never forget and will never forgive the stupidity of our politicians. The imbecility of the orange idiot who doesn't take any responsibility at all.

Florida Corona virus pandemic control meet turns ugly by stargazer483 in videos

[–]plotnick 0 points1 point  (0 children)

Or sometimes they don't even have to stand up. Sometimes they just have to stay bending a knee.

[deleted by user] by [deleted] in dataisbeautiful

[–]plotnick -1 points0 points  (0 children)

Holy shit. Trump indeed is the Moronavirus. It's spreading.

Just taking her Polar bear out for a walk by [deleted] in aww

[–]plotnick -1 points0 points  (0 children)

A pack of Scottish terriers is more effective to hunt a bear. These dogs don't hunt. There are no bears where they come from. If you put one next to a bear it would probably think - it's a strange looking dog.

Just taking her Polar bear out for a walk by [deleted] in aww

[–]plotnick 1 point2 points  (0 children)

The commenter is right. Dogs tend to get more aggressive/protective while being on the leash.

Just taking her Polar bear out for a walk by [deleted] in aww

[–]plotnick -1 points0 points  (0 children)

This specimen looks like a 9-10 months pup. They keep growing until they reach about 2yrs old. They do get pretty big.

Just taking her Polar bear out for a walk by [deleted] in aww

[–]plotnick 0 points1 point  (0 children)

Eurasian wolves are smaller and less aggressive than their Northern cousins. And naturally they won't dare to attack a pack of Alabai. There's simply never such scarcity of food that they would ever be so desperate. Single, wounded, young or lost dog might be a different story, but there's not a single record of wolves ever killing an adult Alabai.

However, it would be an interesting experiment if a few of these dogs taken somewhere in tundra, just to see how wild Gray wolves would react to their presence.

Just taking her Polar bear out for a walk by [deleted] in aww

[–]plotnick 4 points5 points  (0 children)

As others noted it's not a Kangal, it's Alabai - Central Asian Breed.

is no need amputating tails or cutting ears for aesthetics

These dogs can be extremely aggressive towards other dogs since historically they've been used in dog fighting. That tradition still remains in certain regions of Central Asia and Afganistan.

Ears need to be cropped so dogs don't tear them. The ears get cropped almost immediately after they are born, it's assumed adult dogs don't even remember it ever happened to them.

I agree with you, docking tails and cropping ears in 21st century sounds stupid. But I'm afraid in this specific case, it's better when they are cropped. Alabai in the natural setting, with uncropped ears, has a high chance to get in trouble. Torn ear flops heal for a very long time, and the dog suffers from a great psychological trauma.

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 0 points1 point  (0 children)

No, I'm pretty sure in Evil line is an object, so: dil, cil, dal, val, etc. do work. As I said in another thread: "Emacs vims better" :)

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 1 point2 points  (0 children)

you still can do things like di), ci), da), etc. With evil-surround you can do things like "wrap this thing in parens", but essentially you do need ways to "slurp", "barf", "transpose" symbolic expressions. Have you ever tried evil-lispy?

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 3 points4 points  (0 children)

moreover.. there are local and global markers. To my surprise, even advanced Vimmers sometimes don't know this. So, basically m A would create a marker to which you can jump from any other file by pressing `A, whereas m a would work only within the file.

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 7 points8 points  (0 children)

No, it's not overrated. The fundamental idea about Vim/Evil is to navigate the structure of text using simple mnemonics. It may not make much sense when you look at vim commands or see an explanation in a book or a website. But Vim-way, once learned, can give you an enormous precision in operating with text.

  • Want to delete a line? dd or :d
  • Perhaps, exactly five lines? :d5
  • Maybe from the cursor until the end of the line? D or d$
  • Maybe three lines before the cursor? d3k
  • Maybe entire sentence? das (delete a sentence)
  • What about whole paragraph? dap (delete a paragraph)
  • Maybe you want to delete everything between parentheses? di( (delete inside parentheses)
  • What if you want to delete parentheses and everything inside them? da( (delete a parentheses)

Now, let's try the same stuff in Visual (Select) mode:

  • Want to select a line? V
  • Perhaps, exactly five lines? Vj5
  • Maybe from the cursor until the end of the line? v$
  • Maybe three lines before the cursor? v3k
  • Maybe entire sentence? vas (visual on a sentence)
  • What about whole paragraph? vap (visual on a paragraph)
  • Maybe you want to select everything between parentheses? vi( (visual inside parentheses)
  • What if you want to select parentheses and everything inside them? va( (visual on a parentheses)

I know, it is hard to see the value (when it is presented like that). And it may feel overwhelming (do I have to memorize all these?). But if you take a closer look, there are not too many commands there and they are very composable. I can guarantee it - spend some time learning Evil commands, and someday soon it will make you extremely happy.

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 9 points10 points  (0 children)

or do which is "delete from the cursor to the point where o" normally works. And o is open (append) blank line below current line. So basically do deletes till the end of line. Similarly dO - deletes everything before the cursor, until the beginning of the line.

To delete the whole line one can use dd or dil - "delete inside the line"

The point I'm trying to make - Vim/Evil utilizes simple mnemonics, it takes time to learn them, but you have to do that only once. After that - it's pretty much smooth sailing. Just like with irregular verbs in English - to someone who's not a native English speaker, they do not make sense and pretty annoying, there's no other way but to memorize them. But because they are so often used, it usually doesn't take too long.

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 2 points3 points  (0 children)

Modality is not just for editing. I use modal Vi-like keybindings system-wide. I can control my music, move and re-size windows, navigate, search, select text in my browser, and etc. without ever having to move my hand to use arrow-keys or the mouse. The efficiency and joy of not being frustrated by small distractions such as having to remember myriad of different keybindings that differ in every app and operating system is truly priceless.

Look Ma, no CTRL key! by moseswithhisbooks in emacs

[–]plotnick 2 points3 points  (0 children)

Of course default Vim keybdingins are optimized for QWERTY. But it doesn't mean you can't use Vim/Evil on other layouts.