Intro. redditor wants to build simple irc bot. reddit / irc ---------------------------------------------------------------------- penguinv · 2015-12-24 22:59 Hello I want to build a simple irc bot. Right now I want to build one to cast the iching but I would start out with something more simple of course. I havent programmed recently and dont know python. A friend writes them in php on the server I intend to use but that doesnt mean I must. I have programmed in fortran and pascal but long ago. There's so much environment that I never had to worry about. So there's lots of beginner things I need to know relevant to that. ---------------------------------------------------------------------- damiankw · 2015-12-24 23:13 If you arent interested in doing much programming, just set up an eggdrop and make a script in Tcl, it will be your quickest and easiest option. I'd you want to build in python, there are a couple of ready made irc bots around, just google them, then you can expand on them. If you need any help with this let me know, I'm in the middle of building one myself (but note, ive only done python 3 for about four weeks) ---------------------------------------------------------------------- Paradox · 2015-12-25 04:07 I recommend the [cinch](https://github.com/cinchrb/cinch) bot framework. It's got a nice simple dsl (domain specific language) for doing most of what you would need to do in an irc bot, and the developer is both friendly and active on irc ---------------------------------------------------------------------- penguinv · 2015-12-25 05:25 Thanks. Here's a question. I mentioned this on my irc chat channel. Am just a user. And some of them came up with "dont use frameworks". I wasnt able to get a reason why not or what one was or what 'not using a framework" is called. I made some searches, mostly looking at wikipedia and am still quite lost. Frameworks seemed to be a library of definitions and routines. That is common in everything one does. I hope you can tell me more about this. I appreciate your time. ---------------------------------------------------------------------- penguinv · 2015-12-25 05:31 Thanks. I am pretty blind on python. I tried 2 different places on line to learn. One taught bad programming techniques but I finished it (Byte of Python) and the other was so slow I couldnt manage - 34 lessons and we cant do anything. I was needing an explanation of what apple.banana() really meant in terms of structures but they we talking to people who were learning to program for the first time - taught the trees but not forest-view. (The Hard Way) Then I got a library book but it was more like a list of libraries and references. Plus it was so heavy that I would have to leave it at home, so it went back. I hope this gives you an idea of what I want. Python how it works, how the symbols one can use are constructed for someone who knows a bit about compilers and tokens and had a background of looking at how the compiler assembled their code. Just to make sure it did what I wanted, lol. ---------------------------------------------------------------------- damiankw · 2015-12-25 05:52 I know a few other languages (Tcl, VB.NET, PHP) so might have been easier for me to get into Python, but I found that the http://docs.python.com/ had pretty much all I needed in explanation of the functions I was using, other than that I used #python on irc.freenode.net - the guys in there are extremely friendly and extremely helpful in understanding a piece of code, pushing you in the right direction on what you're meant to be using, or just helping if you have a bug in your code. ---------------------------------------------------------------------- Paradox · 2015-12-25 06:12 Well, cinch is a "framework" in a rahter loose sense of the word. Most IRC frameworks are basically just pre-built bots, that you add plugins to handle functionality to. Things like CloudBot and SupyBot are notable examples of this. Cinch, on the other hand, basically just abstracts the raw IRC connection, channels, users, etc. behind objects. So instead of having to write something like `PRIVMSG #memenetics :hello` you can just do `Channel('#memenetics').msg('hello')` Frameworks, in the general sense, are opinionated libraries that provide a standardized way to build a piece of software. They typically standardize common behaviors. A good example is Ruby on Rails. Its a framework in that it abstracts most of the common application concerns behind a nice clean api. Things like storing data in a database, rendering views, etc. ---------------------------------------------------------------------- penguinv · 2015-12-25 06:32 Thanks. I'll put that in my pipe and smoke it. I need to learn some language of today, maybe one that doesnt hide the raw irc connection behind objects so that when I use one I know what is happening. On the other hand, maybe it'll be a Cinch. ---------------------------------------------------------------------- penguinv · 2015-12-25 06:34 Great. ---------------------------------------------------------------------- Paradox · 2015-12-25 06:51 Well, you can always view the raw objects in cinch. Its a very friendly framework, and learning it, you're basically just learning ruby. Which has *tons* of resources to help ---------------------------------------------------------------------- penguinv · 2015-12-25 07:34 I can and will search online but meanwhile if there is anything/s you would like to turn me onto, now is a good time. I have been thinking, one day I will write a bot. And now, there is something I want to write. I'm in an irc room where someone/s has built a very useful and interesting bot. It searches and calculates and converts. It searches mit, and Wolfram. It can give you a smattering of phrases from the internet that use a set of words. It can translate too, aka look up translations. It is much faster than siri and more informative and of course gives links with the text. add a numeral and you can choose how many links you want if you do a google search. Another bot spits out weather. Just text. It's really quite the useful info center. And it has some things that are fun. ---------------------------------------------------------------------- Paradox · 2015-12-25 07:42 Well, the best book for learning ruby is the [pickaxe book](https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0), but not everyone likes books. Some people prefer online courses. In my opinion, the best way to learn ruby is just by writing it. Start out by figuring out what you want your bot to do, then make it do it. You might get frustrated, or stuck, or find something is beyond your technical ability. But keep going and you can pretty much do anything you need ---------------------------------------------------------------------- penguinv · 2015-12-25 07:54 thanks. i like books. I think my mind concentrates better in continuous light. I'll check it out.