#voice-chat-text-0

1 messages Β· Page 354 of 1

still herald
#

I write too, I read too but from last month I'm not writing nor reading. I just couldn't do it. I don't feel myself

sturdy terrace
#

Hello guys.

#

Can anyone tell me what is wrong with my code?

#

I cannot make this case and is True function work together.

still herald
#

When I sit to write nothing comes out

vocal basin
rugged root
#

Or what AF said

#

Also, your _ case needs to be the last case mentioned

sturdy terrace
vocal basin
#
case "1" if valid_email(email):
    ...
case "1":
    ...
case "2":
    ...
#

although

vocal basin
#

@rugged root "no, hemlock, it's still morning somewhere"

ruby fossil
#

I am working on an inventory managment system for my vinyl collection (it needs an inventory system xD), I have built a proto type in python but am wondering if I would be better using python with sqlite or just an SQL database.

vocal basin
#

SQLite is a SQL database too

#

did you mean something like postgres as opposed to SQLite?

#

SQLite is fine

ruby fossil
# vocal basin SQLite is a SQL database too

yeah I get that, but i meant more so would it be more efficient/worth while to build it in SQLite with python or just a straight up SQL server like MySQL (which I do have experiance with)

vocal basin
vocal basin
frozen owl
#

damn i had my first cs class today

vocal basin
#

they have both sync and async support in Python

frozen owl
#

apparently i didnt know what a programming error is

ruby fossil
vocal basin
ruby fossil
#

Ill give it a look!

vocal basin
frozen owl
#

whats a "semantic error"

#

like sure i spell the words correctly but it's not syntax error or logic error?

#

fuck

ruby fossil
#

worded incorectly, or commands used inproperly

frozen owl
#

i was never taught this

vocal basin
#

SQLite expects you write complex logic on your own instead of providing much on its own

frozen owl
#

the task was to write 3 types of errors, what they are, examples of it and how to detect errors

vocal basin
#

so no really advanced stuff like built-in functions to work with timeseries, pubsub mechanisms, all that you don't need for your project anyway

frozen owl
#

fuck i thought errors were like typeerrors, valueerrors etc

#

😭

vocal basin
rugged root
vocal basin
#

not a runtime error

#

sounds like

frozen owl
#

turns out the teacher said stuff along the lines of "syntax error", "logic error", "semantic error"

#

😭

#

i wrote all this code and got a fuckton of errors for nothing 😭

vocal basin
#

design and naming error not an explicit error

sturdy terrace
vocal basin
sturdy terrace
vocal basin
#

oh

#

yeah, unrelated error

sturdy terrace
vocal basin
sturdy terrace
frozen owl
#

i have no fucking clue

versed heath
vocal basin
#

@rugged root @frozen owl
example of a semantic error:

def add(x, y):
    return x * y
frozen owl
vocal basin
#

you meant not what you wrote

frozen owl
#

fuck i have never taken any courses on logic

sturdy terrace
frozen owl
vocal basin
#

missing n

vocal basin
#

similar to how, in Arc/Zen, wide window borders are a design error

frozen owl
#

also for tmr theyre doing 2s complement

#

i have no clue whats that

#

the other kids know since they all did prior cs

peak depot
frozen owl
#

i barely survived today's cs class when they did binary typa shit

#

binary addition, conversion et al

versed heath
frozen owl
#

i was learning bitshifts today at school
is << faster than *?

vocal basin
#

if you use no optimisation

#

with optimisation, it will replace * with << when it can

peak depot
rugged root
#

Wouldn't most compilers make the optimization?

vocal basin
#

yes

vocal basin
rugged root
#

Derp, right

#

Read it but it didn't connect

vocal basin
#

write * when you mean to *

versed heath
frozen owl
#

ok

versed heath
#

0010 = 2 0100 = 4 bit shift left is *2

vocal basin
rugged root
#

Cursed

vocal basin
#

you can bitshift a float if you're brave enough

#

hmm
seems like the sounds I heard today/yesterday were indeed explosions
allegedly

#

do Preact instead: hate your work more space-efficiently

rugged root
#

HA

#

Preact did look pretty cool, though

vocal basin
#

we use it at work as just a smaller React

rugged root
#

Oh holy crap, forgot it was only 3kB

vocal basin
#

project itself + some library on top of react (via compat layer) -> 30kB

rugged root
#

That's still itty bitty

vocal basin
#

the react part is around 1MB

rugged root
#

Is it interoperable with React plugins and stuff?

vocal basin
#

as in a different project

vocal basin
#

you make react point to a compat package

#

which re-exports and wraps parts of preact

rugged root
#

This is something that's always kind of worried me

vocal basin
#

both bundled with vite

rugged root
#

Like the whole CDN stuff

vocal basin
#

checksum

#

with checksum, compromise doesn't matter

#

outage does

frozen owl
vocal basin
#

checksum prevents supply chain attacks

#

you always get the exact same thing

#

if you don't, it errors

#

checksum is applied to the final JS file that you fetch

#

does not matter

#

if the compromised supply build chain ends up producing the exact same JS output

#

so, like

#

does not change anything

#

the issue is when CDN thing cannot have a checksum

#

e.g. polyfill

vocal basin
vocal basin
#

or rewrite the body

#

depending on how you use it

#

and if you don't use the function, delete it

frozen owl
frozen owl
#

flowcharts?

#

or avoiding close/ambigious words???

#

ik this is some pretentious cs crap

vocal basin
#

that prevents simple ones

#

sometimes, meaning of what you're doing, is non-trivial

#

issue not with names, but with interactions of the system as a whole

#

@brazen gazelle just don't return lifetimes, most of the time

#

in functions/methods

frozen owl
#

ty af :D

vocal basin
#

then you can start adding things that are &self to &T

#

getter methods

#

@brazen gazelle return owned values

frozen owl
#

this sounds so obvious but im not sure if this is correct

vocal basin
#

sometimes you will have to .clone();
it's fine until you figure out the lifetimes

vocal basin
#

"I'm too busy to document interfaces I write"

#

all those C "experts"

#

aka devs incapable of writing reliable software

vocal basin
#

