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:

    @fiore @roxy @sodiboo I mean, some people (and languages) call dictionaries "dictionaries". Some call them "maps". Some even call them "hashes" (????).

    It's all still the same type of thing.

    "my definition of an array is the ONE TRUE DEFINITION and every other programming language is WRONG!"..uh, no not really.

    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
    #3

    @fiore @roxy @sodiboo it's like, if you start with C arrays,

    it's down to what you consider important, the "constant time access" part or the "array of items" part or whatever. For y'all it seems to be the "constant time access" part. For me it's the "array of items" part.

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

      @fiore @roxy @sodiboo it's like, if you start with C arrays,

      it's down to what you consider important, the "constant time access" part or the "array of items" part or whatever. For y'all it seems to be the "constant time access" part. For me it's the "array of items" part.

      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
      #4

      @IceWolf @fiore @roxy @sodiboo im super curious what language has arrays that arent constant time access what

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

        @IceWolf @fiore @roxy @sodiboo im super curious what language has arrays that arent constant time access what

        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
        #5

        @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 1 Reply Last reply
        0
        • 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