home.social

Search

71 results for “ryguw”

  1. @ryguw With Rust, you have fearless parallelism! No data races! (It can not prevent dead lock though, but this is a logic error). The crate is awesome for easy, safe and load balanced multithreading.

  2. Suddenly Bun has become much, much more interesting as a longterm Node.js competitor. Dropping Zig for Rust is a bold but ultimately wise move, in their specific case.

  3. It's official. I'm starting an AI company: @HiddenAI. All our models will be fully open source: source available but hidden.

    Accepting your investment term sheets starting today.

    #ai #artificial #apr1 #startup #company #golang #rust #python #easteregg

  4. It's official. I'm starting an AI company: @HiddenAI. All our models will be fully open source: source available but hidden.

    Accepting your investment term sheets starting today.

  5. It's official. I'm starting an AI company: @HiddenAI. All our models will be fully open source: source available but hidden.

    Accepting your investment term sheets starting today.

    #ai #artificial #apr1 #startup #company #golang #rust #python #easteregg

  6. It's official. I'm starting an AI company: @HiddenAI. All our models will be fully open source: source available but hidden.

    Accepting your investment term sheets starting today.

    #ai #artificial #apr1 #startup #company #golang #rust #python #easteregg

  7. It's official. I'm starting an AI company: @HiddenAI. All our models will be fully open source: source available but hidden.

    Accepting your investment term sheets starting today.

    #ai #artificial #apr1 #startup #company #golang #rust #python #easteregg

  8. While I don't think code reviews are all bad and waste of time, I do think some are bad or partial waste of time. There are effective alternatives to those weeks-long PR reviews, worth exploring imo.

    More: qase.io/blog/code-review-alter

  9. Go 1.20 saw the inclusion of Profile Guided Optimization, or Pedal to the metal: seemingly effortless 2-7% performance boosts for most Go applications. There’s much to debunk, discover and to learn about, with Andrew Philips.

    Link: andrewwphillips.github.io/blog

  10. On Feb 1st, 2024, released Pkl. Pronounced "pickle", it is a complete configuration scripting language, including a JSON/YAML/XML/more compiler, a language server, bunch of IDE plugins, and of course direct bindings for your favorite programming language, for quick adoption. A binding seems missing.

    I like how a Pkl config's specs and values are colocated. Always hated maintaining separate schemas for very simple configs.

  11. @lorddimwit any struct that only consists of comparables (ints, strings, arrays) can be used as map key. And it’s faster than any bytes-converting hash function that I tried in userland (gob, jsoniter). For example, to speed up one of my solutions I converted an []int slice field to a fixed size [32]int field and was able to use the parent struct as map key for a 5x speedboost.

  12. @lorddimwit any struct that only consists of comparables (ints, strings, arrays) can be used as map key. And it’s faster than any bytes-converting hash function that I tried in userland (gob, jsoniter). For example, to speed up one of my #aoc2023 solutions I converted an []int slice field to a fixed size [32]int field and was able to use the parent struct as map key for a 5x speedboost.

  13. @lorddimwit any struct that only consists of comparables (ints, strings, arrays) can be used as map key. And it’s faster than any bytes-converting hash function that I tried in userland (gob, jsoniter). For example, to speed up one of my #aoc2023 solutions I converted an []int slice field to a fixed size [32]int field and was able to use the parent struct as map key for a 5x speedboost.

  14. @lorddimwit any struct that only consists of comparables (ints, strings, arrays) can be used as map key. And it’s faster than any bytes-converting hash function that I tried in userland (gob, jsoniter). For example, to speed up one of my #aoc2023 solutions I converted an []int slice field to a fixed size [32]int field and was able to use the parent struct as map key for a 5x speedboost.

  15. @lorddimwit any struct that only consists of comparables (ints, strings, arrays) can be used as map key. And it’s faster than any bytes-converting hash function that I tried in userland (gob, jsoniter). For example, to speed up one of my #aoc2023 solutions I converted an []int slice field to a fixed size [32]int field and was able to use the parent struct as map key for a 5x speedboost.

  16. Hints: it happens in a hot loop, and a Ring Queue can solve this issue...

  17. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

  18. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

    #go #golang #aoc2023 #goroutines

  19. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

    #go #golang #aoc2023 #goroutines

  20. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

    #go #golang #aoc2023 #goroutines

  21. Managed to reduce the exec time for 2023 day 23 part 2 from 513 seconds (~8.5 mins) to a stellar 0.310 seconds. Looking back at my commits these were the biggest leaps:

    - By far the biggest leap: Shrink unique nodes to <= 64, then instead of a map simply use a `uint64` bitmask for boolean lookups (visited or not). Saves a lot of map accesses & assignments
    - Prefer `int` when doing most calculations and comparisons, seems super optimized in the Go runtime

    #go #golang #aoc2023 #goroutines

  22. To me this HN thread is pure gold. When I first discovered Dynamic Programming (DP) in Python with the @cache decorator quite late actually, it looked like magic to me. I could not find as much wisdom on it (top search results are all leetcode tutorials) but once again @hn_discussions fill that gap. Will dive deeper into the topic of generative recursion.

    🧵 HN thread: news.ycombinator.com/item?id=3

  23. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

  24. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

    #golang #go #goroutines #aoc2023

  25. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

    #golang #go #goroutines #aoc2023

  26. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

    #golang #go #goroutines #aoc2023

  27. That said, running the exact squeezed single-core-optimized algorithm, but for multiple inputs on multiple cores simultaneously with 5 lines of code, feels absolutely awesome! 😎

    #golang #go #goroutines #aoc2023

  28. Being able to use all cores with ease in , has taught me that not all problems can be parallelized. In fact, only few algorithms are concurrent, and CPU-bound. CPU caches, instruction sets, and single-core is still very relevant.

  29. After doing I like to think I know quite well now… I miss ternaries. Although famous, nobody actually uses the go keyword. Pointers are fun, I missed them. Tools for testing and profiling are keys to mastering our craft. I deeply want a sound type system like that of and .