Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,413 events total
2025-10-19 20:38:19 flipflops joins (~cmo@2604:3d09:207f:8000::d1dc)
2025-10-19 20:38:29 × fp quits (~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Read error: Connection reset by peer)
2025-10-19 20:40:18 malte joins (~malte@mal.tc)
2025-10-19 20:40:36 pavonia joins (~user@user/siracusa)
2025-10-19 20:41:09 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-10-19 20:47:27 fp joins (~Thunderbi@89-27-10-140.bb.dnainternet.fi)
2025-10-19 20:47:46 × SlackCoder quits (~SlackCode@64-94-63-8.ip.weststar.net.ky) (Ping timeout: 246 seconds)
2025-10-19 20:51:56 SlackCoder joins (~SlackCode@208.26.91.234)
2025-10-19 20:52:01 qqe joins (~qqq@185.54.23.200)
2025-10-19 20:54:13 nihilazo joins (~nihilazo@host86-150-176-16.range86-150.btcentralplus.com)
2025-10-19 20:54:43 halloy9957 joins (~halloy995@ip72-208-127-103.ph.ph.cox.net)
2025-10-19 20:54:51 <geekosaur> although I just realized that the only possible test for which context to use is to see if something is typeable within it, which can't be done at runtime (no type information) nor at compile time (may be dynamic)
2025-10-19 20:57:25 <nihilazo> hi, I'm trying to use the sqlite-simple library to interface with a sqlite database from a haskell program (currently in the experimentation phase) and I'd like to convert from SQLite rows into my own types. The library provides a FromRow typeclass with a function that defines how to do this, using the `field` function to get each field. The
2025-10-19 20:57:26 <nihilazo> examples on the hackage docs and their github (https://github.com/nurpax/sqlite-simple) use an applicative style for this, fromRow = TestField <$> field <*> field. But if the row contains eg. 12 columns (like in my project) would the best way to do this still be like, CustomType <$> field <*> field <*> field... (for 12 lines) or is there a better
2025-10-19 20:57:26 <nihilazo> way?
2025-10-19 20:57:58 <nihilazo> (the approach of doing it that way for 12 columns does work but feels notably messy. It seems to be what all other tutorials online for the library do though)
2025-10-19 21:01:31 <nihilazo> although given that this is also how all the instances of fromRow in the library's own code are structured: https://github.com/nurpax/sqlite-simple/blob/master/Database/SQLite/Simple/FromRow.hs I'm unsure if there is a better way
2025-10-19 21:01:33 fp1 joins (~Thunderbi@2001-14ba-6e24-3000--190.rev.dnainternet.fi)
2025-10-19 21:02:26 Lycurgus joins (~juan@user/Lycurgus)
2025-10-19 21:02:46 Lycurgus parts (~juan@user/Lycurgus) ()
2025-10-19 21:04:13 × fp quits (~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Ping timeout: 246 seconds)
2025-10-19 21:04:13 fp1 is now known as fp
2025-10-19 21:07:21 <monochrom> The other option is to use GHC.Generics or Template Haskell to make the computer write those 12 lines for you.
2025-10-19 21:07:52 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 21:07:57 inline_ joins (~inline@2a02:8071:57a1:1260:d6a:132:a003:3008)
2025-10-19 21:08:34 jreicher joins (~user@user/jreicher)
2025-10-19 21:10:49 × Inline quits (~inline@2a02:8071:57a1:1260:d6a:132:a003:3008) (Ping timeout: 250 seconds)
2025-10-19 21:10:57 Lycurgus joins (~juan@user/Lycurgus)
2025-10-19 21:12:19 inline joins (~inline@2a02:8071:57a1:1260:d4aa:fbec:e75d:918d)
2025-10-19 21:12:31 × inline_ quits (~inline@2a02:8071:57a1:1260:d6a:132:a003:3008) (Ping timeout: 244 seconds)
2025-10-19 21:13:13 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 21:14:32 × Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org ))
2025-10-19 21:14:32 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: dnsl)
2025-10-19 21:17:00 <nihilazo> monochrom: there seems to be an implementation for generics in the code for fromrow, but I'm not sure how to then use it with my own types
2025-10-19 21:19:57 <nihilazo> wait, it seems following their (slightly oddly worded so it didn't get it at first) advice to add deriving (Generic) on the type and add an empty instance of fromRow worked.
2025-10-19 21:20:15 <nihilazo> apologies for my failure to correctly read documentation, re-reading it solved the problem
2025-10-19 21:20:37 halloy9957 is now known as kk-strat
2025-10-19 21:22:13 <nihilazo> thanks for the pointer to generics, got me to re-read that bit and found how it worked.
2025-10-19 21:22:16 × nihilazo quits (~nihilazo@host86-150-176-16.range86-150.btcentralplus.com) (Quit: Client closed)
2025-10-19 21:23:09 <monochrom> I wasn't saying it in a clear way either. :)
2025-10-19 21:23:39 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 21:28:49 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 21:31:11 × fp quits (~Thunderbi@2001-14ba-6e24-3000--190.rev.dnainternet.fi) (Ping timeout: 250 seconds)
2025-10-19 21:35:27 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
2025-10-19 21:39:27 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 21:43:50 emmanuelux joins (~emmanuelu@user/emmanuelux)
2025-10-19 21:44:07 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-10-19 21:44:49 inline_ joins (~inline@2a02:8071:57a1:1260:a5ae:17d3:b566:d327)
2025-10-19 21:45:39 × inline_ quits (~inline@2a02:8071:57a1:1260:a5ae:17d3:b566:d327) (Read error: Connection reset by peer)
2025-10-19 21:46:21 × inline quits (~inline@2a02:8071:57a1:1260:d4aa:fbec:e75d:918d) (Ping timeout: 250 seconds)
2025-10-19 21:53:30 × jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 248 seconds)
2025-10-19 21:55:14 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 22:02:25 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 22:10:30 × jreicher quits (~user@user/jreicher) (Read error: Connection reset by peer)
2025-10-19 22:11:08 bggd joins (~bgg@2a01:e0a:819:1510:3eb5:dbc5:9370:da5d)
2025-10-19 22:11:56 inline joins (~inline@2a02:8071:57a1:1260:5a1:e9a9:aa3a:fee6)
2025-10-19 22:12:49 × peterbecich quits (~Thunderbi@172.222.148.214) (Quit: peterbecich)
2025-10-19 22:13:17 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 22:13:22 peterbecich joins (~Thunderbi@172.222.148.214)
2025-10-19 22:18:07 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-10-19 22:18:37 × karenw quits (~karenw@user/karenw) (Ping timeout: 264 seconds)
2025-10-19 22:19:32 Guest57 joins (~Guest57@95.214.217.193)
2025-10-19 22:22:52 × Guest57 quits (~Guest57@95.214.217.193) (Quit: Client closed)
2025-10-19 22:23:25 × kk-strat quits (~halloy995@ip72-208-127-103.ph.ph.cox.net) (Quit: kk-strat)
2025-10-19 22:23:29 inline_ joins (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de)
2025-10-19 22:26:23 inline__ joins (~inline@2a02:8071:57a1:1260:1ce3:efcb:ed4f:9e96)
2025-10-19 22:26:24 × inline quits (~inline@2a02:8071:57a1:1260:5a1:e9a9:aa3a:fee6) (Ping timeout: 244 seconds)
2025-10-19 22:26:35 inline__ is now known as Inline
2025-10-19 22:27:15 inline__ joins (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de)
2025-10-19 22:29:02 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 22:29:43 × inline_ quits (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
2025-10-19 22:30:42 inline_ joins (~inline@2a02:8071:57a1:1260:7925:4f19:c6de:9865)
2025-10-19 22:31:03 × Inline quits (~inline@2a02:8071:57a1:1260:1ce3:efcb:ed4f:9e96) (Ping timeout: 244 seconds)
2025-10-19 22:32:25 × inline__ quits (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
2025-10-19 22:33:30 inline__ joins (~inline@ip-178-202-059-161.um47.pools.vodafone-ip.de)
2025-10-19 22:34:02 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-10-19 22:35:39 × tromp quits (~textual@2001:1c00:3487:1b00:5da6:eb72:7bdc:37c8) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-10-19 22:37:19 × inline_ quits (~inline@2a02:8071:57a1:1260:7925:4f19:c6de:9865) (Ping timeout: 246 seconds)
2025-10-19 22:41:36 × dolio quits (~dolio@130.44.140.168) (Quit: ZNC 1.9.1 - https://znc.in)
2025-10-19 22:43:28 dolio joins (~dolio@130.44.140.168)
2025-10-19 22:44:50 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 22:45:20 inline__ is now known as inline
2025-10-19 22:47:46 × dolio quits (~dolio@130.44.140.168) (Client Quit)
2025-10-19 22:48:24 jmcantrell joins (~weechat@user/jmcantrell)
2025-10-19 22:49:01 dolio joins (~dolio@130.44.140.168)
2025-10-19 22:49:49 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 22:55:24 × hololeap quits (~quassel@user/hololeap) (Quit: Bye)
2025-10-19 22:56:07 hololeap joins (~quassel@user/hololeap)
2025-10-19 23:00:13 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 23:02:23 Ram-Z joins (Ram-Z@2a01:7e01::f03c:91ff:fe57:d2df)
2025-10-19 23:04:58 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-10-19 23:05:14 × Ram-Z_ quits (~Ram-Z@li1814-254.members.linode.com) (Ping timeout: 260 seconds)
2025-10-19 23:07:38 × mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 248 seconds)
2025-10-19 23:08:59 × qqe quits (~qqq@185.54.23.200) (Quit: Lost terminal)
2025-10-19 23:15:59 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-10-19 23:16:23 × chromoblob quits (~chromoblo@user/chromob1ot1c) (Remote host closed the connection)
2025-10-19 23:16:39 chromoblob joins (~chromoblo@user/chromob1ot1c)
2025-10-19 23:21:01 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 23:24:36 × ljdarj quits (~Thunderbi@user/ljdarj) (Quit: ljdarj)
2025-10-19 23:31:48 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)

All times are in UTC.