#programming
1 messages ยท Page 84 of 1
do yall expect us to not wait in line at the grocery store?
there's nothing to get, it's just a lil meme that british people love queues
yes
yes

proof that whatever they are dont exist

this cant be healthy
im just that big brain
bro doen't have a 4head, bro has a 10^82head
damn are you that big
im just including the universe
"
WE'RE USING 2MB"
thanks for the compliment, i always knew i had the knowledge o fhte universe
the 2mb in question:
what is this list of 119 errors
some of these just make absolutely no sense
wait
what?
is this every error ive ever gotten?
some of these are so old they're from my previous AI that i wrote when i first started playing
shiro is canadian
shiro do you queue?
what does that even mean
like in daily life
you dont skip queues right?
just dying if you have to wait
like the grocery store
of course not
if you skip queues for non-urgent reasons you should be shot
shiro this guy is delusional and believes that other countries queue
see, even canadians queue
if you take actions that place yourself before society then why wouldnt society dispose of you
the belgians queue, the canadians queue. i dont get why the british are gatekeeping queueing
fuck the british
didnt mean to gaslight you into hating the british but sure this is the best outcome
@real sierra miner code
when you start getting things like this, do you not wonder if you've abstracted too far
cloudburst are you british?
how much overhead are you getting calling empty functions like this
it's empty for now i'm working on it 
why did you show it to me before you wrote anything 
for the comment 


i love how you didn't bother giving it a more specific type, just Function 
wdym more specific type
i just noticed this is... empty
wait was Function not a built-in, am i tripping
it is a built in
are you running on hopes and dreams?
always
you can type the parameters and return too
in the Function type itself?
like, you can specify the parameters to the generic type?
i don't actually know, but (params1: type1, param2: type2) => type3 works as a type
it is 
you want a more specific type for Function, then Function has to be a generic type that accepts type parameters
it doesnt have applicable inheriting types you could use in its place to my knowledge
i was talking about a more specific type for functions, not Function specifically 
this argument is so stupid ๐
i dont think Function has any built-in subclasses that would make sense to use tho
or are you suggesting cloud subclass it themselves
i'm not suggesting anything
i just found it kinda funny to see a "oh yeah this thing is a function"

also TIL Function is just
interface Function {
/**
* Returns the name of the function. Function names are read-only and can not be changed.
*/
readonly name: string;
}
my life has been a lie
i'd () => unknown but who cares 
๐ฆ โจ๏ธ
๐ฆ 
admin he's doing it sideways
tbh this screeps code seems so inneficient to me, im constantly checking if shit decays and every single other state change in the world that is important to my screeps.
normally i would just make the function activate as a direct result of the state change
r
lled

tbh i am wondering why screeps isnt running on gpu in the server, i guess if the sccripts are all diffrent it cant be properly parallelized?
have you looked at the server dependencies
gpu js runtime 
nope
it's using nodejs from like a decade ago
under the hood, screeps is just a bunch of giant database ops afaik
tho maybe that's a step after what you meant
having to isolate things also kind of kills your potential to run things on the gpu
sandboxed gpu 
not that you would want to in the first place realistically
tf you gonna do with this on a gpu
you're not running billions of creeps in parallel i'd hope
just change to using cuda 
And the fun thing with the 3090 is it's doing no rendering, so I get to keep all the VRAM
i wish cuda was a silver bullet
i mean lots of info here https://docs.screeps.com/architecture.html
it'd make my life so much simpler 
well i was thinking the server is kinda really fucking slow, and gpus are fast
they're fast under very specific circumstances
oh damn
opposite extreme
thats a source, a spawner, a controller and every unit in the room
my miner is instantly confused
me when i dont win despite gambling to the very end
theres always something to gamble shiro

you have a car right?
what do you have
legs
impressive
imagine having legs, couldnt be my miners
i didnt think anyone would want various replacement parts from me
given my poor genetic illness history
its gonna be used to feed animals
i dont think im much good for that either given im underweight
food is food
im long so most of my organs are desirable
i do have a bad liver tho
genetics
makes getting drunk cheaper tho so actually not that bad

GCL probably not going up for a couple weeks tho 
i really tried guys
a shame i got stuck on the tutorial

this is a sign to stick to hardware
its about programing tbh
aslong its not just the game itself
but the logics of the game and certain builds
it should be okay to maintain here
ah
well thats not my case
im just really bad
but i understand what you're saying
some programmers just might not like how this concept
but we shouldnt exclude a topic because of a group of people
i mean so far there hasnt been anyone that doesnt like the game

