2024/05/13

Newest at the top

2024-05-13 20:51:40 +0200 <tomsmeding> (hey, a dutchman)
2024-05-13 20:51:17 +0200 <monochrom> https://www.cs.utoronto.ca/~trebla/eq-wiltink.pdf shows how to use how xnor aka (==) as a monoid operator to solve a famous logic puzzle.
2024-05-13 20:51:13 +0200 <zzz> mauke: thath's fun
2024-05-13 20:48:30 +0200 <lambdabot> Foldable t => t Bool -> Bool
2024-05-13 20:48:29 +0200 <mauke> :t foldl' (/=) False
2024-05-13 20:48:29 +0200zzz(~yin@user/zero)
2024-05-13 20:47:43 +0200 <lambdabot> Bits a => a -> a -> a
2024-05-13 20:47:42 +0200 <mauke> :t xor
2024-05-13 20:47:31 +0200 <tomsmeding> s/xor/nonempty/
2024-05-13 20:47:15 +0200 <glguy> probably xor had it before getting pulled into base
2024-05-13 20:46:53 +0200zzz(~yin@user/zero) (Ping timeout: 272 seconds)
2024-05-13 20:46:29 +0200gawen(~gawen@user/gawen) (Quit: cya)
2024-05-13 20:44:13 +0200 <ncf> why the hell do we have xor :: NonEmpty Bool -> Bool but not [Bool] -> Bool
2024-05-13 20:43:22 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-05-13 20:37:55 +0200 <tomsmeding> zzz: tip: cabal-plan dot --hide-builtin
2024-05-13 20:37:45 +0200 <zzz> tomsmeding: ty
2024-05-13 20:37:29 +0200 <tomsmeding> cabal-plan dot
2024-05-13 20:36:01 +0200 <zzz> how can i visualize a dependency graph? cabal-plan?
2024-05-13 20:34:53 +0200 <cheater> like 2-3 screens of code
2024-05-13 20:34:43 +0200 <cheater> the examples i'm thinking of are a little more involved than that
2024-05-13 20:26:40 +0200roboguy_(~roboguy_@216.147.124.110) (Client Quit)
2024-05-13 20:26:34 +0200roboguy_(~roboguy_@216.147.124.110)
2024-05-13 20:26:28 +0200sord937(~sord937@gateway/tor-sasl/sord937)
2024-05-13 20:25:34 +0200sord937(~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds)
2024-05-13 20:22:12 +0200 <glguy> at least for the cases that are simple enough for doctest to load them
2024-05-13 20:21:58 +0200 <glguy> I do support [Leary]'s suggestion of putting the examples in module comments and using doctest to check them, especially for very limited scope examples: here's how to use just this one function/module
2024-05-13 20:21:13 +0200 <cheater> sometimes my own forgetfulness makes me think our memories are just biological cassette tape
2024-05-13 20:19:06 +0200 <cheater> but what if they forget
2024-05-13 20:18:53 +0200 <glguy> if they are, then just think the examples to them :)
2024-05-13 20:18:28 +0200 <cheater> sometimes i wonder
2024-05-13 20:18:11 +0200 <glguy> presumably those devs aren't forming a hivemend or you wouldn't be making examples in the first place
2024-05-13 20:17:55 +0200 <cheater> hmm
2024-05-13 20:17:47 +0200 <glguy> that's fine
2024-05-13 20:17:39 +0200 <cheater> the only other users are the devs of the monorepo
2024-05-13 20:17:10 +0200 <glguy> In the case the example might be useful to the users as it shows what a mess of build-deps they'll need
2024-05-13 20:16:29 +0200 <cheater> the dependency graph looks like that red string meme
2024-05-13 20:16:07 +0200 <cheater> very intertwined
2024-05-13 20:16:04 +0200 <cheater> yeah. i'm just saying it's like, all private interface
2024-05-13 20:15:50 +0200philopsos1(~caecilius@user/philopsos)
2024-05-13 20:15:34 +0200 <glguy> that's the "public interface" from Haskell point of view
2024-05-13 20:15:27 +0200 <glguy> the example should have a build-dep: with whatever the library is
2024-05-13 20:15:25 +0200 <cheater> so there isn't even a public interface
2024-05-13 20:15:09 +0200 <cheater> but in this case, i'm working on a massive monorepo with dozens of libs
2024-05-13 20:14:53 +0200 <cheater> i see what you mean
2024-05-13 20:14:43 +0200 <cheater> oh, well
2024-05-13 20:14:12 +0200 <glguy> r
2024-05-13 20:14:11 +0200 <glguy> and the best way to demonstrate the public interface is to be a public interface consume
2024-05-13 20:13:57 +0200 <glguy> and if you don't burden consumers of the library with having to build examples
2024-05-13 20:13:45 +0200 <glguy> You'll get the most out of your examples if they use the public interface to the library
2024-05-13 20:13:20 +0200 <cheater> i don't mean to be overly defensive, i'm just trying to understand the different kinds of arguments for and against