Home liberachat/#haskell: Logs Calendar

Logs on 2023-05-02 (liberachat/#haskell)

00:12:15 xff0x_ joins (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp)
00:12:51 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
00:13:33 crns joins (~netcrns@p4ff5ee17.dip0.t-ipconnect.de)
00:13:33 × crns quits (~netcrns@p4ff5ee17.dip0.t-ipconnect.de) (Changing host)
00:13:33 crns joins (~netcrns@user/crns)
00:13:42 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
00:14:56 gemmaro joins (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc)
00:17:31 caryhartline joins (~caryhartl@2600:1700:2d0:8d30:8c38:7008:d307:dea1)
00:26:19 Square2 joins (~Square4@user/square)
00:29:45 × Square quits (~Square@user/square) (Ping timeout: 268 seconds)
00:39:41 × mcglk quits (~mcglk@131.191.19.145) (Read error: Connection reset by peer)
00:41:13 mcglk joins (~mcglk@131.191.19.145)
00:45:25 nate1 joins (~nate@98.45.169.16)
01:03:17 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
01:04:04 emmanuelux joins (~emmanuelu@user/emmanuelux)
01:10:46 × bramhaag quits (~bramhaag@134.195.121.39) (Read error: Connection reset by peer)
01:10:53 bramhaag joins (~bramhaag@134.195.121.39)
01:11:13 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:11:57 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:fdd9:cd01:9100:d00b)
01:12:05 × finnekit quits (~finnekit@fsf/member/finnekit) (Ping timeout: 240 seconds)
01:12:43 lottaquestions joins (~nick@2607:fa49:503f:6d00:7d78:9c20:dd70:c4c8)
01:12:59 × bramhaag quits (~bramhaag@134.195.121.39) (Client Quit)
01:16:13 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:fdd9:cd01:9100:d00b) (Ping timeout: 250 seconds)
01:16:32 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 240 seconds)
01:17:22 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:22:27 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
01:22:40 bramhaag joins (~bramhaag@134.195.121.39)
01:23:56 finnekit joins (~finnekit@fsf/member/finnekit)
01:25:45 gmg joins (~user@user/gehmehgeh)
01:26:09 × finnekit quits (~finnekit@fsf/member/finnekit) (Client Quit)
01:26:59 × bramhaag quits (~bramhaag@134.195.121.39) (Client Quit)
01:37:45 bramhaag joins (~bramhaag@134.195.121.39)
01:39:13 finnekit joins (~finnekit@fsf/member/finnekit)
01:45:31 bramhaag1 joins (~bramhaag@134.195.121.39)
01:46:50 × bramhaag quits (~bramhaag@134.195.121.39) (Ping timeout: 268 seconds)
01:46:50 bramhaag1 is now known as bramhaag
01:46:53 × finnekit quits (~finnekit@fsf/member/finnekit) (Ping timeout: 246 seconds)
01:48:59 × nate1 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
01:50:48 bilegeek joins (~bilegeek@97.sub-174-208-228.myvzw.com)
01:51:21 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
01:51:37 jinsun is now known as Guest2793
01:51:37 jinsun__ joins (~jinsun@user/jinsun)
01:51:37 × Guest2793 quits (~jinsun@user/jinsun) (Killed (copper.libera.chat (Nickname regained by services)))
01:51:38 jinsun__ is now known as jinsun
01:53:53 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 246 seconds)
01:55:25 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds)
01:55:53 × bramhaag quits (~bramhaag@134.195.121.39) (Quit: Ping timeout (120 seconds))
01:56:01 Square2 is now known as Square
01:56:59 bramhaag joins (~bramhaag@134.195.121.39)
02:00:31 finnekit joins (~finnekit@fsf/member/finnekit)
02:09:10 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
02:18:52 × xff0x_ quits (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp) (Ping timeout: 276 seconds)
02:23:40 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
02:27:23 rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca)
02:27:31 × rekahsoft quits (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca) (Remote host closed the connection)
02:29:05 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
02:30:07 <Inst_> hmmm, wait
02:30:11 <Inst_> does laziness imply backtracking?
02:30:12 <Inst_> https://paste.tomsmeding.com/mC81RdPa
02:30:20 <Inst_> this can't complete for take 1... length 8
02:33:24 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
02:33:46 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
02:38:07 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Ping timeout: 250 seconds)
02:44:47 <ski> > inRange ((1,1),(7,7)) (3,4)
02:44:48 <lambdabot> True
02:45:01 <Inst_> thanks
02:45:15 <ski> `speculations' could use `filter'
02:45:31 <Inst_> https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-Ix.html#v:inRange
02:45:33 <Inst_> cool
02:45:41 <Inst_> i used filter before, it was a microoptimization to take it out
02:45:57 <Inst_> thanks for introducing Ix typeclass to me
02:47:13 <ski> repeatedly using `length' there is inefficient. better would be to keep a counter
02:47:34 <Inst_> i switched to vec underneath, seems to cause more copying, unfortunately
02:48:11 <ski> (you could even use `replicateM_', on `StateT History []')
02:48:38 <ski> yea, lists will share tails
02:48:50 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
02:48:58 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection)
02:49:06 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:49:06 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:49:06 finn_elija is now known as FinnElija
02:50:25 <ski> `GetHistoryFailure' is also unused
02:50:41 × td_ quits (~td@i53870907.versanet.de) (Ping timeout: 250 seconds)
02:50:53 <Inst_> yeah, i know, was thinking about moving it to either
02:51:41 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
02:52:34 td_ joins (~td@i53870911.versanet.de)
02:52:48 <ski> and yes, the list monad will give you backtracking
02:53:02 <Inst_> or rather list type + laziness = backtracking?
02:54:38 <ski> yes
02:56:19 <Inst_> what is StateT History [] as a type?
02:56:19 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 250 seconds)
02:56:24 <Inst_> do you mean StateT History ()?
02:57:00 <ski> (also some redundant brackets in `generateSolutions')
02:57:11 <ski> no, that doesn't kind-check
02:57:21 <Inst_> yeah, i know, but it got modded a few times, not necessarily for the better
02:57:29 <Inst_> i guess the remaining challenge now is to figure out how to parallelize it intelligently
02:57:35 <ski> @kind StateT [(Int,Int)] ()
02:57:36 <lambdabot> error:
02:57:36 <lambdabot> • Expected kind ‘* -> *’, but ‘()’ has kind ‘*’
02:57:36 <lambdabot> • In the second argument of ‘StateT’, namely ‘()’
02:57:38 <ski> @kind StateT [(Int,Int)] []
02:57:39 <lambdabot> * -> *
02:57:51 <Inst_> i just want to figure out how to get it to let me take 1 . fromJust $ getSolutions 8 (1,1)... within a reasonable amount of time
02:58:25 <Inst_> ah, i see what you mean
02:58:37 <Inst_> since StateT is a monad transformer
02:58:52 <ski> being able to prune the state-space tree early, would be nice
02:59:29 <ski> (not sure whether there's an opportunity for that, though)
03:01:50 <ski> hm .. perhaps one could maintain a graph, keep removing edges, and somehow detect when it becomes disconnected
03:02:18 × jero98772 quits (~jero98772@2800:484:1d84:9000::3) (Remote host closed the connection)
03:03:54 <ski> anyway, i guess i would start with the counter, see if that makes a noticable difference
03:04:49 <Inst_> yeah, already added it, slight performance improvement on non-vector version
03:05:38 <Inst_> what i'm looking for right now is an improved quicksort / treesort, i.e, in the sense that it was used to show off how much nicer a declarative programming paradigm was to an imperative one
03:06:08 <ski> "treesort" ?
03:06:26 <ski> guess you mean a recursive sort (?)
03:07:53 <ski> hm, also wondering if one could do divide-and-conquer, somehow
03:08:08 <Inst_> quicksort u = if null u then u else quicksort [lesser | lesser <- u, lesser < head u] <> [head u] <> [greaterOrEqual | greaterOrEqual <- u, greaterOrEqual >= head u]
03:08:18 <Inst_> someone else suggested that
03:08:43 × gemmaro quits (~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Remote host closed the connection)
03:08:46 <Inst_> hmmm, that doesn't work
03:08:52 <ski> missing one recursive call
03:08:56 <Inst_> quicksort u = if null u then u else quicksort [lesser | lesser <- tail u, lesser < head u] <> [head u] <> [greaterOrEqual | greaterOrEqual <- tail u, greaterOrEqual >= head u]
03:09:07 <Inst_> quicksort u = if null u then u else quicksort [lesser | lesser <- tail u, lesser < head u] <> [head u] <> quicksort [greaterOrEqual | greaterOrEqual <- tail u, greaterOrEqual >= head u]
03:09:38 <ski> pattern-matching to the rescue
03:09:50 <Inst_> as a one liner? ;)
03:09:59 <Inst_> but that's not in-place
03:10:02 <ski> just use `;'
03:10:04 <Inst_> so not a true quicksort
03:10:07 <ski> right
03:10:08 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
03:10:44 <ski> mergesort is not too bad
03:10:52 <Inst_> and no one would write that cancer code, it's pretty much massaged so it can be a one-liner
03:11:10 <ski> @type partition
03:11:11 <lambdabot> (a -> Bool) -> [a] -> ([a], [a])
03:11:21 <Inst_> how well does timsort work in Haskell, since people decided that would be standard?
03:11:35 <ski> dunno about that one
03:13:01 <Inst_> i wonder if this works without scoped type variables
03:13:09 <Inst_> quicksort (u :: [a]) = if null u then u else quicksort [lesser | lesser <- tail u, lesser < head u] <> [head u] <> quicksort [greaterOrEqual | greaterOrEqual <- tail u, greaterOrEqual >= head u] :: [a]
03:13:31 <Inst_> seems to work
03:13:57 <ski> why would you think it needed those type ascriptions ?
03:14:18 <Inst_> the point / joke / parody is to turn quicksort into a one-liner in haskell without use of ;
03:14:33 <Inst_> that is the contents of the classic Haskell quicksort stuffed into one line
03:14:50 <Inst_> which is also useful as an example of "just because you can,t doesn't mean you should; i.e, give a damn about readability"
03:14:55 <ski> i don't really see the point in avoiding `;'
03:15:40 <Inst_> abuse of ; is something you can do in any language, only in heavily expression-oriented languages like haskell can you start creating degenerate expression-based code
03:15:58 <ski> anyway, you could at least avoid `head' and `tail', if you used an irrefutable pattern-match
03:17:28 <Inst_> quicksort u@(~(x:xs) :: [a]) = if null u then u else quicksort [lesser | lesser <- xs, lesser < x] <> [x] <> quicksort [greaterOrEqual | greaterOrEqual <- xs, greaterOrEqual >= x] :: [a]
03:17:29 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 268 seconds)
03:19:34 <ski> hmm, now i'm wondering about a version of quick-sort that'd use three recursive calls
03:20:44 zer0bitz_ joins (~zer0bitz@2001:2003:f443:d600:5dc3:37f0:5096:1b30)
03:22:35 × zer0bitz quits (~zer0bitz@2001:2003:f443:d600:799d:b077:ccea:4521) (Ping timeout: 265 seconds)
03:24:27 rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca)
03:31:37 × phma quits (phma@2001:5b0:2143:d3b8:7a30:9fcb:3105:385a) (Read error: Connection reset by peer)
03:32:41 phma joins (phma@2001:5b0:215a:e9f8:70e:a131:7bd8:ec6)
03:47:57 <hammond> im confused about the record syntax, say i have data Person = Person {name::String, adddrs::String} and I wanted to pattern match the name portion
03:48:11 <hammond> check p.name
03:49:26 <hammond> check p.name | p.name == "John" = ... if i pass the check function a person.
03:57:04 <ski> check Person {name = "John"} = ...
04:00:36 <johnw> I'm here
04:08:56 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
04:09:13 <hammond> even if u do something like `prefixOf`
04:15:10 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
04:17:18 <geekosaur> I think if you want to use record dot then it's `check p | "John" `isPrefixOf` p.name = …`
04:18:20 × rekahsoft quits (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca) (Ping timeout: 260 seconds)
04:19:11 <ski> check Person {name = (("John" `isPrefixOf`) -> True),adddrs} = ...
04:20:05 <hammond> slick ski
04:20:08 <hammond> thanks.
04:20:45 <ski> check Person {name,adddrs} | "John" `isPrefixOf` name = ... -- also works, obviously
04:20:58 rekahsoft joins (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca)
04:27:48 falafel joins (~falafel@2603-8000-d700-115c-9bf8-6766-e74e-f083.res6.spectrum.com)
04:33:29 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
04:35:11 × rekahsoft quits (~rekahsoft@bras-base-orllon1122w-grc-04-174-88-193-177.dsl.bell.ca) (Ping timeout: 268 seconds)
04:37:02 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
04:37:30 × bilegeek quits (~bilegeek@97.sub-174-208-228.myvzw.com) (Quit: Leaving)
04:37:53 jargon_ joins (~jargon@184.101.78.160)
04:38:36 × jargon quits (~jargon@184.101.73.92) (Ping timeout: 250 seconds)
04:48:39 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
04:49:25 gmg joins (~user@user/gehmehgeh)
04:54:55 <hammond> but then say check Person{name,addrs} "John" `isPrefixOf` name = -- return ( registrationNumber, Person)
04:55:39 <hammond> or do i have to do (registrationNumber, Person{name=name, addrs=addrs}
04:55:43 <hammond> )
04:56:13 gurkenglas joins (~gurkengla@dynamic-046-114-182-194.46.114.pool.telefonica.de)
04:56:41 <geekosaur> check p@Person{name} | "John" `isPrefixOf` name = return (registrationNumber, p)
04:56:58 <hammond> shhh
04:57:03 <hammond> ok thx
04:59:31 mbuf joins (~Shakthi@49.207.178.186)
05:13:42 × euandreh quits (~Thunderbi@189.6.18.7) (Ping timeout: 250 seconds)
05:16:12 euandreh joins (~Thunderbi@189.6.18.7)
05:18:16 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:21:04 × falafel quits (~falafel@2603-8000-d700-115c-9bf8-6766-e74e-f083.res6.spectrum.com) (Ping timeout: 248 seconds)
05:31:55 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 268 seconds)
05:33:42 × mtjm quits (~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection)
05:34:43 trev joins (~trev@user/trev)
05:34:56 mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001)
05:36:13 cyphase joins (~cyphase@user/cyphase)
05:37:26 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
05:54:43 <Inst_> i have a problem, wherein i'm addicted to helping people with their Haskell homework, because sometimes the problems get so interesting
05:55:03 <Inst_> right now, i'm trying to figure out how to get lazy conditionals, i.e, they evaluate the conditions lazily
05:55:30 <Inst_> like, if you want to run simultaneous checks on different options
05:57:52 CiaoSen joins (~Jura@tmo-108-9.customers.d1-online.com)
05:58:21 <jade[m]> use a tree to simultaneously traverse different possibilities and discard ones that don't match?
05:59:18 <jade[m]> not sure if I understood correctly what is asked for
06:02:25 <Inst_> someone tried a recursive approach to some problem, i was wondering if i understood laziness correctly, but i realize the problem with their approach, it's because conditionals are strict
06:02:46 <Inst_> the solution would be instead to parallelize the process, and when one spark returns with the correct answer, the function returns
06:03:46 <Inst_> question is, how do you do that? i mean, it'd be easy to do with mvar and code in IO, but purely?
06:10:16 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 276 seconds)
06:11:21 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
06:18:13 <Inst_> ehhh, this is intrinsically impure
06:20:28 michalz joins (~michalz@185.246.207.197)
06:26:08 × CyberSoul quits (~ray@2405:201:680a:b174:7b30:abcb:1d56:b23) (Quit: Leaving)
06:28:04 CyberSoul joins (~ray@2405:201:680a:b174:7b30:abcb:1d56:b23)
06:37:01 mncheckm joins (~mncheck@193.224.205.254)
06:39:08 × Square quits (~Square4@user/square) (Ping timeout: 268 seconds)
06:42:37 <Inst_> maybe the par monad is what i'm looking for?
06:45:25 acidjnk joins (~acidjnk@p200300d6e715c460285fef55bd00a3c3.dip0.t-ipconnect.de)
06:50:20 × gurkenglas quits (~gurkengla@dynamic-046-114-182-194.46.114.pool.telefonica.de) (Ping timeout: 250 seconds)
06:51:25 × euandreh quits (~Thunderbi@189.6.18.7) (Ping timeout: 240 seconds)
06:59:50 <somerandomnick[m> is it that you want to short circuit a parallel evaluation of conditionals?
07:00:12 <somerandomnick[m> where it is obvious how to achieve this for a sequence of conditionals
07:02:22 Gremlin8483 joins (~Gremlin84@73.243.250.212)
07:03:38 <Gremlin8483> hi, i dont write haskell but wondering how hard it is to build cabal from source, i use a source based distro and trying to build shellcheck which dep on cabal, wondering how difficult it is before i commit, i could also just use prebuilt shellcheck binary. appreciate any insights
07:04:21 <Gremlin8483> however if its not too hard i would prefer to build
07:04:26 <opqdonut> cabal is usually distributed with GHC, so i guess the bigger problem is building GHC
07:04:39 <tomsmeding> Gremlin8483: do you have any other haskell packages already in the distro
07:04:47 <tomsmeding> pandoc perhaps?
07:04:49 <Gremlin8483> right this is my first time hearing about cabal and it seemed kinda overwheliming
07:05:00 <Gremlin8483> tomsmeding no its the only one
07:05:19 <Gremlin8483> is ghc a complex software?
07:05:19 <opqdonut> is GHC (the haskell compiler) available?
07:05:30 <opqdonut> I've heard it is a beast to build
07:05:36 <opqdonut> but things might've gotten better over the years
07:05:38 <Gremlin8483> i would have to build everything from scratch, i currently have 38 packages on my system total lol
07:05:46 <tomsmeding> it's not a beast to build, but it does have its own build system that you have to make do what you want
07:05:46 <Gremlin8483> maybe i just stick with the binary then
07:05:51 <tomsmeding> ah lol
07:06:04 <tomsmeding> you'd also have to decide what to do with haskell dependencies
07:06:13 <tomsmeding> as in, other haskell libraries that shellcheck depends on
07:06:27 <Gremlin8483> oh i see, sounds like its too difficult for me, but i appreciate the advice fellas
07:06:49 <Gremlin8483> wish you all well!
07:06:55 × son0p quits (~ff@181.136.122.143) (Ping timeout: 260 seconds)
07:07:24 <tomsmeding> you could probably do it, none of the steps are individually very hard
07:07:40 <Gremlin8483> ill consider it in the future
07:07:42 <tomsmeding> but it's a whole lot of infrastructure (that you could indeed share for further haskell packages)
07:07:54 <Gremlin8483> being source based i would like to be self sufficient and build every type of software
07:08:02 <Gremlin8483> but right now might not be teh right time
07:08:03 <tomsmeding> yeah it's cool
07:08:24 <tomsmeding> perhaps if you're a bit further into also having things set up for other languages
07:08:29 <Gremlin8483> i dont mind the infrastructure, will ahve a dedicated machine for builds
07:08:38 <tomsmeding> e.g. python packages, or nodejs packages, or perl/ruby stuff
07:08:56 <tomsmeding> then adding haskell packages will be more of the same but different :)
07:09:14 <Gremlin8483> tbh i didnt even know software i used had haskell in it
07:09:20 <Gremlin8483> but shell check is essential software to me
07:09:37 <tomsmeding> but it's more well-known how packaging e.g. python stuff works, so starting there would be a good idea
07:09:42 <tomsmeding> Gremlin8483: that's a haskell win I guess :)
07:10:18 <Gremlin8483> you gotta rename it shellskellcheck or something
07:10:21 <Gremlin8483> advertise it more
07:10:42 <tomsmeding> opqdonut: iirc it's now just ./configure; hadrian/build; # grab a few coffees; cp _build/stage-2/ghc somewhere or so
07:11:06 <tomsmeding> Gremlin8483: we're in functional programming because we like the interesting programming problems
07:11:09 <tomsmeding> not because we like marketing
07:11:09 <tomsmeding> :D
07:11:24 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
07:11:34 <tomsmeding> (some do and have given haskell a serious boost over the past 10 years or so)
07:11:38 <Gremlin8483> i spent some time studying functional a few weeks ago, im not a fper but the concepts are important
07:11:39 <tomsmeding> *haskell usage
07:11:46 <Gremlin8483> you cant ignore it as a programmer
07:12:02 <mauke> Gremlin8483: you can't build ghc from source because it is written in haskell
07:12:06 <tomsmeding> the ideas are slowly making their way into other languages, which was part of why haskell exists in the first place
07:12:33 <tomsmeding> as a platform for working out language ideas and implementation ideas, to advance the field of programming language design and development
07:12:41 <Gremlin8483> it doesnt have to be functional or nonfunctional, part of engineering istaking good parts from here and there
07:12:41 <tomsmeding> mauke: oh good point lol
07:13:08 <Gremlin8483> well how do the creaters do it then, break out the assembly?
07:13:15 <Gremlin8483> punch cards?
07:13:18 <tomsmeding> Gremlin8483: use an already-built previous-version ghc
07:13:41 <tomsmeding> at some point in the past there were other useful implementations
07:13:44 <mauke> btw, gcc is written in C++
07:14:03 <tomsmeding> currently most haskell code is written using a bunch of language extensions that basically only GHC implements
07:14:12 <tomsmeding> which is the same with gcc I guess :p
07:14:42 <Gremlin8483> yea its in over my head here
07:14:56 <tomsmeding> as in, gcc is written in C++ with gnu extensions
07:14:56 <Gremlin8483> good to know, ill save some of this info for the future
07:15:18 <Gremlin8483> my distro came with gcc so i didnt have to do anythign with it
07:15:28 <tomsmeding> probably installed as a binary ;)
07:15:35 <Gremlin8483> dont ask me how to compile the compiler
07:15:37 <tomsmeding> you have to start _somewhere_
07:15:44 <Gremlin8483> i think asking chatgpt that question would make it blow up
07:15:59 <tomsmeding> aren't there projects for making a fully bootstrapped computing platform starting from assembly or something
07:16:10 <Gremlin8483> all me know is make, make install
07:16:29 <tomsmeding> but at some point you need to make specific choices, like how to type in the machine code for the first assembler :p
07:17:03 <tomsmeding> what you consider the baseline of already-compiled stuff is a spectrum, there's multiple different possible choices -- assuming gcc is one of those
07:17:16 <Gremlin8483> use haskell to compile gcc which then compiles cabal again, big brain
07:17:22 <tomsmeding> *ghc
07:17:26 <tomsmeding> ghc != gcc :p
07:17:30 <tomsmeding> but yes
07:17:32 <opqdonut> this is veering into offtopic, but guix is going all-in on the bootstrapping thing: https://guix.gnu.org/manual/en/html_node/Reduced-Binary-Seed-Bootstrap.html
07:17:54 <Gremlin8483> thats a useful topic to me, what does that mean?
07:18:02 <Gremlin8483> just they are using another os to build new one?
07:18:16 <Gremlin8483> yes build thc, gotcha
07:18:38 <opqdonut> basically, they have a sequence of simpler and simpler c compilers to be able to build gcc, and then build the world
07:18:59 <Gremlin8483> man they must really hate user's cpu time
07:19:14 <tomsmeding> opqdonut: impressive
07:19:23 <Gremlin8483> maybe have the user glue together the silicon wafers int he cpu
07:20:35 <tomsmeding> opqdonut: very offtopic, but "Work is ongoing to remove all binary blobs from our free software bootstrap stack, working towards a Full Source Bootstrap." -- how do you remove _all_ binary blobs, that sounds fundamentally impossible
07:21:09 <Gremlin8483> better fire up the ghc then
07:21:33 <opqdonut> tomsmeding: I think they start with a very simple binary (like tens of bytes) that can be verified by hand
07:21:51 <opqdonut> I've been meaning to read up on how this stuff actually works, but there's mostly just lots of blog fluff
07:22:18 <opqdonut> a bit more info here: https://www.gnu.org/software/mes/manual/mes.html#Stage0
07:23:10 <tomsmeding> opqdonut: I see, that's cool
07:24:01 <tomsmeding> yeah so they assume just some machine code input, very cool
07:25:44 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
07:26:58 azimut joins (~azimut@gateway/tor-sasl/azimut)
07:26:58 × pyook quits (~puke@user/puke) (Remote host closed the connection)
07:27:22 pyook joins (~puke@user/puke)
07:32:51 zeenk joins (~zeenk@2a02:2f04:a20f:5200::7fe)
07:39:05 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
07:44:43 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
07:48:00 lortabac joins (~lortabac@2a01:e0a:541:b8f0:bef2:f17a:dedf:ac57)
07:50:29 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:55:26 machinedgod joins (~machinedg@198.53.218.113)
08:03:14 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
08:03:46 kuribas joins (~user@188.118.57.242)
08:06:07 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
08:08:21 cfricke joins (~cfricke@user/cfricke)
08:08:40 mmhat joins (~mmh@p200300f1c701f1d6ee086bfffe095315.dip0.t-ipconnect.de)
08:10:47 × mmhat quits (~mmh@p200300f1c701f1d6ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
08:11:40 × zeenk quits (~zeenk@2a02:2f04:a20f:5200::7fe) (Quit: Konversation terminated!)
08:16:59 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:17:27 × stefan-_ quits (~cri@42dots.de) (Quit: ZNC 1.8.2+deb2build5 - https://znc.in)
08:17:43 stefan-_ joins (~cri@42dots.de)
08:23:52 <Athas> We are observing this error from a Haskell program:
08:23:53 <Athas> mmap 4096 bytes at (nil): Cannot allocate memory
08:23:58 <Athas> (Followed by SIGSEGV.)
08:24:09 <Athas> Does this error indicate that the Haskell RTS is trying to map page zero?
08:24:47 <geekosaur> no, it means the mmap address was unspecified, which means the OS can pick an address.
08:25:01 <geekosaur> is this on linux 6.1 or later by any chance?
08:25:16 <geekosaur> (kernel)
08:25:31 <Athas> Most likely. (I'm forwarding a report from a user; hoping to get more information soon.)
08:27:44 <geekosaur> kernels after a certain version switched to a new memory management system which is buggy. there's a hotfix which hasn't been committed yet, in the meantime there's an ugly LD_PRELOAD hack to work around it
08:29:51 <merijn> Athas: There's a linux kernel bug that causes that, afaik
08:30:05 <Athas> OK, I will blame my user.
08:30:10 <geekosaur> http://paste.debian.net/1274454/ is the hack, if it works then you're hitting the maple-tree implementation bug and you need https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-hotfixes-unstable&id=aa4ec634c24aa2ff24025ed1de763e079a7ea480 to fix it
08:30:41 <geekosaur> or use ghc 9.4+ which changed how they mmap in a way that avoids the bug
08:30:59 <Athas> I'm curious why I'm not hitting it myself. I use GHC 9.2.6 and Linux 6.1.25.
08:31:01 <merijn> Athas: https://bbs.archlinux.org/viewtopic.php?id=282429
08:31:13 <merijn> This bug: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/commit/queue-6.2/maple_tree-fix-mas_skip_node-end-slot-detection.patch?id=79583022efa64b59298c2cf4396bec1deb8d7db0
08:33:44 × kuribas quits (~user@188.118.57.242) (Read error: Connection reset by peer)
08:34:02 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
08:35:34 <kuribas> If I have a isPermutationOf b, b isPermutationOf c => a isPermutationOf c, can I say that isPermutationOf is transitive?
08:36:24 <Athas> Yes, isn't that the definition of transitivity?
08:37:38 × jinsl- quits (~jinsl@2408:8207:2558:8870:211:32ff:fec8:6aea) (Quit: ZNC - https://znc.in)
08:37:55 jinsl joins (~jinsl@123.120.169.188)
08:38:02 <kuribas> I think so
08:39:00 <kuribas> And symmetry?
08:39:43 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Remote host closed the connection)
08:41:55 wiosna joins (~karangura@209.166.121.87)
08:42:12 <wiosna> hello haskellers
08:42:15 <kuribas> a isPermutationOf b => b isPermutationOf a
08:42:25 <wiosna> seems to be right
08:42:53 <wiosna> what is everyone's favorite fibonacci implementation
08:43:21 <merijn> > let fibs = 0 : 1 : zipWith (+) fibs (drop 1 fibs) in fibs
08:43:23 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
08:43:24 <kuribas> the matrix version
08:43:45 <merijn> > let fibs = 0 : 1 : zipWith (+) fibs (drop 1 fibs) in fibs !! 1000000
08:43:50 <kuribas> well, it's my favorite, not everyones
08:43:51 <lambdabot> mueval-core: Time limit exceeded
08:43:55 <merijn> ok, maybe that was excessive xD
08:43:58 <merijn> > let fibs = 0 : 1 : zipWith (+) fibs (drop 1 fibs) in fibs !! 1000
08:44:00 <lambdabot> 4346655768693745643568852767504062580256466051737178040248172908953655541794...
08:46:30 <wiosna> wow this bot is so cool
08:48:38 × phma quits (phma@2001:5b0:215a:e9f8:70e:a131:7bd8:ec6) (Read error: Connection reset by peer)
08:49:15 phma joins (~phma@host-67-44-208-157.hnremote.net)
08:56:26 xff0x_ joins (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp)
08:56:52 gurkenglas joins (~gurkengla@dynamic-046-114-182-194.46.114.pool.telefonica.de)
09:01:20 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds)
09:01:56 chexum joins (~quassel@gateway/tor-sasl/chexum)
09:05:06 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 250 seconds)
09:16:18 czy joins (~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net)
09:30:11 JScript joins (~JScript@103.137.12.134)
09:30:14 × JScript quits (~JScript@103.137.12.134) (Max SendQ exceeded)
09:30:44 JScript joins (~JScript@103.137.12.134)
09:39:31 <mikko> is it possible to have "specialized" instances of a class like this https://bpa.st/ZRY32
09:39:51 <mikko> so it would have a default implementation for every type that implements Show but some types might have a more specific implementation
09:40:12 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
09:40:24 ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:e31:8ae3:609:552d)
09:40:53 <geekosaur> take a look at https://downloads.haskell.org/ghc/9.6.1/docs/users_guide/exts/default_signatures.html
09:41:42 <geekosaur> that said, if you don't need a more specific type for the default then you don't need an extension; you can simply provide a default implementation in the class definition
09:44:32 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Ping timeout: 250 seconds)
09:52:09 × bontaq quits (~user@69.119.155.132) (Ping timeout: 265 seconds)
09:52:46 × wiosna quits (~karangura@209.166.121.87) (Ping timeout: 268 seconds)
09:53:18 <geekosaur> oh, sorry, you can not provide a default instance for all `Show`able types
09:53:30 <geekosaur> it will overlap with every other instance
09:54:48 <mikko> ah that explains why i'm having trouble getting it to compile
09:55:36 <geekosaur> the rule is, contexts on an instance are checked at the use site, instance selection does not take contexts into account
09:55:37 marinelli joins (~weechat@gateway/tor-sasl/marinelli)
09:56:33 <geekosaur> and can't because the instance selection may take place in code that doesn't know and may select the wrong instance as a result
09:57:00 <geekosaur> (it only needs to know about the class to compile)
10:00:21 × ft quits (~ft@p4fc2a88b.dip0.t-ipconnect.de) (Quit: leaving)
10:10:51 × xff0x_ quits (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp) (Ping timeout: 248 seconds)
10:12:37 xff0x_ joins (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp)
10:13:17 <mikko> are there any workarounds besides writing an instance separately for each type implementing Show?
10:14:27 <dminuoso> mikko: Yes, default signatures like geekosaur mentioned.
10:14:49 <dminuoso> But dispatching based on whether or not an instance exists doesn't really work.
10:15:44 <dminuoso> The primary reason is that you can't supply evidence that an instance does *not* exist.
10:15:56 <dminuoso> You can only supply evidence that it does.
10:17:06 <mikko> with that in mind, how would you implement something like this?
10:17:40 <dminuoso> Well so in principle you can have that instance for Joinable
10:17:55 <dminuoso> If you make it Overlapping, then you can supply specific instances that will take precedence
10:18:24 <mikko> doesn't that still have the same issue of dispatching based on whether or not an instance exists
10:18:30 <dminuoso> Not quite
10:18:50 <dminuoso> What you can use, is the instance selection algorithm
10:19:03 <dminuoso> See https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/instances.html#overlapping-instances
10:19:27 <mikko> it says status deprecated :/
10:19:31 <dminuoso> That's fine
10:19:55 <dminuoso> It's only the LANGUAGE extension that is deprecated.
10:20:24 <dminuoso> But the {-# OVERLAPPING #-} and {-# OVERLAPPABLE #-} pragmas, as well as the rest of the semantics, holds.
10:20:43 <dminuoso> I think the whole text should be moved into a different non-deprecated section for clarity
10:20:48 <mikko> oh you mean i don't even need the language extension to do that?
10:21:06 <dminuoso> Well, you need the {-# OVERLAPPING #-} or {-# OVERLAPPABLE #-} pragmas
10:21:15 <dminuoso> In some sense they are extensions to the language
10:21:20 <dminuoso> Just not formal LANGUAGE extensions
10:21:26 <dminuoso> Strangely enough.
10:21:43 <dminuoso> In that text, below, you can see:
10:21:48 <dminuoso> ```Now suppose that, in some client module, we are searching for an instance of the target constraint (C ty1 .. tyn). The search works like this:```
10:21:57 <dminuoso> The block that follows gives the exact semantics how GHC selects an instance.
10:22:03 <dminuoso> Or how it fails
10:22:34 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
10:22:45 ub joins (~Thunderbi@p200300ecdf15588e8ba3eaebe9e1d757.dip0.t-ipconnect.de)
10:23:08 × ubert quits (~Thunderbi@p548c9793.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
10:23:08 ubert1 is now known as ubert
10:23:17 <dminuoso> Very very roughly, for your case, we can say if we have `instance {-# OVERLAPPABLE #-} Show a => Joinable a where ...` and `instance {-# OVERLAPPING #-} Joinable T` (note that you can leave one of the two pragmas away if you like), then it will always select the second instance if `Joinable T` is looked up.
10:23:28 <dminuoso> And the reason is that `Joinable T` is "more specific" than `Joinable a`
10:23:54 <dminuoso> Take additional note
10:24:59 <dminuoso> `Eliminate any candidate IX for which there is another candidate IY such that ***both*** of the following hold:` (emphasis added by me)
10:25:04 <ncf> mikko: here's an example of a class with a default implementation for Show instances https://hackage.haskell.org/package/prettyprinter-1.7.1/docs/Prettyprinter.html#t:Pretty
10:25:05 <dminuoso> `IY is strictly more specific than IX`
10:25:12 <dminuoso> `IX is overlappable or IY is overlapping`
10:25:17 <mikko> nice, so this works: https://bpa.st/TMJE4
10:25:48 <dminuoso> mikko: Great. For brevity you can leave OVERLAPPING away.
10:26:00 <dminuoso> It's sufficient for just one side to have it.
10:26:13 <dminuoso> And its just less typing work to have it on the less specific instance, since you only need it once.
10:26:41 <mikko> got it, thanks
10:27:13 <mikko> although i think i'll have to read through those docs a few more times before i really understand what's going on :D
10:27:35 <dminuoso> It's very subtle and hard to grok for the average user.
10:28:21 <dminuoso> mikko: Roughly we can condense is down to this: GHC will look up all matching instances. If no instance matches, it fails. If they match, it will "eliminate" any instance that is "strictly less specific *and* overlappable by the other"
10:28:28 <dminuoso> By eliminate this means from the pool of potential instances.
10:29:14 <dminuoso> And if only one remains, it will use it. If multiple remains - outside of other (here irrelevant) language features - it will error with "overlapping instances"
10:29:56 <dminuoso> Ah well, in truth there's that extra final setp of in-scope constraints
10:30:06 <dminuoso> And there's some very subtle relevancy:
10:30:32 <dminuoso> Any constraints on an instance are not considered for instance *selection*
10:31:16 <dminuoso> So given `instance Foo a => Bar a`, then `Foo` is not considered for the purpose of *selecting* an instance. Conversely this means `instance Foo a => Bar a` matches *all* types, irrespective of whether an instance Foo exists or not.
10:31:37 × CiaoSen quits (~Jura@tmo-108-9.customers.d1-online.com) (Ping timeout: 268 seconds)
10:31:39 <dminuoso> Which can be counter intuitive
10:33:19 euandreh joins (~Thunderbi@189.6.18.7)
10:36:25 <dminuoso> So if you had `data S = S` (without a Show instance), and you did not have any overlapping/overlappable pragmas, and then wrote both `instance Show a => Joinable a ...` and `instance Joinable T`, you will have overlapping instances, even though it seems the first instance shouldn't be considered.
10:36:48 <dminuoso> (Because the algorithm will not consider constraints for the purpose of selecting candidates)
10:36:59 <dminuoso> Oh I meant `instance Joinable S`
10:37:10 × xff0x_ quits (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp) (Ping timeout: 268 seconds)
10:38:29 × paul_j quits (~user@2001:8b0:dea0:f3c9:cd47:c8b0:d6:5463) (Quit: Asta la vista)
10:44:20 wiosna joins (~karangura@209.166.121.87)
10:56:33 inversed joins (~inversed@bcdcac82.skybroadband.com)
10:58:05 <tomsmeding> the fact that the instance head is not considered when selecting instances basically means that instance search is greedy
10:58:12 <tomsmeding> it will never backtrack
10:58:43 <tomsmeding> now the term "greedy" is not very precisely defined, but it may be helpful as intuition
10:59:42 <tomsmeding> you can't do prolog with type class resolution
10:59:46 <dminuoso> Mmm, greedy and backtracking are not mutually exclusive. This is in fact the reason many regex provide denial of service vectors.
11:00:23 <dminuoso> Arguably greedyness can exponentially drive up backtracking
11:01:56 <dminuoso> (Greedy is a mode of ambiguity resolution, no?)
11:04:47 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 246 seconds)
11:05:25 <fbytez> Is there a standard function like: `nullOr tr fls x = if null x then tr else fls` ?
11:05:54 <fbytez> Like `either` and `maybe`.
11:06:32 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds)
11:07:02 <tomsmeding> dminuoso: greedy is a mode of ambiguity resolution where there is always a way to full resolve the ambiguity
11:07:06 <tomsmeding> *to fully
11:07:16 <tomsmeding> I'd say if you're greedy, then you have no backtracking
11:07:41 <dminuoso> tomsmeding: Consider a PCRE regex: .*foo
11:07:43 <tomsmeding> :t \a b x -> if null x then a else b
11:07:44 <lambdabot> Foldable t => p -> p -> t a -> p
11:07:54 <dminuoso> tomsmeding: This will require some form of backtracking, otherwise it cannot ever match.
11:08:06 <tomsmeding> @hoogle a -> a -> [b] -> a
11:08:07 <lambdabot> No results found
11:08:14 <dminuoso> At least if .* is resolved greedily.
11:08:25 <tomsmeding> dminuoso: so then it can't be resolved greedily :p
11:08:30 <tomsmeding> who says that regex matching is greedy
11:08:39 <tomsmeding> I'd say it isn't
11:08:40 <dminuoso> tomsmeding: greedy in regex means as much as possible.
11:08:48 <tomsmeding> ah, different greedy
11:08:55 <tomsmeding> greedy as in longest match, not greedy as in algorithm design
11:09:19 <dminuoso> tomsmeding: How are they different?
11:09:33 <tomsmeding> I guess my "greedy" is basically equivalent to "no backtracking"
11:09:38 <tomsmeding> hence perhaps why you don't have a word for it :p
11:09:47 <dminuoso> tomsmeding: longest match in regex is a greedy algorithm.
11:09:54 <dminuoso> its a local optimization problem.
11:09:54 <tomsmeding> dminuoso: https://en.wikipedia.org/wiki/Greedy_algorithm
11:09:59 <dminuoso> Yes, I am aware.
11:10:21 <dminuoso> Greedy algorithms are about local optimization, not global optimization.
11:10:24 <tomsmeding> is there a greedy algorithm for matching regex?
11:10:29 <tomsmeding> yes
11:10:39 <dminuoso> tomsmeding: Of course, most regex employ greedy matching
11:10:53 <tomsmeding> well, partially greedy, because they also backtrack
11:10:54 <tomsmeding> ;)
11:10:57 <dminuoso> Which is why `.*foo` will match `quuxfoo`
11:11:02 <dminuoso> At least in most implementations
11:11:10 <dminuoso> tomsmeding: those two are orthogonal.
11:11:19 <tomsmeding> or if they NFA the thing and run the automaton, I'm not sure that's "greedy" by any useful definition
11:11:39 <dminuoso> tomsmeding: the backtracking merely means that the locally chosen maximum wont work with the rest.
11:11:56 <dminuoso> Which is why I said these two things go hand in hand in regex.
11:11:59 <tomsmeding> right
11:12:03 <dminuoso> You cant really have greedyness without backtracking
11:12:06 <tomsmeding> in regex not
11:12:14 <dminuoso> Well you could, it just woudlnt make them useful in most situations
11:12:18 <tomsmeding> in instance selection yes, precisely because of this head-doesn't-matter restriction!
11:12:31 <tomsmeding> that's the whole point
11:12:37 <tomsmeding> regex matching cannot be _fully_ greedy
11:12:47 <tomsmeding> the problem is too hard for that
11:12:52 <dminuoso> "fully greedy" would require some definition of what that even means
11:13:04 <dminuoso> given that greedyness implicitly is about *local* optimization, it sounds like a contradiction
11:13:11 <tomsmeding> whenever you have a choice, choose one and commit to that choice
11:13:25 <tomsmeding> "fully greedy" being that all choices in the algorithm are local
11:13:27 <dminuoso> tomsmeding: oh, no that is simple.
11:13:32 <dminuoso> that is excessively simple to do for regex
11:13:36 <dminuoso> it just wouldnt be very useful
11:13:38 freeside joins (~mengwong@122.11.248.245)
11:13:46 <tomsmeding> oh sure
11:14:01 <tomsmeding> as in, it wouldn't match "quuxfoo" with /.*foo/ ?
11:14:27 <dminuoso> Plenty of regex can even turn off backtracking on portions
11:14:32 <dminuoso> tomsmeding: right.
11:14:52 <freeside> question re WASM -- I see Asterius has been mothballed on Github in favour of the merged WASM backend in 9.6, but how do I build something that has significant dependencies? If I understand correctly, stack and cabal aren't fully wasm-enabled
11:15:12 <tomsmeding> dminuoso: yes of course, for many problems for which there is no sensible greedy solution, you can still try to write a greedy algorithm and see how far it gets. Sometimes that's very useful
11:15:40 <tomsmeding> dminuoso: so my point about instance selection is that the algorithm there _is_ greedy -- as opposed to the prolog semantics, which aren't (fully)
11:15:44 <dminuoso> tomsmeding: like I said, I think its silly to call this "fully greedy"
11:15:51 <dminuoso> its still greedy, just without backtracking
11:16:01 <dminuoso> backtracking is about undoing the greedy choices
11:16:02 <tomsmeding> well I'm only introducing "fully greedy" because what you call "greedy" I'd call "partially greedy" :p
11:16:16 <dminuoso> well, "partially greedy" is certainly uncommon terminology
11:16:32 <tomsmeding> yeah, because it's not a greedy algorithm if it backtracks in common terminology :p
11:16:44 <dminuoso> because greediness in all algorithmic contexts is always about expanding to some local maximum
11:17:01 <dminuoso> tomsmeding: I guess it depends on the perspecftive.
11:17:06 <tomsmeding> anyway this is offtopic :p
11:17:08 <dminuoso> right
11:18:03 <dminuoso> freeside: I feel WASM hit the scene without much documentation or information how to do anything with it.
11:18:08 <dminuoso> It feels rushed.
11:19:17 <dminuoso> https://cabal.readthedocs.io/en/stable/search.html?q=wasm&check_keywords=yes&area=default
11:19:20 <dminuoso> This is not comforting.
11:19:20 <freeside> mmm. I'm seeing asterius's readme has an ahc-cabal for building things with deps, but, like you say, now that the repo is archived, one is left wondering if that functionality made it into regular cabal
11:19:31 <dminuoso> While I understand these projects are separate, from a user experience point of view its a bit sad.
11:20:05 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
11:20:15 <dminuoso> https://gitlab.haskell.org/ghc/ghc-wasm-meta
11:20:23 <dminuoso> This is all the documentation you are being given right now
11:20:41 <tomsmeding> wasm in ghc is definitely not ready for intensive use, but I guess the people working on asterius/ghcjs are now working on making wasm in ghc better, so naturally there is no time any more for asterius/ghcjs
11:21:20 <tomsmeding> so the result is that the new thing is not yet ready when the old thing is mothballed -- nothing to be done about that, and now at least we _have_ a partially-complete ghc wasm backend :p
11:21:25 <tomsmeding> as opposed to none
11:21:42 <dminuoso> Sure, I think no mention of something rather incomplete in the release notes would have been better
11:22:02 <dminuoso> Perhaps a teaser, but some "we now have wasm, GOOD LUCK!" is not very helpful
11:22:44 <freeside> is "partially complete" like "partially greedy"
11:23:00 <dminuoso> Only tomsmeding can say!
11:28:30 <tomsmeding> freeside: :')
11:29:01 <tomsmeding> my "partially greedy" meant "some components of the algorithm are greedy"
11:29:08 Guest45678 joins (~Guest4567@p200300cf072e68ea6b29732cbdb21e80.dip0.t-ipconnect.de)
11:29:37 <tomsmeding> my "partially complete" meant "(more-than-half)-complete"
11:29:52 × ubert quits (~Thunderbi@2a02:8109:abc0:6434:e31:8ae3:609:552d) (Remote host closed the connection)
11:29:52 ub is now known as ubert
11:29:55 <tomsmeding> I first wanted to write "half-complete" but then realised that that would be an unfair characterisation of the work
11:30:05 ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:f753:ade8:fcc8:e633)
11:30:26 <tomsmeding> it _looks_ half-complete from the outside, but I don't think that's accurate in terms of work hours
11:31:18 <dminuoso> I have a job that produces log output. Some external services want to visualize that log output and do so by polling. With the polling I would get some offset (to skip any chunks the receiver has seen so far).
11:31:34 <dminuoso> The log is, currently anyway, held in memory only
11:31:59 <dminuoso> While its being polled, the producer amends it
11:32:05 × freeside quits (~mengwong@122.11.248.245) (Ping timeout: 246 seconds)
11:32:28 <dminuoso> What kind of data structure would be ideally suited here? Naively Id just use files because that offers me exactly the interface needed.
11:35:28 × wiosna quits (~karangura@209.166.121.87) (Ping timeout: 248 seconds)
11:35:54 <tomsmeding> dminuoso: naively just a Map from (monotonically increasing) ID to log message, where an offset is simply the ID of the last-seen message
11:37:01 <tomsmeding> can chunk up stuff to reduce Map overhead, and one can probably figure out a way to do regular chunking, GC style, in a way that it doesn't increase time complexity
11:37:23 <dminuoso> Mmm that sounds just wrong.
11:39:48 <dminuoso> Perhaps I should just admit that this is a C-style problem.
11:40:10 <tomsmeding> I mean, you could mutable vector your way out of this :p
11:41:06 <dminuoso> Mm, do I get much benefit from an unboxed mutable vector over just holding a `ForeignPtr Word8`?
11:41:43 <dminuoso> The `ForeignPtr` can trivially be turned into ByteString at least!
11:42:10 <dminuoso> So even a simple offset n is just `BS.drop n`
11:42:50 <tomsmeding> not if you don't want to any of the meaning of the word8s :p
11:44:03 <dminuoso> My contract will be that its just terminal data (i.e. unicode)
11:44:07 <dminuoso> I wont even pretend to verify this.
11:44:18 <dminuoso> (Any decoding bug will be handled leniently anyway)
11:44:40 <dminuoso> So its just utf8 encoded stuff.
11:45:03 <tomsmeding> then go buffer of Word8 all the way
11:46:05 <dminuoso> Heck, I could even steal the buffer and stuff it into a Text!
11:46:09 <dminuoso> as long as I use text-2.0
11:46:17 <dminuoso> :P
11:46:20 <dminuoso> What could possibly go wrong!
11:46:53 <dminuoso> But on a more serious note, I can just use decodeUtf8Lenient as well
11:47:41 wiosna joins (~karangura@209.166.121.87)
11:52:10 × wiosna quits (~karangura@209.166.121.87) (Ping timeout: 260 seconds)
11:55:13 CiaoSen joins (~Jura@tmo-108-9.customers.d1-online.com)
12:03:23 <merijn> dminuoso: You can turn the ForeignPtr into a Storable vector easily too :p
12:06:22 <dminuoso> Im very very tempted to just use files anyway, because the entire interface is already there.
12:06:28 × euandreh quits (~Thunderbi@189.6.18.7) (Ping timeout: 276 seconds)
12:08:22 euandreh joins (~Thunderbi@189.6.18.7)
12:26:07 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
12:28:16 × trev quits (~trev@user/trev) (Quit: trev)
12:32:43 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:32:58 tr_ev joins (~trev@user/trev)
12:34:00 × Me-me quits (~Me-me@user/me-me) (Quit: Something has gone terribly, terribly wrong, that being that I'm not here any more.)
12:36:41 euandreh1 joins (~Thunderbi@189.6.18.7)
12:37:05 × euandreh quits (~Thunderbi@189.6.18.7) (Read error: Connection reset by peer)
12:37:06 euandreh1 is now known as euandreh
12:39:49 × fryguybob quits (~fryguybob@cpe-24-94-50-22.stny.res.rr.com) (Quit: leaving)
12:43:00 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
12:47:20 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Ping timeout: 246 seconds)
12:54:14 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
12:58:20 tr_ev is now known as trev
13:00:21 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
13:00:24 vulfe joins (~vulfe@207.229.148.168)
13:09:49 × extor quits (~extor@ns3018124.ip-149-202-82.eu) (Remote host closed the connection)
13:16:46 rlj joins (~rlj@c-5eea62ba-74736162.cust.telenor.se)
13:16:48 × acidjnk quits (~acidjnk@p200300d6e715c460285fef55bd00a3c3.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
13:20:31 xff0x_ joins (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp)
13:22:08 × euandreh quits (~Thunderbi@189.6.18.7) (Ping timeout: 248 seconds)
13:22:35 <tomsmeding> dminuoso: use files in a tmpfs
13:23:30 euandreh joins (~Thunderbi@189.6.18.7)
13:23:43 <dminuoso> tomsmeding: If only this was controllable from haskell itself. :p
13:23:57 <dminuoso> withTmpfsTemporaryFile
13:24:23 <tomsmeding> hah
13:24:30 <tomsmeding> I guess needing this is pretty niche
13:27:10 <dminuoso> Yeah.
13:30:02 × rlj quits (~rlj@c-5eea62ba-74736162.cust.telenor.se) (Quit: Client closed)
13:32:29 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
13:32:29 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
13:32:29 wroathe joins (~wroathe@user/wroathe)
13:36:39 extor joins (~extor@2001:41d0:1004:636::1)
13:45:25 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
13:48:39 thegeekinside joins (~thegeekin@189.217.90.138)
13:48:56 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:8c38:7008:d307:dea1) (Quit: caryhartline)
13:59:59 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
14:03:20 × vulfe quits (~vulfe@207.229.148.168) (Ping timeout: 246 seconds)
14:03:51 × extor quits (~extor@2001:41d0:1004:636::1) (Quit: ZNC 1.8.2+deb2build5 - https://znc.in)
14:04:03 rlj joins (~rlj@c-5eea62ba-74736162.cust.telenor.se)
14:05:13 vulfe joins (~vulfe@207.229.148.168)
14:06:02 extor joins (~extor@ns3018124.ip-149-202-82.eu)
14:08:00 × catern quits (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) (Remote host closed the connection)
14:08:27 × vulfe quits (~vulfe@207.229.148.168) (Remote host closed the connection)
14:08:43 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 248 seconds)
14:15:17 dibblego joins (~dibblego@122-199-1-30.ip4.superloop.au)
14:15:17 × dibblego quits (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host)
14:15:17 dibblego joins (~dibblego@haskell/developer/dibblego)
14:21:11 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
14:21:30 × CiaoSen quits (~Jura@tmo-108-9.customers.d1-online.com) (Ping timeout: 260 seconds)
14:23:49 shriekingnoise joins (~shrieking@186.137.175.87)
14:24:32 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 248 seconds)
14:35:12 wiosna joins (~karangura@209.166.121.87)
14:38:04 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
14:38:52 × rlj quits (~rlj@c-5eea62ba-74736162.cust.telenor.se) (Quit: Client closed)
14:40:50 dibblego joins (~dibblego@122-199-1-30.ip4.superloop.au)
14:40:50 × dibblego quits (~dibblego@122-199-1-30.ip4.superloop.au) (Changing host)
14:40:50 dibblego joins (~dibblego@haskell/developer/dibblego)
14:43:01 img joins (~img@user/img)
14:47:10 rlj joins (~rlj@c-5eea62ba-74736162.cust.telenor.se)
14:50:14 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
14:50:15 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
14:51:47 freeside joins (~mengwong@103.252.202.85)
14:53:15 <ncf> does ghc make any difference between using | otherwise and just repeating the pattern with no guard?
14:53:44 <ncf> e.g. f x | p = ...; | otherwise = ... vs f x | p = ...; f x = ...
14:54:17 <merijn> maybe :p
14:54:35 × ddellacosta quits (~ddellacos@146.70.171.166) (Ping timeout: 248 seconds)
14:54:44 <merijn> To get a real answer, inspect the bird entrails^H^H^H^H^H^H^H core
14:55:09 cheater joins (~Username@user/cheater)
14:55:15 <ncf> i feared as much
14:55:24 <merijn> Why?
14:55:38 <ncf> i'm lazy
14:55:51 <merijn> ncf: I meant more like "why would that even matter?"
14:56:04 <merijn> That seems like an incredibly niche thing to worry about
14:56:14 <ncf> just wondering if there's any reason to prefer one over the other beyond style
14:56:22 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
14:56:26 <merijn> doubt it
14:57:03 <geekosaur> I would be very surprised if it made a difference
14:57:24 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 268 seconds)
15:02:18 × rlj quits (~rlj@c-5eea62ba-74736162.cust.telenor.se) (Ping timeout: 245 seconds)
15:04:04 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:bef2:f17a:dedf:ac57) (Quit: WeeChat 2.8)
15:09:41 freeside joins (~mengwong@103.252.202.85)
15:12:53 <monochrom> At Pareto equilibrium there is no difference. :)
15:13:59 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 246 seconds)
15:18:03 × xff0x_ quits (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp) (Ping timeout: 248 seconds)
15:21:02 Square joins (~Square4@user/square)
15:27:49 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
15:33:49 × wiosna quits (~karangura@209.166.121.87) (Ping timeout: 276 seconds)
15:34:49 nick4 joins (~nick@wsip-174-78-110-18.pn.at.cox.net)
15:35:07 × gurkenglas quits (~gurkengla@dynamic-046-114-182-194.46.114.pool.telefonica.de) (Ping timeout: 276 seconds)
15:35:54 × Square quits (~Square4@user/square) (Quit: Leaving)
15:36:24 Square joins (~Square4@user/square)
15:36:36 gurkenglas joins (~gurkengla@dynamic-046-114-183-223.46.114.pool.telefonica.de)
15:45:37 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
15:49:49 famubu joins (~julinuser@user/famubu)
15:50:44 econo joins (uid147250@user/econo)
15:50:51 <famubu> Hi. In haskell-mode of emacs, is there a way to disable the red underlining that shows up when there are erros in the code? Ideally a way to toggle it on and off? It's quite annoying when one is trying to figure out the error. Does anyone know how to do this?
15:54:22 rlj joins (~rlj@194-218-34-180.customer.telia.com)
15:54:41 <probie> Just the underlines, or the error checking entirely?
16:02:56 _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
16:06:33 Sgeo joins (~Sgeo@user/sgeo)
16:06:44 × machinedgod quits (~machinedg@198.53.218.113) (Ping timeout: 265 seconds)
16:06:48 freeside joins (~mengwong@103.252.202.85)
16:08:55 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
16:09:17 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Remote host closed the connection)
16:11:24 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
16:11:36 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 265 seconds)
16:11:44 ub joins (~Thunderbi@p200300ecdf15583fadacaf30e6b5a958.dip0.t-ipconnect.de)
16:11:47 × ubert quits (~Thunderbi@p200300ecdf15588e8ba3eaebe9e1d757.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
16:11:48 ubert1 is now known as ubert
16:13:16 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection)
16:15:42 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
16:17:52 freeside joins (~mengwong@103.252.202.85)
16:22:43 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 265 seconds)
16:32:59 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
16:36:36 × mbuf quits (~Shakthi@49.207.178.186) (Quit: Leaving)
16:37:58 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
16:37:58 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
16:38:25 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
16:50:22 acidjnk joins (~acidjnk@p200300d6e715c400492023c9075c5278.dip0.t-ipconnect.de)
16:51:03 ddellacosta joins (~ddellacos@143.244.47.86)
17:00:21 freeside joins (~mengwong@103.252.202.85)
17:03:30 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 250 seconds)
17:05:55 <Hecate> https://discourse.haskell.org/t/manual-qa-for-cabal-install/6225
17:06:05 × Square quits (~Square4@user/square) (Ping timeout: 240 seconds)
17:07:02 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 246 seconds)
17:12:37 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
17:13:24 <sm> famubu: M-x customize-group haskell<TAB> and you'll
17:13:24 <sm> probably find it
17:21:08 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:26:15 × puke quits (~puke@user/puke) (Remote host closed the connection)
17:26:21 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
17:26:40 puke joins (~puke@user/puke)
17:27:25 × marinelli quits (~weechat@gateway/tor-sasl/marinelli) (Remote host closed the connection)
17:27:26 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:30:45 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
17:32:54 kuribas joins (~user@2a02:1808:83:eb5c:7e9d:6d4d:1da8:cade)
17:33:37 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.8)
17:35:16 × kuribas quits (~user@2a02:1808:83:eb5c:7e9d:6d4d:1da8:cade) (Remote host closed the connection)
17:36:03 mikail joins (~mikail@2a02:c7c:609d:c900:4cef:c956:5d99:43ab)
17:55:53 × johnjaye quits (~pi@072-181-052-090.res.spectrum.com) (Read error: Connection reset by peer)
17:58:47 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:59:11 johnjaye joins (~pi@072-181-052-090.res.spectrum.com)
18:05:07 × puke quits (~puke@user/puke) (Quit: puke)
18:07:06 freeside joins (~mengwong@103.252.202.85)
18:11:12 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 248 seconds)
18:11:19 × mikail quits (~mikail@2a02:c7c:609d:c900:4cef:c956:5d99:43ab) (Ping timeout: 256 seconds)
18:12:17 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
18:12:48 ray_ joins (~ray@2405:201:680a:b174:ca64:ecc9:98b0:81d3)
18:13:12 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
18:16:17 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection)
18:16:57 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
18:17:11 ub1 joins (~Thunderbi@p548c9793.dip0.t-ipconnect.de)
18:17:44 × ub quits (~Thunderbi@p200300ecdf15583fadacaf30e6b5a958.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
18:17:44 polyphem joins (~polyphem@ip-109-43-49-185.web.vodafone.de)
18:19:27 ub1 is now known as ub
18:22:54 <polyphem> hi, i once read a funny quote about javaEnterpriseBoolFactory or something . If you know what i mean , do you have any pointers ?
18:23:22 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 268 seconds)
18:26:01 <monochrom> In priv msg with lambdabot, try "@quote factory". Try multiple times because each time it randomly picks one.
18:27:49 wiosna joins (~karangura@209.166.121.87)
18:27:57 <polyphem> monochrom: thank you , will try
18:28:57 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
18:34:14 × wiosna quits (~karangura@209.166.121.87) (Ping timeout: 246 seconds)
18:34:38 × hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
18:36:28 hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com)
18:37:54 yaroot_ joins (~yaroot@p3099038-ipngn6001souka.saitama.ocn.ne.jp)
18:38:38 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
18:39:16 × yaroot quits (~yaroot@2400:4052:ac0:d900:1cf4:2aff:fe51:c04c) (Ping timeout: 250 seconds)
18:39:16 yaroot_ is now known as yaroot
18:42:18 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
18:42:44 ec joins (~ec@gateway/tor-sasl/ec)
18:42:59 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 246 seconds)
18:44:14 × thegeekinside quits (~thegeekin@189.217.90.138) (Remote host closed the connection)
18:46:48 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
18:49:07 <polyphem> i think it was in a george wilson talk, he is so funny, can't recall which one
18:50:21 <[exa]> polyphem: it might have been embedded in maven source code
18:52:03 ft joins (~ft@p4fc2a88b.dip0.t-ipconnect.de)
18:52:49 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Remote host closed the connection)
18:53:49 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
18:55:27 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
18:56:10 × thaumavorio quits (~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in)
18:57:19 mikail joins (~mikail@2a02:c7c:609d:c900:4cef:c956:5d99:43ab)
18:57:21 thaumavorio joins (~thaumavor@thaumavor.io)
18:57:47 × mikail quits (~mikail@2a02:c7c:609d:c900:4cef:c956:5d99:43ab) (Client Quit)
19:02:27 freeside joins (~mengwong@103.252.202.85)
19:02:38 johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net)
19:07:09 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 268 seconds)
19:22:20 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Remote host closed the connection)
19:27:36 <tomsmeding> polyphem: probably not what you're referring to, but it's related https://codegolf.stackexchange.com/questions/4838/most-complex-hello-world-program-you-can-justify
19:29:09 pavonia joins (~user@user/siracusa)
19:38:36 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Quit: o/)
19:39:23 <dminuoso> famubu: What red underlining are you referring to exactly?
19:40:28 <dminuoso> haskell-mode neither has the ability to detect compilation errors, nor to hilight them
19:41:20 <dminuoso> Are you perhaps talking about lsp-haskell + lsp-mode + flycheck?
19:41:50 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection)
19:42:02 × ft quits (~ft@p4fc2a88b.dip0.t-ipconnect.de) (Remote host closed the connection)
19:42:26 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
19:43:04 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
19:46:21 freeside joins (~mengwong@103.252.202.85)
19:46:25 Sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
19:47:14 × vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 268 seconds)
19:51:33 × tv1 quits (~tv@user/tv) (Quit: derp)
19:51:44 Guest4243 joins (~Guest42@ip5f5be7a8.dynamic.kabel-deutschland.de)
19:51:47 tv joins (~tv@user/tv)
19:51:48 ft joins (~ft@p4fc2a88b.dip0.t-ipconnect.de)
19:52:45 justsomeguy joins (~justsomeg@user/justsomeguy)
19:54:28 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 276 seconds)
19:55:26 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
19:57:44 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
20:00:02 Sciencentistguy1 joins (~sciencent@hacksoc/ordinary-member)
20:01:04 vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
20:02:12 × Guest45678 quits (~Guest4567@p200300cf072e68ea6b29732cbdb21e80.dip0.t-ipconnect.de) (Quit: Client closed)
20:02:39 × Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 268 seconds)
20:02:39 Sciencentistguy1 is now known as Sciencentistguy
20:13:53 zeenk joins (~zeenk@2a02:2f04:a20f:5200::7fe)
20:14:59 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
20:15:06 × _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
20:16:19 × trev quits (~trev@user/trev) (Quit: trev)
20:16:21 × czy quits (~user@host-140-24.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Remote host closed the connection)
20:17:36 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
20:21:21 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
20:21:31 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-5d8c-8b3d-ea84-cebb.rev.sfr.net) (Remote host closed the connection)
20:21:49 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net)
20:22:51 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345)
20:27:15 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:a180:5f0a:ca2e:8345) (Ping timeout: 260 seconds)
20:28:44 × johnjaye quits (~pi@072-181-052-090.res.spectrum.com) (Quit: WeeChat 4.0.0-dev)
20:30:35 tremon joins (~tremon@83.80.159.219)
20:31:38 × nick4 quits (~nick@wsip-174-78-110-18.pn.at.cox.net) (Ping timeout: 268 seconds)
20:36:55 × Guest4243 quits (~Guest42@ip5f5be7a8.dynamic.kabel-deutschland.de) (Quit: Connection closed)
20:38:48 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
20:46:28 chomwitt joins (~chomwitt@2a02:587:7a1d:9d00:1ac0:4dff:fedb:a3f1)
20:51:53 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net) (Remote host closed the connection)
20:52:10 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net)
20:52:21 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net) (Remote host closed the connection)
20:55:59 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net)
20:57:02 son0p joins (~ff@181.136.122.143)
21:04:48 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Quit: WeeChat 3.8)
21:06:36 × m5zs7k quits (aquares@web10.mydevil.net) (Ping timeout: 250 seconds)
21:08:29 m5zs7k joins (aquares@web10.mydevil.net)
21:08:32 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
21:09:01 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
21:09:55 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
21:14:00 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
21:14:07 freeside joins (~mengwong@103.252.202.85)
21:18:20 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 246 seconds)
21:21:35 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
21:27:18 marinelli joins (~weechat@gateway/tor-sasl/marinelli)
21:28:32 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
21:30:43 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:34:30 × michalz quits (~michalz@185.246.207.197) (Remote host closed the connection)
21:36:56 × chomwitt quits (~chomwitt@2a02:587:7a1d:9d00:1ac0:4dff:fedb:a3f1) (Remote host closed the connection)
21:39:39 freeside joins (~mengwong@103.252.202.85)
21:44:48 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 240 seconds)
21:46:54 × gurkenglas quits (~gurkengla@dynamic-046-114-183-223.46.114.pool.telefonica.de) (Ping timeout: 250 seconds)
21:47:29 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
21:49:46 emmanuelux joins (~emmanuelu@user/emmanuelux)
22:04:41 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
22:09:41 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
22:10:28 × marinelli quits (~weechat@gateway/tor-sasl/marinelli) (Remote host closed the connection)
22:14:37 freeside joins (~mengwong@103.252.202.85)
22:18:45 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 240 seconds)
22:19:27 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
22:26:09 × alexherbo2 quits (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net) (Remote host closed the connection)
22:26:51 × acidjnk quits (~acidjnk@p200300d6e715c400492023c9075c5278.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
22:27:16 alexherbo2 joins (~alexherbo@2a02-842a-8180-4601-d153-c9b1-0894-c65f.rev.sfr.net)
22:28:04 × bjobjo quits (~bjobjo@user/bjobjo) (Ping timeout: 250 seconds)
22:29:57 bjobjo joins (~bjobjo@user/bjobjo)
22:30:34 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
22:30:42 freeside joins (~mengwong@103.252.202.85)
22:34:04 × jinsl quits (~jinsl@123.120.169.188) (Ping timeout: 252 seconds)
22:35:03 jinsl joins (~jinsl@2408:8207:2558:8870:211:32ff:fec8:6aea)
22:35:35 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 268 seconds)
22:35:51 × ubert quits (~Thunderbi@2a02:8109:abc0:6434:f753:ade8:fcc8:e633) (Ping timeout: 265 seconds)
22:35:51 ub is now known as ubert
22:36:09 × zeenk quits (~zeenk@2a02:2f04:a20f:5200::7fe) (Quit: Konversation terminated!)
22:41:20 × jpds2 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
22:45:04 Square2 joins (~Square4@user/square)
22:48:32 × mncheckm quits (~mncheck@193.224.205.254) (Ping timeout: 268 seconds)
22:51:16 <ncf> try (Pair <$> term <* comma <*> term) <|> term -- is there a standard idiom to make this not backtrack horribly?
22:51:46 puke joins (~puke@user/puke)
22:51:55 <ncf> i went with do t <- term; Pair t <$ comma <*> term <|> pure t but that feels clunky
22:52:07 × puke quits (~puke@user/puke) (Max SendQ exceeded)
22:52:50 <ncf> (context: parsing a haskell-like language using megaparsec)
22:53:35 <ncf> (nested (applications (incur (an (exponential (slowdown (because (they (could (be (pairs)))))))))))
22:54:52 jpds2 joins (~jpds@gateway/tor-sasl/jpds)
22:59:08 <monochrom> liftA2 f term (optional (comma *> term)), where f handles the Just vs Nothing cases.
23:00:08 <monochrom> The clunkiness is then in f. :)
23:00:14 <ncf> yeah
23:00:19 <ncf> not sure what more i'm looking for tbf
23:00:51 freeside joins (~mengwong@103.252.202.85)
23:02:33 <monochrom> "do t <- term; (do comma; u <- term; pure (Pair t u)) <|> pure t" is longer but my students actually understand it, so I say it is not clunky, or at least it is less unnatural.
23:05:08 merijn joins (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl)
23:05:12 <ncf> actually i might go with f <$> term `sepBy` comma , where f handles lists of length 0, 1 and 2
23:05:48 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 268 seconds)
23:07:20 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:07:29 <jackdk> ncf: Did you see https://www.reddit.com/r/haskell/comments/133mbyb/haskell_2021_design_patterns_for_parser/ ? I don't think it answers your exact question, but it codifies good parser combinator folklore.
23:07:56 <ncf> cool, thanks
23:09:18 ncf makes f handle arbitrary lists by nesting tuples to the right, while he's at it
23:09:23 × rlj quits (~rlj@194-218-34-180.customer.telia.com) (Ping timeout: 245 seconds)
23:12:55 Square2 is now known as Square
23:16:19 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
23:20:05 xff0x_ joins (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp)
23:26:05 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds)
23:28:06 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
23:28:25 paulpaul1076 joins (~textual@95-29-5-210.broadband.corbina.ru)
23:34:06 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Ping timeout: 268 seconds)
23:35:30 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
23:35:49 mauke_ joins (~mauke@user/mauke)
23:35:55 puke joins (~puke@user/puke)
23:38:04 × mauke quits (~mauke@user/mauke) (Ping timeout: 276 seconds)
23:38:04 mauke_ is now known as mauke
23:40:01 × merijn quits (~merijn@c-001-001-003.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
23:41:05 × xff0x_ quits (~xff0x@fsa056e3ab.kytj202.ap.nuro.jp) (Ping timeout: 240 seconds)
23:41:46 freeside joins (~mengwong@103.252.202.85)
23:43:20 <sm> G'day all
23:46:08 × freeside quits (~mengwong@103.252.202.85) (Ping timeout: 240 seconds)
23:47:23 <monochrom> "the chains are useful for trimming the forest" hahaha
23:49:29 × Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
23:49:40 Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
23:51:40 × Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Client Quit)
23:58:36 Me-me joins (~Me-me@user/me-me)

All times are in UTC on 2023-05-02.