There are a couple I have in mind. Like many techies, I am a huge fan of RSS for content distribution and XMPP for federated communication.

The really niche one I like is S-expressions as a data format and configuration in place of json, yaml, toml, etc.

I am a big fan of Plaintext formats, although I wish markdown had a few more features like tables.

  • frezik@midwest.social
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    15 days ago

    I’d like something akin to XML DOM for config files, but not XML.

    The one benefit of binary config (like the Windows Registry) is that you can make a change programmatically without too many hoops. With text files, you have a couple of choices for programmatic changes:

    • Don’t
    • Parse it, make the change, and rewrite it (clobbering comments and whitespace that the user setup; IIRC, npm does this)
    • Have some kind of block that says “things below this line were automatically set and shouldn’t be touched” (Klipper does this)
    • Have a parser that understands the whole structure, including whitespace and comments, and provides an interface for modifying things in place without changing anything around it (XML DOM)

    That last one probably exists for very specific formats for very specific languages, but it’s not common. It’s a little more cumbersome to use as a programmer–anyone who has worked with XML DOM will attest to that–but it’s a lot nicer for end users.

  • fubarx@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    17 days ago

    Since nobody’s brought it up: MQTT.

    It got pigeonholed into IoT world, but it’s a pretty decent event pubsub system. It has lots lf security/encryption options, plus a websocket layer, so you can use it anywhere from devices, to mobile, to web.

    As of late last year, RabbitMQ started suporting it as a supported server add-on, so it’s easy to use it to create scalable, event-based systems, including for multiuser games.

    • antimongo@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I spun up a MQTT/Aedes/MongoDB stack on my network recently for some ESP32 sensors.

      Fantastic protocol and super easy to work with!

      • fubarx@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        Installed RabbitMQ for use in Python Celery (for task queue and crontab). Was pleasantly surprised it also offered MQTT support.

        Was originally planning on using a third-party, commercial combo websocket/push notification service. But between RabbitMQ/MQTT with websockets and Firebase Cloud Messaging, I’m getting all of it: queuing, MQTT pubsub, and cross-platform push, all for free. 🎉

        It all runs nicely in Docker and when time to deploy and scale, trust RabbitMQ more since it has solid cluster support.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    16 days ago

    I wish standards were always open access. Not behind a 600 dollar paywall.

    When it is paywalled I’m irritated it’s even called a standard.

    • towerful@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Oh, this looks great!
      I’ve been struggling between customize and helm. Neither seem to make k8s easier to work with.

      I have to try cuelang now. Something sensible without significant whitespace that confuses editors, variables without templating.
      I’ll have to see how it holds up with my projects

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      17 days ago

      Oh this! YAML was a terrible choice. And that’s coming from someone who likes Python and prefers white spaces over brackets. YAML never clicked for me.

  • boramalper@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    17 days ago

    ActivityPub :) People spend an incredible amount of time on social media—whether it be Facebook, Instagram, Twitter/X, TikTok, and YouTube—so it’d be nice to liberate that.

  • BB_C@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    17 days ago

    The term open-standard does not cut it. People should start using “publicly available and sharable” instead (maybe there is a better name for it).

    ISO standards for example are technically “open”. But how relevant is that to a curious individual developer when anything you need to implement would require access to multiple “open” standards, each coming with a (monetary) price, with some extra shenanigans [archived] on top.

    IEEE standards however are actually truly open, as in publicly available and sharable.

    • ReversalHatchery@beehaw.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      why do we call standards open when they require people to pay for access to the documents? to me that does not sound open at all

      • BB_C@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        Because non-open ones are not available, even for a price. Unless you buy something bigger than the “standard” itself of course, like a company that is responsible for it or having access to it.

        There is also the process of standardization itself, with committees, working groups, public proposals, …etc involved.

        Anyway, we can’t backtrack on calling ISO standards and their likes “open” on the global level, hence my suggestion to use more precise language (“publicly available and sharable”) when talking about truly open standards.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        It’s a historical quirk of the industry. This stuff came around before Open Source Software and the OSI definition was ever a thing.

        10BASE5 ethernet was an open standard from the IEEE. If you were implementing it, you were almost certainly an engineer at a hardware manufacturing company that made NICs or hubs or something. If it was $1,000 to purchase the standard, that’s OK, your company buys that as the cost of entering the market. This stuff was well out of reach of amateurs at the time, anyway.

        It wasn’t like, say, DECnet, which began as a DEC project for use only in their own systems (but later did open up).

        And then you have things like “The Open Group”, which controls X11 and the Unix trademark. They are not particularly open by today’s standards, but they were at the time.

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      17 days ago

      Also, A4 simply has a better ratio than letter. Letter is too wide, making A4 better to hold and it fits more lines per page.

      • litchralee@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        17 days ago

        It’s also worth noting that switching from ANSI to ISO 216 paper would not be a substantial physical undertaking, as the short-side of even-numbered ISO 216 paper (eg A2, A4, A6, etc) is narrower than for ANSI eqjivalents. And for the odd-numbered sizes, I’ve seen Tabloid-size printers in America which generously accommodate A3.

        For comparison, the standard “Letter” paper size (aka ANSI A) is 8.5 inches by 11 inches. (note: I’m sticking with American units because I hope Americans read this). Whereas the similar A4 paper size is 8.3 inches by 11.7 inches. Unless you have the rare, oddball printer which takes paper long-edge first, this means all domestic and small-business printers could start printing A4 today.

        In fact, for businesses with an excess stock of company-labeled #10 envelopes – a common size of envelope, measuring 4.125 inches by 9.5 inches – a sheet of A4 folded into thirds will still (just barely) fit. Although this would require precision folding, that’s no problem for automated letter mailing systems. Note that the common #9 envelope (3.875 inches by 8.875 inches) used for return envelopes will not fit an A4 sheet folded in thirds. It would be advisable to switch entirely to A series paper and C series envelopes at the same time.

        Confusingly, North America has an A-series of envelopes, which bear no relation to the ISO 216 paper series. Fortunately, the overlap is only for the less-common A2, A6, and A7.

        TL;DR: bring reams of A4 to the USA and we can use it. And Tabloid-size printers often accept A3.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Presumably you could just buy that paper size? They’re pretty similar sizes; printers all support both sizes. I’ve never had an issue printing a US Letter sized PDF (which I assume I have done).

      Kind of weird that you guys stick to US Letter when switching would be zero effort. I guess to be fair there aren’t really any practical benefits either.

    • Cyclohexane@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I never really quite understood IPFS and why it gets used where I see it today. What problem is it solving?

      • madnificent@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        IPFS would replace Content Delivery Networks in present day.

        It would also allow you to host software and other content from your own network again without the constraints modern Internet Service Providers pose on you to limit your self-hosting capabilities.

        If applications are built for it, it could serve as live storage for your applications too.

        We ran ipf-search. In one of the experiments we could show that a distributed search index on ipfs-search, accessible through JavaScript is likely feasible with the necessary research. Parts of the index would automatically be hosted by clients who used the index thus creating a fairly resilient system.

        Too bad IPFS couldn’t get over the technical hurdles of limiting connection setup time. We could get a fast (ElasticSearch based) index running and hosted over common web technologies, but fetching content from IPFS directly was generally rather slow.

        • Valmond@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          Would you be interested in a similar protocol that supports more things (and is IMO easier to set up)?

          • madnificent@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            15 days ago

            I’m not actively looking but please do share references! Other people may read this and they may want to know too. Perhaps I’ll jump back in the rabbit hole at some point too 😁

            • Valmond@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              15 days ago

              Okay here it goes!

              Tenfingers sharing protocol & python implementation (your python needs cryptodomex, or use the frozen executables).

              http://tenfingers.org

              You share theirs, they share yours (all encrypted)! So no benevolent nodes or crypto and it’s 100% decentralised.

              I’m working on a better documentation on how to set it up (just forward a port and run setup basically).

              • madnificent@lemmy.world
                link
                fedilink
                arrow-up
                0
                ·
                11 days ago

                I had to read the overview and it looks nice. It reads like IPFS without some of the challenging cruft. Well written!

                IPFS seemingly works small scale but not large scale. What makes tenfingers handle millions of files and petabytes of data better than IPFS? Perhaps that is not the goal. In what way do you think the tech scales? Why will discovery of the node which has the data be short?

                I want to ask for benchmarks but you can’t do a full benchmark without loads of resources.

                • Valmond@lemmy.world
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  edit-2
                  11 days ago

                  Thanks!

                  IPFS is static, whereas tenfingers is dynamic when it comes to the links. So you can update the shared data without the need of redistributing the link.

                  That said, its also very different tech wise, there is no need for benevolent nodes (or some crypto or payment).

                  Nodes do not need to be trustworthy either, so node discovery is very simple (basically just ask other nodes for known nodes).

                  The distribution part, where nodes share your data, is based on reciprocal sharing, you share theirs and they share yours. If they don’t share any more (there are checks) you just ditch the deal and ask for a new deal with another node.

                  With over sharing (default is you share your data with 10 other nodes, sharing their data) this should both make bad nodes a no problem, but also make for good uptime and takedown safety.

                  This system also makes it scalable infinitely node wise, as every node does not need to know all other nodes, just enough for their need (for example thousands out if millions of existing nodes).

                  To share lots if data, you need to bring enough storage and bandwith to the table because it’s reciprocal, so basically it’s up to your node how much it can share.

                  Big data sets are always complicated because of errors and long download times, I have done 300MB files without problems, but the download process sure can be made better (with parallel downloading for example and better error handling).

                  I haven’t worked on sharing way bigger datasets, even a simple terabyte is a pita to download on the regular internet :-) and the use case is more the idea of sharing lots of smaller data, like a website for example, or a chat.

                  What do you think, am I missing something important? Or of course if you have other questions please do ask!

                  Also, sorry I’m writing this on my mobile so it’s not very well written.

                  Edit: missed one question; getting the data is straight forward to use (a bit complicated how it’s handled because of the changing nature of things) but when you download, you have the addresses of the nodes sharing your data so you just connect to one of them and download it (or the next if the first one isn’t up etc and so on). So that should not be any kind of bottleneck.

  • mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    17 days ago

    ISO 8601 date format. Not because it’s a standard, but because it’s simple, sensible, clearly defined, and very effective.

    Date fields in any order other than most-significant-digits-first is not only counterintuitive, but needlessly complicated to work with. Omitting critical information like the century is ambiguous and confusing.

    We don’t live in isolated villages any more. Mixing and matching those problems by accepting all the world’s various regional and personal date styles, especially with no reliable indication of which ones apply in any given case, leads to the hodgepodge of error-prone date madness that we have today.

    The 2024-09-02 format should be taught in schools and required in official documents. Let the antiquated date styles fall into disuse outside of art and personal correspondence, like cursive writing.

    • The_Decryptor@aussie.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      RFC3339 is a simplified profile of 8601 that only covers YYYY-MM-DD style formatting, if you only ever use that format and avoid the things like “2024-W36” they’re mostly interchangeable.

    • driving_crooner@lemmy.eco.br
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I had the fortune of being hired to build up from zero my department, and one of the first “rules” I made was all dates are ISO-8601 and now every process runs with 8601, if you use anything different your code is going to fail eventually when it finds another column date in 8601.

    • caturra@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      I arrived to manage releases in a company, the previous manager named releases as “release04092016”, as USA standard. My first recommendation was to name releases as “releaseyyyymmdd” so “release20160409”. I was asked by another manager why to change that, so I showed her a sorted list of releases “git branches” and asked her, can you tell me there when was the last release? (a very common question) Of course, to find the last release you need to check the whole list because the mmddyyyy order is useless. The answer with yyyymmdd was immediate, just look at the last row.

    • MoonlightFox@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      And it can be sorted alphabetically in all software. That’s a pretty big advantage when handling files on a computer

    • pHr34kY@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      17 days ago

      I love this standard. If you dig deeper into it, the standard also covers a way to express intervals and periods. E.g. “P1Y2M10DT2H30M” represents one year, 2 months, 10 days, 2 hours and 30 mins.

      I recall once using the standard when writing a cron-style scheduler.

      I also like the POSIX “seconds since 1970” standard, but I feel that should only be used in RAM when performing operations (time differences in timers etc.). It irks me when it’s used for serialising to text/JSON/XML/CSV.

      Also: Does Excel recognise a full ISO8601 timestamp yet?

      • Jim@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        17 days ago

        I also like the POSIX “seconds since 1970” standard, but I feel that should only be used in RAM when performing operations (time differences in timers etc.). It irks me when it’s used for serialising to text/JSON/XML/CSV.

        I’ve seen bugs where programmers tried to represent date in epoch time in seconds or milliseconds in json. So something like “pay date” would be presented by a timestamp, and would get off-by-one errors because whatever time library the programmer was using would do time zone conversions on a timestamp then truncate the date portion.

        If the programmer used ISO 8601 style formatting, I don’t think they would have included the timepart and the bug could have been avoided.

        Use dates when you need dates and timestamps when you need timestamps!

        • cout970@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          Thats an issue with the time library, not with timestamps. Actually timestamps are always in UTC, you need to do the conversion to your local time when displaying the value. There should be no possible off-by-one errors, unless you are doing something really wrong.

      • mox@lemmy.sdf.org
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        That looks like an interesting diagram, but the text in it renders too small to read easily on the screen I’m using, and trying to open it leads to a javascript complaint and a redirect that activates before I can click to allow javascript. If it’s yours, you might want to look in to that.

        The table below works, though. Thanks for the link.

    • DarkMetatron@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      The year is the information that most of the time is the least significant in a date, in day to day use.

      DDMMYY is perfect for daily usage.

      • suigenerix@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        DDMMYY is perfect for daily usage.

        Except that DDMMYY has the huge ambiguity issue of people potentially interpreting it as MMDDYY. And it’s not straight sortable.

        My team switched to using YYYY-MM-DD in all our inner communication and documents. The “daily date use” is not the issue you think it is.

        • DarkMetatron@feddit.org
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          Except that DDMMYY has the huge ambiguity issue of people potentially interpreting it as MMDDYY.

          Yes and YYYY-MM-DD can potentially be interpreted as YYYY-DD-MM. So that is an zero argument.

          I never said that the date format should never used, just that significants is a arbitrary value, what significant means depends on the context. If YYYY-MM-DD would be so great in everyday use then more or even most people would use it, because people, in general, tend to do things that make their life easier.

          There is no superior date format, there are just date format that are better for specific use cases.

          My team switched to using YYYY-MM-DD in all our inner communication and documents

          That is great for your team, but I don’t think that your team has a size large enough to have any kind of statistically relevance at all. So it is a great example for a specific use case but not an argument for general use at all.

          • suigenerix@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            16 days ago

            Yes and YYYY-MM-DD can potentially be interpreted as YYYY-DD-MM. So that is an zero argument.

            No country uses “year day month” ordered dates as standard. "Month day year, " on the other, hand has huge use. It’s the conventions that cause the potential for ambiguity and confusion.

            That is great for your team, but I don’t think that your team has a size large enough to have any kind of statistically relevance at all. So it is a great example for a specific use case but not an argument for general use at all.

            Entire countries, like China, Japan, Korea, etc., use YYYY-MM-DD as their date standard already.

            My point was that once you adjust, it actually isn’t painful to use as it first appears it could be, and has great advantages. I didn’t say there wasn’t an adjustment hurdle that many people would bawk at.

            https://en.m.wikipedia.org/wiki/List_of_date_formats_by_country

            • DarkMetatron@feddit.org
              link
              fedilink
              arrow-up
              0
              ·
              16 days ago

              Entire countries, like China, Japan, Korea, etc., use YYYY-MM-DD as their date standard already.

              And every person in those countries uses YYYY-MM-DD always in their day to day communication? I really doubt that. I am sure even in those countries most people will still use short forms in different formats.

              • suigenerix@lemmy.world
                link
                fedilink
                arrow-up
                0
                ·
                16 days ago

                Yes, and their shorthand versions, like writing 9/4, have the same problem of being ambiguous.

                You keep missing the point and moving the goal posts, so I’ll just politely exit here and wish you well. Peace.

                • DarkMetatron@feddit.org
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  16 days ago

                  I never moved the goalposts, all I always said was that a forced and clunky date format like YYYY-MM-DD will never find broad use or acceptance in the major population of the world. It is not made for easy day to day use.

                  If it sounded like I moved goalposts, that maybe due to english as a second language. Sorry for that.

                  But yes, I think we both have made our positions and statements clear, and there is not really a common ground for us. Not because one of us would be right or wrong but because we are not talking about the topic on the same level of abstraction. I talk about it from a social, very down to the ground perspective and you are at least 2 levels of abstraction above that. Nothing wrong with that but we just don’t see the same picture.

                  And yes using YYYY-MM-DD would be great, I don’t say anything against that on a general level, I just don’t ever see any chance for it used commonly.

                  So thank you for the great discussion and have a nice day.

      • GamingChairModel@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        Your day to day use isn’t everyone else’s. We use times for a lot more than “I wonder what day it is today.” When it comes to recording events, or planning future events, pretty much everyone needs to include the year. Getting things wrong by a single digit is presented exactly in order of significance in YYYY-MM-DD.

        And no matter what, the first digit of a two-digit day or two-digit month is still more significant in a mathematical sense, even if you think that you’re more likely to need the day or the month. The 15th of May is only one digit off of the 5th of May, but that first digit in a DD/MM format is more significant in a mathematical sense and less likely to change on a day to day basis.

        • DarkMetatron@feddit.org
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          For any scheduled date it is irrelevant if you miss it for a day, a month or a year. So from that perspective every part of it is exactly the same, if the date is wrong then it is wrong. You say that it is sorted in the order of most significants, so for a date it is more significant if it happend 1024, 2024 or 9024? That may be relevant for historical or scientific purposes but not much people need that kind of precision. Most people use calendars for stuff days or month ahead or below, not years or decades.

          If I get my tax bill, I don’t care for the year in the date because I know that the government wants the money this year not next or on ten. If I have a job interview, I don’t care for the year, the day and months is what is relevant. It has a reason why the year is often removed completely when dates are noted or made. Because it Is obvious.

          Yes I can see why YYYY-MM-DD is nice for stuff like archiving purposes, it makes sorting and grouping very easy but there they already use the best system for the job.

          For digital documents I would say that date and time information should be stored in a defined computer readable standard so that the document viewer can render or use it in any way needed. That could be swatch internet time as far as I care because hopefully I would never look at the raw data at all.

          • GamingChairModel@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            16 days ago

            You say that it is sorted in the order of most significants, so for a date it is more significant if it happend 1024, 2024 or 9024?

            Most significant to least significant digit has a strict mathematical definition, that you don’t seem to be following, and applies to all numbers, not just numerical representations of dates.

            And most importantly, the YYYY-MM-DD format is extensible into hh:mm:as too, within the same schema, out to the level of precision appropriate for the context. I can identify a specific year when the month doesn’t matter, a specific month when the day doesn’t matter, a specific day when the hour doesn’t matter, and on down to minutes, seconds, and decimal portions of seconds to whatever precision I’d like.

            • DarkMetatron@feddit.org
              link
              fedilink
              arrow-up
              0
              ·
              16 days ago

              Ok, then I am sure we will all be using that very soon, because abstract mathematic definitions always map perfectly onto real world usage and needs.

              It is not that I don’t follow the mathematic definition of significance, it is just invalid for the view and scope of the argument that I make.

              YYYY-MM-DD is great for official documents but not for common use. People will always trade precision for ease of use, and that will never change. And in most cases the year is not relevant at all so people will omit it. Other big issue: People tend to write like they talk and (as far as I know) nobody says the year first. That’s exactly why we have DD-MM and MM-DD

              YYYY-MM-DD will only work in enforced environments like official documents or workspaces, because everywhere else people will use shortcuts. And even the best mathematic definition of the world will not change that.

    • Cyclohexane@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      The appeal for json and yaml is readability, and partially ease of parsing. I say s-expressions win over both in both aspects.

      Can you please expand on your references to no-sql and your reference to “lightweight markup”? I don’t quite understand what you meant there.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      15 days ago

      S-expressions are basically directly writing the AST a compiler would normally generate. They can be extremely flexible. M-expressions were supposed to be programming part of Lisp, and S-expressions the data part. Lisp programmers noticed that code is just another kind of data to be manipulated and then only used S-expressions.

      Logo is arguably a Lisp with M-expressions. But whatever niche Logo had is taken by Python now.

  • lime!@feddit.nu
    link
    fedilink
    English
    arrow-up
    0
    ·
    17 days ago

    i’m a plan 9 from bell labs fan. Imagine how excited I was when wsl used 9P for its plumbing. then they scrapped it all for wsl2.

    just, the power they managed to get out of those union mounts… your application wants access to the mouse? sure, here’s a file named “mouse”. it’s got the coordinates in it. you want to draw to the screen? here’s a file called like “bitmap” or whatever, just write to it. you want to start a process on another machine? just cd to it and start the process there. want to have the UI show up on your machine? symlink your bitmap file to that directory.

    I also wish early web composability could have stayed and expanded. like, the old vlc embed player, which would just show up in your browser and could play any file inline? great stuff. Imagine if every application composed with everything else, like the android Activity and Intent concepts but for anything, just by virtue of living in the same os. need an image? just ask the os and it will present the user with many ways to procure an image, let the selected one run , and hand you back an image. you don’t even have to care where from. in a way, it’s what the arcan guy is doing with his experiments, although that’s more for stitching together graphical pipelines.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          0
          ·
          16 days ago

          They’re “file like” in the sense that they’re exposed as an fd, but they’re not exposed via the filesystem at all (Unlike e.g. unix sockets), and the existing API is just mapped over the sockets one (i.e. write() instead of send(), read() instead of recv()). There’s also a difference in how you create them, you open() a file, but connect() a socket, etc.

          (As an aside, it turns out Bash has its own virtual file-based wrapper around sockets, so you can do things like cat a remote port with Bash, something you can do natively in Plan 9)

          Really it just shows that “everything is a file” didn’t stand up in practice, there’s more stuff that needs special treatment than doesn’t (e.g. Interacting with TTYs also has special APIs). It makes more sense to have a better dedicated API than a generic catch-all one.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    16 days ago

    TOML instead of YAML or JSON for configuration.

    YAML is complex and has security concerns most people are not aware of.

    JSON works, but the block quoting and indenting is a lot of noise for a simple category key value format.

    • NostraDavid@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      15 days ago

      YAML is complex and has security concerns most people are not aware of.

      YAML is racist to Norwegians.

      If you have something like country: NO (NO = Norway), YAML will turn that into country: False. Why? Implicit casting. There are a bunch of truthy strings that’ll be cast automagically.

    • timbuck2themoon@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      15 days ago

      People bitch about YAML but for me it’s still the preferred one just because the others suck more.

      TOML like said is fine for simple things but as soon as you get a bit more complex it’s messy and unwieldy. And JSON is fine to operate on but for a config? It’s a mess. It’s harder to type and read for something like a config file.

      Heck, I’m not even sold on the S-expressions compared to yaml yet. But then, I deal with so much with all of these formats that I simply still prefer YAML for readability and ease of use (compared to the others.)

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      TOML is not a very good format IMO. It’s fine for very simple config structures, but as soon as you have any level of nesting at all it becomes an unobvious mess. Worse than YAML even.

      What is this even?

      [[fruits]]
      name = "apple"
      
      [fruits.physical]
      color = "red"
      shape = "round"
      
      [[fruits.varieties]]
      name = "red delicious"
      
      [[fruits.varieties]]
      name = "granny smith"
      
      [[fruits]]
      name = "banana"
      
      [[fruits.varieties]]
      name = "plantain"
      

      That’s an example from the docs, and I have literally no idea what structure it makes. Compare to the JSON which is far more obvious:

      {
        "fruits": [
          {
            "name": "apple",
            "physical": {
              "color": "red",
              "shape": "round"
            },
            "varieties": [
              { "name": "red delicious" },
              { "name": "granny smith" }
            ]
          },
          {
            "name": "banana",
            "varieties": [
              { "name": "plantain" }
            ]
          }
        ]
      }
      

      The fact that they have to explain the structure by showing you the corresponding JSON says a lot.

      JSON5 is much better IMO. Unfortunately it isn’t as popular and doesn’t have as much ecosystem support.

      • ulterno@lemmy.kde.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 days ago

        JSON5

        Nice. I mostly use Qt JSON and upon reading the spec, I see at least a few things I would want to have out of this, even when using it for machine-machine communication

      • Hawk@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 days ago

        You’re using a purposely convoluted example from the spec. And I think it shows exactly how TOML is better than JSON for creating config files.

        The TOML file is a lot easier to scan than the hopelessly messy json file. The mix of indentation and symbols used in JSON really does not do well in bigger configuration files.

      • MonkderVierte@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        16 days ago

        I read this somewhere. Since i didn’t find it anymore and don’t remember all the advantages aside from concurrence (don’t have to unpack a zip archive) i asked chatgpt:

        Using SQLite instead of ZIP for office formats can offer several advantages, particularly in terms of data management, performance, and functionality. Here are some key benefits:

        1. Structured Data Storage: SQLite is a relational database management system, which means it can store data in a structured format with relationships between different data entities. This allows for more complex data queries and relationships compared to a flat ZIP file structure.
          Query Capabilities: With SQLite, you can use SQL queries to retrieve and manipulate data efficiently. This is particularly useful for applications that require complex data retrieval, filtering, and aggregation, which would be cumbersome with a ZIP file.
          Integration with Other Tools: SQLite can be easily integrated with various programming languages and tools, making it a versatile choice for applications that require data storage and manipulation.
        1. Concurrency: SQLite supports multiple readers and a single writer, allowing for better concurrency when accessing and modifying data. This can be beneficial in collaborative environments where multiple users may need to access or update the data simultaneously.
        1. Data Integrity: SQLite provides features like transactions, which ensure that a series of operations either complete successfully or leave the database unchanged. This helps maintain data integrity, especially in scenarios where multiple operations are performed.
        1. Ease of Updates: Updating specific pieces of data in an SQLite database can be more efficient than modifying a ZIP file, which may require decompressing, altering, and recompressing the entire file.
        1. Reduced File Size: While ZIP files compress data, SQLite can store data in a more compact format, especially for structured data. This can lead to smaller file sizes for certain types of data. Built-in Data Types: SQLite supports various data types (e.g., INTEGER, TEXT, BLOB), which can be beneficial for storing different kinds of data in a more organized manner compared to the generic binary format of ZIP files.
        1. Versioning and History: SQLite can be used to implement versioning and history tracking for documents, allowing users to maintain a history of changes and revert to previous versions if necessary.

        I put related points together. One point was moot, removed.