JakenVeina

joined 2 years ago
[–] JakenVeina@lemm.ee 4 points 2 weeks ago (1 children)

Many of the articles from those platforms are useless noise, but I do still occasionally want to read something that's posted. When that happens, I just F12 and bypass the paywall, or look for the comment that has the article text, from someone else who has already done that.

[–] JakenVeina@lemm.ee 2 points 2 weeks ago

Quartz Crystal, Silica, and Crystal Oscillators.

[–] JakenVeina@lemm.ee 2 points 2 weeks ago

Nope, it's not an illusion. Taller machines on the top floor means a bigger gap between floors, which means a different angle.

And no, the build is done except for cosmetic detailing.

[–] JakenVeina@lemm.ee 1 points 2 weeks ago

Nah, they've announced recently it'll be later in the year. But still should be this year.

[–] JakenVeina@lemm.ee 3 points 2 weeks ago (1 children)

TBF, it's definitely not a streak. I've skipped a fair few days, recently. But I just keep the number going cause.... who's gonna stop me?

[–] JakenVeina@lemm.ee 40 points 2 weeks ago (1 children)

I'm gonna hazard a guess, just cause I'm curious, that you're coming from JavaScript.

Regardless, the answer's basically the same across all similar languages where this question makes sense. That is, languages that are largely, if not completely, object-oriented, where memory is managed for you.

Bottom line, object allocation is VERY expensive. Generally, objects are allocated on a heap, so the allocation process itself, in its most basic form, involves walking some portion of a linked list to find an available heap block, updating a header or other info block to track that the block is now in use, maybe sub-dividing the block to avoid wasting space, any making any updates that might be necessary to nodes of the linked list that we traversed.

THEN, we have to run similar operations later for de-allocation. And if we're talking about a memory-managed language, well, that means running a garbage collector algorithm, periodically, that needs to somehow inspect blocks that are in use to see if they're still in use, or can be automatically de-allocated. The most common garbage-collector I know of involves tagging all references within other objects, so that the GC can start at the "root" objects and walk the entire tree of references within references, in order to find any that are orphaned, and identify them as collectable.

My bread and butter is C#, so let's look at an actual example.

public class MyMutableObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }
}

public record MyImmutableObject
{
    public required ulong Id { get; init; }

    public required string Name { get; init; }
}
_immutableInstance = new()
{
    Id      = 1,
    Name    = "First"
};

_mutableInstance = new()
{
    Id      = 1,
    Name    = "First"
};
[Benchmark(Baseline = true)]
public MyMutableObject MutableEdit()
{
    _mutableInstance.Name = "Second";

    return _mutableInstance;
}

[Benchmark]
public MyImmutableObject ImmutableEdit()
    => _immutableInstance with
    {
        Name = "Second"
    };
Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
MutableEdit 1.080 ns 0.0876 ns 0.1439 ns 1.02 0.19 - - NA
ImmutableEdit 8.282 ns 0.2287 ns 0.3353 ns 7.79 1.03 0.0076 32 B NA

Even for the most basic edit operation, immutable copying is slower by more than 7 times, and (obviously) allocates more memory, which translates to more cost to be spent on garbage collection later.

Let's scale it up to a slightly-more realistic immutable data structure.

public class MyMutableParentObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }

    public required MyMutableChildObject Child { get; set; }
}

public class MyMutableChildObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }

    public required MyMutableGrandchildObject FirstGrandchild { get; set; }
            
    public required MyMutableGrandchildObject SecondGrandchild { get; set; }
            
    public required MyMutableGrandchildObject ThirdGrandchild { get; set; }
}

public class MyMutableGrandchildObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }
}

public record MyImmutableParentObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }

    public required MyImmutableChildObject Child { get; set; }
}

public record MyImmutableChildObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }

    public required MyImmutableGrandchildObject FirstGrandchild { get; set; }
            
    public required MyImmutableGrandchildObject SecondGrandchild { get; set; }
            
    public required MyImmutableGrandchildObject ThirdGrandchild { get; set; }
}

public record MyImmutableGrandchildObject
{
    public required ulong Id { get; set; }

