Logs: liberachat/#haskell
| 2021-08-13 12:37:06 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 2021-08-13 12:37:33 | <kuribas> | Haskell solves the problem of separating effects from pure code quite well, but it comes with considerable complexity. |
| 2021-08-13 12:37:47 | → | keutoi joins (~keutoi@157.47.115.91) |
| 2021-08-13 12:37:56 | <kuribas> | I wonder if that complexity is inherent in programming, or that there are easier ways, which will still give you robust programs. |
| 2021-08-13 12:38:29 | <kuribas> | The clojure solution is simple, throw away all complexity, and accept that stuff will break easily. |
| 2021-08-13 12:38:45 | <kuribas> | But it's just not that appealing. |
| 2021-08-13 12:40:00 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 2021-08-13 12:40:07 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-08-13 12:40:32 | <lortabac> | kuribas: I think you can simplify Haskell code considerably by removing all those fancy effects and limiting yourself to either IO or pure code |
| 2021-08-13 12:40:57 | <kuribas> | lortabac: so ReaderT IO a :) |
| 2021-08-13 12:40:58 | <lortabac> | that's not idiomatic Haskell today, but it looks completely reasonable to me |
| 2021-08-13 12:41:28 | <lortabac> | kuribas: replace ReaderT with implicit parameters so you don't need transformers anymore |
| 2021-08-13 12:41:46 | <lortabac> | it become either 'a' or 'IO a' |
| 2021-08-13 12:41:50 | <lortabac> | *becomes |
| 2021-08-13 12:42:16 | <lortabac> | and use IORefs for state and writer |
| 2021-08-13 12:42:50 | <lortabac> | it would still be much safer than any mainstream language, but considerably simpler |
| 2021-08-13 12:43:05 | <kuribas> | lortabac: how would you solve validation for example? |
| 2021-08-13 12:43:34 | <kuribas> | I created my own validation transformer: https://gist.github.com/kuribas/d3d7a97de4faf340442fd3e542ea73bf |
| 2021-08-13 12:43:53 | → | chris joins (~chris@81.96.113.213) |
| 2021-08-13 12:43:56 | <lortabac> | nice |
| 2021-08-13 12:43:57 | chris | is now known as Guest2008 |
| 2021-08-13 12:44:19 | <kuribas> | Which works well IMO, but it is a hard sell to someone who doesn't know haskell. |
| 2021-08-13 12:44:44 | <kuribas> | Perhaps he could use an IORef [String], and just collect the errors by mutation? |
| 2021-08-13 12:44:57 | <lortabac> | kuribas: yes, that's what I'm proposing |
| 2021-08-13 12:45:34 | <lortabac> | it might seem shocking to a Haskeller, but it's still much safer than what 99% of developers do daily |
| 2021-08-13 12:45:45 | → | burnsidesLlama joins (~burnsides@dhcp168-014.wadham.ox.ac.uk) |
| 2021-08-13 12:46:26 | <kuribas> | haha, that's right |
| 2021-08-13 12:47:00 | <kuribas> | I modelled my database library after clojure honeysql, but even the layer which is untypes is so, so much more safe than the clojure. |
| 2021-08-13 12:47:13 | <lortabac> | however I don't actually program like this at work, I have to conform to social norms :D |
| 2021-08-13 12:48:06 | <kuribas> | you mean classes and mutation in Java, or fancy haskell? :-P |
| 2021-08-13 12:48:26 | <lortabac> | I mean mtl, lenses etc. |
| 2021-08-13 12:48:46 | <lortabac> | so more or less "standard" Haskell |
| 2021-08-13 12:49:21 | <kuribas> | lenses are fine IMO |
| 2021-08-13 12:49:26 | <kuribas> | if you stick to a few. |
| 2021-08-13 12:50:54 | <kuribas> | mtl is fine too, but this project is a test project. I don't want to scare my team away :) |
| 2021-08-13 12:51:16 | <lortabac> | oh so you are trying to introduce Haskell in the company? |
| 2021-08-13 12:51:45 | <kuribas> | yeah :) |
| 2021-08-13 12:52:22 | <kuribas> | my colleages are open to it, but also completely clueless about it... |
| 2021-08-13 12:52:37 | <kuribas> | perhaps I should scrap my fancy validation, and use IO... |
| 2021-08-13 12:52:49 | <nitrix> | Try the {-# LANGUAGE TotallyNotSpooky #-} language extension. |
| 2021-08-13 12:52:57 | <lortabac> | in my experience you can introduce all kinds of fancy advanced features, as long as you provide either a simple interface or some template to copy/paste |
| 2021-08-13 12:53:07 | <kuribas> | makes sense |
| 2021-08-13 12:53:21 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 248 seconds) |
| 2021-08-13 12:54:09 | <lortabac> | I've seen people going from zero to productive in a couple of months when given all the necessary tools |
| 2021-08-13 12:55:13 | <lortabac> | "simple haskell" simply doesn't work because most libraries on Hackage are complex |
| 2021-08-13 12:55:27 | <kuribas> | I think it's *easier* when you get your hands dirty on a well designed program, rather than just reading blog posts. |
| 2021-08-13 12:55:57 | <kuribas> | Much of the scaryness comes from thinking in Java, then trying to force that into haskell. |
| 2021-08-13 12:56:21 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 2021-08-13 12:56:28 | <kuribas> | But if you can copy paste good code, you understand good practices much faster. |
| 2021-08-13 12:57:03 | → | hendursaga joins (~weechat@user/hendursaga) |
| 2021-08-13 12:57:08 | <kuribas> | lortabac: I agree about "simple haskell". But I still would steer clear of some libraries (singletons, fancy lens, ...) |
| 2021-08-13 12:57:55 | <lortabac> | yes, what I meant is that you can't hide the complexity of the Haskell ecosystem for too long |
| 2021-08-13 12:59:58 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-13 13:00:11 | <kuribas> | you can use microlens instead of lens |
| 2021-08-13 13:01:05 | → | alx741 joins (~alx741@181.196.68.193) |
| 2021-08-13 13:01:25 | → | Franciman joins (~francesco@openglass.it) |
| 2021-08-13 13:01:53 | × | norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 248 seconds) |
| 2021-08-13 13:01:57 | × | jneira_ quits (~jneira@212.8.115.226) (Quit: Client closed) |
| 2021-08-13 13:01:59 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 2021-08-13 13:02:02 | × | xff0x quits (~xff0x@2001:1a81:5278:5300:7b4f:e6f2:6a79:44e0) (Ping timeout: 252 seconds) |
| 2021-08-13 13:05:04 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 2021-08-13 13:05:15 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer) |
| 2021-08-13 13:05:16 | × | michalz quits (~michalz@185.246.204.33) (Remote host closed the connection) |
| 2021-08-13 13:05:46 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 2021-08-13 13:05:55 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 2021-08-13 13:06:47 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 2021-08-13 13:12:12 | × | polyphem quits (~polyphem@2a02:810d:640:776c:5ce9:eeb2:9e8b:b083) (Ping timeout: 245 seconds) |
| 2021-08-13 13:14:20 | <arahael> | Applying TDD helps a great deal, imho. |
| 2021-08-13 13:14:33 | <arahael> | Though oddly enough, I rarely do so for my personal side hobbies. |
| 2021-08-13 13:15:11 | × | o1lo01ol1o quits (~o1lo01ol1@31.22.136.245) (Remote host closed the connection) |
| 2021-08-13 13:15:50 | → | o1lo01ol1o joins (~o1lo01ol1@31.22.136.245) |
| 2021-08-13 13:15:52 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-13 13:21:59 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9566746faa93d7d42dfa.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 2021-08-13 13:23:38 | → | pfurla joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net) |
| 2021-08-13 13:24:05 | → | xff0x joins (~xff0x@2001:1a81:5278:5300:7b4f:e6f2:6a79:44e0) |
| 2021-08-13 13:27:14 | × | pfurla_ quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 272 seconds) |
| 2021-08-13 13:31:45 | → | ystael joins (~ystael@user/ystael) |
| 2021-08-13 13:35:13 | → | vrilles joins (~vrilles@user/aman) |
| 2021-08-13 13:38:29 | × | emliunix quits (~emliunix@8.37.43.217) (Remote host closed the connection) |
| 2021-08-13 13:39:09 | → | drd joins (~drd@93-39-151-19.ip76.fastwebnet.it) |
| 2021-08-13 13:40:00 | <kuribas> | lortabac: actually, there isn't a very satifying solution for Validation in other languages. |
| 2021-08-13 13:40:27 | <kuribas> | You cannot throw an exception, because then you only get one error. |
| 2021-08-13 13:40:33 | × | Guest2008 quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-08-13 13:40:49 | <kuribas> | Best would be to write the error to a mutable variable, then return a dummy variable. |
| 2021-08-13 13:41:07 | <kuribas> | And check if there where any errors before using the dummy variables. |
| 2021-08-13 13:43:02 | × | mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Ping timeout: 245 seconds) |
| 2021-08-13 13:43:54 | × | FragByte quits (~christian@user/fragbyte) (Ping timeout: 240 seconds) |
| 2021-08-13 13:44:18 | × | trcc quits (~trcc@users-1190.st.net.au.dk) () |
| 2021-08-13 13:46:50 | → | FragByte joins (~christian@user/fragbyte) |
| 2021-08-13 13:47:10 | × | cheater quits (~Username@user/cheater) (Quit: BitchX: anything else would be uncivilized) |
| 2021-08-13 13:49:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds) |
| 2021-08-13 13:50:11 | → | chomwitt joins (~chomwitt@athedsl-32301.home.otenet.gr) |
| 2021-08-13 13:54:01 | → | cheater joins (~Username@user/cheater) |
| 2021-08-13 13:55:57 | × | hgolden quits (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) (Remote host closed the connection) |
| 2021-08-13 13:58:05 | × | cheater quits (~Username@user/cheater) (Read error: Connection reset by peer) |
| 2021-08-13 13:58:17 | → | hgolden joins (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) |
| 2021-08-13 13:59:30 | → | meltedbrain_y2k joins (~tekserf@31.4.247.40) |
| 2021-08-13 14:00:23 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2021-08-13 14:00:41 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-13 14:00:45 | → | cheater joins (~Username@user/cheater) |
All times are in UTC.