Home liberachat/#haskell: Logs Calendar

Logs on 2022-11-26 (liberachat/#haskell)

00:01:16 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
00:03:30 × Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
00:06:03 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
00:06:47 × chomwitt quits (~chomwitt@2a02:587:7a0d:dd00:1ac0:4dff:fedb:a3f1) (Ping timeout: 264 seconds)
00:08:18 Xeroine joins (~Xeroine@user/xeroine)
00:08:40 <tvandinther> `stack new` is creating a ghc-9.2.5 project but afaik there is no HLS for this version. If I change the ghc version of the resolver in stack.yaml, then the build no longer works. Looking for a stackage-snapshot with an hls-compatible ghc version provides no results. Feels like a stalemate. This shouldn't be so difficult.
00:10:58 <VOID[m]> tvandinther: I compiled hls for 9.2.5 and has no problems with that so far
00:11:29 <VOID[m]> ghcup let's you do that easily
00:11:35 euandreh joins (~Thunderbi@179.214.113.107)
00:11:46 <VOID[m]> May be not the most stable option, but it works...
00:11:47 <tvandinther> I'm using ghcup and when I install HLS through there, the binaries don't include one for 9.2.5
00:12:03 <VOID[m]> Yeee, recompile hls from master
00:13:08 <tvandinther> that's ridiculous though. Maybe if I really wanted to use 9.2.5 then sure. But I just want a setup that works
00:13:24 × kraftwerk28 quits (~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in)
00:13:43 <VOID[m]> Something along the lines of
00:13:43 <VOID[m]> ```
00:13:43 <VOID[m]> ghcup compile hls --git-ref master --ghc 9.2.5
00:13:43 <VOID[m]> ```
00:13:49 <yushyin> https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html use a ghc version that's supported
00:14:01 <tvandinther> how do I make stack use a version that's supported
00:14:47 kraftwerk28 joins (~kraftwerk@178.62.210.83)
00:15:15 <tvandinther> my stack.yaml has this resolver url https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/1.yaml
00:15:15 <tvandinther> but if I set the resolver directly targeting a ghc version then the build doesn't work without listing a million extra-deps
00:15:22 <yushyin> use a resolver that ships that version, i guess? sorry, i don't use stack
00:15:41 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
00:17:22 <geekosaur> there isn't one
00:17:48 <geekosaur> 9.2 was nightly until LTS 20.1 came out, and it moved to 9.2.5 because of bugs
00:18:14 <geekosaur> so you may simply not be able to use 9.2.4 even if you use an older nightly snapshot
00:19:29 <geekosaur> https://www.stackage.org/nightly-2022-10-31 used 9.2.4
00:20:34 <geekosaur> this is a downside of stack: if you can't find an appropriate resolverm you're stuck with a lot of extra-deps
00:22:20 <tvandinther> thanks, that resolver solves that. how is anyone supposed to find the right resolver? And why aren't there LTS resolvers for each ghc version?
00:22:23 <geekosaur> cabal can usually find a build plan
00:22:53 <geekosaur> you'll have to ask the stackage folks about that
00:23:21 <c_wraith> there are resolvers for each period of time, not each version.
00:27:29 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
00:29:56 × ddellacosta quits (~ddellacos@89.45.224.188) (Ping timeout: 265 seconds)
00:32:22 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in)
00:35:16 jmdaemon joins (~jmdaemon@user/jmdaemon)
00:37:20 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:37:20 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:37:20 wroathe joins (~wroathe@user/wroathe)
00:41:05 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
00:45:02 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:54:25 justsomeguy joins (~justsomeg@user/justsomeguy)
00:58:05 ddellacosta joins (~ddellacos@143.244.47.82)
00:58:56 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 265 seconds)
01:01:08 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
01:01:16 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
01:05:48 razetime joins (~quassel@117.193.7.225)
01:10:12 <sm> tvandinther: go to stackage.org, it's easy to find the resolver for any ghc version there
01:10:41 × tinwood quits (~tinwood@canonical/tinwood) (Remote host closed the connection)
01:10:46 <sm> you don't need to write out the full url like that btw
01:13:39 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
01:13:39 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
01:13:39 tinwood joins (~tinwood@canonical/tinwood)
01:15:51 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
01:17:13 <maerwald[m]> sm: afair you can just put ghc-x.y.z as resolver and it will pick the latest compatible?
01:18:18 bobbingbob joins (~bobbingbo@S010610561191f5d6.lb.shawcable.net)
01:18:35 <sm> iirc that's not a good idea as those are bare bones resolvers, including only minimum packages
01:19:15 <geekosaur> that's my understanding as well, it doesn't pick a full resolver based on the ghc
01:19:32 <maerwald[m]> Oh
01:19:54 <geekosaur> so you end up digging on stackage.org to find an appropriate one
01:20:41 <maerwald[m]> Only boot packages?
01:21:05 <geekosaur> which is even harder if it's a nightly (which it would have to be since no LTS was released with 9.2.4)
01:21:30 <geekosaur> I think so but don't know for certain
01:31:29 <bobbingbob> so do i do about an error like this? https://pastebin.com/6TUHu2up
01:32:22 <bobbingbob> basically i'm trying to build svgcairo but cabal refuses to install because ghc depends on specific versions right?
01:33:02 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Remote host closed the connection)
01:43:53 srz joins (~srz@179.36.67.11)
01:45:12 × causal quits (~user@50.35.83.177) (Quit: WeeChat 3.7.1)
01:46:55 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
01:47:45 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 265 seconds)
01:48:24 <geekosaur> it's apparently using the ghc package, and the package is tied to the compiler version
01:49:12 <geekosaur> actually svgcairo itself looks okay so it must be a dependency
01:51:37 <geekosaur> sadly cabal is somewhat poor at reporting conflicts due to things that require an installed instance (base, ghcm, ghc-prim, template-haskell)
01:51:48 <geekosaur> s/ghcm/ghc/
01:52:18 <geekosaur> I didn't see immediately where it's getting the binary and bytestring dependencies
01:53:53 <geekosaur> hm, binary-0.8.9.1 is ghc-9.4.1
01:54:56 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
01:55:02 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
01:57:58 <bobbingbob> where does the user constraint on ghc version come from? it's saying 'constraint from user target requires ==9.0.2'
01:58:31 <geekosaur> I don't know; what it thinks is a "user target" usually baffles me
01:58:51 <geekosaur> how exactly are you trying to build it? as part of a project?
02:01:40 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
02:01:44 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
02:02:01 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
02:02:35 × OscarZ quits (~oscarz@95.175.104.88) (Ping timeout: 264 seconds)
02:05:00 manwithluck joins (~manwithlu@194.177.28.176)
02:07:07 <bobbingbob> yes i want to get ghc-vis going. at first i attempted 'cabal install ghc-vis'. that failed because svgcairo wants Cabal < 3.1 and I have 3.4
02:09:10 <bobbingbob> so i unpacked ghc-vis and svgcairo. in svgcairo i altered the upper version bound to Cabal < 3.5. this then fails because of binary and bytestring
02:11:19 <bobbingbob> binary doesn't want to go because installed ghc depends on older installed binary
02:11:55 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
02:12:22 <bobbingbob> bytestring doesn't want to go because ghc depends on bytestring>=0.9 && <0.11 and bytestring wants to be newer
02:13:24 <bobbingbob> so i can't just have multiple versions of binary and bytestring installed and they get used appropriately somehow
02:14:13 <bobbingbob> i think my next step should be to learn how to develop inside a vm
02:14:55 <bobbingbob> do you think using cabal-install from pacman might be conflicting with ghcup somehow?
02:15:36 <bobbingbob> its confusing having ghc coming from multiple places
02:17:27 <geekosaur> if something has a dependency on ghc-as-a-library, that pins bytestring and binary because it uses both
02:17:38 <geekosaur> sadly I am otherwise out of my depth
02:17:54 <geekosaur> and it's past my bedtime and I'm starting to turn into a pumpkin…
02:19:04 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:19:04 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:19:04 finn_elija is now known as FinnElija
02:19:29 <bobbingbob> alright, good night. thanks for trying
02:21:30 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
02:21:33 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
02:28:14 × califax quits (~califax@user/califx) (Remote host closed the connection)
02:29:04 califax joins (~califax@user/califx)
02:29:11 <bobbingbob> 'No cryptographic hash found for Hackage package xdot-1.3.0.4'. nothing i can do about this?
02:29:25 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
02:30:20 × califax quits (~califax@user/califx) (Remote host closed the connection)
02:30:20 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
02:30:49 califax joins (~califax@user/califx)
02:34:01 money_ joins (~Gambino@user/polo)
02:35:49 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
02:36:55 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
02:37:03 × bobbingbob quits (~bobbingbo@S010610561191f5d6.lb.shawcable.net) (Ping timeout: 265 seconds)
02:37:06 × money_ quits (~Gambino@user/polo) (Client Quit)
02:37:39 × srz quits (~srz@179.36.67.11) (Remote host closed the connection)
02:38:06 srz joins (~srz@179.36.67.11)
02:41:33 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
02:44:41 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
02:46:10 <sm> cabal update and try again ?
02:46:23 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
02:47:18 <sm> yow, why do people actually still keep using pastebin.com ? Is it the memorable url ?
02:52:23 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
02:52:44 × srz quits (~srz@179.36.67.11) (Remote host closed the connection)
02:53:02 nate4 joins (~nate@98.45.169.16)
02:53:03 srz joins (~srz@179.36.67.11)
02:53:44 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Remote host closed the connection)
02:53:49 califax joins (~califax@user/califx)
02:54:40 <Maxdamantus> Anyone know a site where I can Google things?
02:54:50 <shapr> is that a joke?
02:55:04 <Maxdamantus> 15:47:18 < sm> yow, why do people actually still keep using pastebin.com ? Is it the memorable url ?
02:55:32 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
02:55:36 <Maxdamantus> Anyone know a pastebin site?
02:56:21 <Maxdamantus> in both cases it's basically just `‹generic name for the thing›.com`
02:58:19 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
03:00:24 <sm> so it's the url
03:00:38 <Maxdamantus> I'd expect so.
03:00:43 <sm> how can we defeat this evil
03:00:43 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
03:00:52 <Maxdamantus> Ask pastebin.com to change their URL.
03:01:06 <sm> paste.haskell.org ?
03:02:16 <sm> tomsmeding ^
03:02:28 <Maxdamantus> I wouldn't expect them to be affiliated with Haskell, but sure, if they change it to that, then someone else will take the "pastebin.com" domain and presumably make a different service (which may or may not be better).
03:02:53 <sm> no no no
03:05:31 <sm> what a nightmare image. No, I'm talking about moving our community paste site to that possibly more competitive url, helping folks not to reach for the evil 👿 p b dot com
03:06:52 <monochrom> premium-pastebin.com :)
03:06:58 gentauro joins (~gentauro@user/gentauro)
03:08:34 <monochrom> ad-free-pastebin.com :)
03:09:50 <monochrom> Cynically, people will just use Google. Cynically, Google has incentives to prioritize popularist low-quality money-making paste bins such as pastebin.com
03:10:21 <monochrom> This is something you can't fix unless either you become as greedy as them or they become as altruistic as you.
03:10:39 marc joins (~marc@5.83.191.88)
03:11:03 marc is now known as Guest5607
03:11:28 × son0p quits (~ff@2604:3d08:5b7f:5540::6bfc) (Ping timeout: 256 seconds)
03:12:58 Kaiepi joins (~Kaiepi@108.175.84.104)
03:13:20 <yushyin> i have been in channels where pastes from certain services like pastebin.com get mirrored by a bot to more desirable paste services.
03:13:59 × Guest3723 quits (~marc@5.83.191.93) (Ping timeout: 264 seconds)
03:14:16 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 265 seconds)
03:16:10 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
03:22:01 LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net)
03:22:57 <int-e> @where paste
03:22:58 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
03:24:38 <LemanR> hey all, I'm doing pattern matching exercise on exerism.org (I highly recommend this site, btw) I know in case of you'd write pattern = results, but what if that pattern involves the "=" condition. In this year they are talking about calculating leap year so something to the effect of "when mod 4 year = 0 = result" would I just use == to
03:24:39 <LemanR> distinguish the conditional = vs the results?
03:26:31 Lycurgus joins (~juan@user/Lycurgus)
03:28:11 <LemanR> I think I got this
03:29:28 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:29:28 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:29:28 finn_elija is now known as FinnElija
03:32:55 <LemanR> found it on https://www.haskell.org/tutorial/patterns.html
03:35:51 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
03:35:57 × wroathe quits (~wroathe@user/wroathe) (Quit: Reconnecting)
03:36:34 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
03:36:34 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
03:36:34 wroathe joins (~wroathe@user/wroathe)
03:38:35 × xff0x quits (~xff0x@2405:6580:b080:900:84a4:3e04:c05a:9d80) (Ping timeout: 264 seconds)
03:40:29 × wroathe quits (~wroathe@user/wroathe) (Client Quit)
03:42:39 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
03:44:50 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
03:44:50 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
03:44:50 wroathe joins (~wroathe@user/wroathe)
03:45:12 × srz quits (~srz@179.36.67.11) (Remote host closed the connection)
03:45:32 srz joins (~srz@179.36.67.11)
03:47:56 <sm> yushyin: that would be great
03:48:51 tjakway joins (~tjakway@cpe-107-184-74-161.socal.res.rr.com)
03:48:52 nate4 joins (~nate@98.45.169.16)
03:49:01 xff0x joins (~xff0x@2405:6580:b080:900:84a4:3e04:c05a:9d80)
03:49:28 × srz quits (~srz@179.36.67.11) (Remote host closed the connection)
03:50:50 acidjnk_new joins (~acidjnk@p200300d6e7137a87dd877e6fe5567bfb.dip0.t-ipconnect.de)
03:58:30 × td_ quits (~td@83.135.9.38) (Ping timeout: 256 seconds)
03:59:59 td_ joins (~td@83.135.9.15)
04:00:12 × zant quits (~zant@62.214.20.26) (Ping timeout: 256 seconds)
04:01:38 <LemanR> think I have the format right, I just have to work out the logic now
04:05:17 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
04:05:17 × chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds)
04:05:47 king_gs joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
04:06:48 heisenberg2 joins (~heisenber@2a09:bac1:3f60::16:19a)
04:06:56 ridcully_ joins (~ridcully@p508acd69.dip0.t-ipconnect.de)
04:07:28 × ridcully quits (~ridcully@p508ac9a8.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
04:07:49 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
04:09:53 × acidjnk_new quits (~acidjnk@p200300d6e7137a87dd877e6fe5567bfb.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
04:12:02 × manwithluck quits (~manwithlu@194.177.28.176) (Quit: ZNC 1.8.2 - https://znc.in)
04:12:22 manwithluck joins (~manwithlu@194.177.28.176)
04:12:41 chexum joins (~quassel@gateway/tor-sasl/chexum)
04:17:06 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
04:25:51 × razetime quits (~quassel@117.193.7.225) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
04:31:55 <LemanR> ugh the logic in this problem is tricky to code, https://exercism.org/tracks/haskell/exercises/leap/edit
04:32:37 <dsal> That's a login page.
04:33:02 <LemanR> makes sense. It's their haskell leap year problem, one sec
04:35:16 <LemanR> was going to wgetpaste the instructions but they are simple. make a function called "isLeapYear" with variable "year" so isLeapYear :: Integer -> Bool. So the conditionals must mark true all years divisible by 4 & 100 however false if divisible by 400
04:35:45 <LemanR> *evenly divisible*
04:37:24 <LemanR> so far I'm using a guard format (I think), an example I have is " | mod year 100 == 0     = False"
04:40:03 <LemanR> got it, I put the largest numbers first so mod 400 then 100 then 4.
04:41:16 × k`` quits (~user@136.56.140.2) (Ping timeout: 265 seconds)
04:42:35 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
04:47:07 <mauke> isLeapYear y = y `mod` 4 == 0 && (y `mod` 100 /= 0 || y `mod` 400 == 0)
04:48:29 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
04:48:56 × tjakway quits (~tjakway@cpe-107-184-74-161.socal.res.rr.com) (Quit: WeeChat 3.5)
04:49:21 <LemanR> this is what I got https://bpa.st/QPQA
04:49:33 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
04:50:05 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
04:52:32 <int-e> it'll work
04:53:15 mvk joins (~mvk@2607:fea8:5ce3:8500::efb)
04:53:43 × mvk quits (~mvk@2607:fea8:5ce3:8500::efb) (Client Quit)
04:54:35 <LemanR> they both do, I do like mauke solution better but alas I still be learning
04:55:59 × ddellacosta quits (~ddellacos@143.244.47.82) (Ping timeout: 264 seconds)
04:56:11 <LemanR> does syntax sugar cost the compiler time (eve if negligible?)
04:56:27 <LemanR> * (even if negligible")*
04:58:49 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
04:58:52 <mauke> does syntax cost the compiler time?
04:59:57 <LemanR> like when I compile code that has syntax sugar, does the compile or other part of the process have to change the syntax sugar to the equivalent non-sugar form?
05:00:32 <monochrom> It depends on which syntax sugar.
05:00:33 <LemanR> like does it have to change year 'mod' 4 into mod year 4 for example
05:01:05 <mauke> no, it doesn't literally rewrite source code
05:01:58 <monochrom> But the answer to the correct question is: The time you spent asking that is more than enough for the compiler to desugar 20 million sugars already.
05:03:06 <monochrom> which is probably enough to cover your use of syntax sugars for your entire programming career, and even of your successor's.
05:03:37 <int-e> Maybe if you generate code :)
05:03:49 <mauke> also, is mod year 4 "sugar" for ((mod year) 4)?
05:04:16 <LemanR> lol I get it lol technically yes but extremely negligible
05:05:42 <LemanR> mod year 4 == year 'mod' 4 *shrug* I did it right when I wrote my code, tis all that matters atm lol
05:06:07 <int-e> The thing to worry about is readability. I find x `mod` 4 easier to read... mod x 4 makes me stop and think for a second. That's actually a time loss to worry about.
05:06:25 <int-e> LemanR: it's ` , not '
05:06:40 <int-e> (backtick, not single quote)
05:06:48 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1)
05:07:36 <monochrom> But if you prefer Scheme then mod x 4 is the more natural one.
05:07:50 <monochrom> Or rather, the contraposition of that.
05:07:52 <int-e> (mod x 4)... and I don't :)
05:08:08 <LemanR> I'll remember the backtick thing. I do like to write without the sugar just to get into the practice of reading that form. But after a while I'll write in syntax sugar when reading non-sugar is intuitive. That way I won't have issues reading either.
05:08:31 <LemanR> but I swear to use sugar if I ever collaborate lol
05:08:32 <monochrom> But I had a TA who preferred prefix syntax/order.
05:08:34 <c_wraith> another possible view for that case is that both syntaxes are converted to the same tree in the internal representation. That tree isn't text, so it isn't either of the syntactic options
05:08:55 <monochrom> Yes, literally said "prefer Scheme syntax to Haskell/infix syntax".
05:09:22 <int-e> monochrom: maybe if you've programmed enough of scheme or lisp...
05:09:26 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:09:32 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
05:10:12 euandreh joins (~Thunderbi@179.214.113.107)
05:10:29 <monochrom> Given that Japanese and Korean are kind of RPN, I have accepted that diversity exists very really.
05:10:44 <mauke> (if ((x > 0) && (x < 100)) (open-brace) (printf "x = %d\n" x) (close-brace);
05:10:47 <int-e> It's not a terrible syntax (or lack thereof?), but it requires a larger capacity for matching parentheses than infix syntax with sensible precendences.
05:11:08 <monochrom> can't even claim "left-to-right is more natural" because there is like 50% chance it's not.
05:11:18 <int-e> And, speaking for myself, I'm far less fluent in it.
05:11:32 <LemanR> I<3  lisp simplicity honestly. Just work inside out and you're good.
05:12:26 <monochrom> I think in practice Scheme programmer use indentations to help. Like, you could claim the same problem with Algol descendents too.
05:12:53 <monochrom> Pascal requires unlimited stack for matching begin's and end's...
05:13:00 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
05:13:16 manwithluck joins (~manwithlu@194.177.28.176)
05:13:37 <LemanR> is it at all common place to write haskell without indentation rules? it is kinda annoying to have to think about whitespace
05:13:49 <monochrom> But no, in reality Pascal code is well indented, plus an editor draws vertical lines to help.
05:14:17 <LemanR> or is that a good way to get shanked by haskellers lol
05:15:04 <monochrom> which is another instance of "during the time spent worrying about CFG stress on humans, the computer has already reformatted 20 million lines of code to help you".
05:15:29 <LemanR> the indentation thing?
05:15:59 <mauke> I would recommend using layout at least at file (module) scope
05:16:00 <int-e> from what I've seen, explicit braces and semicolons instead of indentation are quite uncommon
05:16:08 <mauke> anything else, it's a matter of preference
05:16:20 <int-e> with exceptions at small scale
05:17:01 <LemanR> well I'll just get used to indentation then for other's sake.
05:17:15 <mauke> the layout rules are simple enough that you don't have to think much after a little practice
05:17:17 <int-e> > do x <- pure 1; let { y = 2 }; pure (x+y) :: Maybe Int
05:17:18 <lambdabot> Just 3
05:17:53 <mauke> and since haskell is mostly expression based, deeply nested blocks are uncommon
05:18:15 <int-e> (that's a small case example, kind of necessary for lambdabot because it's restricted to a single line of input)
05:18:27 <int-e> s/case/scale/
05:20:04 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
05:20:09 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
05:21:48 son0p joins (~ff@2604:3d08:5b7f:5540::ebf0)
05:22:09 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
05:24:08 manwithluck joins (~manwithlu@194.177.28.176)
05:24:55 euandreh joins (~Thunderbi@179.214.113.107)
05:26:27 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Client Quit)
05:34:23 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 264 seconds)
05:36:22 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
05:36:35 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
05:37:50 Lord_of_Life_ is now known as Lord_of_Life
05:39:45 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 265 seconds)
05:40:14 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
05:44:14 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
05:46:19 × heisenberg2 quits (~heisenber@2a09:bac1:3f60::16:19a) (Remote host closed the connection)
05:46:37 king_gs joins (~Thunderbi@187.201.139.206)
05:46:45 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds)
05:47:26 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Client Quit)
05:47:42 califax joins (~califax@user/califx)
05:53:07 × manwithluck quits (~manwithlu@194.177.28.176) (Quit: ZNC 1.8.2 - https://znc.in)
05:53:10 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
05:55:11 k`` joins (~user@2605:a601:a60d:5400:7924:eed2:6f57:e9c5)
05:55:28 manwithluck joins (~manwithlu@194.177.28.176)
05:55:49 jinsun joins (~jinsun@user/jinsun)
05:57:54 jinsun__ joins (~jinsun@user/jinsun)
05:57:54 jinsun is now known as Guest4590
05:57:54 × Guest4590 quits (~jinsun@user/jinsun) (Killed (lithium.libera.chat (Nickname regained by services)))
05:57:54 jinsun__ is now known as jinsun
05:59:18 pyrex_ joins (~pyrex@2601:645:8781:1c90:9dea:e089:cad9:7d7f)
06:00:08 × k`` quits (~user@2605:a601:a60d:5400:7924:eed2:6f57:e9c5) (Ping timeout: 260 seconds)
06:03:10 × pyrex quits (~pyrex@user/pyrex) (Ping timeout: 260 seconds)
06:10:09 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
06:12:08 × machined1od quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection)
06:12:16 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
06:16:13 king_gs1 joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
06:16:43 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:18:49 × king_gs quits (~Thunderbi@187.201.139.206) (Ping timeout: 268 seconds)
06:18:50 king_gs1 is now known as king_gs
06:33:47 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
06:35:41 × pyrex_ quits (~pyrex@2601:645:8781:1c90:9dea:e089:cad9:7d7f) ()
06:36:02 × califax quits (~califax@user/califx) (Ping timeout: 255 seconds)
06:36:15 × phma quits (~phma@host-67-44-208-136.hnremote.net) (Read error: Connection reset by peer)
06:36:52 phma joins (~phma@2001:5b0:211b:f1c8:1660:b1a4:c3b6:5a9)
06:37:16 califax joins (~califax@user/califx)
06:43:01 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
06:46:23 × foul_owl quits (~kerry@193.29.61.77) (Ping timeout: 264 seconds)
06:50:36 kawen_ is now known as kawen
06:52:48 × LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed)
06:53:35 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 264 seconds)
06:55:09 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
07:02:14 foul_owl joins (~kerry@174-21-75-230.tukw.qwest.net)
07:04:23 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
07:17:35 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
07:22:57 mei joins (~mei@user/mei)
07:23:22 Inst_ joins (~Inst@2601:6c4:4081:54f0:e1a1:1873:3f07:1842)
07:27:38 × Inst quits (~Inst@2601:6c4:4081:54f0:3c44:89c8:38b2:5760) (Ping timeout: 260 seconds)
07:44:30 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
07:46:12 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Remote host closed the connection)
07:50:13 zant joins (~zant@62.214.20.26)
07:53:23 opticblast joins (~Thunderbi@172.58.86.28)
07:53:25 × invsersed quits (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 260 seconds)
08:00:32 inversed joins (~inversed@bcdcac82.skybroadband.com)
08:01:15 × Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
08:01:59 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 264 seconds)
08:02:29 Xeroine joins (~Xeroine@user/xeroine)
08:04:12 king_gs joins (~Thunderbi@187.201.139.206)
08:13:43 merijn joins (~merijn@86.86.29.250)
08:14:54 × opticblast quits (~Thunderbi@172.58.86.28) (Ping timeout: 265 seconds)
08:23:08 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
08:27:43 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
08:33:56 king_gs1 joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
08:35:21 × king_gs quits (~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
08:35:21 king_gs1 is now known as king_gs
08:42:05 Erutuon joins (~Erutuon@user/erutuon)
08:43:13 zeenk joins (~zeenk@2a02:2f04:a208:3600::7fe)
08:46:36 acidjnk_new joins (~acidjnk@p200300d6e7137a87b092dbda3219496e.dip0.t-ipconnect.de)
08:46:40 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
08:48:08 × merijn quits (~merijn@86.86.29.250) (Ping timeout: 260 seconds)
08:51:03 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Ping timeout: 260 seconds)
08:56:26 <albet70> how to use let a=x inside if-then-else?
08:56:33 <albet70> is that ok?
08:56:52 <albet70> if 3=3 then let a=1 else let a=2
08:56:56 <albet70> 3==3
08:57:11 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 264 seconds)
08:57:51 Neuromancer joins (~Neuromanc@user/neuromancer)
08:57:57 <mauke> no
08:59:12 <mauke> each 'let' needs a subordinate scope in which it is valid (or in the case of do notation, an adjacent scope)
08:59:50 <mauke> on the other hand, 'let a = if 3 == 3 then 1 else 2 in ...' is valid
09:00:08 × inkbottle[m] quits (~inkbottle@2001:470:69fc:105::2ff5) (Quit: You have been kicked for being idle)
09:00:35 <albet70> then what's the right way to do it? 'cause the variable 'a' is needed in the rest
09:01:32 <albet70> do if 3==3 then let a=1 else then let a=2; return a+3
09:01:43 <albet70> what's the proper way to express this?
09:01:57 <mauke> let a = if 3 == 3 then 1 else 2; return (a+3)
09:08:43 gmg joins (~user@user/gehmehgeh)
09:12:50 <albet70> thanks
09:14:03 k`` joins (~user@2605:a601:a60d:5400:7924:eed2:6f57:e9c5)
09:18:40 × k`` quits (~user@2605:a601:a60d:5400:7924:eed2:6f57:e9c5) (Ping timeout: 256 seconds)
09:18:48 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
09:22:41 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:26:25 × tvandinther quits (~tvandinth@101.98.118.246) (Quit: Client closed)
09:30:56 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:31:45 Chioque joins (~mansur@42.191.148.104)
09:32:02 × Chioque quits (~mansur@42.191.148.104) (Client Quit)
09:32:51 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
09:34:07 heisenberg2 joins (~heisenber@2a09:bac1:3f40::16:19a)
09:39:27 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
09:39:35 × turlando quits (~turlando@user/turlando) (Read error: Connection reset by peer)
09:43:14 aisa joins (~aisa@user/aisa)
09:44:22 turlando joins (~turlando@user/turlando)
09:44:43 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds)
09:44:53 × heisenberg2 quits (~heisenber@2a09:bac1:3f40::16:19a) (Remote host closed the connection)
09:48:03 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
09:49:19 manwithluck joins (~manwithlu@194.177.28.176)
09:52:55 × potash quits (~foghorn@user/foghorn) (Excess Flood)
09:54:46 potash joins (~foghorn@user/foghorn)
09:59:40 jakalx parts (~jakalx@base.jakalx.net) ()
10:00:47 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 264 seconds)
10:01:34 ulvarrefr joins (~user@188.124.56.153)
10:02:18 jakalx joins (~jakalx@base.jakalx.net)
10:05:33 Kaiepi joins (~Kaiepi@108.175.84.104)
10:07:24 × tabaqui quits (~root@88.231.62.215) (Quit: WeeChat 3.7.1)
10:07:51 king_gs joins (~Thunderbi@187.201.139.206)
10:17:36 <albet70> readFile may get IO Exception, how to solve that? with try or catch? what's the different
10:18:54 Guest60 joins (~Guest60@101.98.118.246)
10:22:51 <Guest60> Hiya, got a question where I feel like I'm missing something obvious but I can't figure it out. I have a sum type `data Command = MergeData MergeDataOption | Compile CompileOptions` and a type error "Couldn't match type ‘CompileOptions’ with ‘Command’
10:22:51 <Guest60>   Expected: Parser Command
10:22:52 <Guest60>     Actual: Parser CompileOptions"
10:22:52 <Guest60> My expectation is that CompileOptions can be a command, but I am probably not constructing the type correctly.
10:23:01 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
10:24:01 <Guest60> How do I construct a `Compile CompileOptions` that can satisfy the `Command` type?
10:24:07 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
10:24:39 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
10:25:40 <Vq> Compile :: CompileOptions -> Command
10:26:00 <Vq> fmap :: (a -> b) -> Parser a -> Parser b
10:26:19 <Vq> fmap Compile :: Parser CompileOptions -> Parser Command
10:27:49 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:27:53 × manwithluck quits (~manwithlu@194.177.28.176) (Quit: ZNC 1.8.2 - https://znc.in)
10:28:13 manwithluck joins (~manwithlu@194.177.28.176)
10:29:10 <Guest60> I'm not sure I fully understand
10:29:13 michalz joins (~michalz@185.246.207.203)
10:29:45 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
10:30:17 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
10:31:02 <Vq> You have a parser for a CompileOptions, right?
10:31:06 money_ joins (~Gambino@user/polo)
10:32:01 <Guest60> yep
10:32:48 <Vq> pCompileOptions :: Parser CompileOptions
10:33:43 <Vq> To turn that into a Parser for Command's you can use the (fmap Compile) function
10:33:44 biberu joins (~biberu@user/biberu)
10:33:48 <[exa]> albet70: `catch` is okay and `bracket` might be useful too
10:33:59 <Vq> fmap Compile pCompileOptions :: Parser Command
10:35:48 <Vq> I'm assuming here that your Parser is a Functor, if it isn't and this is some sort of school example Parser, I recommend writing the equivalent function.
10:36:01 <Vq> pmap :: (a -> b) -> Parser a -> Parser b
10:36:02 Lycurgus joins (~juan@user/Lycurgus)
10:36:34 <Guest60> ah I see, Compile is the constructor for Command which required the options type to construct
10:36:50 <Guest60> so fmap applies the constructor to the options functor, is this correct?
10:37:00 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
10:37:28 <Vq> No, the functor is the one for Parser.
10:38:46 <Vq> And as far as fmap is concerned, Compile is just a function (with the type: CompileOptions -> Command).
10:39:14 <Vq> There is also a very handy alias for fmap called <$>
10:39:59 <Vq> pMergeDataOption :: Parser MergeData
10:40:11 <Vq> pCompileOptions :: Parser CompileOptions
10:40:17 <Vq> pCommand :: Parser Command
10:40:25 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
10:40:25 <Guest60> okay yes, this is making sense to me now
10:40:52 <Guest60> understanding Compile as being CompileOptions -> Command was the missing link in my understanding
10:40:53 <Guest60> thank you
10:40:54 <Vq> pCommand = MergeData <$> pMergeDataOption <|> Compile <$> pCompileOptions
10:41:15 <Vq> You're welcome
10:41:32 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
10:42:51 × money_ quits (~Gambino@user/polo) (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:46:56 nate4 joins (~nate@98.45.169.16)
10:49:28 × son0p quits (~ff@2604:3d08:5b7f:5540::ebf0) (Ping timeout: 260 seconds)
10:49:59 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
10:50:24 × foul_owl quits (~kerry@174-21-75-230.tukw.qwest.net) (Ping timeout: 260 seconds)
10:51:48 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
10:55:47 king_gs1 joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
10:55:49 × king_gs quits (~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
10:55:49 king_gs1 is now known as king_gs
11:01:12 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5)
11:02:59 Inst_ is now known as Inst
11:05:56 foul_owl joins (~kerry@157.97.134.156)
11:06:50 heisenberg2 joins (~heisenber@2a09:bac1:3f60::16:19a)
11:07:47 × heisenberg2 quits (~heisenber@2a09:bac1:3f60::16:19a) (Remote host closed the connection)
11:09:21 × manwithluck quits (~manwithlu@194.177.28.176) (Quit: ZNC 1.8.2 - https://znc.in)
11:09:41 manwithluck joins (~manwithlu@194.177.28.176)
11:10:23 <albet70> why there's Data.Text.Lazy and Data.Text? String Text ByteString [Char8] is already mixed up
11:11:33 heisenberg2 joins (~heisenber@2a09:bac1:3f60::16:19a)
11:11:39 × heisenberg2 quits (~heisenber@2a09:bac1:3f60::16:19a) (Remote host closed the connection)
11:14:00 heisenberg2 joins (~heisenber@2a09:bac1:3f60::16:19a)
11:15:40 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 265 seconds)
11:15:55 × manwithluck quits (~manwithlu@194.177.28.176) (Remote host closed the connection)
11:16:18 manwithluck joins (~manwithlu@194.177.28.176)
11:17:26 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
11:18:53 heisenbe_ joins (~heisenber@112.151.244.175)
11:19:02 × heisenbe_ quits (~heisenber@112.151.244.175) (Remote host closed the connection)
11:20:30 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 265 seconds)
11:21:33 × heisenberg2 quits (~heisenber@2a09:bac1:3f60::16:19a) (Ping timeout: 260 seconds)
11:23:29 heisenberg2 joins (~heisenber@112.151.244.175)
11:23:55 CiaoSen joins (~Jura@p200300c95701f1002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
11:25:38 × acidjnk_new quits (~acidjnk@p200300d6e7137a87b092dbda3219496e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
11:26:47 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 265 seconds)
11:31:30 × Guest60 quits (~Guest60@101.98.118.246) (Quit: Client closed)
11:33:03 merijn joins (~merijn@86.86.29.250)
11:37:30 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
11:37:53 × merijn quits (~merijn@86.86.29.250) (Ping timeout: 260 seconds)
11:38:36 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
11:43:43 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
11:44:10 <davean> because it has fundimentally different properties
11:44:14 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
11:44:19 <davean> Programming is all about making good choices
11:44:33 <davean> If you didn't have both you'd end up writing both yourself
11:45:19 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
11:45:29 × shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit)
11:45:36 buhman joins (sid411355@user/buhman)
11:46:38 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 260 seconds)
11:49:15 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
11:49:55 <buhman> I'm running ghc on aarch64, and I think my toolchain is broken but I'm not sure how to fix it. ghci appears to be ok, but when I run `ghc foo.hs` for any possible haskell source, I get linking errors for __aarch64_cas8_sync, __aarch64_ldset1_sync, __aarch64_ldadd4_sync, and many other compiler intrinsics.
11:50:51 Neuromancer joins (~Neuromanc@user/neuromancer)
11:53:03 <[exa]> albet70: the lazy variant doubles as stringbuilder, stream, and many other things; the strict variant is for storing stuff efficiently (same for ByteString)
11:53:40 manwithluck joins (~manwithlu@194.177.28.176)
11:53:43 <buhman> my libgcc.a also doesn't have these *_sync intrinsics, only _relax, _acq, _rel, and _acq_rel
11:54:45 <[exa]> buhman: I thought the intrinsics always need to be managed by the compiler somehow to translate to actual assembly, (I don't think that linking assembly instructions would be a good option)
11:54:50 <[exa]> (glibc syscalls aside ofc.)
11:55:16 <[exa]> buhman: check out if there's a header file that has these instructions inside, there might be documentation around
11:56:08 <[exa]> buhman: also make super sure you have the proper CPU flags enabled in ALL compile stages (no idea about aarch but when forgetting CPU flags in certain stages of a pipeline with say avx, you get a pretty similar kind of error)
11:56:10 <buhman> I'm not sure why ghc is trying to link these to begin with--as far as I'm aware my toolchain is non-borked from the perspective of everything else that uses it.
11:56:49 <[exa]> can you make a debug output of what and how it is thinking that generates the errors?
11:57:04 <[exa]> e.g. an actual `ld` command, if there's one (I hope there's one on aarch)
11:57:32 <buhman> what output do you want?
12:07:31 × jinsl- quits (~jinsl@123.120.168.177) (Quit: ZNC - https://znc.in)
12:07:43 jinsl joins (~jinsl@2408:8207:2559:28e0:211:32ff:fec8:6aea)
12:09:00 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
12:09:18 <[exa]> well I'd start with finding the actual arguments that it's passing to the linker
12:10:16 euandreh joins (~Thunderbi@179.214.113.107)
12:10:35 × euandreh quits (~Thunderbi@179.214.113.107) (Client Quit)
12:11:23 euandreh joins (~Thunderbi@179.214.113.107)
12:13:50 × euandreh quits (~Thunderbi@179.214.113.107) (Remote host closed the connection)
12:14:08 euandreh joins (~Thunderbi@179.214.113.107)
12:20:44 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
12:29:40 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
12:31:10 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
12:31:30 <buhman> it's specifically the functions from https://github.com/ghc/ghc/blob/master/libraries/ghc-prim/cbits/atomic.c that are broken
12:33:40 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
12:35:38 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
12:36:08 acidjnk_new joins (~acidjnk@p200300d6e7137a87b092dbda3219496e.dip0.t-ipconnect.de)
12:36:20 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
12:38:01 <[exa]> buhman: ok well, there's nothing fishy in there. It might be time to visit #ghc
12:44:08 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
12:45:15 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
12:45:48 Guest|85 joins (~Guest|85@161.230.224.118)
12:45:53 <Guest|85> hey
12:46:01 <Guest|85> i need help installing GHCUp
12:46:12 <[exa]> hello
12:46:17 <[exa]> what's the problem
12:46:20 <Guest|85> i have an exam on monday and i really need to install haskell
12:46:37 <Guest|85> i don´t really know what is the problem
12:46:51 <Guest|85> everytime i try to install GHCup
12:46:59 <Guest|85> it says "error"
12:47:09 <[exa]> any details on what the error is
12:47:18 <Guest|85> yeah wait i can show u
12:47:40 <[exa]> if there's a (longer) text description please use a pastebin
12:49:42 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:50:05 <Guest|85> ugh i cant show u
12:50:07 <Guest|85> idk why
12:50:13 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
12:50:35 <mauke> ...
12:50:59 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
12:51:17 <[exa]> Guest|85: is the exam a haskell exam?
12:51:47 <Guest|85> yes
12:52:11 <[exa]> that's gonna be a tough sunday I guess.
12:52:27 <Guest|85> omg i cant show u the error
12:52:33 <Guest|85> i am freaking out
12:52:36 <[exa]> re ghcup, how did you start the installation and what did it do?
12:52:39 <mauke> define "can't"
12:52:48 <Guest|85> there´s always an error
12:52:51 <[exa]> I guess you copypasted the command from the website into powershell or something?
12:52:55 <mauke> do your fingers refuse to obey your orders?
12:53:04 <Guest|85> yes
12:53:12 <Guest|85> i did that in the powershell
12:53:19 <Guest|85> and i eliminate all my antivirus
12:53:19 <[exa]> does the error say anything about curl?
12:53:34 <Guest|85> Exec: Error executing command C:\\ghcup\msys64\msys2_shell.cmd with arguments '-mingw64 -mintty -c export
12:53:35 <Guest|85> BOOTSTRAP_HASKELL_NONINTERACTIVE=1 ; export BOOTSTRAP_HASKELL_INSTALL_HLS=1 ; export
12:53:47 <Guest|85> BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=1 ; [ -n 'C:\\ghcup\msys64' ] && export GHCUP_MSYS2=$(cygpath -m
12:53:48 <Guest|85> 'C:\\ghcup\msys64') ; [ -n 'C:\' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m 'C:\/') ; export PATH=$(cygpath -u
12:53:48 <Guest|85> 'C:\\ghcup/bin'):$PATH ; export CABAL_DIR='C:\cabal' ; trap 'echo Press any key to exit && read -n 1 && exit' 2 ; [[
12:53:59 <Guest|85> 'https://www.haskell.org/ghcup/sh/bootstrap-haskell' = https* ]] && curl --proto '=https' --tlsv1.2 -sSf
12:54:00 <Guest|85> https://www.haskell.org/ghcup/sh/bootstrap-haskell | bash || cat $(cygpath -m
12:54:00 <Guest|85> 'https://www.haskell.org/ghcup/sh/bootstrap-haskell') | bash ; echo 'Press any key to exit' && read -n 1'
12:54:01 <Guest|85> At line:172 char:11
12:54:03 <[exa]> ok that's a powershell issue
12:54:11 <[exa]> also please do use pastebin for more than 1 line of code
12:54:25 <[exa]> do you have WSL2 ?
12:54:27 <Guest|85> At line:172 char:11
12:54:27 <Guest|85> + throw ('Exec: Error executing command {0} with arguments '' ...
12:54:28 <Guest|85> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:54:28 <Guest|85>     + CategoryInfo : OperationStopped: (Exec: Error exe...' && read -n 1':String) [], RuntimeException
12:54:29 <Guest|85>     + FullyQualifiedErrorId : Exec: Error executing command C:\\ghcup\msys64\msys2_shell.cmd with arguments '-mingw64
12:54:40 <mauke> oh no, it's still going
12:54:41 <Guest|85>  -mintty -c export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 ; export BOOTSTRAP_HASKELL_INSTALL_HLS=1 ; export BOOTSTRAP_
12:54:41 <Guest|85>   HASKELL_ADJUST_CABAL_CONFIG=1 ; [ -n 'C:\\ghcup\msys64' ] && export GHCUP_MSYS2=$(cygpath -m 'C:\\ghcup\msys64')
12:54:42 <Guest|85>   ; [ -n 'C:\' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m 'C:\/') ; export PATH=$(cygpath -u 'C:\\ghcup/bin
12:54:52 <Guest|85> w.haskell.org/ghcup/sh/bootstrap-haskell' = https* ]] && curl --proto '=https' --tlsv1.2 -sSf https://www.haskell
12:54:53 <Guest|85> .org/ghcup/sh/bootstrap-haskell | bash || cat $(cygpath -m 'https://www.haskell.org/ghcup/sh/bootstrap-haskell') |
12:54:53 <Guest|85> bash ; echo 'Press any key to exit' && read -n 1'
12:54:54 <[exa]> Guest|85: take care with the copypaste, you may get kicked
12:55:00 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Ping timeout: 260 seconds)
12:55:04 <Guest|85> ohhh ok
12:55:07 <mauke> https://paste.tomsmeding.com
12:55:13 <[exa]> anyway yeah that's a powershell issue most likely
12:55:18 <Guest|85> soooo what do i do?
12:55:18 money_ joins (~money@user/polo)
12:55:24 <[exa]> do you have WSL2 ?
12:55:29 <Guest|85> idk
12:55:32 <Guest|85> let me see
12:55:33 <[exa]> do you have docker?
12:55:50 <Guest|85> no
12:55:55 <[exa]> ghcup works in WSL2 (it might even on raw windows but I wouldn't bet too much)
12:55:58 <Guest|85> i dont have any of this
12:56:09 <Guest|85> soooo i install that?
12:56:18 <[exa]> if not you can try docker and just running haskell from docker, that usually helps a lot
12:56:25 <maerwald[m]> No
12:56:34 <maerwald[m]> ghcup works on plain windows too
12:56:48 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
12:56:49 <[exa]> anyway, given you're probably gonna try only exam-level haskell, you should be pretty much okay with just normal ghc+ghci
12:57:08 <Guest|85> yeah i need that
12:57:14 <[exa]> maerwald[m]: any guess on what's that error then? (from the many people asking here I kinda assumed it doesn't :D )
12:57:39 <Guest|85> i need GHC and HLS
12:57:43 <[exa]> Guest|85: this should work then https://www.haskell.org/ghc/download_ghc_9_4_3.html#windows64
12:57:46 <[exa]> but no HLS
12:57:54 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
12:57:57 Guest56 joins (~Guest56@68.41.170.234)
12:58:22 son0p joins (~ff@2604:3d08:5b7f:5540::7913)
12:58:22 <maerwald[m]> Could be that msys2 devs busted the distribution
12:58:32 <maerwald[m]> Not the first time
12:58:48 Guest56 is now known as bluephones
12:59:08 <Guest|85> ok i am trying that link
12:59:14 <Guest|85> i am soooo nervous
12:59:22 <Guest|85> cause i don´t like this
12:59:33 <Guest|85> and this a torture for me
12:59:35 <maerwald[m]> I guess I could write up a guide for manual setup on windows
12:59:35 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 265 seconds)
12:59:43 <[exa]> maerwald[m]: please do
12:59:51 <maerwald[m]> [exa]: "the many people"?
13:00:20 <[exa]> I recall like 4 with random undecipherable error from powershell in the last ~month
13:00:30 <[exa]> and I'm usually missing the channel peak so I'd say more
13:00:53 <maerwald[m]> 4 per month is many? Lol
13:01:10 × manwithluck quits (~manwithlu@194.177.28.176) (Quit: ZNC 1.8.2 - https://znc.in)
13:01:16 <[exa]> 4 unsolvable problems a month is bad :D
13:01:29 <[exa]> otherwise we solve everything!! :D
13:01:33 <maerwald[m]> Uhu
13:02:02 <[exa]> ok nvm I might also be veeeeery slightly biased towards powershell
13:02:39 <maerwald[m]> If they have a working bash shell, that might already be enough
13:02:46 <Guest|85> ok sooooo i installed that
13:02:50 <maerwald[m]> To execute the "linux" command there
13:02:51 <Guest|85> and what now?
13:02:55 razetime joins (~quassel@117.193.7.225)
13:03:15 <[exa]> Guest|85: you might have something like "GHCi" in the start menu or so now
13:03:30 manwithluck joins (~manwithlu@194.177.28.176)
13:03:45 azimut joins (~azimut@gateway/tor-sasl/azimut)
13:03:49 random-jellyfish joins (~random-je@user/random-jellyfish)
13:03:57 <Guest|85> yeah a GHC
13:04:42 <maerwald[m]> GHC without msys2 shell won't help them much
13:04:51 <maerwald[m]> And cabal needs to know about it too
13:04:57 × heisenberg2 quits (~heisenber@112.151.244.175) (Remote host closed the connection)
13:05:06 <[exa]> generally you should either get a workign terminal command "ghc" that allows you to simply compile haskell programs into executables and try them, or "ghci" that is an interpreter that you just type the code into and it executes
13:05:15 <[exa]> maerwald[m]: it's for an exam on monday
13:05:22 <[exa]> no software engineering now. :D
13:05:32 heisenberg2 joins (~heisenber@112.151.244.175)
13:06:33 × bluephones quits (~Guest56@68.41.170.234) (Ping timeout: 260 seconds)
13:07:42 <maerwald[m]> [exa]: you can't install any package that requires configure
13:08:06 <maerwald[m]> Like time
13:08:07 <maerwald[m]> Good luck
13:08:17 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
13:08:27 × raym quits (~ray@user/raym) (Read error: Connection timed out)
13:08:57 <[exa]> maerwald[m]: unlikely to be required for a uni course
13:10:05 bluephones joins (main@gateway/vpn/protonvpn/bluephones)
13:10:12 <[exa]> Guest|85: hey one thing that might help; if local installation fails checkout replit.com, they apparently support haskell now
13:10:58 <maerwald[m]> [exa]: I don't share your confidence
13:12:34 <[exa]> whew replit actually looks pretty cool now
13:12:35 raym joins (~ray@user/raym)
13:12:54 <[exa]> maerwald[m]: it's a highly probable guess tbh. :D
13:16:07 <Guest|85> ohhh yeah
13:16:12 <Guest|85> replic is working ig
13:16:22 <Guest|85> but i still have to install what my teacher said
13:16:56 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:17:28 × razetime quits (~quassel@117.193.7.225) (Ping timeout: 265 seconds)
13:18:30 <mauke> what's the assignment?
13:20:35 × Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 264 seconds)
13:21:02 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
13:21:47 × troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 264 seconds)
13:23:03 alfonsox joins (~quassel@103.87.57.74)
13:24:38 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
13:24:54 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
13:25:30 razetime joins (~quassel@117.193.7.178)
13:27:24 × hsw quits (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) (Quit: Leaving)
13:32:20 thyriaen joins (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1)
13:33:31 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:33:44 × shailangsa quits (~shailangs@host109-159-108-137.range109-159.btcentralplus.com) (Ping timeout: 260 seconds)
13:35:22 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
13:36:15 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
13:45:29 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
13:46:57 × money_ quits (~money@user/polo) (Remote host closed the connection)
13:48:55 king_gs joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
13:49:29 manwithluck joins (~manwithlu@194.177.28.176)
13:50:08 money is now known as Guest7618
13:50:08 × Guest7618 quits (money@user/polo) (Killed (cadmium.libera.chat (Nickname regained by services)))
13:50:39 MONEY joins (~money@user/polo)
13:51:23 darchitect joins (~darchitec@2a00:23c6:3584:df01:4d17:eb7b:88d1:aa1d)
13:57:47 × CiaoSen quits (~Jura@p200300c95701f1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
14:00:58 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 265 seconds)
14:02:25 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:04:23 merijn joins (~merijn@86.86.29.250)
14:06:22 × random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed)
14:07:28 × MONEY quits (~money@user/polo) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:09:33 × merijn quits (~merijn@86.86.29.250) (Ping timeout: 260 seconds)
14:10:08 × alfonsox quits (~quassel@103.87.57.74) (Read error: Connection reset by peer)
14:11:36 × mei quits (~mei@user/mei) (Ping timeout: 265 seconds)
14:13:38 × acidjnk_new quits (~acidjnk@p200300d6e7137a87b092dbda3219496e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
14:13:39 × Vajb quits (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer)
14:14:07 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
14:16:23 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 264 seconds)
14:17:14 money joins (Guest7618@user/polo)
14:29:02 <Digit> random in Haskell? how?
14:29:02 <Digit> looking for inspiration where/how to get a "random" in haskell... like a random item from a list, like for a 8ball (so i can add that to my existing haskell bots, and not load a whole supybot just for that)
14:29:22 mei joins (~mei@user/mei)
14:30:10 <thyriaen> Digit, is this what you are looking for ? https://hackage.haskell.org/package/random-1.2.1.1/docs/System-Random.html
14:35:31 <[exa]> Digit: you might get very philosophical on how to get anything random in computers, usually we settle for pseudorandomness
14:36:58 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
14:38:01 sammelweis__ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:39:20 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
14:41:13 <Guest|85> i think i got it
14:41:17 × Guest|85 quits (~Guest|85@161.230.224.118) (Quit: Connection closed)
14:42:15 <mauke> :t randomIO
14:42:16 <lambdabot> (Random a, MonadIO m) => m a
14:44:31 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
14:47:53 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
14:48:30 nate4 joins (~nate@98.45.169.16)
14:48:45 × sammelweis__ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
14:48:53 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:53:39 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
14:53:54 shailangsa joins (~shailangs@host86-186-177-178.range86-186.btcentralplus.com)
14:54:13 × jespada quits (~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
14:57:36 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
14:58:20 Vajb joins (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d)
15:03:00 mvk joins (~mvk@2607:fea8:5ce3:8500::efb)
15:03:16 × mvk quits (~mvk@2607:fea8:5ce3:8500::efb) (Client Quit)
15:03:34 random-jellyfish joins (~random-je@user/random-jellyfish)
15:06:43 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
15:15:44 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
15:19:04 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
15:19:39 manwithluck joins (~manwithlu@194.177.28.176)
15:20:55 chomwitt joins (~chomwitt@2a02:587:7a0d:dd00:1ac0:4dff:fedb:a3f1)
15:22:32 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
15:26:48 ddellacosta joins (~ddellacos@143.244.47.82)
15:27:06 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
15:28:24 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
15:31:21 × razetime quits (~quassel@117.193.7.178) (Ping timeout: 268 seconds)
15:39:11 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
15:40:28 razetime joins (~quassel@117.193.3.220)
15:45:25 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
15:46:53 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
15:48:00 acidjnk_new joins (~acidjnk@p200300d6e7137a80e13694882987f228.dip0.t-ipconnect.de)
15:49:25 gnawzie joins (~normie@222-0-178-69.static.gci.net)
15:49:30 <gnawzie> hello
15:50:41 <gnawzie> learning more about pattern matching, is it possible for a string "10x10x10" to be broken up with (w:'x':h:'x':l) or do I have to parse another way?
15:51:51 <gnawzie> it appears to be only taking one char for w and h and the remainder goes to l so I might have to find another way
15:52:15 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:53:34 razetime_ joins (~quassel@117.254.34.27)
15:53:35 × razetime quits (~quassel@117.193.3.220) (Ping timeout: 264 seconds)
15:53:48 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
15:54:32 <[exa]> gnawzie: not really, you'd need to do something like w1:w2:'x':..., which is probably not what you want
15:55:30 <[exa]> gnawzie: on the other hand this can be easily split into a few lists using standard functions (see the `split` package)
15:57:02 <gnawzie> thank you, I also see 'splitOn' but I don't know if that's any good
15:57:38 <[exa]> yeah that could work, wordsOn, splitBy, ... many almost-synonyms of the splitting thing
15:58:10 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd) (Ping timeout: 256 seconds)
15:59:32 <[exa]> as a pretty good exercise I'd suggest trying to implement your own version with `span`, something like: mysplit str = case span (/= 'x') str of (num, 'x':rest) -> ???; (num, "") -> ???
16:02:09 nate4 joins (~nate@98.45.169.16)
16:07:59 × heisenberg2 quits (~heisenber@112.151.244.175) (Ping timeout: 264 seconds)
16:12:27 <gnawzie> thanks for that exercise [exa] I got it
16:17:29 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
16:20:29 zebrag joins (~chris@user/zebrag)
16:24:32 heisenberg2 joins (~heisenber@112.151.244.175)
16:24:48 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
16:28:02 sammelweis__ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
16:29:09 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
16:29:51 <jean-paul[m]> Parser combinators are really great though, and worth learning.
16:35:32 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
16:38:07 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
16:38:28 × sammelweis__ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
16:39:42 jakalx joins (~jakalx@base.jakalx.net)
16:39:43 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
16:59:39 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
16:59:39 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
16:59:39 wroathe joins (~wroathe@user/wroathe)
17:01:59 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 264 seconds)
17:02:01 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
17:04:38 × heisenberg2 quits (~heisenber@112.151.244.175) (Ping timeout: 265 seconds)
17:05:05 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
17:06:57 Kaiepi joins (~Kaiepi@108.175.84.104)
17:09:55 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
17:10:03 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
17:10:23 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
17:12:07 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:14:20 × Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds)
17:15:37 × razetime_ quits (~quassel@117.254.34.27) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:19:18 heisenberg2 joins (~heisenber@112.151.244.175)
17:20:09 mestre joins (~mestre@191.177.185.178)
17:22:36 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
17:23:56 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
17:25:26 × acidjnk_new quits (~acidjnk@p200300d6e7137a80e13694882987f228.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
17:27:05 srz joins (~srz@179.36.96.129)
17:28:53 srz_ joins (~srz@181.228.49.93)
17:29:47 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:926:4196:430e:b1cd)
17:30:44 × ubert quits (~Thunderbi@77.119.195.101.wireless.dyn.drei.com) (Ping timeout: 265 seconds)
17:30:50 ub joins (~Thunderbi@178.165.164.59.wireless.dyn.drei.com)
17:31:59 × srz quits (~srz@179.36.96.129) (Ping timeout: 264 seconds)
17:33:06 acidjnk_new joins (~acidjnk@p200300d6e7137a80354abfa64dc17828.dip0.t-ipconnect.de)
17:33:07 ub is now known as ubert
17:33:55 pyrex joins (~pyrex@user/pyrex)
17:37:52 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
17:38:29 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
17:38:29 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
17:38:29 finn_elija is now known as FinnElija
17:40:58 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
17:42:12 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
17:43:23 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
17:45:32 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
17:46:34 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
17:46:34 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Write error: Connection reset by peer)
17:46:34 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
17:47:03 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
17:47:09 azimut joins (~azimut@gateway/tor-sasl/azimut)
17:47:10 chexum joins (~quassel@gateway/tor-sasl/chexum)
17:48:54 econo joins (uid147250@user/econo)
17:55:25 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
17:55:36 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
17:58:41 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
17:59:22 azimut joins (~azimut@gateway/tor-sasl/azimut)
18:00:03 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:06:05 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
18:07:22 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
18:07:49 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:08:49 <hippoid> i'm trying to understand how do notation is related to list comprehensions, with the common element being generators. anyone have a good resource for this?
18:08:53 mei_ joins (~mei@user/mei)
18:11:23 <monochrom> https://homepages.inf.ed.ac.uk/wadler/topics/monads.html#monads (comprehending monads)
18:11:38 <monochrom> But it can be a one-line example.
18:12:18 <monochrom> do { x<-foo; y<-bar; return qax } = [qax | x<-foo, y<-bar]
18:12:47 × mei quits (~mei@user/mei) (Ping timeout: 264 seconds)
18:13:30 <monochrom> In GHC, you can turn on MonadComprehension and use comprehension syntax for any monad, not just [].
18:14:02 <hippoid> in the left hand side of the example, where is qax defined?
18:14:20 <c_wraith> same places foo and bar are defined
18:14:21 <monochrom> [() | putStrLn "Hello what's your name", x<-getLine, putStrLn ("Hello " ++ x)]
18:14:58 <monochrom> In the right hand side, where is qax defined?
18:15:06 <hippoid> ok, so they're all free variables?
18:15:21 <monochrom> No, they are metavariables for any expression you like.
18:15:21 <c_wraith> > do { x <- [1..3]; y <- [5..7] ; return (x + y) }
18:15:24 <lambdabot> [6,7,8,7,8,9,8,9,10]
18:15:41 <c_wraith> that do expression probably looks a lot like a list comprehension
18:16:09 <monochrom> Indeed, bar may contain x, qax may contain x and y, and things from outside.
18:16:28 euandreh joins (~Thunderbi@179.214.113.107)
18:17:08 <monochrom> Even x and y may not be simply variables, they can be arbitrary patterns.
18:17:13 causal joins (~user@50.35.83.177)
18:17:37 <monochrom> I write "do{ x1:x2:_ <- getArgs ..." all the time.
18:17:46 <hippoid> what is the do equivalent of something like `[(x, y) | x<-[1..3], y<-[x..4]]`
18:17:56 <c_wraith> hippoid: look at my example
18:18:06 <monochrom> Your turn to do that as an exercise for the reader?
18:18:27 <c_wraith> I mean, my example basically is that. different ranges, different operation, but the structure is identical
18:18:50 <monochrom> [1..3] is foo, [x..4] is bar, (x,y) is qax, no? Just plug and chug, no?
18:18:57 <monochrom> "Do not think."
18:19:07 <monochrom> There is nothing to understand.
18:20:04 <hippoid> > do { x <- [1..3]; y <- [x..4] ; return (x, y) }
18:20:06 <lambdabot> [(1,1),(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,3),(3,4)]
18:20:16 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
18:20:25 <hippoid> interesting stuff. thanks for the lesson!
18:23:25 <monochrom> (I have turned on MonadComprehensions on yahb2. So...)
18:23:35 × cheater quits (~Username@user/cheater) (Quit: (BitchX) He-Man uses BitchX. *HE HAS THE POOWWEEEEEEEEEERRRRRRRR!!!!!*)
18:23:50 <gnawzie> trying to find the two smallest numbers in a list of 3 seems difficult unless I should use sort
18:23:55 <monochrom> % [() | _<- putStrLn "Hello"]
18:23:55 <yahb2> Hello
18:23:57 <monochrom> :)
18:24:17 <monochrom> s/difficult/tedious/
18:24:28 <monochrom> I'm lazy, I would use sort and be done.
18:24:34 <c_wraith> gnawzie: you *can* do it without sorting. It's a lot like finding the minimum, but with a second accumulator.
18:24:42 × drdo quits (~drdo@overlord.drdo.eu) (Quit: The Lounge - https://thelounge.chat)
18:25:18 drdo joins (~drdo@2a0b:b800:2:31e6::1)
18:25:31 <monochrom> No, it's finding the maximum and discarding it. :)
18:25:32 cheater joins (~Username@user/cheater)
18:26:46 <c_wraith> dunno, I've never written a function that works only lists of an exact length. :P
18:27:02 opticblast joins (~Thunderbi@2607:fb90:17d5:bf2b:77cb:753d:d116:5897)
18:27:13 <gnawzie> i just did it as take 2 sort dim lol
18:27:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:27:19 <monochrom> Me neither, but I'm math-nerding the problem in the abstract.
18:27:32 Kaiepi joins (~Kaiepi@108.175.84.104)
18:27:58 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
18:28:21 <monochrom> "This problem is reducible to the minimum spanning tree problem" or something :)
18:28:41 <c_wraith> minimum spanning trees are cool.
18:28:53 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:28:56 <c_wraith> Rarely actually the correct answer in practice, but still cool.
18:30:55 <c_wraith> The one time in college I was alert enough to join the ACM programming competition, one of the problems was calculating the weight of a minimum spanning tree of points on a globe. fun times!
18:35:42 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
18:36:40 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:39:50 <hpc> i mean, with the right libraries that's often how you solve problems anyway
18:40:04 <hpc> reduce something to SAT, exploit decades of work, then convert back to your problem domain
18:40:13 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Client Quit)
18:40:49 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
18:41:19 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
18:44:38 × caryhartline quits (~caryhartl@2600:1700:2d0:8d30:3991:2946:3701:6725) (Quit: caryhartline)
18:45:39 × zant quits (~zant@62.214.20.26) (Ping timeout: 265 seconds)
18:46:08 × acidjnk_new quits (~acidjnk@p200300d6e7137a80354abfa64dc17828.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
18:46:48 <xerox> :t \xs -> head $ do [[a,b,_]] <- groupBy (>=) <$> permutations xs; pure [a,b]
18:46:49 <lambdabot> Ord a => [a] -> [a]
18:51:03 × manwithluck quits (~manwithlu@194.177.28.176) (Read error: Connection reset by peer)
18:51:43 jmdaemon joins (~jmdaemon@user/jmdaemon)
18:51:47 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
18:52:17 dsrt^ joins (~dsrt@76.145.185.103)
18:53:00 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
18:53:21 × gnawzie quits (~normie@222-0-178-69.static.gci.net) (Remote host closed the connection)
18:54:41 <mauke> is take 2 . sort in O(1)?
18:57:25 <Hecate> I wish I knew how to generate a graph that would tell me execution times for functions and plot it so I would see if it's linear or quadratic
19:00:09 × ubert quits (~Thunderbi@178.165.164.59.wireless.dyn.drei.com) (Ping timeout: 265 seconds)
19:00:47 × ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds)
19:01:14 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
19:01:26 ec_ joins (~ec@gateway/tor-sasl/ec)
19:01:27 <hpc> mauke: you need to fully sort the list to know what the first element is
19:02:37 <hpc> at best, it's O(n)
19:03:33 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
19:05:49 <mauke> uh
19:05:55 <mauke> yeah, I meant O(n) :-)
19:06:27 bjourne2 joins (~bjorn@94.191.152.34)
19:07:18 manwithluck joins (~manwithlu@194.177.28.176)
19:12:44 <zzz> n
19:12:51 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
19:15:57 acidjnk_new joins (~acidjnk@p200300d6e7137a8088c1e7d0a73974c1.dip0.t-ipconnect.de)
19:16:05 × random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed)
19:16:29 opticblast1 joins (~Thunderbi@172.58.86.28)
19:18:12 × opticblast quits (~Thunderbi@2607:fb90:17d5:bf2b:77cb:753d:d116:5897) (Ping timeout: 256 seconds)
19:18:12 opticblast1 is now known as opticblast
19:29:27 × mei_ quits (~mei@user/mei) (Remote host closed the connection)
19:29:53 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
19:31:00 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:32:43 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
19:36:28 zmt01 joins (~zmt00@user/zmt00)
19:36:37 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
19:38:02 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 256 seconds)
19:43:35 × dsrt^ quits (~dsrt@76.145.185.103) (Remote host closed the connection)
19:48:40 TomWesterhout[m] joins (~twesterho@2001:470:69fc:105::1:2918)
19:49:03 × heisenberg2 quits (~heisenber@112.151.244.175) (Ping timeout: 260 seconds)
19:51:31 texasmynsted joins (~texasmyns@99.96.221.112)
19:54:26 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
19:55:40 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
19:56:20 Sgeo joins (~Sgeo@user/sgeo)
19:56:51 Topsi joins (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de)
19:59:18 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
19:59:35 fostyr42 joins (~fostyr@2607:fea8:c1e2:100::f7a3)
20:01:12 kenran joins (~user@user/kenran)
20:01:59 × Topsi quits (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de) (Quit: Leaving.)
20:02:24 × fostyr42 quits (~fostyr@2607:fea8:c1e2:100::f7a3) (Quit: Client closed)
20:02:43 × kenran quits (~user@user/kenran) (Remote host closed the connection)
20:03:58 heisenberg2 joins (~heisenber@112.151.244.175)
20:06:11 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
20:07:08 × Guest5607 quits (~marc@5.83.191.88) (Ping timeout: 260 seconds)
20:07:58 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
20:11:35 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
20:15:43 coot joins (~coot@213.134.171.3)
20:16:03 coderpath joins (~coderpath@d66-183-126-83.bchsia.telus.net)
20:16:47 kenran joins (~user@user/kenran)
20:17:59 pera joins (~pera@user/pera)
20:20:25 pavonia joins (~user@user/siracusa)
20:21:40 × kenran quits (~user@user/kenran) (Remote host closed the connection)
20:24:56 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
20:25:54 accord joins (uid568320@id-568320.hampstead.irccloud.com)
20:25:59 × srz_ quits (~srz@181.228.49.93) (Ping timeout: 264 seconds)
20:27:00 azimut joins (~azimut@gateway/tor-sasl/azimut)
20:27:36 yuribarros joins (~yuribarro@2804:14c:65e4:865c::1000)
20:39:14 × heisenberg2 quits (~heisenber@112.151.244.175) (Ping timeout: 256 seconds)
20:49:11 × euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh)
20:50:50 kleczkowski joins (~kleczkows@89-64-80-128.dynamic.chello.pl)
20:52:20 × coot quits (~coot@213.134.171.3) (Quit: coot)
20:54:39 heisenberg2 joins (~heisenber@112.151.244.175)
20:57:13 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:58:29 marc joins (~marc@5.83.191.88)
20:58:53 marc is now known as Guest3917
21:00:39 king_gs joins (~Thunderbi@187.201.139.206)
21:00:40 Topsi joins (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de)
21:01:10 nate4 joins (~nate@98.45.169.16)
21:06:11 × nate4 quits (~nate@98.45.169.16) (Ping timeout: 264 seconds)
21:07:09 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
21:10:10 × Topsi quits (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de) (Ping timeout: 265 seconds)
21:10:13 Topsi1 joins (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de)
21:11:25 random-jellyfish joins (~random-je@user/random-jellyfish)
21:17:09 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
21:21:26 zant joins (~zant@62.214.20.26)
21:23:05 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
21:30:30 king_gs1 joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924)
21:30:30 × king_gs quits (~Thunderbi@187.201.139.206) (Read error: Connection reset by peer)
21:30:31 king_gs1 is now known as king_gs
21:36:34 <bluephones> Can a compiled haskell binary run arbitrary haskell code at runtime?
21:36:56 <drdo> Usually no
21:37:17 <drdo> i.e. there is no "eval"
21:37:59 <bluephones> Basically what I'm trying to do is have an app, written in Haskell, which allows users to supply plugin scripts also written in Haskell
21:38:14 <hpc> "runtime" is flexible if you use runghc
21:38:59 <bluephones> hmm
21:39:40 × mestre quits (~mestre@191.177.185.178) (Quit: Lost terminal)
21:39:52 × random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed)
21:40:28 × kleczkowski quits (~kleczkows@89-64-80-128.dynamic.chello.pl) (Read error: Connection reset by peer)
21:40:29 <bluephones> can runghc be cross-compiled on iOS and Android?
21:41:35 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds)
21:43:16 <EvanR> there used to be a plugins library which utilized dark ghc magic and dynamic loading
21:43:39 <EvanR> which would be the route you would take in not haskell
21:43:44 <EvanR> to make plugins
21:44:38 <EvanR> you could also make a haskell-based DSL which compiles to a form that your app can run
21:44:55 <EvanR> which would also introduce safety and security to your plugins
21:44:59 <EvanR> s/would/could
21:44:59 <jean-paul[m]> Even in other languages, plugins as "program you run and do RPCs (over stdio) to" is kind of popular now
21:45:45 <bluephones> not a bad idea
21:46:02 <bluephones> I think I'll either go the DSL route or just settle for javascript lol
21:46:44 <jean-paul[m]> maybe it's the same thing. just embed a js interpreter in your program and use ghcjs to compile haskell plugins to js.
21:47:04 <jean-paul[m]> what could go wrong
21:47:52 <bluephones> haha
21:48:15 <bluephones> I'm considering JS due to the fact that you can easily execute it via webview/webkit on android and iso
21:48:17 <bluephones> ios*
21:48:20 <EvanR> for good measure, run the plugins within the embedded js using eval (in js)
21:48:48 <bluephones> So I won't have to include a runtime myself
21:49:24 <drdo> I don't want to interrupt the fun. But you could up with some simple RPC and just have a client library in Haskell that you could use to write plugins
21:49:45 <drdo> The experience for the plugin writer wouldn't be too different, still haskell
21:51:25 <bluephones> hmm
21:51:50 <EvanR> well now that we know this is all running in a browser that changes everything
21:51:57 <bluephones> So how would the plugin haskell be interperated by the app in order to run the rpc functions?
21:52:01 <drdo> There is also the xmonad way
21:52:03 <EvanR> spawning side processes isn't exactly normal there
21:52:08 Guest|29 joins (~Guest|29@curl-102.dynamic2.rpi.edu)
21:52:13 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
21:52:27 <bluephones> oh..
21:53:01 <bluephones> Well I'll need to do some more research first, thanks for the ideas tho
21:53:20 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
21:53:26 <EvanR> ghcjs might actually be what you want, though building the plugin within the browser is next level
21:54:43 <bluephones> now that I'm thinking about it its probably not a great idea to use haskell as the plugin language
21:55:15 <bluephones> most people won't bother to learn haskell just to write a plugin
21:55:24 <bluephones> probably either JS or Python would be best
21:55:49 <bluephones> I'm not aware if there are any good python interperators for mobile
21:56:24 <EvanR> yeah I'm questioning most conclusions of python-by-default
21:56:54 <bluephones> the only reason being that it's popular
21:57:05 <drdo> js is definitely more popular
21:57:07 <bluephones> most of my users will not be programmers
21:57:14 <EvanR> for writing apps in a browser probably not
21:58:08 <bluephones> Well actually the browser is the only platform I probably won't support
21:58:33 <bluephones> basically haskell for the business logic, and then the client native front end on top
21:58:48 <bluephones> message passing via protobuf
21:59:30 <EvanR> so are the plugins for UI or business logic
21:59:39 <bluephones> business logic
21:59:43 <EvanR> phew xD
21:59:51 <bluephones> lol
22:00:26 <drdo> If you are already even using protobuf for the communication with the UI. You could also do that for plugins
22:00:26 × king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Ping timeout: 265 seconds)
22:00:34 <EvanR> see if this still works https://hackage.haskell.org/package/plugins
22:00:36 <drdo> Then you can write plugins in whatever language you want
22:01:13 <drdo> Or just xmonad-it and recompile the whole thing together
22:01:27 <EvanR> you can also link to something like e.g. lua
22:01:37 <EvanR> and use lua like any other app would
22:01:52 <drdo> or guile :D
22:01:52 <bluephones> the plugins module seems suuuper old, probably wont go that route
22:02:35 × Guest|29 quits (~Guest|29@curl-102.dynamic2.rpi.edu) (Ping timeout: 264 seconds)
22:02:44 <bluephones> my main constraint is android and ios
22:02:56 <bluephones> if it werent for those platforms I'd have a ton more options
22:03:27 <jean-paul[m]> This week I am learning https://reflex-frp.org/
22:03:57 <jean-paul[m]> (who knows, maybe even next week too.)
22:04:10 coot joins (~coot@213.134.171.3)
22:11:23 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds)
22:11:33 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:11:54 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
22:12:00 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
22:12:29 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
22:13:46 tmtt joins (~tmtt@user/tmtt)
22:15:22 Guest|29 joins (~Guest|29@curl-102.dynamic2.rpi.edu)
22:16:21 <tmtt> Hi! When I create a new project using `stack new`, it uses github.com as my project's homepage in package.yml. Is it possible to change that base URL to another git server, like gitlab.com or sr.ht? Not a big deal but if there's a way to do this, please let me know. Thanks in advance!
22:18:47 × Guest|29 quits (~Guest|29@curl-102.dynamic2.rpi.edu) (Remote host closed the connection)
22:21:43 <bluephones> stack config --setup-info-yam URL
22:21:54 <bluephones> stack config --setup-info-yaml URL
22:22:19 <bluephones> sorry for the typo (can messages not be deleted in IRC?)
22:22:25 <geekosaur> no, they can't
22:23:04 <EvanR> your message is etched forever in the internet stone
22:23:31 <bluephones> SSN: 387-28-4826
22:23:39 <bluephones> oops, can someone delete that?
22:23:46 <geekosaur> nobody can
22:23:50 × thyriaen quits (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Remote host closed the connection)
22:23:56 <geekosaur> welcome to the 1990s
22:23:56 <EvanR> it would require reversing entropy
22:24:27 <bluephones> ok, pls dont steal my ssn
22:24:30 <EvanR> or whatever happened in that old superman movie
22:24:46 <geekosaur> theoretically tomsmeding could edit the channel logs, but that won't change my or other people's IRRC logs
22:24:52 <darkling> EvanR: Rogue scriptwriter, I think.
22:25:06 Guest60 joins (~Guest60@101.98.118.246)
22:25:23 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 264 seconds)
22:25:47 <tmtt> bluephones: Thanks! I'll try that.
22:26:14 <Guest60> Hi, I want to parse and write both JSON and YAML files into (and from) a data tree. Are there any recommended packages to do this?
22:26:43 × kmein quits (~weechat@user/kmein) (Quit: ciao kakao)
22:26:46 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
22:26:53 <hpc> json is a subset of yaml, you can get away with one parser
22:26:57 <geekosaur> and even on matrix you're reliant on clients obeying the rules; it's up to each client to honor delete requests
22:27:25 <hpc> probably aeson?
22:27:34 <bluephones> Guest60 I know there's the yaml package for yaml and aeson for json
22:28:49 kmein joins (~weechat@user/kmein)
22:28:54 <Guest60> Makes sense, so I can just go for a yaml parser. Is this the one? https://hackage.haskell.org/package/yaml
22:29:03 <hpc> er, yeah that one
22:29:35 × michalz quits (~michalz@185.246.207.203) (Remote host closed the connection)
22:29:41 <Guest60> cool, thanks
22:37:41 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
22:41:01 × Topsi1 quits (~Topsi@dialin-80-228-154-202.ewe-ip-backbone.de) (Read error: Connection reset by peer)
22:41:44 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
22:42:56 azimut joins (~azimut@gateway/tor-sasl/azimut)
22:44:59 × gff_ quits (~gff@user/gff) (Ping timeout: 260 seconds)
22:47:29 Erutuon joins (~Erutuon@user/erutuon)
22:48:26 gff_ joins (~gff@user/gff)
22:52:32 × tmtt quits (~tmtt@user/tmtt) (Ping timeout: 255 seconds)
22:53:23 × aisa quits (~aisa@user/aisa) (Quit: WeeChat 3.4.1)
22:54:31 tmtt joins (~tmtt@user/tmtt)
22:58:02 × Guest60 quits (~Guest60@101.98.118.246) (Quit: Client closed)
23:01:36 shriekingnoise joins (~shrieking@186.137.167.202)
23:02:41 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
23:03:23 azimut joins (~azimut@gateway/tor-sasl/azimut)
23:04:00 Major_Biscuit joins (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net)
23:05:31 king_gs joins (~Thunderbi@187.201.139.206)
23:05:41 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds)
23:11:24 × coot quits (~coot@213.134.171.3) (Quit: coot)
23:12:27 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
23:13:59 × chomwitt quits (~chomwitt@2a02:587:7a0d:dd00:1ac0:4dff:fedb:a3f1) (Ping timeout: 264 seconds)
23:14:01 LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net)
23:15:47 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 264 seconds)
23:16:04 sus5 joins (zero@user/zeromomentum)
23:16:13 <LemanR> hey all, I'm looking at this guessing game code I made. It works, test passed blah blah but wanted to see if anyone can suggest a subject I could utilize to make this code better. https://dpaste.com/9NWGKKLY2
23:16:19 × heisenberg2 quits (~heisenber@112.151.244.175) (Ping timeout: 265 seconds)
23:16:30 × king_gs quits (~Thunderbi@187.201.139.206) (Quit: king_gs)
23:17:00 <LemanR> I think (and probably wrong) but with pattern matching I think this is as good as it gets.
23:18:40 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
23:19:32 <bluephones> This was my solution: https://exercism.org/tracks/haskell/exercises/guessing-game/solutions/validstand
23:19:59 <bluephones> a bit more compact and maybe more efficient
23:20:59 <LemanR> ahhhhh my bad practice! I forgot the otherwise case D: for shame lol
23:21:41 <bluephones> go through the community solutions, you'll learn a lot there
23:24:50 tmtt parts (~tmtt@user/tmtt) ()
23:25:11 <LemanR> well I was looking for concepts to read about but yeah your solution is better. I should make it instinct to think "can I place a otherwise"
23:26:35 <Rembane> LemanR: You can also pattern match on different numbers, if you want to. :)
23:26:57 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 265 seconds)
23:27:48 × acidjnk_new quits (~acidjnk@p200300d6e7137a8088c1e7d0a73974c1.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
23:28:03 <LemanR> True
23:28:36 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
23:31:23 <[Leary]> LemanR: You don't need instinct---you just need to turn on -Wall and listen when GHC complains about non-exhaustivity.
23:31:44 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Client Quit)
23:31:50 × pera quits (~pera@user/pera) (Quit: leaving)
23:31:55 heisenberg2 joins (~heisenber@112.151.244.175)
23:32:52 <LemanR> in this case I am using the built-in exercism editor. If your test passes you wouldn't see that output, I think.
23:33:31 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
23:33:57 srz_ joins (~srz@181.228.49.93)
23:34:36 <[Leary]> If it doesn't have settings to take proper advantage of GHC, it's not worth writing Haskell in; I would write it with, say, vim+ghcid and copy paste.
23:35:02 money is now known as polo
23:36:28 <LemanR> well I'll get into the practice of using ghc and even compiling just so I know it by heart, atm just trying to speed through some of the basics.
23:37:35 × Major_Biscuit quits (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 265 seconds)
23:41:41 kenaryn joins (~aurele@89-88-44-27.abo.bbox.fr)
23:46:14 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds)
23:54:03 <[Leary]> I don't really mean that you need to know how to invoke ghc yourself; that would normally be done by cabal or nix anyway. I mean that Haskell is designed to be written with plentiful guidance from the compiler. Seeing errors is good; seeing warnings is better---you want to program under the influence of -Wall.
23:55:37 × accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
23:56:48 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
23:57:34 × sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds)
23:58:41 sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
23:59:18 <maerwald[m]> Don't drive and Wall
23:59:42 ChaiTRex joins (~ChaiTRex@user/chaitrex)

All times are in UTC on 2022-11-26.