#ot1-perplexing-regexing
1 messages ยท Page 578 of 1
a little less satisfying, they all just kinda clumped up
ye thats because they arent
but they look like they are
because they are sticks
and the camera makes it look like that
black screen?
yep
or it doesnt let me escape
hmm thats weird
I wonder how hard it'd be to add smoothing to the 2d trails
I think it might also be the boids studdering a bit
@edgy crest how are you drawing the trails?
magic
i am sotring the last 20 positions of each boid and then connecting all pairs of them with straight lines
alright
are you planning on updating the repo soon?
listen bUddy
its updated
thonky
u sure about that?
oh whoops forgot to push ig
smh
just slap a picture of obama on it and you have obamium
@versed saffron done
lol
oh also I glanced at Amethyst and it seems like it's pretty well done
it's definitely more engine-y tho
still
doesi t have prebuilt binary
and gui
or is it language only
and you have to build
i cant build
what any of that means
is there a reddit api server?
Uhm, not sure for api server for reddit but I am preety sure that there is Reddit Discord Server!
@junior hearth
for wot
alr, it makes sense now
now we need a reddit reddit and a discord discord
where's link 
o_o

is it seriously chris's bday?
why, happy birthday @frozen coral 
what did i do wrong in my math assignment, i said 1+1=42
the answer is 69

