2022-03-09 00:00:26 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:00:44 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:01:48 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 00:03:09 +0100 | juri__ | (~juri@79.140.115.116) |
2022-03-09 00:04:16 +0100 | juri_ | (~juri@178.63.35.222) (Ping timeout: 256 seconds) |
2022-03-09 00:04:50 +0100 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
2022-03-09 00:05:03 +0100 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
2022-03-09 00:06:46 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:06:46 +0100 | juri__ | (~juri@79.140.115.116) (Read error: Connection reset by peer) |
2022-03-09 00:07:05 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:08:09 +0100 | juri_ | (~juri@178.63.35.222) |
2022-03-09 00:09:29 +0100 | kimjetwav | (~user@2607:fea8:2363:8f00:9e8a:8fa1:6b4e:dd92) |
2022-03-09 00:13:01 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-03-09 00:13:48 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
2022-03-09 00:14:08 +0100 | acidjnk | (~acidjnk@p200300d0c7049f27690562e0ba62f824.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-03-09 00:14:12 +0100 | ph88 | (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving) |
2022-03-09 00:19:48 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:20:06 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:23:23 +0100 | liskin | (~liskin@xmonad/liskin) (Quit: liskin) |
2022-03-09 00:23:42 +0100 | liskin | (~liskin@xmonad/liskin) |
2022-03-09 00:24:18 +0100 | da39a3ee5e6b4b0d | (~textual@mx-ll-171.5.29-46.dynamic.3bb.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 00:26:10 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:26:28 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:28:08 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:28:26 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:29:26 +0100 | lisk1n | (~liskin@xmonad/liskin) |
2022-03-09 00:29:49 +0100 | Maxdaman1us | (~Maxdamant@user/maxdamantus) |
2022-03-09 00:30:17 +0100 | Maxdamantus | (~Maxdamant@user/maxdamantus) (Killed (NickServ (GHOST command used by Maxdaman1us))) |
2022-03-09 00:30:25 +0100 | Maxdaman1us | Maxdamantus |
2022-03-09 00:32:16 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 00:32:34 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 00:33:29 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Remote host closed the connection) |
2022-03-09 00:33:51 +0100 | lisk1n | (~liskin@xmonad/liskin) (Client Quit) |
2022-03-09 00:33:59 +0100 | liskin | (~liskin@xmonad/liskin) (Quit: liskin) |
2022-03-09 00:34:04 +0100 | euouae | (~euouae@user/euouae) (Quit: bye) |
2022-03-09 00:34:30 +0100 | liskin | (~liskin@xmonad/liskin) |
2022-03-09 00:34:56 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 00:35:18 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-03-09 00:35:55 +0100 | <iphy> | I'm starting to not be a big fan of MonadFail |
2022-03-09 00:36:18 +0100 | <iphy> | being limited to single strings |
2022-03-09 00:36:40 +0100 | <monochrom> | That is why it was separated out from Monad. It is very niche, yes. |
2022-03-09 00:37:00 +0100 | <iphy> | I don't know what the right alternative is though |
2022-03-09 00:37:05 +0100 | <iphy> | I've been playing with MonadValidate |
2022-03-09 00:37:30 +0100 | michalz | (~michalz@185.246.204.93) (Remote host closed the connection) |
2022-03-09 00:37:37 +0100 | <geekosaur> | ExceptT, Validate, Chronicle |
2022-03-09 00:37:42 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) (Ping timeout: 256 seconds) |
2022-03-09 00:37:49 +0100 | <geekosaur> | in roughly ascending order of complexity-but-capability |
2022-03-09 00:37:50 +0100 | worldhelloworld | (~c1utt4r@164.68.96.37) (Ping timeout: 260 seconds) |
2022-03-09 00:38:28 +0100 | <monochrom> | If you intend actually informative and/or machine-readable errors, it's ExceptT or Validate or equivalent, yeah. MonadFail has a different purpose where a meh String suffices. |
2022-03-09 00:38:57 +0100 | <monochrom> | Indeed most MonadFail instances throw away the string altogether. |
2022-03-09 00:39:06 +0100 | <iphy> | yeah that's annoying |
2022-03-09 00:39:43 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2022-03-09 00:39:48 +0100 | <iphy> | I like the thing about Validate where it can collect multiple failures in one go |
2022-03-09 00:39:55 +0100 | lavaman | (~lavaman@98.38.249.169) |
2022-03-09 00:40:08 +0100 | <iphy> | that's why I'm using that now for msgpack |
2022-03-09 00:40:17 +0100 | <geekosaur> | Chronicle distinguishes between warnings, errors that it can continue from, and errors it can't |
2022-03-09 00:41:07 +0100 | <geekosaur> | it's kinda the swiss army knife of exception handlers |
2022-03-09 00:41:21 +0100 | sooch_ | (sid533113@id-533113.hampstead.irccloud.com) (Ping timeout: 252 seconds) |
2022-03-09 00:41:21 +0100 | supersven | (sid501114@id-501114.ilkley.irccloud.com) (Ping timeout: 252 seconds) |
2022-03-09 00:41:21 +0100 | jackdk | (sid373013@cssa/jackdk) (Ping timeout: 252 seconds) |
2022-03-09 00:41:21 +0100 | _0x47_ | (sid508683@id-508683.tinside.irccloud.com) (Ping timeout: 252 seconds) |
2022-03-09 00:41:24 +0100 | Franciman | (~Franciman@mx1.fracta.dev) (Read error: Connection reset by peer) |
2022-03-09 00:41:38 +0100 | Franciman | (~Franciman@mx1.fracta.dev) |
2022-03-09 00:41:50 +0100 | <haskellnoob> | any ideas how I can implement FromJSON for this? https://pastebin.com/s4PmvKx1 |
2022-03-09 00:41:54 +0100 | Firedancer | (sid336191@id-336191.hampstead.irccloud.com) (Ping timeout: 252 seconds) |
2022-03-09 00:41:54 +0100 | lexi-lambda | (sid92601@id-92601.hampstead.irccloud.com) (Ping timeout: 252 seconds) |
2022-03-09 00:41:54 +0100 | PotatoGim | (sid99505@id-99505.lymington.irccloud.com) (Read error: No route to host) |
2022-03-09 00:41:54 +0100 | integral | (sid296274@user/integral) (Read error: Connection reset by peer) |
2022-03-09 00:41:54 +0100 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:54 +0100 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:54 +0100 | jonrh | (sid5185@id-5185.ilkley.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:55 +0100 | rubin55 | (sid175221@id-175221.hampstead.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:55 +0100 | ehamberg | (sid18208@id-18208.hampstead.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:55 +0100 | carter | (sid14827@id-14827.helmsley.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:55 +0100 | hugo | (znc@verdigris.lysator.liu.se) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-03-09 00:41:55 +0100 | nrr___ | (sid20938@id-20938.lymington.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:55 +0100 | gonz_____ | (sid304396@id-304396.lymington.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:56 +0100 | dsal | (sid13060@id-13060.lymington.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:56 +0100 | lally | (sid388228@id-388228.uxbridge.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:41:56 +0100 | bw | (sid2730@user/betawaffle) (Read error: Connection reset by peer) |
2022-03-09 00:41:57 +0100 | elvishjerricco | (sid237756@id-237756.helmsley.irccloud.com) (Read error: Connection reset by peer) |
2022-03-09 00:42:01 +0100 | zeenk | (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Remote host closed the connection) |
2022-03-09 00:42:06 +0100 | S11001001 | (sid42510@id-42510.ilkley.irccloud.com) |
2022-03-09 00:42:06 +0100 | Firedancer | (sid336191@id-336191.hampstead.irccloud.com) |
2022-03-09 00:42:07 +0100 | jackdk | (sid373013@cssa/jackdk) |
2022-03-09 00:42:10 +0100 | integral | (sid296274@user/integral) |
2022-03-09 00:42:10 +0100 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) |
2022-03-09 00:42:10 +0100 | ehamberg | (sid18208@id-18208.hampstead.irccloud.com) |
2022-03-09 00:42:10 +0100 | lexi-lambda | (sid92601@id-92601.hampstead.irccloud.com) |
2022-03-09 00:42:11 +0100 | rubin55 | (sid175221@id-175221.hampstead.irccloud.com) |
2022-03-09 00:42:12 +0100 | elvishjerricco | (sid237756@id-237756.helmsley.irccloud.com) |
2022-03-09 00:42:14 +0100 | lally | (sid388228@id-388228.uxbridge.irccloud.com) |
2022-03-09 00:42:14 +0100 | dsal | (sid13060@id-13060.lymington.irccloud.com) |
2022-03-09 00:42:15 +0100 | hugo | (znc@verdigris.lysator.liu.se) |
2022-03-09 00:42:15 +0100 | _0x47_ | (sid508683@id-508683.tinside.irccloud.com) |
2022-03-09 00:42:16 +0100 | sooch_ | (sid533113@id-533113.hampstead.irccloud.com) |
2022-03-09 00:42:17 +0100 | PotatoGim | (sid99505@id-99505.lymington.irccloud.com) |
2022-03-09 00:42:18 +0100 | supersven | (sid501114@id-501114.ilkley.irccloud.com) |
2022-03-09 00:42:21 +0100 | nrr___ | (sid20938@id-20938.lymington.irccloud.com) |
2022-03-09 00:42:24 +0100 | bw | (sid2730@user/betawaffle) |
2022-03-09 00:42:24 +0100 | zeenk | (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) |
2022-03-09 00:42:28 +0100 | <monochrom> | As with other things, Haskellers discovered the cold hard truth that other language communities deny: so-called "error", "error raising", and "error handling" are very broad, the subniches conflict with each other, do not expect one single standard, expect multiple standards for multiple contexts. |
2022-03-09 00:42:28 +0100 | jonrh | (sid5185@id-5185.ilkley.irccloud.com) |
2022-03-09 00:42:30 +0100 | carter | (sid14827@id-14827.helmsley.irccloud.com) |
2022-03-09 00:42:33 +0100 | gonz_____ | (sid304396@id-304396.lymington.irccloud.com) |
2022-03-09 00:42:37 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-03-09 00:43:33 +0100 | jaror[m] | (~jaror@2001:470:69fc:105::265) (Ping timeout: 252 seconds) |
2022-03-09 00:43:33 +0100 | maralorn | (~maralorn@2001:470:69fc:105::251) (Ping timeout: 252 seconds) |
2022-03-09 00:44:06 +0100 | kadoban | (~kadoban@user/kadoban) (Ping timeout: 252 seconds) |
2022-03-09 00:44:06 +0100 | andreabedini[m] | (~andreabed@2001:470:69fc:105::c821) (Ping timeout: 252 seconds) |
2022-03-09 00:44:06 +0100 | schuelermine[m] | (~schuelerm@user/schuelermine) (Ping timeout: 252 seconds) |
2022-03-09 00:44:06 +0100 | Deide | (~deide@user/deide) (Ping timeout: 252 seconds) |
2022-03-09 00:44:06 +0100 | vaibhavsagar[m] | (~vaibhavsa@2001:470:69fc:105::ffe) (Ping timeout: 252 seconds) |
2022-03-09 00:45:13 +0100 | chenqisu1 | (~chenqisu1@183.217.201.47) |
2022-03-09 00:45:59 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-03-09 00:46:25 +0100 | hughjfchen | (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8) |
2022-03-09 00:46:28 +0100 | <haskellnoob> | I put some more context how the json array looks like here: https://pastebin.com/HbXV8tbf |
2022-03-09 00:48:51 +0100 | <Axman6> | haskellnoob: deriving (FromJSON)? :) |
2022-03-09 00:49:02 +0100 | <Axman6> | hmm, or not |
2022-03-09 00:49:21 +0100 | <haskellnoob> | ups |
2022-03-09 00:49:28 +0100 | <haskellnoob> | I meant implement, of course, my bad |
2022-03-09 00:49:30 +0100 | hughjfchen | (~hughjfche@vmi556545.contaboserver.net) |
2022-03-09 00:49:31 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 00:49:42 +0100 | <monochrom> | deriving-FromJSON probably does not know to do hex-coding. |
2022-03-09 00:50:16 +0100 | <haskellnoob> | hex-decoding is all good, my problem is I have multiple contructors in haskell and need to inspect the json array somehow |
2022-03-09 00:51:08 +0100 | <Axman6> | this would eactually be easier in waargonaut... but anyway. something like withArray "Tag" $ \xs -> case xs of ["e",eid,url] -> ...; ["p",pubKey,url] -> ...; _ -> fail "ohno" |
2022-03-09 00:51:15 +0100 | <haskellnoob> | I tried this: https://pastebin.com/qNkAegFv - without success |
2022-03-09 00:52:00 +0100 | <Axman6> | using parseJSON inside parseJSON definitely feels wrong to me |
2022-03-09 00:52:31 +0100 | <Axman6> | in the code you have there, x has both type EventId and XOnlyPubKey |
2022-03-09 00:52:31 +0100 | <haskellnoob> | hahaha, that's why I'm asking |
2022-03-09 00:52:46 +0100 | <haskellnoob> | exactly, that's the problem the compiler complains about |
2022-03-09 00:53:05 +0100 | <Axman6> | read out t, then do the case statement, at the very least |
2022-03-09 00:53:23 +0100 | <monochrom> | I am very pessimistic about any attempt at reusable FromJSON EventId for example, unless FromJSON EventId accepts "063df25d22738a838cbbdc3dee470e0c58284954" no more no less. |
2022-03-09 00:54:12 +0100 | <monochrom> | E.g., if FromJSON EventId "adds" so little "feature" as expecting a field name, then it ruins everything. |
2022-03-09 00:54:17 +0100 | <haskellnoob> | monochrom that's exactly how it works |
2022-03-09 00:54:30 +0100 | <monochrom> | This also applies to the rest, RelayURL, XOnlyPubKey. |
2022-03-09 00:54:36 +0100 | <haskellnoob> | yes |
2022-03-09 00:54:50 +0100 | <Axman6> | if you have a function Text -> Decoder EventId then you're off to a good start |
2022-03-09 00:55:27 +0100 | <Axman6> | (and the same for thew other types) |
2022-03-09 00:56:03 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
2022-03-09 00:56:28 +0100 | <Axman6> | the FromJSON instance for EventId isn't very useful, the way EventIds exist in this structure means they can't really be parsed in the usual ways |
2022-03-09 00:56:31 +0100 | maralorn | (~maralorn@2001:470:69fc:105::251) |
2022-03-09 00:56:48 +0100 | jaror[m] | (~jaror@2001:470:69fc:105::265) |
2022-03-09 00:57:21 +0100 | <haskellnoob> | one sec |
2022-03-09 00:58:46 +0100 | schuelermine[m] | (~schuelerm@user/schuelermine) |
2022-03-09 00:59:15 +0100 | <haskellnoob> | https://pastebin.com/9s1J0tCr - here are EventId and pubkey FromJSON instances included |
2022-03-09 00:59:29 +0100 | <haskellnoob> | I don't think they are any problem for me at the moment |
2022-03-09 00:59:32 +0100 | Deide | (~deide@user/deide) |
2022-03-09 01:00:13 +0100 | vaibhavsagar[m] | (~vaibhavsa@2001:470:69fc:105::ffe) |
2022-03-09 01:00:22 +0100 | <monochrom> | You can reused eventId' |
2022-03-09 01:00:32 +0100 | <monochrom> | err s/reused/reuse/ |
2022-03-09 01:00:35 +0100 | andreabedini[m] | (~andreabed@2001:470:69fc:105::c821) |
2022-03-09 01:00:35 +0100 | kadoban | (~kadoban@user/kadoban) |
2022-03-09 01:01:24 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds) |
2022-03-09 01:01:39 +0100 | <haskellnoob> | I think right now my problem is this line "t <- parseJSON $ v V.! 0", because it doesn't know what type that is |
2022-03-09 01:01:56 +0100 | <haskellnoob> | Compiler says: Probable fix: use a type annotation to specify what ‘a0’ should be. |
2022-03-09 01:02:05 +0100 | <Axman6> | there's this weird linguistic fad I keep seeing, especially from people in California, where they'll say things like that, like "this car needs cleaned", "this'll need renovated", completely dropping the "to be". it breaks my brain everytime I hear it on youtube |
2022-03-09 01:02:14 +0100 | <haskellnoob> | Ambiguous type variable ‘a0’ arising from the literal ‘"e"’ |
2022-03-09 01:03:03 +0100 | <haskellnoob> | Axman6 I'm not a native english speaker, please forgive me |
2022-03-09 01:03:07 +0100 | <Axman6> | haskellnoob: do EventId and XOnlyPubKey ever exist in json objects if the form { "id": "67912989239847893" }? seems like a weird FromJSON instance |
2022-03-09 01:03:13 +0100 | <Axman6> | haskellnoob: no, this was about monochrom's typo |
2022-03-09 01:03:45 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2022-03-09 01:03:48 +0100 | <geekosaur> | Axman6, it'salso a Pittsburgh thing |
2022-03-09 01:03:58 +0100 | <haskellnoob> | ok, so the json array looks like this: ["e", "063df25d22738a838cbbdc3dee470e0c58284954", "https://google.com"] - or with a p instead of e |
2022-03-09 01:04:00 +0100 | <geekosaur> | I keep thinking "-ing, not-ed!" |
2022-03-09 01:04:05 +0100 | <Axman6> | *seems like a weird instance given the example you gave of it being used in an array |
2022-03-09 01:04:06 +0100 | <monochrom> | Consider "real good" >:) |
2022-03-09 01:04:40 +0100 | <Axman6> | geekosaur: interesting - though for me, y'all are just "American" |
2022-03-09 01:05:12 +0100 | <Axman6> | (with California and Texas being basically their own countried) |
2022-03-09 01:05:49 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-03-09 01:05:53 +0100 | <haskellnoob> | I see what you mean, should be "parseJSON = withText "EventId" $ \i -> do" right? |
2022-03-09 01:06:10 +0100 | <Axman6> | yeah, that would be more useful |
2022-03-09 01:06:18 +0100 | <Axman6> | and would help with this code actually |
2022-03-09 01:06:31 +0100 | <haskellnoob> | thanks, at least one step further |
2022-03-09 01:06:44 +0100 | Dykam | (Dykam@dykam.nl) |
2022-03-09 01:07:21 +0100 | <haskellnoob> | he still complains about this line "t <- parseJSON $ v V.! 0" in the instance FromJSON Tag. |
2022-03-09 01:07:32 +0100 | <haskellnoob> | doesn't know what type it is |
2022-03-09 01:08:28 +0100 | <Axman6> | then you can do: withArray "Tag" $ \v -> do guard (V.length v == 3); case v ! 0 of (Text "p") -> ETag <$> ((,) <$> parseJSON (v ! 1) <*> parseJSON (v ! 2); (Text "e") -> ...; |
2022-03-09 01:08:30 +0100 | mmhat | (~mmh@55d49be1.access.ecotel.net) (Quit: WeeChat 3.4) |
2022-03-09 01:09:02 +0100 | <Axman6> | just match on the Text constructor of the Value |
2022-03-09 01:10:14 +0100 | ski | . o O ( s/(Text "p") ->/Text "p" ->/ ) |
2022-03-09 01:10:25 +0100 | <Axman6> | yeah, that too |
2022-03-09 01:11:24 +0100 | <Axman6> | haskellnoob: I thginkwhat you have in your last paste will work as long as you just do case v V.! 0 of Text "p" -> ...; Text "e" -> ...; _ -> fail "bad tag bro" |
2022-03-09 01:11:56 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-03-09 01:13:30 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2022-03-09 01:14:17 +0100 | <haskellnoob> | having this now: https://pastebin.com/zN1hQhx8 |
2022-03-09 01:14:36 +0100 | <haskellnoob> | which gives me this error: |
2022-03-09 01:14:37 +0100 | <haskellnoob> | parse error (possibly incorrect indentation or mismatched brackets) | 106 | Text "e" -> PTag <$> ((,) <$> parseJSON (v ! 1) <*> parseJSON (v ! 2) |
2022-03-09 01:15:05 +0100 | <Axman6> | need to close those brackets bro (which I forgot in my code, sorry) avter the (v ! 2)'s |
2022-03-09 01:15:07 +0100 | <Axman6> | after* |
2022-03-09 01:15:22 +0100 | <geekosaur> | paren counting is a useful skill |
2022-03-09 01:15:56 +0100 | <haskellnoob> | right |
2022-03-09 01:15:59 +0100 | <haskellnoob> | now: Not in scope: data constructor ‘Text’ |
2022-03-09 01:16:11 +0100 | <Axman6> | ETag <$> liftA2 (,) ... might also be a little cleaner |
2022-03-09 01:16:22 +0100 | <Axman6> | you need to import Value(Text) from Aeson |
2022-03-09 01:16:30 +0100 | <Axman6> | uh, it might be String actually |
2022-03-09 01:16:56 +0100 | <haskellnoob> | got it |
2022-03-09 01:16:57 +0100 | <haskellnoob> | one sec |
2022-03-09 01:17:11 +0100 | <Axman6> | yeah the type is String |
2022-03-09 01:17:17 +0100 | <Axman6> | uh, constructor* |
2022-03-09 01:17:26 +0100 | <Axman6> | ... | String !Text | ... |
2022-03-09 01:17:55 +0100 | <haskellnoob> | no way |
2022-03-09 01:18:00 +0100 | <haskellnoob> | this actually works |
2022-03-09 01:18:01 +0100 | <haskellnoob> | hahahaha |
2022-03-09 01:18:03 +0100 | <haskellnoob> | thanks guys |
2022-03-09 01:18:24 +0100 | <Axman6> | have you tested it with actual data? :) |
2022-03-09 01:19:05 +0100 | <haskellnoob> | actual data? are you crazy? the compiler says it's okay, I won't break the illusion now! |
2022-03-09 01:19:21 +0100 | <haskellnoob> | :) |
2022-03-09 01:20:21 +0100 | <Axman6> | JSON is stringly typed, it can always go wrong ;) |
2022-03-09 01:20:22 +0100 | <haskellnoob> | thanks Axman6, exa and monochrom |
2022-03-09 01:22:01 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 01:22:21 +0100 | haskellnoob | (~haskellno@181.122.131.227) |
2022-03-09 01:23:04 +0100 | haskellnoob | (~haskellno@181.122.131.227) (Remote host closed the connection) |
2022-03-09 01:25:08 +0100 | ubert | (~Thunderbi@p200300ecdf3be9b34516931a7c3fe14b.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
2022-03-09 01:27:07 +0100 | ubert | (~Thunderbi@p200300ecdf3be9b31a3c049f5a83f6ca.dip0.t-ipconnect.de) |
2022-03-09 01:28:21 +0100 | ubert | (~Thunderbi@p200300ecdf3be9b31a3c049f5a83f6ca.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
2022-03-09 01:28:30 +0100 | ubert1 | (~Thunderbi@p200300ecdf3be9b34946219f5177446d.dip0.t-ipconnect.de) |
2022-03-09 01:30:37 +0100 | kilolympus | (~kilolympu@31.205.200.235) (Ping timeout: 240 seconds) |
2022-03-09 01:30:48 +0100 | ubert1 | ubert |
2022-03-09 01:34:31 +0100 | kilolympus | (~kilolympu@31.205.200.235) |
2022-03-09 01:34:36 +0100 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds) |
2022-03-09 01:36:11 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 01:37:31 +0100 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 272 seconds) |
2022-03-09 01:38:45 +0100 | hyiltiz | (~quassel@31.220.5.250) |
2022-03-09 01:46:47 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 252 seconds) |
2022-03-09 01:47:17 +0100 | emf | (~emf@2620:10d:c090:400::5:33d6) (Ping timeout: 240 seconds) |
2022-03-09 01:48:37 +0100 | foul_owl | (~kerry@23.82.193.87) (Ping timeout: 240 seconds) |
2022-03-09 01:51:04 +0100 | foul_owl | (~kerry@174-21-76-71.tukw.qwest.net) |
2022-03-09 01:53:42 +0100 | emf | (~emf@2620:10d:c090:400::5:9fc8) |
2022-03-09 01:54:17 +0100 | mvk | (~mvk@2607:fea8:5cc3:7e00::45ee) |
2022-03-09 02:00:02 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:1c1a:3fa2:4926:7c5a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 02:00:41 +0100 | foul_owl | (~kerry@174-21-76-71.tukw.qwest.net) (Ping timeout: 256 seconds) |
2022-03-09 02:03:16 +0100 | dsrt^ | (~dsrt@50.232.121.75) (Ping timeout: 256 seconds) |
2022-03-09 02:03:42 +0100 | nattiestnate | (~nate@202.138.250.37) |
2022-03-09 02:04:04 +0100 | nattiestnate | (~nate@202.138.250.37) (Client Quit) |
2022-03-09 02:06:00 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-03-09 02:06:22 +0100 | kongsheng | (~kongsheng@71.28.228.142) |
2022-03-09 02:12:38 +0100 | Maxdamantus | (~Maxdamant@user/maxdamantus) (Ping timeout: 252 seconds) |
2022-03-09 02:13:05 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Quit: ec) |
2022-03-09 02:14:24 +0100 | Maxdamantus | (~Maxdamant@user/maxdamantus) |
2022-03-09 02:16:05 +0100 | x88x88x | (~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb) (Read error: Connection reset by peer) |
2022-03-09 02:16:05 +0100 | foul_owl | (~kerry@23.82.193.89) |
2022-03-09 02:17:48 +0100 | <DigitalKiwi> | is there some library for arbitrary(?) units. i want to quickly do maths on like miles per gallon per dollar etc. |
2022-03-09 02:18:22 +0100 | <dons> | https://hackage.haskell.org/package/units is the classic one i think |
2022-03-09 02:18:43 +0100 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-03-09 02:18:44 +0100 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-03-09 02:18:44 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-03-09 02:19:12 +0100 | <dons> | you'll need something else if you want to do currency conversions though, obvs. |
2022-03-09 02:23:18 +0100 | <janus> | how do i run the doctests for the random library? |
2022-03-09 02:24:38 +0100 | <geekosaur> | do you know about cabal-doctest? |
2022-03-09 02:25:42 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2022-03-09 02:32:39 +0100 | <janus> | geekosaur: yes, but i was told it is deprecated |
2022-03-09 02:35:34 +0100 | <janus> | in fact, i tried adding cabal-doctest, and that's when i was told it was deprecated: https://github.com/haskell/random/pull/128/files |
2022-03-09 02:35:54 +0100 | <janus> | so i am trying to figure out what i have misunderstood, what is the proper way to have doctests now? |
2022-03-09 02:36:32 +0100 | <geekosaur> | that seems odd since as far as I know there is no alternative currently |
2022-03-09 02:37:39 +0100 | <janus> | there is docspec by phadej, and you can invoke doctest as a interpreter since doctest-0.20: "cabal repl --with-ghc=doctest", see https://hackage.haskell.org/package/doctest-0.20.0/changelog |
2022-03-09 02:37:39 +0100 | <geekosaur> | certainly its hackage page doesn't mention one (but it does say it's deprecated, sadly) |
2022-03-09 02:38:24 +0100 | <janus> | but i don't think the random library would expect me to use either of these approaches, since it is older than doctest-0.20 and also doesn't mention docspec at all |
2022-03-09 02:39:38 +0100 | <janus> | i just think 'cabal test doctests --enable-tests' seems like a pretty intuitive way of executing the tests, what am i doing wrong? |
2022-03-09 02:39:51 +0100 | <janus> | because it fails with the message that i posted in a comment on that pr |
2022-03-09 02:39:54 +0100 | <hololeap> | I feel like I've asked this before, but is there any way to get `cabal repl` to open a specific module in a project? |
2022-03-09 02:41:28 +0100 | <dons> | $ cabal v2-repl My.Cool.Module ? |
2022-03-09 02:43:23 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 272 seconds) |
2022-03-09 02:44:14 +0100 | alt-romes | (~romes@44.190.189.46.rev.vodafone.pt) |
2022-03-09 02:45:53 +0100 | <hololeap> | I'm not actually sure what that does. it doesn't seem to matter which module I put there |
2022-03-09 02:46:25 +0100 | off^ | (~off@50.232.121.75) |
2022-03-09 02:46:45 +0100 | <dons> | oh it seems to load the package that contains My.Cool.Module |
2022-03-09 02:47:04 +0100 | <dons> | you still then have to load it with : :m My.Cool.Module |
2022-03-09 02:47:09 +0100 | romesrf | (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 256 seconds) |
2022-03-09 02:47:32 +0100 | <dons> | puts you in the right package tho |
2022-03-09 02:47:37 +0100 | <geekosaur> | I don'tthink ghci provides enough knobs for either cabal replor stack ghci to do that |
2022-03-09 02:49:06 +0100 | <hololeap> | hm, too bad. it would be really nice to "open" a module so I can play around with functions to see how they behave |
2022-03-09 02:49:29 +0100 | <geekosaur> | you can manually use :m asdons said |
2022-03-09 02:49:35 +0100 | <dons> | just use :m in the ghci prompt you get to |
2022-03-09 02:49:39 +0100 | <geekosaur> | it just can't "focus" it automatically for you |
2022-03-09 02:50:33 +0100 | ishutin | (~ishutin@84-236-40-230.pool.digikabel.hu) (Ping timeout: 256 seconds) |
2022-03-09 02:50:46 +0100 | <hololeap> | I guess :m + ... could work, although I like how regular ghci also pulls in the imports of a module when you open the file as an argument and also exposes "hidden" functions |
2022-03-09 02:51:13 +0100 | <dons> | $ cabal v2-repl Glean |
2022-03-09 02:51:13 +0100 | <dons> | [7 of 7] Compiling Glean ( glean/client/hs/Glean.hs, interpreted ) |
2022-03-09 02:51:13 +0100 | <dons> | Ok, 7 modules loaded. |
2022-03-09 02:51:13 +0100 | <dons> | *Glean> :m Glean.Angle |
2022-03-09 02:51:19 +0100 | <dons> | Prelude Glean.Angle> :t query |
2022-03-09 02:51:19 +0100 | <dons> | query |
2022-03-09 02:51:19 +0100 | <dons> | :: Glean.Typed.Binary.Type t => |
2022-03-09 02:51:19 +0100 | <dons> | Angle t -> Glean.Query.Thrift.Internal.Query t |
2022-03-09 02:51:31 +0100 | <dons> | tab completion works too. so you can explore the exported module a bit |
2022-03-09 02:51:49 +0100 | <hololeap> | can you reference any functions that aren't exported by Glean.Angle? |
2022-03-09 02:51:53 +0100 | <geekosaur> | and it's interpreted so it'll still have those "hidden" functions |
2022-03-09 02:52:00 +0100 | ishutin | (~ishutin@78-131-74-100.pool.digikabel.hu) |
2022-03-09 02:52:03 +0100 | <dons> | I think ghci can see all of it right? iirc |
2022-03-09 02:52:34 +0100 | <geekosaur> | I do this with xmonad somewhat regularly while testing and/or typing things |
2022-03-09 02:53:00 +0100 | <DigitalKiwi> | thanks dons |
2022-03-09 02:54:01 +0100 | <hololeap> | ultimately I would like to automate this to some degree so I can have a terminal open in my IDE with ghci loaded and the module imported |
2022-03-09 02:55:15 +0100 | <hololeap> | and also support different components |
2022-03-09 02:55:47 +0100 | <dons> | might need access to cabal internals if you want to do it programmatically |
2022-03-09 02:55:54 +0100 | <dons> | or the ghci library |
2022-03-09 02:56:04 +0100 | <dons> | people have done interactive shells like this via the ghci lib a few times in the past iirc |
2022-03-09 02:56:56 +0100 | <hololeap> | cool |
2022-03-09 02:57:02 +0100 | <dons> | i don't think cabal out of the box is quite the right thing, its close. but not exactly what you'd want for an IDE that's e.g. swtiching contexts following the editor |
2022-03-09 02:57:11 +0100 | <dons> | but its not far off what you need |
2022-03-09 02:57:58 +0100 | <hololeap> | I was thinking about trying to write a kate plugin for this |
2022-03-09 02:58:43 +0100 | <jackdk> | janus: whenever I wrote doctests, I did so by calling the doctest main from a test-suite. dunno if that helps |
2022-03-09 02:59:03 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Remote host closed the connection) |
2022-03-09 03:03:08 +0100 | kaph_ | (~kaph@93-39-148-20.ip76.fastwebnet.it) (Ping timeout: 250 seconds) |
2022-03-09 03:04:20 +0100 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection) |
2022-03-09 03:12:59 +0100 | yauhsien_ | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 03:15:46 +0100 | <janus> | jackdk: but then there is no communication of the dependencies (and other cabal information) to the test suite, right? i thought that was the rationale for using cabal-doctest or 'cabal repl --with-ghc=doctest' |
2022-03-09 03:16:55 +0100 | <jackdk> | *shrug*, but this worked (at least once): https://github.com/qfpl/semialign-extras |
2022-03-09 03:17:08 +0100 | <janus> | ok cool, thank you, i'll try |
2022-03-09 03:17:42 +0100 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
2022-03-09 03:18:31 +0100 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) |
2022-03-09 03:22:37 +0100 | vysn | (~vysn@user/vysn) |
2022-03-09 03:24:25 +0100 | AlexNoo_ | (~AlexNoo@178.34.161.220) |
2022-03-09 03:25:46 +0100 | kayvank | (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
2022-03-09 03:25:48 +0100 | <janus> | jackdk: i just tried executing the test suite on that project with ghc 8.10.7 and doctest 0.20, and it failed to find its dependencies. so it's a similar situation to what's happening with random |
2022-03-09 03:26:01 +0100 | AlexZenon | (~alzenon@178.34.160.24) (Ping timeout: 256 seconds) |
2022-03-09 03:26:27 +0100 | Alex_test | (~al_test@178.34.160.24) (Ping timeout: 272 seconds) |
2022-03-09 03:26:36 +0100 | theproffesor | (~theproffe@2601:282:8202:4a10::8622) (Quit: ¯\_(ツ)_/¯) |
2022-03-09 03:26:46 +0100 | <janus> | it seems to me like this is an approach that used to work, and now it doesn't. but cabal-doctest still works. i'd prefer if people had build-type:Custom and a working test suite over a test suite that doesn't execute... |
2022-03-09 03:27:54 +0100 | <janus> | but the bounds on semialign-extras are telling, since it has base<4.14, which means it worked until at least until ghc 8.8.4. (assuming the bounds are correct) |
2022-03-09 03:27:57 +0100 | AlexNoo | (~AlexNoo@178.34.160.24) (Ping timeout: 256 seconds) |
2022-03-09 03:28:30 +0100 | <janus> | but OTOH, i tried running the tests on random with ghc 8.6.5. so maybe it has to be an old doctest _and_ an old ghc |
2022-03-09 03:29:02 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2022-03-09 03:29:44 +0100 | <janus> | davean: now i understand why you prefer the older random releases ;) |
2022-03-09 03:30:06 +0100 | emf | (~emf@2620:10d:c090:400::5:9fc8) (Quit: emf) |
2022-03-09 03:30:53 +0100 | AlexZenon | (~alzenon@178.34.161.220) |
2022-03-09 03:31:00 +0100 | Alex_test | (~al_test@178.34.161.220) |
2022-03-09 03:32:03 +0100 | <jackdk> | janus: worked for me inside the nix shell. I suspect it's picking up the packages it needs from the shell |
2022-03-09 03:32:41 +0100 | <janus> | oh, maybe it is using ghc.environment files somehow? |
2022-03-09 03:39:10 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:6da2:b132:dfcb:fb0e) |
2022-03-09 03:39:22 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:6da2:b132:dfcb:fb0e) (Client Quit) |
2022-03-09 03:41:20 +0100 | <jackdk> | nix-shells use an old cabal v1-command-style "global" package db. I put "global" in quotes because it's contained within the nix shell. |
2022-03-09 03:42:36 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:20af:a1b:4b5f:e73) |
2022-03-09 03:43:49 +0100 | jz99 | (~jz99@150.203.68.4) |
2022-03-09 03:45:03 +0100 | yauhsienhuangtw | (~Yau-Hsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 03:45:19 +0100 | alt-romes | (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4) |
2022-03-09 03:47:57 +0100 | neurocyte0917090 | (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds) |
2022-03-09 03:48:14 +0100 | yauhsien | (~Yau-Hsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2022-03-09 03:51:30 +0100 | da39a3ee5e6b4b0_ | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 03:54:12 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:20af:a1b:4b5f:e73) (Ping timeout: 240 seconds) |
2022-03-09 03:55:49 +0100 | ubert1 | (~Thunderbi@p200300ecdf3be98ff66ac9efa0af0607.dip0.t-ipconnect.de) |
2022-03-09 03:56:26 +0100 | ubert | (~Thunderbi@p200300ecdf3be9b34946219f5177446d.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-03-09 03:56:26 +0100 | ubert1 | ubert |
2022-03-09 04:02:07 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 04:04:10 +0100 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
2022-03-09 04:04:48 +0100 | <davean> | janus: ;) |
2022-03-09 04:05:08 +0100 | <davean> | jackdk: it gets deeper |
2022-03-09 04:05:11 +0100 | <davean> | er, janus |
2022-03-09 04:07:42 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 04:09:41 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
2022-03-09 04:11:10 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-03-09 04:12:23 +0100 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-03-09 04:14:39 +0100 | [itchyjunk] | Guest4684 |
2022-03-09 04:14:39 +0100 | [_] | [itchyjunk] |
2022-03-09 04:15:37 +0100 | Guest4684 | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds) |
2022-03-09 04:16:39 +0100 | da39a3ee5e6b4b0_ | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 04:17:43 +0100 | Unicorn_Princess | (~Unicorn_P@46-54-248-191.static.kate-wing.si) (Remote host closed the connection) |
2022-03-09 04:18:58 +0100 | alp | (~alp@user/alp) (Ping timeout: 250 seconds) |
2022-03-09 04:19:55 +0100 | notzmv | (~zmv@user/notzmv) (Remote host closed the connection) |
2022-03-09 04:22:12 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 240 seconds) |
2022-03-09 04:26:45 +0100 | notzmv | (~zmv@user/notzmv) |
2022-03-09 04:27:00 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
2022-03-09 04:29:48 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 240 seconds) |
2022-03-09 04:32:03 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 04:36:44 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-03-09 04:38:12 +0100 | beka | (~beka@104.193.170.240) (Ping timeout: 240 seconds) |
2022-03-09 04:39:19 +0100 | yauhsien_ | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-03-09 04:40:14 +0100 | kongsheng | (~kongsheng@71.28.228.142) (Quit: Client closed) |
2022-03-09 04:41:00 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 04:44:27 +0100 | yauhsien_ | (~Yau-Hsien@112.121.69.46) |
2022-03-09 04:46:16 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 04:48:09 +0100 | yauhsienhuangtw | (~Yau-Hsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
2022-03-09 04:49:20 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 04:52:25 +0100 | yauhsienhuangtw | (~Yau-Hsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 04:53:06 +0100 | beka | (~beka@104-244-24-117.PUBLIC.monkeybrains.net) |
2022-03-09 04:55:24 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-03-09 04:56:23 +0100 | yauhsien_ | (~Yau-Hsien@112.121.69.46) (Ping timeout: 272 seconds) |
2022-03-09 05:01:10 +0100 | yauhsien_ | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 05:01:11 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
2022-03-09 05:01:26 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds) |
2022-03-09 05:04:54 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
2022-03-09 05:05:41 +0100 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-03-09 05:05:41 +0100 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-03-09 05:05:41 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-03-09 05:11:54 +0100 | analognoise | (~analognoi@185.229.59.233) (Read error: Connection reset by peer) |
2022-03-09 05:15:05 +0100 | Guest48 | (~Guest48@103.177.44.10) |
2022-03-09 05:15:17 +0100 | yauhsien_ | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
2022-03-09 05:17:37 +0100 | Guest487 | (~Guest48@103.177.44.10) |
2022-03-09 05:18:12 +0100 | tomku | (~tomku@user/tomku) (Ping timeout: 256 seconds) |
2022-03-09 05:22:00 +0100 | jjhoo | (~jahakala@user/jjhoo) (Ping timeout: 268 seconds) |
2022-03-09 05:22:30 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection) |
2022-03-09 05:23:20 +0100 | tomku | (~tomku@user/tomku) |
2022-03-09 05:25:30 +0100 | adam_ | (~m-2jewo5@129.153.21.50) |
2022-03-09 05:27:04 +0100 | jjhoo | (~jahakala@user/jjhoo) |
2022-03-09 05:27:31 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2022-03-09 05:31:55 +0100 | adam_ | (~m-2jewo5@129.153.21.50) (Remote host closed the connection) |
2022-03-09 05:32:12 +0100 | adamcstephens_ | (~m-2jewo5@129.153.21.50) |
2022-03-09 05:34:39 +0100 | yauhsienhuangtw | (~Yau-Hsien@61-231-43-120.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
2022-03-09 05:37:55 +0100 | mbuf | (~Shakthi@122.174.187.22) |
2022-03-09 05:41:04 +0100 | jz9915 | (~jz99@150.203.68.4) |
2022-03-09 05:44:32 +0100 | jz99 | (~jz99@150.203.68.4) (Ping timeout: 256 seconds) |
2022-03-09 05:49:51 +0100 | strawburr | (~user@172.56.40.24) |
2022-03-09 05:51:02 +0100 | adamcstephens | (161730d29b@2604:bf00:561:2000::2d5) (Remote host closed the connection) |
2022-03-09 05:52:05 +0100 | adamcstephens_ | adamcstephens |
2022-03-09 05:54:40 +0100 | AdamS[m] | (~adamvalko@2001:470:69fc:105::1:d5f0) |
2022-03-09 05:59:40 +0100 | k8yun | (~k8yun@user/k8yun) |
2022-03-09 05:59:49 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 06:12:44 +0100 | jz9915 | (~jz99@150.203.68.4) (Quit: Client closed) |
2022-03-09 06:12:55 +0100 | jz99 | (~jz99@150.203.68.4) |
2022-03-09 06:14:53 +0100 | jz99 | (~jz99@150.203.68.4) (Client Quit) |
2022-03-09 06:18:46 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
2022-03-09 06:24:09 +0100 | off^ | (~off@50.232.121.75) (Remote host closed the connection) |
2022-03-09 06:25:37 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 06:28:00 +0100 | ubert | (~Thunderbi@p200300ecdf3be98ff66ac9efa0af0607.dip0.t-ipconnect.de) (Quit: ubert) |
2022-03-09 06:28:35 +0100 | ubert | (~Thunderbi@p200300ecdf3be98f2891ed35b60ac0a6.dip0.t-ipconnect.de) |
2022-03-09 06:30:52 +0100 | deadmarshal_ | (~deadmarsh@95.38.117.150) |
2022-03-09 06:32:18 +0100 | Guest48 | (~Guest48@103.177.44.10) (Quit: Client closed) |
2022-03-09 06:32:18 +0100 | Guest487 | (~Guest48@103.177.44.10) (Quit: Client closed) |
2022-03-09 06:35:02 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
2022-03-09 06:35:16 +0100 | deadmarshal_ | (~deadmarsh@95.38.117.150) (Ping timeout: 256 seconds) |
2022-03-09 06:35:28 +0100 | strawburr | (~user@172.56.40.24) (Remote host closed the connection) |
2022-03-09 06:37:43 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 06:38:18 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2022-03-09 06:44:44 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 06:46:57 +0100 | deadmarshal_ | (~deadmarsh@95.38.117.150) |
2022-03-09 06:53:48 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 06:59:25 +0100 | chenqisu1 | (~chenqisu1@183.217.201.47) (Remote host closed the connection) |
2022-03-09 06:59:38 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
2022-03-09 06:59:53 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 272 seconds) |
2022-03-09 07:01:03 +0100 | k8yun | (~k8yun@user/k8yun) (Quit: Leaving) |
2022-03-09 07:01:11 +0100 | coot | (~coot@213.134.190.95) |
2022-03-09 07:04:30 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 07:06:18 +0100 | <Axman6> | um, dumb question, but how do use cabal repl with a package I've installed? I'm used to stack repl -package foo, what's the equivalent when using cabal? |
2022-03-09 07:06:31 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 07:06:34 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 07:07:11 +0100 | <Axman6> | ah, looks like --build-depends |
2022-03-09 07:07:16 +0100 | <jneira[m]> | <geekosaur> "stack controls its version of..." <- yeah that is the reason, it lets you override it but I guess nobody does it, so you end with two msys, as you can't touch stack one without high probs of break it |
2022-03-09 07:07:28 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-03-09 07:07:36 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2022-03-09 07:08:48 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 07:09:20 +0100 | bliminse | (~bliminse@host109-152-150-162.range109-152.btcentralplus.com) (Quit: leaving) |
2022-03-09 07:09:52 +0100 | ubert | (~Thunderbi@p200300ecdf3be98f2891ed35b60ac0a6.dip0.t-ipconnect.de) (Quit: ubert) |
2022-03-09 07:10:10 +0100 | ubert | (~Thunderbi@p200300ecdf3be98f192a131a3268d950.dip0.t-ipconnect.de) |
2022-03-09 07:16:37 +0100 | mvk | (~mvk@2607:fea8:5cc3:7e00::45ee) (Ping timeout: 240 seconds) |
2022-03-09 07:17:12 +0100 | CATS | (apic@brezn3.muc.ccc.de) (Ping timeout: 256 seconds) |
2022-03-09 07:18:08 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-03-09 07:18:30 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-03-09 07:21:01 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-03-09 07:21:18 +0100 | bliminse | (~bliminse@host109-152-150-162.range109-152.btcentralplus.com) |
2022-03-09 07:23:20 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-03-09 07:24:33 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 07:27:06 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2022-03-09 07:29:06 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-03-09 07:29:23 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 07:31:03 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 256 seconds) |
2022-03-09 07:32:51 +0100 | Guest48 | (~Guest48@103.177.44.10) |
2022-03-09 07:35:28 +0100 | Guest48 | (~Guest48@103.177.44.10) (Client Quit) |
2022-03-09 07:39:20 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 07:45:54 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 07:46:42 +0100 | xkuru | (~xkuru@user/xkuru) (Remote host closed the connection) |
2022-03-09 07:47:07 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 07:48:22 +0100 | deadmarshal_ | (~deadmarsh@95.38.117.150) (Ping timeout: 256 seconds) |
2022-03-09 07:52:09 +0100 | Guest48 | (~Guest48@103.177.44.10) |
2022-03-09 07:57:13 +0100 | Guest48 | (~Guest48@103.177.44.10) (Quit: Client closed) |
2022-03-09 08:00:46 +0100 | arjun | (~arjun@user/arjun) |
2022-03-09 08:01:11 +0100 | <arjun> | how do i point cabal to install a package form a different url globally ? |
2022-03-09 08:01:31 +0100 | <arjun> | sidenote: anyone know what's up here -> https://github.com/vincenthz/hs-memory/pull/87 ? |
2022-03-09 08:05:28 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2022-03-09 08:06:37 +0100 | c209e6dc-4d76-47 | (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) |
2022-03-09 08:07:40 +0100 | vglfr | (~vglfr@88.155.45.155) |
2022-03-09 08:10:45 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2022-03-09 08:12:18 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 08:16:05 +0100 | kimjetwav | (~user@2607:fea8:2363:8f00:9e8a:8fa1:6b4e:dd92) (Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)) |
2022-03-09 08:17:09 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
2022-03-09 08:21:25 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-03-09 08:24:52 +0100 | Philos86 | (~Philos86@38.80.235.160) |
2022-03-09 08:26:08 +0100 | <Philos86> | Hello, I'm new to Haskell and was wondering if I could get some help. I'm trying to implement the sRGB gamma transfer function and getting some errors about the Fractional datatype. |
2022-03-09 08:27:27 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Remote host closed the connection) |
2022-03-09 08:27:55 +0100 | ishutin | (~ishutin@78-131-74-100.pool.digikabel.hu) (Ping timeout: 272 seconds) |
2022-03-09 08:29:00 +0100 | ishutin | (~ishutin@87-97-2-239.pool.digikabel.hu) |
2022-03-09 08:32:16 +0100 | <Cale> | Philos86: sure, maybe put the code/error up on dpaste.com or something? |
2022-03-09 08:33:33 +0100 | <Cale> | Fractional by the way, is a type class -- it's an interface shared by numerical data types that can represent fractional values (and do things like division) |
2022-03-09 08:34:38 +0100 | ubert | (~Thunderbi@p200300ecdf3be98f192a131a3268d950.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-03-09 08:34:51 +0100 | <Cale> | You might be getting errors if you try to use (/) to divide integer values, for instance, because you'll need to explicitly convert them to a fractional type of number, such as Double before doing that. |
2022-03-09 08:36:17 +0100 | bliminse | (~bliminse@host109-152-150-162.range109-152.btcentralplus.com) (Ping timeout: 240 seconds) |
2022-03-09 08:36:51 +0100 | <Philos86> | Cale Here you go: https://pastebin.com/EwuerMTc |
2022-03-09 08:37:40 +0100 | <Cale> | Oh, Fractional isn't a type, you can't use it like that in a type signature |
2022-03-09 08:37:45 +0100 | <Philos86> | Ah, that makes sense. |
2022-03-09 08:38:08 +0100 | <Philos86> | Is there a generic Real datatype I can use that represents real numbers? |
2022-03-09 08:38:09 +0100 | <Cale> | Also, you don't have to repeat the x on the left of each guard (and I think that's not valid) |
2022-03-09 08:38:29 +0100 | bliminse | (~bliminse@host86-156-84-211.range86-156.btcentralplus.com) |
2022-03-09 08:39:10 +0100 | <Cale> | You could write something like gammaCorrect :: (Fractional a) => a -> a |
2022-03-09 08:39:27 +0100 | <Cale> | However, I see that you're also running into an issue with exponentiation |
2022-03-09 08:39:30 +0100 | <Philos86> | Now it's telling me "No instance for (Fractional b0) arising from a use of `/'". |
2022-03-09 08:39:41 +0100 | <Cale> | ^ can only handle non-negative integer exponents |
2022-03-09 08:39:52 +0100 | <Philos86> | Oh. |
2022-03-09 08:39:57 +0100 | <Cale> | (but can work with any type of numbers in the base) |
2022-03-09 08:40:07 +0100 | <Philos86> | So is there a way to raise a real number to the power of another real number? |
2022-03-09 08:40:15 +0100 | <Cale> | (**) |
2022-03-09 08:40:27 +0100 | <Cale> | :t (**) |
2022-03-09 08:40:28 +0100 | <lambdabot> | Floating a => a -> a -> a |
2022-03-09 08:40:44 +0100 | <Philos86> | Ah. Is that valid for negative bases/exponents too? |
2022-03-09 08:41:57 +0100 | <Cale> | > pi ** (-4) |
2022-03-09 08:41:58 +0100 | <ski> | > 2 ^^ (-3) |
2022-03-09 08:41:58 +0100 | <lambdabot> | 1.0265982254684336e-2 |
2022-03-09 08:42:00 +0100 | <lambdabot> | 0.125 |
2022-03-09 08:42:17 +0100 | <Philos86> | Ah, ok. |
2022-03-09 08:42:20 +0100 | <Cale> | > 2 ** sqrt 2 |
2022-03-09 08:42:22 +0100 | <lambdabot> | 2.665144142690225 |
2022-03-09 08:42:42 +0100 | <Cale> | But it forces the base and result to be floating point |
2022-03-09 08:42:43 +0100 | <Philos86> | Some previous implementations of pow (looking at you, HLSL) don't support negative bases or exponents for some reason. |
2022-03-09 08:42:52 +0100 | da39a3ee5e6b4b0_ | (~textual@171.5.29.46) |
2022-03-09 08:42:57 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Ping timeout: 240 seconds) |
2022-03-09 08:43:00 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
2022-03-09 08:43:02 +0100 | <Cale> | There's also ^^ |
2022-03-09 08:43:05 +0100 | <Cale> | :t (^^) |
2022-03-09 08:43:06 +0100 | <lambdabot> | (Fractional a, Integral b) => a -> b -> a |
2022-03-09 08:43:21 +0100 | <Cale> | It allows negative integer exponents, but requires a fractional base / result type |
2022-03-09 08:43:24 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
2022-03-09 08:43:34 +0100 | <Cale> | Just for comparison, |
2022-03-09 08:43:36 +0100 | <Cale> | :t (^) |
2022-03-09 08:43:37 +0100 | <lambdabot> | (Integral b, Num a) => a -> b -> a |
2022-03-09 08:43:44 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 272 seconds) |
2022-03-09 08:44:28 +0100 | <Philos86> | Huh |
2022-03-09 08:44:58 +0100 | <Philos86> | Ok silly question, but how do I write a number (of any kind) to the console/stdout/stderr? |
2022-03-09 08:45:15 +0100 | <Cale> | print x will usually do it |
2022-03-09 08:45:23 +0100 | <Cale> | which is the same as putStrLn (show x) |
2022-03-09 08:45:37 +0100 | <Axman6> | :t ((^),(^^),(**)) |
2022-03-09 08:45:38 +0100 | <lambdabot> | (Integral b1, Integral b2, Floating a1, Fractional a2, Num a3) => (a3 -> b1 -> a3, a2 -> b2 -> a2, a1 -> a1 -> a1) |
2022-03-09 08:45:50 +0100 | <ski> | luvly jubly |
2022-03-09 08:45:51 +0100 | <Cale> | show will convert things into strings (usually in a way that results in valid Haskell source code representations of them, but sadly not always) |
2022-03-09 08:46:02 +0100 | <Axman6> | urgh, for some reason I expected to get back a tuple of types... that is not at all useful, ignore me |
2022-03-09 08:46:25 +0100 | <Philos86> | Also is the an exact arithmetic datatype that works like Float/Double? |
2022-03-09 08:46:42 +0100 | <Philos86> | Like the iRRAM library for C++ |
2022-03-09 08:47:05 +0100 | <Cale> | There are some on Hackage |
2022-03-09 08:47:46 +0100 | <Cale> | https://hackage.haskell.org/package/aern2-real |
2022-03-09 08:47:56 +0100 | <Cale> | https://hackage.haskell.org/package/exact-real |
2022-03-09 08:48:06 +0100 | <Philos86> | Like does it work as-is do I need to use it with special functions? |
2022-03-09 08:48:26 +0100 | <Philos86> | Like in C I would need to use a bunch of MPFR proxy functions |
2022-03-09 08:48:40 +0100 | <Cale> | It implements the standard numerical classes |
2022-03-09 08:48:47 +0100 | <Cale> | like Fractional etc. |
2022-03-09 08:49:04 +0100 | <Philos86> | So I could literally just do "pi / 2" and it would be more or less exact? |
2022-03-09 08:49:09 +0100 | <Cale> | yep |
2022-03-09 08:50:05 +0100 | <Cale> | Though, not sure what the printed result will look like. You might have to extract a specific approximation to actually see something sensible. |
2022-03-09 08:53:05 +0100 | <Philos86> | Kinda surprised something like that isn't built-in from the start |
2022-03-09 08:53:17 +0100 | <Cale> | Well, it's usually quite impractical for real use |
2022-03-09 08:53:27 +0100 | <Philos86> | Ah, yeah speed-wise. |
2022-03-09 08:53:34 +0100 | <Cale> | yeah |
2022-03-09 08:53:49 +0100 | <Cale> | Like, adding the numbers from 1 to 1000 might be painfully slow kind of slow. |
2022-03-09 08:53:51 +0100 | <Philos86> | Is there a 128bit datatype? |
2022-03-09 08:54:32 +0100 | <Cale> | https://hackage.haskell.org/package/long-double |
2022-03-09 08:55:59 +0100 | <Cale> | There's also Data.Fixed for fixed-precision arithmetic |
2022-03-09 08:58:50 +0100 | <Philos86> | Alright, thanks. |
2022-03-09 08:59:17 +0100 | <Philos86> | I've heard performance isn't as great at times; is it because of the backend compiler it uses? |
2022-03-09 09:00:38 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2022-03-09 09:00:56 +0100 | <Cale> | Performance of which thing? |
2022-03-09 09:02:29 +0100 | <Philos86> | Haskell in general; I've heard reports that a program in Haskell does not have the raw goodput of an equivalent program written in C/C++, but was curious if there's any truth to it. |
2022-03-09 09:03:01 +0100 | <Cale> | Just GHC-compiled Haskell code in general? The art of optimising Haskell code is definitely a bit less well-known and can be a little less intuitive than languages that are closer to the bare-metal representation. Though most of the time, it just comes down to using the right data structures and algorithms at a high level. |
2022-03-09 09:03:32 +0100 | <sm> | well, very few things are as fast as C in general |
2022-03-09 09:03:45 +0100 | <Cale> | If you're really trying to race a C program at some tight loop, that might require mangling your code a bunch, but you could also just write the small loop in C and call it. |
2022-03-09 09:03:56 +0100 | fendor | (~fendor@178.165.181.170.wireless.dyn.drei.com) |
2022-03-09 09:03:58 +0100 | <Cale> | (or assembly/llvm for that matter) |
2022-03-09 09:04:28 +0100 | <Philos86> | Well GHC actually compiles to C (or was it C--?) as an intermediary right? I figured at that point the next compiler in the toolchain could/would handle platform-specific optimization. |
2022-03-09 09:04:31 +0100 | <Cale> | no |
2022-03-09 09:04:43 +0100 | <Philos86> | Huh. |
2022-03-09 09:04:49 +0100 | <Cale> | Well, it compiles to its own thing called C-- as one of the intermediates |
2022-03-09 09:05:12 +0100 | <Cale> | (but that's not very much like C) |
2022-03-09 09:05:23 +0100 | <Cale> | At one point in the past, it did compile via C |
2022-03-09 09:05:51 +0100 | <Cale> | (which it had to mangle the compiler output of gcc with horrible perl scripts before the programs would run, it was terrible) |
2022-03-09 09:06:05 +0100 | <Philos86> | I was reading up on it and it made it sound like they switched to using regular C or LLVM SSA as the intermediary. |
2022-03-09 09:06:18 +0100 | <Cale> | But it has its own native code generator now, as well as an LLVM backend as an option |
2022-03-09 09:06:40 +0100 | <Philos86> | Oh, ok so you can use LLVM if you'd like, but it's not the default or only option. |
2022-03-09 09:06:44 +0100 | <Cale> | yeah |
2022-03-09 09:06:49 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:94a8:4010:5291:ba96) |
2022-03-09 09:08:22 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 09:09:26 +0100 | <Cale> | Oh, davean let me know that -via-C still exists actually :D |
2022-03-09 09:09:36 +0100 | <Cale> | -fvia-C |
2022-03-09 09:09:48 +0100 | <davean> | https://downloads.haskell.org/~ghc/9.2.2/docs/html/users_guide/codegens.html#c-code-generator-fvia-c |
2022-03-09 09:09:52 +0100 | <davean> | basicly it doesn't exist though |
2022-03-09 09:10:10 +0100 | <davean> | Its a technicallity it does which is why I mentioned it not here |
2022-03-09 09:10:20 +0100 | michalz | (~michalz@185.246.204.77) |
2022-03-09 09:10:20 +0100 | <davean> | (Unless you're working on porting GHC) |
2022-03-09 09:10:32 +0100 | beka | (~beka@104-244-24-117.PUBLIC.monkeybrains.net) (Ping timeout: 256 seconds) |
2022-03-09 09:10:42 +0100 | <Cale> | ah, the option is physically removed from standard-built compilers, probably good :) |
2022-03-09 09:11:00 +0100 | <Philos86> | Ah yeah I'm not porting GHC to anywhere. |
2022-03-09 09:11:02 +0100 | <merijn> | Cale: I was about to say, it merely exists in a hypothetical sense :p |
2022-03-09 09:11:34 +0100 | <merijn> | "If you are facing a porting problem HARDER than making via-C work again for your platform, the code is still around" |
2022-03-09 09:11:41 +0100 | <davean> | I just figured Cale would like to know the truth instead of the convinient reality |
2022-03-09 09:11:47 +0100 | <Philos86> | Ok so are literal values defined as a certain type by default? |
2022-03-09 09:11:47 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2022-03-09 09:12:02 +0100 | <Cale> | Numerical literals are polymorphic |
2022-03-09 09:12:04 +0100 | <Cale> | :t 5 |
2022-03-09 09:12:05 +0100 | <lambdabot> | Num p => p |
2022-03-09 09:12:08 +0100 | <Cale> | :t 4.5 |
2022-03-09 09:12:09 +0100 | <lambdabot> | Fractional p => p |
2022-03-09 09:12:19 +0100 | <davean> | theres also a thing called "defaulting" |
2022-03-09 09:12:35 +0100 | <merijn> | imo, defaulting was a mistake |
2022-03-09 09:12:39 +0100 | <Philos86> | Ok so a literal 0.5 would be implemented on a context-by-context basis? |
2022-03-09 09:12:44 +0100 | <davean> | merijn: yes, but it does relate to the question |
2022-03-09 09:12:58 +0100 | <davean> | merijn: and the 'base' code is littered with it |
2022-03-09 09:13:00 +0100 | <merijn> | Philos86: Well, specifically, 0.5 gets translated to "fromRational 0.5" |
2022-03-09 09:13:06 +0100 | <Philos86> | So x = 0.5 + 1 might be different from x = 0.5 / y |
2022-03-09 09:13:16 +0100 | <merijn> | Philos86: And, for example, 5 gets translated to "fromInteger" |
2022-03-09 09:13:39 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 09:13:56 +0100 | <Philos86> | In C you can define the precision/datatypes of literal values, and wasn't sure if I can or should be doing that in Haskell. |
2022-03-09 09:13:59 +0100 | <merijn> | Philos86: Type inference is bidirectional, so the type of 'x' (and thus it's value) derives from *both* the parts of it's expression *and* how it's used |
2022-03-09 09:14:04 +0100 | <davean> | Philos86: specify its type |
2022-03-09 09:14:24 +0100 | <merijn> | Philos86: In your 'x = 0.5 + 1' GHC infers a couple of things |
2022-03-09 09:14:25 +0100 | <Cale> | Philos86: Especially if you're not giving explicit type signatures. If you want to get good performance out of numerical stuff, you should definitely try to specify the types as much as you can. |
2022-03-09 09:14:54 +0100 | <Philos86> | Ok, that's what I was thinking but wasn't sure. |
2022-03-09 09:15:02 +0100 | <merijn> | Philos86: First of all "0.5 :: Fractional p => p", "1 :: Num p => p", and "(+) :: Num a => a -> a -> a" |
2022-03-09 09:15:18 +0100 | <merijn> | Philos86: So GHC infers: "x :: (Fractional a, Num a) => a" |
2022-03-09 09:15:20 +0100 | <Philos86> | In the case of my transfer function, how would I force all literals to be either single or double precision? |
2022-03-09 09:15:32 +0100 | <merijn> | Philos86: ":: Double" :) |
2022-03-09 09:15:35 +0100 | <Philos86> | Like x * 12.92. Is the literal single or double? |
2022-03-09 09:15:48 +0100 | <merijn> | Philos86: Rationals are arbitrary precision |
2022-03-09 09:15:53 +0100 | <Cale> | When you see that something has a type like Fractional p => p then at runtime, this is implemented as a function which takes a record of all the Fractional operations (which in turn includes a record of all the Num operations), and computes your value using them. |
2022-03-09 09:16:03 +0100 | <merijn> | Philos86: So it depends on the conversion from rational to actualy type/value (like Double) |
2022-03-09 09:16:12 +0100 | <Philos86> | Ok so would I define the type like this? |
2022-03-09 09:16:13 +0100 | <Philos86> | x * (12.92 :: Double) |
2022-03-09 09:16:15 +0100 | <sm> | when GHC RTS (?) fails to decode due to unset/wrong locale... is there any more specific exception to catch than IOException ? |
2022-03-09 09:16:35 +0100 | <merijn> | Philos86: Yeah. Or, if 'x :: Double' GHC will automatically infer 12.92 as being Double too |
2022-03-09 09:16:36 +0100 | <Cale> | It's usually enough just to specify the types at the top level when you define things |
2022-03-09 09:16:51 +0100 | <Philos86> | @merij |
2022-03-09 09:16:51 +0100 | <lambdabot> | Unknown command, try @list |
2022-03-09 09:17:11 +0100 | <merijn> | Philos86: Or, if you write "y = x * 12.92" then "y :: Double" is enough to infer 'x' and '12.92' are Double |
2022-03-09 09:17:13 +0100 | <Philos86> | merijn Because I'm only taking a single Double parameter, is GHC assuming all literals are floats then? |
2022-03-09 09:17:26 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 245 seconds) |
2022-03-09 09:17:42 +0100 | <merijn> | Philos86: You cannot mix different types in arithmetic (unlike C) and there is no automatic conversion |
2022-03-09 09:18:09 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-03-09 09:18:18 +0100 | <merijn> | Philos86: So fixing one part of an expression to a specific type is sufficient to fix *everything* unless you explicitly add conversions |
2022-03-09 09:18:36 +0100 | LiaoTao_ | (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 240 seconds) |
2022-03-09 09:18:46 +0100 | <Cale> | Philos86: the information generally flows through the operations |
2022-03-09 09:18:48 +0100 | <Cale> | :t (*) |
2022-03-09 09:18:48 +0100 | <lambdabot> | Num a => a -> a -> a |
2022-03-09 09:18:54 +0100 | <merijn> | Which can be annoying sometimes when mixing lots of integer and float math, but overall I prefer it to C's implicit conversion, because it's harder to mess up explicit conversions |
2022-03-09 09:19:02 +0100 | <Cale> | both arguments and the result of (*) must have the same type, for example |
2022-03-09 09:19:04 +0100 | lumberja1k123 | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-03-09 09:19:05 +0100 | <Philos86> | Ok so is it safe to assume that GHC promotes a literal or variable to the most precise/accurate datatype between two operands? |
2022-03-09 09:19:11 +0100 | <merijn> | > (5 :: Int) * (12.00 :: Double) |
2022-03-09 09:19:12 +0100 | <lambdabot> | error: |
2022-03-09 09:19:12 +0100 | <lambdabot> | • Couldn't match expected type ‘Int’ with actual type ‘Double’ |
2022-03-09 09:19:12 +0100 | <lambdabot> | • In the second argument of ‘(*)’, namely ‘(12.00 :: Double)’ |
2022-03-09 09:19:20 +0100 | <Cale> | GHC will never implicitly convert numerical types |
2022-03-09 09:19:23 +0100 | <merijn> | Philos86: GHC never promots variables |
2022-03-09 09:19:36 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) |
2022-03-09 09:19:47 +0100 | <merijn> | Philos86: Only literals are polymorphic and they're converted *once*, based on the type of the expression their used in |
2022-03-09 09:19:48 +0100 | <Philos86> | So (x :: Float) * (y :: Double) would be invalid? |
2022-03-09 09:19:53 +0100 | <merijn> | Philos86: Yes |
2022-03-09 09:19:54 +0100 | <Cale> | correct |
2022-03-09 09:20:20 +0100 | <Philos86> | You said explicit is allowed though so I can manually promote x to Double then right? |
2022-03-09 09:20:32 +0100 | <Cale> | yeah, you could use realToFrac to convert it |
2022-03-09 09:20:33 +0100 | <merijn> | Philos86: So literals are arbitrary precision (and will be converted to the nearest possible representation based on use) |
2022-03-09 09:20:36 +0100 | lumberjack123 | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-03-09 09:20:44 +0100 | <merijn> | > (0.5 :: Float) * (2.0 :: Double) |
2022-03-09 09:20:46 +0100 | <lambdabot> | error: |
2022-03-09 09:20:46 +0100 | <lambdabot> | • Couldn't match expected type ‘Float’ with actual type ‘Double’ |
2022-03-09 09:20:46 +0100 | <lambdabot> | • In the second argument of ‘(*)’, namely ‘(2.0 :: Double)’ |
2022-03-09 09:20:51 +0100 | <merijn> | > realToFrac (0.5 :: Float) * (2.0 :: Double) |
2022-03-09 09:20:52 +0100 | <lambdabot> | 1.0 |
2022-03-09 09:21:01 +0100 | <ski> | > realToFrac (pi :: Float) :: Double |
2022-03-09 09:21:03 +0100 | <lambdabot> | 3.1415927410125732 |
2022-03-09 09:21:25 +0100 | <Philos86> | So wait how do you typecast/coerce/promote a variable? |
2022-03-09 09:21:29 +0100 | <ski> | > fromIntegral (5 :: Int) * (12.00 :: Double) |
2022-03-09 09:21:31 +0100 | <lambdabot> | 60.0 |
2022-03-09 09:21:37 +0100 | <Philos86> | Is it just (x :: Type) :: OtherType? |
2022-03-09 09:21:41 +0100 | <ski> | no |
2022-03-09 09:21:43 +0100 | <merijn> | There are no casts, there's coercions (but you don't want those) |
2022-03-09 09:21:53 +0100 | <merijn> | Philos86: The two main functions you want for arithmetic are: |
2022-03-09 09:21:58 +0100 | <merijn> | :t realToFrac |
2022-03-09 09:21:59 +0100 | <lambdabot> | (Real a, Fractional b) => a -> b |
2022-03-09 09:22:02 +0100 | <merijn> | :t fromIntegral |
2022-03-09 09:22:03 +0100 | <lambdabot> | (Integral a, Num b) => a -> b |
2022-03-09 09:22:35 +0100 | <ski> | `(x :: Type) :: OtherType' only works when `Type' and `OtherType' are the same type. a type ascription is not a cast or a coercion. it specifies what type something already has |
2022-03-09 09:22:36 +0100 | <merijn> | The former converting between fractional/real types and the latter for converting any integral type to an arbitrary Num |
2022-03-09 09:22:41 +0100 | <Cale> | Philos86: Well, that basically ensures that Type and OtherType will unify with each other, i.e. that if they're polymorphic, that you can specialise them both to get some more concrete type |
2022-03-09 09:22:59 +0100 | lumberja1k123 | (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
2022-03-09 09:23:01 +0100 | <Cale> | Philos86: Or if they're not polymorphic, it just ensures that Type and OtherType are the same type |
2022-03-09 09:23:13 +0100 | <Philos86> | Ok wait so it sounds like ultimately in Haskell all arithmetic boils down to either an integral type or fractional type, yes? |
2022-03-09 09:23:15 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Ping timeout: 256 seconds) |
2022-03-09 09:23:34 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
2022-03-09 09:23:39 +0100 | <Cale> | Well, you can introduce your own new data types and make them instances of these classes by implementing the operations |
2022-03-09 09:23:42 +0100 | <Philos86> | Like for example any integer (eg. 5) can ultimately be represented as a fractional (5 / 1) so it seems like Haskell is internally using those for everything, no? |
2022-03-09 09:24:02 +0100 | <merijn> | Philos86: Consider the case of "2 :: Double". The literal '2' has type 'Num a => a' (i.e. any instance of Num) and the type annotation says it has type Double. So the question (to GHC) is "is Double an instance of Num?". Yes, so it uses 2 as type Double |
2022-03-09 09:24:06 +0100 | lumberjack123 | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-03-09 09:24:18 +0100 | <Philos86> | Just trying to wrap by head around integrals and fractionals. |
2022-03-09 09:24:41 +0100 | <Cale> | (5 :: Integer) will internally be a data structure that stores 5 as a machine int, because it's small enough, but for a large enough value, would use a GMP large integer |
2022-03-09 09:24:57 +0100 | <Cale> | (5 :: Double) will use a machine double internally |
2022-03-09 09:25:06 +0100 | <Cale> | (5 :: Int) will definitely use a machine integer |
2022-03-09 09:25:09 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-03-09 09:25:13 +0100 | <Philos86> | Ok so in that case it's looking at 2 (as a Num) and seeing if it can downcast it (but not really) to a Double before implementation |
2022-03-09 09:25:33 +0100 | <merijn> | Philos86: The think is that the *literal* 5 in source is treated as "fromInteger 5" and the representation depends on "what integer type is 5 converted to" |
2022-03-09 09:25:35 +0100 | <Cale> | When you have a real program, at some point, you will have to choose a specific type |
2022-03-09 09:25:45 +0100 | <ski> | > fromInteger 2 :: Double |
2022-03-09 09:25:47 +0100 | <lambdabot> | 2.0 |
2022-03-09 09:26:06 +0100 | <merijn> | Philos86: So if you have "5 :: Double" it will convert the integer value 5 to the closest IEEE-754 Double (which happens to be 2.0) |
2022-03-09 09:26:08 +0100 | <ski> | a literal `2' gets converted to `fromInteger 2', where that `2' has type `Integer' |
2022-03-09 09:26:23 +0100 | <Cale> | On the ghci prompt, or if you're really lazy about specifying things, there's a mechanism which will try to "default" the type chosen to Integer, and if that doesn't work, then Double (and this list can be modified with a default declaration) |
2022-03-09 09:26:35 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) |
2022-03-09 09:26:37 +0100 | <Philos86> | Ah, ok. |
2022-03-09 09:26:40 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-03-09 09:26:58 +0100 | <Cale> | It only applies in cases where a type is only constrained by Prelude classes that include some numerical ones. |
2022-03-09 09:26:59 +0100 | <merijn> | (because the literal "5 :: Double" is treated as "fromInteger 5 :: Double" and "fromInteger :: Num a => Integer -> a" and Double is an instance of Num) |
2022-03-09 09:27:02 +0100 | <Philos86> | Also thanks for answering all my questions; Haskell is very much a world of difference from the C family of languages. |
2022-03-09 09:27:07 +0100 | <ski> | (a floating-point literal like `2.0' gets converted to `fromRational 2.0', interpreting that `2.0' as a `Rational') |
2022-03-09 09:27:40 +0100 | <merijn> | Philos86: Note that literals (by definition) are finite in size and thus can be represented losslessly as Rational (which is basically a fractional representation) |
2022-03-09 09:27:43 +0100 | <Philos86> | Does haskell have a native way of doing integrations or summations? |
2022-03-09 09:27:46 +0100 | <merijn> | > 5 :: Rational |
2022-03-09 09:27:48 +0100 | <lambdabot> | 5 % 1 |
2022-03-09 09:27:51 +0100 | <ski> | (note that `fromInteger' is distinct from `fromIntegral', btw) |
2022-03-09 09:28:01 +0100 | <merijn> | > 1 / 3 :: Rational |
2022-03-09 09:28:03 +0100 | <lambdabot> | 1 % 3 |
2022-03-09 09:28:19 +0100 | <Cale> | Philos86: There's sum, which will take the sum of a list |
2022-03-09 09:28:29 +0100 | <Cale> | > sum [x^2 | x <- [1..10]] |
2022-03-09 09:28:30 +0100 | <lambdabot> | 385 |
2022-03-09 09:28:51 +0100 | <merijn> | Philos86: So the literal as seen by the compiler is lossless and you only incur loss of precision when the compiler uses "fromRational :: Fractional a => Rational -> a" to convert it to, e.g. a Double |
2022-03-09 09:29:31 +0100 | <Cale> | No built-in mechanism for integrals, but relevant libraries exist |
2022-03-09 09:29:35 +0100 | <Philos86> | Ah ok so the precision loss is ultimately context-specific then |
2022-03-09 09:30:03 +0100 | Natch | (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 256 seconds) |
2022-03-09 09:30:12 +0100 | <merijn> | Philos86: Yeah. And since there's no automatic promotion there's only a single context-specific loss (e.g. to Double or whatever) |
2022-03-09 09:30:29 +0100 | <Philos86> | Ok that makes sense now. |
2022-03-09 09:31:19 +0100 | alp | (~alp@user/alp) |
2022-03-09 09:31:44 +0100 | <Philos86> | I'm looking for some libraries for integration but not finding anything on google |
2022-03-09 09:31:55 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-03-09 09:32:13 +0100 | [exa] | (exa@user/exa/x-3587197) (Remote host closed the connection) |
2022-03-09 09:32:35 +0100 | <merijn> | Philos86: Which is why in your 'y = x * 0.5' example fixing either 'x' or 'y' is sufficient to make things work out |
2022-03-09 09:32:49 +0100 | <merijn> | The rest is inferred transitively via * |
2022-03-09 09:34:25 +0100 | Natch | (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) |
2022-03-09 09:35:09 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
2022-03-09 09:35:48 +0100 | <Philos86> | Does Haskell have any kind of loops? |
2022-03-09 09:36:02 +0100 | <ski> | > let x = x in x |
2022-03-09 09:36:05 +0100 | <lambdabot> | *Exception: <<loop>> |
2022-03-09 09:36:26 +0100 | <merijn> | Philos86: Define loops :) |
2022-03-09 09:36:50 +0100 | <merijn> | Because "no" but also "yes, of course" |
2022-03-09 09:37:45 +0100 | <Philos86> | Like for example if I need to integrate over hemisphere and calculate some value based on a vector for that specific iteration I could do that easily in C using a for loop |
2022-03-09 09:37:52 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-03-09 09:38:30 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 09:39:15 +0100 | chele | (~chele@user/chele) |
2022-03-09 09:39:16 +0100 | <merijn> | Philos86: Most while loops can be trivially turned into maps/folds and various higher order traversals. Where as more generic while loops are more likely to be easier to just write recursively |
2022-03-09 09:39:33 +0100 | <Philos86> | Ah, ok that makes sense. |
2022-03-09 09:39:58 +0100 | <Philos86> | So let's say I need to integrate over a hemisphere, how would that look in Haskell? |
2022-03-09 09:40:09 +0100 | <merijn> | Most "iterative solutions with state" tend to map rather naturally to folds |
2022-03-09 09:40:28 +0100 | <merijn> | Philos86: I can't say, because I don't know what "integration over a hemisphere" looks like in "not Haskell" :) |
2022-03-09 09:41:01 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 09:41:35 +0100 | dschrempf | (~dominik@178.251.70.207) |
2022-03-09 09:42:11 +0100 | <Philos86> | Oh, well like in C integration usually gets turned into a summation via some kind of for loop with a specific number of samples |
2022-03-09 09:44:10 +0100 | <merijn> | Philos86: Basically, if you can formulate your loop body as a function with type: "IterationInput -> State -> State" it's a fold :) |
2022-03-09 09:44:15 +0100 | <merijn> | :t foldl |
2022-03-09 09:44:16 +0100 | <lambdabot> | Foldable t => (b -> a -> b) -> b -> t a -> b |
2022-03-09 09:44:18 +0100 | <merijn> | :t foldr |
2022-03-09 09:44:19 +0100 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
2022-03-09 09:44:45 +0100 | <merijn> | (You can make IterationInput an integer or () if you only need the state) |
2022-03-09 09:44:57 +0100 | <merijn> | Although, if you only need the state you can probably just use: |
2022-03-09 09:44:57 +0100 | <Philos86> | Ok so going back to my gamma transfer function as an example |
2022-03-09 09:45:01 +0100 | <merijn> | :t iterate |
2022-03-09 09:45:03 +0100 | <lambdabot> | (a -> a) -> a -> [a] |
2022-03-09 09:45:15 +0100 | <merijn> | > iterate (+1) 0 |
2022-03-09 09:45:16 +0100 | <lambdabot> | [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... |
2022-03-09 09:46:07 +0100 | <ski> | > takeWhile (< 1000) (iterate (2 *) 1) |
2022-03-09 09:46:09 +0100 | <lambdabot> | [1,2,4,8,16,32,64,128,256,512] |
2022-03-09 09:46:25 +0100 | <Philos86> | How would I iterate or fold a number of real values through a function and print them all out? |
2022-03-09 09:47:08 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) |
2022-03-09 09:47:13 +0100 | <Philos86> | Like if function f takes a single value x, and I want to iterate or fold over a range of 0 to 1 how do you do that? |
2022-03-09 09:47:56 +0100 | <ski> | % for_ [0,0.25 .. 1] (\x -> print x) |
2022-03-09 09:47:56 +0100 | <yahb> | ski: 0.0; 0.25; 0.5; 0.75; 1.0 |
2022-03-09 09:48:05 +0100 | <merijn> | Philos86: ok, so the input of 'f' is the values within your range? What does 'f' return? |
2022-03-09 09:48:52 +0100 | <Philos86> | In this case it maps a value within the range of [0, 1] and returns another value within the range of [0, 1] |
2022-03-09 09:49:04 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2022-03-09 09:49:04 +0100 | <merijn> | And what do you do with the result of 'f'? |
2022-03-09 09:49:33 +0100 | <Philos86> | Ultimately it would be stored somewhere, like in a file or printed to the console. |
2022-03-09 09:49:58 +0100 | <ski> | each individual `f x' would be stored in a file, for each `x' in the range ? |
2022-03-09 09:50:00 +0100 | <merijn> | oh, so you just want to use a function before printing? The something like ski's example |
2022-03-09 09:50:18 +0100 | <merijn> | :t mapM_ |
2022-03-09 09:50:18 +0100 | <lambdabot> | (Foldable t, Monad m) => (a -> m b) -> t a -> m () |
2022-03-09 09:50:44 +0100 | <merijn> | % mapM_ (print . (+1)) [0,0.25..1] |
2022-03-09 09:50:44 +0100 | <yahb> | merijn: 1.0; 1.25; 1.5; 1.75; 2.0 |
2022-03-09 09:50:58 +0100 | <merijn> | (just imagine (+1) is whatever function you want) |
2022-03-09 09:51:03 +0100 | jespada | (~jespada@148.252.132.235) |
2022-03-09 09:51:52 +0100 | <merijn> | ah, looks like I have a reasonably simple iterative problem in last years AOC |
2022-03-09 09:52:19 +0100 | <Philos86> | It's giving me syntax errors about the % sign |
2022-03-09 09:52:22 +0100 | <merijn> | Philos86: Problem: https://adventofcode.com/2021/day/6 iterative solution using foldl https://github.com/merijn/AdventOfCode/blob/master/Day6.hs#L42-L51 |
2022-03-09 09:52:32 +0100 | <merijn> | Philos86: % is just the signal to the bot to run it :) |
2022-03-09 09:52:49 +0100 | <Philos86> | Oh, derp. |
2022-03-09 09:53:07 +0100 | <Philos86> | Ok what does the double .. mean in the array list? |
2022-03-09 09:53:53 +0100 | <merijn> | Philos86: pedantic side note: there's no array lists. There's list (which are single linked lists) and there are arrays/vectors (but those aren't in base) |
2022-03-09 09:54:15 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-03-09 09:54:29 +0100 | <merijn> | Philos86: [x,y..z] gets translated to "enumFromThenTo" (and there's various other Enum based functions) |
2022-03-09 09:54:39 +0100 | <merijn> | > [1..] -- enumFrom 1 |
2022-03-09 09:54:41 +0100 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,... |
2022-03-09 09:54:50 +0100 | <merijn> | > [1,3..] -- enumFromThen 1 3 |
2022-03-09 09:54:50 +0100 | <Philos86> | So does y control the precision of each iteration? |
2022-03-09 09:54:51 +0100 | <lambdabot> | [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53... |
2022-03-09 09:54:59 +0100 | [exa] | (~exa@user/exa/x-3587197) |
2022-03-09 09:55:01 +0100 | <merijn> | > [1,3..10] -- enumFromThenTo 1 3 10 |
2022-03-09 09:55:04 +0100 | <lambdabot> | [1,3,5,7,9] |
2022-03-09 09:55:14 +0100 | <Philos86> | Eg. [0,0.0625..1] would increment by 0.0625 each time? |
2022-03-09 09:55:20 +0100 | <Cale> | yeah |
2022-03-09 09:55:24 +0100 | <merijn> | Philos86: Yeah. Although admittedly the Double instance is a god awful abomination best avoid like the plague :p |
2022-03-09 09:55:34 +0100 | <Philos86> | How so? |
2022-03-09 09:55:41 +0100 | <merijn> | Philos86: But it was the simplest way to do your [0, 1] constraint :) |
2022-03-09 09:55:52 +0100 | <Philos86> | Ah, I see. |
2022-03-09 09:55:55 +0100 | <merijn> | > [0.1..] |
2022-03-09 09:55:56 +0100 | <lambdabot> | [0.1,1.1,2.1,3.1,4.1,5.1,6.1,7.1,8.1,9.1,10.1,11.1,12.1,13.1,14.1,15.1,16.1,... |
2022-03-09 09:56:21 +0100 | <Cale> | Yeah, in the Double/Float case, the precision it uses to test if you're at the end is half the distance between the first two given elements, so there are some wacky things that can happen |
2022-03-09 09:56:26 +0100 | <merijn> | Philos86: Well, if "enumFrom" is supposed to pick the next value, what is the "next" value of a double? As you can see, the default choice is horrible |
2022-03-09 09:56:37 +0100 | notzmv | (~zmv@user/notzmv) |
2022-03-09 09:56:40 +0100 | <merijn> | For integeral values "next" has a more sensible definition |
2022-03-09 09:56:48 +0100 | <ski> | > [0,2/11 .. 1] :: [Float] |
2022-03-09 09:56:49 +0100 | <lambdabot> | [0.0,0.18181819,0.36363637,0.54545456,0.72727275,0.90909094,1.0909091] |
2022-03-09 09:57:17 +0100 | <Philos86> | No wonder integration libraries exist haha. |
2022-03-09 09:57:21 +0100 | <merijn> | Philos86: But the .. notation works for any enumerable type |
2022-03-09 09:57:24 +0100 | <tomsmeding> | > [0,0.4..1.2] |
2022-03-09 09:57:25 +0100 | <lambdabot> | [0.0,0.4,0.8,1.2000000000000002] |
2022-03-09 09:57:28 +0100 | <merijn> | > [False..] |
2022-03-09 09:57:29 +0100 | <lambdabot> | <hint>:1:9: error: parse error on input ‘]’ |
2022-03-09 09:57:34 +0100 | <merijn> | > [False ..] |
2022-03-09 09:57:35 +0100 | <lambdabot> | [False,True] |
2022-03-09 09:57:38 +0100 | <ski> | @botsmack |
2022-03-09 09:57:38 +0100 | <lambdabot> | :) |
2022-03-09 09:57:58 +0100 | <Philos86> | Ok so what's the difference between a fold and a map? |
2022-03-09 09:58:17 +0100 | worldhelloworld | (~c1utt4r@vmi275462.contaboserver.net) |
2022-03-09 09:58:17 +0100 | <merijn> | Philos86: If you wanna use "proper" arrays (i.e. like C's arrays) you'll want |
2022-03-09 09:58:20 +0100 | <merijn> | @hackage vector |
2022-03-09 09:58:20 +0100 | <lambdabot> | https://hackage.haskell.org/package/vector |
2022-03-09 09:58:22 +0100 | <Cale> | map will apply a function to all the elements of a list to get another list |
2022-03-09 09:58:26 +0100 | <ski> | a `map' translates each element in a list into a new element (independently). the new list has the same number of elements |
2022-03-09 09:58:34 +0100 | <merijn> | > map (+1) [0..10] |
2022-03-09 09:58:36 +0100 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10,11] |
2022-03-09 09:58:38 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2022-03-09 09:58:39 +0100 | <Cale> | a fold need not produce a list as its result -- it does some arbitrary thing to combine the elements of the list |
2022-03-09 09:58:44 +0100 | <merijn> | > foldl (+) 0 [0..10] |
2022-03-09 09:58:45 +0100 | <lambdabot> | 55 |
2022-03-09 09:59:11 +0100 | [exa] | hangs a nice ' atop that foldl |
2022-03-09 09:59:19 +0100 | <merijn> | > map f [a,b,c] |
2022-03-09 09:59:20 +0100 | <lambdabot> | error: |
2022-03-09 09:59:20 +0100 | <lambdabot> | • Ambiguous type variable ‘b0’ arising from a use of ‘show_M258285656192... |
2022-03-09 09:59:20 +0100 | <lambdabot> | prevents the constraint ‘(Show b0)’ from being solved. |
2022-03-09 09:59:28 +0100 | <merijn> | > map f [a,b,c] :: [Expr] |
2022-03-09 09:59:29 +0100 | <lambdabot> | [f a,f b,f c] |
2022-03-09 09:59:44 +0100 | <merijn> | > foldl f z [a,b,c] :: Expr |
2022-03-09 09:59:45 +0100 | <lambdabot> | f (f (f z a) b) c |
2022-03-09 09:59:58 +0100 | <ski> | > foldr f z [a,b,c] :: Expr |
2022-03-09 09:59:59 +0100 | <lambdabot> | f a (f b (f c z)) |
2022-03-09 10:00:10 +0100 | __monty__ | (~toonn@user/toonn) |
2022-03-09 10:00:31 +0100 | acidjnk | (~acidjnk@p200300d0c7049f95a8560519e34e318b.dip0.t-ipconnect.de) |
2022-03-09 10:00:52 +0100 | <ski> | > foldl (**) z [a,b,c] :: Expr |
2022-03-09 10:00:53 +0100 | <lambdabot> | ((z**a)**b)**c |
2022-03-09 10:00:54 +0100 | <ski> | > foldr (-) z [a,b,c] :: Expr |
2022-03-09 10:00:55 +0100 | <lambdabot> | a - (b - (c - z)) |
2022-03-09 10:02:21 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) |
2022-03-09 10:03:19 +0100 | [exa] | (~exa@user/exa/x-3587197) (Quit: repty) |
2022-03-09 10:03:25 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 10:03:28 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 10:03:56 +0100 | [exa] | (exa@user/exa/x-3587197) |
2022-03-09 10:04:32 +0100 | <Philos86> | Ok so folds ultimately just add it all up |
2022-03-09 10:04:49 +0100 | <Cale> | It's possible to implement map using foldr |
2022-03-09 10:04:57 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 240 seconds) |
2022-03-09 10:04:59 +0100 | <Philos86> | I'm assuming foldl and foldr mean fold-left and fold-right, respectively? |
2022-03-09 10:05:06 +0100 | <ski> | yes |
2022-03-09 10:05:15 +0100 | <Philos86> | Ok so what's the difference? |
2022-03-09 10:05:17 +0100 | <Cale> | Yeah, and those refer to the way that the resulting expression is nested |
2022-03-09 10:05:28 +0100 | <Cale> | > foldr f z [1,2,3] |
2022-03-09 10:05:29 +0100 | <lambdabot> | f 1 (f 2 (f 3 z)) |
2022-03-09 10:05:33 +0100 | <Cale> | > foldl f z [1,2,3] |
2022-03-09 10:05:35 +0100 | <lambdabot> | f (f (f z 1) 2) 3 |
2022-03-09 10:06:03 +0100 | <Cale> | (this is using a cute library that's loaded into lambdabot to display expressions) |
2022-03-09 10:06:53 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-03-09 10:06:54 +0100 | <Cale> | ( https://hackage.haskell.org/package/simple-reflect ) |
2022-03-09 10:08:15 +0100 | <ski> | @where folds |
2022-03-09 10:08:16 +0100 | <lambdabot> | <http://en.wikipedia.org/wiki/File:Fold-diagrams.svg>,<https://cale.l5.ca/share/Folds.svg> |
2022-03-09 10:08:16 +0100 | lumberjack123 | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-03-09 10:08:16 +0100 | <Philos86> | Ok what does the . in mapM_ (print . someFunc) do here? |
2022-03-09 10:08:24 +0100 | <ski> | function composition |
2022-03-09 10:08:38 +0100 | <Cale> | https://cale.l5.ca/share/Folds.svg -- you can see a bunch of folds and folding-related functions visualised here |
2022-03-09 10:08:49 +0100 | <Cale> | (f . g) x = f (g x) |
2022-03-09 10:09:00 +0100 | <ski> | Cale : ahead of you :p |
2022-03-09 10:09:07 +0100 | <Cale> | oh, haha |
2022-03-09 10:09:30 +0100 | <Cale> | The wikipedia link is dead :( |
2022-03-09 10:09:46 +0100 | <Philos86> | Oh so the . passes the result of g into f |
2022-03-09 10:10:33 +0100 | <ski> | Philos86 : it's the same as `mapM_ (\x -> print (someFunc x))', or `mapM_ myFun' where `myFun x = print (someFunc x)' |
2022-03-09 10:11:01 +0100 | <Cale> | Yeah, of course, due to lazy evaluation being outermost-first, what will operationally happen (typically) is that the code for f will be entered immediately with its parameter bound to (g x) |
2022-03-09 10:11:46 +0100 | <Cale> | (and then, when f decides to inspect that argument, g will actually be used) |
2022-03-09 10:12:48 +0100 | <Philos86> | So can Haskell do OOP or is that a bad idea here? |
2022-03-09 10:12:50 +0100 | lumberjack123 | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-03-09 10:13:09 +0100 | <Cale> | It has no built-in features for it, but it can do a pretty good job of it |
2022-03-09 10:13:24 +0100 | <merijn> | Although the use of OOP style design is kinda niche |
2022-03-09 10:13:29 +0100 | <Cale> | Yeah |
2022-03-09 10:14:25 +0100 | <Cale> | Though there are times where I see someone go overboard defining a type that has 180 cases or something, and then that gets pattern matched on only 2 or 3 times :P |
2022-03-09 10:14:27 +0100 | <Philos86> | I'm just curious how you'd handle certain things that typically require state |
2022-03-09 10:15:11 +0100 | <hololeap> | do you know about the state monad? |
2022-03-09 10:15:16 +0100 | <Philos86> | Like for example I've heard reports of Haskell being increasingly used for game development, which typically require AI and some kinda physics library |
2022-03-09 10:15:24 +0100 | <Cale> | A good rule of thumb is that any time you have a type with more constructors than there are times you'll ever pattern match on it, you might just want to replace the type with a record of the results of those pattern matches. |
2022-03-09 10:15:45 +0100 | <Cale> | Let's start even more basic than the state monad |
2022-03-09 10:16:07 +0100 | <Cale> | Functions can produce different results when applied to different arguments |
2022-03-09 10:16:11 +0100 | <Philos86> | hololeap No, I'm only vaguely aware of it and monads in general. |
2022-03-09 10:16:28 +0100 | <hololeap> | ok, I probably got to far ahead |
2022-03-09 10:16:47 +0100 | <Philos86> | Cale Do constructors mean the same thing here as they do in C/C++? |
2022-03-09 10:16:49 +0100 | <Cale> | So you can represent a situation where you have variables that change just by having those variables be the parameters of a function |
2022-03-09 10:16:54 +0100 | <ski> | Philos86 : no |
2022-03-09 10:17:03 +0100 | <Cale> | Philos86: Yeah, not really, no |
2022-03-09 10:17:28 +0100 | <ski> | @where C/C++ |
2022-03-09 10:17:28 +0100 | <lambdabot> | "C/C++ : A new language for the new Millennium" by Richard Heathfield in 2005-02 at <http://web.archive.org/web/20090421080714/http://www.cpax.org.uk/prg/portable/c/c++/rfe00000.html> |
2022-03-09 10:17:51 +0100 | <Cale> | You'll want to read about algebraic data types before the thing I said about data constructors begins to make sense probably :) |
2022-03-09 10:18:09 +0100 | <ski> | and pattern-matching |
2022-03-09 10:19:06 +0100 | <Philos86> | I'm somewhat aware of pattern matching |
2022-03-09 10:19:24 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2022-03-09 10:19:26 +0100 | <merijn> | Philos86: I mean, contrary to the "popular internet perception" Haskell is a whole lot less principled and safe then the average inexperienced person talking about Haskell makes it out to be :p |
2022-03-09 10:19:54 +0100 | <merijn> | Philos86: There's like 5 or 6 different types of mutable state, including straight up "malloc & pointers" :) |
2022-03-09 10:20:00 +0100 | krappix | (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) |
2022-03-09 10:20:15 +0100 | <hololeap> | most languages only know about product types, which are like structs. there are also sum types which are more like "choose a constructor from a list of choices". you can also mix and match |
2022-03-09 10:20:21 +0100 | <Cale> | When you define a new data type, you specify a bunch of new values that get names starting with uppercase letters, and these values can be functions (i.e. they can have arguments), with the special property that you're allowed to pattern match on them and get the arguments back out |
2022-03-09 10:20:33 +0100 | <Philos86> | So you're saying alot of YT is getting it wrong then? |
2022-03-09 10:20:47 +0100 | <merijn> | Philos86: Depends on the channel, probably ;) |
2022-03-09 10:21:04 +0100 | <merijn> | But overall I'd say "most things said about Haskell outside of Haskell communities are wrong", yes :) |
2022-03-09 10:21:22 +0100 | <hololeap> | it's mostly that haskell makes it less easy to break the rules and/or go crazy, but you still can |
2022-03-09 10:21:22 +0100 | <Cale> | Philos86: As a counterpoint to what merijn is pointing out: Haskell also makes it less necessary to use all of those things |
2022-03-09 10:21:43 +0100 | <merijn> | Yeah, in practice you usually don't need all that stuff |
2022-03-09 10:22:04 +0100 | <merijn> | I'm just saying it's there and using it isn't that hard if you come from, like, C |
2022-03-09 10:22:10 +0100 | <Philos86> | Ah ok |
2022-03-09 10:22:26 +0100 | <merijn> | Sure, blowing your foot of using malloc and pointers in Haskell is about as easy as in C, which is motivation not too :p |
2022-03-09 10:22:31 +0100 | <Cale> | and after a while of not using them as much, you will begin to understand why that's a good idea, because programs that don't manipulate state and twiddle things in memory everywhere are so much easier to reason about, debug, and test |
2022-03-09 10:22:36 +0100 | <Philos86> | So if I actually needed to create a singleton or some-such I could, but not necessarily should. |
2022-03-09 10:23:07 +0100 | <merijn> | Philos86: Singletons are less necessary since most things are immutable and pure by default |
2022-03-09 10:23:31 +0100 | <merijn> | Philos86: singletons are important because they arise when "shared mutable state needs to be ensured to be globally unique" |
2022-03-09 10:23:35 +0100 | <Philos86> | Ok so how does Haskell handle things like interfacing with C? |
2022-03-09 10:23:45 +0100 | <merijn> | But if you eliminate most shared mutable state, that's a non-issue |
2022-03-09 10:24:01 +0100 | <merijn> | Philos86: There's a C FFI which is, frankly, trivial to use if you know C |
2022-03-09 10:24:07 +0100 | <Philos86> | Like if I want to draw a triangle in OpenGL, do I need to create wrappers that explicitly state the side-effects of the OGL calls like you do with the IO() datatype? |
2022-03-09 10:24:30 +0100 | <hololeap> | it's actually not that uncommon when you start looking at real programs. it seems like quite a few use MVars (IO mutable variables) to implement essentially the singleton pattern from OOP |
2022-03-09 10:25:15 +0100 | <merijn> | Philos86: Normally C FFI happens using IO |
2022-03-09 10:25:34 +0100 | <merijn> | Philos86: For example, here's a bunch of FFI I do with SQLite and some of my own code in the same repo: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/SQLiteExts.hs#L80-L168 |
2022-03-09 10:26:04 +0100 | <merijn> | And the relevant C header https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/cbits/sqlite-functions.h |
2022-03-09 10:26:05 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:1c1a:3fa2:4926:7c5a) |
2022-03-09 10:26:14 +0100 | <merijn> | Should be fairly straightforward :) |
2022-03-09 10:26:33 +0100 | <hololeap> | but you can get away with a lot less singletons if you learn how to do write haskell idiomatically |
2022-03-09 10:27:10 +0100 | <hololeap> | it's just sometimes they are actually useful at the top level of a program |
2022-03-09 10:27:57 +0100 | <Philos86> | Ah ok that makes sense. |
2022-03-09 10:29:18 +0100 | <Philos86> | Not sure if this is sensible question, but how conducive is Haskell to mathematics in general over other languages like C? |
2022-03-09 10:29:23 +0100 | <merijn> | Philos86: If you have a C/C++ backgroun, Ryan Newton gave an interesting keynote about Haskell at C++Now a few years back: https://www.youtube.com/watch?v=lC5UWG5N8oY |
2022-03-09 10:29:40 +0100 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-03-09 10:29:52 +0100 | <Cale> | Philos86: Haskell is definitely good for those people who have a mathematical mindset |
2022-03-09 10:30:00 +0100 | ccntrq | (~Thunderbi@2a01:c22:8509:dc00:953c:9b71:e9ca:822e) |
2022-03-09 10:30:14 +0100 | <hololeap> | it was written by math nerds |
2022-03-09 10:30:19 +0100 | <Philos86> | Like let's say I need to write some kind of math library that can or will be called from C |
2022-03-09 10:30:46 +0100 | <Philos86> | Cale Ah, that might explain why I'm struggling with it then, as I come from the other side of the camp. |
2022-03-09 10:30:53 +0100 | <maerwald> | I think for actual maths stuff, people use python |
2022-03-09 10:31:18 +0100 | <Philos86> | Could I write my library in Haskell and call it from C? |
2022-03-09 10:31:39 +0100 | <Cale> | Technically, yes, though it's a little awkward to go in that direction |
2022-03-09 10:32:04 +0100 | <Philos86> | maerwald Does Python offer a FFI or call to/from C? Last I checked it doesn't. |
2022-03-09 10:32:24 +0100 | <hololeap> | maybe llvm would make that easier? |
2022-03-09 10:32:28 +0100 | <Cale> | You can FFI export things from Haskell, and then on the C side, you need to call a thing to start the Haskell runtime and then you can call the exported functions. |
2022-03-09 10:32:57 +0100 | Natch | (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 240 seconds) |
2022-03-09 10:33:00 +0100 | <Philos86> | Oh, so Haskell can't generate standalone code that can run then. |
2022-03-09 10:33:18 +0100 | <hololeap> | it has a runtime |
2022-03-09 10:33:22 +0100 | thevishy | (~Nishant@49.37.242.151) (Read error: Connection reset by peer) |
2022-03-09 10:33:22 +0100 | <Cale> | Like, there's a garbage collector and stuff. |
2022-03-09 10:33:31 +0100 | <Cale> | thread scheduler |
2022-03-09 10:33:57 +0100 | thevishy | (~Nishant@49.37.242.151) |
2022-03-09 10:34:10 +0100 | <hololeap> | it's not a good fit for e.g. arduino |
2022-03-09 10:34:25 +0100 | <hololeap> | although I think someone did make a subset that worked for that... |
2022-03-09 10:34:27 +0100 | <Cale> | It might be more appropriate to write Haskell code that writes C code. |
2022-03-09 10:34:45 +0100 | <Philos86> | So if I have a function that is say literally 'f x y = (x ** 5) / pi - y' it would still require the runtime, despite being pure math that could probably be implemented using just doubles and the x87 or SSE/AVX registers? |
2022-03-09 10:35:11 +0100 | <Cale> | There are some libraries like that. FFTW is a fast Fourier transform library written as an O'Caml program that writes C programs |
2022-03-09 10:35:23 +0100 | <__monty__> | Yes, because haskell has certain semantics and guaranteeing those requires the runtime. |
2022-03-09 10:35:26 +0100 | <Philos86> | Cale Funny how we got back to the discussion of whether or not Haskell compiles to C as an intermediary. |
2022-03-09 10:35:36 +0100 | <merijn> | __monty__: disagree |
2022-03-09 10:35:47 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 10:35:57 +0100 | <__monty__> | merijn: Even if I add "at this time?" |
2022-03-09 10:36:12 +0100 | <Cale> | Philos86: Yeah, except that in this case, you'd be writing a one-shot compiler in Haskell, that would itself generate C code. The compiler you could even run interpreted :P |
2022-03-09 10:36:16 +0100 | <merijn> | Philos86: I mean, "does code like that require a runtime?" probably not. Was it worth anyone's engineering time to minimise reliance on the runtime? No |
2022-03-09 10:36:38 +0100 | <Philos86> | That makes sense. |
2022-03-09 10:37:03 +0100 | <merijn> | __monty__: I disagree that Haskell's semantics require a runtime. GHC's implementation kinda hard relies on it, but there's no theoretical reason to consider "Haskell" needing it |
2022-03-09 10:37:20 +0100 | kuribas | (~user@ptr-25vy0ia81ze2oltltpx.18120a2.ip6.access.telenet.be) |
2022-03-09 10:37:49 +0100 | <Cale> | There's a library called Atom that was written and used a while back to make the control software for a bunch of hybrid hydraulic vehicles. It's a Haskell library that generates C code to avoid the need for a realtime operating system. |
2022-03-09 10:37:55 +0100 | <hololeap> | that's actually a good point. a lot of this isn't haskell specific, but ghc specific |
2022-03-09 10:37:59 +0100 | <__monty__> | Yeah, but this discussion isn't really about pie in the sky stuff. The question is rather concrete. "Can I FFI into Haskell without the runtime." |
2022-03-09 10:38:08 +0100 | <Cale> | https://hackage.haskell.org/package/atom |
2022-03-09 10:38:36 +0100 | <merijn> | Philos86: The runtime itself is "just" a library linked into the program, if you're one of those people trying to shave off every byte, that's a problem, but in practice that's a non-issue since you usually wanna embed a non-trivial amount of Haskell so you'd need most of the runtime anyway |
2022-03-09 10:38:54 +0100 | <Cale> | Yeah |
2022-03-09 10:39:00 +0100 | ishutin | (~ishutin@87-97-2-239.pool.digikabel.hu) (Ping timeout: 250 seconds) |
2022-03-09 10:39:08 +0100 | <Cale> | Though, it's usually more comfortable regardless just to go the other way |
2022-03-09 10:39:09 +0100 | maerwald | looks at his 50MB big binaries that have 200LOC of code |
2022-03-09 10:39:30 +0100 | <Philos86> | Well the idea was to use Haskell for situations where Haskell lends itself very well (eg. math and physics libraries), or for very math-heavy programs (eg. computer graphics) thinking that Haskell, being a pure functional language, could optimize or be optimized for said usage better than C/C++ would. |
2022-03-09 10:39:33 +0100 | <Cale> | Usually the stuff that needs to be written in C is a lot smaller |
2022-03-09 10:39:46 +0100 | <dminuoso> | maerwald: To be fair, the default of cabal not splitting sections and not stripping your binary is a big part of that. |
2022-03-09 10:40:04 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-03-09 10:40:04 +0100 | <hololeap> | also it being statically linked by default |
2022-03-09 10:40:05 +0100 | <Cale> | Or, more to the point, the performance-critical stuff is usually tight loops in the innermost parts of your program |
2022-03-09 10:40:05 +0100 | <dminuoso> | (Amusingly cabal has a defunct stripping function. You can enable it all you want, it actually doesnt do anything) |
2022-03-09 10:40:23 +0100 | <maerwald> | Philos86: I'm not sure Haskell is very strong on math-heavy programs. The fact that it's suitable for math-like minds doesn't imply we can compete with other language ecosystems wrt such libraries |
2022-03-09 10:40:23 +0100 | <Cale> | and so it's fine to surround that with high-level code |
2022-03-09 10:40:39 +0100 | <Philos86> | dminuoso I'm using stack, not cabal so not sure if I have that problem. |
2022-03-09 10:40:53 +0100 | ishutin | (~ishutin@85-238-93-20.pool.digikabel.hu) |
2022-03-09 10:41:07 +0100 | EvanR_ | (~EvanR@user/evanr) |
2022-03-09 10:41:10 +0100 | <Philos86> | maerwald Ah, ok that makes sense. |
2022-03-09 10:41:17 +0100 | <dminuoso> | Philos86: Doesnt stack use cabal-the-lib though? |
2022-03-09 10:41:22 +0100 | <hololeap> | isn't massive pretty competitive as far as performance? |
2022-03-09 10:41:28 +0100 | <maerwald> | having done computer graphics in Haskell a bit, I'm pretty confident to say it cannot compete with OpenCV for example |
2022-03-09 10:41:28 +0100 | <merijn> | maerwald: That sound's like your not stripping and not using split sections |
2022-03-09 10:41:28 +0100 | <Philos86> | I have no idea; I'm new to all of this haha. |
2022-03-09 10:41:34 +0100 | <Cale> | Yeah, there is a bunch of numerical stuff written for Haskell, but it's a bit haphazard, and there hasn't been a coordinated effort of any kind to build a one-size-fits-all numerical computing solution. |
2022-03-09 10:41:35 +0100 | EvanR | (~EvanR@user/evanr) (Read error: Connection reset by peer) |
2022-03-09 10:41:35 +0100 | <maerwald> | merijn: I am =) |
2022-03-09 10:41:46 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 256 seconds) |
2022-03-09 10:41:46 +0100 | <dminuoso> | sounds unlikely |
2022-03-09 10:42:03 +0100 | <dminuoso> | Even our 20kLOC with plenty of libraries is smaller than that |
2022-03-09 10:42:11 +0100 | <hololeap> | *Massiv |
2022-03-09 10:42:16 +0100 | <dminuoso> | maerwald: How do you strip? Do you rely on `enable-stripping` in cabal? |
2022-03-09 10:42:32 +0100 | <dminuoso> | Err *executable-stripping |
2022-03-09 10:42:40 +0100 | <dminuoso> | Because that thing is properly broken and doesnt do anything |
2022-03-09 10:42:45 +0100 | <maerwald> | I'm aware |
2022-03-09 10:42:47 +0100 | <Cale> | But if you have to do like, one numerical computing thing... there are bindings to BLAS and Lapack and a bunch of other stuff, as well as some higher level libraries for more specific tasks. |
2022-03-09 10:43:11 +0100 | <maerwald> | cabal build --ghc-options='-split-sections -optl-static' |
2022-03-09 10:43:12 +0100 | <merijn> | maerwald: My 30k LOC using a bazillion libraries is 20MB unstripped |
2022-03-09 10:43:29 +0100 | <dminuoso> | Yup, our 20kLOC with a bazillion libraries is around 16MiB as well |
2022-03-09 10:43:30 +0100 | <Cale> | https://hackage.haskell.org/package/statistics -- this library is pretty decent in my experience |
2022-03-09 10:43:45 +0100 | <merijn> | maerwald: Are you sure most that size isn't the C libraries you're linking? |
2022-03-09 10:43:49 +0100 | <maerwald> | obviously, I was exaggarating |
2022-03-09 10:44:04 +0100 | <Philos86> | So like if I want to write a ray-tracer (where you need a BVH, or an Octree, and many other things like BSDFs and such) would that actually be harder to do that in Haskell? |
2022-03-09 10:44:21 +0100 | <merijn> | Philos86: I don't think so |
2022-03-09 10:45:07 +0100 | <dminuoso> | merijn: though, 20MiB unstripped? |
2022-03-09 10:45:09 +0100 | <dminuoso> | How did you do that? |
2022-03-09 10:45:24 +0100 | <dminuoso> | Anything of that size with a bazillion libraries would probably be closer to 100MiB |
2022-03-09 10:45:26 +0100 | <Cale> | I've written a raytracer that was about 1 page of Haskell code at some point. Of course, it had no fancy features of any kind, and it just rendered some spheres with fractal reflections :) |
2022-03-09 10:45:53 +0100 | <merijn> | dminuoso: The power of transitive split-sections? |
2022-03-09 10:45:56 +0100 | <maerwald> | Philos86: and even if you manage to build your computational graphics stuff in Haskell, you're very unlikely reaching similar-to-C performance unless you invest a LOT of time into performance optimization in Haskell |
2022-03-09 10:46:03 +0100 | <Cale> | I wonder if I still have it somewhere... I think it might be past the point where I lost a bunch of stuff in a hard drive death |
2022-03-09 10:46:20 +0100 | <merijn> | maerwald: I'm not even convinced of that for "offline" raytracing |
2022-03-09 10:46:49 +0100 | <Cale> | On the up-side, it can be pretty easy to experiment with parallelism in Haskell |
2022-03-09 10:47:06 +0100 | <kuribas> | I am thinking to write a library that has lenses to change or read from a bytestring directly, using some record as template. |
2022-03-09 10:47:35 +0100 | <kuribas> | So basically: getField . deserialize, but without the deserialize. |
2022-03-09 10:47:50 +0100 | <Cale> | (Getting truly great performance still takes work, but for a raytracer, it would be easy at least to get all your cores hot) |
2022-03-09 10:47:52 +0100 | <Philos86> | Cale Does that it'd be relatively simple for one to implement a rasterizer in Haskell? |
2022-03-09 10:48:07 +0100 | <Philos86> | *that mean |
2022-03-09 10:48:14 +0100 | <kuribas> | Hopefully ghc can inline the lenses, and reduce them to offsets. |
2022-03-09 10:48:25 +0100 | <merijn> | dminuoso: On linux it's 11 MB stripped (13 on macos) |
2022-03-09 10:48:30 +0100 | <Cale> | Yeah, relatively simple to get something that goes faster than single-threaded anyway |
2022-03-09 10:48:38 +0100 | Natch | (~natch@c-67bae255.014-297-73746f25.bbcust.telenor.se) |
2022-03-09 10:48:46 +0100 | <Cale> | You might have to fiddle around a bit with how you chunk the work |
2022-03-09 10:49:08 +0100 | <Cale> | but for a raytracer, it's embarrassingly parallel, so you'll get a decent solution without too much trouble |
2022-03-09 10:49:24 +0100 | <kuribas> | so "view @"field" @MyRecord bs", becomes "peekAt fieldOffset bs" |
2022-03-09 10:50:10 +0100 | <kuribas> | With the hope that this gives C like performance, but safe manipulation of the binary. |
2022-03-09 10:51:25 +0100 | <kuribas> | Using generics. |
2022-03-09 10:51:27 +0100 | <maerwald> | kuribas: in order to do fast bytestring access you need to rely on e.g. elemIndex, which uses memchr |
2022-03-09 10:51:44 +0100 | <kuribas> | maerwald: yes? |
2022-03-09 10:52:16 +0100 | <maerwald> | How would you do that when you need to deserialize? Usually you have a binary format that tells you where the next offset is if you need to process large binary data |
2022-03-09 10:52:18 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) (Ping timeout: 272 seconds) |
2022-03-09 10:52:22 +0100 | <kuribas> | Or I use "peek"? |
2022-03-09 10:52:54 +0100 | <kuribas> | maerwald: the idea is not to deserialize, but to calculate the offsets from a record definition. |
2022-03-09 10:52:57 +0100 | worldhelloworld | (~c1utt4r@vmi275462.contaboserver.net) (Ping timeout: 272 seconds) |
2022-03-09 10:53:04 +0100 | <kuribas> | the record definition also defines the binary format of the blob. |
2022-03-09 10:53:34 +0100 | <kuribas> | Maybe generics are too fragile, and I will need to generate lenses using TH... |
2022-03-09 10:53:41 +0100 | <Philos86> | Cale So how would Haskell's parallelism align with GPGPU parallelism? |
2022-03-09 10:53:58 +0100 | <maerwald> | kuribas: maybe https://hackage.haskell.org/package/winery is enough, it's very performant |
2022-03-09 10:54:03 +0100 | <Philos86> | Also can Haskell natively compile code to run on GPUs? |
2022-03-09 10:54:55 +0100 | <Philos86> | Theoretically, if GHC generates and compiles its own CPU code couldn't it also do the same for GPUs and keep them in sync? |
2022-03-09 10:55:21 +0100 | thevishy | (~Nishant@49.37.242.151) (Quit: Leaving) |
2022-03-09 10:55:30 +0100 | <Philos86> | Like say I'm running a fold over some complex function with a number of values and parameters. Can GHC break that down into chunks that would run on a GPU? |
2022-03-09 10:57:13 +0100 | <kuribas> | maerwald: yeah, that looks interesting. |
2022-03-09 10:58:04 +0100 | <hololeap> | more likely there would be some kind of language subset or interface that limits the allowed operations and then compile that to the cuda code or whatever |
2022-03-09 10:58:15 +0100 | <hololeap> | I don't know if that exists currently, though |
2022-03-09 10:58:55 +0100 | <Philos86> | Huh. |
2022-03-09 10:58:55 +0100 | ubert | (~Thunderbi@p200300ecdf3be98fb257cc52479c2a5c.dip0.t-ipconnect.de) |
2022-03-09 10:58:56 +0100 | <Cale> | There is a library, I haven't heard much about it in years, but it's apparently still maintained https://hackage.haskell.org/package/accelerate |
2022-03-09 10:59:34 +0100 | <Cale> | It's pretty cool -- you can write array operations, and there are backends that can use CUDA or various other mechanisms to implement them |
2022-03-09 11:01:32 +0100 | <Cale> | https://github.com/AccelerateHS/accelerate/ good readme here with a bunch of links to resources |
2022-03-09 11:03:50 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 11:05:37 +0100 | jespada | (~jespada@148.252.132.235) (Ping timeout: 272 seconds) |
2022-03-09 11:06:04 +0100 | jespada | (~jespada@148.252.132.235) |
2022-03-09 11:06:08 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 256 seconds) |
2022-03-09 11:06:38 +0100 | MajorBiscuit | (~MajorBisc@c-001-015-055.client.tudelft.eduvpn.nl) |
2022-03-09 11:07:57 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Ping timeout: 240 seconds) |
2022-03-09 11:11:29 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-03-09 11:20:22 +0100 | romesrf | (~romes@44.190.189.46.rev.vodafone.pt) |
2022-03-09 11:21:59 +0100 | worldhelloworld | (~c1utt4r@vmi275462.contaboserver.net) |
2022-03-09 11:24:37 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) |
2022-03-09 11:24:52 +0100 | <romesrf> | \o |
2022-03-09 11:25:21 +0100 | Akiva | (~Akiva@user/Akiva) (Ping timeout: 245 seconds) |
2022-03-09 11:25:39 +0100 | jespada | (~jespada@148.252.132.235) (Ping timeout: 256 seconds) |
2022-03-09 11:26:36 +0100 | c209e6dc-4d76-47 | (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!) |
2022-03-09 11:27:49 +0100 | akegalj | (~akegalj@78-3-81-31.adsl.net.t-com.hr) |
2022-03-09 11:36:53 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2022-03-09 11:37:09 +0100 | lavaman | (~lavaman@98.38.249.169) |
2022-03-09 11:37:16 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2022-03-09 11:42:10 +0100 | jespada | (~jespada@148.252.132.235) |
2022-03-09 11:45:05 +0100 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2022-03-09 11:46:11 +0100 | zaquest | (~notzaques@5.130.79.72) |
2022-03-09 11:54:09 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) |
2022-03-09 11:56:01 +0100 | da39a3ee5e6b4b0_ | (~textual@171.5.29.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 11:58:23 +0100 | acidjnk | (~acidjnk@p200300d0c7049f95a8560519e34e318b.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-03-09 12:02:22 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) (Remote host closed the connection) |
2022-03-09 12:07:36 +0100 | krappix | (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Ping timeout: 256 seconds) |
2022-03-09 12:12:46 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:39f9:90f7:922:e73b) |
2022-03-09 12:13:34 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
2022-03-09 12:15:46 +0100 | coot | (~coot@213.134.190.95) |
2022-03-09 12:15:50 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
2022-03-09 12:15:55 +0100 | vglfr | (~vglfr@88.155.45.155) (Ping timeout: 272 seconds) |
2022-03-09 12:17:35 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:39f9:90f7:922:e73b) (Remote host closed the connection) |
2022-03-09 12:18:07 +0100 | fendor_ | (~fendor@91.141.34.180.wireless.dyn.drei.com) |
2022-03-09 12:18:19 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) |
2022-03-09 12:20:56 +0100 | fendor | (~fendor@178.165.181.170.wireless.dyn.drei.com) (Ping timeout: 256 seconds) |
2022-03-09 12:21:19 +0100 | zeenk | (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Quit: Konversation terminated!) |
2022-03-09 12:22:01 +0100 | jespada | (~jespada@148.252.132.235) (Read error: Connection reset by peer) |
2022-03-09 12:24:29 +0100 | awpr | (uid446117@id-446117.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-03-09 12:24:36 +0100 | Inst | (~Liam@2601:6c4:4080:3f80:8c26:e871:cea5:bbc0) (Ping timeout: 240 seconds) |
2022-03-09 12:26:16 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) (Remote host closed the connection) |
2022-03-09 12:26:21 +0100 | deadmarshal_ | (~deadmarsh@95.38.230.176) |
2022-03-09 12:27:16 +0100 | kaph | (~kaph@an-19-184-70.service.infuturo.it) |
2022-03-09 12:30:09 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 12:33:48 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 12:34:25 +0100 | ishutin | (~ishutin@85-238-93-20.pool.digikabel.hu) (Read error: Connection reset by peer) |
2022-03-09 12:36:18 +0100 | euprogramista | (~euprogram@185.218.127.6) |
2022-03-09 12:36:19 +0100 | ishutin | (~ishutin@87-97-12-221.pool.digikabel.hu) |
2022-03-09 12:37:40 +0100 | <euprogramista> | hi there, can use this channel to ask general questions about haskell (even some beginner's questions)? |
2022-03-09 12:38:25 +0100 | <yushyin> | euprogramista: yes! |
2022-03-09 12:38:36 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-03-09 12:38:56 +0100 | <euprogramista> | yushyin: tks |
2022-03-09 12:39:19 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) |
2022-03-09 12:40:03 +0100 | <euprogramista> | I'm studying the chapter about functors-applicative-functors-and-monoids from LYAH and things are getting a bit complicated on the topic about using fmap over functions. |
2022-03-09 12:40:36 +0100 | <euprogramista> | one particular thing caught my attention: "When we use fmap (+3) over Just 3, it's easy to..." |
2022-03-09 12:41:05 +0100 | <euprogramista> | so I tried to just check the type of `:t fmap (*3) Just` |
2022-03-09 12:41:18 +0100 | <euprogramista> | which is `fmap (*3) Just :: Num (Maybe a) => a -> Maybe a` |
2022-03-09 12:41:34 +0100 | <euprogramista> | I got confused about what is this `Num (Maybe a)` |
2022-03-09 12:41:56 +0100 | <kuribas> | :t Just --euprogramista |
2022-03-09 12:41:56 +0100 | <lambdabot> | a -> Maybe a |
2022-03-09 12:41:58 +0100 | <euprogramista> | I understand what could be `Num a` or `Maybe a` |
2022-03-09 12:42:02 +0100 | lavaman | (~lavaman@98.38.249.169) |
2022-03-09 12:42:30 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 272 seconds) |
2022-03-09 12:42:34 +0100 | <kuribas> | euprogramista: it's trying to do (*3) over a (Maybe a). |
2022-03-09 12:43:01 +0100 | <kuribas> | euprogramista: you are "fmapping" over the function Just, not over the Maybe type. |
2022-03-09 12:43:04 +0100 | <euprogramista> | kuribas: so how can I apply (*3) to (Maybe a)? |
2022-03-09 12:43:15 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-03-09 12:43:48 +0100 | <euprogramista> | if I try to make this work in my head I think that it woud be the same as trying to do ((Just 1) * 3) which wouldn't work |
2022-03-09 12:43:53 +0100 | <kuribas> | :t fmap (*3) (Just 2) |
2022-03-09 12:43:54 +0100 | <lambdabot> | Num b => Maybe b |
2022-03-09 12:43:58 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d43:5e37:69e3:551c) (Remote host closed the connection) |
2022-03-09 12:44:10 +0100 | <romesrf> | :t fmap |
2022-03-09 12:44:11 +0100 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
2022-03-09 12:44:19 +0100 | <romesrf> | (a -> b) -> (f a -> f b) |
2022-03-09 12:44:25 +0100 | <euprogramista> | right... but how can I, as an example, use (fmap (*3) Just) ? |
2022-03-09 12:44:34 +0100 | <romesrf> | a function from a to b becomes a function from Maybe a to Maybe b |
2022-03-09 12:44:40 +0100 | <romesrf> | :t (*3) |
2022-03-09 12:44:41 +0100 | <lambdabot> | Num a => a -> a |
2022-03-09 12:44:44 +0100 | arjun | (~arjun@user/arjun) (Ping timeout: 256 seconds) |
2022-03-09 12:44:45 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 12:44:49 +0100 | <romesrf> | :t fmap @Maybe (*3) |
2022-03-09 12:44:50 +0100 | <lambdabot> | error: |
2022-03-09 12:44:50 +0100 | <lambdabot> | Pattern syntax in expression context: fmap@Maybe |
2022-03-09 12:44:50 +0100 | <lambdabot> | Did you mean to enable TypeApplications? |
2022-03-09 12:45:06 +0100 | <romesrf> | :t fmap (*3) :: (Maybe a -> Maybe b) |
2022-03-09 12:45:07 +0100 | <lambdabot> | error: |
2022-03-09 12:45:07 +0100 | <lambdabot> | • Couldn't match type ‘a1’ with ‘b1’ |
2022-03-09 12:45:07 +0100 | <lambdabot> | ‘a1’ is a rigid type variable bound by |
2022-03-09 12:45:10 +0100 | <kuribas> | euprogramista: because "Just" is a function, so you are fmapping over the function. |
2022-03-09 12:45:55 +0100 | <romesrf> | when you fmap (*3), the function Int -> Int becomes Maybe Int -> Maybe Int |
2022-03-09 12:46:06 +0100 | <romesrf> | which you can then apply to any (Maybe Int) to get another Maybe Int |
2022-03-09 12:46:22 +0100 | <euprogramista> | hmm... I think that this makes sense to me now |
2022-03-09 12:46:37 +0100 | <romesrf> | euprogramista: but I would also recommend seeing the fmap instance of Maybe |
2022-03-09 12:46:43 +0100 | <kuribas> | :t fmap (+1) (*3) |
2022-03-09 12:46:43 +0100 | <lambdabot> | Num b => b -> b |
2022-03-09 12:46:55 +0100 | <romesrf> | https://hackage.haskell.org/package/base-4.16.0.0/docs/src/GHC.Base.html#line-1030 |
2022-03-09 12:46:57 +0100 | <kuribas> | > (fmap (+1) (*3)) 6 |
2022-03-09 12:46:58 +0100 | <lambdabot> | 19 |
2022-03-09 12:47:04 +0100 | <euprogramista> | so the Num (Maybe a) is to tell that I'm gonna get a Maybe where a is a Num? |
2022-03-09 12:47:48 +0100 | <euprogramista> | Id like to test this function |
2022-03-09 12:48:03 +0100 | <euprogramista> | (fmap (*3) Just) 10 |
2022-03-09 12:48:04 +0100 | <romesrf> | euprogramista: No, you only got Num (Maybe a) because you applied fmap to a function rather than to a maybe value |
2022-03-09 12:48:17 +0100 | <euprogramista> | > (fmap (*3) Just) 10 |
2022-03-09 12:48:18 +0100 | <lambdabot> | error: |
2022-03-09 12:48:18 +0100 | <lambdabot> | • No instance for (Num (Maybe Integer)) |
2022-03-09 12:48:18 +0100 | <lambdabot> | arising from a use of ‘e_1310’ |
2022-03-09 12:49:04 +0100 | <romesrf> | `fmap (*3) Just` :: (Num (Maybe a) => a -> Maybe a) -- the constraint here indicates that the function is a -> Maybe a as long as there is an instance Num (Maybe a) |
2022-03-09 12:49:42 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 12:49:56 +0100 | <romesrf> | euprogramista: the thing about fmap is that it works for any functor, not just Maybes, that's why you didn't get a type error when you did (fmap (*3) Just) instead of (fmap (*3) (Just 2)) |
2022-03-09 12:50:01 +0100 | <romesrf> | :t Just |
2022-03-09 12:50:03 +0100 | <lambdabot> | a -> Maybe a |
2022-03-09 12:50:20 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-03-09 12:50:31 +0100 | <romesrf> | (a -> Maybe a) is a function, and functions are functors (instance Functor ((->) a)) |
2022-03-09 12:50:50 +0100 | <romesrf> | so if you think about fmap of the function functor instead of mayb |
2022-03-09 12:50:58 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-03-09 12:51:20 +0100 | <romesrf> | fmap of maybe is :: (a -> b) -> Maybe a -> Maybe b |
2022-03-09 12:51:55 +0100 | <euprogramista> | so not necessarily just because I can use fmap with any functor it doesn't mean that what I get will work in practical means? |
2022-03-09 12:52:14 +0100 | <kuribas> | euprogramista: Note that technically any type could be a Num instance, for example functions. Luckily functions don't have a Num instance. That's why this doesn't give a type error. |
2022-03-09 12:52:19 +0100 | <kuribas> | (but should give one). |
2022-03-09 12:52:22 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 12:52:52 +0100 | <kuribas> | > (fmap (*(3::Int)) Just) 10 -- restricting the literal to Int solves this. |
2022-03-09 12:52:54 +0100 | <lambdabot> | error: |
2022-03-09 12:52:54 +0100 | <lambdabot> | • Couldn't match type ‘Maybe t0’ with ‘Int’ |
2022-03-09 12:52:54 +0100 | <lambdabot> | Expected type: t0 -> Int |
2022-03-09 12:54:12 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 250 seconds) |
2022-03-09 12:54:28 +0100 | <romesrf> | euprogramista: e.g. using "+" to sum two strings in javascript won't sum de ascii value of the strings but rather join the two strings together |
2022-03-09 12:54:29 +0100 | <kuribas> | Well, in your case, the literal would be a "Maybe a" value. |
2022-03-09 12:54:43 +0100 | <romesrf> | euprogramista: so when using fmap you need to think about the semantics of what you're using it on |
2022-03-09 12:55:15 +0100 | ccntrq | (~Thunderbi@2a01:c22:8509:dc00:953c:9b71:e9ca:822e) (Ping timeout: 268 seconds) |
2022-03-09 12:55:17 +0100 | <romesrf> | fmap (any_function) has type Functor f => f a -> f b |
2022-03-09 12:55:28 +0100 | CiaoSen | (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-03-09 12:55:40 +0100 | <romesrf> | what that function now does depends on the implementation of fmap for the specific functor you're using |
2022-03-09 12:56:45 +0100 | ccntrq | (~Thunderbi@2a01:c23:941d:5a00:c6ed:e12e:1f74:6b4a) |
2022-03-09 12:57:43 +0100 | acidjnk | (~acidjnk@p200300d0c7049f95a8560519e34e318b.dip0.t-ipconnect.de) |
2022-03-09 12:59:36 +0100 | ccntrq1 | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) |
2022-03-09 13:00:42 +0100 | kaph | (~kaph@an-19-184-70.service.infuturo.it) (Read error: Connection reset by peer) |
2022-03-09 13:01:08 +0100 | ccntrq | (~Thunderbi@2a01:c23:941d:5a00:c6ed:e12e:1f74:6b4a) (Ping timeout: 250 seconds) |
2022-03-09 13:01:09 +0100 | ccntrq1 | ccntrq |
2022-03-09 13:02:10 +0100 | <euprogramista> | okay... maybe this can also help me to better understand it: When I see something like this -> f :: (Eq a) => a -> a -> Bool. I can read it as the function takes two arguments and they have to be a member of Eq. How can I properly read Num (Maybe a) => a -> Maybe a? |
2022-03-09 13:02:27 +0100 | <euprogramista> | sorry that it's taking long for me to properly understand |
2022-03-09 13:03:45 +0100 | <kuribas> | euprogramista: Don't worry. It means the function can take a value of type `a` into a value of type `Maybe a`, but only as long as an instance `Maybe a` for Num exists. |
2022-03-09 13:04:07 +0100 | <kuribas> | euprogramista: in practice it doesn't exist, but type classes are open, so someone "could" define it. |
2022-03-09 13:04:43 +0100 | <romesrf> | f :: Eq a => a -> a -> Bool is read "f is a function that forall types a that satisfy the constraint `Eq a`, a -> a -> Bool" |
2022-03-09 13:05:03 +0100 | coot | (~coot@213.134.190.95) (Remote host closed the connection) |
2022-03-09 13:05:21 +0100 | <romesrf> | which means you can call this function with any type that instances Eq |
2022-03-09 13:05:26 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2022-03-09 13:06:02 +0100 | <romesrf> | Num (Maybe a) => a -> Maybe a is a function that forall 'a's such that (Maybe a) is an instance of Num, takes an a and returns Maybe a |
2022-03-09 13:06:02 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 13:06:39 +0100 | <romesrf> | however, by default, there isn't any `a` that can make that be true |
2022-03-09 13:07:06 +0100 | <romesrf> | you could define in your code something like `instance Num (Maybe Int)` |
2022-03-09 13:07:21 +0100 | <romesrf> | so if you called that function with an Int, it would work because (Maybe Int) would be an instance of Num |
2022-03-09 13:07:51 +0100 | <kuribas> | euprogramista: constraints don't have to be on type variables, they can be on any type. |
2022-03-09 13:08:01 +0100 | <romesrf> | however, by default no instance like that is defined, so even though that function exists, it can't really be called because there is no satisfying `a` |
2022-03-09 13:08:42 +0100 | <romesrf> | but if you create such instance of (Num (Maybe Int)), you'd be able to call that function with a == Int |
2022-03-09 13:08:49 +0100 | <euprogramista> | omg I think I get it now |
2022-03-09 13:08:55 +0100 | <romesrf> | euprogramista: :P |
2022-03-09 13:09:02 +0100 | <euprogramista> | when I run this: |
2022-03-09 13:09:07 +0100 | <euprogramista> | > :info Num |
2022-03-09 13:09:09 +0100 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
2022-03-09 13:09:12 +0100 | <albet70> | is there a library in haskell like pandas in python? for excel data |
2022-03-09 13:09:15 +0100 | <romesrf> | :info Num |
2022-03-09 13:09:22 +0100 | Philos86 | (~Philos86@38.80.235.160) (Ping timeout: 256 seconds) |
2022-03-09 13:09:22 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
2022-03-09 13:09:23 +0100 | <romesrf> | % :info Num |
2022-03-09 13:09:24 +0100 | <yahb> | romesrf: type Num :: * -> Constraint; class Num a where; (+) :: a -> a -> a; (-) :: a -> a -> a; (*) :: a -> a -> a; negate :: a -> a; abs :: a -> a; signum :: a -> a; fromInteger :: Integer -> a; {-# MINIMAL (+), (*), abs, signum, fromInteger, (negate | (-)) #-}; -- Defined in `GHC.Num'; instance Num DiffTime -- Defined in `time-1.9.3:Data.Time.Clock.Internal.DiffTime'; instance Num NominalDiffTime |
2022-03-09 13:09:29 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 13:09:40 +0100 | <euprogramista> | I can see that there is no instance for Maybe |
2022-03-09 13:09:54 +0100 | <romesrf> | euprogramista: yeah! |
2022-03-09 13:09:56 +0100 | <euprogramista> | the :info Num proves exactly what you folks are saying |
2022-03-09 13:10:04 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-03-09 13:10:12 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Ping timeout: 240 seconds) |
2022-03-09 13:10:13 +0100 | <euprogramista> | great! thanks a lot for walking me through this folks |
2022-03-09 13:10:22 +0100 | <romesrf> | euprogramista: good luck keep up |
2022-03-09 13:10:34 +0100 | <romesrf> | it only gets more fun :D |
2022-03-09 13:10:39 +0100 | <euprogramista> | this channel is a bless :D studying haskell alone is hard |
2022-03-09 13:11:04 +0100 | <romesrf> | posting questions on discourse also works |
2022-03-09 13:11:15 +0100 | <romesrf> | discourse.haskell.org |
2022-03-09 13:11:22 +0100 | <euprogramista> | :interesting |
2022-03-09 13:11:46 +0100 | <romesrf> | it's good that the questions are more "searchable" there, you might find things other people have asked interesting too |
2022-03-09 13:12:24 +0100 | <kuribas> | euprogramista: hint: many functions in haskell are actually very general, and this can be confusing for beginners. Put type annotations on such functions or values to make the types easier. |
2022-03-09 13:12:37 +0100 | <kuribas> | :t foldr |
2022-03-09 13:12:38 +0100 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
2022-03-09 13:12:55 +0100 | <kuribas> | :t foldr :: (a -> b -> b) -> b -> [a] -> b |
2022-03-09 13:12:56 +0100 | <lambdabot> | (a -> b -> b) -> b -> [a] -> b |
2022-03-09 13:13:11 +0100 | <euprogramista> | nice I didn't know about discourse. I've been usually searching on stackoverflow but answers are usually full of theory that I can't follow at the moment. |
2022-03-09 13:13:35 +0100 | <kuribas> | Which is in fact good practice for anyone have problem with difficult types errors. |
2022-03-09 13:14:12 +0100 | Topsi | (~Tobias@dyndsl-095-033-023-104.ewe-ip-backbone.de) |
2022-03-09 13:14:23 +0100 | <euprogramista> | kuribas: what do you mean by type annotation? |
2022-03-09 13:14:56 +0100 | <euprogramista> | sorry I should have googled this one (was just convenient since I'm already here) |
2022-03-09 13:15:01 +0100 | <kuribas> | euprogramista: (value :: type) |
2022-03-09 13:15:16 +0100 | <kuribas> | it constrains the value to the type. |
2022-03-09 13:15:24 +0100 | <euprogramista> | ah got it |
2022-03-09 13:15:30 +0100 | <kuribas> | > 3 :: Int |
2022-03-09 13:15:31 +0100 | <lambdabot> | 3 |
2022-03-09 13:15:36 +0100 | <kuribas> | :t 3 |
2022-03-09 13:15:37 +0100 | <lambdabot> | Num p => p |
2022-03-09 13:15:40 +0100 | <kuribas> | :t 3 :: Int |
2022-03-09 13:15:41 +0100 | <lambdabot> | Int |
2022-03-09 13:15:50 +0100 | <euprogramista> | in the LYAH it calls it class constraint instead of type annotation |
2022-03-09 13:16:26 +0100 | <euprogramista> | but I guess class constraint is just one way to call it |
2022-03-09 13:16:27 +0100 | <kuribas> | no, the class constraint is the part before "=>" |
2022-03-09 13:16:50 +0100 | <kuribas> | type annotation is ":: <some type>" |
2022-03-09 13:17:05 +0100 | <kuribas> | they are different things. |
2022-03-09 13:17:11 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-03-09 13:18:16 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:1c1a:3fa2:4926:7c5a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 13:19:30 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 13:19:35 +0100 | <euprogramista> | kuribas: thanks for helping |
2022-03-09 13:21:20 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 13:21:49 +0100 | <kuribas> | np |
2022-03-09 13:21:56 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-03-09 13:22:27 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 13:23:24 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:1c1a:3fa2:4926:7c5a) |
2022-03-09 13:23:32 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-03-09 13:23:33 +0100 | <albet70> | is there library to read and write excel file? |
2022-03-09 13:28:48 +0100 | <geekosaur> | hackage shows several in various states of support and completeness |
2022-03-09 13:31:17 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 13:31:37 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 13:32:00 +0100 | euprogra1ista | (~euprogram@ip-103-85-36-164.syd.xi.com.au) |
2022-03-09 13:33:48 +0100 | euprogramista | (~euprogram@185.218.127.6) (Ping timeout: 272 seconds) |
2022-03-09 13:34:31 +0100 | <lortabac> | albet70: I have used xlsx, it's not ideal but it did the job for me |
2022-03-09 13:34:39 +0100 | <lortabac> | @hackage xlsx |
2022-03-09 13:34:39 +0100 | <lambdabot> | https://hackage.haskell.org/package/xlsx |
2022-03-09 13:35:17 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 13:35:35 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-03-09 13:37:37 +0100 | Logio | (em@kapsi.fi) (Ping timeout: 272 seconds) |
2022-03-09 13:37:44 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 13:39:10 +0100 | kongsheng | (~kongsheng@71.28.228.142) |
2022-03-09 13:39:44 +0100 | euprogra1ista | (~euprogram@ip-103-85-36-164.syd.xi.com.au) () |
2022-03-09 13:41:18 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 13:41:29 +0100 | adamcstephens | (~m-2jewo5@129.153.21.50) () |
2022-03-09 13:41:30 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-03-09 13:41:43 +0100 | Lycurgus | (~juan@98.4.112.204) |
2022-03-09 13:41:44 +0100 | <albet70> | ok |
2022-03-09 13:42:08 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 13:42:45 +0100 | Logio | (em@kapsi.fi) |
2022-03-09 13:46:25 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 13:46:43 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 13:47:14 +0100 | fendor_ | (~fendor@91.141.34.180.wireless.dyn.drei.com) (Remote host closed the connection) |
2022-03-09 13:48:56 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2022-03-09 13:49:14 +0100 | vysn | (~vysn@user/vysn) (Ping timeout: 250 seconds) |
2022-03-09 13:50:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 13:50:19 +0100 | re101-fousek-71 | (~re101-fou@196.43.170.89) |
2022-03-09 13:51:15 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 13:54:52 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-03-09 13:55:52 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 13:58:02 +0100 | AlexNoo_ | AlexNoo |
2022-03-09 14:00:45 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 14:00:49 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) |
2022-03-09 14:01:16 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:02:47 +0100 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-03-09 14:05:46 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 14:06:26 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 14:09:44 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 14:09:44 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 14:10:17 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-03-09 14:12:03 +0100 | <Topsi> | I get the following error with a nightly GHC and a project created with stack new: https://paste.tomsmeding.com/2LsGbbDm |
2022-03-09 14:12:09 +0100 | <Topsi> | There is a similar issue, which was apparently worked around by adding cabal to the setup-depends field. https://github.com/commercialhaskell/stack/issues/5110 |
2022-03-09 14:12:14 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 14:12:15 +0100 | <Topsi> | More specific to my problem I have found an issue where they talk about adding a setup-depends field with Cabal-syntax >= 3.7 https://github.com/haskell/cabal/issues/7974 |
2022-03-09 14:12:21 +0100 | <Topsi> | Unfortunately this does not work. https://paste.tomsmeding.com/8pOtxs3L |
2022-03-09 14:12:23 +0100 | <Topsi> | What is StackSetupShim/how can I supply it the Cabal-syntax package? |
2022-03-09 14:13:23 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:14:28 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:f90c:4552:5c2e:aa7d) |
2022-03-09 14:16:11 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 14:16:36 +0100 | cosimone | (~user@93-47-229-38.ip115.fastwebnet.it) |
2022-03-09 14:17:33 +0100 | worldhelloworld | (~c1utt4r@vmi275462.contaboserver.net) (Remote host closed the connection) |
2022-03-09 14:17:37 +0100 | re101-fousek-71 | (~re101-fou@196.43.170.89) (Quit: Client closed) |
2022-03-09 14:18:29 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:18:57 +0100 | <merijn> | Topsi: Cabal-syntax 3.7 doesn't exist yet |
2022-03-09 14:19:10 +0100 | <merijn> | or rather, it's the current HEAD branch of Cabal/cabal-install |
2022-03-09 14:19:34 +0100 | acidjnk | (~acidjnk@p200300d0c7049f95a8560519e34e318b.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-03-09 14:20:16 +0100 | <merijn> | Topsi: So that example cabal file has a bunch of dependencies restricting to unreleased versions of packages |
2022-03-09 14:20:37 +0100 | Cale | (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Ping timeout: 250 seconds) |
2022-03-09 14:20:40 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) (Read error: Connection reset by peer) |
2022-03-09 14:20:51 +0100 | c1utt4r | (~c1utt4r@vmi275462.contaboserver.net) |
2022-03-09 14:20:54 +0100 | <Topsi> | yes. but I supply the current HEAD branch of Cabal if you look at my extra-deps https://paste.tomsmeding.com/8pOtxs3L |
2022-03-09 14:21:38 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) |
2022-03-09 14:23:44 +0100 | <merijn> | Topsi: It declares cabal-version 1.12, but also uses custom-setup which didn't exist until 1.24 |
2022-03-09 14:24:43 +0100 | <Topsi> | what declares cabal-version 1.12? |
2022-03-09 14:25:08 +0100 | <Topsi> | ahh, at the very top |
2022-03-09 14:25:49 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 240 seconds) |
2022-03-09 14:26:02 +0100 | <merijn> | In general mixing stack with GHC head seems like a recipe for pain, though |
2022-03-09 14:26:47 +0100 | <Topsi> | it's the same error with cabal-version 1.24 |
2022-03-09 14:27:08 +0100 | <merijn> | Since stack is under maintained and lagging Cabal by quite a bit |
2022-03-09 14:27:37 +0100 | <merijn> | The most recent stack release demands Cabal 3.2, so it doesn't support 3.4 or 3.6 and I certainly wouldn't hold my breath for support for 3.7/3.8 |
2022-03-09 14:27:50 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 14:27:50 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 14:33:11 +0100 | Unicorn_Princess | (~Unicorn_P@46-54-248-191.static.kate-wing.si) |
2022-03-09 14:38:08 +0100 | krappix | (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) |
2022-03-09 14:39:01 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 14:41:34 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:43:11 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 14:45:29 +0100 | <maerwald> | you'll likely run out of air |
2022-03-09 14:46:17 +0100 | benin | (~benin@183.82.26.94) |
2022-03-09 14:47:35 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 14:51:43 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:53:56 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 14:56:39 +0100 | jespada | (~jespada@148.252.132.116) |
2022-03-09 14:56:41 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 14:58:10 +0100 | Unicorn_Princess | (~Unicorn_P@46-54-248-191.static.kate-wing.si) (Remote host closed the connection) |
2022-03-09 15:01:15 +0100 | arjun | (~arjun@user/arjun) |
2022-03-09 15:01:53 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 15:02:36 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:f90c:4552:5c2e:aa7d) (Read error: Connection reset by peer) |
2022-03-09 15:04:16 +0100 | ishutin | (~ishutin@87-97-12-221.pool.digikabel.hu) (Read error: Connection reset by peer) |
2022-03-09 15:04:21 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 15:04:58 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 15:06:38 +0100 | <exarkun> | is it possible to implement unsafePerformIO in Haskell? Or must it be implemented by the runtime at a lower level? |
2022-03-09 15:06:56 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 15:07:15 +0100 | ishutin | (~ishutin@92-249-150-241.static.digikabel.hu) |
2022-03-09 15:07:25 +0100 | <merijn> | exarkun: Define "implement in" and "haskell" |
2022-03-09 15:07:26 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 15:07:36 +0100 | <geekosaur> | it *is* implemented in Haskell, although it requires MagicHash extension |
2022-03-09 15:07:51 +0100 | <Lycurgus> | like writing a compiler in the lang compiled |
2022-03-09 15:07:52 +0100 | <exarkun> | I tried to follow links from hoogle to the implementation and got a dead end. Where is the implementation? |
2022-03-09 15:08:55 +0100 | <Lycurgus> | ur meaning ghc when you say Haskell |
2022-03-09 15:09:11 +0100 | <exarkun> | merijn: That sounds hard :/ I'm probably less interested in exactly the question I asked and more interested in learning more about how IO works, I guess. |
2022-03-09 15:09:14 +0100 | <geekosaur> | https://downloads.haskell.org/ghc/8.10.7/docs/html/libraries/base-4.14.3.0/src/GHC-IO-Unsafe.html#… |
2022-03-09 15:09:33 +0100 | <merijn> | exarkun: That's mostly an implementation detail of GHC. There's several papers on it |
2022-03-09 15:09:36 +0100 | <geekosaur> | and it does indeed provide a clue as to how IO works in ghc |
2022-03-09 15:09:41 +0100 | <merijn> | exarkun: Relevant are the ghc-prim package |
2022-03-09 15:09:44 +0100 | <merijn> | @hackage ghc-prim |
2022-03-09 15:09:44 +0100 | <lambdabot> | https://hackage.haskell.org/package/ghc-prim |
2022-03-09 15:09:55 +0100 | <merijn> | exarkun: And the "Lazy Functional State Threads" paper |
2022-03-09 15:09:59 +0100 | Lycurgus | (~juan@98.4.112.204) (Quit: Exeunt) |
2022-03-09 15:10:06 +0100 | <merijn> | exarkun: Which explains both the ST monad and IO |
2022-03-09 15:10:10 +0100 | <merijn> | exarkun: Or rather |
2022-03-09 15:10:21 +0100 | <merijn> | exarkun: It explains the implementation used by GHC |
2022-03-09 15:11:04 +0100 | <exarkun> | Cool. This looks like a bunch of good reading material. |
2022-03-09 15:11:24 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-03-09 15:11:37 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Ping timeout: 240 seconds) |
2022-03-09 15:13:09 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 15:13:29 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 15:15:01 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 15:17:59 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 15:19:46 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 15:21:08 +0100 | elkcl | (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 256 seconds) |
2022-03-09 15:22:25 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-03-09 15:23:48 +0100 | <merijn> | exarkun: Specifically, the paper I mentioned is about "how do we enforce an ordering of operations in a lazy setting?" and that is, of course, precisely what IO does (enforce ordering/sequencing of side-effects) |
2022-03-09 15:24:28 +0100 | <dminuoso> | 15:07:36 geekosaur | it *is* implemented in Haskell, although it requires MagicHash extension |
2022-03-09 15:24:37 +0100 | <dminuoso> | Mmm, it is *not* implemented in Haskell |
2022-03-09 15:24:38 +0100 | zer0bitz | (~zer0bitz@dsl-hkibng32-54fbf8-224.dhcp.inet.fi) |
2022-03-09 15:24:40 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 15:25:03 +0100 | <dminuoso> | It is implemented by GHC Haskell - the relevant point is, you couldn't conjure this yourself. |
2022-03-09 15:25:14 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 15:25:15 +0100 | <merijn> | exarkun: Turns out IO and ST are both built on top of the same underlying abstractions |
2022-03-09 15:26:09 +0100 | o-90 | (~o-90@gateway/tor-sasl/o-90) |
2022-03-09 15:26:14 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
2022-03-09 15:26:17 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
2022-03-09 15:26:50 +0100 | <exarkun> | That's kinda neat. I'm not sure if I would have guessed it, probably not, but I can convince myself that I can sort of see why it would be. |
2022-03-09 15:26:50 +0100 | <dminuoso> | Unless you argue that you can implement it in terms of the GHC API, but Im not entirely sure whether that is saying much |
2022-03-09 15:28:23 +0100 | arjun | (~arjun@user/arjun) (Remote host closed the connection) |
2022-03-09 15:28:56 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 15:29:32 +0100 | akegalj | (~akegalj@78-3-81-31.adsl.net.t-com.hr) (Quit: leaving) |
2022-03-09 15:33:02 +0100 | elkcl | (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) |
2022-03-09 15:35:37 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 15:36:48 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 15:37:25 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 15:37:26 +0100 | Inst | (~Liam@2601:6c4:4080:3f80:7996:fa87:bd3d:81c8) |
2022-03-09 15:39:34 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-03-09 15:40:09 +0100 | o-90 | (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
2022-03-09 15:40:14 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 15:41:06 +0100 | infandum | (~user@205.189.58.89) |
2022-03-09 15:44:29 +0100 | ProfSimm | anomal |
2022-03-09 15:45:33 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
2022-03-09 15:45:48 +0100 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-03-09 15:46:09 +0100 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2022-03-09 15:46:38 +0100 | <infandum> | I am running into the following error: stats.csv: openBinaryFile: resource exhausted (Too many open files). I thought it would be pretty straightforward, as the file it tried to open was just being checked if it existed with Turtle's du (to check if existing and if not 0 bytes). evaluating with Control.Exception that did not work, so I replaced it with Turtle's testfile, that did not work either. Here is the only time it is used: skip |
2022-03-09 15:46:38 +0100 | <infandum> | <- (&&) <$> (pure $ skipFlag) <*> (TU.testfile "stats.csv"); when (not skip) $ process otherFile |
2022-03-09 15:47:02 +0100 | <infandum> | Sorry, broke a line apparently: skip <- (&&) <$> (pure $ skipFlag) <*> (TU.testfile "stats.csv"); when (not skip) $ process otherFile |
2022-03-09 15:49:29 +0100 | <infandum> | Many of these files are being checked, so I figured that they weren't being closed, but now it's just checking for existence, what would the problem be? |
2022-03-09 15:52:15 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-03-09 15:52:47 +0100 | boborygmy | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 15:52:47 +0100 | soxen | (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
2022-03-09 15:52:48 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-03-09 15:53:16 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-03-09 15:54:17 +0100 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds) |
2022-03-09 15:55:17 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-03-09 15:56:22 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-03-09 15:56:56 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 15:57:47 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2022-03-09 16:01:45 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-03-09 16:03:34 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 250 seconds) |
2022-03-09 16:03:37 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-03-09 16:04:02 +0100 | vglfr | (~vglfr@88.155.117.136) |
2022-03-09 16:04:10 +0100 | CiaoSen | (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-03-09 16:04:10 +0100 | jespada | (~jespada@148.252.132.116) (Read error: Connection reset by peer) |
2022-03-09 16:05:01 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:f90c:4552:5c2e:aa7d) |
2022-03-09 16:05:22 +0100 | krappix | (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Quit: Client closed) |
2022-03-09 16:05:32 +0100 | ccntrq | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) (Remote host closed the connection) |
2022-03-09 16:05:50 +0100 | ccntrq | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) |
2022-03-09 16:06:35 +0100 | benin | (~benin@183.82.26.94) (Quit: The Lounge - https://thelounge.chat) |
2022-03-09 16:06:38 +0100 | <infandum> | I wonder if it is coincidence: using inline-r, other files are being written. I wonder if the problem is actually there and it just happens to bug out during the haskell opening step. |
2022-03-09 16:06:42 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) |
2022-03-09 16:07:20 +0100 | <dpratt> | what's a good way to set up a new Haskell project? is "cabal init" still the best option? probably relevant that I'm not too interested in using stack, and I am doing this in a Nix environment |
2022-03-09 16:07:36 +0100 | son0p | (~ff@181.136.122.143) (Ping timeout: 256 seconds) |
2022-03-09 16:08:36 +0100 | yaroot | (~yaroot@2409:12:ac0:2300:680e:dbff:fe1e:4953) (Ping timeout: 240 seconds) |
2022-03-09 16:09:14 +0100 | yaroot | (~yaroot@2409:12:ac0:2300:680e:dbff:fe1e:4953) |
2022-03-09 16:10:17 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2022-03-09 16:10:28 +0100 | <merijn> | dpratt: cabal init should be fine, although I usually copy and edit a cabal file from a similar project |
2022-03-09 16:12:37 +0100 | <dpratt> | ok, thanks merijn |
2022-03-09 16:15:47 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-03-09 16:27:11 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 16:28:14 +0100 | shapr` | (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
2022-03-09 16:28:35 +0100 | kritzefitz | (~kritzefit@debian/kritzefitz) (Ping timeout: 256 seconds) |
2022-03-09 16:28:50 +0100 | kritzefitz | (~kritzefit@debian/kritzefitz) |
2022-03-09 16:29:37 +0100 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
2022-03-09 16:30:52 +0100 | dschrempf | (~dominik@178.251.70.207) (Ping timeout: 250 seconds) |
2022-03-09 16:31:22 +0100 | jespada | (~jespada@148.252.132.116) |
2022-03-09 16:31:24 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-03-09 16:31:25 +0100 | vysn | (~vysn@user/vysn) |
2022-03-09 16:32:29 +0100 | anomal | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2022-03-09 16:32:48 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 16:33:30 +0100 | kongsheng | (~kongsheng@71.28.228.142) (Quit: Client closed) |
2022-03-09 16:47:24 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2022-03-09 16:47:42 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 16:49:43 +0100 | <Benzi-Junior> | hey, doing a coding challenge, and I'm wondering if there is something I missed, I'm given "data Agent msg a" and asked to provide a "instance Functor (Agent msg)" and I'm struggling a bit with the lack of a constructor, or in fact any implementation of "Agent" |
2022-03-09 16:52:03 +0100 | jgeerds | (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 268 seconds) |
2022-03-09 16:52:07 +0100 | <Benzi-Junior> | should I just assume that they forgot to ask for an implementation or is there a reasonable way of working with the data without an associated constructor ? |
2022-03-09 16:52:29 +0100 | <merijn> | Benzi-Junior: As you describe it, it sounds impossible |
2022-03-09 16:52:53 +0100 | <geekosaur> | do they not even tell you shat this data should be doing? |
2022-03-09 16:53:01 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:94a8:4010:5291:ba96) (Quit: WeeChat 2.8) |
2022-03-09 16:53:11 +0100 | zer0bitz | (~zer0bitz@dsl-hkibng32-54fbf8-224.dhcp.inet.fi) (Ping timeout: 256 seconds) |
2022-03-09 16:53:11 +0100 | <[exa]> | types without constructors are possible but the task doesn't seem to be possible to do in a sane way |
2022-03-09 16:53:24 +0100 | <[exa]> | except ofcourse for BS like `fmap _ = undefined` |
2022-03-09 16:53:41 +0100 | <merijn> | I mean, I suppose if there is no constructor for Agent, then the implementation is trivial ;) |
2022-03-09 16:54:34 +0100 | <Benzi-Junior> | geekosaur, "Agent msg a" is an abstract process that can send and receive broadcast messages of type msg and will eventually return a result of type a |
2022-03-09 16:54:59 +0100 | <geekosaur> | oh brother |
2022-03-09 16:55:07 +0100 | <Benzi-Junior> | oh wait, the next line tells me to "Define the type such that Agent msg is a free monad" |
2022-03-09 16:55:16 +0100 | <geekosaur> | ah, there you gothen |
2022-03-09 16:55:21 +0100 | zer0bitz | (~zer0bitz@dsl-hkibng32-54fbf8-224.dhcp.inet.fi) |
2022-03-09 16:55:46 +0100 | <geekosaur> | once you do that, the Functor instance should be pretty obvious |
2022-03-09 16:55:58 +0100 | <geekosaur> | free monad is, at least |
2022-03-09 16:56:01 +0100 | <Benzi-Junior> | I just missed it because it's labeled "TODO" which it seemed was verie astutely done throughout the document |
2022-03-09 16:56:10 +0100 | <geekosaur> | *assuming you know what a free monad is, at least |
2022-03-09 16:56:23 +0100 | <Benzi-Junior> | ye I tried starting this a while back and it seemed... to simple |
2022-03-09 16:56:27 +0100 | <Benzi-Junior> | until it was impossible |
2022-03-09 16:57:38 +0100 | <Benzi-Junior> | ok very important question, which is a better constructor name for "data Agent msg a", Bond or Smith ? |
2022-03-09 16:57:39 +0100 | jespada | (~jespada@148.252.132.116) (Read error: Connection reset by peer) |
2022-03-09 16:59:38 +0100 | <kuribas> | Archer? |
2022-03-09 17:00:07 +0100 | <Franciman> | ^^ |
2022-03-09 17:01:18 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 17:02:48 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-03-09 17:02:52 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2022-03-09 17:03:53 +0100 | jespada_ | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-03-09 17:04:14 +0100 | alp | (~alp@user/alp) (Ping timeout: 250 seconds) |
2022-03-09 17:04:54 +0100 | canta | (~canta@user/canta) (Quit: WeeChat 2.8) |
2022-03-09 17:05:06 +0100 | canta | (~canta@user/canta) |
2022-03-09 17:07:00 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Ping timeout: 240 seconds) |
2022-03-09 17:08:54 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 17:11:00 +0100 | shapr` | shapr |
2022-03-09 17:12:19 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-03-09 17:13:00 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Ping timeout: 240 seconds) |
2022-03-09 17:14:42 +0100 | <SrPx> | what is currently the fastest int map implementation for insertion, deletion and lookup? |
2022-03-09 17:14:49 +0100 | <SrPx> | specially lookup |
2022-03-09 17:15:14 +0100 | <geekosaur> | IntMap is usually fastest |
2022-03-09 17:15:33 +0100 | <Benzi-Junior> | ok, so for a "instance Applicative (Agent msg)" I'm struggling, how do I implement pure, I understand how I could do it if there was an "Default msg" assertion |
2022-03-09 17:15:49 +0100 | ishutin | (~ishutin@92-249-150-241.static.digikabel.hu) (Ping timeout: 240 seconds) |
2022-03-09 17:16:11 +0100 | <geekosaur> | Benzi-Junior, did you understand "free monad"? |
2022-03-09 17:16:20 +0100 | <SrPx> | geekosaur: you sure? i think i've read a paper a few years ago about an alternative that is faster for lookups, but slower for merging |
2022-03-09 17:16:25 +0100 | <SrPx> | can't remember what it was though |
2022-03-09 17:16:56 +0100 | <geekosaur> | SrPx, I was considering based on what we actually have, not on papers that might lack usable implementations |
2022-03-09 17:17:07 +0100 | <SrPx> | I see |
2022-03-09 17:17:14 +0100 | neverfindme | (~hayden@158.123.160.43) |
2022-03-09 17:17:23 +0100 | jespada_ | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Ping timeout: 272 seconds) |
2022-03-09 17:17:52 +0100 | ishutin | (~ishutin@178-164-208-216.pool.digikabel.hu) |
2022-03-09 17:18:01 +0100 | <geekosaur> | Benzi-Junior, a "free x" means you have a constructor corresponding to each operation on "x". so for a free monad you have a constructor corresponding to pure/return and another corresponding to bind/>>= |
2022-03-09 17:18:03 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 17:18:19 +0100 | <geekosaur> | (this is an oversimplification but close enough for this, I think) |
2022-03-09 17:19:01 +0100 | <geekosaur> | this whole thing is a bit problematic because one would assume if someone knew about free monads, they'd already know about functors… |
2022-03-09 17:20:49 +0100 | nuh^ | (~nuh@50.232.121.75) |
2022-03-09 17:21:11 +0100 | <Benzi-Junior> | geekosaur, I know what free constructions are in category theory, but less so in practice |
2022-03-09 17:21:32 +0100 | ccntrq | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) (Remote host closed the connection) |
2022-03-09 17:21:38 +0100 | vysn | (~vysn@user/vysn) (Ping timeout: 260 seconds) |
2022-03-09 17:21:50 +0100 | ccntrq | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) |
2022-03-09 17:22:53 +0100 | <Benzi-Junior> | geekosaur, if I understand you correctly, "data Agent msg a" should have at least 2 constructors, one that takes a "msg" and another to take an "a" |
2022-03-09 17:23:35 +0100 | <geekosaur> | not quite, as I understand it from the problem statement. (Agent msg) is the free monad, not Agent itself |
2022-03-09 17:24:09 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-03-09 17:24:12 +0100 | In0perable | (~PLAYER_1@fancydata.science) (Quit: All your buffer are belong to us!) |
2022-03-09 17:24:17 +0100 | <geekosaur> | sadly this means it's not really defined enough to dothis right. or put otherwise, the TODO you mentioned was a warning that the problem set isn't fully written yet |
2022-03-09 17:24:42 +0100 | <geekosaur> | which makes it really hard to do anything useful |
2022-03-09 17:25:53 +0100 | <Benzi-Junior> | huh |
2022-03-09 17:26:20 +0100 | <geekosaur> | they *really* needed to show you the full definition of Agent |
2022-03-09 17:27:45 +0100 | HotblackDesiato | (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Read error: Connection reset by peer) |
2022-03-09 17:27:45 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2022-03-09 17:27:45 +0100 | hololeap | (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
2022-03-09 17:28:08 +0100 | HotblackDesiato | (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
2022-03-09 17:28:53 +0100 | <geekosaur> | but as I said, the TODO indicates that whoever wrote the problem set hadn't gotten as far as writing that yet; someone learning how to write Functor instances should not be expected to know what a free monad is yet |
2022-03-09 17:29:05 +0100 | hololeap | (~hololeap@user/hololeap) |
2022-03-09 17:29:11 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-03-09 17:29:18 +0100 | <geekosaur> | much less how to write one when the monad instance is on (Agent msg) instead of just Agent |
2022-03-09 17:29:44 +0100 | <geekosaur> | (which you can tell because they tell you the Functor instance is on (Agent msg)) |
2022-03-09 17:30:17 +0100 | <geekosaur> | really tempted to say go find a different problem set to work on |
2022-03-09 17:32:01 +0100 | <Benzi-Junior> | see that really is what stumped me, it seemed to be trivial until it feels like an assumption of "Default msg" is needed |
2022-03-09 17:33:24 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2022-03-09 17:33:57 +0100 | <geekosaur> | it's not an assumption, it falls out from "free monad" |
2022-03-09 17:34:04 +0100 | ccntrq | (~Thunderbi@2a01:c23:9136:4a00:eba3:c941:ef08:4dc0) (Remote host closed the connection) |
2022-03-09 17:34:19 +0100 | <geekosaur> | like I said though, the problem set is incomplete and therefore doen't give you that |
2022-03-09 17:37:08 +0100 | Codaraxis | (~Codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
2022-03-09 17:38:50 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 252 seconds) |
2022-03-09 17:43:16 +0100 | vicfred | (~vicfred@user/vicfred) |
2022-03-09 17:45:27 +0100 | Inoperable | (~PLAYER_1@fancydata.science) |
2022-03-09 17:45:52 +0100 | hgolden | (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection) |
2022-03-09 17:46:09 +0100 | <Benzi-Junior> | I don't think the problem set is incomplete, it is labeled with the TODO's to indicate what the steps of the challenge are |
2022-03-09 17:46:26 +0100 | mbuf | (~Shakthi@122.174.187.22) (Quit: Leaving) |
2022-03-09 17:47:42 +0100 | hgolden | (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) |
2022-03-09 17:47:49 +0100 | Midjak | (~Midjak@82.66.147.146) |
2022-03-09 17:48:20 +0100 | <monochrom> | No one has actually seen the original problem statement verbatim unabridged, right? |
2022-03-09 17:51:33 +0100 | c1utt4r | (~c1utt4r@vmi275462.contaboserver.net) (Remote host closed the connection) |
2022-03-09 17:51:44 +0100 | <Franciman> | i miss do notation in my sml journey :( |
2022-03-09 17:51:56 +0100 | <Franciman> | i'm writing my parser |
2022-03-09 17:52:04 +0100 | <Franciman> | and have to pass some state on |
2022-03-09 17:52:23 +0100 | <monochrom> | Use a ref >:) |
2022-03-09 17:52:31 +0100 | vicfred | (~vicfred@user/vicfred) (Quit: Leaving) |
2022-03-09 17:52:51 +0100 | c1utt4r | (~c1utt4r@vmi275462.contaboserver.net) |
2022-03-09 17:53:32 +0100 | neverfindme | (~hayden@158.123.160.43) (Ping timeout: 240 seconds) |
2022-03-09 17:53:39 +0100 | <Franciman> | yup |
2022-03-09 17:55:18 +0100 | <monochrom> | Before do-notation, people wrote each line as "foo a b >>= \x ->", and aligned the >>='s. |
2022-03-09 17:55:35 +0100 | <Franciman> | oh, there was an haskell without do notation? |
2022-03-09 17:55:50 +0100 | <monochrom> | I think yes. |
2022-03-09 17:56:00 +0100 | <Franciman> | well i mean, without do notation but monads were being used* |
2022-03-09 17:56:16 +0100 | ub | (~Thunderbi@p200300ecdf3be98f4574cf7817efb211.dip0.t-ipconnect.de) |
2022-03-09 17:56:18 +0100 | <monochrom> | I think yes. |
2022-03-09 17:56:48 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-03-09 17:56:53 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 17:58:06 +0100 | <Franciman> | :O |
2022-03-09 17:58:29 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2022-03-09 17:58:47 +0100 | cosimone | (~user@93-47-229-38.ip115.fastwebnet.it) (Remote host closed the connection) |
2022-03-09 18:00:17 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:1c1a:3fa2:4926:7c5a) (Ping timeout: 252 seconds) |
2022-03-09 18:02:42 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2022-03-09 18:02:58 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) |
2022-03-09 18:04:03 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection) |
2022-03-09 18:07:21 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 18:13:10 +0100 | Akiva | (~Akiva@user/Akiva) |
2022-03-09 18:13:16 +0100 | cosimone | (~user@93-47-229-38.ip115.fastwebnet.it) |
2022-03-09 18:13:22 +0100 | <Benzi-Junior> | geekosaur, when you say the full definition of Agent, do you mean the operations that it needs to support ? |
2022-03-09 18:13:53 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2022-03-09 18:13:58 +0100 | zer0bitz | (~zer0bitz@dsl-hkibng32-54fbf8-224.dhcp.inet.fi) (Ping timeout: 256 seconds) |
2022-03-09 18:14:02 +0100 | <geekosaur> | as you discovered and merijn also noted, you can't write a Functor instance at all without the full definition of Agent |
2022-03-09 18:14:28 +0100 | mvk | (~mvk@2607:fea8:5cc3:7e00::45ee) |
2022-03-09 18:14:37 +0100 | <geekosaur> | and just knowing that (Agent msg) is a Functor, or even that it's a free Monad, isn't enough to tell you what to do with msg |
2022-03-09 18:15:46 +0100 | <Benzi-Junior> | ok, thanks, |
2022-03-09 18:16:09 +0100 | tubogram4 | (~tubogram@user/tubogram) (Quit: See ya later!) |
2022-03-09 18:16:20 +0100 | <Benzi-Junior> | makes me feel better for getting stmped by it |
2022-03-09 18:17:54 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
2022-03-09 18:19:57 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-03-09 18:23:11 +0100 | tubogram4 | (~tubogram@user/tubogram) |
2022-03-09 18:23:46 +0100 | vysn | (~vysn@user/vysn) |
2022-03-09 18:25:09 +0100 | zer0bitz | (~zer0bitz@dsl-hkibng32-54fbf8-224.dhcp.inet.fi) |
2022-03-09 18:26:34 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 18:27:15 +0100 | Codaraxis | (~Codaraxis@user/codaraxis) |
2022-03-09 18:27:34 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 256 seconds) |
2022-03-09 18:27:39 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) |
2022-03-09 18:27:49 +0100 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2022-03-09 18:28:41 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 18:32:06 +0100 | Codaraxis | (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
2022-03-09 18:32:52 +0100 | k8yun | (~k8yun@user/k8yun) |
2022-03-09 18:33:22 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 18:34:49 +0100 | michalz | (~michalz@185.246.204.77) (Read error: No route to host) |
2022-03-09 18:35:22 +0100 | michalz | (~michalz@185.246.204.72) |
2022-03-09 18:35:24 +0100 | Akiva | (~Akiva@user/Akiva) (Ping timeout: 240 seconds) |
2022-03-09 18:36:50 +0100 | <dpratt> | the readme for hpack says that cabal2nix supports package.yaml files; assuming I have a setup involving cabal2nix, does this imply that I would not need to separately run hpack to create/update the project cabal file? |
2022-03-09 18:37:27 +0100 | romesrf | (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 256 seconds) |
2022-03-09 18:37:57 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2022-03-09 18:38:50 +0100 | kadobanana | (~mud@user/kadoban) (Remote host closed the connection) |
2022-03-09 18:39:08 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection) |
2022-03-09 18:39:15 +0100 | kadobanana | (~mud@user/kadoban) |
2022-03-09 18:42:42 +0100 | Guest|24 | (~Guest|24@cpc84763-aztw28-2-0-cust94.18-1.cable.virginm.net) |
2022-03-09 18:43:01 +0100 | jlamothe | (~jlamothe@198.251.61.229) (Quit: leaving) |
2022-03-09 18:43:22 +0100 | Guest|24 | (~Guest|24@cpc84763-aztw28-2-0-cust94.18-1.cable.virginm.net) (Client Quit) |
2022-03-09 18:46:14 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Quit: ec) |
2022-03-09 18:47:59 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-03-09 18:48:07 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 18:48:26 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-03-09 18:48:26 +0100 | econo | (uid147250@user/econo) |
2022-03-09 18:50:50 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 18:51:45 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Client Quit) |
2022-03-09 18:53:28 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 18:55:31 +0100 | jlamothe | (~jlamothe@198.251.61.229) |
2022-03-09 18:55:40 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 18:56:53 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) |
2022-03-09 18:56:54 +0100 | Unicorn_Princess | (~Unicorn_P@46-54-248-191.static.kate-wing.si) |
2022-03-09 18:57:57 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 19:00:19 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2022-03-09 19:00:48 +0100 | awpr | (uid446117@id-446117.lymington.irccloud.com) |
2022-03-09 19:01:47 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-03-09 19:02:11 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-03-09 19:03:16 +0100 | ishutin | (~ishutin@178-164-208-216.pool.digikabel.hu) (Ping timeout: 256 seconds) |
2022-03-09 19:03:29 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 19:05:09 +0100 | ishutin | (~ishutin@178-164-235-213.pool.digikabel.hu) |
2022-03-09 19:06:32 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 240 seconds) |
2022-03-09 19:06:57 +0100 | zebrag | (~chris@user/zebrag) |
2022-03-09 19:10:18 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-03-09 19:11:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 19:12:09 +0100 | simendsjo | (~user@84.211.91.241) |
2022-03-09 19:13:18 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 19:17:57 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 19:20:34 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
2022-03-09 19:20:49 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) |
2022-03-09 19:23:11 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 19:23:15 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 19:23:57 +0100 | k8yun | (~k8yun@user/k8yun) (Read error: Connection reset by peer) |
2022-03-09 19:26:11 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 19:27:24 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 240 seconds) |
2022-03-09 19:28:07 +0100 | k8yun | (~k8yun@user/k8yun) |
2022-03-09 19:28:55 +0100 | coot | (~coot@213.134.190.95) |
2022-03-09 19:30:34 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 19:32:38 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Remote host closed the connection) |
2022-03-09 19:33:19 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2022-03-09 19:33:45 +0100 | k8yun | (~k8yun@user/k8yun) (Quit: Leaving) |
2022-03-09 19:34:37 +0100 | pretty_d1 | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-03-09 19:34:38 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 260 seconds) |
2022-03-09 19:34:45 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-03-09 19:34:57 +0100 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
2022-03-09 19:36:04 +0100 | CiaoSen | (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-03-09 19:36:56 +0100 | MajorBiscuit | (~MajorBisc@c-001-015-055.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4) |
2022-03-09 19:37:08 +0100 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-03-09 19:37:17 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-03-09 19:37:30 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 19:40:38 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 19:42:36 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 19:43:53 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 19:45:35 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds) |
2022-03-09 19:47:17 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
2022-03-09 19:48:53 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 19:48:53 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2022-03-09 19:53:40 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 19:56:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 19:58:01 +0100 | wrengr | (~wrengr@99.34.197.35.bc.googleusercontent.com) (Remote host closed the connection) |
2022-03-09 19:58:24 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:00:36 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) (Ping timeout: 240 seconds) |
2022-03-09 20:01:14 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:02:25 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 20:03:01 +0100 | vglfr | (~vglfr@88.155.117.136) (Ping timeout: 256 seconds) |
2022-03-09 20:04:29 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 20:05:03 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-03-09 20:05:37 +0100 | pretty_d1 | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds) |
2022-03-09 20:05:54 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:06:36 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2022-03-09 20:07:50 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Read error: Connection reset by peer) |
2022-03-09 20:08:22 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-03-09 20:13:43 +0100 | _ht | (~quassel@231-169-21-31.ftth.glasoperator.nl) |
2022-03-09 20:15:05 +0100 | wrengr | (~wrengr@249.189.233.35.bc.googleusercontent.com) |
2022-03-09 20:15:29 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:16:37 +0100 | nexeq | (nexeq@user/nexeq) |
2022-03-09 20:20:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:22:20 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:22:41 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:22:52 +0100 | ph88^ | (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) |
2022-03-09 20:24:45 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:24:58 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:26:49 +0100 | deadmarshal_ | (~deadmarsh@95.38.230.176) (Ping timeout: 256 seconds) |
2022-03-09 20:27:16 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:f90c:4552:5c2e:aa7d) (Ping timeout: 268 seconds) |
2022-03-09 20:28:25 +0100 | neurocyte0917090 | (~neurocyte@IP-094046072103.dynamic.medianet-world.de) |
2022-03-09 20:28:25 +0100 | neurocyte0917090 | (~neurocyte@IP-094046072103.dynamic.medianet-world.de) (Changing host) |
2022-03-09 20:28:25 +0100 | neurocyte0917090 | (~neurocyte@user/neurocyte) |
2022-03-09 20:28:26 +0100 | bahamas | (~lucian@84.232.140.52) |
2022-03-09 20:29:08 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-03-09 20:29:17 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:31:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 20:32:55 +0100 | Cale | (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) |
2022-03-09 20:35:08 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 20:36:18 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 20:37:08 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 20:43:06 +0100 | gdown | (~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection) |
2022-03-09 20:47:17 +0100 | ishutin | (~ishutin@178-164-235-213.pool.digikabel.hu) (Ping timeout: 240 seconds) |
2022-03-09 20:49:20 +0100 | ishutin | (~ishutin@fibhost-67-47-53.fibernet.hu) |
2022-03-09 20:50:18 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 20:53:31 +0100 | CiaoSen | (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen) |
2022-03-09 20:55:58 +0100 | dschrempf | (~dominik@mobiledyn-62-240-134-189.mrsn.at) |
2022-03-09 20:56:13 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2022-03-09 20:57:02 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
2022-03-09 20:57:31 +0100 | kjak | (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
2022-03-09 20:57:31 +0100 | Lord_of_Life_ | Lord_of_Life |
2022-03-09 21:04:44 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 250 seconds) |
2022-03-09 21:06:39 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2022-03-09 21:10:16 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
2022-03-09 21:12:39 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2022-03-09 21:12:57 +0100 | kuribas | (~user@ptr-25vy0ia81ze2oltltpx.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
2022-03-09 21:14:10 +0100 | InstX1 | (~Liam@2601:6c4:4080:3f80:2cb5:4e42:6ff9:8715) |
2022-03-09 21:14:12 +0100 | Inst | (~Liam@2601:6c4:4080:3f80:7996:fa87:bd3d:81c8) (Ping timeout: 240 seconds) |
2022-03-09 21:17:01 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) |
2022-03-09 21:18:21 +0100 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
2022-03-09 21:19:18 +0100 | bahamas | (~lucian@84.232.140.52) (Ping timeout: 272 seconds) |
2022-03-09 21:19:31 +0100 | dschrempf | (~dominik@mobiledyn-62-240-134-189.mrsn.at) (Ping timeout: 256 seconds) |
2022-03-09 21:21:32 +0100 | yauhsien | (~yauhsien@61-231-43-120.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-03-09 21:22:36 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
2022-03-09 21:23:23 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4) |
2022-03-09 21:23:32 +0100 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Remote host closed the connection) |
2022-03-09 21:25:02 +0100 | zincy_ | (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
2022-03-09 21:28:13 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 21:29:34 +0100 | liz_ | (~liz@2a00:23c5:9680:501:b62e:99ff:fee4:47fa) |
2022-03-09 21:31:37 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 21:32:31 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 21:33:03 +0100 | Batzy_ | Batzy |
2022-03-09 21:35:37 +0100 | infandum | (~user@205.189.58.89) (Ping timeout: 240 seconds) |
2022-03-09 21:37:09 +0100 | infandum | (~user@205.189.58.89) |
2022-03-09 21:38:20 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2022-03-09 21:38:36 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 21:41:09 +0100 | deadmarshal_ | (~deadmarsh@95.38.230.176) |
2022-03-09 21:41:53 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Quit: ec) |
2022-03-09 21:43:04 +0100 | InstX1_ | (~Liam@2601:6c4:4080:3f80:a199:abec:3f6a:f180) |
2022-03-09 21:43:56 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) |
2022-03-09 21:45:00 +0100 | InstX1 | (~Liam@2601:6c4:4080:3f80:2cb5:4e42:6ff9:8715) (Ping timeout: 240 seconds) |
2022-03-09 21:45:54 +0100 | deadmarshal_ | (~deadmarsh@95.38.230.176) (Ping timeout: 256 seconds) |
2022-03-09 21:47:35 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 21:49:55 +0100 | <jackdk> | you could probably get away without but FPCo recommends checking the generated file into VC regardless: https://www.fpcomplete.com/blog/storing-generated-cabal-files/ |
2022-03-09 21:51:01 +0100 | <jackdk> | Personally, I would avoid hpack since the cabal file format got a lot of new features since hpack first came out (e.g., common stanzas, and the cabal-fmt tool can maintain lists of modules), and yaml is not a good format |
2022-03-09 21:54:28 +0100 | <shapr> | at SimSpace we switched to cabal files first, even though we use stack, but I don't know exactly why! |
2022-03-09 21:57:13 +0100 | unyu | (~pyon@user/pyon) (Quit: brb) |
2022-03-09 22:00:07 +0100 | acidjnk | (~acidjnk@p200300d0c7049f95a8560519e34e318b.dip0.t-ipconnect.de) |
2022-03-09 22:02:32 +0100 | InstX1_ | (~Liam@2601:6c4:4080:3f80:a199:abec:3f6a:f180) (Ping timeout: 240 seconds) |
2022-03-09 22:03:22 +0100 | _ht | (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
2022-03-09 22:03:24 +0100 | simendsjo | (~user@84.211.91.241) (Ping timeout: 240 seconds) |
2022-03-09 22:05:54 +0100 | kaph | (~kaph@net-109-116-124-149.cust.vodafonedsl.it) |
2022-03-09 22:06:05 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 22:11:34 +0100 | jinsun | (~jinsun@user/jinsun) () |
2022-03-09 22:15:00 +0100 | jinsun | (~jinsun@user/jinsun) |
2022-03-09 22:15:29 +0100 | ArshiaAghaei[m] | (~arshiaagh@2001:470:69fc:105::1:c382) |
2022-03-09 22:16:44 +0100 | Inst | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
2022-03-09 22:16:51 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-03-09 22:18:27 +0100 | merijn | (~merijn@c-001-001-005.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-03-09 22:18:38 +0100 | unyu | (~pyon@user/pyon) |
2022-03-09 22:19:04 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 22:21:18 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Ping timeout: 256 seconds) |
2022-03-09 22:22:31 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2022-03-09 22:22:46 +0100 | jushur | (~human@user/jushur) |
2022-03-09 22:25:15 +0100 | nuh^ | (~nuh@50.232.121.75) (Remote host closed the connection) |
2022-03-09 22:25:24 +0100 | Pickchea | (~private@user/pickchea) |
2022-03-09 22:25:58 +0100 | <dpratt> | wasn't aware of cabal-fmt, thanks jackdk |
2022-03-09 22:26:57 +0100 | <jackdk> | dpratt: There are certain magic comments you can add to your cabal file to tell cabal-fmt to build module lists, like `-- cabal-fmt: expand src/` |
2022-03-09 22:27:09 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-03-09 22:27:15 +0100 | <dpratt> | I guess I'm just confused as to why cabal2nix directly supports dealing with package.yaml files if it is necessary to keep a .cabal file around and in sync anyway |
2022-03-09 22:27:57 +0100 | <shapr> | me too |
2022-03-09 22:28:30 +0100 | <geekosaur> | it's not absolutely necessary unless you want to use one of the many things cabal files support but package.yamldoesn't |
2022-03-09 22:28:50 +0100 | <jackdk> | I think because some people don't [keep the generated files in vc]. Perhaps the recommendation changed at some point. This is another reason why I avoid hpack - more moving parts for not that much benefit |
2022-03-09 22:28:59 +0100 | xkuru | (~xkuru@user/xkuru) (Ping timeout: 272 seconds) |
2022-03-09 22:31:04 +0100 | <dpratt> | jackdk: (re: magic comments) that's pretty cool |
2022-03-09 22:31:37 +0100 | ub | (~Thunderbi@p200300ecdf3be98f4574cf7817efb211.dip0.t-ipconnect.de) (Quit: ub) |
2022-03-09 22:33:32 +0100 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
2022-03-09 22:35:32 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-03-09 22:36:30 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 22:38:31 +0100 | Topsi | (~Tobias@dyndsl-095-033-023-104.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
2022-03-09 22:41:04 +0100 | son0p | (~ff@181.136.122.143) |
2022-03-09 22:41:08 +0100 | burnsidesLlama | (~burnsides@rrcs-76-81-82-250.west.biz.rr.com) |
2022-03-09 22:41:56 +0100 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds) |
2022-03-09 22:42:03 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 22:42:56 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) |
2022-03-09 22:44:05 +0100 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) |
2022-03-09 22:47:05 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com) |
2022-03-09 22:47:51 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) |
2022-03-09 22:48:08 +0100 | <janus> | is there a way to avoid listing all the modules in the cabal file? i think that is the major advantage of package.yaml |
2022-03-09 22:48:29 +0100 | <janus> | for executables, i don't understand why it is important to list the modules |
2022-03-09 22:49:15 +0100 | <sclv> | discussion on it here https://github.com/haskell/cabal/issues/5343 |
2022-03-09 22:52:00 +0100 | dsrt^ | (~dsrt@50.232.121.75) |
2022-03-09 22:52:12 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
2022-03-09 22:52:25 +0100 | <dpratt> | are computations involving the CReal data type (from the numbers package) precise? mostly for fun, I'm trying to calculate pi according to a prescribed method involving a summation of a series of fractions -- my value of pi diverges from the "official" value after ~40 digits |
2022-03-09 22:52:42 +0100 | <sclv> | the entire point of creal is that it is arbitrary precise |
2022-03-09 22:52:51 +0100 | romesrf | (~romes@198.177.63.94.rev.vodafone.pt) |
2022-03-09 22:52:55 +0100 | <sclv> | i'm not sure why it would diverge, hrm |
2022-03-09 22:53:22 +0100 | <dpratt> | sclv: it likely just means my code is bad :) |
2022-03-09 22:53:37 +0100 | <dpratt> | just surprising to me I get as far as 40 correct digits |
2022-03-09 22:54:06 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-03-09 22:54:40 +0100 | <liz_> | could the divergence be due to the slow convergence of the sum? or is it actually deviating from the value? |
2022-03-09 22:54:40 +0100 | <dpratt> | at some point I may be willing to suffer the embarrassment of sharing my code, but I'm trying to avoid that fate for now |
2022-03-09 22:55:09 +0100 | <dpratt> | liz_: if I understand you correctly, it could well be that |
2022-03-09 22:55:23 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:d22:fd9a:65d6:50a8) (Remote host closed the connection) |
2022-03-09 22:55:34 +0100 | <liz_> | what formula are you using? |
2022-03-09 22:55:53 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-03-09 22:56:47 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 22:57:37 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2022-03-09 22:59:34 +0100 | ishutin | (~ishutin@fibhost-67-47-53.fibernet.hu) (Ping timeout: 256 seconds) |
2022-03-09 23:00:25 +0100 | infandum` | (~user@bras-base-toroon0637w-grc-17-76-64-95-29.dsl.bell.ca) |
2022-03-09 23:00:58 +0100 | ishutin | (~ishutin@79-120-162-190.pool.digikabel.hu) |
2022-03-09 23:01:05 +0100 | <dpratt> | dumb question first: I assume there is a Haskell function to count combinations? |
2022-03-09 23:01:41 +0100 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-03-09 23:02:32 +0100 | <sclv> | dpratt: not in base. there's combinatorics libs, but also the formula is simple enough that people tend to just code something up like that by hand |
2022-03-09 23:02:32 +0100 | infandum | (~user@205.189.58.89) (Ping timeout: 272 seconds) |
2022-03-09 23:02:41 +0100 | <monochrom> | Not in the standard library. Though, the standard library has functions for enumerating all sublists and permutations. |
2022-03-09 23:02:53 +0100 | <monochrom> | I don't know what's on Hackage for this. |
2022-03-09 23:03:14 +0100 | <sclv> | https://hackage.haskell.org/package/exact-combinatorics-0.2.0.11/docs/Math-Combinatorics-Exact-Bin… |
2022-03-09 23:03:21 +0100 | <monochrom> | Ah that's nice. |
2022-03-09 23:04:18 +0100 | hololeap | (~hololeap@user/hololeap) (Excess Flood) |
2022-03-09 23:05:00 +0100 | <dpratt> | shoot, have to step away for a bit :9 |
2022-03-09 23:05:04 +0100 | <dpratt> | :( |
2022-03-09 23:05:38 +0100 | hololeap | (~hololeap@user/hololeap) |
2022-03-09 23:05:52 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:8852:a14c:a420:3fd8) (Remote host closed the connection) |
2022-03-09 23:06:37 +0100 | Inst | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
2022-03-09 23:10:00 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-03-09 23:12:34 +0100 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2022-03-09 23:19:58 +0100 | xkuru | (~xkuru@user/xkuru) (Ping timeout: 256 seconds) |
2022-03-09 23:20:47 +0100 | infandum` | (~user@bras-base-toroon0637w-grc-17-76-64-95-29.dsl.bell.ca) (Remote host closed the connection) |
2022-03-09 23:22:59 +0100 | <janus> | sclv: i see the code-generators were merged. would that work with cabal-fmt, such that cabal would effectively regenerate the exposed-moduled like hpack would with stack? |
2022-03-09 23:25:08 +0100 | <sclv> | the code-generators pr? that's only for doctest like stuff |
2022-03-09 23:25:13 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) |
2022-03-09 23:25:14 +0100 | <sclv> | unrelated |
2022-03-09 23:25:44 +0100 | <sclv> | there's a desire for a cabal-fmt type command for regenerating exposed modules, but no such thing exists |
2022-03-09 23:26:02 +0100 | <sclv> | one blocker is a solid exactprint, which is a ticket that's moving very slowly, sadly |
2022-03-09 23:26:15 +0100 | <janus> | ah bummer |
2022-03-09 23:30:09 +0100 | fendor | (~fendor@91.141.34.180.wireless.dyn.drei.com) |
2022-03-09 23:31:10 +0100 | xkuru | (~xkuru@user/xkuru) |
2022-03-09 23:34:51 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2022-03-09 23:36:50 +0100 | c1utt4r | (~c1utt4r@vmi275462.contaboserver.net) (Ping timeout: 250 seconds) |
2022-03-09 23:36:58 +0100 | worldhelloworld2 | (~quassel@vmi275462.contaboserver.net) (Ping timeout: 256 seconds) |
2022-03-09 23:38:47 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-03-09 23:39:48 +0100 | <janus> | but code-generators sound great! is this why cabal-doctest was deprecated? |
2022-03-09 23:41:03 +0100 | michalz | (~michalz@185.246.204.72) (Remote host closed the connection) |
2022-03-09 23:41:08 +0100 | <sclv> | unrelated ish. but in general the existing solutions all became super flaky under v2 so this is a stab at stabilizing things |
2022-03-09 23:42:12 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2022-03-09 23:42:26 +0100 | x_kuru | (~xkuru@user/xkuru) |
2022-03-09 23:43:00 +0100 | <janus> | sclv: do you know the disadvantages of 'cabal repl --with-ghc=doctest' ? i havn't seen anybody using it, except myself |
2022-03-09 23:43:48 +0100 | x_kuru_ | (~xkuru@user/xkuru) |
2022-03-09 23:43:48 +0100 | da39a3ee5e6b4b0d | (~textual@2403:6200:8876:d2a9:ecfc:ebe1:b77a:f914) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-03-09 23:45:04 +0100 | xkuru | (~xkuru@user/xkuru) (Ping timeout: 250 seconds) |
2022-03-09 23:47:25 +0100 | x_kuru | (~xkuru@user/xkuru) (Ping timeout: 256 seconds) |
2022-03-09 23:48:18 +0100 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-03-09 23:48:32 +0100 | x_kuru_ | (~xkuru@user/xkuru) (Ping timeout: 240 seconds) |
2022-03-09 23:49:47 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-03-09 23:50:31 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-03-09 23:56:19 +0100 | <sclv> | nope, if it works it works |
2022-03-09 23:56:33 +0100 | <sclv> | i guess it just can't work from `cabal test` which bothers some people, understandably |
2022-03-09 23:59:54 +0100 | Lycurgus | (~juan@98.4.112.204) |