#development
1 messages Β· Page 229 of 1
waves is not a driver, its an amplifier/enhancer/effects provider
realtek can be split into parts, for example the realtek control panel is a separate program from the actual driver
ravbg64 = background process
rtkngui64 = graphical user interface / control panel
waves = effects and shit
ah ok
on my pc i have like 4 lol, realtek driver, cirrus logic amplifier, dolby audio enhancement
and intel smart audio
guys i need help
i don't know why it's not accepting some unicodes
but i'm getting this error on unicorde
py", line 1240, in load_grammar
tree = _parse_grammar(grammar_text, grammar_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\pypoetry\Cache\virtualenvs\rp-utilities-2cgrnvKo-py3.11\Lib\site-packages\lark\load_grammar.py", line 969, in _parse_grammar
raise GrammarError("Unexpected input at line %d column %d in %s: \n\n%s" %
lark.exceptions.GrammarError: Unexpected input at line 93 column 342 in <string>:
u"\u09E0-\u09E3"]/ | /[u"\u09E6-\u09FE"]/
are you still yapping about this driver thing
whats the actual problem
i didnt catch the memo
Tes
nekomancer wanted to reinstall her/his/their audio driver, because there are 3 audio drivers running. and now installing the realtek driver gives error, but audio still coming out
tf
definitely tried uninstalling all traces of drivers?
reboots as well ofc before trying to install anything
just uninstalling them likely doesnt unload them from the kernel
not sure,, #development message
if anything that error looks like the hardware is unsupported aka the driver is wrong
i'd try getting the hardware name/id of the speaker or whatever youre trying to use and searching it on google
yeah but it turns out its not 3 different drivers, just 3 components of the same driver
so theres nothing wrong
still dont know why the install failed tho, he downloaded the drivers directly from laptop manufacturer
bruh
ima be real tim
I wrote this code
but even I dont understand it
π
I literally blacked out writing it
zombie coder
you incorporated a spirit who wrote the code for you
ong
I solved it :D
the people in the cs50 discord are super nice
still not the full solution but I got 1/2 of it done
last step is missing
nice
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int n = get_int("How big do you want the stairs? ");
for (int i = 0; i < n; i++)
{
/**
* First iteration: i = 0; j = 0; j < 1 (i + 1); j++; print 1 #
* Second iteration: i = 1; j = 0; j < 2 (i + 1); j++ print 1 #, loop again j = 1; j < 2 (i + 1) print #; loop again j = 2; j < 2 break out;
* Third iteration: repeat i cant write all that out
*/
for(int j = 0; j < i + 1; j++)
{
printf("#");
}
printf("\n");
}
}
This is the first part done
but now I have to figure out how to make it go from
#
##
###
####
#####
######
to a right aligned one
so that will be fun
:p
Why does the map like this return me:
but with only one element it does actually return me the prices
maybe you have one without a price?
the expression (a, b) always resolves tob
hey tim
want to step on my stairs?
might fall in
but its okay
uhm sir
Im not doing that
π
that above wasnt even what I wanted
I was trying to right align it
and fucked up
right
im doing something wrong
I basically want the output like
#
##
###
####
#####
######
hm
lel
get max number of stairs (ie 6), for every step input max number of stairs spaces minus number of current steps
:O
Wait thats genius
FUCK
I did an oopsie
#include <stdio.h>
#include <cs50.h>
void print_pyramid(int steps);
int main(void)
{
int n;
do {
n = get_int("How big do you want the stairs? ");
} while (n < 1);
for (int i = 0; i < n; i++)
{
print_pyramid(i);
}
}
void print_pyramid(int steps)
{
for(int i = 0; i < steps + 1; i++)
{
for (int j = 0; j < steps - i; j++)
{
printf(" ");
}
printf("#");
}
printf("\n");
}
wait no I didn't even do what you said

hm
someone forgot a load-bearing column
load-bearing?
keep in mind this is for an intro to cs class so I can't use any advanced techniques
and now it's collapsing
I can only use what has currently been taught
like variables ,loops, functions and conditionals
it was a jokeeee 
oh
also funny enough u kinda made a fibonacci stair
oh nvm, it's actually 0 1 2 3 4
lol
I honestly dk what I should do here
I barely got the left aligned stair
my original idea was to just print out a x by x box and then replace however many # with spaces to make the stairs
but I can't do that and submit it

