Logs: liberachat/#haskell
| 2021-07-06 19:43:50 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 2021-07-06 19:43:53 | <ahdyt> | edmundnoble do u prefer cabal or stack? |
| 2021-07-06 19:43:58 | <edmundnoble> | cabal |
| 2021-07-06 19:44:04 | <ahdyt> | and how you init a project with ekmet's prelude? |
| 2021-07-06 19:44:14 | panda_man | is now known as koala_man |
| 2021-07-06 19:44:18 | <ahdyt> | by manually doing the "tricks" right? |
| 2021-07-06 19:44:20 | <edmundnoble> | Do you want the more featureful one? |
| 2021-07-06 19:44:24 | <ahdyt> | or you create a script? |
| 2021-07-06 19:44:38 | <ahdyt> | nope, I think something between cabal and stack is better |
| 2021-07-06 19:44:56 | <ahdyt> | stack is strange like it's requires /root dir ? for what? |
| 2021-07-06 19:45:08 | <ahdyt> | I try stack in nix-on-droid |
| 2021-07-06 19:45:08 | × | yauhsien quits (~yauhsien@61-231-39-135.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 2021-07-06 19:45:10 | <edmundnoble> | Do you want the more featureful of ekmett's favored preludes |
| 2021-07-06 19:45:14 | <edmundnoble> | Or the more minimalist |
| 2021-07-06 19:45:16 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-07-06 19:45:19 | <edmundnoble> | Still usable |
| 2021-07-06 19:46:00 | <edmundnoble> | If you want the more minimalist one, in your cabal file, make sure you have `build-depends: base ^>= <version>` with your GHC version's corresponding `base` version subbed in for `<version>` |
| 2021-07-06 19:46:00 | × | ahdyt quits (~ahdyt@103.105.35.78) (Quit: Client closed) |
| 2021-07-06 19:46:17 | → | ahdyt joins (~ahdyt@103.105.35.78) |
| 2021-07-06 19:46:17 | <ahdyt> | both? I don't mind the featurful or the minimalist, my focus is on how you configure new project to your needs. |
| 2021-07-06 19:46:40 | <edmundnoble> | After that, you will have access to it in all files by default |
| 2021-07-06 19:46:41 | <ahdyt> | it's actually the default? haha |
| 2021-07-06 19:46:44 | <monochrom> | I think "cabal init" adds the base dependency for you. |
| 2021-07-06 19:46:47 | <edmundnoble> | :^) |
| 2021-07-06 19:46:54 | <ahdyt> | haha yeah true it is |
| 2021-07-06 19:46:59 | <sclv> | yeah i just cabal init --interactive |
| 2021-07-06 19:47:03 | <sclv> | and do nothing else special |
| 2021-07-06 19:47:14 | <sclv> | add deps and flags as i go |
| 2021-07-06 19:47:17 | <edmundnoble> | If you want `lens`, you can add `lens` to your dependencies and import `Control.Lens` wherever ya want |
| 2021-07-06 19:47:21 | <ahdyt> | ok so you don't bother doing the tricks then |
| 2021-07-06 19:47:30 | <edmundnoble> | Sorry, I dunno which tricks you mean |
| 2021-07-06 19:47:38 | <ahdyt> | base and lens? that's ekmett's favorite? nice. |
| 2021-07-06 19:47:55 | <edmundnoble> | It was last time I heard him say, yeah |
| 2021-07-06 19:48:07 | <sclv> | in the scheme of things i spend an order of magnitude more time thinking about the code to write than writing it, and in turn an order of magnitude more time writing the code than wrangling imports and an order of magnitude more time wrangling imports than futzing with my cabal file deps |
| 2021-07-06 19:48:09 | <ahdyt> | tricks like dropping default Prelude to something else, wheter it's Relude or ClassyPrelude, or NoPreludeAtAll |
| 2021-07-06 19:48:30 | <sclv> | i just use prelude because i don't want to have to worry about depending on someone else maintaining their fancy prelude |
| 2021-07-06 19:48:47 | <sclv> | I _do_ make a point often of importing it hiding the partial functions, and depending on `safe` |
| 2021-07-06 19:49:03 | <sclv> | also for $WORK we have a standard company prelude I try to make use of -- but i always forget what's in it, lol |
| 2021-07-06 19:49:06 | × | jolly quits (~jolly@208.180.97.158) (Ping timeout: 252 seconds) |
| 2021-07-06 19:49:47 | <sclv> | (at this point I don't need to explicitly hide partial functions anymore though, from years of practice i've trained myself out of using them even when they're lying around) |
| 2021-07-06 19:50:12 | × | MQ-17J quits (~MQ-17J@8.21.10.15) (Ping timeout: 252 seconds) |
| 2021-07-06 19:50:24 | <ahdyt> | sclv your company mostly use stack or cabal? |
| 2021-07-06 19:50:40 | <sclv> | we use nix to manage everything, and cabal v1-build on top of it |
| 2021-07-06 19:50:52 | <ahdyt> | ah okay. |
| 2021-07-06 19:50:56 | <davean> | oh wow, you' |
| 2021-07-06 19:50:58 | <davean> | re still on v1? |
| 2021-07-06 19:51:00 | <sclv> | for personal projects i use cabal v2-build |
| 2021-07-06 19:51:04 | davean | looks at sclv |
| 2021-07-06 19:51:13 | <sclv> | davean: yeah well the v2 / nix integration story isn't perfect |
| 2021-07-06 19:51:26 | <ahdyt> | oh yeah I occured this when using stack |
| 2021-07-06 19:51:29 | <sclv> | we sort of know how to do it now, and have been intending to make the shift, but its tech debt |
| 2021-07-06 19:51:34 | <davean> | True, I just expected you to have the story tou wanted done! |
| 2021-07-06 19:51:46 | <ahdyt> | atomicFileCreate - c_safe_linkat - anonymous: permission denied (Operation not permitted) |
| 2021-07-06 19:51:56 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-07-06 19:51:59 | <davean> | I didn't know your didn't pay your tech CC bill until the deadline was looming! |
| 2021-07-06 19:52:03 | <ahdyt> | I look into the source it's trying to write something into root |
| 2021-07-06 19:52:04 | <davean> | This is a whole new side of you |
| 2021-07-06 19:52:09 | <sclv> | i think we worked out the details of how to implement it, but didn't do it yet |
| 2021-07-06 19:52:21 | <sclv> | i mean i'm not on the build/devops team, lol. |
| 2021-07-06 19:53:00 | <slowButPresent> | ahdyt: stack doesn't require root if you are willing to manage the dependencies yourself https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2 |
| 2021-07-06 19:53:03 | <sclv> | like this is the "i'll use what's in front of me until the other team gets around to fixing it" side |
| 2021-07-06 19:53:51 | <ahdyt> | slowButPresent oh, so I missing stack deps? |
| 2021-07-06 19:54:13 | <qrpnxz> | slowButPresent, i think managing deps is exactly what someone downloading a dep manager doesn't want to do |
| 2021-07-06 19:54:17 | × | boxscape_ quits (~boxscape_@p4ff0ba7a.dip0.t-ipconnect.de) (Quit: Connection closed) |
| 2021-07-06 19:54:27 | <slowButPresent> | ahdyt: no idea. but it can be done |
| 2021-07-06 19:55:19 | <ahdyt> | qrpnxz yeah I use stack inside nix, but the nix-on-droid one have no root access, strangely the nix on desktop doesn't require root at all. |
| 2021-07-06 19:55:37 | × | AWizzArd quits (~code@gehrels.uberspace.de) (Changing host) |
| 2021-07-06 19:55:37 | → | AWizzArd joins (~code@user/awizzard) |
| 2021-07-06 19:56:18 | <slowButPresent> | qrpnxz: I would guess using stack in ~ does still remove most the managment |
| 2021-07-06 19:56:45 | <slowButPresent> | like on arch / gentoo most of that stuff is installed already |
| 2021-07-06 20:00:34 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 2021-07-06 20:00:39 | <veverak> | h i folks |
| 2021-07-06 20:00:53 | × | jocke-l quits (jocke-l@a.x0.is) (Quit: WeeChat 2.3) |
| 2021-07-06 20:00:54 | <veverak> | I have simple "enum" type: data MT = A | B | C; |
| 2021-07-06 20:01:13 | <veverak> | how to overate over it? basically I want a simple way to create [MT] with instance of each constructor |
| 2021-07-06 20:01:27 | → | jocke-l joins (jocke-l@a.x0.is) |
| 2021-07-06 20:01:35 | <edmundnoble> | `[A..C]` |
| 2021-07-06 20:01:41 | <veverak> | :facepalm: |
| 2021-07-06 20:01:43 | <veverak> | thanks :) |
| 2021-07-06 20:01:46 | <edmundnoble> | Also you will want an `Enum` instance of `MT` |
| 2021-07-06 20:02:02 | <ahdyt> | deriving (Enum) is it possible? |
| 2021-07-06 20:02:26 | <edmundnoble> | Yes |
| 2021-07-06 20:02:32 | <ahdyt> | good then |
| 2021-07-06 20:05:03 | × | juhp quits (~juhp@128.106.188.66) (Ping timeout: 252 seconds) |
| 2021-07-06 20:05:43 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 2021-07-06 20:05:45 | <ahdyt> | https://github.com/fpco/unliftio/blob/master/unliftio/src/UnliftIO/IO/File/Posix.hs#L313 |
| 2021-07-06 20:06:22 | <ahdyt> | the /proc/self/fd/ |
| 2021-07-06 20:06:33 | <janus> | veverak: you can also do [minBound..maxBound] if you derive Bounded |
| 2021-07-06 20:06:39 | <ahdyt> | that's the root path stack use when do stack setup here. |
| 2021-07-06 20:06:45 | → | juhp joins (~juhp@128.106.188.66) |
| 2021-07-06 20:07:18 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-07-06 20:07:29 | <qrpnxz> | slowButPresent, btw i don't ever do sudo for stack so idk lol |
| 2021-07-06 20:07:42 | <qrpnxz> | i think the install script need sudo |
| 2021-07-06 20:07:45 | <qrpnxz> | but i did something |
| 2021-07-06 20:07:50 | <qrpnxz> | that i forget to avoid that |
| 2021-07-06 20:08:04 | <veverak> | yeah, I found 'enumFrom (toEnum 0)`, so I do not have to use Bounded |
| 2021-07-06 20:08:12 | <ahdyt> | `stack setup` prompt you for password or not? haha |
| 2021-07-06 20:08:34 | <qrpnxz> | does not |
| 2021-07-06 20:10:13 | <dsal> | I use stack + nix. Every time I try to use plain cabal, it feels like a time sink. Someday I'll learn the way. |
| 2021-07-06 20:10:35 | × | krz3si quits (~szara@2a02:a31c:853b:b780:df0:1631:dcb9:4e4f) (Read error: Connection reset by peer) |
All times are in UTC.