Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-28 10:34:09 <kuribas> I didn't enable or disable anything
2021-03-28 10:34:28 × shad0w_ quits (a0ca255a@160.202.37.90) (Quit: Connection closed)
2021-03-28 10:36:00 <siers> can I define data and do something else at the same time in lambdabot?
2021-03-28 10:36:00 hexo- joins (~hexo@2a01:430:17:1::ffff:328)
2021-03-28 10:36:38 <kuribas> [exa]: can that be overridden?
2021-03-28 10:38:12 <kuribas> why is that flag there anyway?
2021-03-28 10:38:53 mrd joins (~mrd@45.61.147.211)
2021-03-28 10:39:03 × mrd quits (~mrd@45.61.147.211) (Changing host)
2021-03-28 10:39:03 mrd joins (~mrd@debian/developer/mrd)
2021-03-28 10:39:55 <kuribas> I mean, what is the point of having an executable in a package if it doesn't get installed anyway?
2021-03-28 10:40:31 × borne quits (~fritjof@200116b8644f3500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 250 seconds)
2021-03-28 10:42:55 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
2021-03-28 10:43:41 Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de)
2021-03-28 10:46:33 romesrf joins (~romesrf@44.190.189.46.rev.vodafone.pt)
2021-03-28 10:48:18 × Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2021-03-28 10:48:43 Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de)
2021-03-28 10:50:35 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-03-28 10:51:46 <[exa]> kuribas: yaml is usually installed as a library for just parsing yamls into many projects, 99% users will neve need the tools. Devs who need the tools are free to install them, at the cost of the compute time + storage
2021-03-28 10:52:04 <kuribas> [exa]: how?
2021-03-28 10:52:06 <[exa]> that's perhaps cleaner than unnecessarily spawning another package yaml-tools or so
2021-03-28 10:52:21 <[exa]> `cabal install -f -no-exe yaml` doesn't work?
2021-03-28 10:52:26 madjest39 joins (~Android@77-63-117-209.mobile.kpn.net)
2021-03-28 10:53:00 <kuribas> ah it does, thanks!
2021-03-28 10:53:16 <[exa]> siers: by defining data, you mean defining a data type? (the other both here knows that for sure)
2021-03-28 10:53:37 <siers> yeah, data type
2021-03-28 10:53:39 <[exa]> % data SiersData = Siers Int
2021-03-28 10:53:39 <yahb> [exa]:
2021-03-28 10:53:45 <[exa]> % :t Siers 123
2021-03-28 10:53:45 <yahb> [exa]: SiersData
2021-03-28 10:54:06 × Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
2021-03-28 10:54:18 <[exa]> as always, suggest not defining too many datatypes here :]
2021-03-28 10:57:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-28 10:57:52 pera joins (~pera@unaffiliated/pera)
2021-03-28 10:58:21 Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de)
2021-03-28 11:01:05 <siers> however I understood that my newtype is not the kind meant to be used with lens
2021-03-28 11:03:15 <[exa]> why not
2021-03-28 11:03:38 × Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2021-03-28 11:03:47 <siers> it seems like it works for Const because Const has type parameters whereas mine is newtype X = Map .. ..
2021-03-28 11:04:06 × ania123 quits (d4488c32@212.72.140.50) (Quit: Connection closed)
2021-03-28 11:06:25 invaser joins (~Thunderbi@31.148.23.125)
2021-03-28 11:06:38 <romesrf> hey everyone, if i have a list of [Maybe Something] and i want to convert it to [Something] as long none of the elements is nothing
2021-03-28 11:06:42 <romesrf> how would i do it?
2021-03-28 11:07:15 <curl> :t catMaybe
2021-03-28 11:07:17 <lambdabot> error:
2021-03-28 11:07:17 <lambdabot> • Variable not in scope: catMaybe
2021-03-28 11:07:17 <lambdabot> • Perhaps you meant one of these:
2021-03-28 11:07:39 <curl> :t catMaybes
2021-03-28 11:07:40 <lambdabot> [Maybe a] -> [a]
2021-03-28 11:07:57 <curl> oh, if *none* are Nothing
2021-03-28 11:08:23 <romesrf> curl: that looks nice still, i'll look into it
2021-03-28 11:08:23 <curl> you could check the lengths were the same from the return of catMaybes
2021-03-28 11:09:04 <romesrf> i think i can describe what i'm trying to do better hmm
2021-03-28 11:09:28 <siers> I wrote data P = forall c. (C c) => P { c :: c }, and I have an update function from C typeclass, but I can't update that field in P with the new value :/
2021-03-28 11:10:32 <curl> we need the code
2021-03-28 11:11:27 jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client")
2021-03-28 11:11:41 <siers> judging by this it might just not be implemented https://gitlab.haskell.org/ghc/ghc/-/issues/16501
2021-03-28 11:12:50 <curl> it wasnt clear you were having an issue with records
2021-03-28 11:13:08 <siers> I thought P is a record
2021-03-28 11:13:23 <curl> it says it pattern matches ok
2021-03-28 11:13:41 <curl> that bug you linked is something to do with using a record in an edit
2021-03-28 11:14:08 <curl> if we could see the code you have and the error it would be helpful
2021-03-28 11:15:02 solvr joins (57e3c46d@87.227.196.109)
2021-03-28 11:15:47 <romesrf> i have a fun typeOf :: (Expr -> Maybe Type). some patterns are resolved with typeOf (Patt exp) = do (typ <- typeOf exp) return typ. By doing this, i can work with Maybe types in the function body and if a recursive evaluation is Nothing for an expression part, it will stop evaluation (because of the definition of >>=) - and eval to Nothing. And i have this working. Now i'm trying to make something
2021-03-28 11:15:49 <romesrf> similar but for "typeOf (Tup list) = ..." -> If any item of the list is "Nothing" then it should evaluate to Nothing, else it should be a list of the evaluated types from each element
2021-03-28 11:16:00 <romesrf> i might have made this more confusing :)
2021-03-28 11:16:07 <siers> curl, https://github.com/siers/ppmz/commit/258ebad2e4f85e7f23e3f1e4932f3a1501b6019f
2021-03-28 11:16:53 <curl> oh so you hit this with lenses?
2021-03-28 11:16:58 × wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 240 seconds)
2021-03-28 11:17:18 <curl> maybe they are using the record somehow with all their TH stuff
2021-03-28 11:17:36 <siers> the lenses are separate with L suffix, they shouldn't affect this, I think
2021-03-28 11:17:46 <curl> i guess that means a rewrite that uses pattern matching instead of records is then not an option
2021-03-28 11:18:06 <curl> could you provide a least sufficient example?
2021-03-28 11:19:11 <curl> i thought maybe it was from makeFieldOptics
2021-03-28 11:19:20 Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de)
2021-03-28 11:21:40 jakalx joins (~jakalx@base.jakalx.net)
2021-03-28 11:22:07 <romesrf> Okay, i wrote a sample of what i'm trying to do (https://paste.tomsmeding.com/twchJjgx), maybe with the previous explanation it makes some more sense
2021-03-28 11:23:12 <siers> curl, I should be able to make a small one, yeah
2021-03-28 11:23:26 <siers> but it really just does seem unimplemented
2021-03-28 11:25:04 haskellstudent joins (~AdminUser@213-225-9-45.nat.highway.a1.net)
2021-03-28 11:26:17 son0p joins (~son0p@181.58.39.182)
2021-03-28 11:29:26 heatsink joins (~heatsink@2600:1700:bef1:5e10:f0bc:f236:90c7:a6f5)
2021-03-28 11:30:54 <siers> http://sprunge.us/MK2zE7
2021-03-28 11:31:09 <siers> with errors: http://sprunge.us/4WqGTB
2021-03-28 11:31:39 × mac_ava quits (~mac_ava@2001:4430:5058:5bb0::832:30a4) (Ping timeout: 250 seconds)
2021-03-28 11:31:39 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-03-28 11:34:19 × heatsink quits (~heatsink@2600:1700:bef1:5e10:f0bc:f236:90c7:a6f5) (Ping timeout: 276 seconds)
2021-03-28 11:34:39 <haskellstudent> I am trying to understand memory usage in Haskell. This small program allocates about 1GB of memory, as it should, but it never give back the memory to the OS.
2021-03-28 11:34:44 <haskellstudent> https://paste.tomsmeding.com/LzgUfgvh
2021-03-28 11:34:56 jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client")
2021-03-28 11:35:10 jakalx joins (~jakalx@base.jakalx.net)
2021-03-28 11:35:12 <siers> ooo, NumericUnderscores – didn't know
2021-03-28 11:35:16 <siers> ruby had those
2021-03-28 11:35:30 <haskellstudent> after a long time of cofusion i found out that this is normal behaviour, but it should be able to be changed with: stack run -- +RTS --disable-delayed-os-memory-return
2021-03-28 11:36:08 <haskellstudent> but that switch doesnt make a difference on ghc 8.10.4, memory usage displayed in the OS stays at 1GB. is there a way to make it return it?
2021-03-28 11:36:50 <siers> 1GB or 16GB?
2021-03-28 11:37:29 <haskellstudent> 1011728 kb as per ps aux, so about 1GB as it should be
2021-03-28 11:38:15 wonko7 joins (~wonko7@45.15.17.60)
2021-03-28 11:38:23 <haskellstudent> but it should be garbage collected and deallocated after the print. which it is as far as i can tell, but not given back to the OS
2021-03-28 11:39:46 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2021-03-28 11:41:08 × stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds)

All times are in UTC.