Spektrum_light 2022-08-28 13:41:04
yeah but it’s like i’m too used to pipes, and so on that when I tackle something in say python I say “man I could use diff here, how do I implement it”
wardenunit 2022-08-28 13:41:13
wardenunit 2022-08-28 13:40:47
define dumb in context
then, tell the reason you think you feel dumber
capezotte 2022-08-28 13:42:58
Spektrum_light 2022-08-28 13:34:41
real talk: I feel like making constantly shell scripts has made me both stupider and smarter when it comes to program:
I feel more smart because I am able to “decompose” the problem into smaller problems and compose a smaller program that does big things
I feel dumber because.. I constantly want pipelines, grep, and so on. it’s like I’m too used to grep | sed | whatever
I feel more smart because I am able to “decompose” the problem into smaller problems and compose a smaller program that does big things
I feel dumber because.. I constantly want pipelines, grep, and so on. it’s like I’m too used to grep | sed | whatever
it turned you into a functional programmer
Spektrum_light 2022-08-28 13:43:25
capezotte 2022-08-28 13:42:58
it turned you into a functional programmer
so a functional programmer can’t get things done?
qontinuum 2022-08-28 13:44:35
Spektrum_light 2022-08-28 13:43:25
so a functional programmer can’t get things done?
exactly
Spektrum_light 2022-08-28 13:44:41
good
Rougreh 2022-08-28 13:51:47
are there any functional programmers here
2022-08-28 14:03:07
Rougreh 2022-08-28 13:51:47
are there any functional programmers here
what the fuck is a monad
Rougreh 2022-08-28 14:04:18
I don’t know
2022-08-28 14:09:16
Spektrum_light 2022-08-28 13:41:04
yeah but it’s like i’m too used to pipes, and so on that when I tackle something in say python I say “man I could use diff here, how do I implement it”
A UNIX pipe is just the bind function(>>=)
Spektrum_light 2022-08-28 14:10:43
2022-08-28 14:09:16
A UNIX pipe is just the bind function(>>=)
yes but that is only in haskell
Spektrum_light 2022-08-28 14:10:51
@ work i need to use other langs
Kapsla 2022-08-28 14:11:32
Spektrum_light 2022-08-28 13:41:04
yeah but it’s like i’m too used to pipes, and so on that when I tackle something in say python I say “man I could use diff here, how do I implement it”
you seek the c book
2022-08-28 14:11:58
Spektrum_light 2022-08-28 14:10:43
yes but that is only in haskell
Or |> in Elixir
Kapsla 2022-08-28 14:12:00
Spektrum_light 2022-08-28 14:10:51
@ work i need to use other langs
use function pointers in c
Spektrum_light 2022-08-28 14:12:31
2022-08-28 14:11:58
Or |> in Elixir
wb python
2022-08-28 14:12:42
what the fuck is a python
ReΓΓ©L 2022-08-28 14:12:56
2022-08-28 14:12:42
what the fuck is a python
snake
JD [0/4π] 2022-08-28 14:17:21
2022-08-28 14:12:42
what the fuck is a python
A frend
Rougreh 2022-08-28 14:22:05
2022-08-28 14:11:58
Or |> in Elixir
what about LUA
2022-08-28 14:23:13
Rougreh 2022-08-28 14:22:05
what about LUA
I do not use such “languages”
Rougreh 2022-08-28 14:23:46
“such”?
capezotte 2022-08-28 14:33:52
2022-08-28 14:03:07
what the fuck is a monad
something something monoid endofunctor
capezotte 2022-08-28 14:34:39
idk man i studied computers not math
m3lcore 2022-08-28 15:31:16
capezotte 2022-08-28 14:33:52
something something monoid endofunctor
A monad is a monoid on the category of endofunctors
m3lcore 2022-08-28 15:31:34
Think of it this way: Option<Stuff> has only one possible type
m3lcore 2022-08-28 15:31:39
So it’s a monad
m3lcore 2022-08-28 15:31:43
mono = one
m3lcore 2022-08-28 15:32:25
A Result<Stuff, Stuff_If_Error> has two types, but only one is the real output: Stuff, the other one is a consequence of how it failed
m3lcore 2022-08-28 15:32:45
So it looks like it kinda has one type, but really it can be of different types
m3lcore 2022-08-28 15:32:48
So it’s a monoid
m3lcore 2022-08-28 15:33:29
-oid = looks like
m3lcore 2022-08-28 15:34:12
So an endofunctor => Basically whatever you do with the result. If you process Result<Stuff, Error> the same way you’d process option, it’s a monad
m3lcore 2022-08-28 15:34:57
If you do process things differently depending on the concrete error, then you aren’t exactly dealing with endofunctors, you’re dealing with exofunctors (endo = internal, exo = external)
m3lcore 2022-08-28 15:37:22
Nerdy answer to nerdy question