Fork me on GitHub
#calva
<
2019-06-14
>
pez05:06:41

@gerred thanks! I love to hear that. My comment was about how developing Calva is not something that brings food to the table, mainly acknowledging that I understood why @brandon.ringe needed to do โ€realโ€ work. Your encouragement would fit perfectly as a review on the extension marketplace, btw. It is so concrete and wonderful.

gerred05:06:31

๐Ÿ‘ also, I should expand upon the first bit of that comment, setup a way for me to sponsor and I'll put some financial support to it. at least the amount I pay cursive each year, would love to enable the time to develop this more in ways that don't necessarily (out of time) mean contributing code or ideas

๐Ÿ‘ 1
pez05:06:27

I will consider this. There probably should at least be a way, as you say.

pez07:06:17

Oh, you had updated the PR @slack1038! I don't get e-mail notifications about such events, maybe that is a setting... Anyway, until I know if I can fix that, please poke me about such amends. ๐Ÿ˜ƒ

kstehn07:06:49

Oh okay ๐Ÿ˜‚

pez07:06:14

I'm not used with people fixing things immediately, haha. It's more common that people say they will do something and then it never happens, sadly. But now, I sound like the grumpy old man I am. I'm super happy that we are fixing this powershell business. Issues like this show how important it is: https://github.com/BetterThanTomorrow/calva/issues/225

Stefan08:06:12

Hi @pez, Iโ€™m trying out the experimental setting to align map items in columns. It works just fine mostly, except for this case:

(defn extract-relevant-fields [metric-dict]
  {(keyword (:metric metric-dict)) (or (:value metric-dict) (:value (first (:periods metric-dict))))})
Because of the line length, Iโ€™d like to put the key and the value on two separate lines, but Calva wonโ€™t let me:
(defn extract-relevant-fields [metric-dict]
  {(keyword (:metric metric-dict)) 
   (or (:value metric-dict) (:value (first (:periods metric-dict))))})
Whatโ€™s your take on this?

pez08:06:24

@stefan.van.den.oord I'd welcome an issue about this on the repo. I certainly see the issue. Calva is currently using an old patch for clj-fmt that had this alignment. I think there has been progress in improving that on master since. Not sure it supports your use case here anyway though, clj-fmt tends to be quite gentle with its reformatting. But if you have some time, please look at the PRs (opened and closed) regarding alignment on the clj-fmt repo. And let me know if you think it is time I rebase my stuff. And if it does not yet support your use case, we'll have a look if we can support it by some other means.

Stefan08:06:26

Sure @pez, Iโ€™ll have a look at it (probably not today though)!

metal 1
pez08:06:00

channel: I have published a new version of Calva, 2.0.12 with the most important change being that jack-in should now work for Windows 10. There are also some other changes, maybe @lspector will like the way the output is now printed to Calva says.

๐Ÿ‘ 1
aw_yeah 1
pez11:06:27

@brandon.ringe: you might want to merge in upstream/master on your fork. I just made a change to how stdout is printed that might effect your experiment. It's probably easy to fix with a conditional check for any value in the message, but I'm not sure.

๐Ÿ‘ 1
gerred11:06:20

is there parinfer support today via calva? I noticed the vscode one is on hold to focus on atom parinfer

pez12:06:13

There is only limited support. In Calva you use tab to format the current enclosing form based on parens, and you use ctrl+alt+p to infer parens based on indentation. To compensate some for the loss of autostructure you get with parinfer proper, the paredit slurp and barf forward commands have easy accessible keyboard shortcuts: ctrl+right and ctrl+left, respectively.

pez12:06:43

And the reason the vscode parinfer extension is on hold is not really to focus on Atom. It is because vscode does not really have the APIs that parinfer needs, making it really hard/impossible to implement. Especially smart mode.

Stefan12:06:09

Thatโ€™s too bad ๐Ÿ˜ž Smart mode is very exciting.

pez12:06:22

Yeah, it is lovely!

gerred12:06:52

that makes sense. I was going off of the notice in the description, good to know it's that so I don't try to add one.

pez12:06:11

What notice in what description? ๐Ÿ˜ƒ

pez12:06:26

Ah, I think I got it now. About why Parinfer for vscode is on the backburner?

gerred12:06:33

yup ๐Ÿ˜„

pez12:06:50

If you do decide to take a look at it @gerred, I'd be happy to have a Hangout session together and we can discuss how the situation can be improved.

pez13:06:49

Calva-friends: Here's another getting started-ish page on the wiki that I'd like help with. You can edit it or just suggest things or whatever: https://github.com/BetterThanTomorrow/calva/wiki/Commands-the-Top-10

lspector13:06:35

On getting started, fwiw I find the key chords confusing myself and confusing to students in part because there's no "alt" on my/our mac keyboards, and I always forget what the translation is. I find it better to use/recommend command-shift-p to bring up the command palette, and then type/select the command you want. And the only explicit command advice I have on my recommendations to students is "Two key commands that enable my workflow are Calva: Start a project REPL and connect (a.k.a. Jack-In) and Calva: Send current expression (or selection) to REPL window and evaluate it." I called these the "keys to the castle" above because with them (and tab for auto-reindentation) I'm in business, can do everything I want, and can discover other stuff later if I want it, while without these things I'd be lost.

pez13:06:01

