[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: How many of you studied Lambda Calculus?
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: 45
Thread images: 9
File: Haskell.jpg (27 KB, 500x501) Image search: [Google]
Haskell.jpg
27 KB, 500x501
I am learning Haskell from first principles and started studying Lambda Calculus. I'm learning useful features such as currying, beta reductions, etc. Wondering how useful knowing Lambda Calculus will be when I finally dive into Haskell.
>>
you will get a proper mindset by studying Lambda-C
Haskell is hell though, good luck bruh
>>
>>54360906
Thanks brother. I am familiar with mathematical logic, so I'm progressing through my studies in Lambda-C fairly quickly. I've studied recursion theory from computability w.r.t Turing's work but this is the first time I've touched Lambda Calculus. I love this stuff bro.
>>
>>54360867
Haskell doesn't use regular Lambda calculus, it uses System F, which is polymorphic.

>how useful
Not as much as you think. If you want to learn Haskell, then learn it. If you want to learn a theoretical basis for expressing formal computation, then read up on the Lambda calculus.
>>
>>54361039
System F is a lambda calculus.
https://en.wikipedia.org/wiki/System_F

>>
>>
>>54361188
>>54361039
In a work meeting will reply in about 45 minutes.
>>
>>54361202
Oh didn't see that you wrote regular lambda calculus.
I agree completely, System F is not like regular lambda calculus.

>>54360867
OP you should look into STG(Spineless Tagless G-machine) which is one of GHC's IR languages.
>>
>>54360867
> lambda calculus
I had to memorize how to solve this stupid shit to get my CS degree °_° lol
>>
>>54361188
OP here, so regular lambda calculus is applicable to Haskell? What is the purpose of System F (never heard of it).
>>
I did.
Never bothered to learn another functional language aside from Scheme though.

And I don't really see the point in learning the lambda calculus to write in a language like Haskell.
It's not like learning the DTMs will really help you write in typeless imperative languages.
>>
What is a monad?
>>
>>54361549
A monad in X is just a monoid in the category of endofunctors of X, with product x replaced by composition of endofunctors and unit set by the identity endofunctor :^)
>>
>>54361273

>°_° lol

Jesus fucking christ just end this shit board already
>>
>>54361564
Different guy, what is a endofunctor?
What are the arrows between the endofunctors representing?
>>
>>54361610
A endofunctor is just a functor that maps a category to itself :^)
>>
>>54361629
What is a functor?
What is the difference between an endofunctor and an identity mapping?
>>
>>54361777
A functor is a morpism from one category to another category with an inverse morpism :^)
>>
>>54362282
Okay but if an endofunctor is a catogery that maps to itself then how is it different than an identity mapping
>>
Bump for Haskell programmers.
>>
File: X9asA.jpg (72 KB, 800x600) Image search: [Google]
X9asA.jpg
72 KB, 800x600
>>
Also reading same book (first pdf I ever paid for kek) and I'm gonna learn haskell over the summer. The chapter on lambda calculus seemed extremely brief, but I haven't read most of the book, does it get more intense with the notation later? It seemed like it was more for people who've never seen a lambda function before

Also, how does /g/ feel about elm?
>>
>>54364600
What is elm? I heard it never looked into it.
>>
>>54364649

I wasn't going to learn elm until I was comfortable with haskell, since the documentation seems to assume a level of comfort with functional programming. It's a somewhat haskell-like javascript transpiler. I'd like to use it so I can embed my projects and demo them easily

http://elm-lang.org/

Also functional programming seems like a good paradigm for UI design, which would be fun to explore in elm
>>
>>54364827
Cool. I'm learning Haskell for intellectual stimulation and Java for my next class. I'm not too excited about Java and spend more time on Haskell. I'm going to start balancing it out. I really like this book thus far. I feel like it gives you the framework to branch out and learn a lot on your own.

I haven't gotten this far yet, but how do you install everything so you can write/compile Haskell on a mac?
>>
>>54364925

I either used homebrew or downloaded some sort of installation package. it was so undifficult I can't even remember.

getting a really satisfying vim set up as a little bit of a different story though, since most Haskell users seem to prefer Emacs. I think I'm going have to clone my friends fork of a few dead repositories to get a good balance of plug-ins
>>
>>54362282

