Logs: liberachat/#haskell
| 2021-06-17 12:31:20 | → | nschoe joins (~quassel@178.251.84.79) |
| 2021-06-17 12:31:52 | × | elf_fortrez quits (~elf_fortr@adsl-64-237-239-58.prtc.net) (Quit: Client closed) |
| 2021-06-17 12:34:59 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 252 seconds) |
| 2021-06-17 12:35:36 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 2021-06-17 12:36:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-17 12:36:24 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-06-17 12:36:38 | × | stefan-_ quits (~cri@42dots.de) (Ping timeout: 252 seconds) |
| 2021-06-17 12:40:14 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 2021-06-17 12:40:41 | → | stefan-_ joins (~cri@42dots.de) |
| 2021-06-17 12:41:32 | → | ukari joins (~ukari@user/ukari) |
| 2021-06-17 12:42:37 | × | jneira[m] quits (~jneira@214.red-176-87-57.dynamicip.rima-tde.net) (Remote host closed the connection) |
| 2021-06-17 12:44:41 | → | ente_ joins (~ente@p200300dc5f4037016fbea028d47fea8e.dip0.t-ipconnect.de) |
| 2021-06-17 12:45:02 | → | elf_fortrez joins (~elf_fortr@adsl-64-237-239-58.prtc.net) |
| 2021-06-17 12:46:44 | <ente_> | I am very new to haskell (although I have used other functional languages quite a bit) and would like to get started developing web apps (JSON REST APIs for now) in haskell. I have found ihp (which I could not install) and yesod for which I can not find a small/minimal example. When creating a new project using the quick start guide, there is a whole lot of bloat showcasing all the features and I |
| 2021-06-17 12:46:46 | <ente_> | don't know what is safe to delete etc. If someone could recommend any resources on getting started with yesod for non-html I would be very thankful :) |
| 2021-06-17 12:52:50 | <Taneb> | ente_: for simple HTTP APIs, I'd suggest something like scotty. |
| 2021-06-17 12:53:11 | → | jolly joins (~jolly@208.180.97.158) |
| 2021-06-17 12:53:29 | <Taneb> | If you're comfortable with very fancy type stuff (which if you're new to Haskell you probably won't be), servant is very nice but might be hard to figure out how to use |
| 2021-06-17 12:56:20 | × | fendor quits (~fendor@77.119.131.250.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-06-17 12:57:00 | <Hecate> | Scotty good |
| 2021-06-17 12:57:04 | <Hecate> | Servant good but also very hard |
| 2021-06-17 12:57:15 | <vaibhavsagar[m]> | ente_: are you absolutely set on using yesod? I would also recommend something like Scotty to start you off |
| 2021-06-17 12:57:23 | <vaibhavsagar[m]> | especially if you haven't done much haskell before |
| 2021-06-17 12:57:35 | <ente_> | vaibhavsagar[m]: No, I have no experience so I don't care |
| 2021-06-17 12:57:52 | <[exa]> | ente_: highly recommend scotty, it's the easiest one to start with and usually holds up even for pretty large projects |
| 2021-06-17 12:58:12 | <[exa]> | ente_: especially if it's just REST APIs |
| 2021-06-17 12:58:17 | → | fendor joins (~fendor@77.119.131.250.wireless.dyn.drei.com) |
| 2021-06-17 12:58:30 | <vaibhavsagar[m]> | here's a recent tutorial: https://www.stackbuilders.com/tutorials/haskell/getting-started-with-haskell-projects-using-scotty/ |
| 2021-06-17 12:58:39 | <ente_> | ty <3 |
| 2021-06-17 12:58:50 | <ente_> | that seems nice thank you |
| 2021-06-17 12:59:00 | <ente_> | (the tutorial)_ |
| 2021-06-17 12:59:13 | <exarkun> | is it possible to have stack _optionally_ use nix to manage dependencies, if it is installed, but otherwise just try to build using what's on the system if not? |
| 2021-06-17 12:59:28 | <vaibhavsagar[m]> | no |
| 2021-06-17 12:59:32 | → | nschoe_ joins (~quassel@2a04:cec0:1017:3105:45bb:25b7:a939:c011) |
| 2021-06-17 12:59:37 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 268 seconds) |
| 2021-06-17 12:59:43 | <vaibhavsagar[m]> | we were just talking about this in the Nix Haskell channel |
| 2021-06-17 13:00:02 | <ente_> | is nix popular with haskell? I have seen projects use it |
| 2021-06-17 13:00:09 | <ente_> | Isn't it a linux distro? |
| 2021-06-17 13:00:13 | <merijn> | ente_: There is a small cult |
| 2021-06-17 13:00:18 | <exarkun> | nixos is a linux distro |
| 2021-06-17 13:00:25 | <[exa]> | ente_: re "haskell beginner"-- you might need to get some background on monads to actually be productive with this (the routing is a monad but looks declaratively, and sometimes you'll need liftIO to do useful stuff from within the "Action" environment you get for handling your routes) |
| 2021-06-17 13:00:28 | <vaibhavsagar[m]> | to copy the message I sent there: "Stack's Nix integration uses Nix to provide non-Haskell system dependencies (like `zlib`) in a `nix shell` environment and then executes a normal `stack build` in that environment" |
| 2021-06-17 13:00:33 | <merijn> | ente_: I don't think it's that big, but it's...quite loud :p |
| 2021-06-17 13:00:48 | <merijn> | exarkun: That sounds...counter-intuitive (stack + nix) |
| 2021-06-17 13:01:01 | <vaibhavsagar[m]> | ente_: yes, some haskell devs use it for development |
| 2021-06-17 13:01:06 | <merijn> | exarkun: Because those two are pretty directly opposed |
| 2021-06-17 13:01:19 | <vaibhavsagar[m]> | package management is difficult with many languages |
| 2021-06-17 13:01:24 | <exarkun> | merijn: I didn't add the nix-based features to stack. :) |
| 2021-06-17 13:01:39 | <exarkun> | merijn: I just want it to be easy to build my software whether someone is on nixos or not |
| 2021-06-17 13:01:45 | <[exa]> | ente_: nix is one good way to manage the (problematic) dependencies and rebuilds of packages and have a stable environment; luckily cabal now does most of that right automagically itself |
| 2021-06-17 13:01:55 | <merijn> | exarkun: Wait, which Nix features are you referring too? |
| 2021-06-17 13:02:03 | <merijn> | exarkun: Pretty sure stack does not use Nix at all |
| 2021-06-17 13:02:13 | <exarkun> | merijn: The `nix` stanza that's allowed in stack.yaml |
| 2021-06-17 13:02:23 | <exarkun> | merijn: vaibhavsagar[m] summarized it just above |
| 2021-06-17 13:02:44 | <merijn> | ah, you wanna dynamically decide to toggle it on |
| 2021-06-17 13:02:51 | <merijn> | Doubt that's implemented, tbh |
| 2021-06-17 13:02:55 | <vaibhavsagar[m]> | https://docs.haskellstack.org/en/stable/nix_integration/ |
| 2021-06-17 13:03:14 | → | ddellacosta joins (~ddellacos@86.106.121.100) |
| 2021-06-17 13:03:14 | <vaibhavsagar[m]> | sounds like exarkun wants to use it for some dependencies but not others |
| 2021-06-17 13:03:24 | <exarkun> | I think merijn said it pretty well |
| 2021-06-17 13:03:35 | <vaibhavsagar[m]> | which (as I was just saying in the other channel) would be an excellent feature I would definitely use |
| 2021-06-17 13:03:36 | <exarkun> | I run nixos, I'm happy to have `stack build` require `nix-shell` |
| 2021-06-17 13:04:02 | <exarkun> | Other people don't run nixos, if they want to install zlib-dev with `yum` or whatever, it would be cool if `stack build` still worked |
| 2021-06-17 13:04:16 | <vaibhavsagar[m]> | oh I see |
| 2021-06-17 13:04:18 | <exarkun> | But if I put `nix` in stack.yaml then they can't build anymore unless they install nix (just the tool, not nixos) |
| 2021-06-17 13:04:39 | <vaibhavsagar[m]> | I have run into this issue too |
| 2021-06-17 13:04:56 | → | hexfive joins (~eric@50.35.83.177) |
| 2021-06-17 13:05:21 | <vaibhavsagar[m]> | https://github.com/gibiansky/IHaskell/blob/4e1a2a132c165e1669faaeac355eb853e1f628a3/stack.yaml#L55 |
| 2021-06-17 13:05:22 | <exarkun> | I don't really see how you could make that particularly reliable or robust (at least, not based on what's there now). But that doesn't stop me from wanting a better user experience... |
| 2021-06-17 13:05:43 | <exarkun> | vaibhavsagar[m]: Hm. And then just locally edit `enable` to suit you? |
| 2021-06-17 13:06:14 | <vaibhavsagar[m]> | you could write your own program that changes the YAML based on the output of `type -f nix` |
| 2021-06-17 13:07:13 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Read error: Connection reset by peer) |
| 2021-06-17 13:07:31 | <exarkun> | for now maybe I'll just note that folks can edit `nix.enable` in stack.yaml in the build docs |
| 2021-06-17 13:08:08 | → | pe200012_ joins (~pe200012@120.236.162.19) |
| 2021-06-17 13:08:11 | → | maroloccio joins (~marolocci@200.243.99.194) |
| 2021-06-17 13:08:15 | × | ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 268 seconds) |
| 2021-06-17 13:08:42 | × | pe200012 quits (~pe200012@58.248.179.150) (Ping timeout: 264 seconds) |
| 2021-06-17 13:09:41 | × | elf_fortrez quits (~elf_fortr@adsl-64-237-239-58.prtc.net) (Quit: Client closed) |
| 2021-06-17 13:10:39 | → | kw joins (~user@152.1.137.158) |
| 2021-06-17 13:12:24 | <kw> | I know that proliferation of operators is evil, but hypothetically speaking, what would be a good mnemonic operator for `traverseOf_` ? I'm thinking maybe `(-%~)` or `(%%-)` ? |
| 2021-06-17 13:12:47 | → | chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr) |
| 2021-06-17 13:12:54 | <ente_> | has anyone ever encountered this error in vs code? "ghcide compiled by GHC 8.10 failed to load packages: <command line>: cannot satisfy -package shortener-0.1.0.0" |
| 2021-06-17 13:13:54 | <ente_> | nvm it just went away after reloading the window |
| 2021-06-17 13:14:02 | <exarkun> | kw: 🌉 |
| 2021-06-17 13:14:36 | <exarkun> | kw: 淩 |
| 2021-06-17 13:14:54 | <exarkun> | kw: 🚸 |
| 2021-06-17 13:15:38 | → | warnz joins (~warnz@2600:1700:77c0:5610:7144:467c:eae6:37e7) |
| 2021-06-17 13:15:54 | × | nschoe_ quits (~quassel@2a04:cec0:1017:3105:45bb:25b7:a939:c011) (Ping timeout: 240 seconds) |
| 2021-06-17 13:16:24 | → | AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) |
| 2021-06-17 13:16:27 | <pe200012_> | ente_: execute `stack build` |
| 2021-06-17 13:16:38 | <pe200012_> | then reload hls |
| 2021-06-17 13:16:41 | → | nschoe joins (~quassel@178.251.84.79) |
| 2021-06-17 13:17:26 | <kw> | exarkun: Oops, I forgot to install Symbola on this instance, so please just ASCII. |
| 2021-06-17 13:19:33 | × | pe200012_ quits (~pe200012@120.236.162.19) (Quit: Konversation terminated!) |
| 2021-06-17 13:20:16 | × | trcc quits (~trcc@2-104-60-169-cable.dk.customer.tdc.net) (Remote host closed the connection) |
| 2021-06-17 13:22:21 | → | mpt joins (~tom@2a02:908:1862:49e0::3) |
| 2021-06-17 13:22:44 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-06-17 13:23:42 | <kw> | Guess I could define `travereseOf_infixr4` and use that. Bit of a long name, but it's informative. |
| 2021-06-17 13:25:36 | <ente_> | can you have a data record with a field whichs data type can be specified? |
| 2021-06-17 13:25:52 | <ente_> | in elm you can do something like `content: a` and then specify the type in a |
All times are in UTC.