cursive

Issues at: https://git.io/cursive-issues
2021-06-15T00:19:39.181300Z

it stay like this, there's an option to align it?

2021-06-15T00:47:29.182100Z

Hi @mtwomey, check out this answer on Stack Overflow: https://stackoverflow.com/questions/31175396/define-project-specific-tasks-in-leiningen

cfleming 2021-06-15T03:26:13.182600Z

Yeah: https://cursive-ide.com/userguide/formatting.html

cfleming 2021-06-15T03:26:39.182900Z

Sadly not, but I’m working on babashka for a release soon.

😍 1
🙏 1
cfleming 2021-06-15T03:28:38.183100Z

Right, there’s no good way to do this right now, sorry. This is because lein makes it hard (and slow) to get the list of tasks. One thing you can do is create a leiningen run configuration which will execute that task.

2021-06-15T08:56:31.001Z

Where do I enter the cursive license? I'm renewing one but can't find the option 😅

thheller 2021-06-15T09:04:27.001300Z

in the help -> register cursive menu

❤️ 1
simongray 2021-06-15T12:18:50.003200Z

I wonder why regular quoting does remove highlighting of unresolved symbols, while syntax-quoting doesn’t? The content is quoted in both cases, so should it really make a difference?

alexmiller 2021-06-15T12:24:14.006Z

regular quoting will just leave the symbol unevaluated. syntax quoting resolves symbols to fully-qualified symbols, so here would resolve something like ?form to your-ns/?form . I think (?) what you're seeing there is that Cursive is marking your-ns/?form as an unknown var in your-ns.

simongray 2021-06-15T12:24:35.006300Z

Hm… that makes sense

simongray 2021-06-15T12:24:52.006700Z

Is there no way I can unquote inside a quoted data structure?

simongray 2021-06-15T12:25:18.007300Z

The only reason I went with ` is because I would like to use ~

alexmiller 2021-06-15T12:25:33.007700Z

I think you're asking to not resolve those symbols?

simongray 2021-06-15T12:25:44.008Z

yeah, basically

alexmiller 2021-06-15T12:26:06.008400Z

if so, the typical way to do that in ` is to ~'

alexmiller 2021-06-15T12:26:30.008800Z

so ... ~'?form ...

alexmiller 2021-06-15T12:26:53.009600Z

which is terrible here of course :)

simongray 2021-06-15T12:27:37.010700Z

yeah, but the only reason I am using ` is because I can’t unquote inside a regular quoted data structure. The other alternative is to quote every single symbol other than written-rep, which is tedious 😞

alexmiller 2021-06-15T12:27:46.010800Z

there are multiple options here

alexmiller 2021-06-15T12:28:13.011200Z

it's important to keep in mind that this is all data

alexmiller 2021-06-15T12:31:04.013Z

(into [:bgp ['?form :ontoloex/writtenRep written-rep]]
  '[[?form ...] ...])

simongray 2021-06-15T12:32:05.014Z

Yeah, that’s one way to do it 🙂

simongray 2021-06-15T12:33:10.014700Z

But it seems like a workaround. It sure would be great if one could unquote inside a quoted data structure 😉

alexmiller 2021-06-15T12:33:33.014900Z

well you can, that's ~

alexmiller 2021-06-15T12:33:44.015200Z

it's the symbol resolution that you don't want

alexmiller 2021-06-15T12:34:16.015600Z

another option is the little-used http://clojure.github.io/clojure/clojure.template-api.html

alexmiller 2021-06-15T12:35:12.015900Z

you can use apply-template for something like this I believe

alexmiller 2021-06-15T12:39:23.016600Z

(clojure.template/apply-template '[x] 
  '[:bgp
    [?form :ontolex/writtenRep x]
    [?word :ontolex/canonicalForm ?form] 
    ;; etc
    ] 
  [written-rep])

👍 1
simongray 2021-06-15T12:40:23.016900Z

(apply-template '[written-rep]
                       '[:bgp
                         [?form :ontolex/writtenRep written-rep]
                         [?word :ontolex/canonicalForm ?form]
                         [?word :ontolex/evokes ?synset]
                         [?synset :ontolex/lexicalizedSense ?wordsense]
                         [?wordsense :ontolex/isSenseOf ?other-word]
                         [?other-word :ontolex/canonicalForm ?other-form]
                         [?other-form :ontolex/writtenRep ?other-rep]]
                       [written-rep])

simongray 2021-06-15T12:40:32.017200Z

this does work, but it’s a little ugly 🙂

simongray 2021-06-15T12:41:49.017600Z

Maybe a macro that quotes every symbol starting with a ? is in order?

simongray 2021-06-15T12:42:26.018100Z

though that doesn’t help with cursive highlighting 😛

simongray 2021-06-15T12:44:41.018700Z

nevermind, I think Aristotle actually supports a bindings map, so I’ll just use that

simongray 2021-06-15T12:44:50.019Z

thanks for helping out anyway, @alexmiller!

simongray 2021-06-15T12:45:09.019400Z

And for introducting me to apply-template.

Joel 2021-06-15T15:22:39.021900Z

I see an old git ticket for this bug I get a lot when loading files into REPL: (https://github.com/cursive-ide/cursive/issues/1286)

Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap
Is this considered unfortunately "normal"?

2021-06-15T19:19:12.022800Z

the default auto-import does (for instance): (:import (java.time LocalDate)) is there a way to tell it instead to do (:import java.time.LocalDate) (this is to adhere to our internal style guidelines)

indy 2021-06-15T20:17:21.026300Z

Is it possible to add vars also in the breadcrumb navigation? I use breadcrumb navigation all the time when I'm writing JS. Navigating between functions becomes much faster and I can also quickly see all the vars in the ns at a glance without opening the Structure pane.