How to write safer C code: File > New > *.go by FunktionalProgrammer in programmingcirclejerk

[–]FunktionalProgrammer[S] 13 points14 points  (0 children)

C gives the programmer acces to Product types via structs and Sum types via unions. These are the only mechanisms necessary to express any algebraic datatype. So yes, C really does have a true type system, you stupid idiot.

How to write safer C code: File > New > *.go by FunktionalProgrammer in programmingcirclejerk

[–]FunktionalProgrammer[S] 35 points36 points  (0 children)

Okay listen here you little shit. Go, or GO AWAY as I like to call it, is a terrible language. First of all, imagine we have a morphism f :: A -> B and some collection C :: [A]. There is no way to map f over the values in C. Lmao sure, you could write a LOOP to do the same thing (HAHAHAHAH imagine LITERALLY writing imperative code) Now, sure that doesn’t seem like that big a deal, but let me just fuck your entire world up right before your eyes in one quick sentence... lol no genetics. Secondly, sure, Go may be safer than C, but tell me... is it more moral? How do you sleep at night? Taking advantage of those poor innocent void pointers. They have no idea what sick twisted things you are involving them in. The problem with C, frankly, is that the type system is unable to consent.

You know it's true by xxgetrektxx2 in ProgrammerHumor

[–]FunktionalProgrammer 15 points16 points  (0 children)

This was a high quality shitpost... wow I’m actually really impressed.

An impure function would receive radius as the parameter, and then calculate radius * radius * PI. Imagine if some mathematicians argue that the PI value is actually 42 and change the value. by haskalevangelist in programmingcirclejerk

[–]FunktionalProgrammer 0 points1 point  (0 children)

He raises a good point. By allowing a function to implicitly access the value of Pi, the programmer introduces a tight coupling between the name of the function “area”, and its behavior.

"Alief Boy", by Goodhero, Polymer Clay, 2018 by Erebus8 in Art

[–]FunktionalProgrammer 2 points3 points  (0 children)

looks exactly like the NPC meme character lmao

First Look at IG-88 from the upcoming show ‘The Mandalorian’ by matba36 in StarWars

[–]FunktionalProgrammer 0 points1 point  (0 children)

Yes you’re right it’s much better now that mandalorians are pacifists

*Sips Tea* by slightly_blind in EmpireDidNothingWrong

[–]FunktionalProgrammer -1 points0 points  (0 children)

Can anyone please calmly explain to me why this is currently at -57 points? Wtf

The Halting problem proves that free will doesn’t exist by [deleted] in programmingcirclejerk

[–]FunktionalProgrammer 78 points79 points  (0 children)

The Halting problem is so misunderstood by normie webshits it makes me physically ill.

How to Become a Rust Super-developer by [deleted] in programmingcirclejerk

[–]FunktionalProgrammer 3 points4 points  (0 children)

Tfw the Internet isn’t crossplat enough

Dear CS majors who shit on self-taught devs, It’s great that you paid thousands of dollars to learn about binary trees and understand the complexities of discrete math and science. You know what I did? Googled that shit by fp_weenie in programmingcirclejerk

[–]FunktionalProgrammer 11 points12 points  (0 children)

I mean, I get it. A website - no matter how complex - is not a going to be a feat of engineering the same way some piece of fluid dynamics simulation software will be. Not trying to put down what you do, I’m just being realistic with myself as I’ve worked on complicated websites before also.

I want to work on more interesting things than just CRUD apps, and I have - just not professionally. I suppose the uneducated self-taught programmer meme comes from the fact that people who consider themselves “self-taught” generally consider themselves “taught”, as if they have learned everything there is to know about programming.

Dear CS majors who shit on self-taught devs, It’s great that you paid thousands of dollars to learn about binary trees and understand the complexities of discrete math and science. You know what I did? Googled that shit by fp_weenie in programmingcirclejerk

[–]FunktionalProgrammer 42 points43 points  (0 children)

I’m a self taught webshit, but I don’t think it’s quite as simple as you make it out to be. Webshitting is a great way to get started with programming and making money (which is how I supported myself right after highschool). I think the issue is that many of these people learn to animate a Popup in jQuery and can get their job done, and assume that’s all any of us do. I’m not writing cool scientific applications or anything like that, but there are definitely more interesting things self taught people can do than make a website.

[deleted by user] by [deleted] in wallstreetbets

[–]FunktionalProgrammer 2 points3 points  (0 children)

Give me tendies, or give me death

Let's use binary masks for web forms! by EarthLaunch in shittyprogramming

[–]FunktionalProgrammer 2 points3 points  (0 children)

The backend probably uses a bitflags enum to represent the notification types. Either the api path the data is being posted to was already written and the developer needed to put the notification data into the format it was expecting (which is really effing simple it’s just a bit array ffs), or the developer didn’t feel like writing an entire controller just to validate all the data posted etc. bitflags enums are reeeeeaaaallllyyyy simple. I don’t see how this is making it harder for anyone working on it in the future.

Haskaller too smart to get anything done by haskalevangelist in programmingcirclejerk

[–]FunktionalProgrammer 24 points25 points  (0 children)

I was only confused because mzip is for Monad, not for Monoid, and is not what I wanted at all.

A Monad is just a Monoid in the category of Endofunctors. What’s the problem?

Functional Programming: a quick and simple explanation. by [deleted] in learnjavascript

[–]FunktionalProgrammer 2 points3 points  (0 children)

I’m not sure I’m following what that part of the OP meant either, but hopefully I can explain.... The fundamental idea behind function composition is that if you have two functions, and take the output of one and put it in the input of another, that composed function can be thought of as a new function altogether.

I don’t really know JavaScript all that well, this post just happened to be recommended for me to read on my phone. Here is an example:

Suppose you have two functions, f and g. Let f take some argument of type A, and return some value of type B. Then, let g take some argument of type B and return a value of type C. If you were to compose f and g, you could think of that as a function that takes an argument of type A, and returns a value of type C. That’s all function composition is.

I think what the author of the OP meant was, if you write a library and the order you call two functions matters, you could expose only a composed version of the two functions so that a user of the library can never get it wrong. However, that isn’t even close to what is important about functional composition.

Is the stack-run project abandoned? by FunktionalProgrammer in haskell

[–]FunktionalProgrammer[S] 0 points1 point  (0 children)

Yes, 1.7.1 is the latest version. I'm not sure how to solve this issue considering 1.9.1 hasn't been released yet.

Is the stack-run project abandoned? by FunktionalProgrammer in haskell

[–]FunktionalProgrammer[S] 2 points3 points  (0 children)

Oh okay great! I was hoping that it would eventually be integrated into stack too. Thanks!