#ot1-perplexing-regexing

1 messages ยท Page 578 of 1

edgy crest
#

but its first person

#

you can click ESc

#

to exit

acoustic moss
#

lmao the arrow heads make it resemble something

#

and the movement

versed saffron
#

a little less satisfying, they all just kinda clumped up

edgy crest
#

ye thats because they arent

#

but they look like they are

#

because they are sticks

#

and the camera makes it look like that

acoustic moss
#

oi fish where

#

in 3d

edgy crest
#

hmm

#

it was overheating

#

so i could not test it

#

so i could not do anything

versed saffron
#

esc crashes it for me

#

but no they all move together

edgy crest
versed saffron
#

yep

edgy crest
#

oh

#

gotta fix dat

versed saffron
#

or it doesnt let me escape

edgy crest
#

hmm thats weird

versed saffron
#

I wonder how hard it'd be to add smoothing to the 2d trails

edgy crest
#

ye rn its just connecting the positions with line segments

#

its kind of choppy

versed saffron
#

I think it might also be the boids studdering a bit

versed saffron
#

@edgy crest how are you drawing the trails?

inland wolf
#

magic

edgy crest
versed saffron
#

alright
are you planning on updating the repo soon?

versed saffron
edgy crest
#

thonky

versed saffron
#

u sure about that?

edgy crest
#

oh whoops forgot to push ig

versed saffron
#

smh

acoustic moss
#

just slap a picture of obama on it and you have obamium

edgy crest
#

@versed saffron done

acoustic moss
#

lol

versed saffron
#

oh also I glanced at Amethyst and it seems like it's pretty well done

#

it's definitely more engine-y tho

edgy crest
#

ye

#

thats why i dont use it

versed saffron
#

but I think it's lower-level than like unity

#

which is great if that's the case

edgy crest
#

still

#

doesi t have prebuilt binary

#

and gui

#

or is it language only

#

and you have to build

versed saffron
#

I have

#

no clue

edgy crest
#

i cant build

versed saffron
#

what any of that means

edgy crest
#

its too big

#

ok so you have to build it

#

F

#

not touching it

junior hearth
#

is there a reddit api server?

brazen ingot
#

Uhm, not sure for api server for reddit but I am preety sure that there is Reddit Discord Server!

#

@junior hearth

junior hearth
#

gimme that

latent scaffold
#

There's a Reddit Discord and a Discord Reddit?

#

o_o

brazen ingot
#

ohk then gib link

#

lol

#

@latent scaffold

latent scaffold
#

for wot

brazen ingot
#

reddit discord server

#

invite!

latent scaffold
#

oh I didn't know there was one

#

Fixed my statement :]

brazen ingot
#

alr, it makes sense now

acoustic moss
junior hearth
#

where's link KannaWonder

prisma agate
#

is it seriously chris's bday?

frozen coral
#

No lol, it also wasn't when this otn was added

#

not sure on the backstory lol

acoustic moss
#

why, happy birthday @frozen coral lemon_happy

dire siren
#

what did i do wrong in my math assignment, i said 1+1=42

edgy crest
clear plume
#

Wait no

#

It's 22 x 22

#

So it's 484

edgy crest
clear plume
#

Bc 1+1 is 11 x 2 = 22 but because there are two twos, you have to double it again to get 22x22=484

dire siren
#

!rule 8

royal lakeBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

dire siren
#

pls dont

edgy crest
#

ok

clear plume
#

Omg I don't want to get banned sry

dire siren
#

help me learn why 1+1!=42

#

ty

edgy crest
#

it isnt

gritty zinc
#

1+1! !=2 though :p

edgy crest
#

r/unexpectedfactorial

dire siren
#

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

edgy crest
#

because

#

it isnt

acoustic moss
#
In [50]: a = 42
    ...: b = 1 + 1
    ...: print(bool(a := b))
True
#

looks true to me

edgy crest
#

wow nice fooling

dire siren
#

i'ma use this to proof the teacher

gritty zinc
#

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
acoustic moss
#

luckily for you you are the illuminate reptilian developer

inland wolf
#

lol

acoustic moss
#

k

inland wolf
#

hm

near bolt
#

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?

