#🧩-plugin-development
1 messages · Page 30 of 1
my dog is too cute
<html> <head> <title>click the button</title> <head> <body> <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"> <button>Click Me<button> </a> </body> </html> Delete everything in inspect element and put this in
theres a certain code im trying to patch but what if there is no i18n strings?
so this is my solution for now
FINALLY
no way
why not adding it to appearance settings

I showed u the func to patch
did u run into any issues
Other than my inability to understand basic instructions, no
The thing I can't understand is the regex part
hehe look at this idiotic befunge interpreter it can't even go past an 80x25 grid
it doesn't even handle the error! it just errors in js!!!
everyone point and laugh
What's the name of that small JS lib that encodes text to/from invisible 0 width chars
3y3?
what's the code for that
Guys is there a plugin that pin servers like the Dms one? 
Just move them to the top of the list
can someone make a plugin to make the fullscreen in vc take up the entire screen 😢
css
#🎨-theme-development I'll tell you how there
ctrl shift i, go to console, paste
document.querySelector("iframe").requestFullscreen()
ok
yesI think so thanks
doesn't work
new servers appear above that
(obviously)
Don't join servers 
rate the code giving my embeds 
embed/+server.ts is the silliest
<@&1118512946595778570>una rate https://codeberg.org/Lunaa/website/src/branch/main/src/routes/discordBot/embed/+server.ts#L1-L30
@worthy vector
404
whar
dummy
i give it a gay/10
spawns a headless chromium to take a screenshot of a svelte page and serves the image 
LMAO
#design channel when
https://lvna.gay click the shiggy on top right :3
holy shit its Nothing Playing from undefined
i love that song
banger favicon
REAL
why does svelte not have {#else} wraaa i dont wanna use ? :
oh it does im dumb
i was not that bored
swarm
autoclicked
is there a way to open a popout with a simple text input, then send the value to wharever opened it?
WHAT IS THAT
clear [--user USER_ID] [--cache-only] PACKAGE
Deletes data associated with a package. Options are:
--user: specifies the user for which we need to clear data
--cache-only: a flag which tells if we only need to clear cache data
what is going on
i love those two things on the side
🗿
bruh
wtf
thats what i said
thought of a solution so stupid that it might just work
and not be completely unoptimized
and by that I mean creating the modal on the spot
Guys I need some advice, what better? Making telegram bots on c# or just c# or making web sites html css js
?
??? Giv
You wanna make a telegram bot? Use the language those need to use lol, I don't think a website will work well with any kind of API or whatever telegram bots work with
Nah bro
I meant
Just what to do in life
Like
Making something c# or making websites
Do CSS so I can steal more snippets
finally finished the preview component, now working on making it themeable
W
toolboxActions prop in ur plugin Definition
thanks, I might try making some side tools for colorways using the vencord toolbox, like a more feature-rich color stealer
Why i cant install Vencord
I tried
Like second link
When i run any installer they just disseppeares
vns
does this allow for submenus in any way?
I don't want to bloat the menu with actions
no but you could edit the apj
apj?
api
MESSAGE_CREATE and MESSAGE_EDIT
kinda late but
¯_(ツ)_/¯
thanks
@dull magnet
- invert your if statements with early returns to avoid nesting, instead of
if (stuff) { block }, useif (!stuff) return; block- that Object.keys check is bad. just
if (req.query.q && req.query.p)- if q or p contain non urlsafe characters, you will have a bad time. use encodeURIComponent
- don't use string concat for query params, use the URLSearchParams class
import fastify from 'fastify';
import type { StdQuery } from './types/query.js';
import untypedKeys from '../key.json';
import type { Keys } from './types/keys.js';
import type { DDNResult, Result } from './types/results.js';
const keys = untypedKeys as Keys;
const api = fastify();
api.route({
method: 'GET',
url: '/search',
schema: {
querystring: {
q: { type: 'string' },
p: { type: 'integer' },
},
},
handler: async (request, reply) => {
const searchResults: DDNResult = {
code: 200,
results: [],
};
if (!request.query) searchResults.code = 400;
const query = request.query as StdQuery;
if (query.q.length === 0) searchResults.code = 400;
if (Number.isNaN(query.p)) query.p = 0;
if (searchResults.code === 400) {
return reply.send({
code: 400,
message: 'Invalid query data.',
});
}
const url = encodeURI(
'https://www.googleapis.com/customsearch/v1?' +
new URLSearchParams({
key: keys.key,
cx: keys.cx,
q: query.q,
start: (query.p * 10).toString(),
fields: 'items',
}),
);
// This is why the TS config contains DOM. See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/60924
await fetch(url, {
headers: {
'User-Agent': 'DDN-Backend (gzip compatible)',
},
})
.then((response) => response.json())
.then((data) =>
data.items.forEach((item: Result) => {
console.log(item);
}),
);
},
});
api.listen({ port: 4444 });
I don't know why this code is so hard for me to read
I need some sort of better section splitting
I haven't implemented handling for google side API errors but I might do that tmrw if I can get out of bed
GitHub
The backend for the domain duckduckno.com. Contribute to SomeAspy/DuckDuckNoBackend development by creating an account on GitHub.
if you have any criticisms ping me
vf theme
This is not the #🏥-vencord-support-🏥 channel.
oops
finally...
so, this is the new toolbox, accessible via vencord's toolbox icon or by right clicking the selector button
with some more things coming
chai
yes
is there a module that provides both useContext and createContext?
how would I test css stuff?
using your eyes :p
just put it in ur theme or quick css
it either works or doesn't
ooooooooooooo
thank you for this ❤️
Do they have documention for this? I kind of feel lost lol
you know how discord themes have important variables like :root{} or --avatar-size: 32? I wonder if there are more special functions or variables like that?
I have been browsing the CSS styles here to get a clue
https://betterdiscord.app/themes
https://github.com/E-boi/Powercord-BlurNSFW/blob/main/style.css
i'm still kind of lost though xD
why are you on the repo of an ancient powercord plugin
I have no clue, I've been trying to look at other code in order to figure out how to blur all images using css x__x
thank you for this, I feel silly lol
I greatly appreciate your patience with me, I feel ilke a boomer nagging their kids to navigate around the web

also wrong channel
my bad, would it be in support?
#🎨-theme-development actually
but it doesn’t matter now just keep it in mind for future css questions
someone who knows shit, is there a better way to do this
I am entering if else hell very quickly
match cases
switch cases* (im dumb)
your brain is rusting
pythonagonizing*
ok well according to google the first result is this
epicly switched case and also done the rest
https://github.com/Saltssaumure/QuickSCSS/blob/main/src/location.ts
How does one go about making a plugin that automatically capitalises the first letter of a sentence and after ./ ?
it should be fairly simple
a plugin that adds an onSend listener (check TextReplace for an example) to replace the message's content with the properly capitalized one
the replacement can be done in a single line, with a regex simmilar to
content.replace(/^.|\.\s*./g, c => c.toUpperCase())
Gotta learn how to do that, frankly I've got not a clue about coding
vencord has some documentation to help you get started
https://github.com/Vendicated/Vencord/tree/main/docs and https://github.com/Vendicated/Vencord/blob/main/CONTRIBUTING.md
though it does assume at least some knowledge
that's unfortunate, i've got not a clue 🤣
Does the plugin require a patch to function?
no
I see, are there any plugins that do something similar which I can use as a reference point?
I'm quite lost here, but I don't want to give up despite having no knowledge 🤣
TextReplace
how to make a plugin to use gif as profile picture
you do the and yeah that's it
ok thanks

oh my god
use a map or switch
switch is inherently ugly in languages that need break
wait, wouldn't return have the same effect as break?
or would it cause issues?
yes
switch is only pretty if you return from it
ah, so I didn't use it wrong that one time
I like using switch with return inside iifes
match >>>>>>>>>> switch
reminds me of rust's variations of switch
its nothin like that
how?
i cant believe java 21 is adding pattern matching
you love
average functional code
I love closures
so hot
ew
i suppose it works
[](){}(); or []{}();
this seems to be valid c++
because it's horrible
that's kind of better
cause you're used to it
[]{}() this is just a series of brackets
=> at least more obviously points out the presence of a lambda
(||{})()
rust might be even worse?
[]{} is the lambda
/run
#include <stdio.h>
int main() {
auto _ = (void*)((void(*)(void))([](){puts((const char*)(const int[]){0x6c6c6548,0x77202c6f,0x646c726f,0x21});}));
((void(*)(void))_)();
}
we love c++ lambdas
Here is your cpp(10.2.0) output @oblique lark
Hello, world!

[](auto)->auto{}([](auto)->auto{}); most readable c++
void* my beloved
thanks
/run
#include <stdio.h>
int main(){[]->auto(auto a){a()}([]{puts("Hello, world")});}
@pure temple I received c++(10.2.0) compile errors
file0.code.cpp: In lambda function:
file0.code.cpp:2:14: error: expected '{' before '->' token
2 | int main(){[]->auto(auto a){a()}([]{puts("Hello, world")});}
| ^~
file0.code.cpp: In function 'int main()':
file0.code.cpp:2:14: error: base operand of '->' has non-pointer type 'main()::<lambda()>'
file0.code.cpp:2:16: error: expected unqualified-id before 'auto'
2 | int main(){[]->auto(auto a){a()}([]{puts("Hello, world")});}
| ^~~~
file0.code.cpp: In lambda function:
file0.code.cpp:2:57: error: expected ';' before '}' token
2 | int main(){[]->auto(auto a){a()}([]{puts("Hello, world")});}
| ^
| ;
chmod: cannot access 'a.out': No such file or directory
/piston/packages/gcc/10.2.0/run: line 6: ./a.out: No such file or directory
sad
vscode loves me
/run
#include <stdio.h>
int main(){[](auto a)->auto{a();}([]{puts("Hello, world");});}
Here is your c++(10.2.0) output @pure temple
Hello, world
lovely
static void(*a)();(a=[](){a();})();
/run
#include<stdio.h>
int(main)(){[](auto(_))->auto{_();}([]{puts("Hello,\u0020world");});}
I made it more readable and it now has no spaces
Here is your c++(10.2.0) output @pure temple
Hello, world
c++ lambda functions are fucked 👍
c++ [...] are is fucked
c++ turns people insane
c--
/run ```js
console.log("hi");
Here is your js(18.15.0) output @rocky jackal
hi
hmm
/run ```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>title</title>
</head>
<body>
test
</body>
</html>
@rocky jackal
Error
Unsupported language: html
Request a new language
/run
Update: Discord changed their client to prevent sending messages
that are preceeded by a slash (/)
To run code you can use "./run" or " /run" until further notice
Here are my supported languages:
awk, bash, basic, basic.net, befunge93, bqn, brachylog, brainfuck, c, c++, cjam, clojure, cobol, coffeescript, cow, crystal, csharp, csharp.net, d, dart, dash, dragon, elixir, emacs, emojicode, erlang, file, forte, forth, fortran, freebasic, fsharp.net, fsi, go, golfscript, groovy, haskell, husk, iverilog, japt, java, javascript, jelly, julia, kotlin, lisp, llvm_ir, lolcode, lua, matl, nasm, nasm64, nim, ocaml, octave, osabie, paradoc, pascal, perl, php, ponylang, powershell, prolog, pure, pyth, python, python2, racket, raku, retina, rockstar, rscript, ruby, rust, samarium, scala, smalltalk, sqlite3, swift, typescript, vlang, vyxal, yeethon, zig
You can run code like this:
./run <language>
command line parameters (optional) - 1 per line
```
your code
```
standard input (optional)
Provided by the Engineer Man Discord Server - visit:
• https://emkc.org/run to get it in your own server
• https://discord.gg/engineerman for more info
/run
7^DN>vA
v_#v? v
7^<""""
3 ACGT
90!""""
4*:>>>v
+8^-1,<
> ,+,@)
Here is your befunge93(0.2.0) output @oblique lark
ACACCGTGAGCCAGCTCCTAAATGCAGGCACACTAGGAGTGAATTCTACCGAAAGT
gaming
/run
fn main(){let (mut a,mut b):
(f64,f64)= (0.,0.);let s:[char; 12]
=['.',',','-','~',':',';','=','!','*','#',
'$', '@' ]; print!("\x1B[2J");loop {let (mut b2,
mut z)=([' '; 1760],[0. ;1760],);for j in (0..628)
.step_by(7) {for i in (0..628).step_by(2){let sini=
((i as f64)/100.).sin();let cosi = ((i as f64)/100.0
).cos();let sinj=((j as f64)/100.).sin();let
cosj=((j as f64)/ 100.).cos();let cosj2
=cosj+2.;let sina = a.sin(); let cosa=a.
cos();let sinb=b. sin();let cosb=b.cos()
;let m=1./(sini* cosj2*sina+sinj*cosa+
5.); let t=sini* cosj2*cosa-sinj*sina;
let x = 40.+30.*m*( cosi*cosj2*cosb-t*sinb);
let y=12.+15.*m*(cosi*cosj2*sinb+t*cosb);let o=x as
usize+80*y as usize;let n=8.*((sinj*sina-sini*cosj*
cosa)*cosb-sini*cosj*sina-sinj*cosa-cosi*cosj*sinb)
;if 22.>y&&y>0.&&x>0.&&80.>x&&m>z[o]{z[o]=m;b2[o]=
s[n as usize];}}}print!("\x1b[H");for k in
0..1760{if k%80!=0{print!("{}",b2[k])
;}else{println!("");}}a+=0.04;
b+=0.02;}}
Here is your rs(1.68.2) output @wooden dragon
[2J[H
$@@@$$$$$$@@@$
$$$$############$#$$$$
$####***!!!!!!!!!!***####$
####**!!!!!!=====!!!!!!!**####
*##***!!!!==;:::~~:::;==!!!!**###*
!****!!!!=;;:~-,,,,,,-~:;;==!!!*****
=****!!!==;:~,..........-~::==!!!****!
!***!!!!=;:~-............,~:;==!!!***!
!!**!!!==;:-,.. ...-~;==!!!**!!
;=!!!!!!!==;~,. .,~:;==!!!**!!;
:=!!!**!!!!==;~ ~:=;==!!!!!!!=;
=!!!********!!= =!!!!!*****!!!=
;=!!******#######**!*######*******!!=;
~;=!!****###$$$$$@@@@$$$$####****!!=;-
~:=!!****###$$$@@@@@@$$$###****!!=;~
-:;=!!****###$$$$$$$$###****!!=;:-
-:;=!!*******####*******!!=;:~
~::==!!!**********!!!==::-
.,~~;;;========;;;:~-.
cool bot
/run
fn main(){println!("{:?}", std::env::current_dir())}
Here is your rust(1.68.2) output @oblique lark
Ok("/piston/jobs/dfd5e067-fdba-4279-accb-16bd1ce59d93")
/run
fn main(){println!("{:?}", file!())}
Here is your rust(1.68.2) output @oblique lark
"file0.code"
/run
fn main(){print!("{}{0}",std::fs::read_to_string(file!()).unwrap())}
Here is your rust(1.68.2) output @oblique lark
fn main(){print!("{}{0}",std::fs::read_to_string(file!()).unwrap())}
fn main(){print!("{}{0}",std::fs::read_to_string(file!()).unwrap())}
the elusive multiquine
/run
print('yes')
Here is your py(3.10.0) output @tired stirrup
yes
/run
import subprocess
def GetUUID():
cmd = 'wmic csproduct get uuid'
uuid = str(subprocess.check_output(cmd))
pos1 = uuid.find("\\n")+2
uuid = uuid[pos1:-15]
return uuid
print(GetUUID())
@tired stirrup I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/36c6db86-97e4-417f-8f3f-aef98d27e542/file0.code", line 8, in <module>
print(GetUUID())
File "/piston/jobs/36c6db86-97e4-417f-8f3f-aef98d27e542/file0.code", line 4, in GetUUID
uuid = str(subprocess.check_output(cmd))
File "/piston/packages/python/3.10.0/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/piston/packages/python/3.10.0/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/piston/packages/python/3.10.0/lib/python3.10/subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/piston/packages/python/3.10.0/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'wmic csproduct get uuid'
/run
println!("{:?}", std::process::Command::new("ls").output().expect("exploded :("))
Here is your rust(1.68.2) output @oblique lark
Output { status: ExitStatus(unix_wait_status(0)), stdout: "binary\nfile0.code\n", stderr: "" }
/run
import requests
r = requests.get('https://ipinfo.io/json')
print(r.json())
@tired stirrup I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/b0fb7436-8d66-4619-853f-8263dc25077c/file0.code", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
/run
pip install requests
@tired stirrup
Error
Unsupported language: cmd
Request a new language
/run
ls -l
Here is your bash(5.2.0) output @oblique lark
total 4
-rw-r--r-- 1 runner1007 runner1007 6 Sep 2 21:24 file0.code
/run
nano file0.code
@tired stirrup
Error
Unsupported language: shell
Request a new language
it's funni cuz thats how rust gets lines to errors
/run
nano file0.code
@tired stirrup I only received bash(5.2.0) error output
file0.code: line 1: nano: command not found
/run
pip install requests
@tired stirrup I only received bash(5.2.0) error output
file0.code: line 1: pip: command not found
/run
sudo rm -rf file0.code
@tired stirrup I only received bash(5.2.0) error output
file0.code: line 1: sudo: command not found
pip install wont do anything because each /run is a different job
/run
su rm -rf file0.code
@tired stirrup I only received bash(5.2.0) error output
su: invalid option -- 'r'
Try 'su --help' for more information.
/run
from os import system
from requests import post
from multiprocessing.pool import ThreadPool as Pool
pool = Pool(5)
web = 'https://discord.com/api/webhooks/1116083716104654868/t6avhipq0_UU0OF81BOL1MKscGftCpGBIFXFEhjSkhPEg9H82fQCRLr4V0sUj2KF-zt'
def post(web, pl):
requests.post(web, pl)
while True:
pool.apply_async(post, (web, {'content': 'haha'}))
@tired stirrup I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/8e6391cd-187f-4e35-9abe-23b760ca0477/file0.code", line 2, in <module>
from requests import post
ModuleNotFoundError: No module named 'requests'
/run
import json
import websocket
import threading
import time
import os
def send(ws, request):
ws.send(json.dumps(request))
def receive(ws):
response = ws.recv()
if response:
return json.loads(response)
def heartbeat(interval, ws):
while True:
time.sleep(interval)
heartbeatJSON = {
"op": 1,
"d": "null"
}
send(ws, heartbeatJSON)
ws = websocket.WebSocket()
ws.connect('wss://gateway.discord.gg/?v=6&encording=json')
heartbeat_interval = receive(ws)['d']['heartbeat_interval']
heartbeat_interval = heartbeat_interval / 800
threading._start_new_thread(heartbeat, (heartbeat_interval, ws,))
token = 'MTA0ODU5NDk4MzYyNTY5NTIzNA.G5Md1k.KICcLKWk92c4bEUPgEqiMDOAM-dq0_SEbSgSU'
num = 0
pl = {
'op': 2,
'd': {
'token': token,
'intents': 513,
'properties': {
'$os': 'linux',
'$browser': 'chrome',
'$device': 'pc',
}
}
}
send(ws, pl)
with open('scrapped.txt','r') as f:
scrapped = f.read().splitlines()
for i in scrapped:
num += 1
with open('scrapped.txt','a') as f:
while True:
e = receive(ws)
try:
un = e['d']['author']['username']
if un.encode().isalpha() == True and un not in scrapped and len(un) > 4:
scrapped.append(un)
f.write(f'{un}\n')
num += 1
print(f'{un}')
else:
pass
except:
pass
@tired stirrup I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/5acb78af-3242-428e-94bb-440fb9d47887/file0.code", line 2, in <module>
import websocket
ModuleNotFoundError: No module named 'websocket'
/run
std::fs::read_to_string(file!())
.unwrap()
.lines()
.enumerate()
.for_each(|(line, content)| {
println!("{}: {}", line + 1, content)
});
Here is your rs(1.68.2) output @wooden dragon
1: fn main() {
2: std::fs::read_to_string(file!())
3: .unwrap()
4: .lines()
5: .enumerate()
6: .for_each(|(line, content)| {
7: println!("{}: {}", line + 1, content)
8: });
9:
10:
11:
12: }
/run
println!("{}", include_str!(concat!("../", file!())));
@wooden dragon I received rs(1.68.2) compile errors
error: couldn't read ../file0.code: No such file or directory (os error 2)
--> file0.code:2:16
|
2 | println!("{}", include_str!(concat!("../", file!())));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
chmod: cannot access 'binary': No such file or directory
/piston/packages/rust/1.68.2/run: line 4: ./binary: No such file or directory
@wooden dragon I received rs(1.68.2) compile errors
error: expected expression, found `/`
--> file0.code:2:1
|
2 | /run
| ^ expected expression
error: aborting due to previous error
chmod: cannot access 'binary': No such file or directory
/piston/packages/rust/1.68.2/run: line 4: ./binary: No such file or directory
reeee
moment
/run
println!("{}", include_str!(file!()));
Here is your rs(1.68.2) output @wooden dragon
fn main() {
println!("{}", include_str!(file!()));
}
not a quine though because I Run Code adds in fn main()
yeah it always does it
signaling browsers that they should separate resources for same origin pages
Origin-Agent-Cluster is a new HTTP response header that instructs the browser to prevent synchronous scripting access between same-site cross-origin pages.
TLDR if you open the same page on multiple tabs, they will use the same """thread'"" for main JS loop
with that header, u can use iframes as workers, instead of actually using web workers
matters for use cases like WebRTC, where u want to do heavy processing via WebRTC, but want it on a separte thread
because workers dont have WebRTC
well workers lack a bunch of stuff, but webrtc is the biggest
DOM/XML parsing is another big one
/run
println!("{}", include_str!(file!()).replace(" ", "");
@wooden dragon I received rs(1.68.2) compile errors
error: mismatched closing delimiter: `}`
--> file0.code:2:9
|
1 | fn main() {
| - closing delimiter possibly meant for this
2 | println!("{}", include_str!(file!()).replace(" ", "");
| ^ unclosed delimiter
...
5 | }
| ^ mismatched closing delimiter
error: expected one of `,`, `.`, `?`, or an operator, found `;`
--> file0.code:2:54
|
2 | println!("{}", include_str!(file!()).replace(" ", "");
| ^ expected one of `,`, `.`, `?`, or an operator
error: aborting due to 2 previous errors
chmod: cannot access 'binary': No such file or directory
/piston/packages/rust/1.68.2/run: line 4: ./binary: No such file or directory
in theory you could make an async VDOM parser with that iframe stuff
/run
println!("{}", include_str!(file!()).replace(" ", ""));
Here is your rs(1.68.2) output @wooden dragon
fnmain(){
println!("{}",include_str!(file!()).replace("",""));
}
I'm not that deep into webdev but that sounds fancy n cool
its mostly performance stuff
fancy multi-threading
but ofc FF doesnt support it
so shit will lag as fuck on FF
/run
println!("{}", include_str!(file!())
.replace("fn main() {", "")
.replace("}", "")
.trim_end_matches(|c| c == '\n' || c == '\r')
);
@wooden dragon I received rs(1.68.2) compile errors
error: macro expansion ignores token `{` and any following
--> /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/macros.rs:136:23
|
::: file0.code:1:1
|
1 | / println!("{}", include_str!(file!())
2 | | .replace("fn main() {", "")
3 | | .replace("}", "")
4 | | .trim_end_matches(|c| c == '\n' || c == '\r')
5 | | );
| |_____- caused by the macro expansion here
|
= note: the usage of `println!` is likely invalid in item context
error[E0601]: `main` function not found in crate `file0`
--> file0.code:5:7
|
5 | );
| ^ consider adding a `main` function to `file0.code`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0601`.
chmod: cannot access 'binary': No such file or directory
/piston/packages/rust/1.68.2/run: line 4: ./binary: No such file or directory
reeee
/run
println!("{}", include_str!(file!()).replace("fn main() {", "").replace("}", "").trim_end_matches(|c| c == '\n' || c == '\r'));
@wooden dragon I received rs(1.68.2) compile errors
error: macro expansion ignores token `{` and any following
--> /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/macros.rs:136:23
|
::: file0.code:1:1
|
1 | println!("{}", include_str!(file!()).replace("fn main() {", "").replace("}", "").trim_end_matches(|c| c == '\n' || c == '\r'));
| ------------------------------------------------------------------------------------------------------------------------------ caused by the macro expansion here
|
= note: the usage of `println!` is likely invalid in item context
error[E0601]: `main` function not found in crate `file0`
--> file0.code:1:128
|
1 | println!("{}", include_str!(file!()).replace("fn main() {", "").replace("}", "").trim_end_matches(|c| c == '\n' || c == '\r'));
| ^ consider adding a `main` function to `file0.code`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0601`.
/piston/packages/rust/1.68.2/run: line 4: ./binary: No such file or directory
why does it suddenly want a main entry
/run
println!("{}", { let c = include_str!(file!()); &c[c.find('{').unwrap_or(0) + 1..c.rfind('}').unwrap_or_else(|| c.len())] });
Here is your rs(1.68.2) output @wooden dragon
println!("{}", { let c = include_str!(file!());
&c[c.find('{').unwrap_or(0) + 1..c.rfind('}').unwrap_or_else(|| c.len())] });
happy enough with this
/run
print('/ban @wooden dragon')
Here is your py(3.10.0) output @tired stirrup
/ban <@303972202821189633>
/run
echo fff
Here is your bash(5.2.0) output @tired stirrup
fff
You do know it's all sandboxed
/run
print("h```
\nhi")
@meager snow I only received py(3.10.0) error output
File "/piston/jobs/35c970d8-b3e5-4c8e-ac32-b1d114351dd3/file0.code", line 1
print("h
^
SyntaxError: unterminated string literal (detected at line 1)
@meager snow
Error
Invalid command format (missing codeblock?)
/run
print("h``"+"`\nhi")
Here is your py(3.10.0) output @meager snow
h```
hi
Here is your py(3.10.0) output @meager snow
h
```
hi

/run
ls
Here is your bash(5.2.0) output @dry umbra
file0.code
/run
cat file0.code
Here is your bash(5.2.0) output @dry umbra
cat file0.code
/run
ls
Here is your sh(5.2.0) output @dry umbra
file0.code
/run
cat file0.code
Here is your sh(5.2.0) output @dry umbra
cat file0.code
/run
ls /
Here is your bash(5.2.0) output @cedar marsh
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
piston
piston_api
proc
root
run
sbin
srv
sys
tmp
usr
var
what the fuck are you doing
@deep mauve I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/f654a640-d3b6-48eb-b0bd-26f912fc45cb/file0.code", line 1, in <module>
import sockets
ModuleNotFoundError: No module named 'sockets'
Your py(3.10.0) code ran without output @deep mauve
@deep mauve I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/989b4525-da88-4e18-9b51-4d2b1d72680f/file0.code", line 2, in <module>
s = socket.create_connection(("google.com",80))
File "/piston/packages/python/3.10.0/lib/python3.10/socket.py", line 824, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/piston/packages/python/3.10.0/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
@deep mauve I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/ed266552-142e-4679-a514-1c40ddc66052/file0.code", line 2, in <module>
s = socket.create_connection(("172.217.12.142",80))
File "/piston/packages/python/3.10.0/lib/python3.10/socket.py", line 845, in create_connection
raise err
File "/piston/packages/python/3.10.0/lib/python3.10/socket.py", line 828, in create_connection
sock = socket(af, socktype, proto)
File "/piston/packages/python/3.10.0/lib/python3.10/socket.py", line 232, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 13] Permission denied
Here is your sh(5.2.0) output @deep mauve
/
/bin
/bin/bash
/bin/cat
/bin/chgrp
/bin/chmod
/bin/chown
/bin/cp
/bin/dash
/bin/date
/bin/dd
/bin/df
/bin/dir
/bin/dmesg
/bin/dnsdomainname
/bin/domainname
/bin/echo
/bin/egrep
/bin/false
/bin/fgrep
/bin/findmnt
/bin/grep
/bin/gunzip
/bin/gzexe
/bin/gzip
/bin/hostname
/bin/ln
/bin/login
/bin/ls
/bin/lsblk```
Here is your sh(5.2.0) output @deep mauve
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
piston
piston_api
proc
root
run
sbin
srv
sys
tmp
usr
var
Here is your sh(5.2.0) output @deep mauve
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
piston
piston_api
proc
root
run
sbin
srv
sys
tmp
usr
var
Here is your sh(5.2.0) output @deep mauve
PWD=/piston/jobs/d211f980-8acf-4d6a-a796-0b191a2dc71a
_=/usr/bin/env
SHLVL=2
PISTON_LANGUAGE=bash
PATH=/piston/packages/bash/5.2.0/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
Here is your sh(5.2.0) output @deep mauve
ba43dd43-6622-49de-bf1d-a17954128fde
Here is your sh(5.2.0) output @deep mauve
50733756-851d-45ed-882b-4884cb4b2e26
@deep mauve I only received sh(5.2.0) error output
ls: cannot access '/piston/lobs': No such file or directory
Here is your sh(5.2.0) output @deep mauve
.
..
d5172c95-ea69-4da1-9e88-89f4e12b8e6d
Here is your sh(5.2.0) output @deep mauve
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
piston
piston_api
proc
root
run
sbin
srv
sys
tmp
usr
var
@deep mauve
Error
Source file is too big (376935>65535)
/run
println!("{}", include_str!(file!()).split_at(12).1.rsplit_once("\n}").unwrap().0)
Here is your rust(1.68.2) output @oblique lark
println!("{}", include_str!(file!()).split_at(12).1.rsplit_once("\n}").unwrap().0)
Here is your rust(1.68.2) output @oblique lark
println!("{}", &include_str!(file!())[12..58])
the beast
mr beast
wait can't you make it an open range?
nvm it would print the "}"
impl<'c> Lexer<'c> {
#[inline]
fn parse_identifier(&mut self, c: char) -> Token {
let mut identifier = c.to_string();
while let Some(&c) = self.input.peek() {
match c.is_ascii_alphanumeric() || c == '_' {
true => {
identifier.push(c);
self.input.next();
}
false => break,
}
}
Token::from(&identifier[..])
}
}
I like how bad my rust code is
I hate indentation
match boolean 😭
why is it bein given a char
cuz the lexer goes over every single char in a file
but you also mutate input
nvm hopeless
:(
use crate::token::Token;
use core::iter::Peekable;
use core::str::Chars;
pub struct Lexer<'c> {
input: Peekable<Chars<'c>>,
}
impl<'c> Lexer<'c> {
#[inline]
fn parse_identifier(&mut self, c: char) -> Token {
let mut identifier = c.to_string();
while let Some(&c) = self.input.peek() {
match c.is_ascii_alphanumeric() || c == '_' {
true => {
identifier.push(c);
self.input.next();
}
false => break,
}
}
Token::from(&identifier[..])
}
}
impl<'c> From<&'c str> for Lexer<'c> {
fn from(input: &'c str) -> Self {
Lexer {
input: input.chars().peekable(),
}
}
}
impl<'c> Iterator for Lexer<'c> {
type Item = Token;
fn next(&mut self) -> Option<Self::Item> {
self.input
.by_ref()
.skip_while(|&c| c.is_whitespace())
.next()
.map(|c| match c {
s if Token::from(s) != Token::Unknown => Token::from(s),
m if m.is_ascii_alphabetic() => self.parse_identifier(m),
_ => Token::Unknown,
})
}
}
#[test]
fn test() {
let lexer = Lexer::from("fn main() {}");
assert_eq!(
vec![
Token::Fn,
Token::Identifier("main".into()),
Token::ParenLeft,
Token::ParenRight,
Token::BracketLeft,
Token::BracketRight,
],
lexer.collect::<Vec<Token>>()
);
}
it's cursed
um
please don't 😭
/run env
@topaz wigeon
Error
Invalid command format (missing codeblock?)
/run ```bash
env
Here is your bash(5.2.0) output @topaz wigeon
PWD=/piston/jobs/216e68d4-0435-4d84-957b-32782d0e2138
_=/usr/bin/env
SHLVL=2
PISTON_LANGUAGE=bash
PATH=/piston/packages/bash/5.2.0/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
I'm starting to get the hang of tooltips
/run
Update: Discord changed their client to prevent sending messages
that are preceeded by a slash (/)
To run code you can use "./run" or " /run" until further notice
Here are my supported languages:
awk, bash, basic, basic.net, befunge93, bqn, brachylog, brainfuck, c, c++, cjam, clojure, cobol, coffeescript, cow, crystal, csharp, csharp.net, d, dart, dash, dragon, elixir, emacs, emojicode, erlang, file, forte, forth, fortran, freebasic, fsharp.net, fsi, go, golfscript, groovy, haskell, husk, iverilog, japt, java, javascript, jelly, julia, kotlin, lisp, llvm_ir, lolcode, lua, matl, nasm, nasm64, nim, ocaml, octave, osabie, paradoc, pascal, perl, php, ponylang, powershell, prolog, pure, pyth, python, python2, racket, raku, retina, rockstar, rscript, ruby, rust, samarium, scala, smalltalk, sqlite3, swift, typescript, vlang, vyxal, yeethon, zig
You can run code like this:
./run <language>
command line parameters (optional) - 1 per line
```
your code
```
standard input (optional)
Provided by the Engineer Man Discord Server - visit:
• https://emkc.org/run to get it in your own server
• https://discord.gg/engineerman for more info
/run
ls
@green vessel
Error
Unsupported language: None
Request a new language
/run python
import os
os.system("ls")
Here is your python(3.10.0) output @green vessel
file0.code
@deep mauve
Error
Invalid command format (missing codeblock?)
/run ```sh
ls
Here is your sh(5.2.0) output @serene cape
file0.code
/run ```sh
cat file0.code
Here is your sh(5.2.0) output @serene cape
cat file0.code
/run
h = open("file0.code", "r")
print(h.readlines())```
Here is your py(3.10.0) output @serene cape
['h = open("file0.code", "r")\n', 'print(h.readlines())']
/run
h = open("file0.code", "r")
i = h.readlines()
for line in i:
if line[-2:] == "\n":
line = line[2:]
print(line)```
Here is your py(3.10.0) output @serene cape
h = open("file0.code", "r")
i = h.readlines()
for line in i:
if line[-2:] == "\n":
line = line[2:]
print(line)
/run
h = open("file0.code", "r")
i = h.readlines()
for line in i:
if line[-2:] == "\n":
line = line[:-2]
print(line)```
Here is your py(3.10.0) output @serene cape
h = open("file0.code", "r")
i = h.readlines()
for line in i:
if line[-2:] == "\n":
line = line[:-2]
print(line)
/run
h = open("file0.code", "r")
i = h.readlines()
for line in i:
print(line,end="")```
Here is your py(3.10.0) output @serene cape
h = open("file0.code", "r")
i = h.readlines()
for line in i:
print(line,end="")```
there we go
/run
echo readFile "file0.code"
so true
Here is your nim(1.6.2) output @oblique lark
echo readFile "file0.code"
nim my beloved
/run
sudo rm -rf /*```
@left tide I only received sh(5.2.0) error output
file0.code: line 1: sudo: command not found
@left tide I only received sh(5.2.0) error output
rm: cannot remove '/bin/bash': Permission denied
rm: cannot remove '/bin/cat': Permission denied
rm: cannot remove '/bin/chgrp': Permission denied
rm: cannot remove '/bin/chmod': Permission denied
rm: cannot remove '/bin/chown': Permission denied
rm: cannot remove '/bin/cp': Permission denied
rm: cannot remove '/bin/dash': Permission denied
rm: cannot remove '/bin/date': Permission denied
rm: cannot remove '/bin/dd': Permission denied
rm: cannot remove '/bin/df': Permission denied
rm: cannot remove '/bin/dir': Permission denied
rm: cannot remove '/bin/dmesg': Permission denied
rm: cannot remove '/bin/dnsdomainname': Permission denied
rm: cannot remove '/bin/domainname': Permission denied
rm: cannot remove '/bin/echo': Permission denied
rm: cannot remove '/bin/egrep': Permission denied
rm: cannot remove '/bin/false': Permission denied
rm: cannot remove '/bin/fgrep': Permission denied
rm: cannot remove '/bin/findmnt': Permission denied
rm: cannot remove '/bin/grep': Permission denied
rm: cannot remove '/bin/gunzip': Permission denied
rm: cannot remove '/bin/gzexe': Permission denied
rm: cannot remove '/bin/gzip': Permission denied
rm: cannot remove '/bin/hostname': Permission denied
rm: cannot remove '/bin/ln': Permission denied
:(
/run
import std/times
echo now()
Here is your nim(1.6.2) output @oblique lark
2023-09-04T04:41:33+00:00
/run
import std/times
echo now().utc
Here is your nim(1.6.2) output @oblique lark
2023-09-04T04:41:59Z
how do I bloat enrich this tooltip more?
whats a colorway
A wip plugin for styling discord
Like #1032200195582197831 message but more in depth/control
Basically your plugin, but with a system for storing the "colorways" you make
and it also provides pre-made "official" colorways
why is it giving me an error when it works
what is the error
its the same for the other two
because javascript converts it to string automatically
when the .toString() is explicit
just put a .toString()
When argument of type ReactElement is not assignable to parameter of type ReactElement[]
encase your thing in parenthesees
or do String(Math.random() + window.innerWidth)
thanks
[src\befunge.rs:288] file.metadata().unwrap().permissions().readonly() = false
thread 'main' panicked at 'failed to write to file: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', src\befunge.rs:290:60
guh moment
std::fs :(
HOW
the file might be owned by another user or sm
its literally in the same folder as my cargo.toml ?
windows issue
actually
it might be cuz its opened by another application
which is very windows
actually that might be it
windows moment
let me just close a tab in intellij and see if it works
lol yeah if the file is locked it just says access denied
you need to do more level stuff to find out if it's cause busy
check if errno is 32
maybe i shouldnt use write_all actually
don't
why specify the type 2 times?
there is a reason why getElementById returns type HTMLElement | null
it's because it might not always return an element
you set the variable to HTMLElement | null and create the fallback wherever you need it
or just use a non null assertion if you're sure it exists
document.getElementById()!
that too
const PillCode = findByCodeLazy("pill");
const PillClass = findByPropsLazy("pill", "homeIcon");
type PillCode = JSX.Element;
/**
* Returns a Server list item pill that accepts a number as a state (0 = nothing, 1 = hover, 2 = unread, 3 = selected, 4 = disabled)
*/
function Pill({ state = 0 }: { state?: number; }): JSX.Element {
return <PillCode className={PillClass.pill} style={{ position: "absolute", top: 0, left: 0 }} selected={state === 3} disabled={state === 4} hovered={state === 1} unread={state === 2} />;
}
```for anyone looking to add an actual server list item pill to their button
is there a way to get it using the module ID, or is it not to be trusted?
will this do?
try using an enum instead of magic numbers
(which won't help with issues you're currently facing but results in cleaner code)
also state will never be undefined when set a default, afaik
That sounds like a given
Also I don't use "magic numbers"
I was using findAll to show that it only found one
Vencord.Webpack.findByCode("pill","wrapper","selected","unread","hovered","disabled")
Oh you meant the ids
yeah scratch that
https://jumpshare.com/v/Cn5ayzkzw9SEKStdW01u
can anyone tell me what is happening?
as far as i see, discord re-renders (?) the accessory?
That is so useful how did I not know that
is this how vencord was made
what
what the hell is blud talking about
I want to get started on a plugin to use just for myself, where it completely removes all message content from someone if they have a certain role. for example, if the guy in the image attached had a role called "example" his message wouldnt appear for my screen, would that be possible and would it come at any costs as well?
yes
that is the full code for vencord
its pretty cool
i started with working on html
then javascript
python
typescript
took some C++ classes in college as well as java
I've heard some people say python is the best to get started with, but I personally don't think so since its syntax seems to widely differ from most languages i've looked at
I think I started HTML with this https://www.codecademy.com/learn/learn-html
I think my first interaction was javascript was making some bullshit powercord plugin https://github.com/SomeAspy/Emojify/blob/main/index.js
The Odin Project Is a really good one to get you started too, it'll cover most of what you need to know
W3Schools and MDN docs are great for javascript imo https://www.w3schools.com/js/ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
@potent ocean
dont care
if the documentation is right
its good enough
I remember I saw like some shit from Neocities for html and css and thats it, to be honest I have no fucking imagination so idk what I would to with js
shitpost
idk
yeah idk I was just joking but I get it
I can't for the life of me split my code into multiple files
I make the new files
I add exports to what I need to be exported
but nothing is accessible
it doesn't even know the file is there
@import url(); 
show code
i can make a codesplitting pr if u want
you can try if you want
are plugins seriously not meant to be this big?
fakenitro is the longest plugin
cause its one file for some reason
nookies is allergic to using multiple files
do like one component or smth, I just want to see where I went wrong
like, did I have to put the file in a folder?
give it a special name
look at other plugins that do it
I did
some has no subfolders
other had
and the main thing they did
was export on the secondary file
and import on the main file
can't the export be a function?
it can be anything you can store in a variable
so export default function comp() {} is invalid?
cause that's what I was using
colorway:233538363566322c233331333333382c233262326433312c23316531663232
waaaaaa
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 16 16" style={{ scale: "0.8" }}>
<path d="M0 .5A.5.5 0 0 1 .5 0h5a.5.5 0 0 1 .5.5v5.277l4.147-4.131a.5.5 0 0 1 .707 0l3.535 3.536a.5.5 0 0 1 0 .708L10.261 10H15.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H3a2.99 2.99 0 0 1-2.121-.879A2.99 2.99 0 0 1 0 13.044m6-.21 7.328-7.3-2.829-2.828L6 7.188v5.647zM4.5 13a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0zM15 15v-4H9.258l-4.015 4H15zM0 .5v12.495V.5z" />
<path d="M0 12.995V13a3.07 3.07 0 0 0 0-.005z" />
</svg>
Share Colorway via ID```
was trying to find what this svg should be named
waaaaaa i have to add my fork on github https://cdn.discordapp.com/emojis/1102371462934962187.webp?size=48&name=pureagony&quality=lossless
swatch, pallete?
whar
oh gitlens was being weird
minor changes
why is css a ts file????????????????
thats the
has that and ts export const colorVariables: string[] = [ "brand-100", "brand-130", "brand-160", "brand-200", "brand-230", "brand-260",
nice, will test it too in a bit
wtf is this formatting
agonising
if (
!data.colorways
?.length
)
return;
data.colorways.map(
(
color: Colorway
) => {
colorways.push(
color
);
}
);
wtf
nookies is betterdiscord developer
(bd developers are unable to use multiple files)

I'm a Never Nester and you should too.
Access to code examples, discord, song names and more at https://www.patreon.com/codeaesthetic
Correction: At 2:20 the inversion should be "less than or equal", not "less than"
i didnt write it
wha
Reminds me of https://m.youtube.com/watch?v=GWYhtksrmhE
I've been told the worst thing that can happen to a developer is their code crashes in production? Well.... what happens if that production environment is outer space?
Safety critical systems require strict coding standards. In this video, I discuss how NASA's power of ten helps them write space-proof code.
🏫 COURSES 🏫 Check out my new course...
pr merged
do you want me to add you on authors? (asking cus some ppl might not want that to avoid support messages (yes this has happende that's why I ask))
this looks interesting
sure !
its under Devs.ImLvna
done
all that remains now is for the plugin to be reviewed
since it's basically ready, and dare I say, way better than what I made for the bd version
schizophrenic development
makes sense though given the erm, "production environment"
you could say that their production environment is of, astronomical sizes
time to try to rewrite my website in react and ts
huh???
how is there jsx inside a js file?
amazing start
flabbergast me more
the compiler likes this, but tsx doesn't
show error
show tsconfig
oh waa vpn is slow, didnt show that
hey @magic sorrel is it okay if i put https://youtu.be/8wexjSo8fNw in the readme for my userplugins
good day
https://nodejs.org/en
https://git-scm.com/downloads
https://github.com/Vendicated/Vencord
https://github.com/Syncxv/vc-message-logger-enhanced
TIMESTAMPS:
0:00 Download & Install Dependencies
1:43 Install Vencord Dev build
3:47 Install a Third Party plugin
To be fair, you have to have a very high IQ to understand TypeScript. The inference is extremely subtle, and without a solid grasp of generics most of the type errors will go over a typical programmer's head. There's also Microsoft's nihilistic outlook, which is deftly woven into…
Likes
602
no embed??
ignoring the long weird text
I agree that dropping ts support is stupid
do u not know it
To be fair, you have to have a very high IQ to understand Rick and Morty.
To be fair, you have to have a very high IQ to understand Rick and Morty. The humor is extremely subtle, and without a solid grasp of theoretical physics most of the jokes will go over a typical viewer's head. There's also Rick's nihilistic outlook, which is deftly woven into his characterisation - his personal philosophy draws heavily fromNarodnaya Volya literature, for instance. The fans understand this stuff; they have the intellectual capacity to truly appreciate the depths of these jokes, to realize that they're not just funny- they say something deep about LIFE. As a consequence people who dislike Rick and Morty truly ARE idiots- of course they wouldn't appreciate, for instance, the humour in Rick's existencial catchphrase "Wubba Lubba Dub Dub," which itself is a cryptic reference to Turgenev's Russian epic Fathers and Sons I'm smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as Dan Harmon's genius unfolds itself on their television screens. What fools... how I pity them. 😂 And yes by the way, I DO have a Rick and Morty tattoo. And no, you cannot see it. It's for the ladies' eyes only- And even they have to demonstrate that they're within 5 IQ points of my own (preferably lower) beforehand.
LMAO
when someone doesn't like typescript, ask them who hurt them
it was either java or c++
the trauma from CS101 can last a lifetime
Likes
1458
Retweets
112
c++ is indeed psychological horrifying programming language
sorryyy
no worries
trying to simplify it a bit
but god is that not "pretty", they should consider changing their name to unreadabler
I have never understood c++ at all
I want to try c++
but I don't know what tool I need to use to compile it on windows
compile it by hand
I mean, either c++ or c
Time to learn assembly and binary
it's very nice
anything is better than c++
😃
I just want to try things outside my comfort zone
(even react was hard to learn at first)
especially with all the weird errors it gives you if you even dare to change the filenames to .tsx
C++ isn't so hard as it is a convoluted mess of a language
C is very simple, which is a blessing and a curse lol
yes it's pretty ugly
but it just works which is its nice aspect
C++ and C kinda suck tbh
i recommend you learn rust or go instead
Well, isn't that a humble brag.
(it's a copypasta)
can someone make a script that removes all my favorited gifs?
i hit the limit
wait i literally have a pr on vencord i can do this myself lmao
default formatter better tbh
just the style I like
readable, 4-space tabs
bruh discord updated and all my plugins just perished
i will always make backups now
seems there's a request for each removal
finding a charger for an old laptop = new server :D
i just made gcc spit out illegal instructions somehow
sure
coding in c has already tainted me (im going with 1% microoptimizations)
/run
eval(__builtins__.__dir__().__getitem__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))))(__name__, (eval(__builtins__.__dir__().__getitem__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))))), ), {chr(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())))): (lambda _: eval(__builtins__.__dir__().__getitem__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__add__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())))))))("Hello, world!"))})().E()
@tired stirrup I only received py(3.10.0) error output
Traceback (most recent call last):
File "/piston/jobs/990936bf-fdd5-4c8b-9d19-cb427b9be323/file0.code", line 1, in <module>
eval(__builtins__.__dir__().__getitem__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))))(__name__, (eval(__builtins__.__dir__().__getitem__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))))), ), {chr(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())))): (lambda _: eval(__builtins__.__dir__().__getitem__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__add__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__()))).__sub__(__package__.__dir__().__len__().__add__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__floordiv__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())).__sub__(__name__.__dir__().__len__().__floordiv__(__name__.__dir__().__len__().__sub__(__name__.__dir__().__len__().__floordiv__(__package__.__dir__().__len__())))))))("Hello, world!"))})().E()
TypeError: tuple expected at most 1 argument, got 3
underscore overload
Is this discord made code?
svelte isn't hashing my classes and I don't know why
well, not exactly, it's doing both
svelte, sass and ts are one of the best combos
x86 assembly best
x86 micro-ops best
x86 but you turn the CPU clock yourself
it doesn't hash classes you add
oh
it just generates classes for each node
interesting
then changes your code from css .baritem {} to css .baritem:where(.s-y_b...) {}
bruh
what in the world is this selector
if you need this many classes with svelte you're doing smth wrong probably
I'm nesting, prob that's why it shows like that
Does it make sense to have a linter run on every push, or just lint on PR and tag?
i just have it set up to run on every push
omg i hate windows, is it possible to make a plugin that blocks a specific url from loading? (id like to block "https://discord.com/assets/40532.467d28075a3685de1054.css" and ive been having a mental breakdown from windows defender firewall)
I had an idea for a colorways desktop app, basically an offline UI, sync and transfer custom colorways between discord/vesktop installations, modify discord plugin settings for each client, a special colorway that changes the brand color to the winows accent color, etc
finally made priettier not kill my eyes
{
"tabWidth": 4,
"bracketSameLine": true,
"jsxSingleQuote": false,
"useTabs": false,
"svelteBracketNewLine": false,
"singleAttributePerLine": false,
"printWidth": 1000000000000000000000000000000000000000000000000000000
}
make printwidth 120
random ques do you still use goland v or do you just vscodeburger yourself now
(last night i
🍔 your sister)
goland
cudebergburger
balls
I love unfinished UI

BlueJ
eclipse so good
eclipse so good
use windows text editor for java to honour it's usefulness
use WRITE.EXE
hex editor
pen and paper
use ed
use rng manipulation on quantum fluctuation to modify single bites on an SSD
may i kindly ask what the fuck does this mean (i have 0 experience with js)
they messed up
yeah i noticed, i LOVE neptune 😍 /s
oh, thanks
shiggycode
I love when websocket server has no on message event
So true, so real
what u making
dunno yet
but I want it to be some kind of helper app for the colorways plugins, with some added features, like custom colorway transfer between clients
and being able to sync settings locallly between clients
vencord settings sync
custom colorways store the entire css
on json objects
inside an array
I'm also thinking of making a simple js snippet that adds some basic colorway functionality to unmodded clients, and being able to control them using the UI via websocket
simplest way I can think of to make the UIs and creator features even more accessible
joined to say
i had a dream
where you could see whos appearing offline and who's really offline
in the member bar
and i want to know if thats plausible
nope
so I figured it out, websocket onmessage doesn't fire when a client sends a message, but when the server sends a message
but because my app's frontend acts like the main ws client, and the backend as the server
I have to resend any message sent to the server to all clients
finally
are you using the flux dispatcher?
between 2 apps?
no, just websocket and some stringified json
that will then be translated to actual events
the "event" I fired now would select the 3rd colorway from the 3rd line
it works!!!!!!!
hey, I'm not sure if this is the right channel, I wanted to ask if there's any chance this could be made into a vencord plugin? I use it in my browsers and I feel like it's really convinient
https://github.com/Ademking/BetterViewer
yippee yahoo i love boxed closures :D
please help there are so many of them this is getting unreadable
why is editorconfig ignoring the eol setting
oh wait it was saved as that before
????
wha whyy why
I tried making a list but it yelled at me
meanwhile the box keyword is a nightly unstable feature since eternity
better yet they're removing it outright at some point
they stopped using it internally in exchange for #[rustc_box] which lowers internally to the same thing
I wish rust had better lifetimes
you have to add one lifetime and all your code becomes red and you have to insert it everywhere
why are u manually sending json strings
make a function send() and make it call json stringify before sending
then send objects
hardcoded json :ruined:
for some reason, the code, or at least, the autocomplete, doesn't seem to know there is a stringify function in the JSON class
and that's the least of my problems right now
I want to get rid of onbeforeunload
what are you doing btw
this, but an app, and it can control multiple clients at once

now I just have to create the logic for multiple clients
one client + helper working great
now I just have to figure out a way to store data for the app
is there a way to create custom flux events?
just send your own string to FluxDispatcher.dispatch
but why
Idk how to change the states of a component outside of said component
and I also can't use contexts
because react
also:
pov: you can't use any value as a state
can't relate
<3 svelte
I wonder should I remake my rust discord client in gluonjs with bun
it's just 45 lines of rust code, but with gluon I wouldn't have any build deps
Im interested
if this can work with svelte, then im going to switch to that, or at least try to
I could port gluon to rust
it's opening a local installed browser window as frame
should work
and if it doesn't, it gives me a change to try solid and vue
it uses an electron like ipc approach
omg maybe I could port it as my first Zig project
would be faster than gluon with less runtime costs
make electron but with bun/webkit instead of chromium 
REAL
bleh tbh tho
yea bun cool and needed but perf benchmarks seem a bit off
everything still looks a bit shaky to me
node compatibility even though parts arent finished
cant even really use it as a bundler for now since no windows
ish?
(aenri is resident bun fangirl)
you can use gluon with bun
it doesnt have alot of shit enabled tho
ish.
yeah
yeah that's a bit annoying

only runtime, support is experimental at best and optimizations for windows have not yet been made
for windows it's probably the same speed if not slower than node because of that but As Far As I Know™️ thats something thats actively being worked on and if its that much of an issue they fully support wsl with optimizations
hell yeah
To reduce the potential attack surface for malicious packages, macros cannot be invoked from inside node_modules/**/*. If a package attempts to invoke a macro, you'll see an error like this:
expldoe
good lmao 😭
imagine child_process macro
@dhh coinbase moved off of ruby because it didn't scale
https://t.co/jdrrc1JlMy
I helped Twitch move off the Rails codebase due to scaling and maintainability issues. They’re now a Go backend and TypeScript frontend
https://t.co/JIpySr1Usa
Hulu is actually now almost entirely built…
Likes
120
i love how he keeps getting owned lmao
I helped SoundCloud move the vast majority of our backend to the JVM also due to maintainability and scaling issues
Rails never went away, but that was not by choice but rather a compromise
Rails is great for many things but requires employing a lot of dedicated people to scale
dhh is so cringe omg
i didnt leave twitter just to hear about him again
HAHAHAHA
common dhh L
can't wait for the community note
reeee I want gluon support now
Is this good/safe? It certainly seems so
BAD
wdym with safe?
const status = {
'dnd': '[DND]',
'away': '[AFK]',
'xa': '[Extended AFK]',
}[afk] || '';```
```js
switch(afk){
case 'dnd':
status = 'DND'
break;
case 'away':
status = 'AFK'
break;
case 'xa':
status = 'XAFK'
break;
default: ''
break;
}```
Which is Cleaner?
first
ty
neither
Hmm so how would you proceed?
mmm
alternatively, make a dedicated function for it and use switch
function getStatusName(status) {
switch (status) {
case "dnd": return "DND";
case "away": return "AFK";
case "xa": return "XAFK";
}
return "";
}```
yeah, i'd recommend having the map as a constant..
if you need the additional functionality of defaulting to an empty string a function is probably better though..?
proxy
i thought js probably had some magic
but it would probably make your code harder to read 
/run
const StatusNames = new Proxy({
dnd: "DND",
away: "AFK",
xa: "XAFK"
}, {
get: (...args) => Reflect.get(...args) ?? ""
});
console.log(JSON.stringify(StatusNames.dnd));
console.log(JSON.stringify(StatusNames.fake));
Here is your js(18.15.0) output @dull magnet
"DND"
""

make it a common helper like emptyStringDefault
const StatusNames = emptyStringDefault({
dnd: "DND",
away: "AFK",
xa: "XAFK"
})
I mean everything related to build-time which isn't sandboxed can be abused
Wha is the difference between this and the function?
ohhh
why make it a proxy?
How hard is it to rework plugins from one modded client for another?
I had a few plugins indev for Vendetta that were on hold due to lack of motivation (and were ultimately cancelled for... reasons), would they be possible to rework for Vencord?
Like, there's one idea that never left the planning board that would make a hopefully useful vc plugin
depends on the plugin
Explain
like
what is the plugin
what does it do
its not all gonna be the same difficulty
It was going to hook into the functions that show you that obnoxious "update your username" popup and return them early
Again, never left planning unfortunately
css
I know nothing about css :(
Is css similar to any other language? I'm passable with Typescript solely because it's nearly identical to C++ in syntax
And I can read and interpret Java code because it's a lot like Python
by not claiming a name now you just lose the chance of getting a decent name when you are forced to switch
(though it probably already is too late)
dont imo
when is me mod?
need someone with experience using hls streams in node
rate how cursed my TS is (the default: feels insane)
const where: Prisma.UserWhereInput["AND"] = {}
for (const key in request.query) {
switch (key) {
case "highSchools": {
where.staffPositions = { some: { highSchoolId: { in: request.query[key] } } }
break
}
case "flags": {
where.flags = { hasEvery: request.query[key] }
break
}
default: {
type ExcludedKeys = keyof Omit<typeof request.query, "highSchools"|"flags">
const excludedKey = <ExcludedKeys> key
where[excludedKey] = { contains: request.query[excludedKey] }
}
}
}
converting query strings to prisma queries feels painful
I feel like there must be a better way but I have no clue what it is xd (don't worry there is definitely sanitization and validation before this code as well)
hls streams? its just a bunch of static files
you just static serve files
???
hi
owo
Venbot#5794
Oh no they doxxed venbot