alt is option on Mac. Even says both on my Mac keyboard. But I could add a mention about that somewhere.

lspector13:06:29

Ah -- thanks -- I hope I remember that! Mine says option and has an icon that is sort of a backslash with serifs and a floating bar... FWIW I also just find it hard to remember key chords (although a handful from emacs are burned in my brain), and I think they're a real turn off for many students if they're new to computer science. Menu items or commands that show up in the palette are less demanding on memory and have a better learning curve. It's great that all of the Calva commands show up in the palette when typing "Calva:" there, and that's a great selling point (that maybe should be stated more prominently? Not sure -- maybe this is already pretty clear). But FWIW my perspective is that it'd be best to mention full commands rather than (or in addition to) key chords, especially in "getting started" docs. Once people know a command and realize that they want to use it a lot then they'll see that there's also a key chord and maybe bother to learn it.

pez13:06:05

There is a page on the wiki now about finding Calva commands. I added it the other day as a way to take care of your feedback. Please check it out and let me know if you think it's any good.

pez13:06:14

I know what symbol you are taking about for the option key. But on my Mac it looks like so.

lspector13:06:51

Got it. But actually, it turns out that I'm having problems with the key commands aside from the key labeling. Weird and bad ones. Maybe I'm doing something wrong. If I jack in and type (+ 1 2) in the editor and highlight it, then command-shift-p brings up the command palette and selecting Calva: Send current form to REPL window and evaluate it reliably sends the form to the REPL window and prints the result (3). Exactly like I want. However, if I highlight the form and press control-option-c, release, and then press option-e, then most of the times it just replaces (+ 1 2) with a back-tick and sends nothing to the REPL window. On two occasions, though, it sent the form to the REPL window, evaluated it (printing 3), but also replaced the form in the editor with a back-tick and also somehow locked the editor window so that nothing I typed in it changed anything! I was only able to regain editing control by quitting and restarting VS Code. Bizarre. Any ideas?

lspector14:06:38

The "Finding Calva Commands and Shortcuts" page looks great!

aw_yeah 1
pez14:06:29

There is a bug in vscode with โ€œdeadโ€œ keys acting weird in keyboard shortcuts. I am guessing option-e is a dead key on your keyboard. Change the shortcut to something else to make it work. That vscode also locks up like that was news me, though...

lspector14:06:36

Huh... is "deadness" a hardware thing? This is a pretty new machine...

pez14:06:50

Oh, and dead key means a key that doesn't immediately produce output, and instead waits for a second key to be pressed. So option-e on your keyboard probably yours stuff like รจ if you press it followed by e.

lspector14:06:01

Ah... so it's interacting with some other configuration in my system? I think I will just stick to using (and recommending) commands selected in the palette, especially since changing the shortcut will make the memory demands and learning curve even worse and weirder.

pez14:06:58

Your choice. ๐Ÿ˜€. The command palette will show whatever you change it to though.

lspector14:06:59

That's nice. But if I change it then I'll still be out of sync with the docs, and with what students have to do unless they make the same changes etc. At least in my context sticking with the palette seems best by far. And my suggestion for docs is to always keep the command names and palette in mind as a first-class mode of interaction, without assuming that people will be using the key chords.

Stefan14:06:42

I ran into the same thing recently, thatโ€™s why I wrote the above wiki page. So I guess I documented an alternative to OPTION-e ๐Ÿ™‚

โค๏ธ 1
๐Ÿ‘ 1
pez16:06:27

Are you both Americans, @lspector and @stefan.van.den.oord ?

pez17:06:42

If this is a thing with American keyboards we should consider changing the default.

Stefan17:06:10

No, Dutch :flag-ye:

Stefan17:06:15

Iโ€™ve seen it on multiple keyboard layouts; IIRC Dutch, (international variants of) US, ABC, ...

Stefan17:06:13

If you decide to change it, I think the shortcut I proposed is probably safe & convenient...

pez17:06:33

Yes. I'll change it to that. Do we know of any other Calva default that is problematic?

Stefan18:06:52

@pez I didnโ€™t encounter anything so far. Do you have a (complete) keybindings cheat-sheet somewhere? I could quickly review it that way. Having that a4-printable would be very convenient by the way I think for new usersโ€ฆ

pez19:06:39

I should have. But the package.json should take you far.

Stefan19:06:08

Ok Iโ€™ll check.

pez19:06:11

If you know how that A4 should look, that would be truly awesome.

pez19:06:47

Or Letter size. Not to confuse @lspector's students. ๐Ÿ˜

Stefan19:06:19

Sure ๐Ÿ™‚ Maybe something like this? https://www.cheatography.com/tag/cursive/

Stefan19:06:48

Auto-generating it would be the best way of course.

pez19:06:09

I still remember printing out a cheat sheet like that for CIDER and smiling foolishly every time I looked at it, taped to my desk beside my keyboard.

Stefan19:06:04

Hehe I had the relevant part of the Calva paredit README on my desk, both at work and at home ๐Ÿ™‚

calva 1
hairfire21:06:56

I'm trying to edit Joker (i.e., '.joke') files as if they were .clj files. Is there a way to tell Calva to treat the .joke files as Clojure files?

kstehn21:06:43

On the buttom right there is something like what File Type is currently open You just can click on it and change it to clojure :)