Fork me on GitHub
#reveal
<
2020-10-21
>
Stuart19:10:11

hi, im trying to try out reveal but I'm having trouble getting it setup in IntelliJ with Cursive, does someone have time to help me please? I think my issue is I'm totally new to deps.edn (I normally use lein)

vlaaad20:10:40

hi @qmstuart, I use reveal in Cursive, and there is a section about Cursive in Reveal readme — https://vlaaad.github.io/reveal/#cursive

Stuart20:10:55

thats the guide im following 🙂

vlaaad20:10:57

what problem do you have with it?

vlaaad20:10:18

it should work with lein as well...

Stuart20:10:03

I think I'm missing something really obvious. SO I created a new app with clj -A:new app exfn/foo then I opened the resulting deps.edn as a project. I click to add a REPL and fill in this in the REPL screen:

Stuart20:10:19

I feel I'm being really thick and missing something obvious 😄

Stuart20:10:44

I run that REPL, and it works fine as a repl. But I expected the REVEAL window to open when I ran it?

Stuart20:10:58

What have I misunderstood?

Stuart20:10:36

do I need to do something to launch REVEAL seperately? Or Maybe I need to edit my ~/.clojure/deps.edn ?

Stuart20:10:17

sorry if im beign dumb,not only am I new to reveal, I'm pretty new to CLojure too

vlaaad20:10:24

do you have reveal dependency in ~/.clojure/deps.edn ?

vlaaad20:10:27

my ~/.clojure/deps.ednlooks like this:

{:aliases {:reveal {:extra-deps {vlaaad/reveal {:mvn/version "1.0.130"}}
                    :ns-default vlaaad.reveal
                    :exec-fn repl}}}

vlaaad20:10:52

I also check "Run with Deps" and specify reveal alias

vlaaad20:10:43

and I also have this in Parameters:

-m vlaaad.reveal repl

Stuart20:10:08

my .clojure/deps.edn has loads in it!

Stuart20:10:25

{:mvn/repos {"sonatype" {:url ""}}
 :aliases
 {;; pull in specific versions of Clojure:
  :1.0 {:override-deps {org.clojure/clojure {:mvn/version "1.0.0"}}}
  :1.1 {:override-deps {org.clojure/clojure {:mvn/version "1.1.0"}}}
  :1.2 {:override-deps {org.clojure/clojure {:mvn/version "1.2.1"}}}

vlaaad20:10:37

the point is, you need to have reveal on the classpath 🙂

Stuart20:10:43

can i put the bit starting {:reveal } anywhere under :aliases ?

vlaaad20:10:27

hmm, I forgot to add Parameters section with -m vlaaad.reveal repl because I used that in main-opts in an alias while writing readme

vlaaad20:10:31

I'll add that step

Stuart20:10:52

Now its saying can't find Could not locate vlaaad/reveal__init.class, vlaaad/reveal.clj or vlaaad/reveal.cljc on classpath. BUt I added that reveal alias to my deps.edn

Stuart20:10:15

I should add it to my projects deps.edn too?

seancorfield20:10:21

@qmstuart It looks like you did not specify the :reveal alias in the command to start your REPL from Cursive.

seancorfield20:10:59

(I'm not a Cursive user -- I find it much easier to start a REPL manually from the command-line and then connect my editor to that... I find Cursive's whole "run configuration" thing to be counter-intuitive!)

Stuart20:10:20

yes, its confuses me no end

Stuart20:10:07

What does it want under aliases? for Runs with Deps? reveal ? :reveal ? remote-repl ?

vlaaad21:10:59

remote-repl is only if you start repl outside of cursive

Stuart20:10:48

it seems if i change anything in my deps.edn and make a mistake then the whole project is ruined as even if I undo it all. IdeaJ still squigglies every single clojure function and wont even run a basic repl

seancorfield20:10:48

I assume you were already using IntelliJ which is why you went with Cursive to learn Clojure?

Stuart20:10:09

I'm creating a new project and deleting and recreating when it messes up as IntelliJ starts to refuse to open it as a project

Stuart20:10:18

this is so frustrating

seancorfield20:10:43

Colin, Cursive's creator, is pretty active in the #cursive channel so that's a good place to get help, if you're not already in there asking about run configurations etc.

seancorfield20:10:55

I don't like IDEs myself. I used Eclipse for a long time (and mostly hated it). I've tried IntelliJ numerous times and I just think it's awful 😞

seancorfield20:10:16

But then I haven't had to deal with Java for a very long time now 🙂

Stuart20:10:00

what would you suggest is better?

Stuart20:10:11

i can't get along with emacs

vlaaad21:10:20

I love Cursive, having autocomplete and static analysis with dynamic REPL is the best combo

vlaaad21:10:40

and interop with java is a breeze

Stuart21:10:03

I got it work!

vlaaad21:10:10

wonderful!

vlaaad21:10:27

what helped?

Stuart21:10:30

thank you and sean for your help

👍 6
Stuart21:10:07

I was really misunderstanding deps.edn i think

Stuart21:10:03

what I like about IntelliJ is the built in documenation, i can hover over a function and get the help pages for it

Stuart21:10:24

and that I get ultimate as part of my jetbrains package

Stuart22:10:20

Any ideas why stuff that is in a dependency library isnt working for me? e.g. I can't evaluate anything from clojure.data.csv

(ns exfn.bar (:gen-class) (:require [clojure.data.csv :as csv]))
Execution error (FileNotFoundException) at exfn.bar/eval7803$loading (bar.clj:1).
Could not locate clojure/data/csv__init.class, clojure/data/csv.clj or clojure/data/csv.cljc on classpath.
Also tried
(require '[clojure.data.csv :as casv])
And sending that straight to the repl, but same error. works in my regular repl ?

Stuart22:10:35

oh, i see, I had to restart it after changing my deps.edn!

Stuart22:10:38

reveal is very cool dude 🙂 Great job!

Stuart22:10:32

doing work where I need to analyse and smooth a series of data, being able to visualise it in a chart straight from the repl is mind blowing

parrot 3
seancorfield22:10:55

Glad you got it all working @qmstuart!