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

/fpt/ - Functional Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 317
Thread images: 25

File: 1483779495474.png (818KB, 1280x719px) Image search: [Google]
1483779495474.png
818KB, 1280x719px
Functional programming

Resources:
>Erlang
http://learnyousomeerlang.com/content
>>Elixir
http://chimera.labs.oreilly.com/books/1234000001642/index.html
http://elixir-lang.org/learning.html
>F#
http://fsharp.org/learn
>Haskell
https://en.wikibooks.org/wiki/Haskell
https://0x0.st/pbp.pdf
>Lisps
>>Common Lisp
http://gigamonkeys.com/book
http://www.cs.cmu.edu/~dst/LispBook/book.pdf
Paul Graham's ANSI Common Lisp
On Lisp
Common Lisp Recipes
Land of Lisp
>>Clojure
http://www.braveclojure.com/foreword/
The joy of Clojure
>>Scheme
Little Schemer
The Seasoned Schemer
The Scheme Programming Language by Kent Dybvig
Realm of Racket
Lisp in Small Pieces
>OCaml
https://realworldocaml.org/
http://ocaml.org/learn/tutorials/
>Scala
Functional Programming in Scala (Chiusano and Bjarnason)
Atomic Scala (Eckel and Marsh)
Programming Scala (Wampler and Payne)
Programming in Scala (Odersky, Spoon and Venners)
>Web languages
>>Elm
https://guide.elm-lang.org/
>>PureScript
http://www.purescript.org/learn/

>Theory
SICP
Essentials of Programming Languages
Practical Foundations for Programming Languages: http://www.cs.cmu.edu/~rwh/pfpl.html
How to Design Programs: http://www.ccs.neu.edu/home/matthias/HtDP2e/
Art of the Propagator
An Introduction to Functional Programming Through Lambda Calculus
>>
Fucking solid. Thanks! Taking the dive into either Haskell or Common Lisp, I need some time to think about it as I only like to focus on a language at a time.
>>
Which functional programming languages do you use /g/?
Do you study category theory?
>>
>>59453319
Do languages I tried to learn count?
>>
File: smug.png (821KB, 1330x1080px) Image search: [Google]
smug.png
821KB, 1330x1080px
LINQ ought to be enough for anybody.
>>
>>59453433
>muh monads
you make me sick
>>
>>59453380
>tried
What do you mean "tried"?
>>
I use C#.
Sell me on functional programming.
>>
Anyone got experience with Clojurescript?
I was gonna use it for my web thing so I don't have to deal with JS (also, macros might come in handy). I have lots of experience with Racket but no experience with clojurescript, and when I initially tried to set it up it seemed like a hassle and a lot of overhead just for a simple script. Is this true? Is it easier than I think?
Right now I'm regrettably leaning towards typescript because it will compile into a .js file with a single command in a makefile
>>
do we have an IRC?
>>
>>59453380
Do or do not, there is no try
>>
>>59453471
LINQ is FP
>>
>>59453471
It's less boilerplate than OOP. But you have to learn it to judge for yourself.
Also those "if it isn't pure it isn't FP" assholes need to shut up, it's fine to be impure and pragmatic every once in a while.
>>
>>59453516
FP doesn't have to be pure, but pure FP is better
>>
Elixir is just a meme amongst Ruby people right?
>>
>>59453471
1. It's fun.
2. It shows you another way you think about a problem, improving your ability to write oop
3. Its more concise than oop.
4. Its faster than oop.
>>
>>59453487
>>59453516
Learning Clojure is not 'pragmatic' in any sense of the word.
>>
>>59453471
>Sell me on functional programming.
Do you use LINQ?

If yes:
Congratulations, you're already programming with some functional elements.

If not:
You're not using C# correctly.
>>
>>59453508
But if I can use linq for areas that are helped by FP and I don't need to use it otherwise, why would I program in nothing but the FP paradigm? Linq is great but I wouldn't want to use a similar system for everything.

>>59453516
This may be me being a retarded babby but pure FP confuses the shit out of me, the concept of OOP is just much more intuitive and easy to work with.

Falling too deep into ~~~~~~PURE ENCAPSULATION INFINITE INHERITANCE GETTERS AND SETTERS INTO INFINITY~~~~~~~ from java is obviously a waste of time but languages like C# seem to get around that.

>>59453538
Good points, especially 2. Any languages you'd recommend me to start with?
Also, how is 4 true? How could it be any faster post-compile? (or do you mean to write)
>>
>>59453557
try F#, there's a tutorial as a VS project template
>>
Karen, nobody fucking cares, go kill yourself you weaboo scum.
>>
File: ocaml-logo.jpg (7KB, 225x225px) Image search: [Google]
ocaml-logo.jpg
7KB, 225x225px
What is your favorite ML and why?
>>
>>59453557
>Falling too deep into ~~~~~~PURE ENCAPSULATION INFINITE INHERITANCE GETTERS AND SETTERS INTO INFINITY~~~~~~~ from java is obviously a waste of time but languages like C# seem to get around that.

nigga what kinda fucking hypocrite are you
c# encourages encapsulation everywhere
the only thing c# does better in regards to inheritance is methods being final by default, which is still fucking shit
c# encourages getters and setters a lot more than java, properties even worsen a lot of the negative aspects of getters and setters (now it even looks like a member!)
>>
>>59453557
>PURE ENCAPSULATION INFINITE INHERITANCE GETTERS AND SETTERS INTO INFINITY
But that's what OOP is
>>
>>59453572
If F# used enough by developers ? As M$ is more a C#/shitty VB.Net thing. And is it decent compared to haskell ?
>>
>>59453487
I would normally say having a language on top of js is not worth it... but typescript detects type errors, so it seems alright
>>
>>59453615
it's paid well and there are jobs for it, it can interface with C#


>compared to Haskell
it's nowhere near as good
>>
>>59453557
>why would I program in nothing but the FP paradigm?

You wouldn't.
You shouldn't.

C#'s LINQ is the most accessible, useful, makes-sense-in-the-real-world application of functional programming that exists.
>>
>>59453615
Don't use F# if you're complaining about Microsoft.

F# is no less a product of Microsoft than C# is.

Better to move to C and implement your own functional features, because Haskell is a fucking meme and Scala is shit.
>>
>>59453636
go to bed bill
>>
>>59453602
>c# encourages getters and setters a lot more than java, properties even worsen a lot of the negative aspects of getters and setters (now it even looks like a member!)

If you think that
public string myProperty { get; private set; }

accessed with
string foo = other.myProperty;

is just as easy to write and nonbloated as
private String myProperty;

public String getMyProperty(){
return this.myProperty;
}

accessed with
string foo = other.getMyProperty();


then we'll just have to agree to disagree because you won't ever be able to convince me that they are equal in terms of usability
>>
>>59453652
Haskell is great
>>
>>59453658
bill gates doesn't give a shit about C#, and Microsoft was disgusting under his and Ballmer's direction. Nutella may be a pajeet but they're open-sourcing everything these days

there's even rumors that Mono and the full .NET Framework are going to converge and be open sourced
>>
Volunteer OCaml shill reporting in.
>>
File: raw.gif (2MB, 200x200px) Image search: [Google]
raw.gif
2MB, 200x200px
>>59453557
dude, learn FP, I used to hate it but when you grasp it, It will blow your mind.

>mfw finally learned FP
>>
>>59453652
Even though I complain about M$ (calling it M$), I respect their dev tools and C# (but VB.net)

Anyway, why haskell is a fucking meme ?
>>
>>59453669
friend
the problem of getters and setters isn't that it's hard to write them
you fucking autist
>>
>>59453536
Not quite. It's becoming a meme amongst web dev people because Phoenix is a lot saner than the other large web frameworks. They're starting to realize that maybe the object-based approach of Rails and Django isn't the best match for the problem domain. I don't think the really hard core rubyists are in a rush to switch to Elixir. It imposes a lot more discipline on the programmer than Ruby.

I've seen some Erlang devs look into it, too, but Erlang devs are too few to make an impact on the memeosphere.
>>
>>59453729
It's not that they're hard to write, it's that they (specifically within java) bloat the shit out of your files for 0 reason.
There is nothing wrong with accessors.
>>
>>59453729
You're in a FP thread.

90% of their focus is on how succinct it is to write something.
>>
>>59453745
>bloat the shit out of your files
oh no, 0.03 megabytes, whatever will my hard drive do?
>>
File: tmp_20760-1488961674122235878017.png (412KB, 1057x717px) Image search: [Google]
tmp_20760-1488961674122235878017.png
412KB, 1057x717px
>>59453696
>there's even rumors that Mono and the full .NET Framework are going to converge and be open sourced
And what's the profit then?
It's not like I like .NET, but they are alien to any non-Windows environment. What's the point?
Meanwhile, 3 billion devices run Java.
>>
>>59453765
It's less about the size of the file and more about the fact that you either have a big fat tail on your file or you have a bunch of shit in the middle that you have to deal with

3 line getters and setters are ugly, and you can't convince me otherwise. Even if you edit your IDE or text editor to autoformat them as one line, it's still way more than there has to be.

Why are javafags so defensive?
>>
add = (+)

I am doing Functional Programing!
>>
>>59453765
He was clearly not talking about memory, but more on readability/maintainability. Expressing code in fewer line = less error prone and more readable.
>>
>>59453743
Can you explain how web frameworks are sane any way? I usually hack something together myself.
>>
>>59453669
Programming and writing meaningless code are not the same things
>>
>>59453652
>Better to move to C and implement your own functional features
I mean, that's a fine solution if you're a NEET and also barking mad. However, you could also just use OCaml or Standard ML compiled with MLton if you want to avoid Haskell.
>>
>>59453787
>Why are javafags so defensive?
They're used to it. They live in a bloated environment (Eclipse) all day long, writing bloated programs.
>>
>>59453822
>if you want to avoid Haskell
why would you want that?
>>
>>59453745
>There is nothing wrong with accessors.
can you not think of a single reason
ask yourself any of the following questions:
- is it intuitive that an accessor is suddenly very expensive?
- is it intuitive that an accessor changes its api to suddenly throw an exception?
if you can identify something clearly as an accessor as opposed to just a "regular" method, you make fairly strict assumptions about what it does.
these assumptions actually limit the changes you can make to the accessor without caller code unintuitively breaking.
this is worsened with attributes because they completly hide the difference between accessors and members.
>>
>>59453838
I don't know. I thought I'd give a practical suggestion for people who, for whatever reason, consider Haskell "a meme".
>>
File: pow.gif (853KB, 600x338px) Image search: [Google]
pow.gif
853KB, 600x338px
>>59453779
>And what's the profit then?

Look at it this way:

I'm a .NET developer. I started using C# because it looked pretty easy to read and straightforward. I've fallen in love with the language over time, and I've started to really take advantage of the features. I know many libraries that help me actually get shit done and make clients/other stakeholders happy because I produce results.

Recently, I decided I needed some cloud services to move some data and also implement some machine learning/cognitive APIs like image recognition. Azure has 10/10 .NET SDKs for all of their services, so guess which cloud platform I used?

Xamarin is now free and open source. Azure has an all-in-one mobile service package that gives you a backing database, an endpoint, and a push-notification broadcaster and they even wrap a ready-to-go solution file that's configured to work with these services. 15 minutes later, I've got an app debugging on my Android phone that actually pushes data to a user account backed by an Azure Active Directory.

You can love or hate Microsoft, and I know I sound shill as fuck right now, but god DAMN they are making great tools easy to work with.

I'm employed and I nearly exclusively Microsoft on-prem and Azure services. Ask me whatever if you want to know how deep the rabbit hole goes.
>>
>>59453797
>expressing implications with =
fucking normie pleb kill yourself
>>
File: 1485646993138.jpg (41KB, 466x800px) Image search: [Google]
1485646993138.jpg
41KB, 466x800px
>>59453791
congratulations anon-san
>>
>>59453791
>mfw anon does a functional programming
>>
>>59453617
>I would normally say having a language on top of js is not worth it
What do you mean by "not worth it"?
Typescript feels like OOP boilerplate shit right now and I'd like to avoid all of that if I can.
>>
>>59453787
It's not even that. Every get/set is a FUNCTION CALL. That means that, whenever you want a value, a call frame has to be made. It's not just code bloat, it affects performance, even if only marginally.
>>
>>59453883
Replace "=" by "is more likely to be" if you want, or is that too hard for your remaining neuron ?
>>
>>59453934
typescript adds a little sanity into javascript
>>
>>59453944
nigga = is a symbol used for equivalence, not implication
were you implying that less error prone and more readable => Expressing code in fewer lines, huh, you dumb piece of shit human waste?
>neuron ?
go fuck yourself
>>
>>59453940
That wouldn't be a major issue if the reason was only a performance hit of such small scale IMO
>>
>>59453547
Why not?
>>
>>59453989
Okay, replace = by => if that helps you sleep better. I wasn't doing math though, and my sentence was understandable enough. Now shit a little and relax.
>>
>>59454090
i fucking hate shitfucks like you that missuse symbols that have been in use for hundreds of years because your fucking middle school tier math knowledge only taught you the equals symbol
fuck you
kill yourself
>>
>>59453800
A web framework (or a set of web libraries designed to work together) contains a lot of code you'd write every time when building a web application from scratch. If you manage many similar projects (e.g., you are a contractor working for several companies), it makes sense to maintain one framework instead of N instances of similar code.

A good "full-size" web framework made by somebody else distills many hours of its developers' professional experience in building web applications into code. What that means in practice is that it encourages sound architectural decisions and prevents you from making the kind of mistakes its developers made in the past. On top of that you don't have to maintain it yourself and hunt for the tons of minor security issues that are the norm in web development.

A big downside is that most of these frameworks are highly dynamic (even relative to the baseline for their host languages). This makes debugging a pain. Additionally, migrating code from one major release, e.g., Rails to another isn't trivial. This is where Phoenix shines by doing a ton at compile time.
>>
>>59453989
>= is a symbol used for equivalence
Equality is not equivalence you dumbass
>>
>>59453934
the problem is, you now have to manage two languages: javascript and the other. so you program in this lang, then you have to compile to js and then use, that's another dependency, and then you might still need js, e.g. if you are doing tests in the browser console and there is an error it will tell you the line in the js file. Basically you have to learn/use the syntax of two languages. The first language I tried that on was CoffeeScript which is intended to make js shorter, adds syntax sugar and fix some design issues. But is it worth it when I could just use js? I'm using js functions anyway, just writing them in a different syntax. I got meme'd hard.
As for typescript, js being dynamically typed really can lead you into problems, detecting type errors could be a big help and their approach to oop seems sane; defining an interface seems simple enough.
>>
somehow I accidentally deleted my mention of CoffeScript's fucking whitespace rules
>>
>>59454268
OK, fair enough. I think I'll stick to what I'm using.
The point about testing in the browser is a good one - live debugging clojurescript by poking it with javascript is probably a nightmare. Other than that I don't really care about extra languages; I've already got like five (jesus) -- Python, Jinja, SQL, HTML, CSS.

But I'm probably going to end up writing a script that auto generates typescript/javascript code since neither languages have macros...
>>
>>59454268
If you're in this thread, CoffeeScript probably isn't going to do much for you but LiveScript may. Look at http://livescript.net/.
>>
>>59454019
Moreover you can just make them inline to avoid creating the function frame (at least in C++). Hepefully the compiler automatically does this when apropiate.
>>
>>59454342
LiveScript looks like a huge meme, I dislike languages that are primarily flowery syntax and sugar. I write Racket which is mainly about being very straightforward and consistent, rather than being pretty or concise
>>
This is a nice functional library for JavaScript: http://underscorejs.org/
>>
>>59454469
Why would you write a functional library for a non-functional language?
>>
Alright, got faced with an interesting functional programming problem this week, curious about how people here would choose to solve it if they were trying to do it as functionally as possible. So, I wanted to build a function that took a series of files and return as many as possible while the total size is under a certain amount. What would you do?
>>
Someone earlier mentioned category theory being used in functional programming. How is it used?
t. Someone who knows category theory but no programming
>>
File: monads haskell.png (14KB, 1282x118px) Image search: [Google]
monads haskell.png
14KB, 1282x118px
>>59455468
something something monads something something haskell
>>
>>59454164
wow
x = x, check
a = b <=> b = a, check
a = b & b = c => a = c, check
>>
>>59455439
>functional programming problem
no

var muhFiles = Directory.EnumerateFiles(path, "*.*", SearchOption.AllDirectories).Select(x => new FileInfo(x)).Where(x => x.Length < muhSizeInBytes);
>>
>>59455681
>x => new FileInfo(x)
can you not just do
FileInfo
?
>>
>>59455700
It's clearly using the constructor for the
FileInfo
object, thus the new keyword.

You're welcome to write some autistic extension method that will make this line 3 characters shorter.
>>
>>59455681
OOP + FP is a match made in heaven.
>>
>>59455720
every time you write a struct, define a free function
fileInfo = x => new FileInfo(x);

it will be much more readable

>>59455733
There is literally no OOP in that picture, unless you think method notation = OOP
>>
>>59455700
You could do that if
FileInfo()
was a method that accepted a string.

This is an object constructor, though, and an object constructor is not a method.
>>
>>59455753
>every time you write a struct
Excuse me?
>>
>>59455756
>>59455767
Whenever you create a new struct type, write a free floating function that constructs it
>>
>>59455795
>a new struct type
:^)
>>
>>59455753
>There is literally no OOP in that line of code that make use of an object constructor, and no less than two other objects and their static methods
>>
>>59455845
So constructors (aka functions that return something) and method syntax (aka functions that accept an additional hidden parameter) are OOP now?
>>
>>59455879
>constructors (aka functions that return something)
This is incorrect. A constructor is not a function.

>method syntax (aka functions that accept an additional hidden parameter)
You have a fundamental misunderstanding of LINQ and what it actually represents.

This is the last response you'll get until you do some research and ask a question that is based on some understanding of what you're talking about.
>>
>>59455904
>A constructor is not a function
Right, because in your particular language it's different, that means it totally doesn't share almost everything in common with what one would call a function.

>You have a fundamental misunderstanding of LINQ and what it actually represents.
I wasn't talking about LINQ
>>
>>59454059
Because you'll have to hack together everything, even write your own libraries for shit you don't want to be writing libraries for.
>>
>>59453576
u d 1 tlk 2 ! ch
>>
How would one write a compiler for a functional language? Are there other systems than lambda calculi usable for such languages?
>>
>>59456517
What part are you confused about?
>>
>>59456550
The part where I can't really see how I would put functions on the stack when calling or returning them from higher order functions like you would do in imperative languages for example.
>>
>>59456629
What do you mean?
>>
>>59456688
Let's say I have something like (ML syntax)
let f g h = function x -> (g (h x))

Now I do a call to a partial binding, how do I return it?
>>
>>59456517
>other system
A stack.
>>
>>59456719
Create a closure, assuming you haven't inlined the definition and found it fully applied
>>
>>59455681
>>59455439
>as functionally as possible
Okay. Here is how you can do it in Elixir using lazy streams.
defmodule FilesUpToSize do
def get_files(path, size_limit) do
files =
path
|> File.ls!()
|> Enum.sort()
|> Stream.map(& Path.join(path, &1))
|> Stream.map(& {&1, File.stat!(&1)})
|> Stream.filter(fn {_, stat} -> stat.type == :regular end)
total_size =
files
|> Stream.map(fn {_, stat} -> stat.size end)
|> Stream.scan(0, fn size, acc -> acc + size end)
Stream.zip(files, total_size)
|> Stream.take_while(fn {_, ts} -> ts < size_limit end)
|> Stream.map(fn {{filename, _}, _} -> filename end)
|> Enum.to_list()
end
end

FilesUpToSize.get_files("/etc", 10_000)
|> IO.inspect
>>
>>59453523
Pure FP would be better in a stateless universe.
>>
>>59455088
someone might have thought that even in a non-functional language one could make use of some functional things and js is flexible enough
>>
File: haskell quote.png (1MB, 790x960px) Image search: [Google]
haskell quote.png
1MB, 790x960px
>>
How should I go about learning Haskell?
>>
>>59457458
The wikibook
https://en.wikibooks.org/wiki/Haskell
>>
>>59457458
Learn an ML first. It'll be faster that way.
>>
>>59453583
OCaml, best type system of any ML and easier syntax IMO
>>59457524
>Learn an ML first. It'll be faster that way.
I wouldn't say it helped me that much, learning Idris first was really good though
>>
>>59457458
ask questions
receive answers
>>
>>59457532
>learning Idris first was really good though
Not sure if you're serious.
>>
>>59457750
>>59457480
I mean, what do you actually do. I use Python to do all my datascience/ml/webshit and it's all frameworks there, so I don't know how to go about learning new languages by doing something. The only thing I can think of is writing some web scraper in Haskell.
>>
>>59457928
it has exercises
>>
>>59457778
I started learning Haskell and I couldn't make any progress with it. Somehow, I was able to get through the Idris tutorial in a few days and understand it. Things like HKTs were much clearer to understand I guess
>>
JavaScript fully supports FP and I use it all the time. Didn't have to learn the underground all-problems-of-the-world solver hipster language that you guys are using. Come at me.
>>
>>59458515
Haskell/Clojure/Elm/Lisp are cool and all, but don't waste all your energy and time trying to master them, its just not worth it. Stick to popular languages for the long run
>>
File: --314.png (153KB, 324x434px) Image search: [Google]
--314.png
153KB, 324x434px
Sometimes I think all that math behind Haskell is useless and is mentioned only for pretending to be an elite CS major.
>>
>>59458574
>>59458515
>its just not worth it.
How would you know? You said it yourself that you never learned any
>underground all-problems-of-the-world solver hipster language
>>
Which is better, F# or Scala?
>>
>>59458978
Matter of preference. Scala is just plain more powerful than F#. It has a more advanced type system with higher-kinded and structural types. Meanwhile, F# doesn't even implement OCaml's modules. However, Scala is a clusterfuck. It's a Babel of non-orthogonal features. It is complex enough on the surface, and incredibly complex under the hood (read about the whole collections controversy). It has been plagued by long the compile times and problems with IDE support. SBT, despite its name, isn't Simple. F#, on the other hand, _is_ relatively simple. What it can do, it does pretty much without a hitch.
>>
>>59453487
use clojurescript unless you're using obscure/uncommon js libs

Same goes for typescript really; both have irritating interfaces to js modules.
>>
I'm getting into haskell through LYaHFGG (Weird title), but I'm having trouble with compilation of a certain list comprehension... When I copy+paste the comprehension into ghci, it works perfectly, but when I try to load it up using :l tirangle.hs, the compiler yells at me for having unmatched braces....

What am I doing wrong?
>>
File: 1459727985941.png (107KB, 307x307px) Image search: [Google]
1459727985941.png
107KB, 307x307px
>not combining the power of OOP and FP
>>
File: 1489198529694.jpg (13KB, 225x225px) Image search: [Google]
1489198529694.jpg
13KB, 225x225px
I can't get my head to wrap around currying.
So, it's the thing when function returns a function for the second argument with the first argument applied?
Why does it not work then?
sum x = (\y = x + y)
>>
>>59453249
>Little Schemer
>The Seasoned Schemer
>The Scheme Programming Language by Kent Dybvig
>Realm of Racket
>Lisp in Small Pieces
Which one for plebs with 0 programming knowledge?

