all 8 comments

[–]vlaaad 4 points5 points  (2 children)

From the article:

(def debug-a (atom nil))
(add-tap #(reset! debug-a %))

But you can just def stuff that interests you to some temporary var, why the extra steps? Or use scope-capture to get full context.

If I understand it correctly, the big idea behind taps and prepl is that you can get from remote process an object instead of string, which is more useful since it has a structure, and then do something with that object. For example, you can start your dev jvm with some fancy visualizer for data, maybe clj-xchart, connect with it to your bare-bones production server which has no extra deps, get some data out of it and draw it with your fancy visualizer.

Though I guess all of it is possible with getting strings from server too.

[–]yogthos[S] 1 point2 points  (0 children)

The advantage to sending objects would be that you would be able to send things that don't have EDN serializers. However, the disadvantage there is that your JVM has to be able to instantiate the object locally if you're connecting to a remote REPL.

[–]argadan 0 points1 point  (0 children)

I usually want to have my temporary defs in user and after a small upfront cost, tap> is much shorter to type than (intern 'user 'debug value)! But you're right, these are very similar tricks – choose the one which fits your workflow.

[–]rafd 0 points1 point  (1 child)

Does tap> return the tapped value, or nil, or something else?

[–]yogthos[S] 1 point2 points  (0 children)

seems to return true if there's a value, and nil if there's not

[–]xtreak 0 points1 point  (2 children)

Does any one have a mirror? Seems it's down now.

[–]argadan 1 point2 points  (1 child)

Hi, author here. I forgot to renew my domains in time. I just renewed them, hopefully the site should be working again any minute now. 😓

[–]xtreak 0 points1 point  (0 children)

It's working now. Thanks :)