Logs: freenode/#haskell
| 2020-11-15 13:37:25 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 13:37:25 | × | jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 260 seconds) |
| 2020-11-15 13:37:35 | <matthew-> | so, this suggests that the typing env is cloned for each part of the tuple |
| 2020-11-15 13:38:13 | <geekosaur> | hm, I never shut that flag off, did I |
| 2020-11-15 13:38:14 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-15 13:38:38 | <matthew-> | but I've seen some texts suggest that (id 3, id "x") should error, presumably because the instantiation of the type of id is shared |
| 2020-11-15 13:39:34 | <matthew-> | this is one problem with a lot of the HM presentations not going into things like lists or tuples |
| 2020-11-15 13:41:20 | <__monty__> | matthew-: You do run into trouble with the monomorphism restriction if you expect this behavior in general though. |
| 2020-11-15 13:41:22 | → | avdb joins (~avdb@ip-83-134-109-106.dsl.scarlet.be) |
| 2020-11-15 13:41:37 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
| 2020-11-15 13:41:53 | <matthew-> | so I *thought* the monomorphism restriction only comes into play in recursion. Am I mistaken? |
| 2020-11-15 13:42:34 | × | geekosaur quits (ac3a8f2b@172.58.143.43) (Ping timeout: 245 seconds) |
| 2020-11-15 13:42:49 | <matthew-> | because, essentially, the fix instantiates the binder right at the start of the abstraction |
| 2020-11-15 13:43:23 | → | geekosaur joins (ac3a8f2f@172.58.143.47) |
| 2020-11-15 13:43:26 | <matthew-> | well, that's how it can be implemented. I'm less familiar with the details of what is actually sound to do... |
| 2020-11-15 13:43:30 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 13:43:49 | × | kish` quits (~oracle@unaffiliated/oracle) (Remote host closed the connection) |
| 2020-11-15 13:44:26 | <bqv> | suzu_: ow |
| 2020-11-15 13:45:12 | → | kish` joins (~oracle@unaffiliated/oracle) |
| 2020-11-15 13:45:12 | <geekosaur> | % :set -fno-print-explicit-foralls |
| 2020-11-15 13:45:12 | <yahb> | geekosaur: |
| 2020-11-15 13:45:30 | <geekosaur> | (unrelated to your question) |
| 2020-11-15 13:46:34 | <merijn> | matthew-: The monomorphism restriction comes into play for "bindings that look like values (aka, no arguments on the left of =) and which are typeclass polymorphic" |
| 2020-11-15 13:47:22 | × | knupfer quits (~Thunderbi@200116b82c37cc0084cc5f3e9837ddce.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-11-15 13:47:34 | <merijn> | matthew-: The usual "tuple and id" quandary you see is that '(\f -> (f 3, f "x")) id' doesn't typecheck, but I'm not sure if you were referring to that or something else |
| 2020-11-15 13:48:02 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 264 seconds) |
| 2020-11-15 13:51:34 | <matthew-> | merijn: thank you, yes that makes sense (though this is just for plain lc with HM, not haskell). I've just misread then. Ok, so each type inference for each child of a list or tuple ast node should be done in isolation. That's what I've got wrong :) |
| 2020-11-15 13:51:50 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-15 13:52:17 | → | feliocrat joins (~feliocrat@95.70.185.239) |
| 2020-11-15 13:53:55 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer) |
| 2020-11-15 13:54:57 | <merijn> | matthew-: So, that specific example requires Rank2 types which is (theoretically) inferrable, but I don't think anyone ever implemented the inference in a real world compiler, because it's atrocious and hard |
| 2020-11-15 13:55:16 | <merijn> | And Rank3 and higher types are impossible to infer at all |
| 2020-11-15 13:55:57 | <matthew-> | yup, I'm completely avoiding anything above rank-1 |
| 2020-11-15 13:56:31 | <merijn> | I assume you've got TaPL already? ;) |
| 2020-11-15 13:56:40 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2020-11-15 13:58:10 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 2020-11-15 13:58:24 | → | texasmynsted joins (~texasmyns@212.102.45.112) |
| 2020-11-15 13:58:26 | <matthew-> | indeed. as basically everyone in this channel refers me to. I have it open on my desk in front of me, along with the attpl |
| 2020-11-15 13:58:49 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 2020-11-15 13:59:16 | → | FTB joins (5f5ac942@ip5f5ac942.dynamic.kabel-deutschland.de) |
| 2020-11-15 13:59:53 | <FTB> | hello dear community, im about to start the book "learn you haskell for good" |
| 2020-11-15 14:00:16 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 14:00:47 | × | jmcarthur quits (~jmcarthur@2601:86:500:2a40:db56:5d66:5919:c95d) (Ping timeout: 260 seconds) |
| 2020-11-15 14:00:55 | <merijn> | matthew-: Just checking ;) |
| 2020-11-15 14:02:49 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
| 2020-11-15 14:03:11 | <matthew-> | merijn: :) It's funny how many resources you end up working with in order to build a usable language. For example, I have pattern matching, tuples and lists ... and finding a single text which covers them all is tricky |
| 2020-11-15 14:03:31 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 246 seconds) |
| 2020-11-15 14:04:33 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 2020-11-15 14:04:36 | <matthew-> | merijn: plus of course a lot of the impls you find are written in Haskell... which obviously isn't a problem or a surprise... but just teasing out some of the details - mistakes happen! |
| 2020-11-15 14:05:15 | × | alp quits (~alp@2a01:e0a:58b:4920:9050:e88b:814f:ac3d) (Ping timeout: 272 seconds) |
| 2020-11-15 14:06:31 | <merijn> | matthew-: The GHC wiki should (somewhere) have a list of papers talking about various parts of GHC too, which may or may not be helpful |
| 2020-11-15 14:07:38 | → | mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
| 2020-11-15 14:08:04 | × | whatisRT quits (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2020-11-15 14:12:12 | cosmic-sans | is now known as oats |
| 2020-11-15 14:13:11 | <matthew-> | merijn: ahh, thanks for the pointer. I'll take a look |
| 2020-11-15 14:22:36 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 2020-11-15 14:23:00 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-15 14:23:10 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2020-11-15 14:24:49 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-11-15 14:25:54 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-15 14:28:24 | × | geekosaur quits (ac3a8f2f@172.58.143.47) (Ping timeout: 245 seconds) |
| 2020-11-15 14:28:28 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 2020-11-15 14:29:53 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 14:32:53 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 2020-11-15 14:37:30 | hackage | quickcheck-instances 0.3.25.1 - Common quickcheck instances https://hackage.haskell.org/package/quickcheck-instances-0.3.25.1 (phadej) |
| 2020-11-15 14:37:56 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-15 14:38:17 | → | p0a joins (~user@unaffiliated/p0a) |
| 2020-11-15 14:38:47 | → | geekosaur joins (ac3a8f2f@172.58.143.47) |
| 2020-11-15 14:40:06 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 2020-11-15 14:41:21 | × | avdb quits (~avdb@ip-83-134-109-106.dsl.scarlet.be) (Ping timeout: 260 seconds) |
| 2020-11-15 14:42:20 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-11-15 14:42:53 | <p0a> | hello with ByteString.Lazy, what exactly is the logic of Get? |
| 2020-11-15 14:43:41 | <p0a> | Isn't it to read some input and then do something with it? So to repeat this until EOF, what would I have to do? use `until' for example, and check for eof on the handle? |
| 2020-11-15 14:46:20 | <nshepperd2> | p0a: You mean Get from the 'binary' package? |
| 2020-11-15 14:48:07 | <p0a> | yes nshepperd2, thank you |
| 2020-11-15 14:48:17 | <nshepperd2> | Get represents a parser |
| 2020-11-15 14:48:41 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:78e6:f613:58de:505f) |
| 2020-11-15 14:49:08 | <nshepperd2> | when you call runGet, it parses the bytestring and returns the decoded contents as a haskell object |
| 2020-11-15 14:50:02 | <p0a> | alright |
| 2020-11-15 14:50:30 | hackage | shake 0.19.2 - Build system library, like Make, but more accurate dependencies. https://hackage.haskell.org/package/shake-0.19.2 (NeilMitchell) |
| 2020-11-15 14:50:31 | <nshepperd2> | if your bytestring represents a series of many items, you need to either construct a Get parser that parses a list or items, then call runGet once |
| 2020-11-15 14:50:56 | <p0a> | so it's inappropriate to do things in a Get parser? |
| 2020-11-15 14:50:58 | <p0a> | such as printing results? |
| 2020-11-15 14:51:07 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:78e6:f613:58de:505f) (Client Quit) |
| 2020-11-15 14:51:19 | <p0a> | How do you efficiently implement unix `cat' in lazy IO with Get? |
| 2020-11-15 14:51:57 | <p0a> | I'm sorry for the fragmented sentences, I'm a bit tired. |
| 2020-11-15 14:51:57 | <geekosaur> | I wouldn't be using the binary package to do that |
| 2020-11-15 14:51:59 | <nshepperd2> | or use runGetIncremental to do one-at-a-time type parsing |
| 2020-11-15 14:52:39 | <p0a> | geekosaur: I'm trying to write a utility like `hd' for fun |
| 2020-11-15 14:52:40 | <nshepperd2> | doesn't `cat` just read input and write it to the output? you don't need to parse anything for that |
| 2020-11-15 14:53:18 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 2020-11-15 14:53:30 | <p0a> | alright |
| 2020-11-15 14:53:42 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-15 14:53:49 | <p0a> | so I just realized I was misusing that Get parser. I see I should've been using runGetIncremental |
| 2020-11-15 14:54:13 | <p0a> | but also I shouldn't be using readFile, I should use a handle instead with binary mode on. Using readFile, I don't know how to check for eof |
| 2020-11-15 14:54:24 | <p0a> | so... I don't know how to `read' in a loop until eof |
| 2020-11-15 14:54:26 | <nshepperd2> | hd, as in a hex dumping utility? |
| 2020-11-15 14:54:29 | <p0a> | yeah |
| 2020-11-15 14:55:09 | <nshepperd2> | yeah I wouldn't use the binary package for that either, I think |
| 2020-11-15 14:55:18 | <nshepperd2> | it's meant more for structured data |
All times are in UTC.