Fork me on GitHub
#calva
<
2020-03-03
>
hindol13:03:03

Why does Calva highlight the { as well?

pez13:03:29

It's the rainbow parens. So that map (red) is inside the run-jetty function call (blue), which is inside the defonce (white). Does that make sense?

pez13:03:18

But maybe that #'app is wrongly highlighted?...

hindol13:03:21

#'app and {:port 3000} are two separate things.

pez13:03:43

Yeah, please file as an issue.

👍 4
hindol13:03:26

I am not an expert myself but #'app is the delayed symbol evaluation thing.

pez13:03:19

Yes. I think my rule for reader tags needs fixing.

hindol13:03:44

I can take a shot at it if you point me to the right place.

pez13:03:37

#'app should be lexed as a token of type id.

pez13:03:01

In the tests these tokens are named symbols, unfortunately ... Anyway the symbol() property explicitly does not allow them to be started with # now, which will need to be revisited: https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/clojure-lexer-test.ts#L24

pez13:03:22

And if fast-check is new to you, you might want to check that out: https://github.com/dubzzz/fast-check (I'm far from an expert here, had never heard of property based testing until a few days ago. 😄 )

sogaiu13:03:12

@pez i've recently been using the generators in test.check to test tree-sitter grammars. they and test.check have been great -- there are some conj talks by reid draper and gary fredericks if you are interested in the topic and haven't seen those already.

pez13:03:26

@sogaiu Cool. Can you point @hindol.adhya and me to where you generate stuff? Calva needs to be very lax in what it regards as a symbol, but it would help looking at how you have thought about it.

sogaiu13:03:58

i recommend watching gary fredericks' talk though if you haven't as it's a nice intro.

sogaiu14:03:06

i started without using quick-check (so just the generators) to get a feel for things. the shrinking that quick-check can do is great as it typically can give a smaller sample that causes an error. that makes investigation so much easier.

sogaiu14:03:56

off to sleep -- good luck 🙂

💤 4
pez14:03:18

@hindol.adhya In the Calva hacking docs, I think I've forgotten to mention that I recommend installing the Mocha Test Explorer Extension. Then run the tests from there. It's awesome.

hindol14:03:31

Sure. I will try to set it up.

hindol14:03:45

Thanks for the tip