#development

1 messages · Page 56 of 1

wheat mesa
#

You can’t do new AttachmentBuilder() wherever you’re trying to do it

thorn spruce
#

Hey guys, i recently update my Visual studio code to the last version and now i'm getting this error
Type instantiation is excessively deep and possibly infinite.

I change nothing about my npm

export class Players extends Model<InferAttributes<Players>, InferCreationAttributes<Players>> {}
                                    ________________________
earnest phoenix
#

It could also be that you're using recursive types incorrectly

thorn spruce
thorn spruce
earnest phoenix
#

That's probably the reason, you shouldn't use nightly extensions

thorn spruce
#

what do you mean

earnest phoenix
#

The TypeScript-Next extension you just linked for VSCode is nightly, meaning that any new changes pushed to TypeScript will be available as a new release in VSCode, it probably contains this bug that causes that warning/error to be incorrectly shown

thorn spruce
#

ahhh

#

Yep obviously but which extension i should use to see typing error?

#

type typo idk how write that

earnest phoenix
#

You don't need any extensions, VSCode deeply supports both JavaScript and TypeScript by default because it's literally written in it

thorn spruce
#

Alright, Thanks you for your time bro ! Also maybe you have some guide or tutorial to learn typescript in a deeper way? Because i'know the basis of typescript but not really more

earnest phoenix
#

It goes from the basics to the deeper concepts of it

lament rock
#

vscode being written in js wrapped in electron

uneven tartan
#

OKAY i want to format a list of new line strings into a full array

#

actually they arent strings they are just words

#

aha i found smth for that now i just need to figure out how to use really long arrays with autocomplete

lyric mountain
uneven tartan
#

figured that one out lmao

#

i wanna store an array in a different file for cleanliness but im not sure how to pull that off

lyric mountain
#

wdym?

uneven tartan
#

i mean i have a massive array that i need to use for autocomplete

#

and i dont want to have it with my events cause of that reason

#

its a single line array

lyric mountain
#

u could use a dictionary file

#

I have something like that for my shiritori game

#

tho mine is encoded in a way I can simply jump to relevant words instead of checking each line

uneven tartan
#

ok heres what i did

lyric mountain
#

all u need is to have a file with one word per line, then simply stream the file

uneven tartan
#

i have a cars.js file

#

with a defined array

#

carsArray=[
"smth",
"smth2",
]

#

etc etc

lyric mountain
#

arrays (or any collection datatype) are pretty bad if u have many entries

#

since ur keeping it all in memory

uneven tartan
#

i have about 125 entries

#

how would you define "many entries"

wheat mesa
#

125 is nothing

uneven tartan
#

okay so how would i use this? ive never had a designated file for an array

quartz kindle
#

why not json?

uneven tartan
#

cuz autocomomplete

#

fuck

quartz kindle
#

why does that prevent using json?

uneven tartan
#

i dont know

#

didnt know i could

quartz kindle
#

json is literally made for that, containing fixed data that is loaded on startup

uneven tartan
#

okay so how would you do this

#

ive never used autocomplete or used large arrays

quartz kindle
#

const something = require("../jsonfile.json")

uneven tartan
#

and how would the json be formatted

quartz kindle
#

like an array literal

#
[
  "a",
  "b"
]
uneven tartan
#

ah fuck i have to store a large amount of info for each of these entries

#

actually

#

i can do that somehow

#

i have no idea how

quartz kindle
#

i mean

#

are you talking about fixed data or auto-generated data?

uneven tartan
#

fixed data

#

that can be added to by zero experience users

#

via pull requests

quartz kindle
#

then yeah, a json file is the way to go

uneven tartan
#

basically its for a bot for a game that has cars that has a bunch of different builds

#

a minimum of 4 builds

earnest phoenix
#

Do yall do packs for grand mafia?

rustic nova
#

do what?

feral aspen
#

What's the formal answer/reply that I can reply to: What is a programming language?.

rustic nova
#

a way to allow a human to tell a computer what to do, but in a way that can still be understood by humans too

wheat mesa
#

A tool for solving computational problems, complex or simple

lyric mountain
#

a bread recipe

#

but sometimes the bread might take some time to come

rustic nova
#

what is programming, wrong answers only

lyric mountain
#

fixing printers

rustic nova
#

a way to suffer in pain and agony

wheat mesa
#

turning it on and off again

radiant kraken
wheat mesa
#

god I fucking hate lvalue rvalue stuff

#

Getting In template: non-const lvalue reference to type 'Vec2<...>' cannot bind to a temporary of type 'Vec2<...>' with cpp auto radius = (firstTrans.position - secondTrans.position).length(); // position is a Vec2<double> in both and ```cpp
template <class T>
class Vec2 {
public:
T x, y;

Vec2() : x(0), y(0) {}
Vec2(T x, T y) : x(x), y(y) {}
Vec2(const Vec2& v) : x(v.x), y(v.y) {}

Vec2& operator-(const Vec2& v) {
    return Vec2(x - v.x, y - v.y);
}

// Etc, other operators giving similar issues when I attempt to use them

}

#

I appreciate any advice anyone can give me here, I just want to be able to do vector math easily

wheat mesa
#

nvm got it

#

I'm a moron and I was returning a ref

deft rock
#

That would do it

radiant kraken
stiff dust
#

Hi I want to create a leveling system private bot, but I have a problem here...

#

well I am using mongoDB as my data base and for level system I have to update each member data set with each message

#

so this way the bot will become to slow because it have to update data base all the time what should I do?

rustic nova
#

caching

#

keep a memory based collection of your data, occasionally push onto your database

#

I generally recommend against having your bot directly access your database and instead have it push onto your database occasionally, like every hour or so

#

this should also allow quicker handling of when you're rewarding users for their levels

flat copper
#

how can i run my html app in background android

stiff dust
quartz kindle
#

id use a local persistent cache such as lmdb, or even sqlite

#

but otherwise its possible to listen to kill signals and schedule a function to be run before node exits completely

#

kill signals work differently on different operating systems tho, so youd have to test every possibility to make sure

#

i highly recomment lmdb tho, its mostly in-memory but has disk persistance and supports multiprocessing

lyric mountain
#

a million operations per second might seem too much, but for databases it's child's play

true yew
#

It's no secret that Discord's your place to talk; 4 billion messages sent a day have us convinced. But text only accounts for a chunk of the features that Discord supports — learn how Discord optimizes its platform to respond to the high frequency of queries for all types of content and data as quickly as possible.

stiff dust
quartz kindle
#

if your mongodb local or remote?

stiff dust
quartz kindle
#

running on the same computer/vps

#

or connected to another server/vps/service

stiff dust
#

I host my bot on my Windows VPS and connect to the data base with mongoose

quartz kindle
#

and where is the database?

#

did you install the database on you windows vps and connect via localhost?

stiff dust
#

nope

quartz kindle
#

mongodb atlas?

stiff dust
#

yes

quartz kindle
#

then its a remote database

stiff dust
#

so

stiff dust
#

😄

quartz kindle
#

so i wouldnt update it on every single message

#

besides the database performance, you also have to deal with network congestion and whatever rate limits atlas gives you

#

if you're using their free plan its probably heavily limited

stiff dust
#

well u suggest to change the data base or do something else instead of update for each message

stiff dust
#

BTW its for private bot for 1 server

deft rock
#

sus

quartz kindle
#

well, if its not a giant server with 50 messages per second then you should be fine

stiff dust
lyric mountain
#

you shouldn't be reading messages from bots

stiff dust
#

I know I just told how many messages sent in the server but I will ignore them in events

#

what is this err for?

quartz kindle
stiff dust
#

ig canvas use it

quartz kindle
#

and its warning you that uuid version 3.4 is not recommended

stiff dust
#

Tim I have a problem I use pm2 to run my bots I remove one of them from pm2 but it still run in the background what should I do? how can I turn it off?

quartz kindle
#

on windows you can kill it in the task manager

#

or use the taskkill command

stiff dust
quartz kindle
stiff dust
#

oh okay

eternal osprey
#

hey

#

would there be any way to display my array like this in c++

neon leaf
#

ok so I have this Code:

        const rankCard = new canvas.Rank()
            .setAvatar(userobj.displayAvatarURL({
                format: 'png'
            }))
            .setCurrentXP(parseInt(arraylevel[1])*10)
            .setRequiredXP(1000)
            .setProgressBar('#90CDF4', 'COLOR')
            .setUsername(userobj.username)
            .setDiscriminator(userobj.discriminator)
            // .setBackground('COLOR', '#1D192B')
            .setProgressBarTrack('#413E4D')
            .setLevel(parseInt(arraylevel[0]), 'LEVEL ', true)
            .setRank(parseInt(counts[0]/5), totalxp, true)```
It creates a rank card. But when I send it there is a background, can I make it 100% transparent?
wheat mesa
eternal osprey
#

yeah i know i've done that

#

i have a stubborn issue here

#

Do you know game of life?

#

Invented by John von neuman

earnest phoenix
neon leaf
#

yes

quartz kindle
#

try using setBackground with alpha

#

for example a hex code with 8 digits instead of 6 digits is an RGBA hexcode and has an alpha channel, where the last 2 digits represent transparency from 0 to 255

#

for example #aabbcc00 would be fully transparent, event tho it has red green blue values because the last one, the transparency value, is 0

lyric mountain
#

last 2?

#

ain't it usually ARGB?

earnest phoenix
#

It's RGBA most of the time

neon leaf
#

thanks

eternal osprey
#
bool read_universe_file(string filename, Cell universe[NO_OF_ROWS][NO_OF_COLUMNS])
{

    char z;
    ifstream input;
    input.open(filename);
    if (input.fail())
    {
        cout << "Error cannot open " << filename << endl;
        return false;
    }

    for (int k = 0; k < NO_OF_ROWS; k++)
    {

        for (int n = 0; n < NO_OF_COLUMNS; n++)
        {
            z = input.get();
          
               if(z == LIVE){
                   universe[k][n] = Live;
               }
               if(z == DEAD){
                   universe[k][n] = Dead;
               }
              
               cout << universe[k][n];
           
        }
         
    }

    input.close();

    return true;
}```why the fuck is my array showing this:
#

Is it maybe due to the spaces in the file?

lyric mountain
#

those are newlines not spaces

eternal osprey
#

\n right?

lyric mountain
#

depends

#

on windows it's \r\n (if it was created and saved using notepad)

eternal osprey
#

however js if(z == LIVE){ universe[k][n] = Live; } if(z == DEAD){ universe[k][n] = Dead; } would only write if the character is of enum type Dead or Live

#

so that means that it wouldn't even write those to the multi dimensional array am i right?

lyric mountain
#

what is LIVE and what is DEAD?

#

also this is outside of those conditions

eternal osprey
#

LIVE is '*' dead is '. '

#

yes i am just logging the array each type to reveal the written data

lyric mountain
#

what is Live and Dead?

eternal osprey
#

Enum values. Dead is 0 and live 1

lyric mountain
#

I don't see any error then

eternal osprey
#

damn that's really strange wtf

lyric mountain
#

no it's not

#

ur printing the content regardless of replacing or not

eternal osprey
#

huh

lyric mountain
#

when u access an uninitialized array index you gotta expect junk

eternal osprey
#

but i am already renewing the array using k and n that are being increased right?

lyric mountain
#

no you're not

eternal osprey
#

huh

lyric mountain
#

in red ur defining the indexes, but you're printing regardless in blue

eternal osprey
#

and updating the file.

lyric mountain
#

what happens if u print an index that u didn't define? u see junk

eternal osprey
lyric mountain
#

no it's not

eternal osprey
#

the google test of my school says different

lyric mountain
#

u created a matrix with the same size of the input matrix

#

but u forgot newline IS a character

eternal osprey
#

i see

#

so \r\n right?

#

I will remove that one.

lyric mountain
#

so ur not defining anything when u see a newline

eternal osprey
#

i seee

lyric mountain
#

which leaves junk in those indexes

eternal osprey
#

i will try that out

lyric mountain
#

and you CANT simply ignore \r\n

#

because you'd be disregarding other cases like mac and linux

#

and files not created using notepad

#

that's a hack job, not a solution

#

iterate over the first row, count how many columns aren't newline chars

#

use that count to create a matrix

hidden gorge
#

How can I make a message send to a channel if it contains a message in py?

lyric mountain
#

If u simply skip newlines you'll still get junk because of wrong matrix size

lyric mountain
#

If the message is there, send whatever u want to

eternal osprey
#

can't i do this;

#
if(z = '\r\n'){
            n--;
           }```
lyric mountain
#

No because newlines are different depending on what was used to save the file

#

And u still need to retrieve the correct matrix size

#

Also that code is invalid because '' is for char, not string

eternal osprey
#

sorry i am new to c++, just 7 weeks in with my study

earnest phoenix
#

You're also not comparing but reassigning the variable in that if statement

eternal osprey
earnest phoenix
#

To get what newlines you should use you can use a directive

#ifdef _WIN32
#define NEWLINE "\r\n"
#else
#define NEWLINE '\n'
#endif
eternal osprey
#

owh damn i am not this far with c++ so i have honestly no clue what t do with that

lyric mountain
eternal osprey
lyric mountain
#

Yes

eternal osprey
#

so array [][]/

#

ah

lyric mountain
#

It's called a matrix

cinder patio
eternal osprey
#

i see

cinder patio
#

or does it not

lyric mountain
#

Directives run during runtime

earnest phoenix
eternal osprey
#

They were already defined btw, the matrix size

lyric mountain
#

That's the issue

#

Ur including newline char

#

So all last indexes will have junk

eternal osprey
#

defined with NO_OF_ROWS and NO_OF_COLUMNS

earnest phoenix
cinder patio
#

sharing the executable won't work then tho

lyric mountain
#

Directives are runtime no? My job uses them for linux/windows compat

#

That said, we use delphi not c++

earnest phoenix
#

Directives are run before the code is even compiled, they have their own processor, which basically just replaces the values

eternal osprey
lyric mountain
#

Whitelist instead

eternal osprey
#

maybe i should just use a while loop to make it easier?

lyric mountain
#

Since u only use 2 predefined chars

earnest phoenix
lyric mountain
#

A while won't fix bad logic

#

It's the same as for but less appropriate for the job

eternal osprey
#

owh i see

#
if(z == '\r\n'){
            n--;
           }
               if(z != '\r\n'&& z == LIVE){
                   universe[k][n] = Live;
               }
                if(z != '\r\n' && z== DEAD){
                   universe[k][n] = Dead;
               }
              
               cout << universe[k][n];
            
            ``` this indeed doesn't work.
