3 ms·
This is awesome, great work bugen! I've created a package in Wasmer [1] to showcase this tool (also, it will do the processing fully sandboxed thanks to Wasm!)
by syrusakbary 3y ago
This is awesome, great work bugen!
I've created a package in Wasmer [1] to showcase this tool (also, it will do the processing fully sandboxed thanks to Wasm!)... hope you all like it! (here's the PR [2])
# Install Wasmer
curl https://get.wasmer.io -sSfL | sh
# Add ppp alias
alias ppp="wasmer run syrusakbary/pypipe@0.1.0 -- "
And then, run it normally:
$ cat staff.txt |ppp 'i, line.upper()'
[1] https://wasmer.io/ https://wasmer.io/
[2] https://github.com/bugen/pypipe/pull/2 https://github.com/bugen/pypipe/pull/2
- theamk 3y agowow that wasmer thing is _SLOW_.. we are talking about 57x time slow! (granted most of this is likely startup delay). Here is a random benchmark with warmed-up cache: $ time cat /var/lib/dpkg/status | wasmer run syrusakbary/pypipe@0.1.0 -- 'i, line.upper()' | wc -l 39175 real 0m5.761s user 1m15.071s sys 0m4.838s vs regular python: $ time cat /var/lib/dpkg/status | python3 pypipe.py 'i, line.upper()' | wc -l 39175 real 0m0.107s user 0m0.096s sys 0m0.026s and the wasmer install procedure.. not a deb file in sight, adds itself to ~/.bashrc (of course...) and apparently requires two environment variables to even work. Compare this to OP's instructions: (1) check out the repo (2) execute the file directly. Not sure why would anyone want wasmer for simple command like tools like those.