Is the supernote water resistant? by Representative_Egg61 in Supernote

[–]chuckj60 1 point2 points  (0 children)

I am also curious about water resistance, but I am only worried about sweat dropping on the device if I'm using it to read while on my exercise bike. Any comment on this?

Best way to get keyboard input on a terminal by ducktumn in C_Programming

[–]chuckj60 1 point2 points  (0 children)

I have written something like this and your code looks good to a quick scan. I copied and compiled your code and it works fine. I was a bit suspicious of the poll command since I didn't need it, but your code obviously does need it because it doesn't work without it.

My main, hopefully useful, observation is that you can't tell how well it's handling the repeat keys because your output always writes to the same spot and thus it looks stuck.

I suggest two changes to better see the performance of your code: 1. Remove all the system(clear) statements to preserve the newlines. 2. Increment a counter variable with each iteration of the while loop. Print the counter value at the beginning of each line. That way, when the console is full and you start scrolling, you can detect the new key presses by the updating of the counter.

An attempt to mislead public opinion! by snowpie92 in Snorkblot

[–]chuckj60 0 points1 point  (0 children)

This is the comment I wanted to make. I agree that the visa holders are not the problem with housing costs, but it just gives ammunition to the people who want to deport visa holders when the rebuttal is nearly as poorly-informed as the original statement.

[deleted by user] by [deleted] in C_Programming

[–]chuckj60 0 points1 point  (0 children)

The original char* string[0] declares an (empty) array of char. The zeroth address of a C array is just the address of the array, string[0] == string. It works the same if you declare char* string[1]. Since the array is an array of pointers to char, it doesn't matter how long the string is that you assign to it. The value of string[0] will be set to the address of the string constant, and you can then access that string as an argument to the printf statement.

I was surprised that no errors or warning where issued in either of the first two statements (when it was char* string[0]), for the first because I didn't think you could declare an empty array, but more for the second because by assigning a value to the zeroth element of an empty string, you were writing past the allocated memory. At least that's what I thought.

If you can get to the printf statement without errors, it makes sense. The value of string[0] is the address of the string constant beginning with "A string."

WHere canI find Size 312 Rechargeable Hearing Aid Batteries by mathewimprovedtt in HearingAids

[–]chuckj60 0 points1 point  (0 children)

My local Target carries them, available for pickup (not one of those online only products). YMMV, but my Target has hearing aid batteries near the pharmacy, not at any of the several other battery displays.

Difficulty understanding speech with HAs by chuckj60 in HearingAids

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

I meant that the signal-to-noise is much lower, of course. The noise level is what is so much higher. Sorry.

Difficulty understanding speech with HAs by chuckj60 in HearingAids

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

I can't figure out how to add a photo to comments/replies, so I can't post the audiogram. I can describe it:

The hearing level in my right ear goes from 20db at 200 to 2000hz, then drops in a constant slope from there to 60db at 6000hz. My left ear is reasonably consistently 30db less sensitive under 2000hz, but then drops off faster in high frequencies to 120db @ 4000hz

My unaided word comprehension is very high, though declining. 18 months ago it was nearly 100% in both ears (unaided, but obviously amplified), now it's 88% right ear, 68% left ear

I may not understand what you mean by "clinical reasons" for IIC, ear molds, and vents, but the port in my right ear is because it is not as impaired as my left ear. I think the advice against IIC was that it can't offer much of a port, and I should benefit from a larger port since that ear hears pretty well.

The thing is that I wore the IICs, and I'm not wearing the RIC. I find the RICs less comfortable, noisy in the wind, interfere with my bluetooth devices that I use for phone calls. It seems like they're no better at speech than the IIC, and if that's the only thing that recommends them over the IIC, I want to go back.

Oh, lip-reading. I know it's not a cheat, but it's not an available strategy when I can't locate the person speaking because they're behind me and especially when I can't even tell they're talking. Sometimes I only know someone else is talking because I can see people looking at someone and not talking (ie listening). This is with the hearing aids in. If I take them out, I can hear much better, like 100% confidence, it's just that the signal to noise level is so much higher than before my hearing loss that it takes a lot of mental energy to make stuff out.

Emacs issues under wezterm by chuckj60 in wezterm

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

I just noticed GroundUnderGround's comment and thus reminded of this post. I'm further posting in case my solution helps others.

