Fork me on GitHub
#cursive
<
2015-12-16
>
wilkerlucio03:12:58

hello people, I have a question: when I paste multiline strings into a string, cursive converts the line breaks to \n, this is good for single line strings but when editing multiline strings it's a bit of pain, is there a way to disable this so when I paste it keeps the line breaks?

cfleming04:12:08

@wilkerlucio: I think Paste Simple will do that.

wilkerlucio04:12:27

cool, that works simple_smile

tony.kay06:12:17

@dmi3y: See above for instructions on using node for REPL.

dmi3y07:12:21

awesome, thanks @tony.kay

settinghead16:12:35

anyone has issues with debugging component based workflow on cursive? i can’t seem to get the breakpoints to work

cfleming19:12:30

@settinghead: The most likely problem is that currently breakpoints don’t work inside deftype or defrecord method bodies.

cfleming19:12:45

This is an annoying limitation of the way Clojure compiles its classes.

settinghead19:12:03

ah that’s good to know

cfleming19:12:08

And the very limited ways that JDI allows you to search for them.

cfleming19:12:21

Breakpoints inside functions that you call from those methods work fine.

Alex Miller (Clojure team)20:12:00

@cfleming: is that something clojure could do better?

Alex Miller (Clojure team)20:12:11

like are you missing line info in those or something?

cfleming23:12:07

@alexmiller: maybe. It’s a tricky issue. The problem is that it’s essentially impossible to identify in Clojure what the classname for a particular line of code (or expression, in general) is.

cfleming23:12:35

When you set a breakpoint in JDI, you need to set it at a line in a class.

cfleming23:12:03

Instead of a class, you can use a “limited regular expression” to identify potential classes that JDI should check the breakpoint for.

cfleming23:12:36

Where “limited regular expression” means one of *name or name*

cfleming23:12:39

When someone sets a breakpoint in a namespace, the best I can do is to match on munged_ns.name$*, which catches all functions in that ns.

cfleming23:12:08

However that doesn’t catch records or types in that ns, which are named like munged_ns.name.Record

cfleming23:12:40

The problem is if I match on munged_ns.name* then I’ll also get munged_ns.name_2 et al

cfleming23:12:32

I haven’t done another pass over the debugger since working out what the problem was, so I’m not sure if I can set up multiple filters, or manually filter things afterwards, or other hacks.

cfleming23:12:27

The problem with manually filtering afterwards is that munged_ns.name* or even munged_ns.name.* will match all classes in the package hierarchy under that point.

cfleming23:12:14

But I may be able to filter on munged_ns.name$*` and then all the names of classes defined in that ns explicitly, or something.

cfleming23:12:05

I suspect (but I don’t actually know) that this filtering may be why debugging in Clojure is so much slower than in Java.