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

Pages: 1-4041-8081-120121-160161-

Closures

Name: Anonymous 2011-05-23 0:34

can someone explain them to me.. I'm thinken they might be simple but my pee sized brain can't comprehend most definitions off of google

Name: Anonymous 2011-05-23 0:39

I don't think pee has a size. Maybe a bucket of pee, but not pee in general.

Name: Anonymous 2011-05-23 0:41

>>1
Arright. We can do this. We'll use Haskell as an example, since I'm more comfortable with it than Lisp, and Javascript is a pain in the ass.

A closure is a data structure that functional languages use to represent a half-called function. It has some of its arguments specified, but not all of them. You can pass it around as an object, and use it as a function, but it still needs more arguments specified before it will actually trigger.

Consider a function called add:


add :: Int -> Int -> Int
add x y = x + y


If you write z = (add 1), then z is now the following function:


z :: Int -> Int
z y = 1 + y


z is a closure of add. This also means that the syntax (add 1) 2 is equivalent to add 1 2.

Name: Anonymous 2011-05-23 0:43

For the record, this has nothing to do with a transitive closure, which is just applying a translation relationship until you produce a closed set.

Name: Anonymous 2011-05-23 0:45

Name: Anonymous 2011-05-23 0:50

>>5
That form of closure is a lot uglier than the nice, simple Haskell kind :<

Name: Anonymous 2011-05-23 1:08

>>3
I think i get it so you set z as a function pointer to add with the first parameter as 1 but insufficient params will not allow it to execute

Name: Anonymous 2011-05-23 1:16

Closures are simple.
Think of a function. Now think about the arguments and local variables. Local variables only exist within the scope of the function, that is, they are defined only within the function itself and lose their value upon exit (or they could be defined within the scope of some inner block). Arguments are similar to the locals, but they are passed from the caller function.
Now imagine you could wrap around a variable binding around the function (be it a named one, a lambda or whatever), the binding would expire when it's out of the context of itself, but within it, you have defined a function (or maybe more), thus this variable should be accessible from within the function. Should it be a global accessible from other functions outside its scope? No, it would be out of scope. What happens if you define a function (like a lambda) within another function, and you access one of the variables within the upper function from the lower function? They form a closure, that is, the inner function holds references to those variables and can change them or access them as it wishes.

