Search Explore
  • mtlynch · 5 years ago

    This is neat, but search seems to be broken. I loaded one of my repositories and ran global searches for strings I know exist and they came up with no results. After I opened the file in the web editor, the results would appear in subsequent searches.

    • ibraheemdev · 5 years ago

      It looks like search only works for files that are currently open.

      • gbraad · 5 years ago

        It likely does not pull all the code into localstorage, but only those opened are retrieved as raw?

        An actual checkout would exceed 1s ;-)

        • chrisco255 · 5 years ago

          Yeah, but you'd think you could pull down the directory without pulling down the files? I mean, I love the project either way, and it's already impressive as-is.

          • gbraad · 5 years ago

            If you want more, use gitpod.io

      • dstaley · 5 years ago

        The #1 reason I end up cloning a repo and opening it in VS Code is to perform search, so it's a bummer search doesn't work. I'd even give up on the "1s" bit if I could open a full-text searchable version of the repo.

        • renerthr · 5 years ago

          What do you guys think of vim with fzf? You can also use the `tree` command. And it consumes less RAM, probably. Why is it that VS Code seems to be so popular?

          • dmlittle · 5 years ago

            It's not that you _can't_ do these things in vim/emacs it's that the experience is different. I'd argue that VS Code is closer to an IDE than just an editor.

            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.

            • RMPR · 5 years ago

              > 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.

              Nitpicking a bit, but neovim has LSP built-in so you don't really need a plugin to achieve such basic tasks.

              • bern4444 · 5 years ago

                It has built in LSP, but I still need a few plugins to get additional functionality like auto complete, auto import (thanks nvim-compe!), definition preview (lsp-saga) etc.

                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.

              • onetom · 5 years ago

                > ...it's honestly minimal.

                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.

                • dmlittle · 5 years ago

                  Is it high? Yes. Is it completely wasteful? Debatable.

                  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.

                  • TeMPOraL · 5 years ago

                    I agree that with the number you gave (200MB for a primary work tool) it's not that big of an issue, but in general, I strongly disagree with this argument:

                    > 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".

                    • dmlittle · 5 years ago

                      > 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.

                      • TeMPOraL · 5 years ago

                        > 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).

                        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.

              • shrimpx · 5 years ago

                VSCode has high quality support for programming languages out of the box, and suggestions for which packages you should install, with one-click install. But you can achieve similar results in vim/emacs with more research, fiddling with config and manually installing deps.

                • gpanders · 5 years ago

                  > But you can achieve similar results in vim/emacs with more research, fiddling with config and manually installing deps.

                  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.

          • ibraheemdev · 5 years ago

            This is absolutely amazing! I frequently reference Github repositories while developing so this helps me a lot. Thanks to whoever made this!

            (side note: I wonder if someone could/has made a similar tool for vim; that way I can stay in the terminal)

          • jeswin · 5 years ago

            Very useful, thanks. This will also be handy as a browser plugin - like click on an icon to switch to vscode view.

            • mrec · 5 years ago

              Don't think it needs a plugin, could just be a one-liner bookmarklet e.g.

              javascript:window.location.host = "github1s.com";

              • eyelidlessness · 5 years ago

                I think a plugin would actually be great if it doesn’t take you out of your history state. The two views could live in the same page with parallel DOMs. Navigating GH is already iffy for back/forward nav without introducing another host into the mix

            • haskellandchill · 5 years ago

              Oh VS is just JavaScript, but how exactly does this work? I couldn't tell by reading the code except that it does have src/vs that has what looks like a subset of the Microsoft code files in it.

              • stevetodd · 5 years ago

                Holy smokes—worked fast and smooth on my phone too! Well done!

                • reustle · 5 years ago

                  This is fabulous. I remember something similar 2 or 3 years ago where you could "log in with github" and create commits using VS Code in the browser. Does anyone remember the name? Is it still alive? Iirc it was a very simple name like "code.org" (but not that).

                • cjohansson · 5 years ago

                  Ok one second is an exaggeration and I can't scroll to read in my iPhone, maybe Github10sdesktop would be more realistic. But cool anyway

                  • eyelidlessness · 5 years ago

                    Basically the same experience as any Monaco editor on my phone. I’ve recently tried to do quick code experiments on my phone while taking a break on a variety of platforms... basically none are usable. Maybe you were expecting something to be comparable to an existing experience? If so please share.

                    • qbasic_forever · 5 years ago

                      Code Mirror 6 is supposed to be focusing on mobile-first usability: https://codemirror.net/6/ The creator just had a talk at Fosdem a couple days ago too: https://fosdem.org/2021/schedule/event/codemirror/

                      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.

                    • spockz · 5 years ago

                      Scrolling works fine on my iPhone (11). However no keyboard pops up when going to an editor pane. I can move the cursor about though.

                      • rnotaro · 5 years ago

                        Editing is not a feature yet, even on desktop. That's why your virtual keyboard doesn't appear.

                    • CreepGin · 5 years ago

                      Can private repos be supported in any way?

                      • jakereps · 5 years ago

                        It appears they could be supported at the moment. In the sidebar there is a GitHub1s Settings menu (the bottom) and in that you can supply your own OAuth/App token to increase your request rate limit, but by delegating access to that token to your private repos you should be able to read your own or chosen/owned private repositories (the caveat being you're giving this app that token outside of a normal OAuth login flow, so I'm not sure how comfortable someone would be with doing that - it seems a normal GitHub OAuth sign in flow could be investigated).

                      • lxe · 5 years ago

                        There are software projects that get posted once in a while on HN that are on a completely different level of quality, whether it's product, UX, or tech. This is one of those posts.

                        • stanislavb · 5 years ago

                          This one is amazing. I've cloned so many repos locally with the only reason to explore them with the comfort of VS Code.

                          • news_hacker · 5 years ago

                            I really wish it had Cmd+P support for searching for project files.

                            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?

                            • KiranRao0 · 5 years ago

                              Nothing obvious. I've found Cmd+Shift+P, then delete the > character, works extremely well in place of Cmd+P.

                              • perryizgr8 · 5 years ago

                                > what real value this is adding in it's current incarnation?

                                Ctrl+Shift+F works. I've forgotten how many repos I clone off github just to be able to search all through the code.

                                • xmprt · 5 years ago

                                  Github allows you to search through repositories as long as they're not forks.

                                  • perryizgr8 · 5 years ago

                                    How does that work? I've never been able to find this option. Also, this tool's search is broken. It searches only the currently open file.

                                    • KerrickStaley · 5 years ago

                                      GitHub search is notoriously poor, though—it can only match whole words (e.g. the query "FooBar" does not match the text "FooBarBaz"), and it doesn't support regexes.

                                      • dathinab · 5 years ago

                                        And way worse it doesn't even keep word order and similar.

                                        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".

                                        • loganlinn · 5 years ago

                                          If anyone is looking for actually useful cross-repo search: https://grep.app/

                                          • Ayesh · 5 years ago

                                            This is great, thank you.

                                        • nightpool · 5 years ago

                                          In addition to the flaws mentioned by the other commenters (whole word only, no regexes), Github will only search the master branch of a repo, which makes it useless for my two most common tasks "where did this code used to be used" and "does this unmerged PR manage to remove all of the references to this code in its refactor (incl. in comments/etc)"

                                          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)

                                          • imron · 5 years ago

                                            And as long as you’re not trying to do a case-sensitive search.

                                            • soenkeliebau · 5 years ago

                                              It does have search, but I'd be willing to wager that the normal workflow when using that is "try searching for something, look at the results page, swear, clone, ..."

                                            • rkangel · 5 years ago

                                              > Ctrl+Shift+F works

                                              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.

                                            • visarga · 5 years ago

                                              > Am I missing something obvious?

                                              Better search, find definition, ...

                                              • chrisshroba · 5 years ago

                                                Search is completely broken for me... for example on https://github1s.com/matryer/bitbar, searching for just the letter "a" returns no results. Am I doing something wrong?

                                                • Kwantuum · 5 years ago

                                                  Search appears to only work once the files are cached, if you open a file then close it, search will find it.

                                                  • chrisshroba · 5 years ago

                                                    Ah, makes sense! Thanks!

                                                    • Brian_K_White · 5 years ago

                                                      Then you need to cache all files, which you were already doing years ago by cloning and browsing locally.

                                                      I too see no special value in the end.

                                                • arebhaibhai · 5 years ago

                                                  > I really wish it had Cmd+P support for searching for project files.

                                                  Works for me. CTRL+P on Linux though.

                                                  • ollysb · 5 years ago

                                                    It appears to only work for files which have already been opened.

                                                    • flanbiscuit · 5 years ago

                                                      Confirmed CMD+P just worked for me on mac.

                                                      Shift+CMD+P does not but without Shift it works

                                                    • soenkeliebau · 5 years ago

                                                      This, so much this!

                                                      • dingran · 5 years ago

                                                        Yeah, I do the same. I feel the thing that's missing is navigate to definitions/declarations (cmd+])

                                                        • beermonster · 5 years ago

                                                          Yup. T'is pretty good indeed. I have told world+dog.

                                                        • sudeepj · 5 years ago

                                                          Agreed. This also demonstrates: Does one-thing and does it well.

                                                          • alpb · 5 years ago

                                                            It surely opens a repo in VSCode, but it doesn't seem to have any language server support built in. For example, if I open a Go repository, I can't navigate code (Go to references, Find references etc). GitHub Workspaces (although takes waaay longer to provision) is better at this. I wish GitHub did a faster loading read-only version like this.

                                                            • hoten · 5 years ago

                                                              I'm only speculating, but the reason is likely because language servers are not written in JS. I assume electron apps can spin up arbitrary processes, allowing for a language servers to be written in anything. It'd be neat to see these language servers compiled to WASM and run as a web worker, although I suspect vscode isn't setup for that.

                                                              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.

                                                              • arcticbull · 5 years ago

                                                                I handle this by firing up a Fargate instance with a Docker container pre-configured for VSCode Remote SSH. Then once you connect to it, you can install whatever language server you want assuming it's not baked into the Docker image. An EFS mount persists my sources across runs too, and I can scale it up to whatever size Fargate instance my development of the day needs.

                                                                Would be cool to tie it into this.

                                                                • vijaybritto · 5 years ago

                                                                  Thats the trade off. If you have everything supported upfront then the loading performance would be abysmal and it would take 2 minutes to load the entire app on a desktop machine. This is perfect for browsing through code.

                                                              • fancyfish · 5 years ago

                                                                This. This just nails it. I honestly was in awe when I saw this repo, you don’t see these very often on here. So much Tier 1 talent in all aspects - product, UX, and tech.

                                                                Flawless execution on all fronts. I’ve always wanted an easy way to preview a repo in VS Code and this is it.

                                                                • heyoo · 5 years ago

                                                                  So surely, it will never make money. :(

                                                                  • forgotmypw17 · 5 years ago

                                                                    why is that a sad face? do things have to earn money to have any worth?

                                                                    • stjo · 5 years ago

                                                                      It would be nice reward the author for making something that is useful, not just by patting him/her on the back. I think that is what heyoo is talking about

                                                                      • krelian · 5 years ago

                                                                        Creating a useful tool that becomes well known (or a de facto standard) in the community, a successful project you proudly add to your resume, can pay for itself and much more indirectly.

                                                                        • systemvoltage · 5 years ago

                                                                          Not as lucrative as profiting directly from 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.

                                                                      • pestaa · 5 years ago

                                                                        I get the opposite vibe from the parent comment: that usefulness and worthiness is often detached from monetary reward.

                                                                        How nice it would be for great work to be compensated more fairly.

                                                                        • blocked_again · 5 years ago

                                                                          def do_things_have_to_earn_money_to_have_any_worth(dev: Developer) -> bool:

                                                                              if dev.strong_financial_background():
                                                                          
                                                                                return False
                                                                          
                                                                              return True
                                                                          • worldsayshi · 5 years ago

                                                                            If it doesn't make money but need to run infrastructure it's not likely to live for very long?

                                                                          • blocked_again · 5 years ago

                                                                            It can make a shit ton of money through programming job ads.

                                                                            • yarcob · 5 years ago

                                                                              Good point. I think most people aren't aware that it costs €500 - €1000 to post a single job ad on an important platform.

                                                                              Of 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)

                                                                          • crazypython · 5 years ago

                                                                            We are so used to JavaScript SPAs taking a long time to load. People will Webpack it then use a tool to inline CSS and sort scripts. I find it easier and faster to use no loader at all, and manually sort scripts. The build process is less likely to break, because there is none, and it builds instantly, because there is none, it loads directly from the filesystem. Most modern browsers (even with IE11 included) support enough ES6 features that you can write your code directly in the common supported subset.[0] I had a multiplayer game with hundreds of hours of gameplay get on the front page with "loads in less than one second" in the HN headline. (http://vnav.io)

                                                                            [0]: https://wwwperiodictable.surge.sh

                                                                          • zaptheimpaler · 5 years ago

                                                                            How does this magic work? Does VS Code run completely in the browser?

                                                                            • brailsafe · 5 years ago

                                                                              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.

                                                                              • pid_0 · 5 years ago

                                                                                I mean, it already basically does

                                                                                • exikyut · 5 years ago

                                                                                  (Electron = Chromium minus tab bar and window borders)

                                                                                  • momothereal · 5 years ago

                                                                                    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

                                                                                  • qbasic_forever · 5 years ago

                                                                                    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.

                                                                                    • gbraad · 5 years ago

                                                                                      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.

                                                                                    • mschuetz · 5 years ago

                                                                                      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.

                                                                                      • gspr · 5 years ago

                                                                                        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.

                                                                                      • qbasic_forever · 5 years ago

                                                                                        I wouldn't get too attached to this tool, folks. Github lawyers are not going to be happy with this domain directly infringing on their copyright and are almost certainly at this very minute sending cease and desists. Even if they like the tool and want to see it succeed, the domain is a bit of a fishing and spam risk for them. Best case Github tells them to knock it off and suggests a different domain they use.

                                                                                        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

                                                                                        • sergiotapia · 5 years ago

                                                                                          Gamechanger my man! This is so good it warrants a browser extension to add a button to all repos to View in VSCode.

                                                                                          Kivubg ut

                                                                                            • krrrh · 5 years ago

                                                                                              It’s still in early access, so most of us don’t have it yet.

                                                                                          • Jarred · 5 years ago

                                                                                            It’s very impressive how fast this loads. Every time I’ve integrated Monaco (web-based Visual Studio Code), it takes multiple seconds to render. GitHub Codespaces, the official way to open GitHub repos in a web-based Visual Studio Code instance, loads probably 20x slower than this.

                                                                                            • qbasic_forever · 5 years ago

                                                                                              Just briefly browsing the source this is a much more minimal version of VS code--many of the extensions microsoft packages and ships aren't in it. I don't doubt that helps reduce the JS bundle significantly and as a result gives you much speedier loading times. For example there's no terminal or any of its extensions in this version of VS code.

                                                                                              • jachee · 5 years ago

                                                                                                Right. That can be done because this is specifically only for reading code with a VSCode interface.

                                                                                              • shawnz · 5 years ago

                                                                                                Codespaces gives you a VM in which you can debug your application, but this service does not appear to do that.

                                                                                                • naikrovek · 5 years ago

                                                                                                  Monaco is just the extensible text editor, right? Nothing else, I thought.

                                                                                                • breck · 5 years ago

                                                                                                  Thanks, I love it.

                                                                                                  Also goes to show how GitHub's simple but well thought out url structure continues to pay dividends in unexpected ways.

                                                                                                • Jarred · 5 years ago

                                                                                                  Feature request: make CMD+P support searching files in the repository. Currently, it shows "No matching results".

                                                                                                  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...

                                                                                                  • madeofpalk · 5 years ago

                                                                                                    Maybe the shortcut is different in the browser on macOS, but on Windows CTRL + P just works for searching the project, like it does in VSCode proper on desktop.

                                                                                                    I quickly did ctrl + shift + f to search as well and it worked well

                                                                                                    • bewareandaware · 5 years ago

                                                                                                      It looks like it works for previously opened files. Perhaps the author didn't want to load the whole tree into the browser, or maybe its a limitation on webhosted vscode?

                                                                                                      • thw0rted · 5 years ago

                                                                                                        I suspect that the author didn't want to eager-load all files because the API they're using is rate-limited -- 60 requests/hr when unauthenticated, or 5000/hr if you generate a unique OAuth token. Even that 5k could get burned through pretty quickly for a larger repo, assuming you have to make at least one request per file.

                                                                                                    • the_arun · 5 years ago

                                                                                                      Pretty cool, but I would assume this depends on internet speed for left nav items? no?

                                                                                                      • bachmeier · 5 years ago

                                                                                                        While this is a move in the right direction, Gitlab has had a similar feature for years, and it's not read-only.

                                                                                                        • dtrailin · 5 years ago

                                                                                                          How does this feature work on Gitlab? Can you link a doc? Is it VS code as well?

                                                                                                      • blackoil · 5 years ago

                                                                                                        Brilliant!! Github should make it first class. Most times, I don't need full power of codespace, something leaner(free) just to browse code will be awesome.

                                                                                                          • gremlinsinc · 5 years ago

                                                                                                            godda*n this could've saved me so much time... thanks though!

                                                                                                          • est · 5 years ago

                                                                                                            This would break some github's geo-blocking repos.

                                                                                                              • mizzao · 5 years ago

                                                                                                                That gives a 404.

                                                                                                              • thundergolfer · 5 years ago

                                                                                                                I've been using Codespaces recently, and most recently with PyTorch.

                                                                                                                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.

                                                                                                              • chii · 5 years ago

                                                                                                                it'd be interesting to have language servers also working (i wonder if it's possible to run language servers as local service workers on the browser), so that you can also navigate via symbols.

                                                                                                                • samzer · 5 years ago

                                                                                                                  Would it be possible to view personal private respository code with this?

                                                                                                                  I'm not sure what it would take to make that happen.

                                                                                                                  • naikrovek · 5 years ago

                                                                                                                    I'm not sure that would make sense for this tool.

                                                                                                                    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.

                                                                                                                    • BorisEm · 5 years ago

                                                                                                                      My organization has hundreds of private repos. It would be great to use this tool to explore those.

                                                                                                                      • basisword · 5 years ago

                                                                                                                        +1. This would be an incredibly useful tool when I have to search private company repos I'm unfamiliar with. Currently I use GitHub's 'search current repo' functionality but it's not great.

                                                                                                                      • naikrovek · 5 years ago

                                                                                                                        Note the "personal" qualifier in the comment.

                                                                                                                      • janpot · 5 years ago

                                                                                                                        I often browse private code in github when I intend to store or share links to certain lines in our codebase. e.g. to use in tickets or PRs, or during Slack discussions.

                                                                                                                    • abalone · 5 years ago

                                                                                                                      This is cool and I hope they don’t run into copyright issues with the domain, which they probably will. Trademark lawyers basically have to go after violations otherwise they risk losing control of the mark. Maybe GitHub could be nice and license it to the project for free.

                                                                                                                      • jwr · 5 years ago

                                                                                                                        This was my first thought as well, I would not be happy if people started to use my business name in similar-looking domains. Also, you have to defend your trademark.

                                                                                                                      • lostintangent · 5 years ago

                                                                                                                        If folks are interested in browsing (and editing) GitHub repos in VS Code without cloning, the GistPad extension might be worth checking out: https://marketplace.visualstudio.com/items?itemName=vsls-con....

                                                                                                                        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.

                                                                                                                        • Gehinnn · 5 years ago

                                                                                                                          I love it! You can also author commits with it! I'm missing some really easy way to open a github repository though, ideally a button on github next to clone, like "Open with GistPad".

                                                                                                                        • lifeplusplus · 5 years ago

                                                                                                                          would be cool if you could fork the repo and make pr

                                                                                                                          • vemv · 5 years ago

                                                                                                                            github1s.com doesn't seem a very fortunate domain name as it's obviously based on github.com - it's well plausible that it will be taken down sooner or later.

                                                                                                                            • Gehinnn · 5 years ago

                                                                                                                              Afaik raw.githubusercontent.com was third party as well and lived for a very long time.

                                                                                                                              • carlosperate · 5 years ago

                                                                                                                                How did it end up being absorved by GitHub? The "raw" button in the file views use that domain now.

                                                                                                                              • rahulpadalkar · 5 years ago

                                                                                                                                This is insane!!!!!!!!!!!

                                                                                                                                • avipars · 5 years ago

                                                                                                                                  not sure the benefit, but it does work well

                                                                                                                                  • wly_cdgr · 5 years ago

                                                                                                                                    That was more than one second. Fail.

                                                                                                                                    • jcul · 5 years ago

                                                                                                                                      Amazing. It even works great on my phone. This is one of the best things I've seen on hacker news.

                                                                                                                                      • Gehinnn · 5 years ago

                                                                                                                                        If you like the text editor that powers VS Code (Monaco) and would like to use it for writing Markdown on github, check out my foss chrome/Firefox browser extension [1]! It replaces all text areas with a Monaco editor.

                                                                                                                                        [1] https://github.com/hediet/browser-ext-github-monaco

                                                                                                                                        • dairylee · 5 years ago

                                                                                                                                          Seems like a cool extension, will give it a try.

                                                                                                                                          Reminds me of the GhostText[1] extension I used to use for Sublime to sync an input field with my editor.

                                                                                                                                          [1]https://github.com/GhostText/GhostText

                                                                                                                                          • Gehinnn · 5 years ago

                                                                                                                                            That is a cool project, thanks for sharing!

                                                                                                                                          • GSGBen · 5 years ago

                                                                                                                                            This would be incredible on Trello!

                                                                                                                                            • Gehinnn · 5 years ago

                                                                                                                                              I never used Trello, what would make this great there? Shouldn't be too hard to implement!

                                                                                                                                              • faeyanpiraat · 5 years ago

                                                                                                                                                Trello uses a basic textarea for ticket description editing, which makes it a pain for anything more complicated than it is intended to be used for, which severely limits it's use cases.

                                                                                                                                            • snak · 5 years ago

                                                                                                                                              Looks great, I'll give it a try. Thanks for sharing!

                                                                                                                                              • outadoc · 5 years ago

                                                                                                                                                That looks awesome, thanks! Doesn't look like it supports GitHub Enterprise instances though?

                                                                                                                                                • Gehinnn · 5 years ago

                                                                                                                                                  Just extending the url match expression should fix that! Currently, it only matches for `github.com`. I don't have access to any Enterprise instance, but I welcome PRs!

                                                                                                                                              • miki123211 · 5 years ago

                                                                                                                                                This is amazing for accessibility. Github's own interface is kinda meh with screen readers. This is much better.

                                                                                                                                                  • apples_oranges · 5 years ago

                                                                                                                                                    Can you explain the irony? Just trying to get a feeling for the whole China thing.. For example I have noticed that some people have a lowly view of TikTok because it's Chinese. I understand the privacy aspect of it, I don't trust Chinas data policies myself (and slightly more trust ours or rather our ability to implement them securely), but is there also a factor of "the Chinese are getting really good at inventing things", too?

                                                                                                                                                  • vemv · 5 years ago

                                                                                                                                                    I enjoyed replicating just now an analogously fast workflow that shallow-clones a git repo and then opens it in my GUI IDE from the terminal without any other clicking around being necessary.

                                                                                                                                                    So I can `pbpaste | git_clone_and_open_in_ide` and be done.

                                                                                                                                                    • metahost · 5 years ago

                                                                                                                                                      Could not get it to work with private repos even after using an API token, is it supported?

                                                                                                                                                      • beyti · 5 years ago

                                                                                                                                                        Same here, that would be a really useful thing for my organization.

                                                                                                                                                        • swashbuck1r · 5 years ago

                                                                                                                                                          I was able to test github1s for private repos after generating a personal access token, and pasting it into the Set OAuth Token screen (via little github1s icon in the sidebar).

                                                                                                                                                          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)

                                                                                                                                                        • funman7 · 5 years ago

                                                                                                                                                          Yes I need this for bitbucket.

                                                                                                                                                          • funman7 · 5 years ago

                                                                                                                                                            Yes I need this in my life, for Bitbucket.

                                                                                                                                                            • drusepth · 5 years ago

                                                                                                                                                              I'm confused how to use this. Do I need VS Code installed and/or do I need to open the URL through VS Code? The readme doesn't seem to offer much guidance, and any time I visit any 1s repo (even the example https://github1s.com/microsoft/vscode link in the readme), I just see a blank, white page.

                                                                                                                                                              People are talking about loading pages on mobile, so it doesn't seem like VSC is needed...

                                                                                                                                                              • progval · 5 years ago

                                                                                                                                                                I don't have VSCode installed at all, and I don't get the blank page.

                                                                                                                                                                Did you check the debug console of your browser for errors? Also check you have Javascript enabled.

                                                                                                                                                                • drusepth · 5 years ago

                                                                                                                                                                  Ah, I do indeed have console errors.

                                                                                                                                                                  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!

                                                                                                                                                                • hobofan · 5 years ago

                                                                                                                                                                  You are either encountering a bug then, or your internet might be too slow? I also see a blank white page for a split second until the editor/viewer loads up.

                                                                                                                                                                • _pmf_ · 5 years ago

                                                                                                                                                                  Why not make GitHub fast? Why do I have to use an editor embedding a web browser instead of using a web browser?

                                                                                                                                                                  • spark3k · 5 years ago

                                                                                                                                                                    This is brilliant. Should be a core part of GitHub

                                                                                                                                                                    • randompwd · 5 years ago

                                                                                                                                                                      No it shouldn't. IDEs come and go.

                                                                                                                                                                    • kaladin_1 · 5 years ago

                                                                                                                                                                      Cudos! You have motivated more than a few today. This is big push to really do one thing very well.

                                                                                                                                                                      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.

                                                                                                                                                                      • zeusk · 5 years ago

                                                                                                                                                                        Because this is literally the vscode editor (monaco?) pointed to the github repo, with a github fs backing?

                                                                                                                                                                      • geniium · 5 years ago

                                                                                                                                                                        Really nice product

                                                                                                                                                                        • baby · 5 years ago

                                                                                                                                                                          That’s it. Black magic. That’s what all of us wanted, that’s what we thought would happen with advances in technology, it just happened!

                                                                                                                                                                          • wrboyce · 5 years ago

                                                                                                                                                                            This is really cool, and has inspired the latest function to be added to my zshrc:

                                                                                                                                                                              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}"
                                                                                                                                                                              }
                                                                                                                                                                            • jasonlfunk · 5 years ago

                                                                                                                                                                              I love this, thanks.

                                                                                                                                                                              • thepete2 · 5 years ago

                                                                                                                                                                                Now you need a function to move it to a permanent location if you like the project and want to keep it or contribute.

                                                                                                                                                                                • gbraad · 5 years ago

                                                                                                                                                                                  Gitpod.io

                                                                                                                                                                                • jeffreygoesto · 5 years ago

                                                                                                                                                                                  Why not "--single-branch" when cloning? Couldn't it speed up cloning if there are many branches?

                                                                                                                                                                                  • Tobu · 5 years ago

                                                                                                                                                                                    --depth=1 (shallow clone, and implies --single-branch)

                                                                                                                                                                                • spion · 5 years ago

                                                                                                                                                                                  Really cool concept, however language service and file search don't quite work (even for TypeScript projects) due to lazy loading of files and directories.

                                                                                                                                                                                  Still, its almost there! Can't wait!

                                                                                                                                                                                  • bilekas · 5 years ago

                                                                                                                                                                                    I was a little bit confused reading what this project was..

                                                                                                                                                                                    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!

                                                                                                                                                                                    • lynxaegon · 5 years ago

                                                                                                                                                                                      Thanks for this one! I really needed something like this to explore github repos.

                                                                                                                                                                                      • jack_riminton · 5 years ago

                                                                                                                                                                                        Brilliant!

                                                                                                                                                                                        • offtop5 · 5 years ago

                                                                                                                                                                                          I'd love to see this hosted internally and used for code reviews.

                                                                                                                                                                                          Very cool project !

                                                                                                                                                                                          • ghego1 · 5 years ago

                                                                                                                                                                                            This is incredibly cool!!! I don't know to what extent this is affiliated to GitHub, but if it is not it should be definitely bought/incorporated

                                                                                                                                                                                            • whitecrow90 · 5 years ago

                                                                                                                                                                                              Fantastic <3

                                                                                                                                                                                              • DangerousPie · 5 years ago

                                                                                                                                                                                                This made me think that VS Code should really just have a "View Github Repository" option where you paste the URL and it opens something like this, except in the normal desktop app. If you want to be elaborate you could even have support for making changes.

                                                                                                                                                                                              • ddtaylor · 5 years ago

                                                                                                                                                                                                That domain name is probably going to run them in trouble though =/

                                                                                                                                                                                                • nicomeemes · 5 years ago

                                                                                                                                                                                                  This is awesome, would be great if there was a chrome extension or addon for Octotree, so you could click a button to open the repo.

                                                                                                                                                                                                  • mbar84 · 5 years ago

                                                                                                                                                                                                    With the leverage we're all getting out of the Monaco editor component, can somebody give that team at Microsoft a Touring award or something?

                                                                                                                                                                                                    • aflag · 5 years ago

                                                                                                                                                                                                      Really nice! Is there any way to enable light mode? I find dark mode hard to read.

                                                                                                                                                                                                        • AltruisticGapHN · 5 years ago

                                                                                                                                                                                                          How does this compare to Octotree browser extension in terms of main uses?

                                                                                                                                                                                                          • therealmarv · 5 years ago

                                                                                                                                                                                                            Search broken. So what is the benefit?

                                                                                                                                                                                                            • soheil · 5 years ago

                                                                                                                                                                                                              It'd be nice if it could lazily clone the repo in the background so the search functionality would work as more files are indexed.

                                                                                                                                                                                                              • ChrisArchitect · 5 years ago

                                                                                                                                                                                                                this is great/neat but took me awhile to understand what it was from the name. One second implies time of reading or...I dunno it's just confusing/unclear.

                                                                                                                                                                                                                • qwertywert_ · 5 years ago

                                                                                                                                                                                                                  Is it safe to just give this an OAuth token for private repo access?

                                                                                                                                                                                                                  • naqushab · 5 years ago

                                                                                                                                                                                                                    What a nice feature. Octotree[1] is a Chrome extension which does that fantastically. It also supports Enterprise Github in Pro version.

                                                                                                                                                                                                                    [1] https://www.octotree.io/

                                                                                                                                                                                                                    • softmarshmallow · 5 years ago

                                                                                                                                                                                                                      I found github.surf

                                                                                                                                                                                                                      github.surf this works same as github1s, but i like it more for no reason lol.

                                                                                                                                                                                                                      e.g. github.surf/matchabot/matcha-bot