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

Pages: 1-

Scheme interpreter in Erlang

Name: Anonymous !gNlkr4vCuc 2009-08-06 20:32

I'm going to make a Scheme interpreter this weekend. I'm wondering how I should represent lists: Same as Erlang lists, or one 2-tuple per cons?

Name: Anonymous 2009-08-06 20:35

go for the 2-tuple

Name: Anonymous 2009-08-06 20:37

>>2 is obviously wrong, go for the list

Are you going to make it concurrent?

Name: Anonymous 2009-08-06 20:38

Functional programming languages have no application in the world outside of academia, you know that right?

Name: Anonymous 2009-08-06 20:39

>>4
We do, FV. Have you heard of `fun'?

Name: Anonymous 2009-08-06 20:40

>>3
I thought the fact that I was on /prog/ was indication enough of being a troll, but clearly it wasn't. Or perhaps IHBMT?

Name: Anonymous 2009-08-06 20:41

triply linked lists for efficiency

Name: Anonymous 2009-08-06 20:43

>>5
i don't beleive in your sheepish idea of fun.
i only know enlightenment and despair

Name: Anonymous 2009-08-07 1:02

>>4
Functional programming languages have no application in the world outside of academia, you know that right?
Do you cunts actually believe this?

Name: Anonymous 2009-08-07 1:10

>>9
Nobody here believes it, but it's true. I see you're in denial like everyone else on /prog/

Name: Anonymous 2009-08-07 1:11

>>10
No.

Nr. >>4 probably never got his head wrapped around the functional paradigm. FP is used in many real world applications, and it's smart to use it for problem domains that fit it well. How can someone who doesn't understand something at all see how it would be useful to him?

Name: Anonymous 2009-08-07 1:14

>>11
FP is used in many real world applications
IHBT

Name: Anonymous 2009-08-07 1:21

>>12
No, no you haven't been tro--
sage@ycombinator.com
( ´_ゝ`)

Name: Anonymous 2009-08-07 2:30

>>11
ad hominem response... -10 points

Show examples to back up your claims.

>>10 is right:

If your feet are wet and you can seen the pyramids chances are you are in DeNile.

Name: Anonymous 2009-08-07 2:32

>>14
Show examples to back up your claims
Google IS functional programming.

Name: Anonymous 2009-08-07 6:37

>>14
ad hominem arguments have there place in life.

Name: Anonymous 2009-08-07 6:50

Modern Microprocessor development is heading in a way that benefits Functional Programming and so it even if you don't consider it useful just now, it will become increasingly relevant in the future.

Name: Anonymous 2009-08-07 9:29

>>17
HAHAHA DISREGARD THAT I SUCK COCKS

Name: Anonymous 2009-08-07 10:17

>>14
I have no specific example, but if you cannot think of any problem domain where FP rules, then you must be a troll and IHBT. PROTIP: FP is used in mathematics where functions are real functions.

Name: Anonymous 2009-08-07 10:20

>>19
HYBT? *grabs dick*

Name: Anonymous 2009-08-07 10:21

>>19
Mathematics my dainty petunia. Fortran, the original Very High Level Language, is 100% imperative. And remember, the whole reason it was designed was to write math programs. Try another excuse!

Name: Anonymous 2009-08-07 10:24

VON NOYMAN MACHINES

Name: Anonymous 2009-08-07 10:35

>>21
Fortran ... Very High Level Language
Now I am only beginning to suspect that you are full of shit, whoever you think you are.

Name: Anonymous 2009-08-07 12:02

>>21
Fortran was only useful in the first place because you could write equations in a declarative (rather than procedural) style. The flow control was still 100% holdover from ASM, but with respect to writing equations, it was substantially closer to what FP is all about.

Name: Anonymous 2009-08-07 14:41

You can't do RAII in functional languages. Thread over.

Name: Anonymous 2009-08-07 17:16

bracket, thread resumed.

Name: Anonymous 2009-08-07 18:38

>>26
Failed to resume thread

Retrying...

Name: Anonymous 2009-08-08 1:57

>>25
You can do that in CL, which is a multi-paradigm programming language (allows functional programming too). you have macros like WITH-OPEN-FILE and other WITH-* macros, they take care of opening and closing the file for you, or in more general terms, they allocate the resource when you enter the context of that block of code and de-allocate it when you exit it. This is done by using UNWIND-PROTECT under the hood, which is similar to try{}finally{} in Java/Sepples, but such details are hidden/abstracted away for you by the macro.

Name: Anonymous 2009-08-08 2:23

>>28
I wonder why CL is never used in RAD.

Name: Anonymous 2009-08-08 2:29

>>29
... And C++ is? •_o

Name: Anonymous 2009-08-08 3:06

>>29
Whatever do you mean? RAD is the only kind anybody does in CL.

Name: Anonymous 2011-01-31 20:04

<-- check em dubz

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