and people who actually understand safe C just move on to better languages because it makes their life easier by taking on the responsibility away from the programmer

rugged root
#

!stream 451730408636416000

wise cargoBOT
#

βœ… @late spoke can now stream until <t:1725992052:f>.

vocal basin
#

@late spoke and cross-compiling to older libc is quite non-trivial

#

Zig solves that

#

for older Python, Docker it

rugged root
vocal basin
#

type~~ and where~~

#

and which

#

whatever linux has

#

whichevers

rugged root
#

@fleet canyon πŸ‘‹

fleet canyon
#

I hit the wrong channel on my phone!

rugged root
#

HA, all good

sturdy terrace
#

@vocal basin
Hey thank you. It worked. But my program is having a hard time calling the custom function.

vocal basin
#

what are all these oddly specific ads on youtube

#

"I'm not a Kubernetes Error, this book is not for me"

#

@willow light docker on the server, VSC (or proper open-source derivative) on the client;
dev containers, happy life

#

(until it explodes and burns from memory usage)

sturdy terrace
#

can anyone help here?

#

: B

vocal basin
#

so you can put the \ back in

sturdy terrace
vocal basin
#

no, there you need f

#

you changed the wrong ones

#

I meant here

sturdy terrace
vocal basin
#

@whole bear πŸ‘‹

whole bear
vocal basin
#

@lavish rover add start to indices in arr accesses?

#

oh wait

#

no

#

hm m

#

hmm

#

start + (end - start) // 2 fails too?

#

it should be

#

r = end - 1?

#

oh, then halving is not equivalent

rugged root
#

@lavish rover Don't go anywhere, I'm going to be hopping into the van shortly

#

Take that as you will

stark river
#

with candy

vocal basin
#

I cannot do arithmetic today;
had enough of thinking for the day from debugging webrtc

#

fails with +1 removed too?

lavish rover
#

@rugged root gotta head out, see ya

somber heath
#

@cedar thorn πŸ‘‹

#

@olive phoenix πŸ‘‹

olive phoenix
#

oh

#

hi

#

i have a questionb

#

So i have learned basically all the basics of python like for loops, strings, while loops and some basic programs like quizes

#

but im wondering what to do next

#

True but where can i learn more

somber heath
#

!resources

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

somber heath
#

!kindling

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.

olive phoenix
#

thanks

primal shadow
#

I always recommend tic tac toe

late vale
#

Well, I hope you can help me

#

Lol

#

Hey before purchasing this course, I was wondering if any of you could look over this information anfd let me know is this something worthy to teaching me the basics?

#

@long minnow

#

@sour imp ^

long minnow
#

I'm creating my own distributed application framework in Python. The goal is to be able to easily create processes that can find and talk to each other via tcp/udp. Eventually, these could be packed up in docker and then pushed out to a bunch of machines on a network.

wind raptor
#

!stream 962128994814263316

wise cargoBOT
#

βœ… @sweet sorrel can now stream until <t:1726015974:f>.

vocal basin
#

I have more CSS horrors to show

#

minified? why don't they get those borders minified

#

is spidermonkey the current or previous one

#

seems like still the actual one for Firefox

#

okay what was I thinking of then

wind raptor
#

@sweet sorrel @sour imp

sour imp
vocal basin
#

why is there a \

ebon mist
#
import csv

map = {}

def read_chunk(map, path, cords = None):
    """Reads a chunk of a tile map from a CSV file.

    Args:
        map (dict): The map dictionary to store the chunk.
        path (str or tuple): The path to the CSV file or a tuple containing the base path and file extension.
        cords (tuple, optional): The coordinates of the chunk. Defaults to None.

    Returns:
        dict: The updated map dictionary.
    """
    if isinstance(path, str):
        file_path = path
    else:
        file_path = f"{path[0]}{cords[0]},{cords[1]}{path[1]}"
    with open(file_path, 'r') as csvfile:
        reader = csv.reader(csvfile)
        chunk = [row for row in reader]
    map[f"{cords[0]},{cords[1]}"] = chunk
    return map

def write_chunk(map, chunk, path, cords = None):
    """Writes a chunk of a tile map to a CSV file.

    Args:
        map (dict): The map dictionary.
        chunk (list): The chunk of tiles to write.
        path (str or tuple): The path to the CSV file or a tuple containing the base path and file extension.
        cords (tuple, optional): The coordinates of the chunk. Defaults to None.

    Returns:
        dict: The updated map dictionary.
    """
    if isinstance(path, str):
        file_path = path
    else:
        file_path = f"{path[0]}{cords[0]},{cords[1]}{path[1]}"
    with open(file_path, 'w', newline='') as csvfile:
        writer = csv.writer(csvfile)
        writer.writerows(chunk)
    map[f"{cords[0]},{cords[1]}"] = file_path
    return map

#

"`"

sweet sorrel
#

````~~~``python
import csv

map = {}

def read_chunk(map, path, coords=None):
"""
Reads a chunk of a tile map from a CSV file.

Args:
    map (dict): The map dictionary to store the chunk.
    path (str or tuple): The path to the CSV file or a tuple containing the base path and file extension.
    coords (tuple, optional): The coordinates of the chunk. Defaults to None.

Returns:
    dict: The updated map dictionary.
"""
if isinstance(path, str):
    file_path = path
else:
    file_path = f"{path[0]}{coords[0]},{coords[1]}{path[1]}"

with open(file_path, 'r') as csvfile:
    reader = csv.reader(csvfile)
    chunk = [row for row in reader]

if coords:
    map[f"{coords[0]},{coords[1]}"] = chunk
else:
    map["default"] = chunk

return map

def write_chunk(map, chunk, path, coords=None):
"""
Writes a chunk of a tile map to a CSV file.

Args:
    map (dict): The map dictionary.
    chunk (list): The chunk of tiles to write.
    path (str or tuple): The path to the CSV file or a tuple containing the base path and file extension.
    coords (tuple, optional): The coordinates of the chunk. Defaults to None.

Returns:
    dict: The updated map dictionary.
"""
if isinstance(path, str):
    file_path = path
