Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-06 20:52:32 <Cheery> oh no :D I did it and it's horrible
2020-11-06 20:53:13 iqubic parts (~user@2601:602:9500:4870:a732:8bdd:eaee:5c26) ("ERC (IRC client for Emacs 28.0.50)")
2020-11-06 20:53:22 × supercoven quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 260 seconds)
2020-11-06 20:53:37 alp joins (~alp@2a01:e0a:58b:4920:7cc6:32d7:a280:df74)
2020-11-06 20:53:57 × twopoint718 quits (~cjw@fsf/member/twopoint718) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-06 20:55:18 justsomeguy joins (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
2020-11-06 20:55:18 × justsomeguy quits (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
2020-11-06 20:55:18 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-11-06 20:56:22 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
2020-11-06 20:57:31 hackage libarchive 3.0.1.1 - Haskell interface to libarchive https://hackage.haskell.org/package/libarchive-3.0.1.1 (vmchale)
2020-11-06 20:58:06 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
2020-11-06 20:59:41 twopoint718 joins (~cjw@fsf/member/twopoint718)
2020-11-06 21:00:01 × jdsharp quits (~jdsharp@185.204.1.185) ()
2020-11-06 21:00:49 × Collateral quits (~Collatera@4e69b241.skybroadband.com) (Ping timeout: 265 seconds)
2020-11-06 21:02:29 × avdb quits (~avdb@ip-62-235-189-16.dsl.scarlet.be) (Ping timeout: 256 seconds)
2020-11-06 21:02:45 <nut> When I run ghci, why do I need to add -package somepackage in order to be able to load it?
2020-11-06 21:03:02 × xff0x quits (~fox@2001:1a81:526d:d800:33bd:cfa:492c:ea35) (Ping timeout: 264 seconds)
2020-11-06 21:03:04 <nut> I just installed text-icu with cabal install text-icu
2020-11-06 21:03:30 xff0x joins (~fox@2001:1a81:526d:d800:e0c1:ba75:a0ef:2a5b)
2020-11-06 21:03:35 <nut> and if I run ghci, and import Data.Text.ICU, it says hidden package
2020-11-06 21:04:20 <nut> Is it because when I cabal install, i didn't use --lib flag?
2020-11-06 21:04:22 <geekosaur> with new-style install it's stored in an environment, not just generally available, because that makes messes when multiple versions of packages are around
2020-11-06 21:04:28 Collateral joins (~Collatera@4e69b241.skybroadband.com)
2020-11-06 21:04:38 <nut> ok
2020-11-06 21:04:43 <geekosaur> --lib would make it generally available and then get you in trouble if you install a different version with --lib later
2020-11-06 21:05:15 <nut> Ok so generally speaking, --lib is not recommended
2020-11-06 21:05:30 <geekosaur> in general you want to work in terms of a specific package or environment so cabal can keep straight what versions of what libraries should be visible
2020-11-06 21:05:31 <nut> cabal keeps warning me about it
2020-11-06 21:06:28 <solonarv> if you want a ghci with a specific package (or set thereof) you can run 'cabal repl -b text-icu'
2020-11-06 21:07:04 <nut> solonarv: even if i'm not in any cabal package?
2020-11-06 21:07:22 <nut> solonarv: I often use ghci outside of any package
2020-11-06 21:08:03 <nut> Is there any sanity checks for cabal to see if i've messed up the environment?
2020-11-06 21:08:37 <Uniaika> nut: yep it seems to run well outside of a cabal project
2020-11-06 21:09:27 <geekosaur> cabal itself will sanity check if you use cabal repl instead of ghci directly. there's little that can be done if you go around cabal though
2020-11-06 21:09:34 invaser joins (~Thunderbi@31.148.23.125)
2020-11-06 21:12:44 <geekosaur> ghc will grab anything it thinks it can and possibly confuse itself in the process, which is why we have tools like cabal and stack that each try to keep ghc in check in different ways
2020-11-06 21:12:45 × Kaivo quits (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) (Ping timeout: 240 seconds)
2020-11-06 21:13:01 Franciman joins (~francesco@host-79-36-167-172.retail.telecomitalia.it)
2020-11-06 21:14:04 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 258 seconds)
2020-11-06 21:15:00 × ggole quits (~ggole@2001:8003:8119:7200:657b:f270:233e:7a88) (Quit: Leaving)
2020-11-06 21:15:32 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
2020-11-06 21:20:37 × darjeeling_ quits (~darjeelin@115.215.43.51) (Ping timeout: 256 seconds)
2020-11-06 21:21:04 darjeeling_ joins (~darjeelin@115.215.43.51)
2020-11-06 21:22:19 × u0_a298 quits (~user@47.206.148.226) (Ping timeout: 256 seconds)
2020-11-06 21:26:28 <nut> i see. so better use cabal repl
2020-11-06 21:27:59 StoneToad joins (~StoneToad@199-167-119-174.ppp.storm.ca)
2020-11-06 21:31:07 Entertainment parts (~entertain@104.246.132.210) ()
2020-11-06 21:31:10 × StoneToad_ quits (~StoneToad@199-167-119-149.ppp.storm.ca) (Ping timeout: 256 seconds)
2020-11-06 21:35:22 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2020-11-06 21:35:50 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-06 21:36:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-11-06 21:40:13 × conal quits (~conal@198.8.81.71) (Quit: Computer has gone to sleep.)
2020-11-06 21:41:34 × chaosmasttter quits (~chaosmast@p200300c4a70b9f013c660c983e9b467a.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-11-06 21:41:54 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
2020-11-06 21:43:53 × borne quits (~fritjof@200116b864a45200fbd62cc7430251a2.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
2020-11-06 21:44:03 conal joins (~conal@198.8.81.71)
2020-11-06 21:45:58 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 256 seconds)
2020-11-06 21:47:15 borne joins (~fritjof@200116b864a45200fbd62cc7430251a2.dip.versatel-1u1.de)
2020-11-06 21:52:22 feedoo1 joins (~feedoo@178.239.168.171)
2020-11-06 21:53:29 knupfer joins (~Thunderbi@mue-88-130-61-134.dsl.tropolys.de)
2020-11-06 21:57:49 × nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 264 seconds)
2020-11-06 21:58:03 <cohn> how do you destructure a list containing a type?
2020-11-06 21:58:40 <cohn> so e.g. a list like: [(Foo Int String), (Foo Int String)]
2020-11-06 21:58:55 joaj joins (~joaj@2001:818:e326:8200:5273:55b7:3a86:e6ca)
2020-11-06 21:59:07 <cohn> where foo is defined like: data Foo = Foo Int String
2020-11-06 22:03:47 × kritzefitz_ quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-11-06 22:05:26 × conal quits (~conal@198.8.81.71) (Quit: Computer has gone to sleep.)
2020-11-06 22:07:31 <ski> cohn : match on the data constructor
2020-11-06 22:07:32 conal joins (~conal@198.8.81.71)
2020-11-06 22:07:59 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-06 22:08:16 zebrag joins (~inkbottle@aaubervilliers-654-1-115-234.w86-198.abo.wanadoo.fr)
2020-11-06 22:08:38 × inkbottle quits (~inkbottle@aaubervilliers-654-1-110-84.w86-212.abo.wanadoo.fr) (Ping timeout: 256 seconds)
2020-11-06 22:08:49 <ski> cohn : is the list of known length ?
2020-11-06 22:08:57 <cohn> no
2020-11-06 22:09:12 <ski> so, you're doing recursion, walking the list ?
2020-11-06 22:10:20 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2020-11-06 22:10:44 <cohn> yes
2020-11-06 22:11:00 <cohn> I solved it using 2 functions but I have to imagine it could be simplified
2020-11-06 22:11:09 <ski> so, if you had something like `data Foo = MkFoo Int String', then you'd probably go something like
2020-11-06 22:11:21 <ski> processFoos :: [Foo] -> ...
2020-11-06 22:11:39 <ski> processFoos [ ] = ...
2020-11-06 22:11:42 o1lo01ol1o joins (~o1lo01ol1@46.50.92.11)
2020-11-06 22:12:00 <ski> processFoos (MkFoo n s:foos) = ..n..s..(processFoos foos)..
2020-11-06 22:12:18 <ski> (`Foo' here is the type (constructor), `MkFoo' is the data constructor)
2020-11-06 22:12:49 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 264 seconds)
2020-11-06 22:13:10 <ski> but yea, depending on what you're doing to the `Foo's in the list, there may be a simpler ior clearer way to do it
2020-11-06 22:13:34 <cohn> I tried something similar to that pattern matching but got errors.
2020-11-06 22:13:41 <ski> type errors ?
2020-11-06 22:13:42 <cohn> I'll keep trying. Thanks ski!
2020-11-06 22:14:00 <ski> any code you'd like to show ?
2020-11-06 22:14:01 <cohn> actually no, it was a parsing error.
2020-11-06 22:14:20 <cohn> I've already overwritten it. : (
2020-11-06 22:14:23 <ski> okay
2020-11-06 22:14:25 <cohn> I can try to recreate it
2020-11-06 22:14:27 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
2020-11-06 22:15:02 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 264 seconds)
2020-11-06 22:15:19 <ski> if you want to, i could take a look at your two functions. and the other version too, if you feel like trying to revive it
2020-11-06 22:15:56 × dbmikus__ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds)
2020-11-06 22:16:08 × fendor quits (~fendor@77.119.129.239.wireless.dyn.drei.com) (Remote host closed the connection)
2020-11-06 22:17:50 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)

All times are in UTC.