i merely refunded because i couldnt get around it
but i still like the concept of the game
there was a guy earlier
i swear he must've been ragebaiting tho
he was like "EW JAVASCRIPT?" and stamped it a bad game for that alone despite the wasm support
lmao
i'm sure i'd hate it so i'm probably not going to try
either ragebait or missing out big time
but i don't hate it yet
its one of those that learned programming in 9th grade and got told by the "popular kids" that this language sucks
js is slower than many languages
the game allows you to compile your own language
implementing creep logic fairly smooth now, only took a little boilerplate
its also incredibly convenient for this use case where you need thousands of sandboxed programs running simultaneously over the web
"your own" - the languages you like
the languages you like that can target wasm

Anything besides JS mhm
C can probably target wasm at this point so if your lang can target C you're probably fine

i mean you could take a different approach and just... do some code injection ๐
and if your lang cant target C or wasm then why are you complaining about js 
azaka would probably love this game
only a matter of time until kronii gives a screep made with hblang
azaka when he learns that the console renders arbitrary html
there are so many js runtimes for wasm it's not even funny
i mean
im looking into it and like
the hblang vm is written in zig
should be pretty doable to convert zig to rust surely
then you can compile that to wasm with existing screeps compats
so if you make sure the screeps bindings are accessible from within the vm
you win
some extra work probably needed for loading your hblang code from a module

how did you manage an oob access in rust of all things

is the rust screeps code broke
Invalid rust memory access? Impossible, I must report this to management post-haste.
brother have a fcking ghost screep
i wonder what got blocked here
the typo or the topic?
i've got a very fun bug rn
typo
Anyone know any good Linux multi-GPU stress test?
my code refuses to think that this one source exists
'wont die when i command it to die, and screeps will just walk through it'
crysis
ghost screep
I don't have that and I don't think that does multi-GPU compute
taxi_71145222 is a ghost-taxi lmao
maybe this joke is too old for people to appreciate 
I specifically want to put maximum load on both GPUs to test
sli xdx
does the 4070ti have an sli port?
miner
Can't SLI 2 different GPUs, and NVLink and SLI for consumer GPUs ended on the 3090
damn
FurMark inst #1 and FurMark inst #2

And how do I render on a GPU that isn't connected to a monitor?
sth sth offscreen render
At least the 3090 definitely won't be sagging, the power cables for it and the 4070Ti will ensure a consistent space between it and the bottom of the case
I don't think that thing is designed for installing in a bottom slot
Under the 3090?
yes
There's like 1 of them below the 3090, and that's still right on top of the cooler
okay.. miner done, now for logistic
I swear im not doing anything funny
The 3090 is literally just barely off the bottom of the case, and the cables going to it fill the gap
i think you used a little too much cpu that tick
you may want to optimize

The wasm load is always 70 - 200 ms, it's just the first tick
after that it goes to ~2 to 3 ms
Imagine being limited to every third tick, couldn't be me

bro i dont remember what i changed
mfw i might need to refactor my spawning code already
I think I accidentally introduced recursion
it exists?
console.log("/n"*100)
wdym that the problem?
i want to clear console from my code tho
ah
just crash the cosole and let it restart
modern problems require modern solutions
i literally refactored it yesterday and i need to redo it 
fixed my code
i wanna base it on jobs need doing instead of it being based on minimums and maximums
goodluck lmao
me omw to write more boilerplate 
the current system works fine, but i don't want builders hanging around if there's literally fuck all for them to do 
so i'm thinking a minimum count, a maximum count, and within that range the spawner can make it's own decisions on whether a creep should be spawned
function clearConsole() { // god has forsaken us
console.log("<script>angular.element(document.getElementsByClassName('fa fa-trash ng-scope')[0].parentNode).scope().Console.clear()</script>");
}

rumour mill is going at a fast pace currently lmaoo
screeps use these arays to do shit [CARRY,MOVE], but how do i add shit to it based on code?
for appending to arrays
theres another handy pattern that you might like
const arr = Array(length).fill(value);
this gives you an array of length length where every item is value

e.g. if you wanted [WORK, WORK, WORK]:
const body = Array(3).fill(WORK);
based
this is everything i ever wanted
besides vulkan
now i need to have code to see how much energy i have in the spawner and exstensions combined
"A little". Bro went MIA for 3 days only to emerge with pages of boilerplate in rust 
my code broke... my screeps are in distress
https://fixupx.com/chetaslua/status/1942715523911016684 hot of the rumour mill press
STONEBLOOM {its small model keep that in mind}
๏ธ๏ธGoogle is using some special Sauce ๐๐
๏ธ๏ธone shotted
๏ธ๏ธ
๏ธ๏ธprompt : Code Minecraft game clone . Make it beautiful, with pixel graphics like the original, add all main features of the game, terrain and tree generation, mobs, and a bunch of other stuff. Do as much as is feasibly possible
**๐ฌ 1โ๐๏ธ 8โ**
if thats what it will look like no thanks
ok
today on the tech debt cleanup list
the spawning bug ive been ignoring for 3 days where the amount needed for a particular role can be negative, causing an unintended budget overshoot for other roles

