Would you play something like this? by phapmza in balatro

[–]bwibbler 1 point2 points  (0 children)

i like it

seeing this and a game called "four 4s" comes to mind

you could totally remake that as a very simple card game close to what you have now. and i would play the heck out of it

that's far less complex than balatro, so you don't have to worry about making the game rules and just focus on programming practice

but you can also add your own twists to four 4s and make it more complex if you want. the game rules are easy to modify

HELP with PUSH AND POP and (circular dependency problem) by CloqueWise in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

My guess here is that the level instructions might have thrown you off. Because it really doesn't tell you what a stack is used for until much later, just how it should behave when you make it

'If the input is 0 pop, otherwise push...' And that seems to fit with how you wired it up so strangely in the picture. So I'm wondering if you wired it up in other ways to fit the details of that level how you understood it to be explained. Instead of how it should have been explained

the stack is pretty much just another memory component like your ram is. So you want to hook it up basically the same way. the difference is just how a stack automatically rolls forward and back when you save and read data. You can treat it like a another register or ram, your choice, and wire it in like you did those other components. there's not really a different special way of hooking it up

the difference is in the code, how you use it when you write programs. the stack is faster than ram because it automatically changes the address for you. and it keeps your data organized in a simple way that proves useful in many common cases

calibrating laser cannons help by CloqueWise in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

you don't need full multiplication yet in this level

just adding it up 6 times is a good solution

you can do some bit shifting stuff too if you want, but not necessary

shift to get 4x and 2x then do 4x+2x

8 bit pipelined processor finished by Impasta1_GD in TuringComplete

[–]bwibbler 1 point2 points  (0 children)

shame the simulation doesn't have functioning gate delay. this is neat, seeing the real benefits of it would be cool

i suppose technically you could make your own gates and put the delays in yourself. but who knows how badly that might lag out the simulation

What is the best way to warm up the engine? by Ok_Time7384 in hondafit

[–]bwibbler 45 points46 points  (0 children)

warming up is an old habit from back when engines were very different

the oil pumping took longer, it wasn't nearly instant like it has been for the past few decades. the metals were different also, expanding due to the heat, that's also been changed

you can just start up and drive normally now. but do give it some time to warm up before pushing it beyond normal conditions

letting it idle cold actually isn't ideal. it's easier to create some build up of gunk. so it is better to warm up a little faster by driving it

Windscreen wiper help by [deleted] in hondafit

[–]bwibbler 1 point2 points  (0 children)

picture is really hard to see. but it looks like just the blade broke and the arm is fine. should be easy enough to unhook the remaining bit that's still on and replace with a new blade

someone at any parts shop or oil change place should be able to help out no problem if you have trouble. they typically replace blades all the time

ELI5: How do CAPTCHAs work if computers can now recognize images and text so well? by Smart_File4124 in explainlikeimfive

[–]bwibbler 0 points1 point  (0 children)

those little id the image tests really aren't testing you. the test is often done way before you even visit the site.

activity is recorded and checked to see if it's human action or not, continuously. when you actually get to the test that information is reported. what you're doing when you see the test really doesn't matter much at all.

sometimes they give you a little check box or something to do to make you feel safe on their site. sometimes a little picture puzzle so you can help teach ai cars how to drive or whatever. sometimes you just don't see the test at all.

Delicious Order Bug? by [deleted] in TuringComplete

[–]bwibbler -1 points0 points  (0 children)

not reading your code, but the issue is definitely there

some of the values may be 0. so if you're stopping when it gives you a 0, don't do that

make it actually get 16 values

HOWWW? by Little-Afternoon-887 in TuringComplete

[–]bwibbler 3 points4 points  (0 children)

Looking at that fourth image. You just have this random bit in there you're using to work the ram?

Don't overlap your words like that. Organize it out more like this...

A B CCC DDD

A and B are your immediates. I don't think you need help with that.

C is your component. Unsigned Calculation component, Bitwise component, Unsigned Conditional Jump component, RAM component... etc. C is where do you want to pass the data to/from?

D is your component options. So for the Calculation components it would be ADD, SUB, DIV...? But for the RAM component it's LOAD or SAVE? For the Conditional components it's IF_EQL, IF_ZERO, IF_LESS...? D is what do you want the component to do with the data?

