Logs on 2021-09-08 (liberachat/#haskell)
| 00:03:39 | → | forell joins (~forell@user/forell) |
| 00:06:19 | → | mestre joins (~mestre@191.177.175.57) |
| 00:06:41 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 00:08:09 | × | adam_ quits (uid515807@id-515807.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 00:09:18 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 00:09:32 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 00:11:33 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 00:19:49 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 00:23:43 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) |
| 00:24:19 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 00:31:08 | <dibblego> | omfg it's koala_man AND acidjnk_new3 !! |
| 00:34:40 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 00:34:57 | × | forell quits (~forell@user/forell) (Ping timeout: 265 seconds) |
| 00:35:54 | <koala_man> | omg! |
| 00:39:44 | <Axman6> | OMG! |
| 00:39:47 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 00:40:06 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 00:41:22 | → | forell joins (~forell@user/forell) |
| 00:41:28 | <Axman6> | hexeme: I would also be inclined to make it churn f !a 0 = a |
| 00:41:53 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 00:52:21 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 00:52:22 | × | forell quits (~forell@user/forell) (Ping timeout: 252 seconds) |
| 00:52:39 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 00:59:32 | → | dsrt^ joins (~dsrt@68.101.54.227) |
| 01:01:26 | → | forell joins (~forell@user/forell) |
| 01:02:07 | <iqubic> | You know what feels like a clumsy hack? Using fromEnum to do Word8 -> Int. Is there really no better way to do that? |
| 01:02:26 | <monochrom> | I use fromIntegral |
| 01:04:38 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 01:04:51 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 01:09:47 | → | neurocyte7 joins (~neurocyte@94.16.90.216) |
| 01:09:47 | × | neurocyte7 quits (~neurocyte@94.16.90.216) (Changing host) |
| 01:09:47 | → | neurocyte7 joins (~neurocyte@user/neurocyte) |
| 01:10:29 | × | forell quits (~forell@user/forell) (Ping timeout: 252 seconds) |
| 01:11:19 | → | favonia joins (~favonia@user/favonia) |
| 01:13:22 | × | neurocyte quits (~neurocyte@user/neurocyte) (Ping timeout: 245 seconds) |
| 01:13:22 | neurocyte7 | is now known as neurocyte |
| 01:16:18 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving) |
| 01:16:57 | → | forell joins (~forell@user/forell) |
| 01:17:07 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 01:23:54 | × | awschnap quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 01:24:58 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 01:25:17 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 01:25:43 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 01:25:55 | × | xff0x quits (~xff0x@2001:1a81:5244:5800:bebc:1a37:2a8f:4a9c) (Ping timeout: 252 seconds) |
| 01:27:56 | → | xff0x joins (~xff0x@2001:1a81:527e:a000:8410:b7cd:5783:45ad) |
| 01:27:58 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 01:29:48 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 01:33:55 | × | forell quits (~forell@user/forell) (Ping timeout: 265 seconds) |
| 01:39:17 | → | a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) |
| 01:39:49 | <a6a45081-2b83> | does anyone know, what syntax is this? `lcons :: a -> Vector a %1-> Vector a` |
| 01:40:00 | <a6a45081-2b83> | i.e. the `%1->` thing |
| 01:40:13 | <awpr> | multiplicity syntax from the linear types changes |
| 01:41:20 | → | pzanco joins (~Android@187.104.158.159) |
| 01:42:48 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 01:43:10 | <a6a45081-2b83> | any good tutorial on linear types? |
| 01:45:31 | <roboguy_> | a6a45081-2b83: not sure off the top of my head (maybe someone else will), but essentially it means the function lcons can only use its `Vector a` argument exactly once (no more, no less) |
| 01:46:03 | → | forell joins (~forell@user/forell) |
| 01:46:43 | <a6a45081-2b83> | so isn't this what it usually meant? for e.g. f :: Int -> Int; f x = x + 1 would consume only once right? |
| 01:47:07 | <a6a45081-2b83> | I'm trying to think of an example of a function that would consume it's arguments multiple times... |
| 01:48:10 | <enikar> | easy! Thinks to: double x = x + x |
| 01:48:22 | → | Guest|51 joins (~Guest|51@190.64.212.226) |
| 01:49:53 | → | sleblanc joins (~sleblanc@user/sleblanc) |
| 01:50:10 | <Guest|51> | Hi, I just installed GHC on my Mac. Can I code on visual studio code now the Haskell language? Or I have to code on the terminal? |
| 01:50:54 | <geekosaur> | vscode has several haskell support plugins |
| 01:53:44 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 265 seconds) |
| 01:58:10 | × | pzanco quits (~Android@187.104.158.159) (Quit: IRC for Android 2.1.59) |
| 01:58:45 | <sm> | it's hard to visualise how that restriction on number of uses of an argument would be very useful for preventing errors, in practice. Is it more important as an annotation allowing the compiler to optimise more aggressively ? |
| 01:59:49 | <geekosaur> | it doesn't currently |
| 02:00:15 | <geekosaur> | Cale hates the new extension because he can't see how it'd actually be useful either |
| 02:00:31 | × | forell quits (~forell@user/forell) (Ping timeout: 265 seconds) |
| 02:00:37 | <geekosaur> | he thinks any problem it would solve has a better solution |
| 02:00:39 | <sm> | yes Guest|51, get the Haskell extension for vscode |
| 02:01:56 | <sm> | I've been hearing forever that it enables better performance, removing the need for GC/unpredictable latency, in theory. I'm not quite seeing how |
| 02:02:12 | <sm> | it = "linear types" |
| 02:03:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:03:24 | <sm> | I can believe that, but I'm trying to imagine how it would look in practice |
| 02:04:26 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:04:26 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (erbium.libera.chat (Nickname regained by services))) |
| 02:04:26 | finn_elija | is now known as FinnElija |
| 02:04:36 | <sm> | annotating all my functions with how many times they use their arguments seems silly, more like computer work |
| 02:04:40 | <Maxdamantus> | Presumably because if you know that an allocation is about to be dropped, you can reuse it instead of actually freeing it. |
| 02:04:56 | <Maxdamantus> | So you generally avoid allocations. |
| 02:05:38 | <monochrom> | sm: Suppose I chain up a lot of array transform functions, all of them of type ImmutableArray Int -> ImmutableArray Int for example. If I change "->" to the linear function type, it will be OK, and the compiler can firstly check that the initial array, the final array, and each intermediate array, are all use-once. |
| 02:06:02 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds) |
| 02:06:15 | wrengr | is now known as wrengr_away |
| 02:06:29 | <monochrom> | Secondly, if the compiler also has the related optimization, it will replace my ImmutableArray by a mutable array and do in-place updates, no intermediate array. |
| 02:07:08 | × | Guest|51 quits (~Guest|51@190.64.212.226) (Ping timeout: 252 seconds) |
| 02:07:31 | → | forell joins (~forell@user/forell) |
| 02:07:41 | <sm> | is this another way to say it (in naive language): after the line using xs, compiler can deallocate xs immediately (sooner than otherwise) because it knows xs won't be referenced again later in the function ? |
| 02:07:47 | <monochrom> | You can firstly object that no one seems to be implementing that optimization any time soon. |
| 02:08:03 | <monochrom> | You can secondly object that vector fusion already does the same optimization. |
| 02:08:14 | × | cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds) |
| 02:09:21 | <monochrom> | The only issue with the second objection is that what if I now have ImmutableArray Int -> (ImmutableArray Int, a) and do a state-monad thing. Linear typing can verify and green-light that optimization, currently vector fusion doesn't even recognize that kind of code. |
| 02:09:52 | <monochrom> | I would s/deallocate/repurpose/ |
| 02:10:22 | <sm> | ok |
| 02:10:27 | <monochrom> | Converting purely-functional "xs2 = f xs" to imperative "xs := f xs" |
| 02:10:50 | <monochrom> | See Wadler's "linear types can change the world!" |
| 02:11:20 | <sm> | thanks, that sounds like it would make it clear |
| 02:11:21 | <monochrom> | fully pun title, including the "change", the "world", and the "!" |
| 02:11:30 | → | cheater joins (~Username@user/cheater) |
| 02:11:44 | <sm> | clearer |
| 02:13:33 | <monochrom> | My objection to spending time on linear typing is that firstly no one seems to be implementing the related optimizations any time soon, and secondly the credibility of the safety is compromised by exceptions. |
| 02:14:15 | <monochrom> | To be fair the 2nd point is hearsay, I haven't checked, I only heard other people stating it. |
| 02:14:55 | <hexeme> | https://gist.github.com/dustinlacewell/ddabca4b0f1226683869db0e200abc29 |
| 02:15:15 | <monochrom> | I do have my share of quota of retweeting without fact-checking, no? >:) |
| 02:15:16 | <hexeme> | first actual thing i've made in haskell, a vigenere cipher |
| 02:16:02 | <roboguy_> | I am not an expert, but linear types do enable some new type-level stuff. Like you can have non-trivial comonoids and nontrivial "cocategories" (if I'm using that term correctly), for instance |
| 02:16:25 | → | acidjnk_new joins (~acidjnk@p200300d0c7203092ad57924a0c526f2d.dip0.t-ipconnect.de) |
| 02:16:42 | × | td_ quits (~td@94.134.91.74) (Ping timeout: 245 seconds) |
| 02:18:01 | → | acidjnk joins (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) |
| 02:18:20 | hexeme | is now known as ldlework |
| 02:18:35 | → | td_ joins (~td@94.134.91.19) |
| 02:19:49 | × | acidjnk_new3 quits (~acidjnk@p200300d0c7203092bc4507ecfc2ab120.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 02:20:29 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 02:20:55 | × | acidjnk_new quits (~acidjnk@p200300d0c7203092ad57924a0c526f2d.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 02:25:03 | <roboguy_> | For instance, Chris Penner described a cocategory of logical proofs here: https://twitter.com/chrislpenner/status/1395242159410794496 . I had a go at implementing something based on that here (although I'm not 100% sure this is what he had in mind): https://github.com/roboguy13/cocategory-logic/tree/main/src |
| 02:25:11 | <Cale> | sm: "it" being LinearHaskell doesn't do anything with regard to performance though. |
| 02:25:37 | <Cale> | and I'm not entirely sure that this is even the substructural restriction you want if you care about performance... |
| 02:25:42 | <roboguy_> | I realize that the non-totalness of Haskell breaks this for proving, but maybe something along those lines could still be useful. It's based on the "the argument definitely gets used" part, rather than the "it only gets used once" part |
| 02:26:19 | <Cale> | Clean had uniqueness types, and that actually gave you what you wanted in order to be able to reuse memory. |
| 02:27:14 | <Cale> | I wouldn't be massively opposed to adding uniqueness types to Haskell, but maybe mildly opposed. At least there's a clear story there for attaining a practical goal. |
| 02:28:10 | <monochrom> | For now it's hype, yeah. |
| 02:29:27 | <Cale> | It'd still complicate things at a time when I wish we could get the language's complexity down a bit if possible, and focus on improvements to tooling. |
| 02:30:52 | <monochrom> | Tooling doesn't earn the currency which is academic publication opportunity. This is why even ghci's :doc command took so many years and is still in beta. |
| 02:30:59 | <Cale> | LinearHaskell adds a lot of tricky nonsense to every part of GHC -- the linearity information is retained all the way through to core in order to be core-linted, even though it has no effect past typechecking. |
| 02:31:13 | <monochrom> | Dragged on so much, I doubt any of you still know about :doc any more. |
| 02:31:41 | <monochrom> | Ten years ago it was on everyone's wish list, when everyone hadn't given up hope. |
| 02:31:48 | geekosaur | remembers it sorta |
| 02:32:44 | <roboguy_> | wow, I actually never knew about it |
| 02:34:17 | <Cale> | A dream of mine would be to have a GHC whose driver pipeline is factored into understandable parts, and where it's not a hopeless pipe-dream to build a server that runs 24/7 optimising stuff, and the compiler can just pull the latest simplified version of any given function based on its hash. |
| 02:34:41 | × | alx741 quits (~alx741@181.196.68.218) (Quit: alx741) |
| 02:34:58 | <monochrom> | Ugh did you just pun on "pipe dream"? >:) |
| 02:35:06 | <Cale> | haha, I suppose I did |
| 02:35:34 | <Cale> | It would also be really cool to have GHCi-but-you're-in-the-driver |
| 02:36:28 | <Cale> | (once it's in a form where it's not like, doStuff <18 hard-to-obtain-arguments> |
| 02:36:35 | → | mcglk joins (~mcglk@131.191.49.120) |
| 02:36:35 | <Cale> | ) |
| 02:37:43 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 02:38:28 | <roboguy_> | hmm, not sure I fully know what you mean. GHCi sessions where you can access the GHC API? |
| 02:39:37 | × | mikoto-chan quits (~mikoto-ch@83.137.2.243) (Ping timeout: 252 seconds) |
| 02:47:37 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 02:48:50 | × | forell quits (~forell@user/forell) (Ping timeout: 265 seconds) |
| 02:58:52 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 252 seconds) |
| 03:01:53 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:02:58 | → | forell joins (~forell@user/forell) |
| 03:06:29 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
| 03:06:32 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 03:13:41 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 252 seconds) |
| 03:15:42 | → | john2312 joins (~user@114.250.137.142) |
| 03:24:45 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 03:25:17 | → | Guest|51 joins (~Guest|51@190.64.212.226) |
| 03:26:56 | <Cale> | roboguy_: Yeah, where you can go through the stages of compilation and inspect intermediate results and observe how your program is compiled, explicitly serialise intermediate outputs, or load them from disk |
| 03:27:00 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds) |
| 03:31:05 | × | sleblanc quits (~sleblanc@user/sleblanc) (Ping timeout: 260 seconds) |
| 03:44:38 | × | gnyeki quits (~gnyeki@li578-216.members.linode.com) (Changing host) |
| 03:44:38 | → | gnyeki joins (~gnyeki@user/gnyeki) |
| 03:49:22 | × | otto_s quits (~user@p5de2f2c9.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 03:51:08 | → | otto_s joins (~user@p5b044f3a.dip0.t-ipconnect.de) |
| 03:51:38 | × | forell quits (~forell@user/forell) (Ping timeout: 252 seconds) |
| 03:51:49 | <roboguy_> | Cale: that would be interesting. HERMIT was a little bit like that, but not as sophisticated in that way (and somewhat bit rotted at the moment) |
| 03:51:59 | → | oxide joins (~lambda@user/oxide) |
| 03:52:38 | × | Guest|51 quits (~Guest|51@190.64.212.226) (Ping timeout: 265 seconds) |
| 03:53:47 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 03:55:12 | <roboguy_> | I was one of the developers that made an interface to HERMIT that was actually built on top of GHCi (with all the usual GHCi features, though not generally "lifted" to work on the object program) |
| 03:55:49 | → | forell joins (~forell@user/forell) |
| 03:55:53 | × | a6a45081-2b83 quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection) |
| 03:56:59 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 265 seconds) |
| 03:58:14 | → | oxide joins (~lambda@user/oxide) |
| 04:02:00 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 04:02:58 | → | neo1 joins (~neo3@cpe-292712.ip.primehome.com) |
| 04:07:06 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:10:18 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 04:10:32 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 04:11:26 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 252 seconds) |
| 04:12:34 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
| 04:13:28 | → | oxide joins (~lambda@user/oxide) |
| 04:13:48 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:14:33 | → | vysn joins (~vysn@user/vysn) |
| 04:15:33 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 04:15:36 | × | lstor_ quits (~lstor@user/lstor) (Remote host closed the connection) |
| 04:20:38 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 04:20:51 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 04:20:51 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 04:23:52 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:24:06 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:24:13 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:25:20 | × | neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 260 seconds) |
| 04:25:30 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 04:26:13 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:30:41 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
| 04:30:58 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 04:31:15 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 04:31:21 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 04:31:35 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 04:33:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:33:52 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 04:35:23 | <iqubic> | how does one use Data.Graph from containers? Why does each vertex need a node vaule and a key value? |
| 04:36:06 | <iqubic> | Is this a Map like structure, except with some of the pieces of data are connected via edges? |
| 04:36:13 | × | aarvar quits (~aaron@2601:602:a080:fa0:18d6:e186:b364:ee0b) (Ping timeout: 252 seconds) |
| 04:36:38 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 04:37:09 | <iqubic> | And if I use "graphFromEdges :: Ord key => [(node, key, [key])] -> (Graph, Vertex -> (node, key, [key]), key -> Maybe Vertex)" will that create me a directed graph or an undirected graph? |
| 04:38:10 | → | Everything joins (~Everythin@37.115.210.35) |
| 04:40:24 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 04:41:07 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 04:47:08 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:47:09 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 04:47:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 04:48:29 | <roboguy_> | iqubic: It looks like it uses an adjacency list representation for graphs |
| 04:49:24 | <iqubic> | Yeah, that's fine, but will graphFromEdges give me a directed graph or not? |
| 04:49:25 | <roboguy_> | also, regarding the type in general, it says that it represents a directed graph, so I imagine that function would construct a directed graph |
| 04:49:25 | → | aarvar joins (~aaron@2601:602:a080:fa0:83be:ab52:1765:c75c) |
| 04:49:35 | <iqubic> | Alright, that's good to know. |
| 04:50:26 | <iqubic> | So if I want all edges to be traversable in both directions, I need to add two entries per edge. That's fine. |
| 04:52:05 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 04:55:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:59:49 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 05:03:05 | → | aman joins (~aman@user/aman) |
| 05:04:10 | × | jespada quits (~jespada@90.254.245.194) (Ping timeout: 240 seconds) |
| 05:06:10 | → | jespada joins (~jespada@90.254.245.194) |
| 05:08:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 05:09:50 | × | roboguy_ quits (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) () |
| 05:09:57 | → | ubert joins (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
| 05:10:53 | × | awth13 quits (~awth13@user/awth13) (Remote host closed the connection) |
| 05:10:53 | × | ubert quits (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 05:11:05 | → | ubert joins (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
| 05:11:37 | → | ub joins (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
| 05:15:16 | → | acidjnk_new joins (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) |
| 05:15:57 | → | falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
| 05:17:37 | × | falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Client Quit) |
| 05:18:34 | × | acidjnk quits (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 05:19:07 | → | falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
| 05:20:16 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 05:22:33 | → | awth13 joins (~awth13@user/awth13) |
| 05:23:36 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 05:23:36 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 05:23:36 | → | wroathe joins (~wroathe@user/wroathe) |
| 05:26:33 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 05:26:58 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 05:28:55 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 05:32:42 | → | peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) |
| 05:32:48 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 05:33:01 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:33:23 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 05:41:49 | → | mikoto-chan joins (~mikoto-ch@83.137.2.243) |
| 05:44:33 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2.1) |
| 05:45:03 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 05:45:52 | × | asivitz quits (uid178348@id-178348.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:47:09 | → | homarlone joins (~homarlone@2804:14d:baa3:4341::1000) |
| 05:49:22 | × | xff0x quits (~xff0x@2001:1a81:527e:a000:8410:b7cd:5783:45ad) (Ping timeout: 252 seconds) |
| 05:50:04 | → | xff0x joins (~xff0x@2001:1a81:527e:a000:d157:28e0:13dd:1400) |
| 05:51:01 | × | falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds) |
| 05:51:32 | × | ub quits (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 05:56:06 | → | michalz joins (~michalz@185.246.204.41) |
| 05:56:40 | × | john2312 quits (~user@114.250.137.142) (Quit: ERC (IRC client for Emacs 26.3)) |
| 05:57:04 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 252 seconds) |
| 05:58:11 | × | nicbk quits (~nicbk@user/nicbk) (Quit: nicbk) |
| 05:59:52 | → | falafel joins (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) |
| 05:59:56 | <dsal> | ldlework: You should consider compiling with -Wall. You really want to have type definitions on all the toplevel declarations. Also, type aliases are useful for documenting intent and in a few other areas, but they often lead to regrets. Oh also, much of this code is partial, but doesn't have to be if you use NonEmpty lists for all the operations. |
| 06:00:09 | <dsal> | Though lists are bad at most things. |
| 06:00:22 | × | homarlone quits (~homarlone@2804:14d:baa3:4341::1000) (Remote host closed the connection) |
| 06:01:23 | <ldlework> | thanks for the feedback |
| 06:03:51 | → | chele joins (~chele@user/chele) |
| 06:05:28 | <dsal> | `head` is partial function and this isn't actually any better, but you can grab the first character of that string and the string at the same time and then just let guards select a body. https://www.irccloud.com/pastebin/XnEuFSkH/guards.hs |
| 06:05:47 | <dsal> | I have an irrational dislike of `if/then/else` though. |
| 06:07:36 | <dsal> | Anyway, nothing actually terrible there. Just toplevel types because that's what makes life good. And maybe Seq or NonEmpty. Or… someone wrote a `Data.Sequence.NonEmpty`… |
| 06:09:31 | <dsal> | @src otherwise |
| 06:09:31 | <lambdabot> | otherwise = True |
| 06:16:17 | × | mikoto-chan quits (~mikoto-ch@83.137.2.243) (Ping timeout: 252 seconds) |
| 06:19:06 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 06:24:30 | → | slavaqq joins (~slavaqq@sdmail.sdserver.cz) |
| 06:25:02 | <iqubic> | Man, using Data.Graph for Advent of Code 2017 Day 12 makes it super trivial. |
| 06:25:09 | <iqubic> | https://adventofcode.com/2017/day/12 |
| 06:25:28 | → | kenran joins (~kenran@b2b-37-24-119-190.unitymedia.biz) |
| 06:26:35 | <iqubic> | You are told the data will form a bidirectional graph. Part 1 is just "How many nodes are reachable from node 0?" Part 2 is just "How many disjoint groups exist in your given graph?" |
| 06:27:45 | <iqubic> | This almost feels like cheating, because it's so easy. |
| 06:28:01 | → | Akronymus joins (~Akronymus@85.31.8.180) |
| 06:33:20 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
| 06:34:43 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 06:35:41 | <c_wraith> | it's not like a transitive closure is hard anywayh |
| 06:36:00 | <iqubic> | What does that mean? |
| 06:36:24 | <iqubic> | c_wraith: Are you responding to my commentary on that problem? |
| 06:36:49 | <c_wraith> | it's the graph algorithm for "compute all the sets that are reachable from each other" |
| 06:37:08 | <c_wraith> | well. In an undirected graph that's what it does, anyway. |
| 06:37:14 | <c_wraith> | It's like 1 line of code. |
| 06:38:01 | <c_wraith> | ok, you probably put your base case on a second line. 2 lines. :) |
| 06:38:30 | <iqubic> | Yeah. I know. I actually looked at how Data.Graph does it. |
| 06:38:58 | <iqubic> | part 1 is just "\graph -> length (reachable graph 0)" |
| 06:39:19 | <iqubic> | part 2 is just "\graph -> length (componenets graph)" |
| 06:39:36 | <iqubic> | And then all you need to do is parse the input correctly. |
| 06:40:17 | → | fendor joins (~fendor@77.119.198.92.wireless.dyn.drei.com) |
| 06:41:50 | <iqubic> | Where "reachable" and "components" come from Data.Graph |
| 06:43:20 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 06:47:20 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
| 06:47:53 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
| 06:48:36 | → | redderson joins (~homereddy@79-76-28-67.dynamic.dsl.as9105.com) |
| 06:49:46 | × | sander quits (~sander@user/sander) (Ping timeout: 252 seconds) |
| 06:50:48 | → | sander joins (~sander@user/sander) |
| 06:52:55 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 265 seconds) |
| 06:58:47 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 06:59:13 | × | falafel quits (~falafel@2603-8000-d801-2d68-1d6d-bf72-eba2-a20e.res6.spectrum.com) (Ping timeout: 252 seconds) |
| 07:01:30 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:05:13 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:05:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:07:12 | → | cjb joins (~cjb@user/cjb) |
| 07:10:10 | × | hiredman quits (~hiredman@frontier1.downey.family) (Ping timeout: 240 seconds) |
| 07:10:36 | → | zmt00 joins (~zmt00@user/zmt00) |
| 07:11:40 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
| 07:13:06 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 256 seconds) |
| 07:13:33 | → | zmt01 joins (~zmt00@user/zmt00) |
| 07:14:42 | → | lavaman joins (~lavaman@98.38.249.169) |
| 07:15:43 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
| 07:17:02 | × | aman quits (~aman@user/aman) (Quit: aman) |
| 07:17:18 | × | cjb quits (~cjb@user/cjb) (Quit: cjb) |
| 07:17:43 | → | cjb joins (~cjb@user/cjb) |
| 07:19:30 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 07:21:42 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 07:22:00 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 07:22:05 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 07:22:18 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 07:22:52 | → | Gurkenglas joins (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) |
| 07:23:08 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 07:23:21 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 07:23:44 | → | kuribas joins (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) |
| 07:27:14 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 265 seconds) |
| 07:34:58 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 252 seconds) |
| 07:35:03 | <acidjnk_new> | omg it'd dibblego and koala_man! |
| 07:38:57 | × | smitop quits (~smitop@user/smitop) (Quit: Ping timeout (120 seconds)) |
| 07:39:42 | → | smitop joins (~smitop@user/smitop) |
| 07:41:12 | <Hecate> | omg |
| 07:41:19 | ← | jmcantrell parts (~jmcantrel@user/jmcantrell) () |
| 07:42:31 | × | Jonno_FTW quits (~come@user/jonno-ftw/x-0835346) (Ping timeout: 252 seconds) |
| 07:43:02 | → | Jonno_FTW joins (~come@api.carswap.me) |
| 07:43:28 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 07:43:43 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 07:44:21 | <iqubic> | I'm not sure what that means. Heh. |
| 07:44:50 | × | redderson quits (~homereddy@79-76-28-67.dynamic.dsl.as9105.com) (Ping timeout: 260 seconds) |
| 07:48:49 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 07:49:02 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 07:49:56 | → | Lycurgus joins (~juan@98.4.112.204) |
| 07:51:23 | → | max22- joins (~maxime@2a01cb08833598002509ac2269711c4a.ipv6.abo.wanadoo.fr) |
| 07:52:11 | → | zmt00 joins (~zmt00@user/zmt00) |
| 07:54:13 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
| 07:54:36 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi) |
| 07:54:56 | × | kuribas quits (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 07:55:13 | → | kuribas joins (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) |
| 07:57:08 | → | burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
| 08:03:14 | <albet70> | how to do when I want more effects than two? |
| 08:04:12 | <albet70> | still monad trans? |
| 08:06:09 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:08:20 | → | oxide joins (~lambda@user/oxide) |
| 08:09:36 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 08:10:35 | <[exa]> | albet70: transformers will generally work until you hit some problems where 2 monads need to cast the side effects on each other |
| 08:10:53 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:11:05 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 08:11:34 | <[exa]> | (at that point you can either do a custom monad, spend a nice week or two with the advanced effect systems, or just layer the software better. :D ) |
| 08:11:38 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 08:13:38 | <albet70> | sorry I don't understand what "layer the software better " mean? my english isn't good |
| 08:13:53 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 08:14:07 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 08:15:11 | <[exa]> | albet70: by that I meant basically "redesign", so that both monad transformers don't need to influence each other, keeping it nicely layered and unidirectional instead |
| 08:15:54 | <albet70> | ok |
| 08:16:21 | <[exa]> | anyway yeah the answer was "go with transformers until it grows too much, then probably write a custom monad" |
| 08:17:45 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 08:17:45 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 08:17:48 | allbery_b | is now known as geekosaur |
| 08:18:30 | <albet70> | I haven't written a meaningful custom monad yet |
| 08:18:45 | <albet70> | with multiple effects |
| 08:19:14 | <kuribas> | I always write custom monads as a newtype on existing transformers. |
| 08:19:21 | <kuribas> | Saves me from the plumbing. |
| 08:19:57 | <kuribas> | And inspecting core shows me it's the same code anyway. |
| 08:20:05 | <albet70> | could you share them? simple examples will be better |
| 08:21:06 | <kuribas> | and recently I also started to do type MyInnerMonad = ..monadstack, then newtype MyMonad a = MyMonad (MyInnerMonad a) |
| 08:21:16 | <merijn> | albet70: Something like: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Core.hs#L96-L99 |
| 08:21:18 | <kuribas> | it makes it easier to write helpers for my monad. |
| 08:21:35 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) |
| 08:21:56 | <kuribas> | albet70: https://hackage.haskell.org/package/hasqlator-mysql-0.0.8/docs/src/Database.MySQL.Hasqlator.Typed.html#Query |
| 08:23:00 | <kuribas> | albet70: also, I never derive MonadState, MonadReader, etc... I write my own functions to encapsulate them. |
| 08:23:16 | <kuribas> | except MonadIO |
| 08:23:36 | <kuribas> | because whatever state my stack is using, should be an implementation detail. |
| 08:23:38 | <merijn> | ^^ that is the way |
| 08:28:50 | × | cjb quits (~cjb@user/cjb) (Quit: cjb) |
| 08:29:31 | → | cjb joins (~cjb@user/cjb) |
| 08:31:25 | <Rembane> | kuribas: Are the derived transformers always available? |
| 08:31:48 | <kuribas> | which derived transformers? |
| 08:36:41 | <Rembane> | kuribas: I think I asked that question in the wrong way. You never derive MonadState et al, because you want the state of the stack to be an implementatoin detail, so how can someone else get to the state if e.g. MonadState is derived? |
| 08:37:23 | <merijn> | Rembane: They can't, except through specific functions. That's the point |
| 08:37:25 | <kuribas> | Rembane: they cannot, and should not. I'll have helper functions to get any state, if the business logic requires it. |
| 08:37:40 | <merijn> | If you expose MonadState/MonadReader in your API, you're messing up |
| 08:37:55 | <merijn> | The mtl classes are a terrible API and you should never expose them |
| 08:38:17 | <Rembane> | merijn, kuribas: Got it! |
| 08:38:24 | <kuribas> | Rembane: unless it's a library monad with an user defined internal stack. But in that case you need to write manual instances anyway. |
| 08:38:45 | <kuribas> | Because the MonadState should target the user stack, not your stack. |
| 08:38:53 | <merijn> | Rembane: The problem is you get people implementing MonadReader for Monad (or transformer) X and another for Y and now you can never combine the two ever |
| 08:39:02 | <kuribas> | merijn: well, I find them ok for doing plumbing. |
| 08:39:42 | <merijn> | mtl-style classes work well for exposing *specific* functionality that's unique within a program. The problem is that the mtl classes are too general to guarantee uniqueness |
| 08:40:56 | <Rembane> | That sounds reasonable. |
| 08:41:54 | <Hecate> | "yer mum's reasonable, Rembane" |
| 08:41:59 | <Hecate> | (hello, good morning) |
| 08:42:07 | <merijn> | Hecate: So's your face |
| 08:42:25 | <Rembane> | Hecate: And your mum! :D |
| 08:43:10 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 08:43:26 | <merijn> | (I always read "yer" in a Scottish accent and if there's one thing I've learned in Scotland it is that "so's your face" is an appropriate retort to all remarks :p) |
| 08:44:02 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 08:44:51 | <kuribas> | HecateyMcHcatyFace? |
| 08:48:39 | <arahael> | Just finally looked at reflex-frp, I'd have to say that the "Comprehensive Reflex Documentation" really should be the first thing to look at. |
| 08:49:11 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 08:51:41 | <Hecate> | merijn: that was absolutely the spirit :) |
| 08:51:52 | <Hecate> | kuribas: :'D |
| 08:56:03 | <merijn> | I should go to Scotland again...well, once we're done with all this covid nonsense >.> |
| 08:56:11 | × | Akronymus quits (~Akronymus@85.31.8.180) (Ping timeout: 256 seconds) |
| 08:56:15 | <merijn> | So 5 years from now at the current rate >.> |
| 08:56:27 | → | thyriaen joins (~thyriaen@x4dbfb542.dyn.telefonica.de) |
| 08:58:01 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 09:01:37 | → | GoodbyeVincent joins (~GoodbyeVi@2a03:8600:1001:1337::2001) |
| 09:01:44 | arahael | wants to visit scotland and check out his cousin's ancestry there. |
| 09:01:53 | <arahael> | so much bloodthirsty history. |
| 09:04:55 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:51c9:9325:5764:1e14) (Remote host closed the connection) |
| 09:05:58 | <merijn> | arahael: And the Scotch Malt Whisky Society, while you're at it ;) |
| 09:06:28 | <merijn> | Although that's probably more -offtopic material :p |
| 09:08:33 | × | hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:10:40 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 252 seconds) |
| 09:11:22 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:11:34 | → | oxide joins (~lambda@user/oxide) |
| 09:17:15 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:20:47 | × | cjb quits (~cjb@user/cjb) (Quit: cjb) |
| 09:25:39 | → | hexfive joins (~eric@50.35.83.177) |
| 09:26:59 | × | slavaqq quits (~slavaqq@sdmail.sdserver.cz) (Quit: Client closed) |
| 09:27:59 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 09:30:19 | × | hexfive quits (~eric@50.35.83.177) (Client Quit) |
| 09:33:23 | × | slep quits (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 265 seconds) |
| 09:34:01 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 09:36:49 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 09:37:50 | → | Guest59 joins (~Guest59@108.109.220.111.sta.wbroadband.net.au) |
| 09:38:45 | → | amk joins (~amk@109.255.169.126) |
| 09:39:08 | ← | Guest59 parts (~Guest59@108.109.220.111.sta.wbroadband.net.au) () |
| 09:39:09 | → | Guest59 joins (~Guest59@108.109.220.111.sta.wbroadband.net.au) |
| 09:39:39 | × | mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal) |
| 09:39:45 | ← | Guest59 parts (~Guest59@108.109.220.111.sta.wbroadband.net.au) () |
| 09:41:38 | → | slep joins (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) |
| 09:42:01 | × | xff0x quits (~xff0x@2001:1a81:527e:a000:d157:28e0:13dd:1400) (Ping timeout: 252 seconds) |
| 09:42:57 | → | xff0x joins (~xff0x@port-92-195-70-241.dynamic.as20676.net) |
| 09:43:16 | × | GoodbyeVincent quits (~GoodbyeVi@2a03:8600:1001:1337::2001) (Remote host closed the connection) |
| 09:45:03 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 09:45:10 | → | amk joins (~amk@109.255.169.126) |
| 09:45:36 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 09:45:45 | → | amk joins (~amk@109.255.169.126) |
| 09:45:58 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 09:46:06 | → | amk joins (~amk@109.255.169.126) |
| 09:57:05 | <tdammers> | merijn: we may be done with covid one day, but the nonsense is permanent |
| 10:03:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 10:04:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:05:20 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 10:07:54 | × | hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 10:07:56 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 10:09:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 245 seconds) |
| 10:10:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 10:10:25 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:12:03 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 10:12:22 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 10:13:03 | <arahael> | And sadly predated covid. |
| 10:13:26 | → | hololeap_ joins (~hololeap@user/hololeap) |
| 10:15:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 10:16:13 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:17:46 | × | aarvar quits (~aaron@2601:602:a080:fa0:83be:ab52:1765:c75c) (Ping timeout: 252 seconds) |
| 10:20:23 | → | glassy joins (~glassy@user/glassy) |
| 10:20:30 | <glassy> | hi |
| 10:21:07 | <glassy> | is ARM better suited for functional (lazy?) languages with weak memory ordering? |
| 10:21:25 | <glassy> | compared to x86 |
| 10:21:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:22:22 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:23:26 | <glassy> | just because a functional compiler i think would have more liberty to put memory stores wherever it wants as the steps do not need to be executed imperatively |
| 10:23:30 | × | azeem quits (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) (Ping timeout: 256 seconds) |
| 10:24:09 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 10:24:10 | → | azeem joins (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) |
| 10:24:24 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 10:24:30 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 10:24:45 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 10:24:51 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 10:25:12 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 10:25:25 | <maerwald> | I think we just got a native code generator for ARM and I'd be surprised if it outperforms x86 |
| 10:29:14 | <glassy> | it is new and ARM isn't that popular though |
| 10:29:18 | <glassy> | i just meant theoretically |
| 10:29:25 | <gehmehgeh> | do you mean x86 or "amd64"? |
| 10:29:30 | <glassy> | amd64 |
| 10:29:32 | <gehmehgeh> | k |
| 10:29:35 | <glassy> | my bad |
| 10:32:21 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 10:33:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:38:19 | × | nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.2) |
| 10:39:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 10:39:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:44:43 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 10:45:40 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:54:34 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds) |
| 10:56:31 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 10:57:38 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:00:57 | → | pavonia joins (~user@user/siracusa) |
| 11:00:58 | → | alx741 joins (~alx741@181.196.68.218) |
| 11:10:06 | → | AlexNoo_ joins (~AlexNoo@178.34.161.122) |
| 11:11:40 | × | AlexZenon quits (~alzenon@178.34.151.45) (Ping timeout: 240 seconds) |
| 11:13:22 | × | Alex_test quits (~al_test@178.34.151.45) (Ping timeout: 256 seconds) |
| 11:13:22 | → | polyphem joins (~polyphem@2a02:810d:640:776c:1bc:e34d:641e:231a) |
| 11:13:50 | × | AlexNoo quits (~AlexNoo@178.34.151.45) (Ping timeout: 252 seconds) |
| 11:14:22 | → | hiredman joins (~hiredman@frontier1.downey.family) |
| 11:14:38 | <kuribas> | How do I print a utf8 bytestring? |
| 11:14:44 | <kuribas> | Or do I need to convert to Text first? |
| 11:15:18 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 11:15:32 | → | AlexZenon joins (~alzenon@178.34.161.122) |
| 11:15:35 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 11:16:08 | → | lavaman joins (~lavaman@98.38.249.169) |
| 11:17:23 | → | Alex_test joins (~al_test@178.34.161.122) |
| 11:17:56 | <hololeap_> | kuribas: you can just do Data.ByteString.putStr and the console should be able to handle it |
| 11:18:01 | <merijn> | That's a category error |
| 11:18:06 | hololeap_ | is now known as hololeap |
| 11:18:14 | <merijn> | hololeap: That is...pretty terrible advice |
| 11:18:35 | <hololeap> | is it false? |
| 11:18:41 | <kuribas> | hololeap: yes |
| 11:18:52 | <merijn> | hololeap: It depends on the locale configured for the console |
| 11:19:05 | <kuribas> | at outputs ASCII |
| 11:19:19 | <merijn> | The fact that you have mostly encountered consoles with utf-8 locales is a coincidence |
| 11:19:34 | <merijn> | I wouldn't be surprised if asian locales did not default to utf-8 |
| 11:19:58 | <merijn> | What you *should* do is check the configured locale and then convert based on that. Which is what text/string do in GHC |
| 11:20:02 | <[exa]> | +1, utf-16 is pretty common |
| 11:20:26 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 11:20:33 | <merijn> | kuribas: The least headache, most correct way is to convert to Text and output that, yes |
| 11:21:36 | <hololeap> | so, Text.putStr will do proper encoding depending on the locale of the console? |
| 11:21:40 | <merijn> | Yes |
| 11:21:47 | <hololeap> | ok, TIL |
| 11:22:13 | <merijn> | Well, the locale specified in the environment variables. But unless you manually fucked it up, your console should set those correctly |
| 11:23:11 | <merijn> | The odds of you printing so much text that copying it to convert to Text is problematic seems...unlikely and niche enough to postpone worrying about it until it's proven to be a problem :) |
| 11:23:45 | <arahael> | ShiftJIS is also still used, I believe. |
| 11:24:31 | <merijn> | kuribas: Decoding to text will also let you manually specify how to handle errors if you get incorrect utf8 |
| 11:25:11 | <kuribas> | merijn: this comes from Aeson, but I found encodeToLazyText can encode directly to Text. |
| 11:25:53 | → | akegalj joins (~akegalj@89-172-127-119.adsl.net.t-com.hr) |
| 11:25:58 | → | fendor_ joins (~fendor@178.165.191.44.wireless.dyn.drei.com) |
| 11:28:41 | × | fendor quits (~fendor@77.119.198.92.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 11:30:11 | × | ArctVaulMarsHMPJ quits (~pjetcetal@2.95.102.85) (Quit: EXIT) |
| 11:32:37 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 11:32:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 11:37:51 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 11:38:10 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
| 11:38:33 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 11:39:59 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 11:40:32 | × | sudden quits (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (Ping timeout: 250 seconds) |
| 11:40:41 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 11:40:47 | → | sudden joins (~cat@h-98-128-128-173.A351.priv.bahnhof.se) |
| 11:40:55 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 11:42:53 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:45:47 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 11:45:51 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:53:55 | × | max22- quits (~maxime@2a01cb08833598002509ac2269711c4a.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 11:57:21 | × | vysn quits (~vysn@user/vysn) (Quit: WeeChat 3.2) |
| 11:57:37 | → | vysn joins (~vysn@user/vysn) |
| 11:59:02 | → | Unhammer joins (~Unhammer@user/unhammer) |
| 12:00:27 | × | infinity0 quits (~infinity0@occupy.ecodis.net) (Ping timeout: 245 seconds) |
| 12:00:56 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 12:01:37 | → | infinity0 joins (~infinity0@occupy.ecodis.net) |
| 12:04:16 | × | fryguybob quits (~fryguybob@cpe-74-65-17-248.rochester.res.rr.com) (Remote host closed the connection) |
| 12:04:49 | × | glassy quits (~glassy@user/glassy) (Quit: Client closed) |
| 12:05:21 | → | andre joins (~andre@41.76.35.141) |
| 12:06:35 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2) |
| 12:07:12 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 12:07:49 | <Axman6> | On a related note, utf8 Text is so close! |
| 12:08:36 | × | alx741 quits (~alx741@181.196.68.218) (Quit: alx741) |
| 12:10:54 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:10:55 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 12:11:42 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 245 seconds) |
| 12:12:01 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 12:12:31 | <tdammers> | I wonder if I'm the only one in the Haskell world who has absolutely no feelings either way about utf8-Text |
| 12:13:59 | <hpc> | https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10j1ZRgKdcHIoU%2Fgiphy.gif&f=1&nofb=1 |
| 12:16:05 | <lortabac> | tdammers: I don't care about which encoding is used in the implementation, but apparently there are performance improvements with UTF8 Text |
| 12:16:17 | <merijn> | tdammers: I don't either |
| 12:19:01 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:19:34 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:24:07 | <Cale> | It'll probably make the jank we end up doing to hack the text package under GHCJS to use Javascript strings directly a good deal simpler. |
| 12:25:13 | <Cale> | (otoh, it'll also probably need to be redone...) |
| 12:29:44 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
| 12:33:28 | × | enikar quits (~enikar@user/enikar) (Quit: WeeChat 2.8) |
| 12:35:29 | → | gentauro joins (~gentauro@user/gentauro) |
| 12:36:32 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer) |
| 12:36:59 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 12:40:19 | → | luc03 joins (~a@p200300ef970830a990422b88d9bc8098.dip0.t-ipconnect.de) |
| 12:41:01 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 12:41:14 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 12:42:19 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 12:44:05 | × | kuribas quits (~user@ptr-25vy0i94ndau7ucnb65.18120a2.ip6.access.telenet.be) (Ping timeout: 260 seconds) |
| 12:45:05 | × | burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Remote host closed the connection) |
| 12:52:38 | → | Akronymus joins (~Akronymus@85.31.8.180) |
| 12:52:46 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 12:53:12 | × | lavaman quits (~lavaman@98.38.249.169) (Read error: Connection reset by peer) |
| 12:53:41 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:56:08 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 12:56:26 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 12:56:41 | → | Pickchea joins (~private@user/pickchea) |
| 12:56:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 13:03:30 | <arahael> | i dont understand how recursive do is evaluated. |
| 13:04:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:04:27 | <arahael> | reading this a bit before bed: https://www.schoolofhaskell.com/school/to-infinity-and-beyond/pick-of-the-week/guide-to-ghc-extensions/basic-syntax-extensions#recursivedo-and-dorec |
| 13:06:01 | <arahael> | eh, |
| 13:06:17 | <arahael> | perhaps i should read it in the new day. |
| 13:07:41 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 13:08:13 | → | MQ-17J joins (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
| 13:08:47 | → | sleblanc joins (~sleblanc@user/sleblanc) |
| 13:09:10 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 260 seconds) |
| 13:09:20 | <shachaf> | arahael: I think I learned it from https://leventerkok.github.io/papers/erkok-thesis.pdf which was pretty readable if I remember correctly. |
| 13:09:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 13:10:19 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:12:02 | <arahael> | shachaf: at a glance that looks pretty good, thanks! |
| 13:13:12 | AlexNoo_ | is now known as AlexNoo |
| 13:13:18 | × | cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds) |
| 13:15:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 13:16:40 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:17:23 | × | phma quits (~phma@host-67-44-209-108.hnremote.net) (Read error: Connection reset by peer) |
| 13:19:07 | → | phma joins (~phma@host-67-44-209-91.hnremote.net) |
| 13:19:35 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 13:22:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 13:22:43 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:26:05 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 13:27:31 | × | sleblanc quits (~sleblanc@user/sleblanc) (Ping timeout: 252 seconds) |
| 13:29:40 | × | andre quits (~andre@41.76.35.141) (Quit: WeeChat 3.2) |
| 13:33:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 13:33:23 | × | jlamothe quits (~jlamothe@104.158.48.100) (Quit: leaving) |
| 13:34:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:36:25 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 13:38:29 | → | hendursaga joins (~weechat@user/hendursaga) |
| 13:38:53 | → | cheater joins (~Username@user/cheater) |
| 13:39:45 | × | Akronymus quits (~Akronymus@85.31.8.180) (Quit: Client closed) |
| 13:39:58 | × | infinity0 quits (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
| 13:39:58 | → | Akronymus joins (~Akronymus@85.31.8.180) |
| 13:41:19 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 13:41:20 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 13:41:20 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:42:27 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 13:42:54 | → | pleroma_ joins (~pleroma@182.70.231.150) |
| 13:46:16 | → | TranquilEcho joins (~grom@user/tranquilecho) |
| 13:49:32 | → | aman joins (~aman@user/aman) |
| 13:49:37 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 13:53:26 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 13:53:40 | → | max22- joins (~maxime@2a01cb08833598003176d874852ce483.ipv6.abo.wanadoo.fr) |
| 13:54:45 | × | MQ-17J quits (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
| 13:55:04 | → | MQ-17J joins (~MQ-17J@35.50.7.10) |
| 13:55:15 | × | dsrt^ quits (~dsrt@68.101.54.227) (Ping timeout: 260 seconds) |
| 13:56:27 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 13:59:36 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 14:00:44 | → | tinhatcat joins (~manjaro-g@2620:103:a000:2201:8e4c:af6a:e11c:11a1) |
| 14:04:55 | × | thyriaen quits (~thyriaen@x4dbfb542.dyn.telefonica.de) (Quit: Leaving) |
| 14:05:50 | → | burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
| 14:06:21 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 14:06:34 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 14:06:35 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 14:06:46 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 14:06:49 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 14:07:03 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 14:07:09 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 14:07:22 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 14:08:42 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 14:12:35 | × | burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Ping timeout: 252 seconds) |
| 14:13:10 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Ping timeout: 252 seconds) |
| 14:13:18 | × | aman quits (~aman@user/aman) (Quit: aman) |
| 14:17:23 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 14:17:29 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 14:17:42 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 14:21:32 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 14:23:32 | × | nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.) |
| 14:25:19 | → | acidjnk_new3 joins (~acidjnk@p200300d0c7203089886436e542e4e0a8.dip0.t-ipconnect.de) |
| 14:25:49 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
| 14:28:34 | × | acidjnk_new quits (~acidjnk@p200300d0c7203092886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 14:30:00 | <kritzefitz> | Wow. I just had to document some perl code in POD. I never even realized how good haddock is in comparison. |
| 14:33:10 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
| 14:33:14 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 14:35:10 | × | akegalj quits (~akegalj@89-172-127-119.adsl.net.t-com.hr) (Ping timeout: 252 seconds) |
| 14:36:49 | → | gentauro joins (~gentauro@user/gentauro) |
| 14:38:45 | <merijn> | kritzefitz: Haskell tools are as bad as everyone claims...until you try and use comparable tools in other languages #ChangeMyMind :p |
| 14:42:21 | → | jlamothe joins (~jlamothe@104.158.48.100) |
| 14:42:59 | → | neo1 joins (~neo3@cpe-292712.ip.primehome.com) |
| 14:45:02 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2) |
| 14:45:27 | → | aman joins (~aman@user/aman) |
| 14:45:28 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 14:47:09 | <tdammers> | dependency hell is real in all language ecosystems; you just get different symptoms |
| 14:47:50 | × | kenran quits (~kenran@b2b-37-24-119-190.unitymedia.biz) (Quit: WeeChat info:version) |
| 14:50:37 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:52:24 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:54:36 | → | Guest|67 joins (~Guest|67@fs226-222.bard.edu) |
| 14:55:31 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 14:57:02 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
| 15:02:16 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 15:03:32 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 15:05:55 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 15:08:19 | → | jumper149 joins (~jumper149@80.240.31.34) |
| 15:09:23 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 15:10:20 | × | xff0x quits (~xff0x@port-92-195-70-241.dynamic.as20676.net) (Ping timeout: 252 seconds) |
| 15:10:34 | × | pleroma_ quits (~pleroma@182.70.231.150) (Quit: leaving) |
| 15:12:51 | × | Akronymus quits (~Akronymus@85.31.8.180) (Quit: workday is over.) |
| 15:14:44 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 15:15:38 | → | xff0x joins (~xff0x@2001:1a81:527e:a000:2ce2:bb46:8710:1c2a) |
| 15:15:43 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:81b7:59ef:d71d:f800) (Quit: WeeChat 2.8) |
| 15:23:36 | → | slack1256 joins (~slack1256@12.0.89.245) |
| 15:24:40 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer) |
| 15:26:55 | <slack1256> | On a imaginary dependent haskell, would there be a need for DataKinds ? |
| 15:28:07 | × | MQ-17J quits (~MQ-17J@35.50.7.10) (Read error: Connection reset by peer) |
| 15:30:08 | <dminuoso> | Why are you asking whether there'd be need for a concrete specific extension in a completely unspecified imaginary language? |
| 15:30:14 | <dminuoso> | The question doesn't seem to make sense |
| 15:30:40 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 15:30:42 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 15:31:12 | → | vysn joins (~vysn@user/vysn) |
| 15:32:39 | <monochrom> | arahael: https://wiki.haskell.org/MonadFix desugars recursive-do to mfix. This reduces the question to: what does mfix do, and how, for each specific instance. |
| 15:33:05 | <merijn> | slack1256: Nope |
| 15:33:15 | <merijn> | slack1256: But dependent haskell is gonna be a mess, imo |
| 15:33:27 | <merijn> | slack1256: If you're curious about this stuff, I'd highly recommend looking into idriss |
| 15:34:15 | <monochrom> | Oh, Erkok's thesis is even better about mfix. But it predates do-rec. At that time we had at most mdo. |
| 15:36:11 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 15:39:34 | → | MQ-17J joins (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
| 15:41:44 | <slack1256> | dminuoso: Well it's not that unspecified if Richards' ghc proposal are anything to go by. And sure, we can imagine worlds that don't actually exists, we have imagination. I just want to know if DataKinds would be redudant on that dependent version of haskell. |
| 15:42:35 | → | fresheyeball joins (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
| 15:43:05 | <slack1256> | merijn: Gotcha, I think that will answer my doubts more throughly than anything I could ask. |
| 15:43:13 | <maerwald> | slack1256: that's not even the actual DH proposal |
| 15:45:11 | <slack1256> | https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0378-dependent-type-design.rst |
| 15:45:29 | <slack1256> | I should have posted it sooner, sorry. |
| 15:45:55 | <maerwald> | Yeah, it's more of a sketch |
| 15:46:41 | <maerwald> | ""Do we want to have dependent types in GHC?" front and center. This proposal does just that, by putting forward a design sketch for what dependent types might look like in GHC." |
| 15:46:51 | <maerwald> | "might look like" |
| 15:47:02 | → | pzanco joins (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) |
| 15:47:12 | <maerwald> | so this is an incremental effort |
| 15:47:24 | <maerwald> | it's not an actual proposal for actual DT in GHC |
| 15:47:33 | <slack1256> | Got it. |
| 15:47:43 | × | hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 15:48:07 | → | hendursaga joins (~weechat@user/hendursaga) |
| 15:49:01 | → | ub joins (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
| 15:49:09 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 15:49:59 | → | vaibhavsagar[m] joins (~vaibhavsa@2001:470:69fc:105::ffe) |
| 15:50:01 | <slack1256> | merijn: By the way, do you know if it "doable" to integrate idris2 on certain parts of a haskell program? No IPC, but maybe a program/TH to translate between types of the two languages? |
| 15:50:25 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 15:50:54 | <merijn> | slack1256: no clue, more of a question for #idris? :p |
| 15:51:18 | <merijn> | slack1256: On the bright side, most Idris docs are explicitly written for people coming from Haskell, so should be easy enough to get into :p |
| 15:52:40 | <dminuoso> | slack1256: That wouldn't be imaginary, then. If you're wondering whether the current path of GHC would make DataKinds redundant, then yes. |
| 15:52:43 | × | ubert quits (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 15:52:43 | ub | is now known as ubert |
| 15:53:15 | → | lavaman joins (~lavaman@98.38.249.169) |
| 15:57:07 | × | cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds) |
| 15:57:44 | <slack1256> | Maybe a more explicit framework would have helped from my part and a more caritative interpretation from yours would have been better. |
| 15:58:03 | → | ubert1 joins (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) |
| 16:00:59 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 16:04:10 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 16:04:30 | × | fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 16:04:38 | × | supersven quits (sid501114@id-501114.ilkley.irccloud.com) (Ping timeout: 256 seconds) |
| 16:05:00 | → | supersven joins (sid501114@id-501114.ilkley.irccloud.com) |
| 16:11:30 | × | MQ-17J quits (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
| 16:12:40 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 16:18:38 | → | cheater joins (~Username@user/cheater) |
| 16:22:12 | → | k`` joins (~user@152.1.137.158) |
| 16:22:57 | × | Pickchea quits (~private@user/pickchea) (Remote host closed the connection) |
| 16:23:18 | <k``> | Is there a way to bundle a constructor with a type alias like one can bundle a pattern synonym with a data type? |
| 16:24:45 | <dminuoso> | "bundle"? |
| 16:26:51 | <k``> | I've had to reorder the type parameters of a data type to write the right class instances. Now I want to export the original type as an alias with the original parameter order (for people who write type signatures), and export the alias with the constructors (for people who explicitly import `Type(..)` rather than just importing the whole module). |
| 16:27:22 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 16:27:45 | <k``> | It's possible to bundle patterns with a type constructor using `TypeConstructor(pattern Pattern)` |
| 16:28:07 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 16:28:44 | <k``> | I'm wondering whether there's a way to bundle the constructor functions with the type alias in a similar way (e.g. `Alias(pattern Constructor)` ) |
| 16:29:10 | × | Eoco quits (~ian@x-160-94-179-157.acm.umn.edu) (Ping timeout: 240 seconds) |
| 16:29:12 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 16:29:35 | <dsal> | k``: are you sure you want a type alias? |
| 16:29:48 | <k``> | As it stands, folks will be fine with the change as long as they haven't explicitly imported the data type. But I don't want to screw someone over just because they used an explicit import! |
| 16:30:42 | <k``> | dsal: Yes. Does it seem like there's something else I should do? |
| 16:31:39 | <dsal> | Probably a newtype. Type aliases aren't useful for much more than documentation. And just like documentation, I tend to ignore them and have quite bad results. |
| 16:33:09 | <k``> | Making a newtype would be way more disruptive. Rather than just messing with folks who use explicit imports (likely very few), it would mess with absolutely everyone. |
| 16:33:19 | × | pzanco quits (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) (Quit: Leaving) |
| 16:33:23 | → | kuribas joins (~user@ptr-25vy0i9dsqr9crcldit.18120a2.ip6.access.telenet.be) |
| 16:33:24 | → | zebrag joins (~chris@user/zebrag) |
| 16:33:48 | <luc03> | I want to write a function `readEither :: forall a. Read a => String -> Either String a` that works like readMaybe but says what went wrong. I could write `case readMaybe @a myString of; Nothing -> Left "Parse error"; Just x -> Right x` but this is useless because just like readMaybe it does not give a useful error message. |
| 16:33:49 | <luc03> | I would like to have an error message like "Impossible to parse a Bool from String \"foo\"" if I write `readEither @Bool "foo"`. |
| 16:33:51 | <luc03> | But now I need to know what type @a is and I need its name as a String. |
| 16:33:53 | <luc03> | Is it possible to write this function? |
| 16:34:14 | <k``> | The order of the type parameters is irrelevant except for the definition of class instances as long as nobody is writing orphan instances. |
| 16:35:53 | → | wonko joins (~wjc@62.115.229.50) |
| 16:37:52 | → | __monty__ joins (~toonn@user/toonn) |
| 16:38:15 | <pavonia> | luc03: Not in general, as Show doesn't provide context about a type. You could add another constraint that gives that information, e.g. Typeable |
| 16:38:43 | × | slack1256 quits (~slack1256@12.0.89.245) (Ping timeout: 265 seconds) |
| 16:39:24 | <luc03> | pavonia: Something like readEither :: (Read a, Typeable a) => ... ? |
| 16:39:32 | <pavonia> | Yes |
| 16:40:01 | <k``> | luc03: I don't know if there's a way to show the type that you're trying to parse, but it seems like the simplest thing is to append the string you're trying to parse to the failure message. Could specifically extract the point of failure using the `ReadPrec` machinery. |
| 16:41:57 | <tomsmeding> | % :m +Data.Typeable +Text.Read |
| 16:41:57 | <yahb> | tomsmeding: syntax: :module [+/-] [*]M1 ... [*]Mn |
| 16:42:07 | <tomsmeding> | % import Data.Typeable |
| 16:42:07 | <yahb> | tomsmeding: |
| 16:42:11 | <tomsmeding> | % import Text.Read |
| 16:42:11 | <yahb> | tomsmeding: |
| 16:42:16 | <tomsmeding> | % :set -XScopedTypeVariables |
| 16:42:16 | <yahb> | tomsmeding: |
| 16:42:17 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 16:42:22 | <tomsmeding> | % readEither :: forall a. (Typeable a, Read a) => String -> Either String a ; readEither str = case readMaybe str of Just res -> Right res ; r@Nothing -> Left ("Cannot parse " ++ show (typeRep (Proxy :: Proxy a)) ++ " from " ++ show str) |
| 16:42:22 | <yahb> | tomsmeding: |
| 16:42:29 | <luc03> | pavonia: So this Typeable type class makes it possible to get some value level information about a type that has been applied using -XTypeApplications? |
| 16:42:31 | <tomsmeding> | % readEither "a42" :: Either String Int |
| 16:42:31 | <yahb> | tomsmeding: Left "Cannot parse Int from \"a42\"" |
| 16:42:42 | <tomsmeding> | see https://hackage.haskell.org/package/base-4.14.1.0/docs/Data-Typeable.html#t:TypeRep |
| 16:43:19 | <tomsmeding> | (oh the r@ is redundant) |
| 16:43:22 | <k``> | That's beautiful. |
| 16:43:38 | <tomsmeding> | you can even skip the Proxy by writing 'typeRep r' :p |
| 16:43:50 | <tomsmeding> | because r :: Maybe a, and typeRep takes a 'proxy a' :p |
| 16:43:51 | <luc03> | tomsmeding: thank you. looks perfect. |
| 16:44:12 | <tomsmeding> | and then you don't need ScopedTypeVariables anymore either |
| 16:44:20 | <tomsmeding> | but I thought this was most insightful |
| 16:44:55 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 16:46:08 | → | __monty__ joins (~toonn@user/toonn) |
| 16:46:22 | <k``> | Is anything _not_ Typeable these days? |
| 16:46:38 | × | jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2) |
| 16:47:27 | <tomsmeding> | I believe a Typeable constraint is automatically solved by internal ghc magic for any type |
| 16:47:33 | <sclv> | "Since GHC 7.10, all types automatically have Typeable instances derived. This is in contrast to previous releases where Typeable had to be explicitly derived using the DeriveDataTypeable language extension." |
| 16:47:35 | <tomsmeding> | or, well, any monomorphic type |
| 16:48:38 | × | __monty__ quits (~toonn@user/toonn) (Client Quit) |
| 16:49:20 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:49:23 | <k``> | Nice, so your `readEither` is effectively just as general as `readMaybe` . |
| 16:49:56 | <tomsmeding> | well, you do need to propagate that extra Typeable constraint upwards all the way until you know the actual monomorphic type |
| 16:50:06 | <tomsmeding> | basically until can discharge the Read constraint |
| 16:50:27 | <tomsmeding> | `type Read' a = (Read a, Typeable a)` using ConstraintKinds :p |
| 16:51:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 16:51:49 | <tomsmeding> | % readMaybe "Proxy" :: Maybe (Proxy a) |
| 16:51:49 | <yahb> | tomsmeding: Just Proxy |
| 16:51:58 | <tomsmeding> | % readEither "Proxy" :: Either String (Proxy a) |
| 16:51:58 | <yahb> | tomsmeding: ; <interactive>:74:1: error:; * No instance for (Typeable a1) arising from a use of `readEither'; Possible fix:; add (Typeable a1) to the context of; an expression type signature:; forall {k1} (a1 :: k1). Either String (Proxy a1); * In the expression: readEither "Proxy" :: Either String (Proxy a); In an equation for `it': it = readEither "Proxy" :: Either |
| 16:52:01 | <k``> | or use the old `class (Read a, Typeable a)=> Read' a ; instance (Read a, Typeable a)=> Read' a` trick with UndecidableInstances. |
| 16:52:12 | <tomsmeding> | because 'Proxy a' is not monomorphic, while it _does_ have a Read instance |
| 16:52:23 | <tomsmeding> | % readEither "Proxy" :: Either String (Proxy Int) |
| 16:52:23 | <yahb> | tomsmeding: Right Proxy |
| 16:52:39 | <k``> | Aah. |
| 16:53:17 | <tomsmeding> | and it makes sense: what would the error message need to be upon a parse error if I wrote "Proxy a" |
| 16:53:48 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 16:54:55 | <k``> | I guess it has to be monomorphic or unification down the line could end up with mismatches on types that should be unified or matches on types that should not? |
| 16:55:10 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
| 16:56:12 | → | __monty__ joins (~toonn@user/toonn) |
| 16:56:15 | <tomsmeding> | well, what would the result of `readEtiher "abc" :: Either String (Proxy a)` be |
| 16:56:45 | <tomsmeding> | given Typeable a, the answer is clear, but if you don't have Typeable a, you can't know |
| 16:56:59 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 16:57:14 | <k``> | Because there could be an overlapping instance for `Proxy` of that specific type? |
| 16:57:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 16:57:44 | <tomsmeding> | % foo1 :: String -> Either String (Proxy a) ; foo1 = readEither |
| 16:57:44 | <yahb> | tomsmeding: ; <interactive>:76:52: error:; * No instance for (Typeable a) arising from a use of `readEither'; Possible fix:; add (Typeable a) to the context of; the type signature for:; foo1 :: forall {k} (a :: k). String -> Either String (Proxy a); * In the expression: readEither; In an equation for `foo1': foo1 = readEither |
| 16:57:49 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 16:57:54 | <tomsmeding> | % foo2 :: Typeable a => String -> Either String (Proxy a) ; foo2 = readEither |
| 16:57:54 | <yahb> | tomsmeding: ; <interactive>:77:66: error:; * Could not deduce (Typeable k) arising from a use of `readEither'; from the context: Typeable a; bound by the type signature for:; foo2 :: forall {k} (a :: k). Typeable a => String -> Either String (Proxy a); at <interactive>:77:1-55; * In the expression: readEither; In an equation for `foo2': foo2 = readEither |
| 16:57:56 | <tomsmeding> | oh |
| 16:58:11 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 16:58:14 | <k``> | Sorry, I'm thinking in terms of the requirements of Typeable rather than the `readEither` function specifically. |
| 16:58:16 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Client Quit) |
| 16:58:28 | <tomsmeding> | ah right |
| 16:58:31 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 16:58:47 | <tomsmeding> | well, in order to derive Typeable for something, you should be able to get a string representation of the type |
| 16:59:08 | <tomsmeding> | because you need to support 'show (typeRep (Proxy @a))' |
| 16:59:21 | <tomsmeding> | so you need to know what to, well, return there :p |
| 16:59:35 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 16:59:37 | <tomsmeding> | and you can only know that when the type is actually concrete and known |
| 17:00:12 | <tomsmeding> | automatically solving Typeable involves magically constructing the dictionary necessary to implement typeRep; after that it's just normal typeclass dictionary passing |
| 17:00:15 | tomsmeding | has to go now, sorry |
| 17:00:29 | <k``> | Right, you don't want to print "forall a. Typeable a => Proxy a" in one place and "Proxy Int" in another place for the same value. |
| 17:02:01 | × | amk quits (~amk@109.255.169.126) (Ping timeout: 252 seconds) |
| 17:13:18 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 17:14:36 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 17:14:45 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds) |
| 17:16:10 | → | dsrt^ joins (~dsrt@68.101.54.227) |
| 17:16:15 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) |
| 17:17:52 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 17:20:18 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 17:20:22 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 17:20:35 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 17:21:52 | → | roboguy_ joins (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) |
| 17:26:06 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 17:26:15 | → | Vajb joins (~Vajb@n1xq4ni1adi29tefj-2.v6.elisa-mobile.fi) |
| 17:26:45 | <teddyc> | https://hackage.haskell.org/package/req-3.9.0/docs/Network-HTTP-Req.html#t:HttpConfig I'm trying to use the defaultHttpConfig but I only want to change one field. Is this possible? |
| 17:26:59 | <dminuoso> | Yes. |
| 17:26:59 | × | Vajb quits (~Vajb@n1xq4ni1adi29tefj-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 17:27:05 | <teddyc> | easily? |
| 17:27:11 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 17:27:12 | <dminuoso> | Yes. |
| 17:27:16 | <geekosaur> | theDefault {field = val} |
| 17:28:11 | → | sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) |
| 17:28:24 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 17:29:17 | <tomsmeding> | (this is called record update syntax) |
| 17:29:24 | <teddyc> | nice, thanks |
| 17:29:41 | <teddyc> | haven't seen it that much |
| 17:30:37 | <teddyc> | The library throws exception for every statuscode not in [200..300]. Isn't this a bit weird? |
| 17:30:41 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 17:30:43 | → | econo joins (uid147250@user/econo) |
| 17:31:05 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 17:31:23 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 17:31:24 | <geekosaur> | you'll find a lot of Haskell APIs use it |
| 17:31:53 | <dminuoso> | teddyc: You can also write your own MonadHTTP implementation that does it differently |
| 17:32:01 | <teddyc> | it said it would help with error handling. I guess it might, just seems to opinonated in my taste |
| 17:32:08 | <teddyc> | dminuoso: aha |
| 17:32:13 | <teddyc> | s/to/too/ |
| 17:32:18 | <dminuoso> | https://hackage.haskell.org/package/req-3.9.0/docs/Network-HTTP-Req.html#v:handleHttpException |
| 17:32:29 | <dminuoso> | oh hold on |
| 17:32:33 | <dminuoso> | I might have talked too soon |
| 17:33:08 | <maerwald> | If there's one thing that sucks across the board in haskell, it's error handling. I've just given up and instead try to memorize all the pitfalls. |
| 17:33:37 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 17:33:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:33:51 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 17:34:13 | <teddyc> | yeah, i have been struggling with that |
| 17:34:30 | <dminuoso> | maerwald: that's the one thing go has going for itself. |
| 17:34:40 | <dminuoso> | at least its very clear how errors are communicated. |
| 17:34:44 | <dminuoso> | usually, anyhow |
| 17:34:46 | <maerwald> | dminuoso: weeell |
| 17:35:00 | <dminuoso> | its just very easy to completely ignore and miss an error |
| 17:35:02 | <dminuoso> | but oh well |
| 17:35:07 | <maerwald> | when I worked with go the team actually tried to come up with a better error handling library |
| 17:35:12 | <maerwald> | but no one could agree on anything |
| 17:35:16 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 265 seconds) |
| 17:35:42 | <maerwald> | it's just no expressive enough to come up with... uh, anything |
| 17:35:45 | <maerwald> | so just use what's there |
| 17:35:54 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 17:36:27 | <dminuoso> | Maybe error handling is a thing that nobody has gotten right |
| 17:36:28 | <maerwald> | that, in an odd way, forces consistency throughout the ecosystem |
| 17:36:56 | <dminuoso> | Java's attempt seems to have gotten close, but the ergonomics are shitty and there's backdoors that severely reduce the trust you can put in it. |
| 17:37:10 | <maerwald> | and it's kind of a pleasure to pick a library in Go and not have to read a phd thesis to figure out how it works. Because everything is just the same |
| 17:37:25 | <dminuoso> | maerwald: That's very much the intention of go. |
| 17:37:37 | <dminuoso> | Being able to get people out of school into Google, and have them work with code with as little training as possible |
| 17:37:45 | <dminuoso> | For whatever good that might be.. |
| 17:38:47 | <maerwald> | maybe it's modern PHP... it doesn't feel like coding, actually |
| 17:39:06 | <dminuoso> | PHP is completely unprincipled and invented by someone with absolutely no experience in language design or implementation. |
| 17:39:17 | <dminuoso> | which is very different... :P |
| 17:39:18 | × | Guest|67 quits (~Guest|67@fs226-222.bard.edu) (Quit: Connection closed) |
| 17:39:38 | <dminuoso> | Internally go is well designed. Whether I agree with many of those design decisions is a different matter |
| 17:39:54 | <dminuoso> | But PHP wasnt even designed, it's just a lot of adhocness accumulated over time |
| 17:39:58 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
| 17:40:29 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 17:41:56 | <k``> | What are the fundamental problems with errors in Haskell? That you can't really catch them outside of IO? That you have to worry about asynchronous errors? |
| 17:42:21 | <k``> | Or just that folks don't really worry about handling them in the first place? |
| 17:42:23 | <dminuoso> | k``: we have a multitude of largely incompatible error communication methods |
| 17:42:49 | <monochrom> | I would put it in positive terms. |
| 17:42:51 | <shapr> | I think the fundamental problem with Haskell is that it doesn't have the funding of golang, php, etc :-) |
| 17:42:58 | <monochrom> | We recognize that one size doesn't fit all. |
| 17:43:29 | <monochrom> | There are many error communication+handling schemes, and they look incompatible. That's because there are many incompatible contexts. |
| 17:43:43 | × | oxide quits (~lambda@user/oxide) (Quit: oxide) |
| 17:44:04 | <monochrom> | In non-I/O, a sum type works best. |
| 17:44:41 | <dminuoso> | But then there's dozens of different sum types encoding different failures |
| 17:44:42 | × | phma quits (~phma@host-67-44-209-91.hnremote.net) (Read error: Connection reset by peer) |
| 17:44:58 | <maerwald> | monochrom: I went down the road of open sum types... I'm not convinced it's worth it, but I can't stop using it |
| 17:45:01 | <maerwald> | I don't know why |
| 17:45:03 | <dminuoso> | They simply dont compose |
| 17:45:04 | <k``> | monochrom: Do you mean `Either MySpecialSumType` ? |
| 17:45:13 | <monochrom> | In I/O, see my http://www.vex.net/~trebla/haskell/exception.xhtml for why you will end up reinventing exceptions, even if you start by avoiding exceptions. |
| 17:45:21 | <dminuoso> | Personally, the best choice Ive seen is hierarchial IO exceptions. |
| 17:45:25 | <dminuoso> | But this one is a forgotten art |
| 17:45:31 | <maerwald> | k``: https://docs.haskus.org/variant/excepts.html |
| 17:45:52 | × | kuribas quits (~user@ptr-25vy0i9dsqr9crcldit.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 17:46:03 | <maerwald> | that does compose |
| 17:46:10 | <maerwald> | but you're doing `liftE` everywhere |
| 17:46:12 | <Cale> | k``: I think monochrom just means something along the lines of Either itself by "sum type" |
| 17:46:19 | <dminuoso> | And this one is actually quite annoying. If your library doesnt have its own hierarchy, then using things with IO in negative position become frustrating to use |
| 17:46:26 | <monochrom> | Yeah Either is already a sum type. |
| 17:46:48 | <maerwald> | and in the end... you have huge type level lists of possible errors that arealso kinda meaningless |
| 17:47:08 | <maerwald> | but you can also nest errors with that approach |
| 17:47:15 | <maerwald> | and then everything becomes more complicated |
| 17:47:28 | <maerwald> | and then you reconsider your life choices |
| 17:48:01 | <k``> | monochrom: So then, realistically, `Maybe` or `Either String` ? |
| 17:48:19 | <monochrom> | Who said anything about String? |
| 17:48:29 | <Cale> | k``: Yeah, that kind of thing covers a lot of cases |
| 17:48:46 | <monochrom> | Every error is not a string. |
| 17:49:16 | <Cale> | Yeah, doesn't have to be a String, but could be if that's all you care to know about the failure. |
| 17:49:41 | <maerwald> | yeah, you can pattern match on strings too >:) |
| 17:49:45 | <shapr> | I wish for a solid encoding of sum types in postgres |
| 17:50:29 | <k``> | That's why I was asking whether you were recommending `Either MyCustomErrorType` . |
| 17:50:33 | <monochrom> | The only sum type in SQL is nullable. That ship has sailed. |
| 17:50:34 | → | themc47 joins (~mc47@xmonad/TheMC47) |
| 17:51:04 | <maerwald> | k``: did you check my link? |
| 17:51:35 | <k``> | maerwald: Reading it now. |
| 17:52:16 | <Cale> | shapr: Yeah, the fact that SQL databases practically force you to represent A + B using (1 + A)*(1 + B), and just endure the potential consequences of storing 1 or A*B really sucks. |
| 17:52:38 | <shapr> | yeah :-( |
| 17:53:09 | × | mc47 quits (~mc47@xmonad/TheMC47) (Ping timeout: 265 seconds) |
| 17:53:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 17:53:31 | <monochrom> | I would s/represent/encoding/ |
| 17:53:42 | <monochrom> | There is a significant difference. |
| 17:53:56 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:54:04 | <monochrom> | A representation doesn't obscure. An encoding does. |
| 17:54:18 | <monochrom> | s/obscure/obfuscate/ |
| 17:55:03 | → | abraham joins (~textual@191.96.121.144) |
| 17:55:09 | <monochrom> | The reason why we don't say "Church representation", we say "Church encoding". |
| 17:59:57 | <k``> | maerwald: Are those type lists like ordinary lists (ordered, admitting duplicates)? Or are they effectively sets? |
| 18:00:14 | <dminuoso> | k``: they are the same as ordinary lists. |
| 18:00:38 | <dminuoso> | It's just that working with them is a bit more tricky as you cant use value level functions. |
| 18:00:55 | <maerwald> | that's a type level list |
| 18:00:59 | <dminuoso> | You can mostly re-implement list functions to work on type level lists |
| 18:01:07 | <dminuoso> | But sometimes it takes a bit of creativity. :) |
| 18:01:15 | <maerwald> | k``: that's also why, unfortunately, order matters |
| 18:01:22 | × | slep quits (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 265 seconds) |
| 18:02:08 | <maerwald> | `Excepts '[ParseError, HeadError] IO Integer` doesn't compose with `Excepts '[HeadError, ParseError] IO Integer` |
| 18:02:19 | <maerwald> | not without `liftE` |
| 18:02:28 | × | vysn quits (~vysn@user/vysn) (Quit: WeeChat 3.2) |
| 18:02:57 | <maerwald> | all random shenanigans that have nothing to do with business logic :p |
| 18:03:39 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 18:04:24 | <maerwald> | you can try plucky instead |
| 18:04:38 | <maerwald> | https://hackage.haskell.org/package/plucky |
| 18:04:55 | <maerwald> | https://www.parsonsmatt.org/2020/01/03/plucking_constraints.html |
| 18:05:13 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 18:05:16 | <k``> | maerwald: How do you check which type of error an `Excepts '[ParseError, HeadError]` yielded? |
| 18:05:54 | <maerwald> | not sure I understand the question |
| 18:06:13 | <maerwald> | you can run the action and get a VEither, similar like runExceptT |
| 18:06:15 | <maerwald> | or you catch |
| 18:06:16 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 18:06:22 | → | aegon joins (~mike@174.127.249.180) |
| 18:07:35 | <maerwald> | https://hackage.haskell.org/package/haskus-utils-variant-3.1/docs/Haskus-Utils-Variant-Excepts.html#v:runE |
| 18:08:25 | × | azeem quits (~azeem@2a00:801:23f:d6b0:3dc9:5843:deaf:1727) (Ping timeout: 260 seconds) |
| 18:08:53 | <maerwald> | and then you pattern match like `VLeft (V (ParseError msg)) -> oops` |
| 18:09:15 | × | sneedsfeed quits (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds) |
| 18:09:35 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection) |
| 18:09:45 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 18:10:32 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 18:10:55 | × | abraham quits (~textual@191.96.121.144) (Quit: Textual IRC Client: www.textualapp.com) |
| 18:11:24 | → | abraham joins (~abraham@191.96.121.144) |
| 18:12:15 | <k``> | So you have a case statement like `case mx of VLeft (V HeadError) -> doThis ; VLeft (V (ParseError s)) -> reparse s` ? |
| 18:12:24 | <k``> | How does that work? |
| 18:12:42 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 18:13:38 | <maerwald> | check the code https://hackage.haskell.org/package/haskus-utils-variant-3.1/docs/src/Haskus.Utils.Variant.VEither.html#VRight |
| 18:13:53 | → | benin0369323 joins (~benin@183.82.178.253) |
| 18:16:52 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 18:17:18 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 18:18:27 | → | benin03693235 joins (benin@gateway/vpn/protonvpn/benin) |
| 18:18:28 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 18:19:21 | × | benin0369323 quits (~benin@183.82.178.253) (Read error: Connection reset by peer) |
| 18:20:27 | → | MQ-17J joins (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
| 18:20:52 | × | jess quits (~jess@libera/staff/jess) () |
| 18:21:17 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 18:21:21 | <k``> | maerwald: Oh, that's neat. |
| 18:21:31 | → | benin0369323 joins (~benin@183.82.178.253) |
| 18:22:44 | → | vysn joins (~vysn@user/vysn) |
| 18:23:40 | → | nvmd joins (~nvmd@user/nvmd) |
| 18:23:55 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 18:23:56 | × | benin03693235 quits (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 252 seconds) |
| 18:24:07 | → | phma joins (~phma@host-67-44-208-98.hnremote.net) |
| 18:25:25 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:25:35 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 18:25:49 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 18:26:40 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 18:33:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 18:34:57 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
| 18:37:35 | × | max22- quits (~maxime@2a01cb08833598003176d874852ce483.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 18:37:49 | → | vicfred joins (~vicfred@user/vicfred) |
| 18:44:34 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Read error: Connection reset by peer) |
| 18:44:53 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 18:45:53 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
| 18:47:31 | → | amk joins (~amk@109.255.169.126) |
| 18:47:32 | → | kayprish joins (~kayprish@cable-188-2-153-140.dynamic.sbb.rs) |
| 18:50:15 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 18:51:57 | → | burnsidesLlama joins (~burnsides@dhcp168-018.wadham.ox.ac.uk) |
| 18:52:01 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 18:52:53 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 18:54:17 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 18:55:00 | × | MQ-17J quits (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
| 18:55:34 | → | MQ-17J joins (~MQ-17J@35.50.7.10) |
| 18:57:05 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 18:57:24 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 18:58:57 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 18:59:10 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 19:00:19 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 19:00:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:02:56 | → | max22- joins (~maxime@2a01cb0883359800fdb5051cdabc89f4.ipv6.abo.wanadoo.fr) |
| 19:04:06 | × | TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8) |
| 19:04:25 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 260 seconds) |
| 19:04:43 | → | alx741 joins (~alx741@186.178.109.214) |
| 19:05:16 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:05:17 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 19:05:17 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:05:39 | → | wonko joins (~wjc@62.115.229.50) |
| 19:05:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 19:05:47 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 19:06:20 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:06:22 | × | abraham quits (~abraham@191.96.121.144) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 19:08:06 | × | aman quits (~aman@user/aman) (Quit: aman) |
| 19:08:36 | → | abraham joins (~abraham@191.96.121.144) |
| 19:08:39 | → | natechan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 19:08:40 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Remote host closed the connection) |
| 19:08:58 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 19:09:17 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 19:09:31 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 19:09:43 | × | abraham quits (~abraham@191.96.121.144) (Client Quit) |
| 19:10:33 | → | abraham joins (~abraham@191.96.121.144) |
| 19:10:41 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 19:12:25 | × | abraham quits (~abraham@191.96.121.144) (Client Quit) |
| 19:17:22 | → | abraham joins (~abraham@191.96.121.37) |
| 19:17:44 | → | kawpuh joins (~kawpuh@097-082-066-236.res.spectrum.com) |
| 19:22:16 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 252 seconds) |
| 19:23:16 | → | enikar joins (~enikar@user/enikar) |
| 19:24:57 | → | janat08 joins (uid374565@id-374565.lymington.irccloud.com) |
| 19:25:45 | × | abraham quits (~abraham@191.96.121.37) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 19:26:39 | → | abraham joins (~abraham@191.96.121.37) |
| 19:27:24 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 19:28:56 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 19:29:13 | <janat08> | https://pastebin.com/peHkKKNM |
| 19:29:40 | → | akegalj joins (~akegalj@89-172-127-119.adsl.net.t-com.hr) |
| 19:30:51 | <janat08> | I'd imagine there's a better way of doing this with just one query using IHP sql model. The gist of this is that I'm trying to pass domains that don't have usernames with a given name. |
| 19:33:20 | × | agoraphobic quits (~agoraphob@ip11-173.bon.riksnet.se) (Read error: Connection reset by peer) |
| 19:33:27 | → | agoraphobic_ joins (~agoraphob@ip11-173.bon.riksnet.se) |
| 19:38:25 | → | aarvar joins (~aaron@2601:602:a080:fa0:6eb5:629b:8150:a841) |
| 19:39:01 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 19:41:10 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 19:44:43 | × | kawpuh quits (~kawpuh@097-082-066-236.res.spectrum.com) (Quit: Client closed) |
| 19:47:04 | → | kawpuh joins (~kawpuh@097-082-066-236.res.spectrum.com) |
| 19:47:35 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:50:30 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 19:52:55 | <janat08> | Hi? |
| 19:53:09 | <shapr> | hi! |
| 19:54:28 | × | nvmd quits (~nvmd@user/nvmd) (Ping timeout: 265 seconds) |
| 19:54:37 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 19:54:43 | → | jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
| 19:54:56 | <heath> | hello |
| 19:55:00 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 19:55:25 | × | fendor_ quits (~fendor@178.165.191.44.wireless.dyn.drei.com) (Remote host closed the connection) |
| 19:55:29 | → | jinsun joins (~quassel@user/jinsun) |
| 19:55:41 | <shapr> | janat08: I don't know anything about IHP |
| 19:59:29 | → | TranquilEcho joins (~grom@user/tranquilecho) |
| 19:59:47 | <janat08> | https://pastebin.com/peHkKKNM I'd imagine there's a better way of doing this with just one query using IHP sql model. The gist of this is that I'm trying to pass domains that don't have usernames with a given name |
| 20:01:47 | <sm> | there's https://matrix.to/#/#digitallyinduced_ihp:gitter.im also |
| 20:02:04 | × | abraham quits (~abraham@191.96.121.37) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:03:15 | × | kawpuh quits (~kawpuh@097-082-066-236.res.spectrum.com) (Quit: Client closed) |
| 20:03:16 | → | kawpuh9 joins (~kawpuh@66.42.81.80) |
| 20:03:27 | kawpuh9 | is now known as kawpuh |
| 20:03:48 | × | zmt00 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer) |
| 20:05:18 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:05:20 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
| 20:05:35 | × | juhp quits (~juhp@128.106.188.220) (Ping timeout: 265 seconds) |
| 20:06:04 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 265 seconds) |
| 20:06:55 | → | juhp joins (~juhp@128.106.188.220) |
| 20:07:22 | → | shiraeeshi joins (~shiraeesh@46.34.206.111) |
| 20:12:17 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 252 seconds) |
| 20:13:37 | → | infinity0 joins (~infinity0@occupy.ecodis.net) |
| 20:13:51 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 20:15:04 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 20:15:18 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 20:18:22 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 20:19:40 | → | mikoto-chan joins (~mikoto-ch@83.137.2.250) |
| 20:21:27 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 20:22:26 | × | mikoto-chan quits (~mikoto-ch@83.137.2.250) (Client Quit) |
| 20:22:41 | → | mikoto-chan joins (~mikoto-ch@83.137.2.250) |
| 20:27:10 | × | xff0x quits (~xff0x@2001:1a81:527e:a000:2ce2:bb46:8710:1c2a) (Ping timeout: 252 seconds) |
| 20:27:53 | → | xff0x joins (~xff0x@port-92-195-70-241.dynamic.as20676.net) |
| 20:30:24 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 20:30:38 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 20:33:32 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 20:37:19 | × | akegalj quits (~akegalj@89-172-127-119.adsl.net.t-com.hr) (Quit: leaving) |
| 20:37:51 | → | slep joins (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) |
| 20:38:08 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 20:38:14 | wrengr_away | is now known as wrengr |
| 20:40:02 | × | k`` quits (~user@152.1.137.158) (Quit: bye) |
| 20:40:44 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 20:40:58 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 20:44:07 | × | roboguy_ quits (~roboguy_@cpe-98-156-4-161.kc.res.rr.com) () |
| 20:44:10 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 20:44:33 | → | nvmd joins (~nvmd@user/nvmd) |
| 20:49:33 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 20:50:11 | <heath> | janat08: you probably want https://github.com/digitallyinduced/ihp/blob/28f3e825d107c31aeea2f57075664c9144e439ec/Guide/database.markdown#transactions |
| 20:51:20 | × | MQ-17J quits (~MQ-17J@35.50.7.10) (Ping timeout: 252 seconds) |
| 20:52:51 | <heath> | you're not issuing db calls, nevermind |
| 20:53:32 | × | qbt quits (~edun@user/edun) (Ping timeout: 252 seconds) |
| 20:54:14 | → | MQ-17J joins (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) |
| 20:54:47 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 20:54:57 | → | beka joins (~beka@104.193.170.240) |
| 20:55:00 | <heath> | oh it is a db call. you probably do want transactions, though I don't know the best way to do this in ihp |
| 20:55:12 | <janat08> | You think I should ask in stackoverflow with the solution that doesn't make 2 separate queries |
| 20:55:13 | × | jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 252 seconds) |
| 20:55:54 | <janat08> | Yes search is also a db call |
| 20:55:56 | <heath> | sm mentioned gitter. the team behind ihp seems to be active there |
| 20:56:21 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 20:57:23 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
| 20:57:35 | <janat08> | They introduced support subscription, that at least indicated they're weary of providing free support. I'll post it on stackoverflow and link it there. |
| 20:58:41 | → | proofofkeags joins (~proofofke@205.209.28.54) |
| 20:58:48 | <janat08> | I kinda assumed I'm not doing monads right or something. How do you debug this? |
| 20:58:59 | <janat08> | It takes issue with the beginning of filter statement |
| 20:59:00 | Lord_of_Life_ | is now known as Lord_of_Life |
| 20:59:28 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 21:00:11 | → | pzanco joins (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) |
| 21:00:29 | × | pzanco quits (~pzanco@2804:14c:3ba1:42d:2204:fff:feff:44a0) (Client Quit) |
| 21:01:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:02:09 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 21:02:51 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:02:56 | <sm> | janat08: I would still try the official chat channel. Pretty sure you don't have to pay |
| 21:03:12 | <sm> | there is no concentration of IHP users elsewhere yet |
| 21:04:40 | <sm> | (I'm sitting in that channel, and have not paid. :) Element says ~80 users there right now - probably not that many, but still a good number.) |
| 21:05:10 | × | ubert1 quits (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 21:06:13 | × | ubert quits (~Thunderbi@178.115.77.119.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 21:06:54 | <sm> | also.. since I've come this far.. if you paste that with line numbers and the exact error including line number, there's more of a chance someone here might have some ideas. This is a good paste site: |
| 21:06:54 | <sm> | @where paste |
| 21:06:55 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 21:07:10 | × | ablutor quits (~quassel@wasscher.com) (Ping timeout: 240 seconds) |
| 21:07:17 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 21:07:19 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2) |
| 21:08:56 | → | hannessteffenhag joins (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) |
| 21:11:19 | × | burnsidesLlama quits (~burnsides@dhcp168-018.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
| 21:11:23 | → | sneedsfeed joins (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) |
| 21:13:44 | × | hannessteffenhag quits (~hannesste@ip4d14ffd8.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 21:14:35 | × | michalz quits (~michalz@185.246.204.41) (Remote host closed the connection) |
| 21:15:12 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds) |
| 21:18:29 | <ldlework> | Can someone remind me how you make a Point x y where the x y are constrained to Num ? |
| 21:19:30 | <geekosaur> | you don't, you constrain the use sites |
| 21:20:43 | <geekosaur> | there's some old syntax that has to be enabled, that could constrain creation; but you'd still have to constrain the use sites separately because it can't recover the constraint later |
| 21:21:21 | <geekosaur> | there are also GADTs that can constrain both, but they introduce other complexities |
| 21:21:37 | <awpr> | (GHC source code refers to that old feature as "stupid theta" because what it does is pretty useless and there's not really any reason to use it) |
| 21:21:53 | → | ablutor joins (~quassel@145.131.24.183) |
| 21:23:53 | <ldlework> | i see |
| 21:24:06 | → | wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) |
| 21:24:07 | × | wroathe quits (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host) |
| 21:24:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:24:49 | <monochrom> | This is a FAQ and gives the impression of much-requested "feature" because the querents are invariably writing code (vocal minority), not reading or using someone else's library (silent majority). |
| 21:24:52 | → | rond_ joins (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 21:25:56 | <monochrom> | The truth is that, from the user's point of view, suppose you "promise" me your type sig is "foo :: a -> Point a a", then I try to use it as "foo True", then you tell me "no no, Bool is not an instance of Num". Well that's called false advertising. |
| 21:26:12 | <monochrom> | The honest type sig is "foo :: Num a => a -> Point a a". |
| 21:26:38 | <dsal> | You can have a Map without Ord keys depending on what you plan to do with it. |
| 21:26:46 | <monochrom> | The conclusion is that any writer's hope of "I don't have to repeat 'Num a =>' at every function I provide" is a pipe dream. |
| 21:27:30 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 21:28:28 | → | zmt00 joins (~zmt00@user/zmt00) |
| 21:28:37 | <awpr> | to be fair, you could have "data Point a = Num a => Point a a", but that a) only helps for types with Point in negative position and b) makes the allocation bigger and forces you to pass around Num instances for every individual Point, not to mention anything undesirable it might do to optimization |
| 21:29:23 | <monochrom> | a pipe dream stemming from writer's selfish convenience ignoring user rights. |
| 21:29:39 | <awpr> | normally the thing to do when you want Num constraints on all the functions involving Point is to put Num constraints on all the functions involving Point :) |
| 21:31:04 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 21:31:18 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 21:31:27 | → | abraham joins (~abraham@191.96.121.37) |
| 21:31:38 | × | kayprish quits (~kayprish@cable-188-2-153-140.dynamic.sbb.rs) (Read error: Connection reset by peer) |
| 21:34:40 | × | bgamari quits (~bgamari@72.65.101.163) (Ping timeout: 252 seconds) |
| 21:35:23 | → | bgamari joins (~bgamari@72.65.101.163) |
| 21:35:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 21:36:22 | × | rond_ quits (~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed) |
| 21:36:24 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 21:36:43 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 21:40:19 | × | zebrag quits (~chris@user/zebrag) (Ping timeout: 252 seconds) |
| 21:40:42 | → | zebrag joins (~chris@user/zebrag) |
| 21:41:17 | × | neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 265 seconds) |
| 21:41:44 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 21:41:58 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 21:44:06 | × | MQ-17J quits (~MQ-17J@2607:fb90:46:a8a6:384f:d5fd:c3eb:fa6f) (Read error: Connection reset by peer) |
| 21:44:39 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 21:45:18 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26) |
| 21:48:19 | <ldlework> | OK I see that you can do `data Point = Point Int Int` but not `data Point = Point Num Num` |
| 21:49:39 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:50:27 | <monochrom> | A moment of thought would reveal that it would make no sense even after you gave it a sense. |
| 21:50:57 | <ldlework> | Well the compiler's reasoning is that a type is expected but Num is a Constraint |
| 21:51:04 | <monochrom> | Similar to how Racket's contract "any? -> any?" does not mean Haskell's polymorphic type "a -> a". Far from it. |
| 21:51:17 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 21:51:29 | <awpr> | oh, there's a bit more context needed than I assumed; Int is a type, while Num is a typeclass. data constructors' declarations have to have types, so putting Num there is a kind error -- Num is more like a property that types can have, not itself a type. |
| 21:51:38 | × | infinity0 quits (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
| 21:51:50 | <ldlework> | monochrom: I'm mostly coming from a conceptualization of `type Point<T> { x: T, y: T }` |
| 21:52:31 | <awpr> | if you want Points to be able to contain multiple different types, but to have Num functions available in functions that work with Points, then you want to define Point in a way that it can have any type for its coordinates, like "data Point a = Point a a", and then write functions like "subtract :: Num a => Point a -> Point a -> Point a" |
| 21:52:38 | <monochrom> | That's clearly "data Point t = MkPoint t t" so why would Int or Num be brought up. |
| 21:53:30 | <ldlework> | I appreciate that Haskell's way of doing it keeps the type as polymorphic as possible (if that's the right way to say it) |
| 21:54:05 | <monochrom> | But "type Point<T> { x: T, y: T}" has the exact same polymorphism. |
| 21:54:20 | <awpr> | just like in the example code with angle brackets, the type itself isn't where the constraint goes -- it's exactly the Haskell syntax for what you wrote |
| 21:54:20 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 21:54:21 | <monochrom> | You didn't even start with "type Point<T extends Num> { x: T, y: T}" |
| 21:54:23 | → | cjbayliss joins (~cjb@user/cjb) |
| 21:54:28 | <ldlework> | monochrom: right |
| 21:54:38 | <ldlework> | I meant to, sorry. |
| 21:54:46 | cjbayliss | is now known as cjb |
| 21:55:03 | → | infinity0 joins (~infinity0@occupy.ecodis.net) |
| 21:56:05 | <awpr> | right, so the Haskell approach is basically noticing that you don't need the Num constraint just to have the thing exist in memory or to build it, you only need it at the moment you start doing numerical stuff with the fields, i.e. in the relevant function definitions |
| 21:56:28 | <iqubic> | Why does the "bits" Traversal from Lens in the Data.Bits.Lens module give me the least significant bits first and how can I reverse the order of the traversal? |
| 21:56:57 | × | max22- quits (~maxime@2a01cb0883359800fdb5051cdabc89f4.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
| 21:57:33 | <iqubic> | This specifically: "https://hackage.haskell.org/package/lens-5.0.1/docs/Data-Bits-Lens.html#v:bits" |
| 21:58:01 | <ldlework> | monochrom: awpr thank you for the explanations |
| 21:58:26 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds) |
| 22:03:07 | × | infinity0 quits (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
| 22:03:27 | × | cjb quits (~cjb@user/cjb) (Quit: cjb) |
| 22:04:34 | → | infinity0 joins (~infinity0@occupy.ecodis.net) |
| 22:04:36 | → | spaceshipnow joins (~spaceship@65.100.53.74) |
| 22:08:22 | × | infinity0 quits (~infinity0@occupy.ecodis.net) (Remote host closed the connection) |
| 22:08:24 | × | spaceshipnow quits (~spaceship@65.100.53.74) (Client Quit) |
| 22:08:40 | → | spaceshipnow joins (~spaceship@65.100.53.74) |
| 22:09:42 | → | infinity0 joins (~infinity0@occupy.ecodis.net) |
| 22:11:14 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 22:12:04 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 22:12:17 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 22:13:20 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:14:19 | <shiraeeshi> | how can you do something like "type Point<T extends Num> { x: T, y: T}" in haskell? (other than adding a constraint to every function) |
| 22:15:12 | <geekosaur> | I think you just missed that discussion: you don't |
| 22:15:36 | → | cjb joins (~cjb@user/cjb) |
| 22:16:00 | <shiraeeshi> | declare a typeclass with a constraint, define functions using that typeclass and make Point an instance of it? |
| 22:16:37 | <hpc> | there's also the matter that when you define an oop class-ish thing like that, you're only defining T in one place |
| 22:16:49 | × | TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8) |
| 22:16:53 | <shiraeeshi> | I mean, not literally the same thing, but conceptually similar thing |
| 22:16:54 | <monochrom> | In Haskell 98 it was "data Num a => Point a = MkPoint a a" |
| 22:17:03 | <hpc> | all the other Ts are using that same T, so you're not universally quantifying x/y |
| 22:17:14 | <monochrom> | It turns out to have little benefit and much cost. |
| 22:17:45 | <monochrom> | In fact this fact is language-agnostic. In any language this misfeature has little benefit and much cost. |
| 22:17:53 | <hpc> | then when you define something outside that class, you still need to carry the constraint around elsewhere |
| 22:18:14 | <hpc> | type Field<T> {something: Point<T>} would be an error |
| 22:18:32 | <hpc> | it would still have to be type Field<T extends Num> |
| 22:18:59 | <monochrom> | It is a very attractive thing to do for control-freak authors. Gives them a comfy sense of "I am disallowing the user to do a few things!" Power trip. |
| 22:19:10 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26) (Quit: Leaving) |
| 22:19:43 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
| 22:19:55 | <geekosaur> | hm |
| 22:19:55 | → | lambdabot joins (~lambdabot@silicon.int-e.eu) |
| 22:19:56 | × | lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host) |
| 22:19:56 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 22:20:00 | <geekosaur> | oh |
| 22:21:03 | <monochrom> | An actually wise control-freak would make the type abstract/opague and provide restrictive smart constructors to restrict users. |
| 22:21:16 | ← | spaceshipnow parts (~spaceship@65.100.53.74) (Textual IRC Client: www.textualapp.com) |
| 22:23:54 | <hpc> | the wisest control freak would license it agpl and then nobody would ever use it :P |
| 22:24:11 | <monochrom> | haha |
| 22:25:01 | <awpr> | if I understand shiraeeshi's typeclass idea correctly it literally implements abbreviating the repetitive part of the type signatures by declaring all their type parameters in one instance head. interesting idea, but IMO not better than just typing out the Num constraints |
| 22:25:22 | <awpr> | no extra restrictions on the type / data constructor itself from that approach |
| 22:25:49 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 22:26:09 | <hpc> | and as mentioned at the beginning of this whole thing, technically possible but an awful user experience |
| 22:26:50 | <shiraeeshi> | so how do people solve this problem in the wild? my guess is they just use GADTs |
| 22:27:04 | <awpr> | they just type the Num constraint on each function, generally |
| 22:27:38 | <hpc> | ^ |
| 22:27:48 | <monochrom> | GADT doesn't magically allow "foo x = MkPoint (x-1) (x+1); foo :: a -> Point a" |
| 22:27:48 | <hpc> | no point in getting fancy when you could just be honest with the user |
| 22:28:04 | <monochrom> | The type sig is still "foo :: Num a => a -> Point a" |
| 22:28:25 | <monochrom> | "foo :: a -> Point a" is called False Advertising. |
| 22:28:33 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 22:28:39 | <hpc> | if programmers can spend a bit of extra typing on good nicely formatted functions, they can spend a bit of extra typing on nicely formatted type signatures |
| 22:30:54 | <monochrom> | In fact, it is the uncontrained type that saves typing in the opposite direction: "prj (MkPoint x _) = x; prj :: Point a -> a" |
| 22:31:32 | <monochrom> | It is GADT and the constrained type that incur the redundant "prj :: Num a => Point a -> a" |
| 22:32:04 | themc47 | is now known as mc47 |
| 22:32:05 | <monochrom> | Once again intuition is the opposite of reality. |
| 22:32:25 | <monochrom> | We all want to save typing. We all agree on that. |
| 22:32:45 | <monochrom> | Intuition says "constrain the type to save typing". |
| 22:32:55 | <awpr> | #define Point Num a => PointImpl |
| 22:32:55 | <monochrom> | Reality says unconstrain the type to save typing. |
| 22:32:58 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 22:33:36 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 22:33:43 | <hpc> | besides, who cares about typing anyway |
| 22:33:49 | <hpc> | if you want to shave off characters, switch to perl |
| 22:34:06 | <monochrom> | haha |
| 22:35:33 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 22:37:21 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 22:39:33 | × | sneedsfeed quits (~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds) |
| 22:40:13 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
| 22:40:19 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:40:55 | × | Neuromancer quits (~Neuromanc@user/neuromancer) (Remote host closed the connection) |
| 22:41:08 | → | hololeap joins (~hololeap@user/hololeap) |
| 22:42:30 | → | son0p joins (~ff@181.136.122.143) |
| 22:43:30 | <janus> | Data.Map suggests (fromListWith (++)) but i am wondering if it isn't gonna have terrible performance. would it be worth it to use DList here? or something else? just in case somebody already benchmarked it[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D |
| 22:45:06 | <ldlework> | I've been slowly filling this out https://gist.github.com/dustinlacewell/6cae02e3bba25ff42bebafce655498ea |
| 22:45:44 | <int-e> | > M.fromListWith f [(0,a),(0,b),(0,c)] |
| 22:45:45 | <lambdabot> | fromList [(0,f c (f b a))] |
| 22:46:56 | <int-e> | janus: it's right-associative so DList should make little difference |
| 22:47:31 | <awpr> | isn't that only if you want reversed lists? |
| 22:47:46 | → | acidjnk_new joins (~acidjnk@p200300d0c7203089886436e542e4e0a8.dip0.t-ipconnect.de) |
| 22:48:32 | <awpr> | when I wrote one of these I did use DList, but fmap reverse should do pretty well, too |
| 22:49:01 | <int-e> | awpr: or if you don't care about the order (I usually don't) |
| 22:49:42 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 22:49:51 | <awpr> | yep, that too. but if you write one and stash it in a discoverable module somewhere, eventually someone will use it assuming it gives results in-order and you'll have a bug (ask me how I know) |
| 22:50:52 | × | acidjnk_new3 quits (~acidjnk@p200300d0c7203089886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 22:51:42 | × | cjb quits (~cjb@user/cjb) (Quit: cjb) |
| 22:52:42 | <int-e> | awpr: Anyway, the question was whether fromListWith (++) is going to have terrible performance... and the answer is no. |
| 22:52:45 | <int-e> | janus: It *does* reverse the elements though, which may come as a suprise. |
| 22:53:36 | <int-e> | > fromList (++) [(0,"ab"),(0,"cd"),(0,"ef")] -- and of course it's messier if you don't have singleton lists |
| 22:53:37 | <lambdabot> | error: |
| 22:53:37 | <lambdabot> | • Variable not in scope: |
| 22:53:37 | <lambdabot> | fromList :: ([a0] -> [a0] -> [a0]) -> [(a1, [Char])] -> t |
| 22:53:49 | <int-e> | > M.fromList (++) [(0,"ab"),(0,"cd"),(0,"ef")] |
| 22:53:50 | <lambdabot> | error: |
| 22:53:50 | <lambdabot> | • Couldn't match expected type ‘[(a2, [Char])] -> t’ |
| 22:53:50 | <lambdabot> | with actual type ‘M.Map k0 a1’ |
| 22:53:59 | <int-e> | :-/ |
| 22:54:02 | <int-e> | > M.fromListWith (++) [(0,"ab"),(0,"cd"),(0,"ef")] |
| 22:54:03 | <lambdabot> | fromList [(0,"efcdab")] |
| 22:56:04 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 252 seconds) |
| 22:56:50 | → | sleblanc joins (~sleblanc@user/sleblanc) |
| 22:57:24 | × | amitnjha quits (~amit@024-216-124-116.res.spectrum.com) (Quit: amitnjha) |
| 22:57:39 | → | amitnjha joins (~amit@024-216-124-116.res.spectrum.com) |
| 22:57:43 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 22:58:03 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:58:08 | <janus> | so with right-associative, you mean that it doesn't accumulate a giant string which is then appended to at the end? so because elements are prefixed as they occur, it won't need to traverse huge data |
| 22:58:32 | <int-e> | I meant that the passed function is used in a right-associative way |
| 22:59:48 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 23:00:25 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 23:03:22 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 23:06:19 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 23:06:57 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 23:07:09 | → | philpax_ joins (uid516926@id-516926.lymington.irccloud.com) |
| 23:07:27 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) |
| 23:11:37 | × | acidjnk_new quits (~acidjnk@p200300d0c7203089886436e542e4e0a8.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 23:12:54 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 260 seconds) |
| 23:13:15 | × | aarvar quits (~aaron@2601:602:a080:fa0:6eb5:629b:8150:a841) (Read error: Connection reset by peer) |
| 23:14:09 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7d9e:f1ab:9e23:bf6) (Remote host closed the connection) |
| 23:14:12 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 23:17:47 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Quit: Leaving.) |
| 23:18:55 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds) |
| 23:21:49 | × | nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.) |
| 23:22:13 | × | zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection) |
| 23:22:53 | → | cjb joins (~cjbayliss@user/cjb) |
| 23:23:29 | → | zaquest joins (~notzaques@5.128.210.178) |
| 23:28:35 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 23:31:32 | <iqubic> | Is there a way to get Lens to run a traversal/fold in reverse |
| 23:32:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:33:18 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 23:34:20 | <awpr> | :t forwards . traverse . Backwards |
| 23:34:21 | <lambdabot> | error: |
| 23:34:22 | <lambdabot> | Variable not in scope: forwards :: (t0 a0 -> f0 (t0 b0)) -> c |
| 23:34:22 | <lambdabot> | error: |
| 23:34:24 | × | Gurkenglas quits (~Gurkengla@dslb-002-207-014-195.002.207.pools.vodafone-ip.de) (Ping timeout: 265 seconds) |
| 23:34:28 | → | neo1 joins (~neo3@cpe-292712.ip.primehome.com) |
| 23:34:52 | <awpr> | :t Control.Applicative.Backwards.forwards |
| 23:34:53 | <lambdabot> | forall k (f :: k -> *) (a :: k). Control.Applicative.Backwards.Backwards f a -> f a |
| 23:35:33 | <awpr> | ^ that should be able to reverse a traversal, with "traverse" being the traversal to reverse |
| 23:36:35 | <iqubic> | What I want to do is reverse the "bits" traversal. |
| 23:36:42 | <awpr> | I didn't get it quite right, but basically wrap the thing in Backwards while giving it to the traversal and unwrap it on the way out |
| 23:36:48 | <iqubic> | https://hackage.haskell.org/package/lens-5.0.1/docs/Data-Bits-Lens.html#v:bits |
| 23:36:54 | <iqubic> | I see. |
| 23:37:58 | <awpr> | :t Control.Lens.toListOf (fmap Control.Applicative.Backwards.forwards . Data.Bits.Lens.bits . fmap Control.Applicative.Backwards.Backwards) (42 :: Int) |
| 23:37:59 | <lambdabot> | [Bool] |
| 23:39:09 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 23:39:09 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 23:39:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:41:45 | <iqubic> | Why does that work? |
| 23:43:04 | × | dextaa quits (~DV@user/dextaa) (Ping timeout: 256 seconds) |
| 23:43:13 | <awpr> | well, traversals just work by sequencing a bunch of Applicative "actions" for the values they visit, and Backwards makes them happen in reverse order, so putting the two together makes the traversal happen in reverse |
| 23:46:55 | <iqubic> | I see. |
| 23:51:16 | <iqubic> | awpr: The issue is that I have the bits traversal in the middle of a longer pipeline. I'm not sure how to reverse just the bits traversal. |
| 23:53:01 | <awpr> | you can probably factor that traversal-reversing thing into a function "reverseTraversal :: Traversal s t a b -> Traversal s t a b" and then say "x . y . reverseTraversal bits . z . w" |
| 23:53:02 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 23:53:43 | × | phma quits (~phma@host-67-44-208-98.hnremote.net) (Read error: Connection reset by peer) |
| 23:54:12 | × | mikoto-chan quits (~mikoto-ch@83.137.2.250) (Ping timeout: 265 seconds) |
| 23:54:55 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds) |
| 23:56:13 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 23:56:55 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 23:57:05 | × | janat08 quits (uid374565@id-374565.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 23:58:21 | → | aegon joins (~mike@174.127.249.180) |
All times are in UTC on 2021-09-08.