technicalmachine / fractal-docs

A brief introduction to Fractal: Software Defined Hardware
15 stars 2 forks source link

Design Goal Question #11

Closed Student007 closed 9 years ago

Student007 commented 9 years ago

Am I right by expecting your goal is the following ? "While Tessel is the hardware to prototype with JavaScript, Fractal will be the tool to scale by downsizing the necessary hardware elements and firmware ready for manufacturing partners. Everything with simple knowledge of Javascript and basic electronics"

Of cause it is some work to get there. And of cause at the moment Tessel is also not JavaScript-Only ready. But Tessel will be more and more like this. So the question is: Is this the final goal also for Fractal ? This would be awesome !

kevinmehall commented 9 years ago

Fractal is designed to be as easy to get started with as Tessel, but then scale with you as you do more advanced things. There's still quite a bit to learn to manufacture a good product, but we're trying to make that process easier and provide a path to follow. It's likely you'll want to port your domain logic to a language other than JavaScript to keep hardware costs down and performance predictable as you go beyond the prototyping phase.

Student007 commented 9 years ago

Hmm ... that's very pity.

I think in many cases the Tessel would be too expensive (but my favorite choice to prototype). By expecting I would need more experiences and skills than JavaScript + a good idea what is worth to scale, I will forgot about to follow realizing ideas with Tessel (It is not possible to plan).

Can you give me an example why it is not possible to design a Fractal-Related tool what makes it possible to transfer a well running Tessel-Prototype to a ready for manufacturing Data-Set ?

In my opinion it isn't important I go for scaling with a maximum possible efficient unit, but being able to produce a individual Tessel with no WLan but BLE and a USB-Port maybe. And when I would produce 100 or 1000 of this units, I can see Ardurinos BLE for $10 from china.

Or do I misunderstand you? Did you mean Fractal is a totally different project what is not related with Tessel ? This would mean to me I have to start with Fractal directly if I plan to make money with a great idea?

If so: Do you know Appcelerator Titanium? They manage to use JavaScript to use the native development engines. So they produce the same result as native development. This could be a possible solution ? If you would define an additional level for hardware-JavaScript (like CommonJS what Appcelerator uses) you could convert this to C for better performance. If you would add an additional lib for managing hardware-interrupts and callbacks into the same query it should do the job to give people like me the chance only to think about JS :-) And what fractal do under the hood shouldn't be my question further - I only should think about whether my unit tests run the "black box" successfully. (Maybe it would be good to know you can give me payed support to manage this issues - so I could start prototyping now)

Btw: This issue isn't closed ... ;-)

kevinmehall commented 9 years ago

There are a few options when it comes to hardware:

See my blog post for details on the relationship between Tessel and Fractal. Fractal will be able to generate code for Tessel hardware, and will make Tessel better even if you don't want to make your own hardware.

Appcelerator Titanium embeds a JavaScript runtime in the binary along with bytecode for your program, exactly like Fractal does if you write a component in JS. That JavaScript runtime takes a huge amount of RAM and CPU compared to traditional microcontroller code, and won't fit unless the processor is able to handle external memory (like Tessel). It's impossible to compile JS to C in the general case because you don't know the types before running the program. This is why JS compilers use JIT techniques to optimize based on the observed types at runtime. Because of garbage collection and JIT, JavaScript doesn't have the deterministic performance needed to write interrupt handlers and other low level code.

As always, the more you know (or are willing to learn), the better the end result will be. Fractal will make the process easier, but it's not magic.

Student007 commented 9 years ago

Thanks for explanation.

I know the blog post, what is the reason I got the idea of scale.

In my opinion it should be possible to design a tool (Fractal) you are very limited by choosing options. But options make sense for reducing cost and size of PCB+Assembling.

For example: I want to scale a Tessel without Wifi but BLE and Camera Module. The Tessel doesn't need the Wifi-Components and a much smaller CPU would fit - Maybe I need more RAM (OR less but SD Module).... this is what Fractal should do !!! Also it should do showing maximal pricing for components to calculate. This also would be possible. And finally I push on buy and you organize production :-) (of cause less then 25% cheaper than buying 100 Tessels)

I cannot belief I will get problems by a simple 4-layer board. It is no 50 Layer-Board like in Telecommunication-Servers. So it would be possible to prepare designs a JS-Creativ-Designer like me would simple "choose" by being sure my prototyped Tessel-Version will run on a manufactured PBC+Assembled (like an individual Tessel...).

In that case it would make sense to talk about JS/software driven hardware. Because I can scale without risk/additional knowledge. Elsewhere we only talk about Software driven hardware prototyping for fun and impress stupids. Whether you earn money by sending a reviewed design to the right manufacturer or a different way like getting the ability of using the "drag&drop 2 fit 4 perfect production" is a different discussion and maybe a TM internal question.

But I couldn't see reasons it doesn't work after reading your answer.

Please answer/comment the "simple choosing without risk" thoughts :-)

Student007 commented 9 years ago

About Appcelerator Titanium: CommonJS is used not ONLY to embed JS. It is used to build an unique api to access native UI Elements. What I mean learning for Tessel/Fractal by this: Tell the user is prototyping with his first Tessel: "There are JS parts you write, we will not only transpile to Lua Jit - we will make it native C. But Everything doesn't fit this "special" syntax (or doesn't run in a special object) will only transpiled to Lua and run in Jit mode". So a developer knows he can decide to write clean code to get best performance by Fractals solutions. I found https://code.google.com/p/js2cpp/ - maybe this is useful for integrating ? By searching I found also this http://hardwarejs.io/ LOL ....maybe this helps ... ;-)