ESChat

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: ESChat

Post by RichAlgeni »

You are creating three copies of your STRING$ variable. One in the parent process, one in the Procedure call, and one in your pointer. There are 8 zillion ways to do this of course, but if you wanted an example of a more efficient way:

Code: Select all

Procedure SNETSTRING(ID, @STRING, LENSTRING.i)
    SendNetworkData(ID,@STRING,LENSTRING)
EndProcedure

STRING$ = "Some string, whatever"

SNETSTRING(ID, @STRING$, LEN(STRING$))
This way, you are only creating one copy, and utilizing that in your procedure.

Also, if it were me, I would check the return of SendNetworkData() to make sure all was sent and no error occurred.

BTW: Using SendNetworkData() is using sockets
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

RichAlgeni wrote:You are creating three copies of your STRING$ variable. One in the parent process, one in the Procedure call, and one in your pointer. There are 8 zillion ways to do this of course, but if you wanted an example of a more efficient way:

Code: Select all

Procedure SNETSTRING(ID, @STRING, LENSTRING.i)
    SendNetworkData(ID,@STRING,LENSTRING)
EndProcedure

STRING$ = "Some string, whatever"

SNETSTRING(ID, @STRING$, LEN(STRING$))
This way, you are only creating one copy, and utilizing that in your procedure.
That's good, but wouldn't it need to be

Code: Select all

SendNetworkData(ID,@STRING,LENSTRING+1)
to work :?:
Also, if it were me, I would check the return of SendNetworkData() to make sure all was sent and no error occurred.
But it is you! :lol:
BTW: Using SendNetworkData() is using sockets
That's good. I'm happy for you.
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: ESChat

Post by RichAlgeni »

heartbone wrote:That's good, but wouldn't it need to be

Code: Select all

SendNetworkData(ID,@STRING,LENSTRING+1)
to work :?:
No. there is no need to send the trailing binary zero. For more information on this, you can read the manual.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

Rich a simple mod for you could involve a "string" sent back and forth which would contain the current board setup for tic-tac-toe or maybe even chess if you have more than the demo compiler version. :wink:

Perhaps within this simple PB framework, you could use your beloved sockets and get it finished sometime this life? :P
You duplicate chunks of code instead of separating it out as a procedure, then calling it as needed. You hardcode file and other variables. You place looping commands with other statements on the same line. All of this makes your code harder to maintain, especially for others. An experienced developer knows that they code not only for themselves, but also for the people that come after them. You do yourself no favors by obfuscating your programs to keep yourself in a job. Instead of getting insulted, accept that there are others who have more experience, or are just better coders.
And yes Rich, to acknowledge your earlier critique I realize that I did not optimize the code and recognize that there are huge swaths whiuch could be prodedured if that's your thing. Condensing and crunching this was not my goal here, and I think it might tend to obfuscate the code a bit. I'd prefer to move on and actually produce something. I hope that you caught my hints.
Keep it BASIC.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

OK, my port is forwarded, and I'm ready to host. :)

My thinking is that this, the final step of internet testing, should go well as the internet connectivity is supposed to work as it does on the LAN.
I hope that some of you visiting today have a quick three minutes to help me test my chat room software.
A couple of close calls so far, but we seem to keep missing being online simultaneously.

In theory, running either version posted in this thread should work the same, but I'm running the newer one. ;)
I'll hang around watching Star Trek, checking every five minutes or so hoping for a PM or two.

If any are brave enough, I have a beta...

Code: Select all

FILESAV$= " ░░▒▒▓▓██ »──►  Press Ctrl+S to save the chat text to a file."
FSHOST$=  " ░░▒▒▓▓██ »──►  Press F10, F11, or F12 to send a file to corresponding guest."
FSGUEST$= " ░░▒▒▓▓██ »──►  Press F10 to send a file to the host."
BOOTKEY$= " ░░▒▒▓▓██ »──►  Press Ctrl+F1, F2, or F3 to boot the corresponding guest from chatroom."
LINKSEL$= " ░░▒▒▓▓██ »──►  Press ← → to select URL, then press ↓ to load selected page."
CompilerIf #PB_Compiler_OS=#PB_OS_Linux
SMILEY$=  " ░░▒▒▓▓██ »──►  To enter a smiley ☺ (☻) (☹) press Alt+1 (Alt+2) (Alt+3)."
BELL$=    " ░░▒▒▓▓██ »──►  To enter a bell • press Alt+7."
CompilerElse
SMILEY$=  " ░░▒▒▓▓██ »──►  To enter a smiley ☺ (☻), while typing press Alt+1 (Alt+2) from the keypad."
BELL$=    " ░░▒▒▓▓██ »──►  To enter a bell •, while typing press Alt+7 from the numeric keypad."
CompilerEndIf
edit: In the two days since posting this, no one yet has the balls, so I thought I'd update my avatar to something a bit less intimidating like one of my old patch hounds.
It's not like I'm asking for much. It quite simple, Rich even you could do it. It goes like this.

