If you are Python dev, you could specify Python dependencies for script using pep 723
https://iscinumpy.dev/post/pep723/
(nix might be an overkill).
For notebooks, workflows, personal playbooks, notes Org Babel could be used (emacs)
Here's example code blocks in Haskell (but many other languages can be used such as shell, jupyter, plantuml) https://youtu.be/1qOFYluebBg?si=muGfsaC1kI7Cgpyw
One of my favorite features are subtree specific settings that enable remote shell commands by configuring :dir to /ssh:host:
I'm using both Make and Just in a single project. A cursory look might give the impression that Just is just another replacement for Make, offering no additional benefits. But I started the project with just Make (since it's already in the system) and then moved some tasks to Just. Meanwhile, I still find the Makefile useful. Both of them 'feel' as if they're designed to do jobs of different nature. Make is designed to efficiently express file dependency hierarchies and take action to keep everything up to date. Just is designed to do a bunch of dependent tasks (nothing about file dependencies) and has features more suited to that. This is a difference that cannot be easily explained, unless you've tried and experienced it. Sure, you can argue that Make does everything that Just does. But it feels like you need more boilerplate in Make for such tasks (like phony).
Here are some of the differences I can recollect. Remember, you won't appreciate it until you try it.
- All tasks in just are phony. No file timestamp checks
- Just recipes can be in any scripting language within the same file. For example, you can write one recipe in bash, another in python and a third in perl, etc.
- Each line in a recipe in Make is executed in a different shell. You can't share variables between lines without using shell tricks. The same is the default for just as well. However, Just also allows you to write an entire recipe as a single script using shebang.
- Shell execution during variable assignment is done using backticks in just (just like bash). Make uses special function 'shell' for this.
- Recipe targets in Just can have parameters like bash functions do.
- Help strings for targets is easy in Just. You just place the string above the recipe. It's shown when you list the targets. Something similar can be done with Make, but using an additional hacky script.
- Just has a CLI to view and select targets. An emacs package also exists for the same.
- Some recipes can be private and wont show up in the listing.
- Just gives you the option to execute a recipe in the same directory as the Justfile, or in the current directory. It's a bit more complicated to do that in Makefile without the shell tricks.
As near as I can tell, the main benefit is "new and shiny", combined with "tabs???? yuck" and "I used Make in college and never really learned it, therefore it's bad"
d0mine|1 year ago
https://docs.fabfile.org/en/latest/getting-started.html#adde...
If you are Python dev, you could specify Python dependencies for script using pep 723 https://iscinumpy.dev/post/pep723/ (nix might be an overkill).
For notebooks, workflows, personal playbooks, notes Org Babel could be used (emacs) Here's example code blocks in Haskell (but many other languages can be used such as shell, jupyter, plantuml) https://youtu.be/1qOFYluebBg?si=muGfsaC1kI7Cgpyw
One of my favorite features are subtree specific settings that enable remote shell commands by configuring :dir to /ssh:host:
tiraz|1 year ago
ivanjermakov|1 year ago
freeone3000|1 year ago
- two ways of producing the same file
- a command with no side effects
- not having to draw up a state machine
just can enumerate its own commands, which is minor but helpful
just can execute in multiple directories, and can descend directories
just treats spaces and tabs identically for indention, rather than space-indented for shell scripts and tab-indented for make commands
goku12|1 year ago
Here are some of the differences I can recollect. Remember, you won't appreciate it until you try it.
- All tasks in just are phony. No file timestamp checks
- Just recipes can be in any scripting language within the same file. For example, you can write one recipe in bash, another in python and a third in perl, etc.
- Each line in a recipe in Make is executed in a different shell. You can't share variables between lines without using shell tricks. The same is the default for just as well. However, Just also allows you to write an entire recipe as a single script using shebang.
- Shell execution during variable assignment is done using backticks in just (just like bash). Make uses special function 'shell' for this.
- Recipe targets in Just can have parameters like bash functions do.
- Help strings for targets is easy in Just. You just place the string above the recipe. It's shown when you list the targets. Something similar can be done with Make, but using an additional hacky script.
- Just has a CLI to view and select targets. An emacs package also exists for the same.
- Some recipes can be private and wont show up in the listing.
- Just gives you the option to execute a recipe in the same directory as the Justfile, or in the current directory. It's a bit more complicated to do that in Makefile without the shell tricks.
chaychoong|1 year ago
* a way to list all available commands
* generate completions
* run shebang commands
.. and many more quality-of-life things.
It is probably possible to achieve these using `make`, but not without some hacking.
nrclark|1 year ago
nunez|1 year ago
You can do all of this with make and make includes.