6 ms·
Apple implementing a spec designed by Microsoft!?!?! Joking, I love that Microsoft came out with LangServ though, felt like something we all should of figured o
by giancarlostoro 8y ago
Apple implementing a spec designed by Microsoft!?!?! Joking, I love that Microsoft came out with LangServ though, felt like something we all should of figured out years and years ago, good thing they wanted to make a cross platform text editor :) I gotta give Microsoft their props, they hire some really smart people who do some great things for the software industry.
Props to Apple for doing this too, I am looking forward towards the next stages for the LangServ v4 spec, not sure what more they could do to make it awesome, but I'm sure there's plenty that could happen in the future in this space.
- the_duke 8y agoYeah it seems so obvious in hindsight: of course a language should have ONE editor-optimized compiler/analyzer for IDE like features, which can be reused by all editors out there instead of building half-baked implementations for each IDE. But many things seem obvious in hindsight.
- nindalf 8y ago> many things seem obvious in hindsight. The best ideas seem obvious in hindsight. I've had the experience of reading some books that explain groundbreaking ideas so well that you feel "shit, that's obvious. I should have thought of that". I think Language Server protocol is similar.
- simias 8y agoIMO the reason this rather obvious idea took so long to be implemented was because on one hand the closed source vendors didn't really have a strong incentive to provide something like that (you support your own ecosystem and let the others deal with theirs) and on the other the open source community was spread across many compilers and interpreters which made standardizing difficult. The only project I can think of with enough clout to impose a system unilaterally was GCC, which was notoriously hard to extend and modularize (especially before LLVM started shaking things up a ~10 years ago). So overall the effort to create a protocol and then getting everybody to accept it was rather huge and the chances of success rather slim. It's great that MS finally decided to do it and the huge popularity of VScode (especially with younger coders) seems to have helped a lot.
- jerrysievert 8y agothe funny thing is that gcc was pretty easy to extend before the eggs split. unfortunately, it was also pretty stagnant and nowhere near as good of a compiler suite as it is today.
- Erwin 8y agoI recall the lack of extensibility in gcc being deliberate, according to RMS -- he wnated everything around gcc to be free, and plugins would allow for non-GPL or even closed source code.
- weberc2 8y agoDeliberately harming your users to own the corps. Jokes aside, open source is great, but RMS’s perspective is extreme. I don’t think it’s an exaggeration to say that the overall quantity and quality of open source software is much greater because of closed source software because companies fund open source initiatives with profits from closed source initiatives and then the second order effects of maintaining a huge pool of professional programmers, some of whom use their skills to contribute to OSS.
- mhermher 8y agoNo one should make money selling software. Beg for donations or sell ads if you need to pay your bills. Or get a cushy university appointment like me, and spend your days polemicizing about freedom.
- weberc2 8y agoThat's your moral view, but you missed my point which is that it's incompatible with a florishing ecosystem of open source software.
- deleted 8y ago[deleted]
- zozbot123 8y ago
- ken 8y agoIt sounds pretty much like Steve Yegge's Grok project (now "Kythe") from over a decade ago. They just started at a different use case.
- oaiey 8y agoThe key element was Andreas Heijlsberg work on the Roslyn C# compiler which exposed all stages as APIs (e.g. AST etc). He calls the dragon book as significant outdated when it comes to modern compilers (Channel9 video). That then transferred to TypeScript, which again influenced VS Code. OmniSharp was then externalizing it. In VS Code I think Erich Gamma took it over and put it into standardized a protocol.
- SneakerXZ 8y agoI wish there was a book that teaches how to create a programming language based on the Roslyn idea.
- LameRubberDucky 8y agoWell that's great to know. I just bought the dragon book. Is there a better book out there?
- pjmlp 8y agoIt is still a pretty damm book to read about compilers, if not anything else, at least from historical perspective. The Tiger book, "Compiling with Continuations" and "Lisp in Small Pieces" are some of my favourite ones. Then if you want to learn about language semantics validation, "Formal Syntax and Semantics of Programming Languages: A Laboratory Based Approach".
- pjmlp 8y agoThe Tiger book is a better reference nowadays. Another good alternatives are "Compiling with Continuations" and "Lisp in Small Pieces".
- mikece 8y agoKinda like Google dropping an in-house language to use TypeScript -- designed by Microsoft -- as the language for building their JavaScript UI framework. :-)
- giancarlostoro 8y agoThat's one thing I always find a bit funny. There's swarms of developers who love TypeScript over regular JS. Personally I rather use whatever is default first, but that's just me. If you wanna pay me to do TypeScript cool I'll use it.
- purple_ducks 8y agoClojure community pretty much had it solved for clj & cljs with nRepl & cider-nrepl & co.
- tux1968 8y agoDid that help someone who wanted to work on clj or cljs inside Vim for instance? It's not really a comparable solution until it's multi-language, multi-editor, cross-platform, and supported by many different teams and communities.
- purple_ducks 8y ago> Did that help someone who wanted to work on clj or cljs inside Vim for instance? Yes, it did. from https://github.com/clojure-emacs/cider-nrepl#editor-agnostic https://github.com/clojure-emacs/cider-nrepl#editor-agnostic > Projects like vim-fireplace and vim-replant are making use of cider-nrepl already.
- simonh 8y agoFor me the takeaway is that Apple is _really_ serious about supporting the use of Swift outside their own ecosystem. After all XCode won't be using this, at least for a while, so clearly it's aimed at making it easier to use Swift outside their own tool chain.
- cm2187 8y agoIt seems to be a very un-Apple thing to do. Do you know why they would want to push it?
- wlesieutre 8y agoGet more people using Swift serverside perhaps? I can imagine that having a swift backend for your swift mobile app would be a lot nicer to work with than converting back and forth from a bunch of stringly-typed JSON.
- kitsunesoba 8y agoYes, this is it precisely. Swift already has decent momentum for serverside usage with Vapor, Perfect, and Kitura among others. By adding LSP support, Apple is adding to that momentum and pushing it closer to critical mass.
- MR4D 8y agoI'd love to use Swift on the backend, but I don't want to use XCode. I only develop part-time, as my main job is financial in nature, but god, it is really hard to find good learning material for serverside without depending on XCode. In particular, learning the server frameworks is almost not worth it. By using one language, I can keep my productivity acceptable. If anyone has any references, I'd be super thankful!
- flafla2 8y ago> stringly-typed JSON Off topic but I love this, definitely stealing it. Did you coin this?
- wsc981 8y agoI am guessing OmniSharp [0] is based on this LangServ protocol? I tried OmniSharp last year and a few years prior to that, since I wanted to develop in C# using SublimeText. I can only say that both times it's been a depressing experiment. It seemed the OmniSharp server was really buggy and kept crashing. --- [0]: http://www.omnisharp.net http://www.omnisharp.net
- josteink 8y agoI think it’s the other way around: LSP was based on ideas prototyped by omnisharp. I used it years before LSP was announced.
- ken 8y ago> Apple implementing a spec designed by Microsoft!?!?! Not new at all. They support AJAX in Safari. Macs use SMB for file sharing.
- coldtea 8y agoAnd they support MS Office files formats in Pages and Numbers...
- giancarlostoro 8y agoI did say I was joking, but yeah, I love that AJAX was basically reverse engineered from IE.
- aaaaaaaaaab 8y ago>Apple implementing a spec designed by Microsoft!?!?! Mind you, the current recommended file sharing protocol on macOS is SMB. (since Apple have deprecated AFP)
- ackfoo 8y agoReally? Then why doesn’t it work?
- aaaaaaaaaab 8y agoThey’ve added some Apple-specific extensions to SMB, which can result in suboptimal performance when browsing non-Apple hosts. https://lists.samba.org/archive/samba-technical/2014-September/102422.html https://lists.samba.org/archive/samba-technical/2014-Septemb...
- Asooka 8y ago> something we should have figured out years ago I actually blame Stallman for that. He insisted that GCC should not dump any AST or provide embeddable functionality so that actors like Apple wouldn't be able to build nonfree software on top of it. However, that meant you also can't build any free tools on top of it, so everyone was forced to make their own ad-hoc C++ parsers and analysers. Once clang appeared there were much higher quality tools available. There's rtags that's a sort of proto-langserv implementation for C++ from before Langserv was a thing. I suspect Stallman's decision was right at the time, but it did hold back free tools.
- giancarlostoro 8y agoDo you have a link to such a proposal being put down by rms? Curious about this.
- bitwize 8y agoWe did figure it out years ago; it's called Swank (for SLIME). While it was intended for Lisp dialects, there's also an implementation for JavaScript. LSP is Swank for other kinds of languages, and is certainly welcome, but neither the idea nor successful implementations of that idea is new.