well, you can do it fairly simply by using the same method you use to make an ascii loading bar
u can use the same concept
the max would be the number of steps
then the % would be the step chars, the remaining would be spaces
I know the general idea of what I need to do
invert it to make it right-aligned
my issue is I can't seem to get it to work
use the loading bar concept, it'll make it much easier for u to mirror horizontally the stair
I just need a hint as to where I should start generating these spaces
char stepChar = '#';
char spaceChar = ' ';
for (int step = 0; step <= steps; step++) {
for (int i = 0; i < steps; i++) {
print(i <= step ? stepChar : spaceChar);
}
printf('\n');
}
ima be real
even if that worked
I cant do it
I have to use stuff from the lectures
and Im also not looking for actual code im looking for guidance
I learn nothing by getting just fed code
Thank you though
also testing your code its bugged
#
#
#
##
##
#
##
###
###
#
##
###
####
####
#
##
###
####
#####
#####
had to make some changes because of how C is
char stepChar = '#';
char spaceChar = ' ';
for (int step = 0; step <= steps; step++) {
for (int i = 0; i < steps; i++) {
printf("%c", i <= step ? stepChar : spaceChar);
}
printf("\n");
}
hm, odd
but yea
Im not looking for actual code
im looking for more of a point in the right direction
Im trying to learn CS at a deeper level, the lectures i've taken so far is about how to use conditionals, loops, functions and variables in a efficient way and get you to think how should they be used and when they should be used
moreso loops, conditonals and functions
What I have so far is correct in a way, its just the problem set wants it right aligned.
the basic idea is, you have an input for the number of steps right?
get input (ie 6)
print step 1 (5 spaces and 1 char)
print step 2 (4 spaces and 2 char)
print step 3 (3 spaces and 3 char)
etc...
its always gonna follow that rule (assuming monospace fonts)
so all you need to do is count how many characters are missing from each step, and fill it up with spaces
you always print steps-i spaces and i characters
yea
hm
its just I need to print these spaces along with the #
because the # should come after said spaces
right
but....how
because i've been trying to do that
and I assume I need another for loop right?
your main loop is managing newlines
so inside that you need another loop to manage characters per line
inside the main loop, you can have either two loops, one for spaces, another for #s, or you can have one loop that handles both like kuuhaku showed
how would it be cheating
it would be like writing with a pencil then rewriting the same thing with a pen
the problem isnt the language bro
ong
doesnt matter what lang I write this in
its my thinking
im not thinking logically
I could attempt this in js and still fail
@quartz kindle what's a good frame size for sending moderately big binaries through websocket
like, png images
exactly, therefore not cheating :^)
prettymuch any
unless you wanna be specific for some special use case
well, if I set too low it'll take an eternity to finish no?
you mean spliting a payload into multiple messages right?
websocket can do that but doesnt really need to, as tcp will already do it anyway
yep
char stepChar = '#';
char spaceChar = ' ';
for (int step = steps - 1; step >= 0; step--) {
for (int i = 0; i <= steps; i++) {
printf("%c", i <= step ? spaceChar : stepChar);
}
printf("\n");
}
#
##
###
####
#####
######
the lib I use was trying to send the fatto all at once so...it was killing the connection
https://chibi.takiyo.us/Tn5qyGZd01WI.png this is your code
I've split it into 1024 byte chunks, now it doesn't crash, but idk what's the recommended value
replace i < steps with i < steps - 1
you should be safe with 64k
i believe thats the default for node streams for example
64k? like, no byte rounding?
aight, so 2 ^ 14
nvm
The stream will be read in chunks of size equal to the highWaterMark option. In the code example above, data will be in a single chunk if the file has less then 64 KiB of data because no highWaterMark option is provided to fs.createReadStream().
nvm again
i guess they set 64k for fs, but 16k otherwise
ornot
lmao
@lyric mountain @quartz kindle @pearl trail I managed to solve it without using your guys solution
It was actually staring me dead in the face π
whoa congrats
There's the code if any of you want to look at it
keep in mind it may not be efficient, but thats not the goal rn

