<p>Bloplang Pull Request #48592: Add <code>zip</code> method to iterators :gh_closed_1:​:gh_closed_2:​:gh_closed_3:​</p><p>:bean_red: This is a proposal to add the <code>zip</code> method to iterators. This would allow you to join two iterators together, alternating between results from both. E.g. <code>tens.zip(hundreds)</code> would give <code>[10, 100, 20, 200, 30]...</code>. This has been the most requested feature on our wishlist for seven months, and my initial implementation here provides a 12% speed up on the <code>test_cases/thousands_of_types.blop</code>. πŸ‘ 532 πŸ‘Ž 12 πŸš€ 226 πŸ‘€ 114 πŸ˜• 3</p><p>:bot: BlobBot says: Hi <strong>red_bean</strong> :bean_red: ! Thanks for opening a pull request to Bloplang! I've run your code, and found this: Maximum regression: 0.05%. Maximum improvement: 12.03%. I've assigned <strong>curly_brace</strong> :curly_brace: to approve your code. Don't forget to leave a star! πŸ‘ 221 πŸš€ 179 πŸ‘€ 12</p><p>:bot: <strong>BlopBot added the "BlopBot Seal of Approval" "No regressions" labels.</strong></p><p>:rct_guest: I've never heard of "zip" before. Googling it, it seems to be a compression algorithm? Not sure what this has to do with iterators. I suggest naming it <code>interleave</code> instead. πŸ‘ 23 πŸ‘Ž 34</p><p>:bean_red: <code>zip</code> seems to be pretty widely accepted. For example, Rust and Python call it <code>zip</code>. πŸ‘ 27 πŸ˜• 1</p><p>:green_is_my_pepper: yeah i've never head of zip before. interleave is too long tho, how about weave πŸ‘ 54 πŸ‘Ž 27</p><p>↕️ <em>This comment was marked as off-topic.</em></p><p>ℹ️ :curly_brace: <em>requested 1 change.</em></p><blockquote><p>:curly_brace: This <code>for</code> loop could be better expressed as a <code>map</code>. πŸ˜• 1</p></blockquote><p>:acnl_smile: How about <code>spritz</code>? In the idiolect of English spoken by my Discord server, <code>spritz</code> is very commonly used to refer to mixing things together. <strong>EDIT</strong> If you're going to laugh react, please leave a comment explaining why. πŸ‘ 5 πŸ˜† 143</p><p>:green_is_my_pepper: wtf is a spritz πŸ‘Ž 5 πŸ˜• 26</p><p>↕️ <em>This comment was marked as off-topic.</em></p><p>↕️ <em>This comment was marked as off-topic.</em></p><p>:curly_brace: Please don't leave "+1" comments. They pollute the thread and send useless emails. Use the react feature to add thumbs ups to the pull request if you want to express your approval. πŸ‘ 118 πŸ‘Ž 4</p><p>:gynecologist: who else is here from reddit? πŸ‘Ž 122 πŸ˜† 16 πŸ˜• 33</p><ul><li>[ Click to load 281 additional comments ] *</li></ul><p>:curly_brace: That's a bug with your Linux distribution’s <code>zip</code> command, which has nothing to do with Bloplang. Open a thread on the Fedora forums to discuss that, although they'll probably tell you that Fedora 32 is EOL. πŸ‘ 66</p><p>:rct_guest: Okay, so we have 17 votes in favour of <code>zip</code>, 12 for <code>weave</code>, 5 for <code>spritz</code>, and somehow only 2 for <code>interleave</code>. Oh, and 1 each for <code>sprinkle</code>, <code>intersperse_at_least_two_iterators_with_each_other</code>, and <code>sum</code>. I'm beginning to suspect botting. πŸ‘ 7 πŸ˜• 12 </p><p>:curly_brace: Hey read bean :bean_red: - this pull request is out of sync with <code>main</code>. Could you rebase on top of the twelve thousand commits that have occurred since you opened this? Thanks! πŸ‘ 63 πŸš€ 2</p><p>:gale: whats stoping this from being merged? can we get an eta πŸ‘ 12 πŸ˜• 2</p><p>:rct_guest: It's mostly a debate on the name to use. I'm not sure why people aren't voting for <code>interleave</code>. I've provided numerous arguments as to why it's the obvious option, and I've even linked a conversation with ChatGPT 4-o <em>proving</em> that it makes the most sense. Sigh. πŸ‘ 2 πŸ˜• 70 πŸ˜† 11</p><p>ℹ️ <em>Pull request #53223 "Add interleave method to iterators" was marked as a duplicate of this one.</em></p><p>↕️ <em>This comment was marked as off-topic.</em></p><p>πŸ€– No activity detected for 90 days. πŸ‘Ž 121 πŸ˜• 89</p><p><strong>Stalebot πŸ€– marked this pull request as stale.</strong></p><p><strong>Conversation locked and limited to contributors.</strong></p>
Reply