[HN Gopher] Github1s - One second to read GitHub code with VS Code
___________________________________________________________________
Github1s - One second to read GitHub code with VS Code
Author : tardismechanic
Score : 1554 points
Date : 2021-02-09 23:26 UTC (23 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| ibraheemdev wrote:
| 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 wrote:
| Very useful, thanks. This will also be handy as a browser plugin
| - like click on an icon to switch to vscode view.
| mrec wrote:
| Don't think it needs a plugin, could just be a one-liner
| bookmarklet e.g.
|
| javascript:window.location.host = "github1s.com";
| eyelidlessness wrote:
| 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
| Garbage wrote:
| This is brilliant.
|
| 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)
|
| https://codesandbox.io/docs/importing
| gremlinsinc wrote:
| godda*n this could've saved me so much time... thanks though!
| zaptheimpaler wrote:
| How does this magic work? Does VS Code run completely in the
| browser?
| brailsafe wrote:
| 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 wrote:
| I mean, it already basically does
| gunn wrote:
| https://github.com/Microsoft/monaco-editor
| exikyut wrote:
| (Electron = Chromium minus tab bar and window borders)
| momothereal wrote:
| 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 wrote:
| 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 wrote:
| 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.
| [deleted]
| gspr wrote:
| 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.
| mschuetz wrote:
| 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.
| lostintangent wrote:
| 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 wrote:
| 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".
| soheil wrote:
| 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.
| samzer wrote:
| 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 wrote:
| 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 facade of a familiar tool.
|
| A "personal private repository" isn't code that you've never
| seen or are unfamiliar with.
| janpot wrote:
| 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.
| BorisEm wrote:
| My organization has hundreds of private repos. It would be
| great to use this tool to explore those.
| kjakm wrote:
| +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.
| rmorey wrote:
| SourceGraph? https://about.sourcegraph.com/
| naikrovek wrote:
| Note the "personal" qualifier in the comment.
| whitecrow90 wrote:
| Fantastic <3
| haskellandchill wrote:
| 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.
| drusepth wrote:
| 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...
| [deleted]
| progval wrote:
| 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 wrote:
| 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 wrote:
| 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.
| jack_riminton wrote:
| Brilliant!
| qbasic_forever wrote:
| 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
| lxe wrote:
| 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.
| heyoo wrote:
| So surely, it will never make money. :(
| forgotmypw17 wrote:
| why is that a sad face? do things have to earn money to have
| any worth?
| pestaa wrote:
| 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.
| worldsayshi wrote:
| If it doesn't make money but need to run infrastructure
| it's not likely to live for very long?
| stjo wrote:
| 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 wrote:
| 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.
| blocked_again wrote:
| def do_things_have_to_earn_money_to_have_any_worth(dev:
| Developer) -> bool: if
| dev.strong_financial_background(): return
| False return True
| blocked_again wrote:
| It can make a shit ton of money through programming job ads.
| yarcob wrote:
| Good point. I think most people aren't aware that it costs
| EUR500 - EUR1000 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)
| stanislavb wrote:
| This one is amazing. I've cloned so many repos locally with the
| only reason to explore them with the comfort of VS Code.
| dingran wrote:
| Yeah, I do the same. I feel the thing that's missing is
| navigate to definitions/declarations (cmd+])
| beermonster wrote:
| Yup. T'is pretty good indeed. I have told world+dog.
| soenkeliebau wrote:
| This, so much this!
| news_hacker wrote:
| 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 wrote:
| Nothing obvious. I've found Cmd+Shift+P, then delete the >
| character, works extremely well in place of Cmd+P.
| ollysb wrote:
| It appears to only work for files which have already been
| opened.
| arebhaibhai wrote:
| > I really wish it had Cmd+P support for searching for
| project files.
|
| Works for me. CTRL+P on Linux though.
| [deleted]
| perryizgr8 wrote:
| > 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 wrote:
| Github allows you to search through repositories as long
| as they're not forks.
| perryizgr8 wrote:
| 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.
| soenkeliebau wrote:
| 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, ..."
| imron wrote:
| And as long as you're not trying to do a case-sensitive
| search.
| KerrickStaley wrote:
| 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 wrote:
| 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 wrote:
| If anyone is looking for actually useful cross-repo
| search: https://grep.app/
| Ayesh wrote:
| This is great, thank you.
| nightpool wrote:
| 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)
| rkangel wrote:
| > 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.
| flanbiscuit wrote:
| Confirmed CMD+P just worked for me on mac.
|
| Shift+CMD+P does not but without Shift it works
| visarga wrote:
| > Am I missing something obvious?
|
| Better search, find definition, ...
| chrisshroba wrote:
| 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 wrote:
| Search appears to only work once the files are cached, if
| you open a file then close it, search will find it.
| Brian_K_White wrote:
| 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.
| chrisshroba wrote:
| Ah, makes sense! Thanks!
| crazypython wrote:
| 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
| sudeepj wrote:
| Agreed. This also demonstrates: Does one-thing and does it
| well.
| alpb wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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 wrote:
| 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.
| mrmonkeyman wrote:
| It wraps an existing browser app in a, wait for it, browser.
| What in this repo is tier1? The wrapping of existing code?
|
| The app is an unremarkable text editor.
|
| The bar needs to go up, not down people.
| stevetodd wrote:
| Holy smokes--worked fast and smooth on my phone too! Well done!
| DangerousPie wrote:
| 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.
| robenkleene wrote:
| If you have the Visual Studio Codespaces extension installed
| (https://marketplace.visualstudio.com/items?itemName=ms-
| vsonl...), then GitHub Codespaces
| (https://github.com/features/codespaces currently in beta) gets
| you a workflow pretty close to this.
| rnotaro wrote:
| I wish it was available for orgs private repos.
| soheil wrote:
| It is shocking to me to read the number of comments saying how
| this is tier 1 UI and how amazing of a job the author has done
| with the UX and comments praising the UI/UX. Wtf happened to HN?
| This is a fucking wrapper around an open source text editor,
| there is zero UI by the author.
| jayd16 wrote:
| UX is not just UI.
| schrute wrote:
| > Wtf happened to HN?
|
| > This is a fucking wrapper around an open source text editor
|
| People like you are no longer receive attention for shouting
| and throwing a tantrum. You and your negative comments are
| drowned out.
|
| So, what happened to HN? It has improved. Hop aboard and take a
| swig of positivity buddy.
| slingnow wrote:
| He's commenting on the fact that no one here seems to
| understand the author did ZERO UI/UX WORK. He wrapped an
| existing tool.
|
| Made something incredibly useful, but wrapped an existing
| tool. The praise is completely misguided.
|
| I prefer a world where people get praise for something
| praiseworthy. Not an army of people who say things like "take
| a swig of positivity buddy".
| Splendor wrote:
| In that case, I regret that I'm unable to offer you praise
| for your comment.
| johnfn wrote:
| I think that the loading speed is really a technical
| achievement. I don't even know how it's possible when just
| executing a git clone of a repository can take upwards of 10
| times longer than what this website is capable of. Let alone
| the rest of the work of getting those files into the vscode
| editor. Even if he just pointed it at GitHub- GitHub itself
| loads slower than this!
|
| On the other hand, I agree that a lot of people seem to think
| that OP has recreated vscode from scratch, which seems to have
| led to a lot of over the top praise. "Obviously" this is just
| an embed of the Monaco editor, which is still very cool mind
| you, but not a towering UX achievement or anything.
| dstaley wrote:
| If you open your browser's network panel, you can see the
| secret sauce here: GitHub's API. Each time you open a file,
| the UI makes a request to GitHub's API for the content.
| That's why it's dramatically faster than cloning a repo;
| instead of pulling the entire history of the repo upfront, it
| dynamically requests only the files viewed.
| soheil wrote:
| So I guess this explains why search doesn't work as
| expected.
| icholy wrote:
| wtf are you talking about? I don't see any comments praising
| the author for writing the UI.
| zufallsheld wrote:
| See this top level comment:
| https://news.ycombinator.com/item?id=26087077
| icholy wrote:
| One comment that's not even on the first page of comments.
| Splendor wrote:
| I'm sorry you're having a bad day.
| lifeplusplus wrote:
| would be cool if you could fork the repo and make pr
| wly_cdgr wrote:
| That was more than one second. Fail.
| yutsun wrote:
| Gou Li Guo Jia Sheng Si Yi ,Qi Yin Huo Fu Bi Qu Zhi
| S0und wrote:
| This link showed up on /r/programming yesterday. Everyone is
| freaking out that the domain is registered from China.
|
| https://www.reddit.com/r/programming/comments/lfpngg/explore...
|
| hackernews doesn't seems to care, which is ironic in many levels.
| apples_oranges wrote:
| 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?
| offtop5 wrote:
| I'd love to see this hosted internally and used for code reviews.
|
| Very cool project !
| reustle wrote:
| 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).
| gbraad wrote:
| Gitpod.io using Theia.
|
| And coder.com using code-server
| bdcravens wrote:
| You're thinking of coder.com.
|
| 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:
|
| https://github.com/cdr/code-server
| reustle wrote:
| Thank you, according to https://coder.com/pricing
|
| > 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...
| judge2020 wrote:
| Or, the GitHub feature page itself (same feature as the one
| you linked via microsoft.com):
|
| https://github.com/features/codespaces
| est wrote:
| This would break some github's geo-blocking repos.
| sergiotapia wrote:
| 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
| qbasic_forever wrote:
| Github already has that feature, every repo has an "Edit in
| Codespaces" button to press:
| https://github.com/features/codespaces
| krrrh wrote:
| It's still in early access, so most of us don't have it yet.
| _pmf_ wrote:
| Why not make GitHub fast? Why do I have to use an editor
| embedding a web browser instead of using a web browser?
| spark3k wrote:
| This is brilliant. Should be a core part of GitHub
| randompwd wrote:
| No it shouldn't. IDEs come and go.
| baby wrote:
| 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!
| AltruisticGapHN wrote:
| How does this compare to Octotree browser extension in terms of
| main uses?
| wrboyce wrote:
| 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}" }
| jeffreygoesto wrote:
| Why not "--single-branch" when cloning? Couldn't it speed up
| cloning if there are many branches?
| Tobu wrote:
| --depth=1 (shallow clone, and implies --single-branch)
| thepete2 wrote:
| 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 wrote:
| Gitpod.io
| jasonlfunk wrote:
| I love this, thanks.
| jonas_kgomo wrote:
| This is similar to the idea of Codespaces from Github
| https://github.com/features/codespaces
| jcul wrote:
| Amazing. It even works great on my phone. This is one of the best
| things I've seen on hacker news.
| Gehinnn wrote:
| 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
| [deleted]
| maddyboo wrote:
| If you're more of a vim person, check out firenvim:
|
| https://github.com/glacambre/firenvim
| outadoc wrote:
| That looks awesome, thanks! Doesn't look like it supports
| GitHub Enterprise instances though?
| Gehinnn wrote:
| 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!
| snak wrote:
| Looks great, I'll give it a try. Thanks for sharing!
| dairylee wrote:
| 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 wrote:
| That is a cool project, thanks for sharing!
| GSGBen wrote:
| This would be incredible on Trello!
| Gehinnn wrote:
| I never used Trello, what would make this great there?
| Shouldn't be too hard to implement!
| faeyanpiraat wrote:
| 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.
| Jarred wrote:
| 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.
| shawnz wrote:
| Codespaces gives you a VM in which you can debug your
| application, but this service does not appear to do that.
| naikrovek wrote:
| Monaco is just the extensible text editor, right? Nothing else,
| I thought.
| qbasic_forever wrote:
| 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 wrote:
| Right. That can be done because this is specifically _only_
| for reading code with a VSCode interface.
| vemv wrote:
| 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.
| ghego1 wrote:
| 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
| breck wrote:
| 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.
| momothereal wrote:
| Except for branches with slashes in them...
| https://github.com/conwnet/github1s/issues/22#issuecomment-7...
| cjohansson wrote:
| 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
| spockz wrote:
| 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 wrote:
| Editing is not a feature yet, even on desktop. That's why
| your virtual keyboard doesn't appear.
| eyelidlessness wrote:
| 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 wrote:
| 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.
| miki123211 wrote:
| This is amazing for accessibility. Github's own interface is
| kinda meh with screen readers. This is much better.
| metahost wrote:
| Could not get it to work with private repos even after using an
| API token, is it supported?
| beyti wrote:
| Same here, that would be a really useful thing for my
| organization.
| swashbuck1r wrote:
| 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)
| akmittal wrote:
| Github has Codespaces in early release
| (https://github.com/codespaces/), but much faster
| thundergolfer wrote:
| 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.
| mizzao wrote:
| That gives a 404.
| sodality2 wrote:
| https://github.com/features/codespaces is the info page
| twsted wrote:
| You need to be invited to try
| spion wrote:
| 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!
| geniium wrote:
| Really nice product
| Jarred wrote:
| 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...
| bewareandaware wrote:
| 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?
| madeofpalk wrote:
| 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
| kaladin_1 wrote:
| 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 wrote:
| Because this is literally the vscode editor (monaco?) pointed
| to the github repo, with a github fs backing?
| bilekas wrote:
| 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!
| mtlynch wrote:
| 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 wrote:
| It looks like search only works for files that are currently
| open.
| gbraad wrote:
| 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 wrote:
| 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 wrote:
| If you want more, use gitpod.io
| dstaley wrote:
| 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 wrote:
| 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 wrote:
| 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.
| onetom wrote:
| > ...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 wrote:
| 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 wrote:
| 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 wrote:
| > 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 wrote:
| > _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.
| RMPR wrote:
| > 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 wrote:
| 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.
| shrimpx wrote:
| 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 wrote:
| > 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.
| nicomeemes wrote:
| 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.
| chii wrote:
| 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.
| abalone wrote:
| 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 wrote:
| 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.
| ChrisArchitect wrote:
| 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.
| the_arun wrote:
| Pretty cool, but I would assume this depends on internet speed
| for left nav items? no?
| lynxaegon wrote:
| Thanks for this one! I really needed something like this to
| explore github repos.
| funman7 wrote:
| Yes I need this for bitbucket.
| funman7 wrote:
| Yes I need this in my life, for Bitbucket.
| vemv wrote:
| 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 wrote:
| Afaik raw.githubusercontent.com was third party as well and
| lived for a very long time.
| carlosperate wrote:
| How did it end up being absorved by GitHub? The "raw" button
| in the file views use that domain now.
| jkcxn wrote:
| That's official, you're thinking of https://rawgit.com/
| mbar84 wrote:
| 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?
| bachmeier wrote:
| While this is a move in the right direction, Gitlab has had a
| similar feature for years, and it's not read-only.
| dtrailin wrote:
| How does this feature work on Gitlab? Can you link a doc? Is it
| VS code as well?
| qbasic_forever wrote:
| See: https://docs.gitlab.com/ee/user/project/web_ide/ It's a
| lightly re-skinned version of the monaco code editor that VS
| code also uses. It looks and feels like VS code.
| ddtaylor wrote:
| That domain name is probably going to run them in trouble though
| =/
| blackoil wrote:
| 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.
| therealmarv wrote:
| Search broken. So what is the benefit?
| aflag wrote:
| Really nice! Is there any way to enable light mode? I find dark
| mode hard to read.
| rahulpadalkar wrote:
| This is insane!!!!!!!!!!!
| avipars wrote:
| not sure the benefit, but it does work well
| CreepGin wrote:
| Can private repos be supported in any way?
| jakereps wrote:
| 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).
| [deleted]
___________________________________________________________________
(page generated 2021-02-10 23:02 UTC)