Honestly looking at it
and now with my more extensive knowledge on how loops work
its easier for me to understand
yeah lmao
Hey, if for example I add "r" rated truth and dare questions in my discord bot. Do I have to change anything on top.gg ?
You will have to lock it to nsfw channels now
Yea sure, nothing else right?
You can say it now features mature content
but you cant mention anything explicitly nsfw
Um but i was seeing other bots on top.gg which do the same, they haven't mentioned it
You're allowed to say it has mature content, but you can't say what that content is or go into detail describing it
If you see any bots doing such, report them and mods will handle it when they can
No, I mean they haven't mentioned it has mature content
Oh okay thank you:)
Yea, they dont say anything
Well that's okay as well
Why?
The rules on nsfw bots on top.gg is a gray area
you can have an ansfw bot, you just can't go out and say its an nsfw bot in detail
The only rules is
- No nsfw bot pfp
- No nsfw name
- No nsfw in the description
- Nsfw commands must be locked to the appropriate channels
Ohhhh, thanks :)
If a bots main purpose is nsfw though they likely need to say so in their description e.g
"This is a bot containing mature content"
Im not a bot reviewer or mod tho so take what I say with a grain of salt
I am just regurgitating what I see other mods say
freaky truth or dare ππ
Also I Would add a thing @proud plover
5. No nsfw tags
6. Dm is considered sfw
can a bot move a user to a different voice channel using the HTTP API and not using sockets?
Thank you :) I will make sure to follow these points
isn't all the requests made are using http?
oh or is that the op op thingy
nvm my bad
seems like no you can't
ill look into the api docs for you to make sure
good stuff
odd way discord designed to do that but ok
oooo
not a bad idea, good use of functions
you could also start i at 1 instead of 0 and avoid having to do i+1 twice
also, you're probably not yet allowed to use memset right?
otherwise that would be the ideal way of doing it

