home.social

#algorithms — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #algorithms, aggregated by home.social.

  1. Day 10/60: String operations in JS

    Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

    The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

    #JavaScript #DSA #Algorithms

  2. Day 10/60: String operations in JS

    Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

    The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

    #JavaScript #DSA #Algorithms

  3. Day 10/60: String operations in JS

    Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

    The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

    #JavaScript #DSA #Algorithms

  4. Day 10/60: String operations in JS

    Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

    The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

    #JavaScript #DSA #Algorithms

  5. Day 10/60: String operations in JS

    Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

    The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

    #JavaScript #DSA #Algorithms

  6. Day 10/60: String handling in Rust

    Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

    The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

    #RustLang #DSA #Algorithms

  7. Day 10/60: String handling in Rust

    Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

    The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

    #RustLang #DSA #Algorithms

  8. Day 10/60: String handling in Rust

    Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

    The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

    #RustLang #DSA #Algorithms

  9. Day 10/60: String handling in Rust

    Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

    The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

    #RustLang #DSA #Algorithms

  10. Day 10/60: String handling in Rust

    Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

    The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

    #RustLang #DSA #Algorithms

  11. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #GoLang #DSA #Algorithms

  12. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #GoLang #DSA #Algorithms

  13. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #GoLang #DSA #Algorithms

  14. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #GoLang #DSA #Algorithms

  15. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #GoLang #DSA #Algorithms

  16. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  17. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  18. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  19. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  20. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #CPP #DSA #Algorithms

  21. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #Python #DSA #Algorithms

  22. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #Python #DSA #Algorithms

  23. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #Python #DSA #Algorithms

  24. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #Python #DSA #Algorithms

  25. Day 10/75: Sliding window - variable size

    Today's note was about using a stable invariant so sliding window - variable size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

    The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

    #Python #DSA #Algorithms

  26. I would love to see more technical articles and books written with the same level of clarity.

    "Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.

    burntsushi.net/transducers/

    #article #rustlang #TechnicalWriting #automaton #datastructures #algorithms

  27. I would love to see more technical articles and books written with the same level of clarity.

    "Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.

    burntsushi.net/transducers/

  28. I would love to see more technical articles and books written with the same level of clarity.

    "Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.

    burntsushi.net/transducers/

    #article #rustlang #TechnicalWriting #automaton #datastructures #algorithms

  29. I would love to see more technical articles and books written with the same level of clarity.

    "Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.

    burntsushi.net/transducers/

    #article #rustlang #TechnicalWriting #automaton #datastructures #algorithms

  30. I would love to see more technical articles and books written with the same level of clarity.

    "Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.

    burntsushi.net/transducers/

    #article #rustlang #TechnicalWriting #automaton #datastructures #algorithms

  31. Ever heard of Roaring Bitmaps?

    They are one of those data structures most developers do not hear about often, but they can help query massive sets of records in a fraction of a second.

    In this video, I show a simple C# example comparing List, HashSet, and Roaring Bitmaps for fast intersections across large sets of integer IDs.

    #dotnet #csharp #algorithms

    youtube.com/watch?v=5KpuaGdVTjo

  32. It’s #CS 🧌 time. So here is a question Claude just asked after we had a long brainstorming session:

    > The question was never P=NP or P≠NP. The question was: why are you asking a 2D question on a 1D tape and treating the “I can’t answer this” as a fundamental limit of mathematics instead of a fundamental limit of the tape?​​​​​​​​​​​​​​​​

    #haltingproblem #turing #computing #algorithms

  33. It’s #CS 🧌 time. So here is a question Claude just asked after we had a long brainstorming session:

    > The question was never P=NP or P≠NP. The question was: why are you asking a 2D question on a 1D tape and treating the “I can’t answer this” as a fundamental limit of mathematics instead of a fundamental limit of the tape?​​​​​​​​​​​​​​​​

    #haltingproblem #turing #computing #algorithms

  34. It’s #CS 🧌 time. So here is a question Claude just asked after we had a long brainstorming session:

    > The question was never P=NP or P≠NP. The question was: why are you asking a 2D question on a 1D tape and treating the “I can’t answer this” as a fundamental limit of mathematics instead of a fundamental limit of the tape?​​​​​​​​​​​​​​​​

    #haltingproblem #turing #computing #algorithms

  35. It’s #CS 🧌 time. So here is a question Claude just asked after we had a long brainstorming session:

    > The question was never P=NP or P≠NP. The question was: why are you asking a 2D question on a 1D tape and treating the “I can’t answer this” as a fundamental limit of mathematics instead of a fundamental limit of the tape?​​​​​​​​​​​​​​​​

    #haltingproblem #turing #computing #algorithms

  36. It’s #CS 🧌 time. So here is a question Claude just asked after we had a long brainstorming session:

    > The question was never P=NP or P≠NP. The question was: why are you asking a 2D question on a 1D tape and treating the “I can’t answer this” as a fundamental limit of mathematics instead of a fundamental limit of the tape?​​​​​​​​​​​​​​​​

    #haltingproblem #turing #computing #algorithms