boreal iron
#

Tf

wheat mesa
#

Is \r\n even valid as a single character

pale vessel
#

no way

#

unless they split by \r\n

boreal iron
#

Why do check if z != … and z == … in the same statement?
If z is LIVE or DEAD it’s not your line break chars automatically

eternal osprey
#

i honestly have no clue

#

i just know that i've been at this for 6 hours

lyric mountain
#

char stands for character, as in, a single character

#

\r\n is two chars (CRLF - carriage return & line feed)

#

and as fake said, if it's equal to LIVE it'll automatically not be equal to anything else

#

your logic itself is flawed since if u do n-- you'll get an infinite loop

wheat mesa
#

I’m surprised that it would let you write more than one character in a char literal without screaming at you

lyric mountain
#

I'm also not sure == "string" is a valid operation, if cpp uses a string pool that is

eternal osprey
#

i got it working actually!

#

I've done this

lyric mountain
#

tho == 'c' is valid (char is a number)

eternal osprey
#
 if(z == '\n'){
            n--;
           }
           

          
               if(z != '\n'&& z == LIVE){
                   universe[k][n] = Live;
               }
                if(z != '\n' && z== DEAD){
                   universe[k][n] = Dead;
               }
           ```
lyric mountain
#

you'll get an infinite loop & wrong results if it has a carriage return

#

infinite loop for anything else

wheat mesa
#

It’s an overloaded operator, since strings are part of the stdlib and not built into the language

lyric mountain
#

ah ic

earnest phoenix
#

Although technically multi-character characters are valid as long as they don't exceed the char limit, but can cause unexpected behaviors

wheat mesa
#

Is a char not one byte? I thought one byte was guaranteed, then it may or may not be larger due to padding

earnest phoenix
wheat mesa
#

Ah

radiant kraken
#

how

wheat mesa
#

I was assuming it would treat it as concatenating them, not adding them together

radiant kraken
#

i'm sure that corrupts the character

wheat mesa
#

Well yeah

radiant kraken
#

\r\n is a string, NOT a char

#

it's literally two characters

earnest phoenix
radiant kraken
#

no matter what you put it

#

look at the output

lyric mountain
#

that's called surrogate pairs, and a pain to mysql users

wheat mesa
lyric mountain
#

🇧🇷 for example is a single char, but composed by 2 surrogate pairs (\🇧🇷)

radiant kraken
#

yes but

wheat mesa
#

Just imagining the pain that certain js users would go through

radiant kraken
#

that would still be a string, no?

lyric mountain
#

nope

#

it's a single char, but 2 chars

#

confusing yes, but you eventually have to deal with that

radiant kraken
#

you were probably referring to glyphs or something like that

lyric mountain
#

if u treat it as 2 chars u get those 2 inside parens

#

another example is á

#

2 chars, but 1 char

radiant kraken
#

that doesnt make any sense

lyric mountain
#

indeed it doesn't

#

but if u, again, treat it as 2 chars u get ´a

#

instead of á

earnest phoenix
# wheat mesa Why the fuck is this even a supported thing to do

Multi-character characters are not entirely defined by the C/C++ standards and some implementors took the advantage to implement them which are held as pure numbers instead of the complexity of strings, surrogate pairs are also a part of why this was implemented

lyric mountain
#

that thing alone is enough to wreck most mysql bot databases

slender wagon
#

can i input a string and take the response back with puppeteer

earnest phoenix
#

This behavior was taken from the B programming language btw

lyric mountain
#

just put a single emoji in ur name (if they store usernames)

slender wagon
lyric mountain
#

unless they use specifically VARCHAR(191) utf8mb4, it'll crash all queries where ur name is included

lyric mountain
#

chars are numbers

radiant kraken
#

strings are numbers

#

lmao

lyric mountain
#

strings are arrays of numbers

radiant kraken
#

everything consists of bytes

ancient nova
#

hello guys

radiant kraken
#

bytes are just numbers

earnest phoenix
#

Strings have their own complexity over characters that are just stored as numbers

ancient nova
#

anyone know how to enable dark mode on snapchat?

radiant kraken
#

like what

ancient nova
#

the white mode is giving me a headache

lyric mountain
#
char a = 'a';
printf((char) (a + 1))
#

will result in b

ancient nova
#

🙄

radiant kraken
#

they are literally just a wrapper over characters stored as numbers, so they could be growable

lyric mountain
#

strings aren't growable

#

they're usually immutable, unless u want to walk through hell

radiant kraken
#

are we talking about char *s or std::strings here

lyric mountain
#

the latter, the former is "u want to walk through hell"

radiant kraken
ancient nova
#

guys

#

🤨

lyric mountain
radiant kraken
#

you were probably thinking of putchar()

lyric mountain
#

putchar?

radiant kraken
#

yes

lyric mountain
#

ye that works, and doesn't need a (char) cast

earnest phoenix
# radiant kraken like what

Strings cannot be optimized by the compilers, they're set in stone as ASCII values in the register, and used when needed which it has to be fetched from a very far region of the register regions, which can make things slower while characters are just numbers that can be modified in the ways it desires for an optimized execution, and they aren't placed far from the other registers since they're just numbers

Internally strings also hold a considerable amount of differing implementations compared to chars, ranging from growing their size to the concerning case of overheads due to the way they're packed together

#

Strings aren't just a "wrapper" around chars

#

Internally they're pretty different

radiant kraken
#

which "string" are we talking about here

#

C or C++ strings

earnest phoenix
#

We were mainly talking about C++

radiant kraken
#

so std::strings?

earnest phoenix
#

Yes

#

But this difference also exists in C in a considerable state

radiant kraken
earnest phoenix
#

Are you confused about the first part or the second part?

radiant kraken
#

both

#

secondly, how does compilers optimize characters

ancient nova
#

so does anyone know

radiant kraken
#

they are just constant numbers

ancient nova
#

🤨

radiant kraken
#

Internally strings also hold a considerable amount of differing implementations compared to chars, ranging from growing their size
well obviously, you can't grow characters

#

characters are just a single number

lyric mountain
#

by "their" he meant the string itself

wheat mesa
#

The few rare times we are on topic

earnest phoenix
# radiant kraken both

To dumb it down for people who are not familiar with codegen and optimization passes

  1. Strings are packed together in a way that hold a reference to each character, and are placed extremely far away from everything in the Assembly output for example, due to their overhead and differing implementations
  2. Since characters aren't packed at all and are just their ASCII values, the compiler knows how to optimize it given the context, and are placed right into the registers normally instead of putting them far away from all the regions in the registers
  3. Strings and characters do hold some similarities in case of their implementation, but most other parts are different due to how they're handled, indexing, comparisons, passes, references, and others
ancient nova
#

i can change the bkg_value with gameguardian to enable dark mode but it looks bad

#

i might just edit the whole app with android studio and just change colors ig

wheat mesa
#

Or just stop breaking their ToS and use the app like a normal person

radiant kraken
#

oh i get it now

lyric mountain
#

bae editing stuff again smh

ancient nova
#

my eyes need peace from white mode

radiant kraken
#

but '\r\n' is not the right choice for the issue

lyric mountain
#

ye it isn't

earnest phoenix
#

Yeah

lyric mountain
#

it'll most likely result in something that's neither \n nor \r

radiant kraken
#

since comparing them with strings will always fail

lyric mountain
#

nor a linebreak char at all

#

they're comparing with a char btw

#

z is a char in the file

radiant kraken
#

wait

#

chars are 1 bytes right

earnest phoenix
#

I'm pretty sure the guy that was asking the question have gone far away from this channel

lyric mountain
#

chitty will return, he always does

earnest phoenix
radiant kraken
#

if so then how do they pack more than 1 byte worth of data e.g '\r\n' to a single character without losing information

earnest phoenix
lyric mountain
radiant kraken
earnest phoenix
#

Yes, always

#

No, not always

#

I meant in C/C++

radiant kraken
#

^

#

the context here is C/C++

#

not other languages

lyric mountain
#

tho java primitives are the same as C/C++'s

radiant kraken
lyric mountain
#

2 + 2 = 22

radiant kraken
#

then what if they overflow

wheat mesa
#

I thought that chars are not always 1 byte in C/C++ either

#

Since padding

lyric mountain
wheat mesa
#

It’s UB to treat them as not one character, but still technically could work due to padding, right?

radiant kraken
#

wait paddings exist in C/C++?

lyric mountain
#

like, there's a reason the compiler hates when u do that, and most langs throw that entirely as an error

radiant kraken
#

aren't paddings a feature only to dynamic high-level languages

wheat mesa
#

No

lyric mountain
#

padding they mean regarding data size

#

not " this"

earnest phoenix
lyric mountain
#

like how a boolean is always 1 byte

wheat mesa
#

Structs have to be aligned to a 4 byte multiple on 32 bit machines iirc

radiant kraken
#

yes but they are still their original size in memory

wheat mesa
#

So a struct with a char as a field could technically have more than one byte in a char, no?

radiant kraken
lyric mountain
#

any data has to be aligned so it's readable

steel trellis
#

Hello. I am wanting a way to add notify me in discord when someone on a website goes unregistered or is removed from my “clan”. Is this possible?

radiant kraken
eternal osprey
#
void copy_array(Cell now[NO_OF_ROWS][NO_OF_COLUMNS], Cell universe[NO_OF_ROWS][NO_OF_COLUMNS])
{

    for (int i = 0; i < NO_OF_ROWS; i++)
    {
        for (int j = 0; j < NO_OF_COLUMNS; j++)
        {
            
            now[i][j] = universe[i][j];
            
        }
    }

    // pre-conditions, post-conditions, implementation
}```why am i not able to copy an array like this?
#

