News for hackers. Stuff that matters.
Re:I Prefer Semi-Automation by tikhonj on Saturday January 07, 2023 @11:58AM (#34289944)
> I have another that cd into a project and launch the dev environment.

I have this set up with direnv[1] and it's incredibly useful, especially with Emacs integration. Not only does it reduce the cognitive burden of keeping track of whether I've opened a venv/launched a nix shell/etc, but it also prevents time-wasting mistakes like launching the wrong version of an interpreter or compiler.

[1]: https://direnv.net/

Re:I Prefer Semi-Automation by actinium226 on Saturday January 07, 2023 @12:14PM (#34290160)
I guess my solution to this problem is not very popular - I try to keep my dev environment simple enough that I don't need venv or anything like that. I find that venv or docker adds cognitive load that then needs more tools to unload, like direnv.

So if my devenv gets too complicated I try to simplify it. Seems like a logical solution to me but often I run into people who simply don't believe me that it makes things simpler. :shrug:

Re:I Prefer Semi-Automation by nicbou on Saturday January 07, 2023 @02:36PM (#34291753)
At some point your code has dependencies that call for this.
Re:I Prefer Semi-Automation by satvikpendem on Saturday January 07, 2023 @11:08PM (#34295923)
> I guess my solution to this problem is not very popular - I try to keep my dev environment simple enough that I don't need venv or anything like that. I find that venv or docker adds cognitive load that then needs more tools to unload, like direnv.

Good for you but this doesn't work in most scenarios, especially if you work in a company with a build process.

Re:I Prefer Semi-Automation by codemonkey-zeta on Saturday January 07, 2023 @02:03PM (#34291391)
I'm really interested in setting this up also. Can you briefly explain how you set this up with direnv? Looks like that's just for loading environment files, not launching processes?
Re:I Prefer Semi-Automation by ywei3410 on Saturday January 07, 2023 @06:33PM (#34294225)
Emacs launches processes on the `PATH` so using `direnv`, you can change the `PATH` to the version of `rust-analyzer`/`gopls`/`python`/`psql`/`protoc` that you're using as well as setting the correct load paths for each language.