datascript

2024-06-13T12:16:40.674879Z

@tonsky I'm curious whether you're actively considering adding support for javascript storage. It's mentioned as a possibility in the storage docs. The biggest problem I see is the fact that JS storage is going to be async, and you've mentioned previously you're not interested in an async API. I'm pretty sure an async API would be required, especially if you want to lazily restore the db. I'm happy to work on this on my own (via fork or PR, whichever you think), but I didn't want to start something if you've already got something cooking.

Niki 2024-06-13T17:40:46.825809Z

I don’t plan to, not anytime soon. But if you figure out a good and backwards-compatible way to support async storage we can merge it

2024-06-13T17:52:36.750359Z

Any particular concerns you have I need to be thinking about?

2024-06-13T15:35:56.184339Z

I'm trying to use the standard technique of storing a vector as the value of a datom to provide ordering (from the tips and tricks page). But since I'm using the js api (via squint), I need to store a native js array instead of a vector. But I can't seem to access the array. Here is a squint playground demonstrating the problem. I expect the program to yield the raw array ["Z", "T"]. Thanks for looking! https://squint-cljs.github.io/squint/?src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvZGF0YXNjcmlwdCRkZWZhdWx0IiA6YXMgZF0pCgooZGVmbiBpbml0LWRiIFtdCiAgKGxldCBbc2NoZW1hIHs6c2Fsb24vbWVzc2FnZXMgeyI6ZGIvY2FyZGluYWxpdHkiICI6ZGIuY2FyZGluYWxpdHkvb25lIn19CiAgICAgICAgY29ubiAoZC9jcmVhdGUtY29ubiBzY2hlbWEpCiAgICAgICAgc2Fsb24gW1siOmRiL2FkZCIgMSA6c2Fsb24vbWVzc2FnZXMgWyJaIiAiVCJdXV1dCiAgICAoZC90cmFuc2FjdCBjb25uIHNhbG9uKQogICAgY29ubikpCgooZGVmIGNvbm4gKGluaXQtZGIpKQoKKGRlZm4gc2Fsb24tbWVzc2FnZXMgW2Nvbm5dCiAgKGxldCBbc2Fsb24gKGQvZW50aXR5IChkL2RiIGNvbm4pIDEpXQogICAgKC5nZXQgc2Fsb24gOnNhbG9uL21lc3NhZ2VzKSkpCgooc2Fsb24tbWVzc2FnZXMgY29ubik%3D

2024-06-13T16:04:28.355569Z

Is the program yielding a 2 element clojurescript vector?