• 0 Posts
  • 22 Comments
Joined 8 months ago
cake
Cake day: May 19th, 2024

help-circle
  • The same way you take an interest in any other person.

    Ask them what they like and why they like it. Make it clear that you would like to understand.

    And absolutely do NOT react in any way negatively. No “that’s it”, no nothing, no “ew”, no disappointment, nothing. If he tells you he watches paint dry in his free time, ask him what color and if you can join him some time. And be persistent and try make specific plans, I have relatives I like with shared hobbies and we barely manage to schedule something.

    If your son already has a hobby it’s kind of easier because you can ask him about things he did and things he finds inspiring. If he’s doing performance or sports, you can watch and support him doing that? Shop for equipment together, etc… If he has a competitive, creative problem don’t pressure him and reassure him.

    If he likes media, try to lend some of his and try to enjoy it. Usually, even with hobbies you dislike, there is a point where it’s somewhat interesting if you are motivated to learn about it. That does take some time though and you will need to invest that time. You can just weave in a quick “… and how is your [x] going”. That’s reserved for more distant relatives.

    But also he’s 15 so none of that may work for biological reasons.

    And also, it takes two. If you want to bond, but he does not, period, there isn’t really much you can do, except persistently offer it.



  • We don’t know what an eventual outcome will be right now and it would be… weird to talk about help financing “defense” for years and then actually negotiate for concessions.

    It’s an open secret that if all Russian nukes would disappear over night, the other members of the UN security council would probably party for a week. The US (and the EU) is supporting Ukraine because that’s the right thing to do AND it is in their interest because who knows what a bigger Russia will do next. But they’re also doing it because it’s weakening Russia and that’s also in their interest, even though they would never publicly say it or not with the intensity that they actually think that way.

    Long story short, if the absolute optimal (for Ukraine and “the west”) thing happens:

    • the war exhausts Russia more than Ukraine + supporters
    • the timing for negotiations is chosen in a way that is extremely bad for Russia, to the effect that Russia doesn’t have to just apologize, return territory, pay reparations, and all that, but ALSO give up other things.
    • like UN observers and limits to their military.
    • nuclear disarmament
    • ???

    It would look extremely badly if politicians, actual leaders of nations, were to talk about “defense” for years and then actually ask those things in the end. Which they want to.

    So (imo, it’s all speculation) it’s preemptive PR management that leaves room for that asking for more things than would be justifiable with “defense”.



  • I wonder how much memory can Python hold until an error like “out of memory” happens, because ML models (for example, those hosted and served in HuggingFace) loads training weights with dozens of GBs

    All the stuff that’s LLM and the actual “serious” python libraries are implemented in C/C++ and only made accessible via python.

    Which doesn’t directly answer the question of what the maximum is, in those cases, but it should be obvious that C/C++ have some good ways to deal with memory.

    You can still do “traditional” memory management in python, or “memory aware programming” like, e.g. not trying to read a file in one piece, but reading and processing line by line.

    And using C from python is actually very easy and convenient with ctypes. https://docs.python.org/3/library/ctypes.html



  • Why the heck would 2 projects share the same library?

    Coming from the olden days, with good package management, infrequent updates and the idea that you wanted to indeed save that x number of bytes on the disk and in memory, only installing one was the way to go.

    Python also wasn’t exactly a high brow academic effort to brain storm the next big thing, it was built to be a simple tool and that included just fetching some library from your system was good enough. It only ended up being popular because it is very easy to get your feet wet and do something quick.


  • The difficulty with python tooling is that you have to learn which tools you can and should completely ignore.

    Unless you are a 100x engineer managing 500 projects with conflicting versions, build systems, docker, websites, and AAAH…

    • you don’t really need venvs
    • you should not use more than on package manager (I recommend pip) and you should cling to it with all your might and never switch. Mixing e.g. conda, on linux system installers like apt, is the problem. Just using one is fine.
    • You don’t “need” need any other tools. They are bonuses that you should use and learn how to use, exactly when you need them and not before. (type hinting checker, linting, testing, etc…)

    Why is it like this?

    Isolation for reliability, because it costs the businesses real $$$ when stuff goes down.

    venvs exists to prevent the case that “project 1” and “project 2” use the same library “foobar”. Except, “project 1” is old, the maintainer is held up and can’t update as fast and “project 2” is a cutting edge start up that always uses the newest tech.

    When python imports a library it would use “the libary” that is installed. If project 2 uses foobar version 15.9 which changed functionality, and project 1 uses foobar uses version 1.0, you get a bug, always, in either project 1 or project 2. Venvs solve this by providing project specific sets of libraries and interpreters.

    In practice for many if not most users, this is meaningless, because if you’re making e.g. a plot with matplotlib, that won’t change. But people have “best practices” so they just do stuff even if they don’t need it.

    It is a tradeoff between being fine with breakage and fixing it when it occurs and not being fine with breakage. The two approaches won’t mix.

    very specific (often outdated) version of python,

    They are giving you the version that they know worked. Often you can just remove the specific version pinning and it will work fine, because again, it doesn’t actually change that much. But still, the project that’s online was the working state.


  • Depends, it’s been a bit disappointing to see virtually no change since I started using it, particularly in terms of QoL. It is open source, so that’s on everyone, including me, but I had hoped for more speed, etc…

    Mastodon is way better when it comes to filtering.

    Having the option of a reddit clone is pretty good though and I will stick with it. Who knows when and where it will get that critical bit of momentum.

    It’s already superior to regular forums, in my opinion, so now the question is what kind of format you want to have discussions in, instead of having to default to forums. That choice is a definite upside and I’m glad it exists.



  • I don’t think that there is an obligation with that kind of standard, no.

    Banking and security, accessibility yes.

    Specific choice of “user side software”, probably not. And it’s somewhat unlikely to happen too, because if you think about apps on phones, if suddenly a completely new phone OS were to show up and had 30% market share, it wouldn’t make sense to have a law that would legally require them to offer an app on that platform

    And Chrome isn’t “officially bad” in a legal sense.

    The internet standards themselves are a bit… imprecise too. Implementing them in browser is ultimately up to the companies, there is no legal body requiring a browser to have or not have features. They just usually sort of do the same things because going different paths would be stupid. Mostly. Sometimes they totally do that, though, e.g. calendars and contact info have a standard, but all implementations are a mess and transfer is a pain.


  • When things collide, they transfer their movement energy. If things collide like this >- They will continue in roughly the same direction. If they collide like this -> <- their movement will cancel out and they will fall into the sun.

    Satistically, at the “beginning of time”, in a random sphere around the sun, things will not be completely the same. So everything will either collide and fall. Or it will collide and continue in roughly the same direction. What we have now are the leftovers that were moving in roughly the same direction and colliding so little that they didn’t fall into the sun because of that.

    The same is true for the “disk”: If you start with a roughly evenly distributed sphere of gases or something, there is a middle somewhere where there is a little bit more mass than anywhere else. That’s where things will go.



  • it_depends_man@lemmy.worldtoProgrammer Humor@lemmy.mlAI's take on XML
    link
    fedilink
    Deutsch
    arrow-up
    1
    ·
    edit-2
    4 months ago

    I’m not sure now that I think about it, but I find this more explicit and somehow more free than json. Which can’t be true, since you can just

    {"anything you want":{...}}
    

    But still, this:

    <my_custom_tag>
    <this> 
    <that>
    <roflmao>
    ...
    

    is all valid.

    You can more closely approximate the logical structure of whatever you’re doing without leaving the internal logic of the… syntax?

    <car>
    <tyre> air, <valve>closed</valve>  </tyre>
    <tyre> air, <valve>closed</valve>  </tyre>
    <tyre>      <valve>open</valve>  </tyre>
    <tyre> air, <valve>closed</valve>  </tyre>
    </car>
    

    Maybe I just like the idea of a closing tag being very specific about what it is that is being closed (?). I guess I’m really not sure, but it does feel nicer to my brain to have starting and closing tags and distinguishing between what is structure, what is data, what is inside where.

    My peeve with json is that… it doesn’t properly distinguish between strings that happen to be a number and “numbers” resulting in:

    myinput = {"1":"Hello",1:"Hello"}
    tempjson = json.dumps(myinput)
    output = json.loads(tempjson)
    print(output)
    >>>{'1': 'Hello'}
    

    in python.

    I actually don’t like the attributes in xml, I think it would be better if it was mandatory that they were also just more tagged elements inside the others, and that the “validity” of a piece of xml being a certain object would depend entirely on parsing correctly or not.

    I particularly hate the idea of attributes in svg, and even more particularly the way they defined paths.

    https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commands

    It works, but I consider that truly ugly. And also I don’t understand because it would have been trivial to do something like this:

    <path><element>data</element><element>data</element></path>
    


  • it_depends_man@lemmy.worldtoProgrammer Humor@lemmy.mlAI's take on XML
    link
    fedilink
    Deutsch
    arrow-up
    16
    arrow-down
    4
    ·
    4 months ago

    It is very cool, specifically as a human readable mark down / data format.

    The fact that you can make anything a tag and it’s going to be valid and you can nest stuff, is amazing.

    But with a niche use case.

    Clearly the tags waste space if you’re actually saving them all the time.

    Good format to compress though…