
DeviceJS is Javascript for the Physical World - sebg
http://devicejs.org/
======
sebg
"DeviceJS is a JavaScript based development platform for reacting to sensors
and controlling devices. It’s built on top of Google’s V8 JavaScript engine,
Node.js and a real-time JSON database."

Fascinating. JavaScript really is slowly becoming the lingua franca of
everything.

~~~
CompelTechnic
Atwood's law keeps on showing itself to be more and more prescient.

~~~
jiggy2011
Just looked that up, but it seems like more of an argument for "most
universally executable language" rather than "least powerful".

The problem with Javascript ironically is that in some ways it is _too_
powerful. People want a simple scripting language with a basic type system but
instead get a psuedo-functional/psuedo-OO language with a type system
construction kit.

JS programmers and library designers seem to expend a lot of effort beating JS
into the sort of language they want to use, the result is that many JS
programs may as well have been written in entirely different languages.

~~~
chapel
Maybe due to that flexibility, it becomes the language they want. Where as
other languages don't offer what they need/want.

Many people look at JavaScript's flexibility as a bad trait, but to skilled
programmers, it becomes a great tool.

~~~
jiggy2011
That may be true, but the principle of least power is all about picking low
powered languages so that the programs become extensible to people with lower
skill.

------
wiradikusuma
Interesting concept but weird choice of language. Yes, JS is popular, but
that's because it's the only language supported universally by all browsers.
And now people are moving away from it (CoffeeScript, Dart, etc), this project
embraces JS. Or maybe JS is now the new JVM?

~~~
altrego99
Javascript appears to be a language that everyone knows or has used at some
point of time. It is ubiquitous because of the web. As opposed to Lua, Scheme,
Scala, Python, etc., this will expose it to all programmers.

It is one of the best languages for scripting and event based management of
objects.

Also as LLVM is maturing, it will be easy to build a layer on top of it for
most popular languages - if at all needed - though that need would only be for
comfort and previous exposure to that language than anything else.

May be that is why Javascript was chosen.

------
geuis
My curiosity is piqued but I'm at a loss. Where's the code? I read the page a
couple of times but I don't see any links to code or anything.

------
edwinvdgraaf
Besides the argument about JS, the thing that is holding me back the most is
their "cloud service".

"The Relay connects WigWag and third party devices to our cloud service, which
allows your stuff to interact with many Internet services, such as email,
Dropbox and Twitter. It also makes your sensors work together, so they and the
rules they activate are smarter."

I can't really understand why this cloud connectivity is required? But
personally I feel quite some reservation towards storing this kind of data
remote.

------
pallandt
We've ufortunately DDoSed the site.

From Google cache:
[http://webcache.googleusercontent.com/search?q=cache:mr8RddZ...](http://webcache.googleusercontent.com/search?q=cache:mr8RddZk-
rUJ:devicejs.org/status/+&cd=1&ct=clnk)

This is not available yet, and appears it will only run after the developing
company, WigWag, completes their Kickstarter campaign and start shipping
products.

The nice thing though is that besides being able to run on their proprietary
device, it will also run on Raspberry Pi.

------
rwaldron
Do this today with Johnny-Five: [https://github.com/rwldrn/johnny-
five](https://github.com/rwldrn/johnny-five)

~~~
dccoolgai
Johnny 5 is a great project with some realy smart people, but I don't like how
it abstracts arduino so much. I prefer just messaging with node-serial.

~~~
rwaldron
The abstraction is the whole point, so I guess you either love it or you don't
;)

------
dlrush
No kudos for picking the worst language around to run on hardware which may
have mission critical requirements. When a device sensor heart rate stops
reporting data, will your JS code return undefined, null, NaN, 0 or something
else? Who needs mature error handling? Low memory requirements? No problem, v8
will have a reasonable memory footprint by 2024.

~~~
lukifer
Because as we all know, code written in C can't ever crash or suffer from
memory leaks.

I don't think anyone's advocating JS for life-and-death use cases. It's all
about the right tool for the job, there's no reason to write off any
particular language or environment _a priori_.

------
rpedela
How do you deal with numbers that cannot be precisely represented by a 64-bit
float? There are many sensors that require much higher precision. If
Javascript's extremely idiotic number issue ever gets fixed, then I think this
is a great. But until then, I don't see the point of using Javascript for
sensors.

~~~
binarymax
While it's not a great solution, and is rather clunky, this can be overcome by
buffers/typed arrays.

------
GoNB
Is there a project like this, but Lua instead of JavaScript?

~~~
russellsprouts
I agree. Lua is the perfect language for this.

