Fork me on GitHub
#cider
<
2015-07-15
>
bozhidar05:07:05

just noticed that in the end only Eclipse and IntelliJ are mentioned

bozhidar05:07:45

kind of disappointing, but not surprising

bozhidar05:07:56

(especially at a Java conference)

agile_geek07:07:53

@bozhidar: I think it’s because it’s targeting Java devs as u point out. I came from Java and although I had some experience with Vi (not Vim) before and loads of Eclipse (bit of IntelliJ & Netbeans) I decided to learn Emacs at same time as Clojure. I suffered for ages before I got used to it but I’m glad I persevered. However, encouraging Java dev’s (most of whom have never used Emacs or Vim) to use different tools and a different language might just kill Clojure adoption. Get them hooked on Clojure, then work on editors that subsume your entire toolset! 😉

bozhidar07:07:08

yeah, yeah - I’ve been a Java dev, I know how things work in the realm of Java

bozhidar07:07:33

I’m surprised that 5 years after the death of enclojure, there’s still no NetBeans support for Clojure, though

agile_geek07:07:07

Yeah. But I don’t see much Netbeans use at all anymore.

ska08:07:04

A while ago @bozhidar mentioned the hyper and super key. I'd like to voice that I very much prefer them to be left alone. I use them for window manager stuff because almost no application interferes with them. When running out of keybindings, one way of dealing with it could be to just bind the most important commands and list other interesting commands in the documentation for users to bind at will. For example I override C-v and C-b to be more or less my own C-x and C-c: I use C-v as a prefix for global keybindings and C-b as a prefix for local, mode-specific ones.

bozhidar11:07:50

@ska: I think you and pretty much everyone else misunderstood my idea

bozhidar11:07:08

I don’t want to add keybinding that have Super and Hyper prefixes

bozhidar11:07:23

I was wondering about doing things like C-c s-e

bozhidar11:07:48

I’m quite certain you’re not using those with your WM

bozhidar11:07:15

and technically speaking it’s OK to use those in major (and some minor modes)

bozhidar11:07:40

I’ve never seen such usage though, and I wonder why aren’t they more popular

bozhidar11:07:57

I’ve added such keybindings to my personal config and I’ve never had issues with them

tsdh12:07:38

@bozhidar: When I've bound s-e for something in my WM then the s-e in C-c s-e won't reach emacs at all, no?

bozhidar12:07:27

but that’s not that big of a deal IMO

bozhidar12:07:38

you obviously care more about the WM

bozhidar12:07:48

and you can always change the keybindings

bozhidar12:07:12

on the other hand some people will likely be unhappy

bozhidar12:07:29

but this line of reasoning is somehow flawed

bozhidar12:07:39

on OS X the WM is using Control a lot

bozhidar12:07:57

but we haven’t stopped using Control keybindings in Emacs simple_smile

andrewmcveigh12:07:35

@bozhidar: yep… I wish it wouldn’t! Some Control bindings seem impossible to unbind

bozhidar12:07:43

anyways, this was just an idea; it’s not something that’s going to happen for sure

bozhidar12:07:55

probably the nested keymaps is a better idea anyways

tsdh12:07:24

Yeah, sure. And on Windows and GNU/Linux most WMs use Alt. But usually its much easier to change the good dozen of important WM bindings rather than the gazillion emacs bindings.

bozhidar12:07:08

this reminded me that OS X’s WM, is probably the only one which doesn’t interfere with the brilliant keybinding M-Tab

tsdh12:07:14

@bozhidar: I'm still in favor of magit-popups. They essentially are nested keymaps with a very nice, discoverable UI. And they don't just nest, they can also be cyclic! http://paste.lisp.org/display/151626

bozhidar12:07:11

I discoverable UI is pretty nice, when you’re not familiar with the UI

bozhidar12:07:20

after a while it becomes an annoyance

bozhidar12:07:49

magit is kind of a special case, because of the ton of switches and stuff

bozhidar12:07:27

but even there I rarely need the extra level of help provided by them

bozhidar12:07:02

don’t get me wrong - I don’t mind having something like this for CIDER, but I wouldn’t impose it on all users by default

tsdh12:07:34

What's the annoyance? The minimal flicker when typing C-c a b and thereby quickly switching 2 popup windows you can simply ignore once you memorized the binding?

bozhidar12:07:06

well, I wouldn’t say the flicker is minimal

bozhidar12:07:13

it’s quite noticeable

bozhidar12:07:35

perhaps this shouldn’t be shown at all without some timeout

bozhidar12:07:31

I don’t mind it much, I’m just saying there’s always room for improvement

tsdh12:07:09

The problem is that the popup bindings are only valid in the popup buffer so it needs to be displayed and selected.

tsdh12:07:39

But the keymap could be used as overriding-local-map for 0.x secs before the popup buffer is shown. Thus when you type fast enough, no popup buffers would be shown at all.

arrdem17:07:16

Can Cider's debugger trace defmethods?

malabarba17:07:58

@tsdh @bozhidar hydras can do that delay thing https://github.com/abo-abo/hydra/wiki/internals#idle

malabarba18:07:36

@arrdem 0.10.0 does debug defmethods, but I'm not sure if it's able to keep track of which ones are instrumented.

arrdem18:07:30

