Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 899 900 901 902 903 904 905 906 907 908 909 .. 1850
184,995 events total
2022-10-15 10:44:29 AskYourself[m] joins (~ask-yours@2001:470:69fc:105::2:9793)
2022-10-15 10:44:29 zim0369[m] joins (~zim0369ma@2001:470:69fc:105::2:5d43)
2022-10-15 10:44:29 quarkQuark[m] joins (~quarkquar@2001:470:69fc:105::2:46e2)
2022-10-15 10:44:29 mikevan[m] joins (~mikevanto@2001:470:69fc:105::2:7ef5)
2022-10-15 10:44:30 floweynt[m] joins (~floweyyag@2001:470:69fc:105::2:86b7)
2022-10-15 10:44:30 devhashtag[m] joins (~devhashta@2001:470:69fc:105::2:85a2)
2022-10-15 10:44:30 iamtheonewiththi joins (~iamtheone@2001:470:69fc:105::2:8a9b)
2022-10-15 10:44:30 uj[m] joins (~ujmatrixo@2001:470:69fc:105::2:888f)
2022-10-15 10:44:31 ChaoticMist[m] joins (~gilganixm@2001:470:69fc:105::3d09)
2022-10-15 11:04:31 <dminuoso> Phaseditto: the self recompilation does work, but it needs a bit of a holding hand.
2022-10-15 11:04:37 Tisoxin joins (~ikosit@user/ikosit)
2022-10-15 11:04:37 <dminuoso> That is, it doesnt work out of the box
2022-10-15 11:04:46 <Phaseditto> That's the first time i am hearing that
2022-10-15 11:04:58 Solid[m] joins (~slot-matr@2001:470:69fc:105::1:a84)
2022-10-15 11:04:58 liskin[m] joins (~liskinmat@2001:470:69fc:105::768)
2022-10-15 11:05:00 <dminuoso> Phaseditto: Well so it depends. If you use cabal v1-style it should work out of the box.
2022-10-15 11:05:07 <dminuoso> With v2-style you will have to provide a custom build script
2022-10-15 11:05:40 <Phaseditto> huh. Excuse my lack of cabal knowledge, i don't know what the difference means and how it comes to be
2022-10-15 11:05:57 <dminuoso> (Or rather with v2-style you will most likely get problems and headaches)
2022-10-15 11:06:29 <dminuoso> Phaseditto: So in v1-install, packages are installed into a global place (think of cabal acting as a scoped package manager on itself this way).
2022-10-15 11:08:00 <dminuoso> v2-mode works very differently, as while cabal will manage packages in a global store, they are in principle made available to each project directory, but there's not a comparable `install` mode that behaves as nicely.
2022-10-15 11:08:23 <Phaseditto> Is there any drawbacks to the v1 mode?
2022-10-15 11:08:45 <dminuoso> If you dont really use Haskell probably not much, except that at some point in the future it will not be supported anymore.
2022-10-15 11:09:18 <Phaseditto> hm, would be a shame if i had to run my WM on EOL software
2022-10-15 11:09:20 <dminuoso> Honestly I would just write a custom build script, its not too much extra effort and gives you full control
2022-10-15 11:09:31 <Phaseditto> if you say so
2022-10-15 11:09:48 <Phaseditto> i am no stranger to programming and getting used to new syntax so that should not pose much of an issue
2022-10-15 11:10:47 <dminuoso> Note that using a custom build script might make xmonad restarts a bit slower, unless you spend some extra work. Especially if the code has not changed.
2022-10-15 11:11:01 <dminuoso> Its nothing major, but I dont want to sell this as "just benefits without downsides" to you
2022-10-15 11:11:40 <Phaseditto> is that only on rebuilds or on any restart?
2022-10-15 11:12:01 <dminuoso> On restart too, but those are fixable
2022-10-15 11:12:03 <dminuoso> Note:
2022-10-15 11:12:05 <dminuoso> https://xmonad.org/INSTALL.html#custom-build-script
2022-10-15 11:12:07 <dminuoso> At the bottom
2022-10-15 11:12:31 <Phaseditto> i see, then that is absolutely negligible for me if i can "make it right"
2022-10-15 11:12:35 <dminuoso> Yes.
2022-10-15 11:13:16 <dminuoso> If you use v2-build in the build script, the other cases are covered too.
2022-10-15 11:13:38 <Phaseditto> the documentation probably explains this thoroughly i presume
2022-10-15 11:13:54 <dminuoso> Not really
2022-10-15 11:13:57 <Phaseditto> oh well
2022-10-15 11:14:01 <dminuoso> So roughly the interface is as follows:
2022-10-15 11:15:09 <dminuoso> Give me a few minutes, Ill make you a sample repository to work with.
2022-10-15 11:15:34 <Phaseditto> Appreciate the effort, thanks
2022-10-15 11:38:26 <dminuoso> Phaseditto: https://gitlab.com/dminuoso/example-xmonad
2022-10-15 11:38:44 <dminuoso> Phaseditto: Note, that this properly uses a `.cabal` file, which is used to declare things like dependencies.
2022-10-15 11:39:08 <dminuoso> Outside of nixos, this is probably what I would universally favour over all other solutions (unless you happen to be a stack user already)
2022-10-15 11:39:33 <dminuoso> Ah you probably want to use something like `set -e -o pipefail` or explicit error checking in the build script
2022-10-15 11:40:10 <Phaseditto> Thanks. This will probably take some time and tweaking on my side as i am not at all familiar with cabal
2022-10-15 11:40:25 <dminuoso> One additional benefit of this style is, you can use `haskell-language-server` to interactively write your program, or you can use `ghcide`, or just manual `cabal build` to compile your program for validity, rather than restarting xmonad every time
2022-10-15 11:40:32 <dminuoso> Phaseditto: Honestly, it wont. :)
2022-10-15 11:40:41 <Phaseditto> If you say so :D
2022-10-15 11:40:43 <dminuoso> If you just take this, the only thing you must modify is two things:
2022-10-15 11:41:04 <dminuoso> If your xmonad program is split across multiple modules, declare each such module in other-modules: https://gitlab.com/dminuoso/example-xmonad/-/blob/main/my-xmonad.cabal#L30
2022-10-15 11:41:13 <dminuoso> (remove -- comment, and declare module names (not filenames)
2022-10-15 11:41:37 <dminuoso> See https://gitlab.com/wobcom/haskell/powerdns-gerd/-/blob/master/powerdns-gerd.cabal#L61-66 for example
2022-10-15 11:42:01 <dminuoso> And, if you want to use additional haskell packages from hackage, delcare them accordingly under `build-depends` (with or without version constraints as you see fit)
2022-10-15 11:42:21 <dminuoso> Beyond that, nothing needs to be done
2022-10-15 11:43:00 <dminuoso> Oh and you probably have to adapt the `base` constraint.
2022-10-15 11:44:03 <Phaseditto> not the most recent version i presume
2022-10-15 11:44:27 <dminuoso> Honestly, you can just remove it entirely
2022-10-15 11:44:34 <dminuoso> the constraint, but not the base dependency
2022-10-15 11:44:39 <dminuoso> let me make those fixes
2022-10-15 11:44:45 <Phaseditto> Much appreciated
2022-10-15 11:45:10 <dminuoso> Done
2022-10-15 11:45:32 <dminuoso> So all you have to do, is manage dependencies under `build-depends` and modules other than Main under `other-modules`
2022-10-15 11:45:54 <dminuoso> Note, that if you ever want to do update of your dependencies, you have to run a `cabal update` to update its hackage index.
2022-10-15 11:46:07 <dminuoso> (This applies to all versions that do not use your system package manager)
2022-10-15 11:46:25 <Phaseditto> cabal update is more stomachable than updating DWM, trust me
2022-10-15 11:46:29 <dminuoso> :)
2022-10-15 11:46:38 <dminuoso> It doesnt really do anything beyond just fetching the index
2022-10-15 11:46:50 <dminuoso> Its the subsequent `build` (or `cabal build`) invocation that will compute a new build plan
2022-10-15 11:47:05 <dminuoso> Do take note, that you have to supply all X11 dependencies yourself
2022-10-15 11:47:17 <dminuoso> You can inspect the `shell.nix` file to get an idea of all required native libraries.
2022-10-15 11:47:30 <Phaseditto> I switched to DWM for the meantime since that is the only other WM i can bastardize into behaving like xmonad but i am tired of patching the same shit in for newer versions, or get in newer version changes onto my patched DWM
2022-10-15 11:47:40 <dminuoso> (They may or may not be present already, but I just want to point this out)
2022-10-15 11:48:05 <Phaseditto> With X11 deps you mean the deps that my system has via xbps right?
2022-10-15 11:48:17 Digit joins (~user@user/digit)
2022-10-15 11:48:21 <dminuoso> Well, take a look at the shell.nix
2022-10-15 11:48:31 <Phaseditto> ah gotcha
2022-10-15 11:48:40 <Phaseditto> yeah that should be easy
2022-10-15 11:48:49 <Phaseditto> So: Install cabal on my Void spinup, declare potential modules and potential hackage deps, build Xmonad and i am golden, correct?
2022-10-15 11:49:10 <dminuoso> If you want extra painless installation of both cabal and GHC, install both via `ghcup`
2022-10-15 11:49:24 <dminuoso> (But I do not know whether that works on Void, give it a try perhaps?)
2022-10-15 11:49:39 <dminuoso> Wouldnt trust package manager maintainers to package GHC up properly
2022-10-15 11:50:56 <Phaseditto> I will certainly give it a try later today. For my understanding this type of setup is for the most part system independant, as long as cabal and GHC are properly installed
2022-10-15 11:51:42 <dminuoso> The thing is, if they are provided by your system package manager, there may be a number of additional problems
2022-10-15 11:52:09 <dminuoso> Like, will they install additional packages? Screw around with the boot libraries inside GHC?
2022-10-15 11:52:15 <dminuoso> Or apply random patches?
2022-10-15 11:52:20 <dminuoso> Lag behind in versions?
2022-10-15 11:53:45 <dminuoso> But if you prefer them system installed its probably fine?
2022-10-15 11:53:50 <Phaseditto> Just as an example: Cabal has the cabal-install package and GHC is version 9.0.2_1 on Void. I know hard to say if that indicates any compatibility.
2022-10-15 11:55:21 <dminuoso> Well Ive shared my opinion and recommendation - but its just that.
2022-10-15 11:55:31 <dminuoso> Your decision in the end. :)
2022-10-15 11:55:52 <dminuoso> The GHC version is not much out of date, that version was released about a year ago.
2022-10-15 11:56:32 <Phaseditto> Appreciate the effort. I will try it later today and see how it works out for me. One thing though: The install documentation mentiones stack, any opinions about that?
2022-10-15 11:56:36 <dminuoso> Most packages on hackage will work fine with up to 8.6.4 from experience
2022-10-15 11:56:44 tremon joins (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl)
2022-10-15 11:57:00 <dminuoso> So `stack` is an alternative approach with a different mindset.
2022-10-15 11:57:23 <Phaseditto> I will see what works and what breaks. I would try with default xmonad and then try my own configuration, if everything works, cool, if not i will iteratively remove something until it works
2022-10-15 11:57:37 <dminuoso> I dont like it, I dont use it, and I think many arguments you will find on the internet are from a time before cabal-install v2-commands

All times are in UTC.