💾 Archived View for gemini.ctrl-c.club › ~phoebos › logs › freenode-kisslinux-2019-10-21.txt captured on 2024-05-26 at 16:29:50.
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
2019-10-21T05:57:42 #kisslinux <dylanaraps> nestman: That minifies the HTML. 2019-10-21T05:57:50 #kisslinux <dylanaraps> Neat huh? 2019-10-21T05:58:00 #kisslinux <dylanaraps> > sed ':a;N;$!ba;s/>s*</></g' 2019-10-21T06:02:53 #kisslinux <dylanaraps> > Since July, Firefox has blocked over 450 billion third-party trackers from tracking you. 2019-10-21T06:02:54 #kisslinux <dithpri> piggybacking on that: why `sed ss.ss`? 2019-10-21T06:03:08 #kisslinux <dylanaraps> Tracking the trackers blocked. 10/10 2019-10-21T06:03:26 #kisslinux <dylanaraps> 'sed ss.ss' simply strips the first character from each line. 2019-10-21T06:03:41 #kisslinux <dylanaraps> Which just so happens to also be a '.' in this case. 2019-10-21T06:03:54 #kisslinux <dithpri> Yeah ik but why 2019-10-21T06:04:08 #kisslinux <dithpri> you're left with /path/to/file instead of ./path/to/file 2019-10-21T06:04:13 #kisslinux <dylanaraps> Yes 2019-10-21T06:04:44 #kisslinux <dithpri> and then you're just adding the . later on before each ${page} 2019-10-21T06:05:05 #kisslinux <dithpri> is it for the pretty printfs? :P 2019-10-21T06:05:07 #kisslinux <Crestwave> Why not s/.//? Almost seems obfuscated 2019-10-21T06:05:20 #kisslinux <dithpri> cuz ss.ss seems cute 2019-10-21T06:05:27 #kisslinux <Crestwave> lol 2019-10-21T06:05:59 #kisslinux <dylanaraps> The stripping of . is useless in the current version, yeah. 2019-10-21T06:06:27 #kisslinux <dylanaraps> It used to also generate rss feeds and the sitemap which is why I was stripping the '.' 2019-10-21T06:06:32 #kisslinux <nestman> dylanaraps : care to explain the bits? 2019-10-21T06:06:46 #kisslinux <dylanaraps> Bits? 2019-10-21T06:06:47 #kisslinux <dithpri> oh ok 2019-10-21T06:07:17 #kisslinux <nestman> ':a;N;$!ba;s/>s*</></g' 2019-10-21T06:07:32 #kisslinux <dithpri> I blacked out after the first a 2019-10-21T06:07:46 #kisslinux <Crestwave> N goes to the next line of input, I think? 2019-10-21T06:08:15 #kisslinux <Crestwave> ba goes to a but I'm not sure what the $ is for 2019-10-21T06:08:17 #kisslinux <dithpri> ' n N Read/append the next line of input into the pattern space.' 2019-10-21T06:09:05 #kisslinux <Crestwave> s/>s*</></g is removes spaces between >< 2019-10-21T06:09:06 #kisslinux <dithpri> that's the linux version, posix seems to differentiate n/N 2019-10-21T06:09:40 #kisslinux <Crestwave> It's clearer when written as s|>s*<|><|g 2019-10-21T06:11:17 #kisslinux <dylanaraps> Fixed. 2019-10-21T06:12:20 #kisslinux <Crestwave> Ah, `$!ba` branches to a if it's not at the last line 2019-10-21T06:12:41 #kisslinux <dithpri> So, set label a, append next line of input without the newline, branch to a 2019-10-21T06:12:46 #kisslinux <dithpri> Which removes newlines 2019-10-21T06:12:54 #kisslinux <dithpri> and then remove all spaces between tags 2019-10-21T06:13:53 #kisslinux <Crestwave> Actually, s matches all whitespace, including newlines AFAIK 2019-10-21T06:14:01 #kisslinux <dylanaraps> Yup 2019-10-21T06:14:25 #kisslinux <dithpri> possibly but sed operates on lines, I'm guessing that's why the branching 2019-10-21T06:14:38 #kisslinux <dithpri> dylan: correct me if I'm wrong 2019-10-21T06:14:40 #kisslinux <dylanaraps> This also avoid stripping whitespace in <pre> tags. 2019-10-21T06:14:45 #kisslinux <dylanaraps> avoids* 2019-10-21T06:15:10 #kisslinux <dithpri> huh, neat 2019-10-21T06:17:46 #kisslinux <dylanaraps> The site generation isn't 100% automated with this simple script of course. 2019-10-21T06:17:48 #kisslinux <Crestwave> AFAIK: sed operates on lines, but this adds them all except the last to the pattern space, so they can be substituted 2019-10-21T06:18:18 #kisslinux <dylanaraps> Images I minify by hand as it's rare that one is added to the site. 2019-10-21T06:18:56 #kisslinux <dithpri> Crestwave: It removes the newline at the end of the line though 2019-10-21T06:18:59 #kisslinux <dylanaraps> The CSS I minify by hand as I do a better job than a minifier (some actually make the CSS larger). 2019-10-21T06:19:11 #kisslinux <dithpri> (AFAIK) 2019-10-21T06:19:47 #kisslinux <dylanaraps> s* removes newlines between tags and label a removes them at the end of lines 2019-10-21T06:20:19 #kisslinux <dithpri> how come minifiers make the css larger? 2019-10-21T06:20:22 #kisslinux <dylanaraps> I don't 100% understand why this snippet works fyi 2019-10-21T06:20:50 #kisslinux <dylanaraps> They're not 100% perfect. 2019-10-21T06:21:08 #kisslinux <dithpri> Do you mean only removing whitespace or also combining selectors, etc.? 2019-10-21T06:21:10 #kisslinux <dylanaraps> They make the wrong choices sometimes. 2019-10-21T06:21:19 #kisslinux <dylanaraps> All of it. 2019-10-21T06:21:35 #kisslinux <dithpri> Sounds like a fun idea for a prolog program 2019-10-21T06:21:36 #kisslinux <dylanaraps> Using 'font:' over 'font-family:, 'font-size 2019-10-21T06:21:45 #kisslinux <dithpri> oh ok 2019-10-21T06:21:46 #kisslinux <dylanaraps> ' etc* 2019-10-21T06:21:52 #kisslinux <dylanaraps> Compressing colors to #XXX if possible. 2019-10-21T06:23:26 #kisslinux <Crestwave> dylanaraps: printf 'anbncn' | sed ':a;N;$!ba;s/1/2/g' doesn't remove any newlines, but s/n//g does. So it seems to me that the substitution is what's removing them 2019-10-21T06:23:46 #kisslinux <Crestwave> *s/n//g instead of s/1/2/g 2019-10-21T06:29:12 #kisslinux <dithpri> dylanaraps: do you need me to do anything for the zsh pull request? 2019-10-21T06:29:43 #kisslinux <dylanaraps> Yeah 2019-10-21T06:30:10 #kisslinux <dithpri> ok, what is it? 2019-10-21T06:31:02 #kisslinux <dylanaraps> The patch to remove zsh-X.X.x can be removed. These types of secondary binaries are typically kept around. 2019-10-21T06:31:16 #kisslinux <dithpri> Sure 2019-10-21T06:31:33 #kisslinux <dithpri> Anything else? And should I squash it? 2019-10-21T06:31:33 #kisslinux <dylanaraps> If you'd still like to omit it a simple: rm -f "$1/usr/bin/zsh-XXX" is far simpler than a patch. 2019-10-21T06:31:43 #kisslinux <dithpri> true 2019-10-21T06:31:47 #kisslinux <dithpri> I'll keep it 2019-10-21T06:32:31 #kisslinux <dylanaraps> 2 secs. Trying to load the PR. 2019-10-21T06:32:35 #kisslinux <dithpri> kk 2019-10-21T06:35:03 #kisslinux <dylanaraps> Is the `rm` of the completion directories needed? Removing them from (https://github.com/zsh-users/zsh/blob/master/Src/Zle/complete.mdd) should omit them regardless no? 2019-10-21T06:36:28 #kisslinux <dylanaraps> Also: For the path configure flags ('--enable-fndir=/usr/share/zsh/functions' etc). What are the defaults? 2019-10-21T06:37:10 #kisslinux <dylanaraps> Are we setting them for the sake of setting them or are we fixing the location? 2019-10-21T06:39:06 #kisslinux <dithpri> dylanaraps: honestly, idk, I based this build script on another distribution's 2019-10-21T06:39:55 #kisslinux <dithpri> as for the fndir, the default is /usr/share/zsh/${version}/functions 2019-10-21T06:40:00 #kisslinux <dylanaraps> Ah 2019-10-21T06:40:03 #kisslinux <dylanaraps> That's the problem. 2019-10-21T06:40:24 #kisslinux <dylanaraps> All distributions have really badly written build scripts. 2019-10-21T06:40:36 #kisslinux <dithpri> lol 2019-10-21T06:41:12 #kisslinux <dylanaraps> Not joking, really. Pair it with the fact that their build tools 'eval' the badly written scripts... 2019-10-21T06:41:20 #kisslinux <dithpri> well, true 2019-10-21T06:42:30 #kisslinux <dylanaraps> fndir sounds fine to me. 2019-10-21T06:42:48 #kisslinux <dylanaraps> > --with-term-lib=ncursesw 2019-10-21T06:42:54 #kisslinux <dylanaraps> This may be autodetected too. 2019-10-21T06:48:25 #kisslinux <dithpri> I remember there being some problem, but I've just re-run the configure without that flag and it properly detects it 2019-10-21T06:49:06 #kisslinux <dithpri> and since ncursesw is the default in the search the line is indeed unneeded 2019-10-21T06:49:14 #kisslinux <dylanaraps> Can be removed then. :) 2019-10-21T06:50:27 #kisslinux <dylanaraps> '--enable-libc-musl' probably isn't needed either. 2019-10-21T06:50:40 #kisslinux <dylanaraps> zsh auto detects the libc regardless. 2019-10-21T06:51:17 #kisslinux <dylanaraps> https://github.com/zsh-users/zsh/blob/3d7215cc8277b39cd1e24ce5a04376d45bfbabf0/config.guess#L154-L159 2019-10-21T06:54:35 #kisslinux <dithpri> also enable-etcdir is unneeded 2019-10-21T06:54:49 #kisslinux <dylanaraps> Nice 2019-10-21T06:54:53 #kisslinux <dylanaraps> '--enable-cap' this may be unneeded too. 2019-10-21T06:55:19 #kisslinux <dylanaraps> This enables termcap support(?) but zsh uses ncurses which has its own db. 2019-10-21T06:55:43 #kisslinux <dylanaraps> > Historically, several different libraries have provided the features the 2019-10-21T06:55:45 #kisslinux <dylanaraps> shell needs to provide output to the terminal. The most common have been 2019-10-21T06:55:47 #kisslinux <dylanaraps> termcap, which is now largely outmoded, and curses, which supersedes 2019-10-21T06:55:49 #kisslinux <dylanaraps> termcap and typically contains the same features as well as others. 2019-10-21T06:56:02 #kisslinux <dylanaraps> > configure will search for an appropriate library; the default search order 2019-10-21T06:56:05 #kisslinux <dylanaraps> is "ncursesw tinfo termcap ncurses curses" 2019-10-21T06:56:47 #kisslinux <dylanaraps> Actually! 2019-10-21T06:56:56 #kisslinux <dithpri> oh wait I already removed etcdir xD 2019-10-21T06:57:03 #kisslinux <dylanaraps> > This searches for POSIX capabilities; if found, the `cap' library 2019-10-21T06:57:06 #kisslinux <dylanaraps> is available and the shell will use these to determine if the 2019-10-21T06:57:08 #kisslinux <dylanaraps> shell is running in some privileged mode. This is turned off by 2019-10-21T06:57:10 #kisslinux <dylanaraps> default as on some systems non-standard headers (in particular AIX) are 2019-10-21T06:57:12 #kisslinux <dylanaraps> required. A direct fix for that problem would be appreciated. 2019-10-21T06:57:14 #kisslinux <dylanaraps> (--enable-cap) 2019-10-21T06:57:40 #kisslinux <dithpri> yeah, it's disabled by default 2019-10-21T06:57:43 #kisslinux <dylanaraps> Do we have the cap library or does zsh just ignore this flag? 2019-10-21T06:58:57 #kisslinux <dylanaraps> Yeah, we don't have this lib. 2019-10-21T06:59:13 #kisslinux <dylanaraps> My guess is that zsh does the detection and omits it. 2019-10-21T06:59:38 #kisslinux <dithpri> yeah, just checked the log 2019-10-21T06:59:48 #kisslinux <dithpri> My impression was it depends on the kernel build 2019-10-21T06:59:57 #kisslinux <dithpri> But then this is probably managed by linux-headers 2019-10-21T07:00:05 #kisslinux <dithpri> So after all we don't have it 2019-10-21T07:00:25 #kisslinux <dylanaraps> https://pkgs.alpinelinux.org/contents?branch=edge&name=libcap&arch=x86&repo=main 2019-10-21T07:01:47 #kisslinux <dithpri> also the alpine buildscript doesn't do --enable-cap 2019-10-21T07:01:51 #kisslinux <dylanaraps> Can you verify that the 'rm -rf' of each completion is uneeded if they're removed from the .mdd file? 2019-10-21T07:01:56 #kisslinux <dylanaraps> Hu 2019-10-21T07:01:59 #kisslinux <dylanaraps> Huh* 2019-10-21T07:03:10 #kisslinux <dithpri> Will do 2019-10-21T07:05:52 #kisslinux <dithpri> a question though, why not test after building? 2019-10-21T07:06:17 #kisslinux <dylanaraps> We don't run tests for any packages. 2019-10-21T07:06:23 #kisslinux <dithpri> fair enough 2019-10-21T07:06:36 #kisslinux <dithpri> tradition, then 2019-10-21T07:06:50 #kisslinux <dylanaraps> I have a problem with test suites (especially on musl). 2019-10-21T07:07:36 #kisslinux <dylanaraps> Look at Alpine's packages and you'll find the majority of packages have tests entirely disabled or they ignore specific test failures. 2019-10-21T07:08:05 #kisslinux <dylanaraps> This situation removes the entire point of running tests to begin with. 2019-10-21T07:08:17 #kisslinux <dithpri> just looked at alpine's zsh, it does remove the tests that failed in the kiss build as well 2019-10-21T07:11:01 #kisslinux <konimex> a lot of tests in glibc systems (e.g. Arch) just run ||: anyway 2019-10-21T07:11:59 #kisslinux <dylanaraps> Yup 2019-10-21T07:12:09 #kisslinux <dylanaraps> It's a pointless endeavor. 2019-10-21T07:13:04 #kisslinux <Crestwave> dylanaraps: By the way, the sed command doesn't work on one-liners. AFAIK you can use `sed 'H;1h;$!d;x;your substitution'` instead, which I believe is also more idiomatic(?) 2019-10-21T07:13:57 #kisslinux <dithpri> ok, just checked your suggestion, seems to work with only the sed 2019-10-21T07:14:15 #kisslinux <dylanaraps> Crestwave: That's fine as the input given will always be larger than a single line. 2019-10-21T07:14:19 #kisslinux <dylanaraps> dithpri: Nice 2019-10-21T07:14:34 #kisslinux <dylanaraps> Can probably remove the loop entirely now. 2019-10-21T07:14:46 #kisslinux <dylanaraps> brb 2019-10-21T07:15:47 #kisslinux <dylanaraps> (A whitelist of completions dirs will probably be smaller than a blacklist) 2019-10-21T07:20:38 #kisslinux <dithpri> so... a sed one-liner? 2019-10-21T07:22:46 #kisslinux <dylanaraps> Probably simpler to add a: printf '%sn' 'functions=""' >> Src/Zle/complete.mdd 2019-10-21T07:23:03 #kisslinux <dylanaraps> Just redefine the 'functions' variable to include only what we want to install. 2019-10-21T07:24:07 #kisslinux <dylanaraps> Looks like only these: Completion/X/*/* Completon/*comp* Completion/Base/*/* Completion/Linux/*/* 2019-10-21T07:24:30 #kisslinux <dylanaraps> Maybe also: Completion/Unix/*/* 2019-10-21T07:24:49 #kisslinux <dylanaraps> Yup 2019-10-21T07:24:51 #kisslinux <dylanaraps> Also Unix 2019-10-21T07:25:49 #kisslinux <dylanaraps> tbh, I hate the entire concept of (third-party) shell completions. They're all so badly written... 2019-10-21T07:26:05 #kisslinux <dithpri> oh well 2019-10-21T07:26:09 #kisslinux <dylanaraps> Looking at zsh's first-party completions they're fine though. 2019-10-21T07:26:28 #kisslinux <dithpri> I'll check if the redifinition, otherwise I already have a sed one liner 2019-10-21T07:27:18 #kisslinux <dylanaraps> OK 2019-10-21T07:27:20 #kisslinux <dylanaraps> https://github.com/scop/bash-completion/blob/2a932367917a9d7349bf049257e10840caa9c4da/completions/mutt 2019-10-21T07:27:23 #kisslinux <dylanaraps> See 2019-10-21T07:27:25 #kisslinux <dylanaraps> 5 evals 2019-10-21T07:27:53 #kisslinux <dylanaraps> A lot of random utility calls. 2019-10-21T07:28:24 #kisslinux <dylanaraps> Word splitting with globbing enabled! 2019-10-21T07:28:30 #kisslinux <dylanaraps> Lots of that. 2019-10-21T07:30:15 #kisslinux <dylanaraps> None of this is actually needed as bash provides builtins to allow for complex completions without needing external utilities, eval, unsafe word splitting, etc. 2019-10-21T07:30:31 #kisslinux <dylanaraps> No one reads the manual though ;) 2019-10-21T07:31:09 #kisslinux <dithpri> Oh god I've just run shellcheck on that 2019-10-21T07:31:52 #kisslinux <dithpri> 24 warnings 2019-10-21T07:32:18 #kisslinux <dithpri> some false positives though 2019-10-21T07:32:31 #kisslinux <dylanaraps> Which ones? 2019-10-21T07:33:15 #kisslinux <dylanaraps> "Doesn't expand in single quotes" 2019-10-21T07:33:20 #kisslinux <dithpri> yeah 2019-10-21T07:33:28 #kisslinux <dylanaraps> I wouldn't call that a false positive as it's most likely eval'd below... 2019-10-21T07:33:54 #kisslinux <dylanaraps> Yup 2019-10-21T07:33:55 #kisslinux <dylanaraps> It is. 2019-10-21T07:34:37 #kisslinux <dithpri> yup 2019-10-21T07:34:39 #kisslinux <dithpri> oh well 2019-10-21T07:38:01 #kisslinux <dylanaraps> Any way to make the new printf shorter in length? 2019-10-21T07:38:09 #kisslinux <dithpri> why is the date on my commits screwed up 2019-10-21T07:38:45 #kisslinux <dithpri> uh... a loop? 2019-10-21T07:38:56 #kisslinux <dylanaraps> Heh 2019-10-21T07:39:30 #kisslinux <dithpri> oh nvm the date's good 2019-10-21T07:40:12 #kisslinux <dylanaraps> zsh has += right? 2019-10-21T07:40:38 #kisslinux <dithpri> yeah 2019-10-21T07:46:06 #kisslinux <dylanaraps> Left a comment. 2019-10-21T07:46:14 #kisslinux <dylanaraps> Wonder what a loop will look like. 2019-10-21T07:51:41 #kisslinux <dithpri> > for completion in '*comp*' 'Base/*/*' 'Linux/*/*' 'Unix/*/*' 'X/*/*' 'Zsh/*/*'; do 2019-10-21T07:52:07 #kisslinux <dithpri> I like your idea better, loop is confusing 2019-10-21T07:53:11 #kisslinux <dylanaraps> Sent a comment with a loop. 2019-10-21T07:54:44 #kisslinux <dylanaraps> Sent another loop :P 2019-10-21T07:58:56 #kisslinux <dithpri> the second loop looks nice 2019-10-21T07:58:58 #kisslinux <dithpri> brb 2019-10-21T08:01:55 #kisslinux <dylanaraps> https://danielpocock.com/where-do-censored-developers-go/ 2019-10-21T08:06:44 #kisslinux <dithpri> dylanaraps: thanks for the support and help 2019-10-21T08:10:22 #kisslinux <dithpri> Recommend squashing if you're ready to merge 2019-10-21T08:14:30 #kisslinux <dylanaraps> Looks good to me now. 2019-10-21T08:14:39 #kisslinux <dylanaraps> Thanks for putting up with my comments :P 2019-10-21T08:14:52 #kisslinux <dithpri> np, they were very insightful :p 2019-10-21T08:15:34 #kisslinux <dithpri> want me to squash? 2019-10-21T08:16:22 #kisslinux <dithpri> the article's insightful. I still remember the drama with the linux CoC 2019-10-21T08:18:31 #kisslinux <dithpri> 'insightful' twice in the span of 2m. I need a cup of coffee. 2019-10-21T08:23:09 #kisslinux <dylanaraps> Yeah, squash it. 2019-10-21T08:23:12 #kisslinux <dylanaraps> lol 2019-10-21T08:23:14 #kisslinux <dylanaraps> I need a coffee too. 2019-10-21T08:24:37 #kisslinux <dithpri> done 2019-10-21T09:03:05 #kisslinux <Crestwave> TIL of the tct (Unicode) video output driver in MPV. It actually looks great on a true color terminal with a small font (for higher resolution), although it's very heavy. 2019-10-21T09:07:15 #kisslinux <dylanaraps> Neat 2019-10-21T09:07:21 #kisslinux <dylanaraps> There's also Caca. 2019-10-21T09:07:59 #kisslinux <dylanaraps> It'd be heavy since terminal emulators aren't meant for this use case nor are terminal emulators "good software". 2019-10-21T09:08:46 #kisslinux <dylanaraps> All terminal emulators are bloated, slow and have high input latency. (There are exceptions) 2019-10-21T09:09:30 #kisslinux <dylanaraps> brb 2019-10-21T10:28:21 #kisslinux <Crestwave> I know about caca, but it looks pretty bad to me. This would actually be usable if it was fast enough: https://i.imgur.com/toy1RMu_d.png?maxwidth=9999&fidelty=high 2019-10-21T10:29:34 #kisslinux <Crestwave> alacritty seems pretty fast, although still around 1 FPS or less. IIRC it took minutes to render a frame on xfce4-terminal 2019-10-21T10:30:00 #kisslinux <dylanaraps> That looks good actually. 2019-10-21T10:30:36 #kisslinux <Crestwave> Exactly! 2019-10-21T10:31:28 #kisslinux <dylanaraps> How small is each cell? 2019-10-21T10:33:27 #kisslinux <dylanaraps> brb 2019-10-21T11:24:52 #kisslinux <Crestwave> My monitor is 1600x900 and the terminal is 1600x450 cells wide, but it uses half-blocks so it's basically one pixel each. 2019-10-21T11:26:40 #kisslinux <Crestwave> It's actually usable with a bigger font from a distance but it seems that my terminal doesn't recognize some escape sequences so they periodically appear on the screen. 2019-10-21T13:04:02 #kisslinux <Crestwave> By the way, why do you set LANG in additional to LC_ALL to disable unicode? 2019-10-21T15:55:14 #kisslinux <icyphox> Dylan, can you please pretty please update this: https://github.com/dylanaraps/writing-a-tui-in-bash 2019-10-21T17:28:05 #kisslinux <mahmudov> which irc client app in repo 2019-10-21T17:28:36 #kisslinux <dithpri> mahmudov: weechat is in the repos 2019-10-21T17:28:54 #kisslinux <dithpri> in community 2019-10-21T17:29:03 #kisslinux <mahmudov> thnks dithpri 2019-10-21T17:29:26 #kisslinux <dithpri> np 2019-10-21T18:13:19 #kisslinux <dithpri> WTH 2019-10-21T18:13:24 #kisslinux <dithpri> i3 needs glib? 2019-10-21T18:13:44 #kisslinux <dithpri> time to move to another wm then 2019-10-21T18:48:48 #kisslinux <dithpri> does anyone have some tiling wm recommendations? 2019-10-21T19:03:35 #kisslinux <E5ten> Could anyone try building xf86-video-intel with clang and tell me if they get a segfault or not when they try to start X with it? (Making sure that it is the selected driver and will X actually try to load it first) 2019-10-21T20:04:52 #kisslinux <dylanara1> E5ten: Will do so tomorrow. Thanks for letting me know. 2019-10-21T20:05:00 #kisslinux <dylanara1> (It's late here and I'm off to bed) 2019-10-21T22:02:12 #kisslinux <konimex> dithpri: bspwm 2019-10-21T22:02:15 #kisslinux <konimex> well damn 2019-10-21T23:16:16 #kisslinux <dithpri> konimex: thanks