#ot2-the-original-pubsta

652 messages · Page 2 of 1

somber belfry
#

click on uploaading an existing file

frozen shore
#

oh i can see it now

#

thanks

#

this is the link for the TakeABreak

#

right now the break is that it opens random cat videos from youtube. but i can change the code

somber belfry
#

Alright, I'll look into it tomorrow (currently 11.15 pm here and I'm writing some school stuff)

#

If you want a code review, don't hesitate to ask in #python-discussion or to claim a help channel

frozen shore
#

Ok

somber belfry
#

@frozen shore one change I recommend to the code is to put all the links in a list

#

and reference it by indexing

#

I like the idea of playing cat videos, very nice 👍

#

I'll try running the program tomorrow

#

one change I recommend to the code is to put all the links in a list
and reference it by indexing
give a thought over this

frozen shore
#

@frozen shore one change I recommend to the code is to put all the links in a list
@somber belfry i will try to do that tomorrow

#

Bc its 9.43pm in our country

somber belfry
#

okay 👌

frozen shore
#

@somber belfry try the code tomorrow for few hours, let it run in the background and tell that how did it work

rotund swallow
#

Hey could someone help me out here

#

so every time I open VSC it gives me this

#

and when I click on install

steel eagle
#

when you click on install?

worldly berry
#

when you click on install......

rotund swallow
#

this is what happens when I click on install

steel eagle
#

is this mac?

rotund swallow
#

yes

steel eagle
#

yeah I got no help for that unfortunately'

rotund swallow
#

😩

#

this sucks

worldly berry
#

mac == trash

steel eagle
#

not really a helpful input my friend

worldly berry
#

linux == 👼

steel eagle
#

no reason to start platform wars

somber belfry
#

yeah

worldly berry
#

i gues

somber belfry
#

It's not like all apps work on linux OOTB either

steel eagle
#

every platform is a tradeoff

rotund swallow
#

if anybody knows how I can fix that, then please happen to ping me !!!!

somber belfry
#

Consider using a different editor/IDE or try reinstalling it

#

@rotund swallow Is VSC unusable because of this issue or are you able to code if you press cancel

rotund swallow
#

i can code but like every 20 seconds that pops up

somber belfry
#

Consider using a different editor/IDE or try reinstalling it

steel eagle
#

or better yet

#

search for the comand line developer tools

#

and install them manually

#

I'm sure it's just a quick google away

rotund swallow
#

k i will try thawt

tranquil ridge
worldly berry
tranquil ridge
#

no

#

that thing sucks

worldly berry
#

logo_vscode + logo_vim

tranquil ridge
#

consumes 2 gigs of ram for me

storm birch
#

amateur numbers

tranquil ridge
#

sublime and vim's ram isnt even in mb

rotund swallow
#

sublime doesn't even have a debugger

storm birch
tranquil ridge
#

...

rotund swallow
#

mine as well

storm birch
#

mada mada

tranquil ridge
#

dude, i only have 3.3 gb of ram

steel eagle
#

how in the hell haha

#

with 4 heavy projects open my VS code doesn't even use 2GB

storm birch
#

haha, rip, we need to get you more ram

#

tbh I launched a game just for that screenshot

rotund swallow
tranquil ridge
#

nah its ok, i can work without any more ram

primal comet
#

what even is ram

#

and why do you download it

storm birch
#

really awesome mad-max-cosplays

worldly berry
#

Downloaded ram is soooo fast

#

it's great

full summit
#

how the hell does vsc consume 2gb of ram lol

rotund swallow
#

idk

#

that's what they said

next token
#

what even is ram
ram is obviously sheep with balls

rotund swallow
#

now I gotta find how to install command line developer tools

worldly berry
rotund swallow
#

😄

tranquil ridge
#

@worldly berry is that True 👀

steel eagle
tranquil ridge
#

but its hardware so def clickbait

worldly berry
#

what do you mean

#

the website legit says it totallydoesnothaveavirus

#

@steel eagle

dusk citrus
#

lol

jovial island
#

how the hell does vsc consume 2gb of ram lol
@full summit having AI intellisense extensions

#

like kite

full summit
#

ahh, i don't really find kite useful imo

tranquil ridge
#

because its electron

jovial island
#

nope

full summit
#

a normal electron app does not take 2gb of ram lol

tranquil ridge
#

every electron app for me consumes a lot of ram

jovial island
#

vscode is electron

full summit
#

sure, a lot, but not that extreme

jovial island
#

kite is .... just kite

next token
#

vs code only consumes ~200M for me. How many plugins do you have?

tranquil ridge
#

hmm

#

dunno though, i only have 3.3 gb ram, so i want to optimise my laptop as much as i can

next token
#

Discord takes like 600M for me, so I can bear 200M for vscode

pure rune
#

Discord uses 600m for you? it uses 750-900 for me 😒

primal comet
#

now what is m??

pure rune
#

m is m

primal comet
#

k.

pure rune
#

😛 I'm gunna wildly guess they like myself meant Mb and just typed m for the hell of it

somber belfry
#

Discord is using 410M rn

dusk citrus
#

ye electorn apps are ram digger

#

😆

median blade
#

discord at 550 rn

#

hmm

pure rune
#

oof my pi is running at 45.8c

median blade
#

pi?

pure rune
#

yes pi 4

median blade
#

pi 4 ?

pure rune
#

raspberry pi 4

median blade
#

ohh

#

ok

#

vscode takes 700 mb for me

#

lol

next token
#

My pi is running at 55.6c

#

Probably cuz I'm running a minecraft server on that

ancient whale
#

just pore some water on it

next token
#

Nah I'll just put it in a fridge

pure rune
#

I'm just running plex (not currently using, no one is) and pi-hole. But it jumped up 10c over a few days.

#

But it is hot as hell in here too x.x Hate it. We took out our ac already and I don't want a fan in the window

ancient whale
#

just pore some water on it
< 0 fishtank

#

how hard would it be to hook up a heatsink to it?

pure rune
#

to a fishtank?

ancient whale
#

na you'd use a filter for that

#

a pi

pure rune
#

Oh mine already has one and a mini fan but its still a spicy tamale

ancient whale
#

get one of those verticle sinks

#

idk what they're called

frozen shore
#

@me have you tried the code yet

#

@somber belfry

somber belfry
#

I will try it in a while

#

I'm completing some work for a class that I have in an hour

frozen shore
#

ok. try it when you can

somber belfry
#

alright, I'm running it atm

#

@frozen shore yep, it works 😄

frozen shore
#

good

somber belfry
#

I'm on linux btw, if you care about cross platform compatibility or w/e

#

I have a suggestion,
when the program is launched, it would be cool if it can give an indication of some sort.
A simple "started" printed to output will do.
Or you can even setup a banner which will display TakeABreak.py in ASCII art

frozen shore
#

i will think about that

#

thats good suggestion

storm birch
#

my pi 3 with case, heatsinks, fan, sits at a brisk 70C if in a cool place.

#

up to almost 85C when under load and out and about with me

somber belfry
#

Store the links in a list, and access them by indexing

ancient whale
#

im telling ya get a fish tank for it

somber belfry
#

@frozen shore whenever you find yourself just making a bunch of variable, you will probably need a list

rotund swallow
storm birch
#

just about more than 25

fluid plank
#

lmao

somber belfry
#

Fisher isn't wrong

#

But I do not want to declare him as right either

storm birch
#

well, that was an emotional rollercoaster

somber belfry
#

That is why you bury your emotions, silly

storm birch
#

its worked thus far

pure rune
#

saaaaaame

somber belfry
#

🙂

pure rune
#

WTF? University of California, can turn mercury to gold via nuclear reactions? o.O

storm birch
#

burying your emotions so you can prolong the amount of time before coping is **tight

#

