20 ms·
How Rust Gets Polymorphism Right [video]
- hmottestad 9y agoWatching this recording I really wished they would invest more in audio equipment and in people who know how to record it. Reminds me of a lecturer at uni who had a bunch of recorded quest lectures that he would show every year. Audio on those was terrible, constantly clipped sound, but when we complained he said he couldn't hear anything wrong.
- MHordecki 9y agoThis is why text articles are superior to videos - or at least an accompanying transcript. Text is very hard to mess up.
- chrismorgan 9y agoU+1F928 FACE WITH ONE EYEBROW RAISED (Interpretation of that raised eyebrow: text isn’t hard to mess up. It is nonetheless more accessible in general, I just couldn’t leave the “text is very hard to mess up” unremarked on.)
- scrumper 9y agoYour counterpoint example to the proposition that text is hard to mess up is... a picture? Edit: or have I completely missed the point of what you're saying!
- kbenson 9y agoIt's a picture as much as any particular character in a font is, which is to say, it is. We're just very used to recognizing particular variations and combinations. There's one problem here that can be expressed in two ways, one is a proliferation of many new characters which people may not know the idiomatic usage of until they've encountered it in more context, the other is new combinations of known characters and words into a new idiomatic usage that has the same problem. Consider that there was a time not so long ago where the vast majority of people didn't know what LOL meant and would be confused when encountering it. On the other end you could probably copy some heavy British slang in here right now and I would be very confused.
- chrismorgan 9y agoMy response was simply a raised eyebrow. It wasn’t a counterpoint. The fact that it was open to several additional interpretations merely suited my sense of humour.
- IshKebab 9y agoI would disagree for research - text is usually in the form of papers. When you're writing a paper there's a strong incentive to make sound it as complicated as possible so very few papers are easy to follow. Giving a presentation though there isn't such an incentive and the goal is more explicitly to explain your idea rather than to prove how clever it is. So I find presentations easier to follow in general (unless they are a bad speaker, of which there are unfortunately many).
- jldugger 9y agoHonestly, I would be happy to see a podcast / Youtube series come out that finds quality tech talk speakers, and polishes them up to TED level: concise 20 minute videos, with top notch audio, well rehearsed presenters and informative content.
- enturn 9y agoHave a look at InfoQ website. I've watched lots of great tech presentations on there. Also Gary Bernhardt from Destroy All Software.
- jldugger 9y agoInfoQ looks like they just recorded your typical conference presentation. Most of the videos I'm seeing are 2x the length I'm talking about, and are half vendor pitch. Destroy all software is closer, but is kind of like one guy. Great for him! And for me on my flight here in a few minutes. But what I envision is more like training speakers to be concise and engaging yet informative. Kinda like how an editor helps a writer cut out things to make a better novel, but for tech talks. A tall order, I know.
- agumonkey 9y agoThat always makes me crazy; how a "simple" thing like sounds makes a talk useful or unbearable. I always fantasize about a collaborative app that would blend a few smartphone audio recordings to cancel noise and room reverb into a nice vocal signal.
- steamer25 9y agoThe app seems pretty feasible. There'd probably be some issues with having to periodically resync the timing due to moving microphones or other skews coming in and out of phase but I don't imagine that'd be insurmountable. The bigger trick would be getting various parties at any given event to help out by first recording and then submitting their data to the same collaboration service. I've seen enough rooms full of techies struggling to get a projector or conference call working to imagine all kinds of headaches with connectivity, app installation, finding the right event reference, etc. If you allow post-event submission, most people would probably forget or not care by the time they got back to their home networks only to be annoyed weeks or months later that they still have a large audio file taking up space on their device. As more people are posting various captures (just for personal-reasons/vanity, without necessarily going out of their way to prescribe any particular remix), maybe something like PhotoSynth where you crawl the web for media having similar GPS and timestamps could work. Maybe people could be bothered to tag their posts with hashtag #YetAnotherCon2017; then you just have to monitor a couple of the more popular social channels.
- agumonkey 9y agoWith accelerometer you may have enough to recalibrate. About cooperation, I'm sure it's not hard to find 10 people willing to contribute. You can even count the people talking or organizers.
- IshKebab 9y agoPretty sure that already exists. Maybe not in a production app but I bet there are lots of PoCs. Here's one for example: https://twei7.com/papers/Sur_Wei_MobiSys14_Dia.pdf https://twei7.com/papers/Sur_Wei_MobiSys14_Dia.pdf
- myst 9y agoI’d love to see comparison between Rust and Haskell/ML WRT polymorphism. I wonder if “gets right” would appear there and on what side.
- jmcomets 9y agoApples & Oranges. Although Rust heavily borrows from the ML family, the fact it has mutability and imperative reasoning makes it hard to compare them. But if you want a short one: - Sum Types EDIT: AND Product Types (silly me) - function-objects & closures - typeclasses (as far as I can tell), but no higher kinded types - no monads, functors nor monoids built-in - trait objects (eg. runtime polymorphism, think "abstract classes")
- ketralnis 9y ago> - Sum Types but no Product Types Maybe I'm missing something, but aren't tuples and structs/records examples of product types? Which both rust and haskell have?
- mathw 9y agoYes I always thought tuples were the archetypal product type, which is why in some ML dialects they're notated as "Type1 * Type2". Rust most certainly has them, as does Haskell. Records/structs of course are just the same thing with names for the components. Thus, even Java has product types.
- masklinn 9y ago> Thus, even Java has product types. Even C has product types. Which is why I'm always bothered when people claim language X lacks algebraic data types. They probably lack sum types, but are very unlikely to lack product types.
- beojan 9y agoC also has sum types with unions (though without any indication of which of the alternatives is actually present).
- vim_wannabe 9y agoThere is a rumor[1] even Rust has yet to get polymorphism right: >I'm using nalgebra for math. I'll write a bit about it here, because I think it's relevant to Rust as whole. I'm not sure if I actually like it. It's so heavily templated that most of the error messages are impossible to understand, so I usually just double-check what I wrote and try to guess what's wrong. It's also where rust's documentation generator gets in trouble. Signal to noise ratio there is <10%. Not sure how to fix that. Anyway, my point is that maybe it's not always the best idea to write code as generic as possible. [1]: https://www.reddit.com/r/rust/comments/795dg4/i_spent_the_last_year_writing_a_plant/ https://www.reddit.com/r/rust/comments/795dg4/i_spent_the_la...
- deleted 9y ago[deleted]
- andolanra 9y agoTo be clear, the paragraph you're quoting is criticizing one specific library (the naglebgra library) which overuses traits. In context, that quote is about the temptation of writing super-polymorphic code in Rust, and not strictly a complaint about Rust's specific implementation of polymorphism. I'm not at all convinced that the argument made by the video is somehow contradicted by the fact that Rust still lets you write unnecessarily polymorphic code.
- chrismorgan 9y agoSuch heavy use of traits can allow you to do things that would otherwise have been impossible or less efficient—there are advantages to it. But they definitely come at a cost.
- chrismorgan 9y agoThose criticisms are mostly of the way rustc outputs errors (it is definitely open to improvement, and notable improvements are made every few months) and how rustdoc shows generics (automatic generation of such things can’t really work well; there are ways that it could probably be improved, but they’re hard enough that no one has tried any of them that I know of). Of course, the UI is a part of Rust, so these things do matter, but as far as the language implementation is concerned, it’s not as bleak as all that. Rust, being a comparatively complex language (unlike Go, for example, where linguistic simplicity is a feature) is taking a long time to mature, but it is steadily maturing.
- leshow 9y agoIt makes me smile that this type of programming is starting to influence so many things. You see it even in Swift with 'protocols' and 'extensions'. Typeclasses are a fantastic method of abstraction. I remember watching a video on Rust's history and they said that some time during Rusts development a bunch of haskellers joined and the current traits and ownership system was born (I'm sure I'm oversimplifying here)
- lmm 9y agoI'm glad that it's happening, but at the same time I'm frustrated that it's taken 20+ years to adopt a limited subset of what Haskell had.