else:
    file_path = f"{path[0]}{coords[0]},{coords[1]}{path[1]}"

with open(file_path, 'w', newline='') as csvfile:
    writer = csv.writer(csvfile)
    writer.writerows(chunk)

if coords:
    map[f"{coords[0]},{coords[1]}"] = file_path
else:
    map["default"] = file_path

return map

Here are a few key changes:

1. **Formatting:** Improved the readability by properly formatting the code (spacing, indentation).
2. **Variable Naming:** Changed `cords` to `coords` for clarity.
3. **Key Assignment:** Checked if `coords` are provided. If not, a default key is used to store the chunk or file path.
4. **Docstrings:** Updated the docstrings to reflect the variable name changes and added clarity.

Feel free to further customize it based on your specific needs or constraints.```~~~```
wind raptor
#

!rule 10 @sweet sorrel Please don't post GPT responses to user questions.

wise cargoBOT
#

10. Do not copy and paste answers from ChatGPT or similar AI tools.

late vale
#

https://codewith.mu/

Hey, when installing this onto my computer I got some Chrome Error message about this being unsafe

#

I checked reddit and didn't see any bad reviews. Just wanting some additional opinions

#

@sour imp / @long minnow

sweet sorrel
wind raptor
#

!stream 732291998274420828 2h

wise cargoBOT
#

βœ… @sour imp can now stream until <t:1726025646:f>.

wind raptor
#

!stream 962128994814263316 30M

wise cargoBOT
#

βœ… @sweet sorrel can now stream until <t:1726020799:f>.

sweet sorrel
#

@wind raptor

#

Wait

#

i forgot to turn on sc

#

ss

somber heath
#

@ivory wadi πŸ‘‹

somber heath
somber heath
#

@frank pumiceπŸ‘‹

frank pumice
#

Heyy

edgy fable
#

.

grim hatch
#

last time I used it

#

I was very pleasantly surprised

#

easily better than chrome feature-wise

#

in terms of tracking I thankfully don't care

versed heath
bleak copper
#

MHRD - Welcome to Microhard- Become a hardware engineer- Join the hardware startup Microhard- Immerse yourself in the technology of the 80's- Disrupt the tech industryBuild your own CPU- Design hardware circuits with the integrated hardware development environment- Write your designs in the MHRD hardware design language- Create hardware designs ...

warm vapor
#

Build circuits using a variety of components from different manufacturers, like microcontrollers, memory, logic gates, and LCD screens. Write code in a compact and powerful assembly language where every instruction can be conditionally executed. Read the included manual, which includes over 30 pages of original datasheets, reference guides, and...

Price

$14.99

Recommendations

3280

β–Ά Play video
faint ginkgo
#

hi

worldly robin
#

What you were in before 4 years @wind raptor

worldly robin
wind raptor
#

Analyst

worldly robin
# wind raptor Analyst

But was that good with incentives..
As a Dad,
Why at this age , you choose to be Programmer?

wind raptor
faint ginkgo
#

hi

#

good u

worldly robin
rugged root
#

Chrome has gotten better with how it handles excess tabs

#

Usually it relegates unused tabs to an idle state that takes up less ram or gets moved to page memory

#

Also, can't talk out loud, have a co-worker back here

#

@still herald Yo

vocal basin
#

trust me I know

vocal basin
rugged root
#

He's got good vision. He's Farsi

#

@jovial iris I stand by this joke

still herald
#

Parsi girls' highs school

rugged root
#

Shit

#

Can Farsi

#

I screwed up the punchline

#

Assume my joke was actually funny

#

HA

#

I'll take it

#

Pity laughs are still laughs

upper basin
jovial iris
#

UwU

rugged root
#

Good cry or bad cry

#

Phrasing

upper basin
rugged root
#

"You teach me how to be a good girl" can have.... connotations

jovial iris
rugged root
#

He's so cool for being a person?

rugged root
still herald
rugged root
#

Fair

#

Still, 9 tabs shouldn't cause issues...

#

Hmm

jovial iris
rugged root
#

My keyboard keeps ghosting "k"

#

We have tons of people from South East Asia

#

What are you talking about

#

They... do

#

I used to be

#

I was before high school

#

It wasn't until I did theater that I got more confidence

#

Yep yep

#

7 shows in high school, 2 shows after that

upper basin
#

"D-do you want me to do my...hemshake?"

rugged root
#

Let's see if I can even remember them all....

upper basin
#

Starts thrashing

rugged root
#

Yearbook Reflections
10x10
Brady Bunch
Godspell
Wizard of Oz
New Town
Sarah Plain and Tall

Those were the high school ones (possibly in that order, it's been over a decade since then)

Then it was:
Dracula: The Comedy
Fuddy Meers

#

Favorite show was Dracula: The Comedy

jovial iris
rugged root
#

Had an awesome director, awesome cast mates

rugged root
#

There's dicks in all communities

#

Wouldn't label all of them as such

#

See previous dicks

#

Yep. The loudest people are the most recognized

#

@still herald Patience is a virtue

#

Yo

#

Primarily Windows

#

When I'm not, usually Manjaro

#

But I'm considering distro hopping again

#

Just like to try various ones until I find one that feels comfortable

jovial iris
rugged root
#

HA

#

Right

#

So you're using Chromium rather than Chrome, right?

#

Gotcha

#

Could be actual ram issues, too

#

What distro are you using?

#

Oh well...

#

Hmm

#

That's legit what I was going to suggest

jovial iris
rugged root
#

I think Manjaro has access to the Discord desktop client

#

Might have better streaming using that

#

Hmm, could also be your DE

#

Sometimes some DE's just don't play well with other things

#

I usually rock XFCE

#

But that's mainly because I'm boring

willow gate
#

@still herald hello

jovial iris
rugged root
#

Manjaro's driver compatability is awesome out of the box, too

#

It's the only distro I've used where the wireless card just straight up worked

#

Hmm?

#

What'd he call you

#

Performance review?

#

It's AUR compatible

#

That's more a thing about AUR

#

Not necessarily the distro

#

@still herald Dude that's awesome!

#

Proud of you girly

earnest echo
#

wsg ppl

rugged root
#

Not much, 'bout you

#

Oh dock your pay?

#

I didn't know that was still allowed anywhere

still herald
#

@upper basin πŸ’…πŸ»

willow gate
#

@somber heath hello

unique holly
#

hey @somber heath

#

@somber heath has a separate fan base

willow gate
unique holly
#

Mr. hemlock is trying, but he doesn't have a fan club

#

@rugged root

rugged root
#

Rather not have one

#

Nothing special to celebrate about me

#

Just another person

#

I have no idea what I'm supposed to be doing

#

I just sat back down

#

@still herald I don't know anyone who hates you

#

Had to help one of the partners figure out an issue with their voicemail box

#

@jovial iris Possibly. It's been quite a while since I've used Manjaro and I've heard it's gotten less awesome over time

#

Haven't actually futzed with regular Arch but I've heard that's gotten easier to mess with over the years

#

@still herald I've got a co-worker back here

#

Just trying to be polite

#

No no

#

I'm in the office

#

If I'm on here, I'm at the office

#

Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

#

I'm not bringing accountants onto this server

#

Damn shame

#

Whelp, time to start distro hunting again

#

Would assume so

#

Worth a shot

#

If you don't have a lot invested or on that rig, can't hurt

#

VM is always going to give you mixed results

#

See if they have a live USB or something

#

@still herald It's common enough. We have lots of folks who are more here for the community than anything else

#

And we can still help you learn

#

Practice practice practice

#

Well if you get stuck or need guidance you know where to find us

#

Go for it

#

There's an off topic name

#

So the Off-topic channel names are added by staff and most of them are jokes or what have you. Opal's Fanclub is one of them

#

They don't hate

still herald
#

I swear to god

rugged root
#

The Endevour one has a live USB because of the Manjaro folks?

#

@still herald I mean I don't know what you're expecting me to say

still herald
#

"Tea"

rugged root
#

Yeah as in gossip

#

I know what you mean

#

I don't think it's just women

#

Sure

#

It happens

#

I mean usually it's more like "That dude is an absolute douchebag"

#

Yarp

#

You have an interesting view of what men and women are supposed to be

#

I honestly don't like beer

#

@still herald I mean... people have things to do, too

#

Oh my god

#

.... but you do care

#

That's fair. But you also have to let other people talk about things they want to talk about as well

#

Breathe

#

Breeeeeeathe

#

Or you know it's something you would say to their face

#

Like the people who I think are douchebags, 10,000% I'd say it to them

#

And have

#

Also, quick question. If you have someone call you a magnificent bastard, would you consider that a compliment or an insult

#

I think it's the tone of how you say it, too

#

If you say it while smiling or about to laugh, compliment

#

No

#

I'm still talking about the magnificent bastard thing

#

You're fine, Winter

#

Just breathe

#

HA

#

Love it

#

"Uh Greg? Stop it"

#

@still herald Sometimes the repeition can be a bit much

#

That... has nothing to do with coding

#

@vocal basin What's your recommended distro?

#

@still herald False

vocal basin
#

> I'm not a coder, I'm a human
did you just call coders non-humans lmao

rugged root
#

They're people, they're individuals, and sometimes they're wordy as fuck

#

It depends on the person, just like anything else

vocal basin
rugged root
#

Well played

#

@still herald Well.... there's a phrase called "beating a dead horse"

#

When the point is stated over and over it starts to get- there you go generalizing again

#

Dude, we talk about random shit all the time

vocal basin
#

I couldn't install some distros so went with Ubuntu Server again

rugged root
#

Wait, Ubuntu Server as your daily driver?

vocal basin
#

for two servers

#

the computer had some limitations in terms of GPU

#

I might've misconnected it

#

or some power issue

rugged root
#

Exactly

vocal basin
#

I should've just pre-installed the system on another computer

rugged root
#

Hold on, something weird is happening on my discord, one sec

#

There we go

#

Still had the window up like someone was streaming

#

No idea why

vocal basin
#

now it has a very specific one

#

a very specific limitation of not having a GPU

rugged root
#

That it is

#

I remember seeing it on TV

still herald
#

You guys are sharp man

vocal basin
#

for the laptop I use openSUSE Tumbleweed

#

the experimental one

#

(not Leap)

rugged root
#

@vocal basin What's your DE of choice

vocal basin
#

I use KDE Plasma;
the one that Mint uses is fine too

rugged root
#

I find it hard to get away from XFCE

#

I feel like I want to, but at the same time...

#

@still herald Okies. Catch you later

still herald
#

Take care

rugged root
#

You're fine

vocal basin
still herald
#

What

rugged root
#

Just how it looks so dated?

vocal basin
#

it's in that part of old UIs that I don't like

rugged root
#

It's a weird comfort zone for me

#

@somber heath hi hi

#

@peak depot hai

#

I didn't have to ask

vocal basin
#

VirtualBox-type datedness in the UIs I'm more fine with

#

because it looks more as "we didn't have tools to do better" than "we didn't yet realise this might make some people dislike it"

rugged root
#

@somber heath "In Come the Spiders" is a horror book in waiting

vocal basin
#

questionable design decisions are being revived over and over

rugged root
#

@upper basin Your flesh actually starts to rot away

vocal basin
#

now those suboptimal trends have hit the browser the development

upper basin
rugged root
#

Not to be confused with "Income in Spiders"

#

@somber heath I will end you

#

It's making me itch

vocal basin
#

like
investment + infestation

rugged root
#

Oh that's gooooooooooooooooooooooooooooooold

peak depot
#

HΓ€mΓ€hΓ€kki

vocal basin
#

I had that word prepared for a long time

rugged root
#

I'm proud of you

#

Genuinely

#

Wyrm

#

Yeah

#

Stuff like that

#

Serpent

#

Back in a sec, have to IT something

somber heath
#

🎈
πŸ–¨οΈ

vocal basin
#

@upper basin what does the auto-formatter do

vocal basin
upper basin
#

Puts everything in a single line.

upper basin
vocal basin
#

run it on the code

upper basin
#

I generate stubs using stubgen.

#

Oh on the .py not .pyi?

vocal basin
upper basin
#

I have before, mine is slightly more readable and consistent.

vocal basin
#

what are you generating .pyis for?

upper basin
vocal basin
sturdy terrace
#

Hello everyone.

upper basin
sturdy terrace
#

: )