Bc 1+1 is 11 x 2 = 22 but because there are two twos, you have to double it again to get 22x22=484
!rule 8
8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.
pls dont
ok
Omg I don't want to get banned sry
1+1! !=2 though :p
r/unexpectedfactorial
nvm you guys didn't violate rule 8, that's a finished assignment
i'm just trying to understand why 42 is not 1+1
wow nice fooling
i'ma use this to proof the teacher
I will start thinking that video encoding is a technology created by aliens and kept secret by some illuminati reptilian developers to govern the world using undocumented C libraries.
- comment on a help thread related to my current problem
luckily for you you are the illuminate reptilian developer
lol
illuminate
k
hm
1 0 1 1 0 0 1 2 1 -1
in C, how do i scanf until i reach a particular value like -1 and store the dynamic number of values in an array?
i dont think i understand malloc correctly cuz i feel even with malloc, it isnt dynamic
u still have to know how many numbers there are?
lol, I blame @eternal wing
you'll have to allocate an array of some size beforehand
like, either you allocate an array big enough to fit any number of values you may encounter, or you'll have to allocate a small one and resize if necessary (in other words, implement a vector)
Yay, happy birthday @frozen coral
Happy Anniversary @frozen coral !!!
happy fake birthday!
you have been on the server for 10 months, 6 days and 3 hours !!! 
Lol, it's actually my 1 year anniversary on this server in a little under 2 months
happy bday!
well here you don't choose your birthday
server chooses birthday for you
lol that's true
ohh ok so we use malloc if we know the exact value other wise we can just define sth big like char x[100] ?
#include <stdio.h>
int main(void)
{
int x[100];
int i;
do
{
i = 0;
scanf("%i", &x[i]);
i++;
}
while(x[i] != -1);
int sum = 0;
for (int i = 0; i < sizeof(x)/sizeof(int); i++)
{
sum += x[i];
}
printf("%i", sum);
}```
with this input 1 0 1 1 0 0 1 2 1 -1
it gives an error
ok
See that's not helpful, you want to solve this issue more than me right? Why should I need to snatch the error from you or ask for it? ๐
well, you use malloc whenever you want to allocate data on the heap. That's always necessary if, say, you don't know at compile time what size an array would be (because then it can't be on the stack)
(if you are just computing a sum, you don't even need an array)
lol
also,
i = 0;
scanf("%i", &x[i]);
i++;
likely doesn't do what you want
(this always writes into first element)
yup icic
im not sure how to store multiple inputs from scanf without arrays
right yeah
I'm not versed in c so what is malloc?
it allocates memory that you manage manually
like im not sure abt the scanf part,
i do this
scanf("%i", &x[i]) so i can get more input from scanf
say you have the sum of the first 4 inputs and the 5th input, can you compute the sum of the first 5 inputs?
also, a little life hack for saving effort at the cost of performance, it is much easier to create dynamically sized arrays with singly linked lists without a tail pointer than by repeated malloc
well, on the other hand, after the first time implementing a vector would consist of copypasting from your implementation ๐
though, hmm, C doesn't have generic types, does it
yeah
linked lists are really terse IME, but also extremely slow
or well, _Generic exists
but it doesn't work for product types
Hello, I am new to Discord, will be around, cheers!
Welcome :D
Thanks.
lmao I saw you in like 3 Discord servers
i code as a side thing, heh.
Saw you in this one, Rust, and Discord Linux
yes, i am a small developer wannabe'
but I do not plan to work as a developer
my dream is to either become a translator or a synthwave artist
Synthwave... time to find out what that is
it's a music genre
oh yes
ever heard of kebu?
Nope
he is more known in europe, he makes music only with synthesizers
no clue what those are
A synthesizer is a type of keyboard that was invented in the 70's which produced sound through synthesis
ah

@app.route("/hello/")
or
@app.route("/hello")
?
question: should i add trailing slash or not?
both seem to work, I'm just confused which one to use
OK
It's your preference
You can also do ```py
@app.route("/hello", strict_slashes=False)
they dont work the same way
if your route is /hello/ but you go to localhost:XXXX/hello you'll get a 30X, not a 200
@harsh tundra is your pfp oc or a character from somewhere?
OC. ^^ name's Akari (Ari)
https://toyhou.se/1725020.akari/gallery here's gallery with some art. But I don't think there's any description or anything. I haven't updated the design and stuff in years
Such fluffy hair
Fluffy tail is part of must-have in Ari's design :D
fluff slider: max
That fluffy tail and different-length socks are the only must-haves of the design for me XD
I used to draw eevees - their tails are also just a fluff circle and fox-like lighter tip
Eevees are so cute. Also so many evolutions i had a full eeveeolution team one time.
I have a cute eevvelution wallpaper on my computer
http://wallpaperinfinity.net/icecream-pokemon-eeveelution-wallpaper/ this (just searched for eeveelution icecream XD)
I have a changing wallpaper but it's basically foxes, anime, and some comics/games/animations stuff
Hm, wait, vocaloids don't really fit either of those categories...
And Joe's discord card background is from photos other than foxes that I have in there
Btw nice photos - not animals but I love how sunset looks like in countryside (my camera on zoom saturates the colours a bit too much, naturally it's still orange but with a lot of peachy shades
This is no zoom. Real stuff looks kinda between those two XD
Aww ice cream :3
Seing a red sun like that is not something im used to.
I come from norway, mountains are always in the way, at least where i lived :P
Hahah
Thanks to you i remembered I used to use my own photos as wallpapers. I should get back to it, this phone has great camera XD
[pic related... BTW - find the cat]
Peach blossom :3 no cat in here, tho
Cat spotted. 83% confidence rating
I like to call this photo When you stare long enough into the abyss, the abyss stares back at you
Lol
No cat spotted.
sneak 100
To milk almonds, all you need to do is to mash bitter almonds in a bowl and add water to it
bonus points if you put it in an enclosed bag and leave it for a day or 2
(I am not responsible if you die of cyanide poisoning)
They have an organisation, so you can see their repositories here: https://github.com/jupyter
it's look riight, thanks
If @GitHub (Microsoft) truly believes copilot isn't infringing on anyone's work, I want to offer them a chance to prove it: I'll donate $50k to a charity of their choice (or @EFF if we can't agree) if they release a Copilot version trained solely on Windows kernel source. 1/ https://t.co/WMWD6FTcR2
458
1342
@rough sapphire Please do not post inappropriate images
how is it inappropriate
๐
what
lol
I also have Draw me like one of your French girls somewhere... Actually use that phrase in search with my id and you should find it quicker than I would by browsing my phone XD
Nah. Just a mix. She's doesn't even have brit's face, she's just fat and it was winter + perspective XD
what
joe is a cheater milking almonds and i'm fooled by akarys.
nice :D
now make bitter almond milk and die of cyanide poisoning!