Then without db option:
this means I have to create a test db and add the permissions to my user to this db
@quartz kindle if a websocket is sending data, but the connection drops midway, should I restart from beginning or continue where I left?
I'm confused whether the operation is aborted or the server continues waiting for the remaining data
harvard students learning the same things as literally every other computer science university
Ψ
2drunk2reply
saved
Ppl, I did everything, but idk why, I tried with axios, fetch and tried in https and http but I just can't get a response from my webapp / rest api
Like I have a server hosted
and another that is my bot
In the same server but not the same port
I can access to my bot on my browser
and even the / of my first server in the console
but why it can't make a request in a nodejs process ?
bro wtf
it works in local
But it doesn't work hosted
(timed out)
You forgot to blur the IP in the card title
rip
mobilizing my bot net as we speak
any one know if bot's usernames will go about some sort of migration like user acounts did?
it sounds like your server might be locked behind some firewall
you have to open up the ports so outside traffic can reach the server
or the DNS is fucked
Well, it's so strange because my two nodejs processes are hosted on the same server (same IP)
so youre trying to access something within the same server?
try 127.0.0.1 or localhost instead of 0.0.0.0
but hosted it is just blocked
I tried localhost
The error is cause: Error: connect ECONNREFUSED
Well
I'm trying 127
Again
That's not a time out
It's just refused
I'm gonna try to use sockets
no reason why that shouldnt work
so youre definitely running the code on the server
and that server definitely has an app running on port 1027?
1027 is a risky port
And my bot also have a webapp
I can't change it
why not?
It's not mine
but well, if it's giving econnrefused, then there'll be a lot entry on your webservice provider
I just have access to pterodactyl panel and sftp
like nginx
See the logs for the reason
the IP alone even redirects to my first nodejs process π
?
I don't have logs
It's a docker
I'm gonna try to connect to the server with ssh
I can't
ah,, dockerized bot and server or whatever you try to use?
Well, that complicates things
if they're on a different container, make sure they're in a same docker network, and then check the api's docker IP
Oh wait, that's not going to work, u can't use localhost with your public port
yes
You're internal port is likely different to public port
not 0.0.0.0 , 127.0.0.1 , nor your vps's ip
I tried 127.0.0.1 too it doesn't work
first, do you use docker?
Why are u trying to make a request to localhost?
to check if my nodejs process of the bot is online or no?
From localhost?
No?
Like, you're trying to access your bot status from within the same server?
Yes
But not the same IP
How's it the same server but not same ip?
I never used it, but yes my nodejs processes are in a docker
it's the same IP
are each of them in different container?
I'm gonna try it
Aaaaaa decide what it is
for cross-container, thats impossible in ptero (fully internally)
I told it
U said it not the same ip but now it's the same ip
No
^
???
π
you have to restart, unless you have your own logic for handling partial uploads with some sort of file hashing
we're getting confused with this one π₯
Let's start from the start, where are you trying to access and from where?
I want to make an http request (my status service / vote handler server) to my bot http express app to see if it's online
Ok, did you try using port 80?
Both of those processes are in a docker, thoses docker are in the server
80 for what?
80 is http port
My processes don't have the same port
no matter the docker containers in the same server, they'll have different local ip, unless you expose the port(s)
https://chibi.takiyo.us/F6U3D3mOx8Pi.png like this
That's local adresses
per container
are your things in the same container?
You saw ?
so your api want to access the bot?
have you tried those ip addresses and ports instead of 127.0.0.1?
Ty, but ended up making my own payload assembler
Lol exactly
And I get timed out
what about external ip?
Public ip
It's all public IP
so if you type that ip address and port in a browser, you can access all of those, right?
not the bot, for me
what i can access:
FluffyMod API -> returns hello world
FluffyMod -> returns OK
what i can't access
FluffyMod Website -> ERR_CONNECTION_TIMED_OUT
HubGames Bot -> ERR_CONNECTION_TIMED_OUT
Yeah
HubGames Bot is not mine
It's not the actual bot i'm requesting
FluffyMod Website and HubGames Bot are offline
it's normal
green and yellow is online
you want your api to access fluffymod right? sorry i got confused π
yes
It works in local
but not when hosted
yeah it's loading a long time on my server
also doesn't work
Yeah but i'm using public IPs
it should work
technically and theoritically you can access by using the public ip
when a connection comes into the machine, there are iptables rules that rewrite the packet based on port number, so that it instead has a target IP address of the Docker container's internal IP instead of the host machine's IP. This packet then gets sent to the right container based on its internal IP.
The problem is that these rules do not run when the packets originate from the local machine, so you end up trying to connect to the given port on the host, which is closed. Normally the Docker container would intercept connections to this port making it look like the port is open, but in this case you're accessing the port directly on the host network, behind the Docker intercept.
in any case i guess the "correct" way of handling this would be to create an internal network and place both containers in the same network
so then they can communicate via internal ips
yes
It worked before...
yes
not the public ip
Ah
the container's private ip
like this
I can create a child_process to run this command
https://stackoverflow.com/questions/17157721/how-to-get-a-docker-containers-ip-address-from-the-host
I'm gonna try with a subdomain
like noip
no
pterodactyl only exposes ports via docker
not sure how it works with multiple public IPs on one machine
How can I proxy the IP ?
you support?
What?
you'd have a middleman server to receive/send the requests
like, instead of sending the requests to your server directly, you'd send to the proxy server and then it'd send to the actual server
is there a good place to get bot avatars created?
you tryna make a few doll hairs? π
I'm awful at it π
lawd i have no idea how to use this
well, nobody does at first
Yea sadly not
its an intro to CS class 
Alright I made it work with socket.io, the nodejs process of my bot has socket.io-client and when the process starts it sends "ready" to my API
tip: don't expose the ip address, especially over HTTP
this ip is a proxy lol
It's not mine
oh good
Hello I'd need some urgent help, my bot automatically keeps going offline after running for 2-3 minutes and this behavior is not normal at all.
I restart it, it runs for a while and then goes offline again while the server keeps running.
I tried hosting it both locally and on cloud but same results. I've no idea what's causing it
Moreover there are no rate limit errors in logs either
are you logging ratelimits?
Pretty sure
and it should not be due to rate limit
Most bot libraries silence ratelimit errors
Because I don't think a bot goes offline when it gets rate limited
I don't think mine does, I've faced rate limits in past
what library are you using?
π this library is weird
its missing some key things to help diagnose your issue.
I see..
well what can I do now
Or the docs just dont mention them.
I'd reach out to a community that has people who use disnake
it could be because of mongodb as well, no clue
but this has never happened before
and running for 2-5 minutes, then going offline is very weird
are you listening to events like on_connect, on_disconnect, on_error, etc?
no
async def on_ready(self):
print(f'We have logged in as {bot.user}')
await bot.change_presence(activity=disnake.activity.Game(
name="Type jjk tutorial to get DM guide!"))
this
yes
use them and see what it says
I'm listening to on_error
How do I use on disconnet to find the issue
what information do I print and how
print whatever the event gives you
async def on_disconnect():
print('bot disconnected')
i mean thats not going to help
its just going to print that it disconnected
not tell me why
it is going to help because it will give you proof that it actually disconnected and not just froze and got stuck
and then you can combine it with other events like on_gateway_error and see if that prints anything
let me try
and it will give you the exact timing of the disconnect
so what if it prints it
so you can combine it with other logs like your database, and see what the bot was doing when it disconnected
lets hope, I'm panicking for now
the more information you have the better, even if you dont have an actual error message, there is a lot of things you can figure out just from having the exact timing of when things happen
Currently I'm printing the on_command user
like whoever is running a command to get some idea
but I don't think its happening because of it
@quartz kindle okay so the bot went offline on discord but it did not print the offline message https://prnt.sc/3k9b2ZLQTPX1
like "disconnected"
how am I supposed to proceed
I'm feeling clueless here
it's not disconnecting and on cloud the cpu usage doesnt go above 15%
i mean when it gets stuck
yeh its somethinglike that
16.9%
nothing more than that
and this started happening all of a sudden without me making any big changes to bot's code
you can try an experiment like this:
while True:
print("running")
time.sleep(10)
that will make the bot print "running" every 10 seconds forever
the goal is to see if the bot stopped working because it froze or if it really disconnected, if it stops printing every 10 seconds that means the program is freezing
also, did you setup the gateway error event?
disnake.on_gateway_error(event, data, shard_id, exc)
also this one disnake.on_shard_disconnect(shard_id)
i have to go out rn, will be back later
I don't know what to pass in for shard ids or where to define it
Do I just define it with the main bot class
Where on ready function is
My bot is auto sharded
@solemn latch
Woo
NyNu
Like a new bot ID?
Submit the new bot
just like you did the first time
We approve by bot ID
Yep, you'll have to submit it the same way.
We dont support that. I'm not sure what you want me to say.
We approve by bot id, so if you have a new one, you have to get approved again
You canβt
This is just going to keep going in circles.
I saw i was lurking 
In general you cant change bot id
Not just in general
in #development too?
Everything is possible here, this channel has its own rules
lma
those are not arguments you pass, those are variables the function gives you
ie:
async def on_shard_error(event, data, shard_id, exc):
print(event, data, shard_id, exc)
make an exception for arabic bots :^)
Is there a way to check if a provided ID leads to an actual user even if the bot has no mutual servers with the user?
Either with Discord.js or the API itself
the only way is to try to fetch the user
And it technically requires mutual servers though
Oh thanks
possibly, but fetching accounts has always been a standard thing in most platforms
there are things inside accounts that are restricted of course, but the general public account information is always available
Still think thats dumb
Even private mode on most sites still will list usernames
Imagine you managed to get someone's id
well that ID alone tells you nothing
supose the person is a stalker tho
well now they have a way to get in touch with them
I mean, without their username yes you do
cant you just <@id> on a random chat and right click?
thats if you are in a server with them
It requires mutual servers though
they can change their username
they cant change their id
so if they change their username, leave all servers you are in
But ID's provide public information so it's fine in my opinion
Not really, you'll just have the eligibility of checking their public profile
What else would it provide?
Yes and it makes sense in my opinion
It doesn't
Why would you want to look up random users not in your server
Other than to creep on them

