5 ms·
IRC-anything gets thumbs up from me, I always thought that IRC bots are a great way to learn a new language, just a nice project that you could do in a day that
by diath 6y ago
IRC-anything gets thumbs up from me, I always thought that IRC bots are a great way to learn a new language, just a nice project that you could do in a day that would teach you the basics of the language, string manipulation, networking and some stuff here and there, an IRC daemon is taking it a step further. This looks very nice but it really is minimal as the title claims, personally I've been working on one to learn Rust which is more featureful at this point but as it turns out the IRC protocol and server handling is much more complex once you get into the details than it normally seems for such a simple protocol.
- omribahumi 6y agoThat's what I've been doing since I was 12 years old :) My first "programming" experience was with mIRC scripts. I even wrote an IRC client using mIRC sockets at some point, and a dummy webserver / SMTP client. When you do things the wrong way, you pick up a lot of new skills. I learned to "reverse engineer" (my implementations were trivial, not fully fledged) protocols with a proxy/sniffer pretty early :) From there, the first use case I had for every new language I wanted to learn was write an IRC bot. I had written one in VB6, VB.NET, Python and even C/C++ at some point. It's funny to see this comment on HN, as this has been my mantra for a while now. On top of string manipulation and networking, another important piece it teaches you about a language is using data structures and manipulating data. IRC client is super stateful. For example, it needs to maintain the list of channels you're in, the list of users in those channels, their op/voice status, etc. Highly recommended as a project for picking up a new language.
- paddez 6y agoI really wish I kept my mIRC scripts somewhere. It'd be interesting to see how I progressed.
- gspr 6y agoMe too! I will never forget adding "runtime loadable moduels" to my PHP IRC bot at age ca. 14. Oh my was that functionality a travesty: a user might say something like `!load poll` to activate the poll module. What would my code do? Oh it'd `include poll.php` (or whatever the syntax is, this was both my first and my last PHP project) in the main loop. On every iteration. Because hey, how else would the poll code be able to react to stuff? I learned a lot of lessons and still have fond memories 20 years later :-) Edit: Man, just thinking at this has Metallica playing as background music in my head even though I haven't listened to them in this decade. It's so strange how childhood memories can be so incredibly strong and cover so many sensory modalities. These days I can hardly remember what I did last week.
- sitkack 6y agoI suggest you check out http://brainrules.net/ http://brainrules.net/ by John Medina, he covers the fidelity of our memories as we age and much more. https://www.youtube.com/watch?v=NujSdn1bg5k https://www.youtube.com/watch?v=NujSdn1bg5k
- baruchel 6y agoMay I promote the bot I have been running for two weeks? An IRC text game described there: https://pink-dragon.surge.sh/ https://pink-dragon.surge.sh/
- v64 6y ago> My first "programming" experience was with mIRC scripts. I even wrote an IRC client using mIRC sockets at some point, and a dummy webserver / SMTP client. Same here! The mIRC scripting language was incredibly rich, and the ability to create native Windows dialogs with it was a powerful tool. Back in the 90s, a friend and I reverse engineered the protocol behind a popular program used to play Magic the Gathering online called Apprentice. The protocol was insecure and allowed users to cheat by controlling the outcome of coin flips and other elements of the game. The purpose of the research was to prove definitively that the client could be manipulated, in order to resolve some cheating accusations that had been thrown around. I set out to write a program that would hook into Apprentice through the Win32 API and allow you to change the program's output, while my friend created an mIRC man-in-the-middle server that you could configure through a dialog box to connect to Apprentice and modify incoming and outgoing protocol messages. My project never shipped and his reached widespread availability, eventually leading to the development of better clients [1]. The fact that he was able to get so much out of mIRC script (dialog boxes, sockets, event handling, etc) and was able to make it simple for others to use was impressive. [1] https://en.wikipedia.org/wiki/Apprentice_(software)#Backwash https://en.wikipedia.org/wiki/Apprentice_(software)#Backwash
- txdv 6y agoim still trying to write my perfect irc client (the code has to be good). my latesy approach is using functional programming a lot
- jsjohnst 6y ago> I always thought that IRC bots are a great way to learn a new language I personally use the project “writing an authoritative DNS server” as mine. Forces you to think about data structures, TCP and UDP, bit packing, file/DB handling, parsing, concurrency, serialization, etc. If you don’t know DNS really well, wouldn’t be as easy, but once you know it backwards and forwards it’s a really a great way to push a language your learning.
- cobalt 6y agomeh.. i wrote my first IRC bot when i was like 12. I don't think i'd get very far writing a DNS server as a 12 yr old
- jsjohnst 6y agoIf you can write an IRC bot from scratch, you can do an authoritative DNS server, don’t sell yourself short.
- d1str0 6y agoIRC is more immediate and self gratifying. Very important things for a self-taught 12 yo. Not that dns isnt cool, just probably not the best recommendation for a young programmer.
- skrtskrt 6y agoHow would one start with learning those concepts first? I've been wanting a good way to learn networking that I can code along to in my preferred language
- jsjohnst 6y ago> I've been wanting a good way to learn networking 1) Do you learn best by reading books, following tutorials, or watching videos? 2) What programming language do you know best / second best? Happy to dig up a couple sources for you if you limit the scope a bit via the two questions above.