Staross's recent activity

  1. Comment on How Instagram uses static analysis like linting and automated refactoring to help manage their multi-million-line Python codebase in ~comp

    Staross Link Parent
    Probably a lot of spaghetti code, and ads.

    Probably a lot of spaghetti code, and ads.

  2. Comment on What are some healthy convenience foods/recipes? in ~food

    Staross Link
    In France people often just eat bread with whatever (cheese, bread, jam, ...), alongside a salad or a soup. You can throw almost any veggie in a salad or a soup. Sometimes you can find precooked...

    In France people often just eat bread with whatever (cheese, bread, jam, ...), alongside a salad or a soup. You can throw almost any veggie in a salad or a soup. Sometimes you can find precooked lentils, red beets, etc in grocery stores (check for additives like salt though).

    Muesli with some yogurt, fruits, etc. is also pretty easy.

    4 votes
  3. Comment on Self-blinding microdosing study, open to participation in ~science

    Staross Link Parent
    Yeah, it would work better with a commercial product that everybody can have access to in the same way.

    Yeah, it would work better with a commercial product that everybody can have access to in the same way.

    1 vote
  4. Comment on Self-blinding microdosing study, open to participation in ~science

    Staross Link
    Interesting, I've looked at the instruction video and the protocole seems to be well designed. Following this principle all kind of open studies could be ran, although I doubt many people have the...

    Interesting, I've looked at the instruction video and the protocole seems to be well designed. Following this principle all kind of open studies could be ran, although I doubt many people have the discipline to follow with the procedure.

    2 votes
  5. Comment on Julia in ~comp

    Staross (edited ) Link
    The map(c, a.array) allocates an array, you can use the dot-broadcasting syntax instead of map c.(a.array), and then fuse everything in a single line, with the @. macro. The advantage is that it's...

    The map(c, a.array) allocates an array, you can use the dot-broadcasting syntax instead of map c.(a.array), and then fuse everything in a single line, with the @. macro. The advantage is that it's clear from the syntax alone that all operations are element wise, so the compiler can easily fuse them in a single loop.

    out = @. c(a.array) * c(b.array)
    

    There's also no need to do a type assertion on the return type here, since you explicitly return a type already.

    function mul(a::QArray{Int8}, b::QArray{Int8})
        c = x -> convert(Int16, x)
        out = @. c(a.array) * c(b.array)
        QArray{Int16}(out, a.scale * b.scale)
    end
    

    Finally, you could make your function more generic:

    function convert_and_mul(::Type{O}, a::QArray, b::QArray) where O <:Integer
        c = x -> convert(O, x)
        out = @. c(a.array) * c(b.array)
        QArray{O}(out, a.scale * b.scale)
    end
    
    convert_and_mul(Int32, A, B)
    

    Note that people would typically let the type promotion system to automatically deal with these kind of conversions (if you multiply an Int8 and an Int16 it returns an Int16, i.e. Base.promote_type(Int8, Int16) == Int16).

    edit: fixed some bugs in my example

    2 votes
  6. Comment on Is anyone actually happy they were born? in ~talk

    Staross (edited ) Link
    Sure, personally I like the tragic, so even if I have a shitty life, I find that quite beautiful. I recommend to embrace it.

    Sure, personally I like the tragic, so even if I have a shitty life, I find that quite beautiful. I recommend to embrace it.

    Tragedy (from the Greek: τραγῳδία, tragōidia[a]) is a form of drama based on human suffering that invokes an accompanying catharsis or pleasure in audiences.

  7. Comment on What have you been listening to this week? in ~music

    Staross (edited ) Link
    The last Leprous, I'm not super fan of the style, but it's super catchy after a few listen. It would probably make a good travel album.

    The last Leprous, I'm not super fan of the style, but it's super catchy after a few listen. It would probably make a good travel album.

  8. Comment on What have you been listening to this week? in ~music

  9. Comment on What games have you been playing, and what's your opinion on them? in ~games

    Staross Link
    Dota 2 mostly, with the international starting next week I needed to get back into it a bit. I'm playing mostly Turbo these days but it's still a great game.

    Dota 2 mostly, with the international starting next week I needed to get back into it a bit. I'm playing mostly Turbo these days but it's still a great game.

    1 vote
  10. Comment on Brad and Claire Make Doughnuts Part 1 | It's Alive in ~food

    Staross Link Parent
    I disliked it, kept skipping ahead for the rare cooking bits.

    I disliked it, kept skipping ahead for the rare cooking bits.

    2 votes
  11. Comment on What have you been watching / reading this week? (Anime/Manga) in ~anime

    Staross Link
    Gunnm Last Order, I'm liking it so far, there's some really good bits (the part with the vampire lady).

    Gunnm Last Order, I'm liking it so far, there's some really good bits (the part with the vampire lady).

    2 votes
  12. Comment on Suggestion: a method for anonymous appreciation at the user level in ~tildes

    Staross Link Parent
    I think this should be integrated into some kind of "trust" system, that could later be leveraged for distributed moderation (trusted users would be able to perform some limited moderation tasks,...

    I think this should be integrated into some kind of "trust" system, that could later be leveraged for distributed moderation (trusted users would be able to perform some limited moderation tasks, e.g. https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/).

    3 votes
  13. Comment on What have you been watching / reading this week? (Anime/Manga) in ~anime

    Staross Link
    I watched A Silent Voice this week-end, I liked it overall but didn't cared too much about some of the characters, they seemed a bit rushed sometimes (probably a problem with adapting the manga).

    I watched A Silent Voice this week-end, I liked it overall but didn't cared too much about some of the characters, they seemed a bit rushed sometimes (probably a problem with adapting the manga).

  14. Comment on What have you been listening to this week? in ~music

    Staross (edited ) Link
    The last Current 93, I missed some of the previous albums but this one seems like a good one. This one is fantastic: https://www.youtube.com/watch?v=bkvTZPBmp_8

    The last Current 93, I missed some of the previous albums but this one seems like a good one.

    This one is fantastic: https://www.youtube.com/watch?v=bkvTZPBmp_8

    1 vote
  15. Comment on What evidence-based learning strategies do you employ? in ~talk

    Staross Link
    Take a walk and get far from the computer. I've probably solved more problem by going to the toilets that by staying at my desk. There's plenty of evidence that physical activity is good (e.g....

    Take a walk and get far from the computer. I've probably solved more problem by going to the toilets that by staying at my desk. There's plenty of evidence that physical activity is good (e.g. https://psycnet.apa.org/buy/2014-14435-001), but it's also letting your mind wander without distraction that helps I think. For example I often just sit in the bus without doing anything in the morning or the evening (might be hard if you are a phone addict).

    8 votes
  16. Comment on How do you handle your different online identities versus your real life identity? in ~talk

    Staross Link
    Basically I have public and private accounts for most things. For example, I have a github with my name, and another one with a pseudo. I use whichever is most appropriate, and I try to keep them...

    Basically I have public and private accounts for most things. For example, I have a github with my name, and another one with a pseudo. I use whichever is most appropriate, and I try to keep them completely separate (don't open issues with you private account on your public one).

  17. Comment on What's your "must have" software for a MacBook Pro, especially for programming? in ~comp

  18. Comment on Stentors: Single-Celled Giants in ~science

    Staross Link Parent
    I guess everybody that watch science channels gets it recommended, 100k subs already.

    I guess everybody that watch science channels gets it recommended, 100k subs already.

    1 vote