• 4 Posts
  • 20 Comments
Joined 3 years ago
cake
Cake day: February 1st, 2023

help-circle



  • edinbruh@feddit.ittoMemes@sopuli.xyz(Laser) Printer go brrrr
    link
    fedilink
    English
    arrow-up
    59
    ·
    27 days ago

    Laser printers are the best. You sacrifice the quality of dense pictures, but gain incomparable speed and reliability. It’s especially worth it if you print less often, because the ink dries up if you don’t print every once in a while and you end up buying new ink even though the cartridge is full, but the toner just sits there indefinitely.


  • “Ternary operator” means “operator that takes three things”, like unary and binary operators take one and two things.

    In C there is an operator for conditional expressions (an ‘if’ that you can put inside expressions) and it looks like this condition ? trueBranch : falseBranch. It takes three expressions, so it’s a ternary operator.

    Except it’s the only ternary operator in C (and most languages, if they have one at all), so instead of calling it something like “conditional operator”, they just call it “the ternary operator”


  • One of my university professors wanted us to program using DrJava, so of course Java 8 it is.

    Why did he want to use that? Because it was similar DrRacket, which he made us use in the previous term to program Scheme (which is just lisp for teachers). Of course that was just us being all modern and such, he himself used DrScheme, the deprecated precursor of DrRacket.

    This guy is so old that my high school Systems teacher had him as her university professor.

    He has a fancy current gen MacBook Pro that he uses for his stuff. Then when it’s lesson time he whips out a windows 95 netbook and a daisy chain of adapters from VGA to thunderbolt.



  • edinbruh@feddit.ittoMemes@lemmy.mlAn empire is what it is
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    4
    ·
    2 months ago

    No, the People might just be stupid. You see, many people are gullible and get convinced easily by rallies of some rich politicians. Sometimes, they might even believe that one day they will be as rich as them, and so they see something good for the rich as something good for them. But, unless the people are threatened to vote, or the polls are manipulated, it’s still democracy


  • edinbruh@feddit.ittoMemes@lemmy.mlAn empire is what it is
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    6
    ·
    2 months ago

    “Democracy” has nothing to do with “free healthcare” or any of those things listed. Democracy only means that the citizens vote. They can vote for stupid/bad things but it’s still a democracy. Similarly, a dictatorship that does some good things is still a dictatorship




  • The pc ecosystem is modular by design. The kernel will figure out itself the available hardware, moreover there are only two major CPU manufacturers (in the pc space of course), which means you have only two platforms to support.

    Mobile phones instead are not modular, they use SoC. While most common socs are from Qualcomm and mediatek, there are a lot more smaller manufacturers. Plus, even if most often they use the same reference design for compute cores, the rest of the soc is often custom and wildly different from others. All of this to say that the kernel needs to already know exactly how the specific soc of the device works, instead of figuring it out on the fly. Which is why you need to check compatibility.

    The brick thing instead is because the bootloaders in these devices are usually very locked down, so sometimes you need to replace the bootloader with a more open one, with all the risks that this entails




  • Unix needed only \n because it had complex drivers that could replace \n with whatever sequence of special characters the printer needed. Also, while carriage return is useful, they saw little use for line feed

    On dos (which was intended for less powerful hardware than unix) you had to actually use the correct sequence which often but not always was \r\n (because teleprinters used that and because it’s the “most correct” one).

    Now that teleprinters don’t exist, and complex drivers are not an issue for windows, and everyone prefers to have a single \n, windows still uses \r\n, for backward compatibility.



  • That’s weird because it’s against the law.

    A recent (few months ago) EU law mandates that if your platform is big enough (in the EU market) to gatekeep users from using other platforms, then it must interoperate with competing services. That means you should thrive because you make a better product, and not because it has more users.

    The fine is a considerable percentage of the company’s earnings, that supposedly even the likes of Amazon and Google cannot overlook.

    This includes Whatsapp that in a few months will have to be interoperable with competing services like telegram. This requires a protocol, the IETF is working on that. Google probably wishes to use RCS, but Matrix is also working with the IETF.

    Apple says iMessage is not that widespread in the EU and should not be included, Google says it is and should be regulated, that’s because this regulation will most likely have effects even outside the EU.




  • It’s not a dumb question. The answer is “it depends”, it’s mostly a choice. The general rule is that when yo start a project, you choose the language that you think will help you the most, whether that is because you already know the language, or because you have to work with stuff that already use that language, or because the language is better at doing that.

    Regarding whether to stick to a language or learn a new one, in general your CS teachers will tell you (and they are correct) that you should not “learn to program in a language” but just “learn to program” and then apply that knowledge to whatever language you need. So, you should always learn languages that are different from the ones you already know in order to learn new paradigms, and then when you need a specific language, just learn the details about it. BUT, even if this way you will be able to use most languages, you will not be “good” at most, so you should also have some languages that you know really well and are experienced in. And for that you should choose the ones that are more useful to you (or maybe useful for your job) or the ones that you like.


  • For various reasons.

    Different languages take different approaches and models to do stuff. Thus making each one better or worse for different challenges.

    For example, python is easy and quick to get up and running. Bug it’s slow and unsuited for low level programming (like OSes, drivers, and embedded stuff). On the other hand, C is very fast and very low level, allowing you to make both high performance programs and low level stuff, but it’s a nightmare to use and you will run into all sorts of problems that an easier language, like python would avoid. All of this is mostly due to python being interpreted (instead of compiled) and c having manual memory management.

    But they might also take a different approach at computation, like for functional languages (opposed to imperative languages) which try to solve problems in a more “mathematical” and declarative way, instead of defining a sequence of instructions. Or, even more, logic programming languages, in which you define a series of logical statements and the language tries to find solution and draw conclusions from them.

    And some languages are designed around some particular concept that they think is beneficial and worth exploring, maybe taken from various other languages and put together, like rust which is designed around the RAII design pattern and takes large inspiration from functional languages, while still being and imperative procedural language (like C, so not object oriented). Or java which was designed to be a portanle but performante object oriented language, with support for low powered embedded system, full of features but simpler than c++, etc… all stuff that now is nothing special, but remember that java us very old. Or kotlin which tries to be java (they are interoperable), but modern and better and more “pure” or “consistent”. Or c++ that started as an object oriented superset of c, but then started adding every single feature of every other imperative language, and never giving up on older stuff, to the point of becoming very hard to use correctly while making it very easy to screw yourself in the most intricate ways.

    And of course there are domain specific languages (opposed to general purpose languages). Which aren’t even necessarily Turing complete. They are designed for one purpose only, and they do that better than general purpose languages. For example AWK for text processing, or SQL for databases, or matlab for scientific calculations, or TeX for typesetting, or GLSL for shaders, or coq for theorem proving. And here imagination truly is the limit.

    So, the point is, every language is more suited then other for some kind of work. And when people stumble across some problem that is hard to tackle and come up with some approach to solve it, or when they grow fed up with the issues of some older languages, they often like to make a new language around that. And some times this leads to entirely new paradigms which are worth exploring.

    P.s.: I like languages:)