JakenVeina

joined 2 years ago
[–] JakenVeina@lemm.ee 4 points 1 week 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 1 week ago

Quartz Crystal, Silica, and Crystal Oscillators.

[–] JakenVeina@lemm.ee 2 points 1 week 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 1 week ago

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

[–] JakenVeina@lemm.ee 3 points 1 week 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 39 points 1 week 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 1 week 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?

 

Okay. I can't put it off anymore. I have to figure out how to detail these buildings. Let's start with this small one, and see what we come up with.

This style of edging was kinda the only thing I had in my head to try, where the beam is even in height with the foundation. Buuuuuuuut, it doesn't work. The Z-fighting is extremely obvious, and not something I can just ignore.

Let's try something really crazily different.

Yeah, I hate that.

I really wanted something that was going to give the edges more depth, but looking through everything in the build menu, what I've already tried is basically it: beams and pillars.

So, I'm gonna go with this. Really unsatisfied with it, as is, but I don't see what else I can try that isn't just pillars, which I've rather over-done at this point.

Maybe it'll get better as I add floor supports.

Alright, you know what? That does rather help. I can nudge to avoid clipping into the beams on this side, but on the other side, where there's an acute angle between the floor and the pillar, the clipping in the railings is more offputting, and much less avoidable.

How's about we just ditch the railing on that side, in favor of something that clips into pillars, no problem: more pillars? I actually like the increase in variety here.

I like it much, much less, extending it up to the top floor. I didn't take a shot of what it looks like on the actual top, but it's very weird.

Adjusting the positioning of the angled pillars a bit gets the cross-pillars centered much better.

I'm feeling a heck of a lot better about this whole endeavor.

I got really into things at this point, and ended up not taking any more progress pics, until I got to the finished product. I'm astounded that I came up with something I actively like, here. Not my favorite design, by a long shot, but I'm entirely satisfied to get something this nice out of the UTTER design-block I was in.

The angled support pillars, mirroring the angling of the floors, was basically the only thing that was always part of my plan.

Night shots.

So, I now have a confident game plan for duplicating this out on the other 3 buildings.

The only actual remaining question is how I'm going to place some staircases or whatever between floors. Or really, I suppose, where in the layouts I'm going to PUT them.

[–] 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 2 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 2 weeks ago (4 children)

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

 

I actually spent most of today's time playing in my son's game.

I made myself useful by just prepping resources for MAM research for him.

Needed a ton of Raw Quartz for making Crystal Oscillators.

Meanwhile, he was tearing down his whole starter setup. Which I forgot to get a screenshot of.

He decided he wants to rebuild everything out on a platform, off the side of the cliff.

I proposed the idea of a little sub-floor for power generators.

Concrete.

Iron Plate.

Iron Rod.

[–] JakenVeina@lemm.ee 6 points 2 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.

 

Alright, time to get the rest of this factory connected up.

Also needed to build one final building, for sinking and uploading.

With that, everything is powered up and running, and we can do some auditing.

For starters, I was producing about half of the Screws that I should have been, due to an abberant Mk.1 lift here.

Next, I spotted that I actually never connected the Raw Quartz feed here, for the last couple of Quartz Crystal constructors in this line.

That feed was supposed to come from the overflow here, on the next floor up.

That meant swapping the splitters on this Raw Quartz line to Smart Splitters.

Also neglected to ever connect the Iron Ingot feed here, for Iron Plates.

Somehow, I must've planned to have unbalanced belt feeds, that both deadend at this merger? Definitely didn't end up with that, this whole floor just has one Iron Ingot feed, as the throughput needed is less than the capacity of a Mk.4 belt.

So, that's gone.

Next, I realized that this little balancer that takes my 3 Iron Ore lines and evenly combines them into 2 produces 282/min on each of the two belts. And yet, I used Mk.3 belts for them.

Unfortunately, after a while, I realized that this did NOT fix my Iron Ore issues. Because while this balancers does evenly split the ore across 2 belts, the Smelters downstream are not PULLING evenly from the two belts.

And thus, the lack of a Smart Merger in the game strikes again.

So, screw it. Forget even belts. One Miner can feed one Mk.3 belt, which feeds 7 Smelters for Cast Screws. The other 2 Miners can feed a Mk.4 belt for 13 Smelters, for Iron Plate. No crossovers or balancing issues, and it all runs like clockwork.

So, that was all the issues I could find. I THINK the facility will equalize out to 100% efficiency now, with a little time, so let's go do a few side errands.

With the new facility online, I can FINALLY tear down my LAST temporary factory on the map.

No need to bother recovering the goods, I'll just sink it all. the new factory will be full up by the time I could cart the materials over.

I also figured I should do the Mk.4 upgrade to Advanced Iron Plate. I go through them QUITE quickly when I'm building signs, second only to Quartz Crystal, and since my Quartz Crystal availability is now DRASTICALLY increased, I figured this might end up being more of a bottleneck, without an upgrade.

Not much to see here, I guess, except that some of the belts in view are upgraded. But this should now be producing about 74/min Advanced Iron Plate, double what it was before.

 

So, I STILL haven't come up with any real ideas for how to decorate or get around on the big stairstep buildings, so I'm putting it off some more. What worked out well for the other two, and for the miners, was just running a main beltway alongside them, instead of directly connecting them, so I decided to keep going with that idea, and redo the little bit of beltwork I'd already done on the other side of the facility.

With that line built out all the way to the other big tubeway trunk, I was able to fully connect up the first building I built, with all the Iron and Copper machinery.

And, in fact, that finishes production for all of the intermediate items, and the belting to get them over to the final factory.

Aaaaaand fully-detailed out.

Interior shots.

 

Built out a little bit of a "hub" room today, where the main power switch for the campus can sit, and where we can do some of the inter-building belt routing.

With that built out and connected up, I was able to route all the belting and power for the first building, and get it powered up.

Well, everything except the Limestone feed, which is gonna come from the opposite side of the campus than the Quartz.

Wide shot, including more Tubeway.

 

After building the platform for the first Miner, last time, I've got 7 more to do, so I figured it was definitely worth blueprinting it. Also, a few for the interconnecting beltways.

With those, I managed to get everything fully-finished for all the incoming resources for the factory.

Then I noticed this...

Yeah..... I have 0 willpower to fix this.

 

Still procrastinating on the main factory, so I spent my time today building out the tubeways that carry in nearby resources.

Also sat down an workshopped a design for detailing the miners and the resource lines NOT on the main tubeway. Definitely a bit reinvigorating by actually just focusing on something simple, and new.

 

More progress today. Got all the miners and resource delivery laid in.

I still have no idea where I'm going with this, but progress is progress.

 

Man, I am really hitting a creative wall with this factory. I am at a loss for ideas on what to do next here. I tried laying out this sorta terrain-hugging foundation to try and build on, but turns out, I hate it.

Also, I'm really getting salty about the randomness of the indestructible flora.

So, I'm scrapping this.

Screw it, I'm just gonna lean harder into the stairstep theme.

This should be all the machines for the factory, except for a Sink and some Uploaders.

 

A little more progress on the next building, today. I decided, what the hell, let's just stick with the stairstep design. See what I can make of it. I really have no idea how I'm going to turn this into a proper building, yet, but ideally, that'll be part of the fun.

Also extended out the tubeway some more, a decent way beyond where I need it, so I can fully visualize what space I have to work with.

 

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.

view more: ‹ prev next ›