This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-20
Channels
- # adventofcode (7)
- # announcements (1)
- # aws (1)
- # babashka (127)
- # bangalore-clj (1)
- # beginners (54)
- # calva (8)
- # cider (12)
- # clj-http (2)
- # clj-kondo (8)
- # cljdoc (10)
- # cljs-dev (2)
- # clojure (48)
- # clojure-australia (14)
- # clojure-dev (6)
- # clojure-europe (105)
- # clojure-nl (6)
- # clojure-taiwan (1)
- # clojure-uk (62)
- # clojurebridge (1)
- # clojurescript (112)
- # code-reviews (4)
- # cursive (20)
- # data-science (1)
- # depstar (1)
- # events (8)
- # fulcro (6)
- # graalvm (11)
- # honeysql (2)
- # introduce-yourself (3)
- # jobs (1)
- # jobs-discuss (30)
- # malli (23)
- # nrepl (4)
- # off-topic (47)
- # pedestal (22)
- # polylith (10)
- # portal (3)
- # re-frame (16)
- # reitit (9)
- # releases (3)
- # rewrite-clj (1)
- # ring (1)
- # spacemacs (1)
- # tools-deps (12)
- # xtdb (7)
Good morning!
Morning!
looking back on the emacs combos above, I realise that even after 25 years of use I'm still an emacs n00b
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
it's getting really better lately as well, I think the changes in maintainers helped quite a bit
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
I tend also to slim down the dependencies more, or use more lightweight ones (like from helm/ivy to consult/vertico/embark/orderless)
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
I learned (just enough) emacs because there was no better environment for clojure at the time ;)
I use the GitHub Dark theme in VS Code. If it's available in whatever editor you use, I can recommend.
I still edit Java in emacs regularly, with manual compiles on the command line for "feedback"...
oh @mpenet i hadn't actually seen straight.el before, now i've got some stuff to play with
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
it will fetch the repos from the source and build them instead of relying on packages from melpa (it can read melpa metadata tho)
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
if you use use-package it's essentially copying a block of 10 lines and restarting emacs to make it work
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
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.
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
@mpenet that sounds neat. I'm still in my "emacs childhood" using prelude. this loads packages on demand.
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.
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. 😄
I am also using Prelude (combined with use-package
). Previously I was using Doom, which is built on top of straight.el
if you need inspiration for straight.el + use-package https://github.com/mpenet/emax/
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
so, what is the advantage of straight.el over using package.el? Just a different kind of pinning?
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 🙂
slightly annoying that it uses :straight
rather than :ensure
to fetch things in use-package, but that is just a search and replace
you only use :straight when it's not on melpa or when the name differs from the package
I only used it a couple of time to fetch bleeding edge stuff that was not on any repo yet
I just have my giant blob of git repo with emacs packages as backup when I want to roll back
I might be doing it wrong, but my emacs config has plenty of
(prelude-require-package 'foo)
(use-package foo
...)
my slightly out of date org-mode version: https://github.com/otfrom/otfrom-org-emacs (uses use-package)
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
use-package should actually speed up emacs start up time as you can defer the loading of lots of things until you need them
This is impressive: https://djblue.github.io/portal/ Just paste some EDN or Transit in there and explore stuff