pffft, what u kno bout dat actual alchemy

pure rune
#

ooh, its not profitable

storm birch
#

yeah, but wait wtf, alchemy is just real now

fluid plank
#

WTF? University of California, can turn mercury to gold via nuclear reactions? o.O
@pure rune but it uses a lot of energy right?

pure rune
#

they charge 200/hr to use the reactor, and it only produces 3/10 cent in like 20 hours I think they said

fluid plank
#

it aint alchemy though

storm birch
#

apparently literal alchemy was invented in 1941 whaaaat

round moss
#

I really don't think fusion/fission gold manufacture will ever turn a profit

storm birch
#

it aint alchemy though
if it walks like magic and talks like magic....

round moss
#

But it's cool and probably gets you grants

pure rune
#

let us believe T.T

round moss
#

If I was a grant decider dude, I would support "oh hey we make gold from not gold"

storm birch
#

I like how it is actual science to just blast a material with neutrons and now that thing is gold

pure rune
#

Still waiting for FMA to happen. I want a chimera!

storm birch
#

Still waiting for FMA to happen. I want a chimera!
@pure rune you had me in the first half haha

pure rune
#

I was gunna post the image but rules be rules

storm birch
#

I feel like if FMA had any lessons it is the real reward is the friends you made along the way dont f*** with chimeras

pure rune
#

XD

storm birch
#

additional lesson: no anime ever is above fan service, apparently

median blade
#

saiki k

#

above fan service

#

cuz its too small kek

pure rune
#

Omg, Four Seasons Landscaping is selling a sticker aptly named

Make America Rake Again
(their logo)
Lawn and Order

#

that is so perfect lol

storm birch
#

LOL, what. Are they a big enough brand for that to even be profitable? xD

pure rune
#

stickers are cheap, the hoodies are not lol

storm birch
#

very nice haha

somber belfry
#

alchemy is what lead to chemistry

#

people tryna alchem

frigid pollen
#

Alchemy is what lead to gold.

pure rune
#

Okay this some bs, I know 100% I cancelled my disney+ like 4 months or more ago and I just found out they been billing me because I got a notification

somber belfry
#

epic victory royale moment right there

unreal sigil
#

Could've been watching disney this whole time

frigid pollen
#

One assumes you kept your cancellation paperwork?

pure rune
#

Ya I have the email. I think it auto restarted when I accidentally hit the button for the app and it logged us I

#

Only thing I could think off

#

But it's okay because it goes on my CC each month and I lay it off every month

pure rune
#

Aww man I found a perfect meme about building a horse with programming and I can't share it here T.T

tranquil ridge
#

maybe you can since you created it, and i am bored

pure rune
#

Oh I didn't make it I found it but it's still awesome lol

tranquil ridge
#

i think its bad to randomly dump a meme while a convo is going on, ig one wont hurt? 🥺

pure rune
#

Nah it says in the rules no maymays which I get why but darnit lol

tranquil ridge
#

k

dusk citrus
#

👀

pure rune
#

Is your username in brail? XD

pure rune
#

Wait what, Alex Trebek died? :(

tranquil ridge
#

..\ /
👁️___👁️

frigid pollen
#

@jovial island As to your question, if you mean Minecraft, then yes, but I haven't played it in a long time.

full summit
storm birch
#

I dont get it. I think that would just be a C and a dead string for the rhythm. So with slap you would be hitting both the e and a strings, but muting the e and fretting a "c"

#

@full summit

zinc hatch
#

Is that a slap line? "x" is commonly used for muted/ghost notes as well.

next locust
#

can someone help me ?

full summit
#

it's a slap, yeah

next locust
#

in cmd how do you download module for python?

storm birch
#

in cmd how do you download module for python?
@next locust you should be able to do pip install module_name_here

next locust
primal comet
#

Panda3d

full summit
#

you have module in front of the command for some reason

#

you should omit that

next locust
#

sorry how should i do that

primal comet
#

omit meaning remove.

next locust
#

oh ok

full summit
#

i think i'm just going to skip the slap on that one for now

storm birch
#

Schlapp!

#

Just give it a good whack with your thumb and call it a day haha

next locust
#

i have install and updated pip and pandas

#

but i am still get a problem

full summit
#

i think i'll just pluck it really hard muted lol

#

@next locust you probably have two versions of python installed

#

do python -m pip install pandas instead

next locust
#

yeah i get the same error

#

when i run the script

full summit
#

odd

wheat aurora
#

@next locust what OS are you on?

next locust
#

windows

wheat aurora
#

Can you do py -0p in cmd?:

next locust
wheat aurora
#

Okay, so let's focus on python 3.8 since I know pandas has a binary for that.
py -3.8 -m pip install pandas
and then
py -3.8 yourfile.py

next locust
#

thanks it's working

wheat aurora
#

whoo!

final sable
#

@wheat aurora wait so, py -0p displays all python versions installed and all their paths?

neat light
#

Yep, py is a windows only thing though

final sable
#

And for linux?

#

python?

wheat aurora
#

I'm not certain what the linux equivalent is unfortunately

final sable
#

That's okay, at least I learned something new today

neat light
#

Yeah I'm not quite sure of a linux equivalent, whereis python could help give you an idea of the python installations you have though.

#

I use pyenv which is quite nice for being able to manage and switch between python versions

supple olive
#

Env is what makes me end up wanting to go back to compiled language

#

Tbh

#

Everything else I love about python just the virtual environment need to keep everything aligned

round moss
#

honestly, I have a lot more pain compiling things than I have dealing with python envs

pure rune
#

woot got a job 99% sure, just gotta pass a background check

supple spindle
#

Nice!

#

Something programming related or completely different?

worldly berry
#

Nice!

pure rune
#

I applied for 2 dominos location, they both called thursday the same day I applied. Told the second one, the other store called and I wanted to give them priority. Well the manager was supposed to call me from store 1 since they got busy, he hasn't so I went to the sister store, store 2(same franchise) and just got a conditional offer as long as the background passes.

its a delivery position which is okay since I just need some money coming in and he knows I am in college for BS in Computer Science and plan on going to a job for it.

#

I've done delivery before so its fine, sucks I wanted a remote programming related job but I need money

#

and this is a college town (6 to be exact) and the tips are good here

supple spindle
#

Ah, yeah. As long as it’s works for you (pun intended), it’s nice

pure rune
#

Yeah, I am still going for a programming gig though

supple spindle
#

Reasonable. Maybe you could do some freelance work on the side

pure rune
#

Plan on it for sure :)
Just happy I got something. I know the check is going to clear so its a shoe in

supple spindle
#

Yep! That’s what matters the most

#

Considering how many people need to have things programmed nowadays, you should be able to find some things if you just put some effort into your portfolio and making sure you seem reliable

pure rune
#

Yeah thats why I been developing the programs I have been. To showcase something too.

#

But I keep getting these stupid issues I seem to get stuck on lol

supple spindle
#

Ah, yeah. We all get stuck on seemingly stupid issues. That’s just how it is. With practice, you’ll just get new stupid issues to solve, as well as some other types of issues

#

The entire field of programming is just trying to solve problems. Most of life actually is

pure rune
#

Yeah and I hope I just possibly figured out the easiest way to solve it too maybe

supple spindle
#

Yep. That’s just a matter of experience as well. And often times someone has already written code for that exact application before, so there shouldn’t alway be a need to write everything from scratch

#

That’s another nice thing with python — the amount of available packages for doing literally anything

pure rune
#

its probably an easy fix to but one I never had to do/use/taught so I have no clue to way to phrase or do it lol. But we will see what general says

supple spindle
#

Yep

storm birch
#

woot got a job 99% sure, just gotta pass a background check
@pure rune niiiiiiice,, hopefully they find ~0 felonies LOL

nova ember
#

