#ot0-no-stealth-portals-please
3246 messages · Page 31 of 4
I think HVAC tech might go to a community college, for instance.
I don't think that's a career that uses an associate's degree - I think it's just a certificate program
not positive, though - it's admittedly outside my area of expertise.
Tig Notaro had a standup special where she performed topless for most of it. After a double mastectomy, she didn't have nipples or breast tissue anymore, so it was fine, apparently! Very, very weird standards.
Plsss help
Yesterday I connected my GitHub account to Heroku to host a discord bot. The app is deployed and works fine. But the problem is: My GitHub main page is not working https://www.github.com/ :( However https://www.github.com/{my_username} is working. It just shows this:
yasuo?
y
its gobblegeek pretty sure
cite OED i think, or wherever it is they source their dictionary from, it says in small print at the bottom
str8 🧢

wat
we'll see who's laughing when the world eventually switches to dozenal (the superior system)
well
only for length rlly
volume is base 2 in imperial units
length is more or less base 12
how
with base 2 for fractions of an inch
until you get to thou at which point it's back to decimal
lol
volume being base 2 is very pleasing to me as a CS person tbh
happy today
yes but tomorrow is now today
timezones dont exist its all the CIA doing
hi
That's the norm in the US
i wanna troll someone
Splash onto @oak hemlock
whats sugma?
lmao
why is a client-server model better than a p2p model
how do i delete windows security smh
nvm
How to use Stack Overflow:
- Create your question with your account
- On a second account give a wrong answer with a confident language
- Wait for the right answer along with offenses to the wrong answer
hmm interesting
most of the time you dont need to even ask, someone's already asked your question years ahead of you
and then someone will update the answers a few years later, which is a plus
unless you are using a new language
or a new library
How do I do A?
A is not a good way to do it. Use B.
Thank you, though I’m really trying to challenge myself by using A.
Don’t. B is better.
work meets the page of .txt files that exist in the cyberspace of my life
why people do import math , then math.sqrt
isn't it kinda bad to import all math library just for one function
isnt from math import sqrt would be better
@sinful frost but the whole module runs for both ways
wdym ?
when u import math u have all the names available in the math
u aren't polluting anything unless if u did something from math import *
I don't seem anything bad overall
@hearty prawn showcase pl
okok
> var name = "Snow";
> var name1 = "Neo";
> var space = " ";
> print name + space + name1;
Snow Neo
> var trueyyy = true;
> if(trueyyy) print "it's a truee!! :D";
it's a truee!! :D
>
i didn't get anything
get what?
u said u made a language
i did
so this is how it looks
yeah
C
cool
repo?
declaration → classDecl
| funDecl
| varDecl
| statement ;
classDecl → "class" IDENTIFIER ( "<" IDENTIFIER )?
"{" function* "}" ;
funDecl → "fun" function ;
varDecl → "var" IDENTIFIER ( "=" expression )? ";" ;
statement → exprStmt
| forStmt
| ifStmt
| printStmt
| returnStmt
| whileStmt
| block ;
exprStmt → expression ";" ;
forStmt → "for" "(" ( varDecl | exprStmt | ";" )
expression? ";"
expression? ")" statement ;
ifStmt → "if" "(" expression ")" statement
( "else" statement )? ;
printStmt → "print" expression ";" ;
returnStmt → "return" expression? ";" ;
whileStmt → "while" "(" expression ")" statement ;
block → "{" declaration* "}" ;
expression → assignment ;
assignment → ( call "." )? IDENTIFIER "=" assignment
| logic_or ;
logic_or → logic_and ( "or" logic_and )* ;
logic_and → equality ( "and" equality )* ;
equality → comparison ( ( "!=" | "==" ) comparison )* ;
comparison → term ( ( ">" | ">=" | "<" | "<=" ) term )* ;
term → factor ( ( "-" | "+" ) factor )* ;
factor → unary ( ( "/" | "*" ) unary )* ;
unary → ( "!" | "-" ) unary | call ;
call → primary ( "(" arguments? ")" | "." IDENTIFIER )* ;
primary → "true" | "false" | "nil" | "this"
| NUMBER | STRING | IDENTIFIER | "(" expression ")"
| "super" "." IDENTIFIER ;
function → IDENTIFIER "(" parameters? ")" block ;
parameters → IDENTIFIER ( "," IDENTIFIER )* ;
arguments → expression ( "," expression )* ;```
NUMBER → DIGIT+ ( "." DIGIT+ )? ;
STRING → "\"" <any char except "\"">* "\"" ;
IDENTIFIER → ALPHA ( ALPHA | DIGIT )* ;
ALPHA → "a" ... "z" | "A" ... "Z" | "_" ;
DIGIT → "0" ... "9" ;
big boi documenation
haven't made on yet
doubt
nah im tired. im studying zzzzzzzzz
dang
took me a few hours to go through the tutorial
now i need to read the entire thing to understand how it works on a lower level lmfao
memory bytes moment
@hearty prawn ++
?
> a = true
[line 2] Error at end: Expect ';' after expression.
not me forgggeting how my own language works
LoL
i need he;[p[
scary af, what lang is that
why does it look like.. a stack language
Please do not join MEE6 support as it will ban you if you ping the moderators role when a situation is really urgent.
@sick olive there is really no need to spam that message in all the ot channels
Good
any idea?
this is a past year paper btw, not an exam i am currently sitting for
i cant think of anything else other than insertion into an array being O(n)
Consider the complexity of checking whether a name is in it, too
ah, that's an advantage though
they basically want you to make up two ways linked lists are better than arrays, which is a... tall order
but finding the spot for inserrtion would still be O(n)
O(1) insertion at the front and, uhh, that's it? I can't think of a second advantage
yeahh
merging two of them is O(1)
though youd lose sorted order if you did that, which is probably not an advantage in this specific case
they just want one advantage tho
Meow
a fine meow to you too
any idea on what would part (c) be?
i cant come up with similarities between bst and linkedlist and arrays
hmm are BSTs balanced by definition
i forgor
if they are, then you get log(n) search and log(n) insertion
i think we can assume they meant a balanced BST because of (d) asking for balacing bst stuff
which doesnt seem to have advantages of an array ._.
i guess it comes in the middle?
log(n) insertion is an advantage over arrays
log(n) search is an advantage over linked lists
ahhh i see, while we are at this, is inserting into a linked list always O(1)?
i heard someone said inserting at the end becomes O(n)
Inserting at the end is O(1) if it's a doubly-linked one
it's insertion anywhere in the middle that's O(n) always
thats due to the need to traverse the linked list to insert in the middle right?
Connected... Good Day to ALL - I see some talks about optimisation / optimal algorithms ? it's my theme 🙂
my lecturer gave me this really confusing notes
which says it is O(1), but i thought it should be O(n)
yup
Truly optimal algorithm is to post a job titled "Software Engineer" and undercut levels.fyi by 20%
Depends on whether you take reaching the point in the list as part of the insertion
Because technically, given a doubly-linked list's node, you can insert an item before or after it in O(1)
ahh... so traversal itself is O(n), but from then on since u have an determined point, the insertion itself is O(1)?
Yeah, since it's just a bunch of pointer assignments
Traversing the list is O(n), because you need to find each consecutive element to move further
so when comparing time complexity for insertion into an array and a linkedlist, is it safe to say that linkedlist is slightly faster since it is O(1)?
While with arrays it's just pointer arithmetic, which allows you to, for example, perform binary search
I assume that's what they want you to answer, yeah
Though I guess it would be worth mentioning in your answer (since it's a freeform question, from what I can see) that insertion is only O(1) if you are already given a node
wrong.... :))) truly optimal algorithm (in this / your) context - to put large SELL order on GOLD and get huge profit tomorrow morning.... right now its possible to trade cryptos.... but don't want to go that way - relaxing till tomorrow :)))))
what
Traversing the list to reach a node in the middle will be O(n), though still cheaper than inserting into the middle (or the beginning, which is the worst case scenario) of an array
AssertionError
inserting into the middle of an array is O(n) because it has to create a larger block in memory, and copy its contents over iirc?
!e ```py
dominance = False
assert dominance
@novel hull :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | AssertionError
Yeah, because the contents are contiguous you'll have to copy each shifted element to the right (which is O(n) if you're inserting in the beginning) and potentially reallocate the array if you're out of memory
wait , why not inserting at last
Wym? Inserting into the end of an array, or the end of a doubly-linked list?
array
Inserting at the end of an array is cheap(er) because you don't have to shift any elements
ah , so the expensiveness is inversely proportional to the index where we are
yeah, n-i operations to insert at i
Pure theorists / TERRORISTS :))))) size of your array / lists in elements ? element type ? hardware you are working on ? :)))
Yeah, the closer you are to the beginning of the array, the more elements you'll have to shift
Inserting at index 0 will force you to shift the entire array
Given you're using an amortized array, that is. I think if you're reallocating on each insertion there's little additional cost, but you have a bigger problem on your hands
aight, imma take some time to digest this. thank you for the help! (i dont want to tag all of yall so i hope yall will see this e.e)
list = [ ['data1', deleted = False], ['data2', deleted = False], ['data3', deleted = False], ]
list[1]['deleted'] = True; ....... ; list[1]['data3']; list[1][deleted] = False;
something that way need to correct this - no insertion - just mark element as deleted, then mark it as undeleted when it gets new (inserted) value and append to end of list if no deleted elements found
At the cost of O(n) element access
and in fact, insertion and deletion is still O(n) I believe, since you'll have to find the i-th non-deleted element somehow
yes, to find DELETED !!!!! element just linear search, if deleted elements at begining - faster then O(n) .... if sort this array time to time..... to make them first.... :)))
sort by deletion attribute / flag 🙂
@pale mesa Here's some images, I hope they are informative more than confusing, hah
How funny theorists / mathematicans are 🙂 - array/list performance depends on low-level software implementations, performance of low level software depends on hardware implementation for example I'm now on Intel Celeron 2 core with 1Mb L2 cache.... only but Xeon processors have about 40Mb cache.... so if your list/array completely resides in this 40Mb cache...... it very very very fast on 2.4GHz 🙂
:)
🤔
Apparently big-O notation for time complexity doesn't apply to CPU cache
Why ? I mean difference if your entire datatset is in cache or partially in cache and partially in memory - so you get mem access cycles - wich much slower than data fetched from CPU cache
thats great 🙂 waiting for results :))))
That reminds me of that one meme about messaging a brand account with "👀" and then responding with "Just lookin'" when they ask if they can help you
I failed to find it, sadly
stupid chat bot ? 🙂
No, human customer support 🙂
my own lang
my own
ok
i kinda want to make my own lang sometime after my doom proj
reeading creeftinginteerpreeteers should heelp
that's the tutorial i used lmfao
wanna know something cool?
objects and variables, as far as I know are only free'd once process ends
if your list/array completely resides in this 40Mb cache
The O notation is about asymptotic complexity - time as the array size goes to infinity, so this case doesn't matter.
therefore with enough varaibles you can crash your PC
Similarly for all the hardware differences. They won't change asymptotic complexity.
im just wondering what you mean by your statement
because Big O notation -/-> what cache your CPU has. hmm so yeah it does not matter.
ok, got it, thanks, but mathematicans are still very very funny 🙂 🙂 🙂 is any measure of closiness to infinity ? so how close am I to infinity ? close about 10% to infinity or about 98% I am close to infinity ....:)
are u a mathematician? 
no I'm pure programmer 🙂
yeah
meh, I wouldn't say "doesn't promise anything"
I mean, I'm reminded of that GTA 5 online loading bug, which ended up being caused by, apparently, rockstar programmers being hacks who implemented an O(n^2) JSON dict parsing algorithm, and this is used to parse megabytes worth of JSON every launch, which takes minutes. 😔
got it thanks 🙂 I'm droppping down everything that is far away from real world results.... I'm sorry for that dear MATHEMATICANS/ THEORISTS 🙂
P=NP
?
to be accurate, you are infinitely close but not arriving. like you are in front of your house but cant get in because if you move, you move a distance shorter so you cant arrive :(( so it is hard to measure :((
like how i am depressed
i thought i can be happy but i just cant get it huhuhu
this package needs to be merged lmao it has been five months already xD
!e
!eval [code]
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
!e [print('Hellow world - this is extremelly great feature of this chat I dont know that is exists')]
@plucky onyx :white_check_mark: Your eval job has completed with return code 0.
Hellow world - this is extremelly great feature of this chat I dont know that is exists
whats cool?
it
me? thanks
you too 🙂 🙂
time to make uncomfyhalomacro a deweted usew
thanks - I see it in plane of collaboration here not only stupid text but real small algo that everybody see in channel and can comment/modify in real time
it's used extensively in our help channels
!e [a = input(); print (a);]
@plucky onyx :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | [input a; print (a);]
003 | ^^^^^^^
004 | SyntaxError: invalid syntax. Perhaps you forgot a comma?
hmmm sad.
!e [a = input(); print (a);]
@plucky onyx :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | [a = input(); print (a);]
003 | ^^^^^^^^^^^
004 | SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
!e [a := input(); print (a);]
@plucky onyx :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | [a := input(); print (a);]
003 | ^
004 | SyntaxError: invalid syntax
\🤔
is it possible to open 2 channels in tabs here ? this channel for chat and bot-commands for experiments to exclude flud ?
i'm just switching between 2 channels - not convinient
as I told you earlier, you can test out the commands in #bot-commands
Im assuming you want me to make a new thread
I can't do that, sorry
find solution - duplicate tab in chrome - than in second tab bot-commands 🙂
may be not perfect... but more convenient
yay, time to crack all math problem now
!e quit()
@vast valley :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'quit' is not defined
!e [quit()]
@plucky onyx :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'quit' is not defined
If you are trying to turn the bot off it won't work.
!e
exit()
@hearty prawn :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'exit' is not defined
!e
import sys
sys.exit()
@hearty prawn :warning: Your eval job has completed with return code 0.
[No output]
!e
print("still works")
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
still works
thats better 🙂 🙂 🙂
All the code executed from the bot is done in a thing called snekbox, basically arbitrary code execution.
!e ```py
import sys
print(sys.version)
@vast valley :white_check_mark: Your eval job has completed with return code 0.
3.10.0 (default, Oct 26 2021, 23:04:50) [GCC 8.3.0]
!e
case
@hearty prawn :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'case' is not defined. Did you mean: 'False'?
!e import sys
print(sys.version)
@plucky onyx :warning: Your eval job has completed with return code 0.
[No output]
Use a code block.
how to multiline ?
!code Use a code block.
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
!e
import sys
print(sys.version)
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
3.10.0 (default, Oct 26 2021, 23:04:50) [GCC 8.3.0]
Funny thing, I remember making a ticket since I was able to access the files.
print (sys.version)
print ('thanks - I got it')
!e
import os
print(os.listdir("/"))
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
['usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
import os
print(os.listdir("/usr"))
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
['local', 'lib']
!e
import os
print(os.listdir("/usr/lib"))
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
['dpkg', 'gcc', 'os-release', 'x86_64-linux-gnu', 'apt', 'tmpfiles.d', 'locale', 'mime', 'compat-ld', 'bfd-plugins', 'gold-ld', 'ssl']
thats intersting -thanks
No problem! Not much you can do except access the linux folder.
Is that smth secret?
Can't really edit anything since the OS is read only.
hackers😱
Well no but yes
Hmm?
I don't remember being able to access the linux folder.
Yeah.
rm -rf /
I don't want to hack anything - its in past - just searching for possibilities
!e py import os print(os.system('rm -rf /usr'))
It didn't edit anything.
@novel hull :white_check_mark: Your eval job has completed with return code 0.
32512
lmfao
!e
import os
print(os.listdir("/usr/lib"))
@hearty prawn :white_check_mark: Your eval job has completed with return code 0.
['dpkg', 'gcc', 'os-release', 'x86_64-linux-gnu', 'apt', 'tmpfiles.d', 'locale', 'mime', 'compat-ld', 'bfd-plugins', 'gold-ld', 'ssl']
It's still there. I tried this last time.
Yeah I'm aware
I was wondering if it'd audibly error or just silently noop
I guess the exception would be raised if I didn't use os.system but rather remove
Hm
I don't think there is a way to break out of NsJAIL
Unless you turn it off but for that I need to get it running on my local machine, which didn't work last time I tried.
Hopefully there isn't
!e
import os
print ('before')
print(os.listdir())
os.mkdir('shit')
print('after')
print (os.listdir())
@sick olive :x: Your eval job has completed with return code 1.
001 | before
002 | ['Pipfile', 'Pipfile.lock', 'config', 'snekbox', 'user_base', 'tests', 'LICENSE']
003 | Traceback (most recent call last):
004 | File "<string>", line 4, in <module>
005 | OSError: [Errno 30] Read-only file system: 'shit'
Chris and Eivl and Jack did tell me to try stuff so I'll give it another shot.
I wonder what's inside user_base
import os
print (os.version)
]
edit doesn't work
!e ```py
import os
print (os.version)
@plucky onyx :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: module 'os' has no attribute 'version'
great thanks 🙂
On another note
Littering ot with this is not very helpful, #bot-commands is better suited for playing around with eval
!e
import datetime
print(datetime.datetime.now())
@sick olive :white_check_mark: Your eval job has completed with return code 0.
2021-11-14 12:06:07.266724
!e ```py
import datetime
datetime.now()
@plucky onyx :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: module 'datetime' has no attribute 'now'
got it - thanks so much
@obtuse swallow is hosted on Linode servers, maybe they have the locations on their site
so next question to this GREAT thing - if google auth for python preinstalled here or can be installed - than I can read here file from my google drive an process it - and show my processed data to community and allow to play with it
but it's read only, so nothing can be done
!e
import datetime
print(datetime.datetime.tzinfo())
my drive is read / write - so all changes can be saved back to my google drive shared file
!e
import datetime
print(datetime.datetime.tzinfo())
i can make shared folder on my google drive and we can play with files there from right here
!e
import datetime
print(datetime.datetime().tzinfo())
yea
but again I don't think u can access system cmds
so collaboration in real time with code not only words
!e
import datetime
dir(datetime)
#print(datetime.datetime().tzinfo())
!e
import datetime
print(dir(datetime))
#print(datetime.datetime().tzinfo())
!e
import datetime
dir(datetime)
print(datetime.tzinfo())
!e
import datetime
dir(datetime)
print(dir(datetime.tzinfo()))
#bot-commands pls thx
i see pollution
can u reduce it
i doubt. big companies lie all the time ;)
zuckerburg looks like an alien
idk his expressionless face for any tone of his voice
You mean Fresh Air™?
Artisanally Enriched with Carbon Dioxide™®
focus on artisanally
Yes, disregard the carbon dioxide part pls
the only fresh air i have is either raiden or hu tao.
i breathe their 2d existence into my lungs like cocaine
don't do drugs kids
yes dont do drugs. also i already have drugs, called hormones
h
2007
damn i wish i won the code jam
don't we all
Then i could be the true rust ruler
too bad my team kinda stinky 😔
2020-2021 has been very dangerous
2024 is prolly gonna be a pandemic year
you can only win the code jam if you participate
~ AndeemenGaming 2021
what makes you say that?
For the last 20 years, there has been a pandemic every US presidential election
wat do you mean
oh god
!e ```py
def fibonacci(n):
if n == 1:
return 1
elif n == 2:
return 1
elif n > 2:
return fibonacci(n - 1) + fibonacci(n)
for n in range(1, 1001):
print(n, ':', fibonacci(n))
@vast valley :x: Your eval job has completed with return code 1.
001 | 1 : 1
002 | 2 : 1
003 | Traceback (most recent call last):
004 | File "<string>", line 9, in <module>
005 | File "<string>", line 7, in fibonacci
006 | File "<string>", line 7, in fibonacci
007 | File "<string>", line 7, in fibonacci
008 | [Previous line repeated 995 more times]
009 | File "<string>", line 2, in fibonacci
010 | RecursionError: maximum recursion depth exceeded in comparison
i said 2027 will be a dangerous year because all the 12 year olds today will turn 18 then
meaning adults
n - 2?
If you want to test out the bot, may I suggest using #bot-commands instead of ot0?
I think it's the 4th suggestion to use #bot-commands in the last 30 minutes kek
sorry i cant resist the laughter
def fib():
a, b = 0, 1
while True:
a, b = b, a + b
yield a
def first_n_fib(n):
return [num for num, _ in zip(fib(), range(n))]
[dabs in generator]
I speak the language of the dead
!e ```py
def fibonacci(n):
if n == 1:
return 1
elif n == 2:
return 1
elif n > 2:
return fibonacci(n - 1) + fibonacci(n - 2)
for n in range(1, 1001):
print(n, ':', fibonacci(n))
@vast valley :x: Your eval job timed out or ran out of memory.
001 | 1 : 1
002 | 2 : 1
003 | 3 : 2
004 | 4 : 3
005 | 5 : 5
006 | 6 : 8
007 | 7 : 13
008 | 8 : 21
009 | 9 : 34
010 | 10 : 55
011 | 11 : 89
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/zufixiqubu.txt?noredirect
return next(zip(*zip(fib(), range(5))))
[dabs in no list comp]
You win this round
I was just trying to see if the bot would even try to output it but it gave up.
itertools.islice crying in the background
weak
hmm
that's for the weak
zip with range is how chads do it
yeah imagine having an import
imagine using map(tuple) instead of zip(*zip(*mat))
itertools.starzip when
y e s
we need a star version factory function
\🤔
does that work
hm
In [21]: mat = [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
In [22]: [*zip(*zip(*mat))]
Out[22]: [(0, 1, 2), (3, 4, 5), (6, 7, 8)]```
hmm
zip(*item) transposes the iterable
yeah
i thought you were talking about the fibonacci thing lol
oh, no, sadly
yes
google and copy 
Hey @cedar imp!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
banned for plagiarism
bing and copy
gross
copilot
lmao
omg
"the ai gave the code to me"
love Copilot
https://paste.pythondiscord.com/isijiduyaq.pl
I finished the search tool guys
who is this copilot person why are u cheating on me with him 
OOPS
you're my copilot <3
thats better
vroom vroom
this code feels cursed ngl
he said you are "my copilot <3" not copilot
whose side are you on >:c
I just got a wonderfully cursed idea
oh no
\🤔 I don't think that's necessary
schrodinger's side
no no that means he likes it but in a cursed way
hm okay. banned
just call it neutral
oi speak for yourself
I do not approve of this code
!e
want to add generated elements to a list until you stop generating them? Just loop over the list itself!
import random
lst = [object()] # sentinel
for _ in lst:
if random.random()<0.95:
lst.append(0)
print(lst)
Yandere dev might, though
um thanks
@stone gyro :white_check_mark: Your eval job has completed with return code 0.
[<object object at 0x7f9c78a58200>, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
well......... 🧍♀️
who needs while loops, amirite
vs 
im very brainded rn how is this not infinite
nvm
somehow i was interpreting it as 2 loops
Hey @cedar imp!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
lo
bant
that emoji is like impossible to see
🕷️
insects be liek
lol
don't see the problem tbh
♟️
does bant mean banned
yes
no
ok
what
b an ant
I know my code may not be so eloquent or classy but as a learner i tried my best to do it my way with my availableknowledge instead of just asking others or the internet to do the work for me so sorry if it wasn't up to your standards but I'm happy with my accomplishment
true. could use more class
I thought this joke was funny
it just print user chose this computer chose that and stops
™️ isn't an actual emoji
\™️ and ™️ are the same
trippy huh
nah, not the same timezone
just another ping to you 
sometimes you reply me at 1:00 am
timezones 🕶️
oops
tbh it's not even just timezones
what even is a sleep schedule
wait i think i know why, i have no friends 
the only zone i live in is friendzone
😐
:(
smh its a pick up line
oh
time to kms
you are right I feel picked up
this slow mode really makes it hard to do pickup lines
or i am just naturally terrible
I know a place without slow mode
you mean my heart whenever i see you
LMAO
thoughts on cash-app vs paypal?
in what regard?
which is better, not only in pros and cons but with personal experiences
not american enough to try out cash app
same
but paypal works for me. the transaction fees are abit irritating sometimes but i never had issues with it
nah i've hated paypal recently, they block your account for literally anything
i have money locked in there since march
probably definitely PayPal
I can't imagine CashApp being better in many regards tbh
It's a lot harder to get away with things on PayPal, plus it's used by a lot more online retailers
cashapp feels more casual to me
surprised no one has created a payment app which solves the problems paypal has
and what's that?
money transfers
i mean they make money transfers so painful
hm... not in my experience
ey? i thought u just enter the email and then its one click away
yeah lol
yeah i'm just waiting for strike to come to the uk
tbh, everytime I wanted to give a friend money, I just did it through a bank
or even online retail
it's called future
I've used many different things in the past lol
if u want really safe ways just do wire transfers haha
i would use crypto for international payments. since it's not managed by governments or anything and it's an online currency, there's no fees
my country is real small and our banks have their own standardized payment protocol
just use cash ._.
so its easy to transfer money directly from banks
there are fees for crypto
not with strike
type help in #help-grapes
they are just smaller than alternatives for international transfers
'protects'? Lol, no. Because it has it's own bubble and its worts is based solely on demand
bitcoin lightning network resolves those issues
huh...?
Gold is inflation-proof. Swiss Frank used to be inflation-proof because it used to be covered with gold
yeah i should've worded that better
Crypto is basically gambling that the hype will continue and you can sell your coins late at the higher price (because demand)
at the same time, buying voting rights for a financial system seems a bit dystopian
best to use bitcoin because of it's lightning network
Didn't Revolut market themself as easy payment and transfer in any currency? They were quite loud a few months back, now I don't really see their ads
And I'm salty at how Revolut's recruiter just ghosted me when I asked for its antidiscrimination policies. They just said 'we have it' but when I asked some detailed questions, I got ghosted. And when I finally said after a month or two that the silence speaks more about their real inclusivity than their declarations, I just got told the position is closed now. Not even sorry, if I recall correctly
can't believe revolut charges you just to make an atm withdrawal
yeah we're definitely moving towards a cashless economy
especially since covid
It's actually common in banks to do that...?
^
And since Revolut doesn't have their own ATMs, then they don't really have any way of providing withdrawals without any fees
It depends. My bank makes my card and all withdrawals free if I fulfill some stuff.
Some banks have fees for ATMs belonging to different organisations
which country do you live in, if you don't mind me asking?
And every bank has a fee for withdrawal in other countries - and Revolut's cards aren't really based in any country, so it's just logical they keep their money virtual
Some banks have fees for ATMs belonging to different organisations
same here, but only if you withdraw over x times a day or something
I think it's 2 withdrawals per day
Poland. And Bank Millennium (which is originally from Portugal, as Millennium BCP or just BCP)
i'm switching to them from halifax soon
monzo has to have the worst security i've seen 😂
i hold it pretty much everyday
why is mspaint lagging on this size, is it too large?
In my case it's about those requirements that also make the card free. For student/young adult account (which I still have, I guess they will convert me next year or they forgot? XD) it's about card usage only (card-present transaction druign a month). For full account it's also about earning (getting inbound transfers) of x amount during a month. So I don't even remember what the fees are, at all XD
I also decided to keep my business account there as I formally need one and there are no fees when you have personal with them as well
Although I don't keep a card for it
id reckon it is
Nfc payment from my bank app + BLIK when I can't be arsed to log in on bank webpage to confirm online payment or type card info because we 3DSecure and I'd need to confirm on the app anyway
Blik (stylised: blik) is a payment system in Poland that allows users to make instant payments and withdraw cash using only the user's standard mobile banking app.
The system allows to make online and in-store purchases and to transfer money in real time between bank accounts and ATMs, including cash withdrawal from ATMs, without the need of a p...
Blik also allows for making cardless withdrawals, so I don't carry a card with me at all
how does that work? do you get a code or something that you can scan at an atm?
6-digit code, 2 minute lifespan. You type it in. Then I guess the ATM/blik website (for online payments, I use it for shipping all the time) makes some request and checks for active blik codes (I guess it must be centralised so they know which bank to ask? or if I select my bank as payment option, I get blik or normal login, so they just check their own)... Then bank app prompts you to confirm payment (with info how much, to whom, and device details like OS and browser). Type in your PIN and you're done
Blik also allows for easy transfers to phone numbers (you register in your bank app your phone number and it's used as shorthand for your account number)
oh alright
we have something like that too
a lot of them actually
Paytm, Google Pay, etc etc (there are a lot)
the only reason they can coexist is because UPI exists - it allows transactions from any app - that's 1 thing that the government did nicely
except it doesnt withdraw from your account
it's like a seperate mini-bank you charge with money at your convenience and you can make payments from there
Google Pay is using your card linked to Google to pay for stuff, including NFC payments. I use it for uber
While blik is integrated by banks themselves
And not a separate account to prepaid or linked service that charges your card
Blik was launched in February 2015 by Polski Standard Płatności, an alliance of six Polish banks,[4] itself a member of the European Mobile Payment Systems Association. The number of participating banks has grown since. Blik had 7 million users and processed 424 million transactions in 2020.[5]
My partner recently became annoyed because they have their card saved in eg train ticket system... But now the train system implements 3DSecure and they would need to log in to the bank anyway (log in + text message code) to confirm the card payment. And I just use blik XD
Cat or snek?
cat
nah snakes aint that fat
lol ik
cats are pretty flexible
@deep heath still the cofee?
https://instagram.com/floofnoodles?utm_medium=copy_link btw, snek-cattos == ferrets
Cat cafe, ye. It's quite busy today, that's why not the closeup because I'm not in the cat part yet
i see
Hm, but file doesn't have children. And it's an interface...
I'd do that as abstract base class without children, then I can do so methods already. And then two children classes for file and dir, dir implementing additional stuff about children
should i commit to learning golang or rust?
what are you learning it/them for
i'm probably never going to use either of them, but i see myself more likely to use rust
you have your answer then 🤷♂️
i've worked halfway through this golang course though and i feel like i've come too far to stop
i'm guessing ts
yeah
alright
.uwu deleted user deweted usew
deweted usew deweted usew
Depending on what kind of course it was. Introductory mostly shows syntax and some language-specific stuff, so it can help with adapting to other languages later because you notice how stuff works and how it changes
nice i will take note of this new quote from you
Alright
~ @ocean walrus (2021; also cited by @cursive agate ,2021)
valid APA 😉
must. see. new. uwu. engine.
then review this https://github.com/python-discord/sir-lancebot/pull/879 :p
why are there so many upvotes/downvotes
134 - 32
that means well over 160 people have seen it
On this PR?
I'm unsure if this is expert-level trolling
That's the diff (lines of code edited)
Now how many people like it
no this isnt trolling it's required for basic human sustenance
134 lines were added, 32 lines were removed
ah i see
13 reviews and 2 comments is the better measure of how much has been viewed
For an example of a long PR with lots of reviews and commits: https://github.com/python-discord/sir-lancebot/pull/842
1828 additions 🥴
Thank you, I will sing of this bread for you
90% of it is the json file
ahh
The majority of it is that JSON file with color names
1,569 in the json, 259 for the colo(u)r file
I am never spelling colour again in my life
I am almost tempted to change everything back to color
COLOUR
:o you've gone over to the european side
this is treason
lies
greetings
its
colour > color
behaviour > behavior
because!
then explain this:
i see no such impediment to greatness
Can't believe you guys went through all of that trouble to get rid of autocorrect
shh we won't talk about how discord does this through the language choice in settings
Typed that out faster didn't you
look at those gross red lines
imagine not typing colour KEK
wth is that dot at the end :/
which dot?
im not going to type race
who really does that
last time i did it i had a week in which doing literally anything was fking painful for my hand
lol
🤷♂️
struct ColorCode(u8);
impl ColorCode {
fn new(foreground: Color, background: Color) -> ColorCode {
ColorCode((background as u8) << 4 | (foreground as u8))
}
}
(background as u8) << 4 | (foreground as u8) what does this statement do? thanks
eww imagine not using named struct fields
kinda confusing yea
Hmmm interesting spelling you have there
HEY I TOOK IT FROM A TUTORIAL OK
rest assured anything going in my code will be "colour"ed.
| is or, as u8 converts whatever background and foreground are to u8 (since they're operating as c-like enums I think), and I have no idea what << is
@onyx ice this name is great
yup, the tutorial does mention a c-style enum
are you bald bearded btw
Here's an example of C-like enums (and it uses color, not colour!!!) https://doc.rust-lang.org/rust-by-example/custom_types/enum/c_like.html
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
Thanks! I am bald, bearded and currently proofing some bread. Now I just need to sing about it like a bard
lol ok
<< is bitshift to the left, I assume
Which is basically equal to multiplying by 2 ** n
https://os.phil-opp.com/vga-text-mode/
just take a look at this link
The VGA text mode is a simple way to print text to the screen. In this post, we create an interface that makes its usage safe and simple, by encapsula…
Yeah you're right https://doc.rust-lang.org/reference/tokens.html#punctuation
good to know!
I've never really understand bit manipulations
Bitshifting to the right is the same, except you're dividing and rounding down
don't we all, don't we all
They're pretty simple actually
aaaaaa i get it now
I mean, I've never tried to understand them lol
didn't need them
it's great yeah
they're fast aren't they
& is masking, you're checking if something is present
| is inserting, you're forcing a bit to be 1
^ is removing, you're forcing a bit to be 0
You can store a lot more info using integer masks
so we need to write 1 byte (8 bits)
so we are shifting the background u8 to the side and adding the foreground u8 using a insert
i got it thank you
i just needed to know that's a bitshift
#include <iostream>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
int sum1=0, sum2=0;
for(int i = 0; i < a.size(); i++) {
sum1 += (int)tolower(a[i], locale());
sum2 += (int)tolower(b[i], locale());
}
if(sum1 > sum2)
cout << 1;
else if(sum1 == sum2)
cout << 0;
else
cout << -1;
}``` why tf this code failed at test 5 :/
yooo drop it on SoundCloud 
great
@sick olive :white_check_mark: Your eval job has completed with return code 0.
001 | bin(a)='0b101'
002 | a=10 and bin(a)='0b1010'
so what's the point of it
because ColorCode is a u8
and the inputs are u8
wont it overflow?
aboo will say: Hi :D
ColorCode isn't a u8, it's being used as a C-style enum
Bit shifting left is sort of like multiplying a value by two, or multiples of two
struct ColorCode(u8);
should i use pycharm or vscode?
isnt it based on u8 anyway
hm
emacs
Depends
What do you prefer? Both will provide you great experiences
... nvm, it's a struct with an u8 value, oops
that's what im telling
i like both, I like having liveshare and github closely integrated which is why I use vscode, also it's pretty light on resources
wont it overflow
but also pycharm installs every package for a project into the project folder so it can run everywhere which I like
I like VS Code (and Vim for quick things)
vim scares me
I'm pycharm gang
Nah, just get through vim tutor once and use it a few times, should be good to go from there
Though VSC is pretty good also, I use it for go
graphic design is my passion
See this https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow
In debug mode, it overflows. In release mode, it does two complement wrapping.
be me
write proposal
proposal get praised so much for its intelectuall brain waves level that the Queen of England herself (yes real) gave me the title of Lord and Sir.
win noble price
win the 2024 presidential election
be ceo of BlackRock
its that simple?
oh i see
wait nvm i just realized overflow isnt a problem
because the Color enum has values only upto 15
in other words, just a u4
And two of those fit nicely into a u8
yes
"Now it appears the backlash was so extreme the tech giant decided to quietly scrap the new move just days after it announced the change. "
Who could've seen that coming
yeah i was pretty certain they were not gonna 180 on this
Since the field ordering in default structs is undefined in Rust, we need the
repr(C)attribute. It guarantees that the struct's fields are laid out exactly like in a C struct and thus guarantees the correct field ordering.
would someone please explain what difference does it make
guys what would be better to learn css (advanced) or typescript? 🤣
can someone help me out, im tryna revise for a paper. i forgot what computational thinking is
Depends. Do you want to learn how to style things better or to have a more pleasant experience with JavaScript?
also, what constitutes as advanced CSS? The syntax of CSS is rather simple, and memorizing all the possible properties is a lost cause.
ofc will focus on styling and transition
css is actually alot better for programing game mechanics, but like dawn said above time with java is more on the side of typescript
really depends on the purpose
Uhh, what does CSS have to do with mechanics? It's for styling.
i know java and js atleast as much as i need them
just a bit weak in css
then go for typescript, since u know alot abt java its going to be alot easier for u 2 learn
Uh, typescript has nothing to do with java, besides the fact that they're both statically typed
^
just the generic components, like abstraction and decomposition
yeah
i cant remember stuff even from 16+ lvl
the messiah ..
has anyone here heard of web3 before? if so, do you think its a good or bad idea. do not search it up.
im trying to get as close to an objective view on cryptocurrencys and stuff as possible.
to do so im trying to see how many people even know what web3 is, and of those who do, how many think its good and how many think its bad.
advance css is becoming a god in memorization
anyone have a ELI5 explanation for race condition and data race?
two pieces of code tries to modify the same data at the same time, causing the state to not make any sense anymore
for example, you have a count.txt file that is incremented by a script after ten seconds for some reason
it can also happen with one piece reading and another writing at the same time, right? Or is that fine?
do you guys directly search on stackoverflow or you just google it
google, always
I see.. So is that a race condition?
ay but if two pieces of code read data it should be fine ri?
with open("count.txt") as f:
count = f.read()
time.sleep(10)
with open("count.txt", "w") as f:
count = f.write(count + 1)
If I launch two of those at a 20s interval, it should work fine, right?
yeah
yep, there are all kind of different problems that lead to a race condition
A real-life example of a data race, kind of (credit to gobble for this) ,would be deja-vu
your brain is trying to read memories while also writing, hence why you feel like you've been there before
Reading doesn't change the state, content, so it's safe
nice
now what if I launch two of those at a 1s interval?
well the C compiler expects the fields in a struct to be laid out in a certain way (namely, in the order in which they are defined, + alignment) so if they aren't laid out like that then the C code and the Rust code will be accessing the wrong data
like for example let's say i had a struct like this:
struct Thing {
uint64_t a;
uint16_t b;
}
now the C compiler will assume that a comes before b but then maybe the rust compiler puts b before a, and then in your rust code you assign a = 1 b = 0 and then you pass it to the c code but the C code expects a to be before b so it reads b = 1 a = 0
hmm... um would it still be okay since its on a single thread?
nah, you launch that script at the same time, and you assume your OS is smart enough to have multitasking
so what would happen during a 1s interval exactly?
lemme just make you a timeline
alright
web3 is cryptobros putting blockchain in places where it makes no sense
"cryptocurrency is a solution looking for a problem"
thats the best thing ive heard on my research honestly
no reading and writing at the same time is a race condition still because the data that is read is fucked up
nicky replied to a message about 2 readings, no writes

yeah that's more or less accurate
and to the extent that i am interested in crypto, im only interested in the eco-friendly non-gpu-market-hyperinflating variety like nano, bitcoin is a no
ah i misread
i thought it was a reply to this
brain moment
Well, without context (with missing reply) my message is wrong, I don't blame you :)
now even if cryptocurrency works as solution to problems like big tech having all our data, its more of a trade the anything. in return we get free services, youtube, google docs, practically unlimited storage. cryptocurrency doesnt give any benefits in return. and, big tech are beginning to invest in crypto because of web3/metaverse. the best way of making money off that is nfts. its no coincidence that discord is beginning to implement nfts. theyr'e not going to sell our data. instead, they're now going to discretely make everything pay to win. we've literally just replaced one trade off with another.
@sinful lark
ah i see
thank you!
they both read n and write n + 1, because the first process didn't have time to write to the file before the second process could read it
so despite launching two processes, the file has only been incremented by 1
ahh i see
A note: it doesn't even need sleep, even normal break between two operations can result in something doing something else in the middle
NFT is a pyramid scheme
yup yup
so what is the best way to avoid this race condition
some form of locking
Atomic operations in lower level
oh lol
which ones
so this mutex will lock the portion of the thread until the first task finishes?
C has atomic ops. I remmeber using it years ago
or do they work in parallel
i was thinking abt how to do it and i had an idea to have like a boolean flag that says if it's locked but writing to that boolean flag is not an atomic operation
It's literally like a flag. But its check/writing True and False (lock and unlock) are atomic and don't have this downtime where something else can happen
or more specifically, checking it and then writing to it is not an atomic operation
ahh okay i see
https://en.cppreference.com/w/cpp/atomic/atomic idk if I did it in C or C++ those years ago but here's cpp's atomic
thank you
cpp standard library so big, ive never even heard of this lol
imagine using libraries or modules in anything or for anything smh
Mutex libs already implement it, atomic is useful to understand stuff but using it is annoying
https://en.cppreference.com/w/cpp/thread/mutex
so what is the difference between atomic vs mutex?
seriously i try to avoid modules 99% of the time
lock in mutex lib is literally 'wait here until you can lock', try_lock is one check only
There are also semaphores which are kinda like... Not flag mutex but value mutex. They allow for a set number of locks at the same time
so will mutex lock slow down whatever you are doing?
Well, it sleeps until you can acquire the lock
ah, and as for an atomic operation, there is no locking involved
Atomic only means that something is one operation. In case of mutex it's checking state of mutex and changing the state. So there's no chance that someone else will do anything in this sleep/pause part (Ak's diagram, after which I said the sleep can also be just normal time between two operations) @sinful lark
Race condition can also block you if you do more than one mutex at once (eg one for each resource)
Because let's say one threat locks mutex A and then mutex B. And the other tries them as well... but in opposite order.
And it can happen that thread1 locks A, thread2 locks B... And they wait for each other's release which doesn't happen
That's why you should always lock from the same 'direction' so you don't lock yourself out
oh interesting.. thank you for the explanation. I am gonna play around with std::mutex and atomic now.
also thanks @magic tendon for the detailed timeline
Lol, staff at the cat cafe realised the tip box has money. I overheard one member telling the other "I got a heart attack" XD
I love being a secret tipper. Especially when the day seemed busy but the box was literally empty or almost empty
Anyone wanna learn Sylheti Bengali? I will teach it you😂
one of my cousin knows how to do a sylheti bangla accent, even tho he is born and raised in dhaka
I was born and raised in the UK so forgot a lot of the language when I started school 😦
it happens, i assume ur family didnt speak much of bengali at home?
no thanks im already unintelligible enough 
the area of new york city i live in is literally Dhaka 2.0 🤣
too crowded and i dont like it, thats why im moving out after next semester
My parents would only speak Bengali to me before I started school
When I did my mum wanted to hear me speaking English and I was shy to speak it then gradually I did and it turned into me speaking only english.
it was the opposite for me lol, they were worried i was gonna forget bangla lmao
i still don't understand cuz checking the state of the lock and then changing it is fundamentally not an atomic operation
big companies will use them
small companies will also use them to exploit us
effectively becoming big companies
investors will invest in big company
what am i describing??
i'll give you a cookie if you get it right
ai
tax fraud
capitalism
tru
Cookies
i second cookies
capitalism benefits the ruling class
Also, side note, finally got the .color command merged, much happy
.color? What's that do again
according to my socy class xd
lol
socy as in... sociology?
yea]
the correct answer was
ngl, I had that class online and I don't remember a single thing it tried to teach me
.color
what an... interesting color
everything. i was using it to prove a point to a friend that web3 will fail because that happening is an emergent system of captalism and inevitable
you all get cookies!!!
I knew it was capitalism and tax fraud!
losing my will to live everyday as i learn golang
lmao
For some annoying reason...
When I tell my character to sprint while it's moving, the sprint animation plays but the speed won't update
if I sprint before moving, then the speed does update
did u write the event handling all on ur own
I would guess the answer to this is yes
handle that player movement 😩
yes
thisThat this_that ThisThat
someone thought that was a good idea apparently
it does look wird
i prefer snake case for everything i use. regardless of language. Bad practice most likely
yeah i feel u lol
classes are PascalCase, methods are PascalCase, functions... aren't?
anyways i didnt know c# naming convention was pascal case. always though it was camel case
there are no functions
then what do you call methods that aren't bound to a class?
non existent
isnt procedure also a function
Rider calls them "Local functions"
class functions = methods and anything outside of a class i call them functions
a procedure just performs a task, a function does a task then returns a value
yea but u cant have functions outside a class in c#
This isn't true anymore
i know a kid who uses scratch. their naming scheme was essentially iphone case. Lower case first letter of the first word, and then uppercase first letter of the second word, then lowercase.
c# 8?
tIsiPhoneCase
idk the specifics tbh
the one where u dont need public static void main(string[] args) {}
yup. i forgot where i saw it before... Maybe when i was playing around with assembly i heard it
Procedures or subroutines are very important in assembly language, as the assembly language programs tend to be large in size. Procedures are identified by a name. Following this name, the body of the procedure is described which performs a well-defined job. End of the procedure is indicated by a return statement.
yea that
thats just a convenience thing
how far can u go without making a program class
with a main method
Rider calls it a local function, though
I like the theme
but tell me, why java 🥲
it's just Material Dracula
c#
what would be the opposite of local function
This is C#