#

Can anyone help me with regex?

#

I want to write a code for matching a number pattern.

vocal basin
sturdy terrace
#

The first two has to be 0 and 1 and then the third one has to be 9,5,7,8,6.

vocal basin
#

!e

import re

pattern = re.compile(r"[01][01][5-9]")
assert pattern.match("005")
assert pattern.match("015")
assert pattern.match("105")
assert pattern.match("115")
assert pattern.match("006")
assert pattern.match("007")
assert pattern.match("008")
assert pattern.match("009")
assert not pattern.match("004")
assert not pattern.match("025")
assert not pattern.match("205")
wise cargoBOT
sturdy terrace
vocal basin
#

does something different, probably

sturdy terrace
#

Sorry, I am just a beginner.

vocal basin
#

!e

assert True
wise cargoBOT
vocal basin
#

!e

assert False
wise cargoBOT
# vocal basin !e ```py assert False ```

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     assert False
004 |            ^^^^^
005 | AssertionError
vocal basin
sturdy terrace
vocal basin
#

I mean the whole string

sturdy terrace
#

01912365934

vocal basin
#

!e

import re

pattern = re.compile(r"")  # this we need to fill in
assert     pattern.match("01912365934")
assert not pattern.match("00412365934")
assert not pattern.match("01412365934")
assert not pattern.match("10912365934")
assert not pattern.match("11912365934")
wise cargoBOT
vocal basin
#

since 0 and 1 we need to match exactly, we just add them there

#

!e

import re

pattern = re.compile(r"01")  # this we need to fill in
assert     pattern.match("01912365934")
assert not pattern.match("00412365934")
assert not pattern.match("01412365934")
assert not pattern.match("10912365934")
assert not pattern.match("11912365934")
wise cargoBOT
vocal basin
#

then we need to match 5~9

#

a single time

#

!e

import re

pattern = re.compile(r"01[5-9]")  # this we need to fill in
assert     pattern.match("01912365934")
assert not pattern.match("00412365934")
assert not pattern.match("01412365934")
assert not pattern.match("10912365934")
assert not pattern.match("11912365934")
wise cargoBOT
vocal basin
#

and then an arbitrary digit 8 times

#

!e

import re

pattern = re.compile(r"01[5-9][0-9]{8}")  # this we need to fill in
assert     pattern.match("01912365934")
assert not pattern.match("00412365934")
assert not pattern.match("01412365934")
assert not pattern.match("10912365934")
assert not pattern.match("11912365934")
wise cargoBOT
vocal basin
#

[0-9] we can simplify as \d

#

!e

import re

pattern = re.compile(r"01[5-9]\d{8}")
assert     pattern.match("01912365934")
assert not pattern.match("00412365934")
assert not pattern.match("01412365934")
assert not pattern.match("10912365934")
assert not pattern.match("11912365934")
wise cargoBOT
somber heath
#

@errant laurel We're down here. πŸ™‚

vocal basin
sturdy terrace
vocal basin
#

@peak depot CERN-style

errant laurel
#

Oh come on

#

Can do anything

vocal basin
#

about the font

#
CERN

Former ATLAS spokesperson Fabiola Gianotti announces the change to Comic Sans (Video: CERN) Update 2 April 2014: Enjoy the April fool's gag? CERN's communications switched back from Comic Sans this morning. From today, all of CERN's official communication channels are switching to exclusive use of the font Comic Sans. The move comes after weeks ...

#

(1st of april but still)

vocal basin
#

Higgs boson announcement

#

in Comic Sans

vocal basin
errant laurel
#

How can count my chat?

#

Where?

vocal basin
#

server-wide is above the channels

#

iirc

#

on mobile

errant laurel
#

!count

vocal basin
#

!user in #bot-commands

#

!user

wise cargoBOT
#
Alisa Feistel (parrrate)

hypesquad_balance

User information

Created: <t:1483025965:R>
Profile: @vocal basin
ID: 264054779888533515

Member information

Joined: <t:1684108978:R>
Roles: <@&267630620367257601>

Activity

Messages: 52,557
Activity blocks: 8,285

Infractions

Total: 0
Active: 0

errant laurel
#

!excellent

#

!use

vocal basin
#

( it will tell you to use it in #bot-commands )

errant laurel
#

!used

vocal basin
#

user

errant laurel
#

!usering

vocal basin
#

you already have >50 anyway

errant laurel
#

!user

wise cargoBOT
#

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

vocal basin
#

and, quite surely, you already have more than 3 activity blocks

somber heath
errant laurel
#

I'm blocked

somber heath
#

Now leave the voice chat and join.

errant laurel
#

I will just go to sleep..

#

It's already 12 midnight pst

rugged root
#

@gentle flint Drink it

#

Or add vinegar

#

Or both

#

Can you flush it?

#

Real time picture

#

Moving pictures

#

A talkie, if you will

errant laurel
rugged root
#

You're not showing up in the list

#

So I think you already left it?

#

@gentle flint Does your renter's insurance cover acts of stupid?

errant laurel
#

I'm new in the channel

rugged root
#

Welcome!

#

@gentle flint Don't lick it

#

The wires

#

The sediment is fine

#

It's not the volts that kill you

#

Why would you want a remote opened door

#

I feel like we're watching a found footage movie

#

He turns around and suddenly Slender Man

#

@somber heath Would you expect any less?

#

Well played

sturdy terrace
vocal basin
#

these do the same

re.compile(pattern).match(s)
re.match(pattern, s)
sturdy terrace
#

: )))

vocal basin
sturdy terrace
#

Thank you very kindly.

vocal basin
vocal basin
#

@rugged root have you worked with the regex crate?

#

in Rust

rugged root
#

I'd compile it ahead of time rather than each time the function is called

#

Not the regex one, no

vocal basin
#

do you at least know that it's quite different from what Perl/Python use?

