JS Git: working git clones for offline development in the browser
kickstarter.com
kickstarter.com
I honestly doubt this is the case, I would expect more and more kids are getting into programming because it has become so widespread and easy.
Wherever I'm living I go around to schools and groups looking for kids to teach programming to. They all have computers of some sort (mostly iPhones and some tablets), but don't know how in the world they can develop on them. The only way to write native apps for iOS is to buy an apple laptop, get a developer license and learn an advanced programming language. That's beyond the reach of most kids.
Now suppose that new websites popped up using my library and all the kid needed was a device with a modern browser and optionally a bluetooth keyboard? They could learn JavaScript and write webapps. There is huge demand for new programmers in our economy and most kids only see electronics as consumption devices.
Speaking of, my Chromebook just arrived via UPS, now for some fun!
It is pretty burdensome that you do need to have an Apple computer (or hackintosh, or complicated unofficial toolchain) in order to developer for iOS, you actually don't need a developer license to start developing apps. You just open the Mac App Store and grab Xcode these days. You do need the $99 subscription in order to test on a device (very unfortunately), and to publish in the App Store. But in spite of these things, if you're a new developer with access to OSX, iOS development is quite accessible and easy to get started with.
Linus Torvalds wrote a kernel because he bought a PC: hardware which allowed him to do anything he wanted.
Today, smartphones and mobile devices are much more popular among the youth. Could you imagine if Torvalds had been born in 1993? By this point, I'm sure he would have made something much less spectacular than Linux. Maybe he would make some pretty cool Facebook or smartphone games, and maybe a few cool web apps, but the freedom to tinker with hardware directly had been slowly slipping away over the past ~10 years. Since that avenue was becoming less available, there's a chance it wouldn't have grabbed his attention in the first place.
We still have laptops/desktops which aren't locked down. Hopefully that's what the young/future version of Torvalds would have gotten interested in. But how long until you buy a laptop only to find out that it doesn't grant you root access?
One of the main real reasons for Linus's success (other than say his talent) is that there wasn't a good alternative to Linux so even version 0.2 which could barely do anything by today's standards got interest and community involvement.
[1]: https://github.com/e-butik/Gittern/
However, there are technical considerations. For example, pack files can get pretty large (indeed version 2 packfiles supports files > 4 GB), and I doubt browsers are optimized for random access to large files (so you wouldn't have to load the entire file in memory). Another potential problem would be pushing and pulling. The dumb HTTP transport is obviously possible to use (but rarely supported anymore), and the smart HTTP transport should be able to get working, but for implementing the git protocol, or git+ssh you'd need regular sockets, which AFAIK browsers don't provide.
I do however wish the author the best of luck with this project, and since I see that he's here, I will leave with links to a few resources I found useful:
* http://git-scm.com/book/en/Git-Internals
* http://opensource.apple.com/source/Git/Git-26/src/git-htmldo...
* http://www.opensource.apple.com/source/Git/Git-17/src/git-ht...
Even if this library can't be used for everything, it will allow a whole lot more use cases that are currently possible.
The main issue is that Github do not have CORS support for http access to repos (though they do support CORS for access to repos via their proprietary API) and I don't think the other big public hosters like Bitbucket or Google Code support CORS either.
On the subject of big pack files, sure you'd want to stream them to storage instead of trying to store in memory (for instance JGit has this as an option) but I agree Tim that to start with, even supporting small-medium size repos would be a huge win.
(Essentially it's a protocol based on fast-import to allow access a remote repository without cloning or receiving a pack.)
Also, there are proxies for converting TCP into websocket that should work with the Git protocol, and at least Chrome has some kind of native TCP socket from extensions.
0. Why is this a good idea? Have all the desktops and laptops died, and are people forced to use Mozilla OS for development? I'd vastly prefer native applications on iPad, Windows RT, Android and other such platforms (if I suddenly went crazy and decided to do development on them). And a PNaCl application on Chromebook, if that's what you're specifically targeting.
1. Why won't it die like git.js did? [1] Why aren't you working on extending git.js?
2. Where can I see a technical roadmap? You're planning to deflate, applying deltas, huge packfiles with 4G objects in Javascript? What performance guarantees can you make?
3. Git is not a dumb book-keeper where you just checkout, make changes, and checkin. How are you going to replicate what makes git so awesome: `rebase -i`, `filter-branch`, `rerere`, pickaxe, and so many other features?
I know this is a hard project, that's why I haven't done it yet in my free time. I realize that this will require my full-time attention. But click through the links of my other projects in the kickstarter. I'm not new to hard problems and low-level coding in JavaScript.
I don't have a detailed roadmap and I can't make performance guarantees because I don't know yet. But I do know that I'll do whatever is possible within the constraints of a web browser. Again, I'm not new to these constraints. I believe the web is finally mature enough to pull something like this off.
You come off as tyrannically dogmatic without having any real use case- you're poo poo'ing a web platform without any expressed reason for wanting a native stuff aside from it being native. -1. (And, humor, the native stuff exists.)
There's a reason Git is written primarily in C; it does a lot of heavy-lifting, and we want something that performs.
How many kids learning to program on the X or Y website do you expect will miss the 0.3ms extra it took for the site's offline capable web-ide to work? What harm, what badness is there to doing this on the web, and why would you call out a JS implementation up front as negative?
That's really it- I still don't see you having any legitimate grievance besides whatever insane use case you have in mind for yourself and yourself alone needing 4GB crazy town git repos (you, linux, and chrome may indeed have problems). I just don't think that kind of extreme performance concern is where every single project ought start- some other well known programmers and I know it's better to not worry too greatly about performance until you have the problem in the first place. Focus on what can be done first, what good can be created, and then refine that good; don't nip good in the bud because down the road it won't do Y: that's premature man, and not constructive. Can we agree that JS projects like Three.js provide a lot of value, have allowed a lot of cool things to get built that people might not otherwise have made, that at least as importantly many of people might not have seen? Are they slower? Maybe, yeah, probably. My suggested reading here is Steve Wittens, writing about WebGL- there's a niche served, and allow that niche to enrich itself was more or less the take away for me, even though dieties and demigods like @id_aa_carmack might not have immediate use- http://acko.net/blog/on-webgl/
Kinda felt like you ran in here and farted on our rainbows, to twist around your metaphor. The only concern you've stated is performance- let's pretend for a second that it's ok that you're calling it into question before we have any guestimates much less estimates for what performance is going to be- what's your estimate? For 98% of the projects on Git, do you think the performance of a JS git impl is going to be sufficiently fast as to not be problematic? Will it even be a noticeable factor, the speed, compared to cmd line git tools? If those users are happy and feel served, is that ok? Do you have concerns other than performance that I ought take into consideration when considering your expressed concern about this being a JavaScript library?
My question is what is the net benefit of having this? What does it enable us to do? Why should I back it?
(Sadly iPad plus bluetooth keyboard is currently fairly terrible due to a lack of the most basic keyboard shortcuts).
I've wanted this for years and I'm super excited to finally be able to create it when this kickstarter finishes!
If you want to jump on a particular recent buzzword hype bandwagon, you can talk about "Always-online requirements" and how you can fix that.
If he had a git clone in a sandbox he could keep coding; happiness...
.
backed!
This would improve a lot of that kind of thing.
You want a working git implementation in the browser, okay, cool. Why? What for? I don't want to just disparage, I'm genuinely in favour of anything that gets good tools to more people, but I'm completely at a loss at the why from reading the Kickstarter page.
And all this will work anywhere that has a browser, ChromeBook, Surface RT, iPad, etc..
Obviously, it's mostly of use to web developers since JS is the only runtime, but I also have other later projects attacking that problem. But for now, JS only is a pretty big market.
Couple of things, repos can get pretty big, how are you planning on storing things? Using the HTML5 storage? Kicking it down the drive? If it's with HTML5 storage after that guy found a work around allowing sites to completely burn through a drive browser devs might start putting a cap onto the limit of storage that you can use.
I don't know, I'm a big fan of getting tools to everyone, but I'm still wondering if this sounds like a great idea, without actually being a great idea.
EDIT: that last line might be a little overly harsh looking back on it, it's not that I don't think it's a good idea (definitely is!) but I'm wondering if it's a great idea that's worthy of a Kickstarter.
As far as the education aspect, I have future plans to create a new programming language aimed at learning to program that compiles to javascript. Combined with a proper in-browser IDE, this would allow any kid to learn to program on any machine that has a browser.
It obviously won't replace native dev tools, but it will make web-based stuff a whole lot more powerful and that's something I and many others feel is worth paying for.
That said, support away, would love to see Tim get this initiative kickstarted & see what solid work he kicks out.
https://github.com/christkv/node-git is the node-git I had in mind: it's a native (js native) impl modeled strongly after the Grit library used heavily by a little company called Github, and I believe it's in pretty OK state although my first hand experience hasn't made it past the touring stages.
Sorry for the confusion! I knew Tim had a node-git as well, but I didn't know it relied on the binary or other native type stuff (such as a a library binding), so I didn't think the naming collision I let happen would cause any confusion.
Is there anything else I'm missing in my equation?
Additionally, not everyone uses GitHub.
The point is I'll spend the proper time to evaluate all the options and fill in any gaps needed to have a solid solution.
Are there plans?