In c++

lyric mountain
#

like, u can always have an event-based approach

radiant kraken
steel trellis
radiant kraken
#

pass a reference/pointer to the first element of both arrays along with the size of both columns and rows

earnest phoenix
# wheat mesa So a struct with a char as a field could technically have more than one byte in ...

The extra bytes allocated for the struct aren't given/forwarded towards the char field in any way, their sizes are completely different from each other as char will still have it's own size, but since it's inside the struct and you try to get the struct's size, it'll count not only the struct's size, but also all of it's field types' sizes combined, basically:

// Let's consider this struct's size as 4 bytes.
struct Foo {
  // This will be a single byte still.
  char bar;
};
// They have their own sizes, the character for example will still have the size of a single byte even though the parent struct is 4 bytes

// When you try to get it's size, you're getting the total size
sizeof(Foo); // 5 bytes
lyric mountain
#

that's why I told u to calculate the real size before attempting to fill it

eternal osprey
#

couldn't i else do: c++ k = universe[i][j] and then: now[i][j] = k;

eternal osprey
radiant kraken
#

is the 40 and 60 constant/hardcoded

lyric mountain
#

and the file?

eternal osprey
eternal osprey
lyric mountain
#

numbers, I want numbers

eternal osprey
#

always 40 height by 60 width

eternal osprey
lyric mountain
#

then ur array isn't 40x60

#

it can't be because newlines

eternal osprey
#

wait let me debug

#

so you can see everything

radiant kraken
#

does C++ have a split_newlines function in their string standard library

lyric mountain
#

if I know his teacher well, they can't use std libs

eternal osprey
#

yup

#

i've already removed the newlines

#

ran some google tests and my array seems to be equivalent to the precoded one

radiant kraken
#

how are you supposed to write a c++ program without ever touching the std library

lyric mountain
#

this is your issue

radiant kraken
#

you will touch the std library or at least a third-party library at some point

lyric mountain
#

if u make an array that's 1:1 to the file, you'll get 1-2 columns of junk, because there's where the newline chars would be

eternal osprey
#

seems to be good

#

40x60 all either dead or alive

#

so that means that the newlines have been filtered out successfully

earnest phoenix
#

Teachers these days are weird

lyric mountain
#

the teacher forces him to write 100 lines where a single std call would suffice

#

programmers don't work like this, we don't reinvent the wheel for every single task ffs

#

this is basically the reason most people end college hating java

eternal osprey
#

well, i can't help it either

lyric mountain
#

because stubborn teachers insist on using java 1.1

radiant kraken
eternal osprey
#

i could've went to college and mainly focus on coding itself, but went to university instead and now we mainly focus on the logic instead of actual programming

earnest phoenix
#

Teachers when you force them to write an HTTP client from scratch without touching the standard library (suddenly they want the students to use the standard library)

lyric mountain
#

I mean, logic is the programming

#

the rest is google and typing

radiant kraken
lyric mountain
earnest phoenix
radiant kraken
earnest phoenix
lyric mountain
#

when you memorize the entire ascii table codes but can't use it to invert a binary tree

fervent moss
#

Is math.random() really random

radiant kraken
#

no

lyric mountain
#

depends on what u call "really random"

radiant kraken
#

it's not cryptographically secure random at least

neon leaf
#

random -> yes
random -> no

earnest phoenix
#

Nothing is truly random, until you enter the quantum land

lyric mountain
#

like, any pseudo rng is indistinguishable from an atomic rng from user's pov

#

the only difference is how hard it is to reproduce the same result chain

radiant kraken
#

