[ / / / / / / / / / / / / / ] [ dir / ausneets / eris / fast / komica / leftpol / leftyb / sw / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): cac1e0a6dfb7704⋯.png (292.94 KB, 1546x1184, 773:592, bullet-dodged.png) (h) (u)

[–]

 No.1005904>>1005932 >>1006071 >>1006157 [Watch Thread][Show All Posts]

Bullet. Fucking. Dodged.

 No.1005923>>1006384

How about...

Guidelines for

Respectful

Intercommunication between

DevOps

Systems


 No.1005932

File (hide): ff70681c25ac5fc⋯.jpg (18.78 KB, 480x270, 16:9, 1984982984.jpg) (h) (u)

>>1005904 (OP)

>cuckmonkey posts on /tech/


 No.1005983

that's just pure phallophobia - fear of CoCks

which is sublimated transphobia, obviously


 No.1005993>>1006049 >>1006066 >>1006075 >>1006384 >>1006497

So is haskell pozzed or not? I want to know if it's worth sinking time into


 No.1006049>>1006065 >>1006387

>>1005993

The "functional programming community" is deeply poz'd.


 No.1006051

I don't understand. I thought they were equivalent.


 No.1006065>>1006067

>>1006049

Every programming """community""" is pozzed but I'm asking if haskell's dev team itself has gone full silicon-valley


 No.1006066>>1006074 >>1006359

>>1005993

If this is important to you what you want to do is maximise age, while minimising academic support. The problem is that a programming language is rarely these things and functional, depending on your definition of the word the following (reasonable languages) come to mind: Common Lisp, Clojure, Erlang, and Ocaml. If you're interested in employment keep in mind that Erlang and Ocaml programmers are primarily employed in Sweden and France respectively while Clojure (less so) and Common Lisp (especially) programmers are primarily employed in the US.


 No.1006067>>1006068

File (hide): f1005a3c1549850⋯.png (31.48 KB, 899x169, 899:169, lmao.png) (h) (u)

>>1006065

never mind lol


 No.1006068

>>1006067

>ugh could some of you fucking MEN just stay home or learn something else


 No.1006071>>1008003

>>1005904 (OP)

>no source

>no greentext

>no meaning

>when you make threads but think you're still on Twitter

If you're too lazy to make a thread properly, damned if I'll waste my time reading it.


 No.1006074>>1006079

>>1006066

Maybe I'm just rationalizing already having spent a month learning haskell to myself, but haskell still looks better than those. It's got a much stronger set of libraries, a clean syntax, and it's statically typed (Ocaml is too though). I hope adopting a code of conduct is just a way of preventing the silicon valley people from attacking them since almost everyone involved in haskell is a white male, and not a sign of the true desires of the dev team. But I suppose as we've seen before if you give these shit-disturbing trannies and inch, they'll take a mile.


 No.1006075>>1006077

>>1005993

>worth sinking time into

It's fun to dip your feet in, but it's very easy to get sucked into its world and only to end up being useless in the "real world."


 No.1006077>>1006078 >>1006083

>>1006075

it's something that looks like a cake, that has cake in it, but that also has shit in it. If you eat the whole cake, you can honestly say that you benefited (part of it was real cake). If you've never seen cake before, and eat very selectively, then it can be a mind-blowing experience for you. Wow! The world has (real) cake in it!

The cake is ML. There's a bit of cake in the purity, and in other bits.

The shit is monads (yes, even though they are used for the purity; you can get purity without them), lazy semantics, pointfree programming, the whole "let's make this shit as visually dense as Perl and as semantically dense as a black hole" community that treats clear, readable code as the mark of a novice, etc.


 No.1006078>>1006112

>>1006077

>but you can do higher higher order programming with monads

in Haskell.

just Haskell.

Do you want to spend a lot of time gitting gud, and then at the end of that time discover that none of your efforts are transportable to any other language? That these difficult walls that you climbed don't even fucking exist anywhere else? Then eat the shit.


 No.1006079>>1006089

>>1006074

I wasn't trying to say these were better languages, just trying to meet anon's needs while being reasonable. They each have something nice about them though, Erlang can't be competed with for making truly fault tolerant systems, Common Lisp has many implementations of a single static standard and simple means to extend the language meaning you can test across implementations, you can write code and be assured it will run in 30 years, and you can easily abstract away boiler plate by making little dsl's, Clojure is really great if you need to access legacy Java code or if you really like the everything is data/a map thing with the same ability to make little dsl's easily like Common Lisp, lastly Ocaml, all I can say is first class modules are really fugging good.


 No.1006083>>1006084 >>1006112

>>1006077

>readable code as the mark of a novice

That's exactly where Haskell goes downhill. You start off with very clean semantics that make sense, and pretty soon you find yourself reading a category book just so you can fit in with the other "wizards" in their collective intellectual masturbation. I much prefer the approach Ada took in uncompromising readability.


 No.1006084

>>1006083

*category theory.


 No.1006089>>1006115

>>1006079

I spent some time reading about erlang thanks to your post, and it looks very interesting and very practical in regards to the concurrency and availability needs of modern public-facing web applications. I think I'm going to give either it or Elixir a shot. Thanks m8


 No.1006112>>1006119 >>1006122

>>1006078

You can use monads in pretty much any language, but pretty much any OO or functional language makes them easy to add. You just might not get special syntax like you have in Haskell for working with them.

>>1006083

>category theory

Category theory is about the structure of mathematics. It makes sense to apply it to the structure of your program and your data. Algebra defines ways data can interact. If mathematicians have done all this work, why shouldn't we use it.


 No.1006115>>1006128

>>1006089

Elixer is much better for that sort of thing, that's why it was made. If you're the anon who really cared about community keep in mind Elixer's community is just Ruby's community.


 No.1006119>>1006149

>>1006112

>you can use monads in any language

but you don't, and it would be stupid, not just ugly. Your mastery of monads is even less meaningful than mastery of a single character in a fighting game. The concepts that you get from Haskell, that aren't just borrowed from better languages that you could learn instead, are useless concepts. It's fake knowledge, born of fake learning. If you knew every detail of Scientology you could at least tell some funny stories about it. Haskell is a product of masochism: let's see how far we can get away with design decisions that we know at the outset are bad and harmful. It turns out, you can get pretty far if a big cult like "language of the year" suicides its members and then its own organization into you.

>but lists are monads

>but option is a monad

>but

but you led with the other argument and not these for a reason.


 No.1006122

>>1006112

Because the mathematics works in the wrong direction. It is easy to observe a system, make names for things, discover isomorphisms, and compose our abstractions into a mathematical model.

It's much harder to go in the reverse, and build a perfect mathematical structure, which then decomposes into real running code. Reality is "ugly" and is hard to translate from abstractions to concrete solutions. The best algebraic model which represents real computation ends up looking like all the popular languages you already know.


 No.1006128>>1006148

>>1006115

Yeah I saw, that but it is what it is I guess. All the good contemporary languages and frameworks nowadays are funded by silicon valley corporations who force this stuff in as a condition for their support. Elixr/Erlang just look a lot more practical for the type of stuff I want to do, I got as far as building a little imageboard in haskell, but it was really painful and took a while for such a simple application. I'll read a book or two on elixr/erlang and mess around with one or the other for a bit to get a better feel for it, but I think they're much more what I want than haskell. Also just looking through some frameworks available for both: erlang has a few web-frameworks like chicagoboss so if you really wanted to avoid the pozz it seems like I could do what I wanted with just erlang


 No.1006136>>1006426

>A monad is just a monoid in the category of endofunctors

The only reason to learn Haskell is to learn why to give up learning something. It's a valuable lesson.


 No.1006148>>1006156 >>1006376

>>1006128

My general advise is: If you're just try to get something done use the tool you know, if you're trying to get lots of things done learn the best tool, and if you're trying to learn something try something unfamiliar. If you're on the fence about it, I'd encourage you to pick your tool based on its individual merits within this framework and not its community. I'd consider Elixer or Clojure the best tool for writing web applications currently, and I don't think you'd regret picking Elixer over Erlang for this task, unless you think there is something you can learn from Erlang that Elixer can't teach you (I don't think there is).


 No.1006149>>1006150

>>1006119

>but you don't, and it would be stupid, not just ugly

People use monads in javascript. See the promise monad.

>Your mastery of monads

What does that even mean? That's like saying mastery of adding two numbers together.


 No.1006150

>>1006149

>replies to post with pre-rebuttal to "but lists", "but option"

>deploy the pre-rebutted argument anyway

Haskell makes you stupid.

>That's like saying mastery of adding two numbers together.

Haskell makes you forget early childhood experience.


 No.1006154>>1006359

Much like the entirety of comparing Haskell with Idris, Monads aren't difficult at all, but uniqueness types are nicer when it comes to composability, learning curve, and clarity. (Idris is also more expressive and correct but it's not really relevant here)


 No.1006156>>1006284

>>1006148

I appreciate the advice, my goal is to learn some useful & fun languages, and build things with them that I can put on my resume so I'm not stuck developing C# & Java enterprise stuff for the rest of my life. That's kind of why I'm leaning a bit more towards erlang, because I'm sure it has more use in business. You're probably right about ignoring the community too, from what I've seen on social media every programming community seems to attract a lot of weirdos (and not the fun kind). Best to just stay away from that stuff


 No.1006157

>>1005904 (OP)

>Chodekikey tries to play off his little vocabulary modification as an "great achievement" and "bullet dodged"

KYS chodekikey

c-c-c-COMBO BREAKER!!!!!!!!


 No.1006284

>>1006156

ah, that's a good reason as well, best of luck anon.


 No.1006297>>1006301 >>1006531 >>1006554

On the topic of Haskell, can someone please explain to me or link an explanation of what a monad is? I have tried looking it up in the past, but if you ask five people you always get twelve different answers.


 No.1006301>>1006335

>>1006297


context fun(int val) {
return printf("%i", val);
}
context monad(context val, function fun) {
return fun(unwrap(val));
}

Monads conceptually are a function that is passed two things: a context and a function which takes a normal value and returns a context. What it does is unwraps the context, apply a function to the unwrapped context (a normal variable), and return a context. a context is the state of the program at a point in time. a unwraped context would be some sort of data, in the case of the pseudo code example a int. The function can do anything to the value, what it does here run a function printf which modifies the program context and returns this aswell as printing to the screen.


 No.1006335>>1006359

>>1006301

So, just a retarded contraption to not admit that functional programming is a joke, right?


 No.1006359>>1006364

>>1006335

As I mentioned here: >>1006154 there are better solutions that exist while maintaining purity, and neither of these things are required for functional programming if you don't want the beneficial properties of purity, for example none of the languages I listed here are pure, and 3/4 are dynamically typed: >>1006066


 No.1006364>>1006373

>>1006359

Purity is a meme, it's only useful for academic fart huffing


 No.1006373

>>1006364

As I mentioned but didn't elaborate purity has some nice properties namely the typical benefits of strong staticly typed languages: better debugability, and abstraction, with guarantees to get the benefits of functional programming: better concurrency, debugability, and abstraction (through composition). You really don't give up that much for it, and especially not once you factor in type inference and/or a system of uniqueness types.


 No.1006376

>>1006148

You can literally call Erlang from Elixir so it shouldn't be a problem.


 No.1006384

>>1005923

kekt

I was going to say "GHC contracts HIV," but I like yours better.

>>1005993

>So is haskell pozzed or not?

Haskell is a language. GHC is a Haskell compiler. GHC is now pozzed.


 No.1006387

>>1006049

read UNQUALIFIED RESERVATIONS


 No.1006426


 No.1006497

>>1005993

It's a complete fucking meme and it's impossible to do anything in Haskell. If you want to learn that kind of bullshit learn straight up ML.


 No.1006531>>1006533

