Logs: liberachat/#haskell
| 2021-08-13 10:49:04 | <kuribas> | every type would be polymorphic. |
| 2021-08-13 10:49:16 | <lortabac> | it sounds a little extreme, but maybe worth exploring |
| 2021-08-13 10:51:14 | × | bin_ quits (~bin@user/bin/x-1583188) (Quit: ZNC - https://znc.in) |
| 2021-08-13 10:52:22 | × | euouae quits (~euouae@user/euouae) (Quit: Client closed) |
| 2021-08-13 10:52:34 | → | _bin joins (~bin@user/bin/x-1583188) |
| 2021-08-13 10:52:49 | <kuribas> | maybe put an SMT solver on the constraints... |
| 2021-08-13 10:53:25 | × | markpythonicbitc quits (~markpytho@2601:647:5a00:35:e049:539d:ba89:3861) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-08-13 10:56:12 | <lortabac> | or maybe something like CHR |
| 2021-08-13 10:58:04 | <kuribas> | yes |
| 2021-08-13 10:58:28 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-13 10:59:00 | → | kor1 joins (~kor1@user/kor1) |
| 2021-08-13 10:59:49 | → | the_proffesor joins (~theproffe@c-24-9-30-127.hsd1.co.comcast.net) |
| 2021-08-13 11:00:40 | → | Guest|77 joins (~Guest|77@dynamic-077-008-153-029.77.8.pool.telefonica.de) |
| 2021-08-13 11:01:00 | × | Guest|77 quits (~Guest|77@dynamic-077-008-153-029.77.8.pool.telefonica.de) (Client Quit) |
| 2021-08-13 11:01:35 | × | theproffesor quits (~theproffe@2601:282:847f:8010::3a29) (Ping timeout: 252 seconds) |
| 2021-08-13 11:02:20 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 2021-08-13 11:02:57 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds) |
| 2021-08-13 11:05:21 | → | norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) |
| 2021-08-13 11:05:22 | × | chomwitt quits (~chomwitt@2a02:587:dc04:9a00:12c3:7bff:fe6d:d374) (Ping timeout: 272 seconds) |
| 2021-08-13 11:09:05 | → | elf_fortrez joins (~elf_fortr@adsl-72-50-7-29.prtc.net) |
| 2021-08-13 11:16:28 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-13 11:16:38 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 2021-08-13 11:19:29 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds) |
| 2021-08-13 11:23:52 | → | pfurla_ joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net) |
| 2021-08-13 11:26:15 | × | mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Ping timeout: 268 seconds) |
| 2021-08-13 11:26:57 | × | pfurla quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 248 seconds) |
| 2021-08-13 11:34:57 | × | wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal) |
| 2021-08-13 11:36:23 | → | markpythonicbitc joins (~markpytho@50-254-150-41-static.hfc.comcastbusiness.net) |
| 2021-08-13 11:37:30 | → | markpythonicbit_ joins (~markpytho@50-254-150-41-static.hfc.comcastbusiness.net) |
| 2021-08-13 11:37:38 | × | markpythonicbitc quits (~markpytho@50-254-150-41-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer) |
| 2021-08-13 11:37:41 | × | markpythonicbit_ quits (~markpytho@50-254-150-41-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer) |
| 2021-08-13 11:40:29 | → | markpythonicbitc joins (~markpytho@50.228.44.6) |
| 2021-08-13 11:40:47 | × | drd quits (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) (Ping timeout: 258 seconds) |
| 2021-08-13 11:43:33 | → | MoC joins (~moc@user/moc) |
| 2021-08-13 11:43:33 | × | Vajb quits (~Vajb@2001:999:252:4e3c:27f9:d93:655e:583) (Read error: Connection reset by peer) |
| 2021-08-13 11:45:01 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 2021-08-13 11:46:05 | <kuribas> | lortabac: well, constraint solving could produce monomorphic types, for example: "forall a b. (U a Int) ~ (I b Int)" Would imply the monomorphic type Int (with a == None, b == All). |
| 2021-08-13 11:46:06 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 2021-08-13 11:46:38 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2021-08-13 11:48:11 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 2021-08-13 11:50:01 | → | mikoto-chan joins (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) |
| 2021-08-13 11:52:01 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 248 seconds) |
| 2021-08-13 11:53:03 | × | Guest8544 quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-08-13 11:53:19 | <lortabac> | kuribas: I wonder if there is a paper that describes such a type system, it looks like a generalization of things like row types or polymorphic variants |
| 2021-08-13 11:53:49 | <Tisoxin> | Is sb using the git revision of xmonad declaratively on nixos/with home manager? |
| 2021-08-13 11:54:01 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 2021-08-13 11:54:07 | <Tisoxin> | oh, sorry wrong channel |
| 2021-08-13 11:57:47 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer) |
| 2021-08-13 11:57:55 | → | chris joins (~chris@81.96.113.213) |
| 2021-08-13 11:57:58 | chris | is now known as Guest2198 |
| 2021-08-13 11:58:11 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 2021-08-13 12:00:53 | <lortabac> | kuribas: this seems related https://www.normalesup.org/~simonet/publis/simonet-aplas03.pdf |
| 2021-08-13 12:02:09 | × | Guest2198 quits (~chris@81.96.113.213) (Ping timeout: 248 seconds) |
| 2021-08-13 12:02:41 | → | timCF_ joins (~timCF@200-149-20-81.sta.estpak.ee) |
| 2021-08-13 12:03:22 | <kuribas> | lortabac: interesting |
| 2021-08-13 12:05:11 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 2021-08-13 12:06:56 | <timCF_> | Hello! Is there any way of "inline" or "local" class instances, valid in scope of given function? I'm using monadic instances of some classes like "Service1Rpc", "Service2Rpc" etc to "mock" network calls of business logic in tests. But sometimes I want to "mock" it differently in one module. Does it make sense, is there the way to do so? Or there are better ways to "mock" network calls inside the tests? |
| 2021-08-13 12:07:07 | × | shredder quits (~user@user/shredder) (Quit: quitting) |
| 2021-08-13 12:07:26 | → | shredder joins (~user@user/shredder) |
| 2021-08-13 12:08:05 | <kuribas> | lortabac: "In this paper, we are interested in the case ofstructuralsubtyping, where comparabletypes must have the same shape and can only differ by theiratomic leaves." |
| 2021-08-13 12:08:23 | <kuribas> | lortabac: that seems different, because in my system (U a Int) can be unified with (I b Int). |
| 2021-08-13 12:10:27 | <kuribas> | timCF_: Not really answering your question, but personally I never "mock" IO or services. I write my code in such a way that the core business logic is pure, and can be tested without any mocks. |
| 2021-08-13 12:10:32 | → | o1lo01ol1o joins (~o1lo01ol1@31.22.136.245) |
| 2021-08-13 12:12:06 | × | elf_fortrez quits (~elf_fortr@adsl-72-50-7-29.prtc.net) (Quit: Client closed) |
| 2021-08-13 12:12:13 | <kuribas> | timCF_: for example, instead of mocking your database or remote service calls, I separate the fetching of the data with the handling of it. |
| 2021-08-13 12:12:25 | <lortabac> | timCF_: there is a package called reflection that allows you to create local instances, but I think kuribas's approach is much better |
| 2021-08-13 12:13:36 | <timCF_> | thanks! |
| 2021-08-13 12:13:53 | <timCF_> | kuribas: do you have any code example written in this way? |
| 2021-08-13 12:14:12 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 2021-08-13 12:14:55 | <kuribas> | timCF_: the code I am writing now does it like that (but it's for the company, I cannot show it). |
| 2021-08-13 12:15:23 | <lortabac> | timCF_: https://www.parsonsmatt.org/2017/07/27/inverted_mocking.html |
| 2021-08-13 12:16:49 | <timCF_> | thanks! |
| 2021-08-13 12:19:07 | <timCF_> | lortabac: you did mentioned this package, or some other? https://hackage.haskell.org/package/reflection-2.1.6/docs/Data-Reflection.html |
| 2021-08-13 12:19:32 | <lortabac> | timCF_: this one, but keep in mind that this is very extreme stuff |
| 2021-08-13 12:20:40 | <kuribas> | timCF_: also creating different datatypes for different stages of the program is very useful. |
| 2021-08-13 12:24:38 | × | xff0x quits (~xff0x@2001:1a81:5278:5300:c5b:fd09:8552:8cb2) (Ping timeout: 252 seconds) |
| 2021-08-13 12:24:53 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-08-13 12:25:31 | → | xff0x joins (~xff0x@2001:1a81:5278:5300:7b4f:e6f2:6a79:44e0) |
| 2021-08-13 12:25:57 | <lortabac> | kuribas: this is a language that implements structural subtyping, with open records, open variants and first-class pattern-matching https://github.com/owo-lang/MLPolyR |
| 2021-08-13 12:26:06 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 2021-08-13 12:26:40 | <lortabac> | it's not exactly like your idea, but (to me) it seems closely related |
| 2021-08-13 12:27:01 | <kuribas> | yeah, worth looking into |
| 2021-08-13 12:28:39 | <kuribas> | lortabac: I was inspired by typed.clojure, which uses local inference, not HM, to see if it could work with HM. |
| 2021-08-13 12:30:01 | <lortabac> | as far as I know structural subtyping is mostly used in type-checkers for dynamic languages |
| 2021-08-13 12:30:08 | × | meltedbrain_y2k quits (~tekserf@31.4.247.41) (Quit: Leaving.) |
| 2021-08-13 12:30:38 | <lortabac> | I think there is one Python that uses a similar type system |
| 2021-08-13 12:30:43 | <lortabac> | *one for Python |
| 2021-08-13 12:30:46 | <kuribas> | typed clojure follows the model of typed racket. |
| 2021-08-13 12:30:48 | <kuribas> | right |
| 2021-08-13 12:30:49 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-13 12:30:56 | <lortabac> | typed clojure seems different though |
| 2021-08-13 12:31:15 | <lortabac> | it probably requires at least some annotations |
| 2021-08-13 12:31:18 | <lortabac> | right? |
| 2021-08-13 12:31:32 | <kuribas> | it does. |
| 2021-08-13 12:32:08 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9566746faa93d7d42dfa.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2021-08-13 12:32:49 | <kuribas> | Maybe it would be more fruitful to create a typed language that compiles to clojure. |
| 2021-08-13 12:32:49 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9566746faa93d7d42dfa.dip0.t-ipconnect.de) |
| 2021-08-13 12:32:56 | <kuribas> | Instead of typing clojure code... |
| 2021-08-13 12:35:05 | <kuribas> | I like haskell, but I can understand how often it's hard to deal with the wrapping and uwrapping of monadic layers. |
| 2021-08-13 12:35:23 | <kuribas> | Or just finding that right abstraction which will solve your current problem elegantly. |
All times are in UTC.