• 0 Posts
  • 20 Comments
Joined 3 months ago
cake
Cake day: June 23rd, 2024

help-circle

  • ChaoticNeutralCzech@feddit.orgtoFediverse@lemmy.mlA symbol for the ⁂ fediverse
    link
    fedilink
    English
    arrow-up
    31
    arrow-down
    3
    ·
    edit-2
    24 days ago

    Note that if supported by the font you use, the three symbols will usually be drawn the same way as an asterisk (*) in that font. This means a lot of variation.

    Your browser’s rendering: */⁂

    Several typefaces’ rendering of Unicode U+2042 ASTERISM:

    I think the diversity is alright! It’s like the Fediverse: instances follow a standard to work with each other but can be heavily customized without breaking integration.






  • You are right, “elf” is a stretch, it does not make sense to parse it as a number. But in some languages, the string “15 240,5” is just how a number is written (yes, that’s a U+2009 THIN SPACE, you can’t stop me from using it as a thousand separator in German). Obviously, despite having a , on their numpads, German programmers still expect computers to parse numbers with decimal dots and interpret commas as list values.


  • So the only valid digits are arabic numbers but arabic script numbers are not a valid digit?

    Some people writing Regex implementations have that opinion. I’ve refrained from saying mine.

    If we want programming to be inclusive then doesn’t that make sense to also include the arabic script number?

    Maybe. IMO, number tests should be chosen/implemented based on the project’s requirements. If you want to include every Unicode character or string pattern anyone’s ever used to convey a numeric value, that would be a long and growing list. Arguably, it’s impossible: the word “elf” means a number if interpreted as German for “eleven” but not if interpreted as English for 🧝.



  • ChaoticNeutralCzech@feddit.orgtoProgrammer Humor@programming.devaverage day in NPM land
    link
    fedilink
    English
    arrow-up
    139
    arrow-down
    3
    ·
    edit-2
    2 months ago

    If you think is-number can be replaced with a one-liner, you don’t have the enterprise code mindset. What if the world gets more inclusive and MMXXIV, ½ and ⠼⠁ become recognized as numbers? 𒐍𓆾 were numbers in the past but what if people start assigning numeric value to other characters? Are 🖐🔟💯🆢🂵🀌🁅 numbers of the future???
    /s

    I’m not even all kidding, Regex implementations are split on whether “٣” matches \d.


  • I thought the average !programminghumor@lemmy.world user is already FOSSpilled. Of course you don’t have to use the FOSS tools but they are convenient enough to be able to make this in 10 minutes.

    Anyway, the relevant commands are

    yt-dlp -f "bv*[height<=480]+ba" --no-mtime --convert-subs srt --write-sub https://www.youtube.com/watch?v=9SOryJvTAGs
    # aegisub needs srt; we don't need above 480p
    
    aegisub "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].en.srt"
    # now go rewrite appropriate lines in gui, apply style and save as "LoveShack.ass"
    
    ffmpeg -i "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].mp4" -filter_complex "[0:v]subtitles=LoveShack.ass[s];[s]crop=w=640[f]" -map [f] -map 0:a -ss 49 -t 21 -acodec aac -vcodec libx265 -crf 20 crowdstrike.mp4
    # crf 20 for generously high quality because file size is small anyway
    
    # or for Lemmy upload (no sound, WebM to prevent encoding...
    # ...and subsequent ffmpeg timeout errors; my instance limits uploads to 10 MiB)
    ffmpeg -i "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].mp4" -filter_complex "[0:v]subtitles=LoveShack.ass[s];[s]crop=w=ih/3*4[f]" -map [f] -ss 49.5 -t 21 -vcodec vp9 crowdstrike.webm
    # note that Lemmy instances limit videos to 900 frames (usually 30 s) by default
    

    I didn’t bother recreating your subtitle and cut timing but I did crop the video to 4:3. The frame rate is doubled and so is the apparent resolution, while the file size is 6x smaller; the Lemmy version is also about 6x smaller but I went for low-bitrate 720p:




  • GIF is really terrible as a video format. You can upload actual video with sound on Lemmy (most instances use a 20MB, 900-frame limit, also server-side ffmpeg often times out) or Pixelfed (15MB, unknown frame limit).

    Yes, I know you didn’t bother to use an AI or commission an artist to sing the new lyrics but you could mux in an instrumental version (or heck, even just leave the original) for me and others who may remember the melody from the radio but don’t associate it with the music video.


  • It’s more logical. The reason it’s 12 is because the Romans were afraid of zeros. The “12” means either 0 hours or 12 hours after midnight while 1-11 mean 1-11 or 13-23 hours after midnight.

    if (pm && numberOnClock != 12) hoursSinceMidnight = numberOnClock+12; 
    else /*am or 12pm*/ 
    { 
      if (numberOnClock == 12 /*12am*/) hoursSinceMidnight = 0; 
      else /*1-11 am or 12pm*/ hoursSinceMidnight=numberOnClock; 
    }
    

    If a “0” was on top, it would be

    if (pm) hoursSinceMidnight=numberOnClock+12; 
    else /*am*/ hoursSinceMidnight=numberOnClock; 
    

    TL;DR: Swap the 0 and 12 on the clock face. The inner (AM) ring now has numbers 0-11 while the outer (PM) ring has numbers 12-23. Things now make sense. We should have done this centuries ago instead of manufacturing measuring instruments whose scale starts at 12 rather than 0.





  • Toilet waste (black) water pipes are quite underused for their diameter so it’s enough to just feed dozens of bathrooms’ worth into a reasonable diameter you can still get at a hardware store. Sure, some will have trouble flushing if they all do that at the same time but not too serious.

    As for drinking water, some high-rises feature tanks as part of their oscillation damping system anyway, and municipal water towers don’t need to be placed much higher than customers to get decent pressure. I think it’s not the amount but pressure of water at the ground floor that causes engineering challenges. The pumps and tank at the top help, though.