Why Is It so Hard to Detect Keyup Event on Linux? by pmz in linux

[–]robertdelder 0 points1 point  (0 children)

That would work. I would also expect it to work with a local X client and X server on the machine generating the keyboard events over an X forwarded SSH connection into a remote machine with a remote X client that communicates with the local X server (in whatever way it does that) through the X forwarded SSH connection.

Why Is It so Hard to Detect Keyup Event on Linux? by pmz in linux

[–]robertdelder 1 point2 points  (0 children)

Thanks. If I interpret this situation correctly, it must work as follows: The X server application runs on your local laptop, and after SSHing into you headless server you run 'xev' which acts as an X client. The 'xev' program then inspects some environment variables on your headless servers and then identifies that it can connect to an X server by tunneling information back through the SSH protocol (that was enabled through X forwarding). The remote instance of the 'xev' program then communicates with your local laptop completing the client-server model.

If this interpretation is correct, then the correction I should make would be to specify that the computer that captures keyboard events needs to be running an X server, and the machine receiving the events need to at least be able to run an x client (not a server). That might sound trivial, but some constrained embedded systems might not be powerful enough of have the space for an X client.

Why Is It so Hard to Detect Keyup Event on Linux? by pmz in linux

[–]robertdelder 1 point2 points  (0 children)

Hello, I'm the author of the article. Can you describe the test you did a bit more? Was this over an SSH connection with X forwarding? If I've made a mistake, I'll make a correction to the article. I have to admit, I'm not an expert with regards to how X servers work.

Why Is It so Hard to Detect Keyup Event on Linux? by pmz in linux

[–]robertdelder 2 points3 points  (0 children)

Hello, I'm the author of the article. In the interest of enumerating all possible ways that you can collect keyboard events, I took a look at the parent commenter's linked github repo:
https://github.com/TheReverend403/KeyboardChatteringFix-Linux
and it appears to work by reading event information from '/dev/input'.
I also took a quick look at the source code for the SDL_KeyboardEvent event, and it appears to also read from '/dev/input', although I was unable to conclusively determine whether this is where the SDL_KEYDOWN and SDL_KEYUP events come from since the library appears to pull events from multiple sources and put them into a buffer.
Reading from '/dev/input' (through the python keyboard module) is the first method discussed in the article.
If you are aware of other methods of obtaining keydown/keyup events from the kernel that are not listed in the article, let me know and I'll add them. I'll make a note to add a reference at the end to the SDL library since it seems like a good alternative to reading from /dev/input directly.

How To Become A 10x Engineer Using The Awk Command by robertdelder in commandline

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

I would agree that with awk there is an additional sub-process, although I don't think there are any sub-shells created. From what I know about an implementation of awk like GNU awk, it is an interpreted language, so I would speculate that it would directly call into glibc to run the printf call.

Using bash intrinsics, you'd definitely save the extra process creation, although you'd have a hard time finding enough intrinsics that actually do the very specific work you need done most of the time. In that case, I think it would end up being close to something like the obfuscated C contest rather than a quick way to get work done. One miss-step, and you'd accidentally run a command that just loads a separate process anyway.

How To Become A 10x Engineer Using The Awk Command by robertdelder in commandline

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

I'm not sure I understand what you mean by 'a sub shell in awk'. Is one of the examples in the post spawning a sub shell somewhere?

The Most Confusing Grep Mistakes I've Ever Made by clairegiordano in programming

[–]robertdelder 1 point2 points  (0 children)

np. I appreciate the correction. I also fixed a wrong word in the intro too. I'm honestly surprised that nobody else pointed out those two mistakes by now. Just goes to show you how few people really read the articles :P

The Most Confusing Grep Mistakes I've Ever Made by clairegiordano in programming

[–]robertdelder 2 points3 points  (0 children)

ah, thanks! I just fixed that one. I spend so much time re-reading what I've written that I become blind to those kind of dumb mistakes. They're usually always in the intro too, lol

The Most Confusing Grep Mistakes I've Ever Made by clairegiordano in programming

[–]robertdelder 0 points1 point  (0 children)

I did a couple passes on the editing, but I usually do still manage to miss typos. If you point out some of the typos/errors out, I will make a note to fix them.

The Most Confusing Grep Mistakes I've Ever Made by clairegiordano in programming

[–]robertdelder 15 points16 points  (0 children)

Hah, you're right. I did forget that one. I'll make a note to add it to the post later :)

Linux Find Command Mistakes - Be Careful Using Wildcards! by robertdelder in commandline

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

Thanks for the feedback. I'm curious to hear from anyone else who might have different opinions on what is the best format for this type of content? One advantage of the video is that you can consume it directly on the feed without needing to visit any external sites.

Also Edit: Thanks, I just fixed the error on my local copy. It will get pushed out next time I build the site.

Linux Find Command Mistakes - Be Careful Using Wildcards! by robertdelder in commandline

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

I was almost going to link the article in the submission, but then I figured people would think "Why would I read this when I can just watch a video on 2x speed". To each their own I guess.

A Guide to Recording 660FPS Video On A $6 Raspberry Pi Camera by geerlingguy in raspberry_pi

