💾 Archived View for gemini.ctrl-c.club › ~phoebos › logs › freenode-kisslinux-2020-02-02.txt captured on 2023-01-29 at 04:04:32.
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
2020-02-02T00:46:04 #kisslinux <E5ten> mforney: is the ioctl header POSIX? because I realized if it is it can just be included unconditionally and the ifdefs, instead of checking a specific set of systems, can just check #ifdef TIOCGWINSZ 2020-02-02T00:50:33 #kisslinux <E5ten> Hadn't really thought about how TIOCGWINSZ was a define for some reason 2020-02-02T08:16:05 #kisslinux <icyphox> what do y'all use to record your terminals? (output as gif/svg) 2020-02-02T09:36:01 #kisslinux <mforney> E5ten: yeah, i was thinking the same thing. unfortunately sys/ioctl.h is non-posix, posix declares ioctl in this weird stropts.h header 2020-02-02T09:53:24 #kisslinux <mforney> E5ten: but i wonder if we can just have two versions of the printstatus function, one in status-dumb.c, and one in status-ansi.c or something. then you could just build the choose the one you want via a make variable 2020-02-02T11:47:03 #kisslinux <paper_> dylanaraps: kiss-chroot.tar.xz's sha256sum does not match kiss-chroot.tar.xz.sha256 2020-02-02T11:55:27 #kisslinux <dylanaraps> paper_: Let me see if I can reproduce. 2020-02-02T11:56:01 #kisslinux <dylanaraps> You may also want to try verifying the signature for the time being. 2020-02-02T11:56:09 #kisslinux <paper_> yes, the signature is good 2020-02-02T11:56:30 #kisslinux <paper_> oh no... don't mind me 2020-02-02T11:56:47 #kisslinux <paper_> I did something stupid and that's why it didn't work 2020-02-02T11:59:12 #kisslinux <dylanaraps> Fixed 2020-02-02T11:59:35 #kisslinux <dylanaraps> I forgot to update the file 2020-02-02T11:59:54 #kisslinux <dylanaraps> This was 12 days ago... Goes to show how many people verify the checksums 2020-02-02T12:00:20 #kisslinux <paper_> ehm... actually, the mistake was on my side 2020-02-02T12:00:53 #kisslinux <paper_> my brain stopped and I sha256sumed the .sha256 file... 2020-02-02T12:01:07 #kisslinux <paper_> when I do it correctly, the checksum matches 2020-02-02T12:04:57 #kisslinux <dylanaraps> Oh 2020-02-02T12:05:04 #kisslinux <dylanaraps> Don't tell me I just did the same thing 2020-02-02T12:05:25 #kisslinux <paper_> xD 2020-02-02T12:05:45 #kisslinux <E5ten> mforney: that makes sense 2020-02-02T12:05:49 #kisslinux <dylanaraps> I did 2020-02-02T12:05:55 #kisslinux <dylanaraps> >:| 2020-02-02T12:07:16 #kisslinux <dylanaraps> Fixed 2020-02-02T13:10:32 #kisslinux <dylanaraps> https://getkiss.org/blog/20200202a 2020-02-02T13:18:00 #kisslinux <icyphox> dylanaraps: small typo 2020-02-02T13:18:02 #kisslinux <icyphox> >Here's how'd you'd swap 2020-02-02T13:20:16 #kisslinux <dylanaraps> Thanks 2020-02-02T16:56:01 #kisslinux <icyphox> dylanaraps: is there a better way than to do this: https://stackoverflow.com/questions/27816750/bash-variable-substitution-and-strings 2020-02-02T16:56:23 #kisslinux <icyphox> if i read a string from a file (multi-line), and it contains say $a and $b in it 2020-02-02T16:56:55 #kisslinux <icyphox> and my script has a='foo' and b='bar' defined 2020-02-02T16:57:14 #kisslinux <icyphox> is there a better way to replace those than having to do what's in that SO answer? 2020-02-02T17:02:37 #kisslinux <dylanaraps> icyphox: What kind of file are you reading? 2020-02-02T17:02:45 #kisslinux <icyphox> a plain-text file dylanaraps 2020-02-02T17:03:25 #kisslinux <icyphox> i want to perform variable substitution, essentially 2020-02-02T17:11:12 #kisslinux <dylanaraps> Ah, I see. 2020-02-02T17:11:15 #kisslinux <dylanaraps> bash or sh? 2020-02-02T17:11:18 #kisslinux <icyphox> bash 2020-02-02T17:13:10 #kisslinux <dylanaraps> You want the variables replaced with their values and the resulting lines printed? 2020-02-02T17:13:57 #kisslinux <icyphox> yes dylanaraps, that's correct 2020-02-02T17:14:24 #kisslinux <icyphox> what what it's worth, the values here are color esc seqs 2020-02-02T17:15:26 #kisslinux <icyphox> for what* 2020-02-02T17:36:54 #kisslinux <dylanaraps> eval is the easiest and shortest way 2020-02-02T17:37:09 #kisslinux <icyphox> oh no 2020-02-02T17:37:18 #kisslinux <icyphox> i've got a lot of *s in my text file 2020-02-02T17:37:23 #kisslinux <icyphox> '*'s 2020-02-02T17:37:30 #kisslinux <icyphox> i tried that 2020-02-02T17:38:02 #kisslinux <icyphox> what if i 'set -f' and then eval? 2020-02-02T17:39:47 #kisslinux <dylanaraps> https://termbin.com/m58o4 2020-02-02T17:40:05 #kisslinux <dylanaraps> Also showing an unknown but neat mapfile feature 2020-02-02T17:40:25 #kisslinux <dylanaraps> Basically, using 'declare' inside of 'eval' 2020-02-02T17:40:28 #kisslinux <dylanaraps> Wrapped in quotes 2020-02-02T17:40:40 #kisslinux <dylanaraps> To declare a dummy variabel 2020-02-02T17:40:42 #kisslinux <dylanaraps> variable* 2020-02-02T17:41:00 #kisslinux <icyphox> wait, i'm confused. what is the dummy var for? 2020-02-02T17:41:02 #kisslinux <dylanaraps> mapfile '-c 1 -C func' allows you to execute a function on each line 2020-02-02T17:41:09 #kisslinux <icyphox> ah 2020-02-02T17:41:11 #kisslinux <dylanaraps> '$1' is line number 2020-02-02T17:41:14 #kisslinux <dylanaraps> '$2' is the line 2020-02-02T17:42:01 #kisslinux <dylanaraps> https://termbin.com/0xg2 2020-02-02T17:42:04 #kisslinux <dylanaraps> That's far simpler 2020-02-02T17:42:11 #kisslinux <dylanaraps> Turns out only the quotes are needed 2020-02-02T17:44:18 #kisslinux <icyphox> neat, thanks 2020-02-02T17:44:20 #kisslinux <icyphox> i'll try these out 2020-02-02T17:44:47 #kisslinux <dylanaraps> If you want to hide your eval usage ;) 2020-02-02T17:44:47 #kisslinux <dylanaraps> https://termbin.com/niu8m 2020-02-02T17:44:57 #kisslinux <dylanaraps> Can also replace 'source' with '.' 2020-02-02T17:45:01 #kisslinux <icyphox> hah 2020-02-02T17:45:03 #kisslinux <icyphox> yeah 2020-02-02T17:45:23 #kisslinux <icyphox> also, re: http (in PR): you could possibly add a check for it 2020-02-02T17:45:55 #kisslinux <dylanaraps> Yup 2020-02-02T17:45:59 #kisslinux <dylanaraps> I'm working on a linter 2020-02-02T17:46:49 #kisslinux <icyphox> ah yes 2020-02-02T17:46:54 #kisslinux <icyphox> nice, that'll be good 2020-02-02T17:47:37 #kisslinux <icyphox> btw dylanaraps, if the build script of a project is a shell script 2020-02-02T17:47:42 #kisslinux <icyphox> and they don't chmod it 2020-02-02T17:47:49 #kisslinux <icyphox> and instead run it as 'sh build_all.sh' 2020-02-02T17:47:55 #kisslinux <icyphox> should i do the same? 2020-02-02T17:48:03 #kisslinux <icyphox> (while packaging) 2020-02-02T17:48:05 #kisslinux <icyphox> that is 2020-02-02T17:48:33 #kisslinux <dylanaraps> Yeah 2020-02-02T17:48:50 #kisslinux <icyphox> alrighty 2020-02-02T17:51:57 #kisslinux <dylanaraps> http vs https isn't something I can add to a linter 2020-02-02T17:53:56 #kisslinux <dylanaraps> There are times when there is no https source at all 2020-02-02T17:53:56 #kisslinux <dylanaraps> The linter will run on each commit against the entire repository 2020-02-02T17:54:39 #kisslinux <dylanaraps> The linter is only for really nitpicky stuff regardless 2020-02-02T17:54:47 #kisslinux <dylanaraps> I don't think it's needed really 2020-02-02T18:17:36 #kisslinux <icyphox> dylanaraps: the package i'm building (nim lang), /generates/ a ~1k loc install.sh script 2020-02-02T18:18:01 #kisslinux <icyphox> wait, i'll just paste it, see for yourself 2020-02-02T18:18:29 #kisslinux <icyphox> https://termbin.com/8ubp 2020-02-02T18:19:15 #kisslinux <icyphox> it takes args like '/usr/bin' or '/usr/local/bin' and installs there 2020-02-02T19:53:41 #kisslinux <dylanaraps> icyphox: That should be fine with /usr/bin 2020-02-02T19:53:52 #kisslinux <dylanaraps> (If there is no regular build system)