Skip Navigation
Applied to more than hundred jobs last night, and already five rejections...
  • am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)

    zswap is a "front swap", it needs a backing swap to function that's crucial to the design. It automtically goes in front of all the swaps you have enabled.

    You could probably put the backing swap on a loop device on a tmpfs, but I don't know how it will handle the loopback. It's a better idea to put it on disk. It can be a slow or write-limited disk, it will not get used much. You definitely should not use zram and zswap at the same time.

  • This community note is fuckin wild.
  • nerd excuse me the embargo has an exception for food and medicine

    It's really easy you see, you just need to pass an inspection and get a written permission from the President of the US, the payment must be made in cash in US dollars before shipment and through some non-American bank, and the shipping company must go straight from a US port to a Cuban port and back with no layovers.

    This is not a joke, it's what is actually written in the law.

  • Applied to more than hundred jobs last night, and already five rejections...
  • Yes, more or less, they are closely related:

    In regular swap, when you're low on memory the kernel chooses some memory pages (low priority processes and least recently used) and writes them on disk on a file or partition. When the process that owns those pages need them back, the kernel goes fetch them one at a time. Since memory pages are 4KiB the speed on this depends on the 4k random access speed of your disk.

    You can have more than one swap, and the order they are used depends on their priority, or on the order they were enabled in if you didn't specify any priority.

    zram is a kind of swap space that, instead of writing to disk, compresses the pages and writes them back in RAM. You set an uncompressed size for it and if the pages don't compress well (usually encrypted on already-compressed data) then it will occupy the same amount of RAM. Since you can't tell in advance what the compressed size will be and there's no mechanism to stop it from filling up, you must be conservative on the size of zram. When the zram gets full all new pages will go to the next swap in priority order. This causes a problem where there's old data you don't care about taking RAM space in zram that cannot be reclaimed, and then your workload is going to regular swap which is slow.

    zswap is a layer on top of swap, the technical name is "frontswap". For it to work you need to already have a swap configured. Before memory pages are written down on the swap file, they are compressed, and if the compression ratio is good enough the pages go to RAM instead of to the swap file. You set a compressed size for the zswap (by default, 20% of your total RAM) and when this limit gets full the least recently used pages are written to disk. The compression is so fast that you barely notice a hiccup while it's happening, it feels like you magically have 50% more RAM than before.

    Answering your question, zswap is configured by kernel parameters, and now that you mention it it might work to put the parameters on the kernel cmdline instead of editing sysfs, this means configuring the boot loader and adding zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=z3fold to the kernel cmdline.

  • Applied to more than hundred jobs last night, and already five rejections...
  • zswap has the same purpose than zram but a better design: it sends to disk the pages that cannot be compressed, and when it gets full it writes them back least recently used first. zram on the other hand keeps uncompressible pages around, and when it gets full all new pages go to disk and it makes the situation worse when you're low on RAM.

  • Applied to more than hundred jobs last night, and already five rejections...
  • The size is allright, but the zswap config is crucial.

    I can't figure out how to do it in guix with any certainty, perhaps you can enable it manually once to test and then research it better if you feel that it's worth it. Like this, as root:

    modprobe zswap
    echo z3fold > /sys/module/zswap/parameters/zpool
    echo lz4 > /sys/module/zswap/parameters/compressor
    echo 1 > /sys/module/zswap/parameters/enabled
    sysctl vm.swappiness=100
    

    The 1 > enabled must be written after the other two. If you don't have sysfs mounted at /sys, check with the mount command where it is.

    A couple of mailing list threads that may help you do it "properly" in guix:

    https://lists.gnu.org/archive/html/guix-devel/2023-02/msg00077.html https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00332.html

  • Applied to more than hundred jobs last night, and already five rejections...
  • Try this if you have low RAM, I lived with it for months when I had a broken DIMM and had to make do with 4 GB. The difference is incredible.

    /etc/tmpfiles.d/zswap.conf

    #Type Path                              Mode UID GID Age Argument
    w /sys/module/zswap/parameters/zpool	- - - -	z3fold
    w /sys/module/zswap/parameters/compressor	- - - - lz4
    w /sys/module/zswap/parameters/enabled	- - - - 1
    

    /etc/sysctl.d/00-swappiness.conf

    vm.swappiness = 100
    

    Depending on your workload you may increase swappiness to 200 with good results.

    You need to set up some 8 GB of swap, it's mostly for accounting purposes and will barely get used so it can be anywhere. If you already have zram, disable zram, it's counter productive. Use the swapon command with no arguments to check if you have zram.

  • You know how the very first introduction to programming in schools is a thought experiment that involves listing a set of rigorous instructions to make a sandwich?
  • I doubt they worried about being condescending, lots of people fear that the official documentation will be too difficult and never read it. The logic is that the docs are arcana written by witches that know how to write programming languages, and the tutorials are written by regular girls that had to struggle to understand the language instead of the syntax just appearing on their heads.

    I pretty much learned how to program from the official Python tutorial. I had been struggling for years before that; I had some notions but I couldn't put together anything really useful. The Python docs got me over the hump precisely because of what OP said: it starts from 0 and builds up until you have enough tools to write whatever project you have in mind. I imagine that having had to design and reason everything about the language actually gives the writer a great sense of how it fits together and what the logical increments are.

    Since then I always go first to whatever the language designers wrote; for example K&R's The C Programming Language, the Rust book, the Postgresql manual, etc, and only once I feel that I know enough I complement it with other sources.

    This approach extends to libraries as well: first I read whatever official docs there are, then I search the source code for the functionality I need to learn about, and only if that fails I look elsewhere.

    It seems like a slow method but it's so reliable that it works out for me. After a while of doing this you become the reference and people come ask you questions.

  • You know how the very first introduction to programming in schools is a thought experiment that involves listing a set of rigorous instructions to make a sandwich?
  • Python in particular is very well documented. There are two levels, the official tutorial that glosses over stuff and presents things conceptually, and the reference that tells you exactly what is happening and what the syntax does.

    That whole chapter about the data model is really useful when you try to do anything fancy with Python. It's all in one page so you can Ctrl-F all the arcane definitions.

  • Are graphics cards going to keep getting bigger forever?
  • Of course you had to have something to drive the VGA outputs. Usually this meant a VIA, SiS, or Unichrome chip in the motherboard. Those chips often had no 3D acceleration at all, and a max resolution of 1280x1024. You were lucky to have shaders instead of fixed-function pipelines in 2008-era integrated graphics, and hardware accelerated video decoding was unheard of. The best integrated GPUs were collaborations with nVidia that basically bundled a GPU with the mainboard, but those mainboards were expensive.

    Windows Vista did not run well at all on these integrated chips, but nobody liked Windows Vista so it didn't matter. After Windows 7 was released, Intel started bundling their "HD Graphics" on CPUs and the on-die integrated GPU trend got started. The card in the picture belongs to the interim time where the software demanded pixel shaders and high-resolution video but hardware couldn't deliver.

    They left a lot of work for the CPU to do: if you try to browse hexbear on them you can see the repainting going from top bottom as you scroll. You can't play 720p video and do anything else with the computer at the same time, because the CPU is pegged. But if you put the 9500 GT on them then suddenly you can use the computer as a HTPC. It was not an expensive card, it was 60-80 USD, and it was a logical upgrade to a tower PC you already have to make it more responsive and enable it to play HD video.

  • Are graphics cards going to keep getting bigger forever?
  • Yes, it was the cheapest graphics card that could decode 1080p H.264 video in real time (and the acceleration worked in the Flash player). The 8500 GT could also do it but it was never popular. It made a huge difference when youtube became a thing.

  • Are graphics cards going to keep getting bigger forever?
  • The card in the picture is of a kind that no longer exists: the basic, office computer GPU.

    It got entirely displaced by integrated graphics.

    So in a way they did get smaller, so small that they share a piece of silicon with the CPU. The only cards that remain are those that are so power hungry they can't share power and cooling with the CPU.

  • I literally don't get why private landlords are allowed to exist. The current housing model is simply really, really dumb and I'm so tired.
  • I've got a hang-over pet policy from when I was a baby leftist to abolish rents on land, but with a twist: Any exchange of money for the use of a property is a sale. It's absolutely financial neoLIB bullshit but I can't take it off my mind.

    The idea being that if, over time, you pay the landlord for maintenance + the value of the house, you get the title for the house, and this is the law and you can go to court, prove that you've paid for rent over however many years, and get the title of the house.

    If you leave before that there'd be some system where the "rent" payments are split equally and you get the value back from whoever is currently living there, because you're selling your share to them. Since the payments are split equally minority "shareholders" leave first. If nobody lives there but you're paying taxes and maintenance, you still paying for the house so you accrue shares of the house.

    I think it might be palatable for neolibs, destroy the value of homes for rent-seeking, but preserve it for construction, which is what libs always complain about when you talk about abolishing rent.

  • Hexbear started not loading at all in firefox on linux, but does in chrome, and it does in firefox on windows. Anyone have a clue what's going on or how to fix this?
  • It sounds exactly like that. Perhaps you ran firefox as root at some point?

    I'd say:

    • delete the cache:
    rm -rf .cache/mozilla
    
    • set yourself as the owner of everything under ~/.mozilla:
    chown -Rc $(id -u):$(id -g) ~/.mozilla
    
    • make sure you can write to everything under /.mozilla:
    chmod -Rc u+w ~/.mozilla
    

    If you get permissions errors, run them with sudo.

  • Hexbear started not loading at all in firefox on linux, but does in chrome, and it does in firefox on windows. Anyone have a clue what's going on or how to fix this?
  • Another idea is to press F12 to open the dev tools, go to the network tab, and refresh the page. If something is not loading it will be highlighted in red and it will tell you the reason.

    It might be some addon messing things up, you can launch firefox with no addons with firefox --safe-mode.

    Does it happen in a "private" window?

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)UN
    unperson [he/him] @hexbear.net
    Posts 0
    Comments 51