[Implemented] UDP Network !!!

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

I see... we are in a restaurant now.

The people here are waiting for doubles and unl. strings
for over 1 year.
Lets think... hmmm.. that would mean that UDP has to wait
at least 10 month because it wasnt requested 1 year ago. :)

Ohhh... i forgot to write in blue (another way of shouting).

Nobody answered whats wrong with writing some procedures
for UDP. Dont you have the knowledge to do it or are you just
too lazy ??
Not everything must be integrated in PB and some things can
be done by 3rd party developers.
Maybe we have somebody here who wants to write a lib or some
procedures for UDP ??
At least this would solve your problems quickly...

Doubles, macros, strings are all compiler things that no 3rd party
developer can integrate into the compiler.
UDP is only another lib, so it doesnt matter who writes it.

Same for 3D. You can already make 3D games with PureBasic
and a 3rd party 3D engine... but Fred WANTS to include this
directly into PB.

Everybody needs some other features for PureBasic.
At least 100 people here dont need UDP. Same for 3D.

So lets just wait for Fred... maybe he will say what he wants.

Of course the chances that UDP gets added are much better
when you annoy Fred with it and request it _at least_ once a week. :)
(the more the better)

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> I see... we are in a restaurant now.

LOL! Sorry about going off like that -- I am tired.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

Hi again!
Old topic and i know that here are some people dont like this mess bomb again and again!

But hey... since we have 3D support now i think some people maybe will start soon coding the first 3D game in Pure... So we really need UDP for support for big game projects over the lan/net instead only TCP/IP... Please think about it...



PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Have you take a look to the UDP.dll supplied in previous post ?

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by dmoc.

Fred, could you provide a link please? I have searched but not found any udp.dll.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by geoff.

I agree with Danilo concerning doubles. I have several projects
which I cannot begin without accurate maths.
I have to use other languages if I want to make sensible use
of the 80 bit floating point hardware of my CPU.

For example, I can't do financial calculations,
engineering calculations or calculate GPS positions
with 32 bit floats.

This is simple fundamental functionality. More complex
functions are often better written in the PureBasic
application, not in the language itself. At least this
complex stuff should be a lower priority.

Sorry Fred, for becoming boring on this topic.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.
Originally posted by geoff

I agree with Danilo concerning doubles. I have several projects
which I cannot begin without accurate maths.
I have to use other languages if I want to make sensible use
of the 80 bit floating point hardware of my CPU.

For example, I can't do financial calculations,
engineering calculations or calculate GPS positions
with 32 bit floats.

This is simple fundamental functionality. More complex
functions are often better written in the PureBasic
application, not in the language itself. At least this
complex stuff should be a lower priority.

Sorry Fred, for becoming boring on this topic.
I agree

Manolo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by geoff

I can't do financial calculations,
IMO you cannot do financial calculations with floating point numbers at all. Better off using a number system where you do not lose any data, which I think is what Rings's BigNumbers library does. I'm not sure how it works, but I'm guessing all numbers are treated as strings or something like that so you never lose accuracy even at high values.


--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TheBeck.

That was me who posted it. My original post seams to be MIA.
http://www.thebeck.com/udp.zip

Update:
Found my original post. It's on this page. :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.
IMO you cannot do financial calculations with floating point numbers at all. Better off using a number system where you do not lose any data, which I think is what Rings's BigNumbers library does. I'm not sure how it works, but I'm guessing all numbers are treated as strings or something like that so you never lose accuracy even at high values.
yes 100% right, Strings are used.So formating depends on your skills.
and never lose some precision while converting from native-number to strings like STRF() or similar.
But this goes offtopic now


Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by geoff.

Yes, you can do simple operations like add, subtract and multiply with very long integers without losing any accuracy.

But how do you calculate the area of a circle using integers? Or calculate compound interest at say 5% for a period of 12.7 years (which needs fractional powers).

The truth is economists, engineers and scientists do their calculations in floating point and round the results as needed. But they don't use 32 bit floats, they use 64 bit or even 80 bit floats. They have to. That's why every Intel microprocessor since the 486 has an 80 bit hardware floating point unit that's very very fast and that's why we need double floats in PureBasic ASAP.

Please excuse my ignorance, what do the letters IMO mean?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by geoff.

Yes, you can do simple operations like add, subtract and multiply with very long integers without losing any accuracy.

But how do you calculate the area of a circle using integers? Or calculate compound interest at say 5% for a period of 12.7 years (which needs fractional powers).

The truth is economists, engineers and scientists do their calculations in floating point and round the results as needed. But they don't use 32 bit floats, they use 64 bit or even 80 bit floats. They have to. That's why every Intel microprocessor since the 486 has an 80 bit hardware floating point unit that's very very fast and that's why we need double floats in PureBasic ASAP.

Please excuse my ignorance, what do the letters IMO mean?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

IMO = in my opinion

cya,
...Danilo
(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

You're wrong, scientist do their calc with help of bignumber library which can handle without loss precision very big numbers, like Rings's bignumber lib do. floats are very inaccurates when becoming big or very small (even 80 bits one). I agree than for games/apps it can be very useful and it's on my TODO list for PB 4.0.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by dmoc.

To clarify: normal floats have a limited precision. In a lot of situations this is not a problem but there are other situations where this will cause problems eventually. Lack of precision implies an error and even if the error is minutely small it can build over many calculations. Try the code below. @Fred - this is going to cause problems in 3D programming.

OpenConsole()

For i=1 To 10
n.f = Pow(10,-i)
PrintN("10e-"+Str(i)+": "+ StrF(n))

Repeat
k.s = Inkey()
Until k""
Next

PrintN("Done. Press any key to exit.")
Repeat
Until Inkey()""
Post Reply