[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Functional Programming & Math: General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 34
Thread images: 6
File: Čech cohomology.png (1 MB, 1343x1230) Image search: [Google]
Čech cohomology.png
1 MB, 1343x1230
https://www.haskell.org/
http://www.schemers.org/Documents/#intro-texts
http://www.scala-lang.org/
http://elm-lang.org/
http://miranda.org.uk/
https://www.functionalgeekery.com/
https://clojure.org/
https://en.wikipedia.org/wiki/Category_theory
https://jobs.functionalworks.com/#/job-board
>>
>>54461277
What is reactive programming and how does functional reactive programming relate?
>>
>>54461277
no one does any real programming here. this is a thinly veiled anime image board
>>
F# bestest
thank fuck it isn't getting the SJW attention like haskell/scala
>>
File: notsure.jpg (446 KB, 3200x3200) Image search: [Google]
notsure.jpg
446 KB, 3200x3200
up for some lambada programming eh
>>
>>54462037
Heck yes. Let's do some currying
>>
>>54461277
>tfw having to trawl through an unmaintained project fixing it for GHC 7.10.3

Thank mommy for good typing

>>54461968
It's only a small subset being retarded in the Haskell community. A great majority don't give a shit about that conference "problem" and support the nazifart's free speech.
>>
Is functional programming the greatest meme of our time?
>>
>>54463055
no installing gentoo is
>>
why should I use scheme instead of python?
>>
>>54463750
use python
>>
>he fell for the functional meme
>>
>>54461277
>math
>>>/sci/
>>
>>54463181
/thread
>>
>>54464287

OO is mostly retarded and i don't work in a problem space where i benefit from it's paradigm. so clearly, we should all program in prolog, using the logical paradigm.
>>
>>54463750
Use scheme
>>
>>54464322
it's programming dumbass
>>
>>54461277
>>54462037
google says it's olivia wilde. I don't believe it.
Who is that?
>>
File: dsc3.png (1 MB, 1316x1193) Image search: [Google]
dsc3.png
1 MB, 1316x1193
>>54467304
she is the goddess of functional programming. Here she is wearing the glasses Haskell. She bestows on us all categorical and functional programming knowledge.
>>
File: elixir.png (8 KB, 227x95) Image search: [Google]
elixir.png
8 KB, 227x95
Is this a meme?
>>
File: 1429139562092.jpg (99 KB, 873x1079) Image search: [Google]
1429139562092.jpg
99 KB, 873x1079
>>54463750
Python is terrible for functional programming.
>>
>>54467660
Don't tell him that
>>
File: Screenshot_2016-05-09-18-08-04.png (183 KB, 720x1280) Image search: [Google]
Screenshot_2016-05-09-18-08-04.png
183 KB, 720x1280
I literally have four threads pinned because I always forget to read the threads
pic related
>>
>>54467707
Well it is the truth
>>
>>54467660
This, you should do all your functional programming in Javascript.
>>
>>54468581
Python for imperative programming (has to be done right now)
Javascript for functional programming (has to work)
Java for enterprise programming (has to make money)
>>
>>54467636

Oh well..

I hope Elixir will get big, because it is an amazing idea.

Elixir was made by a Ruby guy who was not happy with some stuff in Rails (especially concurrency). And while Ruby is already a very beatifull langauge, Elixir gives you the additional power of Erlang (it runs the erlang virtual machine).

Erlang might not be just as sylphlike as Haskell, but it's hell of a langauge and very underrated. Whenever you think about distributed / concurrent applications - Erlang is the way to go. For example it has amazing error handling features, to bring erlang down you gotta nuke it from orbit.

But if you are interested in Elixir, I highly advise to master Ruby first, that will give you a better grasp of Elixir (i.e. about best practices or code structure).
Also Erlang is a functional langauge, which means to get the best out of Elixir you should sit down and learn to prgramm in a functional way..


// Ruby
def quicksort(*ary)
return [] if ary.empty?

pivot = ary.delete_at(rand(ary.size))
left, right = ary.partition(&pivot.method(:>))

return *quicksort(*left), pivot, *quicksort(*right)
end

// Erlang
qsort([]) -> [];
qsort([Pivot|T]) -> qsort([X || X <- T, X < Pivot]) ++ [Pivot] ++ qsort([X || X <- T, X >= Pivot]).

// Elixir
defmodule Quicksort do
def sort([]), do: []

def sort([head | rest]) do
{before, after} = Enum.partition(rest, &(&1 < head))
sort(before) ++ [head] ++ sort(after)
end
end
>>
>>54468699
That's a sort, but not a quicksort, senpai. Algorithms mean something.
>>
>>54468802

Last time I checked it was quicksort:

1) Get pivot element
2) Smaller elements to the left side
3) Bigger elements to the right side
4) Repeat with both sides

But you might want to tell me what I'm missing?
>>
>>54469011
quicksort is suppose to sort in place. It more like a quicksort for linked lists
>>
>>54469028

There's differnt opinons about that. See:
>http://stackoverflow.com/questions/22028117/is-quicksort-in-place-or-not
>>
>>54469011
I agree you should call it quicksort, but surely some of them aren't as fast as the iterative implementation.

If you use partition you are acutally reading each element once per call, but if you use list comprehensions you are reading each element twice. It doesn't change the running time asymptotically, but I think it's a bigger issue than in-place non in-place argument.
>>
>>54467304
She's just a random cunt on a website that sells glasses.
>>
>>54469028
>inplace
which you can't really do when you have immutable variables
Thread replies: 34
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.