Logs: liberachat/#haskell
| 2021-06-15 10:20:08 | <teaSlurper> | thx sshine |
| 2021-06-15 10:21:14 | <teaSlurper> | % 1 : (1 : (...)) |
| 2021-06-15 10:21:14 | <yahb> | teaSlurper: ; <interactive>:7:10: error:; * Couldn't match expected type: [a]; with actual type: LensLike f0 s0 t0 c0 c0 -> Over p0 f0 c0 c0 a0 b0 -> Over p0 f0 s0 t0 a0 b0; * Probable cause: `(...)' is applied to too few arguments; In the second argument of `(:)', namely `(...)'; In the second argument of `(:)', namely `(1 : (...))'; In the expression: 1 : (1 : (...)); |
| 2021-06-15 10:21:48 | → | ddellacosta joins (~ddellacos@86.106.143.73) |
| 2021-06-15 10:23:20 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2021-06-15 10:23:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 10:24:04 | <siers> | can I have a haddock named paragraph (like -- $paragraph) but in multiline comments? |
| 2021-06-15 10:24:05 | <dminuoso> | teaSlurper: you can use undefined as a placeholder. :) |
| 2021-06-15 10:24:24 | <dminuoso> | % x :: [Int]; x = (1 : (2 : (3 : []))) |
| 2021-06-15 10:24:25 | <yahb> | dminuoso: |
| 2021-06-15 10:24:34 | <dminuoso> | % x |
| 2021-06-15 10:24:35 | <yahb> | dminuoso: [1,2,3] |
| 2021-06-15 10:24:51 | <dminuoso> | % :t (:) |
| 2021-06-15 10:24:52 | <yahb> | dminuoso: a -> [a] -> [a] |
| 2021-06-15 10:26:45 | × | ddellacosta quits (~ddellacos@86.106.143.73) (Ping timeout: 244 seconds) |
| 2021-06-15 10:27:16 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 2021-06-15 10:27:45 | × | Guest5851 quits (~Guest58@ti0182q160-6494.bb.online.no) (Quit: Client closed) |
| 2021-06-15 10:28:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
| 2021-06-15 10:29:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 10:29:42 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2021-06-15 10:29:53 | <teaSlurper> | dminuoso: is (...) actually some sort of haskell thing though? infinity operator or something? |
| 2021-06-15 10:29:59 | <teaSlurper> | ... |
| 2021-06-15 10:30:11 | <teaSlurper> | under the hood it used that or? |
| 2021-06-15 10:32:38 | <dminuoso> | No, that was just my informal way of phrasing "more stuff goes here" |
| 2021-06-15 10:33:21 | <dminuoso> | Though, confusingly, .. actually exists here |
| 2021-06-15 10:33:24 | <dminuoso> | % [1..5] |
| 2021-06-15 10:33:24 | <yahb> | dminuoso: [1,2,3,4,5] |
| 2021-06-15 10:33:27 | <dminuoso> | But that is unrelated. |
| 2021-06-15 10:34:01 | <teaSlurper> | but under the hood haskell is deciding to count infinity as a list? |
| 2021-06-15 10:34:11 | <teaSlurper> | or class infinity as a list |
| 2021-06-15 10:34:41 | <dminuoso> | What do you mean by `infinity`? |
| 2021-06-15 10:34:52 | <teaSlurper> | (...) |
| 2021-06-15 10:34:56 | <dminuoso> | 12:32:37 dminuoso | No, that was just my informal way of phrasing "more stuff goes here" |
| 2021-06-15 10:35:06 | × | azeem quits (~azeem@176.200.200.250) (Ping timeout: 264 seconds) |
| 2021-06-15 10:35:35 | → | azeem joins (~azeem@176.200.200.250) |
| 2021-06-15 10:36:01 | <teaSlurper> | so in the infinite expression does haskell inert a []? |
| 2021-06-15 10:36:10 | <teaSlurper> | insert* |
| 2021-06-15 10:36:27 | <[exa]> | it can't, the infinity is too far |
| 2021-06-15 10:37:18 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 2021-06-15 10:38:12 | → | shredder joins (~shredder@42-2-58-147.static.netvigator.com) |
| 2021-06-15 10:38:30 | → | yd502 joins (~yd502@180.168.212.6) |
| 2021-06-15 10:38:37 | → | BosonCollider joins (~olofs@90-227-86-119-no542.tbcn.telia.com) |
| 2021-06-15 10:38:52 | × | jneira quits (~jneira@212.8.115.226) (Quit: Client closed) |
| 2021-06-15 10:40:03 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2021-06-15 10:40:32 | <dminuoso> | teaSlurper: Just do manual expansion |
| 2021-06-15 10:40:46 | <dminuoso> | Haskell evaluation can be understood if you just do manual expansion yourself. |
| 2021-06-15 10:41:04 | × | benin036 quits (~benin@183.82.204.171) (Ping timeout: 272 seconds) |
| 2021-06-15 10:41:13 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 10:41:29 | <teaSlurper> | you mean on paper? |
| 2021-06-15 10:41:34 | <teaSlurper> | unfolding it? |
| 2021-06-15 10:41:49 | <teaSlurper> | like 1 : (1 : (1 : (...))) |
| 2021-06-15 10:42:12 | <dminuoso> | let f x = x : f x in f 1 |
| 2021-06-15 10:42:15 | <dminuoso> | f 1 = 1 : f 1 |
| 2021-06-15 10:42:18 | <dminuoso> | = 1 : 1 : f 1 |
| 2021-06-15 10:42:21 | <dminuoso> | = 1 : 1 : 1 : f1 |
| 2021-06-15 10:42:26 | <dminuoso> | ad infinitum. |
| 2021-06-15 10:42:44 | <teaSlurper> | ahh i see ye |
| 2021-06-15 10:42:58 | <teaSlurper> | that's called manual expansion is it? |
| 2021-06-15 10:43:42 | <dminuoso> | It's an informal term I just used. If you ever want to understand how something works, you can just manually replace expressions by their definitions, binding values correctly. |
| 2021-06-15 10:44:10 | <dminuoso> | This works mostly fine as long as we ignore lazyness. |
| 2021-06-15 10:45:15 | → | jneira joins (~jneira@212.8.115.226) |
| 2021-06-15 10:45:24 | <dminuoso> | % let f x = x : f x in take 10 (f 1) |
| 2021-06-15 10:45:24 | <yahb> | dminuoso: [1,1,1,1,1,1,1,1,1,1] |
| 2021-06-15 10:46:23 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
| 2021-06-15 10:46:54 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2021-06-15 10:46:55 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 10:48:08 | <dminuoso> | This works because (f 1) is not evaluated ad-infinitum like I suggested above, it's rather that GHC evaluates only as far as it needs. But it can chase this list down as far as you want. |
| 2021-06-15 10:48:45 | <dminuoso> | So something like `length (f 1)` will diverge, `length` essentially counts the elements until it finds a [] |
| 2021-06-15 10:48:59 | <dminuoso> | % let f x = x : f x in length (f 1) |
| 2021-06-15 10:49:04 | <yahb> | dminuoso: [Timed out] |
| 2021-06-15 10:49:33 | → | benin036 joins (~benin@183.82.204.171) |
| 2021-06-15 10:51:31 | × | jneira_ quits (~jneira_@5.red-81-39-172.dynamicip.rima-tde.net) (Quit: Connection closed) |
| 2021-06-15 10:54:06 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2021-06-15 10:55:53 | <teaSlurper> | dminuoso: so something to do with lazy computation? |
| 2021-06-15 10:56:47 | <teaSlurper> | evaluation* |
| 2021-06-15 10:57:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2021-06-15 10:58:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 10:58:10 | → | brian_da_mage joins (~Neuromanc@user/briandamag) |
| 2021-06-15 10:59:46 | → | ddellacosta joins (~ddellacos@86.106.143.151) |
| 2021-06-15 11:00:46 | → | mpt joins (~tom@2a02:908:1862:49e0::5) |
| 2021-06-15 11:03:14 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
| 2021-06-15 11:03:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 11:04:16 | <dminuoso> | Yes. |
| 2021-06-15 11:04:23 | → | dunkeln joins (~dunkeln@94.129.65.28) |
| 2021-06-15 11:04:30 | × | ddellacosta quits (~ddellacos@86.106.143.151) (Ping timeout: 264 seconds) |
| 2021-06-15 11:05:06 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 264 seconds) |
| 2021-06-15 11:05:23 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 272 seconds) |
| 2021-06-15 11:10:30 | × | mpt quits (~tom@2a02:908:1862:49e0::5) (Ping timeout: 264 seconds) |
| 2021-06-15 11:12:59 | × | azeem quits (~azeem@176.200.200.250) (Ping timeout: 272 seconds) |
| 2021-06-15 11:13:00 | <siers> | where can I feed seconds since epoch to Date.Time.Format? |
| 2021-06-15 11:13:43 | → | azeem joins (~azeem@176.200.200.250) |
| 2021-06-15 11:14:16 | <siers> | it certainly looks like I can't |
| 2021-06-15 11:15:51 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 2021-06-15 11:20:06 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-06-15 11:20:09 | → | larkfisherman joins (~larkfishe@217.75.204.126) |
| 2021-06-15 11:20:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-15 11:21:17 | <cdsmith> | Let's play: am I reinventing the wheel! I've been building a type called `Predicate`, which is basically "a -> Bool, but explainable". Has a Show instance, and I'm about to add the ability to explain why it fails to match. e.g., if you compare two large Text values, it might show a diff instead of printing the whole value. Anyone know of prior art for this? |
| 2021-06-15 11:21:29 | <cdsmith> | This is for a testing tool, btw |
| 2021-06-15 11:25:08 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 2021-06-15 11:25:54 | → | dixie joins (~dixie@real.wilbury.sk) |
All times are in UTC.