Hacker Newsnew | past | comments | ask | show | jobs | submit | procaryote's commentslogin

This is one of many things that used to be easier before wayland

You can get pretty far with just the xkbd definions though, although you need root to reconfigure it.

A bit ironically, the easiest way I've found to create xkbd definions is to start an X11 server, reconfigure your xmodmap+xcompose, and export the current xkbd settings. Xmodmap is much easier to edit than editing xkbd directly.


> You can get pretty far with just the xkbd definions though, although you need root to reconfigure it.

You can put them in user XDG_CONFIG_HOME – you might be right that you need root once to configure it to look there though. (And that might depend on how distro/package manager ships it.)


Why would you want to avoid using a struct? Add a macro that declares the appropriate struct and get at least a tiny bit of type checking.

With some clever use of _Generic you could even build specialised functions for that type and get pretty good type checking


In C23 this approach is nice, but in older versions of C we end up with awful macros where we need to define the structure before we use it.

    #define Array(T) struct array_##T
    #define DEFINE_ARRAY(T) struct array_##T { size_t len; T *elems; }
    
    DEFINE_ARRAY(int);
    Array(int) foo;
    Array(int) bar;
C23 has relaxed rules for redefining the same struct, so we can avoid having to create the struct up front.

    #define Array(T) struct array_##T { size_t len; T *elems; }

    Array(int) foo;
    Array(int) bar;

As you know this, why don't you fix it?

What is forcing you to doom scroll rather than putting the phone in a different room before going do bed?


What's forcing people to keep eating terrible diets and getting fat? What's forcing <bad habit> that results in <bad outcome>. The answer is usually human weakness or someone seeking to make a profit by encouraging the bad habit, or a combination of the two.

As individuals, there's nothing we can do other than exert willpower, and we should. But as a society we should also be asking questions about the supply side of these bad habits.


As a society we should be asking those questions yes

As an individual, pretending you have free will and can opt to not do things you know are bad for you is probably better than doing those things while complaining that society isn't stopping you from hurting yourself


Can you give an example of something useful you get from commits following the CC convention?

I gave an example right there in my previous comment (log filtering). To expand: our eyes and brains are good at pattern matching. Looking at git log --pretty=oneline with a structure lets you discard any commits irrelevant to what you're looking for without much cognitive effort (e.g. if I'm interested in a code change, I can discard any commit that starts with "docs"). You don't have to read entire lines, only scan the first few characters, or have grep do it for you.

Another example is basic metrics stored right there in git. Did changing your testing strategy result in less follow up fixes after feature deployment? You can get that signal with a shell | pipe one-liner.

Honestly I'm not die-hard CC convention, but I think it's better than nothing, which is what the person I was responding to was suggesting. If you're using an issue tracker, having a convention to prefix or trailer the commit with the issue ID is the highest value IMHO. The point is having some convention to get teams on the same page and assist with git meta work.


Arguably "fix memory leak" is why you free the array; freeing the array is just how you fixed it and less interesting as that is also in the diff

Perhaps it's useful to ask why?

What does the jira ticket give you that a longer PR message can't do better?


Saves you a click maybe, at least it's easy to always know what ticket you're working on right in the terminal

One of many problems introduced by monorepos

Giving accomodations during a test kind of invalidates the test as a measurement of relative ability, or aptitude for further studies, so perhaps the solution is to stop doing that


Best of luck to him, I hope he finds what he's looking for!

What's not completely clear from the post is what he dislikes with AI / technology. Does someone know?


You need to misplace a </> in a way that still produces a valid xml document. Just forgetting one or adding an extra one will throw an error.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: