2024/11/05

Newest at the top

2024-11-05 17:23:02 +0100 <institor> i agree with merijn
2024-11-05 17:22:51 +0100 <institor> sorry, i don't believe in copy/paste
2024-11-05 17:22:44 +0100 <institor> s/putSTr/putStr
2024-11-05 17:22:40 +0100 <institor> putStr "Enter name: " >> getLine >>= (\name -> putStrLn $ "Hello " ++ name)
2024-11-05 17:22:13 +0100 <merijn> In fact, for educational purposes I would recommend avoiding do notation
2024-11-05 17:22:09 +0100 <institor> desugars to
2024-11-05 17:22:07 +0100 <institor> putStrLn $ "Hello " ++ name
2024-11-05 17:22:00 +0100 <institor> name <- getLine
2024-11-05 17:21:56 +0100 <institor> putSTr "Enter name: "
2024-11-05 17:21:51 +0100 <institor> foo = do
2024-11-05 17:21:47 +0100 <institor> foo :: IO ()
2024-11-05 17:19:25 +0100 <institor> as a synopsis
2024-11-05 17:19:22 +0100 <institor> Leonard26: you would do well to understand how `do` notation desugars into the bind operator
2024-11-05 17:19:02 +0100 <institor> Leonard26: then they are only in scope in `main`
2024-11-05 17:16:09 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2)
2024-11-05 17:11:54 +0100spew(~spew@155.133.15.183) spew
2024-11-05 17:08:55 +0100alexherbo2(~alexherbo@2a02-8440-3311-b70e-c993-5f39-72e6-f3a6.rev.sfr.net) (Remote host closed the connection)
2024-11-05 17:07:49 +0100ZLima12(~zlima12@user/meow/ZLima12) (Ping timeout: 260 seconds)
2024-11-05 17:04:45 +0100merijn(~merijn@77.242.116.146) merijn
2024-11-05 17:04:44 +0100tabaqui(~root@91.73.194.130) tabaqui
2024-11-05 16:59:09 +0100longlongdouble(~longlongd@2405:201:5c16:135:7459:cd00:c885:3805)
2024-11-05 16:58:36 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 272 seconds)
2024-11-05 16:51:34 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-11-05 16:47:57 +0100Smiles(uid551636@id-551636.lymington.irccloud.com) Smiles
2024-11-05 16:45:18 +0100alp(~alp@2001:861:e3d6:8f80:86cd:f9bc:2fcc:950e)
2024-11-05 16:45:02 +0100 <Leonard26> I'll read on about `State` and `ReaderT`, thank you
2024-11-05 16:43:50 +0100 <Leonard26> They are defined in main, row 148 and 156
2024-11-05 16:42:24 +0100 <institor> the names are just not in scope
2024-11-05 16:42:01 +0100 <institor> what are you expecting these to be
2024-11-05 16:41:56 +0100 <institor> on a more concrete level, `source` and `pipeline` simply aren't defined
2024-11-05 16:41:54 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-11-05 16:41:45 +0100 <institor> gtk on windows huh...
2024-11-05 16:41:11 +0100 <geekosaur> and use `StateT`/`ReaderT` to transparently pass it around as needed
2024-11-05 16:40:45 +0100 <geekosaur> there are ways to do it, but we strongly prefer passing them in either `State` or `ReaderT` with a record of the "environment" (if they're mutable, it's `ReaderT Env IO` with `ENV` being a record of `IORef`s)
2024-11-05 16:38:39 +0100 <Leonard26> But in Haskell I can't figure out a way to reproduce this =(
2024-11-05 16:38:38 +0100 <Leonard26> static GstElement *pipeline;
2024-11-05 16:38:38 +0100 <Leonard26> static GstElement *cur_effect;
2024-11-05 16:38:37 +0100 <Leonard26> static GstElement *conv_after;
2024-11-05 16:38:37 +0100 <Leonard26> static GstElement *conv_before;
2024-11-05 16:38:36 +0100 <Leonard26> static GstPad *blockpad;
2024-11-05 16:38:36 +0100 <Leonard26> In C all those variables are defined at the beginning of the code, like so
2024-11-05 16:37:31 +0100alexherbo2(~alexherbo@2a02-8440-3311-b70e-c993-5f39-72e6-f3a6.rev.sfr.net) alexherbo2
2024-11-05 16:36:41 +0100 <Leonard26> And this is the error log
2024-11-05 16:36:40 +0100 <Leonard26> https://paste.tomsmeding.com/0FCFJiGp
2024-11-05 16:36:40 +0100 <Leonard26> This is my haskell code
2024-11-05 16:36:39 +0100 <Leonard26> https://paste.tomsmeding.com/9JN3hbuD
2024-11-05 16:34:50 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Remote host closed the connection)
2024-11-05 16:34:42 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-11-05 16:34:20 +0100 <Leonard26> Mainly pad_probe_cb and event_probe_cb
2024-11-05 16:34:19 +0100 <Leonard26> This is the code I'm trying to reproduce, I managed to get just about everything right but I can't get some variables to work in the functions outside of the main function.