Fork me on GitHub
#clojure-europe
<
2022-05-02
>
pez06:05:04

Good morning!

borkdude08:05:33

Good morning! aws-api ported to babashka: https://github.com/grzm/awyeah-api

😍 2
nottmey08:05:08

Good Morning πŸ™‚

genRaiy10:05:26

It's not a bank holiday here in Belgium but it is where I work in the U.K. so I'm enjoying the sunshine and just back from brunch. Good morning :)

borkdude10:05:16

Does bank holiday mean people at the bank have a day off, or a day to celebrate the existence of banks?

πŸ’― 2
πŸ˜‚ 1
vijaykiran14:05:44

When they were created, only banking people are considered worthy of having holidays. I think.

borkdude10:05:59

I looked it up on wikipedia, it was the first!

otfrom10:05:23

(dunno, people really seem to like banks here)

otfrom15:05:30

having fun with corgi-emacs today

corgi-emacs 1
thomas08:05:51

Is that the version the queen uses?

thomas09:05:46

makes sense

ordnungswidrig07:05:51

I'm going to try that myself. For the brave who want to do it, add this to the very beginning of your init.el

(setq user-init-file (or load-file-name (buffer-file-name)))
(setq user-emacs-directory (file-name-directory user-init-file))
This allows you to test a config with emacs -q -L .emacs.d.corgi -l .emacs.d.corgi/init.el

otfrom08:05:29

yeah, I just use symbolic links to create my .emacs.d, which seems to work (tho I lose things like bookmarks unless I copy them over)

ordnungswidrig08:05:05

I'm using rcm and I didn't want to mess with the links that creates.

plexus12:05:06

corgi-emacs ❀️ Chemacs2 https://github.com/plexus/chemacs2

πŸŽ‰ 1
ordnungswidrig12:05:53

I'm trying corgi right now and I like it because it's fast. But I'm spending a lot of time porting some spacemacs key bindings πŸ™ˆ

otfrom12:05:35

@U054UD60U I'm doing similar, and I'd quite like to be able to keep to "standard" spacemacs bindings for the things outide corgi. I'd be interested in seeing your config

plexus12:05:39

let us know which bindings you miss most, we might add them

ordnungswidrig12:05:54

I can't live without that.

plexus12:05:07

what are the bindings? is this the "lisp mode" stuff?

plexus12:05:32

we have > and < for slurp/barf, and L/`H` sexp text objects

plexus12:05:22

Spacemacs is like C++, everyone uses a different subset

ordnungswidrig12:05:39

yes, slurp barf etc. The spacemacs bindings are so deep in my muscle memory, I don't want to relearn ;)

otfrom12:05:31

heh, I'm all about the re-learning as I'm moving from holy mode

plexus12:05:34

would like to see a list still if it's not too hard to pull it up πŸ™‚ I personally found the spacemacs bindings for structural editing very awkward, but maybe I missed some things

plexus12:05:31

but the L and H text objects are fantastic once you get used to them, very vim-ish way of dealing with things, e.g. 2yL : copy next two forms, dH delete previous form, etc

plexus12:05:08

and having < and > for slurp/barf is nice because it's a single keystroke

plexus12:05:53

I know spacemacs has this thing where when you do a structural editing command it switches to a different mode, which I disliked with a passion. I do this stuff all the time, i don't want to be going in/out of some mode just to slurp.

ordnungswidrig12:05:22

hmmm, I don't remember that, so maybe either this was fixed or Stockholm syndrom πŸ˜‰

ordnungswidrig12:05:35

But chemacs fails for me 😞

End of file during parsing: /Users/philipp.meier/.emacs.chemacs2.d/chemacs.el

ordnungswidrig12:05:04