    public required string Name { get; set; }
}
_immutableTree = new()
{
    Id      = 1,
    Name    = "Parent",
    Child   = new()
    {
        Id                  = 2,
        Name                = "Child",
        FirstGrandchild     = new()
        {
            Id      = 3,
            Name    = "First Grandchild"
        },
        SecondGrandchild    = new()
        {
            Id      = 4,
            Name    = "Second Grandchild"
        },
        ThirdGrandchild     = new()
        {
            Id      = 5,
            Name    = "Third Grandchild"
        },
    }
};

_mutableTree = new()
{
    Id      = 1,
    Name    = "Parent",
    Child   = new()
    {
        Id                  = 2,
        Name                = "Child",
        FirstGrandchild     = new()
        {
            Id      = 3,
            Name    = "First Grandchild"
        },
        SecondGrandchild    = new()
        {
            Id      = 4,
            Name    = "Second Grandchild"
        },
        ThirdGrandchild     = new()
        {
            Id      = 5,
            Name    = "Third Grandchild"
        },
    }
};
[Benchmark(Baseline = true)]
public MyMutableParentObject MutableEdit()
{
    _mutableTree.Child.SecondGrandchild.Name = "Second Grandchild Edited";

    return _mutableTree;
}

[Benchmark]
public MyImmutableParentObject ImmutableEdit()
    => _immutableTree with
    {
        Child = _immutableTree.Child with
        {
            SecondGrandchild = _immutableTree.Child.SecondGrandchild with
            {
                Name = "Second Grandchild Edited"
            }
        }
    };
Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
MutableEdit 1.129 ns 0.0840 ns 0.0825 ns 1.00 0.10 - - NA
ImmutableEdit 32.685 ns 0.8503 ns 2.4534 ns 29.09 2.95 0.0306 128 B NA

Not only is performance worse, but it drops off exponentially, as you scale out the size of your immutable structures.


Now, all this being said, I myself use the immutable object pattern FREQUENTLY, in both C# and JavaScript. There's a lot of problems you encounter in business logic that it solves really well, and it's basically the ideal type of data structure for use in reactive programming, which is extremely effective for building GUIs. In other words, I use immutable objects a ton when I'm building out the business layer of a UI, where data is king. If I were writing code within any of the frameworks I use to BUILD those UIs (.NET, WPF, ReactiveExtensions) you can bet I'd be using immutable objects way more sparingly.

[–] JakenVeina@lemm.ee 0 points 2 weeks ago (2 children)

Anyone else in the "I didn't like the halftime show because it was completely unintelligible" camp? Seriously, I couldn't understand one single word he was saying. Was everyone else just using captions?

[–] JakenVeina@lemm.ee 4 points 2 weeks ago

Yeah, that's about 95% a filter cap. Hoghly likely you don't need one if you're gonna make your own cables, with short runs.

[–] JakenVeina@lemm.ee 15 points 2 weeks ago (6 children)

Can't really tell what's going on from just this image. Is there only one lead coming off of the device? Is it just sticking out of the braid, or is it fully-uncovered?

My initial guess would be it's a high-frequency filter capacitor.

[–] JakenVeina@lemm.ee 8 points 3 weeks ago (1 children)

Okay. I remember that plot point, vaguely, but I don't recall it being about the DPRK, specifically. Maybe I just missed it.

[–] JakenVeina@lemm.ee 29 points 3 weeks ago (4 children)

I definitely don't recall the DPRK being mentioned at all in Squid Game season 1.

[–] JakenVeina@lemm.ee 6 points 3 weeks ago (7 children)

For Canada, unfortunately no. Unless Microcenter is available up there, that's my go-to these days. You could maybe try them out online, I dunno if they'd ship to you.

 

Long hanging fruit for today is the final building of Frameworks, to make Heavy Modular Frames. Literally everything is already done for this, except I didn't have Manufacturers, at the time.

So, removing the temp Sink and Uploaders I had here, and framing out the building, we get a layout for where the final machines will go.

Building out and detailing the building.

And with a final long shot, we're done.

Nerd docs.

Next up, I've picked out a rough location for the next project, mainly due to proximity of resources.

For starters, I need to extend out the main tubeway to map out a new building.

This machine layout should get the job done.