In reply to your PM I'd give you my IP address. (I'll assume that you know that we would both have to be online at the same time running the program.)
I'd start the host server by running the code, pressing H, and entering my name. Then you'd run the code to connect.
1) Start (the guest client) by pressing J
2) Then enter a name (or just press Enter)
3) Then enter my IP address (the one from the PM reply)
That's it 1-2-3.

You can practice this connection process on your computer by running the program and starting the host (Press H then Enter).
Then open up a second chat window (you'll need to have an executable compiled to start the second window),
and from the second window join the already running host by entering 127.0.0.1 (the system's loop back address) as the IP address of the host.
Keep it BASIC.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

I'm thinking that my expanded lightweight chat room tool that might be just the thing for the small teams here to use to share information.
It can be minimized to your taskbar and when someone connects you'll hear a sound.
If they are already connected, and just need your attention because they finished something, then they can ring a doorbell.
If hosting, then you can boot anyone who connects to your room whenever you need to.
You can send links in the text, and all connected chatters can select and open any of the displayed links in their browser.
As mentioned before, the chat room history including links and smileys can be saved as a text file.
This without becoming a member of any service, the software is forever free.
The executable is under 1 megabyte before compression, and it will work as long as the IPv4 standards are used for web connections.

* Most importantly, you can directly exchange files over the connection. *


No one other than the chatters can access the chat, therefore the data is sent over the connection unencrypted.
However if you are concerned about security, then on your own you could encrypt any sensitive data that you send over the connection.

Over the past day or so I added CTRL+P TO CHANGE PORT # and CTRL+I TOGGLE TO SHOW CONNECTED GUEST I.P. ADDRESS,
along with updating the room's decor a bit. I believe v1.0 is finished, but until I actually test it on the net, it'll be difficult to say for sure.

If anyone here is interested in helping me test the beta, you'll need to give me an adult email address, which means no gmail.
Google won't even let anyone send a zip containing a .exe!
They seemingly unzip every piece of mail to insure that what you are actually sending matches the file extension!
After I determine that this code works as I want, then I'll put the program on Dropbox or a web page, and provide a link for anyone here to get version 1.0.

Thanks if you can help.
Keep it BASIC.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: ESChat

Post by Vera »

Thanks for calling my position BS when I cannot help as this whole subject is way beyond me to coupe with it.

Studying this thread more closely I can read the warnings not to fiddle around with a code I can neither understand, oversee and in the end trust.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

Vera wrote:Thanks for calling my position BS when I cannot help as this whole subject is way beyond me to coupe with it.

Studying this thread more closely I can read the warnings not to fiddle around with a code I can neither understand, oversee and in the end trust.
If you can't even trust something that was posted for you to inspect, then you might be a little too paranoid.
And yes, I am indeed calling BS on the idea that this functionality is beyond your ability to cope with it Vera.
It seems that I have more confidence in your abilities than you do. Sorry about that.
Thanks anyhow for the PM, it gave me brief hope for some progress in my quest within this thread.

OT (not really) I really do think the personal part of this discussion would be better served in a private chat. ;)
Keep it BASIC.
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: ESChat

Post by Vera »

heartbone wrote:If you can't even trust something that was posted for you to inspect, then you might be a little too paranoid.
You miss the point, twist the reasoning and don't hesitate to add on a further deliberately excessive judgment.

To insist on calling my self-evaluation with the lowest swearword possible is the maximun of disrespect. Aimed to demolish a persons self-awareness for corrigibility and vested interests.
Also calling my self-evaluation an 'idea' is undermining and humiliating.
It seems that I have more confidence in your abilities than you do.
How come you to know my abilities and imply that I neither know where I stand and even more lack confidence to learn something new.
How come you to raise yourself that high above me and then pitty yourself for the failed manipulation at my cost.
... a private chat.
... is simply too dangerous for feared bashings

I have no problem with reasonable critique or well-meant support.

And I have no problem to remove this correspondence when you've reconsidered yours.
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: ESChat

Post by TI-994A »

heartbone wrote:...I really do think the personal part of this discussion would be better served in a private chat.
With your manners, you would, wouldn't you.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: ESChat

Post by heartbone »

Again totally off topic.
In between Vera, TI, and of course Rich "helping" others (like Vera to become afraid and confused), their unhelpful and consistantly off topic postings in this thread sure seems like sabotage to me.
TI-994A wrote:
heartbone wrote:...I really do think the personal part of this discussion would be better served in a private chat.
With your manners, you would, wouldn't you.
OK TI your petty sniping on me is on record, and I do consider it to be seriously bad manners.
Do it again and I will create a seperate off topic thread about your hypocrisy.
Perhaps you should not interact with me any more if you don't like my attitude, because I sure don't like your OT bashing post in this thread.
If you don't want to help, you probably should not post here.
Don't tread on me unless you want repercussions.
Vera wrote:
heartbone wrote:If you can't even trust something that was posted for you to inspect, then you might be a little too paranoid.
You miss the point, twist the reasoning and don't hesitate to add on a further deliberately excessive judgment.

To insist on calling my self-evaluation with the lowest swearword possible is the maximun of disrespect. Aimed to demolish a persons self-awareness for corrigibility and vested interests.
Also calling my self-evaluation an 'idea' is undermining and humiliating.
It seems that I have more confidence in your abilities than you do.
How come you to know my abilities and imply that I neither know where I stand and even more lack confidence to learn something new.
How come you to raise yourself that high above me and then pitty yourself for the failed manipulation at my cost.
... a private chat.
... is simply too dangerous for feared bashings

I have no problem with reasonable critique or well-meant support.

And I have no problem to remove this correspondence when you've reconsidered yours.
Leave it.
And the lowest swearword applicable would be one like chat, client, or coconut.
Of course you'd need to swap out the middle part.
Now the relatively polite "BS" acronym I used to describe your excuse doesn't seem so bad does it?

First you get angry at me for ignoring you.
Vera wrote:Subject: UniRun launcher - v1.21x
heartbone wrote:
Thanks for the great tool blueznl....
It's always a pleasure to be completely ignored.

I've invested my lifetime to be of help for you and it's not worth for a tiniest note.

This is what makes the forum an unfriendly and dismissive place.

Vera
now you hammer me for communicating with you! Talk about twisting!

(Putting on my best Spock face...) I do try to avoid the emotionally needy.
However I do agree with you about the forum being a seemingly unfriendly place,
this thread is a prime example, but there are many bright spots.

Finally back on topic to all:
Have no fear people, I can't bite you in a chatroom.
Really.
Keep it BASIC.
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: ESChat

Post by TI-994A »

heartbone wrote:OK TI your petty sniping on me is on record, and I do consider it to be seriously bad manners.
Irony, thy alias is heartbone. :lol:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

ESChat 1.0 success!

Post by heartbone »

I was able to successfully test my program over the internet last night! Woof woof. MO to WA! :D
The first file I transferred to my friend ended up with errors using the 8192 byte packet size.
The following two file exchanges at the 4096 byte packet size were error free.
The functions that Fred and Freak have provided seem to be working very well.

The very first file successfully transferred over the internet using my no sockets system...
I sent a zip of the KJV Bible @ 2.98 MB (3,130,000 bytes).
In return, I got a file @ 7.87 MB (8,261,006 bytes) a 320KBps mp3 encoded tune
from the Good, the Bad, and the Ugly "spaghetti western" movie. :x

Due to the apparent severe lack of interest in, or need for this functionality,
at this point it does not make much sense in putting this executable on any web page for download.
However if anyone decides that they do want it, just ask and I'll send it to you.

Onward.
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: ESChat

Post by RichAlgeni »

bonehead wrote: In between Vera, TI, and of course Rich "helping" others (like Vera to become afraid and confused), their unhelpful and consistently off topic postings in this thread sure seems like sabotage to me.
This is some of the funniest shit I've seen on this forum! bonehead has to be a plant! You can't possibly sink to that level of incompetence, and still be so conceited! You have no idea what advanced programming is, and get offended at the slightest constructive criticism. You don't take advice from those with superior skills and continue to make the same mistakes. Tap the brakes some on your arrogance, because it's certainly not warranted with the code you've displayed here.

Off topic? Nope. You've made it the premise of this thread. But don't bother responding, any response is meaningless. We all know what you are now, a petulant little child crying out for attention. One who requires his falsely inflated ego to be constantly stroked. In your mind, those who do not only do so out of spite and jealousy.

One more thing, you wondered if I was corporate? Maybe so, since I head up development for the company I started in 2001. I write emergency dispatch software. I am certified by the FBI to interface to NCIC, and programs such as NBIRS and UCR. I am also certified by American Ambulance Association for APCO Meds, and by FEMA for their National Fire Incident Based Reporting system. If you or anyone you know has used American Medical Response or Rural Metro, you have utilized my software. I don't use an alias on this forum, so that anyone who wishes to check this, can do so.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

ESChat works better than I thought it would, no errors so fa

Post by heartbone »

RichAlgeni wrote:
bonehead wrote: In between Vera, TI, and of course Rich "helping" others (like Vera to become afraid and confused), their unhelpful and consistently off topic postings in this thread sure seems like sabotage to me.
This is some of the funniest shit I've seen on this forum! bonehead has to be a plant! You can't possibly sink to that level of incompetence, and still be so conceited! You have no idea what advanced programming is, and get offended at the slightest constructive criticism. You don't take advice from those with superior skills and continue to make the same mistakes. Tap the brakes some on your arrogance, because it's certainly not warranted with the code you've displayed here.

Off topic? Nope. You've made it the premise of this thread. But don't bother responding, any response is meaningless. We all know what you are now, a petulant little child crying out for attention. One who requires his falsely inflated ego to be constantly stroked. In your mind, those who do not only do so out of spite and jealousy.

One more thing, you wondered if I was corporate? Maybe so, since I head up development for the company I started in 2001. I write emergency dispatch software. I am certified by the FBI to interface to NCIC, and programs such as NBIRS and UCR. I am also certified by American Ambulance Association for APCO Meds, and by FEMA for their National Fire Incident Based Reporting system. If you or anyone you know has used American Medical Response or Rural Metro, you have utilized my software. I don't use an alias on this forum, so that anyone who wishes to check this, can do so.
If advanced programming is defined as having a firm latch on the gubbmint tit, then yes it looks like you qualify there.
So CONGRATS Mr. Humble for having turned this thread about PureBasic software into a personal one about you Rickie.

I really don't understand why your vitriol filled personal attack posts are allowed here. But I feel that this thread may be the place to point them out.
RichAlgeni wrote:I am constantly amazed at people who ask for help on an advanced subject, yet seem to have no concept of reusable code or unit testing. When I made the comment 'there is no reason why you can't run the server and client process on the same machine,' I assumed you had broken out your code into procedures or even modules. This would allow you to plug that code into a small console calling routines, and perform what the industry describes as 'unit testing.' This is testing small units of code in as many ways as possible, so that code can be reused in other programs. I also meant that there is nothing system wise that would prohibit running a client and server process on the same machine.

Breaking your code down into procedures would also allow you to paste it to a thread easier, and you would be more likely to receive a helpful response.

The PureBasic commands WORK fine as documented. Of course, there will be the occasional bug. However, in my opinion, and with the experience of having PureBasic network code running on multiple client's production systems for a number of years now, I can say with great certainty that the network code is reliable.

Since the network code is solid, and with your 10 years experience with networking, I'm sure this task will turn out to be trivial for you.
It wasn't trivial, and I am constantly amazed that a forum member like TI does not think you an arrogant prik who gets so easily amazed by his own imagination.
Apparently your personality type impresses the weak minded easily, but it does not work for me Rickie.
So stop trying because I see right through your posturing. I repeat it for you as you seem dense
I think that by now Mr. A, we all know by now that your "help" on the topic of networking is 100% not helpful for PureBasic programmers.

Yes indeed son, that accusatory finger of yours is getting really tiring.
You've been here a while, so where is your advanced code that you compare mine to? :lol:
I haven't bothered to look, but at best a crickets chirping response is what I'll expect from a certifiably jealous boy,
one who just may be a plant here to stop people from making progress.
But you're probably the arrogant type who will submit another attack, and I'll eagerly await your next move.
Last edited by heartbone on Tue Feb 17, 2015 3:09 am, edited 1 time in total.
Keep it BASIC.
Post Reply