#programming

1 messages · Page 77 of 1

real sierra
#

there's also very nice novice rooms which give you some nice protections early on

rare bridge
#

WHY CAN I SEND 20 EMAIL NOTIFICATIONS IN A SINGLE GAME TICK

real sierra
rare bridge
#

Game.notify

real sierra
rare bridge
#

the game has a feature that lets you kinda

#

email yourself

#

mainly for alerts like "you're under attack" and whatever you want

scarlet arch
#

and.. is your server configured to then send those mails?

rare bridge
#

mine isn't, but the main game could do it

scarlet arch
#

cause that sounds abusable :D

rare bridge
#

look at them all queuing

real sierra
#

i wasnt about to punch my email into cloud's screeps server anyway

#

soz

scarlet arch
#

that seems inefficient

rare bridge
#

omw to email shiro "happy birthday"

real sierra
rare bridge
#

i have emails set to go to my public email address

#

cloudburst@cloudburst.lgbt xdx

opaque wharf
#

Cloud, you can try to make a proxy server with SSE

rare bridge
#

not a problem if i share that one here

real sierra
#

btw if you want an incentive to hop on the main server

rare bridge
#

pixel

real sierra
opaque wharf
#

So screeps -> proxy -> whatever else

rare bridge
#

nah it's not a block issue

#

it's a "i only get 20ms of cpu time by default" issue

scarlet arch
#

out of interest, assuming I want to store the pheromones in memory instead of flags, would you say that can still be very efficient? I wonder if, assuming your workers are pretty dumb, it might be worth it

rare bridge
#

you only get 2mb of memory unfortunately

real sierra
#

if you use the RawMemory object

#

you're allowed to access up to 10mb

#

but you must use your own serializer

#

and manage memory segments on your own

scarlet arch
#

so you exchange CPU with memory basically

rare bridge
#

damn 8mb extra for BYOS (bring your own serializer)

real sierra
#

theres some other interesting features of raw memory

#

like being able to make segments publicly viewable by other players

#

and reading other players' public segments

rare bridge
#

Okay putting a poison pill in my public memory

scarlet arch
#

man I got shit to do but I SO wanna play around on your guys server now

real sierra
#

screeps is set-and-forget

#

thats part of why email notifs are a thing i think

rare bridge
#

rn we don't have a server, i need to look into it properly

rare bridge
#

i wanna do it today, but i gotta see if email notifications would work + if any of these features with npc bots are limited to the main server

wispy jackal
real sierra
#

ROLLED

wispy jackal
#

there's no way vro

lapis wraith
#

SMH even auto complete doesn't trust you

rare bridge
warped narwhal
#

Brilliant

rare bridge
#

what if i plonk myself right next to shiro in game

real sierra
#

im pretty sure that means it sends one email at the end of the tick

#

with all 20 messages in it

rare bridge
#

damn i can't spam my own inbox

#

MinaInnocent can someone here do it for me pls

real sierra
#

i mean

#

oh

#

you want me to try using it on my inbox

#

here goes nothing

rough bloom
#

lowest is every 5 minutes, so presumably you can't spam yourself any faster than that

real sierra
#

lowest you can drop that is 5 min

#

idk the precedence order of these settings

#

i would guess the account setting takes precedence first

wispy jackal
rare bridge
real sierra
#

and then every time it procs, it checks if there are notifs that should've been sent by now

#

and then batches them in an email

real sierra
rare bridge
#

