Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

Functional programming

Name: !6r2LZ/AJpU 2005-02-27 6:27

Does anyone here have any experience with functional programming? I've been learning OCaml and Haskell recently, but there are things which are really painful to do with them (interactive programs).

Found a trivial game written in haskell which I bet took months to complete:
http://www24.brinkster.com/srineet/para/para.pdf

I like it though.

Name: Anonymous 2005-02-27 8:12

Don't know if that ever works, some people say once you get used to that paradigm it's wondaful, but either way it'll be slow as hell, that's why I haven't bothered.

Name: Anonymous 2005-02-28 7:54

OCaml is wonderfully quick, if you're referring to execution speed.

Name: Anonymous 2005-02-28 21:01

Functional is good at algorithms, not IO.

Since OCaml can mesh so nicely with C, why not use two languages?

Name: Anonymous 2005-03-01 10:25

>>4

You're convincing me there. Anything that mixes well with C means it's unlimited - whatever you can't do or can't do properly/fast, you do in C. OCaml, I'll give it a try when I have some time.

Name: Christy McJesus !DcbLlAZi7U 2005-03-08 13:53

Lisp. Get Touretzky's book from his website. You'll never look back.

Name: Anonymous 2005-03-08 15:58

ocaml's syntax causes me nightmares =(

Name: Anonymous 2005-03-08 15:58

ocaml's syntax causes me nightmares =(

Name: Christy McJesus !DcbLlAZi7U 2005-03-09 14:46

Lisp doesn't have any syntax. You code in raw s-expressions. You can still have nightmares from it though if your tutor's idea of teaching you is to say "write a program that can play Go. yu0 have 4 weeks."




Bill Teahan needs more death.

Name: Anonymous 2007-06-21 13:10 ID:DT7e0vRB

>>4
that's why multiparadigm programming is so good. When you need to do IO, you write imperatively.

Name: Anonymous 2007-06-21 14:23 ID:sT8kP4qE

>>10
Stop bumping threads you fucktard!

Name: Anonymous 2007-06-21 15:35 ID:lObhGJsF

>>10
signed.  C++, Common Lisp and Scheme FTW.

Name: Anonymous 2007-06-21 15:55 ID:Heaven

Somehow I get the idea that someone just bumped this thread to make the point that he hasn't read SICP.

Name: Anonymous 2007-06-21 16:27 ID:Z5xwF4bf

>>13
Is that relevant to this thread, or is that just your way of saying 'I've read SICP'?

Name: Anonymous 2007-06-21 19:08 ID:Jm79q95N

If you're wondering how interactive programs can be written in functional languages, you really should take a look at xmonad. It's a dwm-style tiling window manager in ~500 lines of Haskell. It had its first release after around a month of development, and at that point it already did things that dwm (written in C) didn't.

Name: Anonymous 2007-06-21 20:07 ID:Nf66BqSZ

>>13
When I first read your post, my thoughts were that you in fact not human, but a chimpanzee that had somehow managed to escape from the animal nuthouse. Upon closer inspection, I came to realize the horrible truth. You are without exception the most pitiful and woeful example of mankind that ever existed. You are the one who puts the 'Homo' in 'Homo sapien'. I am at a loss for words powerful enough to describe your pathetically sub-par intellect and nealithic communication skills, so instead you have forced me to rape and murder several small towns just to block out the extensive amounts of trauma caused by reading your post. I can only hope that this thread does not fall into the hands of more innocent victims, and one day, you will commit suicide in such an horrific manner that it cures some of the readers' trauma.

Name: Anonymous 2007-06-22 0:27 ID:ODTHoI5P

>>15
Sup dons?

Name: Chris Hanssen 2007-06-22 2:47 ID:9N57AW5i

>>17
yeah i am >>16 and dont fuckin do that fuckass dissing me bullshit i9ts fuckin rude, uncalled for and all that and im disgusted with thelack of morals and discipline on this site i remember back in the good old days when you knew everyone and you could take a troll down the forums without having to worry about who is going to flame you and people that are just out to get a cheap fuckin laugh. You could really feel safe back then not like now where no matter what you do and how you act your feelings will be hurt and self esteem lost.
Please try to be nicer to me in the future as I will be reporting this incident to the proper authorites and the administration will be left to deal with the fallout of this dark day in 4chan history

Name: Anonymous 2007-06-22 6:41 ID:PuHWQoBh