In simplest terms, a closure is just some object holding a function (piece of code) and references to some variables, usually local variables defined in a heap. The variables may end up being shared by other pieces of code (such as other functions, closures, etc). The function (piece of code) knows how to access objects closed around it, the compiler takes care of how this is implemented (there are a variety of ways of implementing this, so I'm not going to give specifics, but a simple way of imagining a closure would be an instance of some class with the members being the variables and the only method being the closed over function).

Name: Anonymous 2011-05-23 1:17

>>3
z is a closure of add. This also means that the syntax (add 1) 2 is equivalent to add 1 2.
It also means you can't have &rest, &key and dynamic typing. It also means you have a duplicate functionality (a sign of bad design), which is already handled by lambda.


$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> let fac 1 = 1; fac n = n * (fac n-1)
Prelude> (fac 4)
*** Exception: stack overflow
Prelude>

Name: Anonymous 2011-05-23 1:25

>>9
Nice parenthesis usage.
GHCi, version 7.0.1.20101209: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> let fac 1 = 1; fac n = n * (fac [u][o](n - 1)[/o][/u])
Prelude> (fac 4)
24
Prelude>

Name: Anonymous 2011-05-23 1:26

aaaaaaaaaaaah noooooo
GHCi, version 7.0.1.20101209: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> let fac 1 = 1; fac n = n * (fac [o][u](n - 1)[/u][/o])
Prelude> (fac 4)
24
Prelude>

Name: Anonymous 2011-05-23 1:29

>>10
In my Lisp DSL, fac 1 -> 1; fac N -> N * (fac N-1) works nicely, but haskell's syntax is horrible illogical mess at best.

Name: Anonymous 2011-05-23 1:31

now I just give up.

You need parenthesis around (n - 1). That's just how it works. As a lisper you should already be comfortable with Lots of Idiotic Superfluous Parentheses!

>>7 That's the idea, yeah. Now, the grown-up version of closures used in other languages has it so that you freeze functions in place with access to all of the variables they could get at when they were first made into a closure. If dynamic scope is used, this can have a lot of consequences.

Name: Anonymous 2011-05-23 1:44

>>13
As a lisper you should already be comfortable with Lots of Idiotic Superfluous Parentheses!
Lisp's parentheses follow simple, logical rules.

Name: Anonymous 2011-05-23 1:48

>>14

So do Haskell's. You just need to use real (+) operators, and you can S-express yourself to your heart's content.

Name: Anonymous 2011-05-23 2:14

>>15
Sometimes, you’re on a team, and you’re busy banging out the code, and somebody comes up to your desk, coffee mug in hand, and starts rattling on about how if you use multi-threaded COM apartments, your app will be 34% sparklier, and it’s not even that hard, because he’s written a bunch of templates, and all you have to do is multiply-inherit from 17 of his templates, each taking an average of 4 arguments, and you barely even have to write the body of the function. It’s just a gigantic list of multiple-inheritance from different classes and hey, presto, multi-apartment threaded COM. And your eyes are swimming, and you have no friggin’ idea what this frigtard is talking about, but he just won’t go away, and even if he does go away, he’s just going back into his office to write more of his clever classes constructed entirely from multiple inheritance from templates, without a single implementation body at all, and it’s going to crash like crazy and you’re going to get paged at night to come in and try to figure it out because he’ll be at some goddamn “Design Patterns” meetup.

Name: Anonymous 2011-05-23 2:38

>>16
I agree completely. Sadly? This is how most code monkeys perceive functional programming.

Name: Anonymous 2011-05-23 2:45

>>9
It also means you have a duplicate functionality (a sign of bad design), which is already handled by lambda.
Aren't you an idiot? Do you know what a curried function is?

Name: Anonymous 2011-05-23 2:51

>>18

(lambda (x) (+ x 1))

Name: Anonymous 2011-05-23 2:51

>>17
C++ templates are functional. Just look at STL.

Name: Anonymous 2011-05-23 2:52

It needs to be said very firmly that LISP is not a functional language at all. My suspicion is that the success of Lisp set back the development of a properly functional style of programming by at least ten years. -- David Turner, inventor of Miranda

Name: Anonymous 2011-05-23 3:14

>>21
No shit, sherlock. It's a multiparadigm language. And functional programming alone is not a silver bullet. Don't perceive it as such.

Name: Anonymous 2011-05-23 3:48

the success of Lisp
Does not compute.

Name: Anonymous 2011-05-23 4:00

>>19
That's partial application.

Name: Anonymous 2011-05-23 4:02

>>24
Haskells (+ 1) is partial application.

Name: Anonymous 2011-05-23 4:05

>>25
It's not. (+) is a curried function.

Name: Anonymous 2011-05-23 4:05

Lisp:

$ sbcl
This is SBCL 1.0.11.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>;.

* +3
3
*


Haskell:

$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> +3
<interactive>:1:0: parse error on input `+'
Prelude>

Name: Anonymous 2011-05-23 4:06

>>27
God, you really are a moron.

Name: Anonymous 2011-05-23 4:06

curried function = partial application

Name: Anonymous 2011-05-23 4:06

>>29
No.

Name: Anonymous 2011-05-23 4:09

http://en.wikipedia.org/wiki/Currying
currying is the technique of transforming a function that takes multiple arguments in such a way that it can be called with a single argument (partial application)

Name: Anonymous 2011-05-23 4:11

>>28
God
better being a moron, than believing in God and using Haskell.

http://en.wikipedia.org/wiki/Simon_Peyton_Jones
>married to Dorothy, a priest in the Church of England

Name: Anonymous 2011-05-23 4:21

>>31
(define (f x y z) (+ x (- y z))
(define f-curried ((curry f) 2))
(define f-partially-applied (papply f 2))

(f-curried 3 4) ; should be an error
((f-curried 3) 4) ; ok
(f-partially-applied 3 4) ; ok
((f-partially-applied 3) 4) ; should be an error

(curry f) ≡ (lambda (x) (lambda (y) (lambda (z) (f x y z))))
(papply f . a) ≡ (lambda b (apply f (append a b)))


In Lisp:
(defun f (x y z) (+ x (- y z)))
(setf (symbol-function 'f-curried) (funcall (curry f) 2))
(setf (symbol-function 'f-partially-applied) (papply f 2))

(f-curried 3 4) ; error
(funcall (f-curried 3) 4) ; ok
(f-partially-applied 3 4) ; ok
(funcall (f-partially-applied 3) 4) ; error


Haskell's functions all take only one argument. Functions with multiple arity are curried, they return a function that takes the other arguments.

From the page you just linked: http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application
From Partial Application: http://en.wikipedia.org/wiki/Partial_application#Definitions

Name: Anonymous 2011-05-23 4:23

>>32
I don't use Haskell, it disgusts me. I don't believe in God, but I don't shove my ``atheism'' down the throat of everyone. Even if I was a religious Haskeller, that wouldn't make you any less ignorant.

Name: Anonymous 2011-05-23 4:26

>>33
You neglect to mention that Haskell will never leave academic circles.

In other words, it's a SHIT language.

Name: Anonymous 2011-05-23 4:28

>>35
Who cares about Haskell.

Name: Anonymous 2011-05-23 4:29

>>33
Practical difference is insignificant and nobody cares about useless haskell theory.

) ≡ (
wut?

>>34
Ignorance of Haskell is bliss, because if you're interested in statically typed language, something is wrong with you.

Name: Anonymous 2011-05-23 4:31

>>35
Also, enjoy defining switch as ``multiple ifs''.

Name: Anonymous 2011-05-23 4:32

Also, being ignorant of Haskell (misusing concepts and confusing syntax) is a way to demonstrate that Haskell is too hard learn and easy to get wrong.

Name: Anonymous 2011-05-23 4:34

>>37
It's not Haskell theory, they are two different things, whose general use usually overlaps.

wut?
Learn to Unicode, or you don't use it because it has Jewish characters in it?

Ignorance of Haskell is bliss, because if you're interested in statically typed language, something is wrong with you.
No, you're ignorant in general.

Name: Anonymous 2011-05-23 4:34

http://en.wikipedia.org/wiki/POP-2
An interesting operation on functions was partial application, (sometimes referred to as "currying")

Name: Anonymous 2011-05-23 4:35

>>41
Wikipedia is full of shit, that's something new.

Name: Anonymous 2011-05-23 4:36

>>40
No, you're ignorant in general.
I know Lisp. Other languages are so mediocre, that there is no shame being ignorant of them.

Name: Anonymous 2011-05-23 4:36

>>42
Nope. Haskell is just to hard.

Name: Anonymous 2011-05-23 4:37

>>43
It's not about languages, it's about you being ignorant. Using Lisp doesn't make you a genius.

Name: Anonymous 2011-05-23 4:37

>>44
Curry and papply are not Haskell.

Name: Anonymous 2011-05-23 4:38

>>46
C++?

Name: Anonymous 2011-05-23 4:39

>>47
No, they are not any language. You ignorance is showing.

Name: Anonymous 2011-05-23 4:40

>>45
But we're talking about language (haskell in particular)!

Name: Anonymous 2011-05-23 4:40

>>48
Then they're useless.

Name: Anonymous 2011-05-23 4:41

>>49
No, we're talking about you and how stupid you are.

Name: Anonymous 2011-05-23 4:41

>>50
You use partial application everyday.

Name: Anonymous 2011-05-23 4:41

>>51
Better being stupid, than brainwashed with Haskell.

Name: Anonymous 2011-05-23 4:42

>>53
I don't use Haskell.

Name: Anonymous 2011-05-23 4:42

>>52
You see the works of God everywhere!

Name: Anonymous 2011-05-23 4:43

>>54
You know Haskell and proud of it. That's enough to condemn you.

Name: Anonymous 2011-05-23 4:44

>>55
The only things you can say are God, Haskell, C++ and Jewish? Lisp is as jewish as Haskell, lambda comes from the jewish lambda calculus.

Name: Anonymous 2011-05-23 4:45

>>56
I know Haskell and it disgusts me, I have a reason to not like it, because I know what I don't like. You still are ignorant.

Name: Anonymous 2011-05-23 4:46

>>57
lambda comes from the jewish lambda calculus.
Right. We should rename `lambda` to `fn` (for funarg).

Name: Anonymous 2011-05-23 4:48

>>59
The ``anonymous function'' concept comes from the jewish lambda calculus, any language with anonymous functions and first-class functions is jewish. Stop using Lisp.

Name: Anonymous 2011-05-23 4:49

>>58
Why bother learning Haskell, when wiki article says it's statically typed? Static typing is a reason enough to hate anything outright.

Name: Anonymous 2011-05-23 4:50

>>61
CL is statically typed. It has type annotations, and typed vectors.

Name: Anonymous 2011-05-23 4:51

>>60
Who cates about concepts and theory? In practice we call `lambda` a concrete block of code in compiler, that handles (lambda ...) form.

Name: Anonymous 2011-05-23 4:52

>>62
They're optional.

Name: Anonymous 2011-05-23 4:52

>>63
It still comes from the jewish lambda calculus, Lisp is jewish. It also requires infinite memory, which is also jewish. It is also statically typed, it has type annotations and typed vectors. Lisp is jewish, stop using it.

Name: Anonymous 2011-05-23 4:53

http://en.wikipedia.org/wiki/Common_lisp
Typing discipline dynamic, strong

Name: Anonymous 2011-05-23 4:53

>>64
They are there. Enjoy your jewish language while you suck some jew's dick.

Name: Anonymous 2011-05-23 4:53

>>65
define "lambda calculus"

Name: Anonymous 2011-05-23 4:54

>>66
Being strongly typed means that types are enforced on you, which means that it is really statically typed. Enjoy your jewish language while you suck some jew's dick.

Name: Anonymous 2011-05-23 4:54

>>69
define "types"

Name: Anonymous 2011-05-23 4:55

>>68
Jewish monopoly. Everything anonymous functions and first-class functions are there because of the jewish monopoly. Enjoy your Lisp being jewish.

Name: Anonymous 2011-05-23 4:56

>>70
This is SBCL 1.0.48, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>;.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (type-of 2)

(INTEGER 0 536870911)

Name: Anonymous 2011-05-23 4:57

>>71
define "being jewish"

Name: Anonymous 2011-05-23 4:57

>>70
http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_t.htm#type_specifier
type n. 1. a set of objects, usually with common structure, behavior, or purpose. (Note that the expression ``X is of type Sa'' naturally implies that ``X is of type Sb'' if Sa is a subtype of Sb.) 2. (immediately following the name of a type) a subtype of that type. ``The type vector is an array type.''

Lisp is jewish, enjoy your jewish language.

Name: Anonymous 2011-05-23 4:57

>>72
So, where is the definition of "type"?

Name: Anonymous 2011-05-23 4:58

>>73
Lisp.

Name: Anonymous 2011-05-23 4:58

>>75
At >>74

Name: Anonymous 2011-05-23 4:58

>>74
define "a set of objects"

Name: Anonymous 2011-05-23 4:59

>>78
It's all about the set theory you hate so much, which is jewish, Lisp is jewish.

Name: Anonymous 2011-05-23 4:59

>>77
define "a set of objects"

>>76
justify.

Name: Anonymous 2011-05-23 4:59

>>79
define "set theory"

Name: Anonymous 2011-05-23 5:00

>>80
define "a set of objects"
>>79
justify.
Lisp is jewish because it is statically typed and has first-class functions and anonymous functions. Also, CLOS has classes which come from the jewish set theory. Lisp is jewish.

Name: Anonymous 2011-05-23 5:00

>>81
Jewish monopoly.

Name: Anonymous 2011-05-23 5:01

Name: Anonymous 2011-05-23 5:01

Name: Anonymous 2011-05-23 5:01

>>83
define "Jewish monopoly"

Name: Anonymous 2011-05-23 5:02

>>86
You all jewish maggots that suck your jewish master's dick.

Name: Anonymous 2011-05-23 5:03

Lisp: reduce
Haskell: fold, foldl, foldr, foldl', foldr1, foldl1, foldl1'


Haskell                          | Lisp
---------------------------------|---------------------------------
zip      l1 l2                   | map list l1 l2
zip3     l1 l2 l3                | map list l1 l2 l3
zip4     l1 l2 l3 l4             | map list l1 l2 l3 l4
zip5     l1 l2 l3 l4 l5          | map list l1 l2 l3 l4 l5
zip6     l1 l2 l3 l4 l5 l6       | map list l1 l2 l3 l4 l5 l6
zip7     l1 l2 l3 l4 l5 l6 l7    | map list l1 l2 l3 l4 l5 l6 l7
N/A                              | map list . ls
map      f  l                    | map f l
zipWith  f  l1 l2                | map f l1 l2
zipWith3 f  l1 l2 l3             | map f l1 l2 l3
zipWith4 f  l1 l2 l3 l4          | map f l1 l2 l3 l4
zipWith5 f  l1 l2 l3 l4 l5       | map f l1 l2 l3 l4 l5
zipWith6 f  l1 l2 l3 l4 l5 l6    | map f l1 l2 l3 l4 l5 l6
zipWith7 f  l1 l2 l3 l4 l5 l6 l7 | map f l1 l2 l3 l4 l5 l7
N/A                              | map f . ls

Name: Anonymous 2011-05-23 5:04

Lisp

(defmacro show (&rest xs) ...)


Haskell

instance  (Show a, Show b) => Show (a,b)  where
  showsPrec _ (a,b) s = show_tuple [shows a, shows b] s

instance (Show a, Show b, Show c) => Show (a, b, c) where
  showsPrec _ (a,b,c) s = show_tuple [shows a, shows b, shows c] s

instance (Show a, Show b, Show c, Show d) => Show (a, b, c, d) where
  showsPrec _ (a,b,c,d) s = show_tuple [shows a, shows b, shows c, shows d] s

instance (Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) where
  showsPrec _ (a,b,c,d,e) s = show_tuple [shows a, shows b, shows c, shows d, shows e] s

instance (Show a, Show b, Show c, Show d, Show e, Show f) => Show (a,b,c,d,e,f) where
  showsPrec _ (a,b,c,d,e,f) s = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g)
        => Show (a,b,c,d,e,f,g) where
  showsPrec _ (a,b,c,d,e,f,g) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h)
         => Show (a,b,c,d,e,f,g,h) where
  showsPrec _ (a,b,c,d,e,f,g,h) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i)
         => Show (a,b,c,d,e,f,g,h,i) where
  showsPrec _ (a,b,c,d,e,f,g,h,i) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j)
         => Show (a,b,c,d,e,f,g,h,i,j) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k)
         => Show (a,b,c,d,e,f,g,h,i,j,k) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j,k) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j, shows k] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k,
          Show l)
         => Show (a,b,c,d,e,f,g,h,i,j,k,l) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j,k,l) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j, shows k, shows l] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k,
          Show l, Show m)
         => Show (a,b,c,d,e,f,g,h,i,j,k,l,m) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j,k,l,m) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j, shows k, shows l, shows m] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k,
          Show l, Show m, Show n)
         => Show (a,b,c,d,e,f,g,h,i,j,k,l,m,n) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j,k,l,m,n) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j, shows k, shows l, shows m, shows n] s

instance (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k,
          Show l, Show m, Show n, Show o)
         => Show (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) where
  showsPrec _ (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) s
        = show_tuple [shows a, shows b, shows c, shows d, shows e, shows f, shows g, shows h,
                      shows i, shows j, shows k, shows l, shows m, shows n, shows o] s

Name: Anonymous 2011-05-23 5:04

>>88
Lisp is jewish. And the second was posted by me.

Name: Anonymous 2011-05-23 5:04

>>89
Nice jewish macro.

Name: Anonymous 2011-05-23 5:06

>>88
Also, you pass a function to map, which is also jewish, because it has first-class functions.
Also, map accepts only a function as first argument, and lists as other arguments, which means that types are enforced on you, which means that Lisp is statically typed, which is jewish.
Lisp is jewish.

Name: Anonymous 2011-05-23 5:07

>>89
And the show macro dispatches the display function based on jewish types which come from jewish set theory. Lisp is jewish.

Name: Anonymous 2011-05-23 5:08


Lisp                     | Haskell
-------------------------|-------------------------
* (expt -1 (exp 1))      | Prelude> (-1) ** exp 1
#C(-0.6332554 0.7739428) | NaN




Lisp                        | Haskell
----------------------------|---------------------------------------------------
* (floor (/ 1 0))           | Prelude> floor (1/0)
DIVISION-BY-ZERO signalled  | 1797693134862315907729305190789024733617976978942306572
                            | 7343008115773267580550096313270847732240753602112011387
                            | 9871393357658789768814416622492847430639474124377767893
                            | 4248654852763022196012460941194530829520850057688381506
                            | 8234246288147391311054082723716335051068458629823994724
                            | 5938479716304835356329624224137216

Name: Anonymous 2011-05-23 5:09

>>94
Complex numbers are a jewish concept. What is a complex number in real world? Enjoy your infinity, jewish maggot.

Name: Anonymous 2011-05-23 5:10

>>94
Negative numbers are also jewish. What is a negative number in real world? I can't have -1 apples. Enjoy your infinity, jewish maggot. Lisp is a jewish language.

Name: Anonymous 2011-05-23 5:14

>>96
I can't have -1 apples.
What about the apple you sold to someone? `-` is just a way to discern it from apples you still have unsold.

Name: Anonymous 2011-05-23 5:16

>>95
What is a complex number in real world?
a way to store angles?

Name: Anonymous 2011-05-23 5:16

>>97
What about the apple you sold to someone?
Because jews want all my money.

Name: Anonymous 2011-05-23 5:17

>>98
They are composed of real numbers and imaginary numbers. Imaginary numbers are jewish because they don't exist.

If you're not the ``in Lisp'' troll, ignore all my messages in this thread containing the word ``jewish''. Thank you.

Name: Anonymous 2011-05-23 5:18

>>99
If you wont your mortgage to jews, they'll evict you.

Name: Anonymous 2011-05-23 5:18

Stop falling for this troll. I think he has surpassed FV by now.

Name: Anonymous 2011-05-23 5:20

>>100
Right. Numbers don't exist. Digits and letters do exist.

Name: Anonymous 2011-05-23 5:20

>>102
But I'm having fun reverse trolling him! FV was much less reverse-trollable.

Name: Anonymous 2011-05-23 5:21

>>103
They exist because jewish zionist want you to believe they exist. Enjoy believing in non-existent things like God and digits.

Name: Anonymous 2011-05-23 5:22

>>102
Infinite compression is jewish.  FV was a jewish troll.

Name: Anonymous 2011-05-23 5:23

>>102
What if he not trolling? Could you please remind us, who invented set theory? To which nationality name "Cantor" belongs?

Name: Anonymous 2011-05-23 5:24

>>104
FV was extremely reverse trollable if I remember correctly.

Name: Anonymous 2011-05-23 5:24

>>105
But I see them on my computer's display!

Name: Anonymous 2011-05-23 5:29

>>109
Only thing on your display is crystals that attenuate light. imagining jewish glyphs let alone characters or digits is jewish jew jewness.

Name: Anonymous 2011-05-23 5:29

>>109
You can't touch them, they don't exist.

>>108
He was so stupid that he didn't have really a trolling argument besides JS, the absence of whitespaces in his code, and the ``I'll have a stupid idea, do nothing, and forget about it''.

Name: Anonymous 2011-05-23 5:30

>>110
I can't see light, I can't touch light, I have no evidence that light exists, so even those crystals work by the power of jews.

Name: >>102 2011-05-23 5:45

>>107
Zermelo and Fraenkel did invent ZF(C) set theory. I have no idea what nationality Cantor was, but let me check... Zermelo was german, Fraenkel was the nationality that you don't seem to like.
As for Cantor, it's unclear:
Thus Cantor has been called Jewish in his lifetime,[68] but has also variously been called Russian, German, and Danish as well.

Anyways, I've actually read Cantor's work after all your trolling and I have to say it's pretty interesting. There's a few rather artificial looking axioms in ZF that let him construct the higher infinites (aleph-naught, aleph-1, and so on), but it's unclear how consistent ZF set theory is as there are some paradoxes, but there are better fundational theories which manage to avoid these paradoxes.

In the end, I did find it enlightening to find out that if you do accept one infinity (that of natural numbers) as a concrete value, then there are an infinity of infinities that can also exist (the next one would be that of real numbers, but that cannot be proven or disproven (Continuum hypothesis), which probably suggests the inconstency of the entire concept). It's a very interesting abstract concept to think of, even if it has no practical application and is highly likely to be impossible to physically realize it (same with hypercomputation or real numbers in physical systems, despite so many physical theories having them), even if you think the cause of the world is something similar to the Ultimate Ensemble (that is, it's unlikely these mathematical systems are consistent and thus they cannot ever have a physical instantiation somewhere, but if you assume so, you'll have to discard current string theory if it doesn't have quantized spacetime and go in the direction of Loop Quantum Gravity instead).

Oh dammit, IHBT, fell for the troll I told others not to fall for.

Name: Anonymous 2011-05-23 12:01

idk

Name: Anonymous 2011-05-23 12:18

For the bored: I actually have a copy of the POP-2 book; my university's library has a bad habit of deciding historically important books are no longer worthy of its shelves. If anyone ever wants to know what the first true functional language was like, we can pop that sucker open any time and read passages. The Wikipedia article doesn't give a very good sense of the language and style of the time, and there's only one online reference that has examples.

Name: Anonymous 2011-05-23 13:53

>>110
It exists, if I sense it.

Name: Anonymous 2011-05-23 13:59

>>113
"Cantor" is a jewish name. Look at following Cantor:
http://en.wikipedia.org/wiki/Tadeusz_Kantor

typical jew. In eastern europe most Cantors do evil things, like advancing existence Holocaust in Schools. That says for themselves.

Name: Anonymous 2011-05-23 14:02

>>117
Well, when you show us a pure-blooded Aryan who invented the nuclear bomb, we'll start taking you seriously. Until then, back to /k/, please.

Name: Anonymous 2011-05-23 14:02

>>113
if you do accept one infinity
define "infinity"

Name: Anonymous 2011-05-23 14:03

>>118
Inventing Nuclear Bomb is a pretty evil deed. Worse was only communism, which killed millions.

Name: Anonymous 2011-05-23 14:08

Infinity is like a circular road with no starting point. When you reach the end(since its circle, impossible) you win the game.

Name: Anonymous 2011-05-23 14:09

>>120
You should really pick an actual radical ideology. You'll make a much better schizophrenic that way.

Name: Anonymous 2011-05-23 14:19

>>119
If you ignore Cantor's work, you can say that a sequence of numbers that does not end is infinite. For example, there is no largest natural number - if you say you found one, just take its successfor to show otherwise. That's the simplest kind of infinity. A much stranger type of infinity is that of real numbers - any number has an infinite amount of digits (there is no last digit).

If you take Cantor's work into consideration, he basically takes the set theory (a bunch of axioms that define it, look at http://en.wikipedia.org/wiki/Zermelo–Fraenkel_set_theory), and 2 axioms of particular importance (which are rather artificial, but are needed to define 'infinity' as a concrete value as far as ordinals are concerned), the axiom of infinity ( http://en.wikipedia.org/wiki/Axiom_of_infinity ) and the axiom of power set ( http://en.wikipedia.org/wiki/Axiom_of_power_set ). Within set theory, you can find the cardinality of some set (the amount of elements in the set). He then defines the cardinality of N (or of the infinite set defined in that axiom before this), and that value is denoted by N0, or aleph-null. What he did here is say that the cardinality of an infinite set is defined as a concrete value, the ordinal N0, instead of merely left as some undefined infinite. That is what I meant by accepting the concrete infinity - you can say that the number of natural numbers is potentially infinite, but what Cantor did was consider this infinite value something concrete, after that he shows that the cardinality of R (real numbers) is greater than that of natural numbers (N0), and this greater value is N1. By the axiom of power set, he then shows that for any such ordinal (Nx), there is always a set whose cardinality is a greater infinite ordinal. He also set forth a conjecture which states that the next ordinal after N0 is N1 and there is nothing inbetween, this is called the continuum hypothesis. The very strange thing about this hypothesis is that it was proven that it's impossible to prove and disprove, which is a very weird result which likely shows that set theory as defined by ZF+Infinity+PowerSet might be inconsistent in some ways (along with some other paradoxes that plague it). Regardless of what you think of wether real numbers exist or not, or wether you can treat infinities as something concrete like he does, it does show you want happens when you do, and math is done by taking some axiomatic system and running with it to obtain results - if the results show that it's inconsistent, it was still a worthy exercise, I do know that I learned something by reading some of his work.

Name: Anonymous 2011-05-23 14:42

>>123
You're too smart to be on here.

Name: Anonymous 2011-05-23 14:47

>>124
You realise he's just regurgitating the contents of a mathematical logic course, right? This is standard fare for a COMPUTER SCIENTIST.

Name: Anonymous 2011-05-23 14:48

>>121
Circular Road would be a simple recursion.

>>122
I'm already a subjective idealist -- an extreme position on a bottom-up vs top-down scale. Jews force `top-down`, as they love communism, set theory and type classes -- which are oposites of anarchism, justificationalism and prototypes.

>>123
you can say that a sequence of numbers that does not end
define "does not end"

Name: Anonymous 2011-05-23 14:50

>>125
You realise he's just regurgitating the contents of a mathematical logic course, right?
Nope. I also hate "infinitesimals" buzzword, which is standard for engineers.

This is standard fare for a COMPUTER SCIENTIST.
Commuter Scientists love Set Theory.

Name: Anonymous 2011-05-23 14:51

>>125
He still is on a different level.

Name: Anonymous 2011-05-23 14:55

>>127
Infinitesimals aren't a buzzword at all. They're an alternative approach to calculus based on the concept of defining the smallest possible number. All practiced calculus was based on them until the late 19th Century, when limits were invented and applied to make math more logically rigorous.

Although we've never been able to prove that infinitesimals are sound reasoning, there's nothing you can do with limits that you can't do with infinitesimals, and vice versa. It's like Turing machines and lambda calculus.

Name: Anonymous 2011-05-23 14:58

>>129
proof?

Name: Anonymous 2011-05-23 14:59

>>129
define "smallest possible number"
define "limits"
define "sound reasoning"

Name: Anonymous 2011-05-23 15:01

>>129
Turing machines and lambda calculus.
Pseudoscience. IRL there're only Finite State Automations, no Turings.

Name: Anonymous 2011-05-23 15:02

>>126
define "does not end"
A sequence that does not have a last element. If you assume it's the last element, you'll be able to find another one, and if you assume that other one is the last element, you'll be able to find another one and so on.

Name: Anonymous 2011-05-23 15:08

Name: Anonymous 2011-05-23 15:08

>>133
you'll be able to find another
What if don't have enough memory?

Name: Anonymous 2011-05-23 15:08

>>126
(defvar xs '(1))
(rplacd xs xs)
xs
(mapcar #'print xs)

Wait until it stops printing xs. That means does not end.

Name: Anonymous 2011-05-23 15:09

>>134
so, where is the proof?

Name: Anonymous 2011-05-23 15:11

>>136
It's just a simple recursion. Like 1/3

Name: Anonymous 2011-05-23 15:14

>>137
There isn't one. Having a proof that infintesimal-based calculus is equivalent to limit-based calculus would be proof that they're sound. It's only the case that we have yet to find a counter-example to the claim that they're equivalent.

Name: Anonymous 2011-05-23 15:15

Name: Anonymous 2011-05-23 15:20

>>127
infinitesimals
While I can't say they sit too well with me, they are well defined, at least within set theory.
Here's an example:
x2 = 2, where x > 0 => x = √2.
It can be shown that x is not a rational number (that is, you can prove that there is no p/q = x, with (p,q)=1). The proof is elementary and is shown in middleschool textbooks, so I'll refrain from showing it here.

One way of defining x is to use 2 infinite sets in ZFC:
{{y∈Q|y2 < 2},{y∈Q|y2 ≥ 2}}
This is called a Dedekind cut. You're defining all the rational numbers to the left (smaller) and to the right (greater or equal) to this irrational number. By doing this you can approximate this irrational number with ever-increasing accuracy. Would any side ever reach this number, despite approaching it ever-so-closely? No, because that would require infinite number of digits in the fraction, which is not something a rational number can be, however the cardinality of both of those sets is aleph-null (infinite, same as N) as they are an interval of Q.

Name: Anonymous 2011-05-23 15:44

>>141
within set theory
define "set"

Name: Anonymous 2011-05-23 15:45

>>141
>{{y∈Q|y2 < 2},{y∈Q|y2 ≥ 2}}
Looks like haskell, but why do you use {} instead of [] for list comprehension?

Name: Anonymous 2011-05-23 15:48

Also, Q[y] is much nicer than your y∈Q and doesn't require off-keyboard characters.

Name: Anonymous 2011-05-23 15:48

>>143
FUCK FUCK FUUUUUUUUUUCK GOD DAMN HOW CAN YOU BE THIS STUPID FUUUUUUUUUUUUUUUCK I FUCKING HATE YOU GO KILL YOURSELF

Name: Anonymous 2011-05-23 15:49

>>143
It's just standard mathematical notation. It's a convention. There is no reason for syntax or language despitate that that's how it was written by its inventors and that's how it stayed. Of course, if you'd prefer other syntax, you're always free to define one.
>>142
http://en.wikipedia.org/wiki/Set_(mathematics)

Name: Anonymous 2011-05-23 15:53

>>144
Inventing notation requires you to define that notation. I thought that was clear to you when you started posting ``in LISP'' code and nobody understood it. Only when you posted the implementation did people stop criticizing your posts merely based on intelligibility of the syntax.

Name: >>146 2011-05-23 15:57

s/despitate/despite//

Name: Anonymous 2011-05-23 16:04

>>146
It's just standard mathematical notation.
Your standard looks ugly as Haskell. Are there alternatives? Even in D&D games there are alternative classes. I want to play fucking Kensai/Mage!

http://en.wikipedia.org/wiki/Set_(mathematics)
Can't find defintion of "set" there.

>>145
Please, be more serious. Mathematics is a serious subject, /c/ is serious board.

Name: Anonymous 2011-05-23 16:07

>>147
Inventing notation requires you to define that notation.
I know. But there're already much better notations. Why can't we use these instead of math one? They also easy to OCR, parse and copy-paste.

Name: Anonymous 2011-05-23 16:18

>>150
I know. But there're already much better notations. Why can't we use these instead of math one?
I'm actually with you on this one. The mathematical notation is full of ambiguities and special cases, though the set notation is pretty well defined and consistent when they don't go ``look I use English in formulae''.

Name: Anonymous 2011-05-23 16:26

>>151
set notation is pretty well defined and consistent when they don't go ``look I use English in formulae''.
(keep f xs) is much more consistent than {x∈xs|f(x)} craziness.

Name: Anonymous 2011-05-23 16:29

>>152
Sometimes they even omit explicit `xs`, writing {x|f(x)} and you have to guess real `xs`.

Name: VIPPER 2011-05-23 16:29

/prog/ can be such a weird place at times.

Name: Anonymous 2011-05-23 16:32

>>152-153
I've seen worse.

Name: Anonymous 2011-05-23 16:41

>>155
Because Set Theory cannot into unit tests.

Name: Anonymous 2011-05-23 17:04

>>150
Point to one and we can use it. I suppose some theorem-prover's syntaxes would be less ambiguous than the standard notation used in set theory and in math in general which at times are too close to natural language despite needing to be more exact/concrete. Something like http://en.wikipedia.org/wiki/Nqthm might work.

Name: Anonymous 2011-05-23 17:18

Point to one and we can use it
http://en.wikipedia.org/wiki/LISP

Name: Anonymous 2011-05-23 17:53

>>158
That's a family of languages. You need specific semantics and symbol names to talk about more concrete things.

Name: Anonymous 2011-05-23 18:01

>>159
Sorry, I've other work to do, Set Theory (together with Java) being just a major inconvenience, getting a university diploma. Nothing I can do there, except following Unabomber's way and sending packages to major Universities.

Name: Anonymous 2011-05-23 18:12

>>160
That's called applying for grad school dude.

Name: Anonymous 2011-05-23 18:20

>>161
Nope. Bombing schools is a way to express your protest.

Name: Anonymous 2011-05-23 18:30

>>162
Hardly productive and cannot have any positive outcome. Your disatisfaction with current mathematical formalisms won't go away. The only way to make that go away would be to build something.

Name: Anonymous 2011-05-23 18:46

>>163
Hardly productive and cannot have any positive outcome.
http://en.wikipedia.org/wiki/Propaganda_of_the_deed

would be to build something.
You can't build on an occupied territory.

Name: Anonymous 2011-05-23 18:51

>>164
How is your mind, paper, computer and its memory ``occupied territory''? People make up new stuff all the time. If you looked hard enough, you might even find things you might like.

Name: Anonymous 2011-05-23 19:42

>>165
Job market is an occupied territory. You can't just replace Unix with Lisp OS. You can't replace Set Theory language with any other language. It's very hard to replace IPv4 with IPv6, even when major forces are interested. Replacing Set Theory with a Lisp-based language would meet opposition from the whole science community, which religiously conservative to no end.

"No one shall expel us from the Paradise that Cantor has created." -- words of modern scientist.

Name: Anonymous 2011-05-23 19:54

>>166
Which scientist?

Name: Anonymous 2011-05-23 20:04

>>166
It's a strawman. He ascribes sweeping generalizations to various groups then uses that strawman to further his argument.

Name: Anonymous 2011-05-23 20:36

>>168
Nope. It's all the same: Set Theory is a language. It's value is in opportunities it provides, like getting a programming job or reading information, encoded with Set Theory.

Name: Anonymous 2011-05-23 20:39

Closures are Lisp-like programming languages designed to compile to JVMs.

Name: Anonymous 2011-05-23 20:40

>>170
No, those are Clojures.

Name: Anonymous 2011-05-23 21:16

<3 closures

Name: deppricated 2011-05-24 3:35

deppricated

Name: Anonymous 2011-05-24 15:03

closures are useless unless you wanna claim you're a master programmer

Name: Anonymous 2011-05-24 16:14

Closures are just syntax sugar for Java classes. Lazy programmers like them because there lazy.

Name: Anonymous 2011-05-24 17:03

Java classes are just syntax sugar for closures. Lazy programmers like them because there lazy.

Name: Anonymous 2011-05-24 17:12

Lazy closures are just syntax classes for sugar. Java programmers like them because there lazy.

Name: Anonymous 2011-05-24 17:33

Syntax closures are just lazy classes for Java. Sugar programmers like them because there lazy.

Name: Anonymous 2011-05-24 17:39

4 posts and not 1 correct use of there

Name: Anonymous 2011-05-24 17:40

>>179
1 post, and not one unambiguous use of grammar.

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