#voice-chat-text-0

1 messages ยท Page 339 of 1

dark swan
#

Tesla gang

#

hands free

willow light
#

just don't drive that steel box anywhere when it rains

stark river
#

My discord password is one_mississippi

frozen owl
#

iirc they merged with some dutch company

quartz beacon
#

๐Ÿ˜ณ

dark swan
#

hem owns the seashore

amber raptor
#

Shell was formed in April 1907 through the merger of Royal Dutch Petroleum Company of the Netherlands and The "Shell" Transport and Trading Company of the United Kingdom.

frozen owl
#

royal dutch petroleum plc

frozen owl
#

i had to study shell plc for human geography

willow light
#

a literal shell corporation

frozen owl
#

cougar=older woman
jaguar=car

dark swan
#

n no

willow light
#

just waiting for the rain to arrive

short owl
#

Family Guy is getting away with a lot of stuff

#

Orville is very good

#

did you see the commercial crawl , Quagmire chased Lois and caught her ....... @rugged root

unkempt mica
#

Hi I am making 600k a month

#

Is it good enough in america

short owl
#

Ross Perot ?

unkempt mica
#

I am the best developer in the call

willow light
#

it is +20 C here @peak depot which given it has been +38 for the past three days means everyone is wearing sweatshirts and sweatpants and shivering

gentle flint
main jetty
#

Hello uncle @willow light

gentle flint
#

i have also obtained many eggs

upper basin
#

Clari, you familiar with Penrose notation of tensors?

#

@willow light

main jetty
upper basin
#

I would like to ask sth.

gentle flint
willow light
main jetty
#

In India it's cost like 2dollor

willow light
#

also that many eggs in america is around $25

gentle flint
#

out of the fridge

#

two months in the fridge

#

I eat on average one egg a day

main jetty
willow light
#

here in the us you can get eggs about a week before they go bad, and some stores will actually hold on to them to make sure you get them just before they go bad so you have to keep buying more

gentle flint
#

that's absurd

main jetty
willow light
#

but we do get avocados for $0.18 each

quartz beacon
willow light
#

thank you cartel

main jetty
upper basin
#

Haha nuts

willow light
main jetty
#

$0.09 in my country

gentle flint
quartz beacon
#

per nut?

quartz beacon
gentle flint
#

yes

willow light
# main jetty Why every product overpriced

because the northeast us is full of rich people who are also super old and don't know they're being ripped off so the powers that be are completely neutered when it comes to price control

quartz beacon
#

that's what you get for colonising

#

:3

gentle flint
#

4 years ago they were 1 euro per kilo

#

those were good times

#

brb

main jetty
willow light
#

counting down until the MBAs come up with a subscription for breathing

main jetty
#

12 Banana cost in India $0.80

#

Hey guys why you're talking in fast mode

willow light
gentle flint
#

otherwise I wouldn't have given the price per kilo

main jetty
willow light
#

brb getting lunch: tostones and a jibarito

stiff notch
#

shlawg

upper basin
#

Plome, mr international.

stiff notch
upper basin
#

"I like to cook, but when we're in the room I'll make you boil."

#

80s dating VCR

dark swan
stiff notch
#

that was me

willow light
dark swan
#

@rugged root Who's a felon>?

#

oh no

#

my mirror broke

#

Actually Hemlock I'm clean record

#

@rugged root

#

ahahahah

#

thats a damn good reply

#

but yes where I moved ya could say Im clean

#

500$ anyone can guess where I live now

#

@rugged root

quartz beacon
#

even if we guess you'll say wrong

dark swan
#

cute

#

@quartz beacon habitual****

#

Tell me what lie please

#

ooooo

#

yikes

#

jikky ya gonna get muted

#

wrong

#

@eager tapir

dark swan
vast iris
#

yes

#

total income from all sources hoping for 300k+

#

from a job

#

120k+

dark swan
#

@gentle flint Moved out at 17 lad

vast iris
#

I work for @dark swan

#

current salary is 150k

#

Cloud security analyst

#

Cloud is where the money is

willow light
#

Working on my summer reading at the grocery store, brb

vast iris
#

Ensures the CIA triad, security assessments, monitoring cloud infrastructure, responding to security incidents, ensuring compliance, securing cloud systems

#

that pretty much sums it up

#

It is related, and pretty important, a person could use these to manipulate the binaries and get root

#

that's why the "gtfobins" is in my "pronouns"

#

But that's there just for fun, kind of a honeypot for people to dm me that know about gtfobins

#

so I can talk with them and just chat tbh

rugged root
#

Gold Tracks Fiscally on Bankers International Notary Stress.

#

Eh, still sucks but it's the best I could think of

#

@quartz beacon Yeah, just got back to the office

vast iris
#

It's just there as a honeypot, if you really wanted to get specific just manpage it

dark swan
#

@peak depot Lmk when you're ready to work for me

quartz beacon
#

-_-

dark swan
#

@quartz beacon Shit forgot Im poor .. darn

rugged root
#

Stahp

dark swan
#

beer hunter the drunk

#

damn I miss bearhunter

vast iris
#

you don't need to WRITE to the file, you can execute the file and elevate it from within the program itself

#

If you're interested I can show you some examples?

rugged root
#

Travelling through the frigid lands.... watching the rolling herds of ales cross the plains.... waiting for the time to strike

vast iris
#

check dm

rugged root
#

Beat me to it

#

Thank you for taking it to DMs

eager tapir
#

@dark swan

#

I always miss the good stuff

rugged root
#

@silent sequoia Yo

silent sequoia
#

hi

earnest quartz
#

!eval
print('^\n([A-Z-0-9]{3,}) [\n\D]*')

wise cargoBOT
upper basin
#

Greetings Coffee!

#

Long time no see sir.

gentle flint
gentle flint
peak depot
#

she is chonky

upper basin
#

Yall making me want a pet, and I am being reminded of why I don't have a pet. Stahp conflicting me.

peak depot
#

sleep well

upper basin
#

Danke!!

