(I’m not too familiar, someone else can clarify: is this available outside bash?)
What’s interesting to me is the -a option, which lets you “flush” the history for the current session without ending the session. I can see that being useful!
history displays a list of all commands you have run on the terminal since the history list was last cleared. It is invaluable for referring back to a big complex command or set of commands you ran at some point in the past. The -c flag clears that history.
Yes, my comment only applies to the shell history in memory. -c clears history immediately, but you can still reload it from disk if you haven’t overwritten that with -w. If you tend to close your terminal windows frequently and rely on the history feature between sessions, it would benefit you to learn about the intricacies of the on-disk copy of history and how its affected by writes, appends, clears, crashes, etc. I tend to leave my terminal windows open a long time and copy any complex commands out to my PKM if I need to save them for future sessions, so I generally try not to rely on .bash_history, but it has saved my bacon on more than one occasion.
IIRC the train travels at a constant speed so you can make it faster by resizing your terminal so it’s narrower. Thus the train has a shorter distance to travel and the animation length is reduced.
Yes... how is "reducing exclamation marks" a good thing when you do it by adding a ' (not to be confused with , ´,‘or’` ..which are all different characters).
Does this rely on the assumption that everyone uses a US QWERTY keyboard where ! happens to be slightly more inconvenient than typing '?
Don’t use OpenAI’s outdated tools. Also, don’t rely on prompt engineering to force the output to conform. Instead, use a local LLM and something like jsonformer or parserllm which can provably output well-formed/parseable text.
I’ll be informal to boost your intuition. You know how a parser can reject invalid inputs? Parsers can be generated from grammars, so we can think of the grammars themselves as rejecting invalid inputs too. When we use a grammar for generation, every generated output will be a valid input when parsed, because the grammar can’t build any invalid sentences (by definition!)
For example, suppose we want to generate a JSON object. The grammar for JSON objects starts with an opening curly brace “{”. This means that every parser which accepts JSON objects (and rejects everything else) must start by accepting “{”. So, our generator must start by emitting a “{” as well. Since our language-modeling generators work over probability distributions, this can be accomplished by setting the probability of every token which doesn’t start with “{” to zero.
programmer_humor
Active
This magazine is from a federated server and may be incomplete. Browse more on the original instance.