2020/10/05

2020-10-05 00:01:58 +0200oisdk(~oisdk@2001:bb6:3329:d100:89a1:5b05:b385:265f)
2020-10-05 00:02:34 +0200pqwy[m]1(pqwymatrix@gateway/shell/matrix.org/x-xmdgkqmgtiqeqonc)
2020-10-05 00:02:37 +0200solonarv(~solonarv@astrasbourg-653-1-252-112.w92-161.abo.wanadoo.fr)
2020-10-05 00:03:31 +0200petersen(~petersen@redhat/juhp) (Quit: petersen)
2020-10-05 00:03:43 +0200 <sep2> I suppose not I was wondering if I had the right idea of going about it
2020-10-05 00:04:00 +0200miguicho(~miguel@host-186-101-215-54.netlife.ec) (Ping timeout: 272 seconds)
2020-10-05 00:04:11 +0200petersen(~petersen@redhat/juhp)
2020-10-05 00:05:35 +0200kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-10-05 00:07:13 +0200 <Buntspecht> sep2: The logic look okay too me, but there's a syntax error at the bottom. If you introduce lokal definitions for a function, you use the "where" keyword
2020-10-05 00:07:32 +0200 <Buntspecht> Also there's a spurious $ in line 29
2020-10-05 00:08:51 +0200 <int-e> that looks like a cut-off line actuall
2020-10-05 00:09:41 +0200 <int-e> And the $ is the 80th character on that line, making that idea more plausible.
2020-10-05 00:12:35 +0200 <Cheery> I installed LanguageClient to Vim and trying things out. Any idea of what convenient things I can do with this thing?
2020-10-05 00:13:05 +0200 <Cheery> For example, can I see the stuff for the type holes, and can this thing evaluate things for me?
2020-10-05 00:13:49 +0200sep2(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2020-10-05 00:15:05 +0200mirrorbird(~psutcliff@2a00:801:42a:82eb:6edc:4c78:a574:2a8f) (Quit: Leaving)
2020-10-05 00:15:43 +0200 <maerwald> evaluating selections it cannot do
2020-10-05 00:16:26 +0200isovector1(~isovector@172.103.216.166) (Quit: Leaving)
2020-10-05 00:16:40 +0200renzhi(~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 246 seconds)
2020-10-05 00:17:04 +0200mrchampion(~mrchampio@216-211-57-41.dynamic.tbaytel.net) (Remote host closed the connection)
2020-10-05 00:17:22 +0200irc_user(uid423822@gateway/web/irccloud.com/x-jgthhmutdxudiomv)
2020-10-05 00:19:16 +0200 <Cheery> It shows a cross in the column on the left side, and I'd like to see the whole error message at that point.
2020-10-05 00:19:21 +0200michalrus(m@michalrus.com) (Ping timeout: 260 seconds)
2020-10-05 00:20:59 +0200mpereira(~mpereira@2a02:810d:f40:d96:1c35:7f2e:59ff:953) (Ping timeout: 272 seconds)
2020-10-05 00:21:37 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2020-10-05 00:23:15 +0200 <justsomeguy> Is C a weakly typed language?
2020-10-05 00:24:03 +0200 <maerwald> Cheery: open quickfix window
2020-10-05 00:24:33 +0200 <justsomeguy> (For context, I'm learning about type systems, and don't know any C, but suspect that it may be weakly typed since I see a lot of errors related to pointers.)
2020-10-05 00:24:45 +0200notzmv`(~user@177.45.26.174)
2020-10-05 00:24:45 +0200notzmv`(~user@177.45.26.174) (Read error: Connection reset by peer)
2020-10-05 00:25:13 +0200zmv(~user@177.45.26.174)
2020-10-05 00:25:17 +0200jonatanb(~jonatanb@79.184.190.239.ipv4.supernova.orange.pl) (Quit: Leaving...)
2020-10-05 00:25:36 +0200zmvGuest90969
2020-10-05 00:25:49 +0200 <justsomeguy> I'm actually not sure if this is a productive question to ask. Maybe I shouldn't have. But I thought it would be interesting to hear a Haskellers opinion about it.
2020-10-05 00:26:10 +0200whiteline(~whiteline@unaffiliated/whiteline) (Ping timeout: 272 seconds)
2020-10-05 00:26:42 +0200xelxebar(~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection)
2020-10-05 00:26:56 +0200Guest90969notzmv
2020-10-05 00:27:03 +0200xelxebar(~xelxebar@gateway/tor-sasl/xelxebar)
2020-10-05 00:27:07 +0200notzmv(~user@177.45.26.174) (Changing host)
2020-10-05 00:27:07 +0200notzmv(~user@unaffiliated/zmv)
2020-10-05 00:27:40 +0200 <justsomeguy> ...in fact, please just ignore me; I'm about to go for a run, anyways, and this seems like a spicy topic.
2020-10-05 00:29:45 +0200 <dolio> "Weakly typed" doesn't have any definitive meaning, really.
2020-10-05 00:30:55 +0200Jeanne-Kamikaze(~Jeanne-Ka@68.235.43.110) (Ping timeout: 240 seconds)
2020-10-05 00:30:56 +0200michalrus(m@michalrus.com)
2020-10-05 00:31:10 +0200aenesidemus(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Quit: Leaving)
2020-10-05 00:31:11 +0200aenesidemus_(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Quit: Leaving)
2020-10-05 00:31:27 +0200 <justsomeguy> One possible meaning that I've read is that weakly typed means that you can perform operations on a term of some type that is normally not permissible by, for example, an implicit coercion, or acting on it's underlying representation without going through the type system.
2020-10-05 00:33:05 +0200 <justsomeguy> But it's interesting that you say that -- it seems like a lot of these ideas (about types) are more like general notions than very well defined and agreed on things.
2020-10-05 00:34:18 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:413a:68d0:b0f8:a104) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 00:34:22 +0200 <justsomeguy> (...and even the definition of functional programming seems to be not well agreed on, which kind of surprised me...)
2020-10-05 00:35:07 +0200 <dolio> Well, there are more precise ideas out there. But the ones used by run of the mill programmers tend to be more intuitive ideas, and not precise.
2020-10-05 00:35:53 +0200shatriff(~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-05 00:35:55 +0200justsomeguyis just going to have to read TAPL some day. Scratching the surface by reading a few papers has made him curious about what's out there.
2020-10-05 00:37:03 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 00:37:51 +0200 <Cheery> maerwald: I have a quickfix window?
2020-10-05 00:38:00 +0200 <maerwald> Cheery: yeah, you are a vim user?
2020-10-05 00:38:31 +0200 <Cheery> maerwald: yup, but lsp is relatively new meet.
2020-10-05 00:38:54 +0200 <maerwald> you should know about quickfix window and location window then
2020-10-05 00:39:29 +0200 <maerwald> https://medium.com/@lakshmankumar12/quickfix-and-location-list-in-vim-ca0292ac894d
2020-10-05 00:41:22 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 272 seconds)
2020-10-05 00:41:23 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 240 seconds)
2020-10-05 00:42:15 +0200 <dolio> The closest formal thing I can think of that would match "weakly typed" is "unsound." But judging whether C is unsound would require thinking about what a "model" of C is supposed to be.
2020-10-05 00:44:57 +0200 <justsomeguy> I've heard the term model come up a few times. What is a model?
2020-10-05 00:45:19 +0200kori(~kori@2804:14c:85a3:9105::1000)
2020-10-05 00:45:19 +0200kori(~kori@2804:14c:85a3:9105::1000) (Changing host)
2020-10-05 00:45:19 +0200kori(~kori@arrowheads/kori)
2020-10-05 00:45:57 +0200jgt(~jgt@109.122.28.107)
2020-10-05 00:46:04 +0200 <dolio> A model is a mathematical structure that can serve as a basis for interpreting what syntactic things 'mean'.
2020-10-05 00:47:19 +0200 <justsomeguy> Interesting.
2020-10-05 00:47:52 +0200justsomeguywill save the rest of his questions for a web search, since he's about to leave
2020-10-05 00:48:03 +0200 <justsomeguy> Thanks for humoring my silly questions ^_^
2020-10-05 00:48:48 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-10-05 00:50:02 +0200JohnTalent(~john@unaffiliated/johntalent)
2020-10-05 00:50:16 +0200 <JohnTalent> What are some decent tools/lib for programming websites in haskell?
2020-10-05 00:50:57 +0200hackagetasty-discover 4.2.2 - Test discovery for the tasty framework. https://hackage.haskell.org/package/tasty-discover-4.2.2 (haskellworks)
2020-10-05 00:51:17 +0200 <dolio> Anyhow, whether or not C is sound probably depends on what you choose the models to be like, so you're just deciding whether or not you want it to be. If you choose the models to be like, "there's just bits," then it's probably all sound. If integers are not interpreted as the same things as floats which are not the same as structures, then it's probably not sound.
2020-10-05 00:52:27 +0200 <dolio> "There's just bits" is a lot less useful, though.
2020-10-05 00:52:43 +0200m0rphism(~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 246 seconds)
2020-10-05 00:53:20 +0200LKoen(~LKoen@81.255.219.130) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2020-10-05 00:53:30 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 00:53:53 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 260 seconds)
2020-10-05 00:56:52 +0200jgt(~jgt@109.122.28.107)
2020-10-05 00:59:33 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:c50d:40d9:7a86:602b)
2020-10-05 00:59:33 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-10-05 00:59:45 +0200conal(~conal@64.71.133.70)
2020-10-05 00:59:46 +0200 <maerwald> JohnTalent: miso
2020-10-05 01:01:21 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 260 seconds)
2020-10-05 01:02:58 +0200jgt(~jgt@109.122.28.107)
2020-10-05 01:04:34 +0200ym555(~ym@41.42.210.219) (Ping timeout: 256 seconds)
2020-10-05 01:07:16 +0200kupi(uid212005@gateway/web/irccloud.com/x-dndtziltoquslpzk)
2020-10-05 01:07:25 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 240 seconds)
2020-10-05 01:08:50 +0200Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
2020-10-05 01:09:54 +0200 <JohnTalent> maerwald: thank you.
2020-10-05 01:10:11 +0200ski. o O ( progress and preservation, "well-typed programs don't go wrong" )
2020-10-05 01:11:04 +0200 <JohnTalent> maerwald: firefox reports the examples are a security risk.
2020-10-05 01:11:55 +0200emmanuel_erc(~user@2604:2000:1382:ce03:f102:da07:a063:e98b) (Ping timeout: 240 seconds)
2020-10-05 01:12:08 +0200jgt(~jgt@109.122.28.107)
2020-10-05 01:12:38 +0200mrchampion(~mrchampio@216-211-57-41.dynamic.tbaytel.net)
2020-10-05 01:14:07 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de)
2020-10-05 01:15:25 +0200notzmv(~user@unaffiliated/zmv) (Remote host closed the connection)
2020-10-05 01:15:38 +0200notzmv(~user@177.45.26.174)
2020-10-05 01:15:47 +0200solonarv(~solonarv@astrasbourg-653-1-252-112.w92-161.abo.wanadoo.fr) (Ping timeout: 265 seconds)
2020-10-05 01:15:47 +0200mav1(~mav@p5b02806a.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 01:16:02 +0200notzmvGuest64877
2020-10-05 01:16:25 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 240 seconds)
2020-10-05 01:17:23 +0200Guest64877zmv`
2020-10-05 01:17:32 +0200zmv`notzmv
2020-10-05 01:17:40 +0200notzmv(~user@177.45.26.174) (Changing host)
2020-10-05 01:17:40 +0200notzmv(~user@unaffiliated/zmv)
2020-10-05 01:18:55 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9) (Ping timeout: 240 seconds)
2020-10-05 01:21:17 +0200jgt(~jgt@109.122.28.107)
2020-10-05 01:22:08 +0200xerox_(~xerox@unaffiliated/xerox) (Ping timeout: 256 seconds)
2020-10-05 01:22:14 +0200Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
2020-10-05 01:23:12 +0200blasius(~blasius@4e69b241.skybroadband.com)
2020-10-05 01:26:05 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 260 seconds)
2020-10-05 01:30:20 +0200nineonine(~nineonine@216.81.48.202) (Remote host closed the connection)
2020-10-05 01:30:26 +0200jgt(~jgt@109.122.28.107)
2020-10-05 01:34:25 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
2020-10-05 01:34:51 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2020-10-05 01:36:21 +0200ericsagnes(~ericsagne@2405:6580:0:5100:1532:a71d:fbe4:fbaf) (Ping timeout: 272 seconds)
2020-10-05 01:38:38 +0200sep2(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net)
2020-10-05 01:41:18 +0200miguicho(~miguel@host-186-101-215-54.netlife.ec)
2020-10-05 01:41:53 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2020-10-05 01:42:18 +0200leapingfrogs(~leapingfr@host86-136-28-78.range86-136.btcentralplus.com)
2020-10-05 01:42:28 +0200emmanuel_erc(~user@2604:2000:1382:ce03:88f9:ad61:775c:c25)
2020-10-05 01:43:32 +0200obihann(~jhann@156.34.160.69)
2020-10-05 01:46:07 +0200seanvert(~user@177.84.244.242)
2020-10-05 01:46:16 +0200seanvert(~user@177.84.244.242) (Remote host closed the connection)
2020-10-05 01:46:53 +0200seanvert(~user@177.84.244.242)
2020-10-05 01:47:03 +0200leapingfrogs(~leapingfr@host86-136-28-78.range86-136.btcentralplus.com) (Ping timeout: 260 seconds)
2020-10-05 01:48:28 +0200ericsagnes(~ericsagne@2405:6580:0:5100:a157:330d:992b:2b45)
2020-10-05 01:48:30 +0200conal(~conal@64.71.133.70) (Ping timeout: 272 seconds)
2020-10-05 01:49:27 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-05 01:49:59 +0200xerox_(~xerox@unaffiliated/xerox)
2020-10-05 01:50:37 +0200leapingfrogs(~leapingfr@host86-136-28-78.range86-136.btcentralplus.com)
2020-10-05 01:51:50 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2020-10-05 01:51:55 +0200conal(~conal@209.58.132.107)
2020-10-05 01:52:46 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 01:53:00 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 01:53:00 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 01:53:00 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 01:55:21 +0200alp(~alp@2a01:e0a:58b:4920:f043:ba1b:f5d1:917) (Ping timeout: 272 seconds)
2020-10-05 01:55:54 +0200leapingfrogs(~leapingfr@host86-136-28-78.range86-136.btcentralplus.com) (Ping timeout: 265 seconds)
2020-10-05 01:56:45 +0200motte(~weechat@unaffiliated/motte) (Ping timeout: 240 seconds)
2020-10-05 01:57:29 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 01:57:30 +0200brettgilio(~brettgili@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com>)
2020-10-05 01:57:36 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de)
2020-10-05 02:00:00 +0200 <quintasan> Is there any way I could write a function Hasql.Decoders.Result (Int32, Text) -> Tea where Tea is Tea { id :: Int32, name :: Text }? https://hackage.haskell.org/package/hasql-1.4.4.2/docs/Hasql-Decoders.html here are the docs. If my approach is not the correct one then let me know as well because I'm a beginner
2020-10-05 02:00:02 +0200Hellaenergy(~Hellaener@185.244.214.216) ()
2020-10-05 02:00:10 +0200atk(~Arch-TK@ircpuzzles/staff/Arch-TK) (Quit: Well this is unexpected.)
2020-10-05 02:00:30 +0200atk(~Arch-TK@ircpuzzles/staff/Arch-TK)
2020-10-05 02:02:08 +0200brettgilio(~brettgili@brettgilio.com)
2020-10-05 02:04:25 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 02:04:54 +0200sep2(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-10-05 02:04:55 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net) (Ping timeout: 240 seconds)
2020-10-05 02:05:01 +0200nineonine(~nineonine@216-19-190-182.dyn.novuscom.net)
2020-10-05 02:05:26 +0200alp(~alp@2a01:e0a:58b:4920:d122:6c79:ff7:b4e4)
2020-10-05 02:06:01 +0200nineonin_(~nineonine@50.216.62.2)
2020-10-05 02:09:29 +0200nineonine(~nineonine@216-19-190-182.dyn.novuscom.net) (Ping timeout: 260 seconds)
2020-10-05 02:12:24 +0200nineonin_(~nineonine@50.216.62.2) (Ping timeout: 258 seconds)
2020-10-05 02:13:12 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 272 seconds)
2020-10-05 02:14:21 +0200pfurla(~pfurla@64.145.79.141)
2020-10-05 02:18:08 +0200seanvert(~user@177.84.244.242) (Read error: Connection reset by peer)
2020-10-05 02:19:30 +0200nineonine(~nineonine@50.216.62.2)
2020-10-05 02:20:01 +0200seanvert(~user@177.84.244.242)
2020-10-05 02:23:27 +0200hackagecrc 0.1.1.0 - Implements various Cyclic Redundancy Checks (CRC) https://hackage.haskell.org/package/crc-0.1.1.0 (MichaelXavier)
2020-10-05 02:24:27 +0200emmanuel_erc(~user@2604:2000:1382:ce03:88f9:ad61:775c:c25) (Ping timeout: 240 seconds)
2020-10-05 02:25:24 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 02:25:27 +0200hackagecrc 0.1.1.1 - Implements various Cyclic Redundancy Checks (CRC) https://hackage.haskell.org/package/crc-0.1.1.1 (MichaelXavier)
2020-10-05 02:25:49 +0200nineonine(~nineonine@50.216.62.2) (Ping timeout: 258 seconds)
2020-10-05 02:27:39 +0200alp(~alp@2a01:e0a:58b:4920:d122:6c79:ff7:b4e4) (Ping timeout: 272 seconds)
2020-10-05 02:28:29 +0200seanvert(~user@177.84.244.242) (Read error: Connection reset by peer)
2020-10-05 02:29:14 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
2020-10-05 02:29:55 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 240 seconds)
2020-10-05 02:33:23 +0200emmanuel_erc(~user@2604:2000:1382:ce03:88f9:ad61:775c:c25)
2020-10-05 02:34:11 +0200Wuzzy(~Wuzzy@p5790e6f5.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-05 02:34:13 +0200 <JohnTalent> sounds like a honeypot.
2020-10-05 02:34:23 +0200 <sm[m]> JohnTalent: also yesod, IHP, maybe clckwrks
2020-10-05 02:34:42 +0200 <JohnTalent> sm[m]: yeah, that makes perfect sense in english.
2020-10-05 02:34:44 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
2020-10-05 02:34:56 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
2020-10-05 02:35:00 +0200 <sm[m]> nobody uses clckwrks but it keeps on ticking, maybe it's good!
2020-10-05 02:35:35 +0200seanvert(~user@177.84.244.242)
2020-10-05 02:36:33 +0200polyrain(~polyrain@2001:8003:e501:6901:5451:58df:dd7d:42b9)
2020-10-05 02:38:54 +0200mathlover2(~mathlover@2604:6000:1013:129e:c3f:af24:28bd:eee4) (Quit: Leaving)
2020-10-05 02:39:20 +0200seanvert(~user@177.84.244.242) (Read error: Connection reset by peer)
2020-10-05 02:40:26 +0200pfurla(~pfurla@64.145.79.141) (Ping timeout: 272 seconds)
2020-10-05 02:41:33 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-10-05 02:45:36 +0200 <jackdk> quintasan: The key is that the `Result` type has a `Functor` instance. This means you can `fmap` over it. Let me prepare a snippet
2020-10-05 02:49:09 +0200raehik(~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2020-10-05 02:50:37 +0200 <jackdk> quintasan: Here are some examples that may clear things up: https://www.irccloud.com/pastebin/RNBBmdUn/Tea.hs
2020-10-05 02:51:16 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 02:56:06 +0200torax(~torax@185.163.110.116)
2020-10-05 02:57:19 +0200plutoniix(~q@ppp-223-24-188-55.revip6.asianet.co.th)
2020-10-05 02:58:38 +0200 <quintasan> jackdk: This still gives me Result Tea which... not exactly what I wanted. Hasql uses some weird (to me of course) idea of Encoders and Decoders and I wanted to write a decoder once and reuse it multiple times but it seems that my approach is either incorrect or I'm not good enough
2020-10-05 02:58:39 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:c50d:40d9:7a86:602b) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 02:58:58 +0200 <jackdk> quintasan: Oh I must've misread you sorry
2020-10-05 02:59:01 +0200 <quintasan> And I'm still having problems with Text vs. [Char]
2020-10-05 02:59:59 +0200 <ski> jackdk : nitpick, that's using function extensionality, not eta-reduction
2020-10-05 03:00:06 +0200 <quintasan> jackdk: No worries, I'm trying to build a web application in Haskell coming from Rails so it's kind of frustrating when I can't do simple stuff like writing things to database and getting hashes back
2020-10-05 03:00:25 +0200 <jackdk> ski: thank you
2020-10-05 03:00:44 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 256 seconds)
2020-10-05 03:00:47 +0200 <ski> function extensionality says that if `f x = g x' for every `x', then `f = g'
2020-10-05 03:01:25 +0200 <jackdk> makes sense, cheers
2020-10-05 03:01:41 +0200 <ski> eta-conversion says that `\x -> (...) x' (where `x' doesn't occur (freely) in `...') is equal to `...'. (forward direction is eta-reduction, backward is eta-expansion)
2020-10-05 03:01:43 +0200wei2912(~wei2912@unaffiliated/wei2912)
2020-10-05 03:01:58 +0200 <ski> they're closely related, though. you can prove they're equivalent
2020-10-05 03:03:59 +0200 <dolio> Sometimes.
2020-10-05 03:04:00 +0200 <ski> (you could try to prove this, if you want to. it's not terribly complicated. you'll need to know beta-conversion, though, that `(\x -> <body>) <argument>' is equal to `<body>' with all (free) occurances of `x' replaced by `<argument>')
2020-10-05 03:04:03 +0200plutoniix(~q@ppp-223-24-188-55.revip6.asianet.co.th) (Ping timeout: 260 seconds)
2020-10-05 03:04:42 +0200ddellacosta(~dd@86.106.121.168) (Ping timeout: 256 seconds)
2020-10-05 03:05:28 +0200 <ski> mm .. i suppose it depends on what ambient theory one has
2020-10-05 03:05:39 +0200 <jackdk> quintasan: looking at the examples in https://github.com/nikita-volkov/hasql , it looks like Result is passed to the constructor of Statement, and you run Statements using Hasql.Session.statement
2020-10-05 03:05:47 +0200 <ski> (one'll need some version of congruence as well, i think)
2020-10-05 03:06:10 +0200 <jackdk> quintasan: then you use Hasql.Session.run to turn a (Session a) and a Connection into IO (Either QueryError a)
2020-10-05 03:07:08 +0200 <dolio> Yeah. For instance, Agda's "propositional equality" admits eta, but not extensionality.
2020-10-05 03:07:10 +0200 <jackdk> quintasan: the bottom of the readme on github talks about a hasql-th lib that automatically generates the Statement for you from the SQL string, so that might be a little easier
2020-10-05 03:07:47 +0200 <dolio> At least in the normal mode.
2020-10-05 03:08:08 +0200conal(~conal@209.58.132.107) (Quit: Computer has gone to sleep.)
2020-10-05 03:08:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 03:14:10 +0200 <ski> dolio : hm, so one can't formalize `f = \x -> f x = \x -> g x = g', then ?
2020-10-05 03:14:54 +0200polyrain(~polyrain@2001:8003:e501:6901:5451:58df:dd7d:42b9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 03:15:38 +0200 <dolio> There's no way to apply the extensionality hypothesis for the middle step.
2020-10-05 03:16:40 +0200 <dolio> You basically want to apply both sides to an abstract variable, but there's no way to do that.
2020-10-05 03:16:52 +0200plutoniix(~q@175.176.222.7)
2020-10-05 03:17:01 +0200irc_user(uid423822@gateway/web/irccloud.com/x-jgthhmutdxudiomv) (Quit: Connection closed for inactivity)
2020-10-05 03:18:32 +0200 <ski> mhm, i see. so it's the congruence step that's problematic
2020-10-05 03:18:38 +0200 <dolio> Yeah.
2020-10-05 03:19:25 +0200 <dolio> Congruence holds judgmentally, but has no propositional equivalent.
2020-10-05 03:19:34 +0200 <ski> is this related to decidability of type-checking ? intensional vs. extensional type theory ?
2020-10-05 03:19:43 +0200 <dolio> The way to write it propositionally is basically extensionality.
2020-10-05 03:19:52 +0200 <ski> (i don't think i understand the latter distinction that well)
2020-10-05 03:20:15 +0200 <dolio> Or, it's extensionality up to eta.
2020-10-05 03:20:55 +0200ericsagnes(~ericsagne@2405:6580:0:5100:a157:330d:992b:2b45) (Ping timeout: 240 seconds)
2020-10-05 03:20:56 +0200 <dolio> Yeah, extensional type theory can do it somehow, because the propositional equalities can be turned back into judgmental equalities.
2020-10-05 03:21:28 +0200 <ski> yea .. discarding the proof term. which seems like hocus pocus, to me
2020-10-05 03:22:06 +0200 <ski> (hopefully some version of HoTT will improve on this ?)
2020-10-05 03:22:08 +0200 <dolio> But, cubical type theory also allows it, basically because it has a mechanism for the variable thing.
2020-10-05 03:22:42 +0200 <dolio> You can abstract over a 'dimension' to prove the equality, and then you can give a lambda expression which is doing the variable abstraction.
2020-10-05 03:23:17 +0200 <dolio> I think that might be one of the insights of this paper, too: https://arxiv.org/abs/2008.08533
2020-10-05 03:23:55 +0200 <ski> oh, is that the square root thing ?
2020-10-05 03:24:39 +0200 <dolio> It's a generalization of that (apparently) and other stuff. I hadn't heard of the square root thing until this paper.
2020-10-05 03:24:52 +0200 <ski> (i recall reading about 2-dimensional (directed) type theory (Licata, iirc). thinking i could express some of the things there more nicely, with my notation)
2020-10-05 03:25:12 +0200 <ski> mhm. ty for the suggestion
2020-10-05 03:25:26 +0200 <dolio> Also one of the examples is fresh names in nominal logic, which seems like the sort of thing you'd need for this.
2020-10-05 03:25:41 +0200 <dolio> Or, one possible sort of thing.
2020-10-05 03:26:22 +0200 <ski> hm. i remember briefly taking a look at nominal logic, at some point, but not quite getting it, or possibly not quite liking it
2020-10-05 03:26:44 +0200conal(~conal@209.58.132.107)
2020-10-05 03:26:55 +0200 <dolio> Yeah, I think it's not ideal.
2020-10-05 03:26:58 +0200ski. o O ( lambdaProlog,MacroML,MetaML,MetaOCaml )
2020-10-05 03:28:23 +0200 <dolio> Like, in this situation you want sort of a 'fresh variable of a type', but the variables in nominal logic aren't typed.
2020-10-05 03:29:50 +0200 <ski> and it's not entirely straight-forward to make a multi -sorted / -typed version of it ?
2020-10-05 03:30:08 +0200 <dolio> Well, I don't know. There are other things like that.
2020-10-05 03:30:22 +0200 <dolio> Like contextual modal type theory.
2020-10-05 03:30:38 +0200 <ski> mm. that's interesting, i recall
2020-10-05 03:30:42 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 03:31:20 +0200dcoutts_(~duncan@unaffiliated/dcoutts) (Remote host closed the connection)
2020-10-05 03:31:32 +0200 <ski> (relativizing the modality by a context, iirc)
2020-10-05 03:32:11 +0200nineonine(~nineonine@50.216.62.2)
2020-10-05 03:33:29 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 03:34:19 +0200ericsagnes(~ericsagne@2405:6580:0:5100:97e:4c35:feee:3de8)
2020-10-05 03:34:30 +0200ski. o O ( "A Combinatorial Theory of Formal Series" (about (combinatorial) species) by André Joyal in 1981 (partial (in-progress) translation by Brent A. Yorgey) at <http://ozark.hendrix.edu/~yorgey/pub/series-formelles.pdf> )
2020-10-05 03:35:59 +0200 <quintasan> https://github.com/nikita-volkov/hasql-tutorial1/blob/master/library/HasqlTutorial1/Transaction.hs – why is Write and Serializable visible in this file, I don't get it. My module is even simpler (https://pastebin.com/XD1nAVA4) but I'm getting Data constructor not in scope: Write. I'm pretty much sure Write and Serializable come from https://hackage.haskell.org/package/hasql-transaction-1.0.0.1/docs/Hasql-Transaction-Sessions.html
2020-10-05 03:37:38 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6)
2020-10-05 03:38:01 +0200 <dolio> Anyhow, there's definitely work on HoTT-adjacent stuff that has a better story than the proof term just disappearing.
2020-10-05 03:38:04 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 272 seconds)
2020-10-05 03:38:24 +0200 <dolio> That's the sort of thing that makes things undecidable.
2020-10-05 03:38:56 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6) (Client Quit)
2020-10-05 03:39:47 +0200murphy_(~murphy_@2604:2000:1281:8a9e:79f9:b15f:8bb9:7d0e) (Ping timeout: 240 seconds)
2020-10-05 03:40:53 +0200 <dolio> I actually read a paper a couple days ago about how it's even a problem for constructing models in extensional type theory. Like, even if the extensional type theory is constructive, if you use its features to build a model for another theory, you end up with an uncomputable model.
2020-10-05 03:40:54 +0200murphy_(~murphy_@2604:2000:1281:8a9e:c24e:de35:eb75:8dab)
2020-10-05 03:41:45 +0200 <dolio> Because the part that needs to be decidable in practice (judgmental equality) gets modelled by the undecidable extensional equality.
2020-10-05 03:41:50 +0200 <ski> quintasan : tried importing `Hasql.Transaction.Sessions' ?
2020-10-05 03:42:32 +0200 <ski> dolio : mhm, i see
2020-10-05 03:43:10 +0200 <quintasan> ski: Yeah, now it's even worse
2020-10-05 03:43:26 +0200 <quintasan> https://pastebin.com/mZKS16v8
2020-10-05 03:44:49 +0200 <quintasan> https://pastebin.com/G8M1XsMp without highlighting
2020-10-05 03:45:14 +0200 <quintasan> I'm having a bad time here, it's either me doing something wrong or the docs being wrong (I think it's the former)
2020-10-05 03:46:02 +0200ddellacosta(~dd@86.106.121.168)
2020-10-05 03:46:07 +0200 <quintasan> https://gitlab.com/Quintasan/teadb in case anyone wants to inspect what I've done https://gitlab.com/Quintasan/teadb
2020-10-05 03:46:37 +0200polyrain(~polyrain@2001:8003:e501:6901:5451:58df:dd7d:42b9)
2020-10-05 03:46:49 +0200xff0x(~fox@2001:1a81:52c9:f600:e0a1:2683:5939:2315) (Ping timeout: 272 seconds)
2020-10-05 03:47:01 +0200 <ski> quintasan : well .. you seem to be passing four parameters, where only two are expected (as the type error says)
2020-10-05 03:48:06 +0200 <quintasan> ski: Well... you are probably right but I've tried to do what the documentation tells you to do and I'm stuck :D
2020-10-05 03:48:17 +0200xff0x(~fox@2001:1a81:5300:fe00:7915:3d42:ba93:76ea)
2020-10-05 03:48:23 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6)
2020-10-05 03:49:02 +0200 <ski> quintasan : where's `insertTeaStatement' ?
2020-10-05 03:49:32 +0200 <quintasan> ski: src/Statements.hs
2020-10-05 03:51:13 +0200 <ski> what is `name' ?
2020-10-05 03:52:04 +0200 <quintasan> name to insert in the database, it's supposed to be plain Text
2020-10-05 03:52:25 +0200 <ski> what's the type of it ?
2020-10-05 03:52:29 +0200 <ski> mhm
2020-10-05 03:53:23 +0200 <ski> insertTea name = transaction Write Serializable (statement Statements.insertTeaStatement name)
2020-10-05 03:53:52 +0200 <ski> is probably still not right, i suspect. but perhaps closer
2020-10-05 03:54:01 +0200 <quintasan> I'm suspecting the tutorial is wrong because https://github.com/nikita-volkov/hasql-tutorial1/blob/master/library/HasqlTutorial1/Transaction.hs has `import Hasql.Transaction` and then calls `statement` and https://hackage.haskell.org/package/hasql-transaction-1.0.0.1/docs/Hasql-Transaction.html says `statement` takes a -> Statement a b -> Transaction b
2020-10-05 03:54:15 +0200 <ski> oh, sorry, wrong order
2020-10-05 03:54:20 +0200 <ski> insertTea name = transaction Serializable Write (statement Statements.insertTeaStatement name)
2020-10-05 03:54:50 +0200 <ski> yea, that says `statement' only takes two parameters, now four
2020-10-05 03:56:01 +0200 <quintasan> https://hackage.haskell.org/package/hasql-transaction-1.0.0.1/docs/Hasql-Transaction-Sessions.html has `transaction` which accepts IsolationLevel -> Mode -> Transaction a -> Session a
2020-10-05 03:56:04 +0200 <quintasan> I'm confused
2020-10-05 03:56:58 +0200 <Squarism> infinisil, thanks about that existential type trick from yesterday. It was what I needed.
2020-10-05 03:57:04 +0200 <ski> and `Serializable' (an `IsolationLevel'), and `Write' (a `Mode'), seems like you wanted to feed them to `transaction' (which will also take a `Transaction b' (which is what `statement' will produce, if you feed it an `a', and a `Statement a b', which seems to fit what `insertTeaStatement' is ..), producing a `Session b')
2020-10-05 03:57:47 +0200darjeeling_(~darjeelin@122.245.210.179) (Ping timeout: 240 seconds)
2020-10-05 03:58:05 +0200 <ski> quintasan : yes. but in your paste(s), you only called `statement', not `transaction'. but you tried to pass `Serializable' and `Write' to the former, not the latter ..
2020-10-05 03:58:21 +0200skiidly wonders what Squarism did with existentials
2020-10-05 03:58:27 +0200polyrain(~polyrain@2001:8003:e501:6901:5451:58df:dd7d:42b9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 03:58:40 +0200jedws(~jedws@121.209.186.103)
2020-10-05 03:58:58 +0200 <Squarism> ski, cheating the type system. What else is there? =D
2020-10-05 03:59:25 +0200 <quintasan> ski: I'm holding on to provided tutorials for my dear life but at this point it looks to be flat-out wrong - https://github.com/nikita-volkov/hasql-tutorial1/blob/master/library/HasqlTutorial1/Transaction.hs…
2020-10-05 03:59:38 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-05 03:59:44 +0200 <Squarism> I guess I could have done wo but it sorta works so I guess I'll settle for that
2020-10-05 04:02:02 +0200 <ski> Squarism : well, i'm guessing (and guessed before), that the interface has changed, that possibly those two parameters (the `IsolationLevel' and the `Mode') previously was to be passed to `statement', but not longer goes there
2020-10-05 04:03:29 +0200 <ski> er, sorry
2020-10-05 04:03:37 +0200 <ski> quintasan : that ^ was meant for you
2020-10-05 04:04:01 +0200 <ski> Squarism : .. still wondering what you used them for :)
2020-10-05 04:08:03 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-05 04:08:53 +0200 <Squarism> ski, So I had a function. Say foo :: Bar a . Bar had a function that produced values who's type was independent of "a". So I got a bit dissapointed when I realized I had to know "a
2020-10-05 04:08:56 +0200 <Squarism> "
2020-10-05 04:09:08 +0200 <Squarism> upon invocation.
2020-10-05 04:10:07 +0200ddellacosta(~dd@86.106.121.168) (Ping timeout: 246 seconds)
2020-10-05 04:10:11 +0200 <ski> `Bar a' being a `data' type, which included a function inside ?
2020-10-05 04:10:11 +0200 <Squarism> So I did foo :: GenBar. and data GenBar = forall a. Bar => GenBar { val :: a }
2020-10-05 04:10:51 +0200 <ski> (if `foo :: Bar a', and `Bar a' is not a type synonym for a function type, then `foo' is not a function, btw)
2020-10-05 04:11:03 +0200 <ski> hm
2020-10-05 04:11:06 +0200 <Squarism> oh sorry. foo :: Bar a => a
2020-10-05 04:11:13 +0200 <Squarism> Bar was a class
2020-10-05 04:11:17 +0200 <ski> oh
2020-10-05 04:11:22 +0200 <ski> and what's the methods of `Bar' ?
2020-10-05 04:12:14 +0200 <Squarism> well it was gimmeString :: a -> String
2020-10-05 04:12:26 +0200 <Squarism> sure, a is an argument there.
2020-10-05 04:12:28 +0200 <ski> only that ?
2020-10-05 04:12:40 +0200 <Squarism> I mean, I make it simpler for ease of discussion.
2020-10-05 04:13:17 +0200 <ski> your `GenBar' expresses/encodes `exists a. Bar a *> a' (i presume you meant `Bar a', not just `Bar' in the definition of `GenBar' ..)
2020-10-05 04:13:35 +0200 <Squarism> yep
2020-10-05 04:13:43 +0200 <Squarism> Bar a
2020-10-05 04:13:51 +0200 <ski> if `Bar a' only has `gimmeString :: a -> String', then `exists a. Bar a *> a' is basically the same as just `String'. so the existential is fairly useless, then
2020-10-05 04:14:18 +0200 <ski> but perhaps you had some more methods, which perhaps mentioned `a' more than ones ? or perhaps mentioned `a' in return type ?
2020-10-05 04:14:29 +0200 <ski> s/ones/once/
2020-10-05 04:15:34 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9)
2020-10-05 04:15:57 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
2020-10-05 04:17:25 +0200 <Squarism> I tend to confuse myself that classes are like java interface. I forget you have to parameterize all usage of them. a must be bound in scope I guess you say.
2020-10-05 04:19:44 +0200 <ski> yea, in an implementation of methods of an interface in Java, you can use `this'
2020-10-05 04:19:52 +0200 <ski> there is an object, associated with the interface
2020-10-05 04:19:57 +0200 <dsal> I think java's worse at mentally contaminating people than basic.
2020-10-05 04:20:01 +0200 <ski> not so, with type classes in Haskell
2020-10-05 04:20:05 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2020-10-05 04:20:10 +0200urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2020-10-05 04:21:25 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-10-05 04:21:53 +0200 <quintasan> \o/
2020-10-05 04:21:54 +0200 <quintasan> I got it
2020-10-05 04:22:39 +0200 <quintasan> But at what price, it's 4:21
2020-10-05 04:22:42 +0200 <ski> `Comparable' in Java in Haskell terms would be `exists a. Comparable a *> a', where `Comparable' on the Haskell side would be a type class with a `compareTo :: a -> Object -> Int' method
2020-10-05 04:23:16 +0200 <ski> or, with the later `Comparable<T>' in Java, in Haskell terms would be `exists a. Comparable a T *> a', where `Comparable a b' on the Haskell side would be a type class with a `compareTo :: a -> b -> Int' method
2020-10-05 04:24:13 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net) (Ping timeout: 264 seconds)
2020-10-05 04:24:31 +0200 <Squarism> ski, what is that "exists .." thing called?
2020-10-05 04:24:51 +0200 <ski> quintasan : hm, i think you might need to find where in the code you're converting from `Transaction' to `Session', and pass `Serializable' and `Write' to the `transaction' call, there ?
2020-10-05 04:24:58 +0200 <ski> Squarism : existential quantification
2020-10-05 04:25:06 +0200 <justsomeguy> Describing type classes by comparison with features of other languages is starting to become a pet peeve of mine. ...But whatever helps you learn, I guess.
2020-10-05 04:25:27 +0200 <ski> (not to be confused with the `ExistentialQuantification' language extension, which, imho, is a misnomer)
2020-10-05 04:25:28 +0200SirClueless(42413686@cpe-66-65-54-134.nyc.res.rr.com)
2020-10-05 04:25:43 +0200cp-(~cp-@b157153.ppp.asahi-net.or.jp) (Quit: Disappeared in a puff of smoke)
2020-10-05 04:26:00 +0200agrimagrif
2020-10-05 04:26:22 +0200agrifagrim
2020-10-05 04:26:28 +0200toorevitimirp(~tooreviti@117.182.181.38)
2020-10-05 04:27:15 +0200justsomeguygot confused by the java analogy since he didn't know java, and then to decipher how type classes (are like|differ from) interfaces he had to learn what the heck and interface is on top of what a type class is. The most readable description was actually from the haskell language report.
2020-10-05 04:27:28 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 272 seconds)
2020-10-05 04:27:32 +0200 <ski> justsomeguy : iirc, at least last time i looked, traits in Rust were also limited in this way. that is, with neither them, nor interfaces in Java, can you express something like `exists w. Widget w *> Map String w'. iow, they only support encoding `exists x. C x *> x', with the plain existentially quantified variable, after the `*>'
2020-10-05 04:28:04 +0200 <SirClueless> I have a beginner question I think. On the wiki page for fibonacci numbers they have the following program for generating an infinite sequence of them: `fibs = 0 : 1 : zipWith (+) fibs (tail fibs)`. What I'm trying to understand is whether or not that function recurses an exponential amount of times or a linear amount of times. Or does Haskell not
2020-10-05 04:28:04 +0200 <SirClueless> make any guarantees either way?
2020-10-05 04:28:24 +0200cp-(~cp-@b157153.ppp.asahi-net.or.jp)
2020-10-05 04:28:45 +0200 <ski> justsomeguy : yea .. it's not intended that people should go learn Java interfaces, to better understand Haskell type classes. it's just that, often, people already have some idea of Java interfaces, and in that case, it might help a bit, to compare with that, when learning type classes. there are similarities, but there's also differences
2020-10-05 04:29:18 +0200 <justsomeguy> It seems good for getting an intuition of it, I suppose.
2020-10-05 04:29:42 +0200 <dsal> I don't think java is good for getting an intuition. If you have a java intuition, it would help to translate, but it's like any other language translation concept.
2020-10-05 04:29:53 +0200 <dsal> i.e., idioms don't translate super well
2020-10-05 04:30:01 +0200ski. o O ( "Interface-passing style" by Fare (François-René Rideau) in 2010-02-17 at <https://fare.livejournal.com/155094.html> )
2020-10-05 04:30:13 +0200 <justsomeguy> ¯\_(ツ)_/¯
2020-10-05 04:30:16 +0200 <ski> dsal, yep
2020-10-05 04:30:43 +0200 <ski> justsomeguy : perhaps not good, but possibly useful, to get into the right ballpark, at least
2020-10-05 04:31:21 +0200 <ski> Squarism : it's not a function. and, with by-need / lazy evaluation/reduction, it'll run in linear, not exponential, time
2020-10-05 04:31:54 +0200 <justsomeguy> Sure, as a first step, it seems useful. Then again, the idea of a type class isn't that hard. The description is only two paragraphs in the Haskell language report, and actually readable (not too much jargon).
2020-10-05 04:32:11 +0200 <ski> (the reason is that the data structure (the list), will act as a cache for the elements of the Fibonacci sequence, not recomputing them)
2020-10-05 04:32:29 +0200 <justsomeguy> So sometimes I wonder why people bother with the intermediary step of explaining type classes by comparison.
2020-10-05 04:32:46 +0200 <dsal> The hard thing about a haskell typeclass if you're used to a java interface or go interface or C++ abstract class or something is that you can't have a "Show" value.
2020-10-05 04:33:01 +0200 <dsal> You'll really want to have a [Show], but you can't do that.
2020-10-05 04:33:02 +0200 <Squarism> Sorry to stir up such debate. I used to know this, I just went away for a year and lost details.
2020-10-05 04:33:08 +0200Samos(~Kira@201.192.165.173)
2020-10-05 04:33:32 +0200 <ski> justsomeguy : being able to define your own derived overloaded operations, with (almost) no special care at all to ensure that happening, when calling other overloaded operations, is not something people tend to be used to, from other languages, though
2020-10-05 04:33:40 +0200 <justsomeguy> Squarism: Hey, no problem. I think of this as a friendly conversation rather than a debate. :)
2020-10-05 04:34:17 +0200 <Samos> greetings
2020-10-05 04:34:18 +0200 <justsomeguy> Fair point, ski -- I suppose the main concept takes some getting used to.
2020-10-05 04:34:26 +0200 <ski> dsal : you can have `[exists a. Show a *> a]' .. but (for `Show'), that's not terribly useful. it's more or less just a more hairy version of `[String]'
2020-10-05 04:34:35 +0200 <ski> @src elem
2020-10-05 04:34:36 +0200 <lambdabot> elem x = any (== x)
2020-10-05 04:34:49 +0200 <ski> well, take this implementation
2020-10-05 04:34:52 +0200 <SirClueless> @ski so this is a guaranteed part of the Haskell language then, that re-evaluating some early piece of the list will be efficient and not recompute the whole list? I'm just beginning to understand "thunks" so it's hard for me to understand why it's guaranteed by the language, even if it happens in practice
2020-10-05 04:34:52 +0200 <lambdabot> Maybe you meant: wiki src ask
2020-10-05 04:35:11 +0200 <ski> _ `elem` [ ] = False
2020-10-05 04:35:21 +0200 <ski> x0 `elem` (x:xs)
2020-10-05 04:35:55 +0200Amras(~Amras@unaffiliated/amras0000) (Ping timeout: 240 seconds)
2020-10-05 04:36:01 +0200 <ski> = x0 == x
2020-10-05 04:36:12 +0200 <ski> || x0 `elem` xs
2020-10-05 04:36:31 +0200 <SirClueless> Like, I don't really understand yet how the language can guarantee that, in practice, the millionth fibonacci number is available cheaply when requested and won't be recomputed
2020-10-05 04:36:44 +0200 <ski> because `(==)' is overloaded (being a method of `Eq'), this `elem' will automagically also be overloaded (requiring `Eq')
2020-10-05 04:38:14 +0200Quarl(~Quarl@94.191.136.1.mobile.tre.se) (Ping timeout: 272 seconds)
2020-10-05 04:38:20 +0200 <ski> Squarism : "so this is a guaranteed part of the Haskell language then, .." -- no. but it tends to be what implementations do, unless they have any particular reason to deviate from this (such as speculatively evaluating some sub-expressions that're not demanded (yet, at least), since you have some parallel cores available for use, and you think you might need the value soon)
2020-10-05 04:38:55 +0200 <ski> "thunks" is an implementation method, for implementing lazy / by-need reduction/evaluation
2020-10-05 04:39:10 +0200 <Squarism> ski, : was that for me?
2020-10-05 04:39:26 +0200 <SirClueless> That's so scary to me. It's like saying the performance of the evaluation isn't part of the correctness of the evaluation.
2020-10-05 04:39:44 +0200 <ski> Squarism : yes (not the one about uoverloading, but the two messages after that)
2020-10-05 04:39:48 +0200oisdk(~oisdk@2001:bb6:3329:d100:89a1:5b05:b385:265f) (Quit: oisdk)
2020-10-05 04:40:06 +0200 <SirClueless> (I think ski is responding to me sometimes while using your name, Squarism)
2020-10-05 04:40:58 +0200 <ski> SirClueless : it's something i think all implementations have done by default, unless there's been any clear reason (like optimization) to do otherwise
2020-10-05 04:41:31 +0200 <ski> oh. hm, yea, i think i managed to refer to the wrong person, in one message above -- sorry about that
2020-10-05 04:41:38 +0200 <justsomeguy> SirClueless: If you enjoy watching videos, I recommend this explanation of thunks ... https://www.youtube.com/watch?v=j19amq73-qA&list=PLe7Ei6viL6jGp1Rfu0dil1JH1SHk9bgDV&index=26 ; I'm not sure it will satisfy your curiosity, but it should at least give you a taste, and maybe you'll find it fun.
2020-10-05 04:42:43 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9) (Remote host closed the connection)
2020-10-05 04:42:54 +0200justsomeguychides himself for reccomending stuff even though he's a total noob.
2020-10-05 04:42:55 +0200 <ski> SirClueless : note that the language doesn't specify an operational/procedural semantics, how to get to the answer. it only talks about denotational semantics, what the answer is
2020-10-05 04:43:04 +0200 <SirClueless> It just seems super scary to say "It's exponential runtime, but in practice on every major Haskell implementation it's linear"
2020-10-05 04:43:25 +0200 <SirClueless> Like, in my world that's the same as saying "It's broken, but in practice on every major Haskell implementation it's not broken"
2020-10-05 04:43:37 +0200 <dolio> Maybe you should care about the actual implementation, then..
2020-10-05 04:43:38 +0200 <dsal> Wait until you learn about optimizing compilers in other languages...
2020-10-05 04:43:38 +0200 <ski> SirClueless : by-need / lazy reduction/evaluation is an operational semantics concept. and since the language report doesn't talk about operational semantics, it doesn't specify by-need / laziness
2020-10-05 04:44:02 +0200 <SirClueless> It would be like writing non-portable C code that works everywhere in practice: yeah it's OK for now, but still a bit scary
2020-10-05 04:44:18 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net)
2020-10-05 04:44:30 +0200 <dsal> I've written portable C code that runs everywhere. Except ARM where it segfaults.
2020-10-05 04:45:05 +0200 <SirClueless> Exponential vs. Linear Time isn't just operational semantics though: getting the result of Fibonacci in exponential time is just as bad as getting the wrong result from Fibonacci, in pretty much every computation environment I've ever been in
2020-10-05 04:45:32 +0200 <ski> (and ditto for talking about time or space complexity. those are operational semantics concepts, and the report doesn't talk about that)
2020-10-05 04:45:52 +0200drbean(~drbean@TC210-63-209-23.static.apol.com.tw)
2020-10-05 04:45:58 +0200 <SirClueless> Like if it was in a batch process in a data center it would take arbitrary resources, or if it was computed in response to a request to a server, it would timeout
2020-10-05 04:46:11 +0200 <SirClueless> And not being able to make any guarantees about that stuff is scary
2020-10-05 04:46:42 +0200 <ski> (perhaps one could argue that it ought to talk some about it. e.g. to specify "proper tail recursion" (another misnomer, since it doesn't have to do with recursion, per se), which is a space complexity thing (unbounded number of active tail calls in bounded space))
2020-10-05 04:46:52 +0200 <dsal> I think, in practice, you wouldn't use that implementation of fibs as a list of all fibs in a real program. In practice, you write the code that does what you want, and if it can't do it to your efficiency requirements, you change the parts that need to be optimized. Refactoring is super easy in haskell.
2020-10-05 04:47:27 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9)
2020-10-05 04:47:54 +0200 <SirClueless> ski Yeah, tail recursion is another important one. Lots of languages end up *requiring* tail recursion as a result, because in practice it affects correctness even if you are a pure functional language for all formal purposes
2020-10-05 04:48:14 +0200 <ski> GHC tends to try to not apply "optimizations" which worsen space or time complexity
2020-10-05 04:48:39 +0200Samos(~Kira@201.192.165.173) (Quit: WeeChat 2.9)
2020-10-05 04:48:43 +0200 <dsal> tail recursion is a "how" rather than a "what"
2020-10-05 04:48:49 +0200 <ski> yes
2020-10-05 04:49:10 +0200 <SirClueless> Sure, but it doesn't make guarantees that it *will* make certain optimizations, you just have to assume when it will or not
2020-10-05 04:49:22 +0200 <ski> (e.g. CSE can cause worse space usage, so GHC doesn't do much of it)
2020-10-05 04:49:54 +0200 <SirClueless> Whether or not you have tail recursion means that certain computations will either complete successfully in a reasonable amount of memory, or blow the stack of every machine ever produced
2020-10-05 04:50:34 +0200 <SirClueless> Sure it's just "how" not "what" but at some point "how" becomes "this is no longer computable" and every software engineer in existence has to start caring
2020-10-05 04:50:40 +0200 <ski> i think, as a first approximation, it's quite safe to assume that GHC does by-need / lazy reduction. one can also think of this as graph reduction (with e.g. shared nodes caching results)
2020-10-05 04:51:17 +0200 <ski> iirc PFDS' analysis of algorithms take this into account
2020-10-05 04:51:22 +0200 <ski> @where PFDS
2020-10-05 04:51:22 +0200 <lambdabot> http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504
2020-10-05 04:52:25 +0200 <ski> anyway, even with "proper tail recursion" (which is what Scheme calls it), that doesn't exactly mandate how you'll implement it. it doesn't have to be TCO, e.g. ..
2020-10-05 04:52:57 +0200lagothrixGuest19440
2020-10-05 04:52:57 +0200Guest19440(~lagothrix@unaffiliated/lagothrix) (Killed (tolkien.freenode.net (Nickname regained by services)))
2020-10-05 04:53:03 +0200lagothrix(~lagothrix@unaffiliated/lagothrix)
2020-10-05 04:53:55 +0200 <dolio> Yeah, scheme just says it's bounded, right?
2020-10-05 04:54:37 +0200 <ski> yep
2020-10-05 04:54:54 +0200 <ski> must support an unbounded number of active tail calls in bounded space
2020-10-05 04:55:18 +0200 <dolio> Bounded by what?
2020-10-05 04:55:20 +0200zacts(~zacts@dragora/developer/zacts)
2020-10-05 04:57:17 +0200 <dolio> Doesn't seem like it says.
2020-10-05 04:59:13 +0200 <ski> iirc, Chicken just uses the C stack, with CPS code, making it ever deeper, never returning in C, instead GCing the "stack" (which acts like a heap), compacting it, when necessary
2020-10-05 04:59:50 +0200 <SirClueless> I guess I'm too much of a systems programmer to enjoy Haskell :D "You can assume the graph is reduced in a reasonably efficient way" is missing an axis of correctness that matters to me just as much as actually delivering the correct result of the computation
2020-10-05 04:59:58 +0200ski. o O ( "CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A." by Henry G. Baker in 1995-09 at <https://web.archive.org/web/20200223051632/http://home.pipeline.com:80/~hbaker1/CheneyMTA.html> )
2020-10-05 05:00:01 +0200torax(~torax@185.163.110.116) ()
2020-10-05 05:00:46 +0200 <ski> (and, MIT Scheme remembers the last 100 calls (including tail calls), for debugging purposes)
2020-10-05 05:01:44 +0200 <dolio> If you care about performance, then implementation details matter, not just the language specification.
2020-10-05 05:02:14 +0200zaquest(~notzaques@5.128.210.178) (Quit: Leaving)
2020-10-05 05:02:32 +0200 <quintasan> holy smokes
2020-10-05 05:02:46 +0200 <quintasan> I think I'm starting to get it but at the same time I'm not getting it
2020-10-05 05:03:10 +0200ski. o O ( "PCLSRing: Keeping Process State Modular" by Alan Bawden at <http://fare.tunes.org/tmp/emergent/pclsr.htm> ; <https://en.wikipedia.org/wiki/PCLSRing> ; "PCLSRING in Semantics" by Robert Harper in 2016-07-11 at <https://existentialtype.wordpress.com/tag/pclsring/> )
2020-10-05 05:03:14 +0200 <SirClueless> ^^ Well sure, but for example, using a language whose definition is "it must behave the same as this abstract machine defined here" which is how C or C++ work, means that unless the implementation expands primitive machine ops into non-constant evaluations, you can make guarantees about runtime
2020-10-05 05:03:17 +0200zaquest(~notzaques@5.128.210.178)
2020-10-05 05:04:19 +0200 <quintasan> If I get IO (Int32, Text) and have a record Tea then I can - `fmap (uncurry Tea) $ functionThatGivesIO`. How do I do this for IO [(Int32, Text)] to get IO [Tea]?
2020-10-05 05:05:17 +0200 <koz_> quintasan: You fmap twice.
2020-10-05 05:05:41 +0200 <dolio> I don't believe that C and C++ specify enough in the language specification to guarantee good performance.
2020-10-05 05:05:55 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2020-10-05 05:06:08 +0200 <koz_> dolio: Since UB is a thing, they _can't_.
2020-10-05 05:06:42 +0200 <quintasan> wait, so I just fmap . fmap (uncurry Tea) $ functionThatGivesIOArray ?
2020-10-05 05:06:53 +0200 <koz_> quintasan: Not quite.
2020-10-05 05:07:05 +0200 <koz_> But you're on the right track.
2020-10-05 05:07:09 +0200 <koz_> Consider the type of fmap:
2020-10-05 05:07:11 +0200 <koz_> :t fmap
2020-10-05 05:07:13 +0200 <lambdabot> Functor f => (a -> b) -> f a -> f b
2020-10-05 05:07:29 +0200ski. o O ( "Exceptional Syntax" by Nick Benton,Andrew Kennedy in 2001-07 at <https://www.microsoft.com/en-us/research/publication/exceptional-syntax/>,<http://lambda-the-ultimate.org/node/1193>,.. )
2020-10-05 05:07:30 +0200 <koz_> Now, if f ~ IO, you get (a -> b) -> IO a -> IO b
2020-10-05 05:07:38 +0200ski. o O ( ..,<https://web.archive.org/web/20161027043544/http://mjambon.com/extend-ocaml-syntax.html#lettry>,<https://blog.janestreet.com/pattern-matching-and-exception-handling-unite/> )
2020-10-05 05:08:01 +0200 <SirClueless> koz_ they can't guarantee runtime of programs that contain UB, for sure, but other programs they might be able to (with a lot of assumptions about the machine you're executing on)
2020-10-05 05:08:06 +0200 <koz_> Now, in your case, a ~ [(In32, Text)], and the b you want is [Tea].
2020-10-05 05:08:11 +0200 <koz_> SirClueless: There's also IB.
2020-10-05 05:08:24 +0200 <koz_> So no, even if we assume no UB, the standard cannot guarantee very much at all.
2020-10-05 05:08:34 +0200 <koz_> s/In32/Int32/
2020-10-05 05:08:46 +0200 <koz_> So therefore, your function has to have that type.
2020-10-05 05:08:58 +0200 <koz_> Now, you have something that types that way - fmap (uncurry Tea).
2020-10-05 05:08:58 +0200 <quintasan> So ideally I'd write a function for [(Int32, Text)] -> [Tea] and fmap this?
2020-10-05 05:09:06 +0200 <koz_> You can, but in this case, you don't need to.
2020-10-05 05:09:24 +0200 <koz_> You would have fmap (fmap (uncurry Tea)).
2020-10-05 05:10:02 +0200 <ski> quintasan : `fmap (map (uncurry Tea)) actionThatGivesIOList',`(fmap . map) (uncurry Tea) actionThatGivesIOList',`(fmap . map . uncurry) Tea actionThatGivesIOList',`map (uncurry Tea) <$> actionThatGivesIOList',`(uncurry Tea <$>) <$> actionThatGivesIOList'
2020-10-05 05:10:21 +0200bloodstalker(~bloodstal@46.166.187.154) (Read error: Connection reset by peer)
2020-10-05 05:10:29 +0200 <koz_> That last one is a step too far IMHO.
2020-10-05 05:10:49 +0200 <SirClueless> It sounds like they can guarantee more than Haskell can though -- if only because they can't really express lazy evaluation and whether or not its result is immediately available
2020-10-05 05:11:08 +0200 <quintasan> I still have no idea what <$> and <*> do but I decided that won't stop me from making this work.
2020-10-05 05:11:20 +0200 <koz_> quintasan: <$> is just infix fmap.
2020-10-05 05:11:22 +0200 <quintasan> koz_, ski: thanks
2020-10-05 05:12:13 +0200 <koz_> SirClueless: I don't know how much you could guarantee about the performance of a C program given the standard.
2020-10-05 05:12:21 +0200 <koz_> You first must ensure that neither IB nor UB applies.
2020-10-05 05:12:23 +0200aarvar(~foewfoiew@50.35.43.33)
2020-10-05 05:12:54 +0200 <koz_> Then after that point, you gotta deal with the fact that the standard makes few promises about, say, type widths.
2020-10-05 05:13:05 +0200 <koz_> Which might _significantly_ alter, for instance, how many times a loop will execute.
2020-10-05 05:13:54 +0200 <koz_> There's probably _thousands_ of other small things there too.
2020-10-05 05:14:44 +0200 <koz_> Maybe it's _different_ to the Haskell case, but 'more'? I doubt it.
2020-10-05 05:14:54 +0200 <ski> SirClueless : those last links were about interaction of tail calls with exception handlers (not having the dynamic extent of the handler include the tail call)
2020-10-05 05:15:13 +0200 <ski> this suggests it may be a good idea, having `catchBind :: Exception e => IO a -> (e -> IO b) -> (a -> IO b) -> IO b)' / `handleBind :: Exception e => (e -> IO b) -> (a -> IO b) -> (IO a -> IO b)', and not just `catch :: Exception e => IO a -> (e -> IO a) -> IO a',`handle :: Exception e => (e -> IO a) -> (IO a -> IO a)',`try :: Exception e => IO a -> IO (Either e a)'
2020-10-05 05:15:55 +0200drbean(~drbean@TC210-63-209-23.static.apol.com.tw) (Read error: Connection reset by peer)
2020-10-05 05:18:14 +0200 <ski> (and perhaps some custom syntax for this, like the `let'-`try' above, which OCaml now supports as pattern-matching <https://caml.inria.fr/pub/docs/manual-ocaml/coreexamples.html#s%3Aexceptions>)
2020-10-05 05:19:07 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-10-05 05:19:09 +0200 <SirClueless> Maybe I just already understand all the tradeoffs in C better? Like, I can't think of any way to sneak exponential runtime into a C program -- it would take some *very* obscure interactions. But you can certainly sneak some UB into a C program and that's perhaps worse.
2020-10-05 05:19:30 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
2020-10-05 05:20:08 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-10-05 05:20:49 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-05 05:21:29 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 05:21:39 +0200tekojo(~tekojo@s91904426.blix.com)
2020-10-05 05:21:47 +0200ski. o O ( "A Guide to Undefined Behavior in C and C++" by John Regehr, "Part 1" in 2010-07-09 at <https://blog.regehr.org/archives/213>,"Part 2" in 2010-07-23 at <https://blog.regehr.org/archives/226>,"Part 3" in 2010-07-30 at <https://blog.regehr.org/archives/232> )
2020-10-05 05:22:29 +0200 <koz_> SirClueless: Do you understand C-as-the-standard-calls-it? Or C-as-your-favourite-compiler-implements-it?
2020-10-05 05:22:36 +0200 <koz_> Those may, or may not, be the same thing.
2020-10-05 05:23:39 +0200 <SirClueless> I try, as far as possible, to understand C (and more often C++) as the standard guarantees it. Obviously the C++ standard is like 10k pages or something stupid so there's no way to claim I understand it all.
2020-10-05 05:25:16 +0200 <c_wraith> The standard guarantees so little in C. I don't think it's actually possible to write non-trivial code that's portable across all spec-compliant C compilers.
2020-10-05 05:25:31 +0200 <SirClueless> But there are ways to guarantee some things even in standard C++ that you can't really in Haskell afaict. For example the ability to interpret bytes in an IO device DMA buffer as data without any copying.
2020-10-05 05:25:38 +0200 <koz_> c_wraith: I remember that one C99 draft made memmove impossible to write.
2020-10-05 05:25:55 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 240 seconds)
2020-10-05 05:27:00 +0200 <c_wraith> SirClueless: sure you can... but it's going to be awkward to use because Haskell forces you to understand that the backing bytes could change at any time.
2020-10-05 05:29:01 +0200 <SirClueless> Yes, but using C++ allows you to rely on memory guarantees provided by the device itself. FWIW C++ forces you to understand too that backing bytes can change at any time (it's just less strict about writing programs that fail to acknowledge that fact). This is basically the purpose of the volatile keyword.
2020-10-05 05:29:19 +0200 <c_wraith> right. The point of Haskell is that you can't fail to acknowledge it.
2020-10-05 05:29:46 +0200zacts(~zacts@dragora/developer/zacts) (Ping timeout: 256 seconds)
2020-10-05 05:30:14 +0200 <dolio> DMA of an IO device is in the C++ standard?
2020-10-05 05:33:08 +0200 <SirClueless> Yes. In that there are standard-compliant ways that a device vendor can provide you with a buffer that you can use in productive ways. When you do that you rely on the standard, the linux kernel, the x64 ISA, a certain pointer addressing mechanism, etc. but that's all stuff that's well defined even if it's not portable.
2020-10-05 05:34:08 +0200polyrain(~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107)
2020-10-05 05:35:35 +0200 <dolio> So that's actually a no.
2020-10-05 05:36:03 +0200 <SirClueless> When you write a load from a memory address provided by an IO device's driver with a volatile keyword qualifier, the standard defines what kinds of bytes you will and will not access, and the ordering of that load with respect to the other statements in your program. In that sense the standard defines reading a DMA buffer.
2020-10-05 05:36:42 +0200 <c_wraith> The standard tells you that you can read from a pointer. It doesn't say anything about DMA
2020-10-05 05:36:47 +0200constR(uid58205@gateway/web/irccloud.com/x-tksgpowcrsjwxjgo) (Quit: Connection closed for inactivity)
2020-10-05 05:37:14 +0200 <c_wraith> (of course, you can only read from *some* pointers. It's not clear how the driver generates that pointer and whether it's valid according to the spec)
2020-10-05 05:38:59 +0200 <SirClueless> It tells you it will read exactly once and with well-defined ordering with respect to reading any other volatile memory addresses. That's enough to implement interoperating with a DMA buffer.
2020-10-05 05:39:58 +0200 <c_wraith> You seem to have ignored the provenance of the pointer. the standard says a lot about when reading from a pointer is defined and when it isn't. I sincerely doubt that the way the pointer is acquired is standard-compliant.
2020-10-05 05:40:17 +0200 <c_wraith> (The OS may guarantee it's fine, but that's not the same as the spec)
2020-10-05 05:40:27 +0200 <koz_> I'm also unsure that you get a well-defined ordering across multiple volatile variables this way.
2020-10-05 05:40:40 +0200 <koz_> (I'm open to being proved wrong here, but I don't think the standard goes quite that far)
2020-10-05 05:40:43 +0200 <koz_> (at least not in C)
2020-10-05 05:41:16 +0200 <SirClueless> I'm not sure I follow. If it's implementation-defined by the standard, and the OS guarantees certain behavior, then it's well-defined access.
2020-10-05 05:41:54 +0200 <koz_> SirClueless: 'Implementation-defined' translates to 'read your compiler docs'.
2020-10-05 05:42:02 +0200 <dolio> You mean like how the Haskell specification has implementation defined behavior, so you need to ask about the implementation you're using?
2020-10-05 05:42:03 +0200 <koz_> The OS's guarantees may or may not matter.
2020-10-05 05:42:23 +0200 <SirClueless> And it does provide some number of guarantees of ordering. Basically using the concept of "sequence points" as defined in the C abstract machine and the ability (or inability) of a compliant implementation to reorder certain loads and stores over sequence points.
2020-10-05 05:42:25 +0200blasius(~blasius@4e69b241.skybroadband.com) (Ping timeout: 240 seconds)
2020-10-05 05:42:56 +0200 <koz_> SirClueless: So I guess we're talking C11, since before that, there's no memory model.
2020-10-05 05:44:53 +0200 <SirClueless> Well, technically even before that there were guarantees about some kinds of ordering. And compilers would in practice make guarantees like "we won't reorder around inline assembly" giving you a non-portable backdoor into your ISA's memory barrier instructions to try and do the right thing (inasmuch as that was possible).
2020-10-05 05:44:57 +0200 <koz_> "What constitutes an access to an object thathas volatile-qualified type is implementation-defined." bodes well...
2020-10-05 05:46:01 +0200 <SirClueless> Yeah, it was a crappy landscape for a long time. Recently things have gotten better (in C++ especially) with various flavors of standard-defined atomic data types.
2020-10-05 05:46:08 +0200vicfred(~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2020-10-05 05:46:37 +0200kupi(uid212005@gateway/web/irccloud.com/x-dndtziltoquslpzk) (Quit: Connection closed for inactivity)
2020-10-05 05:48:23 +0200kreyren_(~kreyren@fsf/member/kreyren) (Ping timeout: 240 seconds)
2020-10-05 05:49:35 +0200miguicho(~miguel@host-186-101-215-54.netlife.ec) (Quit: Leaving)
2020-10-05 05:50:57 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9) (Ping timeout: 272 seconds)
2020-10-05 05:52:02 +0200 <SirClueless> Anyways, I think it's interesting to discuss these things. Thanks for taking the time to go back and forth with me! I think there are a lot of interesting tradeoffs to make: In C you can write a type-checking program that blows up because you wrote a[n] for too large n. In Haskell you can write a type-checking program that blows up because you
2020-10-05 05:52:02 +0200 <SirClueless> wrote `rfold` when you meant `lfold`. Ain't software fun.
2020-10-05 05:52:54 +0200wei2912(~wei2912@unaffiliated/wei2912) (Quit: Lost terminal)
2020-10-05 05:53:06 +0200 <koz_> SirClueless: Those are different notions of 'blowing up' though.
2020-10-05 05:53:15 +0200 <koz_> Former is 'the compiler can emit code that erases your hard drive'.
2020-10-05 05:53:18 +0200conal(~conal@209.58.132.107) (Quit: Computer has gone to sleep.)
2020-10-05 05:53:24 +0200 <koz_> Latter is 'if you don't have hilarious RAM you'll OOM'.
2020-10-05 05:53:34 +0200 <koz_> Those aren't even in the same _universe_.
2020-10-05 05:56:16 +0200 <SirClueless> That's where we disagree at a philosophical level, I suppose. Both of them could equally bring down a server.
2020-10-05 05:57:41 +0200 <koz_> ... you're seriously saying that 'your server now lost all its data forever' is in the same ballpark as 'one program on said server crashed to OOM'?
2020-10-05 05:58:24 +0200 <SirClueless> There are some differences to be sure: the former is much more likely than the latter to end in an attacker having control of your network. But both are stop-the-world disasters in the right context.
2020-10-05 05:58:45 +0200 <koz_> 'In the right context' almost anything is anything.
2020-10-05 05:59:05 +0200 <koz_> I'd say, in general, UB creates issues of far worse gore than laziness will ever afflict you with.
2020-10-05 05:59:14 +0200 <SirClueless> Sure, the context for me is writing high-availability network services.
2020-10-05 05:59:46 +0200 <koz_> It sure is great for availability when you've had your entire non-volatile storage nuked.
2020-10-05 05:59:50 +0200 <koz_> Or your passwords dumped.
2020-10-05 06:00:28 +0200ryansmccoy(~ryansmcco@193.37.254.27) (Ping timeout: 265 seconds)
2020-10-05 06:00:32 +0200 <SirClueless> Yeah, that's a memory-safety problem. Utterly terrifying for C programs, a non-issue for Haskell programs.
2020-10-05 06:00:42 +0200 <SirClueless> But DoS vectors are problems for both.
2020-10-05 06:00:47 +0200drbean(~drbean@TC210-63-209-50.static.apol.com.tw)
2020-10-05 06:01:17 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-10-05 06:02:15 +0200conal(~conal@209.58.132.107)
2020-10-05 06:02:25 +0200polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 240 seconds)
2020-10-05 06:02:26 +0200xelxebar(~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection)
2020-10-05 06:02:30 +0200 <koz_> Denial-of-service can also be done by attacking the hosting architecture, irrespective of what you wrote in or with.
2020-10-05 06:02:46 +0200 <koz_> (in fact, I believe that's where it commonly arises, unless we're talking like, hash flooding or something)
2020-10-05 06:02:55 +0200xelxebar(~xelxebar@gateway/tor-sasl/xelxebar)
2020-10-05 06:02:57 +0200zacts(~zacts@dragora/developer/zacts)
2020-10-05 06:04:53 +0200vicfred(~vicfred@unaffiliated/vicfred)
2020-10-05 06:05:53 +0200vicfred(~vicfred@unaffiliated/vicfred) (Max SendQ exceeded)
2020-10-05 06:06:22 +0200vicfred(~vicfred@unaffiliated/vicfred)
2020-10-05 06:07:39 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9)
2020-10-05 06:07:49 +0200 <SirClueless> The malicious kinds, yeah, probably. The kinds that are more like "2% of our RPC calls timeout because the host dies" and you go and investigate the machines where it happens and it turns out there's a legitimate use case for requesting 10000 records at a time from your service and somewhere in the network stack someone wrote an O(n^2) linear scan
2020-10-05 06:07:49 +0200 <SirClueless> routine that they never expected to be exercised like this and now needs to be rearchitected
2020-10-05 06:09:10 +0200 <koz_> But this isn't really unique to Haskell. No language will prevent you writing a quadratic scan.
2020-10-05 06:09:18 +0200 <koz_> I don't think laziness makes it any more likely.
2020-10-05 06:11:51 +0200 <SirClueless> So far I'm not experienced enough to say. Having made multiple "d'oh" style performance flubs like that in my limited time trying out Haskell it does seem somewhat more likely. Less to do with lazy evaluation I think and more to do with super concise ways of abstracting control flow. But I admit I'm not really giving Haskell a fair shot due to my
2020-10-05 06:11:51 +0200 <SirClueless> inexperience.
2020-10-05 06:23:00 +0200polyrain(~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 06:30:30 +0200sz0(uid110435@gateway/web/irccloud.com/x-ghthpnxjfhyoidss)
2020-10-05 06:39:39 +0200day_(~Unknown@unaffiliated/day)
2020-10-05 06:41:10 +0200todda7(~torstein@athedsl-238951.home.otenet.gr)
2020-10-05 06:41:58 +0200zacts(~zacts@dragora/developer/zacts) (Quit: leaving)
2020-10-05 06:43:05 +0200day(~Unknown@unaffiliated/day) (Ping timeout: 256 seconds)
2020-10-05 06:43:06 +0200day_day
2020-10-05 06:44:26 +0200Sheilong(uid293653@gateway/web/irccloud.com/x-bxwmidpkndksabez) ()
2020-10-05 06:44:37 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 06:49:51 +0200aweinstock(~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) (Ping timeout: 272 seconds)
2020-10-05 06:49:55 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 06:50:09 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 06:50:47 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-05 06:50:47 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-05 06:50:47 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 06:51:28 +0200 <koz_> Yeah, there's things to watch out for there, definitely.
2020-10-05 07:00:48 +0200falafel(~falafel@2605:e000:1527:d491:706d:90a5:67aa:1cd9) (Remote host closed the connection)
2020-10-05 07:02:21 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 07:02:37 +0200aweinstock(~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com)
2020-10-05 07:04:07 +0200 <dsal> In practice, I write more correct and useful code in haskell than I ever did in C, even though (and likely because) I can't pay huge attention to all the implementation details all the time.
2020-10-05 07:07:17 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-05 07:08:16 +0200falafel(~falafel@2605:e000:1527:d491:99fe:5613:f0a7:56f0)
2020-10-05 07:09:19 +0200 <dsal> optparse-applicative started doing this useful thing recently, it seems. https://www.irccloud.com/pastebin/CTguX34u/
2020-10-05 07:16:35 +0200tomku(~tomku@unaffiliated/tomku) (Ping timeout: 240 seconds)
2020-10-05 07:18:50 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk)
2020-10-05 07:21:24 +0200ym555(~ym@41.42.210.219)
2020-10-05 07:22:39 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-10-05 07:22:51 +0200shafox(~shafox@106.51.234.111)
2020-10-05 07:23:27 +0200ericsagnes(~ericsagne@2405:6580:0:5100:97e:4c35:feee:3de8) (Ping timeout: 240 seconds)
2020-10-05 07:24:23 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 07:25:36 +0200coot(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl)
2020-10-05 07:26:44 +0200hyiltiz(~quassel@unaffiliated/hyiltiz) (Ping timeout: 258 seconds)
2020-10-05 07:26:59 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
2020-10-05 07:28:23 +0200shatriff(~vitaliish@217.27.153.240)
2020-10-05 07:33:35 +0200tomku(~tomku@unaffiliated/tomku)
2020-10-05 07:36:17 +0200ericsagnes(~ericsagne@2405:6580:0:5100:97e:4c35:feee:3de8)
2020-10-05 07:37:20 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk) (Ping timeout: 256 seconds)
2020-10-05 07:38:37 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 07:39:59 +0200hyiltiz(~quassel@82.118.227.47)
2020-10-05 07:39:59 +0200hyiltiz(~quassel@82.118.227.47) (Changing host)
2020-10-05 07:39:59 +0200hyiltiz(~quassel@unaffiliated/hyiltiz)
2020-10-05 07:42:25 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds)
2020-10-05 07:42:32 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 272 seconds)
2020-10-05 07:43:21 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 07:43:21 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 07:43:21 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 07:43:42 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 07:44:54 +0200lpy(~lpyfist@unaffiliated/elysian)
2020-10-05 07:44:54 +0200zacts(~zacts@dragora/developer/zacts)
2020-10-05 07:46:55 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 07:50:25 +0200aarvar(~foewfoiew@50.35.43.33) (Ping timeout: 240 seconds)
2020-10-05 07:55:59 +0200tomku(~tomku@unaffiliated/tomku) (Ping timeout: 265 seconds)
2020-10-05 07:56:08 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-10-05 07:58:39 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net)
2020-10-05 08:00:02 +0200tekojo(~tekojo@s91904426.blix.com) ()
2020-10-05 08:01:18 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 08:01:18 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 08:01:18 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 08:05:46 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-05 08:07:34 +0200tomku(~tomku@unaffiliated/tomku)
2020-10-05 08:11:37 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 264 seconds)
2020-10-05 08:12:35 +0200zebrag(~inkbottle@aaubervilliers-654-1-80-159.w86-212.abo.wanadoo.fr)
2020-10-05 08:12:35 +0200inkbottle(~inkbottle@aaubervilliers-654-1-101-122.w86-212.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2020-10-05 08:13:21 +0200 <Squarism> I often fall into this situation I want to shove a bunch of parameterized types into a big datastructure and foreget their types and then want to pick out values from the big structure and reconstruct their types. I gathered that this is not "right". Are there any "ugly tricks" you can use to atleast save the type info to be able to restore the values to their correct type?
2020-10-05 08:14:37 +0200 <dsal> I've never needed to lose a type in Haskell code. It's not clear to me what pattern you're referring to.
2020-10-05 08:15:00 +0200 <MarcelineVQ> yeah, don't forget their types. but you can google existential antipattern for some techniques
2020-10-05 08:16:24 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-10-05 08:17:07 +0200jedws(~jedws@121.209.186.103) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 08:19:01 +0200zacts(~zacts@dragora/developer/zacts) (Quit: leaving)
2020-10-05 08:19:50 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 256 seconds)
2020-10-05 08:27:29 +0200hiroaki(~hiroaki@ip4d176049.dynamic.kabel-deutschland.de)
2020-10-05 08:29:01 +0200cfricke(~cfricke@unaffiliated/cfricke)
2020-10-05 08:30:14 +0200 <jackdk> do you have a concrete instance of where you want this? Often it's a problem-solving impulse from other experience that doesn't work so well in Haskell
2020-10-05 08:35:10 +0200conal(~conal@209.58.132.107) (Quit: Computer has gone to sleep.)
2020-10-05 08:35:10 +0200chele(~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
2020-10-05 08:35:57 +0200tzh(~tzh@2601:448:c500:5300::143b) (Quit: zzz)
2020-10-05 08:37:02 +0200 <Squarism> jackdk, I have this idea atm : https://paste.ofcode.org/TGvEbepNQbjtWRqKzgkgkd
2020-10-05 08:38:20 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 08:38:20 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 08:38:20 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 08:38:49 +0200sQVe(~sQVe@unaffiliated/sqve)
2020-10-05 08:39:07 +0200 <Squarism> In this case I want to be able to traverse an SType and determine the type of the list. That should be any of the "data P..." types
2020-10-05 08:39:40 +0200whiteline(~whiteline@unaffiliated/whiteline)
2020-10-05 08:43:59 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-05 08:44:33 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 258 seconds)
2020-10-05 08:47:33 +0200dhouthoo(~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
2020-10-05 08:47:36 +0200p8m(p8m@gateway/vpn/protonvpn/p8m)
2020-10-05 08:48:33 +0200aarvar(~foewfoiew@50.35.43.33)
2020-10-05 08:48:40 +0200Sanchayan(~Sanchayan@136.185.184.11)
2020-10-05 08:49:02 +0200todda7(~torstein@athedsl-238951.home.otenet.gr) (Ping timeout: 272 seconds)
2020-10-05 08:49:55 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-05 08:51:45 +0200idhugo(~idhugo@users-1190.st.net.au.dk)
2020-10-05 08:52:41 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 08:53:42 +0200 <dsal> What do you want to do with the type?
2020-10-05 08:54:12 +0200 <dsal> I keep thinking you're bumping up against optics, but I don't fully understand your intention.
2020-10-05 08:54:43 +0200simonbusborg(~simonbusb@217.151.98.163)
2020-10-05 08:54:56 +0200Noldorin(~noldorin@unaffiliated/noldorin) (Ping timeout: 246 seconds)
2020-10-05 08:56:05 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-10-05 08:56:07 +0200 <dsal> The P types don't seem to be doing anything of value here. You can already disambiguate with the S constructor.
2020-10-05 08:57:47 +0200 <dsal> Do you mean `SList` should be `SList [SType]` ?
2020-10-05 08:57:49 +0200shatriff(~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-05 08:57:52 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-aodidipmuxccpmsk) (Quit: Connection closed for inactivity)
2020-10-05 08:58:09 +0200fendor(~fendor@77.119.129.78.wireless.dyn.drei.com)
2020-10-05 09:00:43 +0200 <dsal> If so, then the type of that list will always be the same and can have values represented by any of the constructors. If you mean something else, I don't know what that'd be. (I don't understand what your forall is intended to do). You can't have a list of an unspecified type meaningfully.
2020-10-05 09:01:44 +0200 <dsal> I think it'd be easier to understand what the code your were trying to write with this these data types would be doing instead of how you think you'd express the types.
2020-10-05 09:02:12 +0200 <dsal> But I meant to go to bed before midnight, and failed, so oops.
2020-10-05 09:03:38 +0200jespada(~jespada@90.254.246.48)
2020-10-05 09:03:58 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net) (Ping timeout: 260 seconds)
2020-10-05 09:06:43 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 09:06:44 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 09:06:44 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 09:08:23 +0200John20(~John@82.46.59.122)
2020-10-05 09:08:29 +0200alp(~alp@2a01:e0a:58b:4920:710e:4c3d:416d:5e7c)
2020-10-05 09:09:25 +0200Rudd0(~Rudd0@185.189.115.108) (Ping timeout: 240 seconds)
2020-10-05 09:11:52 +0200toorevitimirp(~tooreviti@117.182.181.38) (Ping timeout: 265 seconds)
2020-10-05 09:13:09 +0200jedws(~jedws@121.209.186.103)
2020-10-05 09:14:33 +0200carlomagno1(~cararell@inet-hqmc01-o.oracle.com) (Remote host closed the connection)
2020-10-05 09:15:03 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 260 seconds)
2020-10-05 09:15:11 +0200carlomagno(~cararell@inet-hqmc01-o.oracle.com)
2020-10-05 09:18:17 +0200michalrus(m@michalrus.com) (Ping timeout: 258 seconds)
2020-10-05 09:18:18 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 09:18:18 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 09:18:18 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 09:20:41 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de)
2020-10-05 09:21:12 +0200michalrus(m@michalrus.com)
2020-10-05 09:22:00 +0200 <dminuoso> I extract a list of IP addresses, and I want to bring them into a data structure in which I can coalesce adjoined IP ranges, or at give a coalesced representation.
2020-10-05 09:22:29 +0200 <dminuoso> For the purpose of this, we could also consider IP addresses as just numbers, so Im getting a list of numbers (or some of them might be intervals).
2020-10-05 09:23:35 +0200tbreslein(~tbreslein@2a02:8108:140:44f8::3cc4)
2020-10-05 09:24:45 +0200michalrus(m@michalrus.com) (Client Quit)
2020-10-05 09:25:05 +0200 <dminuoso> My initial instinct was to just build up a binary trie and make some kind of algorithm on that, but I cant find a trivial algorithm for that
2020-10-05 09:26:02 +0200 <dminuoso> There's of course the very naive approach of just taking the list, sorting it, and fusing adjoined neighbors repeatedly, but that has poor complexity
2020-10-05 09:26:35 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 09:27:42 +0200 <MarcelineVQ> What does 'coalesce adjoined IP ranges' mean?
2020-10-05 09:28:24 +0200chaosmasttter(~chaosmast@p200300c4a73b2e0100f3c5a701cd6e56.dip0.t-ipconnect.de)
2020-10-05 09:28:29 +0200 <dminuoso> So say the list consists of ["10.0.0.0/24", "10.0.1.0/24", ...] I want those first two to merge into ["10.0.0.0/23", ...]
2020-10-05 09:29:09 +0200 <dminuoso> Or, in terms of a more numeric view, if I have [Range 1 1, Range 2 2, Range 3 5, Range 6 7], I want to turn that into [Range 1 5, Range 6 7]
2020-10-05 09:29:37 +0200 <dminuoso> Not necessarily directly, just some data structure in which I can coalesce them
2020-10-05 09:29:51 +0200 <dminuoso> Oh wait
2020-10-05 09:29:54 +0200 <dminuoso> THat example was bad
2020-10-05 09:30:00 +0200borne(~fritjof@200116b86471bb007fe01feb1760d29e.dip.versatel-1u1.de)
2020-10-05 09:30:01 +0200 <dminuoso> that should turn into [Range 1 7] of course
2020-10-05 09:30:08 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-10-05 09:30:26 +0200 <dminuoso> But if it was [Range 1 1, Range 2 2, Range 3 4, Range 6 7], then that should become [Range 1 4, Range 6 7], so I get all continguous ranges merged together
2020-10-05 09:30:43 +0200 <MarcelineVQ> sort of an ip interval-map?
2020-10-05 09:30:56 +0200 <dminuoso> Right
2020-10-05 09:31:02 +0200jgt(~jgt@194.143.137.49.users.breezein.net)
2020-10-05 09:33:03 +0200hekkaidekapus}(~tchouri@gateway/tor-sasl/hekkaidekapus) (Quit: hekkaidekapus})
2020-10-05 09:34:07 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 09:34:11 +0200michalrus(m@michalrus.com)
2020-10-05 09:34:25 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 09:34:25 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 09:34:25 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 09:34:31 +0200 <outerpassage> cabal seems to ignore the --bindir flag for v2-build, any ideas why that might be happening?
2020-10-05 09:34:42 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 09:35:08 +0200hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-05 09:36:44 +0200m0rphism(~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de)
2020-10-05 09:38:10 +0200kritzefitz(~kritzefit@fw-front.credativ.com)
2020-10-05 09:39:43 +0200tomboy64(~tomboy64@gateway/tor-sasl/tomboy64) (Ping timeout: 240 seconds)
2020-10-05 09:39:55 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 09:39:58 +0200jonathanx(~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-10-05 09:40:14 +0200tomboy64(~tomboy64@gateway/tor-sasl/tomboy64)
2020-10-05 09:40:28 +0200todda7(~torstein@athedsl-4367507.home.otenet.gr)
2020-10-05 09:42:53 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 09:42:58 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 09:43:04 +0200GyroW(~GyroW@d54c03e98.access.telenet.be)
2020-10-05 09:43:04 +0200GyroW(~GyroW@d54c03e98.access.telenet.be) (Changing host)
2020-10-05 09:43:04 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 09:43:55 +0200simonbusborg(~simonbusb@217.151.98.163) (Ping timeout: 240 seconds)
2020-10-05 09:44:44 +0200 <jackdk> back up another step; why do you want to do this thing?
2020-10-05 09:44:50 +0200 <jackdk> Squarism: ^
2020-10-05 09:47:08 +0200mav2(~mav@p5b02806a.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-05 09:47:48 +0200carlomagno1(~cararell@inet-hqmc01-o.oracle.com)
2020-10-05 09:48:10 +0200carlomagno(~cararell@inet-hqmc01-o.oracle.com) (Ping timeout: 256 seconds)
2020-10-05 09:52:28 +0200peel(uid145489@gateway/web/irccloud.com/x-gaoowxyrodcvmckl)
2020-10-05 09:53:03 +0200livvy(~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
2020-10-05 09:58:22 +0200falafel(~falafel@2605:e000:1527:d491:99fe:5613:f0a7:56f0) (Ping timeout: 244 seconds)
2020-10-05 10:00:30 +0200oisdk(~oisdk@2001:bb6:3329:d100:ec91:550b:f86b:f744)
2020-10-05 10:01:37 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net)
2020-10-05 10:01:46 +0200jedws(~jedws@121.209.186.103) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 10:02:23 +0200thc202(~thc202@unaffiliated/thc202)
2020-10-05 10:04:35 +0200jgt(~jgt@194.143.137.49.users.breezein.net) (Ping timeout: 260 seconds)
2020-10-05 10:04:56 +0200petersen(~petersen@redhat/juhp) (Quit: petersen)
2020-10-05 10:05:13 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2020-10-05 10:06:02 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:07:17 +0200ixlun(~matthew@213.205.241.94)
2020-10-05 10:09:18 +0200sz0(uid110435@gateway/web/irccloud.com/x-ghthpnxjfhyoidss) (Quit: Connection closed for inactivity)
2020-10-05 10:09:19 +0200polyrain(~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107)
2020-10-05 10:11:24 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 256 seconds)
2020-10-05 10:11:30 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 10:11:30 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 10:11:30 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 10:12:27 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:12:56 +0200mav2(~mav@i5E862F77.versanet.de)
2020-10-05 10:16:50 +0200blasius(~blasius@4e69b241.skybroadband.com)
2020-10-05 10:19:40 +0200petersen(~petersen@redhat/juhp)
2020-10-05 10:20:45 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 240 seconds)
2020-10-05 10:22:19 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 260 seconds)
2020-10-05 10:22:28 +0200jedws(~jedws@121.209.186.103)
2020-10-05 10:24:16 +0200lpy(~lpyfist@unaffiliated/elysian) (Quit: lpy)
2020-10-05 10:24:46 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:25:22 +0200p-core(~Thunderbi@cst-prg-93-127.cust.vodafone.cz)
2020-10-05 10:26:46 +0200hnOsmium0001(uid453710@gateway/web/irccloud.com/x-ppmzllfatsxcxgfj) (Quit: Connection closed for inactivity)
2020-10-05 10:27:03 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-10-05 10:29:06 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2020-10-05 10:29:36 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 256 seconds)
2020-10-05 10:29:45 +0200jedws(~jedws@121.209.186.103) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 10:31:55 +0200gnumonik(~gnumonik@c-73-170-91-210.hsd1.ca.comcast.net)
2020-10-05 10:33:33 +0200 <mimi_vx> bgamari: hello, who is responsible for uploading GHC source to Hackage ? hackage known ghc-8.10.1 as latest, which cases for examle for hie-bios and similiar packages with defined depends on ghc
2020-10-05 10:33:56 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:34:07 +0200RC-3004(~RC-3004@195.206.169.184)
2020-10-05 10:34:34 +0200 <mimi_vx> maybe hvr ? ^^
2020-10-05 10:37:11 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net)
2020-10-05 10:37:23 +0200Aquazi(uid312403@gateway/web/irccloud.com/x-truwgtvpybdfvjec)
2020-10-05 10:37:28 +0200p-core(~Thunderbi@cst-prg-93-127.cust.vodafone.cz) (Ping timeout: 256 seconds)
2020-10-05 10:38:34 +0200p-core(~Thunderbi@cst-prg-17-128.cust.vodafone.cz)
2020-10-05 10:38:39 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 260 seconds)
2020-10-05 10:39:01 +0200fendor(~fendor@77.119.129.78.wireless.dyn.drei.com) (Remote host closed the connection)
2020-10-05 10:39:20 +0200fendor(~fendor@77.119.129.78.wireless.dyn.drei.com)
2020-10-05 10:39:31 +0200cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-10-05 10:39:52 +0200cfricke(~cfricke@unaffiliated/cfricke)
2020-10-05 10:39:53 +0200GyroW_(~GyroW@d54C03E98.access.telenet.be)
2020-10-05 10:39:53 +0200GyroW_(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-05 10:39:53 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-05 10:40:31 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 256 seconds)
2020-10-05 10:40:55 +0200aarvar(~foewfoiew@50.35.43.33) (Ping timeout: 240 seconds)
2020-10-05 10:41:11 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 10:41:11 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 10:41:11 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 10:41:36 +0200aarvar(~foewfoiew@50.35.43.33)
2020-10-05 10:41:55 +0200glamas(~glamas@107.182.17.237) (Ping timeout: 240 seconds)
2020-10-05 10:41:58 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net) (Ping timeout: 260 seconds)
2020-10-05 10:42:43 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:42:56 +0200petersen_(~petersen@redhat/juhp)
2020-10-05 10:43:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 10:43:55 +0200petersen(~petersen@redhat/juhp) (Ping timeout: 240 seconds)
2020-10-05 10:44:18 +0200petersen_petersen
2020-10-05 10:44:25 +0200mav2(~mav@i5E862F77.versanet.de) (Ping timeout: 240 seconds)
2020-10-05 10:44:25 +0200jespada(~jespada@90.254.246.48) (Ping timeout: 240 seconds)
2020-10-05 10:44:34 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2020-10-05 10:45:24 +0200p-core(~Thunderbi@cst-prg-17-128.cust.vodafone.cz) (Ping timeout: 256 seconds)
2020-10-05 10:45:27 +0200hive-mind(~hivemind@rrcs-67-53-148-69.west.biz.rr.com) (Disconnected by services)
2020-10-05 10:45:51 +0200hive-mind(~hivemind@rrcs-67-53-148-69.west.biz.rr.com)
2020-10-05 10:45:55 +0200cp-(~cp-@b157153.ppp.asahi-net.or.jp) (Ping timeout: 240 seconds)
2020-10-05 10:46:17 +0200ekleog_(~ii@prologin/ekleog)
2020-10-05 10:46:38 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net)
2020-10-05 10:46:50 +0200mav2(~mav@i5E862F77.versanet.de)
2020-10-05 10:46:55 +0200sw1nn(~sw1nn@host86-173-104-87.range86-173.btcentralplus.com) (Ping timeout: 240 seconds)
2020-10-05 10:46:59 +0200coot_(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl)
2020-10-05 10:47:19 +0200sw1nn(~sw1nn@2a00:23c6:2385:3a00:f5c5:6984:9c64:d791)
2020-10-05 10:47:34 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 265 seconds)
2020-10-05 10:47:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-05 10:47:55 +0200coot(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds)
2020-10-05 10:47:56 +0200coot_coot
2020-10-05 10:48:11 +0200jespada(~jespada@90.254.246.48)
2020-10-05 10:48:25 +0200ekleog(~ii@prologin/ekleog) (Ping timeout: 240 seconds)
2020-10-05 10:49:04 +0200glamas(~glamas@107.182.17.237)
2020-10-05 10:49:11 +0200cp-(~cp-@b157153.ppp.asahi-net.or.jp)
2020-10-05 10:49:23 +0200p-core(~Thunderbi@cst-prg-5-175.cust.vodafone.cz)
2020-10-05 10:50:45 +0200drbean(~drbean@TC210-63-209-50.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin1 - https://znc.in)
2020-10-05 10:50:51 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
2020-10-05 10:51:23 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 10:51:53 +0200jgt(~jgt@109.122.28.107)
2020-10-05 10:51:58 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it)
2020-10-05 10:52:40 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net)
2020-10-05 10:56:45 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 265 seconds)
2020-10-05 10:58:25 +0200mav2(~mav@i5E862F77.versanet.de) (Ping timeout: 264 seconds)
2020-10-05 11:00:01 +0200RC-3004(~RC-3004@195.206.169.184) ()
2020-10-05 11:00:17 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-10-05 11:00:38 +0200oisdk(~oisdk@2001:bb6:3329:d100:ec91:550b:f86b:f744) (Quit: oisdk)
2020-10-05 11:00:59 +0200jgt(~jgt@109.122.28.107)
2020-10-05 11:02:07 +0200cosimone_(~cosimone@93-47-228-249.ip115.fastwebnet.it)
2020-10-05 11:03:45 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Read error: Connection reset by peer)
2020-10-05 11:03:48 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de)
2020-10-05 11:03:53 +0200cosimone_cosimone
2020-10-05 11:05:25 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 240 seconds)
2020-10-05 11:06:35 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds)
2020-10-05 11:07:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 11:07:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 11:07:27 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 11:07:44 +0200jgt(~jgt@109.122.28.107)
2020-10-05 11:11:55 +0200jgt(~jgt@109.122.28.107) (Ping timeout: 240 seconds)
2020-10-05 11:17:14 +0200Wuzzy(~Wuzzy@p5790e6f5.dip0.t-ipconnect.de)
2020-10-05 11:18:11 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 11:18:11 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 11:18:11 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 11:19:42 +0200qapla_org(~qapla_org@s91904426.blix.com)
2020-10-05 11:19:45 +0200p-core(~Thunderbi@cst-prg-5-175.cust.vodafone.cz) (Ping timeout: 240 seconds)
2020-10-05 11:20:23 +0200kuribas(~user@ptr-25vy0i8g17wkvauenpi.18120a2.ip6.access.telenet.be)
2020-10-05 11:21:02 +0200dyeplexer(~lol@unaffiliated/terpin)
2020-10-05 11:22:03 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-05 11:25:27 +0200hackagefree-functors 1.2.1 - Free functors, adjoint to functors that forget class constraints. https://hackage.haskell.org/package/free-functors-1.2.1 (SjoerdVisscher)
2020-10-05 11:30:25 +0200 <gentauro> if I use the `network` package: https://hackage.haskell.org/package/network, can I then build the binary on a Windows 10 box?
2020-10-05 11:31:03 +0200ericsagnes(~ericsagne@2405:6580:0:5100:97e:4c35:feee:3de8) (Ping timeout: 272 seconds)
2020-10-05 11:31:14 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net)
2020-10-05 11:31:15 +0200 <sm[m]> yes
2020-10-05 11:32:00 +0200 <gentauro> sm[m]: are there any "specific" *nix packages that can't be build on a Windows 10 box?
2020-10-05 11:32:18 +0200 <gentauro> if yes, would it give sense to add that to `hackage`?
2020-10-05 11:33:28 +0200 <sm[m]> gentauro: unix is one; vty is another
2020-10-05 11:33:35 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 11:33:47 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 256 seconds)
2020-10-05 11:34:03 +0200 <sm[m]> Yes it would be nice to see that clearly on hackage, I'm not sure if it is shown
2020-10-05 11:34:27 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net) (Ping timeout: 265 seconds)
2020-10-05 11:34:33 +0200Sanchayan(~Sanchayan@136.185.184.11) (Quit: leaving)
2020-10-05 11:35:53 +0200 <sm[m]> basically I think if it depends transitively on unix, that's the signal
2020-10-05 11:36:14 +0200 <jackdk> gentauro: make sure you have MSYS set up and that cabal knows about it. otherwise you'll get failures on any package that wants to run a `configure` script
2020-10-05 11:36:47 +0200 <gentauro> jackdk: thx
2020-10-05 11:36:49 +0200 <jackdk> the haskell-dev chocolatey package should do this correctly if you do a clean install
2020-10-05 11:37:19 +0200 <jackdk> which I think is the current recommended way to get haskell on windows, but it's not an area I'm enormously familiar with
2020-10-05 11:37:36 +0200 <sm[m]> using stack is the easiest
2020-10-05 11:38:20 +0200Guest_85(5f66582c@adsl-dyn-44.95-102-88.t-com.sk)
2020-10-05 11:38:23 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-05 11:38:33 +0200 <gentauro> sm[m]: I intend to use `stack`, but it seems that `MSYS` is needed
2020-10-05 11:38:37 +0200oisdk(~oisdk@2001:bb6:3329:d100:1dc8:afe3:52e4:27ba)
2020-10-05 11:38:41 +0200Guest_85(5f66582c@adsl-dyn-44.95-102-88.t-com.sk) (Remote host closed the connection)
2020-10-05 11:38:48 +0200 <sm[m]> stack provides it
2020-10-05 11:39:03 +0200 <sm[m]> or ghc does, I'm not sure
2020-10-05 11:40:57 +0200mav2(~mav@i5E862F77.versanet.de)
2020-10-05 11:41:06 +0200 <gentauro> sm[m]: roget that. I will give it a try and if it fails, I will install MSYS
2020-10-05 11:41:11 +0200 <gentauro> (as well)
2020-10-05 11:41:23 +0200 <sm[m]> the stack binary is all you need to build most of hackage on windows
2020-10-05 11:43:09 +0200ericsagnes(~ericsagne@2405:6580:0:5100:b431:d8c5:c1de:6899)
2020-10-05 11:43:19 +0200 <gentauro> oh. So jackdk might sugested that `MSYS` is needed when only using `cabal`. Got it (I think)
2020-10-05 11:44:36 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 11:44:58 +0200carlomagno1(~cararell@inet-hqmc01-o.oracle.com) (Ping timeout: 256 seconds)
2020-10-05 11:45:06 +0200 <jackdk> I don't remember whether the stack installer brings along MSYS or not. But whatever build tool you use, you will need a way to run configure scripts, and that way is MSYS these days
2020-10-05 11:45:13 +0200raichoo(~raichoo@213.240.178.58)
2020-10-05 11:45:15 +0200__monty__(~toonn@unaffiliated/toonn)
2020-10-05 11:48:10 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 11:48:32 +0200rprije(~rprije@203.214.95.251) (Remote host closed the connection)
2020-10-05 11:48:45 +0200fl0_id(~fl0_id@2a01:4f8:171:4de::40:2)
2020-10-05 11:48:51 +0200rprije(~rprije@203.214.95.251)
2020-10-05 11:48:55 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-05 11:49:07 +0200Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2020-10-05 11:51:27 +0200Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 260 seconds)
2020-10-05 11:51:27 +0200Lord_of_Life_Lord_of_Life
2020-10-05 11:52:26 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 11:52:26 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 11:52:26 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 12:02:04 +0200peel(uid145489@gateway/web/irccloud.com/x-gaoowxyrodcvmckl) (Quit: Connection closed for inactivity)
2020-10-05 12:02:06 +0200 <phadej> mimi_vx: `ghc` is not buildable package. It's uploaded to hackage purely for haddock purposes
2020-10-05 12:02:11 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 260 seconds)
2020-10-05 12:02:23 +0200dcoutts(~duncan@33.14.75.194.dyn.plus.net)
2020-10-05 12:02:23 +0200dcoutts(~duncan@33.14.75.194.dyn.plus.net) (Changing host)
2020-10-05 12:02:23 +0200dcoutts(~duncan@unaffiliated/dcoutts)
2020-10-05 12:02:37 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 246 seconds)
2020-10-05 12:02:47 +0200 <mimi_vx> phadej yes, but for example try build hie-bios on system with ghc-8.10.2
2020-10-05 12:03:12 +0200 <mimi_vx> phadej: using cabal , from hackage
2020-10-05 12:03:29 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 12:03:36 +0200dincio(~dincio@host-87-0-5-208.retail.telecomitalia.it)
2020-10-05 12:03:41 +0200 <fl0_id> hey, what is a good way / guideline to compile ghc (etc) for repackaging? this is necessary for conda-forge (conda-forge.org) so that we do not rely on distribution packages. And because of the old ghc version used by centos 6, I think I would have to start from ghc 7.4 to bootstrap. It just give weird linker errors and stuff like that. Is here a good place to ask questions about that?
2020-10-05 12:03:53 +0200 <mimi_vx> phadej: you end with https://pastebin.com/TvXYZ8d1
2020-10-05 12:04:28 +0200Rudd0(~Rudd0@185.189.115.103)
2020-10-05 12:04:40 +0200 <mimi_vx> phadej: so not only haddock docu , but also dependency resolution for packages which depends on GHC
2020-10-05 12:05:04 +0200 <maerwald> fl0_id: is conda-forge centos7 compatible?
2020-10-05 12:05:32 +0200 <mimi_vx> phadej: well , prtially main problem is different base package for 8.10.1 and 8.10.2
2020-10-05 12:06:00 +0200 <phadej> mimi_vx: are you sure you don't have some freeze file or something which makes solver want to pick up 8.10.1
2020-10-05 12:06:04 +0200jchia__(~jchia@58.32.35.239) (Quit: Leaving.)
2020-10-05 12:06:08 +0200 <phadej> because there is no such bound on hie-bios itself
2020-10-05 12:06:11 +0200 <mimi_vx> clean cabal
2020-10-05 12:06:18 +0200 <mimi_vx> hie-bios depends onb ghc
2020-10-05 12:06:39 +0200 <mimi_vx> and hackage return as last ghc 8.10.1 which has base 4.14.0.0
2020-10-05 12:06:47 +0200 <maerwald> I don't think the solver looks up the ghc package from hackage, because it's always installed with a GHC
2020-10-05 12:06:48 +0200seanparsons(~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net) (Quit: ZNC 1.7.5 - https://znc.in)
2020-10-05 12:07:00 +0200 <fl0_id> maerwald it is an option yes, but by default it is centos 6
2020-10-05 12:07:14 +0200 <phadej> he left
2020-10-05 12:07:16 +0200 <mimi_vx> but ghc 8.10.2 has base 4.14.1.0 so it isnt possible satisfy ghc deps of hie-bios
2020-10-05 12:07:19 +0200ambiso(~ambiso@209.182.239.205) (Quit: The Lounge - https://thelounge.chat)
2020-10-05 12:07:19 +0200 <fl0_id> and still centos 7 uses an non-current ghc iirc
2020-10-05 12:07:23 +0200 <maerwald> fl0_id: https://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-centos67-linux.tar.xz
2020-10-05 12:07:25 +0200 <phadej> mimi_vx: I don't believe you, https://pastebin.com/3vsPE9z9 it works here
2020-10-05 12:07:26 +0200 <phadej> fine
2020-10-05 12:07:27 +0200seanparsons(~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net)
2020-10-05 12:07:38 +0200 <maerwald> fl0_id: https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-centos7-linux.tar.xz
2020-10-05 12:07:44 +0200 <phadej> hie-bios doesn't have 4.14.1.0 bound
2020-10-05 12:07:51 +0200 <phadej> or specifically, hie-bios-0.7.1
2020-10-05 12:08:01 +0200 <mimi_vx> hmm, -w flag
2020-10-05 12:08:02 +0200ambiso(~ambiso@209.182.239.205)
2020-10-05 12:08:17 +0200 <fl0_id> maerwald yeah, that I know. but we want to build because there are no binaries for aarch64 and ppc64le at least.
2020-10-05 12:08:26 +0200 <maerwald> ah
2020-10-05 12:08:35 +0200 <fl0_id> (or at least not anymore / not consistently)
2020-10-05 12:08:48 +0200 <maerwald> yeah, that's gonna be fun, you might get more help in #ghc
2020-10-05 12:09:27 +0200 <fl0_id> mmh ok
2020-10-05 12:09:48 +0200 <fl0_id> maerwald thansk
2020-10-05 12:10:03 +0200 <phadej> mimi_vx: your paste is unclear, it doesn't tell whether `ghc` in your path is ghc-8.10.2 or some else
2020-10-05 12:11:57 +0200mav2(~mav@i5E862F77.versanet.de) (Quit: WeeChat 2.9)
2020-10-05 12:12:15 +0200 <mimi_vx> phadej: https://pastebin.com/HL8dRErY
2020-10-05 12:12:28 +0200dincio(~dincio@host-87-0-5-208.retail.telecomitalia.it) (Quit: WeeChat 2.9)
2020-10-05 12:12:57 +0200kori(~kori@arrowheads/kori) (Ping timeout: 260 seconds)
2020-10-05 12:12:59 +0200aarvar(~foewfoiew@50.35.43.33) (Ping timeout: 240 seconds)
2020-10-05 12:13:46 +0200 <phadej> I'm sure that either you are in a project folder, or you have ~/.ghc/*-8.10.2/default or something which confuses the solver
2020-10-05 12:14:03 +0200 <mimi_vx> no
2020-10-05 12:14:11 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 12:14:12 +0200 <mimi_vx> look at paste ...
2020-10-05 12:14:12 +0200Guest18(567e8866@gateway/web/cgi-irc/kiwiirc.com/ip.86.126.136.102)
2020-10-05 12:14:14 +0200 <phadej> but you removed them, so I don't know what's wrong on your system
2020-10-05 12:14:16 +0200 <mimi_vx> claen , after rm
2020-10-05 12:14:26 +0200 <mimi_vx> clean system ghc-8.10.2
2020-10-05 12:14:49 +0200 <mimi_vx> and [__2] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict: ghc => base<0 &&
2020-10-05 12:14:51 +0200 <mimi_vx> ==4.14.*)
2020-10-05 12:14:53 +0200plutoniix(~q@175.176.222.7) (Quit: Leaving)
2020-10-05 12:15:27 +0200 <mimi_vx> states installed base-4.14.1.0 --> shipped with ghc-8.10.2
2020-10-05 12:15:30 +0200 <phadej> yes, that is a way to say "don't ever try to reinstall base"
2020-10-05 12:16:38 +0200 <mimi_vx> phadej: nobody reinstalled / upgraded base outside shipped with ghc, and ghc-8.10.2 updated version of base
2020-10-05 12:16:41 +0200 <phadej> what your `ghc-pkg list` says
2020-10-05 12:17:17 +0200xff0x(~fox@2001:1a81:5300:fe00:7915:3d42:ba93:76ea) (Ping timeout: 272 seconds)
2020-10-05 12:17:19 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-05 12:17:21 +0200aarvar(~foewfoiew@50.35.43.33)
2020-10-05 12:17:45 +0200xff0x(~fox@2001:1a81:5300:fe00:a1a2:2812:1aa4:a833)
2020-10-05 12:18:07 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 12:18:07 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 12:18:07 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 12:19:07 +0200 <mimi_vx> phadej: https://pastebin.com/AzWHkt0Y
2020-10-05 12:19:45 +0200 <phadej> that is screwed one, why there is so much stuff?
2020-10-05 12:19:50 +0200 <phadej> and specifically, there is no `ghc`
2020-10-05 12:19:52 +0200jgt(~jgt@233724.soborka.net)
2020-10-05 12:20:14 +0200 <phadej> do you try to use systems' own GHC on some bleeding edge distro? (don't)
2020-10-05 12:21:03 +0200 <phadej> you probably do, because "/usr/lib64/ghc-8.10.2/package.conf.d"
2020-10-05 12:21:24 +0200 <phadej> why they remove `ghc` package, I don't know. But that means there is no way you can install hie-bios
2020-10-05 12:21:34 +0200 <phadej> `ghc` is not buildable with cabal-install
2020-10-05 12:21:34 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 244 seconds)
2020-10-05 12:21:53 +0200 <phadej> complain to your distro packages.
2020-10-05 12:21:56 +0200 <mimi_vx> ahh, thx
2020-10-05 12:21:56 +0200 <phadej> packagers*
2020-10-05 12:22:31 +0200 <mimi_vx> now find why isnt correctlyu added ghc-8.10.2 to package config
2020-10-05 12:23:04 +0200 <maerwald> arch linux? :p
2020-10-05 12:23:59 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2020-10-05 12:24:54 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 12:25:18 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 12:26:57 +0200hackagelists-flines 0.1.0.0 - Additional data and structures to some 'String'-related lists. https://hackage.haskell.org/package/lists-flines-0.1.0.0 (OleksandrZhabenko)
2020-10-05 12:28:41 +0200alp(~alp@2a01:e0a:58b:4920:710e:4c3d:416d:5e7c) (Ping timeout: 272 seconds)
2020-10-05 12:29:36 +0200oisdk(~oisdk@2001:bb6:3329:d100:1dc8:afe3:52e4:27ba) (Quit: oisdk)
2020-10-05 12:29:55 +0200rprije(~rprije@203.214.95.251) (Ping timeout: 240 seconds)
2020-10-05 12:31:53 +0200SirClueless(42413686@cpe-66-65-54-134.nyc.res.rr.com) (Remote host closed the connection)
2020-10-05 12:33:21 +0200carlomagno(~cararell@inet-hqmc01-o.oracle.com)
2020-10-05 12:34:20 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 12:35:20 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 256 seconds)
2020-10-05 12:37:15 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 12:40:12 +0200raehik(~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net)
2020-10-05 12:43:40 +0200alp(~alp@88.126.45.36)
2020-10-05 12:43:50 +0200ixlun(~matthew@213.205.241.94) (Ping timeout: 256 seconds)
2020-10-05 12:45:38 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 12:47:15 +0200tito_04taurux
2020-10-05 12:50:20 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-05 12:52:52 +0200mav1(~mav@dynamic-002-247-240-164.2.247.pool.telefonica.de)
2020-10-05 12:53:49 +0200mav1(~mav@dynamic-002-247-240-164.2.247.pool.telefonica.de) (Client Quit)
2020-10-05 12:55:44 +0200taurux(~taurux@net-93-151-203-67.cust.dsl.teletu.it) (Ping timeout: 256 seconds)
2020-10-05 12:56:58 +0200hackagestylish-haskell 0.12.1.0 - Haskell code prettifier https://hackage.haskell.org/package/stylish-haskell-0.12.1.0 (JasperVanDerJeugt)
2020-10-05 12:57:02 +0200taurux(~taurux@net-93-151-203-67.cust.vodafonedsl.it)
2020-10-05 13:00:55 +0200bgavran(sid393312@gateway/web/irccloud.com/x-utpuhsntfvyeuxwq) (Quit: Connection closed for inactivity)
2020-10-05 13:02:02 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 13:02:02 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 13:02:02 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 13:04:27 +0200hackagelists-flines 0.1.0.1 - Additional data and structures to some 'String'-related lists. https://hackage.haskell.org/package/lists-flines-0.1.0.1 (OleksandrZhabenko)
2020-10-05 13:05:46 +0200kuribas(~user@ptr-25vy0i8g17wkvauenpi.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2020-10-05 13:07:13 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 260 seconds)
2020-10-05 13:14:54 +0200jgt1(~jgt@94.153.49.138)
2020-10-05 13:17:03 +0200kupi(uid212005@gateway/web/irccloud.com/x-yncctbtvpcjbjnzz)
2020-10-05 13:17:16 +0200jgt(~jgt@233724.soborka.net) (Ping timeout: 256 seconds)
2020-10-05 13:18:45 +0200Buntspecht(~user@unaffiliated/siracusa) (Quit: Bye!)
2020-10-05 13:19:29 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 13:19:29 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 13:19:29 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 13:22:51 +0200totallynotnate(~nate@125.160.143.17)
2020-10-05 13:25:15 +0200darjeeling_(~darjeelin@115.215.43.235)
2020-10-05 13:27:25 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 13:28:03 +0200berberman(~berberman@123.118.108.235) (Ping timeout: 260 seconds)
2020-10-05 13:28:19 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com)
2020-10-05 13:29:51 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 13:29:51 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 13:29:51 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 13:32:02 +0200berberman(~berberman@123.118.106.9)
2020-10-05 13:36:03 +0200hekkaidekapus_(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-10-05 13:36:23 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 260 seconds)
2020-10-05 13:37:00 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 13:37:43 +0200hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-10-05 13:38:53 +0200jgt1(~jgt@94.153.49.138) (Read error: Connection reset by peer)
2020-10-05 13:38:59 +0200berberman(~berberman@123.118.106.9) (Ping timeout: 240 seconds)
2020-10-05 13:40:32 +0200berberman(~berberman@123.118.110.73)
2020-10-05 13:41:25 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 13:46:32 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 13:47:09 +0200ggole(~ggole@2001:8003:8119:7200:18b6:6ff8:b669:283)
2020-10-05 13:48:02 +0200jedws(~jedws@121.209.186.103)
2020-10-05 13:48:18 +0200jedws(~jedws@121.209.186.103) (Client Quit)
2020-10-05 13:49:25 +0200totallynotnate(~nate@125.160.143.17) (Quit: WeeChat 2.9)
2020-10-05 13:50:55 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-05 13:51:36 +0200drbean(~drbean@TC210-63-209-192.static.apol.com.tw)
2020-10-05 13:51:47 +0200tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net) ()
2020-10-05 13:52:48 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 13:53:07 +0200berberman_(~berberman@2408:8207:256e:d930:584e:a9ff:fe9b:d3fe)
2020-10-05 13:53:25 +0200entkme^(entkme@ip98-184-89-2.mc.at.cox.net)
2020-10-05 13:53:45 +0200reppertj(~textual@pool-96-246-209-59.nycmny.fios.verizon.net)
2020-10-05 13:54:59 +0200berberman(~berberman@123.118.110.73) (Ping timeout: 240 seconds)
2020-10-05 13:55:28 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-10-05 14:00:02 +0200qapla_org(~qapla_org@s91904426.blix.com) ()
2020-10-05 14:00:06 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:02:44 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…)
2020-10-05 14:04:33 +0200coot(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-10-05 14:05:51 +0200nineonin_(~nineonine@216-19-190-182.dyn.novuscom.net)
2020-10-05 14:06:09 +0200raichoo(~raichoo@213.240.178.58) (Quit: Lost terminal)
2020-10-05 14:08:27 +0200hackageacc 0.1.3 - Sequence optimized for monoidal construction and folding https://hackage.haskell.org/package/acc-0.1.3 (NikitaVolkov)
2020-10-05 14:08:33 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Quit: leaving)
2020-10-05 14:09:03 +0200nineonine(~nineonine@50.216.62.2) (Ping timeout: 260 seconds)
2020-10-05 14:09:43 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-05 14:12:23 +0200taurux(~taurux@net-93-151-203-67.cust.vodafonedsl.it) (Ping timeout: 260 seconds)
2020-10-05 14:13:58 +0200taurux(~taurux@net-93-146-149-217.cust.vodafonedsl.it)
2020-10-05 14:14:52 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:16:09 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-05 14:16:47 +0200xff0x(~fox@2001:1a81:5300:fe00:a1a2:2812:1aa4:a833) (Ping timeout: 244 seconds)
2020-10-05 14:17:00 +0200dyeplexer(~lol@unaffiliated/terpin) (Ping timeout: 256 seconds)
2020-10-05 14:17:56 +0200xff0x(~fox@2001:1a81:5300:fe00:1175:d8f5:8ada:f855)
2020-10-05 14:18:55 +0200dyeplexer(~lol@unaffiliated/terpin)
2020-10-05 14:20:14 +0200Stanley00(~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2020-10-05 14:20:34 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Quit: leaving)
2020-10-05 14:20:47 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds)
2020-10-05 14:21:30 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:21:35 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-10-05 14:21:49 +0200luka(~luka@185.204.1.185)
2020-10-05 14:22:12 +0200lukaGuest4175
2020-10-05 14:22:59 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Ping timeout: 244 seconds)
2020-10-05 14:24:04 +0200Kaivo(~Kaivo@104-200-86-99.mc.derytele.com)
2020-10-05 14:24:12 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 14:24:59 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 14:27:25 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:27:38 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-10-05 14:27:54 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:28:21 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-10-05 14:28:38 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-10-05 14:28:45 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-10-05 14:31:02 +0200stree_(~stree@50-108-75-26.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception)
2020-10-05 14:31:20 +0200stree(~stree@50-108-75-26.adr01.mskg.mi.frontiernet.net)
2020-10-05 14:31:27 +0200chaosmasttter(~chaosmast@p200300c4a73b2e0100f3c5a701cd6e56.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 14:36:54 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 14:36:54 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 14:36:54 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 14:36:54 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 14:37:13 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 14:38:48 +0200John20(~John@82.46.59.122) (Ping timeout: 260 seconds)
2020-10-05 14:39:49 +0200oisdk(~oisdk@2001:bb6:3329:d100:1dc8:afe3:52e4:27ba)
2020-10-05 14:45:43 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 244 seconds)
2020-10-05 14:47:12 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 14:48:10 +0200chaosmasttter(~chaosmast@p200300c4a73b2e0100f3c5a701cd6e56.dip0.t-ipconnect.de)
2020-10-05 14:50:32 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 14:50:46 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 14:50:46 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 14:50:46 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 14:51:56 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-05 14:54:19 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net)
2020-10-05 14:56:34 +0200Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 244 seconds)
2020-10-05 14:58:38 +0200machinedgod(~machinedg@d67-193-126-196.home3.cgocable.net) (Ping timeout: 244 seconds)
2020-10-05 14:59:24 +0200urodna(~urodna@unaffiliated/urodna)
2020-10-05 15:00:16 +0200John20(~John@82.46.59.122)
2020-10-05 15:00:23 +0200lpy(~lpyfist@unaffiliated/elysian)
2020-10-05 15:01:57 +0200hackagehaskell-lsp-types 0.23.0.0 - Haskell library for the Microsoft Language Server Protocol, data types https://hackage.haskell.org/package/haskell-lsp-types-0.23.0.0 (luke_)
2020-10-05 15:02:57 +0200hackagehaskell-lsp 0.23.0.0 - Haskell library for the Microsoft Language Server Protocol https://hackage.haskell.org/package/haskell-lsp-0.23.0.0 (luke_)
2020-10-05 15:04:35 +0200p-core(~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
2020-10-05 15:05:17 +0200p-core(~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
2020-10-05 15:05:39 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6)
2020-10-05 15:06:49 +0200pfurla(~pfurla@104.192.219.186)
2020-10-05 15:08:29 +0200elliott__(~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Quit: WeeChat 2.9)
2020-10-05 15:12:06 +0200klardotsh(~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) (Ping timeout: 258 seconds)
2020-10-05 15:17:28 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 258 seconds)
2020-10-05 15:17:55 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-05 15:20:42 +0200Guest_18(4f2cdbb5@host-79-44-219-181.retail.telecomitalia.it)
2020-10-05 15:21:46 +0200Guest_18(4f2cdbb5@host-79-44-219-181.retail.telecomitalia.it) (Remote host closed the connection)
2020-10-05 15:22:40 +0200polyrain(~polyrain@2001:8003:e501:6901:a41a:145a:3fce:c107) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 15:25:13 +0200kupi(uid212005@gateway/web/irccloud.com/x-yncctbtvpcjbjnzz) (Quit: Connection closed for inactivity)
2020-10-05 15:30:20 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-10-05 15:31:11 +0200 <gentauro> is there a way to find the code for `tuples` with `hoogle`? (tuple as in: `( 42, 'a')`
2020-10-05 15:31:21 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-05 15:32:37 +0200Tops2(~Tobias@dyndsl-095-033-017-021.ewe-ip-backbone.de)
2020-10-05 15:35:19 +0200parisienne___(sid383587@gateway/web/irccloud.com/x-ocvqtewkhvwerdzi)
2020-10-05 15:36:06 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:68ef:3717:d255:fea6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 15:36:58 +0200 <dminuoso> code for tuples?
2020-10-05 15:37:14 +0200 <dminuoso> What exactly are you looking for?
2020-10-05 15:38:58 +0200Tops21(~Tobias@dyndsl-095-033-017-021.ewe-ip-backbone.de)
2020-10-05 15:39:25 +0200ericsagnes(~ericsagne@2405:6580:0:5100:b431:d8c5:c1de:6899) (Ping timeout: 240 seconds)
2020-10-05 15:40:00 +0200parisienne___(sid383587@gateway/web/irccloud.com/x-ocvqtewkhvwerdzi) (Client Quit)
2020-10-05 15:40:04 +0200mpereira(~mpereira@2a02:810d:f40:d96:1c35:7f2e:59ff:953)
2020-10-05 15:41:04 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-umfptdbczzisdhag)
2020-10-05 15:41:36 +0200invaser(~Thunderbi@31.148.23.125)
2020-10-05 15:42:02 +0200Tops2(~Tobias@dyndsl-095-033-017-021.ewe-ip-backbone.de) (Ping timeout: 244 seconds)
2020-10-05 15:42:27 +0200frdg(60e94035@pool-96-233-64-53.bstnma.fios.verizon.net)
2020-10-05 15:45:09 +0200 <frdg> `equal xs ys = subset xs ys && subset ys xs`. Is there a general way to apply this function in both directions instead of explicitly calling subset twice?
2020-10-05 15:46:42 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 15:46:53 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-05 15:46:53 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-05 15:46:53 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 15:47:52 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 15:47:57 +0200 <dminuoso> Nothing as concise.
2020-10-05 15:48:45 +0200drbean(~drbean@TC210-63-209-192.static.apol.com.tw) (Ping timeout: 244 seconds)
2020-10-05 15:49:33 +0200 <frdg> ok
2020-10-05 15:49:43 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:bd24:9726:f60a:ba09)
2020-10-05 15:51:26 +0200 <dminuoso> frdg: There's of course the option to define some `symmEq p x y = p x y && p y z`, which can be handy if you define a bunch of functions like equal.
2020-10-05 15:51:47 +0200ericsagnes(~ericsagne@2405:6580:0:5100:953c:5f38:35fd:b3fd)
2020-10-05 15:51:57 +0200 <dminuoso> (Or well, call it symm rather than symmEq, but you get the idea)
2020-10-05 15:52:16 +0200 <dminuoso> But if this is just a one-off, I'd just write it like you put it
2020-10-05 15:52:36 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-05 15:54:29 +0200 <frdg> yes I went to write something like symm, but I see why its kind of just extra confusion.
2020-10-05 15:55:17 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-10-05 15:56:18 +0200 <gentauro> dminuoso: just the place in GHC where `tuples` are handled :)
2020-10-05 15:56:26 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 15:56:26 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 15:56:26 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-05 15:56:53 +0200 <gentauro> like I wrote: `( 42, 'a')` but also `( 42, 'a', "b")`
2020-10-05 15:57:07 +0200 <dminuoso> What do you mean by "handled" exactly?
2020-10-05 15:57:08 +0200idhugo(~idhugo@users-1190.st.net.au.dk) (Ping timeout: 256 seconds)
2020-10-05 15:57:14 +0200 <dminuoso> Do you want to know how tuples are defined in GHC?
2020-10-05 15:57:23 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 265 seconds)
2020-10-05 15:57:27 +0200 <dminuoso> https://hackage.haskell.org/package/ghc-prim-0.6.1/docs/src/GHC.Tuple.html#%28%2C%29
2020-10-05 15:57:32 +0200cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-05 15:57:49 +0200 <dminuoso> (Im not sure whether that code is actually used, or whether that's just for haddock assistence)
2020-10-05 15:57:52 +0200 <[exa]> gentauro: there's some desugaring to (,) (,,) (,,,) ..., and the data is AFAIK defined normally using `data`
2020-10-05 15:58:14 +0200Falkeo(5631fd8b@ip-86-49-253-139.net.upcbroadband.cz)
2020-10-05 15:58:19 +0200 <dminuoso> The import at the top of the module suggests that is the real definition
2020-10-05 15:59:17 +0200jiribenes(jbjiribene@gateway/shell/matrix.org/x-vhnsqdmfgjajakfv)
2020-10-05 15:59:41 +0200 <[exa]> btw why is everyone using a b c d e f... for tuple variable names instead of a1 a2 a3 (which are noticeably better for determining how long the definition actually is) ?
2020-10-05 16:00:18 +0200 <dminuoso> Half as many characters?
2020-10-05 16:00:37 +0200 <dminuoso> Also, there's a common theme of enumerating letters
2020-10-05 16:00:42 +0200parisienne(sid383587@gateway/web/irccloud.com/x-tqyeuopclcyqmelh)
2020-10-05 16:00:44 +0200 <dminuoso> type Lens s t a b = ...
2020-10-05 16:00:59 +0200 <dminuoso> That also pervades much of mathematics
2020-10-05 16:01:47 +0200 <[exa]> I still kinda hope that no one is going to use say 14-tuple, so won't need to remember that it should end with `n`
2020-10-05 16:02:37 +0200 <[exa]> but seriously for mechanical code like this I find the usage of a b c d ... followed by a1 b1 c1 ... well counterintuitive. :]
2020-10-05 16:02:45 +0200 <dminuoso> Im quite confident large tuples are used amongst postgresql-simple users.
2020-10-05 16:03:12 +0200 <dminuoso> query conn qry (a, b, c, d, e) ...
2020-10-05 16:04:05 +0200 <[exa]> jiribenes: o/
2020-10-05 16:04:14 +0200strugglingming(sid10571@gateway/web/irccloud.com/x-pwoyzccowxbiqivf)
2020-10-05 16:04:37 +0200alp(~alp@88.126.45.36) (Ping timeout: 258 seconds)
2020-10-05 16:04:49 +0200 <[exa]> hm yes, relations, forgot about them again.
2020-10-05 16:05:04 +0200 <gentauro> 15:57 < dminuoso> Do you want to know how tuples are defined in GHC?
2020-10-05 16:05:04 +0200 <gentauro> yes
2020-10-05 16:05:10 +0200 <gentauro> 15:57 < dminuoso> https://hackage.haskell.org/package/ghc-prim-0.6.1/docs/src/GHC.Tuple.html#%28%2C%29
2020-10-05 16:05:16 +0200 <gentauro> I didn't expect this …
2020-10-05 16:05:53 +0200 <[exa]> straightforward right? :D
2020-10-05 16:06:47 +0200 <dminuoso> Nobody expects the spanish inquisition.
2020-10-05 16:07:12 +0200Sheilong(uid293653@gateway/web/irccloud.com/x-wunoznsilndrshkm)
2020-10-05 16:07:39 +0200 <gentauro> what would it take to convert `GHC.Tuple` to `GHC.TupleWithLabel` => `GHC.AnonymousRecord`?
2020-10-05 16:07:50 +0200 <gentauro> s/convert/derive/
2020-10-05 16:07:57 +0200 <dolio> I think they decided long ago that it was easier to just make GHC handle the illegal declarations than to hack them in.
2020-10-05 16:08:41 +0200spew(uid195861@gateway/web/irccloud.com/x-zoqmilcrntqznxpj)
2020-10-05 16:09:01 +0200 <dminuoso> And then have their users tell customers to just go for Agda if they wanted custom mixfix, while using it themselves!
2020-10-05 16:09:51 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-10-05 16:10:05 +0200 <dolio> Well, it still needs to be special cased.
2020-10-05 16:10:27 +0200solonarv(~solonarv@astrasbourg-653-1-252-112.w92-161.abo.wanadoo.fr)
2020-10-05 16:10:28 +0200 <dolio> It's probably just less special cases.
2020-10-05 16:11:42 +0200flatmap(~flatmap@p200300dd371bf60068aa0495bfcb4a49.dip0.t-ipconnect.de)
2020-10-05 16:11:51 +0200 <noctux> "Manuel says: Including one more declaration gives a segmentation fault."
2020-10-05 16:12:01 +0200 <noctux> good to know :P
2020-10-05 16:12:30 +0200 <dminuoso> noctux: Amusingly it was never discovered why
2020-10-05 16:12:36 +0200 <dminuoso> The bug could still be there.
2020-10-05 16:13:23 +0200 <dminuoso> Rather than identifying memory corruption, it was deemed easier to comment them out and hope for the best. :p
2020-10-05 16:14:16 +0200xerox_(~xerox@unaffiliated/xerox) (Ping timeout: 272 seconds)
2020-10-05 16:14:32 +0200 <Squarism> jackdk. Sorry, work happened. I want users of the library be able to write a their own type that we can call TheirType. It must only contain the allowed elements and nodes need to be of a certain type. I want to use TH to to generate the posted datastructure from TheirType. That will later be used to create a serializable index to parts of the datastructure. I need it to be serializable so I can send it over the wire.
2020-10-05 16:14:40 +0200 <noctux> till the day of the 63 element tuple appears :p
2020-10-05 16:16:07 +0200 <Squarism> jackdk, or the structure I posted is something I know I can construct a serializable index for.
2020-10-05 16:16:30 +0200 <Squarism> as in paths to leafs in the datastructe.
2020-10-05 16:16:50 +0200jgt1(~jgt@78.26.168.236)
2020-10-05 16:20:21 +0200 <shapr> yay, #haskell 20th anniversary is in 30 weeks!
2020-10-05 16:21:16 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-05 16:24:55 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 16:26:12 +0200Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds)
2020-10-05 16:26:28 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2020-10-05 16:32:50 +0200parisienne(sid383587@gateway/web/irccloud.com/x-tqyeuopclcyqmelh) ()
2020-10-05 16:36:31 +0200 <Cheery> I just got to examining how relax NG works and wow that thing is named badly.
2020-10-05 16:36:31 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 16:36:59 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 16:37:06 +0200parisienne(sid383587@gateway/web/irccloud.com/x-wkbgoesgrpfdelps)
2020-10-05 16:38:12 +0200 <Cheery> well maybe it signifies the problem in HTML5 and pals.
2020-10-05 16:39:52 +0200GyroW_(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 16:40:08 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 16:40:09 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 16:40:09 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 16:40:24 +0200fog23(c1b057e2@gateway/web/cgi-irc/kiwiirc.com/ip.193.176.87.226)
2020-10-05 16:41:53 +0200 <fog23> i tried c# the other day, they dont even have sum types!?
2020-10-05 16:42:22 +0200 <shapr> we got sum type
2020-10-05 16:42:39 +0200 <dminuoso> Most languages dont have sum types...
2020-10-05 16:42:39 +0200 <fog23> they were saying "dont use haskell - you wont be able to get a job" and i was like - but i can actually express programs!!
2020-10-05 16:42:53 +0200 <dminuoso> Or very poor support for mimicing.
2020-10-05 16:43:08 +0200 <dminuoso> Pythonistas get away by just using dictionaries everywhere.
2020-10-05 16:43:17 +0200 <davve> stark contrast between C# and haskell
2020-10-05 16:43:30 +0200 <fog23> yeah, i eventually managed to write maybe using somehting like "enums and generic classes" but it was a total mess
2020-10-05 16:44:31 +0200 <fog23> and, it did not seem like it was even worth trying to do "generics" as they call it - basically polymorphic type restrictions
2020-10-05 16:44:44 +0200 <fog23> where it would need eg a list of types at type level
2020-10-05 16:44:47 +0200 <dolio> If you need to do .net stuff, it's probably worth looking at F#.
2020-10-05 16:44:58 +0200 <fog23> i could hardely even *write* a list!!
2020-10-05 16:45:28 +0200 <fog23> dolio: the closet thing to .net i ever thought of using was node
2020-10-05 16:45:36 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk)
2020-10-05 16:46:00 +0200 <[exa]> fog23: luckily for you, c# has auto-maybe on almost everything!
2020-10-05 16:46:07 +0200 <Uniaika> [exa]: hahahaha
2020-10-05 16:46:11 +0200 <Cheery> I'd love to bash C#, but it's bit of stale because it's too easy.
2020-10-05 16:46:18 +0200 <fog23> they kept shouting at me for trying to use a "cons list" instead of their built in version
2020-10-05 16:46:46 +0200 <fog23> [exa] i only wanted maybe to write list...
2020-10-05 16:47:15 +0200 <fog23> List a = Maybe (a,List a)
2020-10-05 16:47:24 +0200 <fog23> (they have pairs at least)
2020-10-05 16:48:17 +0200 <fog23> it just left me totally exasperated. how can this be a more industrially applicable language than haskell!?
2020-10-05 16:48:27 +0200 <dminuoso> 16:46:18 fog23 | they kept shouting at me for trying to use a "cons list" instead of their built in version
2020-10-05 16:48:34 +0200 <dminuoso> You insist on not following a language idioms.
2020-10-05 16:48:47 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 16:48:49 +0200 <dminuoso> There's little value in being thickheaded and trying to write C# as if it were Haskell
2020-10-05 16:49:11 +0200 <fog23> everything i understand is built around get/set ! i worked for a full year just on the traverse class
2020-10-05 16:49:25 +0200balbirs(~balbirs__@ozlabs.org) (Ping timeout: 264 seconds)
2020-10-05 16:49:41 +0200 <fog23> the idea of not even being able to *express* a cons list made my skin crawl
2020-10-05 16:49:49 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 16:49:54 +0200 <dminuoso> And "industrially applicable" depends on factors such as "how well is the implementation", "how stable it is it", "how much tooling do you have", "how is library support for your problem domain", "how many developers can you easily get"
2020-10-05 16:50:05 +0200phaul(~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
2020-10-05 16:50:18 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 16:50:25 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 240 seconds)
2020-10-05 16:50:28 +0200 <dminuoso> And for what its worth, .net has linked lists.
2020-10-05 16:50:32 +0200 <fog23> i was trying to justify why a cons list is so important
2020-10-05 16:50:39 +0200 <dminuoso> They are doubly linked, but oh well
2020-10-05 16:50:52 +0200 <fog23> i guess thats what industry would need to understand - i hadnt realised what a large difference there was
2020-10-05 16:51:07 +0200 <fog23> and that the fundamental stunbling block would be something as simple as sum types
2020-10-05 16:51:08 +0200 <dolio> They're probably mutable linked lists, so you have to be careful what you do with them.
2020-10-05 16:51:17 +0200 <dminuoso> Im willing to argue that cons lists are not even so important in other languages.
2020-10-05 16:51:24 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com)
2020-10-05 16:51:24 +0200jle`(~mstksg@cpe-23-240-75-236.socal.res.rr.com) (Changing host)
2020-10-05 16:51:24 +0200jle`(~mstksg@unaffiliated/mstksg)
2020-10-05 16:51:34 +0200 <fog23> right, but why are they so useful to us
2020-10-05 16:51:38 +0200 <fog23> that more to the point
2020-10-05 16:51:50 +0200 <fog23> that would be "why should industry use haskell"
2020-10-05 16:51:51 +0200 <dminuoso> We encode control flow in lists
2020-10-05 16:52:00 +0200 <dminuoso> Other languages just do some imperative take with a for-loop.
2020-10-05 16:52:01 +0200 <fog23> but why is that better
2020-10-05 16:52:28 +0200 <dminuoso> Well, its only better because we've built an entire eco system around the idea.
2020-10-05 16:52:29 +0200 <fog23> i began trying to talk about higher order functions
2020-10-05 16:52:41 +0200 <dminuoso> Let's take C++ for instance
2020-10-05 16:52:57 +0200 <fog23> and about the ubiquity of the church state duality - but i dont think they were ready
2020-10-05 16:53:04 +0200 <dminuoso> Looping over things in C++ requires using iterators
2020-10-05 16:53:09 +0200 <dminuoso> Or manual for loops
2020-10-05 16:53:14 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-05 16:53:30 +0200 <fog23> i mean, what can we *do* with our "enhanced ecosystem"
2020-10-05 16:54:01 +0200 <dminuoso> Does it matter? The relevant point is, trying to transport "the idea that florishes in Haskell" and "insisting it must be useful in another language because its useful in Haskell" is a very poor start.
2020-10-05 16:54:10 +0200ryansmccoy(~ryansmcco@156.96.151.132) (Ping timeout: 272 seconds)
2020-10-05 16:54:15 +0200 <fog23> i just take the "style" for granted, and not actually being able to understand how they can do anything at all without GADTs and tail recursion - i couldnt easily say why haskell was better
2020-10-05 16:54:34 +0200 <dminuoso> Most of the time, its better to just accept the other languages paradigms, and write idiomatic (in their language) code instead.
2020-10-05 16:54:46 +0200 <dminuoso> The code ends up less convoluted and more maintainable
2020-10-05 16:54:48 +0200 <dminuoso> Strangely
2020-10-05 16:54:53 +0200 <fog23> but what could that enable, and what would it lose?
2020-10-05 16:54:57 +0200 <Cheery> I just recently figured out dhall is really short distance away from a markup language.
2020-10-05 16:55:07 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-10-05 16:55:39 +0200 <fog23> sure, i get how the "idiomatic" code is easier to read and write
2020-10-05 16:55:45 +0200mav1(~mav@p5dd5a8a0.dip0.t-ipconnect.de)
2020-10-05 16:55:55 +0200jle`(~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 16:55:56 +0200 <fog23> but, everything i do is based on traversals
2020-10-05 16:56:12 +0200 <dminuoso> Well, people coming over to Haskell have the same exact problem.
2020-10-05 16:56:12 +0200 <fog23> i thought it was everything anyone *could* do
2020-10-05 16:56:33 +0200 <dminuoso> Everything they do is ad-hoc imperative manipulation of state, and they cant figure out how to translate the *idea* into something declarative
2020-10-05 16:56:55 +0200 <dminuoso> This is the same, just in reverse.
2020-10-05 16:56:55 +0200 <fog23> right, but thats more like just restating the point about idioms
2020-10-05 16:56:59 +0200 <fog23> yeah
2020-10-05 16:57:20 +0200phaul(~phaul@ruby/staff/phaul)
2020-10-05 16:57:27 +0200 <fog23> i was trying to understand what we actually gain from the syntax built to facilitate lazy recursion
2020-10-05 16:57:27 +0200 <Cheery> if you think about things such as html, how is it deconstructed or constructed?
2020-10-05 16:57:35 +0200cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-10-05 16:57:42 +0200 <Cheery> if you wanted to examine it from what it encodes usually.
2020-10-05 16:57:50 +0200 <fog23> idk! its top down evaluation right?
2020-10-05 16:58:08 +0200hnOsmium0001(uid453710@gateway/web/irccloud.com/x-lsiqjycknfirtsck)
2020-10-05 16:58:09 +0200 <fog23> we have more of an AST right? like a "lambda tree" or something
2020-10-05 16:58:52 +0200 <fog23> like *everything* is made by functional binding and dereferencing, with no top down evaluation at all
2020-10-05 16:59:00 +0200polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2020-10-05 16:59:06 +0200 <fog23> i guess thats the main difference between imperative and functional programming...
2020-10-05 16:59:33 +0200 <fog23> so i cant really see how you could speak of "producers/consumers" in HTML
2020-10-05 16:59:47 +0200 <dminuoso> Well, formally that's the difference between call-by-value and call-by-name/need
2020-10-05 17:00:01 +0200Guest4175(~luka@185.204.1.185) ()
2020-10-05 17:00:12 +0200 <fog23> to do with the top level let bindings?
2020-10-05 17:00:31 +0200 <fog23> i guess we do alot with precedence
2020-10-05 17:00:32 +0200 <dminuoso> Interestingly, in C++ the term "call-by-value" is grossly misunderstood, as people have introduced something called call-by-reference.
2020-10-05 17:00:42 +0200Kaivo(~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 265 seconds)
2020-10-05 17:00:43 +0200 <dminuoso> But that no longer is about evaluation semantics, but oh well.
2020-10-05 17:00:47 +0200ddellacosta(~dd@86.106.121.168)
2020-10-05 17:01:07 +0200 <fog23> whats the upshot of these 3 different things?
2020-10-05 17:01:32 +0200 <fog23> call by name/value/reference...
2020-10-05 17:01:38 +0200 <dminuoso> Well, call-by-value just means to evaluate an argument before you enter the function
2020-10-05 17:01:46 +0200 <dminuoso> call-by-need/name does not
2020-10-05 17:01:47 +0200 <Cheery> fog23: producer outputs the html. For example template generators or website backends, etc...
2020-10-05 17:01:50 +0200 <fog23> "enter a function" ?
2020-10-05 17:01:50 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 17:01:51 +0200 <dolio> I think they say 'pass' instead of 'call'.
2020-10-05 17:02:06 +0200alp(~alp@2a01:e0a:58b:4920:79a7:73ea:36f8:a1c9)
2020-10-05 17:02:09 +0200 <dminuoso> dolio: You'd lose on a google fight on this one.
2020-10-05 17:02:12 +0200 <Cheery> fog23: consumer is what reads and interprets html.
2020-10-05 17:02:13 +0200 <fog23> Cheery: why are you speaking about code generation though?
2020-10-05 17:02:34 +0200 <dminuoso> But you might be right that that's more common. Still, the phrase "call by reference" is used far too foten
2020-10-05 17:02:41 +0200 <Cheery> fog23: because if I want to describe a type, I'd like to describe it through how it's constructed and destroyed.
2020-10-05 17:02:46 +0200 <fog23> i still have no idea what they mean...
2020-10-05 17:02:54 +0200Kaivo(~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com)
2020-10-05 17:03:19 +0200 <fog23> Cheery: right, we have recursive datatypes, but thats no like, HTML
2020-10-05 17:03:20 +0200conal(~conal@64.71.133.70)
2020-10-05 17:03:26 +0200jespada(~jespada@90.254.246.48) (Ping timeout: 256 seconds)
2020-10-05 17:04:07 +0200 <dolio> dminuoso: Well, if they did say 'pass', it could be excused, at least. :)
2020-10-05 17:04:14 +0200 <dminuoso> dolio: https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference
2020-10-05 17:04:17 +0200 <dminuoso> There's an article entry even! :)
2020-10-05 17:04:29 +0200xerox_(~xerox@unaffiliated/xerox)
2020-10-05 17:04:45 +0200 <fog23> hmm, so its to do with making copies?
2020-10-05 17:04:51 +0200 <dolio> Well, you can't trust wikipedia.
2020-10-05 17:04:51 +0200 <fog23> so haskell we copy everything right?
2020-10-05 17:05:05 +0200 <fog23> thats just purity?
2020-10-05 17:05:07 +0200jespada(~jespada@90.254.246.48)
2020-10-05 17:05:17 +0200 <fog23> i guess its since we hide the memory access
2020-10-05 17:05:38 +0200 <fog23> though Mutable vectors and mutable variables in ST or IO kind of get round that.
2020-10-05 17:05:44 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl)
2020-10-05 17:06:08 +0200 <dminuoso> fog23: My point is just, evaluation wise, there's call-by-value, call-by-need/name, call-by-future, perhaps Im forgetting something more exotic here. What's called "call-by-reference" is about copying/referencing. But that's not about evaluation.
2020-10-05 17:06:35 +0200 <fog23> seems basically like its "calling a method with an input variable, can change that variable, even if it is not returned as an output"
2020-10-05 17:07:08 +0200 <fog23> no wonder they have so much bugs
2020-10-05 17:07:10 +0200 <dminuoso> Well if we dig deep into C++, then reference have so much subtleties to them
2020-10-05 17:07:19 +0200 <dminuoso> It's very very complicated.
2020-10-05 17:07:31 +0200 <fog23> no i really dont care
2020-10-05 17:07:54 +0200 <fog23> this brief foray into c# was not something i wnat to do again in a hurry
2020-10-05 17:08:09 +0200 <fog23> it just left me completely dismayed at the state of reality
2020-10-05 17:08:35 +0200 <fog23> what a sad state the world is in - with all of these primitive evaluation strategies
2020-10-05 17:08:47 +0200 <fog23> but that industry would *enforce* them - ey gads
2020-10-05 17:09:08 +0200 <fog23> "you should learn our idom - then we will pay you". seems like some kind of cooked nepotism
2020-10-05 17:09:15 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2020-10-05 17:09:16 +0200 <fog23> crooked*
2020-10-05 17:09:35 +0200 <fog23> idiom*
2020-10-05 17:11:45 +0200otulp(~otulp@31.45.116.219)
2020-10-05 17:13:48 +0200 <fog23> oh, speaking of linked lists. can you have a doubly linked tree?
2020-10-05 17:14:03 +0200 <dolio> Yes.
2020-10-05 17:14:10 +0200 <fog23> if so there might be a way to have "upwards facing branches"
2020-10-05 17:14:15 +0200 <fog23> does that sound possible?
2020-10-05 17:14:33 +0200 <fog23> like, if you refer to the branches above as well as the branches below, because of the double link
2020-10-05 17:15:02 +0200 <fog23> so then you could put a *different* upper part of the tree as an upwards branch
2020-10-05 17:15:13 +0200jiribenes_(~Thunderbi@2a02:8308:101:f100:18b2:1950:2975:8c11)
2020-10-05 17:16:23 +0200 <fog23> or something like a "highway" reference, to a lower portion of the tree - though thats not a "doubly linked" idea. more like double link -> upwards reference -> multiple upwards references -> referring to "elsewhere upwards" -> refereeing to "elsewhere downwards"
2020-10-05 17:16:37 +0200conal(~conal@64.71.133.70) (Ping timeout: 256 seconds)
2020-10-05 17:16:43 +0200 <fog23> or is that completely impossible
2020-10-05 17:16:51 +0200 <fog23> what would be difficult about that?
2020-10-05 17:16:54 +0200jiribenes_(~Thunderbi@2a02:8308:101:f100:18b2:1950:2975:8c11) (Client Quit)
2020-10-05 17:18:58 +0200hackageprolude 0.0.0.1 - ITProTV's custom prelude https://hackage.haskell.org/package/prolude-0.0.0.1 (saramuse)
2020-10-05 17:19:10 +0200xff0x(~fox@2001:1a81:5300:fe00:1175:d8f5:8ada:f855) (Ping timeout: 244 seconds)
2020-10-05 17:19:30 +0200zacts(~zacts@dragora/developer/zacts)
2020-10-05 17:19:42 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-10-05 17:20:28 +0200xff0x(~fox@2001:1a81:5300:fe00:1175:d8f5:8ada:f855)
2020-10-05 17:20:42 +0200 <fog23> dolio: how would you write a doubly linked tree?
2020-10-05 17:21:28 +0200conal(~conal@64.71.133.70)
2020-10-05 17:21:30 +0200mav1(~mav@p5dd5a8a0.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-10-05 17:22:11 +0200 <dolio> Just like a doubly linked list, except it's a tree. You have parent pointers in addition to child pointers.
2020-10-05 17:23:00 +0200zacts(~zacts@dragora/developer/zacts) (Client Quit)
2020-10-05 17:23:15 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 17:23:18 +0200 <fog23> pointers!?
2020-10-05 17:23:40 +0200 <fog23> Tree = Free Nonempty
2020-10-05 17:23:44 +0200 <fog23> thats pretty easy
2020-10-05 17:23:45 +0200 <dolio> Doubly-linked stuff usually only works out well with pointers.
2020-10-05 17:23:56 +0200 <fog23> rrg
2020-10-05 17:24:01 +0200 <fog23> i dont understand
2020-10-05 17:24:08 +0200 <fog23> where are the pointers in the regular tree?
2020-10-05 17:24:11 +0200zacts(~zacts@dragora/developer/zacts)
2020-10-05 17:24:16 +0200 <fog23> the lower branches?
2020-10-05 17:24:17 +0200knupfer(~Thunderbi@87.123.206.236)
2020-10-05 17:24:19 +0200 <dolio> Yes.
2020-10-05 17:24:25 +0200 <fog23> why are you calling them pointers?
2020-10-05 17:25:00 +0200 <fog23> DBLTree = Free (\a -> Nonempty a, Nonempty a)
2020-10-05 17:25:01 +0200 <fog23> ?
2020-10-05 17:25:08 +0200 <fog23> erm
2020-10-05 17:25:18 +0200 <fog23> DBLTree = Free (\a -> (Nonempty a, Nonempty a) )
2020-10-05 17:25:35 +0200 <fog23> thats like, branches below and branches above
2020-10-05 17:25:46 +0200 <fog23> oh, i guess it would be just *a* branch above
2020-10-05 17:26:01 +0200 <fog23> DBLTree = Free (\a -> (a, Nonempty a) )
2020-10-05 17:26:33 +0200 <sm[m]> I use a doubly linked tree, using laziness to tie the knot
2020-10-05 17:26:37 +0200 <fog23> (that `a' is going to be replaced by DBLTree a by Free)
2020-10-05 17:26:55 +0200 <fog23> sm[m] can you paste that?
2020-10-05 17:27:06 +0200 <sm[m]> (not a literal tree but a tree-shaped set of ADTs)
2020-10-05 17:27:37 +0200kritzefitz(~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-10-05 17:27:43 +0200 <fog23> but is that DBLTree written using Free correct?
2020-10-05 17:28:54 +0200 <fog23> oh right, there is nothing intrinsicly built into the "data" syntax that allows the upper refference to be passed into the reference below
2020-10-05 17:29:04 +0200 <fog23> might be a pretty cool functional language that could do that!
2020-10-05 17:29:33 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 17:29:50 +0200 <fog23> i cnt get my head round how to do the several upwards pointing branches
2020-10-05 17:29:51 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 17:29:51 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 17:29:51 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 17:29:58 +0200sethetter__(sid17895@gateway/web/irccloud.com/x-igokhppslfuoizhb) (Quit: Updating details, brb)
2020-10-05 17:30:12 +0200sethetter(sid17895@gateway/web/irccloud.com/x-dfvcqfcbhnjlhxfv)
2020-10-05 17:30:20 +0200 <sm[m]> fog23: https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Account.hs#L93 is one place
2020-10-05 17:31:12 +0200 <fog23> i guess, the lower branches are like, by default "tree shaped" and there is no ambiguity - but just putting the extra list of beanches, where these are *supposed* to refer upwards - is not actually something thats built in using the GADT syntax
2020-10-05 17:31:27 +0200 <fog23> so it kind of feels, incomplete
2020-10-05 17:32:28 +0200sethetter(sid17895@gateway/web/irccloud.com/x-dfvcqfcbhnjlhxfv) ()
2020-10-05 17:33:28 +0200 <fog23> sm[m] ah, so there is nothing intrinsic about the record that makes it a parent until you use that knot tying function
2020-10-05 17:33:38 +0200 <fog23> i guess thats what makes it "complete"
2020-10-05 17:34:05 +0200 <fog23> but this feels so clumsy, like, that the GADT is only actually specified correctly based on the function that ties the knot
2020-10-05 17:34:29 +0200 <fog23> while, if there is no knot tying, then the lower branches are exactly that, just by construction
2020-10-05 17:35:37 +0200 <fog23> well, i guess that means Free (\a -> (Nonempty a,Nonempty a)) *is* a valid way to do the "upwards branches"
2020-10-05 17:35:46 +0200 <fog23> and i just need to do the knot typing function for it
2020-10-05 17:36:17 +0200 <fog23> so how does this work, you pass in Nothing... and then...
2020-10-05 17:36:56 +0200 <fog23> that acts as the parent of the top node
2020-10-05 17:37:15 +0200 <fog23> and then it recurses, and has a node above to pass in for all the lower branches, that seems easy enough
2020-10-05 17:37:35 +0200 <fog23> i guess it becomes more difficult when there is this, having to tie various different upper nodes
2020-10-05 17:37:52 +0200 <fog23> there would have to be some way of directing which upper nodes were supposed to be referenced
2020-10-05 17:37:54 +0200 <sm[m]> fog23: good question.. this seems to accept a tree of Account, and recurses through tying the knot for each one to its parent
2020-10-05 17:38:07 +0200 <sm[m]> https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Transaction.hs#L563 is a simpler example
2020-10-05 17:38:51 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 17:39:25 +0200chaosmasttter(~chaosmast@p200300c4a73b2e0100f3c5a701cd6e56.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 17:39:58 +0200 <fog23> sm[m]: i dont see a recursive call to txnTieKnot, so im guessing its not a tree, or recursive datatype
2020-10-05 17:40:08 +0200jiribenes_(~jiribenes@rosa.jiribenes.com)
2020-10-05 17:40:09 +0200gambpang(~gambpang@unaffiliated/gambpang) (Quit: ZNC 1.6.3+deb1+xenial0 - http://znc.in)
2020-10-05 17:40:09 +0200wraithm_(~wraithm@unaffiliated/wraithm) (Quit: ZNC 1.6.3+deb1+xenial0 - http://znc.in)
2020-10-05 17:40:24 +0200 <fog23> ah, right, so its to do with "descending" into the tree, by recursive calls
2020-10-05 17:40:32 +0200 <sm[m]> right, txnTieKnot just ties the knot for the postings of a single transaction
2020-10-05 17:40:36 +0200 <fog23> then you always have the current node to pass in for the upper reference
2020-10-05 17:41:01 +0200jiribenesGuest77330
2020-10-05 17:41:01 +0200Guest77330(jbjiribene@gateway/shell/matrix.org/x-vhnsqdmfgjajakfv) (Killed (egan.freenode.net (Nickname regained by services)))
2020-10-05 17:41:01 +0200jiribenes_jiribenes
2020-10-05 17:41:03 +0200 <fog23> so that typing many knots would be more difficult, since you cant just use the current position
2020-10-05 17:41:08 +0200Guest77330(jbjiribene@gateway/shell/matrix.org/x-klbutzrslfjoiooq)
2020-10-05 17:41:08 +0200 <fog23> typing*
2020-10-05 17:41:08 +0200 <sm[m]> data types: https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs#L490, https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs#L332
2020-10-05 17:41:14 +0200gambpang(~gambpang@unaffiliated/gambpang)
2020-10-05 17:41:48 +0200invaser(~Thunderbi@31.148.23.125) ()
2020-10-05 17:41:55 +0200gambpang(~gambpang@unaffiliated/gambpang) (Client Quit)
2020-10-05 17:42:26 +0200 <fog23> ah, ok, so Account contains reference to [Account] as one of its records, but Transaction has no reference to Transaction at all, so its not a recursive datatype
2020-10-05 17:42:40 +0200jiribenes(~jiribenes@rosa.jiribenes.com) (Client Quit)
2020-10-05 17:42:41 +0200gambpang(~gambpang@unaffiliated/gambpang)
2020-10-05 17:42:56 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-05 17:43:05 +0200 <fog23> unless one of its records refers to Account
2020-10-05 17:43:10 +0200 <fog23> Transation*
2020-10-05 17:43:14 +0200 <fog23> which i guess it must...
2020-10-05 17:43:37 +0200lpy(~lpyfist@unaffiliated/elysian) (Quit: lpy)
2020-10-05 17:44:13 +0200 <fog23> ah yes, its Posting https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs#L285
2020-10-05 17:44:18 +0200 <fog23> that has a maybe Transaction
2020-10-05 17:44:21 +0200 <sm[m]> Transaction refers to Posting which refers back to Transaction, this one is a tree of two types.. yep
2020-10-05 17:44:27 +0200 <fog23> ok, this all seems quite straitforwards
2020-10-05 17:44:56 +0200 <fog23> but again, this is a natural recursive function
2020-10-05 17:45:00 +0200jiribenes(~jiribenes@rosa.jiribenes.com)
2020-10-05 17:45:03 +0200 <sm[m]> that's haskell for you.. no big drama :)
2020-10-05 17:45:11 +0200wraithm(~wraithm@unaffiliated/wraithm)
2020-10-05 17:45:20 +0200 <fog23> and the "order of visitation" intrinsic, means it always has the think needed to tie the knot
2020-10-05 17:45:58 +0200 <fog23> but if im trying to tie the knot on several upwards pointing branches - then i dont have those values available while descending by recusing
2020-10-05 17:46:19 +0200 <fog23> thing*
2020-10-05 17:46:23 +0200 <sm[m]> you could pass them down as you build the tree ?
2020-10-05 17:46:36 +0200 <fog23> you mean, pass them up?
2020-10-05 17:46:44 +0200 <sm[m]> (but that wouldn't be called a tree, right ? dunno)
2020-10-05 17:46:52 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 17:46:53 +0200 <fog23> well its a cyclic tree
2020-10-05 17:47:11 +0200 <fog23> im not sure if there is need to distinguish which is the "natural" parent
2020-10-05 17:47:22 +0200 <fog23> or if all of the upper nodes are...
2020-10-05 17:47:48 +0200 <fog23> hmm, i guess only one of them actually has the branches below that contain the branch that is with the upwards knots
2020-10-05 17:47:53 +0200 <fog23> argh, so complicated
2020-10-05 17:47:59 +0200 <fog23> (no drama, yeah right)
2020-10-05 17:48:30 +0200 <fog23> or should all the nodes that can be refered to from some upwards knots - have these lower branches
2020-10-05 17:48:35 +0200r-gt(63f22acf@gateway/web/cgi-irc/kiwiirc.com/ip.99.242.42.207)
2020-10-05 17:48:38 +0200 <sm[m]> time for some prototyping !
2020-10-05 17:48:44 +0200 <fog23> then you would have several different paths having to have the same branches
2020-10-05 17:48:57 +0200 <fog23> sm[m] you cant understand the human words?
2020-10-05 17:49:04 +0200 <fog23> i dont think i can manage the types just yet
2020-10-05 17:49:09 +0200 <fog23> still total confusion
2020-10-05 17:49:15 +0200fraktor(~walt@129.93.191.18)
2020-10-05 17:49:32 +0200 <sm[m]> I don't want to think to hard here (and have to go), sometimes a little tinkering helps the thinking
2020-10-05 17:49:46 +0200GyroW(~GyroW@unaffiliated/gyrow) (Remote host closed the connection)
2020-10-05 17:49:50 +0200 <fog23> the main question - if i can manage to phrase it is;
2020-10-05 17:49:54 +0200 <fraktor> This might be a dumb question, but why isn't `map` defined as just `fmap` so that every monad can use `map`?
2020-10-05 17:50:03 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 17:50:03 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 17:50:03 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 17:50:20 +0200 <fog23> do the nodes have the same branches below
2020-10-05 17:50:24 +0200 <dolio> Because people in 1998 thought a map specialized to lists would be helpful.
2020-10-05 17:50:25 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de)
2020-10-05 17:50:34 +0200 <fog23> that would require copying right?
2020-10-05 17:50:41 +0200 <fog23> thats also something GADTs dont do
2020-10-05 17:50:48 +0200oisdk(~oisdk@2001:bb6:3329:d100:1dc8:afe3:52e4:27ba) (Quit: oisdk)
2020-10-05 17:50:52 +0200 <fog23> and then i just melt in despair
2020-10-05 17:50:58 +0200 <lortabac> dolio: to be honest I still think so
2020-10-05 17:51:52 +0200 <fog23> how can i ensure the downwardly referenced branches that are "common" between two paths, are references to the same thing?
2020-10-05 17:52:10 +0200 <fog23> i think i need imperative style reference by call value name or whatever it is
2020-10-05 17:52:20 +0200livvy(~livvy@gateway/tor-sasl/livvy)
2020-10-05 17:52:38 +0200 <fraktor> dolio: I don't understand why that is. Was it an optimization thing?
2020-10-05 17:52:55 +0200 <dolio> No. Teaching, I think.
2020-10-05 17:53:07 +0200 <fog23> or nonlinear logic in GADT construction, or some other kind of unheard of language functionality
2020-10-05 17:53:15 +0200 <fog23> maybe i should just give up
2020-10-05 17:53:20 +0200Usurp(~Usurp@217.146.82.202)
2020-10-05 17:54:29 +0200 <dolio> There were multiple changes like that. (++) used to be mplus. List comperehensions were generalized to monads (which you can turn on in GHC again).
2020-10-05 17:54:49 +0200 <fog23> fraktor: turns out some languages *only* have lists. so that these were considered kind of fundamental constructions, traditionally, during language design. we have list comprehensions, also, because this is actually ubiquitous in mathematics also, with set builder notation using "lists" as the kind of natural container
2020-10-05 17:54:50 +0200conal(~conal@64.71.133.70)
2020-10-05 17:54:55 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 17:54:58 +0200raehik(~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
2020-10-05 17:55:38 +0200 <fog23> something something partial ordering - ranging over integers etc
2020-10-05 17:55:38 +0200 <dsal> lortabac: Why do you think map specialized to lists is a good idea?
2020-10-05 17:55:50 +0200 <fog23> total ordering*
2020-10-05 17:56:10 +0200 <fog23> its Enum right?
2020-10-05 17:56:12 +0200 <fog23> > [1..3]
2020-10-05 17:56:15 +0200 <lambdabot> [1,2,3]
2020-10-05 17:56:45 +0200 <fog23> so thats the fundamental structure of a ring
2020-10-05 17:56:52 +0200 <lortabac> dsal: because I don't want to use overloading when I don't need it
2020-10-05 17:56:57 +0200 <fog23> or, a ring without multiplication, whatever that is
2020-10-05 17:57:04 +0200 <fog23> a monoid i guess
2020-10-05 17:57:12 +0200 <dsal> > fmap succ [1..4]
2020-10-05 17:57:15 +0200 <lambdabot> [2,3,4,5]
2020-10-05 17:57:27 +0200 <dsal> lortabac: if map were fmap, it'd just work.
2020-10-05 17:57:35 +0200 <fog23> hmm, i guess you need a unit as well as an identity to get enum
2020-10-05 17:57:45 +0200 <fog23> Enum = Monoid + Unit
2020-10-05 17:57:48 +0200motherfsck(~motherfsc@unaffiliated/motherfsck)
2020-10-05 17:57:54 +0200 <fog23> and then thats naturally "list like"
2020-10-05 17:58:22 +0200 <fog23> and since things like the integers are like that, we basically have lists everywhere we have monoids, which is everywhere we have things like (+)
2020-10-05 17:58:31 +0200 <fog23> which is basically everywhere!
2020-10-05 17:58:40 +0200 <fog23> so yeah, lists are kind of totally fundamental
2020-10-05 17:58:48 +0200 <sm[m]> but error messages would be more confusing making the language harder for learners, right
2020-10-05 17:58:50 +0200 <tdammers> geez, it's much simpler
2020-10-05 17:59:13 +0200 <tdammers> lists are concrete enough that someone new to the language and FP in general can grasp the concept and understand `map`
2020-10-05 17:59:28 +0200 <fog23> thats not why they are ubiquitous in maths though
2020-10-05 17:59:33 +0200 <tdammers> just like natural numbers are concrete enough that someone new to basic algebra can grasp the concept of a binary operation such as addition
2020-10-05 17:59:53 +0200 <fog23> and its because of *that*, which makes haskell good for learning
2020-10-05 17:59:55 +0200sQVe(~sQVe@unaffiliated/sqve) (Ping timeout: 240 seconds)
2020-10-05 18:00:01 +0200 <fog23> precisely because of []
2020-10-05 18:00:31 +0200Rudd0(~Rudd0@185.189.115.103)
2020-10-05 18:00:35 +0200 <tdammers> you can probably say that enough things are list-like to make lists a good concept to have
2020-10-05 18:00:59 +0200 <fog23> thats why, similar to matlab, haskell is considered as a more naturally mathmatical syntax - so better for math/sci majors
2020-10-05 18:01:04 +0200 <sm[m]> agreed!
2020-10-05 18:01:16 +0200 <fog23> but then so are trees
2020-10-05 18:01:16 +0200 <sm[m]> (tdammers)
2020-10-05 18:01:22 +0200 <fog23> (obvs)
2020-10-05 18:01:28 +0200hackageboilerplate 0.0.1 - Generate Haskell boilerplate. https://hackage.haskell.org/package/boilerplate-0.0.1 (tseenshe)
2020-10-05 18:01:49 +0200 <fog23> and so are graphs! but as far as i can tell no language yet supports their representation
2020-10-05 18:01:56 +0200 <lortabac> :t fmap succ
2020-10-05 18:01:58 +0200tzh(~tzh@2601:448:c500:5300::143b)
2020-10-05 18:01:58 +0200 <lambdabot> (Functor f, Enum b) => f b -> f b
2020-10-05 18:02:01 +0200 <lortabac> :t map succ
2020-10-05 18:02:04 +0200 <lambdabot> Enum b => [b] -> [b]
2020-10-05 18:02:31 +0200 <fog23> and if we follow, turing tape -> basic (with goto) -> imperative (without goto) -> functional (without top down evaluation)
2020-10-05 18:02:32 +0200itai33[m](itai33matr@gateway/shell/matrix.org/x-kkpfrvjedmohzgix) (Quit: Idle for 30+ days)
2020-10-05 18:02:34 +0200phaul(~phaul@ruby/staff/phaul) (Ping timeout: 244 seconds)
2020-10-05 18:02:42 +0200 <fog23> where function referencing is naturally graph like
2020-10-05 18:02:47 +0200 <fog23> erm, tree like
2020-10-05 18:02:48 +0200 <lortabac> dsal: the second one has a simpler signature
2020-10-05 18:03:00 +0200 <lortabac> and plays better with inference
2020-10-05 18:03:19 +0200 <tdammers> problem with trees, graphs and sets is that you typically have to decide on a subset of those that you want to be able to represent
2020-10-05 18:03:21 +0200 <dsal> lortabac: You could make that argument for everything you can do with functors, monads, monoids, traversables, foldables, etc...
2020-10-05 18:03:24 +0200 <fog23> then it seems like list -> tree -> graph, is the natural evolution of the structure of programs
2020-10-05 18:03:33 +0200 <fog23> so we need graphs to get graphical languages
2020-10-05 18:03:41 +0200 <fog23> (which i guess is why im working on graphs)
2020-10-05 18:03:48 +0200 <monochrom> dsal, I think I did make that argument with foldables :)
2020-10-05 18:04:10 +0200 <dsal> monochrom: I may have missed it.
2020-10-05 18:04:15 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 18:04:41 +0200 <fog23> well yeah, its possible to maintain the order of traversal during the algebraic construction of the graph
2020-10-05 18:04:49 +0200 <lortabac> dsal: IMHO overloading is useful when you want generic operations over all Functors, all Foldables etc.
2020-10-05 18:04:57 +0200GyroW(~GyroW@unaffiliated/gyrow) (Remote host closed the connection)
2020-10-05 18:05:02 +0200 <fog23> thats what the seti/geti "structured" traversal was all about
2020-10-05 18:05:03 +0200 <monochrom> If you show students "length :: [a] -> Int", it's very elementary and explainable with little background. If you show them "Foldable f => f a -> Int", there are like 2 or 3 new prerequisite concepts.
2020-10-05 18:05:16 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 18:05:16 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 18:05:16 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 18:05:24 +0200 <lortabac> dsal: if you know you are working with lists, why making your signature more ambiguous?
2020-10-05 18:05:35 +0200 <fog23> and then you show them cojoin for a graph
2020-10-05 18:05:40 +0200 <fog23> pointer...
2020-10-05 18:05:40 +0200 <monochrom> Well yeah, it's a long time ago, also I was not (and am not) very strongly convicted about it.
2020-10-05 18:06:07 +0200 <c_wraith> lortabac: If you're writing code that works correctly with more types than list, why not make it more polymorphic so that callers know the implementation space is more restricted?
2020-10-05 18:06:09 +0200 <monochrom> It is also true of Num, too.
2020-10-05 18:06:22 +0200 <Cheery> adding dependency "pandoc" and almost bursting in laughter
2020-10-05 18:06:24 +0200 <fog23> you get traverse_i, where `i' is a "structure directing index, which is a navigation to the pointer to take it to the "next" position
2020-10-05 18:06:37 +0200 <fog23> so that a carried copy of the future reference can be placed at the bridge locations
2020-10-05 18:06:39 +0200 <lortabac> c_wraith: I don't understand
2020-10-05 18:06:45 +0200 <monochrom> Sometimes I first tell the white lie "(+) :: Integer -> Integer -> Integer" and then later when the students are ready I'll explain type classes.
2020-10-05 18:07:33 +0200 <dsal> monochrom: I think that makes sense for the Foldable example as well. Things other than lists have length, but you can talk about just lists at first.
2020-10-05 18:08:10 +0200 <fog23> and then you explain about matricies and functions not supporting quotients - so that we need rings not groups for the extension to monoid most general to represent "polynomial functions"
2020-10-05 18:08:20 +0200 <Cheery> I'm also going to tell myself a white lie. I'm going to say that something like RelaxNG but on type level can be useful even if I didn't do it properly, and only to writeout stuff reliably.
2020-10-05 18:08:34 +0200 <monochrom> But here is a downside I don't know how to solve.
2020-10-05 18:08:53 +0200 <monochrom> Despite my white lies, error messages are going to leak the cold hard truth.
2020-10-05 18:09:14 +0200 <c_wraith> lortabac: the more polymorphic a type is, the fewer possible implementations it has. Making something more polymorphic often (not always) makes it clearer what it does, because the type eliminates more possible things that it could be doing.
2020-10-05 18:09:21 +0200 <monochrom> And 90% of the time it happens when one is not ready to explain or learn what the error message is saying.
2020-10-05 18:09:31 +0200 <fog23> yeah, how could you ensure that if you made a functional version of call by variable, that it wouldnt break purity
2020-10-05 18:09:50 +0200 <fog23> or is there a weaker version of purity where you could still make some guaranties
2020-10-05 18:09:55 +0200 <lortabac> c_wraith: fair point, but in my experience this is more often the case with parametric polymorphism than with ad-hoc polymorphism
2020-10-05 18:09:56 +0200 <monochrom> So this perpetuates people's bad habit of ignoring error messages.
2020-10-05 18:10:11 +0200 <dolio> I pretty much always use fmap for mapping over lists, and I have essentially 0 problems.
2020-10-05 18:10:14 +0200 <Cheery> monochrom: does your students have haskell-language-server on vscode?
2020-10-05 18:10:29 +0200 <Chousuke> monochrom: sounds like you need some kind of learn_prelude that swaps out the generic stuff with your dirty lies :)
2020-10-05 18:10:29 +0200 <monochrom> (Well, people see there is an error. People just disbelieve that the message content is informative.)
2020-10-05 18:10:32 +0200 <fog23> i cant believe that C# has "inheretence" to mean extensible records
2020-10-05 18:11:06 +0200mav1(~mav@i59F4E23A.versanet.de)
2020-10-05 18:11:15 +0200 <fog23> dolio: 0 problems is a side effect of not enough fun
2020-10-05 18:11:34 +0200LKoen(~LKoen@81.255.219.130)
2020-10-05 18:12:02 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-05 18:12:09 +0200conal(~conal@64.71.133.70) (Ping timeout: 256 seconds)
2020-10-05 18:12:33 +0200 <fog23> and then you combine erlang with go and haskell and get pure structure-concurrent graphical functional languages
2020-10-05 18:12:42 +0200jgt1(~jgt@78.26.168.236) (Ping timeout: 272 seconds)
2020-10-05 18:12:44 +0200 <c_wraith> monochrom: how terrible is the user experience of giving them an alternate Prelude to work with?
2020-10-05 18:12:54 +0200 <monochrom> I haven't tried.
2020-10-05 18:13:25 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-05 18:13:30 +0200 <fog23> c_wraith: about as terrible as most of the forms of pety-facism
2020-10-05 18:13:50 +0200 <fog23> ie, context dependent!
2020-10-05 18:14:00 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de)
2020-10-05 18:14:01 +0200da39a3ee5e6b4b0d(~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 18:14:05 +0200 <lortabac> dolio: it's not about problems, but more about better error messages and for example better inference when using typed holes to get the type of an intermediate expression
2020-10-05 18:15:15 +0200 <lortabac> replacing fmap with map has helped me more than once when I was stuck in dealing with complex data structures
2020-10-05 18:15:26 +0200 <fog23> yeah, its not a bad idea to make a synonym using TypeApplications for your common types
2020-10-05 18:15:26 +0200 <lortabac> of course YMMV
2020-10-05 18:15:33 +0200 <fog23> such as the "has" function
2020-10-05 18:15:33 +0200 <monochrom> Actually, empirically, I have been doing nothing to the dilemma, and the students survived just fine. :)
2020-10-05 18:15:52 +0200conal(~conal@172.255.125.158)
2020-10-05 18:16:27 +0200 <fog23> otherwise the type applications are optional, and you end up with (fmap . fmap . fmap) and its sometimes impossible to read which types they apply to
2020-10-05 18:16:54 +0200 <dsal> lortabac: But you're solving the problem for exactly one function on exactly one type. The problem exists both in other functions and other types.
2020-10-05 18:16:54 +0200 <fog23> explicit type applications would solve that, but they are optional, so the better practive is that of map
2020-10-05 18:17:31 +0200 <fog23> just make the synonym when you make the instance as a good style
2020-10-05 18:17:33 +0200 <monochrom> But as usual, whereas a more general type restricts implementation space, it relaxes usage space, and some usages are potential mistakes (the same reason we have occurs check and ban infinite types).
2020-10-05 18:17:41 +0200 <monochrom> @quote monochrom dialectic
2020-10-05 18:17:41 +0200 <lambdabot> monochrom says: Programming is a dialectic class struggle between the author and the user. My freedom is your slavery. Your ignorance is my strength.
2020-10-05 18:17:55 +0200urdh(~urdh@unaffiliated/urdh) (Ping timeout: 240 seconds)
2020-10-05 18:18:05 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 18:18:24 +0200 <fog23> or, equivalently good practice, use type applications as a form of code commenting
2020-10-05 18:18:37 +0200 <fog23> with the lesser number of synonyms
2020-10-05 18:18:39 +0200 <dsal> lambdabot: that monochrom dude is clever
2020-10-05 18:18:47 +0200knupfer1(~Thunderbi@200116b82cef8300c13273ee6919ca7e.dip.versatel-1u1.de)
2020-10-05 18:18:47 +0200knupfer1(~Thunderbi@200116b82cef8300c13273ee6919ca7e.dip.versatel-1u1.de) (Client Quit)
2020-10-05 18:18:53 +0200 <fog23> aka, map depreciated following since @
2020-10-05 18:18:54 +0200 <monochrom> :)
2020-10-05 18:18:58 +0200knupfer(~Thunderbi@87.123.206.236) (Quit: knupfer)
2020-10-05 18:19:36 +0200 <fog23> that Hegelian synergy
2020-10-05 18:19:38 +0200knupfer(~Thunderbi@200116b82cef830020ab55033e39ebbd.dip.versatel-1u1.de)
2020-10-05 18:19:42 +0200 <dsal> I'm not good at type applications, but that seems like a good way to get you there.
2020-10-05 18:19:53 +0200Falkeo(5631fd8b@ip-86-49-253-139.net.upcbroadband.cz) (Remote host closed the connection)
2020-10-05 18:20:00 +0200urdh(~urdh@unaffiliated/urdh)
2020-10-05 18:20:07 +0200 <fog23> ah, yeah, then you get plenty of foralls
2020-10-05 18:20:13 +0200 <dsal> :t fmap @([Int] -> [Int])
2020-10-05 18:20:15 +0200 <lambdabot> error:
2020-10-05 18:20:15 +0200 <lambdabot> Pattern syntax in expression context: fmap@(_)
2020-10-05 18:20:15 +0200 <lambdabot> Did you mean to enable TypeApplications?
2020-10-05 18:20:29 +0200 <fog23> % :t fmap @([Int] -> [Int])
2020-10-05 18:20:30 +0200 <yahb> fog23: ; <interactive>:1:8: error:; * Expected kind `* -> *', but `[Int] -> [Int]' has kind `*'; * In the type `([Int] -> [Int])'; In the expression: fmap @([Int] -> [Int])
2020-10-05 18:20:48 +0200 <fog23> % :t fmap @[] @Int
2020-10-05 18:20:48 +0200 <yahb> fog23: (Int -> b) -> [Int] -> [b]
2020-10-05 18:20:59 +0200 <fog23> % :t fmap @[] @Int @Int
2020-10-05 18:21:00 +0200 <yahb> fog23: (Int -> Int) -> [Int] -> [Int]
2020-10-05 18:21:05 +0200 <fog23> there you go
2020-10-05 18:21:07 +0200topos(~topos@138.197.1.46) (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in)
2020-10-05 18:21:17 +0200 <fog23> so map = fmap @[]
2020-10-05 18:21:28 +0200topos(uid467876@gateway/web/irccloud.com/x-twpqbqvekrcsozee)
2020-10-05 18:21:38 +0200 <fog23> i dont think the @a @b are required to see what the fmap is acting on
2020-10-05 18:22:07 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-05 18:22:17 +0200 <dsal> More importantly, you fix your error messages by, instead of replacing each function name to match what you think you're working with, just annotating it with what you think you're working with.
2020-10-05 18:22:24 +0200mpereira(~mpereira@2a02:810d:f40:d96:1c35:7f2e:59ff:953) (Remote host closed the connection)
2020-10-05 18:22:42 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2020-10-05 18:23:10 +0200 <dsal> % :t fmap @[]
2020-10-05 18:23:10 +0200 <yahb> dsal: (a -> b) -> [a] -> [b]
2020-10-05 18:23:22 +0200 <fog23> i guess its either, make synonyms everytime you write an instance. or, write type applications everywhere. or (the seemingly better way) make *some* synonyms, for the more common things, and use TypeApplications where otherwise your (fmap . fmap . fmap) would be unintelligable
2020-10-05 18:23:28 +0200 <dsal> % :t fmap succ
2020-10-05 18:23:28 +0200 <yahb> dsal: (Functor f, Enum b) => f b -> f b
2020-10-05 18:23:30 +0200 <dsal> % :t fmap @[] succ
2020-10-05 18:23:30 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 18:23:30 +0200 <yahb> dsal: Enum b => [b] -> [b]
2020-10-05 18:23:41 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 18:24:26 +0200 <fog23> dsal: right! so you can easily try several different versions, just depending on the type, instead of trying all different named synonyms
2020-10-05 18:24:27 +0200 <c_wraith> lortabac: yeah... with ad-hoc polymorphism, it depends on how big the class is. Num is almost too big to help. Monoid or Functor are vastly more informative than any concrete instance. Foldable... is right on the edge.
2020-10-05 18:24:53 +0200 <fog23> but then, this might not be the case for "has" where you would very rarely, *not* want the synonym named version
2020-10-05 18:25:08 +0200 <fog23> like, everytime you write a Has instance, you should make a synonym
2020-10-05 18:25:15 +0200 <fog23> (Has is basically coerce)
2020-10-05 18:25:45 +0200 <fog23> you wouldnt want the whole of your code being a bunch of has casts, and a myriad of type applications
2020-10-05 18:26:30 +0200 <fog23> but then you have to think of better synonym names than hasTypeATypeB
2020-10-05 18:26:50 +0200Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 258 seconds)
2020-10-05 18:26:57 +0200hackageservant-auth 0.4.0.0 - Authentication combinators for servant https://hackage.haskell.org/package/servant-auth-0.4.0.0 (domenkozar)
2020-10-05 18:27:07 +0200 <fog23> (your only really writing has instances where there is a natural choice for a unique coercion)
2020-10-05 18:27:17 +0200 <fog23> hmm
2020-10-05 18:27:26 +0200 <ski> monochrom : "But here is a downside I don't know how to solve.","Despite my white lies, error messages are going to leak the cold hard truth." -- in Racket, they have language levels, to deal with that
2020-10-05 18:27:31 +0200 <fog23> i remember having a "labled" or tagged has class aswell
2020-10-05 18:27:46 +0200 <dsal> racket-style language levels would be really neat.
2020-10-05 18:27:52 +0200 <fog23> so you could choose which of several has instance, by an extensible label
2020-10-05 18:27:59 +0200 <dsal> I like the idea of map when I know nothing at all, but I really dislike map today.
2020-10-05 18:28:05 +0200 <fog23> dont think you can use data families in instances though...
2020-10-05 18:28:20 +0200 <fog23> or if you do it has to use an equality constraint or something
2020-10-05 18:28:22 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 256 seconds)
2020-10-05 18:28:27 +0200 <fog23> it was very complicated to say the least
2020-10-05 18:29:13 +0200 <sm[m]> dsal: agreed on language levels!
2020-10-05 18:29:13 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-10-05 18:29:28 +0200 <sm[m]> as a start, we could at least define some
2020-10-05 18:29:33 +0200 <dsal> I'm glad we've finally solved this problem. See you guys at the next meeting.
2020-10-05 18:29:42 +0200 <fog23> bsically, i think i have to abandon haskell, because i cant express graphs
2020-10-05 18:29:50 +0200 <fog23> because GADTs cant have copying
2020-10-05 18:29:53 +0200 <fog23> or something
2020-10-05 18:29:56 +0200sm[m]assigns action time to dsal on the way out
2020-10-05 18:30:01 +0200 <sm[m]> ITEM
2020-10-05 18:30:18 +0200 <ski> there are a few graph libraries, i thought
2020-10-05 18:30:24 +0200 <fog23> no
2020-10-05 18:30:25 +0200 <fog23> like trees
2020-10-05 18:30:34 +0200 <fog23> they can be expressed using GADTs
2020-10-05 18:30:58 +0200 <fog23> graphs cant because several lower branches on different paths can refer to the same common lower branch
2020-10-05 18:31:09 +0200 <fog23> and i dont think there is a way to express that "copying"
2020-10-05 18:31:11 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 18:31:19 +0200 <ski> but no direct support for defining specialized kinds of graphs, akin to how `data' can be thought of as a way to define specialized kinds of trees
2020-10-05 18:31:37 +0200 <fog23> also we need some way to say things like "this record is reserved for knot typing"
2020-10-05 18:31:37 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-10-05 18:31:41 +0200 <fog23> tying*
2020-10-05 18:32:04 +0200 <ski> you could use some kind of references, to express that sharing (DAGs, i suppose you want ? or also allow cycles ?)
2020-10-05 18:32:38 +0200 <fog23> and also maybe some kind of linear types, like "this lower tree portion is referred to exactly once"
2020-10-05 18:33:23 +0200 <fog23> ski: what do you mean, i dont undertand how DAGs correponds to the sharing - and what are you asking about cycles?
2020-10-05 18:33:23 +0200 <ski> (dunno what you mean by "this record is reserved for knot tying")
2020-10-05 18:33:26 +0200balbirs(~balbirs__@bilbo.ozlabs.org)
2020-10-05 18:33:41 +0200 <ski> there are many different kinds of graphs, mathematically speaking
2020-10-05 18:33:59 +0200 <fog23> if i dont care about sharing/copying, then i can have a doubly linked tree as Free (\a -> (a,Nonempty a))
2020-10-05 18:34:16 +0200 <fog23> where the fst, the `a' - is "reserved for knot tying"
2020-10-05 18:34:56 +0200 <ski> you can have directed vs. undirected graphs (or even have both directed and undirected edges). you can allow self-edges (loops) or not. you can allow multiple parallel edges or not. you can adorn vertices, ior edges, with some extra associated information
2020-10-05 18:35:22 +0200 <fog23> without syntax to do that during the writing of the GADT, then this is not demanded of the user, and they must choose to write the knot typing function to actually construct the datatype properly
2020-10-05 18:35:42 +0200 <fog23> you cant "pass the upper reference into the lower constructors" during the writing of the GADT
2020-10-05 18:36:19 +0200 <ski> you can have graphs where the vertices come in several different kinds (which, say, determine which out-nodes they have, and possibly also determine in-nodes). and presumably also different kinds of edges
2020-10-05 18:36:41 +0200 <fog23> thats quite comprehensive
2020-10-05 18:37:03 +0200 <ski> (i still dunno what you mean by the "reserved for knot tying")
2020-10-05 18:37:03 +0200 <fog23> but, we have *none* of the tools to express these as datatypes
2020-10-05 18:37:38 +0200 <ski> yea, we have to do them, manually, as abstract data types .. it would be nice, if we could, somehow, express them more directly/explicitly
2020-10-05 18:37:42 +0200 <fog23> we were using this example before
2020-10-05 18:37:43 +0200 <fog23> https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Account.hs#L93
2020-10-05 18:37:43 +0200r-gt(63f22acf@gateway/web/cgi-irc/kiwiirc.com/ip.99.242.42.207) ()
2020-10-05 18:37:56 +0200 <fog23> as a "knot tying function"
2020-10-05 18:38:05 +0200 <fog23> this has to be done aswell as construction
2020-10-05 18:38:17 +0200sQVe(~sQVe@unaffiliated/sqve)
2020-10-05 18:38:18 +0200 <ski> "pass the upper reference into the lower constructors" is for ?
2020-10-05 18:38:28 +0200 <fog23> without those, there is no telling that the "parent" record, is actually a knot
2020-10-05 18:38:48 +0200 <fog23> ski: thats basically what typing the knot is all about - in the context of double linkage
2020-10-05 18:38:54 +0200 <ski> oh, you want parent links, in nodes
2020-10-05 18:38:58 +0200 <monochrom> dsal: I wonder if you also find this other quote related :)
2020-10-05 18:39:03 +0200 <monochrom> @quote monochrom Kripke
2020-10-05 18:39:04 +0200 <lambdabot> monochrom says: There are truths, damn truths, and Kripke structures.
2020-10-05 18:39:05 +0200 <fog23> but specifically, just for when the knot is tyed to the directly preceeding element
2020-10-05 18:39:33 +0200 <fog23> ski: parent links, in nodes, is *one* of the forms of knot tying we dont support by construction
2020-10-05 18:39:45 +0200 <fog23> we also dont have *several* knots, or knots extending far below
2020-10-05 18:39:50 +0200 <fog23> or above
2020-10-05 18:39:51 +0200 <monochrom> (So, Kripke structures formalize multiple worlds so you can have multiple different truths in different worlds.)
2020-10-05 18:40:13 +0200 <dolio> Kripke structures are just degenerate sheaves.
2020-10-05 18:40:21 +0200 <fog23> your a degenerate sheef
2020-10-05 18:40:22 +0200 <dolio> Presheaves, even.
2020-10-05 18:40:24 +0200 <ski> an alternative to parent links, is to use a zipper that reverses edges as you traverse them. but this doesn't work (at least directly), if you have cycles (other than the bidirectional edges)
2020-10-05 18:40:41 +0200 <fog23> monochrom is the second variety
2020-10-05 18:40:56 +0200 <ski> "we also dont have *several* knots, or knots extending far below or above" ?
2020-10-05 18:41:02 +0200 <ski> by "knots", you mean cycles ?
2020-10-05 18:41:13 +0200 <fog23> typing the knot establishes cycles
2020-10-05 18:41:19 +0200conal(~conal@172.255.125.158) (Quit: Computer has gone to sleep.)
2020-10-05 18:41:20 +0200 <fog23> a knot would be a cyclic reference, i think
2020-10-05 18:41:23 +0200 <ski> (s/sheef/sheaf/)
2020-10-05 18:41:59 +0200 <ski> monochrom : that's like, your truth, man
2020-10-05 18:42:09 +0200 <fog23> pinciple bundle section of the module of spectral hyperkhaler distributions
2020-10-05 18:42:45 +0200 <monochrom> But don't you like how it pairs up with "there are lies, damn lies, and statistics"? :)
2020-10-05 18:43:13 +0200 <fog23> cuspidal solitonic top forms in the harmonic fibration of differential topologies
2020-10-05 18:43:18 +0200 <ski> anyway, it's possible to use references to describe cycles. they can be compared for equality, so you can know when you're back again
2020-10-05 18:44:19 +0200 <monochrom> Ooohhh, immutable references to help with explicating cycles.
2020-10-05 18:44:19 +0200 <fog23> hodge arrows in the quiver monoid
2020-10-05 18:44:27 +0200 <nshepperd> knot tying is generally a bad idea except as an optimization
2020-10-05 18:45:27 +0200 <fog23> shepperd: oh contrare
2020-10-05 18:45:58 +0200 <fog23> im away to run counterwidishins around the bliths stone, avast to you
2020-10-05 18:46:00 +0200fog23(c1b057e2@gateway/web/cgi-irc/kiwiirc.com/ip.193.176.87.226) (Quit: Connection closed)
2020-10-05 18:46:13 +0200 <monochrom> Good riddance.
2020-10-05 18:46:25 +0200 <nshepperd> the knot tying that hledger does seems very silly to me
2020-10-05 18:46:32 +0200conal(~conal@64.71.133.70)
2020-10-05 18:46:40 +0200 <monochrom> What was all that about anyway?
2020-10-05 18:46:52 +0200tbreslein(~tbreslein@2a02:8108:140:44f8::3cc4) (Remote host closed the connection)
2020-10-05 18:47:17 +0200 <nshepperd> fog in his manic phase
2020-10-05 18:47:28 +0200 <c_wraith> I'm not sure anyone's ever known what they're talking about
2020-10-05 18:47:59 +0200coot(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl)
2020-10-05 18:49:04 +0200 <sm[m]> nshepperd: it probably is, but it has been working great since beginner-me concocted it
2020-10-05 18:49:38 +0200nineonin_(~nineonine@216-19-190-182.dyn.novuscom.net) (Remote host closed the connection)
2020-10-05 18:52:32 +0200 <ski> monochrom : yes, like `simple-ivar'
2020-10-05 18:53:33 +0200juliusdeane(~user@130.64.35.16)
2020-10-05 18:53:45 +0200mrbentarikau(~caubert@82.131.52.222.cable.starman.ee)
2020-10-05 18:54:09 +0200flatmap(~flatmap@p200300dd371bf60068aa0495bfcb4a49.dip0.t-ipconnect.de) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-05 18:55:07 +0200howdoi(uid224@gateway/web/irccloud.com/x-bfkecngtkcukjezu)
2020-10-05 18:55:21 +0200 <monochrom> ivar-simple
2020-10-05 18:55:56 +0200geekosaur(42d52102@66.213.33.2)
2020-10-05 18:57:56 +0200reppertj(~textual@pool-96-246-209-59.nycmny.fios.verizon.net) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-05 18:58:37 +0200mrbentarikau(~caubert@82.131.52.222.cable.starman.ee) (Remote host closed the connection)
2020-10-05 18:59:27 +0200hackagehakyll-alectryon 0.1.0.0 - Hakyll extension for rendering Coq code using Alectryon https://hackage.haskell.org/package/hakyll-alectryon-0.1.0.0 (lyxia)
2020-10-05 19:00:13 +0200nineonine(~nineonine@216.81.48.202)
2020-10-05 19:00:30 +0200oisdk(~oisdk@2001:bb6:3329:d100:2471:1ee3:650d:c8f7)
2020-10-05 19:00:36 +0200nineonine(~nineonine@216.81.48.202) (Read error: Connection reset by peer)
2020-10-05 19:00:36 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 19:00:47 +0200nineonine(~nineonine@216.81.48.202)
2020-10-05 19:00:49 +0200zoom(44beb1c9@068-190-177-201.res.spectrum.com)
2020-10-05 19:01:56 +0200zoom84(44beb1c9@068-190-177-201.res.spectrum.com)
2020-10-05 19:01:56 +0200Guest_83(d4ba09dc@212-186-9-220.cable.dynamic.surfer.at)
2020-10-05 19:02:14 +0200int-ewonders whether to worry about the ivar-simple reference.
2020-10-05 19:02:27 +0200Guest_83(d4ba09dc@212-186-9-220.cable.dynamic.surfer.at) (Remote host closed the connection)
2020-10-05 19:02:39 +0200caubert(~caubert@82.131.52.222.cable.starman.ee)
2020-10-05 19:03:11 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-05 19:03:17 +0200 <monochrom> It is mentioned for "immutable references to help with explicating cycles"
2020-10-05 19:03:34 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 19:04:35 +0200Guest_45(590fec7f@x590fec7f.dyn.telefonica.de)
2020-10-05 19:04:56 +0200sQVe(~sQVe@unaffiliated/sqve) (Quit: Bye!)
2020-10-05 19:05:16 +0200 <int-e> Not sure that it does anything about cycles... oh well. It still compiles with ghc-8.10, I'll stop worrying :)
2020-10-05 19:05:29 +0200zoom(44beb1c9@068-190-177-201.res.spectrum.com) (Ping timeout: 245 seconds)
2020-10-05 19:06:07 +0200borne(~fritjof@200116b86471bb007fe01feb1760d29e.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
2020-10-05 19:07:19 +0200 <monochrom> It has Eq so we can observe aliasing in pure functions.
2020-10-05 19:07:38 +0200juliusdeane(~user@130.64.35.16) ("ERC (IRC client for Emacs 26.3)")
2020-10-05 19:07:58 +0200 <zoom84> could really use some help understanding implementing functors for type constructors that take two params. I read through the learnyouhaskll example of the Either type and generally understand the notion of partially applying the typeclass via Functor (Either a) but I'm getting twisted in knots trying to understand how the class Functor translates
2020-10-05 19:07:58 +0200 <zoom84> to the implementation of Functor (MyEither a)
2020-10-05 19:08:21 +0200 <int-e> monochrom: Oh right. Heh... it's been so long.
2020-10-05 19:08:38 +0200 <zoom84> I created my own type to experiment:
2020-10-05 19:08:49 +0200 <zoom84> data MyEither a b = MyLeft a | MyRight b deriving(Show)
2020-10-05 19:08:58 +0200 <zoom84> instance Functor (MyEither a) where
2020-10-05 19:09:06 +0200 <zoom84> fmap f (MyRight b) = MyRight (f b)
2020-10-05 19:09:11 +0200 <ski> monochrom : er, right
2020-10-05 19:09:14 +0200 <zoom84> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:09:38 +0200 <ski> (it also has `read :: IVar a -> a')
2020-10-05 19:09:39 +0200 <monochrom> That's correct. What's the error message?
2020-10-05 19:10:05 +0200Guest18(567e8866@gateway/web/cgi-irc/kiwiirc.com/ip.86.126.136.102) (Quit: Connection closed)
2020-10-05 19:10:26 +0200 <zoom84> learnyouhaskell says the effective prototype would be would be : (b -> c) -> MyEither a b -> MyEither a c
2020-10-05 19:10:47 +0200 <ski> zoom84 : "generally understand the notion of partially applying the typeclass via Functor (Either a)" -- the type class (`Functor') isn't partially applied, it's the `data' type, `Either', that is
2020-10-05 19:11:23 +0200 <ski> yes, that's a correct type signature for `fmap' here
2020-10-05 19:11:26 +0200 <zoom84> I get the "MyEither a b" part, but I don't understand how the "c" var is introduced, for both b->c and My Either a c
2020-10-05 19:12:00 +0200 <monochrom> OK. Allow me to use the shorthand E to stand for "Either a".
2020-10-05 19:12:14 +0200 <monochrom> You expect (b->c) -> E b -> E c, no?
2020-10-05 19:12:23 +0200 <monochrom> Now expand E to Either a.
2020-10-05 19:12:49 +0200pfurla(~pfurla@104.192.219.186) (Quit: gone to sleep. ZZZzzz…)
2020-10-05 19:13:12 +0200 <monochrom> or s/Either/MyEither/g throughout
2020-10-05 19:13:15 +0200 <zoom84> why is it (b -> c) instead of (a->b)
2020-10-05 19:13:18 +0200 <ski> zoom84 : if you add the line `{-# LANGUAGE InstanceSigs #-}' to the top of your module, then you should be able to put the type signature `fmap :: (b -> c) -> MyEither a b -> MyEither a c' inside your `instance'
2020-10-05 19:13:23 +0200ericsagnes(~ericsagne@2405:6580:0:5100:953c:5f38:35fd:b3fd) (Ping timeout: 272 seconds)
2020-10-05 19:13:40 +0200 <zoom84> consdering fmap in the class is map :: (a -> b) -> f a -> f b
2020-10-05 19:13:43 +0200 <monochrom> "a" is already used up in "MyEither a". Gotta think up other variable names.
2020-10-05 19:13:54 +0200 <zoom84> ahh...
2020-10-05 19:14:02 +0200 <ski> zoom84 : the names of type variables doesn't really matter (as long as you use them consistently, within one context)
2020-10-05 19:14:05 +0200 <sim590> zoom84: it's the return type of your function that is applied to the right part of the MyEither type. Functor describes how to map a function onto elements in the type. The implementation of Functor for Either chooses to apply the map on the right side by convention. That's what you wrote with your example for MyEither. When f is applied on the `b` type, it becomes a ̀c`.
2020-10-05 19:14:20 +0200 <ski> saying
2020-10-05 19:14:24 +0200 <ski> class Functor f
2020-10-05 19:14:24 +0200 <zoom84> @monochrome, let me process that and see if it makes sense then...
2020-10-05 19:14:25 +0200 <lambdabot> Unknown command, try @list
2020-10-05 19:14:26 +0200 <ski> where
2020-10-05 19:14:32 +0200 <ski> fmap :: (a -> b) -> (f a -> f b)
2020-10-05 19:14:37 +0200 <ski> is the same thing, as saying
2020-10-05 19:14:39 +0200 <ski> class Functor f
2020-10-05 19:14:40 +0200 <ski> where
2020-10-05 19:14:41 +0200cosimone(~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: Quit.)
2020-10-05 19:14:45 +0200 <monochrom> For this reason I much prefer "(a -> b) -> Either x a -> Either x b" actually
2020-10-05 19:14:47 +0200 <ski> fmap :: (b -> c) -> (f b -> f c)
2020-10-05 19:15:06 +0200 <ski> iow, you can rename `a' and `b' to some other variable names here
2020-10-05 19:15:10 +0200dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Remote host closed the connection)
2020-10-05 19:15:33 +0200 <int-e> monochrom: Oh I see. The Eq instance wasn't my idea. "this change was suggested by nwf" -- probably on IRC and I don't know who it was, which is why there's no proper credit for it in the changelog.
2020-10-05 19:15:36 +0200 <ski> (but you can't rename the `f' in the signature here, without also renaming the `f' in the type class head `class Functor f')
2020-10-05 19:16:33 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-10-05 19:18:01 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 246 seconds)
2020-10-05 19:18:07 +0200Guest_45(590fec7f@x590fec7f.dyn.telefonica.de) (Remote host closed the connection)
2020-10-05 19:19:22 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net)
2020-10-05 19:19:31 +0200 <zoom84> i've read countless times how the placeholder variable names like 'a' and 'b' have no significance in the names selected but I still manage to get tripped up when single-letter placeholders like that are used for when integrating different vars in a single case like functor
2020-10-05 19:20:19 +0200 <zoom84> i carry over the original use of "a" and "b" when integrating into a different type signature which also uses it's own letters. it's a constant source of confusion for me
2020-10-05 19:20:48 +0200 <zoom84> maybe I should just start using more descriptive variable names and dropping the letters, even though the convention is to use letters
2020-10-05 19:21:18 +0200 <ski> after a while, you'll probably get more used to renaming tyvars, on a by-need basis ?
2020-10-05 19:21:25 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Ping timeout: 240 seconds)
2020-10-05 19:21:26 +0200 <lordcirth_> zoom84, descriptive names don't hurt
2020-10-05 19:21:37 +0200ggole(~ggole@2001:8003:8119:7200:18b6:6ff8:b669:283) (Ping timeout: 244 seconds)
2020-10-05 19:21:49 +0200 <ski> if they can sensibly be descriptive
2020-10-05 19:21:50 +0200 <hpc> the hard part is, for things that generic, what do you name them?
2020-10-05 19:21:54 +0200 <monochrom> descriptive names take forever to conjure, or forever to understand
2020-10-05 19:22:01 +0200 <ski> (and, i suspect, they can actually hurt, at times)
2020-10-05 19:22:13 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 19:22:29 +0200 <hpc> even the famously verbose java has the convention of "T" for type variables
2020-10-05 19:22:34 +0200 <ski> @type lookup
2020-10-05 19:22:35 +0200 <lambdabot> Eq a => a -> [(a, b)] -> Maybe b
2020-10-05 19:22:36 +0200 <ski> @type M.lookup
2020-10-05 19:22:37 +0200 <lambdabot> Ord k => k -> M.Map k a -> Maybe a
2020-10-05 19:22:42 +0200 <int-e> . o O ( Lens s t a b )
2020-10-05 19:22:45 +0200 <monochrom> The greatest hypocrisy of people bragging about descriptive names is they go on to give you foo, bar, quux.
2020-10-05 19:22:48 +0200 <ski> `k' here is reasonable, abbreviating "key"
2020-10-05 19:23:00 +0200 <zoom84> back to my original question now
2020-10-05 19:23:01 +0200 <monochrom> Proving that for generic things there is no such thing as descriptive names.
2020-10-05 19:23:23 +0200 <ski> spelling out `key',`token',`stream',&c. all the time, might make some type signatures long enough, that they're harder to comprehend, though
2020-10-05 19:23:27 +0200 <int-e> I'm really a fan of having the length (and hence "descriptiveness") of the name increase with its scope.
2020-10-05 19:23:37 +0200borne(~fritjof@200116b86471bb007fe01feb1760d29e.dip.versatel-1u1.de)
2020-10-05 19:23:41 +0200Lowl3v3l(~Lowl3v3l@dslb-090-186-188-115.090.186.pools.vodafone-ip.de) (Remote host closed the connection)
2020-10-05 19:23:44 +0200 <ski> yes, that's a good guideline
2020-10-05 19:24:01 +0200 <zoom84> instance Functor (MyEither a) where
2020-10-05 19:24:01 +0200Lowl3v3l(~Lowl3v3l@dslb-090-186-188-115.090.186.pools.vodafone-ip.de)
2020-10-05 19:24:06 +0200 <zoom84> fmap f (MyRight b) = MyRight (f b)
2020-10-05 19:24:13 +0200 <zoom84> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:24:41 +0200 <zoom84> so for my fmap instances, the "a" in Either a b is not available. Only the "b" is available, correct?
2020-10-05 19:25:11 +0200 <monochrom> Or you write "Either x" like I do, so a is available again.
2020-10-05 19:25:12 +0200 <dsal> Correct.
2020-10-05 19:25:18 +0200 <ski> zoom84 : which `Either a b' ?
2020-10-05 19:25:27 +0200 <zoom84> good. how then does MyLeft x work then? Since MyLeft uses "a"
2020-10-05 19:25:35 +0200 <ski> zoom84 : are you talking about the definition of the `data' type `Either' ?
2020-10-05 19:25:40 +0200ericsagnes(~ericsagne@2405:6580:0:5100:e0:d1d9:7c60:99ac)
2020-10-05 19:25:45 +0200 <int-e> :t fmap :: (b -> c) -> Either a b -> Either a c
2020-10-05 19:25:47 +0200 <lambdabot> (b -> c) -> Either a b -> Either a c
2020-10-05 19:25:50 +0200 <dolio> I think "correct" might be the wrong answer.
2020-10-05 19:26:05 +0200 <ski> zoom84 : the `b' in `MyRight b' has nothing to do with the `b' in `MyEither a b' or `MyEither x b'
2020-10-05 19:26:06 +0200 <int-e> That's the only possible Functor instance for Either.
2020-10-05 19:26:20 +0200 <zoom84> I created my own MyEither. It's the same as Either. I did it so I can experiment trying to learn this aspect. Either vs MyEither interchangeable
2020-10-05 19:26:23 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 19:27:17 +0200 <ski> zoom84 : yea, in `data MyEither a b = MyLeft a | MyRight b deriving Show', `a' and `b' are local names. they are not available outside this definition of `MyEither'
2020-10-05 19:27:22 +0200mananamenos_(~mananamen@vpn236-17.vpns.upv.es)
2020-10-05 19:27:56 +0200 <ski> if you wanted to, you could define it as `data MyEither coffee tea = MyLeft coffee | MyRight tea deriving Show', and it would not affect other code at all
2020-10-05 19:28:12 +0200bitmagie(~Thunderbi@200116b806da5f00187a54deb389527f.dip.versatel-1u1.de)
2020-10-05 19:28:16 +0200 <int-e> zoom84: note that you had to write `instance Functor (MyEither a) where`, with only the last type parameter left out; that's all Haskell can do.
2020-10-05 19:28:51 +0200 <int-e> (You could use a different variable name for that `a` though.)
2020-10-05 19:29:21 +0200 <ski> zoom84 : it's just a convention to start naming the parameters `a',`b',`c',..., unless there's some particular significance (rôle) one may want to hint, like `k' for "key", `t' for "token", `f' for "functor", &c.
2020-10-05 19:29:29 +0200 <zoom84> yeah, convention still tripping me up
2020-10-05 19:29:35 +0200 <int-e> . o O ( instance Functor (Either idontcarewhatthisisaslongasitsneitheranorb) where ... )
2020-10-05 19:29:44 +0200 <dsal> Oh, is it the variable name that is confusing?
2020-10-05 19:29:48 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Ping timeout: 244 seconds)
2020-10-05 19:30:06 +0200 <monochrom> I think it is the notion of dummy variables.
2020-10-05 19:30:10 +0200 <zoom84> rewriting my sample now with totally different names
2020-10-05 19:30:25 +0200bitmagie(~Thunderbi@200116b806da5f00187a54deb389527f.dip.versatel-1u1.de) (Client Quit)
2020-10-05 19:30:27 +0200alp(~alp@2a01:e0a:58b:4920:79a7:73ea:36f8:a1c9) (Ping timeout: 240 seconds)
2020-10-05 19:30:28 +0200 <zoom84> to make it obvious...i'll see if it clicks then
2020-10-05 19:30:51 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 258 seconds)
2020-10-05 19:30:57 +0200 <ski> zoom84 : it's also quite common, if you have say type variables `a',`b',`c' in a type signature, to also name corresponding values, in the definition, `a',`b',`c'. but one could instead name these `x',`y',`z' (so that we get `x :: a',`y :: b',`z :: c', which looks less confusing than `a :: a',`b :: b',`c :: c')
2020-10-05 19:31:10 +0200Buntspecht(~user@unaffiliated/siracusa)
2020-10-05 19:31:42 +0200 <ski> (or, if you have a list of values of type `a', it could commonly be called `as', so that you have `as :: [a]'. but you could instead call it `xs', so that you have `xs :: [a]')
2020-10-05 19:31:46 +0200 <zoom84> data MyEither dog cat = MyLeft dog | MyRight cat deriving(Show)
2020-10-05 19:31:53 +0200 <zoom84> instance Functor (MyEither doodad) where
2020-10-05 19:31:58 +0200 <zoom84> fmap f (MyRight x) = MyRight (f x)
2020-10-05 19:32:14 +0200 <zoom84> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:32:23 +0200mav1(~mav@i59F4E23A.versanet.de) (Ping timeout: 258 seconds)
2020-10-05 19:32:25 +0200 <ski> zoom84 : did you try my `InstanceSigs' suggestion from above ?
2020-10-05 19:32:56 +0200 <ski> try adding the line
2020-10-05 19:32:57 +0200 <ski> {-# LANGUAGE InstanceSigs #-}
2020-10-05 19:33:04 +0200 <ski> at the top of your source file
2020-10-05 19:33:14 +0200 <zoom84> if I do the following in ghci: fmap (*2) (MyLeft 10)
2020-10-05 19:33:15 +0200 <monochrom> Koodos for writing code to test your understanding
2020-10-05 19:33:24 +0200geekosaurhopes there was some indentation there, also
2020-10-05 19:33:39 +0200 <ski> then, just above the definition of `fmap' in your instance, you can write the type signature for `fmap' that you expect, for `MyEither'
2020-10-05 19:33:42 +0200is_null(~jpic@pdpc/supporter/professional/is-null)
2020-10-05 19:34:03 +0200 <ski> zoom84 : try `fmap (* 2) (MyLeft 10) :: MyEither Integer Bool'
2020-10-05 19:34:34 +0200 <zoom84> my original statement works
2020-10-05 19:34:42 +0200phaul(~phaul@ruby/staff/phaul)
2020-10-05 19:34:52 +0200 <zoom84> i'm trying to understand what that fmap instance actually receives
2020-10-05 19:34:54 +0200 <ski> hm, actually, say `fmap (* 2) (MyLeft 10) :: MyEither Integer Double'
2020-10-05 19:35:02 +0200 <monochrom> ski, there is ExtendedDefaulting to default to MyEither Integer () :)
2020-10-05 19:35:17 +0200 <ski> yea, i just recalled :)
2020-10-05 19:35:29 +0200fog(c1b057e2@gateway/web/cgi-irc/kiwiirc.com/ip.193.176.87.226)
2020-10-05 19:36:05 +0200 <fog> its not my fault! its election season - all the lobbying efforts and competing partisan spending distorts the fabric of reality
2020-10-05 19:36:50 +0200ChanServ+o monochrom
2020-10-05 19:36:55 +0200monochrom+b *!*@gateway/web/cgi-irc/kiwiirc.com/ip.193.176.87.226
2020-10-05 19:36:55 +0200fogmonochromfog
2020-10-05 19:37:34 +0200Guest_57(590fec7f@x590fec7f.dyn.telefonica.de)
2020-10-05 19:37:55 +0200 <zoom84> does this implicit type signature look about right: (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:38:05 +0200 <ski> no
2020-10-05 19:38:17 +0200 <ski> try writing
2020-10-05 19:38:22 +0200 <ski> fmap :: (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:38:28 +0200hackagefused-effects-mwc-random 0.1.0.0 - High-quality random number generation as an effect. https://hackage.haskell.org/package/fused-effects-mwc-random-0.1.0.0 (patrick_thomson)
2020-10-05 19:38:29 +0200 <ski> above your definition, and see how it complains
2020-10-05 19:38:37 +0200 <zoom84> not writing the signaturte
2020-10-05 19:38:47 +0200 <zoom84> trying to impute the equivalent
2020-10-05 19:38:58 +0200 <ski> you can check your understanding, by writing the signature that you expect
2020-10-05 19:39:12 +0200John20(~John@82.46.59.122) (Ping timeout: 256 seconds)
2020-10-05 19:39:26 +0200 <ski> where did `doodad' and `foobar' come from ?
2020-10-05 19:39:32 +0200 <ski> where did `a' and `b' come from ?
2020-10-05 19:39:55 +0200kritzefitz(~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
2020-10-05 19:39:57 +0200 <zoom84> where i can specify that signature?
2020-10-05 19:40:07 +0200 <ski> just above the definition of `fmap'
2020-10-05 19:40:40 +0200 <zoom84> The type signature for ‘fmap’ lacks an accompanying binding (The type signature must be given where ‘fmap’ is declared) |795 | fmap :: (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:41:10 +0200 <zoom84> fmap is in a library source file. you're saying i should put it there?
2020-10-05 19:41:34 +0200geekosauragain points to indentation
2020-10-05 19:42:08 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk) (Ping timeout: 260 seconds)
2020-10-05 19:42:18 +0200 <MarcelineVQ> This requires InstanceSigs
2020-10-05 19:42:32 +0200 <ski> (as was already mentioned, twice or thrice :)
2020-10-05 19:42:37 +0200klardotsh(~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net)
2020-10-05 19:42:48 +0200 <ski> at top of your source file :
2020-10-05 19:42:50 +0200 <ski> {-# LANGUAGE InstanceSigs #-}
2020-10-05 19:42:53 +0200 <ski> later :
2020-10-05 19:42:58 +0200 <ski> data MyEither dog cat = MyLeft dog
2020-10-05 19:43:02 +0200 <ski> | MyRight cat
2020-10-05 19:43:06 +0200 <ski> deriving Show
2020-10-05 19:43:15 +0200 <ski> instance Functor (MyEither doodad)
2020-10-05 19:43:16 +0200 <zoom84> sorry ski, missed that. it's hard to follow multiple threads of help at once. i'll at it
2020-10-05 19:43:23 +0200 <ski> where
2020-10-05 19:43:28 +0200 <ski> fmap :: (a -> b) -> (MyEither doodad foobar -> MyEither a b)
2020-10-05 19:43:32 +0200 <ski> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:43:36 +0200 <ski> fmap f (MyRight y) = MyRight (f y)
2020-10-05 19:43:45 +0200 <ski> zoom84 : like that ^
2020-10-05 19:44:21 +0200 <ski> zoom84 : "fmap is in a library source file. you're saying i should put it there?" -- yes, there is a general type signature of `fmap' in the type class declaration of `Functor', it looks like
2020-10-05 19:44:25 +0200 <ski> class Functor f
2020-10-05 19:44:27 +0200 <ski> where
2020-10-05 19:44:33 +0200 <ski> fmap :: (a -> b) -> (f a -> f b)
2020-10-05 19:45:22 +0200 <ski> however, when making an `instance' declaration, you can actually (if you enable the `InstanceSigs' language extension, as above) put the specific type signatures, for your instance, on the type class methods
2020-10-05 19:45:35 +0200tessier(~treed@kernel-panic/copilotco) (Ping timeout: 260 seconds)
2020-10-05 19:46:03 +0200ym555(~ym@41.42.210.219) (Ping timeout: 260 seconds)
2020-10-05 19:46:26 +0200 <ski> geekosaur : pretty sure they have relevant indentation in their source code :)
2020-10-05 19:46:55 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 240 seconds)
2020-10-05 19:46:58 +0200 <geekosaur> I'm not, because you get that error instead of "turn on InstanceSigs" if you didn't indent it.
2020-10-05 19:47:31 +0200 <geekosaur> and you don't get other errors you might think you would, it'd just be a local redeclaration which is legal
2020-10-05 19:47:52 +0200 <ski> ah, i missed that. perhaps they dedented, then, since from earlier discussion, it seemed the issue wasn't some error, but understanding the code in question
2020-10-05 19:47:57 +0200 <geekosaur> until you go to use it and it complains it's declared twice in the same scope, one in Prelude
2020-10-05 19:48:24 +0200vicfred(~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2020-10-05 19:48:31 +0200 <ski> zoom84 : yes, make sure the definition (and type signature) of `fmap' is actually indented more than the `instance Functor ..' line
2020-10-05 19:48:47 +0200 <zoom84> indent was ok. here's what I get:
2020-10-05 19:49:03 +0200 <zoom84> instance Functor (MyEither doodad) where
2020-10-05 19:49:09 +0200 <zoom84> fmap :: (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:49:29 +0200 <zoom84> fmap f (MyRight x) = MyRight (f x)
2020-10-05 19:49:42 +0200 <zoom84> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:49:43 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-05 19:49:50 +0200 <zoom84> • Couldn't match type ‘a’ with ‘doodad’ ‘a’ is a rigid type variable bound by the type signature for: fmap :: forall a b foobar. (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:50:09 +0200 <zoom84> that error is for the fmap f (MyLeft x) = MyLeft x line
2020-10-05 19:50:10 +0200 <ski> zoom84 : is there actually some (more) spaces in front of those last three lines you showed, in your source code ?
2020-10-05 19:50:24 +0200 <zoom84> spaces. don't know how to retain intent pasting into this web irc client
2020-10-05 19:50:30 +0200 <ski> zoom84 : yes, you get that error because your type signature is wrong (as mentioned before)
2020-10-05 19:50:44 +0200 <ski> it's ok, as long as they're there, in your code
2020-10-05 19:50:55 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-10-05 19:51:04 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 19:51:06 +0200 <zoom84> missed the correction in the cross-talk. what's the correct sig
2020-10-05 19:51:16 +0200Guest_57(590fec7f@x590fec7f.dyn.telefonica.de) (Remote host closed the connection)
2020-10-05 19:51:26 +0200 <ski> the point, i thought, was that you wanted to figure out the correct signature yourself ?
2020-10-05 19:51:40 +0200conal(~conal@64.71.133.70)
2020-10-05 19:51:56 +0200 <zoom84> i do
2020-10-05 19:52:04 +0200 <zoom84> why is the sig I wrote incorret
2020-10-05 19:52:23 +0200 <zoom84> ie, what's the correct sig
2020-10-05 19:52:29 +0200nievlo(bd801243@189.128.18.67)
2020-10-05 19:52:38 +0200tessier(~treed@kernel-panic/copilotco)
2020-10-05 19:52:48 +0200geekosaur(42d52102@66.213.33.2) (Remote host closed the connection)
2020-10-05 19:52:57 +0200 <ski> if you look at `fmap :: (a -> b) -> MyEither doodad foobar -> MyEither a b', and compare it with the definition equation `fmap f (MyLeft x) = MyLeft x', you can see that the first parameter,`f', gets type `a -> b', and the second parameter, `MyLeft x', gets type `MyEither doodat foobar', and that the result `MyLeft x' is to have type `MyEither a b'
2020-10-05 19:53:34 +0200 <ski> zoom84 : do you understand that part, matching up parameters and result, in a definition equation like `fmap f (MyLeft x) = MyLeft x', with the corresponding parameter types and result type, in the type signature ?
2020-10-05 19:53:54 +0200nievlo(bd801243@189.128.18.67) ()
2020-10-05 19:55:30 +0200bloodstalker(~bloodstal@46.166.187.154)
2020-10-05 19:55:32 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-05 19:56:20 +0200shatriff(~vitaliish@217.27.153.240)
2020-10-05 19:57:16 +0200 <zoom84> still working on it...
2020-10-05 19:57:29 +0200 <ski> zoom84 : a "yes" or "no" would be nice
2020-10-05 19:57:31 +0200 <zoom84> understand what you wrote ski...making changes to understand
2020-10-05 19:57:35 +0200 <ski> ok
2020-10-05 19:58:05 +0200alx741_(~alx741@186.178.110.22) (Ping timeout: 240 seconds)
2020-10-05 19:58:20 +0200 <zoom84> zoom, I understand. in isolation it makes sense, ie for simpler functions. in this context I get confused
2020-10-05 19:58:33 +0200 <ski> next step, it to actually check that the matching up of formal parameters (aka patterns) and result (expression), with the parameter and result types, actually makes sense
2020-10-05 19:58:48 +0200 <ski> so, let's think about that
2020-10-05 19:58:53 +0200 <ski> we know
2020-10-05 19:58:55 +0200 <zoom84> give me a sec..
2020-10-05 19:59:05 +0200 <ski> fmap :: (a -> b) -> MyEither doodad foobar -> MyEither a b
2020-10-05 19:59:06 +0200 <zoom84> can only work on one thought experiemnt at a time
2020-10-05 19:59:07 +0200 <ski> fmap f (MyLeft x) = MyLeft x
2020-10-05 19:59:32 +0200 <ski> and, from matching up parameters and result with corresponding types in signature, we get
2020-10-05 19:59:35 +0200 <ski> f :: a -> b
2020-10-05 19:59:42 +0200 <ski> MyLeft x :: MyEither doodad foobar
2020-10-05 19:59:48 +0200 <ski> MyLeft x :: MyEither a b
2020-10-05 20:00:02 +0200Usurp(~Usurp@217.146.82.202) ()
2020-10-05 20:00:22 +0200is_null(~jpic@pdpc/supporter/professional/is-null) (Ping timeout: 244 seconds)
2020-10-05 20:00:45 +0200oisdk(~oisdk@2001:bb6:3329:d100:2471:1ee3:650d:c8f7) (Quit: oisdk)
2020-10-05 20:00:54 +0200 <ski> (that's the same as i mentioned before, just spelled out a little more explicitly, using the `::' ("has type") notation)
2020-10-05 20:01:08 +0200skiwaits for zoom84
2020-10-05 20:01:42 +0200dyeplexer(~lol@unaffiliated/terpin) (Read error: Connection reset by peer)
2020-10-05 20:02:01 +0200 <monochrom> I wonder if it's helpful again to do my trick. By going "instance Functor (MyEither doodad)", you saying: in "(a -> b) -> f a -> f b" you're setting "f" to "MyEither doodad". So do that consistently and see what you get.
2020-10-05 20:02:26 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-05 20:04:34 +0200cohn(~noone@unaffiliated/cohn) ()
2020-10-05 20:06:03 +0200mananamenos_(~mananamen@vpn236-17.vpns.upv.es) (Ping timeout: 260 seconds)
2020-10-05 20:06:21 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-10-05 20:06:29 +0200 <zoom84> :r
2020-10-05 20:07:00 +0200 <ski> Ok, one module loaded.
2020-10-05 20:07:19 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 20:09:46 +0200 <zoom84> finally have a signature that correctly compiles...reading over to understand fully.
2020-10-05 20:09:48 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-umfptdbczzisdhag) (Quit: Connection closed for inactivity)
2020-10-05 20:09:50 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Quit: Leaving)
2020-10-05 20:09:55 +0200 <ski> ok
2020-10-05 20:10:28 +0200cohn(~noone@unaffiliated/cohn)
2020-10-05 20:10:55 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 240 seconds)
2020-10-05 20:11:28 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-05 20:11:51 +0200vicfred(~vicfred@unaffiliated/vicfred)
2020-10-05 20:13:21 +0200jiribenes(~jiribenes@rosa.jiribenes.com) (Read error: Connection reset by peer)
2020-10-05 20:13:38 +0200zacts(~zacts@dragora/developer/zacts) (Quit: leaving)
2020-10-05 20:15:49 +0200jiribenes(~jiribenes@rosa.jiribenes.com)
2020-10-05 20:18:39 +0200bloodsta1ker(~bloodstal@46.166.187.154)
2020-10-05 20:19:09 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk)
2020-10-05 20:19:53 +0200 <ski> zoom84 : do you understand it better, now ?
2020-10-05 20:20:15 +0200 <zoom84> yeah. there are multiple aspects that confused me. with the correct sig I'm working through them one at a time
2020-10-05 20:21:17 +0200 <ski> zoom84 : would you like to see how one could, manually, check the definition, given the type signature (continuing the line i started to get into, above) ?
2020-10-05 20:21:27 +0200bloodstalker(~bloodstal@46.166.187.154) (Ping timeout: 258 seconds)
2020-10-05 20:21:52 +0200 <zoom84> sure
2020-10-05 20:22:27 +0200hackagewai-extra 3.1.1 - Provides some basic WAI handlers and middleware. https://hackage.haskell.org/package/wai-extra-3.1.1 (MichaelSnoyman)
2020-10-05 20:22:29 +0200 <ski> continuing from the incorrect type signature above (so you can see why it doesn't work), or using your current, correct, type signature ?
2020-10-05 20:22:32 +0200chaosmasttter(~chaosmast@p200300c4a73b2e0100f3c5a701cd6e56.dip0.t-ipconnect.de)
2020-10-05 20:22:43 +0200 <zoom84> let's use my correct sig. here's what I have:
2020-10-05 20:22:43 +0200 <ski> (or both, if you want to)
2020-10-05 20:22:50 +0200 <zoom84> fmap :: (a -> b) -> MyEither doodad a -> MyEither doodad b
2020-10-05 20:22:54 +0200 <ski> ok
2020-10-05 20:23:06 +0200 <ski> so, comparing that with
2020-10-05 20:23:13 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-05 20:23:23 +0200 <ski> fmap f (MyLeft x) = MyLeft x
2020-10-05 20:23:24 +0200bloodsta1ker(~bloodstal@46.166.187.154) (Ping timeout: 256 seconds)
2020-10-05 20:23:35 +0200bloodstalker(~bloodstal@46.166.187.178)
2020-10-05 20:23:38 +0200 <ski> we can see that the formal parameters (the patterns) will get types
2020-10-05 20:23:42 +0200 <ski> f :: a -> b
2020-10-05 20:23:43 +0200 <frdg> is there a better way to turn a list into a set than using nub?
2020-10-05 20:23:58 +0200 <ski> MyLeft x :: MyEither doodad a
2020-10-05 20:24:10 +0200 <Cale> frdg: Data.Set.fromList
2020-10-05 20:24:12 +0200 <ski> and that the result expression then ought to have the type
2020-10-05 20:24:15 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-10-05 20:24:24 +0200 <ski> MyLeft x :: MyEither doodad b
2020-10-05 20:24:47 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de)
2020-10-05 20:24:48 +0200 <Cale> If you really want sets, might as well be using Data.Set -- it has more of the operations you probably want to perform on sets as well.
2020-10-05 20:25:03 +0200 <frdg> Cale: I am trying to write that module myself.
2020-10-05 20:25:24 +0200 <ski> zoom84 : so, the goal here is to take apart the formal parameters, the pattern, to get types for the variables in the pattern (here `f' and `x'), and then to check that the expected type for the result expression (sometimes called the "body" of the defining equation) is correct
2020-10-05 20:25:35 +0200inkbottle(~inkbottle@aaubervilliers-654-1-101-245.w86-212.abo.wanadoo.fr)
2020-10-05 20:25:43 +0200zebrag(~inkbottle@aaubervilliers-654-1-80-159.w86-212.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2020-10-05 20:25:49 +0200 <frdg> and I was going to use sets as lists that have been made sets.
2020-10-05 20:25:58 +0200hackagelists-flines 0.1.1.0 - Additional data and structures to some 'String'-related lists. https://hackage.haskell.org/package/lists-flines-0.1.1.0 (OleksandrZhabenko)
2020-10-05 20:25:59 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 20:26:07 +0200 <ski> @type S.toList . S.fromList
2020-10-05 20:26:09 +0200 <lambdabot> Ord a => [a] -> [a]
2020-10-05 20:26:13 +0200 <zoom84> ski, I kinda stumbled on that route by just closely reading the compiler error messages and matching the expected vs actual types
2020-10-05 20:26:30 +0200 <Cale> map head . group . sort -- this might also be of interest
2020-10-05 20:26:44 +0200 <zoom84> that let me cobble together the correct signature...from which I was able to finally connect the dots
2020-10-05 20:26:54 +0200 <zoom84> in terms of understanding all the params
2020-10-05 20:26:54 +0200 <frdg> ok thanks
2020-10-05 20:27:10 +0200 <Cale> > sort "mississippi"
2020-10-05 20:27:12 +0200 <lambdabot> "iiiimppssss"
2020-10-05 20:27:20 +0200 <Cale> > group . sort $ "mississippi"
2020-10-05 20:27:22 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 20:27:22 +0200 <lambdabot> ["iiii","m","pp","ssss"]
2020-10-05 20:27:26 +0200 <Cale> > map head . group . sort $ "mississippi"
2020-10-05 20:27:29 +0200 <lambdabot> "imps"
2020-10-05 20:27:35 +0200Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 260 seconds)
2020-10-05 20:27:36 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 20:27:36 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 20:27:36 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 20:27:38 +0200 <frdg> I see.
2020-10-05 20:27:44 +0200 <ski> zoom84 : ok. so we already know the type of `f'. but, given `MyLeft x :: MyEither doodad a', what will be the type of `x' ?
2020-10-05 20:27:56 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
2020-10-05 20:29:04 +0200 <zoom84> it will be 'b', correct?
2020-10-05 20:29:08 +0200 <ski> no
2020-10-05 20:29:25 +0200 <zoom84> it works as 'b' in my actual implementation
2020-10-05 20:29:34 +0200 <zoom84> err
2020-10-05 20:29:36 +0200 <zoom84> take that back
2020-10-05 20:30:14 +0200 <ski> perhaps, if you ask in the interactor, it will have renamed some type variables. i'm talking specifically about the naming that we picked above, not about some other naming
2020-10-05 20:30:15 +0200 <zoom84> MyLeft x works, which means it conforms to the return type sig of "MyEither doodad b"
2020-10-05 20:30:26 +0200roconnor(~roconnor@host-45-78-194-116.dyn.295.ca)
2020-10-05 20:30:39 +0200 <ski> fmap f (MyLeft x) = MyLeft x
2020-10-05 20:30:44 +0200 <zoom84> yep
2020-10-05 20:30:55 +0200 <zoom84> so you're asking what's the type of x?
2020-10-05 20:30:56 +0200 <ski> note that i'm talking, so far, only about the underlined pattern (formal parameter)
2020-10-05 20:30:59 +0200 <ski> yes
2020-10-05 20:31:19 +0200 <ski> we know
2020-10-05 20:31:21 +0200 <ski> MyLeft x :: MyEither doodad a
2020-10-05 20:31:23 +0200 <zoom84> well,(MyLeft x) is a destructuring
2020-10-05 20:31:29 +0200 <ski> so, we should be able to figure out
2020-10-05 20:31:31 +0200 <ski> x :: ???
2020-10-05 20:31:45 +0200 <ski> yes, it's pattern-matching
2020-10-05 20:31:55 +0200 <zoom84> and I'm passing a (MyLeft 10) in, as an example
2020-10-05 20:32:06 +0200 <zoom84> such as fmap (*2) (MyLeft 10)
2020-10-05 20:32:39 +0200 <zoom84> doodad is already bound by the partial application of My Either
2020-10-05 20:32:44 +0200 <zoom84> so doesn't x have to be a?
2020-10-05 20:32:55 +0200albert_99(~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-05 20:32:57 +0200 <ski> no
2020-10-05 20:32:59 +0200albert_91(~Albert@p200300e5ff0b5b4248a33bded2872db1.dip0.t-ipconnect.de)
2020-10-05 20:33:14 +0200 <ski> consider again your `data' type definition
2020-10-05 20:33:24 +0200 <ski> data MyEither dog cat = MyLeft dog
2020-10-05 20:33:25 +0200 <ski> | MyRight cat
2020-10-05 20:33:28 +0200 <ski> deriving Show
2020-10-05 20:33:30 +0200 <zoom84> you mean dog then?
2020-10-05 20:34:30 +0200 <ski> the `MyLeft dog' part here is a "template", it actually means that if (e.g.) `t' has type `dog', then `MyLeft t' will have type `MyEither dog cat'. and if `u' has type `cat', then `MyRight u' will (also) get type `MyEither dog cat'
2020-10-05 20:34:57 +0200 <ski> in your case, `dog' is `doodad', and `cat' is `a', since we're considering `MyLeft x :: MyEither doodad a'
2020-10-05 20:35:06 +0200 <ski> and, instead of `t', you have `x'
2020-10-05 20:35:55 +0200 <zoom84> so it's dog, correct
2020-10-05 20:35:58 +0200 <zoom84> ?
2020-10-05 20:36:01 +0200alp(~alp@2a01:e0a:58b:4920:84ce:b984:b792:c925)
2020-10-05 20:36:05 +0200 <ski> if we rename `dog',`cat',`t',`u' to `doodad',`a',`x',`y', then the above becomes
2020-10-05 20:36:46 +0200 <ski> the `MyLeft doodad' part here is a "template", it actually means that if (e.g.) `x' has type `doodad', then `MyLeft x' will have type `MyEither doodad a'. and if `y' has type `a', then `MyRight y' will (also) get type `MyEither doodad a'
2020-10-05 20:37:18 +0200 <ski> in other words, if it helps, we're imagining now that we actually had written
2020-10-05 20:37:33 +0200 <ski> data MyEither dogdad a = MyLeft doodad
2020-10-05 20:37:39 +0200 <ski> | MyRight a
2020-10-05 20:37:42 +0200 <ski> deriving Show
2020-10-05 20:38:47 +0200 <zoom84> ok
2020-10-05 20:38:48 +0200 <ski> so, in the current situation, with `fmap :: (a -> b) -> MyEither doodad a -> MyEither doodad b', and `MyLeft x :: MyEither doodad a' .. there is no `dog' (nor `cat'). so "so it's dog, correct ?" is wrong
2020-10-05 20:39:10 +0200 <zoom84> so the question posed to me is still, what's the type of x, right?
2020-10-05 20:39:12 +0200 <ski> you have to answer in terms of the available type variables, in the current situation, which are : `doodad',`a',`b'
2020-10-05 20:39:16 +0200 <ski> yes
2020-10-05 20:39:56 +0200 <zoom84> then i don't know. because I guess the entire vernacular of what's being referred to as a type confuses me
2020-10-05 20:40:04 +0200 <zoom84> based on my reading of haskell, the only type here is MyEither
2020-10-05 20:40:18 +0200 <zoom84> MyLeft and MyRight are constructors for that type
2020-10-05 20:40:34 +0200 <zoom84> but irrespective of whether an instance is MyRight or MyLeft, the type is still MyEither
2020-10-05 20:40:42 +0200 <ski> `MyEither' is a type, `MyEither doodad a' and `MyEither doodad b' are also types, as are `a -> b',`a',`b',`doodad' (all type variables are types)
2020-10-05 20:40:45 +0200 <zoom84> unless my understanding of what we're calling a type is wrong
2020-10-05 20:42:13 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 20:42:21 +0200 <ski> saying `MyLeft x :: MyEither doodad a' means that the (pattern / formal parameter) `MyLeft x' has type `MyEither doodad a'
2020-10-05 20:42:36 +0200 <ski> (so `MyEither doodad a' is a type. otherwise `MyLeft x' couldn't have it as type)
2020-10-05 20:43:11 +0200 <ski> what you're doing, when pattern-matching (which is a generalization of destructuring), is that you're going "backwards"
2020-10-05 20:43:18 +0200 <zoom84> you're saying MyEither doodad a is a type distinct from MyEither?
2020-10-05 20:43:28 +0200 <ski> yes
2020-10-05 20:43:39 +0200 <ski> `MyEither doodad a' is a "concrete" type
2020-10-05 20:43:46 +0200 <ski> it makes sense to say e.g
2020-10-05 20:43:55 +0200 <ski> MyLeft x :: MyEither doodad a
2020-10-05 20:44:15 +0200 <zoom84> yeah, that's another point of confusion for me. the fact that a parameterized var can be considered concrete
2020-10-05 20:44:19 +0200 <ski> "concrete" types are those types that are types of values
2020-10-05 20:44:29 +0200 <dolio> That seems like a bad name for them.
2020-10-05 20:44:35 +0200 <ski> "concrete" doesn't mean "specific"
2020-10-05 20:44:50 +0200 <ski> yea, sometimes people trip up over this distinction
2020-10-05 20:44:58 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it) (Ping timeout: 265 seconds)
2020-10-05 20:45:02 +0200 <zoom84> ok, good. because this was another point of confusion to me that feed into this
2020-10-05 20:45:15 +0200 <zoom84> so MyEither doodad a is concrete
2020-10-05 20:45:25 +0200 <ski> `doodad' and `a' are type variables. that mean that we don't have any specific types in mind (like `Int' or `[Bool]', ..), when we write them
2020-10-05 20:45:30 +0200 <zoom84> what does that make MyEither Int or MyEither String?
2020-10-05 20:45:38 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-10-05 20:45:59 +0200devalot(~ident@mail.pmade.com)
2020-10-05 20:46:25 +0200 <zoom84> is there a name for MyEither Int vs MyEither doodad...to help me grasp the nomenclature
2020-10-05 20:46:49 +0200 <ski> so, what we mean when we say that `MyEither doodad a' is a concrete type is actually : if we'd replace `doodad' and `a' with specific (concete) types, then the result of that replacement on `MyEither doodad a' will be a concrete type
2020-10-05 20:47:05 +0200 <zoom84> ok, understood on that point
2020-10-05 20:47:14 +0200 <zoom84> so it's a pathway to a concrete type
2020-10-05 20:47:20 +0200 <ski> e.g. since `Int' and `[Bool]' are specific (concrete) types, `MyEither Int [Bool]' is a concrete (specific) type
2020-10-05 20:47:51 +0200 <ski> however, it gets long-winded to all the time say that "if we replace the type variables with specific types, then .." part all the time
2020-10-05 20:48:25 +0200knupfer(~Thunderbi@200116b82cef830020ab55033e39ebbd.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
2020-10-05 20:48:27 +0200 <zoom84> ok, so what's an example of a non-concrete type in this specific context
2020-10-05 20:48:43 +0200 <ski> it's like when saying that `x + 1' is a number. we really mean here : if `x' is replaced by a number, then `x + 1' will become (an expression for) a number
2020-10-05 20:49:04 +0200 <ski> `MyEither' is not concrete
2020-10-05 20:49:09 +0200 <ski> it doesn't make sense to say
2020-10-05 20:49:14 +0200 <ski> blah :: MyEither
2020-10-05 20:49:31 +0200 <ski> `MyEither' is "incomplete" on its own, it's a "template" that's missing it's parameters
2020-10-05 20:49:32 +0200 <zoom84> ok, so MyEither is non-concrete because it doesn't establish which specific constructor would be referenced
2020-10-05 20:49:59 +0200 <ski> you have to say `MyEither T U', for some specific types `T' and `U', to get a concrete type
2020-10-05 20:50:01 +0200 <zoom84> but the constructors themselves are concrete because they have placeholders which lead to concrete types
2020-10-05 20:51:01 +0200 <ski> you have to distinguish between two different "levels". "value level" where values (including functions) live, and interact. and "type level" where types (including non-concrete types) live
2020-10-05 20:51:35 +0200 <ski> the data constructors `MyLeft' and `MyRight' live on the "value level". they are functions. we in fact have :
2020-10-05 20:51:41 +0200 <ghoulguy> ski: are you using "concrete" as a stand-in for "has kind *"?
2020-10-05 20:51:52 +0200 <ski> MyLeft :: dog -> MyEither dog cat
2020-10-05 20:51:59 +0200 <ski> MyRight :: cat -> MyEither dog cat
2020-10-05 20:52:05 +0200 <dolio> Yeah, I've never heard this terminology before.
2020-10-05 20:52:08 +0200oisdk(~oisdk@2001:bb6:3329:d100:189f:9172:61d6:2b9e)
2020-10-05 20:52:16 +0200 <ski> ghoulguy : almost. i'm also using it to gloss over unboxed stuff, &c.
2020-10-05 20:52:51 +0200 <ski> (which part of the terminology ?)
2020-10-05 20:53:19 +0200 <zoom84> i think i get it SKI. the abstractness here is what throws me off. In my C world view, haskell's "data" created types are what I would implement as unions in C, which a hidden enum field describing which of the type constructors were used. it's probably not useful for me to relate this to C
2020-10-05 20:53:27 +0200 <dolio> Using "concrete" in this way.
2020-10-05 20:53:48 +0200 <zoom84> but I'll table that C comparison because it's not useful
2020-10-05 20:54:16 +0200 <ski> zoom84 : in C, you can't really have "an array". it's always "an array of something". if you say you have an array, you really mean an array with elements of some particular type
2020-10-05 20:54:53 +0200 <ski> zoom84 : saying `blah :: MyEither' is like trying to say `blah' is an array (rather than an array of something)
2020-10-05 20:55:12 +0200is_null(~jpic@pdpc/supporter/professional/is-null)
2020-10-05 20:55:40 +0200 <hc> zoom84: actually that comparison if not bad... :)
2020-10-05 20:55:42 +0200 <ski> "array" is a parameterized type, in C. (as is "pointer", it's always "pointer to something"). in Haskell, you can define your own parameterized types
2020-10-05 20:56:27 +0200hackageuniqueness-periods-vector-examples 0.8.0.0 - Usage examples for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.8.0.0 (OleksandrZhabenko)
2020-10-05 20:57:07 +0200sep2(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net)
2020-10-05 20:57:16 +0200 <zoom84> data MyEither dog cat = MyLeft dog | Myright catstruct { enum { DOG, CAT } type; union { int dog; int cat; }}
2020-10-05 20:57:25 +0200 <dolio> I think "saturated" might be a better word.
2020-10-05 20:57:27 +0200hackageporpoise 0.1.0.0 - A minimalist HTTP server framework written on top of wai https://hackage.haskell.org/package/porpoise-0.1.0.0 (sgschlesinger)
2020-10-05 20:57:40 +0200Guest75545(~Fare@178.162.204.214)
2020-10-05 20:57:47 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 20:58:15 +0200 <zoom84> ok, so MyEither is a type. MyLeft is also considered a type, but a concrete one. is that recap correct?
2020-10-05 20:58:17 +0200 <monochrom> I think this is trying to explain kinds without explaining kinds.
2020-10-05 20:58:17 +0200 <hc> zoom84: sounds about right; but you'd need a parametrized macro to expand the doc and cat types
2020-10-05 20:58:21 +0200 <sep2> What would be the best way to even get started with this one, a one-liner or do a function for each instance being empty? https://dpaste.org/ZQ2h
2020-10-05 20:58:43 +0200 <dolio> monochrom: Well, yeah.
2020-10-05 20:58:45 +0200 <ski> zoom84 : anyway, `MyEither dog cat' is comparable to "array of `N' `int's" in C (which could be written `int[N]'). in both cases we have supplied (two) parameters
2020-10-05 20:58:53 +0200 <monochrom> But it is a really long story, I don't have a better suggestion.
2020-10-05 20:58:59 +0200Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
2020-10-05 20:59:08 +0200 <ski> zoom84 : not quite. `MyLeft' and `MyRight' are not types. they're values (specifically they're `data' constructors)
2020-10-05 20:59:19 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:bd24:9726:f60a:ba09) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 20:59:50 +0200 <ski> MyLeft :: dog -> MyEither dog cat
2020-10-05 20:59:51 +0200 <ski> MyRight :: cat -> MyEither dog cat
2020-10-05 20:59:53 +0200 <zoom84> Ok. MyEither is a type. MyLeft and MyRight are value constructors, which create concrete types of MyEither. is that right?
2020-10-05 20:59:54 +0200 <monochrom> Well, I have a prelim one I use in my class. I start with Maybe Int and [] Int and I say "now you can have a type class for the Maybe-ness without Int, the []-ness without Int".
2020-10-05 21:00:02 +0200 <hc> zoom84: that's right
2020-10-05 21:00:21 +0200 <zoom84> are they called value constructors or is the correct term, type constructors?
2020-10-05 21:00:21 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 21:00:52 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:8115:8d3a:8e30:e79f)
2020-10-05 21:00:55 +0200 <hc> This is a type constructor, because you get a type and not a value back
2020-10-05 21:01:01 +0200 <ghoulguy> constructor is a class of names, the capital first letter gives away that it's a constructor here
2020-10-05 21:01:39 +0200 <ski> zoom84 : `MyLeft' and `MyRight' are functions, like any other functions. you can apply them to an input (of the correct type, as always). the difference with ordinary functions are (a) you can pattern-match on them, "running them backwards"; (b) they don't actually do/compute anything, except storing their parameters so that you can later match and get them back
2020-10-05 21:01:56 +0200idhugo(~idhugo@563472ae.rev.stofanet.dk) (Ping timeout: 256 seconds)
2020-10-05 21:02:37 +0200 <zoom84> ok, understood. so what's the entity called that's created say "MyLeft 50"? I would consider it an instance of a type in other languges
2020-10-05 21:02:37 +0200 <ski> dolio : i think the "concrete" terminology has floated around this channel, for many years
2020-10-05 21:02:55 +0200 <ski> zoom84 : it's also a value. a value of type `MyEither Int Double' (e.g.)
2020-10-05 21:02:55 +0200berberman_(~berberman@2408:8207:256e:d930:584e:a9ff:fe9b:d3fe) (Ping timeout: 240 seconds)
2020-10-05 21:02:58 +0200 <ghoulguy> 'MyLeft 50' is a value that has the type "MyEither Integer something"
2020-10-05 21:03:03 +0200conal(~conal@64.71.133.70)
2020-10-05 21:03:03 +0200conal(~conal@64.71.133.70) (Client Quit)
2020-10-05 21:03:06 +0200 <monochrom> sep2: I don't understand the question.
2020-10-05 21:03:19 +0200berberman(~berberman@2408:8207:2560:ee60:584e:a9ff:fe9b:d3fe)
2020-10-05 21:03:26 +0200conal(~conal@64.71.133.70)
2020-10-05 21:03:31 +0200 <zoom84> ok, so using a type constructor yields something haskell terms a value?
2020-10-05 21:03:46 +0200 <ski> zoom84 : in terms of Java terminology, yes, you could say it's an "instance" of the type `MyEither Int Double'. but Haskell doesn't use the term "instance" in this sense, uses it for something different instead
2020-10-05 21:04:03 +0200 <ski> zoom84 : a type constructor is different from a data constructor
2020-10-05 21:04:05 +0200 <frdg> how could I go about creating a type-class for Set? In the same way that fmap is defined for the Functor class, can I a define a predicate, isSet, that a individual Set (just a list to haskell) must hold for? Is what I am describing different from a type class?
2020-10-05 21:04:24 +0200 <hc> zoom84: a type constructor yields a concrete type
2020-10-05 21:04:24 +0200 <zoom84> ah, ok. i remember that ski.
2020-10-05 21:04:31 +0200conal_(~conal@64.71.133.70)
2020-10-05 21:05:01 +0200 <zoom84> so MyLeft and MyRight are called data constructors
2020-10-05 21:05:03 +0200 <ski> zoom84 : `MyEither',`Int',`Bool',`Double',`IO',`(->)' are type constructors. `MyLeft',`MyRight',`False',`True' are data constructors
2020-10-05 21:05:06 +0200 <ski> yes
2020-10-05 21:05:07 +0200 <frdg> isSet :: [a] -> Bool
2020-10-05 21:05:15 +0200 <sep2> @monochrom How do I go about accepting an empty finite state machine ? Q = {0}•s=0•F=∅• δ(0,a)=0foralla∈Σ.
2020-10-05 21:05:16 +0200 <lambdabot> Unknown command, try @list
2020-10-05 21:05:28 +0200 <sep2> That was badly formatted excuse me
2020-10-05 21:05:29 +0200 <dolio> Either doesn't yield a concrete type after one application.
2020-10-05 21:05:41 +0200 <ski> zoom84 : type constructors are types. but not necessarily vice versa. `MyEither Int [Bool]' is a type, but not a type constructor
2020-10-05 21:05:51 +0200 <monochrom> Accept an empty machine? Accept an empty language?
2020-10-05 21:06:35 +0200 <zoom84> your example is not a type constructor because it's fully applied, correct?
2020-10-05 21:06:58 +0200 <ski> zoom84 : some type constructors are concrete (e.g. `Bool',`Int'), some aren't (e.g. `MyEither',`IO',`(->)',`Maybe'). you could also say that the latter are parameterized (/ are type functions), and the former are not parameterized (are not type functions)
2020-10-05 21:07:03 +0200Jesin(~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
2020-10-05 21:07:30 +0200 <monochrom> Are you OK with simply emptyFSM = ([0], 0, [], \s c -> 0) ?
2020-10-05 21:07:32 +0200 <zoom84> for example, (MyEither a) is a type constructor but (MyEither a b) is a type (and a concrete one). is that right?
2020-10-05 21:07:39 +0200chele(~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2020-10-05 21:07:51 +0200 <zoom84> the former being a constructor because it's not fully applied (ie, missing "b")
2020-10-05 21:07:54 +0200knupfer(~Thunderbi@200116b82cef83007c6d07fffe625a30.dip.versatel-1u1.de)
2020-10-05 21:07:55 +0200knupfer(~Thunderbi@200116b82cef83007c6d07fffe625a30.dip.versatel-1u1.de) (Client Quit)
2020-10-05 21:07:55 +0200conal(~conal@64.71.133.70) (Ping timeout: 240 seconds)
2020-10-05 21:08:03 +0200 <ski> zoom84 : `MyEither' is parameterized, is a type function, since you can "apply" it to a type (not a value). e.g. applying it to `Int' gives `MyEither Int' .. which is also not concrete, is still a type function, still accepts a further parameter
2020-10-05 21:08:07 +0200knupfer(~Thunderbi@87.123.206.236)
2020-10-05 21:08:18 +0200conal_(~conal@64.71.133.70) (Client Quit)
2020-10-05 21:08:29 +0200alx741(~alx741@186.178.110.22)
2020-10-05 21:08:45 +0200alx741(~alx741@186.178.110.22) (Client Quit)
2020-10-05 21:09:01 +0200 <ski> zoom84 : applying `MyEither Int' to e.g. `[Bool]', you get `(MyEither Int) [Bool]', which we can write simpler just as `MyEither Int [Bool]', and this is a concrete type (no further parameters accepted), and so we can talk about values of this type `MyEither Int [Bool]'
2020-10-05 21:09:05 +0200Falkeo(5631fd8b@ip-86-49-253-139.net.upcbroadband.cz)
2020-10-05 21:09:15 +0200 <ski> (it doesn't make sense to talk about values of a non-concrete type)
2020-10-05 21:09:36 +0200 <zoom84> got it. to fully nail down the correct terminology, both (Either a) and (Either Int) are type constructors since they're not fully applied. the former uses a parameterized var but otherwise they're called the same thing?
2020-10-05 21:10:16 +0200 <ski> zoom84 : "your example is not a type constructor because it's fully applied, correct?" -- no. `MyEither Int [Bool]' is fully applied. type constructor is a separate issue from being concrete (some type constructors are concrete, some aren't. some concrete types are type constructors, some aren't)
2020-10-05 21:10:30 +0200 <ski> zoom84 : no
2020-10-05 21:10:36 +0200avdb(~avdb@ip-213-49-124-37.dsl.scarlet.be)
2020-10-05 21:10:47 +0200 <zoom84> hmm...
2020-10-05 21:10:53 +0200 <zoom84> if I have Either a b
2020-10-05 21:10:53 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 21:10:58 +0200 <sep2> @monochrom that's what I had originally thought but I would get error: Data constructor not in scope: Undefined :: FSM Int
2020-10-05 21:10:59 +0200 <lambdabot> Unknown command, try @list
2020-10-05 21:11:04 +0200conal(~conal@64.71.133.70)
2020-10-05 21:11:14 +0200 <zoom84> and use (Either a) in a functor, I thought that (Either a) implicitly creates a type constructor by dint of not being fully applied
2020-10-05 21:11:35 +0200 <monochrom> But I didn't wrote "Undefined" anywhere.
2020-10-05 21:11:35 +0200knupfer(~Thunderbi@87.123.206.236) (Read error: Connection reset by peer)
2020-10-05 21:11:42 +0200knupfer(~Thunderbi@200116b82cef8300610dc462ddae2e63.dip.versatel-1u1.de)
2020-10-05 21:11:54 +0200 <ski> a type constructor is a "single atomic name" for a type (not including type variables). like `MyEither',`Int',`Maybe',`IO',`(->)'. but not including compound/complicated types like `Maybe Int',`(->) Int Bool',`MyEither Int',`MyEither Int [Bool]'
2020-10-05 21:11:56 +0200 <monochrom> WHO WROTE THAT?!
2020-10-05 21:12:51 +0200 <zoom84> "Well well, what did we do here? You can see how we made Either a an instance instead of just Either. That's because Either a is a type constructor that takes one parameter, whereas Either takes two. "
2020-10-05 21:12:59 +0200 <zoom84> http://learnyouahaskell.com/making-our-own-types-and-typeclasses#the-functor-typeclass
2020-10-05 21:13:03 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving)
2020-10-05 21:13:06 +0200 <sep2> It was looking at the next line after this one, where it takes in 'a' from sigma which is undefined for now @monochrom
2020-10-05 21:13:31 +0200 <monochrom> You need to paste full code. I am not telepathic.
2020-10-05 21:13:48 +0200 <maerwald> not even a little bit?
2020-10-05 21:13:48 +0200 <ski> just like a data constructor is a "single atomic name" for an alternative of a data type. like `MyLeft',`MyRight',`Nothing',`Just',`False',`True'. but not including compound/complicated value expressions like `MyLeft 10',`MyRight [False,True,False]',`Just 42'
2020-10-05 21:13:55 +0200 <monochrom> I am dumb.
2020-10-05 21:14:15 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 244 seconds)
2020-10-05 21:14:18 +0200 <monochrom> I know that most of you are telepathic.
2020-10-05 21:14:20 +0200 <zoom84> ski, so is the text I pasted from learnyouhaskell incorrect then?
2020-10-05 21:14:28 +0200hackageuniqueness-periods-vector-examples 0.8.0.1 - Usage examples for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.8.0.1 (OleksandrZhabenko)
2020-10-05 21:14:34 +0200ChanServ+o dolio
2020-10-05 21:14:34 +0200dolio-o monochrom
2020-10-05 21:14:41 +0200dolio-o dolio
2020-10-05 21:14:43 +0200alx741(~alx741@186.178.110.22)
2020-10-05 21:15:13 +0200 <ski> zoom84 : there are two different schools of terminology. one calls parameterized types / types functions, "type constructors" (but then there's no good name for the "single atomic names of types", reserves the name "type" for what i've called "concrete type"
2020-10-05 21:15:24 +0200geekosaur(42d52102@66.213.33.2)
2020-10-05 21:15:32 +0200 <sep2> https://dpaste.org/fFjT
2020-10-05 21:16:06 +0200 <monochrom> OK, so use lowercase "undefined"?
2020-10-05 21:16:09 +0200 <zoom84> ski, that's unfortunate
2020-10-05 21:16:10 +0200 <ski> in the other school, `Functor' is not a type class, but a "constructor class" (since `f' in `Functor f' is not a "type", but a "type constructor")
2020-10-05 21:16:13 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 21:16:16 +0200shaman_king(b94186ae@185.65.134.174)
2020-10-05 21:16:23 +0200 <shaman_king> i think haskell sucks ass.
2020-10-05 21:16:28 +0200 <ski> however, i haven't seen people use the term "constructor class" in a long time
2020-10-05 21:16:29 +0200ChanServ+o monochrom
2020-10-05 21:16:31 +0200shaman_king(b94186ae@185.65.134.174) ()
2020-10-05 21:16:43 +0200monochrom-o monochrom
2020-10-05 21:16:56 +0200 <ski> and i personally think the alternative terminology that i've been using is better
2020-10-05 21:17:13 +0200 <dolio> Type functions definitely don't need another name.
2020-10-05 21:17:22 +0200 <zoom84> btw, haven't thanked you yet for all the time you spent walking me through this. so before I continue, a huge thanks
2020-10-05 21:17:28 +0200 <ski> (some people disagree about the "concrete" term. but otherwise, i think mostly people use "type constructor" and "type" in the sense i've been using them)
2020-10-05 21:17:30 +0200 <dolio> With a distinct meaning from the value-level version to confuse things.
2020-10-05 21:18:08 +0200 <zoom84> so what is the output of a data constructor called? Just data? ie, "MyLeft 50"
2020-10-05 21:18:25 +0200 <ski> you could call it a value of a data type
2020-10-05 21:18:25 +0200 <zoom84> z = MyLeft 50. is z just considered "data"?
2020-10-05 21:19:00 +0200 <ski> usually people say "value" unless they have a more specific term in mind (like "integer","string","list (of ...)",&c.)
2020-10-05 21:19:02 +0200 <zoom84> calling it a value is deeply unsatisfying :)
2020-10-05 21:19:17 +0200st8less(~st8less@2603:a060:11fd:0:101c:4882:6a23:1c57)
2020-10-05 21:19:18 +0200 <ski> why ?
2020-10-05 21:19:35 +0200 <ski> you could call `z' a datum (singular of "data"), if you want to
2020-10-05 21:20:00 +0200machinedgod(~machinedg@142.169.78.126)
2020-10-05 21:20:02 +0200 <ski> (btw, note that also functions are values, in Haskell)
2020-10-05 21:20:03 +0200 <zoom84> because of habit working with other languages. I realize it is indeed just a value, esp since it's immutable. but it's hard to not just call it a variable, or at least an instance of a type
2020-10-05 21:20:24 +0200Super_Feeling(~Super_Fee@103.92.43.209)
2020-10-05 21:20:32 +0200 <ski> yea, using the "value" term tends to emphasize the immutability, which is a good thing :)
2020-10-05 21:20:55 +0200 <ski> a "variable" is a syntactic thing
2020-10-05 21:20:57 +0200 <monochrom> MyLeft 50 is not a variable in any sense, any culture.
2020-10-05 21:21:10 +0200Super_Feeling(~Super_Fee@103.92.43.209) (Client Quit)
2020-10-05 21:21:14 +0200 <ski> in your program source, `z' is a variable, but `MyList 50' is not a variable
2020-10-05 21:21:19 +0200Super_Feeling(~Super_Fee@103.92.43.209)
2020-10-05 21:21:33 +0200 <ski> but the variable `z' refers (will refer) to the value `MyList 50'
2020-10-05 21:21:36 +0200 <zoom84> mono, If in an OOP I have a class called MyLeft and a constructor which takes an int, the resulting instance would be stored in a variable, no?
2020-10-05 21:21:39 +0200 <monochrom> I'm OK with "instance" as long as you also agree, consistently, to say that "50 is an instance of type Integer".
2020-10-05 21:21:58 +0200 <monochrom> MyLeft is not an OOP constructor to begin with.
2020-10-05 21:22:10 +0200 <zoom84> i guess more specifically the variable would be called a reference. or a ptr
2020-10-05 21:22:15 +0200 <monochrom> OOP constructor means you can write arbitrary code.
2020-10-05 21:22:21 +0200 <dolio> No, it's a variable.
2020-10-05 21:22:28 +0200 <ski> (of course, `MyList 50' is, strictly speaking, also just text, in a source file. so when we say "the value `MyList 50'", we really mean "the value that the expression `MyList 50' describes")
2020-10-05 21:22:29 +0200 <monochrom> MyLeft doesn't contain arbitrary code you can write.
2020-10-05 21:22:34 +0200Super_Feeling(~Super_Fee@103.92.43.209) (Client Quit)
2020-10-05 21:22:34 +0200 <dolio> Like an actual mathematical variable.
2020-10-05 21:23:07 +0200 <ski> variables (in Haskell, as in math) are immutable
2020-10-05 21:23:14 +0200 <zoom84> monochrom, by culture i thought you were including other languages. do you mean specific to haskell?
2020-10-05 21:23:22 +0200Super_Feeling(~Super_Fee@103.92.43.209)
2020-10-05 21:23:32 +0200 <monochrom> By "any culture" I already include other languages.
2020-10-05 21:23:51 +0200 <monochrom> In no language you take a literal and say "it's a variable".
2020-10-05 21:24:00 +0200 <monochrom> 50 is a literal. MyLeft 50 is also a literal.
2020-10-05 21:24:16 +0200 <zoom84> the literal is not a variable. the instance created by the constructor that was passed the literal is what I'm calling a variable
2020-10-05 21:24:21 +0200 <monochrom> z is a variable but MyLeft 50 is not a variable.
2020-10-05 21:24:39 +0200 <ski> zoom84 : if you don't name the value, then there is no variable
2020-10-05 21:24:41 +0200 <zoom84> agreed
2020-10-05 21:25:02 +0200 <ski> the variable is a name, that you use to refer to a value (the value described by some expression)
2020-10-05 21:25:07 +0200geekosaurwonders if zoom84 is reaching for "expression"
2020-10-05 21:25:21 +0200Falkeo(5631fd8b@ip-86-49-253-139.net.upcbroadband.cz) (Remote host closed the connection)
2020-10-05 21:25:23 +0200 <monochrom> In OOP even the objects and instances are not called variables.
2020-10-05 21:25:51 +0200 <zoom84> let x = MyLeft(50)
2020-10-05 21:25:58 +0200 <monochrom> And that includes both mutable objects and immutable objects.
2020-10-05 21:26:30 +0200dhouthoo(~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.8)
2020-10-05 21:26:34 +0200 <monochrom> What is dissatisfying to me is a double standard in other cultures.
2020-10-05 21:26:43 +0200 <ski> zoom84 : btw, it's quite normal (and important) to struggle a bit, as a beginner, with terminology. first to "align vocabulary", so that you can more easily communicate without misunderstandings. but perhaps even more to "align mental maps", to form and highlight the right concepts that we use, when thinking about and discussing things
2020-10-05 21:27:10 +0200 <sep2> @monochrom apologies. What is it implying in the '\s' in \s c->0 part?
2020-10-05 21:27:11 +0200 <lambdabot> Unknown command, try @list
2020-10-05 21:27:43 +0200 <monochrom> To them, an object of a user-defined type "is an instance", but one of a built-in type like int "is not an instance". That's double standard. That's proving that in those cultures, user-defined types are second class, doesn't enjoy as much privilege as built-in types.
2020-10-05 21:27:49 +0200 <ski> (it's not so simple as just to say "this term in Java is called this in Haskell". there are actual discrepancies between how we delineate concepts, and which concepts we elect to give importance, by naming them, talking about them)
2020-10-05 21:28:00 +0200 <dolio> Oh man, I thought the @ might stop without the op. :P
2020-10-05 21:28:30 +0200zoom84(44beb1c9@068-190-177-201.res.spectrum.com) (Remote host closed the connection)
2020-10-05 21:28:34 +0200 <monochrom> In Haskell, we will have none of that. All types, built-in or user-defined, have values. Oh, for user-defined types the value syntax looks a bit different? Big deal, they're still values.
2020-10-05 21:29:03 +0200zoom84(44beb1c9@068-190-177-201.res.spectrum.com)
2020-10-05 21:29:33 +0200 <ski> sep2 : note that it's not IRC custom/convention to adorn nicknames with sigils (like `@'). if you want to refer to someone, or address them specifically, simply mention their nickname
2020-10-05 21:29:34 +0200 <zoom84> ski, agreed that terminology is important, esp for asking questions effectively. that's why I go out of my way to make sure I'm naming things correctly
2020-10-05 21:29:41 +0200wroathe_(~wroathe@75-146-43-37-Minnesota.hfc.comcastbusiness.net)
2020-10-05 21:29:47 +0200 <zoom84> ie, why I ask if i'm naming things correctly :)
2020-10-05 21:30:13 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2020-10-05 21:30:27 +0200 <hpc> sep2: your client should tab-complete with the correct convention btw, like this
2020-10-05 21:30:28 +0200 <ski> sep2 : in the latter case, it's good to mention their nicknames first in the message, followed by a comma or colon, and the bulk of the message. many IRC clients alert/hilight the user, if their nickname is mentioned first. not as many do that, if the nickname is not at the very start (e.g. if there a `@' in front of it)
2020-10-05 21:30:53 +0200 <monochrom> sep2: That's a lambda.
2020-10-05 21:30:59 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-10-05 21:31:15 +0200 <ski> sep2 : also, `@', in association with nicknames, means something specific on IRC (namely that someone is a channel operator. but even if someone has a `@' in front of their nickname, in the channel nickname list, i'd suggest not spelling `@' out, when referring to them)
2020-10-05 21:31:16 +0200 <monochrom> I wrote an anonymous function in situ.
2020-10-05 21:31:34 +0200 <monochrom> It's for the state transition function.
2020-10-05 21:31:43 +0200wroathe_wroathe
2020-10-05 21:31:48 +0200 <ski> (sep2 : as you noticed, starting a message like "@<nickname> ..." also confuses lambdabot ..)
2020-10-05 21:33:21 +0200alp(~alp@2a01:e0a:58b:4920:84ce:b984:b792:c925) (Ping timeout: 272 seconds)
2020-10-05 21:33:24 +0200 <ski> zoom84 : yea, it's fine :) .. i tend to, sometimes, nitpick a bit on ambiguous or incorrect terminology, especially if i think there's a beginner involved. i've been told several times that that has helped them to get a better understanding of the relevant concepts that we're referring to, in Haskell
2020-10-05 21:34:08 +0200 <sep2> ski: right on I didn't notice these things until you pointed it out
2020-10-05 21:34:57 +0200avdb(~avdb@ip-213-49-124-37.dsl.scarlet.be) (Quit: WeeChat 2.9)
2020-10-05 21:35:10 +0200 <ski> (if someone is already more familiar with the concepts, one can afford to use more sloppy terminology, when communicating, as long as people "get what you mean" (can fallback on more explicit, on a by-need basis). but, in my experience, this is not a good thing to do, when one's learning the concepts)
2020-10-05 21:35:57 +0200ralejs(~ralejs@2620:10d:c093:400::5:2842) (Read error: Connection reset by peer)
2020-10-05 21:35:57 +0200ralejs_(~ralejs@2620:10d:c093:400::5:2842)
2020-10-05 21:35:58 +0200hackageuniqueness-periods-vector-examples 0.8.0.2 - Usage examples for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.8.0.2 (OleksandrZhabenko)
2020-10-05 21:36:07 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 21:37:57 +0200conal(~conal@64.71.133.70)
2020-10-05 21:38:19 +0200ashbreeze(~mark@72-161-254-200.dyn.centurytel.net)
2020-10-05 21:38:47 +0200blackfield(~blackfiel@unaffiliated/blackfield)
2020-10-05 21:38:50 +0200wroathe_(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-10-05 21:39:58 +0200_ashbreeze_(~mark@72-161-254-200.dyn.centurytel.net) (Ping timeout: 256 seconds)
2020-10-05 21:40:27 +0200 <ski> zoom84 : "If in an OOP I have a class called MyLeft and a constructor which takes an int, the resulting instance would be stored in a variable, no?" -- not necessarily. e.g. `frob(new MyLeft<Integer,String>(50));'
2020-10-05 21:40:48 +0200wroathe(~wroathe@75-146-43-37-Minnesota.hfc.comcastbusiness.net) (Ping timeout: 258 seconds)
2020-10-05 21:40:55 +0200machinedgod(~machinedg@142.169.78.126) (Ping timeout: 240 seconds)
2020-10-05 21:41:36 +0200machinedgod(~machinedg@142.169.78.126)
2020-10-05 21:43:04 +0200 <monochrom> I store my DVDs in a box. I don't call my DVDs "the box".
2020-10-05 21:43:11 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 21:43:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 21:43:27 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 21:43:27 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 21:43:44 +0200 <int-e> . o O ( A DVD is a physical container for bits. )
2020-10-05 21:44:09 +0200bitmapper(uid464869@gateway/web/irccloud.com/x-tfzdjxpokcsicuwj)
2020-10-05 21:44:15 +0200wroathe_wroathe
2020-10-05 21:44:58 +0200 <monochrom> We sometimes forgive ourselves for saying "let's watch a DVD together for two hours!" but you never literally stare at the DVD itself.
2020-10-05 21:45:23 +0200 <no-n> lol
2020-10-05 21:45:32 +0200ski. o O ( `foldDVD :: (a -> Bool -> a) -> (a -> DVD -> a)' )
2020-10-05 21:46:30 +0200 <sep2> for taking in a letter, first example I see is Q={ε,a,T}, how do you represent the epsilon in Haskell? Theres a small diagram and looks like epsilon is start state, a end, t is trap state
2020-10-05 21:46:40 +0200 <ski> int-e : fwiw, `IChan' has no `Eq' instance
2020-10-05 21:46:57 +0200hackageuniqueness-periods-vector-examples 0.8.0.3 - Usage examples for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.8.0.3 (OleksandrZhabenko)
2020-10-05 21:47:29 +0200 <tomsmeding> % :kind! FilePath
2020-10-05 21:47:30 +0200 <yahb> tomsmeding: *; = FilePath
2020-10-05 21:47:39 +0200 <tomsmeding> when did that stop giving me the full, normalised type?
2020-10-05 21:47:46 +0200 <monochrom> You use Int for states, so make up some numbers 0, 1, 2 to stand for the states, instead of Greek names.
2020-10-05 21:48:03 +0200 <tomsmeding> the ghc user's guide claims that it still does, but as can be seen, it doesn't :p
2020-10-05 21:48:43 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 21:48:54 +0200 <monochrom> hrm, maybe it only works for type families
2020-10-05 21:48:57 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 21:48:57 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 21:48:57 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 21:49:18 +0200 <int-e> ski: Would it be useful? I probably thought it wouldn't be because you keep hopping from one IChan value to the next all the time.
2020-10-05 21:49:32 +0200 <tomsmeding> monochrom: it does seem to work for type families indeed
2020-10-05 21:50:41 +0200 <monochrom> ha, yahb just replaces newline by semicolon
2020-10-05 21:50:52 +0200 <tomsmeding> "works"
2020-10-05 21:51:04 +0200 <ski> int-e : i guess i'd be more useful, with an `uncons :: IChan a -> Maybe (a,IChan a)'
2020-10-05 21:51:28 +0200hackagewai-feature-flags 0.1.0.1 - Feature flag support for WAI applications. https://hackage.haskell.org/package/wai-feature-flags-0.1.0.1 (JasperWoudenberg)
2020-10-05 21:51:49 +0200 <Super_Feeling> can someone explain what this means: "y :: Int \n y = y + 1"
2020-10-05 21:51:52 +0200oisdk(~oisdk@2001:bb6:3329:d100:189f:9172:61d6:2b9e) (Quit: oisdk)
2020-10-05 21:51:55 +0200helaoban(~carloholl@2603:3024:1704:300::8401)
2020-10-05 21:52:01 +0200 <ski> (or `isEmpty :: IChan a -> Bool',`readHead :: IChan a -> a',`readTail :: IChan a -> IChan a', if you prefer)
2020-10-05 21:52:07 +0200 <Super_Feeling> I know y is an Int, but the second line
2020-10-05 21:52:10 +0200 <tomsmeding> Super_Feeling: it's a bottom!
2020-10-05 21:52:11 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it)
2020-10-05 21:52:14 +0200 <ski> Super_Feeling : `y' is defined to be itself, plus one
2020-10-05 21:52:28 +0200 <Super_Feeling> yeah but what is y then? a function, on which i can pass a value?
2020-10-05 21:52:32 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-05 21:52:35 +0200 <Super_Feeling> and get the value + 1?
2020-10-05 21:52:36 +0200 <tomsmeding> it's an integer
2020-10-05 21:52:40 +0200oisdk(~oisdk@2001:bb6:3329:d100:189f:9172:61d6:2b9e)
2020-10-05 21:52:40 +0200 <ski> Super_Feeling : so, `y = y + 1 = (y + 1) + 1 = ((y + 1) + 1) + 1 = ...'
2020-10-05 21:52:47 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-05 21:52:48 +0200 <tomsmeding> but if you try to evaluate it, you'll infinite-loop
2020-10-05 21:52:49 +0200 <Super_Feeling> so infinite recursion
2020-10-05 21:53:00 +0200 <Super_Feeling> got it, this is mind boggling
2020-10-05 21:53:01 +0200 <monochrom> Ah, the user guide wording includes "type synonyms" so this is not good
2020-10-05 21:53:12 +0200 <ski> yes, there's no finite integer `y' satisfying the equation `y = y + 1'
2020-10-05 21:53:22 +0200 <tomsmeding> monochrom: that was indeed my point, perhaps I should've saved you the search for the right paragraph :p
2020-10-05 21:53:29 +0200 <Super_Feeling> wow, this is a lot like those recursive definitions in math
2020-10-05 21:53:36 +0200 <tomsmeding> ski: that's suggestive of the wrong thing
2020-10-05 21:53:49 +0200 <ski> hm ?
2020-10-05 21:53:52 +0200 <tomsmeding> saying "y = y * 0" will also infinite-loop, though there's certainly a solution for that one
2020-10-05 21:53:58 +0200 <dolio> There's no infinite integer, either. :)
2020-10-05 21:54:14 +0200 <ski> tomsmeding : yes, it wasn't an "iff" condition :)
2020-10-05 21:54:19 +0200 <tomsmeding> fair :p
2020-10-05 21:54:26 +0200 <Super_Feeling> it basically evaluates forever. keeps on solving for y, but y contains another "y" in the definition
2020-10-05 21:54:28 +0200 <Super_Feeling> am i right?
2020-10-05 21:54:32 +0200 <monochrom> Yes.
2020-10-05 21:54:33 +0200 <ski> yes
2020-10-05 21:54:34 +0200 <tomsmeding> > let fibo = 0 : 1 : zipWith (+) fibo (tail fibo) in take 10 fibo
2020-10-05 21:54:36 +0200 <lambdabot> [0,1,1,2,3,5,8,13,21,34]
2020-10-05 21:54:51 +0200 <dolio> > let y :: Integer ; y = y + 1 in y
2020-10-05 21:54:53 +0200 <monochrom> But don't hold up your hope for "y = y * 1" either.
2020-10-05 21:54:54 +0200 <lambdabot> *Exception: <<loop>>
2020-10-05 21:55:00 +0200 <ski> > let ones = 1 : ones in take 10 ones
2020-10-05 21:55:05 +0200 <lambdabot> [1,1,1,1,1,1,1,1,1,1]
2020-10-05 21:55:08 +0200machinedgod(~machinedg@142.169.78.126) (Ping timeout: 260 seconds)
2020-10-05 21:55:14 +0200 <dolio> GHC figured out not to take forever.
2020-10-05 21:55:32 +0200 <ski> Super_Feeling : sometimes, such "cyclic/circular/recursive" definitions can be useful. but for `Int', they aren't
2020-10-05 21:55:43 +0200 <helaoban> hi haskell, not sure where the right place to report this is, but there is a broken link on https://hackage.haskell.com/package/<package-name>/dependencies, at the bottom of the dependcies page for packages with flag-mediated dependencies there is supposed to be a link to cabal docs that explains how to use these flags, but it's broken.
2020-10-05 21:56:03 +0200 <ski> helaoban : maybe #haskell-infrastructure ?
2020-10-05 21:56:11 +0200 <tomsmeding> monochrom: where would I report this documentation inconsistency about :kind! ?
2020-10-05 21:56:43 +0200 <helaoban> eg for https://hackage.haskell.org/package/cassava-0.5.2.0/dependencies, the link is http://www.haskell.org/cabal/users-guide/installing-packages.html#controlling-flag-assignments when it looks like it should be https://cabal.readthedocs.io/en/latest/setup-commands.html#controlling-flag-assignments
2020-10-05 21:56:49 +0200 <helaoban> ski: cool, i'll try there
2020-10-05 21:57:08 +0200thir(~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2020-10-05 21:58:10 +0200 <ski> > let y :: Natural; y = 0 * y in y
2020-10-05 21:58:12 +0200 <lambdabot> 0
2020-10-05 21:58:24 +0200 <Super_Feeling> ski got it. it's pretty mind boggling for me, since i am not used to such recursive definitions. thanks tho
2020-10-05 21:59:13 +0200 <ski> Super_Feeling : note that an ordinary recursive(ly defined) function, is also a "circular definition". it's just that it happens to be done in a way that's productive
2020-10-05 21:59:54 +0200 <tomsmeding> ski: doesn't work for me locally (loops), if Natural is from Numeric.Natural :p
2020-10-05 22:00:07 +0200 <ski> > let factorial 0 = 1; factorial n = n * factorial (n-1) in factorial 5
2020-10-05 22:00:14 +0200 <lambdabot> 120
2020-10-05 22:00:20 +0200 <Super_Feeling> i'm not really familiar with circular definition
2020-10-05 22:00:22 +0200 <ski> > let factorial 0 = 1; factorial n = n * factorial (n-1) in factorial 5 :: Expr
2020-10-05 22:00:26 +0200 <lambdabot> 5 * ((5 - 1) * ((5 - 1 - 1) * ((5 - 1 - 1 - 1) * ((5 - 1 - 1 - 1 - 1) * 1))))
2020-10-05 22:00:41 +0200 <int-e> ski: That uncons would be in IO, I guess?
2020-10-05 22:00:43 +0200 <sep2> https://dpaste.org/Hn8V Would I be in the right area trying to translate this over? included the def I'm trying to follow
2020-10-05 22:01:03 +0200 <monochrom> tomsmeding: Found it: https://gitlab.haskell.org/ghc/ghc/-/issues/13795
2020-10-05 22:01:20 +0200 <tomsmeding> oh now you did my work again!
2020-10-05 22:01:30 +0200 <ski> Super_Feeling : that definition of `factorial' is "cyclic/circular/recursive" (the definition is given as a "recurrence relation", to use some math terminology). the thing being defined (the "definiendum"), `factorial' is mentioned to the right of the `='s (what it's being defined as, the "definiens")
2020-10-05 22:01:45 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:8115:8d3a:8e30:e79f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-05 22:02:01 +0200 <ski> int-e : for `MIChan', yes, but not for `IChan'
2020-10-05 22:02:05 +0200 <monochrom> I just had a hunch that it already existed.
2020-10-05 22:02:08 +0200 <int-e> ski: Because this particular IChan is coneptually an endless stream... there's no end
2020-10-05 22:02:25 +0200 <ski> ah, right. so no `Maybe' then
2020-10-05 22:02:26 +0200 <int-e> ski: Oh you mean for comparisons. Sorry, I'm slow.
2020-10-05 22:02:55 +0200 <ski> (i read the implementation, but then forgot again that they can't end)
2020-10-05 22:03:35 +0200 <int-e> ski: It's not the most useful channel in existence. I just wanted to use those IVars for *something*.
2020-10-05 22:04:06 +0200 <int-e> (I guess you can put your own end-of-stream markers on the channel though.)
2020-10-05 22:04:12 +0200 <ski> tomsmeding : hm, try `y = y * 0'
2020-10-05 22:04:33 +0200 <tomsmeding> ah that does work
2020-10-05 22:05:56 +0200 <ski> int-e : i should probably try to use `IVar' for keeping track of shared nodes in a graph, and see where the pain points are ..
2020-10-05 22:06:19 +0200machinedgod(~machinedg@142.169.78.196)
2020-10-05 22:06:27 +0200 <ski> tomsmeding : i guess they probably changed the parameter to do induction/recursion on, at some point
2020-10-05 22:07:12 +0200skiwas thinking, semi-recently, about which parameter is the "correct" one, to induct on, for some of the most basic arithmetic operations, ..
2020-10-05 22:07:23 +0200livvy(~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
2020-10-05 22:07:46 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:507:9614:9e50:551c)
2020-10-05 22:08:01 +0200L29Ah(~L29Ah@unaffiliated/l29ah) (Ping timeout: 258 seconds)
2020-10-05 22:08:37 +0200jespada(~jespada@90.254.246.48) (Ping timeout: 264 seconds)
2020-10-05 22:09:00 +0200geekosaur(42d52102@66.213.33.2) (Remote host closed the connection)
2020-10-05 22:09:03 +0200 <tomsmeding> eh, define "correct"
2020-10-05 22:09:33 +0200 <tomsmeding> I mean. you can even alternately recurse on both parameters to find the one that's zero fastest
2020-10-05 22:09:38 +0200 <tomsmeding> s/\./,
2020-10-05 22:10:04 +0200 <ski> yea, part of the exercise was to search for some reasonable meaning of "correct" :)
2020-10-05 22:10:59 +0200rprije(~rprije@203.214.95.251)
2020-10-05 22:11:03 +0200 <tomsmeding> I think for commutative operations, the arguments ought to be equivalent for all senses that you consider relevant
2020-10-05 22:11:12 +0200 <monochrom> Almost sounded like you have solved the "parallel or" problem. :) (Don't worry, it doesn't solve that problem.)
2020-10-05 22:11:22 +0200 <ski> let's take addition. you can an accumulative definition `Z + n = n; S m + n = m + S n'. or you could have the "direct" version `Z + n = n; S m + n = S (m + n)'
2020-10-05 22:11:28 +0200jespada(~jespada@90.254.246.48)
2020-10-05 22:11:34 +0200 <int-e> ski: Hmm, you don't need an IVar for that. You can achieve the same thing, more cheaply, with an IORef: data Node a = Node !(IORef a) a; instance Eq (Node a) where Node r1 _ == Node r2 _ = r1 == r2; newNode a = Node <$> newIORef a <*> pure a. Note also, that the allocated IORef is responsible for the identity of the node...
2020-10-05 22:11:38 +0200 <tomsmeding> so if you think evaluation strategy is important, then you should recurse on both parameters at the same time :p
2020-10-05 22:11:49 +0200 <ski> (and then you can flip the parameter orders, if you want. and yes, you could have variants where you induct on both parameters, in different ways)
2020-10-05 22:11:55 +0200Super_Feeling(~Super_Fee@103.92.43.209) (Remote host closed the connection)
2020-10-05 22:12:25 +0200 <int-e> ski: Or is the point that the IVar can resolve cycles, hmm.
2020-10-05 22:12:27 +0200st8less(~st8less@2603:a060:11fd:0:101c:4882:6a23:1c57) (Ping timeout: 240 seconds)
2020-10-05 22:12:35 +0200 <tomsmeding> and of course the proposal that meant to (re-)add a ghci command for expanding type synonyms got stranded due to inactivity :D https://github.com/ghc-proposals/ghc-proposals/pull/79
2020-10-05 22:12:49 +0200 <monochrom> But I can see that "add Z n = n; add m Z = Z; add (S m) (S n) = S (S (add m n))" is very much nicer, like zip.
2020-10-05 22:13:23 +0200 <int-e> ski: (which the IORef version can do as well, but it'll be more prone to undetected bugs that set a node value more than once)
2020-10-05 22:13:38 +0200 <tomsmeding> monochrom: I very much like that one indeed :p
2020-10-05 22:14:17 +0200 <int-e> ski: Anyway, it's certainly a use I've never ever considered before.
2020-10-05 22:14:31 +0200st8less(~st8less@inet-167-224-197-181.isp.ozarksgo.net)
2020-10-05 22:14:39 +0200 <int-e> So thanks for that :)
2020-10-05 22:15:09 +0200 <int-e> The lack of an Ord instance will hurt eventually, I suppose.
2020-10-05 22:15:15 +0200knupfer(~Thunderbi@200116b82cef8300610dc462ddae2e63.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-10-05 22:15:19 +0200knupfer1(~Thunderbi@200116b82cef83003844d391b8848e28.dip.versatel-1u1.de)
2020-10-05 22:15:35 +0200knupfer1(~Thunderbi@200116b82cef83003844d391b8848e28.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:15:36 +0200 <ski> int-e : yea, one could do that. but you'd need a way to generate an uninstantiated `IVar', and to instantiate it, after the fact (getting blocking read if it's not instantiated yet). and perhaps think about whether there'll be any problem with threads, due to using simple `IORef's
2020-10-05 22:15:47 +0200knupfer(~Thunderbi@200116b82cef8300f037b40504d258ce.dip.versatel-1u1.de)
2020-10-05 22:15:53 +0200knupfer(~Thunderbi@200116b82cef8300f037b40504d258ce.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:16:06 +0200knupfer(~Thunderbi@200116b82cef8300b5c936f19440c318.dip.versatel-1u1.de)
2020-10-05 22:16:07 +0200 <ski> @type newCyclicIORef
2020-10-05 22:16:09 +0200 <lambdabot> (IORef a -> a) -> IO (IORef a)
2020-10-05 22:16:18 +0200knupfer(~Thunderbi@200116b82cef8300b5c936f19440c318.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-10-05 22:16:26 +0200knupfer(~Thunderbi@200116b82cef830070386856bf96007c.dip.versatel-1u1.de)
2020-10-05 22:16:28 +0200knupfer(~Thunderbi@200116b82cef830070386856bf96007c.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:16:40 +0200 <ski> what's a nice way to do that, but generating multiple `IORef's ?
2020-10-05 22:16:48 +0200 <dolio> Most refs aren't orderable, because that's not stable under GC.
2020-10-05 22:16:50 +0200knupfer(~Thunderbi@200116b82cef83001cef98ca424016ba.dip.versatel-1u1.de)
2020-10-05 22:16:51 +0200knupfer(~Thunderbi@200116b82cef83001cef98ca424016ba.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:16:52 +0200 <ski> @type newCyclicIORefT
2020-10-05 22:16:54 +0200 <lambdabot> Traversable f => f (f (IORef a) -> a) -> IO (f (IORef a))
2020-10-05 22:16:58 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 22:17:04 +0200alp(~alp@2a01:e0a:58b:4920:e03a:3413:fb91:53fc)
2020-10-05 22:17:05 +0200 <ski> still requires all of them to be `IORef a' ..
2020-10-05 22:17:08 +0200GyroW(~GyroW@d54C03E98.access.telenet.be)
2020-10-05 22:17:09 +0200GyroW(~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-05 22:17:09 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 22:17:11 +0200 <dolio> So it's more expensive to be ordered.
2020-10-05 22:17:33 +0200knupfer(~Thunderbi@200116b82cef8300dd7c73b5b438b1fa.dip.versatel-1u1.de)
2020-10-05 22:17:35 +0200knupfer(~Thunderbi@200116b82cef8300dd7c73b5b438b1fa.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:17:46 +0200L29Ah(~L29Ah@unaffiliated/l29ah)
2020-10-05 22:18:10 +0200 <int-e> dolio: Sure, I know why :) But for the purpose of detecting sharing, having just Eq results in a scalability problem.
2020-10-05 22:18:11 +0200incognito9999_(~incognito@hwsrv-648981.hostwindsdns.com)
2020-10-05 22:18:43 +0200 <ski> monochrom : except it's not really that much like `zip', you get two `S's out, for one `S' in, in each parameter ?
2020-10-05 22:18:49 +0200knupfer(~Thunderbi@200116b82cef8300e49e64b009df27a7.dip.versatel-1u1.de)
2020-10-05 22:19:02 +0200 <int-e> dolio: Which is not really the intended purpose of those references (Eq instance notwithstanding) so that's fine.
2020-10-05 22:19:02 +0200 <dolio> That's why the well-ordering principle is false. :)
2020-10-05 22:19:18 +0200knupfer(~Thunderbi@200116b82cef8300e49e64b009df27a7.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:19:23 +0200 <ski> (and you still have the (lack of) parallel-or problem, that `add undefined (S n)' isn't equal to `S (add undefined n)')
2020-10-05 22:19:34 +0200knupfer(~Thunderbi@200116b82cef8300a895f9e57b9e84bd.dip.versatel-1u1.de)
2020-10-05 22:19:45 +0200knupfer(~Thunderbi@200116b82cef8300a895f9e57b9e84bd.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:19:52 +0200knupfer(~Thunderbi@200116b82cef8300a895f9e57b9e84bd.dip.versatel-1u1.de)
2020-10-05 22:20:14 +0200knupfer1(~Thunderbi@200116b82cef83009da320cc3b7d023e.dip.versatel-1u1.de)
2020-10-05 22:20:21 +0200knupfer(~Thunderbi@200116b82cef8300a895f9e57b9e84bd.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:20:22 +0200knupfer1knupfer
2020-10-05 22:20:26 +0200J_Arcane_(sid119274@gateway/web/irccloud.com/x-okfghrpejlzoualp)
2020-10-05 22:20:27 +0200m-renaud_(sid333785@gateway/web/irccloud.com/x-wdhdpnuntagzspud)
2020-10-05 22:20:27 +0200alanz_(sid110616@gateway/web/irccloud.com/x-rotyfkerxdfrgsjt)
2020-10-05 22:20:27 +0200jlpeters_(sid25606@gateway/web/irccloud.com/x-xkxchtjwumvvoplq)
2020-10-05 22:20:28 +0200drbrule_(sid395654@gateway/web/irccloud.com/x-qzclcwgouytxdizk)
2020-10-05 22:20:28 +0200scav_(sid309693@gateway/web/irccloud.com/x-bpvpcjgxpjzjedad)
2020-10-05 22:20:29 +0200knupfer(~Thunderbi@200116b82cef83009da320cc3b7d023e.dip.versatel-1u1.de) (Client Quit)
2020-10-05 22:20:30 +0200banjiewen_(sid115913@gateway/web/irccloud.com/x-dxltzkvalxmnuugq)
2020-10-05 22:20:31 +0200fiadliel_(sid399568@gateway/web/irccloud.com/x-rcssxagrxaenrwkf)
2020-10-05 22:20:38 +0200albethere_(sid457088@gateway/web/irccloud.com/x-fnvfojoflynertwf)
2020-10-05 22:20:38 +0200knupfer(~Thunderbi@200116b82cef8300c06758e924f2c41e.dip.versatel-1u1.de)
2020-10-05 22:20:39 +0200rusua_(uid124537@gateway/web/irccloud.com/x-mpizelreyaaubxup)
2020-10-05 22:20:42 +0200JSharp_(sid4580@wikia/JSharp)
2020-10-05 22:20:43 +0200bitonic_(sid61915@gateway/web/irccloud.com/x-evaxaxrhylqawuas)
2020-10-05 22:20:47 +0200 <tomsmeding> ski: but that one you can't solve in general: you got to inspect _an_ argument first :p
2020-10-05 22:20:51 +0200SrPx_(sid108780@gateway/web/irccloud.com/x-czvvabmhqaigtsgp)
2020-10-05 22:20:55 +0200 <ski> int-e : it was the `read :: IVar a -> a' together with `instance Eq (IVar a)' (and also, of course, the ability to fill it in, independently, some time after creation time), that made it catch my attention (years ago)
2020-10-05 22:20:58 +0200xarian_(~xarian@104.236.81.162)
2020-10-05 22:21:07 +0200 <ski> tomsmeding : except if you race threads :)
2020-10-05 22:21:15 +0200eruditass_(uid248673@gateway/web/irccloud.com/x-ubxwbqgbcybasbta)
2020-10-05 22:21:38 +0200 <tomsmeding> that went very quickly from total language land to ugly haskell land :p
2020-10-05 22:21:44 +0200 <int-e> ski: I still think this particular IVar is cute. However, personally, I never found a convincing use for it. :)
2020-10-05 22:21:58 +0200Forkk_(forkk@2600:3c00::f03c:91ff:fe84:de4d)
2020-10-05 22:22:42 +0200lucas8(~luc@2001:41d0:8:109c::1)
2020-10-05 22:22:45 +0200megaTherion_(~therion@unix.io)
2020-10-05 22:23:12 +0200mystfox(~myst@focks.pw)
2020-10-05 22:23:19 +0200atomi__(~atomi@35.71.197.35.bc.googleusercontent.com)
2020-10-05 22:23:43 +0200 <ski> tomsmeding : anyway, to continue, i think the "direct" version is suerior to the "accumulating" version (comparing just those two), since the former is incremental, while the latter is bulky. and, with dependent types, this manifests as if you have `m0 + n' in your type, and you learn that `m0 = S m', then it can rewrite `S m + n' to `S (m + n)', and so you get an outer `S' to "match" on, rather than an
2020-10-05 22:23:49 +0200 <ski> opaque call to `+'
2020-10-05 22:24:24 +0200Stanley00(~stanley00@unaffiliated/stanley00)
2020-10-05 22:24:24 +0200cheers-(user@unaffiliated/cheers)
2020-10-05 22:24:29 +0200 <tomsmeding> yes making progress early by putting an S on the outside is nice
2020-10-05 22:24:48 +0200 <ski> (obviously i'm not talking about a strict representation of naturals here, where accumulation can make more sense, since you don't get incrementality anyway)
2020-10-05 22:25:25 +0200 <int-e> ski: Having a pure `read` is the essence of the whole package; everything else is designed to make that possible, including all limitations.
2020-10-05 22:25:41 +0200 <ski> int-e : ah, i see :)
2020-10-05 22:25:52 +0200SrPx(sid108780@gateway/web/irccloud.com/x-xulqbpplkjjfywzr) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200jlpeters(sid25606@gateway/web/irccloud.com/x-oxflbpvsmgilmdyy) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200alanz(sid110616@gateway/web/irccloud.com/x-bplzytauuzaqtdwm) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200xarian(~xarian@104.236.81.162) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200rawles(~r@unaffiliated/rawles) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200eruditass(uid248673@gateway/web/irccloud.com/x-iuzbfjvdrultjkys) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200m-renaud(sid333785@gateway/web/irccloud.com/x-tkucctivkfyvgvtj) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200J_Arcane(sid119274@gateway/web/irccloud.com/x-woiwotxdlskjwxcj) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200thecoffemaker(~thecoffem@unaffiliated/thecoffemaker) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200noCheese(~nocheese@unaffiliated/nocheese) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200drbrule(sid395654@gateway/web/irccloud.com/x-upjwrhbxkttxvnlr) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200JSharp(sid4580@wikia/JSharp) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200rusua(uid124537@gateway/web/irccloud.com/x-sysvorkqwbosrbwq) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200fiadliel(sid399568@gateway/web/irccloud.com/x-hgzpvwimdwujzolw) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200scav(sid309693@gateway/web/irccloud.com/x-dpbxtezevjogbqll) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200nick_h(sid319833@gateway/web/irccloud.com/x-srdcrkvbqjanzjcu) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200albethere(sid457088@gateway/web/irccloud.com/x-cltqfsvqlhbhhdqu) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200siraben(sirabenmat@gateway/shell/matrix.org/x-pabygdewelkoamni) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200banjiewen(sid115913@gateway/web/irccloud.com/x-mooiusydhgfmcvhk) (Ping timeout: 244 seconds)
2020-10-05 22:25:52 +0200iinuwa1(iinuwamatr@gateway/shell/matrix.org/x-kbcyykvavbzbuwyo) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200jtojnar(jtojnarmat@gateway/shell/matrix.org/x-oypragrwlxqgnchv) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200alexfmpe(alexfmpema@gateway/shell/matrix.org/x-svcqerpqtkauzjui) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200raoulb(~weechat@stateless.vsos.ethz.ch) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200DwarfMaster(~luc@2001:41d0:8:109c::1) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200jokester(~mono@unaffiliated/jokester) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200cheers(user@unaffiliated/cheers) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200glowpelt(~myst@focks.pw) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200Forkk(forkk@2600:3c00::f03c:91ff:fe84:de4d) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200vqrs(~vqrs@learnprogramming/regular/vqrs) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200verlet64_(sid261276@gateway/web/irccloud.com/x-qmypxhhdelafasaj) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200bitonic(sid61915@gateway/web/irccloud.com/x-gpvtxexabdepunck) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200angerman(sid209936@gateway/web/irccloud.com/x-ueaytjplpxideopo) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200unclechu(unclechuma@gateway/shell/matrix.org/x-bgindqyxdmllwdai) (Ping timeout: 244 seconds)
2020-10-05 22:25:53 +0200GuillaumeChrel[m(guillaumec@gateway/shell/matrix.org/x-jdchaaocbuitwfmn) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200Ericson2314(ericson231@gateway/shell/matrix.org/x-vfqdqvnkedexzixl) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200nihilazo(nihilazoma@gateway/shell/matrix.org/x-nhbxnzosodzhmhyx) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200gcoakes[m](gcoakesmat@gateway/shell/matrix.org/x-flwpwnktpkouxpwp) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200Fernando-Basso[m(fernando-b@gateway/shell/matrix.org/x-qopgtqduxfsjtqbe) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200crtschin_(~crtschin@2604:a880:800:10::3126:f001) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200shadowdao(~user@unaffiliated/shadowdaemon) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200incognito9999(~incognito@hwsrv-648981.hostwindsdns.com) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200recon_-_(~quassel@2602:febc:0:b6::6ca2) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200Niamkik(~Niamkik@2a00:5884:8219::1) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200joeyh(~joeyh@kitenet.net) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200_flow_(~none@salem.informatik.uni-erlangen.de) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200atomi(~atomi@35.71.197.35.bc.googleusercontent.com) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200megaTherion(~therion@coruscant.unix.io) (Ping timeout: 244 seconds)
2020-10-05 22:25:54 +0200SrPx_SrPx
2020-10-05 22:25:54 +0200alanz_alanz
2020-10-05 22:25:54 +0200 <int-e> (limitations compared to other IVar implementations)
2020-10-05 22:25:55 +0200jlpeters_jlpeters
2020-10-05 22:25:55 +0200J_Arcane_J_Arcane
2020-10-05 22:25:55 +0200banjiewen_banjiewen
2020-10-05 22:25:55 +0200eruditass_eruditass
2020-10-05 22:25:55 +0200scav_scav
2020-10-05 22:25:56 +0200drbrule_drbrule
2020-10-05 22:25:56 +0200m-renaud_m-renaud
2020-10-05 22:25:56 +0200fiadliel_fiadliel
2020-10-05 22:25:56 +0200JSharp_JSharp
2020-10-05 22:25:59 +0200albethere_albethere
2020-10-05 22:26:01 +0200bitonic_bitonic
2020-10-05 22:26:21 +0200thecoffemaker(~thecoffem@unaffiliated/thecoffemaker)
2020-10-05 22:26:22 +0200rawles(~r@unaffiliated/rawles)
2020-10-05 22:26:25 +0200crtschin(~crtschin@104.131.9.149)
2020-10-05 22:26:28 +0200raoulb(~weechat@stateless.vsos.ethz.ch)
2020-10-05 22:26:35 +0200vqrs(~vqrs@learnprogramming/regular/vqrs)
2020-10-05 22:26:37 +0200Niamkik(~Niamkik@80.67.190.201)
2020-10-05 22:26:50 +0200ski. o O ( the joy of Matrix and IRCCloud netsplits ? )
2020-10-05 22:26:52 +0200alexfmpe(alexfmpema@gateway/shell/matrix.org/x-armmrcevlxedikov)
2020-10-05 22:27:11 +0200gcoakes[m](gcoakesmat@gateway/shell/matrix.org/x-klflsytbyxwgnxns)
2020-10-05 22:27:25 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds)
2020-10-05 22:27:27 +0200knupfer1(~Thunderbi@87.123.206.236)
2020-10-05 22:27:27 +0200knupfer1(~Thunderbi@87.123.206.236) (Client Quit)
2020-10-05 22:27:28 +0200joeyh_(joeyh@kitenet.net)
2020-10-05 22:27:28 +0200nick_h_(sid319833@gateway/web/irccloud.com/session)
2020-10-05 22:27:28 +0200verlet64__(sid261276@gateway/web/irccloud.com/session)
2020-10-05 22:27:28 +0200angerman_(sid209936@gateway/web/irccloud.com/session)
2020-10-05 22:27:28 +0200noCheese`(~nocheese@gw2.aibor.de)
2020-10-05 22:27:28 +0200recon_-(~quassel@2602:febc:0:b6::6ca2)
2020-10-05 22:27:28 +0200jokester_(~mono@2001:19f0:5:1e1d:5400:1ff:fe45:5877)
2020-10-05 22:27:28 +0200noCheese`noCheese
2020-10-05 22:27:28 +0200nick_h_nick_h
2020-10-05 22:27:28 +0200verlet64__verlet64_
2020-10-05 22:27:28 +0200_flow_(~none@salem.informatik.uni-erlangen.de)
2020-10-05 22:27:28 +0200nick_h(sid319833@gateway/web/irccloud.com/session) (Changing host)
2020-10-05 22:27:28 +0200nick_h(sid319833@gateway/web/irccloud.com/x-omwgtsberokhnnup)
2020-10-05 22:27:28 +0200verlet64_(sid261276@gateway/web/irccloud.com/session) (Changing host)
2020-10-05 22:27:28 +0200verlet64_(sid261276@gateway/web/irccloud.com/x-xjfovybibszlojpl)
2020-10-05 22:27:28 +0200angerman_(sid209936@gateway/web/irccloud.com/session) (Changing host)
2020-10-05 22:27:28 +0200angerman_(sid209936@gateway/web/irccloud.com/x-oahfetnahbdvwgfo)
2020-10-05 22:27:33 +0200noCheese(~nocheese@gw2.aibor.de) (Changing host)
2020-10-05 22:27:33 +0200noCheese(~nocheese@unaffiliated/nocheese)
2020-10-05 22:27:45 +0200int-enods
2020-10-05 22:27:54 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-10-05 22:27:55 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774) (Remote host closed the connection)
2020-10-05 22:27:58 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 22:27:59 +0200GyroW(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 22:27:59 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 22:28:02 +0200 <ski> so, then the question is whether to induct on `m' or on `n' in `m + n'. i think, from a certain standpoint, it makes more sense to induct on `m'
2020-10-05 22:28:12 +0200unclechu(unclechuma@gateway/shell/matrix.org/x-cpldnwvuqpqtgahy)
2020-10-05 22:28:12 +0200Fernando-Basso[m(fernando-b@gateway/shell/matrix.org/x-uztapoiqhwkucfsg)
2020-10-05 22:28:19 +0200nihilazo(nihilazoma@gateway/shell/matrix.org/x-bfhysqnthnkkkyqj)
2020-10-05 22:28:22 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-10-05 22:28:25 +0200Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds)
2020-10-05 22:28:51 +0200 <ski> when listing naturals in order, we tend to list them with `Z' at the leftmost, then, going rightwards, `S Z',`S (S Z)',&c.
2020-10-05 22:29:01 +0200siraben(sirabenmat@gateway/shell/matrix.org/x-zlvwcpsxsnpcahft)
2020-10-05 22:29:02 +0200jtojnar(jtojnarmat@gateway/shell/matrix.org/x-gjvcckkmfrtqleyn)
2020-10-05 22:29:02 +0200iinuwa1(iinuwamatr@gateway/shell/matrix.org/x-vozqawbtzhuizygn)
2020-10-05 22:29:13 +0200 <ski> (if you prefer writing right-to-left, then flip the order)
2020-10-05 22:29:25 +0200GuillaumeChrel[m(guillaumec@gateway/shell/matrix.org/x-kyytvilbqkccelxo)
2020-10-05 22:30:02 +0200 <ski> now consider finite prefices of the natural numbers. a type `Fin n', having the natural numbers (strictly) less than `n' as inhabitants
2020-10-05 22:30:08 +0200Ericson2314(ericson231@gateway/shell/matrix.org/x-tddshmiwufwouryw)
2020-10-05 22:32:31 +0200 <ski> it's natural to want to define two inclusions. if `i : Fin m', then `injl i : Fin (m + n)'. and if `j : Fin n', then `injr j : Fin (m + n)'
2020-10-05 22:32:36 +0200Amras(~Amras@unaffiliated/amras0000)
2020-10-05 22:33:11 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 22:33:25 +0200knupfer(~Thunderbi@200116b82cef8300c06758e924f2c41e.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
2020-10-05 22:34:02 +0200 <tomsmeding> which is fortunately nicely symmetric
2020-10-05 22:34:03 +0200machinedgod(~machinedg@142.169.78.196) (Ping timeout: 260 seconds)
2020-10-05 22:34:29 +0200 <ski> let's say we picked the version of `+' that does recursion on the left operand. then we'd have `injl Z = Z; injl (S i) = S (injl i)'
2020-10-05 22:35:29 +0200raehik(~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net)
2020-10-05 22:35:48 +0200 <ski> but we realize now that for `injr', we need to induct on `m' as well. so let's define `injr j : Fin (m + n)' in terms of `m + j : Fin (m + n)', where `Z + j = j; S m + j = S (m + j)'
2020-10-05 22:35:59 +0200 <sep2> Did I translate transition over correctly? https://dpaste.org/u84O
2020-10-05 22:36:06 +0200 <sep2> For letter
2020-10-05 22:36:32 +0200 <ski> we really need to induct on `m' here, not `j', since we need to rewrite the `m + n' in the type to something of the form `S (...)' to be able to use the data constructors of `Fin'
2020-10-05 22:37:03 +0200 <ski> sep2 : what's the final state ?
2020-10-05 22:37:08 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it) (Quit: Leaving)
2020-10-05 22:38:04 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 265 seconds)
2020-10-05 22:38:07 +0200 <ski> (if we have some kind of subtyping, we could allow `i : Fin (m + n)' if `i : Fin m', eliding the explicit `injl' call which just "copies" the constructors anyway)
2020-10-05 22:38:37 +0200 <tomsmeding> there is no single definition of + which makes both injl and injr natural, right
2020-10-05 22:38:52 +0200 <sep2> :ski final state should be {a}
2020-10-05 22:39:10 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it)
2020-10-05 22:39:11 +0200 <sep2> • Q={ε,a,T} •. s=ε • F = {a}
2020-10-05 22:39:13 +0200 <tomsmeding> so for choosing a definition of +, you'd have to look for a different motivation :p
2020-10-05 22:39:45 +0200 <ski> so, the effect of this is that, if we list the elements of say `Fin (3 + 5)', from least element, to greatest, we start with the elements corresponding to `Fin 3', being (using syntactic sugar) `0',`1',`2', and then comes the elements corresponding to `Fin 5', that is `3 + 0',`3 + 1',`3 + 2',`3 + 3',`3 + 4'
2020-10-05 22:40:13 +0200 <ski> sep2 : you have listed zero states (empty list), for your list of final states
2020-10-05 22:40:32 +0200kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-10-05 22:41:02 +0200 <ski> tomsmeding : i think it's reasonable, for `Either a b', if we're listing the elements of it, to list the elements coming from `a' to the left of the elements coming from `b' (since `a' occurs to the left of `b' in the type)
2020-10-05 22:41:48 +0200 <ski> and combining that with wanting to start from the least element, counting upwards as we're going to the right, forces this particular version of `+' (inducting on left operand)
2020-10-05 22:41:48 +0200 <tomsmeding> kind of?
2020-10-05 22:41:56 +0200 <ski> yea
2020-10-05 22:42:18 +0200 <tomsmeding> I find the motivation kind of far-fetched, but sure :p
2020-10-05 22:42:25 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds)
2020-10-05 22:42:42 +0200 <tomsmeding> it does invoke the kind of asymmetry you were looking for :p
2020-10-05 22:42:56 +0200 <ski> the premiss is somewhat weak, i agree. but it's the rationale that i've been able to find, so far, for preferring one over the other
2020-10-05 22:43:09 +0200 <tomsmeding> though maybe I'm understating the importance of Fin in dependent-typed programming
2020-10-05 22:43:19 +0200 <tomsmeding> s/understating/underestimating/
2020-10-05 22:44:20 +0200 <sep2> ski: with [1] ? [0] would indicate how many states but not which state?
2020-10-05 22:44:31 +0200 <ski> btw, note that `Fin m + Fin n = Fin (m + n)' expresses both injections (in the left-to-right direction), but also expresses a "try to subtract `m', either discovering that the input was less than `m', or else getting a difference that's less than `n'"
2020-10-05 22:44:37 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it) (Ping timeout: 264 seconds)
2020-10-05 22:45:17 +0200 <ski> sep2 : `0' is the way you're writing/encoding the starting state ⌜ε⌝, in Haskell
2020-10-05 22:45:46 +0200 <sep2> https://dpaste.org/5G3N
2020-10-05 22:45:50 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-10-05 22:46:22 +0200 <sep2> hold on
2020-10-05 22:47:11 +0200 <ski> (similarly, `Fin m * Fin n = Fin (m * n)' expresses converting between a "coordinate pair in a rectangle" and a "running index in a rectangle". in one case, it's `(i,j) |-> i * n + j', in the other it's `k |-> (k / n,k % n)')
2020-10-05 22:48:10 +0200 <ski> (and then, `(Fin m -> Fin n) = Fun (n ^ m)' is about converting between a number, and its digits, in a positional number system of base `n', having at most `m' digits)
2020-10-05 22:49:08 +0200 <tomsmeding> neat
2020-10-05 22:49:18 +0200 <ski> sep2 : `M = (states,starts,finals,transitions)' is an explanation of the rôles the different components in your quadruple, describing a finite state machine, play
2020-10-05 22:49:38 +0200 <tomsmeding> rôles
2020-10-05 22:49:47 +0200 <ski> one interesting thing about this is that, in this setting "division by zero" is not a problem :)
2020-10-05 22:49:56 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-10-05 22:50:02 +0200shadowdao(~user@unaffiliated/shadowdaemon)
2020-10-05 22:50:18 +0200 <tomsmeding> certainly so :p
2020-10-05 22:50:39 +0200 <sep2> ski: so when I used [1] for final state it was saying 0,1 are final states?
2020-10-05 22:50:50 +0200 <ski> i still haven't convinced myself whether to induct on left or right, for multiplication (although i'm heavily leaning towards left)
2020-10-05 22:51:11 +0200 <ski> (but that's the version i assumed, when i wrote `i * n + j', rather than `i + m * j')
2020-10-05 22:51:14 +0200GyroW(~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-05 22:51:24 +0200GyroW(~GyroW@d54c03e98.access.telenet.be)
2020-10-05 22:51:24 +0200GyroW(~GyroW@d54c03e98.access.telenet.be) (Changing host)
2020-10-05 22:51:24 +0200GyroW(~GyroW@unaffiliated/gyrow)
2020-10-05 22:52:01 +0200 <tomsmeding> (or `n * i + j')
2020-10-05 22:53:14 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-10-05 22:53:27 +0200Franciman(~francesco@host-212-171-42-250.pool212171.interbusiness.it)
2020-10-05 22:53:49 +0200caubert(~caubert@82.131.52.222.cable.starman.ee) (Remote host closed the connection)
2020-10-05 22:54:23 +0200 <ski> (then one can go on to have equalities/isomorphisms like `Sym (Fin n) = Fin (n !)', where `Sym A' is set of permutations (or (`Set') automorphisms, if you prefer) on `A'. it forms a group, the symmetric group, hence `Sym'. or `Sub (Fin n) (Fin k) = Fin (C n k)', where `C' is binomial coefficient, and `Sub A B' is set of `B'-sized subsets of `A' ..)
2020-10-05 22:54:33 +0200snakemasterflex(~snakemast@213.100.206.23)
2020-10-05 22:54:38 +0200caubert(~caubert@82.131.52.222.cable.starman.ee)
2020-10-05 22:55:25 +0200hexfive(~hexfive@50.35.90.193)
2020-10-05 22:55:30 +0200 <ski> tomsmeding : yes, but if `+' is doing induction on left parameter, then `n * i + j' will have to traverse `n * i' (which could be quite large), rather than just `j' (which is less than `n')
2020-10-05 22:55:50 +0200mananamenos(~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 256 seconds)
2020-10-05 22:56:13 +0200 <tomsmeding> I know, just noting that i*n+j and i+m*j are not the only options :p
2020-10-05 22:56:14 +0200 <ski> (hm, at least if we interpret `n * i + j' as `(n * i) + j' .. rather than as a ternary (mixfix) operation)
2020-10-05 22:56:20 +0200 <tomsmeding> lol
2020-10-05 22:56:25 +0200 <ski> yea, good point
2020-10-05 22:56:26 +0200 <tomsmeding> let's not go there
2020-10-05 22:57:01 +0200 <ski> sep2 : if you only specify `1' as final state, then that's the only final state that you've specified ..
2020-10-05 22:57:04 +0200 <ski> (a truism, i know)
2020-10-05 22:57:14 +0200hexfive(~hexfive@50.35.90.193) (Client Quit)
2020-10-05 22:57:20 +0200tomsmeding. o O ( :D )
2020-10-05 22:58:22 +0200 <ski> unless you interpret `M = (states,start,finals,transitions)' to mean that `finals' does not contain all the final states .. but that seems a bit weird to me. would you have any particular reason for such an interpretation (and how to know what the remaining final states are, then) ?
2020-10-05 22:58:42 +0200justan0theruser(~justanoth@unaffiliated/justanotheruser)
2020-10-05 22:59:29 +0200borne(~fritjof@200116b86471bb007fe01feb1760d29e.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-10-05 23:00:01 +0200Guest75545(~Fare@178.162.204.214) ()
2020-10-05 23:00:27 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2020-10-05 23:00:30 +0200 <ski> tomsmeding : anyway .. i'm only partly thinking about this as an exercise in counting, combinatorics (and dependent types in general). the other reason is to experiment with a notation for defining equalities (isomorphisms) between types, directly, rather than via two functions, which are then shown to be inverses of each other ..
2020-10-05 23:00:37 +0200Aquazi(uid312403@gateway/web/irccloud.com/x-truwgtvpybdfvjec) (Quit: Connection closed for inactivity)
2020-10-05 23:00:52 +0200 <dolio> Why is division by zero not a problem?
2020-10-05 23:01:01 +0200 <ski> (.. and doing that has led me to want to incorporate some ideas from logic programming into the mix)
2020-10-05 23:01:10 +0200 <tomsmeding> dolio: in that k / n, k : Fin n
2020-10-05 23:01:22 +0200 <tomsmeding> um
2020-10-05 23:01:22 +0200 <tomsmeding> no
2020-10-05 23:01:39 +0200 <tomsmeding> right, k : Fin (m * n)
2020-10-05 23:01:48 +0200 <tomsmeding> and if n = 0, then Fin (m * n) = Fin 0 = <empty>
2020-10-05 23:02:26 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 23:02:34 +0200 <zoom84> probably a stupid question but why is the mapping func of a functor b->a instead of a->a? Is it just to provide the flexibility of returning an output whose type is different from input?
2020-10-05 23:02:50 +0200 <Cheery> how about including (Maybe a) right in your algebra and making it closed over Nothing?
2020-10-05 23:03:32 +0200Franciman(~francesco@host-212-171-42-250.pool212171.interbusiness.it) (Quit: Leaving)
2020-10-05 23:03:54 +0200 <sep2> ski: [1] gives me 1 and empty list rather than 1?
2020-10-05 23:04:13 +0200 <ski> dolio : given `k : Fin (m * n)' we want to define `k / n : Fin m' and `k % n : Fin n'. we attempt to subtract `n' from `k', repeatedly, until we know `k < n'. but we have an upper bound on the number of subtractions (that's `m'), so we can't get stuck in an infinite loop. also, if `n' is zero, then `k' with `k < n' is impossible (and then `m * n = m * 0 = 0', so `k < m * n' was also impossible, to begin with)
2020-10-05 23:04:33 +0200caubert(~caubert@82.131.52.222.cable.starman.ee) (Remote host closed the connection)
2020-10-05 23:05:51 +0200 <ski> zoom84 : yes. it's "just" that
2020-10-05 23:05:58 +0200 <ski> (that's not a small thing, btw)
2020-10-05 23:06:08 +0200conal(~conal@64.71.133.70)
2020-10-05 23:06:17 +0200 <zoom84> is there a built-in version that uses a->a instead? or would I have to write my own?
2020-10-05 23:06:22 +0200Franciman(~francesco@host-212-171-42-250.pool212171.interbusiness.it)
2020-10-05 23:06:28 +0200 <ski> (also, the mathematical concept of "functor", that Haskell's `Functor' is modelled after / inspired by, requires that flexibility)
2020-10-05 23:06:47 +0200 <tomsmeding> zoom84: b->a can also be used as a->a :p
2020-10-05 23:07:11 +0200 <tomsmeding> > fmap (+1) [1..5]
2020-10-05 23:07:13 +0200 <lambdabot> [2,3,4,5,6]
2020-10-05 23:07:29 +0200 <ski> zoom84 : <https://hackage.haskell.org/package/mono-traversable-1.0.15.1/docs/Data-MonoTraversable.html#t:Mon…>
2020-10-05 23:07:42 +0200 <dolio> Oh, I see. Dividing an element of the finite set by a factor of the index.
2020-10-05 23:07:47 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774) (Remote host closed the connection)
2020-10-05 23:07:55 +0200ericsagnes(~ericsagne@2405:6580:0:5100:e0:d1d9:7c60:99ac) (Ping timeout: 240 seconds)
2020-10-05 23:08:07 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-10-05 23:08:13 +0200 <zoom84> tomsmeding, Understood. But an a->a version would permit more flexibility, such as for constructors that take two values of the same type
2020-10-05 23:08:26 +0200 <ski> sep2 : what do you mean by "[1] gives me 1 and empty list rather than 1?" ? i don't understand the question
2020-10-05 23:08:39 +0200 <zoom84> thanks for the link @ski
2020-10-05 23:08:40 +0200coot(~coot@37.30.49.218.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-10-05 23:08:48 +0200 <tomsmeding> zoom84: if you have a type that can _only_ support an a->a operation, then indeed the link by ski
2020-10-05 23:08:59 +0200 <ski> zoom84 : if you define `data Pair a = MkPair a a', then you can easily make an `instance Functor Pair where ...'
2020-10-05 23:09:17 +0200 <tomsmeding> yes that :p
2020-10-05 23:10:03 +0200 <ski> `MonoFunctor' is when your data type forces a particular "element type"
2020-10-05 23:10:26 +0200 <tomsmeding> or, I guess, for stuff like Set?
2020-10-05 23:10:28 +0200 <sep2> ski: my final state is [1], and you let me know that there's two final states in that
2020-10-05 23:10:35 +0200 <tomsmeding> though MonoFunctor is not really the right restriction there
2020-10-05 23:10:42 +0200 <ski> `Functor' is when your data type is parametric, allows the user of it to specify which "element type" they want to use (and so then it's useful to be able to switch from one "element type" to another)
2020-10-05 23:10:58 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774) (Remote host closed the connection)
2020-10-05 23:11:18 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-10-05 23:11:22 +0200 <ski> <sep2> • Q={ε,a,T} •. s=ε • F = {a}
2020-10-05 23:11:38 +0200 <ski> sep2 : could you explain what is ⌜a⌝ here ?
2020-10-05 23:13:27 +0200 <dsal> fmap for `->` is just `.` isn't it?
2020-10-05 23:13:38 +0200 <ski> yes
2020-10-05 23:14:08 +0200 <tomsmeding> which belongs in the list of niceties together with ($) = id
2020-10-05 23:14:11 +0200 <ski> fmap :: (a -> b) -> ((rho ->) a -> (rho ->) b)
2020-10-05 23:15:25 +0200Guest89(ae15459e@gateway/web/cgi-irc/kiwiirc.com/ip.174.21.69.158)
2020-10-05 23:15:38 +0200 <ski> it used to be the case, in lambdabot, that `(.)' was defined as `(.) = fmap' (with the general type, yes). also with `flip fs a = fmap ($ a) fs'
2020-10-05 23:15:50 +0200Guest89(ae15459e@gateway/web/cgi-irc/kiwiirc.com/ip.174.21.69.158) (Client Quit)
2020-10-05 23:16:00 +0200 <ski> @type let flip fs a = fmap ($ a) fs in flip
2020-10-05 23:16:01 +0200 <lambdabot> Functor f => f (a -> b) -> a -> f b
2020-10-05 23:16:37 +0200 <ski> so you could say `flip [(2 +),(2 *),(2 ^)] 3', e.g.
2020-10-05 23:16:42 +0200shafox(~shafox@106.51.234.111) (Remote host closed the connection)
2020-10-05 23:17:09 +0200 <ski> > [(2 +),(2 *),(2 ^)] `sequence` 3 -- another way to get the same thing
2020-10-05 23:17:12 +0200 <lambdabot> [5,6,8]
2020-10-05 23:18:19 +0200 <ski> zoom84 : did you try making such an instance for `Pair', perhaps ?
2020-10-05 23:18:30 +0200 <sep2> ski: I had the thought that I just fill in the numbers for a espilon, a, T so I used 0,1,2
2020-10-05 23:18:42 +0200bbear(~dkremer@2a01:e34:ec2b:d430:cc93:67b2:c4ea:7463)
2020-10-05 23:18:50 +0200 <ski> sep2 : is ⌜a⌝ a state ?, is ⌜T⌝ a state ?
2020-10-05 23:18:52 +0200 <dolio> ski: That seems kind of like the 'division' equivalent of the type theoretic 'axiom of choice'.
2020-10-05 23:19:10 +0200snakemasterflex(~snakemast@213.100.206.23) (Ping timeout: 246 seconds)
2020-10-05 23:19:20 +0200 <ski> dolio : hm, which ?
2020-10-05 23:19:36 +0200 <tomsmeding> ski: that's an... interesting definition of 'flip'
2020-10-05 23:19:53 +0200 <ski> > sequence ["ab","012"] -- you mean this ?
2020-10-05 23:19:55 +0200 <lambdabot> ["a0","a1","a2","b0","b1","b2"]
2020-10-05 23:20:09 +0200 <ski> tomsmeding : actually, i recall seeing it in a math paper :)
2020-10-05 23:20:26 +0200ericsagnes(~ericsagne@2405:6580:0:5100:a920:8792:1be2:949f)
2020-10-05 23:20:27 +0200 <dolio> ski: By that I mean, what is sometimes called 'the axiom of choice' is just rearranging a choice that has already been made. :)
2020-10-05 23:20:50 +0200 <ski> dolio : yes. i'm just not seeing the relation to what was discussed above
2020-10-05 23:20:55 +0200 <monochrom> Ha, I like that, dolio. :)
2020-10-05 23:20:58 +0200 <tomsmeding> Like sure, the function is nice, but why call it 'flip' :p
2020-10-05 23:20:58 +0200 <dolio> And this 'divide by zero' is obligated to provide the other factor of 0 as a premise.
2020-10-05 23:21:03 +0200jesusabdullah(~jesusabdu@178.162.204.214)
2020-10-05 23:21:38 +0200 <zoom84> :r
2020-10-05 23:22:03 +0200 <ski> (Bishop expresses it as it lying in the meaning of the existential quantifier that a choice already has been made. but then, the operation that the AoC gives you needn't be extensional wrt the equivalence relation you've specified your sets (setoids) with)
2020-10-05 23:22:43 +0200 <dolio> Right. In something like HoTT you can write a proper notion of the axiom of choice.
2020-10-05 23:23:17 +0200 <monochrom> "If I have a whole bunch of non-empty sets" --- sounds like for each set there, I have already chosen an element. "then their cartesian product is non-empty" --- use the aforementioned chosen elements to form the desired sequence. What can possibly go wrong? :)
2020-10-05 23:23:42 +0200ski. o O ( "Intensional vs Extensional Choice" by roconnor in 2005-06-04 at <http://r6.ca/blog/20050604T143800Z.html> )
2020-10-05 23:23:47 +0200 <dolio> Without having to decode it into the setoid interpretation explicitly.
2020-10-05 23:24:12 +0200jwynn6(~jwynn6@050-088-122-078.res.spectrum.com)
2020-10-05 23:24:16 +0200mav1(~mav@p5dee344b.dip0.t-ipconnect.de)
2020-10-05 23:24:21 +0200 <sep2> ski: from what I can tell they're all states start, end and trap
2020-10-05 23:25:24 +0200 <ski> dolio : well, i think it can be blind in `m'. it's just that, if `n' is zero, then there is no `k : Fin (m * 0)', and so we can't even get to the point of evaluating `k / n'
2020-10-05 23:25:39 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774) (Remote host closed the connection)
2020-10-05 23:25:40 +0200Franciman(~francesco@host-212-171-42-250.pool212171.interbusiness.it) (Remote host closed the connection)
2020-10-05 23:25:58 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it)
2020-10-05 23:26:00 +0200cosimone(~user@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-10-05 23:26:44 +0200 <dolio> But you can't call the function on `Fin i` without exhibiting a factorization of `i`.
2020-10-05 23:27:25 +0200 <ski> sep2 : i don't know the particular flavor of FSMs that you're dealing with. but `M = (states,start,finals,transitions)' only seems to mention start state and final states as being "special", from the point of view of this general FSM description. in other words, no "trap" states. in particular FSMs that you construct, you could have some other state(s ?) that you call "trap" states, though
2020-10-05 23:28:24 +0200 <ski> dolio : yea. i remember when i discovered that, years ago, i called it `skolem' (since i associated it with skolemization, not with axiom-of-choice, not sure i'd seen that formulation of it then)
2020-10-05 23:29:03 +0200dcabrejas(bcd609cc@188.214.9.204)
2020-10-05 23:29:20 +0200 <dolio> Well, I don't exactly mean it's the axiom of choice, but it's giving it the 'hard part' in a similar way.
2020-10-05 23:30:02 +0200 <ski> sep2 : so, for your particular FSM that you're trying to encode (which one is that, at the moment, `emptyFSM' or some other ?), you can have ⌜T⌝ be a "trap" state. but you never answered me whether ⌜a⌝ was also a state, or not
2020-10-05 23:31:35 +0200 <ski> dolio : i think it's likely that the reason why it's provable in type theory is related to the fact that mathematicians have regarded it as being obviously true
2020-10-05 23:31:48 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 23:32:12 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 244 seconds)
2020-10-05 23:32:19 +0200 <ski> (it all has to do with the interpretation one gives to "there exists". and also, from what i understand, whether one allows defining quotient sets/types)
2020-10-05 23:32:26 +0200 <dolio> Well, the problem with mathematicians is that they don't actually make the choice beforehand.
2020-10-05 23:32:39 +0200 <ski> yea, so it's a conflation of two different senses
2020-10-05 23:32:54 +0200 <ski> (that's how it looks to me, at least)
2020-10-05 23:33:15 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Quit: Leaving)
2020-10-05 23:33:16 +0200 <sep2> ski: I see a would be one of the sigmas correct
2020-10-05 23:33:28 +0200hackagehsinspect 0.0.14 - Inspect Haskell source files. https://hackage.haskell.org/package/hsinspect-0.0.14 (tseenshe)
2020-10-05 23:33:36 +0200 <ski> sep2 : i dunno what "the sigmas" are, in your context, so i can't answer
2020-10-05 23:34:02 +0200mirrorbird(~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276)
2020-10-05 23:35:17 +0200 <ski> sep2 : hm, looking at your paste, perhaps `sigma' refers to your set of allowed symbols/tokens, that your FSM is meant to recognize some subset of finite words, built from such symbols, from ?
2020-10-05 23:35:53 +0200 <monochrom> ski: Nice link to roconnor's post, thanks.
2020-10-05 23:36:02 +0200 <dolio> I think the real problem with classical mathematics is that it extrapolates too much from finite things to infinite things.
2020-10-05 23:36:06 +0200 <ski> dolio : "But you can't call the function on `Fin i` without exhibiting a factorization of `i`." -- yea, good point
2020-10-05 23:36:50 +0200 <dolio> Like, excluded middle is kind of reasonable in a completely finite setting.
2020-10-05 23:37:14 +0200 <monochrom> Also, sep2's alphabet Σ is simply {'0', '1'} or {'a', 'b'}, I forgot which, but it's a fixed hardcoded alphabet.
2020-10-05 23:38:23 +0200 <dolio> (Still not really reasonable probably, but more reasonable.)
2020-10-05 23:38:40 +0200 <frdg> is it possible to write `subset` with only a Foldable instance? https://dpaste.org/Vuo3
2020-10-05 23:39:25 +0200Buntspecht(~user@unaffiliated/siracusa) (Ping timeout: 240 seconds)
2020-10-05 23:39:30 +0200wroathe_(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-10-05 23:39:45 +0200 <ski> frdg> :t member
2020-10-05 23:39:59 +0200Buntspecht(~user@unaffiliated/siracusa)
2020-10-05 23:40:13 +0200 <frdg> member :: (Foldable t, Eq a) => a -> t a -> Bool
2020-10-05 23:40:31 +0200 <monochrom> @type \xs ys -> all (\x -> elem x ys) xs
2020-10-05 23:40:33 +0200 <lambdabot> (Foldable t1, Foldable t2, Eq a) => t1 a -> t2 a -> Bool
2020-10-05 23:40:37 +0200 <ski> try `flip member s2' instead of `member s2'
2020-10-05 23:41:09 +0200 <frdg> ski: I was close :)
2020-10-05 23:41:20 +0200 <monochrom> Also it means that the two sets don't have to have the same container type.
2020-10-05 23:41:21 +0200 <ski> foldr ((&&) . (`member` s2)) True s1 -- would also be possible
2020-10-05 23:42:32 +0200st8less(~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Ping timeout: 244 seconds)
2020-10-05 23:43:53 +0200 <ski> @let member x s = foldr ((||) . (== x)) False s
2020-10-05 23:43:55 +0200 <lambdabot> Defined.
2020-10-05 23:43:58 +0200 <ski> @type member
2020-10-05 23:43:59 +0200 <lambdabot> (Foldable t, Eq a) => a -> t a -> Bool
2020-10-05 23:44:12 +0200 <ski> @type \s0 s1 -> foldr ((&&) . (`member` s1)) True s0
2020-10-05 23:44:14 +0200 <lambdabot> (Foldable t1, Foldable t2, Eq a) => t1 a -> t2 a -> Bool
2020-10-05 23:44:29 +0200conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-10-05 23:45:07 +0200NinjaTrappeur(~ninja@unaffiliated/ninjatrappeur) (Ping timeout: 240 seconds)
2020-10-05 23:45:22 +0200 <ski> dolio : well, there's also "subfinite" and other such fuzzy things
2020-10-05 23:45:29 +0200dcabrejas(bcd609cc@188.214.9.204) (Ping timeout: 245 seconds)
2020-10-05 23:45:36 +0200ski. o O ( Kripke semantics )
2020-10-05 23:45:41 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-05 23:45:45 +0200 <monochrom> What is subfinite?
2020-10-05 23:45:51 +0200 <ski> a subset of a finite set
2020-10-05 23:46:01 +0200 <ski> (which needn't be finite itself, constructively)
2020-10-05 23:46:14 +0200 <monochrom> Yikes.
2020-10-05 23:46:23 +0200 <ski> (that it, one can't prove it's not finite. but one can't always prove it's finite, either)
2020-10-05 23:46:23 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-05 23:46:27 +0200NinjaTrappeur(~ninja@unaffiliated/ninjatrappeur)
2020-10-05 23:46:46 +0200 <monochrom> Constructive math is too hard. :)
2020-10-05 23:46:58 +0200 <zoom84> ski, here's what I came up with for your suggestion that MkPair a a would work. Compiles and runs. Lemme know if I missed anything:
2020-10-05 23:47:17 +0200 <zoom84> data Pair a = MkSingle a | MkPair a a deriving(Show, Eq)
2020-10-05 23:47:21 +0200 <zoom84> instance Functor (Pair) where
2020-10-05 23:47:26 +0200 <zoom84> fmap :: (a -> b) -> Pair a -> Pair b
2020-10-05 23:47:27 +0200 <ski> consider `{() | Goldbach}'. claiming this is finite amounts to having a bijection with a prefix of the natural numbers. which means that we could then decide Goldbach's conjecture from such a hypothetical proof of finiteness
2020-10-05 23:47:31 +0200 <zoom84> fmap f (MkPair x y) = MkPair (f x) (f y)
2020-10-05 23:47:35 +0200 <zoom84> fmap f (MkSingle x) = MkSingle (f x)
2020-10-05 23:48:00 +0200 <dolio> ski: Subfinite is a notion from constructive mathematics, though.
2020-10-05 23:48:05 +0200 <ski> zoom84 : that's fine. although in my version, i had no `MkSingle', just `MkPair'
2020-10-05 23:48:09 +0200 <ski> dolio : yes
2020-10-05 23:48:39 +0200 <monochrom> I still like the fact that constructive math/logic points out where I am using non-constructive choices. But I still insist on using those non-constructive choices.
2020-10-05 23:48:48 +0200 <ski> one can model stages of knowledge about some mathematical object or structure, with Kripke semantics
2020-10-05 23:48:50 +0200 <dolio> Also I mean, subfinite is a concept that arises once infinite things exist.
2020-10-05 23:49:04 +0200 <zoom84> understood ski, thanks. i wanted to include a single var constructor as well because I wanted to see fmap work for both cases in a single type
2020-10-05 23:49:14 +0200sep2(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2020-10-05 23:49:16 +0200 <monochrom> Also, I recognize that natural deduction for constructive logic is so nicely symmetric.
2020-10-05 23:49:24 +0200 <zoom84> which can't be done for (a->b), at least with the standard functor
2020-10-05 23:49:47 +0200 <monochrom> (However! Classical logic also also nicely symmetric in the lattice sense.)
2020-10-05 23:50:11 +0200 <ski> so, we can have one stage ("possible world") in which neither `A' nor `not A' is known. and then have two alternative possible future stages, one in which `A' is known, and another in which `not A' is known. and the interpretation of `not Phi' is that it holds at a stage, if for no future stages (no accessible worlds) we have that `Phi' holds
2020-10-05 23:50:11 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-05 23:50:20 +0200 <dolio> Ah, but so is linear logic, which is properly constructive still.
2020-10-05 23:50:27 +0200 <ski> so, at the initial stage, we can neither claim `A' nor `not A'
2020-10-05 23:51:21 +0200 <dolio> There's kind of a sense in which linear logic takes constructiveness more seriously than intuitionism.
2020-10-05 23:51:25 +0200 <ski> another thing one can model here is "discovering new elements of domains". we could know that `a' and `b' are elements (generators, say) of a presentation of a group. in a later stage, we may learn `c' is also a generator
2020-10-05 23:51:47 +0200 <ski> and at different stages, we can also learn relations between "words" involving these generators
2020-10-05 23:52:00 +0200 <monochrom> Ah, increasing stages of knowledge. I didn't think of that analogy when I learned this.
2020-10-05 23:52:05 +0200 <dolio> Because the linear dual of something is like a positive disproof rather than 'assuming this leads to a contradiction.'
2020-10-05 23:52:32 +0200 <ski> so, this is about being able to reason with partial knowledge, what holds for a group presentation where `a' and `b' are generators, but we haven't decided yet if there's to be any more ? (and possibly also not decided yet whether `a = b')
2020-10-05 23:52:39 +0200 <monochrom> (A true formalist, I just learned and obeyed the rules of making a Kripke multiverse without asking why. :) )
2020-10-05 23:52:50 +0200 <ski> zoom84 : ah, ok
2020-10-05 23:53:26 +0200 <monochrom> (I did have my intuition, but it's only based on "I tried many examples and they all work out, this looks solid". :) )
2020-10-05 23:53:30 +0200 <ski> dolio : "Also I mean, subfinite is a concept that arises once infinite things exist." -- yea, i suppose so
2020-10-05 23:54:06 +0200 <ski> monochrom : "Also, I recognize that natural deduction for constructive logic is so nicely symmetric." -- but sequent calculus for classical logic is also very nicely symmetric (even a bit more so, i'd say) :)
2020-10-05 23:54:16 +0200 <monochrom> Yeah!
2020-10-05 23:54:38 +0200 <monochrom> But somehow I like the lattice story more than the sequent calculus story for classical logic.
2020-10-05 23:54:44 +0200 <ski> monochrom : .. but the problem then is that cut-elimination (normalization of proofs, removing lemmata, going to canonical/direct proofs) is non-deterministic, for the classical case
2020-10-05 23:55:00 +0200 <monochrom> Every powerset lattice is a boolean lattice \∩/
2020-10-05 23:55:14 +0200 <ski> (but then, classical linear logic somehow manages to be computational, not have such non-determinism ..)
2020-10-05 23:55:38 +0200Franciman(~francesco@host-212-171-42-250.retail.telecomitalia.it) (Quit: Leaving)
2020-10-05 23:55:38 +0200 <ski> (ah, dolio already mentioned linear logic :)
2020-10-05 23:55:41 +0200fendor(~fendor@77.119.129.78.wireless.dyn.drei.com) (Remote host closed the connection)
2020-10-05 23:56:10 +0200 <dolio> There's also some work on non-linear 'logic' that has this kind of duality.
2020-10-05 23:56:37 +0200 <dolio> You get essentially all the same connectives, but they're distinct in a different way.
2020-10-05 23:56:50 +0200 <dolio> And the difference is evaluation order.
2020-10-05 23:57:13 +0200 <ski> monochrom : it's interesting that for finitely presented groups, we have the "word problem", that it's not decidable whether two presented elements are equal. this proposition is "affirmative", in the sense that if they are equal, then a search of the space will eventually find the proof using the relations/laws of the presentation
2020-10-05 23:57:23 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-05 23:57:23 +0200GyroW_(~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-05 23:57:23 +0200GyroW_(~GyroW@unaffiliated/gyrow)
2020-10-05 23:57:38 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 260 seconds)
2020-10-05 23:58:04 +0200 <ski> monochrom : otoh, for real numbers, defined in terms of Cauchy sequences, it's the other way around. if they're not equal (they're apart), we'll eventually learn so, by taking fine enough approximations. but if they're equal, then inspecting the approximations won't terminate
2020-10-05 23:58:07 +0200 <dolio> So like, + is call-by-value, and \par is call-by-name.
2020-10-05 23:59:21 +0200 <ski> dolio : i think Mike Shulman has been trying to make use of linear logic (or actually affine, iirc), to do interesting math, to more nicely explain things (like splitting of notions) in constructive math
2020-10-05 23:59:40 +0200 <dolio> Yeah, that's one of the things I'm drawing from.