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

Pages: 1-

Subject

Name: Anonymous 2016-02-10 2:06

Couldn't we just consider every integer to be a function instead of +, -, etc?
That way we do not need special syntax or weird mindfucking prefix notations do just add two integers.
Consider: (1 + (2 * ((3 + 1) + 4))

* and + are just symbols passed into the functions
(could as well be (define + '+)
(define - '-)
)

3 + 1 = 4
4 + 4 = 8
2 * 8 = 16
1 + 16 = 17

Why does no language do this?

Name: Anonymous 2016-02-10 2:33

Read SICP

Name: Anonymous 2016-02-10 3:17

Why does no language do this?

Look at this ignorant fuck who's never heard of Smalltalk.

Name: Anonymous 2016-02-10 3:42

Name: Anonymous 2016-02-10 14:08

Forth does this for real, for the record. An integer literal puts that value on the stack, a variable puts its value on the stack.

Name: Anonymous 2016-02-10 18:26

>>5
You're confused. The Forth stack is called the "parameter stack" for a reason. It does not pass the operators as parameters to the numbers.

Name: Anonymous 2016-02-10 19:37

weird mindfucking prefix notations
Mental midget detected.

Name: Anonymous 2016-02-11 1:31

>>7
Don't you have a clothes line to be swinging from, monkey-boy? It's widely recognized that infix notation is shit. Prefix or go fuck yourself.

Name: Anonymous 2016-02-11 3:41

>>8
widely recognized
by WHOM

Name: Anonymous 2016-02-11 8:56

>>9
All true LISPers.

Name: Anonymous 2016-02-11 16:43

>>9
Anybody who knows anything about how computers actually run high level languages thinks in ASTs. Infix is shit that must be swizzled into proper computational form first, which is equivalent to s-expressions.

Name: Anonymous 2016-02-11 19:03

In a language that supports currying this would be even better and easier.
(define (+ a b) (...))
(define (N op) (op N))

Name: Anonymous 2016-02-11 19:35

>>12
define
def

Name: Anonymous 2016-02-11 19:36

>>8
Peace, sister. We are of the same opinion. Please re-read >>7 under quiet contemplation and be at peace with yourself and your fellow progizens.

Name: Anonymous 2016-02-11 21:58

Anybody who prefers infix has no business programming, for they have not achieved satori. They are thinking biologically, instead of computationally.

Name: Anonymous 2016-02-12 1:54

the only time infix is ever convenient is with functions of two parameters. It is other wise complete and ambiguous shit.

Name: Anonymous 2016-02-15 11:30

>>6
It can if you want to.
: 1 execute ;
2 ' + 1

Name: Anonymous 2016-02-15 13:08

>>16
the only time infix is ever convenient is with functions of two parameters. It is other wise complete and ambiguous shit.

cond1 ? value1 :
cond2 ? value2 :
cond3 ? value3 :
value4

Looks pretty and unambiguous enough to me.

Name: Anonymous 2016-02-15 21:18

>>18
(cond
[cond1 value1]
[cond2 value2]
[cond3 value3]
[#t value4])


Are you even trying?

Name: Anonymous 2016-02-16 1:17

>>16
Really? I thought it was the other way around.

Name: Anonymous 2016-02-16 20:27

>>6
: 1 1 swap execute ; ok
see 1
1
( 004CABB0 8BD3 ) MOV EDX, EBX
( 004CABB2 BB01000000 ) MOV EBX, 00000001
( 004CABB7 FFD2 ) CALL EDX
( 004CABB9 C3 ) NEXT,
( 10 bytes, 4 instructions )
ok
2 ' + 1 . 3 ok
2 ' - 1 . 1 ok

You can modify NUMBER so it will compile to such a function and you'll have it for every number.

Name: Anonymous 2016-02-17 13:20

mov rdi, dubs
call checkem
test eax, eax
jnz err

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