3 ms·
Looks pretty cool. I'm not sure I'd really want to design an electronics project in jsx though. That's just xml, but also JavaScript. And I guess I think of it
by looneysquash 2y ago
Looks pretty cool.
I'm not sure I'd really want to design an electronics project in jsx though. That's just xml, but also JavaScript. And I guess I think of it more as data than as code.
I was thinking a simple language would be nice, something alternative to a GUI and mouse.
But I was thinking more along the lines of LT Spice's netlist. Or plantuml. Or markdown
Also, I was thinking of html and css. But not so much the syntax as the separation of structure and styling.
You could even have two "stylesheets", one for the schematic and one for the board
- seveibar 2y agoReally appreciate the insights!! I think JSX/TSX are a lot more powerful than most data representations because 1) you can modularize and import sub-circuits really easily and with an effective known pattern (the npm registry installation pattern) 2) you can compute pretty complicated data from relatively simple React components, e.g. <DualInlinePackage pad_count={6} /> produces 6 pads with standard spacing. I also think it's really powerful you can add type validation (e.g. any odd number is invalid for pad_count). I'm counting on smart people creating awesome patterns/higher-level-components just like they did with React for web!
- sesm 2y agoIt kind of interesting to think, how can you define 'React for X'? My best definition would be: - JSX syntax - Immediate Mode - style API (computing inside UI code and having the same semantics as if it's recomputed on each render frame)
- fendy3002 2y agoYeah because jsx is popularly used by react (and even maybe the first?), people associate jsx as react. We need more jsx (tsx) outside of react, or compilable / type definitive xml.
- micael_dias 2y agoYes, JSX was created for React. It was at the time a controversial syntax that most disliked. There’s a great Honeypot documentary on React that goes over it.
- kennywinker 2y agoYou might be interested in atopile or pcbdl - they’re much more like what you’re describing https://atopile.io/ https://atopile.io/ https://google.github.io/pcbdl/doc/_build/html/readme.html https://google.github.io/pcbdl/doc/_build/html/readme.html
- philsnow 2y ago> And I guess I think of it more as data than as code. What about OpenSCAD? I haven't looked into tscircuit very much and I barely remember any of the vhdl I did in college, and maybe it's more useful/relevant to make parameterized 2d/3d shapes rather than parameterized circuit components, but I have always been more comfortable with typey-compiley rather than pointy-clicky.