@earnest phoenix proposal for Math.random() to turn it to an alias for crypto.randomBytes(1)[0] / 255 when

fervent moss
lyric mountain
#

/dev/urandom

earnest phoenix
#

That's not available in the browser so not possible, until you're proposing it for Node.js only

#

Massive trolling time

earnest phoenix
#

Should be very easy! Alright let do that real quick

radiant kraken
#

or just be like cloudflare

#

just videotape lava lamps

#

ez random

lyric mountain
#

background radiation rng

eternal osprey
#

bro whatdafuk

radiant kraken
#

C++ moment

lyric mountain
#

segfault lmao

#

classic

radiant kraken
#

congratulations you are now a C++ developer

earnest phoenix
radiant kraken
#

wrong

eternal osprey
#

what does it mean?

radiant kraken
#

its not random if its always 100%

earnest phoenix
neon leaf
radiant kraken
lyric mountain
#

you should stop using ternaries instead of actual if clauses

#

third time I say this

radiant kraken
#

basically you probably accessed an array out of range

radiant kraken
#

or indexing with a negative number

earnest phoenix
#

Null it's your time to shine to promote the blazingly fast 🔥🚀 and safe 🥶 Rust

#

No more segfaults! 😤

eternal osprey
#

does anyone know the game of life?

radiant kraken
#

use rust!T!!!$@$!@12 :Rocket: 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥💪🔥

eternal osprey
#

Made by some rando

#

in 1940

lyric mountain
#

conway

radiant kraken
lyric mountain
#

not some random, THE random

eternal osprey
#

John
von Neuman,

radiant kraken
#

its a game made by @earnest phoenix

lyric mountain
#

are u trying to recreate it, perchance?

earnest phoenix
eternal osprey
radiant kraken
#

they used unsafe!!!111212122142uwfsdfhdsgfgsdyfg

#

unsafe is blasphemy

eternal osprey
#

as you can see this is what they have to do

earnest phoenix
#

Not the unsafe keyword!!!?! 😱

lyric mountain
#

I...uhh...why are u reading a file then?

eternal osprey
#

i am almost at the finish line however if i have a dead or live cell i must check these things

eternal osprey
radiant kraken
#

#[forbid(unsafe_code)]!!!!!%26152615361253 :Rage:

lyric mountain
#

conway's is dynamically generated from the current game state

#

you're just making a renderer

#

the actual simulation logic is much more complex

eternal osprey
#

I have one big issue here tho.

lyric mountain
#

what issue?

slender wagon
#

hmm is it against the rules to use a in-app api with fetch

eternal osprey
#

I must check if the dead characters have 3 live characters around them, and i must also check if the live characters have > 3 live ones around them, or only dead ones.

eternal osprey
#

However, i cannot do that when i am at the end of the line.

#

As it will only have 3 contactpoints instead of 8 \0/

slender wagon
#

example i made a an API just for my site and someone uses it on their own app

lyric mountain
#

why would that be against tos?

#

unless ur exposing user data

eternal osprey
#

Must i create like 6 different if statements for each side?

lyric mountain
slender wagon
#

so lets say i go to your site get your api and use it on my own app

#

your api isn't public

lyric mountain
#

it depends on the api provider

eternal osprey
earnest phoenix
#

That would be your fault if they're able to just use it without any authentication

eternal osprey
#