there are things which are really painful to do with them (interactive programs).

In the spirit of replying to these ancient posts, here's my take:

interact :: (String -> String) -> IO ()

The interact function takes a function of type String->String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

Name: Anonymous 2007-06-22 8:33 ID:8ZR9fYab

Chris Hanssen is still around in some *chans, I don't remember which one.

Name: Anonymous 2008-06-30 0:17

[quote]quote
quote[/quote]

Name: Anonymous 2009-01-14 4:29

>>1
Its properly called dysfunctional programming.
Real languages just use function calls

Name: Anonymous 2009-03-06 9:49


The professors just called   it Intel because.

Name: Anonymous 2010-02-02 16:52

item1
item2
item3

Name: Anonymous 2010-02-02 16:53

item1item2item3

Name: Anonymous 2010-02-02 16:53

item1item2item3


Name: Anonymous 2010-02-02 16:54


item1
item2item3

Name: Anonymous 2010-02-02 16:56


item1
item2item3

Name: Anonymous 2010-02-02 16:58

item1
item2item3

Name: Anonymous 2010-02-02 16:59

item1
item2
item3
item4

Name: Anonymous 2010-02-02 16:59

item1
item2
item3
item4

Name: Anonymous 2010-02-02 16:59

item1
item2
item3
item4

Name: Anonymous 2010-02-02 17:08

item1
item2
item3
item4


Name: Anonymous 2010-02-02 17:09

item1
item2
item3


Name: Anonymous 2010-02-02 17:10






Name: Anonymous 2010-10-02 19:01

GOAL

Name: Anonymous 2010-10-03 7:19

a > > > >

Name: Anonymous 2010-10-03 7:20

> >

Name: Anonymous 2010-10-03 7:20


>

Name: Anonymous 2010-10-03 7:21




>
>

Name: Anonymous 2010-10-03 7:21

.
,
*
,
.

Name: Anonymous 2010-10-03 7:22

.
,
*
,
.

Name: Anonymous 2010-10-03 7:23


 >
  >
   >

Name: Anonymous 2010-10-03 7:23

w
h
a
t

Name: Anonymous 2010-10-03 7:25


>
>
>
>

Name: Anonymous 2010-10-03 7:25






Name: Anonymous 2010-10-03 7:26



Name: Anonymous 2010-10-03 7:26






Name: Anonymous 2010-10-03 7:27





>

Name: Anonymous 2010-10-03 7:28




>
>

Name: Anonymous 2010-10-03 7:28


[del]

[/del]>

Name: Anonymous 2010-10-03 7:29



>

Name: Anonymous 2010-10-03 7:30





Name: Anonymous 2010-10-03 7:30

[del]

Name: Anonymous 2010-10-03 7:32




Name: Anonymous 2010-10-03 7:33



Name: Anonymous 2010-10-03 7:33



Name: Anonymous 2010-10-03 7:37


>

Name: Anonymous 2010-10-03 7:37


>

Name: Anonymous 2010-10-03 7:38


Name: Anonymous 2010-10-03 7:39

>


Oh my.

Name: Anonymous 2010-10-03 7:44

A
B
C
D

Name: Anonymous 2010-10-03 7:47

A
B
C

Name: Anonymous 2010-10-03 7:48

A
B
C
B
A

Name: Anonymous 2010-10-03 7:48

A
B
C
B

A

Name: Anonymous 2010-10-03 7:48

A
B
C
B

A

Name: Anonymous 2010-10-03 7:49

A
B
C
B

A

Name: Anonymous 2010-10-03 7:50

A
B
C
B
A

Name: Anonymous 2010-10-03 16:04




Name: ​​​​​​​​​​ 2010-10-25 1:59

Name: Anonymous 2011-02-03 1:57

Name: Anonymous 2013-07-17 14:24

q

Name: Anonymous 2013-07-17 14:32

sage

Name: Anonymous 2013-07-17 14:33

sage

Name: Anonymous 2013-07-17 14:33

sage

Name: Anonymous 2013-07-17 14:33

sage

Name: Anonymous 2013-07-17 14:36

^ mad

bump

Name: Anonymous 2013-07-18 1:40

angry bump

Name: Anonymous 2014-02-06 10:54

sussman

Name: Anonymous 2014-02-06 10:55

sussman

Don't change these.
Name: Email:
Entire Thread Thread List