Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Charles Pritchard
On Jan 27, 2011, at 12:47 PM, João Eiras wrote: > On Thursday 27 January 2011 20:39:50 you wrote: >> On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard >> mailto:ch...@visc.us>> wrote: >> FWIW: websql is mostly abandoned, though super handy on ios mobile devices. >> >> It's been around for

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Jeremy Orlow
On Thu, Jan 27, 2011 at 12:47 PM, João Eiras wrote: > On Thursday 27 January 2011 20:39:50 you wrote: > > On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard > wrote: > > FWIW: websql is mostly abandoned, though super handy on ios mobile > devices. > > > > It's been around f

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread João Eiras
On Thursday 27 January 2011 20:39:50 you wrote: > On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard > mailto:ch...@visc.us>> wrote: > FWIW: websql is mostly abandoned, though super handy on ios mobile devices. > > It's been around for a while in everything other than FF and IE. > > IndexedDB i

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Jeremy Orlow
On Thu, Jan 27, 2011 at 12:06 PM, Charles Pritchard wrote: > FWIW: websql is mostly abandoned, though super handy on ios mobile devices. > It's been around for a while in everything other than FF and IE. > IndexedDB is live in Chrome, Firefox and the MS interop team released a > prototype for

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread João Eiras
> Afaik, websql does not support blobs. > If stored as strings, it does. sqlite treats TEXT as an opaque buffer.

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Charles Pritchard
On Jan 27, 2011, at 11:01 AM, Jeremy Orlow wrote: > On Thu, Jan 27, 2011 at 12:39 AM, Felix Halim wrote: > 2011/1/7 Jonas Sicking : > > On Thu, Jan 6, 2011 at 7:14 PM, Boris Zbarsky wrote: > >> On 1/6/11 5:25 PM, João Eiras wrote: > >>> > >>> Not different from two different tabs/windows ru

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Jeremy Orlow
On Thu, Jan 27, 2011 at 12:39 AM, Felix Halim wrote: > 2011/1/7 Jonas Sicking : > > On Thu, Jan 6, 2011 at 7:14 PM, Boris Zbarsky wrote: > >> On 1/6/11 5:25 PM, João Eiras wrote: > >>> > >>> Not different from two different tabs/windows running the same code. > >> > >> In which current browsers

Re: [chromium-html5] LocalStorage inside Worker

