• 0 Posts
  • 14 Comments
Joined 1 年前
cake
Cake day: 2023年9月25日

help-circle



  • I replied to that thread.

    OP was claiming to be working on a static HTML-serving search engine. They suggested that because it’s just HTML and CSS, and that interested parties can use Inspect Element to read the network requests, that it constituted “open source”.

    Commenters then got on his case about not open sourcing the server backend. OP defended that choice saying they didn’t want a competitor taking their code and building a company off of it that would “drive [them] out of business”. Uh-huh. So, proprietary software, then. Bye.




  • It’s a huge win, but not the kind of win people reading the statistic with no context (like me) probably thought.

    I’m sure a lot of us looked at “15 percent of desktop PCs in India run Linux” and, regardless of whether it was hasty and irresponsible for us to do so, extrapolated that to, “15 percent of Indian PC users are personally selecting Linux and normalizing its paradigms”.

    But in reality, it sounds more like “15 percent of Indian PC users use Linux to launch Google Chrome”. Which is impressive, but not the specific kind of impressive we wanted.

    It feels a bit like how I imagine, say, a song artist feels when they pour their heart and soul into a piece of music, it gets modest to no traction for a while, and then years later a 20 second loop becomes the backing track for a massive Tiktok meme, and almost zero of that attention trickles back to their other work.


  • Stateless functions still deal with state, they just don’t hold onto it. Without state to mutate, a so-called stateless function doesn’t do anything.

    In declarative languages, your state is the sum of everything you’ve declared. You don’t query results out of thin air. Computational results logically conclude from everything you set up.

    HTML ““has state””, as in it has a DOM, but it doesn’t do anything with it. You don’t mutate the DOM after it’s built, or query the DOM to compute results that weren’t trivially evident from the state you declared.

    You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.



  • The bar for me is whether the language describes an executable program that has state and control flow.

    You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don’t, personally.

    HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.

    The umbrella term I’d use for all of these is “coding”. That’s the skill of understanding structured languages and format specifications, and understanding how you can and can’t piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.

    Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don’t know. It doesn’t need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it’s just structured data.


  • pixelscript@lemmy.mltoMemes@lemmy.mlApple
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 个月前

    In a rather unorthodox way, yes.

    Android is one of those rare examples of a Linux kernel not being paired with GNU tools. I believe Android wrote their own versions of all the tools they wanted.

    The kernel is also extremely locked down by default. They very intentionally designed the OS in such a way that every facet of the kernel is kept abstracted away from you. It’s about as black-boxed as you can get, to the point where the fact that it’s Linux underneath is almost meaningless.


  • Here’s an overview of how Linux reads its filesystems on boot:

    1. You press the power button on your PC.
    2. Your motherboard receives power and begins a process called Power-On Self-Test, or POST. This is essentially the motherboard “feeling out” on all of its ports to see what’s connected. It senses all of your hard drive(s).
    3. The motherboard picks one of the partitions on one of the connected drives and tries to run it as an operating system. For a linux system, you want this to be /boot.
    4. /boot finds your actual system partition and tries to spin up the OS using it. This partition becomes the “main” one you’ll see by default when it’s fully up and running.
    5. At some point in the boot process, Linux checks the contents of the file at /etc/fstab. “fstab” here is short for “file system table”. It’s basically a list of other partitions plugged into your PC, and a mapping of where it should be mounted in your filesystem. If your system partition was Partition A, for example, and you had another Partition B that you want to be accessed at the path /B, you’d add a line to your fstab file that says something to the effect of, “hey, reach out to the connected partition with ID <long id string>, and if it’s there, create the folder /B, and make the files inside of the partition show up there.” This is called “mounting” the filesystem. You can do it manually at any time with the mount command. The fstab file is just a way to get Linux to auto-mount permanent partitions on startup. You can mount any drive to any path, including /home.

    What you need to do is:

    1. Format your new drive, and create a new partition there.
    2. Mount the new partition with the mount command. Park it anywhere you want. /media/new_home or whatever you like. This will just be a temporary place.
    3. Copy everything from your /home directory to the newly mounted one.
    4. Move the existing /home folder to literally anyplace else than where it currently is. \home_old would do. It just needs to be out of the way. You almost certainly want to do this only when logged in as the root user, or from another OS running off a USB. You will not be able to log in as any user after you do this until you finish the following steps.
    5. Edit your /etc/fstab file to point your new home partition to the path /home. This will “hook up” the new partition.
    6. Reboot to make Linux mount the new partition.
    7. Verify everything works.
    8. Delete the backup home directory.

    Answering some of your questions:

    Can /home live on a separate drive from the system partition?

    Yes. Linux does not care in the slightest where any mounted drives are. A drive is a drive is a drive. If it mounts, it mounts. Just make sure it’s in your fstab file.

    How should I organize my partitions?

    There is no right answer. It depends entirely on what you need and how you intend to use your PC. But since that answer is unhelpful, I’ll tell you how I’ve done mine. I currently have a single 2TiB SSD split up like this:

    [ 200 MB boot | ~500 GB system | 2 GB free | ~1.5 TiB home | 8 GB swap ]

    Boot comes first and is tiny. System is probably an order of magnitude bigger than it ought to be, but whatever. 2 GB of deliberately unallocated space is there for the exceedingly rare situation where a dumb bug chews up all the storage on the system partition rendering it un-runnable; it’s emergency expansion space I can tack on to get it running just long enough to resolve the problem. Home gets the lion’s share. And swap goes at the end, where home can cannibalize it if some day I decide I don’t need so much swap space.

    You would probably organize your drives in a similar way, except one drive would be entirely dedicated to /home and nothing else, and system taking up the bulk of the other drive. That would be the easy and naive solution. Some users may be inclined to create other partitions for organizational purposes. I personally don’t care for that organizational pattern, so, w/e.

    I cannot help you with your display troubles. :(


  • I don’t really mind either way whether these posts are allowed to remain or should be culled.

    If you keep them around, they will just keep shitting up the feed. The overall browsing quality of the community goes down, hindering the user experience. I don’t think it’s uncontroversial to say these posts have next to no value; they’re essentially equivalent to birthday notifications or “I voted” stickers. Like… congrats! You and everyone else! Now what? Where’s the discussion here?

    On the other hand, I do want to think thrice about controlling this with moderation. All too often on Reddit I’ve see the trope of a sub that appears to be crawling, and you get the idea to join in with an enthusiastic post, only to get removedsmacked by automod because you posted this on the wrong day of the week, or this post type is outright banned because the community is sick of seeing it. It’s sensible, yes. But ugh, what a demoralizing filter for newcomers. Overly curated subs/communities are not public forums, they are increasingly impenetrable cliques. That may not necessarily be a bad thing if we think the tradeoff is worth it. But we have to keep in mind what we become when we make that trade.

    The one thing I will say willl absolutely not help anything at all is making a designated containment community for this specific kind of post. The whole complaint here is rooted in there being no discussion value for these types of posts. You think a community comprised entirely of those would be a community anyone would want to post in? It’d largely be the Lemmy equivalent of a donotreply@ email address. A dumping ground where unwanted posts go to die. And I don’t know about anyone else, but somehow I find being directed to a designated dead-end forum by mods is an even bigger slap to the face than simply having my post removed.


  • I always start off by telling them “I know what I’m talking about, I work in IT, let’s skip the basics, I’ve tried it all already.” but they sometimes still don’t listen.

    They don’t listen because, unfortunately, for every one person telling the truth, there’s probably at least three people who don’t have an iota of a clue about their system but lie about it because they think claiming they’re an expert is a cheat code to getting better support. Ruins it for the rest of us.