Discussion:
python for irc client
(too old to reply)
Daniel
2024-07-04 07:51:34 UTC
Permalink
Hi guys -

I have historical experience developing sofwtare for my own use. It has been
quite a while since doing so and the advent of new languages has brought me
here. Python has built quite a reputation. It would be fun to pick up a
new language while I'm at it.

I've been a consumer of IRC since the nineties and have been running an
instance of quassel core on an old laptop for the last decade. Over the
years, my use of xwindows has dramatically decreased and I spend 90% of my
computer time with multiple panes of tmux while I do my usual daily fun. One
thing missing is a good textmode irc client that will connect to quassel
core.

I've seen efforts to make a plugin for weechat but, to date, I don't see much
progress on that end.

In your wisdom, would python be a good environment to accomplish this? I'd
likely use extended ascii and colors. The point would be to minimize the
memory footprint of the application.

I don't use standard desktop computers anymore - I'm writing this on my
beloved pi400 using emacs.

Thanks

Daniel
inhahe
2024-07-04 09:22:53 UTC
Permalink
On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list <
Post by Daniel
Hi guys -
I have historical experience developing sofwtare for my own use. It has been
quite a while since doing so and the advent of new languages has brought me
here. Python has built quite a reputation. It would be fun to pick up a
new language while I'm at it.
I've been a consumer of IRC since the nineties and have been running an
instance of quassel core on an old laptop for the last decade. Over the
years, my use of xwindows has dramatically decreased and I spend 90% of my
computer time with multiple panes of tmux while I do my usual daily fun. One
thing missing is a good textmode irc client that will connect to quassel
core.
I've seen efforts to make a plugin for weechat but, to date, I don't see much
progress on that end.
In your wisdom, would python be a good environment to accomplish this? I'd
likely use extended ascii and colors. The point would be to minimize the
memory footprint of the application.
I don't use standard desktop computers anymore - I'm writing this on my
beloved pi400 using emacs.
Thanks
Daniel
--
https://mail.python.org/mailman/listinfo/python-list
I think Python would be a great language to write an IRC client in, it's a
rapid-development language, and also Python is particularly good for text
manipulation and the IRC protocol is textual rather than binary. But, if
your only purpose for using Python is to reduce the memory footprint, I'm
not sure. I don't know specifically, but I'd guess Python has a higher
memory footprint than, say, C, because it's a high-level language. For
example, each variable has to be boxed, and also the interpreter has to be
loaded..

Regarding high ASCII, I don't know if that works in IRC, but either way,
ASCII isn't really enough nowadays. You need to support Unicode;
specifically, UTF-8.
Daniel
2024-07-04 20:43:33 UTC
Permalink
Post by inhahe
On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list <
Post by Daniel
Hi guys -
I have historical experience developing sofwtare for my own use. It has been
quite a while since doing so and the advent of new languages has brought me
here. Python has built quite a reputation. It would be fun to pick up a
new language while I'm at it.
I've been a consumer of IRC since the nineties and have been running an
instance of quassel core on an old laptop for the last decade. Over the
years, my use of xwindows has dramatically decreased and I spend 90% of my
computer time with multiple panes of tmux while I do my usual daily fun. One
thing missing is a good textmode irc client that will connect to quassel
core.
I've seen efforts to make a plugin for weechat but, to date, I don't see much
progress on that end.
In your wisdom, would python be a good environment to accomplish this? I'd
likely use extended ascii and colors. The point would be to minimize the
memory footprint of the application.
I don't use standard desktop computers anymore - I'm writing this on my
beloved pi400 using emacs.
Thanks
Daniel
--
https://mail.python.org/mailman/listinfo/python-list
I think Python would be a great language to write an IRC client in, it's a
rapid-development language, and also Python is particularly good for text
manipulation and the IRC protocol is textual rather than binary. But, if
your only purpose for using Python is to reduce the memory footprint, I'm
not sure. I don't know specifically, but I'd guess Python has a higher
memory footprint than, say, C, because it's a high-level language. For
example, each variable has to be boxed, and also the interpreter has to be
loaded..
Regarding high ASCII, I don't know if that works in IRC, but either way,
ASCII isn't really enough nowadays. You need to support Unicode;
specifically, UTF-8.
Okay great. Since my original post, I settled on UTF8. I have to create
a list of requirements for v1.0 to limit scope creep and I can actually
get this done.

I may put it on github and solicit for assistance at some point.

Thanks for the response, both of them. I'll look at the other code and
see how I can fold it in. What I have to find out, still, is how the
core server manages the messages. I suspect the core does all the
sending and receiving and the client just sends the packets to core for
management. That's just a guess though.

I still have to review the liraries, this is a new idea hatched last
night so I have yet to investigate much.

My initial thought was C++ but this would be my first termianl-only
application in many years so I thought a different coding platform would
be effective.

Daniel
inhahe
2024-07-04 09:25:48 UTC
Permalink
Post by inhahe
On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list <
Post by Daniel
In your wisdom, would python be a good environment to accomplish this?
I think Python would be a great language to write an IRC client in, it's a
rapid-development language, and also Python is particularly good for text
manipulation and the IRC protocol is textual rather than binary.
Oh yeah, I forgot I was going to mention that Twisted has already done a
lot of the dirty work for you if you make it in Python...they have twisted.
words.protocols.irc, which implements the IRC protocol. (I don't know if
it's up to date and supports ircv3, though.)
Left Right
2024-07-04 13:55:09 UTC
Permalink
Hi.

Just FYI, I use Erc (in Emacs). I'm not a very advanced user, perhaps,
but I never felt like I miss anything. That's not to stop you from
making your own, but if you just need a decent text client for IRC,
then there's already at least one.

On Thu, Jul 4, 2024 at 11:30 AM inhahe via Python-list
Post by inhahe
Post by inhahe
On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list <
Post by Daniel
In your wisdom, would python be a good environment to accomplish this?
I think Python would be a great language to write an IRC client in, it's a
rapid-development language, and also Python is particularly good for text
manipulation and the IRC protocol is textual rather than binary.
Oh yeah, I forgot I was going to mention that Twisted has already done a
lot of the dirty work for you if you make it in Python...they have twisted.
words.protocols.irc, which implements the IRC protocol. (I don't know if
it's up to date and supports ircv3, though.)
--
https://mail.python.org/mailman/listinfo/python-list
orzodk
2024-07-08 21:09:01 UTC
Permalink
One thing missing is a good textmode irc client that will connect to
quassel core.
I've seen efforts to make a plugin for weechat but, to date, I don't see much
progress on that end.
In your wisdom, would python be a good environment to accomplish this? I'd
likely use extended ascii and colors. The point would be to minimize the
memory footprint of the application.
One feature of weechat you may be interested in is it's relay mode:

https://weechat.org/files/doc/weechat/stable/weechat_user.en.html#relay

If you flipped this architecture around you should be able to run
weechat as your bouncer then connect quassel or any other client to
weechat with it's IRC relay mode. Weechat also has a list of remote
interfaces that can use this

https://weechat.org/about/interfaces/

OTOH if you prefer the setup you've got I've had 0 issues with the
Python plugins I've written for weechat. A Quassel/weechat proxy plugin
should be pretty straight forward and if you prefer a standalone bridge,
as others have suggested Python is great for that too!

Loading...