2011-01-27 Thread Felix Halim
2011/1/7 Jonas Sicking : > On Thu, Jan 6, 2011 at 7:14 PM, Boris Zbarsky wrote: >> On 1/6/11 5:25 PM, João Eiras wrote: >>> >>> Not different from two different tabs/windows running the same code. >> >> In which current browsers do same-origin tabs/windows end up interleaving >> their JS (that is,

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Tab Atkins Jr.
On Tue, Jan 11, 2011 at 11:48 PM, Jonas Sicking wrote: > On Tue, Jan 11, 2011 at 6:02 PM, Tab Atkins Jr. wrote: >> Lisp has, for example, macros like WITH-HASH-TABLE-ITERATOR, which >> takes a hash, a name for the iterator to be produced, and then a chunk >> of code within which the iterator is a

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Jeremy Orlow
Agreed. There's lots of stuff in the web platform that you basically just shouldn't use/do but that we have to leave in. In my opinion, localStorage is just yet another one. (And yes, this is coming from the person who implemented it in Chromium. :-) J On Wed, Jan 12, 2011 at 11:36 AM, Keean S

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Keean Schupke
So, it may be acceptable to say you can't use localStorage from a worker, use IndexedDB instead. But is it acceptable to leave localStorage broken with multiple tabs/windows. As the spec says there should be a global lock, that seems to be an implementation problem though. Cheers, Keean. On 12

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Jeremy Orlow
On Wed, Jan 12, 2011 at 11:14 AM, Glenn Maynard wrote: > On Wed, Jan 12, 2011 at 6:00 AM, Keean Schupke wrote: > > IMHO, if the global lock on localStorage implemented, then I think it is > > acceptable to say localStorage may have poor performance with multiple > > windows/tabs open. If you wan

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Glenn Maynard
On Wed, Jan 12, 2011 at 6:00 AM, Keean Schupke wrote: > IMHO, if the global lock on localStorage implemented, then I think it is > acceptable to say localStorage may have poor performance with multiple > windows/tabs open. If you want better then use IndexedDB. Performance isn't the problem. The

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Keean Schupke
IMHO, if the global lock on localStorage implemented, then I think it is acceptable to say localStorage may have poor performance with multiple windows/tabs open. If you want better then use IndexedDB. Cheers, Keean. On 12 January 2011 10:21, Jeremy Orlow wrote: > On Tue, Jan 11, 2011 at 8:58

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Jeremy Orlow
On Tue, Jan 11, 2011 at 8:58 PM, Jonas Sicking wrote: > With localStorage being the way it is, I personally don't think we can > ever allow localStorage access in workers. > > However I do think we can and should provide access to a separate > storage area (or several named storage areas) which c

Re: [chromium-html5] LocalStorage inside Worker

2011-01-12 Thread Jonas Sicking
On Tue, Jan 11, 2011 at 11:48 PM, Jonas Sicking wrote: > On Tue, Jan 11, 2011 at 6:02 PM, Tab Atkins Jr. wrote: >> On Tue, Jan 11, 2011 at 4:39 PM, Jonas Sicking wrote: >>> On Tue, Jan 11, 2011 at 2:44 PM, Tab Atkins Jr. >>> wrote: On Tue, Jan 11, 2011 at 2:37 PM, Jonas Sicking wrote: >>

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
Now I think about it I see where you were coming from with get: var x = getNamedStorage('x'); x.onsuccess(function(store) {...}); would make more sense like that... and I guess if you include the onsuccess callback in one function you get: getNamedStorage('x', function(store) {...}); I reads be

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
On 11 January 2011 22:37, Jonas Sicking wrote: > On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: > > Would each 'name' storage have its own thread to improve parallelism? > > Your vocabulary is a bit off since from an API point of view, storage > areas don't have threads, the execution env

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
The callback is doing something 'with' the resource you are waiting for. The callback cannot be called 'without' the resource being available. The 'with' refers to the 'named storage object' not the registration of the callback. "with" this named storage object "do" function Would be how I read

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Jonas Sicking
On Tue, Jan 11, 2011 at 6:02 PM, Tab Atkins Jr. wrote: > On Tue, Jan 11, 2011 at 4:39 PM, Jonas Sicking wrote: >> On Tue, Jan 11, 2011 at 2:44 PM, Tab Atkins Jr. wrote: >>> On Tue, Jan 11, 2011 at 2:37 PM, Jonas Sicking wrote: On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: > wo

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Glenn Maynard
On Tue, Jan 11, 2011 at 9:02 PM, Tab Atkins Jr. wrote: > Python has its "with" keyword, used like "with file = open('foo'): > doStuffToTheFile(file)", which similarly creates a named resource and ("with open('foo') as file:") > takes a chunk of code within which the resource is available.  I know

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Tab Atkins Jr.
On Tue, Jan 11, 2011 at 4:39 PM, Jonas Sicking wrote: > On Tue, Jan 11, 2011 at 2:44 PM, Tab Atkins Jr. wrote: >> On Tue, Jan 11, 2011 at 2:37 PM, Jonas Sicking wrote: >>> On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: would: withNamedStorage('x', function(store) {...}); m

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Jonas Sicking
On Tue, Jan 11, 2011 at 2:44 PM, Tab Atkins Jr. wrote: > On Tue, Jan 11, 2011 at 2:37 PM, Jonas Sicking wrote: >> On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: >>> would: >>> withNamedStorage('x', function(store) {...}); >>> make more sense from a naming point of view? >> >> I have a dif

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Glenn Maynard
On Tue, Jan 11, 2011 at 3:58 PM, Jonas Sicking wrote: > With localStorage being the way it is, I personally don't think we can > ever allow localStorage access in workers. This makes sense if the storage mutex goes away entirely for localStorage itself (reflecting current implementations). If lo

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Tab Atkins Jr.
On Tue, Jan 11, 2011 at 2:37 PM, Jonas Sicking wrote: > On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: >> would: >> withNamedStorage('x', function(store) {...}); >> make more sense from a naming point of view? > > I have a different association for 'with', especially in context of > JavaSc

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Jonas Sicking
On Tue, Jan 11, 2011 at 2:11 PM, Keean Schupke wrote: > Would each 'name' storage have its own thread to improve parallelism? Your vocabulary is a bit off since from an API point of view, storage areas don't have threads, the execution environments in workers and windows do. But if your question

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
Would each 'name' storage have its own thread to improve parallelism? would: withNamedStorage('x', function(store) {...}); make more sense from a naming point of view? Cheers, Keean. On 11 January 2011 20:58, Jonas Sicking wrote: > With localStorage being the way it is, I personally don't

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Jonas Sicking
With localStorage being the way it is, I personally don't think we can ever allow localStorage access in workers. However I do think we can and should provide access to a separate storage area (or several named storage areas) which can only be accessed from callbacks. On the main thread those call

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
Allow access only from serialized callbacks in workers. Cheers Keean On 11 Jan 2011 14:45, "Jeremy Orlow" wrote: > So what's the plan for localStorage in workers? > > J > > On Tue, Jan 11, 2011 at 9:10 AM, Keean Schupke wrote: > >> I think I already came to the same conclusion... JavaScript has

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Jeremy Orlow
So what's the plan for localStorage in workers? J On Tue, Jan 11, 2011 at 9:10 AM, Keean Schupke wrote: > I think I already came to the same conclusion... JavaScript has no control > over effects, which devalues STM. In the absence of effect control, apparent > serialisation (of transactions) i

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
I think I already came to the same conclusion... JavaScript has no control over effects, which devalues STM. In the absence of effect control, apparent serialisation (of transactions) is the best you can do. What we need is a purely functional JavaScript, it makes threading so much easier ;-) Ch

