#voice-chat-text-0
1 messages ยท Page 339 of 1
just don't drive that steel box anywhere when it rains
My discord password is one_mississippi
iirc they merged with some dutch company
๐ณ
hem owns the seashore
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.
royal dutch petroleum plc
ye
i had to study shell plc for human geography
a literal shell corporation
cougar=older woman
jaguar=car
n no
just waiting for the rain to arrive
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
Ross Perot ?
I am the best developer in the call
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
just got rickrolled by the local supermarket
Hello uncle @willow light
i have also obtained many eggs
Price?
I would like to ask sth.
6,30 euros
I could never get that many eggs, even in the fridge they'll all go bad before I have a chance to use them all
In India it's cost like 2dollor
also that many eggs in america is around $25
they last a month
out of the fridge
two months in the fridge
I eat on average one egg a day
Overpriced
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
that's absurd
12 Banana cost in your country
but we do get avocados for $0.18 each
thank you cartel
Why every product overpriced
$0.09 in my country
bananas are 2,30 per kilo
per nut?
euros
yes
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
Oh that's the reason
Banana sells in kilo ๐ค
counting down until the MBAs come up with a subscription for breathing
yes
otherwise I wouldn't have given the price per kilo
These things also exist ๐
brb getting lunch: tostones and a jibarito
shlawg
Plome, mr international.
@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
you are a perpetual liar
even if we guess you'll say wrong
cute
@quartz beacon habitual****
Tell me what lie please
ooooo
yikes
jikky ya gonna get muted
wrong
@eager tapir
I guess Im big dick lies
@gentle flint Moved out at 17 lad
I work for @dark swan
current salary is 150k
Cloud security analyst
Cloud is where the money is
Working on my summer reading at the grocery store, brb
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
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
It's just there as a honeypot, if you really wanted to get specific just manpage it
@peak depot Lmk when you're ready to work for me
-_-
@quartz beacon Shit forgot Im poor .. darn
Stahp
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?
Travelling through the frigid lands.... watching the rolling herds of ales cross the plains.... waiting for the time to strike
check dm
@silent sequoia Yo
hi
!eval
print('^\n([A-Z-0-9]{3,}) [\n\D]*')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | ^
002 | ([A-Z-0-9]{3,}) [
003 | \D]*
she is chonky
Yall making me want a pet, and I am being reminded of why I don't have a pet. Stahp conflicting me.
sleep well
Danke!!
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
can i have the link for this channel for others to join
it won't work for them if they aren't in the server though
how do they join the server
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)
and for snake
Hi, How are you doing?
all good
Great!
i dont have access the voice chat yet guys but pleasure to meet you all
@feral aurora
@weary sail
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
You need to send certain amount of message to get the perm
im aware of this i saw in verification for voice you need to meet certain requirements
!stream
Anyone knows how YouTube serve there video links?
have you guys seen terminator zero i guess it got leaked 3 weeks before netflix release
yk
you're in the wrong server for that
50 mesages lol
๐
yup
can i spam it somewhere
no dont spam it against policy
oh well have a good night
good night mah friend
Hi @wind raptor and @upbeat bobcat how's your day going so far
Hey! Good here. How is your day going?
Hi, Great. What about you?
I'm doing good but my hand is dying
Good
I had blister that didn't pop but just got ripped of so now i have a realy deep wound
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
https://gist.github.com/saleph/163d73e0933044d0e2c4 Will this work for PySide6? @wind raptor
Okay, Thanks.
It is giving error
you have to import QDesktopWidget
I imported the whole QtWidgets
look
Fashmoop told me to do like this
ok, but maybe try this way. I could be wrong, humour me
not orange so it's not working
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()
import this
Okay thanks.
I have a problem
WSL is pretty small and I don't think you can move. Do you mean the Linux distro that goes on WSL?
When I run main window it also opens settings
I don't think you can move WSL off system drive. You can move the distro
WSL is a part of windows
https://www.linkedin.com/pulse/how-install-wsl-non-system-disks-step-by-step-guide-ambu-vijayan/ this is as good as you can do
Settings code
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
maybe deepseek is not the best now that i think of it
!kindle
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.
class DynamicCounter(discord.ui.DynamicItem[discord.ui.Button])
...
How does this function?
I wanna understand the syntax
Not the content of 'the' classes
๐ญ
@wind raptor kindly explain your actions for censoring my message and over-moderating the chat
Don't post passwords here or fake passwords either. It was also completely random in the chat
i'm reporting this over-moderation to modmail.. only being allowed to talk about the weather is unnecessary censorship
Was a message deleted?
What message?
the moderator only wants us to talk about the weather
๐คฃ
DynamicCounter is a class that extends discord.ui.DynamicItem it allows the button to have synamic behavior and state like counting clicks each button can have a unique identifire that changes based on the interactions making it easier to track and manage the button states
Probably? More like certainly.
I wanna understand the syntax functionality rather than the class functionality (Although I know inheritance)
in that case i don't think you are fit to be moderator
@stark river What action of yours was evaluated as a forbidden behaviour?
Same
i think you should step down from moderator @wind raptor
It's a cult here. I've tried leaving

