Sometimes asking the question helps you arrive at the answer, especially
when you have to explain to us people without the context why our
answers weren't what you were asking!
I am only vaguely familiar (as in "heard of it") with processing.js. Is
it typically run client-side in the browser, or server-side in a JS
interpreter? What's it intended for? Certainly wanting to use
processing.js is one reason to do things in javascript.
I don't think trying to get in-browser javascript to read in a text
file.... is going to be a very easy thing to do though. (Or a very
possible thing to do, depending on exactly where this text file is
located).
On 12/1/2011 1:35 PM, Nate Hill wrote:
> I should have provided a bit more information here.
>
> Here's a rough in-progress view of what I'm up to.
> http://www.natehill.net/loadsketch/donerightclasses.html
>
> I was using processing.js to read a file and then visualize some of
> the data... you can see the circles are being generated from the
> values in the .txt file.
> The actual text in the right column isn't being rendered as html, it's
> being drawn in the canvas... which is stupid, i need it to be html and
> actually do some stuff with it.
>
> I'm going to rethink my approach on this whole thing, it may have been
> flawed from the start. Thanks folks.
>
> N
>
> On Thu, Dec 1, 2011 at 10:24 AM, Jonathan Rochkind <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> Well, you need to use javascript if you want it to run in a
> browser. So that's one reason to pick it, and the main reason
> people pick it for it's most popular uses.
>
> It will be very difficult to get javascript running in a browser
> to do what you just said though. Not sure if you were running your
> js in an arbitrary client's browser, or server-side.
>
> You _can_ run javascript server-side, but it requires setting up a
> JS interpreter of some kind, etc., and most people don't do it
> just for the heck of it, they do it because they have some
> specific reason to want javascript for that. They want to be on
> the cutting edge trying out crazy new things, they just love
> javascript, they particularly want the non-blocking functionality
> of the node.js server, they need to interact with other libraries
> of functions already written in js, they have some crazy plan to
> share code between server-side and client-side, etc.
>
> So, yeah, I think you were on the right track, I'm not sure why
> you were trying to do that in javascript either!
>
>
>
>
> --
> Nate Hill
> [log in to unmask] <mailto:[log in to unmask]>
> http://www.natehill.net
>
|