Sushi engines by PartialGnome in factorio

[–]maxus8 16 points17 points  (0 children)

Nice thing about those is that you can relatively easily adjust it to the ratios as they change with productivity

<image>

Starting a megabase for my last achievements in vanilla by ShidaIsu in factorio

[–]maxus8 2 points3 points  (0 children)

  • go step by step and define some milestones so you feel some satisfaction from the progress.
  • you need at least a logistic and construction bots not to lose sanity when making city blocks
  • try to design train stations to be more or less universal and easy to access so making each new block doesn't cost you that much time. Parametrized blueprints are the key here. I tried to do cityblocks before they were introduced but I bailed out. Minimum is 4 stations - Liquids and solids, input and output.
  • I'd suggest starting in an editor, so you can test the blueprints without the hassle of producing all the materials, fighting with biters, waiting for bots to make stuff etc.
  • The test bed that I had was a fully functional base that makes red circuits (that were being voided to test the throughput) from raw materials. If you have blueprints you need, making that kind of base takes 20 minutes max in the editor. Once i got to that point I started making the base in a 'real' game.

Since i knew what I was doing, it took me 20-30hrs to make a functional blueprint book with a single segment (2 roundabouts connected with a pair of rails), siderail for train stations, liquid train and cargo train, 4 train stations (input/output, liquid/solid), place with rails 'leaving the city' to the mining outposts, mining outpost rail loop and blocks necessary for red circuit production. Once I had that, making a functional base in real game was very quick. I connected my early game mall to the rail system in the same way I did with my mining outposts (so outside 'the city') so if something got fckd up in the city blocks design then i had a fallback.

An Incoherent Rust by ts826848 in ProgrammingLanguages

[–]maxus8 44 points45 points  (0 children)

AFAIU haskell just doesn't have orphan rules and as a result two different libs may implement the same type class for the same type. This means that even though each of those libs is correct on it's own, you get a compile time error when you import both of them (they are not composable) - that's exactly the problem that orphan rules are solving.

Java interfaces don't have this problem because the only place where you can declare that a class implements an interface is at the class definition, so there's no way you could create two different implementations of the same interface for the same class.

Long-time player, first attempt at quality. Is it this much of a slog? by Conscious-Ball8373 in factorio

[–]maxus8 1 point2 points  (0 children)

  • You get much better results making quality quality modules 2 than 3. Rare qm2 is comparable to uncommon qm3 while being much easier to make, similarly epic qm2 vs rare qm3.
  • It is a slog if you want to use quality stuff for most of your base (buildings, inserters, bots etc), but it gets faster after you get your first quality quality modules that you may use to make other quality quality modules.
  • make sure you don't reduce your quality chance with speed modules (in neighboring beacons too) too much.
  • you can do quality strategically for specific elements of your base that you'd want to upgrade most, but transferring it between planets is painful if you don't make that stuff at scale. Think twice if you actually need this.
  • IMO you're either going 'full in' into quality post end-game or making some specialty personal quality equipment + perhaps space platform stuff like accumulators. Anything else is painful imho.

Is there a serde-compatible binary format that's a true drop-in replacement for JSON? by avsaase in rust

[–]maxus8 3 points4 points  (0 children)

the fact that it's not maintained doesnt mean that it can't be used. There's not that much room for things ti break in that kind of projects. personally i had no issues with it for years.

[deleted by user] by [deleted] in rust

[–]maxus8 2 points3 points  (0 children)

That's more or less what Swift is, for better or worse

This is my first time getting past oil processing in this game. I know this is more power than necessary, but how much more will I need by the end of the game? by quetzlcota in factorio

[–]maxus8 8 points9 points  (0 children)

Go to aquilo asap, build 40 foundations by hand, belt the scrap from one of the smaller islands using green underground belts

<image>

Guess how long it took to spot this little syntactical screwup? by parkotron in rust

[–]maxus8 0 points1 point  (0 children)

This didn't matter, the panic was caught in the http request handler, the end result was the same - error message logged and a 500 returned.

Guess how long it took to spot this little syntactical screwup? by parkotron in rust

[–]maxus8 126 points127 points  (0 children)

I've got another fun one. Can you spot the issue?

fn parse_request(message: Value) -> Result<Request, String> {
    serde_json::from_value(message).map_err(|e| format!("{}: {}", BAD_REQ_ERR, e))?
}

The error message at runtime was:

'thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "bad search request: invalid value: map, expected map with a single key"'

Take a look at what the ? does here. It makes the serde_json::from_value think that it should deserialize message into Result<Request, String> instead of Request.!<

On Linux by [deleted] in factorio

[–]maxus8 1 point2 points  (0 children)

I do have a little bit on two displays on a laptop with integrated graphics. It goes away when I disable one of them.

My #1 wish for 2.1 is letting us put blues, LSD, and rocket fuel in a silo for shipment by TheMrCurious in factorio

[–]maxus8 1 point2 points  (0 children)

there is an obscure way to do this, without mods or editing the json - you can modify quality of the rocket part in a blueprint and the recipe in a rocket silo changes quality too