@sour imp Don't get me wrong, I know inheritance but not the square braces thing
It has to do with what the DynamicItem object implements for __getitem__, so look to what its type is.
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
Agreed
Rabbit for Moderator, Vote for someone who's opinion on banning is "Why not?"
You're OP as is.
What are you looking to share?
Sometimes I have to share my screen for my issues
Not right now but I wasn't able to do it whenever I needed
Errr
don't ask for screen share from someone who abuses his responsibility
We only grant streaming perms temporarily as they are needed to avoid any streaming problems
I can support you if you tell me what exactly happened and I find you right
But I don't even get what happened
After some point, it sounds unefficient
You can at least trust someone
#RabbitDidNothingWrong
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
It's a server policy because we had people streaming porn at one point.
#MindfulDevDidEverythingWrong
!e
print(len("\n"))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
1
Yea I get that, but it's supposed to be a spectrum of benefit rather than one way focus on avoiding issues
I assume a mistake won't blow the server up
But several people will be more comfortable
!e
index = 0
string = "hello world\n"
while index < len(string):
print(string[index])
index+=1
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | h
002 | e
003 | l
004 | l
005 | o
006 |
007 | w
008 | o
009 | r
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/EFIQNR5LWVXVV3NZOPB4PAIR3E
Discord can be..."Nope. Bye. Say goodbye to your server."
whats going on?
I don't care about Discord's mafia behaviours
They won't focus on ethics at that point
whats everyone talking about?
!e
index = 0
string = "hello world\n"
while index < len(string):
raw = r'{}'.format(string[index])
print(raw)
index+=1
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | h
002 | e
003 | l
004 | l
005 | o
006 |
007 | w
008 | o
009 | r
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/SJLT3RFZHGAWHHXOXAWSY3VOCM
Rules and Discord's incomprehension
!e python string = "hello world\n" for a in string: print(a)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | h
002 | e
003 | l
004 | l
005 | o
006 |
007 | w
008 | o
009 | r
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/XAB5W2OB3WWSGS324IU76STTV4
!e
index = 0
string = "hello world\n"
raw = r'{}'.format(string)
while index < len(string):
print(string[index],raw[index])
index+=1
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | h h
002 | e e
003 | l l
004 | l l
005 | o o
006 |
007 | w w
008 | o o
009 | r r
010 | l l
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/JCOZGM3FAEMXCINUVKGSG54VKQ
!e py print(*'abc', sep='\n')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
003 | c
yes i know but im getting unexpected behaviour in my program and im just confused
rewrite it?
!e py print(*(c * 3 for c in 'abc'), sep='\n')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | aaa
002 | bbb
003 | ccc
spelis appears to be doing something the wrong way, the fix would be right way people are posting
i do everything the wrong way ๐
@molten pewter
Hey @midnight agate
How are you doing?
I'm great, thanks! What are you learning these days?
zubba zubba
@somber heath what happens when a game studio shuts down, who owns the ip of their games
howdy Maro @midnight agate
Whoever buys it/acquires it in bankruptcy
another day in the Wild West or such locale
That's fun. Are you still using a lot of Rust?
You can get high on Uranium?
Wait
lemme try to role one
but first I need to find wepons grade uranium
.8ball can you get high on Uranium?
Yes definitely
There you go.
.8ball Was the last thing you sent correct?
Most likely
Most likely
I gotta go. Have a great one! ๐
why is this making my life difficult
how so?
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?
a good quality mic is important , tin cans and a coil is sufferable
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
your mic sounds clear and studio ish in quality
Can someone help
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
What do you mean in the git folder? As in a folder that's tracked by git?
I think you'd still have to track and commit it
Huh, mine's negative
Wdym by this?
?
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)
I did that but still not working
LFS?
That one
I forgot S stands for storage not system
For context as to the issue
when I see FS I think FileSystem
Same
it's even okay to store images without LFS, at times
What I have to do?
to many contexts, LFS just means reduced fetch size
which also means checking out a commit can fail
Sorry, I meant giving AF the context to the question. Forgot to turn off the ping when I replied
(if the file was deleted from LFS)
you don't have them gitignored, right?
also
istg the family dog is so fucking hyper once i get home
don't paste into .git
generally don't do anything with .git manually even if you know in details what it is
Yes
the family dog freaks out when it sees a truck/another dog
VSC?
many machines , simple / complex emit ultrasonic squeeks , that what dogs / cats hear , react too
VSC by default shows git status of each file
iirc human bile is greenish because it contains breakdown products of haemoglobin?
i think of flamingo shutdown
many other IDEs do too
have you seen kidney stones @peak depot
plain white normally means one of the three:
unrecognised repository
unchanged file
broken VSC (needs reload)
jeepers I shut down ALL my system sounds , someone loves them
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...
VSC thing ig
why do you have onions on sushi?
red onions ... is ok
What is VSC and how can i reload it?
green onions ok ...
onions have layers.......................... ogres have layers....................
Visual Studio Code
Just joined, yo
Anyone here
Yes it is VSC but I didn't know it has short form
in what was is it "not workning", again? or has it been fixed already?
(I missed some earlier context)
The images that I have are not showing in the app when I put my code in git recognized folder
As you can see here
how are you loading them?
what path are you using?
Can you show the code where you're loading them in?
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.
scan the nave?
!e
from pathlib import Path
print(Path(__file__).parent / "file.png")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
/home/file.png
@rugged tundra that's because Russian fleet has ended
"unseamed him from from the nave to the chops"
I wouldn't do that either. Relative path is fine in this case
depends on the case
https://paste.pythondiscord.com/NWZQ here you go
this is more useful for loading binary assets in packages
generate a random number and place the file in whatever number folder it is from the top
@vocal basin
Yeah, interesting situation
this icon can do it
ive been here https://www.mercedes-benz.com/en/art-and-culture/museum/
might be running from a wrong working directory
I am in the right directory ig
The note-app is in quantum_notes
if the app is starting from quantum_notes, then file is at note-app/calendar_icon.png
not calendar_icon.png
Roast Duck for Christmas ??? @peak depot
im trying to mock a pydantic validator function in a test, anyone have insight?
I practice making , Peking Duck
so I should run now?
glazed honey ham
python main.py from there should work
as for the run button, not sure how to configure that
there's launch.json stuff, might be related
Santa Probableclause
does your Momma and Poppa have a smoker for the hams @peak depot
We dont smoke it
when I run it
someone pleaz
venv not activated?
serde
Oh the icon are showing now
TYSM @vocal basin and @rugged root
AF deserves the praise
@vocal basin Thanks again
also working from the run button
"ai" "investments"
also known as just hiring a lot of people to do it manually
^ devin
mechanical turk
@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
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"
Yea, just giving my viewpoint and why I'm staying out of this despite this normally would be Rabbit food
Breath
Addictive Sales Techniques
afair Devin AI was actual AI
it was just very slow and often incorrect
sashimi ?
beef , pork ....
not seafood meat
got it
this type of raw meat yes
๐ฅฉ
any donut emojis ?
๐ฅฏ
nom nom
it's technically bagel emoji
donยดt eat pork raw 
salami:
salami is airdryed
if i eat pork raw piggies squeeelll
heat is not the only thing that kills bakteria
hm
uncooked != raw
comprendo

