Live data from Hacker News

Viewing profile — jarrettc

jarrettc

HN member
Joined
Tue, Dec 02, 2014, 4:42 PM UTC
HN karma
96
Public activity
27 items

About jarrettc

No profile information was provided.

Recent public activity

  1. comment
    Comment #10029374

    Yep! That was my inspiration. I'd love to be able to do this in Rust. Soon, hopefully!

  2. comment
    Comment #10028618

    Will the Rust compiler ever understand numbers in types? I.e. will the numbers ever be more than just part of the string that is the type name? If not, then I don't know how possib…

  3. comment
    Comment #10028611

    Great question. I believe each unit struct would need to implement PartialEq or something similar. That would define the canonical nesting order. Alphabetical would make sense. We …

  4. comment
    Comment #10027468

    Lately I've been playing around with static dimensional analysis in Rust. The overall idea is similar: Use PhantomData to add a type parameter and define an empty struct for each u…

  5. comment
    Comment #9607002

    > Hasn't every template language in the world has come to a similar conclusion? No, not even every mainstream template language. For example, I still use ERB and EJS extensively, a…

  6. comment
    Comment #9542558

    I'm skeptical that 3d printed objects could replace very much of what we now obtain from factories. In industrial design, the materials and fabrication process are (supposed to be)…

  7. comment
    Comment #9542429

    > This isn't security through obscurity I don't necessarily disagree. But how, other than through obscurity, does HTML5 DRM inhibit copying, given that the client possesses the dec…

  8. comment
    Comment #9535428

    > Or does it truly rely on blackbox obfuscation? The client ultimately has to decrypt the data somehow. So the key is there on the client. I take it obfuscation is the only thing s…

  9. comment
    Comment #9526431

    Thanks so much for working on the grammar docs! This is much needed and very helpful, considering how quickly Rust's grammar has been evolving.

  10. comment
    Comment #9494014

    Ah, my mistake. So would I be correct in saying that a trait is a type, but it does not necessarily implement the Sized trait, and if it does not, then it cannot be allocated direc…

  11. comment
    Comment #9493525

    Rust has algebraic data types. They're one of Rust's most important features. But algebraic data types do not in themselves provide a way to express the notion of a type with varia…

  12. comment
    Comment #9493504

    I'm hoping the next post will talk about this use case: Suppose I have an enum called "Canine" and I want each of its variants to implement a different "bark" method. Currently, as…

  13. comment
    Comment #9427013

    > I guess it just seems overly ambitious to me.. finding the right abstraction for the server is difficult enough without polluting it with the front-end. Certainly. That's why I'm…

  14. comment
    Comment #9424529

    > The examples you give don't seem to be typing problems, they seem to be wrong-value problems. They're like type or name errors because the "apple" and "orange" here are like iden…

  15. comment
    Comment #9420893

    Strong typing on the web has been an intractable problem for me so far. Sure, I can have strong typing in my server-side code. But so many errors result from the interaction betwee…

  16. comment
    Comment #9369984

    True, but the parent commenter is getting at something important. The article suggests that researchers have found a new, much more concise way to express the solutions to difficul…

  17. comment
    Comment #9344012

    Good to know. Thanks! So I guess the moral is, if you have a big, expensive struct, make sure the expensive part is in a sub-structure you know is heap allocated, such as a Vec. E.…

  18. comment
    Comment #9342347

    Oh, agreed. But how about this: let x = BigExpensiveStruct::new(); some_function(x); That won't trigger a big, expensive memcpy of the BigExpensiveStruct, will it? I'd thought that…

  19. comment
    Comment #9341093

    Yes, I had understood the struct's memory to be on the heap. My thinking was, keeping the memory on the heap allows for inexpensive moves. Whereas, the pointer to the heap space ma…

  20. comment
    Comment #9341070

    > Semantically speaking, the only difference between a move and a copy is that you're allowed to use a copy type afterwards Are you speaking about Rust specifically, or move in gen…

  21. comment
    Comment #9334230

    > It seems to me like the value would be memcpyed, when you pass by value. As far as I know, the compiler should not copy in that instance. Rather, it should move. > There is not o…

  22. comment
    Comment #9329845

    The author mentions that Rust's "Box type is an owning type" and compares Box to C++'s std::unique_ptr. Worth noting: Rust's most basic variable syntax provides unique_ptr-like beh…

  23. comment
    Comment #9329334

    The relative impact of your money vs your time depends in part on your income, you skill-set, and the causes you would choose. A person with a high income but few relevant skills w…

  24. comment
    Comment #9063539

    I've always been uneasy about the fact that Stack Overflow users can edit each other's posts more or less arbitrarily. User A can edit user B's post to say something embarrassing, …

  25. comment
    Comment #9046846

    Even though 1.0 isn't out yet, today you can use Rust for many real projects. I'm unsure whether I'd bet my business on it yet, but I'd be open to the idea. And I'm usually a very …