News for hackers. Stuff that matters.
Re:Github1s – One second to read GitHub code with VS Code by zaptheimpaler on Tuesday February 09, 2021 @10:17PM (#26085391)
How does this magic work? Does VS Code run completely in the browser?
Re:Github1s – One second to read GitHub code with VS Code by qbasic_forever on Tuesday February 09, 2021 @10:28PM (#26085445)
90% of VS Code is typescript that already works fine in the browser. There's just a small layer of nodejs to interface with the local filesystem and run processes. Quite a few projects have existed that pull the core of VS code out into the browser and reimplement the small platform layer on their own:

- Eclipse Theia: https://github.com/eclipse-theia/theia

- Coder: https://github.com/cdr/code-server

I'm sure there are countless versions for mobile that are hasty Cordova-based versions of the VS Code core too.

Re:Github1s – One second to read GitHub code with VS Code by gbraad on Wednesday February 10, 2021 @09:12AM (#26089330)
Actually no. On mobile I use termux with coder's code-server and chrome/vivaldi as there is no electron for Android. Not aware of any Cordova based one's.
Re:Github1s – One second to read GitHub code with VS Code by mschuetz on Wednesday February 10, 2021 @01:10AM (#26086142)
VS Code is essentially a browser app based on Typescript(Javascript) and html. You can even open the chrome dev tools in VS Code (Help -> Toggle Dev Tools) and inspect the html and javascript of VS code. You can also go so far as to change the CSS and html of vs code in the dev tools. Try using the element picker (top left icon in the dev tools) to select an element in vs code, and you'll see that each line of code is a div and each token is a span that is syntax highlighted by CSS classes.
Re:Github1s – One second to read GitHub code with VS Code by brailsafe on Tuesday February 09, 2021 @10:25PM (#26085432)
The desktop app runs on electron, which is Chrome under the covers, so I imagine it doesn't take a tremendous amount of work to just run it straight in the browser.
Re:Github1s – One second to read GitHub code with VS Code by gunn on Tuesday February 09, 2021 @10:28PM (#26085441)
Re:Github1s – One second to read GitHub code with VS Code by gspr on Wednesday February 10, 2021 @04:11AM (#26087027)
The world is starting to scare me. I think I'll go live under a rock and wait it out until the pendulum swings back and people stop thinking of the browser as their OS.
Re:Github1s – One second to read GitHub code with VS Code by exikyut on Tuesday February 09, 2021 @10:28PM (#26085444)
(Electron = Chromium minus tab bar and window borders)
Re:Github1s – One second to read GitHub code with VS Code by momothereal on Tuesday February 09, 2021 @10:49PM (#26085541)
Plus a Node.js API to interact with the host and create windows, and an IPC system to communicate between the renderer and node processes
Re:Github1s – One second to read GitHub code with VS Code by pid_0 on Tuesday February 09, 2021 @10:28PM (#26085439)
I mean, it already basically does