3 ms·
4 additional tools I use regularly: - task, a Makefile alternative - hyperfine, a benchmark tool - vegeta, a load testing tool - sd, a better, more intuitiv
by thiht 2y ago
4 additional tools I use regularly:
- task, a Makefile alternative
- hyperfine, a benchmark tool
- vegeta, a load testing tool
- sd, a better, more intuitive sed
There’s also the JSON trinity:
- jq, the well know JSON processor
- jc, convert the output of many CLI tools to JSON
- gron, make JSON greppable
- kstrauser 2y agoThose are all very nice! I've come to be a huge fan of just as a Makefile replacement for the common case where I'm not actually computing vast build dependencies.
- deleted 2y ago[deleted]
- theshrike79 2y agoTask is _amazing_ I tried magefiles[0] for a while, but Task just works so much better and isn't Go-specific as heavily. [0] https://github.com/magefile/mage https://github.com/magefile/mage
- thiht 2y agoOne day I decided to design a Makefile alternative, but I wanted to use YAML to benefit from the standard syntax and JSON schemas. I quickly realized I was just reimplementing Taskfile with different key names. I love Task because it completely fits my mental model, I can use all the Makefile features I like without relying on arcane syntax.
- sweeter 2y agoJustfile is my favorite. Anything that requires complexity I just use Zig build. I hate make with a passion. I could see why people stick with it after learning it for decades, but for the rest of us it is a nightmare.
- lelanthran 2y agoI looked, just now, at all the Make alternatives mentioned: Task, Mage and Just. Those first two are nowhere near as easy to read as Makefiles. The last one, Just, looks good, though. At least Cmake files are easy to read, but many of these alternatives are just poor UI, compared to Makefiles. I mean, using YAML of all things and thinking it's some sort of improvement over Make syntax? 1. Mage is just insane. In what world is this: func Build() error { if err := sh.Run("go", "mod", "download"); err != nil { return err } return sh.Run("go", "install", "./...") } More readable than this: build: go mod download go install ./... 2. Task - not just significant whitespace, but significant whitespace everywhere, due to a poor format (YAML). Look at the example given: version: '3' tasks: build: deps: [assets] cmds: - go build -v -i main.go assets: cmds: - esbuild --bundle --minify css/index.css > public/bundle.css Compare with Makefile that does exactly the same thing: build: assets go build -v -i main.go assets: esbuild --bundle --minify css/index.css > public/bundle.css These alternatives to "Make an easier Make" appear to not know about Make in the first place.
- thiht 2y ago> due to a poor format (YAML). That's just your opinion. I'll take YAML whitespaces over Makefile whitespaces any day. > Compare with Makefile that does exactly the same thing Good example in favor of Task, I prefer the explicitness :) Especially when the file starts to get big. You forgot the .PHONY by the way, I hope for you there's no build/ or assets/ folder where your Makefile is. For a more useful comparison, with actual source dependencies and build target: Makefile: GO_FILES = $(shell find . -type f -name '*.go') ./myapp: $(GO_FILES) go build -trimpath -o $@ .PHONY: build build: ./myapp Taskfile: tasks: build: cmds: - go build -trimpath -o ./myapp sources: - '**/*.go' generates: - ./myapp Makefiles are incredibly terse, but that's not an advantage. I read my code more than I write it, so I favor explicitness .
- lelanthran 2y ago
- sandreas 2y agoCool. Some new ones there. I usually use a script with dra to download my release assets to `$HOME/bin` I also use `oha` (Load Testing), `btop` (better top), `rmlint` (find duplicates) and `cheat` (similar to tldr - short manpages). There is a blog post / video that shows how to integrate fzf with git, bat etc... it's one of the best videos I've ever seen on terminal productivity: https://www.youtube.com/watch?v=mmqDYw9C30I https://www.youtube.com/watch?v=mmqDYw9C30I This guy is bonkers - take a look at his other videos, too
- rwmj 2y agohyperfine is absolutely brilliant. My go-to replacement for time.