Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 672 673 674 675 676 677 678 679 680 681 682 .. 18014
1,801,365 events total
2021-06-27 16:24:38 <sekun> i usually see you online every time i hop on here hahah
2021-06-27 16:26:02 × mastarija quits (~mastarija@31.217.22.187) (Ping timeout: 268 seconds)
2021-06-27 16:32:09 × warnz quits (~warnz@2600:1700:77c0:5610:eca1:bc9d:4345:931f) (Ping timeout: 250 seconds)
2021-06-27 16:34:11 × dunkeln quits (~dunkeln@188.71.193.140) (Ping timeout: 265 seconds)
2021-06-27 16:34:32 × fef quits (~thedawn@user/thedawn) (Quit: Leaving)
2021-06-27 16:34:58 bitmapper joins (uid464869@id-464869.tooting.irccloud.com)
2021-06-27 16:35:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-06-27 16:35:09 dunkeln joins (~dunkeln@188.71.193.140)
2021-06-27 16:35:12 × sekun quits (~sekun@180.190.208.125) (Ping timeout: 272 seconds)
2021-06-27 16:36:43 chomwitt joins (~Pitsikoko@athedsl-16082.home.otenet.gr)
2021-06-27 16:43:01 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
2021-06-27 16:43:28 brandonh joins (~brandonh@151.46.93.174)
2021-06-27 16:45:21 ikex1 joins (ash@user/ikex)
2021-06-27 16:45:53 <c_wraith> oh yeah. I wanted to try out rel8. But... I don't actually have a database. Makes it awkward.
2021-06-27 16:46:45 × ikex quits (ash@user/ikex) (Ping timeout: 265 seconds)
2021-06-27 16:46:45 ikex1 is now known as ikex
2021-06-27 16:46:50 warnz joins (~warnz@2600:1700:77c0:5610:eca1:bc9d:4345:931f)
2021-06-27 16:47:18 <sm[m]> @sekun:libera.chat: have you read the yesod book ?
2021-06-27 16:47:18 <lambdabot> Unknown command, try @list
2021-06-27 16:47:21 MorrowM joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net)
2021-06-27 16:49:11 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
2021-06-27 16:49:32 <sm[m]> also IHP probably has a nice tutorial; also there have been random posts describing full real world web apps which are a bit hard to find of course
2021-06-27 16:50:26 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
2021-06-27 16:51:26 × warnz quits (~warnz@2600:1700:77c0:5610:eca1:bc9d:4345:931f) (Ping timeout: 272 seconds)
2021-06-27 16:51:43 × brandonh quits (~brandonh@151.46.93.174) (Quit: brandonh)
2021-06-27 16:55:10 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
2021-06-27 16:55:47 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
2021-06-27 16:57:57 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7930:a54c:f178:5c1a)
2021-06-27 16:59:38 <dminuoso> c_wraith: Nobody is going to convince me that their "fancy pants SQL abstraction is better than SQL"
2021-06-27 16:59:54 notzmv joins (~zmv@user/notzmv)
2021-06-27 17:01:00 <c_wraith> I don't "better than SQL". I want convenient for common cases and easy enough to switch to SQL outside of them.
2021-06-27 17:01:41 <dminuoso> The overhead of learning "a completely custom and strange abstraction" usually beats using SQL that you already know.
2021-06-27 17:01:55 <c_wraith> the big thing I want library support for, especially in Haskell, is marshalling query parameters and unmarshalling results.
2021-06-27 17:02:00 <dminuoso> I find that with these database layers you end up studying these DSLs to know how to make them spit out the SQL query you already have in your mind
2021-06-27 17:02:16 <dminuoso> Well, all the -simple libraries give you that.
2021-06-27 17:02:25 <c_wraith> very painfully
2021-06-27 17:02:43 <c_wraith> I want something join-aware
2021-06-27 17:02:45 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
2021-06-27 17:02:59 <dminuoso> The main selling point of rel8 and friends is that it propagates the schema types throughout the type system, right through queries.
2021-06-27 17:03:08 <Rembane> dminuoso: Does it work?
2021-06-27 17:03:24 <dminuoso> Im sure it does, there's a few haskell libraries that do
2021-06-27 17:03:40 <dminuoso> But the price is that you have to use an exotic eDSL
2021-06-27 17:03:51 <dminuoso> Maybe this is the place where TH would be ideal
2021-06-27 17:04:06 <Rembane> That's potentially painful. I'll have to take a look at rel8 some day.
2021-06-27 17:04:11 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
2021-06-27 17:04:28 lavaman joins (~lavaman@98.38.249.169)
2021-06-27 17:04:46 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-27 17:05:00 <boxscape> could one make/does there exist a library where you write a native SQL query in a quasiquote and it typechecks that?
2021-06-27 17:05:08 <boxscape> or is there something I'm not thinking of preventing that from existing?
2021-06-27 17:05:11 <c_wraith> thats the thing about rel8. it's not an exotic DSL. it's a normal Haskell DSL
2021-06-27 17:05:25 <dminuoso> boxscape: That's sort of what I was proposing. You'd need at least TH power for that.
2021-06-27 17:05:25 <boxscape> (I haven't really used quasiquotes)
2021-06-27 17:05:30 <boxscape> ah, okay
2021-06-27 17:05:55 <c_wraith> quasiquotes are essentially String -> Q Exp
2021-06-27 17:05:58 <dminuoso> boxscape: QQ gives you simple `String -> AST` functions.
2021-06-27 17:06:03 <dminuoso> That GHC knows to splice
2021-06-27 17:06:06 <dminuoso> They cant do anything else
2021-06-27 17:06:18 <boxscape> right, okay
2021-06-27 17:06:19 <c_wraith> or Q [Decl], in that context.
2021-06-27 17:06:47 <c_wraith> well, they can run arbitrary IO code at compile time.
2021-06-27 17:06:52 <dminuoso> QQ can?
2021-06-27 17:07:01 <c_wraith> the Q monad can
2021-06-27 17:07:50 <dminuoso> Though, I guess, perhaps parametrized QQs could be used..
2021-06-27 17:07:55 <c_wraith> so they can validate your query against the database, if they're set up that way.
2021-06-27 17:08:12 mpt joins (~tom@2001:41b8:83c:fa01:9f51:88b4:dd95:965a)
2021-06-27 17:08:21 <dminuoso> Maybe this is actually something worth exploring
2021-06-27 17:08:22 <c_wraith> that has a lot of problems that basically match the benefits, unfortunately
2021-06-27 17:09:00 mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be)
2021-06-27 17:09:28 <c_wraith> (do you want compiling to need a running database? how do you handle migrations? etc)
2021-06-27 17:10:29 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
2021-06-27 17:11:08 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
2021-06-27 17:11:40 charukiewicz_ joins (~quassel@irouteince04.i.subnet.rcn.com)
2021-06-27 17:12:20 × charukiewicz quits (~quassel@irouteince04.i.subnet.rcn.com) (Ping timeout: 272 seconds)
2021-06-27 17:12:38 × neo quits (~neo3@cpe-292712.ip.primehome.com) (Quit: Leaving)
2021-06-27 17:13:00 neo joins (~neo3@cpe-292712.ip.primehome.com)
2021-06-27 17:14:26 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
2021-06-27 17:18:11 × xff0x quits (~xff0x@2001:1a81:533e:6d00:b6fe:ee81:87af:f03c) (Ping timeout: 268 seconds)
2021-06-27 17:18:34 xff0x joins (~xff0x@2001:1a81:533e:6d00:c133:b997:3ccf:96a0)
2021-06-27 17:19:49 brandonh joins (~brandonh@151.82.33.7)
2021-06-27 17:21:16 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:7c55:3c65:74e1:3dc5) (Ping timeout: 268 seconds)
2021-06-27 17:23:38 LukeHoersten joins (~LukeHoers@user/lukehoersten)
2021-06-27 17:24:37 × mpt quits (~tom@2001:41b8:83c:fa01:9f51:88b4:dd95:965a) (Ping timeout: 272 seconds)
2021-06-27 17:27:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
2021-06-27 17:28:24 <dminuoso> c_wraith: It might not need a running database.
2021-06-27 17:28:35 <dminuoso> Generally it would be enough to just have schema specifications
2021-06-27 17:28:45 <dminuoso> And some startup glue code that ensures the codified schema and the database match
2021-06-27 17:32:34 <Gurkenglas> Is there a variant of Monad m where (>>=) is m s t a -> (a -> m t o b) -> m s o b? Does it have its own do notation?
2021-06-27 17:34:05 <shachaf> Yes, this is called "indexed monad".
2021-06-27 17:34:40 <shachaf> GHC lets you overload do notation already, so I think it works with indexed monads if you define it.
2021-06-27 17:34:55 <zzz> what's the elegant way of doing something like multiple inserts on a Map?
2021-06-27 17:36:32 <Gurkenglas> oh yes right i saw this once! neat. (i was reading a book on category theory and it said an adjunction induces a monad and i went "huh, State s is induced that way and (s,) adjoint (s->) but can i find a way to call that adjunction natural in s and can i transport this to the state monad?")
2021-06-27 17:37:23 <Gurkenglas> and yeah https://kseo.github.io/posts/2017-01-12-indexed-monads.html gives it do notation
2021-06-27 17:38:43 <zzz> jkj
2021-06-27 17:39:36 <Gurkenglas> zzz, more context. what is the meaning of the map entries
2021-06-27 17:41:39 <zzz> i just want to avoid doing: m' = Map.insert ... m ; m'' = Map.insert ... m' ; etc...
2021-06-27 17:42:53 <shachaf> You can have a list of insertions.
2021-06-27 17:43:32 <neo> foldl' on a list should be what you are looking for.
2021-06-27 17:43:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-06-27 17:44:56 Guest33 joins (~textual@c-107-4-204-12.hsd1.mn.comcast.net)
2021-06-27 17:45:03 × Guest33 quits (~textual@c-107-4-204-12.hsd1.mn.comcast.net) (Client Quit)

All times are in UTC.