gentle flint
vestal arrow
#

can i have the link for this channel for others to join

gentle flint
#

it won't work for them if they aren't in the server though

vestal arrow
#

how do they join the server

gentle flint
#

through the invite

#

@vestal arrow

whole bear
#

Bro here is the things that I think python is best for:

#

pseudo code for test

#

Easy and straight forward Nural networks (AI)

#

Simple GUI programs

#

Algorithm testing (Slow but really easy)

scarlet halo
#

๐Ÿ˜„

whole bear
#

Lol

spare galleon
plain swift
#

@upbeat bobcat hello

#

whatsapp bro

upbeat bobcat
plain swift
#

all good

upbeat bobcat
frozen basalt
#

i dont have access the voice chat yet guys but pleasure to meet you all

#

@feral aurora

#

@weary sail

frozen basalt
#

im looking to get into python about to take a course on udemy on web scraping see if i can make this into a side hustle

#

yes i saw it i dont have enough messages

#

oh wow

#

yeah i completely get it they need to do things like that to limit flow of bad traffic

#

spammy to say the least

#

but yeah my first big project or goal is to build a web scraper

#

seems like data collection is where the money is at

#

!users

inner walrus
#

You need to send certain amount of message to get the perm

frozen basalt
#

im aware of this i saw in verification for voice you need to meet certain requirements

weary sail
#

!stream

inner walrus
#

Anyone knows how YouTube serve there video links?

frozen basalt
#

have you guys seen terminator zero i guess it got leaked 3 weeks before netflix release

drowsy drum
#

i cant speak here

#

in the vc

#

oh ty

gentle flint
#

you're in the wrong server for that

drowsy drum
#

50 mesages lol

feral aurora
frozen basalt
#

yup

drowsy drum
#

can i spam it somewhere

frozen basalt
#

no dont spam it against policy

drowsy drum
#

omg lol

#

there sooooo many catagories on here'

frozen basalt
#

it has to be natural

#

@gentle flint gotcga

drowsy drum
#

oh well have a good night

feral aurora
whole bear
#

Hi @wind raptor and @upbeat bobcat how's your day going so far

wind raptor
upbeat bobcat
whole bear
whole bear
upbeat bobcat
#

What should be the size of settings window?

#

I think this is good for now

whole bear
dire pebble
#
class DynamicCounter(
    discord.ui.DynamicItem[discord.ui.Button],
    template=r'counter:(?P<count>[0-9]+):user:(?P<id>[0-9]+)',
):
    def __init__(self, user_id: int, count: int = 0) -> None:
        self.user_id: int = user_id
        self.count: int = count
        super().__init__(
            discord.ui.Button(
                label=f'Total: {count}',
                style=self.style,
                custom_id=f'counter:{count}:user:{user_id}',
                emoji='\N{THUMBS UP SIGN}',
            )
        )

I have never seen this kind of class inharitance syntax before, can somebody explain how this syntax functions?

#

The firt argument, which is a class that also has inherited a class (i guess) inside square braces

#

Also the one starts with template =... is weird

upbeat bobcat
#

Okay, Thanks.

#

It is giving error

wind raptor
#

you have to import QDesktopWidget

upbeat bobcat
upbeat bobcat
wind raptor
#

You can't do that

#

from PySide6.QtWidgets import QDesktopWidget

upbeat bobcat
wind raptor
#

ok, but maybe try this way. I could be wrong, humour me

upbeat bobcat
#

not orange so it's not working

wind raptor
#

It was a qt5 thing. They could've updated it. I didn't check the docs. One sec.

#

Ahh, QDesktopWidget was depricated and removed in 6

#

use cp = QtGui.QGuiApplication.primaryScreen().availableGeometry().center()

rose delta
#

import this

wind raptor
#

So you just need QtGui

#

@upbeat bobcat

upbeat bobcat
upbeat bobcat
wind raptor
#

WSL is pretty small and I don't think you can move. Do you mean the Linux distro that goes on WSL?

upbeat bobcat
#

When I run main window it also opens settings

wind raptor
#

I don't think you can move WSL off system drive. You can move the distro

#

WSL is a part of windows

upbeat bobcat
frozen owl
#

what if im a crow?

#

Not!ACrow

upbeat bobcat
#

Now it is more broke now it opens calculator also

#

Now it is even more broke now it opens calendar also

#

Oh I fixed it

somber heath
#

I have been.

#

I am being.

#

I will be.

frozen owl
#

maybe deepseek is not the best now that i think of it

upper basin
#

!kindle

wise cargoBOT
#
Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

dire pebble
#

I wanna understand the syntax

#

Not the content of 'the' classes

lost bluff
#

๐Ÿ˜ญ

stark river
#

@wind raptor kindly explain your actions for censoring my message and over-moderating the chat

wind raptor
lost bluff
#

bootcamp is great

#

ye do it

#

Mr Nurmagomedov do that

stark river
dire pebble
#

What message?

stark river
#

the moderator only wants us to talk about the weather

sour imp
stark river
#

probably takes inspiration from north korea

#

i sense a kim wannabe

wind raptor
dire pebble
stark river
#

in that case i don't think you are fit to be moderator

dire pebble
#

@stark river What action of yours was evaluated as a forbidden behaviour?

stark river
#

i think you should step down from moderator @wind raptor

wind raptor
dire pebble
somber heath
sour imp
# dire pebble I wanna understand the syntax functionality rather than the class functionality ...

class DynamicCounter defines a new class named DynamicCounter (A blueprint for creating objects allowing for encapsulating data and behavior)
discord.ui.DynamicItem[discord.ui.Button] this states that DynamicCounter is a subclass of Discord.ui.DynamicItem that is specifically parameterized with discord.ui.Button
[discord.ui.Button] are used to specify that DynamicItem is being used with discord.ui.Button this means that DynamicCounter will specifically handle button components

amber raptor
#

Rabbit for Moderator, Vote for someone who's opinion on banning is "Why not?"

upper basin
#

You're OP as is.

dire pebble
#

