Home freenode/#haskell: Logs Calendar

Logs on 2021-04-07 (freenode/#haskell)

00:01:06 <ADG1089> on another note, i am writing a do notation, how can i return if the output of a monadic computation is 0?
00:01:28 <Axman6> we're going to need more information than that
00:01:39 <ADG1089> something like `{do; x<-getVal :: IO Int; if x == 0 then return else continue}
00:01:47 <monochrom> "return 0"? I don't understand the question.
00:01:57 <ADG1089> :t guard
00:01:58 <lambdabot> Alternative f => Bool -> f ()
00:02:00 <Axman6> what value do you want to rerturn?
00:02:07 <Axman6> return*
00:02:16 <monochrom> OK, high probability that "return ()" is what you want.
00:02:53 <ADG1089> If x is 0 I want to return () otherwise >>= the next steps
00:03:13 <Axman6> you can literally do x <- foo; if x == 0 then return () else do ...
00:03:14 <dibblego> unless (x == 0) nextSteps
00:03:24 <monochrom> If I know the type of "continue", I can give a 100%-certainty answer.
00:03:31 × Tario quits (~Tario@199.58.83.9) (Read error: Connection reset by peer)
00:04:06 Tario joins (~Tario@201.192.165.173)
00:04:53 <monochrom> "unless" is in Control.Monad if you like it.
00:05:22 <monochrom> But it's just a canned version of "if ... then return () else ..."
00:08:16 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
00:09:28 × CMCDragonkai2 quits (~Thunderbi@120.17.224.123) (Ping timeout: 268 seconds)
00:09:31 × ADG1089 quits (~aditya@122.163.139.43) (Remote host closed the connection)
00:11:36 × usr25 quits (~usr25@unaffiliated/usr25) (Read error: Connection reset by peer)
00:14:55 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
00:17:36 renzhi joins (~renzhi@2607:fa49:653f:a800::4223)
00:20:02 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
00:20:04 × mrchampion quits (~mrchampio@38.18.109.23) (Read error: Connection reset by peer)
00:21:37 <pie_> whats the current way to interface haskell and python?
00:22:35 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-bmhbjzvaxfjgfshr) (Quit: Connection closed for inactivity)
00:23:37 mrchampion joins (~mrchampio@38.18.109.23)
00:23:43 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
00:23:45 × Guest96189 quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 260 seconds)
00:24:30 × aerona quits (~aerona@2600:6c54:4600:f300:17d9:d4ff:325b:67dc) (Quit: Leaving)
00:25:08 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
00:25:39 × zebrag quits (~inkbottle@aaubervilliers-651-1-244-162.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
00:26:01 zebrag joins (~inkbottle@aaubervilliers-651-1-244-162.w83-200.abo.wanadoo.fr)
00:26:06 <pie_> ok this looks recent enough https://libredd.it/r/haskell/comments/ec81iq/best_way_to_call_python_36_code_from_from_haskell/
00:26:14 <pie_> though thatts in the other direction
00:26:42 <Axman6> not sure there is a particularly well known solution for doing that
00:27:36 Codaraxis_ joins (~Codaraxis@141.98.255.144)
00:29:15 <pie_> *nod*
00:29:21 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
00:29:49 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Ping timeout: 268 seconds)
00:32:32 zaquest joins (~notzaques@5.128.210.178)
00:33:06 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
00:40:07 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 265 seconds)
00:40:45 × mmmattyx quits (uid17782@gateway/web/irccloud.com/x-kuttqhjrmgrkynne) (Quit: Connection closed for inactivity)
00:40:59 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Remote host closed the connection)
00:44:49 × Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Quit: ლ(ಠ益ಠლ) .:. <Ashley> my porn is hidden in a folder called "BBC Micro Emulator")
00:46:03 × acidjnk_new quits (~acidjnk@p200300d0c72b9510b1ed14260384c0cf.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
00:46:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:48:08 rajivr joins (uid269651@gateway/web/irccloud.com/x-bfdpumpohvpxzdht)
00:51:05 × Techcable quits (~Techcable@168.235.93.147) (Quit: ZNC - https://znc.in)
00:51:26 × viluon quits (uid453725@gateway/web/irccloud.com/x-vxyigueamtfqricd) (Quit: Connection closed for inactivity)
00:55:49 Techcable joins (~Techcable@168.235.93.147)
01:00:55 solvr joins (57e3c46d@87.227.196.109)
01:06:34 drbean_ joins (~drbean@TC210-63-209-95.static.apol.com.tw)
01:07:38 <solvr> "Almost all classical data structures require mutability, and for a good reason - it gives us far cheaper resource use than destroy-and-create does. [...] Purely functional data structures are really cool, but they're cool like a dancing bear is cool. I.e. it's not impressive that the bear dances well, but the fact the bear dances at all."
01:08:52 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:09:19 vicfred joins (vicfred@gateway/vpn/mullvad/vicfred)
01:10:57 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:12:03 whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:12:53 <wrunt> nonsense
01:13:17 <wrunt> purely functional data structures don't require destroy-and-create
01:13:41 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
01:13:43 <Axman6> yeah that's complete nonsense, particularly in the concurrent world we live in. mutation makes concurrency extremely difficult
01:14:00 <dibblego> More importantly, why is that nonsense here in this channel?
01:15:56 <Axman6> need to share a hashmap between any number of threads which may all read and write arbitrarily? IORef (HashMap Key Value) is infinitely easier to reason about than HashTable Key Value which uses mutation, with the former being able to produce arbitrarily complex, consistent mutations whith the latter making that almost impossible without resorting to locks
01:16:00 <pjb> wrunt: the destroy is in the garbage collector.
01:16:19 <solvr> Don't functional data structures require destroy and create.
01:16:35 <Axman6> no
01:17:08 <dibblego> mutable data structures do though
01:17:17 <pjb> Immutability renders array virtually useless. Most sophisticated algorithms are designed arround array and array mutation. Basically you can take all Knuth and throw it to the trash can with purely functional programming languages…
01:17:27 <Axman6> and the fact they do not makes them infinitely more usable, you can efficiently retain the entire history of a structure with the only extra allocations being the minimal difference between each version. this comes for free
01:18:45 <solvr> Yes it's for free. Except the part where it's not "free" in terms of memory or CPU resources /s
01:18:50 <Axman6> to get that sort of behaviour with mutable structures, you have to work very hard to store all the modifications and have a way to run them in reverse. for us, an undo tree of changes to some state is just [SomeState]
01:18:56 <pjb> minimal differences doesn't improve things: you still have to either copy all the rest, or shadow the data structure behind a O(n) chain of differences.
01:19:38 <Axman6> pjb: not sure what you mean, consequtive versions of the structure will share the majority of their structure
01:19:43 <pjb> And even if O(log32(n)) is good enough for must uses, it still is not O(1)…
01:20:10 <solvr> Axman6, regarding the "concurrent world we live in". Having lots of shared state between concurrent structures is actually a poor factoring.
01:20:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
01:20:25 <Axman6> but also some necessary
01:20:47 <Axman6> usually the solution it so push that sharing into an even more complex system, like a database
01:21:02 <dibblego> I swear this discussion was had 20 years ago, everyone learned, and we all moved on.
01:21:11 pie_ is learning
01:21:35 × xff0x quits (~xff0x@2001:1a81:5274:b300:73fd:d48e:9253:e66b) (Ping timeout: 260 seconds)
01:22:12 <solvr> dibblego, we didn't learn a thing.
01:22:40 <solvr> dibblego, if we had, we'd probably be using Erlang offshoots now, which combine OOP and FP into a single system, more or less
01:23:11 xff0x joins (~xff0x@2001:1a81:52ae:6200:6f5d:6ce6:85f6:1960)
01:24:14 <Axman6> there was a paper ages ago, I thing written by SPJ et al. which looked at the implementation of lock free structures and compared their performance. The highest performance implementation ended up being an immutable structure wrapped by an IORef, because all updates ended up being an atomic compare and swap, and the evaluation of the changes could be shared between all threads trivially
01:25:14 <dibblego> yeah that bit disappoints me, the not learning thing
01:25:16 <solvr> Axman6, performance can only be judged in context. So I'm not sure "highest performance" tells us a lot without context.
01:25:23 <dibblego> Axman6: there were also papers before that
01:25:39 <Axman6> solvr: read the paper then
01:25:52 <solvr> Axman6, you didn't even link a paper :)
01:25:56 × stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds)
01:26:27 Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net)
01:27:10 <dibblego> better than read a paper: write a JIT hotspot compiler, then come tell me about the performance improvements from all those mutable data structures
01:27:12 <Axman6> I think it was https://simonmar.github.io/bib/papers/concurrent-data.pdf
01:27:14 <solvr> Axman6, highest performing algorithms are often about choosing boundaries between shared and non-shared state, including across threads.
01:27:46 <solvr> Axman6, so imagining a world where everything is shared between threads is just an artificial restriction that's already way worse than what's possible
01:28:04 <Axman6> I never claimed that is a world we should imagine
01:28:32 <solvr> Axman6, sure but we do keep coming back to things like sharing state, lock-free structures and so on
01:28:36 <solvr> All of this is about shared state
01:28:37 <Axman6> but sharing between threads is often a very natural way to build concurrent apps which can reduce resource usage
01:29:37 <solvr> Axman6, it's not very natural. Encapsulation and message-passing is even more natural, I'd argue. Like you and me now, in this chat. We're not sharing a lock-free brain. We're exchanging messages and keeping our state local.
01:30:11 <Axman6> so you trhing that a web server which supports caching should have every thread maintain its own cache?
01:30:59 <solvr> I think that's a very specific statement, without context. So I can't tell what this hypothetical server should do. But some of its cache would be local yes.
01:31:20 <solvr> You CPU also has lots of cache that's device local, CPU local, core local, and so on
01:31:28 <solvr> It's like a tree.
01:31:33 <Axman6> to each thread? why not share the cache between all threads? the
01:31:41 <Axman6> I am very aware of that
01:31:48 × renzhi quits (~renzhi@2607:fa49:653f:a800::4223) (Ping timeout: 246 seconds)
01:31:57 <solvr> Well ask yourself why.
01:33:17 <Axman6> much of my major at university was in high performance computing... I understand the affects of caches and memory hierarchies
01:33:48 <Axman6> anyway, do you have some argument you're trying to make or just troll? You've come in here making controvercial, demonstratably false claims, did you have a point to make?
01:34:37 <solvr> Axman6 it wasn't my statement, it was Brian Goetz in this talk:
01:34:38 <solvr> https://www.youtube.com/watch?v=HSk5fdKbd3o
01:34:51 <solvr> Where he actually points out OOP+FP are quite complementary
01:34:51 <Axman6> controversial*
01:35:53 <solvr> I think it's a good talk, and he mentions Erlang as a mental model a few times.
01:35:58 <solvr> It's a great mental model IMHO.
01:36:24 <solvr> FP excels in closed systems. OOP is better as the metaphor between those closed systems
01:36:53 <solvr> Do we need threads in a closed system... sure. Not always, but sure.
01:36:59 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
01:37:02 <solvr> But OOP is also naturally concurrent.
01:37:07 <solvr> Especially the actor model.
01:37:57 <dibblego> oh gawd
01:38:33 <Axman6> I wouldn't conflate OOP and the actor model, at least as far as most people understand OOP today. they are certainly related, and in many the actor model much better adhears to the original ideas of OOP, but when you start talking about Java we're way off from where I would like to be
01:38:41 stree joins (~stree@68.36.8.116)
01:40:38 <solvr> Java is not strictly OOP, hasn't been for a long time. It's mixed paradigm. Can do FP, can do procedural, can do actors, can do "OOP as abstract data structures" which is probably what you don't like.
01:41:30 <solvr> The thing about immutability is that it's great when you want it.
01:41:42 <solvr> But not as something forced upon you.
01:43:29 <Axman6> who says it's being forced on anyone?
01:43:34 <c_wraith> Which is why Haskell has mutable stuff
01:43:41 <monochrom> What is the purpose of this discussion?
01:44:00 <c_wraith> To attack a straw man unrelated to any real language, probably
01:44:33 <monochrom> Am I right in that dibblego's question was never answered?
01:45:54 <dibblego> It appears: To hold and express an opinion on a subject, without having to come to understand the subject, and with peer support of the position. This is disappointing :(
01:46:28 <monochrom> Yeah. That's what's wrong with social media.
01:46:47 <monochrom> https://www.smbc-comics.com/comic/app-3 applies.
01:46:49 <dibblego> right, remember when #haskell was not social media? *jumps in joy*
01:47:17 <monochrom> New mission for #haskell: Avoid social media success at all costs. >:)
01:47:31 <dibblego> I support this mission
01:48:33 nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccca:5598:c03f:71de)
01:49:49 <solvr> I just want a happy middleground where fp/oop/imperative/relational co-exist in one shared paradigm.
01:50:45 <monochrom> Have you even studied the expression problem? which puts a bound on how well two things can coexist.
01:52:11 × zebrag quits (~inkbottle@aaubervilliers-651-1-244-162.w83-200.abo.wanadoo.fr) (Ping timeout: 240 seconds)
01:52:29 <monochrom> I am unsympathetic to hiding behind the façade of "discussions and debates" when one hasn't done their share of due diligence, and instead merely exhibit the shallow news reporter behaviour of "I heard this from somewhere, what do you think?", which is a sorry excuse for "discussions and debates".
01:53:06 <solvr> monochrom, one of the biggest problems to resolve in programming is scaling the complexity of a system while keeping performance and defects in check
01:53:33 <solvr> monochrom, to think about complex systems as a single "expression" would be to miss their nature entirely
01:53:57 <monochrom> Are you done?
01:54:06 Axman6 is trying to find where monochrom claimed that
01:54:35 <solvr> Well if monochrom doesn't claim that, then the expression problem doesn't apply
01:54:45 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
01:55:03 <Axman6> it clearly applies, what on earth are you talking about
01:55:39 <monochrom> I want to tell you about a formalism that I call the Markov-Mealy chain.
01:56:00 glguy pulls up a chair
01:56:03 <monochrom> It simply means a cross of a Markov chain and a Mealy machine. >:)
01:56:51 <solvr> The expression problem is about extensibility in fixed boundaries. A system is a hierarchy of collections of boundaries.
01:57:19 <solvr> Case in point, every FP is implemented on imperative procedural machines.
01:57:26 <solvr> No expression problem somehow
01:57:27 <monochrom> But I can't be the first one to think up this hybrid. Do you know of a more standard name?
01:57:48 <dibblego> FWIW, I once read something from Brian Goetz — it was a friend of mine spending hundreds of comments trying to teach him the Maybe data type. That was the last time.
01:58:28 <solvr> dibblego, oh yeah, he doesn't understand the Maybe type. Sure.
01:58:40 <Axman6> starting off with the meme that people don't want to use monads... when they literally use monads every single day of their lives didn't help his argument
01:58:52 <dibblego> haha you read the same thread :)
01:59:59 Alleria joins (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com)
02:00:22 Alleria is now known as Guest59918
02:00:28 <solvr> Axman6, just because IO for ex. is a monad in Haskell, doesn't make IO a monad in Java.
02:00:46 <Axman6> doesn't it?
02:00:54 <monochrom> Nothing makes a monad in Java. There is no monad there.
02:01:01 <solvr> No it absolutely doesn't. you confuse your mental map with the actual thing.
02:01:10 <dibblego> Yes it is.
02:01:15 <Axman6> they couldn't even make Optional a law abiding monad in Java -_-
02:01:29 <monochrom> But don't read this as a criticism on Java. Java has other strengths, but not shoehorning monads.
02:01:45 <dibblego> http://www.functionaljava.org/javadoc/4.8.1/functionaljava/fj/data/IOW.html
02:02:01 <dibblego> witness for the monad is carried; see if for yourself, or don't
02:03:16 <solvr> Axman6, behold as Optional works while not being a "law abiding monad"
02:03:29 <solvr> Axman6, likewise for Promises in JS and so on
02:03:33 <Axman6> "works" for some poor definition of works
02:03:50 <solvr> Axman6 "poor" for some subjective definition of poor
02:03:57 <glguy> How does all this tie back to #haskell?
02:03:57 <Axman6> who would want to represent Just null anyway
02:04:31 × Guest59918 quits (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com) (Ping timeout: 250 seconds)
02:06:33 Tario joins (~Tario@201.192.165.173)
02:06:42 <dibblego> it doesn't work — that is why I just deleted it today, out of a java project
02:06:43 <Axman6> I _think_ the original argument was something along the lines of "immutable by default is wrong", which is clearly nonsense. but if it were true, we're all wrong, and we should feel wrong
02:07:19 juri__ joins (~juri@212.86.35.156)
02:08:06 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
02:09:09 <solvr> It was not the original argument.
02:09:39 <solvr> But let's say that immutable by default would be less of a nonsense if we poured and burned RAM in our computers like you pour and burn gas in your car.
02:09:58 <dibblego> no, let's not say that please — this is #haskell
02:10:24 <Axman6> the opening sentense of your quote is trivially wrong, so it's hard to see how you're operating from a solid foundation of the facts of whatever point it is you're trying to make
02:10:30 × juri_ quits (~juri@79.140.114.222) (Ping timeout: 265 seconds)
02:10:45 <monochrom> Could we all just stop this please.
02:11:45 <olligobber> so I looked at how the Q monad works, and so I wrote my N type: `newtype N = N {runN :: forall n. Num n => n}', and even gave it a Num instance
02:12:13 <Axman6> Where's the Q monad come from?
02:12:13 <olligobber> this feels like some sort of dark magic
02:12:20 <olligobber> Templat Haksell
02:12:38 <olligobber> https://hackage.haskell.org/package/template-haskell-2.17.0.0/docs/Language-Haskell-TH.html
02:12:50 <olligobber> it's defined as `newtype Q a = Q { unQ :: forall m. Quasi m => m a }'
02:12:55 <Axman6> Thought you were talking about that quantum computation monad
02:13:18 <olligobber> nah
02:13:34 <monochrom> What does Num have to do with Q?
02:13:54 <glguy> olligobber, made his 'N' in the style of 'Q'
02:13:55 <olligobber> Q is defined as the Quasi type, so I made N the Num type
02:14:24 <olligobber> N can do anything any Num can, and then later you runN to get a particular value out
02:14:43 <olligobber> correction, N can do anything all Nums can
02:14:45 <glguy> olligobber, It's a bit the other way around though, N can *only* do things Num can
02:14:49 <olligobber> yeah
02:15:14 <olligobber> it feels wrong somehow
02:15:20 <glguy> % newtype N = N {runN :: forall n. Num n => n}
02:15:20 × shachaf quits (~shachaf@unaffiliated/shachaf) (Remote host closed the connection)
02:15:20 <yahb> glguy:
02:15:55 <olligobber> especially when you look at the instances of Quasi and it only gives IO (which is incomplete) and Q (which is ...)
02:16:03 <Axman6> I wish yahb would say something when defining things, like "It is defined"
02:16:15 <olligobber> % runN (1 + 2 :: N)
02:16:15 <yahb> olligobber: ; <interactive>:60:9: error:; * Could not deduce (Num N) arising from a use of `+'; from the context: Num n bound by the inferred type of it :: Num n => n at <interactive>:60:1-17; * In the first argument of `runN', namely `(1 + 2 :: N)'; In the expression: runN (1 + 2 :: N); In an equation for `it': it = runN (1 + 2 :: N)
02:16:20 <olligobber> oh right
02:16:21 <olligobber> um
02:16:28 <olligobber> % instance Num N where { N x + N y = N $ x + y; N x * N y = N $ x * y; abs (N x) = N (abs x); signum (N x) = N (signum x); fromInteger = N . fromInteger; negate (N x) = N (negate x)}
02:16:28 <yahb> olligobber: ; <interactive>:61:136: error:; * Couldn't match type `Integer' with `forall n. Num n => n'; Expected: Integer -> N; Actual: (forall n. Num n => n) -> N; * In the first argument of `(.)', namely `N'; In the expression: N . fromInteger; In an equation for `fromInteger': fromInteger = N . fromInteger
02:16:38 <olligobber> wrong one
02:16:41 <olligobber> % instance Num N where { N x + N y = N $ x + y; N x * N y = N $ x * y; abs (N x) = N (abs x); signum (N x) = N (signum x); fromInteger n = N (fromInteger n); negate (N x) = N (negate x)}
02:16:41 <yahb> olligobber:
02:16:50 <olligobber> % runN (1 + 2 * 3 :: N)
02:16:50 <yahb> olligobber: 7
02:17:35 <glguy> % let x = N 10 * N 20 in (runN x :: Int, runN x :: Integer)
02:17:35 <yahb> glguy: (200,200)
02:17:36 <Axman6> % :t it
02:17:36 <yahb> Axman6: (Int, Integer)
02:17:50 <glguy> c-c-c-combo-breaker
02:18:00 <Axman6> ... surprised that worked (even it if wasn't the expression I wanted the type for)
02:18:01 <Axman6> ... surprised that worked (even it if wasn't the expression I wanted the type for)
02:18:03 <Axman6> uh
02:18:40 <olligobber> % let x = 2^65 in (runN x :: Int, runN x :: Integer)
02:18:40 <yahb> olligobber: (0,36893488147419103232)
02:19:09 <glguy> olligobber, maybe it would be less confusing if you made a struct for Num operations
02:19:13 <glguy> and then reimplemented your type as
02:19:28 <glguy> newtype N = N (forall a. NumOps a -> a)
02:19:43 <olligobber> maybe
02:20:03 <glguy> pull the type classes out of the mix; less magic
02:20:17 shachaf joins (~shachaf@unaffiliated/shachaf)
02:20:18 <olligobber> yeah, but I like magic
02:20:29 <glguy> Is the goal to understand or be amazed? :)
02:20:30 <monochrom> olligobber: If you think of the suite of the methods of Num as a signature of an algebra, then "forall n. Num n => n" are expressions buildable from using only that signature. Similarly for Q.
02:21:04 <olligobber> are there actually other Quasi instances? or does haskell just use Q and magic happens?
02:21:07 <monochrom> perhaps s/from using only that signature/from only that algebra/
02:21:53 <glguy> % :info Language.Haskell.TH.Syntax.Quasi
02:21:53 <yahb> glguy: type Quasi :: (* -> *) -> Constraint; class (MonadIO m, MonadFail m) => Quasi m where; qNewName :: String -> m Name; qReport :: Bool -> String -> m (); qRecover :: m a -> m a -> m a; qLookupName :: Bool -> String -> m (Maybe Name); qReify :: Name -> m Info; qReifyFixity :: Name -> m (Maybe Language.Haskell.TH.Fixity); qReifyType :: Name -> m Language.Haskell.TH.Type; qReifyInstances :: Name
02:22:06 <glguy> instance Quasi Q -- Defined in ‘Language.Haskell.TH.Syntax’
02:22:06 <glguy> instance Quasi IO -- Defined in ‘Language.Haskell.TH.Syntax’
02:22:35 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Ping timeout: 265 seconds)
02:23:23 <monochrom> Another one: "forall r. r -> (Int -> r) -> r" is equivalent to Maybe Int
02:23:31 <olligobber> oh, I know that one
02:23:52 <monochrom> And I can convert that to a need-type-class form too.
02:24:23 <monochrom> class M r where nothing :: r; just :: Int -> r
02:24:28 × hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
02:24:35 <monochrom> Then I have "forall r. M r => r"
02:24:58 <olligobber> huh
02:24:58 × todda7 quits (~torstein@athedsl-09242.home.otenet.gr) (Ping timeout: 240 seconds)
02:25:38 <monochrom> This is what glguy was saying.
02:25:54 <olligobber> oh...
02:26:02 <olligobber> the magic is fading away
02:26:17 <olligobber> but still, what Quasi monad does haskell use at compile time?
02:26:34 <monochrom> As Feymann said, I don't think there is a conflict between understanding and amazement.
02:26:52 × carlomagno quits (~cararell@148.87.23.11) (Quit: Leaving.)
02:27:04 <monochrom> The equivalence between the class version and the parameter version is beautiful
02:27:22 <glguy> olligobber, probably this one
02:27:29 <glguy> compiler/typecheck/TcSplice.hs
02:27:29 <glguy> 846:instance TH.Quasi TcM where
02:27:36 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 268 seconds)
02:27:56 <olligobber> wait, so Num can be a type? like `forall a. ((a -> a -> a) -> (a -> a -> a) -> (a -> a) -> (a -> (a,a)) -> (Integer -> a) -> (a -> a)) -> a
02:28:00 <glguy> or:libraries/ghci/GHCi/TH.hs
02:28:01 <glguy> 163:instance TH.Quasi GHCiQ where
02:28:29 <olligobber> aww, I was hoping it just used Q and somehow extracted what it needed from the universal type
02:28:58 <monochrom> For Q and Quasi, what you're seeing is dependency inversion, i.e., both user and implementer code to the common interface Quasi, don't assume anything more concrete on either side (would be too much coupling)
02:28:59 <olligobber> I don't get why it uses Q Exp instead of Quasi m => m Exp though
02:29:21 <glguy> olligobber, actually they like the type synonym ExpQ
02:29:41 <glguy> probably just because doing it the way you said would be needlessly noisy
02:30:10 <monochrom> The newtype wrapper is more convenient when passing around as parameter.
02:30:17 <olligobber> hmm
02:30:57 <olligobber> I guess you rarely have a concrete type satisfying Quasi on the user's end, so using Q is more convenient
02:31:02 <monochrom> Relieves user from needing RankNTypes when you have "Q a -> Q a -> ..." instead of "(forall m. ...) -> (forall m. ...) -> ..."
02:31:27 <olligobber> but with a class like Num you have plenty of types satisfying Num, so N would be inconvenient
02:31:50 <glguy> The issue with Num is that there are a bunch of non-Num operations you've likely to want to use
02:32:01 <olligobber> I was imagining Q a -> Q a -> Q a would be replaced by Quasi m => m a -> m a -> m a, but I guess those types aren't identical
02:32:09 <glguy> also it's more efficient to know what type things are being done at
02:32:38 <glguy> they aren't identical, but practially the later would be what you'd need
02:33:21 <olligobber> oh, and I made a useless type
02:33:33 <olligobber> newtype S = S {runS :: forall s. Show s => s}
02:33:40 <monochrom> :)
02:33:41 <olligobber> I don't think it has any values
02:33:59 <olligobber> except undefined
02:34:04 <olligobber> and error stuff
02:35:41 × RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 240 seconds)
02:36:39 <olligobber> the thing is, something of type N -> N cannot be turned into Num n => n -> n
02:36:50 <olligobber> so it's somehow stronger
02:37:06 <monochrom> For "forall r. C r => r" to have values, you want the class C to have some methods being smart constructors.
02:37:07 <olligobber> it guarantees that whatever you give it has to be a number and nothing but
02:37:34 <monochrom> For example my M class has two smart constructors, nothing and just.
02:37:41 <monochrom> For example Num has fromInteger.
02:37:48 <olligobber> yeah
02:38:17 <monochrom> You know what, since that's the only constructor, "forall n. Num n => n" is equivalent to Integer.
02:38:33 <olligobber> try
02:38:35 <olligobber> true
02:38:49 <olligobber> so it's like the initial object in a way
02:38:51 <glguy> monochrom, doesn't olligobber's 2^65 example show that that's not quite true?
02:39:13 <glguy> it's the journey, not the destination
02:39:33 <olligobber> nah, if you replace runN with fromInteger you get the same result
02:39:47 RusAlex joins (~Chel@unaffiliated/rusalex)
02:40:03 <glguy> % let x = 2^65 in (runN x :: Int, runN x :: Integer)
02:40:03 <yahb> glguy: (0,36893488147419103232)
02:40:18 <glguy> so clearly x couldn't be represented with a mere Integer
02:40:20 <olligobber> % let x = 2^65 in (fromInteger x :: Int, fromInteger x :: Integer)
02:40:20 <yahb> olligobber: (0,36893488147419103232)
02:40:26 <olligobber> looks the same to me
02:41:28 <glguy> % let x = signum (2^65) in (runN x :: Int, runN x :: Integer)
02:41:28 <yahb> glguy: (0,1)
02:41:33 <glguy> ok, now do yours
02:41:48 <olligobber> % let x = signum (2^65) in (fromInteger x :: Int, fromInteger x :: Integer)
02:41:49 <yahb> olligobber: (1,1)
02:41:52 <olligobber> ooh
02:42:02 <olligobber> they are different
02:42:18 <olligobber> that makes sense actually
02:42:23 <olligobber> huh
02:42:58 <olligobber> it feels kinda weird now that Integer isn't N...
02:44:43 <olligobber> but yeah, now if I ask for a monoid, I could either mean `Monoid m => m -> ()` or `(forall m. Monoid m => m) -> ()`, and they are different things...
02:44:55 <monochrom> Darn. I see.
02:47:42 <monochrom> I should have applied what I learned formally, not intuitively.
02:48:07 <glguy> data N = Plus N N | Minus N N | Times N N | Negate N | Abs N | Signum N | FromInteger Integer
02:48:17 <monochrom> Yeah, that.
02:48:20 <glguy> olligobber's N is a complicated way to write that
02:48:47 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
02:49:04 <glguy> and since "The Haskell Report defines no laws for Num. [...]"
02:49:11 <monochrom> Just mechanically translate the forall-type to ADT. Do not think. Do not pass Go. Do not collect $200.
02:49:17 <glguy> we don't have to worry about any limitations in how to evaluate one of those :)
02:53:30 × theDon quits (~td@94.134.91.185) (Ping timeout: 268 seconds)
02:54:49 theDon joins (~td@muedsl-82-207-238-149.citykom.de)
02:55:18 × drbean_ quits (~drbean@TC210-63-209-95.static.apol.com.tw) (Ping timeout: 240 seconds)
02:56:38 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
02:56:38 finn_elija is now known as Guest29980
02:56:38 FinnElija is now known as finn_elija
02:57:40 trcm joins (~trcm@103.153.243.79)
02:57:58 kiweun joins (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com)
02:59:33 × Guest29980 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 240 seconds)
03:00:28 berberman_ joins (~berberman@unaffiliated/berberman)
03:01:22 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 258 seconds)
03:01:47 × myShoggoth quits (~myShoggot@75.164.73.93) (Remote host closed the connection)
03:02:10 myShoggoth joins (~myShoggot@75.164.73.93)
03:03:18 × ddellacosta quits (~ddellacos@86.106.143.174) (Remote host closed the connection)
03:03:29 ddellacosta joins (~ddellacos@86.106.143.174)
03:04:05 × ddellacosta quits (~ddellacos@86.106.143.174) (Remote host closed the connection)
03:07:41 × myShoggoth quits (~myShoggot@75.164.73.93) (Ping timeout: 268 seconds)
03:09:56 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
03:13:59 × quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in)
03:14:25 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 252 seconds)
03:16:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:18:10 <olligobber> % newtype The c = The { some :: forall x. c x => x }
03:18:10 <yahb> olligobber:
03:18:26 <olligobber> % some (The $ 1 + 2 :: The Num)
03:18:26 <yahb> olligobber: 3
03:18:46 <olligobber> % some (The mempty :: The Monoid)
03:18:46 <yahb> olligobber: ()
03:18:51 <olligobber> awesome
03:19:43 <Axman6> % % some (The mempty :: The Monoid) :: [Int]
03:19:43 <yahb> Axman6: ; <interactive>:75:1: error: parse error on input `%'
03:19:48 <Axman6> % some (The mempty :: The Monoid) :: [Int]
03:19:48 <yahb> Axman6: []
03:20:55 <monochrom> "free algebras for all" >:)
03:21:01 <olligobber> yeah
03:21:17 <monochrom> pun intended in "for all"
03:21:18 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
03:24:54 <nshepperd> the monoid, the myth, the legend
03:25:49 <olligobber> oh god
03:25:58 <olligobber> % class (a x, b x) => (/\) a b x
03:25:58 <yahb> olligobber: ; <interactive>:77:1: error:; * Potential superclass cycle for `/\'; one of whose superclass constraints is headed by a type variable: `a x'; Use UndecidableSuperClasses to accept this; * In the class declaration for `/\'
03:26:16 <olligobber> % :set -XUndecidableSuperClasses
03:26:16 <yahb> olligobber:
03:26:20 <olligobber> % class (a x, b x) => (/\) a b x
03:26:20 <yahb> olligobber:
03:26:29 <olligobber> % instance (a x, b x) => (/\) a b x
03:26:29 <yahb> olligobber:
03:26:42 <olligobber> % some (The 1 :: The (Num /\ Show)) :: Int
03:26:42 <yahb> olligobber: 1
03:26:44 × cgfuh quits (~cgfuh@181.167.191.58) (Quit: WeeChat 3.0)
03:27:15 <olligobber> % some (The $ 1 + read "1" :: The (Num /\ Read)) :: Int
03:27:15 <yahb> olligobber: 2
03:27:17 <Axman6> Using Fira Code in my terminal means that /\ shows up as a single ligature, and that makes me happy
03:27:22 <olligobber> same
03:27:37 <olligobber> actually my terminal doesn't do ligatures, but my text editor does
03:29:11 <Axman6> get a better terminal
03:29:20 <olligobber> but im lazy
03:29:29 <Axman6> I understand
03:30:21 slycelote[m] joins (slycelotem@gateway/shell/matrix.org/x-gzalokaoqcjbolje)
03:30:51 <olligobber> % let x = (The $ 1 + read "1.5" :: The (Num /\ Read)) in (some x :: Float, some x :: Int)
03:30:51 <yahb> olligobber: (2.5,*** Exception: Prelude.read: no parse
03:30:58 slycelote[m] parts (slycelotem@gateway/shell/matrix.org/x-gzalokaoqcjbolje) ()
03:31:05 slycelote[m] joins (slycelotem@gateway/shell/matrix.org/x-gzalokaoqcjbolje)
03:31:19 <olligobber> cursed
03:32:03 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
03:32:19 × kiweun quits (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Remote host closed the connection)
03:34:08 <nshepperd> % instance (forall a. c a => Semigroup a) => Semigroup (The c) where { (<>) a b = The (a <> b) }
03:34:08 <yahb> nshepperd: ; <interactive>:84:10: error:; * Variable `c' occurs more often in the constraint `c a' than in the instance head `Semigroup a'; (Use UndecidableInstances to permit this); * In the quantified constraint `forall a. c a => Semigroup a'; In the instance declaration for `Semigroup (The c)'
03:34:51 <olligobber> wtf is that oh god
03:35:04 <olligobber> % :set -XUndecidableInstances
03:35:04 <yahb> olligobber:
03:35:09 <olligobber> % instance (forall a. c a => Semigroup a) => Semigroup (The c) where { (<>) a b = The (a <> b) }
03:35:10 <yahb> olligobber: ; <interactive>:86:10: error:; * Could not deduce: c (The c) arising from a use of `GHC.Base.$dmsconcat'; from the context: forall a. c a => Semigroup a bound by the instance declaration at <interactive>:86:10-60; * In the expression: GHC.Base.$dmsconcat @(The c); In an equation for `GHC.Base.sconcat': GHC.Base.sconcat = GHC.Base.$dmsconcat @(The c); In the instance declaration
03:35:22 <nshepperd> wat
03:35:27 <olligobber> infinite loop?
03:35:46 <nshepperd> oh, typo
03:36:00 <nshepperd> % instance (forall a. c a => Semigroup a) => Semigroup (The c) where { (<>) a b = The (some a <> some b) }
03:36:00 <yahb> nshepperd: ; <interactive>:87:10: error:; * Could not deduce: c (The c) arising from a use of `GHC.Base.$dmsconcat'; from the context: forall a. c a => Semigroup a bound by the instance declaration at <interactive>:87:10-60; * In the expression: GHC.Base.$dmsconcat @(The c); In an equation for `GHC.Base.sconcat': GHC.Base.sconcat = GHC.Base.$dmsconcat @(The c); In the instance declaration
03:36:43 <nshepperd> i dunno
03:36:57 <olligobber> that typo should have caused a runtime (when we call <>) error rather than a compile time (when we define the instance) error
03:37:13 <olligobber> I think because Semigroup a => Semigroup a it's infinite looping?
03:37:47 <olligobber> % instance Semigroup (The Semigroup) where { a <> b = The (some a <> some b) }
03:37:47 <yahb> olligobber:
03:38:43 <olligobber> % :t (<>) @(The Semigroup)
03:38:43 <yahb> olligobber: The Semigroup -> The Semigroup -> The Semigroup
03:38:44 <nshepperd> seems like that quantified constraint is trickier than expected
03:40:30 myShoggoth joins (~myShoggot@75.164.73.93)
03:40:44 <nshepperd> might need a separate class to extract the Semigroup constraint from a tree of /\ so that you can make semigroup instances for any such The
03:41:15 <hololeap> % :t fmap @(The Functor)
03:41:15 <yahb> hololeap: ; <interactive>:1:8: error:; * Expected kind `* -> *', but `The Functor' has kind `*'; * In the type `(The Functor)'; In the expression: fmap @(The Functor); <interactive>:1:12: error:; * Couldn't match kind `* -> *' with `*'; Expected kind `* -> Constraint', but `Functor' has kind `(* -> *) -> Constraint'; * In the first argument of `The', namely `Functor'; In the type `
03:46:26 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
03:48:57 <olligobber> % newtype The1 c a = The1 { some1 :: forall f. c f => f x }
03:48:57 <yahb> olligobber: ; <interactive>:91:55: error: Not in scope: type variable `x'
03:49:03 <olligobber> % newtype The1 c a = The1 { some1 :: forall f. c f => f a }
03:49:03 <yahb> olligobber:
03:49:47 <olligobber> % :k The1 Functor
03:49:48 <yahb> olligobber: * -> *
03:49:50 <olligobber> hmm
03:50:30 <olligobber> % instance Functor (The1 Functor) where fmap f x = The1 (fmap f (some x))
03:50:30 <yahb> olligobber: ; <interactive>:94:69: error:; * Couldn't match expected type: The c0; with actual type: The1 Functor a; * In the first argument of `some', namely `x'; In the second argument of `fmap', namely `(some x)'; In the first argument of `The1', namely `(fmap f (some x))'; * Relevant bindings include; x :: The1 Functor a (bound at <interactive>:94:46); f ::
03:50:48 <olligobber> % instance Functor (The1 Functor) where fmap f x = The1 (fmap f (some1 x))
03:50:48 <yahb> olligobber:
03:50:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
03:51:02 <olligobber> % :t fmap @(The1 Functor)
03:51:02 <yahb> olligobber: (a -> b) -> The1 Functor a -> The1 Functor b
03:51:07 <olligobber> lol
03:51:23 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 260 seconds)
03:53:05 s00pcan joins (~chris@107.181.165.217)
03:53:49 <olligobber> well, if anyone asks for a functor that isn't applicative, I now have the worst answer
03:57:40 × vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection)
03:57:59 vgtw joins (~vgtw@gateway/tor-sasl/vgtw)
03:58:18 × alx741 quits (~alx741@181.196.68.238) (Quit: alx741)
03:58:34 × Wuzzy quits (~Wuzzy@p5790e46d.dip0.t-ipconnect.de) (Quit: Wuzzy)
03:58:58 jj2021 joins (~JJ@072-181-126-124.res.spectrum.com)
03:59:03 stree joins (~stree@68.36.8.116)
04:03:11 <olligobber> % fmap @(The1 Functor) show $ The1 $ pure 1 :: [String]
04:03:11 <yahb> olligobber: ; <interactive>:97:1: error:; * Couldn't match expected type: [String]; with actual type: The1 Functor String; * In the expression: fmap @(The1 Functor) show $ The1 $ pure 1 :: [String]; In an equation for `it': it = fmap @(The1 Functor) show $ The1 $ pure 1 :: [String]
04:03:23 <olligobber> % some1 $ fmap @(The1 Functor) show $ The1 $ pure 1 :: [String]
04:03:23 <yahb> olligobber: ; <interactive>:98:44: error:; * Could not deduce (Applicative f) arising from a use of `pure'; from the context: Functor f; bound by a type expected by the context:; forall (f :: * -> *). Functor f => f Integer; at <interactive>:98:44-49; Possible fix:; add (Applicative f) to the context of; a type expected by the context:; fo
04:03:49 <olligobber> % some1 $ fmap @(The1 Functor) show (The1 $ pure 1 :: The1 Applicative) :: [String]
04:03:49 <yahb> olligobber: ; <interactive>:99:53: error:; * Expecting one more argument to `The1 Applicative'; Expected a type, but `The1 Applicative' has kind `* -> *'; * In an expression type signature: The1 Applicative; In the third argument of `fmap', namely `(The1 $ pure 1 :: The1 Applicative)'; In the second argument of `($)', namely `fmap @(The1 Functor) show (The1 $ pure 1 :: The1 Applicative)'
04:03:57 <olligobber> % some1 $ fmap @(The1 Functor) show (The1 $ pure 1 :: The1 Applicative Int) :: [String]
04:03:57 <yahb> olligobber: ; <interactive>:100:36: error:; * Couldn't match type `Applicative' with `Functor'; Expected: The1 Functor Int; Actual: The1 Applicative Int; * In the third argument of `fmap', namely `(The1 $ pure 1 :: The1 Applicative Int)'; In the second argument of `($)', namely `fmap @(The1 Functor) show (The1 $ pure 1 :: The1 Applicative Int)'; In the expression: some1 $ fmap @(The
04:04:28 <olligobber> % some1 $ some1 $ fmap @(The1 Functor) show (The1 (The1 $ pure 1 :: The1 Applicative Int)) :: [String]
04:04:28 <yahb> olligobber: ; <interactive>:101:1: error:; * Could not deduce: c0 [] arising from a use of `some1'; * In the expression: some1 $ some1 $ fmap @(The1 Functor) show (The1 (The1 $ pure 1 :: The1 Applicative Int)) :: [String]; In an equation for `it': it = some1 $ some1 $ fmap @(The1 Functor) show (The1 (The1 $ pure 1 :: The1 Applicative Int)) :: [String]; <interactive>:101:9: error:; * Ambiguous typ
04:04:44 <olligobber> lol
04:05:22 <olligobber> seems The1 Functor is kinda useless?
04:06:28 <olligobber> yeah, you can only give fmap @(The1 Functor) values if they exist for all functors, but no values exist for all functors, since Const Void is a functor
04:06:32 <olligobber> great
04:08:00 hypercube joins (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com)
04:09:23 × average quits (uid473595@gateway/web/irccloud.com/x-nfxnbiiogmdlamqs) (Quit: Connection closed for inactivity)
04:09:53 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:10:41 × jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
04:11:06 jonathanx joins (~jonathan@h-176-109.A357.priv.bahnhof.se)
04:14:12 × hypercube quits (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 246 seconds)
04:14:26 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
04:15:16 takuan joins (~takuan@178-116-218-225.access.telenet.be)
04:18:07 <gnumonic> Are there any libraries that allow for (for lack of a better description) "type-level records?" I'm working with singletons and kind-indexed GADTs and the number of type(kind) parameters is getting kinda ugly
04:19:23 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
04:19:54 hypercube joins (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com)
04:22:31 <gnumonic> I guess I could just use nested promoted tuples but that's like... also kind of ugly.
04:23:03 × waleee-cl quits (uid373333@gateway/web/irccloud.com/x-nfsshumoaduyxswb) (Quit: Connection closed for inactivity)
04:24:31 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-fmeoowlskniejelz) (Quit: Connection closed for inactivity)
04:24:33 × hypercube quits (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 258 seconds)
04:24:43 frozenErebus joins (~frozenEre@37.231.244.249)
04:24:43 justanotheruser joins (justanothe@gateway/vpn/protonvpn/justanotheruser)
04:27:05 × Eprom quits (~Eprom@185.169.233.10) (Remote host closed the connection)
04:27:35 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
04:31:44 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
04:34:24 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Remote host closed the connection)
04:41:59 molehillish joins (~molehilli@2600:8800:8d06:1800:6d47:e2d7:e78c:8f4)
04:53:55 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 260 seconds)
04:54:53 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
04:57:29 <hololeap> gnumonic: have you looked at the vinyl package?
04:57:47 <hololeap> i haven't really used it but that sounds like its synopsis
04:58:16 <Axman6> vinyl is good for records
04:59:02 × tanuki quits (~quassel@173.168.178.1) (Ping timeout: 246 seconds)
04:59:16 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
05:00:05 <hololeap> i got lost looking at the docs, tbh, ARec vs Rec... i got lost in they type shenanigans
05:00:13 Alleria joins (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com)
05:00:36 Alleria is now known as Guest36071
05:03:50 <hololeap> and i still don't know what a "universe" is
05:04:39 × Guest36071 quits (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com) (Ping timeout: 260 seconds)
05:05:10 <hololeap> is that anything before the final (->) at the type level?
05:06:54 <hololeap> like everything inside the first level of parens: (*) -> * or (* -> *) -> * or ((* -> *) -> *) -> *
05:07:52 <gnumonic> Hm. That might work. I'll have to play with it and see. I don't want kind-indexed records of values though (which is what vinyl looks like from the examples but it still might work). I need, uh, like kind-indexed records of kinds? My use case is sorta weird I think
05:10:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
05:10:34 <gnumonic> Right now i have things like: data SomeThing :: Property1 -> Property2 -> Property3 -> Property 4 (etc) -> Type and it's suuuppeerr annoying if I find I need to add a property. And the number of SingI constraints I have to type is also cumbersome
05:11:30 <gnumonic> It'd be nice to just have one composite property that contains all the other ones that I can type-level-lens into. It's not essential but I'd like my type signatures to not be twice as long as my functions :P
05:12:10 tanuki joins (~quassel@173.168.178.1)
05:12:26 × Kaiepi quits (~Kaiepi@47.54.252.148) (Ping timeout: 240 seconds)
05:13:07 × lawt quits (~lawt@c-73-151-3-92.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
05:15:06 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
05:15:12 <hololeap> gnumonic: what is a "Property"? what kind does it have?
05:17:51 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
05:18:58 <gnumonic> Well, each of the properties has a different kind. I might as well explain the use case: I'm making an engine for a trading-card game, and the "properties" are attributes of the cards (spell/creature/etc). The point of all this is to write type-level predicates so the compiler yells at me if I try to make a card that "doesn't make sense"
05:20:33 aVikingTrex joins (789a2138@120.154.33.56)
05:20:55 <hololeap> can you give an example of this? this sounds like something you could do safely at a lower level
05:22:24 <hololeap> i'm not sure GHC supports a list of kinds, which is what i think you would need to implement this
05:22:45 × tanuki quits (~quassel@173.168.178.1) (Ping timeout: 252 seconds)
05:23:02 × jj2021 quits (~JJ@072-181-126-124.res.spectrum.com) (Remote host closed the connection)
05:23:20 <hololeap> so going down a level might be what you need
05:26:28 <hololeap> if you're looking to tag a card with a type-level string, this is easy. data Card (n :: Symbol) where ...
05:26:39 <hololeap> i'm not sure what more you would need at the type level
05:27:39 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
05:31:15 × myShoggoth quits (~myShoggot@75.164.73.93) (Ping timeout: 260 seconds)
05:32:08 aishstha joins (1b2212e8@27.34.18.232)
05:32:28 <aishstha> hi
05:32:34 <hololeap> but even this gets weird if you need a collection of cards with different names
05:32:39 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
05:33:05 <aishstha> which is the best resource to get started with haskell learning? any recommendation
05:33:21 <hololeap> @where lyah
05:33:21 <lambdabot> http://www.learnyouahaskell.com/
05:33:22 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
05:33:33 <hololeap> that's a good starting place for most people
05:34:03 <hololeap> if you have a specialized background, feel free to let us know
05:34:59 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:ccca:5598:c03f:71de) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:36:46 × dpl quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 240 seconds)
05:37:30 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
05:39:36 zaquest joins (~notzaques@5.128.210.178)
05:40:48 b0o joins (~b0o@178.239.168.171)
05:42:52 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
05:47:25 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:48:32 <aishstha> Thanks @hololeap ! I have 4 years of experience in javascript programming language
05:49:00 Varis joins (~Tadas@unaffiliated/varis)
05:49:46 <aishstha> what could be haskell porject for beginner like me ? in haskell
05:49:55 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 260 seconds)
05:50:07 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Remote host closed the connection)
05:50:35 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
05:50:58 <aishstha> 1. from which I can learn from and
05:50:59 <aishstha> 2. create on my own. for example in JS, ppl start with todo application
05:51:10 jpds joins (~jpds@gateway/tor-sasl/jpds)
05:51:33 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
05:53:07 <wrunt> aishstha: since you know js, a good starting point may be to write a backend for a simple web application (such as a todo application) in haskell, with the frontend in html/js.
05:55:01 <wrunt> later you can rewrite the frontend in haskell too, compiling to js with ghcjs :)
05:56:12 lawt joins (~lawt@c-73-151-3-92.hsd1.ca.comcast.net)
05:56:45 <aishstha> wow, didn't knew that we would be able to build API from Haskell and write frontend in haskell. I'll surely work on API for now. thankyou so much for heads up!:D
05:58:09 <hololeap> aishstha: this is probably a controversial opinion, but you might want to try Elm as a bridge between Javascript and Haskell
05:58:15 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
05:58:33 sord937 joins (~sord937@gateway/tor-sasl/sord937)
05:58:41 <wrunt> aishstha: No problem. Yes, I'm playing around with exactly that now, using Obelisk (https://github.com/obsidiansystems/obelisk). It's nice to be able to share the same data structures on the front and back ends. I wouldn't recommend starting out with Obelisk though, as it's the deep end of the pool.
06:00:23 <aishstha> thankyou both:)
06:01:48 <aVikingTrex> I am tossing up between Haskell or FSharp for making a mobile app, is there any libraries that allow for this in haskell?
06:04:54 <wrunt> well the abovementioned obelisk does compile to Android and iOS apps using webkit (as well as having an AWS deployment option), but that's not a native mobile app.
06:05:26 mariatsji joins (~mariatsji@155.84-234-177.customer.lyse.net)
06:06:15 <aVikingTrex> Oh interesting! Ill take a look
06:06:41 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
06:06:41 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
06:06:50 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
06:08:10 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
06:08:44 <Axman6> native enough though, imo
06:09:15 <mariatsji> anyone know how to tell stack that an extra-dep (tar.gz) has some haddock in it?
06:11:25 <aVikingTrex> What is the difference between native and 'native enough'? I was thinking that not being a native app just means it was a web app?
06:11:36 <Axman6> aishstha: I would not recommend trying to jump into making some sort of app right away when learning Haskell, there's a lot you need to learn (and unlearn) which are important before getting frustrated that Haskell isn't Language X that yyou've used. Haskell is _extremely_ different to JS
06:12:34 shad0w_ joins (a0ca25b1@160.202.37.177)
06:12:36 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds)
06:12:40 <shad0w_> Hi
06:12:48 <aishstha> okay Axman6
06:12:52 <Axman6> Hello shad0w_
06:13:03 <wrunt> aVikingTrex: it's a native app that runs an embedded browser that runs your web app
06:13:05 <shad0w_> where can i go to find which GHC version uses what version of Base ?
06:13:43 <wrunt> aVikingTrex: I'm unclear at this early stage whether obelisk's backend is on the phone or on your web app server though (or whether both are possible).
06:14:09 <Axman6> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history looks like it has what you want shad0w_
06:14:31 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:14:34 × xff0x quits (~xff0x@2001:1a81:52ae:6200:6f5d:6ce6:85f6:1960) (Ping timeout: 258 seconds)
06:14:39 <aVikingTrex> wrunt Sounds electron-y
06:15:14 <aVikingTrex> Just having a read through the read.me now anyway. Looks like a cool project.
06:15:34 <shad0w_> Axman6: perfect.
06:15:39 <shad0w_> Thanks alot.
06:16:02 <wrunt> aVikingTrex: yeah, but see my caveat about it being the deep end. It uses some fancy type-level stuff, is pretty new, and has very little documentation.
06:16:07 <Axman6> all good
06:16:22 xff0x joins (~xff0x@2001:1a81:52c6:f900:b4b3:1e00:bd22:9f8d)
06:18:00 <aVikingTrex> wrunt Thanks for the heads up. I may go down the fsharp route for now as its more familiar territory. On a side note, ive finished the book "Get Programming with Haskell" and I have worked through the "fp-course" on github. Any recommendations on where to learn from next?
06:18:02 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:18:30 <Axman6> time to make some apps!
06:19:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
06:19:25 <Axman6> sounds like you've reached the point where you'll run into problems specific to whatever type of app you decide to make, and something like this channel would be a better resource to guide your learning than any particular resource
06:20:19 stree joins (~stree@68.36.8.116)
06:20:34 FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
06:20:34 finn_elija is now known as Guest46027
06:20:34 FinnElija is now known as finn_elija
06:20:47 <aVikingTrex> Axman6: Time to make some apps, indeed =D
06:21:14 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
06:21:39 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
06:22:27 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
06:22:45 × Guest46027 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 240 seconds)
06:25:04 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
06:29:57 × mariatsji quits (~mariatsji@155.84-234-177.customer.lyse.net) ()
06:30:02 × shad0w_ quits (a0ca25b1@160.202.37.177) (Ping timeout: 240 seconds)
06:30:37 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
06:31:31 oish joins (~charlie@228.25.169.217.in-addr.arpa)
06:31:46 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
06:34:06 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
06:34:52 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
06:34:59 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Remote host closed the connection)
06:35:33 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
06:36:39 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:b937:4ffa:f3c4:aca7) (Ping timeout: 246 seconds)
06:42:39 ddellacosta joins (~ddellacos@86.106.143.109)
06:44:02 × aishstha quits (1b2212e8@27.34.18.232) (Ping timeout: 240 seconds)
06:44:20 × molehillish quits (~molehilli@2600:8800:8d06:1800:6d47:e2d7:e78c:8f4) (Remote host closed the connection)
06:45:31 mkDoku joins (~TheMule@aftr-37-201-195-134.unity-media.net)
06:47:08 molehillish joins (~molehilli@2600:8800:8d06:1800:6d47:e2d7:e78c:8f4)
06:47:19 × ddellacosta quits (~ddellacos@86.106.143.109) (Ping timeout: 260 seconds)
06:49:13 ericsagn1 joins (~ericsagne@2405:6580:0:5100:ef73:96e:9562:7f87)
06:53:30 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-hmqewdshtgoiujbp)
06:55:09 Kaiepi joins (~Kaiepi@47.54.252.148)
07:00:07 <solvr> .
07:00:11 × ajc quits (~ajc@69.231.232.79) (Ping timeout: 240 seconds)
07:03:37 michalz joins (~user@185.246.204.39)
07:05:20 × hypercube quits (hypercube@gateway/vpn/protonvpn/hypercube) (Ping timeout: 265 seconds)
07:05:46 dpl joins (~dpl@77-121-78-163.chn.volia.net)
07:07:10 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
07:07:22 coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl)
07:07:46 × kiltzman quits (~k1ltzman@195.189.99.96) (Ping timeout: 240 seconds)
07:07:46 × RoguePointer quits (~jigen@unaffiliated/roguepointer) (Ping timeout: 240 seconds)
07:08:03 kiltzman joins (~k1ltzman@195.189.99.96)
07:08:43 × dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) ()
07:08:45 RoguePointer joins (~jigen@94.177.235.178)
07:08:45 × RoguePointer quits (~jigen@94.177.235.178) (Changing host)
07:08:45 RoguePointer joins (~jigen@unaffiliated/roguepointer)
07:09:31 Sorny joins (~Sornaensi@077213203030.dynamic.telenor.dk)
07:11:17 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
07:11:17 Aquazi joins (uid312403@gateway/web/irccloud.com/x-gutayqhfktjbgela)
07:11:22 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
07:11:55 MichaelFreeman joins (2d136c0c@45-19-108-12.lightspeed.tukrga.sbcglobal.net)
07:12:51 <MichaelFreeman> Hi. I tried to save a file in VS Code as Haskell, and it became .hsig file. How do I make it save as .hs file?
07:13:24 <Axman6> Save As and rename it, or in the file list (cmd-B) right click on it and rename it
07:14:05 <Uniaika> yeah it's a Backpack stuff
07:14:50 <MichaelFreeman> So it is normal it saves as hsig and I should just manually rename it to hs?
07:15:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:15:22 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds)
07:15:29 <Axman6> I wouldn't say normal, I would say annoying - was the language set to Haskell?
07:15:46 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
07:15:49 <MichaelFreeman> Yes, when I save I chose "Haskell". It's np, I was just wondering if I set things up wrong
07:16:06 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
07:17:10 <Uniaika> well that's weird, because .hsig files serve a very specific purpose
07:17:15 <Uniaika> they're not "normal code"
07:17:35 vs^ joins (vs@ip98-184-89-2.mc.at.cox.net)
07:18:03 Sornaensis joins (~Sornaensi@79.142.232.102)
07:18:04 Varis joins (~Tadas@unaffiliated/varis)
07:18:15 <MichaelFreeman> I see. Maybe I messed up on my installation then. I go to File>Save As>Save as type: Haskell. Then result is .hsig file. I see the option for Literate Haskell and that gets me .lhs file. None of the options I found result in .hs file
07:18:23 thc202 joins (~thc202@unaffiliated/thc202)
07:19:01 <Axman6> nah that just seems to be what VS code does, must be a problem with the Haskell extension
07:19:37 <MichaelFreeman> Ah okay ty for the explanation:)  it was driving me nuts so I had to join IRC lol
07:20:55 × Sorny quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 260 seconds)
07:21:23 ddellacosta joins (~ddellacos@86.106.143.57)
07:21:35 <Uniaika> MichaelFreeman: open a ticker at the extension's issue tracker :)
07:21:39 <Uniaika> it's not you
07:24:45 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
07:26:42 × ddellacosta quits (~ddellacos@86.106.143.57) (Ping timeout: 268 seconds)
07:27:31 mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan)
07:27:38 × mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Client Quit)
07:27:50 mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan)
07:28:08 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
07:29:38 raym joins (~ray@45.64.220.78)
07:29:42 × aVikingTrex quits (789a2138@120.154.33.56) (Ping timeout: 240 seconds)
07:31:30 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
07:32:06 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
07:32:43 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
07:32:47 typetetris joins (uid275937@gateway/web/irccloud.com/x-remmslgdlkipcjiq)
07:32:56 kiweun joins (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com)
07:34:10 × kmein quits (~weechat@static.173.83.99.88.clients.your-server.de) (Quit: ciao kakao)
07:34:28 kmein joins (~weechat@static.173.83.99.88.clients.your-server.de)
07:34:34 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
07:35:02 motersen_ is now known as motersen
07:37:19 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
07:37:43 × kiweun quits (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
07:37:52 × molehillish quits (~molehilli@2600:8800:8d06:1800:6d47:e2d7:e78c:8f4) (Remote host closed the connection)
07:38:06 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
07:39:24 srk joins (~sorki@unaffiliated/srk)
07:40:54 cfricke joins (~cfricke@unaffiliated/cfricke)
07:41:21 <solvr> In Haskell can I model a change to a big array by putting a small array of "changes" in front of it, which shadows entries in the big array
07:41:28 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
07:42:47 <Uniaika> solvr: if your "array" allows for duplicates, it's not a good idea :P
07:42:48 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
07:43:38 <solvr> Uniaika, let's say I have a list of 1 million items.
07:43:48 <solvr> Uniaika, I also have a map where I map index > value
07:44:10 <solvr> Uniaika when I need to read a value I first check the map. If it's there I read from there, if not, I go back to the array
07:44:13 <solvr> the list
07:44:19 haskellstudent joins (~quassel@213-225-9-45.nat.highway.a1.net)
07:44:32 <solvr> Uniaika, this allows me to keep changes cheap without redoing the whole list
07:44:52 <Uniaika> are you describing a cache?
07:45:23 <solvr> Uniaika it has similar topology as a cache, but accessing the main array is not slower. Rather, it just has "old" state
07:45:26 <solvr> That's not valid
07:45:38 <solvr> The updates are encoded in the map
07:46:05 <Uniaika> btw, you're using "array" and "list" interchangeably, but I assume you realise the differences between those two data-structures ?
07:46:12 <solvr> Sorry, habit
07:46:36 <Uniaika> no need to be sorry, I just wanted more precisions :P
07:46:50 <Uniaika> 1 million items in an array can be expensive ;)
07:47:00 <solvr> :)
07:48:11 MrRedstoner joins (c29af484@194.154.244.132)
07:49:10 <MichaelFreeman> Uniaika Sorry I am a complete noob. Where do I type do this in VS Code? Execute in the root of your project the command `haskell-language-server --debug .`
07:49:42 × yoneda quits (~mike@193.206.102.122) (Quit: leaving)
07:49:45 <Uniaika> solvr: do you wish to keep an initial state and only encode / store changes then? or just periodically update the array and keep the map as a fresher source of data?
07:50:05 <Uniaika> MichaelFreeman: https://github.com/haskell/vscode-haskell/issues
07:50:29 <solvr> Uniaika, essentially I'm trying to avoid modify/rebuild the array frequently.
07:51:02 <MrRedstoner> So I just installed haskell per https://www.haskell.org/platform/windows.html and running "cabal v2-repl" in a fresh cmd.exe I get "cabal.exe: The program 'ghc' version >=7.0.1 is required but it could not be found." Thing is, in C:\ProgramData\chocolatey\bin\ where the cabal executable is there are also ghc-9.0.1.exe and ghci-9.0.1.exe and the
07:51:03 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
07:51:03 <MrRedstoner> directory is in PATH. So I have no idea why it doesn't work for me
07:51:06 <solvr> Uniaika, also probably keep it around for other parallel code reading its state as-is without the new "transactional" changes
07:51:31 <MichaelFreeman> Ty I was in the wrong place ^^
07:55:54 <Uniaika> solvr: ever thought of doing some hash consing and having a pointer table?
07:56:00 kritzefitz joins (~kritzefit@p548c9398.dip0.t-ipconnect.de)
07:56:14 ddellacosta joins (~ddellacos@86.106.143.148)
07:58:41 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
07:59:38 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
08:00:50 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Remote host closed the connection)
08:00:52 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
08:01:16 × ddellacosta quits (~ddellacos@86.106.143.148) (Ping timeout: 260 seconds)
08:01:49 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
08:01:49 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer)
08:03:09 × mkDoku quits (~TheMule@aftr-37-201-195-134.unity-media.net) (Quit: Lost terminal)
08:03:58 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
08:04:00 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
08:04:08 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
08:04:10 × gitgood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Remote host closed the connection)
08:05:59 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
08:07:08 hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga)
08:08:39 × Codaraxis_ quits (~Codaraxis@141.98.255.144) (Ping timeout: 265 seconds)
08:09:33 × hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
08:10:22 × MrRedstoner quits (c29af484@194.154.244.132) (Quit: Connection closed)
08:13:14 <solvr> Uniaika, probably
08:14:46 jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client")
08:15:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
08:16:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:17:09 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
08:17:59 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
08:18:16 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
08:21:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
08:21:38 malumore joins (~malumore@151.62.125.43)
08:21:59 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
08:22:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:22:06 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
08:22:11 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Ping timeout: 268 seconds)
08:23:41 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds)
08:24:36 <solvr> Can I have multiple independent logical Haskell "processes" that communicate with each other using monads etc.?
08:24:52 <solvr> I mean I can literally have multiple processes, but I mean something more like Erlang
08:26:43 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Read error: Connection reset by peer)
08:27:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
08:27:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:28:17 × stree quits (~stree@68.36.8.116) (Ping timeout: 252 seconds)
08:29:15 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
08:30:09 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
08:30:11 <dibblego> Uniaika: advise, ignore
08:31:08 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
08:31:42 fendor joins (~fendor@178.165.131.170.wireless.dyn.drei.com)
08:32:11 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
08:33:20 <Uniaika> hahaha
08:33:34 <Uniaika> solvr: no you can't have something like Erlang, you'll have to do things more manually
08:33:48 <Uniaika> I personally found UnagiChan very nice (all things considered)
08:33:50 <Uniaika> dibblego: :P
08:33:58 × jluttine quits (~jluttine@85-23-66-6.bb.dnainternet.fi) (Ping timeout: 240 seconds)
08:34:09 <dibblego> we had a round of this inanity earlier today — I'll ban if it continues
08:35:07 <Uniaika> ah
08:35:08 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
08:35:10 <Uniaika> very well then
08:35:16 <dmwit> Yes, you can store an array and its changes. The cost is that indexing becomes O(changelog length). Yes, you can have multiple independent logical "processes", it is called threading and it's a newish technology, only been around about 30 years or so.
08:35:53 × lawt quits (~lawt@c-73-151-3-92.hsd1.ca.comcast.net) (Remote host closed the connection)
08:35:58 kuribas joins (~user@ptr-25vy0i7wi7nt82wi9fp.18120a2.ip6.access.telenet.be)
08:36:30 × b0o quits (~b0o@178.239.168.171) (Remote host closed the connection)
08:37:29 × vv8 quits (~egp_@128-71-69-136.broadband.corbina.ru) (Remote host closed the connection)
08:38:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
08:38:24 supercoven joins (~Supercove@dsl-hkibng31-58c384-213.dhcp.inet.fi)
08:38:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:41:01 stree joins (~stree@68.36.8.116)
08:41:52 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:43:34 guilhermeblanco joins (~guilherme@185.204.1.185)
08:48:30 <solvr> dminuoso, threading isn't what I had in mind.
08:48:39 <solvr> dmwit *
08:49:39 __minoru__shirae joins (~shiraeesh@5.101.59.224)
08:50:28 × CrabMan quits (phi-matrix@gateway/shell/matrix.org/x-lhuyyowodqgbbhrc) (Ping timeout: 248 seconds)
08:50:28 × toasty_avocado[m quits (toastyavoc@gateway/shell/matrix.org/x-fodvrwdskrlczeao) (Ping timeout: 248 seconds)
08:50:28 × verlet64_ quits (sid261276@gateway/web/irccloud.com/x-uqhhgyipieuslvmq) (Ping timeout: 248 seconds)
08:50:28 × cbarrett quits (sid192934@adium/cbarrett) (Ping timeout: 248 seconds)
08:50:28 × mcfilib quits (sid302703@gateway/web/irccloud.com/x-cghskpdzyxvcqslm) (Ping timeout: 248 seconds)
08:50:38 mcfilib joins (sid302703@gateway/web/irccloud.com/x-juvammsyvplemvln)
08:50:59 × affinespaces quits (sid327561@gateway/web/irccloud.com/x-rjgjrlilmkubkxmw) (Ping timeout: 248 seconds)
08:51:00 × blackriversoftwa quits (sid364914@gateway/web/irccloud.com/x-elfvrucbyuzljosj) (Ping timeout: 248 seconds)
08:51:00 × betawaffle quits (sid2730@gateway/web/irccloud.com/x-xklkobbintwtttud) (Ping timeout: 248 seconds)
08:51:00 × ^[ quits (sid43445@ircpuzzles/2015/april-fools/sixth/zgrep) (Ping timeout: 248 seconds)
08:51:00 × PotatoGim quits (sid99505@gateway/web/irccloud.com/x-yjqtuqlvecuserrl) (Ping timeout: 248 seconds)
08:51:00 × melkor quits (~melkor@2a02:2b88:2:1::5b34:1) (Ping timeout: 248 seconds)
08:51:08 <merijn> Uniaika: To be fair, you *can* have something like erlang. You just have to build all the things first :p
08:51:18 melkor joins (~melkor@2a02:2b88:2:1::5b34:1)
08:51:32 × siraben quits (sirabenmat@gateway/shell/matrix.org/x-rwrxnmwjnxipkdxm) (Ping timeout: 248 seconds)
08:51:32 × lisq quits (~quassel@lis.moe) (Ping timeout: 248 seconds)
08:51:32 × stylewarning quits (stylewarni@gateway/web/irccloud.com/x-waxurshkiqdvpdgd) (Ping timeout: 248 seconds)
08:51:32 × ProofTechnique quits (sid79547@gateway/web/irccloud.com/x-yarfypultqitkxyl) (Ping timeout: 248 seconds)
08:51:32 × dsal quits (sid13060@gateway/web/irccloud.com/x-xpwuybgiyaqhwhal) (Ping timeout: 248 seconds)
08:51:32 × nikola1 quits (~nikola@2a03:b0c0:2:d0::dc2:c001) (Ping timeout: 248 seconds)
08:51:32 × mikeplus64 quits (~mike@unaffiliated/mikeplus64) (Ping timeout: 248 seconds)
08:51:38 <Uniaika> merijn: hahaha
08:51:41 <merijn> The foundation to build most of the Erlang patterns exist in GHC. We just don't have something like the OTP actually implementing the nice high level stuff
08:51:48 <Uniaika> merijn: goodbye, I don't have twenty years to pour into that :P
08:52:04 × kadobanana quits (kadoban9he@gateway/shell/matrix.org/x-mbsahwnxhqdezbol) (Ping timeout: 248 seconds)
08:52:04 × PtxDK quits (~quassel@2a01:7c8:aac3:591:5054:ff:fe3d:cac6) (Ping timeout: 248 seconds)
08:52:08 <merijn> I do, I just don't have the money ;)
08:52:27 PtxDK joins (~quassel@2a01:7c8:aac3:591:5054:ff:fe3d:cac6)
08:52:33 <solvr> "The biggest functional programs tend to be much smaller than the biggest OOP programs"
08:52:33 lisq joins (~quassel@lis.moe)
08:52:46 cbarrett joins (sid192934@adium/cbarrett)
08:52:52 affinespaces joins (sid327561@gateway/web/irccloud.com/x-icxdwokgcwqtfedf)
08:52:53 PotatoGim joins (sid99505@gateway/web/irccloud.com/x-dzlvgtubsxazdshr)
08:52:57 betawaffle joins (sid2730@gateway/web/irccloud.com/x-bspashiqwxfauqlr)
08:53:11 ^[ joins (sid43445@ircpuzzles/2015/april-fools/sixth/zgrep)
08:53:15 <solvr> This is why every FP needs "something like Erlang"
08:53:18 nikola1 joins (~nikola@2a03:b0c0:2:d0::dc2:c001)
08:53:20 ProofTechnique joins (sid79547@gateway/web/irccloud.com/x-icnhdahhvfdpvqrx)
08:53:21 blackriversoftwa joins (sid364914@gateway/web/irccloud.com/x-nqkjcymscowwdvxo)
08:54:03 <kuribas> cloudhaskell?
08:54:08 oish joins (~charlie@228.25.169.217.in-addr.arpa)
08:54:23 stylewarning joins (stylewarni@gateway/web/irccloud.com/x-ndqjmblwfxhbhjaa)
08:54:23 dsal joins (sid13060@gateway/web/irccloud.com/x-geyuvypaleievkbk)
08:55:02 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
08:55:51 jakalx joins (~jakalx@base.jakalx.net)
08:56:02 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
08:57:15 <merijn> Cloudhaskell is very different, imo
08:57:21 Franciman joins (~francesco@host-87-20-23-243.retail.telecomitalia.it)
08:58:08 __monty__ joins (~toonn@unaffiliated/toonn)
08:59:29 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-hmqewdshtgoiujbp) (Quit: Connection closed for inactivity)
09:00:07 Alleria joins (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com)
09:00:13 timCF joins (~i.tkachuk@200-149-20-81.sta.estpak.ee)
09:00:31 Alleria is now known as Guest65126
09:00:32 sedeki joins (~textual@unaffiliated/sedeki)
09:01:07 jluttine joins (~jluttine@85-23-66-6.bb.dnainternet.fi)
09:02:45 mikeplus64 joins (~mike@2406:d500:6:1:216:3cff:fe36:651)
09:02:45 × mikeplus64 quits (~mike@2406:d500:6:1:216:3cff:fe36:651) (Changing host)
09:02:45 mikeplus64 joins (~mike@unaffiliated/mikeplus64)
09:03:03 × solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed)
09:03:30 CrabMan joins (phi-matrix@gateway/shell/matrix.org/x-ywlomtmrmvdmngay)
09:03:50 <timCF> Hello! Any users of gold linker instead of standard ld in Haskell projects? I'm getting very strange situation - I have a packages A and B. Package B depends on A. I'm using gold linker in both (through ghc flags in package.yaml and cabal files). Package A is a library, no problems with builds and tests. But when I'm trying to compile package B which depends on A - I'm getting linker error
09:03:52 verlet64_ joins (sid261276@gateway/web/irccloud.com/x-qzcgtsnaanuchemn)
09:03:56 <timCF> "binutils-2.31.1/bin/ld.gold: --hash-size=31: unknown options". In cases where I'm using gold linker only in package B - it works fine. Any suggestions what is going on? I'm using GHC 8.6.5
09:04:29 × shalokshalom quits (~quassel@2a02:1748:dd5e:7f60:cf49:8384:7c93:3106) (Quit: https://quassel-irc.org - Komfortabler Chat. Überall.)
09:04:46 × Guest65126 quits (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com) (Ping timeout: 258 seconds)
09:05:31 arahael1 joins (~arahael@203.221.197.144)
09:05:58 <merijn> timCF: Presumably because GHC isn't aware you are using gold and thus passing options it doesn't know/understand?
09:06:17 <merijn> How are you making it use gold?
09:07:08 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
09:07:22 × arahael quits (~arahael@121-44-10-207.tpgi.com.au) (Ping timeout: 260 seconds)
09:08:11 × kritzefitz quits (~kritzefit@p548c9398.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
09:09:09 kiweun joins (~kiweun@2607:fea8:2a62:9600:e8b5:adb7:6f5d:778c)
09:10:22 kozowu joins (uid44796@gateway/web/irccloud.com/x-roldfjkcrdyqvqea)
09:12:08 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
09:15:21 <timCF> merijn: I'm using `ghc-options: -optl-fuse-ld=gold` and `ld-options: -fuse-ld=gold`. It works in package A when I'm guilding it standalone, and I see how faster it is if compare with just ld. I have the same flags in package B, but linker fails with error I mentioned
09:16:00 siraben joins (sirabenmat@gateway/shell/matrix.org/x-mcznkywpxwnunewb)
09:17:34 Mik01010101 joins (511495c8@200-149-20-81.sta.estpak.ee)
09:19:27 × hypercube quits (hypercube@gateway/vpn/protonvpn/hypercube) (Ping timeout: 260 seconds)
09:20:45 kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49)
09:21:20 acidjnk_new joins (~acidjnk@p200300d0c72b9510b1ed14260384c0cf.dip0.t-ipconnect.de)
09:22:07 × RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 265 seconds)
09:24:08 Feuermagier joins (~Feuermagi@213.178.26.41)
09:24:35 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
09:26:17 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving)
09:26:26 <[exa]> Is there some GHC option that disables printing out the erroring code samples, and just prints out the error?
09:26:46 <[exa]> s/samples/parts
09:30:00 <maerwald> optl-fuse-gold has never worked for me, I always had to either change the binary symlink or the ghc config file
09:30:44 <maerwald> e.g. .ghcup/ghc/8.6.5/lib/ghc-8.6.5/settings
09:30:56 kadobanana joins (kadoban9he@gateway/shell/matrix.org/x-wrfgidxkulkzvtcl)
09:32:03 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 260 seconds)
09:34:37 toasty_avocado[m joins (toastyavoc@gateway/shell/matrix.org/x-hpiftxyehqckftdi)
09:35:46 × sedeki quits (~textual@unaffiliated/sedeki) (Quit: Textual IRC Client: www.textualapp.com)
09:35:47 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
09:35:55 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
09:39:16 ddellacosta joins (~ddellacos@86.106.143.200)
09:42:25 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:44:12 × ddellacosta quits (~ddellacos@86.106.143.200) (Ping timeout: 268 seconds)
09:44:47 RusAlex joins (~Chel@unaffiliated/rusalex)
09:46:18 × Mik01010101 quits (511495c8@200-149-20-81.sta.estpak.ee) (Quit: Connection closed)
09:47:07 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
09:48:05 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
09:50:08 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Remote host closed the connection)
09:55:19 supercoven_ joins (~Supercove@dsl-hkibng31-58c384-213.dhcp.inet.fi)
09:56:37 frozenErebus joins (~frozenEre@37.231.244.249)
09:56:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
09:57:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:57:41 × howdoi quits (uid224@gateway/web/irccloud.com/x-unpvrllwptrnqqhb) (Quit: Connection closed for inactivity)
09:58:26 × supercoven quits (~Supercove@dsl-hkibng31-58c384-213.dhcp.inet.fi) (Ping timeout: 240 seconds)
10:01:42 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
10:02:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:02:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:03:41 aVikingTrex joins (789a2138@120.154.33.56)
10:03:57 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
10:04:42 average joins (uid473595@gateway/web/irccloud.com/x-emhfocwfjlhcyvsq)
10:05:09 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
10:07:28 Synthetica joins (uid199651@gateway/web/irccloud.com/x-holtfbrhdrkajcob)
10:09:44 Rudd0 joins (~Rudd0@185.189.115.103)
10:14:39 rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-yqepddmznaiakcld)
10:18:38 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Remote host closed the connection)
10:19:18 ddellacosta joins (~ddellacos@86.106.143.10)
10:19:59 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
10:20:20 sord937 joins (~sord937@gateway/tor-sasl/sord937)
10:24:28 × ddellacosta quits (~ddellacos@86.106.143.10) (Ping timeout: 265 seconds)
10:26:19 <fendor> [exa], you mean these caret diagnostics that highlight the code?
10:27:18 <[exa]> yes
10:27:29 <[exa]> no idea what it's even called
10:28:36 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
10:29:52 <merijn> [exa]: there's a ton of flags to twiddle GHC's error output
10:30:08 <merijn> [exa]: I recommend browsing the GHC flag reference
10:30:10 <[exa]> I found just -ferror-spans
10:30:30 <[exa]> which does something different
10:30:46 <[exa]> like, I already went through the flags but failed, that's why I'm asking :]
10:32:31 <merijn> hmmm
10:32:36 <merijn> Maybe -dppr-user-length ?
10:32:53 <merijn> [exa]: If not, then you know what your first GHC contribution can be ;)
10:33:11 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
10:34:56 <tomsmeding> [exa]: | grep -v '^ *|' | grep -v '\^\^\^'
10:35:19 <merijn> tbh, more control over error output would be nice anyway
10:35:56 <tomsmeding> perhaps that will come with the internal diagnostics refactors that are currently going on
10:38:01 <Gurkenglas> I want to minimize a function with multiple inputs. Should I use Haskell? Does one use the same libraries for this that one uses to train a neural network?
10:39:24 <merijn> And the error reporting logic is (well, was a few years ago, at least) fairly hackable
10:39:48 <merijn> So I don't think "inhibit code sample from errors" would be a hard or controversial feature
10:40:18 <merijn> Gurkenglas: Well, depends a bit on "do you know *anything* about the function?"
10:41:01 <tomsmeding> Gurkenglas: does your function have a computable derivative (and do you have it written out or do you need automatic differentiation)? If so, would gradient descent be sufficient? Or would you want a genetic algorithm, or some other specific algorithm? Or do you want a batteries-included optimisation toolkit that figures it all out by itself?
10:41:12 <merijn> There's a whole numerical theory field of maths on analysing things and things like linear solver, derivatives, etc.
10:41:33 <Gurkenglas> tomsmeding, the latter
10:41:54 <tomsmeding> Gurkenglas: then find the toolkit, and choose the language that the toolkit supports :p
10:41:56 <tomsmeding> not the other way round
10:42:16 <merijn> Yeah, that
10:42:59 <Gurkenglas> merijn, each function is specified by a short definition, not necessarily constructive (because "min" is an allowed term in the hypothetical DSL). If the toolkit tries solving it analytically first thats fine
10:43:03 <tomsmeding> and note that which toolkit is best depends on the properties of your function
10:43:04 <fendor> [exa], maybe you want -fno-caret-diagnostics?
10:43:16 lotuseater joins (~user@p200300e787030b0000a24874ceb5ca88.dip0.t-ipconnect.de)
10:43:28 <tomsmeding> Gurkenglas: have you tried mathematica or wolfram-alpha?
10:43:41 <Gurkenglas> tomsmeding, surely there's a toolkit thats worse only by a constant than the others because it calls them?
10:43:42 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:43:45 <tomsmeding> or matlab or maple or
10:44:01 johs parts (sid246410@gateway/web/irccloud.com/x-vwtcqxowszipwyyc) ()
10:44:19 <tomsmeding> Gurkenglas: no algorithm can minimise all functions optimally, which approach is best depends on what you know about your function
10:44:29 <tomsmeding> and note that a combination of algorithms is still an algorithm
10:44:50 <merijn> Something, something, No Free Lunch theorem
10:45:01 <Gurkenglas> Ideally, the approach would leave me able to help when the toolkit doesn't find an answer alone, and the language wouldn't drive me insane when I build a job on that.
10:45:34 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
10:46:00 <Gurkenglas> oh i suppose there is actually no better way to combine two toolkits than running them both if one makes absolutely no assumptions about the function (or set of functions)
10:46:37 <tomsmeding> Gurkenglas: the function that is 1 on Q and 0 on R\Q is also a function
10:46:45 <tomsmeding> "no assumptions" is strong :p
10:47:18 <tomsmeding> but, the point is, find the framework, and I know very little about actual real-world libraries :p
10:47:19 <Gurkenglas> tomsmeding, yea and some of the libraries would assume such functions forbidden and some wouldn't and the metatoolkit would presumably converge to using the one t hat doesn't
10:47:31 <tomsmeding> true
10:48:11 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
10:48:13 <tomsmeding> try mathematica, and if that doesn't work: determine what exactly is the component of your language that mathematica can't handle, and focus your search on that
10:48:56 <tomsmeding> all the "usual" stuff in analytical math is covered by mathematica
10:49:03 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
10:50:02 <fendor> is `Eq b => b` less polymorphic than just `a`?
10:50:36 <tomsmeding> there are less types that fit
10:51:15 <fendor> yeah
10:52:27 <merijn> You don't know that :p
10:52:29 × timCF quits (~i.tkachuk@200-149-20-81.sta.estpak.ee) (Quit: leaving)
10:52:46 <Taneb> If I have a function with type "forall a. a -> Bool", I know that it's constant
10:53:28 <Taneb> If I have a function with type "forall a. Eq a => a -> Bool", it could be constant, or it could be something like \x -> x == x, which might not be constant for some Eq instances
10:55:24 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
10:56:12 carp joins (5c17283b@host-92-23-40-59.as13285.net)
10:59:55 <mniip> well it is certainly of the form \x -> f (x == x), for some f :: Bool -> Bool
11:00:03 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 248 seconds)
11:00:11 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
11:00:31 jacks2 joins (~bc8134e3@199.204.85.195)
11:00:53 <Taneb> Yes
11:02:24 Alleria joins (~textual@mskresolve-a.mskcc.org)
11:02:34 stree joins (~stree@68.36.8.116)
11:02:47 Alleria is now known as Guest48425
11:04:07 <jacks2> Taneb, what do you mean? \x -> x == x should always return True, assuming non-broken Eq instance
11:04:27 <mniip> that's an assumption
11:04:35 <Taneb> jacks2: I'm not assuming a non-broken Eq instance
11:04:40 <Taneb> > (\x -> x == x) (0/0)
11:04:41 <lambdabot> False
11:05:33 <jacks2> Taneb, I'm not sure I see the point in not assuming that. particularly when answering questions from someone new to haskell
11:05:56 <Taneb> jacks2: I don't think fendor's new to Haskell? I'm sure I've seen their username a lot before
11:08:30 <fendor> I am not new T_T just wanted to confirm it before going down a rabbit hole of wrong assumptions
11:10:12 <jacks2> broken Eq instances have nothing to do with Eq a being less polymorphic than a
11:10:14 <merijn> fendor: I mean, you're gonna need a definition of "more/less polymorphic" first
11:10:44 <merijn> People are all reacting from their gut idea of what "less polymorphic" means
11:10:49 <merijn> But that seems counterproductive
11:11:31 <Taneb> jacks2: I was justifying that forall a. a has different properties to forall a. Eq a
11:11:40 <merijn> Is "polymorphism" measured by the cardinality of the types that can "fit" (whatever that means) into a type variable?
11:11:43 <Taneb> *+ => a
11:12:13 <merijn> If yes, then you can't say anything about "Foo a => a" vs "a", because there's no reason Foo's cardinality *can't* include all possible types
11:12:21 <merijn> Consider "instance Foo a where ..."
11:12:29 <fendor> merijn, ghc manual didnt define it more detailed
11:12:33 <merijn> So clearly cardinality doesn't make sense
11:12:48 <fendor> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/pragmas.html?highlight=specialisation#specialize-pragma
11:12:51 <merijn> But I wouldn't know what else to use
11:13:34 × vs^ quits (vs@ip98-184-89-2.mc.at.cox.net) ()
11:14:19 <merijn> fendor: I'm not sure there's a hard definition of that terminology
11:14:33 <merijn> Ask in #ghc (and update the docs when you find out ;))
11:15:01 <fendor> ok, will do!
11:17:47 vv8 joins (~egp_@128-71-69-136.broadband.corbina.ru)
11:18:24 × kiweun quits (~kiweun@2607:fea8:2a62:9600:e8b5:adb7:6f5d:778c) (Remote host closed the connection)
11:21:14 × __minoru__shirae quits (~shiraeesh@5.101.59.224) (Ping timeout: 246 seconds)
11:22:47 kiweun joins (~kiweun@2607:fea8:2a62:9600:c64:2029:5aee:a1f3)
11:28:09 <joel135> There's also the word "parametric".
11:29:12 Iryon joins (~Iryon@185-12-21-77.sigma.jaslo.pl)
11:32:24 × xff0x quits (~xff0x@2001:1a81:52c6:f900:b4b3:1e00:bd22:9f8d) (Ping timeout: 246 seconds)
11:33:11 × kiweun quits (~kiweun@2607:fea8:2a62:9600:c64:2029:5aee:a1f3) (Remote host closed the connection)
11:33:24 <tomsmeding> merijn: well the set of types that can unify with 'forall a. Eq a => a' is certainly a subset of those that unify with 'forall a. a'; whether that subset is a _proper_ subset is irrelevant I'd say
11:33:30 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
11:33:36 xff0x joins (~xff0x@2001:1a81:52c6:f900:8bb9:4c7a:ec7:b51f)
11:34:09 <tomsmeding> whereas the inverse subset relation only holds if you further assume that there is an 'instance Eq a where'
11:34:51 <tomsmeding> but if you start assuming things about which instances exist, your "more polymorphic than" relation suddenly got a lot murkier
11:34:55 __minoru__shirae joins (~shiraeesh@5.101.59.224)
11:36:15 <tomsmeding> I'd say type scheme A is less polymorphic than type scheme B if for all sets possible of instance declarations in scope, any type that can fit in a hole of type A can also fit in a hole of type B
11:36:16 <merijn> tomsmeding: It's irrelevant if you treat define "more/less" as a subset relationship, yes. But not if you use cardinality
11:36:27 <merijn> tomsmeding: Hence my "you need to define more/less polymorphic first"
11:36:34 <tomsmeding> very true
11:37:43 <tomsmeding> though the cardinality definition makes no sense to me anyway
11:37:46 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
11:38:07 <tomsmeding> what is the cardinality of the set of types that match 'a'? Is that bigger or smaller than the cardinality of the set of types matching '[a]'?
11:40:50 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
11:42:43 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.1)
11:45:16 <AWizzArd> Which is "better" (i.e. faster) for compiling with GHC?
11:45:18 <AWizzArd> a) AMD Ryzen 9 5950X, Cores: 16 Threads: 32, Single Thread: 3,494 MOps/Sec or
11:45:21 <AWizzArd> b) AMD EPYC 7502P, Cores: 32 Threads: 64, Single Thread: 1,777 MOps/Sec
11:45:57 Wuzzy joins (~Wuzzy@p5790e46d.dip0.t-ipconnect.de)
11:46:47 × edwtjo quits (~edwtjo@fsf/member/edwtjo) (Ping timeout: 246 seconds)
11:48:56 × MichaelFreeman quits (2d136c0c@45-19-108-12.lightspeed.tukrga.sbcglobal.net) (Quit: Connection closed)
11:50:50 <tdammers> my guess would be a)
11:51:02 jpds joins (~jpds@gateway/tor-sasl/jpds)
11:51:37 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
11:51:55 <tdammers> twice as many threads at half the speed should theoretically be on par, but only if you can fully exhaust them all. for anything that doesn't max out on parallelism, the higher single-core speed is going to win.
11:52:34 <tdammers> though I have no idea how either machine would fare in terms of RAM, cache, disk I/O, and all that
11:53:01 edwtjo joins (~edwtjo@h-7-145.A213.priv.bahnhof.se)
11:53:01 × edwtjo quits (~edwtjo@h-7-145.A213.priv.bahnhof.se) (Changing host)
11:53:01 edwtjo joins (~edwtjo@fsf/member/edwtjo)
11:53:49 <AWizzArd> I would also guess that fewer threads but with more performance each should be more useful.
11:53:58 nrh^ joins (nrh@ip98-184-89-2.mc.at.cox.net)
11:54:06 rodriga joins (~quassel@134.204.25.66)
11:55:25 <fendor> In my experience, building ghc rarely utilises all my 16 cores. So, a) sounds better to me, too
11:55:43 <fendor> *16 threads
11:57:51 <rodriga> Hmm is there a macro or something in Haskell that automatically finds callers, changes callers to thread arguments to their children, or to convert to Monads?
12:00:55 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
12:01:15 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:01:27 urodna joins (~urodna@unaffiliated/urodna)
12:04:04 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
12:05:37 geekosaur joins (82650c7a@130.101.12.122)
12:06:06 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
12:09:25 × m1dnight_ quits (~m1dnight@188.ip-51-91-158.eu) (Quit: WeeChat 2.4)
12:09:41 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
12:10:22 m1dnight_ joins (~m1dnight@188.ip-51-91-158.eu)
12:11:11 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
12:11:42 <merijn> fendor: there's some work on parallelising GHC, I think?
12:12:28 <merijn> Biggest problem right now is that Cabal uses "ghc --make" so package builds aren't parallel as long as GHC isn't really parallel
12:12:44 <fendor> but ghc is parallel in compiling modules, right?
12:13:06 <fendor> *compiling modules that have no interdependency
12:13:23 <fendor> *compiling the module graph
12:13:50 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
12:13:59 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:ef73:96e:9562:7f87) (Ping timeout: 260 seconds)
12:15:32 × aVikingTrex quits (789a2138@120.154.33.56) (Quit: Connection closed)
12:16:53 todda7 joins (~torstein@athedsl-09242.home.otenet.gr)
12:19:00 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
12:20:06 rnat2 joins (uid73555@gateway/web/irccloud.com/x-fvqffrxzjqvhxxzw)
12:21:41 × rprije quits (~rprije@59-102-63-15.tpgi.com.au) (Ping timeout: 240 seconds)
12:22:01 Deide joins (~Deide@217.155.19.23)
12:25:19 <merijn> fendor: I'm not sure it is, tbh
12:25:33 <merijn> Not nearly as much as it could be, anyway
12:26:09 ericsagn1 joins (~ericsagne@2405:6580:0:5100:3653:fd0e:1076:1c7b)
12:26:58 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 240 seconds)
12:29:51 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
12:30:40 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection)
12:31:21 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
12:33:13 × __minoru__shirae quits (~shiraeesh@5.101.59.224) (Ping timeout: 252 seconds)
12:34:03 aishstha joins (1b221163@27.34.17.99)
12:36:41 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:39:03 bitmagie joins (~Thunderbi@200116b806def70019cb251edf03c083.dip.versatel-1u1.de)
12:39:04 ddellacosta joins (~ddellacos@86.106.143.213)
12:39:30 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-yqepddmznaiakcld) (Quit: Connection closed for inactivity)
12:40:26 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:41:23 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 248 seconds)
12:42:46 <fendor> well, it builds a module graph, and prallelising compilation on this graph is not too complicated. But I also think that there might be bigger gains in parallel compilation of a module
12:43:13 <fendor> Or rather, I can imagine, as I have not really an idea whether it actually would benefit anything
12:43:23 × ddellacosta quits (~ddellacos@86.106.143.213) (Ping timeout: 260 seconds)
12:45:01 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
12:46:03 × geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
12:46:45 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5c9f:f9c:c668:a47e)
12:46:56 carlomagno joins (~cararell@148.87.23.13)
12:47:27 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
12:48:00 ukari joins (~ukari@unaffiliated/ukari)
12:48:15 <merijn> fendor: You are right *in theory*
12:48:38 <merijn> But I don't think GHC is architected to really make use of that effectively yet
12:48:41 × bitmagie quits (~Thunderbi@200116b806def70019cb251edf03c083.dip.versatel-1u1.de) (Quit: bitmagie)
12:49:11 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
12:49:24 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
12:52:14 geekosaur joins (82650c7a@130.101.12.122)
12:52:23 ADG1089 joins (~aditya@223.226.239.183)
12:52:49 <ADG1089> @pl readArray arr r >>= \v -> writeArray arr r $ max v v'
12:52:49 <lambdabot> writeArray arr r . max v' =<< readArray arr r
12:53:02 <ADG1089> hmm, not worth it
12:55:08 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
12:56:43 × aishstha quits (1b221163@27.34.17.99) (Ping timeout: 240 seconds)
12:57:14 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
13:00:44 <geekosaur> @pl \arr r -> readArray arr r >>= \v -> writeArray arr r $ max v v'
13:00:44 <lambdabot> ap (ap . ((>>=) .) . readArray) (flip flip (max v') . ((.) .) . writeArray)
13:00:48 <geekosaur> oy
13:01:29 solvr joins (57e3c46d@87.227.196.109)
13:02:36 <ADG1089> holy fucking shit wtf that pl resulted in
13:03:31 andreabedini joins (~andreabed@8s8kj6nq8lb1xsln9frf.ip6.superloop.com)
13:04:39 <merijn> :p
13:04:44 <merijn> Don't trust @pl :p
13:04:59 <mniip> pl stands for perl
13:05:17 <merijn> pl stands for pointless, which is much funnier :p
13:06:51 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5c9f:f9c:c668:a47e) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:07:32 <ADG1089> what does Foo.\.\.\ mean in prof? I am seeing this for chained monadic computations in do notation
13:07:54 <geekosaur> each \ is an unnamed lambda somewhere under Foo
13:08:16 <geekosaur> (unnamed lambda is redundant…)
13:08:38 <ADG1089> oh, that would be my lambda as last argument for forM_
13:09:17 cafce25 joins (~cafce25@ipbcc3009d.dynamic.kabel-deutschland.de)
13:09:42 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5c9f:f9c:c668:a47e)
13:09:51 <ADG1089> is prof binaries slower if i don't pass RTS args?
13:10:08 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Remote host closed the connection)
13:10:15 <ADG1089> I think this is the case, just wanted to confirm
13:10:38 <geekosaur> perf disables most optimizations because they'd interfere with profiling, yes
13:10:58 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
13:12:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:15:27 feb6 joins (67cb4855@103.203.72.85)
13:15:51 <feb6> Hey
13:17:58 <geekosaur> hello
13:19:29 × feb6 quits (67cb4855@103.203.72.85) (Client Quit)
13:22:37 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
13:23:35 stree joins (~stree@68.36.8.116)
13:24:37 barthandelous joins (~cbrzezins@2600:1007:b01a:85d2:6685:eca8:992:2c72)
13:25:23 <merijn> ADG1089: They don't have to be, but it is not unlikely that they are
13:26:10 <merijn> ADG1089: (i.e. profiling binaries aren't *always* slower, but "my binaries are slower" is a common and known side-effect of profiling builds)
13:27:25 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
13:27:43 acarrico parts (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) ()
13:28:05 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
13:28:38 waleee-cl joins (uid373333@gateway/web/irccloud.com/x-lyzlpexksowrzqil)
13:30:45 × averell quits (~averell@unaffiliated/averell) (Quit: .)
13:32:51 Tario joins (~Tario@201.192.165.173)
13:33:00 × Franciman quits (~francesco@host-87-20-23-243.retail.telecomitalia.it) (Quit: Leaving)
13:34:07 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
13:41:42 frozenErebus joins (~frozenEre@37.231.244.249)
13:42:05 × geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed)
13:44:10 averell joins (~averell@unaffiliated/averell)
13:45:05 slack1256 joins (~slack1256@201-223-70-219.baf.movistar.cl)
13:49:03 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
13:49:23 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:51:03 <fendor> why is `class (Foo a, Foo a) => Bar a where` not a warning?
13:51:31 <sshine> they unify? :-D
13:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
13:52:14 <sshine> I guess there's room for improvement.
13:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
13:54:14 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
13:56:46 sz0 joins (uid110435@gateway/web/irccloud.com/x-pwzpuvhtwmrmedza)
13:57:32 mmmattyx joins (uid17782@gateway/web/irccloud.com/x-zogxbflcfypzetqv)
13:59:00 × raym quits (~ray@45.64.220.78) (Quit: leaving)
13:59:37 × juri__ quits (~juri@212.86.35.156) (Read error: Connection reset by peer)
14:00:26 × malumore quits (~malumore@151.62.125.43) (Ping timeout: 240 seconds)
14:00:54 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
14:01:11 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
14:01:19 juri_ joins (~juri@212.86.35.156)
14:01:44 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Quit: leaving)
14:01:52 × frozenErebus quits (~frozenEre@37.231.244.249) (Quit: leaving)
14:03:21 LiaoTao_ joins (~LiaoTao@gateway/tor-sasl/liaotao)
14:03:25 hexfive joins (~hexfive@50.35.83.177)
14:03:46 × LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection)
14:04:53 timCF joins (~i.tkachuk@200-149-20-81.sta.estpak.ee)
14:05:19 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5c9f:f9c:c668:a47e) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:10:51 <timCF> Hello! Seems like I do need some help with unlifting. I have a custom monad where I do fun all application code and functions. And I do need to compose them with some IO functions (in my case WAI wants handlers to run in IO). I came up with something like this `grpcServer = withRunInIO $ \run -> runServer $ handlers run` where handlers is list of WAI-like handlers which have to be run in IO. It looks like
14:10:57 <timCF> `handlers run = [run handler0, run handler1, ...]`. It compiles with zero or one handler. But in cases where there is more that one handler (handlers are accepting different types of requests and returning different types of responses) - it refuses to be compiled. How to fix that?
14:13:56 <timCF> It's not exactly like that, handlers are technically have the same high-level type, but some parts of them are specific and I do need to unlift these parts into IO
14:14:09 stef204 joins (~stef204@unaffiliated/stef-204/x-384198)
14:14:10 malumore joins (~malumore@151.62.125.43)
14:15:13 <andreabedini> timCF: I am very unfamiliar with unlifitng but to me it looks like the main problem you are having is putting things of different type into a list
14:15:19 carp parts (5c17283b@host-92-23-40-59.as13285.net) ()
14:15:41 <andreabedini> timCF: what's the type of runServer?
14:16:07 × astroanax quits (~astroanax@cosmic.voyage) (Read error: Connection reset by peer)
14:17:17 × rodriga quits (~quassel@134.204.25.66) (Read error: Connection reset by peer)
14:17:30 <timCF> andreabedini: it's complicated -_- if simplified it's something like `runServer :: [ServerHandler] -> IO ()`
14:18:43 Codaraxis_ joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
14:19:08 <timCF> andreabedini: items in list have to be the same type `ServerHandler`. And I though this function `run` for unlifting could be generic `m a -> IO a`. But seems like GHC does not agree
14:19:36 frozenErebus joins (~frozenEre@37.231.244.249)
14:20:05 <merijn> timCF: You need a more polymorphic version
14:20:33 <merijn> timCF: You need: https://hackage.haskell.org/package/unliftio-core-0.2.0.1/docs/Control-Monad-IO-Unlift.html#v:withUnliftIO
14:20:49 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
14:21:05 <merijn> oh, wait, maybe not that one
14:21:18 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Ping timeout: 265 seconds)
14:21:31 <merijn> I think you can't use a lambda
14:22:00 <merijn> You need a Rank2 "runInIO", but rank2 types can't be inferred, so you can't have an unannotated lambda like that
14:22:17 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
14:22:26 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
14:23:15 <timCF> merijn: so I can't pass around `run` function and home that GHC will agree with polymorphic nature of it?
14:23:27 <timCF> merijn: * and hope
14:23:29 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
14:23:40 <merijn> timCF: No, you need to explicitly annotate that it's that polymorphic
14:23:54 jpds joins (~jpds@gateway/tor-sasl/jpds)
14:24:25 <merijn> timCF: Rank2 is *theoretically* inferrible, but the implementation is so complicated that GHC does not do it. So any use of Rank2 polymorphism requires explicit type signatures
14:24:44 <merijn> timCF: Else GHC will infer a Rank1 type, which indeed doesn't type check
14:25:10 <merijn> (if I understand the example correctly, anyway)
14:25:47 <merijn> oh, wait, maybe withUnliftIO *does* solve it
14:26:03 <merijn> timCF: Your handlers all have the same 'm', but different 'a's?
14:26:05 × cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 252 seconds)
14:26:16 <timCF> merijn: yes!
14:26:31 <merijn> timCF: Ok, then withUnliftIO probably will work
14:26:51 <merijn> You'd have to do "\(UnliftIO run) -> ..." then
14:27:17 <merijn> There you piggyback the polymorphic type off of the pattern match on UnliftIO
14:27:21 <timCF> merijn: thanks, I'll try it! Usually `withRunInIO` was enough. Time to learn some new unlifting
14:28:31 <merijn> timCF: withUnliftIO is basically the same, but it stuff the unlifting function in a datatype
14:34:44 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
14:35:10 gxt joins (~gxt@gateway/tor-sasl/gxt)
14:36:45 neysofu joins (~neysofu@net-47-53-239-127.cust.vodafonedsl.it)
14:39:01 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
14:42:33 barthandelous parts (~cbrzezins@2600:1007:b01a:85d2:6685:eca8:992:2c72) ("WeeChat 3.1")
14:42:58 × andreabedini quits (~andreabed@8s8kj6nq8lb1xsln9frf.ip6.superloop.com) (Quit: WeeChat 3.1)
14:44:18 LKoen joins (~LKoen@65.250.88.92.rev.sfr.net)
14:46:22 <timCF> merijn: do I need to enable any GHC extensions or write some magic forall to make this kind plymorphism happen?
14:46:29 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
14:48:02 rodriga joins (~quassel@134.204.25.66)
14:48:21 × hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds)
14:48:45 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
14:50:06 alx741 joins (~alx741@181.196.68.238)
14:50:27 leafiest joins (~leafiest@165.227.53.12)
14:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
14:52:19 <shapr> Is there a Haskell command line argument parser that also generates bash/zsh completion?
14:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
14:52:28 <Uniaika> shapr: not that I know of
14:52:35 <timCF> merijn: nvm, `withUnliftIO` + pattern matching on `run` inside every handler works magically. So cool :)
14:52:39 <Uniaika> would love to see one appear though :-P
14:52:45 <shapr> yea, it would be so nice!
14:52:50 <merijn> shapr: optparse-applicative generates bash completion...
14:52:53 shapr adds it to list o fprojects
14:52:56 <maerwald> and zsh
14:52:56 <shapr> merijn: oh neat!
14:52:58 <maerwald> and fish
14:53:19 <merijn> shapr: https://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion
14:53:35 Sorna joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk)
14:54:44 astroanax joins (~astroanax@cosmic.voyage)
14:54:47 × astroanax quits (~astroanax@cosmic.voyage) (Remote host closed the connection)
14:55:05 × timCF quits (~i.tkachuk@200-149-20-81.sta.estpak.ee) (Quit: leaving)
14:55:37 × danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Quit: WeeChat 3.0)
14:55:44 astroanax joins (~astroanax@cosmic.voyage)
14:56:25 × astroanax quits (~astroanax@cosmic.voyage) (Client Quit)
14:56:25 × ADG1089 quits (~aditya@223.226.239.183) (Remote host closed the connection)
14:56:51 × Sornaensis quits (~Sornaensi@79.142.232.102) (Ping timeout: 268 seconds)
14:56:54 astroanax joins (~astroanax@cosmic.voyage)
14:57:09 × slack1256 quits (~slack1256@201-223-70-219.baf.movistar.cl) (Remote host closed the connection)
14:58:02 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
14:58:12 xintron joins (~xintron@unaffiliated/xintron)
14:59:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
15:02:09 nbloomf joins (~nbloomf@2600:1700:ad14:3020:c0f9:65c3:e496:bb55)
15:03:26 myShoggoth joins (~myShoggot@75.164.73.93)
15:08:09 renzhi joins (~renzhi@2607:fa49:653f:a800::4223)
15:08:47 × frozenErebus quits (~frozenEre@37.231.244.249) (Remote host closed the connection)
15:11:11 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
15:12:56 <mikoto-chan> http://haskell.moe
15:13:10 <mikoto-chan> can we make this the new homepage? (seriously, who did this ...)
15:13:20 <mikoto-chan> sorry for off-topic
15:13:41 <joel135> LOL
15:14:06 <maerwald> what the...
15:14:13 cfricke joins (~cfricke@unaffiliated/cfricke)
15:15:01 × Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection)
15:15:28 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
15:15:30 <shapr> wow
15:16:06 jamm_ joins (~jamm@unaffiliated/jamm)
15:16:22 <SrPx> the world really needs a great compile target for lazy functional languages
15:18:53 <Uniaika> the website is written in Elm
15:19:13 <Uniaika> this is a psyop from Evan Czaplicki
15:19:32 <mikoto-chan> SrPx: wdym? isn't Haskell converted to C--?
15:19:35 × rnat2 quits (uid73555@gateway/web/irccloud.com/x-fvqffrxzjqvhxxzw) (Quit: Connection closed for inactivity)
15:19:43 × renzhi quits (~renzhi@2607:fa49:653f:a800::4223) (Ping timeout: 260 seconds)
15:20:12 mkDoku joins (~TheMule@aftr-37-201-195-134.unity-media.net)
15:20:31 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 260 seconds)
15:20:56 <Uniaika> C-- is just an IR
15:20:57 × jared-w quits (uid405292@gateway/web/irccloud.com/x-rnbmhydgaqdkakar) (Ping timeout: 246 seconds)
15:21:09 <mikoto-chan> IR?
15:21:23 × lally quits (sid388228@gateway/web/irccloud.com/x-gbqjirenobjcbvnf) (Read error: Connection reset by peer)
15:21:25 <Uniaika> intermediate representation
15:21:34 <Uniaika> it's neither written nor executed
15:21:35 × AndreasK quits (sid320732@gateway/web/irccloud.com/x-eidzpdpfbfwjvsap) (Ping timeout: 258 seconds)
15:21:39 × Kronic quits (sid480486@gateway/web/irccloud.com/x-sogthtpigifensav) (Ping timeout: 246 seconds)
15:21:52 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:21:58 × sz0 quits (uid110435@gateway/web/irccloud.com/x-pwzpuvhtwmrmedza) (Ping timeout: 258 seconds)
15:22:00 × bradparker quits (sid262931@gateway/web/irccloud.com/x-alrapzbsgpgzezql) (Ping timeout: 246 seconds)
15:22:02 × kritzefitz quits (~kritzefit@2003:5b:203b:200::10:49) (Remote host closed the connection)
15:22:31 × ryjm quits (sid383513@gateway/web/irccloud.com/x-rytbgkxcijotxbrx) (Ping timeout: 260 seconds)
15:22:42 × b20n quits (sid115913@gateway/web/irccloud.com/x-cpvmpaurqzesjgkd) (Ping timeout: 246 seconds)
15:22:59 × eruditass quits (uid248673@gateway/web/irccloud.com/x-klumzwpapdvaujzz) (Read error: Connection reset by peer)
15:23:03 × luite quits (sid387799@gateway/web/irccloud.com/x-qxspjhytgxkdqwya) (Ping timeout: 246 seconds)
15:23:04 AndreasK joins (sid320732@gateway/web/irccloud.com/x-gcnznttjjbhixeuo)
15:23:07 × SrPx quits (sid108780@gateway/web/irccloud.com/x-osyhmktkohqkykco) (Ping timeout: 258 seconds)
15:23:08 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
15:23:18 × davetapley quits (sid666@gateway/web/irccloud.com/x-eshsepxkfgbkcmsh) (Ping timeout: 240 seconds)
15:23:21 × benwr____ quits (sid372383@gateway/web/irccloud.com/x-uenzuwtlldjmmcdm) (Read error: Connection reset by peer)
15:23:24 × aristid quits (sid1599@gateway/web/irccloud.com/x-ysqngkztcmdqkqid) (Ping timeout: 246 seconds)
15:23:25 × cemerick quits (sid54985@gateway/web/irccloud.com/x-txjnffnulowyownu) (Read error: Connection reset by peer)
15:23:30 × wpcarro quits (sid397589@gateway/web/irccloud.com/x-bfzhxrazngrwpnxy) (Ping timeout: 258 seconds)
15:23:35 × Synthetica quits (uid199651@gateway/web/irccloud.com/x-holtfbrhdrkajcob) (Ping timeout: 250 seconds)
15:23:53 × acidjnk_new quits (~acidjnk@p200300d0c72b9510b1ed14260384c0cf.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
15:23:55 × ReinH quits (sid179972@gateway/web/irccloud.com/x-mdfvdtnchulmcuzi) (Ping timeout: 260 seconds)
15:24:00 × etrepum quits (sid763@gateway/web/irccloud.com/x-vbtdfooevtgiicbj) (Read error: Connection reset by peer)
15:24:15 eruditass joins (uid248673@gateway/web/irccloud.com/x-evyqqistlgviwlwv)
15:24:27 × natim87 quits (sid286962@gateway/web/irccloud.com/x-cwjpyjilrthqpfcl) (Ping timeout: 246 seconds)
15:24:27 × systemfault quits (sid267009@gateway/web/irccloud.com/x-acclxkcklodfwdsx) (Ping timeout: 246 seconds)
15:24:34 × eruditass quits (uid248673@gateway/web/irccloud.com/x-evyqqistlgviwlwv) (Excess Flood)
15:24:40 etrepum joins (sid763@gateway/web/irccloud.com/x-uvgwvvfyhdnxohap)
15:24:43 jared-w joins (uid405292@gateway/web/irccloud.com/x-keywjzriwtlueymw)
15:24:43 ryjm joins (sid383513@gateway/web/irccloud.com/x-iyuwdoaqqyplkeyd)
15:24:45 b20n joins (sid115913@gateway/web/irccloud.com/x-pctinassjooigaew)
15:24:48 benwr____ joins (sid372383@gateway/web/irccloud.com/x-ynyqxqvppapkphki)
15:24:51 × joshmeredith quits (sid387798@gateway/web/irccloud.com/x-jeivykcxhjpbnbqo) (Ping timeout: 260 seconds)
15:24:51 ReinH joins (sid179972@gateway/web/irccloud.com/x-tsenbknuiamuoknp)
15:24:51 cemerick joins (sid54985@gateway/web/irccloud.com/x-vkgdxbrllbqgyihu)
15:24:52 Synthetica joins (uid199651@gateway/web/irccloud.com/x-igiuipnjkspialln)
15:24:55 lally joins (sid388228@gateway/web/irccloud.com/x-ohojcmfwatqrsdem)
15:24:59 Kronic joins (sid480486@gateway/web/irccloud.com/x-sohccpvegokjgbzc)
15:25:11 bradparker joins (sid262931@gateway/web/irccloud.com/x-vwcnradingzssljd)
15:25:22 aristid joins (sid1599@gateway/web/irccloud.com/x-xoxalrdohmfrqftu)
15:25:25 × d0liver quits (sid363046@gateway/web/irccloud.com/x-mbcyzmiqngfpomhu) (Ping timeout: 258 seconds)
15:25:26 luite joins (sid387799@gateway/web/irccloud.com/x-xdgiulydxgunnqir)
15:25:34 sz0 joins (uid110435@gateway/web/irccloud.com/x-uimgiattmedzcfdn)
15:25:36 eruditass joins (uid248673@gateway/web/irccloud.com/x-mnvqqybakyalqldr)
15:25:45 systemfault joins (sid267009@gateway/web/irccloud.com/x-qisnszkdfwtomtbi)
15:25:52 davetapley joins (sid666@gateway/web/irccloud.com/x-yavshbynwfekjiwv)
15:25:54 joshmeredith joins (sid387798@gateway/web/irccloud.com/x-deyyeanvffjutikl)
15:26:19 d0liver joins (sid363046@gateway/web/irccloud.com/x-vlrurtoubbzrlqmk)
15:26:34 wpcarro joins (sid397589@gateway/web/irccloud.com/x-ecuoponltgnpdqvt)
15:26:40 SrPx joins (sid108780@gateway/web/irccloud.com/x-gxthtwnxdzlzvjtj)
15:26:55 natim87 joins (sid286962@gateway/web/irccloud.com/x-kcrciituhyzojhiq)
15:27:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:28:13 × ulidtko quits (~ulidtko@194.54.80.38) (Remote host closed the connection)
15:28:19 egorbelibov joins (~65676f72@2001:8a0:5708:2a00:3d3b:5fca:52a6:2df1)
15:28:32 × fendor quits (~fendor@178.165.131.170.wireless.dyn.drei.com) (Remote host closed the connection)
15:28:34 ulidtko joins (~ulidtko@194.54.80.38)
15:28:34 Axman5892 joins (~Axman6@pdpc/supporter/student/Axman6)
15:28:42 × egorbelibov quits (~65676f72@2001:8a0:5708:2a00:3d3b:5fca:52a6:2df1) (Remote host closed the connection)
15:28:44 × Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Remote host closed the connection)
15:28:51 fendor joins (~fendor@178.165.131.170.wireless.dyn.drei.com)
15:29:23 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
15:29:50 berberman joins (~berberman@unaffiliated/berberman)
15:30:27 × malumore quits (~malumore@151.62.125.43) (Ping timeout: 248 seconds)
15:31:56 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
15:32:00 × stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds)
15:32:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
15:33:49 kiweun joins (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com)
15:34:50 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:c0f9:65c3:e496:bb55) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:34:55 malumore joins (~malumore@151.62.125.43)
15:36:54 mananamenos joins (~mananamen@62.red-88-11-67.dynamicip.rima-tde.net)
15:37:44 × noexcept quits (~noexcept@noexcept.org) (Read error: Connection reset by peer)
15:38:15 noexcept joins (~noexcept@noexcept.org)
15:38:27 × kiweun quits (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Ping timeout: 248 seconds)
15:40:35 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 248 seconds)
15:44:42 stree joins (~stree@68.36.8.116)
15:45:05 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:46:01 <mananamenos> Hi, I'm in a IO's block and I some functions which return `IO (Maybe a)` and some which return `IO a`. Inside this do block block I have to extract those maybes, use case on then and in case the value is Nothing, I shorcut the whole do block returning. I end up with a very indented to the right code block which is hard to read and is annoying in general. One approach I tried is to wrap every operation in this do block
15:46:01 <mananamenos> ExceptT. With this approach I manually put every IO (Maybe a) giving associating also the Nothings with some message (Left part in ExceptT). This way I only have one case expression on the whole do block, extract the Left message, log it and return error or successfully return Right part. Is this approach somehow weird/wrong? Another way, which I'm considering in changing the body of all the functions returning `IO (Maybe
15:46:02 <mananamenos> a)` to `IO a` (is there is nothing I throw an error). I'm a bit confused of how to structure this the best way.
15:47:31 × neysofu quits (~neysofu@net-47-53-239-127.cust.vodafonedsl.it) (Quit: leaving)
15:49:06 × esph quits (~weechat@unaffiliated/esph) (Ping timeout: 260 seconds)
15:50:06 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
15:50:08 hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga)
15:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
15:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
15:55:53 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
15:56:43 notzmv joins (~zmv@unaffiliated/zmv)
15:59:04 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
16:00:04 × M53K5HUN_8[m] quits (m53k5hun8m@gateway/shell/matrix.org/x-vnkcdqtkiyhfknsf) (Quit: Idle for 30+ days)
16:01:25 v01d4lph4 joins (~v01d4lph4@223.177.183.124)
16:02:26 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:02:47 HannaM joins (~quassel@p54849510.dip0.t-ipconnect.de)
16:03:01 egorbelibov joins (~65676f72@2001:8a0:5708:2a00:3d3b:5fca:52a6:2df1)
16:04:37 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
16:05:55 × v01d4lph4 quits (~v01d4lph4@223.177.183.124) (Ping timeout: 260 seconds)
16:09:15 × cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 246 seconds)
16:11:07 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
16:13:33 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
16:15:34 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:15:38 gxt joins (~gxt@gateway/tor-sasl/gxt)
16:15:55 geekosaur joins (82650c7a@130.101.12.122)
16:17:39 <tomsmeding> mananamenos: the ExceptT approach sounds like the right one
16:17:41 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
16:23:11 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
16:23:11 berberman_ joins (~berberman@unaffiliated/berberman)
16:24:00 × berberman_ quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
16:24:38 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
16:24:54 berberman joins (~berberman@unaffiliated/berberman)
16:25:34 frozenErebus joins (~frozenEre@37.231.244.249)
16:25:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:29:04 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Quit: WeeChat 3.1)
16:33:02 × justanotheruser quits (justanothe@gateway/vpn/protonvpn/justanotheruser) (Ping timeout: 260 seconds)
16:40:29 × jacks2 quits (~bc8134e3@199.204.85.195) (Quit: CGI:IRC (Session timeout))
16:46:30 kiweun joins (~kiweun@2607:fea8:2a62:9600:c57c:ce7d:dcca:9af1)
16:46:49 × kiweun quits (~kiweun@2607:fea8:2a62:9600:c57c:ce7d:dcca:9af1) (Read error: Connection reset by peer)
16:48:14 __minoru__shirae joins (~shiraeesh@5.101.59.224)
16:51:48 × nrh^ quits (nrh@ip98-184-89-2.mc.at.cox.net) ()
16:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
16:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
16:53:04 × Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 2.8)
16:54:48 Sorny joins (~Sornaensi@077213203030.dynamic.telenor.dk)
16:55:36 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:56:01 darkon joins (~darkon@90.214.167.201)
16:57:54 × Sorna quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 265 seconds)
16:59:36 × coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
16:59:41 × Major_Biscuit quits (~Major_Bis@82-169-100-198.biz.kpn.net) (Ping timeout: 260 seconds)
17:00:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
17:00:32 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
17:00:34 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
17:04:36 vicfred joins (~vicfred@unaffiliated/vicfred)
17:04:47 coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl)
17:05:52 justanotheruser joins (justanothe@gateway/vpn/protonvpn/justanotheruser)
17:07:35 × kuribas quits (~user@ptr-25vy0i7wi7nt82wi9fp.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
17:09:09 hiroaki joins (~hiroaki@2a02:908:4b18:8c40:1137:7482:fd5a:b039)
17:19:02 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
17:20:50 bitmapper joins (uid464869@gateway/web/irccloud.com/x-nyysfddoxuidbcdr)
17:21:25 <fresheyeball> is there a way to to see the history of this IRC?
17:22:13 <monochrom> see topic
17:22:22 × sz0 quits (uid110435@gateway/web/irccloud.com/x-uimgiattmedzcfdn) (Quit: Connection closed for inactivity)
17:23:26 <fresheyeball> monochrom: I don't understand
17:23:56 <monochrom> Use the /topic command, then look for the substring "Logs:", then look for the URL after.
17:24:04 <fresheyeball> oh cool
17:24:25 <monochrom> Recommended reading the whole thing entirely.
17:24:57 <glguy> yes, please read the whole log ;-)
17:25:07 <monochrom> haha
17:25:20 <fresheyeball> I think that would take some time
17:25:37 <monochrom> But please don't revive a conversation that ended more than an hour ago.
17:25:45 <maerwald> don't trust ppl on the internet
17:26:02 <fresheyeball> Well I got some really good help last night on #ghc, and now I can't remeber a thing
17:26:17 <maerwald> what did you do afterwards?
17:26:28 <geekosaur> #ghc is its own channel, and afaict has no logs
17:26:41 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 240 seconds)
17:26:50 <maerwald> I have #ghc logs
17:26:56 <monochrom> This is why I instruct my irc client to keep logs for a week, or maybe 10 days, I forgot.
17:27:24 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
17:27:33 <maerwald> You delete logs?
17:27:45 <monochrom> Yes
17:29:49 <maerwald> fresheyeball: https://paste.tomsmeding.com/sVgPvang
17:30:18 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e)
17:31:29 <maerwald> fresheyeball: second part (from today, not yesterday) https://paste.tomsmeding.com/Co1LXasu
17:32:15 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds)
17:32:18 unlink_ joins (~unlink2@p57b853bf.dip0.t-ipconnect.de)
17:32:41 <fresheyeball> maerwald: amazing!
17:32:50 × geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed)
17:33:06 geekosaur joins (82650c7a@130.101.12.122)
17:33:14 <fresheyeball> wait I need the rest of the conversation
17:33:28 <fresheyeball> oh you already sent it
17:33:35 × unlink2 quits (~unlink2@p200300ebcf254d00a495fbc96206c979.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
17:33:58 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 240 seconds)
17:34:39 Sheilong joins (uid293653@gateway/web/irccloud.com/x-yckkwdautnlneayq)
17:36:59 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
17:40:03 × mkDoku quits (~TheMule@aftr-37-201-195-134.unity-media.net) (Ping timeout: 248 seconds)
17:40:09 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
17:40:42 × geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
17:43:10 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
17:43:43 gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com)
17:46:43 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
17:47:09 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
17:51:23 × NinjaTrappeur quits (~ninja@unaffiliated/ninjatrappeur) (Ping timeout: 260 seconds)
17:52:41 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
17:53:29 × hypercube quits (hypercube@gateway/vpn/protonvpn/hypercube) (Ping timeout: 265 seconds)
17:53:48 × rajivr quits (uid269651@gateway/web/irccloud.com/x-bfdpumpohvpxzdht) (Quit: Connection closed for inactivity)
17:56:29 geekosaur joins (82650c7a@130.101.12.122)
17:57:37 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
17:58:38 ukari joins (~ukari@unaffiliated/ukari)
17:59:29 howdoi joins (uid224@gateway/web/irccloud.com/x-ucsrbnmysyuxrtpn)
18:05:09 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
18:06:02 stree joins (~stree@68.36.8.116)
18:10:12 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
18:10:58 × concept2 quits (~concept2@unaffiliated/tubo) (Quit: See ya later!)
18:11:00 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
18:11:27 avn joins (~avn@78-56-108-78.static.zebra.lt)
18:12:58 × typetetris quits (uid275937@gateway/web/irccloud.com/x-remmslgdlkipcjiq) (Quit: Connection closed for inactivity)
18:13:39 × HannaM quits (~quassel@p54849510.dip0.t-ipconnect.de) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:13:43 × Iryon quits (~Iryon@185-12-21-77.sigma.jaslo.pl) (Remote host closed the connection)
18:14:05 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:3653:fd0e:1076:1c7b) (Ping timeout: 258 seconds)
18:15:12 thriqon joins (~thriqon@HSI-KBW-46-223-163-79.hsi.kabel-badenwuerttemberg.de)
18:17:30 concept2 joins (~concept2@unaffiliated/tubo)
18:19:09 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
18:19:58 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
18:21:50 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
18:23:30 × deviantfero quits (~deviantfe@190.150.27.58) (Quit: WeeChat 3.1)
18:23:49 deviantfero joins (~deviantfe@190.150.27.58)
18:24:59 × xff0x quits (~xff0x@2001:1a81:52c6:f900:8bb9:4c7a:ec7:b51f) (Ping timeout: 260 seconds)
18:25:49 chiki joins (5819fc6f@111.red-88-25-252.staticip.rima-tde.net)
18:25:56 ericsagn1 joins (~ericsagne@2405:6580:0:5100:d2e3:b034:3303:1a96)
18:25:58 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
18:26:10 xff0x joins (~xff0x@141.98.255.145)
18:26:25 nrh^ joins (wear_a_mas@ip98-184-89-2.mc.at.cox.net)
18:26:44 <chiki> Hi. Is there a predefined function in Haskell to convert a Word8 into its hexadecimal representation?
18:27:08 × coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
18:27:41 × justanotheruser quits (justanothe@gateway/vpn/protonvpn/justanotheruser) (Ping timeout: 240 seconds)
18:28:18 × Codaraxis_ quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Ping timeout: 240 seconds)
18:28:24 <geekosaur> :t showHex
18:28:25 <lambdabot> (Integral a, Show a) => a -> ShowS
18:28:29 <geekosaur> @index showHex
18:28:29 <lambdabot> Numeric
18:28:36 <chiki> oh, thanks!
18:28:56 <xsperry> there's also printf :)
18:29:01 × egorbelibov quits (~65676f72@2001:8a0:5708:2a00:3d3b:5fca:52a6:2df1) (Remote host closed the connection)
18:29:01 <srk> or printf from Text.Printf ^^
18:29:11 × deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 240 seconds)
18:30:53 hexagenic joins (~mattias@81-224-107-147-no71.tbcn.telia.com)
18:31:04 <chiki> printf seems overkill ^^ showHex will sufice
18:31:08 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:31:08 deviantfero joins (~deviantfe@190.150.27.58)
18:31:28 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:31:37 <geekosaur> just watch out for the ShowS
18:32:29 NinjaTrappeur joins (~ninja@unaffiliated/ninjatrappeur)
18:32:31 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal)
18:32:49 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:34:09 chiki parts (5819fc6f@111.red-88-25-252.staticip.rima-tde.net) ()
18:34:56 fendor_ joins (~fendor@91.141.2.173.wireless.dyn.drei.com)
18:35:31 × xff0x quits (~xff0x@141.98.255.145) (Ping timeout: 248 seconds)
18:36:41 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
18:36:58 × fendor quits (~fendor@178.165.131.170.wireless.dyn.drei.com) (Ping timeout: 240 seconds)
18:37:22 xff0x joins (~xff0x@2001:1a81:52c6:f900:8bb9:4c7a:ec7:b51f)
18:37:31 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
18:40:06 × mursu quits (~ngWalrus@46.101.150.54) (Ping timeout: 240 seconds)
18:41:37 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1)
18:41:53 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
18:42:10 × pjb quits (~t@2a01cb04063ec500d0cbc77584c6a81b.ipv6.abo.wanadoo.fr) (Quit: upgrading to Bug Sure :-/)
18:43:17 × noCheese quits (~nocheese@unaffiliated/nocheese) (Ping timeout: 246 seconds)
18:45:31 × hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
18:46:44 Guest_29 joins (a2ec0862@162-236-8-98.lightspeed.sntcca.sbcglobal.net)
18:46:57 coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl)
18:47:47 × Guest_29 quits (a2ec0862@162-236-8-98.lightspeed.sntcca.sbcglobal.net) (Client Quit)
18:48:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:48:36 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:51:19 mkDoku joins (~TheMule@aftr-37-201-195-134.unity-media.net)
18:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
18:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
18:52:53 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:53:16 × solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed)
18:53:30 solvr joins (57e3c46d@87.227.196.109)
18:53:40 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 268 seconds)
18:54:11 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 248 seconds)
18:56:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:57:14 fendor_ is now known as fendor
18:57:56 <fendor> can I define haddock documentation for a field in a data type? Assuming, no record syntax.
18:58:09 <monochrom> I think yes
18:58:23 <monochrom> Do you have access to haddock's manual?
18:59:04 xhlr parts (~xhlr@static.144.156.216.95.clients.your-server.de) ()
18:59:23 <fendor> it is probably on the internet, so I assume so
18:59:26 <monochrom> https://haskell-haddock.readthedocs.io/en/latest/markup.html#constructors-and-record-fields
18:59:45 <monochrom> It also comes with GHC, on your hard disk
19:00:20 <fendor> that's hard to find though!
19:00:28 <fendor> on the harddisk, I mean
19:00:34 jamm_ joins (~jamm@unaffiliated/jamm)
19:00:41 <fendor> ok great, I think I can find a bug report for HLS then
19:00:42 <monochrom> Look under <prefix>/share/doc for much goodies
19:00:45 <fendor> *file
19:01:01 × mkDoku quits (~TheMule@aftr-37-201-195-134.unity-media.net) (Ping timeout: 260 seconds)
19:01:07 minoru_shiraeesh joins (~shiraeesh@109.166.57.223)
19:01:25 <monochrom> <prefix>/share/doc/ghc-<version>/html
19:01:31 xhlr joins (~xhlr@static.144.156.216.95.clients.your-server.de)
19:01:38 × __minoru__shirae quits (~shiraeesh@5.101.59.224) (Ping timeout: 240 seconds)
19:02:01 <monochrom> GHC user's guide, library doc for libraries that come with GHC, haddock
19:03:11 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e)
19:03:31 × idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 268 seconds)
19:04:05 <fendor> good to remember, thank you!
19:05:00 <tomsmeding> oooooh
19:05:05 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e) (Client Quit)
19:05:07 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
19:05:29 <geekosaur> https://downloads.haskell.org/ghc/latest/docs/html/
19:05:36 <tomsmeding> yay 'base' haddocks on my local disk
19:06:13 <tomsmeding> that will save hackage some bandwidth
19:06:47 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e)
19:07:10 <monochrom> My reason for preferring local, comes-with-the-installation docs is that online docs are always the wrong version.
19:07:18 fiedlr joins (~fiedlr@83.148.33.254)
19:08:17 <geekosaur> oh good, ghcup does install them
19:08:52 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
19:08:54 <fendor> I agree, the first ghc manual link is almost always the wrong version
19:09:04 <monochrom> Only linux distros butcher the docs into separate "packages".
19:09:37 <geekosaur> you can replace "latest" with a specific version
19:09:46 <monochrom> ghcup and stack pick from official builds, but all official builds have docs built.
19:11:19 × coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
19:12:50 <mananamenos> tomsmeding, thank you
19:14:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
19:17:36 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Read error: Connection reset by peer)
19:17:48 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7409:794c:2926:5b5e) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:19:47 <fiedlr> Hi, did anyone try to build llvm-hs on macOS? My project always fails with > fatal error: too many errors emitted, stopping now [-ferror-limit=], > `gcc' failed in phase `C Compiler'. (Exit code: 1). I've tried --with-gcc pointing to the brew gcc, various cxx flags, but nothing helped.
19:20:04 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:20:54 × dcoutts quits (~duncan@94.186.125.91.dyn.plus.net) (Remote host closed the connection)
19:21:01 × connrs quits (~connrs@connolley.uk) (Quit: ZNC 1.8.2 - https://znc.in)
19:21:17 dcoutts joins (~duncan@94.186.125.91.dyn.plus.net)
19:21:19 <fiedlr> It seems like it uses some old version of C++ but I have no idea why (most errors are caused that the compiler fails to recognize things like auto, constexpr and so on)
19:22:41 connrs joins (~connrs@connolley.uk)
19:23:29 × connrs quits (~connrs@connolley.uk) (Client Quit)
19:24:08 <tomsmeding> fiedlr: can you manage to pinpoint which gcc is actually used during the build?
19:24:53 connrs joins (~connrs@connolley.uk)
19:24:54 notzmv joins (~zmv@unaffiliated/zmv)
19:25:05 <tomsmeding> e.g. by writing a script that spams 'ps aux | grep "gcc\|g++" | cut -d" " -f1' to get the current process ID of the compiler process, if any
19:25:28 <tomsmeding> and then getting the executable path of that thing in some macOS-specific way (on linux you'd use /proc/)
19:26:25 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
19:26:31 <geekosaur> you missed clang, which is kinda the point of llvm-hs
19:26:53 <geekosaur> in your grep
19:27:03 <tomsmeding> hah
19:27:49 × connrs quits (~connrs@connolley.uk) (Client Quit)
19:28:02 Sornaensis joins (~Sornaensi@85.203.36.21)
19:28:12 <tomsmeding> on linux I'd say 'strace' the hell out of it, but in my experience mac's alternative, dtruss, more often doesn't work than does
19:28:29 × dcoutts quits (~duncan@94.186.125.91.dyn.plus.net) (Remote host closed the connection)
19:28:49 dcoutts joins (~duncan@94.186.125.91.dyn.plus.net)
19:28:53 connrs joins (~connrs@connolley.uk)
19:29:37 <geekosaur> it works but you have to up a bunch of table sizes or it crashes
19:30:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds)
19:31:07 × Sorny quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 265 seconds)
19:31:07 × kiltzman quits (~k1ltzman@195.189.99.96) (Ping timeout: 265 seconds)
19:31:11 <maerwald> monochrom: mostly official builds :p
19:31:14 <geekosaur> on second thought why am I defending apple when I got torqued off at what they were doing to their ecosystem several years ago
19:31:43 <monochrom> :)
19:32:05 <maerwald> monochrom: https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/ here are some semi-official builds (things that didn't make it through the GHC release process)
19:32:20 <maerwald> mostly alpine/freebsd
19:32:24 <tomsmeding> geekosaur: I don't see saying "it works if you do some random adjustments otherwise it crashes" as defending apple :p
19:32:25 × dcoutts quits (~duncan@94.186.125.91.dyn.plus.net) (Remote host closed the connection)
19:32:50 dcoutts joins (~duncan@94.186.125.91.dyn.plus.net)
19:33:10 <geekosaur> well, I like dtrace. it's unfortunate that the defaults are a bit small regardless of platform
19:33:19 juliuco joins (~juliuco@213.177.196.21)
19:34:01 <tomsmeding> maybe I was bitten by not disabling SIP when I was on mac, then dtruss fails in the majority of cases where you'd like it to work
19:34:29 <tomsmeding> but I thought I remembered that it fails in far more cases than attributable to SIP; but I probably misremember
19:35:07 × connrs quits (~connrs@connolley.uk) (Quit: ZNC 1.8.2 - https://znc.in)
19:35:39 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
19:36:02 kiltzman joins (~k1ltzman@5.206.224.243)
19:36:09 connrs joins (~connrs@connolley.uk)
19:36:16 × connrs quits (~connrs@connolley.uk) (Client Quit)
19:36:50 ukari joins (~ukari@unaffiliated/ukari)
19:36:52 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
19:37:01 <tomsmeding> geekosaur: llvm-hs's cabal file looks like it uses vanilla hsc2hs, not something clang-specific; perhaps it doesn't particularly care about your C/C++ compiler, but just links to libllvm?
19:37:19 connrs joins (~connrs@connolley.uk)
19:37:49 × connrs quits (~connrs@connolley.uk) (Client Quit)
19:37:51 <geekosaur> dunno
19:37:57 thriqon parts (~thriqon@HSI-KBW-46-223-163-79.hsi.kabel-badenwuerttemberg.de) ()
19:38:10 <geekosaur> I'm just suspicious of a --with-gcc involved with an llvm-related package
19:38:46 <fiedlr> tomsmeding Thanks for the hint! Well I was lazy and just fired it myself at the right moment :-D It seems that --with-gcc is ignored and /Library/Developer/CommandLineTools/usr/bin/clang is used anyway.
19:38:50 connrs joins (~connrs@connolley.uk)
19:38:55 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
19:39:40 <tomsmeding> env PATH="/path/to/your/chosen/gcc:$PATH" cabal build
19:39:40 <tomsmeding> ?
19:40:04 <geekosaur> if this is hsc2hs failing then maybe it'd work (of course "gcc" from apple dev tools is a wrapper for clang) but complaining about constexpr sounds like it is compiling c++ code and wants a recentish clang++
19:40:25 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:40:33 × connrs quits (~connrs@connolley.uk) (Client Quit)
19:40:51 dcoutts__ joins (~duncan@94.186.125.91.dyn.plus.net)
19:41:14 × dcoutts quits (~duncan@94.186.125.91.dyn.plus.net) (Read error: Connection reset by peer)
19:41:36 connrs joins (~connrs@connolley.uk)
19:43:36 × supercoven_ quits (~Supercove@dsl-hkibng31-58c384-213.dhcp.inet.fi) (Ping timeout: 260 seconds)
19:44:00 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
19:44:20 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:44:39 × Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 265 seconds)
19:44:58 × juliuco quits (~juliuco@213.177.196.21) (Quit: juliuco)
19:45:07 <fiedlr> This apple dev tools clang is a pain in the neck. Every time.
19:46:56 <tomsmeding> you can put a brew clang before it in your PATH
19:48:34 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
19:48:35 <fiedlr> True, but I think brew doesn't shadow it by default for some reason... Even gcc is installed as gcc-10
19:48:51 <fiedlr> That's why I haven't done it so far
19:48:58 <fiedlr> But idk, no idea
19:49:07 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 248 seconds)
19:50:21 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Read error: Connection reset by peer)
19:50:23 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 260 seconds)
19:50:56 <tomsmeding> brew does not change your path
19:51:38 Lord_of_Life_ is now known as Lord_of_Life
19:51:41 Fabe joins (~Faberyayo@ptr-g9pig2kcm602krccqi3.18120a2.ip6.access.telenet.be)
19:52:07 <tomsmeding> it's perhaps a bad idea to put /usr/local/bin in the front of your path to let everything from brew take precedence (though I believe I did that at some point), but you can create a different folder ($HOME/bin for example) in which you add symlinks to the brew things you want to have precedence, and then add _that_ folder to your pATH
19:52:48 <tomsmeding> fiedlr: did the temporary PATH override that I suggested work?
19:53:58 <joel135> If I have a monad for which the bind operation which takes a -> m b and outputs m a -> m b is an isomorphism, is this related to m being an idempotent monad?
19:54:24 Fabe parts (~Faberyayo@ptr-g9pig2kcm602krccqi3.18120a2.ip6.access.telenet.be) ("Leaving")
19:55:18 molehillish joins (~molehilli@2600:8800:8d06:1800:e032:860d:11aa:7812)
19:55:21 <fiedlr> tomsmeding: It didn't (I used stack though).
19:55:43 Ranhir joins (~Ranhir@157.97.53.139)
19:56:25 <tomsmeding> fiedlr: yeah the 'cabal build' was just a standin for whatever you're using
19:56:29 × hexagenic quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Quit: WeeChat 1.9.1)
19:56:38 <sm[m]> I always put brew, nix etc. first in PATH on mac and haven't noticed any issues
19:56:40 <tomsmeding> fiedlr: can you post the entire build log to a pastebin?
19:58:05 <fiedlr> tomsmeding: I guess I really need that clang++? I know that brew doesn't change paths, I just meant the suffixes (gcc-10...).
19:58:32 <fiedlr> sm[m]: Ok I'll try :-D
19:58:34 <tomsmeding> ooo that might be a thing
19:58:48 × malumore quits (~malumore@151.62.125.43) (Remote host closed the connection)
19:59:05 malumore joins (~malumore@151.62.125.43)
19:59:33 <tomsmeding> fiedlr: mkdir $HOME/bin; ln -vis $(which gcc-10) $HOME/bin/gcc; ln -vis $(WHICH g++-10) $HOME/bin/g++; env PATH="$HOME/bin:$PATH" stack build
19:59:47 <tomsmeding> perhaps do a similar thing with clang/clang++ if necessary, not sure if necessary
20:00:06 <tomsmeding> lol s/WHICH/which/ though that might not even matter on mac
20:01:31 <maerwald> sm[m]: interestingly I got an angry bug report saying ghcup should put itself LAST in PATH (like all tools should)... although this is false logic
20:01:43 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:01:46 <maerwald> order matters, no matter if you prepend or append
20:01:52 <maerwald> there will always be problems
20:02:40 <maerwald> but apparently there are conflicts with nix
20:03:01 <maerwald> so you probably want to put nix first
20:03:10 × connrs quits (~connrs@connolley.uk) (Quit: ZNC 1.8.2 - https://znc.in)
20:03:10 <maerwald> unless you don't
20:03:42 coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl)
20:04:11 connrs joins (~connrs@connolley.uk)
20:04:58 × petersen quits (~petersen@redhat/juhp) (Ping timeout: 240 seconds)
20:05:00 <geekosaur> fiedlr, given that it's LLVM, I'd check the LLVM version I wanted to link against and use its clang and clang++
20:05:34 <fiedlr> This is the log https://pastebin.com/EnLNGmr6
20:05:51 × geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed)
20:06:21 × dpl quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 260 seconds)
20:06:35 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
20:07:48 petersen joins (~petersen@redhat/juhp)
20:08:08 <tomsmeding> fiedlr: is that the full log? no configure output about llvm-hs beforehand?
20:08:14 <fiedlr> It's funny that I forgot I actually don't have brew clang and I'm running on some Apple's prehistoric version given that I can't update from Catalina
20:08:36 <fiedlr> Sorry, just the error log, wait a sec
20:08:41 × Benzi-Junior quits (~BenziJuni@dsl-149-67-143.hive.is) (Ping timeout: 246 seconds)
20:08:47 B-J joins (~BenziJuni@88-149-64-251.du.xdsl.is)
20:09:13 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
20:09:54 <tomsmeding> "warning: alias declarations are a C++11 extension [-Wc++11-extensions]"
20:10:26 <tomsmeding> oh perhaps it's old enough that it doesn't know -std=c++11 and needs c++0x, but the cabal file has c++11
20:10:51 <tomsmeding> fiedlr: you're not using nix by any chance?
20:11:09 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0)
20:12:06 <fiedlr> Not that I'm aware of
20:12:26 <tomsmeding> then I hope you're not :p
20:12:37 <fiedlr> :-D
20:13:01 <tomsmeding> nix tends to be a complete pain in the behind for remote debugging, because it makes everything behave in different, unexpected ways
20:13:15 <tomsmeding> in my opinion :)
20:13:58 × stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds)
20:15:25 lawt joins (~lawt@c-73-151-3-92.hsd1.ca.comcast.net)
20:15:28 geekosaur joins (82650c7a@130.101.12.122)
20:15:36 <fiedlr> Completed 2 action(s).
20:15:47 × solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed)
20:15:58 <fiedlr> Hooray :-D :-D It was really the suffixes :-D :-D
20:16:12 <tomsmeding> :')
20:16:13 <fiedlr> Thanks tomsmeding and geekosaur for help!
20:16:21 <fiedlr> And sorry to waste your time
20:16:30 <fiedlr> I guess I should've dedicated it more time myself
20:16:35 <tomsmeding> cheers, that's why we hang around in this channel anyway :p
20:16:54 <tomsmeding> 'brew link' exists btw
20:17:06 <tomsmeding> not sure if that removes the suffixes, can't rememberr
20:20:41 × alx741 quits (~alx741@181.196.68.238) (Ping timeout: 240 seconds)
20:20:51 <fiedlr> I'll def. check it out
20:21:13 <L29Ah> how am i supposed to send patches to something like https://hackage.haskell.org/package/bytestring-mmap
20:21:14 <L29Ah> ?
20:22:55 <geekosaur> fork it, dons isn't really maintaining anything any more and it hasn't been updated since 2011
20:23:47 L29Ah is sad that hackage is polluted with mmap libraries, and neither of them does what i want
20:24:06 <geekosaur> and code.haskell.org is gone/archived
20:26:12 <sclv> L29Ah: if you want to take it over as maintainer dons has basically given carte blanche to people to do so
20:26:57 <sclv> i.e. hackage admins have been instructed to automatically grant any sane takeover request on any dons package
20:27:19 stree joins (~stree@68.36.8.116)
20:28:05 <L29Ah> thanks
20:28:38 × MrMobius quits (~MrMobius@208.58.206.154) (Ping timeout: 268 seconds)
20:28:43 × recon_- quits (~quassel@2602:febc:0:b6::6ca2) (Ping timeout: 276 seconds)
20:28:54 recon_- joins (~quassel@2602:febc:0:b6::6ca2)
20:32:46 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 240 seconds)
20:33:32 × geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed)
20:34:34 × molehillish quits (~molehilli@2600:8800:8d06:1800:e032:860d:11aa:7812) (Remote host closed the connection)
20:35:29 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:36:24 × recon_- quits (~quassel@2602:febc:0:b6::6ca2) (Quit: No Ping reply in 180 seconds.)
20:37:38 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
20:37:45 recon_- joins (~quassel@2602:febc:0:b6::6ca2)
20:38:26 <fiedlr> tomsmeding: It's possible that I'm just dumb but I'm not sure if brew link helps in this regard. I would just need to check for every one of these problematic packages and create my own symlinks that I would have shadow the apple ones in my PATH. But this is already way too OT for this channel.
20:39:01 alx741 joins (~alx741@181.196.68.139)
20:41:14 <fiedlr> At least it worked here :-)
20:41:46 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 260 seconds)
20:41:55 × rodriga quits (~quassel@134.204.25.66) (Ping timeout: 248 seconds)
20:45:13 kadoban_ joins (~mud@unaffiliated/kadoban)
20:47:54 kiweun joins (~kiweun@2607:fea8:2a62:9600:b987:3c7c:2ab7:7849)
20:48:00 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:48:26 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:49:08 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:49:49 <fiedlr> Haskell related: I'm still wondering why stack ignored --with-gcc?
20:49:58 × mananamenos quits (~mananamen@62.red-88-11-67.dynamicip.rima-tde.net) (Ping timeout: 240 seconds)
20:50:07 × srk quits (~sorki@unaffiliated/srk) (Ping timeout: 260 seconds)
20:50:22 <fiedlr> Ok never mind :-D
20:50:39 × guilhermeblanco quits (~guilherme@185.204.1.185) (Remote host closed the connection)
20:52:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
20:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
20:52:24 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 246 seconds)
20:52:29 × kiweun quits (~kiweun@2607:fea8:2a62:9600:b987:3c7c:2ab7:7849) (Ping timeout: 250 seconds)
20:52:32 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
20:53:22 × hiroaki quits (~hiroaki@2a02:908:4b18:8c40:1137:7482:fd5a:b039) (Remote host closed the connection)
20:53:47 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
20:54:07 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:54:09 crestfallen joins (~john@128.32.176.159)
20:56:29 notzmv joins (~zmv@unaffiliated/zmv)
20:57:11 mananamenos joins (~mananamen@62.red-88-11-67.dynamicip.rima-tde.net)
20:57:13 hiroaki joins (~hiroaki@2a02:908:4b18:8c40:bdf7:105d:7ce:39c2)
20:58:59 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 248 seconds)
20:59:12 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:59:31 × lawt quits (~lawt@c-73-151-3-92.hsd1.ca.comcast.net) (Ping timeout: 248 seconds)
21:00:50 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 246 seconds)
21:01:09 × mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Ping timeout: 240 seconds)
21:03:07 <siers> is there a lens setter that takes an effectful value? Setter s t a b -> f b -> s -> f t
21:06:38 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 240 seconds)
21:06:39 dinciorip joins (~dincio@5.170.5.195)
21:06:58 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
21:07:20 acidjnk_new joins (~acidjnk@p200300d0c72b9506d42010f0580cba17.dip0.t-ipconnect.de)
21:07:56 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Quit: leaving)
21:07:57 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
21:08:27 <glguy> \l x -> traverseOf l (\_ -> x) :: LensLike f s t a b -> f b -> s -> f t
21:08:46 <siers> yeah, I did write that for now, but I was wondering whether that operator is defined already
21:09:04 <siers> I guess it wouldn't be so surprising, if it wasn't
21:09:07 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
21:11:37 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
21:13:09 × RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 252 seconds)
21:14:12 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer)
21:15:38 × mananamenos quits (~mananamen@62.red-88-11-67.dynamicip.rima-tde.net) (Ping timeout: 240 seconds)
21:21:04 Sorna joins (~Sornaensi@077213203030.dynamic.telenor.dk)
21:22:10 molehillish joins (~molehilli@2600:8800:8d06:1800:e032:860d:11aa:7812)
21:24:13 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 265 seconds)
21:24:17 × Sornaensis quits (~Sornaensi@85.203.36.21) (Ping timeout: 246 seconds)
21:26:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:27:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
21:30:00 <fresheyeball> I am trying to write a pre-processor
21:30:08 <fresheyeball> and just stumbling at hello world
21:30:25 <fresheyeball> I added `executable generate-html-dsl` to my cabal file
21:30:34 <fresheyeball> and wrote a reasonable hello world main function for it
21:30:55 <fresheyeball> then I have a file with `{-# OPTIONS_GHC -F -pgmF generate-html-dsl #-}`
21:31:02 <fresheyeball> the exe builds and runs fine
21:31:16 <fresheyeball> but the library now fails with `ghc: could not execute: generate-html-dsl`
21:31:29 <fresheyeball> and no hints as to why
21:31:31 × malumore quits (~malumore@151.62.125.43) (Ping timeout: 260 seconds)
21:31:40 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
21:32:16 dwt joins (~dwt@2601:2c6:8080:618:e121:3ef9:65e4:167e)
21:34:41 pmuir joins (~pmuir@185.204.1.185)
21:35:23 × molehillish quits (~molehilli@2600:8800:8d06:1800:e032:860d:11aa:7812) (Remote host closed the connection)
21:35:37 molehillish joins (~molehilli@2600:8800:8d06:1800:e032:860d:11aa:7812)
21:35:39 RusAlex joins (~Chel@unaffiliated/rusalex)
21:37:11 × Sorna quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 240 seconds)
21:37:15 lawt joins (~lawt@c-73-151-3-92.hsd1.ca.comcast.net)
21:37:52 × LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
21:40:16 pjb joins (~t@2a01cb04063ec50068b13f06583044a1.ipv6.abo.wanadoo.fr)
21:40:35 × Guest48425 quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 248 seconds)
21:41:50 × lemmih quits (~lemmih@2406:3003:2072:44:8211:8912:237:8e05) (Remote host closed the connection)
21:42:07 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:42:10 lemmih joins (~lemmih@2406:3003:2072:44:194c:74d8:3073:4082)
21:44:00 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-yckkwdautnlneayq) (Quit: Connection closed for inactivity)
21:46:34 hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:bdf7:105d:7ce:39c2)
21:47:08 notzmv joins (~zmv@unaffiliated/zmv)
21:49:18 noCheese joins (~nocheese@2a01:4f8:211:39b::30:1)
21:49:18 × noCheese quits (~nocheese@2a01:4f8:211:39b::30:1) (Changing host)
21:49:18 noCheese joins (~nocheese@unaffiliated/nocheese)
21:50:03 × kozowu quits (uid44796@gateway/web/irccloud.com/x-roldfjkcrdyqvqea) (Quit: Connection closed for inactivity)
21:50:18 × dwt quits (~dwt@2601:2c6:8080:618:e121:3ef9:65e4:167e) (Quit: Leaving)
21:50:29 × noCheese quits (~nocheese@unaffiliated/nocheese) (Client Quit)
21:51:49 Althar joins (5e039f1a@94.3.159.26)
21:52:04 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
21:52:24 <Althar> Hello all, I was hoping someone could help me understand what is probably a trivial issue
21:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
21:52:49 kiweun joins (~kiweun@2607:fea8:2a62:9600:4d74:8eef:fc60:8feb)
21:52:57 <Althar> I have a type, such that : 'type ResourceOpT r m a = StateT (ResourceCache r) m a'
21:53:04 noCheese joins (~nocheese@static.52.177.251.148.clients.your-server.de)
21:53:04 × noCheese quits (~nocheese@static.52.177.251.148.clients.your-server.de) (Changing host)
21:53:04 noCheese joins (~nocheese@unaffiliated/nocheese)
21:53:07 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 260 seconds)
21:53:18 <Althar> Why is it that 'instance (MonadIO m) => Logger ( StateT s m )' works
21:53:30 <Althar> but not 'instance (MonadIO m) => Logger ( ResourceOpT r m )'
21:53:33 <Althar> aren't they equivalent?
21:53:50 dwt joins (~dwt@2601:2c6:8080:618:e121:3ef9:65e4:167e)
21:54:09 notzmv joins (~zmv@unaffiliated/zmv)
21:55:06 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
21:56:32 <Althar> In my case, having the instance be defined for StateT is an even better abstraction but I am curious why the more specific instance (so to speak) complains that 'should have 3 arguments, but has been given 2'
21:56:55 <Althar> In case it wasn't obvious, I am still learning
21:58:40 × dwt quits (~dwt@2601:2c6:8080:618:e121:3ef9:65e4:167e) (Quit: Leaving)
22:00:59 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:01:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
22:01:19 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:01:27 machinedgod joins (~machinedg@24.105.81.50)
22:02:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:04:13 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
22:05:06 × crestfallen quits (~john@128.32.176.159) (Remote host closed the connection)
22:06:11 × michalz quits (~user@185.246.204.39) (Remote host closed the connection)
22:07:47 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 248 seconds)
22:10:39 × fiedlr quits (~fiedlr@83.148.33.254) (Remote host closed the connection)
22:11:04 aerona joins (~aerona@2600:6c54:4600:f300:a1c5:a27d:d58e:3c09)
22:11:11 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 246 seconds)
22:13:16 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:14:01 <monochrom> "type ResourceOpT r m a =" 3 arguments right there: r, m, a
22:14:39 <monochrom> Then apply https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-730004.2.2
22:14:49 <monochrom> "Type constructor symbols T introduced by type synonym declarations cannot be partially applied; it is a static error to use T without the full number of arguments."
22:14:52 <maerwald> https://haskell.foundation/en/who-we-are/ is this outdated?
22:16:18 <monochrom> The less obvious trick is that you are allowed "type ResourceOpT r m = StateT (ResourceCache r) m"
22:16:57 <monochrom> Hell, delete that m too for maximum future convenience.
22:17:17 <Althar> Ok, this is starting to make sense, I think
22:17:23 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 260 seconds)
22:17:25 <Althar> I'll remove the m, I guess it is redundant here
22:17:56 × fendor quits (~fendor@91.141.2.173.wireless.dyn.drei.com) (Remote host closed the connection)
22:18:05 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:18:13 dwt joins (~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
22:18:21 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
22:18:34 <Althar> So in this instance, is it better practice to define the instance for the more abstract type, or is there a way for me to not make ResourceOpT a type synonym?
22:20:02 <monochrom> Type synonym is pretended abstraction.
22:20:34 arturh joins (~arturh@93.176.180.48)
22:20:34 <monochrom> Hell, I'm be more frank and blunt. Type synonym is not making up one's mind whether it's an abstraction or not.
22:21:11 <monochrom> OK, in fairness, some people just intend an abberviation, not an abstraction. That's fine.
22:22:01 × coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
22:22:09 <Althar> it does mean that if I change ResourceOpT to be built from something else, my instance of StateT will no longer apply
22:22:39 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Quit: Leaving)
22:22:45 <Althar> I was hoping that by having instance of ResourceOpT, it would hold up, so long as the MonadIO constraint held
22:23:26 <Althar> call it 'encapsulation' if you will (for lack of a better term)
22:23:42 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:24:07 <monochrom> "encapsulation" is even falser.
22:24:29 <monochrom> Type synonyms are completely transparent.
22:24:42 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
22:24:51 maiqthefalse joins (uid494950@gateway/web/irccloud.com/x-lubjogfdgluyqicn)
22:25:02 <monochrom> Everything is exposed. Nothing is encapsulated.
22:25:22 <Althar> Ok, so this works : 'instance (MonadIO m) => Logger ( ResourceOpT r m )'
22:25:45 × arturh quits (~arturh@93.176.180.48) (Quit: Lost terminal)
22:25:49 <Althar> With 'type ResourceOpT r = StateT (ResourceCache r)'
22:26:00 <monochrom> If you have "type MyType = [Int]" and attempt "instance Show MyType", compiler says you're doing "instance Show [Int]", this overlaps with everything else left right and centre. Not an encapsulation at all.
22:26:23 <fresheyeball> is there a way with cabal to have a common stanza in a file shared between cabal files?
22:26:39 <fresheyeball> I have the same stanza copy pasta all over the place
22:26:44 <sclv> nope
22:26:50 <dcoutts_> Within a cabal file yes, but between cabal files no.
22:27:01 <fresheyeball> well drat, I left hpack too soon
22:27:18 <sclv> cabal files are part of package manifests. since you have one cabal file per sdist tarball it wouldn't make much sense
22:27:34 <Althar> monochrom I get that, but what I didn't understand was that if they were synonymous, why it falls apart when I substitute the synonyms
22:27:39 <sclv> you could share some things (but not deps directly) through a shared .project file
22:27:43 <dcoutts_> And you can have multiple components (including multiple libs) in a single cabal file.
22:28:19 <monochrom> What is an example of "falls apart when I substitute the synonyms"?
22:28:23 <Althar> once I got rid of the redundant types from the type declaration as per your suggestion, the compiler is happy
22:28:43 <Althar> 'type ResourceOpT r m a = StateT (ResourceCache r) m a'
22:28:56 <monochrom> That's the "Type constructor symbols T introduced by type synonym declarations cannot be partially applied; it is a static error to use T without the full number of arguments." as said.
22:29:06 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds)
22:29:18 elliott_ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
22:29:24 × elliott_ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Client Quit)
22:30:01 <Althar> Is it still a type synonym here ?
22:30:06 elliott_ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
22:30:06 <monochrom> Yes.
22:30:08 × elliott_ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Client Quit)
22:30:08 <Althar> 'type ResourceOpT r = StateT (ResourceCache r)'
22:30:12 <monochrom> Yes.
22:30:17 <Althar> so why does it work in this case
22:30:32 <Althar> I can do 'instance (MonadIO m) => Logger ( ResourceOpT r m )'
22:31:15 <monochrom> It expands to "instance (MonadIO m) => Logger ( StateT (ResourceCache r) m)"
22:32:08 <haskellstudent> fresheyeball: regarding your last message, maybe this is related? https://stackoverflow.com/questions/26902960/ghc-could-not-execute-htfpp so maybe your build generate-html-dsl is stored in the .stack-work/dist/... folder, but it is not in the path at the time you are trying to use it. maybe you could try using an absolute path to see if that is the problem, for example: {-# OPTIONS_GHC -F -pgmF /home/user/Projects/yourproject/.
22:32:08 <haskellstudent> stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/yourproject/generate-html-dsl #-}
22:32:16 <Althar> Yes, ok that is what I am going for - so I guess I am failing to understand why the previous way of writing it didn't expand to the same thing
22:32:29 <fresheyeball> haskellstudent: I figured it out, it needs to be in build tool depends
22:32:35 <monochrom> "Type constructor symbols T introduced by type synonym declarations cannot be partially applied; it is a static error to use T without the full number of arguments." again.
22:32:37 <haskellstudent> nice
22:32:53 <monochrom> You have to get past that rule before it's meaningful to talk about the rest.
22:33:13 <Althar> monochrom Sure, that's the sentence I don't quite understand/grasp then
22:33:18 <monochrom> No expansion until you clear that rule.
22:34:06 <monochrom> If you define "type T a b c d e f g" then you can only use it as "T Foo Bar John Mary Joe Alice Bob".
22:34:15 <Althar> I'm probably getting confused with the terminology between type constructor, and synonym
22:34:36 <monochrom> ResourceOpT is the type constructor.
22:34:41 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
22:34:44 <Althar> ok
22:35:10 <Althar> so the above only holds true if it is a type synonym? hence it working with StateT, or with my partial type constructor
22:35:26 <Althar> but not in my original definition
22:35:28 <monochrom> I defined my T to have formally 7 arguments. Now I'm stuck with using it with 7 arguments, I cannot supply fewer.
22:35:31 × stree quits (~stree@68.36.8.116) (Ping timeout: 248 seconds)
22:35:34 <Althar> ok
22:35:49 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:35:55 <Althar> starting to make sense
22:35:59 <Althar> sorry for going round in circles
22:36:55 <Althar> As a final question then, is it better practice in Haskell, to define the instance for the most basic type, or am I right defining the instance for my more specific type?
22:37:08 <Althar> So Option #A : 'instance (MonadIO m) => Logger ( ResourceOpT r m )'
22:37:18 <Althar> Or Option #B : 'instance (MonadIO m) => Logger ( StateT s m )'
22:37:31 <Althar> given at this stage they are the same
22:37:43 machinedgod joins (~machinedg@24.105.81.50)
22:38:29 <monochrom> False dichotomy. The correct decision is based on the purpose of the class, the purpose of the basic type, the purpose of the specific type.
22:38:39 × dinciorip quits (~dincio@5.170.5.195) (Quit: WeeChat 3.1)
22:39:53 <Althar> I might not want the user to use Logger in everything that uses StateT
22:39:56 <monochrom> "instance Eq a => Eq [a]" makes more sense than "instance Eq [Int]" because Eq should work the same for [Int], [Char], [Anything].
22:40:04 <Althar> sure
22:40:33 <monochrom> But "instance MySpecialClass [Int]" can make more sense than "instance MySpecialClass [a]" if the purpose of MySpecialClass is special.
22:41:07 × Synthetica quits (uid199651@gateway/web/irccloud.com/x-igiuipnjkspialln) (Quit: Connection closed for inactivity)
22:41:50 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 268 seconds)
22:41:51 <monochrom> The simplest thing to do is outlaw type synonyms.
22:42:14 <Althar> ok, I think I've got it now
22:42:25 <Althar> are type synonyms considered bad/dangerous then?
22:42:38 <monochrom> If you intend an encapsulation then use "data" or "newtype". If you don't intend an encapsulation then just write out the full type expression. Simple and clear.
22:42:57 <monochrom> Oh everyone else likes it.
22:43:08 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
22:43:08 nbloomf joins (~nbloomf@2600:1700:ad14:3020:b94d:65d6:a9e1:d541)
22:43:15 <dibblego> there is also the use-case "pronunciation", though I would not use type synonym for that either
22:43:49 <Althar> ok, I think I've got enough to ponder about - thanks a lot for your help/explanations
22:45:21 fiedlr joins (~fiedlr@83.148.33.254)
22:45:51 <monochrom> 80% of the people mistake type synonyms for abstraction. They run into lots of confusions indeed.
22:46:11 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Ping timeout: 248 seconds)
22:46:25 <monochrom> The other 20% correctly understand that it's like "#define MAXNUM 100" in C.
22:46:45 <monochrom> There is benefit in "if one day I need to change 100 to 200 I just have to change it at one place".
22:46:53 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:47:08 <monochrom> But this does not imply any abstraction, encapsulation, objectification, modularization.
22:47:30 <dibblego> I've also seen "use newtype for type-safety"
22:47:57 pavonia joins (~user@unaffiliated/siracusa)
22:48:00 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
22:48:40 stree joins (~stree@68.36.8.116)
22:48:57 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
22:49:18 <Althar> Hopefully, I'll be one of the 20% one day :)
22:49:23 × hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:bdf7:105d:7ce:39c2) (Ping timeout: 248 seconds)
22:49:23 × hiroaki quits (~hiroaki@2a02:908:4b18:8c40:bdf7:105d:7ce:39c2) (Ping timeout: 248 seconds)
22:49:41 × fiedlr quits (~fiedlr@83.148.33.254) (Ping timeout: 240 seconds)
22:50:13 rprije joins (~rprije@59-102-63-15.tpgi.com.au)
22:50:19 Alleria joins (~textual@2603-7000-3040-0000-d06d-9c04-03df-c710.res6.spectrum.com)
22:50:43 Alleria is now known as Guest29374
22:52:02 × rj quits (~x@gateway/tor-sasl/rj) (Quit: rj)
22:52:06 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Read error: Connection reset by peer)
22:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
22:55:21 notzmv joins (~zmv@unaffiliated/zmv)
22:55:24 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:59:40 <infinisil> I like how in Idris type synonyms are just variable definitions
22:59:41 <d34df00d> To be fair, newtypes offer some degrees of type safety (and documentation, for that matter).
22:59:55 × minoru_shiraeesh quits (~shiraeesh@109.166.57.223) (Ping timeout: 265 seconds)
23:00:12 <infinisil> `type Foo = Bar` in Idris is `Foo : Type \n Foo = Bar`
23:00:31 <d34df00d> I'd much rather have trade :: Currency -> Amount -> Deadline -> ... than trade :: Int -> Int -> Int -> ...
23:00:37 <dibblego> that is not type-safety
23:00:56 <monochrom> I don't doubt the value of "#define MAXNUM 100" either.
23:01:07 <monochrom> I just doubt the belief that it's an abstraction.
23:01:08 <d34df00d> Type safety is about proving that your programs don't exhibit properties you don't want and do exhibit the ones you do want.
23:01:32 <d34df00d> A property of "don't accidentally pass amount where deadline is expected" is one example.
23:01:33 <monochrom> When an error message spills the gut, you know you don't have an abstraction.
23:01:34 <dibblego> Correct. newtype T = T U -- this program T exhibits the same properties as the program U
23:01:42 <dibblego> no
23:01:53 <d34df00d> A property of "don't add an amount to a deadline" is another one.
23:02:10 <dibblego> these are not examples of the correct statement
23:02:14 <d34df00d> dibblego: this is not a program, really.
23:02:31 <d34df00d> I mean, this is some Haskell source code, but it has no runtime behaviour, so you'll need extra lines of code around.
23:08:35 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 248 seconds)
23:09:41 × Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 240 seconds)
23:20:20 Ranhir joins (~Ranhir@157.97.53.139)
23:21:12 atraii joins (~atraii@2601:681:8700:c471:182c:49ac:c430:1f21)
23:21:24 × lotuseater quits (~user@p200300e787030b0000a24874ceb5ca88.dip0.t-ipconnect.de) (Quit: ERC (IRC client for Emacs 27.1))
23:24:31 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 245 seconds)
23:27:40 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
23:28:15 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
23:31:33 × Althar quits (5e039f1a@94.3.159.26) (Quit: Connection closed)
23:32:38 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
23:32:56 × dxld quits (~dxld@80-109-136-248.cable.dynamic.surfer.at) (Read error: Connection reset by peer)
23:33:09 dxld joins (~dxld@rush.pub.dxld.at)
23:33:40 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
23:34:16 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Remote host closed the connection)
23:34:39 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
23:34:39 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
23:35:11 × hypercube quits (hypercube@gateway/vpn/protonvpn/hypercube) (Ping timeout: 240 seconds)
23:36:42 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
23:36:57 Tario joins (~Tario@201.192.165.173)
23:37:46 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 240 seconds)
23:42:16 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Remote host closed the connection)
23:42:36 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
23:45:32 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:47:06 jakalx parts (~jakalx@base.jakalx.net) ()
23:48:07 × Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Remote host closed the connection)
23:48:26 Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis)
23:52:03 × zebrag quits (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
23:52:24 zebrag joins (~inkbottle@aaubervilliers-654-1-2-51.w83-200.abo.wanadoo.fr)
23:53:55 × atraii quits (~atraii@2601:681:8700:c471:182c:49ac:c430:1f21) (Ping timeout: 248 seconds)
23:54:49 × j quits (jess@freenode/staff/jess) (Quit: K-Lined)
23:56:02 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
23:57:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)

All times are in UTC on 2021-04-07.