Home liberachat/#haskell: Logs Calendar

Logs on 2024-05-14 (liberachat/#haskell)

00:02:55 × oo_miguel quits (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 272 seconds)
00:08:31 × xdminsy quits (~xdminsy@117.147.70.240) (Ping timeout: 246 seconds)
00:09:21 xdminsy joins (~xdminsy@117.147.70.240)
00:11:05 × yin quits (~yin@user/zero) (Quit: leaving)
00:14:35 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
00:14:38 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds)
00:16:24 ChaiTRex joins (~ChaiTRex@user/chaitrex)
00:18:40 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds)
00:30:10 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
00:32:03 × califax quits (~califax@user/califx) (Remote host closed the connection)
00:34:44 califax joins (~califax@user/califx)
01:03:52 × hgolden quits (~hgolden@2603:8000:9d00:3ed1:2678:8497:aa5c:7fa9) (Remote host closed the connection)
01:08:52 × philopsos quits (~caecilius@user/philopsos) (Ping timeout: 255 seconds)
01:11:15 hgolden joins (~hgolden@2603:8000:9d00:3ed1:2678:8497:aa5c:7fa9)
01:11:57 × otto_s quits (~user@p5de2fd19.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
01:12:09 philopsos1 joins (~caecilius@user/philopsos)
01:13:32 otto_s joins (~user@p5de2fc4f.dip0.t-ipconnect.de)
01:16:41 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 256 seconds)
01:23:11 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds)
01:24:41 jmdaemon joins (~jmdaemon@user/jmdaemon)
01:29:36 philopsos1 joins (~caecilius@user/philopsos)
01:32:26 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
01:34:30 × xff0x quits (~xff0x@2405:6580:b080:900:b7f1:8627:ae1f:1fb0) (Ping timeout: 255 seconds)
01:55:23 × phma quits (phma@2001:5b0:210b:c738:d0e0:5870:ec8f:f731) (Read error: Connection reset by peer)
01:55:47 phma joins (~phma@host-67-44-208-11.hnremote.net)
01:57:25 Square2 joins (~Square4@user/square)
02:08:30 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
02:13:47 × td_ quits (~td@i53870933.versanet.de) (Ping timeout: 256 seconds)
02:15:33 td_ joins (~td@i53870907.versanet.de)
02:18:04 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds)
02:19:41 xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:23:59 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
02:25:48 ddellacosta joins (~ddellacos@ool-44c73d29.dyn.optonline.net)
02:36:23 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 260 seconds)
02:42:24 × emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir)
03:19:24 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Remote host closed the connection)
03:19:33 danza joins (~francesco@151.57.214.17)
03:19:44 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
03:31:03 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
03:42:27 paddymahoney joins (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com)
03:54:05 × mei quits (~mei@user/mei) (Ping timeout: 240 seconds)
03:55:20 mei joins (~mei@user/mei)
03:55:44 yin joins (~yin@user/zero)
03:55:47 aforemny_ joins (~aforemny@i59F516F1.versanet.de)
03:56:22 × aforemny quits (~aforemny@i59F516F4.versanet.de) (Ping timeout: 246 seconds)
04:00:56 × rekahsoft quits (~rekahsoft@184.148.6.204) (Ping timeout: 256 seconds)
04:04:48 × yin quits (~yin@user/zero) (Ping timeout: 255 seconds)
04:05:35 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
04:06:15 ec joins (~ec@gateway/tor-sasl/ec)
04:06:26 yin joins (~yin@user/zero)
04:08:46 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
04:16:28 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Remote host closed the connection)
04:21:18 rosco joins (~rosco@yp-146-6.tm.net.my)
04:22:51 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
04:23:41 ChaiTRex joins (~ChaiTRex@user/chaitrex)
04:37:46 × remmie quits (ianremsen@tilde.team) (Ping timeout: 256 seconds)
04:39:49 <cheater> i feel like haskell would be better if arguments were non-positional, i.e. you could supply them in any order
04:40:14 <cheater> rarely do functions have the same type multiple times, and when they do it's usually like a binary or ternary function and then you can explicitly order them with a tuple
04:40:39 <danza> make a product type for that?
04:41:56 <cheater> idk what you're saying
04:42:23 <cheater> if you look at type sigs, f :: A -> B -> C is basically a tuple. the only reason it's not exactly the same thing as (A, B, C) is currying.
04:44:17 <cheater> so what if we had a type constructor that's like (->) but binds less tightly than (->) and doesn't care about order. say (&). You could write f :: X & A -> B -> C & Y & Z -> Out, and then you could go like f a b c x y z, or f a x b y c z, or f x y z a b c
04:44:29 <cheater> whatever's useful
04:46:16 <danza> other languages that support out-of-order arguments end up with a syntax similar to { arg = val } like one would easily achieve with a product type
05:00:59 <cheater> like what languages are you thinking of
05:09:14 <glguy> cheater: that would only make sense in a vary narrow subset of Haskell
05:09:31 <cheater> why
05:09:34 <glguy> > id succ 10
05:09:35 <lambdabot> 11
05:09:37 <glguy> :t id
05:09:38 <lambdabot> a -> a
05:10:00 <glguy> You need to know the order of application to even attempt to type-check an expression
05:10:08 <cheater> id only has one argument
05:10:08 <glguy> function in haskell *only* have one argument
05:10:18 <glguy> but that doesn't mean you can't apply the result as a function
05:10:21 <cheater> ok ok
05:10:29 <cheater> i see where you're coming from
05:10:29 <glguy> all functions have one argument; no functions have two
05:10:34 <cheater> but i don't think that's an issue
05:10:38 × mei quits (~mei@user/mei) (Remote host closed the connection)
05:11:31 michalz joins (~michalz@185.246.207.193)
05:11:59 <glguy> beyond it simply not working with the way types in Haskell work, it'd be a complete disaster for readability
05:12:17 <glguy> now to know what: f x y means, you have to work out the types of f, x, and y before you can know which thing is which
05:12:30 <cheater> idk that it would be, people say haskell's syntax is a complete disaster for readability too
05:12:42 <cheater> yeah you know that one usually when reading code
05:12:51 <cheater> if you lose track of that then your code is too messy anyways
05:12:55 <glguy> no, that's not a common take on people who've actually used it
05:13:03 mei joins (~mei@user/mei)
05:13:34 remmie joins (ianremsen@tilde.team)
05:13:53 <cheater> have you used the language i'm describing?
05:15:20 <glguy> I would avoid using such a language, but I don't think it exists
05:15:37 <cheater> so you're basically the "haskell is unreadable" person
05:16:28 <glguy> oh, no
05:20:40 <danza> "haskell's syntax is a complete disaster" haha nice joke
05:21:18 <danza> "... for readability" that is also a good one
05:22:03 acidjnk_new joins (~acidjnk@p200300d6e714dc51e96b24be77fae744.dip0.t-ipconnect.de)
05:22:07 × mei quits (~mei@user/mei) (Remote host closed the connection)
05:23:55 mei joins (~mei@user/mei)
05:30:03 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
05:30:37 × danza quits (~francesco@151.57.214.17) (Read error: Connection reset by peer)
05:30:53 danza joins (~francesco@151.57.195.82)
05:42:23 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:51:08 × michalz quits (~michalz@185.246.207.193) (Quit: ZNC 1.8.2 - https://znc.in)
05:51:38 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
05:52:08 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
05:52:41 euleritian joins (~euleritia@dynamic-176-006-192-246.176.6.pool.telefonica.de)
05:54:06 michalz joins (~michalz@185.246.207.200)
05:58:11 × danza quits (~francesco@151.57.195.82) (Ping timeout: 256 seconds)
06:03:54 <cheater> yea i know right
06:04:05 <cheater> but there are people who *will* say this
06:04:18 <cheater> like honestly that's most people who haven't used haskell
06:19:11 × Square2 quits (~Square4@user/square) (Ping timeout: 268 seconds)
06:26:27 petrichor joins (~znc-user@user/petrichor)
06:26:47 × Rodney_ quits (~Rodney@176.254.244.83) (Ping timeout: 252 seconds)
06:27:03 oo_miguel joins (~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
06:32:26 × iteratee quits (~kyle@162.218.222.207) (Read error: Connection reset by peer)
06:32:36 iteratee_ joins (~kyle@162.218.222.207)
06:33:50 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
06:36:53 kuribas joins (~user@2a02:1808:8a:fa84:e473:eba8:6b89:265e)
06:38:55 × iteratee_ quits (~kyle@162.218.222.207) (Read error: Connection reset by peer)
06:39:10 iteratee joins (~kyle@162.218.222.207)
06:41:05 philopsos1 joins (~caecilius@user/philopsos)
06:44:15 × rosco quits (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal)
06:44:19 Rodney_ joins (~Rodney@176.254.244.83)
06:44:52 × kuribas quits (~user@2a02:1808:8a:fa84:e473:eba8:6b89:265e) (Remote host closed the connection)
06:45:05 kuribas joins (~user@2a02:1808:8a:fa84:1e15:b436:3fe1:ba71)
06:46:13 danse-nr3 joins (~danse-nr3@151.57.194.120)
06:53:57 × kuribas quits (~user@2a02:1808:8a:fa84:1e15:b436:3fe1:ba71) (Ping timeout: 272 seconds)
06:57:09 euphores joins (~SASL_euph@user/euphores)
07:03:41 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
07:04:12 rvalue joins (~rvalue@user/rvalue)
07:09:12 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:11:12 × euleritian quits (~euleritia@dynamic-176-006-192-246.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
07:13:21 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 255 seconds)
07:13:35 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
07:15:21 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
07:16:24 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Excess Flood)
07:16:46 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
07:17:17 sord937 joins (~sord937@gateway/tor-sasl/sord937)
07:18:25 Square2 joins (~Square4@user/square)
07:21:01 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds)
07:21:14 euleritian joins (~euleritia@dynamic-176-006-192-246.176.6.pool.telefonica.de)
07:24:27 × ft quits (~ft@p508db8fc.dip0.t-ipconnect.de) (Quit: leaving)
07:30:43 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
07:40:24 gmg joins (~user@user/gehmehgeh)
07:47:34 rosco joins (~rosco@yp-146-6.tm.net.my)
07:52:07 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
07:53:30 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
07:58:38 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
08:02:41 × xdminsy quits (~xdminsy@117.147.70.240) (Quit: Konversation terminated!)
08:03:05 xdminsy joins (~xdminsy@117.147.70.240)
08:11:49 cfricke joins (~cfricke@user/cfricke)
08:12:47 kadir joins (~kadir@85.103.183.96)
08:23:23 × son0p quits (~ff@152.203.77.121) (Ping timeout: 252 seconds)
08:24:01 × euleritian quits (~euleritia@dynamic-176-006-192-246.176.6.pool.telefonica.de) (Ping timeout: 255 seconds)
08:27:08 × econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
08:28:30 euleritian joins (~euleritia@dynamic-176-004-196-081.176.4.pool.telefonica.de)
08:34:54 chele joins (~chele@user/chele)
08:47:11 × danse-nr3 quits (~danse-nr3@151.57.194.120) (Ping timeout: 268 seconds)
08:50:48 danza joins (~francesco@151.57.194.120)
08:50:53 × xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 252 seconds)
08:50:53 sawilagar joins (~sawilagar@user/sawilagar)
08:53:25 × euleritian quits (~euleritia@dynamic-176-004-196-081.176.4.pool.telefonica.de) (Ping timeout: 256 seconds)
08:53:34 euleritian joins (~euleritia@dynamic-176-006-177-053.176.6.pool.telefonica.de)
08:54:12 danse-nr3 joins (~danse-nr3@151.57.194.120)
08:57:03 × danza quits (~francesco@151.57.194.120) (Ping timeout: 268 seconds)
09:00:37 × euleritian quits (~euleritia@dynamic-176-006-177-053.176.6.pool.telefonica.de) (Ping timeout: 272 seconds)
09:01:16 euleritian joins (~euleritia@dynamic-176-000-145-069.176.0.pool.telefonica.de)
09:05:33 × rosco quits (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal)
09:05:48 rosco joins (~rosco@yp-146-6.tm.net.my)
09:09:52 hseg joins (~gesh@46.120.21.14)
09:10:46 <hseg> Checking for the sake of reproducible builds, is there some way to avoid infecting the executable with the build directory?
09:11:26 <hseg> (i'm building with stack)
09:11:53 <hseg> (i.e. strings $executable shows references to /home/gesh/.local/share/stack/snapshots/x86_64-linux)
09:13:23 × euleritian quits (~euleritia@dynamic-176-000-145-069.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
09:13:40 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
09:15:37 <[exa]> hseg: not sure with stack, but I checked a few executables from cabal here and there doesn't seem to be any reference to any local directories
09:16:03 <[exa]> hseg: anyway for replroducible builds you might want to have a complete separate clean environment for them, like what debians do with sbuild or so
09:16:18 <hseg> oh, definitely
09:16:39 <[exa]> actually `sbuild` can build haskelly stacky stuff already so might be the case that reuse is easy there
09:17:33 <hseg> wasn't expecting to get fully reproducible builds in one shot, more trying to get closer to reproducibility
09:17:57 <hseg> sbuild?
09:20:16 <hseg> btw, checking cabal-built ghcid shows such references to build dir
09:21:06 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
09:21:45 <hseg> ah, I assume you mean https://sbuild.org
09:22:01 euleritian joins (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de)
09:28:33 × euleritian quits (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
09:28:50 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
09:31:50 × danse-nr3 quits (~danse-nr3@151.57.194.120) (Read error: Connection reset by peer)
09:32:55 danse-nr3 joins (~danse-nr3@151.43.144.199)
09:36:04 __monty__ joins (~toonn@user/toonn)
09:38:08 × deriamis quits (deriamis@ec2-54-187-167-69.us-west-2.compute.amazonaws.com) (Quit: ZNC - https://znc.in)
09:38:23 deriamis joins (deriamis@ec2-54-187-167-69.us-west-2.compute.amazonaws.com)
09:40:46 <ski> cheater : <https://ocaml.org/manual/5.2/lablexamples.html>
09:43:16 <cheater> yeah that's not really what i'm talking about
09:43:41 <ski> it's labelled arguments, which you can provide out of order
09:43:49 <cheater> yes. not what i'm talking about
09:44:05 <ski> (can't reaally provide them, out of order, without labelling them)
09:44:25 <ski> (at least not, if you want the language to be sane)
09:44:48 <cheater> i'll disagree with that last one
09:45:04 <cheater> i'm talking about the fact that most often with functions in haskell you either have arguments that all have different types, or just a small amount amount of arguments of equal types, which can be represented as a tuple (or, uncurried, with -> )
09:45:23 <cheater> at that point it's easy to figure out which piece goes in which hole
09:45:23 <ski> what if the types of `x',`y',`z' are the same as the types of `a',`b',`c' (respectively) ?
09:45:35 <danse-nr3> still with this stuff? What is wrong with my suggestion to use a product type?
09:45:42 <cheater> i specifically typed out their types ski
09:45:53 <ski> not in the application, you did not
09:46:10 <cheater> it was an example in the context of what i said before about the type signature
09:46:27 <cheater> it was all part of the same example
09:47:23 <ski> `x',`y',`z',`a',`b',`c' here are meta-variables, standing for arbitrary expressions. there's no a-priori associatiation of these, to the types `X',`Y',`Z',`A',`B',`C' .. if you mean just actual variable names `x',`y',`z',`a',`b',`c' .. then that's very limited, doesn't scale, isn't really composable
09:47:39 <cheater> stop being confused on purpose
09:47:56 <ski> Hanlon's razor
09:48:02 <cheater> no
09:48:24 <ski> i genuienly don't know how you are envisioning this to work
09:48:39 <danse-nr3> huh i knew it as occam's razor... or is it different?
09:48:46 <ski> no, it's not the same thing
09:48:51 <danse-nr3> v
09:49:14 <ski> "Don't attribute to malice, what can be adequately explained by ignorance/stupidity."
09:49:59 <danse-nr3> i remember occam's as "the simplest explanation is also the most likely" ... but it is lost in the mists of time. Maybe that was misreferenced
09:50:23 <ski> perhaps i'd understand it better, cheater, if you made a simple prototype type checker (and maybe parser, if you wish)
09:50:45 <ski> danse-nr3 : yea, that's basically that one
09:50:54 <lortabac> IIRC generic-lens does something similar to what cheater is proposing
09:51:10 <lortabac> you can select a record field by type if there is no ambiguity
09:51:21 <ski> danse-nr3 : <https://en.wikipedia.org/wiki/Hanlon's_razor>
09:51:26 <danse-nr3> dunno, i just use product types and that gives me 99% of the functionality
09:51:52 <danse-nr3> one can also have f (default'{ arg = type })
09:52:01 <lortabac> I think it would be nice to have this feature as an IDE action, but not baked in the language
09:52:40 <lortabac> if you swap two arguments by mistake and it's obvious enough, an IDE may suggest inverting them
09:52:52 <ski> anyway, using records (or labelled multi-arity functions, if available) is one workable approach. what OCaml does, labelled curried arguments, also works
09:53:16 <ski> yes
09:55:09 <ncf> the unordered arguments thing sounds like it would also be garbage wrt type inference
09:56:18 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.1)
09:58:04 × random-jellyfish quits (~developer@user/random-jellyfish) (Ping timeout: 260 seconds)
09:59:55 <ski> like, if you can elaborate this in a workable fashion, i'd be interested in taking a look .. i'm just saying i'm not seeing how it could work, in a way i'd consider reasonable
10:00:21 <ski> but i don't want to discourage you from pondering it, if you want to
10:05:30 × yin quits (~yin@user/zero) (Ping timeout: 268 seconds)
10:06:07 <cheater> you're right, hold up, let me implement a parser and a type checker real quick
10:06:56 yin joins (~yin@user/zero)
10:14:15 titibandit joins (~titibandi@user/titibandit)
10:15:08 <probie> I wouldn't mind such behaviour to allow elision of names in a system where all arguments are named arguments
10:22:13 bo_ joins (~bo@198.red-83-56-252.dynamicip.rima-tde.net)
10:24:40 × _bo quits (~bo@198.red-83-56-252.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
10:26:56 ubert joins (~Thunderbi@2a02:8109:ab8a:5a00:d77a:cc4d:acdd:ee1e)
10:32:11 son0p joins (~ff@186.121.14.247)
10:38:30 × rdcdr quits (~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
10:38:57 rdcdr joins (~rdcdr@user/rdcdr)
10:56:16 just_started_has joins (~just_star@2401:4900:1cc9:315f:ac5a:52e5:ce3f:eca3)
10:56:21 <just_started_has> hello
10:56:39 <just_started_has> i write test :: [Int] -> [Int]
10:56:39 <just_started_has> in main.hs
10:56:40 <just_started_has> then write test in the ghci of main.hs
10:56:40 <just_started_has> it says Variable not in scope
10:56:41 <just_started_has> why is that ,
10:56:41 <just_started_has> i started haskell 4 hours ago , please forgive this noob question if it is
10:57:14 <just_started_has> the doc says variable not in scope only happens when it is not declared but it is
10:58:08 <int-e> You can't have just the type signature in a module; you have to have an accompanying definition.
10:58:23 <cheater> show us a screenshot of your terminal
10:59:39 <int-e> `ghci main.hs` doesn't execute main.hs as a script. It loads it as a Haskell module.
10:59:48 <int-e> Or, well, tries to.
11:01:19 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds)
11:01:36 <just_started_has> one second
11:02:15 × tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection)
11:02:35 tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
11:03:43 <just_started_has> https://drive.google.com/file/d/1yTimzu4dD3rL4GZKVTsXlJEDbaU4tXvO/view?usp=drive_link
11:03:47 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
11:05:07 <ncf> how are you starting ghci? if you run `ghci main.hs` you should get a nice helpful error about `test` lacking an accompanying binding
11:05:52 <just_started_has> i just quit and startedd , yes it does give an error
11:08:55 <just_started_has> thx
11:09:08 lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4)
11:09:20 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
11:10:00 euleritian joins (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de)
11:19:49 × danse-nr3 quits (~danse-nr3@151.43.144.199) (Ping timeout: 268 seconds)
11:20:55 × yin quits (~yin@user/zero) (Quit: leaving)
11:30:20 <ski> just_started_has : you can use `:reload' (`:r' for short) to make the interactor reload the files that have changed
11:31:04 <just_started_has> yes i just realized that , thanks !!
11:31:21 <just_started_has> i thought that it reloadds automatically ? , can it ?
11:36:09 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds)
11:36:18 <ski> you can set up `:e' (`:edit') to launch (or connect to) your editor, in which case when that command terminates, it'll automatically do a `:r'
11:36:37 Maxdamantus joins (~Maxdamant@user/maxdamantus)
11:36:37 <ski> otherwise, you have to do `:r' manually, after saving
11:37:53 <ski> (or you could launch your interactor inside your editor, possibly)
11:40:26 <just_started_has> i am using the vim
11:40:32 <just_started_has> i think it can
11:40:51 × philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 272 seconds)
11:41:49 yin joins (~yin@user/zero)
11:44:50 <just_started_has> ski    thanks  !! this works
11:45:34 <ski> just_started_has : <https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html#ghci-cmd-:edit>
11:46:31 × yin quits (~yin@user/zero) (Client Quit)
11:47:26 × ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 252 seconds)
11:48:11 × euphores quits (~SASL_euph@user/euphores) (Ping timeout: 268 seconds)
11:48:18 × hseg quits (~gesh@46.120.21.14) (Read error: Connection reset by peer)
11:54:44 euphores joins (~SASL_euph@user/euphores)
12:03:26 danse-nr3 joins (~danse-nr3@151.57.181.243)
12:08:46 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
12:14:25 × euleritian quits (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
12:14:42 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
12:30:53 × bliminse quits (~bliminse@user/bliminse) (Quit: leaving)
12:32:59 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 264 seconds)
12:35:38 bliminse joins (~bliminse@user/bliminse)
12:35:41 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
12:48:51 xff0x joins (~xff0x@ai113088.d.east.v6connect.net)
13:07:57 × jcarpenter2 quits (~lol@2603:3016:1e01:b940:9e16:4716:cb0d:9d39) (Read error: Connection reset by peer)
13:08:16 jcarpenter2 joins (~lol@2603:3016:1e01:b940:9e16:4716:cb0d:9d39)
13:08:39 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds)
13:16:53 ystael joins (~ystael@user/ystael)
13:23:30 × lockna quits (~lockna@2a01:4f8:10b:14f1::2) (Quit: ZNC 1.8.2 - https://znc.in)
13:23:44 lockna joins (~lockna@static.139.16.130.94.clients.your-server.de)
13:25:33 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
13:26:53 img joins (~img@user/img)
13:30:33 esnos joins (~user@194.29.137.22)
13:31:50 × just_started_has quits (~just_star@2401:4900:1cc9:315f:ac5a:52e5:ce3f:eca3) (Quit: Client closed)
13:35:48 × thaliaa quits (uid486183@id-486183.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
13:42:13 <esnos> Hi, I want to use haskell-mode with corfu as completion backend, does anybody have working setup. I customized '(tab-always-indent 'complete) and tab completion works in other modes, for example in python, but in haskell mode it just intends and I need to use M-tab which is uncomfortable considering I use tab for everything else. I also saw that in other modes completion-at-point is set to C-M-i, which corfu uses I think, but in
13:42:13 <esnos> haskell-mode it isn't set to anything, so maybe this is why there are problems.
13:43:12 <esnos> Sorry for double message, I started using irc yesterday
13:47:17 <danse-nr3> this question is quite emacs-specific esnos, i am afraid we might not be that knowledgeable about that. Anyways usually for developing people use Haskell Language Server as a backend... i am not sure about which emacs client to recommend, i think there are a couple of main ones
13:50:30 yin joins (~yin@user/zero)
13:50:56 <esnos> I use eglot with hls, but to show possible completions you need company or eglot
13:52:35 <danse-nr3> oh then i don't know what corfu is for
13:56:45 cfricke joins (~cfricke@user/cfricke)
14:02:57 <stefan-__> esnos: I use company-mode and have the following binding in "haskell-mode-map": "("C-SPC" . 'company-complete)" -- additionally I disabled auto-showing the company completions: "(setq company-idle-delay nil)"
14:10:30 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds)
14:11:11 euleritian joins (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de)
14:14:24 × petrichor quits (~znc-user@user/petrichor) (Quit: ZNC 1.8.2 - https://znc.in)
14:15:34 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
14:18:15 hseg joins (~gesh@46.120.21.14)
14:20:23 petrichor joins (~znc-user@user/petrichor)
14:24:37 ocra8 joins (ocra8@user/ocra8)
14:35:49 × Benzi-Junior quits (~BenziJuni@232-148-209-31.dynamic.hringdu.is) (Quit: ZNC 1.8.2 - https://znc.in)
14:36:06 Benzi-Junior joins (~BenziJuni@232-148-209-31.dynamic.hringdu.is)
14:43:04 <esnos> stefan-__, will try similar approach
14:44:23 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.1)
14:48:40 × dtman34 quits (~dtman34@2601:447:d001:ed50:f596:52e1:73ca:629d) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
14:49:00 dtman34 joins (~dtman34@c-75-72-163-222.hsd1.mn.comcast.net)
14:58:08 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 260 seconds)
15:01:16 × chele quits (~chele@user/chele) (Remote host closed the connection)
15:17:23 random-jellyfish joins (~developer@ip4-89-238-215-238.euroweb.ro)
15:17:24 × random-jellyfish quits (~developer@ip4-89-238-215-238.euroweb.ro) (Changing host)
15:17:24 random-jellyfish joins (~developer@user/random-jellyfish)
15:19:19 × yin quits (~yin@user/zero) (Ping timeout: 256 seconds)
15:21:16 <stefan-__> esnos: here is my config for eglot and lsp-mode (currently in use): https://gist.github.com/dozed/9b70668200876179b2a5381c53683ca7
15:24:56 × danse-nr3 quits (~danse-nr3@151.57.181.243) (Ping timeout: 268 seconds)
15:36:16 <johnw> Part of the answer to my "show" lens question is `re _Show`, which understandably is only valid as a Getter or Fold. There is no valid traversal unless I place an unchecked constraint on the mutation of "no modification that aren't numbers".
15:38:24 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
15:39:48 ph88 joins (~ph88@2a02:8109:9e26:c800:36fd:400b:5478:66f9)
15:40:04 × Square2 quits (~Square4@user/square) (Ping timeout: 255 seconds)
15:40:23 <ph88> does someone know a map that can only be read and written to and not delete items?
15:43:49 <ncf> (->) ?
15:45:58 <ph88> ?
15:46:25 yin joins (~yin@user/zero)
15:51:38 × tv quits (~tv@user/tv) (Quit: derp)
15:51:55 tv joins (~tv@user/tv)
15:56:30 Square joins (~Square@user/square)
15:57:23 <ncf> or search hackage for "total map" if you want something efficient
15:57:54 <ncf> but k -> v supports lookup and insertion and not deleting items
16:01:51 <EvanR> peanut gallery here, but if you emulate a map that is not total with total map by having the default value be Nothing, then you can still "delete" by "inserting nothing"
16:02:09 <EvanR> ph88's plans are ruined
16:03:47 <ph88> empire collapsed
16:08:00 todi joins (~todi@p57803331.dip0.t-ipconnect.de)
16:13:35 × Square quits (~Square@user/square) (Ping timeout: 256 seconds)
16:18:35 × yin quits (~yin@user/zero) (Ping timeout: 252 seconds)
16:22:02 yin joins (~yin@user/zero)
16:27:11 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 256 seconds)
16:32:25 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
16:32:29 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 240 seconds)
16:32:54 rvalue joins (~rvalue@user/rvalue)
16:36:02 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
16:36:38 × euleritian quits (~euleritia@dynamic-176-004-151-001.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
16:36:55 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
16:39:33 × demon-cat quits (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 268 seconds)
16:39:45 demon-cat joins (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
16:40:49 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
16:42:01 × ubert quits (~Thunderbi@2a02:8109:ab8a:5a00:d77a:cc4d:acdd:ee1e) (Remote host closed the connection)
16:42:25 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
16:49:34 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
16:52:31 × qhong quits (~qhong@DN160vrd000d6kpg009l6c0000fj.stanford.edu) (Read error: Connection reset by peer)
16:55:13 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 255 seconds)
16:56:07 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
17:03:37 × infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection)
17:04:23 × ph88 quits (~ph88@2a02:8109:9e26:c800:36fd:400b:5478:66f9) (Ping timeout: 260 seconds)
17:04:29 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
17:05:43 infinity0 joins (~infinity0@pwned.gg)
17:09:37 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
17:11:11 × rosco quits (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal)
17:17:59 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
17:21:51 × pavonia quits (~user@user/siracusa) (Quit: K-Lined)
17:22:56 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 252 seconds)
17:27:44 × johnw quits (~johnw@69.62.242.138) (Read error: Connection reset by peer)
17:28:32 johnw joins (~johnw@69.62.242.138)
17:31:45 cfricke joins (~cfricke@user/cfricke)
17:41:45 wootehfoot joins (~wootehfoo@user/wootehfoot)
17:44:38 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds)
17:46:16 ChaiTRex joins (~ChaiTRex@user/chaitrex)
17:46:23 euphores joins (~SASL_euph@user/euphores)
17:55:47 × demon-cat quits (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 272 seconds)
17:57:35 × random-jellyfish quits (~developer@user/random-jellyfish) (Ping timeout: 252 seconds)
17:57:40 × hseg quits (~gesh@46.120.21.14) (Quit: WeeChat 4.2.2)
17:59:15 ft joins (~ft@p508db8fc.dip0.t-ipconnect.de)
18:00:00 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 255 seconds)
18:04:22 <cheater> i wish cabal would allow me module prefixes
18:05:04 <cheater> so like i wouldn't have to do vim test/MyCompany/MyProduct/MyProject/Test/Actual/Hierarchy/Here.hs
18:05:19 <cheater> instead i'd do vim test/Actual/Hierarchy/Here.hs
18:06:06 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
18:06:26 <cheater> while the module in Here.hs is still declared as "module MyCompany.MyProduct.MyProject.Test.Actual.Hierarchy.Here where"
18:07:45 gmg joins (~user@user/gehmehgeh)
18:09:16 <cheater> the part that goes MyCompany/MyProduct/MyProject/ actually doesn't mean anything because it in fact doesn't change in relevant monorepi
18:09:34 <cheater> it's just annoying to type out
18:11:15 <cheater> so i guess what i really want is for cabal to give me module *file path* prefixes
18:17:26 × ocra8 quits (ocra8@user/ocra8) (Quit: WeeChat 4.2.2)
18:20:16 <yin> cheater: just use fzf?
18:20:20 <yin> that's not a cabal problem
18:20:39 <cheater> overly long paths are a problem
18:20:40 <cheater> imo
18:20:50 <cheater> and haskell code bases tend to adopt those
18:21:00 <cheater> like the whole path to this file would be
18:21:30 <yin> why exactly are long paths a problem?
18:21:52 <cheater> it would be /home/user/work/my-company/my-company-monorepo/my-product-my-project-package-name/test/MyCompany/MyProduct/MyProject/Test/Actual/Hierarchy/Here.hs
18:22:01 <cheater> they're a problem because repeating the same stuff all the time is annoying
18:22:44 <cheater> look at how many times stuff repeats just in that path
18:22:57 demon-cat joins (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
18:23:20 <cheater> usually you start your work by cd'ing to my-company-monorepo
18:23:31 <yin> cheater: i literally would type at the terminal `br<CR>Here<CR>' and open that file in vim
18:23:32 <cheater> so you skip all of that
18:23:38 <yin> it's 8 key presses
18:23:44 <cheater> right but that doesn't work if you already have vim
18:23:55 <cheater> idk what br is, what is it?
18:24:12 <yin> broot
18:24:20 <cheater> i am broot?
18:24:24 <yin> you can use any fuzzy finder, like fzf
18:24:36 <cheater> right
18:24:44 <yin> vim works with fzf too
18:24:57 <yin> or just use :find
18:25:05 <cheater> yeah but then it's yet another level of complexity to think about
18:25:13 <cheater> when doing a trivial thing like opening a file
18:25:22 <cheater> like making every single thing more complex isn't the solution
18:25:50 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
18:26:00 <cheater> that's like having to perform a song every time you want a sip of water from your cup
18:26:11 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
18:26:13 <mauke> symlinks, lol
18:26:18 <yin> the directory paradigm isn't the problem here, it's how poorly you choose to navigate it
18:26:27 <cheater> well it's not about poor navigation really
18:26:44 <cheater> it's about the fact that as programmers we are eager to accept all those "you can just"s
18:27:10 <cheater> and then 5 years down the line you're doing nothing but "you can just"s
18:27:14 <yin> cheater: the fact that fuzzy finders exist prove that as programmers we didn't accept anything
18:27:17 × demon-cat quits (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 240 seconds)
18:27:32 <yin> you're supposed to automate your tasks, that's why computers are programmable
18:27:40 <cheater> in your paradigm fuzzy finders need to be invoked every single time you want to open a file
18:27:53 <cheater> in my suggestion, they don't. you don't need to do anything every time you want to open a file
18:28:07 <yin> nothing stops you from having a single root directory with no subfolders where all your files live
18:28:44 <cheater> well, it does, because people still want to be able to discriminate code local to a company or to a project from code that is not such
18:28:49 <yin> or a single .hs file
18:29:11 <yin> cheater: so you want others to craft a solution to your measure?
18:29:11 <cheater> yes. if we want to speak nonsense, nothing's stopping me from rewriting everything in cobol
18:29:25 <cheater> yes. specifically you
18:29:30 <cheater> i will be very unhappy if it's anyone else
18:29:43 <cheater> lol
18:29:44 <yin> i don't mean to be rude
18:30:04 ph88 joins (~ph88@2a02:8109:9e26:c800:50c2:30a5:77d8:a72f)
18:30:23 <yin> what would your solution to your problem be?
18:30:38 <ph88> is there another way to write code for what i'm trying to do? https://play.haskell.org/saved/d94XX4WG
18:30:55 <mauke> https://howfuckedismydatabase.com/nosql/
18:31:04 target_i joins (~target_i@user/target-i/x-6023099)
18:31:49 <ncf> ph88: i can't guess what you're trying to do from just this
18:31:52 <mauke> ph88: I can't tell what you're trying to do
18:32:00 <mauke> I'm as confused as the compiler
18:32:26 <cheater> yin: in the cabal file, under "test-suite test", have "hs-source-dir-prefix: MyCompany/MyProduct/MyProject/Test"
18:32:46 <cheater> one line in the cabal file saves a million lines typed over the lifespan of a programmer
18:33:42 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
18:34:32 <ph88> mauke, i'm trying to have a function that given a data which implements a typeclass can return another data that implements the same type class
18:34:40 ChaiTRex joins (~ChaiTRex@user/chaitrex)
18:35:17 <mauke> what does that even mean
18:35:29 <mauke> this feels like an XY problem
18:35:39 <yin> cheater: i think that would introduce a lot of problems to other unsuspecting users
18:35:41 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 240 seconds)
18:35:47 <yin> i'm sure you can see that
18:36:22 <ph88> mauke, ncf rust has something similar https://doc.rust-lang.org/rust-by-example/trait/dyn.html how to explain ?? in OO languages you return a type that implements an interface
18:36:24 <cheater> blinded by greed, i am unable to :)
18:36:35 <ncf> sounds like existentials
18:36:53 <cheater> ph88: you're talking about uh, factories
18:37:03 <cheater> ph88: you don't want those here
18:37:16 <ncf> what
18:37:40 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
18:37:42 <cheater> but what you're really trying to say is something like myfunction :: (MyClass a) => a -> SomeOtherType -> a
18:37:58 <cheater> this type signature tells you that the return type, a, will implement MyClass
18:38:14 <mauke> data Box = forall a. (Animal a) => MkBox a
18:38:15 <yin> cheater: if you're using vim and think 'apt i fzf' is adding too much complexity to your life, the :find and :vim commands are your friends
18:38:17 <ph88> cheater, `getSomething :: forall b. Something b => a -> Maybe b`
18:38:25 demon-cat joins (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
18:38:39 <cheater> ph88: yes, that is something that is done
18:38:46 <mauke> hmm, actually ...
18:38:52 <cheater> ph88: the question is why you want that
18:39:13 <mauke> data Box (c :: Constraint) = forall a. (c a) => MkBox a -- is that legal?
18:39:32 <cheater> yin: what is 'apt i fzf'?
18:39:37 <mauke> ah, no
18:39:46 <mauke> it would have to be (c :: Type -> Constraint) or something
18:39:52 <ph88> i have a typeclass for database entities, the functions are enough to save each entity separately. But i need a function to get the relations (dependencies) from one entity to another.
18:40:15 <ph88> I don't want to hardcode my schema as haskell types, please don't suggest it
18:40:32 <yin> cheater: apt is a popular package manager used on debian distros. that command installs fzf from the official repositories. you should of course use the appropriate command for your system
18:40:58 <ph88> mauke, what's that, existential types?
18:41:01 <mauke> yes
18:41:24 <ph88> do i need GADT for existential types ?
18:41:32 <mauke> I don't think so
18:41:48 <ncf> no
18:41:49 <cheater> yin: that is not the only line one has to type to use fzf for opening every single file.
18:41:54 <yin> no, but GADTs imply existential types i'm pretty sure
18:42:54 <ph88> data Box (c :: Type -> Constraint) = forall a. (c a) => MkBox a like this ?
18:43:03 <cheater> yin: what i'm trying to do here is to contrast for you, on one side, typing one line into a cabal file and that's it, and on the other side, having to invoke an extra tool every single of the thousands of thousands of times you want to do something related to file paths
18:43:34 <ncf> ph88: i still have no idea what you're trying to do
18:44:41 <raehik> How can I get GHCi to pretty print my TypeErrors on :k! invocations ? It just prints `= (TypeError ...)` :(
18:46:55 <ph88> ncf, similar to this https://stackoverflow.com/questions/5699427/what-does-it-mean-for-a-function-to-return-an-interface i don't know how to explain it better. It's an opaque piece of data other than you know what interface methods you can call on it. In haskell it's an opaque piece of data other than you know which typeclass methods you can call on it
18:47:12 <yin> cheater: now see it from my side, the side of a person who is trying to help another person solve a problem: you can add a field to a cabal file that will cause inumerous headaches for everyone when normal paths don't work until you find that there's some obscure line hidden in the middle of a project's cabal OR type fzf instead of cd (i actually have it aliased to just 'z')
18:47:33 <ncf> ph88: that describes an existential type, but i can't tell if it's what you actually need
18:47:59 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 264 seconds)
18:48:14 <ph88> ncf, i think i need existential types. I only used them once before, still not entirely sure how they work
18:49:19 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
18:49:20 <yin> anyways, it's one of many possible solutions for your problem. i don't think an ecosystem's consistency should suffer by trying to solve problems beyond its scope
18:49:44 <mauke> ph88: https://play.haskell.org/saved/9CUzFQLl
18:50:02 <cheater> cabal files already have lots of such advanced flags. there's no reason to turn our language into the Fischer Price version of itself just because of some conceived notion of "this might be difficult to explain to a newbie"
18:50:19 <yin> cheater: are you using vim or neovim?
18:50:47 <cheater> vim
18:50:50 <yin> cheater: i feel like you're being purposefuly obtuse. this might be a good place to end the conversation
18:50:58 <cheater> not at all
18:51:31 <yin> i don't think i can help you
18:51:43 <cheater> yes, i agree on that
18:53:55 <ph88> mauke, Thanks ! i will try this
18:55:31 <mauke> if you want to go mad with power, there is also https://hackage.haskell.org/package/base-4.19.1.0/docs/Data-Dynamic.html
19:00:46 <raehik> do type families trip up TypeError printing for `:k!`...?
19:01:23 <raehik> > :k! TypeError (Text "test")
19:01:24 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
19:01:34 <raehik> understandable
19:06:34 <yin> mauke: 0.234 doesn't seem random at all
19:07:32 <yin> have you considered 0.37 ?
19:07:46 <mauke> blame the original rust code :-)
19:16:53 greenflower joins (~greenflow@103.191.25.63)
19:17:02 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds)
19:18:24 sord937 joins (~sord937@gateway/tor-sasl/sord937)
19:22:05 <ski> ph88 : "i'm trying to have a function that given a data which implements a typeclass can return another data that implements the same type class" -- sounds like you want `getSomething :: a -> Maybe (exists b. Something b *> b)', not `getSomething :: forall b. Something b => a -> Maybe b', then
19:23:53 <ph88> ski, what does *> mean in a type ?
19:24:13 <ski> "provide this constraint along with a value of this other type"
19:24:42 <ski> ("provide", as opposed to "expect")
19:24:47 <ph88> can't find it in the manual
19:24:59 <ski> it's not in the manual, it's pseudo-Haskell
19:25:00 <EvanR> it's skiskell
19:25:16 <ski> it's (imho) a useful way to talk about these matters
19:25:46 <ski> (before getting into the details of how to actually effect the desired semantics with current-day Haskell)
19:26:04 <ph88> i'm interested in those details :p
19:27:01 <ski> a value of type `Cxt => T' is a value such that, if the user/caller/consumer provides evidence of the constraint `Cxt' to it, it will give you back a value of type `T'
19:28:07 <ski> a value of type `Cxt *> T' is a value that bundles evidence for a constraint `Cxt' together with a value `T', allowing the user/caller/consumer to both use the evidence, as well as the value
19:28:56 <ski> in the dictionary-passing implementation of type classes, `Cxt => T' gets translated to `DictCxt -> T', a function that accepts a dictionary of method implementations, and computing a value of type `T'
19:29:16 <ph88> is that dictionary visible in Core ?
19:29:29 <ski> while, in a dictionary-passing implementation, `Cxt *> T' would get translated to `(DictCxt,T)', a *pair* of the dictionary and the value
19:31:52 gorignak joins (~gorignak@user/gorignak)
19:32:02 <ski> (`forall a.' vs. `exists a.' is also conceptually similar. the first depends on the caller/user/consumer to specify the actual type to use in place of `a', while the second lets the callee/implementor/producer pick the type to use for `a'. so the former is kinda like a function that gets a type `a' at run-time, while the latter is kinda like a pair of a type `a' and a value. in a type-erasure implementation,
19:32:08 <ski> types don't exist at run-time, but one can imagine implementations that passes around evidence for types at run-time, e.g. to allow arbitrary unboxing, or for GC purposes)
19:34:05 <ski> in any case, it's useful to be aware that `(exists a. ..a..) -> ...' is logically equivalent to `forall a. (..a.. -> ...)', as well as `(Cxt *> T) => U' being equivalent to `Cxt => (T -> U)' (both of which are a kind of currying/uncurrying, kinda)
19:34:23 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
19:34:42 <ncf> (Cxt *> T) -> U
19:34:49 <ski> .. this is what justifies using the keyword `forall' above, in that `Box' datatype, to encode *existentials*
19:34:59 <ski> er, right, ty
19:35:33 <ski> data Box c = forall a. (c a) => MkBox a
19:35:37 <ski> means that we have
19:35:52 <ski> MkBox :: forall a. c a => a -> Box c
19:35:54 <ski> or
19:36:04 <ski> MkBox :: forall a. (c a => (a -> Box c))
19:36:13 <ski> to be explicit, which is equivalent to
19:36:24 <ski> MkBox :: forall a. ((c a *> a) -> Box c)
19:36:29 <ski> which is equivalent to
19:36:35 <tomsmeding> % :k! TypeError (Text "test") -- raehik
19:36:35 <yahb2> <interactive>:1:1: error: test
19:36:48 <ski> MkBox :: (exists a. (c a *> a)) -> Box c
19:37:13 <ski> meaning that a value of type `Box c' amounts to ("wraps") a value of type `exists a. c a *> a'
19:37:41 × ent quits (entgod@kapsi.fi) (Ping timeout: 240 seconds)
19:37:51 ent joins (entgod@kapsi.fi)
19:39:14 <raehik> tomsmeding: aha ty
19:39:25 <raehik> % type family Id a where Id a = a
19:39:25 <yahb2> <interactive>:79:1: error: ; • Illegal family declaration for ‘Id’ ; Enable TypeFamilies to allow indexed type families ; • In the type family declaration for ‘Id’
19:39:44 <raehik> oh well I can't show you what I mean xd but if you now wrap the above :k! invocation in Id, it fails
19:39:55 ocra8 joins (ocra8@user/ocra8)
19:40:02 <raehik> (by fail I mean doesn't print the type error properly)
19:40:19 <tomsmeding> % :set -XTypeFamilies
19:40:19 <yahb2> <no output>
19:40:26 <tomsmeding> % type family Id a where Id a = a
19:40:26 <yahb2> <no output>
19:40:35 <ski> (this is *one* way to express/encode an existential. there is also another common way, which is sometimes preferable, which is based on a logical equivalence between `T' and `forall o. (T -> o) -> o')
19:40:35 <tomsmeding> % :k! Id (TypeError (Text "test"))
19:40:35 <yahb2> <interactive>:1:1: error: test
19:41:04 <raehik> thanks! interesting maybe it changed in GHC 9.8 (I know they constantly fiddle with :k and :k!)
19:41:11 <[exa]> dmj`: for the evaluator I meant basically this https://gitea.blesmrt.net/exa/uskel/
19:42:12 <raehik> hmm I simply don't get the same output on GHC 9.6 or 9.8
19:42:27 <tomsmeding> if I'm not mistaken yahb2 is on 9.4.8
19:42:34 <tomsmeding> maybe it regressed!
19:42:41 <ph88> thank you ski :)
19:43:03 <ski> ph88 : .. i could go on, but perhaps this is enough, for the time being
19:43:12 <ph88> yes it's enough, i can study it
19:43:29 <raehik> tomsmeding: my 9.4.8 still prints `= (TypeError ...)` :'(
19:44:06 <tomsmeding> hm it does
19:45:22 <tomsmeding> (why does ghci not have a :version command or something)
19:45:55 <raehik> I can work around this by reifying, but it means I can't do super simple type-level evaluation failure examples :(
19:46:38 <tomsmeding> % :k! Id (TypeError (Text "test"))
19:46:38 <yahb2> Id (TypeError (Text "test")) :: k ; = (TypeError ...)
19:46:41 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
19:46:44 <tomsmeding> I :q'd and did it again
19:46:53 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
19:46:54 <tomsmeding> there was some state that made it work somehow
19:47:01 <tomsmeding> but the state is gone now :D
19:47:21 <raehik> XD
19:51:07 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
19:51:53 <tomsmeding> raehik: I re-ran all commands that could possibly be relevant in yahb2's history in a ghci shell and it still doesn't work
19:53:05 <tomsmeding> raehik: works on ghc 9.0 and 9.2 xD
19:53:06 <raehik> hahahahahaha good stuff
19:53:11 <tomsmeding> fails from 9.4 on
19:53:15 <raehik> ahhhh there it is
19:53:44 thaliaa joins (uid486183@id-486183.uxbridge.irccloud.com)
19:54:03 <raehik> alas my 9.2 doesn't work either bu
19:54:14 <raehik> *but I'm not too worried
19:55:21 <tomsmeding> raehik: https://paste.tomsmeding.com/QzNahvGW
19:55:23 <tomsmeding> ¯\_(ツ)_/¯
19:56:07 <ncf> the ski existential lecture has taken place
19:56:21 <ski> where ?
19:56:27 <ncf> right here!
19:56:37 ski looks around, confusedly
19:56:50 <ncf> you barely missed it
19:57:11 <raehik> tomsmeding: oh yep that works on 9.2. but my non-contrived example (that goes thru lots of type families) doesn't xd
19:57:16 <tomsmeding> ah :)
19:57:25 <tomsmeding> yeah I've always found :k! to be a bit unstable
19:57:28 <tomsmeding> unfortunatelt
19:57:31 <tomsmeding> -y
19:58:19 × jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
19:58:56 <raehik> thx for the help my docs will benefit from knowing this!
19:59:53 <tomsmeding> % :set -XTypeApplications
19:59:53 <yahb2> <no output>
20:00:01 <tomsmeding> % Proxy @(Id (TypeError (Text "test")))
20:00:02 <yahb2> <interactive>:17:1: error: Data constructor not in scope: Proxy
20:00:05 <tomsmeding> % import Data.Proxy
20:00:05 <yahb2> <no output>
20:00:07 <tomsmeding> % Proxy @(Id (TypeError (Text "test")))
20:00:07 <yahb2> <interactive>:21:1: error: ; • test ; • When checking the inferred type ; it :: forall {k}. Proxy (TypeError ...)
20:00:15 <tomsmeding> raehik: perhaps this works?
20:01:36 <tomsmeding> using Proxy means that 1. the type can be whatever, and 2. it will always show if the type evaluates to something sensible
20:01:46 <tomsmeding> but to get it to show it has to typecheck, hence you have to evaluate the type
20:04:00 jmdaemon joins (~jmdaemon@user/jmdaemon)
20:06:13 × sp1ff quits (~user@c-24-21-45-157.hsd1.wa.comcast.net) (Remote host closed the connection)
20:07:53 <raehik> tomsmeding: oh nice catch. I had managed to write a similar definition that somehow did not evaluate the type, so was thinking I needed something more in depth
20:08:39 <tomsmeding> raehik: notable is that :t'ing that doesn't work, you actually have to try to show the Proxy
20:22:10 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
20:22:42 × cayley5 quits (~cayley5@user/phileasfogg) (Quit: Ping timeout (120 seconds))
20:23:04 cayley5 joins (~cayley5@user/phileasfogg)
20:29:13 × greenflower quits (~greenflow@103.191.25.63) (Quit: Client closed)
20:34:09 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
20:34:53 × raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 240 seconds)
20:35:06 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
20:36:05 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 240 seconds)
20:52:16 sawilagar joins (~sawilagar@user/sawilagar)
21:00:05 × yin quits (~yin@user/zero) (Ping timeout: 240 seconds)
21:03:53 × Moyst quits (~moyst@user/moyst) (Ping timeout: 272 seconds)
21:05:19 Moyst joins (~moyst@user/moyst)
21:06:07 × oo_miguel quits (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 260 seconds)
21:07:04 yin joins (~yin@user/zero)
21:08:37 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
21:11:23 × ph88 quits (~ph88@2a02:8109:9e26:c800:50c2:30a5:77d8:a72f) (Remote host closed the connection)
21:11:28 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:14:42 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:17:12 euphores joins (~SASL_euph@user/euphores)
21:18:32 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:22:04 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 255 seconds)
21:23:27 causal joins (~eric@50.35.88.207)
21:25:25 × esnos quits (~user@194.29.137.22) (Remote host closed the connection)
21:26:01 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
21:34:23 jmdaemon joins (~jmdaemon@user/jmdaemon)
21:35:41 × kadir quits (~kadir@85.103.183.96) (Quit: WeeChat 4.2.2)
21:36:38 barak joins (~barak@2a0d:6fc2:68c1:7200:3cf2:a87d:a02b:3e21)
21:45:16 Sgeo joins (~Sgeo@user/sgeo)
22:01:12 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
22:04:21 Sgeo joins (~Sgeo@user/sgeo)
22:04:47 × mei quits (~mei@user/mei) (Remote host closed the connection)
22:07:13 mei joins (~mei@user/mei)
22:09:55 × immae quits (~immae@2a01:4f8:141:53e7::) (Quit: WeeChat 3.3)
22:10:52 AlexNoo_ joins (~AlexNoo@178.34.162.221)
22:11:04 immae joins (~immae@2a01:4f8:141:53e7::)
22:13:47 × titibandit quits (~titibandi@user/titibandit) (Remote host closed the connection)
22:14:11 × AlexZenon quits (~alzenon@178.34.162.125) (Ping timeout: 272 seconds)
22:14:15 × AlexNoo quits (~AlexNoo@178.34.162.125) (Ping timeout: 255 seconds)
22:19:50 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
22:26:12 AlexZenon joins (~alzenon@178.34.162.221)
22:28:45 × acidjnk_new quits (~acidjnk@p200300d6e714dc51e96b24be77fae744.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
22:32:40 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
22:38:24 × michalz quits (~michalz@185.246.207.200) (Quit: ZNC 1.9.0 - https://znc.in)
22:43:19 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 272 seconds)
22:44:43 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
22:50:44 yin is now known as zero
22:50:57 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds)
22:54:50 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
23:05:39 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:07:13 talukara joins (~talukara@user/talukara)
23:09:54 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 268 seconds)
23:10:14 × ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Quit: Lost terminal)
23:10:39 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
23:11:14 × mei quits (~mei@user/mei) (Remote host closed the connection)
23:13:38 mei joins (~mei@user/mei)
23:20:04 × talukara quits (~talukara@user/talukara) (Quit: I closed IRC)
23:21:01 pavonia joins (~user@user/siracusa)
23:26:13 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:28:39 talukara joins (~talukara@user/talukara)
23:35:24 sadome joins (~sadome@182.69.182.31)
23:35:24 × sadome quits (~sadome@182.69.182.31) (Changing host)
23:35:24 sadome joins (~sadome@user/sadome)
23:35:24 × sadome quits (~sadome@user/sadome) (Excess Flood)
23:36:07 raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net)
23:48:06 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 256 seconds)
23:59:14 × tv quits (~tv@user/tv) (Read error: Connection reset by peer)

All times are in UTC on 2024-05-14.