Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 2 of 9 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 89
Like Tree1Likes

Thread: Breakdown of data (JavaScript)

  1. #11
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Ok so I (pretty much) broke everything down to Boolean (in no particular order):

    String - empty string would be false, because there is no "string" between the quotes, whereas any string would be true.
    Number - positive numbers would be true and negative numbers would be false
    Boolean - not listed because these are boolean translations
    Undefined - false (like the empty string)
    Null - false (like Undefined)
    Bigint - same as Number
    Symbol - true because these are unique. Therefore everything is accounted for, and is one consistent thing.
    Object - true because of the presence of an object, as opposed to the absence of one (false)
    Function - Basically the same as Object

    I still need to test this, but it's a rough sketch (better than nothing).


    -- edit --


    So basically, the "value" of something would determine whether it were true or false. Therefore things are pretty straightforward except for function and symbol, which are objects, and objects I'm not exactly certain about as to whether they are true or false. I think they are true because they are "positive" containers for information. By "positive" I mean that they can store positive values, which, like a functioning (and empty) battery, has "true" potential and therefore is true.
    Last edited by Cinder; Apr 21st, 2021 at 11:45 AM. Reason: elaboration

  2.  

  3. #12
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Ok, an object would be true because if it weren't it would fail a condition (which would, for example, make it's properties inaccessible).

  4. #13
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    And for posterity's sake I said everything would be true, what I meant was everything would be 1.

  5. #14
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    So ok now I'm basically asking a question I asked before but this time it's a little more refined: does anyone know how 0 breaks down to 1? I figured this out years ago but I have since lost my work and have to redo it.

  6. #15
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Ok, and we would translate our Boolean to Number via Number (within our system). Ultimately, everything would be 1 by:

    Conversion of Object/Function to Boolean to Number.

    Everything would be "1" and not, say, "true", if nothing else because "1" is shorter in length than "true" (as string).

  7. #16
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Ok, I've begun coding the beast (I decided to up the ante by coding the mother of all computer programs), and the first thing I've found is that I work upon a foundation of indifference, but I need to justify this indifference (to make sure I'm right):

    HTML Code:
    <html>
        <head>
            <script>
                window.onload = function() {
                    var array1 = ["red"],//, "blue"],
                        array2 = array1,
                        failed = false;
                    array1.forEach(function(a1Element) {
                        array2.forEach(function(a2Element) {
                            if (a1Element != a2Element)
                                failed = true;
                        });
                    });
                    if (failed) {
                        console.log("Failed!");
                    } else {
                        console.log("Success!");
                    }
                };
            </script>
        </head>
    </html>
    This succeeds when array1 has only one element, therefore "all is one", or all is 1, or I have justified my indifference.

  8. #17
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Furthermore, I extended my search to 2 bit binary and realized that all data is reflective:

    00
    01
    10
    11

    00 and 11 are reflective, as are 01 and 10. This pattern stretches on throughout all binary. Now I figure if I can just figure out what to do with some data (reflect it/etc) I have this thing dialed.


    -- edit --


    So for every time there is a binary with all 0 bits and a corresponding reflection of a binary with the same amount of bits, but all bits are 1, there is a set of binary where for every binary (x) there is a corresponding reflection (y).
    Last edited by Cinder; Apr 27th, 2021 at 08:36 AM. Reason: elaboration

  9. #18
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    I took the reflection of the data, which was the opposite of the data, and reflected it (to create something like an opposite of an opposite) and the original data and this data have the same bits, from the right.

    -- edit --

    example:
    original binary: 10100
    reflection of reflection: (00)100
    Last edited by Cinder; Apr 27th, 2021 at 01:19 PM.

  10. #19
    Senior Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    150
    Member #
    62344
    Liked
    1 times
    Ok I took this pattern and extrapolated some data and:

    Original input: 01010
    Extrapolated: 11010

    So what is happening here is the original data is being prepended by a number that represents the "magnitude" of the data: how many "times bigger" I made the data. That is definitely what that is lol.

  11. #20
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,980
    Member #
    5580
    Liked
    761 times
    Ok ... I have a feeling we’re all getting “punked”. Is all of this for real?


Page 2 of 9 FirstFirst 1 2 3 4 ... LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com