Readit News logoReadit News
gcmeplz commented on Show HN: SuperUtilsPlus – A Modern Alternative to Lodash   github.com/dhaxor/super-u... · Posted by u/dhax_or
jokull · 7 months ago
I recommend https://remedajs.com/ - they're always making the types more accurate too. Like groupby has nonempty lists.
gcmeplz · 7 months ago
The types look great on remeda, but one thing that looks intriguing about SuperUtilsPlus is the focus on being tree-shakeable. Lodash's lack of tree-shake-ability is a drawback to using lodash on the frontend.

edit: the types on remeda look great though! If I were doing a backend-only NodeJS project, I'd be super tempted to test it out.

gcmeplz commented on Mississippi Can't Possibly Have Good Schools   educationdaly.us/p/missis... · Posted by u/pkrecker
happyopossum · 8 months ago
ACT scores trail education outcomes by ~10 years, as students in school in the middle of a shift don’t get the full benefit from it - they’re often not included in policy changes for the sake of continuity (you may not be able to suddenly change the way you teach math in 5th grade).
gcmeplz · 8 months ago
State-based ACT scores are also highly influenced by who takes the ACT. If more students choose to take the ACT, the scores might go down even it's because your education system is doing a better job because more kids are trying for college.

For the same reason, you'll see some surprising state scores for SAT/ACT. If you're in a state that prioritizes the ACT, the main students taking the SAT are the strongest students who are looking at out-of-state schools.

Aside from the time lag, I don't think you can look at voluntary test scores and draw many useful conclusions from it.

gcmeplz commented on Advanced Shell Scripting with Bash (2006) [pdf]   uniforumchicago.org/slide... · Posted by u/transpute
pmarreck · 8 months ago
I've been on a longish search for a bash replacement (or at least "extra substitute") in the realm of "more complex commandline scripting" (functions, utility scripts, etc.). Naturally, every option is a set of different compromises.

I think I've finally settled on Lua- It's small, coherent, surprisingly fast (especially with LuaJIT) and has the "virtually no startup cost" I was looking for (which ruled out, for example, Elixir for a lot of things).

And, I've finally figured out how to bang my nix-darwin flake.nix config in a way that gets it AND a bunch of popular libraries installed together and all seeing each other.

Wondering what others have found to address this. Or if they just stuck with Bash, since it's just not going away anytime soon.

gcmeplz · 8 months ago
I write a lot of JS/TS for my day job, so zx (https://github.com/google/zx) has been a nice tool for bash scripts that start getting a little too complex.
gcmeplz commented on Most engineers have Git aliases; what are yours?   will-keleher.com/posts/wh... · Posted by u/gcmeplz
JTyQZSnP3cQGa8B · 9 months ago
> Most engineers

I don't believe that but I use https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git

gcmeplz · 9 months ago
Should probably say "most engineers I've worked with," but I think that's mostly a testament to the git workflows where I've worked (lots of small commits and short-lived branches).

Plus, once you pair with one person with snazzy aliases, it might make you want to make your own

gcmeplz commented on Most engineers have Git aliases; what are yours?   will-keleher.com/posts/wh... · Posted by u/gcmeplz
LinuxBender · 9 months ago
I have not used this in a while but here is an old function from /etc/profile.d/functions.sh on Alpine that I used to tame some unwieldy .git folders in the past. No idea if any of it has been deprecated. It's like one big monster alias. Nowadays I instead just clone a repo to a ramdisk, purge the .git folder and then rsync it to my hoarded stash of git repos.

    function gitgc()
    {
    git config --global core.compression 6
    git config --global core.loosecompression 6
    git config --global pack.compression 6
    git config --global core.autocrlf input
    git config --global alias.st status
    git config --global alias.ci commit
    git config --global alias.co checkout
    git config --global alias.br branch
    git config --global branch.autosetuprebase always
    git config --global pack.threads "2"
    git config --global pack.windowMemory "100m"
    git config --global pack.packSizeLimit "100m"
    export GIT_HTTP_MAX_REQUEST_BUFFER=100M
    git config --global ssh.postBuffer 1000000000
    git config --global http.postBuffer 1000000000
    # echo '*.zip -delta' > .gitattributes
    # echo '*.jpg -delta' >> .gitattributes
    # echo '*.bin binary -delta' >> .gitattributes
    git fsck --full --unreachable;
    git repack -a -d -F --depth=1 --window=10;
    git reflog expire --all --expire=now --expire-unreachable=now;
    git repack -a -d -F --depth=1 --window=10;
    git gc --prune=now --aggressive;
    git fsck --full --unreachable;
    }

gcmeplz · 9 months ago
> Nowadays I instead just clone a repo to a ramdisk, purge the .git folder and then rsync it to my hoarded stash of git repos.

You're probably already doing this, but if you do a shallow clone (git clone --depth=1 ..) you'll limit the amount that ends up in .git that you need to purge.

Even with shallow clones, I'm still surprised that it ends up with a .git that's a decent percentage of the total. I just tried it on a repo and ended up with 16% of the total size being .git. I would have guessed that it'd be much smaller than that.

gcmeplz commented on fd: A simple, fast and user-friendly alternative to 'find'   github.com/sharkdp/fd... · Posted by u/tosh
bee_rider · 9 months ago
I’m finding that I use locate more and more for this sort of thing. Of course, it produces a lot more output, because it looks at the whole system. But, it is still much faster than find because it runs on some kind of index or something, and it is easy enough to grep out the directory I’m interested in, if needed.
gcmeplz · 9 months ago
locate is nice, but I think that on most distros its index is only updated once/day (unless you adjust the cron job that updates it more often). Most of the times I'm trying to find something, I haven't modified it recently, but it can definitely lead you astray.
gcmeplz commented on Just: Just a Command Runner   just.systems/... · Posted by u/thunderbong
gurgeous · a year ago
We love just and are using it in all projects now. So great. Our typical justfile has around ~20 rules. Here is an example rule (and helper) to illustrate how we use it in ci:

  export PATH := justfile_directory() + "/node_modules/.bin:" + env_var('PATH')

  ci:
    @just banner yarn install
    yarn install
    @just banner tsc
    tsc --noEmit
    @just banner lint
    eslint src
    prettier --check src
    @just banner vitest
    vitest --run
    @just banner done!
  
  banner *ARGS:
    @printf '\e[42;37;1m[%s] %-72s \e[m\n' "$(date +%H:%M:%S)" "{{ARGS}}"
This example is a bit contrived, more typically we would have a rule like "just lint" and you might call it from "just ci".

One of the best features is that just always runs from the project root directory. Little things like that add up after you've spent years wrestling with bash scripts.

gcmeplz · a year ago
I love the look of `just` and have been meaning to try it out, but this feels like one of those examples where Make's dependency management shines—it lets you specify that many of these commands only need to run when particular files change:

    node_modules: package.json yarn.lock
         yarn install --pure-lockfile

    prettier: $(shell find src -type f -iname "\*.ts")
         prettier --check src

    ...

    ci: node_modules prettier eslint vitest

And as time goes on, I always end up wanting to parallelize the commands that can be parallelized (citest, lint, eslint), so I'll turn `make ci` (or `just ci`) into its own little script.

u/gcmeplz

KarmaCake day325October 5, 2018
About
personal site: https://will-keleher.com/
View Original