Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. @IceWolf@masto.brightfur.net @roxy@chitter.xyz @sodiboo@gaysex.cloud js calls that an "array" bevause thats what it is : a contiguous slice of same size values (pointers) , pointing to arbitrary values .

@IceWolf@masto.brightfur.net @roxy@chitter.xyz @sodiboo@gaysex.cloud js calls that an "array" bevause thats what it is : a contiguous slice of same size values (pointers) , pointing to arbitrary values .

Scheduled Pinned Locked Moved Uncategorized
16 Posts 4 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:

    @lizzie @fiore @roxy @sodiboo I don't know if any have ones that aren't constant time. But whether they're constant time or not is an implementation detail. Whether it's an array or not is how you use it, right? Why would it stop being an array if you change how it's implemented? That wouldn't make any sense.

    elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
    elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
    elizabeth worm๐Ÿ”…:wormverified:
    wrote last edited by
    #6

    @IceWolf @fiore @roxy @sodiboo why is his even worth arguing about if you dont even have a counterexample for it to matter

    elizabeth worm๐Ÿ”…:wormverified:L 1 Reply Last reply
    0
    • elizabeth worm๐Ÿ”…:wormverified:L elizabeth worm๐Ÿ”…:wormverified:

      @IceWolf @fiore @roxy @sodiboo why is his even worth arguing about if you dont even have a counterexample for it to matter

      elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
      elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
      elizabeth worm๐Ÿ”…:wormverified:
      wrote last edited by
      #7

      @IceWolf @fiore @roxy @sodiboo also performance characteristics is famously a consequential part of data structures what

      elizabeth worm๐Ÿ”…:wormverified:L sodiboo :pride_heart:S 2 Replies Last reply
      0
      • elizabeth worm๐Ÿ”…:wormverified:L elizabeth worm๐Ÿ”…:wormverified:

        @IceWolf @fiore @roxy @sodiboo also performance characteristics is famously a consequential part of data structures what

        elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
        elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
        elizabeth worm๐Ÿ”…:wormverified:
        wrote last edited by
        #8

        @IceWolf @fiore @roxy @sodiboo like i can implement a map using an array of keys and values and just iterate through for lookup.

        its not a hashmap though, bc structures do actually have characteristics besides their interfaces (even excluding performance)

        Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I 1 Reply Last reply
        0
        • elizabeth worm๐Ÿ”…:wormverified:L elizabeth worm๐Ÿ”…:wormverified:

          @IceWolf @fiore @roxy @sodiboo like i can implement a map using an array of keys and values and just iterate through for lookup.

          its not a hashmap though, bc structures do actually have characteristics besides their interfaces (even excluding performance)

          Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
          Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
          Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:
          wrote last edited by
          #9

          @lizzie @fiore @roxy @sodiboo It may not be a hashmap, but it is a dictionary.

          ฯ†F 1 Reply Last reply
          0
          • Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:

            @lizzie @fiore @roxy @sodiboo It may not be a hashmap, but it is a dictionary.

            ฯ†F This user is from outside of this forum
            ฯ†F This user is from outside of this forum
            ฯ†
            wrote last edited by
            #10

            @IceWolf@masto.brightfur.net @lizzie @roxy@chitter.xyz @sodiboo@gaysex.cloud the point here being ?

            Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I 1 Reply Last reply
            0
            • ฯ†F ฯ†

              @IceWolf@masto.brightfur.net @lizzie @roxy@chitter.xyz @sodiboo@gaysex.cloud the point here being ?

              Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
              Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
              Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:
              wrote last edited by
              #11

              @fiore @lizzie @sodiboo The point being, there's a difference between "contiguous C-style array" and "array". You can implement arrays using the C kind of array, but you don't have to, and if you do it another way you might wind up with a shitty array, but it'd still be an array, just a shitty one.

              ฯ†F 1 Reply Last reply
              0
              • Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:

                @fiore @lizzie @sodiboo The point being, there's a difference between "contiguous C-style array" and "array". You can implement arrays using the C kind of array, but you don't have to, and if you do it another way you might wind up with a shitty array, but it'd still be an array, just a shitty one.

                ฯ†F This user is from outside of this forum
                ฯ†F This user is from outside of this forum
                ฯ†
                wrote last edited by
                #12

                @IceWolf@masto.brightfur.net @lizzie @sodiboo@gaysex.cloud if youre trying to say that a utf8 string then is just "an array of utf8 scalars" then i am sorry but it is just plain wrong and i dont see the point in arguing about it tbh

                Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I 1 Reply Last reply
                0
                • ฯ†F ฯ†

                  @IceWolf@masto.brightfur.net @lizzie @sodiboo@gaysex.cloud if youre trying to say that a utf8 string then is just "an array of utf8 scalars" then i am sorry but it is just plain wrong and i dont see the point in arguing about it tbh

                  Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
                  Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I This user is from outside of this forum
                  Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:
                  wrote last edited by
                  #13

                  @fiore @lizzie @sodiboo I mean, I don't see why

                  ["w", "o", "l", "f", "๐Ÿบ"]

                  wouldn't be an array?

                  (see: Ruby's String.chars method)

                  elizabeth worm๐Ÿ”…:wormverified:L 1 Reply Last reply
                  0
                  • elizabeth worm๐Ÿ”…:wormverified:L elizabeth worm๐Ÿ”…:wormverified:

                    @IceWolf @fiore @roxy @sodiboo also performance characteristics is famously a consequential part of data structures what

                    sodiboo :pride_heart:S This user is from outside of this forum
                    sodiboo :pride_heart:S This user is from outside of this forum
                    sodiboo :pride_heart:
                    wrote last edited by
                    #14

                    @lizzie@brain.worm.pink @fiore@brain.worm.pink @IceWolf@masto.brightfur.net I think there is an important distinction to be made between an abstract collection and an actual data structure.

                    like a "dictionary"/"map" or a "set" or a "finite sequence" are not data structures. they are kinds of collections with a specific interface, and they
                    don't have specific performance characteristics. but an array or linked list are two different concrete data structures of a fixed-length sequence that have different characteristics. likewise, a hashmap and hashset are concrete data structures that implement a dictionary and a set with hash functions, but a B-tree map/set is a very different implementation that depends on the keys being ordered.

                    most programming languages expose concrete data structures and state the performance characteristics you can expect from everything in the standard library.

                    some languages don't tell you, however, and just give you the abstract collection. Nix for instance has "lists". and honestly they feel like linked lists (
                    builtins.tail to chop off the first element, for instance). you'd be forgiven for thinking it's just like Haskell, which Nix draws inspiration from. but prank! it's arrays and the tail operation is super inefficient actually!

                    but if a language calls it an array, I do generally expect it to be a real array.

                    elizabeth worm๐Ÿ”…:wormverified:L 1 Reply Last reply
                    0
                    • Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:I Frost, wolf of winter ๐Ÿบ๐ŸŽ„:therian:

                      @fiore @lizzie @sodiboo I mean, I don't see why

                      ["w", "o", "l", "f", "๐Ÿบ"]

                      wouldn't be an array?

                      (see: Ruby's String.chars method)

                      elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
                      elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
                      elizabeth worm๐Ÿ”…:wormverified:
                      wrote last edited by
                      #15

                      @IceWolf @fiore @sodiboo this is indeed an array and not how utf-8 strings are generally stored

                      1 Reply Last reply
                      1
                      0
                      • R AodeRelay shared this topic
                      • sodiboo :pride_heart:S sodiboo :pride_heart:

                        @lizzie@brain.worm.pink @fiore@brain.worm.pink @IceWolf@masto.brightfur.net I think there is an important distinction to be made between an abstract collection and an actual data structure.

                        like a "dictionary"/"map" or a "set" or a "finite sequence" are not data structures. they are kinds of collections with a specific interface, and they
                        don't have specific performance characteristics. but an array or linked list are two different concrete data structures of a fixed-length sequence that have different characteristics. likewise, a hashmap and hashset are concrete data structures that implement a dictionary and a set with hash functions, but a B-tree map/set is a very different implementation that depends on the keys being ordered.

                        most programming languages expose concrete data structures and state the performance characteristics you can expect from everything in the standard library.

                        some languages don't tell you, however, and just give you the abstract collection. Nix for instance has "lists". and honestly they feel like linked lists (
                        builtins.tail to chop off the first element, for instance). you'd be forgiven for thinking it's just like Haskell, which Nix draws inspiration from. but prank! it's arrays and the tail operation is super inefficient actually!

                        but if a language calls it an array, I do generally expect it to be a real array.

                        elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
                        elizabeth worm๐Ÿ”…:wormverified:L This user is from outside of this forum
                        elizabeth worm๐Ÿ”…:wormverified:
                        wrote last edited by
                        #16

                        @sodiboo @fiore @IceWolf i do agree fwiw

                        1 Reply Last reply
                        1
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        Powered by NodeBB Contributors
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups