#development

1 messages · Page 1994 of 1

lyric mountain
#

As in, object properties

#

But static properties work just fine

simple stump
#

okay. tysm

signal thistle
#

ok so I need help with a beginner c++ program

#

i know how to generate a square but I cant figure out how to change the shape

#

and this is what I have so far

lyric mountain
#

Circle can be expressed by a function of sin and cos

#

Triangle has many ways of achieving, and depends on what type of triangle

#

Easiest would be a right triangle

#

Pentagon I have no fckin idea how

#

Not with ascii

night sundial
#

how and where am i getting that?

signal thistle
earnest phoenix
#
export const SQL_TABLE = `
        CREATE TABLE IF NOT EXISTS Users(
            userId TEXT NOT NULL PRIMARY KEY,
            rice BIGINT DEFAULT 10000
        );
        
        CREATE TABLE IF NOT EXISTS Items (
            itemId INT PRIMARY KEY,
            userId TEXT,
            name VARCHAR(21) NOT NULL,
            description varchar(150),
            value BIGINT DEFAULT 10,
            rarity TEXT NOT NULL,
            CONSTRAINT fk_user
            FOREIGN KEY(userId)
            REFERENCES Users(userId) ON DELETE CASCADE
        );
        
        CREATE TABLE IF NOT EXISTS Alliance (
          allianceId    INT PRIMARY KEY,
          name          VARCHAR(21) UNIQUE,
          rice          BIGINT DEFAULT 10000
        );

    CREATE TABLE IF NOT EXISTS Alliance_User(
        userId TEXT,
        allianceId INT,
        CONSTRAINT fk_user
        FOREIGN KEY(userId)
        REFERENCES Users(userId) ON DELETE CASCADE,
        CONSTRAINT fk_alliance
        FOREIGN KEY(allianceId)
        REFERENCES Alliance(allianceId)
    );
        `
#

Sorry for poor formatting.

#

But I read online that using ON DELETE CASCADE on a foreign key will delete that record as well when the parent record is deleted.

#

Do I have to use ON DELETE CASCADE on every table that makes a reference to the parent?

austere surge
#

man the first line

#

its always missing the indentation

earnest phoenix
#

Yea discord fucks up the indentation

#

I can't be asked to fix it

austere surge
#

or you dont copy it right

earnest phoenix
#

Nah I copy it correctly cause it pastes correctly but when hitting send it comes out like that

blissful coral
#

Ooooh new typescript version allows code before super() in constructors

#

Interesting

prime mist
#

Unless you don't use classes lol

earnest phoenix
#

I wonder if it will allow using this before super

cinder patio
#

It doesn't

earnest phoenix
#

😔

cinder patio
#

Code before super() was always a thing in javascript

#

but ts didn't allow it until now

earnest phoenix
#

I see

#

I thought that was the case

rocky hearth
#

How can I compile a single ts test file as sibling js file

earnest phoenix
#

I don't know why you'd want to but iirc you can just use the outFile option

cinder patio
#

you could use ts-node

earnest phoenix
#

does ts node compile stuff?

cinder patio
#

oh wait no

#

You could use the include setting

earnest phoenix
#

you could also use the outFile compiler option

#

iirc that makes your entire ts project compile down into a single js file depending on the name u give it

earnest phoenix
#

oh?

#

did I misinterpret then

rocky hearth
#

yes, I just want to compile a single ts file. Just want to convert some ts code to js equivalent. In node's env

earnest phoenix
#

What

#

do you got an issue

#

no
it's the naming
fuck_user

#

this sounded way more offensive then I meant it to

woeful pike
earnest phoenix
woeful pike
#

look up what migrations are

earnest phoenix
#

alright

woeful pike
#

it's a way of making changes to your database schema over time

#

there are tools that will "version" your database for you

earnest phoenix
#

Do you have any recommended tools?

woeful pike
#

it depends on what you're using

earnest phoenix
#

as in what dialect?

woeful pike
#

I use prisma as an ORM which has its own migration tool

earnest phoenix
#

I am trying to step away from using orms personally

woeful pike
#

nothing wrong with orms rly

earnest phoenix
#

Well yea

woeful pike
#

just don't try to use an orm to solve every single problem

earnest phoenix
#

I just feel like I don't know what iis actually happening under the hood

woeful pike
#

fair point

earnest phoenix
#

I mainly used typeorm in the past

woeful pike
#

super complex

#

you don't need an orm, most js orms just save you writing things out and that's it

civic scroll
#

write raw queries

#

more dangerous and fun creepy_smile

earnest phoenix
#

my raw queries are scary

woeful pike
#

nothing dangerous about it if you just use prepared statements

earnest phoenix
#
    static async update(userId: string, data: Partial<UserData>, client: InteractionCommandClient) {
        try {
            let sqlQuery = `
            UPDATE users
            SET `
            sqlQuery += Object
                .entries(data)
                .map(([key, value]) => `${key}=${value}`)
                .join(', ')

            sqlQuery += `
            WHERE userId = $1
            `

            await client.pg.query(sqlQuery, [userId])
        }catch (error: any) {
            throw new ShogunError(error)
        }
    }

This is how I update things

civic scroll
#

raiden shogun????

earnest phoenix
civic scroll
#

jk

#

i understand nothing

woeful pike
#

yeah that's not a great idea

civic scroll
#

i don't work with sql

earnest phoenix
#

I feel like I should understand a reference here but sadly I dont sayuri

civic scroll
#

i saw my dad writing raw queries and it's a pain to watch

woeful pike
#

if you're gonna do this just use knex

earnest phoenix
#

I looked at knex it looked complex

woeful pike
#

and this isn't complex?

#

plus susceptible to sql injection

earnest phoenix
#

tru

woeful pike
#

usually the idea behind "I'm gonna write raw sql" is that you keep things simple and don't do wacky abstractions like these

earnest phoenix
#

Do you just feed knex sql to create tables or how does tables work with knex?

woeful pike
#

because you're just making your own query builder at this point

earnest phoenix
#

fair point

woeful pike
#

but a strictly worse one

woeful pike
#

you're essentially looking for

knex('users')
  .where('userId', '=', userId)
  .update(data)
earnest phoenix
#

wtf is this

#

Why does this look complex or is my tired brain just not comprehending htis right

woeful pike
#

this is just typescript

earnest phoenix
#

ye ik its ts

woeful pike
#

it's a way of adding your own types to knex

earnest phoenix
#

but I dont see the point of it

modest maple
#

you dont see the point of types?

woeful pike
#

so you can get a typed object back when you query

#

it's declaration merging, you're injecting your own types inside "knex/types/tables"

#

otherwise you get back any for every query

earnest phoenix
#

I see

woeful pike
#

also you don't need to do this

#

it's just a quality of life thing

earnest phoenix
#

I might actually do that then since it would be nice getting typed data back