Give me stream permission for god's sake

#

The one that allows me to share my screen

wind raptor
dire pebble
#

Not right now but I wasn't able to do it whenever I needed

amber raptor
#

Errr

stark river
#

don't ask for screen share from someone who abuses his responsibility

wind raptor
#

We only grant streaming perms temporarily as they are needed to avoid any streaming problems

dire pebble
#

But I don't even get what happened

dire pebble
#

You can at least trust someone

amber raptor
#

#RabbitDidNothingWrong

stark river
#

don't worry a complaint has been lodged against the moderator for abuse of his responsibility. we cannot have corrupt moderators in this aspect of our lives too

wind raptor
amber raptor
#

#MindfulDevDidEverythingWrong

scarlet halo
#

!e

print(len("\n"))
wise cargoBOT
dire pebble
#

I assume a mistake won't blow the server up

#

But several people will be more comfortable

scarlet halo
#

!e

index = 0
string = "hello world\n"
while index < len(string):
  print(string[index])
  index+=1
wise cargoBOT
somber heath
whole bear
#

whats going on?

dire pebble
#

They won't focus on ethics at that point

whole bear
#

whats everyone talking about?

scarlet halo
#

!e

index = 0
string = "hello world\n"
while index < len(string):
  raw = r'{}'.format(string[index])
  print(raw)
  index+=1
wise cargoBOT
dire pebble
amber raptor
#

!e python string = "hello world\n" for a in string: print(a)

wise cargoBOT
scarlet halo
#

!e

index = 0
string = "hello world\n"
raw = r'{}'.format(string)
while index < len(string):
  print(string[index],raw[index])
  index+=1
wise cargoBOT
somber heath
wise cargoBOT
scarlet halo
amber raptor
#

rewrite it?

dire pebble
#

Bro wouldn't be here if he chose this way

somber heath
wise cargoBOT
amber raptor
#

spelis appears to be doing something the wrong way, the fix would be right way people are posting

scarlet halo
#

i do everything the wrong way ๐Ÿ˜œ

amber raptor
obsidian dragon
amber raptor
#

@molten pewter

wind raptor
#

Hey @midnight agate

#

How are you doing?

#

I'm great, thanks! What are you learning these days?

short owl
#

zubba zubba

spare galleon
#

@somber heath what happens when a game studio shuts down, who owns the ip of their games

short owl
#

howdy Maro @midnight agate

amber raptor
short owl
#

another day in the Wild West or such locale

wind raptor
#

That's fun. Are you still using a lot of Rust?

peak depot
upper basin
whole bear
#

lemme try to role one

#

but first I need to find wepons grade uranium

upper basin
#

.8ball can you get high on Uranium?

viscid lagoonBOT
#

Yes definitely

upper basin
#

There you go.

whole bear
#

.8ball Was the last thing you sent correct?

viscid lagoonBOT
#

Most likely

whole bear
#

F*ck

#

.8ball Should I kill a person

viscid lagoonBOT
#

Outlook good

#

Reply hazy try again

#

Outlook not so good

whole bear
#

F*ck

#

.8ball is rabbit a good person? @amber raptor

viscid lagoonBOT
#

Most likely

wind raptor
#

I gotta go. Have a great one! ๐Ÿ‘‹

spare galleon
#

why is this making my life difficult

whole bear
#

its unreadable

#

gotta go

spare galleon
#

see why pawn no work

#

lol

#

Updated FEN: 8/2k1bnr1/1pppppp1/1n6/qN6/8/8/PPPPPPP1

#

Start: (0, 1), End: (2, 2), Piece: N, Target: None Moved N from (0, 1) to (2, 2) Updated FEN: 8/nbqkbnr1/ppppppp1/8/8/8/1N6/PPPPPPP1 Start: (1, 3), End: (2, 3), Piece: P, Target: None Illegal move for P from (1, 3) to (2, 3)

#

your rating?

short owl
#

a good quality mic is important , tin cans and a coil is sufferable

upbeat bobcat
#

I have code which has images when I put in git folder the images are not working I also pasted the images in the git folder but still not working

short owl
#

your mic sounds clear and studio ish in quality

spare galleon
#

hmmm Lichess ratings are to inflated whats your chess.com? 1500

spare galleon
#
def is_legal_move(self, piece, start, end):
        row_start, col_start = start
        row_end, col_end = end

        delta_row = abs(row_end - row_start)
        delta_col = abs(col_end - col_start)

        piece_type = piece.lower()
        piece_color = self.get_color(piece)
        target_piece = self.positions.get(end)

        # Debugging outputs
        print(f"Start: {start}, End: {end}, Piece: {piece}, Target: {target_piece}")

        if target_piece is not None and self.get_color(target_piece) == piece_color:
            print("Move blocked: destination occupied by same color")
            return False

        if piece_type == 'p':  # Pawn
            if piece_color == 'white':
                forward = -1
                start_row = 6
                en_passant_row = 3
            else:
                forward = 1
                start_row = 1
                en_passant_row = 4

            if (row_end == row_start + forward and col_end == col_start and target_piece is None) or \
               (row_start == start_row and row_end == row_start + 2 * forward and col_end == col_start and target_piece is None and (row_start + forward, col_start) not in self.positions):
                return True
            elif row_end == row_start + forward and abs(col_end - col_start) == 1 and target_piece is not None:
                return True
            elif row_end == en_passant_row and abs(col_end - col_start) == 1:
                if self.last_move and self.last_move['piece'].lower() == 'p' and self.last_move['end'] == (row_start, col_end):
                    return True

#pawn moving logic, plz kill me i give up, even chatgpt doesnt know whats wrong```
#

wouldnt be fair im like a 12-1300

rugged root
#

I think you'd still have to track and commit it

rugged root
upbeat bobcat
spare galleon
rugged root
#

Let me double check, I think I'm using the wrong terms

#

Ah yeah

#

git add [file] so that it's added to your staged files for your next commit

#

Or are you doing this through a gui?

#

(I pretty much only use a gui)

