#scary circuits

1 messages · Page 1 of 1 (latest)

clear kayak
#

ok

#

hmm

#

i was thinking in mine it would present a signal parameter of the station that was successfully bitwise anded

dreamy mortar
#

Right, wildcarded pull, it's... within reach, I swear

clear kayak
#

but that might be difficult

dreamy mortar
#

Yeah idk how to get the non-symbol into the station name

clear kayak
#

well, it doesn't need to be in the name

dreamy mortar
#

Or hand-encode them all

clear kayak
#

well, actually maybe it does

#

well the encoding is easy enough actually

#

cause it's just a number from 0 to 2047

dreamy mortar
#

lol yeah, the encoding is fairly easy, it's getting that to translate to station name

#

I don't know how to even get a symbol from a number

#

I guess you could index the list

clear kayak
#

well you can use the signal param in the station name target, right?

#

yeah you can index the list

dreamy mortar
#

Are there collisions?

#

I feel like there's gonna be tons but I suppose if you send index on one side you can avoid them, hmm

#

Wow that's complicated, I'd like to see what it is

#

So like, RC materials, it has to be unique to RC&GC, RC&Plastic, RC&Wire, yeah?

clear kayak
#

jesus my brain was in a different place for a second, my friend and his gf trying to set me up with someone and that is entirely not the mindset i need to be in for this logic right now

dreamy mortar
#

RL comes first, this thread will be here lol

clear kayak
#

i am a fickle beast, i may seem like i know what i'm doing, but in another hour i'll be a caveman again and unable to bitwise OR a 0 and a 1

dreamy mortar
#

XD well, the problem's super complicated, the doing of it isn't so bad, it's the figuring out how the pieces fit

clear kayak
#

RC materials?

#

red circuit?

dreamy mortar
#

Multidrop and XY in combo were so much

#

Yeah

clear kayak
#

ok you are still in recipe land

#

but assuming you just mean that it's one of those materials, yes

#

so let me give an example since i have the combinator here...

dreamy mortar
#

That's a lot of mappings

clear kayak
#

it's just indexed/mapped, so it's easy

#

selector combinator OP

#

also 2048 / 5 (5 quality tiers) == 409.6

#

which is scary

#

and i don't want to think about it

dreamy mortar
#

lmao

#

I think there's a limit

clear kayak
#

you can't actually dynamically select an input in selector

dreamy mortar
#

2048 is too clean

clear kayak
#

honestly selector combinator is the worst. id rather use noSQL

#

i feel dirty saying that

dreamy mortar
#

You can index

clear kayak
#

ah i need all the inputs to be the actual number amounts

dreamy mortar
#

Oh maybe

clear kayak
#

is there as simple way to make that

dreamy mortar
#

At least you can get a reliable list if they're sortable

#

script

clear kayak
#

i have touched lua like once

dreamy mortar
#

Maybe talk to Kaza about it

clear kayak
#

f

#

oh wait a second

#

they are already numbered

#

kaza is amazing

dreamy mortar
#

lol programmers think alike

#

I think you have to cast symbols to numbers too?

clear kayak
#

it's not 0 indexed, but i think given the context that's actually correct

#

uh i'm not sure how lets see

#

oh do i have to do a.... anything check and then pull out the indexed one

#

i don't have the selector combinator hooked up by a wire

#

that's why this was complicated

#

i told u, i'm an idiot

#

wait i do

#

yeah i have to match first

#

i had it hooked up to the wrong one

#

ok we good

dreamy mortar
#

Hell yeah, honestly I think this is probably something

#

I'm going to roll my solution but I'll do it in a way I can include this if you get it rolled nicely

#

I think it should be handled as is

#

*N is stronk

#

Wait is it and or xor?

#

Ohhh it's and, copper and thing==copper, right

#

There must be collisions?!?!??

clear kayak
#

collisions are fine because the game schedules

#

there are many stations in my setup that have the same name already for unloads, i just have to target the name and the game would determine which one to pick

dreamy mortar
#

Maybe

#

I spotted two collisions on my break

#

Fuck I forgot my coffee

#

Material #3 for product #15 collides with material #7 product 15. 3 tests true when 7 is sent

clear kayak
#

my coffee grinder...

dreamy mortar
#

And I think collisions are bidirectional

#