❯ git diff chemacs.el
❯
❯ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
❯ git log -1
commit d53aa5e5e298a4244b70ae59e9d9ba34752c4bbb (HEAD -> main, origin/main, origin/HEAD)
Merge: af5d65c d939b23
Author: Arne Brasseur <[email protected]>
Date:   Tue Mar 15 08:51:07 2022 +0100

    Merge pull request #37 from dnbz/main

    Update 

plexus12:05:41

yup, that's what I'm running

plexus12:05:08

what's that extra indirection? Chemacs is supposed to take over your ~/.emacs.d

ordnungswidrig12:05:32

I've linked .emacs.chemacs.d to .emacs.d Is that the problem?

plexus12:05:49

shouldn't be ...

plexus12:05:40

starts fine for me on that commit, tried symlinked as well and doesn't make a difference

plexus12:05:53

feel free to open an issue on chemacs2

ordnungswidrig12:05:07

load-file-name is nil

ordnungswidrig12:05:26

in early-init.el

plexus12:05:50

then something's funny about your emacs...

plexus12:05:08

;;; early-init.el --- -*- lexical-binding: t; -*-

(message "Early init %S" load-file-name)
;;=> Early init "/home/arne/.emacs.d/early-init.el"

plexus12:05:21

how are you invoking emacs?

plexus12:05:26

and what version are you running?

ordnungswidrig12:05:51

Ah, "evaling" load-file-name from within emacs makes no sense.

plexus12:05:02

ah yes πŸ™‚

ordnungswidrig12:05:21

GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2022-04-22

plexus12:05:14

that seems uncontroversial too.... I'm on 28.1.50

plexus12:05:58

it's going to be your .emacs-profiles.el

plexus12:05:03

it tries to parse that

plexus12:05:33

we... should probably catch that and give a better error message

ordnungswidrig12:05:48

Oh, that's well possible πŸ™ˆ

ordnungswidrig13:05:14

Ok, that fixed it.

ordnungswidrig13:05:18

Thanks for helping

plexus13:05:42

that should help the next person (which might be me) πŸ™ˆ

ordnungswidrig13:05:28

Do I need to enable "straight" support for corgi? I see weird errors now.

plexus13:05:38

Corgi is built on straight, the example corgi setup contains a bootstrap.el which will set up the necessary prerequisites. This is a bunch of boilerplate I would recommend simply copying over.

ordnungswidrig13:05:06

copy over to chemacs early-init?

plexus13:05:43

no need to touch anything in chemacs πŸ™‚ , that's just the tool to help you switch between configs

plexus13:05:01

you should have a directory with your corgi setup, with an init.el?

plexus13:05:33