for those coding puzzles websites, when they ask you to submit a function to do some work, what if the function requires a library like math.h or stdio.h to work, do we add it above where we define a function?
.h as in c right? yeah we include it above fn.
yeah
yeah you can just include them.
oh okay thx
#include <stdbool.h>
#include <string.h>
#include <ctype.h>
bool IsIsogram(char *str)
{
int x = strlen(str);
for (int i = 0; i < x; i++)
{
str[i] = toupper(str[i]);
}
for (int i = 0; i < x; i++)
{
for (int j = i; j < x; j++)
{
if (str[j] == str[i])
{
return(false);
}
else
{
return(true);
}
}
}
}```
i tried to implement a function to check if there is any repeated characters in a string but it has a memory issue
what you mean by memory issue?
Test Crashed
Caught unexpected signal: SIGSEGV (11). Invalid memory access.
i dont think you can do
str[i] = toupper(str[i]); IIRC
why don't you umm comment that line and try to see if that's an issue?
also, if im not mistaken your logic should be broken too, the way you're returning, I can't see any point of using loop as you're returning in both if and else.
right yeah
#include <string.h>
#include <ctype.h>
bool IsIsogram(char *str)
{
int x = strlen(str);
//for (int i = 0; i < x; i++)
//{
//str[i] = toupper(str[i]);
//}
for (int i = 0; i < x; i++)
{
for (int j = i; j < x; j++)
{
if (str[j] == str[i])
{
return(false);
}
}
}
return(true);
}```
i changed it to this
also since j=i, (in first case) its always gonna return false
but for this
is it it's not allowed in c?
alright. also just a sidenote, you can just do this in O(len/2)
yeah you can't.
moreover i think you can't do it like this in java too(not 100% sure)
but does the function exist just that we can't use it?
no, what you can't do is manipulate your char array like this
if im not mistaken
*(str+1) = toupper(str[1])
this may work
however if you think about this problem, you don't even need to manipulate it.
you can just check like
toupper(str[i]) == toupper(str[j])
ohh wait so if we do this, it doesn't manipulate the array?
nope. this just returns the uppercase of character
i see, i don't get it though why on google, q a few people could loop through the array and toupper each character
is it something to do with my program
how im reading it?
i will give an exact answer to that. manipulation of things is a lil bit different in c. as its lower level language.
oh okk
https://stackoverflow.com/questions/10186765/what-is-the-difference-between-char-array-and-char-pointer-in-c
answers in this may enlighten the difference a lil bit.
but as a small tl;dr
char* and char[] are different types, but it's not immediately apparent in all cases. This is because arrays decay into pointers, meaning that if an expression of type char[] is provided where one of type char* is expected, the compiler automatically converts the array into a pointer to its first element.
morever
char a[] = "string literal";
char *p = "string literal";
here you can manipulate a[someNumber], however you cannot manipulate p[someNumber].
The contents of the arrays are modifiable. On the other hand, the declaration
char *p = "abc";
defines p with type "pointer to char" and initializes it to point to an object with type "array of char" with length 4 whose elements are initialized with a character string literal. If an attempt is made to use p to modify the contents of the array, the behavior is undefined.
@near bolt
also as a side note of why would you want to use char pointers is this,
(one of the reasons)
if you wonna create a 2d array of characters of lets say names.
If one name is of length 100, and all others are of 5, you are wasting hella memory,
while because of char pointers, that memory does not get wasted.
๐ฆ ๐ซ
hm]
What I'm trying to do is
Setting up JDA in eclipse
I tried in intelij too
plugins {
id'application'
id'com.github.johnrengelman.shadow' version '5.2.0'
}
mainClassName = 'com.JDA.Main'
version '1.0'
def jdaVersion = '4.3.0_291'
sourceCompatibility = targetCompatibility = 1.8
repositories {
mavenCentral()
maven { // on kotlin dsl use `maven("https://m2.dv8tion.net/releases")` instead
url "https://m2.dv8tion.net/releases"
}
}
dependencies {
implementation("net.dv8tion:JDA:$jdaVersion")
}
compileJava.options.encoding = 'UTF-8'
build.gradle 
package com.JDA;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.JDABuilder;
public class Main {
public static void main(String[] arguments) throws Exception
{
JDA api = JDABuilder.createDefault("epic token").build();
}
}
Main.java 
File structure
@tender smelt
Errors
Java makes me sad
did you try refreshing gradle
yeah, try that
I didn't how do you do that in intelij?
on the right, open gradle
ctrl-shift-o i think
BUILD SUCCESSFUL in 3s
error: package net.dv8tion.jda.core does not exist
import net.dv8tion.jda.core.JDA;
^
Nope didn't work also the two import lines in my .java are greyed out
the classes seem to be in the .api package
Oh wow
One more thing
Something is wrong
@graceful basin
I changed my code a little bit
Wha-
that is odd
Yeah
package com.JDA;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.OnlineStatus;
public class Main {
public static void main(String[] arguments) throws Exception
{
JDABuilder builder = new JDABuilder();
builder.setToken("e");
builder.setStatus(OnlineStatus.ONLINE);
}
}
Oh the documentation
Got updates
Upong changing the build @graceful basin
JDABuilder builder = (JDABuilder) JDABuilder.createDefault("ok").build();```
JDA jda = JDABuilder.createDefault("token")
.addEventListeners(new ReadyListener())
.build();
```certainly not part of the examples
I see
YOOOOO
It's working
JDA jda = JDABuilder.createDefault("token").build();
jda.awaitReady();
@graceful basin tysm!
Yeah
what kind of snake is python?
snek
how did you not know that before then? 
what type of python is python
python
A snake
i see thank u vv much!
how to get a free nitro as a gift
be nice
that one never works
So, how do you milk almonds?
Carefully
Milk almonds
if the comments early are anything to go by
Squeeze the almond teat
Where
In a cup
May any1 give me their brain for 2 minutes please?
What is the name of studying batteries? or scientists that work on batteries specifically
Chemists?
electrical engineer?
google calls them battery scientists sometimes too ๐ฆ
im calling batman
Probably chemical engineers
I dunno if there is a name specifically for those who study batteries, they'd probably just be a specialization of a chemist or material scientist, depending on the type of battery you're talking about
especially since there are many battery technologies which can be fairly orthogonal to each other
Another supply side attack, this time with Kaseya https://mobile.twitter.com/GossiTheDog/status/1411045233136177173
Supply chain attack of Kaseya, commonly used in managed service provider environments in the United States, leading to mass ransomware event.
Details in link and thread as they develop:
https://t.co/YStENYMTdW
689
1099
Itโs common remote management software used by Managed Service Providers
oh no..
huh
here? @little wolf
hi
too many channels :/
for the better
ig
tensorflow = tf = the fuck
is this statement correct?
team fortress
any high schoolers here? If you're looking for volunteer hours you can teach a python course at genxl.org
you think a high-skooler will have that sense of responsibility?
Just curious
Many do go do things like that
eyes staff
maybe
um. definitely
lmao
I doubt it
I find that kind of insulting
lmao
why
I'm a high schooler you're not a high schooler
what? Yes, I am
lol
I assume 9th grade is high school
Yes
ah yeah ok
9th-12th
ohhh nvm then
What on Earth is high-school to you?
O_O
Even then, I'd be a junior had you asked me a couple of months ago
junior = 11th, if you don't know
do you guys take boards
"take boards"?
board exams i mean
I don't even know what that means
oh nvm
here we have one entrance exam that ranks all people in the country by rank
you get access to colleges based on your ranking
Have you any insight on how this works? I'm quite curious and I have like a semester to get 200 hours in
If I understand it properly (which I most defo don't), it's really harsh and is a huge step from school level
so schools step up to high paces
starting from 9th
huh
we have SAT as an optional test to unlock access to foreign colleges here
When I took the pSAT, I scored somewhere in the 90th percentile
perhaps it was in the 80's
Rust has some automatic deref rules, and dereferencing a string yields str
hmm, im a little confused, so str is being passed down in the greet?
so im dereferencing the String when im passing it down in the greet function?
&String is an &str, if that's what you mean.
(essentially)
hmm
fn other(u: &str) {
println!("{}", u);
}
fn main() {
let s = String::from("Hello, world!");
other(&*s);
//this ^ is added implicitly
other(&s);
}
```rust can infer some dereferences
hmm, what trait governs that actually...
Deref
ah
oh
and String is a "pointer" to str
more or less, yes
oh no this does not look like a hexagonal lattice
ok so the &variable should be the pointer then right?
that is borrowing the variable
it is kind of similar
but it is closer to an const reference in C++
oh so, read only?
yes
i see, and &mut variable would be complete ownership?
a Rust reference is kinda like a pointer that is:
- guaranteed to be non-null
- guaranteed to obey all the borrow constraints, meaning that, say, if you have two
&mut Ts (or a&mut Tand an&T), you know for sure they aren't to the same object (aren't aliased)
&mut variable is like a regular reference in C++
owned is just variable
you very rarely use full on pointers in rust, though they do exist
how to use pointer?
Raw, unsafe pointers, *const T, and *mut T.
it is very rare and generally not useful
oh i see
the few things you need pointers for in C++, you can do with Rc Arc and Box
Rc Arc?
hmm, ok so when i want to pass a String, do i use &String or &str?
for function parameters, it is generally better to take &str
but as struct members, you probably want String
struct members?
this looks cool, but also isn't a graphene lattice ๐
as in a String is an attribute of a struct?
I would think so
finally
did you see this https://www.redblobgames.com/grids/hexagons/
Yeah. If you want to have a struct with a &str field, then this reference has a lifetime, and you need to have the struct have a lifetime too... it's better to make the struct own the String in most cases.
sadly, no, I had to derive this
well, at least you learned something
hmm, i gotta learn more about ownership
I actually learned a lot about why ownership and lifetimes exist from the Rustonomicon.
https://doc.rust-lang.org/nomicon/ownership.html
The Dark Arts of Advanced and Unsafe Rust Programming
oh i see, thank you
the "aliasing" part for example I never thought about (probably because Rust is my first low-level language, so I never got to do horrible mistakes with pointers)
aliasing?
2 pointers/references to the same object
another language that forbids this is fortran
oh the first pointers gets removed right?
in Rust it's just impossible to take any reference (mutable or not) if there's already a mutable reference taken
you can take any number of immutable references at once, but when a mutable reference is taken, no others may exist.
(this is all compile-time by the way, not runtime)
if the first one is mutable and the second one isn't
would the first one be removed?
Well, it'd just fail to compile.
Example:
let mut vec = vec![1,2,3];
let a = &vec[1]; // Immutable reference to an element
vec[2] = 5;
println!("{:?}", a);
this will fail to compile, because the immutable reference a must live to the last line to be printed, yet while it lives, the vec[2] = 5; happens, which takes the vector as mutable to reassign an element.
Actually, you can see the references are to different elements, so it'd be fine - but the borrowship checker isn't smart enough to know that, it just knows the entire vec object gets referenced mutably while it's referenced immutably.
no
wait so
ok yea, my compiler is messed up
wow, my code was so horrible my compiler gave up
what let me = name; should do is move name to the me variable
unless it's a Copy type (and Strings very much aren't), this leaves name "empty" (you moved out of it)
oh that would pass by value, so it wouldn't raise an error?
no, passing by value is basically what Copy types are
and Strings very much aren't Copy - they are heap-allocated even
name would just no longer be usable. I think your code should work, in other words.
how the hell do I record videos with OBS without this desaturation?..
left is the window that was recorded, right is the recorded video
oh finally
IIRC the encoding is to blame for that
If it helps, to a colour-challenged set of eyes it looks identical 
This was the important setting.
couldn't you use like an imaging library?
both the default NV12 and RGB fail to preserve the colors
Check this out
it's the optical vibration mode of a graphene sheet
That's pretty neat
each vertex knows its displacement eigenvectors, and recieves as uniforms the wave vector and the current phase (the time-dependent part, so omega*t)
man I keep looking at that and going cross-eyed
lemme do a faster wave
Oh God, if I stare long enough the direction changes
faster (well, with higher wave vector) wave
have you become addicted to waves cyph
yes
veri naice
like when I stare at this, if I sort of like... focus too much, the blue lines appear to move slower and slower and then there's like a sudden flash where everything is blue and then it returns to normal
absolutely trippy
y'know what it feels like...?
Like that one thing where something is cycling in one direction, and as the frames go lower, it looks like it's going in another direction
discord.TextChannel?
Wrong channel sry
๐ i missed the rust discussion
unsafe ๐.
well, you can still answer me why the intel intinsics guide lists many instructions as AVX-512 which are actually AVX2 or AVX or SSE2. ๐
ยฏ_(ใ)_/ยฏ
Nothing is safe in this world
it's the only way to write str::split_at_mut
That's why Rust must be from another ๐
and wait, is split_at_mut unsafe
no
I remember it as safe, hmm
it's safe, but its implementation requires unsafe
you can't have two mutable references to the same string
even if you can verify the substrings are different
pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
// is_char_boundary checks that the index is in [0, .len()]
if self.is_char_boundary(mid) {
let len = self.len();
let ptr = self.as_mut_ptr();
// SAFETY: just checked that `mid` is on a char boundary.
unsafe {
(
from_utf8_unchecked_mut(slice::from_raw_parts_mut(ptr, mid)),
from_utf8_unchecked_mut(slice::from_raw_parts_mut(ptr.add(mid), len - mid)),
)
}
} else {
slice_error_fail(self, 0, mid)
}
}
split_at_mut is from the standard library
ah, fair enough
(and I only ever used it for normal slices, myself :P)
This uses the glium OpenGL wrapper.
pretty much just that - some nalgebra, num-complex.
(it's written in Rust, if I haven't mentioned)
you know what I just realised
I can make a fractal visualiser in openGL... probably.
just, like, stuff the mandelbrot set formuals into the fragment shader
oh yes that does sound like a nice idea
and it'll allow me to see what the limits of my GPU actually are
@remote citrus JS does have ways to do both mobile and desktop app dev
Something like React native or ionic for mobile, and Tauri or Electron for desktop
hmm
Although those are all dependent on having a web app
what kind of apps can I make in it?
Anything you can make on a website
Can be turned into those
Discord, for example, uses React Native and Electron
and a lot of RAM
It depends on the implementation tbh
Spotify and VSCode for example are completely fine
Meanwhile, Discord for me on Linux can sometimes use upwards of 2 GB
Fair
ok, thanks
in my pc nodejs is not accepting readline-sync module of nodejs now while I have the module up to date
maybe because I had once uninstalled nodejs (But I have it rn)
This is not a Python question, it is an Auto Hot Key question. I am wondering how to email files with AHK (Ping me with response)
Do you have it in package.json
In nodejs, nothing gets installed globally unless you tell it to
ye
Everything is download into a local node_modules directory
-g
inb4 react
Svelte
svelte is based
Although, if you're looking to get a job or work with people, React
no job, i don't think i like web dev a lot
Svelte is so much nicer, but no job opportunities and people who know it
just as a hobby
๐
Yarn 2
it is new
sounds like rust
Soonโข๏ธ
yes
true
css vs some other uh tailwind or scss or something
scss/sass
sassy css
so is it a substitute for css or..
It's a preprocessor
its like ts to js
Css with a different syntax
ooh
oh i see, much thanc
np
oh i see, much thanc dawn and not zee
damn
So how do I do that?
well
Run npm init and npm install ___ to start
maybe u want a cli
Yes
It'll install the package into a local node_modules directory
I've tried but it doesn't work
the modules i need are in that folder but they still don't work.
Dont work how
no
I have done this whole day
Is there an error?
where?
And is the node_modules directory inside your project
wdym by 'project'
Inside the project directory I mean
Each nodejs project should probably have its own directory
My project directory is in an entirely different place
What
It is stored in another drive ๐
oh
'cd'?
cd changes the current directory
oh
cd /path/to/new/dir
ye
hmm.... so you mean I have to open powershell in my project's folder and then install the module?
Yes
yes
Exactly
lemme see
undoubtedly
Thanks a lotttt brother @wraith hound I was struggling with this from 2 days, you were really really helpful.
Thanks a lot ๐
2 days?
Node is a whole other world, don't think of dependency management like you do with pip
not changin ur mind since ur vsauce
or am I? ๐คจ
I want to try making a low level, compiled language that's still simple
perfectly executed
immaculate timing
lmfao
10/10 well done
You should say
"Never gonna give you up"
Never gonna let you down
ok
soyuz neryushimiv respublik svobodnykh
sir this is a wendy's
is it correct that for languages that support object oriented programming, to carry out a function would be object.function() while languages that support functional programming is function(object) ?
oh so regardless of the language, both ways shd work for all languages?
sometimes, one way works, one way does not
sometimes, neither works
for example with lisp
language can have pretty much whatever they want as far as syntax goes
oh i see
lua has this for method calls a:b()
perl allows both b a and a.b as a call
Nim and D make b(a) equivalent to a.b()
julia, haskell, elm all have any a b, but have pipes
oh okay thanks!
meanwhile neofetch
and only one GPU
admin perhaps
well winfetch is a bat
cmd in admin
ยฏ_(ใ)_/ยฏ
@gilded prawn You should edit your status, typo in because!
Its a quote from @bleak lintel i can't change it
how do you get those new statuses everyday?
LMFA NO YOU DID NOT
AMAZING
:)))
CORS is the opposite of DNS. You always have problems and think it's not DNS and then it's DNS. Whereas with CORS you have problems, you think it's CORS, and it's not CORS
This quote is 100% my own thoughts
โข๏ธ ยฉ๏ธ
lol
the body looks weir
That isn't accurate (and yes this is two hours after), you think you don't have a problem but you in fact have a CORS problem. Always a CORS problem. No matter what you do.
That is me
I think I did
Good stuff
im guessing you mean something like wolfram alpha
No, like you input your problem and it tries to solve it
so like wolfram alpha
I thought wolfram only solved math formulas
what kind of problem are you looking to solve
@polar vigil Wolfram covers a crap ton of stuff
I am thinking about getting the student membership for next year
Step by step resolution could be very handy
For me it's another one of those "that would be cool" but I wouldn't know what to do with it
hah
I'm glad I don't have monthly incomes for that reason
I'd take random crap just because it looks cool
@bleak lintel are you logging user agents on pythondiscord.com
i remember he was for a time, but not sure if still is
was just via cloudflare firewall iirc
Ah, maybe CF is
reason I'm doing this is because google started telling me to use chrome on every page so i figured I should set it up to spoof chrome on google's websites
at the same time, I figured I'd spoof internet explorer on bing and microsoft sites
lol hmmm
are we
are weeeee
heh
weeeeeeee
actually
yeah i think we are
i should actually spoof ie
right now its spoofing edge but mwahahahahaha
7 day TTL for all reqs to pythondiscord.com
please check em, does my hello joe show up?
i am looking now lol
i just spammed several requests for your benefit in finding it ๐
lol, the answer is no we don't because I can't access the DB anymre
lmao what
i changed email from an @josephbanks.me to an @jb3.dev
and github oauth changed
so fauna won't identify me now lol
lmfao
i added these two to it
do you have access to user agents for those?
no im not
to query the database, i need to login
i just want you to see my user agent
i used to login with an @josephbanks.me email
if you have logs for your own webservers at jb3.dev
then you can check those since i made requests to them from my browser with my spoofed user agent
i cannot access the pydis database, because I changed email
I have now resolved it
i can see pythondiscord.com
it doesn't have to be pydis it just has to be something that you can see logs for
try send a req
It is a special header sent in every request to say who is making the request
Lemme give an example
@rough sapphire open https://httpbin.org/anything and look at the headers.User-Agent field
For example, mine is
Mozilla/5.0 (Linux; Android 11; Pixel 4a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.80 Mobile Safari/537.36```
it's not great practice to set user agents that don't follow standard
The server knows that I can render Mozilla 5.0, Apple 537.36, Chrome 92.0 and Safari 537 web thingies, I'm on a Linux device running Android 11, a Pixel 4a and it is a mobile device
Yeah, the */* sections gives you what vendor specific stuff is available
This allows the server to send back a different webpage, although I don't think anyone really does that
๐
Tbf just Google random stuff you find that you don't know about
i've seen it done before
That's how I know all those random shits
Did you really used a filter rule just to block ARU lmao
That could not be an existing word haha
How many filter rules do we have @bleak lintel?
You use a plugin
Although I don't recommend it
yeah that's not firewall
that's just an invalid request
What are the other rules for, I'm curious now
DevOps is pretty fun
Haha, I remember the rรฉsumรฉ
I hate you French keyboard
- shitposts
- stop XSS being triggered for github webhooks
- stop SQLi being triggered on metabase, grafana & superset (as you can imagine, you want SQL submissions there)
- stop automated scripts from being blocked from creating/reading pastes
Aah gotcha
Why 2 though?
I guess for the snippets
XSS is an attack where you inject code through an html tag
As the webhook will contain that you have to ignore it
XSS is like, if I had a social media app and set my name to Joe <script>alert("hi")</script> then the server could render that and allow me to inject arbitrary JavaScript
SQLi is roughly the same thing, except with SQL queries
similar to XSS, but instead trying to get arbitrary SQL queries to run, https://xkcd.com/327/
Good old Bobby table
I was wondering if you'd post it haha
Kinda, yeah
lol nice
yada yada I appreciate the offer yada yada not able to accept right now due to education yada yadda
what kind of cloud certs
I've got GCFE, forensic examiner, GPEN, penetration tester and HE IPv6 certification
nah, none of those
nah
last one is
GCFE + GPEN are around $14,000 together
UK government paid for it
lol
years ago
i have a general beginner coder question?
say i did a beginner course on python, iโve learned all the basics and wanna get into coding my own discord bot. what do yall suggest i do to make the jump from โi know what a string isโ to understanding what guild.name is
What did you start with?
Or what stuff would you recommend starting with?
Reading documentation really
The commands system has a pretty vocal guide, but not really a full-on tutorial per say
docker, ansible, generic unix skills
this explains it better than I can https://aws.amazon.com/devops/what-is-devops/
Thank you!
yeah i saw that when i was looking at the discord.py documentation, itโs still a bit confusing to me bc if you tell me โfile = discord.File(โsample-pngโ)โ iโll tell you it displays an image in the code but you cant really find that in the documentation written out like that
Yeah discord.py does not have that type of documentation, both FastAPI and Pydantic do and it's amazing, but the effort hasn't been put in to do something similar for discord.py
googling FastAPI and Pydantic rq ๐๐พโโ๏ธ
Not officially, no
(but it sucks that discord.py doesnt have that documentation yet, itโd be great so more beginners could use it
The closest is a FAQ
But things like https://vcokltfre.dev are really good
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
this makes me hate those youtube tutorials all over again because nowhere do they mention โcogsโ
so i feel like i wasted my time watching them/learned the wrong things
This one does
It's really up to date
๐๐พ๐๐พ๐๐พ
Made by none other than @gilded prawn
Cogs are a very important part of discord.py which allow you to organise your commands into groups - not to be confused with actual command groups, which will be explained later in the tutorial.
this is more or less unrelated but whats a free way to run code on a mac? bc when i was searching through this server, there seems to be hate for replit which is what ive been using
thank you ale ๐๐พ
agreed, thats half the reason I made that tutorial, to fix the youtube ones lol
You should run it on your local computer
It's free
If you're looking to deploy to production or something though, a cheap VPS would be best
yeah i have heard about VPS!! this bot im making is like a private server thing so iโm not there yeeeetttt but when im skilled enough for bigger scale projects
Donโt know if this is the right place for this question or not, so apologies if itโs not. Iโm currently looking for good online sources to learn Java from and I was curious if anyone knew what might be the best place to learn from online? I know price is pretty much expected as well
is there a site creator like square or wix that lets you make the site, then just cv the html into your own project?
guys @bleak lintel blocked me from pythondiscord.com
oh wait he unblocked me
no nvm i'm still blocked
loser
follow the instructions on https://pydis.com/.env
that's true, https://pythondiscord.com/.env seems broken, this important page only works on pydis.com
blocked from that too
yeah .env on pythondiscord.com is a legit firewall block lol
nou
yes but when i get blocked its not what happens if i do it from a private browser with vpn
yeah
i am looking to code a game in python
person under this text gets shot tho (a joke)
:first_quarter_moon_with_face:
wtf (what the frick)
that's unfortunate @rough sapphire
how did i send a
hmmmm sus
Shame really. We barely knew them
yup
ima set it
also thanks
it wont save as a png
better
i edited it a bit
yup
no more semer2629
bye bye old name and pfp
Wut just happened here
Hurr Durr Trick
da faq was seemer
why did i open that
i knew it was a rickroll
wdym its not a rickroll
rickrolled 3 times from the same link -_-
Ahk
it was my old name
whats with that bot thingy
lol
that sus
it truly is possibly dangerous content
It's very malicious
yes
is show me your dict ||(dictionary in python)|| pic a bad joke
@acoustic spire You could try create some keyboard layers using software if your keyboards firmware doesn't support it. My fingers never drift from the home row, because I can just press a key and have the arrow keys or numbers appear under my fingers
Also yeah, you may want to have a look at your posture and positioning if typing : and ' hurts
yeah, I though about ahk, but i am new so I dont think that I need a lot of stuff to bind.. btw about dictionaries, just wanna share my found. def func(*a, rest parameters will be the dictionary, keyword default.)```py
a = func.kwdefaults
๐
anyone here used mongo in docker? ive got /data/db mounted to a local file and im having trouble reading my collections via docker exec -it <container name> bash > mongo > use local > db.collectionName.find(). im my project ive connected to only mongodb://ip:port/local, i can read and write data just fine and its persistent across stop/starts, im just unable to view it via cli
(please @ me)
!otn search dict
โข addicted-to-bikeshedding
โข donโt-be-a-dict
โข joes-ipv6-addiction
โข ๐ฒebastiaanโs-otn-addiction
half of them are about addictions
Don't be a dict is a better one
agree
Show me your dict sounds immature
is it a language thing or inconsistent syntax that sometimes when we have to put curly braces around a variable, sometimes we don't
print(f'hello: {variable})
function(variable)```
sry im mixing up the language here, javascript
let person = {
firstName: 'John',
lastName: 'Doe'
};
(function () {
console.log(`${person.firstName} ${person.lastName}`);
})(person);```
thats because we are string interpolating wherever u see {} between ''
in python when we write f'hello {some_var}'
it would be similar to 'hello %s', some_var in c (printf)
oh so it's because it's combining a variable (which may not be a string) with a string hello?
yes
but if it's not combined with hello, it can be printed by itself without {}
yes
cuz im confuse abt this part
console.log(${person.firstName} ${person.lastName})
and backticks
called template strings
damn
but i thought person.firstName and person.lastName are strings already? or isit we have to put ${} for all variables?
reminds me of Kotlin, but I figure you use ${} for expressions and $ for variables (unless it's very different in JS)
oh icic
check colemak forums. there was a guy called Dreymar in there who had a lot of interesting modifications to layouts and additional layers to ease with typing... +most people there use (or at least used years ago when I was active there) a thing called "Portable Keyboard Layout" which is made with ahk specifically for easy layout switching and stuff
edit: decided to actually check it again myself ๐ windows link: https://forum.colemak.com/topic/1467-dreymars-big-bag-of-keyboard-tricks-pklwindows-edition/
main topic which describes all modifications and stuff https://forum.colemak.com/topic/2315-dreymars-big-bag-of-keyboard-tricks-main-topic/
yes
thanks!
@harsh tundra ty checking rn
the layer instead of colemak's second backspace was really fun. but there are also mods to move right hand more right and move punctuation/symbols from there into new middle rows... or "curl" modifications that help with staggered keyboard
in the main topic, "[1.2] EXTEND LAYERS!!!" - amazing stuff, really
that extend layer basically makes you stay on the keyboard main row and around all the time. need F1-F12? extend have them on 1-9-=. ctrl+[zxcv] are one click. mouse movements, arrows... are all there
this layout actually scares me, there is too much
oh right okay thank u vv much ๐
UUIDs (universally unique IDs) with v4 have from what I have read 122 bits of randomness. Meaning there are 2^122 options... and an extremely low chance of a collision.
But having a chance for a collision, shouldnt UUIDs be named usually unique then?
To help non-mathematicians understand what those numbers mean, here a comparison: one's annual risk of being hit by a meteorite is estimated to be one chance in 17 billion, that means the probability is about 0.000'000'000'06.
I know, I read this before already
The point is that the chance is so low that it is negligible




โช๐คโช๐