Re: [chromium-html5] LocalStorage inside Worker

2011-01-11 Thread Keean Schupke
I think the idea is that JavaScript should not do unexpected things. The suggestion to only make local storage accessible from inside callbacks seems the best suggestion so far. Cheers, Keean. On 11 January 2011 06:20, Felix Halim wrote: > On Tue, Jan 11, 2011 at 1:02 PM, Glenn Maynard wrote

Re: [chromium-html5] LocalStorage inside Worker

2011-01-10 Thread Felix Halim
On Tue, Jan 11, 2011 at 1:02 PM, Glenn Maynard wrote: >> localStorage should focus on simplicity and performance and ignore >> thread safety since, IMHO, localStorage is used for UI purposes or >> preferences settings (not data itself). If you open two tab, you >> change settings in one tab, you c

Re: [chromium-html5] LocalStorage inside Worker

2011-01-10 Thread Glenn Maynard
On Tue, Jan 11, 2011 at 12:26 AM, Felix Halim wrote: > Looking through all these complexities, I'm wondering why do we need > to make localStorage "thread safe" in the first place? I mean, we can > always switch to IndexedDB if we want thread safe storage. I don't think Jonas's suggestion is comp

Re: [chromium-html5] LocalStorage inside Worker

2011-01-10 Thread Felix Halim
Looking through all these complexities, I'm wondering why do we need to make localStorage "thread safe" in the first place? I mean, we can always switch to IndexedDB if we want thread safe storage. localStorage should focus on simplicity and performance and ignore thread safety since, IMHO, localS

Re: [chromium-html5] LocalStorage inside Worker

2011-01-10 Thread Robert O'Callahan
STM is not a panacea. Read http://www.bluebytesoftware.com/blog/2010/01/03/ABriefRetrospectiveOnTransactionalMemory.aspxif you haven't already. In Haskell, where you have powerful control over effects, it may work well, but Javascript isn't anything like that. Rob -- "Now the Bereans were of mor

Re: [chromium-html5] LocalStorage inside Worker

