• 0 Posts
  • 46 Comments
Joined 1 year ago
cake
Cake day: June 23rd, 2023

help-circle










  • When using the English word ‘floor’ counting ground floor as ‘first floor’ makes sense – ground level still has a floor and it is the first one, but it is still counted differently in different English-speaking countries. Other languages (at least Polish) have separate word for ‘non-ground level of the building’ so those are counted.

    In Polish we have the word ‘parter’ for the ground floor (lowest non-basement level of the building) and ‘piętro’ for any level above it. So it is: (‘piwnica’ (basement), ) ‘parter’, ‘1 piętro’, ‘2 piętro’… This makes complete sense… but I still remember it being confusing when I was a kid. A ‘floor’ (the bottom of a room) is ‘podłoga’.

    So, answering the question: there are three ‘podłogas’ under the second ‘piętro’ here.



  • ‘Pay to show a link’ is the way Google wants us to see this legislation. But linki are not what the news sources are fighting. The problem is Google presents the news and other information in the search result in the way that users often do not need to leave Google and foll9w the link.
    Someone produces content so people visit their się and make them money, but those users get the information they want (sometimes incomplete or broken) straight from Google and only Google gets the money. That is not fair and that is what laws like this try to fix (better or worse). But Google and such have powerful propaganda and here we are.

    Another thing is: users of services like Reddit or Lemmy also do similar thing (posting content in a way that preventing monetization at its source), so they have extra reason to take Google side.


  • My experience with C++ was when C++ was a relatively new thing. Practically the only notable feature provided by the standard library, was that unholy abuse of bit shift operators for I/O. No standard collections or any other data types.

    And every compiler would consider something else a valid C++ code or interpret the same code differently.

    I am little bit prejudiced since then… and that is probably where the author is coming from too.

    Then things were just getting more complicated (templates and other new syntax quirks), to fill the holes in attempts to make C a ‘high level language’.



  • Slightly off-topic rant:

    I hate how the ‘VPN’ term has been took over by companies selling services using VPN technology.

    VPN was initially ‘Virtual Private Network’ – used to securely connect own (as belonging to an organization or person) devices over a public network. Like securely connecting bank branches. Or allowing employee connect to a company network. And VPN are still used that way. They are secure and provide the privacy needed.

    Now when people say ‘VPN’ they often mean a service where they use VPN software (initially designed for the use case mentioned above) to connect to the public interned via some third-party. This is not a ‘private network’ any more. It just changes who you need to trust with you network activity. And changes how others may see you (breaking other trust).

    When you cannot trust your ISP and your local authorities those ‘VPNs’ can be useful. But I have more trust to my ISP I have a contract with and my country legal system than in some exotic company in some tax haven or other country that our consumer protections or GDPR obligations won’t reach.

    Back to the topic:
    I do not believe that all VPN services are owned/funded by governments, but some may be. I don’t have much reason to trust them, they are doing it for money and not necessarily only the money their customers pay them. In fact I trust my government more that some random very foreign company.



  • It probably seems extra complexity for you, if your language does not use it. For native speakers it is just natural and not using it would be at least weird.

    We could ask the same question about articles . Those ‘the’ and ‘a’, why use them? It only makes English language harder to use! ‘Apple is apple’ why add another meaningless word?

    Of course after learning and using English for years I see the meaning of ‘a’ and ‘the’ and thy feel quite natural for me to (though sometimes they still make little sense to me – all the fights whether ‘The’ can be used with some proper name or not). The point is: a lot of features of a foreign language will fill alien and unnecessary.

    Maybe more on topic, that is how/why gendered words work in Polish: noun gender is usually linked to how it ends (but do not confuse that with suffixes of grammatical cases). Virtually all Polish women names end with ‘a’, so any other noun ending in ‘a’ sounds feminine and would be used in similar way. And sometimes it just ‘rhymes’ – like in ‘to jabkło’ (‘this apple’ – neuter), ‘ta gruszka’ (‘this pear’ – feminine), ‘ten banan’ (‘this banana’ – masculine). Of course thing get much more complicated than that (like in every language, just in different parts of the language).

    People were just talking in the way that it was convenient for them. And thousands years later scholars called this feature of particular set of languages ‘gender’ because words used seem to be related to genders.



  • Jajcus@kbin.socialtolinuxmemes@lemmy.worldHtop too
    link
    fedilink
    arrow-up
    81
    ·
    9 months ago

    Well behaving programs give control back to the kernel as soon as they are done with what they are doing. If they don’t the control is forcefully taken away after some assigned time.

    It looks something like this:

    Something happens – e.g. a key is pressed – a process waiting for this event is woken up and gets e.g. 100ms to do it stuff. If it can handle the key press in 50ms, kernel notes it used 50 ms of CPU time and can give control to another process waiting for an event or busy with other work. If the key press triggered long computation the process won’t be done in 100ms, the kernel notes it used 100ms of CPU time and gives control to other processes with pending events or busy with other work.
    After one second the kernel may have noted:

    Process A: used 50ms, then nothing, then 100ms, another 100ms and another 100ms
    Process B: was constantly busy doing something, so it got allocated 6 * 100ms in that one second
    Process C: just got one event and handled it in 50ms
    Process D: was not waken at all

    So total of 1000ms was used – the CPU was 100% busy
    Of that 60% was process B, 35% process A and 5% process C.

    And then that information is read from the kernel by top and displayed.

    How does the OS even yank the CPU away from the currently running process?

    Interrupts. CPU has means triggering and interrupt at a specific time. Interrupt means that CPU stops what it is doing and runs selected piece of kernel code. This piece of kernel code can save the current state of user process execution and do something else or restore saved execution of another process.