@short cliff soooo, what are the motivational posters about?

pure rune
#

I think they will find 0 lol

#

Also @storm birch that tuple you helped me with, how can I unpack the results and send the results to another function XD

nova ember
#

You could unpack tuples like this:

#

!e ```py
foo = ("foo", "bar", "baz")
def spam(a, b, c):
print(a, b, c)

spam(*foo)

clever salmonBOT
#

@nova ember :white_check_mark: Your eval job has completed with return code 0.

foo bar baz
nova ember
#

@pure rune have a look at this. The last line is what is relevant here

#

You’re unpacking it and passing the values as arguments

#

(I didn’t quite get to “eggs”)

pure rune
#

So I assume I would need to use a nested function to pull this off so like

def somefunction():
  dothis
    dothistoo
return dothis, dothistoo
  foo = ("dothis", "dothistoo")
  def pass_foo(val1, val2):
      dothis3
pass_foo(foo)

? if I indented right

#

I think, I may misunderstanding

nova ember
#

I’m on mobile, so it’s slightly hard to see. Maybe @storm birch knows

#

I saw him lurking here

storm birch
#

I dont remember which tuple this is, but you can also unpack with foo, bar = (1, 2)

nova ember
#

But the point is that you can unpack the tuple using *

#

That too

storm birch
#

I'm also on mobile rn LOL

pure rune
#

I hate that my class was an intro and didn't go deeper

#

@storm birch

def input_expense_item() -> tuple:
    """
    Prompt the user to enter an expense type, and the amount for the expense
    :return: Tuple - expense type, amount
    """

    expense_type = input("What is the expense item?\n").capitalize()
    cost = None

    # must ensure that the user provides a valid number! In this case, a valid decimal!
    while not cost:
        temp = input(f"How much was '{expense_type}'?\n")

        try:
            cost = float(temp)

        except ValueError:
            print(f"{temp} - was an invalid entry. Please make sure you entered a valid number")

    # This is how to return a tuple. This means you can assign two variables when calling this function as seen below
    return expense_type, cost
    ```
was the tuple you helped me with
storm birch
#

Lol, we are all here to help though, so it is ok xD

nova ember
#

Always

storm birch
#

Hopefully what we said helps, I am walking my dog and code is impossible to read on mobile. I can be more helpful later LOL

pure rune
#

and I been trying since yesterday afternoon to get those results sent as separate values to pass into another function

#

I hear ya XD

ancient whale
#

why can't you unpack them into the functions?

nova ember
#

You can

ancient whale
#

or return the fuction with the arg

nova ember
#

Like the * thing I showed earlier

#

I should start calling that the Van Gogh operator

#

starry night

pure rune
#

so instead of the

return expense_type, cost

do like

return input_expenses_item(expense_type, cost)

?

ancient whale
#

what does input_expenses_item() look like?

pure rune
#

I hate that my class was an intro and didn't go deeper
@pure rune

#

oops it didn't copy it

#
def input_expense_item() -> tuple:
    """
    Prompt the user to enter an expense type, and the amount for the expense
    :return: Tuple - expense type, amount
    """

    expense_type = input("What is the expense item?\n").capitalize()
    cost = None

    # must ensure that the user provides a valid number! In this case, a valid decimal!
    while not cost:
        temp = input(f"How much was '{expense_type}'?\n")

        try:
            cost = float(temp)

        except ValueError:
            print(f"{temp} - was an invalid entry. Please make sure you entered a valid number")

    # This is how to return a tuple. This means you can assign two variables when calling this function as seen below
    return expense_type, cost
    ```
ancient whale
#

what are you returning to tho?

#
return input_expenses_item(expense_type, cost)```
that's going to give you some funky recursion that im assuming you don't want
pure rune
#

Ah sorry it returns to this (sorry Fisher I had to modify it for readability)

while True:
    menu_option = input("What option do you want to do?\n" 
                        "1: Enter deposit\n"
                        "2: Enter cash on hand\n"
                        "3: Enter expenses\n"
                        "4: Monthly Deposit Total\n")
    
    if menu_option == "1":
        deposit_amount = deposits()
        #total_money += deposit_amount
        budget_buddy.insert_deposits(deposit_amount)
        
    elif menu_option == "2":
        cash_amount = cash_on_hand()
        #total_money += cash_amount
        budget_buddy.insert_cash(cash_amount)

    elif menu_option == "3":
        #new_expense_type, new_expense_amount = input_expense_item()
        #print(f"The user wants to add {new_expense_type} for ${new_expense_amount}")
        expense_type, cost = input_expense_item()
        budget_buddy.insert_expenses(input_expense_item)
        #Code below was used previously, attempting changes but keeping the code just in case for a fall back 
        #current_balance = balance(new_expense_amount) + cash_on_hand()
        #total_money = current_balance
        #print(f"Total balance is ${total_money}")
    
    elif menu_option == "4":
        budget_buddy.monthly_deposit_total()
nova ember
#

!paste By the way, maybe try using this

clever salmonBOT
#

Pasting large amounts of code

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

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

pure rune
ancient whale
#
return budget_buddy.insert_expenses(input_expense_item)```?
#

idk how you've got it setup that might not work

pure rune
#

I've been actively changing it to try and make it work so variables are odd.

Oh sorry, I have two separate files, one is only database things, the other is functions that get passed to the database

#

and I just import the main program with the database functions, to the functions_for_BB

#

I wanted it this way so that it was not as huge of a file

ancient whale
#

ah I thought maybe it was a class instance

#

what're the params for budget_buddy.insert_expenses?

pure rune
#

So honestly my whole issue is getting that tuple up yonder, to pass into the second file (the paste.pythondiscord link) function so I can store it into the correct parameters in the DB

ancient whale
#
return input_expenses_item(expense_type, cost)```

that should work then

#

unlesssss you need expense_type, cost for smthing else after you insert it

pure rune
#

Nah I shouldn't

ancient whale
#

also I'd suggest doing smthing like:

cost = -1
while cost <= 0:
  temp = input(f"How much was '{expense_type}'?\n")
  try:
    if cost <= 0:
      raise ValueError
    cost = float(temp)
  except ValueError:
    print(f"{temp} - was an invalid entry. Please make sure you entered a valid number")```
unless negative values are acceptable
pure rune
#

Or would it be easier to just import the functions_for_BB into budget_buddy and unpack the tuple results in the function

ancient whale
#

I mean you could, you're not really doing anything after you get the input

#

also this seems redundant

    insert_expense_name = exptype
    insert_expense_amt = amount
    multi_expense_insert = insert_expense_name, insert_expense_amt```
pure rune
#

hmm, changing the return value actually gave a typeerror

File "F:\Documents\GitHub\Budget_buddy\functions_for_BB.py", line 43, in input_expense_item
return input_expense_item(expense_type, cost)
TypeError: input_expense_item() takes 0 positional arguments but 2 were given

ancient whale
#

insert_expenses not input_expense_item sorry

pure rune
#

Ooh that? I've had issues with sqlite3 not accepting more than 2 commands, so if I don't have the multi variable, the

conn.execute(stuff to do here)

does not work if I do more than 2 variables

#

I've tried it, and my professor helped as well

ancient whale
#

conn.execute(insert_expense_command, (exptype, amount)) that doesn't work?

pure rune
#

It didn't before when she was helping me understand sqlite3 before. When we were trying to pass 3 commands to execute it gave an error

#

but if we condensed 3 commands into 2, and passed those 2, all 3 operations got carried out

ancient whale
#

well lemme preface this with the fact that my sql knowledge is non-existent

pure rune
#

same with mind besides what I have done, which is the problem. I may be jumping in the deep end without learning to swim first

ancient whale
#

but if you're bundling exptype and amount into a tuple beforehand, it should be the same as passing both at the same time as a tuple

#