vocal basin
#

because logarithmic scale

frozen owl
#

ive done NEAT before

#

and it sucked

upbeat bobcat
rugged root
#

I think there's some sort of binary file tracking...

#

I can't remember

vocal basin
#

LFS?

rugged root
#

That one

vocal basin
#

I forgot S stands for storage not system

vocal basin
#

when I see FS I think FileSystem

rugged root
#

Same

vocal basin
#

it's even okay to store images without LFS, at times

upbeat bobcat
vocal basin
#

to many contexts, LFS just means reduced fetch size

#

which also means checking out a commit can fail

rugged root
vocal basin
frozen owl
#

do cats have zoomies

#

more than dogs?

vocal basin
#

also

frozen owl
#

istg the family dog is so fucking hyper once i get home

vocal basin
#

don't paste into .git

#

generally don't do anything with .git manually even if you know in details what it is

upbeat bobcat
frozen owl
#

the family dog freaks out when it sees a truck/another dog

upbeat bobcat
vocal basin
#

VSC?

short owl
#

many machines , simple / complex emit ultrasonic squeeks , that what dogs / cats hear , react too

vocal basin
#

VSC by default shows git status of each file

frozen owl
#

iirc human bile is greenish because it contains breakdown products of haemoglobin?

spare galleon
vocal basin
#

many other IDEs do too

frozen owl
#

have you seen kidney stones @peak depot

vocal basin
short owl
#

jeepers I shut down ALL my system sounds , someone loves them

frozen owl
#

my subway is always spicy italian with honey oat, cucumbers, lettuce, olives, jalapenos and bbq sauce footlong

#

Oregon ( ORR-ih-ghษ™n, -โ gon) is a state in the Pacific Northwest region of the United States. Oregon is a part of the Western U.S., with the Columbia River delineating much of Oregon's northern boundary with Washington, while the Snake River delineates much of its eastern boundary with Idaho. The 42ยฐ north parallel delineates the southern bound...

frozen owl
#

why do you have onions on sushi?

short owl
#

red onions ... is ok

frozen owl
#

hm

#

shrek reference

upbeat bobcat
#

What is VSC and how can i reload it?

short owl
#

green onions ok ...

frozen owl
#

onions have layers.......................... ogres have layers....................

vocal basin
#

Visual Studio Code

thick arrow
#

Just joined, yo

upbeat bobcat
#

wth

thick arrow
#

Anyone here

vocal basin
#

IDE looked like VSC

#

but not sure if it was that

upbeat bobcat
vocal basin
#

(I missed some earlier context)

upbeat bobcat
upbeat bobcat
vocal basin
#

what path are you using?

rugged root
#

Can you show the code where you're loading them in?

upbeat bobcat
#

Ok

#

!paste

wise cargoBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

frozen owl
#

scan the nave?

vocal basin
#

!e

from pathlib import Path
print(Path(__file__).parent / "file.png")
wise cargoBOT
vocal basin
#

@rugged tundra that's because Russian fleet has ended

frozen owl
rugged root
vocal basin
#

depends on the case

vocal basin
frozen owl
thorn wharf
#

generate a random number and place the file in whatever number folder it is from the top

upbeat bobcat
vocal basin
#

how are you running the app?

#

python main.py?

rugged tundra
upbeat bobcat
frozen owl
vocal basin
upbeat bobcat
peak depot
peak depot
vocal basin
#

shouldn't it be note-app?

#

since that's where images are

upbeat bobcat
peak depot
vocal basin
#

if the app is starting from quantum_notes, then file is at note-app/calendar_icon.png

#

not calendar_icon.png

short owl
#

Roast Duck for Christmas ??? @peak depot

thorn wharf
#

im trying to mock a pydantic validator function in a test, anyone have insight?

short owl
#

I practice making , Peking Duck

short owl
#

glazed honey ham

vocal basin
#

as for the run button, not sure how to configure that

#

there's launch.json stuff, might be related

rugged root
#

Santa Probableclause

short owl
#

does your Momma and Poppa have a smoker for the hams @peak depot

peak depot
#

We dont smoke it

short owl
#

ohhhhhhhh....

#

China OR Chiner <--- add a R

upbeat bobcat
vocal basin
frozen owl
#

serde

upbeat bobcat
#

TYSM @vocal basin and @rugged root

rugged root
#

AF deserves the praise

upbeat bobcat
#

@vocal basin Thanks again

upbeat bobcat
peak depot
vocal basin
#

"ai" "investments"
also known as just hiring a lot of people to do it manually

thorn wharf
#

^ devin

frozen owl
#

mechanical turk

amber raptor
#

@peak depot I think you need to realize Anokhi viewpoint is just vastly different from yours, Facebook collaterial damage is just the price we pay for profits/their open source stuff

peak depot
#

Sure, but if I say: " I (personally) have never seen something" you can't say to that: "thats not true"

#

I did not say: " there none of this other stuff facebook"

amber raptor
#

Yea, just giving my viewpoint and why I'm staying out of this despite this normally would be Rabbit food

rugged root
#

Whelp....

#

Have to call the vendor

#

No way around it this time

#

Back in a bit

peak depot
#

Breath

short owl
#

Addictive Sales Techniques

vocal basin
short owl
#

sashimi ?

vocal basin
#

not fish meat

#

or, like

short owl
#

beef , pork ....

vocal basin
#

not seafood meat

short owl
#

got it

vocal basin
frozen owl
#

๐Ÿฅฉ

short owl
#

any donut emojis ?

frozen owl
#

๐Ÿฅฏ

short owl
#

nom nom

frozen owl
#

it's technically bagel emoji

peak depot
#

donยดt eat pork raw yert

frozen owl
#

salami:

peak depot
#

salami is airdryed

short owl
#

if i eat pork raw piggies squeeelll

frozen owl
#

but is it "cooked"

#

peppa pig?????????

peak depot
#

heat is not the only thing that kills bakteria

frozen owl
vocal basin
#

uncooked != raw

short owl
#

comprendo