me when i want -4 creeps
well its because
something like
const perCreepBudget = totalBudget / (creepsTypeA + creepsTypeB);
and current code is like
"we want to have 1 of this creep and have 2 so we need to add -1 creeps
"
ReferenceError: min is not defined???
Math.min?
Math has to be exactly that
Math.min(arg1, arg2)
you can pass a 3rd arg too
it does absolutely nothing
but js doesn't stop you 
i should probably continue working on my logistics
i'm migrating the job of filling the turret and spawners to them
It does find the minimum from all of the arg
So you can do Math.min(...[1,2,3,4,5])
^
Or more likely:
const someComputedArray = []
// ...
const theMinimal = Math.min(...someComputedArray)
i have 300 ticks left for safe mode... and im not prepared
you get a free safe mode activation each time your RCL goes up
idk how you can run out unless your creeps are just idle
my entire code broke overnight so it was running in "just work. but not good" mode
still have this random ghost taxi
godspeed
basically my code was only looking at the nearest extension and not all the free ones.. but now i can't fix it because i didn't have version control and i started reworking my whole system for a better and more split work force
am i meant to ignore the guy who flew in from the next town over near the end of that clip
thats just the wifi
my spawn code was looking for extensions.. but they were never filled so i added a emergency mode where if there is energy deficency but we don't have harvesters we try to spawn a suboptimal harvester... so it was just doing that the whole night
i feel like this clip would be really fucking funny with sound effects edited over everything happening
i cant be bothered to edit it tho
reminds me of this https://www.youtube.com/shorts/WMm6AFewCro
aight i should have 4 miners fully saturatimg my sources, and some containers here by next morning
why did my spawner system spawn a 2nd miner

it.. shouldn't have???
i think my spawners take so long to spawn that my system gets confused and tries to queue another spawn
i think i have an idea
shiro are you sure you've automated everything 

code can auto expand my empire as i attain the GCL for more rooms
defense is
...passable 
will put that to the test later
1.7?
I don't think it should be right?
idk which performance issues are just cache misses
more profiling data supports my hypothesis that i dont need to optimise this anymore
like yea
almost all low performance is from cache misses
...that being said
builders are occasionally quite expensive
with no cache misses
so they're probably in need of extra caching
time to profile the preprocessing steps then
me adding a TON of profiling to my program 
your lack of if (Game.cpu.bucket == 10000) Game.cpu.generatePixel(); makes me quite sad for you
well ive concluded from my profiling that im cracked at coding 
i don't have it either...
back to adding features
if you want cosmetics, id suggest you start now 
but also.. everytime i compile it takes me over the current frame time. so if i get unlucky it could make my program take like 10 ticks to compile
Very VRAM
21GB
3090 really being utilized
32 RVC batch size though, so that's cool
this is what i output for profiling now
if (game.Cpu.Bucket == 10000 && game.Time - CurrentTick > 10)
game.Cpu.GeneratePixel();
i added this now.. it will now only try to generate a pixel after 10 ticks have past after a recompile
my profiling is meant to be read bottom up tho
do it 
I volunteer Shiro
The 3090 has arrived @olive sable 
maybe later
there is a rust version of the vm already
perfect
aside from that, the zig compiler can compile to wasm
shiro would tell me to give up
vm ecall hook
https://depell.mlokis.tech/feed
hblang in browser
He knows
Also look at all that GPU
so if its this few steps why doesnt it already exist
because it sounds awful

vm-ception
i feel like an hblang expert like you could assemble this in moments
Noice
and then screeps in hblang would be possible 
you could write some example screeps functions too to show how it works 
Shiro seizing every opportunity to drag anyone to screeps
i would rather reimplement screeps from scratch in hblang than mix javascript and hblang