like regardless you're not passing 2+ commands, you're passing the command + a tuple

#

im assuming you'd get an error if you tried conn.execute(command, value1, value2) tho

pure rune
#

I can't get that far because I keep getting type errors before it can actually pass the tuple over for the conn.execute

ancient whale
#

TypeError: input_expense_item() takes 0 positional arguments but 2 were given
that one?

pure rune
#

well it changes based on what I try but it is the same spot

` File "F:\Documents\GitHub\Budget_buddy\functions_for_BB.py", line 83, in <module>
budget_buddy.insert_expenses(input_expense_item)

TypeError: insert_expenses() missing 1 required positional argument: 'cost'`

#

I did ask on StackOverflow yesterday and one person responded with this

input_expense_items returns a tuple, which is one "object", therefore, nothing is being sent to amt when insert_expenses is called. The tuple represents the exact object needed for the placeholder argument to execute. If insert_expenses takes one argument, the parsing steps can be eliminated and the argument variable will be the second arg to execute.

which made me think I had to unpack it

ancient whale
#

well either you return the values and unpack them to send to insert_expenses, or you return insert_expenses with the values already unpacked

pure rune
#

thats what I been wanting to do, was return unpack and send them

#

but we never touched on that and is my issue that I been trying to understand how to fix

ancient whale
#

item, amount = input_expense_item()

#

insert_expenses(item, amount)

pure rune
#

so the first portion would be right after the initial return in the
input_expense_item function?

return expense_type, cost
item, amount = input_expense_item()

and the second bit would be in the second file?

ancient whale
#

I think so?

#

you see what I mean by returning insert_expenses(expense_type, cost) tho?

pure rune
#

I believe so

ancient whale
#

that might not be viable if you need the values tho ¯_(ツ)_/¯

pure rune
#

I appreciate the help but I am still lost. I think I am done with it for tonight again, its starting to upset me now

storm birch
#

@pure rune sorry, I just freed up, haha, yeah once it becomes frustrating it is always time for a break. Feel free to @ me next time you need help as well and we can figure it out, haha

pure rune
#

Will do, it probably wont be until tomorrow tho because I haven't even ate all day and got to pick up Clair

#

err.. my wife. Im tired

jovial island
#

ohhhhhhhhhh

#

OHHHHHHHHHHHHH

#

no personal info here bro

pure rune
#

Keeping tropical fish at home can have a calming effect on the brain

due to all the indoor fins

somber belfry
#

🥁 🤦‍♂️ 😂

storm birch
#

LOL, cool wife name reveal

#

also: great pun LOL

pure rune
#

dude I am so damn tired its not funny xD
heat+no food all day == stressed/tired
we just had food finally but still tired af

storm birch
#

not a good day :C not a good day to code, lol

pure rune
#

no its not but I was fine until a few hours ago when I was stonewalled with the tuple issue

jovial island
#

yes sir

pure rune
#

actually have friends on my colleges discord looking at it too to help see whats going on. I really do think its a simple issue that I am being dumb about

#

all I know is I don't think I wanna mess with databases after this. I'll either be stupid faster with them or be smarter with them

storm birch
#

Db is a good skill. I never enjoyed messing with them.

ORM is the easy way to go haha

pure rune
#

yeah I mean when this is all said and done the program better fricken work or else I'm lighting it on fire

jovial island
#

hi

oblique scroll
#

hi

pure rune
#

Hey @storm birch this part here

def input_expense_item() -> tuple:

what is the -> doing?

wintry grove
#

How anyone here used clara.io to get 3d models? Is it safe/trusted?

worldly berry
#

@pure rune I think it means that it will return a tuple

pure rune
#

kk!

storm birch
#

yeah, that is called return hint or return annotation, it is new to python

steel eagle
#

relatively new at least

#

I think 3.5?

ancient whale
#

I think it means that it will return a tuple
to clarify, it doesn't have to but your ide'll be screaming

jovial island
#

wha is the ->

steel eagle
#

a type annotation for the return type of the function

