Home liberachat/#haskell: Logs Calendar

Logs on 2022-02-10 (liberachat/#haskell)

00:00:35 <awpr> I don't think that can be a Monad. that has the whole list structure outside of `m`, and there's no way to figure out ahead of time what that list structure should be for the result of a `>>=`
00:01:19 <dminuoso> If that's what you really want, I think you should have used a `traverse` before.
00:04:26 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
00:09:53 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
00:12:43 sprout joins (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b)
00:13:02 cheater joins (~Username@user/cheater)
00:13:07 wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net)
00:16:05 k8yun joins (~k8yun@user/k8yun)
00:16:50 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
00:16:59 × sprout quits (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b) (Ping timeout: 250 seconds)
00:19:02 <lyxia> aka the list non-monad-transformer
00:22:35 × `2jt quits (~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 256 seconds)
00:28:37 <monochrom> Decepticon :)
00:29:15 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
00:31:45 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
00:33:17 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
00:34:23 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:34:23 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:34:23 wroathe joins (~wroathe@user/wroathe)
00:39:36 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
00:40:20 <capo_greco> hi Haskell community!
00:40:37 <capo_greco> I have a beginner question
00:40:39 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:41:34 <geekosaur> ask, please
00:41:56 <capo_greco> I have GHC installed here on a 2020 M1 MacBook Pro running macOS Monteray
00:42:17 <capo_greco> however, when trying to run `stack build`
00:42:37 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
00:42:39 <capo_greco> stack simply returns `I don't know how to install GHC for (OSX,AArch64), please install manually`
00:43:03 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
00:43:37 × DNH quits (~DNH@2a02:8108:1100:16d8:adf2:7fd4:5ba2:8512) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:43:43 <capo_greco> I have the `config.yaml` open
00:44:22 <capo_greco> but I am not sure how to link the system version of ghc (which works)
00:44:31 <capo_greco> or if that is what I should be trying to do
00:44:45 <geekosaur> you have to passstack --system-ghc, iirc
00:45:05 <geekosaur> I don't know ifthere's a way to configure that as default in config.yaml
00:45:30 <capo_greco> I already tried using this flag - gives the same result unfortunately
00:46:39 sprout joins (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b)
00:46:59 <geekosaur> it shouldn't be trying to install ghc in that case, hm
00:47:59 <capo_greco> I'm using this syntax: `stack build --system-ghc`
00:48:10 <geekosaur> looks like config.yaml entry is "system-ghc: true"
00:48:40 <geekosaur> I'm not a stack user so I can't provide much more help, I'm afraid
00:49:13 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 256 seconds)
00:49:21 <capo_greco> allgood - thank you geekosaur
00:51:01 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
00:51:07 chenqisu1 joins (~chenqisu1@183.217.200.249)
00:51:37 × sprout quits (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b) (Ping timeout: 240 seconds)
00:52:00 <capo_greco> ok! so setting `skip-ghc-check: true` in the config.yaml got it to compile something
00:53:03 ec joins (~ec@gateway/tor-sasl/ec)
00:53:21 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
00:55:58 cynomys joins (~cynomys@user/cynomys)
00:57:29 × jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 256 seconds)
00:59:25 sprout joins (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b)
01:03:39 vicfred joins (~vicfred@user/vicfred)
01:08:19 <EvanR> is the main thread a bound thread
01:08:47 <monochrom> Yes.
01:09:08 <EvanR> funky
01:09:37 × dsrt^ quits (~dsrt@128-092-160-106.biz.spectrum.com) (Remote host closed the connection)
01:12:08 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
01:15:22 × aplainze1akind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
01:15:32 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
01:16:13 × denbrahe quits (~denbrahe@2001:470:69fc:105::19c0) (Ping timeout: 240 seconds)
01:16:13 × siraben quits (~siraben@user/siraben) (Ping timeout: 240 seconds)
01:16:37 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
01:16:41 lavaman joins (~lavaman@98.38.249.169)
01:17:27 denbrahe joins (~denbrahe@2001:470:69fc:105::19c0)
01:18:15 siraben joins (~siraben@user/siraben)
01:18:54 <Axman6> EvanR: you might even say, kinky
01:19:25 <EvanR> 🤦
01:19:28 <Inst[m]> i'm surprised more people don't make jokes based on the fact that Haskell do notation relies on binds
01:20:59 <jackdk> I am glad they don't
01:22:21 × infinity0 quits (~infinity0@occupy.ecodis.net) (Remote host closed the connection)
01:23:16 infinity0 joins (~infinity0@occupy.ecodis.net)
01:34:33 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
01:35:06 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
01:37:15 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
01:42:25 <geekosaur> and discipline
01:43:37 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
01:43:56 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:44:06 × EvanR quits (~EvanR@user/evanr) (Quit: Leaving)
01:44:39 <sshine> and monads
01:46:40 <sshine> there's a DNS server called Unbound that is an alternative to BIND.
01:47:31 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
01:47:44 EvanR joins (~EvanR@user/evanr)
01:48:35 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
01:49:05 × jinsun quits (~quassel@user/jinsun) (Read error: Connection reset by peer)
01:49:23 <EvanR> that was annoying. After a bunch of refactoring, glfw began to return NULL when creating a window, no other error message. Revert the code, same behavior. Go back to previous commits known to work, same behavior. Reboot the computer, it agrees to create windows again
01:49:36 <EvanR> cosmic ray hit a linker cache or something
01:51:06 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
01:51:19 lavaman joins (~lavaman@98.38.249.169)
01:53:34 <monochrom> https://ro-che.info/ccc/1
01:54:57 <jackdk> what is the best sha1 lib in common use?
01:56:33 <Unicorn_Princess> how soon do you figure ghc will switch to https://github.com/Kindelia/HVM and do away with GC pauses forever?
01:56:40 <sshine> jackdk, cryptohash-sha1?
01:56:47 <EvanR> ...
01:56:53 <Unicorn_Princess> or do i overestimate how magical HVM is
01:56:56 <Axman6> Unicorn_Princess: never?
01:57:02 <Unicorn_Princess> ; ;
01:57:03 <Axman6> yes, very much so, you need to read the author's comments
01:57:22 vysn joins (~vysn@user/vysn)
01:57:23 <jackdk> sshine: that may be best option. wasn't sure if it was well-maintained
01:57:33 <Unicorn_Princess> Axman6, which comments?
01:57:36 <Axman6> it can only handle pure code basically, all the primops would need to be implemented and handled correctly - and concurrencvy changes things a lot
01:57:45 <Axman6> on Reddit, lobste.rs etc.
01:57:47 × sektor|3 quits (~kvirc@94.155.193.66) (Ping timeout: 256 seconds)
01:57:50 <sshine> jackdk, Uploaded by phadej at 2021-11-13 -- I'd say it is.
01:57:54 <Unicorn_Princess> awww
01:58:03 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
01:58:13 <Inst> @monochrom your comic is bad and you should feel bad
01:58:13 <lambdabot> Unknown command, try @list
01:58:29 <jackdk> sshine: tyvm
01:58:42 <Axman6> jackdk: #haskell-cryptography might have some more advice - the libsodium library that's being written at the moment will include SHA1
01:59:06 <Axman6> Personally I would use cryptonite, because I'm quite used to it
01:59:15 <jackdk> Axman6: I need to make a decision today-ish, because a kind soul is PRing AWS SSO support into amazonka
01:59:32 × Shiranai quits (~Shiranai@190.237.13.188) (Quit: Connection closed)
01:59:36 <jackdk> cryptonite is inside the event horizon of the foundation/basement black hole
02:00:08 <Axman6> ah yes, ignore that then
02:02:25 <Axman6> I've asked in the other channel for you, just in case there is a better suggestion
02:03:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Remote host closed the connection)
02:05:02 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
02:08:33 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:08:42 <jackdk> appreciate it
02:08:47 lavaman joins (~lavaman@98.38.249.169)
02:08:55 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:09:09 lavaman joins (~lavaman@98.38.249.169)
02:09:17 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:09:31 lavaman joins (~lavaman@98.38.249.169)
02:09:38 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:09:53 lavaman joins (~lavaman@98.38.249.169)
02:09:59 k8yun_ joins (~k8yun@user/k8yun)
02:10:00 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:10:13 lavaman joins (~lavaman@98.38.249.169)
02:10:21 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:10:36 lavaman joins (~lavaman@98.38.249.169)
02:10:43 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:10:57 lavaman joins (~lavaman@98.38.249.169)
02:11:04 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:11:18 lavaman joins (~lavaman@98.38.249.169)
02:11:26 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:11:37 × k8yun_ quits (~k8yun@user/k8yun) (Remote host closed the connection)
02:11:40 lavaman joins (~lavaman@98.38.249.169)
02:11:47 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:12:01 lavaman joins (~lavaman@98.38.249.169)
02:12:09 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:12:23 lavaman joins (~lavaman@98.38.249.169)
02:12:28 <monochrom> I have this wild conjecture that if there is channel traffic, lavaman's connection is stable.
02:12:30 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:12:45 lavaman joins (~lavaman@98.38.249.169)
02:12:53 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:12:54 <Inst> conjecture disproven
02:12:57 califax- joins (~califax@user/califx)
02:13:07 lavaman joins (~lavaman@98.38.249.169)
02:13:11 <EvanR> coincidentally the colors for lavaman leaving and joining are orange and yellow
02:13:14 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:13:20 <EvanR> for me
02:13:23 <Inst> ah, a fellow hexchat / xchat user
02:13:28 lavaman joins (~lavaman@98.38.249.169)
02:13:36 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:13:39 × k8yun quits (~k8yun@user/k8yun) (Ping timeout: 256 seconds)
02:13:50 lavaman joins (~lavaman@98.38.249.169)
02:13:57 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:14:06 <EvanR> someone call liquid nitrogen man
02:14:11 lavaman joins (~lavaman@98.38.249.169)
02:14:16 <monochrom> haha
02:14:19 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:14:27 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:14:33 lavaman joins (~lavaman@98.38.249.169)
02:14:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:14:54 lavaman joins (~lavaman@98.38.249.169)
02:15:02 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:15:15 lavaman joins (~lavaman@98.38.249.169)
02:15:23 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:15:37 lavaman joins (~lavaman@98.38.249.169)
02:15:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:16:00 lavaman joins (~lavaman@98.38.249.169)
02:16:07 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:16:10 × fjmorazan quits (~quassel@user/fjmorazan) (Quit: fjmorazan)
02:16:19 <Inst> tbh i wonder if lava's system is on mobile
02:16:21 lavaman joins (~lavaman@98.38.249.169)
02:16:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:16:41 fjmorazan joins (~quassel@user/fjmorazan)
02:16:42 lavaman joins (~lavaman@98.38.249.169)
02:16:50 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:17:00 <Axman6> all the glirc gang sees is "lavaman+x"
02:17:04 lavaman joins (~lavaman@98.38.249.169)
02:17:11 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:17:16 <Axman6> but with more colours
02:17:25 lavaman joins (~lavaman@98.38.249.169)
02:17:31 <Inst> axman6: you have ops, right?
02:17:33 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:17:33 × califax quits (~califax@user/califx) (Ping timeout: 276 seconds)
02:17:34 califax- is now known as califax
02:17:35 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
02:17:48 lavaman joins (~lavaman@98.38.249.169)
02:17:48 <Axman6> I had ops once, for unknown reasons
02:17:55 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:17:59 <Inst> well, it doesn't matter, the first thing you'd do is to ban me
02:18:08 lavaman joins (~lavaman@98.38.249.169)
02:18:16 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:18:31 lavaman joins (~lavaman@98.38.249.169)
02:18:38 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:18:53 lavaman joins (~lavaman@98.38.249.169)
02:19:00 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:19:15 lavaman joins (~lavaman@98.38.249.169)
02:19:22 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:19:40 lavaman joins (~lavaman@98.38.249.169)
02:19:47 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:20:00 lavaman joins (~lavaman@98.38.249.169)
02:20:04 <Axman6> purpletest
02:20:06 <Axman6> hmm
02:20:08 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:20:15 <Axman6> @where ops
02:20:16 <lambdabot> byorgey Cale conal copumpkin dcoutts dibblego dolio edwardk geekosaur glguy jmcarthur johnw mniip monochrom quicksilver shachaf shapr ski
02:20:23 lavaman joins (~lavaman@98.38.249.169)
02:20:26 <Axman6> RE: lavaman
02:20:30 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:20:43 lavaman joins (~lavaman@98.38.249.169)
02:20:49 ChanServ sets mode +o monochrom
02:20:51 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:21:05 lavaman joins (~lavaman@98.38.249.169)
02:21:08 monochrom sets mode +b *!*@98.38.249.169
02:21:12 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:21:45 <Inst> thanks
02:22:10 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
02:22:43 × jiribenes quits (~jiribenes@rosa.jiribenes.com) (Remote host closed the connection)
02:24:15 <monochrom> Axman6: It is possible that if you say "/msg chanserv op #haskell" you will be op again.
02:24:43 ryanbooker joins (uid4340@id-4340.hampstead.irccloud.com)
02:24:47 <monochrom> But normally we de-op ourselves when there is nothing.
02:24:48 <Axman6> "ChanServ: You are not authorized to perform this operation." and probably rightfully so =)
02:24:53 monochrom sets mode -o monochrom
02:24:58 <monochrom> Hrm OK
02:26:02 desklamp[m] joins (~desklampm@2001:470:69fc:105::77b8)
02:28:38 ChanServ sets mode +o Axman6
02:29:44 ChanServ sets mode +o monochrom
02:31:11 monochrom sets mode -b+b-o *!*@98.38.249.169 *!*@98.38.249.169$##fix-your-connection monochrom
02:31:20 k8yun joins (~k8yun@user/k8yun)
02:32:55 <Inst> can i troll for 5 minutes?
02:33:30 <Inst> what's the difference between an expression-based and a statement-based language?
02:33:35 <Inst> and is one more "advanced" than the other?
02:37:49 <Inst> i'm going over K&R right now and wondering if anyone ever tried to write a "Haskell: The Programming Language" book
02:38:37 <Axman6> Oh my
02:39:36 <Axman6> Inst: my very naive understanding is that expressions can freely be substituted, while statements have side effects, so you can't just substitute things willi-nilly
02:39:55 <Inst> but an IO action can be an expression
02:40:00 <ephemient> expressions in C have side effects too
02:40:18 <Inst> and yeah, statement-based languages also have expressions
02:41:14 <ephemient> honestly I think it's a pretty pointless distinction: a "statement" can be treated as an "expression" with a unitary type
02:41:39 <Axman6> IO actions are pure and can be freely sumstituted - foo (someIO x) (someIO x) will be the same as let y = someIO x in foo y y
02:41:41 <ephemient> I mean, not exactly, in C's grammer, but in GCC ({ }) can wrap any statement into an expression, so…
02:41:56 <sm> to me "statement" implies an evaluation order (sequential), while "expression" doesn't
02:42:24 <Inst> i guess, i was supposed to have a unit where you had a simple hello world + (with getLine) program in do notation
02:42:32 <Inst> then unveil it into the underlying binds
02:42:38 <Inst> one of the questions asked is: why is this necessary?
02:42:45 <Inst> the provision answer I had was that Haskell is an expression-based language
02:42:52 anon12176673 joins (~anon12176@host-92-19-99-147.as13285.net)
02:43:03 × anon12176673 quits (~anon12176@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:43:04 <ephemient> expressions not having side effects is not the case in other (strict) functional programming languages, you do rely on expression side-effects and can sequence expressions
02:43:24 <Inst> the compiler works by evaluating expressions and transforming them into imperative code, as opposed to executing statements
02:43:35 <Inst> i hope you're not going to object that this is "not even wrong"
02:43:50 <sm> (and yes, "expression" carries more of an expectation of few/no side effects)
02:43:55 anon12176673 joins (~anon12176@host-92-19-99-147.as13285.net)
02:44:13 <Inst> expressions have side effects in special cases
02:44:13 × anon12176673 quits (~anon12176@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:44:19 <Inst> statements have side effects as part of their definition
02:44:22 <Inst> is that a correct guess?
02:44:37 <ephemient> the SML family is expression-based but uses (a;b;c) to sequence expressions a,b,c
02:44:44 <sm> you could have side-effect free statements.
02:44:52 anon12176673 joins (~anon12176@host-92-19-99-147.as13285.net)
02:45:11 <Inst> #define in C as an example?
02:45:21 <EvanR> how many expressions could nest on the head of a pin
02:45:57 <EvanR> go to the BNF of expression / statement language mobile
02:46:43 <ephemient> yeah to me the difference is purely up to the particular language's grammar
02:47:12 <ephemient> C permits any expression to be used as a statement; Java does not
02:47:26 <EvanR> often you will see the notion of an expression having a value (which may be another expression, possibly in another language), while the value of a statement is usually not a thing. And when it is I think of them also as expressions
02:47:54 <EvanR> as in ruby
02:48:27 <EvanR> whose statements have values and are basically messed up expressions
02:48:33 awpr has a piece of paper on his desk containing a "term language" for linear logic, wherein there are statements as distinct from expressions
02:48:51 desklamp[m] parts (~desklampm@2001:470:69fc:105::77b8) ()
02:49:58 × anon12176673 quits (~anon12176@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:49:59 <sm> to me "statements" means "sequential, likely effectful", and "expressions" means "tree-structured, likely non-effectful"
02:50:37 anon41255431 joins (~anon41255@host-92-19-99-147.as13285.net)
02:50:42 <EvanR> when statements have no value, then naturally... the point is effects xD
02:50:43 <awpr> https://homepages.inf.ed.ac.uk/wadler/papers/dual/dual.pdf has the same kind of term/statement setup, but for a more traditional computational model
02:50:50 × anon41255431 quits (~anon41255@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:51:10 <EvanR> when expressions have no effects, the point is valuation
02:51:39 <EvanR> i.e. intended semantics
02:52:16 anon41255431 joins (~anon41255@host-92-19-99-147.as13285.net)
02:52:31 <monochrom> when statements have no effects, the point is identity :)
02:52:57 ChanServ sets mode +o litharge
02:52:58 litharge sets mode -bo *!*@98.38.249.169$##fix-your-connection litharge
02:53:09 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
02:53:14 <EvanR> State monad plays both sides of the field
02:53:20 <EvanR> evalState, execState
02:54:09 <EvanR> "values" of type State s a are expressions but also statements
02:54:21 <awpr> the dual calculus notion of statements has neither a value nor side effects (but of course it's a very different concept from "statements" in imperative language)
02:54:38 <anon41255431> Does anyone know where I can find recursion problems to practice using Haskell?
02:55:27 <monochrom> Perhaps "99 haskell problems"
02:55:33 × anon41255431 quits (~anon41255@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:55:40 <Axman6> there's a lot to be learned by implementing as many of the list functions using foldr IMO
02:55:45 <monochrom> https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems
02:57:01 <monochrom> Equivalently Haskell doesn't have loops so every problem that exceeds O(1)-time is a recursion problem. :)
02:57:08 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
02:57:20 anon41255431 joins (~anon41255@host-92-19-99-147.as13285.net)
02:57:28 × anon41255431 quits (~anon41255@host-92-19-99-147.as13285.net) (Remote host closed the connection)
02:58:19 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
03:00:27 shailangsa joins (~shailangs@host217-39-45-199.range217-39.btcentralplus.com)
03:02:02 × xff0x quits (~xff0x@2001:1a81:5384:400:77b6:98fb:61ba:7d90) (Ping timeout: 240 seconds)
03:02:23 lottaquestions joins (~nick@2607:fa49:5041:a200:b92:1a0:165b:5914)
03:02:59 <EvanR> so expressions and statements are like link vs ganon. They keep appearing together but how they look depends on which sequel / language it is
03:03:34 × Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
03:03:54 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
03:04:01 xff0x joins (~xff0x@2001:1a81:53bc:500:22c0:5bd7:c089:bc66)
03:06:00 × emf_ quits (~emf@2620:10d:c090:400::5:c6d7) (Ping timeout: 250 seconds)
03:07:06 <Inst> is this any good?
03:07:07 <Inst> https://wiki.haskell.org/99_questions/1_to_10
03:08:44 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
03:12:40 razetime joins (~quassel@49.207.198.36)
03:13:26 alMalsam1 joins (~alMalsamo@gateway/tor-sasl/almalsamo)
03:13:56 × little_mac quits (~little_ma@2601:410:4300:3ce0:89bd:bcbb:df15:8e9a) (Remote host closed the connection)
03:14:58 × alMalsamo quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
03:21:16 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:26:43 mbuf joins (~Shakthi@110.225.224.158)
03:29:50 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
03:34:27 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
03:36:33 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
03:37:17 × foul_owl quits (~kerry@94.140.8.52) (Ping timeout: 256 seconds)
03:39:59 × sleblanc quits (~sleblanc@user/sleblanc) (Quit: Leaving)
03:40:02 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
03:40:02 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
03:40:02 wroathe joins (~wroathe@user/wroathe)
03:41:28 nebu joins (~user@user/wavion)
03:41:48 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
03:42:37 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
03:43:02 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
03:43:16 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
03:44:17 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
03:45:08 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
03:45:27 × td_ quits (~td@94.134.91.16) (Ping timeout: 256 seconds)
03:46:25 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
03:47:22 td_ joins (~td@94.134.91.205)
03:48:51 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
03:52:21 anon12176673 joins (~anon12176@host-92-19-99-147.as13285.net)
03:53:01 foul_owl joins (~kerry@94.140.8.25)
03:57:40 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
03:59:25 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
04:00:15 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
04:00:16 × burnsidesLlama quits (~burnsides@dhcp168-051.wadham.ox.ac.uk) (Remote host closed the connection)
04:00:16 × yauhsien quits (~yauhsien@61-231-45-223.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
04:00:45 yauhsien joins (~yauhsien@61-231-45-223.dynamic-ip.hinet.net)
04:01:51 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
04:04:58 × anon12176673 quits (~anon12176@host-92-19-99-147.as13285.net) (Remote host closed the connection)
04:05:21 dajoer joins (~david@user/gvx)
04:05:21 Erutuon joins (~Erutuon@user/erutuon)
04:05:44 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
04:10:37 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
04:11:36 jinsun joins (~quassel@user/jinsun)
04:12:39 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
04:12:58 Jing joins (~hedgehog@240e:390:7c53:a7e1:e8ea:b48d:a0c7:7ddc)
04:13:51 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
04:15:15 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
04:15:38 Erutuon joins (~Erutuon@user/erutuon)
04:23:12 seer joins (~delicacie@2601:6c4:4080:3f80:8d94:ce47:541:9d0d)
04:23:14 seer is now known as Inst
04:25:18 <Inst> https://pastebin.com/4xnKg7N6
04:25:24 <Inst> is this worth uploading into hackage?
04:25:29 <Inst> obv it needs cabal files
04:25:31 <Inst> and haddock
04:26:24 <EvanR> and make sure to use the most valuable name you can think of
04:26:43 <Inst> that everyone will get pissed off that i'm now squatting their name?
04:27:46 <EvanR> probably fine Ed K has probably uploaded anything worth using to the most valuable names already
04:27:59 <EvanR> anything else is trash
04:28:27 <jackdk> many those operator names are already in use
04:28:51 <Inst> https://hoogle.haskell.org/?hoogle=%3D%40&scope=set%3Astackage
04:28:58 <Inst> https://hoogle.haskell.org/?hoogle=%3D%40%7C&scope=set%3Astackage
04:29:10 <Inst> https://hoogle.haskell.org/?hoogle=%7C%3D%40
04:29:33 <Inst> https://hoogle.haskell.org/?hoogle=%40%3D%40
04:29:43 <Inst> are those operator names actually in use? :(
04:30:27 deadmarshal joins (~deadmarsh@95.38.117.25)
04:31:40 <EvanR> you might be interested in the !@$# operator
04:32:06 <EvanR> so your code looks like it's cursing
04:32:27 <Inst> i'm deadly serious, it seems to be a simple addition that a noob can make to hackage
04:32:39 <Axman6> lens loves to take a big chunk out of the operator space, make sure you don't conflict with it because I love lens
04:33:04 <Inst> the way I understand Haskell culture is that most Haskellers hate Haskell and instead of being a troll like sandakarwhatever, they just build a lib or language extension
04:33:20 <Inst> which is still trolling, because they're contributing to the problem of making Haskell unteachable / unlearnable
04:33:27 <EvanR> > let (∈) = elem in 'o' ∈ "hello world"
04:33:28 <lambdabot> True
04:33:34 <EvanR> use this
04:34:02 <EvanR> actually, just use `elem`
04:34:22 <EvanR> (:∈ might be good to use for advance type level shenanigans)
04:34:46 <Inst> i'm too lazy to type `elem`
04:35:00 <EvanR> well, code is read much more often than it is written
04:35:07 <EvanR> keep that in mind
04:35:41 <Inst> oh well, i'll clean it up, learn cabal, and see if Hackage will let me upload 0.1 of OrPat.ElemOrPatternsOperators
04:35:58 cheater joins (~Username@user/cheater)
04:36:13 <monochrom> How is elem unteachable or unlearnable. This is BS.
04:36:35 <Inst> elem isn't
04:36:50 <EvanR> more useful to me as a pattern-ish thing than elem would be a pattern of the form
04:37:13 <EvanR> prev ++ MyNeedle ++ rest
04:37:14 <Inst> if people like it, maybe it could one day get added to data.foldables
04:37:22 <EvanR> then you can also manipulate the prev and rest
04:37:43 <Inst> *foldable
04:37:44 <EvanR> (if prev is backwards, you have a zipper)
04:38:06 <dsal> Please don't take inspiration from npm.
04:38:41 <EvanR> yeah single line definitions of elem aren't the sort of thing people install packages for
04:38:50 <EvanR> it's easier to just type that line
04:41:33 × wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
04:42:52 ski doesn't really see what the point of the operations in the paste are
04:43:41 <Inst> hopefully, get someone to stuff it into foldable eventually
04:43:49 <Inst> so the next time someone asks about or patterns
04:43:49 <ski> (the last operation is an overlap / non-disjointness check. it might perhaps be useful to give a name. but i'd probably not pick an infix operator for it, just an alphanumeric name)
04:43:56 <dsal> elem is already in Foldable
04:44:01 <Inst> i know
04:44:14 <ski> the paste doesn't seem to have anything to do with disjunctive patterns
04:44:38 <ski> (btw, that call to `foldr' could be replaced by an `any')
04:44:41 × ryanbooker quits (uid4340@id-4340.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
04:44:49 <Inst> but map has <$> attached to it, even if <$> is the exact same length as map
04:44:59 <ski> you mean `fmap'
04:45:32 <Axman6> <$> exists mostly for use with Applicative code
04:45:39 <ski> ^
04:45:40 <dsal> Just about every Haskell program uses fmap, typically infix.
04:45:50 ski often uses `fmap', infix
04:45:58 <ski> foo `fmap` bar
04:46:19 <monochrom> fmap is used much more often than elem, and <$> was chosen because there is a good analogy with existing $
04:46:26 <Axman6> I have literally never done that... I just pretend that <$> is liftA1 and Functors are really Applicatives
04:46:53 <ski> i guess it's a habit since before the invention of `Applicative'
04:47:21 <Inst> i'm sorry for trolling
04:47:41 <monochrom> And yeah eventually an infix operator was desired because fmap was much nicer being used infix in those contexts.
04:48:06 <ski> you weren't trolling, that i could see, but merely attempting to get to grips with what's a worthwhile thing to add as a community contribution
04:48:14 <dsal> The neat thing about `elem` as a section infix is it works both ways.
04:48:21 <Inst> i actually import Data.Bool most of the time to get access to bool
04:48:39 <Axman6> catamorph ALL THE THINGS!
04:48:56 <EvanR> it's catamorphin' time.
04:51:17 <dsal> Is that the 80s cartoon where the cat people turned into a giant robot?
04:53:19 <Inst> https://en.wikipedia.org/wiki/Catamorphism
04:53:53 <Inst> I think that was swat kats or something
04:54:56 <Inst> my specific use case is that whenever i'm programming in some other language
04:55:28 <Inst> i get pissed off that i have to type a == x || a == y || ...
04:56:10 <Inst> i mean, multiple assignments have been here since c, why do i have to do explicit or and retyping?
04:56:12 <Axman6> Maybe python's for you
04:56:23 <EvanR> DRY
04:56:51 <Axman6> so dry
04:57:02 <EvanR> your code should look like compression output
04:57:08 <monochrom> APL
04:57:09 <ski> a `elem` [x,y,...] -- what's wrong with this ?
04:57:21 <c_wraith> what does multiple assignments have to do with multiple equality tests?
04:57:24 <Inst> it doesn't explicitly indicate the intent
04:57:37 <ski> (and what does this have to do with "multiple assignments", whatever you mean by that here ?)
04:57:38 <Axman6> % (=@|) :: (Foldable t, Eq a) => a -> t a -> Bool; (=@|) = elem; 1 =@ (1,2,3)
04:57:38 <yahb> Axman6: ; <interactive>:13:66: error:; * Variable not in scope: (=@) :: t0 -> (a0, b0, c0) -> DecsQ; * Perhaps you meant one of these: `==' (imported from Prelude), `<@' (imported from Control.Comonad.Store), `=@|' (line 13)
04:57:48 <Axman6> % (=@|) :: (Foldable t, Eq a) => a -> t a -> Bool; (=@|) = elem; 1 =@| (1,2,3)
04:57:48 <yahb> Axman6: ; <interactive>:14:66: error:; GHC stage restriction:; `=@|' is used in a top-level splice, quasi-quote, or annotation,; and must be imported, not defined locally
04:57:52 <EvanR> what's the intent?
04:57:56 <Axman6> % (=@|) :: (Foldable t, Eq a) => a -> t a -> Bool; (=@|) = elem;
04:57:57 <yahb> Axman6:
04:58:06 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
04:58:07 <Axman6> % 1 =@| (1,2,3)
04:58:07 <yahb> Axman6: ; <interactive>:16:3: error:; * No instance for (Foldable ((,,) Integer Integer)) arising from a use of `=@|'; * In the expression: 1 =@| (1, 2, 3); In an equation for `it': it = 1 =@| (1, 2, 3)
04:58:28 <dsal> % 1 =@| (1,2)
04:58:28 <yahb> dsal: False
04:58:31 <Axman6> Do we only have Foldable for (,)???
04:58:32 <Inst> % (=@|) = elem
04:58:32 <yahb> Inst:
04:58:40 <dsal> @Axman6 Yeah, it's generally confusing.
04:58:40 <lambdabot> Unknown command, try @list
04:58:50 <dsal> damnit. You're showing up as an @ so I noobed.
04:58:57 <Inst> 2 =@| [2,3,4]
04:59:02 <Inst> % 2 =@| [2,3,4]
04:59:02 <yahb> Inst: True
04:59:03 <EvanR> clearly only (a,a,a) is foldable
04:59:04 <Axman6> such a noob
04:59:07 <ski> how does it not explicitly indicate the intent (and if it doesn't, how does `=@|' fare any better, on that front) ?
05:00:03 <Inst> % 2 =@| [1,3,4]
05:00:03 <yahb> Inst: False
05:00:14 <Inst> % :r
05:00:14 <yahb> Inst: Ok, no modules loaded.
05:01:11 <Inst> checking that a is an element of list is not obviously equivalent to wanting to do multiple equivalence checks under or conditions
05:01:55 <Inst> when i asked first whether Haskell had or patterns
05:02:03 <Inst> it took a bit of time before someone offered the obvious elem solution
05:02:19 <c_wraith> they do different things
05:02:23 <dsal> Just about anyone who sees "x `elem` ys" will know what it means. Nobody who sees "x =@| ys" will have any idea what the code is doing.
05:02:24 <c_wraith> patterns can bind values
05:02:26 <EvanR> in this case, the fact that it's easier to read AND write an `elem` makes it a no brainer
05:02:28 <monochrom> I'm not surprised.
05:02:43 <EvanR> moving on
05:02:56 <monochrom> Someone in a math channel asked "how to solve equations".
05:03:14 <ski> EvanR : i guess the problem with `prev ++ MyNeedle ++ rest' is that it's ambiguous, unless at least one of `prev' and `rest' are already bound
05:03:17 <dsal> "hello, I just heard of math"
05:03:30 <monochrom> It took a long time for the audience to find out they just meant linear equations in one variable, like "3x - 5 = 7".
05:03:34 <EvanR> yeah I didn't think it would literally work
05:03:38 <ski> (oh, and itym s/MyNeedle/[MyNeedle]/)
05:03:54 <Inst> so, um, is bool a bad idea?
05:03:54 <EvanR> that too...
05:04:21 <dsal> bool isn't 100% a bad idea, but it rarely makes things clearer.
05:04:32 <Inst> i mean everyone in this channel knows what bool, the function, not the type, is, right?
05:04:47 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
05:04:52 <dsal> Yeah, you mentioned using `bool` earlier.
05:04:53 <EvanR> I use if then else
05:04:58 <ski> if there's a reasonable pattern-matching solution, then that's probably better than using a `Bool'ean condition
05:04:58 <dsal> Though `Bool` is also a bad idea a lot of the time.
05:05:02 <EvanR> or pattern matching
05:05:18 <monochrom> bool is a good idea that turns out to not matter.
05:06:07 <monochrom> Maybe a Scheme person would use bool to write foldr but we have something even better.
05:06:48 <Inst> just, if there's a simple split, i don't see the point of using case of
05:07:13 <monochrom> And then even when boolean tests are important, we have guards.
05:07:30 <Inst> iirc guards can't be freely deployed, right?
05:07:36 <Inst> only in case expressions and function definitions
05:07:44 <Inst> they're syntax, not functions
05:08:32 <dsal> This is an abstract concern. You should use the thing that's best in the situation.
05:08:44 <Inst> let x | condition 1 = y; x | condition 2 = z in
05:08:48 <dsal> `bool` is *sometimes* the best, but pretty rarely so.
05:08:53 × modnar quits (~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.)
05:09:59 <Inst> bleh, sorry for trolling you with my shit
05:10:39 <ski> Inst : guards attach to pattern-matching, yes
05:10:39 modnar joins (~modnar@shell.sonic.net)
05:11:22 lavaman joins (~lavaman@98.38.249.169)
05:12:41 <EvanR> the mystic barrier imprisoning lavaman for minuteslennia is weakening
05:12:55 <Inst> lavaman, did you fix your connection yet?
05:13:51 <Inst> basically, on FP discord, someone told me: "never use if then else, use case of"
05:14:06 <Inst> i responded: if then else is simple in cases where if then else makes sense
05:14:13 <Inst> is applicable, i mean
05:14:17 <Inst> then someone told me to use bool instead
05:14:19 <dolio> That advice doesn't make much sense.
05:15:22 <monochrom> Not sure whether I should say "this is why I don't read FP discord" or "data shows that people misinterpret statements".
05:15:58 <c_wraith> I don't like if/then/else except for one-liners. But that's not the same as "don't use it".
05:16:07 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
05:16:32 <dolio> Pretty much all "never use X" advice isn't any good.
05:17:19 <ski> "never use \"never use X\" advice" ?
05:17:52 <EvanR> "remember that giant red button I told you to never use?"
05:18:25 <ephemient> https://gitlab.haskell.org/ghc/ghc/-/issues/19477 says that ifThenElse becomes unusable with {-# LANGUAGE LinearTypes, RebindableSyntax #-}, in which case you can only use case ... of { True -> ...; False -> ... } but I imagine that shouldn't affect *that* many people at the moment
05:18:29 <monochrom> I never shave people who never shave themselves.
05:19:54 <ski> "never use ..." can be problematic, if you're not properly told *why* whatever thing that is mentioned is considered to be better left avoided
05:20:13 <Inst> because case of is more powerful, using pattern matching
05:20:38 <ski> using a more general version that covers something, isn't always a good idea
05:20:40 <monochrom> For Bool there is no power to speak of, really.
05:20:52 <monochrom> For Maybe a, [a], etc., now we're talking.
05:20:54 <dolio> It's not more powerful to do case analysis on a boolean, though. So in that scenario it's just senseless adherence to dogma.
05:21:15 <Inst> on the other hand, you can profitable jettison if then else from the language
05:21:22 <Inst> since it desugars to case of anyways
05:21:37 <Inst> case boolean of; True -> k; _ -> l
05:21:55 <EvanR> even lisp has syntactic sugar
05:22:02 <EvanR> everyone loves syntactic sugar
05:22:31 <monochrom> I like desugared grape juice more than I like grape juice. :)
05:22:33 <Inst> i mean, there's like, 5 different ways to do a conditional in the base language
05:22:40 <dolio> So?
05:22:42 <Inst> and 8-10 different ways once you consider extensions and libs?
05:22:46 ski tends to prefer to err on the side of explaining why something should (generally) be avoided, but then, often, go on to give them the rope with which they could hang themselves with
05:22:58 <ski> the point is to be able to make an informed decision
05:23:20 <dolio> Having lots of ways to do something isn't automatically a bad thing.
05:23:53 <EvanR> esp at the level if then else... who cares
05:24:06 <EvanR> the stakes are at an all time low
05:24:20 <Inst> dolio: the challenge is that it makes the language harder to learn
05:24:28 <Inst> and the variety of styles in Haskell makes it harder to read
05:24:33 <Inst> like, I still can't read lib code
05:24:39 <EvanR> even pattern matching () is more interesting thanks to laziness or strictness issues
05:24:44 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:25:21 <ski> some additional ways to do things (like the paste above), doesn't really add anything meaningful
05:25:26 <ski> others do
05:26:12 <Inst> bool compared to if then else at least is a function that can be partially applied
05:26:13 <ski> i guess it's a matter of discernment to be able to tell which is which
05:26:34 <Inst> the paste above is more (hey guys, guess what? You get to save 3 keystrokes on elem)
05:26:35 <dolio> That is essentially the only reason to use bool.
05:26:47 <ski> yes. but being able to partially apply isn't always something that's useful, in a given context
05:27:23 <Inst> bool = 4-10 keystrokes, if then else is also 10 keystrokes
05:27:27 × modnar quits (~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.)
05:27:38 <Inst> drawback: bool code is hard to read
05:27:40 <EvanR> the number of saved keystrokes involved, added up over time, likely doesn't rival this discussion
05:27:43 <ski> "save 3 keystrokes" is about (a very low-level of) efficiency of writing. generally it's more useful to worry about efficiency of reading
05:27:45 <dolio> I wasn't counting bad reasons.
05:28:12 <monochrom> https://learnyouahaskell.github.io/
05:29:02 <monochrom> Some kind of "LYAH is dead. Long live LYAH, this time literally"
05:29:17 modnar joins (~modnar@shell.sonic.net)
05:29:42 <Inst> pretty good
05:30:03 <Inst> since i hate haskellbook, maybe people can actually fix lyah
05:33:01 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Ping timeout: 240 seconds)
05:40:32 <neverwas> Gee, I hope they manage to preserve the style of the prose
05:40:42 <neverwas> or even just go with annotations or something if it's not too jarring/distracting
05:40:48 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
05:40:48 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
05:40:48 wroathe joins (~wroathe@user/wroathe)
05:41:03 × lechner quits (~lechner@debian/lechner) (Ping timeout: 256 seconds)
05:43:20 lechner joins (~lechner@debian/lechner)
05:44:12 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
05:45:35 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
05:55:59 k8yun_ joins (~k8yun@user/k8yun)
05:59:45 × k8yun quits (~k8yun@user/k8yun) (Ping timeout: 256 seconds)
06:02:00 meer joins (~delicacie@2601:6c4:4080:3f80:5c6a:e4b3:e4cd:1bc3)
06:04:17 × lechner quits (~lechner@debian/lechner) (Ping timeout: 240 seconds)
06:04:37 × Inst quits (~delicacie@2601:6c4:4080:3f80:8d94:ce47:541:9d0d) (Ping timeout: 240 seconds)
06:06:35 meer is now known as Inst
06:07:27 × Jing quits (~hedgehog@240e:390:7c53:a7e1:e8ea:b48d:a0c7:7ddc) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:11:28 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:12:54 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:13:21 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
06:14:08 cigsende1 joins (~cigsender@50-240-234-101-static.hfc.comcastbusiness.net)
06:15:17 haskell_ joins (~haskell@65-102-32-32.ptld.qwest.net)
06:15:37 × haskell_ quits (~haskell@65-102-32-32.ptld.qwest.net) (Remote host closed the connection)
06:16:46 × cigsende1 quits (~cigsender@50-240-234-101-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer)
06:17:38 × cigsender quits (~cigsender@74.124.58.162) (Read error: Connection reset by peer)
06:18:10 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
06:19:07 cigsender joins (~cigsender@74.124.58.162)
06:21:28 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
06:24:15 `2jt joins (~jtomas@130.red-88-22-46.staticip.rima-tde.net)
06:24:53 × _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
06:32:18 × drdo quits (~drdo@roach0.drdo.eu) (Quit: Ping timeout (120 seconds))
06:33:24 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:33:38 drdo joins (~drdo@roach0.drdo.eu)
06:35:01 × nebu quits (~user@user/wavion) (Ping timeout: 240 seconds)
06:35:36 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
06:37:05 ardell joins (~ardell@user/ardell)
06:40:33 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
06:45:12 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:47:14 cheater joins (~Username@user/cheater)
06:54:32 <EvanR> wait, LYAH was lost and is being reconstructed from scratch?
06:54:57 <Inst> the site went down for a couple of days
06:56:28 f-a parts (f2a@f2a.jujube.ircnow.org) ()
06:57:01 × `2jt quits (~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 240 seconds)
06:58:17 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:59:37 × foul_owl quits (~kerry@94.140.8.25) (Ping timeout: 240 seconds)
07:00:56 lechner joins (~lechner@debian/lechner)
07:02:45 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Quit: Textual IRC Client: www.textualapp.com)
07:03:32 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds)
07:03:47 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
07:05:17 wei2912 joins (~wei2912@138.75.71.147)
07:08:23 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
07:11:08 thevishy joins (~Nishant@2405:201:f005:c007:6cf1:7245:a05f:ea21)
07:14:10 jakalx parts (~jakalx@base.jakalx.net) ()
07:15:06 foul_owl joins (~kerry@71.212.148.11)
07:17:52 jakalx joins (~jakalx@base.jakalx.net)
07:26:08 michalz joins (~michalz@185.246.204.87)
07:26:27 × shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit)
07:28:03 cigsende1 joins (~cigsender@50-240-234-101-static.hfc.comcastbusiness.net)
07:28:16 lortabac joins (~lortabac@2a01:e0a:541:b8f0:f0ed:5941:868e:9ada)
07:29:22 × zer0bitz quits (~zer0bitz@2001:2003:f74d:b800:a89e:b347:cccb:c7e5) (Read error: Connection reset by peer)
07:29:28 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
07:29:39 zer0bitz joins (~zer0bitz@2001:2003:f74d:b800:3c9b:6dce:e374:3130)
07:31:17 × cigsender quits (~cigsender@74.124.58.162) (Ping timeout: 240 seconds)
07:31:17 × cigsende1 quits (~cigsender@50-240-234-101-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer)
07:33:03 cigsender joins (~cigsender@74.124.58.162)
07:35:43 mc47 joins (~mc47@xmonad/TheMC47)
07:38:15 <Inst> this f- bi-
07:38:44 × k8yun_ quits (~k8yun@user/k8yun) (Quit: Leaving)
07:38:51 <Inst> she took a business chinese class that's like oriented at B2-C1 learners, or is intended for students with around 1000 hours of instructions under her belt
07:38:59 <Inst> so now i have to try to bail her out
07:40:24 <sshine> Inst, 你是中国老师吗?
07:40:50 <sshine> s/中国/汉语/
07:41:21 <Inst> 不是,问题就是我们可以算是对象,然后虽然我汉语水平不太高,我的看能不能救他。
07:43:22 VanceIsM7[m] joins (~vanceism7@2001:470:69fc:105::3ad)
07:43:34 <Inst> 按照汉办的方式来算,我的水平基本上是五到六级,课本是五到六级,但是她的水平想二到三级差不多
07:44:44 gehmehgeh joins (~user@user/gehmehgeh)
07:45:23 max22- joins (~maxime@2a01cb0883359800593582f16039b0e0.ipv6.abo.wanadoo.fr)
07:47:19 <sshine> Inst, 也许你可以把她的课换成别的课。
07:47:53 <Inst[m]> 我已经告诉他了
07:48:09 <Inst[m]> 她就回答,她太疯了。
07:48:15 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
07:48:17 × lechner quits (~lechner@debian/lechner) (Ping timeout: 240 seconds)
07:49:26 <dminuoso> Inst: So what about this example https://gist.github.com/dminuoso/abdea620d60a501d89347b7586b06646#file-f-hs-L12-L14
07:49:27 <Inst[m]> 已经太晚了。也许是我的错误,我没有仔细分析那本课本儿,因该早点告诉她退出来。
07:49:41 <dminuoso> Is this a "poor usage of if-then-else"? Is there some other, more sensible, approach?
07:49:58 <Inst> i mean if you're talking about intelligibility
07:50:03 <Inst> i like if then else, tbh
07:50:10 <Inst> i guess i'm recognizing its advantages
07:50:24 <dminuoso> No concretely, imagine what you would have to do to make it go away here
07:50:29 <dminuoso> We can offload this into a helper function, sure.
07:50:54 <Inst> or you could just use bool
07:51:00 <Inst> and sacrifice readability
07:51:10 <Inst> since people generally don't know what the hell bool is, and you'd have to import it
07:51:24 <Inst> could also just do case of
07:51:34 <dminuoso> `hashPolicy :: Set IfTag -> HashPolicy` and carve that out. But there comes a point at which you might wonder what the point of that is.
07:51:34 <Inst> case isBalanceXor of
07:51:45 <Inst> true -> BalanceXor
07:51:49 fef joins (~thedawn@user/thedawn)
07:51:52 <Inst> _ -> HpLayer34
07:52:05 <Inst> that's the style the guy on FP discord wanted me to use, or at least personally preferred
07:52:10 <Inst> would have been comparably readable to ifthenelse
07:52:15 Akiva joins (~Akiva@user/Akiva)
07:52:33 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Client Quit)
07:52:49 <dminuoso> Im not sure I see any real advantage - arguably it creates more noise.
07:53:16 <dminuoso> The only idiomatic way to make if-then-else go away is by writing the above `hashPolicy` helper function
07:53:44 <Inst> i mean i was guessing the FP discorders know what they were doing
07:54:06 <Inst> in my view, very few people actually "know" haskell, but a lot of people know a little bit of it, or even a lot
07:55:17 <dminuoso> We all have our views on how to write software in a given language. In recent years, when blogging has become ubiquitous, everybody is suddenly an expert, and advice often comes in the form of "never <...>" or "always <...>"
07:55:30 <Inst> xyz considered harmful
07:55:44 <dminuoso> That's quite the clickbait I learned to avoid.
07:55:44 <Inst> with haskell, simply because there's so many ways to express an idea, i'm surprised there's no hard style guides here
07:56:40 cosimone joins (~user@93-47-228-191.ip115.fastwebnet.it)
07:57:15 <EvanR> proof by FP discord
07:57:18 <EvanR> QED
07:57:25 <EvanR> #haskell is chopped liver
07:59:13 <sshine> Inst, Haskell being the hotpot of lazy FP, 'no hard style guides' goes hand in hand with many other expressions of diversity that make practical use difficult.
07:59:37 <Inst> btw, are there any good guides to writing software design docs?
07:59:48 <EvanR> we have many hard style guides in case you are serious
07:59:55 <EvanR> they are so hard I ignore them
08:00:01 <dminuoso> So I find that guides on "how to do something well" more often than not fall really short.
08:00:07 <sshine> Inst, I know of ADRs: https://adr.github.io/
08:00:31 <dminuoso> I think they arise from the false premise that you just have to follow some rigid guidelines, and then your product becomes good.
08:01:10 <sshine> Inst, I like them because I can confine the fluff into an RFC-like Markdown and commit it to version control; kinda raises the bar for who should be doing architecture decisions.
08:01:12 <dminuoso> Software style is a way of communicating with not just the compiler but with other developers, so understanding that communication process is the key to knowing "do I express this with XYZ or some other way"
08:01:24 <dminuoso> And that's ultimately why code formatting tools fall so incredibly short
08:01:36 <dminuoso> They dont know at all what the author is trying to convey
08:02:21 <dminuoso> Or linters even
08:03:07 <EvanR> guides are more valuable if you can just churn them out and charge admission (or get ad revenue)
08:03:10 <sshine> Inst, but I haven't tried to design software with intelligent colleagues, so I don't know of their practical value. the architect behind what I'm making now is so mathy only one guy gets 80% of it at the moment. no reason to document it yet.
08:03:13 <ski> hlint commonly gives advice that can be questioned
08:03:26 <sshine> s/architect/architecture/
08:03:44 <sshine> ski, hlint advice can be modified, so you could argue it's a defaults thing. :)
08:03:50 <EvanR> see how prima strategy guides are gone? way too difficult to produce
08:04:04 <EvanR> now we have a 9000 page ad-filled web page
08:04:15 <EvanR> (with barely any info)
08:04:53 <EvanR> also many programming blogs are from companies that require you to write a blog at any cost
08:05:34 <sshine> Inst, thanks for the Discord link, that's an immensely valuable resource.
08:06:10 cfricke joins (~cfricke@user/cfricke)
08:08:29 <sshine> Inst, case <bool> of ... seems kinda not useful. generally pattern matching makes a lot of sense because it's more extensible. but there isn't going to be a third option to Bool any time soon. :P
08:08:30 mikoto-chan joins (~mikoto-ch@84.199.144.235)
08:09:43 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
08:09:59 <EvanR> it ensures you get all the cases
08:10:20 <EvanR> i.e. if then else
08:11:59 Erutuon joins (~Erutuon@user/erutuon)
08:14:08 zeenk joins (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5)
08:17:43 alp joins (~alp@user/alp)
08:19:06 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
08:20:26 × drdo quits (~drdo@roach0.drdo.eu) (Quit: Ping timeout (120 seconds))
08:24:21 drdo joins (~drdo@roach0.drdo.eu)
08:26:26 × cosimone quits (~user@93-47-228-191.ip115.fastwebnet.it) (Read error: Connection reset by peer)
08:29:18 chele joins (~chele@user/chele)
08:31:00 comerijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
08:31:18 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
08:33:34 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
08:33:36 Ariakenom joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se)
08:36:27 sektor|2 joins (~kvirc@87.227.175.182)
08:38:23 `2jt joins (~jtomas@130.red-88-22-46.staticip.rima-tde.net)
08:38:43 hololeap joins (~hololeap@user/hololeap)
08:41:05 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
08:42:27 cosimone joins (~user@93-47-228-191.ip115.fastwebnet.it)
08:44:05 × comerijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
08:49:00 machinedgod joins (~machinedg@24.105.81.50)
08:49:12 × wrengr quits (~wrengr@99.34.197.35.bc.googleusercontent.com) (Remote host closed the connection)
08:51:01 cfricke joins (~cfricke@user/cfricke)
08:55:50 × Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Remote host closed the connection)
08:56:34 × xff0x quits (~xff0x@2001:1a81:53bc:500:22c0:5bd7:c089:bc66) (Ping timeout: 250 seconds)
08:57:13 ubert joins (~Thunderbi@p200300ecdf0994184cc217ea87d4c264.dip0.t-ipconnect.de)
08:57:18 Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com)
08:57:44 xff0x joins (~xff0x@2001:1a81:53bc:500:bc1a:eecf:3ef6:1dbe)
08:59:16 MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
09:00:26 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
09:11:25 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
09:11:25 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
09:11:25 wroathe joins (~wroathe@user/wroathe)
09:12:45 lavaman joins (~lavaman@98.38.249.169)
09:13:15 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Remote host closed the connection)
09:15:17 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:16:26 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:16:38 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
09:17:12 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
09:17:44 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
09:18:56 zaquest joins (~notzaques@5.130.79.72)
09:19:28 × foul_owl quits (~kerry@71.212.148.11) (Ping timeout: 256 seconds)
09:19:28 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:19:36 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:23:16 × chenqisu1 quits (~chenqisu1@183.217.200.249) (Quit: Leaving)
09:24:43 × xsperry quits (~xs@user/xsperry) (Ping timeout: 250 seconds)
09:26:15 chenqisu1 joins (~chenqisu1@183.217.200.249)
09:30:21 × chele quits (~chele@user/chele) (Ping timeout: 250 seconds)
09:32:50 xsperry joins (~xs@user/xsperry)
09:34:08 dschrempf joins (~dominik@mobiledyn-62-240-134-109.mrsn.at)
09:34:21 foul_owl joins (~kerry@94.140.8.194)
09:34:33 sektor|3 joins (~kvirc@94.155.193.66)
09:34:56 sektor|4 joins (~kvirc@94.155.193.66)
09:35:01 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
09:36:37 × sektor|2 quits (~kvirc@87.227.175.182) (Ping timeout: 240 seconds)
09:37:08 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
09:38:37 × sektor|3 quits (~kvirc@94.155.193.66) (Ping timeout: 240 seconds)
09:45:15 AlexisTP joins (~AlexisTP@92.57.44.63)
09:47:38 × cosimone quits (~user@93-47-228-191.ip115.fastwebnet.it) (Remote host closed the connection)
09:48:42 × tzh_ quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:49:48 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
09:56:34 ubert1 joins (~Thunderbi@2a02:8109:9880:303c:3eb6:2526:d971:8214)
09:57:41 × ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!)
09:58:33 ardell joins (~ardell@user/ardell)
09:59:29 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:00:29 × ardell quits (~ardell@user/ardell) (Client Quit)
10:00:33 __monty__ joins (~toonn@user/toonn)
10:00:58 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 260 seconds)
10:01:06 grgz joins (~grgz@grgz.me)
10:03:43 mastarija joins (~mastarija@2a05:4f46:e04:6000:15fe:cab1:6fd:b807)
10:05:07 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
10:06:13 × foul_owl quits (~kerry@94.140.8.194) (Ping timeout: 240 seconds)
10:06:49 × motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 256 seconds)
10:13:38 × drdo quits (~drdo@roach0.drdo.eu) (Quit: Ping timeout (120 seconds))
10:13:50 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
10:15:49 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
10:17:36 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds)
10:17:38 drdo joins (~drdo@roach0.drdo.eu)
10:18:16 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Ping timeout: 245 seconds)
10:19:13 nschoe joins (~quassel@178.251.84.79)
10:19:14 motherfsck joins (~motherfsc@user/motherfsck)
10:20:09 foul_owl joins (~kerry@71.212.133.174)
10:21:34 cfricke joins (~cfricke@user/cfricke)
10:26:25 × m5zs7k quits (aquares@web10.mydevil.net) (Ping timeout: 256 seconds)
10:27:28 m5zs7k joins (aquares@web10.mydevil.net)
10:32:30 Kaipi joins (~Kaiepi@156.34.47.253)
10:32:56 xstill-8 joins (xstill@fimu/xstill)
10:33:21 lep- joins (~lep@94.31.89.203)
10:34:35 dobblego joins (~dibblego@122-199-1-30.ip4.superloop.com)
10:34:35 × dobblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
10:34:35 dobblego joins (~dibblego@haskell/developer/dibblego)
10:34:55 nschoe_ joins (~quassel@178.251.84.79)
10:35:04 turlando_ joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
10:35:05 hgolden_ joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
10:35:34 ft_ joins (~ft@shell.chaostreff-dortmund.de)
10:35:35 [exa]_ joins (exa@srv3.blesmrt.net)
10:35:40 Vq_ joins (~vq@90-227-195-41-no77.tbcn.telia.com)
10:36:12 fryguybo1 joins (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
10:36:13 janus__ joins (janus@anubis.0x90.dk)
10:36:20 ayako joins (~bnq@66-37-19-52.phx.onelemur.com)
10:36:23 Maxdaman1us joins (~Maxdamant@user/maxdamantus)
10:36:24 pooryori1k joins (~pooryoric@87-119-174-173.tll.elisa.ee)
10:36:28 xdej_ joins (~xdej@quatramaran.salle-s.org)
10:36:41 mikoto-c1 joins (~mikoto-ch@84.199.144.235)
10:36:41 abrar_ joins (~abrar@static-108-2-152-54.phlapa.fios.verizon.net)
10:36:44 sudden joins (~cat@h-98-128-128-173.A351.priv.bahnhof.se)
10:36:53 wei2912_ joins (~wei2912@138.75.71.147)
10:36:55 dhouthoo_ joins (~dhouthoo@178-117-36-167.access.telenet.be)
10:36:57 marquis_1ndras joins (~marquis_a@124.170.163.166)
10:37:08 sudden is now known as Guest3567
10:38:16 infinity0_ joins (~infinity0@occupy.ecodis.net)
10:38:16 × infinity0 quits (~infinity0@occupy.ecodis.net) (Killed (tantalum.libera.chat (Nickname regained by services)))
10:38:16 infinity0_ is now known as infinity0
10:40:40 TheCoffeMaker_ joins (~TheCoffeM@200.126.129.149)
10:41:02 × nschoe quits (~quassel@178.251.84.79) (*.net *.split)
10:41:02 × foul_owl quits (~kerry@71.212.133.174) (*.net *.split)
10:41:02 × drdo quits (~drdo@roach0.drdo.eu) (*.net *.split)
10:41:02 × mikoto-chan quits (~mikoto-ch@84.199.144.235) (*.net *.split)
10:41:02 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (*.net *.split)
10:41:02 × wei2912 quits (~wei2912@138.75.71.147) (*.net *.split)
10:41:02 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (*.net *.split)
10:41:02 × aforemny quits (~aforemny@static.248.158.34.188.clients.your-server.de) (*.net *.split)
10:41:02 × ishutin quits (~ishutin@193-110-63-21.cable-modem.hdsnet.hu) (*.net *.split)
10:41:02 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (*.net *.split)
10:41:02 × superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (*.net *.split)
10:41:02 × bliminse quits (~bliminse@host86-158-241-239.range86-158.btcentralplus.com) (*.net *.split)
10:41:02 × elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (*.net *.split)
10:41:02 × Kaiepi quits (~Kaiepi@156.34.47.253) (*.net *.split)
10:41:03 × Vq quits (~vq@90-227-195-41-no77.tbcn.telia.com) (*.net *.split)
10:41:03 × pooryorick quits (~pooryoric@87-119-174-173.tll.elisa.ee) (*.net *.split)
10:41:03 × dibblego quits (~dibblego@haskell/developer/dibblego) (*.net *.split)
10:41:03 × thebnq quits (~bnq@66-37-19-52.phx.onelemur.com) (*.net *.split)
10:41:03 × [exa] quits (~exa@user/exa/x-3587197) (*.net *.split)
10:41:03 × Philonous quits (~Philonous@user/philonous) (*.net *.split)
10:41:03 × turlando quits (~turlando@user/turlando) (*.net *.split)
10:41:03 × shachaf quits (~shachaf@user/shachaf) (*.net *.split)
10:41:03 × maerwald quits (~maerwald@user/maerwald) (*.net *.split)
10:41:03 × Guest6340 quits (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (*.net *.split)
10:41:03 × xdej quits (~xdej@quatramaran.salle-s.org) (*.net *.split)
10:41:03 × red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (*.net *.split)
10:41:03 × Hafydd quits (~Hafydd@user/hafydd) (*.net *.split)
10:41:03 × aria quits (sid380617@lymington.irccloud.com) (*.net *.split)
10:41:03 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (*.net *.split)
10:41:03 × ncopa quits (~ncopa@alpine/developer/ncopa) (*.net *.split)
10:41:03 × lep quits (~lep@94.31.89.203) (*.net *.split)
10:41:03 × ft quits (~ft@shell.chaostreff-dortmund.de) (*.net *.split)
10:41:03 × janus quits (janus@anubis.0x90.dk) (*.net *.split)
10:41:03 × russruss quits (~russruss@my.russellmcc.com) (*.net *.split)
10:41:03 × tv quits (~tv@user/tv) (*.net *.split)
10:41:03 × robertm quits (~robertm@lattice.rojoma.com) (*.net *.split)
10:41:03 × swistak quits (~swistak@185.21.216.141) (*.net *.split)
10:41:03 × wz1000 quits (~zubin@static.11.113.47.78.clients.your-server.de) (*.net *.split)
10:41:03 × marquis_andras quits (~marquis_a@124.170.163.166) (*.net *.split)
10:41:03 × justGhost quits (~justache@user/justache) (*.net *.split)
10:41:03 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (*.net *.split)
10:41:03 × stvc quits (~stvc@192.241.166.39) (*.net *.split)
10:41:03 × cls quits (~cls@chalk.lubutu.com) (*.net *.split)
10:41:03 × cross_ quits (~cross@spitfire.i.gajendra.net) (*.net *.split)
10:41:03 × skewerr quits (spoonm@inaba.spoonm.org) (*.net *.split)
10:41:03 × drewr quits (~drew@user/drewr) (*.net *.split)
10:41:03 × fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (*.net *.split)
10:41:03 × haskl quits (~haskl@user/haskl) (*.net *.split)
10:41:03 × xstill- quits (xstill@fimu/xstill) (*.net *.split)
10:41:03 × xsarnik quits (xsarnik@lounge.fi.muni.cz) (*.net *.split)
10:41:03 × abrar quits (~abrar@static-108-2-152-54.phlapa.fios.verizon.net) (*.net *.split)
10:41:03 × kmein quits (~weechat@user/kmein) (*.net *.split)
10:41:03 × c_wraith quits (~c_wraith@adjoint.us) (*.net *.split)
10:41:03 × statusfailed quits (~statusfai@statusfailed.com) (*.net *.split)
10:41:03 × canta quits (~canta@user/canta) (*.net *.split)
10:41:03 × dminuoso quits (~dminuoso@user/dminuoso) (*.net *.split)
10:41:03 × juri_ quits (~juri@178.63.35.222) (*.net *.split)
10:41:03 × tolt quits (~weechat-h@li219-154.members.linode.com) (*.net *.split)
10:41:03 × mmaruseacph2 quits (~mihai@198.199.100.72) (*.net *.split)
10:41:03 × meejah quits (~meejah@rutas.meejah.ca) (*.net *.split)
10:41:03 × andjjj23_ quits (~irc@107.170.228.47) (*.net *.split)
10:41:03 × neverwas quits (jpneverwas@swissbox.unperson.link) (*.net *.split)
10:41:03 × n3t quits (n3t@user/n3t) (*.net *.split)
10:41:03 × loonycyborg quits (~loonycybo@wesnoth/developer/loonycyborg) (*.net *.split)
10:41:03 × ByronJohnson quits (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (*.net *.split)
10:41:03 × carter quits (sid14827@helmsley.irccloud.com) (*.net *.split)
10:41:03 × TMA quits (~tma@twin.jikos.cz) (*.net *.split)
10:41:03 × hubvu_ quits (sid495858@tinside.irccloud.com) (*.net *.split)
10:41:03 × jtmar quits (~james@jtmar.me) (*.net *.split)
10:41:03 × kawpuh quits (~kawpuh@66.42.81.80) (*.net *.split)
10:41:06 xstill-8 is now known as xstill-
10:41:09 ft_ is now known as ft
10:41:09 dobblego is now known as dibblego
10:41:26 sektor|2 joins (~kvirc@87.227.175.182)
10:41:57 elkcl joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
10:42:12 xsarnik joins (xsarnik@lounge.fi.muni.cz)
10:44:13 × AlexisTP quits (~AlexisTP@92.57.44.63) (Ping timeout: 256 seconds)
10:44:40 Maxdaman1us is now known as Maxdamantus
10:45:31 × sektor|4 quits (~kvirc@94.155.193.66) (Ping timeout: 250 seconds)
10:46:12 drdo joins (~drdo@roach0.drdo.eu)
10:46:12 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
10:46:12 aforemny joins (~aforemny@static.248.158.34.188.clients.your-server.de)
10:46:12 ishutin joins (~ishutin@193-110-63-21.cable-modem.hdsnet.hu)
10:46:12 bliminse joins (~bliminse@host86-158-241-239.range86-158.btcentralplus.com)
10:46:12 Philonous joins (~Philonous@user/philonous)
10:46:12 shachaf joins (~shachaf@user/shachaf)
10:46:12 maerwald joins (~maerwald@user/maerwald)
10:46:12 red-snail joins (~snail@static.151.210.203.116.clients.your-server.de)
10:46:12 aria joins (sid380617@lymington.irccloud.com)
10:46:12 ncopa joins (~ncopa@alpine/developer/ncopa)
10:46:12 russruss joins (~russruss@my.russellmcc.com)
10:46:12 robertm joins (~robertm@lattice.rojoma.com)
10:46:12 swistak joins (~swistak@185.21.216.141)
10:46:12 wz1000 joins (~zubin@static.11.113.47.78.clients.your-server.de)
10:46:12 justGhost joins (~justache@user/justache)
10:46:12 stvc joins (~stvc@192.241.166.39)
10:46:12 cls joins (~cls@chalk.lubutu.com)
10:46:12 cross_ joins (~cross@spitfire.i.gajendra.net)
10:46:12 skewerr joins (spoonm@inaba.spoonm.org)
10:46:12 haskl joins (~haskl@user/haskl)
10:46:12 kmein joins (~weechat@user/kmein)
10:46:12 c_wraith joins (~c_wraith@adjoint.us)
10:46:12 statusfailed joins (~statusfai@statusfailed.com)
10:46:12 canta joins (~canta@user/canta)
10:46:12 dminuoso joins (~dminuoso@user/dminuoso)
10:46:12 juri_ joins (~juri@178.63.35.222)
10:46:12 tolt joins (~weechat-h@li219-154.members.linode.com)
10:46:12 mmaruseacph2 joins (~mihai@198.199.100.72)
10:46:12 meejah joins (~meejah@rutas.meejah.ca)
10:46:12 andjjj23_ joins (~irc@107.170.228.47)
10:46:12 neverwas joins (jpneverwas@swissbox.unperson.link)
10:46:12 n3t joins (n3t@user/n3t)
10:46:12 loonycyborg joins (~loonycybo@wesnoth/developer/loonycyborg)
10:46:12 ByronJohnson joins (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
10:46:12 carter joins (sid14827@helmsley.irccloud.com)
10:46:12 TMA joins (~tma@twin.jikos.cz)
10:46:12 hubvu_ joins (sid495858@tinside.irccloud.com)
10:46:12 jtmar joins (~james@jtmar.me)
10:46:12 kawpuh joins (~kawpuh@66.42.81.80)
10:46:14 × d34df00d quits (~d34df00d@2600:1700:8c60:3a10::48) (Excess Flood)
10:46:39 sektor|3 joins (~kvirc@94.155.193.66)
10:47:35 lep- is now known as lep
10:47:37 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
10:48:08 tv joins (~tv@user/tv)
10:48:17 Hafydd joins (~Hafydd@user/hafydd)
10:48:28 drewr joins (~drew@user/drewr)
10:48:54 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection)
10:49:07 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
10:49:24 foul_owl joins (~kerry@71.212.133.174)
10:50:05 × sektor|2 quits (~kvirc@87.227.175.182) (Ping timeout: 252 seconds)
10:56:10 jgeerds joins (~jgeerds@55d4a547.access.ecotel.net)
10:58:23 × yauhsien quits (~yauhsien@61-231-45-223.dynamic-ip.hinet.net) (Remote host closed the connection)
10:58:57 yauhsien joins (~yauhsien@61-231-45-223.dynamic-ip.hinet.net)
10:59:01 × yauhsien quits (~yauhsien@61-231-45-223.dynamic-ip.hinet.net) (Remote host closed the connection)
10:59:59 mmhat joins (~mmh@55d4d1e3.access.ecotel.net)
11:00:37 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
11:01:38 <Andrew> (
11:01:45 <Andrew> Er sry, misconfigured client
11:03:29 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
11:04:57 × mvk quits (~mvk@2607:fea8:5cdc:bf00::5483) (Ping timeout: 240 seconds)
11:06:17 pooryori1k is now known as yoric
11:06:20 yoric is now known as pooryorick
11:10:17 × td_ quits (~td@94.134.91.205) (Ping timeout: 256 seconds)
11:11:46 td_ joins (~td@94.134.91.3)
11:12:57 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds)
11:14:40 lavaman joins (~lavaman@98.38.249.169)
11:15:12 chele joins (~chele@user/chele)
11:16:31 × dschrempf quits (~dominik@mobiledyn-62-240-134-109.mrsn.at) (Ping timeout: 250 seconds)
11:19:08 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
11:20:01 × mmhat quits (~mmh@55d4d1e3.access.ecotel.net) (Quit: WeeChat 3.4)
11:22:36 xkuru joins (~xkuru@user/xkuru)
11:25:09 cosimone joins (~user@93-47-228-191.ip115.fastwebnet.it)
11:25:34 jalil joins (~jalil@2a01:e0a:277:4100:4b34:f28b:c1d1:3941)
11:28:53 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
11:31:11 Jing joins (~hedgehog@240e:390:7c53:a7e1:3c97:bf3a:3e4c:7eb2)
11:31:42 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
11:34:42 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
11:36:02 × Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 250 seconds)
11:37:29 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 256 seconds)
11:38:56 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
11:40:21 Guest|10 joins (~Guest|10@138-38-206-67.eduroam.bath.ac.uk)
11:40:48 × Guest|10 quits (~Guest|10@138-38-206-67.eduroam.bath.ac.uk) (Client Quit)
11:47:49 × ubert1 quits (~Thunderbi@2a02:8109:9880:303c:3eb6:2526:d971:8214) (Ping timeout: 240 seconds)
11:51:00 Unhammer joins (~Unhammer@user/unhammer)
11:51:26 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:54:06 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
11:54:27 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
11:56:12 × phma quits (~phma@2001:5b0:211f:d758:6f18:ab28:6bcc:58fd) (Read error: Connection reset by peer)
11:56:15 × Putonlalla quits (~sapekiis@it-cyan.it.jyu.fi) (Quit: Leaving.)
11:57:11 × foul_owl quits (~kerry@71.212.133.174) (Ping timeout: 252 seconds)
11:57:54 phma joins (~phma@host-67-44-209-72.hnremote.net)
11:59:43 <ProfSimm> In Haskell when I define a function for input 0 and then input any int, it'll first match 0. Doesn't this make order of execution significant.
12:00:42 <sshine> ProfSimm, yes
12:00:54 <Franciman> only the order of the definitions matters, yes
12:01:13 Erutuon joins (~Erutuon@user/erutuon)
12:01:15 <ProfSimm> Well the order of the definitions defines the order of matching
12:01:26 <Franciman> yes
12:01:28 <dminuoso> ProfSimm: No, the order of execution is still not specified.
12:01:36 lep parts (~lep@94.31.89.203) ()
12:01:39 <Franciman> oh
12:01:46 <ProfSimm> dminuoso: it's kinda specified semantically.
12:01:47 <dminuoso> ProfSimm: It's rather, it behaves as it if you cant tell the difference
12:01:58 <ProfSimm> Well that's "specified" in my book :)
12:02:08 <Franciman> what book is it, ProfSimm ?
12:02:09 <dminuoso> No, an implementation is still free to say execute other branches in parallel
12:02:45 <Franciman> dminuoso: how is the output determined?
12:03:42 <dminuoso> That's for the implementation left to decide. It's a similar reason why `seq` doesn't have an inherent ordering
12:03:54 DNH joins (~DNH@2a02:8108:1100:16d8:adf2:7fd4:5ba2:8512)
12:04:08 <dminuoso> i.e. (seq x b) does not evaluate x before b, it just ensures x is evaluaetd.
12:04:21 <dminuoso> (GHC brings pseq which gives you that guarantee)
12:04:43 <Franciman> so if i define «f :: Int -> Int» as follows «f 1 = 2; f 2 = 4»
12:04:57 <Franciman> i can't know whether f 2 evaluates to 2 or 4 ?
12:05:01 × xff0x quits (~xff0x@2001:1a81:53bc:500:bc1a:eecf:3ef6:1dbe) (Ping timeout: 240 seconds)
12:05:05 <dminuoso> And in fact the fact that seq doenst impose an ordering is subtly detectable
12:06:06 xff0x joins (~xff0x@2001:1a81:53bc:500:d58f:5284:91ba:f00d)
12:06:09 <dminuoso> Franciman: No rather, if you have `f 1 = <cheap-expr>; f x = <expensive-expr>`, you have no semantic guarantee the implementation wont waste exaluating <expensive-expr> speculatively
12:06:25 <Franciman> ah ok, this is more acceptable
12:06:25 <dminuoso> As long as `f 1` gives you the result of <cheap-expr> back
12:09:13 <dminuoso> The point is really to separate between the semantics of the language and the underlying execution model
12:10:23 <dminuoso> See [3.17.2 Informal Semantics of Pattern Matching](https://www.haskell.org/onlinereport/haskell2010/haskellch3.html)
12:10:41 <dminuoso> And 3.17.3 Formal Semantics of Pattern Matching
12:11:01 <dminuoso> The formal semantics are described just as a list of identity laws
12:11:01 <Profpatsch> conduit question: I have a Conduit x (a, b) m (), and a Conduit b b' m ()
12:11:13 <Profpatsch> Can I only map the second conduit over the second part of the tuple somehow?
12:11:29 <Profpatsch> aka turn it into a Conduit (a, b) (a, b') m () ?
12:13:09 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
12:13:11 <dminuoso> Profpatsch: Mmm, Im tempted to say you cant without a Monoid constraint on a
12:13:58 <dminuoso> Consider what happens if that second conduit awaits some
12:14:12 <dminuoso> Do you discard some of the fst elements? do you mappend them together?
12:14:23 <Profpatsch> dminuoso: okay, was expecting something like that
12:14:40 <Profpatsch> dminuoso: My X to this Y is that I have a stream of Lines, and I want to give each one a line number
12:14:51 <Profpatsch> but then afterwards I do a bunch of things to these lines
12:15:05 <Profpatsch> granted, if I stare hard enough maybe it’s just mapping
12:15:40 <Profpatsch> But yeah, makes intuitive sense that it’s not viable cause every Conduit can produce 0..n elements
12:15:59 <Profpatsch> I feel like I taught myself that when I wrote that code
12:16:01 <Profpatsch> but then forgot again
12:17:26 <dminuoso> Profpatsch: Does the second thing have to be a conduit? Or can it just be a kleisli arrow?
12:17:49 <dminuoso> Profpatsch: And no, its not about the production of elements, its rather about the consumption of them.
12:18:02 <dminuoso> or I guess the production is problematic too
12:18:32 <dminuoso> the conduit could await multiple elements but produce only one, or await one element but produce multiple ones
12:19:22 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
12:20:51 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 250 seconds)
12:21:34 Vq_ is now known as Vq
12:22:49 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
12:23:57 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 256 seconds)
12:24:11 <ProfSimm> Does Haskell have a way to show people "this function overload will never run because a previous one shadows it"
12:24:45 fef joins (~thedawn@user/thedawn)
12:25:16 <dminuoso> ProfSimm: Enable -Wname-shadowing
12:25:20 <dminuoso> Or better yet -Wall -Wcompat
12:25:57 × Ariakenom quits (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
12:27:24 mei joins (~mei@user/mei)
12:27:32 <ProfSimm> Can I read arguments like a stream of arbitrary size.
12:28:04 <ski> ProfSimm : it's not overloading
12:29:28 notzmv joins (~zmv@user/notzmv)
12:29:56 <ski> arguments ?
12:30:50 AlexisTP joins (~AlexisTP@92.57.44.63)
12:32:48 <ProfSimm> ski: sorry?
12:33:11 <ski> i dunno what you mean
12:33:26 <ski> also, all Haskell functions take exactly one argument
12:38:26 × drdo quits (~drdo@roach0.drdo.eu) (Quit: Ping timeout (120 seconds))
12:40:37 × [exa]_ quits (exa@srv3.blesmrt.net) (Ping timeout: 240 seconds)
12:40:47 drdo joins (~drdo@roach0.drdo.eu)
12:41:01 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
12:41:12 [exa] joins (exa@srv3.blesmrt.net)
12:41:31 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
12:43:38 <opqdonut> ProfSimm: there's a warning for unreachable pattern matches
12:44:14 <opqdonut> enabled by -Woverlapping-patterns
12:44:17 <opqdonut> perhaps that's what you mean?
12:44:43 Ariakenom joins (~Ariakenom@2001:9b1:efe:9d00:a4bb:8490:782e:5c48)
12:44:57 Andrew likes having ghc aliased to ghc -Wall
12:45:40 jgeerds_ joins (~jgeerds@55d4a547.access.ecotel.net)
12:46:02 × mikoto-c1 quits (~mikoto-ch@84.199.144.235) (Quit: mikoto-c1)
12:47:06 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
12:47:18 sektor|2 joins (~kvirc@87.227.175.182)
12:48:30 × jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 260 seconds)
12:48:37 × chenqisu1 quits (~chenqisu1@183.217.200.249) (Ping timeout: 240 seconds)
12:48:40 <ProfSimm> opqdonut: yes thanks, is there a reason this is an option
12:48:42 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
12:50:21 × sektor|3 quits (~kvirc@94.155.193.66) (Ping timeout: 256 seconds)
12:50:26 ec joins (~ec@gateway/tor-sasl/ec)
12:50:27 <Profpatsch> dminuoso: yeah, in Conduits pretty much anything can happen
12:50:30 × bliminse quits (~bliminse@host86-158-241-239.range86-158.btcentralplus.com) (Quit: leaving)
12:50:46 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
12:50:54 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
12:54:49 Ariakenom_ joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se)
12:57:34 bliminse joins (~bliminse@host86-158-241-239.range86-158.btcentralplus.com)
12:57:43 <opqdonut> ProfSimm: I guess it's just programming tradition that many useful warnings are disabled by default. As Andrew said, many people like to run with -Wall, i.e. all warnings turned on
12:58:22 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:f0ed:5941:868e:9ada) (Quit: WeeChat 2.8)
12:58:23 <Andrew> Bad traditions, again
12:58:41 × Ariakenom quits (~Ariakenom@2001:9b1:efe:9d00:a4bb:8490:782e:5c48) (Ping timeout: 245 seconds)
12:58:45 <Andrew> Haskell is better in this regards for at least enforcing type problems in compile time.
12:58:54 <opqdonut> I guess Rust has lots of warnings enabled by default? And lots of things like unreachable code are errors instead of warnings?
12:59:17 <Ariakenom_> -Wall also never means all
12:59:24 <ProfSimm> Interesting tradition, to have a language detect problems and you ignore that.
12:59:31 Andrew suddenly notices No manual entry for ghc
12:59:42 <Andrew> Yup
12:59:58 <opqdonut> Ariakenom_: yeah, that too
13:00:41 <Andrew> -Weverything?
13:01:24 <opqdonut> ProfSimm: I guess the real answer here is that 1) you can't make overlapping patterns an error, because that would break backwards compatibility. code that used to compile might not compile any more. 2) you can't turn on the warning by default, because some build systems treat warnings as errors, and again, you might fail somebody's build
13:01:41 × alp quits (~alp@user/alp) (Ping timeout: 256 seconds)
13:01:46 <opqdonut> those are arguably bad reasons, but I think they're the reasons
13:02:03 <Andrew> (BadReason "Break backwards compatibility")
13:02:06 <Andrew> Yeah
13:02:18 <Andrew> It's like keeping old bugs because they'll break compatibility
13:02:31 <Andrew> I like how Python just stays with those issues, but not until the next major breaking release
13:02:40 <ProfSimm> The solution is to compile despite errors :P
13:02:44 <Andrew> Having breaking releases once in a while sounds helpful
13:02:45 <ProfSimm> But always show errors
13:02:54 <Andrew> ProfSimm: Then they're warnings
13:03:13 <Andrew> Or just roll out new standards, and give compilers a flag for each standard
13:03:16 <Andrew> * option, whatever
13:03:17 <ProfSimm> Andrew: "some systems treat warnings as errors"
13:03:39 <Andrew> I like my compiler output to be clean
13:09:53 sektor|3 joins (~kvirc@94.155.193.66)
13:11:40 slack1256 joins (~slack1256@191.126.227.64)
13:11:51 × vysn quits (~vysn@user/vysn) (Quit: WeeChat 3.4)
13:12:22 <ProfSimm> Can I pass the same input to N functions simultaneously.
13:13:42 × sektor|2 quits (~kvirc@87.227.175.182) (Ping timeout: 260 seconds)
13:14:48 <Ariakenom_> you can just map
13:15:22 <sshine> ProfSimm, what do you mean by simultaneously?
13:15:50 × wei2912_ quits (~wei2912@138.75.71.147) (Remote host closed the connection)
13:16:56 <sshine> ProfSimm, f x `par` g x `par` h x?
13:18:14 alp joins (~alp@user/alp)
13:23:00 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:24:06 CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
13:25:03 <Andrew> Map, but feels reversed
13:25:16 <Andrew> ProfSimm: I expect that you want to store the output in a list?
13:30:04 <ProfSimm> Andrew: yeah it's kinda like a reverse map
13:30:13 Graham31415 joins (~Graham314@213.237.82.193)
13:30:29 <Andrew> Yeh, if he's using functions, i expect him to want the output somewhere, probably a list
13:31:22 <ProfSimm> technically like a normal map if we pass to map a function that applies the same arguments
13:35:01 yhsiveht joins (~Nishant@2405:201:f005:c007:51b9:2550:9b70:b031)
13:35:02 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
13:35:37 × thevishy quits (~Nishant@2405:201:f005:c007:6cf1:7245:a05f:ea21) (Ping timeout: 240 seconds)
13:36:42 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
13:36:56 <Ariakenom_> ProfSimm exactly. "map ($argument)" if you wanna be terse
13:38:04 <Graham31415> When using RIO's logger functions, is there a simple way to print out strings intermixed with computed values? e.g. `main = runSimpleApp $ let x = 5 in logInfo $ "Hello, " ++ (show x)` doesn't type check. Getting this to output something seems to require two conversions, e.g. `main = runSimpleApp $ let x = 5 in logInfo $ display $ pack $ "Hello, "
13:38:05 <Graham31415> <> (show x)`. This seems quite tortuous. Am I missing something obvious?
13:39:05 × max22- quits (~maxime@2a01cb0883359800593582f16039b0e0.ipv6.abo.wanadoo.fr) (Ping timeout: 256 seconds)
13:40:50 <lyxia> "Hello, " <> display x with OverloadedStrings
13:41:27 <dminuoso> libffi.so.8 => /nix/store/dpikrpi38md4fyw8aakdcbylywwb0nsc-libffi-3.4.2/lib/libffi.so.8 (0x00007fbbe8d72000)
13:41:37 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
13:41:44 <dminuoso> So I've done a major nixos update, updated cabal and ghc as well. Now this thing appears in my resulting builds
13:41:53 <Ariakenom_> you can also replace show with something that gives you Text from 5
13:41:56 <dminuoso> Where could this come from?
13:42:01 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
13:42:02 <Graham31415> lyxia, oh, that's much nicer. Thanks!
13:43:12 <dminuoso> Oh. GHC always links against libffi
13:43:27 <Ariakenom_> oh that something is display :p
13:44:42 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
13:44:56 <Graham31415> lyxia: follow up Q. How does one identify the specific `<>` being used in this expression? Like, does one hunt down the type of "Hello ", or the type of `display x`? And then hunt through the instances and then look for the `<>` function?
13:45:43 <geekosaur> % :info <>
13:45:44 <yahb> geekosaur: type Semigroup :: * -> Constraint; class Semigroup a where; (<>) :: a -> a -> a; ...; -- Defined in `GHC.Base'; infixr 6 <>
13:46:30 <geekosaur> ghci can do much of that hunting for you,and what it can't hoogle can
13:47:19 <Graham31415> Ok, thanks. I guess I'm just missing the insight to think in albegraic terms here...
13:50:04 <EvanR> <> is one of the operators defined by default so it's good to know
13:50:39 <EvanR> you could say it's in a hypothetical table of "haskell operators" with their relative precedences (which we usually don't see)
13:50:50 <EvanR> (because haskell lets you define whatever operator)
13:51:16 <EvanR> (but there's only a handful available without importing anything so such a table could make sense ish)
13:51:47 <geekosaur> there'seven one in the haskell report
13:52:01 <geekosaur> (for precedences)
13:52:03 <Graham31415> And we can see that "something" composes (via <>) with `display x` because of OverloadedStrings? I would have to know that one of the Display instances matches one of the things that OverloadedStrings works with?
13:52:08 <EvanR> does it have <>? xD
13:52:20 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
13:52:21 <geekosaur> no, <> is post-2010
13:52:43 × cosimone quits (~user@93-47-228-191.ip115.fastwebnet.it) (Remote host closed the connection)
13:54:53 <EvanR> Graham31415, pack makes me think you are dealing with Text
13:55:06 <EvanR> yes OverloadedStrings means "something" is potentially a Text
13:55:16 jakalx joins (~jakalx@base.jakalx.net)
13:55:30 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
13:55:31 cosimone joins (~user@93-47-228-191.ip115.fastwebnet.it)
13:55:47 <EvanR> and <> is the goto way to ++ two Texteses
13:55:47 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
13:56:07 <lyxia> Graham31415: remember that Utf8Builder, like virtually all text-like types, is a monoid
13:56:10 <Graham31415> EvanR I do want to read from files using RIO too, for which I guess I'll be using `readFileUtf8`  and getting `Text` in return.
13:56:11 <akhesacaro> be careful with OverloadedStrings
13:57:12 <lyxia> so the problem naturally breaks down into 'how to convert "Hello "' and 'how to convert x'
13:57:26 × AlexisTP quits (~AlexisTP@92.57.44.63) (Remote host closed the connection)
13:57:54 <geekosaur> akhesacaro, why do you say that? It's no worse than numbers
13:58:50 <Graham31415> right, i get that they need to be converted to some common thing. I'm just too noob to know what my options are.
13:59:51 × fryguybo1 quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Quit: leaving)
14:00:10 <EvanR> Text is not a bad idea if it's already in play and you can't decide
14:00:27 fryguybob joins (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
14:00:58 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
14:01:29 <Graham31415> So, is there only one candiate for converting to common types, such that the compiler can't make the wrong assumption? In ambiguous cases, will the compiler just pick one (out of multiple candidates), or will the compiler bail out and ask for some more type info?
14:01:38 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
14:01:56 <geekosaur> if the compiler can't boil it down to exactly one type, it will report an ambiguous type error
14:02:07 <Graham31415> cool
14:02:12 <geekosaur> there's a defaulting mechanism you can use to help it choose in some cases
14:02:45 <EvanR> cool and also uncool, ambiguous types means valuable programmer attention required xD
14:02:57 <EvanR> but at least it won't do something random like javascript
14:03:54 <geekosaur> that's where defaulting can come in handy
14:04:18 <Graham31415> I'm getting the sense that I'll need to memorise a large part of the ecosystem in order to be even slightly productive. :(
14:05:07 <dminuoso> You dont.
14:05:14 <EvanR> in the sense of memorizing language to speak languages
14:05:22 <cigsender> :q
14:05:32 × cigsender quits (~cigsender@74.124.58.162) (Quit: leaving)
14:05:38 <EvanR> more like picking up enough to figure out where the bathroom is xD
14:06:27 <Andrew> exit
14:07:08 <geekosaur> Graham31415, generally you'll find that things like use of Text will be specified ahead of time; even if you're picking up a random package poff of hackage you can inspect its dependencies
14:07:21 <geekosaur> there's only a few packages where you need to care about things like this
14:09:12 <Graham31415> On a related note: is there a `read` function that operates on Text, or should I accept that the Text needs to be `unpack`ed first?
14:10:19 <EvanR> or do you want a proper parser
14:11:12 <EvanR> another topic that likely "comes up pretty fast and soon"
14:11:38 × noctux quits (~noctux@user/noctux) (Remote host closed the connection)
14:11:46 <Graham31415> i'm just doing dumb stuff for now. Reading some files under /proc/ and summarising some fields.
14:12:05 <EvanR> any reason it requires Text? xD
14:12:15 <EvanR> if it's dumb, might as well be real dumb
14:12:22 slac25096 joins (~slack1256@186.11.3.215)
14:12:43 <EvanR> the String IO functions also work with unicode
14:12:46 <Graham31415> i'm sure it doesn't, but i don't know what the best practices here are, and RIO claims to be best practices
14:12:52 <EvanR> RIO?
14:13:03 × razetime quits (~quassel@49.207.198.36) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:13:10 <Graham31415> https://www.fpcomplete.com/haskell/library/rio/
14:13:31 Putonlalla joins (~sapekiis@it-cyan.it.jyu.fi)
14:13:31 <byorgey> I think RIO is one of the alternative Preludes
14:13:39 <byorgey> https://hackage.haskell.org/package/rio
14:14:38 × slack1256 quits (~slack1256@191.126.227.64) (Ping timeout: 250 seconds)
14:14:39 <byorgey> Graham31415: I don't think there's a version of 'read' that operates on Text, but you can easily define your own readT = read . unpack
14:14:43 <sshine> Graham31415, https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Read.html
14:15:19 <sshine> byorgey, -^
14:16:24 <byorgey> sshine: interesting. That's more limited than 'read', but it looks nice when you need to read some numbers. I didn't know that existed.
14:16:46 <sshine> on the other hand, there isn't a tshow :: Show a => a -> Text besides 'pack . show'
14:17:42 <EvanR> I'm not sure I'd file any alt prelude under best practices, except maybe when "best practice" is some reality distortion speak from higher up
14:18:52 noctux joins (~noctux@user/noctux)
14:19:06 <sshine> I guess if there were an alternative prelude that was definitely a best practice, it'd substitute Prelude. :)
14:19:57 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
14:19:57 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
14:19:57 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
14:19:57 wroathe joins (~wroathe@user/wroathe)
14:20:09 vglfr joins (~vglfr@coupling.penchant.volia.net)
14:20:48 <sshine> Graham31415, when you make an open-source library, depending on RIO can be pretty heavy because what if they use another alternative prelude? then depending on your tiny library suddenly results in two alternative preludes plus all of their transitive dependencies.
14:21:38 <sshine> Graham31415, when you make an app, then you can factor out all the stuff you might like to include in other apps into lightweight libraries, and for your app, since you don't expect that it'll become a library in itself, it can depend on something heavy that makes you happy, e.g. better defaults.
14:21:40 <lyxia> or you can not care and let it be other's people's problem
14:21:49 <EvanR> it's fine if you're dr strange and used to patching together multiverses while trying to get work done
14:22:19 <Graham31415> those are some nice points
14:22:48 <sshine> Graham31415, incidentally, people promoting RIO are app developers.
14:22:56 <Graham31415> sure
14:23:33 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
14:23:35 × jalil quits (~jalil@2a01:e0a:277:4100:4b34:f28b:c1d1:3941) (Quit: jalil)
14:23:43 jalil joins (~jalil@2a01:e0a:277:4100:f726:20ac:8c7a:b279)
14:23:45 <Graham31415> i'm learning Haskell as an intellectual curiousity, not as a CS researcher nor as an app developer
14:24:12 <Ariakenom_> haskell is a great curiosity
14:24:21 <Graham31415> But I'd rather start by learning a consistent subset of the ecosystem.
14:24:30 <lyxia> it definitely kills cats
14:24:45 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
14:24:46 <EvanR> the normal prelude is consistent
14:25:08 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
14:25:17 <Graham31415> Ok, no problem. You've convinced me to use the base Prelude.
14:25:32 <Graham31415> (at least until I understand the trade offs)
14:25:51 <EvanR> or not, you can surely parse /proc files however you want
14:26:20 <Graham31415> Yeah, I could use a shell script and I'd have been done in 90 seconds.
14:27:44 <EvanR> ah yes, a stringly typed language xD
14:30:16 <EvanR> see also shelly for haskell shell stuff
14:30:25 × Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
14:30:43 Pickchea joins (~private@user/pickchea)
14:30:43 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Read error: Connection reset by peer)
14:31:48 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
14:32:20 max22- joins (~maxime@2a01cb08833598000823846d04004043.ipv6.abo.wanadoo.fr)
14:35:52 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Ping timeout: 250 seconds)
14:37:01 × nschoe_ quits (~quassel@178.251.84.79) (Ping timeout: 240 seconds)
14:38:35 × cosimone quits (~user@93-47-228-191.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
14:38:37 cfricke joins (~cfricke@user/cfricke)
14:39:46 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
14:39:47 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
14:39:52 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
14:39:53 <geekosaur> /proc is more or less designed for shell script parsing
14:40:07 <geekosaur> or perl/python/etc.
14:40:09 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
14:40:33 Ranhir joins (~Ranhir@157.97.53.139)
14:48:42 nschoe joins (~quassel@178.251.84.79)
14:49:32 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
14:51:28 × zer0bitz quits (~zer0bitz@2001:2003:f74d:b800:3c9b:6dce:e374:3130) (Read error: Connection reset by peer)
14:51:39 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
14:51:51 Sgeo joins (~Sgeo@user/sgeo)
14:51:52 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
14:53:14 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
14:55:42 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
14:55:42 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
14:55:42 wroathe joins (~wroathe@user/wroathe)
14:56:05 slack1256 joins (~slack1256@191.125.227.88)
14:57:37 mikoto-chan joins (~mikoto-ch@213.177.151.239)
14:58:05 × slac25096 quits (~slack1256@186.11.3.215) (Ping timeout: 256 seconds)
14:58:25 janus__ is now known as janus
14:59:17 shriekingnoise joins (~shrieking@201.231.16.156)
15:00:28 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
15:00:39 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
15:00:43 yauhsien_ joins (~yauhsien@61-231-45-223.dynamic-ip.hinet.net)
15:00:46 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
15:02:23 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41)
15:03:30 <anon66200164> I need to write a function that gives the sum of cubes of 1, 2,...n but I'm having trouble thinking about how to do this recursively here is what I've got so far https://paste.tomsmeding.com/GskJKzVU any help would be appreciated
15:04:57 × yauhsien_ quits (~yauhsien@61-231-45-223.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
15:05:21 <ski> can you express `cubed 3' in terms of `cubed 2' ?
15:06:34 <geekosaur> they basically show you in the "self-similarity" section
15:06:37 cross_ is now known as cross
15:06:44 <anon66200164> n*n*n + (n-1)^3
15:07:25 <anon66200164> I wrote the self similiarity part, I was just following what my lecturer was saying, divide and conquer approach
15:08:22 <anon66200164> this perhaps cubes n>0 = (n*n*n) + cubes(n-1)
15:09:37 <ski> that has a syntax error
15:10:10 <EvanR> otoh the idea seems semi solid
15:12:52 <janus> anon66200164: do you know how to fix the syntax?
15:12:58 <anon66200164> so I tried this https://paste.tomsmeding.com/sQXju3NR and got *** Exception: stack overflow
15:13:10 <anon66200164> janus: nope
15:13:33 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
15:13:39 <ski> what is the purpose of the `cubes n>0' there ?
15:14:03 <janus> the guard will be evaluated unconditionally. and the guard recurses...
15:14:06 <anon66200164> so that when the base case is reached it stays above 1
15:14:32 <ski> btw, note that `cubes n>0' is parsed as `(cubes n)>0'
15:14:47 <anon66200164> oh
15:14:47 <janus> % :info (>)
15:14:48 <yahb> janus: type Ord :: * -> Constraint; class Eq a => Ord a where; ...; (>) :: a -> a -> Bool; ...; -- Defined in `GHC.Classes'; infix 4 >
15:14:55 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
15:15:19 <ski> so, you have a recursive call to `cubes', with the same parameter, `n', and then you're checking if the result of this is positive
15:16:19 <ski> janus : well, conditionally, namely if the actual parameter doesn't match `1' ..
15:18:12 <anon66200164> oh wait
15:18:54 <anon66200164> | n>0 = n*n*n ... and n>0 is the condition
15:19:35 <ski> hm ?
15:19:50 <janus> i think it seems sensible to remove the recursion from the guard
15:20:08 vysn joins (~vysn@user/vysn)
15:20:46 <anon66200164> https://paste.tomsmeding.com/bOjUcPAj
15:21:02 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
15:21:14 <anon66200164> cubes (n>0) didn't return a Bool right?
15:21:37 <ski> `cubes n>0' is a `Bool', though
15:21:50 <ski> `cubes (n>0)' is a type error
15:22:19 <anon66200164> I don't think I understand the type error
15:23:07 <ski> `n' is an `Integer'. `n>0' is a `Bool'. so, `cubes (n>0)' tries to pass a `Bool' as argument to `cubes'. but `cubes' accepts an `Integer' as input, not a `Bool'
15:23:41 <EvanR> my god it's full of quotes xD
15:23:44 slac40329 joins (~slack1256@186.11.3.215)
15:23:54 <anon66200164> ohhh
15:23:59 <anon66200164> I see it I think
15:24:06 <ski> @remember EvanR my god it's full of quotes xD
15:24:06 <lambdabot> Done.
15:24:11 <ski> there, i quoted you :)
15:24:47 <anon66200164> cubes (n-1) is where the type error occurs?
15:24:52 <EvanR> when lambdabot is assimilated into the metaverse that'll come back to haunt me
15:25:03 <ski> anon66200164 : no. that one is fine. no type error there
15:26:25 justsomeguy joins (~justsomeg@user/justsomeguy)
15:26:25 <ski> anon66200164 : anyway, your last paste (which i missed at first) doesn't have any type error
15:26:33 × slack1256 quits (~slack1256@191.125.227.88) (Ping timeout: 268 seconds)
15:27:09 <anon66200164> I need to find more recursion problems to practice
15:27:19 <ski> anon66200164 : btw, why test for `n>0', when you have `1' as base case ?
15:27:38 <ski> (also, one pair of brackets in that code is redundant)
15:27:56 <anon66200164> n*n*n?
15:27:58 <ski> (and you could write `n^3', if you wanted to)
15:27:59 <ski> yes
15:28:07 <anon66200164> fair point
15:28:46 <anon66200164> won't 1 be the lowest if n>0?
15:28:58 <anon66200164> so that will meet my base case
15:29:32 <ski> `n>0' is only tested if the base case match, i.e. matching the argument against `1', *fails*
15:29:53 <ski> there's no need for the base case to overlap with the recursive case
15:32:03 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
15:32:14 <anon66200164> should the base case be 0?
15:32:35 <ski> is `cubes 0' sensible ? if it is, what should its value be ?
15:32:51 <anon66200164> 0
15:32:55 <anon66200164> cubes 0 = 0
15:33:36 <ski> if you have that as base case, will the value of `cubes n' for `n' greater than `0' keep the same as before ?
15:33:57 <EvanR> just an idea, way back at the beginning of this task, you could have written a short table of what the answers should be for each input 0, 1, 2, 3... just to check against
15:34:12 <EvanR> a golden table sort of
15:34:18 <anon66200164> https://paste.tomsmeding.com/LkfYYZZd
15:34:19 <ski> they already did (except for `0')
15:34:25 <EvanR> ah, then put zero xD
15:34:41 <EvanR> join the first millenium
15:34:52 <EvanR> millennium
15:35:00 <EvanR> mmillenniumm
15:35:09 <anon66200164> where the base case is zero, it still works
15:35:13 <ski> good
15:35:27 <anon66200164> I'm a bit slow, sorry
15:35:55 jao joins (~jao@static-68-235-44-24.cust.tzulo.com)
15:35:57 <anon66200164> A programme that goes through and shows each step of the evaluation would be useful i.e. =>
15:36:11 <ski> (it is also possible to sensibly extend this to work for negative integers .. but unless you wish to try thinking about that, this is probably a good place to decide you're satisfied with `cubes')
15:36:23 <ski> well, you can easily do that, by hand
15:36:40 <ski> cubes 4
15:36:57 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds)
15:36:58 <ski> = 4*4*4 + cubes (4-1)
15:37:02 <ski> = 4*4*4 + cubes 3
15:37:10 <ski> = 4*4*4 + 3*3*3 + cubes (3-1)
15:37:13 <ski> = 4*4*4 + 3*3*3 + cubes 2
15:37:13 <anon66200164> a different task but the evaluation I typed by hand https://paste.tomsmeding.com/HfTHWBmi
15:37:23 <ski> = 4*4*4 + 3*3*3 + 2*2*2 + cubes (2-1)
15:37:28 <ski> = 4*4*4 + 3*3*3 + 2*2*2 + cubes 1
15:37:36 <ski> = 4*4*4 + 3*3*3 + 2*2*2 + 1*1*1 + cubes (1-1)
15:37:39 <ski> = 4*4*4 + 3*3*3 + 2*2*2 + 1*1*1 + cubes 0
15:37:41 <ski> = 4*4*4 + 3*3*3 + 2*2*2 + 1*1*1 + 0
15:37:51 <ski> .. and then you start performing multiplications and additions ..
15:38:08 <anon66200164> yup
15:38:35 <anon66200164> ski: that helps me see it happening if that makes sense
15:39:03 <ski> yes .. when starting out with recursion, hand-tracing through a couple of examples like this can help
15:39:23 <ski> (after a while, you start to get a feel for this, and need to see a trace less)
15:39:58 waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se)
15:40:29 ski would suggest writing `=' (equals, is equal to), rather than (`=>', presumably reduces/simplifies (to))
15:41:09 <anon66200164> ok, I only got half the solution
15:41:24 <ski> (hm, and your evaluation/reduction trace is somewhat confusingly written, in that paste)
15:41:25 × slac40329 quits (~slack1256@186.11.3.215) (Ping timeout: 240 seconds)
15:41:26 × phma quits (~phma@host-67-44-209-72.hnremote.net) (Read error: Connection reset by peer)
15:41:39 <ski> half ?
15:41:44 <anon66200164> yh it's a bit rough
15:42:00 <anon66200164> ski: negative integers going towards zero
15:42:10 <ski> ah, right, the negatives
15:42:21 <anon66200164> | otherwise = n^3 + cubes (n+1)
15:42:52 <ski> what should `cubes (-1)' be ?
15:43:10 <anon66200164> cubes 0 = 0
15:43:28 <anon66200164> oh
15:43:30 <anon66200164> umm
15:43:45 <anon66200164> -1
15:43:47 × jao quits (~jao@static-68-235-44-24.cust.tzulo.com) (Remote host closed the connection)
15:43:50 <ski> no
15:44:01 <anon66200164> f
15:44:03 <ski> what should `cubes n - cubes (n-1)' be ?
15:45:03 <anon66200164> for n = ??
15:45:09 <ski> for any `n'
15:45:51 lavaman joins (~lavaman@98.38.249.169)
15:45:59 <ski> what is the addition from `cubes 2' to `cubes 3' ?
15:46:03 <ski> what is the addition from `cubes 1' to `cubes 2' ?
15:46:07 <ski> what is the addition from `cubes 0' to `cubes 1' ?
15:46:42 <anon66200164> n=2: = (2)^3 + cubes 1, = 8 + 1
15:47:03 <anon66200164> ski: I'm sorry, I don't understand
15:47:25 <ski> well, you answered one of those three questions. can you answer the other two ?
15:47:49 <ski> well .. ok
15:47:56 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:47:57 <anon66200164> I'm just typing it out
15:48:04 <ski> the answer was actually not right
15:48:11 lavaman joins (~lavaman@98.38.249.169)
15:48:18 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:48:32 lavaman joins (~lavaman@98.38.249.169)
15:48:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:48:54 lavaman joins (~lavaman@98.38.249.169)
15:48:57 <anon66200164> n=3: = 3^3 + cubes 2, = 9 + 2^3 + cubes 1, = 27 + 8 + 1, =36
15:49:02 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:49:16 lavaman joins (~lavaman@98.38.249.169)
15:49:17 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 250 seconds)
15:49:19 <ski> yes, that's the first question
15:49:20 <anon66200164> n=0, fail
15:49:23 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:49:38 lavaman joins (~lavaman@98.38.249.169)
15:49:39 <anon66200164> n=0, = 0
15:49:39 <ski> cubes 3 = 3^3 + cubes 2
15:49:43 <ski> so
15:49:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:49:53 <ski> cubes 3 - cubes 2 = 3^3
15:49:59 lavaman joins (~lavaman@98.38.249.169)
15:50:04 <ski> next question is :
15:50:06 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:50:08 × Graham31415 quits (~Graham314@213.237.82.193) (Quit: Client closed)
15:50:12 <ski> cubes 2 = 2^3 + cubes 1
15:50:13 <ski> so
15:50:21 lavaman joins (~lavaman@98.38.249.169)
15:50:27 <ski> cubes 2 - cubes 1 = 2^3
15:50:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:50:42 lavaman joins (~lavaman@98.38.249.169)
15:50:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:50:56 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds)
15:51:05 lavaman joins (~lavaman@98.38.249.169)
15:51:12 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:51:13 ChanServ sets mode +o geekosaur
15:51:19 ChanServ sets mode +q lavaman!~lavaman@98.38.249.169$##fix-your-connection
15:51:28 lavaman joins (~lavaman@98.38.249.169)
15:51:36 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:51:44 <geekosaur> I think you wanted ban, not quiet
15:51:50 lavaman joins (~lavaman@98.38.249.169)
15:51:57 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:52:05 xdej_ is now known as xdej
15:52:13 lavaman joins (~lavaman@98.38.249.169)
15:52:15 geekosaur sets mode +b lavaman!~lavaman@98.38.249.169$##fix-your-connection
15:52:20 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:52:24 ChanServ sets mode -q lavaman!~lavaman@98.38.249.169$##fix-your-connection
15:52:45 geekosaur sets mode -o geekosaur
15:52:46 <ski> mm, better. ty
15:53:02 × zeenk quits (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Quit: Konversation terminated!)
15:53:23 <ski> anon66200164 : anyway, last of those three questions :
15:53:32 <ski> cubes 1 = 1^3 + cubes 0
15:53:34 <ski> so
15:53:45 <ski> cubes 1 - cubes 0 = 1^3
15:53:58 <ski> anon66200164 : do you follow that ?
15:54:04 <anon66200164> Yes
15:54:10 <ski> so, to summarize :
15:54:10 <anon66200164> one question though
15:54:19 <ski> yes ?
15:54:37 <anon66200164> cubes 0 = 0 but n>0 is false
15:54:49 <ski> what about it ?
15:55:08 <janus> you had two heads
15:55:10 <anon66200164> what does it evaluate to when it's false if I don't have an otherwise case
15:55:21 <anon66200164> janus: I barely have 1 head
15:56:19 <ski> anon66200164 : in that case, you'll get a failure to compute an answer. your function will be undefined in that case. a partial function
15:56:39 <ski> anyway :
15:56:45 <ski> cubes 3 - cubes 2 = 3^3
15:56:46 <ski> cubes 2 - cubes 1 = 2^3
15:56:51 <ski> cubes 1 - cubes 0 = 1^3
15:57:06 <ski> so .. what is `cubes n - cubes (n-1)' ?
15:57:47 <janus> in this paste there are two lines that have 'cubes ... = ...'. are those not heads? https://paste.tomsmeding.com/bOjUcPAj or have i messed up the terminology?
15:58:20 <ski> nothing wrong with having two defining equations like that, janus
15:58:50 <geekosaur> it's shorthand for having one definition that immediately does a case
15:58:53 <janus> ski: but the 'cubes ...' part, is that not a 'function head'?
15:58:54 <anon66200164> ski: I don't know :(
15:58:55 <geekosaur> likewise with guards
15:59:04 <anon66200164> fml!!!!!
15:59:11 × vysn quits (~vysn@user/vysn) (Ping timeout: 252 seconds)
15:59:19 <janus> what what would you call it? left hand sides?
15:59:53 <ski> janus : i'd probably call them "definienda" .. but i guess "function head" is also okay. or left-hand side
16:00:21 <janus> i was just surprised because searching for 'function head' gives me completely misleading results
16:00:37 <janus> dunno where to find a good reference for this
16:00:58 jao joins (~jao@211.68.17.95.dynamic.jazztel.es)
16:01:04 <ski> ("definienda" being plural of "definiendum", "that which is/was to be defined". "definiens" (plural "definientia", or "body", or right-hand side, being "that which it is defined as / to be")
16:01:12 <ski> anon66200164 : "fml" ?
16:02:01 <janus> it means 'somebody have intercourse with my life'. it's bad language
16:02:18 <anon66200164> https://www.merriam-webster.com/words-at-play/what-does-fml-mean as in, I don't understand and am to stupid to answer the question
16:02:19 <ski> oh
16:02:41 <ski> anon66200164 : can you spot the pattern, in those three equalities, just above ?
16:02:44 geekosaur looks at the pattern and gets the answer
16:02:48 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293)
16:02:56 <anon66200164> 0^0
16:02:59 <anon66200164> 0^3
16:03:28 <janus> > 0^0
16:03:30 <lambdabot> 1
16:03:35 <polyphem> anon66200164: for "any" n
16:03:46 <ski> let's take it one step at a time
16:03:49 <anon66200164> n^£
16:03:56 <anon66200164> n^3
16:04:22 <ski> yes, `cubes n - cubes (n-1) = n^3' does look like a sensible extrapolation from those three cases
16:04:35 <anon66200164> cubes n - cubes (n-1) =n^3
16:04:44 <ski> for `n = 3', or `n = 2', or `n = 1', it does specialize to those three equalities
16:05:21 <ski> now, this equality is only known to hold for positive values of `n' (because `cubes n' is not defined for negative `n', yet)
16:06:19 <ski> however, when given a choice of how to define `cubes n', for negative `n', it does make sense to let `cubes n - cubes (n-1)' keep being `n^3', just as it was for positive `n', wouldn't you say ?
16:06:43 <ski> (as opposed to `cubes n - cubes (n-1)' suddenly being something else than `n^3', for non-positive `n')
16:07:21 <anon66200164> I think I get it
16:07:21 ChanServ sets mode +o litharge
16:07:22 litharge sets mode -bo lavaman!~lavaman@98.38.249.169$##fix-your-connection litharge
16:07:24 <ski> this suggests that the sensible thing to try, is to insist that `cubes n - cubes (n-1) = n^3' is true for all integers `n', not just the positive integers `n'
16:07:50 <ski> and then, if we accept this, we can use this to our advantage, to figure out what `cubes (-1)' ought to be !
16:07:51 <EvanR> lavaman gets an assist from rockman
16:08:06 <ski> (and `cubes (-2)' and `cubes (-3)' and so on ..)
16:08:31 <ski> anon66200164 : so .. each time, as you go "backwards", you subtract a cube
16:10:20 <anon66200164> Yeah
16:10:36 <anon66200164> I think I understand, I just need some time to process it
16:10:51 <ski> yea, there's no hurry
16:11:01 <anon66200164> I'm saving a screen shot of this convo, I hope that's alright
16:11:13 <ski> should be fine
16:11:30 × jgeerds_ quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 260 seconds)
16:11:32 <ski> (or you could perhaps copy the text to a text file)
16:12:06 Batzy joins (~quassel@user/batzy)
16:12:09 nsilv-phone joins (~nsilv-pho@37.160.46.122)
16:12:18 <Batzy> hi everyone i have a quick question
16:12:18 <janus> anon66200164: look, you're on tv: https://ircbrowse.tomsmeding.com/browse/lchaskell?events_page=4262
16:12:44 × nsilv-phone quits (~nsilv-pho@37.160.46.122) (Client Quit)
16:13:01 <janus> Batzy: please ask your quick question
16:13:02 <Batzy> im wondering if i should choose haskell for a project i am working on. but i want to know if haskell has a library to deal with matrices and also to do things like modular matrix multiplication and inverses etc
16:14:03 <janus> @package hmatrix
16:14:03 <lambdabot> https://hackage.haskell.org/package/hmatrix
16:14:33 <Batzy> janus: not to beat a dead horse, but it can do modular matrix arithmetic you say?
16:15:25 <janus> Batzy: looks like yes: https://hackage.haskell.org/package/hmatrix-0.20.2/docs/Numeric-LinearAlgebra-Data.html#t:Mod
16:15:33 <Batzy> thanks guys
16:15:51 <Batzy> im wondering if haskell can do what i need to do faster than "functional python'
16:16:07 <janus> Batzy: that Mod can then be used as a Numeric: https://hackage.haskell.org/package/hmatrix-0.20.2/docs/Numeric-LinearAlgebra.html#t:Numeric
16:16:08 <Batzy> i did what im trying to do in a very OOP way, and it's clearly introducing some slowness
16:16:13 jackson99 joins (~bc8147f2@cerf.good1.com)
16:16:39 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
16:16:46 <Batzy> janus: essentially i am recusrively generating matrix products like XXYYXXXY
16:16:52 <Batzy> recursively*
16:16:59 <Batzy> i tried doing this in a tree structure in python
16:17:00 × dajoer quits (~david@user/gvx) (Quit: leaving)
16:17:10 <janus> but to get the inverse you'd need it to be a Field...
16:17:17 <Batzy> it works fine, but takesl ike 4 hours when sage takes 8 minutes
16:18:29 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
16:18:43 <janus> well now you're asking about python ;) i think you need to use these linear algebra libraries to get really good performance
16:18:57 <Batzy> yes in python i was using numpy and sympy
16:18:59 <janus> as you can see from the hackage page, hmatrix can link with OpenBLAS
16:19:11 <Batzy> openblas doesnt do modular arithmetic i am pretty sure
16:19:41 <janus> i don't know the details of this, so i will stop talking now :O
16:19:59 <Batzy> yeah my first idea was to use somethign that linked to openblas
16:20:16 <Batzy> but i couldnt find anything about openblas supporting modular multiplications and stuff
16:20:40 <Batzy> i think i know someone who would know actually
16:22:32 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Ping timeout: 240 seconds)
16:23:07 <Batzy> janus: thanks
16:23:13 lavaman joins (~lavaman@98.38.249.169)
16:23:24 <anon66200164> would it be possible to solve this using recursion? sumPairs [] = 0 -- e.g. sumPairs [(1,2), (3,4)] =10
16:24:03 <anon66200164> janus: I am not famous anymore
16:24:06 <ski> anon66200164 : yes
16:25:30 × xff0x quits (~xff0x@2001:1a81:53bc:500:d58f:5284:91ba:f00d) (Ping timeout: 250 seconds)
16:25:36 <jackson99> anon you can also solve it with sum + map
16:25:50 <anon66200164> I only have basic tools atm
16:26:01 <janus> jackson99: prelude sum won't work on pairs
16:26:02 <anon66200164> sumPair(x:xs) maybe
16:26:19 <anon66200164> sumPairs :: [(Integer, Integer)] -> Integer
16:26:24 <jackson99> janus, which is why you'd use map first
16:26:45 <ski> anon66200164 : it would follow the basic same pattern as `myLength'
16:27:44 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
16:27:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
16:28:07 ski idly wonders whether anon66200164 decided to set `cubes n', for negative `n', aside, atm
16:28:20 <jackson99> > (sum . map (uncurry (+))) [(1,2), (3,4)]
16:28:22 <lambdabot> 10
16:29:33 <anon66200164> sumPairs :: [(Integer] -> Integer sumPairs [] = 0 sumPair (x:y:zs) = (x+y) + sumPairs zs
16:29:41 <anon66200164> but I get a parse error
16:30:05 <janus> unmatched paren in '[(Integer]'
16:30:40 <jackson99> x:y:zs would typecheck if you had a list of numbers, but you have a list of tuples that contain numbers
16:30:46 <c_wraith> also, that type seems wrong. as it stands, it's "sum of an even-length list", not a sum of pairs
16:32:14 <ski> s/tuples/pairs/, to be specific
16:32:39 × yhsiveht quits (~Nishant@2405:201:f005:c007:51b9:2550:9b70:b031) (Quit: Leaving)
16:33:06 <anon66200164> how would I use tuples here?
16:33:16 <anon66200164> I haven't come across them yet
16:33:19 <ski> > (1,2) -- this is a pair
16:33:20 <lambdabot> (1,2)
16:33:46 <ski> > let swapPair (x,y) = (y,x) in swapPair (1,2)
16:33:48 <lambdabot> (2,1)
16:34:59 × Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds)
16:35:00 <janus> a pair is a tuple with two elements. your exercise involves pairs, but because pairs are tuples, it also involves tuples.
16:35:19 <ski> > (1,2) : [(2,3),(3,4)] -- this is a list of pairs
16:35:20 <lambdabot> [(1,2),(2,3),(3,4)]
16:35:53 xff0x joins (~xff0x@2001:1a81:53bc:500:d58f:5284:91ba:f00d)
16:37:30 <anon66200164> *** Exception: assessment.hs:7:1-15: Non-exhaustive patterns in function sumPairs?
16:37:41 <ski> <c_wraith> also, that type seems wrong. as it stands, it's "sum of an even-length list", not a sum of pairs
16:38:11 <ski> perhaps show your code ?
16:39:22 <anon66200164> https://paste.tomsmeding.com/Wo7W9hCO
16:39:47 <ski> yes, c_wraith's comment is relevant here
16:40:12 <ski> also, you've defined two functions, `sumPair' and `sumPairs' .. did you intend to only define one ?
16:41:34 <ski> (also, it's possible best here to not ask the implementation for what it thinks the type signature should be, but rather for you yourself to spell out what you think the type signature should be. if you want to, after your definition works, you could remove (or comment out) the type signature, and ask for what the implementation infers it could be)
16:42:58 <anon66200164> I will be back soon, I need to go to a seminar
16:43:28 <anon66200164> I'll keep this window open, hopefully it doesn't close
16:43:34 ski glances around nervously
16:43:48 <janus> anon66200164: save this link: https://ircbrowse.tomsmeding.com/browse/lchaskell?events_page=4263
16:44:10 <anon66200164> janus: saved
16:45:26 <jackson99> it is a bit annoying having to temporarily add Show a constraint in entire call chain when using Debug.traceShow, but I suppose there's no way around it?
16:46:57 × nschoe quits (~quassel@178.251.84.79) (Ping timeout: 240 seconds)
16:47:49 <monochrom> w00t it's Haskell Weekly News day again!
16:49:10 shapr dances cheerfully
16:49:34 <Hecate> jackson99: I don't think so, no
16:49:42 <Hecate> maybe with Heap inspection? :p
16:49:59 <shapr> experience report: haskell-language-server 1.6.1 no longer crashes on the work codebase with its 639126 lines of Haskell (counting non-blank lines only).
16:50:02 <shapr> I can code much faster!
16:50:05 ski misread "Compiler Engineer at Mercury" as "Compiler Engineer for Mercury"
16:50:32 <janus> couldn't you make a Debug typeclass that would normally contain no methods. but when debugging, you'd make it such that it requires Show
16:50:49 <janus> then you'd only have to change two places instead of the whole call chain
16:50:51 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Ping timeout: 256 seconds)
16:51:35 <ski> you'd still need to add `Debug' wherever you might want to debug
16:51:48 <ski> i guess you could as well use CPP ?
16:52:26 <janus> right, you'd add Debug everywhere ;) but haskell wouldn't need to actually pass a dictionary if there are no methods, right
16:53:28 <janus> CPP to hide/add Show constraints on the whole call chain would be more verbose than a permanent Debug constraint
16:54:15 <ski> i dunno if GHC would optimize away an empty instance dictionary
16:55:04 <Franciman> one thing i'd like to think about more is comments attached to syntax
16:55:11 <Franciman> you can use then to add debug messages that don't clutter your code
16:55:17 <Franciman> so you don't have to clutter code with Debug.trace
16:55:42 <Franciman> but you can just add and remove special comments, which usually also look visually different thanks to syntax coloring
16:55:49 <Franciman> and you can disable them all at once if you wish
16:55:55 <ski> is that like attributes, like they have in some languages ?
16:56:03 <Franciman> yes, a limited form
16:57:12 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
16:57:19 <Franciman> one usually looks for the line at which code is written, so you can attach comments to the next line of program. But is this still useful for a functional, declarative language?
16:57:25 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
16:58:16 <oak-> I'm trying to use servant-client in frontend with GHCJS. Any suggestions which library I should use? servant-client-ghcjs isn't available in Hackage for some reason, but I'm not sure is that the way to go
16:58:21 <EvanR> jackson99, at least when the thing being showed is monomorphic you don't need a constraint. Where it gets real ugly is HasCallStack xD
16:58:36 <EvanR> then there's no way around it
16:58:41 <Hecate> oak-: you're stuck on an older version of GHC if you go the GHCJS road
16:58:49 <Hecate> did you try generating Axios bindings first?
16:58:51 lavaman joins (~lavaman@98.38.249.169)
17:01:09 <oak-> Are you saying using GHCJS altogether for creating web frontend (I planned using Reflex-DOM) would be the "GHCJS road"? Or just using the servant-client-ghcjs? :P
17:01:53 <oak-> I planned on using Reflex-Dom, but I could of course consider another options as well
17:02:15 mvk joins (~mvk@2607:fea8:5cdc:bf00::f276)
17:03:32 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
17:04:04 justsomeguy joins (~justsomeg@user/justsomeguy)
17:04:13 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
17:04:16 <vaibhavsagar[m]> oak: I don't believe there's a GHCJS 9.0 or 9.2
17:05:02 <janus> but servant-client works for 8.10
17:05:57 × shailangsa quits (~shailangs@host217-39-45-199.range217-39.btcentralplus.com) (Remote host closed the connection)
17:06:18 <vaibhavsagar[m]> I remember having issues when I tried to use `servant-client-ghcjs`, and back in the day I helped with https://github.com/haskell-servant/servant-jsaddle which was our solution to this problem
17:06:19 <oak-> I don't have problem using GHCJS 8.10.7, but I'm wondering which package provides the servant-client functionality, should I use servant-client-ghcjs?
17:06:26 <vaibhavsagar[m]> (we also used reflex-dom)
17:09:52 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Quit: WeeChat 3.4)
17:10:09 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
17:15:33 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
17:16:32 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
17:17:31 polyphem_ joins (~rod@2a02:810d:840:8754:f9b2:95ef:efe9:3c0f)
17:19:31 × polyphem quits (~rod@2a02:810d:840:8754:e075:74dd:6e37:209d) (Ping timeout: 245 seconds)
17:20:35 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
17:21:23 × alp quits (~alp@user/alp) (Ping timeout: 250 seconds)
17:25:32 × mbuf quits (~Shakthi@110.225.224.158) (Quit: Leaving)
17:31:02 × Jing quits (~hedgehog@240e:390:7c53:a7e1:3c97:bf3a:3e4c:7eb2) (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:32:18 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Remote host closed the connection)
17:32:40 alp joins (~alp@user/alp)
17:32:51 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
17:34:03 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
17:35:06 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:35:06 <Batzy> janus: now for a slightly more annoying question. If im recursively generating matrix products for say 4 matrices and doing operations like A*B*C*D*D*D*D*D, would you expect haskell with hmatrix to be able to do it much faster than python with numpy?
17:35:34 <Batzy> i need to recursively generate matrix products of a certain length (call it n)
17:36:05 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
17:36:17 <Batzy> i dont know haskell so i just want to see if it'll even be worth it to learn to do this or if the speed is probably comparable
17:36:40 Everything joins (~Everythin@37.115.210.35)
17:37:10 <EvanR> haskell is cool but it's not exactly a numerics crunching environment. On hmatrix, aiui it's an FFI binding to BLAS
17:37:47 <Batzy> EvanR: what do you classify as a numerics crunching environment
17:37:49 lavaman joins (~lavaman@98.38.249.169)
17:38:03 phma joins (~phma@host-67-44-209-72.hnremote.net)
17:38:19 <EvanR> fortran, matlab, julia, stuff like that
17:38:51 <EvanR> if python is number crunching I guess there's hope for us
17:39:08 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
17:40:24 econo joins (uid147250@user/econo)
17:42:10 <Batzy> EvanR: the thing is i want a recursive tree structure too. The issue is i actually made these trees in python and it was sloooooooooooooooooooooooooooooooooooooooooooooow
17:42:18 <Batzy> i guess julia and so on can do that
17:42:24 <Batzy> and still be faster
17:42:41 <Batzy> and i hear it looks pythony
17:42:43 <EvanR> identify why it was slow
17:42:53 <Batzy> EvanR: artifacts of the object orientation
17:43:21 <EvanR> 🤔
17:43:27 <Batzy> i could strip it down, but then it would be very close to the functional implementation anyways, and still a tad more memory inefficient
17:43:51 <Batzy> the fact is i dont really *need* like a class attribute, i was just leaning on them as a crutch during my prototyping
17:43:59 <Batzy> attributes*
17:44:05 <Batzy> so im sort of convinced i want to do it functionally anyways
17:45:20 <EvanR> haskell also has packages to do your computations on the GPU. I think accelerate is one
17:45:40 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:45:53 lavaman joins (~lavaman@98.38.249.169)
17:46:01 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:46:07 <Batzy> EvanR: i can't tell if you're trying to sell me on haskell or a number crunching environment
17:46:15 lavaman joins (~lavaman@98.38.249.169)
17:46:23 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:46:31 <Batzy> julia seems promising though
17:46:33 <EvanR> disclaimer, no one is paying me commission on any of this
17:46:38 lavaman joins (~lavaman@98.38.249.169)
17:46:40 <Batzy> haha
17:46:45 <Batzy> good, because you suck at it
17:46:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:46:57 <Batzy> worst haskell salesman ever
17:46:59 <EvanR> haskell is good for other reasons
17:47:00 lavaman joins (~lavaman@98.38.249.169)
17:47:08 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:47:19 <Batzy> EvanR: ok when would you tell someone "you definitely want to use haskell for this"
17:47:23 lavaman joins (~lavaman@98.38.249.169)
17:47:27 <EvanR> advent of code xD
17:47:30 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:47:45 lavaman joins (~lavaman@98.38.249.169)
17:47:47 <Batzy> what else for normal life
17:47:53 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:47:53 <EvanR> my friend used elixir to do the first few then burned out
17:48:02 shailangsa joins (~shailangs@host217-39-45-199.range217-39.btcentralplus.com)
17:48:08 lavaman joins (~lavaman@98.38.249.169)
17:48:15 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:48:19 <EvanR> haskell is a general purpose language so, use it for general purpose stuff
17:48:29 lavaman joins (~lavaman@98.38.249.169)
17:48:30 <EvanR> I'm doing opengl graphics right now
17:48:36 <Batzy> i see
17:48:37 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:48:52 lavaman joins (~lavaman@98.38.249.169)
17:48:54 <Batzy> well ive always wanted to learn haskell, it's too neat.
17:48:55 ChanServ sets mode +o ski
17:48:58 ski sets mode +b-o lavaman!~lavaman@98.38.249.169$##fix-your-connection ski
17:48:59 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:49:02 <Batzy> but i think your julia suggestion is a really good one
17:49:10 <EvanR> last I used julia it was pretty cool
17:49:17 <EvanR> not idea about performance though
17:49:42 <c_wraith> Julia produces very fast code when it understands what you're doing. So it's great for the sorts of stuff it was designed for.
17:49:51 × machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection)
17:49:57 <Batzy> c_wraith: did you see what i am trying to do
17:50:10 <wavemode> the two main things to make sure of when writing number crunching code in haskell tend to be, making sure the numbers stay unboxed and making sure you aren't building up unnecessary thunks
17:50:27 <Batzy> "numbers stay unboxed"
17:50:28 <Batzy> ?
17:50:50 machinedgod joins (~machinedg@24.105.81.50)
17:51:25 <EvanR> unboxed arrays of numbers
17:51:50 <EvanR> normally arrays contain pointer to values which can slow things down
17:51:56 <wavemode> basically, making sure the compiler is emitting code such that you're just adding numbers, not first having to dereference pointers to the numbers
17:51:59 <EvanR> you want them unboxed
17:52:02 Joe[m] joins (~jsricemat@2001:470:69fc:105::1:b4ce)
17:52:51 <wavemode> https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/primitives.html
17:54:05 Akiva joins (~Akiva@user/Akiva)
17:54:19 × MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 256 seconds)
17:54:34 <EvanR> in case of hmatrix though, you hopefully don't write the number crunching code, but outsource it to the big guns
17:55:00 <oak-> I did few tests, neither of servant-jsaddle or servant-client-ghcjs were usable "out-of-the-box". I was able to patch servant-client-ghcjs so that it builds with other parts of servant being from version 0.19. Now it's time for more tests
17:55:11 emf joins (~emf@2620:10d:c090:400::5:21fc)
17:55:35 <wavemode> granted, many times the compiler can optimize code using boxed types to use unboxed instead... though trying to make SURE that happens can be somewhat tricky
17:57:11 <Batzy> EvanR: i would really just like to write A*B mod something
17:57:24 <Batzy> and have the outsourcer do that quickly
17:58:45 zincy joins (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4)
17:59:24 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
17:59:47 <EvanR> enjoy https://hackage.haskell.org/package/hmatrix-0.20.2/docs/Numeric-LinearAlgebra.html
18:00:48 zeenk joins (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5)
18:03:24 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
18:03:53 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
18:04:54 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 260 seconds)
18:05:20 <sm> how do you preserve newlines in the `footer` (or `footerDoc`) of an optparse-applicative parser ?
18:05:53 × unyu quits (~pyon@user/pyon) (Quit: brb)
18:07:41 unyu joins (~pyon@user/pyon)
18:09:36 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c) (Remote host closed the connection)
18:11:11 Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
18:15:11 vicfred joins (~vicfred@user/vicfred)
18:15:16 <Unicorn_Princess> well that was quick. i follow https://cabal.readthedocs.io/en/latest/getting-started.html and started with "cabal init myfirstapp -n", and get an error that 'init' doesn't take any extra arguments. i guess the guide is out of date? i gathered that init now uses the directory it's ran is as the project name
18:18:57 polyphem_ is now known as polyphem
18:19:59 wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net)
18:20:23 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
18:22:04 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
18:24:22 nattiestnate joins (~nate@2001:448a:4063:1cc8:3706:7ea7:62f5:aeaf)
18:25:37 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 240 seconds)
18:26:17 × lottaquestions quits (~nick@2607:fa49:5041:a200:b92:1a0:165b:5914) (Ping timeout: 240 seconds)
18:26:29 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
18:27:24 <anon66200164> I have an assessment tomorrow, hopefully I can cover tuples this even and do a few questions before it
18:27:43 Vajb joins (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e)
18:29:40 × tiferrei quits (~tiferrei@user/tiferrei) (Remote host closed the connection)
18:29:57 <polyphem> Unicorn_Princess: cabal init -n -o nyfirstapp
18:30:14 <polyphem> Unicorn_Princess: cabal init -n -p myfirstapp
18:32:01 <Unicorn_Princess> what does -o/p do?
18:32:02 × Vajb quits (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) (Ping timeout: 250 seconds)
18:32:21 nebu joins (~user@user/wavion)
18:32:24 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
18:32:45 <Unicorn_Princess> (in any case i just manually made a directory and did cabal init in.. it)
18:32:46 × mei quits (~mei@user/mei) (Quit: mei)
18:33:04 <polyphem> Unicorn_Princess: ignore first line, cabal init --help
18:33:35 lottaquestions joins (~nick@2607:fa49:5041:a200:c170:ec30:68fa:bc68)
18:34:18 <polyphem> Unicorn_Princess: -p is for your package name , yea you should create and enter a directory
18:34:27 tiferrei joins (~tiferrei@user/tiferrei)
18:36:49 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
18:38:08 × abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
18:38:33 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
18:38:39 CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
18:39:19 <monochrom> https://blog.plover.com/meta/job.html This gets interesting. The venerable Mark Dominus wants a Haskell job, too!
18:39:28 × DNH quits (~DNH@2a02:8108:1100:16d8:adf2:7fd4:5ba2:8512) (Quit: Textual IRC Client: www.textualapp.com)
18:39:46 jgeerds_ joins (~jgeerds@55d4a547.access.ecotel.net)
18:42:09 DNH joins (~DNH@2a02:8108:1100:16d8:95db:50d7:7eec:328d)
18:44:55 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
18:45:36 ChanServ sets mode +o litharge
18:45:37 litharge sets mode -bo lavaman!~lavaman@98.38.249.169$##fix-your-connection litharge
18:45:50 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
18:47:43 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cc:b923:a3cb:c39c)
18:48:58 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
18:49:14 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
18:50:10 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
18:51:16 monaaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
18:52:54 cynomys joins (~cynomys@user/cynomys)
18:54:13 lavaman joins (~lavaman@98.38.249.169)
18:54:21 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:54:29 bristermitten joins (~bristermi@2a00:8b40:8beb:0:de76:3286:3969:f4aa)
18:54:35 × [exa] quits (exa@srv3.blesmrt.net) (Changing host)
18:54:35 [exa] joins (exa@user/exa/x-3587197)
18:54:35 lavaman joins (~lavaman@98.38.249.169)
18:54:37 × lottaquestions quits (~nick@2607:fa49:5041:a200:c170:ec30:68fa:bc68) (Ping timeout: 240 seconds)
18:54:43 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:54:58 lavaman joins (~lavaman@98.38.249.169)
18:55:06 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:55:20 lavaman joins (~lavaman@98.38.249.169)
18:55:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:55:42 lavaman joins (~lavaman@98.38.249.169)
18:55:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:56:04 lavaman joins (~lavaman@98.38.249.169)
18:56:11 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:56:28 lavaman joins (~lavaman@98.38.249.169)
18:56:34 <bristermitten> Hi all, I'm trying to write an indentation-sensitive parser / lexer with Alex / Happy, but I'm encountering some issues. The majority of the resources & examples that I've found seem to be quite outdated, and I'm struggling to adapt them.
18:56:35 <bristermitten> I've found the most luck with this example: https://github.com/jmoy/alexhappy/blob/master/whitespace/Lexer.x but it still doesn't seem to compile. I get a bunch of errors: https://paste.tomsmeding.com/fTZhuGeT
18:56:36 <bristermitten> https://paste.tomsmeding.com/yn3JWSrh Here is my currently Lexer.x
18:56:36 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:56:36 <bristermitten> Could I get some support please? Thanks!
18:56:37 slack1256 joins (~slack1256@186.11.0.215)
18:56:38 ChanServ sets mode +o litharge
18:56:39 litharge sets mode +b *!*@98.38.249.169
18:56:49 litharge sets mode -o litharge
18:57:16 <slack1256> Is `nubOrd` defined somewhere in the core libraries? It doesn't seem to be on `base`.
18:57:19 ChanServ sets mode +o litharge
18:57:20 litharge sets mode -bo *!*@98.38.249.169 litharge
18:57:28 kayvank joins (~user@52-119-115-185.PUBLIC.monkeybrains.net)
18:57:34 lavaman joins (~lavaman@98.38.249.169)
18:57:41 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:57:55 lavaman joins (~lavaman@98.38.249.169)
18:58:02 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:58:17 lavaman joins (~lavaman@98.38.249.169)
18:58:25 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:58:33 ChanServ sets mode +o litharge
18:58:34 litharge sets mode +b *!*@98.38.249.169$##fix-your-connection
18:58:44 litharge sets mode -o litharge
18:59:07 whound joins (~dust@2409:4071:4d8d:7b21:2586:8c37:2856:667a)
19:00:52 <monochrom> It's in containers
19:01:24 <monochrom> Since it uses Data.Set at the back.
19:01:57 × Inst quits (~delicacie@2601:6c4:4080:3f80:5c6a:e4b3:e4cd:1bc3) (Ping timeout: 240 seconds)
19:03:14 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 250 seconds)
19:03:18 × michalz quits (~michalz@185.246.204.87) (Read error: No route to host)
19:04:58 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection)
19:05:12 michalz joins (~michalz@185.246.204.75)
19:05:17 × unyu quits (~pyon@user/pyon) (Quit: WeeChat 3.4)
19:05:50 × zincy quits (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4) (Remote host closed the connection)
19:06:11 <slack1256> Oh it is on `Data.Containers.ListUtils`, awesome!
19:06:16 <slack1256> Thanks monochrom.
19:07:29 × alp quits (~alp@user/alp) (Remote host closed the connection)
19:07:54 alp joins (~alp@user/alp)
19:07:54 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 260 seconds)
19:10:04 lottaquestions joins (~nick@2607:fa49:5041:a200:833f:e9c7:6325:4206)
19:11:18 vysn joins (~vysn@user/vysn)
19:18:34 ChanServ sets mode +o litharge
19:18:35 litharge sets mode -bo *!*@98.38.249.169$##fix-your-connection litharge
19:18:39 <reactormonk[m]> Is there a Maybe version of succ somewhere?
19:20:11 <ski> probably requires `Bounded' and `Eq'
19:21:32 <anon66200164> could someone else how a tuple works I can't seem to get fst (1,2) to work on ghci?
19:21:46 <ski> > fst (1,2)
19:21:47 <geekosaur> what goes wrong?
19:21:47 <lambdabot> 1
19:22:06 <polyphem> reactormonk[m]: succMay in the safe package
19:22:16 <ski> do you have any particular interactor query, or code snippet, you'd like to show ?
19:22:20 <reactormonk[m]> thx
19:22:27 <ski> @hoogle succMay
19:22:27 <lambdabot> Safe succMay :: (Enum a, Eq a, Bounded a) => a -> Maybe a
19:22:27 <lambdabot> Intro succMay :: (Enum a, Eq a, Bounded a) => a -> Maybe a
19:22:40 <anon66200164> this error https://paste.tomsmeding.com/JKbIjqxK
19:23:04 <ski> anon66200164 : you defined your own `fst' ?
19:23:23 <ski> (or used a `fst' defined for you by your lecturer, or something)
19:23:36 <anon66200164> define it like this fst :: (a, b) -> a fst (x, _) = x
19:23:56 <ski> why not use the standard `fst' ?
19:24:10 <anon66200164> neither one seems to work in any case
19:24:27 <ski> if you really want to use that one, try saying `Main.fst' instead .. or add `import Prelude hiding (fst)' to the top of your source file (under `module' if you have any)
19:24:30 <anon66200164> https://paste.tomsmeding.com/sngl2RXv
19:24:44 <anon66200164> Alright
19:25:09 <ski> but i'd suggest just using the standard `fst', instead of having your own definition of it
19:25:21 <monochrom> Name clash is a thing.
19:25:44 <wavemode> the error means exactly what it says, if you define something with the same name as something else in scope the compiler doesn't know which one you're referring to. disambiguate with ModuleName.symbol
19:25:57 <anon66200164> so it works when I use the terminal but it doesn't work when I use it in the vs code terminal
19:26:18 <anon66200164> weird
19:26:19 <monochrom> In C, I wouldn't name my own function "printf".
19:26:31 <monochrom> In Unix, I wouldn't name my own shell script "test".
19:26:48 <monochrom> All classical examples of name clashes.
19:26:55 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
19:28:06 <monochrom> You are already blessed that the computer actually lays out "you have a name clash".
19:28:28 <ski> a/use the terminal/use the interactor/
19:28:30 <monochrom> Because the alternative would be the computer automatically chooses the one you don't mean.
19:28:32 lechner joins (~lechner@debian/lechner)
19:28:59 ski grins
19:29:07 <anon66200164> ski: got it
19:29:14 unyu joins (~pyon@user/pyon)
19:29:38 × max22- quits (~maxime@2a01cb08833598000823846d04004043.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
19:29:39 cynomys joins (~cynomys@user/cynomys)
19:29:56 <ski> anon66200164 : so, did you manage to write `g :: (a,b) -> (b,a)' ?
19:30:06 <ski> .. using `fst' and `snd'
19:31:47 <anon66200164> After I restarted vs code, it worked, idk what was wrong the first time
19:31:56 <anon66200164> I should be able to solve the sumPair exercise now
19:32:37 <anon66200164> i.e. sumPairs [(1,2), (3,4)] =10
19:33:19 <ski> sounds reasonable
19:33:30 <ski> were you required to solve that, using `fst' and `snd' ?
19:34:58 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
19:37:19 <anon66200164> it wasn't required to only use that, but I didn't want to use anything that hasn't been mentioned in lectures
19:37:25 <anon66200164> so no map
19:38:13 <monochrom> You can use pattern matching with a pattern like "(x,y)". You can use fst and snd. You should do both.
19:38:44 <anon66200164> Yeah, I will try to solve the same problem in multiple ways
19:39:10 × whound quits (~dust@2409:4071:4d8d:7b21:2586:8c37:2856:667a) (Quit: Konversation terminated!)
19:39:11 × jgeerds_ quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 250 seconds)
19:39:28 nschoe joins (~quassel@2a01:e0a:8e:a190:3031:10e7:f93f:b88c)
19:39:48 k8yun joins (~k8yun@user/k8yun)
19:42:37 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
19:44:15 × bristermitten quits (~bristermi@2a00:8b40:8beb:0:de76:3286:3969:f4aa) (Quit: Client closed)
19:44:29 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41)
19:45:04 <anon66200164> I know I'm working on this now but my assessment2 is being released tomorrow and my lecturer has just it will basically involve building wordle using haskell
19:45:27 <anon66200164> has anyone done that here?
19:45:59 × mastarija quits (~mastarija@2a05:4f46:e04:6000:15fe:cab1:6fd:b807) (Quit: Leaving)
19:46:10 Erutuon joins (~Erutuon@user/erutuon)
19:46:19 <janus> yes, i have seen people doing wordle in haskell, i think e.g. sshine did
19:46:20 <dsal> anon66200164: There's a video series from a well-known haskeller and a blog post from at least one other.
19:46:28 <monochrom> I think no but maybe people on the haskell subreddit have.
19:46:42 <anon66200164> should be fun
19:46:52 <anon66200164> I haven't actually played wordle lol
19:46:53 <dsal> It's the only way I'd get interested in the game in the first place. :)
19:47:13 <monochrom> Back in the days of Suduko everyone here was doing that.
19:47:16 <dsal> 3Blue1Brown did a pretty neat video describing some information theory around it.
19:47:24 max22- joins (~maxime@2a01cb088335980064335dca1fbb49a4.ipv6.abo.wanadoo.fr)
19:47:38 <monochrom> But that's also when #haskell was the major discussion platform and reddit didn't exist.
19:47:47 <dsal> I didn't do suduko or wordle. AoC is my favorite game, but it's seasonal
19:47:53 <anon66200164> dsal: fair enough, I'm enjoying my functional programming module, it's mostly because the lecturer is really good, but still, it's a pleasant change from java
19:48:23 <dsal> I somehow read that as "lava" which sounds terribly painful so it didn't seem off to me.
19:48:49 <monochrom> Our own https://reasonablypolymorphic.com/blog/wordle/index.html probably covers similar information theory.
19:48:56 <geekosaur> is there much of a difference?
19:49:38 <ski> i accidentally invented a scheme to do (possibly left-nested) goal implications, in logic programming, last time i looked at Sudoku
19:50:38 <dsal> I was working with some xml junk in the 90s and ended up making something like a language that I used to express property tests. I called it Extensible Markup Lisp
19:50:52 ski idly wonders whether there's any Sudoku implementation in Lava
19:51:02 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
19:51:18 slac67097 joins (~slack1256@191.126.227.64)
19:52:02 × nschoe quits (~quassel@2a01:e0a:8e:a190:3031:10e7:f93f:b88c) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:52:20 × phma quits (~phma@host-67-44-209-72.hnremote.net) (Read error: Connection reset by peer)
19:53:03 × jao quits (~jao@211.68.17.95.dynamic.jazztel.es) (Ping timeout: 250 seconds)
19:53:17 × slack1256 quits (~slack1256@186.11.0.215) (Ping timeout: 240 seconds)
19:53:30 zincy joins (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4)
19:54:22 Erutuon joins (~Erutuon@user/erutuon)
19:54:31 jakalx parts (~jakalx@base.jakalx.net) (Disconnected: Replaced by new connection)
19:54:31 jakalx joins (~jakalx@base.jakalx.net)
19:54:45 phma joins (phma@2001:5b0:210d:6718:cad1:39ac:d8eb:ddb1)
19:56:49 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
19:56:54 × monaaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
19:57:42 × califax quits (~califax@user/califx) (Remote host closed the connection)
19:58:54 califax joins (~califax@user/califx)
20:03:18 × jalil quits (~jalil@2a01:e0a:277:4100:f726:20ac:8c7a:b279) (Quit: jalil)
20:04:25 x_kuru joins (~xkuru@user/xkuru)
20:05:13 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds)
20:06:49 juhp joins (~juhp@128.106.188.82)
20:07:07 × xkuru quits (~xkuru@user/xkuru) (Ping timeout: 250 seconds)
20:07:17 briandaed joins (~root@109.95.143.81.r.toneticgroup.pl)
20:08:37 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
20:14:09 × michalz quits (~michalz@185.246.204.75) (Remote host closed the connection)
20:15:51 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection)
20:16:15 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
20:18:18 <anon66200164> why do I get a variable not in scope error here? sumPairs :: [(a, b)] -> Integer sumPairs [(_, _)] = 0
20:18:35 <anon66200164> shouldn't it always give me 0
20:18:46 <dminuoso> anon66200164: take a closer look at the error message.
20:19:02 <dminuoso> @where paste
20:19:02 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
20:19:08 <dminuoso> Can you share the entirety of the error message?
20:19:14 <dminuoso> Perhaps we can help you decipher it yourself
20:19:46 × mstksg quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 260 seconds)
20:20:08 <anon66200164> https://paste.tomsmeding.com/SI1Hvfr8
20:20:26 <anon66200164> I was trying to test out if it works, so it's not solved yet
20:20:32 <dminuoso> Variable not in scope: sumPairs :: [(a0, b0)] -> t
20:20:40 <anon66200164> what does that mean?
20:20:46 <dminuoso> That just means you are using `sumPairs`, which is a variable
20:20:51 <dminuoso> But to GHC, that variable is not in scope
20:20:56 <dminuoso> That is, it doesn't know what this
20:21:12 <dminuoso> i.e. this happens if sumPairs is either not defined or imported
20:21:21 mstksg joins (~jle`@cpe-23-240-75-236.socal.res.rr.com)
20:21:35 <geekosaur> did you enter this into ghci?
20:22:01 <ski> did you save your file ?
20:22:20 <anon66200164> I did save the file
20:22:34 <ski> and you're loading the correct file into the interactor ?
20:22:44 <anon66200164> I https://paste.tomsmeding.com/EvhiXAR7
20:23:08 ProfSimm joins (~ProfSimm@87.227.196.109)
20:23:45 <ski> that's just the same error that `sumPairs' isn't in scope (isn't defined/bound)
20:24:58 <anon66200164> ski: it was a :l issue :/ my bad
20:25:07 × phma quits (phma@2001:5b0:210d:6718:cad1:39ac:d8eb:ddb1) (Read error: Connection reset by peer)
20:25:33 <anon66200164> sumPairs :: [(Integer , Integer )] -> Integer sumPairs [(_,_)] = 0 always returns 0
20:25:40 <ski> no worry, happens to the best of us
20:25:41 lavaman joins (~lavaman@98.38.249.169)
20:26:00 <ski> well, sure. you've defined it that way
20:26:00 phma joins (~phma@host-67-44-208-245.hnremote.net)
20:26:04 <monochrom> Ah but what about [] and [(0,0), (0,0)]
20:26:15 <ski> (in the cases it computes an answer at all :)
20:26:49 <anon66200164> I get an exception
20:27:16 <anon66200164> how do I make it so it takes multiple tuples in any lengthh list
20:27:25 <monochrom> Recursion.
20:28:35 <anon66200164> so for this question, thinking so far https://paste.tomsmeding.com/oBubMuV7
20:29:23 <monochrom> Yes, like that.
20:29:32 <monochrom> But it's [] not [()]
20:29:45 <ski> the base case is defined to take a singleton (with an empty tuple), not an empty list (of pairs)
20:29:56 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
20:30:20 <monochrom> You probably haven't truly embraced the fact that, for example, if the type is [Int], then the value can be [] without even having any relevance to Int.
20:30:51 × tiferrei quits (~tiferrei@user/tiferrei) (Ping timeout: 276 seconds)
20:30:52 tiferrei2000 joins (~tiferrei@user/tiferrei)
20:31:13 <ski> for lists, a good starting point is to have the empty list as a base case .. unless you already know that you want another base case (or more base cases, in addition)
20:31:29 <anon66200164> sumPairs ((a, b) : xs) = fst x + snd x would this work?
20:31:44 <monochrom> What about the numbers in xs?
20:31:49 <ski> what is `x' ?
20:31:53 <anon66200164> I still need to deal with that
20:32:03 <anon66200164> ski: it's the pair (a, b)
20:32:09 <ski> no, it isn't
20:32:14 <anon66200164> f
20:32:18 <anon66200164> ok umm
20:32:19 <ski> you have to say so, if you want it to be that
20:32:26 <ski> sumPairs (x : xs) = fst x + snd x
20:32:28 <ski> or
20:32:33 <ski> sumPairs (x@(a,b) : xs) = fst x + snd x
20:32:53 <anon66200164> I haven't seen the second version are those equivalent?
20:32:57 <ski> (the latter both names the pair `x', as well as naming the two components `a' and `b')
20:33:31 × dhouthoo_ quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4)
20:33:32 <ski> (occasionally, it's useful to both give a name to something, as well as to some of its parts)
20:33:34 <anon66200164> monochrom: what did you mean the type being [Int]?
20:33:57 <monochrom> [Int] is a type. You know that?
20:34:03 <anon66200164> Yeah
20:34:09 <ski> monochrom's is talking about the empty list `[]', that it can be of any list type `[T]', for any type `T'
20:34:21 <anon66200164> but I already said sumPairs has type sumPairs :: [(Integer , Integer )] -> Integer
20:34:27 <anon66200164> ohh
20:34:29 <ski> in case it's the empty list, it contains no element of type `T' at all
20:35:26 <monochrom> So [] is a value of type [(Integer , Integer )] without any relevance to Integer or (Foo,Bar) business.
20:35:48 <monochrom> The empty list doesn't need to contain an "empty tuple" for emptiness.
20:36:57 <anon66200164> https://paste.tomsmeding.com/OPmiA8gn
20:37:15 <monochrom> Yes like that.
20:37:22 <monochrom> Now you understand recursion.
20:37:38 lavaman joins (~lavaman@98.38.249.169)
20:37:46 <anon66200164> monochrom: I'm getting there, I need to solve 7 more practise exercises and then do a mock test before 9am tomorrow
20:38:02 <ski> anon66200164 : now do it, using `(a,b)' in place of `x'
20:38:15 <ski> (then compare the two solutions)
20:38:23 <monochrom> If you like "sumPairs ((a,b) : xs) = ..." then it's "a + b + sumPairs xs"
20:39:05 <monochrom> "sumPairs ((a, b) : xs) = fst x + snd x" was not making up your mind whether you want to use patterns or fst and snd.
20:39:11 <anon66200164> ski: ok
20:39:59 <anon66200164> I get an error
20:40:57 <anon66200164> nvm it works also
20:41:08 ski . o O ( "We get signal." )
20:41:37 <ski> anon66200164 : which of the two is the clearer one, in your mind ? or are they about the same ?
20:41:48 <monochrom> "sigma > 4.999999...."
20:42:31 <anon66200164> sumPairs (x : xs) = fst x + snd x + sumPairs xs becuase I have used this pattern before to solve a Length of list problem using recursion
20:42:47 <ski> ok
20:42:54 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
20:43:22 <anon66200164> I didn't think it was actually possible to do it using sumPairs ((a,b) : xs) = (a + b) + sumPairs xs becuase I didn't think it would evaluate (a+b) like it did
20:43:41 <ski> it's good to have options
20:43:46 <anon66200164> yh
20:44:02 <ski> (those brackets around the addition are not necessary, btw)
20:44:38 <anon66200164> I thought it just made it clearer ¯\_(ツ)_/¯
20:44:53 <anon66200164> good stuff
20:45:18 × Ariakenom_ quits (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: Leaving)
20:48:16 × wavemode quits (~wavemode@2601:241:0:fc90:2892:d0:a7ec:bc11) (Quit: Client closed)
20:48:29 <EvanR> emptyTuple = fix (\(x,y) -> (y,x))
20:48:57 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds)
20:49:31 Inst joins (~delicacie@2601:6c4:4080:3f80:f0fd:e448:c8d2:7c01)
20:51:35 wavemode joins (~wavemode@2601:241:0:fc90:12bc:6a75:8601:ea04)
20:55:03 <anon66200164> https://paste.tomsmeding.com/bfPNgz7f
20:55:25 <monochrom> Yeah.
20:55:40 <ski> s/theSum/total/ ?
20:55:57 <monochrom> Oh haha.
20:56:07 <anon66200164> theSum of all the items in the list
20:56:21 <anon66200164> if the elements are Integers
20:56:32 <monochrom> But what name does the teacher wants you to use?
20:56:53 <anon66200164> oh lol
20:57:07 <EvanR> cache invalidation and naming stuff
20:57:39 <monochrom> "invalidation" is so negative.
20:57:48 <EvanR> cache unparsing
20:57:59 <monochrom> People should talk more about "cache validation". >:)
20:58:00 <anon66200164> tbf these are not marked, it's just personal exercises
20:58:21 <ski> @where pdv
20:58:21 <lambdabot> "Parse, don't validate" by lexi-lambda in 2019-11-05 at <https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/>
20:58:22 <anon66200164> extra questions to practice for the real thing
21:01:41 × `2jt quits (~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Remote host closed the connection)
21:01:48 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293)
21:01:48 <EvanR> cache effectiveness. 0 is "as if no cache exists". positive means cache works and provides a benefit. negative (the typical case) means performance was worse and or results are just wrong because caching scheme is broken
21:01:51 <anon66200164> this is incorrect, I need to put each doubles value back into its position in the list https://paste.tomsmeding.com/JRRD3HwU
21:02:04 `2jt joins (~jtomas@130.red-88-22-46.staticip.rima-tde.net)
21:02:07 <EvanR> in which case zero is almost positive by comparison
21:02:10 Pickchea joins (~private@user/pickchea)
21:02:54 <ski> > 3*2 : [4,2,0] -- anon66200164
21:02:55 <lambdabot> [6,4,2,0]
21:04:03 <anon66200164> cons
21:05:01 <EvanR> cons is also negative, why can't we build list out of pros
21:05:11 ski . o O ( "CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A." by Henry G. Baker in 1994 at <https://plover.com/~mjd/misc/hbaker-archive/CheneyMTA.html> )
21:05:36 <ski> would pros build lists of negative length ?
21:06:19 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
21:07:05 <anon66200164> doubles (x : xs) = x*2 : [] + doubles xs
21:07:36 <anon66200164> but it will reverse the list
21:08:02 geekosaur joins (~geekosaur@xmonad/geekosaur)
21:08:48 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 268 seconds)
21:10:17 × ravella quits (~ravella@user/ryanavella) (Ping timeout: 240 seconds)
21:10:34 <anon66200164> should I use tail
21:10:47 neurocyte0917090 joins (~neurocyte@user/neurocyte)
21:11:40 <wavemode> `[] ++ doubles xs` is equivalent to `doubles xs`
21:12:05 × nebu quits (~user@user/wavion) (Ping timeout: 256 seconds)
21:13:31 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
21:13:46 ProfSimm joins (~ProfSimm@87.227.196.109)
21:14:37 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
21:14:55 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
21:17:17 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
21:18:02 × slac67097 quits (~slack1256@191.126.227.64) (Remote host closed the connection)
21:18:53 <anon66200164> "Do not use any functions in the standard library (Prelude) other than arithmetic and boolean operations." does this mean I can't use fst?
21:19:01 × cynomys quits (~cynomys@user/cynomys) (Quit: Lost terminal)
21:19:33 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
21:19:34 <geekosaur> in most cases you want pattern matching instead
21:20:29 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
21:20:46 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
21:20:57 <anon66200164> geekosaur: ok
21:21:43 <janus> anon66200164: it also means you can't use the list constructor (:) or the concatenator (++)
21:22:02 <wavemode> yeah I assume by functions they mean functions that aren't data constructors lol
21:22:07 <anon66200164> that's quite odd since we used them in lectures
21:32:12 <EvanR> "do not use any odd functions in the standard library, i.e. f(x) = -f(x)
21:32:33 <EvanR> ... doh
21:42:10 jgeerds_ joins (~jgeerds@55d4a547.access.ecotel.net)
21:44:00 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
21:45:14 stef204 joins (~stef204@user/stef204)
21:45:28 dsrt^ joins (~dsrt@128-092-160-106.biz.spectrum.com)
21:47:22 <ephemient> isn't an odd function one that satisfies f(-x) = -f(x)?
21:47:55 × jackson99 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout))
21:49:12 × wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Quit: WeeChat 2.2-dev)
21:49:28 <EvanR> yeah
21:52:58 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.4)
21:56:36 <monochrom> Hence "doh" :)
21:57:09 <monochrom> Theorem: If f(x) = -f(x), then f is both even and odd. >:)
21:57:12 justsomeguy joins (~justsomeg@user/justsomeguy)
22:00:36 × zincy quits (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4) (Remote host closed the connection)
22:01:51 × Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
22:02:38 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 250 seconds)
22:03:04 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
22:03:12 <EvanR> > -(minBound :: Int)
22:03:13 <lambdabot> -9223372036854775808
22:04:36 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
22:04:39 <Inst> do you know anything about the haskell doc.pdf thing?
22:04:45 <Inst> the one the berkeley philo prof made?
22:05:31 cynomys joins (~cynomys@user/cynomys)
22:05:44 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
22:07:15 <ephemient> > -minBound == minBound
22:07:16 <lambdabot> error:
22:07:16 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of syntactic negation
22:07:16 <lambdabot> prevents the constraint ‘(Num a0)’ from being solved.
22:07:18 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
22:07:35 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
22:07:54 <ephemient> > -minBound == (minBound :: Int)
22:07:55 <lambdabot> True
22:08:27 zincy joins (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4)
22:08:37 <ephemient> leading to the very fun
22:08:37 <ephemient> > abs (minBound :: Int) < 0
22:08:38 <lambdabot> True
22:09:01 × alp quits (~alp@user/alp) (Ping timeout: 240 seconds)
22:09:43 × Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
22:09:52 qrpnxz joins (~qrpnxz@user/qrpnxz)
22:10:00 Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
22:11:56 foul_owl joins (~kerry@174-21-76-71.tukw.qwest.net)
22:12:58 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
22:13:15 ProfSimm joins (~ProfSimm@87.227.196.109)
22:15:17 × pooryorick quits (~pooryoric@87-119-174-173.tll.elisa.ee) (Ping timeout: 240 seconds)
22:15:30 pooryorick joins (~pooryoric@87-119-174-173.tll.elisa.ee)
22:15:46 jackson99 joins (~bc8147f2@83.167.180.121)
22:15:55 <byorgey> Inst: I assume you're talking about https://pandoc.org/ ?
22:17:51 <Inst> pandoc, yes, can it convert an excel spreadsheet to a txt or something i can simply parse to check for duplicates
22:18:09 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
22:18:28 <ski> anon66200164 : "but it will reverse the list" -- no
22:22:20 sektor|2 joins (~kvirc@87.227.175.182)
22:23:51 × wavemode quits (~wavemode@2601:241:0:fc90:12bc:6a75:8601:ea04) (Quit: Client closed)
22:25:17 × sektor|3 quits (~kvirc@94.155.193.66) (Ping timeout: 252 seconds)
22:25:20 wavemode joins (~wavemode@2601:241:0:fc90:12bc:6a75:8601:ea04)
22:26:07 <byorgey> Inst: no, pandoc cannot convert excel spreadsheets to text. Fortunately, excel can do that.
22:26:44 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:28:02 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:29:54 × jackson99 quits (~bc8147f2@83.167.180.121) (Quit: CGI:IRC)
22:32:23 × zincy quits (~zincy@2a00:23c8:970c:4801:68f0:cbbd:5b77:19e4) (Remote host closed the connection)
22:32:26 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
22:32:45 ProfSimm joins (~ProfSimm@87.227.196.109)
22:33:42 jackson99 joins (~bc8147f2@cerf.good1.com)
22:35:19 <EvanR> so a pair of Storables isn't Storable by default, so here I am noodling about how to implement Storable for two Word8s...
22:35:43 <EvanR> ok that's a Word16 but still
22:36:32 qrpnxz parts (~qrpnxz@user/qrpnxz) (Disconnected: closed)
22:37:06 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Ping timeout: 256 seconds)
22:38:37 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
22:39:30 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
22:39:42 <anon66200164> ski: I don't understand how it would work
22:39:55 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
22:40:42 <monochrom> Oh, heh. Here:
22:41:00 × max22- quits (~maxime@2a01cb088335980064335dca1fbb49a4.ipv6.abo.wanadoo.fr) (Quit: Leaving)
22:41:16 <monochrom> doubles (x : y : []) = x*2 : doubles (y : []) = x*2 : y*2 : doubles [] = ... you get the point.
22:41:40 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
22:42:43 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:42:59 <anon66200164> but https://paste.tomsmeding.com/o0AjqHhe
22:43:24 <monochrom> Clearly, doubles [] = []
22:46:00 × wavemode quits (~wavemode@2601:241:0:fc90:12bc:6a75:8601:ea04) (Quit: Client closed)
22:46:22 × abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection)
22:46:40 <anon66200164> monochrom: sorry, could you explain why?
22:47:05 <EvanR> 200% of nothing is still nothing:tm:
22:47:43 <monochrom> There are many ways of understanding it, but none is "intuitive". This is the limitation of "intuition".
22:48:16 <monochrom> 1. You have to produce a list. But you have no good numbers to put in that list. May as well leave it empty.
22:49:21 <monochrom> 2. Someone asks me to double every number in a list. Oh but there is no number in the input list. So there is no number in the output list either. IOW output length = input length, oh but input length = 0.
22:50:08 <ephemient> 3. you want doubles [x] = [x*2]; the only way to make that work is with doubles [] = []
22:50:17 <monochrom> 3. doubles [] = [] is the only correct base case that can make the induction case work.
22:50:30 <monochrom> Yeah, that. :)
22:52:00 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Quit: ERC (IRC client for Emacs 27.1))
22:52:34 <jackson99> anon66200164 because doubles returns a list of Integer, not Integer
22:53:12 <anon66200164> thank you all for your help
22:53:31 <EvanR> haskell, where your questions are answered in astounding dolby 5.1
22:53:49 × deadmarshal quits (~deadmarsh@95.38.117.25) (Ping timeout: 240 seconds)
22:54:55 <jackson99> > map (*2) [1..10)
22:54:56 <lambdabot> <hint>:1:16: error: parse error on input ‘)’
22:55:02 <jackson99> > map (*2) [1..]
22:55:04 <lambdabot> [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,5...
22:55:14 wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net)
22:55:36 <jackson99> that's your function, doubles = map (*2)
22:55:54 <jackson99> it is usually nicer to use combinators than manual recursion
22:56:07 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
22:56:15 <EvanR> the exercise was to not use "standard library functions"
22:56:22 <monochrom> jackson99, this one is a homework where the student learns writing manual recursion.
22:56:22 <anon66200164> yh
22:56:44 <anon66200164> I think I'm screwed for tomorrow but we shall see
22:56:55 <anon66200164> gn all
22:57:41 <monochrom> And probably at a level not ready for higher-order functions either, so not even writing one's own mymap.
22:59:04 <jackson99> those excercises seem questionable. I've seen two or three of them, requiring user to implement map from scratch every time
22:59:17 × Inst quits (~delicacie@2601:6c4:4080:3f80:f0fd:e448:c8d2:7c01) (Ping timeout: 240 seconds)
22:59:52 <EvanR> also known as javascript before a certain date
23:00:42 <EvanR> also, it builds character
23:01:00 wavemode joins (~wavemode@2601:241:0:fc90:12bc:6a75:8601:ea04)
23:01:06 <monochrom> I know that feeling.
23:02:03 <monochrom> When I was a young math enthusiasist, I questioned the tradition math curriculum order of <natural numbers, integers, rationals, reals, complex, rings and fields, universal algebra> too.
23:02:30 <monochrom> I opined that it should be reversed. Kindergarten should start with universal algebra and maybe rings and fields.
23:02:46 <monochrom> You must be thankful that back then I hadn't herad of category theory yet.
23:02:55 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
23:02:58 <monochrom> Either that, or thankful that no one listened to me.
23:03:53 <monochrom> Except that someone did listen to someone else about New Math and did a bit of that. They tried to do set theory in kindergarten or something.
23:04:22 <dolio> Yeah, they'd alreaday tried your idea.
23:04:51 × `2jt quits (~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 256 seconds)
23:05:23 <Franciman> bourbaki
23:06:05 <dolio> Teaching universal algebra is probably a better idea than set theory, though.
23:06:12 <monochrom> haha
23:06:17 ravella joins (~ravella@user/ryanavella)
23:06:45 <Franciman> do they still teach ZF axiomatic set theory?
23:10:22 × zeenk quits (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Quit: Konversation terminated!)
23:12:17 <dolio> I don't think it was ZF, per se. It was a lot less formal than that.
23:12:32 <dolio> Apparently abstract algebra was in the list of topics.
23:13:09 jao joins (~jao@211.68.17.95.dynamic.jazztel.es)
23:13:12 × nunggu quits (~q@user/nunggu) (Remote host closed the connection)
23:13:12 <monochrom> Näive set theory that only covers finite sets and doesn't bring up the tough questions so it's OK.
23:13:37 nunggu joins (~q@user/nunggu)
23:13:46 <monochrom> In fact, only at the level of what most programmers think of as "containers".
23:14:02 × jackson99 quits (~bc8147f2@cerf.good1.com) (Quit: quit)
23:14:18 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Remote host closed the connection)
23:14:23 jackson99 joins (~bc8147f2@cerf.good1.com)
23:14:34 anon66200164 joins (~anon66200@host-92-19-99-147.as13285.net)
23:15:57 <EvanR> we were forced to answer the question "what is a line (or circle)" with "a set of points"
23:16:13 <monochrom> Oh, damn.
23:16:36 <EvanR> now i see that's a crazy intersection of ideas
23:17:01 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 245 seconds)
23:17:21 geekosaur now wonders how much insanity he managed to miss
23:17:23 FragByte joins (~christian@user/fragbyte)
23:17:37 zebrag joins (~chris@user/zebrag)
23:19:02 × anon66200164 quits (~anon66200@host-92-19-99-147.as13285.net) (Ping timeout: 256 seconds)
23:20:19 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
23:21:35 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
23:21:59 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:22:12 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
23:24:06 <dolio> Yeah, see, that kind of answer is exactly the kind of reason the set theory part would be useless.
23:25:34 × cynomys quits (~cynomys@user/cynomys) (Quit: leaving)
23:25:46 cynomys joins (~cynomys@user/cynomys)
23:25:57 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
23:27:01 × jao quits (~jao@211.68.17.95.dynamic.jazztel.es) (Ping timeout: 245 seconds)
23:27:10 <dolio> 'All mathematical objects are built out of sets,' isn't an idea that actually makes understanding the objects any easier.
23:29:14 jao joins (~jao@static-68-235-44-40.cust.tzulo.com)
23:31:44 <EvanR> today they probably have to do homotopy type theory and say sets are made out of shapes
23:33:45 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
23:33:48 × k8yun quits (~k8yun@user/k8yun) (Quit: Leaving)
23:33:54 × waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
23:34:55 × jao quits (~jao@static-68-235-44-40.cust.tzulo.com) (Ping timeout: 250 seconds)
23:37:09 jao joins (~jao@68.235.43.85)
23:43:38 <janus> what would be a neat name for `flip foldMap`. my coworker suggested `summarize`. and monoids are, according to cdsmith 'composable list summarizers'
23:44:20 <janus> maybe that is too 'smart'. but mapMconcat makes it looks like mapM, which it is not
23:44:33 <janus> mconcatMap? seems bulky
23:44:55 vysn joins (~vysn@user/vysn)
23:44:58 <EvanR> flippedFoldMap = flip foldMap
23:45:10 <janus> ;)
23:45:36 <EvanR> should clear up any confusion
23:46:10 <monochrom> @type flip foldMap
23:46:11 <lambdabot> (Foldable t, Monoid c) => t a -> (a -> c) -> c
23:46:21 <monochrom> reduceBy
23:46:30 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
23:46:50 <monochrom> Example: [1,23] `reduceBy` Sum >:)
23:47:13 <jackdk> janus: `paMdolf`
23:47:28 <janus> haha :D
23:47:45 ec joins (~ec@gateway/tor-sasl/ec)
23:47:51 <janus> pamDolf... it has a certain ring to it..
23:47:58 <ephemient> (<&>/)
23:48:02 <jackdk> > (`foldMap` [1, 2, 3]) Sum
23:48:03 <lambdabot> Sum {getSum = 6}
23:48:05 <monochrom> This is strange, flip foldMap feels like the wrong order of arguments.
23:48:25 <monochrom> or s/wrong/very unusual/
23:48:28 dysfigured is now known as dfg
23:48:33 × dfg quits (~dfg@dfg.rocks) (Changing host)
23:48:33 dfg joins (~dfg@user/dfg)
23:48:38 <janus> monochrom: it's just like for is flipped traverse
23:48:45 × briandaed quits (~root@109.95.143.81.r.toneticgroup.pl) (Remote host closed the connection)
23:49:01 alMalsam1 is now known as alMalsamo
23:49:03 <jackdk> monochrom: I think it's because imperative programmers tend not to use it, whereas `for_ = flip traverse_` and `for = flip traverse`map onto ad-hoc for-each-style constructs in other languages
23:49:24 <Axman6> :t \f xs = getDual (foldMap (Dual . f) xs)
23:49:25 <lambdabot> error: parse error on input ‘=’
23:49:26 <jackdk> it's like a gap in the conceptual toolbox that you didn't know you had until you see foldMap
23:49:31 <Axman6> :t \f xs -> getDual (foldMap (Dual . f) xs)
23:49:32 <lambdabot> (Foldable t, Monoid a1) => (a2 -> a1) -> t a2 -> a1
23:49:36 <janus> monochrom: often when you have a maybe, the function will be way larger than the Maybe. this is where i'd use for/pamDolf
23:50:18 <jackdk> % :set -XBlockArguments
23:50:18 <yahb> jackdk:
23:50:21 <Axman6> > (\f xs -> getDual (foldMap (Dual . f) xs)) show [1..10]
23:50:23 <lambdabot> "10987654321"
23:50:53 FragByte_ joins (~christian@user/fragbyte)
23:51:02 <jackdk> % Just 3 & foldMap \m -> Sum (m + 1)
23:51:02 <yahb> jackdk: Sum {getSum = 4}
23:51:03 <monochrom> The for-loop analogy may inspire very good names. forFold? foldFor?
23:51:11 × FragByte quits (~christian@user/fragbyte) (Ping timeout: 245 seconds)
23:51:21 FragByte_ is now known as FragByte
23:51:21 <jackdk> I tend not to use blockarguments but find it compelling here
23:51:24 <monochrom> forReduce?
23:51:49 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 250 seconds)
23:51:59 <jackdk> % :set -XNoBlockArguments
23:51:59 <yahb> jackdk:
23:52:17 <Axman6> BlockArguments is one of the other extensions turned on by default in DAML that makes it feel just a little less cumbersome to write, and I should probably use it more in Haskell
23:52:53 <janus> chris smith just posted some suggestions at https://github.com/ndmitchell/extra/issues/87#issuecomment-1035645114
23:53:15 <monochrom> Lately I took a look at Koka and found a syntax sugar even better than BlockArguments.
23:54:39 <monochrom> Suppose you have "f :: Foo -> Bar -> (() -> X) -> X", and you would normally use it like "f foo bar \() -> xxx"
23:55:03 <monochrom> The Koka syntax sugar is "with f foo bar { xxx }". So you even omit the lambda.
23:55:32 <monochrom> (Why is ()->X a useful type in Koka? Because that X is usually an effectful type, e.g., IO Y)
23:56:06 <monochrom> (And Koka is call-by-value like SML and Scheme so you do want a \()-> wrapper.)
23:57:55 <Axman6> what do you do if you have f :: Foo -> Bar -> (() -> Y) -> (() -> X) -> X?
23:58:25 <monochrom> Ah, no nicer syntax sugar for that.
23:58:30 alp joins (~alp@user/alp)
23:59:46 <monochrom> But types like the type of f are way more pervasive in Koka because it presents its effect system and library in terms of those types.
23:59:51 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)

All times are in UTC on 2022-02-10.