"Fun"
time to see if my new logistics code works
Look at rust interop with JS. MIA for days 
this is a bold claim to make before having seen the screeps backend code
look at him
chat, i hate wanting to code something but not knowing what to code
whats this for?
have i got a project for you
Screeps
See 
Screeps mhm
Screeps: World is an open source MMO RTS sandbox game. With all the attributes of a full-fledged strategy game, you control your colony by writing script that operates 24/7 in the single persistent open world filled by other players on par with you.
Your colony can harvest resources, build units, conquer territory, trade with other colonies.โฆ
$7.49
1838
at this point id code anything
Steph and Shiro. Now we just need Sora 
Shiro single handly necroing the playbase
okay, logistics works so well i'mma pull the harvesters store task
speaking of which i remember why i came here now; how could i set up a way for my second pc to start a stream if my main gets turned off? ive been trying to figure it out but i dont qute know how, any info is handy, i was thinking of going for an api route with one pc sending the other a ping, but i just dont know
#programming is now full of the silly game I can't get, which is particularly silly
Petition to rename #programming to #shiro-screeps
I'd go the mechatronics route and send data when a sensor detects the PC no longer have power
lemme give logistics the task of keeping the turret maintained too
While I'm here, @prime ridge
NN update, testing is underway. The goal being to collapse all cases into primitives. It's not working yet, but hopefully soon it will be.
Could also use periodic ping and track the number of losses in a window
Ooh. Could I convince you to update the github so I can look at it? I'm pretty excited to see
I admit the testing is more jank than the others, but sure
hmm
trust me I have seen worse
oo interesting, what we doin?
All this newfound VRAM is letting me run RVC training at a massive 32 batch size
I don't feel like booting up WM I'm just CLIing this
And since it's on a second GPU I can also use my PC for other stuff in the meantime
||Shiro cute, also happy birthday shiro||
i disagree
The downside is its prone to network error and requires periodic polling and other edge cases
i mean i can just manually start it but why would i wanna do that
automation is funner
my logistic creeps are now in charge of energy from miner creeps to spawns and towers
Frickin git
when i unlock the next RCL i'll get a Storage and instruct the logistic creeps to store into there, that way the builders and (leftover) harvesters don't need to mine anymore
oh that something i should do
allow logistics to pick up energy on the ground if there is any
@prime ridge should be up if I didn't screw over the git
alr alr
it's not up for me
bwaa
fire name
Up on the WIP branch
Generalization seems to function once it exists, but for now I'm working on getting said generalization.
This was tested via echoing numbers with training data only being powers of two.
oh it's on WIP branch yeah

raise "bwaaaaa"
someone's gonna have to tell me why 3 of 4 of my logistics are idle
annnd my creeps have stunlocked themselves
or that tick took ages
@amber fractal What is "MaskToMask"?
Takes in a Binary Mask, outputs a Binary Mask. I do intend to specialize in the future with an accumulator as well so I thought renaming would be a good idea.
Granted I'll need to do a lot of cleanup before I work on another neuron type.
It's just a building block at the moment. Something far too low level to properly use. If I wanted to build a char model then odds are this would be acting like a lookup table with one bit mapped to one char.
Granted as it is it'd not be the best at single selection on it's own. No limits to prevent more than one output by default.

@real sierra should i build some walls
pros: defence
con: as my code is currently written, my builders will go into a permanent repair task
i might make a creep role which just explicitly repairs walls
but for tonight surely the turret will be fine 
I keep learning more about ME networks
at this point there's a very real chance I end up tearing down my current base and making a new "proper" system
memememememememememememe
because I just learnt about point2point ME :3
I finally get to cosplay as a network administrator
Subnets 
subnets are kinda neat
tbh I just needed to properly sit down and read the wiki
because just guessing what the quartz fibre does is not a fun game
https://www.youtube.com/watch?v=c_XG-N3TYJc @trim valve 
I will be watching that when I wake up even if only to test my knowledge
interesting
rewrite it so they only repair the walls after a certain threshold of durability and have them all repair at the same time so it's faster, while it will keep the builders all occupied, they won't spend much time repairing the wall
contrary to having only a few repairing, then you'd probably have them repair forever 

It is an upgrade ๐
since i switched to static miners ive been getting at least one raid a day
in fact i think its over two a day
turret is fine if there's one raider
if theres two, and one is a healer...
prepare at 3am
ding ding ding your base is gone
you'll receive an email that'll affect you as much as the rejections you got from job offers
so not at all? too used to it 
fake news, i would never receive a job-related email
Anyone here know Ren'py programing? I am stuck on trying to animate health bars.
default vladhp = 100
default maxvlad_hp = 100
define hp_bar_width = 200
define hp_bar_height = 20
screen vlad_hpbar:
default animated_hp = AnimatedValue(vladhp, maxvlad_hp, 0.5)
default hp_ratio = animated_hp.value / float(maxvlad_hp)
fixed:
add "hp_bar_empty.png"
add Transform("hp_bar_full.png", crop=(0, 0, int(hp_ratio * 350), 50)):
xpos 359
ypos 237
add "hp_bar_frame.png"
Durring combat it calls upon the "vlad_hpbar" screen
The health mechanic works, but it's chunking the health rather than draining it smoothly. Cannot seem to fix it.
i know nothing about renpy programming
but i would think that converting hp_ratio * 350 to an int would cause it to move in steps of 1/350th
since there's no fractional part to an int
not sure if that's what you mean by chunking
Well more so like the, health does go down correclty. I would just rather it visually drain smother than the chunk of health suddenly disappearing.
The 350 was just to resize the actual image correctly
i think i understand most of python
wtf is __init__ self tho
what
it constructs the class
i mean not in that syntax
but yeah usually the __init__ function is your constructor
self is a new instance of the class
defining a class
maybe an example helps to show that?
idk lets say you want a class Person that can store someone's age
you might write something like
class Person:
def __init__(self, age):
self.age = age
then when you want to make a new instance you can just
me omw to define a class with only static methods thanks to java brainrot 
bob = Person(25) # creates a new Person instance with age set to 25
print(bob.age) # --> 25
class Stinky:
def __init__(self, deodorant)
you defeated me shiro i was busy thinking up hilarious function names
no it needs to be as boring as possible so they pay less attention to the name and more attention to the useful info

