News for hackers. Stuff that matters.
Re:The real truth on Wikipedia is in the edits by die_sekte on Wednesday September 08, 2010 @11:00AM (#1672032)
It seems that the only thing that consistently amuses hackers is recursion.
Re:The real truth on Wikipedia is in the edits by sammyo on Wednesday September 08, 2010 @01:53PM (#1672708)
"To iterate is human, recurse devine" -Anon
Re:The real truth on Wikipedia is in the edits by eru on Thursday September 09, 2010 @08:50AM (#1675132)
Iteration is just a special case.
Re:The real truth on Wikipedia is in the edits by sesqu on Thursday September 09, 2010 @10:18AM (#1675462)
When you hit Turing completeness, special casing is no longer a useful exercise.
Re:The real truth on Wikipedia is in the edits by eru on Thursday September 09, 2010 @11:42AM (#1675732)
Could you explain what you want to say?

I mean, iteration is a special case of recursion. Some languages [1] need special syntax constructs for iteration, like `while' or `for', because their support for recursion is broken.

[1] OK, most.

Re:The real truth on Wikipedia is in the edits by sesqu on Thursday September 09, 2010 @06:38PM (#1677207)
Iteration: until condition iterate state=update(state).

Recursion: recursive(state)=if atomic then state else recursive(refined(state)).

condition=atomic, update=refined. One is not a special case of the other; they are just different models for the same process (one is top-down, the other bottom-up). See also objects vs. closures.

Re:The real truth on Wikipedia is in the edits by eru on Thursday September 09, 2010 @08:13PM (#1677425)
To quote Structure and Interpretation of Computer Programs (http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html...):

[...] most implementations of common languages (including Ada, Pascal, and C) are designed in such a way that the interpretation of any recursive procedure consumes an amount of memory that grows with the number of procedure calls, even when the process described is, in principle, iterative. As a consequence, these languages can describe iterative processes only by resorting to special-purpose ``looping constructs'' such as do, repeat, until, for, and while. The implementation of Scheme we shall consider in chapter 5 does not share this defect. It will execute an iterative process in constant space, even if the iterative process is described by a recursive procedure. An implementation with this property is called tail-recursive. With a tail-recursive implementation, iteration can be expressed using the ordinary procedure call mechanism, so that special iteration constructs are useful only as syntactic sugar.

Re:The real truth on Wikipedia is in the edits by sesqu on Thursday September 09, 2010 @09:56PM (#1677619)
Right. Recursion has a problem with stack overflows, but that can sometimes be automatically fixed by turning it into iteration and throwing out the superfluous frames. Which one is the special case now?
Re:The real truth on Wikipedia is in the edits by eru on Friday September 10, 2010 @07:33AM (#1678540)
Why? Iteration.

Stacks and stuff are just a way for computers to do some forms of recursion. Recursion itself is just a general mathematical idea.

Look at the Natural numbers (http://en.wikipedia.org/wiki/Recursion#Example:_the_natural_...) or dynamic programming (http://en.wikipedia.org/wiki/Recursion#Recursive_optimizatio...). Dynamic programming is an interesting case, because in most languages the idiomatic way to express it uses iterative constructs.

Re:The real truth on Wikipedia is in the edits by illumen on Wednesday September 08, 2010 @11:13AM (#1672074)
10 PRINT "It seems that the only thing that consistently amuses hackers ";

20 PRINT "is the only thing that consistently amuses hackers ";

30 GOTO 20

Re:The real truth on Wikipedia is in the edits by BrandonM on Wednesday September 08, 2010 @09:25PM (#1674106)
That looks like iteration to me.
Re:The real truth on Wikipedia is in the edits by lsb on Wednesday September 08, 2010 @11:13PM (#1674280)
A goto with no arguments can be read as an recursive but optimized tail call, in some mythic Scheme-to-BASIC compiler.
Re:The real truth on Wikipedia is in the edits by fizx on Wednesday September 08, 2010 @02:19PM (#1672810)
In some sense, it's what makes us unique. Is CS the only discipline that deals with recursion on a regular basis?
Re:The real truth on Wikipedia is in the edits by dhs on Thursday September 09, 2010 @08:49AM (#1675128)
There's recursive storytelling and poetry (the kind of stories/poems where, at the end, you find yourself looking at the beginning again). It's also possible to describe certain processes which occur as part of some mental disorders as recursive (e.g. the fear of fear; depression because of depression).
Re:The real truth on Wikipedia is in the edits by eru on Thursday September 09, 2010 @08:51AM (#1675134)
Mathematics is full of recursion. Everywhere. The part of CS that deals with recursion is just a tiny corner of mathematics.
Re:The real truth on Wikipedia is in the edits by edanm on Wednesday September 08, 2010 @02:41PM (#1672914)
I think there are other fields of Mathematics in which recursion plays some part (Mathematical Logic, for example).
Re:The real truth on Wikipedia is in the edits by forensic on Wednesday September 08, 2010 @03:58PM (#1673251)
It's SO true. I always laugh the hardest at recursive jokes.
Re:The real truth on Wikipedia is in the edits by oiuygtfrtghyju on Wednesday September 08, 2010 @03:19PM (#1673083)
What about writing about the history of histography?

Would that be histography-histography or histography-histography-histography?

Re:The real truth on Wikipedia is in the edits by sp332 on Wednesday September 08, 2010 @03:29PM (#1673123)
It's historiography and it's already sufficiently meta. It's in the set of all sets that contain themselves. (But does the set of all sets that do not contain themselves contain itself? That is the question :-)
Re:The real truth on Wikipedia is in the edits by mkr-hn on Wednesday September 08, 2010 @11:12AM (#1672068)
It's the iteration sensation.
Re:The real truth on Wikipedia is in the edits by polynomial on Wednesday September 08, 2010 @11:41AM (#1672179)
If you mean consistently amusing recursion, then yes.