@malabarba: okie doke, just gonna be debugging some multimethod heavy stuff today and figured I'd ask

malabarba18:07:29

Cool. Let me know if it works well

tsdh18:07:49

@malabarba I guess I'll need to have a look at hydras at some point. Until now I've just disqualified it as something for vim guys.

malabarba18:07:14

@tsdh they're really just keymaps with visual feedback,and a ton of other features tacked on. Frankly, I've never used one because I know my personal keymaps by heart, but they look very practical useful.

malabarba18:07:56

One of the extra features is that the keymap can be repeatable, which is how it's usually advertised, and that's why it kinda looks like a vim thing.

tsdh18:07:43

@malabarba Yes, in just reading the readme. I'm not really sure if that succession thing is good when the aim is just to bind lots of commands in nested keymaps. I mean, if makes sense for zooming and other stuff that's usually repeated a few times...

malabarba18:07:48

@tsdh yes,but that's optional. They can be just regular keymaps (which is the most useful case imo).

tsdh18:07:30

@malabarba OK, cool.

luxbock19:07:25

what's the setting for changing the indentation style for clojure-mode?

luxbock19:07:23

the clojure-mode README only talks about how to change the indentation of specific keywords, but I recall there being a setting that changed the default behavior of how the function arguments are indented

sundbp22:07:42

@malabarba: i tried the debugger today on a project using boot. it mostly works ok, but in some cases (i think relating to quitting the debugger and such) you end up with emacs show a $random-tmp-path/the_file.clj buffer instead of src/the_file.clj. Easy to then end up editing this tmp file instead of the real file and then lose changes. I reckon this has something to do with the filesets and pods of boot (which is a great idea in general).

sundbp22:07:12

i’ll see if i can pin down the circumstances of when i end up editing tmp-files instead of src/ files.

chris_johnson22:07:46

so I’m obviously missing something here - I’m trying to get CIDER 0.9.1 up and running in Emacs 24.5/Emacs Live so I can run a clj/cljs workflow and I …don’t have cider-jack-in-cljs at all, nor does M-x customize-variable <RET> then find cider-cljs-repl at all

chris_johnson22:07:09

I did go look in my clojure-pack/lib/cider dir and it claims to be 0.9.1 and my ~.lein/profiles.clj has`[cider/cider-nrepl "0.9.1”]`

chris_johnson22:07:46

emacs —version yields GNU Emacs 24.5.1

magnars22:07:10

sounds like cider isn't loaded. Does M-: (require 'cider) help any? @chris_johnson

sundbp22:07:42

@malabarba: ah, i figure it’s using tools.namespace.repl/refresh sort of workflow with boot. the “real” files that gets compiled and such are the tmp files, so i guess that’s what the debugger finds and then when switching buffers and such it’s using a buffer for the real file in the fileset tmp dir, not the src/ file. seems logical. but very dangerous combination simple_smile

sundbp22:07:46

@malabarba: it’s a general issue, i.e. jumping in stacktraces and all that kind of stuff naturally will be operating on the fileset tmp dir files. so debugger unrelated.

malabarba22:07:23

@sundbp what version of cider are you in? and which key/command are you using for debugging the function?

sundbp22:07:48

@malabarba: latest melpa and 0.10.0-snapshot middleware.

sundbp22:07:06

@magnars: C-u C-M x

sundbp22:07:12

it generally makes sense though. this is my refresh function for compling stuff:
(defn refresh
  []
  (apply repl/set-refresh-dirs (b.c/get-env :directories))
  (repl/refresh))

malabarba22:07:46

@sundbp and what's the name of these "fake" buffers you get?

sundbp22:07:51

(get-env :directories) in boot will give the directories of the immutable fileset tmp-dir where things get copied to.

sundbp22:07:25

so tools.namespace will compile the files of boot’s tmp dir. then cider will naturally pick those up in all the tooling.

malabarba22:07:34

Indeed that looks like some weird boot interaction

sundbp22:07:52

and if one isn’t careful disaster follows as one starts to edit “immutable” throw away files

sundbp22:07:29

the way boot does it is really smart in one aspect, but it’s bound to screw up a lot of tooling.

malabarba22:07:48

It surprises me a little, because the debugger actually does its own thing for tracking the file name. But it looks like that's getting overwritten somehow

sundbp22:07:52

tooling that relies on the meta-data of compiled vars.

sundbp22:07:10

the stacktrace jumper is tricked in same way

sundbp22:07:33

i.e. trigger an exception, then pick a file i nthe stack trace and RET to jump to it, and you end up in tmp-file.

malabarba22:07:36

I'll have to test out boot before we release 0.10

malabarba22:07:46

And thanks for testing, BTW

malabarba23:07:43

@chris_johnson that command you're looking for is only on 0.10

malabarba23:07:07

So you'll have to make the jump to the snapshots

sundbp23:07:29

now when thinking it through i reckon it may be a cider wide issue where one may need some conversion of xxxxx/a/path/a_file.clj to src/a/path/a_file.clj, (but searching through resource-paths of boot for matching up the src path as it could be called something else). sounds like a pain..

malabarba23:07:27

Yeah, there are many places where that might cause issues. But, AFAIK, the nrepl has a similar problem on lein as well. A lot of things get evaluated as temp files, and these files some times sneak up on cider stack traces