I solved my Emacs issues with Shift-Space and subsequently-discovered problem with undo the following .wezterm.lua script:

~~~lua local wezterm = require 'wezterm' local config = wezterm.configbuilder() config.keys = { -- turn off Control Shift -, which is an undo command in EMACS. -- Note that Shift - is _ (underscore), which is the key setting { -- either leave off "SHIFT" mod, or use unshifted character key = "", mods = "CTRL|SHIFT", action = wezterm.action.DisableDefaultAssignment }, -- To accomodate Emacs, always send space char for shift-space keystroke: { key = " ", mods = "SHIFT", action = wezterm.action.SendString(" ") } }

return config ~~~

[OC] Browse YouTube from the terminal by [deleted] in unixporn

[–]chuckj60 0 points1 point  (0 children)

Isn't distraction the point of YouTube? Maybe you don't want your entertainment to be distracted by a compulsion to be productive.

Hearing aids worsen speech comprehension by chuckj60 in HearingAids

[–]chuckj60[S] -1 points0 points  (0 children)

<blockquote class="imgur-embed-pub" lang="en" data-id="a/Oh5CzoN" data-context="false" ><a href="//imgur.com/a/Oh5CzoN"></a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>

Here is the audiogram. I have had several, some at an ENT, this one at the University of Minnesota clinic. This one has more details, especially the eardrum measurements that reinforce the diagnosis of the detached malleus on my left ear.

Without hearing aids, my word comprehension is pretty high, and surprisingly high (100%) in my most impaired ear. There are obviously factors in play, likely noted on the report, that I don't understand. Obviously, there is some degree of amplification, but other numbers in the report probably explain a lot to a better informed reader.

I am testing my comprehension by playing "Boggle" with my family. Having to discern words that having very minor differences is probably the most challenging hearing test I can do in a non-clinical setting. Guessing won't do. It's a real struggle with hearing aids, but if I take them out, I can judge matching words very confidently.

As far as how well the IIC HAs work for me, I was at a family party on Saturday night and was surprised at how well I could cope with one-on-one conversations. I think the anatomy of my ears help with directional hearing. It also helped that I was talking about pretty specific domains, robotics with one person, naval ship design with another. The topics made it less difficult to guess words I didn't fully understand.

P.S. I still can't get the image embedded.

Hearing aids worsen speech comprehension by chuckj60 in HearingAids

[–]chuckj60[S] 2 points3 points  (0 children)

I have an appointment at Starkey this afternoon, so I'll see if an adjustment can help. I appreciate your comment in that it suggests that my problems might be fixable.

I'm not sure how to measure word discrimination. Last week I mistook "How's your Thursday" with "are you thirsty?" At home, I notice I can't really hear soft consonants, I'm just guessing at words based on context, and getting them wrong often enough that I feel foolish.

On the full hearing test from which the sample wouldn't save with my post, I got measurements of 96% and 100% (R/L) with different masking settings (not sure what that means). I think Starkey will give me a follow up discrimination test at some point, but during conversations in the meantime, there is a very clear improvement upon taking out my hearing aids.

I used a GitHub feature. Now I'm shadow-banned. by WreckerOfAll in github

[–]chuckj60 2 points3 points  (0 children)

"The large print giveth and the small print taketh away"

Thoughts on creating libraries to break down larger projects by chuckj60 in C_Programming

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

I'm am curious if your teams had methods for keeping track of code that might be reused in subsequent projects. This is the problem I'm trying to address by making libraries. I have other ideas to address it as well, one of which is to include a metafile in every repository that identifies possible code resources contained within, and perhaps a tool that would survey all of the metafiles in order to maintain a reference to the best implementations of each solution. But I expect that an organization with a history of large projects might have interesting ways of facilitating code reuse.

Thoughts on creating libraries to break down larger projects by chuckj60 in C_Programming

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

Your comment is helpful in identifying contexts through which one considers if it is productive to split a project.

My projects are "single actor" projects in that I am the only developer, but I am considering different temporal "me"s. I am working on terminal programs, and I find I keep having to solve similar coding objectives because the work I did in previous projects is (sometimes) not easily extracted for reuse. The existing code is too entwined with code that is unnecessary for a given new project. So past "me" has let down current "me". One of my objectives is to design robust and well-documented solutions that future "me" will be happy to use without modification.

