Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)C
Posts
4
Comments
25
Joined
1 yr. ago

  • The term “meta-programming” had me lost since I’m only familiar with that in reference to C++ templates (and Rust’s generics are more like templates).

    Yes, like C++ template and macros. The kind of code that generates new code before being run.

    So to answer your question as to why there are macros, it’s because you need to generate code based on the input. A function call can’t do that.

    You can design a language where you don't need to generate code to accomplish this. My question isn't why this is necessary in Rust. My question is why Rust was designed such that this was necessary.

    Someone mentioned elsewhere that this allows for compile-time type safety. I'm still trying to wrap my head around how that works.

  • I can see that. I'm coming in from the other extreme that is Python, where even the meta-programming is done in plain Python.

  • C++ was my first programming language. I remember the nightmare of dealing with dependencies and avoiding boost because it felt wrong to need a third part library for basic features. The toolchain for Rust is very nice (not just compared to C++, but all other languages I've worked with) and has so far been a huge joy to work with. The language itself too. I'm just curious about why the language likes to expose more of its features through meta-programming rather than directly in the language itself. Things like println! and format! being macros instead of functions, or needing a bunch of #[derive(Debug,Default,Eq,PartialEq)] everywhere for things that other language provide through regular code.

  • I'm not talking about what features are in the standard libraries vs third party libraries. I mean meta-programming as in the stuff that generates Rust code. Take console printing for example, we use a macro println! in Rust. Other languages provide an actual function (e.g. printf in C, System.out.println in Java, print in Python, etc). The code for my first project is also full of things like #[derive(Debug,Default,Eq,PartialEq)] to get features that I normally achieve through regular code in other languages. These things are still in the Rust standard library as I understand it.

  • Rust @programming.dev

    Why is Rust so bare-bones?

  • Thanks, that's a good start.

    The bigger question for me is whether there's more to it than privacy and blurring out faces.

  • OpenStreetMap Canada @lemmy.ca

    Local laws around street-level pictures

  • That's also to make programming easier. Different programmers have different needs.

  • But the main benefits of static typing is in making the programming part easier. What do you gain from translating dynamically typed languages into a statically typed language?

  • asked questions that made educators interpret that I enjoyed bending the logic of what they were teaching.

    I had this problem too but mainly for math. I'd do well in classes and tests, but the material just didn't make sense to me. It wasn't until I studied real analysis that everything started to click.

  • A trick I've employed is to pretend to believe in something completely different. If it says "no, you're wrong" and goes on to tell me what I actually believe, then it's a good indicator that I might be on the right path.

  • Tabs get in the way and force you to actually address them instead of ignoring them. In theory.

  • Do you know if there's a similar extension that allows you to export/import the tabs in some text format rather than saving to bookmarks? I'm currently using Tab Season Manager, but it takes way too many steps to accomplish this.

    • Specific heat capacity of water: 4.184J/(gC)
    • Average shower temperature: 37C
    • Cold tap water temperature: T
    • Shower head output: 2gallon/min = 7.57L/60s = 126ml/s = 126g/s

    1s * (126g/s) * (4.184J/(gC)) * (37C - T) = 524J/C * (37C - T)

    120Wh = 432000J

    T = -787C

    So I guess the math checks out if your city's water supply temperature is way below absolute zero.


    Scratch that, let's assume the water actually flows, so T=0C. What water throughout do we need to achieve this level of power consumption?

    1s * (X g/s) * (4.184J/(gC)) * (37C) = 432000J

    X = 2791g/s = 44gpm

    You would have to be showering with 17 showerheads simultaneously using showerheads that are rated at the highest legal flow rates in the US (2.5gpm).

  • Believe it or not, you can make fried rice with fresh rice. It's not exactly the same experience, but it's equally tasty imo. If you haven't tried it yet, give it a go. You might find that you like it too.

    I doubt there would be enough of a market for precooked rice to make it worth selling. In households that do a lot of fried rice, this dish is usually more of a use-up-our-leftovers kind of meal than the sort of thing you go out of your way to make. The typical meal consists of white rice and sides of protein and vegetables. You make extra rice to make sure everyone has enough to eat in that meal, and whatever's left over goes in the fridge. You collect 2-3 days of rice this way and when you have enough, it becomes fried rice.

  • datahoarder @lemmy.ml

    How reliable is SnapRAID?

  • Men in Black 1997

    He's the worm guy.

  • Programmer Humor @programming.dev

    MAKE IMPORTING GREAT AGAIN!

    github.com /hxu296/tariff
  • They did give us OpenAI gym (now Gymnasium) and PPO. It's sad that they completely pivoted away from this line of work though.

  • We've seen similar effects in the context of reinforcement learning (see the "primacy bias" works of Evgenii Nikishin). It makes sense that it would also apply to LLMs, and any other ML model.

  • Early 30s now. I've been on this path since I was 18, so I guess I'd be happy to hear that I stuck with it. I'd probably also be disappointed to hear that I'm actually kind of bad at it.

  • Autism presents very differently from one person to the next. Most of the literature so far has been on young boys, so there's a very poor understanding among most mental health professionals and the general population on how it looks in adult men, let alone women. On top of that, women tend to be much better at hiding it.

    As for coping mechanisms, I can't give specific examples since, as you say, everyone is different. This is especially true for autism since there's such a wide range of special interests, sensory sensitivities/preferences, etc. that you can easily find two people where the good and bad categories are complete opposites. You'll often hear advice such as "engage in your special interest" (assuming one exists), "stick to your comfort foods", or "minimize masking". These are very broad suggestions, but it's the best we can give. There's a lot of work involved in figuring out what that means for you. For sensory preferences, there are resources online that list different things to consider. Look up "sensory preferences checklist" to find them. For masking, you'll have to learn what is and isn't masking. That involves understanding how non-autistic people think, what they're capable of doing without thinking, then comparing it against the amount of effort you put into doing the same thing. For example, neurotypicals don't need to think about what facial expressions to make because their faces just naturally do the thing in accordance to their emotional state. If you find that you need to consciously think about what face to make based on how you feel, then that's masking and would be a contributing factor to the constant exhaustion.

  • As someone who's been going through what I believe to be autistic burnout for many years now, this third hand description of her behaviour feels very similar that what my own experience probably looks like from the outside.

    Needing a lot of extra sleep is one of the symptoms. Depression, anxiety and being generally in a bad mood often also comes with burnout. She's putting no effort into events or activities, possibly because she doesn't want those activities or events in the first place due to the energy drain. Not knowing how you feel (and just bad interoception in general) is a very common trait of autism. You mentioned in a comment that she's "quiet and shy", which is another point towards the autism hypothesis.

    Keep in mind that this is based on my own experience only. There isn't enough information to know if your friend is going through the same thing or not. Assuming she is, the solution is probably to work on that interoception and figuring out how different activities/events affect your energy levels. There's a good chance that if you had all your coping mechanisms figured out before entering the relationship, they don't work anymore after because some things clash with the expectations of the relationship. For many of them, you probably wouldn't even know they were coping mechanisms to begin with. They were things you just did because you prefer it that way and had no idea how bad things can get if you didn't. So part of the work is in figuring out which of your habits are coping mechanisms.