home.social

#each — Public Fediverse posts

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

fetched live
  1. @cllns I know that Rack 3.0.0 will break how Server Sent Events work as middleware. It's not hard to fix but does require fixing by manually moving away from `#each` to `#to_a` for example.

    I guess this means that Hanami 2.3.0 will still default to Rack 2.2.x but switch to Rack 3.0.0 if detected in the gem file?

  2. {#each} causes memory leak for stream chat

    svelte.dev/playground/hello-wo

    Discussions: discu.eu/q/https://svelte.dev/

    #javascript #programming #svelte #webdev

  3. You're doing great. You made it through the ten darkest weeks of the year (five weeks before & after Winter Solstice), and now you're only about six weeks from first day of Spring. Keep it sunny side up, sunny side of the street, water your plants...
    #sunlight #sunny #dawn #sunset #Tuesday #March19 #first #day of #Spring in #Northern #Hemisphere #dark #days of #Winter #seasons #ending #each #day is #longer than the #last #Solstice #Vernal #Equinox #Earth #science #rocks almanac.com/content/first-day-

  4. What is the preferred way to lazily select/filter objects that haven't been loaded yet? Should I put the post-loading filtering logic in one giant #each method for a LazyCollection class that handles the lazy loading and filtering? Or should I have like a LazySet which only does the lazy loading, and any additional filtering would be handled by other classes that wrap around the LazySet object (ex: `FilterByIntensity.new(lazy_set, intensity: :high)`)?

  5. @ramsey I love how everything has a 1:1 mapping.

    So my CodeIgniter views become Svelte templates. I go through each one and replace eg <? foreach ($list as $item): ?> to {#each list as item} etc. which is surprisingly straightforward.

    Then, the CI models & libraries I copy to $lib/server, keep all the function structure and SQL the same, and just migrate PHP syntax to JavaScript.

    Each route function in the CI controllers ends up mapping to a +page.server.js load function in each route.

  6. @yougenius When I started playing #icehockey as a young guy, I always asked myself why we can't #play #together and instead play #against #each other.

  7. Advent of Vue (in #Svelte and #SvelteKit) Day 9: sorting presents.

    Nothing too spectacular in this one, though I love how easy Svelte makes it to add animation polish in only one line with `animate:flip`.

    ```html
    {#each presents as present (present.id)}
    <img animate:flip src={present.src} alt="Present {present.id}" />
    {/each}
    ```

    As with other days, we use a `<form>` and query params to control the UI so it works without JS.

    Demo: advent-of-sveltekit-2022.verce
    Challenge: github.com/Advent-Of-Vue/aov-s

  8. @danawoodman hmm, so, I've changed it like that, and it doesn't look like it works.

    it's the same problem, the Link sees the change, but the main App doesn't

    how does it work though? I thought that `getPage($route)` one a template should be a reactive expression, same as you would use a naked `$route` or call {#each $things as thing} it's just a syntax sugar for `route.subscribe`

    because if I try `route.subscribe` directly in the main App.svelte, it doesn't pick up the changes either

  9. Anyone can tell me why it is working like that, and after commenting any of these lines, it stops to work?

    By this I mean, I do not have more tiles using svelte

  10. そもそも #each のドキュメントも実装もどこにあるのかよくわからん問題。 GTK3 には selected_foreach しか無いようにも見えるし ruby-gtk2 は selected_each の中から selected_foreach を呼んでるように見える。
    gtk3 だとどこなんだ……って、これか。
    github.com/ruby-gnome/ruby-gno
    変えるなら最初から selected_foreach のままにすればいいのに