QLirc IRC Chat Client
QLirc IRC Chat Client
The latest project that I have been working on in a IRC Chat client that runs on SMSQ/E with QPCII and SMSQmulator. QLirc is a minimal IRC chat client that is hard-coded to access the #QLforums. It is a small SuperBasic program (about 4K) that will connect to #QLforums and let the user send and receive chat messages. It will show all users that are connected to Chat. It can be found on my web page:
swensont.epizy.com
I and one other person has tested it and we think it is ready for the general public. The zip file contains the _ssb source file, the _bas program and the _doc documentation.
I did this mostly as a proof of concept and a fun project to do. Hopefully others will find it useful.
Tim Swenson
swensont.epizy.com
I and one other person has tested it and we think it is ready for the general public. The zip file contains the _ssb source file, the _bas program and the _doc documentation.
I did this mostly as a proof of concept and a fun project to do. Hopefully others will find it useful.
Tim Swenson
Re: QLirc IRC Chat Client
I have tested the program in QPC with Black Phoenix 15 and found an error on lines 840 and 1450 in which, apparently, "count" appears as a reserved word. Simply change the "count" variable to, for example, "ccount", and it worked without problems. Now I just need human interaction in the chat.
- vanpeebles
- Commissario Pebbli
- Posts: 2816
- Joined: Sat Nov 20, 2010 7:13 pm
- Location: North East UK
Re: QLirc IRC Chat Client
Usually manned all week from 7pm onwardsbadaman wrote:I have tested the program in QPC with Black Phoenix 15 and found an error on lines 840 and 1450 in which, apparently, "count" appears as a reserved word. Simply change the "count" variable to, for example, "ccount", and it worked without problems. Now I just need human interaction in the chat.
Re: QLirc IRC Chat Client
The chat found out yesterday night that COUNT is a reserved keyword from the DBAS database toolkit which results in a name clash when loaded.badaman wrote:I have tested the program in QPC with Black Phoenix 15 and found an error on lines 840 and 1450 in which, apparently, "count" appears as a reserved word. Simply change the "count" variable to, for example, "ccount", and it worked without problems. Now I just need human interaction in the chat.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: QLirc IRC Chat Client
The variable is reset to zero in those two lines and appears to be otherwise unused, so could be removed or renamed to avoid the DBAS clash.tofro wrote:The chat found out yesterday night that COUNT is a reserved keyword from the DBAS database toolkit which results in a name clash when loaded.badaman wrote:I have tested the program in QPC with Black Phoenix 15 and found an error on lines 840 and 1450 in which, apparently, "count" appears as a reserved word. Simply change the "count" variable to, for example, "ccount", and it worked without problems. Now I just need human interaction in the chat.
Tobias
I've been looking at the QLirc program and am busy commenting it, with the intention of adding a few faciities to it.
In case anyone is not familiar with the term "IRC" it stands for Internet Relay Chat. IRC allows a group of people to chat by text online together. It can also allow a degree of private chat and file sharing too. You can read about it at https://en.wikipedia.org/wiki/Internet_Relay_Chat. Software on a server somewhere joins it all together and individuals view the messages and type their own messages on a small piece of software (such as QLirc) on their own computer.
QLirc is very well written (don't get big-headed Tim ), structured and easy to follow. In fact, the way Tim has written it makes it easy to add new features.
On Friday night's Online Chat, I decided to appear in "split personality" mode, one presence via the Mibbit/Kiwi IRC client in my Windows browser as I usually do, and the other from QLirc running in SBASIC on QPC2. Both from the same PC. it worked well apart from a few minor issues found - Tim was online with us and making notes every time I "broke" it. Nothing that you don't see in first releases of new software.
The current version has an issue with length of line entered in the user input window at the bottom - type a line longer than the window and the cursor goes out of range. SHIFT SPACE (and other >127 character codes) appears as unknown characters in the chat, so some degree of character translation (Unicode?) may be needed if it is to handle, say, accented characters. You can send smileys and a few /commands to the chat and they get handled at the server end so could do with a little bit of documentation even if the QLirc does not "handle" them as such, maybe a simple menu or keyboard shortcuts to smileys, maybe a help screen of /commands for IRC.
It's delightfully easy to use, so I wouldn't want to add to too much to make it over-complicated.
Do bear in mind that as Tim said, it's dedicated to the QLForum, and not a more general purpose IRC client as it stands. Also, if making changes, bear in mind that every so often the servers will send a "PING" command out to QLirc to verify that it is still there and if no "PONG" response is given by QLirc in a given time, the online chat will throw you off, so if adding to the software, please do bear this in mind.
I've been very impressed with the fact that QLirc is written in BASIC, and only about 200 lines of BASIC at that! Wish all my "first releases" of QL software worked this well.
Tim writes his programs using his own Structured SuperBasic (SSB) system available from http://www.dilwyn.me.uk/program/index.html and QLirc is supplied both as a normal SuperBASIC program and as _ssb files. If we make changes to QLirc, it would be nice if we could make the changes available in both formats.
If anyone has ideas for changes and additions to the program, maybe share them here, or send them to Tim and I so that we can try to co-ordinate things. It's so nice to have a real internet application working from a QL emulator. Hope it spurs others on to develop such software.
Last edited by dilwyn on Tue Feb 25, 2020 3:41 pm, edited 1 time in total.
Reason: Correct 2 typos
Reason: Correct 2 typos
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: QLirc IRC Chat Client
What you mentioned about the use of ping and text input is important. I would propose some simple things for the structure of the program:dilwyn wrote:If anyone has ideas for changes and additions to the program, maybe share them here, or send them to Tim and I so that we can try to co-ordinate things. It's so nice to have a real internet application working from a QL emulator. Hope it spurs others on to develop such software.
Define via variables the irc server and the irc channel at the beginning of the program, so that quick changes can be made to test the program on other irc servers and channels, if this is possible.
Define through variables the channels 4 to 6 that the program uses so that they can be changed easily in case of conflict with other channels that may already be open in the system.
I think that there will already be some toolkit that helps to generate an open channel number that can be assigned to a variable, and this allows the process to be automated, but of course, it makes it dependent on an external toolkit. At least if the channel numbers are defined in variables, which are then used in the program, this will make a change of channel number very simple.
Another simple issue to implement that might be interesting is the use of different colors for the text in the chat window. For example, using red for server connection messages and for the names of those involved in the chat, at the beginning of each text sent to the chat, "<name> :", green for the different texts sent to the chat, and white for those own interventions in the chat. I think this would help to have a faster view of text messages, especially in chats where there is a lot of movement, although, of course, there is no scroll in the chat window here.
Re: QLirc IRC Chat Client
Perhaps the several chat lines could be put into an array, to let the user scroll. There is an old extension from TT to delete an entry in an array to make room for a new entry. Say, after 200 lines you delete the first line to make room for a new last one (if the array has 200 entries).badaman wrote:there is no scroll in the chat window here.
4E75 7000
Re: QLirc IRC Chat Client
It is already invented. Its called channelN = FOPEN('con_ etc.badaman wrote:<>
Define through variables the channels 4 to 6 that the program uses so that they can be changed easily in case of conflict with other channels that may already be open in the system.
I think that there will already be some toolkit that helps to generate an open channel number that can be assigned to a variable, and this allows the process to be automated, but of course, it makes it dependent on an external toolkit. At least if the channel numbers are defined in variables, which are then used in the program, this will make a change of channel number very simple.
Since the program only currently works in emulators ==> SMSQ/E why not just a separate SBASIC daughter job?
Although Im not fond of chat, I did try out the program. Moveable windows would seem to me to be an obvious improvement. Some of us have sort of moved on from 512x256x4
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
Re: QLirc IRC Chat Client
Even simpler. You can use a pointer that indicates the last available entry, and go overwriting and increasing the pointer to 200, for example, and then put the pointer at the beginning of the array. When printing on the screen, you just have to print from the position of the pointer, and when you reach the end of the array, check if the pointer was at the beginning of the array, if not, print from the beginning of the array to the position before the pointer.Ralf R. wrote:Perhaps the several chat lines could be put into an array, to let the user scroll. There is an old extension from TT to delete an entry in an array to make room for a new entry. Say, after 200 lines you delete the first line to make room for a new last one (if the array has 200 entries).badaman wrote:there is no scroll in the chat window here.
off topic: This has reminded me of the way microdrives are formatted. The last sector is formatted and the sector decreases until it reaches one, overwriting the written sectors first, in this way the microdrive is formatted with the possible sectors for that tape.
Edit 2020-02-24: Maybe this complicates too much the original idea of a basic program.
I'm curious. What toolkit do you mean?Ralf R. wrote: There is an old extension from TT to delete an entry in an array to make room for a new entry.
Last edited by badaman on Mon Feb 24, 2020 10:53 am, edited 3 times in total.
Re: QLirc IRC Chat Client
Great, I didn't remember it, and it's in TK2. Thank you.pjw wrote: It is already invented. Its called channelN = FOPEN('con_ etc.