#development
1 messages Β· Page 207 of 1
Cuz it becomes unreadable after the first line
no really tbh

Also did I mention jsfuck cannot have newlines?
i understand the concept, but i wouldnt know how to read asm
cant you somehow eval \n?
eval it
Yes, i meant while coding
If u break the line u break the flow
Spaces too, they separate the elements
thats like wishing math wouldnt exist
what
Jsfuck is just js' sins coming out to the open
it will always come back, even if its gone

because someone somewhere will invent it again
I swear someone died for those
should of stayed hidden
I'd be happy if its after I die hen I wouldnt have to look at it
(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+[!+[]+!+[]+!+[]]]+[+!+[]]+([+[]]+![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[!+[]+!+[]+[+[]]] cause WTF is this bro
Ah yes, it was +[] to fuckin transform it to string for some reason
someone tries to decompile it... only movs
hacks your pc steals the source code.... only jsfuck
I confused with +{}
I wonder if u can apply some of those operations on regular coding
Like using +[] to call toString()
you can just call +
let smth = new SomeClass()+[]
That looks sussy
No, you see, +[] specifically for some reason calls toString() of whatever is to the left
π
I would never risk getting banned again
people actually do that, weird coercions because its shorter to write
Which is why {}+[] becomes [object Object]
what
why
why does +[] call toString
wtf
my js code fixing to look confusing as fuck with this one
Lmao they actually made protections against jsfuck
its basically coercion abuse, the same as +"123" = 123
im not surprised
jsfuck can get dangerous due to how obscure it is
so you can realistically hide anything in it, and send it to some moron who will run anything given to em
Hey man install node, run this kthx for your information
And it's pretty hard to revert to js
there are protections in about:blank
@shell tundra
As a matter of fact, I did try to bypass blacklist filters on some bots' eval cmd
It works yeah
Zobs' **
:(
should've*
heyyy guys!!
const { Client, GatewayIntentBits, MessageActionRow, MessageButton } = require('discord.js');
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const clientId = 'x';
const guildId = 'x';
const commands = [
{
name: 'test',
description: 'Open a test modal',
},
];
const rest = new REST({ version: '9' }).setToken('x');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
],
});
client.once('ready', async () => {
console.log('Ready!');
try {
await rest.put(
Routes.applicationGuildCommands(clientId, guildId),
{ body: commands },
);
console.log('Slash commands registered.');
} catch (error) {
console.error(error);
}
});
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
const { commandName } = interaction;
if (commandName === 'test') {
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('modal_trigger')
.setLabel('Open Modal')
.setStyle('PRIMARY'),
);
await interaction.reply({ content: 'Click the button to open the modal.', components: [row] });
}
});
client.on('interactionCreate', async interaction => {
if (!interaction.isButton()) return;
if (interaction.customId === 'modal_trigger') {
await interaction.reply({ content: 'Modal triggered.', ephemeral: true });
await interaction.channel.send({ content: 'This is a test modal!' });
}
});
client.login('x');
node:events:497
throw er; // Unhandled 'error' event
^
TypeError: MessageActionRow is not a constructor
at Client.<anonymous> (/home/reaper/Desktop/test/index.js:44:21)
at Client.emit (node:events:531:35)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:402:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
Help

Yea i asked same question everywhere lol you happen to be here too
MessageActionRow is only for early(?) discord.js@13 β’οΈ
What discord.js version
I recommend updating to v14
discord.js v13 is still supported, but it wont have many of the new api features
Oh right builders 
π€’
nasty things
Cassandra.ServerErrorException: java.lang.IllegalArgumentException: newLimit > capacity: (993079868 > 269) what does this mean? π the error is at line 105
oh also adminlogs is LIST<TEXT>

