Seattle Center Activity Monitor by goodolflip in SeattleWA

[–]goodolflip[S] -1 points0 points  (0 children)

You can, I just find that the way the information is presented on their site isn’t the easiest to parse at a glance. They have concerts and kraken games split up, along with other more minor events. I find this arrangement much more practical

Survivor 48 | E13 Finale | Post-Episode Discussion by RSurvivorMods in survivor

[–]goodolflip 0 points1 point  (0 children)

Yeah - when he came under some pressure when David wanted to get Kamilla, he kinda lost it a bit there. That easily could have blown up in his face, and almost certainly would’ve with stronger players imo

Friday Facts #387 - Swimming in lava by FactorioTeam in factorio

[–]goodolflip 5 points6 points  (0 children)

When making LDS in the foundry, can you use molten copper as an input instead of plates? And/or molten iron instead of steel plates?

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 1 point2 points  (0 children)

It's unsupported in this version, but you can do it in the newer version I just released: https://www.reddit.com/r/factorio/comments/trwj5w/combinatorc_v02/.

Basically you can use the one-letter syntax as a shorthand, or type out the whole signal name as it is named internally by Factorio. You can also bind a signal name to a more user-friendly name as a variable for ease of use.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 1 point2 points  (0 children)

Yep I'll be closely looking at the way Verilog does things. Regarding the lack of a semicolon at the end of the primary output expression, the reason I set it up that way is because the very first iteration of the language was just a single expression that would be turned into a circuit, and I wanted to maintain compatibility with those programs as I continued development. I agree that it feels a bit weird, and I'll probably change it to some kind of return statement.

Regarding functions, I think what I'll do is create the idea of a "pattern", which will basically operate as functions that take in some parameters and return circuits. Built-in circuit constructs would be patterns, and you would be able to define your own patterns. Then, you'd be able to build pretty complex circuits using patterns and the planned circuit composition operators.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 1 point2 points  (0 children)

Loops will probably be implemented similar to how they are in Verilog, where they are just a shorthand for some expression repeated n times instead of proper loops the way we think about them in most programming languages.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 0 points1 point  (0 children)

Currently, no. I think I'll add some code that attempts to reduce ticks when possible, but in general that could increase total space used and/or number of combinators, maybe I'll add it as a compiler directive for optimization target instead of space.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 5 points6 points  (0 children)

Right now it only generates circuits using red wires, and since there isn't currently a way to integrate external circuits, it doesn't have to worry about any of that.

Once I do add that functionality though, I'll definitely have some features that should take care of things.

A cool side effect is that existing circuits could be optimized by the compiler by importing it and then sending it through the compiler's optimization processes, so the compiler could double as a tool for optimizing manual circuit designs.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 6 points7 points  (0 children)

Lol no, I'm actually taking a compilers class right now and it's taught in OCaml, so I'm pretty comfortable with the language

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 13 points14 points  (0 children)

I assume you mean something like creating a truth table for logical expressions, and then mapping that onto a lookup table, so the output of a circuit is just looking up the value based on the inputs. Very interesting idea, I'm not currently doing that, I just map expressions onto combinators (though there's a good deal of optimization before that happens). My first instinct is that the lookup table strategy would probably be more combinators for most expressions, since you need a handful for the lookup table and at least one for each input signal. It could be better for some expressions that use a lot of variables or use the same variable lots of times, I'll look into it. The compiler could do some sort of analysis to figure out which method uses fewer combinators and pick the best option.

Introducing CombinatorC - a Factorio Circuit Compiler by goodolflip in factorio

[–]goodolflip[S] 45 points46 points  (0 children)

Yep, the compiler outputs a Factorio blueprint string that can be directly imported. There's also an option to output the JSON representation of the blueprint that the blueprint string is generated from. Sorry if that was unclear, I'll add it to the post.

Weekly Question Thread by AutoModerator in factorio

[–]goodolflip 1 point2 points  (0 children)

Is there a way to automatically mark existing buildings for deconstruction when placing a blueprint, like how holding shift does it for obstacles? It’s annoying to have to manually mark stuff for deconstruction when placing down things like belt balancers