2025/10/19

Newest at the top

2025-10-19 23:46:21 +0200inline(~inline@2a02:8071:57a1:1260:d4aa:fbec:e75d:918d) (Ping timeout: 250 seconds)
2025-10-19 23:45:39 +0200inline_(~inline@2a02:8071:57a1:1260:a5ae:17d3:b566:d327) (Read error: Connection reset by peer)
2025-10-19 23:44:49 +0200inline_(~inline@2a02:8071:57a1:1260:a5ae:17d3:b566:d327) Inline
2025-10-19 23:44:07 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-10-19 23:43:50 +0200emmanuelux(~emmanuelu@user/emmanuelux) emmanuelux
2025-10-19 23:39:27 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-10-19 23:35:27 +0200target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2025-10-19 23:31:11 +0200fp(~Thunderbi@2001-14ba-6e24-3000--190.rev.dnainternet.fi) (Ping timeout: 250 seconds)
2025-10-19 23:28:49 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 23:23:39 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-10-19 23:23:09 +0200 <monochrom> I wasn't saying it in a clear way either. :)
2025-10-19 23:22:16 +0200nihilazo(~nihilazo@host86-150-176-16.range86-150.btcentralplus.com) (Quit: Client closed)
2025-10-19 23:22:13 +0200 <nihilazo> thanks for the pointer to generics, got me to re-read that bit and found how it worked.
2025-10-19 23:20:37 +0200halloy9957kk-strat
2025-10-19 23:20:15 +0200 <nihilazo> apologies for my failure to correctly read documentation, re-reading it solved the problem
2025-10-19 23:19:57 +0200 <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 23:17:00 +0200 <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 23:14:32 +0200tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: dnsl)
2025-10-19 23:14:32 +0200Lycurgus(~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org ))
2025-10-19 23:13:13 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-10-19 23:12:31 +0200inline_(~inline@2a02:8071:57a1:1260:d6a:132:a003:3008) (Ping timeout: 244 seconds)
2025-10-19 23:12:19 +0200inline(~inline@2a02:8071:57a1:1260:d4aa:fbec:e75d:918d) Inline
2025-10-19 23:10:57 +0200Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-10-19 23:10:49 +0200Inline(~inline@2a02:8071:57a1:1260:d6a:132:a003:3008) (Ping timeout: 250 seconds)
2025-10-19 23:08:34 +0200jreicher(~user@user/jreicher) jreicher
2025-10-19 23:07:57 +0200inline_(~inline@2a02:8071:57a1:1260:d6a:132:a003:3008) Inline
2025-10-19 23:07:52 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-10-19 23:07:21 +0200 <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 23:04:13 +0200fp1fp
2025-10-19 23:04:13 +0200fp(~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Ping timeout: 246 seconds)
2025-10-19 23:02:46 +0200Lycurgus(~juan@user/Lycurgus) ()
2025-10-19 23:02:26 +0200Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-10-19 23:01:33 +0200fp1(~Thunderbi@2001-14ba-6e24-3000--190.rev.dnainternet.fi) fp
2025-10-19 23:01:31 +0200 <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 22:57:58 +0200 <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 22:57:26 +0200 <nihilazo> way?
2025-10-19 22:57:26 +0200 <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 22:57:25 +0200 <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 22:54:51 +0200 <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 22:54:43 +0200halloy9957(~halloy995@ip72-208-127-103.ph.ph.cox.net)
2025-10-19 22:54:13 +0200nihilazo(~nihilazo@host86-150-176-16.range86-150.btcentralplus.com) nihilazo
2025-10-19 22:52:01 +0200qqe(~qqq@185.54.23.200)
2025-10-19 22:51:56 +0200SlackCoder(~SlackCode@208.26.91.234) SlackCoder
2025-10-19 22:47:46 +0200SlackCoder(~SlackCode@64-94-63-8.ip.weststar.net.ky) (Ping timeout: 246 seconds)
2025-10-19 22:47:27 +0200fp(~Thunderbi@89-27-10-140.bb.dnainternet.fi) fp
2025-10-19 22:41:09 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-10-19 22:40:36 +0200pavonia(~user@user/siracusa) siracusa
2025-10-19 22:40:18 +0200malte(~malte@mal.tc) malte
2025-10-19 22:38:29 +0200fp(~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Read error: Connection reset by peer)
2025-10-19 22:38:19 +0200flipflops(~cmo@2604:3d09:207f:8000::d1dc)