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

Pages: 1-

Lisp winnage

Name: Anonymous 2007-09-10 0:35 ID:QCxFPARL

wow ok


int x = g(); // have to store
int y = h(); // so that g and h arent called twice
return  f() < x && x < y && y < i();


vs

(< (f) (g) (h) (i))

Name: Anonymous 2007-09-10 0:36 ID:Heaven

>>1
How do you think lisp does it?

Name: Anonymous 2007-09-10 0:38 ID:Heaven

>>1

int compare(int (*)(int, int), int, int, ...);
...

return compare(f(), g(), h(), i());


bye

Name: Anonymous 2007-09-10 0:39 ID:Heaven

>>3
er,

return compare(somecomparisonmethod, f(), g(), h(), i());

Name: Anonymous 2007-09-10 0:39 ID:1vE4HxTW

Yeah, so Lisp can do some rare, out-of-the-way things pretty well. Too bad it can't do anything that actually has any use in the real world.

Name: Anonymous 2007-09-10 0:51 ID:/avzUePo

>>2
It doesn't matter, does it? The point is that the programmer can just write that. And, unlike the C "solution", it works with any number of values.

Name: Anonymous 2007-09-10 0:59 ID:Heaven

>>6
WELL MOTHERFUCKER IF YOU KENW C YOU'D REALIZE WHAT >>3 POSTED WORKS WITH ANY NUMBER OF ``ARGUMENTS'' (WTF, VALUES?)

Name: Anonymous 2007-09-10 1:08 ID:Heaven

>>1,6

< is a function in lisp
What you are doing is passing by value
>>3
'comparison' is a /similar/ function in C
Allows an infinite number of arguments (starting by 2)
You.. fail. learn some programming

Name: Anonymous 2007-09-10 1:35 ID:QCxFPARL

>>3
You can do that in C, have to signal the end of varargs somehow

>>5
yeah, comparing things is rare, lol

>>7
no it doesn't, you cant possible implement that in C

>>8
you fail

Name: Anonymous 2007-09-10 1:40 ID:Heaven

>>9
>>7

no it doesn't, you cant possible implement that in C
*sigh*

Name: Anonymous 2007-09-10 1:42 ID:QCxFPARL

>>10
1) You fail at quoting, lol
2) You dont know C

You cant do variadic functions without knowing either, number of args its going to take at start, e.g. a format string or having some terminator, e.g. NULL

Learn C! lol!

You might not look like such an idiot if you do

Name: Anonymous 2007-09-10 1:49 ID:Heaven

>>11
NULL where varargs expects `int'? i don't think so.

Name: Anonymous 2007-09-10 2:03 ID:Heaven

faggets

Name: Anonymous 2007-09-10 2:23 ID:Heaven


: f ( a b -- a ) over over < if swap drop else drop then ;

Name: Anonymous 2007-09-10 2:38 ID:eFR4LHbI

This thread doesn't show the win of lisp as much as it shows the FAIL of C.

Name: Anonymous 2007-09-10 2:47 ID:S6qltKvN

[BBCPL]
[<,[f],[g],[h],[i]]
[/BBCPL]

clearly, bbcode programming language is just as expert, if not more expert, than lisp.

Name: Anonymous 2007-09-10 2:49 ID:SZYd3Aw8

And now in python.

f() < g() < h() < i()

OH NOW WHAT

Name: Anonymous 2007-09-10 3:36 ID:nO5mR0sI

{ f g h i } [ call ] map dup natural-sort =

Name: Anonymous 2007-09-10 3:40 ID:R4/FW2uD

>>17 THE

Name: Anonymous 2007-09-10 4:48 ID:QCxFPARL

>>17 FORCED

Name: Anonymous 2007-09-10 5:12 ID:eFR4LHbI

>>17 BROKEN

Name: Anonymous 2007-09-10 5:12 ID:eFR4LHbI

>>17 COMBO

Name: Anonymous 2007-09-10 5:16 ID:81eLCo/g

>>17
OF

Name: Anonymous 2007-09-10 6:53 ID:Nqn/T8de

Results of the match:

1. Python
2. Lisp
3. C

Name: Anonymous 2007-09-10 9:21 ID:/avzUePo

>>24
1. Lisp
2. Python

ONE WORD: THE USELESS DUPLICATION OF THE OPERATOR. Thread over.

Name: Anonymous 2007-09-10 9:35 ID:oBCycl64

f() < g() <= h() > i()
lol wut

Name: Anonymous 2007-09-10 11:28 ID:SZH+fbpa

>>25
ONE WORD: THE FACT I AGREE WITH YOU THAT MAKING IT A FUNCTION IS CONCEPTUALLY BETTER AND NOT REALLY LESS INTUITIVE IF YOU'RE NOT STUPID, BUT IT PRODUCES ((((())))) REGARDLESS OF BEING S-EXPRESSIONS OR M-EXPRESSIONS, AND SINCE THIS IS UNDESIRABLE, I MAY WANT TO SPECIFY THE MOST COMMON OPERATIONS SUCH AS + OR < WITH A MORE LIMITED, HACKISH, YET PARENS-FREE INFIX NOTATION THAT WILL MAKE CODE LOOK BETTER AND REQUIRE LESS BRACES MATCHING. Thread over.

Name: Anonymous 2007-09-10 12:24 ID:QCxFPARL

>>27
Thread is actually over.. he said everything.. and all in one word ;_;

Name: Anonymous 2007-09-10 14:18 ID:eFR4LHbI

C: fun();
Lisp: (fun)

OMG TOO MANY PARENS!  (AND C HAS MORE PUNCTUATION ANYWAY!)

Name: Anonymous 2007-09-10 15:30 ID:SZH+fbpa

>>29
Exactly, idiot, I said it in my single-word >>27: just because be it S-expressions or M-expressions it's gonna be full of parens, it'll be a good thing to spare the parens over the most frequently called functions such as + or <.

C: fun(a(c + d) - e(f + g))
Lisp: (fun (- (a (+ c d)) (e (+ f g))))

Name: Anonymous 2007-09-10 15:36 ID:/avzUePo

>>27
But parens is pretty... () () (() ()). Little pearls of code. ^_^

Name: Anonymous 2007-09-10 19:23 ID:Heaven

parentheses make me think of goatse

Name: Anonymous 2007-09-10 20:37 ID:Heaven

>>14
Is it just one guy posting Factor?
Anybody else, ever?

Name: Anonymous 2010-12-06 9:59

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 19:43

Name: Anonymous 2013-03-13 13:01

>>5
Le Reddit is a real world thing.

Name: Anonymous 2013-03-13 13:10

>>24
Python is broken. Have you ever tried to use multithreading on python in a script that will be used across platforms? Like cross platform. Like portable. Liek not SUCK SHITDICKS

Name: Anonymous 2013-03-13 13:10

>>33
I post factor sometimes. Stack base languages are quite cute.

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