News for hackers. Stuff that matters.
Re:Fold the DOM like paper by vanderZwan on Saturday November 30, 2013 @06:47AM (#6822908)
Funny coincidence, I just started a casual discussion about origami and programming with some friends yesterday:

So, my friend Torsten (who is really into papercraft and origami) explained to me the purity hierarchy within the papercraft community.

At the bottom is having to cut the paper and use glue in your creations. One level above that is if the form requires only cutting or tearing. Getting more and more pure is the form known as kirigami, which involves cuts but is made from a single sheet of paper as the base. At the top is origami - no glue, no cuts, only folds (although I'm not sure if there is such a thing as higher order origami), and ideally only one sheet of paper.

The comparison with functional programming ("no glue and cuts" and "no state") is so obvious I'm surprised I've never seen it in the wild - maybe because programming has more in common with algebra, whereas origami is geometric?

Although mostly unrelated to this library, we can conclude that some of the effects in OriDomi should be in a section called KiruDomi. ;)

Actually, from a usability perspective, I see a problem with using those effects, like "twist" and "fracture": once scrambled, it is not obvious from the shape in which way to drag to unfold again, unlike with an effect like "stairs"

Re:Fold the DOM like paper by danieldk on Saturday November 30, 2013 @06:53AM (#6822914)
The comparison with functional programming ("no glue and cuts" and "no state") is so obvious I'm surprised I've never seen it in the wild

Actually, it does occur in the wild ;):

http://www.cs.ox.ac.uk/jeremy.gibbons/publications/origami.p...

Re:Fold the DOM like paper by Adrock on Saturday November 30, 2013 @06:58AM (#6822921)
There's also a rich field of algebraic analysis of origami:

http://www.google.com/search?q=algebraic%20origami

Re:Fold the DOM like paper by vanderZwan on Saturday November 30, 2013 @04:01PM (#6824599)
It's always nice to be informed you're wrong in a constructive way. Thank you too!
Re:Fold the DOM like paper by vanderZwan on Saturday November 30, 2013 @08:41AM (#6823129)
Emphasis I've never seen it. ;)

Thanks!

Re:Fold the DOM like paper by iterationx on Saturday November 30, 2013 @07:42AM (#6822982)
This movie is quite good and it might still be available on Netflix, http://www.youtube.com/watch?v=tE4lqYzS2m0
Re:Fold the DOM like paper by victoro on Saturday November 30, 2013 @02:01PM (#6824106)
Thanks for the recommendation, Netflix doesn't have it available to stream but Amazon Prime does. Awesome film so far.
Re:Fold the DOM like paper by ams6110 on Saturday November 30, 2013 @08:53PM (#6825670)
At the top is origami - no glue, no cuts, only folds ... and ideally only one sheet of paper.

How would multiple sheets of paper really differ from cuts?

Re:Fold the DOM like paper by Houshalter on Saturday November 30, 2013 @03:18PM (#6824457)
Except the papercraft thing is meant to be an extra challenge, whereas functional programming has some practical advantages. Limiting to the bare minimum of just folding, not allowing things that would make it easier like glue or cutting, doing it without practical purpose but just to make impressive creations? I think the direct programming equivalent would be esoteric programming languages like brainfuck.
Re:Fold the DOM like paper by vanderZwan on Saturday November 30, 2013 @03:59PM (#6824591)
Limiting to the bare minimum of just folding, not allowing things that would make it easier like glue or cutting, doing it without practical purpose but just to make impressive creations?

My first experience with functional programming was being quizzed to solve certain maths problems with Haskell, and not being allowed to save intermediate results in a variable like an integer was really frustrating due to existing habits. Yes, yes, accumulators and recursion - point is our instructor gave us zero hints about how to think differently, and just kept saying "no, Haskell has no variables."

It might say more about how poorly guided my first encounter with functional programming was, but still, I'd say that is a lot like what you just described.

Re:Fold the DOM like paper by laureny on Saturday November 30, 2013 @09:13AM (#6823197)
> The comparison with functional programming ("no glue and cuts" and "no state")

Er... what? What does "glue and cuts" mean in functional programming?

And functional programming has state, like most other programming paradigms (see the ST and State monads).

Re:Fold the DOM like paper by vanderZwan on Saturday November 30, 2013 @04:03PM (#6824608)
I think I meant to say side-effects.
Re:Fold the DOM like paper by laureny on Sunday December 01, 2013 @02:18PM (#6828723)
Same observation, functional programming languages (even pure ones) have side effects, they just encode these side effects in types.