rugged root
#

I could swear there was another one...

#

I do, yeah

#

Wait the syntax is?

#

I thought regex syntax was more or less standardized

vocal basin
#

Rust's regex is more limited

rugged root
#

THAT I didn't realize

#

@somber heath See previous found footage comment

vocal basin
#

iirc POSIX regex is very limited compared to Python/Perl too

#

Perl has the most advanced one out of popular languages I think

#

but then again

#

it's Perl

#

the whole language is a regex

#

Rust regex is guaranteed to finish in linear time

#

O(MN) where M is pattern size and N is string size

upper basin
#

I'mma go eat din din.

rugged root
#

This is going to drive- oh nevermind it was for serialization

#

Ignore me

upper basin
#

All work and no food makes A.C.E a silly goose.

vocal basin
#

thus losing the performance

rugged root
#

Not sure if that's helpful

#

@tepid mantle Yo

#

@gentle flint And likely a lot of mold and mildew

#

A singular big toe

#

They're kind of cute

#

They don't really hurt anyone

#

@sage basalt Yo

#

f

sage basalt
tepid mantle
sage basalt
#

tell him to make a steak with those creatures

rugged root
#

Uhhhhh

#

Sure?

#

!stream 425552190283972608

wise cargoBOT
#

βœ… @peak depot can now stream until <t:1726073370:f>.

rugged root
#

Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

Nice

#

Same

#

@peak depot You don't know my hole

sage basalt
rugged root
#

Of course you do

sage basalt
#

solves world hunger

rugged root
#

@gentle flint They only sell white bread

#

Napkins?

#

@sage basalt ... what?

#

Put kids in the basement?

#

I'm both confused and concerned

#

@somber heath Orange cats are especially derpy

#

Cats love rectangular things

sage basalt
rugged root
#

That came out of nowhere. What promped you to say that again?

sage basalt
#

the creatures are just some kids

rugged root
#

Gooooootcha

#

I'm still banking on Slender Man

sage basalt
#

yo stay away from ma homie

#

boy slendi is CHill

rugged root
#

@gentle flint That just sounds like getting super powers

#

Today we're going to pick a nose

tepid mantle
somber heath
#

@vestal zenith πŸ‘‹

tepid mantle
#

well thats a fun effect

sturdy terrace
#

can anyone tell me how I can fit the variables email and phone?

rugged root
#

I think you need to move the phone = line above the match just above it

#

This?

#

Google

#

That's an etsy one, though

#

If you look in the middle it's just flipping a usual switch

#

@tepid mantle Yeah it's just a panel cover over a regular one

tepid mantle
#

not cool enough

gentle flint
#

insurance would never let you use an unprotected original one

rugged root
#

@sturdy terrace Swap these two lines

upper basin
#

!code

wise cargoBOT
#
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.

sturdy terrace
#

import re

def main_menu():
    print('Main Menu')
    print('1. String Operation')
    print('2. Number Operation')
    print('3. Exit')


def emailValid(email):

    if re.match(r'[^@]+@[^@]+.[^@]+', email):
        return True
    return False

def phoneValid(phone):

    if re.match(r'01[5-9]\d{8}', phone):
        return True
    return False

def main():
    while (True):
        main_menu()
        choice = input('\nEnter choice(1, 2 or 3): ')
        match choice:
            case '1':
                print('\nThank you for choosing String operation.')

                while True:
                    rchoice = input('Choice (1-> EmailValidation, 2->PhoneValidation, 3->Exit): ')
                    match rchoice:
                        case '3':
                            break

                    match rchoice:
                    phone = input('\nEnter a valid phone number: ')
                        case '1' if phoneValid(phone):
                            print(f'\nProvided phone number [{phone}] is valid!')
                            break
                        case _:
                            print(f'\nProvided phone number [{phone}] is not valid')

                    match rchoice:

                        case '1' if emailValid(email):
                            print(f'\nProvided email address [{email}] is valid')
                        case '2':
                            print('\nInvalid Input !!!')
                            break
                        case _:
                            print(f'\nProvided email address [{email}] not valid')
            case '2':
                print('\nThank you for choosing number operation.')
            case '3':
                print('\nThanks for using switch statements')
                break
            case _:
                print('\nInvalid Input!!!')
main()

whole bear
#

Hello can i please get unmuted from 14 days voice mute duration?

#

It's too harsh and strict i need to learn python fast

rugged root
#

Oh I thought you were going to ask about the Python help you needed

whole bear
#

Oh xD

#

Its too much stuff

#

Would tire my fingers out from too much text haha

rugged root
#

I'm not going to make an exception on the mute. Otherwise what's the point of it. It does say in #voice-verification not to spam to get verified

#

I know it sucks, but if you don't read the rules....

whole bear
#

Yeah i admit it i am really sorry

#

I should've paid more attention

rugged root
#

It's easier to help via text anyway

#

Just ask one thing at a time, we can go from there

whole bear
#

I'll join from another account maybe?

#

Yeah that's smart

rugged root
#

IF you decide to do that, both accounts will be banned

#

Infraction invasion is something we take seriously

#

On top of that, you'd still have to wait 3 days and do the 50 messages

#

So....

whole bear
#

I mean i wouldn't decide it the idea popped up in my head. But how will you find out the account

rugged root
#

Just... ask your Python questions

whole bear
rugged root
#

The more time you try to get a way out of this, the more time you're not asking for help

whole bear
#

Yeah ill do as you say i wouldn't wanna cause problems

rugged root
#

I try not to be an asshole

#

Just trying to help

whole bear
#

So as a python beginner, who just knows fundamentals, but i haven't done any serious projects. Should i move on to learn intermediate/advance python or should i just stick to beginner to master it.

frozen owl
#

day 2 of cs

whole bear
#

Like i just tried to do something and i found out that i have forgotten 30% of what i learned

#

But i remembered from internet

rugged root
#

So you're trying to get over that beginner/intermediate hump?

frozen owl
#

found out about negating binary

#

mind is blown

#

ok why does sign magnitude exist

#

it sounds so stupid

rugged root
#

Are you familiar with stuff like classes and what not?

