2,211 karma · joined April 27, 2009
For the curious, the salient .bashrc bits are:
function _setAndReloadHistory {
builtin history -a
builtin history -c
builtin history -r
}
# preserve shell history
set -o history
# preserve multiline commands...
shopt -s cmdhist
# preserve multiline command as literally as possible
shopt -s lithist
# reedit failed history substitutions
shopt -s histreedit
# enforce careful mode... we'll see how this goes
shopt -s histverify
# timestamp all history entries
HISTTIMEFORMAT='%Y-%m-%d:%H:%M '
# not the default, we like to be explicit that we are not using defaults
HISTFILE=~/.bash_eternal_history
# preserve all history, forever
HISTSIZE=-1
# preserve all history, forever, on disk
HISTFILESIZE=-1
# record only one instance of a command repeated after itself
HISTCONTROL=ignoredups
# preserve history across/between shell sessions...
# ...when the shell exits...
shopt -s histappend
# ...and after every command...
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; } _setAndReloadHistory"
EDIT: Remembered just after submitting that since I am on MacOS, I ran the command touch ~/.bash_sessions_disable
back on August 22nd, 2020, to prevent Terminal from saving per-session information. I've never cleaned out ~/.bash_sessions, suppose I should, but it hasn't been updated since that day.Otherwise, looks good! Use of "env" and proper quoting are strong signals!
#!/usr/bin/env bash
runUntilDoneOrTimeout () {
local -i timeout=0
OPTIND=1
while getopts "t:" opt; do
case $opt in
t) timeout=$OPTARG;;
esac
done
shift $((OPTIND - 1))
runCommand="$*"
$runCommand &
runPID=$!
echo checking jobs
jobs # just to prove there are some
echo job check complete
while jobs %- >& /dev/null && ((timeout > 0)); do
echo "waiting for $runCommand for $timeout seconds"
sleep 1
((timeout--))
done
if (( timeout == 0 )); then
echo "$runCommand timed out"
kill -9 $runPID
wait $runPID
else
echo "$runCommand completed"
fi
echo checking jobs
jobs # just to prove there are none
echo job check complete
}
declare -i timeopt=10
declare -i sleepopt=100
OPTIND=1
while getopts "t:s:" opt; do
case $opt in
t) timeopt=$OPTARG;;
s) sleepopt=$OPTARG;;
esac
done
shift $((OPTIND - 1))
runUntilDoneOrTimeout -t $timeopt sleep $sleepoptAFAIK, the only Hapsburg to come near her throne was Phillip II of Spain, husband of Queen Mary (16th C).
Ah! I just checked, and the article now contains the following: Correction: This article has been updated to reflect that Queen Victoria was of Hanoverian, not Hapsburg, descent.
This paintbrush is far too wide. I think many of us have, at least from time to time, felt something between an inclination and need to worship, and many of us feel that all their lives, but I would assert (and die upon this hill) that many lose that [inclination..need].
Personally, I felt it most strongly in my late teens up until my mid twenties when my questioning of everything was at its strongest and my, uh, personality? resolve? acceptance? not sure... was insufficient counter. Like The Stranglers said, I wish(ed) I was a believer, they spend less time being sad.
Eventually, my mechanistic reductionist self made peace with both the many unknowns and the utter ridiculousness of life. The universe is a cold, harsh place, and even our little goldilocks corner of it has an overwhelming imbalance to it, a ruthless "unfairness", at least when viewed through the lens of a humane equity.
Believing in some greater thing does nothing to resolve or address that, though some take solace in believing in some teleology or ultimate reward. Or punishment.
Neither does anything for me and neither is necessary to my life.
> Similar to Christ saying that "man cannot live on bread alone", man cannot live on materialism alone - spiritual nourishment is a very real and necessary thing.
Hard disagree. You might say that my deep breaths and long stares in the woods are spiritual, but I will respectfully disagree. I do not worship those woods, or the lakes or camping with friends or moments of great discovery or satisfaction, whether there or at work, and I find nothing "spiritual" in them.
I accept and rejoice in their being internal affectations, basal responses, and I am quite happy with my reptilian brain. I don't need any sense of anything external or greater or other to celebrate moments of beauty or discovery or to condemn moments of cruelty and injustice.
Please do remember that there are other very different views of the world.
Materialism and our reptile brains are all we've got. I'm content with that. (Unless and until I watch the news, but that is another subject altogether.)
1. The program can only do what it is permitted to do: io_uring just reduces the number of system calls required - but since it works on file descriptors, you must have already acquired the fd in the correct mode.
2. Some monitoring systems hook into system calls and report when they are used: io_uring and opcodes mean the program can perform actions without being noticed by these programs...
3. ...which can report on the use of the system calls that set up io_uring access...
4. ...and could report on the resuting I/O by other means.
I won’t go so far as to say this is a nothing burger, but it feels close.
The social graces having been observed, if you were to update this presentation to reflect modern bash, and especially reference variables, what would be your top 3 additions?
(I am a big fan of reference variables. They make it possible to, among other things, do some funky things that would otherwise require liberal use of eval, which I eschew. Figuring out how to ensure that the target of a reference variable was in fact an associative array while running under `set -u` was a trick of which I am proud. Note: what I did works and isn't totally ugly, there may be a better way, YMMV, IANAL, etc.)
Second Q, if you will permit: Given the memory leaks in associative array management that have been corrected over the last several years, what are your thoughts on a) whether or not bash should have ever gone that route, and, potentially more controversially, b) the current state of bash maintenance?
(I'm not going to ask about embedding multiple levels of ${...#...} or ${...#...}, because even if it worked, readability would tend to 0 very, very quickly. I'd rather be repetitive and readable and maintainable. Well. Most of the time.)
Nuke it from orbit, or something like that.
I've been racking my brain trying to remember (rarely accessed memories from ~27 years ago). The basic challenge is that unless authenticity, key exchange, and integrity are managed simultaneously during session establishment, there are attacks possible against whatever was omitted. There was a protocol developed at that time that did all of the above as part of session establishment, but I don't remember it really taking off (IIRC, it was patent-encumbered, and that was an obstacle to adoption).
There is another protocol for authenticated and integrity protected key exchange, one that solved both the problem of authenticity and integrity attacks, but I cannot recall it.
Hoping someone else remembers it.
(I spend a lot of time in ncurses on our appliances. We are looking at a web interface, but it will have to be homegrown and SELinux aware. It's a ways out yet....)
But Bar requiring Foo means that if you want to use Gum in a place that expects Bar, Gum must have both Bar's methods and Foo's methods.
In some cases, you might be able to derive some of those.
2) I recently discovered the implementation of free_on_exit won't work if called directly from main if gcc aligns the stack. In this case, main adds padding between the saved eip and the saved ebp, (example). I think this can be fixed some tweaking, and will update this article when it is fixed.
I do not believe the article was updated, suggesting that the "tweaking" was far more complex than the author expected...
...which doesn't surprise me, because the overall tone is one of a clever but far-less-experienced-than-they-think programmer having what they think is a flash of insight and realizing thereby they can solve simply a problem that has plagued the industry and community for decades.
Part of me understands this sentiment, which I take to be rooted in a feeling that he was of such value and had so much potential remaining that why would he take himself away from us...
...and those last few words were chosen deliberately, to highlight the selfishness and lack of empathy in the actual statement of "too early".
Part of me wants to apologize for suggesting selfishness and a lack of empathy, and part of absolutely does not: He was 90, he watched his wife die from cognitive decline, he may or may not have been declining, he may or may not have felt he had more to offer, but, most importantly, he chose to die when he could still make a choice.
Ultimately, that is the reason I cast any gainsaying as selfishness and/or lack of empathy: You DO NOT know him. I DO NOT know him. We DO NOT get to speak for him.
I loved his work. Despite all the flaws in Thinking, Fast and Slow, it remains an influential work, if for no other reason than it recast how we think about some of its subjects and themes.
Would I have hoped he would do more? Of course! Should he have stuck around because I wanted him to?
No. Period. Full stop. End of story.
The two best parts of euthanasia are grace and choice. He had both: He chose his time, and I expect, like my MIL, he died with grace and dignity.
For almost as long as I had known my MIL, she was in pain and suffered involuntary movements (inoperable benign tumour). When the pain got too bad, she had the plug pulled. She was almost giddy in the hospital, dressed in her favourite outfit, with two of her favourite people (not me, her daughter and grandson), having spent the day before with her love of 70+ years sharing memories and saying goodbye.
She was so happy that the pain would end, so happy to be going out on her terms.
Mourn Kahneman, but do not disrespect him - or anyone else - by second guessing him.
Autonomy and empathy are our greatest assets. We would do well to remember both.
(Then there is my favourite WWII nit: The focus on Enigma, which, while undoubtedly important, pales in comparison to Tunny. The fact that Flowers could build essentially a general purpose computer to crack a cipher based only on its apparent properties is heads-and-shoulders and all other superlatives above Enigma, for which GCHQ had working examples throughout the war. I am not downplaying the importance of the Enigma cryptanalysis work, merely suggesting that Tunny was, in the end, and strategically, far more valuable, especially once telephone communications became harder for OKW.)
In other words, someone had an interesting and possibly good idea, and did the non-trivial to get it published as an RFC (getting even informational RFCs take considerable effort) and now someone (else?) is trying to misrepresent its status.
As said in another comment, "nothing burger". Also, {click,flame}bait.
So if Gödel tells us that either formal systems will be consistent and make statements they cannot prove XOR be inconsistent and therefore unreliable, at least to some degree, then surely informal systems will, at best, be the same, and, at worst, be much worse?
No one can "know", with certainty, the location of any particle. Or, to be slightly more accurate, the more we know of its location, the less we know of its movement. This is essentially Heisenberg/QM 101.
But we see the results of "computation" all around us, all the time: Any time a chemical or physical reaction settles to an observable result, whether observed by one of us, that is, a human, or another physical entity, like a tree, a squirrel, a star, etc. This is essentially a combination of Rovelli's Relational QM and the viewing of QM through an information centric lens.
In other words, we can and do have solid reality at a macro level without ever having detailed knowledge (whatever that might mean) at a micro/nano/femto level.
Having said that, I read your comment as implying that "the human mind" (in quotes because that is not a well defined concept, at least not herein; if we can agree on an operational definition, we may be able to go quite far) is somehow disconnected from physical reality, that is, that you are suggesting a dualist position, in which we have physics and physical chemistry and everything we get from them, e.g., genetics, neurophysiology, etc., all based ultimately on QM, and we have "consciousness" or "the mind" as somehow being outside/above all of that.
I have no problem with that suggestion. I don't buy it, and am mostly a reductionist at heart, so to speak, but I have no problem with it.
What I'd like to see in support of that position would be repeatable, testable statements as to how this "outside/above" "thing" somehow interacts with the physical substrate of our biological lives.
Preferably without reference to the numinous, the ephemeral, or the magical.
Honestly, I really would like to see this. It would represent one of the greatest advances in knowledge in human history.
I've not been able to find sources to indicate the bird's conservation status in Canada at that time. As far as I can tell, every mention of the birds being on the verge of extinction should always be followed by "in the US".