#

I will look into using knex then thanks

woeful pike
#

ye you're still writing raw sql just in a more convenient way

#

I hate how databases just give you a shitty DSL and absolutely nothing to back it up

earnest phoenix
#

Would I even need helper methods still if I am using knex?

#

Would it just be easier to do all the queries in the instance I am needing it

woeful pike
#

I would still use some kind of repository pattern

#

if you do inline database calls it becomes insanely difficult to make changes like swapping out database providers or doing logging. Learned that the hard way with topgg lol

earnest phoenix
#

I see

woeful pike
#

but also it's more work, so it's up to you

split hazel
#

people still use knex?

marble juniper
#

Wtf is knex

#

don't care enough to look it up

split hazel
#

kind of like sequelize

#

lets you provide a driver and it manages the db stuff for you

#

except the layout is more functional than object orientated

rigid maple
#

Hey! I'm trying to make a discord login system in Svelte. I have not been successful, despite trying every possible way. Can you briefly summarize how I can do it?
front-end and back-end work on different ports

#

I found a svelte-kit about it, but I don't even know what it does or how to use it.

modest maple
#

So svelte-kit provide a very easy to use layer over svelte for developing the frontend and doing things like SSR

#

the majority of the work will be done by the backend i.e all of the oauth flows

#

The only job your frontend is really doing is redirecting the user, storing the computed token and making requests with said token

modest maple
#

Svelte-kit is to svelte what NextJS is to React

rigid maple
modest maple
#

okay, well that just means that the oauth code you've given to discord to exchange for an access token is invalid

#

codes are one use and come with an expiration of about 5 minutes

rigid maple
#

I'm really confused trying to do this

#

When I log the user in the back-end, it gives me the values (e.g. username, tag, guilds...)

#

but it gives an "invalid code" error in the front-end

modest maple
#

pithink Why are you making requests to discord from the frontend

rigid maple
#

I am confused. Should I enter the back-end port as the redirect_uri?

#

Or should I enter the front-end port?

#

I'm using translate, sorry

quartz kindle
#

there is no such thing as front end port?

rigid maple
#

no, i can't do this, i'll quit

quartz kindle
#

lmao

green kestrel
#

first world problems.... stripe had £90 off me this last month

onyx socket
#

how do you show a webpage in the bot's top.gg page

hasty mulch
#

Can someone help me update the syntax on this?

{"embeds": [{
"title" : "<<<{{Title}}>>>",
"url": "<<<{{PostURL}}>>>",
"thumbnail": {
"url": "<<<{{ImageURL}}>>>"},
"color": 2226949,
"author" : {
"name" : "/u/<<<{{Author}}>>>"},
"description" : "<<<{{Content}}>>>"},
"footer": {
"text": "/r/Amtrak | <<<{{PostedAt}}>>>"}
] }
boreal iron
#

Looks like you’re missing a } at the end of your array

#

But it’s like impossible to see on mobile

#

I see one bracket closing the footer but another one is missing closing the embed object

solemn latch
#

Well the embed is being closed, just early before the footer.

rigid maple
boreal iron
#

Still

#

I see one bracket closing the footer but another one is missing closing the embed object

#

Also wrong

#

Inside the array not outside

solemn latch
boreal iron
#

Well it doesn’t need to be a valid JSON format at all

#

Object keys can be passed without " quotes

solemn latch
#

I dont think this is a js object

boreal iron
#

It is

hasty mulch
#

Ok, got it working again. But is there a way to get it to where if there's no image, the thumbnail url doesn't get used?

solemn latch
#

It was implied when this was discussed yesterday they are making an embed object direct 🤔

boreal iron
#

Yeah just referring to past discussions

hasty mulch
#

The discussion I saw made no mention of how to get the webhook to skip over the thumbnail if None are present

solemn latch
#

Using what?
Python still?

hasty mulch
#

No, JSON

#

This is all JSON

solemn latch
#

I dont think json has that supported directly.

hasty mulch
#

Ok, no big deal then

boreal iron
#
{
    "embeds":
    [
        {
            "title" : "<<<{{Title}}>>>",
            "url": "<<<{{PostURL}}>>>",
            "thumbnail":
            {
                "url": "<<<{{ImageURL}}>>>"
            },
            "color": 2226949,
            "author":
            {
                "name": "/u/<<<{{Author}}>>>"
            },
            "description": "<<<{{Content}}>>>",
            "footer":
            {
                "text": "/r/Amtrak | <<<{{PostedAt}}>>>"
            }
        }
    ]
}
#

oh lmao it is JSON?

#

fuck me then

whole knot
#

Is there any guide on how to implement CSS to the bot page?

hasty mulch
boreal iron
#

there you go

#

Obviously it was JS

hasty mulch
#

By the way, dropping the thumbnail part KEKW

dense brook
#

just make it in Brainfuck it's alot more fun

boreal iron
#

When using an accurate indentation you will be able to see when missing brackets etc.

dense brook
#

XD

hasty mulch
boreal iron
#

wdym, syntax highlighting?

hasty mulch
#

Ye

stiff dust
#

hi

#

is there any way to this in shorter style ? or i need to write if statement for each one ?

boreal iron
#

Why do you need to chain the statements?

#

Just chain the conditions

stiff dust
#

wdym ?

boreal iron
#

