#development
1 messages · Page 144 of 1
not work
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
nvm
Oh, seems like node-gyp is specifying the -c CLI flag which tells the compiler to not do any linking, so it ignores -fuse-ld=lld
Yep, LD flags is the correct one
ok so this is performance with all the flags enabled
CC='/usr/bin/clang-16' CXX='/usr/bin/clang++-16' GYP_DEFINES='clang=1' CFLAGS='-pipe -Ofast -flto' CXXFLAGS='-pipe -Ofast -flto' LDFLAGS='-fuse-ld=lld' JOBS='max' npm rebuild sweph
this is performance with all defaults (gcc O3 without lto)
about 15% difference i guess
not bad
Heh yeah, it's generally not gonna make that big of a difference but sometimes it will
yeah, napi is my biggest problem most likely
but still, anything counts
now im gonna check what actually made the most difference between clang, lto and Ofast
this is clang without Ofast and without lto
gcc with Ofast and lto actually made it worse lol
Yeah GCC is not good at that
yeah so what actually makes a difference is clang + Ofast
lto makes no difference nether in gcc nor in clang
Ofast makes no difference in gcc, but it makes a lot of difference in clang
however im not sure if i should be using Ofast, since this lib is pretty much 99% math
what are the risks of introducing some weird calculation bug due to Ofast?
can Ofast actually cause math to return incorrect results?
can you use oauth without a website
oauth requires web requests if thats what you're asking
do you know what oauth is?
40%
but do i need a website
i think you can make a gui in java swing
all the cool kids are doing that
if you mean using someone's Oauth2, for example Discord's, Google's, etc... then probably yes
if you mean creating your own Oauth2, then no, you can use it for anything
bru
but i don't want to make a website
Yes
https://simonbyrne.github.io/notes/fastmath (I don't know if you've read this already but linking it anyway)
Why do you want oauth?
This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components
You should try Clang's -O3 and see how much difference it makes compared to -Ofast
bc i need it to access some user data
but i do care about differences of something negative turned into something positive or vice versa lol
At the very least you need a button of some sort connected to an API
Regardless, you should try -O3 (of Clang) over -Ofast, see if it makes a big difference in performance
yeah it does, from ~9500ms to ~8700
Hm? Is the first one -O3 and second -Ofast?
ye
Then I suppose you can use -Ofast but I'd recommend doing multiple tests to see if it causes issues or not
huh
the whole thing is too big to test everything
I mean the parts you use
well, its an api, meant to be used by other people
it does mathematical and orbital calculations for any date/time/location over a period of 30k years
impossible to test everyting lol
Definitely not everything, I meant like doing a couple tests with and without -Ofast to see if the results differ
ye i can test that i guess
gonna have to come up with a basic test suite
unfortunately node's test runner is too limited
im gonna have to use a third party testing lib
Limited in what way?
actually not the test runner
the assert module
there are many test cases where assertion is difficult
for example assert that something is of type, or that array/object includes something or is of a specific structure
but well, i guess it was made for checking things with js first and then assert some boolean result
Well that's pretty much how assertion stuff works in most programming languages
yeah
i used jest once on a different project and it could do some pretty advanced assertions
for example
expect(result).toEqual({
code: 200,
data: expect.arrayContaining([{
titulo: expect.any(String),
conteudo: expect.any(String),
lista: expect.any(String),
id: expect.any(Number)
}])
});
the equivalent using node's assert would be something like this i guess
assert(typeof result === "object");
assert(result.code === 200);
assert(Array.isArray(result.data));
assert(result.data.every(x => typeof x.titulo === "string" && typeof x.conteudo === "string" && ...))
...
back to the clang thing, i forgot i had my bot running on the same server
i upgraded to debian 12 and restarted the system, and didnt notice my bot went offline lele
for some reason it didnt run at boot
how can i generate an oauth url
spotify api
so you want to login via spotify via oauth?
yes
can i make oauth work with express
why wouldnt you be able to
how do i
and cus it's not working
🙁
ReferenceError: localStorage is not defined
you wrote client code on the server
huh
or is that error on the website
it's coming from my code
localStorage doesnt exist in nodejs
🗿
hey
nvm
ayo
i did it
w
what does expires_in mean
oh ok
whats the point of that?
if i can just get it again with refresh token why not make it last forever
also, is that seconds?
look at docs
where
guys i need help how can i link spotify accounts to discord accounts now
a message can only have an embed or content right? not both
it can have both
?
it can have both
wym
in the same response?
yea
like i could @mention people in the content to ping them and then have my normal embed message
noice
⁉️
One message removed from a suspended account.
One message removed from a suspended account.
no
One message removed from a suspended account.
i want to connect discord account to spotify account
One message removed from a suspended account.
One message removed from a suspended account.
bruh
not like that
through my own application
for the purpose of
knowing someones spotify account
One message removed from a suspended account.
One message removed from a suspended account.
bruh
i wanna know someones spotify account
throughh my bot
One message removed from a suspended account.
i already have that
One message removed from a suspended account.
but
One message removed from a suspended account.
i don't know how to connect the spotify data i get to their account
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yes BUT
I CAN GET DATA FROM SPOTIFY
FROM ACCOUNTS
but how can i LINK SPOTIFY ACCOUNTS
to DISCORD ACCOUNTS
One message removed from a suspended account.
SO I CAN SHOW THEIR DATA
AND SUHCH
ETCETC
i have an idea i think
i'll append their id at the end of the url
but i think that could be a security risk
filter it then
wym filter it
does discord give us the timezone of each user?
no
but you can get their language through interactions
thats about it
using oauth
thats the only way
you can get their current song through presence if they have that enabled
but only other way is using oauth, then fetching it from the response
wdym
i am already using spotify oauth
what's a good global datetime format?
for humans
how do you do iso with an offest?
that means that everyone needs to convert to UTC
the standard is actually PST
that's what the S stands for
i only ever see GMT+1 GMT-4 etc
same
the first reason is usa #1
makes sense
that's still GMT
broken
i will try to fix this
I don't want to make an entire website
GMT shouldn't be the standard anymore
do you think inputting a relative time would be less annoying than trying to put in a time with timezone. also m/d/y vs d/m/y needs to be handled
why don't u just put their local timezone
a relative time would be much simpler for everyone. right?
no
some people will get confused
just put it in their local timezone
r u making a website or bot?
2 day 5 hours 30 minutes. vs 7/3/2023 1:32am -7 timezone
should i force them to use a 24 hour clock
too many possible mistakes
why
first one if it's a week or closer
second one if it's longer than a week
i think that's best
but i don't think you should put it in one timezone cus it will be confusing
ik that confuses me sometimes 😔
because they're lazy
it's on their little
roadmap thing
but who knows when or if they'll actually add it
yeah it says only date picker here
this was also last updated over a year ago
it's a bot command. host a lobby that is scheduled to start at a certain time
well if it's going to be displayed on a bot just use discords message formatting thing with timestamps
so it shows in everyones local time
/host_event starts_in: 2 days 4 hours 30 minutes
the person inputting the command needs to indicate when the event starts
oh
theres a good little package for that
nice
that one works well, it works with quite a few formats
like full words and shortforms and stuff
mr big bun showed me it
but
people could send someone a link to my login page with their id
have the person verify then they will get access to their Spotify account
😵
I don’t think I understand what you’re attempting to accomplish
I want to link a Discord and Spotify account through my bot
How would you even facilitate the access of someone’s Spotify account if you yourself don’t even know their credentials?
because they would be giving my bot access to their Spotify account through OAuth
But that requires them to login? I don’t see how you could give away credentials to someone’s account like that
Perhaps try explaining your goals/process more clearly
I can’t keep playing this guessing game
It wouldn’t give away their credentials however they would be able to manage the persons Spotify account through my bot
so they could delete playlists and such
^^^^^^^^^^^^^^^^^^^^^^^^^^^
I did
You did not
ok let me explain
my bot will send a link like this for a person authorize their spotify account through OAuth: http://localhost:3000/login?id=307307861032304652
(I will append their ID to the link so I know whos discord account it is)
but someone could for example, take their discord Id and put it in the link like this: http://localhost:3000/login?id=173489654144696320
and if a person were to authorize their Spotify account with this link, it would give the person whos ID is in the link access to their Spotify account through my bot
is this explained enough
ok so, if u dont want the id to be visible, use a post request
then use oauth for both sides
that is, spotify and discord
so...you don't want to use the only way of ensuring it's the correct id
what difference does it even make?
oauth2 is oauth2 regardless of the service
i'm not making a fully fledged website
the same handler u use for spotify can be used for discord
never told u to
u can chain oauths
are you sure
why wouldn't u be able to?
just do the first oauth, store the result somewhere, then redirect to the other
it'll be annoying to the user yeah, but that's the price u pay for not wanting to do it the proper way
what's the "proper way"
a site
You’re not good at making anything my man 💀
and never will be
the only way to become good at something is doing that thing
i am:(
I tried
it didn't work
so I quit
that's why ur bad
If I don't see results there's no point in doing it
it's a waste of time
knowledge is a result
it's not
cus i gained no knowledge
for the 1 day i tried makign a website
I failed my first calculus test
Horribly
47/100
I finished the year with a 98% in the class
You just have to go again
Nobody learns without failing a few times
The greatest minds of humanity go through many stages of trial and error
imagine battle stranded on an island
Einstein didn’t wake up one day and instantly guess everything about the universe
tries to make fire -> fails -> dies from hypothermia
Looks like mantine
Because you didn’t try
I made a shitty site at first, I still suck at frontend, but I tried a little and made a decent looking site
I never finished it but that’s due to other issues
bruh i did
If that’s you trying then dear god I don’t wanna see you not try
You probably spent 20 minutes reading code off the internet and then gave up when you couldn’t center a div
Not when you’re doing it for the first time
20 minutes is tiny in the grand scheme of things
20 minutes is a third of one class of my introductory CS class in my junior year
…a class which I attended more than 170 times that year
20 minutes really isn’t much time
That first class day I’m pretty sure we learned nothing about programming
no
ok
If you think you’re gonna be an expert in 20 minutes (you probably do with how arrogant and naive you are) then you’re delusional
i don't
but it's too hard
Average tiktok user
and that's worrying
i bet you've both used tiktok
I haven’t ever installed it but I’ve been sent videos that I’ve watched
you don't have instagram?
However I don’t watch it like the average user does
nope
💀
why would I even install it?
third person in existence to not have instagram
what tutorial do i need to watch to make a website
One on web development
💀 bro thinks there’s a tutorial for everything
That’s your problem
You rely on tutorials too much
And spoonfeeding
bro I need somewhere to start from
Your status 😂
Learn the basic syntax and such with tutorial websites sure, but you need to write your own code to learn
When you encounter a problem, you look it up
what is the formula? is this better?
that will teach me the basics
just use the package I sent
it already does what i want
then why edit it
because i was shamed
much better yeah, but u can remove the plural
just append (val !== 1 ? 's' : '')
don't think you'll reach millenia
i will
what’s millennia
well, then u do need a plural field
better to be prepared
my guy
you will be well done in a thousand years
I don’t think you need to plan that far ahead
i can use it to reference something in the past
some historical event
and use my little function
perfect
what event do u need to reference from a thousand years ago
that’s relevant to gaming
do you have a moment to talk about our lord cheesus christ?
Spartan games of course.
don't forget decade, century, era and eon
w3schools, mozilla institute, codecademy
please send links
☹️
One message removed from a suspended account.
also start with the damn html
which one do you recommend the most
era and eon aren't really well defined
Integer.MAX_VALUE
era is either BC or AC
⁉️
before cheesus?
planck is a thing?
oh
no nanos
does js have nano?
i guess something else could send in nano time
1 nano is a millionth of a second iirc
billionth
but what should i do for datetime input? a relative datetime will be easier right?
why not allow both
because i want it to be simple
no confusion
/schedule_event start_time: 2 day 3 hours 10 minutes
vs
/schedule_event start_time: 7/3/2023-10:55pm -7
what format would you use for?
bottom
what if someone wants an exact time / date
it will be difficult to achieve with top one
mm/dd/yyyy-hh:mm[am|pm] -timezone
they do a little bit of math
ezpz
people love math
first
don’t listen to kuuhaku
with that it is difficult to have an exact
either both or second
👍
kuuhaku is is confirming what i think so they are right
😐
u can also use both, just have 2 different params
start_in: and at:
so they can use start_in: 30 minutes or at: 02/07/2023
that might be confusing to have both
they would both need to be optional
maybe two different commands
or both
that's a good idea
they wont mess up this way
it was in datamining iirc
who knows a good website making guide
what’s this
how'd you even understand his question
this is not a guide
lol
how
what is vercel
the best website hosting company
jinx
or everything at once
i don't want a handicap
then don't use a guide
try out sveltekit
you'll have fun
all the cool kids are doing it. shouldn't you do it too?
no
docs are not good for learning
no
yes
setup a vercel account to get started
step 1
create account
vercel is so awesome
best dev environment for websites
do you know react?
no
you should use sveltekit then
whats sveltekit
it's a framework for building websites
like react?
whats the difference
everything
is it easier
yeah, much simpler

what
nextjs is for react. sveltekit is for svelte
both are hosted on vercel
vercel created next.js btw
i don't want to use vercel
vercel is too good for you?
huh
i understand
vercel is a handicap
vercel is the gold standard
the only handicap is your mindset lol
vercel would make it too easy to build a website and learn about web development
battleless wants a challenge
you could even learn about serverless functions with vercel
tbh the best start would be with plan old html
Svelte is much less code to write to accomplish the same thing in React, but the ecosystem isn’t near as developed as the React ecosystem if you’re someone that relies heavily on npm packages. If you’re starting a project now, it’s usually best to choose what you’re familiar with, both will accomplish the same goals.
true or false?
that seems valid
i don't know where
do u know where the "w3" comes from?
look at all the templates that vercel has to offer
no
www
use this one
css is maintained by the w3 consortium
can i use chakra ui with sveltekit
no, that's a react lib
bru
but you shouldn't use chakra ui if you want to learn it yourself
are there ui libaries here
there seems to be this https://github.com/elcharitas/chakra-ui-svelte
i want to make a website
that could work
use vercel
yes
with custom domain?
vercel gives you a free domain to use while testing
🐷
why wouldn't u believe me
porkbun is giving out free .dev and .app domains for 1 year
One message removed from a suspended account.
do you have your vercel account yet?
One message removed from a suspended account.
bro
u want link for free domain?
wait
is vercel a code editor?
nope
isn't it great?
how do i take this test website down
yes
"yes"
42
"42"
i'm just guessing
bro what
did you hook up your github account to vercel yet?
yes
not with science
how i can
i am
clone with git
no
step 1
how do i take down the test website
clone with git
step 1
BUD
clone with git
oh do you want to know how to take down the test website?
step 1: clone with git
...
wait
fudge you
if you delete it then you dont have a project to work with
want to delete it and create it again?
you can delete by going to the project settings and scrolling to the bottom of general settings
😐
open the project with your ide
yes i did
yes
FORTNITE
then open src/app.html
why
'vite' is not recognized as an internal or external command,
operable program or batch file.
FUDGE
vite?
yea
what have you done?
bro
npm install error?
yep, it's pretty awesome
you need to fix it
???
cap
i think it's even commented
cap
yea
dont say cap to me. i never cap
bro it's so slow
mine works
One message removed from a suspended account.
localhost?
what
One message removed from a suspended account.
is it broken on localhost or the deployed website?
or both
and how is it broken
now
i need to make my website
👿
this is the harder part
btw wtf is svelte
is thhis a new programming language i need to learn
ok
that fixedit
it loads so slowly tho
it takes like a second or two to load
kinda weird
The more plugins u have, the slower vscode becomes
once that's done it speeds up
not vscode
the website
Ah, well, that's normal I think
like when i click a letter in this wordle thing
it takes a second or two to register
Ur running in debug environment, so it's deliberately slower
Hm
Release is usually 2-3x faster
A new member here 😉
But not useful at all during development
I still think u should've started with html
W3schools, for the third time
just delete everything and start from a div
W3 are the literal maintainers of css
“I need everything done for me and all the research to be done for me and all the code to be written for me 😢” - battleless probably
Can I change my nickname here ?
💀
(╯°□°)╯︵ ┻━┻
Yet another javascript framework that nobody will ever use™️
What yours ?
there is no need for this complex stuff
-_-
it’s not complex
it is....
You just refuse to put in an ounce of effort to anything you do
Never
Everything is hard when you’ve been spoonfed your whole life
Not with your 20-min effort
10 years * 0 effort is still 0 skills
Considering you can’t focus for 20 minutes I don’t see how you’re ever going to get to that point
I thought you knew everything though
i've been coding for 6 months now but can't make a website
you see how awful this is
i never said this
when did i say this?
Start with the damn html then
Which is literally the entrypoint for web dev
Yes
but use the modzilla website instead
W3 is great for html too
w3schools website looks so bad
but i will not do this right now
Also remember u can test html/js/css on the browser
To see it applied in real time
It's easier than using an ide
where
Just remember not to press F5
Press F12, go to elements
hm ok
For saving simply ctrl S
For html it works well because u can see everything happening without needing to build or anything
Also with 0 delay
I think some editors also have integration with it
Right click, edit as html
oo
i would start off by memorizing all the html doc types
Technically, but not doable
i just stole the w3schools website
W3 uses static pages so u can, but for most sites they use apis and assets that you'll simply not have
that's when you scrape them
I see
some things on the website are weird
when I download it
but for the most part it’s intact
can you do html offline?
Yes
so in theory I could download all the pages for this and learn offline
Simply make a file called something.html
And write on it like any other code file
does JavaScript work offline too
When u want to see the result simply open it in browser
Everything on html works offline as long as u have the files
Actually, all langs do
wow
you need the express written consent from ESPN before downloading their website
why do we need internet then
nuclear war
Because you need to be able to get the files
Without internet you cant access the site files
oh true
no way this dude just asked why do we need the internet
btw guys
Some business use it for having a secure ambient for files
is using my old thermal paste ok?
?
Thermal paste is a silver composite, it doesn't go bad
As long as the tube is properly stored and not punctured
Else moisture might get into it
Or excessive heat
Not under the beating sun 10hrs a day?
yes
U can put a tiny droplet on ur finger and smear it a bit
yes and yes
If it becomes impossible to remove for the next 2 hours then it's fine
(Would not recommend this, pretty toxic stuff p sure)
what
it’s going to stay on my hand?
why would I put it on
Thermal paste really loves sticking to everything
Well yeah it’s essentially tiny particles of metal suspended in fluid
Sticks to everything
apparently tooth paste gets it off pretty well
Old thermal paste is fine to use as long as it’s been stored properly, just make sure you clean off the stuff leftover on your CPU
can I just use some paper towel with alcohol
You'll need to replace it every once in a while anyway
how often
Depends on usage
here's why the internet exists.
https://youtu.be/jZJzNWOY0QI?t=54
I think the last time I replaced it was a little under a year ago
Could go from 6 months to about 3 years
It gets less thermally conductive with time
I gotta replace the thermal paste on my laptop at some point before college, as well as slap linux on it
I also replaced my GPUs thermal paste
ew
why Linux
Bought a maintenance kit a few days ago, waiting for my paste to be delivered
Because performance
Windows sucks balls, I only use it on my home pc because it’s what I’m used to and allows me to play games without issue
For a college laptop I’m not gonna be playing games on, linux is going to be my preferred OS
Ubuntu?
maintenance for what
Yep
does ubuntu have that cube desktop thing?
Notebook maintenance
I'll ignore that
???
Battleless try to use context clues challenge (difficulty first grade)
Cube?
a notebook…