dire pebble
vocal basin
#

raw is not processed in any way

thorn wharf
#

deli meat and sea food do not count as apart of this convo

short owl
#

roast peking ducky

thorn wharf
#

talking about eating raw ground beef and shit

frozen owl
#

minecraft:

thorn wharf
#

yum

vocal basin
frozen owl
vocal basin
frozen owl
#

To eat raw beef, press and hold use while it is selected in the hotbar. Eating one restores 3 (๐Ÿ—๐Ÿ—) hunger and 1.8 hunger saturation.

vocal basin
#

so just reduced

vocal basin
vocal basin
#

to make TS work, there needs to be at least a blanket ban of as and any

#

which breaks when you need to go and interact with JS

#

as is way too problematic, almost as much as any

thorn wharf
#

i guess the one benefit of any is it will still work without a type if youre in the midst of migration

vocal basin
#

there is unknown

thorn wharf
#

since its already a bandaid for js

#

unknown can cause problems in my experience but its surely safer

frozen owl
#

@vocal basin yk pyo3 interop?

vocal basin
#

yes

frozen owl
#

with maturin

#

nice

thorn wharf
#

main problem i had with unknown was trying to handle error objects

frozen owl
#

i need help with maturin

vocal basin
#

which part?

frozen owl
#

im just reading documentation, i was recommended to use it so i just got started

turbid minnow
#

Hi

#

Guys

vocal basin
#

pyo3's support for async is still experimental

frozen owl
vocal basin
#

two-way

frozen owl
#

hm im not looking for that for now

vocal basin
#

then it's going to be simpler
(async is still non-trivial)

short owl
#

Im pressuming there is no proper ASYNC for multicore in micro python , I could be WRONG

frozen owl
#

im just trying to use export structs, use case is as follows:
i have a (rust) server that sends requests to the python code, which are like rust enums. i dont want to parse the requests as raw strings (since i send the messages with serde serialisation) so it ends up like json in python. as i said i dont want to use string literals so i want to export rust enums to use in py

vocal basin
frozen owl
#

this is the main struct that i want to send

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub enum MessageType {
    Initialise(Entity),
    JobSendPath(String),
    StatisticsSend(Statistics),
    RequestingNet,
    NewNetworkPath(String),
    IdentityConfirmation((Entity, usize)),
    JobSendData(Vec<DataFileType>),
    NewNetworkData(Vec<u8>),
    TBLink((String, String)),
    CreateTB,
    RequestingTBLink,
    EvaluationRequest(ExternalPacket), // use Vec<f32> to handle raw input data
}

#

including the associated structs eg ExternalPacket, Statistics, Entity etc

#

i want the python code to match which message type without using string literals

#

what i do in python rn

 while True:
        log.start_batch()
        received_data = server.receive()
        raw_data = json.loads(received_data)
        received_data = str(raw_data)

        if "RequestingNet" in received_data:
            send_net_in_bytes(model, server)

        if "JobSendPath" in received_data:
            data = extract_incoming_data_given_path(loopbuf, log, raw_data)
            if loopbuf.position_count >= BUFFER_SIZE:
                starting_gen += 1
                full_train_and_send(
                    model, starting_gen, server, loopbuf, train_settings, op, log, data
                )

        if "JobSendData" in received_data:
            data = extract_incoming_data_given_bytes(loopbuf, log, raw_data)
            if loopbuf.position_count >= BUFFER_SIZE:
                starting_gen += 1
                full_train_and_send(
                    model, starting_gen, server, loopbuf, train_settings, op, log, data
                )

        if "StopServer" in received_data:
            server.close()
            print("Connection closed.")
            break
#

like i dont want raw strings

vocal basin
#

I, surprisingly, don't have Python installed on the machine that I tried to test it

frozen owl
#

@vocal basin would you mind giving me some pointers to as to what to do for this?

#

my rust code rn

use serde::{Deserialize, Serialize};

use crate::executor::Packet;

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct MessageServer {
    pub purpose: MessageType,
}