ancient whale
#
def function(value1: value1_type_hint) -> return_type_hint:
  ...```
jovial island
#

ok

steel eagle
#

it basically says "I'm going to return an integer"

#

but as import says, it's only an annotation, it doesn't have any actual effect, it's visual only, so they're not guaranteed to be correct in any code you read

fluid plank
#

it is like a comment right?

ancient whale
#

basically

steel eagle
#

sort of

#

though, they CAN be accessed

fluid plank
#

ah like a doc string

ancient whale
#

of sorts

steel eagle
#

certain libraries, such as Discord.py, and I believe APIStar actually use them

wintry grove
#

I'm addicted to type annotations.

fluid plank
#

it is good to annotate

steel eagle
#

For example, in discord.py if you write a command using the commands extension, and annotate an argument as an int

#

your actual variable will be an int in the function

#

not a string

#

and it will throw an error if it can't convert it

fluid plank
#

i see so thats its other uses hmmm.

steel eagle
#

this makes for really neat features, such as if you have an argument annotated as "discord.Member" in a command

#

you can use any of the follwing:
@steel eagle
674438327927308358
Pythonic Wolfie
Awoo#6864

ancient whale
steel eagle
#

and it will still give you the member object

#

Nope, no conversion. But there's a way to access the annotation. I don't know how, I've never had a use for it personaly

#

I just know some stuff uses it to great effect

ancient whale
#

this makes for really neat features, such as if you have an argument annotated as "discord.Member" in a command
I'm like 100% sure that's not because of annotations

fluid plank
#

i think i remembered Fisher giving an example of type annotation but i cant remember where in our server, idk if that was an example or a code refactor or something

limber pollen
#

discord.py itself reads annotations for conversions, vanilla Python does not

fluid plank
#

he imported something in discord.py and added after ->

steel eagle
#

I'm not talking about converting in vanilla python

#

I'm saying that you CAN use them

#

for cool things

#

and the example I'm most familiar with is discord.py

ancient whale
#

I remember talking to someone about the type check decorator

pure rune
#

Hey Mr @storm birch is that offer from earlier still on the table? I think I am getting close, and wondering if assigning the tuple values as global variable would work

storm birch
#

lol, of course

pure rune
#

crap I cant share

storm birch
#

lolol, only I have sharing privileges muhaha

pure rune
#

okay how about this

somber belfry
#

why do you wanna share screen?

steel eagle
#

Ya'll heard of Anvil?

#

I'm using it to build a little webapp take make character sheets for the TTRPG system I'm making

#

because I'm absolutely incapable of writing html/css/javascript myself

somber belfry
#

Ya'll heard of Anvil?
@steel eagle no, and googling it isn't giving me appropriate results because of its generic name xD

#

ah

Anvil | Build Web Apps with Nothing but Python
anvil.works
Anvil is a free Python-based drag-and-drop web app builder.

steel eagle
#

yeah should've been a bit more specific

#

to find it myself (I heard of it on a podcast) I had to google python anvil

#

though this system is very nice, it still has its weirdness

#

such as being forced to use a light editor

pure rune
#

I propose a rank increase for @storm birch for his outstanding support. My head doesn't hurt now and it was a easy fricken fix

storm birch
#

LOL, yes, I can be promoted to helper+ now xD

somber belfry
#

helper pro™️

pure rune
storm birch
#

no worries, never be afraid to ask for help. There is an army of people here willing to help haha

pure rune
#

like I said in the voice chat, I even thought it was a stupid easy fix and it was x.x

storm birch
#

haha, it usually it tbh

pure rune
#

but it took hearing it for me to get it x.x

#

Also thank you too @nova ember because you helped as well

#

and anyone else who helped, sorry if I didn't @ everyone who helped, I can't exactly remember and still really tired x.x

storm birch
#

vest is great haha

#

well, I would say that of most people here, but still

devout loom
#

@wicked hollow it is small - it's a small sql query

#

Trying to get users that have 2 or more orders:

select count(orders) as orders_count, users.id, users.name
from users
         inner join orders on users.id = orders.user_id
group by users.id
having count(orders) >= 2;
#

I have one question

#

why can't i user orders_count in having clause?

wicked hollow
#

that's just the way the scoping rules work, I suppose.

devout loom
#

🤔

#

I'm watching a youtube video and guy in it uses it that way

wicked hollow
#

that may depend on the particular SQL dialect

devout loom
#

I use postgresql

wicked hollow
#

is that what the video is using, too?

devout loom
#

Either postgres or mysql since he used both

rotund swallow
devout loom
#

@rotund swallow Thanks, will try to ask this question in that community

wicked hollow
#

Beyond my expertise, I think. 🙂

rotund swallow
#

np

storm birch
#

so much inheritance O.o

rotund swallow
#

not the python one, I am named after the book series

#

inheritance

#

loverly book

tranquil ridge
#

so much inheritance O.o
@storm birch you are awake O.o

devout loom
#

@wicked hollow Maybe there's a better way to get users that have certain amount of orders? 🙂

tranquil ridge
storm birch
#

it is not super late luckily

steel eagle
#

ignore that everything is too wide, the content that will displace it is not placed yet

#

however, this is more progress in an hour than I've made in days previously

storm birch
#

ohhhhh fancyyyyyyy

rotund swallow
#

@steel eagle what is that?

steel eagle
#

wip character sheet for a TTRPG system I'm creating.

storm birch
#

look slike D&D 😄

steel eagle
#

it's loosely based on D&D

devout loom
#

I'm sure it is D&D

storm birch
#

Loosely Based on D&D™️ is my favorite type of project haha

steel eagle
#

has some inspiration taken from D&D 5e, Pathfinder 2E, and Call of Cthulu

#

however, the system is mean to be very easy/fast to learn and play, and is extremely rules-light

#

it's all modular as well, there's no concept of classes or anything like that

#

there's a feature system and you use modular blocks to create characters

#

with some simple rules to ensure balance

#

the handbook for BOTH the players AND storytellers will be smaller than 1/5 of the D&D 5E player's handbook alone

jovial island
#

I'm watching a youtube video and guy in it uses it that way
@devout loom can sql be expressed in small case

steel eagle
#

at least, that's about the size it's looking to be right now\

#

"small case"?

jovial island
#

LOWERCASE

devout loom
#

it can

#

i mean IT CAN

steel eagle
#

but you just used uppercase

jovial island
#

.lowercase Lowercase

steel eagle
#

😂

jovial island
#

just the answer plz @steel eagle

steel eagle
#

in most cases, you can use lowercase for SQL expressions

#

however, in some rare cases, the specific system you're using might yell at you

#

since there are about a million and one different implementations of the language

#

it's one of the reasons I've never learned SQL, I hate it so much

devout loom
#

@wicked hollow As i understand it since having evaluates before select clause i can't use alias in it

wicked hollow
#

That's what I thought, but if it worked for the guy in the video there must be something more nuanced happening...

steel eagle
#

holy heck, though it's not as bad as CSS

#

getting things aligned is still a nightmare

unreal sigil
#

yes

#

my god

#

I swear to god whenever I try to align things in css

#

Like the next hour of my life disappears

steel eagle
jovial island
#

uh lol any girls on discord?

#

i have been pranked my like 7 ppl for this

#

😂

#

and @round moss congrats for the mod promotion!

round moss
#

thanks

pure rune
#

Yeah we use discord? Why is it so shocking xD

steel eagle
#

Yeah there are girls on discord. Lol

fluid plank
#

i dont get it

jovial island
#

I didn't even realized there are so many girls on discord until I mentioned them lol

pallid violet
#

I didn't even realized there are so many girls on discord until I mentioned them :lol:
@jovial island what do you mean ?

burnt ivy
#

Yeah there are girls on discord. Lol
@steel eagle whats a girl?

jovial island
#

girls dont exist

#

they are myth

#

😆

ebon ledge
#

xd

still dust
#

🦄 yes, we're like unicorns.

final sable
#

Maybe they're talking about people not being manly enough

still dust
#

what does it mean to be manly? o:

somber belfry
#

🦄 yes, we're like unicorns.
@still dust drinking your blood grants immortality? 👀

still dust
#

you'll never take meeee lemon_warpaint

somber belfry
#

That's what they all said

#

I'm the one having the last laugh at the ripe old age of 9878 😏

still dust
#

no if you drink my blood you end up like lord voldemort

somber belfry
#

yeah, a cursed existence

#

or something

still dust
#

sounds lonely 😦

somber belfry
#

/😔

still dust
#

-gallops away-

storm birch
#

wth happened in the 2 hours I was gone lol

#

do you guys ever get sad at the fact that if unicorns did exist, none of use would get to see them anyway because they would have been hunted to extinction? lemon_sentimental

final sable
#

Unicorns existed

#

And they were remorseless killers

#

That is a true fact

still dust
#

unicorns as we know them (i.e. lisa frank lolol) didn't exist. @storm birch , no, but now i'm sad after reading that 😢

storm birch
#

well, it is a good thing they arent real, or else we might be living in underground bunkers to stay safe from our unicorn overlords

still dust
#

well, they died from extinction because of climate change.

storm birch
#

oh thats true, so we were actually geniuses, not parasites on this planet bigbrain

still dust
#

keyword: were. LOL

jovial island
#

we were never parasites, thats an incredibly nasty way of looking at humanity

quaint summit
#

I mean....

#

IMO. life itself carries some fairly nasty traits. We all kill to survive. Our species happens to be the one in position of dominating everything, and thusly destroying it all as we are doing.

#

I dont think its a characteristic of humanity, but of life.

#

Quite nihilistic, I guess, but thats my view

zealous tide
#

what]

quaint summit
#

It also has some beautiful things obviously. But those things wont last forever and it will most likely be our fault.

zealous tide
#

yeha

#

what will earth be like

#

withhout

#

sun

#

or water

#

or tree

#

ss

#

or humans

quaint summit
#

It would last for a long longer, hurling through space

#

lol

zealous tide
#

lol

quaint summit
#

I think our species has the problem of any species that overpopulates itself into its own suffering.

#

Our species needs thishttps://masseffect.fandom.com/wiki/Genophage

Mass Effect Wiki

Genophage - Mass Effect Wiki - Mass Effect, Mass Effect 2, Mass Effect 3, walkthroughs and more.

#
The genophage was a biological weapon deployed against the krogan by the turians during the Krogan Rebellions. It was designed to severely reduce krogan numbers by "infecting" the species with a genetic mutation. 

The genophage's modus operandi is not to reduce the fertility of krogan females, but rather the probability of viable pregnancies: many krogan die in stillbirth, with most fetuses never even reaching this stage of development. Moreover, every cell in each krogan is infected, to prevent the use of gene therapy to counteract it. Though the genophage was not designed as a "sterility plague", the combination of a low frequency of viable pregnancies with the krogan proclivity to violence and indifference about focused breeding leaves the krogan a dying race, and soon to be extinct. 
#

We need something slightly less intense than that

#

To reduce our numbers but not kill us off

#

Maybe.... coronavirus?

shrewd lance
#

We're sorta capable of handling that on our own, because as quality of life rises, people reproduce less and less

#

There are less children in families that do have children and more families that don't have children altogether nowadays, as the western civilization provides a high enough quality of life

#

On the flip side, having less children means that the following generation will potentially have significantly less able workers than the job market needs and expects

quaint summit
#

We're capable of adjusting our population based on our needs as a society, but its not necessarily part of our nature to do so. A lot of factors go into what we do... Different cultures seem to have the problem worse than others.

#

One thing that is consistently on the rise despite its need to drop is our world population though.

#

Since I was a kid I have been told the number was rising and it has only continued to do so

eager jolt
#

almost all the population growth belongs to Africa and poor countries, when the developed countries have a drop in the birth rate, and there the population is growing only at the expense of migrants

quaint summit
#

I would say its definitely associated with poverty, yes.

eager jolt
#

yeah

quaint summit
#

But we have that in my country.

#

USA

eager jolt
#

the poorer the country, the more they give birth to people

#

what do you mean by 'that'?

quaint summit
#

I mean that we live in a rich nation with a lot of poverty lol.

#

So the problem is here as well

#

I*

eager jolt
#

noo, it cannot be called a log of poverty

quaint summit
#

If you say so.

eager jolt
#

and many poor people are themselves morons in general

#

in the usa

#

because it is not so hard to find a work

uncut sail
#

uneducated is not the same as stupid

quaint summit
#

I dont care to have a poor people are stupid conversation with you

eager jolt
#

oh

#

I'm not talking about the poor, I rather meant beggars, like homeless people

#

I'm not talking about people whose earnings are less than average, and so on. I mean really poor people who can't or don't want to find a job.

quaint summit
#

Well, let me just throw in... homeless people are not causing the population to increase.

#

Homeless people are mostly mentally unwell.

#

Sure, there are young people who are living the life because they are care free and whatever

#

But the lifers are mentally not well people, usually people who lack social skills so severely that they have nothing.

#

A lot of times the complacency that you see is an acceptance after repeated attempts to be functional that just go terrible wrong, because...again... theyre not well

#

Im not saying you owe them your paycheck, but you do owe them at least acknowledging that they suffer from problems you dont have

#

If anything is the root of our population issues, its our religion and government policies based in that religion

uncut sail
#

I've been hearing a lot about how vital communication skills are, and honestly it's kinda starting to scare me considering how badly I suck at any type of conversation

drifting venture
#

Also, finding a job is hard, let alone if you are homeless. I mean, wtf do you put on your resume? Where do you get clothes for your interview?

#

What's your callback number?

#

How do you get to the office?

#

Where's your address?

#

Do you have up to date identification documentation? etc

#

Nobody wants to give a job or a home to a homeless person, even if they have skills or money. I understand why, logically, but it still puts them in a sucky situation

primal comet
#

its a catch 22. they cant get a job to get off the streets. but they cant get a job because they are on the streets

steel eagle
#

In Portland they had plenty of programs to help people, but the majority of them would rather be in the street and do heroin or meth

#

The few I knew who weren't druggies were either on the street by choice, or actively working (and succeeding) at getting their lives back together

#

I had to deal with some real unpleasantry there, man I love that city but it was a mental chore sometimes

#

Someone was shot and killed by the front door of my apartment building one night

#

Had a dude leave a used needle point up in the toilet seat covers and we had lots of highschool students on their first job there, so imagine a kid going in and getting stabbed with a dirty needle... Or a little kid running in to use our bathroom (it was a restaurant)

fluid plank
#

uhmm

#

fuck

jovial island
#

how is this humor?-

pure rune
#

Don't think its meant to be?

jovial island
pure rune
#

Yeah the channel names change daily tho, its off topic xD
Doesn't mean it has to follow the channel name.

jovial island
#

Yeah the channel names change daily tho, its off topic xD
Doesn't mean it has to follow the channel name.
@pure rune I mean I came for programming memes I got sad stuff

#

😔

pure rune
#

But there isn't memes allowed on this server, doesn't matter the channel. Sometimes OT is funny, some times it serious. It varies like the tides

storm birch
#

time for sad boi hour

pure rune
#

Although I do say we need a meme channel but only after you been here x days and have x messages like the voice stuff.

#

Eh it wouldn't let me striekout to be more edgy

#

And I say that because so many people try to post maymays

storm birch
#

its called the staff channels

pure rune
#

I knew it!

storm birch
#

yeah, hemlock pretty much just dumps memes 24/7

#

jkjkjk

pure rune
#

Hemlock how could you!

#

Oof, it just dawned on. winter holiday crap is going to be super prevalent soon

steel eagle
#

@pure rune unfortunately, that never works

#

Memes tend to make people go loco

#

Even on gated communities, it ends up taking far too much moderation

pure rune
#

I dunno I think it depends on userbase. Based on experience but it's whatevs. It's not allowed here and that is aokay!

steel eagle
#

So many younger children in this server, it definitely wouldn't go well

pure rune
#

Yeah I see your point.

digital yacht
#

So many younger children in this server, it definitely wouldn't go well
@steel eagle Im young, as far as I know there´s no fire and destruction on the server :0

full summit
#

there'd be a lot of fire and destruction in a meme channel

digital yacht
#

Oh

#

Well thats true

pure rune
#

I mean we got f1re here too.

#

Oh hey when is our next Gurkan meeting?

storm birch
#

thats a good question. We shall see if the projects were not abandoned lol. Need to make gurkult site epic

proper python
#

anybody know a python package on pypi that can create warning popups?

storm birch
#

hmmm, that would depend on what you want a warning to popup in

steel eagle
#

@digital yacht right, but one well behaved younger member does not imply the average

digital yacht
#

Oh i get it, sorry for not answering earlier :0

steel eagle
#

All good

#

I've spent the last couple of hours on the help channels

#

trying to help as many people as I can

#

Working on getting better at noticing the obvious stuff, as I've had issues with that in the past

#

I'm getting better

tawdry hill
#

i am kind confused in what field should i head in

#

like how to decide

steel eagle
#

What point are you at currently? @tawdry hill

#

if you're young/still in school, just do lots of experimenting, try new things, research all the fields you might be interested in

#

I've you have the time/money, and are about to head into college, I've heard good things from a few people who just took a few intro classes from a few different fields, and then picked what the wanted to major in after the experience from those.

tawdry hill
#

I am in college second year got late into programming

storm birch
#

ayyy, that is about when I started programming

tawdry hill
#

@storm birch what was your approach ?

storm birch
#

well, I do programming purely for fun. It was not ever my goal to get into it professionally. I started with some free course for python 2 and c++ on code academy. I played with arduino, Unity, and python making projects in each.

After about a year or two, I found that I really enjoyed doing backend web dev, so I leaned pretty hard into learning django. Most of what I learned came from personal projects. And focusing on web dev really came naturally to me. I found I enjoyed doing backend, and it was really cool to be able to connect that to a front end.

rocky salmon
#

i am going to create a fork of python which uses this instead

tawdry hill
#

that sounds good. i am learning cpp and python too

#

i shd work on projects now

storm birch
#

yeah, start doing projects ASAP, get stuck and learn how to overcome it through the power of google, docs, tutorials, whatever you need. This is the way to learn. haha

proper python
#

I hate following tutorials

tawdry hill
#

is python bot good project ?

proper python
#

Uh

somber belfry
proper python
#

I mean probably

somber belfry
#

yeah, it's fun

tawdry hill
#

tbh i love reading books but following books kind of lags u

somber belfry
#

it does abstract a lot of asyncio away from you

proper python
#

Not following tutorials is awful for school

tawdry hill
#

i am learning python from corey schaffer tutorials now

proper python
#

But I just feels so stupid when I use someone else’s work without understanding how it works

tawdry hill
#

oh you mean for tutorial ?

proper python
#

So I just guess how something works, get it right, find there are a bunch of things wrong, and so I learn how a thing works

storm birch
#

corey schafer is amazing.

books are great too, if you have the patience to read (lol), you can very quickly accelerate your learning

tawdry hill
#

books give more knowledge but they keep lagging me

#

like i am stuck with this cpp book for a while now

proper python
#

Reading is for nerds says the kid who’s hobby is fucking programming

storm birch
#

yeah, tbh the programming books I have read contained knowledge that I spent months accumulating. I could have saved a lot of time haha

tawdry hill
#

and started to feel stagnant

#

bc i heading no where

jovial island
#

Ok I will also put a hat on my pfp lemon_pika

storm birch
#

yeah, you need to work on your own projects and apply what you learned from the books to your projects

proper python
#

Reading a book and getting info is fine but it’s just so much more satisfying figuring out on your own

#

Or figuring out in a situation where it’s important

#

Which is probably why I complete so few of my projects

tawdry hill
#

is web dev good in python

#

like i often see people using JS

storm birch
#

backend web frameworks are very popular, their is large professional demand for these skills

#

but JS is generally better for that sort of thing

proper python
#

Actually, now that I think about it, I complete so few of my projects not because I run into a technical problem, but because what I thought was a cool idea was actually really boring

storm birch
#

well, its suggestive

tawdry hill
#

i kinda wanted to do get into embed programming with cpp at a point

proper python
#

Python is fine for backend

tawdry hill
#

but cpp feels so vast

proper python
#

Cpp is

#

No

tawdry hill
#

wym

proper python
#

It’s not

#

I feel like you have to be a wizard to do anything remotely complex with it

storm birch
#

cpp is very vast and requires a lot more time to master.

tawdry hill
#

^

storm birch
#

there is a lot more to think about.

proper python
#

Exactly

#

But is the payoff worth it?

tawdry hill
#

actually i do feel it will be bc there are more python programmers day by day bc how easy it is

storm birch
#

money wise? hell yeah, you would make bank haha

tawdry hill
#

so good cpp programmers are ofc in lesser numbers

storm birch
#

python jobs are quite competitive from what I understand, because it is so easy to learn

tawdry hill
#

yes exactly

#

that is why i am workin on cpp even tho it is quite taxing lol

storm birch
#

yeah, I have a tough time with that. Like I said, I really only do it as a hobby, so I cannot motivate myself to learn just for monetary gain. That is why python is so ideal to me. It is fun and easy to learn haha

faint rain
#

Wondeirng what 4th language to learn anyone got ideas that is worth spending time with?

jovial island
#

what is your area?

faint rain
#

I preffer to work with System programming, doing small microcontroller stuff and sometimes i just wanna build another boring discord bot. I know python, js, go.

jovial island
#

maybe c?

faint rain
#

Isn't C slowly dying? or am i wrong.

jovial island
#

I don't think c is going anywhere

faint rain
#

Dosn't seem c is worth learning beacuse nobody except big bussiness use it.

jovial island
#

it's still widely used with system programming like embedded stuff

faint rain
#

Well if i am gonna learn C i will use it to make another discord bot agen. Not just system programming.

jovial island
#

It's interesting that you are into microcontroller stuff but don't know c

#

You don't need to learn it in deep either, just take a look and implement something simple

#

You could look at rust or c++ too

faint rain
#

I don't do such stuff often, but i am willingly to learn it more for fun. I have heard of rust, seems rather complicated. C++ seems fine but no cross platform support? and it seems liek rust is taking over c++ or am i wrong there aswell?

jovial island
#

If you're learning it for fun i wouldn't worry about how big the language is

#

Just take a fast look at each of them and go with the one you find to be the most interesting

faint rain
#

I will look at C first, it seems inntresting.

jovial island
#

gl

languid osprey
#

Hi :D

jovial island
#

ah yes diwali

#

is noice

languid osprey
#

Cool

jovial island
#

cook?

#

oh lol

languid osprey
#

Typo lol

jovial island
#

hmm

languid osprey
#

India's nice yeah

jovial island
#

another typo

languid osprey
#

..

jovial island
#

wait

languid osprey
#

xD

jovial island
#

did ya mean Indians?

languid osprey
#

No, india's

jovial island
#

oh

#

got it

languid osprey
#

Lol

jovial island
#

hehe

languid osprey
#

I usually go there once a year

jovial island
#

you said you're american is that right?

languid osprey
#

Yeah

#

Pretty much

jovial island
#

interesting

languid osprey
#

My parents were born in India though

jovial island
#

do you know the city?

#

they live in

languid osprey
#

Yeah

#

Hyderabad

jovial island
#

ooh

#

i live there too

languid osprey
#

Cool :D

jovial island
#

😄

stiff torrent
#

i want to buy a cheap linux host for a web page and a database, i dont care about the host location. the web page is very simple, in fact what i will use the most is the database. any recommendation?

pure rune
#

Would hosting it yourself not work at all?

stiff torrent
#

Well yea but i would have to have my pc on all the time

#

I currently do that with my mom's pc

pure rune
#

Hmm, well what kind of traffic do you expect on the site and how intensive will the database be used?

#

Because maybe you can get like a pi4 and use that?

stiff torrent
#

Idk much about this, but the page will not have more than 50 visits per day. As for the database, maybe 100k rows, idk how many requests per day, maybe a thousand?

limber pollen
#

I would suggest getting a cheap $5/mo VPS but that seems a bit overkill, best guaranteed that you'll scale though

pure rune
#

Or that ^^^ I haven't used a vps so I don't know prices lol

stiff torrent
#

A 5usd vps would be overkill? Or the db?

#

I really dont know how intensive mysql is

limber pollen
#

Depends on the specs of the machine, but you could probably run Nginx + PostgreSQL on it just fine

stiff torrent
#

Any hosting webpage recomendation?

pure rune
#

Pretty sure that's what the Nginx would be for, so you can self host it on the vps

stiff torrent
#

I mean where to buy the vps

pure rune
limber pollen
#

Scaleway or Contabo are the two ones I know

stiff torrent
#

Thanks, ill look into that

pure rune
#

This convo has reminded me I need to move my discord bot to my pi and I need to work on it more lol

zealous tide
#

r/programmer humor

#

is gud

pure rune
#

The opposite of formaldehyde is casualdejekyll

somber belfry
#

some memes are too circlejerky but yeah

#

oof natani

#

nice

pure rune
#

:D

vale pasture
#

Is it safe to use HTTP for redeployment webhook that send token in header?

#

I mean HTTP not HTTPS

flint olive
#

it's okey

solemn thistle
#

Did AG make the new logo?

somber belfry
#

yes

clever salmonBOT
#

@nova ember @final sable

It has arrived!

Here's your reminder: Feel happy 😄 this is the spirit of happiness giving you all energy you’ll need for the week! Have a great day.
[Jump back to when you created the reminder](#ot2-the-original-pubsta message)

nova ember
#

Aaah, right!

final sable
#

Ahhh

#

WholesomeVester

pure rune
#

If someone is sent to prison, surely every line of dialogue they utter is a prison sentence, that would reduce the total sentence.

#

hmm, reddit is down, imgur having issues too

storm birch
#

LOL, where will you ever get your puns then xD

pure rune
#

ikr? T.T

#

haha don't want to talk to someone? put phone in airplane mode while its ringing

#

call will fail :D
It was my sister in law but I really don't wanna talk rn

jovial island
#

ok here time travel

#

Hi

languid osprey
#

Oh hi

jovial island
#

hi

languid osprey
#

:D

jovial island
#

so yeah when I did time travel some years ago it was not what you would expect

#

when I worked for government

languid osprey
#

You did time travel?

#

Ooh

jovial island
#

yes

#

Wow

radiant socket
#

aren't you a post grad AI major

languid osprey
#

Why r you telling us, won't they kill you?

#

xD

#

That was his cover

radiant socket
#

right, the AI grad with no data science courses

#

how does time travel work anyway

jovial island
#

why do you mock me?

languid osprey
#

Lol

jovial island
#

Wtf

#

I seriously have degree in AI

languid osprey
#

Yeah, how does it work

jovial island
#

I can send proof

languid osprey
#

Send away

radiant socket
#

sure, i don't doubt it

#

i just wanna learn about time travel

jovial island
#

I dunno thats like asking how a car works when you know how to drive it

languid osprey
#

Yeah, lets do that instead

#

Huh?

#

So you don't know how time travel works?

radiant socket
#

since i don't know how to do either, please explain

jovial island
#

no

#

I just know how to drive the machine

#

Too bad im a low level comp sci major who just mastered OOP and unix

languid osprey
#

@jovial island How do you drive it?

jovial island
#

pressing a button

languid osprey
#

How do you navigate the time stream?

jovial island
#

AI

languid osprey
#

xD

radiant socket
#

surely you must have learned how it works right

languid osprey
#

Python?

jovial island
#

nah BASIC

languid osprey
#

Is there python involved in time travel?

#

Oh ok

#

So you don't know how it works?

#

Why not?

#

Why'd they allow u to drive it then?

jovial island
#

because I used to be racing car driver

languid osprey
#

U what

#

How are they similar?

jovial island
#

both requires you to drive a machine

languid osprey
#

Yes, very different machines

jovial island
#

I have no idea tbh

radiant socket
#

right, racecar driver, AI grad, and time traveler who worked for the govt

languid osprey
#

I don't see any racing cars running through the time stream

jovial island
#

@radiant socket I am obviously trolling

languid osprey
#

Are you though?

radiant socket
#

damn, really?

jovial island
#

I dunno why this guy is engaging me so much lol

radiant socket
#

i fell for it

jovial island
#

well I am seriously an AI grad though

languid osprey
#

What if all that is true, and your just trying to throw us of your trail?

jovial island
#

I did'nt lie about that

#

nope, do you really think a time traveller would waste there time hanging out in a discord server?

languid osprey
#

Yup

#

Part of your cover

jovial island
#

not even government does that lol

languid osprey
#

Which government?

jovial island
#

do you remember, 20 years ago

#

about John Titor

languid osprey
#

I wasn't alive 20 years ago :D

jovial island
#

there was guy in early days of internet

#

came into IRC (pre discord) said they were a time traveller

#

but they were very detailed about it even uploading images etc...

radiant socket
#

and none of what he said came true

languid osprey
#

xD

jovial island
#

I think, its been proved as a hoax though

#

yeah but there is the multiverse dynamic

languid osprey
#

There is, isn't there

jovial island
#

google: John Titor

#

it will blow your mind lol

languid osprey
#

Even if there was time travel, I wouldn't mess with it, people focus too much on the future and past, and not what is immediately on hand

jovial island
#

I like to live in present

languid osprey
#

Yeah

jovial island
#

I have deadline on Friday and if I don't hit I don't get money but I don't care because its only way to stay motivated

languid osprey
#

Its good to look to the future, or learn from the past, but overly obsessing with the two isn't good

jovial island
#

if you let emotions get to you about the past and the future you never get anywhere

languid osprey
#

Yeah

#

But its important to have some knowledge of both

#

Learn from the past, and be ready for the future

jovial island
#

I think in 2024 China will invade the earth

languid osprey
#

Lol

jovial island
#

they could cripple the UK very easily

#

like they control everything here now pretty much

languid osprey
#

Lol yeah

jovial island
#

we already have there surveillance infrastructure ready to go also

#

is like 100k cameras per person here

radiant socket
#

how would they cripple the UK?

languid osprey
#

Dunno

jovial island
#

through technological means

radiant socket
#

magic i suppose

languid osprey
#

xD

#

I laughed at that and now my dads staring at me

jovial island
#

Chinese Wizard

radiant socket
#

ah, yeah of course

languid osprey
#

Sorcerer, not wizard

#

Chinese sorcerer

pure rune
#

Well are they born with magical ability? If so then yes sorcerer. Did they study? Then wizard. Did they sell their soul to a patron in exchange for magical ability and a d10 cantrip? Then warlock

shadow elk
#

@languid osprey for example, if you have a program like:

i = 1;
while (i < 5) {
    print i;
    i = i + 1;
};

you can first parse it into a data structure (the abstract syntax tree):

CodeBlock([
    AssignmentStmt(target="i", expr=Integer(1)),
    WhileStmt(
        condition=LessThan(Name("i"), Integer(5)),
        body=CodeBlock([
            PrintStmt(Name("i")),
            AssignmentStmt(target="i", expr=Sum([ Name("i"), Integer(1) ]))
        ])
    )
])

...and then you can do something with that data structure.
As you said, you can do something like this:

class PrintStmt:
    def __init__(self, expr):
        self.expr = expr

    def evaluate(self):
        return print(self.expr.evaluate())

but usually you may want to keep some kind of environment/program state, for example, you can store all the variables in there:

class PrintStmt:
    def __init__(self, expr):
        self.expr = expr

    def evaluate(self, runtime):
        print(self.expr.evaluate(runtime))

class Name:
    def __init__(self, name: str):
        self.name = name
  
    def evaluate(self, runtime):
        if runtime.has_name(self.name):
            return runtime.get_by_name(self.name)
        else:
            raise ToyLangError(f"Name {}")
languid osprey
#

oh wow

#

Thanks alot :D

#

So I have some sort of Envrionment class, yeah?

shadow elk
#

@languid osprey you may also want to separate statements (which might have an execute) method and expressions (which might have an evaluate method)

#

@languid osprey yes

#

some object that stores the state of your program

languid osprey
#

Oh alright

#

Thanks :D

#

wait

#

So lets say I have a Print class with a .eval() method, and and Add class with a .eval() message, and I have this for my interpreter class ```py
class LiteInterpreter(Interpreter):
number = int
string = str
def add(self, tree):
return Add(tree.children[0], tree.children[1])
def print_statement(self, tree):
return Print(tree)
def statement(self, *trees):
for tree in trees:
tree.eval()