so
class OrderingSystem:
def __init__(self):
self.menu = menu
self.cart = {}
self.GST_RATE = 0.09 # 9% GST
def display_categories(self):
#insert categories here
pass
?
self is always passed - it refers to that specific instance of the object that's all it really is
you would need menu in the arguments to the __init__ function after self
yeah otherwise where's that menu coming from
ofc menu is defined
im not pasting the entire thing here ๐ญ
ah if its just a global then thats fine
i have to global it???
oh
it wont be in scope if it's not globe or passed to it or something else to put it there
globe
up here i have def __init__(self, age):, which is why i can pass an age to the constructor later: Person(25)
shiro age leaked
here you just have def __init__(self): so your constructor takes no arguments
i.e. unless menu was defined somewhere else at the same level as the class was, it cant be seen from inside the function
its just a random undefined word
or pass it in the args
or
when you call it
that
oh
honestly do i even need a class for the stupid ordering thing i can just function all of them and itll work the same :smh:
this is also wwhy they use __init__.py inside folders to define a package (bunch of other modules)
it's like a little analogy for the class initialization method but instead of a class it's used to signal that the dir is a package
frig
wholesome confusing the user
lil cute reference for ya
python 201
sob
i think directory structure would be a 101
are you new to object oriented programming
totally ok if you are, many langs are imperative or functional nowadays
idk why oop lost popularity
yes
my youtube has recently started recommending me a shitload of anti-oop videos
classes are one of the strongest features of object oriented programming 
pain
a class is basically a blueprint for an object of some kind, describing what information it stores and what actions can be taken on it
classes are like the thing that enables oop
and then you make instances of that object from the blueprint, each of which is its own separate thing with its own information, arranged according to that blueprint
the constructor is a function that tells the class "how do i make a new instance of this"
it constructs a new instance
you can encapsulate yo shit (in a class) -> abstracting away complexity into smaller bits and exposing just the class call -> this becomes inheritable to its children objects & enables polymorphism throuhg the fact that objects from different classes can be also treated as an object OF their parent class
and i swear to god if you correct a nuance to my explanation in a way that only serves to make it confusing 
oh no i was just shitting out random stuff
which probably does make it confusing but see the thing is
E
tldr never come to this channel for programming help
read a guide that's written to be helpful


info dumps are number one way to make someone not pursue something
nono its a lil helpful
ive seen the question answering ability of this channel and it's dismal
any time you can organize your problem into distinct items of some kind
oop becomes helpful
for me it just lets me think of it how i would want to solve an issue irl
kinda
it takes experience to kinda know how to best make blueprints for those items
yeah what afunyun said is a great point
you can often create things closer to how they would be in reality
since you can model real objects with... well, objects
you're in a caave
with a box of scraps
python is the scraps but you can use those to build little blocks of stuff that solve small bits of the problem
and then jam em all together as needed

