💾 Archived View for gemini.ctrl-c.club › ~phoebos › logs › freenode-kisslinux-2019-12-04.txt captured on 2024-06-16 at 13:52:55.

View Raw

More Information

⬅️ Previous capture (2021-12-17)

-=-=-=-=-=-=-

2019-12-04T00:14:22 #kisslinux <E5ten> why the heredoc and subsequently necessary tabs and editorconfig instead of just like printf '%sn' <the lines> >"$ssid.psk"?
2019-12-04T00:16:37 #kisslinux <dylanaraps> I know I know
2019-12-04T00:16:43 #kisslinux <dylanaraps> Quick question.
2019-12-04T00:17:11 #kisslinux <E5ten> yeah?
2019-12-04T00:17:22 #kisslinux <dylanaraps> When you disconnect from a network explicitly, do you expect autoconnection to then be disabled?
2019-12-04T00:17:34 #kisslinux <dylanaraps> ie, it won't auto connect back to it.
2019-12-04T00:17:48 #kisslinux <E5ten> I think that's what iwctl does
2019-12-04T00:18:18 #kisslinux <dylanaraps> > if (station->state == STATION_STATE_DISCONNECTED && autoconnect)
2019-12-04T00:18:24 #kisslinux <dylanaraps> > station_enter_state(station, STATION_STATE_AUTOCONNECT_QUICK);
2019-12-04T00:18:32 #kisslinux <dylanaraps> That's what iwd does currently.
2019-12-04T00:18:45 #kisslinux <dylanaraps> Though this is implicit me thinks
2019-12-04T00:20:18 #kisslinux <dylanaraps> https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/client/station.c#n280
2019-12-04T00:20:23 #kisslinux <dylanaraps> That's iwctl
2019-12-04T00:21:42 #kisslinux * E5ten sent a long message:  < https://matrix.org/_matrix/media/r0/download/matrix.org/ENVCPoJIhGJGnjZskmxgytHm >
2019-12-04T00:21:51 #kisslinux <E5ten> 2610 src/station.c
2019-12-04T00:21:55 #kisslinux <dylanaraps> ye
2019-12-04T00:21:59 #kisslinux <dylanaraps> Trying to load the page
2019-12-04T00:22:42 #kisslinux <E5ten> so yeah, if the user explicitly disconnects it disables autoconnect, which makes sense to me
2019-12-04T00:22:47 #kisslinux <dylanaraps> Yup
2019-12-04T00:27:10 #kisslinux <E5ten> isn't the creation of the fd for current a memory leak cuz you l_strdup_printf within the fopen call instead of assigning it to something and using l_free on that after?
2019-12-04T00:28:04 #kisslinux <E5ten> stream not fd
2019-12-04T00:28:16 #kisslinux <dylanaraps> Good catch
2019-12-04T00:34:57 #kisslinux <dylanaraps> Fixed
2019-12-04T00:35:14 #kisslinux <E5ten> 👍️
2019-12-04T02:05:08 #kisslinux <E5ten> other l_strdup_printf's that are used in fopen directly and so aren't assigned to something that's then freed in station.c and main.c
2019-12-04T03:05:32 #kisslinux <konimex> so for some reason eudev-3.2.9 might be slower than eudev-3.2.7
2019-12-04T04:22:25 #kisslinux <Pheyder> Hi guys. I was wondering if someone could help me with getting an image to display properly with neofetch?
2019-12-04T04:48:11 #kisslinux <konimex> fire away
2019-12-04T04:59:15 #kisslinux <Pheyder> so i tried editing config.conf under .config/neofetch and set the image backend to w3m and the image source to wallpaper but neofetch still only displays ascii text
2019-12-04T04:59:49 #kisslinux <konimex> any logs?
2019-12-04T05:01:22 #kisslinux <Pheyder> i can try. im kin da new to linux so sorry if i dont get it a first
2019-12-04T05:02:11 #kisslinux <Pheyder> i just need to type neofetch -v right?
2019-12-04T05:03:23 #kisslinux <konimex> neofetch -vv 2>log
2019-12-04T05:03:36 #kisslinux <konimex> then upload log somewhere, preferably a pastebin service
2019-12-04T05:04:44 #kisslinux <Pheyder> alright
2019-12-04T05:15:42 #kisslinux <Pheyder> sorry im new to this, what would the log file's name be?
2019-12-04T05:15:54 #kisslinux <Pheyder> also it would be in var/log right?
2019-12-04T05:18:08 #kisslinux <Pheyder> https://pastebin.com/4tbn3uLu
2019-12-04T05:18:11 #kisslinux <Pheyder> like that?
2019-12-04T05:18:49 #kisslinux <konimex> two secs
2019-12-04T05:20:03 #kisslinux <konimex> yep
2019-12-04T05:20:27 #kisslinux <konimex> since dylan is offline it's likely that you won't see his response immediately, but he'll see the backlogs in /topic
2019-12-04T05:20:37 #kisslinux <Pheyder> alright
2019-12-04T10:02:10 #kisslinux <dylanaraps> E5ten: Disconnect now works thanks to a little C code in iwd.
2019-12-04T10:06:45 #kisslinux <dylanaraps> iwc will move network configs to disconnect/ on disconnect. iwd will then "clean up" this directory on start/exit, moving the disconnected networks back into the regular directory.
2019-12-04T10:06:49 #kisslinux <dylanaraps> Simple enough.
2019-12-04T10:37:20 #kisslinux <dylanaraps> Pheyder: [!] Image: Imagemagick not found, falling back to ascii mode.
2019-12-04T10:37:25 #kisslinux <dylanaraps> You need imagemagick installed.
2019-12-04T12:21:37 #kisslinux <dylanara1> https://github.com/dylanaraps/eiwd/releases/tag/0.2.0
2019-12-04T12:21:41 #kisslinux <dylanara1> eiwd now has a simple client.
2019-12-04T12:54:43 #kisslinux <Crestwave> Anyone here doing the advent of code? I just finished catching up with POSIX awk.
2019-12-04T12:56:36 #kisslinux <dylanara1> Nope, what is it?
2019-12-04T12:56:49 #kisslinux <Crestwave> There's a coding challenge everyday for December
2019-12-04T12:56:56 #kisslinux <Crestwave> https://adventofcode.com
2019-12-04T13:05:55 #kisslinux <Crestwave> It's pretty fun, and so far, totally doable in Bash and such. The difficulty is supposed to ramp up, though
2019-12-04T13:32:31 #kisslinux <dylanara1> Huh cool
2019-12-04T15:49:53 #kisslinux <qtpie> dylanaraps, the tmux thing got resolved. I had to rebuild libevent
2019-12-04T15:59:40 #kisslinux <dylanaraps> Ah
2019-12-04T16:10:39 #kisslinux <killmanen> hi :)
2019-12-04T16:17:19 #kisslinux <dylanaraps> Hello
2019-12-04T16:17:30 #kisslinux <dylanaraps> I'm happy to answer any questions you may have. :)
2019-12-04T16:21:45 #kisslinux <killmanen> I know getkiss.org says you're only targetting x86-64, but do you have any plans of possibly supporting arm in the future?
2019-12-04T17:23:45 #kisslinux <dylanaraps> killmanen: I don't have any plans no. I don't have any ARM hardware either. Nothing is stopping someone from releasing KISS tarballs for ARM though as is the case with ppc64le https://github.com/jdavies-dev/kiss-ppc64le
2019-12-04T17:30:13 #kisslinux <belfry> howdy
2019-12-04T17:30:48 #kisslinux <belfry> dylanaraps: saw your post about iwd at all, great job :D
2019-12-04T17:30:55 #kisslinux <belfry> *et al.
2019-12-04T17:30:59 #kisslinux <dylanaraps> Thanks :)
2019-12-04T17:31:17 #kisslinux <belfry> i understand that iwctl isn't working because that's what required dbus?
2019-12-04T17:31:25 #kisslinux <dylanaraps> Yup
2019-12-04T17:31:40 #kisslinux <dylanaraps> dbus acts as the bridge between both.
2019-12-04T17:32:13 #kisslinux <belfry> alright, sounds clear enough, I will see if I will have time to get it working over something else, shouldn't be as complicated, the dbus functionality did look pretty isolated :D
2019-12-04T17:32:34 #kisslinux <dylanaraps> It kinda was and wasn't isolated.
2019-12-04T17:33:18 #kisslinux <dylanaraps> We'll need a new IPC method and most likely an entirely new client.
2019-12-04T17:34:14 #kisslinux <dylanaraps> I've written a temporary client (iwc) until this happens.
2019-12-04T17:34:18 #kisslinux <dylanaraps> See usage in the README: https://github.com/dylanaraps/eiwd/
2019-12-04T17:34:46 #kisslinux <belfry> I see, sounds good
2019-12-04T17:35:32 #kisslinux <dylanaraps> The iwc client abuses the fact that iwd watches its config directory basically.
2019-12-04T17:36:03 #kisslinux <dylanaraps> I also added a little bit of C code to iwd to make this into something usable.
2019-12-04T17:36:21 #kisslinux <dylanaraps> (outputting current network and scan results to files for example)
2019-12-04T17:46:36 #kisslinux <belfry_> i see, looks pretty neat nonetheless
2019-12-04T17:47:10 #kisslinux <belfry_> as far as other IPC methods go, I would consider either unix sockets or systemv message queues
2019-12-04T17:47:29 #kisslinux <belfry_> although my fingers are twitching at the thought of 9p, haha
2019-12-04T17:47:50 #kisslinux <belfry_> but yea, this is probably not what 9p should be used for
2019-12-04T17:48:25 #kisslinux <belfry_> in other news, I was out and about looking for a new irc client
2019-12-04T17:48:50 #kisslinux <belfry_> saw this tiny client which looked pretty neat, then I open the dependency list and voila, `libdbus`
2019-12-04T18:06:15 #kisslinux <mforney> belfry_: haha, i had to restrain myself from suggesting 9p, too
2019-12-04T18:07:06 #kisslinux <belfry_> mforney: fancy seeing you here, haha
2019-12-04T18:07:19 #kisslinux <belfry_> im a fan of your stuff
2019-12-04T18:08:42 #kisslinux <mforney> thanks :)
2019-12-04T19:27:58 #kisslinux <E5ten> dylanaraps: nice!
2019-12-04T19:38:05 #kisslinux <E5ten> mforney: I wanna switch to samurai, but I really like the ninja feature of continuously replacing one line for output, any chance you'd consider adding that?
2019-12-04T20:11:51 #kisslinux <mforney> E5ten: i'm hesitant to because it would require detection of a terminal with isatty (POSIX-specific), and non-standard TTY ioctls (TIOCGWINSZ) to determine the window width to make sure the command fits on one line
2019-12-04T20:12:42 #kisslinux <mforney> i already require some POSIX functions, but i'm trying to keep that set as small as possible to making porting to other operating systems easy
2019-12-04T20:14:22 #kisslinux <mforney> have you thought about implementing a small tool that does this, that you can use in a pipeline?
2019-12-04T20:15:02 #kisslinux <mforney> like samu | lastline
2019-12-04T20:15:42 #kisslinux <E5ten> I haven't, I don't really know how I'd go about doing it
2019-12-04T20:16:29 #kisslinux <mforney> probably would be really easy
2019-12-04T20:57:33 #kisslinux <mforney> E5ten: http://ix.io/23zk seems do the job, but requires changing samurai to make its output line-buffered, even when not connected to a terminal: setvbuf(stdout, NULL, _IOLBF, 0)
2019-12-04T20:58:45 #kisslinux <mforney> probably could be improved by listening for SIGWINCH to detect a changed window size. i believe ninja queries the window size every time it prints a line
2019-12-04T21:02:27 #kisslinux <E5ten> I'll try it out when I get to my computer, thanks
2019-12-04T21:31:36 #kisslinux <mforney> nice, it also works with make(1) with no changes :)
2019-12-04T21:58:06 #kisslinux <dylanaraps> Oh, I didn't realize you were the Samurai dev. :P
2019-12-04T22:00:49 #kisslinux <E5ten> Because autotools is the devil if I cmaked eiwd odds you'd accept it?
2019-12-04T22:02:11 #kisslinux <dylanaraps> Alongside autotools, sure.
2019-12-04T22:02:35 #kisslinux <dylanaraps> A plain Makefile could probably work too.
2019-12-04T22:04:14 #kisslinux <E5ten> I prefer cmake cuz then I can skip GNU make and I prefer building things with no GNU ;)
2019-12-04T22:05:36 #kisslinux <E5ten> I'll try to do it tonight, from then on lemme know about any build system changes so I can match them in cmake
2019-12-04T22:07:35 #kisslinux <dylanaraps> Will do
2019-12-04T22:34:22 #kisslinux <dylanaraps> Behold: https://github.com/dylanaraps/eiwd/blob/master/iwc#L51-L73
2019-12-04T22:34:33 #kisslinux <dylanaraps> Scan results are now aligned as a table in pure shell.
2019-12-04T22:35:21 #kisslinux <dylanaraps> Example: https://termbin.com/lzj2
2019-12-04T22:36:22 #kisslinux <E5ten> oooo nice
2019-12-04T22:36:56 #kisslinux <dylanaraps> Can't set IFS without a subshell though :(
2019-12-04T22:37:39 #kisslinux <E5ten> Can't you just put an actual tab?
2019-12-04T22:38:02 #kisslinux <dylanaraps> Maybe
2019-12-04T22:38:11 #kisslinux <E5ten> I think so
2019-12-04T22:39:04 #kisslinux <dylanaraps> Yup
2019-12-04T22:39:07 #kisslinux <dylanaraps> :D
2019-12-04T22:39:09 #kisslinux <E5ten> Is the || [ "$ssid" ] in case read fails because the file is missing a trailing newline?
2019-12-04T22:39:42 #kisslinux <dylanaraps> Yup
2019-12-04T22:39:48 #kisslinux <dylanaraps> We *may* be OK without it.
2019-12-04T22:39:51 #kisslinux <E5ten> Don't you control the contents lol
2019-12-04T22:40:09 #kisslinux <dylanaraps> Yeah...
2019-12-04T22:40:20 #kisslinux <dylanaraps> OK
2019-12-04T22:40:22 #kisslinux <dylanaraps> It's fine.
2019-12-04T22:40:24 #kisslinux <dylanaraps> lol
2019-12-04T22:40:28 #kisslinux <E5ten> So it couldn't be missing the trailing newline unless a bad user modified it right?
2019-12-04T22:40:44 #kisslinux <E5ten> Lol
2019-12-04T22:40:51 #kisslinux <dylanaraps> Yup
2019-12-04T22:41:06 #kisslinux <dylanaraps> In which case, iwd would update it at some stage anyway.
2019-12-04T22:42:35 #kisslinux <E5ten> For ssid(), to avoid the [ call which could theoretically be not builtin, you could do the read command || the die command and then have the log command underneath ;)
2019-12-04T22:43:38 #kisslinux <dylanaraps> ooo
2019-12-04T22:43:40 #kisslinux <dylanaraps> Nice
2019-12-04T22:43:43 #kisslinux <dylanaraps> Let me test it
2019-12-04T22:45:15 #kisslinux <dylanaraps> Nice
2019-12-04T22:45:16 #kisslinux <dylanaraps> Works
2019-12-04T22:46:45 #kisslinux <E5ten> I guess you could also do the same with any -n -z or string comparison using cases instead of [ cuz case has to be builtin, these are clearly super worthwhile changes with tangible performance benefits 😏
2019-12-04T22:47:18 #kisslinux <dylanaraps> I swapped from cases to ifs since they're shorter lol
2019-12-04T22:47:23 #kisslinux <dylanaraps> time to swap back
2019-12-04T22:47:28 #kisslinux <dylanaraps> :^)
2019-12-04T22:48:08 #kisslinux <E5ten> At least I think cases have to be built in, they're keywords not builtin commands right?
2019-12-04T22:48:12 #kisslinux <dylanaraps> Yup
2019-12-04T22:48:18 #kisslinux <dylanaraps> Just tested in mrsh
2019-12-04T22:48:26 #kisslinux <dylanaraps> Which is 100% POSIX (no extensions)
2019-12-04T22:48:40 #kisslinux <E5ten> So even [ is external?
2019-12-04T22:48:42 #kisslinux <E5ten> Wild
2019-12-04T22:48:50 #kisslinux <dylanaraps> Yup
2019-12-04T22:48:58 #kisslinux <dylanaraps> Kinda dumb I know
2019-12-04T22:49:02 #kisslinux <dylanaraps> Even echo/printf
2019-12-04T22:49:29 #kisslinux <dylanaraps> A shell which doesn't expose anything built-in to print with...
2019-12-04T22:49:57 #kisslinux <dylanaraps> I understand the whole 100% POSIX aspect but some extensions make 100% sense.
2019-12-04T22:50:04 #kisslinux <E5ten> I wish printf was mandated builtin
2019-12-04T22:50:09 #kisslinux <dylanaraps> Same
2019-12-04T22:50:13 #kisslinux <dylanaraps> Also sleep
2019-12-04T22:50:19 #kisslinux <dylanaraps> Why isn't sleep builtin?
2019-12-04T22:50:29 #kisslinux <E5ten> Ikr
2019-12-04T22:51:26 #kisslinux <E5ten> Cuz like fuck echo, that shit's broken and I'm not gonna use it, but guaranteed builtin printf would make making scripts that are 100% no external commands, as specified by POSIX and not just as common in shells, wayyy easier
2019-12-04T22:51:43 #kisslinux <E5ten> Cuz printf is honestly like the king builtin, so fucking useful
2019-12-04T22:52:05 #kisslinux <E5ten> (not counting keywords)
2019-12-04T22:52:42 #kisslinux <dylanaraps> Yup
2019-12-04T22:52:56 #kisslinux <dylanaraps> It makes sense for performance regardless though.
2019-12-04T22:53:29 #kisslinux <E5ten> Yeah
2019-12-04T22:54:14 #kisslinux <dylanaraps> Imagine needing to fork and exec each time you want to print something.
2019-12-04T22:55:01 #kisslinux <E5ten> The thought makes me sad
2019-12-04T22:56:54 #kisslinux <dylanaraps> https://github.com/dylanaraps/eiwd/commit/34cfbd9fa3e0a4541e3b11bf9443f80a747adaf0#diff-0c760aac26fadb53c593bfa94f2c82d4R68
2019-12-04T22:57:11 #kisslinux <dylanaraps> Removed [ from while loop
2019-12-04T22:58:10 #kisslinux <E5ten> When it comes to shell scripting, meaningless microoptimization is the best kind of optimization :))
2019-12-04T22:58:14 #kisslinux <dylanaraps> Of course
2019-12-04T22:58:40 #kisslinux <dylanaraps> > real    0m 0.00s (iwc scan)
2019-12-04T22:59:36 #kisslinux <E5ten> Mmmmm
2019-12-04T22:59:39 #kisslinux <E5ten> Love that
2019-12-04T23:00:14 #kisslinux <E5ten> That check for $pass being empty is just begging to be a case ;)
2019-12-04T23:02:07 #kisslinux <dylanaraps> Hang on, I'm removing the need to pass some arguments around. :^)
2019-12-04T23:02:12 #kisslinux <dylanaraps> Gotta remove that overhead.
2019-12-04T23:04:30 #kisslinux <E5ten> Of course
2019-12-04T23:05:12 #kisslinux <E5ten> On the topic of built-ins, the inability to sort arrays in pure bash frustrates me so much
2019-12-04T23:05:38 #kisslinux <dylanaraps> Yup
2019-12-04T23:05:44 #kisslinux <dylanaraps> It's a tacked on feature.
2019-12-04T23:06:19 #kisslinux <E5ten> I wish zsh was as ubiquitous as bash so I could script in it, I don't know much about zsh scripting but I do know it has builtin array sorting
2019-12-04T23:07:11 #kisslinux <dylanaraps> zsh has some nice features
2019-12-04T23:07:16 #kisslinux <dylanaraps> too bad it's.. zsh
2019-12-04T23:07:44 #kisslinux <dylanaraps> https://github.com/dylanaraps/eiwd/commit/4c24a4d92200ff1be5c5e74106e883fb0b386b19
2019-12-04T23:07:46 #kisslinux <dylanaraps> 10/10 change
2019-12-04T23:09:47 #kisslinux <E5ten> I mean genuinely that's a valid change if only because on seeing the parameter passing in the case it'd be initially unclear why a parameter was being passed
2019-12-04T23:10:07 #kisslinux <dylanaraps> Yup
2019-12-04T23:10:10 #kisslinux <dylanaraps> https://github.com/dylanaraps/eiwd/commit/20b86709dfbf877690018da0026704754831bf24
2019-12-04T23:10:32 #kisslinux <dylanaraps> No need to run stty after each invocation of iwc either.
2019-12-04T23:10:48 #kisslinux <E5ten> Nice
2019-12-04T23:11:11 #kisslinux <E5ten> How does stty actually control that stuff?
2019-12-04T23:11:19 #kisslinux <E5ten> Escape sequences?
2019-12-04T23:11:39 #kisslinux <dylanaraps> No no
2019-12-04T23:11:49 #kisslinux <dylanaraps> Were it escape sequences I'd do it myself.
2019-12-04T23:12:10 #kisslinux <E5ten> Then how?
2019-12-04T23:12:21 #kisslinux <E5ten> Cuz it kinda feels like magic
2019-12-04T23:12:22 #kisslinux <dylanaraps> It sends signals to the terminal itself.
2019-12-04T23:13:04 #kisslinux <dylanaraps> > stty sets or reports the terminal I/O characteristics for the standard input device.
2019-12-04T23:14:01 #kisslinux <E5ten> How does it send messages to the terminal itself though? I'm having a tough time wrapping my head around stty
2019-12-04T23:15:32 #kisslinux <dylanaraps> Time to do some digging.
2019-12-04T23:16:40 #kisslinux <dylanaraps> Actually. Most likely the TTY device through the kernel.
2019-12-04T23:44:14 #kisslinux <E5ten> You can remove the check for $2 and do ssid_encode "${2:?Missing [said] argument}" I think
2019-12-04T23:44:20 #kisslinux <E5ten> ssid*
2019-12-04T23:47:02 #kisslinux <dylanaraps> Nic
2019-12-04T23:47:05 #kisslinux <dylanaraps> e
2019-12-04T23:54:15 #kisslinux <dylanaraps> Down to 135 LOC: https://github.com/dylanaraps/eiwd/blob/master/iwc
2019-12-04T23:54:19 #kisslinux <dylanaraps> Looking good now.