whatever you are setting adminLogs to exceeds the capacity I think
Im not super experienced with java, but iirc a list has a certain capacity, and if you are adding onto it too much and it exceeds that capacity then it will error (I think, don't take what I say seriously, thats just my speculation)
Someone like @covert gale or @lyric mountain would be better suited to answer this

ok i got it working, i'm dumb. changed to this UPDATE modlogs SET adminlogs = ? + adminlogs WHERE guildid = ? and new List<string> {myData} instead of just string π©
what does ? + adminlogs do
? is the query to bind, adminlogs is the data from the db itself. so it's like adminlogs + ? is adminlogs.push(?) and then ? + adminlogs is adminlogs.unshift(?)
ohh so it adds at the beginning?

is it like python's [1, 2, 3] + [something]
i don't think so
i'm not sure about this but, you can probably hold atleast 2B entries
cassandra is too fat
true true
that's correct, for ArrayList
what db is this?
cassandra

thought it was a c# database tool
that's c#
cassandra is java yes. the C# driver just return the error from the server
c# uses the same format lul
lmao
java interpolated string prefix is STR
but the pascalcase methods are what gave it away
Ima be real everything looks the same to me at 8am
This is the authorisation check code for my discord.js v14 command;
if (!interaction.member.permissions.has(PermissionFlagsBits.Administrator)) {
return interaction.reply({
content: text.yoneticihata,
ephemeral: true
});
}
I want the server founder to use it, how can I do it?
dont check the perm, check if the id is the same as guild's ownerId
there can be many admins, but only 1 owner
Made my own starboard system. Discord is lame and doesn't allow bots to set the video field of embeds
Its a fake image as a placeholder because just an empty embed is boring
there's an upcoming crosspost feature, perhaps it'll help making starboard
why no one is interested to create an auto react bot?
what do you mean by "auto react"?
reacting to every message in the channel
Saw that. Waiting for that to be outside of announcement channels
forums
because it'd accomplish nothing
aside from destroying the ratelimit
what ratelimit will possibly attract in that case?
reaction ratelimit
okay
Reaction rate limit is 5 per 5 seconds
on a moderately active server you could hang the bot simply by setting it to the general channel
More like just hanging that bucket since I think it's per channel. But at scale, you can very easily hit the global rate limit
hey cuties. Any idea on the design here
these are basically flip cards
they describe keywords and once you flip them you are matched with a product.
You could possibly make a custom one, not that hard
What's this about if you don't mind me asking
a site for fireplaces.
it's basically an "inspire me" section where customers can find a product that fits them best given some keywords on the cards
Oh interesting
on my bot, how to tell if someone is a "moderator" without them being administrator cause it's too high
like i bet @ moderators don't have administrator perm
It's a role?
Just make the bot check if they have the role
Or you could check if the user has x permissions
no π i want to check em via permissions
yeah this
Which permission
that's what im asking π
Moderator isnt smth defined by discord, it's custom
Can be anything depending on the server
are they the almighty ban_members kick_members and manage_messages
If it's a public bot then I advice you to let admins customize the command and decide who they wanna allow using it
Either with a role or perm
moderator often have those perms, but it's not a 100% case
on my bot I just check kick_members
ah
ban sometimes is restricted to admins, cuz it's much more powerful than kick
but kick/timeout/manage msgs are nearly fundamental to moderator roles
since u cant moderate if you cant punish
@dusty solstice
Do Views possibly fill up your resources? I was just wondering about it
If I define a view where
view = View(timeout=None)
and add buttons with their callbacks to this view, it's going to be live till the bot shuts down or reloads right. Where is this view getting saved even? In the memory of the bot or smth
If this view is getting stored, the buttons and other components stored inside will stay there too. Incase their callbacks have variables which stores images or other heavy data it could cause trouble or am I tripping
context?
Lemme try writing a sample command but I'm on phone
but well, anything held inside callbacks is kept in memory yes, alas why u shouldn't have outside references to it
if your lang doesn't have gc also, you need to make sure to destroy it
and close any streams
It's py
also remember that callbacks are like normal functions
I doubt the gc would pick up on views or callbacks considering the view doesn't expire
once you leave their scope, it's gone whatever was inside it
unless you reference said things somewhere else
callbacks are literally instantiated functions
I see so the variables get redefined once someone clicks the buttons
yes, like in functions
hm
it's not that it's reset, it simply never existed within that scope
what happens inside, stays inside
Yeh I got you, basically the vars inside said callbacks are dropped after output
@commands.command()
async def sample(self, ctx):
view = View(timeout=None)
button = Button(style=disnake.ButtonStyle.green, label="Hi")
async def callback(inter):
await inter.response.send_message('hi')
button.callback = callback
view.add_item(button)
await ctx.send(view=view)
I dunno if it looks alright or no errors as I typed it on phone
but eitherway, as the view is kept alive forever as it's timeout is set to None and "button" is added to it, I assume it's kept alive forever too
the callback itself is, the values inside it aren't
Even tho the callback function is dropped after everytime someone clicks it
yes so the whole function is kept inside the memory as well? Just the values inside it aren't until someone clicks it then they get dropped again like normal function
there's no "whole function"
hm
to make it simple, imagine you have a phone
you call someone and have a very long chat
the moment you drop the phone, the chat ceases to exist
it never existed
hm
only during your chat it actually had a meaning
makes sense
it's also why a project can have several millions of lines code and yet fit in a handful of MBs
because that code doesn't have meaning until it's used
If I set the timeout to something for the view is it removed off the memory after its duration is over tho
the callback instance is
view = View(timeout=10)
imagine you grab the phone and throw it into a bin
After 10 seconds this view should be gone from memory
you didn't destroy the chat, you destroyed the phone itself
but also, it's indeed not a good idea to have very long lived events
unless you have a specific need to keep it alive forever
simply because less events means less overhead
yes makes sense, I'm planning on making the views inside my code expire after a certain duration just to assure it's not cluttering memory up
If needed people can run the command back after a certain duration eitherway
I release my buttons after 1 minute of inactivity
as long as someone is interacting with it, it'll be kept alive
How do you check that
each of my events instantiate a timed action, I just reset its countdown whenever someone presses a button
if the countdown is allowed to reach 0, it removes the event from the handler
since there are no more references to the event, it becomes elligible for GC
I see
server hacks and csgo cases
Gamba
Depends on your usage
im benelux
i cant gamble
i want to gamble
let me gamble
i love gambling
Hmmm
Seems legit
Real
I wouldnt spend to much if you don't know whats your usage for it
unifi router here
a rack there
a few cases over there
is there a good 100% uptime way of doing load balancing? (which is just switching between 2 urls depending on which one is online)
C#, what's best to use? or it's up to me
ResponseModel responseModel = new ResponseModel
{
ResponseType = ResponseType.Embed
};
or
ResponseModel responseModel = new();
responseModel.ResponseType = ResponseType.Embed;
rider recommends me the first one, but i'm asking other's opinion
it's just syntactic sugar. i'd use whatever is shorter
the first one is better if you're setting multiple properties since you won't need to repeat responseModel
yeah right, only useful for multiple properties. alrighty, imma stick with the 2nd one
thanks
honestly i'd go with one or the other, even if its only for a small number of properties
then again I like consistency

technically 1st one is shorter but i genuinely hate c#'s bracing style
nah shi fr
π
i see
i literally always use the first one
if there's no builder pattern
:(
newline braces are so clean
stuff gets so crowded when there's no gaps
ah, any particular reason?
consistency
i see i see
like whenever i see that kind of pattern i know i'm initializing an object
and it also works with other similar syntax like with
as well as anonymous objects
told ya
consistency is key
π
if you mix too many styles together code becomes ugly imo
especially because C# is quite a feature rich language
there's a lot of different ways to do the same thing
picking one and sticking to it is the best way
unless ofc one way is more performant then the other
even like ```cs
ResponseModel a = new ResponseModel();
ResponseModel b = new();
var c = new ResponseModel();
three different ways
var infers the type in C# right?
what if that was the goal all along 
don't make me break out the whole global:: bs
thats my que to leave
can you prepend that to everything
can you make the most cursed c# hello world you could think of?
gladly
im scared
at least it looks short

i'm too lazy to make something truly cursed
using global::System;
using global::System.Collections;
using global::System.Collections.Generic;
using global::System.Text;
using global::System.Reflection;
namespace CursedHelloWorld
{
public class Program
{
public static void Main(string[] args)
{
global::System.Collections.IList hw = new List<char> { 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd' };
global::System.Text.StringBuilder cursedString = new global::System.Text.StringBuilder();
foreach (char c in hw)
{
cursedString.Append(c);
}
// Using reflection to get the WriteLine method
global::System.Reflection.MethodInfo methodInfo = typeof(global::System.Console).GetMethod("WriteLine", new global::System.Type[] { typeof(global::System.String) });
if (methodInfo != null)
{
methodInfo.Invoke(null, new object[] { cursedString.ToString() });
}
global::System.Func<string, string> extraSteps = (global::System.Func<string, string>)(str => str + "! Welcome to Cursed Programming.");
global::System.Console.WriteLine(extraSteps(cursedString.ToString()));
}
}
}
that's decent
chatgpt be cooking
chatgpt?
yeah figured
i'd find a way to incorporate spans and unsafe marshal calls
using global::System;
using global::System.Runtime.InteropServices;
public class Program
{
// Importing WriteConsoleW from kernel32.dll for output
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern bool WriteConsoleW(
global::System.IntPtr hConsoleOutput,
global::System.ReadOnlySpan<global::System.Char> lpBuffer,
global::System.UInt32 nNumberOfCharsToWrite,
out global::System.UInt32 lpNumberOfCharsWritten,
global::System.IntPtr lpReserved);
// Importing GetStdHandle from kernel32.dll to get the console handle
[DllImport("kernel32.dll", SetLastError = true)]
private static extern global::System.IntPtr GetStdHandle(global::System.Int32 nStdHandle);
private const global::System.Int32 STD_OUTPUT_HANDLE = -11;
public static void Main()
{
// Getting the console handle
global::System.IntPtr consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
// The message to print
global::System.ReadOnlySpan<global::System.Char> message = "Hello, World!".AsSpan();
// Variable to store the number of characters written
global::System.UInt32 charsWritten;
// Unsafe block to call the WriteConsoleW function
unsafe
{
// Pin the ReadOnlySpan to get a pointer to the char data
fixed (global::System.Char* pMessage = message)
{
WriteConsoleW(consoleHandle, message, (global::System.UInt32)message.Length, out charsWritten, global::System.IntPtr.Zero);
}
}
}
}
``` that looks promising
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace CursedHelloWorld
{
class Program
{
static void Main(string[] args)
{
new Program().Run();
}
unsafe void Run()
{
// Create a string using a span
Span<char> helloSpan = stackalloc char[] { 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd' };
var cursedString = new StringBuilder();
foreach (var c in helloSpan)
{
cursedString.Append(c);
}
// Use unsafe code to print the string
fixed (char* p = cursedString.ToString())
{
IntPtr ptr = new IntPtr(p);
Marshal.WriteIntPtr(ptr, ptr);
Console.WriteLine(Marshal.PtrToStringUni(ptr));
}
// Use reflection to avoid direct method calls
var methodInfo = typeof(Console).GetMethod("WriteLine", new Type[] { typeof(string) });
if (methodInfo != null)
{
methodInfo.Invoke(null, new object[] { cursedString.ToString() });
}
// Additional unnecessary lambda function
var extraSteps = (Func<string, string>)(str => str + "! Welcome to Cursed Programming.");
Console.WriteLine(extraSteps(cursedString.ToString()));
}
}
}
yea chatgpt kinda weak sauce

reflection is good

it's weird that it originally suggested IntPtr instead of nint
fuck you chatgpt y ou are UNEDUCATED
technically you can use WriteConsoleA too right
no idea about windows functions
ideally i never have to touch windows api
i don't feel like feeling miserable
should be fine since hello world is ascii
oh one is just unicode
@scenic kelpis there any way i can do
return await Context.SendResponse...
instead of
await Context.SendResponse...
return;
```? the type is `Task`
no
π©
yeah i do have more below
this is why cool languages use a unit type instead of a void type
switch to F# and you can probably do that!
lmfao

i will now make the CLASSIC joke of calling it Db and Gb
a language
well I know that
but I never looked at it
functional ML-family language
Felipe my beloved
and it has discriminated unions and C# doesn't
so therefore F# is better
sorry let me put it in a language people here can appreciate
IT'S JUST LIKE RUST ENUMS GUYS π
it's already good because they used oxford comma
obviously rust actually invented everything
i was thinking about it earlier it makes me sad to think there's probably people who think that rust actually invented like pattern matching
// 'name' is inferred to be a string based on usage.
let printMessage name =
printfn $"Hello there, {name}!"
// 'names' is inferred to be a sequence of strings.
let printNames names =
for name in names do
printMessage name
let names = [ "Ana"; "Felipe"; "Emillia" ]
printNames names
wtf is this syntax
ML style
internet went out for a few min there
derives from ML -> Caml -> OCaml -> F# basically
did it not? 
average discord developer
no
ML (Meta Language) is a general-purpose, high-level, functional programming language. It is known for its use of the polymorphic HindleyβMilner type system, which automatically assigns the data types of most expressions without requiring explicit type annotations (type inference), and ensures type safety; there is a formal proof that a well-type...
whats that supposed to mean
its function may be fun but it doesnt look fun
that the average discord developer thinks that rust is the language that invented pattern matching
that is what that means
i have to be rust's biggest hater to counteract all the random love for it
rust isn't that bad lets be real
no but this is a discord bot development server
the dev community are...special but its not the worst language
when has that ever had to do with anything going on in #development π
addresses the shortcomings of C
I cant remember the last time someone was actually struggling with a discord bot in here
its mostly database related

db, web dev
backend apis
not necessarily development but I've definitely seen people talking about rust for their fuckin web server or whatever they're writing
Well yea
What's wrong with rust for backend?
it's overkill

I disagree
for something small sure
but something of a mass scale, its definitely useful
do you think random discord user 35 is going to be writing a 300k loc web server that needs to handle 1m requests per second
mhm
Its not for the average discord user no
but it definitely holds merit for backend dev
in general web servers are so stupidly optimized in any language that you'll get more than acceptable performance
including js
nah
express is pretty fucking fast
js stinky
smelly
but nah, I went with rust simply for its syntax, memory management, and its strict type system. Among a few other things but i'd just be preaching to the choir
There's still a lot I dont know about rust
like its lifetimes and I still dont understand the borrow checker that much, nor do I really understand macros but hey im learning
i just do not understand the appeal versus a language like C# when you're just doing backend stuff
Im confident to hold my own though in some cases
**Didn't worked: **
typedef struct{
char name[36];
int age;
int level;
struct DOB {
int day;
int month;
int year;
};
} player;
**Worked: **
struct DOB {
int day;
int month;
int year;
};
typedef struct{
char name[36];
int age;
int level;
struct DOB dob;
} player;
what the fuck
very true
C or C++ idk
C# just wasn't the right fit for me.
I don't really know how to explain it because when it comes to talking about languages I don't know much about the language itself. I just didn't have a need for C#
rust on the other hand I plan on using for more than just backend so it worked out.
i mean ig if you're actually going to be using rust for truly low level stuff
like actual systems programming then it's worth learning
can someone explain why...
just I'd advocate 90% of people stick with C# or a JVM lang or smth
they're the perfect balance in my mind of dev speed and maintainability vs performance
C# can genuinely be unfathomably fast
the code quickly descends into madness but it can be very very optimized
a lot of the recent language versions have focused on that with Span and stuff etc
I too love Microsoft Java
java if it were good
add discriminated unions and i will never use another language ever i swear
not even css
pretty sure you cant do a struct inside a struct like that
Can write pretty nice stuff with the blazor web framework as well or whatever it is called
I might be wrong but I remmeber not being able to
we can ;-;
Think it compiles to webml
issue with blazor is it uses wasm to basically load a .net runtime
so it has a big initial load
wasm yea
I'll stick to svelte for web stuff BUT OTHER THAN THAT I SWEAR
vled said "oh no blazor" when I told him i was trying out c#
π
Whats wrong with blazor might I ask
It's nice to write tho
Perhaps not the fastest but it feels nice
but they are working on native AOT compilation so maybe fingers crossed
School, a discord bot, and some other stuff
is threadwatcher made in c#
Nah, ts
TS is honestly pretty cool but it also inherently has all of JS's bullshit
Me and the dev of needle have joked about rewriting our bots in c# and for every time we joke about it, it feels less than a joke and more like a plan
i have always said that a language that has a very similar type system but not with a JS target would be pretty cool
"Just do it" requires many hours of work I'm just not ready to handle rn 
bah quitter talk
very kind theydy or thentlethem
if you dont take risks there is no reward
Got a lot of uni work before I start working full time June and July
my friend said it during a speech one time and now it's burned into my brain
ladies and gentlemen, theydies and thentlethems
I need to learn more about kubernetes
rip my 8h of sleep plan
kubernetes is smth I need to find out more info on
My redneck friend did a massive Isak move during rethorics class when we were supposed to write a thanks to the nation speech after being elected as PM. His speech included "lgtb and normals"
I know its like docker on steroids
then again idfk a damn thing about docker either
fucking normies amiright

<3
what
the ide is trolling you
i'm gaming
it's because of the !
hi kuu
nah, it's indeed a valud thing to do if (!list.Any(...))
floating keyboard π
but vscode is stupid, and doesn't notice that c# doesn't have if (list.None(...))
so it suggests u to use All with !=
but it isn't the same as Any will stop iteration if it finds any truey value
it's jetbrains rider
while All will go till the end

that's rider?
guess the language 
i can tell
then idk how tf that happened
rust?
its cousin
cpp?
no
rust but less serious
so less serious that you can still run if it fails to compile
idk, js/ts?
perhaps, since rust has weird exclamation marks in odd places
i abused the non-null assertion !
i'm in groovy
i use janusgraph shell
but idk groovy
sob
killhumans!()
i like how chatgpt now basically forces you 4o and is significantly slower than 3.5
i like how i have over 2,000 conversations on it
holy fuck i havent looked at the nodejs site since like v18 and holy moly
what does that ! do after a function π
p sure thats how you call a function
ig im not that dumb
rust being rusty
Itβs not rust
rfuck
! asserts that the expression before it does not result in a null value
It looks exactly like rust but itβs not
fuck
it's a non-null assertion operator
whoa, new thing
i see i see
You can also tell itβs not rust because itβs a function declaration without the fn keyword
(And the ?)
eg.
sayuri: Nullable<Sayuri>
sayuri.silly(); // Error: 'sayuri' is possibly 'null'.
sayuri!.silly(); // ok
ahh interesting
what other ones r there again
ofc the question mark
@pearl trail note: the runtime behavior is the same (an error would be thrown if the value ends up being nullish at call site)
oh so it's just for ts/intellisense/typings(?) or whatever it called?
question mark marks one target as optional (properties / parameters)
just ts (compiler, intellisense, etc.)
i see, that's expected
objectthatmighthaveafunction.thepossiblefunction?()
objectthatmightbenullwithafunction?.functionwow()
does the ! even do anything besides shutting up linters?
this would automatically append undefined to its possible types
nope, from what sayu said
not shutting up, rather to reassure it that it's not null at the point of call
the second one
basically shutting up..
thepossiblefunction?() this exists?
runtime is more dynamic than that
syntax error
if you want to optionally call it, use nullish chain
ah yeah
maybeNull?.();
i thought i missed something in js/ts 
yeah
it's rather the first one, i believe
if the object ends up being null, the rest of the chain stops calling
sussything?.amogus ?? impostor my beloved
first call is useless
calls when exists no?
you already typed that the method certainly exists
it's used more common than you think
oh you use real name for pc?
ah
i did make a syslink and everytihng
yeah i use this in like every projects i have
skill issue
mfw tsc compiles to js
unknown better
unknown throws type errors
omw installing discord.js and run my bot to get free hosting here /s https://www.typescriptlang.org/play 
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
nah
yes
any accepts any type
actually
if it runs
any type can be assign to any
and so is any, to any other type
dude i could swear eslint said fuck you to any
eslint built diff
tsc like
only works 10% of the time
just using esbuild/tsup because that's the only thing that works π
Average I don't lint my code anarchist
does your code look like
function Get_something ()
{
}```
even you do, the lint won't be able to handle your anarchist code 
How did you get a code snippet from me??? That's private
gotta add the poorly capitalized func name
nah, before is fine
yeah but this is worse
Beer coding got me naming variables "beer" "fuckingDoTheTgint" but when I wake up and check the code it runs and is immaculate spare for the names
max performance
erm wel realistkly speakingdfa
an ekstra underscwore adds 1 extra byte 
optimization at its finest
nah, this is the real max performance (i shouldn't be proud of this π )
remove all whitespace

tsup is pretty good for minifying though stuff like class names are lost so constructor.name calls will be borked
SOH?
that's C#
idk that thing π
typical visual studio formatting
unvisual studio format it
riderβ’οΈ
jetbrain is hired by microsoft
i wanna try jetbrains but im poor.
oh really?
OTBS isn't really used in C#
if you have student email you can sign up
"free for students" my school doesnt even have a .edu tld
android studio just for the vm
fair
i use android studio for actual development
overrated
AQUA
AQUA indeed

feet app
looks great ig?
nah
π
hmhm
oh my god im gonna complain about how extensions run on the server and not on the client again
i need better app names
like dude ofc my linting takes 30 seconds after a single change because its an rpi
i found the latest one
how can I make the text stay center but move according to how much text is there?
this is what I got rn: https://pastebin.com/zyaijN5M
oh god
no rider :)
the hardest thing to do ever
i don even know after years on css

you calculate the text's bounding box
then do math
jsless
isn't that already centered?
that's a discord bot embed
yea but when i add more text its not center
its my website lol
a dynamic image, generated by canvas
website?
yes lol
<div class="relative">
<DiscordEmbed avatarUrl="/logo.png" username="Green Frog" title="Pepe Sign" imageUrl="/blanksign.png" />
<p class="h-[200px] w-[200px] absolute top-24 left-20 text-2xl font-medium text-wrap">I'm in {data.approximate_guild_count} guilds!</p>
</div>
flex / gridbox
what's the actual result from that code? π
the pepe, the text, the clock, or with the gradient

absolute only valid as child
that's why it's offcentered
also given that fixed box dimensions
how would it fare larger amount of text
wym? lol
it's hard for me to get which one is the relative div, and the discord embed. is blue box the relative div?
the screenshot looks cropped
ah yes
ok so planning time 
next js frontend
rust backend
and like
hosted on vercel?
idk what to do for hosting ngl
i could self host but i need to setup auto deploying then
replit /s 
hey guys
does anyone have an overview of the resource usage of linear regression models vs other models
machine learning detected
i mean speaking on linear it should use substantially less resources than other models
yeah i know but i must write a research paper
since you dont really have many layers or use any complicated activation functions
so i don't think i can just say that out of the blue lmao
its just x = x + y etc
i know
as opposed to x = tanh(whatever)
but i need some black on white hard proof to discuss this matter in my paper
though google scholar has like 0 fucking papers about the resourse usage.
make your own proof then
whenver i try to search it i get HOW we can do so, but it never talks about performace.
it's a literature review. I must only talk about other ppl's work.
thats kinda shit then
this is my actual experiment yeh, but i now need to come up with some charts etc
gotta love having to contact ISPs just to see which one is capable of delivering an ip subnet
Might be useful to figure out the algorithmic complexity then?
still comes back to having to find existing research that backs this up
*** System restart required ***
do it then
yes
you're just defining the struct inside a struct
not assigning it to anything
I told you 
you can't define a struct inside a struct like that,
you gotta give it a var/prop name
blud thinks the struct will name itself π
just name em var1 and var2 and etc
Hey I am trying to create my own file size reducer algo. What I was thinking about is taking the first n bits that fit into a single integer if every bit would be activated. Then transforming it into an integer that represents that bitstring.
Would this work?
as ive already mentioned you cant really deal with bits in a compression algorithm
its counter productive youll end up increasing the file size
not to mention the complexity that introduces if you want it to be close to effective
memory and disk doesn't use bits on the interface layer it uses bytes which is the minimum unit you should be targeting
you can't just store 5 bits for example you'd have to store it as a byte which brings it up to 8 bits so you waste 3 bits
should i remove this command?
its a fail safe to shutdown the api incase of an outage
why not just open your hosting panel and close it there π
just seems bad to have on a bot
everything is on one server...

What's the point of a "shutdown" if the API is already offline?
^
okay so i know little about Lark language:
#general message
no idea what lark is
a library that compiles BNF grammars
oh
and have a machinization that is really different from original Lark
actually
original python
so i don't know how i process it to make a function that respond only once
using lark
shouldn't depend on lark much for that I'd imagine, you can look for duplicates while you're visiting your nodes
if gives more it erroes
i see, how do i do it?
depends on how your code is set up can't really help with the specifics
i have no idea how i can explain about it
but am i allowed to post my code?
yeah
out of curiosity why are you using a parsing library for such a trivial parser
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
or is there more to it
there is more
i made it for macro commands
that allows you to create custom commands
+> for personal commands or -> for server commands
ah
do you have a function for handling formater yet?
basically you would just check for duplicates in there
nope, not yet
cus i was worried about the repeating thing
first
cus i don't wanna it repeat the responses of black intalic and etc
yeah it's similar to like method modifiers in C# or Java for example
you don't want public private static static
i see, can i see an example
so i can copy?
example won't help much cause it's basically what you've got but
<method modifiers> ::= <method modifier> | <method modifiers> <method modifier>
<method modifier> ::= public | protected | private | static | abstract | final | synchronized | native```
they obviously handle duplicates when visiting the tree
like this?
oh, so both do the same
p much
π₯
rookie
i use 2000% cpu
mc has single handily taken java into the future 
without mc stuff like https://vineflower.org/ wouldn't have been born
how many cores is that?
people say the same shit about unity and C# meanwhile unity is like 4 C# versions behind all the time π
unity has fallen into irrelevancy
nope it's very much still relevant
A true gamblers algorithm would be partially sorting it then saying βjust one moreβ¦β and doing another bogo sort
killing other processes so you can take their resources to bogosort more
how do i compare if a user if friend with a user?
like, i'm planning to make an input that receives a friend as input by pings
if you mean whether a user is friends with someone else on discord bots cant see that
only the users can
i cant think of a better way of implementing a friend/relationship system other than having a table that stores 2 ids which are the 2 users that have said relationship
but when doing db lookups you need to do "if id1 is person or if id2 is person"
visual studio code explorer on right side of window users rise up
youre on your own
well, i realize that copying code from friend is impractical
well, at least there is the show code thing
that i created
so friends can copy it
that for macro
maybe Ai GMs for Roleplay servers (thought that would be complicated cus it's not python)
bro what the fuck is this suggestion
servers where you interact with your created characters
using tupperbox
and GM is game master
like, how DnD players have Game master for their story
somethign less specific is appreciated guys 
And i prefer to move away from games. just any project in general but i cannot come up with something fun tbf
okay so, is this normal?
apparently image is not a parameter
did you check the docs for the library you're using?
im having this error but i dont know how to fix it
it says empty message even tho im sending the poll
okay so this is strange:
i'm getting this error
but it wasn't suppose to be like that
cus i created a new rule in my grammar and it didn't identified
why?
description is empty most likely
console.log it
its logging the description
is your discord.js updated?
only the lastest version 14.15 supports polls
oh tysm man! i was at 14.14π
i can't even debug it
really complicated
i need to debug
never seen that before, also googling that error returns 0 results
that's why lark is not easy
ah idk anything about lark
there was friends mocking me for telling them that lark is difficult by they don't hear it, and just say "lol lark is easy cuz it's programmed 100% in python, and python is ez"
does anybody know why it takes so long to update from 14.14 to latest
npm is just slow
and djs is bloated huge
π
rookie
It's almost like discord.js kinda sucks!
it does
I cant tell if you're joking











