Github1s – One second to read GitHub code with VS Code
github.com
github.com
I find the project a really cool concept, but am genuinely curious what real value this is adding in it's current incarnation? Navigating the folder structure is kinda nice, but I don't see much else.
Am I missing something obvious?
Ctrl+Shift+F works. I've forgotten how many repos I clone off github just to be able to search all through the code.
So searching for `fn foobar` will return any file containing the words `fn` and `foobar` not caring about you looking for `fn foobar`.
Then if you find what you want opening the preview doesn't jump to the right line in the file so I have to search again using "find in page".
EDIT: Unfortunately, it seems like search doesn't work at all on this site, which is a shame. (at least, when I tried to do it on https://github1s.com/rails/rails it failed)
It's not working for me (it's also the first thing I wanted). It only seems to search through files that are already open in an editor tab. E.g. in the vscode repo linked from the README search for "nodeModulesPath" and no results, but open bootstrap-node.js and it's there on line 22.
Better search, find definition, ...
I too see no special value in the end.
Works for me. CTRL+P on Linux though.
Shift+CMD+P does not but without Shift it works
I think Codespaces is able to pull it off because the language servers, and vscode itself, is really running on Github's backends. They've set up the frontend to connect to a remote host.
Would be cool to tie it into this.
Flawless execution on all fronts. I’ve always wanted an easy way to preview a repo in VS Code and this is it.
I respect non open source software very much. They put hard work into it, and I have absolutely zero, zilch right to ask for its source. I am willing and happy to pay for a service if it benefits me. OSS and non-OSS can coexist. There is no need to bash on non-OSS software. It's folks like you and me, writing code, providing for the family.
Github1s, I could see myself paying $50 for a yearly fee. I would use this thing all the time.
How nice it would be for great work to be compensated more fairly.
if dev.strong_financial_background():
return False
return TrueOf course, the rate will be a lot lower for small companies, but with something like this you'd have perfect targeting. And you don't even need any invasive privacy tracking for targeting: Just let people buy ads on specific repos.
Also, at least in my personal experience, people really don't mind job ads. Job ads are the only ads I regularly click on, because I'm curious what companies are looking for (even though I'm not looking for a job)
Reminds me of the GhostText[1] extension I used to use for Sublime to sync an input field with my editor.
To implement this quickly client-side, one easy way would be to use jsdelivr's data api. For example, to get the directory tree for Ruby on Rails:
https://data.jsdelivr.com/v1/package/gh/rails/rails@06e8d5c2...
I quickly did ctrl + shift + f to search as well and it worked well
CodeSandbox also has this. For example, you can import this project in CodeSandbox using link https://githubbox.com/conwnet/github1s (adding box between github and .com)
vscodetmp () {
local repo=$1
[[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}"
local temp="$(mktemp -d)"
git clone "${repo}" "${temp}"
code --wait -n "${temp}"
rm -rf "${temp}"
}An actual checkout would exceed 1s ;-)
For example, I can Cmd+Click on a function usage and it takes me to its definition. If I hover my mouse over it it displays information about the variables/function/data structure/etc. If I'm running docker containers I can attach a shell, view its logs, start/stop/restart it with the click of a button. There are thousands of extensions that allow me to augment the user experience – a Terraform extension that allows me to open resource documentation with the click of a button, running diffs on code, running code formatters, etc.
Yes, all of this is possible with vim/emacs plugins but its not out of the box and the UX is not the same (and you're lying to yourself if you claim this isn't true). Installing and managing all of these plugins (in vim at least) is a lot more painful.
As for the RAM consumption, it's honestly minimal. Running Chrome is more of a resource hog than VS Code.
Nitpicking a bit, but neovim has LSP built-in so you don't really need a plugin to achieve such basic tasks.
I love nvim too and the direction its going, but the parent comment is correct. Its a lot more painful to set up compared to VSCode.
then you compare it to something, which is even more "careless" with memory. what does this question has to do with honesty? it's objectively very wasteful. period.
compared to what, though? well, for one, compared to the amount of data it's working with.
Looking at the memory utilization of my VS Code installation with all of the extension I have is currently using just shy of 200MB. Most entry level laptops today come with 8GB of memory. 200MB out of the 8GB is ~2.5% of the total memory available. If you have 16GB that drops it down to ~1.25%. Yes, vim will use much less memory but let's not pretend you're going to be using all of that memory doing something else (and if you are, you're the edge case). Most of the time it will stay idle, you might as well use it if it's a program you're more comfortable and productive with.
I'm not saying that I'm OK with the amount of resources Chrome and Electron apps utilize but the argument that we don't have enough memory for a few of them, specifically the ones that you use on your day-to-day work is honestly not a strong one.
> but let's not pretend you're going to be using all of that memory doing something else (and if you are, you're the edge case)
Of course I'm going to be using all that memory. For work, besides the IDE, I also have to run a mail client, an IM client and a browser, and likely a host of other developer tools. Every now and then, I may need to run a build, at which point the resource usage of the computer spikes. If, together, this exceeds available resources, something will have to give. Most likely, everything will slow down, and the SSD wear will increase.
For non-programmer specialists, the same applies, just with different software.
For regular users, the same applies, just with different software and much less resources.
It's the peak usage that matters, not the average. Wasteful software limits the amount of things that can be done on a computer simultaneously. So it's not "we shouldn't care about our software's resource use because users don't do multiple things at a time". It's "users don't do multiple things at a time because they can't, because we don't care about resource utilization".
Sure, but how many applications are you running? Let's say you have 20 applications running at 200MB each that's 4GB (50%) of your available memory with an extra 4GB for spiky workloads (if you have 16GB it drops to 25% available memory usage).
We're comparing vim (and other editors) with tools created 25 years later. The available resources back then and now are drastically different. The joke of emacs meaning "Eight Mb And Constantly Swapping" is because most computers back then only had 8MB of memory. In terms of memory consumption emacs utilized 100% back in the day compared to the 2.5% of VSCode today but people don't shit on emacs.
I don't want to come off as someone dismissing vim (and other editors). I personally use vim/tmux on a daily basis but I'm also fond of using IDEs like VSCode/IntelliJ/etc. There is a huge portion of the internet that thinks that these new editors are shitty because of their memory consumption when it is not really a good argument in 2021.
A bunch. Most of them in the background. A lot of them in browser tabs. Good chunk of them use way more than 200MB.
Some applications a typical person may be running that will each use more than 200MB of RAM: garbage audio "control panel" that came with the driver, garbage video card "control panel" that came with the driver, Skype, Steam/Origin/GOG/Ubisoft Connect/EA whatsthename, possibly all of them at once. Facebook (in browser). Messenger (in browser). GMail (in browser). Couple of news articles (in browser). That's all before starting to look at whatever the user currently needs to run to accomplish their goals.
A different example: two years ago, I had a desktop with 8GB of RAM, on which I worked on a software project (remote job). I had it running Linux and trimmed of most of RAM-consuming things, and still I could only run three things - Emacs, our backend, and a web browser with our frontend, Slack and some HN threads. Anything above that would exhaust available RAM. Slack Desktop was out of the question. That's how I discovered Ripcord - turns out you can write a perfectly functional and ergonomic Slack client with close to zero memory footprint, if you give a shit.
Of course I upgraded my machine as soon as I saved up some spare cash, and I sport 32 GB of RAM. And guess what, I've managed to exhaust that too! Thanks to software having memory leaks. The difference between 32GB and 8GB is that I can run some software for 8 hours vs. just one, before having to restart it.
I could go on, but I'll also end with this point: 4GB of RAM is still frequently seen in cheap laptops sold today, and of course common in laptops sold few years ago. This is the kind of hardware a typical non-tech person is going to have. Software bloat directly limits their ability to multitask on their machines.
FWIW, I'm not dismissing VSCode because it uses 200MB more of RAM than it should. It's a pretty lean piece of software for the features it sports. But most modern software is not like that.
And some people find this fun and enjoyable, and that’s okay. Others find it tedious and obnoxious and that’s okay too. Thankfully there is something for everybody.
This by far ticks the box for the best project I've seen this year.
Perfect UI/UX clone. Search functionality is very close to desktop VS Code.
Even mind-blowing is the loading speed. At this age and time where some blogs take 2mins to load.
So I can `pbpaste | git_clone_and_open_in_ide` and be done.
It’s not necessarily as convenient as a web client, but it lets you work from your existing/customized editor setup (e.g. theme, keybindings), and it supports editing, branches, commenting, etc.
Accessing https://github1s.com/pytorch/pytorch is _much_ faster than accessing PyTorch through Codespaces (because former is a read-only IDE), so this site is useful beyond Codespaces.
I think it has changed a bit and it's not as easy to get started with their service, but you can still host the server yourself:
> No. Coder Enterprise is not SaaS. It is software that you must deploy and run it on your own infrastructure, either a public or private cloud.
That's unfortunate. Very excited to see a SaaS solution by someone soon.
Edit: This seems to be what I'm looking for https://visualstudio.microsoft.com/services/github-codespace...
And coder.com using code-server
Root, Docker and VS Code - https://www.gitpod.io/blog/root-docker-and-vscode/#vs-code
- 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.
(side note: I wonder if someone could/has made a similar tool for vim; that way I can stay in the terminal)
After this was correctly configured, the "Status" indicator on the welcome page turned green and now says "Authorized" (instead of the yellow "Unauthorized" that I initially saw)
javascript:window.location.host = "github1s.com";
I'm not sure what it would take to make that happen.
This tool is to quickly investigate a codebase you've never seen through the façade of a familiar tool.
A "personal private repository" isn't code that you've never seen or are unfamiliar with.
Kivubg ut
People are talking about loading pages on mobile, so it doesn't seem like VSC is needed...
Did you check the debug console of your browser for errors? Also check you have Javascript enabled.
https://i.imgur.com/19gU4tl.png
On Chrome 80 / Ubuntu, FWIW. Was under the impression optional chaining was valid JS without transpiling, but who knows. Either way, loaded it up just fine on my Windows box to check out -- looks super useful!
It's early and was thinking it was some VSCode extension thinking : "Okay, kinda quirky but big deal?"
Then it hit me.. This is outstanding!
It is a static webpage, hosted on Github Pages https://conwnet.github.io/github1s
And, here is the static webpage source-code: https://github.com/conwnet/github1s/blob/gh-pages/404.html
It's basically all custom scripts to replace extra code to origin vscode repo.
https://www.reddit.com/r/programming/comments/lfpngg/explore...
hackernews doesn't seems to care, which is ironic in many levels.
Still, its almost there! Can't wait!
Also goes to show how GitHub's simple but well thought out url structure continues to pay dividends in unexpected ways.
github.surf this works same as github1s, but i like it more for no reason lol.
e.g. github.surf/matchabot/matcha-bot
Very cool project !
Gitpod has been around for a few years and offers the exact same service but on a more distinct gitpod.io domain: https://www.gitpod.io/docs/getting-started/#prefixed-url
I am super excited about a usable mobile code editing experience, and am really surprised how much monaco has languished and failed to deliver here.