raw is not processed in any way
deli meat and sea food do not count as apart of this convo
roast peking ducky
talking about eating raw ground beef and shit
minecraft:
yum
I somehow don't remember what eating raw food does in Minecraft
(whether it's poisoning, hunger or just reduced hunger reduction)
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.
so just reduced
saturation is reduced 7 times
it's because of the way our backend works
// unlock exclusive deleted scenes: https://www.patreon.com/KRAZAM
// merch: https://merch.krazam.tv
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
i guess the one benefit of any is it will still work without a type if youre in the midst of migration
there is unknown
since its already a bandaid for js
unknown can cause problems in my experience but its surely safer
@vocal basin yk pyo3 interop?
yes
main problem i had with unknown was trying to handle error objects
i need help with maturin
which part?
im just reading documentation, i was recommended to use it so i just got started
pyo3's support for async is still experimental
so like exporting async rust functions to python?
two-way
hm im not looking for that for now
then it's going to be simpler
(async is still non-trivial)
Im pressuming there is no proper ASYNC for multicore in micro python , I could be WRONG
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
async and multicore don't mix well in normal Python either
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
I, surprisingly, don't have Python installed on the machine that I tried to test it
@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),
}
in python? well i need to have the message type exported from rust to python in the first place
im trying to get the export code sorted rn
#[pyclass]
for all of them?
for MessageType
creating a test project rn
now for the classic trick of deleting these
regex? ๐
@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
hm it didnt work like adding all the brackets
youre too far ahead lol
i havent even configured the code correctly
have to figure out what the lifetime stuff
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
Cya later guys. Wish you a blessed day ahead.
like i want this
for everything unit you can just use unit variants
so why does it not work when i add bracks everywhere
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?
Python::acquire_gil()
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(())
}
the whole lib.rs
import pystuff
match pystuff.Example.Tuple(pystuff.Inner.A):
case pystuff.Example.Tuple(pystuff.Inner.A):
print("ok")
^ works
like Tuple()
custom
see here
h
what do i have to do to share screen on this server
that's just a name for one of the variants
how do i get them
- have a moderator already be in the vc (do not ping mods which aren't in VC to get that)
- have something to stream
after moderators are okay enough with you streaming stuff without supervision, video role is given for a longer period
@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
sorry everyone
hmm is this progress then...
there was a syntax error for some time because of impl
well there are variants
only have #[pyclass]
unit variants
@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?
check if it compiles now
@frozen owl all that appear publicly, yes
@frozen owl for DataFileType
blanket-impl
just do for this one
what is .extract
maybe just obj: &str
wait do i even need to serialise as json in order to use in py
like use it like this
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]
so yes for messageserver?
well i have alr impled it alr
but im not sure if it looks right
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
inside #[pymodule]
#[pymodule]
#[pyo3(name = "tz_rust")]
fn tz_rust(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<MessageServer>()?;
Ok(())
}
to construct messages, you need to add all
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
you need GIL when you need to run Python
Python::with_gil is to call Python from Rust
most things will work without it
and so will this right
GIL is implicitly held for most of the things anyway
like the errors are like caused by the ()
the unit variant stuff
in the bins
but other than that it's ok
@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
wait so what do i do rn
that's why it's segregated into .venv
this
there is a way to have venv depend on outside world
but it's suboptimal
?
as in system packages
also you could've just not selected to install requirements
(also an option)
open new terminal
@frozen owl VSC should figure out the rest
open python interpreter, try importing your module
>>> 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.
what's in pyproject.toml?
where?
[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"]
@frozen owl
there
pyproject.toml
create it then
(missing space is how it generates; do not blame me for that)
i forgot to clean my air fryer ๐ฆ
@frozen owl maturin develop again
i need to make a to do app to remind me of tasks
alr
how does #[pymodules]-annotated function look again?
@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
i will brb after dinner, asap will you be back @vocal basin
@polar mortar you say youtube twice in your bio
Use my application It has todo app
nah use Cobol
ohno
I have so many VSC windows it now stacks vertically
No need to make it.
For real? will check it out ๐
Oh man, that's a lot, how much RAM do you have??
right now VSC is using only around 5GB physical and 9GB commit
I have 64GB physical total
on client-side
Thanks bro, you were right ๐
Oh well, doesn't soud that bad
Amazing
on one of two servers I currently have 105GB cache
105/125 GB of RAM is used for filesystem caching
I don't know that much about servers but I figure that's a lot ๐
for most read operations I literally don't need to access the disk
it's so fast
also creates this funny statistic:
What provider are you using?
provider?
I don't know how to say it haha
(idk in what sense)
I mean the server
Oh, that's wonderful
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
Yes I bet that'd reduced the price a lot
4TB m.2 Samsung (very not cheap)
why wouldn't you go for HDD then?, is it for the velocity?
SSD , 5 years or less , plan for a failure
@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"
speed and also I prefer having all data on the same drive, at least for now
can you remove the whole [tool.maturin] section for now?
in Cargo.toml
it might be trying to look for python directory
look at what it tries to install
yeah it's gone
for what purposes
.venv/lib/.../site-packages/tz_rust
im sorry i didnt see this
communication within GitHub-like environment
what does this have inside
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 )
Great, so you own this server, I'm curious where do you have it physically? (potentially a dumb question ๐ )
@frozen owl can you show the error again?
while also being decentralized in the way you can self host it and FOSS
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.
im always right
you have venv activated, right?
https://www.dimension.dev
is what im mored worried about
seems like direct compeition
I like this guy ๐
I'm trying to find what could cause the error
@frozen owl does it work with name = "tz-rust"?
maybe it matches based on crate name
or there
You are not allowed to use that command here. Please use the #bot-commands channel instead.
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
add abi3-py311 to pyo3 features
how did you do this then
like how did you get there
what does it show on Found CPython line?
? where
in maturin develop logs
Found CPython interpreter at C:\Users\andre\RemoteFolder\ZanLing-TrueZero.venv\Scripts\python.exe
pip install --upgrade maturin
the amount of logs is clearly not right
RUST_LOG=info
(env)
like is it too much ๐คก
what's current value of RUST_LOG?
in cargo.toml?
hey
TRACE
setx RUST_LOG INFO
SUCCESS: Specified value was saved.
?
check if it changed
like the env var?
i keep doing and seeing this but when i check the env var it doesnt work
like i still see TRACE
$env:RUST_LOG = 'INFO'
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
since this is windows, check if windows defender is messing with that
given that this doesn't work, I suggest first trying on a smaller project
like the default
that maturin init gives
empty venv
like create a new one?
sepeate dir?
separate everything
start with empty directory
create venv
install maturin in venv
maturin init
maturin develop
python
import
??? it worked????
import worked?
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.'
>>>
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
do i need to delete the env
try going to wherever .pyd file is (via cd), and try importing from there
nop
so pyd is broken somehow
yeah
is it because of the problematic c stuff
shit i found this https://www.maturin.rs/project_layout#mixed-rustpython-project
so does it mean i need to reorg the folder
๐
it might be because of #[pyo3(name = ... )] but unlikely
hm
(normally, if that's wrong, it gives a warning)
like my current project dir is
ZanLing-TrueZero
-> src (rust code)
-> python code here directly
no name related warnings
@frozen owl do you have msvc redist stuff installed?
it might be depending on it in some weird way
runtime for windows c++
iirc i saw it when installing rust?
dumpbin /dependents <name of pyd file goes here>
dumpbin should be somewhere in VS build tools
@frozen owl VS build tools
uh im headless
where do i check,,,,,,,,,,,,,,,,,,,,
trying to find if there's a way to do it without build tools
or you can just send the .pyd
it seems like maturin wants a specific kind of file structure
i think pydis doesnt allow
im not sure what fileformats do they allow
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?
ooof
Discord being broken as usual
lol
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
nice
C:\Windows\System32\msvcp140.dll
C:\Program Files\LLVM\bin\msvcp140.dll
first one should be enough
can you send for test project too?
