Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Nora, Tech Witch (tindall@cybre.space)'s status on Monday, 05-Aug-2019 14:28:19 EDT Nora, Tech Witch Nora, Tech Witch

    hmm, any #rust peeps know why &[T] doesn't implement Index<usize>?

    Obviously you can do

    let slice = &[1, 2, 3];
    slice[1];

    but I'm not sure if I'm missing some sugar being applied here

    And more importantly, how do I take anything indexable by usize generically if I can't take &[T] with I: Index<usize>?

    In conversation Monday, 05-Aug-2019 14:28:19 EDT from cybre.space permalink
    1. Nora, Tech Witch (tindall@cybre.space)'s status on Monday, 05-Aug-2019 14:59:58 EDT Nora, Tech Witch Nora, Tech Witch
      in reply to

      well, i had to give up some generality and just use &'a [T] instead of a generic indexable type, but that's ok for now

      In conversation Monday, 05-Aug-2019 14:59:58 EDT from cybre.space permalink
      1. Nora, Tech Witch (tindall@cybre.space)'s status on Monday, 05-Aug-2019 15:16:25 EDT Nora, Tech Witch Nora, Tech Witch
        in reply to

        aaaand done, for now. once I test it out with visn some more and in actual use I'll probably publish it as one or more crates (one for atci and one for the actual permutations, maybe)

        it's also theoretically possible to remove the factorial memory constraint if i implement the algorithm in a different way, and that would definitely be nice.

        i mean it's generating permutations so it's inherently a factorializing process but that doesn't have to extend to memory usage

        In conversation Monday, 05-Aug-2019 15:16:25 EDT from cybre.space permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.