Functional programming thread

ITT: Share the joys of functional programming.


I'm mainly using it to work with data. It's much faster and cleaner that writing ugly loops. I'm using the R programming language (probably the best to work with data tbh).

Other urls found in this thread:

gnu.org/software/guile//guile.html
github.com/Wysaard/braiell),
github.com/Wysaard/racketfuck);
twitter.com/SFWRedditImages

emacs configuration
elisp
emacs

you're retarded

I wanted to learn FP because I'm a mathematician, so that paradigm is right up my alley. I'm working my way through SICP (currently at streams), so I'm using Racket with the SICP language. Lips is pretty nice to think and write in, but readability of code is rather awkward.

We did functional programming as the first programming course in my uni.
Really weird choice.

no u

What do people think of Guile?

Fellow mathanon here. I did SICP using Racket as well.

I've dabbled in Haskell too.

yeah, ok.

anyone has an idea how to make a program that takes two params, and returns all the characters which were used in the characters strings without showing any character twice while only having the right to use "write" ?

also how do i reproduce strdup

Haskell is how I originally found out about functional programming, but my problem was that all the Haskell books were about teaching Haskell and not FP. Of course that's the whole point of it, but it made following them really hard when the mindset had not yet settled in. SICP actually explained the concept of functional programming, so I am sticking with Scheme for now until I get through SICP.


You want to create a set. How to implement that is left to you as an exercise. Also:
Why on earth would you want to use that? Just get the plugins you want and install them individually, Vim is supposed to be a program you fine-tune to your very own needs. Getting a "just add water" plugin is the wrong way to do it.

gnu.org/software/guile//guile.html
This is what I am asking about.

I wrote the userjs in that makes Holla Forums's filters work like the ones in 4chanx (i.e. not brokenly)

whatever works best for the job

see #2

...

...

How can i learn to type that slow?

Make vidcasts

An excellent book that teaches (functional) programming, that happens to use Haskell as the implementation language is Programming in Haskell by Graham Hutton.

Highly recommended. Although it may start a bit slow as it basically assumes you've never written a line of code in your life.

Thanks for the suggestion, user. I'll add it to my summer list.

Just recently built this Brainfuck->C compiler in haskell (github.com/Wysaard/braiell), and this Brainfuck interpreter in Racket (github.com/Wysaard/racketfuck); criticism would be appreciated

Criticism: go do something useful

like?

Salesforce

Aaaaaaaaaand into the trash functional programming goes

that is honestly pretty impressive
show code

main = do mapM_ print [1,3..99]

Assuming you're the same poster and aren't baiting:

I'm guessing you counted startup time in your retarded example, in which case of course any high-level language is going to have a bigger runtime than fucking C, even imperative ones such as Python or Go.

Haskell is a lazy by default language, which means its performance gains will mostly be felt when doing a lot of operations on huge data sets which have to be streamed.

Haskell isn't made for simple problems, its purpose is making complex problems simple.

kys fp fags

kids these days, they don't bother learning before complaining

Yeah lets sage this thread FP is a shit meme after all and needs no exposure

kys pajeet

It really dosen't need any more exposure. With the ammount of "le functional monads in jabbascript, OOP is literally the worst, 5 Reasons We Chose Hasklel For Our Yelp For Dogs Startup" posts on HN and Medium it's reaching critical mass of faggotry.

elixir/erlang. Still getting the hang of it; modeling states around processes instead of just passing structs like most other FP languages (or classes in OOP) makes it stand out. doing backend programming this seems like a great platform to build a familiarity with. elixir irons out the warts of erlang making it very easy to get into

Flipping burgers for McDonalds

love how assmad fp babbies get when you point out their languages are shit

Troll harder.

For everything, when it makes sense

Java, Python, C, Kotlin, Eralng, GLSL

Just because I can

...