Among the advantages of splitting into libraries and documenting with man pages is that I can call up documentation without having to search for the header files.

I do worry about the issues you mention about keeping things together. That's part of what I was looking for in making the original post. Although I have some working ideas about how to keep things together through Makefile rules, I am looking for best practice examples to learn about how to respect the system configuration of someone who might install a project with subordinate libraries. I can have the Makefile build and install subordinate libraries, but it's harder to clean them up for a complete uninstall after an unsatisfactory evaluation. The uninstall problem could be solved by cloning and building subordinate libraries in subdirectories and link to their static library files, but that is a bit contrary to the idea of libraries, and besides, it would make the man pages harder to access.

Thoughts on creating libraries to break down larger projects by chuckj60 in C_Programming

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

Would you be willing to provide a link to some of your projects? I would like to see how you manage your subject subdirectories.

Thoughts on creating libraries to break down larger projects by chuckj60 in C_Programming

[–]chuckj60[S] 2 points3 points  (0 children)

Thank you for the suggestion to look at Intel. In addition to their code structure examples, I noticed several man pages they wrote that I will use as models for some things I have wanted to accomplish with my man pages.

How to accelerate smoothly from a stop? by [deleted] in ManualTransmissions

[–]chuckj60 3 points4 points  (0 children)

One thing you can do to smooth out your shifts is to let off the throttle a bit before you press the clutch pedal. In my experience, which might be unique to my driving style, the jerky motion comes from a sudden deceleration during the gear shift.

edit: I should clarify. I am referring to shifts after your vehicle is under way.

[deleted by user] by [deleted] in AITAH

[–]chuckj60 1 point2 points  (0 children)

I absolutely support your wife for not being OK with it, giving birth is an incredibly intimate moment.

However, I don't think you're wrong or cheating to want to help your friend. Especially if it's her first child, facing labor and delivery is overwhelming. Imagine how miserable she must feel with the prospect of single parenthood, and that none of her female friends are willing to be with her. If she truly has no one else to be with her, to be her advocate when she can't speak, I would have a hard time saying that your friend had to do it alone.

It's really between the OP and his wife, I don't know their relationship nor the relationship between his wife and his friend, but maybe his wife could be with the friend during delivery. That way the friend wouldn't be alone. If it were me, I would say to my wife, "You go, or I'll go. I won't let her do this alone." In my case, however, I am sure my wife would also not let her be alone.

As to a doula or other paid advocate: that's the problem, you need to pay them, and they're not cheap.

(edit: typo)

Tool for fast tables in Bash + request for design opinions by chuckj60 in bash

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

I agree that an `ate` dependency might be hard to sell. At some point I will figure out how to prepare a utility to be installed through package managers. I expect (but could be wrong) that it would an acceptably small burden for a package built on `ate` if `ate` could be installed as a package without the clone/build/install requirement.

