Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Worlds: Tabs for Programming by Alan Kay (windley.com)
55 points by pchristensen on Nov 4, 2008 | hide | past | favorite | 22 comments


I thought I remembered the 'amb' operator sounded similar. It is discussed in "Teach Yourself Scheme in Fixnum Days." From chap 14 ( http://gd.tuwien.ac.at/languages/scheme/tutorial-dsitaram/t-... )

    `amb` takes zero or more expressions, and makes a
    nondeterministic (or ``ambiguous'') choice among them,
    preferring those choices that cause the program to 
    converge meaningfully. Here we will explore an embedding 
    of amb in Scheme that makes a depth-first selection of 
    the ambiguous choices, and uses Scheme's control operator
    call/cc to backtrack for alternate choices.


Amb is implemented using continuations and so the problem of side-effects remains.

If we don't consider side-effects then "tabs" just degenerates into "continuations".

EDIT: Maybe tabs == "monads" + "continuations"? I don't know enough about haskell to tell.


Hmm, sounds interesting, although I'm wondering if there's a significant difference to what immutable data structures together with STM provide - it certainly sounds very much like the transactions you can perform in Clojure, where, if certain conditions aren't met, all modifications are rolled back and you can bail out of your changes. If I had a degree in CS I'd probably even know the name for the difference between the techniques. :-/


Interesting. It's program flow like with continuations and state management like with SQL transactions.


Transactional Continuations. That sounds important.



I've been interesed in this as a way to safely modify core JavaScript prototypes.


I'm not sure how this isn't just describing a combination of functional programming and dynamic programming.


To coda that part in a side effect way is a critical part of this approach. It's easy to implement in Haskell where these are handled with trust or you need to do the hard work.


It's been a while since I've coded in prolog, but that sounds a lot like what they were trying to do.


This is blowing my mind. The implications for AI and genetic programming could be huge.


I am not a pedigreed programmer, but it sounds like git does this with branching.


Hardly git exclusively; most any modern version control works well for this. Git's local branching/checkout makes it a slightly faster process though, I suppose.


pg showed this in On Lisp, chapter 22, Nondeterminism: http://www.paulgraham.com/onlisp.html


Um. Threads?


No, because threads can mutate global state.

I would think this would be more like backtracking done in a side-effect free way.


Threads can mutate global state. They don't have to.


of course they _can_ and don't have to, but just using threads doesn't meet the properties of the "world" construct.


which is called a continuation


fork(2) will do though.


but, then you need to add some sort of IPC to the mix, because there's still a notion of "commit" for the mutation of state.


I don't think you need it in all cases.

For instance, if the "world" / "tab" knows that it's no good, it could self-exit. That'd leave only the "good" one standing without any coordination / communication.

Or, in some other cases, return codes may be good enough.

Even if it's easily possible with current stuff though, it's still an interesting idea.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: