It’s even easier when using ii from suckless. We have a bot on #openbsd-gaming now that reports how many people are currently playing. It just runs qstat every 5 minutes, massages the output and spits it out to the input file tied to our channel. It’s hard to beat echo "hello world" > irc/chat.freenode.net/#openbsd-gaming for scripting bots.
ii sounds great in theory, but try to answer new incoming queries. now instead of parsing a single stream of text you have to monitor an entire directory tree with files appearing out of nowhere at any time
parsing irc is super simple and ii is a retarded idea for a bot
ii sounds great in theory, but try to answer new incoming queries. now instead of parsing a single stream of text you have to monitor an entire directory tree with files appearing out of nowhere at any time
Sure, if your bot needs to respond to private queries. The one on our channel doesn’t parse any input at all. Including the channel itself - it’s a notification bot.
parsing irc is super simple and ii is a retarded idea for a bot
You’re telling me it was retarded to output the result of qstat every 5 minutes to a file? It took 5 minutes to write the notification using ii - it serves it’s purpose.
Does ii fit every use case of writing a bot for IRC? Nope. However it does make it dead easy to have various tools output content to a file and get it delivered on an IRC channel that way.
To be fair, even for notification, it seems overkill to pull ii and play with files when you can simply send to socket:
NICK bot
JOIN #foo
PRIVMSG #foo :My text message
All you need is echo and nc and IRC is yours. ii look to me like an overkill solution for simple problems and limited solution for complexes ones. But then I might simply be missing some complexity about writing bots, manager server configuration, connection throttling, etc.
Sure, but you will either connect to the network each time you invoke that notification or will need to maintain the connection up, respond to keepalive pings from the server etc. It is really easier to just dump a notification to a file every 5 minutes and have ii handle the connection.
It’s not perfect for all use cases, but it does simplify this specific one we had :)
i am being downvoted, flagged as incorrect, troll and off topic, for pointing out that parsing a flat stream of text is easier than monitoring a directory tree with new files spawning asynchronously
i get that you guys like suckless, but be realistic. the whole point of the article by sircmpwn was that irc is super easy to interact with. a tree-like view of irc may look cool, but ii takes the simplicity of the protocol away and it’s a terrible tool to build bots
Your comments are getting downvoted for being rude, flippant, and having little information. You made more technical points in this comment complaining about downvotes than in both of your previous comments combined.
If you had said this project made a really strange choice about its approach to IRC that seems bad for irc bots, you might have started a great conversation about the use cases they wanted to support, unix philosophy, suckless’s take on unix philosophy, parsing, separation of concerns, any number of things. If you start out rudely dismissive, people won’t see it as worth their time to share their different perspectives that maybe make this a good idea, and if you’re right that it’s a bad idea you won’t convince them.
It’s even easier when using ii from suckless. We have a bot on #openbsd-gaming now that reports how many people are currently playing. It just runs
qstatevery 5 minutes, massages the output and spits it out to the input file tied to our channel. It’s hard to beatecho "hello world" > irc/chat.freenode.net/#openbsd-gamingfor scripting bots.This is like some weird Portlandia thing…“The dream of Plan9 is alive in suckless”, etc.
Still, neat though! :)
ii sounds great in theory, but try to answer new incoming queries. now instead of parsing a single stream of text you have to monitor an entire directory tree with files appearing out of nowhere at any time
parsing irc is super simple and ii is a retarded idea for a bot
This isn’t constructive. If anything the toxicity detracts from your argument above.
Sure, if your bot needs to respond to private queries. The one on our channel doesn’t parse any input at all. Including the channel itself - it’s a notification bot.
You’re telling me it was retarded to output the result of
qstatevery 5 minutes to a file? It took 5 minutes to write the notification usingii- it serves it’s purpose.Does
iifit every use case of writing a bot for IRC? Nope. However it does make it dead easy to have various tools output content to a file and get it delivered on an IRC channel that way.To be fair, even for notification, it seems overkill to pull
iiand play with files when you can simply send to socket:All you need is
echoandncand IRC is yours.iilook to me like an overkill solution for simple problems and limited solution for complexes ones. But then I might simply be missing some complexity about writing bots, manager server configuration, connection throttling, etc.Sure, but you will either connect to the network each time you invoke that notification or will need to maintain the connection up, respond to keepalive pings from the server etc. It is really easier to just dump a notification to a file every 5 minutes and have
iihandle the connection.It’s not perfect for all use cases, but it does simplify this specific one we had :)
yeah i’m sure not many irc bots want fancy features such as being able to reply to things
While I get (and support) the purpose of the post, am I the only one that expected an actual tutorial on how to write an IRC bot?
Perhaps it’s worth someone doing one as a followup, maybe using ii given mulander’s comment.
For a worked example of how simple an IRC bot can be, shazbot is a bot framework written in bash.
FWIW, you can still use your favorite IRC client (e.g. WeeChat + Glowing Bear) with Slack by using wee-slack (https://github.com/wee-slack/wee-slack)
i am being downvoted, flagged as incorrect, troll and off topic, for pointing out that parsing a flat stream of text is easier than monitoring a directory tree with new files spawning asynchronously
i get that you guys like suckless, but be realistic. the whole point of the article by sircmpwn was that irc is super easy to interact with. a tree-like view of irc may look cool, but ii takes the simplicity of the protocol away and it’s a terrible tool to build bots
Pretty sure it is actually because you called the idea retarded. Even if you are right, it certainly isn’t retarded.
Your comments are getting downvoted for being rude, flippant, and having little information. You made more technical points in this comment complaining about downvotes than in both of your previous comments combined.
If you had said this project made a really strange choice about its approach to IRC that seems bad for irc bots, you might have started a great conversation about the use cases they wanted to support, unix philosophy, suckless’s take on unix philosophy, parsing, separation of concerns, any number of things. If you start out rudely dismissive, people won’t see it as worth their time to share their different perspectives that maybe make this a good idea, and if you’re right that it’s a bad idea you won’t convince them.
I suggest you to explain why, in your opinion, this isn’t a good idea. Use rational arguments and provide examples.
People have the right to disagree, but if they do not bring a constructive criticism then their opinion can be kept for themselves.