>>1006297

>can someone please explain to me or link an explanation of what a monad

Put simply it's a nested data structure which can be joined into a single data structure of the same type. For example:

- "Maybe Maybe Int" can be joined to be a "Maybe Int"

- "[[Int]]" can be joined to be a "[Int]"

- A computation of computations can just be called a computation

- Promises in javascript let you join nested callbacks so you don't have to indent a billion times

It is an abstraction that lets you get rid of nested stuff.


 No.1006533>>1006536

>>1006531

How does IO fit into this?


 No.1006536

>>1006533

It falls under the computation of computations example I gave. IO is actually the State monad, but the state it's carrying is the RealWorld. In order to do an IO action you essentially need to have the instance of RealWorld. The State monad lets you thread some state between a series of function calls and then return a final value.

This probably wasn't a very good explanation as this was about what the IO monad actually was. If you are programming in Haskell you don't really need to know how it's implemented internally. Feel free to ask more questions though.


 No.1006554>>1006557 >>1006636

File (hide): d1b43e60bc110a7⋯.jpg (115.96 KB, 1516x892, 379:223, trashman.jpg) (h) (u)

>>1006297

A monad is a special type. It's best described by the operations are defined on it:


# Put value `x` in Monad
pure x = Monad x

# Apply function `fn` to `x` when `x` is in Monad
Monad x >>= fn

A monad is an abstraction that encompasses data structures, objects, classes, state machines, timers, file handles, etc. Anything that specifies the way primitive values can be manipulated can be a monad. A chess piece, for example, can be a monad because there are specific positions it can move to. A list is a monad, too, because it links a bunch of values one after another. Monads allow you to define its behavior once and have it run every time your program interacts with it.

It might be beneficial, for example, to say your chess piece can only exist at certain positions by implementing the ``>>='' function:

ChessPieceMonad x >>= fn = if (validPosition (fn x)) then ChessPiece (fn x) else NotAChessPiece

The chess piece can only be accessed by other functions via the ``>>='' operation, so you can make sure certain things are done every time the monadic value is touched. This general idea can be used for doing more complicated, potentially dangerous stuff like logging to a database every time someone logs in to your server.

That's all you should ever know about monads. Don't try to read about it beyond what I wrote here because it's a massive waste of time. It's a lot of pseudointellectual mental masturbation that has never resulted in better software. Haskell is cargo cult bullshit for retards who want to larp as mathematicians.


 No.1006557>>1006570

>>1006554

>Anything that specifies the way primitive values can be manipulated can be a monad

Completely wrong. Also just saying it's a programmable semicolon is missing the point.


 No.1006570>>1006603

>>1006557

Prove it. Show me a way of doing computations on primitives that can't be implemented as a monad.

I'm not saying that's the strict definition of a monad. It's just that the most common/obvious use of monads (e.g., Writer, IO, State) is exactly that.


 No.1006603

>>1006570

You could probably find counter example from the fact that you can't turn Set into a monad since you can't map over it.


 No.1006636>>1006706

>>1006554

The way I understand it, you could have something like this:

x is of type List<string>, and f is a function that takes string and returns List<string>

Then you can do x >>= f to apply f to all elements of x, and combine the resulting List<string>s into a single List<string>. That's the job of the ">>=" operator, which you define yourself.

In this case, the monad is "List".


 No.1006706

>>1006636

I've found it easier when teaching people about monads to talk about join instead of bind. It's easier for them to see the fmap and join as separate operations first.

x >>= f = join $ f <$> x

which is the same as

x >>= f = join (fmap f x)


 No.1007184

>Even the marxism has caught marxism


 No.1008003

>>1006071

Loosely translated:

>i understood everything in the OP just fine, i just can't cope with the fact that "muh functional snowflake language" has been infested with soyfags and trannies




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
54 replies | 3 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / ausneets / eris / fast / komica / leftpol / leftyb / sw / vichan ][ watchlist ]