Logs on 2022-11-13 (liberachat/#haskell)
| 00:01:56 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 00:08:38 | × | Tuplanolla quits (~Tuplanoll@91-159-68-194.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:11:03 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
| 00:11:08 | × | TonyStone31 quits (~TonyStone@cpe-74-76-48-136.nycap.res.rr.com) (Ping timeout: 268 seconds) |
| 00:15:43 | <arahael> | Can't believe how much haskell I've forgotten. What's the syntax called for #foo? |
| 00:15:48 | <arahael> | Specifically that hash, and what does it mean? |
| 00:16:47 | <dsal> | overloaded labels |
| 00:18:13 | <arahael> | Thanks. |
| 00:23:40 | → | TonyStone31 joins (~TonyStone@cpe-74-76-48-136.nycap.res.rr.com) |
| 00:29:34 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 00:41:48 | × | caryhartline quits (~caryhartl@2600:1700:2d0:8d30:dcc0:82ac:c37f:ed70) (Quit: caryhartline) |
| 00:42:30 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 00:53:11 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 256 seconds) |
| 01:01:43 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 01:02:55 | → | califax joins (~califax@user/califx) |
| 01:02:59 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
| 01:06:38 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 01:07:02 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:10:15 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:10:42 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 01:12:09 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 01:12:42 | <zzz> | does `product` shortcircuit on 0? |
| 01:13:10 | <EvanR> | :t product |
| 01:13:11 | <lambdabot> | (Foldable t, Num a) => t a -> a |
| 01:13:48 | <probie> | > product [0..] |
| 01:13:58 | <lambdabot> | mueval-core: Time limit exceeded |
| 01:14:02 | <zzz> | shame |
| 01:15:06 | <EvanR> | it actually a method of the Num class |
| 01:15:34 | <EvanR> | wait |
| 01:15:46 | → | Thony joins (~Thony@2600:4040:7409:aa00:21ab:b81e:6840:3e94) |
| 01:15:50 | <EvanR> | Foldable class |
| 01:16:22 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:16:30 | × | TonyStone31 quits (~TonyStone@cpe-74-76-48-136.nycap.res.rr.com) (Ping timeout: 268 seconds) |
| 01:16:31 | <EvanR> | so in any case it would have to attempt to test zeroness for all Nums |
| 01:17:44 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 01:17:46 | <zzz> | if signum == 0 then 0 else ... |
| 01:17:59 | <probie> | Num doesn't imply Eq |
| 01:18:10 | <zzz> | touche |
| 01:18:38 | <zzz> | no, wait |
| 01:18:57 | <zzz> | :t signum |
| 01:18:58 | <lambdabot> | Num a => a -> a |
| 01:20:10 | <probie> | That said, if the Num you're using has a definition of (*) which short circuits, and the Foldable you're using implements a "bad" `foldMap'` which is not strict it might short circuit |
| 01:21:35 | <EvanR> | sounds like a job for foldr (*) |
| 01:22:13 | <EvanR> | which will suck for strict numbers but could shortcircuit properly |
| 01:23:01 | <EvanR> | given lazy numbers or something |
| 01:27:26 | <probie> | For example, something like https://paste.tomsmeding.com/NZGFAOtg is a call to product which shortcircuits |
| 01:27:45 | → | bilegeek joins (~bilegeek@2600:1008:b06e:a41f:5618:be6c:e24b:9832) |
| 01:27:58 | <probie> | s/LazyFold/LazyFolds/ on the last line |
| 01:28:05 | × | bilegeek quits (~bilegeek@2600:1008:b06e:a41f:5618:be6c:e24b:9832) (Remote host closed the connection) |
| 01:28:24 | → | bilegeek joins (~bilegeek@2600:1008:b06e:a41f:5618:be6c:e24b:9832) |
| 01:28:34 | <probie> | Actually https://paste.tomsmeding.com/4pP8DcYC (cycle and LazyFolds are backwards) |
| 01:29:34 | <probie> | if I could spell cycle correctly... maybe I should actually run the code first |
| 01:30:39 | <zzz> | `product' = product . takeUntil isZero` |
| 01:31:16 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 01:31:37 | <EvanR> | brilliant |
| 01:31:44 | <zzz> | something like this could be optimized by the compiler right? |
| 01:32:24 | <EvanR> | > takeWhile (/= 0) [4,6,2,0,4,6,7] |
| 01:32:26 | <lambdabot> | [4,6,2] |
| 01:32:30 | <EvanR> | wait, not brilliant |
| 01:32:47 | <zzz> | that's why i invented `takeUntil` |
| 01:32:47 | <probie> | Having isZero would still require changing the type of product |
| 01:33:20 | <EvanR> | it sounds like zzz knows what particular type they are dealing with |
| 01:33:33 | → | razetime joins (~quassel@117.254.34.151) |
| 01:33:58 | <zzz> | i don't |
| 01:34:29 | <zzz> | i'm just thinking out loud about nothing in particular |
| 01:34:39 | <EvanR> | then yeah "is zero" is questionable |
| 01:34:57 | <probie> | Does lambdabot have `instance Num a => Num (a -> a)`? |
| 01:35:07 | <arahael> | Is it just me, or is Amazonka difficult to build? (It's probably just me, I seem to have a project.cabal specifying a particular sha1). |
| 01:35:15 | <EvanR> | > id + id |
| 01:35:17 | <lambdabot> | error: |
| 01:35:17 | <lambdabot> | • No instance for (Typeable a0) |
| 01:35:17 | <lambdabot> | arising from a use of ‘show_M26164909427285913018’ |
| 01:35:34 | <EvanR> | > id + id :: Int -> Int |
| 01:35:35 | <lambdabot> | error: |
| 01:35:35 | <lambdabot> | • No instance for (Num (Int -> Int)) arising from a use of ‘+’ |
| 01:35:36 | <lambdabot> | (maybe you haven't applied a function to enough arguments?) |
| 01:35:37 | <probie> | > product [(+ (2 :: Int)), (* 3), abs] $ 42 |
| 01:35:39 | <lambdabot> | error: |
| 01:35:39 | <lambdabot> | • No instance for (Num (Int -> Int)) |
| 01:35:39 | <lambdabot> | arising from a use of ‘product’ |
| 01:36:31 | <arahael> | In particular, I don't seem to be able to build amazonka-cloudfront-2.0, due to issues with Core.Service which apparently doesn't have the required strict fields. |
| 01:36:57 | <arahael> | (Which is an error in gen/Amazonka/STS/Types.hs:66:3) |
| 01:38:04 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
| 01:38:11 | <geekosaur> | probie, it doesn't have that instance normally |
| 01:38:33 | <EvanR> | zzz, usually while and until are the same except for a not thrown in |
| 01:38:40 | × | euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh) |
| 01:39:24 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 01:39:32 | <probie> | geekosaur: no, but I have vague memories of it having them ~6 so years ago. But it might just be my imagination |
| 01:39:32 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Read error: Connection reset by peer) |
| 01:39:42 | <geekosaur> | "Caleskell" |
| 01:40:20 | <EvanR> | in haskell anything can be +ed potentially, so we can compete with javascript |
| 01:40:54 | <geekosaur> | not everyone appreciated it |
| 01:41:18 | <geekosaur> | I was just digging for the Applicatives definition but I don't seem to have it in my logs |
| 01:43:09 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 01:43:16 | <geekosaur> | @let instance Num a => Num (b -> a) where (+) = liftA2 (+); (-) = liftA2 (-); (*) = liftA2 (*); negate = fmap negate; abs = fmap abs; signum = fmap signum; fromInteger = pure . fromInteger |
| 01:43:18 | <lambdabot> | Defined. |
| 01:43:20 | <zzz> | is there a class for Monoid + annihilator? |
| 01:43:29 | <dsal> | arahael: amazonka2 has been imminent for about a year. It's pretty good, but delayed for reasons that the rest of us find a bit frustrating. |
| 01:43:37 | <probie> | > product [(+ (2 :: Int)), (* 3), abs] $ 42 |
| 01:43:38 | <lambdabot> | 232848 |
| 01:43:56 | <arahael> | dsal: So the failure to build it is probably just me given I'm using the latest master. |
| 01:44:13 | <probie> | for a silly example where there's no way to define isZero |
| 01:44:38 | <dsal> | arahael: It should still work, but I've not built it in a bit. |
| 01:44:41 | <dsal> | I think there's A Process. |
| 01:45:29 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 01:45:47 | × | Batzy quits (~quassel@user/batzy) (Ping timeout: 248 seconds) |
| 01:45:56 | → | TonyStone31 joins (~TonyStone@cpe-74-76-41-127.nycap.res.rr.com) |
| 01:46:09 | <geekosaur> | @undefine |
| 01:46:09 | <lambdabot> | Undefined. |
| 01:46:10 | <geekosaur> | @let instance (Applicative f, Num a) => Num (f a) where (+) = liftA2 (+); (-) = liftA2 (-); (*) = liftA2 (*); negate = fmap negate; abs = fmap abs; signum = fmap signum; fromInteger = pure . fromInteger |
| 01:46:11 | <lambdabot> | Defined. |
| 01:46:37 | <arahael> | dsal: Not sure what you mean by that 'Process'. I'll put up my build failure in a moment when it's up again. |
| 01:46:44 | <geekosaur> | > [2] + [3] |
| 01:46:46 | <lambdabot> | [5] |
| 01:47:00 | <geekosaur> | > product [(+ (2 :: Int)), (* 3), abs] $ 42 |
| 01:47:02 | <lambdabot> | 232848 |
| 01:47:17 | <arahael> | dsal: I'm getting this sort of error: https://paste.debian.net/1260522/ |
| 01:47:56 | <arahael> | dsal: (Note: I'm using commit a05b95ef35609fbf4f7c734318ea705b35675cae of https://github.com/endgame/amazonka, which is master) |
| 01:48:33 | <arahael> | Oh, d'oh. That might be the issue. |
| 01:48:34 | <dsal> | Not sure… I've not looked at it in a bit. It could be broken, but I remember there being things that needed to happen to get the build started. |
| 01:48:42 | <dsal> | But there are also reasons they've not released. |
| 01:48:51 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 01:49:17 | <arahael> | I think I'm on entirely teh wrong commit. |
| 01:49:43 | × | Thony quits (~Thony@2600:4040:7409:aa00:21ab:b81e:6840:3e94) (Quit: Leaving) |
| 01:52:07 | <arahael> | dsal: I always wonder when it comes to these huge dependencies - are they good or bad. I generally try to avoid huge libraries that seem to have a ton of moving parts... But Amazon's API si also huge and with moving parts so it's an awkward situation. I'm leaning towards the "at least if Amazon breaks stuff, I'll know". |
| 01:52:28 | <arahael> | Which is only possible due to the design of Amazonka. |
| 01:53:02 | <dsal> | I've had good luck with amazonka2, but I'll have better luck once it's released. :) |
| 01:54:27 | <zzz> | wouldn't a class for Monoid + annihilator be useful? |
| 01:54:39 | → | Batzy joins (~quassel@user/batzy) |
| 01:55:10 | <arahael> | dsal: Using the wrong commit seems to have been the issue! But now I'm having issues with lines such as: |
| 01:55:14 | <zzz> | class Monoid a => Whatever a where annihilator :: a |
| 01:55:18 | <arahael> | 211 | env <- newEnv Discover <&> set #_envLogger lgr . set #_envRegion NorthVirginia |
| 01:55:56 | <arahael> | (Where lgr is just the result from 'newLogger Trace stdout' so I'm not sure why haskell thinks lgr has too few arguments) |
| 01:56:44 | <zzz> | a <<>> annihilator = annihilator |
| 01:56:59 | <dsal> | arahael: Because you're using . function composition. I think you want something like & there. |
| 01:58:10 | <zzz> | i have no idea what category theory calls this |
| 01:58:22 | <arahael> | dsal: I'm trying to write and use this line: https://github.com/brendanhay/amazonka/blob/2.0.0-rc1/examples/src/S3.hs#L73 |
| 01:58:47 | <arahael> | Tried that line as-is, even, but I get this error: No instance for ‘GHC.Generics.Generic (b0 -> s0 -> t0)’ |
| 01:59:39 | <dsal> | I just don't typically write lenses like this… Sec |
| 02:00:47 | <arahael> | dsal: I'm not sure I typically write lenses at all. ;) |
| 02:01:03 | <arahael> | I haven't done haskell in a year I think, actually. |
| 02:01:16 | arahael | misses haskell. |
| 02:01:35 | <dsal> | arahael: Can you show some more context and error? I don't see an obvious problem. |
| 02:02:22 | <geekosaur> | zzz, https://hackage.haskell.org/package/boolean-like-0.1.1.0/docs/Combinator-Booly.html ? (there's also an annihilators package but it's deprecated in favor of this. see andMappend and andMconcat in particular |
| 02:02:35 | <arahael> | dsal: https://paste.debian.net/1260523/ |
| 02:02:58 | <arahael> | dsal: It's quite possibly a missing extension or import. |
| 02:03:21 | <dsal> | I'm not familiar with this logger. |
| 02:03:41 | <arahael> | dsal: Do you have to be? I mean, I'm hoping this is just a typing thing. |
| 02:04:08 | × | Guest31 quits (~Guest31@p200300ef970b9cda31eab7f863c986c6.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 02:04:51 | <dsal> | Well, sure, but if it's complaining about the logger. |
| 02:04:54 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 02:05:04 | <arahael> | dsal: I think it's some sort of logger for the amazon environment. And the examples surely compile... |
| 02:05:18 | <dsal> | Do they? :) |
| 02:05:42 | <arahael> | dsal: They _surely_ do! |
| 02:05:47 | arahael | screams at the thought they don't! :) |
| 02:06:55 | × | TonyStone31 quits (~TonyStone@cpe-74-76-41-127.nycap.res.rr.com) (Ping timeout: 260 seconds) |
| 02:06:57 | <arahael> | dsal: I've seen #envLogger instead of (field @"_envLogger"), however I don't seem to have envLogger, I do have _envLogger, though, but honestly... I don't think I even care about envLogger at all. Maybe I could just not set that field... |
| 02:08:08 | <geekosaur> | wouldn't #envlogger be field @"envlogger"? |
| 02:08:14 | <arahael> | dsal: Oh, seems my error was further down, this line works: env <- newEnv Discover <&> set (field @"_envLogger") lgr . set (field @"_envRegion") NorthVirginia |
| 02:08:38 | <arahael> | geekosaur: I'm not sure what the difference is. |
| 02:08:49 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 02:08:58 | <geekosaur> | the underscore. #field is short for that @"field" thing |
| 02:09:39 | <geekosaur> | "overloaded labels", which can also be done with a proxy with a TypeApplication of the appropriate Symbol |
| 02:10:04 | <arahael> | geekosaur: Before today I didn't even realise what a label was... |
| 02:10:11 | <arahael> | Let alone overloaded ones. |
| 02:13:53 | <geekosaur> | and part of the problem here might be that if OverloadedLabels extension is missing, the # will be taken as a previously unseen binary operator and the whole line will be mis-parsed |
| 02:14:23 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 02:14:32 | <arahael> | geekosaur: It's indeed missing. |
| 02:15:09 | <arahael> | So that explaisn that part. |
| 02:15:29 | <arahael> | It's building now at least - thanks for your help dsal! |
| 02:15:54 | <dsal> | Yeah, sorry I don't know exactly what's going on there. I looked at my usages and they're slightly more simple than that. |
| 02:16:04 | <dsal> | i.e., I don't use the lgoger |
| 02:16:10 | dsal | can't even spell lager |
| 02:20:25 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 02:20:26 | × | califax quits (~califax@user/califx) (Ping timeout: 255 seconds) |
| 02:20:59 | → | TonyStone31 joins (~TonyStone@cpe-74-76-48-136.nycap.res.rr.com) |
| 02:21:24 | → | califax joins (~califax@user/califx) |
| 02:22:24 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 02:22:39 | → | bilegeek_ joins (~bilegeek@25.sub-174-209-48.myvzw.com) |
| 02:24:05 | <arahael> | dsal: No worries. :D It's working, and talking to you helped me resolve the issue! |
| 02:25:07 | × | bilegeek quits (~bilegeek@2600:1008:b06e:a41f:5618:be6c:e24b:9832) (Ping timeout: 260 seconds) |
| 02:31:30 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 02:33:14 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 02:34:03 | × | TonyStone31 quits (~TonyStone@cpe-74-76-48-136.nycap.res.rr.com) (Ping timeout: 256 seconds) |
| 02:38:07 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 02:40:51 | × | razetime quits (~quassel@117.254.34.151) (Ping timeout: 256 seconds) |
| 02:41:56 | → | ropwareJB joins (~ropwareJB@180-150-36-243.b49624.bne.nbn.aussiebb.net) |
| 02:43:11 | <ropwareJB> | Why can't I `printf` to Text? According to the docs all `PrintfArgs` are `PrintfType` instances (https://hackage.haskell.org/package/base-4.17.0.0/docs/Text-Printf.html#g:6:~:text=All%20PrintfArg%20instances%20are%20PrintfType%20instances) but I still get error `Could not deduce (PrintfType Text) arising from a use of ‘printf’` |
| 02:43:41 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 02:57:38 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 02:58:41 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 02:59:19 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit) |
| 03:02:18 | → | notzmv joins (~zmv@user/notzmv) |
| 03:05:41 | <probie> | Are they? I see that `String` is an instance, `IO ()` is an instance and `a -> r` is an instance where a is a PrintfArg and r is a PrintfType |
| 03:07:29 | × | crns quits (~netcrns@user/crns) (Ping timeout: 260 seconds) |
| 03:09:11 | → | crns joins (~netcrns@p4ff5e521.dip0.t-ipconnect.de) |
| 03:09:12 | × | crns quits (~netcrns@p4ff5e521.dip0.t-ipconnect.de) (Changing host) |
| 03:09:12 | → | crns joins (~netcrns@user/crns) |
| 03:13:05 | → | TonyStone31 joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) |
| 03:13:19 | × | johnw quits (~johnw@2600:1700:cf00:db0:8ded:5d2b:1bf3:1aca) (Quit: ZNC - http://znc.in) |
| 03:13:54 | × | td_ quits (~td@83.135.9.7) (Ping timeout: 260 seconds) |
| 03:14:11 | × | ropwareJB quits (~ropwareJB@180-150-36-243.b49624.bne.nbn.aussiebb.net) (Quit: Client closed) |
| 03:15:25 | → | td_ joins (~td@83.135.9.56) |
| 03:18:00 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 03:19:13 | × | TonyStone31 quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 268 seconds) |
| 03:19:53 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 03:19:56 | × | jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection) |
| 03:22:24 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:24:23 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 03:24:34 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 03:25:03 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 03:39:40 | → | TonyStone31 joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) |
| 03:41:04 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 252 seconds) |
| 03:41:15 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 03:45:00 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 03:46:21 | × | poscat quits (~poscat@114.245.106.84) (Ping timeout: 268 seconds) |
| 03:46:56 | → | poscat joins (~poscat@2408:8206:4823:fd6f:98ab:5c38:136c:5932) |
| 03:48:21 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 03:49:42 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 03:54:48 | × | Batzy quits (~quassel@user/batzy) (Read error: Connection reset by peer) |
| 03:55:18 | → | Batzy joins (~quassel@user/batzy) |
| 04:01:39 | → | ropwareJB joins (~ropwareJB@180-150-36-243.b49624.bne.nbn.aussiebb.net) |
| 04:10:05 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 04:10:51 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 04:11:31 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
| 04:12:05 | → | chromoblob joins (~user@37.113.164.122) |
| 04:16:39 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 04:17:14 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 04:18:31 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 04:20:36 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded) |
| 04:21:09 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 256 seconds) |
| 04:22:51 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 04:23:42 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 04:28:54 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 04:31:06 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.7.1) |
| 04:32:27 | × | Me-me quits (~me-me@v.working.name) (Remote host closed the connection) |
| 04:33:20 | → | Me-me joins (~me-me@v.working.name) |
| 04:37:50 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 04:41:16 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 04:43:42 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 04:44:27 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:45:35 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 04:52:15 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 04:53:17 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:54:55 | × | bjourne quits (~bjorn@94.191.136.12.mobile.tre.se) (Ping timeout: 260 seconds) |
| 04:55:28 | → | chromoblob joins (~user@37.113.164.122) |
| 04:56:10 | → | sayola joins (~sayola@dslb-088-064-186-217.088.064.pools.vodafone-ip.de) |
| 05:14:56 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 05:16:03 | → | nate4 joins (~nate@98.45.169.16) |
| 05:20:39 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
| 05:22:57 | × | Me-me quits (~me-me@v.working.name) (Changing host) |
| 05:22:58 | → | Me-me joins (~me-me@user/me-me) |
| 05:23:47 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 05:28:47 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 05:29:57 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds) |
| 05:30:02 | Lord_of_Life_ | is now known as Lord_of_Life |
| 05:30:09 | × | michalz quits (~michalz@185.246.207.200) (Remote host closed the connection) |
| 05:47:26 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 05:51:31 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 05:53:02 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 05:53:30 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 05:55:58 | <InstX1> | question |
| 05:56:04 | <InstX1> | i'm benchmarking fibs, with some help from FP discord |
| 05:56:09 | <InstX1> | the order of fibs runs: |
| 05:56:43 | <InstX1> | slowest to fastest: |
| 05:57:12 | <InstX1> | Iterate -> Zipwith -> STRef -> Accumulating Parameter -> Dynamic Programming Inline C |
| 05:57:15 | <InstX1> | does this look right to you? |
| 05:58:08 | <InstX1> | i'm surprised by two things, first, accumulating parameter is faster than STRef, and second, Dynamic Programming Inline C is substantially faster than Accumulating Parameter |
| 06:00:19 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 06:00:52 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 06:04:38 | <davean> | Why wouldn't you EXPECT an accumulating parameter to be faster? |
| 06:04:43 | <davean> | it doesn't have to do ref work |
| 06:04:52 | <davean> | You're not incuring a dependency |
| 06:05:49 | <davean> | It also sounds like you don't have a dynamic programming Haskell option |
| 06:06:20 | → | chromoblob joins (~user@37.113.164.122) |
| 06:12:42 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 06:13:30 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 06:17:20 | <probie> | InstX1: out of curiosity, how does something like https://paste.tomsmeding.com/Tf4p3xry compare? |
| 06:17:31 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 06:18:56 | <probie> | (or a more sane https://paste.tomsmeding.com/8ePeH5pL) |
| 06:19:35 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 06:21:05 | <davean> | probie: Thats just manually unboxed - mostly the compiler does that automaticly. |
| 06:21:27 | <davean> | Of then that should perform identically |
| 06:22:41 | <InstX1> | it's via criterion |
| 06:23:26 | <davean> | InstX1: I don't see anything that that is responsive to |
| 06:24:19 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 06:24:19 | <probie> | davean: that's what I'd expect, but given that the C is much faster for what I'd expect to generate almost the same assembly, I suspect that "accumulating parameter" is not generating that (perhaps a strictness issue?) |
| 06:24:39 | <InstX1> | rebuilding |
| 06:25:08 | <davean> | probie: the C is a fundimentally different alg, since it is dynamic. |
| 06:25:15 | <InstX1> | my accum code looks like this, ummm |
| 06:25:32 | <InstX1> | https://paste.tomsmeding.com/efv1uZBX |
| 06:25:59 | <probie> | Oh. Are you calling GMP directly in the inline c? |
| 06:26:17 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 06:26:30 | <probie> | or how are you simulating Integer in C? |
| 06:28:02 | <InstX1> | i'm doing it completely as a noob |
| 06:28:08 | <InstX1> | it's simple CInt / IO Cint |
| 06:28:09 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:28:25 | <InstX1> | my accum should be dynamic, no? |
| 06:29:06 | <InstX1> | this is my ziplist implementation |
| 06:29:07 | <InstX1> | https://paste.tomsmeding.com/OzckY5X4 |
| 06:32:27 | <probie> | InstX1: Right, so your C implementation is likely the fastest because it's not using `Integer`. How does https://paste.tomsmeding.com/cIzD59Mc compare as an accumulating solution? |
| 06:34:32 | <InstX1> | yeah, okay, i'll try that |
| 06:34:37 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 06:34:40 | <InstX1> | i just got into criterion and i'm playing around with algorithms |
| 06:34:47 | <InstX1> | i'm trying to figure out why my sieve of erastothenes isn't working |
| 06:51:28 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 06:52:48 | → | nate4 joins (~nate@98.45.169.16) |
| 06:56:50 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 07:04:22 | → | traxex joins (traxex@user/traxex) |
| 07:06:46 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 07:10:41 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
| 07:11:20 | × | ropwareJB quits (~ropwareJB@180-150-36-243.b49624.bne.nbn.aussiebb.net) (Quit: Client closed) |
| 07:11:55 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 07:12:17 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 07:24:49 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 07:26:43 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 07:29:17 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Ping timeout: 256 seconds) |
| 07:30:52 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 07:36:59 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 07:38:49 | → | zeenk joins (~zeenk@2a02:2f04:a20e:aa00::7fe) |
| 07:44:55 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 07:45:56 | <probie> | InstX1: by not working do you meaning given the wrong results, or just slow? |
| 07:48:12 | → | machinedgod joins (~machinedg@clnet-b05-118.ikbnet.co.at) |
| 07:48:22 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:50:12 | <InstX1> | not working at all |
| 07:50:24 | <InstX1> | i'm reading genuine sieve of erastothenes and looking for other ways to implement |
| 07:50:30 | <InstX1> | primesMySieve :: [Integer] |
| 07:50:30 | <InstX1> | primesMySieve = sieve [2..] |
| 07:50:30 | <InstX1> | where |
| 07:50:30 | <InstX1> | sieve (x:xs) = x: sieve (filter (\u -> u `notElem` takeWhile (u>=) [x,x+x..]) xs) |
| 07:50:36 | <InstX1> | sorry for copy paste, but this is sort |
| 07:50:40 | <InstX1> | you can see why this is obviously slow |
| 07:50:57 | <InstX1> | it's slower than the trial division version |
| 07:52:06 | <InstX1> | there'd be a cute version, tbh |
| 07:52:20 | <InstX1> | if you could say, remove every nth element, starting with the 0th (by array index) |
| 07:52:39 | <InstX1> | but the problem is, i can't figure out how to reconstruct it |
| 07:55:30 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 240 seconds) |
| 07:57:20 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds) |
| 07:57:57 | × | machinedgod quits (~machinedg@clnet-b05-118.ikbnet.co.at) (Ping timeout: 268 seconds) |
| 07:59:48 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 08:00:03 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:02:26 | × | califax quits (~califax@user/califx) (Ping timeout: 255 seconds) |
| 08:02:27 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 08:04:04 | → | califax joins (~califax@user/califx) |
| 08:07:08 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 08:08:22 | → | chromoblob joins (~user@37.113.164.122) |
| 08:10:38 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 08:11:10 | → | gmg joins (~user@user/gehmehgeh) |
| 08:15:13 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 08:18:24 | × | potash quits (~foghorn@user/foghorn) (Ping timeout: 260 seconds) |
| 08:22:45 | → | notzmv joins (~zmv@user/notzmv) |
| 08:25:42 | × | Techcable quits (~Techcable@user/Techcable) (Ping timeout: 268 seconds) |
| 08:30:01 | → | potash joins (~foghorn@user/foghorn) |
| 08:34:33 | → | acidjnk joins (~acidjnk@p200300d6e7137a1930cde3464850e818.dip0.t-ipconnect.de) |
| 08:42:36 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 08:47:19 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 08:48:50 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 240 seconds) |
| 08:54:14 | → | michalz joins (~michalz@185.246.207.197) |
| 08:59:46 | × | bilegeek_ quits (~bilegeek@25.sub-174-209-48.myvzw.com) (Quit: Leaving) |
| 09:00:57 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 09:01:25 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 09:02:58 | <InstX1> | also |
| 09:03:01 | <InstX1> | @probie |
| 09:03:01 | <lambdabot> | Unknown command, try @list |
| 09:03:14 | <InstX1> | i benchmarked your stuff |
| 09:03:18 | → | cyphase joins (~cyphase@user/cyphase) |
| 09:04:37 | → | Heyting joins (~Heyting@193.198.16.217) |
| 09:05:00 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 09:05:12 | <InstX1> | first result shows that your code is faster than the C version |
| 09:10:34 | → | nate4 joins (~nate@98.45.169.16) |
| 09:12:41 | <zzz> | geekosaur: thanks! |
| 09:14:10 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 09:15:39 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 09:24:54 | → | ub joins (~Thunderbi@77.119.171.26.wireless.dyn.drei.com) |
| 09:25:02 | → | Tuplanolla joins (~Tuplanoll@91-159-68-194.elisa-laajakaista.fi) |
| 09:25:27 | × | ubert quits (~Thunderbi@178.165.179.202.wireless.dyn.drei.com) (Ping timeout: 256 seconds) |
| 09:25:27 | ub | is now known as ubert |
| 09:26:51 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 09:26:59 | → | razetime joins (~quassel@117.254.34.151) |
| 09:31:06 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 09:31:10 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Ping timeout: 240 seconds) |
| 09:35:51 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 09:42:07 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 09:42:28 | → | Dominik[m]1 joins (~dschrempf@2001:470:69fc:105::2:bbb6) |
| 09:47:43 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds) |
| 09:50:51 | × | razetime quits (~quassel@117.254.34.151) (Remote host closed the connection) |
| 09:53:18 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 09:56:17 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
| 09:58:21 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 09:59:47 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 10:00:19 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 10:02:35 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 10:05:03 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:05:30 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Ping timeout: 240 seconds) |
| 10:09:02 | × | shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit) |
| 10:09:15 | → | Techcable joins (~Techcable@user/Techcable) |
| 10:11:58 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 10:15:29 | → | gurkenglas joins (~gurkengla@212.36.32.212) |
| 10:20:05 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 10:22:17 | × | shapr quits (~user@68.54.166.125) (Ping timeout: 255 seconds) |
| 10:26:50 | × | acidjnk quits (~acidjnk@p200300d6e7137a1930cde3464850e818.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 10:31:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 10:34:42 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:45:16 | × | ubert quits (~Thunderbi@77.119.171.26.wireless.dyn.drei.com) (Quit: ubert) |
| 10:46:18 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 10:46:22 | → | ubert joins (~Thunderbi@77.119.171.26.wireless.dyn.drei.com) |
| 10:47:02 | × | teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 255 seconds) |
| 10:47:55 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 10:48:21 | → | Guest|40 joins (~Guest|40@121-200-4-145.79c804.syd.nbn.aussiebb.net) |
| 10:49:43 | × | Guest|40 quits (~Guest|40@121-200-4-145.79c804.syd.nbn.aussiebb.net) (Client Quit) |
| 10:53:10 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 10:56:50 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 11:01:14 | → | teddyc joins (theodorc@cassarossa.samfundet.no) |
| 11:01:59 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:03:01 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 11:10:50 | → | bjourne joins (~bjorn@94.191.136.12.mobile.tre.se) |
| 11:17:01 | → | yosef` joins (~yosef`@user/yosef/x-2947716) |
| 11:18:17 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 11:19:05 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:25:09 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds) |
| 11:29:17 | × | zer0bitz quits (~zer0bitz@196.244.192.56) (Read error: Connection reset by peer) |
| 11:31:53 | → | fserucas|eod joins (~fserucas|@2001:818:e376:a400:fb92:70c1:dd88:c7d7) |
| 11:32:05 | × | fserucas|eod quits (~fserucas|@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Client Quit) |
| 11:34:51 | × | euandreh quits (~Thunderbi@179.214.113.107) (Ping timeout: 260 seconds) |
| 11:38:08 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 11:40:53 | × | teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 256 seconds) |
| 11:41:33 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 11:45:25 | → | zer0bitz joins (~zer0bitz@196.244.192.56) |
| 11:45:38 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 11:50:38 | × | euandreh quits (~Thunderbi@179.214.113.107) (Remote host closed the connection) |
| 11:51:40 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 11:53:37 | → | teddyc joins (theodorc@cassarossa.samfundet.no) |
| 11:54:58 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 11:56:27 | → | chromoblob joins (~user@37.113.164.122) |
| 12:00:01 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 12:00:24 | → | res0nat0r084490 joins (~Fletch@fenrir.whatbox.ca) |
| 12:03:31 | → | acidjnk joins (~acidjnk@p200300d6e7137a1930cde3464850e818.dip0.t-ipconnect.de) |
| 12:03:59 | → | pyrex_ joins (~pyrex@2601:645:8781:1c90:58b0:27e1:b6a0:1451) |
| 12:05:20 | → | chomwitt joins (~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) |
| 12:08:19 | × | pyrex quits (~pyrex@user/pyrex) (Ping timeout: 268 seconds) |
| 12:09:15 | × | dpratt quits (sid193493@id-193493.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 12:15:58 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 12:16:35 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 12:16:46 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 12:17:35 | → | califax joins (~califax@user/califx) |
| 12:18:22 | × | euandreh quits (~Thunderbi@179.214.113.107) (Quit: euandreh) |
| 12:19:07 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 12:19:56 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 12:22:59 | × | euandreh quits (~Thunderbi@179.214.113.107) (Remote host closed the connection) |
| 12:25:00 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 12:26:20 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 12:26:30 | × | yosef` quits (~yosef`@user/yosef/x-2947716) (Quit: Client closed) |
| 12:28:29 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 12:30:00 | → | __monty__ joins (~toonn@user/toonn) |
| 12:31:08 | → | titibandit joins (~titibandi@xdsl-87-78-8-6.nc.de) |
| 12:32:55 | × | titibandit quits (~titibandi@xdsl-87-78-8-6.nc.de) (Client Quit) |
| 12:37:00 | <InstX1> | a question about C vs Haskell |
| 12:37:04 | <InstX1> | I don't have a benchmark set-up for C |
| 12:37:32 | <InstX1> | but, say, if Haskell is performing 440% faster than the inline-C, it's the FFI's fault, isn't it? |
| 12:37:49 | → | Guest75 joins (~Guest75@178.141.177.81) |
| 12:37:52 | <Franciman> | in this form it's difficult to understand if that's the case |
| 12:38:05 | <Franciman> | if you call the ffi to do 1+1 |
| 12:38:19 | <Franciman> | then the cost of the ffi is dominating, but is it the case? |
| 12:38:24 | <Franciman> | or is the code different? |
| 12:38:38 | <Franciman> | what are you testing? |
| 12:40:00 | <InstX1> | dynamic programming fib |
| 12:40:40 | <InstX1> | to get the xth fibonacci number, we cycle through (f-2,f-1) repeatedly |
| 12:42:09 | <traxex> | why not share the code if you want help? |
| 12:46:32 | → | titibandit joins (~titibandi@xdsl-87-78-8-6.nc.de) |
| 12:47:55 | → | ygsjg joins (~quassel@189.124.224.160) |
| 12:50:17 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:51:01 | <InstX1> | https://paste.tomsmeding.com/if0WIJeK |
| 12:52:30 | × | xff0x quits (~xff0x@2405:6580:b080:900:d135:3c26:3e1:534d) (Ping timeout: 240 seconds) |
| 12:53:37 | money | is now known as polo |
| 12:55:43 | <tomsmeding> | InstX1: your code run 100000000 times on input n=1000000000 takes 252ms on my machine |
| 12:55:46 | <tomsmeding> | C code |
| 12:56:07 | <InstX1> | it's wrong |
| 12:56:18 | <InstX1> | because on long long the integer will overflow |
| 12:56:23 | <tomsmeding> | well, yes |
| 12:56:48 | <tomsmeding> | correction compiler was too smart |
| 12:57:33 | <tomsmeding> | it didn't run that many times |
| 12:57:44 | <tomsmeding> | okay run 10000 times on n=100000 takes 255ms |
| 12:57:45 | <InstX1> | what about the Haskell code? Accumulator is the best performer |
| 12:57:54 | <InstX1> | n 75 is within the boundaries |
| 13:02:18 | <tomsmeding> | InstX1: criterion says that fibAccum takes 37.78ns on n=75 here |
| 13:03:03 | <InstX1> | implies 25.5 microseconds |
| 13:03:09 | <tomsmeding> | C took 266ms on n=75 repeated 1e7 times, so 26.6ns |
| 13:04:00 | <tomsmeding> | InstX1: what is 25.5us? |
| 13:04:05 | <tomsmeding> | oh the C code |
| 13:04:08 | <tomsmeding> | yeah for larger n |
| 13:04:24 | <InstX1> | thanks |
| 13:04:31 | <InstX1> | so it's still Haskell C FFI overhead |
| 13:04:40 | <tomsmeding> | makes sense for a call of <30ns :p |
| 13:04:49 | <tomsmeding> | that's not many instructions |
| 13:06:39 | <InstX1> | my benchmark of inline C is |
| 13:07:31 | <InstX1> | 326.6 ns vs 930.75 ns |
| 13:07:59 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
| 13:08:44 | <tomsmeding> | haskell vs inline C for n=75? |
| 13:09:03 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 13:09:10 | <tomsmeding> | is my CPU really >8x faster |
| 13:09:33 | <InstX1> | i'm on a computer from 2017, that's intended to be an ultraportable |
| 13:09:35 | <tomsmeding> | did you compile haskell with -O2? (Not sure if it matters vs -O1, just checking possible confounding factors) |
| 13:09:50 | <tomsmeding> | what ghc version |
| 13:10:00 | <InstX1> | the cabal file is o2, but the installation claims o1 |
| 13:10:05 | <InstX1> | 9.4.2 |
| 13:10:13 | <InstX1> | the only annoying thing about the benchmarks? |
| 13:10:17 | <InstX1> | until loop is immensely slow |
| 13:10:25 | <tomsmeding> | cabal file ghc-options wins, I believe the "-O1" that 'cabal build' reports is juts the default |
| 13:10:37 | <tomsmeding> | ghc 9.2.4 here, so that can hardly be it then |
| 13:10:42 | <InstX1> | 2767 ns |
| 13:10:55 | <InstX1> | i had some debate / discussion / whining |
| 13:10:59 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
| 13:11:03 | <InstX1> | about the fact that accumulating parameter Haskell is too efficient |
| 13:11:22 | <InstX1> | when accumulating parameter is basically simulating a for loop |
| 13:11:44 | <InstX1> | and the complaint about until is that until is supposed to automate the accumulating parameter |
| 13:12:05 | → | nate4 joins (~nate@98.45.169.16) |
| 13:17:13 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
| 13:20:19 | × | acidjnk quits (~acidjnk@p200300d6e7137a1930cde3464850e818.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 13:22:04 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 13:27:41 | → | xff0x joins (~xff0x@2405:6580:b080:900:dd4a:69df:2709:8d37) |
| 13:28:42 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 13:29:41 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 13:36:54 | → | chromoblob joins (~user@37.113.164.122) |
| 13:51:22 | × | ft quits (~ft@p508dbd59.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 13:53:00 | → | ft joins (~ft@p508dbd59.dip0.t-ipconnect.de) |
| 13:54:03 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 13:59:20 | → | chromoblob joins (~user@37.113.164.122) |
| 14:01:28 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 14:02:16 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 14:08:12 | → | Heyting joins (~Heyting@193.198.16.217) |
| 14:11:53 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds) |
| 14:13:16 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 14:16:27 | → | CiaoSen joins (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 14:19:06 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 14:20:11 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer) |
| 14:20:58 | → | califax joins (~califax@user/califx) |
| 14:21:48 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 14:25:07 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 14:27:31 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:27:41 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 14:27:43 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 14:28:11 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 14:29:28 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 14:31:56 | → | chromoblob joins (~user@37.113.164.122) |
| 14:34:17 | → | acidjnk joins (~acidjnk@p200300d6e7137a0180b232014ce81ac1.dip0.t-ipconnect.de) |
| 14:36:57 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 14:39:07 | × | cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds) |
| 14:39:24 | → | cheater joins (~Username@user/cheater) |
| 14:41:01 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 14:42:09 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 14:42:21 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 14:42:56 | → | califax joins (~califax@user/califx) |
| 14:46:16 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 14:55:15 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 14:56:09 | → | nosferandu joins (uid576473@user/nosferandu) |
| 14:59:45 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 15:01:07 | × | fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Ping timeout: 252 seconds) |
| 15:01:36 | × | gurkenglas quits (~gurkengla@212.36.32.212) (Ping timeout: 268 seconds) |
| 15:02:03 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 256 seconds) |
| 15:04:19 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 15:06:39 | → | chromoblob joins (~user@37.113.164.122) |
| 15:11:00 | → | thyriaen joins (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) |
| 15:11:50 | → | thyriaen_ joins (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) |
| 15:12:40 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 15:13:26 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 15:14:56 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 15:14:56 | × | bjourne quits (~bjorn@94.191.136.12.mobile.tre.se) (Read error: Connection reset by peer) |
| 15:19:37 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 15:20:45 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 15:20:55 | → | zmt01 joins (~zmt00@user/zmt00) |
| 15:21:27 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:21:46 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
| 15:23:11 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:28:50 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
| 15:29:49 | × | ygsjg quits (~quassel@189.124.224.160) (Ping timeout: 256 seconds) |
| 15:30:59 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 15:31:53 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 15:33:10 | × | acidjnk quits (~acidjnk@p200300d6e7137a0180b232014ce81ac1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 15:33:10 | → | zmt00 joins (~zmt00@user/zmt00) |
| 15:33:23 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 15:34:03 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:34:55 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 256 seconds) |
| 15:36:10 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Ping timeout: 240 seconds) |
| 15:36:19 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 15:37:01 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 15:40:10 | → | acidjnk joins (~acidjnk@p200300d6e7137a01d51ae5a61bc192b5.dip0.t-ipconnect.de) |
| 15:41:25 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 15:45:31 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 15:46:13 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 15:51:33 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 15:52:28 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Quit: Leaving) |
| 15:52:32 | × | thyriaen_ quits (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Quit: Leaving) |
| 15:54:45 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 15:54:47 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds) |
| 15:54:51 | × | kaskal- quits (~kaskal@089144200035.atnat0009.highway.a1.net) (Ping timeout: 248 seconds) |
| 15:55:35 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 15:56:26 | → | chromoblob joins (~user@37.113.164.122) |
| 15:57:38 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::4b68) |
| 15:59:29 | → | thyriaen joins (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) |
| 16:01:58 | → | gurkenglas joins (~gurkengla@212.36.32.212) |
| 16:03:49 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 16:08:33 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 16:22:47 | × | gurkenglas quits (~gurkengla@212.36.32.212) (Ping timeout: 260 seconds) |
| 16:23:04 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 16:27:44 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 16:28:31 | → | kenran joins (~user@user/kenran) |
| 16:28:34 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 16:31:35 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 16:33:46 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 16:36:07 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 16:40:57 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:42:21 | × | InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 16:42:23 | → | chromoblob joins (~user@37.113.164.122) |
| 16:44:30 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Remote host closed the connection) |
| 16:44:48 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 16:45:36 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 16:45:45 | × | acidjnk quits (~acidjnk@p200300d6e7137a01d51ae5a61bc192b5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 16:49:50 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 16:51:10 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 17:05:39 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 17:06:36 | <dsal> | I've been thinking about how to handle commandline flags *and* a config file. I was considering barbies and some magic, but I think I finally figured out that because there are commandline things that will never be in the config file, maybe I should just have two separate things. |
| 17:09:33 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 17:10:23 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 17:10:44 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 17:11:15 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds) |
| 17:11:23 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:11:35 | × | pyrex_ quits (~pyrex@2601:645:8781:1c90:58b0:27e1:b6a0:1451) () |
| 17:11:51 | <Dominik[m]1> | you could also use precedence or raise an exception if both are provided |
| 17:11:51 | → | pyrex joins (~pyrex@user/pyrex) |
| 17:13:36 | → | nate4 joins (~nate@98.45.169.16) |
| 17:15:21 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 17:15:58 | <dsal> | Yeah, I think I'd have that anyway, but I wouldn't put argv in the config file. I think a natural way to do this would be to have defaults -> config file -> argv parsing. That also solves the problem of dealing with figuring out whether an option has been supplied and/or printing out "defaults" (which would be whatever you've configured). |
| 17:16:10 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 240 seconds) |
| 17:16:26 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 17:17:18 | <dsal> | It might be nice to have the ability to specify a config file with a commandline flag, but I don't actually need that. I could also just have two config file passes where the first is ~/.config and the second is in the local directory. |
| 17:18:37 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
| 17:20:19 | × | drdo quits (~drdo@overlord.drdo.eu) (Quit: The Lounge - https://thelounge.chat) |
| 17:23:02 | <tomsmeding> | dsal: sounds like more work but a more robust approach in the long term |
| 17:23:42 | <apache2> | libfuse just looks at argv. it's a terrible api. |
| 17:23:58 | <mrianbloom> | Is there a way to ask ghc to show you how it's deciding which instances to use? |
| 17:24:19 | <tomsmeding> | due to one wanting precedence anyway (commandline flags should take precedence over config file IMO), the possibility of specifying the config file location in argv, wanting explicit defaults, possibly origin reporting to the user, ... |
| 17:24:57 | <tomsmeding> | mrianbloom: are you using OVERLAPPING pragmas, that this is unclear from inspection? |
| 17:25:17 | <tomsmeding> | (not that I know of) |
| 17:25:39 | <tomsmeding> | hm, mrianbloom -fprint-potential-instances, not sure what that does |
| 17:25:50 | <mrianbloom> | Somehow my OVERLAPPING instance isn't being selected and I'm just trying to figure out why it doesn't match. |
| 17:26:27 | <tomsmeding> | ah no, that flag is for error messages |
| 17:26:33 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 256 seconds) |
| 17:26:36 | <dsal> | tomsmeding: Yeah, I'm just not going to bother with a flag to specify a config file. Though I could actually do that with what I've started. I'm using optparse-applicative and I've just changed my `options :: Parser Options` to be `options :: Options -> Parser Options`. Theoretically, I could just run the parser, pull out a config file path. Merge those, and then run the parser again. So many Options. |
| 17:26:42 | <dsal> | But I'm just going to do the "works for me" simple thing first. |
| 17:27:11 | <tomsmeding> | mrianbloom: perhaps a hack, pass -fprint-potential-instances and give the instance that ghc picks (and you don't want) a GHC.TypeLits.TypeError superclass |
| 17:27:38 | <tomsmeding> | dsal: heh |
| 17:27:40 | <mrianbloom> | I'll try that. |
| 17:27:49 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 17:28:08 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 17:28:12 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 17:29:11 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:29:45 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 17:30:30 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 17:32:47 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 17:35:22 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 17:39:32 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 17:39:47 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds) |
| 17:39:53 | <dsal> | What's the least awful config file format these days? I'm trying to resist writing a config file format. |
| 17:40:09 | <c_wraith> | maybe toml? |
| 17:40:26 | <dsal> | That's the first thing that came to mind, so I'll give it a go. Thanks. |
| 17:41:17 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:41:44 | → | bjourne joins (~bjorn@94.191.136.12.mobile.tre.se) |
| 17:42:05 | <yushyin> | maybe also dhall, if you like it |
| 17:42:13 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:43:00 | <dsal> | I've used dhall once and thought it had some good theory (with terrible formatting). This particular project is closer to "put a couple commandline flags in a file" so nothing magic. |
| 17:43:44 | <dsal> | The time I used dhall, I actually needed a little scripting in my config (given a list of things, make a couple other lists of things). |
| 17:43:45 | <yushyin> | then I would also use TOML or even just INI |
| 17:50:00 | × | titibandit quits (~titibandi@xdsl-87-78-8-6.nc.de) (Remote host closed the connection) |
| 17:51:13 | × | dsrt^ quits (~dsrt@76.145.185.103) (Remote host closed the connection) |
| 17:51:27 | × | TonyStone31 quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 260 seconds) |
| 18:01:27 | → | random-jellyfish joins (~random-je@user/random-jellyfish) |
| 18:01:32 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 18:02:31 | <monochrom> | I wonder if I should form the unpopular opinion that cabal's file format is the least awful. :) |
| 18:03:08 | → | shapr joins (~user@68.54.166.125) |
| 18:03:34 | <monochrom> | But toml and dhall do benefit from hindsight. |
| 18:03:47 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 18:04:02 | → | TonyStone31 joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) |
| 18:05:51 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 18:08:46 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 18:09:10 | <sclv> | imho toml is a sweet spot for “generic config” |
| 18:09:53 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 18:10:11 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 18:10:20 | <sclv> | any further features would over complicate it without necessarily making it cover a ton more cases |
| 18:11:45 | × | michalz quits (~michalz@185.246.207.197) (Remote host closed the connection) |
| 18:12:39 | → | econo joins (uid147250@user/econo) |
| 18:12:55 | × | TonyStone31 quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 260 seconds) |
| 18:16:10 | × | phma_ quits (phma@2001:5b0:210f:1678:6fe2:e8ab:3dd5:da93) (Read error: Connection reset by peer) |
| 18:17:01 | → | ddellacosta joins (~ddellacos@89.45.224.170) |
| 18:17:17 | → | phma_ joins (~phma@host-67-44-208-73.hnremote.net) |
| 18:17:20 | → | chromoblob joins (~user@37.113.164.122) |
| 18:18:19 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Remote host closed the connection) |
| 18:20:45 | → | beteigeuze1 joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 18:20:57 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 18:20:57 | beteigeuze1 | is now known as beteigeuze |
| 18:23:52 | × | ddellacosta quits (~ddellacos@89.45.224.170) (Ping timeout: 268 seconds) |
| 18:24:01 | → | merijn joins (~merijn@86.86.29.250) |
| 18:24:12 | → | TonyStone31 joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) |
| 18:24:35 | phma_ | is now known as phma |
| 18:25:23 | → | ddellacosta joins (~ddellacos@89.45.224.59) |
| 18:25:24 | <dsal> | dhall has moved over to the "this is almost a scripting language, but super hard to do something that is adjacent to something that's super easy" |
| 18:25:48 | polo | is now known as money |
| 18:26:27 | → | AlexNoo_ joins (~AlexNoo@94.233.241.222) |
| 18:27:16 | → | beteigeuze1 joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 18:28:10 | × | Alex_test quits (~al_test@178.34.160.122) (Ping timeout: 240 seconds) |
| 18:28:30 | × | merijn quits (~merijn@86.86.29.250) (Ping timeout: 240 seconds) |
| 18:28:30 | × | AlexZenon quits (~alzenon@178.34.160.122) (Ping timeout: 240 seconds) |
| 18:30:01 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 18:30:01 | × | AlexNoo quits (~AlexNoo@178.34.160.122) (Ping timeout: 256 seconds) |
| 18:30:01 | beteigeuze1 | is now known as beteigeuze |
| 18:30:49 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 18:31:26 | → | drdo joins (~drdo@overlord.drdo.eu) |
| 18:35:58 | → | Alex_test joins (~al_test@94.233.241.222) |
| 18:36:33 | → | AlexZenon joins (~alzenon@94.233.241.222) |
| 18:38:39 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer) |
| 18:39:41 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 18:41:21 | × | zeenk quits (~zeenk@2a02:2f04:a20e:aa00::7fe) (Ping timeout: 256 seconds) |
| 18:42:51 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:45:07 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 18:46:55 | × | lechner quits (~lechner@debian/lechner) (Remote host closed the connection) |
| 18:47:38 | AlexNoo_ | is now known as AlexNoo |
| 18:49:13 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 18:51:25 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Remote host closed the connection) |
| 18:51:50 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 18:52:54 | → | beteigeuze joins (~Thunderbi@85.247.81.220) |
| 18:53:25 | <LemanR> | so I am working in xmonad but this is a general haskell question. so in this xmonad file I import files which ghc seems to know where these imports are located, how can I find these? I want to go through some to see how some work starting with finding where "myTerminal" is defined (it is in one of the imports i imagine) |
| 18:54:15 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 18:54:23 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 18:55:11 | <LemanR> | I did find /usr/lib64/xmonad-contrib/ghc/XMonad/ which may be correct but I think they are only binaries I can't read, unless there is a way to do that which I am unaware of |
| 18:55:22 | → | brettgilio joins (~brettgili@x-irc.gq) |
| 18:57:13 | × | TonyStone31 quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Ping timeout: 256 seconds) |
| 18:59:38 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 18:59:43 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Ping timeout: 260 seconds) |
| 19:00:25 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 19:01:14 | → | lechner joins (~lechner@2604:21c0:125:10f0::d35) |
| 19:01:20 | × | lechner quits (~lechner@2604:21c0:125:10f0::d35) (Changing host) |
| 19:01:20 | → | lechner joins (~lechner@debian/lechner) |
| 19:01:25 | <c_wraith> | LemanR: you can always check hackage for a particular library and see if the value is defined in it |
| 19:01:35 | <dsal> | @hoogle myTerminal |
| 19:01:36 | <lambdabot> | No results found |
| 19:01:53 | <dsal> | Oh. Hoogle is helpful if it's a symbol provided by the library. Not if it's your own. |
| 19:02:13 | <c_wraith> | lambdabot's hoogle is also only a small number of common packages |
| 19:02:23 | <c_wraith> | xmonad-contribute has a mytab, but not myTerminal |
| 19:02:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:04:46 | <LemanR> | I am beginning in haskell so xmonad is a cool first project. So because I am doing this to learn and I see tutorials saying just to set values to predefined startup hooks that doesn't tell me how the hook for terminal knows I am setting a terminal, or is that just a variable name an I am over thinking these hooks? |
| 19:04:53 | <LemanR> | ill find an example |
| 19:05:37 | <davean> | LemanR: seeing the code would help, I have suspicions though you're copying a config and this is a thing related to https://hackage.haskell.org/package/xmonad-0.17.1/docs/XMonad-Core.html#t:XConfig |
| 19:06:44 | <LemanR> | https://gitlab.com/dwt1/dotfiles/-/blob/70f70a9e132254dec83c8c20588f949886ad9254/.xmonad/xmonad.hs |
| 19:06:45 | <LemanR> | so on line 71 you see a bunch of "myTerminal" "myFont" etc etc. Are these just regular variables? I read they are 'hooks' but now when I look at this it just seems like a variable |
| 19:07:18 | <davean> | no that IS THEM BEING CREATED |
| 19:07:25 | <davean> | Thats their definition |
| 19:07:39 | <davean> | the hooks are what I linked above, https://hackage.haskell.org/package/xmonad-0.17.1/docs/XMonad-Core.html#t:XConfig |
| 19:07:47 | <davean> | You'll see they're referenced for that below |
| 19:08:15 | <davean> | They've just moved some config, but not other parts, to the top |
| 19:08:32 | <davean> | probably because they think they're the ones people wnat to change and they want people to not look at the rest of the file for the "standard" changes? |
| 19:10:29 | → | TonyStone31 joins (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) |
| 19:11:14 | → | johnw joins (~johnw@2600:1700:cf00:db0:99a3:483a:651:9bf1) |
| 19:13:07 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:13:12 | <LemanR> | oh ok, well seems like I was focusing on a problem that didn't exist lol |
| 19:13:48 | <davean> | LemanR: "good style" would involve them having a type specified, like |
| 19:14:03 | <davean> | myFont, myTerminal, myTextEditor :: String |
| 19:14:12 | <davean> | and similar, which might make it more clear they're definitions |
| 19:14:18 | <davean> | but any bare name at the top level is a definition |
| 19:14:27 | <monochrom> | Line 75 defines myTerminal. At that point it's just any variable without significance. Line 101 uses myTerminal. That's part of "xmonad $ ..." which gives myTerminal relevance. You don't have to call it myTerminal. You don't even have to call it anything, you can just directly say terminal = "alacritty". |
| 19:14:30 | <davean> | (Really the only other thing at the top level is like imports) |
| 19:14:55 | <davean> | Also on this note, I'm confused by alacritty |
| 19:14:59 | <c_wraith> | davean: .... well, that's not exactly true since they (IMO bad) change to allow top-level TH without an explicit splice |
| 19:15:07 | <davean> | Isn't its entire thing it is supposed to be fast? I tested it and its slower than urxvt |
| 19:15:10 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds) |
| 19:15:23 | <davean> | c_wraith: ugh what, when? |
| 19:15:39 | <davean> | also, TH isn't haskell, its an extension, and not a well done one at that |
| 19:15:41 | <c_wraith> | early in 8.x or late in 7.x. It was a whilea go now |
| 19:15:50 | <c_wraith> | *while ago |
| 19:15:59 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 19:16:33 | <c_wraith> | but if GHC encounters a top-level expression in a file, it assumes it is supposed to be TH |
| 19:16:44 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:16:58 | <davean> | That is litterly horrific |
| 19:17:06 | <EvanR> | today I learned |
| 19:17:35 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 19:17:47 | <LemanR> | today I learned, where these imports come from....I guess that might be valuable later *shrugs* back to customizing |
| 19:17:50 | <davean> | c_wraith: Where is the justification for that? |
| 19:18:00 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:18:06 | <c_wraith> | davean: I haven't got a clue |
| 19:18:31 | <davean> | I mean TH is just full of horrible engenering too - have you seen its Q monad? |
| 19:18:43 | × | beteigeuze quits (~Thunderbi@85.247.81.220) (Ping timeout: 260 seconds) |
| 19:18:57 | <c_wraith> | Q is confusing because it's nothing wrapping nothing wrapping an actual implementation |
| 19:19:13 | <johnw> | the Q monad flung me into the delta quadrant once |
| 19:19:17 | <davean> | c_wraith: Yah, but there is no implimentation of it that is valid |
| 19:19:27 | <davean> | you have to treat every impliemtation seperately |
| 19:19:39 | <davean> | EVERY SINGLE ONE has some part of Q that is undefined. |
| 19:19:44 | <EvanR> | @quote johnw the Q monad flung me into the delta quadrant once |
| 19:19:44 | <lambdabot> | No quotes match. The more you drive -- the dumber you get. |
| 19:19:51 | <davean> | like WTF is with that completely false abstraction? |
| 19:19:52 | <EvanR> | @remember johnw the Q monad flung me into the delta quadrant once |
| 19:19:52 | <lambdabot> | It is stored. |
| 19:20:03 | <monochrom> | The Q monad gave me the abs I've always dreamed of, so I'm not complaining. :) |
| 19:20:05 | <c_wraith> | I think that's less true now, since they split it into multiple classes |
| 19:20:22 | <johnw> | monochrom: and with those abs, all your problems with negativity disappeared? |
| 19:20:50 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 240 seconds) |
| 19:21:02 | <monochrom> | No, but I'm happy for every little bonus. |
| 19:21:15 | <johnw> | (forall x. abs (-x)....) |
| 19:21:22 | <monochrom> | Oh haha that. |
| 19:21:25 | <johnw> | ;-) |
| 19:22:13 | <monochrom> | Then yeah, actually both that and all my imaginary numbers become real again too. |
| 19:22:14 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 19:23:00 | <johnw> | in the voice of John Lennon: "Imagine there are no square roots of negative numbers..." |
| 19:23:06 | <davean> | I do wish more research would be put into TH to make it ... good. Its a very hard problem with little reward though. |
| 19:23:17 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds) |
| 19:23:53 | <johnw> | davean: agreed |
| 19:24:00 | → | wroathe joins (~wroathe@50.205.197.50) |
| 19:24:00 | × | wroathe quits (~wroathe@50.205.197.50) (Changing host) |
| 19:24:00 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:24:03 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:25:23 | <johnw> | I can see why meta-programming isn't too exciting academically; you don't get much from it that you couldn't get inefficiently by other means. So it's mainly just an implementation strategy |
| 19:25:45 | <davean> | Right, very little reward fo0r researchers, a lot for industry |
| 19:26:11 | <davean> | And TH isn't even solving enough of the problem to make it exciting yet I think |
| 19:26:19 | <davean> | TH is very limited in its scope and capabilities |
| 19:26:37 | <johnw> | it does make me long for Lisp though |
| 19:26:43 | <EvanR> | sometimes the haskell code should just be really dumb and repetitive, but I guess there's other ways to generate it |
| 19:26:48 | <johnw> | it's really good at that |
| 19:27:22 | <davean> | johnw: Yah well, uh, someday maybe you'll sit down and solve it. I think its out of my abilities though. |
| 19:27:23 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 19:27:41 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:28:06 | <EvanR> | like bindings generators, how do they work. </icp> |
| 19:28:16 | <ozkutuk[m]> | Any package suggestion for generating normally distributed random values? Just trying to generate more realistic values for my benchmarks |
| 19:28:55 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Client Quit) |
| 19:29:03 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:30:01 | <monochrom> | random-fu |
| 19:30:21 | <davean> | Second random-fu, mostly. |
| 19:30:38 | <monochrom> | I haven't used it. I saw it somewhere and bookmarked it. |
| 19:31:37 | <davean> | I've used it extensively. |
| 19:31:45 | <davean> | I ahve some problems with it, but it is pretty good |
| 19:31:56 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:31:57 | <ozkutuk[m]> | Looks like what I need, if a little overkill for my usecase |
| 19:32:02 | <ozkutuk[m]> | Thanks! |
| 19:36:16 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:39:36 | → | zer0bitz_ joins (~zer0bitz@196.244.192.54) |
| 19:40:51 | × | zer0bitz quits (~zer0bitz@196.244.192.56) (Ping timeout: 256 seconds) |
| 19:44:26 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 19:48:38 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 19:50:58 | → | machinedgod joins (~machinedg@clnet-b05-118.ikbnet.co.at) |
| 19:51:26 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 19:51:29 | → | stef204 joins (~stef204@user/stef204) |
| 19:51:38 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 19:54:35 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 19:57:13 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 20:00:04 | → | zeenk joins (~zeenk@188.25.233.172) |
| 20:01:41 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Remote host closed the connection) |
| 20:02:11 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Quit: beteigeuze) |
| 20:05:00 | × | zeenk quits (~zeenk@188.25.233.172) (Ping timeout: 268 seconds) |
| 20:05:47 | × | CiaoSen quits (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 20:05:48 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 20:08:24 | → | acidjnk joins (~acidjnk@p200300d6e7137a015d19df638f338baf.dip0.t-ipconnect.de) |
| 20:09:00 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1) |
| 20:09:18 | → | caryhartline joins (~caryhartl@2600:1700:2d0:8d30:3d51:c8c8:3b5:2cac) |
| 20:10:53 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 20:13:18 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 20:21:11 | → | ygsjg joins (~quassel@189.124.224.160) |
| 20:35:44 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 20:37:44 | → | titibandit joins (~titibandi@xdsl-87-78-8-6.nc.de) |
| 20:38:44 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 20:41:31 | × | machinedgod quits (~machinedg@clnet-b05-118.ikbnet.co.at) (Quit: leaving) |
| 20:41:43 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 20:42:18 | → | machinedgod joins (~machinedg@clnet-b05-118.ikbnet.co.at) |
| 20:44:19 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 20:44:21 | × | machinedgod quits (~machinedg@clnet-b05-118.ikbnet.co.at) (Client Quit) |
| 20:45:16 | → | machinedgod joins (~machinedg@clnet-b05-118.ikbnet.co.at) |
| 20:46:01 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds) |
| 20:48:00 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 20:48:48 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 20:49:41 | <juri_> | dumb question: i have a typeclass, and two instances that conform to it. can i create a type that has any type implementing that typeclass as a field? |
| 20:50:40 | × | ygsjg quits (~quassel@189.124.224.160) (Ping timeout: 260 seconds) |
| 20:50:54 | <geekosaur> | with an existential, which has shortcomings |
| 20:52:08 | <geekosaur> | GADTs may help |
| 20:53:55 | <juri_> | oh. that looks exactly like what i'm looking for. thanks. |
| 20:54:02 | <juri_> | *aims gun at foot* |
| 20:54:07 | <davean> | GADTs can have the same limitations, there are two real shortcomings. The first being syntax, the second being carrying an extra reference. |
| 20:55:43 | <geekosaur> | as usual, it's usually better t [put the constraint on functions consuming the type, rather than on/in the type itself |
| 20:55:55 | × | ephemient quits (uid407513@id-407513.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:57:27 | <juri_> | i only have one function that takes that type, so that's feasable. just experimenting with what 'looks' nicest. |
| 20:57:52 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 20:59:09 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 20:59:40 | <davean> | Generally I'd make the type you match the class on a parameter to the type holding it |
| 20:59:50 | <davean> | juri_: it isn't just what looks nicest, it is also what performs best |
| 21:00:04 | <davean> | There are *technical* implications to this choice |
| 21:00:09 | <geekosaur> | and doesn't leave you a tangled mess on a later refactor |
| 21:00:25 | <geekosaur> | but yes, the technical issue can matter quite a bit |
| 21:00:42 | <davean> | There are reasons to take the technical hit, but seriously, its a decision, not what "looks nicest" |
| 21:01:06 | → | dfee joins (~dfee@2600:1010:b029:52ce:259d:4cf9:3d51:d746) |
| 21:02:03 | <davean> | I use existentials all the time, but I use it for reasons. |
| 21:02:15 | <davean> | It has a different MEANING |
| 21:03:32 | <juri_> | interesting. |
| 21:03:58 | <juri_> | yeah, i think i'll just mutate the caller, and the callee. seems uglier, but more sane. |
| 21:05:56 | → | pavonia joins (~user@user/siracusa) |
| 21:06:58 | <EvanR> | mutate the caller?! |
| 21:07:04 | × | random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed) |
| 21:07:10 | <EvanR> | is this C programming or |
| 21:07:19 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:07:28 | <davean> | EvanR: no, no, its assembly patching, clearly. |
| 21:07:51 | <juri_> | 8 years of haskell, and i still can't clean the C off of me. :) |
| 21:08:20 | <davean> | juri_: BTW is the difference in meaning clear to you out of curiosity? |
| 21:08:37 | <davean> | and why putting it on the caller allows more performant implimentations? |
| 21:08:41 | <davean> | er |
| 21:08:43 | <davean> | on the function |
| 21:09:55 | <juri_> | no, i expected this to desugar during compilation. i try to treat haskell not-like-C, but i'm bad at it. |
| 21:10:31 | <davean> | Well, if it is on the function, the class dictionary is passed as a parameter and you can inline that and specialize it. |
| 21:10:33 | <juri_> | i write "C with thunks and no state, but backwards". it's still not haskell. |
| 21:11:12 | <davean> | if you use an existential, it is the data type that carries that dictionary |
| 21:11:35 | <juri_> | oh. ok, that makes sense. |
| 21:11:37 | <davean> | which changes what is knowable and deterministic |
| 21:11:49 | <davean> | so they dispatch differentl |
| 21:12:02 | <davean> | (Because they HAVE to dispatch differently) |
| 21:12:37 | × | mtjm quits (~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection) |
| 21:12:54 | <davean> | which also means the existential version is a larger datastructure in memory |
| 21:13:10 | → | chromoblob joins (~user@37.113.164.122) |
| 21:13:19 | <davean> | you could recover some of the function level constraint dispatch with a JIT but we don't have a JIT implimentaiton for Haskell |
| 21:13:31 | <davean> | the existential moves the dispatch to runtime from compile time |
| 21:13:52 | → | mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001) |
| 21:14:22 | <davean> | Ok, I feel thats a bad explanation |
| 21:14:25 | <davean> | well I tried |
| 21:14:52 | <juri_> | I'm abusing two types, in order to model the property of normalization. i have a geometric algebra library in which some functions require normalization, some don't. the ones that require it, just use a call to normalize that is implemented for the un-normalized type, and a no-op for the normalized type. |
| 21:15:05 | → | nate4 joins (~nate@98.45.169.16) |
| 21:15:45 | <davean> | That seems ... fine? |
| 21:15:51 | <davean> | Where is the abuse in that? :-p |
| 21:15:56 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 21:16:14 | <davean> | Though, I might use laziness for it myself ... |
| 21:16:19 | <juri_> | it's weird to be using a type like this. <I_AM_A_C_PROGRAMMER.GIF> |
| 21:17:14 | <juri_> | I had a place where i can take either a value that is one of the normalized/un-normalized, or the thing i convert into that value. now i can't fill one side of the either with a typeclass. |
| 21:17:32 | <davean> | at the top level if you call "normalize my_non_normalized_thing" you just get a thunk to the normalized version, and if you make normalize lazy you just normalize the parts you need to as you go. |
| 21:17:34 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 21:17:36 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 21:17:43 | <EvanR> | well, to vary the behavior of something it's not always best to use a type class |
| 21:17:55 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 21:18:10 | <davean> | I'd generally lean towards the lazy type conversion approach when you can personally. |
| 21:18:10 | <EvanR> | practically it seems like type classes are good when you don't want to pass the dictionary around |
| 21:18:20 | <juri_> | I'm three years into developing a geometry library. "best" is not what i'm going for. i want working, first. :) |
| 21:18:37 | × | cheater quits (~Username@user/cheater) (Quit: BitchX: use only under adult supervision) |
| 21:18:40 | <EvanR> | if you use existentials it's kind of like passing the dictionary around |
| 21:18:53 | <davean> | EvanR: its LITTERALLY passing the dictionary around |
| 21:18:59 | <davean> | the relation is identity |
| 21:19:44 | → | cheater joins (~Username@user/cheater) |
| 21:20:12 | <juri_> | in an earlier form of this engine, un-normalized and normalized were constructors of the same type. now the type has become the typeclass, and the constructors are separate types. makes my return types a lot more factual. |
| 21:20:14 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 21:20:16 | <EvanR> | in which case maybe think about, actually passing an explicit "dictionary" (record of functions, single function, or even single value) around |
| 21:20:18 | <davean> | juri_: is there a particular reason you don't define the translation to make the call like I just discussed? |
| 21:20:51 | <juri_> | davean: i'd have to understand what you just discussed. :) |
| 21:21:30 | <davean> | juri_: make the type that has to work with both only work on one type, and wrap the unnormalized type with a normalizer to call that function |
| 21:21:37 | <davean> | er |
| 21:21:39 | <davean> | make the FUNCTION |
| 21:22:08 | <davean> | f :: (Normalizable g, Geometry g) => g -> r |
| 21:22:10 | <davean> | to |
| 21:22:22 | <juri_> | https://github.com/Haskell-Things/HSlice/blob/tip/Graphics/Slicer/Math/PGAPrimitives.hs |
| 21:22:22 | <davean> | f :: NomralizedGeometryType -> r |
| 21:22:30 | <EvanR> | otoh it sounds like taking any advice whatever from us will cause the nth rewrite xD |
| 21:22:36 | <davean> | and when you have "f nonNormalized" |
| 21:22:45 | <davean> | call "f (normalize nonNormalized) |
| 21:22:51 | <juri_> | EvanR: i'm up to at least the fourth. :) |
| 21:22:51 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 260 seconds) |
| 21:23:46 | <davean> | juri_: that looks like it does work, but if it is lazy it only does work *as it is required by the called function* |
| 21:23:48 | <juri_> | i think i've put the burden on the caller, rather than the callee. that way callees can work with values that are un-normalized. |
| 21:24:26 | <davean> | I have no idea where in that file I should look and I have 3 minutes left |
| 21:24:34 | <davean> | So I'm just gonna not. |
| 21:24:44 | <juri_> | er. exactly the opposite of what i just said. if a function requires normalized inputs, it accepts a member of the typeclass, calls normalize, which is id essentially for normalized values. |
| 21:24:49 | <juri_> | :) |
| 21:24:58 | <juri_> | s'ok. |
| 21:25:32 | <EvanR> | another wild tangent is having 1 type which is either normalized or not, and tracking the fact that it is normalized, or not, or unknown in a phantom type param |
| 21:26:52 | <juri_> | oh, sorry, wrong branch: https://github.com/Haskell-Things/HSlice/blob/ProjectiveLine2/Graphics/Slicer/Math/PGAPrimitives.hs#L177 |
| 21:28:06 | <juri_> | note the normalize member, which is id, with a mempty in a tuple, representing the error that occured during the calculation (none, becauase it's id). |
| 21:28:30 | <juri_> | where the next function has a call to a normalization function instead. |
| 21:29:15 | <juri_> | ... no, i don't write very good haskell. |
| 21:31:53 | × | titibandit quits (~titibandi@xdsl-87-78-8-6.nc.de) (Remote host closed the connection) |
| 21:32:50 | <davean> | I'm no longer here, but can we help you to write good haskell? |
| 21:33:17 | × | lagash quits (lagash@lagash.shelltalk.net) (Ping timeout: 246 seconds) |
| 21:34:03 | <EvanR> | this message was never sent |
| 21:35:18 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 21:36:46 | <juri_> | the conversation started with me looking at https://github.com/Haskell-Things/HSlice/blob/ProjectiveLine2/Graphics/Slicer/Math/PGA.hs#L278 , and wondering if i could prevent having to cast to use this bit of sugar, and causing a double normalization. sounds like i should rip it out in both places, and just use "(ProjectiveLine2 a) => Either LineSeg a" everywhere. |
| 21:37:22 | <juri_> | hmm. thinking about it, i don't know if that will work, either. |
| 21:37:39 | <juri_> | such a simple case (sugar-wise), but quite a mess. |
| 21:37:54 | <juri_> | i think i'll just leave it aloone, and fight the next battle in my code. |
| 21:39:02 | <EvanR> | yeah ProjectiveLine2 seems like a single abstract data type rather than a type class |
| 21:39:59 | <juri_> | that's how i had it implemented, but it meant i couldn't at a glance tell which constructor i was returning values in. |
| 21:40:00 | <EvanR> | but when type classes go rogue, there's always a way to deal with it |
| 21:40:18 | <EvanR> | like existentials, reflection, |
| 21:40:27 | <EvanR> | instead of rewriting it xD |
| 21:40:38 | → | Heyting joins (~Heyting@193.198.16.217) |
| 21:41:51 | <EvanR> | if it was 1 data type you could see the constructors. And if it was an abstract type you can always define "views" of the ADT which return something with constructors relevant to the view |
| 21:42:41 | <EvanR> | you could also add views to the type class |
| 21:44:00 | <juri_> | when i was implementing functions with them being members of the same type, i kept having to pattern match, to know if i needed to normalize. this gets ugly when you're on your third case point of... |
| 21:45:41 | <EvanR> | well, if the normalize function has type ProjectiveLine -> ProjectiveLine, you could just apply it |
| 21:45:50 | <EvanR> | if would cost the same as checking if it needs to be normalized first |
| 21:46:24 | <juri_> | yeah, it might be prudent to back off the over-typeclassification. |
| 21:47:13 | <EvanR> | otoh, you could do like the Rational type and just always be normalized |
| 21:47:43 | <juri_> | causes precision loss. every time i touch anything, it turns to.. something not nice. :) |
| 21:47:48 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 21:47:58 | <EvanR> | oh, we're using floats... |
| 21:48:31 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 21:48:45 | <juri_> | very yes. |
| 21:48:59 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 260 seconds) |
| 21:49:08 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 21:49:08 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 21:49:08 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:49:12 | <juri_> | and trying to track error caused by each time we touch things. |
| 21:49:22 | <juri_> | it's.. not going great, but is going. |
| 21:49:34 | × | bjourne quits (~bjorn@94.191.136.12.mobile.tre.se) (Quit: Konversation terminated!) |
| 21:49:37 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 21:49:37 | <juri_> | i even have some things that actually work. |
| 21:49:45 | <EvanR> | sounds handy, at the end when you have the result and the error, you can just add them to get the right answer xD |
| 21:50:19 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 21:50:37 | <juri_> | no, but if i have the result, and the maximum amount of error, i can use that to reason about the shape of answers. |
| 21:50:54 | <EvanR> | interval analysis? |
| 21:51:07 | <juri_> | yep. my own, backwards form. |
| 21:52:32 | <juri_> | it needs yet another rewrite, but some parts of it are actually working every time. property tests and floating point may have already driven me mad. :) |
| 21:54:08 | × | stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.7.1) |
| 21:57:18 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 21:58:04 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 21:58:41 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 22:02:10 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 22:04:39 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 22:04:59 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:05:37 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 22:06:15 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 22:07:11 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 22:07:38 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:09:02 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 22:10:17 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 22:11:04 | ← | mrianbloom parts (uid350277@id-350277.ilkley.irccloud.com) () |
| 22:11:59 | → | ygsjg joins (~quassel@189.124.224.160) |
| 22:12:10 | → | califax joins (~califax@user/califx) |
| 22:12:47 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 22:12:56 | → | shriekingnoise joins (~shrieking@186.137.167.202) |
| 22:14:14 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 22:14:24 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 22:15:08 | × | dfee quits (~dfee@2600:1010:b029:52ce:259d:4cf9:3d51:d746) (Quit: dfee) |
| 22:21:46 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:25:04 | → | `2jt joins (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) |
| 22:26:47 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 22:33:46 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 22:39:04 | × | lechner quits (~lechner@debian/lechner) (Remote host closed the connection) |
| 22:39:43 | → | lechner joins (~lechner@debian/lechner) |
| 22:44:52 | → | michalz joins (~michalz@185.246.207.221) |
| 22:47:33 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 22:49:04 | → | kaskal joins (~kaskal@089144207012.atnat0016.highway.bob.at) |
| 22:52:23 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 22:52:40 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) (Remote host closed the connection) |
| 22:53:23 | × | adium quits (adium@user/adium) (Ping timeout: 252 seconds) |
| 22:54:39 | × | vglfr quits (~vglfr@145.224.100.100) (Remote host closed the connection) |
| 22:54:54 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 22:55:23 | → | vglfr joins (~vglfr@145.224.100.100) |
| 22:57:22 | × | vglfr quits (~vglfr@145.224.100.100) (Remote host closed the connection) |
| 22:57:50 | → | biberu joins (~biberu@user/biberu) |
| 22:57:56 | → | vglfr joins (~vglfr@145.224.100.100) |
| 22:59:31 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 23:00:57 | × | lechner quits (~lechner@debian/lechner) (Remote host closed the connection) |
| 23:02:17 | → | lechner joins (~lechner@debian/lechner) |
| 23:05:36 | → | lagash joins (lagash@lagash.shelltalk.net) |
| 23:11:05 | × | michalz quits (~michalz@185.246.207.221) (Remote host closed the connection) |
| 23:12:09 | <EvanR> | this bitstring type in elixir is pretty snazzy, I guess the idiomatic way to get a bit string in haskell is list of Bit |
| 23:12:27 | → | ropwareJB joins (~ropwareJB@180-150-36-243.b49624.bne.nbn.aussiebb.net) |
| 23:13:47 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 23:15:03 | × | machinedgod quits (~machinedg@clnet-b05-118.ikbnet.co.at) (Ping timeout: 256 seconds) |
| 23:18:21 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:c87d:35ff:3ab7:8a28) |
| 23:18:38 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 23:21:05 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 23:22:08 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 23:24:39 | × | kaskal quits (~kaskal@089144207012.atnat0016.highway.bob.at) (Ping timeout: 260 seconds) |
| 23:24:53 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 23:25:07 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 23:25:17 | → | kaskal joins (~kaskal@89.144.223.95) |
| 23:28:17 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 23:30:06 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 23:34:24 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 23:47:31 | → | causal joins (~user@50.35.83.177) |
| 23:48:05 | × | TonyStone31 quits (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Quit: Leaving) |
| 23:48:39 | → | mikoto-chan joins (~mikoto-ch@85-76-104-247-nat.elisa-mobile.fi) |
| 23:48:51 | → | bobbingbob joins (~bobbingbo@2604:3d09:207f:f650::b469) |
| 23:49:03 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 256 seconds) |
| 23:51:45 | <Axman6> | EvanR: I'm guessing that's just a layer on top of Erlang's amazing bitstring support. I wish we had a similar thing in Haskell |
| 23:51:56 | × | `2jt quits (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 268 seconds) |
| 23:51:57 | <EvanR> | yeah |
| 23:52:35 | <Rembane> | Are there ways to add more pattern matching to Haskell? |
| 23:52:52 | <johnw> | You mean, like with pattern synonyms? |
| 23:53:26 | <Rembane> | Yeah, or... I don't know, I'm just asking stupid questions and hoping for the best. :) |
| 23:55:52 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Quit: Leaving) |
| 23:57:17 | → | j4cc3b joins (~j4cc3b@pool-74-105-2-138.nwrknj.fios.verizon.net) |
| 23:59:57 | <bobbingbob> | Rembane: I find that's the best approach |
All times are in UTC on 2022-11-13.