omw to put myself rightn next to shiro (it's a strategic move)

real sierra
#

go for it

rare bridge
#

Okay see you in 13 days (i will die)

real sierra
#

FYI, creep.moveTo will by default explore other rooms while pathfinding too

#

so if a creep cant get between two points in your room, it might try going through adjacent rooms to find one

#

my defense code is not smart enonugh to distinguish between civilian and military creeps monkaLaugh

rare bridge
rare bridge
#

i might have to start somewhat away from you shiro

#

cos your immediate rooms only have one energy source

real sierra
#

there are some nice rooms in this novice area

#

idk why i didnt pick one of the ones with 3 sources

inner pike
#

is the server up ?

real sierra
#

nah

#

we're on the official server

#

cloud coming to farm CPU to get some pixels

#

im almost to my first decoration PagBounce

#

gambling in screeps PagBounce

rare bridge
#

i found one but there;s enemies in it CerberOMEGALUL

real sierra
#

theres E37N34

#

doesnt look terrible to me, might be awkward to place walls tho

wispy jackal
#

wait lemme mess around with auto-complete

rare bridge
#

E37N34 looks pretty good

#

also walls aren't needed if you have a good defence script xdx

real sierra
#

or you build walls to max hp

#

idk if you've done the math on that yet

#

but walls can have absurd health

lapis wraith
#

But are your creeps smart enough to build the walls when they break?

real sierra
#

yes

#

mine are

wispy jackal
real sierra
wispy jackal
#

my auto-complete might be evil herself im not sure

real sierra
wispy jackal
prime ridge
#

God I just wish I vedal would let me fix Vedal's latency vs intelligence problem

wispy jackal
real sierra
#

i think my screeps have reached peak for this era

rare bridge
real sierra
#

until they upgrade the controller to level 4 i dont think i needs to touch them

real sierra
#

spawn time:

rare bridge
#

well

#

out of nowhere in creep time

real sierra
#

spawn time is proportional to body size

rare bridge
#

alright, E37N34, now to build

real sierra
#

MY FIRST FRIEND IN SCREEP

scarlet arch
#

do you mark each other as friendlies or how do you prevent attacking each other

real sierra
#

if you want that functionality you have to code it yourself

#

part of what sparked the earlier discussion of putting a signed token in your public segment

scarlet arch
#

hmm

real sierra
#

non issue anyway

#

me and cloud cant get to each other atm

#

@rare bridge whats your approach gonna be

rare bridge
#

no clue YouActualDumbPieceOfShitFuckYou

real sierra
real sierra
#

also i tested your emails for you

#

each of those is a separate notif

#

its pretty fascinating to watch the timelapse of a room

#

you can see the macro behaviour so much more

#

i saw

uneven pulsar
#

Hello everyone,

I’m planning to build a PC mainly for AI tasks, including heavy fine-tuning and other multi-core demanding workloads. Here is the spec I’m considering:

CPU: AMD Ryzen 9 7900

RAM: G.SKILL DDR5-6000 64GB (2x32GB)

Motherboard: MSI MAG B650M Mortar WIFI

SSD: ESSENCORE KLEVV CRAS C930 M.2 NVMe 2TB

Case: Appco U30 Marine

Power Supply: Micronics Classic II 850W 80PLUS Gold Full Modular

Cooler: Thermalright Peerless Assassin 120 SE

The total price is about 1,450,000 KRW (roughly 1,100 USD).

I plan to buy a used RTX 3090 later, and add more RAM if needed. I also frequently run multi-core intensive workloads.

Do you think this setup is suitable for AI fine-tuning tasks? Any advice or recommendations for improvement would be greatly appreciated. Thanks in advance!

real sierra
#

i dont have enough expertise to offer any advice i'd be confident in

rare bridge
#

useful!

real sierra
rare bridge
#

gotta set up a dev environment first

nocturne olive
#

Finetuning and other types of training are GPU-heavy tasks, especally needing a lot of VRAM

#

On a CPU, good luck finishing this century

uneven pulsar
nocturne olive
#

Well, until you do, your PC is not very useful for AI

uneven pulsar
nocturne olive
#

Then you're fine

#

Note that even with a 3090 you won't be finetuning anything massive

rare bridge
#

get a h100 xdx

nocturne olive
#

If you've got 40K to spend, sure

fast pagoda
rare bridge
#

@real sierra big news: typescript unlocked

real sierra
#

METAPROBLEM SOLVED

#

ive realized i might hit a problem ive never had before

rare bridge
#

time to finally make silly little creeps do stuff

real sierra
#

i didnt code in the 50-part creep limit

rare bridge
#

lemme come take a look

real sierra
#

it wont be an issue for like

#

another many hours still but

#

if my spawner capacity keeps growing

#

eventually my code will prob try to make a unit with more than 50 parts

#

and it'll just clog the queue with units that cant be built

#

and then everyone dies Aware

#

but solving this problem in a way im happy with is

rare bridge
#

that may be a problem CerberOMEGALUL

real sierra
#

The knapsack problem is the following problem in combinatorial optimization:

Given a set of items, each with a weight and a value, determine which items to include in the collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.
It derives its name from the problem faced by someone w...

#

NP-complete

tender river
#

shiro you're lucky it even has a solution

real sierra
#

i dont like doing NP-complete problems in under 20ms despair

tender river
#

np complete is better than undecidable

#

anyway there are many different subsets of the problem which are solveable

real sierra
#

idek if this is a problem worth solving, my current solution sidesteps it

rare bridge
#

Hmm do i get fs in screeps

tender river
#

you get raw memory

tender river
real sierra
#

i mean

#

specifically my problem is

#

given a set of parts with fixed costs, a set of desired relative proportions of these parts, and a max budget, how do i produce the set of parts with total cost closest to but below the budget while adhering closely to the desired relative proportions

#

the current solution i have finds the "single item cost" from the proportions, then divides the budget by that to get a multiplier, and then multiplies that by the individual proportions and takes the floor of each to ensure below budget

#

it's quick but the flooring step often leaves much of the budget unused

#

so i wanted to see if i can add a step to use the remaining budget

#

but its the knapsack problem at that point i think

tender river
real sierra
scarlet arch
tender river
#

its not the knapsack problem because you're trying to stay close to the ratio

real sierra
#

well

#

i think the ratio stops mattering at this point

#

and my reasoning is

#

i think we can add at most one more of each item at this point

#

since floor of the post-multiplier count should remove at most 1 potential part of that type

#

so i think the ratio restricts the part types i would consider adding

tender river
real sierra
#

but im either adding a part of that type, or not adding it

scarlet arch
#

still sounds like what I suggested lol

tender river
real sierra
#

the problem is that ultimately i would like to do Math.round instead of Math.floor in that one step

#

if we have a theoretical desire for 1.8 of a part, i would prefer to include 2 of it than 1

tender river
#

bad idea that can get you over the limit, but then of course you can just do the same operation but subtract instead

real sierra
#

but it might put me over budget

#

yeah

#

but idk which to subtract

#

either way

#

i need to find a set of items to add/subtract

#

to get closer to the budget goal

tender river
#

dont you have total part counts?

#

you can store their count at least and then just remove the one thats the most above the ratio (some part will ultimately be above it unless the ratio you've produced is perfect in which case you can remove an arbitrary one)

real sierra
#

"the most above the ratio" as in?

tender river
#

the ratio is 234:123:567 but after producing whatever you're currently trying to schedule you'll have 23:12:56, then 234/23 < 123/12 > 567/56 so you can just remove one of the second part if you have to

real sierra
#

calculate the actual proportion

tender river
#

shiro have you never balanced arcospheres

real sierra
#

and then find whichever one is furthest above the target

#

and remove a part of that type

real sierra
tender river
#

arcospheres

sage crag
#

niuh

tender river
#

its pretty simple theres λ, ξ, ζ, θ, ε, φ, γ, ω arcospheres

#

and you can randomize them or flip their polarity

sage crag
scarlet arch
tender river
#

the recipes that use them constantly randomize what they use so you have to keep a steady supply of every arcosphere

sage crag
scarlet arch
#

is this from that one Factorio mod

tender river
#

and if you accidentally make your arcospheres too similar you can stop being able to convert them to other arcospheres

tender river
scarlet arch
#

right

tender river
#

i've never done it btw neuroPogHD

tender river
rare bramble
#

space exploration is pretty cool neuroPogHD played it for 500h, got to the mid game and had to temporarily stop playing because my 5600x couldnt keep up, only giving me 15 ups no matter what optimizations I did

tender river
#

since its in the spec

#

i wonder if there's a regex engine that JITs the regexes

#

pcre does it apparently

#

(i actually have no idea why the lsp spec even mentions regexes)

#

okay it's for snippets apparently

#

so the lsp wont have to have regex support

#

my plan has been foiled

#

i'll have to do it some other time

#

writing a regex engine sounds like fun

rare bramble
#

ICANT I havent gotten anything done in screeps because I have been thinking about the data structures that I need to have, I think im slowly getting it, still need to figure out how to treat multiple screeps as a singular unit for later on

real sierra
#

whether or not it works, and how expensive it is to compute, is a different question

rare bridge
#

shiro

#

i blame you for bingo being late today

real sierra
#

hi

inner pike
inner pike
real sierra
scarlet arch
real sierra
scarlet arch
#

I mean, yeah, but that's reactive, not proactive

real sierra
#

instruction count estimate doesnt help when the main slowdown is a loop

#

dynamic programming my beloved

scarlet arch
#

oh true completely forgot about those kekw

#

just trying to be helpful idk nyaShy

real sierra
#

❤️

#

i know

#

thank you :>

rare bridge
#

LULE arrays have persistence

#

YouActualDumbPieceOfShitFuckYou nice memory limitation screeps, i can store all i want in arrays

tender river
#

so you can pretty much only use it for caching

rare bridge
#

it wants to spawn 14 harvesters

#

(i built a job system to spawn creeps so i'm not pointlessly trying to spawn creeps when i can't, but i can still say "hey i need these" and it'll do it.. eventually)

real sierra
rare bridge
#

@real sierra my job code is working pogs

#

my spawner only spawns when it thinks it needs to

real sierra
rare bridge
#

so now i have energy

#

so i can start letting them upgrade my room controller

#

okay my creeps don't have an idle job, but i wanna give them "jobs" as well as "roles"

#

so a role would be it's overall purpose in life, so "harvester" harvesting energy and giving it to extensions and spawns

olive sable
#

Is he seever up?

rare bridge
#

NOPE not rn

#

i'm having to look into stuff more

olive sable
#

Okay okp

rare bridge
#

i'm playing on the main server rn

olive sable
#

I am back to civilization Exhausted

real sierra
#

wb!

olive sable
#

We went to ada bojana, and were planning to go back via the river

#

That was just a bunch of forest tho so we had to backtrack the whole way

#

And it was all just plastic and trash on the beach

#

And nudists too ig

rare bridge
#

@real sierra thoughts on the above?

real sierra
#

analogous to my "role" and "state" vars

#

seems reasonable to me

rare bridge
#

mhm!

olive sable
rare bridge
#

i'm calling them jobs cos it makes sense in the system i'm building (where a creeps actions are defined by their jobs), state would, imo, be the actual action it's doing currently

#

i might expose that in case it's useful

real sierra
#

interesting

#

i found that tracking individual actions was too granular

rare bridge
#

like, a harvester may have a job of "harvestAndStore" and currently doing "harvest"

real sierra
#

the simple task of bringing an item from A to B can involve calls to withdraw, transfer, moveTo and of course your idle routine if needed

#

and given many of these may persist for only a single tick, i haven't found need to store it

#

i also find that many of these current state particulars can be inferred from the game world itself

#

but that may only be true with how ive organized things

#

i might have oversimplified

rare bridge
#

the way i plan to do things is that a role is immutable from birth to death

#

a creep is spawned to do one subset and is specialized for that role

real sierra
#

mhm im currently operating on the same idea

#

makes sense to me since their body parts often need to match their intended actions

rare bridge
#

but a creeps current task (might be better to call it task than a job) may be different, and in some cases, shared between different roles

#

and may be different based on the current room state

olive sable
#

Is there a clock system ingame?

real sierra
#

mhm it makes sense to me to have creeps take actions based on a current sub-task than just their role, with their role more deciding how they transition between sub-tasks

real sierra
rare bridge
#

yes, that's my vision

olive sable
#

Under my rule a screep shall never be idle

real sierra
olive sable
#

The dictatorship starts as soon as im back home

spark basin
olive sable
#

Montenegro

#

Ada bojana

#

Apparently where all the nudists and trash gather

real sierra
#

at the rate my creeps are upgrading my room controller, it should almost be done tomorrow

#

i dont even know what RCL4 unlocks

spark basin
#

So this place is on the other side of the Mediterranean, which is a nice place.

olive sable
real sierra
#

another 10 extensions and a storage PagBounce

spark basin
#

I have never been to Montenegro, but I have been to Italy and Vienna near there.

nocturne olive
#

So whar may the silliness going on be this time?

rare bridge
# rare bridge yes, that's my vision

the idea is that if i have a few defence creeps, they should be able to switch from idle or wandering tasks to defend tasks due to exterior factors, such as hostile forces being detected

spark basin
# olive sable Ada bojana

It's not surprising that there are piles of garbage on the beach, depending on the cleaning frequency of the management department.

rare bridge
#

now the question is how to determine if a force is "hostile"...

#

got 3 options

tender river
#

its just a drill ReallyInnocent

real sierra
rare bridge
#

doesn't that get every non-me creeps?

real sierra
#

Ok yep

opaque wharf
#

I have, returned

rare bridge
#

feels slightly overkill

real sierra
#

if anyone who knows how to code is wandering creeps into your room

#

its not for peace talks

rare bridge
#

CerberOMEGALUL true

real sierra
#

but i do see your point

#

so you can always

#

room.find(FIND_HOSTILE_CREEPS, {filter: (creep) => creep.getActiveBodyparts(ATTACK) + creep.getActiveBodyparts(RANGED_ATTACK) > 0})

olive sable
#

Iggly and i have a peace agreement, im sure its fine

rare bridge
#

either that or detect actual attacks against my stuff CerberOMEGALUL

real sierra
#

ooh

opaque wharf
real sierra
spark basin
#

I would like to ask what programming language you usually use.

opaque wharf
#

Sam: "Et tu, Iggly?"

tender river
#

*not really but i have written the most code in hblang lately

olive sable
#

@amber fractal right?

real sierra
#
        const precomputeMatrix = new PathFinder.CostMatrix();
        for (const wall of room.find(FIND_STRUCTURES, {filter: {structureType: STRUCTURE_WALL}})) {
            precomputeMatrix.set(wall.pos.x, wall.pos.y, 31 - Math.clz32(wall.hits));
        }
#

the things i do for efficiency CatDespair

olive sable
#

Wtf is a costmat?

real sierra
#

you can supply a custom pathfinding tile cost dictionary to the pathfinder

spark basin
opaque wharf
olive sable
#

Hes probably still sleeping

spark basin
olive sable
#

Anyways gtg, leaving the nudist beach

real sierra
#

@rare bridge why are all your units standing still

spark basin
#

@olive sable Do you travel in Montenegro or do you live there?

opaque wharf
spark basin
#

Are you local?

opaque wharf
#

Confuse your enemy by not knowing what you're doing yourself neurOMEGALUL

real sierra
#

NOOOOO

#

I DIDNT HIT SAVE ON MY CHANGES BEFORE GOING TO VISIT CLOUD

#

🥲

real sierra
opaque wharf
#

I take back what I said. Sam going on vacation and in exchange got Shiro addicted to screeps while infecting the whole server is more fun and chaotic that I love it neurOMEGALUL

real sierra
tender river
#

bwa

spark basin
#

Are you all computer majors, or is programming a hobby of self-study?

opaque wharf
tender river
#

more bwas i think

opaque wharf
real sierra
#

i'm a math major

tender river
#

im not a major i hated my uni only having 2 courses where i learned something (both maths related) and dropped out, i think i should've done a math major instead of an IT major

spark basin
#

I study automobile engineering, and CNC engineering and intelligent driving need the participation of some programming.

tender river
rare bridge
opaque wharf
real sierra
#

the poor room controller

opaque wharf
spark basin
#

Math major, quite impressive.

tender river
#

i like how the example strings for testing string algos are like "ababababa"

opaque wharf
#

Or is having issue and getting silent treatment neurOMEGALUL

rare bridge
#

i convinced them to talk

spark basin
opaque wharf
rare bridge
#

now one really wants to go to the energy and another one really wants to talk to the room controller

#

nvm it decided to turn around????

#

OH

#

THE SECOND IT LOSES 1 ENERGY IT GOES AND GETS MORE ENERGY ICANT

rare bridge
#

okay, time to implement tasks because this is the exact reason i want to implement it CerberOMEGALUL

opaque wharf
#

Cloud out here, writing better solutions in less than 1 day

#

Take a note shiro neuroTroll

#

You're getting steamrolled neuroTroll

rare bridge
#

the thing is

#

shiro already has this solution

#

but true LULE

spark basin
# opaque wharf True

How many academic years does your master's degree require? My master's degree is three years.

real sierra
#

(i had a week of head start)

rare bridge
opaque wharf
spark basin
#

Then we are almost the same.

opaque wharf
#

I think we have one in our country too, but knowing the higher ed minister here, I think I'm better off saving and taking my master there neurOMEGALUL

real sierra
#

god the units here arwe gross

#

HP^2/tick seems like such a weird metric

opaque wharf
real sierra
#

rms?

spark basin
opaque wharf
#

Root-Mean-Square

real sierra
#

thats not a unit is it

#

idk where you're bringing this up from ICANT

opaque wharf
#

It has the same unit as the original unit

#

Why are you multiplying HP anyway?

real sierra
#

a metric for combat strength

#

the theory is that a unit's total lifetime damage is (damage per tick) * (ticks alive)

#

the former is easily known

#

the latter is proportional to their own HP for a fixed amount of incoming DPS

opaque wharf
real sierra
#

so total lifetime damage is approximated as (unit dps) * (unit health)

#

specific lifetime damage would be that divided by average DPS of my attacking force

#

how do i convert this static building score into HP^2/T tho

#

needs to have same units to be reasonably added

spark basin
opaque wharf
rare bridge
#

my wall has dps xdx

real sierra
#

this score is intended to represent the difficulty of reaching the core of the enemy base from the edge of the map

rare bridge
#

figuring out dps would be a funny way to priortise targeting tho

real sierra
#

so its in units of

#

...distance?

#

or maybe time?

opaque wharf
rare bridge
#

building a way for tasks to end themselves in combination to the task controller to prematurely end a task depending on external factors
they just call the end() function and they'll stop and the task controller will decide a new task for them

opaque wharf
rare bridge
#

i wonder if i should make idle tasks just always check for conditions for being met or if idle should end every tick to do that..

real sierra
#

i want to turn it into lifetime damage

#

current thought is to convert it to the damage i expect to take as a result of having to break through enemy fortifications

real sierra
#

i can convert it to the sum of the health of the fortifications along the cheapest path to the interior

#

and then multiply by expected incoming DPS

opaque wharf
#

Using DPS in your calculation assume you're always taking damage over the distance

real sierra
opaque wharf
spark basin
opaque wharf
#

You do realize that cloud will also implement counter-measure against this later right? catSUS

real sierra
#

if cloud adds enough countermeasures then its probably just a hard room to attack

#

and ill go for someone else

opaque wharf
#

Cue to cloud back reading and finding out that chad who leaves a whole maze for enemy to solve

real sierra
#

Tomfoolery pathfind this

#

honestly kinda genius

rare bridge
#

Okay writing pathfinder helper with caching

real sierra
#

find the weakness of the in-game pathfinding engine and exhaust the attacker's cpu

rare bridge
#

anyway shiro

#

got question

real sierra
#

whats up

rare bridge
#

is there a method to find my distance from another thing

real sierra
rare bridge
#

i just need to know if i'm in range to interact with it

#

without interacting with it

real sierra
#

then i have extra good news for you

rare bridge
#

coolio,thanks

real sierra
#

Aware ive become the screeps docs

rare bridge
real sierra
#

im copilot

rare bridge
#

at least you're not ai like vedal needs LULE

olive sable
olive sable
sage crag
#

awawa

olive sable
#

The beach just happened to be like that

minor crag
olive sable
#

Axelotl neuroHypers

spark basin
olive sable
#

I will

#

Have this picture

spark basin
#

The Mediterranean is really beautiful, but unfortunately I only saw it on the plane and didn't have a chance to go to the beach.

olive sable
#

Its a lot steaper than the belgian coast

#

In belgium you have to go like 25m into the water to get knee height, here its just immediatly deep

real sierra
#

this method is crazy expensive neurOMEGALUL

#

it maxes my CPU bar on use

#

i guess 4 pathfinding calls and 6 or so reduces will do that

real sierra
#

enjoy tech debt forever

#

you will have to redo your paths the moment you build more roads

#

and if a creep stands in the way of one of those paths, its joever

olive sable
#

Just build your paths in a way to make pathfinding easy

real sierra
olive sable
#

I will try the 2nd tutorial as soon as im at the hotel, which will take like an hour or so

#

Tomorrow we'll be gone to albania all day so no screeps bwaadow

rare bridge
#

okay i think i cooked with this task code

olive sable
olive sable
#

The day after that is beach day, so also time for screeps neuroHypers

#

Wednesday is the final day so also time for screeps

real sierra
#

my code has a bug and i cant find it Sadgi

opaque wharf
real sierra
#

i have an array that looks like this

#
[[{"x":1,"y":26,"dx":1,"dy":-1,"direction":2},{"x":2,"y":25,"dx":1,"dy":-1,"direction":2},{"x":2,"y":24,"dx":0,"dy":-1,"direction":1},{"x":2,"y":23,"dx":0,"dy":-1,"direction":1},...],...]
#

and am trying to process it with this eyesore

#
        const staticScore = rangedDPS * staticScorePaths.reduce((min, path) => 
            Math.min(min, path.reduce((acc2, p2) => 
                room.lookForAt(LOOK_STRUCTURES, p2.x, p2.y).reduce((acc, s) => 
                    acc + ([STRUCTURE_WALL, STRUCTURE_RAMPART].includes(s.structureType) ? s.hits : 0), 0)
                , 0)
            )
        );
#

but the result is undefined

opaque wharf
#

The outer reduce has no initial value

tender river
#

you should get an autoformatter

real sierra
#

i also am just

#

unsure of what to put there foran initial value

rare bridge
#

can we reduce this code to a shape

real sierra
#

given the operation is a min

#

wtf is a shape

tender river
#

do a 999999

opaque wharf
#

Suuure

real sierra
opaque wharf
#

Wouldn't be a problem NeuroClueless

#

Rule no. 1, throw away any assumption neurOMEGALUL

real sierra
#

where is my infinity constant

rigid snow
# opaque wharf Suuure

that's because Number(undefined) is NaN because undefined gets converted to string first and can't be parsed as a number because js moment

real sierra
#

any language worth its salt has a constant for this

opaque wharf
#

Number.infinity

real sierra
#

oh sweet

#

thank you

opaque wharf
#

Number.POSITIVE_INFINITY or Number.NEGATIVE_INFINITY

real sierra
#

fixed the problem

#

thank you

opaque wharf
#

For all I know those method could return 1, object, bananas, or nuke

real sierra
#

i love when my method returns chr(sum(range(ord(min(str(not()))))))

amber fractal
#

I spent too much time in the docs

opaque wharf
real sierra
#

modCheck

amber fractal
opaque wharf
rigid snow
opaque wharf
real sierra
#

thats not so weird

#

wait yes it is

#

?

#

when is the type coercion performed

#

and to which types

opaque wharf
#

The notion of array compared vs string literal is already weird as it is

real sierra
opaque wharf
#

Don't try to comprehend it

rigid snow
opaque wharf
#

Just embrace the chaos

#

Alsi shiro, js min accept destructuring

#

So you can just

const data = []
Math.min(...data)
real sierra
#

wait what

opaque wharf
#

If data length is more than N it will fail tho (I forgot the specific length)

real sierra
#

really?

opaque wharf
#

Yes

real sierra
#

thats fine

#

data is at most 4

rare bridge
#

[] == "" is true because strings implement iterable, so "" is pretty much just [] (i am bullshitting this)
but ![] == !"" because [] is truthy and "" is falsy, so ![] == false and "" == true

opaque wharf
#

Screeps is psy ops so more people learn JS ClaraKek

amber fractal
#

uhhhhhhh

rigid snow
olive sable
rigid snow
tender river
rigid snow
opaque wharf
tender river
#

yes but then "" == [] is also easy to get

olive sable
#

Its not

#

Its saterday

rigid snow
real sierra
#

ok its working neuroHypers

#

i now have a metric for room strength

rare bridge
opaque wharf
real sierra
#

it's incredibly pricy to calculate tho

rare bridge
#

cerbyLUL offload it

#

also i can't test my harvestAndStoreEnergy task cos the only storage is full CerberOMEGALUL

opaque wharf
#

Cloud is always trying to offload things out of screeps ClaraKek

rare bridge
#

guess i'll hop in a sandbox

opaque wharf
#

Just like your namesake

rare bridge
#

gotta use the 64 core machine for something xdx

#

(i don't have one)

real sierra
opaque wharf
#

"Move things to cloud" neurOMEGALUL

rare bridge
#

i would explain what i meant

#

but i don't wanna give shiro an advantage xdx

#

maybe later

tender river
#

how about doing the opposite

real sierra
#

i dont need an advantage chad

amber fractal
#

I'm gonna have to work on screeps to make sure Shiro~ doesn't destory me any more than I already am.

tender river
#

move your compute to screeps servers

rare bridge
#

actually, i feel like being nice

#

bucket

real sierra
#

well yeah i know about the bucket

#

i make active use of it

opaque wharf
#

Chay be out there doing the most cursed thing as always

rare bridge
#

i don't currently LULE

real sierra
#

i have a number of expensive operations that i only run once in a while to use bucketed CPU

rare bridge
#

i should prob check my cpu usage

real sierra
#

pogs cloud invents profiling

opaque wharf
#

On 1st day catSUS

amber fractal
#

I'm waiting for Shiro~ to just nuke the entire map once the rest of us get used to the game.

#

I'm just getting something done in the sandbox hopefully before I get overran.

rare bridge
#

pogs my code works perfectly

real sierra
#
function profile(fn) {
  const fname = String(fn).split('(', 1)[0];
  return function(...args) {
    const c0 =  Game.cpu.getUsed();
    const rv = fn(...args);
    console.log(fname+": "+(Game.cpu.getUsed()-c0)+"ms");
    return rv;
  }
}
rare bridge
#

yoink (it takes remote control of my pc)

real sierra
#

now for some of that offloading

rare bridge
#

profile

real sierra
#

WICKED wait does that profiling function actually work?

#

i didnt test it at all

rare bridge
#

LULE the high latency on createCreeps was an error log

real sierra
#

this eval takes 3.4 CPU on my own room

rare bridge
real sierra
#

theres not even any enemies in here

rare bridge
#

i might set up automated alerts if i have high CPU usage

real sierra
#

something i set up early was this

#
    
    log: function(s) {
        console.log("<span>["+Game.time+"] "+s+"</span>");
    },
    
    warn: function(s) {
        console.log("<span style=\"color:#FFCC33\">["+Game.time+"] "+s+"</span>");
    },
    
    critical: function(s) {
        console.log("<span style=\"color:#FF5555\">["+Game.time+"] "+s+"</span>");
    },
rare bridge
#

oh good idea

real sierra
#

actual godsend for my eyeballs

rare bridge
#

alright, i need to write code for controlling tasks

tender river
#

log: function(s) { console.log("<script>alert('" + s + "');</script>"); } ReallyInnocent

real sierra
#

does that work

tender river
#

one way to find out

real sierra
rare bridge
#

THAT WORKED

tender river
#

vote in ligatures poll

real sierra
#

why did it spam alert boxes too

rare bridge
#

why do i have xxs in screeps

real sierra
#

it wasnt just one

#

HELP

#

THEY KEEP POPPING UP

#

OH OF COURSE

#

ITS IN THE CONSOLE HISTORY NOW

rare bridge
real sierra
#

EVERY TIME A NEW CONSOLE MESSAGE WRITES I GET A NEW ONE

sage crag
#

curse of popup

real sierra
#

please tell me clearing console fixes this Prayge

opaque wharf
warped narwhal
#

mhm I will definitely be catching up on all of this context that is probably pretty important.

tender river
#

now you know that console.logging any user-generated content is a bad idea

real sierra
#

i currently only log room names

#

which are fixed

#

but thats good science

#

dear future screeps player,
do NOT print my creep names to the console

#

you WILL regret it

warped narwhal
#

why? ReallyInnocent

#

-# (I wll be doing it regardless)

real sierra
#

ReallyInnocent please wire 10BTC to my wallet to unencrypt your files

tender river
#

wait wait you can use it to run arbitrary computations in the browser that send the result back to the game

rare bridge
real sierra
#

nah prob not

rare bridge
#

outsourcing success

real sierra
#

its all in the console.log call

rare bridge
#

i'mma test that wan sec

real sierra
#

unless you mean using the fact that console updates rerun the script stuff

#

but i dont think you have API access from there

rare bridge
#

actually can't be bothered

real sierra
#

and theres no other way to exfil from the console

olive sable
#

Guys i am at the hotel

#

Is the server up?

rare bridge
#

SCHIZO is the server up

olive sable
#

Damn the wifi is ass here

rare bridge
#

not rn

real sierra
#

screeps players: refuse to play the game, insist on modifying the game's engine

#

screeps server host: refuses to get game engine working, plays the game

olive sable
#

Game engines are my speciality

real sierra
#

ok

#

sam

#

we just learned that script tags work in the html-enabled console

rare bridge
#

oh my creeps died

real sierra
#

time to make doom in the console

rare bridge
#

and my code autocreated new creeps to replace them

olive sable
#

I dont html

tender river
real sierra
#

wait

real sierra
#

you could send it back to a human

#

but your code cant read the console

#

i guess you do have API access tho dont you

#

wait

#

Concerned ?

opaque sigil
real sierra
#

no i think it stillf ails

tender river
#

is this read only then?

real sierra
#

because the script tag updates upon a new console message being sent which only happens when you call console.log from the main script

olive sable
#

I also dont js

#

Bwaa

rare bridge
real sierra
#

but if i implemented everything right your room would score 0

rare bridge
#

"just steamroll it at this point" score

real sierra
#

its free LULE

olive sable
#

I have fogured out thzt the wifi is good if i keep hhe door open neuroHypers

rare bridge
#

will fix in a few mins just need to write tasks for them LULE

real sierra
#

i need to stop helping cloudburst

rare bridge
#

(tho also programming the code to handle task deligation is important too)

real sierra
#

they're making too much progress

olive sable
rare bridge
#

"too much progress" shiro my creeps do not MOVE rn

olive sable
#

Then make them move

real sierra
#

nevermind

rare bridge
#

i have all this fancy code and they do not move

#

i wonder why

olive sable
#

Is quick, its easy, and its free: not dealing with js

real sierra
#

someone was setting up a rust environment earlier and sent a screenshot of endless type defs for screeps

#

have not heard from them since, only conclusion i can draw is that rust killed them

olive sable
#

Classic rust

tender river
#

its called data modeling and it does kill you

olive sable
#

Its time to play screeps neuroHypers

real sierra
olive sable
#

Nah wait i should shower first

real sierra
#

waiting for the gpu implementation

olive sable
real sierra
#

chayleaf gave me an idea tho

amber fractal
#

Dang it, funky town was on a store radio and I blame @olive sable for my reaction

real sierra
#

@olive sable

#
console.log('<canvas id="glcanvas" width="1" height="1"></canvas><script>const canvas=document.getElementById("glcanvas");const gl=canvas.getContext("webgl");alert("has gl: "+!!gl);</script>')
#

you can access webgl from the console

#

there's your gpu access

opaque sigil
opaque wharf
stark needle
#

bro gemini chill

real sierra
#

if chayleaf can figure out exfil from console to script then you can in theory run things on gpu and get results in your main script

#

tho i dont know the specs of the gpu over at screeps hq Om

#

might be integrated graphics at best

#

actually i dont know if the console runs over there

#

prob doesnt

#

MonkaS cloud's units are standing there menacingly

#

i must unlock nukes for MAD

olive sable
#

i will make the greates screeps gamengine ver

#

its loading... wifi bad

#

yay

real sierra
#

more screeps friends

warped narwhal
#

I will not be able to get screeps till I get paid on the 12th, but I will hopefully join you guys then. On a side note, how is the rust bindings coming along? (I am a massive rust nerd)

real sierra
#

I think that's rust bindings guy typing rn

warped narwhal
#

how convenient HuTaoLaugh

rare bramble
olive sable
rare bramble
#

but now it's all coming together and things should be much smoother now that I have got the foundation done NeuroClueless

warped narwhal
nocturne olive
olive sable
#

yay

#

superbox i still need like 80 bucks from you lmao

real sierra
#

when I started screeps I used to think "wow, I can't believe they give you so little CPU unless you pay"

nocturne olive
olive sable
#

you have till my birthdayCat_Gun

real sierra
#

but more and more I'm thinking "how bad does your code have to be if you need more CPU"

warped narwhal
nocturne olive
olive sable
#

its the 22nd

nocturne olive
#

Of this month??

real sierra
olive sable
#

ye

#

im not serious btw, but i do like having money

rare bridge
#

they went to bedge

nocturne olive
#

I think from what I can tell I may be getting more money again maybe next month or the one after

olive sable
#

just give it whn you can spare it, preferably sooner than september

real sierra
#

the creeps eeps

olive sable
#

estimated time to finland according to bpost is 5 days

#

you should have it soon-ish

nocturne olive
#

So maybe during next week

olive sable
nocturne olive
#

Would be very cool

opaque wharf
olive sable
#

i deal 3090's

nocturne olive
#

Well, you sure have some cheap ones

olive sable
#

I bmie screened due to screeps

#

Kmode exception not handled

nocturne olive
#

Whuh

#

Does it have kernel malware or something?

sour harness
#

Soon he'll go around breaking people's legs for not paying the GPU taxes

nocturne olive
#

Does it even run on Linux, because if not, I couldn't play even if I had the money

nocturne olive
#

Silly

#

Well, guess I at least know that if I ever have the funds to get it

#

I'm on Mint Cinnamon, probably should work if Arch does

opaque wharf
#

Can different region gift to another region?

olive sable
#

idk why, has something to do with on of the gigbyte apps

opaque wharf
nocturne olive
rare bridge
#

@real sierra i have run into an issue: i can't actually test my code ICANT

olive sable
#

this laptop is decent, but bluecreens like once aa month just cuz why not?

amber fractal
rare bridge
#

nvm i can test saved

rare bridge
#

mhm doesn't work

olive sable
nocturne olive
#

Scam laptop

olive sable
#

it was only 600

amber fractal
olive sable
#

i5 12500h and 3050 laptop for 600 is prett good deal imo

amber fractal
#

As long as it isn't 2gb vram I sleep

opaque wharf
olive sable
amber fractal
#

I still am mad I got scammed with my 3060 laptop

olive sable
#

shiro and cloud feel free to ignore my illegal bussiness practices

nocturne olive
#

They're probably too busy playing the fun looking game to notice

real sierra
#

depends

#

what's my cut

olive sable
#

i dont have a tax number, so if i start doing this regularly the belgian irs will come after me

olive sable
opaque wharf
rare bridge
real sierra
opaque wharf
#

Tax evasion 101 was like everywhere then ClaraKek

real sierra
#

(my current gpu was free)

amber fractal
olive sable
#

3090's here are 500 bucks

#

thats why im dealing

real sierra
olive sable
#

this is like breaking bad for tech nerds

real sierra
#

this is why my entire creep loop body is in a try catch

opaque wharf
olive sable
#

just lie

opaque wharf
#

Lest you wanna build those starlink submarine

amber fractal
#

I was personally saying just say it is parts

opaque wharf
rare bridge
#

buh my creeps are priortising the controller over creating more of themselves

#

ngl kinda want that behaviour

amber fractal
opaque wharf
opaque wharf
olive sable
#

i upgraded the controller neuroHypers

nocturne olive
#

Whar does that mean?

olive sable
#

the room controller needs to be upgraded to shit in screeps

nocturne olive
#

How very silly

real sierra
#

(this does not make anyone feel better)

olive sable
#

ah

#

huh

real sierra
#

i might actually reach RCL4 by the end of the night

#

those changes i made were crazy

olive sable
#

can you change a module name?

real sierra
#

wdym change

#

its a file name

olive sable
#

i typod

real sierra
#

"Open local folder"

#

then rename

amber fractal
#

I wish, I temp named one bwaa and didn't see a way to change it in game

real sierra
olive sable
#

fuck i pressed delte

amber fractal
#

Is the server up yet?

real sierra
#

@rare bridge hi someone has a question for you

amber fractal
#

nuh uh

real sierra
#

i love that when one of my creeps dies, 5 logistics units descend on their corpse to loot them of any energy they had

#

like vultures

#

🦅 🦅 Deadge 🦅 🦅

amber fractal
#

The american way

olive sable
#

my screep is shooting laser beams

real sierra
#

yeah they do that

#

first of many lasers

olive sable
#

i have fulll energy

#

ah its building ig

amber fractal
#

I'm still working on more mining stuff

real sierra
#

niche screeps feature #59438693

#

towers can repair structures

amber fractal
#

surely not in the tutorial NeuroClueless

rare bridge
#

Okay i give up writing this code for now i can leave my creeps inefficient

real sierra
#

didnt get lost in the sauce

rare bridge
#

i should prob focus on defence cos i have none of that rn

olive sable
#

i still dont get js syntax, its bad

amber fractal
#

Time for the most cursed notes I've done in a bit

rare bridge
#

but first, gonna make a task that directly attempts to upgrade my controller

olive sable
#

i dont like te console.log stuff in the tutorial, it spams

amber fractal
#

I was on VC while doing tutorial and my friend was saying how bad it was for spamming

real sierra
#

unless the people next to you are SUPER locked in

#

you dont need to worry

rare bridge
#

i'mma focus on it anyway

#

cos i'm super locked in xdx

real sierra
#

the max amount of rooms a person can own is based on their GCL

rare bridge
#

tho tbh the way my code is working rn i could easily revive myself

real sierra
#

wait

#

im gonna hit GCL2 soon

rare bridge
real sierra
rare bridge
#

wrote a task to allow me to upgrade just by changing a memory value on the room

#

let's see...

tender river
real sierra
#

ive written most of my code to generalize to more rooms but i wont know for sure that it works until i claim another

tender river
#

well, i'm sure your neighbors will be kind enough to give you that opportunity

real sierra
#

im in a novice area

#

no long-time players can get in

#

for at least 12 more days

tender river
#

ha nerds

real sierra
#

and nobody in the zone is any good at this game

#

(except cloudburst)

amber fractal
#

I've already generalized the tutorial code a bit so that it is able to handle mutipule rooms.

#

haven't tested it yet

real sierra
#

actually i lied a bit

#

that crazyfish person is locked in

amber fractal
#

For now I'm dealing with mining and pathfinding.

rare bridge
#

i have 4 creeps and they all wanna store 49 energy into the spawn

hoary lion
#

ML datasets are making me use a lot of python hidden functions

olive sable
#

how do you emty the memory?

hoary lion
#

__iter__ neuroAware

rare bridge
real sierra
#

something like that?

amber fractal
#

While writing notes these bois are just vibing

opaque wharf
#

I am here, lying on the floor trying to sleep while watching #programming descend into madness with JS and screeps neurOMEGALUL

real sierra
#

the only person with 2 rooms

hoary lion
#

I must join this trend

#

so I can do JS

real sierra
#

MORE SCREEPERS

rare bridge
#

cerberSTARE join us

sage crag
#

screeps is just an elaborate scheme to make more people use JS

#

despicable