frozen owl
#

shit it's raining in the uk too

quartz beacon
peak depot
whole bear
#

I've heatd Not tho

rugged root
#

@gentle flint What with the hand crank?

whole bear
#

But i dont know how it works

rugged root
#

As in how to use not?

quartz beacon
whole bear
#

Yeah

rugged root
#

We'll start there

whole bear
#

Okei

#

And also

rugged root
#

So you're familiar with == and != right?

whole bear
#

I am with == as for if statements. != i learned that one but i forgot lol

whole bear
#

I started 1 week ago to take it seriously

rugged root
#

The gatling

frozen owl
#

"never shake thy gory locks at me"

rugged root
#

!e
!= means not equals. So it checks the two values and sees if they equal the same thing. If they aren't, then it's true:

print(3 == 4)
print(3 != 4)
wise cargoBOT
whole bear
#

Ohhh ok

#

So could we apply it to vars?

rugged root
#

!e
Exactly

ham = 3
pork = 4
print(ham != pork)
wise cargoBOT
quartz beacon
rugged root
#

So the not keyword will take a boolean and flip it

rugged root
#

Whenever you do a value comparison (like we just did with == or !=), it evaluates it and will convert it to a boolean. Using not, we can flip it

whole bear
rugged root
#

Close. You'd flip it

#

Like how you'd say it in English

#
if not running:
whole bear
#

Ohh yeahh

#

Now i remember itt

rugged root
#

@quartz beacon It's a subject you don't like talking about it, and yet you are

whole bear
#

But what about "what"

rugged root
#

As far as I know there isn't a what keyword

#

Oh also, in Discord you can do little code blocks

wise cargoBOT
#
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.

whole bear
#

Didn't you mention not and what?

rugged root
#

If I did I didn't mean to

whole bear
rugged root
#

I've been mistyping a lot of things lately

#

Very tired

whole bear
rugged root
#

Yeah yeah

whole bear
somber heath
#

!e py import keyword print(keyword.kwlist)

rugged root
#

Are you familiar with is?

wise cargoBOT
# somber heath !e ```py import keyword print(keyword.kwlist)```

:white_check_mark: Your 3.12 eval job has completed with return code 0.

