Skip Navigation

Posts
121
Comments
782
Joined
3 yr. ago

Formerly /u/Zagorath on the alien site.

  • The dirty little secret is...there is no "true markdown". There are multiple different implementations of markdown that have been created by different people at different times, all vaguely based on the original not-very-robust definition created by John Gruber with assistance from Aaron Swartz in 2005. But their definition never mentioned superscript at all.

    Because of how unrobust it is, in 2014, some people got together to define a robust specification and called it CommonMark. But again, this does not mention superscript.

    The closest you'll find to an "official" specification for the extra bits of markdown that aren't in the CommonMark spec is probably here. But this is really more attempting to describe extended markdown as it is used on the web at large already. In addition to super- and sub-script, it also deals with tables (which work the same way Reddit does them) and fenced code blocks (the triple backtick method, which Reddit does not support—instead supporting only code blocks via four spaces). Though both fenced and indented code blocks are actually in the CommonMark spec.

    Reddit, obviously, is one site that famously implements markdown, and has done for a very long time. On Reddit, superscript is done with a caret before the superscript text, and whitespace after it. Unless you use brackets, in which case the superscript lasts until the closing bracket. e.g. normal^superscript text would make "superscript" superscript, but nothing else. But normal ^(superscript text) would make "superscript text" superscript. But then there's a second caveat, which is that Reddit supports double (and triple, etc.) superscript. But in these cases, brackets do not work. They unintuitively completely break things.

    Lemmy also uses markdown. The Lemmy specification for how to use markdown is located here. You'll note that it supports both superscript and subscript, which Reddit does not. It does both of these according to the method explained in the "markdown guide". Though there are a few issues with inconsistent parsing of the markdown on lemmy-ui (the default web front-end) and some apps (including Jerboa, the 1st-party app).

    The big advantage of the markdown guide method is that it is most similar to how other markdown works. You don't implicitly close italics on a word with just one asterisk; you need two asterisks—one to open italics, one to close them. Likewise, bold with double asterisks. By using a character to both open and close your super/sub-script, you are making a much clearer and more deliberate intention about what you want, and allowing people to learn things more intuitively, because it all works the same way as each other.

  • No need to escape the carets. On Lemmy, superscript is done by placing a caret both before and after the text you want to be superscript. So

     
            x = x^1/2^ * x^1/2^
    
    
      

    becomes

    x = x1/2 * x1/2

  • He is shunned among liberal gun nuts like me

    Sorry, but, umm...you are aware that "gun nut" is not a compliment, right? Nor a neutral term. It's pretty directly an insult towards people who oppose common sense gun regulation à la Australia. Because they are "nuts", meaning crazy.

  • If you’re asking for money to fix bugs, that incentivises writing code with bugs, as if you write perfect code first time nobody will pay you to fix it

    There's certainly potential for that to be a problem. But it's not necessarily insurmountable. For starters, I think the idea is you're not paying to have your thing fixed, you're paying to have your thing prioritised. The same amount of work is getting done either way, but bugs reported by people who paid will be prioritised over bugs reported by people who don't pay. If there are no bugs reported by paid users, then unpaid bugs will still be worked on.

  • Any web page can be printed. Any print can be sent to a PDF generator. It might not look super pretty, but it'll get the job done. I recommend making sure you're on light mode before you print though, because dark mode has grey text instead of black.

  • To be fair to JavaScript (I feel gross just saying that), it does have the ability to do some more functional-like programming as well. For example, many of its more recent array methods like filter, map, and reduce are pure functions.

  • Nothing wrong with classes in functional programming though. Just return a new instance of the class from your method, rather than mutating an existing instance.

  • I think I like the format in theory, but tbh I didn't enjoy watching this nearly as much as I had expected. The extremely niche New York City references probably didn't help, and I found member of the "establishment" Rachel Coster to be absolutely unbearable.

    I thought the winner here deserved to win it. They were genuinely really funny, and not in a forced way like I found some of the others to be.

    I'll be watching more of this, but I don't know how much more.

  • Honestly I can't even figure out how to get that alpine-chrome image to work. I edited my Dockerfile to say

     dockerfile
        
    FROM zenika/alpine-chrome:with-puppeteer
    
      

    instead of

     dockerfile
        
    FROM node:22
    
      

    I tried changing USER node to USER chrome. I removed all the apt-get dependencies that were needed to get Puppeteer working in Docker on my PC in the first instance, and added --chown=chrome to my COPY package.json line, all as described in the with-puppeteer example. I also added the ENV lines from that. (I also tried various combinations of some of the aforementioned changes but not others.) Now I get an error with the npm install step.

     
        
    15.44 npm ERR! code 1
    15.44 npm ERR! path /usr/src/app/node_modules/canvas
    15.44 npm ERR! command failed
    15.44 npm ERR! command sh -c prebuild-install -r napi || node-gyp rebuild
    15.45 npm ERR! prebuild-install warn install No prebuilt binaries found (target=7 runtime=napi arch=x64 libc=musl platform=linux)
    15.45 npm ERR! gyp info it worked if it ends with ok
    15.45 npm ERR! gyp info using node-gyp@8.4.1
    15.45 npm ERR! gyp info using node@20.15.1 | linux | x64
    15.45 npm ERR! gyp info find Python using Python version 3.11.10 found at "/usr/bin/python3"
    15.45 npm ERR! gyp http GET https://nodejs.org/download/release/v20.15.1/node-v20.15.1-headers.tar.gz
    15.45 npm ERR! gyp http 200 https://nodejs.org/download/release/v20.15.1/node-v20.15.1-headers.tar.gz
    15.45 npm ERR! gyp http GET https://nodejs.org/download/release/v20.15.1/SHASUMS256.txt
    15.45 npm ERR! gyp http 200 https://nodejs.org/download/release/v20.15.1/SHASUMS256.txt
    15.45 npm ERR! gyp info spawn /usr/bin/python3
    15.45 npm ERR! gyp info spawn args [
    15.45 npm ERR! gyp info spawn args   '/usr/src/app/node_modules/node-gyp/gyp/gyp_main.py',
    15.45 npm ERR! gyp info spawn args   'binding.gyp',
    15.45 npm ERR! gyp info spawn args   '-f',
    15.45 npm ERR! gyp info spawn args   'make',
    15.45 npm ERR! gyp info spawn args   '-I',
    15.45 npm ERR! gyp info spawn args   '/usr/src/app/node_modules/canvas/build/config.gypi',
    15.45 npm ERR! gyp info spawn args   '-I',
    15.45 npm ERR! gyp info spawn args   '/usr/src/app/node_modules/node-gyp/addon.gypi',
    15.45 npm ERR! gyp info spawn args   '-I',
    15.45 npm ERR! gyp info spawn args   '/home/chrome/.cache/node-gyp/20.15.1/include/node/common.gypi',
    15.45 npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    15.45 npm ERR! gyp info spawn args   '-Dvisibility=default',
    15.45 npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/chrome/.cache/node-gyp/20.15.1',
    15.45 npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/src/app/node_modules/node-gyp',
    15.45 npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/chrome/.cache/node-gyp/20.15.1/<(target_arch)/node.lib',
    15.45 npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/src/app/node_modules/canvas',
    15.45 npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    15.45 npm ERR! gyp info spawn args   '--depth=.',
    15.45 npm ERR! gyp info spawn args   '--no-parallel',
    15.45 npm ERR! gyp info spawn args   '--generator-output',
    15.45 npm ERR! gyp info spawn args   'build',
    15.45 npm ERR! gyp info spawn args   '-Goutput_dir=.'
    15.45 npm ERR! gyp info spawn args ]
    15.45 npm ERR! Package pixman-1 was not found in the pkg-config search path.
    15.45 npm ERR! Perhaps you should add the directory containing `pixman-1.pc'
    15.45 npm ERR! to the PKG_CONFIG_PATH environment variable
    15.45 npm ERR! Package 'pixman-1', required by 'virtual:world', not found
    15.45 npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
    15.45 npm ERR! gyp ERR! configure error
    15.45 npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
    15.45 npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/src/app/node_modules/node-gyp/lib/configure.js:259:16)
    15.45 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
    15.45 npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
    15.45 npm ERR! gyp ERR! System Linux 6.10.14-linuxkit
    15.45 npm ERR! gyp ERR! command "/usr/bin/node" "/usr/src/app/node_modules/.bin/node-gyp" "rebuild"
    15.45 npm ERR! gyp ERR! cwd /usr/src/app/node_modules/canvas
    15.45 npm ERR! gyp ERR! node -v v20.15.1
    15.45 npm ERR! gyp ERR! node-gyp -v v8.4.1
    15.45 npm ERR! gyp ERR! not ok
    15.45
    [+] Running 0/1A complete log of this run can be found in: /home/chrome/.npm/_logs/2025-02-18T01_04_35_846Z-debug-0.log
     - Service node  Building                                                                                         18.9s
    failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
    
      
  • Which I just now (after posting) noticed was already mentioned in a different comment. Sorry!

    I'm guessing the user who made that other comment is on lemmy.world? I can't see any comment other than yours, and LW has known issues with federation (issues that would be fixed if the instance weren't 5 version behind...) that mean I probably won't be able to see it for about 2 days right now. So thanks!

    I haven't looked into the suggestion in great detail yet, but I will say I'm already running as a non-root user (USER node is a line in my Dockerfile). I'm not sure what a seccomp profile is, but in case it wasn't clear from the original post, I just want to emphasise that the current configuration works in Docker on my Windows PC. It's only on the Synology NAS that it fails.

  • Wow, that's incredible. I thought for sure it would be a difference of something like 2–5%. But to actually be barely one third of one percent‽

    Out of curiosity, I looked it up. Officially a pool ball is 57&nbsp;mm diameter ± 0.127&nbsp;mm. If we add and subtract that to different axes of the ball, that's actually surprisingly close, coming in at 0.44% bulge, not a whole lot more than Earth's 0.34%. It's actually closer than I expected.

  • I'm not sure how true that is. It's smoother than anything else, but the degree to which it is oblate makes it less spherical than, say, a pool ball, doesn't it?

  • and lumpy

    Barely. Shrink it down to the size of a pool/billiards ball and Earth is actually smoother.

  • Nah, they're just doing things without regard for the consequences. Not specifically because of the consequences.

  • No, it's not. The joke is that there is a correlation, but that actually correlation doesn't mean causation. But here we have a situation where there is neither correlation nor causation.

    The problem is that the joke suggests that correlation is when A -> B (or at least it appears as such). Implication (in formal logic) is not the same as correlation.

  • I think this problem is overblown. I asked ChatGPT if I need to worry about this. It said not to worry.

  • I like the meme, but I don't think it actually works. The implication here is that there's a correlation between confusing correlation with causation and dying. But there isn't such a correlation. You are statistically equally likely to die either way

  • How the fuck do you make sweet potato chips from a regular potato?

  • Yeah, merge would give you a crab.