#ot2-the-original-pubsta
652 messages · Page 2 of 1
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
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
Ok
@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 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
okay 👌
@somber belfry try the code tomorrow for few hours, let it run in the background and tell that how did it work
Hey could someone help me out here
so every time I open VSC it gives me this
and when I click on install
when you click on install?
when you click on install......
is this mac?
yes
yeah I got no help for that unfortunately'
mac == 
not really a helpful input my friend
linux == 👼
no reason to start platform wars
yeah
i gues
It's not like all apps work on linux OOTB either
every platform is a tradeoff
if anybody knows how I can fix that, then please happen to ping me !!!!
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
i can code but like every 20 seconds that pops up
Consider using a different editor/IDE or try reinstalling it
or better yet
search for the comand line developer tools
and install them manually
I'm sure it's just a quick google away
k i will try thawt


+ 
consumes 2 gigs of ram for me
amateur numbers
sublime and vim's ram isnt even in mb
sublime doesn't even have a debugger
consumes 2 gigs of ram for me
@tranquil ridge
...
mine as well
mada mada
dude, i only have 3.3 gb of ram
haha, rip, we need to get you more ram
tbh I launched a game just for that screenshot
11 gb
nah its ok, i can work without any more ram
really awesome mad-max-cosplays
how the hell does vsc consume 2gb of ram lol
what even is ram
ram is obviously sheep with balls
now I gotta find how to install command line developer tools
you can get free ram at: freeramdownloaderthattotallydoesnothaveavirus.com
😄
@worldly berry is that True 👀
downloadmoreram.com is safer
but its hardware so def clickbait
what do you mean
the website legit says it totallydoesnothaveavirus
@steel eagle
lol
how the hell does vsc consume 2gb of ram lol
@full summit having AI intellisense extensions
like kite
ahh, i don't really find kite useful imo
because its electron
nope
a normal electron app does not take 2gb of ram lol
every electron app for me consumes a lot of ram
vscode is electron
sure, a lot, but not that extreme
kite is .... just kite
vs code only consumes ~200M for me. How many plugins do you have?
hmm
dunno though, i only have 3.3 gb ram, so i want to optimise my laptop as much as i can
Discord takes like 600M for me, so I can bear 200M for vscode
Discord uses 600m for you? it uses 750-900 for me 😒
now what is m??
m is m
k.
😛 I'm gunna wildly guess they like myself meant Mb and just typed m for the hell of it
Discord is using 410M rn
oof my pi is running at 45.8c
pi?
yes pi 4
pi 4 ?
raspberry pi 4
just pore some water on it
Nah I'll just put it in a fridge
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
just pore some water on it
< 0 fishtank
how hard would it be to hook up a heatsink to it?
to a fishtank?
Oh mine already has one and a mini fan but its still a spicy tamale
I will try it in a while
I'm completing some work for a class that I have in an hour
ok. try it when you can
good
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
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
Store the links in a list, and access them by indexing
im telling ya get a fish tank for it
@frozen shore whenever you find yourself just making a bunch of variable, you will probably need a list
just about more than 25
lmao
well, that was an emotional rollercoaster
That is why you bury your emotions, silly
its worked thus far
saaaaaame
🙂
WTF? University of California, can turn mercury to gold via nuclear reactions? o.O
burying your emotions so you can prolong the amount of time before coping is **tight
pffft, what u kno bout dat actual alchemy
ooh, its not profitable
yeah, but wait wtf, alchemy is just real now
WTF? University of California, can turn mercury to gold via nuclear reactions? o.O
@pure rune but it uses a lot of energy right?
they charge 200/hr to use the reactor, and it only produces 3/10 cent in like 20 hours I think they said
it aint alchemy though
apparently literal alchemy was invented in 1941 whaaaat
I really don't think fusion/fission gold manufacture will ever turn a profit
it aint alchemy though
if it walks like magic and talks like magic....
But it's cool and probably gets you grants
let us believe T.T
If I was a grant decider dude, I would support "oh hey we make gold from not gold"
I like how it is actual science to just blast a material with neutrons and now that thing is gold
Still waiting for FMA to happen. I want a chimera!
Still waiting for FMA to happen. I want a chimera!
@pure rune you had me in the first half haha
I was gunna post the image but rules be rules
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
XD
additional lesson: no anime ever is above fan service, apparently
Omg, Four Seasons Landscaping is selling a sticker aptly named
Make America Rake Again
(their logo)
Lawn and Order
that is so perfect lol
LOL, what. Are they a big enough brand for that to even be profitable? xD
very nice haha
Alchemy is what lead to gold.
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
epic victory royale moment right there
Could've been watching disney this whole time
One assumes you kept your cancellation paperwork?
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
Aww man I found a perfect meme about building a horse with programming and I can't share it here T.T
maybe you can since you created it, and i am bored
Oh I didn't make it I found it but it's still awesome lol
i think its bad to randomly dump a meme while a convo is going on, ig one wont hurt? 🥺
Nah it says in the rules no maymays which I get why but darnit lol
k
👀
Is your username in brail? XD
Wait what, Alex Trebek died? :(
..\ /
👁️___👁️
@jovial island As to your question, if you mean Minecraft, then yes, but I haven't played it in a long time.
how do you slap and play a note that are one string apart 🤔
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
Is that a slap line? "x" is commonly used for muted/ghost notes as well.
can someone help me ?
it's a slap, yeah
in cmd how do you download module for python?
in cmd how do you download module for python?
@next locust you should be able to dopip install module_name_here
Panda3d
sorry how should i do that
omit meaning remove.
oh ok
i think i'm just going to skip the slap on that one for now
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
odd
@next locust what OS are you on?
windows
Can you do py -0p in cmd?:
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
thanks it's working
whoo!
@wheat aurora wait so, py -0p displays all python versions installed and all their paths?
Yep, py is a windows only thing though
I'm not certain what the linux equivalent is unfortunately
That's okay, at least I learned something new today
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
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
honestly, I have a lot more pain compiling things than I have dealing with python envs
woot got a job 99% sure, just gotta pass a background check
Nice!
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
Ah, yeah. As long as it’s works for you (pun intended), it’s nice
Yeah, I am still going for a programming gig though
Reasonable. Maybe you could do some freelance work on the side
Plan on it for sure :)
Just happy I got something. I know the check is going to clear so its a shoe in
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
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
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
Yeah and I hope I just possibly figured out the easiest way to solve it too maybe
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
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
Yep
woot got a job 99% sure, just gotta pass a background check
@pure rune niiiiiiice,, hopefully they find ~0 felonies LOL
@short cliff soooo, what are the motivational posters about?
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
You could unpack tuples like this:
!e ```py
foo = ("foo", "bar", "baz")
def spam(a, b, c):
print(a, b, c)
spam(*foo)
@nova ember :white_check_mark: Your eval job has completed with return code 0.
foo bar baz
@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”)
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
I’m on mobile, so it’s slightly hard to see. Maybe @storm birch knows
I saw him lurking here
I dont remember which tuple this is, but you can also unpack with foo, bar = (1, 2)
I'm also on mobile rn LOL
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
Lol, we are all here to help though, so it is ok xD
Always
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
and I been trying since yesterday afternoon to get those results sent as separate values to pass into another function
I hear ya XD
why can't you unpack them into the functions?
You can
or return the fuction with the arg
Like the * thing I showed earlier
I should start calling that the Van Gogh operator
starry night
so instead of the
return expense_type, cost
do like
return input_expenses_item(expense_type, cost)
?
what does input_expenses_item() look like?
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
```
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
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()
!paste By the way, maybe try using this
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.
And option 3 is what I am working on to get it to go to my database code which is https://paste.pythondiscord.com/ehuputanid.py
return budget_buddy.insert_expenses(input_expense_item)```?
idk how you've got it setup that might not work
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
ah I thought maybe it was a class instance
what're the params for budget_buddy.insert_expenses?
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
That should be this https://paste.pythondiscord.com/ehuputanid.py
return input_expenses_item(expense_type, cost)```
that should work then
unlesssss you need expense_type, cost for smthing else after you insert it
Nah I shouldn't
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
Or would it be easier to just import the functions_for_BB into budget_buddy and unpack the tuple results in the function
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```
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
insert_expenses not input_expense_item sorry
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
conn.execute(insert_expense_command, (exptype, amount)) that doesn't work?
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
well lemme preface this with the fact that my sql knowledge is non-existent
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
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
I can't get that far because I keep getting type errors before it can actually pass the tuple over for the conn.execute
TypeError: input_expense_item() takes 0 positional arguments but 2 were given
that one?
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
well either you return the values and unpack them to send to insert_expenses, or you return insert_expenses with the values already unpacked
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
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?
I think so?
you see what I mean by returning insert_expenses(expense_type, cost) tho?
I believe so
that might not be viable if you need the values tho ¯_(ツ)_/¯
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
@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
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
Keeping tropical fish at home can have a calming effect on the brain
due to all the indoor fins
🥁 🤦♂️ 😂
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
not a good day :C not a good day to code, lol
no its not but I was fine until a few hours ago when I was stonewalled with the tuple issue
yes sir
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
Db is a good skill. I never enjoyed messing with them.
ORM is the easy way to go haha
yeah I mean when this is all said and done the program better fricken work or else I'm lighting it on fire
hi
hi
Hey @storm birch this part here
def input_expense_item() -> tuple:
what is the -> doing?
@pure rune I think it means that it will return a tuple
kk!
yeah, that is called return hint or return annotation, it is new to python
I think it means that it will return a tuple
to clarify, it doesn't have to but your ide'll be screaming
wha is the ->
a type annotation for the return type of the function
def function(value1: value1_type_hint) -> return_type_hint:
...```
ok
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
it is like a comment right?
basically
ah like a doc string
of sorts
certain libraries, such as Discord.py, and I believe APIStar actually use them
I'm addicted to type annotations.
it is good to annotate
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
i see so thats its other uses hmmm.
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
it doesn't convert?
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
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
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
discord.py itself reads annotations for conversions, vanilla Python does not
he imported something in discord.py and added after ->
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
I remember talking to someone about the type check decorator
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
lol, of course
Alright, Im gunna do a screen share down yonder if thats fine? in #code-help-voice-text stuffs
crap I cant share
lolol, only I have sharing privileges muhaha
okay how about this
why do you wanna share screen?
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
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.
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
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
LOL, yes, I can be promoted to helper+ now xD
helper pro™️
for those interested https://paste.pythondiscord.com/zonarojoyi.py is the correct code that now works as intended
no worries, never be afraid to ask for help. There is an army of people here willing to help haha
like I said in the voice chat, I even thought it was a stupid easy fix and it was x.x
haha, it usually it tbh
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
@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?
that's just the way the scoping rules work, I suppose.
🤔
I'm watching a youtube video and guy in it uses it that way
The video: https://youtu.be/2Fn0WAyZV0E?t=1241
SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system.
In this advance #SQL course you will learn how to execute complex queri...
And that's my schema if you need it for some reason:
that may depend on the particular SQL dialect
I use postgresql
is that what the video is using, too?
Either postgres or mysql since he used both
#315249263103967242 message
you could try there
@rotund swallow Thanks, will try to ask this question in that community
Beyond my expertise, I think. 🙂
np
so much inheritance O.o
so much inheritance O.o
@storm birch you are awake O.o
@wicked hollow Maybe there's a better way to get users that have certain amount of orders? 🙂
discord.py server isnt in the partners kek
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
ohhhhh fancyyyyyyy
@steel eagle what is that?
wip character sheet for a TTRPG system I'm creating.
look slike D&D 😄
it's loosely based on D&D
I'm sure it is D&D
Loosely Based on D&D™️ is my favorite type of project haha
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
I'm watching a youtube video and guy in it uses it that way
@devout loom can sql be expressed in small case
LOWERCASE
but you just used uppercase
.lowercase Lowercase
😂
just the answer plz @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
@wicked hollow As i understand it since having evaluates before select clause i can't use alias in it
That's what I thought, but if it worked for the guy in the video there must be something more nuanced happening...
holy heck, though it's not as bad as CSS
getting things aligned is still a nightmare
yes
my god
I swear to god whenever I try to align things in css
Like the next hour of my life disappears
it's uh, a thing https://i.imgur.com/DzlOKFR.png
uh lol any girls on discord?
i have been pranked my like 7 ppl for this
😂
and @round moss congrats for the mod promotion!
thanks
Yeah we use discord? Why is it so shocking xD
Yeah there are girls on discord. Lol
i dont get it
I didn't even realized there are so many girls on discord until I mentioned them 
I didn't even realized there are so many girls on discord until I mentioned them :lol:
@jovial island what do you mean ?
Yeah there are girls on discord. Lol
@steel eagle whats a girl?
xd
🦄 yes, we're like unicorns.
Maybe they're talking about people not being manly enough
what does it mean to be manly? o:
🦄 yes, we're like unicorns.
@still dust drinking your blood grants immortality? 👀
you'll never take meeee 
That's what they all said
I'm the one having the last laugh at the ripe old age of 9878 😏
no if you drink my blood you end up like lord voldemort
sounds lonely 😦
/😔
-gallops away-
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? 
unicorns as we know them (i.e. lisa frank lolol) didn't exist. @storm birch , no, but now i'm sad after reading that 😢
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
well, they died from extinction because of climate change.
oh thats true, so we were actually geniuses, not parasites on this planet 
keyword: were. LOL
we were never parasites, thats an incredibly nasty way of looking at humanity
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
what]
It also has some beautiful things obviously. But those things wont last forever and it will most likely be our fault.
yeha
what will earth be like
withhout
sun
or water
or tree
ss
or humans
lol
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
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?
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
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
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
I would say its definitely associated with poverty, yes.
yeah
the poorer the country, the more they give birth to people
what do you mean by 'that'?
I mean that we live in a rich nation with a lot of poverty lol.
So the problem is here as well
I*
noo, it cannot be called a log of poverty
If you say so.
and many poor people are themselves morons in general
in the usa
because it is not so hard to find a work
uneducated is not the same as stupid
I dont care to have a poor people are stupid conversation with you
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.
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
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
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
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
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)
how is this humor?-
Don't think its meant to be?
I mean because it's #ot2-the-original-pubsta
Yeah the channel names change daily tho, its off topic xD
Doesn't mean it has to follow the channel name.
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
😔
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
time for sad boi hour
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
its called the staff channels
I knew it!
Hemlock how could you!

