| ▲ | berkes 5 days ago |
| Many of the abstractions and nextjs tools do things that my OS does better, cleaner and more predictable too. I suppose the overly complicated ENV/.env loading hierarchy is (partly) needed because Windows doesn't (didn't?) have ENV vars. Same for inotify, port detection, thread management: *nix does it well, consistent ish. But when you want an interface or feature that works on both *nix and windows, in the same way, you'll end up with next.js alike piles of reinvented wheels and abstractions (that in the end are always leaking anyway) |
|
| ▲ | rcxdude 5 days ago | parent | next [-] |
| >Windows doesn't (didn't?) have ENV vars Nope, windows has had perfectly standard environment variables since the DOS days |
| |
| ▲ | colejohnson66 5 days ago | parent [-] | | What's "missing" is the ability to launch things the "Bash" way: `KEY=value ./myApp`. Where the variable is scoped to the single execution. Windows' command prompt requires two separate invocations: set KEY=value
./myApp
PowerShell also: $env:KEY='value'
./myApp
Or more "verbosely/explicitly": [System.Environment]::SetEnvironmentVariable('KEY', 'value')
./myApp
Regardless, all those methods aren't "scoped". | | |
| ▲ | amonith 5 days ago | parent [-] | | eh `cmd /C "set KEY=value && ./myApp"` isn't that bad if you really need complete isolation. | | |
| ▲ | RaptorJ 5 days ago | parent [-] | | or directly in powershell, `Start-Process myproc.exe -Environment @{ FOO = 'bar' }` | | |
| ▲ | Sohcahtoa82 5 days ago | parent [-] | | What an absolutely awful syntax. How Powershell ever got popular is beyond me. | | |
| ▲ | amonith 5 days ago | parent | next [-] | | Because it's objects, not text. It "scales" a lot better in your brain because in general you need to know a lot less than in bash. No more awkward sed and awk scripts, manipulating objects is a breeze. Awkward syntax at places where you have to create an object from scratch is a fair price. | |
| ▲ | encom 5 days ago | parent | prev [-] | | Right? This is your brain on Windows. | | |
| ▲ | ohdeargodno 5 days ago | parent [-] | | yeah | it's | so | much | better | with | bash | tr | cut -d' ' -t5 | jq .entry[].text | sed -i s/who/evenknows/g Anyone who has ever maintained a semi complex set of bash invocations and pipes knows it's a fragile incantation that breaks anytime you look at it funny, or something in your chain produces unexpected output. Powershell, while absolutely horrible to read and only slightly less horrible to write (hey look, proper auto completion instead of trying to cut on the 4th, wait no sorry 5th, ah fuck it's the 6th there's an invisible space) at least produces consistent and reproductible results. No, your python script doesn't count, it makes me do a pip install requests. Oh, sorry, pip can't be used like that, gotta run apt instill python3-pip or my whole system breaks. |
|
|
|
|
|
|
|
| ▲ | JodieBenitez 5 days ago | parent | prev | next [-] |
| > because Windows doesn't (didn't?) have ENV vars. As long as I can remember in my career, Windows had environment variables. So that's at least 25 years. It's both available to view/edit in the GUI and at the prompt. |
|
| ▲ | delfinom 5 days ago | parent | prev | next [-] |
| Damn, I didn't know someone could be so clueless about Windows or operating system history in general. What the hell do they teach in computer science these days |
|
| ▲ | throwaway127482 5 days ago | parent | prev | next [-] |
| Port detection? Thread management? These things have nothing to do with next.js right? |
|
| ▲ | 5 days ago | parent | prev | next [-] |
| [deleted] |
|
| ▲ | ohdeargodno 5 days ago | parent | prev [-] |
| Windows has had envvars since before Linux existed. It also has FindFirstChangeNotification (or ReadDirectoryChangesW if you hate yourself) since before inotify existed, etc. Windows has pretty much everything you can dream of (although sometimes in the form of complete abominations), it's just that the people employed by Vercel don't give a shit about using native APIs well, and will map everything towards a UNIX-ish way of doing things. |
| |
| ▲ | arcfour 5 days ago | parent [-] | | This seems to ignore the possibility of Windows having done them in a UNIX-ish way to begin with, which would be infinitely better than what Microsoft came up with. | | |
| ▲ | ohdeargodno 5 days ago | parent [-] | | Windows had most of these APIs _before_ UNIX ever dreamed them up. You can jerk yourself off about the superiority of io_uring all day long, but it had been in Win32 for 15 years prior, and has kept compatibility throughout. I can't promise that io_uring will still be in the kernel by 2040. So, yeah, speaking in hindsight is really easy. PS: no, the UNIX way is also shit, just in a different way. |
|
|