#⌨coders-cave

1 messages · Page 37 of 1

barren shale
#

because my old code sucked and it was time to refactor anything

#

i still need to refactor a lot more

prisma grail
barren shale
#

but this codebase is too big and i'm scared ill break sometthing xzibit

#

We are hiring at SpeciesBox Limited

#

Salaries here are way better than AMP's

#

You should join us

#

pls sadcat

prisma grail
barren shale
#

how much do you get paid

prisma grail
# barren shale how much do you get paid

I get paid 25€/hour (was a good bit lower when I first got employed, but I've said some raises in the year since), which is pretty fair imo when it's my first ever coding related job and I entered in with 0 finished education and 0 C++ experience.
That was a joke btw, I'm not instantly gonna ask money for random stuff I'd do here out of passion. xD

barren shale
#

i was about to say $1 every 100 year

prisma grail
barren shale
#

nOice

#

sadly i don't have a salary 😔

prisma grail
barren shale
#

i have a business though

#

that makes smol money wbsuffer

prisma grail
barren shale
#

would recommend if you dont have a lot of bills to pay

prisma grail
#

They used to have a solid 50% of commands and utils or something in a single tumorcog called "random_stuff.py".

#

When I joined the team, Jupe asked me if I could maybe try making it's structure less cancerous.

barren shale
#

I helped jupe fix a command years ago

#

That was very hard

prisma grail
#

Ok, do NOT compare old AMP to current AMP. xD

barren shale
#

You should consider making a new AMP with something other than Python

prisma grail
#

The codebase is currently in a lot better state than how it used to be.

barren shale
#

And use it to implement new commands then slowly transition

prisma grail
#

Basically the only meaningful caveat is the usage of Python.

barren shale
#

Wat

prisma grail
#

Though it's honestly not even that bad.

barren shale
#

Python sucks

#

Can’t make me think otherwise

prisma grail
barren shale
#

Rewrite amp in zig right now

#

RIGHT NOW mastefgun

prisma grail
#

Nah, I don't hate Python enough to feel compelled towards trying to push for a complete AMP rewrite. xD

barren shale
#

That’s why I said start writing new commands before transitioning the whole things

#

But tbh AMP will never become very huge since you can disable some commands in the future based on server events ig

#

So you don’t have to keep it all up to date and working forever

lapis flint
#

How many hours you working per week?

next mantle
#

yo i did a thing & it actually worked for once 🎉

prisma grail
lapis flint
#

Ah

#

I thought its full time

prisma grail
#

As far as I know though, my contract won't change with full time (apart from the amount of hours I gotta work).

lapis flint
#

So still very good

prisma grail
#

Yeah, the only reduction will be from government taxes that I don't have to pay rn.

prisma grail
# lapis flint So still very good

Yeah. My employer used to be my programming teacher, so I think he noticed my skills very quickly and wanted to "secure" me as fast as possible.

lapis flint
prisma grail
prisma grail
next mantle
next mantle
prisma grail
next mantle
#

AUD has consistently been around 1.6-1.7 EUR

#

Reguardless of eithers inflation it always settles around that exchange for some reason

#

Same with USD to AUD

prisma grail
#

Tbh, my geographical knowledge probably sucks almost as much as the stereotypical average American one, so it checks out that I had no idea about that. xD

next mantle
#

XD

#

What’s funny is that compared to America or most of Euro-using europe, the conversions aren’t that different on smaller purchases that we kinda stick to the same prices as other currencies

#

If a McDonald’s burger is $2 in America it’s still probably $2 in Australia, despite it really being an equivalent value of around $3

barren shale
#

Depends on the country too, tech jobs in America pay way more

#

$100k+ salaries in the US are very common and not hard to get

next mantle
#

Australia is slightly below average but its really easy to get into it compared to a lot of places

next mantle
#

@polar isle thoughts?

#

$2000 AUD

polar isle
#

stupid gpu

next mantle
#

radeon isnt too bad

polar isle
#

dude that's integrated

#

just choose a mac if you're gonna choose integrated

next mantle
#

AMD integrated packs a serious punch for integrated, have a look at the internal specs

#

obv still not good as dedicated but closer

polar isle
#

yeah people tell that but i had an amd integrated gpu and it was nowhere near an rtx or whatever

next mantle
#

graphics really isnt a priorty for me rn

#

or will it be much more glaring than it is now when all the other specs are super high end than it is now with all of my stuff beign average?

#

wait @polar isle i only just realised the newset macbook pros can boot windows

polar isle
#

that's gpu intensive

civic lake
#

Are there any performance related updates coming down the pipe for Worldbox anytime soon? Burst compiler and things like that for a few of the more CPU intensive simulation stuff?

barren shale
polar isle
next mantle
next mantle
barren shale
#

You know what gpu it is?

next mantle
barren shale
#

That’s subjective

next mantle
#

But the cheapest laptop with these specs but with a dedicated gpu is almsot $1000 more aud

next mantle
barren shale
#

Oh it’s integrated

#

Integrated gpu for 1200 is a scam tbh

next mantle
#

Eh for 32gb ram & an R9 it’s ok I think

barren shale
#

Yeah depends on what you are using it for

#

If you’re gaming in it you’d be better off with something else

#

If it is work then it’s good

next mantle
#

Graphics cards alone are like $700 here

barren shale
next mantle
#

Well I’m going primarily for extreme multitasking & programming

next mantle
#

And some (light) gaming but that’s not the main reason I want the better laptop

next mantle
proven tinsel
#

.

amber gorge
#

Indian videos on yt better than books?

feral bramble
barren shale
#

sb2 development be like

prisma grail
barren shale
#

may the gods compile the code and run it with no sinful bugs wbpray

coral gorge
#

where's my crown? that's my bling!

prisma grail
barren shale
#

python does indeed run on the will of god

#

because holy (no pun intended) shit that language is unreal

#

i don't understand why did they make it wbangrycrab

coral gorge
#

no...

coral gorge
#

in the near future

#

a small percentage of coders will just become rich, make some great artifical intelligence company

barren shale
barren shale
coral gorge
#

and the rest, what if a.i. just replaces coding all together

barren shale
#

because coders are the last to lose their jobs xzibit

coral gorge
#

just like the industrial revolution

barren shale
#

programming is not really repetitive

coral gorge
#

wages dropped

coral gorge
barren shale
#

jobs get replaced by jobs

coral gorge
#

well

barren shale
#

only way to stay ahead is to keep getting better

coral gorge
#

honestly the way i see it

barren shale
#

even within software engineering jobs there are people who don't make much money

#

because they know old things that are only used to maintain legacy code

#

these people will soon be replaced when there's no more legacy code they can maintain

#

think of AI as a tool just like every other tool

coral gorge
prisma grail
coral gorge
#

that sounds interesting

coral gorge
#

what if were an indie programmer till now

#

and suddenly a.i appears

#

youre genuinely cooked

#

and even worse scenario

#

what if every programmer will just aspire to make a.i

#

to a point that the ai market becomes unprofitable and very hard to make a living out of

#

because this aint like starting a full on company

#

you dont require any capital at all

#

just code

barren shale
#

you can use AI to do things

prisma grail
# barren shale read the next line >:(

I mean, I don't really see a reality where banks would suddenly decide to replace all of their most basic systems with modern equivalents. It arguably seems like too much of a risk from their perspective, I'd assume. Somehow makes it more worthwhile to keep the 1970s code working for as long as humanly possible.

barren shale
#

AI is far from being able to fully code

coral gorge
#

for now.

barren shale
#

it is always for now

#

it has been for now for the last 100000 years

#

people figured it out and they will do again

coral gorge
#

but a.i is new

#

we'll see we will just see

barren shale
#

computers were new at some point

barren shale
#

because at that point it would become worthwhile

#

and then the people maintaining that legacy code will become obsolute

coral gorge
#

im still worried about the programming market man

barren shale
#

programming is not the only thing that's going to suffer from tthis

coral gorge
#

either it becomes unprofitable or just monopolised

barren shale
#

and it is the one that will suffer last

coral gorge
#

probably around in the middle of the revolution

#

or 3rd quarter

barren shale
#

socialism will find a new job for you dont worry xzibit

prisma grail
prisma grail
#

Tbh, I wouldn't be surprised if COBOL ends up dying from a lack of programmers instead of a lack of usages. I at least never ever hear of any sensible people still bothering to learn it. wbtroll

barren shale
#

the amount of cobol programmers is getting smaller by the day

#

no bank will risk not finding people to maintain the code

#

they will throw it out before it dies

coral gorge
#

my greatest fear is that

#

every job

#

will get replaced by some monopoly a.i company....

prisma grail
barren shale
#

literally not possible for every job to be gone

prisma grail
#

Even today, there's probably close to 0 cobol programmers with the required skill level and intelligence for being able to fix a hypothetical bug in an old banking system running on cobol.

barren shale
rocky kernelBOT
#

You need to create a character first. Use _start

barren shale
#

even if they have bugless software they can't keep up with modern banks

#

otherwise there will be no need to modernize in any thing in life

#

you can just stay on the good old things that work

#

but nobody does that because modernizing == more money

coral gorge
#

to be fair

#

from a business perspective

#

if it really caused that much of a problem for banks, eg. a major loss in revenue then they would switch from it

#

which most likely wont be easy but

#

banks have dozens of income streams

barren shale
#

its not about problems itts more about competition

tall ether
#

what phone do you have?

coral gorge
#

it only becomes a problem when the cost to maintain it gets higher

barren shale
#

the software is not a problem

#

the fact that other banks have better software is the problem

coral gorge
#

only if it becomes harder for the bank to trade

barren shale
#

people will go to the better banks

coral gorge
#

and the type of software or code doesnt play a major role in that

prisma grail
coral gorge
#

because not many people look up "what software does that bank use"

barren shale
#

yes it does

#

people dont look it up people use it indirectly

coral gorge
#

the larger and more "modernised" bank generate more income allowing for them to have lower interest rates

barren shale
coral gorge
#

and can just provide more credit benefits

#

and etc

#

i wouldnt be surprised if there was a large bank using some old code

#

me personally, from a business perspective

prisma grail
coral gorge
#

i just wouldnt see the point in switching unless it has real benefits

barren shale
#

its very worthwhile to keep modernizing to keep your top spot

#

but the problem with capitalism is that these banks are owned by people who own a lot of businesses

coral gorge
barren shale
#

so they just squeeze as much money as they can and then sell out of it and go to the next one

coral gorge
#

im just saying this blatantly

barren shale
#

they dont care aboutt 10 years from now

amber gorge
tulip quest
#

@coral gorge just so you know, all of the things you've said about AI taking over programming hinge upon the trend we saw about 2 years ago with AI becoming far better at creative tasks continuing for years more, but as the amounts of data required to make AI better are exponential and we can't really get more of it the only way for the trend to improve is more innovations, and there's only so many more of those people can come up with. I'm not scared for the futures of programmers yet, only programmers that use ChatGPT because ten programmers using ChatGPT are nearly equivalent to a single programmer using ChatGPT.

coral gorge
#

we'll just have to see in the future

tulip quest
#

yep, that's the main factor. There's just a lot of reasons to doubt it will reach a concerning point even within my lifetime.

coral gorge
#

People in the past never believed we could fly, then airships got invented

#

Of course, airships probably provided more job opportunities than took jobs

#

But it's just an example

#

No one thought of conveyor belts until they eventually became commonplace, and many people lost their jobs

#

People are always looking for more and more automation

#

Of course, conveyor belts and A.I is different

tulip quest
#

"eventually commonplace" is the phrase here. It took a long time for airships, planes and conveyor belts to become commonplace, and the same can be said about AI in a job setting. The foundations of something that could replace jobs is here, but it's not ready.

coral gorge
#

Comparing a purely mechanical instance to something requiring deep learning isn't perfectly analogous, but the main point is that they both ultimately lead to automation

feral bramble
#

Well originally the computer referred to people manually calculating the math

Then computers went and made that job a whole lot easier.

Taking that job away entirely if could be automated or just using less people

Then there's all the other mundane tasks that were taken up by modern computing.

Though as it currently stands AI did generate a set of a mundane jobs where humans have to manually tag stuff en such

Edit: Wait now that i think about it, definitely alot of mundane jobs relating to interacting with computers before ai.

barren shale
#

when code editors started auto completing like 20 years ago people thought coding was over 😂

thin fiber
#

Ok

barren shale
#

no

next mantle
#

I reckon I’ve done pretty well making these aesthetically pleasing considering I’m using matplotlib, any obvious things you reckon could be improved on @barren shale ?

barren shale
#

looks good 👍

#

maybe the legend should be sorted

#

or i think they are called labels in matplotlib

next mantle
#

It is already sorted, in a way

#

By date of addition

#

Oldest is at the top of the legend, youngest at the bottom

#

Should I separate out the dead ones to the bottom?

barren shale
#

shouldnt it be sorted by highest to lowest based on the graph

static solar
tulip quest
#

Anyway, I have a question on another topic (maybe it's a little too vague)

#

How do you get Discord to say you're doing some activity like "Playing Subnautica"? I'm less concerned about doing it in a particular scenario (as I don't have anything for it), and I'd rather hear of an example program environment and path for getting it to work

#

All I want is for it to say that I'm teleporting bread

barren shale
barren shale
feral bramble
# tulip quest All I want is for it to say that I'm teleporting bread

Learn how to set up a custom rich presence on Discord in 2024 with this step-by-step tutorial! Rich presence allows you to customize how your status appears to others, adding a personal touch to your Discord profile. Whether you're a gamer, developer, or just want to stand out, this guide will walk you through the process, showcasing the latest ...

▶ Play video
#

really only options im seeing is using plugins

inner elm
#

Is somebody have a nice "import" for do math tree or something like that, it could be really useful thank you

foggy wren
#

Which beginner language should I learn fir game dev

tulip quest
foggy wren
#

And I only know some python

#

"Some"

tulip quest
#

Okay, so you have a few programming fundamentals already (they're pretty basic). Now you need to choose a game engine, and there are three main options to choose from

#

Unity engine is great for beginners (2d or 3d), Godot is good for 2d stuff (but needs lots of specific learning) and Unreal Engine is more complex and uses 3d. I wouldn't pick Unreal Engine where you're at unless you have specific motivation to.

#

It's always ok to change engine later by the way

foggy wren
#

Thx man

#

But what exactly should I use as ax language if u don't mind me asking bcsI checked python it seems to be pretty basic

tulip quest
#

Language is engine-specific

#

Unity uses C#, Godot uses GDScript (its custom language, nearly never used anywhere else) and Unreal Engine uses C++

#

C# and GDScript are closer to Python than C++ is

foggy wren
#

Thank u very much mann

#

I really helped me here

#

Since I wasn't sure about reviews

tulip quest
#

No problem, from here I recommend once you've picked an engine that you use tutorials to install it and do a few things in it

#

Every engine has tutorials good enough to teach you, but there's less of a headache for beginners initially when you pick a simpler engine

#

Search phrases like "how to make a basic game in [engine of choice]" are really helpful

#

And one last thing, if you're getting an error you don't understand or have something you want to do in the engine that you can't do with what you already know, check the web. It takes a very, very long time to stop running into situations you don't know about in an engine.

#

I think I've said enough for now on the subject, I'll cease my yammering

flat valley
tulip quest
#

C# is the most beginner-friendly and is used in simpler applications (even though any language can be used in complex stuff), C++ is pretty much the opposite in those regards (complex and more difficult) and C is the backbone which looots of very efficient programs are built, as it's the language most higher-level languages compile into

charred falcon
deep shuttle
#

Fuck my HTML code broke

obtuse barn
#

Can i send it here?

deep shuttle
obtuse barn
deep shuttle
#

Thanks

fallen kraken
#

can someone that has a bit of experience in modding help me i keep getting this error and i dont know how to fix it

obtuse barn
stiff dagger
#

Guys, what does my function do?

Function joeCool() {
If (JoeTraits == Doey) {
Print("Doey the Copycat)
} else {
Print("Uncool")
}
}

feral bramble
stiff dagger
#

Smart man

next mantle
#

Also you’ll get another error because one of your strings is missing it’s ending quote mark

amber gorge
feral bramble
# amber gorge Huh?

didn't realize what the further context behind your question was til you said it

fading obsidian
#

How usefull are linked lists practically?

barren shale
#

Very not

#

Never used them before

#

Some languages use them to implement some other useful data structures

round valve
#

im new to code and right now im learning java is it possible for me to create mod using java language?

what apps should i use?

lapis flint
#

I guess its possible on any language if you manage to make/find interpreter on c#

next mantle
#

Python to C# interpreter when

lapis flint
#

Never please

#

But js to c#, uh

#

ts

#

Anyway

barren shale
#

not worth the hassle though

#

ive never found an interpreter that actually translates from language to a language that fully works

#

AI would be your best choice but even then it is not perfect

prisma grail
barren shale
#

using these normal translators will never be able to do any actual real logic

tulip quest
#

AI is still bad at programming to the degree that you'll need knowledge of the second language anyway unless you want to go back and forth debugging with it for hours

dapper pecan
#

I do programming and the only use I have of this.

#

Is making programs in almost every imaginable language that can work these 3 formulas.

smoky atlas
#

Sorry for bad handwriting

dapper pecan
#

Thag looks fun.

dapper pecan
#

Should I ditch C++ in favor of Python? I mean, from what I'm seeing Python is well, the future.

next mantle
#

Depends on what your using it for tbh

#

If you’ve already learnt c++ then Python is an easy addition to what you already know

dapper pecan
spark pollen
#

Hello

gloomy nest
#

Pprt

halcyon stratus
#

Anyone have website portfolios your willing to share I need to make one for my school project

blazing current
#

If u want stuff in python just write libraries for python in another language

orchid frigate
#

each one has its purpose

dapper pecan
orchid frigate
#

I had never done anything in python before and at the start of this month I was randomly invited to start working on a trading bot

#

2 days later I already had commits

orchid frigate
#

after the first you learn languages matter very little

#

choose whatever is best for the project

#

the only worry in new languages is technically not being able to write the cleanest/most optimized code but 🤷‍♂️

barren shale
#

@orchid frigate you are back :o

quartz pumice
#

No more slep

spark pollen
#

What's this channel even about

ancient thistle
#

the cave of coders

prisma grail
wooden jacinth
#

ling

#

gan

quartz pumice
#

I used to hate uefi but it's just mid now

#

It should definitely be better

#

Like it's literally missing basic features like audio and vsync

sullen furnace
#

Hi

onyx plinth
#

does anyone here use dart?

#

or no

onyx plinth
#

understandable have a nice day.

knotty root
#

print ("Hello world")

#

I am now a coder

shy rune
#

I use scratch

lapis flint
#

Poor chat, become so inactive

tulip quest
#

did it used to be active?

#

from what I know it just occasionally has times of higher activity

lapis flint
tulip quest
#

I remember it being this inactive maybe a few months ago

smoky atlas
barren shale
#

Used to be okayly average a couple of years ago

#

But now sometimes there have been days with no messages

next mantle
#

Time to randomly revive this place then

orchid frigate
#

I remember veeeery far back at this point

#

When we fought over....

#

C#?

#

And like C or something?

#

I can't remember

#

We fought over everything but Zi can't remember in the very start what the main beef was

barren shale
prisma grail
barren shale
#

But nah kindness is a lifestyle and I gotta own it

prisma grail
barren shale
#

yeah amp codebase needs some kindne ss to be able to work with it

#

or else youre gonna burn it down

#

go to github

#

burn down the server that is holding it

prisma grail
#

I ended up rewriting that entire segment of code.

#

To make it bearable.

little nest
#

"Naps"

barren shale
#

i wasnt very good at designing big systems when i started working on it ~4 years ago

prisma grail
#

And in 4 more years, you'll be saying the game about your current skills! wbtroll

barren shale
#

the cycle will repeat yes

#

i will always suck compared to future hamza

#

which is a good thing

prisma grail
#

True.

next mantle
prisma grail
#

The worst variant of this is always when you see something so horrid you assume it's by another dev.

#

Just to then realise.

#

Based on git blame.

#

That past you is the commit author.

next mantle
#

Why did past me commit such atrocities & how the hell did the “solution” owrk at all?!?

prisma grail
#

I've before genuinely had to fix some module after it had recently broken down.

#

And when I started gaining a grasp on the code.

#

I genuinely got confused about how that garbage ever worked.

blazing current
prisma grail
#

Nope. :P

spice iron
#

How to start coding?

gilded wedge
half isle
#

Are there any companies that train you how to code so you can work for them? I think my biggest issue with trying to learn code is idk what to learn or where i would use it to make money

#

Now that i say it, sounds unrealistic. If it was my company logically i’d be more likely to hire people that already knew what they were doing.

#

🗿

tulip quest
# half isle Are there any companies that train you how to code so you can work for them? I t...

If you want to learn to program but don't know what for, I recommend learning some simple language you can make small projects with of your choice before sticking to something like web dev or game dev. I personally learnt Python first and built mathematical projects that did stuff like find prime numbers or multiply complex numbers, but you could start with anything I mentioned (as long as you try multiple things before sticking to one). Other people in this channel will have their own recommendations, too.

jolly field
#

Za

flat valley
#

@next mantle when are we getting the next clan graph

next mantle
warped lark
#

`// Interactive website script

document.addEventListener("DOMContentLoaded", () => {
const app = document.createElement("div");
app.id = "app";
document.body.appendChild(app);

app.innerHTML = `
    <button id="magicBtn">Click Me</button>
    <div id="counter">Count: 0</div>
    <canvas id="drawingCanvas"></canvas>
`;

// Button interaction
let count = 0;
document.getElementById("magicBtn").addEventListener("click", () => {
    count++;
    document.getElementById("counter").textContent = "Count: " + count;
});

// Smooth animation loop
const canvas = document.getElementById("drawingCanvas");
const ctx = canvas.getContext("2d");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

let particles = Array.from({ length: 100 }, () => ({
    x: Math.random() * canvas.width,
    y: Math.random() * canvas.height,
    radius: Math.random() * 5 + 2,
    dx: (Math.random() - 0.5) * 4,
    dy: (Math.random() - 0.5) * 4
}));

function animate() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    particles.forEach(p => {
        p.x += p.dx;
        p.y += p.dy;
        if (p.x < 0 || p.x > canvas.width) p.dx *= -1;
        if (p.y < 0 || p.y > canvas.height) p.dy *= -1;

        ctx.beginPath();
        ctx.arc(p.x, p.y, p.radius, 0, Math.PI * 2);
        ctx.fillStyle = "cyan";
        ctx.fill();
    });

    requestAnimationFrame(animate);
}
animate();

// Window resize handling
window.addEventListener("resize", () => {
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
});

});
`

Breh whats wrong wit my code 😭

next mantle
#

@warped lark what error are you getting?

warped lark
knotty root
#

Anyone want a Javascript on how to open a door?

#

(probably what they used for the door opening in minecraft java)

#

``java
class Door {
private boolean isLocked = true;
private boolean isOpen = false;

public void unlock() throws LockException {
    if (isLocked) {
        // Simulate unlocking
        System.out.println("Unlocking the door...");
        isLocked = false;
    } else {
        throw new LockException("Door is already unlocked!");
    }
}

public void open() throws DoorException {
    if (!isLocked) {
        // Simulate opening
        System.out.println("Opening the door...");
        isOpen = true;
    } else {
        throw new DoorException("Door is locked! Unlock it first.");
    }
}

public boolean isOpen() {
    return isOpen;
}

// Custom exception classes
static class LockException extends Exception {
    public LockException(String message) {
        super(message);
    }
}

static class DoorException extends Exception {
    public DoorException(String message) {
        super(message);
    }
}

public static void main(String[] args) {
    Door frontDoor = new Door();

    try {
        frontDoor.unlock();
        frontDoor.open();
        System.out.println("Door is open: " + frontDoor.isOpen());
    } catch (LockException | DoorException e) {
        System.err.println("Error: " + e.getMessage());
    }
}

}

#

G

#

All

blazing current
#

why does nobody here know how to use markdown 😭

ancient thistle
#

good question

knotty root
#

I programmed illegal things

#

I’m pro

sturdy void
#

I programmed legal things

#

I'm noob

spark pollen
#

What's this channel even about

warped lark
#

is it this?

warped lark
# knotty root ``java class Door { private boolean isLocked = true; private boolean isO...

this would be better ```class Door {
private boolean locked = true;
private boolean open = false;

public void unlock() throws LockException {
    if (!locked) {
        throw new LockException("Door is already unlocked!");
    }
    System.out.println("Unlocking the door...");
    locked = false;
}

public void lock() throws LockException {
    if (open) {
        throw new LockException("Can't lock an open door! Close it first.");
    }
    if (locked) {
        throw new LockException("Door is already locked!");
    }
    System.out.println("Locking the door...");
    locked = true;
}

public void open() throws DoorException {
    if (locked) {
        throw new DoorException("Door is locked! Unlock it first.");
    }
    if (open) {
        throw new DoorException("Door is already open!");
    }
    System.out.println("Opening the door...");
    open = true;
}

public void close() throws DoorException {
    if (!open) {
        throw new DoorException("Door is already closed!");
    }
    System.out.println("Closing the door...");
    open = false;
}

public boolean isDoorOpen() {
    return open;
}

// Custom exception classes
static class LockException extends Exception {
    public LockException(String message) {
        super(message);
    }
}

static class DoorException extends Exception {
    public DoorException(String message) {
        super(message);
    }
}

public static void main(String[] args) {
    Door frontDoor = new Door();```
#
            frontDoor.unlock();
            frontDoor.open();
            System.out.println("Door is open: " + frontDoor.isDoorOpen());

            frontDoor.close();
            frontDoor.lock();
        } catch (LockException | DoorException e) {
            System.err.println("Error: " + e.getMessage());
        }
    }
}```
#

-sigma
-sigma
-sigma

blazing current
#

in Comp sci basically all documentation and writing files are written in markdown

knotty root
#

Other than that it's same with a few features

raw pumice
#

does anyone here use lua?

ancient thistle
#

kind of? i don't do anything super advanced with it

blazing current
raw pumice
#

oh k

#

thx

shy rune
#

I use scratch aye

tulip quest
#

very good software for learning once you have a few basics down

cunning tapir
blazing current
#

scratch is peak

blazing current
#

maybe i should run it 🔥

pseudo igloo
#

Do you know any good

#

Studios that primarily

#

Use lua

#

Or should I start learning a new coding language

pseudo igloo
#

Or anyone

blazing current
#

Roblox

#

🔥🔥🔥

#

Don’t worry about which languages you learn worry more about the actual concepts behind them

#

Because besides syntax like all languages are basically the same; loops, ifs, etc

pseudo igloo
#

I learned

#

Lua from Roblox

#

I’m trynna do lua on

#

a different software

#

Ngl

pseudo igloo
#

Does scratch use Lua aswell?

blazing current
#

What’s ur goal?

pseudo igloo
#

To get better at coding, and mainly create a basic game using Lua on another game engine that isn’t Roblox studios

blazing current
#

If ur looking to do game dev then I would learn c#

#

Supported by unity and Godot pretty solid

#

Also helps you on the path to learning c++ for unreal engine but don’t start with that

pseudo igloo
#

Is c# the easiest

#

Besides from

#

Lua

silent root
#

Might be hard at first since the syntax is completely different

tight salmon
#

I mean tbh most languages the only hard part is syntax once you adjust to syntax codding is a breeze I'm partial to C++ but like some others said starting with C# is a pretty good idea. And thankfully there are tones of resources out there to help adjust to different syntaxes

next mantle
#

C++ is a horrible language to start on if you want simple stuff

neon valve
#

what is worldbox running on

tight salmon
#

100% if you try to start with C++ Especially when making them jump from Lua just gonna hate everything

#

But god i still love that language so much no idea why

prisma grail
blazing current
#

Only still exists because of legacy

#

Cuz everything written in c++ 😞

pseudo igloo
#

To the output right

#

Gotta make sure I’m learning the right thing

silent root
#

i last used c# in unity

#

i remember using print

#

like in lua

#

but regular c# should be Console.Writeline

smoky atlas
#

Okay smart people so I got bored and decided to make rps on python to make this(probably an abomination)

How would I make the program restart through an user input?(ie: It'd ask 'Do you want to replay? Yes/No' and you'll have to type in Yes to restart the game.)

#

I've searched Google and i understand nothing so I came here

#

Btw would anyone have any tips on optimizing the number of lines

split parrotBOT
novel umbra
#

!rank

split parrotBOT
silent root
#

at the end if the user says no then break out of the loop

#
import random

choices = ["Rock", "Paper", "Scissors"]

while True:
    userchoice = input("Choose: Rock, Paper or Scissors\n")
    computerchoice = random.choice(choices)
    
    if userchoice == computerchoice:
        print("Tie")
    elif userchoice == "Rock" and computerchoice == "Paper":
        print("You lose")
    elif userchoice == "Paper" and computerchoice == "Scissors":
        print("You lose")
    elif userchoice == "Scissors" and computerchoice == "Rock":
        print("You lose")
    else:
        print("You win")
    if input("Play Again? (y/n)\n") == "n":
        break
#

theres probably a better way to shorten this but idk a lot about python

ancient thistle
#

there is a more optimal way to write the if checks but that wasn't the original question, so i won't impose lol

warped lark
# silent root ```py import random choices = ["Rock", "Paper", "Scissors"] while True: us...

while input("Choose: Rock, Paper or Scissors\n") != 'n':
    userchoice = input()
    computerchoice = random.choice(["Rock", "Paper", "Scissors"])
    result = "Tie" if userchoice == computerchoice else "You lose" if (userchoice == "Rock" and computerchoice == "Paper") or (userchoice == "Paper" and computerchoice == "Scissors") or (userchoice == "Scissors" and computerchoice == "Rock") else "You win"
    print(result)
    if input("Play Again? (y/n)\n") == "n": break```
#

the shortest it can be 😭

smoky atlas
#

Thank you man

#

🙏

smoky atlas
#

💀

ancient thistle
# smoky atlas Nah, please tell me
import random

beats = {
    "Rock": "Scissors",
    "Scissors": "Paper",
    "Paper": "Rock",
}

while True:
    userchoice = input("Choose: Rock, Paper or Scissors\n")
    computerchoice = random.choice(tuple(beats.keys()))
    
    if userchoice == computerchoice:
        print("Tie")
    elif beats.get(userchoice, "") == computerchoice:
        print("You win")
    else:
        print("You lose")

    if input("Play Again? (y/n)\n") == "n":
        break

without adding any other functionality...

if you make the choices (i called it beats, like "Rock" beats "Scissors") into a dictionary, you can write it as one if statement :)

#

this also has the loop the other person added

smoky atlas
#

That is very cool

#

I'll try if our when I'm free

#

Thank you man

ancient thistle
#

ofc, it does work the same from my testing!

pseudo igloo
#

Ty

smoky atlas
#

I apologise if I'm being confusing

ancient thistle
#

random.choice chooses a random item from that tuple

ancient thistle
#

you're welcome

pseudo igloo
ancient thistle
#

i know lua tho

#

to a degree

pseudo igloo
ancient thistle
#

sure

pseudo igloo
#

Is the beats = {}

#

A table?

#

I mean

#

Yeah a table

ancient thistle
#

dictionary

pseudo igloo
#

ah

#

oh

ancient thistle
#

a table in lua is basically anything you want it to be

#

it can be like a dictionary or a list lol

pseudo igloo
#

Yeah it looked kinda similar

#

To a table in lua

ancient thistle
#

similar syntax

pseudo igloo
#

Oh

#

Is python and lua sort of similar?

#

Then those are if statements to

#

Hm

ancient thistle
#

eh, they are both simpler/easier to read than other languages

#

i switch between many

pseudo igloo
pseudo igloo
ancient thistle
#

it's my favorite of the languages that start with C HiroLOL

dim hawk
#

What is this living room for?

pseudo igloo
#

Is it a good language to start off with

#

Besides Lua?

#

I heard it’s the more simpler ones

barren shale
#

C# is a really cool language but not worth it currently

#

if you want simple go with TS and use Bun (https://bun.sh) as a runtime and if you want more complex go with Zig

quartz pumice
#

zig isnt even finished

#

😭

barren shale
#

zig is production ready though

wet girder
#

C# is my personal favorite language

#

It does have some limitations tho and I definitely wouldn't use it for everything

next shell
orchid frigate
#

I have been waiting for zig for forever

#

love the idea

barren shale
tame socket
#

@wet girder sup!!!

#

How long did it take you to learn c#

#

???

wet girder
#

I'd honestly say I'm still learning. There's a lot of C# functionality I haven't used that much yet but to be able to use it well took like a few months of daily use and learning the basics took like maybe 2 weeks because I already knew how to code with OOP languages before

half drift
#

Greetings

#

My first time in this channel

lapis flint
blazing current
karmic cave
blazing current
#

🔥

smoky atlas
feral bramble
karmic cave
rain orbit
pale remnant
#

hi

sly saffron
#

yo

onyx ginkgo
#

Fellas I have a question

onyx ginkgo
#

Does anyone know how to get a model into VRchat?

half drift
#

I forgot how to do that

#

Is it a custom avatar?

onyx ginkgo
feral bramble
left citrus
#

erm howndo i make compiler from scratch am dumb

feral bramble
left citrus
#

it was like 5 am and i was trying to make my own system

#

i dont remember why

#

well what i shouldve asked was is there a thing like python but simpler ive been trying to find a better one because everytime i use python theres too much stuff goin on either that or im just dumb when it comes to coding

feral bramble
left citrus
#

oki

steep stirrup
#

Speciosa solar

half drift
knotty root
#

Coding is hard

muted hull
#

Coding is soft

distant wraith
#

Everything is not hard if you know how to do it (duh)

#

I just experienced how it feels for newcomers in any field really

#

Learnt the annoying way that I can't even draw Adventure Time arms

#

Now I feel bad for my gatekeeping in the old days 🫠

distant wraith
#

It is what it is

raw pumice
eternal turret
drowsy gate
drowsy gate
distant wraith
#

I can't draw the noodles arms

#

But I didn't get good enough at coding for it to be useful in my first months anyway

#

I have plenty of time to keep practicing

#

Well, at least not able make the two lines of the arm even (align?) the first in tries

#

The hardest part is the fingers. It's like a goddamn final boss for me

#

Man, saying these reminds me of the time I didn't know what IndexError was

sharp elbow
karmic cave
next mantle
tender hedge
karmic cave
wind current
#

What language is world box in btw?

dense peak
next mantle
#

@karmic cave how did your systems work? Otnlooks cool

barren shale
#

use noise to generate map then pick a random ore for chunks

#

that's probably the simplest way

karmic cave
tender hedge
#

how do I make my own coding language?

tulip quest
# tender hedge how do I make my own coding language?

Why do you want to? You're just curious? That's fine, I get curious about this stuff too sometimes. You can make your own programming language, but you will always need to base it off of another programming language to an extent, unless you build a processor that can use it directly (much harder, especially if you want to make the language complex). At that point it is almost always worth just using another language instead, but it's your choice if you want to go down that rabbithole and write a language, compiler, etc.

#

Hardware is the best rabbithole imo

next mantle
#

I’d love to go about designing my own 8 or 16 bit processor one day

orchid frigate
# tender hedge how do I make my own coding language?

Two options:

  1. Make an interpreter in another language, preferably faster and lower level like rust or c/c++ for speed which reads your "machine" code
  2. Learn how real machine code works and build a simple assembler for it.
#

The first one is fun

#

The second one is pain and meaningless

#

Also don't expect it to be anything good

#

Making even simple syntax like C takes A LOT of work and logic so it will almost definitely be assembly-like

next mantle
#

Hey assemblers are cool

#

Assembler Compiler Interpreter Transpiler, have fun with that rabbit hole whoever asked

quartz pumice
blazing current
tulip quest
solid cliff
#

cool to know .wbox can be decompressed

keen pagoda
boreal violet
#

Does anyone have a Super rpg mod?

knotty root
#

Hello programmers.

distant wraith
#

I just turned to genetic algorithm for roulette wbbre

#

Everything for that crab money

next mantle
#

Is vro botting in casino or just developing an optimal strategy

distant wraith
#

I make a bot in another server and called the command, then just copy and paste them 👽

#

I don't know why betting on literally all columns is allowed, but they are

distant wraith
#

It is

barren shale
distant wraith
#

You never really win against the house's edge either

barren shale
#

then what is the point of the ga

distant wraith
#

If it goes for long enough, you'd still lose everything

barren shale
#

there is no algorithm that wins a purely random game xzibit

distant wraith
barren shale
#

ratio of?

distant wraith
#

The distribution of the cc to each column bet

distant wraith
#

It's there since generation 100 probably

#

Nothing ever beats it or the rng

barren shale
#

i mean this sound like a simple math equation you can ask chatgpt to solve for you

#

but i guess GAs are fun

distant wraith
#

Claude did

#

And it's stupid

#

I'd rather just bet all on red or black

barren shale
#

i'd use a reasoning model

#

did you use a reasoning claude model?

distant wraith
#

I did use a thinking Claude 3.7

barren shale
#

then it should be right

#

they are realy good at these theortical math problems

#

because they are not new and there's a lot of papers about them

distant wraith
#

Sure is

knotty root
#

ask grok

distant wraith
#

It's still much less qualified for me

#

I'll wait for a while

barren shale
#

Grok 3 is ass compared to the average free model right now

#

Like ChatGPT 3.5 low is so much better

#

I like deep research when it doesn’t fail but the normal llm is just not there for them

fossil wharf
#

Guh

distant wraith
#

Hope no one spank me for this

#

I could try calling LLM APIs and let it guide me

feral bramble
distant wraith
#

Don't they have permissions to forbid external apps?

#

L if not

feral bramble
distant wraith
#

Infinite money glitch

feral bramble
#

just prevents messages from showing up in sevrer

#

only u can see it

#

What's stupid is that external apps include the discord activities they've been promoting

#

so if ya still want to play those but want to stop people from using image posting external apps

#

You can't

karmic cave
feral bramble
#

yummy ores

barren shale
#

that chromatic aberration tho

#

gives me a headache smh

shy rune
#

What would happen if, say, I compressed all the files that comprised a game I was working on, would it run better on all devices without sacrificing anything or would it be shit

tender hedge
#

Am I allowed to share videos of my about code here?

barren shale
#

too slow to load up

#

because you have to uncompress before running

#

only compress game installers

earnest venture
#

Is this the right cave

smoky atlas
earnest venture
smoky atlas
#

Here you go, tortured soul

low cedar
#

Hello, has anyone made a top-down game with a climbable ladder in Unity? I need help making my character move up when touching the ladder using a Collider instead of a Trigger

barren shale
#

just do two colliders one at the bottom one at the top and add a state to the player that should be true when they are climbing and false when they are not

#

use the state to change animations to climbing animations

#

when you touch bottom collider and presses interact button move the player (or do a smooth animation) to the bottom side of the ladder and set climbing state to true then when they reach the top teleport them off the ladder and set the climbing state to false

#

if this is not procedurally generated you can set the teleport coordinates on your own but if it is you need to play with it a bit to get decent relative values

#

idk if this how games do it but this is how id do it and you can always ask chatgpt how it is done normally

low cedar
#

Tysm

pearl pier
#

Hi <@&1348293632301469760>

next mantle
#

That’s the actual devs role

#

I.e the big guys maxim & Mastef

shy rune
exotic island
#

help 😭

#

NOTHIN FUCKIN WORKS

next mantle
#

Typescript moment

exotic island
#

i was told TS was good, TURNS OUT ITS SHIT

#

IT WASNT FUCKING COMITTING

#

IT WASNT PUSHING THE COMMITS FFS 😭

#

i migrated it to javascript

next mantle
distant wraith
#

Typescript isn't even that bad

#

It's just JavaScript

#

With typing

knotty root
#

i need tech support how the fuck do i run a .jar file

#

nvm got it

dusty kernel
deep shuttle
barren shale
#

looks like a skill issue

#

you have lint rules to prefer const and you are not using const

#

smh my head

#

download vscode eslint extension to see redlines where you dont write correct code

#

if you use vscode

#

there isn't actually any errors in the code just some lets that need to be turned into consts and an unused variable you can remove

#

of course you can always disable the linter and run your bad code

cyan rapids
#

dwarf fortress ahh

signal arrow
cyan rapids
#

im not?

#

i meant that its a look-a-like

tulip quest
#

Dwarf Fortress is based as, graphics don't matter

exotic island
barren shale
#

Nope

static solar
distant wraith
#

I'm shocked it turned out better than absolute shit

tacit hawk
exotic island
blazing current
#

Let me settle the debate

#

Both JavaScript and typescript are terrible languages

#

The end

barren shale
#

Typescript is good if you know how to use it

#

That’s why I call skill issue

drowsy gate
bleak widget
#

.

distant wraith
#

Crybabies

blazing current
#

it fixes some of the problems of js but its still based on js which was a mistake to begin with

#

we have spent billions of dollars and decades trying to make javascript work and its just barely good enough now

distant wraith
quartz pumice
#

just make a backend in python or something and get the exact same performance with all the simplicity and expandability

outer pawn
#

Anybody know anything about worldbox mods?

#

I was tryna figure out how to make worldbox mods and wanted to try using CollectionMod as an example, I can use their images, however whenever I try to use my own, it says it cant grab it

buttonSprite = Mod.EmbededResources.LoadSprite($"{Mod.Info.Name}.Resources.Icons.family_icon.png");
barren shale
#

bro took the bad part of javascript and took it only

#

there's no better DX than just using typescript full stack

#

it is impossible to get a better DX unless they make browsers run a different language

#

also javascript is a very great UI library since it was made to run on a single thread very well it is just not good for computationally heavy tasks

blazing current
#

its essentially the idea of legacy systems being so well established that we cant change it even if the foundation is trash

#

but you are right javascript is specially tailored for the web by this point so of course it beats every other language in that use case

#

HTMX and other tools are trying to change that but they are just a drop in the ocean lol

barren shale
#

Most current languages have some sort of a trash foundation

blazing current
#

and id say js has a noticeably trashier foundation than most, idk i just hate the idea of the compiler trying to make stuff work with a guessing game rather than just telling the programmer to fix they code

#

nondeterminism SUCKS

dreamy violet
#

languages that care too much about legacy code become trash

#

controversial? Maybe

lapis flint
#

🥴

barren shale
lapis flint
dreamy violet
#

ye pretty much

blazing current
#

Typescript was written in typescript but that didn’t work out

#

Porting to golang as all good things do

barren shale
#

Javascript runs on a single thread which is why typescript serever sucked all these years

#

Golang has easy concurrency and it is more efficient

#

Can't wait tbh because I'm suffering so much in large projects

#

Typescript server needs a restart every 10 minutes

wet girder
barren shale
#

Yup

#

Typescript is so good that you can do very cool things with types

#

The only problem is the deeper you go with types the more crashes you get on the language server

#

Hopefully the golang port will fix this

wet girder
#

That's honestly kinda insane that it's single threaded but Ig it kinda makes sense for web fronts so websites can't cause too much destruction

blazing current
#

and also having a compiler be a JIT interpreted language instead of raw compiled makes no sense as there are no runtime benefits to doing so

mellow monolith
#

"controversial" take but [virgin all other languages] <<< [chad typed lambda calculus]

#

i love lambda calculus actually

#

it's big "those programmers over there would be very upset if they could read" vibes and i love it. for something that makes so much sense when you figure it out it seems like the eldritch fucking tongue when you're ignorant of it

#

massive l can't share the tromp diagrams. somehow the man who solved connect-4 made lambda calculus even more ESOTERICALLY ALL POOOOWEEERFUUUUUL

mellow monolith
# wet girder Actually? That's so bad like wtf

also in the original context of javascript's usecase that actually isn't as idiotic as it seems

i think it is more just people using javascript wrong than javascript being wrong.

js running in a single thread doesn't mean you're locked out of concurrency. in fact, you can still do pretty much anything you would want in js that you can in any other similar system. it's just different. besides, web workers being a thing makes the entire argument over js being singlethreaded a moot point anyway, at least imo.

i don't stan js but i also will not slander it incorrectly. i will slander it for valid reasons. like node.js, and how it exists at all.

barren shale
#

web workers suck ass

#

you can't share memory properly

static solar
#

Maybe still relevant

mellow monolith
# barren shale you can't share memory properly

i think you can expose everything you would expect to be able to expose given the scope. web workers are intended to be discrete threads themselves, i don't think it is good practice to really be "sharing" memory between them like that. you would refactor the code so that stuff like that isn't necessary. pertinent data can either be exposed publicly or registered somewhere publicly accessible and ideally your js is set up in such a way that that is already true somehow. javascript is funky i agree but it isn't as stupidly designed as most people think. most people just aren't used to designing applications with the philosophy js uses imo

#

it's a lot more atomic than other languages. a lot of javascript is slow bc it is bad javascript, not bc javascipt is bad. (well, javascript is bad but not for these reasons)

blazing current
#

Until you want to make something more complicated than a calculator app 😢

#

But I am a lover of math so I’m with you

dreamy violet
#

I don’t get why people hate ts

#

most don’t but the few that do seem to have very strong hatred?

distant wraith
#

The Typescripters are the most oppressed minority maximpensive

smoky sable
#

My favorite language is brain fuck

barren shale
#

there's nothing wrong with sharing memory between threads if done safely

#

it actually makes multi threading work so much easier

#

javascript is built for UI

#

I think light servers do very well with javascript since UI and light computation align in a lot of ways

real surge
#

@wet girder hi

blazing current
#

JS is great for what it was made for

barren shale
#

what in the microsoft store ahhh layout is this updatte

blazing current
cyan rapids
#

simple classicube bot script on python

mental jungle
#

anyone here having trouble with duck.ai api recently?

cyan rapids
#

v2 of my classicube bot. Integrates with ollama (locally ran LLMs) and makes it possible to interact with players in-game. Sends CPE packets if its enabled on connection but didnt implement CPE messages

#

so cpe is kinda useless

distant wraith
mental jungle
distant wraith
#

I think they just added a cloudflare challenge to prevent botting

#

Rough, I guess

barren shale
#

That doesn’t make sense xzibit

distant wraith
#

It's not an official API

barren shale
#

Oh makes sense

distant wraith
#

They just request the duck.ai's server for their own stuff

barren shale
#

@wet girder they found a bug that casued a function to be 3^N complexity instead of N in the typescript codebase

#

it is probably the one causing all these crashes

wet girder
#

Huh interesting

barren shale
#

it effects validation packages which are nutorious for causing bad perforamnce

#

i guess now we know why

#

the function wasnt caching properly which fucked it up

wet girder
#

Lmao, can you send link to some article or something so I can read more details?

barren shale
#

one sec i can send you a tweet

wet girder
#

Thanks

barren shale
#

the bug was discovered by the creators of a validation package

#

i hope this gets fixed

#

typescript intellisense is unusable on big projects

#

from 733 checks to 24349567

#

it is really bad x)

wet girder
#

Damn that's actually insane

lyric grove
feral bramble
#

neat

prisma grail
blazing current
barren shale
#

sadly rust didnt go the best route

#

doing mutliple things at the same time (concurrency, multi threading, parallelism) is very hard in rust

#

very solid base for single threaded stuff

#

or if you gonna use multi threaded libraries built by rust nerds

#

but building multi threaded stuff from scratch is a death wish

#

not my own experience but i've heard it from a lot of low level programmers

rare shore
#

It was a mistake to check this channel.. its all robot language to me. 😭

errant trail
# rare shore It was a mistake to check this channel.. its all robot language to me. 😭
// Initializing payload for @trains_are_cool125428 
[System]>> [ID: 1191856338381324348] >> Target recognized.
>>> Connect("target_server", port 8080) 
>>> Inject: Base64Encoder + XorObfuscate 
>>> Auth Token >> 17F9A4A5B61A3E
>>> Run: Decrypt('module_01', mode=DynamicKey(12))

>>> Scanning for endpoint [@trains_are_cool125428]
[Command: /Execute_Inject(@trains_are_cool125428, ID 1191856338381324348)]
>>> Generating payload: SHA256 checksum = 4598c47fa5de3d80b6adf92c48c0f3a7f82c8c55
>>> Establishing backdoor (Signal X|Trigger)
>>> Compiling vector code 0x12A4 (Async trigger)
>>> Bypass: AntiFuzzer attempt | Firewall 28% threshold reached.
>>> Downloading logs (encrypted_91f4)

- Log: **Error in Protocol 3** | File Corrupted | Exiting Phase 1.

>>> Shutdown active [@trains_are_cool125428] << [System Response: Denied] 
>>> Deactivating stealth mode, 98% complete...
>>> Process locked, end of transmission.
rare shore
#

[Thats all i could do don’t judge]

tulip quest
severe dove
#

Weiner

tacit yew
#

IT FLIES

kindred matrix
knotty root
#

It flies!

molten rock
#

VILTRUMITES

brave sorrel
#

archive it

keen juniper
prime merlin
#

F

tacit yew
#

TIME FLIES

knotty root
#

Greg?

prime merlin
#

No cooldown

golden beacon
#

TIME FLIES

half relic
#

It doesn't, been waiting for ts for years wbsuffer

knotty root
#

TIME FLIES

worn tartan
#

Time flies elves die

molten rock
#

they all sang along?

prime merlin
#

Time flies it sours it smells

tacit yew
knotty root
#

WorldBoxia is falling apart !

errant trail
#

i love not maintaining large codebases ❤️

#

wtf is this

#

it flies

prime merlin
errant trail
#

get out

#

TALK ABOUT CODING GODDAMIT

half relic
errant trail
#
console.log("hello world (box)");
knotty root
#

The time for coding flies?

#

Coding the update?

worn tartan
prime merlin
worn tartan
#

Summary(fit)

brave garden
#

I like java script

tacit yew
#

Time got away from Maxim so the coding isn't done.

errant trail
#

yknow what

#

im posting a wall of code

#
function optimizeUnits(cost, starting, budget) {
    let remainingBudget = [...budget]; // [manpower, gold]
    let result = {}; // Final unit counts

    // Sort units by cost-efficiency (manpower + gold) to optimize budget use
    let units = Object.keys(cost).sort((a, b) => {
        let costA = cost[a][0] + cost[a][1];
        let costB = cost[b][0] + cost[b][1];
        return costA - costB; // Sort units by total cost, cheapest first
    });

    // Try to use up the entire budget
    for (let unit of units) {
        // Skip banned units (marked as -1)
        if (starting[unit] === -1) continue;

        let [manpowerCost, goldCost] = cost[unit];

        // Calculate the maximum possible units we can afford with the remaining budget
        let maxPossible = Math.min(
            Math.floor(remainingBudget[0] / manpowerCost),
            Math.floor(remainingBudget[1] / goldCost)
        );

        if (maxPossible > 0) {
            // Buy as many as we can afford, and deduct from the budget
            result[unit] = maxPossible;
            remainingBudget[0] -= maxPossible * manpowerCost;
            remainingBudget[1] -= maxPossible * goldCost;
        }
    }

    // Return the result with the combination that uses up the budget as much as possible
    return result;
}

// Example Usage
let cost = {
    infantry: [10, 5],
    cavalry: [30, 15],
    archer: [15, 10]
};

let starting = {
    infantry: 50,  // Not used, just an example, doesn't matter here
    cavalry: -1,   // Banned
    archer: 30     // Not used either, just an example
};

let budget = [1000, 500]; // [manpower, gold]

console.log(optimizeUnits(cost, starting, budget));
#

NOW GET OUT

deft frigate
next prairie
#

can someoen make a code to tell me when the update comes out?

tacit yew
#

print("No")

deft frigate
sullen steeple
#

it flies

leaden perch
#

it flies

distant tiger
#

it flies

rugged shell
#

it flies

muted hull
#

it flies

thick hull
#

It flies

sly hazel
#

it flies

light swallow
#

it lies

heavy basin
#

It flies

past lotus
#

it flies

spiral glacier
#

here

#

here we shall be

lean marsh
#

TO IT FLIES