Oof, it just dawned on. winter holiday crap is going to be super prevalent soon
@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
I dunno I think it depends on userbase. Based on experience but it's whatevs. It's not allowed here and that is aokay!
So many younger children in this server, it definitely wouldn't go well
Yeah I see your point.
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
there'd be a lot of fire and destruction in a meme channel
thats a good question. We shall see if the projects were not abandoned lol. Need to make gurkult site epic
anybody know a python package on pypi that can create warning popups?
hmmm, that would depend on what you want a warning to popup in
@digital yacht right, but one well behaved younger member does not imply the average
Oh i get it, sorry for not answering earlier :0
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
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.
I am in college second year got late into programming
ayyy, that is about when I started programming
@storm birch what was your approach ?
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.
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
I hate following tutorials
is python bot good project ?
Uh
using discord.py?
I mean probably
yeah, it's fun
tbh i love reading books but following books kind of lags u
it does abstract a lot of asyncio away from you
Not following tutorials is awful for school
i am learning python from corey schaffer tutorials now
But I just feels so stupid when I use someone else’s work without understanding how it works
oh you mean for tutorial ?
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
corey schafer is amazing.
books are great too, if you have the patience to read (lol), you can very quickly accelerate your learning
books give more knowledge but they keep lagging me
like i am stuck with this cpp book for a while now
Reading is for nerds says the kid who’s hobby is fucking programming
yeah, tbh the programming books I have read contained knowledge that I spent months accumulating. I could have saved a lot of time haha
Ok I will also put a hat on my pfp 
yeah, you need to work on your own projects and apply what you learned from the books to your projects
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
backend web frameworks are very popular, their is large professional demand for these skills
but JS is generally better for that sort of thing
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
well, its suggestive
i kinda wanted to do get into embed programming with cpp at a point
Python is fine for backend
but cpp feels so vast
wym
It’s not
I feel like you have to be a wizard to do anything remotely complex with it
cpp is very vast and requires a lot more time to master.
^
there is a lot more to think about.
actually i do feel it will be bc there are more python programmers day by day bc how easy it is
money wise? hell yeah, you would make bank haha
so good cpp programmers are ofc in lesser numbers
python jobs are quite competitive from what I understand, because it is so easy to learn
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
Wondeirng what 4th language to learn anyone got ideas that is worth spending time with?
what is your area?
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.
maybe c?
Isn't C slowly dying? or am i wrong.
I don't think c is going anywhere
Dosn't seem c is worth learning beacuse nobody except big bussiness use it.
it's still widely used with system programming like embedded stuff
Well if i am gonna learn C i will use it to make another discord bot agen. Not just system programming.
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
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?
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
I will look at C first, it seems inntresting.
gl
Hi :D
Cool
Typo lol
hmm
India's nice yeah
another typo
..
wait
xD
did ya mean Indians?
No, india's
Lol
hehe
I usually go there once a year
you said you're american is that right?
interesting
My parents were born in India though
Cool :D
😄
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?
Would hosting it yourself not work at all?
Well yea but i would have to have my pc on all the time
I currently do that with my mom's pc
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?
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?
I would suggest getting a cheap $5/mo VPS but that seems a bit overkill, best guaranteed that you'll scale though
Or that ^^^ I haven't used a vps so I don't know prices lol
A 5usd vps would be overkill? Or the db?
I really dont know how intensive mysql is
Depends on the specs of the machine, but you could probably run Nginx + PostgreSQL on it just fine
Any hosting webpage recomendation?
Pretty sure that's what the Nginx would be for, so you can self host it on the vps
I mean where to buy the vps
https://us.ovhcloud.com/vps/
Places like that or Blue host
I haven't bought one before but pure seems to know
Scaleway or Contabo are the two ones I know
Thanks, ill look into that
This convo has reminded me I need to move my discord bot to my pi and I need to work on it more lol
The opposite of formaldehyde is casualdejekyll
:D
Is it safe to use HTTP for redeployment webhook that send token in header?
I mean HTTP not HTTPS
it's okey
Did AG make the new logo?
yes
@nova ember @final sable
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)
Aaah, right!
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
LOL, where will you ever get your puns then xD
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
Oh hi
hi
:D
so yeah when I did time travel some years ago it was not what you would expect
when I worked for government
aren't you a post grad AI major
why do you mock me?
Lol
Yeah, how does it work
I can send proof
Send away
I dunno thats like asking how a car works when you know how to drive it
since i don't know how to do either, please explain
no
I just know how to drive the machine
Too bad im a low level comp sci major who just mastered OOP and unix
@jovial island How do you drive it?
pressing a button
How do you navigate the time stream?
AI
xD
surely you must have learned how it works right
Python?
nah BASIC
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?
because I used to be racing car driver
both requires you to drive a machine
Yes, very different machines
I have no idea tbh
right, racecar driver, AI grad, and time traveler who worked for the govt
I don't see any racing cars running through the time stream
@radiant socket I am obviously trolling
Are you though?
damn, really?
I dunno why this guy is engaging me so much lol
i fell for it
well I am seriously an AI grad though
What if all that is true, and your just trying to throw us of your trail?
I did'nt lie about that
nope, do you really think a time traveller would waste there time hanging out in a discord server?
not even government does that lol
Which government?
I wasn't alive 20 years ago :D
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...
and none of what he said came true
xD
I think, its been proved as a hoax though
yeah but there is the multiverse dynamic
There is, isn't there
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
I like to live in present
Yeah
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
Its good to look to the future, or learn from the past, but overly obsessing with the two isn't good
if you let emotions get to you about the past and the future you never get anywhere
Yeah
But its important to have some knowledge of both
Learn from the past, and be ready for the future
I think in 2024 China will invade the earth
Lol
they could cripple the UK very easily
like they control everything here now pretty much
Lol yeah
we already have there surveillance infrastructure ready to go also
is like 100k cameras per person here
how would they cripple the UK?
Dunno
through technological means
magic i suppose
Chinese Wizard
ah, yeah of course
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
@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 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
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
no, an Interpreter walks the tree top-down
you need to first build an AST using a Transformer
yes
Thanks again :D
@fresh merlin Because it's quieter in here.
https://www.techradar.com/how-to/how-to-run-linux-apps-on-your-chromebook
Okay so you're trying to use something from the Chromebook store in the Linux bit? Or vice versa
@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
It's not relevant to the server
Dude really?
maybe u should create a minor announcement channel
I'm not making an announcement for something very not Python
Its called changelog
Again, no
everything has code
who would make announcements not related to python xD
well..>
I'm not entertaining this line of thought, I already said no
ok good point, imagine how much people are going crazy, youtube is life
nah
k terminal is doing stuff rn
techradar told me to run two commands
then press y
so i did
and terminal is doing stuff
Neat
yes
i also messed with the terminal appearance
it looks very cool now
@short cliff
this is what i have now
@fresh merlin thats your terminal?