copy bootstrap.el to the same directory, and in init.el add (load-file (expand-file-name "bootstrap.el" user-emacs-directory)) `

plexus13:05:55

or copy the contents of bootstrap.el to the top of init.el

plexus13:05:18

ok, you copied that whole thing? then you should be good

plexus13:05:08

what are you getting?

ordnungswidrig13:05:21

E.g. SPC is not bound any more.

ordnungswidrig13:05:29

I'm removing all cache and elc now πŸ˜‰

ordnungswidrig13:05:38

...from the corgi directory

plexus13:05:17

ok, sounds good, let me check if we broke anything

ordnungswidrig13:05:32

testing my spacemacs profile now as a comparison πŸ˜‰

ordnungswidrig07:05:02

I've found my problem πŸ™‚ I had a malconfigured user-keys.el and the error message from corkey was not too helpful

plexus07:05:00

what was the error message? sounds like a similar case as the chemacs issue where we should guide the user a bit

plexus07:05:21

FYI I did a write up of how I'm thinking about corgi key bindings: https://github.com/corgi-emacs/corgi/issues/23

❀️ 1
ordnungswidrig07:05:26

Exactly, I've fixed it locally and I will submit a PR πŸ˜‰

plexus07:05:39

Excellent! thank you!

ordnungswidrig07:05:36

I've split the parsing and reloading part, basically

(defun corkey/reload (&optional key-files signal-files)
  "Parses the bindings, removes the existing bindinds and then
install the bindings."
  (interactive)
  (let* ((bindings (corkey/load-bindings key-files signal-files)))
    (corkey/remove-bindings)
    (corkey/install-bindings bindings)))

ordnungswidrig07:05:00

What's the workflow working on packages? For now I just had patched the file in straight's cache

plexus08:05:18

you can branch/commit/push right there, you might have to update the git remote if you want ssh, it defaults to http

plexus08:05:47

I tend to remove straight/repos/{corkey,corgi-packages} and replace them to symlinks to my own local checkouts

plexus08:05:32

once your corkey change has been merged we take the latest hash and put it in corgi-versions.el in corgi-packages

plexus08:05:09

that's manual so far. I'll probably look into improving some of this workflow stuff, I still find straight a little awkward in this regard.

ordnungswidrig08:05:43

I love how much joy corgi creates. I've never been a contributor to spacemacs but corgi appears to be so much more accesible.

πŸ‘ 1
1
ordnungswidrig08:05:09

Do you thing error handling should go to corkey/-read-file or somewhere higher?

ordnungswidrig08:05:22

"you can branch/commit/push right there" WDYM? :thinking_face:

plexus08:05:19

straight/repos/* are full git repos

plexus08:05:28

I think doing the error in -read-file makes sense, the most important thing is that people get feedback about which file has the issue (ideally full path), bonus points for also giving an indication of where in the file the issue is or what the issue is, but I guess that depends on what you get back from emacs.

ordnungswidrig08:05:01

This is my spacemacs-smartparens-compatibility binding list atm:

("k"
    ("s" "Slurp forward"  sp-forward-slurp-sexp)
    ("S" "Slurp backward"  sp-backward-slurp-sexp)
    ("b" "Barf forward"  sp-forward-barf-sexp)
    ("B" "Barf backward"  sp-backward-barf-sexp)
    ("a" "Absord"  sp-absorb-sexp)
    ("c" "Convolute"  sp-convolute-sexp)
    ("t" "Transpose"  sp-transpose-hybrid-sexp)
    ("J" "Join"  sp-join-sexp)
    ("W" "Unrwap"  sp-unwrap-sexp)
    ("p" "Push"  sp-hybrid-push-sexp)
    ("e" "Splice forward" sp-splice-sexp-killing-forward)
    ("E" "Splice backward" sp-splice-sexp-killing-backward))

plexus08:05:39

is that a top level k?

ordnungswidrig08:05:50

hm, any way to change the default , leader key, btw?

plexus11:05:13

Copy corgi-keys.el to your Emacs home dir and change it there, it'll get priority over the bundled version

plexus11:05:25

What do you want to set it to?

ordnungswidrig11:05:10

"DEL", I'm using an ergodox keyboard and "SPC" "DEL" are on the right resp. left thumb cluster in my config πŸ˜›

ordnungswidrig11:05:15

I wonder if it would make sense to allow for a symbol instead of a string in the key definition.

plexus11:05:20

Ok I think it's fair to say that that's somewhat niche? :)

ordnungswidrig11:05:13

With a symbol (bindings (global (:leader-project ("j" ...))) would be possible.

ordnungswidrig11:05:09

Spacemacs has dotspacemacs-leader-key and dotspacemacs-major-mode-leader-key for this.

plexus11:05:15

We already use symbols to denote evil states so that would make the grammar ambiguous (or we figure out some special syntax). But I think the above workaround is fine. It's definitely intended use that people can just override the whole file with their own version, and possibly share those files with others (eg you could publish an ergodox version)

ordnungswidrig11:05:58

One of the drawbacks if this being "plain data" is that you cannot use functions and composition.

plexus11:05:25

And by having signals people can use that while still customizing which commands/packages they prefer

plexus11:05:44

Yes that's all by design. Fewer layers to reason about.

plexus11:05:42

You can generate that data and pass it to corkey directly. We give you tools to customize at multiple levels while avoiding adding all kinds of special cases

ordnungswidrig11:05:14

Staring at the code now! wanting to do a s/,/DEL/ basically

plexus11:05:30

You can slurp the default file, replace , with DEL, and pass that to corkey

ordnungswidrig11:05:21

The more I look at ELSIP I realise how much better clojure is with restructuring, sane function names and better data type literals.

plexus11:05:50

Oh yeah elisp is a disaster but you learn to bake the best of it

plexus11:05:59

*make but ok :)

ordnungswidrig11:05:29

No, I'm not googling for a clj to elisp translator.

plexus11:05:32

And we're already "cheating" by using / in function names, and that means we can't be included in melpa

plexus11:05:13

"here's a small thing that you can do to make things better" Emacs community: how about no?

plexus11:05:38

It's against their guidelines, your functions have to be named package-foo, so with a dash

ordnungswidrig11:05:06

well, that works too, if all existing code would adhere to it.

plexus11:05:14

"but isn't that ambiguous?" Yes, yes it is

ordnungswidrig11:05:32

naaa, it's "freeeedom!"

ordnungswidrig11:05:32

Waiting for @U04V15CAJ to save us once again... We need babashaka but for emacs.

plexus11:05:58

It's all just really silly, when you submit a package it gets nitpicked to death over trivialities like this, and then the next commit you change it all back and nobody cares

ordnungswidrig11:05:35

Oh, so you always clone "trivial.el", submit it and then adjust ad libitum?

plexus11:05:07

No not really, but I could. Once you're package is in there it'll build every commit, no questions ask

ordnungswidrig11:05:38

Waiting for the "leftpad" incident on melpa...

plexus11:05:34

Every day that ends in a y is a leftpad incident on melpa. Some people care very little about keeping api compatibility of their packages.

plexus11:05:45

Which is why with corgi we pin everything

ordnungswidrig11:05:13

I remember colleagues asking whether it's safe to update cider. In parts it's become much more stable.

plexus11:05:37

And it's why I ultimately quit spacemacs, with so much bagage the chance of breaking a package when upgrading is about 50-50

ordnungswidrig11:05:55

Same for me. Plus the bloat.

plexus11:05:57

Yes, cider has had some rough times in this regard but recent years it's been much better

plexus11:05:33

Grumble grumble sesman

ordnungswidrig11:05:03

I'm so confused now. Switching between clojure, elisp, python and scala within 15min is too much for my poor brain.

ordnungswidrig11:05:25

Why can't just all language use some sane non-syntax? (thing arg1 arg2 arg2) is all you need.

1
πŸ‘ 1
borkdude12:05:02

> Waiting for @U04V15CAJ to save us once again... We need babashaka but for emacs. #joyridefor vscode For nvim there is fennel which is maybe close enough - SCI could be supported via RPC. For emacs, we could have dynamic native modules and expose SCI, but it seems a bit painful to develop those. My emacs config is like the washing machine room in my house: I have the paint ready to finally colour the walls, but I'd rather spend as little time in there as possible. I have been managing my elpa dependencies in a git repo for a decade now and this primitive method worked fine.

ordnungswidrig12:05:51

I feel you πŸ˜‰

ordnungswidrig12:05:11

Too many things to finish in my house

otfrom13:05:31

for all the pain of emacs - there have only been 2 lisps I've ever been able to get real work done in - clojure and emacs lisp. All the others I failed at some point b/c it required me to write a library to do something like parse json and that was considered trivial b/c I grokked all of SICP beforehand or something.

otfrom13:05:48

the sheer archaeology of elisp is what keeps it alive

ordnungswidrig13:05:23

I like that I've used the term "software archaeology" maybe 10 years ago and it seams to become more widespread.

ordnungswidrig13:05:48

added to readling list

πŸ‘ 1