- 10 Posts
- 4.42K Comments
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
12·2 days agoHaving to make a decision isn’t my primary issue here (even though it can also be problematic, when you need to serialize domain-specific data for which you’re no expert). My issue is rather in that you have to write this decision down, so that it can be used for deserializing again. This just makes XML serialization code significantly more complex than JSON serialization code. Both in terms of the code becoming harder to understand, but also just lines of code needed.
This is, without a doubt, the stupidest argument against XML I’ve ever heard. Nobody has trouble with using attributes vs. tag bodies. Nobody. There are much more credible complaints to be made about parsing performance, memory overhead, extra size, complexity when using things like namespaces, etc.
I’ve somewhat come to expect less than a handful lines of code for serializing an object from memory into a file. If you do that with XML, it will just slap everything into child nodes, which may be fine, but might also not be.
No - it is fine to just use tag bodies. You don’t need to ever use attributes if you don’t want to. You’ve never actually used XML have you?
https://www.baeldung.com/jackson-xml-serialization-and-deserialization
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
1·2 days agoYes, which needs to be supported by your parser.
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
3·2 days agoI mean, yeah. But people don’t just do things randomly. Most people put data in the body and metadata in attributes just like html.
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•An alternative decentralized internet for sharing text and media: The Gemini ProtocolEnglish
314·2 days agoNeat. That’s going nowhere. Less formatting than even markdown… Hey kids you like plain text files right?
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
4·2 days agoThey’re siblings. They both derive from SGML. There is a version of HTML that is also XML conformant called XHTML but it never caught on…
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
31·2 days agoJSON is super easy to read and write though. Just needs a parser that allows comments…
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
7·2 days agoFuck yaml. TOML or literally anything else.
atzanteol@sh.itjust.worksto
Programming@programming.dev•The lost art of XML — mmaguetaEnglish
93·2 days agoThis is your confusion, not an issue with XML.
Attributes tend to be “metadata”. You ever write HTML? It’s not confusing.
atzanteol@sh.itjust.worksto
Programming@programming.dev•I created a dedicated Show & Tell community for showing off personal projectsEnglish
211·6 days agoYou want purity tests for people sharing a things they did? 🙄
Maybe whether they asked any forums for help? Do you want to know who they voted for as well?
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•Way to try multiple distros over period of month possiblyEnglish
1·8 days agoYou can just spin up VMs on any Linux distro. Running unraid as a desktop (or proxmox) is kinda ridiculous.
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•Sometimes, my computer is very slow and sometimes really fast. Fedora 43.English
3·9 days agoWhat are IO and Iotop?
Input / Output.
Reading and writing to disk, network, etc.
iotopshows will show applications writing and reading from disk. It’s going to likely be pretty sporadic.What may be happening, and what others are suggesting, is that you’re running out of memory (8gig isn’t that much these days). When that happens the system starts writing memory to disk so it can free more. That’s what you see with the “swap” usage. You can see a bit more about your memory usage with
free -m:$ free -m total used free shared buff/cache available Mem: 64141 17077 24020 1981 30419 47063 Swap: 20479 0 20479Using swap space isn’t necessarily bad. But reading/writing to it frequently can be a performance killer. You can monitor that with a command called
vmstat:$ vmstat -w 3 --procs-- -----------------------memory---------------------- ---swap-- -----io---- -system-- ----------cpu---------- r b swpd free buff cache si so bi bo in cs us sy id wa st gu 1 0 0 24590136 70748 31066604 0 0 228 309 9959 18 8 1 91 0 0 0 0 0 0 24595172 70748 31065076 0 0 0 119 3159 6677 2 1 98 0 0 0 2 0 0 24607436 70748 31070316 0 0 2300 75 3147 6693 2 1 97 0 0 0 0 0 0 24594892 70748 31070316 0 0 0 584 3417 5950 1 1 98 0 0 0The columns to pay attention to there are under the
---swap--header.siis “Swap In” andsois "Swap Out. Those are reads/writes to and from swap space. Seeing a little activity there is fine. It is typically pretty spikey. But if you’re seeing lots of numbers there then it could just indicate that you’re running low on memory and the OS needs to move things to and from disk frequently. While it’s moving things to and from the disk the application trying to use that memory has to wait.
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•Sometimes, my computer is very slow and sometimes really fast. Fedora 43.English
21·9 days agoHow so, given that we immediately re-enable the same swap device right after so that it’s only off for a very brief moment? Let go :)
$ free -m total used free shared buff/cache available Mem: 64141 17213 24010 1984 30297 46927 Swap: 20479 0 20479See that
buff/cachecolumn? That’s memory being used by the system for caching. Files you you open and access get cached into memory as do inodes, filesystem objects, etc. If you run a “find / -type f” twice in a row the second one will be significantly faster because the first run cached a lot of objects into memory.By starving the system of memory all that will be flushed and you get more disk access doing things you’re actually trying to do. Whereas things sitting in swap are there because they aren’t currently needed.
By turning off swap and then back on again you’re just forcing the system to drop all that cache which it will then attempt to reclaim space for and push things back out to swap.
I don’t know what benefit you think you’ll gain in the process.
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•Sometimes, my computer is very slow and sometimes really fast. Fedora 43.English
2·9 days agoTurning off swap could make things much worse though. The system will have less memory for file caches.
I’d leave swap alone, just monitor for whether the system is paging frequently. “vmstat 3” should show if you’re writing to swap frequently.
atzanteol@sh.itjust.worksto
Linux@lemmy.ml•Sometimes, my computer is very slow and sometimes really fast. Fedora 43.English
4·9 days agoDon’t run swapoff if everything in swap may not fit in RAM.
atzanteol@sh.itjust.worksto
Programming@programming.dev•How GitHub monopoly is destroying the open source ecosystemEnglish
211·12 days agoI know the solution. Starting this year, students will be forced to contribute to a project they use, care about or, at the very least, truly want to use in the long term. Not one they found randomly on Github.
And they’re still going to find things on GitHub. Because so many things are on GitHub.
They’re blaming the students for the popularity of GitHub. If they want students to not use GitHub then just make that a requirement.
It doesn’t matter what people “celebrate”
Yes it does - because that is the point of this post.
If the question is if these operating systems are “Linux”, then yes, they are.
That is not the question as was pointed out to you.












That’s 99% of what most people do.