netlist language for combinators.

Post all other topics which do not belong to any other category.
NotABiter
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Nov 14, 2014 9:05 am
Contact:

Re: netlist language for combinators.

Post by NotABiter »

Gus_Smedstad wrote:I agree that I don't see much point in a language that can be compiled to create blueprint code. If you're going to do that, just paste the blueprint code.
But what if you wanted to make something like, oh, I don't know, a character generator ROM that has 3,000+ requester chests, all individually configured (encoding character data to be "initialized" by logistics bots with different materials/"values"), and has 3,000+ smart inserters, also individually configured (implementing the read and addressing mechanisms), wired up to 200+ electric poles using three different logical nets in a somewhat involved wiring pattern that minimizes the number of electric poles and the wiring distance?

In that case you can either spend multiple full-time days configuring everything by hand, introducing many, many errors along the way, and get to do much of that all over again whenever you wish to load a different font into your character ROM (or have to make a systematic design change)...

...or you can algorithmically describe the whole thing with a couple hundred lines of reasonably readable code (along with font data pulled from whatever source you like) and have it done rather quickly. In my case I just used Java as my "hardware description language", along with some library code that takes care of the details (e.g. translating nets to wiring, doing validation checks, exporting an XFig diagram, exporting the blueprint string, etc.).
Gus_Smedstad wrote:the wiring is much, much harder to see than transport belts and inserters
See the (XFig) diagram included in the second post linked above (and the text there that describes it). While wires are somewhat easier to see there than in Factorio (but not entirely as wires along the exact same path can hide each other), the real benefit is that the diagram includes the net information visually. That lets you do spot-verification that the idea you described algorithmically is coming out as intended. (Checking nets is much easier than checking wiring, and there's zero need to hand-check the wiring because the library code ensures it 100% matches the net, otherwise it generates an error - even marking up the diagram to show where things went wrong.) I had plans for adding more information to diagrams the library code generates (e.g. the config data for the individual smart chests and smart inserters so those could also be spot-checked and so shared diagrams would be more understandable to others) but didn't get around to it. (I kind of stopped playing Factorio sometime after 11.16 and just recently grabbed 12.12 and started a game. I haven't even played with the new logic stuff yet, but based on what I read in the release posts I don't think any of the features added since 11.16 are going to hold my interest for long.)

Post Reply

Return to “General discussion”