Re: [fpc-other] [fpc-pascal] WebAssembly Target

2017-03-16 Thread Graeme Geldenhuys
On 2017-03-16 20:48, nore...@z505.com wrote:
> With a local copy of the 2016 internet on hands

hahaha That just made me remember circa 1994. I worked as a computer
technician. An oldish lady walked into the shop and handed me a box of
720KB floppies - asking if I could give her a copy of The Internet. :-D

Regards,
  Graeme

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] [fpc-pascal] WebAssembly Target

2017-03-16 Thread noreply

On 2017-03-16 05:46, Graeme Geldenhuys wrote:

On 2017-03-11 23:23, Daniel Gaspary wrote:

WebAssembly
")


I love how they say multiple times in the video:

   "... and completely secure."


Umm, didn't they say the exact same thing about Java Applets, Flash,
Silverlight etc. :)  I guess time will tell, but if history is anything
to go buy, security issues *will* pop up.

Saying all that, I really respect Mozilla for what they have done
regarding the web. Firefox is the only browser I ever use.


There is no such thing as completely secure.

Most security these days is held together by a single 8-12 character 
string of text. That's not security.


And, those obsessed with security (OpenBSD types) are the biggest 
hypocrites of all, claiming to value privacy and security, while 
completely ignoring security and privacy of people - stalking them and 
harassing them.


Security is a joke.  Let's hold together all our data by a 8-12 
character string! Yippee! That's security!
Security always has been a joke and always will be.  You could create a 
system where it requires 3562 passwords to log in, in sequence, but then 
it would take too long to log in.


Website security is to use static html files and a static site 
generator. Which renders your website basically utterly castrated and 
un-interactive for the users. Think: no web forum, as there are no 
logins.. just a static site with static html content. That's security 
for you: rendering computers utterly useless and boring. Basically 
describes the openbsd operating by default: a castrated OS that does 
nothing useful, until you install something unsecure (or worse, 
"insecure") from "ports" or some website.


I'm not saying the attempts at trying to solve security weren't (or 
aren't) worthwhile - anyone who heads down this road of security is a 
brave soul. It's just that time after time again, security has been and 
will always be a bad joke.


Then you've got the whole quantum computer issue. First guy to get ahold 
of a quantum computer may be able to crack passwords in a few 
milliseconds which a classic computer would take thousands of years to 
do, if the quantum computer hype holds up and we actually understand 
quantum mechanics the way we think we do. And then, what happens to 
bitcoin if someone cracks it and starts hording up millions of bitcoins 
across several accounts.

___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other


Re: [fpc-other] [fpc-pascal] WebAssembly Target

2017-03-16 Thread Mattias Gaertner
On Thu, 16 Mar 2017 15:29:05 +0100 (CET)
"Karoly Balogh (Charlie/SGR)"  wrote:

>[...]
> > JS uses Double, which can express integers correctly from
> > -$10 to $f.
> > That should be enough for most browser programs, don't you think?  
> 
> No, to be honest, I don't think so. I already tracked down bugs in native
> client side software caused by this, because of stupid NodeJS backends.

May I ask, what you used to translate your int64 code to NodeJS?


> Because someone thought it will be "good enough". It wasn't. Not to
> mention the cases I got "NaN" string as value in an integer field, but
> that's just JS in general for fun.

I agree, that the NaN, Infinity and div by zero specials of JS are for a
Pascal programmer hard to befriend.

 
> Although NodeJS wasn't running in the browser, admittedly. But I think the
> more complex apps you bring to the web, on top of JS, the more such issues
> will appear,

True.

> and the harder it will be to track it down.

Why?


> Bottom line: It's not good enough if you want to guarantee the same
> results as on other platforms, for all integer arithmetics with all
> standard types, including 64bit ones. Which is a must for any self
> respecting multiplatform compiler, IMO. (There are ways to do it
> nevertheless even w/o WebAssembly, but with a clear performance hit.)

You can calculate wrong with int64 as well. That's why FPC has the nice
range checking feature. Same can be done for other integer types,
including the JS int53bit.


Mattias
___
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other