Also needing to be built out is the segment of the main Tubeway that I built out a couple weeks ago, to attach the two Geothermal Generators to the grid.

 

Done. Completely. The largest and most-complicated build I've ever done. A full 2-week project. All running at 100% efficiency.

I had to run the last of the 3 Turbofuel lines over to the big Generator building.

Then I had to connect up the entirety of the Generator building itself. Same strategy, each of the 3 Turbofuel lines, is one long straight shot, that just has a small splice coming off for each machine.

So, that's about 20GW of additional power that I didn't have before. And that's only running at 100% clock speed. I'll need Mk.5 belts to upgrade it any further.

Nerd docs.

All said, this facility is actually doing QUITE a lot, and I'm really proud of the design. I get a small amount of Packaged Turbofuel for personal use, made from a little bit of the Polymer Resin byproduct, and a small siphon of Turbofuel from one of the 3 lines.

The rest of the Polymer Resin gives me a source of fully-automated Fabric.

Then we have the Compacted Coal, which is made from a Pure node each of Coal and Sulfur. The Pure node of Crude Oil only requires 88.9% of a Pure node's worth of Compacted Coal, so instead of underclocking those machines and miners, I just take the extra 11.1% and feed it into some Coal-Powered Generators. It's basically just free additional power, at that point.

On its own, this facility is good for about 15.5GW of power production, at 100% clock, and will be able to clock up to 250% when I get Mk.6 belts unlocked, for 38.9GW.

 

Alrighty, time to actually run out some Turbofuel.

The first line here actually gets a small splice off to package and upload to the Dimensional Depot.

Then it feeds the little mini-building of 3 Fuel Generators.

Then, the builiding of 13 Fuel Generators.

Then, the first 7 Fuel Generators in the giant generator building.

The whole line is structured as one single long run, with a small splice off for each generator. No complicated forking or balancing needed. Hopefully, this prevents any weird backflow issues from arising.

And that's a full 1/3 of the plant running at 100% efficiency.

 

Built out the Coal mines today.

Plus more inter-building and inter-floor logistics. The Crude Oil, Compacted Coal, and Waste Processing buildings should all be fully-complete now. I think.

 

After maybe an hour of setting up blueprints for the inter-building walkways that I prototyped last time, I decided to actually start today by finalizing the Geothermal Generator here, and getting it fully connected to the main grid.

Then I went ahead and placed the first set of blueprints over at the main entrance, while I was nearby, to allow access to the logistics floor.

After that, I just headed over to where Crude Oil is coming into the first building, and started going crazy with getting buildings connected.

This here is the connections between the two buildings that are processing Crude Oil into Heavy Oil Residue. In order to fit the terrain, I ended up with one building of 3 Refineries, and one building of 6. So the first building consumes some of the Crude Oil, and passes the rest on to the next building, along with the Heavy Oil Reside and Polymer Resin that it did produce.

The next building receives them.

The one line of Heavy Oil Reside from the first building, plus 2 more from the second, trunk over to the Fuel processing building.

Meanwhile, Polymer Resin moves on to the waste waste processing and packaging building.

Waste processing also needs water, which comes from Fuel processing, which is also an adjacent building. One of these 3 lines is used to process all the Polymer Resin, and the other two will pass right under the building over to Compacted Coal.

There's a pretty drastic height difference between the two buildings, so I added this little support strut for the pipes.

Slightly wider shot, from Fuel Processing.

 

Co-op today!

Got the shipping lot for Ironworks finished out..... except I'll actually need to do one more rework, next time.

We neglected to realize that the sheer volume of resources this factory produces means we can't sink all the overflow with just one AWESOME Sink. So, after finishing the lot, I expanded the corner where the Sink sits, enough to add a second one, and re-routed the overflow belts to match.

Except we ACTUALLY need 3 Sinks, not 2. So, that's what I'll have to do next time. And the corollary is that we ALSO made this mistake for Copperworks, so I'll try and get that fixed as well.

My wife made more good progress on Cateriumworks. Structurally, it's pretty much done: all the building and machines are in place. It still needs lighting, power cabling, and a shipping lot.

