Fork me on GitHub
#clojure-europe
<
2021-05-20
>
pez05:05:08

Morning!

dharrigan06:05:04

Maidin mhaith

simongray06:05:59

good morning

jmayaalv07:05:30

buenos dias!

otfrom09:05:35

looking back on the emacs combos above, I realise that even after 25 years of use I'm still an emacs n00b

borkdude10:05:06

me too, and I strive to stay one as I am quite fine with using only a few features, it already makes emacs worthwhile for me

otfrom10:05:56

I do believe that emacs rewards investment

otfrom10:05:22

(unlike many other IDEs I've had a go at over the years, like say VisualAge)

thomas11:05:04

you are showing your Age there, and not just visually 😉

😁 2
otfrom11:05:15

Mock me again and I'll beat you with my false teeth

thomas15:05:57

I love you too

❤️ 2
mpenet11:05:07

yep, it works for pretty much anything too (at least the stuff I am exposed to)

mpenet11:05:43

it's getting really better lately as well, I think the changes in maintainers helped quite a bit

mccraigmccraig11:05:37

while frustrated with emacs instability, i tried VSCode a few months ago... i lasted a couple of weeks before the general UI inconsistency frustration got to me, and i put some effort into trying different emacs builds until i found something more stable. now everything is a buffer again, helm is my single route to finding stuff, and i'm much happier

mpenet11:05:06

I solved stability issues a long time ago moving to straight.el personally

mpenet11:05:29

I tend also to slim down the dependencies more, or use more lightweight ones (like from helm/ivy to consult/vertico/embark/orderless)

mpenet11:05:56

also having the whole conf on a single file is quite nice/portable

borkdude11:05:16

I like the idea of VSCode, but somehow I find emacs more ergonomic, and you're not actually typing in a browser with more latency

borkdude11:05:39

Also I find the colors in VSCode a bit "toy" like. I'm sure you can change them.

cider 3
mpenet11:05:15

it's a much better editor for beginners, among other things

mpenet11:05:33

I wouldn't throw emacs at someone starting up their journey into programming

mpenet11:05:48

(happened to me, kind of)

borkdude11:05:42

I learned (just enough) emacs because there was no better environment for clojure at the time ;)

pez11:05:01

I use the GitHub Dark theme in VS Code. If it's available in whatever editor you use, I can recommend.

mpenet11:05:34

got introduced to it at uni, with java 1.1 (I think), a great combo heh

mpenet11:05:47

not sure which one I hated the most originally

borkdude11:05:54

@pez what is the exact name of the extension?

borkdude11:05:19

I still edit Java in emacs regularly, with manual compiles on the command line for "feedback"...

pez11:05:23

GitHub theme maybe? I'm afk.

borkdude11:05:29

I tried the Java Tools in VSCode and omg, they are quite good

mpenet11:05:35

@borkdude I guess now it's not so bad with lsp

borkdude11:05:34

@pez found it, thanks

borkdude11:05:56

I don't know what it is, but emacs just looks better to me, the rendering

mccraigmccraig11:05:34

oh @mpenet i hadn't actually seen straight.el before, now i've got some stuff to play with

borkdude11:05:40

instead of dealing with various kinds of package managers, I use package.el and check everything into a git repo :P. This has worked for me since 2013 or so

borkdude11:05:59

I have seen various package manager things come and go since then

borkdude11:05:38

of course I don't score high on the dotfiles appreciation index

mpenet11:05:24

straight.el uses use-package, so you don't have to change anything

mpenet11:05:58

it will fetch the repos from the source and build them instead of relying on packages from melpa (it can read melpa metadata tho)

mpenet11:05:06

works with elpa & co too

mpenet11:05:14

then the big win is the version pinning

mpenet11:05:21

you don't have that with package.el

mpenet11:05:29

hence the breakage

mpenet11:05:06

from there you can use this lock file on all your machines and have an env that's reproducible without having to carry all the dependencies around

mpenet11:05:08

it's quite neat

mpenet11:05:18

plus other stuff (like easy upgrades/rollback & co)

borkdude11:05:42

cool, I should try it when my blunt workaround will upset me one day

mpenet11:05:16

if you use use-package it's essentially copying a block of 10 lines and restarting emacs to make it work

👍 2
borkdude11:05:48

hmm, a few years ago a colleague of mine refactored our codebase where a lot of functions received the entire system as an argument. I felt that this wasn't the correct approach, it felt like "too much power". But I didn't have a good argument to back it up, except that I was inspired by Haskell at the time to write functions with types that made sense to that function (only the relevant bits as the input, nothing more). Turns out this was in the component documentation all along: https://github.com/stuartsierra/component/blob/master/README.md#no-function-should-take-the-entire-system-as-an-argument facepalm

