Fork me on GitHub
#datascript
<
2018-02-20
>
rauh07:02:53

Could probably be done for datascripts btset. Though, would be a lot of work....

souenzzo12:02:58

@rauh there is a rust version of datascript https://github.com/mozilla/mentat

thedavidmeister14:02:55

i think that's exactly what i need for something

carkh15:02:33

that thing is sexy... persistent datascript ...

Petrus Theron16:02:33

Given (defonce !conn (d/create-conn))`, a call to (set! !conn (d/conn-from-datoms (d/datoms @!conn :eavt)) db-schema) throws Figwheel Compile Exception: set! target must be a field or a symbol naming a var

rauh16:02:40

@petrus Don't you want to pass db-schema to conn-from-datoms?

Petrus Theron16:02:34

Well spotted @rauh. What will help me find errors like that? It's super common

metasoarous21:02:55

Honestly, parinfer has helped me massively with this. Of course, if you write everything on one line, it's no win. But it ends up encouraging you to break things down a certain way so that these mistakes happen less often because it forces the ast/paren structure to match the indentation, so that you have certain visual guarantees about what's getting passed where.

Petrus Theron06:02:45

This made me think of a rainbow parens feature that would help a lot: instead of just coloring the parens yellow/green/purple, it should also color the symbols inside the rainbow parens because they matter the most. So if there was a toggle (hold down some key) or a permanent underline where the symbols are also rainbow-colored, this error would have popped right out. e.g. (PURPLE purple-arg1 (YELLOW yellow arg1) bad-purple-arg2) you'd immediately see that bad-purple-arg2 belongs under YELLOW.

metasoarous08:02:14

That's not a bad idea!

thedavidmeister09:02:18

parinfer ftw, just break everything onto a new line

rauh16:02:22

Experience with lots of errors 😄

Petrus Theron06:02:45

This made me think of a rainbow parens feature that would help a lot: instead of just coloring the parens yellow/green/purple, it should also color the symbols inside the rainbow parens because they matter the most. So if there was a toggle (hold down some key) or a permanent underline where the symbols are also rainbow-colored, this error would have popped right out. e.g. (PURPLE purple-arg1 (YELLOW yellow arg1) bad-purple-arg2) you'd immediately see that bad-purple-arg2 belongs under YELLOW.