On Mar 6, 4:07 pm, Slide <[email protected]> wrote:
> javascript as embeddable scripting capability, but without a standard
> library with file I/O, imports, network, and other wrappers, it
> doesn't quite fit the bill yet. Is anyone else interested in this idea
> or am I completely off my rocker? :-)

i'm philosophically right there with you, but i have my doubts that v8
is yet mature/stable enough to host such a project (or projects).
Since v8 is still relatively new, and we (as client developers)
haven't yet figured out all of the subtelties of using it, all of us
are experimenting like mad (and a lot of extra experimentation is
necessary solely because the v8 developers don't document their code
terribly well). So, i think v8's community is still at a larval stage,
and that the conventions, idioms, etc., which we dream of aren't quite
ready to come about. Give it some time and they will naturally evolve.

For example, Alex's articles on implementing weak pointers are the
only source of information i've yet found on the topic. To me, that
says that v8 doesn't yet have much of a following (or, i would assume,
more documentation would crop up). This mailing list, though it has
several hundred registered users, is another interesting case -
message traffic is normally under 10/day, AFAICT. v8's presence is
still larval. And we're the larva :), and i think i can count on 5
fingers the number of active posters this week.

i've only been using v8 for... 8(or 7?) days, but in that time i've
been able to be relatively productive with it (ncurses, sqlite, +io
wrappers, for example), despite the relative lack of documentation (i
got lots of use out of Alex's blog posts, though) and having to add a
significant amout of infrastructure of my own (e.g. to simplify type
conversions between JS/C++ types, bind natives type-safely to JS, and
add "supplemental" Garbage Collection to make up for v8's
nondeterministic GC). That said, i've got several significant concerns
about it's usability for addon authors. It's has a few properties
which make authoring add-ons particularly problematic in some ways
when compared to SpiderMonkey (which has its own set of problems, but
they're much different problems than v8 has). As long as some of those
concerns remain the status quo, i honestly can't say right now if i'll
be sticking with v8. For example, if the no-GC-at-shutdown policy
stays the same forever, i'll be quite disappointed. i literally lost
sleep over that last night. To me that decision is such a no-brainer
("properly clean up objects or exit the app more quickly? Hmmm...")
that it pains me to even consider that some intelligent developer went
the other direction on that choice. And if such a simple decision can
be so botched, then what other kind of botch-jobs can we expect?
(Sorry to be so harsh there, but i feel REALLY strongly that
intentionally letting arbitrary objects leak is a cardinal sin,
especially when the v8 docs say that the WeakPointerCallback will be
called to clean up those objects.)

> import("system.io");
> import("system.security");
>
> file = new system.io.File("/path/to/some/file.txt", "w");

i added a IODevice class to my addons this morning, by the way :)
http://fossil.wanderinghorse.net/repos/v8-addons/index.cgi/wiki/addon-whio

> file.write("Hello, world");
> file.close();

and that's what the API looks like, unsurprisingly. The underlying i/o
library supports near-arbitrary back-ends, but some unfortunate design
decisions in v8 make it impossible to re-use InvocationCallback
functions (e.g. pass arg subsets from one InvocationCallback() to
another one), and that aspect is giving me no end of grief (ending
with the limitation that the JS binding only supports files, and not,
e.g. in-memory I/O devices or client-added back-ends).

> md5 = new system.security.MD5();
> hash = md5.hash("some text to hash");

i do agree, in principal, that all of this needs to happen at some
point. But i'm of the opinion that v8 as a project and as a community
isn't *quite* yet ready for it. It is, however, quite ready for
boatloads of experimentation (which we've already seen happening on
several fronts).

That's my 0.02 Euro.

:)
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to