If you request 3 for 15 you'll get 15 for 3

clear kayak
#

i'm sorry tell me more specifically about those collisions

dreamy mortar
#

Maybe I misinterpreted how you're de-encoding them, but if you want to broadcast a request for material #3 in the giant list, for product number #15, you do 3&15, yea

#

Provider type 3 knows it needs to send something to destination 15

#

Except... that will activate for 7&15 too

#

And also, 15 will think it needs to provide something to symbol 7

#

Wait no, it doesn't work at all in that direction?

#

So I guess greater number must be requester?

#

xor is flat out as well... idk this is tough

clear kayak
#
>>> bitmask |= (1 << 5)
> bitmask
> 32
> >>> bitmask |= (1 << 15)
> >>> bitmask
> 32800
> >>> bitmask |= (1 << 7)
> >>> bitmask
> 32928
#

is_present = (bitmask & (1 << 5)) != 0

dreamy mortar
#

That's only 32 items?

#

or 31 /we

clear kayak
#

i'm working through some things, remember -- i'm an idiot

#

i am not limited to 32 items though, no

#

only by the max int

dreamy mortar
#

Yeah but if you're getting a symbol back...

#

You also have to encode all the combos up front, which you could do with a formula in a param, but still

#

Okay here's a simple version of the collision. Say you have only 10 symbols

#

If you want any combination of those two symbols, with and, it will also be a symbol

#

And there are multiples that fit

clear kayak
#

lets say you have 10 symbols

dreamy mortar
#

1&5, 1&7, 1&9, 1&11

clear kayak
#

and you want index 1 and 3

dreamy mortar
#

That's 1

#

but it's also 1and 9

clear kayak
#

00000001010

dreamy mortar
#

Only 31 items

clear kayak
#

right, just add a lot of 0's to the left

#

but also the index's are usually much larger than 1 and 3

dreamy mortar
#

Yeah I don't think it's extensible enough 😦

#

Not THAT way

#

I think the idea is still something maybe

#

Encoding to symbol, maybe not, ands... maybe?

clear kayak
#

unfortunately i can't get good tests going yet either because the index's seem... whacky?

#

i'm getting slightly different quality results for the index's i'm picking and it's not consistent for changing + or - any constant number

dreamy mortar
#

O.O

clear kayak
#

oh, F, it's because when I do any minus math, i'm ruining the index cause numbers that are "0" disappear

clear kayak
#

my eyes are bleeding

#

but the only simple way i can imagine would not work with the current constant combinator index's, as it exceeds the max int when bitshifting

#

i would need a much reduced symbol count to make it work

#

i need to stop touching combinators

dreamy mortar
#

lmfao

clear kayak
#

i feel like i'm all cracked out

dreamy mortar
#

This is an incredibly tough problem all around. Peak science

#

Never stopped to think if we should

clear kayak
#

i don't think it's actually that difficult, i'm just not great at this stuff

dreamy mortar
#

I'm decent at this stuff and imo it's very hard

clear kayak
#

all of the things I am good at are pretty much everything that isn't details

dreamy mortar
#

Yeah the details are the devil here

clear kayak
#

yes details make my eyes bleed

dreamy mortar
#

The big picture isn't so bad to put together. We're missing a few tools that'd make these problems near trivial

#

The tools we have.... I think we have enough

clear kayak
#

i think probably the solution is somewhere inside doing something like a sha256 on some encoded value for truncation

#

wait no that would never work because that removes the utility of math from the encoding

dreamy mortar
clear kayak
#

yeah i wish i could just and symbols

#

and what it actually is, is ORing the symbols, then anding to check for existence

dreamy mortar
#

lmfao I thought about xor

#

But you lose data

clear kayak
#

but there is no symbol1&symbol2 result

dreamy mortar
#

w/o a key anyhow

clear kayak
#

it would be nice if there was

#

i think if you worked with a much more reserved item set in the combinator

#

it would be doable by just bitshifting easily enough

dreamy mortar
#

Yeh, but I wanna tick all the "vanilla LTN" boxes

#

generic multi, etc.

clear kayak
#

idk, i give up. i don't know how i managed to get myself on this track

#

my brain hates me

dreamy mortar
#

lmao s'all good

#

I've got your idea put into the toolbox

#

It may find use

clear kayak
#

great