What practical implications do you have to need that information
To check if the ID actually leads to a user
I do it from time to time π
Dming people for mod reasons mostly, but I've also been redirected to contact someone via their ID
Why would you need this
practically
Well, a simple example
If your bot is in a server with someone then yes their ID leads to a user
you shouldn't need to fetch from outside the servers your bot is in
That is impractical and quite frankly odd behaviour
Well, imagine a system where you allow your bot's users (that are guild administrators/owners) to blacklist people from their guild
In this case you shouldn't let them enter random numbers as ID's
But it would still be their problem so anyways
Yes I just noticed that it's pointless
But it still makes sense in my opinion tho
"Yes I just noticed that it's poiintless...But it still makes sense in my opinion tho"
That's very contradicting
Unneccessary, but makes sense
What makes sense is that we can still get their public information via their ID's
What is pointless is to implement that validation into the system that I talked about above
- You should not be blacklisting users not in your server, especially based on no evidence that is terrible moderation skills
- You shouldn't be looking users up outside of your servers, as that is morally wrong prying into other people (while the information isn't very identitive to who they are sometimes it can be)
Well, about the first one they might have left from the server after doing whatever they've done
they will be in cache
For how long
until your bot restarts.
if they didn't ban them during that time well
not your fault
its on them

You can only do so much to hand hold them
Not to mention
just add that id to a blacklist, and if they join back ban em then
realistically you never should have to fetch a user outside of the servers you are in
there are ways not to
its just lazy
Yes, it would be useless to validate the ID as long as the staff knows what they're doing
Which I pointed out here but my sentences were kinda messy so
It was hard to understand them at all
Being able to fetch user info based on ID also allows people if they really wanted to just try random ids until they get people, and now they have a list of people they can attack without actually sharing a server with them
Little far fetched
π very
but still a possible outcome if people wanted to waste their time
You would just get those IDs from a server if that was your goal
Well, can bots even send direct messages to users that they share no mutual servers with?
users can too
Sure, but my point being is that you don't have to
Why would you not want to?
It depends on their account settings AFAIK
For the exact reason I specified above.
It takes what, 60 seconds to make a discord account?
You'd make an alt and join
Sure you can go into servers and get user ids, but now there is the possiblity you get banend from those servers
Not anymore
For collecting ID's?
you dont even have to join too, previewing a server is valid
Discord now bans accounts after a few minutes without a verified phone number
π
if they immediately join servers
I have like 6 alts, I've never run into that
It occurs if you join way too many guilds in a short period
I obv dont have an extra phone number
Which a lot of scam accounts do
Wait so it's enough to join a single guild to get suspected?
π I mean, it would take quite awhile to collect IDs even with a modified discord client or userbot right?
Sometimes
It'd be slightly faster than just trying random ids tbh
Yes as long as you know how ID snowflakes work though
yeah, but you'd be taking time between joining servers was my point
You can spread the generator across multiple processes
For Discord
whereas making accounts, getting ids / dming users gets. you banned if you dont have a verified phone number on a new account
those scam accounts join a hundred servers most likely
and just dm people
thats why the yare always giving you links to discord servers or emails
If your goal is to collect random IDs you wouldnt have to join a ton of servers, or have a ton of alts.
A couple dozen servers is all you need to get millions(if not hundreds of thousands) of real user IDs
because they will get banned shortly after
Sure
My only point is
the possiblity of it being there is the problem
Like Baicon said
if all you want to do is verify the user exists
you don't need their id,discrim,flags,username, etcetc
Now I know the reason they provide that information is because its also used to fetch users in guilds to
That will always be a problem because of response headers.
Even if discord denied access to that information, they're still going to give a 403 header, not a 404.
Anyway, this conversation has drawn out long enough. Food is here I gotta eat
Fair enough
Honestly time to make a Discord User List /j
Lol, get in contact with restorecord
So it goes through the global cache to fetch guild members?
they'll help
restorecord?
The one that sells user data or whatever it was
Sorry I misunderstood the sentence
I intentionally avoid badges
I see, well thanks for helping me.
The error automatically fixed itself and bot stopped going offline after 1-2 hours.
Well worse than a bug is a bug that fixes itself, but eh it appeared out of blue by itself too so could be anything.
Just hoping to not face such problems in future, if I do then you'll see me back here.
Also going to implement the on shard error function just incase it ends up being useful to dignose later on
Well, is it normal that it sounds way too complicated to create a dashboard with a simple design even tho I've worked with 3 programming languages so far? The point is that I've not worked with CSS and HTML, especially besides with JavaScript at once
The first time it feels like a lot. The second time it feels complicated.
The third time you wont think much about it.
I wouldnt use just html and css and JS though, I'd look into a framework.
JS itself is fine, just a framework for JS will help.
Oh my bad, framework
Svelte, react, nextjs, vue.
html+css ftw
just html and css, nothing else π
yup
sounds like an htmx user
Would it work to use one of these in order to accomplish creating a dashboard?
Yeah.
I use nextjs, its extremely powerful
Any one of those will do fine.
React is the most popular
Nextjs I think is next, but Nextjs is just react with some stuff to make it easier.
And with these frameworks I would be able to design a functioning dashboard/site right?
It sounds really useful ngl
react is like the base layer
nextjs, vite are all extensions and are usually the actual servers
i think vite is just a server
nextjs has a lot of extra stuff making it a plain production ready thing
and svelte is the weird cousin nobody talks about but is actually a genius
LOL
Ima be real
Web Dev is the area a lot of new devs avoid
so don't be embarassed or afraid that you are different
Even some veteren developers avoid web dev
Its a handy skill to have, and puts you in leagues with full stack developers, but its perfectly fine also not doing it if you really don't want to
Thank you π
Well, it's normal tho(ugh)
But I think it's a major plus to have a dashboard for my bot
Indeed
Instead of having slash commands with 5 options, it's less complex to manage things like this
Top.gg uses nextjs(don't let the issues we've had in the past make you think it's bad, the issues were not nextjs related)
Because at the end of the day, we all are with new things
Aw thank you
If you aren't uncomfortable trying something new then we might start questioning if you're not insane /j
LOL
Something I myself recently learned after 7 years of programming
Well, indeed I always get stressed when I hear brand new things that I have to undersatnd of
Is its okay to be uncomfortable in the world of programming, more so CS
Being uncomfortable just menas you dont quite understand it yet, and that uncomfortable ness goes away once you start actually diving in and learning
The worst thing in web dev is the beginning.
Then one day it just clicks
Even then, you can be a veteren programmer, know the ins and outs of web dev, but therei s always something new to learn
That uncomfortable feeling never truly goes away, it just becomes more apparent that its not a bad thing.
That part never stops.
I'm excited for the next 3-4 years, there's been a few things that are getting released on browsers in the past few years.
You won't always understand something from the get go
its how you move forward is what matters
Im the prime example of that tbh
I've been programming for 7 years, and recently I started feeling more and more uncomfortable. I know the syntax, I know how the langauge works on the surface. What im doing works. The thing that bothered me is how did it work, why was it working, how do these things together make that outcome or how do I put what I know into a solution.
I decided to take a step back from all my projects, and focus on what I didn't teach myself (because I am fully self taught)
I really appreciate for telling those, as I've been having the uncomfortability for around like a year, especially while searching about AI, because I understand how it works but I have no idea how it's programming worked
Yup!
And there aren't really too many sources to take a look at in order to see how it's programming works, all I know is the libraries that are used widely to create AI projects
one sec
Right so I don't know how much time you want to spend
But what I decided to do was take a intro to CS course through harvard x edx
It's been helping me bridge the gaps in my knowledge and allow me ot think about programming differently
It is 100% free
The only paid thing is the cert at the end if you want it
Which honestly are useless
math
lots of it
Wow thank you so much
i learnt them last semester
now i forgor π
all the lectures, sections and notes are free to download
Im currently going through their CS50x course (intro to cs)
Its been an eye opener and has allowed me to apply my knowledge in different ways to produce more efficient outcomes (albeit still not the most efficient due to how new I am to this way of thinking)
It's probably such a helpful thing, tho it takes time to realise it
Like it took me long to acknowledge that I've been using JavaScript and that I never understood it, I was just using it to develop a bot
And it was nothing but Discord.js knowledge, as I was also using bot templates (which I still do to avoid time I spend), but I keep trying to learn it in a deeper way
https://hatebin.com/mnqrusuayn this code I wrote for one of the problem sets, not the most efficient, but I later discovered (through the help of a friend) a more efficient way to write it without loops
int main(void) {
int change;
do {
change = get_int("Change needed (in cents): ");
} while (change < 0);
int coins = 0;
// Calculate the number of quarters
coins += change / 25;
change = change % 25;
// Calculate the number of dimes
coins += change / 10;
change = change % 10;
// Calculate the number of nickels
coins += change / 5;
change = change % 5;
// Calculate the number of pennies
coins += change;
printf("Coins received: %i\n", coins);
return 0;
}`
Honestly I always recommend avoiding templates
Yes they are helpful for quick things
but if you want to actually learn the language avoid it
It will force you to make your own, and discover how to do it
Just know, this channel is here for a reason. If you ever get stuck and need help we are here to help guide you in the right direction.
Don't be afraid to ask for help
Thank you a lot, not to be aggrieved, I've been getting embarrassed for asking about simple things
We all start somewhere
My very first messages in this channel was how to log stuff to the console π
(granted not on this account so luckily no one will ever know the other embarassing things i've asked)
Because I've been shamed in a huge bot list server just for solving a problem on my own, and not responding to people. They assumed I'd have to respond while I was stressfully looking for solutions
Anyone who meets you with hostility are just angry at themselves
π
Some people don't like thinking back to their newbie days
They expect what they had to struggle to learn, you should already know
Exactly, programming is such a complex thing especially for beginners so it's normal to ask "non-sense" questions
Which I found out way too late, getting ashamed in that bot list server had gotten me traumatized
Ahaha
I can't speak for any other servers or anyone else
but you will always be welcome to ask your "non-sense" questions here
How thankful I am
It's pretty much normal though, last year I was asking people how to upload a module on npmjs
If the user hasn't voted, I get this error: Expected the value to be an object, but received string instead
uploading modules is something even I don't know how to do really and i did it twice now

Can we see the full error
not just the message
but the stacktrace as well
And I accidentally uploaded all my computer on that site, but thankfully my WiFi wasn't enough fast to upload them all before I cancelled the progress
Lmao
Where is this coming from
because there should be more than just that
like what line it comes from
right
I feel like programming is one of the only sectors where it's harder to produce something than finding out the idea
50/50
I made the dumb decision to try and start a company with my lack of knowledge

Lol it happens, I also did the same mistake by created a game studio (even tho it was just on Roblox), and I thought it would actually accomplish something with only building and programming
Show the full error please
Not just the message
There should be a bunch of other stuff below it
.setEmoji should be an object i believe
Actually the only thing that could return that error is setEmoji
Its my full console
setEmoji takes in an object
Ah okay
.setEmoji({
id: ...,
name: ...,
animated: ...
})
^
I forgot they made it that way now
iirc you used to be able ot pass in a literal like that
but not anymore
basically just put the topgg in name and then that string of numbers after : as the id
animated is optional
technically they all are but that means you dont have to specify it
also while you are here tim i have a question
https://hatebin.com/mnqrusuayn what is this called talking about how calculate_quarters calls calculate_dimes, then that calls nickeles and so on so forth
Its not really recursion is it?
the way it was defined in the programming language book i was reading to make my own programming language was higher/lower presedence evaluation
@neon flicker oh btw, in case you ever want to check out more courses offered by harvard https://pll.harvard.edu/catalog
Oh wow
iirc all of them are free might be some exceptions
I really appreciate it a lot
They offer a lot on different topics
Math, Business, CS, Law, etc etc
Some even combined
CS Law is a thing
CS Business
Basically how to apply cs to law and business
@sharp geyser I think it's true but I still get the same error
I 100% recommend checking out the CS50x course though as its an introductory course and will help with all the other CS courses
like how to use CS to avoid the law? interesting...
Ahh
Okay
Sorry
.setEmoji is literally the same
π
They have 507 courses tho on various subjects
they aren't all free tho obviously but there are some free ones
A lot of the paid ones are super cheap tho
Like 30$ is the cheapest ones
π
It's true?
its not recursion since there is no circular calls
its pretty much just function stacking
icic
or function call nesting
name should be a string
I'm stupid...
also you dont have to specify animated if you dont want to
its optional and defaults to false
id also
^
you know about the error "maximum stack size exceeded"?
appears in a lot of languages
not really
also in js
Havent ran into it much
its literally when you reach the limit of functions inside functions
icic
each function call is piled on top of the stack

I notice this method is used a lot tho in some application forms
is it inherently bad?
its not bad, as long as it doesnt get too big
functions inside functions basically create a situation where the code cannot continue until the inside of it finishes
each function call gets added on top of the stack
and then when the final funcion call is reached, it then starts resolving the values from the top until it returns to the bottom
thats basically where the function overhead comes from, and why its a tiny bit slower
although compilers will often inline functions for you so it doesnt really matter
function inlining = copying the body of the function and replacing the function call with it, eliminating the call
The famous βstack overflow errorβ
Itβs where SO gets its name
Ah
thats what that is
waffle
check out my C code for the problem sets
its top tier (not really)
https://hatebin.com/mnqrusuayn is my most recent one
#include <cs50.h>
#include <stdio.h>
void print_row(int spaces, int row);
int main(void)
{
int n;
// Grab input from user only accepting numerical non-negative values
do
{
n = get_int("How big do you want the stairs? ");
}
while (n < 1);
for (int i = 0; i < n; i++)
{
/**
* Iterations:
* 1. n - (0 + 1) = 5
* 2. n - (1 + 1) = 4
* 3. n - (2 + 1) = 3
* 4. n - (3 + 1) = 2
* 5. n - (4 + 1) = 1
* 6. n - (5 + 1) = 0
*/
// Print bricks with the spaces being `n - (i + 1)` (see above) and bricks being `i + 1`
/**
* 1. i + 1 = 1
* 2. 1 + 1 = 2
* 3. 2 + 1 = 3
* 4. 3 + 1 = 4
* 5. 4 + 1 = 5
* 6. 5 + 1 = 6
*/
print_row(n - (i + 1), i + 1);
}
}
void print_row(int spaces, int bricks)
{
/**
* This for loop handles printing the spaces based on the formula made in the first for loop.
* It makes sure to take into account the number of bricks placed down during the iteration and minus it by the total rows to be made.
*/
for (int i = 0; i < spaces; i++)
{
printf(" ");
}
for (int j = 0; j < bricks; j++)
{
printf("#");
}
printf("\n");
}
here is another
π
Solid
I wish I could find out a better way to do that one
cuz ik I dont need 3 loops for the printing of the stair
Iβm not a huge fan of C because it can get tedious but itβs definitely a good language to learn
Well, I think I should've learned of HTML before attempting to use Next.js
Oh definitely
you will be using html
Yep, because I just have no idea how to design a proper site for the dashboard
its possible to use printf in a way that will repeat the characters for you, but idk if you're allowed to do thatg
HTML is the structure of the website, itβs like the bones in your body. CSS then makes the structure look good
Yes, it's nothing urgent
I mean
Im sure its not disallowed
they said you can use previous knowledge
just note if you ask for help someone may not know what you are doing
π
Im interested though
How would you?
HTML is the bones, CSS is the skin, hair, teeth etc etc
basically everything that makes you you
Yes, but what I'm especially confused with is changing the structure depending on the information after https://url.com/...
Although nothing unlearnable, I will take my time on it
That uses dynamic routing
printf("%*s",paddingSize,"MyText");
Next.js usually handles routing for you, I believe there is a quick start guide that teaches you how to use routes and such
π
Woah wtf
Ima try that out rn
Yes, but I think learning HTML is a better start
it means get the number from the next argument
that's routing, the server matches the path to a matching resource, eg. html file
you can do more with verbs as well
That definitely possible yes, but it bugs out a little
hm
there we go
adding 1 to it works
#
##
###
####
#####
######
Yes, but I think I have lack of HTML knowledge overall, so I think I better start off with learning HTML


