• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[!REBOL3] General discussion about REBOL 3

Ladislav
17-Jan-2013
[615x2]
17 digits are sufficient
 does not mean the same as "17 digits are always necessary".
Sometimes much less digits suffice.
BrianH
17-Jan-2013
[617]
17 digits aren't sufficient to represent the difference between 0.10000000000000001 
and 0.1000000000000000055511151231257827021181583404541015625, so 
if you say that the real IEEE754 value is 0.1000000000000000055511151231257827021181583404541015625 
then you can't show that difference in 17 digits.
Ladislav
17-Jan-2013
[618x9]
You are ignoring the definitions:


1) there is the IEEE 754 "definition" specifying which number corresponds 
to 0.1 - I know (using my Rebol script), that it actually is the 
number 0.1000000000000000055511151231257827021181583404541015625

2) there is my definition specifying which strings "accurately enough" 
represents the IEEE 754 number 0.1000000000000000055511151231257827021181583404541015625. 
According to my definition (you can find it defined as a Rebol function 
in the ML) all of "0.1", "0.10000000000000001" and "0.1000000000000000055511151231257827021181583404541015625" 
"accurately enough" represent the number.
This means that any of the three strings can be used as a MOLD result 
that would be considered "accurate enough" by me.
I hope that answers your questions.
The fact is that, e.g., "0.1" is not accurate when you *want* 17 
digits of the number, but it is "accurate enough" when my definition 
of what "accurate enough" means is used.
In the same way, "0.10000000000000001" is not exact when you need 
to know how exactly the number looks, but it is again "accurate enough".
Why are you trying to push this change into MOLD without /all?

 - aha, this may be a misunderstanding. I am not that far yet. What 
 I said was that it was possible to define which string may be considered 
 "accurate enough" when representing a given Rebol value VALUE. There 
 may be more than one such string. Now it is interesting that neither 
 MOLD nor MOLD/ALL needs a longer string than the one that is already 
 "accurate enough". Thus, it might make sense to just use the shortest 
 "accurate enough" string (which may have even less than 15 digits) 
 for both MOLD and MOLD/ALL..
I see this described behaviour as the most "intelligent one" because 
it gives the "accurate enough" result, while the current (in Windows, 
that is) behaviour of MOLD is that many of its results are not "accurate 
enough" while some of the MOLD/ALL results are longer than necessary 
for being "accurate enough". Interestingly, it seems to me that e.g. 
Rebol 2.100.111.2.4 already has MOLD/ALL working this way.
err. it probably was 2.100.111.4.4
History of the problem: the whole issue originated when we found 
out that MOLD was not "accurate enough". I proposed to use a sufficient 
MOLD with 17-digit precision, which was made available by introducing 
SYSTEM/OPTIONS/DECIMAL-DIGITS, but that still did not look to be 
enough, so later on I proposed to adjust MOLD/ALL to always use 17 
digits to make sure all MOLD/ALL results will be "accurate enough".
GrahamC
17-Jan-2013
[627]
Cyphre, how much work would it take to get https in ?  I see that 
you have tls now
Maxim
17-Jan-2013
[628]
would 17 digits be a minimum which we can extend using SYSTEM/OPTIONS/DECIMAL-DIGITS 
 ?
Robert
18-Jan-2013
[629]
Graham, you can use HTTPS now. We don't support all cipher algos 
yet but it should work with most HTTPS connections.


We are currently looking into geting more cipher algos implemented. 
Than all HTTPS things should work.
GrahamC
18-Jan-2013
[630x3]
Interesting .. didn't obviously realise that.
Are the proper source files available?
I can probe system/schemes/tls and /https
Cyphre
18-Jan-2013
[633]
Graham, the TLS protocol scheme works transparently on tcp ports. 
So you just need to change the port/scheme from 'tcp to 'tls and 
you have the tcp connection secured. Then you can build any higher-level 
protocol over it. Having made the TLS scheme transparent I needed 
to make only few minor changes to the Gabriele's HTTP scheme to be 
able support HTTPS as well.
GrahamC
18-Jan-2013
[634x2]
How did you manage this?
And are you going to implement SHA256 ?
Cyphre
18-Jan-2013
[636x2]
I simply wrote the TLS scheme :-) I've also added the neccessary 
crypto algorithms at the native level (only RSA with ARC4 cipher 
suite is supported at the moment).

IMO this solution gives us much better flexibility: the encryption 
code is native(fast) and the TLS protocol logic is in REBOL so it 
is possibel to enhance it much more easily.
(so for example we can later implement also the certificate handling 
and TLS server mode)
GrahamC
18-Jan-2013
[638]
Sure.  not needing large libraries is a plus
Cyphre
18-Jan-2013
[639x2]
SHA256: yes I'd love to add it. The only problem is to get efficient 
free C implementation.
this applies also for other algorithms so any good links are welcome
GrahamC
18-Jan-2013
[641x2]
so has to be compatible license and in plain C ?
I thought I found some before
Cyphre
18-Jan-2013
[643x2]
I have AES algo prepared for integration. Currently we are looking 
for good implementations of: SHA256, DH and 3DES
(I guess these pieces are missing to cover TLS 1.0 cipher suite set)
GrahamC
18-Jan-2013
[645]
Which copyrights are incompatible?
Robert
18-Jan-2013
[646x4]
GPL
MIT or Apache
or compatible to these.
I thin BSD can fit too.
Cyphre
18-Jan-2013
[650]
Once we manage to integrate the algorithms in form of natives it's 
just matter of adding the other cipher suites handling into the current 
TLS scheme.
GrahamC
18-Jan-2013
[651]
compatible are GPL, MIT and Apache?
Cyphre
18-Jan-2013
[652]
GPL? really?
GrahamC
18-Jan-2013
[653]
that's what I was asking .. robert seems to say yes
Cyphre
18-Jan-2013
[654x2]
I prefer BSD or public domain or suctom 'free' licenses as there 
I'm sure noone will complain I've stolen the code. In other lic cases 
I have no experience.
If GLP is acceptable then things would be easier. (I've seen some 
nice GPL implementations) But I'm not sure GPL code can be used for 
encapping?? But as I said I'm usually lost in the licensing stuff 
;)
GrahamC
18-Jan-2013
[656x2]
I'd think GPL is out
Even Apple has a sha256 open source version out there
Cyphre
18-Jan-2013
[658x2]
BTW getting the TLS/HTTPS to run on Android proves that our solution 
is good and can be easily used in crossplatform way. No need for 
any OpenSSL-like bloat anymore in R3 ;)
I haven't searched for SHA256 yet so that is possible. I'm now looking 
more for the DH and 3DES...
Robert
18-Jan-2013
[660]
GPL not
Cyphre
18-Jan-2013
[661]
One more note: AFAIK the current version of TLS + the encryption 
support increased the binary only by ~10KB which is also cool. I 
have no clue how much could take adding the rest of missing algorithms 
though.
GrahamC
18-Jan-2013
[662]
http://www.codeguru.com/cpp/misc/misc/cryptoapi/article.php/c8195/Portable-Cryptography-API-for-Triple-DES.htm

C and C++ implementations
Cyphre
18-Jan-2013
[663]
thanks, have that one in the candidates list as well
BrianH
18-Jan-2013
[664]
The time protocol mentioned in Vanity seems to need a change in design. 
There should never be a need for READ to have an /args option - that 
is what the path and query stuff are for.

Instead of this:
    read/args time://time.nist.gov [ GMT ]
it should be this:
    read time://time.nist.gov/gmt