During the process of all of the above, we found we were running out of Reinforced Iron Plate again, despite getting that factory up and running last time. Essentially, it's just running WAY too slowly. It's only producing like 2.5/min, and THEN it's not prioritizing that 2.5/min to the Depot, and instead splitting it equally between the Depot and the Truck Station, which is currently unused.

As an immediate stopgap, I cut the belt to the Truck Station, and then we got into a conversation about why the factory is running so slowly: it's because Copperworks is running equally-slowly, (12.5% base clock speed), because I didn't think we could afford the power to run it any higher. Which is when my wife pointed out that we never upgraded the power plant to Mk.3 belting, which I thought we had.

So, I went and got that all upgraded. A nice 2.25x boost to our power capacity, so we should be able to afford increasing the clock speeds on Copperworks and Advanced Ironworks a bit.

 

Next up is connecting the factory to the primary tubeway. Got a path laid out from the factory entrance up to the closest branch of the tubeway, easily enough.

However, at this point, it got a little tricky. To connect a new branch to the tubeway properly, I need at least 24m (3 foundations) of straight segments, and there's really not a lot of room here for me to curve and join up at that straight segment to the left.

So, I just pathed out a small adjustment to the existing tubeway.

With that, the new branch is connected. I'll come back to this maybe tomorrow to run a belt of Sulfur underneath here.

Moving on, built a little hut for the Oil Extractor, and prototyped a new design for a walkable support to pipe it up to the factory.

I'm moderately happy with it, so I'll probably spend some time tomorrow making reusable blueprints for this design, to get walkways and resources connected between all the buildings much more quickly.

Also prototyped an access ramp to go between machine and logistics floors, that I'll need to put in each building. Again, I'm planning to blueprint what I can of this.

 

Starting out today, I wanted to lay out the rim of the ceiling, before laying out machinery that might get in the way, since all the 45-degree corners have to be built my hand.

I experimented for a WHILE with the blueprinter, and spacing and alignment and whatnot. Ultimately, I managed to fit 55 generators in the floor space, and I think that's about the max.

Filling in the ceiling, and that's this building pretty much done. Except for all the piping work on the logistics floor, but I'm going to save that for later, until after I have all the generators laid out. There's a very specific distribution strategy I'll need to implement for grouping up generators with refineries, so I'll need to know where all the generators are going to sit before I can finalize that.

I also ended up with a few foundations worth of empty space, that wasn't enough for an additional generator, so I turned that into a little balcony to serve as the main entrance to the campus.

So, after 55 generators in the last building, I need 16 more to finish out the campus, and it just so happens that's what I was able to fit in here.

With the concept proved, I laid down an outline for the building, to guide placement of blueprints.

Aaaaaaaaaaand, these big chonkin' corals aren't destructible. Great.

Reworking the outline and layout again, I can avoid the indestructibles, but I lose the space for 3 machines. Nothing for it, there just isn't enough space here to expand out this building any further. Gonna have to do 1 more building.

Before that, I got this one detailed and finalized.

After agonizing for a little while, I decided on this little spot up here, and built a proof of concept. There's just enough space here to avoid interfering with the coal mines in the background there, that I'll still need to build out.

To make this spot work, I'll actually need to reclaim this extra foundation of empty space at the end of the prior building. Due to the big difference in elevation between these two buildings, I'll need that extra space between them to run piping and walkways. And again, I want to leave as much space as possible between the new building, and the coal nodes, so I don't want to shift that one backwards.

More outlining, blueprinting, detailing, and finalization.

Aaaaaaaaaaaaand that should complete all the buildings needed for this factory. All that remains is to build out an Oil Extractor, a couple Coal Miners, the tubeway to carry in Sulfur from the outpost I built last week, and to run all the interconnections between the buildings. Closing in on the final stretch.

 

Back in coop today. Got another big chunk of road built out, toward Cateriumworks.

Speaking of which, my wife made some decent progress on that.

 

Second building from yesterday is finished up.

The next one's gonna be a doozie. I think I should be able to make this footprint work.

Yeah, this should definitely work. We'll see tomorrow what I can end up fitting in here.

 

Next building is done.

Also the next next building is mostly done.

 

Next building is done.

view more: ‹ prev next ›