and then spent the rest of the 99% of the time trying to fix it after it explodes
they know 
what does a 20 CPU limit mean
pain
idk if I buy screeps I don't really want to pay $130
pain but fair enough
i have two rooms and im only using about 5 CPU
and a lot of that is just one-time overhead that doesnt scale with my size
its very possible to be successful with 20 CPU
just need to write good code
but you can take baby steps toward that, nothing is perfect out the gate
also... technically in the end-game you can buy cpu unlocks with ingame credits
but that is likely 100's of hours in the future 
the base game version is totally fine
i barely go over 3ms
and i run c# with wasm which is likely a big overhead generally
it is a MMO afterall
its not for everyone. also a big time commitment (which is kinda ironic since its suppose to be about automating everything)
i knew the pixel generation code would cause this... now i need to wait for my bucket to be full because i gen'ed a pixel right before i recompiled
Anyone a Roblox developer
Can anyone make me a headtracking script for my fake head named "Debug_1"
My bad I meant look at player script
so this works?
class OrderingSystem:
def __init__(self):
#set menu data
self.menu = {
"Burgers": {
"category_code": "FB10",
"items": {
"B01": {"name": "Classic Beef Burger", "price": 5.50},
"B02": {"name": "Chicken Burger", "price": 5.00},
"B03": {"name": "Veggie Burger", "price": 4.80},
"B04": {"name": "Spicy Chicken Burger", "price": 5.30}
}
}
self.cart = {}
then I can function it
Goodmorning 
Borgers, tasty

Yippie 
Tomorrow flight home, and friday morning train
2 of my upgraders just decide to live in another room now...
Day 90 upgrading the frontend ( which is now fullstack) on a Zend mail box system 
Kinda crazy to look at the git blame in this project and see 2008 commits.. I was 6 
Not sure which one is more impressive, starting a life long coding project at 6 or knowing how to use git at 6
knowing how to use git since you're only starting a project, not completing the entire thing
Hey, i've been having some thoughts about Neuro's TTS. She seems to always pronounce "live" as in "alive" rather than "living" even when it's supposed to be the latter. She also pauses after every period, even if it's signifying an abbreviation. There's also some even more contextual cases like saying "three tenths" rather than "three out of ten" for 3/10.
What i'm wondering is if an LLM can be trained to output different symbols for characters with different meanings, like the period. Maybe normal speech could even be returned entirely phonetically, and there's like a dictionary that translates it to plain text for the subtitles. Or maybe ambiguous cases like "live" and 3/10 could be individually annotated with their pronounciation.
Is this a viable idea? Afaik LLMs are trained on text, so maybe you can't really distinguish these differences during training ๐คท๐ปโโ๏ธ
neuro uses very old tts tech
specifically, she just uses microsoft ashley
some of the issues you mentioned are why evil is a thing (her voice was originally supposed to be an upgrade for neuro) and why vedal is working on voice v3
So hijack Ashley and give her an education!
thank you chatgpt your answer is very insightful
๐
i know this is silly but how do i get in programming in general? specifically towards software engineering or cyber security
software engineering you should try all the different ways to print text to a console (this is why hello world examples are used), this gets you understanding different programming concepts such as variables, functions, etc...
cyber security you need to apply a bit of software engineering (so you can create exploits, obviously) and think out-of-the-box a little. try finding a site that lets you do capture the flag exercises to warm you up
not an expert in either but hope that could give you some pointers
thanks!
also if you're getting stuck on trying to create something try drawing down what you want your program to do before continuing. it can give you a good visual representation both for yourself and others (if you ask for help)
plus you're an artist according to roles so it'll integrate your current hobby in (hopefully)
artist but i draw once or twice a month XD
Yeah, that's more than what I draw in a lifetime
you don't need to make your sketches super detailed, you just need like a diagram or flowchart that visualises what you need to do
You're good to learn programming with just a browser too. The language is called JavaScript and used mostly for web stuff
it doesn't even have to be neat either, here's my example
do be aware though that javascript is perceived to be very different to most other languages
anyways, any language works for learning programming (that isn't html or css unfortunately), you just need to learn programming fundamentals and concepts and then your knowledge will help you translate between languages, more or less alright
If you're curious, go open a new tab in your browser, and hit F12 on your keyboard. That's good enough to learn the basic. For reading stuff about JavaScript, you can head to https://developer.mozilla.org/en-US/. People also make P5.js, which can be used for simple art https://editor.p5js.org/
i might have to grow a bigger brain before i get to the nittygritty of it first hahah
...maybe also say how to navigate devtools too
Wait, it does not go to console by default?
depending on your browser yeah
Oh, there's console but below the inspector. Yeah, probably not the best then lol
yeah
also the inspector shows html code which likely wouldn't be that helpful to examining a website's interactivity
oh no wonder adobe acrobat keeps crashing when I give it 2 PDF files 
It helps a lot, wdym? For learning programming sure it may not be needed since you only need console, but for inspecting web reactivity it helps a lot
also, this is sorta one of the nittygritty of it, but javascript by itself actually places not much importance on one of the concepts in programming (yes I'm talking about types)
what I meant was that because most sane devs don't inline the javascript what you're looking at is basically partially how the website displays itself visually
I say most sane devs because I know an IRL person who inlines all of their javascript
cyber security: do CTFs
software engineering: do projects
also use lots of google in the process (LLMs are also helpful but only if you use it for finding info to read on the topic rather than delegating your problems to them)
google goes a long way, if you know how to learn from google you're set for programming
Which is why it is helpful to debug reactivity. But I may be biased because I use vue that closely resemble HTML
ehh I don't see it that way, but maybe SPA debugging is a different experience to MPA debugging
Yeah, I mostly do SPA
Because I believe generating HTML on the server side is just a waste of compute
That's not SPA-specific
that's called ssg - static site generation
bro my g key is broken

Not always static site generation tho. More like, server-side rendering (Which should be server-side generation really)
ive only really had some minor experience with coding in unity due to highscholl but after that i kinda just forgot it all
that concept can also apply to SPA can't it
It could yes. Called hydration. But I rarely do such thing
Well that same argument applies to me and MPAs
I could use server-side rendering to render my pages (if I bother learning how to without a framework...) but I rarely do such a thing
so 
to me SPAs simply eliminate page navigation load times and reduce sending multiple pages for one client at the cost of worse SEO and larger bundles sent to clients
also can't forget the joke of "everything is just jsx"
Yeah, that's the thing. I don't care about SEO for internal application. Also, PWA is a thing, so the huge load only happen once. With good bundler and framework, it can even be split intelligently to be loaded lazily or when there is bandwidth
My stack is Vue + Vite PWA + Vuetify
well yeah, internal applications don't care about SEO and larger bundle sizes
so in your case it fits
Throw in some UnJS if you need more utilities. Also NuxtHub if I wanted easier deployment
And VueUse. Honestly, I love Vue lol
I can tell
I used Vue back when VuePress was still a thing
and also used it with Nuxt
sorta don't really anymore
also is Vite PWA supposed to simplify PWA creation process for apps built using Vite?
honestly for software engineer i would definitely recommend learning it through making games.
i started out by making super mario in java as my first proper project.
you could use javascript and a framework (https://github.com/collections/javascript-game-engines) and make simple games just to figure stuff out. since its a lot of interactive problems and you can see how things change if you change variables or functions.
Yeah, V2 was really not that good at that time. V3 is arguably miles ahead in terms of DX. Couple that with VueDevtools that support plugins (Pinia, VueRouter, etc)
Yes
For simple apps that don't need to muck around by creating custom service-worker, VitePWA can generate it from predefined strategy and inject it automatically too if needed
But you can still create a custom service worker too if needed for push notification for example
You're welcome. Web development is just that huge
yeah I'm aware
think my cs teacher one time said "we got a whole bunch of people making javascript their lives and it's quite funny" and like well yeah ig
Honestly, most "application" can just be a PWA nowadays
We have WebRTC, Websocket or SSE, OPFS, PWA, Web Push + Web Notification
isn't that what part of the name is
Yeah, but I mean like, native app
oh yeah
I think microsoft took that to the extreme with one of their windows releases
I think it was the Windows 365 builds being basically one giant webview?
Not to mention the non-standard API like Web Bluetooth, Web USB, and other Chrome specific API
WASM too
It is. 365 can be used inside a browser
yeah I would imagine so
but I thought it was basically just screensharing to a browser iframe or smth
I don't know the details about that
hooray
i still have 1 more school yet to get back to me but imagine i get invited for all 3 of my choices
would be pretty cool
Congrats and welcome to the insanity
with 2 acceptances im on par with one of my seniors
well theres also the part where i need to actually prepare for them

bwabwa
You know chay, shiro will make konii implement an interface for hblang to screeps. Will you play it then?
shiro doesnt have that power
however, i am willing to make a js backend for erf2.0 for all your screeping needs
You say that but now half of programming is persuaded to play screeps. Even using rust
they got me
peer pressure
That ERF2.0 itself is already cursed as it is. Now you wanted to somehow implement JS interop
i even closed it today once already...
but now.. atleast i hope.. even if im offline everything should just work and nothing should break even if i get invaded... 
clearly you must buy a new monitor just for monitoring your screeps
i even started using RoomVisuals for debugging..
i logged in on my phone just so that if i get a email that i get invaded i can quickly enable safe mode 

quick question tho
can enemies cross diagonally here? visually it would tell me no.. but creeps can normally go through diagonals
Shiro just take the safe route and assume they can
But I don't know for sure if he has changed it
I still dont understand why resolving the ID fails
What even is the ID type?
alive and well I think
I'll check on this afternoon
I don't think much has changed for this morning
they can
I'm almost certain
But its still your assumption 
I mean you could also just
if (room.find(FIND_HOSTILE_CREEPS).length > 0) room.controller.activateSafeMode();
or whatever the function is
yes they can. i just looked in the screeps discord
there is no reason to assume the movement rules of the game are changed for ramparts in particular
visuals are visuals 
nah. if its just normal invaders my system should be able to kill them. its just that if its players 
yeah as uncomputable checked, I would ensure the type of your ID is correct
at the js level, screeps expects a string
and I use resolve to get the underlying type
See, that is rust in-memory representation. If you get those ID from somewhere, you need to make sure those in-memory representation are preserved after loading it
and this way to store object is recommended by the rust starter screep in the official repo
i feel like that shouldn't matter. since if they don't change as long as they are initially correct they should stay correct
^
print the ID before you use it and make sure it maps to something I guess
probably a logic error in your code
not a boilerplate problem
Let me ask, what is your code doing to get those ID?
you will
Hmmm, then what did you do to get the creep_impl for Miner, Builder, etc?
the moment a creep needs to remember a particular structure or creep
wdym? 
idk. i feel like even then i probably wouldn't need to.
I'm guessing on your code somewhere, you are iterating a container that contains the object which implement creep_impl for different type of creep
I mean even in js I can just
for (const creep of Object.values(Game.creeps)) {
// ...
}
Not having a stable Unique ID that is fixed is a trouble for the long run 
i have roles saved in their memory. and get the class that needs to do the logic with:
but it is possible for an id to map to nothing if the associated creep/structure dies (or never existed)
i need to get into creeps, can someone make a day have 48h pls
then i just do this. for each role 
I even got it already, just do not really have time for it
using try_resolve retrurns Ok(None) hmmm
did you check that the ID you're trying to resolve actually has a corresponding game object
I would validate that by hand
the game does not automatically clear the memory of dead creeps and such fyi
must be done by the player
ye but the ID i'm trying to get is for a room controller
but also.. i don't think ID are an issue for me. because its just accessible on every creep through this interface. haven't validated if its correct... but i also don't have issues with Name which is similar to this
and it resolves fine sometimes
oh
but other times it just fails
I give up trying to do 3 things at once. Rust to JS is already cursed as it is, and I still got work to do 
sometimes
why do you need a ID for a room controller? can't you just directly access it through the room itself.
Welp, back to work I go
Like I feel like it resolves fine the first time and fails after that since my miners hogging the same resource used to have this problem, but now that I have 1 miner per resouce, i no longer have the same problem with miners
that's so strange tho
Would Core 2 duo 3.00 GHz x64, 8 GB ram and Integrated GPU be enough to play screeps?
I asked it before but didn't get an answer
why would that happen that way
I guess as a bandaid fix you could cache IDs/objects the first time you dereference them or something?
the game is basically a browser wrapper like discord
if you can run a browser you can run screeps. all the calculations are done serverside
if you can watch a YouTube video you'll be fine
Ok great
more screeps players
a few of us are in the novice zone at shard3 E38N38
in case you wanna come visit
1 hour left, in a restaurant rn
The game looks fun. Its a bit like bitburner which is another game about programming scripts and bots in netscript but screeps seems more interactive
My ass hurts from sitting in the car lmao


i would definitely recommend not looking up anything about screeps and just working on the scripts yourself. its a lot of fun when everything breask in your base 
in a game where the core gameplay is writing code, using premade code is gonna worsen your experience

the few exceptions to that in my own code are a function for detecting respawns and a function for clearing the console, each of which I found on the forums
because I didn't even know either was possible with the engine limitations 
i only used the basic template for getting starting with the c# version. it had like a basic harvester and the role thingies. gonna rewrite all of that soonish tho..
like I could Implement a generic trait for objectID that checks if the object for the ID is cached per tick and only resolves it the first time, and returns cached item if the ID has been resolved the same tick before but that would just be more boiler plate
and I think there must be a sane solution to this
bessel is such a nerd dont listen to him
do more testing on when the ID fetch fails
Until it didn't 
I mean, we usually visualize it using cartesian coordinate, so a 2 point are equal when they are overlap/on top of each other no?
A very underrated game about programming is EXApunks in case you want to check it out. It feels very satisfying to solve the puzzles but most importantly doesn't require any programming knowledge which was great for me 1-2 years ago when I played it while deciding if I should learn to program
point 1 is a unique representation nitpick
but he's right for point 2
credit where credit due
Time to check on my screeps
i looked at your base once..
you had like 15 creeps surround a single miner
Time to check on my screeps
can't load webpage
trying to resolve the IDs
This is how I imagine you Shiro. Micromanaging the little guys 
Also, cute phone background, had to post it
Back to my code review I go 

I'm not micromanaging them
they micromanage themselves

i am micromanaging them.. for the past like 20 hours.
i look what they do. and if they fuck up i fix the code.. and repeat
I have a decent system down
I can trust my creeps will do what is needed
the biggest test right now is the new room, and making sure I can still build up from zero
the last time i trusted them like that.. i woke up with a single upgrader unit and no harvesters 
not 100% on if things like wall creation will work perfectly the first time
it should, but
surely
my base.. should upgrade now on its own and keep everything going. it won't expand or anything like that or build anything. but atleast it shouldn't break
it does reassure me that cloudburst is independently discovering the same strategies as me
once i hit lvl 3 i will start expanding to other rooms and stealing energy from them

