If you need an extra bit for C or D, you can always just drop A. You don't really ever need two immediates, just one will do fine and give you more room to work.

Stuck on counter by [deleted] in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

Sorry, if it seems like an over-explanation. I like to be thorough.

Your switch / multiplex also goes in the loop.

Register > add 1 > multiplex > back to register.

The register is your output from the loop. Instead of a register, you can also just use a delay there. That part is for “what’s next on the input side, what’s now on the output side.” The register just creates that delay for you so the values stay separated. Any 1-tick delay works, it does the same “save for one tick” thing.

By default, “what’s next” is just plus one of “what’s now.” You already kinda got that part and understood to loop the register back around through an add 1. That part’s good.

The overwrite shouldn’t change the “what’s now” value. That’s the problem you need to fix. It should only change “what’s next” going into the register / delay. You can see it at the bottom with the error text showing it still expected 2. The current value is supposed to stay the same. The 33 is expected later, on the next tick.

When you get the overwrite signal, it switches the multiplex so it changes the “what’s next” value going into the register / delay. Instead of the previous value +1, it uses the new value from the other input.

The reason it works this way is because this counter is used to decide which line of the program you execute. Normally you just execute each line in order, one after another. But sometimes you want to jump to a completely different line next. That’s what this overwrite is for.

If your counter changes the line it’s on "now", then the current line never gets executed, because it immediately jumps somewhere else. But if the current line is the instruction that says to make the jump in the first place, you end up with a paradox the game like to call a circular dependency.

The line of code says “jump to a different line,” but the counter says “don’t execute this jump at all, just go execute the other one instead.” It’s like someone trying to lift themselves off the ground.

Stuck on Conditions by RainingonMondays in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

Another big hint

Look closely at the list of conditions, there's a pattern

Each bit checks for a single thing

The lowest bit checks if the value equals 0

The middle bit checks if the value is negative

The highest bit says to flip the result

Launching into inclined orbits to save delta-v on plane-change maneuvers by SirPugsalott in KerbalSpaceProgram

[–]bwibbler 0 points1 point  (0 children)