And which language? I want a very small one,
>>
>>59459785
>FP
>dumb animu poster
It checks out.
>>
>>59459866
Are you going to shit this thread with your autistic "animoo animoo" screeching too?
>>
>>59459509
m8, Install yourself IHaskell and use Jupyter Notebook if you want a proper REPL.
>>
>>5945982
sum x = (\y -> x + y) -- baka[\code]
>>
>>59459822
Nah, currying is about taking a function that takes a tuple as an argument and returns a function that takes an element of that tuple as argument and returns either a function that takes next element of that tuple or the final value if all of the elements have been provided. Fuck, it's too convoluted. Just look at the type:
 curry : ( ('a, 'b, ..., 'n) -> 'y ) -> ( 'a -> 'b -> ... -> 'n -> 'y) 

,which is btw equivalent to ( a ^ b ^ ... ^ n => y) => (a => b => ... => n => y) in logic through the Curry-Howard correspondence.

What you described is partial application I think.
>>
>tfw paid to be a professional OCaml coder
>>
>>59460346
How can my original function be fixed?
>>
>>59460501
I'm jelly
>>
>>59460694
Please?
>>
>>59460694
If you're writing your function in Haskell: lambda functions have an -> in the definition and not an =
>>
>>59460089
>>59461877
Doesn't compile
>>
I decided to take a dive into Scala. The basic syntax is pretty smooth, but the deeper I got the more it's like "WTF?".

I'm not strictly against syntactic suger and no purist by any means, but somehow I feel like Scala would have been better if they didn't implement some features.
I do understand the thougt of a "scalable language" (like Odersky named it), but somehow it feels like Scala is the C++ of the JVM. Some features scare the shit out of me.


Thoughts?
>>
>>59462802
scala is an incredibly complex mess
avoid it at all costs
>>
>>59459838
Realm of Racket or The Little Schemer. If you know some math, go for the latter.
>>
>>59462802
>>59462901
>avoid it at all costs
That's overstating things, but Anon basically is right: Scala is a pretty damn complex mess.
>>
>>59462655
yeah well of course it doesnt because sum already has a definition, try naming it something else
>>
Two words that BTFO functional programming.

Extensibility problem.

BTFO
>>
>>59462802
>Scala is the C++ of the JVM.
You are not alone in thinking this. E.g., https://news.ycombinator.com/item?id=5902808
>>
>>59463546
That's "expression problem", you pleb. Functional solutions include type classes (Haskell, Scala, etc.) and multimethods (Clojure).
>>
>>59463479
summarize x = (\y -> x + y)

> summarize 3 5 7
<interactive>:4:1: error:
• Non type-variable argument in the constraint: Num (t -> t1)
(Use FlexibleContexts to permit this)
• When checking the inferred type
it :: forall t t1. (Num (t -> t1), Num t) => t1

Where did I fuck up now?
>>
>>59464065
it only takes 2 args
>>
>>59464108
But isn't that a sense of currying that a function takes a zillion of arguments?
>>
>>59464065
>>59464108
summarize x = \y -> x + y
summarize x y = x + y
summarize 3 y = 3 + y
(summarize 3) 5 = 3 + 5
but you gave it an extra argument, 7
(summarize 3 5) 7 = (3 + 5) 7
summarize 3 5 7 = 8 7

8 7
7 is being applied to the ""function"" 8
since integer literals can have any Num type, it's telling you that
1) since you apply 7 to it, it must be a function
2) since it's a literal 8, it must be a numeric type

but there isn't a numeric instance (in fact, you probably don't want one), hence the awkward error

the actual problem is you gave it too many args
>>
>>59464135
No, every function takes exactly "one" argument, even if it looks like a function that takes a zillion.
>>
>>59464278
How do I make a function to take a zillion of arguments?
>>
>>59464135
No, the function takes one argument, returning a function that takes another argument. (You can call this a "function taking two arguments")

Num a =>
a -> a -> a

Num a =>
a -> (a -> a)

Currying means the way of writing "two argument functions", is by writing a one argument function that returns another one argument function


>>59464284
This is almost always a dumb idea, but you can do it with type classes.

Just use a list instead.
>>
>>59464284
You don't.
fun:: a -> b -> c -> d

This *looks* like a function that takes 3 arguments, but actually is a function that takes an argument and returns a function that takes an argument and returns a function that takes an argument and returns a value.

I hope I got the number of "function that takes an argument" right.
>>
>>59464330
for all you know, d could be another function
>>
>>59464330
>>59464278
>>59464315

The power of "partly-applied" function is so handy.
>>
>>59464330
>>59464315
Alright, what's the practical use of this?
>>
>>59464420
That >>59464380 is.
It makes the semantics of partial function application really obvious and intuitive.