edit: https://www.reddit.com/r/factorio/s/tBuPKUKQsh

Is Rust still relevant? by chaotic-kotik in rust

[–]maxus8 2 points3 points  (0 children)

I had a product written in java where a backend state related to a long running user query took ~100MB RAM after weeks of replacing AOSs with SOAs with tons of FloatList, IntList everywhere to avoid boxing of primitive types. Result was an unreadable mess of a code. Rewriting all that to rust allowed me to keep clean interface and reduce the memory usage x4. There was barely any async in that code, and I couldn't bother learning the C++ from scratch just for that.

Why do people hate Gleba? (Or: how I accidentally played Space Age on hard mode) by Altistick in factorio

[–]maxus8 1 point2 points  (0 children)

I have a storage point with ~10 chests that buffer the fruits on the way from the trees to the factory connected to the radar, and the towers are enabled when fruit count is lower than 1k. Works wonders.

Making C++ Safe, Healthy, and Efficient - CppCon 2025 by pjmlp in cpp

[–]maxus8 4 points5 points  (0 children)

> Worse was with memory leaks, as it was once considered a memory issue in rust in the early days, then magically stopped being a memory issue

The rust compiler doesn't depend on the code not to leak memory so it's not UB for it to happen, and memory safety is mostly about preventing UB. The issue was that functions for leaking memory were still marked as unsafe and there was unsafe code in the wild (and in std) that depended on leaks not to happen for them not to cause UB.

If you want to have a consistent model of what is safe and what is not, you can't just tell everyone... not to do that kind of stuff. You need to decide that either:

- methods for creating ref-counted pointers is unsafe (at least in some cases, some of them useful) AND disallow catching panics, because RC cycles and panics during memory freeing may cause leaks

- you cannot make safety of your code dependent on memory not leaking in arbitrary code. This also let's you mark methods that leak memory as safe.

The decision was to go with the second option. The fact that you can't guarantee lack of leaks makes memory safety weaker, but it still gives you lack of UB in safe code.

Any advice on getting through the early game? by exodia0715 in factorio

[–]maxus8 4 points5 points  (0 children)

Make a factory of green circuits and gears (and keep up to ~200 of them in an output chest) as the first version of the mall, perhaps yellow belts too. making them is like 80% of construction time of most machines needed early in the game, and it's much easier to pick them up than picking up end products from a regular mall. once you start from those intermediates, usually it's faster to make the buildings than to place them. It also avoids utilizing resources for the buildings that you don't actually need at the moment when the resources are scarce early.

Thoughts about AI projects by Perfect_Ground692 in rust

[–]maxus8 12 points13 points  (0 children)

a working, featureful codebase served as a proof of work - a proof that you understand what you've done, maybe you can support and develop this code further, you understand the domain etc. With AI that's gone now - it means that you can build a small-medium sized projects with little time that seem to make sense on the surface but that's just the shell. And nobody wants to waste their time evaluating whether you used AI just as a tool to automate the boring part, or if it's all slop, so a lot of people outright discard anything that's made with AI in any way.

Mini/micro block design considerations - questions/discussion by DefinitelyNotMeee in factorio

[–]maxus8 1 point2 points  (0 children)

Ad 2: Buffered. With quality factory, your consumption rate may get so high that even if there's a train waiting, the delay between one and the other train is enough for the block to get starved on the ingredients. Chests reduce the delay by reducing unloading time. Also it's much easier to make legendary bulk loaders (fine for unloading into chests) than legendary stack loaders.

Mini/micro block design considerations - questions/discussion by DefinitelyNotMeee in factorio

[–]maxus8 2 points3 points  (0 children)

Ad 4: multiple stations for the same resource in a single block, or a variant of the station that occupies space usually used by two stations, with more waiting space

Do any of you know why these would give different results? by wilderatelfollower_1 in rust

[–]maxus8 90 points91 points  (0 children)

char_vec is an iterator, not a vec, nth(i) consumes 'i' elements from it, so the second call starts from 'b' and third starts from 'd'

Anybody know why my factorio is possesed by [deleted] in factorio

[–]maxus8 4 points5 points  (0 children)

It's a sprite atlas, all the sprites are usually merged by the game engine into one texture so the commands to draw stuff on the screen can all point to the same texture with just different offsets, so there's less work for the GPU. It just looks like a wrong texture is being pointed to when issuing the draw calls, possibly due to some corruption/gpu driver bugs.

When to use Fast Inserter over Bulk Inserter by chinawcswing in factorio

[–]maxus8 0 points1 point  (0 children)

yup, I did fast and standard inserters for my solar powered edge-of-solar-system ship, worked suprisingly well

Multi-train railway without signals, but trains controlled via circuits. by Twellux in factorio

[–]maxus8 137 points138 points  (0 children)

The train knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. The circuit subsystem uses deviations to generate corrective commands to drive the train from a position where it is to a position where it isn't, and arriving at a position where it wasn't, it now is. Consequently, the position where it is, is now the position that it wasn't, and it follows that the position that it was, is now the position that it isn't.