[–] 12 points 1 week ago* (3 children)

Just like everyone else, I'll also recommend forgejo. But be prepared to handle bot traffic if you self-host it. My instance was hit almost constantly until I added strict rate limits, and made most of the stuff private. For a portfolio, I think Codeberg (or GitHub, that's where everyone looks for stuff) is better that self-hosting. But it can be good to keep a private instance for mirrors.

  • source
  • [–] 7 points 2 weeks ago* (last edited 2 weeks ago)

    I'm sorry, but since we're being pedantic, this is not a proof. It's full of assumptions, some of which are wrong.

    5% is clearly better than 100%

    Never denied it. 0% is even better. What matters is where it's used. If it's used for FFI, that's understandable. Any other use should be scrutinized more. And that's the issue. The claim of Zig's creator is that the devs of Bun are not reliable. And to me at least, his arguments make sense.

    it’s usual for Rust projects to use at least some unsafe

    Doesn't seem like it. This article claims that only about 20% of Rust crates use unsafe at all. Even among those, the vast majority use it for FFI, which is kinda unavoidable.

    but somehow 5% isn’t

    Again, no one claimed that. But we need more than "better than 100%" when it's a JS runtime. And the "better"ness isn't necessarily linear. So, even though it might be technically "better", it might not be by much. At that point, what even is the point of the rewrite?

    Again, I'm not claiming that it's actually badly written. I'm only claiming that your arguments are not adequate, and that Bun is not a reliable company, so take whatever they claim with a grain of salt.

  • source
  • parent
  • context
  • [–] 12 points 2 weeks ago* (2 children)

    It depends on where exactly that 5% lies. If it's in the core API that's used by the rest of the architecture, it essentially makes the whole codebase unsafe when used irresponsibly.

    I don't know if that's the case here, just pointing out that the 5% doesn't mean much.

  • source
  • parent
  • context
  • [–] 7 points 2 weeks ago*

    When coding, I usually listen to Indian classical. It can't have any lyrics, as I get distracted by them.

    When studying (it's my actual job, I'm a mathematics researcher), I usually prefer white noise, or just a good pair of noise cancelling headphones without anything actually playing on it. Sound of rain works pretty well too.

  • source
  • [–] 10 points 3 weeks ago* (last edited 3 weeks ago)

    As far as I understand, it doesn't keep copies of the different edits. The original file is saved, and the edits are serialized and stored in some form. Only one more copy is generated for the final version for preview and such. When editing again, you can add to or subtract from previous edits, and again a maximum of two files will be present. (But there would be no thumbnail, preview etc. for the original. So it isn't exactly double the storage usage.)

    This is my vague recollection from what I've read in the discussions, so take it with a grain of salt. But this is close to what's happening when you're editing.

  • source
  • parent
  • context
  • [–] 9 points 3 weeks ago* (1 child)

    neovim

    It just feels right. It took me some time to get used to the vim motions. But man, does it make moving around any project so fast and natural. I went in for the customizability. And that's obviously there. But the sheer speed it gives me is uncanny. My past self with VS Code could never.

    I'd also suggest taking some time to write your own config from scratch once you get the hang of it; it'll be worth it.

  • source
  •  

    This release brings three main changes.

    1. The ability to filter links.
    2. Support for an optional notes field.
    3. Ability to edit expiry time and notes.

    I try not to too many new features to avoid bloat, but it seemed like these were pretty useful for a link shortener, especially when managing thousands of short links. (To my surprise, some people even use it to manage millions of links.)

    Please take a look at the release notes for a complete list of changes.

    P.S. The next thing I'll be focusing on is improving throughput under sustained load. If anyone has experience with SQLite, feel free to drop any tips. All the db related code is here. I'm mostly interested in improving insert speeds when 1000s of inserts are done per second.

    Edit: There's a Codeberg mirror as well.

     

    Hi, I'm a beginner when it comes to Haskell, but I guess I'm somewhat comfortable with the language itself. I'd love to try building some stuff using it. However, I'm finding it very hard to properly use external libraries/packages.

    I'm familiar with Rust's cargo, and go's package management system, and feel very comfortable using them. Are there similar ones for Haskell? Basically, I want them defined per project, and not have to install everything system-wide. I'd like to be able to provide users with simple instructions for replicating the whole build setup.

    What's the idiomatic way? Are there any example packages that I can look at that are not too complicated?

     

    As the title says, it's a rather simple golang script for creating memories in Immich based on certain criteria, since there aren't any customization options in the official app.

    As you may gather from the README, I created this for very personal reasons. But I wanted to share it here in case someone else finds it useful as well.

    Currently it can do filtering based on people, and tags. But I'm more than happy to add more options, if requested.

    submitted 4 months ago* (last edited 4 months ago) by to c/cooking@lemmy.world
     

    I had looked for selfhosted recipe management apps for a while, but none really fit my need. I liked WikiJS a lot, but it was a hassle to get recipes on to it since there's no tooling for scraping from sites.

    So I decided to create a python tool that does the scraping. It's finally in a state where I can share it with others. Of course, it's meant to be used only for archival purposes.

    You can see some recipes created with it on my wiki.

    Any feedback is welcome. I hope that this is the correct community for this. Given how pro-selfhosting lemmy is in general, I thought this might be welcome here.

     

    cross-posted from: https://programming.dev/post/39212874

    I recently migrated my services from rootful docker to rootless podman quadlets. It went smoothly, since nothing I use actually needs to be rootful. Well, except for caddy. It needs to be able to attach to privileged ports 80 and 443.

    My current way to bypass it is using HAProxy running as root and forwarding connections using proxy protocol. (Tried to use firewalld but that makes the client IP opaque to caddy.) But that adds an extra layer, which means extra latency. It's perfectly usable, but I'd like to get rid of it, if possible.

    I'm willing to run caddy in rootful podman if needed. But from what I understand, that means I can't have it in the same rootless network as my other containers. I really don't wanna open most of my containers' ports, so that's not an option.

    So, I'm asking whether any of these three things are possible.

    1. Use firewalld to forward ports to caddy without obscuring the client's IP.
    2. Make rootful caddy share a network with other rootless containers.
    3. Assign privileged ports to caddy somehow, in rootless mode. (I know there's a way to make all these ports unprivileged, but is it possible to only assign these 2 ports as unprivileged?)

    Or maybe there's a fourth way that I'm missing. I feel like this is a common enough setup, that there must be a way to do it. Any pointers are appreciated, thanks.

     

    I recently migrated my services from rootful docker to rootless podman quadlets. It went smoothly, since nothing I use actually needs to be rootful. Well, except for caddy. It needs to be able to attach to privileged ports 80 and 443.

    My current way to bypass it is using HAProxy running as root and forwarding connections using proxy protocol. (Tried to use firewalld but that makes the client IP opaque to caddy.) But that adds an extra layer, which means extra latency. It's perfectly usable, but I'd like to get rid of it, if possible.

    I'm willing to run caddy in rootful podman if needed. But from what I understand, that means I can't have it in the same rootless network as my other containers. I really don't wanna open most of my containers' ports, so that's not an option.

    So, I'm asking whether any of these three things are possible.

    1. Use firewalld to forward ports to caddy without obscuring the client's IP.
    2. Make rootful caddy share a network with other rootless containers.
    3. Assign privileged ports to caddy somehow, in rootless mode. (I know there's a way to make all these ports unprivileged, but is it possible to only assign these 2 ports as unprivileged?)

    Or maybe there's a fourth way that I'm missing. I feel like this is a common enough setup, that there must be a way to do it. Any pointers are appreciated, thanks.

    submitted 1 year ago* (last edited 1 year ago) by to c/neovim@programming.dev
     

    I simply want to emulate the effect of -p by default i.e. open all files in tabs when multiple files are supplied. I wrote the following autocommand to make it work.

    -- Open files in tabs by default
    vim.api.nvim_create_autocmd("VimEnter", {
        callback = function()
            if not vim.opt.diff:get() and #vim.fn.argv() > 1 then
                vim.cmd("tab sball")
                vim.cmd("tabfirst")
            end
        end,
    })
    

    But it seems to bork the colorscheme for all but the first tab. It's weird since Running the same commands manually after neovim is loaded works perfectly. I may have something to do with the order in which things are run. Is it possible to run this command as late as possible?

    I'm open to alternative approaches that gets the job done.

     

    I thought of this after a recent trip with some friends. We shared the photos when we were still in person. But sometimes we need to share a lot of photos over the internet. In the past, we have used a shared google drive directory for this. But I'd prefer a self-hosted option. There should be some sort of password protection as well (ideally per share, and no need for accounts). One should be able to both access the current files and upload new ones, just like google drive or dropbox.

    I currently have FileShelter, which works for 1-to-1 sharing but not for groups. I guess something like ProjectSend would work, but it's too complex for my usecase. I'd prefer something more lightweight since I'll maybe use it once every few months. Also, it should be noob-friendly, and accessible using a browser.

    Update: I'm very happy with copyparty. It does what I want, and much much more. I even replaced my older webdav server with it since it provides more granular control over share locations and permissions. Kudos to the developer @tripflag@lemmy.world!

    view more: next ›