8 ms·
Things you probably don't know about Go (2012) [slides]
- bsaul 7y agoHN-type rant : Guys , it’s 2019 already, why not have a presentation tool that works on mobile browsers ? That talk looks extremely interesting but i can’t browse past slide 4
- daxaxelrod 7y agoAgreed, was impossible to view on mobile. I just switched to desktop though.
- carbocation 7y agoThis article is from 2012 (according to its URL).
- kyrra 7y agoIt's a slide tool written by the Go team, mainly used by them to present at conferences. You'll also notice they've stopped using it as much recently. There was no talks in 2018, and only 1 in 2019. Previous years had many more. List of old talks: https://talks.golang.org/ https://talks.golang.org/ You can actually explore the entire source for the site here: https://github.com/golang/talks https://github.com/golang/talks The specific talk linked on this post is here: https://github.com/golang/talks/blob/master/content/2012/10things.slide https://github.com/golang/talks/blob/master/content/2012/10t... The tool to generate the HTML based on the linked .slide: https://godoc.org/golang.org/x/tools/cmd/present https://godoc.org/golang.org/x/tools/cmd/present
- deleted 7y ago[deleted]
- sbr464 7y agoWhich phone/version are you using? Works on an iPhone if you tap the edges.
- ainar-g 7y agoGitHub issue: https://github.com/golang/go/issues/27026 https://github.com/golang/go/issues/27026. Marked as [help wanted], so if you're a JS/CSS wizard, come send some CLs/MRs/PRs/what-do-they-call-patches-these-days.
- asdfman123 7y agoYou might be able to get it, but first you'll have to convince Robert Griesemer, Rob Pike, and Ken Thompson. Any one of them gets a veto.
- yumraj 7y agoIt's clunky but seems to work on Android Firefox.
- LukeShu 7y ago(2012)
- thefounder 7y agoOther things: reflect.StructOf is broken if you use embedded fields
- ainar-g 7y agoCan't find that in the Bugs section of the documentation of package reflect[1]. Is there a GitHub issue? [1] https://golang.org/pkg/reflect/#pkg-note-BUG https://golang.org/pkg/reflect/#pkg-note-BUG
- thefounder 7y agoThere are various issues/comments(i.e [1] ) but in practice you find out about them when your program crashes. https://github.com/golang/go/issues/15924#issuecomment-455575431 https://github.com/golang/go/issues/15924#issuecomment-45557...
- snagglegaggle 7y agoI'm missing the context for some of these. A lot of them seem obvious, or just thing+unicode? I like the commandline godoc, still dislike gopath. And.. what is the gopher's name?
- willnorris 7y agoFrom https://blog.golang.org/gopher https://blog.golang.org/gopher: The gopher has no name, and is called just the "Go gopher"
- takeda 7y ago> And.. what is the gopher's name? William
- alpb 7y agoIt wasn't all that obvious or popular back in 2012. Many of these patterns have become more popular since then, also in part due to articles like this.
- badrequest 7y agoSome folks were really trying to make the Gopher's name "Gordon", but it never really caught on. The gopher has no name.
- pushpop 7y agoPresumably those people were British and referencing an iconic 90s kids TV character?
- badrequest 7y agoOh neat, TIL about Gordon the Gopher.
- workthrowaway12 7y agoi miss Andrew... haven't seen him talk lately. but anyways, not sure i understand the mock file system slide -- it's still calling os.Open?
- selljamhere 7y agoThe slide demonstrates a concrete implementation of the interface, showing how it can be used to communicate with the real file system. The mock implementation is left as an exercise for the reader, as you and I would likely have different requirements.
- y4mi 7y agoCheck the date in the URL. Might explain your confusion
- perlgeek 7y agohttps://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html > If the title begins with a number or number + gratuitous adjective, we'd appreciate it if you'd crop it. E.g. translate "10 Ways To Do X" to "How To Do X," and "14 Amazing Ys" to "Ys." Exception: when the number is meaningful, e.g. "The 5 Platonic Solids."
- kitd 7y agoTIL. That would explain why a recent submission had the word "How" removed from the front. Was really confused.
- mumblemumble 7y agoI dislike that guideline. This time I clicked, but, in general, I'd rather have the original title, gratuitous adjectives and all, so that I can have a clue that the link is going to lead to a listicle.
- kerkeslager 7y agoI'd like to have those flagged with [Listicle].
- asdfman123 7y agoE.g., Things I Hate About You
- justwalt 7y ago> 6. Mock out the file system Does anyone know if this is possible to do in Rust? I’ve been searching the last couple of days and I think my biggest problem is not knowing what combination of search terms to use.
- arve0 7y agoI went to lib.rs, searched for mock and found this: https://lib.rs/crates/filesystem https://lib.rs/crates/filesystem
- justwalt 7y agoWell, I certainly knew about the filesystem crate before, but never thought to see if it offered this functionality. Thanks for this.
- steveklabnik 7y agoIf your functions take Read or Write, you can pass in something else, like memory, instead. If it doesn’t expose that the whole way up through your test layer that can be tough, of course.
- sneak 7y agoNot an answer to your question, but this is what I use for Go when I need to do this: https://github.com/spf13/afero https://github.com/spf13/afero
- novok 7y agoIn swift you make an interface / protocol that represents your filesystem API and then make an adapter that implements that API to the actual filesystem and swap with a mock when necessary. If the library you are using uses the filesystem directly, then you might need to make a similar interface adapter for the library.
- kerkeslager 7y ago1-7 of these features exist in C#, and in C# you get a real type system. C# isn't even my favorite language that has all these features, just the most mainstream. 8-10 are of dubious usefulness. It seems they break the principle of least astonishment[1], but maybe they're idiomatic in Go. So yeah, still waiting to see any reason to think Go's popularity is anything more than hype and fanboyism. [1] https://en.wikipedia.org/wiki/Principle_of_least_astonishment https://en.wikipedia.org/wiki/Principle_of_least_astonishmen...
- segmondy 7y agoThe article never said, 10 things unique to go. So what's your point?
- kerkeslager 7y agoI never said the article said that. So what's your point? I'm not criticizing the presentation, I'm criticizing Go.
- Spivak 7y agoBecause Go is taking a strong stance that smaller languages are more productive, and I think they’re right. C# has all these features because C# has every single feature and facility that every programming language has ever had thrown into a single ungodly soup of keywords and syntax. Don’t get me wrong, this means C# is bloody powerful but once you involve more than one dev you get into the problems of every dev understanding and/or preferring their subset of C#. Every PR is 50% policing style and structure desperately trying to keep the codebase grokable by everyone and politics about everyone’s favorite pet feature and design pattern. C# rewards cleverness with incredibly slick looking but utterly incomprehensible code unless you wrote it two minutes ago. Not saying Go is the answer or the way but I think it’s scratching a lot of people’s itches for something high level that’s restrictive enough that there’s only one or two “right” ways to accomplish a given task.
- dotancohen 7y agoI never thought that C# would become Perl.
- shurcooL 7y agoThis is a talk from 2012, so I believe the title needs a “(2012)” suffix according to what I’ve seen in the past on HN.
- auraham 7y agosomebody knows how to create slides like that?
- brainzap 7y agoI guess it is this https://godoc.org/golang.org/x/tools/present https://godoc.org/golang.org/x/tools/present