Bash? Nah, I Have Bun.

preview_player
Показать описание
The new Bun shell ($) enables some INCREDIBLY cursed stuff. I loved every second of it

S/O Ph4se0n3 for the awesome edit 🙏
Рекомендации по теме
Комментарии
Автор

I open my front end code, it is JavaScript. I open my server code, it is JavaScript. My database? JavaScript. My shell commands? JavaScript. I leave my desk to get a snack. I open the fridge, it’s full of JavaScript. I try to scream, but only JavaScript comes out.

leonzill
Автор

If this scope creep keeps up, Bun will end up being an entire OS. You read it here first.

minikame
Автор

The cycle historically is 1.5-2 years for JS: we do the thing our own way and its the best thing ever, in 2 years: we did this thing our way and it was the worst thing ever and now I live in perpetual hell to support it in my project.

vsolyomi
Автор

It certainly feels like an unusual direction to move in, but I have stopped trying to make sense of what goes on in the JS land.

wlockuz
Автор

Don't ever set Bun as your system command shell....

wvovaw
Автор

now you have no idea what are the dependencies of this package because it's written in a string.

VivekYadav-dsoz
Автор

These 'lets just see how much crap I can do with this' videos lately are really enjoyable to watch

NiklasZiermann
Автор

PHP is staring at bun right now: "really!...."

anasouardini
Автор

yup! replace a 10mb binary with 3700 node packages so you can write “shell” commands in js - the madness continues!

laalbujhakkar
Автор

This feature seems just like the dax module available in Deno.

BlackAsLight
Автор

Interesting. More native to the language makes it present a nicer API to the user(Bun user) but it is hard to maintain? It is more like an “illusion” that they allow scripting. More like a very special function that interprets strings very specifically, ideally imitating what shells do

clementdato
Автор

So, we can run php-cli inside js code. Perfect! :)

gryg
Автор

"7ms to start a shell, very annoying" I believe if you're not an alien, you will not notice that slowness level

abdul-hameedmaree
Автор

well, no one can deny that the Bun team is working hard on features! I love it. BTW I can't wait for the windows stable version.

MarlonEnglemam
Автор

Still using shell commands, I was hoping for better abstraction. E.g. instead of "grep" - you would import a JS function that does the same, then you just write JS instead of bash.

Python has far better libraries for this. This is only useful - if you have an existing node project and want to keep some sysadmin stuff in the same project instead of .sh files.

kwyaza
Автор

Backtick operator in PHP does a very similar thing. Been using PHP to create shell scripts since forever and it's great!

deepakmittal
Автор

Bun brought Google ZX to their runtime

arkbom
Автор

Zsh has a bash compatibility mode, enabled by default when its $0 is "bash" or "-bash". Also macOS moved to it long after it became a popular shell on linux and macs.

DeuxisWasTaken
Автор

This is just absolutely insane. Incredibly hype and happy to be alive in this day and age, where we can implement things like this.
Crazy 🔥💯

BGTMN
Автор

Imagine if they did this with Nushell's approach to CLI instead of Bash and you got structured data back from your commands instead.

TigerWalts