5 ms·
Okay, reading another one of your posts I think I've gained a tiny insight into what you're trying to get across. You have the assumption that "Talking to hard
by TheZenPsycho 13y ago
Okay, reading another one of your posts I think I've gained a tiny insight into what you're trying to get across.
You have the assumption that "Talking to hardware" necessarily involves dealing directly with binary protocols. And javascript isn't good at that. (though it CAN do it, if pressed)
And you're right on both counts.
I think what you are missing though is that on a product like this, why wouldn't you do the binary protocol stuff in a C module and expose a nice easy api in the scripting language as is the usual practice? In the presentation it very much looks like that is exactly what they do.
- cbsmith 13y ago> You have the assumption that "Talking to hardware" necessarily involves dealing directly with binary protocols. I wouldn't say that it necessarily involves dealing directly with binary protocols, but the issue tends to come up. Particularly when talking with hardware that can't just easily be upgraded, you often find that even "text" based protocols might require some manipulation at the byte level in order to decode them successfully. But really, the binary protocol aspect was just a really obvious and simple example of the larger "square peg, round hole" aspect of using JavaScript for the task. Maybe JavaScript makes working with hardware more accessible than other choices, but I doubt it. > why wouldn't you do the binary protocol stuff in a C module and expose a nice easy api in the scripting language as is the usual practice? I'd argue once you've done that, you're done. The hard part about the "internet of things" is that devices generally don't have a nice clean API's, and that's what needs to change. Once you have a nice API, you can embed a JVM in their quite cheaply and then support almost any language web developers might want (including JavaScript), and quite cheaply and efficiently at that. Better still, just do a simple REST-ful interface and leave it to the developer to do whatever they want.
- TheZenPsycho 13y agoYou have a really incredibly weird definition of "quite cheaply" that I am not familiar with.
- cbsmith 13y agoWell, considering we're talking about a $90 product that already has an ARM Cortex-M processor in it, it seemed it'd be hard to argue with the "quite cheaply" argument: http://www.st.com/web/en/catalog/mmc/FM141/SC1169 http://www.st.com/web/en/catalog/mmc/FM141/SC1169 (particulalry since you can get free samples).
- TheZenPsycho 13y agoa $90 product that you want to ruin by putting the JVM on it.
- unclebucknasty 13y ago>why wouldn't you do the binary protocol stuff in a C module and expose a nice easy api in the scripting language as is the usual practice You guys have been going at it for a while on this thread. I thought what cbsmith was saying the entire time couldn't have been clearer. I also think your statement here completely concedes his/her point. You went from calling him/her an "old man" (your words) for not accepting your contention that Javascript can do it all, to advocating the use of C to handle the stuff it doesn't do well. C. That pretty much says it all.
- TheZenPsycho 13y agoOkay so he/sh was preaching to your choir. But s/he needs to work a little harder to persuade or teach someone who isn't already convinced. I never said javascript could do it all. I said that it happens to not be true that javascript doesn't have a native way of dealing with binary. It turns out it does. that's not everything. That's one thing.
- unclebucknasty 13y ago>But s/he needs to work a little harder to persuade or teach someone who isn't already convinced It was pretty clear. You just didn't seem to be in learning mode. Your "old man" comment was dismissive on its face and you made assumptions rather than ask thoughtful questions. You said yourself that you understood once you went back and re-read. There wasn't anything new there. >that's not everything. That's one thing. It's the thing with regard to that discussion.
- TheZenPsycho 13y agoI honestly have no idea what you are talking about. He had nothing but dismissive comments about the language. There was nothing to learn or ask questions about. it only finally slipped out of him almost by accident what he was actually trying to get at, and even that isn't much of a relevant point. I don't buy your depiction of events at all.
- 13y ago