Fork me on GitHub
#off-topic
<
2022-12-19
>
Ivar Refsdal08:12:40

Welp. This was new: My keyboard and mouse partially stopped working. Screen brightness, screen/monitor and airplane mode keys still worked, otherwise no keys worked. Mouse would only work with tap, not "clicks". I'm using KDE plasma. Anyone experienced this, and figured out how to solve it? (A reboot solved the problem for me.)

Martynas Maciulevičius08:12:07

What kind of mouse is it? Upon log-in my USB keyboard doesn't work every time. Then I have to switch the workspace with mouse and then it works. Weirdest bug ever.

👍 1
Ivar Refsdal09:12:50

It's the trackpad built into the ThinkPad X1

Ivar Refsdal09:12:06

I'll try switching workspaces with the mouse if it happens again 🙂 Thanks

Martynas Maciulevičius09:12:36

(I use Manjaro+i3wm and this keyboard switch-off happens only with this keyboard)

Ivar Refsdal09:12:50

(no (truly) external keyboard or mouse here..) Manjaro here too (and KDE plasma)

Martynas Maciulevičius09:12:51

Actually it's exceptionally weird what it does. The keyboard works and Super key is actually working, but all other keys don't work 😄 But then I switch to a different i3wm tag (workspace) and it starts to work. Weeird. And I have to use mouse for this. So Super+Mouse click or Super+mouse wheel to switch workspace. And I use my i3bar in auto-hide mode, so the Super key is needed to show it

🙃 1
Ivar Refsdal09:12:31

Hmmm. Computers!

catjam 1
lassemaatta09:12:33

I recall having some weird input issues when I enabled the power-saving features for my USB peripherals and hubs with powertop.

Martynas Maciulevičius12:12:37

Does anyone know why would Thunderbird's calendar fail when importing an update to an event? It didn't fail on my last laptop but upon changing I can't make it work anymore.

mauricio.szabo20:12:45

I love KDE Plasma - the look and feel of the desktop environment, the features, the plasmoids and plug-ins - but I also hate how annoyingly buggy it is, specially when I disconnect and reconnect peripherals and when it comes back from sleep mode... I am almost replacing it, but unfortunately other envs do not come close...

pavlosmelissinos20:12:08

On a t460 and fedora gnome I had to use the nub after the laptop woke up in order to use the trackpad buttons. Not sure if that would have any effect in your case. (The issue went away when I switched to sway)

👍 1
Ben Sless18:12:25

It's pretty surprising to see how dominant select-keys and rename-keys are in terms of allocation pressure even when they don't dominate CPU usage I should be used to it but I'm still caught by surprise

Noah Bogart18:12:20

that's interesting. what causes it?

Ben Sless18:12:54

You could also provide an arity without a map which does a transducer like fusion of ops

Ben Sless18:12:09

But composing a bunch of TABA functions is hard 😄

Ben Sless18:12:18

There And Back Again

👍 1
Ben Sless18:12:58

Took me a minute to figure out the shape of the problem and an "accumulation" path

Ben Sless18:12:12

Which is the return path and not the call path like we're usually used to

Ben Sless18:12:25

I should add it to clj-fast

👍 1
Ben Sless20:12:33

not going into clj-fast, will release a new small lib tomorrow

Noah Bogart20:12:46

Not worth it or not suitable?

Ben Sless20:12:52

Very suitable, but this is going to be a tiny library focused only on select-keys and maybe rename-keys. The idea is to provide something smaller with limited scope for people who don't want to pull in all of clj-fast

Ben Sless20:12:27

I've really done this so many times it didn't take long to write, in the long run it would probably be better to provide a dedicated module

👍 1
ghadi21:12:07

probably higher priority for select-keys than rename-keys

Ben Sless21:12:00

There's already an ask and a jira for select-keys, and I assume the core team's approach will be more conservative than mine. If you like my implementation you're hereby granted permission to take it as is or adapt it to your taste for core 🙂

dpsutton20:12:49

Does anyone know of any tools for working with patch files? I need to cherry pick all commits that touch our backend and I think the simplest way to approach this might be if i have the whole patch and have a way to interact with that, removing commits that don’t do what i want. Lets me kind of look at the diff before applying it. I’m hoping something like this exists

phronmophobic20:12:16

It kinda depends on what your goal is. would you be accepting or rejecting whole commits, or would you also be applying commits with edits?

dpsutton20:12:32

accepting commits that touch clojure files

phronmophobic20:12:46

without any edits outside of the commits?

phronmophobic20:12:56

how many commits?

phronmophobic20:12:22

I assume there would be conflicts if you just accepted all commits or is there some other factor where you know that they're all compatible?

dpsutton20:12:10

want to exclude any frontend js changes

dpsutton20:12:14

just want all backend changes

phronmophobic20:12:09

Are the files for backend and frontend mutually exclusive? I can't tell if you're trying to just find the commits that are backend changes or you have a list of commits that you want to apply, but you just want a way to review them.

dpsutton20:12:48

hope so. part of the reason i want the output to be another patch file is to inspect it. But can proceed on the assumption that this is the case

phronmophobic20:12:55

The way I would do it is just a cut branch with all the commits applied and then you can do something like:

git diff main...new-main-with-cherry-picks --stat

dpsutton20:12:02

i know that i do not want all of the commits. lots of FE changes i cannot take

dpsutton20:12:20

so that just brings me back to how to filter out commits that hit the FE or filter to commits that hit the BE

phronmophobic20:12:05

If the files between backend and frontend are mutually exclusive, then

git diff main...new-main-with-cherry-picks --stat
will tell you right away if it includes any changes to front-end files

dpsutton20:12:00

I’m not following. I don’t have a list of commits from the branch i want to cherry pick because FE and BE commits are intermingled

dpsutton20:12:16

(hopefully no commit touches both, and will proceed as if that is the case for now)

phronmophobic21:12:30

Yea, there's a bunch of different ways to go about it depending on what you're filtering by and your code base. You could use a programmatic approach using something like jgit. It's maybe similar amount of time to do something more manual like:

git log -n 1 -- path/to/backend
find commit abcdef
git log -n 1 abcdef^ -- path/to/backend
repeat until you find all the commits.

dpsutton21:12:45

I’m looking at jgit. And it can parse a patch file but it doesn’t have a notion of separate commits.

patch=> (with-open [is (io/input-stream "patch.patch")]
          (let [p (Patch.)]
            (.parse p is)
            (count (.getFiles p))))
862
it just knows the patch file touches 862 files. But doesn’t keep the commit structure so I don’t see how i could use it

phronmophobic21:12:50

Don't you have a patch for each commit? I believe git format-patch will do that for you. You can also just walk the commit history with jgit and compare shas.

dpsutton21:12:19

i am on a draft PR and I’m downloading the patch file which can contain multiple commits

phronmophobic21:12:58

If the draft PR is from a branch, then you should be able to do:

git format-patch main..draft-branch
and it will spit out separate patch files

👀 1
dpsutton21:12:54

aha. and then i can parse each of those in turn asking for their files

👍 1
dpsutton22:12:02

@U7RJTCH6J splitting the single patch into multiple with git format-match main..branch made this quite simple. Thank you very much

🎉 1
macrobartfast21:12:53

Front paging HN: https://yogthos.net/posts/2022-12-18-StructuringClojureApplications.html (perfect timing, this post, for me).

🎉 6
🔥 2