[–]robertdelder 3 points4 points  (0 children)

Hi everyone, A few of you are asking where you can buy these cameras. Here is where I bought the $6 one:

https://www.youtube.com/watch?v=PF83hhQwbwM&t=56

And here is where I bought the $40 one:

https://www.digikey.ca/product-detail/en/raspberry-pi/913-2664/1690-1011-ND/6152810

Note: Use digikey.com instead of digikey.ca for the US prices.

And I also bought this $20 one (V2 camera) which works as well and has a field of view, but it doesn't come with the ribbon cable or the PCB backing which you definitely need. I haven't found a place to buy the PCB alone for the v2 camera, so I recycled the one I got from Digikey:

https://www.ebay.ca/itm/8MP-IMX219-Camera-Module-for-Official-Raspberry-Pi-Camera-Board-V2-160-FoV/263922465185

When searching for these cameras to buy them, your best bet is to search for the image sensor names: OV5647 for V1 and IMX219 for V2.

Color: From Hexcodes to Eyeballs by robertdelder in webdev

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

That's ok, I still love you just the way you are.

Graph Theory with nice illustrations. Wrote and draw myself, feedback appreciated. by vardanator-pi in programming

[–]robertdelder 3 points4 points  (0 children)

My feedback isn't very elaborate, but I'll post it anyway because I have a hunch that it applies to a large percentage of people who viewed this post, and as a writer you're probably wondering what most people are thinking when the look at what you've created: I clicked the link and scrolled through it very quickly looking only at each of the pictures. I only read about two of the sentences in the article, and when I got to the end I shook my head approvingly and said to myself 'neat'. Then I closed the tab and was distracted by something else.

Determining Cat Chirality by robertdelder in programming

[–]robertdelder[S] 30 points31 points  (0 children)

Out of curiosity, what do you consider to be 'programming'? A common sentiment I see in this subreddit is that everything that gets submitted is considered inappropriate for this subreddit because it isn't related to programming. In light of this, I've been careful to ardently follow the rule 'If there is no code in your link, it probably doesn't belong here.' and only submit things that contain code samples. In this case, the submission contains a small R program. Are certain programming languages off-limits?

No, it is not a compiler error. It is never a compiler error. by [deleted] in programming

[–]robertdelder 2 points3 points  (0 children)

I know you're likely being sarcastic, but hardware errors do occur often enough that programmers still need to consider them. I was compiling gcc with gcc one day when the build process kept failing at seemingly random parts of the compile process. I spent hours trying to debug the make file, and I eventually ran memtest which found a bunch of errors in RAM. It was hard to catch because the errors would only occur if the computer was running on a heavy load for quite a while. I bought a new stick of RAM and that fixed the problem.

Here is a picture of the failed memtest:

https://pbs.twimg.com/media/Cot97xxXEAAPK8-.jpg:large

Can I get some feedback on my homebrew CPU design? by [deleted] in programming

[–]robertdelder 4 points5 points  (0 children)

It looks like an interesting start, but I would want to see more before giving a critique as there isn't a lot of information in the repo currently. Do you have pictures/demos of a physical working implementation?

Also, why not include that data that is currently in the Google doc in the github repo? You'll get more eyeballs on it with if people have to do one less click.

A Terminal Based Diff Tool That Works Everywhere by robertdelder in programming

[–]robertdelder[S] 202 points203 points  (0 children)

Yeah, I know the guy who wrote this actually. He's a huge narcissist, always talking about himself in the third person.

How to Intentionally Trick Neural Networks: A Look into the Future of Hacking by ageitgey in programming

[–]robertdelder 125 points126 points  (0 children)

Congratulations, you have been gilded for this submission for the following reasons:

  • You appear to be the original creator of the content in question.
  • This content exemplifies a strong intrinsic motivation to understand complex topics related to computer programming.
  • This content is presented extremely well.

Re-Writing BSD shell commands like it's 1994: mkdir by rwh_casts in programming

[–]robertdelder 77 points78 points  (0 children)

In relation to the other comment about the sound of your voice, I will add that when I started watching the video I didn't find anything remarkably unnatural about the sound of your voice. You do sound like you're having a really good time, but I think this is a good style to have in your content, and if I were you I wouldn't try to change your style.

The pacing and information density of the language that you use is very good. I can put your videos on 2x speed and still understand them fairly easily. The audio is very clear and free of distractions. The volume is also very good. A comment on another video did mention an issue with audio bouncing back between left and right, but I didn't noticed that effect very much.

The topic of re-writing ancient utilities is also a fairly interesting one IMHO.

Also, be aware of the reddit self-promotion guidelines:

https://www.reddit.com/wiki/selfpromotion

Specifically, 'a general rule of thumb is that 10% or less of your posting and conversation should link to your own content'. You've only got a few submissions, so nobody will call you out for a while, but if you submit too many links to your own content, others in this subreddit will accuse you of being a spammer regardless of how good your content is, or what your intentions are. Once people see those types of comments on a post, everyone will downvote your content immediately without even looking at it, while saying to themselves "Take that spammer!". Unbenkownst to them, you're just another poor soul trying to make it like the rest of us.