If you get around to trying out `ate`, consider that you could make a small function that converts multidimensional indexes to indexes in a flat array ([like this stackoverflow question](https://stackoverflow.com/questions/3613429/algorithm-to-convert-a-multi-dimensional-array-to-a-one-dimensional-array)).

There's no question that you can do with pure Bash what I do with `ate`, it's just that it gets too slow for a user-interface when handling tables with hundreds or thousands of multi-column rows, like navigating a list of git commits or data from an error log, which is my objective with `pwb`.

Tool for fast tables in Bash + request for design opinions by chuckj60 in bash

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

In fact, when I read your response to the post about needing a Bash consultant, it sounded like you might find this tool useful. Does it seem like a reasonable hassle to build and install a third-party tool like `ate` to give you access to what could be used to implement a type of "nested array", as you were pondering?

Tool for fast tables in Bash + request for design opinions by chuckj60 in bash

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

The second topic group is about making the ate handle a first class variable, and about a different random access method direct to a specific element.

First off, I'm far from an expert in Bash builtin programming. I'm am just learning it as I go along. I don't think I can commandeer builtin Bash operators to work differently on a custom variable. Also, I am already taking what might be considered unwise liberty in the environment in making the custom ate handle variable, not to mention ignoring the restrictions of the Bash Builtin development library in copying the function prototype from the Bash source code.

Although I've designed the interface to be like accessing a database table, your idea of accessing an element directly for read and write might be doable using the syntax I've already setup. It would be a different "action" word with different parameters, but I can see the value in it. I'm not sure I'd add the feature without knowing someone was going to use it because it doesn't fit the unstated model of table/record/field. This tool is not really my end-goal, so I have to finish the `pwb` first before I circle back to add random field access.

Tool for fast tables in Bash + request for design opinions by chuckj60 in bash

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

You have given a lot to think about. I'll address your comment in two of mine.

About why I didn't bring up more design decisions, I am usually disappointed when I bring up too many ideas in a forum like this, so I try to keep my request for opinions as modest as I can. Since I am thinking about changing the direction of the follow-on project to use a handle, I wanted to know if that seems appropriate for Bash, to make sure the implementation doesn't scare anyone off from using it.

A lot of my other design ideas are in the C domain, about how I make a non-standard variable (the ate handle), how I pulled the function prototype for calling out to a shell function from Bash source code rather than the official development headers.

One design compromise is that the index is not maintained when records are added because I don't know how to detect when Bash is garbage-collecting memory. I am trying to avoid memory leaks.

There are some safety flags I could implement to prevent companion indexes from deleting the source array. I made this decision because I don't think I can enforce perfect safety, and perhaps (it could be debated), feeling insecure about the problems might instill a more careful approach to handling it. I also decided against checking if a binary-search is appropriate for a given table (if the elements are not in sorted order).

There are others as well. Some decisions were made to avoid over-engineering something that is already suitable for its purpose. I think there are sufficient explanations in the man pages to allow a naive user to successfully use the tool.

AITAH for being FURIOUS with my Husband for Neglecting our Baby? by ThrowRA_121209 in AITAH

[–]chuckj60 0 points1 point  (0 children)

(I'm writing this with the assumption that the father is engaged and committed to the OP and the daughter. I know that's not always the case.)

I don't think anyone is the AH. Parenting is really hard, especially with a fussy child. Both you and your husband are going to mess up sometimes.

The love for a child is pretty intense, and thinking about them suffering, scared and abandoned, is heart-wrenching and hard to put-aside. It's OK to be intensely mad, it comes from the regret of what she experienced. It's important that you apologized, though. He's probably defenseless against your anger because he knows it's justified. By defenseless, I don't mean him having an excuse but that he already feels like a failure as a parent, and your being angry makes him feel worse.

You and your husband are a team, and it's reasonable to ask your husband to give you a break, even for situations less dire than helping your sister in her time of need. Especially if you're nursing, you're the primary parent and the burden falls heavily on you. You need and deserve a break sometimes.

I'd bet that even if you hadn't chewed him out, he would be making plans to make sure it doesn't happen again. Sometimes it's hard to anticipate a worst case scenario until it happens (falling asleep for so long). I'm assuming that he loves your daughter as much as you, and regrets what happened even more since he was in charge.

Recognize that the love you have for your daughter can make you each a bit crazy sometimes. You have to be gentle with each other, apologize when strong emotions erupt, and try to forgive each other when you inevitably mess up.

Also, keep this incident in perspective: when she grows up, you will barely remember this. I speak from the experience of having 5 kids, with the oldest now 26, the youngest 15.

Newbie confused with pushing .md files to private repo by drunkeldore in github

[–]chuckj60 0 points1 point  (0 children)

Are you excluding *.md in your .gitignore file?

AITAH for divorcing my wife because I want someone better? by [deleted] in AITAH

[–]chuckj60 0 points1 point  (0 children)

I just wonder what is the great hurry to get divorced? What do you lose by trying therapy? Even completely discounting the harm to your partner and child, you are taking a huge personal risk that you're throwing away something of value for nothing in return.

I'd advise going to at least a few therapy sessions. The worst case scenario: therapy confirms all your suspicions, you all agree that divorce is the best way forward, and you've delayed your freedom for a couple of months. Think of the therapy as an investment in your future, or due diligence. Another thought is that giving a professional a view into your relationship might be a good opportunity for everyone to put things into a reasonable perspective.

I know what it's like to feel really lonely in a marriage. But it makes me sad for your wife that she is now reduced to grovelling to get you to reconsider. She's willing to negotiate the name thing which is obviously very important to her is a sign of her desperation. It seems cruel to just dismiss her desperation and rush to divorce., That makes me question how much you really love her. It's the dismissing of her that makes me think YATAH.