Fork me on GitHub
#cursive
<
2016-11-02
>
sandbags09:11:26

Please can I make a plea for fixing the create namespace workflow?

sandbags09:11:49

If I accidentally create a .clj file when I wanted a cljs/cljc one more time I think I shall go mad! 🙂

cfleming11:11:50

One thing that isn’t mentioned in that issue is what to do about cljc files, since there’s no way to autodetect when to use those. https://github.com/cursive-ide/cursive/issues/893 also suggests a way to convert between the file types - does that sound useful?

pseud12:11:04

@cfleming did you think about a timetable for boot integration ? I know how to generate a lein project-file from boot and that of course works for now, but it seems like direct integration could offer so much more

cfleming13:11:11

@pseud I don’t have a timeline, but it’s definitely something I want to do soon. It’s one of the most requested items.

pseud13:11:07

And if you would then drop lein support so as to send a message to the unbelievers … 🤓

cfleming13:11:41

Umm, that might be a bit extreme 🙂

sandbags14:11:34

@cfleming could you look at files already in the namespace?

sandbags14:11:54

typically in my experience if i have a cljs file in a namespace (folder) the next i create will also be a cljc, etc...

cfleming14:11:35

@sandbags: Should that read: “if i have a cljc file in a namespace”?

cfleming14:11:03

I’m guessing yes. So yeah, perhaps either that, or just remember what the user last chose.

onetom15:11:39

@pseud this is what i use to make intellij and boot projects friends: https://clojars.org/onetom/boot-lein-generate and here is a full example where u can quickly try it too as a reference: https://github.com/onetom/hoplon-layouts

pseud15:11:19

@onetom - interesting 🙂 Will have to read this over to fully grok, but any little step toward making the process of synchronization more transparent is a good one.

sandbags15:11:01

@cfleming i guess i was addressing that you might have the same namespace in both a CLJ and CLJS

sandbags15:11:16

@cfleming they are different folders ususally in Cursive

cfleming16:11:13

@sandbags Right, but you would normally have a clj and a cljs, and cljc files normally go under clj, right?

sandbags16:11:19

i’m assuming that you can tell which is which

cfleming16:11:42

So if you create a file in clj, I can’t tell whether you want clj or cljc

sandbags16:11:52

oh, i usually have a cljc folder

cfleming16:11:05

Except by remembering what you did last time, or something similar.

sandbags16:11:07

except when i don’t have clj & cljc

cfleming16:11:15

Ok, I can check that.

sandbags16:11:15

can you look what else is in that namespace?

cfleming16:11:30

I’m not sure yet, probably.

sandbags16:11:30

i.e. the first time ask, subsequently default to whatever is already in that namespace?

cfleming16:11:49

And if there’s a mix, use the last one, or something similar.

sandbags16:11:11

i think that sounds reasonable

sandbags16:11:20

typically i cannot imagine i would mix clj and cljc in the same folder

sandbags16:11:38

but even if you do i can’t think of a better approach

cfleming16:11:36

Ok, sounds good.

bfabry17:11:43

mm that's what I'm on

bfabry17:11:53

Version: 1.4.0-eap3-2016.2

cfleming17:11:58

No, I mean the one I’m going to release shortly 🙂

bfabry17:11:10

awesome thanks

cfleming17:11:18

I should have said “next EAP"

joshg21:11:44

How does one connect to a remote socket server repl (not nrepl) using cursive?

jrheard21:11:28

when speccing functions, is it normal to put the (s/fdef my-fn) above the (defn my-fn) line? i feel like i’ve seen this in one or two official bits of clojure documentation

jrheard21:11:00

if so, will cursive support this? currently i see “my-fn cannot be resolved” when i try to do this

jrheard21:11:24

i realize it would be helpful if i could link to a specific piece of documentation that does what i said on that first line, trying to remember..

jrheard21:11:51

oh i think i saw dnolen do this in the video of his talk from last week

cfleming21:11:16

@joshg Currently there’s no native support for this. I’m planning to add this soon as part of adding support for CLJS REPLs.

joshg21:11:45

@cfleming Got it. Thanks!

cfleming21:11:20

@jrheard Currently there’s no native support for that either 🙂

jrheard21:11:26

cool, thanks

cfleming21:11:33

But if it should be supported, let me know.

jrheard21:11:59

will do! i’ll keep an eye out for actual cognitect documentation that says that this is an official pattern

dnolen21:11:15

@jrheard that's not a pattern

dnolen21:11:23

fdef can appear anywhere

dnolen21:11:35

this necessarily needs to be the case

dnolen21:11:47

if you want to spec someone else’s thing

jrheard21:11:54

makes sense

cfleming21:11:14

@dnolen So it’s valid to spec a fn ahead of the fn definition in the same ns?

cfleming21:11:28

Ok, I’ll fix that.

jrheard21:11:28

❤️ thanks for clearing that up david!

cfleming21:11:38

@jrheard Could you file an issue for that?

jrheard21:11:42

you got it

dnolen21:11:43

it also simplifies stuff like optional type checking

dnolen21:11:52

you don’t want to enforce an ordering

cfleming21:11:17

Ok, no problem.

cfleming21:11:51

@jrheard That said, it’s also valid to put the spec after the fn, so that will work as a workaround in the meantime.

jrheard21:11:13

yup, i’ll continue doing that in the meantime 🙂

misha22:11:11

@denik 1. you are trying to make code look (very subjectively) good by downgrading semantics, which actually (I am pretty sure "objectively") matter more: aligning :content of one element with :margin-top of another gives you nothing other than "looks cool, I don't even need to read it!". 2. your examples are rather naive if you compare it with any just-a-tiny-bit-non-trivial piece of code using any CSS frameforks, where you have 3 divs-deep structures with 50-chars-long class names combos just to align a button. Those rarely fit within 120-chars-wide editor tabs, let alone having 2 of them viewed at once side by side. 3. most of the line changes with subsequent re-formatting will generate tens of lines in commit diff. That's just a waste of people's attention. 4. that's a pain in the ass to implement for such a tiny subjective benefit of "looking cool"

jrheard22:11:30

please be nice 🙂

misha23:11:55

@jrheard I was asked for detailed explanation : )