#

Heres my print ```py
class Print():
def init(self, value):
self.value = value

def eval(self):
    return print(self.value.eval())

and my addpy
class Add():
def init(self, val1, val2):
self.val1 = int(val1)
self.val2 = int(val2)

def eval(self):
    return self.val1 + self.val2
#

@shadow elk

shadow elk
#

no, an Interpreter walks the tree top-down

#

you need to first build an AST using a Transformer

languid osprey
#

Oh, so should I use Transformer()?

#

Oh ok

shadow elk
#

yes

languid osprey
#

Thanks again :D

shadow elk
#

don't do any evaluation while parsing at all

#

👍

hoary drum
uncut sail
#

really?

#

can't believe I fell for it 😠

fluid plank
#

@violet socket youtube is down

#

globally

#

the world is dead

short cliff
fresh merlin
#

im downloading zip files from places like gimp for example

#

and want to run them

violet socket
#

@short cliff can u like announce the problem or smthn, I almost restored my system until I noticed it was hapening on my phone too

#

youtube = problem

short cliff
#

It's not relevant to the server

jovial island
#

Dude really?

violet socket
#

maybe u should create a minor announcement channel

short cliff
#

I'm not making an announcement for something very not Python

jovial island
#

Its called changelog

violet socket
#

code is related

#

¯_(ツ)_/¯

short cliff
#

Again, no

violet socket
#

everything has code

fluid plank
#

who would make announcements not related to python xD

violet socket
#

well..>

short cliff
#

I'm not entertaining this line of thought, I already said no

violet socket
#

ok good point, imagine how much people are going crazy, youtube is life

fluid plank
#

nah

fresh merlin
#

k terminal is doing stuff rn

#

techradar told me to run two commands

#

then press y

#

so i did

#

and terminal is doing stuff

short cliff
#

Neat

fresh merlin
#

yes

#

i also messed with the terminal appearance

#

it looks very cool now

#

this is what i have now

fluid plank
#

@fresh merlin thats your terminal?