frozen coral
gritty zinc
buoyant crescent
#

Hi guys aPES2_Wave

#

I'm just starting out with Python and having a blast.

gritty zinc
#

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)

viscid hemlock
#

Yay, happy birthday @frozen coral

frozen coral
#

lmfao, it's not my birthday

#

It wasn't my birthday when this otn was added either

quick ledge
#

Happy Anniversary @frozen coral !!!

odd sluice
quick ledge
#

you have been on the server for 10 months, 6 days and 3 hours !!! ducky_party

frozen coral
#

Lol, it's actually my 1 year anniversary on this server in a little under 2 months

shrewd prawn
#

happy bday!

odd sluice
frozen coral
#

lol that's true

near bolt
#
#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

viscid hemlock
#

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? ๐Ÿ˜‰

gritty zinc
graceful basin
#

(if you are just computing a sum, you don't even need an array)

inland wolf
#

lol

gritty zinc
#

(this always writes into first element)

near bolt
graceful basin
#

why do you need to store multiple inputs?

#

you just need a sum, right?

odd sluice
#

I'm not versed in c so what is malloc?

graceful basin
#

it allocates memory that you manage manually

near bolt
graceful basin
#

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

gritty zinc
#

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

graceful basin
#

yeah

#

linked lists are really terse IME, but also extremely slow

#

or well, _Generic exists

#

but it doesn't work for product types

uneven breach
#

Hello, I am new to Discord, will be around, cheers!

low chasm
#

Welcome :D

uneven breach
latent scaffold
uneven breach
latent scaffold
#

Saw you in this one, Rust, and Discord Linux

uneven breach
#

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

latent scaffold
#

Synthwave... time to find out what that is

uneven breach
latent scaffold
#

oh yes

uneven breach
#

ever heard of kebu?

latent scaffold
#

Nope

uneven breach
latent scaffold
#

no clue what those are

uneven breach
latent scaffold
#

ah

ebon condor
molten stag
#
@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

wraith hound
frozen coral
#

You can also do ```py
@app.route("/hello", strict_slashes=False)

tardy rain
#

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

azure beacon
#

@harsh tundra is your pfp oc or a character from somewhere?

harsh tundra
harsh tundra
#

Fluffy tail is part of must-have in Ari's design :D

azure beacon
#

fluff slider: max

harsh tundra
#

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

azure beacon
harsh tundra
#

I have a cute eevvelution wallpaper on my computer

#

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

azure beacon
#

I come from norway, mountains are always in the way, at least where i lived :P

harsh tundra
#

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]

azure beacon
#

cat spotted with a 95% confidence rating

harsh tundra
#

Peach blossom :3 no cat in here, tho

azure beacon
#

Cat spotted. 83% confidence rating

harsh tundra
#

I like to call this photo When you stare long enough into the abyss, the abyss stares back at you

harsh tundra
odd sluice
#

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)

odd sluice
#

why do i want someone to try this

#

i will murder the one person who listens to me

lunar nexus
#

try it

#

where I can find the appropriate repository for jupyter

viscid hemlock
#

They have an organisation, so you can see their repositories here: https://github.com/jupyter

GitHub

Interactive Computing. Project Jupyter has 75 repositories available. Follow their code on GitHub.

lunar nexus
#

it's look riight, thanks

wraith hound
karmic gust
#

@rough sapphire Please do not post inappropriate images

rough sapphire
#

๐Ÿ˜

jaunty blade
#

what

harsh tundra
# jaunty blade 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

jaunty blade
#

lol

#

is that a british short hair?

#

me have one too

harsh tundra
#

Nah. Just a mix. She's doesn't even have brit's face, she's just fat and it was winter + perspective XD

jaunty blade
#

oh

#

she do be lookin' cute though

jaunty blade
dire siren
#

joe is a cheater milking almonds and i'm fooled by akarys.

odd sluice
#

now make bitter almond milk and die of cyanide poisoning!

dire siren
#

sure

#

joe and akarys are asleep, i can...

thick osprey
#

jump on the bed?

dire siren
#

nice idea

#

where can i find them and jump onto their beds

odd sluice
edgy crest
near bolt
#

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?

rough sapphire
rough sapphire
#

yeah you can just include them.

odd sluice
#

oh god

#

halp

near bolt
#

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
rough sapphire
#

what you mean by memory issue?

near bolt
#

Test Crashed
Caught unexpected signal: SIGSEGV (11). Invalid memory access.

rough sapphire
#

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.

near bolt
#

i changed it to this

rough sapphire
#

also since j=i, (in first case) its always gonna return false

near bolt
#

oh RIGHT

#

omg thanks so much

near bolt
#

is it it's not allowed in c?

rough sapphire
#

alright. also just a sidenote, you can just do this in O(len/2)

rough sapphire
#

moreover i think you can't do it like this in java too(not 100% sure)

near bolt
rough sapphire
#

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])

near bolt
rough sapphire
#

nope. this just returns the uppercase of character

near bolt
#

is it something to do with my program

#

how im reading it?

rough sapphire
#

i will give an exact answer to that. manipulation of things is a lil bit different in c. as its lower level language.

rough sapphire
#

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.

tender smelt
#

๐Ÿฆ… ๐Ÿ”ซ

warped raptor
#

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 THIS

#
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 THIS

#

File structure

#

@tender smelt

#

Errors

#

Java makes me sad

graceful basin
#

did you try refreshing gradle

tender smelt
#

yeah, try that

warped raptor
graceful basin
#

on the right, open gradle

tender smelt
#

ctrl-shift-o i think

graceful basin
#

there is a refresh button

#

or that

warped raptor
#

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

graceful basin
#

well, the core package doesn't exist

#

it's just not there

warped raptor
#

That's

#

Weird

graceful basin
#

the classes seem to be in the .api package

warped raptor
#

Oh wow

#

One more thing

#

Something is wrong

#

@graceful basin

#

I changed my code a little bit

graceful basin
#

that is odd

warped raptor
#

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();```
graceful basin
#

that doesn't seem right

#

.build() should be returning the JDA

warped raptor
#

It's the new documentation

#

I thing

graceful basin
#
        JDA jda = JDABuilder.createDefault("token")
            .addEventListeners(new ReadyListener())
            .build();
```certainly not part of the examples
warped raptor
#

I see

#

YOOOOO

#

It's working

#
        JDA jda = JDABuilder.createDefault("token").build();
jda.awaitReady();
#

@graceful basin tysm!

graceful basin
#

wonderful

#

java project setup is always a great time

warped raptor
#

Yeah

mild abyss
#

how to milk almonds?

#

by crooshing

brazen ingot
#

you already know the answer

#

ยฏ_(ใƒ„)_/ยฏ

dire siren
#

what kind of snake is python?

edgy crest
#

snek

dire siren
#

nvm python is python

#

python is alr a type of snake

uneven breach
dire siren
#

what type of python is python

solemn leaf
#

python

versed saffron
#

A snake

topaz trellis
#

how to get a free nitro as a gift

inland wolf
#

be nice

tribal aurora
#

that one never works

pastel prism
#

So, how do you milk almonds?

thick osprey
#

Carefully

pastel prism
thick osprey
#

if the comments early are anything to go by

tardy rain
#

Squeeze the almond teat

honest pawn
#

Where

tardy rain
#

In a cup

graceful vortex
#

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 ๐Ÿ˜ฆ

lunar nexus
#

im calling batman

tardy rain
#

Probably chemical engineers

hollow dome
#

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

lofty dirge
#

Itโ€™s common remote management software used by Managed Service Providers

jaunty blade
#

oh no..

topaz trellis
astral crane
#

here? @little wolf

little wolf
#

hi

astral crane
#

too many channels :/

little wolf
#

for the better

astral crane
#

ig

dire siren
#

tensorflow = tf = the fuck
is this statement correct?

latent scaffold
#

team fortress

dire siren
#

oh ty

#

so tensorflow = teamfortress

#

does that mean
3tensorflow = teamfortress3?

dense sun
#

any high schoolers here? If you're looking for volunteer hours you can teach a python course at genxl.org

odd sluice
#

you think a high-skooler will have that sense of responsibility?
Just curious

wraith hound
odd sluice
#

lmao
I doubt it

latent scaffold
#

I find that kind of insulting

odd sluice
#

lmao
why
I'm a high schooler you're not a high schooler

latent scaffold
#

what? Yes, I am

inland wolf
#

lol

odd sluice
#

I assume 9th grade is high school

latent scaffold
#

Yes

odd sluice
#

ah yeah ok

latent scaffold
#

9th-12th

odd sluice
#

ohhh nvm then

latent scaffold
#

What on Earth is high-school to you?

odd sluice
#

9-11

#

I kinda considered 12th as college

#

idk why

latent scaffold
#

9-11... that looks awful out of context

#

anyways

latent scaffold
#

Even then, I'd be a junior had you asked me a couple of months ago

#

junior = 11th, if you don't know

odd sluice
#

do you guys take boards

latent scaffold
#

"take boards"?

odd sluice
#

board exams i mean

latent scaffold
#

I don't even know what that means

odd sluice
latent scaffold
odd sluice
#

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

latent scaffold
#

We have things kind of like that

#

SAT and pSAT

odd sluice
#

huh
we have SAT as an optional test to unlock access to foreign colleges here

latent scaffold
#

When I took the pSAT, I scored somewhere in the 90th percentile

#

perhaps it was in the 80's

little wolf
#

why does both of these work?

#

does rust convert String to str in the greet function?

graceful basin
#

Rust has some automatic deref rules, and dereferencing a string yields str

little wolf
latent scaffold
#

I'd think only the dereferenced string is &str

#

but referenced is String

little wolf
#

so im dereferencing the String when im passing it down in the greet function?

gritty zinc
little wolf
#

hmm

graceful basin
#
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
gritty zinc
#

hmm, what trait governs that actually...

graceful basin
#

Deref

gritty zinc
#

ah

little wolf
#

what does the * do?

#

oh its the pointer to the variable

graceful basin
#

quite the contrary

#

it dereferences the "pointer" in the variable

little wolf
#

oh

graceful basin
#

and String is a "pointer" to str

little wolf
#

it gets the value of the pointer?

#

the *

graceful basin
#

more or less, yes

gritty zinc
#

oh no this does not look like a hexagonal lattice

little wolf
#

ok so the &variable should be the pointer then right?

graceful basin
#

that is borrowing the variable

#

it is kind of similar

#

but it is closer to an const reference in C++

little wolf
#

oh so, read only?

graceful basin
#

yes

little wolf
#

i see, and &mut variable would be complete ownership?

last mantle
#

&mut

#

i guess

gritty zinc
#

a Rust reference is kinda like a pointer that is:

  1. guaranteed to be non-null
  2. guaranteed to obey all the borrow constraints, meaning that, say, if you have two &mut Ts (or a &mut T and an &T), you know for sure they aren't to the same object (aren't aliased)
graceful basin
#

&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

little wolf
#

how to use pointer?

graceful basin
#

it is very rare and generally not useful

little wolf
#

oh i see

graceful basin
#

the few things you need pointers for in C++, you can do with Rc Arc and Box

little wolf
#

Rc Arc?

graceful basin
#

shared_pointer of C++

#

essentially almost a GC for a specific object

little wolf
#

hmm, ok so when i want to pass a String, do i use &String or &str?

graceful basin
#

for function parameters, it is generally better to take &str

#

but as struct members, you probably want String

little wolf
#

struct members?

gritty zinc
#

this looks cool, but also isn't a graphene lattice ๐Ÿ˜”

little wolf
latent scaffold
#

I would think so

gritty zinc
#

finally

graceful basin
gritty zinc
gritty zinc
graceful basin
#

well, at least you learned something

little wolf
gritty zinc
#

time for vibrations

gritty zinc
little wolf
#

oh i see, thank you

gritty zinc
#

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)

little wolf
#

aliasing?

graceful basin
#

2 pointers/references to the same object

#

another language that forbids this is fortran

little wolf
#

oh the first pointers gets removed right?

gritty zinc
#

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)

little wolf
#

if the first one is mutable and the second one isn't

#

would the first one be removed?

gritty zinc
#

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.

little wolf
#

interesting

gritty zinc
#

lutwut

#

haha, you crashed the compiler, cool

little wolf
#

no

#

wait so

#

ok yea, my compiler is messed up

#

wow, my code was so horrible my compiler gave up

gritty zinc
#

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)

little wolf
#

oh that would pass by value, so it wouldn't raise an error?

gritty zinc
#

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.

little wolf
#

oh

#

im a little confused, im gonna take a break, thnx for helping

gritty zinc
#

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

round rose
#

IIRC the encoding is to blame for that

gritty zinc
#

switched color format to I444 and it seems to be fixed

#

yay

thick osprey
#

If it helps, to a colour-challenged set of eyes it looks identical rooDerp

gritty zinc
#

This was the important setting.

latent scaffold
gritty zinc
#

both the default NV12 and RGB fail to preserve the colors

#

it's the optical vibration mode of a graphene sheet

round rose
#

That's pretty neat

gritty zinc
#

each vertex knows its displacement eigenvectors, and recieves as uniforms the wave vector and the current phase (the time-dependent part, so omega*t)

latent scaffold
#

man I keep looking at that and going cross-eyed

gritty zinc
#

lemme do a faster wave

latent scaffold
#

Oh God, if I stare long enough the direction changes

gritty zinc
latent scaffold
#

I need more

#

this is tripping me the heck out

acoustic moss
#

have you become addicted to waves cyph

latent scaffold
#

yes

acoustic moss
latent scaffold
#

the more I focus

#

the weirder stuff gets

latent scaffold
#

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

acoustic moss
#

discord.TextChannel?

rough sapphire
#

Wrong channel sry

gritty zinc
tender smelt
#

๐Ÿ˜” i missed the rust discussion

gritty zinc
tender smelt
#

ยฏ_(ใƒ„)_/ยฏ

solid pollen
tender smelt
#

it's the only way to write str::split_at_mut

gritty zinc
#

That's why Rust must be from another ๐Ÿ‘€

tender smelt
#

๐Ÿ‘€

#

||i don't actually know what that means||

gritty zinc
#

and wait, is split_at_mut unsafe

tender smelt
#

no

gritty zinc
#

I remember it as safe, hmm

tender smelt
#

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)
        }
    }
gritty zinc
#

split_at_mut is from the standard library

gritty zinc
#

(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)

gritty zinc
#

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

wraith hound
#

@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

remote citrus
#

hmm

wraith hound
#

Although those are all dependent on having a web app

remote citrus
#

what kind of apps can I make in it?

wraith hound
#

Anything you can make on a website

#

Can be turned into those

#

Discord, for example, uses React Native and Electron

latent scaffold
#

and a lot of RAM

wraith hound
#

That's why I prefer Tauri

#

It doesn't eat ram like electron from what I've seen

latent scaffold
#

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

wraith hound
#

Fair

remote citrus
#

ok, thanks

remote citrus
#

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)

sinful token
#

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)

wraith hound
#

In nodejs, nothing gets installed globally unless you tell it to

inland wolf
#

ye

wraith hound
#

Everything is download into a local node_modules directory

inland wolf
#

-g

last mantle
#

yarn vs npm

#

also, @wraith hound react vs svelte

inland wolf
#

inb4 react

wraith hound
inland wolf
#

svelte is based

wraith hound
#

Although, if you're looking to get a job or work with people, React

last mantle
#

no job, i don't think i like web dev a lot

wraith hound
#

Svelte is so much nicer, but no job opportunities and people who know it

last mantle
#

just as a hobby

wraith hound
inland wolf
#

it is new

wraith hound
inland wolf
#

yes

inland wolf
last mantle
#

css vs some other uh tailwind or scss or something

wraith hound
#

scss/sass

inland wolf
#

sassy css

wraith hound
#

Syntactically Awesome Style Sheets

#

Sassy Cascading Style Sheets

inland wolf
#

lol

#

i was right about the sassiness

last mantle
#

so is it a substitute for css or..

wraith hound
#

It's a preprocessor

inland wolf
#

its like ts to js

wraith hound
#

Css with a different syntax

last mantle
#

ooh

wraith hound
#

It has nesting

#

And easier variables

#

Sass even has no braces or semicolons

last mantle
#

oh i see, much thanc

inland wolf
#

np

last mantle
#

oh i see, much thanc dawn and not zee

inland wolf
#

damn

remote citrus
wraith hound
#

You shouldn't

#

You should always install on a per project basis

inland wolf
#

well

wraith hound
#

Run npm init and npm install ___ to start

inland wolf
#

maybe u want a cli

wraith hound
#

Yes

wraith hound
remote citrus
#

I've tried but it doesn't work

remote citrus
tardy rain
#

Dont work how

wraith hound
#

Are they listed in package.json?

#

And it's there an error?

remote citrus
wraith hound
#

Node checks package.json

remote citrus
#

I have done this whole day

wraith hound
#

Is there an error?

remote citrus
#

where?

wraith hound
#

You say it's not working

#

What's not working?

remote citrus
#

yeah wait

#

it says an error when I install it

wraith hound
#

And is the node_modules directory inside your project

remote citrus
wraith hound
#

Inside the project directory I mean

#

Each nodejs project should probably have its own directory

remote citrus
tardy rain
#

What

wraith hound
#

Cd into your project directory

#

And then run npm install

remote citrus
#

It is stored in another drive ๐Ÿ˜…

wraith hound
#

Everything is done within the project

#

Not somewhere else like pip does

remote citrus
#

oh

remote citrus
tardy rain
#

cd changes the current directory

remote citrus
#

oh

tardy rain
#

cd /path/to/new/dir

inland wolf
#

ye

remote citrus
#

hmm.... so you mean I have to open powershell in my project's folder and then install the module?

wraith hound
#

Yes

inland wolf
#

yes

wraith hound
#

Exactly

remote citrus
#

lemme see

inland wolf
#

undoubtedly

remote citrus
#

Thanks a lotttt brother @wraith hound I was struggling with this from 2 days, you were really really helpful.
Thanks a lot ๐Ÿ˜Œ

inland wolf
#

2 days?

wraith hound
#

Node is a whole other world, don't think of dependency management like you do with pip

rough sapphire
#

python and js are simple and fun cus they're dynamically typed

#

change my mind

inland wolf
#

not changin ur mind since ur vsauce

rough sapphire
wraith hound
#

I want to try making a low level, compiled language that's still simple

inland wolf
wraith hound
#

I'm going to fail

#

But I will try

inland wolf
#

immaculate timing

rough sapphire
#

lmfao

inland wolf
#

10/10 well done

odd sluice
wraith hound
#

Never gonna let you down

inland wolf
#

ok

rough sapphire
#

soyuz neryushimiv respublik svobodnykh

inland wolf
#

sir this is a wendy's

near bolt
#

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) ?

graceful basin
#

no

#

that's just syntax

near bolt
#

oh so regardless of the language, both ways shd work for all languages?

graceful basin
#

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

near bolt
#

oh i see

graceful basin
#

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

near bolt
#

oh okay thanks!

vapid nymph
#

wtf is neofetch and winfetch on

#

are they taking drugs?

#

the actual shell

latent scaffold
#

Winfetch also tells me -1 packages

#

and wrong powershell

#

and wrong resolution

vapid nymph
#

meanwhile neofetch

latent scaffold
#

and only one GPU

vapid nymph
#

this is not bash u idiot

#

if i run them in cmd they're still wrong

#

one sec

last mantle
#

admin perhaps

vapid nymph
#

well winfetch is a bat

last mantle
#

cmd in admin

vapid nymph
#

ยฏ_(ใƒ„)_/ยฏ

brazen ingot
#

@gilded prawn You should edit your status, typo in because!

gilded prawn
#

Its a quote from @bleak lintel i can't change it

remote citrus
bleak lintel
#

AMAZING

gilded prawn
#

:)))

frozen coral
#

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

#

โ„ข๏ธ ยฉ๏ธ

remote citrus
winter terrace
#

ok_handbutflippedโšช๐Ÿค–โšช๐Ÿ‘Œ
โšช
๐Ÿฆฟ ๐Ÿฆฟ

#

peace and tranquility ok_handbutflipped ๐Ÿ˜” ๐Ÿ‘Œ

rich moon
#

the body looks weir

solid pollen
#

That is me

#

I think I did

#

Good stuff

polar vigil
#

Do you know is there AI to solve math problems?

#

App or something

tardy rain
#

im guessing you mean something like wolfram alpha

polar vigil
#

No, like you input your problem and it tries to solve it

acoustic moss
#

so like wolfram alpha

polar vigil
#

I thought wolfram only solved math formulas

tardy rain
#

what kind of problem are you looking to solve

plucky ridge
#

@polar vigil Wolfram covers a crap ton of stuff

solid pollen
#

I am thinking about getting the student membership for next year

#

Step by step resolution could be very handy

plucky ridge
#

For me it's another one of those "that would be cool" but I wouldn't know what to do with it

solid pollen
#

hah

#

I'm glad I don't have monthly incomes for that reason

#

I'd take random crap just because it looks cool

vapid nymph
solid pollen
#

We are not

#

At least as far as I know

vapid nymph
#

i remember he was for a time, but not sure if still is

#

was just via cloudflare firewall iirc

solid pollen
#

Ah, maybe CF is

vapid nymph
#

asking because i'm spoofing my user agent for python discord heh

#

to be Hello Joe

vapid nymph
#

at the same time, I figured I'd spoof internet explorer on bing and microsoft sites

bleak lintel
#

are we

#

are weeeee

vapid nymph
#

heh

bleak lintel
#

weeeeeeee

vapid nymph
#

actually

bleak lintel
#

yeah i think we are

vapid nymph
#

right now its spoofing edge but mwahahahahaha

bleak lintel
vapid nymph
bleak lintel
#

i am looking now lol

vapid nymph
#

i just spammed several requests for your benefit in finding it ๐Ÿ˜›

bleak lintel
#

lol, the answer is no we don't because I can't access the DB anymre

bleak lintel
#

i changed email from an @josephbanks.me to an @jb3.dev

#

and github oauth changed

#

so fauna won't identify me now lol

vapid nymph
#

lmfao

vapid nymph
#

do you have access to user agents for those?

bleak lintel
#

what

#

no you are misunderstanding lol

vapid nymph
#

no im not

bleak lintel
#

to query the database, i need to login

vapid nymph
#

i just want you to see my user agent

bleak lintel
#

i used to login with an @josephbanks.me email

vapid nymph
#

if you have logs for your own webservers at jb3.dev

bleak lintel
#

but i changed email to @jagged quiver3.dev

#

no

#

you are misunderstanding

vapid nymph
bleak lintel
#

i cannot access the pydis database, because I changed email

#

I have now resolved it

vapid nymph
#

it doesn't have to be pydis it just has to be something that you can see logs for

bleak lintel
#

try send a req

vapid nymph
#

requested that one

solid pollen
#

It is a special header sent in every request to say who is making the request

#

Lemme give an example

#

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```
bleak lintel
#

it's not great practice to set user agents that don't follow standard

solid pollen
#

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

bleak lintel
#

๐Ÿ™‚

solid pollen
#

Tbf just Google random stuff you find that you don't know about

bleak lintel
#

i've seen it done before

solid pollen
#

That's how I know all those random shits

#

Did you really used a filter rule just to block ARU lmao

bleak lintel
solid pollen
#

That could not be an existing word haha

#

How many filter rules do we have @bleak lintel?

#

You use a plugin

solid pollen
#

Although I don't recommend it

solid pollen
#

lol, I guess it is working then

bleak lintel
#

yeah that's not firewall

#

that's just an invalid request

solid pollen
#

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

bleak lintel
solid pollen
#

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

bleak lintel
#

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

solid pollen
#

SQLi is roughly the same thing, except with SQL queries

bleak lintel
solid pollen
#

Good old Bobby table

#

I was wondering if you'd post it haha

#

Kinda, yeah

#

lol nice

bleak lintel
#

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

cedar nova
#

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

wraith hound
#

Or what stuff would you recommend starting with?

viscid hemlock
#

The commands system has a pretty vocal guide, but not really a full-on tutorial per say

bleak lintel
wraith hound
#

Thank you!

cedar nova
viscid hemlock
#

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

cedar nova
#

googling FastAPI and Pydantic rq ๐Ÿƒ๐Ÿพโ€โ™€๏ธ

cedar nova
#

(but it sucks that discord.py doesnt have that documentation yet, itโ€™d be great so more beginners could use it

viscid hemlock
#

The closest is a FAQ

wraith hound
cedar nova
#

so i feel like i wasted my time watching them/learned the wrong things

wraith hound
#

It's really up to date

cedar nova
#

๐Ÿ™๐Ÿพ๐Ÿ™๐Ÿพ๐Ÿ™๐Ÿพ

wraith hound
#

Made by none other than @gilded prawn

wraith hound
cedar nova
#

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

cedar nova
gilded prawn
wraith hound
#

It's free

#

If you're looking to deploy to production or something though, a cheap VPS would be best

cedar nova
#

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

stuck elbow
#

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

winter terrace
#

is there a site creator like square or wix that lets you make the site, then just cv the html into your own project?

vapid nymph
#

oh wait he unblocked me

#

no nvm i'm still blocked

uneven pine
#

loser

gritty zinc
vapid nymph
#

blocked from that too

bleak lintel
vapid nymph
vapid nymph
bleak lintel
#

yeah

rough sapphire
#

i am looking to code a game in python

#

person under this text gets shot tho (a joke)

vagrant mistBOT
#

:first_quarter_moon_with_face:

rough sapphire
#

wtf (what the frick)

bleak lintel
#

that's unfortunate @rough sapphire

rough sapphire
#

how did i send a

rough sapphire
thick osprey
#

Shame really. We barely knew them

rough sapphire
#

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

delicate lantern
mellow spire
#

Hurr Durr Trick

rich moon
#

da faq was seemer

odd sluice
shrewd prawn
#

wdym its not a rickroll

odd sluice
#

rickrolled 3 times from the same link -_-

brazen ingot
#

Ahk

rough sapphire
rich moon
rough sapphire
#

its not mine

inland wolf
#

lol

rich moon
#

that sus

acoustic moss
#

it truly is possibly dangerous content

tranquil orchid
#

It's very malicious

inland wolf
#

yes

tranquil orchid
#

Joe's attacked me with it many times

#

No idea

dire siren
#

is show me your dict ||(dictionary in python)|| pic a bad joke

tranquil orchid
#

@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

acoustic spire
#

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

๐Ÿ˜†
tight ocean
#

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)

solid pollen
royal lakeBOT
#
Query results

โ€ข addicted-to-bikeshedding
โ€ข donโ€™t-be-a-dict
โ€ข joes-ipv6-addiction
โ€ข ๐–ฒebastiaanโ€™s-otn-addiction

inland wolf
#

half of them are about addictions

solid pollen
#

Don't be a dict is a better one

inland wolf
#

agree

solid pollen
#

Show me your dict sounds immature

near bolt
#

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);```
inland wolf
#

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)

dire siren
#

ty

near bolt
inland wolf
#

yes

near bolt
#

but if it's not combined with hello, it can be printed by itself without {}

inland wolf
#

yes

near bolt
inland wolf
#

because thats a way of writing string literals

#

f strings

#

they re called

near bolt
#

console.log(${person.firstName} ${person.lastName})

inland wolf
#

in javascript its just ${} instead of {}

#

and the string has to use ``

acoustic moss
#

and backticks

inland wolf
#

called template strings

acoustic moss
#

console.log(`${person.firstName} ${person.lastName}`)

#

๐Ÿ˜Ž

inland wolf
#

damn

near bolt
#

but i thought person.firstName and person.lastName are strings already? or isit we have to put ${} for all variables?

latent scaffold
#

reminds me of Kotlin, but I figure you use ${} for expressions and $ for variables (unless it's very different in JS)

near bolt
#

oh icic

harsh tundra
# acoustic spire yeah, I though about ahk, but i am new so I dont think that I need a lot of stuf...

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/

near bolt
#

thanks!

acoustic spire
#

@harsh tundra ty checking rn

harsh tundra
# acoustic spire <@!124812862567743488> 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

acoustic spire
#

this layout actually scares me, there is too much

near bolt
#

oh right okay thank u vv much ๐Ÿ‘

left jacinth
#

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?

latent scaffold
#
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.
left jacinth
#

I know, I read this before already

latent scaffold
#

The point is that the chance is so low that it is negligible