Now what is a morphism? What is a monoid?

Can you redefine a monad in a way that it can be understood by people who have a standard knowledge of set theory (all CS majors), but not category theory?
>>
>>54365047
Okay cool, I'll look into Homebrew. Never used it (newbie here).

Once I install Homebrew what are the next steps I need to take...?

Do you write the source code in an editor and compile it or is it more complicated?
>>
>>54365414

eh, once homebrew is setup you'd just open a terminal and type brew install haskell-platform and it'll install all the haskell stuff

homebrew is supposed to imitate a linux-style package manager. It does what it can, but since apple won't let you access your actual bin folder (well you can force it to let you but don't try it) it'll never really be one.

I've never used a haskell-specific ide so I'm not sure if they're good or not. I just use a makefile that looks like this:

compile:
ghc -o test first.hs
run:
./test
clean:
rm *.hi *.o test

for each project, and I have a vim leader binding that runs it so I don't have to leave my editor window. Other people like to use cabal on the commandline extensively for testing, idk how to do that yet.

Here is an article on haskell workflow by the guy who wrote your book. My workflow is just based on what I know and probably not the best for haskell.

http://www.stephendiehl.com/posts/vim_haskell.html
>>
>>54365704

well shit. 4chan autoformatted my tabs out of my makefile and now I look like an idiot. whatever, probably better to read the article anyway
>>
>>54365704

also the shorter answer is yea, you can just write your code in a file and compile it from commandline if you want.

ghc -o outputFileName filename.hs
>>
>>54365704

Cool, thanks man. I'll follow the article.
>>
>>54360867

Who is this wife material young lady?
>>
>>54366448
IDK, but I've printed out this pic and came on it twice.
>>
File: 1460917830732.png (236 KB, 494x400) Image search: [Google]
1460917830732.png
236 KB, 494x400
>>54360867
>started studying Lambda Calculus

What resources are you using to learn it? I'd like to learn too
>>
File: image.jpg (26 KB, 500x501) Image search: [Google]
image.jpg
26 KB, 500x501
>>54367817
>>54366448
>>54368053

The first chapter in this text introduces Lambda Calculus: http://haskellbook.com/

In this chapter they reference the following links:

http://www.inf.fu-berlin.de/lehre/WS03/alpi/lambda.pdf

http://www.cse.chalmers.se/research/group/logic/TypesSS05/Extra/geuvers.pdf

http://www.paultaylor.eu/stable/prot.pdf
>>
>>54368701
Thanks
>>
File: 1.png (574 KB, 1546x1498) Image search: [Google]
1.png
574 KB, 1546x1498
>>54368726
No problem, the first chapter in "Haskell Programming" does an excellent job of introducing Lambda Calculus.
>>
File: image.png (840 KB, 1501x1497) Image search: [Google]
image.png
840 KB, 1501x1497
>>54368726
>>
File: tits_n_glass.gif (635 KB, 350x351) Image search: [Google]
tits_n_glass.gif
635 KB, 350x351
>>54368701
>>
File: the_glasses_are_named_Haskell.gif (2 MB, 700x701) Image search: [Google]
the_glasses_are_named_Haskell.gif
2 MB, 700x701
>>54369034
>>
>>54369034
>>54369050
kek
>>
>>54360867
I'm trying to install Haskell on a Mac. None of the tutorials online make any sense.

What is the best and easiest way to do this? What text editor would you recommend?
>>
I don't know how difficult Haskell will be after lambda calculus, but lisp will be a piece of cake. Everything with what a lisp interpreter is doing under the hood how the standard built in functions work and so forth will be straight forward if not on obvious.
>>
File: 4.png (1 MB, 1340x1205) Image search: [Google]
4.png
1 MB, 1340x1205
>>54369600
Thanks man. Excited about it. I am have an entire whiteboard full of Lambda Calculus. My math logic background is helping quite a bit. I could study this independently of any programming language or applicability thereof. Started learning Java on the side for a future class but it seems so bland in comparison.
>>
>>54369050

fucking creepy
Thread replies: 45
Thread images: 9

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.