Logs on 2022-05-14 (liberachat/#haskell)
| 00:04:14 | × | king_gs quits (~Thunderbi@187.201.105.54) (Quit: king_gs) |
| 00:08:18 | <sm> | and then to produce useful results.. I have failed so far |
| 00:08:54 | <laalyn> | what was the profiler output? |
| 00:09:07 | <laalyn> | i'm still recompiling haskell and libs with profiler support |
| 00:10:24 | → | smitop2 joins (uid328768@id-328768.tinside.irccloud.com) |
| 00:11:34 | × | bonz060 quits (~quassel@2001:bc8:47a4:a23::1) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:12:20 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 248 seconds) |
| 00:15:34 | → | dolio joins (~dolio@130.44.130.54) |
| 00:21:51 | <sm> | laalyn: just curious, how are you doing that ? |
| 00:22:15 | <sm> | I only just now managed to get useful profiles |
| 00:22:18 | <laalyn> | doing what specifically? |
| 00:22:54 | <sm> | are you using stack ... --profile ? or cabal ? I'd like to learn from your command line |
| 00:23:21 | <laalyn> | oh im just using ghc |
| 00:23:21 | <sm> | half an hour to get a profile, and I |
| 00:23:31 | <sm> | am pretty good at this stuff (according to me) |
| 00:23:42 | × | gdd quits (~gdd@129.199.146.230) (Read error: Connection reset by peer) |
| 00:23:56 | <sm> | I believe this is at least 50% of why people say optimising haskell is hard |
| 00:24:19 | <laalyn> | well i need to rebuild all my haskell system libs in order to use ghc with -profile |
| 00:24:34 | <laalyn> | as im using Gentoo |
| 00:24:47 | <sm> | ghc -package split -prof -fprof-auto foo.hs, was that your command ? |
| 00:25:45 | <laalyn> | i was following the guide here: https://wiki.haskell.org/How_to_profile_a_Haskell_program#Enable_profiling_on_libraries |
| 00:25:53 | <laalyn> | so its ghc -O2 -prof -fprof-auto -rtsopts program |
| 00:25:55 | <EvanR> | yeah IntMaps are usually pretty good for emulating a sparse array, HashMap for string keys |
| 00:26:21 | → | gdd joins (~gdd@129.199.146.230) |
| 00:26:25 | <EvanR> | sometimes some stray laziness can slow things down and a single well placed ! fixes it xD |
| 00:26:47 | <laalyn> | hmm so where would i place that |
| 00:26:57 | <laalyn> | because in another functional language using the same data structure is faster |
| 00:27:05 | <sm> | here's the profile I got: https://termbin.com/rliw. passing the baton. |
| 00:27:16 | <EvanR> | I'm suspicious that IntMap or HashMap are being used in elixir |
| 00:27:25 | <laalyn> | its a hash trie |
| 00:27:33 | <laalyn> | but they allow anything as the keys/values |
| 00:28:03 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 00:28:13 | <EvanR> | in any case you have to identify the slowdown first |
| 00:28:52 | <laalyn> | sm: so most time is spent on dfs... very helpful |
| 00:29:25 | <laalyn> | it's difficult for me to identify the slowdown because the algorithms and data structures used are the exact same |
| 00:29:35 | <laalyn> | im guessing its due to lazy evaluation? |
| 00:29:55 | <EvanR> | that's also suspicious since elixir is a strict language with mutation, haskell isn't |
| 00:30:16 | <laalyn> | actually data structures in elixir are immutable |
| 00:31:21 | <EvanR> | in any case you need to look more closely than declare the two languages do the same thing |
| 00:31:37 | <EvanR> | when obviously they don't |
| 00:32:04 | sm | thinks most time is spent in lines 29 and 30 |
| 00:33:04 | <EvanR> | another preliminary is to see what kind of performance diff there actually is |
| 00:33:28 | <laalyn> | sm: are you looking at the vector imp or map imp? |
| 00:33:50 | <sm> | just at your code and the profile |
| 00:34:17 | <laalyn> | which paste was it |
| 00:34:46 | <laalyn> | oh i see it was the vector imp |
| 00:34:52 | <laalyn> | lines 29-30 are just getting the input |
| 00:34:55 | <laalyn> | thats pretty fast |
| 00:35:03 | <EvanR> | in the vector version you use foldl (no prime) |
| 00:35:12 | <EvanR> | that might be introduced extreme laziness |
| 00:35:15 | <EvanR> | introducing |
| 00:35:59 | <EvanR> | nevermind, it's folding over 4 items |
| 00:36:22 | <laalyn> | shouldn't foldl be optimized into being strict when using -O2 |
| 00:36:32 | <sm> | I could very well be wrong, and I don't understand the code. But it says 46% of individual time is spent in main |
| 00:36:37 | <EvanR> | it doesn't matter, since it's just 4 items |
| 00:37:11 | <EvanR> | but you can check that by reading core output |
| 00:37:15 | <laalyn> | well main contains the function call to search, which calls dfs |
| 00:37:26 | <laalyn> | so main holds everything |
| 00:38:35 | <sm> | here's the profile simplified by profiterole, FWIW:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/46aa635aa6de11d1d46220d2b44a8b0ce64efe1d) |
| 00:39:00 | <Henson> | just briefly looking over the code, there's a lot of use of tuples, and no strictness anywhere. Using foldl' will probably be better than foldl, trying to avoid tuples whenever possible, and strictly evaluating your data using seq or BangPatterns will probably help. Also there's a lot of list searching going on, which is probably slowing things down, too. |
| 00:40:06 | <EvanR> | tuples do be lazy |
| 00:40:17 | <EvanR> | but sometimes get optimized |
| 00:41:57 | <laalyn> | what should I replace tuples with |
| 00:42:20 | <EvanR> | in your Map version, you use Map Int Bool and Map Int Int |
| 00:42:38 | <EvanR> | IntMap has basically the same API and might (will probably) help |
| 00:42:57 | <laalyn> | i'll try that |
| 00:42:58 | <Henson> | according to the profile, a lot of time is spent in lines 15 to 17, where there's a foldl instead of foldl', and a whole bunch of tupes and recursion, which leads to a whole bunch of thunks that need to be held in memory and evaluated |
| 00:42:59 | <sm> | there could be a dozen or more perf issues in here eh. I would like to know how to systematically report them with tools though. |
| 00:43:06 | <EvanR> | only look at replacing tuples with strict tuples or putting in extra strictness if that's the problem |
| 00:44:07 | <laalyn> | Henson: i swapped the foldl with foldl' and there was no performance diff |
| 00:44:15 | <laalyn> | along with compiling with -O2 |
| 00:44:28 | <EvanR> | the foldl is just to "loop" over 4 coordinate shifts |
| 00:44:28 | <Henson> | what I usually do is just place bangs everywhere (and switch from foldl to foldl') and see if that helps. If so, then slowly remove bangs until you find the one or more than make the difference |
| 00:44:44 | <Henson> | laalyn: ok |
| 00:45:52 | <laalyn> | also 15-17 is the recursive call so most time would be spent there anyway |
| 00:46:13 | <EvanR> | btw, Data.Map is the lazy version, i.e. the values in there won't be evaluated until necessary |
| 00:46:23 | <Henson> | yes, that's true |
| 00:46:29 | <EvanR> | Data.Map.Strict only stores evaluated |
| 00:46:56 | <EvanR> | might not matter in this case |
| 00:47:00 | <laalyn> | theoretically wouldn't DiffArray be the most performant? |
| 00:47:18 | <laalyn> | but i heard its slow because of underlying compiler workings |
| 00:47:30 | <EvanR> | for doing an IntMap, IntMap is best |
| 00:47:35 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:47:49 | <laalyn> | DiffArray could be used to emulate C data structures |
| 00:47:58 | <laalyn> | updates would be O(1) and lookups would be O(1) |
| 00:48:05 | <EvanR> | haven't heard anything good about DiffArray, but I may be out of date |
| 00:48:22 | <laalyn> | i was reading around a bit and noticed a trend of sorts |
| 00:48:34 | <laalyn> | it seems like people have rejected the whole "Versioned Array" idea |
| 00:48:39 | <EvanR> | big O usually comes with a big "up to constant factor" |
| 00:48:50 | <laalyn> | or fat nodes |
| 00:49:04 | <laalyn> | fgl used to be implemented with this i think but then they switched to trees |
| 00:49:09 | <lechner> | Something happened to http://dev.stephendiehl.com/hask |
| 00:50:12 | <laalyn> | well a versioned array would only need to do a write to update array then a write to add version delta |
| 00:50:37 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 00:50:46 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 00:50:47 | <EvanR> | it has to beat the IntMap which has a small number of levels |
| 00:51:12 | <EvanR> | aiui |
| 00:51:22 | → | shiraeeshi joins (~shiraeesh@109.166.57.239) |
| 00:51:40 | <EvanR> | actually if you go by big O, IntMap is also O(1) xD, where 1 = 64 bits |
| 00:52:17 | <EvanR> | still not convinced any of this is the real problem here |
| 00:52:31 | <EvanR> | it's usually unwanted laziness |
| 00:52:43 | Henson | is now known as HensonAway |
| 00:53:09 | <laalyn> | sooo what if u need to exceed 64 bits |
| 00:53:58 | <EvanR> | that would be a huge number of items |
| 00:54:50 | <EvanR> | and wouldn't make sense with Int keys anyway |
| 00:55:57 | <sm> | we're just optimising by trial and error, alas. I think my next move would to simplify the code a lot until there's a perf issue I can understand and fix |
| 00:56:54 | <EvanR> | yeah don't be afraid to write smaller functions and then compose them, ghc will inline everything |
| 00:57:10 | <laalyn> | ok, reimped with IntMap |
| 00:57:12 | <EvanR> | it might make profiling easier |
| 00:57:26 | <sm> | and add one small bit back at a time |
| 00:57:36 | <laalyn> | i used the strict api and got 0.2s speedup from 1.7s to 1.5s |
| 00:57:49 | <sm> | +1 EvanR |
| 00:58:55 | <sm> | -fprof-auto labels the functions, but there are very few of them, so the profile is not very precise |
| 00:59:13 | <sm> | you could manually annotate all the subexpressions for more detail, but easier (and better for the code) to name them as functions |
| 00:59:47 | <laalyn> | so the move is to make the profile more granular |
| 01:00:20 | <laalyn> | ill wait for my libs to finish compiling with profiling support then try that |
| 01:00:27 | <sm> | yes I think so |
| 01:00:29 | <EvanR> | you can also do a memory profile to see if there's a memory leak |
| 01:00:33 | <EvanR> | well, space leak |
| 01:00:45 | <sm> | and/or, start with simpler code, fix and add small bits |
| 01:00:55 | <EvanR> | because that won't help your speed, and also indicates an issue with the code |
| 01:01:11 | <laalyn> | hmm well theres really only one component to the code |
| 01:01:14 | <laalyn> | which is the dfs |
| 01:01:44 | <laalyn> | and thats where the slowdown is |
| 01:01:52 | <EvanR> | if a ball of mud is too slow, there's no much you can do about it |
| 01:02:08 | <sm> | it's only 15 lines, but that's a ton of complexity |
| 01:02:26 | <EvanR> | but I have hope you don't actually have a ball of mud |
| 01:02:34 | <laalyn> | what would that imply |
| 01:02:39 | <laalyn> | a ball of mud |
| 01:02:55 | <EvanR> | a monolithic block of code you can't identify any functional parts of |
| 01:03:06 | <EvanR> | it must all live or die together |
| 01:03:23 | <laalyn> | well i can fully understand what its doing |
| 01:03:36 | <laalyn> | its just one fold |
| 01:03:52 | <laalyn> | to do recursive dfs call and recv the updated visited array back |
| 01:03:56 | <EvanR> | i beg to differ |
| 01:04:37 | <laalyn> | so its not the data structures problem |
| 01:04:51 | <sm> | you don't understand the laziness/space usage I think |
| 01:05:27 | <laalyn> | would you like to see the code in Elixir |
| 01:05:29 | <laalyn> | maybe thats more readable |
| 01:05:31 | <EvanR> | I think your memory profile should show a big jump when you load the data, then stay flat for the whole run, then die |
| 01:06:02 | <EvanR> | if not, could indicate a misunderstanding of the code |
| 01:06:02 | <sm> | ps, presumably 10000 and 30000 iterations is what you expect ? If that sounds like too many, that's always a good place to start |
| 01:06:20 | <laalyn> | thats what i expect |
| 01:06:28 | <laalyn> | since input size is 100x100 |
| 01:06:36 | <sm> | ok, just checking |
| 01:06:42 | <laalyn> | yeah no problem |
| 01:07:20 | <EvanR> | >it's just recursing and returning the updated visited array |
| 01:07:34 | <EvanR> | make sure you evaluate the update before recursing |
| 01:07:48 | <EvanR> | or else it may build up a 30000 long thunk |
| 01:08:15 | <laalyn> | vis' is the new visited array |
| 01:08:19 | <laalyn> | so i would add a bang to that? |
| 01:08:22 | <EvanR> | since it's explicitly recursive, it's not foldl's responsibility |
| 01:09:26 | <shiraeeshi> | some update on me trying to build https://github.com/well-typed/memory-usage-zurihac-2021 |
| 01:09:58 | <shiraeeshi> | I've installed ghc-9.2.1-alpha2 |
| 01:10:02 | <EvanR> | dfs r c adj !vis = -- try that alternative to the definition of dfs |
| 01:10:36 | <shiraeeshi> | reverted cabal.project to the unchanged state |
| 01:10:39 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:16 | <shiraeeshi> | "cabal build" command gives me this error: https://paste.tomsmeding.com/xygZteig |
| 01:11:52 | <shiraeeshi> | it can't build OneTuple, base-compat, basement, blaze-builder |
| 01:13:06 | <shiraeeshi> | for OneTuple, the error says: Module ‘GHC.Tuple’ does not export ‘getSolo’ |
| 01:14:18 | <shiraeeshi> | I've cloned OneTuple and looked at the source code, there is an import with conditional #ifdef |
| 01:15:17 | <shiraeeshi> | it executes the version under the condition: |
| 01:15:18 | <shiraeeshi> | #if MIN_VERSION_base(4,16,0) |
| 01:16:10 | → | dostoevsky6 joins (~5c42c5384@user/dostoevsky) |
| 01:16:26 | <shiraeeshi> | in case of base 4-16, it imports GHC.Tuple (Solo (Solo), getSolo) |
| 01:16:46 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:16:50 | <shiraeeshi> | in case of base 4-15, it imports GHC.Tuple (Solo (Solo)) and then defines getSolo |
| 01:17:45 | <shiraeeshi> | this ghc-9.2.1-alpha2 has base-4.16, but it doesn't export getSolo |
| 01:17:46 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 01:17:47 | dostoevsky6 | is now known as dostoevsky |
| 01:18:27 | <EvanR> | note that accumulating updates to a vector of Bool one at a time is likely to be real slow |
| 01:18:35 | <EvanR> | it copies the whole vector each time |
| 01:19:24 | <shiraeeshi> | if I comment out the part that import Solo and getSolo |
| 01:19:33 | <shiraeeshi> | *imports |
| 01:20:04 | <shiraeeshi> | and put the base-4.15 code that imports Solo and defines getSolo - it compiles |
| 01:20:22 | <monochrom> | When "Solo" is said so many times, one wonders if it's really solo... |
| 01:21:03 | <shiraeeshi> | so my question is: how did it work on the day of the presentation? |
| 01:21:13 | <EvanR> | that we are having library problems involving a 1 tuple, I bet node.js people feel redeemed |
| 01:22:03 | <EvanR> | "look haskell can't even get 1 tuples to work. Don't even start with left padding" |
| 01:22:59 | <monochrom> | Do node.js people know tuples? |
| 01:23:30 | <sclv> | shiraeeshi: because it doesn’t use the normal package sources. it uses head.hackage which is a mutable overlay |
| 01:24:06 | <jackdk> | shiraeeshi: https://hackage.haskell.org/package/ghc-prim-0.8.0/docs/src/GHC.Tuple.html#getSolo the versions of Data.Tuple I see on Hackage for base-4.16.0.0 and 4.16.1.0 both `import GHC.Tuple (Solo(..))` for reexport but not the standalone `getSolo` function. |
| 01:24:06 | <sclv> | head.hackage gets reset with new patches every ghc release and the old ones get deleted |
| 01:24:23 | <shiraeeshi> | jackdk: you mean the line that says "repository head.hackage.ghc.haskell.org" ? |
| 01:24:29 | <shiraeeshi> | in cabal.project |
| 01:24:38 | <sclv> | no i mean that not jack :-) |
| 01:24:50 | <jackdk> | oh no I missed that context, I'm gonna go make more tea |
| 01:25:03 | <sclv> | it was written against a custom patchset that now no longer exists |
| 01:25:24 | <shiraeeshi> | oh my bad, I missed the right username |
| 01:25:39 | <sclv> | you can’t perfectly reproduce it. you can either do the incremental work to bring it up to date, or give up |
| 01:25:39 | <monochrom> | All of us need more wine. |
| 01:26:12 | <sclv> | there is a proposal to keep old head.hackage patch overlays around but… not now |
| 01:27:35 | <shiraeeshi> | jackdk: but #ifdef in OneTuple is written like I described |
| 01:28:09 | <jackdk> | shiraeeshi: ok I can't see that working using released packages but I have no idea what's on head.hackage |
| 01:29:14 | <shiraeeshi> | sclv: the readme of the demo I'm trying to build says: "Or, alternatively, use this nix invocation to set-up the environment." |
| 01:29:21 | <shiraeeshi> | nix-shell |
| 01:29:34 | <shiraeeshi> | "Configuring the haskell.nix caches will save you some build time (or you can remove the eventlog2html entry from the shell.nix file and install another way)." |
| 01:29:48 | <shiraeeshi> | I have 2 questions: |
| 01:30:04 | <shiraeeshi> | what does "configuring the haskell.nix caches" mean? |
| 01:30:34 | <shiraeeshi> | is it going to help with the mutable head.hackage situation? |
| 01:30:37 | <sclv> | nix has binary caches you can tell it to use to shortcut building derivations |
| 01:31:00 | <shiraeeshi> | they have shell.nix file in the project |
| 01:31:03 | <sclv> | i have no idea if the derivation is sufficiently valid still but the caches are orthogonal |
| 01:31:09 | <shiraeeshi> | perhaps it would help |
| 01:31:33 | <sclv> | it might, it might not. the caches will only change build times not the general situation |
| 01:32:10 | <shiraeeshi> | so it's not like they have an exact snapshot of what they used in that nix thing? |
| 01:32:24 | <sclv> | it depends how the nix was configured |
| 01:33:43 | <shiraeeshi> | sclv: "nix has binary caches you can tell it to use to shortcut building derivations" |
| 01:34:07 | <shiraeeshi> | you mean I can tell nix to download binaries from somewhere? |
| 01:34:16 | <sclv> | yes. but the caches are checked against the source hashes. they can’t be used without the full source |
| 01:34:22 | <sclv> | it just shortcuts building |
| 01:34:34 | <sclv> | it doesn’t make anything more or less installable |
| 01:35:15 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 01:35:45 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 01:35:55 | <shiraeeshi> | so as I understand it, allow-newer and linking to mutable head.hackage made the build unreproducible |
| 01:36:11 | <sclv> | yes |
| 01:36:24 | <sclv> | particularly the latter. |
| 01:36:31 | <jackdk> | shiraeeshi: https://input-output-hk.github.io/haskell.nix/tutorials/getting-started.html#setting-up-the-binary-cache |
| 01:36:34 | <shiraeeshi> | and it's unlikely that nix is going to help with that |
| 01:37:49 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 01:37:58 | <sm> | see if y'all can find /r/haskell in the https://anvaka.github.io/map-of-reddit |
| 01:37:58 | <sm> | phew.. now that that's settled.. |
| 01:38:20 | <sclv> | In this case the nix derivation doesn’t pin the packages in head.hackage so it doesn’t look like it will help |
| 01:38:40 | <sclv> | if you read the derivation you see what it provides |
| 01:39:00 | <shiraeeshi> | where does the "nix-shell" command come from? |
| 01:39:01 | <sm> | (warning, the southern continent is NSFW) |
| 01:39:21 | <sclv> | it comes from installing the nix package manager |
| 01:39:55 | <shiraeeshi> | so it doesn't get shipped with cabal, just wanted to make sure |
| 01:40:28 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 01:40:30 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 01:40:45 | <shiraeeshi> | ok, perhaps I should ask the demo authors to make the demo buildable |
| 01:43:00 | <shiraeeshi> | or perhaps I can make it buildable by myself? |
| 01:43:16 | <shiraeeshi> | the presentation was 11 months ago |
| 01:44:06 | <shiraeeshi> | I can't port it to stack because we don't have a snapshot for ghc-9.2 yet, right? |
| 01:45:10 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 01:48:25 | <sm> | stackage nightly has ghc 9.2 |
| 01:49:11 | <sm> | which voids the warranty I guess |
| 01:49:11 | <sm> | I am using it daily |
| 01:49:28 | → | andrey__ joins (~andrey@p508d51c7.dip0.t-ipconnect.de) |
| 01:50:24 | <shiraeeshi> | how can I check if ghc-debug is in stackage nightly for ghc 9.2? |
| 01:50:56 | <sm> | another amusement: did you wonder which are our neighbour subreddits ? https://anvaka.github.io/sayit/?query=haskell |
| 01:51:04 | <sm> | shiraeeshi: go to http://stackage.org/nightly and find in page for ghc-debug |
| 01:51:32 | <sm> | if it's not, it can often still be installed from hackage |
| 01:51:44 | <sm> | or from github, in this case, I guess |
| 01:51:52 | × | andrey_ quits (~andrey@p508d5b33.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 01:52:10 | <shiraeeshi> | no ghc-debug in there |
| 01:52:10 | <sm> | or gitlab, even |
| 01:52:55 | <sm> | https://gitlab.haskell.org/ghc/ghc-debug > "The project needs to built with a development version of GHC from this branch." > does not inspire confidence |
| 01:53:24 | <sm> | your best source of help for ghc-debug is #ghc I think |
| 01:54:06 | <shiraeeshi> | I guess I can just for some time until everything is in a stack snapshot |
| 01:54:27 | <shiraeeshi> | how long till it gets there, can anybody tell? |
| 01:54:33 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 248 seconds) |
| 01:54:50 | <shiraeeshi> | *I can just wait for some time |
| 01:55:41 | <sm> | could be a long wait.. if you want it to happen, best to engage with the maintainers |
| 01:55:58 | <sm> | just getting on hackage would be good |
| 01:56:32 | <shiraeeshi> | hmm, how would getting on hackage be good? |
| 01:56:48 | <shiraeeshi> | there are no snapshots in there |
| 01:57:23 | <shiraeeshi> | or do you mean I can link to hackage instead of mutable head.hackage once it gets there? |
| 01:57:38 | <sm> | getting on hackage means it's more buildable than a random git* repo |
| 01:57:42 | <shiraeeshi> | and then remove allow-newer |
| 01:58:46 | <sm> | if it's (recently published) on hackage, that suggests there is some reasonable build plan that doesn't require violating bounds with allow-newer, yes |
| 01:59:04 | <sm> | shiraeeshi: may I ask how you're so motivated ? is it something you need for work ? |
| 01:59:46 | <shiraeeshi> | idk why lol, seems like I've become a little bit obsessed |
| 02:00:17 | <shiraeeshi> | there is a video that shows how to profile for space leaks |
| 02:00:20 | <sm> | I hear that. +1 :) |
| 02:00:40 | <shiraeeshi> | I wanted to follow the example |
| 02:01:08 | <sm> | just reach out to mpickering on #ghc, you might get lucky |
| 02:01:10 | <shiraeeshi> | they are describing new niceties that they added that make debugging space leaks easier |
| 02:02:01 | <shiraeeshi> | before them, I mean now, you have to set some labels in the code and then search for them in the logs or something |
| 02:02:15 | <shiraeeshi> | the process becomes tedious |
| 02:02:36 | <shiraeeshi> | with the new thing that they added, it can automatically put labels |
| 02:02:56 | <shiraeeshi> | "cost centers" |
| 02:03:05 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:03:36 | <sm> | it's unfortunately often true that the latest shiny haskell tools are visible in the distance long before mortals can use them |
| 02:04:05 | <sm> | but I'm being a pessimist. Let us know if you have any luck |
| 02:04:54 | <shiraeeshi> | I guess the reason for my motivation is that it's an uncomfortable feeling when you know that laziness is problematic sometimes and can lead to space leaks |
| 02:05:04 | <shiraeeshi> | so you have to be careful about them |
| 02:05:15 | <shiraeeshi> | or at least be able to deal with them if they occur |
| 02:05:23 | <sm> | there are a lot of more mundane techniques you can use right now |
| 02:05:41 | <sm> | we were just working on such a problem before you started chatting, did you see ? |
| 02:05:59 | <shiraeeshi> | yes |
| 02:06:27 | <shiraeeshi> | but there is no guarantee that the space leaks won't occur, so you have to learn how to deal with them |
| 02:06:49 | <sm> | that's right, although you can go a long time without hitting one (or without hitting a hard one) |
| 02:07:45 | <shiraeeshi> | so how does debugging memory consumption look like now, in the current versions of ghc? |
| 02:07:54 | <sm> | they come up a lot more in beginner exercises than real-world programs, maybe |
| 02:08:01 | <shiraeeshi> | are there good resources about it? |
| 02:08:23 | <sm> | there's a chapter in the user guide I think, probably the best place to start |
| 02:08:30 | <shiraeeshi> | I have a vague understanding now after watching an intro from the demo |
| 02:08:40 | <sm> | and there have been good blog posts |
| 02:08:42 | <shiraeeshi> | ghc user guide |
| 02:08:44 | <shiraeeshi> | ? |
| 02:08:49 | <sm> | yes |
| 02:09:39 | <shiraeeshi> | ok, gonna take a look some time |
| 02:12:02 | <sm> | https://downloads.haskell.org/ghc/latest/docs/html/users_guide/profiling.html# |
| 02:13:14 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 02:13:48 | <shiraeeshi> | hey, thanks for the link, it went right into my stash of links |
| 02:13:50 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 02:14:15 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 02:15:21 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 02:15:58 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 02:16:03 | <shiraeeshi> | look like it's not a lot of text, I can actually read that in an hour or so |
| 02:16:27 | <sm> | @where profiling also has it, nice |
| 02:16:27 | <lambdabot> | http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html |
| 02:16:52 | <sm> | mastering the techiques in the chapter will take a lot longer, but could be a superpower |
| 02:22:13 | <sm> | heck, just printing it and sticking on the wall would probably give superpower |
| 02:22:28 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 02:22:53 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 02:23:02 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 02:27:19 | → | AlexNoo_ joins (~AlexNoo@178.34.162.184) |
| 02:27:42 | → | dostoevsky7 joins (~5c42c5384@user/dostoevsky) |
| 02:27:44 | <shiraeeshi> | "with the new thing that they added, it can automatically put labels" |
| 02:28:30 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 02:28:30 | dostoevsky7 | is now known as dostoevsky |
| 02:28:40 | <shiraeeshi> | correction: it allows to automatically distinguish different invokations of data constructors (in creation or in pattern matching, I don't remember) |
| 02:29:10 | × | AlexZenon quits (~alzenon@178.34.163.35) (Ping timeout: 240 seconds) |
| 02:29:30 | × | Alex_test quits (~al_test@178.34.163.35) (Ping timeout: 240 seconds) |
| 02:31:18 | × | AlexNoo quits (~AlexNoo@178.34.163.35) (Ping timeout: 276 seconds) |
| 02:31:40 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 02:33:06 | → | AlexZenon joins (~alzenon@178.34.162.184) |
| 02:33:25 | → | Alex_test joins (~al_test@178.34.162.184) |
| 02:33:51 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 02:45:45 | × | Benzi-Junior quits (~BenziJuni@88-149-64-179.du.xdsl.is) (Ping timeout: 248 seconds) |
| 02:47:26 | → | dostoevsky2 joins (~5c42c5384@user/dostoevsky) |
| 02:49:08 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 02:49:08 | dostoevsky2 | is now known as dostoevsky |
| 03:06:48 | → | Benzi-Junior joins (~BenziJuni@dsl-149-64-179.hive.is) |
| 03:07:50 | × | m1dnight quits (~christoph@78-22-9-5.access.telenet.be) (Ping timeout: 246 seconds) |
| 03:10:10 | → | m1dnight joins (~christoph@78.22.9.5) |
| 03:10:56 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 03:11:39 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 03:12:37 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 03:13:06 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 03:13:40 | × | Benzi-Junior quits (~BenziJuni@dsl-149-64-179.hive.is) (Ping timeout: 248 seconds) |
| 03:13:59 | → | vicfred joins (~vicfred@user/vicfred) |
| 03:17:55 | → | dostoevsky3 joins (~5c42c5384@user/dostoevsky) |
| 03:18:55 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 03:18:56 | dostoevsky3 | is now known as dostoevsky |
| 03:26:53 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds) |
| 03:27:09 | HensonAway | is now known as Henson |
| 03:27:15 | × | Henson quits (~kvirc@107-179-133-201.cpe.teksavvy.com) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
| 03:29:59 | × | stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 03:33:00 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 03:41:13 | × | rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 260 seconds) |
| 03:45:19 | → | coot joins (~coot@213.134.190.95) |
| 03:49:33 | × | smitop2 quits (uid328768@id-328768.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:50:02 | → | dostoevsky3 joins (~5c42c5384@user/dostoevsky) |
| 03:51:37 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 03:51:37 | dostoevsky3 | is now known as dostoevsky |
| 03:56:50 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds) |
| 04:02:38 | × | jargon quits (~jargon@174-22-206-112.phnx.qwest.net) (Quit: Nini.) |
| 04:05:59 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 04:10:43 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 04:14:01 | × | zebrag quits (~chris@user/zebrag) (Read error: Connection reset by peer) |
| 04:16:32 | → | dzdcnfzd joins (~dzdcnfzd@pool-108-54-250-165.nycmny.fios.verizon.net) |
| 04:16:58 | <dzdcnfzd> | I have a stack project. I want to write tests for it in bash and run them with stack test. What's the best way to do this? |
| 04:18:09 | <dzdcnfzd> | I've found people saying I should make a .hs test with a main that just calls the bash scripts in question and returns non-zero if any of them return non-zero, then mark that test as of type exitcode-stdio-1.0 in my project.cabal file |
| 04:18:21 | <dzdcnfzd> | but I'm using a stack.yaml file, not a project.cabal file |
| 04:19:19 | <dzdcnfzd> | My goal in this is to be able to type "stack test" and have it build the executable and then run the tests |
| 04:21:50 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 04:23:22 | × | kitty1 quits (~kitty@096-039-147-043.res.spectrum.com) (Read error: Connection reset by peer) |
| 04:23:24 | → | dostoevsky5 joins (~5c42c5384@user/dostoevsky) |
| 04:24:39 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 04:24:39 | dostoevsky5 | is now known as dostoevsky |
| 04:25:59 | <dsal> | dzdcnfzd: Have you considered using a normal test framework? |
| 04:26:00 | <Axman6> | dzdcnfzd: my advice would just be to use cabal, you can make stack understand a cabal based project quite easily but trying to go the other way can be harder |
| 04:26:42 | <Axman6> | why do you want to write the tests in bash? what are you trying to do that you couldn't do from a haskell terstsuite? |
| 04:27:21 | <dzdcnfzd> | Axman6: I'm writing a utility that interops with sed |
| 04:28:36 | <dsal> | It's unclear what Haskell's role in this is, but haskell's got a few good test frameworks. |
| 04:28:49 | <dzdcnfzd> | The easiest way I know to check my program's correctness is to write a little script that runs my program on a file, gets the output, uses it for a sed command, and checks the output against a known value |
| 04:28:52 | <dsal> | I like tasty. tasty-discover works reasonably well. |
| 04:29:12 | <Axman6> | you can run both your program and sed from haskell pretty easily |
| 04:29:14 | <dsal> | tasty-golden would do the thing above fairly well, but it's a somewhat limited test case. |
| 04:30:19 | <Axman6> | https://hackage.haskell.org/package/process-1.6.14.0/docs/System-Process.html |
| 04:31:25 | <Axman6> | I believe you can also get cabal to tell you the path to the binary you've compiled, but I've never done that |
| 04:31:25 | <dzdcnfzd> | I guess |
| 04:31:38 | <dzdcnfzd> | That would be cool |
| 04:31:59 | <sclv> | ‘cabal list-bin’ |
| 04:32:09 | × | phma quits (~phma@host-67-44-208-89.hnremote.net) (Read error: Connection reset by peer) |
| 04:32:11 | <dzdcnfzd> | is there a way to get that automatically as an input to the test? |
| 04:32:13 | <dzdcnfzd> | or no |
| 04:32:25 | <dzdcnfzd> | In general for testing, is there any concept of custom scripts |
| 04:32:27 | <dzdcnfzd> | or actions |
| 04:32:29 | <dzdcnfzd> | in cabal |
| 04:32:46 | → | phma joins (~phma@2001:5b0:211f:6928:8569:9a3:f6e6:2945) |
| 04:32:57 | <sclv> | i would just call the “main” function of the program directly |
| 04:32:59 | <dsal> | If you need to run your executable, you should consider making main smaller so you can use it as a library. |
| 04:32:59 | <dzdcnfzd> | or will stack test always just run a particular haskell executable |
| 04:33:01 | <Axman6> | cabal can create some useful modules for you during compilation, but I can;t remember how that's done |
| 04:33:06 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 04:33:21 | <Axman6> | sclv: can you do and control what it sees as stdin, stdout etc? |
| 04:33:24 | <sclv> | the pattern is make the program mainly in a lib, and the executable stanza is a thin wrapper |
| 04:33:29 | <dzdcnfzd> | dsal: that's a good idea |
| 04:34:00 | <dzdcnfzd> | sclv: yeah, of course, that's a good pattern, but I think it's worse for testing |
| 04:34:04 | <dzdcnfzd> | I want a real integration test |
| 04:34:07 | <sclv> | Axman6: sorta, but usually its better to test componants and not drive it directly. |
| 04:34:15 | <dzdcnfzd> | end-to-end |
| 04:34:17 | <dsal> | As a library, I'd expect to be able to supply a bytestring of some sort as input and have a bytestring of some sort as output and a configuration structure. |
| 04:34:33 | <Axman6> | yeah if your main can do something like appMain :: Args -> ByteString {- stding -} -> IO ByteString then your testing will be as simple as running it, calling sed using the above module, and comparing the results |
| 04:35:04 | <sclv> | for a real integration test, you can recursively invoke “list-bin” within it, or require the bin as a cmd line arg |
| 04:35:55 | <dzdcnfzd> | is the wisdom of the crowd that I should forsake stack.yaml in favor of my-project.cabal? |
| 04:36:08 | <dzdcnfzd> | I don't have a lot of stack or cabal knowledge so |
| 04:36:14 | <dzdcnfzd> | is this what people do? |
| 04:36:18 | <sclv> | but again anything that needs this is typically big enough to be testing multiple integrated components and the test should then be a whole separate project |
| 04:36:42 | <dsal> | I use stack, but stack isn't related to your problem. |
| 04:36:43 | → | bilegeek joins (~bilegeek@2600:1008:b047:7868:8343:8573:5cc1:560a) |
| 04:37:24 | <dzdcnfzd> | I just mean in general |
| 04:37:28 | <dzdcnfzd> | I think I have to pick one, right? |
| 04:37:48 | <dzdcnfzd> | I have to either manually modify my cabal file or use stack.yaml |
| 04:38:04 | <dzdcnfzd> | if I manually modify my cabal file it tells me it's skipping the stack.yaml I think? |
| 04:38:05 | <dsal> | Well, package.yaml, which writes out your cabal file and you can do that without stack if you'd like. |
| 04:38:12 | <dsal> | You don't modify stack.yaml very much. |
| 04:38:36 | <dzdcnfzd> | Ah, I see |
| 04:38:41 | <dzdcnfzd> | Okay, same question though |
| 04:38:55 | <dzdcnfzd> | Should I be forsaking package.yaml in favor of myProject.caba |
| 04:38:58 | <dzdcnfzd> | *.cabal |
| 04:39:07 | <dsal> | I wouldn't write out .cabal files by hand. |
| 04:39:28 | <dsal> | We don't use stack at work (for the bulk of our software), but we do use hpack because writing .cabal files by hand sounds like a terrible idea. |
| 04:39:43 | <dsal> | We've got like, thousands of modules and would just constantly have conflicts if people did that by hand. |
| 04:41:38 | <dsal> | I've been using stack for years and have never successfully migrated a project off of it, but that's still independent of "how do I write testable code and then test that testable code?" |
| 04:45:16 | → | zaquest joins (~notzaques@5.130.79.72) |
| 04:46:41 | <dzdcnfzd> | I see |
| 04:50:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 04:50:53 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 04:50:59 | <sm> | stack user here, checking in |
| 04:51:09 | <dzdcnfzd> | thanks btw |
| 04:51:17 | <dzdcnfzd> | currently trying to put together a tasty test |
| 04:51:50 | <sm> | dzdcnfzd, as I think you know, you can define test suites, and these run arbitrary haskell code, which can do anything including running shell scripts |
| 04:51:58 | <sm> | and by the way have you seen shelltestrunner ? |
| 04:52:36 | <sm> | I'm curious though if it's actually important for `stack test` to run everything ? I use `make test` as my top level command |
| 04:53:02 | <dzdcnfzd> | sm: No, I haven't seen it. Yeah, I know I can do whatever I want from a haskell file. I just wanted to do it as simply as possible |
| 04:53:44 | <dzdcnfzd> | As to make -- it'd also work, I guess, but it's another bit of tooling |
| 04:53:55 | <sm> | or just a shell script |
| 04:53:59 | <sm> | ./test |
| 04:54:06 | <dzdcnfzd> | Yes, I considered that |
| 04:54:15 | <dzdcnfzd> | That's basically what I wanted |
| 04:54:34 | <dzdcnfzd> | The only thing is that the shell script would have to run stack build |
| 04:54:58 | <sm> | it can do that.. I have my make test rule do that |
| 04:55:01 | <dzdcnfzd> | I wanted to be able to run `stack test` -> stack builds the project, invokes my script |
| 04:55:05 | <dsal> | Why upside down? Just make `stack test --file-watch` work |
| 04:55:20 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 04:55:23 | <dzdcnfzd> | What do you mean? |
| 04:55:41 | <sm> | dzdcnfzd: wants to run shell script tests, and doesn't want to write haskell code to do that if there's an easier way |
| 04:55:54 | <dzdcnfzd> | sm: with make it'd be possible. I was hoping there'd be a native way within cabal |
| 04:56:01 | <dzdcnfzd> | Or stack |
| 04:56:06 | <dsal> | I think running stack from haskell from stack to write a test in shell is definitely the hardest way. |
| 04:56:29 | <sm> | the native way would be test/Main.hs: runProcess "./test" :) |
| 04:56:38 | × | laalyn quits (~laalyn@c-73-189-182-49.hsd1.ca.comcast.net) (Quit: Client closed) |
| 04:56:43 | <dzdcnfzd> | I'm actually writing a haskell program that constructs a make file that builds everything and runs it |
| 04:56:45 | <dzdcnfzd> | very simple |
| 04:57:02 | <dsal> | How is that more simple than just calling your function and inspecting the output? |
| 04:57:16 | <sm> | I think you should generate the whole thing from a bash script for easy deployment |
| 04:57:29 | sm | semi-joking |
| 04:57:56 | <dsal> | I think any involvement of shell just greatly complicates things and makes them less portable. |
| 04:58:31 | <dzdcnfzd> | dsal I was joking above, but why would using the shell make it less portable? |
| 04:58:53 | <sm> | windows.. different shells available on unix machines.. |
| 04:59:02 | <sm> | different shell versions (apple vs homebrew, etc) |
| 04:59:27 | <dzdcnfzd> | Yeah, that's a good point |
| 05:00:58 | → | laalyn joins (~laalyn@c-73-189-182-49.hsd1.ca.comcast.net) |
| 05:00:59 | <dsal> | Based on the description, it sounds like you just have a thing that takes some input and produces some output. Something like this does most of the work for you: https://hackage.haskell.org/package/tasty-golden-2.3.5/docs/Test-Tasty-Golden.html#v:goldenVsString |
| 05:02:17 | <dzdcnfzd> | That is what I'm going to use but it's only sort of the case |
| 05:02:23 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 05:02:32 | <sm> | yes, I will shill shelltestrunner a little more - that might replace some of your test scripts. Though it's one more thing to install, it's more cross platform than sh. tasty-golden does similar work but requires a bit of programming |
| 05:02:37 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:03:25 | <dzdcnfzd> | the whole testing thing is a little bit complicated by the fact that it's a utility whose output is meant to be used by a `sed` command |
| 05:03:28 | <laalyn> | /msg NickServ VERIFY REGISTER laalyn DA5QhWyzExBdppzD |
| 05:03:42 | <dzdcnfzd> | Uhhhhhh |
| 05:03:46 | <dzdcnfzd> | He laalyn |
| 05:03:58 | <laalyn> | yeaaah im guessing that cmd didnt work |
| 05:04:02 | <dzdcnfzd> | lol |
| 05:04:14 | <dsal> | dzdcnfzd: that shouldn't be an issue. You've got a function that takes a bytestring and returns a bytestring, right? |
| 05:04:18 | <dzdcnfzd> | sm: it looks very cool |
| 05:04:25 | <dzdcnfzd> | dsal: yes |
| 05:04:36 | <sm> | I rely on it |
| 05:04:45 | <dzdcnfzd> | but the bytestring it outputs isn't the one I care about |
| 05:04:55 | <dzdcnfzd> | I care about how sed behaves when I feed it that bytestring |
| 05:05:11 | <dzdcnfzd> | Hence the shell part |
| 05:05:19 | sm | notes that sed itself is highly non-portable.. but that's what tests will tell you |
| 05:05:20 | × | laalyn quits (~laalyn@c-73-189-182-49.hsd1.ca.comcast.net) (Client Quit) |
| 05:05:39 | → | laalyn joins (~laalyn@c-73-189-182-49.hsd1.ca.comcast.net) |
| 05:05:51 | <dsal> | Sure, sed is not portable, but the next step would be replacing sed. |
| 05:06:05 | <sm> | perl ftw |
| 05:06:30 | <laalyn> | perl 6 is pretty cool |
| 05:07:01 | <sm> | heh, perl 6 is what got me interested in this exotic new language "Haskell" |
| 05:07:05 | <dsal> | I guess I don't understand how a shell script improves anything here. If you have a stream editor, you write the tests against that interface. Changing the implementation from sed to conduit shouldn't break any tests. |
| 05:08:38 | <sm> | dsal.. I'm guessing that writing and changing the shell tests can be (for lots of folks) a lot quicker than futzing with compilation and unfamiliar libs |
| 05:09:06 | <sm> | and, maybe closer to the intended real-world use of the tool ? |
| 05:09:16 | <dzdcnfzd> | dsal: exactly. I was hoping to hack this together in 30m. It's going to be a bigger time investment now |
| 05:09:27 | <dzdcnfzd> | Because I don't know the libs, I'm not an expert in haskell IO |
| 05:09:37 | <dsal> | I… guess, but if you're writing stuff in Haskell, you've got great tools for correctness and stuff. |
| 05:10:03 | <dsal> | I wouldn't expect the tests to use any IO unless you were using the golden thing. |
| 05:10:09 | <sm> | I know it would take me an hour or possibly half a day debugging some stupid lazy IO/concurrency issue |
| 05:10:11 | <dsal> | Some tests are better than no tests, but good tests are within reach. |
| 05:11:35 | <dzdcnfzd> | dsal I definitely need IO |
| 05:11:47 | <dzdcnfzd> | how are you gonna run an external program without IO? |
| 05:12:17 | <dsal> | Yeah, but that's the part you already have to write, not the test. |
| 05:12:30 | <dzdcnfzd> | ? |
| 05:12:35 | <dsal> | The test is just "if I call my thing with x I get y" |
| 05:12:39 | <dzdcnfzd> | No |
| 05:12:43 | <dzdcnfzd> | That's not end-to-end |
| 05:12:48 | <dzdcnfzd> | that's a unit test |
| 05:13:40 | <dzdcnfzd> | For context, what I've done is made a DSL that compiles down to sed regexes |
| 05:14:14 | <dzdcnfzd> | My tests are programs written in this DSL, combined with sed input that I'd like to test against these programs |
| 05:14:44 | <dsal> | Ok, then the test is "If I call my thing with f and x I get y" |
| 05:16:01 | <dzdcnfzd> | so basically I have `echo "test1_sedInput.txt" | sed -E "$(stack exec my-program test1_programInput)" > test1_golden.txt` |
| 05:16:41 | <dzdcnfzd> | That exact command is an almost fully specified test without any extra work |
| 05:17:12 | <dzdcnfzd> | I can write a haskell program to do all that for me but it's going to be significantly more work to put together |
| 05:17:15 | <dzdcnfzd> | that's all |
| 05:18:11 | <dsal> | Well, so is the thing you're describing and why you're here. You still have to have a collection of those inputs, outputs, expected outputs, validation, error reporting, and runtime. And it's super convenient when that runs with `stack test --file-watch`. That whole thing is one relatively small function and you could do it with a loop over specified inputs. |
| 05:18:59 | <dsal> | If you give me a repo I can clone, I should be able to prototype that pretty quickly. |
| 05:19:26 | <dzdcnfzd> | Yep. But that's why I wanted to just have a way to do `stack test` and have it build and then run a shell script |
| 05:20:13 | <dzdcnfzd> | Don't feel compelled to! But I can certainly show you the repo. I'm hoping people will find it interesting anyways |
| 05:20:27 | → | dostoevsky3 joins (~5c42c5384@user/dostoevsky) |
| 05:21:12 | <dsal> | Nah, I was trying to work on one of my programs, but I don't have any outstanding issues at the moment. heh |
| 05:21:51 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 05:21:51 | dostoevsky3 | is now known as dostoevsky |
| 05:22:11 | sm | notes that --file-watch is awesome, but so is entr |
| 05:22:28 | <sm> | and for that matter, ghcid -t |
| 05:23:26 | <dsal> | We don't use stack at work, but apparently other people use ghcid and have a great time. I've never actually got it working. heh |
| 05:24:58 | <sm> | for extra fun, combine two or more of these |
| 05:25:43 | <sm> | what's your latest project dsal ? |
| 05:26:05 | <dsal> | I've mostly just been doing work stuff. |
| 05:26:40 | <dsal> | I get to write a lot of parsers for obscure formats written by people who've never spoken to the nerds who have to touch the computers. |
| 05:26:53 | <sm> | ouch |
| 05:26:58 | <sm> | good thing you have haskell eh |
| 05:27:10 | <dsal> | Yeah, it's kind of nice. |
| 05:28:08 | <dsal> | I've learned to not hate hedgehog at least. Though the project as a whole currently makes it a little difficult to write hedgehog tests against effectful code. Hoping to get that fixed because the thing I'm working on right now is complicated, insufficiently tested, and I'm adding a lot of complication. |
| 05:31:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 05:34:06 | <dzdcnfzd> | dsal: https://github.com/anthonyrgreen/sedx-compile |
| 05:34:46 | <dsal> | dzdcnfzd: Is that private? I'm dustin if you want to limit access. |
| 05:35:02 | <dzdcnfzd> | I made it public |
| 05:35:14 | <dzdcnfzd> | Is it visible? |
| 05:35:50 | <dsal> | I get a 404 |
| 05:36:26 | <dzdcnfzd> | Ahh, whoops |
| 05:36:28 | <dzdcnfzd> | https://github.com/anthonyrgreen/sedx-compiler |
| 05:36:50 | <dsal> | compiles! |
| 05:36:59 | <dsal> | Well, checks out. I'll find out if it compiles eventually. |
| 05:37:29 | <dzdcnfzd> | :) |
| 05:38:00 | <dzdcnfzd> | If you see me doing anything really dumb and get inspired to tell me it's dumb, please do so |
| 05:38:11 | <dzdcnfzd> | I am making up my haskell style as I go along |
| 05:38:21 | <dzdcnfzd> | Pretty sure I'm doing things the wrong way in places |
| 05:39:46 | <dsal> | Well, it doesn't compile. |
| 05:39:49 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 05:40:09 | <dzdcnfzd> | What happens? |
| 05:40:13 | <dsal> | I like stylish-haskell for some basic layout advice. And hlint for other advice |
| 05:40:27 | <dsal> | Not in scope: type constructor or class ‘LinkedMatch’ |
| 05:40:36 | <dzdcnfzd> | what command is this? |
| 05:40:43 | <dsal> | stack test |
| 05:40:53 | <dsal> | or stack biuld |
| 05:40:54 | <dzdcnfzd> | Ah, yes |
| 05:41:08 | <dzdcnfzd> | stack build is working for me, not sure what's happening for you |
| 05:41:18 | <dzdcnfzd> | stack test isn't working because I just started writing it |
| 05:41:53 | <dzdcnfzd> | wait a sec |
| 05:41:56 | <dzdcnfzd> | I know what's happening |
| 05:42:06 | <dzdcnfzd> | I didn't add one file to my commit, sorry |
| 05:42:15 | <dsal> | Yeah. Give me more files! |
| 05:43:08 | <dzdcnfzd> | I think it should work |
| 05:43:47 | <dsal> | builds! |
| 05:44:04 | → | dostoevsky4 joins (~5c42c5384@user/dostoevsky) |
| 05:45:30 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 05:45:30 | dostoevsky4 | is now known as dostoevsky |
| 05:47:21 | <dsal> | dzdcnfzd: There aren't any sedx files around. Perhaps one way to structure this might be to make a directory structure with ["input", "sedx", "expected"] |
| 05:48:02 | <dzdcnfzd> | Yes, I just decided on the file extension |
| 05:48:18 | <dsal> | I mean, can you toss in something you'd like to see tested. |
| 05:48:25 | <dzdcnfzd> | You can see what will be a .sedx file under https://github.com/anthonyrgreen/sedx-compiler/blob/main/sample_programs/search_and_replace.txt |
| 05:48:49 | <dzdcnfzd> | I can make the sed input file and upload it next to that |
| 05:49:39 | <dzdcnfzd> | Hold up a sec, I'll fix the extension and add the other input, plus the output files |
| 05:50:45 | <dsal> | I'm thinking an easy way to do things is "tests/{arbitrary,directory,names}/{input,script.sedx,expected}" |
| 05:51:54 | <dsal> | Style opinion: Never use `return` -- I can't ever tell whether someone understand what it does. |
| 05:52:27 | → | kuribas` joins (~user@d51529C17.access.telenet.be) |
| 05:54:46 | <dzdcnfzd> | I have uploaded the test files |
| 05:54:58 | <dzdcnfzd> | they are in three directories under test/ |
| 05:55:16 | × | kuribas quits (~user@ptr-17d51eo38esxcyx0dri.18120a2.ip6.access.telenet.be) (Ping timeout: 248 seconds) |
| 05:56:21 | <dzdcnfzd> | correction: they are NOW in the three proper directories. |
| 05:56:27 | × | shiraeeshi quits (~shiraeesh@109.166.57.239) (Ping timeout: 240 seconds) |
| 05:57:06 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 05:57:23 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 05:57:45 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 05:58:07 | <dsal> | I'd put them all in the same directory. Let me make something that works real quick. You're actually pretty close. |
| 06:02:50 | → | coot joins (~coot@213.134.190.95) |
| 06:03:00 | <dsal> | Sorry, taking me a sec to figure out how to use your lib. |
| 06:08:35 | <dsal> | It's failing to parse the example. |
| 06:09:38 | <energizer> | i am looking for a string formatting tool like sprintf or f-strings but in a composable ADT style rather than a compact dsl style. is there something like that? |
| 06:11:03 | <dzdcnfzd> | dsal: Sorry, I'm not sure what I changed. I'm trying to figure it out now |
| 06:11:09 | <dsal> | https://www.irccloud.com/pastebin/ErIdYuKn/ |
| 06:11:55 | <dzdcnfzd> | I got it |
| 06:12:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 06:13:50 | <dzdcnfzd> | The program is fixed |
| 06:13:58 | <dzdcnfzd> | the .sedx input i mean |
| 06:14:24 | <sm> | energizer: would that be something like https://hackage.haskell.org/package/pretty-1.1.3.6/docs/Text-PrettyPrint.html#t:Doc ? |
| 06:15:56 | <energizer> | sm i dont think so. a solution would have a million ways to format a float |
| 06:16:18 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:16:22 | <energizer> | but maybe it's there and i'm missing something |
| 06:17:08 | → | frost joins (~frost@user/frost) |
| 06:18:10 | <dsal> | dzdcnfzd: Sorry, I've mangled the project a bit in order to get something that was easier to add. |
| 06:18:17 | <sm> | https://hackage.haskell.org/package/formatting ? |
| 06:18:18 | <dzdcnfzd> | No worries |
| 06:18:30 | <dzdcnfzd> | It's awesome you're looking at it |
| 06:18:38 | <sm> | seems like a few of them at https://hackage.haskell.org/packages/search?terms=printf |
| 06:19:42 | <dsal> | dzdcnfzd: OK. So when the test fails, it isn't *super* useful. Let's use the diff one and toss portability out for a moment. |
| 06:19:53 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 06:19:54 | <dzdcnfzd> | kk |
| 06:20:40 | <energizer> | thanks sm |
| 06:23:19 | <dsal> | Well, I can't actually tell what's wrong because I don't know what any of this is doing, but this is a useful test, I think. Each directory is a test with an input, expected, and script.sedx https://www.irccloud.com/pastebin/AJwgukSD/Spec.hs |
| 06:23:41 | <dsal> | Also, using this package.yaml https://www.irccloud.com/pastebin/88PtXA5Q/package.yaml |
| 06:24:24 | <dsal> | When I run it, it fails like this. I don't know what it's supposed to do, so maybe that's right. heh https://www.irccloud.com/pastebin/n51OSs0Q/test.out |
| 06:25:39 | <dsal> | Oh. ha. dumb |
| 06:26:13 | <dsal> | Well, it's running on its input. I can't quite tell where the `sedInput` is supposed to be used. |
| 06:26:22 | <dzdcnfzd> | That's awesome! |
| 06:26:53 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:28:05 | <dzdcnfzd> | The intent is that test.out is what you get if you run `cat "${sedInput}" | sed -e ${ what you're currently putting in the .out file }` |
| 06:28:07 | <dsal> | I don't quite understand what's going on here well enough, but you probably do, so you can at least see where I got it. |
| 06:28:16 | <dzdcnfzd> | What you wrote is very helpful |
| 06:28:24 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:28:36 | <dsal> | Yeah, I think you just need to make `runSedxAndReplace` do something more sensible. |
| 06:28:54 | <dzdcnfzd> | Basically I have to take that, and rather than piping what you have directly to the outfile, run a `sed` command on the basis of it |
| 06:29:29 | <dzdcnfzd> | Side note: are you manually doing all your imports? |
| 06:29:35 | <dzdcnfzd> | Or do you have a tool? |
| 06:29:48 | <dsal> | I just do imports manually, yeah. |
| 06:29:58 | <dsal> | stylish-haskell lines them up for me. |
| 06:33:37 | <dzdcnfzd> | This awesome |
| 06:33:40 | <dzdcnfzd> | thanks a lot |
| 06:33:49 | <dzdcnfzd> | Your code is also much cleaner than mine, which is cool |
| 06:35:24 | <dsal> | I'm not sure this sed thing actually works. |
| 06:38:03 | <dsal> | -import {ExtraImport, Module1, Module2} from 'root/move/to/some/new/directory/file'; |
| 06:38:03 | <dsal> | +import {ExtraImport, Module1, Module2} from 'root/some/directory/string/file'; |
| 06:38:28 | <dsal> | This is how I'm running it: https://www.irccloud.com/pastebin/bqRX0wdr/runSed.hs |
| 06:39:55 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 06:40:06 | <dsal> | Using https://hackage.haskell.org/package/process-1.6.14.0/docs/System-Process.html#v:readProcess -- which is really `String`y in a not great way, but there's a lot of `String` here. |
| 06:42:24 | → | acidjnk joins (~acidjnk@p200300d0c7068b61ccfdf24993a93a97.dip0.t-ipconnect.de) |
| 06:43:40 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 06:45:04 | <dzdcnfzd> | It should be -E |
| 06:45:06 | <dzdcnfzd> | not -e |
| 06:45:16 | <dzdcnfzd> | I think that might be wrong in the documentation |
| 06:45:39 | <dzdcnfzd> | It took me a long time to figure out why, but basic regexes don't support ? |
| 06:45:57 | <dzdcnfzd> | dsal: I'll convert to bytestrings soon |
| 06:46:20 | <dsal> | I only know the absolute most basic sed. :) |
| 06:46:33 | <dzdcnfzd> | That's why I'm making `sedx` :) |
| 06:46:45 | <dsal> | I changed it to -E and the test fails harder. |
| 06:46:52 | <dzdcnfzd> | !! |
| 06:47:07 | <dsal> | I think we've reached sm's portability concerns. :) |
| 06:48:36 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 06:50:19 | <dzdcnfzd> | Trying to get your test to run myself... |
| 06:52:33 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 06:54:02 | × | HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
| 06:54:29 | → | HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
| 06:55:20 | × | kuribas` quits (~user@d51529C17.access.telenet.be) (Ping timeout: 252 seconds) |
| 06:57:39 | <dsal> | Is it working? This is the complete file. https://www.irccloud.com/pastebin/jb5JxydO/Spec.hs |
| 06:57:49 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 06:58:04 | <dsal> | with: $ ls test/examples/search_and_replace/ -> expected input script.sedx |
| 06:58:26 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 06:58:36 | <dsal> | then just `stack test --file-watch` and edit until things go green. |
| 06:59:00 | <dzdcnfzd> | I haven't gotten it to work quite yet |
| 06:59:17 | <dzdcnfzd> | we have slightly different folder structures |
| 06:59:25 | <dzdcnfzd> | just making it match mine |
| 07:00:12 | <dsal> | Mine's a lot easier to manage. Each test is self-contained. |
| 07:04:04 | <dzdcnfzd> | I see what is happening |
| 07:04:11 | <dzdcnfzd> | Somehow the string escaping is weird |
| 07:04:30 | <dzdcnfzd> | it's adding extra backslashes in front of every backslash |
| 07:05:19 | <dzdcnfzd> | Because it's trying to print it as a haskell string I'm guessing |
| 07:05:28 | <dzdcnfzd> | It's adding its own escape characters |
| 07:06:24 | <dzdcnfzd> | So it's running `sed "-E" "s/import {\\(\\([A-Za-z0-9]*\\(, \\)\\?\\)*\\)}...` instead of `sed "-E" "s/import {\(\([A-Za-z0-9]*\(, \)\?\)*\)}...` |
| 07:06:35 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 07:07:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 07:07:57 | sm | mumbles something petty about existing tools and being done by now |
| 07:10:10 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 07:12:13 | <dzdcnfzd> | Ugh, I know what's happening |
| 07:12:28 | <dsal> | dzdcnfzd: I'd be surprised if the \ didn't make it through clean in the rawcmd. If I change "sed" to "echo" it seems to do what I expect. |
| 07:12:45 | <dzdcnfzd> | I tried the same and you're right. I think it's a weird BSD vs. GNU sed thing |
| 07:13:00 | <dzdcnfzd> | This is exactly why I'm writing this |
| 07:13:11 | <dzdcnfzd> | The regex works on one machine, not on another |
| 07:13:40 | <dzdcnfzd> | Okay. I'm gonna sleep |
| 07:13:44 | <dzdcnfzd> | Thank you very much for the help |
| 07:13:49 | <dzdcnfzd> | It's been extremely helpful |
| 07:13:56 | <dsal> | Oh, the error itself will show the \\ because of how it's being printed in a string in a string. |
| 07:14:03 | <dzdcnfzd> | I'm going to try to get this working tomorrow maybe |
| 07:14:08 | <dzdcnfzd> | Yes, that's exactly right |
| 07:14:15 | <dsal> | But yeah, I should also be asleep. |
| 07:14:20 | <dzdcnfzd> | As a side-note |
| 07:14:28 | <dzdcnfzd> | I tried using free monads for this |
| 07:14:35 | <dsal> | I've never used a free monad. |
| 07:14:39 | <dzdcnfzd> | Just 'cause I thought they were cool. I'm not convinced |
| 07:14:55 | <dzdcnfzd> | I'm not sure I gained much |
| 07:15:26 | <dsal> | I use mtl most of the time. Every time I've tried to do something fancier, it's just been a huge amount of work. |
| 07:17:38 | × | xff0x quits (~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 260 seconds) |
| 07:18:09 | → | chomwitt joins (~chomwitt@2a02:587:dc21:9e00:d416:b93a:7a85:a330) |
| 07:18:10 | <dzdcnfzd> | It works |
| 07:18:12 | <dzdcnfzd> | :) |
| 07:18:25 | <dzdcnfzd> | you need GNU sed |
| 07:18:40 | × | gustik quits (~gustik@2a01:c844:2457:2220:475d:34f:d571:996f) (Quit: Leaving) |
| 07:18:45 | <dzdcnfzd> | next project is adding flags to make it work with BSD sed |
| 07:18:54 | <dzdcnfzd> | and then extended or basic regular expressions |
| 07:18:54 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 07:19:06 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 07:19:40 | → | xff0x joins (~xff0x@om126194002228.10.openmobile.ne.jp) |
| 07:20:17 | <dzdcnfzd> | dsal: test is pushed. Thanks so much! |
| 07:23:17 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 07:26:13 | × | bilegeek quits (~bilegeek@2600:1008:b047:7868:8343:8573:5cc1:560a) (Quit: Leaving) |
| 07:26:35 | <sm> | if you have to add special flags, it's about the same as sed, no ? |
| 07:27:24 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 07:31:00 | → | dostoevsky5 joins (~5c42c5384@user/dostoevsky) |
| 07:31:59 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 07:31:59 | dostoevsky5 | is now known as dostoevsky |
| 07:36:03 | <dzdcnfzd> | sm: the idea is that you tailor your flags to the version of sed |
| 07:36:22 | <dzdcnfzd> | so your flags just specify what version of sed you're producing a string for |
| 07:36:36 | <dzdcnfzd> | You don't have to change your program at all |
| 07:37:13 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 07:37:48 | <dzdcnfzd> | the sedx interpreter reads the same program but changes the regex it produces to match the version of sed you specify |
| 07:39:11 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 07:46:10 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 07:58:12 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Quit: Ping timeout (120 seconds)) |
| 07:58:43 | → | dostoevsky joins (~5c42c5384@user/dostoevsky) |
| 07:59:04 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 07:59:54 | × | xff0x quits (~xff0x@om126194002228.10.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 08:01:12 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 08:03:32 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 08:06:38 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 08:07:13 | → | xff0x joins (~xff0x@b133147.ppp.asahi-net.or.jp) |
| 08:08:26 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:08:56 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:14:07 | → | dostoevsky5 joins (~5c42c5384@user/dostoevsky) |
| 08:15:30 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 08:15:30 | dostoevsky5 | is now known as dostoevsky |
| 08:18:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 08:21:13 | × | acidjnk quits (~acidjnk@p200300d0c7068b61ccfdf24993a93a97.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 08:23:02 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:8f00:4d2d:6b08:61d2:d694) |
| 08:23:54 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 08:30:41 | → | kuribas joins (~user@ptr-17d51ephr5e6kr1ik4l.18120a2.ip6.access.telenet.be) |
| 08:33:29 | → | odnes joins (~odnes@5-203-130-148.pat.nym.cosmote.net) |
| 08:42:10 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 08:42:33 | × | chomwitt quits (~chomwitt@2a02:587:dc21:9e00:d416:b93a:7a85:a330) (Ping timeout: 248 seconds) |
| 08:47:33 | <apache2> | I keep getting this |
| 08:47:42 | <apache2> | • Couldn't match expected type ‘Text’ |
| 08:47:42 | <apache2> | with actual type ‘Data.Text.Internal.Lazy.Text’ |
| 08:47:58 | <apache2> | How do I turn the lazy text into Data.Text? |
| 08:49:08 | <jackdk> | apache2: https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Lazy.html#v:toStrict |
| 08:52:42 | <apache2> | thanks! |
| 08:58:11 | × | dzdcnfzd quits (~dzdcnfzd@pool-108-54-250-165.nycmny.fios.verizon.net) (Quit: Client closed) |
| 09:00:30 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 09:03:55 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 09:05:56 | → | dostoevsky2 joins (~5c42c5384@user/dostoevsky) |
| 09:07:05 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 248 seconds) |
| 09:07:05 | dostoevsky2 | is now known as dostoevsky |
| 09:08:51 | → | acidjnk joins (~acidjnk@p200300d0c7068b617cff31b27765479a.dip0.t-ipconnect.de) |
| 09:19:21 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 248 seconds) |
| 09:25:07 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 09:30:45 | → | shiraeeshi joins (~shiraeesh@109.166.57.239) |
| 09:32:29 | → | xaotuk joins (~sasha@109.245.225.44) |
| 09:42:59 | → | coot joins (~coot@213.134.190.95) |
| 09:45:26 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:48:17 | → | chomwitt joins (~chomwitt@2a02:587:dc21:9e00:e28b:dfc7:bbce:95de) |
| 09:52:08 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 09:59:11 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 10:00:28 | <tomsmeding> | (sounds like you need the inverse, fromStrict, but presumably you already figured that out) |
| 10:01:08 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 10:01:54 | × | shiraeeshi quits (~shiraeesh@109.166.57.239) (Quit: Leaving) |
| 10:05:38 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 10:18:54 | → | Benzi-Junior joins (~BenziJuni@dsl-149-64-179.hive.is) |
| 10:20:31 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 10:25:47 | <RudraveerMandal[> | Can Haskell be used for making smart contracts on Ethereum |
| 10:27:47 | <Rembane> | RudraveerMandal[: It seems so: https://www.programmersought.net/article/325194150.html |
| 10:27:52 | → | dostoevsky9 joins (~5c42c5384@user/dostoevsky) |
| 10:28:23 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 10:29:13 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 10:29:14 | dostoevsky9 | is now known as dostoevsky |
| 10:29:33 | <RudraveerMandal[> | les go |
| 10:30:11 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 10:34:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 10:37:48 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:48:14 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 10:49:23 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 10:50:25 | → | dostoevsky9 joins (~5c42c5384@user/dostoevsky) |
| 10:51:58 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 10:51:58 | dostoevsky9 | is now known as dostoevsky |
| 10:54:02 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:54:47 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
| 10:55:08 | × | chomwitt quits (~chomwitt@2a02:587:dc21:9e00:e28b:dfc7:bbce:95de) (Ping timeout: 252 seconds) |
| 10:56:45 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:58:46 | → | dostoevsky7 joins (~5c42c5384@user/dostoevsky) |
| 11:00:08 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 11:00:09 | dostoevsky7 | is now known as dostoevsky |
| 11:07:50 | × | farn quits (~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505) (Quit: farn) |
| 11:07:59 | → | farn joins (~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505) |
| 11:13:06 | × | Batzy quits (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 11:13:11 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 11:14:08 | → | Batzy joins (~quassel@user/batzy) |
| 11:15:07 | × | elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 240 seconds) |
| 11:15:15 | → | elkcl joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) |
| 11:16:29 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 11:16:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 11:16:50 | → | chomwitt joins (~chomwitt@2a02:587:dc21:9e00:e28b:dfc7:bbce:95de) |
| 11:17:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 11:17:29 | × | odnes quits (~odnes@5-203-130-148.pat.nym.cosmote.net) (Quit: Leaving) |
| 11:17:58 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 260 seconds) |
| 11:20:27 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 11:20:47 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:21:00 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 11:21:50 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 11:21:50 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 11:26:40 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 11:27:21 | × | jmd_ quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 11:27:28 | littlebo1eep | is now known as littlebobeep |
| 11:29:47 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 11:33:22 | AlexNoo_ | is now known as AlexNoo |
| 11:40:59 | × | acidjnk quits (~acidjnk@p200300d0c7068b617cff31b27765479a.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 11:41:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 11:41:55 | × | cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds) |
| 11:43:18 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 11:45:03 | → | cheater joins (~Username@user/cheater) |
| 11:48:47 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 11:54:51 | × | kaskal quits (~kaskal@089144207160.atnat0016.highway.bob.at) (Quit: ZNC - https://znc.in) |
| 11:57:21 | → | kaskal joins (~kaskal@2001:4bb8:2e0:b5bd:e3c0:d71b:f32:84d8) |
| 11:58:28 | → | zincy joins (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) |
| 12:03:02 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 12:07:44 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 12:10:10 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 12:10:19 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 12:10:39 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 12:12:24 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 12:15:00 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 12:18:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 12:20:24 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 12:21:45 | → | dostoevsky2 joins (~5c42c5384@user/dostoevsky) |
| 12:22:59 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 12:22:59 | dostoevsky2 | is now known as dostoevsky |
| 12:24:00 | × | zincy quits (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) (Remote host closed the connection) |
| 12:31:32 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 12:31:47 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 12:35:48 | → | odnes joins (~odnes@5-203-130-148.pat.nym.cosmote.net) |
| 12:37:45 | → | dostoevsky7 joins (~5c42c5384@user/dostoevsky) |
| 12:38:01 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:39:30 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 12:39:30 | dostoevsky7 | is now known as dostoevsky |
| 12:41:56 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 12:42:22 | → | dhil joins (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) |
| 12:46:30 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 240 seconds) |
| 12:48:35 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 12:48:50 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 12:50:18 | → | dostoevsky0 joins (~5c42c5384@user/dostoevsky) |
| 12:51:35 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 12:51:35 | dostoevsky0 | is now known as dostoevsky |
| 12:52:53 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 12:56:49 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:10:44 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:11:48 | → | freemanX joins (~user@118.201.89.106) |
| 13:13:02 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 13:16:41 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 13:20:22 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:22:32 | × | odnes quits (~odnes@5-203-130-148.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 13:22:43 | → | odnes joins (~odnes@5-203-130-148.pat.nym.cosmote.net) |
| 13:29:41 | × | xaotuk quits (~sasha@109.245.225.44) (Ping timeout: 252 seconds) |
| 13:32:33 | × | nehsou^ quits (~nehsou@128-092-160-234.biz.spectrum.com) (Remote host closed the connection) |
| 13:32:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 13:39:07 | → | king_gs joins (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
| 13:40:24 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:41:19 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 13:42:57 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 13:44:33 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.5) |
| 13:51:22 | × | odnes quits (~odnes@5-203-130-148.pat.nym.cosmote.net) (Quit: Leaving) |
| 13:58:49 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 248 seconds) |
| 14:05:14 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 14:08:07 | × | king_gs quits (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Ping timeout: 240 seconds) |
| 14:08:19 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 14:09:29 | × | flupe quits (~baboum@radon.sbi.re) (Ping timeout: 248 seconds) |
| 14:23:10 | × | shailangsa quits (~shailangs@host109-152-9-235.range109-152.btcentralplus.com) () |
| 14:24:18 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 14:24:59 | → | Vajb joins (~Vajb@2001:999:400:9bc1:d5dd:7e53:33b:56) |
| 14:26:17 | → | zebrag joins (~chris@user/zebrag) |
| 14:30:54 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 14:30:55 | Kaipei | is now known as Kaiepi |
| 14:38:31 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 14:41:28 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 14:46:37 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 14:47:59 | × | freemanX quits (~user@118.201.89.106) (Ping timeout: 240 seconds) |
| 14:49:54 | ← | coot parts (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) () |
| 14:51:41 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 14:53:10 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 14:56:59 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 15:00:00 | → | razetime joins (~quassel@117.254.34.170) |
| 15:01:07 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 15:02:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 15:04:02 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:05:23 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:05:31 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 15:09:22 | → | vicfred joins (~vicfred@user/vicfred) |
| 15:09:27 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 15:10:35 | → | vicfred_ joins (~vicfred@user/vicfred) |
| 15:12:24 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Remote host closed the connection) |
| 15:13:09 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:13:50 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 240 seconds) |
| 15:14:25 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 15:14:50 | × | razetime quits (~quassel@117.254.34.170) (Ping timeout: 240 seconds) |
| 15:17:22 | → | sympt joins (~sympt@193.37.33.20) |
| 15:17:46 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 15:18:28 | → | shailangsa joins (~shailangs@host109-152-9-235.range109-152.btcentralplus.com) |
| 15:21:38 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:23:20 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 15:23:48 | × | sympt quits (~sympt@193.37.33.20) (Remote host closed the connection) |
| 15:24:17 | <tomsmeding> | public service announcement for ghcup users: if you aren't running 0.1.17.8 yet and are using --isolate, please upgrade https://www.reddit.com/r/haskell/comments/unl3f4/ann_ghcup_01178_bugfix_release/ |
| 15:25:32 | <hpc> | what's the bug? |
| 15:25:46 | → | sympt joins (~sympt@193.37.33.20) |
| 15:25:55 | <tomsmeding> | if you use --isolate --force and the install fails, then ghcup "cleans up the installation directory" |
| 15:26:13 | <tomsmeding> | (0.1.17.8 doesn't anymore) |
| 15:29:03 | × | sympt quits (~sympt@193.37.33.20) (Remote host closed the connection) |
| 15:31:12 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (Ping timeout: 252 seconds) |
| 15:35:31 | → | razetime joins (~quassel@117.254.35.119) |
| 15:39:08 | → | sympt joins (~sympt@193.37.33.20) |
| 15:45:30 | × | vicfred_ quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 15:46:30 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
| 15:48:44 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 15:49:06 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 15:49:14 | → | Guest7049 joins (~Guest70@91.232.128.162) |
| 15:51:17 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 15:53:27 | → | Topsi joins (~Topsi@95.33.20.255) |
| 15:54:32 | → | dostoevsky0 joins (~5c42c5384@user/dostoevsky) |
| 15:54:45 | × | tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection) |
| 15:55:01 | → | V joins (~v@ircpuzzles/2022/april/winner/V) |
| 15:55:30 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 15:55:30 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 240 seconds) |
| 15:55:31 | dostoevsky0 | is now known as dostoevsky |
| 15:58:57 | → | travisb joins (~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net) |
| 16:00:49 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:00:59 | → | vorpuni joins (~pvorp@2001:861:3881:c690:cb8b:2f67:7218:10ac) |
| 16:01:44 | → | odnes joins (~odnes@2a02:587:e901:3110::88b) |
| 16:01:50 | × | odnes quits (~odnes@2a02:587:e901:3110::88b) (Remote host closed the connection) |
| 16:02:59 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (Quit: We're here. We're queer. Connection reset by peer) |
| 16:03:23 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:03:35 | → | V joins (~v@ircpuzzles/2022/april/winner/V) |
| 16:06:22 | × | Guest7049 quits (~Guest70@91.232.128.162) (Quit: Client closed) |
| 16:13:28 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 16:14:30 | → | dostoevsky7 joins (~5c42c5384@user/dostoevsky) |
| 16:15:56 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 16:15:57 | dostoevsky7 | is now known as dostoevsky |
| 16:16:25 | Frikraaa[m] | is now known as Frido[m] |
| 16:16:49 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 16:18:15 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 16:19:05 | → | hololeap joins (~hololeap@user/hololeap) |
| 16:20:19 | → | alp_ joins (~alp@user/alp) |
| 16:22:07 | → | zer0bitz_ joins (~zer0bitz@2001:2003:f444:8f00:86c:4c1e:64b:5ea1) |
| 16:22:11 | → | Guest44 joins (~Guest44@207.237.194.99) |
| 16:22:19 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 16:23:00 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:8f00:4d2d:6b08:61d2:d694) (Ping timeout: 248 seconds) |
| 16:23:20 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:24:14 | <Guest44> | I'm trying to write a function to calculate the average of a list of integers but cant seem to get it working correctly as my integers aren't being treated as numbers, can someone help debug? |
| 16:24:48 | × | sympt quits (~sympt@193.37.33.20) (Remote host closed the connection) |
| 16:25:14 | <maerwald> | Guest44: can you share your code on https://play-haskell.tomsmeding.com/play |
| 16:26:12 | <Guest44> | done! |
| 16:26:20 | <maerwald> | did you create a paste from it? |
| 16:26:28 | <Guest44> | https://play-haskell.tomsmeding.com/U5agoi8h |
| 16:26:44 | → | jinsun joins (~jinsun@user/jinsun) |
| 16:27:09 | <Guest44> | I'd really like to do something along the lines of `top = (fromIntegral $ sum scores) :: Num` but that gives me a different error |
| 16:27:13 | <maerwald> | Guest44: so the error tells you that a constraint is missing |
| 16:27:20 | <maerwald> | did you try adding that constraint? |
| 16:27:56 | <Guest44> | I can try |
| 16:28:11 | <Guest44> | Is there a reasons fractions are different than numbers? to me it seems like number is a more "general" class |
| 16:28:28 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:28:28 | <tomsmeding> | Guest44: Int is also an instance of Num |
| 16:28:32 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 16:28:47 | <tomsmeding> | and (/) doesn't work on Int, because it's supposed to be fractional division (like float division) |
| 16:29:02 | <tomsmeding> | Guest44: every Fractional is also a Num, but not every Num is a Fractional |
| 16:29:32 | × | jinsun__ quits (~jinsun@user/jinsun) (Ping timeout: 252 seconds) |
| 16:29:45 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 248 seconds) |
| 16:30:08 | <Guest44> | Hm, so what if I wanted to take 3 / 2 = 1.5 |
| 16:30:12 | <tomsmeding> | Num has (+), (-), (*), negate, abs, signum, fromInteger; Fractional has (/), recip, fromRational (see https://hackage.haskell.org/package/base-4.16.1.0/docs/Prelude.html#t:Num and https://hackage.haskell.org/package/base-4.16.1.0/docs/Prelude.html#t:Fractional) |
| 16:30:14 | → | xaotuk joins (~sasha@net151-38-245-109.mbb.telenor.rs) |
| 16:30:23 | <tomsmeding> | > 3 / 2 :: Double |
| 16:30:23 | <Guest44> | 3 and 2 are integers -- does haskell have something like "casting" in other languages? |
| 16:30:26 | <lambdabot> | 1.5 |
| 16:30:28 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:30:33 | <tomsmeding> | Guest44: that casting is precisely the fromIntegral that you already used |
| 16:30:49 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 16:30:49 | <monochrom> | @quote monochrom fromIntegral |
| 16:30:50 | <lambdabot> | monochrom says: You've got an Int / But you want Double / Who do you call? / "fromIntegral!" |
| 16:31:15 | tomsmeding | will try to remember that one |
| 16:31:19 | <Guest44> | Ok that all makes sense |
| 16:31:22 | → | dostoevsky8 joins (~5c42c5384@user/dostoevsky) |
| 16:31:26 | <maerwald> | I'd probably just use Double |
| 16:31:34 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 16:31:43 | <maerwald> | ad-hoc polymorphic result types are annoying |
| 16:32:13 | <maerwald> | https://play-haskell.tomsmeding.com/3V4eqhvf |
| 16:32:37 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:32:56 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 16:32:57 | dostoevsky8 | is now known as dostoevsky |
| 16:35:07 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 16:35:33 | <Guest44> | From a little googling, it seems that `Fractionable` is nearly equivalent to the rational numbers, is `Num` equivalent to the Real Numbers? |
| 16:35:49 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 16:37:26 | <hololeap> | so, I want to use cabal-install-solver in a project, but it only exists in master, not in 3.6 or other branches. this confuses me. maybe I don't understand how people utilize branches in big projects like this, because the "split-off" of cabal-install-solver happened *before* the release of 3.6.2.0 |
| 16:38:41 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:39:02 | <hololeap> | so does the master branch represent experimentation that would not find its way into the 3.6 branch? |
| 16:39:17 | <hololeap> | (sorry if this is a bit OT) |
| 16:39:41 | <c_wraith> | Guest44: Integer is an instance of Num, so that seems unlikely. |
| 16:41:18 | <c_wraith> | Guest44: Num is actually a sort of ring-like thing. It gives you addition and multiplication like a ring, but it also throws in more fiddly things like abs, signum, and fromInteger |
| 16:41:35 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:42:12 | <c_wraith> | Guest44: the numeric type classes weren't designed around mathematical abstractions, really. They were designed around type inference returning sensible results |
| 16:42:57 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 16:43:07 | → | zincy joins (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) |
| 16:44:03 | <hololeap> | there is an implicit OverloadedNumbers extention in base haskell :3 |
| 16:45:46 | <c_wraith> | I mean, the big issue is that inference of law-only classes would require changing the way constraints are inferred entirely. But law-only classes come up all the time in any kind of numeric hierarchy. |
| 16:46:42 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 276 seconds) |
| 16:47:01 | <hololeap> | negate, abs, and signum seem like unnecessary requirements for the class |
| 16:48:51 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 16:49:13 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:49:32 | × | zincy quits (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) (Remote host closed the connection) |
| 16:49:55 | <c_wraith> | In principle, I agree. In practice, splitting those off would result in weird types |
| 16:50:13 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 16:50:42 | <c_wraith> | Num is the only shared interface between Integral and Fractional |
| 16:51:35 | <hololeap> | I'm mostly thinking of what poor ol' Natural does with those ... negate 0 = 0; negate _ = undefined |
| 16:52:12 | <hololeap> | then again, 0 - _ = undefined |
| 16:52:25 | <hololeap> | (except 0, of course) |
| 16:52:35 | <monochrom> | was going to say that, heh |
| 16:53:19 | <c_wraith> | the whole hierarchy is about making it easy to write code at the expense of allowing some nonsense. |
| 16:53:51 | <c_wraith> | :t toRational |
| 16:53:54 | <lambdabot> | Real a => a -> Rational |
| 16:54:06 | <c_wraith> | I can't imagine a more nonsense name for a class than that. |
| 16:54:24 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 16:54:50 | <monochrom> | Consider "Realable" >:) |
| 16:55:21 | <hololeap> | @hackage numeric-prelude -- this is the alternative <:( |
| 16:55:21 | <lambdabot> | https://hackage.haskell.org/package/numeric-prelude -- this is the alternative <:( |
| 16:55:48 | <c_wraith> | exactly |
| 16:57:07 | <hololeap> | but the example of Natural really does highlight how awesome finite-typelits is |
| 16:57:14 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:57:22 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:57:44 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 16:57:49 | <hololeap> | if just for the interface of e.g. packFinite |
| 16:58:54 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 16:58:59 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:59:25 | <hololeap> | they really should have skipped adding a Num instance, although I see the convenience factor |
| 17:03:10 | <hololeap> | weird question about that package: is packFiniteProxy only there to help people using ghc <8.0.1, who don't have access to TypeApplications? I see those "proxy" versions of functions from time to time |
| 17:04:31 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 17:05:40 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 17:07:00 | <hololeap> | I suppose I'm asking people to guess the motivation behind that, but I thought it might be well-known enough |
| 17:08:09 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 17:11:02 | <c_wraith> | numeric-prelude doesn't even provide tools for what I consider to be the biggest problem math-like libraries tend to have. |
| 17:11:22 | <c_wraith> | Or at least I don't see anything for affine spaces in there. |
| 17:13:55 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 17:14:06 | <c_wraith> | (points and vectors are not the same thing. times and durations are not the same thing.) |
| 17:14:50 | × | dhil quits (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) (Ping timeout: 240 seconds) |
| 17:15:52 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:18:20 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 17:19:51 | → | Guest7967 joins (~textual@user/polo) |
| 17:19:58 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:20:17 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:21:30 | <sclv> | hololeap: lots of changes in master did not make it into the 3.6 branch. 3.6.2 was a very conservative set of backports to coincide with a ghc release iirc |
| 17:22:06 | <sclv> | because cabal needs to do releases to support ghc releases, it often has minor releases that do not capture the full state of work that's in the next major release roadmap. |
| 17:22:54 | <sclv> | so its not so much "experimentation" as having a "support branch" (3.6) and master reflects the projected "next major release" (3.8) |
| 17:23:59 | <hololeap> | ok, thanks sclv. that's basically what I meant by "experimentation" |
| 17:24:10 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 17:24:18 | × | merijn quits (~merijn@c-001-001-002.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 17:24:37 | <hololeap> | although that raises the question of why they skip odd-numbered releaases |
| 17:26:02 | <sclv> | its not experimentation in the sense that if its merged into master, it IS projected for release. its just projected for the next major release. |
| 17:26:29 | → | stackdroid18 joins (14094@user/stackdroid) |
| 17:27:04 | <sclv> | skipping odd numbered releases is similar to ghc -- it lets master "between releases" be at an odd number so people can manage using snapshot builds a bit more reasonably. |
| 17:27:49 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 17:27:50 | <sclv> | this is really no different than noticing that there's changes in master in ghc but say a 9.2.3 release would not have them because master tracks projected 9.4 or whatever |
| 17:28:14 | <sclv> | it feels all like pretty standard unexceptional dev practices to me. |
| 17:28:27 | <hololeap> | I'm just not familiar with all of it |
| 17:28:34 | <hololeap> | so thanks for the explaination |
| 17:28:47 | <sclv> | sure, glad to explain! |
| 17:29:50 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 17:29:53 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
| 17:32:01 | → | zincy joins (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) |
| 17:32:56 | Guest7967 | is now known as Polo |
| 17:33:28 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 17:34:53 | × | zincy quits (~zincy@2a00:23c8:970c:4801:18b4:9d3:33e8:26e3) (Remote host closed the connection) |
| 17:35:17 | → | econo joins (uid147250@user/econo) |
| 17:37:13 | × | Polo quits (~textual@user/polo) (Quit: Textual IRC Client: www.textualapp.com) |
| 17:37:39 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 17:41:30 | → | dostoevsky4 joins (~5c42c5384@user/dostoevsky) |
| 17:42:59 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 17:42:59 | dostoevsky4 | is now known as dostoevsky |
| 17:44:39 | → | xkuru joins (~xkuru@user/xkuru) |
| 17:50:04 | → | Polo joins (~Polo@user/polo) |
| 17:54:10 | × | Guest44 quits (~Guest44@207.237.194.99) (Quit: Connection closed) |
| 17:54:11 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 17:57:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 18:01:35 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:05:04 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 18:05:15 | × | Polo quits (~Polo@user/polo) (Quit: Textual IRC Client: www.textualapp.com) |
| 18:09:33 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 18:10:14 | → | jco joins (~jco@90-228-194-139-no542.tbcn.telia.com) |
| 18:12:40 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 18:12:43 | → | dostoevsky9 joins (~5c42c5384@user/dostoevsky) |
| 18:13:54 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 18:13:55 | dostoevsky9 | is now known as dostoevsky |
| 18:15:03 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds) |
| 18:17:03 | → | Polo joins (~Polo@user/polo) |
| 18:17:14 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:19:50 | × | razetime quits (~quassel@117.254.35.119) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 18:20:03 | → | yauhsien joins (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) |
| 18:20:38 | → | merijn joins (~merijn@c-001-001-002.client.esciencecenter.eduvpn.nl) |
| 18:23:10 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 18:23:34 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds) |
| 18:24:10 | × | yauhsien quits (~yauhsien@61-231-24-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 18:25:33 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 18:26:22 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:31:32 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 248 seconds) |
| 18:32:17 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:33:00 | × | raym quits (~raym@user/raym) (Quit: kernel update, rebooting...) |
| 18:33:58 | × | Polo quits (~Polo@user/polo) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:38:04 | → | raym joins (~raym@user/raym) |
| 18:38:30 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 18:39:01 | × | Vajb quits (~Vajb@2001:999:400:9bc1:d5dd:7e53:33b:56) (Read error: Connection reset by peer) |
| 18:39:19 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:39:48 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 18:41:08 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 18:43:10 | <tomsmeding> | is it correct that one cannot actually use text-2.0 yet with any released ghc version? |
| 18:43:26 | <maerwald> | no |
| 18:44:08 | <tomsmeding> | :( |
| 18:44:20 | <maerwald> | I mean, it's not correct |
| 18:44:30 | <tomsmeding> | o |
| 18:45:12 | <maerwald> | it's just that cabal prefers the versions that GHC ships with... but it can upgrade too. That only creates problems in some cases |
| 18:45:19 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 18:45:42 | <tomsmeding> | oh apparently I needed 'cabal clean'? |
| 18:46:23 | <tomsmeding> | oh a dep also doesn't support text 2.0, rip |
| 18:46:39 | <maerwald> | the fix is usually easy |
| 18:47:24 | <tomsmeding> | did anything change semantics in text-2.0? As in, if a package compiles with both, does it do the same thing with both? |
| 18:47:43 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds) |
| 18:47:46 | <maerwald> | I'd say yes |
| 18:47:59 | <tomsmeding> | right, then it's not worth my time trying currently :p |
| 18:48:16 | <maerwald> | behavior should be the same, except for that vulnerability |
| 18:48:56 | <tomsmeding> | man I should ask my questions less ambiguously |
| 18:49:06 | <tomsmeding> | thanks I'm going to try rebuilding |
| 18:49:07 | <maerwald> | err, scratch that |
| 18:49:16 | <maerwald> | vulnerability was in aeson :D |
| 18:49:22 | tomsmeding | was already slightly confused |
| 18:49:23 | <tomsmeding> | yes ;) |
| 18:49:35 | <maerwald> | text only changed internal API |
| 18:49:48 | <tomsmeding> | 'constraints: text ==2.0 ; allow-newer: text' here we go |
| 18:50:05 | <tomsmeding> | oh not constraints apparently? |
| 18:50:10 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:50:23 | <maerwald> | but if one of your dependency depends on internal modules, allow-newer might not be safe |
| 18:50:25 | <tomsmeding> | oh it is, I just can't type |
| 18:50:59 | <tomsmeding> | because semantics changed for internal modules? |
| 18:51:14 | <tomsmeding> | I think it's likely that stuff in the snap ecosystem depends on internal text stuff |
| 18:51:16 | <geekosaur> | the internal storage format changed from utf16 to utf8 |
| 18:51:24 | → | dostoevsky2 joins (~5c42c5384@user/dostoevsky) |
| 18:51:26 | <tomsmeding> | geekosaur: that's precisely why I wanted to upgrade |
| 18:51:38 | <geekosaur> | something like text-icu that probably dug into the internals for performance will probably fail |
| 18:51:49 | <tomsmeding> | question is, will stuff that changes semantics now give a type error, or is upgrading unsafe |
| 18:51:53 | <geekosaur> | (icu uses utf16 by default) |
| 18:52:10 | <geekosaur> | that I don't know |
| 18:52:35 | <maerwald> | tomsmeding: no |
| 18:52:42 | <maerwald> | the Text type did not change |
| 18:52:49 | <geekosaur> | thing is, for performance they probably use something like ByteArray# and ghc doesn't provide a SixteenBitWordArray# |
| 18:53:01 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 18:53:01 | dostoevsky2 | is now known as dostoevsky |
| 18:53:20 | × | jco quits (~jco@90-228-194-139-no542.tbcn.telia.com) (Remote host closed the connection) |
| 18:53:23 | <tomsmeding> | ah right, so if anything manipulated the underlying ByteArray# it's going to break |
| 18:53:30 | <tomsmeding> | thanks both, that settles the issue :) |
| 18:53:32 | <maerwald> | they changed the constructor though |
| 18:53:42 | <maerwald> | but that's not a safe enough bet |
| 18:53:48 | <maerwald> | *constructor name |
| 18:54:49 | <tomsmeding> | yeah, not going to risk it |
| 18:55:17 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 252 seconds) |
| 18:55:39 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 240 seconds) |
| 18:56:05 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 18:56:14 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4) |
| 19:01:10 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 19:03:42 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:04:59 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 19:05:28 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 19:05:50 | → | Guest4496 joins (~Guest44@207.237.194.99) |
| 19:06:06 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:10:01 | → | pavonia joins (~user@user/siracusa) |
| 19:13:05 | <Guest4496> | How does haskell know that `map . map func inputs` should be interpreted as `map (map func) inputs` instead of throwing errors? As a human, I interpret this along the lines of `map( map ( func (inputs)))` (Makes no sense -- map needs two arguments!) or `map(map func inputs)` (Makes no sense -- first argument to outer map must be a function |
| 19:13:05 | <Guest4496> | instead of a value) |
| 19:13:28 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 248 seconds) |
| 19:13:37 | <tomsmeding> | `map . map func inputs` means `\x -> map (map func inputs x)` |
| 19:14:00 | <tomsmeding> | `f . g = \x -> f (g x)` |
| 19:14:05 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:14:18 | <tomsmeding> | so it's _not_ interpreted as `map (map func) inputs` |
| 19:14:35 | <EvanR> | all this relies on map func inputs resulting in a function |
| 19:14:45 | <EvanR> | which is possible |
| 19:14:52 | <EvanR> | wait |
| 19:15:09 | <tomsmeding> | still not the same as the interpretation that Guest4496 stated that it would be :p |
| 19:15:37 | <EvanR> | map func inputs is necessarily a list |
| 19:15:57 | <tomsmeding> | :t \func inputs -> map . map func inputs |
| 19:15:58 | <lambdabot> | error: |
| 19:15:59 | <lambdabot> | • Couldn't match expected type ‘a1 -> a2 -> b1’ |
| 19:15:59 | <lambdabot> | with actual type ‘[b]’ |
| 19:16:23 | <tomsmeding> | Guest4496: that code snippet can never ever typecheck with the standard `(.)` and `map` |
| 19:16:42 | <tomsmeding> | Guest4496: are you very sure that the (.) is not really ($)? |
| 19:17:44 | <EvanR> | map . map func inputs is problematic if . is . or $ |
| 19:17:56 | <tomsmeding> | oh fair point |
| 19:18:32 | <Guest4496> | Ah, In my interpreter I defined `m2d = map . map` and just replaced them whereas really it gets replaced as `(map . map) func inputs` |
| 19:18:38 | <EvanR> | which is good, the more random things that can be typed which are accepted, the harder it is to stop nonsense |
| 19:18:58 | <tomsmeding> | Guest4496: yes, function application binds tighter than infix operators :) |
| 19:19:22 | <tomsmeding> | map . map x y = map . (map x y) != (map . map) x y |
| 19:20:20 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds) |
| 19:20:54 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:21:20 | <EvanR> | map . map x y = ((map) . ((map x) y)) |
| 19:21:22 | <EvanR> | clear? xD |
| 19:22:00 | → | gpncarl joins (~gpncarl@120.244.220.69) |
| 19:23:02 | <tomsmeding> | why is there not a way to encode a lazy bytestring to an aeson Encoding _without_ going via a full strict bytestring |
| 19:25:34 | <tomsmeding> | you can fold over the chunks in a lazy bytestring and encode those piece by piece into strict Texts, which you can encode into aeson Encodings one by one, but the one function that is missing is Data.Aeson.Encoding.Builder.unquoted https://hackage.haskell.org/package/aeson-2.0.3.0/docs/src/Data.Aeson.Encoding.Builder.html#text |
| 19:25:42 | <tomsmeding> | it exists but it isn't exported |
| 19:26:10 | × | gpncarl quits (~gpncarl@120.244.220.69) (Ping timeout: 240 seconds) |
| 19:26:14 | <tomsmeding> | and from a quoted builder you can't strip the quotes without rendering it first |
| 19:26:31 | <tomsmeding> | though hm, rendering those chunks should be cheap |
| 19:28:15 | <EvanR> | I see a lazyText to Encoding |
| 19:28:49 | <EvanR> | curious how lazy bytestring is coming up in json |
| 19:28:54 | <EvanR> | rather, bytestring |
| 19:29:10 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
| 19:29:18 | <tomsmeding> | I have output of a process as a bytestring and I want to put that in a json string |
| 19:29:24 | <tomsmeding> | s/bytestring/lazy bytestring/ |
| 19:29:30 | <EvanR> | well json is text... |
| 19:29:45 | <EvanR> | were you encoding the bytestring somehow |
| 19:29:56 | <tomsmeding> | it's going to be presented to the user as text in the end anyway, so I don't mind if non-utf8 stuff gets replaced with U+FFFD |
| 19:30:02 | <tomsmeding> | yeah utf8 |
| 19:30:21 | <tomsmeding> | this is the playground :p |
| 19:30:21 | <EvanR> | convert lazy bytestring to lazy text then? xD |
| 19:30:32 | <EvanR> | before converting to Encoding |
| 19:30:35 | <tomsmeding> | you make a very good point |
| 19:31:11 | <tomsmeding> | oooooh Data.Text.Lazy.Encoding TIL |
| 19:32:00 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds) |
| 19:33:44 | <EvanR> | decodeUtf8 Decode a ByteString containing UTF-8 encoded text that is known to be valid. |
| 19:34:03 | <tomsmeding> | yeah I'm going to decodeUtf8With lenientDecode |
| 19:34:16 | <EvanR> | screams "and this is where the program will crash because it can" |
| 19:34:42 | <tomsmeding> | :p |
| 19:35:02 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 19:36:33 | <tomsmeding> | okay this saves like 3 internal imports and a bunch of weird bytestring chunking code |
| 19:36:36 | <tomsmeding> | EvanR++ |
| 19:36:41 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:36:57 | → | abiss27 joins (~abiss27@user/abiss) |
| 19:37:17 | <tomsmeding> | still it's almost more imports than code :p https://paste.tomsmeding.com/dxn0cEcX |
| 19:39:16 | <EvanR> | more imports than code |
| 19:39:25 | <EvanR> | a t-shirtable moment |
| 19:39:53 | <tomsmeding> | if you remove all the empty lines it's an equal number of lines |
| 19:40:17 | <tomsmeding> | it's a pity it's hard to get more language extensions than code |
| 19:40:22 | <tomsmeding> | but sometimes I try hard |
| 19:41:58 | <EvanR> | alternate preludes are doing it backwards |
| 19:42:12 | <EvanR> | we need something to increase imports |
| 19:43:33 | <EvanR> | like an extension where you can only use the imported thing once, after that you gotta import another |
| 19:43:48 | <tomsmeding> | lol |
| 19:43:55 | <tomsmeding> | linear imports |
| 19:44:18 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds) |
| 19:44:24 | <tomsmeding> | "Be sparing with your library usage. Use -XLinearImports." |
| 19:45:15 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 19:46:49 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
| 19:48:12 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 19:48:45 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:49:16 | → | dostoevsky1 joins (~5c42c5384@user/dostoevsky) |
| 19:50:28 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Ping timeout: 248 seconds) |
| 19:50:28 | dostoevsky1 | is now known as dostoevsky |
| 19:50:40 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 19:51:59 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:52:31 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 19:55:47 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 19:56:18 | <EvanR> | if somehow that speeds up linking, it might be worth it |
| 19:56:48 | <tomsmeding> | lol don't think so, linking happens much later |
| 19:56:51 | <tomsmeding> | EvanR: are you on windows |
| 19:57:07 | <EvanR> | no, windows is in cold storage |
| 19:57:27 | <tomsmeding> | was just guessing because link time on windows is _particularly_ bad |
| 19:57:32 | <EvanR> | oof |
| 19:57:44 | <tomsmeding> | I've seen hello world take 8secs to link |
| 19:57:49 | <tomsmeding> | on students' laptops |
| 19:58:21 | <tomsmeding> | though I later realised that the culprit might be the virus scanner -- but then still, people use those things and you can't just disable them |
| 19:58:34 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 19:59:32 | <geekosaur> | reportedly things improve a bit with lld, which will be part of the new windows toolchain (I think that's coming with 9.4) |
| 20:00:00 | <tomsmeding> | probably not in time for september :p |
| 20:00:39 | <tomsmeding> | or if 9.4 drops before then, perhaps it won't be quite mature enough to throw in front of a bunch of students yet |
| 20:01:07 | × | kuribas quits (~user@ptr-17d51ephr5e6kr1ik4l.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 20:03:30 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds) |
| 20:07:02 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 20:07:07 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:13:07 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:22:02 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:25:05 | → | Polo joins (~Polo@user/polo) |
| 20:26:12 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:26:35 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 20:27:10 | → | Guest|82 joins (~Guest|82@apn-31-0-50-47.dynamic.gprs.plus.pl) |
| 20:27:44 | × | Guest|82 quits (~Guest|82@apn-31-0-50-47.dynamic.gprs.plus.pl) (Client Quit) |
| 20:29:30 | × | Philonous quits (~Philonous@user/philonous) (Quit: ZNC - https://znc.in) |
| 20:30:00 | → | Philonous joins (~Philonous@user/philonous) |
| 20:35:42 | → | acidjnk joins (~acidjnk@p200300d0c7068b617cff31b27765479a.dip0.t-ipconnect.de) |
| 20:36:18 | → | michalz joins (~michalz@185.246.204.122) |
| 20:39:05 | × | Polo quits (~Polo@user/polo) (Ping timeout: 260 seconds) |
| 20:41:24 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 20:41:27 | → | Polo joins (~Polo@user/polo) |
| 20:41:51 | → | dostoevsky1 joins (~5c42c5384@user/dostoevsky) |
| 20:42:47 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 20:42:47 | dostoevsky1 | is now known as dostoevsky |
| 20:43:58 | → | roconnor joins (~roconnor@coq/roconnor) |
| 20:44:13 | <roconnor> | How can I get Tasty to run tests concurrently? |
| 20:45:39 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:48:07 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:52:30 | × | acidjnk quits (~acidjnk@p200300d0c7068b617cff31b27765479a.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 20:52:37 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 20:52:47 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 20:56:52 | → | acidjnk joins (~acidjnk@p200300d0c7068b6181b67b31768892e9.dip0.t-ipconnect.de) |
| 20:57:07 | × | Polo quits (~Polo@user/polo) (Ping timeout: 240 seconds) |
| 21:01:14 | <byorgey> | roconnor: should just be as simple as +RTS -N8 or whatever. If you're running the test suite via e.g. stack, you can do something like --test-arguments '+RTS -N8 -RTS' |
| 21:05:59 | → | Polo joins (~Polo@user/polo) |
| 21:06:32 | × | Polo quits (~Polo@user/polo) (Client Quit) |
| 21:08:22 | × | Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Read error: Connection reset by peer) |
| 21:08:42 | <roconnor> | oh, that seems good. |
| 21:08:55 | <kronicma1> | anyone know how to configure which ghc stack uses when system-ghc is enabled? it keeps using the one I have in /usr/bin instead of the one in ~/.ghcup/bin that I want it to use |
| 21:09:04 | <roconnor> | byorgey: what if I'm running cabal test? |
| 21:09:21 | <maerwald> | kronicma1: check your $PATH variable |
| 21:09:39 | <kronicma1> | .ghcup/bin comes before /usr/bin in my path |
| 21:10:20 | <maerwald> | kronicma1: do both paths provide the same version? |
| 21:10:25 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 21:10:40 | <kronicma1> | yes, but one is the arch linux install which has the dumb dynamic linking thing |
| 21:10:46 | <kronicma1> | hence why I want .ghcup/bin's ghc |
| 21:11:00 | <maerwald> | I'v pretty sure stack looks in PATH from left to right |
| 21:11:08 | <kronicma1> | apparently not |
| 21:11:25 | <maerwald> | would need more proof |
| 21:11:47 | <maerwald> | e.g. maybe ~/.ghcup/bin/ghc is broken |
| 21:11:49 | <maerwald> | or doesn't exist |
| 21:14:29 | <maerwald> | stack runs ghc: https://github.com/commercialhaskell/stack/blob/b9f1c21ed108d52e8e5919fc86c435726704746e/src/Stack/Setup.hs#L709-L829 |
| 21:14:37 | <maerwald> | when trying to find a suitable compiler |
| 21:14:45 | <maerwald> | and then just tries the next one |
| 21:14:50 | <kronicma1> | maerwald: thanks for the help! turns out .ghcup/bin/ghc was actually a different version after all |
| 21:14:58 | <kronicma1> | just had to set the appropriate version in ghcup and it worked |
| 21:14:59 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 21:15:09 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 21:22:35 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 21:22:48 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 21:26:11 | × | Katarushisu quits (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
| 21:27:35 | → | Katarushisu joins (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
| 21:30:23 | × | michalz quits (~michalz@185.246.204.122) (Remote host closed the connection) |
| 21:35:05 | × | merijn quits (~merijn@c-001-001-002.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 21:42:22 | → | dostoevsky3 joins (~5c42c5384@user/dostoevsky) |
| 21:43:31 | × | dostoevsky quits (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
| 21:43:31 | dostoevsky3 | is now known as dostoevsky |
| 21:52:58 | → | Guest57 joins (~Guest57@69-174-160-103.iplwin75.metronetinc.net) |
| 21:55:43 | → | Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) |
| 21:56:57 | <Guest57> | Would findSum :: (Eq a, Num a) => a -> [a] -> (a, a) |
| 21:56:57 | <Guest57> | findSum n [x, y] = if (x + y) == n then (x, y) else (0, 0) |
| 21:56:58 | <Guest57> | findSum n (x:y:xs) = if (x + y) == n then (x, y) else findSum n (x:xs) |
| 21:57:34 | <Guest57> | be a good solution to the problem of taking a number and checking if that number is a result of any sums of numbers in a list? |
| 21:58:11 | × | tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving) |
| 21:59:22 | <EvanR> | a list comprehension which generates all (half, ish) pairs would simplify it |
| 21:59:46 | <Guest57> | oh okay |
| 21:59:47 | <Guest57> | thanks |
| 22:00:24 | → | sympt joins (~sympt@193.37.33.20) |
| 22:00:38 | <pavonia> | Also you shouldn't return (0, 0) if there is not solution. Use a result type like Maybe (a, a) instead |
| 22:01:02 | <dolio> | That doesn't look like it checks all sums. |
| 22:01:27 | <EvanR> | that too |
| 22:02:42 | <dolio> | It looks like `findSum n (x:xs) = any (== m) xs where m = n - x` |
| 22:02:47 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 22:03:04 | → | tcard joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) |
| 22:03:08 | <dolio> | At least, for an equivalent of whether the list contains the number. |
| 22:03:41 | <dolio> | The result being `(x, n-x)` |
| 22:06:19 | → | flinner joins (~flinner@user/flinner) |
| 22:07:14 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:14:45 | × | acidjnk quits (~acidjnk@p200300d0c7068b6181b67b31768892e9.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 22:18:04 | → | hololeap joins (~hololeap@user/hololeap) |
| 22:19:46 | → | alx741 joins (~alx741@host-181-198-243-150.netlife.ec) |
| 22:23:11 | → | yauhsien joins (~yauhsien@61-231-42-187.dynamic-ip.hinet.net) |
| 22:24:42 | × | zer0bitz_ quits (~zer0bitz@2001:2003:f444:8f00:86c:4c1e:64b:5ea1) (Read error: Connection reset by peer) |
| 22:24:57 | × | alx741 quits (~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 248 seconds) |
| 22:27:27 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 22:27:36 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 22:27:37 | × | yauhsien quits (~yauhsien@61-231-42-187.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 22:27:39 | × | vorpuni quits (~pvorp@2001:861:3881:c690:cb8b:2f67:7218:10ac) (Remote host closed the connection) |
| 22:30:17 | × | chomwitt quits (~chomwitt@2a02:587:dc21:9e00:e28b:dfc7:bbce:95de) (Ping timeout: 248 seconds) |
| 22:31:08 | → | merijn joins (~merijn@c-001-001-002.client.esciencecenter.eduvpn.nl) |
| 22:34:31 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:36:48 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 22:48:01 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 22:54:20 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:57:57 | × | alp_ quits (~alp@user/alp) (Remote host closed the connection) |
| 22:58:19 | → | alp_ joins (~alp@user/alp) |
| 23:00:22 | × | kaph_ quits (~kaph@net-2-42-128-205.cust.vodafonedsl.it) (Remote host closed the connection) |
| 23:00:41 | → | kaph_ joins (~kaph@net-2-42-128-205.cust.vodafonedsl.it) |
| 23:00:56 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:01:35 | × | kraftwerk28 quits (~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in) |
| 23:01:49 | → | kraftwerk28_ joins (~kraftwerk@178.62.210.83) |
| 23:10:01 | → | jargon joins (~jargon@174-22-206-112.phnx.qwest.net) |
| 23:10:26 | → | king_gs joins (~Thunderbi@187.201.105.54) |
| 23:10:43 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 23:13:05 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:13:11 | → | causal joins (~user@50.35.83.177) |
| 23:23:31 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 23:29:13 | × | king_gs quits (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
| 23:31:06 | → | king_gs joins (~Thunderbi@187.201.105.54) |
| 23:31:48 | × | xaotuk quits (~sasha@net151-38-245-109.mbb.telenor.rs) (Ping timeout: 260 seconds) |
| 23:32:04 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 23:44:21 | → | gnyeki_ joins (~gnyeki@li578-216.members.linode.com) |
| 23:44:21 | × | gnyeki quits (~gnyeki@user/gnyeki) (Quit: Reconnecting) |
| 23:44:21 | × | gnyeki_ quits (~gnyeki@li578-216.members.linode.com) (Changing host) |
| 23:44:21 | → | gnyeki_ joins (~gnyeki@user/gnyeki) |
| 23:44:21 | gnyeki_ | is now known as gnyeki |
| 23:50:45 | × | travisb quits (~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection) |
| 23:51:13 | → | travisb joins (~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net) |
| 23:52:48 | <Guest57> | dolio I've modified my code to check all combinations, but now I'm unsure of how to display the correct tuple. `findSums :: Integer -> [Integer] -> [Bool] |
| 23:52:49 | <Guest57> | findSums n list = map (==n) tupleList |
| 23:52:49 | <Guest57> | where tupleList = map tupleAdd (tupleCombinations list list) |
| 23:52:50 | <Guest57> | -- first list counts every combination the front number has with every other number |
| 23:52:50 | <Guest57> | -- second list makes sure that every number is tried |
| 23:52:51 | <Guest57> | tupleCombinations :: [a] -> [a] -> [(a, a)] |
| 23:52:51 | <Guest57> | tupleCombinations [a, b] [a2, b2] = (a, b) : [] |
| 23:52:52 | <Guest57> | tupleCombinations [a, b] (x:y:ys) = (a, b) : tupleCombinations (y:ys) (y:ys) |
| 23:52:52 | <Guest57> | tupleCombinations (x:y:ys) list = (x, y) : tupleCombinations (x:ys) list |
| 23:52:53 | <Guest57> | tupleAdd :: (Integer, Integer) -> Integer |
| 23:52:53 | <Guest57> | tupleAdd (x, y) = x + y |
All times are in UTC on 2022-05-14.