Logs on 2022-06-10 (liberachat/#haskell)
| 00:02:11 | × | Haskelytic quits (~Haskelyti@118.179.211.17) (Quit: Client closed) |
| 00:02:45 | → | Haskelytic joins (~Haskelyti@118.179.211.17) |
| 00:02:53 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 255 seconds) |
| 00:04:23 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 00:05:13 | × | shailangsa_ quits (~shailangs@host86-186-136-116.range86-186.btcentralplus.com) () |
| 00:08:14 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 00:10:17 | → | slack1256 joins (~slack1256@186.11.82.227) |
| 00:15:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds) |
| 00:15:51 | <dsal> | Is there a meaningful difference between a constraint tuple and separate constraints? |
| 00:17:54 | × | toluene quits (~toluene@user/toulene) (Ping timeout: 244 seconds) |
| 00:18:25 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 00:19:20 | × | BusConscious quits (~martin@ip5f5bdee2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 00:20:05 | × | Tuplanolla quits (~Tuplanoll@91-159-69-1.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:23:03 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 00:23:34 | <Bulby[m]> | is `fromMaybe <$> ... <*> ...` strict in its first argument |
| 00:24:55 | × | slack1256 quits (~slack1256@186.11.82.227) (Ping timeout: 246 seconds) |
| 00:25:39 | <Bulby[m]> | because when i make the first argument an error, even if the second argument is a Just, it does the error |
| 00:26:54 | <Bulby[m]> | wtf |
| 00:26:55 | <geekosaur> | Applicative always evaluates all arguments |
| 00:27:04 | <Bulby[m]> | pgikhugljkag |
| 00:27:08 | <Bulby[m]> | that explains it |
| 00:27:36 | <geekosaur> | you may want asum |
| 00:27:43 | <dsal> | Do you mean `fromMaybe (error thing) <$> something` ? |
| 00:28:25 | <Bulby[m]> | no, `fromMaybe <$> (monadic fail) <*> (monadic action)` |
| 00:28:59 | <dsal> | `fromMaybe (monadic fail) <$> (monadic action)` ? |
| 00:29:30 | <Bulby[m]> | ... |
| 00:29:38 | <Bulby[m]> | no |
| 00:30:32 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 00:30:49 | <dsal> | :t liftA2 fromMaybe |
| 00:30:50 | <lambdabot> | Applicative f => f c -> f (Maybe c) -> f c |
| 00:31:11 | <Bulby[m]> | yes |
| 00:31:12 | <dsal> | OK. I don't think I understand what you're trying to do, then. |
| 00:31:33 | <Bulby[m]> | switching it to a case statement fixed it |
| 00:31:54 | <dsal> | What's the case statement look like? |
| 00:32:51 | <Bulby[m]> | `do { val <- gets @Heap (M.lookup i); case val of { Nothing -> unexpected; Just v -> pure v }` |
| 00:33:04 | <Bulby[m]> | pretend the syntax is good |
| 00:33:39 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 240 seconds) |
| 00:33:52 | <dsal> | How's that different from `v <- fromMaybe unexpected <$> gets @Heap (M.lookup i)` ? |
| 00:34:15 | <dsal> | Or, perhaps `v <- maybe unexpected pure $ gets @Heap (M.lookup i)` |
| 00:34:30 | <Bulby[m]> | it isn't, on that second one |
| 00:34:33 | <Bulby[m]> | my code is consistent |
| 00:34:40 | <Bulby[m]> | inconsistent |
| 00:35:04 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds) |
| 00:35:17 | <dsal> | It's just about "stop trying to write code" o'clock for me. I've broken my parser in a way that doesn't seem possible. That's exciting. |
| 00:36:56 | <hpc> | that's the trick to good programming, limit yourself to just the obvious errors |
| 00:36:56 | × | Haskelytic quits (~Haskelyti@118.179.211.17) (Quit: Client closed) |
| 00:37:00 | <hpc> | syntax errors, if possible :D |
| 00:37:17 | <dsal> | Yeah. I did a big refactoring and everything compiles, but the tests don't pass. How is this possible/ |
| 00:38:08 | <EvanR> | imagining hpc's advice as a dart board with various kinds of errors on it |
| 00:38:11 | → | Haskelytic joins (~Haskelyti@118.179.211.17) |
| 00:39:04 | <hpc> | there's a kernel of truth in that advice, it's just hard to find :P |
| 00:39:26 | → | funsafe joins (~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c) |
| 00:39:34 | <hpc> | dsal: start with the part of the code you understand the least, then rewrite it until you understand something else less |
| 00:39:49 | <dsal> | Wait, are you watching me on this project? |
| 00:40:00 | <dsal> | That's pretty much exactly what I'm doing right now. heh |
| 00:40:04 | <hpc> | heh |
| 00:40:09 | <dsal> | "This thing is dumb. I shall delete it." |
| 00:41:35 | <EvanR> | the objective is to get a state of "everything was deleted", like mahjong solitaire right |
| 00:42:10 | <hpc> | yep |
| 00:42:12 | × | xff0x quits (~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 260 seconds) |
| 00:42:16 | <dsal> | This particular thing just seemed to be a compromise between keeping the code simple and making it possibly incorrect. |
| 00:42:18 | <EvanR> | delete two things while maintaining some invariant. Until no more moves or you win |
| 00:42:23 | <hpc> | code is the enemy, and to defeat your enemy you must first know your enemy |
| 00:43:07 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 00:43:40 | → | toluene joins (~toluene@user/toulene) |
| 00:44:01 | <funsafe> | p;;\\\\\\\\\\\\77777778888888 |
| 00:44:10 | <hpc> | gesundheit |
| 00:45:15 | <Bulby[m]> | EvanR: have you tried vigil? |
| 00:45:35 | <EvanR> | no, also not sure what it is |
| 00:45:44 | <Bulby[m]> | https://github.com/munificent/vigil |
| 00:45:57 | <Bulby[m]> | run the sample a few times 🙂 |
| 00:46:55 | <EvanR> | so it basically implements ghc's sadly removed feature of deleting your code on type error |
| 00:47:06 | <Bulby[m]> | WHAT IT ACTUALLY DID THAT |
| 00:47:10 | → | shailangsa joins (~shailangs@host86-186-136-116.range86-186.btcentralplus.com) |
| 00:47:21 | <Bulby[m]> | https://github.com/munificent/vigil/issues/3 |
| 00:47:22 | <EvanR> | long ago, not sure why it was "fixed" |
| 00:48:50 | <hpc> | iirc it had to do with cleaning up temp files? |
| 00:48:59 | <hpc> | duckduckgo isn't finding the issue link |
| 00:49:00 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds) |
| 00:49:30 | <Bulby[m]> | https://gitlab.haskell.org/ghc/ghc/-/issues/163 ? |
| 00:49:35 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 00:50:43 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 00:50:44 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 00:50:58 | <Bulby[m]> | i really want you to run it multiple times |
| 00:51:29 | <Bulby[m]> | i found it very amusing |
| 00:54:46 | → | kenaryn joins (~aurele@89-88-44-27.abo.bbox.fr) |
| 01:00:42 | <EvanR> | not enough brain fuel at the moment |
| 01:00:43 | → | nate3 joins (~nate@98.45.169.16) |
| 01:01:50 | × | Haskelytic quits (~Haskelyti@118.179.211.17) (Quit: Client closed) |
| 01:02:17 | → | Haskelytic joins (~Haskelyti@118.179.211.17) |
| 01:04:50 | <Haskelytic> | When is using orphan instances okay? |
| 01:05:14 | <jackdk> | IMHO almost never, especially now we have -XDerivingVia |
| 01:05:43 | <davean> | jackdk: what does DerivingVia have to do with orphans? |
| 01:05:54 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 276 seconds) |
| 01:06:16 | <jackdk> | davean: the ergonomics of getting all the instances you want onto a newtype wrapper in your project are a lot better |
| 01:10:29 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:12:33 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 01:15:35 | <Cale> | Haskelytic: Whenever you're producing an executable and not a library that will be imported elsewhere, it's safe. |
| 01:16:20 | → | julian joins (~julian@20.83.116.49) |
| 01:16:36 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:17:53 | <Cale> | Orphan instances do exist for a reason, even if they can cause trouble in the form of incompatibility between libraries. Sometimes you control neither the library defining the type, nor the one defining the class, and yet need an instance to exist. |
| 01:21:58 | <dsal> | And if you, in turn, publish that instance, lots of people who use your library will get mad at you. |
| 01:27:19 | → | xff0x joins (~xff0x@s5.HtokyoFL1.vectant.ne.jp) |
| 01:27:33 | → | dcoutts_ joins (~duncan@host86-177-125-97.range86-177.btcentralplus.com) |
| 01:29:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 01:29:50 | × | dcoutts__ quits (~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 240 seconds) |
| 01:30:14 | × | dcoutts quits (~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 244 seconds) |
| 01:30:22 | → | dcoutts joins (~duncan@host86-177-125-97.range86-177.btcentralplus.com) |
| 01:31:03 | → | frost joins (~frost@user/frost) |
| 01:33:29 | <Cale> | It's also generally okay to have libraries that only consist of orphan instances |
| 01:33:40 | <Cale> | because they can be imported only by executables |
| 01:33:47 | <Cale> | and everything will be fine |
| 01:34:28 | <EvanR> | a library can't depend on that orphans lib? |
| 01:35:22 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 01:35:31 | <Haskelytic> | I'm using orphans for test suites |
| 01:35:44 | <Haskelytic> | writing Arbitrary instances for my types |
| 01:36:25 | <jackdk> | I switched to Hedgehog over quickcheck to not have to do that, and to get automatic shrinking (but there are other tradeoffs - one is not strictly better than the other) |
| 01:36:32 | <Cale> | EvanR: Yeah, it ought not to, because it will then export an orphan |
| 01:36:46 | <Haskelytic> | I actually did that because vscode (with Haskell extension) couldn't find the Arbitrary instance if I placed it along with module containing my type |
| 01:36:52 | <Haskelytic> | and it felt kind of dirty lol |
| 01:37:13 | <Cale> | Yeah, orphans are fine in test suites generally |
| 01:37:51 | <Cale> | Though, that thing about vscode seems weird |
| 01:38:10 | <Haskelytic> | yep definitely weird behavior |
| 01:38:43 | <Haskelytic> | I thought maybe I should add the module I'm testing into source dirs for test suite but then it would double-compile which is stupid |
| 01:42:35 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 01:43:44 | → | ll4 joins (~ll4@151.52.164.1) |
| 01:44:44 | <ll4> | me solder me, for me momy end me forest end me you ricovery data day ... for yaer 36 in it Sicilia |
| 01:45:16 | ChanServ | sets mode +o monochrom |
| 01:45:26 | monochrom | sets mode +b *!*@151.52.164.1 |
| 01:45:26 | ll4 | is kicked by monochrom (ll4) |
| 01:46:45 | → | bilegeek_ joins (~bilegeek@111.sub-174-208-241.myvzw.com) |
| 01:46:50 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds) |
| 01:47:35 | <EvanR> | a little slow on the draw there |
| 01:49:32 | × | bilegeek quits (~bilegeek@2600:1008:b016:eaf8:86d7:87a2:4b7e:8f8b) (Ping timeout: 255 seconds) |
| 01:52:58 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 244 seconds) |
| 01:58:32 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds) |
| 01:58:44 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 02:00:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 02:07:20 | × | bilegeek_ quits (~bilegeek@111.sub-174-208-241.myvzw.com) (Remote host closed the connection) |
| 02:07:44 | → | bilegeek_ joins (~bilegeek@111.sub-174-208-241.myvzw.com) |
| 02:08:39 | <Bulby[m]> | you know, i didn't expect to be thinking about manual "memory" management in a high level language like haskell |
| 02:10:36 | <pavonia> | Where do you need to do that? |
| 02:11:00 | <Bulby[m]> | when writing an interpreter for an OOP lang |
| 02:12:51 | <EvanR> | more like why are you doing manual memory management in THAT lang |
| 02:12:57 | monochrom | sets mode -o monochrom |
| 02:13:10 | <EvanR> | it's not very java |
| 02:13:11 | <Bulby[m]> | there is no manual mem management in that lang |
| 02:13:16 | <Bulby[m]> | i mean on the haskell side |
| 02:14:21 | <EvanR> | it's either implement a gc or trick haskell into doing the gc, but that's advanced mode |
| 02:14:38 | <monochrom> | This is only because you write a low-level micromanaging interpreter. It would be the same in Prolog. |
| 02:14:45 | <Bulby[m]> | i want to implement a borrow checker \o/ |
| 02:14:53 | <Bulby[m]> | I LOVE RUST |
| 02:15:17 | <EvanR> | people love managing memory it seems |
| 02:15:38 | <monochrom> | Programmers are control freaks who like micromanaging everything. |
| 02:16:06 | <EvanR> | which is why dependent types are the future |
| 02:16:09 | <Bulby[m]> | borrow checking an untyped lang sounds like an AMAZING idea |
| 02:17:16 | × | td_ quits (~td@94.134.91.150) (Ping timeout: 246 seconds) |
| 02:17:49 | → | nate3 joins (~nate@98.45.169.16) |
| 02:19:12 | → | td_ joins (~td@94.134.91.132) |
| 02:19:13 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 02:20:04 | → | noteness joins (~noteness@user/noteness) |
| 02:21:07 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 02:24:55 | <Axman6> | it blows my mind that Swift is still using reaint and release, albeit automatically (they just announced an optimisation that removes a lot of unnecessary retain/release pairs at WWDC) |
| 02:25:28 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds) |
| 02:30:07 | <EvanR> | marketting problem, like monads. "Garbage Collection" just isn't sexy |
| 02:32:46 | → | koolazer joins (~koo@user/koolazer) |
| 02:39:43 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 02:41:16 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 02:42:33 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 02:43:04 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:43:04 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:43:04 | finn_elija | is now known as FinnElija |
| 02:45:44 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 02:49:45 | <Axman6> | Apple seem to be obsessed with turning Swift into a camel, they keep adding language features which should be libraries. They were very proud that they've added native regex syntax... then also introduced something which looks an awful lot like a parser combinator, but just said it was a different syntax for regexes (they don't appear to be monadic, so are probably still only for regular languages) |
| 02:49:57 | <Axman6> | they added a bunch of syntax for handling concurrency too |
| 02:59:33 | × | funsafe quits (~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c) (Quit: funsafe) |
| 03:00:07 | → | funsafe joins (~funsafe@2601:1c1:4200:9ac:84cb:185c:2a3c:c92c) |
| 03:03:07 | → | coot joins (~coot@213.134.190.95) |
| 03:06:56 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds) |
| 03:10:13 | × | adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 03:11:04 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 03:11:29 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 03:13:11 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 03:17:34 | → | dcoutts__ joins (~duncan@host86-176-29-4.range86-176.btcentralplus.com) |
| 03:18:48 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 03:18:48 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 248 seconds) |
| 03:19:52 | × | dcoutts_ quits (~duncan@host86-177-125-97.range86-177.btcentralplus.com) (Ping timeout: 248 seconds) |
| 03:20:14 | → | dcoutts_ joins (~duncan@host86-176-29-4.range86-176.btcentralplus.com) |
| 03:20:17 | × | dcoutts quits (~duncan@host86-177-125-97.range86-177.btcentralplus.com) (Ping timeout: 256 seconds) |
| 03:27:24 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:27:35 | → | tvandinther joins (~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) |
| 03:29:31 | <tvandinther> | Hi, I have a beginner question. How can I forever iterate over an infinite list and print every n seconds? I currently have a do block and forever along with threadDelay to print the same thing every time, but I want to incorporate an infinite list I have using iterate. |
| 03:30:48 | <dsal> | That's kind of complicated. |
| 03:31:32 | <dsal> | If you use STM, you can have a tvar that's getting updated from a traversal across the list and a thread that's sleeping which grabs that tvar every N seconds. |
| 03:33:32 | <tvandinther> | I see, is the tvar a mutable data? Then when I call putStrLn it grabs whatever is in there, and then I make a transaction to update that tvar? This would be the first time dealing with these. |
| 03:38:35 | <EvanR> | your loop (recursive function) can simply take the list to be iterated over |
| 03:38:44 | <EvanR> | when you look, pass the tail of the list |
| 03:38:49 | <EvanR> | when you loop* |
| 03:39:17 | <monochrom> | mapM_ (\x -> threadDelay foo >> print x) [0..] |
| 03:39:59 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:40:48 | <EvanR> | let loop (x:xs) = threadDelay foo >> print x >> loop xs in loop [0..] -- xD |
| 03:41:56 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 258 seconds) |
| 03:44:03 | <dsal> | Oh, I took that as "do some work and occasionally print out the current state" |
| 03:44:10 | bilegeek_ | is now known as bilegeek |
| 03:44:43 | → | img joins (~img@user/img) |
| 03:45:14 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:52:09 | <tvandinther> | Ah I see, thanks! The approach makes sense. |
| 03:57:13 | <kenaryn> | Please what does the keyword "const" does and/or mean? |
| 03:57:32 | <monochrom> | Not a keyword in Haskell. |
| 03:58:57 | <kenaryn> | In the official wiki https://wiki.haskell.org/Keywords "const" is used as is `(const 1 +++ const 2) undefined` returns `(1,2)` |
| 04:00:01 | → | _xor joins (~xor@72.49.198.103) |
| 04:00:12 | <monochrom> | You are misreading. That one is explaining the keyword ~ |
| 04:00:15 | <kenaryn> | Also, in Algebra-driven design book, a "filter false" law is written as the following: `forall (xs :: [a]). filter (const False) xs = []`. So I am wondering, what is its meaning? |
| 04:00:53 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 04:01:44 | <jackdk> | kenaryn: do you understand the `filter` function and the `const` function? (i.e., where should I start explaining from)/ |
| 04:01:50 | <kenaryn> | I agree that the coercion mechanism is the one explained, but nonetheless, there is the word "const" used here so it might hold for a conventionally agreed meaning among uber users. |
| 04:02:41 | <kenaryn> | jackdk: filter will return only the elements that satisfy a condition but I did not know that const is in fact a function. |
| 04:03:19 | <jackdk> | kenaryn: right, so `const` is defined as `const :: a -> b -> a`; `const x _ = x` |
| 04:03:45 | <jackdk> | so `filter (const False)` is running a predicate which always returns `False` against the list, which means that it will reject every element |
| 04:04:07 | <jackdk> | > const False 3 |
| 04:04:09 | <lambdabot> | False |
| 04:04:12 | <jackdk> | > const False "hello" |
| 04:04:15 | <lambdabot> | False |
| 04:04:17 | <jackdk> | (etc) |
| 04:04:27 | <jackdk> | :t const False |
| 04:04:28 | <lambdabot> | b -> Bool |
| 04:04:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 04:06:53 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 04:08:37 | <kenaryn> | Allright, thank you. |
| 04:10:22 | × | z0k quits (~z0k@206.84.142.123) (Ping timeout: 272 seconds) |
| 04:11:26 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 244 seconds) |
| 04:12:12 | → | z0k joins (~z0k@206.84.143.2) |
| 04:14:42 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 04:15:03 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:15:25 | → | chomwitt joins (~chomwitt@2a02:587:dc1f:5600:b0ac:64b:5946:8d06) |
| 04:16:03 | → | Vajb joins (~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi) |
| 04:19:44 | <kronicma1> | Anyone know how to implement early return in a polysemy effect? |
| 04:19:55 | <kronicma1> | Or callcc |
| 04:21:31 | × | qwedfg quits (~qwedfg@user/qwedfg) (Ping timeout: 246 seconds) |
| 04:22:39 | → | yosef` joins (~user@user/yosef/x-2947716) |
| 04:22:47 | → | qwedfg joins (~qwedfg@user/qwedfg) |
| 04:24:57 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 04:27:26 | <dsal> | Hey, I remember this conversation recently. |
| 04:27:34 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 04:34:04 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 04:52:35 | <dibblego> | > map (const 7) [1,2,3,4,5] -- turn all the things into 7 |
| 04:52:37 | <lambdabot> | [7,7,7,7,7] |
| 04:53:12 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 04:58:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 04:59:56 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 05:01:26 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 05:02:07 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 05:11:39 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:11:45 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:15:08 | → | img joins (~img@user/img) |
| 05:15:41 | <kenaryn> | Please what does a "naive" implementation mean? |
| 05:16:20 | <kenaryn> | I admit it is not haskell specific but perhaps someone will accept to give an hint about it. |
| 05:16:40 | <jackdk> | simple, like what's the most straightforward way you could implement the thing |
| 05:17:23 | × | Psybur quits (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) (Ping timeout: 258 seconds) |
| 05:18:52 | → | benin joins (~benin@183.82.179.200) |
| 05:26:16 | × | Vajb quits (~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi) (Ping timeout: 248 seconds) |
| 05:27:22 | <kenaryn> | Allright, I understand. And do you know what a generalization is? I read that annihilation is the generalization of the law `x × 0 = 0`. |
| 05:27:54 | juhp[m] | is now known as JensPetersen[m] |
| 05:28:24 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds) |
| 05:30:09 | <jackdk> | generalisation = "the broader form of an idea". So `x * 0 = 0` in arithmetic, but an annihilator `z` behaves "like that, but in some broader way" |
| 05:31:30 | <kenaryn> | Thank you. |
| 05:33:50 | <dsal> | :t stimes |
| 05:33:51 | <lambdabot> | error: Variable not in scope: stimes |
| 05:33:55 | <dsal> | what! |
| 05:33:58 | <dsal> | that's a great generalization |
| 05:34:00 | <dsal> | @hoogle stimes |
| 05:34:01 | <lambdabot> | Data.Semigroup stimes :: (Semigroup a, Integral b) => b -> a -> a |
| 05:34:01 | <lambdabot> | GHC.Base stimes :: (Semigroup a, Integral b) => b -> a -> a |
| 05:34:01 | <lambdabot> | Hedgehog.Internal.Prelude stimes :: (Semigroup a, Integral b) => b -> a -> a |
| 05:35:30 | <kenaryn> | I'm just at chapter 5 of Chris Allen book, I firmly do NOT have a clue about semigroup features or uber user practices. |
| 05:35:42 | <dsal> | > stimes 0 (9 :: Sum Int) |
| 05:35:44 | <lambdabot> | Sum {getSum = 0} |
| 05:35:46 | <dsal> | > stimes 3 (9 :: Sum Int) |
| 05:35:48 | <lambdabot> | Sum {getSum = 27} |
| 05:35:50 | <dsal> | > stimes 3 "hello" |
| 05:35:52 | <lambdabot> | "hellohellohello" |
| 05:36:00 | <Axman6> | you'd be surprised, you may not know the words, but you definitely understand the concept of a semigroup |
| 05:36:16 | <dsal> | I've argued that they should teach semigroups in elementary school |
| 05:36:30 | <kenaryn> | :) |
| 05:36:37 | <Axman6> | they kind of do, they just don't tell you (or know they're doing it) |
| 05:36:40 | <dsal> | They teach all of these concepts that are the same thing, but give them all different names and people have to keep up with a bunch of stuff. |
| 05:38:08 | <Axman6> | wait, how does stimes 0 (Sum 9) work |
| 05:38:11 | <dsal> | They teach you how to add, how to multiply, how to do exponentiation eventually, how to put words together, how to put sentences together. They just don't point out that these are all the same thing so unless you're super smart you don't see the patterns. |
| 05:38:39 | <kenaryn> | Yeah let's all study denotational semantics before 7th grade. |
| 05:38:46 | <dsal> | It's a fold of n values with mempty |
| 05:39:03 | <Axman6> | kenaryn: I think you are vastly overestimating what a seemigroup is. |
| 05:39:11 | <dsal> | If you stimes Sum (addition) you get multiplication. If you stimes Product, you get exponentiation. |
| 05:39:35 | <jackdk> | It's also hard to even talk about why to generalise until you've got a few examples in your head, and can cut out a common theme and say "these are all alike in this way" |
| 05:39:39 | <dsal> | mempty of Sum is 0 and mempty of Product is 1 |
| 05:39:40 | <Axman6> | (+) and numbers form a semigroup, (*) and numbers form a semigroup, (++) and lists form a semigroup, append and Text form a semigroup |
| 05:40:41 | <Axman6> | many people find Monoid simpler to understand, because we get some more useful laws - (+), 0 and numbers form a monoid - and a monoid is just a semigroup which also has some sort of identity for the combining function |
| 05:40:50 | <Axman6> | you know lots of monoids and semigroups already |
| 05:41:04 | <Axman6> | seven year olds also know lots of them |
| 05:41:39 | <Axman6> | sclv: how can stimes use mempty? |
| 05:41:57 | <Axman6> | uh, dsal (but feel free to answer sclv because you're also cool) |
| 05:42:36 | <dsal> | Hold on. I knew this one at one point. |
| 05:43:43 | <dsal> | oh. It's… OK, slightly special. |
| 05:43:55 | <dsal> | stimes is a method on Semigroup |
| 05:44:16 | → | Vajb joins (~Vajb@2001:999:580:7ad5:4d80:745:ec1c:305) |
| 05:46:26 | <Axman6> | this just feels wrong, like you're secretly showhorning Monoid into Semigroup |
| 05:46:30 | <kenaryn> | Allright, thanks for your feed-back, I'll take notes to look smart. |
| 05:49:09 | <Axman6> | A stack of papers, a.k.a, a document, is also a semigroup - you can take two documents and put them together to get a new document; they are also a Monoid, you can add the empty document (no pages) to the beginning or end of any other document and still have the same document |
| 05:49:48 | <jackdk> | kenaryn: I think you will find it easier than you far, once you start working through it. |
| 05:51:19 | <kenaryn> | But what is mempty? It may shed light on your many examples. |
| 05:52:25 | <jackdk> | mempty is the thing that "does nothing when you combine with it" - it's `0` when you combine with `+`, `1` when you combine with `*`, `[]` when you're appending lists, `False` when you combine with `&&`, `True` when you combine with `||` |
| 05:53:07 | <kenaryn> | So function composition of plusTwo and minusTwo is both a semigroup AND a Monoid? |
| 05:53:55 | <kenaryn> | They cancel out each other I mean. |
| 05:54:45 | <kenaryn> | So they produce nothing: `plusTwo . minusTwo = id` |
| 05:55:10 | <jackdk> | we generally say that the "set" (or in Haskell, the type) is the semigroup or monoid. If the operation is obvious, it is sometimes omitted |
| 05:55:30 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 05:55:54 | <jackdk> | so functions from any type back to itself (`a -> a` for some a) form a semigroup under composition, because `f . (g . h) = (f . g) . h` for any `f, g, h :: a -> a` |
| 05:57:30 | <sm> | Axman6: nice example! |
| 05:57:34 | <jackdk> | they're actually a monoid, because we have the identity function `id`, and for any `f :: a -> a`, `f . id = f` and `id . f = f` |
| 05:58:52 | <jackdk> | what you're talking about, with the `plusTwo` and `minusTwo` is called "invertability" and lets you talk about "undoing" things. so we'd say `minusTwo` is the inverse of `plusTwo`. A monoid where every element has an inverse is called a group |
| 05:59:33 | <kenaryn> | I thought it was commutativity. |
| 06:01:07 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 06:02:31 | <jackdk> | commutativity is when you can swap things around and it doesn't change the result. Like `x + y = y + x` |
| 06:03:28 | <dminuoso> | 07:59:32 Axman6 | [05:36:37] they kind of do, they just don't tell you (or know they're doing it) |
| 06:03:54 | <jackdk> | you sometimes hear "commutative" structures called "abelian" structures, usually "abelian groups" |
| 06:04:04 | <dminuoso> | So there's an important distinction between particular examples of semigroups and the actual semigroup abstraction. |
| 06:04:10 | <jackdk> | but I think if you said "abelian semigroup" you'd be understood |
| 06:06:12 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 06:07:00 | <dminuoso> | It's also why "you've been using monads without even knowing" is a red herring. I dont think you are truly using *Monad* unless your own code has some mention of `forall t. Monad t` |
| 06:09:16 | <dminuoso> | Similarly, a semigroup is more than just "being able to add numbers". In both cases it's about a particular object consciously knowing it has particular properties, and relying on these properties somehow. |
| 06:10:56 | <kenaryn> | I'll take it slowly, I'm merely try to learn programming after all. But the entry barriers of haskell world are often overwhelming. |
| 06:11:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 06:12:37 | → | slack1256 joins (~slack1256@186.11.82.227) |
| 06:13:22 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 06:14:16 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 06:15:28 | <jackdk> | slow and steady is the way |
| 06:22:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 06:26:27 | → | acidjnk_new joins (~acidjnk@pd9e0b3b9.dip0.t-ipconnect.de) |
| 06:28:56 | → | Guest40 joins (~Guest40@240e:3b6:30fb:5307:f037:fd83:4468:f206) |
| 06:35:18 | → | o joins (niko@libera/staff/niko) |
| 06:35:48 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 06:35:55 | → | Feuermagier_ joins (~Feuermagi@2a02:2488:4211:3400:9757:fce7:dee0:8d0e) |
| 06:40:01 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 06:40:37 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 06:40:49 | → | pmk joins (~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) |
| 06:43:05 | × | echoreply quits (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Quit: WeeChat 2.8) |
| 06:43:57 | → | echoreply joins (~echoreply@45.32.163.16) |
| 06:50:17 | → | slac73558 joins (~slack1256@191.126.99.202) |
| 06:51:25 | <rubin55> | hi all, quick question, when you upgrade hls, how do you make existing installed ghc's be 'hls-powered'? |
| 06:51:33 | <rubin55> | (using ghcup) |
| 06:52:27 | × | slack1256 quits (~slack1256@186.11.82.227) (Ping timeout: 258 seconds) |
| 06:53:59 | <Axman6> | hls-powered means that there's a version of hls that was compiled with that compiler version |
| 06:54:19 | <Axman6> | so it's more a note that if you use that version of GHC, you will get hls support |
| 06:55:12 | <rubin55> | right, I see |
| 06:57:02 | → | cfricke joins (~cfricke@user/cfricke) |
| 06:58:47 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 06:59:37 | <rubin55> | what confuses me is that I had ghc 8.10.7, hls-powered with hls 1.6.1.0, I then upgraded hls to 1.7.0.0, and uninstalled 1.6.1.0, after which all installed ghc's became NOT hls-powered, then I undid that and reinstalled 1.6.1.0, but I never got the hls-powered notes back again |
| 07:00:05 | <rubin55> | I nuke'ed and reinstalled, and all is hls-powered again, this time with higher version hls (1.7.0.0) |
| 07:00:22 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 07:00:28 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 07:01:20 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 07:02:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 07:03:34 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 07:05:16 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 07:07:45 | → | img joins (~img@user/img) |
| 07:08:41 | × | kenaryn quits (~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving) |
| 07:10:25 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:4347:f4b5:5ef3:c3f2) |
| 07:10:51 | <tvandinther> | What would I use if I want something like foldr but use an accumulator of a different type than the foldable? I.e. fold a set into a map |
| 07:11:26 | <dminuoso> | tvandinther: foldr. |
| 07:11:39 | <dminuoso> | :t foldr |
| 07:11:40 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
| 07:11:56 | <dminuoso> | Observe that `b` is free to be different from `t a` |
| 07:11:57 | → | alp joins (~alp@user/alp) |
| 07:12:04 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 07:12:33 | <dminuoso> | @let import qualified Data.Map as M |
| 07:12:35 | <lambdabot> | Defined. |
| 07:12:39 | <tvandinther> | Oh right yeah. I missed that. Hmm, I must have another type mismatch in there |
| 07:13:45 | <tvandinther> | Oh haha I was being silly. Folding a set and using Map.insertWith but clearly I won't be getting key clashes folding from a set. |
| 07:14:25 | <dminuoso> | tvandinther: You can use foldrM in combination with alterF |
| 07:14:31 | → | vpan joins (~0@212.117.1.172) |
| 07:15:00 | <dminuoso> | I frequently define `insert1` in terms of alterF to get either validation errors or straight up exceptions on key conflicts. |
| 07:15:56 | <tvandinther> | Is this then the best way to create a map from a set with 1 as the default value? `foldr (`Map.insert` 1) Map.empty set` |
| 07:16:10 | → | nate3 joins (~nate@98.45.169.16) |
| 07:16:37 | <dminuoso> | What do you mean by "default" value exactly? |
| 07:18:31 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 258 seconds) |
| 07:19:30 | <tvandinther> | In this situation, the set becomes the keys and then it needs an associated "default" value. "Make a map where the keys are all those in the given set and all with a value of 1" |
| 07:20:32 | <dminuoso> | There's a more performant way, but this will work yes. |
| 07:20:47 | <tvandinther> | What's the technique you would use? |
| 07:20:56 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 07:22:07 | <dminuoso> | I would use S.toAscList + M.fromAscList |
| 07:22:45 | <dminuoso> | But if the data is of trivial size, the foldr reads nicer |
| 07:23:59 | <tvandinther> | What would be the full expression to be equivalent to the foldr one? |
| 07:25:23 | <dminuoso> | M.fromAscList . (`zip` repeat 1) . S.toAscList |
| 07:25:52 | → | briandaed joins (~briandaed@109.95.143.14.r.toneticgroup.pl) |
| 07:26:17 | <tvandinther> | Ah I see, is it essentially creating a list of k,v pairs and then creating a map from that |
| 07:26:29 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 07:26:37 | <dminuoso> | tvandinther: Yes, though the more relevant part is the *Asc* bits. |
| 07:26:53 | <tvandinther> | Is that because the map is arranged in that order? |
| 07:27:07 | <dminuoso> | No rather, its assumed to be ordered already. |
| 07:27:29 | <dminuoso> | This lets it build the map in linear time |
| 07:27:49 | <tvandinther> | I see. And the Set is naturally ordered as insertions occur? |
| 07:28:21 | <dminuoso> | Well, it has some particular internal representation. But S.toAscList gives you a list in ascending values. |
| 07:28:46 | <dminuoso> | In M.fromAscList it is not checked whether the list is truly ascending (in the first element of the tuple), so it is unsafe in that sense. If you dont guarantee its order it will not behave nicely |
| 07:29:06 | <dminuoso> | (Id have to check, but I think you will get a really buggy map) |
| 07:30:08 | <tvandinther> | Okay, that makes sense. The unchecked nature allows you to avoid the logarithmic operation? And I presume the foldr method happens in n*logn time as it is performing n insertions. |
| 07:31:28 | <dminuoso> | I cant say for certain, it *may* be that both have the same asymptotics. Going through S.toAscList and M.fromAscList you have a guarantee. |
| 07:31:42 | <dminuoso> | Id have to figure out the internals of how M.insert works |
| 07:32:18 | <dminuoso> | And I dont know from the top off my head whether foldr will yield values in ascending either |
| 07:33:13 | × | kaskal- quits (~kaskal@2001:4bb8:2a7:f3b8:36de:fd74:7690:c176) (Quit: ZNC - https://znc.in) |
| 07:33:33 | → | kaskal joins (~kaskal@089144199195.atnat0008.highway.a1.net) |
| 07:33:41 | <tvandinther> | No worries, I got the answers I came for. I appreciate the help. |
| 07:33:45 | → | zeenk joins (~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) |
| 07:34:17 | <dminuoso> | toAscList = foldrWithKey (\k x xs -> (k,x):xs) [] |
| 07:34:22 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 07:34:48 | <dminuoso> | But then again, its not documented that foldr variants give ascending order. So I would not rely on this either |
| 07:34:58 | × | zeenk quits (~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Read error: Connection reset by peer) |
| 07:34:59 | → | zeenk2 joins (~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) |
| 07:39:30 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 07:47:46 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 07:52:24 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Ping timeout: 248 seconds) |
| 07:53:25 | × | _xor quits (~xor@72.49.198.103) (Ping timeout: 256 seconds) |
| 07:53:37 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 07:54:18 | × | bilegeek quits (~bilegeek@111.sub-174-208-241.myvzw.com) (Quit: Leaving) |
| 07:55:01 | × | yosef` quits (~user@user/yosef/x-2947716) (Remote host closed the connection) |
| 07:55:03 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Remote host closed the connection) |
| 07:56:52 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:57:10 | → | _xor joins (~xor@72.49.198.103) |
| 08:02:34 | → | Psybur joins (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) |
| 08:03:14 | → | CiaoSen joins (~Jura@p200300c95738d2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:03:26 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) |
| 08:05:07 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 08:07:35 | × | tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving) |
| 08:11:19 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Remote host closed the connection) |
| 08:11:25 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:11:25 | × | jonathanx__ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 258 seconds) |
| 08:11:31 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) |
| 08:12:09 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 08:12:44 | → | tcard joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) |
| 08:19:07 | × | tvandinther quits (~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) (Quit: Client closed) |
| 08:19:14 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds) |
| 08:23:56 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 08:25:40 | → | gmg joins (~user@user/gehmehgeh) |
| 08:29:54 | → | Pickchea joins (~private@user/pickchea) |
| 08:32:04 | × | nicbk quits (~nicbk@user/nicbk) (Ping timeout: 240 seconds) |
| 08:35:53 | × | elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 255 seconds) |
| 08:36:27 | → | elkcl joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) |
| 08:39:01 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 258 seconds) |
| 08:41:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 08:47:43 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) () |
| 08:48:05 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 08:51:49 | × | Goodbye_Vincent quits (cyvahl@freakshells.net) (Quit: Ping timeout (120 seconds)) |
| 08:53:29 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 08:54:24 | → | Goodbye_Vincent joins (cyvahl@freakshells.net) |
| 08:55:28 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) |
| 08:58:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 08:58:41 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 09:00:11 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Ping timeout: 255 seconds) |
| 09:04:20 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:08:05 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 265 seconds) |
| 09:08:54 | → | pottsy joins (~pottsy@129.227.183.244) |
| 09:11:07 | → | __monty__ joins (~toonn@user/toonn) |
| 09:12:32 | <merijn> | dminuoso: It is now |
| 09:13:00 | <merijn> | I filed a issue about that and recent releases of containers should document that folds are guaranteed in key order |
| 09:14:14 | → | ubert joins (~Thunderbi@2a02:8109:abc0:6434:9e35:18b6:7752:8917) |
| 09:14:18 | <dminuoso> | Nice, though Im not sure you get O(n) when foldr'ing key ordered data with M.insert |
| 09:14:18 | <merijn> | dminuoso: see the note on the Foldable/Traversable instances for example |
| 09:14:41 | <dminuoso> | One part why I believe this may be the case, is because fromAscList is not implemented in terms of foldr + insert |
| 09:15:19 | <dminuoso> | fromMonoListWithKey has a very handtailored implementation |
| 09:15:19 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 09:15:26 | <merijn> | dminuoso: because foldr + insert is n log n? And you can do faster if you know the list is in order |
| 09:15:50 | <dminuoso> | merijn: I dont know whether it is `n log n` when the input is already ordered *shurts* |
| 09:15:52 | <dminuoso> | That's the point. |
| 09:16:14 | <merijn> | It is, unless you somehow special case that fact |
| 09:16:48 | <merijn> | O(n) to traverse the input list, log N to insert each element |
| 09:25:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 09:26:50 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 09:27:10 | × | dcoutts__ quits (~duncan@host86-176-29-4.range86-176.btcentralplus.com) (Ping timeout: 240 seconds) |
| 09:28:43 | → | DNH joins (~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88) |
| 09:29:24 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) (Remote host closed the connection) |
| 09:32:55 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 09:34:06 | → | zaquest joins (~notzaques@5.130.79.72) |
| 09:35:12 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 09:35:54 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 09:36:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 09:38:35 | × | Guest40 quits (~Guest40@240e:3b6:30fb:5307:f037:fd83:4468:f206) (Quit: Client closed) |
| 09:46:44 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 09:49:11 | <Haskelytic> | fellas i was reading the haskell2010 report and it says about modules: "A module defines a *mutually recursive scope* containing declarations for value bindings, data types, type |
| 09:49:12 | <Haskelytic> | synonyms, classes, etc." |
| 09:49:22 | <Haskelytic> | what makes it mutually recursive? |
| 09:52:52 | <merijn> | Haskelytic: The fact that foo and bar can both references each other |
| 09:53:36 | <merijn> | Consider a module with these two definitions: "zeroStart :: [Int]; zeroStart = 0 : oneStart" and "oneStart :: [Int]; oneStart = 1 : zeroStart" |
| 09:54:20 | → | dcoutts__ joins (~duncan@host86-176-29-4.range86-176.btcentralplus.com) |
| 09:55:02 | <merijn> | Haskelytic: Basically "everything is in scope at once" (i.e. there is no ordering to "when do things come into scope" like you have in Python, C, etc. |
| 09:55:05 | <merijn> | ) |
| 09:55:16 | <merijn> | Where things are only in scope *after* the point they're defined |
| 09:56:57 | <Haskelytic> | Ahhh makes sense |
| 09:57:19 | <Haskelytic> | merijn: thanks for that clear example! |
| 09:58:19 | <Haskelytic> | so its basically like a letrec |
| 09:58:22 | <merijn> | Yes |
| 09:58:48 | <merijn> | Haskelytic: I assume that means you've got an (S)ML background? :p |
| 09:59:18 | <Haskelytic> | XD i wish...i was bred on sicp and lisp |
| 09:59:26 | <Haskelytic> | my first brush against functional programming |
| 09:59:51 | <Haskelytic> | I went into Haskell thinking, "how hard can it be?" |
| 10:00:02 | <Haskelytic> | Eating my words now lol |
| 10:00:08 | <dminuoso> | Im curious, sometimes I hear people complaining letrec to be the default in some languages. Why would users prefer `let` not to be `letrec` ever? |
| 10:00:40 | <Haskelytic> | I'm curious about how you can reason about runtime in the presence of non-strict evaluation |
| 10:00:45 | <Haskelytic> | Does not seem trivial at all to me |
| 10:01:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 10:01:04 | <dminuoso> | Haskelytic: Experience and practice. And yes, its not trivial. |
| 10:01:20 | <dminuoso> | It's a frequently named criticsm of Haskell |
| 10:02:36 | → | dextaa joins (~DV@user/dextaa) |
| 10:02:37 | <merijn> | dminuoso: You don't accidentally create recursive bindings when reusing variable names |
| 10:02:52 | <merijn> | But in practice that's screwed me up, like, twice in over a decade of haskell |
| 10:03:54 | <merijn> | dminuoso: So if you habitually shadow variables it can help reduce that |
| 10:04:20 | <dminuoso> | I use recursive bindings almost everywhere *shrugs* |
| 10:05:05 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 10:05:07 | <merijn> | Haskelytic: tbh, at the start it feels harder because everything is different and new and not much existing knowledge can be reused, but the further you get, the more your "old" programming experience becomes relevant |
| 10:05:34 | <merijn> | Like, data structures are data structures and 90% of the stuff you're used to is basically the same |
| 10:05:42 | <sm> | dminuoso: why, I suppose because it's easier to create infinite loops wihout noticing ? |
| 10:05:54 | × | HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
| 10:06:07 | <dminuoso> | sm: That's the thing, I cant recall having done infinite loops in the past 2 years at all.. |
| 10:06:15 | → | HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
| 10:06:41 | <dminuoso> | But is that only because I'm used to wielding a chainsaw? |
| 10:06:49 | <sm> | it has happened me a couple of times in recent years |
| 10:06:58 | × | xff0x quits (~xff0x@s5.HtokyoFL1.vectant.ne.jp) (Ping timeout: 246 seconds) |
| 10:07:02 | <Haskelytic> | merijn: thanks for that encouraging advice :) |
| 10:07:26 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 10:07:35 | <Haskelytic> | dminuoso: well I suppose the Haskell chainsaw is better than C++ |
| 10:07:54 | <dminuoso> | Haskelytic: Another thing is, for most problems performance is not relevant anyway, and the cost of missing strictness is usually negligable for most software a beginner is likely to write. |
| 10:07:56 | <merijn> | Haskelytic: If you, for example, browse the containers package Map's API should look the same as any other dictionary/map type you're used to (well, with a bunch more folding operations, I guess..) https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Map-Lazy.html |
| 10:08:11 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 10:08:14 | <merijn> | sm: Do you normally program with name shadowing warning enabled or no? |
| 10:08:15 | <Haskelytic> | have any of you read chris okasaki's book of purely function data structures? i'm thinking of perusing that after i have gotten a solid grasp on the basics |
| 10:08:32 | <merijn> | Haskelytic: I've skimmed it. It's a classic |
| 10:09:10 | <merijn> | Haskelytic: It's basically a book version of his thesis (which was proving that "anything you can do in a mutable setting can be done in an immutable setting with *at worst* log N slowdown |
| 10:09:14 | <merijn> | ) |
| 10:09:15 | <Haskelytic> | dminuoso: I really need to get out of the micro-optimization mindset :/ |
| 10:09:17 | <sm> | merijn: not sure, I'll check that |
| 10:09:44 | <sm> | no, I seem to have that turned off |
| 10:09:52 | <merijn> | sm: I'm curious, because I've always used the name shadowing warning (-Wall enables it), which has trained me out of name-shadowing, which makes accidental recursion nearly impossible |
| 10:10:14 | <sm> | good tip, I might enablne it |
| 10:10:28 | <Haskelytic> | merijn: oh yeah i have definitely noticed that....I think it's the radical shift in thinking about the problem domain |
| 10:10:34 | <merijn> | The only time you can really create accidental recursion is when you were trying to use a variable 'x' inside a new shadowing binding named 'x' (making it recurse on itself) |
| 10:10:37 | <Haskelytic> | the biggest one is immutability |
| 10:11:12 | <merijn> | sm: If you only ever have one 'x' in scope, it's near impossible to accidentally recurse, because what other 'x' could you possibly refer to? |
| 10:11:24 | <Haskelytic> | merijn: oh wow....I didn't know that book was based on his thesis |
| 10:11:58 | <merijn> | sm: So my current hypothesis is that "people who run into letrec issues are people who don't habitually avoid name shadowing with the warning" |
| 10:12:15 | <merijn> | but that's a hard hypothesis to test :) |
| 10:12:20 | <Haskelytic> | merijn: ""anything you can do in a mutable setting can be done in an immutable setting with *at worst* log N slowdown" <- learned something new today |
| 10:12:25 | <merijn> | I guess I have N=1 now ;) |
| 10:13:20 | <merijn> | Haskelytic: Because you can replace mutable variable with an immutable Map, and updates on an immutable Map are O(n) complexity. So worst case you do "the mutable algorithm, but replacing all variables in scope with a Map you keep as state" |
| 10:13:27 | <merijn> | eh |
| 10:13:32 | <merijn> | O(log N), obviously |
| 10:14:15 | <merijn> | Although often there's equally fast (or faster?) alternatives for algorithms in an immutable setting |
| 10:18:04 | × | Haskelytic quits (~Haskelyti@118.179.211.17) (Ping timeout: 252 seconds) |
| 10:19:46 | <tdammers> | unless "mutable setting" means "you have to actually mutate something at all cost", logic seems to dictate that any immutable algorithm can also be implemented in a mutable setting, so that would rule out "faster" |
| 10:22:27 | <merijn> | tdammers: You cannot rely on immutable sharing as easily |
| 10:22:46 | <merijn> | So at least it might be harder to implement |
| 10:22:54 | × | dcoutts__ quits (~duncan@host86-176-29-4.range86-176.btcentralplus.com) (Ping timeout: 258 seconds) |
| 10:23:01 | <merijn> | I guess faster is not possible in general, but you get the gist |
| 10:27:00 | × | Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.) |
| 10:27:31 | → | tvandinther joins (~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) |
| 10:27:43 | × | raym quits (~raym@user/raym) (Quit: why does nothing work?) |
| 10:27:53 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 258 seconds) |
| 10:28:27 | → | Teacup joins (~teacup@user/teacup) |
| 10:30:12 | → | raym joins (~raym@user/raym) |
| 10:31:11 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 10:32:25 | → | Haskelytic joins (~Haskelyti@37.111.200.113) |
| 10:35:04 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 10:35:09 | <tvandinther> | Heya, got another question. How would I create a function that could take a list of partially applied functions and apply a single parameter on them using short-circuiting logic? Something with a signature like this I think: `[(Int -> Int -> Bool)] -> Int -> Bool` |
| 10:35:15 | → | simendsjo joins (~user@78-72-230-58-no2730.tbcn.telia.com) |
| 10:35:30 | <dminuoso> | tvandinther: first thing to realize, there's no such thing as "partially applied functoins" |
| 10:35:52 | <dminuoso> | It's a notion that only exists in languages that have a notion of functions taking multiple arguments. |
| 10:35:57 | <dminuoso> | In Haskell all functions take a singular argument. |
| 10:36:03 | <tvandinther> | yeah my bad. C# is my day job haha |
| 10:36:26 | <dminuoso> | -> is right associative, meaning the following two types are grammatically even the sane: |
| 10:36:33 | <dminuoso> | Int -> Double -> Float -> String |
| 10:36:40 | <dminuoso> | Int -> (Double -> (Float -> String)) |
| 10:36:58 | <dminuoso> | Apply it to one argument, get a function back. |
| 10:37:22 | <sm> | but as a user of the language, "partially applied function" is a fine mental image |
| 10:37:27 | <dminuoso> | And in fact, function applicatoin `f 1 2 3` associates to the left, so that actually reads `((f 1) 2) 3` |
| 10:37:32 | <dminuoso> | Which complements the ahove |
| 10:39:06 | <tvandinther> | It makes sense intuitively. I gotta get my head around the terminology and logic |
| 10:39:07 | × | slac73558 quits (~slack1256@191.126.99.202) (Read error: Connection reset by peer) |
| 10:40:43 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 10:41:31 | <Haskelytic> | tvandinther: what do you mean it short-circuits? |
| 10:42:15 | <tvandinther> | If any of the listed functions resolve in True, it doesn't do any more. Perhaps that's implied with the lazy evaluation I'm not sure |
| 10:42:25 | <Haskelytic> | oh |
| 10:42:50 | <tvandinther> | [f1, f2, f3] becomes f1 n || f2 n || f3 n |
| 10:43:14 | <Haskelytic> | f1 n has type Int -> Bool |
| 10:43:30 | <Haskelytic> | based on your earlier types |
| 10:43:44 | <Haskelytic> | `[(Int -> Int -> Bool)] -> Int -> Bool` |
| 10:43:46 | <tvandinther> | Yep, my original question had a slightly incorrect signature |
| 10:44:08 | <tvandinther> | I mean `[Int -> Bool] -> Int -> Bool` |
| 10:44:15 | <Haskelytic> | sounds like a fold is in order |
| 10:44:34 | <tvandinther> | I went down the path of Applicatives, is that the wrong tool or just another way? |
| 10:45:25 | <Haskelytic> | something like `map ($ n) [f1, f2, f3]` |
| 10:45:34 | <Haskelytic> | then you fold the result with || as your operator |
| 10:45:44 | <[Leary]> | :t any |
| 10:45:46 | <lambdabot> | Foldable t => (a -> Bool) -> t a -> Bool |
| 10:46:01 | <[Leary]> | That pretty much does it. |
| 10:47:44 | → | notzmv joins (~zmv@user/notzmv) |
| 10:49:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 10:51:18 | → | coot joins (~coot@213.134.190.95) |
| 10:51:21 | <tvandinther> | If my foldable is a list of `Int -> Bool` would that make any be `(Int -> Bool -> Bool) -> t (Int -> Bool) -> Bool` ? Trying to get my head around all the typing |
| 10:52:29 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 10:52:51 | <[Leary]> | The first arg is ((Int -> Bool) -> Bool) |
| 10:53:16 | <tvandinther> | Oh okay, I thoguht they were identical |
| 10:53:34 | <[Leary]> | No, (a -> b -> c) is (a -> (b -> c)). |
| 10:54:06 | <tvandinther> | oooh right associative only |
| 10:55:30 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 240 seconds) |
| 10:55:57 | <tvandinther> | So how would I use any in this case? |
| 10:57:34 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 10:57:34 | × | Haskelytic quits (~Haskelyti@37.111.200.113) (Quit: Client closed) |
| 10:57:50 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 11:01:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 11:01:41 | × | CiaoSen quits (~Jura@p200300c95738d2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 11:02:36 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 276 seconds) |
| 11:04:20 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5) |
| 11:07:31 | <ridcully> | tvandinther: something like this? `any (\f -> f 42) [odd, even, undefined]` |
| 11:07:46 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 11:08:06 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) |
| 11:08:07 | <tvandinther> | Yeah I think I managed with `any ($ n) rules` |
| 11:08:14 | → | xff0x joins (~xff0x@b133147.ppp.asahi-net.or.jp) |
| 11:08:27 | <tvandinther> | I'm just trying to wrap my head around how `($)` works to simplify the lambda |
| 11:10:50 | <tvandinther> | :t ($) |
| 11:10:52 | <lambdabot> | (a -> b) -> a -> b |
| 11:11:06 | <tvandinther> | :t ($ 1) |
| 11:11:07 | <lambdabot> | Num a => (a -> b) -> b |
| 11:12:33 | <tvandinther> | How come the number takes care of the a part instead of having a type issue? I would have thought that you'd apply a function and get `a -> b` back |
| 11:13:34 | <lyiriyah[m]> | Let's start with what `($)` does. |
| 11:13:34 | <lyiriyah[m]> | `($)` is an infix, right-associative operator for function application. |
| 11:14:08 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5) |
| 11:14:13 | <lyiriyah[m]> | e.g `f (g x)` can be written as `f $ g x` |
| 11:14:58 | <lyiriyah[m]> | It's used as the function in the map because it's a cleaner syntax than a lambda expression (and I assume has some performance improvements, but don't quote me on that) |
| 11:15:28 | <tvandinther> | Ah I see. Is it typical that symbolic functions are infix? |
| 11:15:56 | <tvandinther> | :t (($) 1) |
| 11:15:58 | <lambdabot> | Num (a -> b) => a -> b |
| 11:16:18 | <tvandinther> | this is more in line with what I expected if I make the function prefix |
| 11:17:40 | → | nate3 joins (~nate@98.45.169.16) |
| 11:20:40 | <hpc> | operator sections can fill in the parameter on either side |
| 11:20:51 | <hpc> | (/2) x = x/2 |
| 11:20:55 | × | EvanR quits (~EvanR@user/evanr) (Quit: Leaving) |
| 11:20:57 | <hpc> | (2/) x = 2/x |
| 11:21:28 | <hpc> | or, ($ 42) f = f $ 42 |
| 11:21:32 | <hpc> | or just (f 42) |
| 11:22:09 | <hpc> | or well, more accurately, \f -> f 42 |
| 11:22:15 | <hpc> | which is what we had originally |
| 11:22:32 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 11:24:40 | → | lyle joins (~lyle@104.246.145.85) |
| 11:27:07 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) |
| 11:27:42 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:b817:6713:b967:11bc) (Remote host closed the connection) |
| 11:29:07 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 11:32:15 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 11:37:30 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 11:40:05 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) (Ping timeout: 256 seconds) |
| 11:43:38 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 11:44:56 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 11:47:23 | <tvandinther> | Thanks for the help everyone, I really appreciate it. |
| 11:47:59 | × | tvandinther quits (~tvandinth@2406:e002:68db:9f01:6532:b3cb:e7a1:1dce) (Quit: Client closed) |
| 11:48:32 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 11:51:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 11:53:09 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 11:53:51 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 11:55:09 | AlexNoo_ | is now known as AlexNoo |
| 11:55:22 | → | sympt3 joins (~sympt@user/sympt) |
| 11:56:32 | × | sympt quits (~sympt@user/sympt) (Ping timeout: 260 seconds) |
| 11:56:32 | sympt3 | is now known as sympt |
| 11:58:22 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 11:59:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 12:00:24 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Ping timeout: 248 seconds) |
| 12:02:42 | → | mattil joins (~mattil@helsinki.portalify.com) |
| 12:03:17 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) |
| 12:03:54 | × | z0k quits (~z0k@206.84.143.2) (Quit: WeeChat 3.5) |
| 12:04:25 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Client Quit) |
| 12:05:43 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 12:06:17 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) |
| 12:06:25 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection) |
| 12:06:38 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 12:06:50 | × | mncheck quits (~mncheck@193.224.205.254) (Remote host closed the connection) |
| 12:07:59 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 12:09:10 | → | nicbk joins (~nicbk@user/nicbk) |
| 12:10:11 | × | Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.) |
| 12:11:43 | → | Teacup joins (~teacup@user/teacup) |
| 12:16:05 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 12:21:14 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 12:21:27 | × | acidjnk_new quits (~acidjnk@pd9e0b3b9.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 12:24:54 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 12:25:04 | × | nicbk quits (~nicbk@user/nicbk) (Ping timeout: 240 seconds) |
| 12:25:36 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 12:27:04 | × | alp quits (~alp@user/alp) (Ping timeout: 248 seconds) |
| 12:28:01 | → | alp joins (~alp@user/alp) |
| 12:30:31 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 12:36:37 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 12:45:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 12:46:36 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 12:47:48 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 12:50:23 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:4347:f4b5:5ef3:c3f2) (Quit: WeeChat 2.8) |
| 12:52:00 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 12:52:05 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 12:59:29 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) |
| 13:02:01 | × | mattil quits (~mattil@helsinki.portalify.com) (Read error: Connection reset by peer) |
| 13:03:50 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Ping timeout: 250 seconds) |
| 13:04:25 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 13:05:31 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 13:07:42 | → | califax joins (~califax@user/califx) |
| 13:21:54 | → | zincy joins (~zincy@195.25.159.41) |
| 13:28:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 13:32:02 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 13:34:44 | → | leib joins (~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) |
| 13:38:25 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 13:38:40 | → | o-90 joins (~o-90@gateway/tor-sasl/o-90) |
| 13:40:27 | → | jonathanx_ joins (~jonathan@c-5eea340e-74736162.cust.telenor.se) |
| 13:41:58 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer) |
| 13:42:00 | × | o-90 quits (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
| 13:43:28 | × | pmk quits (~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) (Remote host closed the connection) |
| 13:43:34 | → | jonathanx__ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 13:43:56 | × | jonathanx_ quits (~jonathan@c-5eea340e-74736162.cust.telenor.se) (Read error: No route to host) |
| 13:52:39 | × | noteness quits (~noteness@user/noteness) (Remote host closed the connection) |
| 13:53:53 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:54:22 | × | alp quits (~alp@user/alp) (Ping timeout: 260 seconds) |
| 13:55:05 | → | noteness joins (~noteness@user/noteness) |
| 13:56:03 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 13:58:01 | → | slack1256 joins (~slack1256@186.11.82.227) |
| 14:00:15 | × | causal quits (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.5) |
| 14:00:27 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 14:07:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 14:08:19 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
| 14:09:37 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 14:09:55 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 14:15:13 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 14:19:27 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 14:23:35 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:31:42 | → | slac81333 joins (~slack1256@191.126.99.202) |
| 14:31:53 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 14:32:28 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) |
| 14:33:40 | → | vicfred joins (~vicfred@user/vicfred) |
| 14:34:00 | × | slack1256 quits (~slack1256@186.11.82.227) (Ping timeout: 248 seconds) |
| 14:35:25 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 246 seconds) |
| 14:38:09 | × | zincy quits (~zincy@195.25.159.41) (Remote host closed the connection) |
| 14:41:38 | × | julian quits (~julian@20.83.116.49) (Killed (NickServ (GHOST command used by tos9_!~tos9@python/site-packages/Julian))) |
| 14:42:21 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Read error: Connection reset by peer) |
| 14:42:30 | → | \yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 14:44:19 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:50:57 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Quit: ec_) |
| 14:52:30 | × | Ram-Z quits (~Ram-Z@li1814-254.members.linode.com) (Ping timeout: 240 seconds) |
| 14:55:31 | → | alp joins (~alp@user/alp) |
| 14:55:39 | slac81333 | is now known as slack1256 |
| 14:55:49 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 14:57:05 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 14:59:59 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 15:00:52 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 260 seconds) |
| 15:01:16 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 15:05:10 | ec_ | is now known as ec |
| 15:05:28 | × | jonathanx__ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 15:06:54 | → | Pickchea joins (~private@user/pickchea) |
| 15:07:30 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 15:08:47 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 15:10:14 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:10:22 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 15:12:23 | × | _xor quits (~xor@72.49.198.103) (Quit: bbiab) |
| 15:13:58 | → | zincy joins (~zincy@195.25.159.41) |
| 15:18:10 | × | zincy quits (~zincy@195.25.159.41) (Ping timeout: 240 seconds) |
| 15:19:10 | → | nate3 joins (~nate@98.45.169.16) |
| 15:21:58 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 15:24:08 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 15:25:21 | × | finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer) |
| 15:26:09 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-166-231.wlan.tudelft.nl) (Quit: WeeChat 3.5) |
| 15:31:16 | × | ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec) |
| 15:32:19 | × | DNH quits (~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:34:04 | → | econo joins (uid147250@user/econo) |
| 15:36:28 | × | chomwitt quits (~chomwitt@2a02:587:dc1f:5600:b0ac:64b:5946:8d06) (Ping timeout: 258 seconds) |
| 15:37:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 15:40:54 | → | Ram-Z joins (~Ram-Z@li1814-254.members.linode.com) |
| 15:41:03 | → | Tuplanolla joins (~Tuplanoll@91-159-69-63.elisa-laajakaista.fi) |
| 15:48:55 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 15:53:40 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:8f00:a9b0:33d4:b0a2:7015) (Ping timeout: 248 seconds) |
| 15:56:44 | → | DNH joins (~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88) |
| 16:00:07 | → | kenran joins (~kenran@200116b82b2b160001075d8e18f07419.dip.versatel-1u1.de) |
| 16:01:47 | → | kaskal- joins (~kaskal@213-225-35-123.nat.highway.a1.net) |
| 16:02:00 | × | kaskal quits (~kaskal@089144199195.atnat0008.highway.a1.net) (Ping timeout: 248 seconds) |
| 16:14:32 | → | mimmy joins (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) |
| 16:15:36 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 16:17:22 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a4d3:9794:7d08:2a06) (Remote host closed the connection) |
| 16:19:13 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:20:13 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:20:51 | × | \yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Read error: Connection reset by peer) |
| 16:20:58 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 16:21:07 | × | zeenk2 quits (~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!) |
| 16:25:05 | → | Topsi joins (~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de) |
| 16:26:35 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:42:09 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Ping timeout: 244 seconds) |
| 16:43:48 | → | z0k joins (~z0k@206.84.143.2) |
| 16:47:12 | → | segfaultfizzbuzz joins (~segfaultf@135-180-3-34.static.sonic.net) |
| 16:48:11 | × | segfaultfizzbuzz quits (~segfaultf@135-180-3-34.static.sonic.net) (Client Quit) |
| 16:51:52 | → | acidjnk_new joins (~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de) |
| 16:54:53 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 16:57:34 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
| 16:58:41 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 16:58:42 | <shapr> | finally! I have the very most minimal working prototype of "run random tests until coverage stops increasing" ! HURRAH! |
| 16:59:27 | <geekosaur> | now you just have to figure out how to deal with local vs. global maxima :þ |
| 17:01:01 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection) |
| 17:01:07 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 17:01:49 | <shapr> | right now I pull from Leancheck's infinite list of [(testcase,Bool)] and calculate the number of HPC regions that are non-zero, when that number stops increasing for N tests, the tests stop. |
| 17:02:14 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:03:52 | × | acidjnk_new quits (~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 17:03:57 | × | alp quits (~alp@user/alp) (Ping timeout: 260 seconds) |
| 17:06:08 | → | stackdroid18 joins (~stackdroi@user/stackdroid) |
| 17:06:09 | × | slack1256 quits (~slack1256@191.126.99.202) (Read error: Connection reset by peer) |
| 17:06:15 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Read error: Connection reset by peer) |
| 17:07:27 | → | slack1256 joins (~slack1256@186.11.82.227) |
| 17:07:52 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 17:12:56 | → | cosimone` joins (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) |
| 17:12:58 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 17:17:37 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 17:17:44 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 248 seconds) |
| 17:19:42 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.5) |
| 17:20:40 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 17:23:46 | × | mimmy quits (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 246 seconds) |
| 17:24:27 | × | ubert quits (~Thunderbi@2a02:8109:abc0:6434:9e35:18b6:7752:8917) (Quit: ubert) |
| 17:24:29 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 17:24:30 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 240 seconds) |
| 17:27:06 | × | raym quits (~raym@user/raym) (Ping timeout: 272 seconds) |
| 17:27:16 | → | julian joins (~julian@20.83.116.49) |
| 17:27:47 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 255 seconds) |
| 17:28:27 | → | alp joins (~alp@user/alp) |
| 17:29:08 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 255 seconds) |
| 17:29:27 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 17:31:01 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
| 17:34:51 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 17:38:33 | → | mimmy joins (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) |
| 17:41:22 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 17:44:55 | × | Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.) |
| 17:46:25 | → | Teacup joins (~teacup@user/teacup) |
| 17:48:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 17:48:51 | → | raym joins (~raym@user/raym) |
| 17:48:58 | → | sebastiandb_ joins (~sebastian@pool-108-31-128-56.washdc.fios.verizon.net) |
| 17:49:02 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:49:12 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 17:50:37 | × | Teacup quits (~teacup@user/teacup) (Client Quit) |
| 17:53:28 | → | Teacup joins (~teacup@user/teacup) |
| 17:54:47 | × | leib quits (~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) (Remote host closed the connection) |
| 17:55:08 | → | leib joins (~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) |
| 17:55:53 | → | df joins (~ben@justworks.xyz) |
| 17:57:56 | × | cosimone` quits (~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection) |
| 17:58:51 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 18:03:19 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 246 seconds) |
| 18:03:37 | × | sebastiandb_ quits (~sebastian@pool-108-31-128-56.washdc.fios.verizon.net) (Quit: Leaving) |
| 18:05:10 | → | cosimone` joins (~user@93-44-186-171.ip98.fastwebnet.it) |
| 18:05:46 | → | ubert joins (~Thunderbi@p200300ecdf14f9a1eda1a89be8fd240f.dip0.t-ipconnect.de) |
| 18:06:13 | × | Teacup quits (~teacup@user/teacup) (Quit: No Ping reply in 180 seconds.) |
| 18:07:50 | → | Teacup joins (~teacup@user/teacup) |
| 18:08:01 | <Bulby[m]> | Can only monads lift `maybe` in a non strict way? i.e. `maybeM :: Monad m => m a -> m (Maybe a) -> m a` |
| 18:08:30 | <Bulby[m]> | i defined it as `maybeM def act = maybe def pure =<< act` |
| 18:08:33 | <geekosaur> | monads as opposed to…? |
| 18:08:41 | <Bulby[m]> | applicative |
| 18:08:42 | ← | lyle parts (~lyle@104.246.145.85) (WeeChat 3.5) |
| 18:09:17 | <geekosaur> | yes, but for monads it'll depend on the behavior of (>>=) (or (=<<) which is the same thing `flip`ped) |
| 18:10:21 | <geekosaur> | Applicatives can't make decisions so they always evaluate everything; Monads can make decisions based on earlier results, so may not evaluate some things |
| 18:10:44 | <geekosaur> | that's more or less the difference between the two |
| 18:10:44 | <Bulby[m]> | so it's inconsistent? what about `do { v <- act; case v of { Nothing -> def; Just v -> pure v } }`? |
| 18:10:59 | <geekosaur> | it's making a decision there, with the `case` |
| 18:11:09 | <geekosaur> | which a Monad can do but an Applicative can't |
| 18:11:21 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 265 seconds) |
| 18:11:23 | <Bulby[m]> | is that why parser combinators for applicative is slower than monadic variants |
| 18:11:29 | <geekosaur> | yes, in part |
| 18:12:53 | <geekosaur> | the flip side of that is that Applicative can be parallelized, but Monad can't because it has to be able to receive the result to make decisions based on it |
| 18:13:17 | <Bulby[m]> | interesting |
| 18:13:30 | <Bulby[m]> | how can a monad be less powerful in a way than applicative |
| 18:13:44 | <geekosaur> | you're always trading off one thing to get another |
| 18:14:28 | <geekosaur> | it's less obvious with simpler stuff like Semigroup, but by the time you reach Monad it becomes nmore obvious what you're losing in order to gain something else |
| 18:14:48 | <Bulby[m]> | monad can still act as applicative tho, you just can't make decisions |
| 18:14:53 | <geekosaur> | right |
| 18:15:03 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds) |
| 18:16:32 | <Bulby[m]> | so a monad is an applicative that can make decisions and inspect its value |
| 18:16:37 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 246 seconds) |
| 18:17:00 | <geekosaur> | yes, pretty much |
| 18:17:26 | <Bulby[m]> | and an applicative is a functor that is pointed and ??? |
| 18:18:54 | <geekosaur> | has "apply" (aka the former `ap`) |
| 18:19:09 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 18:19:51 | <geekosaur> | you actually run into another limitation similar in some ways to your question about Monad being in some ways less powerful, with Pointed + Apply |
| 18:20:05 | × | leib quits (~leib@2405:201:900a:f088:38f6:f1eb:59f8:2968) (Quit: Leaving) |
| 18:20:27 | <geekosaur> | a data type can be Pointed in a bunhc of ways, only some of which work with Apply and only one or two of which work with Applicative (and only one with Monad) |
| 18:20:46 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 18:22:53 | <Bulby[m]> | pointed doesn't exist because it doesn't really bring much to the table |
| 18:23:59 | <geekosaur> | that's only part of it |
| 18:24:15 | <Bulby[m]> | it also requires writing 6 classes |
| 18:24:22 | → | k8yun joins (~k8yun@user/k8yun) |
| 18:24:28 | <Bulby[m]> | to get monad |
| 18:25:15 | <geekosaur> | if Pointed existed, it would seem obvious to make Applicative simply be (Pointed f, Apply f), but Haskell doesn't handle this well especially when you know there's no actual Applicative instance but there *are* meaningful Pointed and Apply instances |
| 18:25:34 | <geekosaur> | Haskell would happily let you use it as a non-law-abiding Applicative |
| 18:26:11 | <geekosaur> | edwardk discussed this some time back in here |
| 18:30:46 | <geekosaur> | (this wouldn't happen, or at least would produce obvious errors, if Applicative had something in addition to taking `pure` from one and `(<*>)` from the other) |
| 18:31:59 | <geekosaur> | compare the situation with Applicative vs. Monad, where something that has Applicative but not Monad (consider ZipList) will cause (>>=) to break |
| 18:32:18 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 18:33:00 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 18:40:12 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 18:43:21 | <c_wraith> | yeah.. the situation is that you'd end up with a law-only class. And Haskell just doesn't handle those well. |
| 18:44:06 | <c_wraith> | You can't infer them, which is a big usability problem. |
| 18:46:50 | × | jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer) |
| 18:49:17 | → | jinsun joins (~jinsun@user/jinsun) |
| 18:50:09 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:51:14 | <c_wraith> | (I mean, you could write logic that infers empty subclasses, but it would be wrong in situations like geekosaur mentions) |
| 18:52:13 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 18:54:11 | → | acidjnk_new joins (~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de) |
| 18:57:54 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 18:58:07 | × | z0k quits (~z0k@206.84.143.2) (Ping timeout: 256 seconds) |
| 18:58:52 | × | kenran quits (~kenran@200116b82b2b160001075d8e18f07419.dip.versatel-1u1.de) (Ping timeout: 258 seconds) |
| 18:59:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 18:59:38 | → | kenran joins (~kenran@200116b82b2b160039f73c99514b53f8.dip.versatel-1u1.de) |
| 19:02:47 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:04:51 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:05:04 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 19:07:34 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 19:14:28 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 19:18:56 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 255 seconds) |
| 19:20:43 | → | nate3 joins (~nate@98.45.169.16) |
| 19:21:55 | <NemesisD> | has anyone ever used the hkd library? https://hackage.haskell.org/package/hkd-0.1 i'm trying to figure out how i could combine it with the HKD type family trick: `type family HKD f a where; HKD Identity a = a; HKD f a = f a`. When i try to do so it wants an instance of GFTraversable2 which isn't exported... |
| 19:23:11 | <slack1256> | Does aany module export a standard `Exist` data type that is isomorphic to just `exists n. n`? |
| 19:23:35 | <c_wraith> | slack1256: what would you do with such a type? |
| 19:24:08 | <slack1256> | Before you say that is not useful, it would make a pattern of lightweight depedent products (where I carry the proof arround) more standard between code bases. |
| 19:24:44 | <c_wraith> | Does it do something Void doesn't? |
| 19:25:00 | <slack1256> | Yeah, witht the proof, I can extract the wrapped value |
| 19:25:05 | <slack1256> | I will paste an example |
| 19:25:41 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 19:28:54 | → | pmk joins (~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) |
| 19:29:01 | <slack1256> | c_wraith: NVM, I did not want an existential wrapper, I wanted the singleton. |
| 19:29:16 | <slack1256> | There I have to use TH to generate the code IIRC |
| 19:29:21 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 19:29:32 | → | Guest27 joins (~Guest27@2601:281:d47f:1590::59a2) |
| 19:30:47 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 19:30:47 | <pmk> | Hello #haskell. Am I correct in assuming that the recommended way for a new haskell installation on Linux is ghcup? |
| 19:30:57 | <geekosaur> | yes |
| 19:31:18 | <pmk> | awesome, thanks! |
| 19:32:40 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 248 seconds) |
| 19:35:33 | → | yrlnry joins (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) |
| 19:36:00 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 19:36:24 | → | pavonia joins (~user@user/siracusa) |
| 19:36:56 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 272 seconds) |
| 19:39:18 | × | kenran quits (~kenran@200116b82b2b160039f73c99514b53f8.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 19:40:18 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 19:40:39 | × | yrlnry quits (~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 276 seconds) |
| 19:43:46 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 19:44:51 | <hololeap> | @hackage barbies -- not sure if what this is what you are after, NemesisD, but the Barbies.Bare module contains that "trick" you're talking about |
| 19:44:51 | <lambdabot> | https://hackage.haskell.org/package/barbies -- not sure if what this is what you are after, NemesisD, but the Barbies.Bare module contains that "trick" you're talking about |
| 19:46:16 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) (Remote host closed the connection) |
| 19:46:52 | <hololeap> | oh, and it looks like Data.Functor.Barbie has classes that are analogous to what's in hkd |
| 19:47:34 | <Bulby[m]> | `Types that are parametric on unary type-constructors that control their shapes are like Barbies that can wear different clothes to become a different doll. ` |
| 19:48:01 | <c_wraith> | yeah, I've read that package description before, and I still only thing of barbecue |
| 19:48:43 | <Bulby[m]> | haskellers come up with a lot fun names 😄 |
| 19:49:09 | → | agumonkey joins (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) |
| 19:49:36 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 19:49:57 | <NemesisD> | the metaphor gets really strained with that library haha |
| 19:50:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 19:50:10 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:50:41 | <Bulby[m]> | wtf, this is basically how I wrote my toml config |
| 19:50:49 | <CAT_S> | *shrug* |
| 19:52:08 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 19:52:16 | <Bulby[m]> | https://github.com/TheDrawingCoder-Gamer/haskell-status/blob/master/app/Status/Config.hs#L304-L306 |
| 19:53:11 | × | Guest27 quits (~Guest27@2601:281:d47f:1590::59a2) (Quit: Client closed) |
| 19:55:13 | <Bulby[m]> | reminds me of https://hackage.haskell.org/package/monad-chronicle-1.0.1/docs/Control-Monad-Chronicle.html |
| 19:55:34 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:56:45 | → | Guest27 joins (~Guest27@2601:281:d47f:1590::59a2) |
| 19:59:04 | <NemesisD> | wow. i don't know exactly how it works and i'm sure i'll get even more weird looks from coworkers but `barbies` pretty much totally solves this use case |
| 20:03:36 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds) |
| 20:04:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 20:04:59 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 256 seconds) |
| 20:06:01 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 20:07:40 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 20:07:52 | × | mimmy quits (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 248 seconds) |
| 20:07:56 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:11:32 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 20:12:05 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:15:11 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 20:15:26 | → | chomwitt joins (~chomwitt@2a02:587:dc1f:5600:518c:c264:c8fd:1f6b) |
| 20:15:27 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 20:21:10 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 20:21:24 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5) |
| 20:22:47 | × | Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:9757:fce7:dee0:8d0e) (Ping timeout: 240 seconds) |
| 20:26:07 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:35:03 | → | mimmy joins (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) |
| 20:41:06 | × | mimmy quits (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 276 seconds) |
| 20:41:24 | × | Guest27 quits (~Guest27@2601:281:d47f:1590::59a2) (Ping timeout: 252 seconds) |
| 20:41:43 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Remote host closed the connection) |
| 20:42:27 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 20:42:45 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 258 seconds) |
| 20:42:47 | <edwardk> | NemesisD: the HEAD version of hkd and distributive have a lot better tools, but haven't made it to hackage yet |
| 20:43:13 | → | slac30456 joins (~slack1256@191.125.99.202) |
| 20:43:17 | <edwardk> | i don't know the HKD type family trick though |
| 20:44:04 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
| 20:44:04 | <geekosaur> | it "swallows" Identity so you get a normal data type if you use Foo Identity instead of e.g. Foo Maybe |
| 20:44:07 | <edwardk> | oh, you want the flat version with Id to actually be the identity on the thing |
| 20:44:32 | <edwardk> | what do you put in it ? |
| 20:45:10 | × | slack1256 quits (~slack1256@186.11.82.227) (Ping timeout: 240 seconds) |
| 20:45:29 | <edwardk> | i don't have an argument after to feed it. i have Element a f = f a |
| 20:45:38 | <edwardk> | but most of my hkd types take (*->*) -> * |
| 20:45:44 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 20:45:52 | <edwardk> | or (k->*) -> * |
| 20:46:30 | <edwardk> | so you wind up building a boring functorless type and a version with the functors? |
| 20:46:58 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 258 seconds) |
| 20:47:43 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 20:47:57 | <NemesisD> | yeah. so for my use case the functorless version is usually a "raw" instance of the record. i usually have another version with a functor that represents metadata about the each field and maybe another version where the functor represents that the values have all been validated |
| 20:48:24 | × | agumonkey quits (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 248 seconds) |
| 20:49:00 | <NemesisD> | things weren't quite lining up right with `hkd` and to be honest I'm not really sure yet how `barbies` manages to allow for the functorless version |
| 20:49:02 | <edwardk> | so if i swapped out Element for your HKD, i'd write something like data Person f = Person { person :: Element Name f, age :: Element Age f } -- rather than the f Name and f Age in there today. and try to compose this so users of Person Identity felt like they were using a simple person? |
| 20:49:30 | <edwardk> | and if Element was the type family it'd do some kind of clever lift with Identity special cased to make it melt away |
| 20:49:54 | <edwardk> | er Element got renamed. F1 now? |
| 20:50:34 | <NemesisD> | that sounds about right. where does F1 come from? |
| 20:50:35 | × | slac30456 quits (~slack1256@191.125.99.202) (Read error: Connection reset by peer) |
| 20:51:03 | <edwardk> | https://github.com/ekmett/hkd/blob/main/src/Data/HKD.hs#L222 is how i use it |
| 20:51:06 | <edwardk> | this is in HEAD hkd |
| 20:51:12 | <edwardk> | no functorless form |
| 20:51:23 | <edwardk> | just a building block i often offer |
| 20:51:29 | → | cyphase joins (~cyphase@user/cyphase) |
| 20:51:39 | <NemesisD> | ah ok |
| 20:51:47 | <edwardk> | another option rather than the functorless version would be to do it with patterns |
| 20:53:24 | <edwardk> | pattern F4I :: a -> b -> c -> d -> F4 a b c d Identity; pattern F4I a b c d = F4 (Identity a) (Identity b) (Identity c) (Identity d); {-# complete F4I :: F4 #-} |
| 20:53:43 | <edwardk> | now i keep the structure which is actually needed for me to be able to use generics the way i do |
| 20:53:55 | <edwardk> | but you could have the nicer accessor for the identity case |
| 20:54:50 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 20:55:12 | <NemesisD> | thanks! i'll give that a try when i get a chance |
| 20:55:58 | → | mimmy joins (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) |
| 20:59:37 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 260 seconds) |
| 20:59:57 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:00:12 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 21:02:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 21:03:43 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:05:11 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 21:05:19 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 21:06:46 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 21:07:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 21:10:57 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 21:18:03 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 21:18:16 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 21:20:43 | × | pmk quits (~user@2a02:587:9418:69b8:b896:d770:251d:c4d7) (Remote host closed the connection) |
| 21:23:12 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 21:23:20 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 272 seconds) |
| 21:24:30 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 21:26:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 21:26:30 | × | Topsi quits (~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de) (Quit: Leaving.) |
| 21:27:10 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 21:27:23 | → | Topsi joins (~Topsi@dyndsl-095-033-088-183.ewe-ip-backbone.de) |
| 21:27:27 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 21:30:20 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds) |
| 21:32:13 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 21:33:35 | × | cosimone` quits (~user@93-44-186-171.ip98.fastwebnet.it) (Read error: Connection reset by peer) |
| 21:34:10 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 21:36:14 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 21:39:06 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 258 seconds) |
| 21:40:38 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 21:41:19 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 21:42:43 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 21:43:30 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 21:45:36 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 21:46:06 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 21:49:02 | → | Kaipei joins (~Kaiepi@156.34.47.253) |
| 21:49:14 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds) |
| 21:51:20 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 21:51:24 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 21:54:06 | × | alp quits (~alp@user/alp) (Remote host closed the connection) |
| 21:54:30 | → | alp joins (~alp@user/alp) |
| 21:54:48 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:57:25 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 21:58:56 | × | julian quits (~julian@20.83.116.49) (Killed (NickServ (GHOST command used by tos9_!~tos9@python/site-packages/Julian))) |
| 21:59:12 | → | mimmy_ joins (~mimmy@185.153.179.38) |
| 22:00:16 | × | mimmy quits (~mimmy@S0106f81d0f5b3c63.vs.shawcable.net) (Ping timeout: 246 seconds) |
| 22:06:17 | <hololeap> | type family Wear t f a where; Wear Bare f a = a; Wear Covered f a = f a |
| 22:06:28 | <hololeap> | from Barbies.Bare |
| 22:06:47 | <hololeap> | anyway, it's the only place I've seen it standardized into a library like that |
| 22:06:59 | <hololeap> | although beam uses it quite a bit |
| 22:07:09 | <hololeap> | they just rolled their own |
| 22:09:53 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:11:15 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 22:11:19 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 22:16:49 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 22:16:56 | × | acidjnk_new quits (~acidjnk@p200300d0c7068b7704a00ff9b0caad64.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 22:17:49 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 258 seconds) |
| 22:18:34 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 22:18:56 | <Bulby[m]> | i see there are llvm libs but none of them seem actively maintained |
| 22:20:37 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:23:48 | <hololeap> | don't you just pass -fllvm to ghc? |
| 22:23:50 | <hololeap> | https://downloads.haskell.org/~ghc/9.0.2/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm |
| 22:25:30 | <Bulby[m]> | i mean like libs for writing compilers in haskell |
| 22:25:49 | <Bulby[m]> | i was curious as I saw in it a search result for liftM |
| 22:27:04 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 248 seconds) |
| 22:29:16 | <edwardk> | Bulby[m]: i tend to just use hsc2hs and inline-c-cpp and roll what i need as i need it |
| 22:29:25 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 22:29:26 | <hololeap> | in regards to Pointed/Apply and Applicative. I don't see much value in Pointed, but I do see a lot of value in inserting Apply into the Monad typeclass hierarchy, e.g. Functor -> Apply -> Applicative -> Monad |
| 22:30:41 | <edwardk> | hololeap: Pointed mostly becomes useful as a member of the hierarchy if you want to allow for lenses-that-might-fail-but-never-give-back-more-than-one-thing. so "AffineTraversals" want Pointed functors. |
| 22:31:17 | <edwardk> | but if you're adding Apply/Semiapplicative, give me Bind/Semimonad as well |
| 22:31:44 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 22:31:49 | <Bulby[m]> | btw, is there a language that handles law classes well |
| 22:31:56 | <edwardk> | no |
| 22:31:57 | <hololeap> | yeah, fair 'nuff |
| 22:32:23 | <edwardk> | jacques carette at one point had a nice type theory for it, but it was weird and classical |
| 22:32:26 | <hpc> | "monad" already means one, so "semimonad" is a pretty silly-looking word |
| 22:33:17 | <hololeap> | SemigroupoidInCategoryOfEndomorphisms? |
| 22:33:28 | <hpc> | what kind of things have (<*>) but not pure? |
| 22:33:35 | <hololeap> | Map |
| 22:33:47 | <edwardk> | lots of comonads |
| 22:34:09 | <hpc> | ah, that makes sense |
| 22:34:13 | <edwardk> | Map k is my usual example as well |
| 22:34:35 | <Bulby[m]> | why would a map not have pure |
| 22:34:42 | <edwardk> | pure x = ??? |
| 22:34:56 | <edwardk> | what keys do you put in the map? |
| 22:35:00 | <Bulby[m]> | M.singleton ? |
| 22:35:09 | <Bulby[m]> | oh |
| 22:35:11 | <edwardk> | you need a key and a value. what key gets set |
| 22:35:20 | <geekosaur> | singleton doesn't help you conjure up a key |
| 22:35:24 | <edwardk> | the (<*>) is zippy |
| 22:35:36 | <edwardk> | it matches like keys up and applies the operation to the values in them |
| 22:35:40 | <Bulby[m]> | and `k` is polymorphic |
| 22:35:46 | <hpc> | yeah, i can see (<*>) being really useful with Map |
| 22:35:48 | <edwardk> | but there's no 'everything not named gets this value' |
| 22:36:21 | <hpc> | i am always annoyed in other languages when i have to write loop after loop to make tiny adjustments to some json-ish structure |
| 22:36:23 | <edwardk> | and Map is for finite maps of things, so i probably can't enumerate all possible values of k like i can to make ZipList work |
| 22:36:37 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:36:54 | <edwardk> | hpc: that instance is why i wrote the old semigroupoids package |
| 22:37:11 | <Bulby[m]> | oh it's you \o/ |
| 22:37:23 | <edwardk> | similarly you can >>= for Map, but can't return. |
| 22:37:30 | edwardk | waves |
| 22:38:11 | <hololeap> | I ran into a data type where it naturally has two constructors, and neither of them really make sense as the default, so Apply was much more natural than adding an extra "default" constructor, just to satisfy Applicative laws |
| 22:38:48 | <edwardk> | for every (key,value) in the map generate a fresh map using the user supplied function from the value, then just take the matching key and look it up in the generated map, stitching all those answers into a new map. dropping the entry if it isn't present |
| 22:40:35 | <hpc> | and some way of picking which value to keep if there's more than one |
| 22:41:01 | <hpc> | like (>>= \value -> singleton "some constant" value) |
| 22:42:03 | <hpc> | actually, hmm |
| 22:42:14 | <hpc> | would you use (>>=) for semimonad or would you use join? |
| 22:42:26 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:42:44 | <hololeap> | you can define it using either one |
| 22:42:51 | → | finsternis joins (~X@23.226.237.192) |
| 22:42:56 | <edwardk> | hpc: i used (>>-) |
| 22:43:04 | <hpc> | not quite, unless i am mistaken |
| 22:43:18 | <hpc> | you can recover (>>=) from join/fmap but not vice-versa |
| 22:43:22 | <edwardk> | i'm less bullish on join as a member of Monad or whatever due to how badly it interoperates with GND |
| 22:44:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 22:44:10 | <hpc> | oh, i am mistaken |
| 22:44:12 | <hololeap> | join = (>>= id) |
| 22:44:15 | <hpc> | yeah |
| 22:44:17 | <Bulby[m]> | what is GND |
| 22:44:22 | <hpc> | somehow i managed to think join = (>>= pure) |
| 22:44:22 | <edwardk> | generalized newtype deriving |
| 22:44:24 | <jackdk> | GeneralisedNewtypeDeriving |
| 22:44:25 | <jackdk> | snap |
| 22:44:27 | <hpc> | but that's id lol |
| 22:44:34 | <Bulby[m]> | oh |
| 22:45:00 | <Bulby[m]> | fancy id |
| 22:45:22 | <hpc> | the nice thing about type class laws is there's lots of ways to define fancy id |
| 22:46:09 | <edwardk> | lens has a dozen combinators implemented as 'id' |
| 22:46:17 | <edwardk> | at least a dozen |
| 22:46:57 | <hpc> | at one point i considered making an acme package that was all just useful functions that are implemented as unsafeCoerce |
| 22:47:02 | <Bulby[m]> | haha |
| 22:47:38 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 22:47:48 | <hpc> | isJust = unsafeCoerce -- for example |
| 22:47:59 | <Bulby[m]> | what |
| 22:48:09 | <hpc> | Just and True have the same constructor index |
| 22:48:14 | <hpc> | ditto for Nothing and False |
| 22:48:15 | <geekosaur> | it makes sense if you know how constructor tags work |
| 22:48:20 | <Bulby[m]> | 🤣 |
| 22:48:40 | <geekosaur> | @quote unsafeCoerce.*unsafeCoerce |
| 22:48:40 | <lambdabot> | monochrom says: isTrue = (unsafeCoerce :: Either a b -> Bool) . (unsafeCoerce :: Maybe c -> Either a b) . (unsafeCoerce :: Bool -> Maybe c) |
| 22:48:59 | <c_wraith> | also important there - GC information is not stored in types. It's stored in runtime tags |
| 22:49:05 | <hpc> | in acme-php i managed to shoehorn (isn't unsafeCoerce) into the implementation of sortBy |
| 22:49:12 | <hpc> | i am pretty proud of that one |
| 22:50:12 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 22:51:10 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 22:51:17 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 252 seconds) |
| 22:51:49 | → | dsp joins (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net) |
| 22:54:14 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 258 seconds) |
| 22:54:29 | × | alp quits (~alp@user/alp) (Ping timeout: 255 seconds) |
| 22:55:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 22:55:50 | × | zincy quits (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) (Ping timeout: 255 seconds) |
| 22:56:23 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 22:57:03 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1917:7088:7036:8417) |
| 22:59:56 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 23:00:31 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 23:00:40 | × | chomwitt quits (~chomwitt@2a02:587:dc1f:5600:518c:c264:c8fd:1f6b) (Ping timeout: 248 seconds) |
| 23:00:47 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds) |
| 23:01:49 | <Bulby[m]> | i can't read the docs for acme-php even |
| 23:02:44 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 23:03:16 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 23:03:31 | <hpc> | what kind of acme package would it be if it had documentation |
| 23:03:37 | <hpc> | even the generated stuff still has spoilers |
| 23:04:52 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 23:09:02 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1917:7088:7036:8417) (Remote host closed the connection) |
| 23:09:12 | × | zaquest quits (~notzaques@5.130.79.72) (Ping timeout: 248 seconds) |
| 23:09:34 | → | zaquest joins (~notzaques@5.130.79.72) |
| 23:09:39 | → | alp joins (~alp@user/alp) |
| 23:11:49 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 23:12:41 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1917:7088:7036:8417) |
| 23:13:02 | <Bulby[m]> | i find it hilarous that the php website with the discus has the code commented that it says to uncomment and edit |
| 23:14:13 | → | zincy joins (~zincy@2a01:cb18:82de:bf00:70cc:2da1:ce4e:63a0) |
| 23:14:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 23:14:50 | → | bilegeek joins (~bilegeek@2600:1008:b006:dc9e:9b3e:98b5:2da3:eff8) |
| 23:16:23 | <Bulby[m]> | wtf why is the website in quirks mode |
| 23:18:36 | <hpc> | haha, i forgot about that page |
| 23:18:51 | <hpc> | turns out if you put html files in the sdist, you can serve them up as regular webpages |
| 23:19:25 | <Bulby[m]> | "storng" |
| 23:20:01 | <jackdk> | hpc: https://hackage.haskell.org/package/acme-dont-1.2/docs/Acme-Dont.html |
| 23:22:12 | → | nate3 joins (~nate@98.45.169.16) |
| 23:22:12 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 248 seconds) |
| 23:24:30 | <hpc> | yeah, that's a good one too |
| 23:25:41 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 23:27:30 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 276 seconds) |
| 23:28:07 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 23:28:24 | <Bulby[m]> | true or false or file not found |
| 23:28:27 | <Bulby[m]> | amazing |
| 23:36:21 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 23:37:54 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 276 seconds) |
| 23:38:12 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 23:38:27 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 23:42:38 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 23:47:00 | × | DNH quits (~DNH@2a02:8108:1100:16d8:589c:27c2:e36:6e88) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:52:53 | × | dsp quits (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net) (Remote host closed the connection) |
| 23:58:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
All times are in UTC on 2022-06-10.