Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 266 267 268 269 270 271 272 273 274 275 276 .. 5022
502,152 events total
2020-09-28 09:15:07 × carlomagno1 quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 240 seconds)
2020-09-28 09:15:50 <gentauro> that way you can still pattern match, but reducing the amount of `tags` in your `sum type`
2020-09-28 09:15:55 thc202 joins (~thc202@unaffiliated/thc202)
2020-09-28 09:16:20 acidjnk_new joins (~acidjnk@p200300d0c72378044c2002cf67e0d923.dip0.t-ipconnect.de)
2020-09-28 09:16:53 <dminuoso> gentauro: Isn't that just the same though? Except now I write `LogCode 10`, where it's not obvious what 10 is, whether 10 is correct, etc. And on the other side I pattern match against a number.
2020-09-28 09:18:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-09-28 09:18:59 jedws joins (~jedws@121.209.139.222)
2020-09-28 09:19:02 <gentauro> dminuoso: I guess. I have been working with M$ systems that had more that to many `error codes`. I would never create these as a `sum type`: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/web-service-error-codes
2020-09-28 09:19:03 × kenran quits (~maier@b2b-37-24-119-190.unitymedia.biz) (Quit: leaving)
2020-09-28 09:19:18 <gentauro> I would rather just have a numbe and then look it up on that page to be honest
2020-09-28 09:19:20 <cpressey> dminuoso: What kinds of things are you logging?
2020-09-28 09:19:42 <gentauro> s/numbe/number/
2020-09-28 09:20:56 <dminuoso> cpressey: Essentially modifications to resources, sort of a "changelog" if you want.
2020-09-28 09:22:10 <cpressey> dminuoso: My feeling is that you should try to capture the structure of the changes in the type. There isn't much sense data-modelling a "log line" because it's not a domain object, it's more like an artefact.
2020-09-28 09:22:13 <gentauro> dminuoso: and I also realized that Haskell (GHC) is not happe with really big `sum types` :) http://blog.stermon.com/articles/2020/03/30/haskell-data-octet-safe-idiomatic-and-big.html and http://blog.stermon.com/articles/2020/04/06/haskell-data-octet-nand-smaller-but-slower.html
2020-09-28 09:22:57 <cpressey> e.g. data LogEntry = ThingFieldChange ThingId FieldId UTCTime | OtherChange ...
2020-09-28 09:22:58 <gentauro> s/happe/happy
2020-09-28 09:23:44 josh_ joins (~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-28 09:27:47 × josh_ quits (~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2020-09-28 09:29:22 Orbstheorem joins (~roosember@hellendaal.orbstheorem.ch)
2020-09-28 09:29:53 bitmagie joins (~Thunderbi@200116b806356300acea16c9c4c48994.dip.versatel-1u1.de)
2020-09-28 09:34:17 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-28 09:35:09 <jgt> is there a nicer way to make something like this work? `or [ isJust $ Just 1, isJust $ Just "foo" ]`
2020-09-28 09:35:25 shatriff joins (~vitaliish@176.52.219.10)
2020-09-28 09:36:27 <jgt> something with `any isJust` won't work, because then the list would be heterogenous
2020-09-28 09:37:21 × jedws quits (~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-28 09:38:23 cosimone joins (~cosimone@2001:b07:ae5:db26:f68c:50ff:fe0b:b774)
2020-09-28 09:43:01 <cpressey> jgt: It's very unclear to me what you want to accomplish. Is it important that the values be in a list?
2020-09-28 09:44:17 <EvanR> yeah you can't even create the list you're talking about because everything in it must be the same type
2020-09-28 09:44:35 <jgt> cpressey: No, I have a bunch of heterogenous values, and I want to check if any of them are a Just
2020-09-28 09:45:16 bahamas joins (~lucian@unaffiliated/bahamas)
2020-09-28 09:45:18 <cpressey> jgt: case (x,y,z) of (Nothing, Nothing, Nothing) -> none are Just; _ -> yes at least one it
2020-09-28 09:45:27 <cpressey> s/it/is/
2020-09-28 09:46:37 <jgt> is there another way that avoids a tuple? The tuple would work, but it's a little unergonomic for larger collections of values
2020-09-28 09:47:15 <EvanR> what form does this collection actually take
2020-09-28 09:48:32 <EvanR> genuinely curious
2020-09-28 09:48:54 <jgt> it's actually in a record, so my function is pulling out specific fields from a record and checking if any of them are a Just
2020-09-28 09:49:07 jedws joins (~jedws@121.209.139.222)
2020-09-28 09:50:06 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-09-28 09:50:13 × bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 260 seconds)
2020-09-28 09:50:22 <EvanR> can you make a polymorphic function that takes a record, a field, and returns a Bool
2020-09-28 09:50:49 <EvanR> i.e. generic record lib
2020-09-28 09:51:03 <jgt> yeah, I think that might be the way to do it
2020-09-28 09:51:24 <jgt> or maybe the original approach is totally fine; might be silly to over-engineer it
2020-09-28 09:51:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-28 09:51:29 <jgt> just looks a bit noisy
2020-09-28 09:52:20 <EvanR> since you don't care about the payload i would think you want to put a zillion "hasField foo bar" instead of isJust
2020-09-28 09:55:43 <dminuoso> jgt: Perhaps it might be easier to see the context of the code.
2020-09-28 09:55:51 v4hn joins (~v4hn@185.244.214.216)
2020-09-28 09:56:04 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-28 09:56:06 <dminuoso> Maybe, you're too deep in XY land.
2020-09-28 09:56:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-28 09:56:27 hackage replace-megaparsec 1.4.3.0 - Find, replace, and split string patterns with Megaparsec parsers (instead of regex) https://hackage.haskell.org/package/replace-megaparsec-1.4.3.0 (JamesBrock)
2020-09-28 10:00:27 <jackdk> Anyone here familiar with amazonka-dynamodb? I'm trying to write a conditional PUT that succeeds only if the timestamp of the item is greater than the timestamp of the item in the table. I'm currently stuck trying to create a value of type Network.AWS.DynamoDB.Types.AttributeValue that stands for an expressionAttributeValue `:foo`.
2020-09-28 10:00:38 <jackdk> Axman6: I know you've dabbled in this space
2020-09-28 10:00:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2020-09-28 10:02:29 × nan` quits (~nan`@unaffiliated/nan/x-5405850) (Quit: leaving)
2020-09-28 10:03:09 × plutoniix quits (~q@175.176.222.7) (Quit: Leaving)
2020-09-28 10:06:15 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-28 10:06:21 Guest44502 joins (2e0592c5@HSI-KBW-046-005-146-197.hsi8.kabel-badenwuerttemberg.de)
2020-09-28 10:06:50 dcoutts joins (~duncan@70.14.75.194.dyn.plus.net)
2020-09-28 10:06:50 × dcoutts quits (~duncan@70.14.75.194.dyn.plus.net) (Changing host)
2020-09-28 10:06:50 dcoutts joins (~duncan@unaffiliated/dcoutts)
2020-09-28 10:06:59 × Guest44502 quits (2e0592c5@HSI-KBW-046-005-146-197.hsi8.kabel-badenwuerttemberg.de) (Remote host closed the connection)
2020-09-28 10:07:26 testasjkdflk joins (2e0592c5@HSI-KBW-046-005-146-197.hsi8.kabel-badenwuerttemberg.de)
2020-09-28 10:07:41 × v_m_v quits (~vm_v@2a02:aa12:3200:6480:f507:71a:9334:3099) (Remote host closed the connection)
2020-09-28 10:10:39 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-28 10:11:11 × justache quits (~justache@unaffiliated/justache) (Remote host closed the connection)
2020-09-28 10:12:31 justache joins (~justache@unaffiliated/justache)
2020-09-28 10:13:56 macrover joins (~macrover@ip70-189-231-35.lv.lv.cox.net)
2020-09-28 10:16:25 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-28 10:17:12 × jedws quits (~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-28 10:21:08 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-28 10:23:15 Clough joins (~Cain@203.220.28.77)
2020-09-28 10:26:15 Guest_50 joins (907c8df3@avp1.pip.aber.ac.uk)
2020-09-28 10:26:44 <Guest_50> im trying to download on mac but having issues, could anyone help?
2020-09-28 10:27:56 miguel_clean joins (~Miguel@89-72-187-203.dynamic.chello.pl)
2020-09-28 10:28:09 Dolly joins (585fc8fd@ti0203q160-3035.bb.online.no)
2020-09-28 10:29:01 <miguel_clean> eh, I let my programm run over the weekend with +RTS -p but the resulting .prof file only reports a total time of ~120seconds... while the programm was taking up around 100-200% cores for all the time.. what am I missing?
2020-09-28 10:29:12 <yushyin> Guest_50: what are you trying exactly?
2020-09-28 10:29:29 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-28 10:30:00 bahamas joins (~lucian@unaffiliated/bahamas)
2020-09-28 10:31:00 × bahamas quits (~lucian@unaffiliated/bahamas) (Client Quit)
2020-09-28 10:31:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-28 10:32:08 jedws joins (~jedws@121.209.139.222)
2020-09-28 10:33:27 × jedws quits (~jedws@121.209.139.222) (Client Quit)
2020-09-28 10:33:34 × testasjkdflk quits (2e0592c5@HSI-KBW-046-005-146-197.hsi8.kabel-badenwuerttemberg.de) (Remote host closed the connection)
2020-09-28 10:34:02 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-28 10:39:18 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2020-09-28 10:39:33 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-28 10:43:07 <dminuoso> gentauro: Well this is definitely not a CPU intensive code path.
2020-09-28 10:43:27 kasdjf joins (2e0592c5@HSI-KBW-046-005-146-197.hsi8.kabel-badenwuerttemberg.de)
2020-09-28 10:44:12 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-28 10:44:37 <dminuoso> cpressey: Mmm, well the UTCTime I would still float out since that's common to *every* log occurence anyway,.
2020-09-28 10:44:47 <dminuoso> But I see what you mean.
2020-09-28 10:45:53 × jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 256 seconds)
2020-09-28 10:46:30 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
2020-09-28 10:49:46 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-28 10:50:41 Tops2 joins (~Tobias@dyndsl-095-033-025-158.ewe-ip-backbone.de)
2020-09-28 10:50:47 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:c494:5a0b:fe0f:9b26) (Ping timeout: 240 seconds)

All times are in UTC.