Skip Navigation
What Linux distro surprised you the most?
  • voidlinux: gave me much better battery life - I assume because it starts as a minimal system and one adds only the essentials to do the job - compared to the soup-to-nuts distros that pile everything in so that newbies are acccomodated. Of course, the voidlinux approach needs more linux skills - but it's not that hard and the doco is great.

    Also, I love the back to basics runit init system and runsv service runner (I'm old so I like that stuff) and the ultra fast xbps packaging system.

  • Has anyone made Linux Reddit Archives?
  • Quite right!

    You need to take it all (AI or internet searches) with a huge pinch of salt. Even ye olde text books were not infallible and often out of date, so sodium chloride was also required even then.

    The code either works or it doesn't - it's all in the testing. If you deploy AI suggestions without thought you deserve the consequences.

  • Some RSS links from lemmy feeds are broken - or is it my reader?
  • I followed up on github as you suggested and a very nice young man took a look at it and said that the code already does work the right way (at least the way I and their little poll think it should work). But, it turns out that the fix (from 2021) has not been deployed - it's to be in the next release.

    So I don't know what will happen now - I'll continue to use my workaround, so I'm happy enough.

  • Some RSS links from lemmy feeds are broken - or is it my reader?
  • It might be more expected for you but I'm going to differ.

    for an article (or a link to a image), it takes you there instead.

    ... and then you can't get to the discussion.

    The RSS-2.0 definition of <link> is

    The URL to the HTML website corresponding to the channel.
    

    so clearly, it should point to the lemmy post. No other RSS feed that I know of has this problem.

    Fortunately, emacs can flex around this, but duh! Where can I raise a bug report?

  • Some RSS links from lemmy feeds are broken - or is it my reader?

    Most entries in lemmy's RSS feed have a <link> that points to the relevant lemmy post eg Title: Any DE or distro without touch support? Author: https://lemmy.ml/u/tarius Date: Wed, 15 May 2024 01:24:59 AEST Feed: Lemmy - linux Link: https://lemmy.ml/post/15632012 That makes sense - clicking the link takes me to the conversation.

    Other entries however, include a link to the subject of the conversation eg Title: Wayland usage has overtaken X11 Author: https://lemmy.world/u/KISSmyOSFeddit Date: Tue, 14 May 2024 03:30:46 AEST Feed: Lemmy - linux Link: https://lemmy.world/pictrs/image/a71c1b49-fb63-420d-8afc-d40661ffd79c.png The feed I'm using is https://lemmy.ml/feeds/c/linux.xml

    This is unfortunate as clicking the link in my reader (elfeed) does not show the conversation - I rely on the <link> to take me there.

    elfeed being built in elisp in emacs, I have been able to concoct a fix especially for lemmy - but it really feels like a bug in lemmy as no other feed needs it. Where can I report it or discuss it?

    5
    Not an elfeed bug

    ... more an annoyance really, and not elfeed's fault at all but ...

    [first posted on reddit/r/emacs but probably more interesting here]

    lemmy RSS feeds (such as "https://lemmy.ml/feeds/c/emacs.xml") often (but not always) have mis-guided "Link:" elements which target an external link, an image file or other material instead of the lemmy post itself. Consequently, hitting 'b' elfeed-search-browse-url may send one on a surprising if not always useful journey.

    eg

    ``` Title: Keymacs, a program to generate Emacs keybindings | Plain DrOps Author: https://feddit.de/u/DrOps Date: Tue, 23 Apr 2024 23:35:25 AEST Feed: Lemmy - emacs Tags: emacs, lemmy Link: https://plaindrops.de/blog/2024/keymacs/

    submitted by DrOps to emacs 8 points | 2 comments https://plaindrops.de/blog/2024/keymacs/ ```

    In this case, the link to lemmy itself is in the "2 comments" => https://lemmy.ml/post/14798221

    Here's a little hook to fix it up - it also marks the entry with the tag 'lemmy-fixed' ...

    ``` (defun elfeed-fix-lemmy-link (entry) "Fix lemmy.ml RSS feed links in elfeed." (when-let ((url-base-regexp "https://lemmy\\.ml/") (feed (elfeed-entry-feed entry)) (feed-url (elfeed-feed-url feed)) ((string-match-p (concat url-base-regexp "feeds/c/") feed-url)) (entry-link (elfeed-entry-link entry)) (link-url-regexp (concat url-base-regexp "post/[0-9]+")) ((not (string-match-p link-url-regexp entry-link)))) (when-let ((content (elfeed-deref (elfeed-entry-content entry)))) (let ((lines (split-string content "\n"))) (dolist (line lines) (when (string-match link-url-regexp line) (let ((post-link (substring line (match-beginning 0) (match-end 0)))) (setf (elfeed-entry-link entry) post-link) (elfeed-tag entry 'lemmy-fixed) (message "Fixed lemmy link in elfeed: %s" post-link) (cl-return)))))))) (add-hook 'elfeed-new-entry-hook #'elfeed-fix-lemmy-link)

    ```

    Thanks to u/karthik for getting me started with this. The crappy elisp is mine not his (roast me!)

    0
    Wrote some simple code to prevent saving .json if it doesn't parse
  • I find the various linters and checkers a bit too intrusive while I'm trying to code - I prefer to just have a check when I stop fiddling with the code and save it. So I have these checks run in after-save-hook - if there are errors, I get a popup otherwise nothing and all is good:

    ;; ** syntax checking on file save:
    (defun bh/check-syntax ()
      "Check syntax for various languages."
      (when (eq major-mode 'emacs-lisp-mode)
        (ignore-errors (kill-buffer byte-compile-log-buffer))
        (let ((byte-compile-warnings '(not free-vars obsolete unresolved)))
          (unless (byte-compile-file buffer-file-name)
            (pop-to-buffer byte-compile-log-buffer))))
      (when (eq major-mode 'sh-mode)
        (compile (format "bash -n %s && shellcheck -f gcc %s" buffer-file-name buffer-file-name) t))
      (when (eq major-mode 'ruby-mode)
        (compile (format "ruby -c %s" buffer-file-name) t))
      (when (eq major-mode 'python-mode)
        (compile (format "python -B -m py_compile %s" buffer-file-name) t))
      (when (eq major-mode 'awk-mode)
        (compile (format "AWKPATH=$PATH gawk --lint --source 'BEGIN { exit(0) } END { exit(0) }' --file %s" buffer-file-name) t)))
    

    (add-hook 'after-save-hook #'bh/check-syntax)

    I don't work much with json files but I daresay the idea could be extended to them. Sorry about the crappy elisp.

  • looking for half-stable Linux distro
  • You can't avoid IBM/RedHat - they contribute to the kernel and many, many other parts of Linux eg systemd. I have no idea what you mean by DIY distros, what a peculiar adjective in this context. Linux itself is DIY. Life is DIY.

    That said, voidlinux is an independent distro without systemd or snaps based on runit for init and xbps for package management. It's also a STABLE rolling release.

  • 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/)ST
    StrangeAstronomer @lemmy.ml
    Posts 2
    Comments 33