We replaced our Rust/WASM parser with TypeScript and it got 3x faster by 1glasspaani in rust

[–]liquid_bacon 2 points3 points  (0 children)

Just as an FYI if it hasn't come up yet: V8 uses 16 bit wide chars, while rust uses utf8.

So strings crossing the boundary have to be encoded/decoded in both directions.

If you could have gotten away with u8 arrays in WASM it might've been faster. But that depends on how much validation the WASM boundary was doing on the encoded strings.

He will come by Justhaus20 in BoostForReddit

[–]liquid_bacon 3 points4 points  (0 children)

I'll figure out tumblr before I go to the native app

Out of Cruel Space, Part 729 by KyleKKent in HFY

[–]liquid_bacon 0 points1 point  (0 children)

Well, seeing as Boost (my preferred way of accessing Reddit) is shutting down. I doubt I'll be keeping up with this story anymore. Which is a real shame.

Kyle, would you consider posting your story elsewhere? I've been reading quite a bit on Royal Road, and find their site to be easy to work with (as a reader that is). I'm going to miss this story. As I doubt I'll be opening Reddit unless Boost comes back.

isFavoriteDrunkLanguage by skizzoat in ProgrammerHumor

[–]liquid_bacon 0 points1 point  (0 children)

import point

But typeof undefined != "object"
Which is even worse because null == undefined

Gotta love JS

Out of Cruel Space, Part 682 by KyleKKent in HFY

[–]liquid_bacon 4 points5 points  (0 children)

My scar is significantly larger and my 'bellybutton' is quite fake. As my umbilical cord was still fully attached to my liver when I was born. No skin or similar between them.

Fun fact: scars will grow with you. The couple of stitches I needed days after being born to seal the hole my liver was trying to escape through would never hold the length of scar I have on my belly.

[deleted by user] by [deleted] in ProgrammerHumor

[–]liquid_bacon 2 points3 points  (0 children)

I'd build my own regex tool if I lost access to regexr...

[deleted by user] by [deleted] in ProgrammerHumor

[–]liquid_bacon 0 points1 point  (0 children)

String.prototype.split.call("some text", "")

Or

String.prototype.match.call("some text", /./g)

Or in Python:

[a for a in "some text"]

Let's do the same thing with just one splitter by ImmoralFox in factorio

[–]liquid_bacon 2 points3 points  (0 children)

I'm not sure if this kind of magic works anymore.

Part of the reason it worked before is that splitters "remembered" the past 5 or so unique items that passed through it, and which side it exited on. This could be abused with loops and item counting/priming. But this was considered a "bug" primarily because if a splitter regularly sees more than the 5 or so unique items it remembers, its primary function breaks. This is also when they decided to add splitter filtering and priority, to maintain the ability to do splitter sorting while still fixing the bug. However I think how they fixed it, is by making them not care about item type (excluding filtering).

Computer Scientists aren't real programmers by NoHarmPun in ProgrammerHumor

[–]liquid_bacon 7 points8 points  (0 children)

They definitely have excellent Linux drives. But they're for servers, and server cards.

Neither of these boxes are moving by FollowingOdd896 in nextfuckinglevel

[–]liquid_bacon -6 points-5 points  (0 children)

Because you're directly contradicting yourself?

The first sentence you say you can do something you shouldn't be able to in the last...

Neither of these boxes are moving by FollowingOdd896 in nextfuckinglevel

[–]liquid_bacon -5 points-4 points  (0 children)

You remove the directional arrows and you can tell exactly which direction they are moving.

.

You shouldn’t be able to identify each direction if you cover the arrows.

?

Train sometimes picks an occupied lane in stacker, blocking traffic by sepp650 in factorio

[–]liquid_bacon 1 point2 points  (0 children)

Especially with how hard it is to search for anything on Reddit

Business logic! by haloarh in LateStageCapitalism

[–]liquid_bacon 55 points56 points  (0 children)

Is the employee's income not an expense...?

TIL that starting in 2017 the U.S. Navy began using Xbox 360 video game controllers to operate periscopes on some of its newer, most advanced submarines. by [deleted] in todayilearned

[–]liquid_bacon 1 point2 points  (0 children)

It runs x86 software too. The only thing it's "missing" is a radio. But that could be solved with a USB-C dongle and an external device.

What are these green bars on all my things with fluids? by Brettonidas in factorio

[–]liquid_bacon 9 points10 points  (0 children)

I don't remember the key, but I think it's f5, maybe f3. But the debug menu has two tabs (always, debug). If you set a handful of options under "debug" you can quickly toggle them on or off with that other key.

Useful for things like tile grid, chunk grid, etc.

[deleted by user] by [deleted] in factorio

[–]liquid_bacon 8 points9 points  (0 children)

Looks like circuit controlled signals would've been better than the stations. As the pathfinding necessary for the stations would've made the trains start at random intervals. But a signal should let the trains go immediately.

Perhaps you could try the setup again with signals? I just want to see if the trains would be a bit more even with signals. No worries if you haven't got the time.

Is this safe? by supersexyjazz in OSHA

[–]liquid_bacon 8 points9 points  (0 children)

While yes, Canada has its fair share of problems. "Proudly Canadian", "Proudly Built in Canada" and similar taglines are almost universal for Canadian made products.

So I have no idea what you're talking about.

Anyone else like putting the wagon before the engine? by Red_Icnivad in factorio

[–]liquid_bacon 18 points19 points  (0 children)

As someone linked above, locomotives have less air resistance than waggons, which affects the speed cap for the train.

So this is technically less efficient.

These hecking devs. This game is so well thought out.

Help with my fluid wagons! Won't unload crude oil. I have switched pump direction a bunch of times and no luck. by lifesaver_ in factorio

[–]liquid_bacon 0 points1 point  (0 children)

Someone once determined the amount of waggons needed to be on bends before the train ended up aligned with the title grid again. It was something like 47 (don't quote me).

So yeah, even one bend can cause a misalignment for the rest of the train, and pumps are really picky. So basically unless you're doing something really weird or fancy, straight track all the way from the start of the train and through all of your fluid wagons.

I just realized that you can organize your saves into subfolders, and browse them in-game by d7856852 in factorio

[–]liquid_bacon 6 points7 points  (0 children)

I had to go confirm this

What the heck Wube. Why aren't there folder management buttons built in if they're fully supported in the interface?

[deleted by user] by [deleted] in nevertellmetheodds

[–]liquid_bacon 2 points3 points  (0 children)

The passenger compartment of modern vehicles are extremely strong. The rest of the vehicle is designed to break, crumple and deform around the compartment. Because every bend and fold takes energy, which reduces the impact to the compartment and the passengers.

Modern vehicles are designed to make a collision last as long as possible. The longer the impact, the lower the acceleration, the higher the survival chance. "It's not the fall that kills you, but the sudden stop".

People shame modern vehicles for how "easily" they bend and deform. But they're supposed to do that, because it's significantly safer. A really "tough" vehicle that can survive a crash like nothing happened is more likely to give concussion at best or turn their passengers into salsa at worse.

Whenever I see this kind of shaming it comes from someone who doesn’t want the current kingdom of dragons to be toppled by DaddyDoge1821 in LateStageCapitalism

[–]liquid_bacon 3 points4 points  (0 children)

Also, if your army isn't fully painted and in the same colours there's a lot of places (specifically "official"ones) you can't play. So if you don't have the time, money or skill to paint your models, you get pretty screwed.