impl MessageServer {
    pub fn new(purpose: MessageType) -> Self {
        MessageServer { purpose }
    }
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub enum MessageType {
    Initialise(Entity),
    JobSendPath(String),
    StatisticsSend(Statistics),
    RequestingNet,
    NewNetworkPath(String),
    IdentityConfirmation((Entity, usize)),
    JobSendData(Vec<DataFileType>),
    NewNetworkData(Vec<u8>),
    TBLink((String, String)),
    CreateTB,
    RequestingTBLink,
    EvaluationRequest(ExternalPacket), // use Vec<f32> to handle raw input data
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub struct ExternalPacket {
    pub data: Vec<f32>,
    pub datagen_id: usize,
    pub mcts_id: usize,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub enum DataFileType {
    OffFile(Vec<u8>),
    MetaDataFile(Vec<u8>),
    BinFile(Vec<u8>),
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub enum Entity {
    RustDataGen,
    PythonTraining,
    TBHost,
    GUIMonitor,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
pub enum Statistics {
    NodesPerSecond(usize),
    EvalsPerSecond(usize),
}

vocal basin
#
match MessageType:
    case MessageType.Initialise(): ...
#

allegedly

frozen owl
#

im trying to get the export code sorted rn

vocal basin
#

#[pyclass]

frozen owl
#

for all of them?

vocal basin
#

for MessageType

#

creating a test project rn

#

now for the classic trick of deleting these

frozen owl
#

regex? ๐Ÿ’€

vocal basin
#

@frozen owl iirc pyo3 only supports struct variants

#

though

#

hmm

#

seems like not

#

I might be confusing with other library

#

pyo3 alleghedly does support tuple variants

#

it doesn't support unit

#

that's what I was thinking of

#

pyo3 wants all variants to be either unit or non-unit
(doesn't allow mixing)

#

pyo3 supports two types of enums:
simple (all variants are unit)
complex (all variants are either struct or tuple)

#

doesn't work:

enum Option {
    Some(T),
    None,
}
#

works:

enum Option {
    Some(T),
    None(),
}
#

first time running maturin init despite having started three maturin-based projects before

#

you can set it up manually

#

it's not that long

frozen owl
#

hm it didnt work like adding all the brackets

frozen owl
#

i havent even configured the code correctly

#

have to figure out what the lifetime stuff

vocal basin
#

the issue is that you can't take the thing by value

#

you need Bound<'_, Thing>

#

I think

#

or

#

@frozen owl take by reference then clone

#

@frozen owl new(purpose: &MessageType)

#

@frozen owl on line 11 remove ()

#

@frozen owl you first need to fix the pyclass for the MessageType

upper basin
#

Cya later guys. Wish you a blessed day ahead.

frozen owl
vocal basin
#

for everything unit you can just use unit variants

frozen owl
#

so why does it not work when i add bracks everywhere

vocal basin
#

also it really seems like the error is in something else

#

idk where

#

@frozen owl did you put pyclass on inner stuff?

#

e.g. Entity

#

it likely is arguing because can't make a constructor

#

#[pyclass] for enums generates constructors

#

@frozen owl try #[pyclass]ing the Entity
does it show the same error?

#

does #[pyclass] on MessageType still complain?

frozen owl
#

Python::acquire_gil()

vocal basin
#

you need Python::with_gil

#

likely

frozen owl
#

ye

#

does your test project work alr?

vocal basin
#
use pyo3::prelude::*;

#[pyclass(eq, eq_int)]
#[derive(Clone, PartialEq, Eq)]
enum Inner {
    A,
    B,
    C,
}

#[pyclass]
#[derive(Clone)]
enum Example {
    Unit(),
    Tuple(Inner),
    Struct { x: i64 },
}

/// A Python module implemented in Rust.
#[pymodule]
fn pystuff(m: &Bound<'_, PyModule>) -> PyResult<()> {
    m.add_class::<Inner>()?;
    m.add_class::<Example>()?;
    Ok(())
}
vocal basin
#
import pystuff

match pystuff.Example.Tuple(pystuff.Inner.A):
    case pystuff.Example.Tuple(pystuff.Inner.A):
        print("ok")
#

^ works

vocal basin
#

custom

frozen owl
#

h

outer beacon
#

what do i have to do to share screen on this server

vocal basin
#

that's just a name for one of the variants

outer beacon
#

how do i get them

vocal basin
#

after moderators are okay enough with you streaming stuff without supervision, video role is given for a longer period

outer beacon
#

allright

#

get it

vocal basin
#

@frozen owl only single python interpreter thread can run at a time

#

that's what GIL does

#

@frozen owl I suggest getting #[pyclass] to work first rather than trying to implement manually

#

add variants one by one

upbeat bobcat
#

sorry everyone

vocal basin
#

to fix one issue at a time

#

@frozen owl eq, eq_int only for enums with unit variants

frozen owl
#

hmm is this progress then...

vocal basin
#

there was a syntax error for some time because of impl

frozen owl
#

like the error in front of the Initialise stuff is gone

#

hm?

vocal basin
#

@frozen owl remove the impl

#

remove eq, eq_int from MessageType

frozen owl
vocal basin
#

only have #[pyclass]

vocal basin
#

@frozen owl

enum Enum {
    Unit,
    Tuple(),
    Struct{},
}
#

no parentheses/braces

#

"no fields" is a wrong definition

#

@frozen owl no

#

have eq, eq_int on Entity

#

have parentheses for MessageType variants

#

do you have Eq derived?

#

PartialEq, Eq

#

@frozen owl what pyo3 version are you using?

frozen owl
#

0.21.2

#

but now bumped to 0.22.2

vocal basin
#

check if it compiles now

#

@frozen owl all that appear publicly, yes

#

@frozen owl for DataFileType

frozen owl
#

how about Vec

#

that sounds tricky

vocal basin
#

blanket-impl

vocal basin
#

what is .extract

#

maybe just obj: &str

frozen owl
#

wait do i even need to serialise as json in order to use in py

vocal basin
#

if you define Python bindings for Rust types, then likely no, you don't need

#

you just need to define constructors

#

for enums, constructors are predefined

#

#[new]

frozen owl
#

so yes for messageserver?

#

well i have alr impled it alr

#

but im not sure if it looks right

vocal basin
#

seems like with new API it can just work as is

#

as in it auto-clones

#

now you also need to add all those to the module

frozen owl
vocal basin
#

inside #[pymodule]

frozen owl
#

#[pymodule]
#[pyo3(name = "tz_rust")]
fn tz_rust(m: &Bound<'_, PyModule>) -> PyResult<()> {
    m.add_class::<MessageServer>()?;
    Ok(())
}

vocal basin
#

to construct messages, you need to add all

frozen owl
#

but it says add class

#

like structs are classes right

#

not enums

#

then how about vec

#

that's technically a class right

#

so no need gil????

#

hmm sus

#

alright is it time to export

vocal basin
#

you need GIL when you need to run Python

frozen owl
#

hm?

#

in the python side or rust side? sounds like rust side

vocal basin
#

Python::with_gil is to call Python from Rust

frozen owl
#

yeah

#

but like

vocal basin
#

most things will work without it

frozen owl
#

and so will this right

vocal basin
#

GIL is implicitly held for most of the things anyway

frozen owl
#

like the errors are like caused by the ()

#

the unit variant stuff

#

in the bins

#

but other than that it's ok

vocal basin
#

@frozen owl
maturin develop

#

ctrl+shift+p
python: create environemnt

#

@frozen owl not recommended to do with .

#

this is what venv contains

#

(if you want to remove whatever you just created)

#

with Scripts instead of bin

frozen owl
#

wait so what do i do rn

vocal basin
#

that's why it's segregated into .venv

vocal basin
#

there is a way to have venv depend on outside world

#

but it's suboptimal

frozen owl
#

?

vocal basin
#

as in system packages

frozen owl
#

im on headless ssh

#

does it matter

vocal basin
#

also you could've just not selected to install requirements

#

(also an option)

#

open new terminal

vocal basin
frozen owl
#

like i alr have torch but not in venv?

#

shit

vocal basin
#

@frozen owl open pyvenv.cfg

#

.venv/pyvenv.cfg

#

line 2

frozen owl
#

true

#

lmao

#

wtf is the mess on my screen lol

vocal basin
#

open python interpreter, try importing your module

frozen owl
#
>>> import tz_rust
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\andre\RemoteFolder\ZanLing-TrueZero\.venv\Lib\site-packages\tz_rust\__init__.py", line 1, in <module>
    from .tz_rust import *
ImportError: DLL load failed while importing tz_rust: The specified module could not be found.
vocal basin
#

what's in pyproject.toml?

frozen owl
#

where?

vocal basin
#
[build-system]
requires = ["maturin>=1.7,<2.0"]
build-backend = "maturin"

[project]
name = "tz_rust"
requires-python = ">=3.8"
dynamic = ["version"]

[tool.maturin]
features = ["pyo3/extension-module"]
vocal basin
#

there

#

pyproject.toml

#

create it then

vocal basin
stark river
#

i forgot to clean my air fryer ๐Ÿ˜ฆ

vocal basin
#

@frozen owl maturin develop again

stark river
#

i need to make a to do app to remind me of tasks

vocal basin
#

how does #[pymodules]-annotated function look again?

stark river
#

i'm thinking of making my to do app in C++ lemon_thinking

#

for the practice

vocal basin
#

@frozen owl why is #[pymodule] underlined with blue?

#

hover over it

#

@frozen owl missing constructor is unrelated to this

#

it's currently not the main issue

#

also

#

what's the crate-type?

#

in Cargo.toml

#

@frozen owl you don't need new

#

if it compiles

#

for now

#
[lib]
crate-type = ["cdylib"]
#

okay so it's fine

#

idk what else could be causing missing module

#

ok

frozen owl
#

i will brb after dinner, asap will you be back @vocal basin

spare galleon
#

@polar mortar you say youtube twice in your bio

upbeat bobcat
vocal basin
#

ohno
I have so many VSC windows it now stacks vertically

upbeat bobcat
#

No need to make it.

polar mortar
polar mortar
vocal basin
#

right now VSC is using only around 5GB physical and 9GB commit

#

I have 64GB physical total

polar mortar
vocal basin
#

on server-side, idk how much

#

it's split across many containers

#

across two servers

polar mortar
polar mortar
vocal basin
#

on one of two servers I currently have 105GB cache

#

105/125 GB of RAM is used for filesystem caching

polar mortar
vocal basin
#

for most read operations I literally don't need to access the disk

#

it's so fast

#

also creates this funny statistic:

polar mortar
vocal basin
#

provider?

polar mortar
#

I don't know how to say it haha

vocal basin
#

(idk in what sense)

polar mortar
#

I mean the server

vocal basin
#

it's not rented

#

running it on-premise

polar mortar
#

Oh, that's wonderful

vocal basin
#

Intel 7920X, Samsung SSD, Crucial RAM

#

I could go for Samsung for RAM too, but that'd be more costly

#

both CPU and RAM were used prior to purchase, that's why a very considerable reduction in price

#

isn't cockroachdb written in Erlang or whatever?

#

wait no it's Go

#

what am I confusing it with then

#

@terse rose I guess you already know that GitLab has Mattermost integration

#

for similar purposes

#

Python+FastAPI
well, in that regard you're already ahead of GitLab with its Rails

polar mortar
vocal basin
#

SSD cost more than CPU+RAM

#

but also that's because used SSDs aren't really worth it

vocal basin
polar mortar
short owl
#

SSD , 5 years or less , plan for a failure

frozen owl
#

@vocal basin BACKKKKKKK

#

:D

#

dinner was 20 mins, hm

#

could be better

#

[lib]
name = "tz_rust"
crate-type = ["cdylib", "rlib"]

[dependencies.pyo3]
version = "0.22.2"
features = ["extension-module", "auto-initialize"]

[tool.maturin]
python-source = "python"

vocal basin
vocal basin
#

in Cargo.toml

#

it might be trying to look for python directory

#

look at what it tries to install

frozen owl
#

yeah it's gone

vocal basin
#

in site-packages

#

or wherever

vocal basin
#

.venv/lib/.../site-packages/tz_rust

terse rose
#

im sorry i didnt see this

vocal basin
vocal basin
terse rose
#

Rails is garbage and so is having fifty million things to setup, our goal is to have one centralized platform for: CI/CD, writing code collaboratively, communicating via text and video (including screenshare )

polar mortar
vocal basin
#

@frozen owl can you show the error again?

terse rose
#

while also being decentralized in the way you can self host it and FOSS

frozen owl
#
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tz_rust
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\andre\RemoteFolder\ZanLing-TrueZero\.venv\Lib\site-packages\tz_rust\__init__.py", line 1, in <module>
    from .tz_rust import *
ImportError: DLL load failed while importing tz_rust: The specified module could not be found.
spare galleon
vocal basin
#

you have venv activated, right?

terse rose
#

seems like direct compeition

polar mortar
vocal basin
#

I'm trying to find what could cause the error

vocal basin
#

maybe it matches based on crate name

#

or there

worn holly
#

!usert

#

!user

wise cargoBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

vocal basin
#

yeah, in lib it must be with _

#

wheel is just an archive

#

installable

frozen owl
#

C:\Users\andre\RemoteFolder\ZanLing-TrueZero\.venv\Lib\site-packages\tz_rust\__init__.py

from .tz_rust import *

__doc__ = tz_rust.__doc__
if hasattr(tz_rust, "__all__"):
    __all__ = tz_rust.__all__
#

and tz_rust seems to be pointing at nothing

#

like i cant ctrl click .tz_rust

vocal basin
#

add abi3-py311 to pyo3 features

frozen owl
frozen owl
#

like how did you get there

vocal basin
#

what does it show on Found CPython line?

frozen owl
#

? where

vocal basin
#

in maturin develop logs

frozen owl
#

Found CPython interpreter at C:\Users\andre\RemoteFolder\ZanLing-TrueZero.venv\Scripts\python.exe

vocal basin
#

pip install --upgrade maturin

#

the amount of logs is clearly not right

#

RUST_LOG=info

#

(env)

frozen owl
vocal basin
#

what's current value of RUST_LOG?

frozen owl
#

in cargo.toml?

willow gate
#

hey

vocal basin
#

in environment variables

#

echo $env:RUST_LOG

frozen owl
#

TRACE

vocal basin
#

set it to INFO

#

apparently not

#

did it even change the value?

frozen owl
#

setx RUST_LOG INFO

SUCCESS: Specified value was saved.
?

vocal basin
#

check if it changed

frozen owl
#

like the env var?

frozen owl
frozen owl
vocal basin
#

$env:RUST_LOG = 'INFO'

frozen owl
#

and the python still doesnt work

#

still no lol

#

although the amount of debug is now super little

#

warning are my fault, unused shit

#

or shit that doesnt need to be mutable ๐Ÿคฆโ€โ™‚๏ธ

#

anyways

#

still no work

#
2024-08-08T19:01:45.202831Z  INFO build_wheels:warn_missing_py_init: maturin::compile: close time.busy=3.64ms time.idle=1.60ยตs
2024-08-08T19:01:45.362225Z  INFO build_wheels:write_bindings_module: maturin::module_writer: close time.busy=156ms time.idle=1.00ยตs
๐Ÿ“ฆ Built wheel for abi3 Python โ‰ฅ 3.11 to C:\Users\andre\AppData\Local\Temp\.tmpZLEIlN\tz_rust-0.1.0-cp311-abi3-win_amd64.whl
2024-08-08T19:01:45.363378Z  INFO build_wheels: maturin::build_context: close time.busy=385ms time.idle=700ns
โœ๏ธ  Setting installed package as editable
2024-08-08T19:01:46.504283Z  INFO pip_install_wheel:fix_direct_url: maturin::develop: close time.busy=571ms time.idle=2.00ยตs wheel_filename=C:\Users\andre\AppData\Local\Temp\.tmpZLEIlN\tz_rust-0.1.0-cp311-abi3-win_amd64.whl
2024-08-08T19:01:46.504471Z  INFO pip_install_wheel: maturin::develop: close time.busy=1.14s time.idle=1.20ยตs wheel_filename=C:\Users\andre\AppData\Local\Temp\.tmpZLEIlN\tz_rust-0.1.0-cp311-abi3-win_amd64.whl
vocal basin
#

since this is windows, check if windows defender is messing with that

frozen owl
#

shit

#

how do i do that? im headless

vocal basin
#

given that this doesn't work, I suggest first trying on a smaller project

#

like the default

#

that maturin init gives

#

empty venv

frozen owl
#

like create a new one?

vocal basin
#

yes

#

from scratch

#

(mostly)

#

@frozen owl separate project

frozen owl
#

sepeate dir?

vocal basin
#

separate everything

#

start with empty directory
create venv
install maturin in venv
maturin init
maturin develop
python
import

frozen owl
#

??? it worked????

vocal basin
#

import worked?

frozen owl
#
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import RemoteFolder
>>> RemoteFolder.__doc__
'A Python module implemented in Rust.'
>>>
vocal basin
#

it might be possible that for the previous one, the venv itself is troublesome

#

maturin init just sets up Cargo.toml/pyproject.toml/lib.rs

frozen owl
#

do i need to delete the env

vocal basin
#

try going to wherever .pyd file is (via cd), and try importing from there

frozen owl
#

nop

vocal basin
#

so pyd is broken somehow

frozen owl
#

yeah

#

is it because of the problematic c stuff

#

so does it mean i need to reorg the folder

#

๐Ÿ’€

vocal basin
#

it might be because of #[pyo3(name = ... )] but unlikely

frozen owl
#

hm

vocal basin
frozen owl
#

like my current project dir is

ZanLing-TrueZero
-> src (rust code)
-> python code here directly 
#

no name related warnings

vocal basin
#

@frozen owl do you have msvc redist stuff installed?

#

it might be depending on it in some weird way

frozen owl
#

whats that

#

this sounds familiar

#

msvc toolchain?

vocal basin
#

runtime for windows c++

frozen owl
#

iirc i saw it when installing rust?

vocal basin
#

dumpbin /dependents <name of pyd file goes here>

#

dumpbin should be somewhere in VS build tools

#

@frozen owl VS build tools

frozen owl
#

uh im headless

vocal basin
#

if you have it

#

hmm

frozen owl
#

where do i check,,,,,,,,,,,,,,,,,,,,

vocal basin
#

trying to find if there's a way to do it without build tools

#

or you can just send the .pyd

frozen owl
frozen owl
#

im not sure what fileformats do they allow

vocal basin
#

pyd is binary executable, so won't allow, yes

#

checking

#

wait what

#

it's lying

#

it went through

#

two messages sent, two messages received, right?

#

or did you send more?

frozen owl
vocal basin
#

Discord being broken as usual

frozen owl
#

lol

vocal basin
#
File Type: DLL

  Image has the following dependencies:

    bcryptprimitives.dll
    api-ms-win-core-synch-l1-2-0.dll
    python3.dll
    kernel32.dll
    ntdll.dll
    torch_cuda.dll
    torch_cpu.dll
    c10.dll
    MSVCP140.dll
    VCRUNTIME140.dll
    VCRUNTIME140_1.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-utility-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-environment-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
frozen owl
#

nice

vocal basin
#

those aren't dynamic

#

MSVCP140.dll

#

check that you have that

frozen owl
#

C:\Windows\System32\msvcp140.dll
C:\Program Files\LLVM\bin\msvcp140.dll

vocal basin
#

do you have C:\Program Files\LLVM\bin\ in $env:PATH?

#

(though that shouldn't matter)

vocal basin
#

can you send for test project too?