2011-01-08 Thread Keean Schupke
On 8 January 2011 11:45, Glenn Maynard wrote: > On Sat, Jan 8, 2011 at 6:10 AM, Keean Schupke wrote: > > I am suggesting that as the semantics are the same, People can think of > this > > like serialised access, but implementers can use STMs to make their > browser > > faster than the competitio

Re: [chromium-html5] LocalStorage inside Worker

2011-01-08 Thread Glenn Maynard
On Sat, Jan 8, 2011 at 6:10 AM, Keean Schupke wrote: > I am suggesting that as the semantics are the same, People can think of this > like serialised access, but implementers can use STMs to make their browser > faster than the competition (if they want). To the user it will look the > same. Not

Re: [chromium-html5] LocalStorage inside Worker

2011-01-08 Thread Keean Schupke
On 8 January 2011 10:00, Glenn Maynard wrote: > On Sat, Jan 8, 2011 at 4:06 AM, Keean Schupke wrote: > > If access had to be from inside an "atomic" block (a callback from a > single > > storage-thread) then this would fix access from multiple tabs/windows as > > well as from worker threads. > >

Re: [chromium-html5] LocalStorage inside Worker

2011-01-08 Thread Glenn Maynard
On Sat, Jan 8, 2011 at 4:06 AM, Keean Schupke wrote: > If access had to be from inside an "atomic" block (a callback from a single > storage-thread) then this would fix access from multiple tabs/windows as > well as from worker threads. Your suggestion and Jonas's are very similar. I think the d

Re: [chromium-html5] LocalStorage inside Worker

2011-01-08 Thread Keean Schupke
On 8 January 2011 00:57, Glenn Maynard wrote: > >> On Thu, Jan 6, 2011 at 6:06 PM, Charles Pritchard > wrote: > >>> I don't think localStorage should be (to web workers), but > sessionStorage > >>> seems > >>> a reasonable request. > > > It's not arbitrary: the names "local" and "session" convey

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Glenn Maynard
>> On Thu, Jan 6, 2011 at 6:06 PM, Charles Pritchard  wrote: >>> I don't think localStorage should be (to web workers), but sessionStorage >>> seems >>> a reasonable request. > It's not arbitrary: the names "local" and "session" convey some meaning. > localStorage works well enough, out in the wil

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Charles Pritchard
On 1/6/2011 3:20 PM, Jonas Sicking wrote: On Thu, Jan 6, 2011 at 3:06 PM, Charles Pritchard wrote: Shouldn't sessionStorage be made accessible? I don't think localStorage should be (to web workers), but sessionStorage seems a reasonable request. Why wouldn't that have the same threading issue

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Keean Schupke
> > > > Race conditions still happen if you (jarringly) forgot to wrap your > "shared" object inside atomic block :P. So, maybe it's a good idea to > only allow localStorage to be accessed inside an atomic block (even in > workers)? > > > Yes, that was in my original suggestion. atomic(function(sh

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Felix Halim
On Fri, Jan 7, 2011 at 4:58 PM, Glenn Maynard wrote: > A solution that makes localStorage read-only in workers is no solution. If the current implementation of localStorage is broken by opening two tabs, then why not allow workers to access the localStorage already? As you have mentioned, it is n

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Keean Schupke
> > > So long as you only allow asynchronous access the implementation can > ensure that a worker and the main thread doesn't have access to the > storage at the same time. Then it is safe to allow everyone to modify > the storage area. > > / Jonas > > This is true, serialising access would have th

Re: LocalStorage inside Worker

2011-01-07 Thread Keean Schupke
> > > Ok. But what i'm trying to say is, forcing the localStorage to use > "atomic" block is a bad idea in the main page thread since a > transaction in the main page thread can span very long time perhaps > committed by a click event. How is this any different from having a big loop an any callb

Re: LocalStorage inside Worker

2011-01-07 Thread Keean Schupke
I suggest people read about Software Transactional Memory before trying to re-invent the wheel. Minds immeasurably superior to our own (spoken in the voice of Richard Burton) have already thought long and hard about this. - It solves the efficiency problem - It solves the long transaction problem

