HackerTrans
トップ新着トレンドコメント過去質問紹介求人

Stasshe

no profile record

投稿

Ask HN: How can we achieve a full POSIX shell implementation purely client-side?

github.com
1 ポイント·投稿者 Stasshe·8 か月前·5 コメント

SVG phishing campaign targets Ukraine

8 ポイント·投稿者 Stasshe·9 か月前·4 コメント

The Windows 7 Renaissance? StatCounter shows surge in usage

4 ポイント·投稿者 Stasshe·9 か月前·6 コメント

Show HN: Pyxis CodeCanvas a lightweight, client-side IDE for iPad and browsers

github.com
2 ポイント·投稿者 Stasshe·9 か月前·0 コメント

コメント

Stasshe
·8 か月前·議論
in Japan, now, it's alive.

how about your location?
Stasshe
·8 か月前·議論
Yes, you can use Custom Extension with through an interactive CLI to create template extension.

I'm working hard to improve the utilities and make the connection between wasm build and pyxis core system.

I'wont use wasm to build as a core, base system, but i will support in extension.

Still, I was not uploaded a react build extension system, but if you want to use this, you can upload a zip extension file.(which is created for pyxis)

* sorry for my bad english XD
Stasshe
·8 か月前·議論
thanks!

uh, I didn't know that. that's true. there are so similar naming...

but I have apply to the contest at this name, and I'm in best16, so I can't change it, unfortunately.
Stasshe
·8 か月前·議論
I'm developing Pyxis (https://github.com/Stasshe/Pyxis-CodeCanvas), a browser-based IDE designed primarily for iPad. *Since WebContainer doesn't work reliably on iPad*, I had to build everything from scratch, including a complete shell system.

*What I've implemented so far:*

Our StreamShell architecture supports: - Pipeline processing with true streaming (`cmd1 | cmd2 | cmd3`) - Full redirection support (`>`, `>>`, `<`, `2>&1`, custom fd like `3>file`) - Control structures (`if/then/else`, `for/while` loops, `break/continue`) - Variable expansion (`$VAR`, `$(command)`, `$((arithmetic))`) - Logical operators (`&&`, `||`) with short-circuit evaluation - Background execution (`cmd &`) - Process abstraction with signal handling - Node.js Stream API for backpressure handling - Most common Unix commands (`ls`, `cat`, `grep`, `head`, `tail`, etc.) - Script execution (`.sh` files with full control flow)

*Technical approach:* - Process abstraction using Node.js PassThrough streams - File descriptor management via Map structures - AST-based command parsing - Per-fd buffering strategy - IndexedDB-based virtual file system - *Pure JavaScript/TypeScript implementation - no WASM, no WebContainer* - Runs entirely in the browser main thread with timeout protection

*Current limitations:* - Some advanced bash features not yet implemented (shell functions, process substitution, heredocs) - No `*` recursive globbing - Simplified job control - Browser environment constraints (no native modules, all async) - Single-threaded execution (no Web Workers for commands)

*My questions:*

1. *Is this approach sufficient for a practical shell environment?* Are there critical POSIX features I'm missing that would make this unsuitable for real-world use on iPad?

2. *Are there fundamental design flaws in my implementation?* Particularly concerned about: - The fd management strategy (Map-based with PassThrough streams) - Stream-based pipeline processing and backpressure handling - Memory efficiency with large data flows - The parser's handling of edge cases and quote processing - Timeout-based protection vs. proper cancellation

3. *What would you prioritize next?* Given the constraints of: - Browser-only environment (no server, no WebContainer) - iPad compatibility requirement - Must work offline - Limited to what IndexedDB + browser APIs can provide

4. *Alternative approaches?* Are there better architectural patterns for implementing a POSIX-like shell in a pure browser environment that I should consider?

The full technical documentation is available here: [SHELL-SYSTEM.md](https://github.com/Stasshe/Pyxis-Client-Side-Code-Editor/blo...)

*Why not WebContainer?* WebContainer is an excellent technology, but it has significant limitations on iPad/iOS Safari - SharedArrayBuffer restrictions, memory constraints, and reliability issues make it unsuitable for our use case. We need a solution that works consistently across all platforms, especially mobile.

I'd appreciate any feedback from those who have experience with shell implementation, browser sandboxing, or building development tools for constrained environments like iPad.
Stasshe
·8 か月前·議論
Fortunately, Mine did not become a brick, but I'm sure that iOS v26 is the most terrible version ever. it's just a trash.
Stasshe
·8 か月前·議論
Uh, I see.
Stasshe
·8 か月前·議論
And, it might be taking longer to discover because it's hard to notice with SVG.
Stasshe
·8 か月前·議論
Not exactly — it’s a bit more than just a link scam. The SVG actually started a multi-stage infection chain, downloading a password-protected archive with a malicious CHM/HTA that deployed Amatera Stealer and PureMiner. So it’s a real system compromise, not just a fake site trick.
Stasshe
·9 か月前·議論
wow, that's so fast!! i'll try later.

when i use Rari, and UnoCSS, it can build in lightning speed!

Thesedays, legacy code is replacing by Rust.

Tough Job!!
Stasshe
·9 か月前·議論
[dead]
Stasshe
·9 か月前·議論
these days, people,especially shareholders tend to think AI is better than sinear, old hand engineer.

The lower limit of product quality has risen, but the upper limit has fallen.

what a tragedy.
Stasshe
·9 か月前·議論
Yeah, defanately. But why don't use Linux? that's the better option,I think.
Stasshe
·9 か月前·議論
Awesome, sounds great. (I think img converter will not need these method, but audio, or video, or some a little heavy files probably need it.

Thanks for considering it!
Stasshe
·9 か月前·議論
so now,I'm waiting for your audio converter.

when a lot of files are uploaded, I want to use web-worker(wasm).

I think that way is much better for bulk flow.