Logs on 2024-08-19 (liberachat/#haskell)
| 00:04:16 | → | wroathe joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 00:04:16 | × | wroathe quits (~wroathe@mobile-166-175-56-161.mycingular.net) (Changing host) |
| 00:04:16 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:06:05 | × | tt12310978324 quits (~tt1231@syn-075-185-104-199.res.spectrum.com) (Quit: The Lounge - https://thelounge.chat) |
| 00:07:03 | → | tt123109783243 joins (~tt1231@syn-075-185-104-199.res.spectrum.com) |
| 00:07:12 | × | tt123109783243 quits (~tt1231@syn-075-185-104-199.res.spectrum.com) (Read error: Connection reset by peer) |
| 00:08:11 | → | tt123109783243 joins (~tt1231@syn-075-185-104-199.res.spectrum.com) |
| 00:10:24 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Reconnecting) |
| 00:10:30 | → | wroathe_ joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 00:10:38 | ← | wroathe_ parts (~wroathe@mobile-166-175-56-161.mycingular.net) () |
| 00:14:05 | × | euleritian quits (~euleritia@dynamic-176-004-132-012.176.4.pool.telefonica.de) (Ping timeout: 255 seconds) |
| 00:15:49 | × | tt123109783243 quits (~tt1231@syn-075-185-104-199.res.spectrum.com) (Ping timeout: 248 seconds) |
| 00:15:59 | → | euleritian joins (~euleritia@dynamic-176-001-130-229.176.1.pool.telefonica.de) |
| 00:20:05 | × | euleritian quits (~euleritia@dynamic-176-001-130-229.176.1.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 00:20:33 | → | euleritian joins (~euleritia@dynamic-176-004-137-004.176.4.pool.telefonica.de) |
| 00:21:30 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds) |
| 00:25:49 | × | paddymahoney quits (~paddymaho@pool-99-250-30-88.cpe.net.cable.rogers.com) (Ping timeout: 252 seconds) |
| 00:27:33 | × | euleritian quits (~euleritia@dynamic-176-004-137-004.176.4.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 00:27:57 | → | euleritian joins (~euleritia@dynamic-176-007-157-135.176.7.pool.telefonica.de) |
| 00:30:45 | <haskellbridge> | <eldritchcookie> how do i get retrie to compile in ghc 9.10? there is a HLS release that supports 9.10 but to do that they must have compile HLS which needs retrie |
| 00:34:33 | × | euleritian quits (~euleritia@dynamic-176-007-157-135.176.7.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 00:34:43 | → | euleritian joins (~euleritia@dynamic-176-007-194-036.176.7.pool.telefonica.de) |
| 00:43:43 | <geekosaur> | retrie is only required if the retrie plugin is; but that is currently disabled on 9.10 (https://github.com/haskell/haskell-language-server/blob/master/haskell-language-server.cabal#L628) |
| 00:45:29 | <Axman6> | ghcup has hls available for 9.10 too |
| 00:45:43 | <geekosaur> | yes, but it doesn't have the retrie plugin in it |
| 00:46:09 | → | wroathe joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 00:46:09 | × | wroathe quits (~wroathe@mobile-166-175-56-161.mycingular.net) (Changing host) |
| 00:46:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:47:18 | <Axman6> | sure, I was just questioning the "which needs retrie" |
| 00:48:48 | <haskellbridge> | <eldritchcookie> huh, for some reason i thought the best way to determine if it was from a plugin was to read the .cabal file and misread the section it belonged to. |
| 00:50:50 | → | bravespear|2 joins (~Ranhir@157.97.53.139) |
| 00:53:12 | <monochrom> | Haha "best way ... is to misread ..." |
| 00:55:25 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 01:01:11 | <geekosaur> | true if you're after amusement 😛 |
| 01:02:39 | × | Natch quits (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection) |
| 01:05:01 | → | xff0x joins (~xff0x@om126236143244.32.openmobile.ne.jp) |
| 01:08:20 | → | bravespear|3 joins (~Ranhir@157.97.53.139) |
| 01:11:50 | → | Natch joins (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
| 01:14:09 | × | euleritian quits (~euleritia@dynamic-176-007-194-036.176.7.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 01:15:03 | → | euleritian joins (~euleritia@176.2.65.94) |
| 01:15:48 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 01:22:12 | → | wroathe joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 01:22:12 | × | wroathe quits (~wroathe@mobile-166-175-56-161.mycingular.net) (Changing host) |
| 01:22:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:23:36 | × | wroathe quits (~wroathe@user/wroathe) (Client Quit) |
| 01:29:53 | × | euleritian quits (~euleritia@176.2.65.94) (Ping timeout: 248 seconds) |
| 01:30:48 | → | euleritian joins (~euleritia@dynamic-176-007-194-180.176.7.pool.telefonica.de) |
| 01:32:26 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 01:43:56 | × | euleritian quits (~euleritia@dynamic-176-007-194-180.176.7.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 01:45:10 | → | euleritian joins (~euleritia@dynamic-176-002-076-203.176.2.pool.telefonica.de) |
| 01:49:11 | → | tomku joins (~tomku@user/tomku) |
| 01:58:10 | × | euleritian quits (~euleritia@dynamic-176-002-076-203.176.2.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 01:58:53 | → | euleritian joins (~euleritia@dynamic-176-001-219-094.176.1.pool.telefonica.de) |
| 02:02:31 | → | brandt joins (~brandt@177.191-pool-nas4-sc.sccoast.net) |
| 02:02:46 | × | dyniec quits (~dyniec@dybiec.info) (Quit: WeeChat 4.2.2) |
| 02:03:21 | × | euleritian quits (~euleritia@dynamic-176-001-219-094.176.1.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 02:04:04 | → | euleritian joins (~euleritia@176.2.74.33) |
| 02:08:11 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 02:18:04 | × | td_ quits (~td@i53870932.versanet.de) (Ping timeout: 260 seconds) |
| 02:19:45 | → | td_ joins (~td@83.135.9.9) |
| 02:32:57 | liamzy__ | is now known as Inst |
| 02:38:11 | × | xff0x quits (~xff0x@om126236143244.32.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 02:42:25 | → | wroathe joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 02:42:25 | × | wroathe quits (~wroathe@mobile-166-175-56-161.mycingular.net) (Changing host) |
| 02:42:25 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:42:44 | → | spew joins (~spew@201.141.102.132) |
| 02:42:57 | × | euleritian quits (~euleritia@176.2.74.33) (Ping timeout: 252 seconds) |
| 02:43:32 | → | euleritian joins (~euleritia@dynamic-176-003-000-241.176.3.pool.telefonica.de) |
| 02:43:58 | → | tcard_ joins (~tcard@2400:4051:5801:7500:1e90:74c3:2754:ce8a) |
| 02:44:19 | → | xff0x joins (~xff0x@om126236143244.32.openmobile.ne.jp) |
| 02:46:38 | × | tcard__ quits (~tcard@p3696129-ipxg22301hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 255 seconds) |
| 02:58:31 | → | slack1256 joins (~slack1256@2803:c600:5111:8029:8ec6:4309:d4fa:d427) |
| 03:01:18 | × | xff0x quits (~xff0x@om126236143244.32.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 03:01:44 | × | euleritian quits (~euleritia@dynamic-176-003-000-241.176.3.pool.telefonica.de) (Ping timeout: 272 seconds) |
| 03:03:20 | <slack1256> | [1/3] Reading about the copying GC and the nonmonving GC, both seem to stop the world (STW), is just that the nonmoving GC only STW for the marking phase. The pause length is proportional to the live memory on both cases.[ |
| 03:03:28 | → | euleritian joins (~euleritia@dynamic-176-003-006-020.176.3.pool.telefonica.de) |
| 03:03:30 | <slack1256> | [2/3] So my question is about what you should do if you *want* (to that you should) to hold 10GBs of linked lists on Gen 1 of the GC. Is the only only store them on compact regions? |
| 03:03:44 | <slack1256> | [3/3] It seems other GC on other languages ecosystems, the STW is proportional to the garbage data instead of the live data. So the previous use case is supported out of the box. The generational hypothesis is even more true on functional languages, so I guess the tradeoff make sense. I just want to understand what is the expected action to the programmer. |
| 03:04:11 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 03:04:14 | <slack1256> | (not* that you should) |
| 03:04:22 | × | bilegeek quits (~bilegeek@2600:1008:b095:ace0:e956:a894:c484:bbc7) (Quit: Leaving) |
| 03:08:15 | × | spew quits (~spew@201.141.102.132) (Remote host closed the connection) |
| 03:08:24 | → | spew joins (~spew@201.141.102.132) |
| 03:10:04 | × | euleritian quits (~euleritia@dynamic-176-003-006-020.176.3.pool.telefonica.de) (Ping timeout: 258 seconds) |
| 03:10:11 | → | euleritian joins (~euleritia@dynamic-176-006-135-085.176.6.pool.telefonica.de) |
| 03:10:27 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 258 seconds) |
| 03:16:41 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
| 03:17:02 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 03:26:54 | × | machinedgod quits (~machinedg@d50-99-47-73.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 03:27:21 | <slack1256> | I guess the answer is really to put *more* generations via -G3 etc |
| 03:27:42 | × | euleritian quits (~euleritia@dynamic-176-006-135-085.176.6.pool.telefonica.de) (Ping timeout: 258 seconds) |
| 03:27:56 | → | euleritian joins (~euleritia@dynamic-176-001-218-057.176.1.pool.telefonica.de) |
| 03:29:37 | × | rini quits (~rini@user/rini) (Remote host closed the connection) |
| 03:32:05 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 248 seconds) |
| 03:32:19 | → | tomku joins (~tomku@user/tomku) |
| 03:32:29 | × | spew quits (~spew@201.141.102.132) (Remote host closed the connection) |
| 03:32:57 | → | rini joins (~rini@user/rini) |
| 03:35:22 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:40:53 | × | euleritian quits (~euleritia@dynamic-176-001-218-057.176.1.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 03:48:16 | → | aforemny joins (~aforemny@2001:9e8:6cd5:1b00:72fb:902d:5353:4bcd) |
| 03:49:33 | × | aforemny_ quits (~aforemny@2001:9e8:6cf4:c700:587f:d6ea:1b3:5684) (Ping timeout: 258 seconds) |
| 03:54:05 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 03:56:36 | → | euleritian joins (~euleritia@dynamic-176-002-076-000.176.2.pool.telefonica.de) |
| 04:03:14 | × | euleritian quits (~euleritia@dynamic-176-002-076-000.176.2.pool.telefonica.de) (Ping timeout: 260 seconds) |
| 04:03:49 | → | euleritian joins (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) |
| 04:04:07 | × | _________ quits (~nobody@user/noodly) (Ping timeout: 258 seconds) |
| 04:12:06 | → | _________ joins (~nobody@user/noodly) |
| 04:13:06 | × | euleritian quits (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 04:13:24 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 04:17:07 | → | xff0x joins (~xff0x@2405:6580:b080:900:e0e6:dea5:baf7:2386) |
| 04:19:50 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 04:23:40 | → | spew joins (~spew@201.141.102.132) |
| 04:27:22 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 04:28:25 | → | euphores joins (~SASL_euph@user/euphores) |
| 04:30:49 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 04:30:58 | → | euleritian joins (~euleritia@77.22.252.56) |
| 04:38:04 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 260 seconds) |
| 04:39:02 | × | slack1256 quits (~slack1256@2803:c600:5111:8029:8ec6:4309:d4fa:d427) (Remote host closed the connection) |
| 04:39:13 | → | euleritian joins (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) |
| 04:44:37 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 04:53:50 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds) |
| 04:56:30 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 05:03:26 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 255 seconds) |
| 05:03:57 | × | euleritian quits (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 05:04:15 | → | euleritian joins (~euleritia@77.22.252.56) |
| 05:04:53 | → | michalz joins (~michalz@185.246.207.193) |
| 05:06:38 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 05:11:35 | × | euleritian quits (~euleritia@77.22.252.56) (Read error: Connection reset by peer) |
| 05:12:39 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 05:12:41 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Remote host closed the connection) |
| 05:13:23 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 05:14:36 | → | Square3 joins (~Square4@user/square) |
| 05:15:40 | × | dolio quits (~dolio@130.44.140.168) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:17:37 | × | Square quits (~Square@user/square) (Ping timeout: 248 seconds) |
| 05:17:42 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 252 seconds) |
| 05:17:50 | Square3 | is now known as Square |
| 05:20:02 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 05:21:24 | → | dolio joins (~dolio@130.44.140.168) |
| 05:24:52 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds) |
| 05:25:00 | → | euleritian joins (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) |
| 05:29:10 | × | spew quits (~spew@201.141.102.132) (Remote host closed the connection) |
| 05:30:04 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 05:31:33 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 248 seconds) |
| 05:33:07 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 264 seconds) |
| 05:34:48 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 05:37:31 | × | brandt quits (~brandt@177.191-pool-nas4-sc.sccoast.net) (Quit: WeeChat 4.4.0) |
| 06:16:41 | → | ubert joins (~Thunderbi@91.141.68.38.wireless.dyn.drei.com) |
| 06:34:21 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 06:51:38 | × | terrorjack4 quits (~terrorjac@static.163.82.63.178.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat) |
| 06:54:00 | → | terrorjack4 joins (~terrorjac@static.163.82.63.178.clients.your-server.de) |
| 07:04:04 | <c_wraith> | why would you want to keep them in gen 1 in the first place? |
| 07:04:42 | <c_wraith> | (probably a few hours too late to get a reasonable answer) |
| 07:08:36 | → | acidjnk joins (~acidjnk@p200300d6e72cfb5259affcc514115865.dip0.t-ipconnect.de) |
| 07:12:04 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 260 seconds) |
| 07:26:23 | <[exa]> | Hi all, explorative question: so I've got this API client which is assembling a large query result from multiple small queries, where many can go in parallel (but the parallelism is better controlled a bit to avoid going complete BFS and wasting all memory for subresults that are not required yet). Is there some existing good way/monad/library to implement this conveniently? |
| 07:26:53 | <[exa]> | Normally I'd go plain old IO threads with some kind of semaphore to keep the parallel request count at bay, but that seems crude |
| 07:28:30 | → | CiaoSen joins (~Jura@2a05:5800:247:9200:ca4b:d6ff:fec1:99da) |
| 07:29:05 | <[exa]> | for bonus features it would be nice to have some possibility to execute stuff speculatively, such as "let's gather some stats before deciding where to go" or "if these requests fail we can just bail out, the other branch will succeed" |
| 07:32:38 | <jackdk> | haxl springs to mind, not that I've used it: https://engineering.fb.com/2014/06/10/web/open-sourcing-haxl-a-library-for-haskell/ . But I think that restricts itself to an Applicative |
| 07:34:36 | × | euleritian quits (~euleritia@dynamic-176-007-192-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 07:34:53 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 07:36:30 | <Inst> | yup, memoize is broken on 9.10.x |
| 07:47:22 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 07:52:20 | → | kuribas joins (~user@ptr-17d51endnrlvux1kiym.18120a2.ip6.access.telenet.be) |
| 07:57:27 | → | machinedgod joins (~machinedg@d50-99-47-73.abhsia.telus.net) |
| 08:02:11 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 08:05:13 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:15:17 | → | __monty__ joins (~toonn@user/toonn) |
| 08:15:36 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 08:17:54 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:21:26 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
| 08:30:03 | × | ThePenguin quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Remote host closed the connection) |
| 08:30:38 | → | ThePenguin joins (~ThePengui@cust-95-80-24-166.csbnet.se) |
| 08:32:31 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 08:33:50 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 08:35:30 | × | ubert quits (~Thunderbi@91.141.68.38.wireless.dyn.drei.com) (Ping timeout: 248 seconds) |
| 08:37:29 | gehmehgeh | is now known as gmg |
| 08:42:15 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 08:45:56 | → | murgeljm joins (~murgeljm@APN-122-12-44-gprs.simobil.net) |
| 08:46:12 | × | murgeljm quits (~murgeljm@APN-122-12-44-gprs.simobil.net) (Read error: Connection reset by peer) |
| 08:55:06 | <ncf> | are you sure about that |
| 09:21:53 | × | CiaoSen quits (~Jura@2a05:5800:247:9200:ca4b:d6ff:fec1:99da) (Ping timeout: 252 seconds) |
| 09:22:22 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 09:23:30 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 09:29:04 | → | euphores joins (~SASL_euph@user/euphores) |
| 09:35:02 | → | Digitteknohippie joins (~user@user/digit) |
| 09:35:45 | × | Digit quits (~user@user/digit) (Ping timeout: 252 seconds) |
| 09:37:51 | <Inst> | ncf: is it broken specifically if you use a lib + ghc toolchain? |
| 09:37:55 | <Inst> | in 9.4 it works |
| 09:38:04 | <Inst> | lib + ghci toolchain, rather, it refuses to isntall under cabal install |
| 09:38:09 | <Inst> | let me try to do it with a cabal script |
| 09:38:28 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Quit: ash3en) |
| 09:39:05 | <ncf> | oh i thought this was still about recursion, not a literal build failure |
| 09:39:42 | <Inst> | thanks you guys for being so helpful |
| 09:41:03 | Digitteknohippie | is now known as Digit |
| 09:41:17 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2) |
| 09:41:26 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 09:44:32 | <int-e> | Oh. It builds with 9.6, but not with 9.8. |
| 09:44:45 | <int-e> | Inst: FWIW the lesson hear is that "broken" is very non-descriptive. |
| 09:45:07 | <Inst> | thanks :) |
| 09:45:26 | int-e | made the same assumption as ncf. |
| 09:53:21 | × | ghodawalaaman quits (~thelounge@user/thelounge8234) (Quit: The Lounge - https://thelounge.chat) |
| 09:54:23 | → | ghodawalaaman joins (~thelounge@user/thelounge8234) |
| 09:55:10 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Ping timeout: 265 seconds) |
| 10:09:34 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:10:24 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 10:17:07 | → | ubert joins (~Thunderbi@91.141.68.38.wireless.dyn.drei.com) |
| 10:25:26 | × | doyougnu quits (~doyougnu@syn-045-046-170-068.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:26:41 | × | bgamari quits (~bgamari@64.223.233.64) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:27:11 | → | doyougnu joins (~doyougnu@syn-045-046-170-068.res.spectrum.com) |
| 10:28:06 | → | bgamari joins (~bgamari@64.223.233.64) |
| 10:42:19 | × | m1dnight quits (~christoph@78-20-63-126.access.telenet.be) (Quit: WeeChat 4.3.5) |
| 10:42:46 | → | m1dnight joins (~christoph@78-20-63-126.access.telenet.be) |
| 10:45:20 | × | m1dnight quits (~christoph@78-20-63-126.access.telenet.be) (Client Quit) |
| 10:45:36 | → | m1dnight joins (~christoph@78-20-63-126.access.telenet.be) |
| 10:46:51 | <[exa]> | jackdk: haxl actually looks like quite the thing, thanks a lot |
| 10:47:00 | <[exa]> | at wurst I'll copy from them. :) |
| 10:49:39 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 10:50:33 | → | euleritian joins (~euleritia@77.22.252.56) |
| 10:51:38 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 10:51:55 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 10:59:32 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 244 seconds) |
| 11:00:07 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) () |
| 11:05:40 | <Inst> | hmmm |
| 11:06:02 | <Inst> | is there a way to get Haskell to compute a limit? |
| 11:07:02 | <Inst> | these are cat theory limits, though |
| 11:07:04 | <Inst> | https://hackage.haskell.org/package/data-category-0.11/docs/Data-Category-Limit.html |
| 11:09:25 | <ncf> | compute? what's the input, what's the output? |
| 11:09:46 | <Inst> | I was thinking about a bad joke regarding a certain political figure |
| 11:10:01 | <Inst> | "x and disadvantaged minority define the new normal" |
| 11:10:06 | <Inst> | "how do they define the new normal?" |
| 11:10:20 | <Inst> | "by being paid 63.7% that of [insert privileged group here]" |
| 11:12:43 | <Inst> | payOf foo = 0.637 * bar; bar = payOf bar |
| 11:12:49 | <Inst> | that'd just be undefined in Haskell |
| 11:15:02 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 244 seconds) |
| 11:15:29 | → | euleritian joins (~euleritia@dynamic-176-006-146-067.176.6.pool.telefonica.de) |
| 11:15:38 | <Inst> | wow, lisp doesn't have macros for this either |
| 11:16:26 | <Inst> | i guess you could define an eDSL and have limits as something that operates on the eDSL |
| 11:17:11 | <Inst> | /s/undefined/bottom |
| 11:17:35 | <Inst> | solved in offtopic by exa |
| 11:19:45 | × | euleritian quits (~euleritia@dynamic-176-006-146-067.176.6.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 11:20:17 | → | euleritian joins (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) |
| 11:21:09 | <[exa]> | Inst: you'd literally need the eDSL to have a different notion of the let-binding, i.e. a different `=` |
| 11:22:00 | <[exa]> | because whatever you do the `=` is going to create the recursion bottom (unless going for absolutely insane trickery with thunk equality matching or so) |
| 11:22:17 | <Inst> | yes since = is bound, unless you want to implement it monadically and use <- instead |
| 11:22:42 | <[exa]> | in haskell probably best to wrap it in TH brackets, convert to an equation system, and continue as previously |
| 11:23:06 | <[exa]> | with `<-` you might want `mdo` |
| 11:23:13 | <[exa]> | aka MonadFix |
| 11:23:40 | <[exa]> | reactive folks have had success there with similar loopy issues |
| 11:28:32 | <probie> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf cos 1 |
| 11:28:34 | <lambdabot> | 0.7390851332151607 |
| 11:30:15 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:30:26 | <[exa]> | `zip <*> tail` whew nice |
| 11:30:53 | <probie> | @quote zip`ap`tail |
| 11:30:53 | <lambdabot> | quicksilver says: zip`ap`tail the aztec god of consecutive numbers |
| 11:31:28 | <probie> | take 10 $ zip <*> tail $ [1..] |
| 11:31:36 | <probie> | > take 10 $ zip <*> tail $ [1..] |
| 11:31:37 | <lambdabot> | [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11)] |
| 11:32:11 | <Inst> | whoa, someone else abusing the applicative instance for (a ->) |
| 11:32:40 | <Inst> | (i personally wish <*> abuse was considered normal) |
| 11:33:37 | × | Blasius quits (~Blasius@5ec169d9.skybroadband.com) (Ping timeout: 248 seconds) |
| 11:34:09 | × | raym quits (~ray@user/raym) (Ping timeout: 248 seconds) |
| 11:34:16 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 11:34:46 | <probie> | It's an idiom that people recognise. It's important to shuffle it around |
| 11:36:09 | <probie> | > do{t<-tail;take 10 . (`zip` t)} $ [1..] |
| 11:36:11 | <lambdabot> | [(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(8,9),(9,10),(10,11)] |
| 11:36:27 | <Inst> | also the code seems flawed |
| 11:36:42 | <Inst> | let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf cos 0 |
| 11:36:46 | <Inst> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf cos 0 |
| 11:36:47 | <lambdabot> | 0.7390851332151607 |
| 11:36:51 | <Inst> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf cos pi |
| 11:36:52 | <lambdabot> | 0.7390851332151607 |
| 11:37:18 | <Inst> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf cos undefined |
| 11:37:18 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 252 seconds) |
| 11:37:20 | <lambdabot> | *Exception: Prelude.undefined |
| 11:37:30 | → | rosco joins (~rosco@175.136.158.234) |
| 11:37:33 | → | tomku joins (~tomku@user/tomku) |
| 11:39:17 | <probie> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf (\n -> (n + (fromIntegral (round n))) / 2) 0.8 |
| 11:39:19 | <lambdabot> | 1.0 |
| 11:39:26 | <probie> | > let limitOf = ((fst . head . dropWhile (uncurry (/=)) . (zip <*> tail)) .) . iterate in limitOf (\n -> (n + (fromIntegral (round n))) / 2) pi |
| 11:39:27 | <lambdabot> | 3.0 |
| 11:46:01 | → | raym joins (~ray@user/raym) |
| 11:49:26 | × | Miroboru quits (~myrvoll@178-164-114.82.3p.ntebredband.no) (Quit: Lost terminal) |
| 12:02:58 | <albet70> | fmap . fmap to unwrap nested list, more one list, more one fmap compose, is this a kind of instiition? |
| 12:03:35 | → | CiaoSen joins (~Jura@2a05:5800:247:9200:ca4b:d6ff:fec1:99da) |
| 12:06:03 | × | Inst quits (~Inst@user/Inst) (Read error: Connection reset by peer) |
| 12:09:23 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 12:12:23 | × | euleritian quits (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) (Read error: Connection reset by peer) |
| 12:12:41 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 12:14:25 | → | Inst joins (~Inst@user/Inst) |
| 12:17:11 | <ncf> | what's an instiition |
| 12:18:57 | <albet70> | intuition |
| 12:22:29 | <Inst> | (fmap . fmap) is a common idiom to point a function into a nested list (or, essentially, any two types that support the Functor typeclass |
| 12:22:53 | <Inst> | foo :: IO [Int]; foo = pure [1..10] |
| 12:23:05 | <Inst> | (fmap . fmap) (+1) foo |
| 12:24:14 | <Inst> | (fmap f <$>) or fmap f <$> works as well, etc... |
| 12:25:21 | <ncf> | fmap.fmap is fmap for Compose f g |
| 12:26:07 | <ncf> | ideally you could do fmap @(\x -> IO [x]) but haskell doesn't have type-level lambdas so instead you indicate how many "layers" of type constructors you want to peel off by composing fmaps |
| 12:30:40 | <Inst> | iirc aren't dependent types capable of injecting type-level lambdas into Haskell? |
| 12:34:33 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 245 seconds) |
| 12:35:03 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Ping timeout: 252 seconds) |
| 12:35:48 | <ncf> | sounds like a category error |
| 12:36:37 | → | ZharMeny joins (~user@user/ZharMeny) |
| 12:38:14 | × | ZharMeny quits (~user@user/ZharMeny) (Read error: Connection reset by peer) |
| 12:38:19 | → | ZharMeny` joins (~user@user/ZharMeny) |
| 12:38:33 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 12:40:34 | ZharMeny` | is now known as ZharMeny |
| 12:43:43 | <lortabac> | I guess allowing instances on unsaturated type-level functions would be a little messy |
| 12:45:27 | <lortabac> | does Idris have something like that? |
| 12:48:43 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 245 seconds) |
| 12:55:17 | <SrPx> | is there any alternative front-end to GHC nowadays? |
| 13:03:43 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 264 seconds) |
| 13:03:58 | → | tomku joins (~tomku@user/tomku) |
| 13:07:33 | <Inst> | <probie> It's an idiom that people recognise. It's important to shuffle it around |
| 13:07:33 | <Inst> | <probie> > do{t<-tail;take 10 . (`zip` t)} $ [1..] |
| 13:07:38 | <Inst> | sarcasm noted there |
| 13:08:01 | <Inst> | also afaik, no one ever uses (r ->) in do notation, right? If they do it, it's reader |
| 13:08:15 | <kuribas> | Noone should use (r ->), like ever. |
| 13:08:58 | <Inst> | i mean people use ReaderT |
| 13:09:09 | <Inst> | ReaderT identity as well, they just don't use (r ->) |
| 13:13:32 | × | Square quits (~Square4@user/square) (Ping timeout: 272 seconds) |
| 13:15:20 | → | wroathe joins (~wroathe@mobile-166-175-56-161.mycingular.net) |
| 13:15:20 | × | wroathe quits (~wroathe@mobile-166-175-56-161.mycingular.net) (Changing host) |
| 13:15:20 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:20:49 | × | ubert quits (~Thunderbi@91.141.68.38.wireless.dyn.drei.com) (Ping timeout: 248 seconds) |
| 13:27:19 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 13:29:14 | × | noctux quits (~noctux@user/noctux) (Remote host closed the connection) |
| 13:32:23 | <Leary> | [exa]: A straight-forward approach, inheriting nice exception semantics from STM and IO: https://gist.github.com/LSLeary/e139dfe025e2ed5a47040106b321dbc3 |
| 13:32:42 | <Leary> | Not sure if actually helpful; might be too obvious. |
| 13:32:52 | <Leary> | But I had fun writing it, so whatever. |
| 13:33:36 | <[exa]> | yeah actually helpful too, not sure if I use it but in case I don't go with haxl I'd basically have to code the same |
| 13:34:15 | → | wroathe joins (~wroathe@mobile-166-175-189-43.mycingular.net) |
| 13:34:16 | × | wroathe quits (~wroathe@mobile-166-175-189-43.mycingular.net) (Changing host) |
| 13:34:16 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:36:34 | → | ystael joins (~ystael@user/ystael) |
| 13:39:12 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 13:39:30 | → | noctux joins (~noctux@user/noctux) |
| 13:43:25 | <int-e> | % mapM_ print ([1,2,3],42) |
| 13:43:25 | <yahb2> | 42 |
| 13:43:46 | <int-e> | I swear these tuple instances bite me way more often than the (r ->) ones. |
| 13:45:31 | <Rembane> | I use them so much that I hope that I have internalized them |
| 13:45:36 | <Rembane> | It's my strategy |
| 13:45:39 | <Rembane> | I don't know if it works |
| 13:45:49 | <Rembane> | That they exist is fascinating in itself |
| 13:49:36 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 13:50:15 | × | noctux quits (~noctux@user/noctux) (Remote host closed the connection) |
| 13:52:34 | <probie> | They're useful from time to time with things like `traverse` |
| 13:52:48 | → | noctux joins (~noctux@user/noctux) |
| 13:53:41 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds) |
| 13:54:12 | → | euleritian joins (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) |
| 13:54:36 | <lortabac> | I always try to use the most specific function when there is one. No need to use 'fmap' if you need 'map'. That's also why I'm not a big fan of things like classy-prelude |
| 13:55:05 | <Rembane> | probie: Yeah, but I think I would prefer to have a newtype for it for clarity. |
| 13:55:22 | <Rembane> | OTOH, that's a critique that can be applied to all instances all the time. |
| 13:56:09 | <lortabac> | TBH I consider even the obligation to use 'Monad' to chain IO actions a mistake in the language. I don't see why 'bindIO' etc. shouldn't be exposed in Prelude |
| 13:57:03 | <Rembane> | lortabac: This makes me curious, do you have more motivation or intuition for this? |
| 13:57:04 | <lortabac> | ad-hoc polymorphism should only be used when really needed |
| 13:57:42 | <lortabac> | Rembane: well, the most obvious one would be that newcomers now need to learn monads in order to use IO |
| 13:58:01 | <probie> | Every new name introduced is a name that needs to be learnt |
| 13:58:10 | <lortabac> | of course |
| 13:58:28 | <lortabac> | but now they are obliged to learn a hard concept that they don't need at that stage |
| 13:58:28 | <Rembane> | lortabac: Not reay, they need to learn the funny do-notation and then they're off to the races. |
| 13:59:01 | <lortabac> | yes, books can find a workaround by not mentioning that the 'do' notation is about monads |
| 13:59:14 | <lortabac> | but still it is about monads |
| 14:00:31 | <Rembane> | Indeed |
| 14:01:24 | × | rosco quits (~rosco@175.136.158.234) (Quit: Lost terminal) |
| 14:02:41 | <danse-nr3> | i don't get the preference for specific functions, `map` over `fmap`. If one doesn't use basic haskell abstractions, what's the point of using haskell at all |
| 14:03:02 | × | noctux quits (~noctux@user/noctux) (Remote host closed the connection) |
| 14:03:53 | <probie> | It's about the only non-strict language around with an ecosystem and reasonable performance |
| 14:04:05 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 265 seconds) |
| 14:06:39 | → | noctux joins (~noctux@user/noctux) |
| 14:08:42 | <danse-nr3> | fair point |
| 14:08:54 | <danse-nr3> | :t map (++) |
| 14:08:56 | <lambdabot> | [[a]] -> [[a] -> [a]] |
| 14:09:33 | <danse-nr3> | why would one write code that is less portable though, besides that slight performance improvement? |
| 14:09:48 | <danse-nr3> | :t fmap (<>) |
| 14:09:50 | <lambdabot> | (Functor f, Semigroup a) => f a -> f (a -> a) |
| 14:10:23 | <danse-nr3> | also losing the possibility to interpret its more abstrat meaning and reason in terms of common operation on different instances? |
| 14:11:22 | <kuribas> | danse-nr3: some more specific functions may be more efficient, for example stream fusion. |
| 14:11:58 | <kuribas> | It's also not less portable if you already restrain the type. |
| 14:13:09 | <danse-nr3> | oh, it's not less portable with restrained types then |
| 14:14:28 | <EvanR> | ad hoc polymorphism never "needs" to be used, because you can use "record-of-functions" style OOPish pattern to vary behavior from value to value |
| 14:15:09 | <EvanR> | but type classes shine when you have a nice logical framework that benefits from the idiosyncracy of type class coherence |
| 14:15:27 | <EvanR> | that we can use the + operator in many cases is a nice side effect |
| 14:16:25 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 14:16:26 | <danse-nr3> | maybe the Num instance is not the easiest to highlight the advantages, but Semigroups, Functors ... if one doesn't like them, go looking for another lazy lang really |
| 14:17:33 | <EvanR> | and if you do like Semigroups, Functors, you can still go looking for another language, like scalaz! |
| 14:18:08 | <EvanR> | also lol at another lazy language |
| 14:18:15 | <EvanR> | miranda? |
| 14:19:24 | <Inst> | /s/miranda/mirandaTM |
| 14:19:48 | <haskellbridge> | <thirdofmay18081814goya> anyone ever do haskell interop with agda/idris? |
| 14:19:56 | <haskellbridge> | <thirdofmay18081814goya> do most things in haskell, do dependent stuff in those |
| 14:20:05 | <probie> | Can I even run Miranda on anything other than x86(_64)? |
| 14:21:20 | <Inst> | studying C, I finally understand how alien Haskell can be when two basic concepts require "generics" just to use and understand |
| 14:21:34 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 14:22:11 | <EvanR> | or how alien C, with arbitrary mutation and IO anywhere |
| 14:22:34 | <EvanR> | and bizarre undefined behaviors@! |
| 14:22:58 | <Inst> | and textbooks that are essentially made up of "this is a footgun, don't use it" |
| 14:23:34 | <danse-nr3> | which "two basic concepts" would those be Inst? |
| 14:24:11 | <Inst> | IO a, [a] |
| 14:24:17 | <Inst> | although tbh, is [a] really that alien? |
| 14:24:41 | <EvanR> | you can make [a] in C but it won't be checked by the type system |
| 14:24:48 | <EvanR> | void pointer |
| 14:24:55 | <danse-nr3> | why would they require "generics"? Or you still mean typeclasses by that? |
| 14:25:02 | <lortabac> | danse-nr3: I'm not saying that 'fmap' shouldn't be used, I'm saying we should use the right tool for the job |
| 14:25:18 | <EvanR> | Inst, is probably talking about C generics |
| 14:25:44 | <Inst> | go afaik finally has generics? |
| 14:25:46 | <EvanR> | generics as a term ignores research and is redefined as a different random thing in each language |
| 14:26:04 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 14:26:25 | <Inst> | i guess generics isn't pure then? or it is, provided you pass it a generator :3 |
| 14:26:39 | <EvanR> | we don't know until you clarify what generics you're talking about |
| 14:30:21 | <Inst> | parametric polymorphism, i guess |
| 14:30:48 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds) |
| 14:30:56 | <EvanR> | C can do that through void pointers, with no guardrails |
| 14:31:04 | → | cfricke joins (~cfricke@user/cfricke) |
| 14:31:06 | <EvanR> | so it's not really alien |
| 14:32:54 | <Inst> | it looks like something that'd fill up 1-2 pages with footgun warnings |
| 14:34:07 | → | wroathe joins (~wroathe@mobile-166-175-189-43.mycingular.net) |
| 14:34:07 | × | wroathe quits (~wroathe@mobile-166-175-189-43.mycingular.net) (Changing host) |
| 14:34:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:39:18 | × | CiaoSen quits (~Jura@2a05:5800:247:9200:ca4b:d6ff:fec1:99da) (Ping timeout: 258 seconds) |
| 14:39:39 | → | Miroboru joins (~myrvoll@178-164-114.82.3p.ntebredband.no) |
| 14:40:47 | <lortabac> | danse-nr3: when you have a complex computation, something with multiple layers of Either, Maybe, lists etc. if you use specific types/functions when you get lost you can use typed holes or IDE features to help you follow what is happening. If all you have is fmap's and traverse's, good luck! |
| 14:42:12 | <haskellbridge> | <mauke> If you want to see something funny, look up the type of qsort() in C |
| 14:42:40 | <probie> | you can use TypeApplications to disambiguate without the need to learn about specific names for each names |
| 14:43:49 | <haskellbridge> | <mauke> and if you want to be horrified, check out <tgmath.h> |
| 14:44:05 | <lortabac> | probie: I'm talking about how the compiler can help you, not about how you can help the compiler |
| 14:44:34 | <EvanR> | it stands for Too Good math |
| 14:46:07 | <albet70> | does liftA2 have other names? |
| 14:46:26 | <haskellbridge> | <mauke> liftM2 |
| 14:46:29 | <probie> | `\f x y -> f <$> x <*> y` |
| 14:47:49 | <haskellbridge> | <mauke> I should port to Haskell |
| 14:48:14 | <dolio> | The compiler helps me by picking the right overloading of functions instead of making me do it manually, with a cornucopia of disambiguating names. |
| 14:48:23 | <haskellbridge> | <mauke> ... That renders wrong in Matrix |
| 14:49:41 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 14:53:45 | → | wroathe joins (~wroathe@166.175.189.43) |
| 14:53:45 | × | wroathe quits (~wroathe@166.175.189.43) (Changing host) |
| 14:53:45 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:55:08 | <albet70> | what's the name that fmap can work with binary function? |
| 14:55:24 | <albet70> | fmap (+) [1..3] [3..5] |
| 14:55:36 | <dolio> | liftA2? |
| 14:57:12 | <albet70> | no |
| 14:57:38 | <EvanR> | :t zipWith |
| 14:57:38 | <lambdabot> | (a -> b -> c) -> [a] -> [b] -> [c] |
| 14:57:47 | <albet70> | that should be [4,6,8] but (+) <$> [1..3] <*> [3..5] == [4,5,6,5,6,7,6,7,8] |
| 14:58:20 | <albet70> | zipWith it is |
| 14:58:21 | <dolio> | It's [4,6,8] with ZipList. |
| 14:58:59 | <ncf> | > liftA2 (+) (ZipList [1..3]) (ZipList [3..5]) |
| 14:59:01 | <lambdabot> | ZipList {getZipList = [4,6,8]} |
| 14:59:31 | <probie> | All lawful functor instances for a type are identical, but that doesn't hold for applicative |
| 15:01:28 | <albet70> | zipWith is related to transpose? |
| 15:01:29 | <EvanR> | why would you use zipWith f foo bar when you could use getZipList (liftA2 (+) (ZipList foo) (ZipList bar)) |
| 15:01:59 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2) |
| 15:02:06 | <EvanR> | albet70, you might be thinking of zip from languages which use list to stand for tuples |
| 15:02:13 | <EvanR> | :t zip |
| 15:02:14 | <lambdabot> | [a] -> [b] -> [(a, b)] |
| 15:02:25 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 15:02:32 | <dolio> | I would definitely use zipWith. But if we're talking about fmap, it's meaningless to generalize to multiple arguments without something like Applicative. |
| 15:02:34 | × | euleritian quits (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:02:49 | <EvanR> | > zip [1,2,3,4] [5,6,7,8] |
| 15:02:51 | <lambdabot> | [(1,5),(2,6),(3,7),(4,8)] |
| 15:03:16 | <EvanR> | :t zip3 |
| 15:03:17 | <lambdabot> | [a] -> [b] -> [c] -> [(a, b, c)] |
| 15:03:18 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 15:03:43 | <EvanR> | zip in another language :: list of list of value -> list of list of value |
| 15:03:51 | <EvanR> | corresponding to transpose in haskell |
| 15:03:51 | <albet70> | zip is transpose? |
| 15:04:08 | <EvanR> | not in haskell but in a language that doesn't know a tuple from a list |
| 15:06:02 | <Inst> | albet78: new here? |
| 15:06:05 | <Inst> | albet70 |
| 15:08:28 | <albet70> | yes, I'm a newbie |
| 15:08:41 | <Inst> | welcome, and enjoy Haskell! :3 |
| 15:09:10 | <Inst> | i hope the type signatures and annotations aren't too hard, that was a big tripping point for me |
| 15:09:23 | × | terrorjack4 quits (~terrorjac@static.163.82.63.178.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat) |
| 15:09:38 | <EvanR> | and then once you get type signatures, you go back to the real world and wonder why they're not there in e.g. python |
| 15:09:53 | <Inst> | i sort of wish Py stole Haskell's type signature format |
| 15:09:58 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds) |
| 15:10:08 | <Inst> | but, back to Haskell being alien! |
| 15:10:20 | <Inst> | (actually Py stealing Idris's typesig format would probably have been better) |
| 15:10:23 | <albet70> | that ByteString Lazy Internal String Char stuff are not friendly |
| 15:10:39 | → | terrorjack4 joins (~terrorjac@2a01:4f8:121:32e8::) |
| 15:10:42 | × | terrorjack4 quits (~terrorjac@2a01:4f8:121:32e8::) (Client Quit) |
| 15:10:49 | <EvanR> | not even dependent types would safe dynamic language APIs from themselves |
| 15:11:16 | <EvanR> | Char is pretty straightforward and exists in many languages |
| 15:11:18 | <albet70> | Inst , python have type hint now, and they have pydantic for type check like ts to js I think |
| 15:11:19 | <Inst> | also have you done kinds yet? |
| 15:11:20 | <c_wraith> | TypeScript gets really funny when trying to describe some existing JS APIs |
| 15:11:34 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 15:11:36 | <c_wraith> | type that are longer than implementations... |
| 15:11:59 | <haskellbridge> | <mauke> ByteStrings get a little easier once you realize there are two (and only two) of them |
| 15:12:11 | <EvanR> | and ShortByteString xD |
| 15:12:13 | <danse-nr3> | yeah typescript quite poor at being functional |
| 15:12:27 | <albet70> | when to unify String [Char] Text, and that Strict Internal Lazy stuff |
| 15:12:35 | <EvanR> | do not unify |
| 15:12:35 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 15:12:42 | <EvanR> | that is wrong and broken |
| 15:12:51 | <EvanR> | it's like the belief that there is one number type |
| 15:12:57 | <EvanR> | we just haven't found it yet |
| 15:12:57 | <EvanR> | no |
| 15:13:19 | <EvanR> | what is Internal |
| 15:13:20 | <haskellbridge> | <mauke> String = [Char] |
| 15:13:47 | <haskellbridge> | <mauke> The bit of the error message that is best ignored |
| 15:14:08 | → | euleritian joins (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) |
| 15:14:22 | <haskellbridge> | <mauke> Only Strict vs Lazy matters |
| 15:14:24 | <EvanR> | something internal literally called Internal is leaking out into errors ? :( |
| 15:14:27 | <Inst> | albet70: kinds tbh probably should be introduced around the same time as parametric types |
| 15:14:36 | <haskellbridge> | <mauke> Yes |
| 15:14:47 | <Inst> | values have types, type constructors (like Char, or []) have kinds |
| 15:14:49 | <albet70> | https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/Data-ByteString-Internal.html |
| 15:15:09 | × | euleritian quits (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:15:21 | <EvanR> | ok Data.ByteString.Internal is a module name |
| 15:15:23 | <Inst> | Data.ByteString.Internal is a module name |
| 15:15:27 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 15:15:40 | <EvanR> | many libraries stash internal implementation stuff in an Internal submodule |
| 15:15:40 | <Inst> | actually EvanR, you're both better at this and nicer than me, so I'll let you handle it? |
| 15:15:52 | <c_wraith> | EvanR: Internal shows up in error messages when you don't have the correct bytestring type in scope. The error message talks about where it's defined in that case, and they're defined in their respective .Internal modules |
| 15:15:55 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 15:17:42 | <EvanR> | albet70, thing is, [Char] and ByteString isn't even a choice between similars, they are very different for different purposes |
| 15:18:06 | <EvanR> | thinking of them both as "string" is confused |
| 15:18:09 | <albet70> | yes, [Char] is not ByteString |
| 15:18:18 | <EvanR> | so they can't possibly be unified |
| 15:18:31 | <albet70> | [Char], String and Text? |
| 15:18:40 | <albet70> | ByteString and Word? |
| 15:18:45 | <Inst> | are you familiar with the type keyword? |
| 15:18:46 | <EvanR> | other programming languages went through a struggle to decide if they want [Char] OR ByteString as their one string type |
| 15:18:52 | <EvanR> | it's kind of a disaster |
| 15:19:08 | <albet70> | python2 str is bytestring |
| 15:19:14 | <Inst> | the type keyword in Haskell is the typedef keyword in C |
| 15:19:20 | <Inst> | it creates a synonym for a preexisting type |
| 15:19:25 | <Inst> | type String = [Char] |
| 15:19:28 | → | wroathe joins (~wroathe@mobile-166-175-189-43.mycingular.net) |
| 15:19:28 | × | wroathe quits (~wroathe@mobile-166-175-189-43.mycingular.net) (Changing host) |
| 15:19:28 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:19:40 | <EvanR> | python has a complex policy on top of their bytestring to make sure it can represent unicode text properly |
| 15:19:46 | <EvanR> | haskell doesn't |
| 15:19:56 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: on the move) |
| 15:19:58 | <Inst> | isn't bytestring just raw data? |
| 15:20:06 | <Inst> | Word8 vector |
| 15:20:07 | <EvanR> | is that like pure energy? |
| 15:20:38 | <Inst> | Word in Haskell typically refers to an unsigned integer |
| 15:20:42 | <EvanR> | vector of Word8 is an adequate semantics (for strict ByteString) |
| 15:21:42 | <Inst> | so it's a vector (array or typed list) of unsigned integers limited to 8 bits |
| 15:21:57 | <EvanR> | that's getting into the weeds |
| 15:22:01 | <EvanR> | unnecessarily specific |
| 15:22:41 | <EvanR> | numbers zero to 255 |
| 15:22:54 | <Inst> | albet70, still here? |
| 15:24:10 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 15:25:26 | → | euleritian joins (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) |
| 15:26:11 | → | spew joins (~spew@201.141.102.132) |
| 15:26:41 | <fr33domlover> | o/ What's the recommended extensible record package these days? Is vinyl still the thing? I see there's a few more (in particular the 'topaz' package has been updated in 2024, while vinyl hasn't since 2022) |
| 15:27:44 | <albet70> | sorry, I was coding |
| 15:29:06 | <albet70> | I'm learning that some basic alghrithm for interview, some list stuff |
| 15:29:13 | <EvanR> | vinyl probably still works and sometimes you don't need constant updates |
| 15:29:22 | <EvanR> | haven't heard of topaz |
| 15:29:45 | <Inst> | in py, right? |
| 15:29:55 | <EvanR> | one of the dependent map packages might also work in lieu of vinyl |
| 15:30:33 | <albet70> | haha, I'm learning Data.List and turn it to py for interview, there's no haskell job around |
| 15:30:57 | <Franciman> | albet70: where are you located? Asia/EU/Americas |
| 15:31:24 | <albet70> | Data.List is a very very good for people to solve some interview questions |
| 15:31:32 | <albet70> | Asia |
| 15:32:04 | <Inst> | did you see the Haskell mergesort Data.List.sort yet? |
| 15:32:28 | <Inst> | actually that's not really basic :( |
| 15:35:20 | <c_wraith> | These days, it's kind of the table stakes for a standard library sort, even in the case where you're not trying to 100% maximize efficiency because of the data structure involved |
| 15:35:54 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 252 seconds) |
| 15:36:24 | <c_wraith> | But like... if your standard library sort isn't O(n) on sorted input, people will want to fix it. :) |
| 15:36:44 | <albet70> | quickSort (x:xs) = let smallerSorted = quickSort [a | a <- xs, a <= x]; biggerSorted = quickSort [a | a <- xs, a > x] in smallerSorted <> [x] <> biggerSorted |
| 15:37:29 | <c_wraith> | that.... is O(n^2) on sorted input |
| 15:37:53 | <Inst> | yeah people bash that all the time |
| 15:38:22 | <albet70> | it's just for interview time complex is not very important :) |
| 15:38:23 | <Inst> | but there's a different problem with that code |
| 15:38:40 | <albet70> | quickSort [] = [] |
| 15:38:48 | <Inst> | yeah :) |
| 15:38:51 | <albet70> | quickSort :: (Ord a) => [a] -> [a] |
| 15:38:59 | → | Blasius joins (~Blasius@5ec169d9.skybroadband.com) |
| 15:39:23 | <Inst> | also, that's going to do two traversals of the list per sort, do you think you can do it in one traversal? |
| 15:39:29 | → | CATS joins (apic@brezn3.muc.ccc.de) |
| 15:39:44 | <Inst> | erm, per level, not per sort |
| 15:40:23 | <albet70> | I can't do it now |
| 15:43:30 | <EvanR> | I definitely had interviews where they wanted a faster algorithm to solve something |
| 15:43:33 | <EvanR> | jerks |
| 15:43:45 | <int-e> | lol |
| 15:44:19 | × | youthlic quits (~Thunderbi@user/youthlic) (Ping timeout: 252 seconds) |
| 15:44:52 | <albet70> | that must be an algrithm engineer job |
| 15:45:37 | <EvanR> | yeah. ecommerce |
| 15:45:40 | <EvanR> | cutting edge |
| 15:46:05 | <albet70> | AI and algrithm engineer are very popular, and it ask very high skills and experience |
| 15:46:27 | <Inst> | when is Type replacing * by default, anyways? |
| 15:46:39 | <EvanR> | I thought AI was supposed to make it so I don't have to be smart |
| 15:46:48 | <EvanR> | or creative, or human |
| 15:47:13 | <albet70> | gpt 4o even can't produce functional haskell code yet |
| 15:47:24 | <Inst> | also btw, EvanR: impure energy can exist |
| 15:47:28 | <albet70> | AI is just another search engine I think |
| 15:47:31 | <EvanR> | i made working raylib bindings for me |
| 15:47:38 | <EvanR> | it, chat-gpt did |
| 15:48:28 | <albet70> | you can try to ask gpt 4o to generate a code that get title from a web link, see if it works |
| 15:48:31 | ← | CATS parts (apic@brezn3.muc.ccc.de) () |
| 15:48:50 | <Inst> | matter-energy is implictly impure energy, no? |
| 15:49:00 | → | terrorjack4 joins (~terrorjac@static.163.82.63.178.clients.your-server.de) |
| 15:49:41 | <albet70> | a few days ago, I tried that, the code gpt 4o produced can't work, and some functions it generated I can't find it on hoogle, it may copy it from some people's code |
| 15:50:20 | <EvanR> | Inst, are you channelling deepak chopra, this is a haskell channel |
| 15:50:23 | <albet70> | but it forget to copy that function's definition |
| 15:50:42 | <Inst> | sosrry for being pedantic |
| 15:50:48 | <Inst> | but then again, this is a haskell channel :3 |
| 15:51:14 | <Inst> | well tbh it's not a term of art in physics |
| 15:51:17 | <Inst> | so i lose |
| 15:51:28 | <EvanR> | not pedantic but mistaking mystic metaphysics for science |
| 15:52:42 | <albet70> | use traverse's early return to write a function allEqual work on a list |
| 15:53:36 | <EvanR> | haskell code to do an HTTP get? |
| 15:54:16 | <Inst> | traverse isn't capable of early return iirc |
| 15:54:26 | <Inst> | unless by early return you mean throwing an exception |
| 15:54:42 | <Inst> | or it's working on a type that has early return baked in |
| 15:54:46 | <EvanR> | it depends on the Applicative |
| 15:55:07 | <ncf> | Writer All |
| 15:55:27 | <EvanR> | :t traverse |
| 15:55:28 | <lambdabot> | (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) |
| 15:56:26 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 260 seconds) |
| 15:56:44 | <EvanR> | > sequenceA (Nothing : repeat (Just 'z')) |
| 15:56:46 | <lambdabot> | Nothing |
| 15:56:49 | <Inst> | (a -> Maybe a) -> [a] -> Maybe [a] |
| 15:57:08 | <EvanR> | it either returned early or lambdabot did hypercomputation |
| 15:57:15 | <ncf> | or s/Writer/Const/ i guess |
| 15:57:16 | <Inst> | hypercomputation? |
| 15:57:26 | <EvanR> | it went to the end of the infinite list before returning xD |
| 15:58:22 | <Inst> | raw data is a term of art in statistics, though |
| 15:58:27 | <ncf> | > getAll . getConst $ traverse (\n -> Const (All (even n))) [1..] |
| 15:58:29 | <lambdabot> | False |
| 15:58:35 | <albet70> | python try except version: https://paste.tomsmeding.com/guyWwXF9 |
| 15:58:50 | <EvanR> | well in haskell we don't deal in raw data but in specific datatypes like Word8 |
| 15:58:57 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 15:59:03 | <EvanR> | which isn't special in the abstract haskell world |
| 15:59:12 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 15:59:16 | <EvanR> | hardware may be optimized to handle it but that's another subject |
| 15:59:22 | <Inst> | serialized data, i guess |
| 15:59:42 | <EvanR> | you could serialize data using Word7 or Word9 |
| 16:00:12 | <EvanR> | and raw data in statistics is probably not all Word8 |
| 16:00:56 | <lisbeths> | i want to return ibis https://usercontent.irccloud-cdn.com/file/iyr5fx5A/Screenshot_2024-08-19-08-59-08-512_com.termux.jpg |
| 16:00:59 | → | sprout_ joins (~sprout@84-80-106-227.fixed.kpn.net) |
| 16:01:18 | × | euleritian quits (~euleritia@dynamic-176-000-011-067.176.0.pool.telefonica.de) (Ping timeout: 276 seconds) |
| 16:01:49 | <lisbeths> | i can do this in ghci but not in a file |
| 16:02:14 | <EvanR> | :t id id |
| 16:02:15 | <lambdabot> | a -> a |
| 16:02:39 | <EvanR> | that's not IO () |
| 16:02:45 | → | euleritian joins (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) |
| 16:02:58 | <EvanR> | the do has no effect there |
| 16:03:04 | <Inst> | that's so cool, btw |
| 16:03:08 | <albet70> | traverse is another version of fmap, I wonder is there other version of reduce or filter? |
| 16:03:26 | <Inst> | that doesn't work in ghci for me |
| 16:03:29 | <Inst> | i mean coding on your phone |
| 16:03:42 | <Inst> | traverse isn't another version of fmap |
| 16:03:51 | × | sprout_ quits (~sprout@84-80-106-227.fixed.kpn.net) (Client Quit) |
| 16:03:58 | <EvanR> | yafmap |
| 16:04:02 | <EvanR> | yet another fmap |
| 16:04:06 | <EvanR> | and yeah it's not |
| 16:04:33 | <Inst> | lisbeths: I'm curious how you got it working in ghci, though |
| 16:04:36 | → | sprout_ joins (~sprout@84-80-106-227.fixed.kpn.net) |
| 16:04:45 | <ncf> | there is a sense in which traverse is a generalisation of fmap (set f to the Identity applicative), so you can sort of see it as an "effectful fmap" |
| 16:04:51 | <ncf> | :t filterM |
| 16:04:52 | <lambdabot> | Applicative m => (a -> m Bool) -> [a] -> m [a] |
| 16:04:54 | <ncf> | :t foldMapM |
| 16:04:55 | <lambdabot> | error: |
| 16:04:56 | <lambdabot> | • Variable not in scope: foldMapM |
| 16:04:56 | <lambdabot> | • Perhaps you meant one of these: |
| 16:05:06 | <ncf> | :t foldM |
| 16:05:07 | <lambdabot> | (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b |
| 16:05:12 | <lisbeths> | I am saying I can debug it in ghci but I dont have IO in ghc |
| 16:05:40 | <Inst> | you usually get the same error messages when ghc tries to compile |
| 16:05:44 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 16:05:45 | × | sprout quits (~quassel@2a02-a448-3a80-0-a848-29f8-5180-8beb.fixed6.kpn.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 16:05:46 | <EvanR> | what happened to your IO in ghc |
| 16:06:00 | <EvanR> | that sounds problematic |
| 16:06:31 | <Inst> | albet70: Haskell has a ton of reduce-like functions, tbh |
| 16:06:34 | <Inst> | it's in Data.Foldable |
| 16:06:42 | <EvanR> | :t fold |
| 16:06:42 | <lisbeths> | i never learned IO. I need a function that prints an char to hegin |
| 16:06:43 | <lambdabot> | (Foldable t, Monoid m) => t m -> m |
| 16:06:53 | <Inst> | hegin? |
| 16:07:02 | <EvanR> | :t putChar |
| 16:07:03 | <lambdabot> | Char -> IO () |
| 16:07:06 | <EvanR> | \o/ |
| 16:07:47 | sprout_ | is now known as sprout |
| 16:07:48 | <EvanR> | with putChar and getChar you are ready to implement the chinese room paradox |
| 16:08:40 | × | euleritian quits (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 16:08:58 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 16:09:37 | <albet70> | fmap, ap, bind, map,filter,reduce |
| 16:10:10 | <albet70> | map is wonderful |
| 16:10:24 | <albet70> | what's mapReduce? |
| 16:10:27 | → | CAT_S joins (apic@brezn3.muc.ccc.de) |
| 16:10:32 | <EvanR> | map followed by reduce |
| 16:10:57 | → | segfaultfizzbuzz joins (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) |
| 16:10:58 | <albet70> | reduce . map? |
| 16:11:31 | <EvanR> | ... sure |
| 16:11:46 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 16:12:01 | <EvanR> | map followed by reduce in a general sense marketed by google |
| 16:12:25 | <Inst> | accumMapL or accumMapR, iirc |
| 16:12:50 | <EvanR> | :t mapAccumR |
| 16:12:51 | <lambdabot> | Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) |
| 16:13:15 | <Inst> | mapAccumL |
| 16:13:18 | <Inst> | mapAccumR |
| 16:13:38 | <EvanR> | this is slightly different from map reduce |
| 16:14:04 | <EvanR> | it's a map which can update a state along the way |
| 16:14:17 | <albet70> | function compose give me a intuition, in python map(lambda xs: map(lambda x: f(x), xs), xss) is not intuition, but (fmap . fmap) f xss is very intuition |
| 16:14:49 | <Inst> | map reduce filters at the same time |
| 16:14:58 | <EvanR> | no |
| 16:15:05 | <EvanR> | no filtering |
| 16:15:09 | <Inst> | https://en.wikipedia.org/wiki/MapReduce ? |
| 16:15:46 | <EvanR> | reduce means you are getting a summary value |
| 16:15:56 | <EvanR> | map means you get something the same size as the input |
| 16:16:13 | <EvanR> | filter is a weird special case |
| 16:17:39 | <EvanR> | it makes sense for list... and there's this Witherable thing |
| 16:18:43 | <albet70> | it's late here, good night |
| 16:18:47 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 16:18:49 | <Inst> | good night :) |
| 16:19:10 | <Inst> | do you think he's somehow doing Standard Chartered? |
| 16:20:04 | <Inst> | probably not |
| 16:20:07 | × | segfaultfizzbuzz quits (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
| 16:20:44 | → | jinsun joins (~jinsun@user/jinsun) |
| 16:22:30 | <lisbeths> | i think my terminal may have the wrong locale? https://usercontent.irccloud-cdn.com/file/AFBMNhho/Screenshot_2024-08-19-09-21-38-808_com.termux.jpg |
| 16:23:17 | <glguy> | lisbeths: you should run the executable not the object file |
| 16:23:53 | <glguy> | GHC will make the executable executable; you won't need to chmod anything |
| 16:24:10 | <EvanR> | you tried to run the .o file |
| 16:24:34 | × | kuribas quits (~user@ptr-17d51endnrlvux1kiym.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 16:25:06 | <lisbeths> | i dont see a .exe I see a .hi |
| 16:25:46 | <glguy> | it won't have a file extension |
| 16:26:48 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 16:27:02 | → | segfaultfizzbuzz joins (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) |
| 16:29:41 | <lisbeths> | that worked hut it broke when I switched to putChar https://usercontent.irccloud-cdn.com/file/DeyPDHRO/Screenshot_2024-08-19-09-28-46-638_com.termux.jpg |
| 16:31:22 | <lisbeths> | could it be fastlisp-compiler.hs~ from emacs |
| 16:32:13 | <EvanR> | :t "h" |
| 16:32:14 | <lambdabot> | [Char] |
| 16:32:17 | <EvanR> | :t 'h' |
| 16:32:18 | <lambdabot> | Char |
| 16:32:26 | → | dans72065 joins (~danse-nr3@user/danse-nr3) |
| 16:32:27 | <EvanR> | different quotes |
| 16:33:03 | <EvanR> | 'h' is a Char while "h" is sugar for 'h':[] |
| 16:33:09 | × | segfaultfizzbuzz quits (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) (Ping timeout: 276 seconds) |
| 16:33:34 | <lisbeths> | ok I have output |
| 16:33:59 | <lisbeths> | oroblem = solved for now |
| 16:34:06 | <EvanR> | you're not getting proper error messages |
| 16:34:22 | <EvanR> | it should have given you type errors for that mistake |
| 16:34:34 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 252 seconds) |
| 16:35:25 | <rini> | is there a better way to say this: doIO <&> (>>= doMaybe) |
| 16:38:37 | × | sprout quits (~sprout@84-80-106-227.fixed.kpn.net) (Quit: leaving) |
| 16:38:52 | → | sprout joins (~sprout@84-80-106-227.fixed.kpn.net) |
| 16:39:36 | → | segfaultfizzbuzz joins (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) |
| 16:40:20 | <lisbeths> | trying to define kestrel with lambda as let https://usercontent.irccloud-cdn.com/file/eSddvGSU/Screenshot_2024-08-19-09-39-40-348_com.termux.jpg |
| 16:41:03 | <EvanR> | you didn't put -> |
| 16:43:05 | <lisbeths> | yep and I s/putchar/putChar |
| 16:43:27 | × | mesaoptimizer quits (~mesaoptim@user/PapuaHardyNet) (Quit: nyaa~) |
| 16:43:37 | → | mesaoptimizer joins (~mesaoptim@user/PapuaHardyNet) |
| 16:48:49 | <haskellbridge> | <thirdofmay18081814goya> given a type is there a way to automatically produce a value for it? |
| 16:50:17 | <EvanR> | :t undefined |
| 16:50:18 | <lambdabot> | a |
| 16:50:52 | <EvanR> | if that's not allowed it depends |
| 16:52:00 | <haskellbridge> | <thirdofmay18081814goya> that's a start ty |
| 16:52:36 | <geekosaur> | thirdofmay18081814goya, there is no way to generate values for an arbitrary unconstrained type. there are various constraints that provide ways to generate non-bottom values (for example, Arbitrary from QuickCheck, Default from data-default, Monoid from base) |
| 16:52:52 | <EvanR> | @djinn a -> b -> a |
| 16:52:52 | <lambdabot> | f a _ = a |
| 16:53:08 | <EvanR> | @jinn (a,b) -> (b,a) |
| 16:53:09 | <lambdabot> | f (a, b) = (b, a) |
| 16:53:35 | <mauke> | IIRC oleg has a "djinn"-like method |
| 16:53:39 | <lisbeths> | attempting to use let more deeply https://usercontent.irccloud-cdn.com/file/D3K3GI3P/Screenshot_2024-08-19-09-52-47-869_com.termux.jpg |
| 16:53:54 | <haskellbridge> | <thirdofmay18081814goya> geekosaur: I see ty |
| 16:54:22 | <EvanR> | lisbeths, you're not using let at all |
| 16:54:44 | <lisbeths> | im not using haskell's let |
| 16:54:50 | <mauke> | you need to indent that whole thing |
| 16:55:09 | <lisbeths> | how many spaces, four? |
| 16:55:09 | <EvanR> | in what sense are you using let |
| 16:55:12 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 16:55:22 | <mauke> | if "main" is in column 1, all parts of main's body must be indented at least 1 space |
| 16:56:28 | <mauke> | <mauke> I should port to Haskell <- that was supposed to say "port <ciso646>" |
| 16:56:36 | <mauke> | pwned by markdown |
| 17:02:59 | × | segfaultfizzbuzz quits (~segfaultf@c-73-158-62-240.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 17:03:50 | <lisbeths> | forgot -> in last one. in this one type error https://usercontent.irccloud-cdn.com/file/XWONhEUt/Screenshot_2024-08-19-10-02-45-353_com.termux.jpg |
| 17:04:13 | → | LukeHoersten joins (~LukeHoers@user/lukehoersten) |
| 17:05:00 | <lisbeths> | i need these to be of anonymous type |
| 17:05:41 | <mauke> | kestrel putChar '1' putChar '0' == putChar putChar '0' == type error |
| 17:05:53 | <lisbeths> | ah |
| 17:05:55 | <EvanR> | you forgot or added too many arguments |
| 17:06:17 | <EvanR> | thank goodness for the type system because that code is hard |
| 17:07:10 | <mauke> | :t ?wtf putChar '0' :: IO () |
| 17:07:11 | <lambdabot> | (?wtf::(Char -> IO ()) -> Char -> IO ()) => IO () |
| 17:07:36 | × | dans72065 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 276 seconds) |
| 17:08:59 | <lisbeths> | its just basic church encoding https://usercontent.irccloud-cdn.com/file/nnhCzTyK/Screenshot_2024-08-19-10-08-18-242_com.termux.jpg |
| 17:09:56 | <lisbeths> | i have no idea how haskell types work |
| 17:10:54 | <mauke> | yes, now you're running into the problem that lambda isn't let |
| 17:11:09 | <mauke> | specifically, function arguments aren't polymorphic (by default) |
| 17:11:20 | <lisbeths> | u wot m8 |
| 17:11:29 | <lisbeths> | y lambda no let |
| 17:11:32 | <mauke> | > (\id -> (id 'x', id ())) (\x -> x) |
| 17:11:34 | <lambdabot> | error: |
| 17:11:34 | <lambdabot> | • Couldn't match expected type ‘Char’ with actual type ‘()’ |
| 17:11:34 | <lambdabot> | • In the first argument of ‘id’, namely ‘()’ |
| 17:11:44 | <mauke> | > let id = \x -> x in (id 'x', id ()) |
| 17:11:45 | <lambdabot> | ('x',()) |
| 17:12:17 | <lisbeths> | id shouldnt have an x |
| 17:12:58 | <mauke> | ? |
| 17:13:01 | <lisbeths> | solution: make new lambda that supports let |
| 17:13:46 | <EvanR> | > (\x -> let y = x in y) 'a' |
| 17:13:48 | <lambdabot> | 'a' |
| 17:14:17 | <mauke> | > ((\id -> (id 'x', id ())) :: (forall a. a -> a) -> (Char, ())) (\x -> x) |
| 17:14:18 | <lambdabot> | ('x',()) |
| 17:14:35 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 17:16:14 | <EvanR> | let polymorphism |
| 17:16:19 | <lisbeths> | 🤔 |
| 17:16:22 | <EvanR> | let generalization |
| 17:16:25 | × | LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: Textual IRC Client: www.textualapp.com) |
| 17:16:37 | <lisbeths> | indeed, poly moph ism....... |
| 17:16:37 | <mauke> | let therebelight |
| 17:17:14 | <EvanR> | beware therebedragons |
| 17:17:35 | <lisbeths> | needing into lambdae polymorphae |
| 17:17:42 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:17:58 | <Inst> | hmmm |
| 17:18:02 | → | califax joins (~califax@user/califx) |
| 17:18:09 | <Inst> | i'm wondering, does Haskell have any functions that declare themselves to be undefined behavior? |
| 17:18:27 | <EvanR> | :t unsafeCoerce |
| 17:18:28 | <lambdabot> | error: Variable not in scope: unsafeCoerce |
| 17:18:45 | <Inst> | unsafeCoerce afaik is platform dependent |
| 17:19:10 | <Inst> | sorry, I just thought it would have been funny to have a function named undefinedBehaviorCoerce |
| 17:19:17 | <Inst> | undefinedBehaviorCoerce = unsafeCoerce |
| 17:19:18 | <Inst> | there |
| 17:19:50 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Ping timeout: 265 seconds) |
| 17:20:00 | <lisbeths> | moly porphic types can change into a wet dog and into a wet dog jumping. whereas lambdas wants to be one type |
| 17:21:03 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 17:21:12 | <lisbeths> | anonymously typed named polymorphic lambda calculi |
| 17:21:33 | <lisbeths> | of type clojure |
| 17:21:35 | <EvanR> | "anonymously typed" |
| 17:21:36 | <EvanR> | ? |
| 17:21:40 | <lisbeths> | yes |
| 17:21:43 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 17:21:55 | <lisbeths> | I think thats an ocaml terminology |
| 17:22:26 | <lisbeths> | type * -> * |
| 17:22:54 | <glguy> | anonymously typed probably only makes sense in a language that generates new types for certain kinds of syntax like how in rust or c++ you get an unnamable, freshly generated type when you use a lambda expression |
| 17:23:05 | <glguy> | but it doesn't really make sense to use that terminology in Haskell |
| 17:23:17 | <lisbeths> | I dont know haskell terms |
| 17:23:33 | <lisbeths> | I was raised by angry bash devs |
| 17:23:38 | <EvanR> | * -> * doesn't seem right |
| 17:23:40 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 17:23:47 | <glguy> | That's fine, we'll just have you tell you when you use terms that don't make sense |
| 17:24:01 | <lisbeths> | sudo arem are f * |
| 17:24:16 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 17:26:20 | <lisbeths> | I dont know my next course of action |
| 17:26:49 | <lisbeths> | need more different kinds of lambdas |
| 17:27:04 | <mauke> | have you tried using an untyped language? |
| 17:27:22 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 17:27:22 | <EvanR> | anonymous record type or tuple is just a record type or tuple type it seems |
| 17:27:22 | <lisbeths> | what if I use a krivine machine |
| 17:27:23 | <glguy> | if you want to make some Haskell progress you might start with something like https://www.cs.nott.ac.uk/~pszgmh/pih.html |
| 17:27:39 | <lisbeths> | narrow subset of haskell |
| 17:28:04 | <lisbeths> | krivine machine has non typed lambdas |
| 17:28:31 | <glguy> | Once you know what you're doing you can start worrying about implementing other abstract machines like that |
| 17:29:10 | <lisbeths> | krivine machine be only quad-functional its lets say 40 lines if you're me |
| 17:29:49 | <lisbeths> | ill use haskells let to build it |
| 17:30:25 | → | remexre joins (~remexre@user/remexre) |
| 17:30:46 | <lisbeths> | uhhh is let l3xical? |
| 17:32:44 | <glguy> | The variables introduced by let are lexically scoped |
| 17:33:10 | <mauke> | unless you cheat |
| 17:36:08 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) () |
| 17:36:10 | <EvanR> | let x = y; y = x in y |
| 17:36:47 | <EvanR> | look y is referenced before it is defined |
| 17:36:52 | <lisbeths> | let does not seem to want in https://usercontent.irccloud-cdn.com/file/AdjCdVbI/Screenshot_2024-08-19-10-35-39-442_com.termux.jpg |
| 17:37:17 | <EvanR> | get rid of do |
| 17:37:26 | <EvanR> | you didn't need it before either |
| 17:37:41 | <EvanR> | or else use the do-version of let |
| 17:37:48 | <EvanR> | which doesn't use in |
| 17:37:49 | <lisbeths> | doh!!!! |
| 17:38:07 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2) |
| 17:38:42 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Ping timeout: 258 seconds) |
| 17:38:59 | <lisbeths> | success |
| 17:43:04 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 17:53:46 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 17:53:54 | → | euleritian joins (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) |
| 17:58:23 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 18:03:57 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds) |
| 18:04:26 | <monochrom> | Yeah Haskell is lexically scoped. |
| 18:05:07 | <monochrom> | I had some fun showing students that bash's "local" is dynamically scoped. They were horrified. |
| 18:06:37 | <monochrom> | On the bright side, I also had some fun using dynamic scoping to explain free theorems, as in explaining how to define the relation for a forall type. |
| 18:07:20 | <monochrom> | (The only application of dynamic scoping I have personally identified so far.) |
| 18:08:34 | <mauke> | could've shown them perl, too |
| 18:10:23 | <monochrom> | My course doesn't have time to teach perl. :) |
| 18:10:42 | <monochrom> | But OK, 2 decades ago the old version of that course included Perl. |
| 18:10:43 | <mauke> | perl (around version 2? 3? not sure) started with 'local' and dynamic scoping, then perl 5 added 'my', which declares proper lexically scoped variables |
| 18:11:10 | <monochrom> | Ah. I think I learned Perl 5 only. |
| 18:11:32 | <mauke> | perl 5 is where it became a real programming language :-) |
| 18:12:18 | <mauke> | adding local variables, general data structures, objects/methods/classes, first-class functions, and all the fun stuff |
| 18:13:23 | <mauke> | or you could go the Common Lisp route where LET creates either a lexical or a dynamic binding, depending on whether the identifier in question has the funny bit set |
| 18:13:42 | <mauke> | so you can never tell what (LET X ...) does in isolation |
| 18:14:09 | <mauke> | ; er, that's (LET ((X 42)) ...), I think |
| 18:17:17 | <monochrom> | Yikes funny bit. |
| 18:17:45 | <monochrom> | Yeah the syntax is (let ((var1 expr1) (var2 expr2) ...) body) |
| 18:18:32 | <monochrom> | Always looks like more parens when you just want one variable, and forget that the syntax is designed to accomodate more. |
| 18:18:37 | <mauke> | I don't think "funny bit" is official terminology. I think it's actually called "special" |
| 18:20:14 | <mauke> | anyway, Common Lisp is great when you really need the semantics of your local bindings to depend on the exact identifiers you use |
| 18:21:41 | × | euleritian quits (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 18:22:55 | → | euleritian joins (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) |
| 18:24:18 | × | flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Ping timeout: 276 seconds) |
| 18:25:56 | → | troydm joins (~troydm@user/troydm) |
| 18:27:58 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 18:31:22 | → | flukiluke joins (~m-7humut@168.138.14.225) |
| 18:31:52 | → | nrs-status joins (~nrs-statu@190.16.167.62) |
| 18:32:17 | → | Umeaboy joins (~Umeaboy@94-255-145-133.cust.bredband2.com) |
| 18:33:44 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 18:34:41 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 18:47:07 | × | scubagear quits (scubagear@gateway/vpn/protonvpn/scubagear) (Ping timeout: 244 seconds) |
| 18:48:45 | × | flukiluke quits (~m-7humut@168.138.14.225) (Ping timeout: 252 seconds) |
| 18:49:07 | → | scubagear joins (scubagear@gateway/vpn/protonvpn/scubagear) |
| 18:49:42 | → | flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) |
| 18:56:12 | × | m1dnight quits (~christoph@78-20-63-126.access.telenet.be) (Quit: WeeChat 4.4.0) |
| 18:56:28 | → | m1dnight joins (~christoph@78-20-63-126.access.telenet.be) |
| 19:01:20 | × | lockna quits (~lockna@2a01:4f8:10b:14f1::2) (Read error: Connection reset by peer) |
| 19:04:35 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 19:04:56 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 19:18:44 | <Inst> | monochrom, re that easy case |
| 19:18:58 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds) |
| 19:19:06 | <Inst> | hmmm, i'm wondering if it's possible to express that concept using fix |
| 19:19:45 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 248 seconds) |
| 19:21:41 | <monochrom> | Tautologically and superficially, all programs can be expressed using fix. |
| 19:23:06 | <c_wraith> | (fix const) (the rest of the program) |
| 19:23:07 | <monochrom> | Example: "f = True" can be rewritten as "f = fix (const True)". |
| 19:24:00 | <c_wraith> | whoops, I needed a . in there |
| 19:24:32 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 19:27:23 | <int-e> | monochrom: why not const True fix |
| 19:30:14 | <ncf> | :t fix . const |
| 19:30:15 | <lambdabot> | c -> c |
| 19:30:17 | <ncf> | :t ($ fix) . const |
| 19:30:18 | <lambdabot> | c -> c |
| 19:30:24 | <ncf> | fun |
| 19:34:34 | <ncf> | const <*> f = id @(domain of f) |
| 19:37:22 | <monochrom> | Can we meet in the middle? const (fix (const True)) fix >:) |
| 19:38:16 | → | billchenchina- joins (~billchenc@2a0d:2580:ff0c:1:4a35:c1dc:b9b7:67d8) |
| 19:38:19 | <monochrom> | OK, I have found that I have a serious error in my type inference tutorial. |
| 19:39:14 | <monochrom> | Coincidentally I am planning to give the exam question "infer the type of \f -> let x = f x in x", and when solving it myself I saw my omission. |
| 19:39:39 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 19:40:15 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Quit: ash3en) |
| 19:40:35 | <monochrom> | For a recursive equation like "x = f x", you create an unknown ux for x, infer "f x" under x::ux, unify the answer with ux, then you can generalize. |
| 19:40:45 | <monochrom> | I forgot "unify the answer with ux". |
| 19:41:49 | <mauke> | what does that give you? (a -> a) -> b? |
| 19:41:50 | <monochrom> | So now the inference procedure I taught is broken. (\f -> let x = f x in x) becomes wrongly (ux -> ufx) -> ufx |
| 19:41:55 | <mauke> | oh |
| 19:42:14 | × | euleritian quits (~euleritia@dynamic-176-007-195-049.176.7.pool.telefonica.de) (Ping timeout: 260 seconds) |
| 19:42:29 | <monochrom> | Now I have to think up a different exam question :( |
| 19:42:55 | → | euleritian joins (~euleritia@dynamic-176-001-130-140.176.1.pool.telefonica.de) |
| 19:43:01 | <c_wraith> | ask them to infer the type of loeb |
| 19:46:19 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 252 seconds) |
| 19:52:33 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 20:00:13 | <scubagear> | Any recommended FRP libraries for games? Seems Yampa or Dunai can do SDL. Reflex seems a popular FRP library but it looks like it's more oriented to web apps. |
| 20:00:19 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 20:02:10 | → | bilegeek joins (~bilegeek@2600:1008:b0a9:82d6:950d:cb91:c8d0:13a5) |
| 20:03:54 | × | nrs-status quits (~nrs-statu@190.16.167.62) (Quit: Client closed) |
| 20:05:54 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 258 seconds) |
| 20:08:12 | × | euleritian quits (~euleritia@dynamic-176-001-130-140.176.1.pool.telefonica.de) (Ping timeout: 258 seconds) |
| 20:08:32 | → | euleritian joins (~euleritia@dynamic-176-001-130-140.176.1.pool.telefonica.de) |
| 20:08:34 | → | ash3en joins (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) |
| 20:08:39 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 20:09:15 | × | ash3en quits (~Thunderbi@2a02:3100:7c33:4600:18af:2cb4:f788:c54e) (Client Quit) |
| 20:14:51 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 20:15:29 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds) |
| 20:16:02 | → | hiredman joins (~hiredman@frontier1.downey.family) |
| 20:16:49 | × | foul_owl_ quits (~kerry@185.219.141.164) (Ping timeout: 248 seconds) |
| 20:19:27 | <scubagear> | Hm seems you could actually do SDL2 with Reflex. That's interesting. |
| 20:20:13 | → | foul_owl joins (~kerry@174-21-147-232.tukw.qwest.net) |
| 20:21:11 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 20:24:18 | → | mikess joins (~mikess@user/mikess) |
| 20:28:45 | → | Blasius_ joins (~Blasius@5ec169d9.skybroadband.com) |
| 20:31:47 | × | Blasius quits (~Blasius@5ec169d9.skybroadband.com) (Ping timeout: 255 seconds) |
| 20:39:30 | × | euleritian quits (~euleritia@dynamic-176-001-130-140.176.1.pool.telefonica.de) (Ping timeout: 276 seconds) |
| 20:40:02 | → | euleritian joins (~euleritia@dynamic-176-007-196-137.176.7.pool.telefonica.de) |
| 20:46:59 | × | euleritian quits (~euleritia@dynamic-176-007-196-137.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 20:47:16 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 20:48:45 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 20:52:04 | → | Achylles joins (~Achylles@45.182.57.14) |
| 20:55:20 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 20:55:57 | × | michalz quits (~michalz@185.246.207.193) (Remote host closed the connection) |
| 20:57:19 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 20:59:30 | <[exa]> | Is there a warp/wai middleware that would make sure there's not too many concurrent requests being processed at once? |
| 20:59:58 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
| 21:00:19 | <monochrom> | Would it be some kind of thread pool? |
| 21:00:55 | <monochrom> | Can it be solved by hardware? I.e., buy a 20-year-old 486. >:) |
| 21:01:08 | <monochrom> | Use a dial-up modem. >:) |
| 21:01:43 | <monochrom> | Wait, 486 is 30-year-old. |
| 21:02:00 | <Rembane> | The classic off by a decade error |
| 21:02:38 | <monochrom> | Time flies like a morphism. Fruit flies like an object. |
| 21:03:09 | <[exa]> | let's emulate the 486 in software tho |
| 21:04:28 | <Rembane> | Brrrrrrrrrrrrm |
| 21:04:55 | <[exa]> | my point is that with literally each web service I was running ever, we had to very carefully make sure that there are limits and it's not going to go explode (e.g. cause OOM) by someone simply opening enough connections and making them wait in the right moment.. now, looking at wai, warp, scotty, etc., there's absolutely no real treatise of these |
| 21:05:00 | <[exa]> | so kinda concerned |
| 21:05:29 | <[exa]> | perhaps I'm missing something obvious (is warp somehow magically resistant to this kind of DoS?) |
| 21:05:39 | <monochrom> | I think you do one-thread-per-client and limit that with a thread pool. |
| 21:05:40 | <EvanR> | it's probably not resistant |
| 21:05:46 | <EvanR> | security is hard |
| 21:06:06 | <EvanR> | DOS is pretty easy |
| 21:07:53 | → | son0p joins (~ff@2800:e2:f80:ee7::5) |
| 21:07:54 | <monochrom> | You also have on-call experts who block IP addresses at the firewall/router in real time. |
| 21:08:07 | <monochrom> | maybe s/on-call/on-duty/ |
| 21:08:08 | <[exa]> | monochrom: any fav implementation of the threadpool? or I just wing it with a TChan or so? |
| 21:08:21 | <EvanR> | MVar [ThreadID] |
| 21:08:26 | <monochrom> | I don't have one. I haven't done this. |
| 21:08:27 | <EvanR> | lol |
| 21:09:01 | <[exa]> | monochrom: yeah btw we've had these experts |
| 21:09:10 | <EvanR> | you don't really need a thread pool in concurrent haskell, you just spawn forkIO threads in the acceptor thread using your connection limit strategy |
| 21:09:26 | <EvanR> | java uses threadpools because they use "heavy weight" OS threads |
| 21:09:39 | <EvanR> | which are apparently slow enough to overengineer threadpools for everything |
| 21:09:54 | <[exa]> | EvanR: "connection limit strategy" is there something ready for this? |
| 21:10:05 | <[exa]> | maybe I just need to find where is the connection limiting knob for warp :D |
| 21:10:22 | <EvanR> | ok "it must be a wai middleware" makes it less trivial |
| 21:10:56 | <[exa]> | monochrom: you don't know why you pay them for like half a year and then the dns DDoS comes, and they have the passwords from the AS blackhole :D |
| 21:11:11 | <[exa]> | EvanR: doesn't really need to be a middleware |
| 21:11:24 | <[exa]> | more like anything that I don't need to do from scratch again :D |
| 21:12:21 | <[exa]> | otoh the MVar with thread IDs (+ an integer) might fit in like 10 lines |
| 21:12:38 | <EvanR> | that was basically a joke |
| 21:12:51 | [exa] | sad |
| 21:12:55 | <EvanR> | no need to hold onto dormant thread IDs |
| 21:13:01 | <EvanR> | just forkIO on demand |
| 21:13:27 | <EvanR> | but this is something that would be done inside the wai middleware |
| 21:13:39 | <EvanR> | aiui |
| 21:15:01 | <EvanR> | the core Var I imagine is a TVar Int saying how many free slots are left, each request thread being wrapped in a finally which bumps the Int back |
| 21:15:26 | <EvanR> | which if the acceptor thread is waiting for 0 to go above 0, wakes up the acceptor thread |
| 21:16:54 | <[exa]> | ok there's 2 WAI ratelimiting middlewares in hackage but no concurrency limiting one |
| 21:17:30 | <[exa]> | I'll assume that I'm searching wrong for today and see tomorrow, if there's still nothing I'll just code this :D |
| 21:17:35 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 258 seconds) |
| 21:17:36 | <[exa]> | EvanR monochrom: thanks a lot! |
| 21:17:53 | → | Square joins (~Square@user/square) |
| 21:21:30 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 21:23:54 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
| 21:24:44 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 21:33:57 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 21:34:14 | × | jcarpenter2 quits (~lol@2603:3016:1e01:b980:1879:8876:e512:52cf) (Ping timeout: 260 seconds) |
| 21:35:59 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds) |
| 21:41:21 | × | Vajb quits (~Vajb@n4v0h48xv84fiqflept-1.v6.elisa-mobile.fi) (Ping timeout: 258 seconds) |
| 21:42:53 | → | Vajb joins (~Vajb@85-76-15-1-nat.elisa-mobile.fi) |
| 21:59:31 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:00:46 | → | pavonia joins (~user@user/siracusa) |
| 22:11:11 | → | esnos joins (~user@176.106.34.161) |
| 22:11:59 | <esnos> | Hi, do you know why here I get "parser: parse error on input '|'" in this code? |
| 22:12:08 | <esnos> | g s = |
| 22:12:08 | <esnos> | let result = runParser (Parser f) s |
| 22:12:08 | <esnos> | in | isNothing result = Nothing |
| 22:12:08 | <esnos> | | otherwise = |
| 22:12:11 | <esnos> | let Just (fRest, strRest) = result |
| 22:12:14 | <esnos> | in first fRest <$> runParser (Parser a) strRest |
| 22:13:06 | <geekosaur> | you can't put guards after "let ... in" |
| 22:13:53 | <geekosaur> | what you can do is put the definition of `result` in a `where` clause and use it within guards |
| 22:14:07 | <esnos> | So I have to just use guards with where, or let with case of? |
| 22:14:09 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:14:45 | → | dyniec joins (~dyniec@dybiec.info) |
| 22:14:47 | <ncf> | or let with MultiWayIf |
| 22:15:35 | <EvanR> | or guards on top level definitions |
| 22:16:08 | <mauke> | why use let at all |
| 22:17:02 | <mauke> | g s = case runParser (Parser f) s of { Nothing -> Nothing; Just (fRest, strRest) -> first fRest <$> runParser (Parser a) strRest } |
| 22:19:49 | <esnos> | mauke: I just wanted to know if I can do that |
| 22:21:26 | <esnos> | I'm trying to read Haskell languare report and there is line |
| 22:22:09 | <geekosaur> | guards always come before the = |
| 22:22:17 | → | fraznel joins (~fuag1@c-67-160-124-36.hsd1.wa.comcast.net) |
| 22:22:25 | <esnos> | lexp → let decls in exp, which means that there must be expression after "in", so guards are not expressions and case of are? |
| 22:22:50 | <mauke> | guards are attached to a pattern |
| 22:22:52 | <geekosaur> | case of is an expression, yes. guards are part of a definition, not an expression |
| 22:23:02 | <geekosaur> | or patterns in general, yes |
| 22:23:31 | <geekosaur> | (exception: with MultiWayIf you can write `if | ...`, but it only works with `if`) |
| 22:23:49 | × | son0p quits (~ff@2800:e2:f80:ee7::5) (Ping timeout: 260 seconds) |
| 22:24:45 | <mauke> | > case Just 5 of { Just x | even x -> True; _ -> False } |
| 22:24:47 | <lambdabot> | False |
| 22:27:02 | <esnos> | Ok, I think I understand now, thanks everyone for help |
| 22:27:08 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 22:27:49 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 22:34:21 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6) |
| 22:41:17 | → | TonyStone joins (~TonyStone@user/TonyStone) |
| 22:47:22 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds) |
| 22:51:32 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 22:51:45 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 23:04:50 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 23:05:13 | → | wroathe joins (~wroathe@mobile-166-175-184-5.mycingular.net) |
| 23:05:13 | × | wroathe quits (~wroathe@mobile-166-175-184-5.mycingular.net) (Changing host) |
| 23:05:13 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:12:49 | × | billchenchina- quits (~billchenc@2a0d:2580:ff0c:1:4a35:c1dc:b9b7:67d8) (Ping timeout: 248 seconds) |
| 23:13:43 | × | raym quits (~ray@user/raym) (Ping timeout: 244 seconds) |
| 23:15:48 | × | mikess quits (~mikess@user/mikess) (Quit: mikess) |
| 23:20:48 | → | raym joins (~ray@user/raym) |
| 23:22:26 | × | oo_miguel quits (~Thunderbi@78.10.207.46) (Ping timeout: 248 seconds) |
| 23:31:11 | → | dysthesis joins (~dysthesis@user/dysthesis) |
| 23:32:10 | × | Achylles quits (~Achylles@45.182.57.14) (Quit: Leaving) |
| 23:33:10 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 23:33:26 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 23:43:35 | → | haritzondo joins (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) |
| 23:43:42 | × | haritz quits (~hrtz@user/haritz) (Ping timeout: 272 seconds) |
| 23:43:46 | → | brandt joins (~brandt@177.191-pool-nas4-sc.sccoast.net) |
| 23:46:13 | × | acidjnk quits (~acidjnk@p200300d6e72cfb5259affcc514115865.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 23:49:26 | × | esnos quits (~user@176.106.34.161) (Ping timeout: 252 seconds) |
| 23:53:45 | × | segfaultfizzbuzz quits (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) (Ping timeout: 252 seconds) |
| 23:53:48 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
All times are in UTC on 2024-08-19.