dominicm14:05:20

This is a form of coupling called "stamp coupling".

dominicm15:05:01

https://en.wikipedia.org/wiki/Coupling_%28computer_programming%29#Types_of_coupling > Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts (e.g., passing a whole record to a function that needs only one field of it). > In this situation, a modification in a field that a module does not need may lead to changing the way the module reads the record.

mpenet11:05:55

i went from submodules to versioning everything to package.el to this, and my emacs conf is now basically a single conf file + the lock file

borkdude12:05:04

but it's not a big deal, it works fine actually ;)

borkdude12:05:49

@mpenet that sounds neat. I'm still in my "emacs childhood" using prelude. this loads packages on demand.

borkdude12:05:59

I wonder if @bozhidar has some ideas to adopt use-package or straight.el in that

mpenet12:05:42

he uses use-package for sure, not sure about straight

bozhidar12:05:34

It's on my todo to use use-package in Prelude, although for the end users there's no problem to use it even today.

bozhidar12:05:42

Prelude using use-package internally won't really improve anything for them and might even make a bit more obscure the order in which the package initialization happens. Okay, it might increase a bit the boot time, but I start Emacs like once in a month, so I guess it's not a big deal for most people. 😄

borkdude12:05:14

@bozhidar is there a way to pin versions on prelude?

djm12:05:15

I am also using Prelude (combined with use-package). Previously I was using Doom, which is built on top of straight.el

mpenet12:05:32

if you need inspiration for straight.el + use-package https://github.com/mpenet/emax/

mpenet12:05:06

pinning looks like this in straight https://github.com/mpenet/emax/blob/master/straight/versions/default.el you can generate this via a command inside emacs when you're happy with your setup

otfrom12:05:50

so, what is the advantage of straight.el over using package.el? Just a different kind of pinning?

mpenet12:05:47

you cannot select the version of your packages with melpa, you either get "stable" or what's in regular melpa. straight will fetch from git to your machine, package.el will fetch an archive. Then straight will build packages from sources, could be latest or could be whatever ref you like to use from the "lock file". Then there are a few utils to make life easier with updates/rollback & co. But the readme makes a better sales pitch than me: https://github.com/raxod502/straight.el#features 🙂

otfrom12:05:31

ah, so pinning to a version rather than to a package repo (I think)

mpenet12:05:51

with straight it's pin to a git ref

otfrom12:05:07

so sort of like git in deps.edn then

otfrom12:05:20

cool. I can see some advantages to that

otfrom12:05:35

slightly annoying that it uses :straight rather than :ensure to fetch things in use-package, but that is just a search and replace

mpenet12:05:39

usually you don't have to use :straight at all

mpenet12:05:54

it will read the metadata from melpa to find where to get the repo from

mpenet12:05:23

you only use :straight when it's not on melpa or when the name differs from the package

mpenet12:05:31

(almost never)

mpenet12:05:45

I only used it a couple of time to fetch bleeding edge stuff that was not on any repo yet

mpenet13:05:50

oh but that's because I set straight-use-package-by-default to true

mpenet13:05:56

so I never have to do it

otfrom13:05:54

ah, and that does the downloading for you automagically?

mpenet13:05:52

and building

mpenet13:05:17

it's a bit like nix/guix but scoped to emacs

👍 2
bozhidar12:05:04

I never needed to pin anything, but it's doable.

borkdude12:05:39

to be honest, I also never pin

borkdude12:05:00

I just have my giant blob of git repo with emacs packages as backup when I want to roll back

djm12:05:53

I might be doing it wrong, but my emacs config has plenty of

(prelude-require-package 'foo)
(use-package foo
...)

otfrom12:05:58

my slightly out of date org-mode version: https://github.com/otfrom/otfrom-org-emacs (uses use-package)

otfrom12:05:08

should work with an empty elpa directory. It downloads and compiles everything from elpa/melpa/melpa-stable it needs. I sometimes blow away my elpa dir if things like macro changes make the compilation dirty

otfrom12:05:55

use-package should actually speed up emacs start up time as you can defer the loading of lots of things until you need them

genRaiy13:05:27

morning #clojure

otfrom13:05:42

Sorry, this is an Emacs channel now

cider 6
🙈 2
borkdude13:05:18

This is impressive: https://djblue.github.io/portal/ Just paste some EDN or Transit in there and explore stuff

portal 4
borkdude13:05:50

It can even view "CSV" 😂

genRaiy15:05:35

fans of @djblue are in for a pleasant defn surprise

metal 14