Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Today in JavaScript news

Name: Anonymous 2010-10-28 23:13

All numbers are IEEE-754 floats. No exceptions.

[1] http://jwz.livejournal.com/1307198.html

Name: Anonymous 2010-10-28 23:41

this isn't news.

Name: VIPPER 2010-10-29 4:17

NEWS

Name: VIPPER 2010-10-29 6:20

JWZ

Name: Anonymous 2010-10-29 6:22

This makes perfect sense. Integer numbers are a machine-induced cancer. In fact, I'd argue all numbers should be complex. If you want some kind of truncation you should state it explicitly.

Name: Anonymous 2010-10-29 6:30

>>5
It's actually pretty stupid because of the errors induced by inexact floats. Floats only have place in approximative calculations with what should be "real"-like numbers, but where errors can be tolerated. Normal fixnum/bignum and ratios/complex numbers should be used for everything else.

Name: Anonymous 2010-10-29 6:41

>>> (100000000000000000000000000000000000000000000000000000000000000000000000000000000000+1)%10
4
>>> (10000000000000000000000000000000000000000000000000000000000000000000000000000000000+1)%10
4
>>> (1000000000000000000000000000000000000000000000000000000000000000000000000000000000+1)%10
8
>>> (10000000000000000000000000000000000000000000000000000000000000000000000000+1)%10
6
>>> (100000000000000000000000000000000000000000000000000000000000000000+1)%10
8
>>> (10000000000000000000000000000000000000000000000000000000+1)%10
8
>>> (10000000000000000000000000000000000000000000+1)%10
4
>>> (1000000000000000000000000000000000+1)%10
6
>>> (1000000000000000000000000+1)%10
4
>>> (10000000000000000+1)%10
0
>>> (1000000000000000+1)%10
1


FUCK!!!

Name: Anonymous 2010-10-29 6:44

>>6
64-bit floating point numbers can store exact integers up to 2^53. This limit is no different from the limits in ``integers''.

Name: Anonymous 2010-10-29 8:33

One word, Javascript. The intent behind it is the only thing that was ever good about it. This is what went right:

1. Lisp is good, let's take ideas from it.
2. Prototype-based object system.

This is what feels "ok..." to me:

1. Parens scare people off, let's use C syntax.

This is what went wrong with it:

1. Types are difficult, let's make them even worse and shitty so that web designers will be happy.
2. Everything is an object, well, more or less so (just don't try stuff on null), objects used for hashes (awesome, except for a few magic methods), broken for, kinda broken arrays, broken null exposing low-level nurupo, NaN, +Infinity, -Infinity, false and null (WTF), etc.
3. Lol whats prototypes, in sepples and javur we have classes. Prototype system fubared into something that would seem to please classtards, even though in the end it pleases nobody.
4. Management tards forced it on the market unpolished and untested; nobody really understood the issues of the language becuase not even their creators tried writing anything with it prior to release.
5. Java sells, let's call it Java durr hurr hurr (marketing/management retards). This helped making Javascript the most misunderstood language ever.
6. Standard library? Lol whats that?
7. Terrible, simplistic, broken and on top of that commonly misunderstood integration with web browsers.
8. Then the W3C comes to take an enterprise dump on Javascript and adds the DOM to it, with its enterprisey design and naming conventions to ensure anything you do with it feels like smashing your dick with a brick. (Thank goodness there's innerHTML to get shit done.)
9. Web designers, code snippets and all the bullshit around the web.
10. And last but not at all least, Internet Explorer and its intentionally shitty implementation.
11. ECMA selling out to Microsoft and writing a blasphemously queer and nauseating standard.

Name: Anonymous 2010-10-29 9:29

>>5
I shan't reply otherwise IWHBT

Name: Anonymous 2010-10-29 17:41

>>10
If you agree with the trolls, then the trolls win!

Name: Anonymous 2010-10-30 2:03

>>9
Excellent post. I love your work.

Name: Anonymous 2010-10-30 9:25

>>9,12
I agree! Good work! Love it.

I think the main problem is that programmers don't consider it a serious language. As they say, you can write FORTRAN in any language. A static class based system ala sepples and javur is not the only way to go. Yet, many programmers equate it with what programming is.

Name: Anonymous 2010-10-30 11:38

ECMAScript would have been better off today as a VM specification, though I don't think that was true at the time.

Name: Anonymous 2010-10-30 17:55

>>14
At some point it may actually go this way, given that every serious implementation of ECMAScript is now VM-based.

Name: Anonymous 2010-10-30 18:55

>>1
What? No exceptions? You can't possibly write ENTERPRISE software without exceptions! No exceptions.

Name: Anonymous 2010-10-30 19:07

>>16
You want to see something ENTERPRISE? I've got something so enterprise, it's like the Pocky in a Mozilla and Microsoft Pocky kiss.

$ wget -qO- http://www.w3.org/TR/IndexedDB/|grep -c "No exceptions"
59

Name: Anonymous 2010-10-30 19:13

>>17
NO EXCEPTIONS

Name: Anonymous 2010-10-30 23:25

1) Yes not news, but fine as a topic of conversation even if it is kind of old hat by now.
2) Well, except no. As mentioned towards the end of the post bitwise operations are defined up to 32 bits. This is to allow implementations to do type tagging and actually use 32 bit ints where appropriate (as mentioned in the comments). Merging separate types together happens in other places too. Javascript does it again for objects and arrays, as does php and lua (with tables). Internally the lua implementation has an array part and a hashtable part as I suspect do the other two.

Name: Anonymous 2013-03-13 12:37

Javashit

Don't change these.
Name: Email:
Entire Thread Thread List