Re: LocalStorage inside Worker

2011-01-07 Thread Glenn Maynard
On Fri, Jan 7, 2011 at 12:30 AM, Felix Halim wrote: > The usage of localStorage in the main page thread is much uglier than > any spaghetti code. Any callback could update it. Currently, everybody > uses the localStorage in synchronous mode in the main page thread and > assumes no other theads can

Re: [chromium-html5] LocalStorage inside Worker

2011-01-07 Thread Felix Halim
for most use cases, people access localStorage inside workers just because the data is already in the localStorage (like many settings and preferences set earlier on the main page). The pure data that changing, are sent via message passing instead. So, I'm talking about immutable loca

Re: LocalStorage inside Worker

2011-01-07 Thread Felix Halim
On Friday, January 7, 2011, Jonas Sicking wrote: > On Thu, Jan 6, 2011 at 7:37 PM, Felix Halim wrote: >> On Fri, Jan 7, 2011 at 6:11 AM, Jonas Sicking wrote: On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: > 5: Why not make localStorage accessible from the Workers as "read only" ? >

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
2011/1/6 Boris Zbarsky : >> since it runs scripts in their own thread. > > No, it doesn't. Shrug--it's something mentioned in Chrome-related tech talks, whether it actually, or still, does or not. It certainly runs scripts concurrently with each other, and without blocking the containing window,

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Boris Zbarsky
On 1/6/11 11:02 PM, Glenn Maynard wrote: As far as I know this only happens in Chrome Possible. since it runs scripts in their own thread. No, it doesn't. I can only hope that all other major browsers will do that eventually IE8 and Chrome have pretty similar process-per-tab-like archit

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
On Thu, Jan 6, 2011 at 10:55 PM, Jonas Sicking wrote: > Note that the above intentionally doesn't use localStorage! But rather > a different Storage object which can only be accessed asynchronously > and which doesn't overlap with localStorage. > > So long as you only allow asynchronous access the

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 7:37 PM, Felix Halim wrote: > On Fri, Jan 7, 2011 at 6:11 AM, Jonas Sicking wrote: >>> On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: 5: Why not make localStorage accessible from the Workers as "read only" ? >> >> Unfortunately this is not possible. Since localSto

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 7:14 PM, Boris Zbarsky wrote: > On 1/6/11 5:25 PM, João Eiras wrote: >> >> Not different from two different tabs/windows running the same code. > > In which current browsers do same-origin tabs/windows end up interleaving > their JS (that is, one runs JS before the other has

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Boris Zbarsky
On 1/6/11 5:25 PM, João Eiras wrote: Not different from two different tabs/windows running the same code. In which current browsers do same-origin tabs/windows end up interleaving their JS (that is, one runs JS before the other has returned to the event loop)? -Boris

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
On Thu, Jan 6, 2011 at 7:11 PM, Jonas Sicking wrote: > No, implementing the storage mutex is an orders of magnitude harder > than implementing a locking mechanism prevents the callback from > happening in multiple threads at the same time. I'm saying that with > my implementor hat on. They are two

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
2011/1/6 Keean Schupke : > Applying this to JavaScript (ignoring local storage and just implementing an > STM) would come up with something like: > 1) Objects from one thread should not be visible to another. Global variable > "test" defined in the UI or any worker thread should no be in scope in a

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
On Thu, Jan 6, 2011 at 6:06 PM, Charles Pritchard wrote: > Shouldn't sessionStorage be made accessible? > > I don't think localStorage should be (to web workers), but sessionStorage > seems > a reasonable request. Why? I've wanted to access localStorage from workers in the past, and if the detai

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Keean Schupke
Applying this to JavaScript (ignoring local storage and just implementing an STM) would come up with something like: 1) Objects from one thread should not be visible to another. Global variable "test" defined in the UI or any worker thread should no be in scope in any other worker-thread. 2) shar

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 3:47 PM, Glenn Maynard wrote: >> That said. As I have suggested before (don't remember if it was here >> or on the whatwg list), if we create a new version of localStorage, >> where you can only get a reference to the localStorage object >> asynchronously, then we should be

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
On Thu, Jan 6, 2011 at 5:11 PM, Jonas Sicking wrote: > Unfortunately this is not possible. Since localStorage is > synchronously accessed, if we allowed workers to access it that would > mean that we no longer have a shared-nothing-message-passing threading > model. Instead we'd have a shared memo

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Keean Schupke
Here's a link to some papers on STM: http://research.microsoft.com/en-us/um/people/simonpj/papers/stm/ A simple example: http://www.haskell.org/haskellwiki/Simple_STM_example Here's a tutorial: http://book.realworldhaskell.org/read/software-transactional-memory.html Here's a link to the docs:

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Keean Schupke
Did you see section 7 in the link I posted? 7 Implementations 7.1 C/C++ 7.2 C# 7.3 Common Lisp 7.4 Haskell 7.5 Java 7.6 OCaml 7.7 Perl 7.8 Python 7.9 Scala 7.10 Smalltalk JavaScript as a functional language (first class functions, closures, anonymous functions) has a lot in common with Haskell an

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
2011/1/6 Keean Schupke : > There is always Software Transactional Memory that provides a safe model for > memory shared between threads. > http://en.wikipedia.org/wiki/Software_transactional_memory > This has been used very successfully in Haskell for overcoming threading / > state issues. Combined

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 3:06 PM, Charles Pritchard wrote: > On 1/6/11 2:57 PM, Keean Schupke wrote: > > There is always Software Transactional Memory that provides a safe model for > memory shared between threads. > http://en.wikipedia.org/wiki/Software_transactional_memory > On 6 January 2011 22:4

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Charles Pritchard
On 1/6/11 2:57 PM, Keean Schupke wrote: There is always Software Transactional Memory that provides a safe model for memory shared between threads. http://en.wikipedia.org/wiki/Software_transactional_memory On 6 January 2011 22:44, Jonas Sicking wrote: On Thu, Jan 6, 2011 at 2:25 PM, Joã

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Keean Schupke
There is always Software Transactional Memory that provides a safe model for memory shared between threads. http://en.wikipedia.org/wiki/Software_transactional_memory This has been used very successfully in Haskell for overcoming threading / state issues. Combined with Haskells Channels (message

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 2:25 PM, João Eiras wrote: > On , Jonas Sicking wrote: > >> On Thu, Jan 6, 2011 at 12:01 PM, Jeremy Orlow wrote: >>> >>> public-webapps is probably the better place for this email >>> >>> On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim >>> wrote: I know this has bee

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread João Eiras
On , Jonas Sicking wrote: On Thu, Jan 6, 2011 at 12:01 PM, Jeremy Orlow wrote: public-webapps is probably the better place for this email On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: I know this has been discussed > 1 year ago: http://www.mail-archive.com/whatwg@lists.whatwg.org/ms

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jonas Sicking
On Thu, Jan 6, 2011 at 12:01 PM, Jeremy Orlow wrote: > public-webapps is probably the better place for this email > > On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: >> >> I know this has been discussed > 1 year ago: >> >> http://www.mail-archive.com/whatwg@lists.whatwg.org/msg14087.html >> >>

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Glenn Maynard
> On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: >> >> I know this has been discussed > 1 year ago: >> >> http://www.mail-archive.com/whatwg@lists.whatwg.org/msg14087.html >> >> I couldn't find the follow up, so I guess localStorage is still >> inaccessible from Workers? I've been frustrated

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jeremy Orlow
public-webapps is probably the better place for this email On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: > I know this has been discussed > 1 year ago: > > http://www.mail-archive.com/whatwg@lists.whatwg.org/msg14087.html > > I couldn't find the follow up, so I guess localStorage is still >

Re: [chromium-html5] LocalStorage inside Worker

2011-01-06 Thread Jeremy Orlow
(oops, apologies for not cleaning up the subject line before sending this!) On Thu, Jan 6, 2011 at 8:01 PM, Jeremy Orlow wrote: > public-webapps is probably the better place for this email > > On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim wrote: > >> I know this has been discussed > 1 year ago: >