Logs: liberachat/#haskell
| 2021-08-06 11:23:20 | <kuribas> | or make a big mess. |
| 2021-08-06 11:23:32 | <Akronymus> | That alone is already a use case. |
| 2021-08-06 11:23:36 | <Akronymus> | Being limited to functional |
| 2021-08-06 11:23:59 | <Akronymus> | F# makes it easy to fall back to imperative/OOP code |
| 2021-08-06 11:24:09 | <maerwald[m]> | kuribas: https://hackage.haskell.org/package/xeno is this functional? :) |
| 2021-08-06 11:24:12 | <Akronymus> | Which, while useful, also hurts learning |
| 2021-08-06 11:25:06 | <maerwald[m]> | apparently, it's the fastest xml parser there is (or so ppl say) even beating several C libraries |
| 2021-08-06 11:25:14 | <maerwald[m]> | But when you look at the code, hmm |
| 2021-08-06 11:25:32 | <kuribas> | maerwald[m]: don't use that, use my package :) https://hackage.haskell.org/package/hexpat-streamparser |
| 2021-08-06 11:25:43 | <maerwald[m]> | kuribas: is it faster? |
| 2021-08-06 11:25:47 | <kuribas> | maerwald[m]: it's fast by cheating |
| 2021-08-06 11:26:00 | <kuribas> | maerwald[m]: no, but it's standards compliant... |
| 2021-08-06 11:26:31 | <kuribas> | and should be efficient enough for most cases... |
| 2021-08-06 11:26:33 | <Akronymus> | Does it interface with as functional? |
| 2021-08-06 11:26:37 | <maerwald[m]> | well, the reason I brought it up is... there are many cases of non-idiomatic haskell code |
| 2021-08-06 11:26:42 | <maerwald[m]> | that somewhat have their place |
| 2021-08-06 11:26:42 | <kuribas> | Akronymus: yes it does. |
| 2021-08-06 11:26:49 | <Akronymus> | Mostly in libraries though maerwald |
| 2021-08-06 11:26:59 | <maerwald[m]> | Are you sure? |
| 2021-08-06 11:27:04 | <Akronymus> | kuribas than for most users it is a functional lib |
| 2021-08-06 11:27:09 | <Akronymus> | then |
| 2021-08-06 11:27:36 | <kuribas> | Akronymus: you build your parser declaratively. |
| 2021-08-06 11:27:57 | <kuribas> | parseXMLByteString :: EventListParser e a -> ParseOptions Text Text -> ByteString -> Either (EventParseError e, Maybe XMLParseLocation) a |
| 2021-08-06 11:28:07 | <Akronymus> | Like fparsec? |
| 2021-08-06 11:28:17 | <Akronymus> | (I know it is a derivative of the parsec from haskell) |
| 2021-08-06 11:28:18 | <kuribas> | It's a pure function, though it uses an imperative library under the hood (expat). |
| 2021-08-06 11:28:20 | <maerwald[m]> | xeno is the opposite of declarative... so my take is: haskell doesn't force you to be declarative. It just gives you the option |
| 2021-08-06 11:28:40 | <kuribas> | Akronymus: yeah, this is structured like parsec. |
| 2021-08-06 11:28:43 | <Akronymus> | It HEAVILY encourages you to write idiomatic code. |
| 2021-08-06 11:28:45 | <maerwald[m]> | That's why I object that haskell has a use case |
| 2021-08-06 11:29:46 | <kuribas> | Akronymus: my library builds on top of the parser-combinators library, which is modelled after parsec. |
| 2021-08-06 11:31:56 | <kuribas> | maerwald[m]: What I mean is that the use case people want to use haskell for, is actually not a usecase for haskell. That is, writing programs where you prove everything in the typesystem. |
| 2021-08-06 11:32:13 | <maerwald[m]> | I agree |
| 2021-08-06 11:32:33 | <maerwald[m]> | But we have forces that want to drive Haskell into that direction |
| 2021-08-06 11:33:22 | × | drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 240 seconds) |
| 2021-08-06 11:34:22 | → | MoC joins (~moc@user/moc) |
| 2021-08-06 11:34:54 | <hpc> | to be fair, the tools of writing proofs could be useful for expressing properties of more useful code |
| 2021-08-06 11:35:26 | <maerwald[m]> | I don't understand that sentence |
| 2021-08-06 11:35:33 | <hpc> | idris is turing-complete and nobody complains about it being a bad proof assistant |
| 2021-08-06 11:36:56 | <juri_> | kuribas: I'm 9 years a haskeller, both professionally, and for fun, and i still don't understand monad transformers. :D |
| 2021-08-06 11:37:38 | <maerwald[m]> | Maybe because there's not much to understand |
| 2021-08-06 11:38:01 | × | fendor quits (~fendor@178.115.49.9.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-08-06 11:38:50 | <maerwald[m]> | well, except for abominations like MonadBaseControl |
| 2021-08-06 11:39:08 | → | fendor joins (~fendor@178.115.49.9.wireless.dyn.drei.com) |
| 2021-08-06 11:39:39 | × | fendor quits (~fendor@178.115.49.9.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-08-06 11:43:03 | <maerwald[m]> | I hate to say it, but maybe `RIO` isn't so far from the truth. Although I prefer an ExceptT/Excepts at the outside |
| 2021-08-06 11:43:11 | → | fendor joins (~fendor@178.115.49.9.wireless.dyn.drei.com) |
| 2021-08-06 11:44:28 | <kuribas> | juri_: I use monad transformers in most of my projects. It means less boilerplate and plumbing. |
| 2021-08-06 11:44:35 | <maerwald[m]> | Never understood Snoymans argument against mixing ExceptT with IO |
| 2021-08-06 11:45:18 | × | fendor quits (~fendor@178.115.49.9.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 2021-08-06 11:45:19 | <maerwald[m]> | yes, ExceptT with IO means you may need to catch on two different levels. Isn't that obvious to everyone? |
| 2021-08-06 11:45:36 | <Rembane> | Is that argument that he prefers to only have one kind of going-wrong instead of both Left and exceptions? |
| 2021-08-06 11:45:42 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:460a:4755:73b5:e6f5) |
| 2021-08-06 11:45:53 | → | fendor joins (~fendor@178.115.49.9.wireless.dyn.drei.com) |
| 2021-08-06 11:46:03 | <maerwald[m]> | I think the argument was that the type lies and you still need to handle IO exceptions yeah |
| 2021-08-06 11:46:56 | <maerwald[m]> | but then you could say `IO (Either a b)` lies as well |
| 2021-08-06 11:47:07 | <maerwald[m]> | ExceptT is just a glorified inner Either |
| 2021-08-06 11:47:13 | <maerwald[m]> | that composes better |
| 2021-08-06 11:47:18 | <kuribas> | It makes sense to have two going-wrongs. One if for stuff you expect the program to handle, the other for stuff where intervention of an admin or operations guy is expected. |
| 2021-08-06 11:48:34 | <kuribas> | I use Exceptions for the latter. You just catch the exteption, log it somewhere, and abort the operation. |
| 2021-08-06 11:48:58 | <maerwald[m]> | in low level libraries, such as filepath/directory etc, of course I wouldn't expect an ExceptT, because there's no way you can tell what error is expected and what isn't |
| 2021-08-06 11:49:17 | <Akronymus> | I know I read about some REALLY weirdly named monad before that someone made as a joke, but can't find it anymore. |
| 2021-08-06 11:49:25 | <Akronymus> | It was relevant like 3 pages ago |
| 2021-08-06 11:50:15 | × | wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal) |
| 2021-08-06 11:50:46 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 2021-08-06 11:50:57 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-08-06 11:51:14 | <Rembane> | Akronymus: Have you seen the Tardis monad? |
| 2021-08-06 11:51:25 | <Akronymus> | Nope |
| 2021-08-06 11:51:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-06 11:51:34 | <maerwald[m]> | I think the weirdest monad is ContT |
| 2021-08-06 11:51:37 | <Akronymus> | But the one I thought of had a 5 word name or something |
| 2021-08-06 11:51:58 | <maerwald[m]> | I forget how it works every time |
| 2021-08-06 11:52:15 | <maerwald[m]> | learn it again, forget it again |
| 2021-08-06 11:52:19 | <Rembane> | maerwald[m]: Yeah, type lie all the time, and we need to handle that too. |
| 2021-08-06 11:54:14 | → | futty joins (~futty@c83-252-75-55.bredband.tele2.se) |
| 2021-08-06 11:56:17 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Ping timeout: 252 seconds) |
| 2021-08-06 11:56:40 | <kuribas> | Akronymus: These? |
| 2021-08-06 11:56:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-08-06 11:57:15 | <kuribas> | https://hackage.haskell.org/package/these-1.1.1.1/docs/Data-These.html |
| 2021-08-06 11:57:19 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-08-06 11:57:47 | <Akronymus> | Nope |
| 2021-08-06 11:57:58 | <Akronymus> | It was a really long name made out of multiple words |
| 2021-08-06 12:01:31 | × | phma quits (phma@2001:5b0:210d:cf58:911f:3237:b853:e162) (Read error: Connection reset by peer) |
| 2021-08-06 12:01:44 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Ping timeout: 258 seconds) |
| 2021-08-06 12:02:29 | → | phma joins (~phma@2001:5b0:210d:73a8:1482:7584:9a9a:de0a) |
| 2021-08-06 12:04:02 | × | pe200012_ quits (~pe200012@113.105.10.33) (Ping timeout: 258 seconds) |
| 2021-08-06 12:04:03 | → | pe200012 joins (~pe200012@113.105.10.33) |
| 2021-08-06 12:04:57 | <Akronymus> | Sadly gotta go. |
| 2021-08-06 12:04:59 | × | Akronymus quits (~Akronymus@85.31.8.181) (Quit: Client closed) |
| 2021-08-06 12:06:36 | → | Guest9112 joins (~Guest91@2a02:a212:2180:8d00:cfb7:369e:490f:8f0e) |
| 2021-08-06 12:08:35 | → | Neuromancer joins (~Neuromanc@user/neuromancer) |
| 2021-08-06 12:10:25 | → | Flow joins (~none@gentoo/developer/flow) |
| 2021-08-06 12:12:53 | <maerwald[m]> | oh, I abuse `Excepts` for `These` and then decide later what error is a warning (and encapsulate a value in the error) |
| 2021-08-06 12:13:28 | <maerwald[m]> | not sure anyone has written open sum type version of These |
| 2021-08-06 12:15:35 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-08-06 12:16:29 | → | burnside_ joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-08-06 12:16:30 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
| 2021-08-06 12:18:07 | <hpc> | ContT isn't that bad - just think (pure x) = ($ x), and what you can do to compose those sorts of functions |
| 2021-08-06 12:18:29 | <hpc> | it just looks bad because the definitions have a ton of lambdas and data constructor wrapping |
| 2021-08-06 12:19:12 | × | Guest9112 quits (~Guest91@2a02:a212:2180:8d00:cfb7:369e:490f:8f0e) (Quit: Client closed) |
All times are in UTC.