clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
agigao 2021-05-20T02:57:02.031400Z

Morning

djm 2021-05-20T05:09:22.031700Z

👋

orestis 2021-05-20T05:36:54.031900Z

Morning

pez 2021-05-20T05:50:08.032300Z

Morning!

dharrigan 2021-05-20T06:20:04.032600Z

Maidin mhaith

ordnungswidrig 2021-05-20T06:26:43.032800Z

Good morning!

simongray 2021-05-20T06:56:59.033Z

good morning

javahippie 2021-05-20T06:59:47.033200Z

Morning!

2021-05-20T07:03:30.033400Z

buenos dias!

slipset 2021-05-20T07:45:40.033600Z

morning!

thomas 2021-05-20T09:22:14.033800Z

morning

2021-05-20T09:39:04.034Z

morning

2021-05-20T09:39:35.034500Z

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

borkdude 2021-05-20T10:39:06.035200Z

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

2021-05-20T10:54:56.035500Z

I do believe that emacs rewards investment

2021-05-20T10:55:22.035900Z

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

mpenet 2021-05-20T11:18:07.036500Z

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

mpenet 2021-05-20T11:18:43.037200Z

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

mccraigmccraig 2021-05-20T11:28:37.039900Z

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

mpenet 2021-05-20T11:33:06.040400Z

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

mpenet 2021-05-20T11:34:29.041600Z

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

thomas 2021-05-20T11:35:04.042100Z

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

😁 1
mpenet 2021-05-20T11:35:56.043300Z

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

borkdude 2021-05-20T11:36:16.043800Z

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

borkdude 2021-05-20T11:37:39.044300Z

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

1
mpenet 2021-05-20T11:38:15.044900Z

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

mpenet 2021-05-20T11:38:33.045300Z

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

mpenet 2021-05-20T11:38:48.045700Z

(happened to me, kind of)

borkdude 2021-05-20T11:40:42.047Z

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

pez 2021-05-20T11:41:01.047700Z

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

mpenet 2021-05-20T11:41:34.048600Z

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

mpenet 2021-05-20T11:41:47.049100Z

not sure which one I hated the most originally

borkdude 2021-05-20T11:41:54.049500Z

@pez what is the exact name of the extension?

borkdude 2021-05-20T11:42:19.050600Z

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

pez 2021-05-20T11:42:23.050900Z

GitHub theme maybe? I'm afk.

borkdude 2021-05-20T11:42:29.051300Z

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

mpenet 2021-05-20T11:42:35.051500Z

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

borkdude 2021-05-20T11:43:34.051800Z

@pez found it, thanks

borkdude 2021-05-20T11:43:56.052100Z

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

mccraigmccraig 2021-05-20T11:44:34.052800Z

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

borkdude 2021-05-20T11:45:40.053500Z

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

borkdude 2021-05-20T11:45:59.053800Z

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

borkdude 2021-05-20T11:46:38.054200Z

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

mpenet 2021-05-20T11:53:24.056300Z

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

mpenet 2021-05-20T11:53:58.057100Z

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

mpenet 2021-05-20T11:54:06.057300Z

works with elpa & co too

mpenet 2021-05-20T11:54:14.057600Z

then the big win is the version pinning

2021-05-20T11:54:15.057700Z

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

mpenet 2021-05-20T11:54:21.058Z

you don't have that with package.el

2021-05-20T11:54:23.058200Z

😘

mpenet 2021-05-20T11:54:29.058500Z

hence the breakage

mpenet 2021-05-20T11:55:06.059300Z

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

mpenet 2021-05-20T11:55:08.059500Z

it's quite neat

mpenet 2021-05-20T11:55:18.059900Z

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

borkdude 2021-05-20T11:55:42.060300Z

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

mpenet 2021-05-20T11:56:16.060900Z

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

👍 1
borkdude 2021-05-20T11:58:48.063700Z

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 🤦

dominicm 2021-05-22T14:40:20.132900Z

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

borkdude 2021-05-22T14:40:50.133200Z

explain

dominicm 2021-05-22T15:20:01.133600Z

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.

mpenet 2021-05-20T11:58:55.064100Z

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

borkdude 2021-05-20T12:00:04.064600Z

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

borkdude 2021-05-20T12:00:49.065400Z

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

borkdude 2021-05-20T12:01:59.066Z

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

mpenet 2021-05-20T12:02:42.066400Z

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

bozhidar 2021-05-20T12:03:34.067600Z

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.

bozhidar 2021-05-20T12:04:42.069900Z

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. 😄

borkdude 2021-05-20T12:05:14.070500Z

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

djm 2021-05-20T12:05:15.070600Z

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

mpenet 2021-05-20T12:06:32.071400Z

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

bozhidar 2021-05-20T12:07:04.071800Z

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

borkdude 2021-05-20T12:08:39.072200Z

to be honest, I also never pin

borkdude 2021-05-20T12:09:00.072700Z

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

mpenet 2021-05-20T12:11:06.072800Z

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

djm 2021-05-20T12:27:53.075200Z

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

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

2021-05-20T12:27:58.075400Z

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

2021-05-20T12:29:08.076600Z

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

2021-05-20T12:30:55.077200Z

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

2021-05-20T12:34:50.077300Z

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

mpenet 2021-05-20T12:38:47.077500Z

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 🙂

2021-05-20T12:39:31.077800Z

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

mpenet 2021-05-20T12:39:51.078Z

with straight it's pin to a git ref

2021-05-20T12:40:07.078200Z

so sort of like git in deps.edn then

mpenet 2021-05-20T12:45:36.078400Z

yes

2021-05-20T12:48:20.078600Z

cool. I can see some advantages to that

2021-05-20T12:51:35.078800Z

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

mpenet 2021-05-20T12:58:39.079Z

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

mpenet 2021-05-20T12:58:54.079200Z

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

mpenet 2021-05-20T12:59:23.079400Z

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

mpenet 2021-05-20T12:59:31.079600Z

(almost never)

mpenet 2021-05-20T12:59:45.079800Z

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

mpenet 2021-05-20T13:00:50.080Z

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

mpenet 2021-05-20T13:00:56.080200Z

so I never have to do it

2021-05-20T13:04:54.080400Z

ah, and that does the downloading for you automagically?

raymcdermott 2021-05-20T13:09:27.080900Z

morning #clojure

mpenet 2021-05-20T13:09:49.081Z

yes

mpenet 2021-05-20T13:09:52.081200Z

and building

mpenet 2021-05-20T13:10:17.081400Z

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

👍 1
2021-05-20T13:41:42.081600Z

Sorry, this is an Emacs channel now

3
🙈 1
borkdude 2021-05-20T13:43:18.082100Z

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

2
borkdude 2021-05-20T13:43:50.082400Z

It can even view "CSV" 😂

thomas 2021-05-20T15:01:57.082700Z

I love you too

❤️ 1
raymcdermott 2021-05-20T15:31:35.083400Z

fans of @djblue are in for a pleasant defn surprise

🤘 7