if(guildData && guildData.BansChannelID && …

#

Oh I see you changed this

#

I was referring to yesterday lmao

#

To this:

stiff dust
#

well thats for more than 1 schema

#

now i have one schema

#

so i want if for example some one delete ban log channel bot change the BansChannelID to null and save it i want to know is there any way to do it shorter or i need to create if statement for each channel ?

quartz kindle
#
if(guildData) {
  if(guildData.BansChannelID === channel.id) { guildData.BansChannelID = null; }
  if(guildData.ChannelsChannelID === channel.id) { guildData.ChannelsChannelID = null; }
  if(guildData.EmojisChannelID === channel.id) { guildData.EmojisChannelID = null; }
  guildData.save();
}
#

another option```js
if(guildData) {
const channels = ["BansChannelID", "ChannelsChannelID", "EmojisChannelID"];
for(const c of channels) {
if(guildData[c] === channel.id) {
guildData[c] = null;
}
}
guildData.save();
}

#

another option

if(guildData) {
  ["BansChannelID", "ChannelsChannelID", "EmojisChannelID"].forEach(c => {
    if(guildData[c] === channel.id) {
      guildData[c] = null;
    }
  });
  guildData.save();
}
#

or if you wanna simply further

if(guildData) {
  ["Bans", "Channels", "Emojis"].forEach(c => {
    if(guildData[`${c}ChannelID`] === channel.id) {
      guildData[`${c}ChannelID`] = null;
    }
  });
  guildData.save();
}
marble juniper
#

That formatting doe

#

Defenitly not the formatting I would do lol

quartz kindle
#

you would do this ```js
if(guildData) ["Bans", "Channels", "Emojis"].forEach(c => guildData[${c}ChannelID] === channel.id ? guildData[${c}ChannelID] = null : null) && guildData.save();

sharp saddle
#

someone help me

#

how do i make the text close to the img element?

sharp saddle
stiff dust
sharp saddle
#

giant code, just to save data

marble juniper
sharp saddle
#

oke

#

wait a second

quartz kindle
stiff dust
sharp saddle
stiff dust
atomic kindle
#

Yandere dev?

marble juniper
#

tim do you even use a formatter lol

quartz kindle
sharp saddle
#

@marble juniper

marble juniper
#

My formatter wouldn't allow anything of what ur doing

#

lol

quartz kindle
#

im typing directly on discord

#

using the tabs they provide

marble juniper
#

I see

stiff dust
marble juniper
#

I just slap code into vsc and copy paste it here

quartz kindle
#

nah

marble juniper
atomic kindle
marble juniper
#

Yeah I was gonna say that

#

why do you define the width manually lol

stiff dust
# quartz kindle add an exception for those

amm but before the remove it whats your suggestion for those they are exact the same just different ids so users can set 3 different channel whats your idea about create a collection for those ?

quartz kindle
marble juniper
#

You should rather use a class for that

quartz kindle
atomic kindle
#

Or not define width in a grid at all. Unless of course, you wanna say fuck responsive behaviour.

marble juniper
#

fuck responsive my site runs at 2fps

#

jk

stiff dust
marble juniper
stiff dust
lyric mountain
marble juniper
#

No

#

Im not the one helping u

#

lol

stiff dust
#
MediaChannelID1: { type: String, default: null },
MediaChannelThread1: { type: Boolean, default: null },

instead of this...

quartz kindle
#

why not js MediaChannels: { type: array, default: [] } and then add each channel as { id: string, thread: boolean }

stiff dust
#

tnx

#

so this way we dont need

                if (k.startsWith("MediaChannelID")) {
                    guildData["MediaChannelThread" + k.slice(-1)] = null;
                }

too

quartz kindle
#

ye

stiff dust
#

but we cant use null for an array can we ?

quartz kindle
#

you would need to do something like this instead ```js
if(k === "MediaChannels") {
guildData.MediaChannels = guildData.MediaChannels.filter(c => c.id !== channel.id);
}

#

or use splice with findIndex for better performance

quartz kindle
#
guildData.splice(guildData.findIndex(x => x.id === channel.id),1)
stiff dust
quartz kindle
#

yes, that way you dont need to create ID1, ID2, ID3, etc

stiff dust
#

brb

atomic kindle
sharp saddle
#

oke

#

thanks

#

^^

stiff dust
#

so first lets do another one

#

i have 3 auto thread channel

#

if i save them as AutoThreadChannels

#

what should i do instead of this :

    if ((guildData.autoThreadData1 && guildData.autoThreadData1 === message.channel.id) || (guildData.autoThreadData2 && guildData.autoThreadData2 === message.channel.id) || (guildData.autoThreadData3 && guildData.autoThreadData3 === message.channel.id)) {
      if (message.channel.permissionsFor(message.guild.me).has(["VIEW_CHANNEL", "CREATE_PUBLIC_THREADS"])) {
        await message.startThread({ name: `${message.member.displayName} Comments`, autoArchiveDuration: 1440 }).catch(() => null);
      }
    }
#

just for check...

#
    if ((guildData.autoThreadData1 && guildData.autoThreadData1 === message.channel.id) || (guildData.autoThreadData2 && guildData.autoThreadData2 === message.channel.id) || (guildData.autoThreadData3 && guildData.autoThreadData3 === message.channel.id)) {

i want to check if message channel is one of the 3 auto threads...

boreal iron
#

I can't learn JavaScript

Then learn something different

sudden geyser
quartz kindle
quartz kindle
#

you need to check how your db's typing works to make it properly

stiff dust
#

ig mongodb supports type script

sage bobcat
#

One message removed from a suspended account.

quartz kindle
stiff dust
#

ammm

#

Tim

#
if (guildData.AutoThreadChannels.find(c => c.id === message.channel.id) && message.channel.permissionsFor(message.guild.me).has(["VIEW_CHANNEL", "CREATE_PUBLIC_THREADS"])) {
  await message.startThread({ name: `${message.member.displayName} Comments`, autoArchiveDuration: 1440 }).catch(() => null);
}

i can do this for auto threads cause there is only one object in array and thats id

but for media channel there is 2 object

  1. id 2. thread state that return me a boolean
    what should i do for that the code is something like this rn:
if (MediaChannel1) {
// Do This
   if (MediaChannel1Boolean) {
   // Do This too 
   }
}

And same for media channel 2 and 3 but if save all the data in 1 array how can i check both ?

quartz kindle
stiff dust
#

ok tnx

earnest phoenix
#

How can i check if one of the servers overloading my client?

lament rock
#

you can metric requests per minute per guild

lyric mountain
lament rock
#

maybe also add an arbitrary system where you weight commands/event handlers are having a certain impact against your bot's performance

#

can sort by usage and weight

earnest phoenix
#

Idk why but my bot has ping alot

#

And i couldnt find the which server caused that

lyric mountain
earnest phoenix
#

Overload server was banned when this happened before

lament rock
#

yeah. Just sending a message is no problem, but image manipulation is another thing

stiff dust
#

hi there is different choice for my log setup
i want for example if the choice was message set channel id for data.MessagesChannelID

const log = { 'Messages': 'MessagesChannelID', 'Join & Leave': 'JoinLeaveChannelID', 'Ban & UnBan': 'BansChannelID', 'Timeout & UnTimeout': 'TimeoutsChannelID', 'Kick': 'KicksChannelID', 'Voice State': 'VoicesChannelID', 'Member Roles': 'MemberRolesChannelID', 'Member Nickname': 'MemberNickNamesChannelID', 'Server info': 'ServerInfosChannelID', 'Server Channels': 'ChannelsChannelID', 'Server Threads': 'ThreadsChannelID', 'Server Roles': 'ServerRolesChannelID', 'Server Emojis': 'EmojisChannelID', 'Server Stickers': 'StickersChannelID' }

so i write this and log[logChoice] will return MessagesChannelID for Messages
but i need data.MessagesChannelID so what should i use ?? data.log[logChoice] or data[log[logChoice]] or something else ?

lament rock
#

You either need an enum or a way to reverse K, V to V, K where V becomes K and K becomes V

#

assuming you understand K, V in { [key: K]: V }

stiff dust
#

wait

#

what

#

😂

#

i didnt understand anything

lament rock
#

You're trying to take the value the user sends and get they key of the Object right?

stiff dust
#

yes

lament rock
#

Do you know what an enum is

stiff dust
lament rock
#

It's Object where it has its original K, V pairs and also those pairs flipped on the same object

// not enum
{ 1: 2, 3: 4 }

// enum
{ 1: 2, 3: 4, 2: 1, 4: 3 }

stiff dust
#

okay

#

but how this is my answer ?

stiff dust
#

also the object after : should be in string or there is no different ?

#
const log = { 'Messages': 'MessagesChannelID' } 
const log = { 'Messages': MessagesChannelID }
#

which one ?

quartz kindle
#

without quotes its a variable

quartz kindle
stiff dust
#

log[logChoice] return MessagesChannelID

quartz kindle
#

yes

#

but you're saving guildData

#

not data

stiff dust
#

i know

#

i need to change it

#

ignore second line

quartz kindle
#

then its correct

stiff dust
#

tnx

stiff dust
quartz kindle
#

thats called a dynamic key, you need to use [] for dynamic keys

#

{ a: 10, [variable]: 20 }

stiff dust
#

like this ?

quartz kindle
#

yes

stiff dust
#

ok tnx

stiff dust
#

can i set boolean as null by default or i should set it false ?

quartz kindle
#

if its boolean its boolean, it cannot be set to null

#

if you want to set it to null, you have to make it nullable/optional

earnest phoenix
#

I dont see why you'd wanna set a bool as null anyway

#

null is already a fasley value

quartz kindle
#

well there is one reason

earnest phoenix
#

oh?

quartz kindle
#

being dumb :^)

earnest phoenix
#

oh yea

quartz kindle
#

for real though, in some cases one might want to differentiate it from being "unset"

earnest phoenix
#

I guess but I don't see where it would be important to do so.

#

If you don't want it to do something set it to false

quartz kindle
#

ex: check if user has decided whether they want to attend an event or not

#

if unset, keep showing the prompt until they chose either interested on not interested

earnest phoenix
#

Ah yea

#

I am watching a Bitcoin in 100 seconds and it made 0 sense to me

#

my brain too smol

quartz kindle
#

lel

#

"bitcoin in 100 seconds"

#

checks video

#

13 minutes long

#

fucking clickbaits smh

earnest phoenix
#

Well no

#

He explains it in 100 seconds

#

but then goes in depth on how to make a very unsecure basic blockchain

quartz kindle
#

lel

royal herald
#

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:ws

isnt ws built in

spark flint
#

await message.author.kick("reason") isn't working

#

oh i know

#

message.member

wheat mesa
#

Message.author is a user object yeah

earnest phoenix
spark flint
#

😭

royal herald
#

ru a shitty coder ?

#

no ur not

spark flint
#

i am a shitty coder

wheat mesa
#

Misty is the epitome of a shitty coder

earnest phoenix
wheat mesa
#

;)

earnest phoenix
#

I just tried o import it as well and it did not work

earnest phoenix
wheat mesa
#

go back and fix some bitches

earnest phoenix
#

Sorry but I like being single rn

royal herald
#

no bitches?

earnest phoenix
#

Aint got shit weighing me down that way

slender thistle
#

Well if she's the top and you're the bottom...

pale vessel
#

femdom

slender thistle
#

You know the shit

earnest phoenix
slender thistle
quartz kindle
lament rock
#

only thing close enough to ws is http

#

or net if you're feeling quirky

quartz kindle
#

yes, both can be used to create your own ws

earnest phoenix
#

but none of us in the development chat are as smart as tim

sudden geyser
#

except me coolyuno

slender thistle
#

You included

#

Because you didn't give me a hug this morning

raw nest
#

If I make a Rest request and get an object of an item like f.e.:

{
  "id": "123",
  "price": "1.20",
  "storage": "20"
}

And I render it. How can I make an onClick function which reduces the storage of the item by 1 + rerenders it?

spark flint
earnest phoenix
#

So say I have an array of items and I only want the first 5 how would I get that again?

#

nvm I think i would use slice

split hazel
#

yessir

split hazel
raw nest
#

Yess, Well I found a solution now by saving the rest response in a state and then just edit the json aka state

wooden ember
#

why can't we change bot usernames and pfps anymore

spark flint
#

you can

wooden ember
spark flint
#

oh

wooden ember
#

lol

spark flint
#

thats odd

wooden ember
#

i looked at the docs its refers to but its irrelevent

spark flint
#

you can't even copy token anymore

wooden ember
#

bruh wait what

#

i didnt even see that

spark flint
#

2fa to regen codes now too

#

tokens*

wooden ember
#

2fa is stupid

#

not giving my phone number to discord

#

one data breach and boom every indian scammer under the sun has all my details

lyric mountain
sudden geyser
#

which are pretty significant on their own

wooden ember
#

i mean i have like 5 emails and i dont care if one or two of those get leaked

sudden geyser
#

though if I had to guess about not being able to update bot usernames and pfps, some idiot at discord introduced a bug and couldn't be bothered to fix it at the time so they slapped on the banner

wooden ember
#

probably

#

or some one made some bot that just created acounts and maxed out their bot count to make some massive botnet to crash discords backend or somthing

sudden geyser
#

but you can do that with the modify current user endpoint already

#

no wait

#

yeah no

crude juniper
#

hey is anyone familiar/good with ubuntu 18.0.4 apache server and knows how to setup reverse proxys for virtual hosts? if so please DM me! 🙂

lyric mountain
#

necessarily apache?

crude juniper
#

i guess not

#

if the conf files are the same

spark flint
#

@atomic kindle is good at nginx

atomic kindle
#

Hi!

atomic kindle
#

Also, I can help you out if you're using Nginx.

crude juniper
#

im trying to make it so for my domain that api calls hit the local nodejs server

#

and i dont think its nginx

#

its an apache config file

#

but tbh idk, dont work with server config much

atomic kindle
#

I have zero experience with Apache Servers, but if you'd like to achieve the same with Nginx; I can help.

crude juniper
#

Ok i will see if it can switch it to nginx

lyric mountain
#

nginx is so much easier and straightforward to setup reverse proxy

prime mist
#

Nginx isn't too bad. I prefer haproxy if I had the choice.

lyric mountain
#

I mean, nginx certainly isn't perfect, we just all agree apache is a mess

atomic kindle
prime mist
#

If you need more than that, then nginx for sure.

atomic kindle
#

I was about to point this out. 😸

#

NGINX is a full fledged web-server.

prime mist
#

At work we use haproxy for our ingress controller. Rock solid. Does one job and does it well.

#

Maybe around 75 vhosts / ingress routes.

atomic kindle
#

Wow. I most certainly agree with you that haproxy is the best at what it does, but I didn't suggest it because the user seems to be looking for a simple solution for reverse proxying.

#

If the use case was enterprise level, then haproxy all the way.

#

Not to mention, haproxy's configuration can be a little intimidating to a first time user.

modest maple
#

I have largely stopped using gateways like that now

#

Other than the occasional kong gateway, just easier to mount to cloudflare tunnels and just not worry about it 😅

prime mist
modest maple
#

Nah

#

It is very very rare we run into situations where k8s actually makes sense and isn't just overcomplicating

#

I love it, but it's not needed in most cases

prime mist
#

Fair enough. There is a lot of mental overhead with kubernetes.

It is only worth it if you have lots of different workloads and need the flexibility and resource management.

modest maple
#

I mean even then, it's often easier to just not and use something more simple like just using more instances if on a cloud provider or just using docker swarm (which although im not a massive fan of, it's certainly good enough at replacing tasks that K8s would normal go e.g. multi-machine scaling) 😅

#

just because it doesn't take 1000+ lines of yaml to setup and maintain ablobsweats

prime mist
#

Haha yaml for days. Yep.

earnest phoenix
#

How should I make timed events that persist even after bot restarts. Should I use cron jobs that run on separate process from the bot or?

prime mist
earnest phoenix
#

Mmm

earnest phoenix
#

No idea what polling is tho

split hazel
#

instead of getting an event

stiff dust
#

so

#
const { AutoPoster } = require('topgg-autoposter')
const autoposter = AutoPoster(process.env.ggToken, client)

is enough ?

real rose
#

Then you need to define your ap

#
const ap = AutoPoster('Your Top.gg Token', client)
stiff dust
lucid prawn
#
client.Manager.updateVoiceState(data);
TypeError: Cannot read properties of undefined (reading 'updateVoiceState')
stiff dust
real rose
#

If you don't want to use it afterwards, you can just remove the const autoposter. you will still need the initialiser. (AutoPoster(process.env.ggToken, client))

stiff dust
real rose
#

Oh wait

#

I misread your code entirely

stiff dust
#
AutoPoster(process.env.ggToken, client)
real rose
#

oopsie it's late

#

Yes

stiff dust
#

so the whole code become this :

const { AutoPoster } = require('topgg-autoposter')
AutoPoster(process.env.ggToken, client)
real rose
#

Yeah

stiff dust
#

cause i dont want to console log or do anything else

#

ok tnx <3

real rose
stiff dust
#

why cry ?

stiff dust
spark flint
spark flint
#

read it

sudden geyser
#

I just read it :o

#

Personally, I doubt Discord.py can do much to "fix" the ecosystem since many bots have already made the switch, so now developers have six libraries to pick from. It wouldn't be as big of a problem if the libraries weren't so similar and stated what they were good and not good at

quartz kindle
#

:O

lucid prawn
#
 fetch(`http://api.brainshop.ai/get?bid=156057&key=26SY8BZqy2fJ3MAj&uid=1&msg=${encodeURIComponent(messageCreate.content)}`).then(res => res.json()).then(data => {
            messageCreate.channel.send({ content: data.cnt})
FetchError: invalid json response body at http://api.brainshop.ai/get?bid=156057&key=26SY8BZqy2fJ3MAj&uid=1&msg=hi reason: Unexpected token S in JSON at position 0
    at /home/runner/mika/node_modules/node-fetch/lib/index.js:273:32 {
  type: 'invalid-json'
}
sudden geyser
#

Whatever endpoint you hit did not contain valid JSON in its body

#

Also does that URL contain an API key

lucid prawn
#

idc if people use it

#

{"cnt":"hello senpai/master"}

sudden geyser
#

That's weird. It works when I run it.

pearl trail
#

if im not wrong, it returns json in text format

#

how about try JSON.parse(res.text())

lucid prawn
#

ok

#

hi

#
 method: 'post',
  path: '/channels/948792913612132413/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}
#
            messageCreate.channel.send({ content: data.cnt})
sudden geyser
#

Try logging what data is, since 50006 (the status code) means you sent no content

pearl trail
#

contet must be string

#

${data.cnt}

lucid prawn
#

ok

sudden geyser
#

But it is sent back as a string

pearl trail
#

lemme see

pearl trail
#

ig its only on embed

lucid prawn
#

wait

#

it was work then I changed smth

#

idk what i did

hoary apex
lament rock
#

String(number) as works

hoary apex
#

Help !

quartz kindle
# hoary apex

somewhere you have something.bot but something is null

earnest phoenix
#

tim gave better explanation

hoary apex
#

It's was working fine yesterday

#

I'm going to die when one thing goes right the other thing that workes will not

#

XD

sudden geyser
lament rock
#

Hate it when that happens

sudden geyser
#

you too

earnest phoenix
#

so mean 😔

#

ur words hurt me

rose lance
#

how do I get the length of a js collection?
(or how do I loop though the values of one)

earnest phoenix
#

@zinc fable

sudden geyser
#

try that on yanderedev's server

#

that's something to feel special about

zinc fable
#

@fair rivet be nice please nyaaNod also keep conversation to #general

lament rock
#

Welcome to life of developer where applications require constant maintenance and shit happens for seemingly no reason while everyone is trying to be the next big shot

sudden geyser
#

.length too

quartz kindle
#

not for collection/map

sudden geyser
#

yes but they said js collection

#

which can include arrays

quartz kindle
#

never heard anyone call arrays collections

#

but i guess lul

lucid prawn
sudden geyser
#

well now you've heard one person :)

earnest phoenix
quartz kindle
#

@_@

pearl trail
#

array and collection is a whole different thing

lucid prawn
#

my console.log doesn't work

sudden geyser
lucid prawn
#

ok

sudden geyser
pearl trail
sudden geyser
#

Yes, I tried it too (in the terminal and my browser), and it worked for me.

#

Which is weird.

sudden geyser
lucid prawn
sudden geyser
#

Ah

#

The server is probably sending you that back

#

You could look at the full response yourself by removing .then((res) => res.text())

#

But if I had to assume, you're getting rate limited, so you're not getting the JSON you should be getting.

#

I'd suggest using .catch to handle errors.

lucid prawn
#

ok

lament rock
#

Trying other languages like c# is weird where Array lengths are typically immutable. My brain is melting trying to filter and get Length of results satisfying a constraint

#

maybe just js is weird

sudden geyser
#

Like, you can't do something like .Length = x/.SetLength(x), or are the arrays immutable in general?

lucid prawn
#

idk this won't work messageCreate.channel.send({ content: data.cnt})

rose lance
#

ok I have this html and js

<div>1</div>
<input name="test" class="replace-me" value="sus1"/>
<input name="test" class="replace-me" value="sus2"/>
<input name="test" class="replace-me" value="sus3"/>
<input name="test" class="replace-me" value="sus4"/>
<input name="test" class="replace-me" value="sus5"/>
<div>3</div>
<div onclick="remove()" class="button">Click me</div>```
```js
function change_to_text(old_element) {
    var new_elemen = document.createElement("div");
    new_elemen.appendChild(document.createTextNode(old_element.value));
    old_element.parentNode.replaceChild(new_elemen, old_element);
}

function remove() {
  var all_settings = document.getElementsByClassName('replace-me');
  for (let setting of all_settings) {
      change_to_text(setting)
  }
}```
but clicking the button somehow only edits every second button, as shown in the screenshot
lucid prawn
#

and it stop saying

(node:6250) DeprecationWarning: The message event is deprecated. Use messageCreate instead
(Use `node --trace-deprecation ...` to show where the warning was created)
DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/home/runner/mika/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/runner/mika/node_modules/discord.js/src/rest/RequestHandler.js:51:14) {
  method: 'post',
  path: '/channels/948792913612132413/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}
sudden geyser
#

I'd recommend you set it up as so:

fetch(...) // ... represents the URL to fetch. You'll get a response that'll be handled in the `.then` block.
  .then((res) => res.json()) // Converts the response body to JSON
  .then((data) => {
    // Send the data to the channel. This is up to you
  }).catch((err) => {
    // Something went wrong (e.g. response body couldn't be parsed). Deal with the error however you feel like (send an error message to the channel, ignore, etc.)
  });
fiery stream
#

Hii

lucid prawn
#

ok

pearl trail
lyric mountain
#

Arrays as in variable[] are supposed to be fixed-length

fiery stream
#

What’s the difference in var n let

earnest phoenix
fiery stream
earnest phoenix
#

there have been cases where using var can have scoping issues iirc

#

there are probably other reasons why var isn't widely used anymore

#

but I just know that is one people talk about the most it seems

lyric mountain
fiery stream
#

So pretty much they same things but var is outdated

lyric mountain
#

That alone is enough to cause WEIRD errors

#

Emphasis on weird

earnest phoenix
#

using let is just prefered

#

it stays in the scope it is defined in

#

and doesn't cause those weird errros haku mentioned

fiery stream
#

Ion even use js anymore it sucked i was never able to make anything functional with it

#

On the other hand python (chef’s kiss)

earnest phoenix
#

that is a user error then

lyric mountain
earnest phoenix
#

python ain't all that ngl

lyric mountain
#

It ain't

earnest phoenix
#

I dislike its syntax

#

relying on indentation for scopes just looks ugly asf

lyric mountain
#

Python is great for scripting, specially when it involves IO

fiery stream
#

I find it easier plus you dont have to care about stupid semicolon;

lyric mountain
#

But please don't make a big system out of it

earnest phoenix
#

you don't really have to worry about semicolons in js as well

#

unless you're making an anonymous async function ig

fiery stream
earnest phoenix
#

it could become a big system

lyric mountain
earnest phoenix
#

I use prettier so it puts ; for me

#

:)

lyric mountain
#

Js puts it actually

fiery stream
#

I was on my way to make a dope ass discord bot then someone reminded me that rapptaz abandoned the lib n now im pretty much stuck on which lib to use

earnest phoenix
#

any of the maintained forks ig

lyric mountain
#

I am that someone kekw

fiery stream
#

The question is which fork is gonna last n which gonna get abandoned again

earnest phoenix
#

🤷‍♂️

#

it is already surprising someone kept a python discord lib going for that long ngl

fiery stream
#

Maybe i should make my own lib 🤔

#

Jk im not that smart

earnest phoenix
#

sure go ahead

lyric mountain
#

The most stable langs to code in are java, js, c/c++ and c#

earnest phoenix
#

haku make a discord lib in C

#

;)

lyric mountain
#

Not while I'm sober

fiery stream
#

Go seems stable to

earnest phoenix
#

lmao

#

better yet

#

use HolyC

quartz kindle
earnest phoenix
#

Oh did he now

#

how do u know this tim?

fiery stream
earnest phoenix
#

you betraying us?

fiery stream
#

God

earnest phoenix
#

did tim switch to py?

quartz kindle
earnest phoenix
spark flint
#

SMH

#

I’m not using py

earnest phoenix
#

mhm sure

spark flint
#

Js now

fiery stream
rose lance
lyric mountain
#

Weird issues popping out of nowhere

#

Search up on why var is bad if u want the whole thing

rose lance
#

so what else should I use?

lyric mountain
#

Let

lucid prawn
#

@sudden geyser I got it and how I remove the Spam thing

lyric mountain
#

Exactly same usage as var, but doesn't break randomly

fiery stream
#

Does pytorch use tons of cpu?

dry imp
#

probably

#

its for ml right?

lucid prawn
#

how I stop my spam system from muting people that spam in spam channel

earnest phoenix
#

make it ignore that channel

lucid prawn
#

how

#
client.on("messageCreate", (message) => {
  const anti = db.get(`antispam_${message.guild.id}`)
  const spCh = db.get(`guild_${message.guild.id}_spCh`)
  if(!anti)
 if (message.channel.name = spCh) {
return;
        }
   db.add(`antispam_${message.guild.id}` , true)
antiSpam.message(message)
});
earnest phoenix
#

i'd change the ids against each other tbh

lucid prawn
#

like

#

spCh === spCh

#

i mean

earnest phoenix
#

no

#

check what the channel the current message is being sent in

#

and compare that channel id against your anti spam channel id

#

if i matches don't anti spam if it doesn't continue on

lucid prawn
#
 if (message.channel.id === spCh) {
earnest phoenix
#

possibly might work

lucid prawn
#

ok

fiery stream
dry imp
#

deep learning is machine learning

pale vessel
#

deep learning inside yo momma

earnest phoenix
#

avast deep clean

lament rock
#

why dont you try deep learning how to get some bitches

#

I'm sorry, that was mean

dry imp
#

that was mean

earnest phoenix
vital void
wheat mesa
#

or just talk to women

#

...never mind, this is #development where the only chad is tim

#

All hail lord Tim

hushed patrol
#

how can i make like a sidebar in html?

#

like to be at the side

civic scroll
hushed patrol
#

nvm

civic scroll
#
<div class="container">
    <div class="sidebar"><div>
    <div class="content"></div>
</div>
.container {
    /* rules here */
    display: inline;
}
.sidebar {
    height: 100%;
    width: {num}%
    display: flex;
    
    flex-direction: column; /* so the child els can lie vertically */
}
#

@hushed patrol add position: absolute to .sidebar if it's an overlay

foggy ermine
#

hi

civic scroll
#

hi

foggy ermine
#

I wanna ask something

#

how do you format colors in codeblocks

civic scroll
#

```{language}
{content}
```

foggy ermine
#

you need to include {} for content too?

civic scroll
#

no

foggy ermine
#

oh okay

#

thanks

earnest phoenix
civic scroll
#

i use div instead of nav

#

like

#

in general use

earnest phoenix
#
<body class="container">
<aside class="sidebar"></aside>
<main class="content"></main>
</body>
civic scroll
#

didn't know this existed

earnest phoenix
#

why do you have the container thingy

#

cause it is a container

#

duh

#

what is it for

#

Depending on the styles to it

#

it probably adds some needed stuff like possibly centering content or whatever

#

setting the size of the content that will go inside it

#

I don't think you need to put the aside inside the container because you can make it the container itself

<aside class="sidebar">
      <header class="sidebar-header">
           <h2>Sidebar</h2>
           <button>Close</button>
      </header>
      <p>Content</p>
      <!--- Optionally <footer> -->
</aside>
light flint
loud cloud
#

how do i fix that

light flint
#

No one help me

cobalt junco
light flint
#

@cobalt junco can help me

cobalt junco
loud cloud
atomic kindle
# light flint <@755773452756975646> can help me

Please read the channel description. text Channel for chatting about development. If you have questions, ask the questions and wait for someone who can answer to help you. Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem. Do not @mention people randomly.

cobalt junco
loud cloud
earnest phoenix
#

so I would check if it exists first

#

Also you don't really have to do if statements here

cobalt junco
earnest phoenix
#

unmute or mute doesn't exist in the collection

#

so execute wont exist as a prop on it

cobalt junco
woeful pike
#

how the fuckkkk

#

how is copilot reading my mind

marble juniper
#

Copilot also knows how to read my mind

fiery stream
#

What’s the difference in super computer n quantum computer?

woeful pike
#

quantum computers use a completely different computer architecture based on quantum physics

#

super computers are basically just very big computers

hushed patrol
#

what color to use for dark mod

#

in html

#

grey?

#

bc black is so black

earnest phoenix
#

why

#

no one is going to help you with that

lucid prawn
#
    const url = await fetch("https://nekos.life/api/v2/img/Random_gif").then(res => res.json())
    await messageCreate.channel.send({ content : `${url}`})

object Object

earnest phoenix
#

test

#

woah

lucid prawn
#

you saw nothing

earnest phoenix
#

kinda sus

earnest phoenix
#

fair warning

lucid prawn
#

why?

earnest phoenix
#

loli alert

lucid prawn
#

oh ok

earnest phoenix
#

ye

lucid prawn
#

ok

earnest phoenix
#

but tif you plan on using any nsfw ones dont

hushed patrol
austere surge
#

dark color :)

hushed patrol
#

black grey or what?

#

how to make a switch which make it switch between dark and light mode?

#

xD confusing

lucid prawn
#

fetch(...).json is not a function

#

yes

earnest phoenix
#

await await

lucid prawn
#

nothing

earnest phoenix
#

What are you using?

#

node-fetch?

pearl trail
#

you don't need .json() with axios mmulu

earnest phoenix
#

I dont even think they are using axios att this point

atomic kindle
#

What would be the best way of completely archiving a website? A self-extracting archive or storing it on the fs?

split hazel
#

yes

split hazel
#

are you talking about archiving dynamic data or literally just a simple html website

atomic kindle
split hazel
#

oh that's what you mean

atomic kindle
#

Yep.

split hazel
#

we do need a better archive org alternative anyways because it's barely running on java

atomic kindle
#

I've been pondering on this question for quite some time and thought about self-extracting websites but they're a pain to render on the client side and the size is a tragedy.

split hazel
#

it gets a bit complicated

#

to preserve the html its pretty straight forward, just scrape it and store it somewhere

#

for css/js you need to probably go through the html and "crawl" the imports

#

this also matters for other pages

earnest phoenix
#

i have a question
w h a t

@mixin motion() {
  @media not (prefers-reduced-motion) {
    @content;
  }
}
Error: expected "{".
    ╷
  7 │     @media not (prefers-reduced-motion) {
    │                ^
    ╵
    style.scss 7:13  root stylesheet
atomic kindle
#

Exactly. However, that's not one of the problems I face while conceptualizing the idea. It's the storage mechanism.

split hazel
split hazel
earnest phoenix
split hazel
#

I think for this storing it as a normal file is the best way

atomic kindle
#

So, store all of them as individual files? That can't be good for cycles.

split hazel
#

and keeping an index of things in a database

atomic kindle
#

CPU cycles.

#

And disk i/o too.

split hazel
#

how do you think the database looks up your data

#

exactly the same way

modest maple
#

Well

#

Dbs work differently

split hazel
#

no

#

stop with your well

#

it works practically the same way

modest maple
#

Although caring about cpu cycles is pretty pointless

split hazel
#

for disks anyways

atomic kindle
#

Can't help it...

split hazel
#

and you shouldn't worry about that

civic scroll
#

seems like you can't include media in mixins

split hazel
#

the operating systems generally do a good job caching disk data and other things

modest maple
#

If your files are under 1MB you're probably better of storing in a db like postgres or scylla

atomic kindle
#

I just keep thinking if there is a way to store all that crap as one but archiving it using the traditional mechanisms is meh.

split hazel
#

you could but it would get complicated and very slow since you would have to decouple everything

earnest phoenix
civic scroll
#

boolean tags doesn't work

atomic kindle
#

When accessing them? Yes, but I plan on keeping it in a cold storage.

woeful pike
#

specialize your css for the reduced motion case, not the "not-reduced-motion" case

atomic kindle
#

Now, that I think about it again, I think I'm better off not archiving them.

split hazel
#

in my opinion you should store data in your file system as a folder, that way you don't need to worry about the import paths of scripts and css files because you've preserved the file structure

for the "cold storage" part i wouldn't really do anything since disk is generally very cheap nowadays but I'd opt in for compression i guess for the files, if you really want to get petty zip the pages up and decompress on demand

atomic kindle
#

Uh huh. Yep.

modest maple
#

Regarding the html content itself if you're trying to compress you might as well gzip/deflate it and serve it raw as gzipped content

woeful pike
#

why? reduced motion is something you opt into

earnest phoenix
#

i want to make it so i can have the regular non harmful transitions always visible but the actual harmful ones are only displayed if the media query is met

#

always adding it and intentionally removing is bad because

  1. extra css
  2. extra sass for me to write
  3. the mixin doesn't know which properties to remove so it removes everything
atomic kindle
#

This is how far I've come, I guess I'll go with storing data on the fs.

neat ingot
#

any reason i might be getting random 'missing access' (50001) errors when trying to call ```js
await channel.messages.fetch({limit:100});

spark flint
#

Ghost ping 😡

pale vessel
#

guild is null

drowsy flume
#
3|IdleMine |     await adapter.create_interaction_response(
3|IdleMine |   File "/usr/local/lib/python3.8/dist-packages/discord/webhook/async_.py", line 189, in request
3|IdleMine |     raise NotFound(response, data)
3|IdleMine | discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
3|IdleMine | Executing <Task pending name='discord.py: on_message' coro=<Client._run_event() running at /usr/local/lib/python3.8/dist-packages/discord/client.py:351> wait_for=<Future pending cb=[shield.<locals>._outer_done_callback() at /usr/lib/python3.8/asyncio/tasks.py:902, <TaskWakeupMethWrapper object at 0x7fac5156a340>()] created at /usr/lib/python3.8/asyncio/base_events.py:422> created at /usr/lib/python3.8/asyncio/tasks.py:382> took 0.440 seconds
3|IdleMine | Traceback (most recent call last):
3|IdleMine |   File "/root/main.py", line 4814, in <module>
3|IdleMine |     loop.run_forever()
3|IdleMine |   File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
3|IdleMine |     self._run_once()
3|IdleMine |   File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
3|IdleMine |     event_list = self._selector.select(timeout)
3|IdleMine |   File "/usr/lib/python3.8/selectors.py", line 468, in select
3|IdleMine |     fd_event_list = self._selector.poll(timeout, max_ev)
3|IdleMine | KeyboardInterrupt```
anyone know whats going on here
earnest phoenix
#

python stack traces are so informative

drowsy flume
#

and I got no clue why

sudden geyser
#

I think that's a common issue when using interactions.

drowsy flume
#

ah

#

do you know of any fixes

sudden geyser
#

I don't know myself, but all I know is that Discord thinks the interaction no longer exists.

buoyant swan
#
print(f"Sent message to {int(server["guildid"])}.")
#

what wrong with that

#

it gives me error

sudden geyser
#

what's server supposed to be

#

and what's the error

buoyant swan
#

File "main.py", line 551
print(f"Sent message to {int(server["guildid"])}.")
^
SyntaxError: invalid syntax

buoyant swan
#

ok nvm i found it

sudden geyser
#

Yeah, " inside "

feral aspen
#

Any idea what this is?

#

I've never seen this before.

sudden geyser
#

probably neovim

#

could also be vim

split hazel
#

mfs adding a gui to vim while i still dont know how to exit vim

feral aspen
#

What in the world is neovim?

split hazel
#

think neonazis but vim

sudden geyser
#

A code editor that's usually run in a terminal and relies more on commands from the user's keyboard

#

If you know Emacs, it's similar.

#

Neovim is an extension of Vim.

feral aspen
sudden geyser
#

Sort of.

feral aspen
#

I've never seen it before, and looks really interesting.

sudden geyser
#

It can be easy to install, but using it requires a strong learning curve.

#

Since the way you write code is turned upside down.

feral aspen
#

I'm signing up, where's the papers.

sudden geyser
#

You do almost everything with your keyboard.

#

Rather than your mouse with a fancy GUI to click buttons

feral aspen
sudden geyser
#

Try it out and see, and you'll see what I mean

#

It's truly crazy

#

Personally, I'd like to eventually move to Neovim full time, but I have a hard time remembering the keys, so I stick with Sublime Text.

#

Which is close in simplicity

feral aspen
#

Well, learning it is not bad. I guess I'll see how it works.

feral aspen
#

You mean the thing on the top?

sly sierra
#

If you do have a configured neovim yes

#

but its heavly based on keyboard shortcuts

#

But it only works on unix based systems

#

so MacOS or Linux

#

Buttt since Windows added wsl

#

you should be able to use it

sudden geyser
#

If you have a configured neovim what is neovim at that point

#

been rocking with the defaults except some awful color choices

sly sierra
#

not “install and ready to go”

#

Thats what I like about neovim, vim and emacs

#

you choose how to configure

#

Sure you rather need to have some knowledge of vim lang or lua lang

#

but youll get the hang of it

#

mice make people slow especially coding and programming

#

Having certain keybindins to move to files instantly or move up and down

sudden geyser
#

Would you be fine with getting rid of the mouse but retaining the keybindings editors provide, like Command + P to move to a file?

#

With Sublime Text, I still use my mouse a lot, but have increasingly used my keyboard for some operations and it's been very speedy (especially Shift + Control + M to select and expand selected braces for Lisps)

sly sierra
#

ah

#

Why would someone use “Command” or “Super” for software related stuff

#

I would use ctrl or alt

sudden geyser
#

I think it depends on the environment

#

Mac users don't like using alt

#

But windows users do

earnest phoenix
#

it means windows button

sudden geyser
#

Neovim and Emacs just throw out the environment for their own with HJKL and whatever

sly sierra
#

I have been using neorg for the past couple months

#

Neovim org mode

#

Not as good as org mode

earnest phoenix
#

this is called super key

sly sierra
#

but Its been better than nothing

sly sierra
sudden geyser
#

oh that button

#

yeah fuck that

earnest phoenix
#

there are very less built in commands that use super keys so some programs use that in order to prevent clashing with other shortcuts

#

unless you use linux ofc

sly sierra
#

I added some Super keybinds to my xmonad setup

#

SUPER + SHIFT + S To open up ncmpcpp

earnest phoenix
#

wtf is ncmpcpp

sly sierra
#

SUPER + SHIFT + R to recompile xmonad

sly sierra
#

Super to open up dmenu

#

ALT + P to open up my passwords dmenu

earnest phoenix
#

alt + p is print iirc

#

wait no that's ctrl p

sudden geyser
#

What exactly is Neorg? Is it trying to be a complete system?

#

There seems to be a lot imagining in their readme with no concrete def on what the project is

#

At least to me, an outsider

earnest phoenix
sudden geyser
#

your rick roll memes suck IruSmile

sly sierra
#

but it does very well

#

Org mode in neovim

split hazel
#

balls

#

they need to be gently caressed

sly sierra
#

balls

#

i did my 4 monthly removal of pubes

#

so

split hazel
#

nice bro

sly sierra
#

how bout you

split hazel
#

nah bro my balls dont stick

#

so no hair

sly sierra
#

damnn

#

those are the clean balls

#

I need to have clean balls too

#

just havent tooketh to time

modest maple
#

What the kentucky fried fuck is this conversion

spark flint
#

#balls

earnest phoenix
spark flint
#

yes

silk tartan
#

Nope he doesn’t

spark flint
#

i do

silk tartan
#

Proof 🤨

spark flint
#

no ty

silk tartan
#

Jk

earnest phoenix
spark flint
#

also its she*

silk tartan
#

Oh you don’t have it

spark flint
#

i do

silk tartan
#

What

spark flint
#

oh you don't have it

silk tartan
#

I am a bit confused

spark flint
#

ok

#

#balls
she/her

#

there

silk tartan
#

You like balls

spark flint
#

what

silk tartan
#

Like football

spark flint
silk tartan
#

And like basketball

#

You like them balls

spark flint
#

ok lets stop now

silk tartan
#

Oh come on you said you love them

sly sierra
#

I love male balls

#

i suck mine sometimes

silk tartan
#

Umm

earnest phoenix
#

@oak cliff this chat is getting too ballin pls issue some mutes

sudden geyser
#

didn't you say you ate a testicle

spark flint
#

what