#python-discussion

1 messages ยท Page 543 of 1

silent fable
#

also fun fact: kde stands for kool desktop enviroment

raven urchin
bronze dragon
crisp jay
#

man imagine dwm

toxic smelt
#

I mean honestly I will straight up leave the editor and just use neovim

undone isle
#

i buillt a hand tracker that makes it so that if i put down a finger in irl it does it with a mechanical hand in build a boat for treasure in a roblox game for a project with media pipe

raven urchin
#

You were right. It was always Roblox.

toxic smelt
undone isle
#

i saw it on tiktok

silent fable
#

dont bother urself with costomization, use tty

raven urchin
undone isle
#

customization?

raven urchin
#

Even my Termux is customized muahaha

undone isle
#

what are yall talking abt?

crisp jay
raven urchin
undone isle
#

k

silent fable
#

oh hell yea we customizing tty now

#

i larp gentoo

toxic smelt
raven urchin
velvet trout
toxic smelt
#

Specifically.

#

Welp not possible there

rare gazelle
#

@raven urchin @toxic smelt @silent fable hi!

rare gazelle
#

how you all doing, i see that you building roblox mods or something

undone isle
#

while true:
termux-api-[phone number] "Message"

rare gazelle
#

(i'm not into roblox though)

raven urchin
velvet trout
#

No hi to me ๐Ÿ˜”/jk

rare gazelle
velvet trout
silent fable
#

all larps need to have a server

raven urchin
velvet trout
toxic smelt
rare gazelle
#

๐Ÿ˜

velvet trout
#

Seed & Syntax

For some reason, i read it as C & Syntax

ducky_concerned

silent fable
#

use openbox

undone isle
#

well i also made a python program that has a face scanner and hand scanner and some other things dm me if you want the code to try it

silent fable
#

ok so... does anyone here even use python

toxic smelt
#

C is peak, I mean just look we got python from it

undone isle
silent fable
#

even tho we in python server

raven urchin
velvet trout
toxic smelt
silent fable
undone isle
stoic wigeon
#

so uhh joined the discord to learn python (FULL BEGINNER LIKE PRINT HELLOWORLD TYPE OF BEGINNER) and joined to sorround me with people that knows what they doing. i dont really know what to do tho...

undone isle
velvet trout
rare gazelle
undone isle
#

alr

rare gazelle
#

or a link to it

crisp jay
rare gazelle
#

!code

edgy krakenBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

pastel sluice
#

!learn @stoic wigeon a good suggested set of things to begin with

edgy krakenBOT
#
Go-to beginner resources

Here are the top free resources we recommend for people who are new to programming:

For a full, curated list of educational resources we recommend, please see our resources page!

toxic smelt
#

I haven't tried CPython nor Cython... Had looked at it once like in the past, 2.5 years ago or smth

silent fable
#

do yall know bash

pastel sluice
stoic wigeon
rare gazelle
sand hornet
undone isle
#

the code is to big lol

raven urchin
velvet trout
raven urchin
toxic smelt
silent fable
#

I have a book from Eric Matthes on python. Such a legend.

undone isle
#

!paste

edgy krakenBOT
#
Pasting large amounts of code

So that everyone can easily read your code, you can paste it in this website:
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.

toxic smelt
sand hornet
#

interoperability is a thing, yes..

silent fable
#

does anyone here even use windows lol

toxic smelt
toxic smelt
raven urchin
rare gazelle
toxic smelt
#

Win11

gleaming knoll
sand hornet
toxic smelt
#

But it's just automatically open powershell and start neovim in it.

silent fable
#

I dont , on main pc i use mint. Eh i wanted to escape microslop

undone isle
#

here it is

prime mountain
#

Hi

raven urchin
raven urchin
undone isle
#

i feel like the convos here are more abt general pc knowledge and os than actual python

toxic smelt
raven urchin
undone isle
prime mountain
raven urchin
undone isle
prime mountain
silent fable
undone isle
#

like 8

toxic smelt
undone isle
prime mountain
raven urchin
undone isle
#

lol

toxic smelt
silent fable
#

lets see who larps the most, tell me os and wm

toxic smelt
raven urchin
toxic smelt
#

Clanker is shit

silent fable
raven urchin
undone isle
#

anyways im trynna get into a college when i grow up but i need a 4.3 gpa as a minimum ๐Ÿ™

gleaming knoll
raven urchin
raven urchin
#

I've met the dumbest people ever here. Funny.

undone isle
raven urchin
undone isle
#

yh

raven urchin
#

Cool

undone isle
#

you?

toxic smelt
# undone isle uhm what does that mean??

Five SOLID principles
Single Responsibility (SRP): A class should have only one reason to change, meaning it has only one job.
Open/Closed (OCP): Software entities should be open for extension but closed for modification. New functionality should be added by writing new code, not altering existing code.
Liskov Substitution (LSP): Subtypes must be substitutable for their base types without altering the program's correctness. Any code using a base class must work with an object of a derived class seamlessly.
Interface Segregation (ISP): Clients should not be forced to depend on interfaces they don't use. It's better to have many small, specific interfaces than one large general-purpose one.
Dependency Inversion (DIP): Depend upon abstractions, not concretions. High-level modules should not depend on low level modules; both should depend on abstractions.

raven urchin
undone isle
toxic smelt
#

It is gonna make your life easier

undone isle
#

dude im 13 i dont understand anything

toxic smelt
silent fable
#

heres some larping quotes : โ€œI donโ€™t use a computer. I command it.โ€
โ€œIf it has a GUI, itโ€™s already too slow.โ€
โ€œI donโ€™t break my systemโ€”I recompile it.โ€
โ€œMy OS doesnโ€™t crash. It politely informs me of my mistakes.โ€
โ€œReal users donโ€™t click. They type.โ€

undone isle
#

your making my brain explode @toxic smelt

gleaming knoll
grim hatch
grave tree
#

Let's keep this channel focused on Python pls

raven urchin
grim hatch
toxic smelt
silent fable
#

ok uh ig letss talk abt python

grim hatch
grave tree
toxic smelt
grim hatch
silent fable
#

ok bye i gtg

toxic smelt
#

Or did you assess the definition's correctness? Because I will value the latter here.

raven urchin
undone isle
grim hatch
undone isle
#

helloworld("print")

raven urchin
raven urchin
gleaming knoll
toxic smelt
undone isle
#

python when printing: print("Hello world")

C++ when printing: quhfiqkhfiuqfjoiuqbjfukhqfqoubihfohqbyfhjnqofubiqufhjiuqhfouqbijqufqifhqufhqiuhfoqihfuqhfouqiofbqiufnoqufiuqfiugqhfogqyuofgiqyufhqiyfgiu2grfqiufuiqhfouqhfouqfouqhfoquijfqnfuioqnfuqnfoqifhqonfioqfoiqnfouqnifoiqnf("Hello world!")

raven urchin
wise imp
prime mountain
raven urchin
toxic smelt
toxic smelt
#

I will check upon DIP and perhaps get it out

raven urchin
gleaming knoll
undone isle
#

isnt it include iostream or smth?

gleaming knoll
#

if you want to use streams rather than print sure

bronze dragon
toxic smelt
#

But this shit about SOLID is based on some source of Robert C. Martin and so far those 3 are mentioned.

undone isle
#

i dont rlly know any c lang

grim hatch
undone isle
#

i only know python css html and lua

grim hatch
gleaming knoll
#

i like DI-ing streams rather than hardcoding std::c(in|out)
so like
a function will take the output stream
and then i call it with stdout

wise imp
undone isle
raven urchin
grim hatch
toxic smelt
gleaming knoll
grim hatch
undone isle
toxic smelt
#

(don't ask me angular I forgot)

bronze dragon
raven urchin
toxic smelt
#

Anyways, I will compete these notes

grim hatch
toxic smelt
#

Right now it is freaking 2 AM

raven urchin
gleaming knoll
#

_BitInt(65535) on my C23 till Segmentation fault (core dumped)

undone isle
grim hatch
#
def hello_world(foo):
     print(foo)

hello_world("Hello World!")
grim hatch
autumn forge
gleaming knoll
toxic smelt
grim hatch
undone isle
spice hill
grim hatch
undone isle
gleaming knoll
toxic smelt
undone isle
#

what are f strings?

gleaming knoll
edgy krakenBOT
#
Format-strings

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

toxic smelt
#

It's supposed to be printf("") not print(f"")

gleaming knoll
undone isle
#

like i know what it is just what is it used for

toxic smelt
toxic smelt
raven urchin
spice hill
grim hatch
#

Prints : something is weird

undone isle
#

oh wait just to like combine strings and values

toxic smelt
grim hatch
grim hatch
#

There is also printf()

raven urchin
undone isle
#

im gonna learn asm soon

spice hill
edgy krakenBOT
grim hatch
#

Or the least liked way to do it

foo = "boo"
print("You are" + foo)
raven urchin
#

Duck object

toxic smelt
gleaming knoll
toxic smelt
#

But alright

raven urchin
gleaming knoll
#

well
not really because it doesnt use the type variable from the current scope but rather the one "baked into" the interpreter

toxic smelt
gleaming knoll
spice hill
edgy krakenBOT
# spice hill !e ```py class NerdLevel3: def __getattribute__(self, arg): if arg =...

:x: Your 3.14 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 7, in <module>
003 |     print(nerd.__class__)
004 |           ^^^^^^^^^^^^^^
005 |   File "/home/main.py", line 3, in __getattribute__
006 |     if arg == "__class__": raise TypeError("nuh uh")
007 |                            ^^^^^^^^^^^^^^^^^^^^^^^^^
008 | TypeError: nuh uh
gleaming knoll
#

hmmh
how to reliably access the type
without using a global

toxic smelt
spice hill
gleaming knoll
#

oh thats cute yeah

grim hatch
#

Just pass the type explicitly

gleaming knoll
#

(().__class__.__class__)(foo).__format__(foo, "")

#

absolute coding

toxic smelt
#

Just

class YoLo
    ...
grim hatch
gleaming knoll
#

functional programming of balls

grim hatch
gleaming knoll
toxic smelt
undone isle
#

does anybody know if you learn python in robotics science colleges

bronze dragon
undone isle
#

ok

wise imp
#

yk, I always wondered what's the purpose of !s format specifier, but it turns out that without it, it would call __format__ if it's defined, with !s it ensures __str__ is called

gleaming knoll
#

for some reason f"{x=}" seems to call repr rather than format?

spice hill
#

that's because it's intended for debugging I think

gleaming knoll
#

makes sense

spice hill
#

print debugging ๐Ÿ‘

undone isle
#

is it true that you can follow somebody on tiktok in kali with a command

steel whale
steel whale
dry yacht
undone isle
#

yh but i saw it on mr robot

dry yacht
steel whale
undone isle
#

lol

steel whale
#

@bright shoal they're yours now

raven urchin
#

Well, I think I don't have an exam on Saturday anymore

#

My teacher was kicked out of my university.

velvet trout
shrewd plinth
#

You're going to share the story, right?

#

What'd they do? Were they tenured?

brisk gazelle
#

Sharing the story may be legally inadvisable.

velvet trout
#

she probably said "Python is Slow"

shrewd plinth
#

I mean, I assumed they weren't directly involved in the teacher getting kicked out and have a nondisclosure clause in a settlement. But maybe that's a false assumption

raven urchin
lime sedge
raven urchin
lime sedge
runic flower
grizzled scroll
#

hi i need help changing a simple link in my python code but i cant find where to change it, is there anyone that can change it for me

grizzled scroll
#

it always fetches from a specific link, but i just need it to auto fetch from a different link,

#

nope

#

it was made by someone i ws once close with,

#

BUT we are not aqcuainted anymore

#

basically it scrapes my tourney mode page on a game from a website

runic flower
grizzled scroll
#

oki so basically, the guys who own the site game api changed their site recently, and instead of dev.uniteapi.dev its now uniteapi.dev

runic flower
grizzled scroll
#

so all my fetch tourney page doesnt work

#

cause only the start is wrong

runic flower
grizzled scroll
#

i dont know how to

#

its something i use a lot for my game but i have no euh good knowledge

runic flower
#

anyway, I'm out. let me know if you paste a link to the code or open a thread in #1035199133436354600

mint abyss
glacial ginkgo
#

whats up chat

mint abyss
#

js chillin

runic flower
mint abyss
#

what is ruff?

runic flower
steel whale
#

and a formatter

mint abyss
#

can i use it with thonny?

runic flower
mint abyss
#

ohhhh

#

thanks

#

how exactly do i use it tho?

glacial ginkgo
#

seems like a fun lil project.

steel whale
velvet trout
#

ruff check will check your code

#

Ruff can also fix sometimes and sometimes safely/unsafely (though it will ask you explictly about that don't worry)

runic flower
velvet trout
#

you can enable/disable some ruff rules as you would like to

mint abyss
#

well yh but like do i use it inside the code or in a diffrent code to check the code i am coding

velvet trout
#

--isolated?

mint abyss
#

yeah

velvet trout
#

you gotta check cli args it takes, do ruff --help or go to astral docs of it

runic flower
steel whale
mint abyss
#

so like in the terminal thing do ruff --checl

velvet trout
#

k*, yes

alpine dragon
#

Anyone knows how to code a re-run programm when a condition is satisfied?

alpine dragon
#

Yh but its not practical

#

I need it without the welcome message

runic flower
#

so don't include that in the loop?

alpine dragon
#

My code of a SIMPLE calculator is 200 lines of code

#

So i need an alternative

velvet trout
alpine dragon
velvet trout
#

Can't help much without actual code implementation

runic flower
steel whale
alpine dragon
steel whale
alpine dragon
#

Yh

#

But im a beginner

runic flower
mighty bay
#

Why are you guys still trying to manually code when claude exists?

velvet trout
mint abyss
cerulean ravine
steel whale
velvet trout
#

Lol

runic flower
steel whale
velvet trout
steel whale
autumn forge
velvet trout
#

Claude is an assistant, not a programmer replacement lmao

mint abyss
mighty bay
#

who are actually in the industry

velvet trout
velvet trout
alpine dragon
cerulean ravine
autumn forge
mighty bay
#

But knowning a lot of syntax is pointless now

velvet trout
alpine dragon
#

Read the 10th rule

runic flower
autumn forge
velvet trout
#

๐Ÿ˜” who is gonna tell bro

alpine dragon
cerulean ravine
alpine dragon
cerulean ravine
#

@mighty bay have you used claude code? Did you like what it produced?

alpine dragon
#

Especially the 10th one

autumn forge
#

talking about AI tools is not against the rules

mighty bay
alpine dragon
alpine dragon
velvet trout
#

Mod is gonna cook you all now

#

.topic Our saviour!

verbal wedgeBOT
#
**What standard library module is really underrated?**

Suggest more topics here!

velvet trout
raven urchin
raven urchin
velvet trout
edgy krakenBOT
#

Source code: Lib/shlex.py

The shlex class makes it easy to write lexical analyzers for simple syntaxes resembling that of the Unix shell. This will often be useful for writing minilanguages, (for example, in run control files for Python applications) or for parsing quoted strings.

The shlex module defines the following functions:

velvet trout
#

Basically, a tokenizer for cli arguments

raven urchin
#

o

velvet trout
#

Until i write my own implementation

alpine dragon
#

Im just a beginner so im wonder if ur talking in another language ๐Ÿ˜ญ

raven urchin
granite wyvern
alpine dragon
#

Whats that?

velvet trout
#

See this and get scared, HAHHAHA

alpine dragon
#

Im not scared

#

Im scared of c++

velvet trout
#

๐Ÿ˜”

granite wyvern
# alpine dragon Whats that?

!doc ast.literal_eval

It's an eval which basic only accepts expressions with constants in them - no access to variables or function calls.

edgy krakenBOT
#

ast.literal_eval(node_or_string)```
Evaluate an expression node or a string containing only a Python literal or container display. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, `None` and `Ellipsis`.

This can be used for evaluating strings containing Python values without the need to parse the values oneself. It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
velvet trout
#

Bro lied about being a beginner

raven urchin
velvet trout
raven urchin
#

๐Ÿ˜ญ

mint abyss
#

does ruff have a fix option or not, i searched it up it does but when i put it into the termianl gives a eroro

alpine dragon
raven urchin
velvet trout
#

--show-fixes

#

--unsafe-fix for unsafe fixes iirc

cerulean ravine
mint abyss
velvet trout
velvet trout
mint abyss
velvet trout
#

I think its ruff check --fix ? pithink

#

I think you should refer to docs

#

ruff check --fix && ruff format

granite wyvern
# velvet trout I think its ruff check --fix ? <:pithink:652247559909277706>

Yeah.

Personally I'm only happy running

ruff check \
                 --fix --fix-only \
                 "--target-version=$ruff_pyver" \
                 --select "$ruff_fixes" \

where:

  • ruff_fixes=${RUFF_FIXES:-'D207,F401,Q003,UP004'}
    and ruff_pyver=${RUFF_PYTHON_VERSION:-'py38'}

I've got a personal fix script which does that, with a diff to show what was changed/mangled.

velvet trout
#

Holy Professional

mint abyss
#

yh

#

i dont undesteand anything

granite wyvern
#

I'm lazy. I just want to type fix some_filename.py

velvet trout
granite wyvern
raven urchin
#

I'm the true larper

Neovim automatically formats for me every time I save.

velvet trout
#

That ducky is my copyright bro

granite wyvern
velvet trout
#

You can't use it without my permission

granite wyvern
#

Though I use yapf for personal code, not ruff or black.

raven urchin
velvet trout
#

No ducky_concerned its for me only!!!

raven urchin
#

damn

velvet trout
raven urchin
#

๐Ÿ‘€ ducky_drawing

#

HAHA

velvet trout
#

๐Ÿ˜”

mint abyss
#

lwk ruff kinda seems tuff

charred tusk
#

wat

mint abyss
#

i gotta learn these two: dataclasses and pathlib, are they hard to learn?

mint abyss
velvet trout
mint abyss
velvet trout
#

p = Path("src")
x = p / "abc"

Holy division operator overload ๐Ÿ”ฅ

robust ledge
runic flower
velvet trout
#

You using match-case wow

charred tusk
mint abyss
#

i think i am js scarping the bare minium with that code

#

idk howto spell

raven urchin
velvet trout
mint abyss
glacial ginkgo
#

I just have ruff scripted to run whenever I save in nvim

charred tusk
velvet trout
velvet trout
mint abyss
robust ledge
velvet trout
raven urchin
velvet trout
gleaming knoll
velvet trout
raven urchin
robust ledge
raven urchin
velvet trout
#

HelloWorld

Hello and World are two different words, each word's first letter is Capital

That's the PascalCase

mint abyss
#

ohhh

velvet trout
#

IIRC

velvet trout
raven urchin
#

๐Ÿ‘€

granite wyvern
raven urchin
#

Go has me thinking in camelCase and PascalCase as public and private ๐Ÿฅ€

velvet trout
#

This is why b-komachi went downhill ๐Ÿ˜”

minor plover
#

Hey guys wssup

velvet trout
mint abyss
raven urchin
velvet trout
raven urchin
#

I wonder what my mom will think after she sees my Ruby rice lmao

glacial ginkgo
#

no thx

granite wyvern
velvet trout
glacial ginkgo
#

Is there a way to like... hire someone to look at your code and give you pointers? Like a coach or something?

velvet trout
granite wyvern
#

!rule paid

raven urchin
edgy krakenBOT
#

9. Do not offer or ask for paid work of any kind.

granite wyvern
#

Sorry, mistyped the rule !

velvet trout
#

I should go and fix my errors instead of spying in here ๐Ÿฅ€

granite wyvern
raven urchin
granite wyvern
#

The whole __file__ thing is for when you need to open soething which is colocated with the code.
Maybe default data or config etc.

velvet trout
#

I changed my terminology, operand -> positional

Now I have to update everywhere

mint abyss
#

when i finish writeng my code so that it runs in the shell, should i try and program it in smthing like pygame?

velvet trout
granite wyvern
#

You should do what you wantt to do.

raven urchin
velvet trout
#

.parent is goated

granite wyvern
raven urchin
raven urchin
robust ledge
# charred tusk Why not?

So I have my answer. I wanted to confirm my hunch. It's a micro-optimization. That is all.

preocts @ synthwave ~
โ””โ”€โ–ถ $ python openit.py
Using built in (1_000_000 times): 4.61
Using Path (1_000_000 times)    : 7.05
glacial ginkgo
raven urchin
velvet trout
#

Write a table showing comparison between mitosis and meiosis

granite wyvern
glacial ginkgo
granite wyvern
#

Same for general advice.

velvet trout
raven urchin
#

That's the best question I've got so far lmao

velvet trout
#

xD

raven urchin
velvet trout
#

๐Ÿ˜” i thought snake was slow

raven urchin
velvet trout
#

Nice

raven urchin
#

That's the real good use for AI

granite wyvern
glacial ginkgo
#

I think seeking out educational resources doesn't really fit the category of seeking out "work" but it won't happen again

velvet trout
#

But can your python cure a disease that existed 9383839 years ago that lasted for a 17 years?

granite wyvern
raven urchin
autumn forge
#

luckily pythons aren't venemous

raven urchin
velvet trout
turbid sigil
raven urchin
#

Me going back as the daughter of Ado:

velvet trout
turbid sigil
#

they sometimes eat aligators, if I'm not mistaken

autumn forge
mint abyss
raven urchin
mint abyss
velvet trout
granite wyvern
mint abyss
#

i js dont know whether its worth the struggle yet

turbid sigil
raven urchin
velvet trout
#

Why am i reading constrictors as constructors (dunder __new__) ๐Ÿ˜ญ

glacial ginkgo
#

"Are there ways for people who are not employed in tech or in school to access informed mentors who will help them"

turbid sigil
#

Trampin, the question was worded in a way that was misunderstood by others

granite wyvern
raven urchin
turbid sigil
raven urchin
terse mauve
raven urchin
velvet trout
#

informed mentors means? Continuous private helping?

terse mauve
granite wyvern
velvet trout
#

English has lots of implicit words lol

terse mauve
raven urchin
velvet trout
raven urchin
wise imp
#

likely survivorship bias, but I've never heard or seen of pair learning ever working out really

velvet trout
#

key-value pairs ๐Ÿ˜ญ .items() lmao

turbid sigil
sand hornet
granite wyvern
turbid sigil
#

I don't remember the study though

raven urchin
harsh anchor
#

the main benefit of pair programming is knowledge transfer

raven urchin
granite wyvern
wise imp
sand hornet
turbid sigil
terse mauve
granite wyvern
#

The boa constrictor (scientific name also Boa constrictor), also known as the common boa, is a species of large, non-venomous, heavy-bodied snake that is frequently kept and bred in captivity. The boa constrictor is a member of the family Boidae. The species is native to tropical South America. A staple of private collections and public displays...

raven urchin
#

Anaconda

glacial ginkgo
#

technically yeah I guess I don't need a long term formal mentorship I just hear it widely recommended by youtubers. I think the fact that that is my primary source of advice is sort of the reason I am asking ๐Ÿ˜‚

wise imp
terse mauve
# raven urchin lmao

That project has the cleanest rust code I've ever seen, if you are comfy with rust, I highly recommend looking at it

raven urchin
raven urchin
#

I told you I'll learn rust in some months after I get comfy with Go and Py

wise imp
glacial ginkgo
raven urchin
#

Coffee over ssh?

#

I need this, send coffee asap.

granite wyvern
glacial ginkgo
granite wyvern
turbid sigil
wise imp
#

@swift sparrow are you mentoring @raven urchin? (like is that what you would consider whatever you're doing, from your perspective)

granite wyvern
turbid sigil
#

ah, I see

silver plover
jovial briar
#

Iโ€™m about to start a new project. Does anyone have any tips regarding the planning stage ?

raven urchin
glacial ginkgo
jovial briar
#

Iโ€™m gonna ask in the python help chat my bad

wise imp
#

that doesn't mean you shouldn't plan though

turbid sigil
jovial briar
#

You just start writing immediately??

raven urchin
silver plover
velvet trout
raven urchin
silver plover
jovial briar
#

Thank you guys :)

wise imp
jovial briar
#

Iโ€™m just currently deciding on whether I would like for the project to be cli or gui based

silver plover
jovial briar
#

I feel like I would learn more doing gui as Iโ€™ve mostly done cli based stuff before but gui really hurts my head ๐Ÿคฃ๐Ÿคฃ

granite wyvern
turbid sigil
jovial briar
wise imp
#

oh hey, since we're talking about planning
god, do I need some resource for this, it's difficult to plan for a team or as a team as I'm finding out during this uni project we're doing

turbid sigil
#

design should be technology agnostic (am I incorrect for saying this?)

jovial briar
turbid sigil
#

making technology decisions early locks you into a solution

robust ledge
silver plover
turbid sigil
#

you eliminate possible alternatives, and narrow yourself in.

glacial ginkgo
robust ledge
jovial briar
turbid sigil
robust ledge
cerulean ravine
turbid sigil
# jovial briar So avoid planning too much ?

plans change, so you have to make a cost-benefit analysis of whether a lot of planning will be a good use of your time, versus how much time you spend planning on something that may be invalid in a few weeks time.

robust ledge
turbid sigil
silver plover
cerulean ravine
robust ledge
#

The number of times I've gone into a project with "the plan" and come out six hours later with "the new plan".

silver plover
turbid sigil
sand hornet
jovial briar
#

Thank you all for the good advice I appreciate it

silver plover
#

The German version is 'no plan survives first contact with the enemy'

robust ledge
#

Things change. Embrance it.

sand hornet
#

*embrace

robust ledge
#

embrance it :V

sand hornet
#

It's like RegEx.. "".join(re.findall("embrance", "[^n]")) pithink

#

That is wrong, but you get the point ๐Ÿ˜›

rare gazelle
sand hornet
rare gazelle
#

narrow but not too narrow
wide but not too wide

turbid sigil
rare gazelle
#

yea both extremes might not be the answer

turbid sigil
#

definitely not fun experiences having constantly changing code vs using a clunky library when there's a better option out there

#

open closed principle is my enemy

silver plover
rare gazelle
#

the goldilocks rule talks about balance from what i understand... (haven't heard of it before)

raven urchin
#

@rare gazelle

#

Which is your favorite prime number.

silver plover
#

What? I was making a joke about Goldilocks and the three bears...

rare gazelle
rare gazelle
#

i didn't know of it before

raven urchin
silver plover
#

Oh, it's just a story about not liking the extremes

finite rose
vale wasp
#

.topic

verbal wedgeBOT
#
**Are you currently using Python professionally, for education, or as a hobby?**

Suggest more topics here!

vale wasp
raven urchin
swift sparrow
raven urchin
tender bloom
vale wasp
swift sparrow
#

How touching

raven urchin
vale wasp
raven urchin
#

There are packages for displaying markdown, that will be really useful hehe

swift sparrow
#

for the list?

raven urchin
#

For the base tho, I've seen stuff about the widgets, also planned the layouts a bit

swift sparrow
#

Ooh yeah that would be neat. In my mind I had a to-do list as just a really simple list of things

raven urchin
#

Have to see what's the style shit thingy about

raven urchin
raven urchin
#

Like Vexel is doing with his Axiom text editor, that's a really cool project

swift sparrow
#

Yeah, you could use a simple list as the main to-do selection, and then maybe you can add extra notes to that task

#

similar to Google Notes

swift sparrow
#

QListWidget can handle the main selection, or even QListView if you're feeling spicy

raven urchin
#

For now, the plan is:

Do all the GUI related stuff first, having proper display with a placeholder task.

Then make the tasks module with all the CRUD stuff.

Then make it cuter.

Then add fun stuff!

spark obsidian
#

There is nothing more permanent than an easy solution, I think you should have deployed a full on kubernetes cluster with properly versionned microservices and a full on CI/CD pipline /s

glacial ginkgo
#

I did post to help as per the advice here btw. Thanks for the pointers. If anyone could look my project over and help me develop good professional habits I would be thrilled.

vale wasp
velvet trout
spark obsidian
tender bloom
#

Is it pronounced kuber-net-ees or kuber-neets

raven urchin
raven urchin
raven urchin
tender bloom
#

Or just kates if you spell it like k8s

lone harness
#

ammm hi guys

raven urchin
lone harness
#

how is thereee

spark obsidian
velvet trout
lone harness
#

how to use discore vro ๐Ÿฅ€

#

***discordd

velvet trout
#

Step 0: uninstall discore
Step 1: install discord

velvet trout
lone harness
velvet trout
#

Much Wow

tender bloom
#

Itโ€™s on my todo list to set up a full CI/CD pipeline for my hello world app. uv, Jenkins, dockerfile, Ansible and kuber-net-ees

lone harness
velvet trout
lone harness
#

i try ๐Ÿฅ€

velvet trout
#

And except EnglishError

lone harness
velvet trout
#

English should be nuked in my opinion, colonial language fr. We should standardize speaking in Python. Explicit > Implicit.

tender bloom
#

But I guess I could split it into microservices architecture

velvet trout
#

str.translate()

tender bloom
#

One pod that has the printed string and one pod that displays a string to logs

#

Communicating over http

lone harness
velvet trout
velvet trout
spark obsidian
lone harness
shrewd pine
#

I imagine debian testing would be quite alright

velvet trout
edgy krakenBOT
#

str.translate(table, /)```
Return a copy of the string in which each character has been mapped through the given translation table. The table must be an object that implements indexing via [`__getitem__()`](https://docs.python.org/3/reference/datamodel.html#object.__getitem__), typically a [mapping](https://docs.python.org/3/glossary.html#term-mapping) or [sequence](https://docs.python.org/3/glossary.html#term-sequence). When indexed by a Unicode ordinal (an integer), the table object can do any of the following: return a Unicode ordinal or a string, to map the character to one or more other characters; return `None`, to delete the character from the return string; or raise a [`LookupError`](https://docs.python.org/3/library/exceptions.html#LookupError) exception, to map the character to itself.

You can use [`str.maketrans()`](https://docs.python.org/3/library/stdtypes.html#str.maketrans) to create a translation map from character-to-character mappings in different formats.

See also the [`codecs`](https://docs.python.org/3/library/codecs.html#module-codecs) module for a more flexible approach to custom character mappings.
lone harness
#

but i don't know how to use it ๐Ÿฅ€

ashen cipher
tender bloom
velvet trout
tender bloom
#

I need to make sure my app is Web Scale

velvet trout
spark obsidian
lone harness
velvet trout
#

Welcome vro

#

Deciding terminologies and keeping consistency between them is so hard, damn...

tender bloom
shrewd pine
velvet trout
spark obsidian
shrewd pine
tender bloom
#

Legit I do want to write a SOAP application some day to experience the fun

lone harness
velvet trout
tender bloom
velvet trout
#

class AjiRomson(ModernHomoSapien): ...

#

Hail science ๐Ÿ—ฃ๏ธ๐Ÿ”ฅ

tender bloom
#

If the latter I would have some human doing a fax somewhere

spark obsidian
echo void
#

What not to do to not get banned?

shrewd pine
velvet trout
lone harness
velvet trout
#

Ema listen to mozart now bye bye

rotund steppe
#

Guys what is numerical methods and how does it apply to cs?

velvet trout
tender bloom
#

On a completely different topic (for me anyway)

scenic finch
velvet trout
#

He's saying... || meow ||

tender bloom
#

If I have just null on its own, is that considered valid JSON?

lone harness
velvet trout
#

Who thought of two union operators as a delimiter for spoilers

shrewd pine
velvet trout
scenic finch
velvet trout
#

๐Ÿ˜”

#

Yamate kudasai, watashi no racist. Kiraye! Kiraye! Dai kiraye! Watashi no goodo human!

tender bloom
# shrewd pine yes

And is that the only time valid JSON isnโ€™t either {โ€ฆ} or [โ€ฆ] ?

shrewd pine
#

well 42

shrewd pine
#

or "blah"

lone harness
velvet trout
#

Ngl japanese pronunciation is so freaking cute

echo void
swift sparrow
#

it doesn't have to have a list/dict as its outer data

velvet trout
echo void
#

so io is diff

shrewd pine
swift sparrow
swift sparrow
#

like I know list/tuple will act the same once converted

velvet trout
tender bloom
#

Oh so valid JSON could just be a string or int completely on its own?

echo void
#

list in, list out

swift sparrow
#

yeah, I was referring to the type once inside the json

tender bloom
velvet trout
#

Even an array is fine ig

lone harness
echo void
#

I read that b4 in docs, I think

velvet trout
tender bloom
#

Iโ€™ve never seen JSON be like a single string

#

Good to know

lone harness
velvet trout
lone harness
shrewd pine
brisk gazelle
#

It's one of the things I like telling people, because most people think JSON is only ever a dictionary as the outermost.

echo void
#

Why u guys like this sysmbol so much ๐Ÿ˜†

lone harness
swift sparrow
echo void
tender bloom
velvet trout
unborn lagoon
tender bloom
#

Then I saw just null and thought that wasnโ€™t right

shrewd pine
vale wasp
shrewd pine
velvet trout
stray field
tender bloom
#

Iโ€™m going to create a REST interface where the payload is a single string of SOAP XML

lone harness
swift sparrow
rare gazelle
shrewd pine
swift sparrow
brisk gazelle
swift sparrow
#

I only ever used them like that, so I assumed those were the only possibilities

lone harness
rare gazelle
velvet trout
swift sparrow
echo void
stray field
rare gazelle
lone harness
echo void
rare gazelle
#

trying not to at least

velvet trout
lone harness
scenic finch
#

Can we keep it on topic

velvet trout
#

Hatred compatible ๐Ÿคฃ

#

.topic

verbal wedgeBOT
#
**What is your motivation for programming?**

Suggest more topics here!

echo void
scenic finch
echo void
rare gazelle
#

for the record:
i dont know if it can be anything that isn't a container, but i just dont know the answer

scenic finch
velvet trout
echo void
# verbal wedge

solve daily problems, but it seems lately i am a servant to the computer

shrewd pine
#

interestingly, this is not following spec

In [4]: json.dumps(float('nan'))
Out[4]: 'NaN'

In [5]: json.dumps(float('inf'))
Out[5]: 'Infinity'
robust ledge
rare gazelle
echo void
rare gazelle
#

if you care about json spec read about it in wikipedia

vale wasp
velvet trout
vale wasp
echo void
shrewd pine
echo void
rare gazelle
vale wasp
rare gazelle
#

python's json library is just an implementation

velvet trout
#

I dunno till this day

echo void
#

I learned threading

vale wasp
velvet trout
echo void
#

took me 2, can i say the word, years

brisk gazelle
vale wasp
velvet trout
#

Did we evolve or what...

How is threading sensible as a beginner. I didn't even understand two vars getting mutated at the same time.

rare gazelle
#

if you wanna know what the json spec is you dont investigate python's json library, you read abbout the spec in wikipedia

vale wasp
echo void
#

u know a chat is healthy when several people are typing

vale wasp
velvet trout
rare gazelle
chilly whale
unborn lagoon
velvet trout
brisk gazelle
echo void
#

oh

fiery yarrow
#

getting data about details of a specification from wikipedia is a poor idea

granite wyvern
# brisk gazelle JSON supports floats.

https://datatracker.ietf.org/doc/html/rfc8259#section-6

Numeric values that cannot be represented in the grammar below (such
as Infinity and NaN) are not permitted.

IETF Datatracker

JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data. This document removes inconsistencies with other specifications of JSON, r...

echo void
#

u mean 1 on 1 * 3?

rare gazelle
vale wasp
velvet trout
#

You're right

echo void
#

how does chat even work here?

dusty ember
rare gazelle
#

you cant know the spec based on the implementation

brisk gazelle
rare gazelle
granite wyvern
robust ledge
fiery yarrow
dusty ember
velvet trout
#

What was nedbat cooking but left unserved in between?

granite wyvern
echo void
chilly whale
shrewd pine
vale wasp
granite wyvern
#

For example, the range of numeric values (eg the max sizes of ints or floats).

cerulean ravine
#

is someone claiming that the json module is out of spec somehow?

unborn lagoon
rare gazelle
vale wasp
echo void
#

Anybody wants to collab on... AES-128 (tada)

brisk gazelle
chilly whale
#

vs double

rare gazelle
#

the implementation might not meet the spec at 100%

granite wyvern
#

We're probably saying it supports more than the minumim required by the spec.

chilly whale
#

totally unspecified

velvet trout
#

Y'all accept you're wrong and apologize now or else be ready to get cooked by nedbat

spice hill
dusty ember