The practical purpose is pretty much everywhere.
I can have a function that takes 3 arguments, give it the first 2 and pass it as callback to something that only expects a function that takes 1 argument.
(Arguments here being used as if we didn't have currying)
>>
>>59464420
makes the language much simpler
functions take one argument and return one argument
as it should be

you can also do this:

add x y = x + y
-- add = (+)

map (add 3) [1..5]
-- [4 .. 8]
-- add 3 = \y -> 3 + y
>>
>>59464477
> I can have a function that takes 3 arguments, give it the first 2 and pass it as callback to something that only expects a function that takes 1 argument.
That's how?
>>
>>59464420
I'm not a
If you want to apply a function to each member of a list :
map func [1..n]
Now, say that you want to multiply by 2 each member of that list, that would not work because your (*) function takes 2 arguments. Actually it works with currying because (3 *) is a function by itself taking an argument and returning it multiplied by 3.

map (3*) [1..n] --> [3, 6, 9, ..., n*3]
>>
>>59464509
>I'm not a extensive haskell user* however...
>>
>>59464504
Let's do a walkthrough here.
takesCallback :: (a -> b) -> b

ourFun :: c -> d -> a -> b

And then we have some code
work :: c -> d -> b
work x y =
let fun1 = ourFun x
let fun2 = fun1 y
in takesCallback fun1


Now try to derive the type of
 fun1, fun2 
and it should be obvious.
>>
>>59464576
oh whoops, it's
     in takesCallback fun2

typo there.
>>
>>59453249
Let's get some programming challenges going. Here's an easy one: define a function which transposes a matrix of integers.
>>
>>59464592
what's the matrix representation?
>>
>>59464599
let's make it a sparse matrix, so we can represent it in a nice fasion by:
type Matrix = M.Map (Int, Int) Int

which we can transpose:
transpose :: Matrix -> Matrix
transpose = M.mapKey swap
>>
>>59464599
>implying column-major is anything other than a grotesque abomination
>>
>>59464617
type Matrix a = ((Int, Int), Int -> Int -> a)
transpose = swap *** flip
>>
>>59464681
hehe.
Are you around the formal verification side of things?
>>
>>59464065

Haskell auto curries so you don't need to define a lambda.

summarize xy=x+y
add1 = summarize 1
add1 10
=> 11
>>
>>59453249

>Wikibook
Is this really a good book to learn Haskell?
What about Real World Haskell or the myriad of other books on Haskell?
>>
>>59465985
IMHO, if you're searching for a complete and accessible book, the best reference out there is https://0x0.st/pbp.pdf : Haskell from first principles.
>>
>>59465985
The wikibook is good
>>
>This expression +/ can be understood as: "Insert" (/) applied to the function + to produce a list-summing function.
>That is, / is itself a kind of function. It takes one argument, on its left. Both its argument and its result are functions.
Can it be considered functional programming?
Are APL and descendants FP languages?
>>
>>59466773
That's a higher order function.
That's a core element of FP, so it took inspiration, I don't think that alone is enough to be considered FP.
Also sounds like a lot of fun with ambigous parsing there.
>>
>>59466773
Functional elements are present in almost all languages
>>
I think Terry at some point implied that you can't write an interpreter with a functional language.

Assuming I got his complaint right, is he correct about this?
>>
>>59467056
I have no idea what he means by that
>>
>>59467086
I expected this answer. No worries, anon.
>>
>>59467056
What complaint?
At what point?
>>
>>59467236
He was talking about higher languages being at the surface of the ocean and how there's no knowledge of the hardware, yada yada.

I don't know anon.
>>
>>59467299
I want the full speech.
Where can I see that?
>>
>>59468031
I'm going to bed in about 30 minutes so I'm not going to sift through his recent livestreams (I'd start from a week back and work myself up about 5 days).

He had his programming window open and shit so it shouldn't be too difficult to find.
>>
>>59466883
>I don't think that alone is enough to be considered FP.
What are the criteria of FP language?
>>
So lovely little beautiful Lua being Functional : https://github.com/luafun/luafun
>>
>>59469003
No objects or anything that resembles objects.
>>
>>59469080
APL doesn't have objects.
>>
>>59467299
Each language is written for an abstraction of a computer. Even C is made for an ideal "virtual" machine that has absolutely nothing to do with real hardware and how it works.
>>
>>59469239
all the stupid undefined behaviour in C is actually them deciding NOT to go for that.
There's some abstractions in practice, but most of them are from POSIX or the newer standards.
>>
Does anyone here do language-oriented programming and develop compilers in FP languages for your own languages that suit particular tasks the best?
>>
>>59469080
What is OCaml?
>>
>>59467056
No, he is incorrect.
>>
>>59469327
With that stupid question probably multi-paradigm.
>>
>>59469003
Not sure about an agreed upon defintion but I would at least also expect ADTs and pattern matching.
>>
>>59467299
I think only Perl falls into that as it's actually fucking undecidable.
>>
>>59469499
Scripting languages in overall, I'd say.
>>
What Lisp-like lists are bad for?
>>
midnight bump
>>
>>59456812
>>59455439
module Main where

import Control.Monad (filterM, mapM)
import qualified System.Directory as Directory
import qualified System.Posix as Posix
import qualified System.FilePath as FP

getFileSize :: FP.FilePath -> IO Posix.FileOffset
getFileSize path = Posix.fileSize <$> Posix.getFileStatus path

isRegularFile :: FP.FilePath -> IO Bool
isRegularFile path = Posix.isRegularFile <$> Posix.getFileStatus path

getFiles :: FP.FilePath -> IO [FP.FilePath]
getFiles path = do
dl <- Directory.listDirectory path
filterM isRegularFile $ map (\x -> FP.joinPath [path, x]) $ dl


main = do
let dir = "/etc"
max_size = 20000
fl <- getFiles dir
fs <- mapM getFileSize fl
putStrLn $ show $ fmap fst $ takeWhile (\(_, x) -> x < max_size) $
zip fl $ scanl (+) 0 fs
>>
>>59470705
Random access. Immutability. The cons cells are mutable in Scheme, CL, etc.
>>
>>59471431
>putStrLn $ show
print

>a $ b $ c $ d $ x
a . b . c . d $ x
>>
>>59469080
>No objects or anything that resembles objects.
https://en.wiktionary.org/wiki/featherless_biped
>>
>>59471480
Thanks.

module Main where

import Control.Monad (filterM, mapM)
import qualified System.Directory as Directory
import qualified System.Posix as Posix
import qualified System.FilePath as FP

getFileSize :: FP.FilePath -> IO Posix.FileOffset
getFileSize path = Posix.fileSize <$> Posix.getFileStatus path

isRegularFile :: FP.FilePath -> IO Bool
isRegularFile path = Posix.isRegularFile <$> Posix.getFileStatus path

getFiles :: FP.FilePath -> IO [FP.FilePath]
getFiles path = do
dl <- Directory.listDirectory path
filterM isRegularFile $ map (\x -> FP.joinPath [path, x]) $ dl

main = do
let dir = "/etc"
max_size = 20000
fl <- getFiles dir
fs <- mapM getFileSize fl
print . fmap fst . takeWhile ((>) max_size . snd) . zip fl
$ scanl (+) 0 fs
>>
>>59471491
Excuse me?!
>>
i knew it was too early to make an fpt
wait until the holidays
>>
>>59473255
stop bumping this shit thread

sage
>>
>>59473306
rude
>>
>>59473306
Still better than /dpt/.

OP should consider adding jq to his list of languages. It's a beautiful little DSL..
>>
Is there a pastebin on where to start?
>>
>>59474308
Just OP
>>
File: tmp_13857-1489507887663849333185.jpg (195KB, 1216x816px) Image search: [Google]
tmp_13857-1489507887663849333185.jpg
195KB, 1216x816px
>>
>>59475403
Why do Haskell fans see Lisp as Darwin?
>>
>>59473306
shhhhh not everything is a graphics card anon
>>
>>59475403
Who is that woman is Lisp fan row?
>>
>>59476625
>You will immediately cease and not continue to access the site if you are under the age of 18.
>>
>>59453249
But I already use python.
>>
>>59476625
>he has never fapped to Palin
>>
>>59476625
palin?
>>
>>59476671
So?
Born in 1999 are already 18 years old.
>>
>>59476742
>2008 was 9 years ago
By a coincidence, this was the year I started to learn Haskell in.
Fuck I feel old now.
>>
>>59476766
Oh, please explain monad.
>>
>>59476766
>>59477024
More "serious" question : is it needed/helpful to study category theory ?
>>
>>59477024
It's just a monoid in the category of endofunctors.
>>59477068
It would help, since Haskell is full of concepts and terminology borrowed from CT, but it's not necessary to know CT to use Haskell effectively.
>>
>>59476766
>>59477093

And aside from this, would you use haskell as a general scripting language, instead of python for instance ?
>>
>>59477145
No, it's a lot time to waste for a code I don't care about.
>>
>>59454122
symbols are made to be used and abused. harden the fuck up. youd die if you had to do serious maths anyway
>>
>>59457344
>slow

Haskell has the fastest arbitrary precision numbers of any general purpose programming language.
>>
>>59458680
>Sometimes I think all that math behind math is useless and is mentioned only for pretending to be an elite math major.
>>
>>59459509
you cant just write let ... at the top of a haskell file.
just remove the let.
and you probably want to define a main function
>>
>>59453249
In the Theory part, you could add Y combinators : http://mvanier.livejournal.com/2897.html
>>
Funtional programming is just non-math people slowly jerking off category theory instead of pounding it's ass.
>>
>>59478433
>prefers procedural asm spagetti code or gotos in C.
>prefers bloated java objects with getters and setters everywhere thinking that's gewd encapsulation
>>
>>59478476
I prefer math to computers.

Start doing math, fp won't seem so hard anymore.
>>
>>59453249
>Functional Programming in Scala (Chiusano and Bjarnason)

This book took me down a notch. It was my first real intro to fp, still read it every now and then. Highly recommended
>>
Who here
/Introduction to functional programming using haskell by _ Bird/?
>>
>>59478495
If you think the math is what makes fp hard you're wrong. It's actually applying it on real world problems, something you have no experience in
>>
>>59478641
I know that, but doing the math first is better than slogging through a book on a fp language.
>>
>>59478878
You don't need to understand category theory to understand what a fucking monad is though..
>>
>>59478920
But it's never a disadvantage to know it, and you might just need it somedyayay
>>
>>59478944
use it for what, act superior in fp threads because you know what a monoid is?
>>
>>59478976
projecting much?
>>
>>59479166
You're the one trying to start shit, I'm just calling you out for it
>>
>>59479302
I never tried to fight with you bro.

It's all cool, right?
>>
File: elves.jpg (9KB, 275x142px) Image search: [Google]
elves.jpg
9KB, 275x142px
>>59479353
I'm angry

angry about monads
>>
File: 1470324099542.webm (2MB, 480x322px) Image search: [Google]
1470324099542.webm
2MB, 480x322px
>>59479447
>>
>when people try to compare poo-in-loo oop with fp
>>
>>59477486
>implying Haskell is math
>>
File: haskel.png (142KB, 504x533px) Image search: [Google]
haskel.png
142KB, 504x533px
>>
>>59455439

>a function that took a series of files and return as many as possible while the total size is under a certain amount.

Nasty.

The Knapsack problem is NP complete, so if you just use a naive aproach, you could wait pretty long.

If you just want a "good enough" solution, a greedy approximation algorithm would be your best bet. If you want the optimum you should use dynamic programming (tabular method).

No clue wether dynamic programming in a "functional way" would bring any benefits here..
>>
>>59473306
oops.
>>
What functional language is the best for web dev?
>>
>>59482349
Haskell.
>>
>>59482349
Almost any functional language can readily be adapted to web dev
>>
>>59482349
How would you divide usual development and web development?
>>
>>59482349
Lisp.
http://quickdocs.org/search?q=web
>>
>>59482967
+1 for lisp
>>
>>59480265
What's wrong with nested scopes?
Usually you go with 3-4 nested scopes in the worst case.
>>
>>59476671
I'm older than 18 and I'm not a 'murrican.
>>
>>59459509
let is used in the ghci
>>
help
>>
>>59482349
back end: elixir
front end: elm
Enjoy!
>>
>>59485344
post code
>>
>>59474273
What is jq?
>>
>>59482349
Elixir because http://www.phoenixframework.org/. I few years ago I would have said Erlang with Chicago Boss -- http://chicagoboss.org/.

Reasonable alternatives include Clojure (its culture is anti-framework, but there is a shitton of libraries for web stuff), F# because supposedly ASP.NET MVC just works, though I haven't tried it and using it directly will most likely result in OO-heavy code, and Haskell (http://www.yesodweb.com/ ). However, Phoenix is the most mature option. It is the Rails of the FP world.
>>
>>59487067
https://stedolan.github.io/jq/manual/
>>
>>59487681
>A jq program is a “filter”: it takes an input, and produces an output.
Dropped
>>
God damn it it's even worse than what I posted in dpt, Idris is so fucking shit. Theorem proving general programming languages were a mistake. Functional programming was a mistake. We should revert to something like a pure ML.
>>
>>59488889
>Idris is so fucking shit
y?
>>
>>59488889
Lisp.
>>
>>59488889 (You)
>>
>>59488909
Shit metaprogramming.
>>
>>59489975
>needing metapogramming in a dependently typed language
>>
>>59490042
>blub mentality
>>
>>59490100
what?
>>
>>59490113
As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.
>>
>>59490159
>he doesn't realize he is looking up

Why is that, Mr. Storyteller? Is it just some poop used to lubricate your asinine point?

>>>/lgbt/
>>
>>59490159
I think you might be retarded.
Metaprogramming exists to solve flaws within the language.

You can encode almost anything at the type level and statically verify it. It could be better, and so there is metaprogramming (e.g elaborator and type providers), but 99% of what C++ users call "metaprogramming" is basic programming in a decent language
>>
>there are retards ITT who believe metaprogramming is about types
>>
>>59490249
No, metaprogramming is about solving the problems your language has
>>
>>59490277
Through strained means
>>
everyone itt needs to seriously consider suicide
>>
>>59490507
Why?
>>
>>59490516
because you are dysfunctional
>>
>>59490534
but I like Haskell
>>
new /dpt/ >>59490616
>>
>>59490696
since this thread is about to come to a close, it's only barely active

you can always post fp in /dpt/, and ignore the shitposts

i think the main problem is people who don't like /dpt/, so they avoid /dpt/ threads, but don't think similarly about /fpt/
>>
Hey guys, I'm learning Scala functionally. However, I've never really dealt with MySQL and apart of my project requires it. DPT usually isn't very helpful and WDG hasn't helped either.

how can I enforce a constraint on a database value that forces the first three letters to be specific values?

For example, I want phone numbers that are added to start with +xx. Where x are two numbers? Like forcing a country area code to be input. Any tips in the right direction would be appreciated. Cheers
>>
>>59490707
Just fully declare your input like you would BNF or something

data Digit = ...
data CountryCode = ...
data PhoneNum = ...
>>
JS fags wishing they were programming in Haskell
https://medium.com/javascript-inside/an-introduction-into-lenses-in-javascript-e494948d1ea5

Discussion: are lenses better suited for statically typed or dynamically typed languages?
>>
>>59490761
What's the point of lenses in a dynamic language?
>>
File: 1459870215401.png (29KB, 300x300px) Image search: [Google]
1459870215401.png
29KB, 300x300px
Is there something like Modern Compiler implementation in ML, but for Haskell?
>>
>>59491378
You can adapt a lot of ML concepts to Haskell

>fresh variables
Have a wrapped StateT Integer

>context passing
use ReaderT if convenient

>constraint solving
You can emit constraints with Writer, and then delay them to be solved later on
>>
>>59491409
I have already done something very similar to what you mentioned, but I'm not that experienced in both languages to just translate them.

That's what I'll have to do though if I can't find anything good that uses Haskell. There's Write you a Haskell, but it's incomplete.
>>
>>59491431
WRAH is a good start, are you already reasonably familiar with Haskell? If not I'd recommend the wikibook
>>
>>59453249
>Fucking around with Scala instead of using Kotlin
>>
>>59491470
I've already done most of the wikibook.
>>
>>59491509
And WRAH too*
>>
>>59491517
Maybe you could do the ML one then, though row polymorphism (records, variants) could be a problem
>>
Why isn't lisp popular besides parentheses?
>>
>>59492045
Otherwise it would look friendly and boring.
>>
what the hell's the point of functional programming
>>
>>59493559
provably correct programs
academic circlejerk
euphoric beauty in style [tip tip tip m'onad]
>>
>>59490707

Personally I would simply sanitize the input. Just make sure the interface (your Website/API/...) only allows "+00.." numbers and you're fine. If somebody can bypass your user interface and insert values directly you're fucked anyway, so you might as well use your user interface to verify data.

But that's a little bit of a philosophical question here.
>>
>>59453669
is c# better than java?
>>
>>59457458
don't, it's very useless
use f# or lisp
>>
>>59493850
What kind of retardation is this? How can being "useful" or "useless" be a property of a language?
>>
>>59490768
The same reason you use them in a static language. Composable views on objects
>>
>>59491603
In Haskell you mean?
>>
>>59493601
>provably correct programs
How programs are proven to be correct?
>>
>>59453461
He gave up trying
>>
>>59495620
something about no side effects
>>
>>59453249
``Purely Functional Data Structures'' by Chris Okasaki should be added to the theory section.
>>
>>59495721
Not really.
>>
>>59453940
Java or .NET is going to optimize away the function call.

That is something which is very silly to worry about.
>>
File: 148933652378.jpg (139KB, 1280x719px) Image search: [Google]
148933652378.jpg
139KB, 1280x719px
/fpt/ - Functional programming thread

Resources:
>Erlang
http://learnyousomeerlang.com/content
>>Elixir
http://chimera.labs.oreilly.com/books/1234000001642/index.html
http://elixir-lang.org/learning.html
>F#
http://fsharp.org/learn
>Haskell
https://en.wikibooks.org/wiki/Haskell
https://0x0.st/pbp.pdf
>Lisps
>>Common Lisp
http://gigamonkeys.com/book
http://www.cs.cmu.edu/~dst/LispBook/book.pdf
Paul Graham's ANSI Common Lisp
On Lisp
Common Lisp Recipes
Land of Lisp
>>Clojure
http://www.braveclojure.com/foreword/
The joy of Clojure
>>Scheme
Little Schemer
The Seasoned Schemer
The Scheme Programming Language by Kent Dybvig
Realm of Racket
Lisp in Small Pieces
>OCaml
https://realworldocaml.org/
http://ocaml.org/learn/tutorials/
>Scala
Functional Programming in Scala (Chiusano and Bjarnason)
Atomic Scala (Eckel and Marsh)
Programming Scala (Wampler and Payne)
Programming in Scala (Odersky, Spoon and Venners)
>Web languages
>>Elm
https://guide.elm-lang.org/
>>PureScript
http://www.purescript.org/learn/

>Theory
SICP
Essentials of Programming Languages
Practical Foundations for Programming Languages: http://www.cs.cmu.edu/~rwh/pfpl.html
How to Design Programs: http://www.ccs.neu.edu/home/matthias/HtDP2e/
Art of the Propagator
An Introduction to Functional Programming Through Lambda Calculus
Y-combinators: http://mvanier.livejournal.com/2897.html
Purely Functional Data Structures (Chris Okasaki)
>>
File: 1486296847325.jpg (44KB, 450x370px) Image search: [Google]
1486296847325.jpg
44KB, 450x370px
It was a fun thread.
Too bad that there is not enough people to keep thread alive on its own.
Let's have a thread someday again!
>>
>>59496252
Well done. Now the bump limit is lifted. :^)
>>
>>59494640
Yes
Thread posts: 317
Thread images: 25


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.