2024-04-23 00:15:41 +0200 | crook1389 | (uid581388@id-581388.ilkley.irccloud.com) (Quit: Connection closed for inactivity) |
2024-04-23 00:19:55 +0200 | anon1123 | (~anon1123@2a02:ab88:282:b00:da3a:ddff:fe3a:947c) (Ping timeout: 272 seconds) |
2024-04-23 00:22:10 +0200 | gmg | (~user@user/gehmehgeh) (Ping timeout: 260 seconds) |
2024-04-23 00:23:42 +0200 | acidjnk | (~acidjnk@p200300d6e714dc576d6928eb96b27a5a.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
2024-04-23 00:24:21 +0200 | trev | (~trev@user/trev) (Ping timeout: 252 seconds) |
2024-04-23 00:26:32 +0200 | trev | (~trev@user/trev) |
2024-04-23 00:29:36 +0200 | anon1123 | (~anon1123@catv-176-63-0-119.catv.fixed.vodafone.hu) |
2024-04-23 00:30:25 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2024-04-23 00:30:39 +0200 | noumenon | (~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving) |
2024-04-23 00:31:56 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) (Remote host closed the connection) |
2024-04-23 00:34:19 +0200 | zetef | (~quassel@5.2.182.98) (Remote host closed the connection) |
2024-04-23 00:46:46 +0200 | oo_miguel | (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 268 seconds) |
2024-04-23 00:48:35 +0200 | anon1123 | (~anon1123@catv-176-63-0-119.catv.fixed.vodafone.hu) (Ping timeout: 264 seconds) |
2024-04-23 00:48:39 +0200 | anon1123_ | (~anon1123@2a02:ab88:282:b00:da3a:ddff:fe3a:947c) |
2024-04-23 00:50:48 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
2024-04-23 00:52:02 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds) |
2024-04-23 00:54:18 +0200 | Ptival | (~ptival@64.16.51.186) (Remote host closed the connection) |
2024-04-23 00:54:45 +0200 | Ptival | (~ptival@64.16.51.186) |
2024-04-23 00:55:05 +0200 | Ptival | (~ptival@64.16.51.186) (Remote host closed the connection) |
2024-04-23 00:55:11 +0200 | Ptival_ | (~ptival@64.16.51.186) |
2024-04-23 00:56:19 +0200 | mima | (~mmh@aftr-62-216-211-149.dynamic.mnet-online.de) (Ping timeout: 268 seconds) |
2024-04-23 00:57:32 +0200 | Ptival_ | (~ptival@64.16.51.186) (Remote host closed the connection) |
2024-04-23 00:58:20 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) |
2024-04-23 01:00:46 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-23 01:01:11 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds) |
2024-04-23 01:01:27 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) (Remote host closed the connection) |
2024-04-23 01:02:48 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) |
2024-04-23 01:05:07 +0200 | leah2 | (~leah@vuxu.org) (Ping timeout: 255 seconds) |
2024-04-23 01:22:12 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) (Remote host closed the connection) |
2024-04-23 01:22:26 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) |
2024-04-23 01:29:25 +0200 | xal | (~xal@mx1.xal.systems) () |
2024-04-23 01:35:30 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) (Remote host closed the connection) |
2024-04-23 01:35:46 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) |
2024-04-23 01:37:02 +0200 | madeleine-sydney | (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Konversation terminated!) |
2024-04-23 01:42:19 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 260 seconds) |
2024-04-23 01:44:40 +0200 | xal | (~xal@mx1.xal.systems) |
2024-04-23 01:56:42 +0200 | Axman6 | (~Axman6@user/axman6) (Ping timeout: 244 seconds) |
2024-04-23 01:57:25 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) (Ping timeout: 245 seconds) |
2024-04-23 01:57:26 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2024-04-23 02:01:01 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-23 02:15:05 +0200 | Ptival | (~ptival@64.16.51.186) |
2024-04-23 02:16:22 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2024-04-23 02:17:50 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 245 seconds) |
2024-04-23 02:20:52 +0200 | bilegeek | (~bilegeek@2600:1008:b048:47a6:69f5:273e:c742:c5f5) |
2024-04-23 02:24:23 +0200 | sawilagar | (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds) |
2024-04-23 02:29:29 +0200 | ephemient | (uid407513@user/ephemient) |
2024-04-23 02:30:46 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) |
2024-04-23 02:31:55 +0200 | sroso | (~sroso@user/SrOso) |
2024-04-23 02:41:56 +0200 | <yin> | is it possible to run all operations that are not depedent on side effects at compile time? |
2024-04-23 02:45:13 +0200 | <geekosaur> | hypothetically. in practice, (a) bottoms at compile time will make you very unhappy (b) since `main :: IO a`, it's likely that most of your operations are ultimately dependent on `IO` |
2024-04-23 02:46:56 +0200 | y04nn | (~username@2a03:1b20:8:f011::e10d) (Ping timeout: 260 seconds) |
2024-04-23 02:48:23 +0200 | <yin> | but something like `primes = filter isPrime [0..100]` has no reason not to |
2024-04-23 02:48:24 +0200 | <c_wraith> | GHC really doesn't like to do recursion at compile time. |
2024-04-23 02:48:33 +0200 | <c_wraith> | mostly because.. it might bottom out |
2024-04-23 02:48:49 +0200 | <c_wraith> | Or proceed for an arbitrarily long time |
2024-04-23 02:49:03 +0200 | <EvanR> | this language zig really believes in doing a bunch of computation at compile time, so much so it's kind of hard to tell when it's going to do that |
2024-04-23 02:49:20 +0200 | <jackdk> | But also, in some sense, isn't this what optimisers do? Rewrite expressions into equivalent but faster forms? I saw something the other day that showed rustc could detect and optimise closed-form sums |
2024-04-23 02:49:40 +0200 | <yin> | C++ has consteval |
2024-04-23 02:49:52 +0200 | <EvanR> | yeah zig seems to take consteval to an extreme |
2024-04-23 02:49:57 +0200 | <c_wraith> | there's also the fact that simple things like [1 .. 1000000] are slower compile as constants than calculate. |
2024-04-23 02:50:30 +0200 | <geekosaur> | another point is that, while an operation might not depend on `IO` directly, its use might depend on it, and one aspect of laziness is that means your expression indeed depends on `IO` |
2024-04-23 02:52:27 +0200 | Inst | (~Inst@user/Inst) (Read error: Connection reset by peer) |
2024-04-23 02:52:39 +0200 | <c_wraith> | and from the other side... GHC *does* give you the tool to compile a lot of things as constants via template haskell, if you really need it. (not everything can be compiled that way, but a lot of things can) |
2024-04-23 02:52:57 +0200 | <yin> | ok i'm convinced it's not the best idea |
2024-04-23 02:55:10 +0200 | <c_wraith> | This isn't the hardest template haskell, though it *is* important to know why beta substitution doesn't work through quotes: primes = $(let x = filter isPrime [0..100] in [| x |]) |
2024-04-23 02:58:08 +0200 | <c_wraith> | actually, you'd probably want to use typed template haskell for that so it would infer the type from context correctly. But still. |
2024-04-23 03:01:07 +0200 | <c_wraith> | huh. apparently typed template haskell doesn't play nicely with let generalization. Weird. |
2024-04-23 03:01:47 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 264 seconds) |
2024-04-23 03:09:05 +0200 | nullobject | (~josh@user/nullobject) (Ping timeout: 245 seconds) |
2024-04-23 03:09:24 +0200 | Inst | (~Inst@user/Inst) |
2024-04-23 03:15:28 +0200 | tertek | (~tertek@user/tertek) |
2024-04-23 03:15:59 +0200 | zlqrvx | (~zlqrvx@user/zlqrvx) |
2024-04-23 03:22:33 +0200 | foul_owl | (~kerry@185.219.141.164) (Ping timeout: 252 seconds) |
2024-04-23 03:28:49 +0200 | Ptival | (~ptival@64.16.51.186) (Remote host closed the connection) |
2024-04-23 03:29:35 +0200 | Ptival | (~ptival@64.16.51.186) |
2024-04-23 03:31:54 +0200 | Ptival_ | (~ptival@64.16.51.186) |
2024-04-23 03:32:13 +0200 | hueso | (~root@user/hueso) (Quit: hueso) |
2024-04-23 03:32:23 +0200 | xff0x | (~xff0x@2405:6580:b080:900:f58b:ec5b:d9ae:c39) (Ping timeout: 256 seconds) |
2024-04-23 03:34:05 +0200 | Ptival | (~ptival@64.16.51.186) (Ping timeout: 245 seconds) |
2024-04-23 03:34:32 +0200 | smoge | (~smoge@2603:7000:4b42:1100::1) |
2024-04-23 03:35:44 +0200 | yin | (~yin@user/zero) (Ping timeout: 252 seconds) |
2024-04-23 03:36:10 +0200 | Ptival_ | (~ptival@64.16.51.186) (Ping timeout: 245 seconds) |
2024-04-23 03:36:35 +0200 | foul_owl | (~kerry@157.97.134.165) |
2024-04-23 03:36:49 +0200 | hueso | (~root@user/hueso) |
2024-04-23 03:37:42 +0200 | yin | (~yin@user/zero) |
2024-04-23 03:37:50 +0200 | otto_s | (~user@p5b04489f.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2024-04-23 03:39:35 +0200 | otto_s | (~user@p5b044a05.dip0.t-ipconnect.de) |
2024-04-23 03:44:06 +0200 | Ptival | (~ptival@2601:1c0:4580:7650:4c3d:464d:57f8:c38) |
2024-04-23 03:45:14 +0200 | smoge | (~smoge@2603:7000:4b42:1100::1) (Quit: Client closed) |
2024-04-23 03:45:58 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 03:48:15 +0200 | Ptival | (~ptival@2601:1c0:4580:7650:4c3d:464d:57f8:c38) (Ping timeout: 245 seconds) |
2024-04-23 03:49:48 +0200 | yin | (~yin@user/zero) (Ping timeout: 255 seconds) |
2024-04-23 03:51:48 +0200 | yin | (~yin@user/zero) |
2024-04-23 03:55:35 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2024-04-23 03:56:29 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-23 04:13:29 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2024-04-23 04:36:48 +0200 | td_ | (~td@i53870931.versanet.de) (Ping timeout: 252 seconds) |
2024-04-23 04:38:29 +0200 | td_ | (~td@i5387090C.versanet.de) |
2024-04-23 04:40:47 +0200 | yin | (~yin@user/zero) (Ping timeout: 268 seconds) |
2024-04-23 04:46:26 +0200 | tolt | (~weechat-h@li219-154.members.linode.com) (Quit: WeeChat 2.9) |
2024-04-23 04:46:42 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 04:47:27 +0200 | yin | (~yin@user/zero) |
2024-04-23 04:47:48 +0200 | machinedgod | (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 260 seconds) |
2024-04-23 04:48:05 +0200 | tolt | (~weechat-h@li219-154.members.linode.com) |
2024-04-23 04:52:43 +0200 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
2024-04-23 04:53:27 +0200 | tolt | (~weechat-h@li219-154.members.linode.com) (Quit: WeeChat 2.9) |
2024-04-23 04:54:44 +0200 | tolt | (~weechat-h@li219-154.members.linode.com) |
2024-04-23 04:58:41 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:01:27 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) |
2024-04-23 05:06:17 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:06:36 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:09:36 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:09:53 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:11:29 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:11:43 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:13:09 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:15:01 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:15:11 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:16:58 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:18:54 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 05:19:24 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 05:22:10 +0200 | Axman6 | (~Axman6@user/axman6) |
2024-04-23 05:26:38 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal) |
2024-04-23 05:29:27 +0200 | <Inst> | why doesn't IO memory leak horrifically in Haskell? |
2024-04-23 05:29:47 +0200 | <Inst> | a naive look at Haskell's semantics implies that Haskell has to build the full IO value before it can execute |
2024-04-23 05:30:31 +0200 | <EvanR> | do you mean something like someprimitive >>= f |
2024-04-23 05:30:50 +0200 | <Inst> | https://hackage.haskell.org/package/base-4.19.1.0/docs/src/GHC.Base.html#thenIO |
2024-04-23 05:30:54 +0200 | <EvanR> | it has to execute someprimitive before going on |
2024-04-23 05:31:21 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 268 seconds) |
2024-04-23 05:31:29 +0200 | <Inst> | yeah, i know, because that's how I understand how Haskell actually works, but taking the lambdas literally it implies massive thunk buildup |
2024-04-23 05:31:34 +0200 | <EvanR> | that doesn't look like semantics to me xD |
2024-04-23 05:32:19 +0200 | <EvanR> | massive thunk buildup? |
2024-04-23 05:33:01 +0200 | <Inst> | it feels like there's some kind of magic going on because it feels like when you call main |
2024-04-23 05:33:15 +0200 | aforemny_ | (~aforemny@2001:9e8:6cde:9300:d77b:b228:6e32:ed32) (Ping timeout: 245 seconds) |
2024-04-23 05:33:46 +0200 | <Inst> | it'd have to fully evaluate your program (since all Haskell programs are single values of type IO a) |
2024-04-23 05:34:10 +0200 | <EvanR> | how can it even evaluate anything when it doesn't know the result of the first IO call |
2024-04-23 05:34:12 +0200 | aforemny | (~aforemny@2001:9e8:6cc5:7800:75d6:e4cb:e12d:1704) |
2024-04-23 05:34:18 +0200 | <EvanR> | to pass to the f |
2024-04-23 05:35:03 +0200 | <Inst> | well it has to go through all the thens and binds in IO |
2024-04-23 05:35:10 +0200 | <c_wraith> | Why? |
2024-04-23 05:35:17 +0200 | <c_wraith> | they're hidden behind lambdas |
2024-04-23 05:35:27 +0200 | <Inst> | derp |
2024-04-23 05:35:29 +0200 | <EvanR> | logically, it only has to hold the top most lambda |
2024-04-23 05:35:39 +0200 | <Inst> | so i don't understand lambda laziness then |
2024-04-23 05:35:53 +0200 | <Inst> | back to watching Alexis King, I guess |
2024-04-23 05:35:56 +0200 | <EvanR> | WHNF means the inside of a lambda isn't evaluated |
2024-04-23 05:36:06 +0200 | <EvanR> | yet |
2024-04-23 05:37:32 +0200 | <Inst> | https://www.youtube.com/watch?v=fSqE-HSh_NU |
2024-04-23 05:38:00 +0200 | <EvanR> | "Laziness. Is it good?" |
2024-04-23 05:38:21 +0200 | <Inst> | i read somewhere that you can accumulate thunks based on the chained function calls inside? |
2024-04-23 05:38:28 +0200 | <EvanR> | betteridge's law implies No |
2024-04-23 05:39:31 +0200 | <haskellbridge> | <irregularsphere> 1+1=2? |
2024-04-23 05:40:15 +0200 | <Inst> | (+) _ _ = _ |
2024-04-23 05:41:20 +0200 | <EvanR> | 1 + 1 + 1 + 1 + 1 + 1, but that's not a lambda |
2024-04-23 05:41:31 +0200 | <EvanR> | it's a bunch of applications |
2024-04-23 05:44:51 +0200 | <haskellbridge> | <irregularsphere> Inst: anyway, first of all, `do` is syntax sugar: `do { putStrLn a; b <- getLine; c <- getLine; return b ++ c }` -> `putStrLn a >>= \_ -> (getLine >>= \b -> (getLine >>= \c -> (return b ++ c)))` so no you really won't, moreover _should not_ have to evaluate the entire IO before executing |
2024-04-23 05:45:07 +0200 | <Inst> | i'm familiar with do, i'm just reviewing what i know to patch gaps |
2024-04-23 05:45:32 +0200 | <haskellbridge> | <irregularsphere> (...is sending multiline messages over the matrix <-> irc bridge acceptable?) |
2024-04-23 05:46:07 +0200 | <Inst> | iirc it should also be foo >> (bar >> (baz... ))), no? |
2024-04-23 05:46:27 +0200 | <haskellbridge> | <irregularsphere> a >> b is defined as a >>= \_ -> b |
2024-04-23 05:46:48 +0200 | <monochrom> | You will need a very good model of IO to see why for example "main = putStrLn "hi" >>= \_ -> main" is productive. |
2024-04-23 05:46:49 +0200 | <haskellbridge> | <irregularsphere> s/_/\_ |
2024-04-23 05:47:49 +0200 | <haskellbridge> | <irregularsphere> to be fair i just know IO as a magic state monad that uses the RealWorld |
2024-04-23 05:48:15 +0200 | yin | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-23 05:48:17 +0200 | <haskellbridge> | <irregularsphere> ~~I wonder if you can create your own `RealWorld`s~~ |
2024-04-23 05:48:49 +0200 | <Inst> | ruwRW# :3 |
2024-04-23 05:49:07 +0200 | <monochrom> | The "RealWorld -> (a, RealWorld)" model will not explain why putStrLn actually prints anything. |
2024-04-23 05:49:35 +0200 | <Inst> | or rather, GHC.Prim.html |
2024-04-23 05:49:42 +0200 | <Inst> | erm, GHC.Prim.realWorld# |
2024-04-23 05:49:45 +0200 | <haskellbridge> | <irregularsphere> fair, that's why i said "to be fair i just know" |
2024-04-23 05:49:51 +0200 | <monochrom> | By extension, you can create your own RealWorld's, there is enough stuff in GHC.* modules for that. And that still doesn't let you print anything. |
2024-04-23 05:49:56 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2024-04-23 05:50:14 +0200 | <monochrom> | Although, beginning with 9.6, it is enough for you to play with shift-reset. |
2024-04-23 05:50:18 +0200 | yin | (~yin@user/zero) |
2024-04-23 05:51:34 +0200 | <Inst> | also technically, >>= \_ -> main should be less efficient than >> main, no? |
2024-04-23 05:51:43 +0200 | <Inst> | since there is a specific thenIO# |
2024-04-23 05:51:50 +0200 | <EvanR> | if RealWorld Haskell was written by Inst it would be called IO Haskell |
2024-04-23 05:54:02 +0200 | <monochrom> | Not sure how knowing about thenIO# answers the questions you asked unless you intend to answer them by studying GHC source code and then GHC RTS source code. |
2024-04-23 05:56:55 +0200 | <haskellbridge> | <irregularsphere> looking at the source, `bindIO` and `thenIO` look similar, so I guess it'd not be that much of a performance penalty (or, any at all) |
2024-04-23 05:57:06 +0200 | <Inst> | on main = putStrLn "hi" >> main, >> is the function actually running, when then creates a lambda of IO (\s -> case runRW# (putStrLn "hi") s of (new_s, _) -> unIO main new_s) |
2024-04-23 05:57:43 +0200 | <haskellbridge> | <irregularsphere> I'm not familiar with haskell's internals unfortunately |
2024-04-23 05:58:48 +0200 | <Inst> | main unwraps, applies the state token |
2024-04-23 05:59:14 +0200 | <Inst> | forces the lambda to case runRW# (putStrLn "hi") s, running the effect |
2024-04-23 05:59:50 +0200 | <Inst> | pattern matches on a fictive new state, then unIO unwraps main and the evaluation engine tries to go to the next main |
2024-04-23 05:59:53 +0200 | <Inst> | wrong? |
2024-04-23 06:01:32 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2024-04-23 06:01:32 +0200 | <Inst> | ironically I do have to wonder if foo >> bar >> baz has different performance characteristics to foo >> (bar >> baz) |
2024-04-23 06:01:40 +0200 | <Inst> | or rather foo; bar; baz |
2024-04-23 06:01:46 +0200 | <glguy> | You don't have to wonder |
2024-04-23 06:02:06 +0200 | <Inst> | since it's infixl |
2024-04-23 06:02:17 +0200 | <Inst> | thus the bar baz >> is "in control" |
2024-04-23 06:02:57 +0200 | <haskellbridge> | <irregularsphere> I don't know what infix has to do with this |
2024-04-23 06:03:55 +0200 | <Inst> | infixl should mean it renders as (foo >> bar) >> baz |
2024-04-23 06:04:25 +0200 | <Inst> | by lazy semantics, (foo >> bar) is treated as a thunk, then evaluated first, no? |
2024-04-23 06:04:34 +0200 | <Inst> | then foo >> bar is part of its evaluation |
2024-04-23 06:04:54 +0200 | <Inst> | whereas foo; bar; baz is effectively foo >> (bar >> baz) |
2024-04-23 06:05:03 +0200 | <Inst> | and evaluates more cleannly |
2024-04-23 06:05:26 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-23 06:05:36 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2024-04-23 06:05:39 +0200 | <glguy> | Inst: you don't have to guess; you can just ask GHC to show you what it did |
2024-04-23 06:06:47 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2024-04-23 06:08:42 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 06:09:02 +0200 | demesne | (~demesne@50.35.88.207) |
2024-04-23 06:09:29 +0200 | <monochrom> | My https://mail.haskell.org/pipermail/haskell-cafe/2013-April/107775.html is a great example. |
2024-04-23 06:09:43 +0200 | <monochrom> | of how armchair philosophy is always broken. |
2024-04-23 06:11:18 +0200 | michalz | (~michalz@185.246.207.218) |
2024-04-23 06:14:05 +0200 | <glguy> | monochrom: ugh, it didn't bother eval = fval ?? |
2024-04-23 06:14:38 +0200 | <monochrom> | Heh, I don't know why, but perhaps just because it was 2013. |
2024-04-23 06:15:47 +0200 | <monochrom> | With todays "f = (... >> ...) >> ...; g = ... >> (... >> ...)" example and recent GHC, yeah it just does "f = f1; g = f1; f1 = ..." |
2024-04-23 06:19:08 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
2024-04-23 06:20:08 +0200 | <monochrom> | OK today's GHC does "eval = fval". :) |
2024-04-23 06:22:40 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) |
2024-04-23 06:24:56 +0200 | <Inst> | oh wow, what happend to fllvm? |
2024-04-23 06:25:28 +0200 | <glguy> | I give uo |
2024-04-23 06:25:31 +0200 | <glguy> | up |
2024-04-23 06:27:40 +0200 | <monochrom> | You wanna have fun listening to a new fable I'm making up just now? >:) |
2024-04-23 06:27:58 +0200 | <Inst> | it's -ddump-simpl to see logs? |
2024-04-23 06:28:05 +0200 | <Inst> | sorry, I got distracted by trying to search for how to get the IR out |
2024-04-23 06:28:11 +0200 | <Inst> | ended up just stealing it off monochrom's link |
2024-04-23 06:28:21 +0200 | <Inst> | then i ended up playing around with trying to get -fllvm working |
2024-04-23 06:28:28 +0200 | <Inst> | which i suspect really should be called -O3 |
2024-04-23 06:28:37 +0200 | <monochrom> | I'm going to tell it anyway! Someone asks why 20 mod 10 = 0. |
2024-04-23 06:28:57 +0200 | <monochrom> | So everyone tries to explain like 20 is a multiple of 10 so the remainder is 0. |
2024-04-23 06:30:07 +0200 | <monochrom> | But the asker decided to not listen, instead compile with gcc -O2, and say "btw as shown by gcc -O2, isn't it more efficient to multiple by 1717986919 then do this left-shift then do this right-shift then ..." |
2024-04-23 06:30:07 +0200 | glguy | prepares for enlightenment |
2024-04-23 06:35:03 +0200 | <Inst> | has your enlightenment arrived? |
2024-04-23 06:38:45 +0200 | <jackdk> | Enlightenment came for me in the early 2000s, when I discovered the BlueSteel theme |
2024-04-23 06:38:59 +0200 | <Inst> | okay, looking at the IR of sample foo programs, which calls boo and baz |
2024-04-23 06:41:03 +0200 | <Inst> | cool, only at O0 do you see the different encodings |
2024-04-23 06:41:32 +0200 | <Inst> | but am i wrong if i say that fflvm is haskell's hidden O3 mode? |
2024-04-23 06:42:39 +0200 | <dolio> | Yes. |
2024-04-23 06:45:01 +0200 | <Inst> | why? |
2024-04-23 06:45:33 +0200 | <dolio> | Why would you even think that it is? |
2024-04-23 06:45:56 +0200 | <Inst> | since fflvm apparently grants some performance improvements when using vector |
2024-04-23 06:46:11 +0200 | <c_wraith> | and worse performance in other cases |
2024-04-23 06:46:30 +0200 | <Inst> | and i'm annoyed that when i benchmarked it via time, Haskell seems to run at 4x rust |
2024-04-23 06:46:35 +0200 | <dolio> | Anyhow, I haven't been paying close attention, but I recall seeing ghc people lamenting about how no one is even working on it anymore, so it may be getting worse over time. |
2024-04-23 06:46:42 +0200 | <Inst> | i know |
2024-04-23 06:46:53 +0200 | <Inst> | i'm also told llvm is terrible for FP, although someone's talking about setting up recursive macros |
2024-04-23 06:46:57 +0200 | <dolio> | And yeah, some examples might be better, others might be worse. |
2024-04-23 06:47:51 +0200 | Square | (~Square@user/square) |
2024-04-23 06:49:01 +0200 | <Inst> | if kuribas were here, i'd mention they claimed that they could get Haskell reliably within 50% of rust |
2024-04-23 06:49:05 +0200 | <Inst> | with trivial effort |
2024-04-23 06:49:16 +0200 | <dolio> | I wouldn't be surprised if no one's verified that -fllvm is actually better for vector in like 7 years. |
2024-04-23 06:49:53 +0200 | <dolio> | But, I mean, it might be. It's pretty particular code. |
2024-04-23 06:51:50 +0200 | <Inst> | minority of minority of performance obsessed haskellers |
2024-04-23 06:53:00 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) |
2024-04-23 06:53:26 +0200 | <haskellbridge> | <irregularsphere> Inst: "4x rust" would you please send us both codes that have been benchmarked |
2024-04-23 06:55:29 +0200 | <haskellbridge> | <irregularsphere> "if kuribas were here, i'd mention they claimed that they could get Haskell reliably within 50% of rust" I'm sorry, what does "get Haskell within 50% of Rust" mean |
2024-04-23 06:56:27 +0200 | <EvanR> | 4 times faster than rust is nothing to complain about! |
2024-04-23 06:57:32 +0200 | <haskellbridge> | <irregularsphere> I won't believe it till I replicate it |
2024-04-23 06:58:32 +0200 | <EvanR> | it would have to be something that benefits from skipping most of the work thanks to laziness, in which case the rust version could be excused for being written wrong |
2024-04-23 06:59:09 +0200 | <EvanR> | and not explicitly skipping work the long way |
2024-04-23 07:01:22 +0200 | <Inst> | i mean flatparse seems to outperform nom for some reason |
2024-04-23 07:01:28 +0200 | <Inst> | i can't find where chrisdone hid his benchmarks |
2024-04-23 07:03:08 +0200 | <Inst> | here we go |
2024-04-23 07:03:08 +0200 | <Inst> | https://gist.github.com/chrisdone/8551675bb99a0d66cf075fdcb1e6b757 |
2024-04-23 07:04:37 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2024-04-23 07:05:17 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2024-04-23 07:06:49 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) |
2024-04-23 07:07:07 +0200 | euphores | (~SASL_euph@user/euphores) (Ping timeout: 260 seconds) |
2024-04-23 07:11:07 +0200 | kritzefitz_ | (~kritzefit@debian/kritzefitz) |
2024-04-23 07:13:11 +0200 | kritzefitz | (~kritzefit@debian/kritzefitz) (Ping timeout: 264 seconds) |
2024-04-23 07:14:49 +0200 | <haskellbridge> | <irregularsphere> "it would have to be something that benefits from skipping most of the work thanks to laziness, in which case the rust version could be excused for being written wrong" yeah anything written in any language can be written in rust, or C if you're brave enough |
2024-04-23 07:14:59 +0200 | bilegeek | (~bilegeek@2600:1008:b048:47a6:69f5:273e:c742:c5f5) (Quit: Leaving) |
2024-04-23 07:15:58 +0200 | kritzefitz_ | kritzefitz |
2024-04-23 07:16:39 +0200 | <haskellbridge> | <irregularsphere> Rust is eager by default and Haskell is lazy by default, I would say |
2024-04-23 07:17:35 +0200 | <haskellbridge> | <irregularsphere> anyway I'm much more interested in the type system, and I don't even program seriously anyway |
2024-04-23 07:17:48 +0200 | <Axman6> | -fllvm can be useful for certain kinds of code, mostly code which uses lots of loops and/or numerical things that it can vectorise. But a lot of Haskell code sees no improvement |
2024-04-23 07:20:10 +0200 | <Inst> | now the challenge for me is to figure out how to get -fllvm working |
2024-04-23 07:21:44 +0200 | <Axman6> | do you have an error? |
2024-04-23 07:21:52 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-04-23 07:22:06 +0200 | <Axman6> | generally it's as simple as having llvm installed, and GHC just calls `opt` on its llvm output files |
2024-04-23 07:22:18 +0200 | <Axman6> | (oversimplification but roughly true) |
2024-04-23 07:23:48 +0200 | <Inst> | looks like this |
2024-04-23 07:23:48 +0200 | <Inst> | https://media.discordapp.net/attachments/968989726633779215/1232200171152998470/image.png?ex=66289… |
2024-04-23 07:24:29 +0200 | <Inst> | thanks for offering to help, Axman6 |
2024-04-23 07:25:07 +0200 | <haskellbridge> | <irregularsphere> unsupported llvm version? |
2024-04-23 07:25:19 +0200 | <Inst> | i have no idea why this is |
2024-04-23 07:25:28 +0200 | <haskellbridge> | <irregularsphere> I could only guess... |
2024-04-23 07:25:54 +0200 | mei | (~mei@user/mei) (Killed (mercury.libera.chat (Nickname regained by services))) |
2024-04-23 07:25:55 +0200 | <Inst> | i heard 9.10 or 9.12 supports up to llvm 18 |
2024-04-23 07:25:57 +0200 | <haskellbridge> | <irregularsphere> s/could/can |
2024-04-23 07:25:59 +0200 | mei | (~mei@user/mei) |
2024-04-23 07:26:19 +0200 | <Inst> | so i have clang14 installed via pacman and am trying to figure out how to change system default clang version |
2024-04-23 07:27:53 +0200 | <dolio> | -fllvm doesn't compile to C, though. It uses a GHC-specific calling convention in general llvm. |
2024-04-23 07:28:51 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal) |
2024-04-23 07:30:07 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2024-04-23 07:32:58 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-04-23 07:33:12 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2024-04-23 07:39:27 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 256 seconds) |
2024-04-23 07:45:03 +0200 | demesne | (~demesne@50.35.88.207) (Remote host closed the connection) |
2024-04-23 07:49:37 +0200 | <Axman6> | if you can use an older LLVM install in your path and/or alias opt=opt-14 or something then that might work |
2024-04-23 07:50:38 +0200 | <Axman6> | or you can use -pgmlo opt-14 -pgmlc llc-14 as GHC arguments |
2024-04-23 07:50:57 +0200 | dunj3 | (~dunj3@kingdread.de) (Ping timeout: 252 seconds) |
2024-04-23 07:51:05 +0200 | <Axman6> | https://downloads.haskell.org/ghc/latest/docs/users_guide/phases.html?highlight=pgm#ghc-flag--pgml…⟨cmd⟩ |
2024-04-23 07:52:17 +0200 | peterbecich | (~Thunderbi@47.229.123.186) |
2024-04-23 07:53:13 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-04-23 07:54:22 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) |
2024-04-23 07:55:48 +0200 | dunj3 | (~dunj3@kingdread.de) |
2024-04-23 07:58:15 +0200 | <glguy> | You can fix a particular GHC to use a particular llc and opt executable by editing your local settings file, e.g. .ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib/settings |
2024-04-23 07:58:35 +0200 | acidjnk | (~acidjnk@p200300d6e714dc429de1f5b63f3ace20.dip0.t-ipconnect.de) |
2024-04-23 07:59:10 +0200 | <Inst> | thanks |
2024-04-23 08:00:16 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2024-04-23 08:06:46 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-04-23 08:08:07 +0200 | peterbecich | (~Thunderbi@47.229.123.186) (Ping timeout: 255 seconds) |
2024-04-23 08:11:10 +0200 | philopsos | (~caecilius@user/philopsos) (Ping timeout: 245 seconds) |
2024-04-23 08:11:11 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) |
2024-04-23 08:14:45 +0200 | danza | (~francesco@151.35.152.107) |
2024-04-23 08:17:35 +0200 | oo_miguel | (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) |
2024-04-23 08:20:05 +0200 | leah2 | (~leah@vuxu.org) |
2024-04-23 08:26:57 +0200 | mima | (~mmh@aftr-62-216-211-1.dynamic.mnet-online.de) |
2024-04-23 08:29:33 +0200 | <mauke> | glguy: "Note on syntax — the reader should understand why we need the brackets in f(2, 3). Not to make a list — that is done by the comma. Nor to denote functional application — mere juxtaposition does that. They are there because functional application binds more tightly than comma — without them we should be applying f to 2 only and not to the whole list." |
2024-04-23 08:30:38 +0200 | <mauke> | it's not exactly the same, but the parentheses in @xs = (2, 3); are also there purely because of precedence |
2024-04-23 08:37:13 +0200 | ft | (~ft@p4fc2a20e.dip0.t-ipconnect.de) (Quit: leaving) |
2024-04-23 08:38:19 +0200 | <glguy> | mauke: Simple Authentication and Security Layer (SASL) ? |
2024-04-23 08:40:02 +0200 | zetef | (~quassel@5.2.182.98) |
2024-04-23 08:41:30 +0200 | <Inst> | thanks glguy |
2024-04-23 08:41:31 +0200 | zetef | (~quassel@5.2.182.98) (Remote host closed the connection) |
2024-04-23 08:41:44 +0200 | <Inst> | settings = opt-14 / llc-14 |
2024-04-23 08:41:45 +0200 | <Inst> | sigh |
2024-04-23 08:45:45 +0200 | dtman34 | (~dtman34@2601:447:d001:ed50:5054:ff:fee3:b667) (Ping timeout: 256 seconds) |
2024-04-23 08:48:23 +0200 | jle` | (~jle`@2603:8001:3b02:84d4:9428:fb32:50c:b0cc) (Ping timeout: 260 seconds) |
2024-04-23 08:49:04 +0200 | jle` | (~jle`@2603:8001:3b02:84d4:99e7:4463:681a:66ac) |
2024-04-23 08:51:15 +0200 | paddymahoney | (~paddymaho@pool-99-250-26-190.cpe.net.cable.rogers.com) |
2024-04-23 08:53:12 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-04-23 08:58:57 +0200 | oo_miguel1 | (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) |
2024-04-23 09:02:51 +0200 | oo_miguel | (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 245 seconds) |
2024-04-23 09:02:51 +0200 | oo_miguel1 | oo_miguel |
2024-04-23 09:04:01 +0200 | <mauke> | glguy: https://web.archive.org/web/20150402133901/http://www.eis.mdx.ac.uk/staffpages/dat/saslman.pdf |
2024-04-23 09:04:42 +0200 | <mauke> | predecessor of KRC, Miranda, Haskell |
2024-04-23 09:05:41 +0200 | <danza> | hah a language that can define only data structures. Fancy |
2024-04-23 09:06:31 +0200 | Square2 | (~Square4@user/square) |
2024-04-23 09:06:37 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-04-23 09:06:55 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-04-23 09:07:36 +0200 | <danza> | considering the state of the web, i thought about downloading that document. Might not find it again eventually |
2024-04-23 09:16:48 +0200 | AlexZenon_2 | (~alzenon@178.34.161.189) |
2024-04-23 09:17:42 +0200 | Square3 | (~Square4@user/square) |
2024-04-23 09:18:15 +0200 | AlexZenon | (~alzenon@178.34.161.189) (Ping timeout: 245 seconds) |
2024-04-23 09:18:18 +0200 | dsrt^ | (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 255 seconds) |
2024-04-23 09:18:40 +0200 | Square2 | (~Square4@user/square) (Ping timeout: 245 seconds) |
2024-04-23 09:21:06 +0200 | dsrt^ | (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
2024-04-23 09:22:46 +0200 | danza_ | (~francesco@151.35.253.181) |
2024-04-23 09:23:12 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2024-04-23 09:23:55 +0200 | danza | (~francesco@151.35.152.107) (Read error: Connection reset by peer) |
2024-04-23 09:24:20 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2024-04-23 09:30:08 +0200 | dtman34 | (~dtman34@2601:447:d001:ed50:e2b0:b15b:8890:6869) |
2024-04-23 09:31:09 +0200 | tzh | (~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz) |
2024-04-23 09:37:58 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal) |
2024-04-23 09:43:15 +0200 | Square3 | (~Square4@user/square) (Ping timeout: 245 seconds) |
2024-04-23 09:43:40 +0200 | yin | (~yin@user/zero) (Ping timeout: 245 seconds) |
2024-04-23 09:47:34 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Ping timeout: 255 seconds) |
2024-04-23 09:50:13 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
2024-04-23 09:50:35 +0200 | yin | (~yin@user/zero) |
2024-04-23 09:51:24 +0200 | philopsos | (~caecilius@user/philopsos) |
2024-04-23 09:51:46 +0200 | bitdex_ | (~bitdex@gateway/tor-sasl/bitdex) |
2024-04-23 09:51:58 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds) |
2024-04-23 09:56:21 +0200 | rosco | (~rosco@yp-146-6.tm.net.my) |
2024-04-23 10:01:32 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 10:02:24 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-04-23 10:04:46 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-04-23 10:04:51 +0200 | gmg | (~user@user/gehmehgeh) |
2024-04-23 10:05:48 +0200 | Guest64 | (~Guest95@217.7.130.9) |
2024-04-23 10:14:19 +0200 | chele | (~chele@user/chele) |
2024-04-23 10:18:40 +0200 | bitdex_ | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2024-04-23 10:19:08 +0200 | FragByte | (~christian@user/fragbyte) |
2024-04-23 10:19:41 +0200 | bitdex_ | (~bitdex@gateway/tor-sasl/bitdex) |
2024-04-23 10:20:33 +0200 | AlexZenon_2 | (~alzenon@178.34.161.189) (Ping timeout: 252 seconds) |
2024-04-23 10:24:31 +0200 | machinedgod | (~machinedg@d173-183-246-216.abhsia.telus.net) |
2024-04-23 10:25:20 +0200 | AlexZenon | (~alzenon@178.34.161.189) |
2024-04-23 10:34:30 +0200 | danza_ | (~francesco@151.35.253.181) (Ping timeout: 245 seconds) |
2024-04-23 10:41:35 +0200 | philopsos | (~caecilius@user/philopsos) (Ping timeout: 245 seconds) |
2024-04-23 10:45:48 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) (Remote host closed the connection) |
2024-04-23 10:49:33 +0200 | demon-cat | (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 268 seconds) |
2024-04-23 10:54:01 +0200 | <haskellbridge> | <irregularsphere> is there a dump channel/room for annoying thoughts regarding Haskell |
2024-04-23 10:54:27 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) |
2024-04-23 10:56:21 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) |
2024-04-23 10:56:50 +0200 | danse-nr3 | (~danse-nr3@151.35.253.181) |
2024-04-23 10:57:13 +0200 | danse-nr3 | (~danse-nr3@151.35.253.181) (Remote host closed the connection) |
2024-04-23 10:57:34 +0200 | <haskellbridge> | <irregularsphere> "saslman.pdf" ...the entire prelude listing is 4 pages long |
2024-04-23 10:57:39 +0200 | danse-nr3 | (~danse-nr3@151.35.253.181) |
2024-04-23 10:57:39 +0200 | <haskellbridge> | <irregularsphere> i can appreciate that |
2024-04-23 11:00:46 +0200 | <Inst> | wow, this is nuts |
2024-04-23 11:00:48 +0200 | <Inst> | https://www.youtube.com/watch?v=Xceng7i98Y0 |
2024-04-23 11:00:58 +0200 | <Inst> | the part about seq not actually forcing thunks but only annotating a data dependency |
2024-04-23 11:07:11 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) (Remote host closed the connection) |
2024-04-23 11:07:12 +0200 | madeleine-sydney | (~madeleine@c-76-155-235-153.hsd1.co.comcast.net) |
2024-04-23 11:07:45 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) |
2024-04-23 11:10:45 +0200 | superbil | (~superbil@1-34-176-171.hinet-ip.hinet.net) (Quit: WeeChat 4.2.1) |
2024-04-23 11:14:13 +0200 | superbil | (~superbil@1-34-176-171.hinet-ip.hinet.net) |
2024-04-23 11:14:19 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) (Remote host closed the connection) |
2024-04-23 11:15:09 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-04-23 11:15:50 +0200 | Inst | (~Inst@user/Inst) (Read error: Connection reset by peer) |
2024-04-23 11:16:11 +0200 | Inst | (~Inst@user/Inst) |
2024-04-23 11:20:43 +0200 | <Inst> | irregularsphere: I guess #haskell-offtopic might be tolerant |
2024-04-23 11:21:21 +0200 | <danse-nr3> | maybe not towards intolerance though |
2024-04-23 11:21:40 +0200 | pastly | (~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection) |
2024-04-23 11:21:40 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2024-04-23 11:22:16 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2024-04-23 11:22:30 +0200 | pastly | (~pastly@gateway/tor-sasl/pastly) |
2024-04-23 11:22:30 +0200 | <Inst> | hopefully not toward intolerance |
2024-04-23 11:23:15 +0200 | <haskellbridge> | <irregularsphere> heh, might set up an IRC account soon :-) |
2024-04-23 11:30:33 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) |
2024-04-23 11:34:00 +0200 | <Inst> | okay, ran some toy benchmarks |
2024-04-23 11:34:23 +0200 | <Inst> | haskell is ~100 ms on fib 100_000, so's rust |
2024-04-23 11:35:25 +0200 | <danse-nr3> | i thought you were busy with an ambitious project? That platform for apps or something along those lines |
2024-04-23 11:35:57 +0200 | <Inst> | need to learn html, now sidetracked with learning linux |
2024-04-23 11:36:24 +0200 | <danse-nr3> | do you have an estimation about how much will the project take? |
2024-04-23 11:37:21 +0200 | <Inst> | probably never :( |
2024-04-23 11:37:26 +0200 | <Inst> | i have tons of idea and just spout vaporware |
2024-04-23 11:37:43 +0200 | <Inst> | thanks for being actually supportive, though! |
2024-04-23 11:38:04 +0200 | <danse-nr3> | i was not even supportive, barely mindful |
2024-04-23 11:38:50 +0200 | <Inst> | well, implicitly you were somehow expecting that i'd actually do something |
2024-04-23 11:38:59 +0200 | <Inst> | you make me want to make a shoddy mockup, then iterate through it |
2024-04-23 11:39:18 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 260 seconds) |
2024-04-23 11:39:51 +0200 | <danse-nr3> | if you develop it as an evolutionary prototype it could get somewher |
2024-04-23 11:39:54 +0200 | <danse-nr3> | e |
2024-04-23 11:41:23 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2024-04-23 11:41:24 +0200 | <Inst> | it exists, it's not pure BS, maybe someone could steal the concept and go somewhere with it, or I could iterate it to get it to suck less until it doesn't suck |
2024-04-23 11:42:06 +0200 | <danse-nr3> | well the concept might be the most mutable part of that prototype |
2024-04-23 11:42:35 +0200 | <geekosaur> | (it will always suck, because you'll always be comparing it to a vision that might not even be realizable) |
2024-04-23 11:43:23 +0200 | causal | (~eric@50.35.88.207) (Quit: WeeChat 4.1.1) |
2024-04-23 11:43:26 +0200 | <Inst> | well i learned not to be so hard on myself |
2024-04-23 11:43:31 +0200 | <geekosaur> | that's the problem with Grand Ideas |
2024-04-23 11:43:46 +0200 | <Inst> | no point in having standards you'll never meet, because that' sdemoralizing and provides an excuse for failure |
2024-04-23 11:43:47 +0200 | <danse-nr3> | yeah and sucking is a good feature for such a prototype... |
2024-04-23 11:43:55 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) |
2024-04-23 11:44:14 +0200 | <ph88> | when i use do-notation for Either is it using applicative-do or monad ? |
2024-04-23 11:44:16 +0200 | <danse-nr3> | just a matter of steering it until it sucks money. That's how the industry works at the moment |
2024-04-23 11:44:37 +0200 | <danse-nr3> | monad ph88 |
2024-04-23 11:45:14 +0200 | <ph88> | thx |
2024-04-23 11:45:32 +0200 | <danse-nr3> | i wonder how you got that doubt though |
2024-04-23 11:46:09 +0200 | <ph88> | can i make a monad like Either for data Err a = Fail String | Success a or is it not possible because there is no second type variable? |
2024-04-23 11:47:00 +0200 | <danse-nr3> | huh this is a conversation that came up here some weeks ago |
2024-04-23 11:47:20 +0200 | <danse-nr3> | there exist already multiple types for that |
2024-04-23 11:47:38 +0200 | <danse-nr3> | basically Eithers with different monadic semantics |
2024-04-23 11:48:08 +0200 | <ph88> | i have to work with a type given by a library |
2024-04-23 11:50:29 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 11:51:10 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) |
2024-04-23 11:53:37 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 11:55:07 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) |
2024-04-23 12:00:04 +0200 | Nixkernal | (~Nixkernal@240.17.194.178.dynamic.wline.res.cust.swisscom.ch) |
2024-04-23 12:00:14 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 12:00:27 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 12:00:35 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) |
2024-04-23 12:00:58 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-04-23 12:01:15 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-04-23 12:02:54 +0200 | <ncf> | that's just Either String |
2024-04-23 12:06:47 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) (Remote host closed the connection) |
2024-04-23 12:07:00 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) |
2024-04-23 12:07:53 +0200 | <danse-nr3> | sometimes one wants different monadic semantics that "first Left quits", there are other types but i do not use them often |
2024-04-23 12:09:33 +0200 | <ncf> | the question seemed more basic than that, since they asked about "a monad like Either" |
2024-04-23 12:09:34 +0200 | <danse-nr3> | *different semantics than* |
2024-04-23 12:10:15 +0200 | <danse-nr3> | that's what i was talking about, but they said "can i make". Of course one can be made, but there are already several |
2024-04-23 12:10:23 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) (Remote host closed the connection) |
2024-04-23 12:10:35 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) |
2024-04-23 12:14:23 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 264 seconds) |
2024-04-23 12:22:43 +0200 | sawilagar | (~sawilagar@user/sawilagar) |
2024-04-23 12:24:37 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2024-04-23 12:25:34 +0200 | julie_pilgrim | (~julie_pil@user/julie-pilgrim/x-1240752) (Ping timeout: 250 seconds) |
2024-04-23 12:30:00 +0200 | waldo | (~waldo@user/waldo) |
2024-04-23 12:32:41 +0200 | yeitrafferin | (~user@2a04:4540:720b:c200:f675:174e:dfd1:276b) |
2024-04-23 12:36:50 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2024-04-23 12:40:21 +0200 | <Inst> | oh |
2024-04-23 12:40:26 +0200 | tri | (~tri@ool-18bc2e74.dyn.optonline.net) |
2024-04-23 12:41:35 +0200 | <Inst> | that's the reason foldl' generates thunks, i.e, it has to first traverse the list to generate nested function applications, then it has to execute the nested function applications in the same way foldr would have to |
2024-04-23 12:42:49 +0200 | <jackdk> | doesn't the `'` at the end of `foldl'` indicate that it forces the accumulator to WHNF as it processes each element? |
2024-04-23 12:43:38 +0200 | <Inst> | erm, fold |
2024-04-23 12:43:42 +0200 | <Inst> | foldl, not foldl' |
2024-04-23 12:44:59 +0200 | tri | (~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 260 seconds) |
2024-04-23 12:45:44 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2024-04-23 12:46:37 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 272 seconds) |
2024-04-23 12:47:56 +0200 | ph88 | (~ph88@ip5b403f30.dynamic.kabel-deutschland.de) |
2024-04-23 12:48:39 +0200 | Lord_of_Life_ | Lord_of_Life |
2024-04-23 12:49:21 +0200 | <ph88> | is there a type class that allows me to take one element of a list/vector/"any other type with multiple inner elements" do something on it and then decide whether to continue to the next or return some result |
2024-04-23 12:49:48 +0200 | <ncf> | traverse with Either |
2024-04-23 12:50:14 +0200 | <ncf> | to answer your earlier question, Err is just Either String so you can copy the Monad instance for Either e |
2024-04-23 12:50:38 +0200 | <ph88> | Yes that worked for Err |
2024-04-23 12:50:58 +0200 | <ncf> | to answer your earlier earlier question, do notation can use Applicative with the ApplicativeDo notation (provided you have the right dependency structure) |
2024-04-23 12:51:02 +0200 | <ph88> | i have this function already https://bpa.st/5LOA i want to make something similar but not for Either but my own type. How do i do that ? |
2024-04-23 12:51:15 +0200 | <ncf> | the ApplicativeDo extension* |
2024-04-23 12:52:18 +0200 | <ncf> | isn't that foldlM? |
2024-04-23 12:52:37 +0200 | <ncf> | or some `coerce`ion thereof |
2024-04-23 12:53:20 +0200 | <ph88> | does foldlM allow to abort early or are you forced to go over all the elements ? |
2024-04-23 12:53:47 +0200 | <ncf> | (note that foldM = foldlM) |
2024-04-23 12:54:02 +0200 | <ncf> | it aborts early if you're in a monad that allows aborting early, like ExceptT e m |
2024-04-23 12:54:18 +0200 | <danse-nr3> | Either allows early quits |
2024-04-23 12:55:07 +0200 | <ph88> | i made my own monad https://bpa.st/QPBA |
2024-04-23 12:55:39 +0200 | <ncf> | foldlEitherM = coerce (foldlM @_ @(ExceptT e m)) |
2024-04-23 12:56:33 +0200 | <ncf> | Result ≃ Either (Either Text Text) |
2024-04-23 12:57:52 +0200 | <ph88> | i don't think this https://bpa.st/5LOA is the same as foldM |
2024-04-23 12:59:24 +0200 | <ncf> | why not? |
2024-04-23 12:59:42 +0200 | <ph88> | hmm actually the type signatures do line up |
2024-04-23 12:59:54 +0200 | <ncf> | well you have to nudge the compiler to see that the monad is ExceptT m e and not just m |
2024-04-23 13:00:22 +0200 | __monty__ | (~toonn@user/toonn) |
2024-04-23 13:00:53 +0200 | <ph88> | ah no they don't line up, i'll make a paste |
2024-04-23 13:03:02 +0200 | <ph88> | https://bpa.st/O5PQ |
2024-04-23 13:03:55 +0200 | rvalue- | (~rvalue@user/rvalue) |
2024-04-23 13:04:35 +0200 | <ph88> | almost though, that's pretty good |
2024-04-23 13:04:40 +0200 | <ncf> | you don't change b, you change m |
2024-04-23 13:04:55 +0200 | <ncf> | (to ExceptT e m) |
2024-04-23 13:05:00 +0200 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 252 seconds) |
2024-04-23 13:05:16 +0200 | <ncf> | (which is isomorphic to m (Either e b)) |
2024-04-23 13:05:32 +0200 | <ph88> | yes that works for Either how can i do something like that for my own monad? https://bpa.st/QPBA |
2024-04-23 13:05:51 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) (Ping timeout: 256 seconds) |
2024-04-23 13:06:06 +0200 | pastly | (~pastly@gateway/tor-sasl/pastly) (Ping timeout: 260 seconds) |
2024-04-23 13:06:11 +0200 | <ncf> | write a ResultT transformer? why not use Either though? |
2024-04-23 13:06:11 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:a472:8995:2c6:603d) |
2024-04-23 13:07:24 +0200 | <ph88> | 1. because the left side is always of the same type and it makes my code cleaner 2. because i need 2 stop conditions, with Either i only have Right, sure i could make (Either Text (Either A B)) but that makes it even uglier. I like descriptive types |
2024-04-23 13:07:48 +0200 | <ph88> | ncf, ok i can try to write a ResultT transformer. I have never wrote a transformer before |
2024-04-23 13:08:18 +0200 | <ncf> | data Failure = ParseFail Text | AnalysisFail Text; type Result = Either Failure |
2024-04-23 13:08:32 +0200 | pastly | (~pastly@gateway/tor-sasl/pastly) |
2024-04-23 13:09:48 +0200 | rvalue- | rvalue |
2024-04-23 13:12:06 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-04-23 13:12:14 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) |
2024-04-23 13:12:36 +0200 | euleritian | (~euleritia@dynamic-176-006-008-103.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-04-23 13:12:53 +0200 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2024-04-23 13:12:56 +0200 | <ph88> | ncf, do you mean like this? https://bpa.st/GJBA |
2024-04-23 13:13:46 +0200 | xff0x | (~xff0x@ai082039.d.east.v6connect.net) |
2024-04-23 13:15:05 +0200 | danse-nr3 | (~danse-nr3@151.35.253.181) (Read error: Connection reset by peer) |
2024-04-23 13:16:10 +0200 | <ncf> | no |
2024-04-23 13:24:32 +0200 | <jackdk> | ph88: writing your own transformer is good practice. https://github.com/qfpl/applied-fp-course/blob/master/bonus/mtl.md may help |
2024-04-23 13:26:38 +0200 | waldo | (~waldo@user/waldo) (Quit: waldo) |
2024-04-23 13:44:25 +0200 | sroso | (~sroso@user/SrOso) (Quit: Leaving :)) |
2024-04-23 13:45:10 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) |
2024-04-23 13:45:27 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) (Remote host closed the connection) |
2024-04-23 13:45:38 +0200 | ystael | (~ystael@user/ystael) |
2024-04-23 13:45:52 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) |
2024-04-23 13:47:13 +0200 | michalz | (~michalz@185.246.207.218) (Ping timeout: 256 seconds) |
2024-04-23 13:47:24 +0200 | michalz_ | (~michalz@185.246.207.215) |
2024-04-23 13:52:22 +0200 | yin | (~yin@user/zero) (Ping timeout: 246 seconds) |
2024-04-23 13:54:27 +0200 | yin | (~yin@user/zero) |
2024-04-23 13:59:20 +0200 | <ph88> | thx |
2024-04-23 14:07:34 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
2024-04-23 14:24:50 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) (Remote host closed the connection) |
2024-04-23 14:26:20 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) |
2024-04-23 14:30:53 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) (Remote host closed the connection) |
2024-04-23 14:31:17 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) |
2024-04-23 14:38:50 +0200 | bitdex_ | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2024-04-23 14:42:28 +0200 | myxokephale | (~myxos@65.28.251.121) |
2024-04-23 14:43:13 +0200 | mei | (~mei@user/mei) (Remote host closed the connection) |
2024-04-23 14:44:30 +0200 | myxos | (~myxos@172.93.132.84) (Ping timeout: 268 seconds) |
2024-04-23 14:44:42 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) (Remote host closed the connection) |
2024-04-23 14:45:06 +0200 | danse-nr3 | (~danse-nr3@151.37.229.99) |
2024-04-23 14:45:37 +0200 | mei | (~mei@user/mei) |
2024-04-23 14:51:34 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 260 seconds) |
2024-04-23 14:53:50 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) |