I've got this: ```c++
void check_walls(Cell now[NO_OF_ROWS][NO_OF_COLUMNS], Cell next[NO_OF_ROWS][NO_OF_COLUMNS])
{
int dead_with_live_neighbour = 0;
for (int i = 0; i < NO_OF_ROWS; i++)
{

    for (int j = 0; j < NO_OF_COLUMNS; j++)
    {
        
        if (i >= 0 && j == 0)
        {
             dead_with_live_neighbour = static_cast<int>(cell_at(now, i, j++) + cell_at(now, i++, j) + cell_at(now, i++, j++));
           
            if (now[i][j] == Dead)
                {
                    if (dead_with_live_neighbour == 3)
                    {
                        next[i][j] = Live;
                    }
                    else
                    {
                        next[i][j] = Dead;
                    }
                }
                else if (now[i][j] == Live)
                {
                    if (dead_with_live_neighbour >= 2)
                    {
                        next[i][j] = Live;
                    }
                    else
                    {
                        next[i][j] = Dead;
                    }
                }
        }```
earnest phoenix
#

Private APIs should be guarded with authentication

lyric mountain
#

unless u want a wrapping simulation

eternal osprey
#

owh god so the code i wrote above is basically just bullshit

lyric mountain
#

yandev moment

lyric mountain
#

you allow other people to use it without a key, or borrow your key to them

#

if the driver breaks any law, or the car itself, it's your fault

slender wagon
#

can you give me an example of a site with a locked api

lyric mountain
#

regardless of who was driving it

uneven tartan
#

just curious is it possible to turn a google sheet into a json

lyric mountain
#

it is

uneven tartan
#

how would i accomplish that

eternal osprey
#

but i have 4 corners, and 4 borders so i must have 8 if statements?

lyric mountain
#

the first row will always be the keys (if u structured it like that)

radiant kraken
#

why do it manually when you can just code a script that does it for you

lyric mountain
#

I mean, the script will do it manually

#

when I say "manually" I mean through code, not copypasting each cell

uneven tartan
#

sounds like a pain

radiant kraken
eternal osprey
#

4 borders and 4 corners

lyric mountain
#

automatically would be a solution where gsheets itself exports as a json

#

so u dont have to do anything

eternal osprey
#

owh lmao you guys don't talk to me XD

lyric mountain
#

because ur code is 🤌

eternal osprey
#

ah that's great to hear thanks!

uneven tartan
#

i think i have an idea of how to build this

lyric mountain
eternal osprey
#

what's eop

lyric mountain
#

error-oriented programming

eternal osprey
#

owh

lyric mountain
#

you treat errors/exceptions individually by adding if-elses

#

instead of solving the root cause

lyric mountain
eternal osprey
#

i just don't know a way to check these rules without adding if statements

eternal osprey
#

as we have 4 corners and 4 borders, that don't have 8 contact points with their 'neighbours'.

eternal osprey
#

They will only have 5.

lyric mountain
#

you're making a simulator, not a pipe bomb

cinder patio
#

dude there are thousands of examples of creating conway's game of life

lyric mountain
#

simulators rely heavily on working formulas

#

if u add if-else everywhere you'll only get more and more side-cases where it fails

#

that's where yandev failed

#

the way I'd approach conway's is by first making a matrix wrapper where I could get a cell by supplying x and y directly getCell(x, y), which would have methods to retrieve its neighbors

eternal osprey
#

i've already have that

lyric mountain
#

that way I could use OOP to let the simulation work by itself

eternal osprey
#

cell_at!

lyric mountain
#

but I bet it returns the char, not an object

#

the part ur missing is that the cells aren't aware of what's around them

#

they need to be so they can "think" for themselves

eternal osprey
#

The code only needs to run once

lyric mountain
#

the rest is just iterating over the grid infinitely while they do the work

#

once?

eternal osprey
#

it needs to be able to create the next array based off the previous one

#

yes

lyric mountain
#

conway is an infinite simulation, it should be able to run infinitely

eternal osprey
#

well not in this assignment

lyric mountain
#

do it right regardless

cinder patio
#

how often it runs should be separated from the main logic anyways

#

that's irrelevant

eternal osprey
#

Design and implement a function that computes the next configuration of the universe according to the
“Game of Life” rules.
The array now is the current configuration of the universe, the array next contains the next configuration
of the universe. Use cell_at (part 1) to retrieve the correct (neighbor) cell values in now. Test your
implementation by reading a universe configuration file,
computing one transition step, and showing the resulting universe on the console.

cinder patio
#

there's versions where it runs infinitely, there's versions when a human controls how fast it happens, etc

earnest phoenix
#

How did he make the picture like that? * I mean that it called the server image and that the server does not have an image in the first place!

lyric mountain
#

effectiveAvatarUrl, depending on what lib u use

earnest phoenix
lyric mountain
#

no because u didn't say what lib u use

earnest phoenix
lyric mountain
#

I'm not angry, u just didn't pass enough info so I asked for it

earnest phoenix
lyric mountain
eternal osprey
#

I am just going to check all 8 neighbours around the current character

#
 dead_with_live_neighbour = static_cast<int>(cell_at(now, i++, j) + cell_at(now, i, j++) + 
                 cell_at(now, i++, j++) + cell_at(now, i, j--) + cell_at(now, i++, j--) + cell_at(now, i--, j) + cell_at(now, i--, j++) + cell_at(now, i--, j--));
                 ```and check whether this is bigger than 3
lyric mountain
#

yk i++ and j++ modify the current value right?

#

🤌

eternal osprey
#

yeah that's exactly what i want

#

so that it loops through it

lyric mountain
#

not in the way u think

eternal osprey
#

imagine i have a character at coordinates i,j

#

I will have to check all 8 neighbours around it

cinder patio
#

it modifies the value in the variable

lyric mountain
#
int i = 1;
cout << i++;
#

what value will it print?

cinder patio
#

you want to do + 1

eternal osprey
#

2

lyric mountain
#

no

#

it'll print 1

eternal osprey
#

huu

#

wah

#

how

lyric mountain
#

i++ is get THEN increment

#

++i is increment THEN get

cinder patio
#

I don't think you want to increment the number in the variable anyways

lyric mountain
#

both will fuck your loop iterators nonetheless

eternal osprey
#

owh i see

cinder patio
#

just do + 1

#

so you don't modify the variables

lyric mountain
#

yes

#

the only thing modifying the iterators should be the loop itself

earnest phoenix
#

I'd totally imagine that could exist in cpp

lyric mountain
#

it does indeed (also in any lang where ++ exists)

earnest phoenix
#

oh lordy lord

earnest phoenix
#

Not any

eternal osprey
#

i tried my method out but instead of working it left me: js \1110000000000000000000000000000000000000000000000000000000123220000000000000000000000000000000000000000000000000000000024520000000000000000000000000000000000000000000000000000000012420000000000000000000000000000000000000000000000000000000002110000000000000000000000000000000000000000000000000000000000100000000000000000100000000000000000000000000000000000000

#

looks legit

lyric mountain
#

oh wait, it errors

#

weird, I swear I saw people doing that once

eternal osprey
#

i am going to de-register from this course

#

like tf i am getting fucked in all possible ways

rustic nova
#

or what kind of witchcraft is that

slender wagon
#
.then(res => Promise.all([res.status, res.json()]))

uhh how do i catch an error if res.json doesn't exist without crashing the entire application

earnest phoenix
#

Doesn't even exist sadly

#

I'd see so many use cases for it kappalul

earnest phoenix
#

And added a shot ton of randomness

stable eagle
#

Life the Game?

#

The game where the most infamous sentence is from? "God damn it Alan!"

#

?

earnest phoenix
#

WONDERFUL

#

@rustic nova we are saved

int main()
{
    int i = 0;
    
    cout << (++i)++;
    cout << "-";
    cout << i;

    return 0;
}
1-2
rustic nova
#

nah I do java

lyric mountain
#

groovy allows it

#

and more

#

I'll call it a cross operator

earnest phoenix
#

I'll call it life saver operator

#

java doesn't like it

#

js doesn't like it either

lyric mountain
#

aaand keep it coming

earnest phoenix
#

not both at the same time

#

Invalid left-hand side expression in postfix operation

lyric mountain
#

groovy best boy

#

I wonder if brainfuck is possible in groovy

eternal osprey
#

how the fuck is my glider upside down

lyric mountain
#

updraft

earnest phoenix
#

array.reverse

eternal osprey
#
   
        dead_with_live_neighbour = static_cast<int>(cell_at(now, ++i, j) + cell_at(now, i, ++j) + 
                 cell_at(now, ++i, ++j) + cell_at(now, i, --j) + cell_at(now, ++i, --j) + cell_at(now, --i, j) + cell_at(now, --i, ++j) + cell_at(now, --i, --j));
                
                 if(dead_with_live_neighbour > 3){
                     next[i][j] = Dead;
                 }else if (dead_with_live_neighbour == 2 || dead_with_live_neighbour == 3){
                    next[i][j] = Live;
                 }else if(dead_with_live_neighbour < 2){
                     next[i][j] = Dead;
                 }
                ```this is my current code
#

i honestly ain't sure if this is any good

earnest phoenix
#

yoikes

lyric mountain
#

ur still using ++j

eternal osprey
#

i am checking all 8 possible solutions around each character, and that returns either 0 or 1 using the cell_at.

lyric mountain
#

didn't we tell u not to

eternal osprey
#

I mean i have a for loop that increments already

lyric mountain
#

j + 1

eternal osprey
#

but that won't chekc any other places around them

eternal osprey
#

but that can't be the issue

lyric mountain
#

never assume anything when it comes to programming

eternal osprey
#

i've debugged everything

#

and it now displays segmentation fault

lyric mountain
#

because ur not checking if j + 1 exists at all

eternal osprey
#

owhhh

#

i must of course check no_of_rows-1

#

how would i else check for the neighbouring characters?

#

As this method is not going to work

lyric mountain
#

I'd make a wrapper that's boundary-aware

eternal osprey
#

how the fuck wuld i do that ☠️

#

isn't there any method beginner friendly

lyric mountain
#

simply make a function that checks if the coordinate would be outside the boundaries

#

if it's inside, retrieve the value at position

cinder patio
#

and if it'a outside error?

#

loĺ

neon leaf
#

is i !== false = !!i?

lyric mountain
#

no

neon leaf
#

what is tho

lyric mountain
#

i == true

neon leaf
#

because i is either false or something else

#

its never true

lyric mountain
#

note ==

lyric mountain
#

you didn't

eternal osprey
#
Cell cell_at(Cell universe[NO_OF_ROWS][NO_OF_COLUMNS], int row, int column)
{
    // pre-conditions, post-conditions, implementation
    return (universe[row][column] < 0 || universe[row][column] > 1) ? Dead : universe[row][column];
}
#

this checks if it's out of bound and then returns either dead or alive

lyric mountain
#

that's not checking for out-of-boundaries case

#

this is not js buddy

#

you cannot simply access an invalid array index and expect a value

eternal osprey
#
TEST(part1, cell_at)
{
    Cell universe[NO_OF_ROWS][NO_OF_COLUMNS] = {
        {Live, Dead},
        {Dead, Live},
    };

    EXPECT_EQ(cell_at(universe, 0, 0), Live);
    EXPECT_EQ(cell_at(universe, 0, 1), Dead);
    EXPECT_EQ(cell_at(universe, 1, 0), Dead);
    EXPECT_EQ(cell_at(universe, 1, 1), Live);
    EXPECT_EQ(cell_at(universe, -1, -1), Dead);
    EXPECT_EQ(cell_at(universe, 0, NO_OF_COLUMNS + 10), Dead);
    EXPECT_EQ(cell_at(universe, -5, 0), Dead);
    EXPECT_EQ(cell_at(universe, NO_OF_ROWS, 0), Dead);
    EXPECT_EQ(cell_at(universe, NO_OF_ROWS + 4, NO_OF_COLUMNS + 8), Dead);
}
```i've ran these tests and they came out good.
lyric mountain
#

well, your current code says otherwise

eternal osprey
#

that's strange

#
Cell cell_at(Cell universe[NO_OF_ROWS][NO_OF_COLUMNS], int row, int column)
{
    // pre-conditions, post-conditions, implementation
   
    return (row > NO_OF_ROWS ||column > NO_OF_COLUMNS || universe[row][column] < 0 || universe[row][column] > 1) ? Dead : universe[row][column];
}   ```I Modififed it a bit
#

now it should also check for boundaries

lyric mountain
#

why are u initializing an array in the function parameters?

eternal osprey
#

cout << cell_at(now,554,6); yup this returned 0

eternal osprey
#

i am not allowed to change it

#

as the boundary function is set, how would i now proceed to check if a char should be dead or alive

eternal osprey
#

does anyone know what to do?

quartz kindle
#

throw it in the garbage

eternal osprey
#

nah fam my deadline is in exactly 1 hour

#

i am fucked

#

this is literally the last part but i just dont understand how to fucking check the next cycle

quartz kindle
#

what is the issue exactly?

#

if all your tests work

lyric mountain
#

he's trying to recreate conway's game of life

eternal osprey
#

this is my output

#

identical to what it should be

#

my google test is still displaying that its false

#

wtf

quartz kindle
#

top one has 40 lines, bottom one has 27 lines

#

unless you cropped it lul

eternal osprey
#

yeah i cropped it

#

i put it in an online counter and the chars are the same

#

how would i check both arrays?

#

like in a console.log() js way?

#

dayuuum 7 minutes left

#

is it because of whitespaces or anything

quartz kindle
#

complain to the exam board or whatever

lyric mountain
wheat mesa
#

To be fair a lot of teachers only have those specifications because they want you to understand the algorithm/logic behind the problem, not just how to use a stdlib function that does it for you

lyric mountain
#

that's fair, but I meant the language features themselves

#

usually the constraints he brings don't even allow value-returning functions

wheat mesa
#

Yeah that's pretty dumb

quartz kindle
#

a solid 5/7

eternal osprey
#

it displays exactly the same fucking output

#

but my test fucking fails

#

howww

eternal osprey
#

could anyone please help me

#

is there not a way to display my array like this

lyric mountain
eternal osprey
#

huh?

#

breakpoints?

#

If i use that it only displays that my array has 1 row instead of 40

#
void check_walls(Cell now[NO_OF_ROWS][NO_OF_COLUMNS], Cell next[NO_OF_ROWS][NO_OF_COLUMNS])
{
//precondition
assert(true);
//result is a new 2d array based on the older array and how much neighbours each character has.
    int neighbour_live_cell = 0;
    for (int d = 0; d < NO_OF_ROWS; d++)
    {
        for (int m = 0; m < NO_OF_COLUMNS; m++)
        {
            neighbour_live_cell = count_live_neighbour_cell(now, d, m);
            if (now[d][m] == Live && (neighbour_live_cell == 2 || neighbour_live_cell == 3))
            {
                next[d][m] = Live;
            }

            else if (now[d][m] == Dead && neighbour_live_cell == 3)
            {
                next[d][m] = Live;
            }

            else
            {
                next[d][m] = Dead;
            }
        }
    }
}```this is the current code
lyric mountain
#

cout << '\n'

eternal osprey
#

what?

#

Why would i want that

eternal osprey
#

nah like i mean

#

i worded it wrong

#

the test that i am failing checks whether the arrays are the same

#

i think that my array is not actually 2d

#

so i wanted to display it like that to see all the colums + rows

#

not only the values of array[row][column]

eternal osprey
#

and i don't know how to find out how

#

ngl i will pay you 15$ if this works through paypal

radiant kraken
#

but why did you write class contents in header files

wheat mesa
#

because why not

#

I didn't feel like making 30 more files for each component when all that they really have is basic builders in them

#

And as for the ECS, templates are annoying to write in other files, doesn't work very well

radiant kraken
#

jokes aside, good job, probably one of the best c++ projects i've seen @wheat mesa

wheat mesa
#

C:

lament rock
#

Kinda weird seeing big bots getting hijacked

#

not like well known bots, maybe like 50k guilds+

earnest phoenix
lament rock
#

their tokens get leaked because bad security practices or it's exposed somehow probably on accident such as committing the token on github

#

or their owner accounts get scammed and stolen

earnest phoenix
lament rock
#

Yeah that happens. Usually Discord system will DM you saying your token popped up on GitHub

wheat mesa
#

in my opinion you should always have to answer a security question before changing a bot's token

#

such a simple change that would prevent a lot of this

lament rock
#

Nah I mean just the token gets leaked. No changes required

wheat mesa
#

Well yeah but if the owner's account gets hijacked then the token would still be safe

#

Other methods are just the fault of forgetfulness and stupidity

lament rock
#

You can view the token regardless

wheat mesa
#

No

#

Can you?

lament rock
#

iirc, yeah. Unless they changed it to where you can only view it once and then have to reset it to get it again

wheat mesa
lament rock
#

ok fair

earnest phoenix
wheat mesa
#

It used to be like that though

lament rock
#

it can still get leaked through other methods

lament rock
#

How about just not

wheat mesa
#

But that would be a hell of a project, might as well just remake the entire thing at that point

earnest phoenix
#

that's what Someone sent me

#

and I said I'll see what I can do

#

I don't know java

lament rock
#

I do not think Minecraft is a good medium to monetize something regardless of if it fits in the TOS

earnest phoenix
#

but they want it to sell ranks for cheaper fees

wheat mesa
#

Java is very different from js in many ways. It's not feasible to convert that to a minecraft-based backend either way

#

Just use an already well established plugin like Buycraft or whatever it's called

earnest phoenix
#

well I mostly wanted to keep the website format after viewing

earnest phoenix
wheat mesa
#

Then have a UI in minecraft that redirects to a page like that on a browser

wheat mesa
lament rock
#

payment processing will always have a fee

earnest phoenix
#

yeah they said on here their was a cheaper fee than buycraft

lament rock
#

whether it be a considerable amount of time or money for instant transactions

earnest phoenix
#

I was honestly about to think of adding RCON into it

#

and doing it that way

wheat mesa
#

They could set up their own website with like paypal donations or something, not sure how that compares to buycraft

#

Everything regarding that is going to take a percentage though

wheat mesa
#

People are going to have to pay somehow

earnest phoenix
#

I could remake the code and sell it lmfao

#

the developer did a good job, I will give him credit

wheat mesa
#

So there's probably going to need to be a website regardless

earnest phoenix
#

yeah

wheat mesa
#

Just automate paypal, I heard it's hell but it can work

lament rock
#

No real way to do it without because oauth2 requires a redirect URI

earnest phoenix
#

that's easy

#

I think

wheat mesa
#

paypal event => verify IGN => give rewards

#

easy enough

earnest phoenix
#

yeah

wheat mesa
#

(except if you have an unreliable backend)

earnest phoenix
#

so I've been allowing dynmap to render on the server

#

and it's using 10 GB of ram

#

Dynmap alone

lament rock
#

instead, I'd make sure the user has an account in game, then create a transaction flow with a reference number and then once the payment is done, get the user data by reference number and apply rewards

wheat mesa
#

idk what dynmap is

lament rock
#

an interactive map on the web

earnest phoenix
#

Google earth map for minecraft

lament rock
#

Is this a paper or a fabric/forge server

wheat mesa
#

Why should that use so much RAM? Seems excessive to me, unless your world is absolutely massive

wheat mesa
#

Oh wait does it keep track of 3d data

earnest phoenix
lament rock
#

probably paper since you mentioned luckperms, but options that allow you to load paper plugins on modded platforms exist

earnest phoenix
#

all of it

wheat mesa
#

Ok that's why

lament rock
#

You can make use of modded platforms to achieve a lot of performance enhancements

wheat mesa
#

Sounds like a big waste of memory to me for a feature that really doesn't add much to the server tbh

earnest phoenix
#

people requested it

#

once it's done rendering

#

the ram will cool down

#

but it's basically guidance

wheat mesa
#

Oh I assumed that it was live rendering

earnest phoenix
#

if your in north america you could get to south america with a map

earnest phoenix
rustic nova
lament rock
#

I was able to fit a heavily modded server into a 2GB VM

wheat mesa
#

you know what I learned yesterday that disgusted me

earnest phoenix
#

what

wheat mesa
#

apparently the java compiler doesn't inline functions at compile time

#

it does it during runtime

earnest phoenix
#

eww

#

that is disgusting

lament rock
#

:)

wheat mesa
#

(also I am a thorough believer in adding an inline keyword to hint the compiler to inline something)

lament rock
#

remake minecraft java's server in c++

#

I think that already exists with something like waterfall though

#

might not be the actual name

wheat mesa
#

Yeah

#

I think something like that exists

earnest phoenix
#

I zoomed out to get the whole thing

wheat mesa
#

To be fair making a server isn’t too hard, it doesn’t require any rendering and it’s (I think) fairly well documented on what the server needs to do

earnest phoenix
#

in minecraft

lament rock
#

nvm it isn't waterfall. waterfall is basically horizontal scaling of servers as "lobbies" I guess

#

This is probably gonna keep me up at night

earnest phoenix
#

what is?

lament rock
#

there's a platform that allows both java and bedrock clients to join

earnest phoenix
#

geyser

wheat mesa
#

Cuberite is a C++ server for minecraft

earnest phoenix
#

Geyser is the plugin

#

for waterfall, Bungeecord, Spigot

#

Geyser allows java and bedrock crossplay

lament rock
#

Geyser is still made in Java though

wheat mesa
lament rock
earnest phoenix
lament rock
#

1.12.2 mc support lmao

#

no java mods

wheat mesa
#

He’s talking about a custom server implementation

#

In c++

#

Since you’re never directly dealing with the mc client, you don’t need any Java to write a server

lament rock
#

I could write one in JS

wheat mesa
#

Already exists

lament rock
#

Gross

#

I wanna see it

wheat mesa
#

I think it’s called like mineflayer

#

Yeah it is

#

Oh wait

#

This isn’t what I was thinking of

#

This is a botting API

#

Not a server

earnest phoenix
#

@wheat mesa you can find everything, Find me a botting API with AI in the bots. The server I'm working on is gonna have a prison and I wanted to bot the guards with AI

#

we call it the ban prison

#

whenevre you get banned

wheat mesa
#

AI in the bots???

earnest phoenix
#

instead you get sent to prison

#

and work for the server

earnest phoenix
#

so the bots learn

#

and progress

wheat mesa
#

The only thing I know that’s AI/ML based for minecraft is baritone

#

But that’s a mod, I don’t know of anything server side that does that

earnest phoenix
#

doesn't need to be server side

#

just something I could run on a seperate server

lament rock
#

I'd probably rather just take volunteers

#

because Minecraft is too complex for a traditional AI model

wheat mesa
#

Yeah

#

That’s like phd level stuff, minecraft is almost similar to training AIs in real life in a way

#

Albeit a lot more simple than that

#

But still not a feasible project without a background in ML

lament rock
#

ML logic destroys my brain

earnest phoenix
#

does anyone wanna work on group developments

#

split the profits @wheat mesa @lament rock ?

wheat mesa
#

lol

#

you're falling down the pit of assuming there will be profit in the first place

earnest phoenix
#

You never know

#

I can make a nice shop

#

I just want developers to work with

lament rock
#

There is no profit, not even for Discord bots unless you're top % or insanely lucky

wheat mesa
#

But if you don't sell anything that people want, you will have no profit

earnest phoenix
#

So let's do crowd sourcing for info

#

see what people want

lament rock
#

Finding people who share your vision is hard and would be better off contracting people off fiver

earnest phoenix
#

Didn't you take business Management? (dont take offense)

wheat mesa
#

No, I didn't

#

I'm still in high school

#

And any sort of business class is optional

earnest phoenix
wheat mesa
#

And not my fancy

lament rock
#

We are not running a business lol

wheat mesa
#

Yeah

earnest phoenix
lament rock
#

weird school

wheat mesa
#

It's a volunteer job with the potential to make 22 cents at the price of hosting, hard work, and time

#

If it were that easy to start a business and make money, I'd be rich already

earnest phoenix
#

22 cents per bot or whatever price we sell it for

wheat mesa
#

Unfortunately it's not

#

Oh you're talking bot development

#

Then my estimate goes down to 0 cents

lament rock
#

he means the profit margins

earnest phoenix
#

It somewhat is, If you have the stuff to sell. people will buy