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

Pages: 1-

The impossible in FP languages

Name: Anonymous 2007-09-12 0:19 ID:ViWN0fiA

a sleep() function.

Name: Anonymous 2007-09-12 0:24 ID:v+IwePFk

FP languages can't do syscalls? I don't know, but if it's true... ugh

Name: Anonymous 2007-09-12 0:29 ID:Heaven

It's not true.

Name: Anonymous 2007-09-12 1:03 ID:2awOEMGI

>>1
This is unneccessary in FPLs. Runtime is irrelevant.

Name: Anonymous 2007-09-12 1:23 ID:GIF/WJ5R

>>1
In almost all dialects of LISP and Scheme:

(sleep n)

In Erlang (courtesy of Tom Armstrong, the language's creator):

timer(Time, Fun) ->
        receive
                cancel ->
                        void
         after Time ->
                        Fun()
         end.

And so it goes...

I'll add to the list of impossible tasks for FP languages: being understood by you.

Name: Anonymous 2007-09-12 1:30 ID:p33xxqG5

Lisp, Scheme and Erlang are not FP languages.

Name: Anonymous 2007-09-12 1:41 ID:tXBMmMXR

Scheme and Erlang aren't functional languages?

How do I troll'd?

Name: Anonymous 2007-09-12 1:49 ID:YVEmmHXX

setTimeout()

Name: Anonymous 2007-09-12 2:24 ID:Heaven

>>7
I can tell by the presence of set! and having seen quite a few functional languages in my time.

Name: Anonymous 2007-09-12 2:28 ID:iaPEYfBD

Erlang is a functional language plus very straightforward non-FP IO to make it useful.

Name: Anonymous 2007-09-12 2:31 ID:iDPiOxnJ

C is a functional language plus very straightforward non-FP IO to make it useful.

Name: Anonymous 2007-09-12 2:44 ID:iaPEYfBD

C is an imperative language plus very brittle IO to make it headache inducing.

Name: Anonymous 2007-09-12 2:47 ID:8k83JhdH

sleep = threadDelay . round . (* 10^6)

Name: Anonymous 2007-09-12 3:21 ID:TC0cZc8j

It's not impossible, it just breaks all the rules

Name: Anonymous 2007-09-12 4:56 ID:5RGLzFGc

This thread delivers

Pure FP languages are mostly useless. That's why you have mixed FP languages where you can get things done. Choose your flavour and percent of FP purity from Erlang, Scheme, Common Lisp, Ruby, Python, Lua, and who knows what else.

Name: Anonymous 2007-09-12 4:58 ID:86H3Hqj7

sleep() is not impossible, just nonsensical. You insist on counting only pure FP (and applied purely, so Haskell + IO() monad is also non-FP by your standards) languages as FP, which by definition makes them not have runtime, and then say "hah, but you can't sleep(), never mind it's inherently specific to runtime! I rawk!".

It's like making a coffee machine that works by synthesising coffee from individual atoms, and then saying that it has one disadvantage, namely that you can't remove lime from it. What you just found is flaw in your reasoning, not flaw in the system.

Name: Anonymous 2009-03-06 8:09


About it I would   call it functional.

Name: Trollbot9000 2009-07-01 8:37


Done with macros in?

Name: Anonymous 2011-02-03 6:04

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