Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,072 events total
2021-08-14 12:23:46 markpythonicbitc joins (~markpytho@2601:647:5a00:35:2c98:e880:4d8:8f3d)
2021-08-14 12:24:41 <Hecate> kuribas: I don't believe in GHCJS as being adequate for the browser, but a JVM backend with excellent Java FFI would be a game changer in enterprise environments
2021-08-14 12:25:51 <kuribas> Hecate: it could be, but it's a huge effort.
2021-08-14 12:25:59 <kuribas> Which I doubt many people are willing to do.
2021-08-14 12:27:07 <Hecate> kuribas: I'm not betting on willingness
2021-08-14 12:27:15 <Hecate> I'm betting on corporate money
2021-08-14 12:27:45 <kuribas> corporations aren't interested in haskell
2021-08-14 12:28:07 <kuribas> And if they are, they aren't willing to pay big bucks for an unsupported platform.
2021-08-14 12:28:24 × markpythonicbitc quits (~markpytho@2601:647:5a00:35:2c98:e880:4d8:8f3d) (Ping timeout: 256 seconds)
2021-08-14 12:30:29 <Hecate> kuribas: I don't know what is the basis of your first sentence but I have first-hand experience of the contrary, so it's a bit hard to believe you on your word :P
2021-08-14 12:30:32 × burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection)
2021-08-14 12:30:57 <Hecate> regarding supporting an unsupported platform, I don't understand why it would be "unsupported"
2021-08-14 12:31:08 <kuribas> Hecate: a few, but not that many AFAIK...
2021-08-14 12:31:18 <kuribas> Hecate: but if I am wrong, even better :)
2021-08-14 12:31:43 <Hecate> there are more than we know because they're not "in the community" as much as Tweag/Well-Typed
2021-08-14 12:31:51 <Hecate> but there have been more in the past years
2021-08-14 12:32:24 <Hecate> Nova Discovery in France, Scrive in Sweden/Czech Republic, the StanChart teams in Poland & the UK…
2021-08-14 12:32:57 <Hecate> I bet Tweag would love to have a JVM backend
2021-08-14 12:33:17 <kuribas> Hecate: you know of this right? https://hackage.haskell.org/package/inline-java
2021-08-14 12:33:38 <kuribas> Hecate: it would be nice to have, but it would mean maintaining a separate ecosystem.
2021-08-14 12:34:37 <Hecate> kuribas: yes I know of this, that's why I say that a more integrated solution would please Tweag
2021-08-14 12:35:03 <Hecate> kuribas: no, it's just means that some packages are not portable across all platforms, which is already the case
2021-08-14 12:35:10 <Hecate> it has always been the case
2021-08-14 12:35:54 <Hecate> again, I don't know what is your reasoning behind "maintaining a separate ecosystem", which certainly sounds scary but you bring this without any deeper explanation so it's like an empty threat :P
2021-08-14 12:37:22 <kuribas> Hecate: huh what?
2021-08-14 12:37:31 <kuribas> Am I threatening someone?
2021-08-14 12:37:49 <kuribas> I just have a hard time to believe people will pay for this.
2021-08-14 12:37:55 <kuribas> Seeing the sorry state of some libraries...
2021-08-14 12:38:00 <kuribas> In what we have now.
2021-08-14 12:38:25 × curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 248 seconds)
2021-08-14 12:39:31 <Hecate> kuribas: considering that the Haskell Foundation has raised half a million dollars from corporations using Haskell, I have no doubt that they are ready to pay
2021-08-14 12:39:33 × drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 268 seconds)
2021-08-14 12:39:46 <Hecate> they don't want to organise though, which is what the HF is paid to do
2021-08-14 12:39:47 <kuribas> Hecate: well, good!
2021-08-14 12:40:12 <kuribas> Don't get me wrong, I am not against a java ghc...
2021-08-14 12:40:22 <Hecate> pretty sure outputting .NET bytecode will earn us a big fat chèque from MS as well :P
2021-08-14 12:43:14 <kuribas> Maybe webassembly would be nice
2021-08-14 12:44:31 <Hecate> kuribas: https://github.com/tweag/asterius
2021-08-14 12:45:22 polyphem joins (~polyphem@2a02:810d:640:776c:c8d6:203f:c7c7:b242)
2021-08-14 12:47:06 <kuribas> ah, nice!
2021-08-14 12:52:18 × sander quits (~sander@user/sander) (Quit: So long! :))
2021-08-14 12:52:45 <kuribas> ah sweet, my generic record map works! https://gist.github.com/kuribas/9111beafd31a9368efa75d94fb68fb6f
2021-08-14 12:53:12 <kuribas> And is easy to use, just define a newtype with MapField instance.
2021-08-14 12:55:35 <kuribas> Now I only need to implement union, subset and superset...
2021-08-14 12:58:23 jehugawa joins (~jehugawa@2a01:4f9:c010:4649::1)
2021-08-14 12:58:46 <fvr> what would the union of two records return? You first need to create a new record with the union of all the fields in them?
2021-08-14 12:59:04 <kuribas> yes
2021-08-14 12:59:07 sander joins (~sander@user/sander)
2021-08-14 13:00:26 <fvr> I wrote a library that creates sub record types and conversion functions with template haskell a few years ago
2021-08-14 13:00:30 <fvr> https://github.com/vacationlabs/record-splicer
2021-08-14 13:00:49 alx741 joins (~alx741@181.196.68.193)
2021-08-14 13:02:43 <kuribas> neat
2021-08-14 13:03:09 burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk)
2021-08-14 13:07:11 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-14 13:07:30 × burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2021-08-14 13:11:29 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds)
2021-08-14 13:12:27 idf joins (~idf@198.23.223.146)
2021-08-14 13:15:53 slowButPresent joins (~slowButPr@user/slowbutpresent)
2021-08-14 13:17:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds)
2021-08-14 13:19:15 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-08-14 13:19:35 <keutoi> Is there a way to get the default Show instance of a data type without deriving it? I have a custom Show instance for a data type, but I also want to see the default as it helps during debugging.
2021-08-14 13:19:40 pragma- joins (~chaos@user/pragmatic-chaos)
2021-08-14 13:23:11 <dminuoso> You can also write out the instance yourself, of course
2021-08-14 13:23:11 burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk)
2021-08-14 13:23:40 <dminuoso> keutoi: Honestly, if you have custom formatting, Show is likely a bad candidate anyway
2021-08-14 13:23:54 <dminuoso> It's often misused as a generic "ToString" type of class, but that's not the purpose of it.
2021-08-14 13:24:35 pfurla joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net)
2021-08-14 13:24:48 <dminuoso> For custom formatting, I'd either have a library specific Pretty typeclass, or a bunch of pretty functions, like prettyFoo and prettyBar. Then you can still use Show for debugging like its intended, and not be in conflict with your domain specific prettification
2021-08-14 13:25:46 vrilles joins (~vrilles@user/aman)
2021-08-14 13:28:01 × pfurla_ quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 248 seconds)
2021-08-14 13:31:12 Atum_ joins (~IRC@user/atum/x-2392232)
2021-08-14 13:32:24 <keutoi> I am only using the custom show instance for debugging, but there is some ambiguity as different inputs produce the same string. In default instance they will be different. So I wanted to see if there is some function, say /show_canonical/ which prints the default version.
2021-08-14 13:33:57 <dminuoso> keutoi: Show is supposed to produce a Haskell expression that evaluates/reads back into the same value.
2021-08-14 13:34:40 markpythonicbitc joins (~markpytho@50.228.44.6)
2021-08-14 13:34:54 <dminuoso> Use something other than Show. Some custom class if you must (generally this is a bad idea, since you rarely have only a single canonical way of stringifying some data type), or just functions
2021-08-14 13:38:28 × lbseale_ quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
2021-08-14 13:40:31 <keutoi> I guess just using functions for custom conversion and deriving the default instance is a saner way of working with this.
2021-08-14 13:40:36 <keutoi> dminuoso: Thank You
2021-08-14 13:42:32 <kuribas> Is there a map which allows fetching by type?
2021-08-14 13:42:58 <dminuoso> You mean like a GADT?
2021-08-14 13:43:07 <kuribas> No, just the type of the contents
2021-08-14 13:43:55 <kuribas> "store :: a -> DynamicMap -> DynamicMap" "retrieve :: DynamicMap -> Maybe a"
2021-08-14 13:44:23 <Hecate> keutoi: from your usecase it would seem that you need a Debug typeclass :)
2021-08-14 13:45:08 <dminuoso> keutoi: What you could do, is use CPP or a runtime flag to swap out the definition of such a pretty function with the use of a deriving generated Show.
2021-08-14 13:45:42 <dminuoso> Presumably you have some fields that are hidden or considered internal?
2021-08-14 13:46:21 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-08-14 13:47:50 <Hecate> guess I my next crusade is to put a Debug typeclass in base
2021-08-14 13:48:26 <dminuoso> What's wrong with Show?
2021-08-14 13:48:40 <dminuoso> Typeclasses are an already bad fit for this domain
2021-08-14 13:48:54 <dminuoso> It works for Show because it has very clear semantics with little room for ambiguities.
2021-08-14 13:48:55 <Hecate> dminuoso: "Show" itself is not problematic, this is not the proper reasoning
2021-08-14 13:49:28 <dminuoso> But for Debug its a bad idea. You generally dont have a single canonical way of presenting a debug output for a value.
2021-08-14 13:49:35 <dminuoso> You tend to have multiple ones
2021-08-14 13:49:41 <dminuoso> It's why Pretty is a bad idea most of time too
2021-08-14 13:50:03 <Hecate> dminuoso: considering the amount of "Show" that is used for Deugging, I'd say this fits in many usecases
2021-08-14 13:50:31 <dminuoso> Hecate: Sure, because often you just want to know how this value was constructed
2021-08-14 13:51:01 <keutoi> dminuoso: I have not used CPP in haskell before, but this might be just what I need for now. Let me try...
2021-08-14 13:51:03 <Hecate> and also what it looks like
2021-08-14 13:51:25 × yoctocell quits (~user@h87-96-130-155.cust.a3fiber.se) (Quit: ERC (IRC client for Emacs 28.0.50))
2021-08-14 13:52:16 machinedgod joins (~machinedg@24.105.81.50)

All times are in UTC.