I've started seriously starting coding again though so there is light at the end of the tunnel. It sucks to not do what you enjoy doing because you're burnt out from doing it for pay for the man.
3,459 karma · joined October 26, 2010
I've started seriously starting coding again though so there is light at the end of the tunnel. It sucks to not do what you enjoy doing because you're burnt out from doing it for pay for the man.
https://github.com/kbd/setup/blob/master/HOME/.hammerspoon/i...
It almost works to replace the way I use exa tree, with these caveats:
- I want to not have it elide files ("7 unlisted") at each level. I have my et1, et2, etc. aliases to customize how many levels of detail I get with exa's tree replacement, and then I scroll that with my pager.
- I want it to support LS_COLORS so the files look the same as they do in `ls`
- I want the git status display that exa gives (eg. it shows I if the file is ignored).
- is it possible to customize the order in which the stats are shown? It'd be nice if they match ls more closely. Exa feels like `ls` with extra colors and a tree, broot feels different.
Here are the aliases I use:
et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "$@" | less -R; }
alias et1='et -L1'
alias et2='et -L2'
alias et3='et -L3'
exa never handled git ignores correctly so I had to manually provide common ignores with -I. But the above alias provides a scrollable tree view, with files colorized according to LS_COLORS, with file stats like `ls -l`, that I haven't found provided by any other tool. Suggestions for replacements welcome.Wow! I've been a fan of Orion for a while and I didn't know it did that. Lo and behold, "Tools -> Install This Site as an App". Thank you for the pointer!
$ qalc 10W*(8h/day)*1year to kWh
zsh: bad pattern: 10W*(8h/day)*1year
$:1 noglob qalc 10W*(8h/day)*1year to kWh
(10 watts) × (8 hours/day) × (1 year) = 29.22 kW·h
Amazing. I use qalc frequently and you just improved my life, thank you!Question: why didn't you need quotes around the first expression? Both Zsh and Bash error on that command without quotes. Are you using nushell?
That's fascinating, since that's not something someone could do on their own. One of my biggest questions is whether the "DMT world" really connects you with another part of reality, or whether it's just "what the brain does" when exposed to the chemical.
Have there been any controlled experiments on whether we can pass messages via the DMT elves? That would persuade me that the entities could be real.
At the time I looked at them like a fad. "These script kiddies want to write javascript and ignore schemas. Let's see how well that works out for them." As expected, most of what I ever hear is regret.
Today, MongoDB has grown out of the reliability issues it had in the past, and Postgres has json features for the occasional times it's useful to store some loosely structured data along with otherwise relational data. Question is, what applications is a document-first database good for, outside of prototyping?
Edit: and to make sure I understand, FerretDB is a layer reimplementing MongoDB on top of Postgres and its json features?
https://github.com/kbd/setup/blob/master/HOME/.config/git/co...
Perfect example: my "cherry pick" alias:
cp = !git pick-branch | xargs git pick-commits | tac | xargs -t git cherry-pick
Those "pick-" aliases pop up fzf to let me choose a branch, then commits to cherry pick. No more copying hashes anywhere.Similarly, my alias for git add lets me fzf-select a list of files to stage based on what "git status" reports.
https://github.com/kbd/setup/blob/master/HOME/bin/fzr
Basically, prefix any jq command (or rg, or anything you can think of) with fzr and it'll give you an interactive interpreter for your query. People have written a number of dedicated jq interactive repls, but not much is needed beyond fzf.
Cool trick about mapping shift keys with Karabiner-Elements. I do that with my caps lock to create a "hyper" key: tapping it brings up Alfred, using it in a chord is "hyper", and long pressing caps lock maintains its default behavior.
It looks like unblob has the right behavior by default that I have to alias for `dtrx`:
alias dtrx='dtrx --one=inside'
But I'll probably want to create an alias for unblob to change default depth to 1.Not to impugn your character, but I feel the same way about the points you're making.
> So you admit that Zig does have function colors?
Not in any meaningful way, no. Again, the runtime representation of async vs sync functions is unavoidably different, and has nothing to do with the language. The fact that Zig lets you write one function definition that can be called in sync vs async contexts (unless you're specifically choosing to do sync vs async things) is what it means to be colorless!
> Also, according to the actual Zig documentation, which I quote in my post, there is only one version of every function; if a function is used in an async context, even if it is sync otherwise, the compiler makes the function async and continues on its merry way, so there is only one runtime representation of a function.
I dunno if that's accurate? Someone with more knowledge of Zig internals would have to confirm, but I assume if the same codebase uses a function in each context it'll be monomorphized into the specific version needed, same as generics. I don't think that's contradicted by what you quoted.