💾 Archived View for gemini.ctrl-c.club › ~phoebos › logs › freenode-kisslinux-2021-02-08.txt captured on 2022-07-17 at 03:14:50.
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
2021-02-08T00:30:05 #kisslinux <retrohacker> I mean, it's 30 lines of bash. That it works at all is awesome! 2021-02-08T03:24:24 #kisslinux <mcpcpc[m]> you could always run `nc irc.freenode.net 6667` and pass server commands directly. no need for ircc but that just becomes annoying… no one wants to type PRIVMSG, USER, NICK and PING/PONG. 2021-02-08T03:24:53 #kisslinux <mcpcpc[m]> i was really surprised though by the lack of examples on how to do this in POSIX shell (lots of bots examples, but no clients). In Bash, you can achieve the same functionality as ircc in fewer lines, but then you lose portability. 2021-02-08T05:52:15 #kisslinux <sh4rm4^bnc> is it even possible ? one would need to attach netcat to a bidirectional fd afaict 2021-02-08T12:27:16 #kisslinux <mcpcpc[m]> sh4rm4^bnc: are you referring to using netcat alone? there no need to attach to a fd to handle the io stream… it does so inherently. 2021-02-08T12:53:13 #kisslinux <aarng> prepending messages with "PRIVMSG #channel" is not that much of a big deal (can always paste it), responding to pings is the real problem when using `nc` alone 2021-02-08T13:31:28 #kisslinux <tracer> aarng: Why not using shell aliases? 2021-02-08T13:32:31 #kisslinux <aarng> tracer: you are not in a shell, it's netcat reading from stdin 2021-02-08T13:33:44 #kisslinux <aarng> but that's why I like ii-style input from a fifo 2021-02-08T13:34:35 #kisslinux <tracer> Hmm. how about a thin wrapper between hell and nc? 2021-02-08T13:34:45 #kisslinux <tracer> s/hell/shell/g 2021-02-08T13:34:46 #kisslinux <kissbot> <tracer> Hmm. how about a thin wrapper between shell and nc? 2021-02-08T13:35:03 #kisslinux <aarng> isn't that what mcpcpc[m]'s script is? :) 2021-02-08T13:35:21 #kisslinux <aarng> you could also use rlwrap I suppose 2021-02-08T13:35:47 #kisslinux <tracer> I didn't check it out, sorry. 2021-02-08T13:36:06 #kisslinux <aarng> no worries 2021-02-08T13:36:10 #kisslinux <aarng> https://github.com/mcpcpc/ircc/blob/master/ircc 2021-02-08T13:36:40 #kisslinux <tracer> For the time being I use Lime Chat. I'm not so pure about the smallest possible solution, just one that fits my needs. 2021-02-08T13:36:59 #kisslinux <aarng> yeah, not a fan of smallest possible either 2021-02-08T13:37:03 #kisslinux <aarng> raw irc is an unreadable mess 2021-02-08T13:38:13 #kisslinux <tracer> Ah, yes, thats what I mean by a wrapper, can be easily extended. But, as there are so many IRC clients it's more just for fun or prrof of concept I guess. 2021-02-08T13:40:25 #kisslinux <aarng> yeah, making the output prettier isn't too hard 2021-02-08T16:56:44 #kisslinux <dilyn> ircc you say 2021-02-08T17:09:15 #kisslinux <mcpcpc[m]> ^^. i originally originally named it “shitirc”. also, pretty sure ircc is taken already. idk. not feeling very creative at the moment. or that it’s worth giving this wrapper script a name. lol. 2021-02-08T17:09:33 #kisslinux <mcpcpc[m]> will probably just put it into a blog post 2021-02-08T17:22:06 #kisslinux <jedavies> mcpcpc[m]: You could host the source here: https://shithub.us/ 2021-02-08T17:28:35 #kisslinux <mcpcpc[m]> lol. i thought about it actually. i dont think they are hosting any non-plan9 projects yet… 2021-02-08T17:39:22 #kisslinux <aarng> mcpcpc[m]: https://termbin.com/ed55 2021-02-08T17:39:26 #kisslinux <aarng> my take of your script 2021-02-08T17:40:34 #kisslinux <aarng> doesn't need tail and all the pipes. This is basically runs just the script and a subshell (the loop reading user commands) 2021-02-08T17:40:46 #kisslinux <aarng> -is 2021-02-08T17:44:59 #kisslinux <mcpcpc[m]> aarng: ah. that looks much nicer. i hated the temp file, pipes and tail. 2021-02-08T17:46:37 #kisslinux <aarng> nc -e is pretty cool, because it just sets up the socket/fds and execs the script 2021-02-08T17:46:51 #kisslinux <aarng> check your processes when the script is running, not even a nc there :) 2021-02-08T17:50:18 #kisslinux <mcpcpc[m]> ahh nice. i think i need to practice with shell scripting a bit more. i’ve spent too much time in C lately. 2021-02-08T17:53:05 #kisslinux <aarng> heh, the original script was good though considering you didn't know about netcats -e flag 2021-02-08T18:00:07 #kisslinux <mcpcpc[m]> meh. your rewrite was pretty enlightening. lots of concepts i know in C but didn’t know how to implement in shell. so i appreciate you taking the time to do it. :) 2021-02-08T18:02:59 #kisslinux <aarng> you are welcome 2021-02-08T18:07:48 #kisslinux <mcpcpc[m]> hm.. the -e argument seems to be lacking in some implementations (i.e. dash). still nifty though. 2021-02-08T18:11:40 #kisslinux <aarng> I think all netcat implementations should have it 2021-02-08T18:13:53 #kisslinux <aarng> nope, OpenBSD's -e is something different 2021-02-08T18:13:55 #kisslinux <aarng> doh