['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
quartz beacon
rugged root
quartz beacon
whole bear
#

''' print

#

Oops

#

Im on phone xD

rugged root
#

Oh yeah that's going to complicate it

#

It's a backtick character

#

Usually shares a key with the ~ character

#

@gentle flint That's insane

#

Actually

#

@quartz beacon Genuinely what would be the honorific on that

#

Like as opposed to Mr, Mrs...

#

I'm trying to learn

quartz beacon
#

Dr

#

πŸ˜‚

#

i don't use any

willow light
#

On the road, having lunch at the halfway point

rugged root
#

@gentle flint Twas a joke

whole bear
#

''' print(123)'''

rugged root
#

Yeah it'll be easier on a computer

#

Don't worry about it

whole bear
#

Okok

#

Thanks for the tips Mr. Hemlock

#

Also if you could answer me on one question

rugged root
#

Shoot

rugged root
#

Are you familiar with other programming languages?

#

I know you said you started a week ago

#

This isn't a slam. Usually if you know other languages, each language you learn after that gets easier and easier

willow light
#

Can confirm. I know matlab, python, fortran, and now go.

rugged root
#

But I personally think a week is a bit short. Things like the != and not are pretty important, so I'd focus on getting a stronger grasp on the fundamentals. Those will be your foundation from here on, so making sure you're confident in them can make a world of difference

#

I'm happy to make little assignments for you to do if you feel like you want to get a better grasp on a particular topic

whole bear
# rugged root I know you said you started a week ago

My fathers friend is very big data engineer or something and he gave me pirple course on python. I learned it output and input, from that point it gkt boring, the guy would explain one function 90 times. So i abondened it and started learning from youtube, this part really confused me because on one bit i would re-learn fundamentals and the other bit i'd try to learn OOP and machine learning. I am just confused man

rugged root
#

Understandable

whole bear
#

It's because i abandoned that course in the first place and when i got back i knew some things and some not, it was hard to separate which one i had to skip bc i new and which one to focus on

rugged root
#

So I find reading things better for me personally

#

I can go at my own pace

#

I'd start thumbing through that one and asking questions here if you get stuck or need something explained

#

We're as much of a resource as that book is

#

!resources We also have a bunch of other resources listed on our site

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

whole bear
#

Yeah honestly i have tried reading and i noticed it is significantly better than watching this courses

#

They just bore me out

rugged root
#

The beginning stuff is going to be boring

#

No two ways about it

whole bear
#

Im a man of science and philosophy. I get bored from this guys saying same thing 66 times

rugged root
#

But you just have to push through. Find little ways to make it interesting. As you're reading, have a terminal open. Try the things there, play with them, try and break them or find other things to do with them

whole bear
rugged root
#

That's the best advice I can really give. Engage with it not just through reading, but through hands on

whole bear
#

I'd love to hear your story.

rugged root
#

It's boring as hell, trust me

whole bear
#

How did you got into programming with Python?

still herald
#

I hate you guys

rugged root
#

Curiosity. I went to college for a CIS (Computer Information Systems) degree. Due to moving around with family, I've gone to 6 different colleges across 3 different states over the course of about 3 or so years. I got my associate's, which was a transfer degree more or less, and then I just broke.

But in that time, I learned programming through school (Java being the first language I learned, as well as Visual Basic and some C#). I didn't really do anything with it for... I guess 5ish years? Then I hung out on the Incremental Games server, got the itch to start coding again, found Python, never looked back

#

Now, one thing I will say is that I'm not in the industry. I do IT for an accounting firm. Coding is a hobby for me, just for fun

#

Like I said, boring as hell

stark river
upper basin
#

Join back Pydad, miss your company.

rugged root
#

I'm going to have to head out shortly. Need to take Joi to some doc appointments

#

Probably won't be back until tomorrow

whole bear
#

Wow i found a lot of simillarites with you. I also go to IT collage. I am 16, and yet so desperate to learn coding fast. I have this one project in mind that i want to pull of.

upper basin
whole bear
#

But i feel like i have already failed because i dont know how to code. Feels like 16 Is too late for it

rugged root
#

Not at all

whole bear
#

I guess it's teenage issues xD

rugged root
#

There's people in their 30's and 40's out there beginning to learn coding

#

Yeah

#

There's always time to learn

#

For context I'm 34

stark river
#

it's just maths

rugged root
still herald
stark river
#

yes

rugged root
#

I'd say it's more just logic than math

#

Cause and effect

#

This leads to this leads to this

willow light
#

Logic and math are not mutually exclusive

rugged root
#

Sure, but I'd say the main emphasis is the logic

whole bear
#

Thanks for tutoring me Mr Hemlock. I greatly appriciate it. Sorry for making you hang here, i know you got stuff to do. Thanks

willow light
#

I thought the main emphasis was lambda calculus

#

Oh wait that's just haskell

rugged root
quartz beacon
rugged root
#

Alright, I'm hopping off. I'll see you folks later

stark river
#

c ya

willow light
#

Of all the days for the NOLA radar to be offline...at least the Lake Charles one works

willow light
#

Taking a brief break from I-95 for lunch. And of course the only good soda left in the US.

quartz beacon
#

@steep vortex

#

did you get killed by valve?

#

kjhnjsreihnt6osebhseotihsioe

stark river
#

i wonder if they changed it

#

bring back the coke in coca cola

frozen owl
#
<letter> ::= "A" | "B" ...
<word> ::= <word> | <word><letter>
#

i think?

willow light
#

almost showtime

#

Want to be a Member? Click here : https://www.youtube.com/channel/UCV6hWxB0-u_IX7e-h4fEBAw/join
Support the Chase here : https://shopnsc.com/
TeamDomHQ Discord - https://discord.gg/teamdomhq

Team Dominator is back in action with a live hurricane chase as Francine has rapidly intensified into a category 2 hurricane expected at landfall. Tornadoe...

β–Ά Play video
sturdy terrace
#

@verbal zenith
Can you please help me with a simple problem?
: )

frozen owl
#

todo!()

vocal basin
#

I'm installing neovim on the phone

#

haven't installed the lsp support yet

#

but at least it has syntax highlighting

#

a more colourful one than vim had

#

.any

#

it takes a predicate

#

first?

whole bear
#

What's that software may i ask?

vocal basin
#

as in .first

whole bear
#

Is it pydroid?

vocal basin
#

ah

#

you need Some or true?

#

when the predicate is true

#

.first

#

oh wait no I thought it was a thing

#

what am I confusing it with

#

that one

#

.find

#

I got first two letters right

whole bear
#

Alisa?

vocal basin
whole bear
#

Okay thank you Mis

vocal basin
#

@verbal zenith did you know that implementing Eq for T changes the be behaviour of Arc:<T>::eq?

#

it short-cuts on equal pointer

#

PartialEq isn't enough

#

Eq means self == self

#

^ which is not true for f64

#

!e

x = float('nan')
print(x == x)
wise cargoBOT
vocal basin
#

!e

x = float('nan')
print(x < 0)
print(x > 0)
wise cargoBOT
vocal basin
#

that's why f*s are neither Eq nor Ord

verbal zenith
#
    pub struct StringIterator {
        _string: Rc<str>,
        chars: IntoIter<MaybeUninit<char>>,
    }

    impl StringIterator {
        pub fn new(string: Rc<str>) -> Self {
            let chars = string
                .chars()
                .map(MaybeUninit::new)
                .collect::<Vec<_>>()
                .into_iter();
            Self {
                _string: string,
                chars,
            }
        }
    }

    impl Iterator for StringIterator {
        type Item = Value;
        fn next(&mut self) -> Option<Self::Item> {
            self.chars
                .next()
                .map(|c| Value::String(Rc::from(unsafe { c.assume_init() }.to_string())))
        }
    }
vocal basin
#

why MaybeUninit?

#

no it won't require

#

there is almost no reason to ever use MaybeUninit<char> instead of char

#

MaybeUninit<char> is just a potentially invalid char

#

this one was the one that had MaybeUninit

#

just to force unsafe when accessing it

vocal basin
#

they're both kind of ugly

#

you can go with an extreme solution of just having chars: Chars<'static> in there

#

with one unsafe block

#

and annotate safety everywhere

#

definitely have a minimal mod to have that thing in

#

so the scope for unsafe is limited

#

you need both the impl Iterator and struct itself hidden away in a mod

#

uh

#

there are ways

#

@verbal zenith I think it does nothing

#

but that safeguards against changes to std if those ever happen

#

@verbal zenith you can also just store Arc<str> and usize and increment (by 1~4 bytes) it on next

wheat ferry
#

nobody talking?

vocal basin
#

right now no one is

#

previously Haven was talking

wheat ferry
#

good, thougt my headset broken lol

vocal basin
#
next:
  s = s.get(index..)
  c = s.chars.next()
  index += c.len_utf8()
#

preferrably with correct syntax and not pseudocode

verbal zenith
#
let slice = &self.source[index..=index+4]
let c = slice.chars().next();
self.index += c.len...
vocal basin
#
let s = self.rc.get(self.index..)?;
let c = s.chars().next()?;
self.index += c.len_utf8();
Some(c)
#

why

#

it's O(1)

#

no

#

it has an iterator over &[u8] inside

#

green-ish underline means unused?

#

reminds of how VS proper has a lot of colours for highlighting code

#

maybe runtime error

#

or yield bits as booleans

#

Lisp levels of hackiness

#

true => [true]
false => []

#

@sweet sorrel there is quite a popular story about how they spent ~18 months on a new website, and on a first real test it took 10 minutes to load

#

well, actually, on first try it timed out; 10 minutes was after raising the time limits

#

talk to Oxide, they'll tell you just how correct your frustration with Dell is

#

yeah, if you need just a lot of space, Oxide's stuff isn't the way either

verbal zenith
vocal basin
#

.any => true
.find => Some

verbal zenith
#

i must have misspoke in what i wanted because that was it HAHA

#

i wanted short circuiting