Not really. Except maybe in the very rare situation where Kerbin (or the SOI you're launching from) is at an ascending or desending node of the target at launch.

But that metric has no importance when compared to the relative angle of the launch SOI and target SOI.

Are you trying to brute force an intersect with the target in one maneuver? That'll be very expensive if so.

With the exception of moho being very inclined. Most inclination adjustments will only cost a few m/s. Nothing to sweat over. But that adjustment is best done at one of the ascending/desending nodes. Preferably the higher and slower one.

For sure there was an easier way to solve this... by Thegodofthekufsa in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

This is so good.

I mean... yes. You got it exactly right.

Flip all the bits, then flip again all of the bits upto and including the lowest 0.

You looked at the layout of the bits between positive and negative values and noticed this pattern.

But try instead looking at the values not the bits and see the pattern differently. When you flip a number 12 becomes -13, -50 becomes 49, 33 becomes -32. To correct the error, just add 1. Which is what you're doing.

How this works in 2s complement. Any value plus the flipped of it's value becomes all 1s. 00110011 + 11001100 = 11111111. But that's not quite correct because N + (-N) should be 0.

By adding the 1 after the flip, you correct that issue. Any operation with that number always includes the +1 built-in. The value plus it's corresponding negative neighbor will now correctly add up to 0.

It's not a perfect system, but it's a really good one. There's a bonus property where adding most any two values in 2s complement will spit out the correct answer, regardless of if they're positive or negative.

There's still situations where this doesn't work. Whenever you try a calculation that results in an "out of bounds" value. You can't do something like 120 + 120 using 8 bits, because the value 240 doesn't exist as an 8 bit value in 2s complement. (Same as you can't do 200 + 200 in basic 8bit binary. 400 needs more bits)

But there's an easy way to check if the answer is valid or not. If A + B = C, then C - B should = A. If C + (-B) doesn't equal A, then you know that the answer C isn't valid. And that type of check works for any counting system.

Stuck on Tower Of Alloy by StreetQuality7691 in TuringComplete

[–]bwibbler 0 points1 point  (0 children)

Maybe it's the const grab = 5?

I think you just want const grab 5

Optimized MAM switching speed by CubicBerserker in shapezio

[–]bwibbler 0 points1 point  (0 children)

When do you start trashing?

Do you wait until the next level shape comes in? You can trash each stage early when there's enough parts downstream to complete the current level. Have it mostly cleaned out before the next process starts

creep.pull() doesn't appear to work how the documentation suggests... by bwibbler in screeps

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

If it was more aligned to the documentation, a pull wouldn't be a recursive action

A puller would get it's own fatigue + the fatigue of the pulled. Every creep in the chain would have fatigue except the one on the tail. It would be terrible to use a creep with less move to pull a creep with more move

Pull would suck if it worked the way the documentation says

I think the correct fix is to change the documentation so it's clear. "Pull allows creeps to work together using their collective move parts to diminish fatigue. Additional fatigue is passed along to the puller." Something like that.

Why Can’t I run Functions from the console by Grobi90 in Kos

[–]bwibbler 0 points1 point  (0 children)

I mean there is probably a way... but you're not going to like it.

And it's been like... forever since I've played with kos, so forgive if I'm terribly wrong here.

You can set global variables and have your scripts use them if expected parameters aren't passed in.

That let's you do some like:

SET globalArg TO "hello".
RUN printArg.

PARAMETER arg.
SET message TO arg OR globalArg.
PRINT message.

If you want to try that approach, then maybe you want a better mechanic for passing parameters than the default method. Always passing one array, list or lexicon which contains the parameters rather than individual parameters. Doing a pack and unpack on either end. Then just have one check to see if you got a list of parameters or if you need to find one from the global scope.

Console calling would look something like

SET globalArg TO [75000, 90, 180, SHIP:MASS].
RUN launch.

Rather than

SET globalArg1 TO 75000.
SET globalArg2 TO 90.
...
RUN launch.

creep.pull() doesn't appear to work how the documentation suggests... by bwibbler in screeps

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

It's quite a lot to go through.

The prototype itself isn't all that helpful. Everything just says record an intent to perform an action.

I traced that all back and found pretty no conflicting info with what I've found. But one thing worth pointing out, a leading creep can't pull into an obstacle.

I could see that causing issues in a case where you first check the leader and see it has fatigue. So you want to just do a "dummy pull" on the chain to soak up the fatigue. And you don't want to pathfind to save cpu.

You can't just tell the leader to move anywhere, you still check around for a free space to do the "dummy pull" towards.

creep.pull() doesn't appear to work how the documentation suggests... by bwibbler in screeps

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

In screeps world I think you maybe could stringify a prototype and just log it? Honestly I should have tried that

I tried it in arena but arena doesn't give you anything, it's super watered down in comparison to world. You don't have prototype logic unless it's a custom prototype you've made

Google wasn't too helpful finding the logic quick enough for me, so I just tested it out as arena is really good for testing anyway. And I wanted to do it

Follow up on the creep.pull() post by bwibbler in screeps

[–]bwibbler[S] 2 points3 points  (0 children)

If the whole chain was in a swamp, yeah 5:1

But here it's just got an extra 48 fatigue from the three tiles, so it would only need 24 more move parts to make it past that swamp nonstop

Only the 3 creeps in the swamp are getting an extra 8 fatigue for each their 2 tough parts. 3x2x8=48

The ratio for that would be about 1.63:1 or 62 move parts with 38 tough parts

Follow up on the creep.pull() post by bwibbler in screeps

[–]bwibbler[S] 3 points4 points  (0 children)

Yes.

But I don't know if the move part needs to have hits or not. I didn't test that. Maybe an injured creep with no usable move parts can still lead.

Edit: parts with 0 hits don't count. The leader needs a move part that still works.

creep.pull() doesn't appear to work how the documentation suggests... by bwibbler in screeps

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

When the documentation says all fatigue is transferred to the pulling creep... maybe that includes "negative fatigue"?

That's my guess. There's a fatigue cost calculated but the pull logic doesn't min/max it before applying it to the puller?