Fork me on GitHub
#reveal
<
2020-08-03
>
vlaaad05:08:06

I'm not sure I can do it, Rich told the way its implemented is internal details we shouldn't rely on in code (defn-ed functions have static fields pointing to vars)

seancorfield05:08:45

Yeah, that doesn't actually surprise me -- although I'm pretty sure I've seen someone share the code on Slack at some point...

vlaaad06:08:18

Rich shared the snippet used to get references. I then adopted it to create this runtime function call tracer: https://gist.github.com/vlaaad/0350b61e127e82165d195b490999ec0a

3
Janne Sauvala05:08:30

Is there an example setup for Reveal with Cursive? I have been using REBL like this: https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive

vlaaad06:08:58

No example so far, but I'm planning to add it once reveal is going 1.0 In short, you create local repl run configuration with clojure.main, and select your parameters to be -m vlaaad.reveal repl

Janne Sauvala06:08:00

I’ll try this later today. Thanks!

vlaaad06:08:04

Or, if you have such main-opts in a clj alias, you can select "run with deps" and select that alias

3
EmmanuelOga09:08:12

on that note I wish there was some more info on running it with cider... it occurred to me to run it directly on the cider REPL by invoking (vlaaad.reveal/repl) and it broke all sort of havoc inside emacs, so I'm guessing there must be a different way to set it up

EmmanuelOga09:08:36

probably can run it from command line which is fine but then I won't be able to send things from emacs to the repl

vlaaad10:08:47

Are you using nrepl? There is a middleware for nrepl

EmmanuelOga10:08:43

maybe... I usually use whatever cider does, which inserts middleware automatically

EmmanuelOga10:08:08

there's a mechanism to request custom middleware to be inserted that I always forget how to use 🙂

vlaaad11:08:09

Then you are probably using nrepl 🙂 try finding a way to insert vlaaad.reveal.nrepl/middleware in the middleware list

vlaaad11:08:17

I think @U086D6TBN previously found a way to do it: he suggested creating .nrepl.edn file with contents like these: {:bind "0.0.0.0" :port 5555 :middleware [vlaaad.reveal.nrepl/middleware]} maybe that'll work for you?

onetom14:08:07

@UCFTL4UQP u should specify an alternative directory for your per-user nrepl.edn file via the NREPL_CONFIG_DIR env var. here is an example .idea/runConfigurations/my-module.xml:

<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="Rule Crib with Reveal over nREPL" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="my-module" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <environment name="NREPL_CONFIG_DIR" value=".reveal" />
    <setting name="workingDir" value="$PROJECT_DIR$/my-module" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="reveal" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
</component>

onetom14:08:43

and then, this is what i have in my .reveal/nrepl.edn:

{:bind "0.0.0.0" :port 5555 :middleware [vlaaad.reveal.nrepl/middleware]}

👍 3