Better HN
topnewbestaskshowjobs
Log inSign up

fl3x

11 karma · joined Jun 18, 2010 (16y ago) · 8 submissions

Submissions

comment 14y ago · link · parent

That could probably work!

The documentation at http://dev.w3.org/html5/spec/offline.html#disk-space states that "care should be taken to ensure that the restrictions cannot be easily worked around using subdomains", so one would really have to use different domains as you write, which sounds a bit costly.

comment 14y ago · link · parent

Sorry for nitpicking, but I think local storage is a part of Web Storage (http://dev.w3.org/html5/webstorage/), and not Application Cache (http://www.whatwg.org/specs/web-apps/current-work/multipage/... or http://dev.w3.org/html5/spec/offline.html).

I think that the Application Cache quota is not strictly connected to the local storage and session storage limits.

comment 14y ago · link · parent

I think Opera Mobile shouldn't have this cache problem either, similar to my comment about the desktop version. The default cache limit in Opera Mobile is ~2 MB.

I _believe_ that both quotas can be increased after confirmation from the user, but I haven't made any tests.

comment 14y ago · link · parent

I don't think either notifies you about the background transfers, but e.g. Operas default cache limit for Application Cache is ~50 MB according to http://www.opera.com/support/usingopera/operaini/.

comment 14y ago · link · parent

This is not an issue in either Opera or Firefox. The title should probably reflect that it's limited to Chrome (and possibly other Webkit browsers + IE?).

comment 14y ago · link · parent

Edit: The numbers are only for the C implementation so they don't add much to the discussion. Sorry for posting too quickly!

I don't know about this library in particular, but there's some numbers available on http://liblzg.bitsnbites.eu/ for a similar library.

(The same author has also made a library for self extracting javascript code: http://crunchme.bitsnbites.eu/. Pretty cool, but probably not that useful outside of the demo scene.)

comment 15y ago · link · parent

There are plenty of implementations linked from http://en.wikipedia.org/wiki/QuickCheck. (I'm not sure in what state they are though.)

comment 15y ago · link · parent

You can escape the purely functional part (to do IO for example). This library does however provide 2 implementations: one in the IO monad and one in the ST monad.

If you use the IO monad one then you can do whatever side effects you want. It's up to you to use the rest of the code in a responsible way (which means that you can write code C style if you want).

The ST monad version is quite nice, it lets you use the hash table as if it was modifiable, but only inside the ST monad. Looking at it from the outside, it's still purely functional, and within the ST monad you're restricted to purely functional programming and the facilities provided by the ST monad. This makes it a safe alternative when you want to use a hash table for performance reasons but still want to limit what side effects that can be used.