profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/sqwishy/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

sqwishy/vim-sqf-syntax 7

Syntax highlighting file for vim or neovim for Arma's SQF script syntax

sqwishy/owoof 6

A program for querying and modifying information in a datalog-like format backed by SQLite.

sqwishy/scmrights-thingy 2

A small exercise passing file descriptors between processes using SCM_RIGHTS.

1mperator/co60_LTac_Escalation.Altis 0

60 Player Co-Op Dynamic War Sandbox for Arma 3

sqwishy/i3 0

A better tiling and dynamic window manager

sqwishy/super-dicey-die-roller 0

webshit to push button & roll dice 🎲 see also https://sr.ht/~sqwishy/super-dicey-die-roller/

sqwishy/systemd 0

The systemd System and Service Manager

sqwishy/systemd-netlogd 0

Forwards messages from the journal to other hosts over the network using syslog format RFC 5424

sqwishy/vim-gdscript 0

gdscript syntax file for vim

issue commentelm/virtual-dom

node removal in `_VirtualDom_diffKeyedKids` when prepending items

I made a snippet to reproduce the issue and Peter on elmlang.slack.com made an Ellie for it so it's easy to see and play around with.

sqwishy

comment created time in a month

issue commentnextapps-de/mikado

for with if example gives js error

I don't want nodes that failed the condition to end up in the document at all.

I spend some time trying to figure out what the behaviour is for for="data.variant" to see if that's closer to what I want but it's pretty freaky.

  • If the variant property is null or undefined or whatever then the node is rendered using data from a previous item in the view/store thing -- so for="data.variant || []" kind of works but I don't know what side effects that has.
  • Extra nesting is required between nodes using for and your template when you have multiple nodes using for even if you only want one of them to pass. In the following, the for="data.bar || []" is never evaluated, even if the first for does not produce any nodes.
    <template id="does-not-work">
      <div for="data.foo || []"></div>
      <div for="data.bar || []"></div>
    </template>
    

I also don't know how it might affect refreshing. I'm pretty discouraged by this so I'm probably not going to spend any more time on it.

john5000

comment created time in 2 months

issue commentnextapps-de/mikado

for with if example gives js error

Is there a workaround for this?

john5000

comment created time in 2 months

issue openedelm/virtual-dom

node removal in `_VirtualDom_diffKeyedKids` when prepending items

Hi. I noticed that if I had a sequence of keyed items and, in an update, more than one element was inserted at the start of the sequence, the existing dom nodes would be removed and readded by the vdom diff/patch thing.

That is; if my keys are ...

["foo0", "foo1"]

... and after an update they become ...

["bar0", "bar1", "foo0", "foo1"]

Then the nodes for "foo0" & "foo1" will be removed and reinserted into a new fragment or something. They end up losing any state they had such as text selection and animation state. I would expect instead that the patch just insert "bar0" & "bar1" into foo's parent. (This is the behaviour when items are appended, so if the two bars came after the two foos instead of before.)

Also, this does not happen if there is only one item inserted at the beginning, since _VirtualDom_diffKeyedKids seems to peek ahead one to check for this case explicitly.

I really believe the current behaviour is incorrect, even if it's more efficient or something somehow. Moreover, this behaviour makes Elm unsuitable for me to use for my project. And this saddens me greatly since I am quite fond of Elm.

Is there something that can be done about this? Either some escape hatch for me in my project so I can manage the dom modifications for these nodes explicitly? Or the possibility of changing the behaviour of VirtualDom? I am open to helping in the implementation of a solution or any other way I can.

created time in 2 months

starteddverite/permuteseq

started time in 3 months